From 216605d773f73c4562e92c0ae4b0ab915a79566f Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 3 Aug 2016 20:11:30 -0400 Subject: [PATCH 0001/1029] Allow individually publishable API client libraries. --- handwritten/logging/package.json | 80 ++ handwritten/logging/src/entry.js | 184 +++++ handwritten/logging/src/index.js | 625 +++++++++++++++ handwritten/logging/src/log.js | 516 ++++++++++++ handwritten/logging/src/sink.js | 229 ++++++ handwritten/logging/system-test/logging.js | 414 ++++++++++ handwritten/logging/test/entry.js | 211 +++++ handwritten/logging/test/index.js | 886 +++++++++++++++++++++ handwritten/logging/test/log.js | 571 +++++++++++++ handwritten/logging/test/sink.js | 212 +++++ 10 files changed, 3928 insertions(+) create mode 100644 handwritten/logging/package.json create mode 100644 handwritten/logging/src/entry.js create mode 100644 handwritten/logging/src/index.js create mode 100644 handwritten/logging/src/log.js create mode 100644 handwritten/logging/src/sink.js create mode 100644 handwritten/logging/system-test/logging.js create mode 100644 handwritten/logging/test/entry.js create mode 100644 handwritten/logging/test/index.js create mode 100644 handwritten/logging/test/log.js create mode 100644 handwritten/logging/test/sink.js diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json new file mode 100644 index 00000000000..948c7a7362c --- /dev/null +++ b/handwritten/logging/package.json @@ -0,0 +1,80 @@ +{ + "name": "@google-cloud/logging", + "version": "0.0.0", + "author": "Google Inc.", + "description": "Google Cloud Logging Client Library for Node.js", + "contributors": [ + { + "name": "Burcu Dogan", + "email": "jbd@google.com" + }, + { + "name": "Johan Euphrosine", + "email": "proppy@google.com" + }, + { + "name": "Patrick Costello", + "email": "pcostell@google.com" + }, + { + "name": "Ryan Seys", + "email": "ryan@ryanseys.com" + }, + { + "name": "Silvano Luciani", + "email": "silvano@google.com" + }, + { + "name": "Stephen Sawchuk", + "email": "sawchuk@gmail.com" + } + ], + "main": "./src/index.js", + "files": [ + "./src/*", + "AUTHORS", + "CONTRIBUTORS", + "COPYING" + ], + "repository": "googlecloudplatform/gcloud-node", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google logging", + "logging" + ], + "dependencies": { + "arrify": "^1.0.0", + "extend": "^3.0.0", + "@google-cloud/bigquery": "^0.1.0", + "@google-cloud/common": "^0.1.0", + "@google-cloud/pubsub": "^0.1.0", + "@google-cloud/storage": "^0.1.0", + "google-proto-files": "^0.2.1", + "is": "^3.0.1", + "string-format-obj": "^1.0.0" + }, + "devDependencies": { + "async": "^1.4.2", + "methmeth": "^1.0.0", + "mocha": "^2.1.0", + "node-uuid": "^1.4.3", + "propprop": "^0.3.0", + "proxyquire": "^1.7.10" + }, + "scripts": { + "publish": "../../scripts/publish", + "test": "mocha test/*.js", + "system-test": "mocha system-test/*.js --no-timeouts --bail" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=0.12.0" + } +} diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js new file mode 100644 index 00000000000..0a3a643dcff --- /dev/null +++ b/handwritten/logging/src/entry.js @@ -0,0 +1,184 @@ +/*! + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * @module logging/entry + */ + +'use strict'; + +var common = require('@google-cloud/common'); +var extend = require('extend'); +var is = require('is'); + +/** + * @type {module:common/grpc-service} + * @private + */ +var GrpcService = common.GrpcService; + +/** + * Create an entry object to define new data to insert into a log. + * + * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry} + * + * @alias module:logging/entry + * @constructor + * + * @param {object=|string=} resource - See a + * [Monitored Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource). + * @param {object|string} data - The data to use as the value for this log + * entry. + * + * If providing an object, these value types are supported: + * - `String` + * - `Number` + * - `Boolean` + * - `Buffer` + * - `Object` + * - `Array` + * + * Any other types are stringified with `String(value)`. + * @return {module:logging/entry} + * + * @example + * var gcloud = require('google-cloud')({ + * keyFilename: '/path/to/keyfile.json', + * projectId: 'grape-spaceship-123' + * }); + * + * var logging = gcloud.logging(); + * + * var syslog = logging.log('syslog'); + * + * var resource = { + * type: 'gce_instance', + * labels: { + * zone: 'global', + * instance_id: '3' + * } + * }; + * + * var entry = syslog.entry(resource, { + * delegate: 'my_username' + * }); + * + * syslog.alert(entry, function(err, apiResponse) { + * if (!error) { + * // Log entry inserted successfully. + * } + * }); + * + * //- + * // You will also receive `Entry` objects when using + * // {module:logging#getEntries} and {module:logging/log#getEntries}. + * //- + * logging.getEntries(function(err, entries) { + * if (!err) { + * // entries[0].data = The data value from the log entry. + * } + * }); + */ +function Entry(resource, data) { + if (!data) { + this.data = resource; + return; + } + + this.resource = resource; + this.data = data; +} + +/** + * Create an Entry object from an API response, such as `entries:list`. + * + * @private + * + * @param {object} entry - An API representation of an entry. See a + * [LogEntry](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry). + * @return {module:logging/entry} + */ +Entry.fromApiResponse_ = function(entry) { + var data = entry[entry.payload]; + + if (entry.payload === 'jsonPayload') { + data = GrpcService.structToObj_(data); + } + + var serializedEntry = extend(new Entry(entry.resource, data), entry); + + if (serializedEntry.timestamp) { + var ms = serializedEntry.timestamp.seconds * 1000; + ms += serializedEntry.timestamp.nanos / 1e6; + serializedEntry.timestamp = new Date(ms); + } + + return serializedEntry; +}; + +/** + * Serialize an entry to the format the API expects. + * + * @private + */ +Entry.prototype.toJSON = function() { + var entry = extend(true, {}, this); + + var whitelist = [ + 'logName', + 'resource', + 'timestamp', + 'severity', + 'insertId', + 'httpRequest', + 'labels', + 'operation' + ]; + + for (var prop in entry) { + if (whitelist.indexOf(prop) === -1) { + delete entry[prop]; + } + } + + if (is.string(this.resource)) { + entry.resource = { + type: this.resource + }; + } + + if (is.object(this.data)) { + entry.jsonPayload = GrpcService.objToStruct_(this.data, { + stringify: true + }); + } else if (is.string(this.data)) { + entry.textPayload = this.data; + } + + if (is.date(entry.timestamp)) { + var seconds = entry.timestamp.getTime() / 1000; + var secondsRounded = Math.floor(seconds); + + entry.timestamp = { + seconds: secondsRounded, + nanos: Math.floor((seconds - secondsRounded) * 1e9) + }; + } + + return entry; +}; + +module.exports = Entry; diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js new file mode 100644 index 00000000000..e7d73d29d2f --- /dev/null +++ b/handwritten/logging/src/index.js @@ -0,0 +1,625 @@ +/*! + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * @module logging + */ + +'use strict'; + +var arrify = require('arrify'); +var common = require('@google-cloud/common'); +var extend = require('extend'); +var format = require('string-format-obj'); +var googleProtoFiles = require('google-proto-files'); +var is = require('is'); +var nodeutil = require('util'); +var PKG = require('../package.json'); + +/** + * @type {module:storage/bucket} + * @private + */ +var Bucket = require('@google-cloud/storage').Bucket; + +/** + * @type {module:bigquery/dataset} + * @private + */ +var Dataset = require('@google-cloud/bigquery').Dataset; + +/** + * @type {module:logging/entry} + * @private + */ +var Entry = require('./entry.js'); + +/** + * @type {module:common/grpc-service} + * @private + */ +var GrpcService = common.GrpcService; + +/** + * @type {module:logging/log} + * @private + */ +var Log = require('./log.js'); + +/** + * @type {module:logging/sink} + * @private + */ +var Sink = require('./sink.js'); + +/** + * @type {module:common/stream-router} + * @private + */ +var streamRouter = common.streamRouter; + +/** + * @type {module:pubsub/topic} + * @private + */ +var Topic = require('@google-cloud/pubsub').Topic; + +/** + * @type {module:common/util} + * @private + */ +var util = common.util; + +/** + * [Google Cloud Logging](https://cloud.google.com/logging/docs) collects and + * stores logs from applications and services on the Google Cloud Platform: + * + * - Export your logs to Google Cloud Storage, Google BigQuery, or Google + * Cloud Pub/Sub. + * - Integrate third-party logs from your virtual machine instances by + * installing the logging agent, `google-fluentd`. + * + * @alias module:logging + * @constructor + * + * @classdesc + *

+ * **This is a Beta release of Google Cloud Logging.** This API is not covered + * by any SLA or deprecation policy and may be subject to + * backward-incompatible changes. + *

+ * + * The `gcloud.logging` method will return a `logging` object, allowing you to + * create sinks, write log entries, and more. + * + * To learn more about Logging, see the + * [What is Google Cloud Logging?](https://cloud.google.com/logging/docs) + * + * @resource [What is Google Cloud Logging?]{@link https://cloud.google.com/logging/docs} + * @resource [Introduction to the Cloud Logging API]{@link https://cloud.google.com/logging/docs/api} + * + * @param {object} options - [Configuration object](#/docs). + * + * @example + * var gcloud = require('google-cloud')({ + * keyFilename: '/path/to/keyfile.json', + * projectId: 'grape-spaceship-123' + * }); + * + * var logging = gcloud.logging(); + */ +function Logging(options) { + if (!(this instanceof Logging)) { + options = util.normalizeArguments(this, options); + return new Logging(options); + } + + var config = { + baseUrl: 'logging.googleapis.com', + service: 'logging', + apiVersion: 'v2', + protoServices: { + ConfigServiceV2: + googleProtoFiles('logging', 'v2', 'logging_config.proto'), + LoggingServiceV2: googleProtoFiles.logging.v2 + }, + scopes: [ + 'https://www.googleapis.com/auth/cloud-platform' + ], + userAgent: PKG.name + '/' + PKG.version + }; + + GrpcService.call(this, config, options); +} + +nodeutil.inherits(Logging, GrpcService); + +// jscs:disable maximumLineLength +/** + * Create a sink. + * + * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks} + * @resource [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} + * @resource [projects.sinks.create API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/create} + * + * @throws {Error} if a name is not provided. + * @throws {Error} if a config object is not provided. + * + * @param {string} name - Name of the sink. + * @param {object} config - See a + * [Sink resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks#LogSink). + * @param {module:storage/bucket|module:bigquery/dataset|module:pubsub/topic} config.destination - + * The destination. The proper ACL scopes will be granted to the provided + * destination. + * @param {string=} config.filter - An advanced logs filter. Only log entries + * matching the filter are written. + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request. + * @param {module:logging/sink} callback.sink - The created Sink object. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * var gcs = gcloud.storage(); + * + * var config = { + * destination: gcs.bucket('logging-bucket'), + * filter: 'severity = ALERT' + * }; + * + * function callback(err, sink, apiResponse) { + * // `sink` is a Sink object. + * } + * + * logging.createSink('new-sink-name', config, callback); + */ +Logging.prototype.createSink = function(name, config, callback) { + // jscs:enable maximumLineLength + var self = this; + + if (!is.string(name)) { + throw new Error('A sink name must be provided.'); + } + + if (!is.object(config)) { + throw new Error('A sink configuration object must be provided.'); + } + + if (config.destination instanceof Bucket) { + this.setAclForBucket_(name, config, callback); + return; + } + + if (config.destination instanceof Dataset) { + this.setAclForDataset_(name, config, callback); + return; + } + + if (config.destination instanceof Topic) { + this.setAclForTopic_(name, config, callback); + return; + } + + var protoOpts = { + service: 'ConfigServiceV2', + method: 'createSink' + }; + + var reqOpts = { + parent: 'projects/' + this.projectId, + sink: extend({}, config, { name: name }) + }; + + this.request(protoOpts, reqOpts, function(err, resp) { + if (err) { + callback(err, null, resp); + return; + } + + var sink = self.sink(resp.name); + sink.metadata = resp; + + callback(null, sink, resp); + }); +}; + +/** + * Create an entry object. + * + * Note that using this method will not itself make any API requests. You will + * use the object returned in other API calls, such as + * {module:logging/log#write}. + * + * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry} + * + * @param {object=|string=} resource - See a + * [Monitored Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource). + * @param {object|string} data - The data to use as the value for this log + * entry. + * @return {module:logging/entry} + * + * @example + * var resource = { + * type: 'gce_instance', + * labels: { + * zone: 'global', + * instance_id: '3' + * } + * }; + * + * var entry = logging.entry(resource, { + * delegate: 'my_username' + * }); + * + * entry.toJSON(); + * // { + * // resource: { + * // type: 'gce_instance', + * // labels: { + * // zone: 'global', + * // instance_id: '3' + * // } + * // }, + * // jsonPayload: { + * // delegate: 'my_username' + * // } + * // } + */ +Logging.prototype.entry = function(resource, data) { + return new Entry(resource, data); +}; + +/** + * List the entries in your logs. + * + * @resource [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries/list} + * + * @param {object=} options - Filtering options. + * @param {boolean} options.autoPaginate - Have pagination handled + * automatically. Default: true. + * @param {string} options.filter - An + * [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). + * An empty filter matches all log entries. + * @param {number} options.maxApiCalls - Maximum number of API calls to make. + * @param {number} options.maxResults - Maximum number of results to return. + * @param {string} options.orderBy - How the results should be sorted, + * `timestamp` (oldest first) and `timestamp desc` (newest first, + * **default**). + * @param {number} options.pageSize - Maximum number of logs to return. + * @param {string} options.pageToken - A previously-returned page token + * representing part of the larger set of results to view. + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request. + * @param {module:logging/entry[]} callback.entries - Entries from your logs. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * logging.getEntries(function(err, entries) { + * // `entries` is an array of Cloud Logging entry objects. + * // See the `data` property to read the data from the entry. + * }); + * + * //- + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. + * //- + * function callback(err, entries, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * logging.getEntries(nextQuery, callback); + * } + * } + * + * logging.getEntries({ + * autoPaginate: false + * }, callback); + * + * //- + * // Get the entries from your project as a readable object stream. + * //- + * logging.getEntries() + * .on('error', console.error) + * .on('data', function(entry) { + * // `entry` is a Cloud Logging entry object. + * // See the `data` property to read the data from the entry. + * }) + * .on('end', function() { + * // All entries retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * logging.getEntries() + * .on('data', function(entry) { + * this.end(); + * }); + */ +Logging.prototype.getEntries = function(options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + var protoOpts = { + service: 'LoggingServiceV2', + method: 'listLogEntries' + }; + + var reqOpts = extend({ + orderBy: 'timestamp desc' + }, options); + reqOpts.projectIds = arrify(reqOpts.projectIds); + reqOpts.projectIds.push(this.projectId); + + this.request(protoOpts, reqOpts, function(err, resp) { + if (err) { + callback(err, null, null, resp); + return; + } + + var nextQuery = null; + + if (resp.nextPageToken) { + nextQuery = extend({}, reqOpts, { + pageToken: resp.nextPageToken + }); + } + + var entries = arrify(resp.entries).map(Entry.fromApiResponse_); + + callback(null, entries, nextQuery, resp); + }); +}; + +/** + * Get the sinks associated with this project. + * + * @resource [projects.sinks.list API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/list} + * + * @param {object=} options - Configuration object. + * @param {boolean} options.autoPaginate - Have pagination handled + * automatically. Default: true. + * @param {number} options.maxApiCalls - Maximum number of API calls to make. + * @param {number} options.maxResults - Maximum number of results to return. + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request. + * @param {module:logging/sink[]} callback.sinks - Sink objects. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * logging.getSinks(function(err, sinks) { + * // sinks is an array of Sink objects. + * }); + * + * //- + * // Get the sinks from your project as a readable object stream. + * //- + * logging.getSinks() + * .on('error', console.error) + * .on('data', function(sink) { + * // `sink` is a Sink object. + * }) + * .on('end', function() { + * // All sinks retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * logging.getSinks() + * .on('data', function(sink) { + * this.end(); + * }); + */ +Logging.prototype.getSinks = function(options, callback) { + var self = this; + + if (is.fn(options)) { + callback = options; + options = {}; + } + + var protoOpts = { + service: 'ConfigServiceV2', + method: 'listSinks' + }; + + var reqOpts = extend({}, options, { + parent: 'projects/' + this.projectId + }); + + this.request(protoOpts, reqOpts, function(err, resp) { + if (err) { + callback(err, null, null, resp); + return; + } + + var nextQuery = null; + + if (resp.nextPageToken) { + nextQuery = extend({}, options, { + pageToken: resp.nextPageToken + }); + } + + var sinks = arrify(resp.sinks).map(function(sink) { + var sinkInstance = self.sink(sink.name); + sinkInstance.metadata = sink; + return sinkInstance; + }); + + callback(null, sinks, nextQuery, resp); + }); +}; + +/** + * Get a reference to a Cloud Logging log. + * + * @resource [Log Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs} + * + * @param {string} name - Name of the existing log. + * @return {module:logging/log} + * + * @example + * var log = logging.log('my-log'); + */ +Logging.prototype.log = function(name) { + return new Log(this, name); +}; + +/** + * Get a reference to a Cloud Logging sink. + * + * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks} + * + * @param {string} name - Name of the existing sink. + * @return {module:logging/sink} + * + * @example + * var sink = logging.sink('my-sink'); + */ +Logging.prototype.sink = function(name) { + return new Sink(this, name); +}; + +/** + * This method is called when creating a sink with a Bucket destination. The + * bucket must first grant proper ACL access to the Cloud Logging account. + * + * The parameters are the same as what {module:logging#createSink} accepts. + * + * @private + */ +Logging.prototype.setAclForBucket_ = function(name, config, callback) { + var self = this; + var bucket = config.destination; + + bucket.acl.owners.addGroup('cloud-logs@google.com', function(err, apiResp) { + if (err) { + callback(err, null, apiResp); + return; + } + + config.destination = 'storage.googleapis.com/' + bucket.name; + + self.createSink(name, config, callback); + }); +}; + +/** + * This method is called when creating a sink with a Dataset destination. The + * dataset must first grant proper ACL access to the Cloud Logging account. + * + * The parameters are the same as what {module:logging#createSink} accepts. + * + * @private + */ +Logging.prototype.setAclForDataset_ = function(name, config, callback) { + var self = this; + var dataset = config.destination; + + dataset.getMetadata(function(err, metadata, apiResp) { + if (err) { + callback(err, null, apiResp); + return; + } + + var access = [].slice.call(arrify(metadata.access)); + + access.push({ + role: 'WRITER', + groupByEmail: 'cloud-logs@google.com' + }); + + dataset.setMetadata({ + access: access + }, function(err, apiResp) { + if (err) { + callback(err, null, apiResp); + return; + } + + config.destination = format('{baseUrl}/projects/{pId}/datasets/{dId}', { + baseUrl: 'bigquery.googleapis.com', + pId: dataset.parent.projectId, + dId: dataset.id + }); + + self.createSink(name, config, callback); + }); + }); +}; + +/** + * This method is called when creating a sink with a Topic destination. The + * topic must first grant proper ACL access to the Cloud Logging account. + * + * The parameters are the same as what {module:logging#createSink} accepts. + * + * @private + */ +Logging.prototype.setAclForTopic_ = function(name, config, callback) { + var self = this; + var topic = config.destination; + + topic.iam.getPolicy(function(err, policy, apiResp) { + if (err) { + callback(err, null, apiResp); + return; + } + + policy.bindings = arrify(policy.bindings); + + policy.bindings.push({ + role: 'roles/pubsub.publisher', + members: [ + 'serviceAccount:cloud-logs@system.gserviceaccount.com' + ] + }); + + topic.iam.setPolicy(policy, function(err, policy, apiResp) { + if (err) { + callback(err, null, apiResp); + return; + } + + config.destination = format('{baseUrl}/{topicName}', { + baseUrl: 'pubsub.googleapis.com', + topicName: topic.name + }); + + self.createSink(name, config, callback); + }); + }); +}; + +/*! Developer Documentation + * + * These methods can be used with either a callback or as a readable object + * stream. `streamRouter` is used to add this dual behavior. + */ +streamRouter.extend(Logging, ['getEntries', 'getSinks']); + +Logging.Entry = Entry; +Logging.Log = Log; +Logging.Logging = Logging; +Logging.Sink = Sink; + +module.exports = Logging; diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js new file mode 100644 index 00000000000..510364f6f38 --- /dev/null +++ b/handwritten/logging/src/log.js @@ -0,0 +1,516 @@ +/*! + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * @module logging/log + */ + +'use strict'; + +var arrify = require('arrify'); +var common = require('@google-cloud/common'); +var extend = require('extend'); +var is = require('is'); +var nodeutil = require('util'); + +/** + * @type {module:logging/entry} + * @private + */ +var Entry = require('./entry.js'); + +/** + * @type {module:common/grpc-service-object} + * @private + */ +var GrpcServiceObject = common.GrpcServiceObject; + +/** + * A log is a named collection of entries, each entry representing a timestamped + * event. Logs can be produced by Google Cloud Platform services, by third-party + * services, or by your applications. For example, the log `apache-access` is + * produced by the Apache Web Server, but the log + * `compute.googleapis.com/activity_log` is produced by Google Compute Engine. + * + * @resource [Introduction to Logs]{@link https://cloud.google.com/logging/docs/api/#logs} + * + * @alias module:logging/log + * @constructor + * + * @param {object} options - [Configuration object](#/docs). + * + * @example + * var gcloud = require('google-cloud')({ + * keyFilename: '/path/to/keyfile.json', + * projectId: 'grape-spaceship-123' + * }); + * + * var logging = gcloud.logging(); + * var log = logging.log('syslog'); + */ +function Log(logging, name) { + this.formattedName_ = Log.formatName_(logging.projectId, name); + this.name = this.formattedName_.split('/').pop(); + + var methods = { + /** + * Delete the log. + * + * @resource [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs/delete} + * + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this + * request. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * log.delete(function(err, apiResponse) { + * if (!err) { + * // The log was deleted. + * } + * }); + */ + delete: { + protoOpts: { + service: 'LoggingServiceV2', + method: 'deleteLog' + }, + reqOpts: { + logName: this.formattedName_ + } + } + }; + + GrpcServiceObject.call(this, { + parent: logging, + id: this.name, + methods: methods + }); +} + +nodeutil.inherits(Log, GrpcServiceObject); + +/** + * Return an array of log entries with the desired severity assigned. + * + * @private + * + * @param {object|object[]} entries - Log entries. + * @param {string} severity - The desired severity level. + */ +Log.assignSeverityToEntries_ = function(entries, severity) { + return arrify(entries).map(function(entry) { + return extend(new Entry(), entry, { + severity: severity + }); + }); +}; + +/** + * Format the name of a log. A log's full name is in the format of + * 'projects/{projectId}/logs/{logName}'. + * + * @private + * + * @return {string} + */ +Log.formatName_ = function(projectId, name) { + var path = 'projects/' + projectId + '/logs/'; + name = name.replace(path, ''); + + if (decodeURIComponent(name) === name) { + // The name has not been encoded yet. + name = encodeURIComponent(name); + } + + return path + name; +}; + +/** + * Write a log entry with a severity of "ALERT". + * + * This is a simple wrapper around {module:logging/log#write}. All arguments are + * the same as documented there. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.alert(entry, function(err, apiResponse) {}); + */ +Log.prototype.alert = function(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'ALERT'), options, callback); +}; + +/** + * Write a log entry with a severity of "CRITICAL". + * + * This is a simple wrapper around {module:logging/log#write}. All arguments are + * the same as documented there. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.critical(entry, function(err, apiResponse) {}); + */ +Log.prototype.critical = function(entry, options, callback) { + var entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); + this.write(entries, options, callback); +}; + +/** + * Write a log entry with a severity of "DEBUG". + * + * This is a simple wrapper around {module:logging/log#write}. All arguments are + * the same as documented there. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.debug(entry, function(err, apiResponse) {}); + */ +Log.prototype.debug = function(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback); +}; + +/** + * Write a log entry with a severity of "EMERGENCY". + * + * This is a simple wrapper around {module:logging/log#write}. All arguments are + * the same as documented there. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.emergency(entry, function(err, apiResponse) {}); + */ +Log.prototype.emergency = function(entry, options, callback) { + var entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); + this.write(entries, options, callback); +}; + +/** + * Create an entry object for this log. + * + * Note that using this method will not itself make any API requests. You will + * use the object returned in other API calls, such as + * {module:logging/log#write}. + * + * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry} + * + * @param {object=|string=} resource - See a + * [Monitored Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource). + * @param {object|string} data - The data to use as the value for this log + * entry. + * @return {module:logging/entry} + * + * @example + * var resource = { + * type: 'gce_instance', + * labels: { + * zone: 'global', + * instance_id: '3' + * } + * }; + * + * var entry = log.entry(resource, { + * delegate: 'my_username' + * }); + * + * entry.toJSON(); + * // { + * // logName: 'projects/grape-spaceship-123/logs/syslog', + * // resource: { + * // type: 'gce_instance', + * // labels: { + * // zone: 'global', + * // instance_id: '3' + * // } + * // }, + * // jsonPayload: { + * // delegate: 'my_username' + * // } + * // } + */ +Log.prototype.entry = function(resource, data) { + var entryInstance = this.parent.entry(resource, data); + entryInstance.logName = this.formattedName_; + return entryInstance; +}; + +/** + * Write a log entry with a severity of "ERROR". + * + * This is a simple wrapper around {module:logging/log#write}. All arguments are + * the same as documented there. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.error(entry, function(err, apiResponse) {}); + */ +Log.prototype.error = function(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'ERROR'), options, callback); +}; + +/** + * This method is a wrapper around {module:logging#getEntries}, but with a + * filter specified to only return entries from this log. + * + * @resource [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries/list} + * + * @param {object=} options - Filtering options. + * @param {boolean} options.autoPaginate - Have pagination handled + * automatically. Default: true. + * @param {string} options.filter - An + * [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). + * An empty filter matches all log entries. + * @param {number} options.maxApiCalls - Maximum number of API calls to make. + * @param {number} options.maxResults - Maximum number of results to return. + * @param {string} options.orderBy - How the results should be sorted, + * `timestamp` (oldest first) and `timestamp desc` (newest first, + * **default**). + * @param {number} options.pageSize - Maximum number of logs to return. + * @param {string} options.pageToken - A previously-returned page token + * representing part of the larger set of results to view. + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request. + * @param {module:logging/entry[]} callback.entries - Entries from this log. + * @param {?object} callback.nextQuery - If present, query with this object to + * check for more results. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * log.getEntries(function(err, entries) { + * // `entries` is an array of Cloud Logging entry objects. + * // See the `data` property to read the data from the entry. + * }); + * + * //- + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. + * //- + * function callback(err, entries, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * log.getEntries(nextQuery, callback); + * } + * } + * + * log.getEntries({ + * autoPaginate: false + * }, callback); + * + * //- + * // Get the entries from your project as a readable object stream. + * //- + * log.getEntries() + * .on('error', console.error) + * .on('data', function(entry) { + * // `entry` is a Cloud Logging entry object. + * // See the `data` property to read the data from the entry. + * }) + * .on('end', function() { + * // All entries retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * log.getEntries() + * .on('data', function(entry) { + * this.end(); + * }); + */ +Log.prototype.getEntries = function(options, callback) { + if (is.function(options)) { + callback = options; + options = {}; + } + + options = extend({ + filter: 'logName="' + this.formattedName_ + '"' + }, options); + + return this.parent.getEntries(options, callback); +}; + +/** + * Write a log entry with a severity of "INFO". + * + * This is a simple wrapper around {module:logging/log#write}. All arguments are + * the same as documented there. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.info(entry, function(err, apiResponse) {}); + */ +Log.prototype.info = function(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'INFO'), options, callback); +}; + +/** + * Write a log entry with a severity of "NOTICE". + * + * This is a simple wrapper around {module:logging/log#write}. All arguments are + * the same as documented there. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.notice(entry, function(err, apiResponse) {}); + */ +Log.prototype.notice = function(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback); +}; + +/** + * Write a log entry with a severity of "WARNING". + * + * This is a simple wrapper around {module:logging/log#write}. All arguments are + * the same as documented there. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.warning(entry, function(err, apiResponse) {}); + */ +Log.prototype.warning = function(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback); +}; + +/** + * Write log entries to Cloud Logging. + * + * While you may write a single entry at a time, batching multiple entries + * together is preferred to avoid reaching the queries per second limit. + * + * @resource [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries/write} + * + * @param {module:logging/entry|module:logging/entry[]} entry - A log entry, or + * array of entries, to write. + * @param {object=} options - Configuration object. + * @param {object[]} options.labels - Labels to set on the log. + * @param {object} options.resource - A default monitored resource for entries + * where one isn't specified. + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error returned while making this request. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * var entry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.write(entry, function(err, apiResponse) { + * if (!err) { + * // The log entry was written. + * } + * }); + * + * //- + * // You may also pass multiple log entries to write. + * //- + * var secondEntry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.write([ + * entry, + * secondEntry + * ], function(err, apiResponse) { + * if (!err) { + * // The log entries were written. + * } + * }); + * + * //- + * // To save some steps, you can also pass in plain values as your entries. + * // Note, however, that you must provide a configuration object to specify the + * // resource. + * //- + * var entries = [ + * { + * user: 'my_username' + * }, + * { + * home: process.env.HOME + * } + * ]; + * + * var options = { + * resource: 'compute.googleapis.com' + * }; + * + * log.write(entries, options, function(err, apiResponse) {}); + */ +Log.prototype.write = function(entry, options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + var protoOpts = { + service: 'LoggingServiceV2', + method: 'writeLogEntries' + }; + + var reqOpts = extend({ + logName: this.formattedName_, + entries: arrify(entry).map(this.formatEntryForApi_.bind(this)) + }, options); + + this.request(protoOpts, reqOpts, function(err, resp) { + callback(err, resp); + }); +}; + +/** + * All entries are passed through here to make sure this log is attached to the + * entry. + * + * @private + * + * @param {object} entry - An entry object. + */ +Log.prototype.formatEntryForApi_ = function(entry) { + if (!(entry instanceof Entry)) { + entry = this.entry(entry); + } + + var formattedEntry = entry.toJSON(); + formattedEntry.logName = this.formattedName_; + return formattedEntry; +}; + +module.exports = Log; diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js new file mode 100644 index 00000000000..7a17c027445 --- /dev/null +++ b/handwritten/logging/src/sink.js @@ -0,0 +1,229 @@ +/*! + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * @module logging/sink + */ + +'use strict'; + +var common = require('@google-cloud/common'); +var extend = require('extend'); +var nodeutil = require('util'); + +/** + * @type {module:common/grpc-service-object} + * @private + */ +var GrpcServiceObject = common.GrpcServiceObject; + +/** + * @type {module:common/util} + * @private + */ +var util = common.util; + +/*! Developer Documentation + * + * @param {module:logging} logging - The Logging instance. + */ +/** + * A sink is an object that lets you to specify a set of log entries to export + * to a particular destination. Cloud Logging lets you export log entries to + * destinations including Google Cloud Storage buckets (for long term log + * storage), Google BigQuery datasets (for log analysis), Google Pub/Sub (for + * streaming to other applications). + * + * @resource [Introduction to Sinks]{@link https://cloud.google.com/logging/docs/api/#sinks} + * + * @alias module:logging/sink + * @constructor + * + * @param {object} options - [Configuration object](#/docs). + * + * @example + * var gcloud = require('google-cloud')({ + * keyFilename: '/path/to/keyfile.json', + * projectId: 'grape-spaceship-123' + * }); + * + * var logging = gcloud.logging(); + * var sink = logging.sink('my-sink'); + */ +function Sink(logging, name) { + this.name = name; + this.formattedName_ = 'projects/' + logging.projectId + '/sinks/' + name; + + var methods = { + /** + * Create a sink. + * + * @param {object} config - See {module:logging#createSink}. + * + * @example + * var config = { + * // ... + * }; + * + * sink.create(config, function(err, sink, apiResponse) { + * if (!err) { + * // The sink was created successfully. + * } + * }); + */ + create: true, + + /** + * Delete the sink. + * + * @resource [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/delete} + * + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this + * request. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * sink.delete(function(err, apiResponse) { + * if (!err) { + * // The log was deleted. + * } + * }); + */ + delete: { + protoOpts: { + service: 'ConfigServiceV2', + method: 'deleteSink' + }, + reqOpts: { + sinkName: this.formattedName_ + } + }, + + /** + * Get the sink's metadata. + * + * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks#LogSink} + * @resource [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/get} + * + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this + * request. + * @param {object} callback.metadata - The sink's metadata. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * sink.getMetadata(function(err, metadata, apiResponse) {}); + */ + getMetadata: { + protoOpts: { + service: 'ConfigServiceV2', + method: 'getSink' + }, + reqOpts: { + sinkName: this.formattedName_ + } + } + }; + + GrpcServiceObject.call(this, { + parent: logging, + baseUrl: '/sinks', + id: name, + createMethod: logging.createSink.bind(logging), + methods: methods + }); +} + +nodeutil.inherits(Sink, GrpcServiceObject); + +/** + * Set the sink's filter. + * + * This will override any filter that was previously set. + * + * @resource [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} + * + * @param {string} filter - The new filter. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this + * request. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * sink.setFilter('metadata.severity = ALERT', function(err, apiResponse) {}); + */ +Sink.prototype.setFilter = function(filter, callback) { + this.setMetadata({ + filter: filter + }, callback); +}; + +/** + * Set the sink's metadata. + * + * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks#LogSink} + * @resource [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/update} + * + * @param {object} metadata - See a + * [Sink resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks#LogSink). + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this + * request. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * var metadata = { + * filter: 'metadata.severity = ALERT' + * }; + * + * sink.setMetadata(metadata, function(err, apiResponse) {}); + */ +Sink.prototype.setMetadata = function(metadata, callback) { + var self = this; + + callback = callback || util.noop; + + this.getMetadata(function(err, currentMetadata, apiResponse) { + if (err) { + callback(err, apiResponse); + return; + } + + var protoOpts = { + service: 'ConfigServiceV2', + method: 'updateSink' + }; + + var reqOpts = { + sinkName: self.formattedName_, + sink: extend({}, currentMetadata, metadata) + }; + + self.request(protoOpts, reqOpts, function(err, apiResponse) { + if (err) { + callback(err, apiResponse); + return; + } + + self.metadata = apiResponse; + + callback(null, apiResponse); + }); + }); +}; + +module.exports = Sink; diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js new file mode 100644 index 00000000000..6ce8fbc518f --- /dev/null +++ b/handwritten/logging/system-test/logging.js @@ -0,0 +1,414 @@ +/*! + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var assert = require('assert'); +var async = require('async'); +var exec = require('methmeth'); +var format = require('string-format-obj'); +var is = require('is'); +var prop = require('propprop'); +var uuid = require('node-uuid'); + +var env = require('../../../system-test/env.js'); +var BigQuery = require('@google-cloud/bigquery'); +var Logging = require('../'); +var PubSub = require('@google-cloud/pubsub'); +var Storage = require('@google-cloud/storage'); + +describe('Logging', function() { + var TESTS_PREFIX = 'gcloud-logging-test'; + var WRITE_CONSISTENCY_DELAY_MS = 60000; + + var logging = new Logging(env); + var bigQuery = new BigQuery(env); + var pubsub = new PubSub(env); + var storage = new Storage(env); + + // Create the possible destinations for sinks that we will create. + var bucket = storage.bucket(generateName()); + var dataset = bigQuery.dataset(generateName().replace(/-/g, '_')); + var topic = pubsub.topic(generateName()); + + before(function(done) { + async.parallel([ + bucket.create.bind(bucket), + dataset.create.bind(dataset), + topic.create.bind(topic) + ], done); + }); + + after(function(done) { + async.parallel([ + deleteBuckets, + deleteDatasets, + deleteTopics, + deleteSinks + ], done); + + function deleteBuckets(callback) { + storage.getBuckets({ + prefix: TESTS_PREFIX + }, function(err, buckets) { + if (err) { + done(err); + return; + } + + function deleteBucket(bucket, callback) { + bucket.deleteFiles(function(err) { + if (err) { + callback(err); + return; + } + + bucket.delete(callback); + }); + } + + async.each(buckets, deleteBucket, callback); + }); + } + + function deleteDatasets(callback) { + getAndDelete(bigQuery.getDatasets.bind(bigQuery), callback); + } + + function deleteTopics(callback) { + getAndDelete(pubsub.getTopics.bind(pubsub), callback); + } + + function deleteSinks(callback) { + getAndDelete(logging.getSinks.bind(logging), callback); + } + + function getAndDelete(method, callback) { + method(function(err, objects) { + if (err) { + callback(err); + return; + } + + objects = objects.filter(function(object) { + return object.id.indexOf(TESTS_PREFIX) === 0; + }); + + async.each(objects, exec('delete'), callback); + }); + } + }); + + describe('sinks', function() { + it('should create a sink with a Bucket destination', function(done) { + var sink = logging.sink(generateName()); + + sink.create({ + destination: bucket + }, function(err, sink, apiResponse) { + assert.ifError(err); + + var destination = 'storage.googleapis.com/' + bucket.name; + assert.strictEqual(apiResponse.destination, destination); + + done(); + }); + }); + + it('should create a sink with a Dataset destination', function(done) { + var sink = logging.sink(generateName()); + + sink.create({ + destination: dataset + }, function(err, sink, apiResponse) { + assert.ifError(err); + + var destination = format('{baseUrl}/projects/{pId}/datasets/{dId}', { + baseUrl: 'bigquery.googleapis.com', + pId: dataset.parent.projectId, + dId: dataset.id + }); + + assert.strictEqual(apiResponse.destination, destination); + + done(); + }); + }); + + it('should create a sink with a Topic destination', function(done) { + var sink = logging.sink(generateName()); + + sink.create({ + destination: topic + }, function(err, sink, apiResponse) { + assert.ifError(err); + + var destination = 'pubsub.googleapis.com/' + topic.name; + assert.strictEqual(apiResponse.destination, destination); + + done(); + }); + }); + + describe('metadata', function() { + var sink = logging.sink(generateName()); + var FILTER = 'severity = ALERT'; + + before(function(done) { + sink.create({ + destination: topic + }, done); + }); + + it('should set metadata', function(done) { + var metadata = { + filter: FILTER + }; + + sink.setMetadata(metadata, function(err, apiResponse) { + assert.ifError(err); + assert.strictEqual(apiResponse.filter, FILTER); + done(); + }); + }); + + it('should set a filter', function(done) { + sink.setFilter(FILTER, function(err, apiResponse) { + assert.ifError(err); + assert.strictEqual(apiResponse.filter, FILTER); + done(); + }); + }); + }); + + describe('listing sinks', function() { + var sink = logging.sink(generateName()); + + before(function(done) { + sink.create({ + destination: topic + }, done); + }); + + it('should list sinks', function(done) { + logging.getSinks(function(err, sinks) { + assert.ifError(err); + assert(sinks.length > 0); + done(); + }); + }); + + it('should list sinks as a stream', function(done) { + logging.getSinks({ pageSize: 1 }) + .on('error', done) + .once('data', function() { + this.end(); + done(); + }); + }); + + it('should get metadata', function(done) { + logging.getSinks({ pageSize: 1 }) + .on('error', done) + .once('data', function(sink) { + sink.getMetadata(function(err, metadata) { + assert.ifError(err); + assert.strictEqual(is.object(metadata), true); + done(); + }); + }); + }); + }); + }); + + describe('logs', function() { + var log = logging.log('syslog'); + + var logEntries = [ + // string data + log.entry('log entry 1'), + + // object data + log.entry({ delegate: 'my_username' }), + + // various data types + log.entry({ + nonValue: null, + boolValue: true, + arrayValue: [ 1, 2, 3 ] + }), + + // nested object data + log.entry({ + nested: { + delegate: 'my_username' + } + }) + ]; + + var options = { + resource: { + type: 'gce_instance', + labels: { + zone: 'global', + instance_id: '3' + } + } + }; + + it('should list log entries', function(done) { + logging.getEntries({ pageSize: 1 }, function(err, entries) { + assert.ifError(err); + assert.strictEqual(entries.length, 1); + done(); + }); + }); + + it('should list log entries as a stream', function(done) { + logging.getEntries({ pageSize: 1 }) + .on('error', done) + .once('data', function() { + this.end(); + done(); + }); + }); + + describe('log-specific entries', function() { + before(function(done) { + log.write(logEntries, options, done); + }); + + it('should list log entries', function(done) { + log.getEntries({ pageSize: 1 }, function(err, entries) { + assert.ifError(err); + assert.strictEqual(entries.length, 1); + done(); + }); + }); + + it('should list log entries as a stream', function(done) { + log.getEntries({ pageSize: 1 }) + .on('error', done) + .once('data', function() { + this.end(); + done(); + }); + }); + }); + + it('should write a single entry to a log', function(done) { + log.write(logEntries[0], options, done); + }); + + it('should write multiple entries to a log', function(done) { + log.write(logEntries, options, function(err) { + assert.ifError(err); + + setTimeout(function() { + log.getEntries({ + pageSize: logEntries.length + }, function(err, entries) { + assert.ifError(err); + + assert.deepEqual(entries.map(prop('data')).reverse(), [ + 'log entry 1', + { + delegate: 'my_username' + }, + { + nonValue: null, + boolValue: true, + arrayValue: [ 1, 2, 3 ] + }, + { + nested: { + delegate: 'my_username' + } + } + ]); + + done(); + }); + }, WRITE_CONSISTENCY_DELAY_MS); + }); + }); + + it('should write an entry with primitive values', function(done) { + var logEntry = log.entry({ + when: new Date(), + matchUser: /username: (.+)/, + matchUserError: new Error('No user found.'), + shouldNotBeSaved: undefined + }); + + log.write(logEntry, options, function(err) { + assert.ifError(err); + + setTimeout(function() { + log.getEntries({ pageSize: 1 }, function(err, entries) { + assert.ifError(err); + + var entry = entries[0]; + + assert.deepEqual(entry.data, { + when: logEntry.data.when.toString(), + matchUser: logEntry.data.matchUser.toString(), + matchUserError: logEntry.data.matchUserError.toString() + }); + + done(); + }); + }, WRITE_CONSISTENCY_DELAY_MS); + }); + }); + + it('should write to a log with alert helper', function(done) { + log.alert(logEntries, options, done); + }); + + it('should write to a log with critical helper', function(done) { + log.critical(logEntries, options, done); + }); + + it('should write to a log with debug helper', function(done) { + log.debug(logEntries, options, done); + }); + + it('should write to a log with emergency helper', function(done) { + log.emergency(logEntries, options, done); + }); + + it('should write to a log with error helper', function(done) { + log.error(logEntries, options, done); + }); + + it('should write to a log with info helper', function(done) { + log.info(logEntries, options, done); + }); + + it('should write to a log with notice helper', function(done) { + log.notice(logEntries, options, done); + }); + + it('should write to a log with warning helper', function(done) { + log.warning(logEntries, options, done); + }); + }); + + function generateName() { + return TESTS_PREFIX + uuid.v1(); + } +}); diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js new file mode 100644 index 00000000000..89b415b7205 --- /dev/null +++ b/handwritten/logging/test/entry.js @@ -0,0 +1,211 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var assert = require('assert'); +var extend = require('extend'); +var proxyquire = require('proxyquire'); + +var GrpcService = require('@google-cloud/common').GrpcService; + +function FakeGrpcService() {} + +describe('Entry', function() { + var Entry; + var entry; + + var RESOURCE = {}; + var DATA = {}; + + before(function() { + Entry = proxyquire('../src/entry.js', { + '@google-cloud/common': { + GrpcService: FakeGrpcService + } + }); + }); + + beforeEach(function() { + extend(FakeGrpcService, GrpcService); + entry = new Entry(RESOURCE, DATA); + }); + + describe('instantiation', function() { + it('should treat resource as data if data is not provided', function() { + var entry = new Entry(DATA); + assert.strictEqual(entry.data, DATA); + assert.strictEqual(entry.resource, undefined); + }); + + it('should localize resource and data', function() { + assert.strictEqual(entry.resource, RESOURCE); + assert.strictEqual(entry.data, DATA); + }); + }); + + describe('fromApiResponse_', function() { + var entry; + var date = new Date(); + + beforeEach(function() { + var seconds = date.getTime() / 1000; + var secondsRounded = Math.floor(seconds); + + FakeGrpcService.structToObj_ = function(data) { + return data; + }; + + entry = Entry.fromApiResponse_({ + resource: RESOURCE, + payload: 'jsonPayload', + jsonPayload: DATA, + extraProperty: true, + timestamp: { + seconds: secondsRounded, + nanos: Math.floor((seconds - secondsRounded) * 1e9) + } + }); + }); + + it('should create an Entry', function() { + assert(entry instanceof Entry); + assert.strictEqual(entry.resource, RESOURCE); + assert.strictEqual(entry.data, DATA); + assert.strictEqual(entry.extraProperty, true); + assert.deepEqual(entry.timestamp, date); + }); + + it('should extend the entry with proto data', function() { + var entry = Entry.fromApiResponse_({ + resource: RESOURCE, + payload: 'protoPayload', + protoPayload: DATA, + extraProperty: true + }); + + assert.strictEqual(entry.data, DATA); + }); + + it('should extend the entry with json data', function() { + assert.strictEqual(entry.data, DATA); + }); + + it('should extend the entry with text data', function() { + var entry = Entry.fromApiResponse_({ + resource: RESOURCE, + payload: 'textPayload', + textPayload: DATA, + extraProperty: true + }); + + assert.strictEqual(entry.data, DATA); + }); + }); + + describe('toJSON', function() { + it('should not modify the original instance', function() { + var entryBefore = extend(true, {}, entry); + entry.toJSON(); + var entryAfter = extend(true, {}, entry); + assert.deepEqual(entryBefore, entryAfter); + }); + + it('should only include correct properties', function() { + var propertiesToInclude = [ + 'logName', + 'resource', + 'timestamp', + 'severity', + 'insertId', + 'httpRequest', + 'labels', + 'operation' + ]; + + var value = 'value'; + + propertiesToInclude.forEach(function(property) { + entry[property] = value; + }); + + entry.extraProperty = true; + + var json = entry.toJSON(); + + assert(propertiesToInclude.every(function(property) { + if (property === 'resource') { + return json[property].type === value; + } + + return json[property] === value; + })); + + // Was removed for JSON representation... + assert.strictEqual(json.extraProperty, undefined); + // ...but still exists on the Entry. + assert.strictEqual(entry.extraProperty, true); + }); + + it('should convert a string resource to an object', function() { + entry.resource = 'resource-name'; + + var json = entry.toJSON(); + + assert.deepEqual(json.resource, { + type: entry.resource + }); + }); + + it('should convert data as a struct and assign to jsonPayload', function() { + var input = {}; + var converted = {}; + + FakeGrpcService.objToStruct_ = function(obj, options) { + assert.strictEqual(obj, input); + assert.deepEqual(options, { + stringify: true + }); + return converted; + }; + + entry.data = input; + var json = entry.toJSON(); + assert.strictEqual(json.jsonPayload, converted); + }); + + it('should assign string data as textPayload', function() { + entry.data = 'string'; + var json = entry.toJSON(); + assert.strictEqual(json.textPayload, entry.data); + }); + + it('should convert a date', function() { + var date = new Date(); + entry.timestamp = date; + + var json = entry.toJSON(); + + var seconds = date.getTime() / 1000; + var secondsRounded = Math.floor(seconds); + + assert.deepEqual(json.timestamp, { + seconds: secondsRounded, + nanos: Math.floor((seconds - secondsRounded) * 1e9) + }); + }); + }); +}); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js new file mode 100644 index 00000000000..ab947d70079 --- /dev/null +++ b/handwritten/logging/test/index.js @@ -0,0 +1,886 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var arrify = require('arrify'); +var assert = require('assert'); +var extend = require('extend'); +var googleProtoFiles = require('google-proto-files'); +var proxyquire = require('proxyquire'); + +var util = require('@google-cloud/common').util; +var PKG = require('../package.json'); + +var extended = false; +var fakeStreamRouter = { + extend: function(Class, methods) { + if (Class.name !== 'Logging') { + return; + } + + extended = true; + methods = arrify(methods); + assert.deepEqual(methods, [ + 'getEntries', + 'getSinks' + ]); + } +}; + +var fakeUtil = extend({}, util, { + makeAuthenticatedRequestFactory: util.noop +}); + +function FakeBucket() { + this.calledWith_ = arguments; +} + +function FakeDataset() { + this.calledWith_ = arguments; +} + +function FakeTopic() { + this.calledWith_ = arguments; +} + +function FakeEntry() { + this.calledWith_ = arguments; +} + +FakeEntry.fromApiResponse_ = function() { + return arguments; +}; + +function FakeLog() { + this.calledWith_ = arguments; +} + +function FakeSink() { + this.calledWith_ = arguments; +} + +function FakeGrpcService() { + this.calledWith_ = arguments; +} + +describe('Logging', function() { + var Logging; + var logging; + + var PROJECT_ID = 'project-id'; + + before(function() { + Logging = proxyquire('../', { + '@google-cloud/common': { + GrpcService: FakeGrpcService, + streamRouter: fakeStreamRouter, + util: fakeUtil + }, + '@google-cloud/bigquery': { + Dataset: FakeDataset + }, + '@google-cloud/pubsub': { + Topic: FakeTopic + }, + '@google-cloud/storage': { + Bucket: FakeBucket + }, + './log.js': FakeLog, + './entry.js': FakeEntry, + './sink.js': FakeSink + }); + }); + + beforeEach(function() { + logging = new Logging({ + projectId: PROJECT_ID + }); + logging.projectId = PROJECT_ID; + + logging.request = util.noop; + }); + + describe('instantiation', function() { + it('should extend the correct methods', function() { + assert(extended); // See `fakeStreamRouter.extend` + }); + + it('should normalize the arguments', function() { + var options = { + projectId: PROJECT_ID, + credentials: 'credentials', + email: 'email', + keyFilename: 'keyFile' + }; + + var normalizeArguments = fakeUtil.normalizeArguments; + var normalizeArgumentsCalled = false; + var fakeContext = {}; + + fakeUtil.normalizeArguments = function(context, options_) { + normalizeArgumentsCalled = true; + assert.strictEqual(context, fakeContext); + assert.strictEqual(options, options_); + return options_; + }; + + Logging.call(fakeContext, options); + assert(normalizeArgumentsCalled); + + fakeUtil.normalizeArguments = normalizeArguments; + }); + + it('should inherit from GrpcService', function() { + assert(logging instanceof FakeGrpcService); + + var calledWith = logging.calledWith_[0]; + + assert.strictEqual(calledWith.baseUrl, 'logging.googleapis.com'); + assert.strictEqual(calledWith.service, 'logging'); + assert.strictEqual(calledWith.apiVersion, 'v2'); + assert.deepEqual(calledWith.protoServices, { + ConfigServiceV2: + googleProtoFiles('logging', 'v2', 'logging_config.proto'), + LoggingServiceV2: googleProtoFiles.logging.v2 + }); + assert.deepEqual(calledWith.scopes, [ + 'https://www.googleapis.com/auth/cloud-platform' + ]); + assert.strictEqual(calledWith.userAgent, PKG.name + '/' + PKG.version); + }); + }); + + describe('createSink', function() { + var SINK_NAME = 'name'; + + it('should throw if a name is not provided', function() { + assert.throws(function() { + logging.createSink(); + }, 'A sink name must be provided.'); + }); + + it('should throw if a config object is not provided', function() { + assert.throws(function() { + logging.createSink(SINK_NAME); + }, 'A sink configuration object must be provided.'); + }); + + it('should set acls for a Bucket destination', function(done) { + var bucket = new FakeBucket(); + + var CONFIG = { + destination: bucket + }; + + logging.setAclForBucket_ = function(name, config, callback) { + assert.strictEqual(name, SINK_NAME); + assert.strictEqual(config, CONFIG); + callback(); // done() + }; + + logging.createSink(SINK_NAME, CONFIG, done); + }); + + it('should set acls for a Dataset destination', function(done) { + var dataset = new FakeDataset(); + + var CONFIG = { + destination: dataset + }; + + logging.setAclForDataset_ = function(name, config, callback) { + assert.strictEqual(name, SINK_NAME); + assert.strictEqual(config, CONFIG); + callback(); // done() + }; + + logging.createSink(SINK_NAME, CONFIG, done); + }); + + it('should set acls for a Topic destination', function(done) { + var topic = new FakeTopic(); + + var CONFIG = { + destination: topic + }; + + logging.setAclForTopic_ = function(name, config, callback) { + assert.strictEqual(name, SINK_NAME); + assert.strictEqual(config, CONFIG); + callback(); // done() + }; + + logging.createSink(SINK_NAME, CONFIG, done); + }); + + describe('API request', function() { + it('should make the correct API request', function(done) { + var config = { + a: 'b', + c: 'd' + }; + + var expectedConfig = extend({}, config, { + name: SINK_NAME + }); + + logging.request = function(protoOpts, reqOpts) { + assert.strictEqual(protoOpts.service, 'ConfigServiceV2'); + assert.strictEqual(protoOpts.method, 'createSink'); + + var expectedParent = 'projects/' + logging.projectId; + assert.strictEqual(reqOpts.parent, expectedParent); + assert.deepEqual(reqOpts.sink, expectedConfig); + + done(); + }; + + logging.createSink(SINK_NAME, config, assert.ifError); + }); + + describe('error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + logging.request = function(protoOpts, reqOpts, callback) { + callback(error, apiResponse); + }; + }); + + it('should exec callback with error & API response', function(done) { + logging.createSink(SINK_NAME, {}, function(err, sink, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(sink, null); + assert.strictEqual(apiResponse_, apiResponse); + + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = { + name: SINK_NAME + }; + + beforeEach(function() { + logging.request = function(protoOpts, reqOpts, callback) { + callback(null, apiResponse); + }; + }); + + it('should exec callback with Sink & API response', function(done) { + var sink = {}; + + logging.sink = function(name_) { + assert.strictEqual(name_, SINK_NAME); + return sink; + }; + + logging.createSink(SINK_NAME, {}, function(err, sink_, apiResponse_) { + assert.ifError(err); + + assert.strictEqual(sink_, sink); + assert.strictEqual(sink_.metadata, apiResponse); + assert.strictEqual(apiResponse_, apiResponse); + + done(); + }); + }); + }); + }); + }); + + describe('entry', function() { + var RESOURCE = {}; + var DATA = {}; + + it('should return an Entry object', function() { + var entry = logging.entry(RESOURCE, DATA); + assert(entry instanceof FakeEntry); + assert.strictEqual(entry.calledWith_[0], RESOURCE); + assert.strictEqual(entry.calledWith_[1], DATA); + }); + }); + + describe('getEntries', function() { + it('should accept only a callback', function(done) { + logging.request = function(protoOpts, reqOpts) { + assert.deepEqual(reqOpts, { + orderBy: 'timestamp desc', + projectIds: [logging.projectId] + }); + done(); + }; + + logging.getEntries(assert.ifError); + }); + + it('should make the correct API request', function(done) { + var options = {}; + + logging.request = function(protoOpts, reqOpts) { + assert.strictEqual(protoOpts.service, 'LoggingServiceV2'); + assert.strictEqual(protoOpts.method, 'listLogEntries'); + + assert.deepEqual(reqOpts, extend(options, { + orderBy: 'timestamp desc', + projectIds: [logging.projectId] + })); + + done(); + }; + + logging.getEntries(options, assert.ifError); + }); + + it('should allow overriding orderBy', function(done) { + var options = { + orderBy: 'timestamp asc' + }; + + logging.request = function(protoOpts, reqOpts) { + assert.deepEqual(reqOpts.orderBy, options.orderBy); + done(); + }; + + logging.getEntries(options, assert.ifError); + }); + + describe('error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + logging.request = function(protoOpts, reqOpts, callback) { + callback(error, apiResponse); + }; + }); + + it('should execute callback with error & API response', function(done) { + logging.getEntries({}, function(err, entries, nextQuery, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(entries, null); + assert.strictEqual(nextQuery, null); + assert.strictEqual(apiResponse_, apiResponse); + + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = { + entries: [ + { + logName: 'syslog' + } + ] + }; + + beforeEach(function() { + logging.request = function(protoOpts, reqOpts, callback) { + callback(null, apiResponse); + }; + }); + + it('should build a nextQuery if necessary', function(done) { + var nextPageToken = 'next-page-token'; + var apiResponseWithNextPageToken = extend({}, apiResponse, { + nextPageToken: nextPageToken + }); + var expectedNextQuery = { + orderBy: 'timestamp desc', + projectIds: [logging.projectId], + pageToken: nextPageToken + }; + + logging.request = function(protoOpts, reqOpts, callback) { + callback(null, apiResponseWithNextPageToken); + }; + + logging.getEntries({}, function(err, entries, nextQuery) { + assert.ifError(err); + + assert.deepEqual(nextQuery, expectedNextQuery); + + done(); + }); + }); + + it('should execute callback with entries & API resp', function(done) { + logging.getEntries({}, function(err, entries, nextQuery, apiResponse_) { + assert.ifError(err); + + var argsPassedToFromApiResponse_ = entries[0]; + assert.strictEqual( + argsPassedToFromApiResponse_[0], + apiResponse.entries[0] + ); + + assert.strictEqual(apiResponse_, apiResponse); + + done(); + }); + }); + }); + }); + + describe('getSinks', function() { + it('should accept only a callback', function(done) { + logging.request = function() { + done(); + }; + + logging.getSinks(assert.ifError); + }); + + it('should make the correct API request', function(done) { + logging.request = function(protoOpts, reqOpts) { + assert.strictEqual(protoOpts.service, 'ConfigServiceV2'); + assert.strictEqual(protoOpts.method, 'listSinks'); + + var expectedParent = 'projects/' + logging.projectId; + assert.strictEqual(reqOpts.parent, expectedParent); + + done(); + }; + + logging.getSinks({}, assert.ifError); + }); + + describe('error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + logging.request = function(protoOpts, reqOpts, callback) { + callback(error, apiResponse); + }; + }); + + it('should execute callback with error & API response', function(done) { + logging.getSinks({}, function(err, sinks, nextQuery, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(sinks, null); + assert.strictEqual(nextQuery, null); + assert.strictEqual(apiResponse_, apiResponse); + + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = { + sinks: [ + { + name: 'sink-name' + } + ] + }; + + beforeEach(function() { + logging.request = function(protoOpts, reqOpts, callback) { + callback(null, apiResponse); + }; + }); + + it('should build a nextQuery if necessary', function(done) { + var nextPageToken = 'next-page-token'; + var apiResponseWithNextPageToken = extend({}, apiResponse, { + nextPageToken: nextPageToken + }); + var expectedNextQuery = { + pageToken: nextPageToken + }; + + logging.request = function(protoOpts, reqOpts, callback) { + callback(null, apiResponseWithNextPageToken); + }; + + logging.getSinks({}, function(err, sinks, nextQuery) { + assert.ifError(err); + + assert.deepEqual(nextQuery, expectedNextQuery); + + done(); + }); + }); + + it('should execute callback with Logs & API resp', function(done) { + var log = {}; + + logging.sink = function(name) { + assert.strictEqual(name, apiResponse.sinks[0].name); + return log; + }; + + logging.getSinks({}, function(err, sinks, nextQuery, apiResponse_) { + assert.ifError(err); + + assert.strictEqual(sinks[0], log); + assert.strictEqual(sinks[0].metadata, apiResponse.sinks[0]); + + assert.strictEqual(apiResponse_, apiResponse); + + done(); + }); + }); + }); + }); + + describe('log', function() { + var NAME = 'log-name'; + + it('should return a Log object', function() { + var log = logging.log(NAME); + assert(log instanceof FakeLog); + assert.strictEqual(log.calledWith_[0], logging); + assert.strictEqual(log.calledWith_[1], NAME); + }); + }); + + describe('sink', function() { + var NAME = 'sink-name'; + + it('should return a Log object', function() { + var sink = logging.sink(NAME); + assert(sink instanceof FakeSink); + assert.strictEqual(sink.calledWith_[0], logging); + assert.strictEqual(sink.calledWith_[1], NAME); + }); + }); + + describe('setAclForBucket_', function() { + var SINK_NAME = 'name'; + var CONFIG; + + var bucket; + + beforeEach(function() { + bucket = new FakeBucket(); + bucket.name = 'bucket-name'; + bucket.acl = { + owners: { + addGroup: util.noop + } + }; + + CONFIG = { + destination: bucket + }; + }); + + it('should add cloud-logs as an owner', function(done) { + bucket.acl.owners.addGroup = function(entity) { + assert.strictEqual(entity, 'cloud-logs@google.com'); + done(); + }; + + logging.setAclForBucket_(SINK_NAME, CONFIG, assert.ifError); + }); + + describe('error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + bucket.acl.owners.addGroup = function(entity, callback) { + callback(error, apiResponse); + }; + }); + + it('should return error and API response to callback', function(done) { + logging.setAclForBucket_(SINK_NAME, CONFIG, function(err, sink, resp) { + assert.strictEqual(err, error); + assert.strictEqual(sink, null); + assert.strictEqual(resp, apiResponse); + + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = {}; + + beforeEach(function() { + bucket.acl.owners.addGroup = function(entity, callback) { + callback(null, apiResponse); + }; + }); + + it('should call createSink with string destination', function(done) { + bucket.acl.owners.addGroup = function(entity, callback) { + logging.createSink = function(name, config, callback) { + assert.strictEqual(name, SINK_NAME); + + assert.strictEqual(config, CONFIG); + + var expectedDestination = 'storage.googleapis.com/' + bucket.name; + assert.strictEqual(config.destination, expectedDestination); + + callback(); // done() + }; + + callback(null, apiResponse); + }; + + logging.setAclForBucket_(SINK_NAME, CONFIG, done); + }); + }); + }); + + describe('setAclForDataset_', function() { + var SINK_NAME = 'name'; + var CONFIG; + var dataset; + + beforeEach(function() { + dataset = new FakeDataset(); + dataset.id = 'dataset-id'; + dataset.parent = { + projectId: PROJECT_ID + }; + + CONFIG = { + destination: dataset + }; + }); + + describe('metadata refresh', function() { + describe('error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + dataset.getMetadata = function(callback) { + callback(error, null, apiResponse); + }; + }); + + it('should execute the callback with error & API resp', function(done) { + logging.setAclForDataset_(SINK_NAME, CONFIG, function(err, _, resp) { + assert.strictEqual(err, error); + assert.strictEqual(_, null); + assert.strictEqual(resp, apiResponse); + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = { + access: [{}, {}] + }; + + var originalAccess = [].slice.call(apiResponse.access); + + beforeEach(function() { + dataset.getMetadata = function(callback) { + callback(null, apiResponse, apiResponse); + }; + }); + + it('should set the correct metadata', function(done) { + var access = { + role: 'WRITER', + groupByEmail: 'cloud-logs@google.com' + }; + + var expectedAccess = [].slice.call(originalAccess).concat(access); + + dataset.setMetadata = function(metadata) { + assert.deepEqual(apiResponse.access, originalAccess); + assert.deepEqual(metadata.access, expectedAccess); + done(); + }; + + logging.setAclForDataset_(SINK_NAME, CONFIG, assert.ifError); + }); + + describe('updating metadata error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + dataset.setMetadata = function(metadata, callback) { + callback(error, apiResponse); + }; + }); + + it('should exec callback with error & API response', function(done) { + logging.setAclForDataset_(SINK_NAME, CONFIG, function(err, _, res) { + assert.strictEqual(err, error); + assert.strictEqual(_, null); + assert.strictEqual(res, apiResponse); + done(); + }); + }); + }); + + describe('updating metadata success', function() { + var apiResponse = {}; + + beforeEach(function() { + dataset.setMetadata = function(metadata, callback) { + callback(null, apiResponse); + }; + }); + + it('should call createSink with string destination', function(done) { + logging.createSink = function(name, config, callback) { + var expectedDestination = [ + 'bigquery.googleapis.com', + 'projects', + dataset.parent.projectId, + 'datasets', + dataset.id + ].join('/'); + + assert.strictEqual(name, SINK_NAME); + assert.strictEqual(config, CONFIG); + assert.strictEqual(config.destination, expectedDestination); + callback(); // done() + }; + + logging.setAclForDataset_(SINK_NAME, CONFIG, done); + }); + }); + }); + }); + }); + + describe('setAclForTopic_', function() { + var SINK_NAME = 'name'; + var CONFIG; + var topic; + + beforeEach(function() { + topic = new FakeTopic(); + topic.name = 'topic-name'; + topic.iam = { + getPolicy: util.noop, + setPolicy: util.noop + }; + + CONFIG = { + destination: topic + }; + }); + + describe('get policy', function() { + describe('error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + topic.iam.getPolicy = function(callback) { + callback(error, null, apiResponse); + }; + }); + + it('should execute the callback with error & API resp', function(done) { + logging.setAclForTopic_(SINK_NAME, CONFIG, function(err, _, resp) { + assert.strictEqual(err, error); + assert.strictEqual(_, null); + assert.strictEqual(resp, apiResponse); + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = { + bindings: [{}, {}] + }; + + var originalBindings = [].slice.call(apiResponse.bindings); + + beforeEach(function() { + topic.iam.getPolicy = function(callback) { + callback(null, apiResponse, apiResponse); + }; + }); + + it('should set the correct policy bindings', function(done) { + var binding = { + role: 'roles/pubsub.publisher', + members: [ + 'serviceAccount:cloud-logs@system.gserviceaccount.com' + ] + }; + + var expectedBindings = [].slice.call(originalBindings); + expectedBindings.push(binding); + + topic.iam.setPolicy = function(policy) { + assert.strictEqual(policy, apiResponse); + assert.deepEqual(policy.bindings, expectedBindings); + done(); + }; + + logging.setAclForTopic_(SINK_NAME, CONFIG, assert.ifError); + }); + + describe('updating policy error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + topic.iam.setPolicy = function(policy, callback) { + callback(error, null, apiResponse); + }; + }); + + it('should exec callback with error & API response', function(done) { + logging.setAclForTopic_(SINK_NAME, CONFIG, function(err, _, res) { + assert.strictEqual(err, error); + assert.strictEqual(_, null); + assert.strictEqual(res, apiResponse); + done(); + }); + }); + }); + + describe('updating policy success', function() { + var apiResponse = {}; + + beforeEach(function() { + topic.iam.setPolicy = function(policy, callback) { + callback(null, apiResponse); + }; + }); + + it('should call createSink with string destination', function(done) { + logging.createSink = function(name, config, callback) { + var expectedDestination = 'pubsub.googleapis.com/' + topic.name; + assert.strictEqual(name, SINK_NAME); + assert.strictEqual(config, CONFIG); + assert.strictEqual(config.destination, expectedDestination); + callback(); // done() + }; + + logging.setAclForTopic_(SINK_NAME, CONFIG, done); + }); + }); + }); + }); + }); +}); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js new file mode 100644 index 00000000000..d31296d2c22 --- /dev/null +++ b/handwritten/logging/test/log.js @@ -0,0 +1,571 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var assert = require('assert'); +var extend = require('extend'); +var proxyquire = require('proxyquire'); + +var Entry = require('../src/entry.js'); +var GrpcServiceObject = require('@google-cloud/common').GrpcServiceObject; +var util = require('@google-cloud/common').util; + +function FakeGrpcServiceObject() { + this.calledWith_ = arguments; + this.parent = {}; +} + +describe('Log', function() { + var Log; + var log; + + var PROJECT_ID = 'project-id'; + var LOG_NAME = 'escaping/required/for/this/log-name'; + var LOG_NAME_ENCODED = encodeURIComponent(LOG_NAME); + var LOG_NAME_FORMATTED = [ + 'projects', + PROJECT_ID, + 'logs', + LOG_NAME_ENCODED + ].join('/'); + + var LOGGING = { + projectId: PROJECT_ID, + entry: util.noop, + request: util.noop + }; + + var assignSeverityToEntriesOverride = null; + + before(function() { + Log = proxyquire('../src/log.js', { + './entry.js': Entry, + '@google-cloud/common': { + GrpcServiceObject: FakeGrpcServiceObject + } + }); + var assignSeverityToEntries_ = Log.assignSeverityToEntries_; + Log.assignSeverityToEntries_ = function() { + return (assignSeverityToEntriesOverride || assignSeverityToEntries_) + .apply(null, arguments); + }; + }); + + beforeEach(function() { + assignSeverityToEntriesOverride = null; + extend(FakeGrpcServiceObject, GrpcServiceObject); + log = new Log(LOGGING, LOG_NAME_FORMATTED); + }); + + describe('instantiation', function() { + it('should localize the escaped name', function() { + assert.strictEqual(log.name, LOG_NAME_ENCODED); + }); + + it('should localize the formatted name', function() { + var formattedName = 'formatted-name'; + + var formatName_ = Log.formatName_; + Log.formatName_ = function() { + Log.formatName_ = formatName_; + return formattedName; + }; + + var log = new Log(LOGGING, LOG_NAME_FORMATTED); + + assert.strictEqual(log.formattedName_, formattedName); + }); + + it('should inherit from GrpcServiceObject', function() { + assert(log instanceof FakeGrpcServiceObject); + + var calledWith = log.calledWith_[0]; + + assert.strictEqual(calledWith.parent, LOGGING); + assert.strictEqual(calledWith.id, LOG_NAME_ENCODED); + assert.deepEqual(calledWith.methods, { + delete: { + protoOpts: { + service: 'LoggingServiceV2', + method: 'deleteLog' + }, + reqOpts: { + logName: log.formattedName_ + } + } + }); + }); + }); + + describe('assignSeverityToEntries_', function() { + var ENTRIES = [ + { data: { a: 'b' } }, + { data: { c: 'd' } } + ]; + + var SEVERITY = 'severity'; + + it('should assign severity to a single entry', function() { + assert.deepEqual( + Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY), + [ + extend(true, {}, ENTRIES[0], { severity: SEVERITY }) + ] + ); + }); + + it('should assign severity property to multiple entries', function() { + assert.deepEqual( + Log.assignSeverityToEntries_(ENTRIES, SEVERITY), + [ + extend(true, {}, ENTRIES[0], { severity: SEVERITY }), + extend(true, {}, ENTRIES[1], { severity: SEVERITY }) + ] + ); + }); + + it('should not affect original array', function() { + var originalEntries = extend({}, ENTRIES); + + Log.assignSeverityToEntries_(originalEntries, SEVERITY); + + assert.deepEqual(originalEntries, ENTRIES); + }); + }); + + describe('formatName_', function() { + var PROJECT_ID = 'project-id'; + var NAME = 'log-name'; + + var EXPECTED = 'projects/' + PROJECT_ID + '/logs/' + NAME; + + it('should properly format the name', function() { + assert.strictEqual(Log.formatName_(PROJECT_ID, NAME), EXPECTED); + }); + + it('should encode a name that requires it', function() { + var name = 'appengine/logs'; + var expectedName = 'projects/' + PROJECT_ID + '/logs/appengine%2Flogs'; + + assert.strictEqual(Log.formatName_(PROJECT_ID, name), expectedName); + }); + + it('should not encode a name that does not require it', function() { + var name = 'appengine%2Flogs'; + var expectedName = 'projects/' + PROJECT_ID + '/logs/' + name; + + assert.strictEqual(Log.formatName_(PROJECT_ID, name), expectedName); + }); + }); + + describe('entry', function() { + it('should return an entry from Logging', function() { + var resource = {}; + var data = {}; + + var entryObject = {}; + + log.parent.entry = function(resource_, data_) { + assert.strictEqual(resource_, resource); + assert.strictEqual(data_, data); + return entryObject; + }; + + var entry = log.entry(resource, data); + assert.strictEqual(entry, entryObject); + }); + + it('should attach the log name to the entry', function() { + log.parent.entry = function() { + return {}; + }; + + var entry = log.entry({}, {}); + assert.strictEqual(entry.logName, log.formattedName_); + }); + }); + + describe('getEntries', function() { + var EXPECTED_OPTIONS = { + filter: 'logName="' + LOG_NAME_FORMATTED + '"' + }; + + it('should call Logging getEntries with defaults', function(done) { + log.parent.getEntries = function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS); + callback(); // done() + }; + + log.getEntries(done); + }); + + it('should allow overriding the options', function(done) { + var options = { + custom: true, + filter: 'custom filter' + }; + + log.parent.getEntries = function(options_, callback) { + assert.deepEqual(options_, extend({}, EXPECTED_OPTIONS, options)); + callback(); // done() + }; + + log.getEntries(options, done); + }); + }); + + describe('write', function() { + var ENTRY = {}; + var OPTIONS = { + resource: {} + }; + + it('should make the correct API request', function(done) { + var formattedEntry = {}; + + log.formatEntryForApi_ = function() { + return formattedEntry; + }; + + log.request = function(protoOpts, reqOpts) { + assert.strictEqual(protoOpts.service, 'LoggingServiceV2'); + assert.strictEqual(protoOpts.method, 'writeLogEntries'); + + assert.strictEqual(reqOpts.logName, log.formattedName_); + assert.strictEqual(reqOpts.entries[0], formattedEntry); + + done(); + }; + + log.write(ENTRY, OPTIONS, assert.ifError); + }); + + it('should exec callback with only error and API response', function(done) { + var args = [1, 2, 3, 4]; + + log.formatEntryForApi_ = util.noop; + + log.request = function(protoOpts, reqOpts, callback) { + callback.apply(null, args); + }; + + log.write(ENTRY, OPTIONS, function() { + assert.strictEqual(arguments.length, 2); + + assert.strictEqual(arguments[0], args[0]); + assert.strictEqual(arguments[1], args[1]); + + done(); + }); + }); + + it('should not require options', function(done) { + log.formatEntryForApi_ = util.noop; + + log.request = function(protoOpts, reqOpts, callback) { + callback(); // done() + }; + + log.write(ENTRY, done); + }); + }); + + describe('severity shortcuts', function() { + var ENTRY = {}; + var LABELS = []; + + beforeEach(function() { + log.write = util.noop; + }); + + describe('alert', function() { + it('should format the entries', function(done) { + assignSeverityToEntriesOverride = function(entries, severity) { + assert.strictEqual(entries, ENTRY); + assert.strictEqual(severity, 'ALERT'); + + done(); + }; + + log.alert(ENTRY, LABELS, assert.ifError); + }); + + it('should pass correct arguments to write', function(done) { + var assignedEntries = []; + + assignSeverityToEntriesOverride = function() { + return assignedEntries; + }; + + log.write = function(entry, labels, callback) { + assert.strictEqual(entry, assignedEntries); + assert.strictEqual(labels, LABELS); + callback(); // done() + }; + + log.alert(ENTRY, LABELS, done); + }); + }); + + describe('critical', function() { + it('should format the entries', function(done) { + assignSeverityToEntriesOverride = function(entries, severity) { + assert.strictEqual(entries, ENTRY); + assert.strictEqual(severity, 'CRITICAL'); + + done(); + }; + + log.critical(ENTRY, LABELS, assert.ifError); + }); + + it('should pass correct arguments to write', function(done) { + var assignedEntries = []; + + assignSeverityToEntriesOverride = function() { + return assignedEntries; + }; + + log.write = function(entry, labels, callback) { + assert.strictEqual(entry, assignedEntries); + assert.strictEqual(labels, LABELS); + callback(); // done() + }; + + log.critical(ENTRY, LABELS, done); + }); + }); + + describe('debug', function() { + it('should format the entries', function(done) { + assignSeverityToEntriesOverride = function(entries, severity) { + assert.strictEqual(entries, ENTRY); + assert.strictEqual(severity, 'DEBUG'); + + done(); + }; + + log.debug(ENTRY, LABELS, assert.ifError); + }); + + it('should pass correct arguments to write', function(done) { + var assignedEntries = []; + + assignSeverityToEntriesOverride = function() { + return assignedEntries; + }; + + log.write = function(entry, labels, callback) { + assert.strictEqual(entry, assignedEntries); + assert.strictEqual(labels, LABELS); + callback(); // done() + }; + + log.debug(ENTRY, LABELS, done); + }); + }); + + describe('emergency', function() { + it('should format the entries', function(done) { + assignSeverityToEntriesOverride = function(entries, severity) { + assert.strictEqual(entries, ENTRY); + assert.strictEqual(severity, 'EMERGENCY'); + + done(); + }; + + log.emergency(ENTRY, LABELS, assert.ifError); + }); + + it('should pass correct arguments to write', function(done) { + var assignedEntries = []; + + assignSeverityToEntriesOverride = function() { + return assignedEntries; + }; + + log.write = function(entry, labels, callback) { + assert.strictEqual(entry, assignedEntries); + assert.strictEqual(labels, LABELS); + callback(); // done() + }; + + log.emergency(ENTRY, LABELS, done); + }); + }); + + describe('error', function() { + it('should format the entries', function(done) { + assignSeverityToEntriesOverride = function(entries, severity) { + assert.strictEqual(entries, ENTRY); + assert.strictEqual(severity, 'ERROR'); + + done(); + }; + + log.error(ENTRY, LABELS, assert.ifError); + }); + + it('should pass correct arguments to write', function(done) { + var assignedEntries = []; + + assignSeverityToEntriesOverride = function() { + return assignedEntries; + }; + + log.write = function(entry, labels, callback) { + assert.strictEqual(entry, assignedEntries); + assert.strictEqual(labels, LABELS); + callback(); // done() + }; + + log.error(ENTRY, LABELS, done); + }); + }); + + describe('info', function() { + it('should format the entries', function(done) { + assignSeverityToEntriesOverride = function(entries, severity) { + assert.strictEqual(entries, ENTRY); + assert.strictEqual(severity, 'INFO'); + + done(); + }; + + log.info(ENTRY, LABELS, assert.ifError); + }); + + it('should pass correct arguments to write', function(done) { + var assignedEntries = []; + + assignSeverityToEntriesOverride = function() { + return assignedEntries; + }; + + log.write = function(entry, labels, callback) { + assert.strictEqual(entry, assignedEntries); + assert.strictEqual(labels, LABELS); + callback(); // done() + }; + + log.info(ENTRY, LABELS, done); + }); + }); + + describe('notice', function() { + it('should format the entries', function(done) { + assignSeverityToEntriesOverride = function(entries, severity) { + assert.strictEqual(entries, ENTRY); + assert.strictEqual(severity, 'NOTICE'); + + done(); + }; + + log.notice(ENTRY, LABELS, assert.ifError); + }); + + it('should pass correct arguments to write', function(done) { + var assignedEntries = []; + + assignSeverityToEntriesOverride = function() { + return assignedEntries; + }; + + log.write = function(entry, labels, callback) { + assert.strictEqual(entry, assignedEntries); + assert.strictEqual(labels, LABELS); + callback(); // done() + }; + + log.notice(ENTRY, LABELS, done); + }); + }); + + describe('warning', function() { + it('should format the entries', function(done) { + assignSeverityToEntriesOverride = function(entries, severity) { + assert.strictEqual(entries, ENTRY); + assert.strictEqual(severity, 'WARNING'); + + done(); + }; + + log.warning(ENTRY, LABELS, assert.ifError); + }); + + it('should pass correct arguments to write', function(done) { + var assignedEntries = []; + + assignSeverityToEntriesOverride = function() { + return assignedEntries; + }; + + log.write = function(entry, labels, callback) { + assert.strictEqual(entry, assignedEntries); + assert.strictEqual(labels, LABELS); + callback(); // done() + }; + + log.warning(ENTRY, LABELS, done); + }); + }); + }); + + describe('formatEntryForApi_', function() { + var ENTRY = {}; + var EXPECTED_FORMATTED_ENTRY = {}; + var ENTRY_INSTANCE = new Entry(); + + it('should create an entry if one is not provided', function() { + var fakeEntryInstance = { + toJSON: function() { + return EXPECTED_FORMATTED_ENTRY; + } + }; + + log.entry = function(entry) { + assert.strictEqual(entry, ENTRY); + return fakeEntryInstance; + }; + + var formattedEntry = log.formatEntryForApi_(ENTRY); + assert.strictEqual(formattedEntry, EXPECTED_FORMATTED_ENTRY); + }); + + it('should get JSON format from entry object', function(done) { + log.entry = function() { + done(); // will result in multiple done() calls and fail the test. + }; + + var toJSON = ENTRY_INSTANCE.toJSON; + ENTRY_INSTANCE.toJSON = function() { + ENTRY_INSTANCE.toJSON = toJSON; + return EXPECTED_FORMATTED_ENTRY; + }; + + var formattedEntry = log.formatEntryForApi_(ENTRY_INSTANCE); + assert.strictEqual(formattedEntry, EXPECTED_FORMATTED_ENTRY); + done(); + }); + + it('should assign the log name', function() { + var entry = log.formatEntryForApi_(ENTRY_INSTANCE); + + assert.strictEqual(entry.logName, log.formattedName_); + }); + }); +}); diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js new file mode 100644 index 00000000000..30138f2a6f1 --- /dev/null +++ b/handwritten/logging/test/sink.js @@ -0,0 +1,212 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var assert = require('assert'); +var extend = require('extend'); +var proxyquire = require('proxyquire'); + +var util = require('@google-cloud/common').util; + +function FakeGrpcServiceObject() { + this.calledWith_ = arguments; +} + +describe('Sink', function() { + var Sink; + var sink; + + var LOGGING = { + createSink: util.noop, + projectId: 'project-id' + }; + var SINK_NAME = 'sink-name'; + + before(function() { + Sink = proxyquire('../src/sink.js', { + '@google-cloud/common': { + GrpcServiceObject: FakeGrpcServiceObject + } + }); + }); + + beforeEach(function() { + sink = new Sink(LOGGING, SINK_NAME); + }); + + describe('instantiation', function() { + it('should inherit from GrpcServiceObject', function() { + var loggingInstance = extend({}, LOGGING, { + createSink: { + bind: function(context) { + assert.strictEqual(context, loggingInstance); + } + } + }); + + var sink = new Sink(loggingInstance, SINK_NAME); + assert(sink instanceof FakeGrpcServiceObject); + + var calledWith = sink.calledWith_[0]; + + assert.strictEqual(calledWith.parent, loggingInstance); + assert.strictEqual(calledWith.baseUrl, '/sinks'); + assert.strictEqual(calledWith.id, SINK_NAME); + assert.deepEqual(calledWith.methods, { + create: true, + delete: { + protoOpts: { + service: 'ConfigServiceV2', + method: 'deleteSink' + }, + reqOpts: { + sinkName: sink.formattedName_ + } + }, + getMetadata: { + protoOpts: { + service: 'ConfigServiceV2', + method: 'getSink' + }, + reqOpts: { + sinkName: sink.formattedName_ + } + } + }); + }); + + it('should localize the name', function() { + assert.strictEqual(sink.name, SINK_NAME); + }); + + it('should localize the formatted name', function() { + assert.strictEqual( + sink.formattedName_, + 'projects/' + LOGGING.projectId + '/sinks/' + SINK_NAME + ); + }); + }); + + describe('setFilter', function() { + var FILTER = 'filter'; + + it('should call set metadata', function(done) { + sink.setMetadata = function(metadata, callback) { + assert.strictEqual(metadata.filter, FILTER); + callback(); // done() + }; + + sink.setFilter(FILTER, done); + }); + }); + + describe('setMetadata', function() { + var METADATA = { a: 'b', c: 'd' }; + + it('should refresh the metadata', function(done) { + sink.getMetadata = function() { + done(); + }; + + sink.setMetadata(METADATA, assert.ifError); + }); + + it('should exec callback with error from refresh', function(done) { + var error = new Error('Error.'); + var apiResponse = {}; + + sink.getMetadata = function(callback) { + callback(error, null, apiResponse); + }; + + sink.setMetadata(METADATA, function(err, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(apiResponse_, apiResponse); + done(); + }); + }); + + it('should make the correct request', function(done) { + var currentMetadata = { a: 'a', e: 'e' }; + + sink.getMetadata = function(callback) { + callback(null, currentMetadata); + }; + + sink.request = function(protoOpts, reqOpts) { + assert.strictEqual(protoOpts.service, 'ConfigServiceV2'); + assert.strictEqual(protoOpts.method, 'updateSink'); + + assert.strictEqual(reqOpts.sinkName, sink.formattedName_); + + var expectedMetadata = extend({}, currentMetadata, METADATA); + assert.deepEqual(reqOpts.sink, expectedMetadata); + + done(); + }; + + sink.setMetadata(METADATA, assert.ifError); + }); + + describe('error', function() { + var error = new Error('Error.'); + var apiResponse = {}; + + beforeEach(function() { + sink.getMetadata = function(callback) { + callback(); + }; + + sink.request = function(protoOpts, reqOpts, callback) { + callback(error, apiResponse); + }; + }); + + it('should execute callback with error & API response', function(done) { + sink.setMetadata(METADATA, function(err, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(apiResponse_, apiResponse); + + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = {}; + + beforeEach(function() { + sink.getMetadata = function(callback) { + callback(); + }; + + sink.request = function(protoOpts, reqOpts, callback) { + callback(null, apiResponse); + }; + }); + + it('should execute callback with API resp', function(done) { + sink.setMetadata(METADATA, function(err, apiResponse_) { + assert.ifError(err); + assert.strictEqual(apiResponse_, apiResponse); + + done(); + }); + }); + }); + }); +}); From d1cd9bb9ca29d8db75c289017f81a05cf524d967 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 3 Aug 2016 20:26:08 -0400 Subject: [PATCH 0002/1029] set starting version points --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 948c7a7362c..df076b0a624 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.0.0", + "version": "0.1.0", "author": "Google Inc.", "description": "Google Cloud Logging Client Library for Node.js", "contributors": [ @@ -77,4 +77,4 @@ "engines": { "node": ">=0.12.0" } -} +} \ No newline at end of file From fe50625ed801c7e258c4f405955ed6be6f2083ed Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 4 Aug 2016 15:21:59 -0400 Subject: [PATCH 0003/1029] modular code style --- handwritten/logging/package.json | 4 +- handwritten/logging/src/entry.js | 10 +--- handwritten/logging/src/index.js | 56 +++++----------------- handwritten/logging/src/log.js | 12 ++--- handwritten/logging/src/sink.js | 20 ++------ handwritten/logging/system-test/logging.js | 6 +-- handwritten/logging/test/entry.js | 3 +- handwritten/logging/test/index.js | 2 +- handwritten/logging/test/log.js | 4 +- handwritten/logging/test/sink.js | 1 - 10 files changed, 30 insertions(+), 88 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index df076b0a624..ea1779c2b27 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,7 +63,7 @@ "devDependencies": { "async": "^1.4.2", "methmeth": "^1.0.0", - "mocha": "^2.1.0", + "mocha": "^3.0.1", "node-uuid": "^1.4.3", "propprop": "^0.3.0", "proxyquire": "^1.7.10" @@ -77,4 +77,4 @@ "engines": { "node": ">=0.12.0" } -} \ No newline at end of file +} diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 0a3a643dcff..61f3fce057d 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -24,12 +24,6 @@ var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); -/** - * @type {module:common/grpc-service} - * @private - */ -var GrpcService = common.GrpcService; - /** * Create an entry object to define new data to insert into a log. * @@ -115,7 +109,7 @@ Entry.fromApiResponse_ = function(entry) { var data = entry[entry.payload]; if (entry.payload === 'jsonPayload') { - data = GrpcService.structToObj_(data); + data = common.GrpcService.structToObj_(data); } var serializedEntry = extend(new Entry(entry.resource, data), entry); @@ -161,7 +155,7 @@ Entry.prototype.toJSON = function() { } if (is.object(this.data)) { - entry.jsonPayload = GrpcService.objToStruct_(this.data, { + entry.jsonPayload = common.GrpcService.objToStruct_(this.data, { stringify: true }); } else if (is.string(this.data)) { diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index e7d73d29d2f..ad765e3adb2 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -21,25 +21,15 @@ 'use strict'; var arrify = require('arrify'); +var BigQuery = require('@google-cloud/bigquery'); var common = require('@google-cloud/common'); var extend = require('extend'); var format = require('string-format-obj'); var googleProtoFiles = require('google-proto-files'); var is = require('is'); -var nodeutil = require('util'); -var PKG = require('../package.json'); - -/** - * @type {module:storage/bucket} - * @private - */ -var Bucket = require('@google-cloud/storage').Bucket; - -/** - * @type {module:bigquery/dataset} - * @private - */ -var Dataset = require('@google-cloud/bigquery').Dataset; +var PubSub = require('@google-cloud/pubsub'); +var Storage = require('@google-cloud/storage'); +var util = require('util'); /** * @type {module:logging/entry} @@ -47,12 +37,6 @@ var Dataset = require('@google-cloud/bigquery').Dataset; */ var Entry = require('./entry.js'); -/** - * @type {module:common/grpc-service} - * @private - */ -var GrpcService = common.GrpcService; - /** * @type {module:logging/log} * @private @@ -65,23 +49,7 @@ var Log = require('./log.js'); */ var Sink = require('./sink.js'); -/** - * @type {module:common/stream-router} - * @private - */ -var streamRouter = common.streamRouter; - -/** - * @type {module:pubsub/topic} - * @private - */ -var Topic = require('@google-cloud/pubsub').Topic; - -/** - * @type {module:common/util} - * @private - */ -var util = common.util; +var PKG = require('../package.json'); /** * [Google Cloud Logging](https://cloud.google.com/logging/docs) collects and @@ -123,7 +91,7 @@ var util = common.util; */ function Logging(options) { if (!(this instanceof Logging)) { - options = util.normalizeArguments(this, options); + options = common.util.normalizeArguments(this, options); return new Logging(options); } @@ -142,10 +110,10 @@ function Logging(options) { userAgent: PKG.name + '/' + PKG.version }; - GrpcService.call(this, config, options); + common.GrpcService.call(this, config, options); } -nodeutil.inherits(Logging, GrpcService); +util.inherits(Logging, common.GrpcService); // jscs:disable maximumLineLength /** @@ -197,17 +165,17 @@ Logging.prototype.createSink = function(name, config, callback) { throw new Error('A sink configuration object must be provided.'); } - if (config.destination instanceof Bucket) { + if (config.destination instanceof Storage.Bucket) { this.setAclForBucket_(name, config, callback); return; } - if (config.destination instanceof Dataset) { + if (config.destination instanceof BigQuery.Dataset) { this.setAclForDataset_(name, config, callback); return; } - if (config.destination instanceof Topic) { + if (config.destination instanceof PubSub.Topic) { this.setAclForTopic_(name, config, callback); return; } @@ -615,7 +583,7 @@ Logging.prototype.setAclForTopic_ = function(name, config, callback) { * These methods can be used with either a callback or as a readable object * stream. `streamRouter` is used to add this dual behavior. */ -streamRouter.extend(Logging, ['getEntries', 'getSinks']); +common.streamRouter.extend(Logging, ['getEntries', 'getSinks']); Logging.Entry = Entry; Logging.Log = Log; diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 510364f6f38..1385675cf99 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -24,7 +24,7 @@ var arrify = require('arrify'); var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); -var nodeutil = require('util'); +var util = require('util'); /** * @type {module:logging/entry} @@ -32,12 +32,6 @@ var nodeutil = require('util'); */ var Entry = require('./entry.js'); -/** - * @type {module:common/grpc-service-object} - * @private - */ -var GrpcServiceObject = common.GrpcServiceObject; - /** * A log is a named collection of entries, each entry representing a timestamped * event. Logs can be produced by Google Cloud Platform services, by third-party @@ -94,14 +88,14 @@ function Log(logging, name) { } }; - GrpcServiceObject.call(this, { + common.GrpcServiceObject.call(this, { parent: logging, id: this.name, methods: methods }); } -nodeutil.inherits(Log, GrpcServiceObject); +util.inherits(Log, common.GrpcServiceObject); /** * Return an array of log entries with the desired severity assigned. diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 7a17c027445..d3e13f00c0b 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -22,19 +22,7 @@ var common = require('@google-cloud/common'); var extend = require('extend'); -var nodeutil = require('util'); - -/** - * @type {module:common/grpc-service-object} - * @private - */ -var GrpcServiceObject = common.GrpcServiceObject; - -/** - * @type {module:common/util} - * @private - */ -var util = common.util; +var util = require('util'); /*! Developer Documentation * @@ -139,7 +127,7 @@ function Sink(logging, name) { } }; - GrpcServiceObject.call(this, { + common.GrpcServiceObject.call(this, { parent: logging, baseUrl: '/sinks', id: name, @@ -148,7 +136,7 @@ function Sink(logging, name) { }); } -nodeutil.inherits(Sink, GrpcServiceObject); +util.inherits(Sink, common.GrpcServiceObject); /** * Set the sink's filter. @@ -195,7 +183,7 @@ Sink.prototype.setFilter = function(filter, callback) { Sink.prototype.setMetadata = function(metadata, callback) { var self = this; - callback = callback || util.noop; + callback = callback || common.util.noop; this.getMetadata(function(err, currentMetadata, apiResponse) { if (err) { diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 6ce8fbc518f..fbccc1689d9 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -18,17 +18,17 @@ var assert = require('assert'); var async = require('async'); +var BigQuery = require('@google-cloud/bigquery'); var exec = require('methmeth'); var format = require('string-format-obj'); var is = require('is'); var prop = require('propprop'); +var PubSub = require('@google-cloud/pubsub'); +var Storage = require('@google-cloud/storage'); var uuid = require('node-uuid'); var env = require('../../../system-test/env.js'); -var BigQuery = require('@google-cloud/bigquery'); var Logging = require('../'); -var PubSub = require('@google-cloud/pubsub'); -var Storage = require('@google-cloud/storage'); describe('Logging', function() { var TESTS_PREFIX = 'gcloud-logging-test'; diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 89b415b7205..c8c94964431 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -18,9 +18,8 @@ var assert = require('assert'); var extend = require('extend'); -var proxyquire = require('proxyquire'); - var GrpcService = require('@google-cloud/common').GrpcService; +var proxyquire = require('proxyquire'); function FakeGrpcService() {} diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index ab947d70079..92e3e3aa7c1 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -21,8 +21,8 @@ var assert = require('assert'); var extend = require('extend'); var googleProtoFiles = require('google-proto-files'); var proxyquire = require('proxyquire'); - var util = require('@google-cloud/common').util; + var PKG = require('../package.json'); var extended = false; diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index d31296d2c22..7711faf5bcd 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -18,11 +18,11 @@ var assert = require('assert'); var extend = require('extend'); +var GrpcServiceObject = require('@google-cloud/common').GrpcServiceObject; var proxyquire = require('proxyquire'); +var util = require('@google-cloud/common').util; var Entry = require('../src/entry.js'); -var GrpcServiceObject = require('@google-cloud/common').GrpcServiceObject; -var util = require('@google-cloud/common').util; function FakeGrpcServiceObject() { this.calledWith_ = arguments; diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index 30138f2a6f1..5c582a16bb8 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -19,7 +19,6 @@ var assert = require('assert'); var extend = require('extend'); var proxyquire = require('proxyquire'); - var util = require('@google-cloud/common').util; function FakeGrpcServiceObject() { From 5b91b604ad0566b5b84bea1494ba5bf329574a12 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 4 Aug 2016 15:46:09 -0400 Subject: [PATCH 0004/1029] more code style fixes --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ea1779c2b27..f8446a2051d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,7 +69,7 @@ "proxyquire": "^1.7.10" }, "scripts": { - "publish": "../../scripts/publish", + "publish": "node ../../scripts/publish.js", "test": "mocha test/*.js", "system-test": "mocha system-test/*.js --no-timeouts --bail" }, From 086d586883e923613bb99efe8379e87269fd9386 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 11 Aug 2016 15:03:40 -0400 Subject: [PATCH 0005/1029] docs: individual package support (#1479) docs: refactor doc scripts for modularization --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f8446a2051d..bc6ddb27e9c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,7 +69,7 @@ "proxyquire": "^1.7.10" }, "scripts": { - "publish": "node ../../scripts/publish.js", + "publish": "node ../../scripts/publish.js logging", "test": "mocha test/*.js", "system-test": "mocha system-test/*.js --no-timeouts --bail" }, From c11574c129f78943db78cb273c46a3a8d161791b Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 11 Aug 2016 20:32:57 -0400 Subject: [PATCH 0006/1029] fix publish script (#1480) --- handwritten/logging/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bc6ddb27e9c..f2c7c34e4de 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.1.0", + "version": "0.1.1", "author": "Google Inc.", "description": "Google Cloud Logging Client Library for Node.js", "contributors": [ @@ -31,7 +31,7 @@ ], "main": "./src/index.js", "files": [ - "./src/*", + "src", "AUTHORS", "CONTRIBUTORS", "COPYING" @@ -69,7 +69,7 @@ "proxyquire": "^1.7.10" }, "scripts": { - "publish": "node ../../scripts/publish.js logging", + "publish-module": "node ../../scripts/publish.js logging", "test": "mocha test/*.js", "system-test": "mocha system-test/*.js --no-timeouts --bail" }, From 22a86340d68fdb84ca1914754f3a5826d79afa40 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 15 Aug 2016 08:21:22 -0700 Subject: [PATCH 0007/1029] docs: generate uniform service overviews (#1475) --- handwritten/logging/src/entry.js | 7 ------- handwritten/logging/src/index.js | 35 ++++++++++---------------------- handwritten/logging/src/log.js | 6 ------ handwritten/logging/src/sink.js | 6 ------ 4 files changed, 11 insertions(+), 43 deletions(-) diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 61f3fce057d..cde905c87f5 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -49,13 +49,6 @@ var is = require('is'); * @return {module:logging/entry} * * @example - * var gcloud = require('google-cloud')({ - * keyFilename: '/path/to/keyfile.json', - * projectId: 'grape-spaceship-123' - * }); - * - * var logging = gcloud.logging(); - * * var syslog = logging.log('syslog'); * * var resource = { diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index ad765e3adb2..bc83a4e8460 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -52,6 +52,12 @@ var Sink = require('./sink.js'); var PKG = require('../package.json'); /** + *

+ * **This is a Beta release of Google Cloud Logging.** This API is not covered + * by any SLA or deprecation policy and may be subject to + * backward-incompatible changes. + *

+ * * [Google Cloud Logging](https://cloud.google.com/logging/docs) collects and * stores logs from applications and services on the Google Cloud Platform: * @@ -60,34 +66,13 @@ var PKG = require('../package.json'); * - Integrate third-party logs from your virtual machine instances by * installing the logging agent, `google-fluentd`. * - * @alias module:logging * @constructor - * - * @classdesc - *

- * **This is a Beta release of Google Cloud Logging.** This API is not covered - * by any SLA or deprecation policy and may be subject to - * backward-incompatible changes. - *

- * - * The `gcloud.logging` method will return a `logging` object, allowing you to - * create sinks, write log entries, and more. - * - * To learn more about Logging, see the - * [What is Google Cloud Logging?](https://cloud.google.com/logging/docs) - * + * @alias module:logging + * @resource [What is Google Cloud Logging?]{@link https://cloud.google.com/logging/docs} * @resource [Introduction to the Cloud Logging API]{@link https://cloud.google.com/logging/docs/api} * * @param {object} options - [Configuration object](#/docs). - * - * @example - * var gcloud = require('google-cloud')({ - * keyFilename: '/path/to/keyfile.json', - * projectId: 'grape-spaceship-123' - * }); - * - * var logging = gcloud.logging(); */ function Logging(options) { if (!(this instanceof Logging)) { @@ -140,7 +125,9 @@ util.inherits(Logging, common.GrpcService); * @param {object} callback.apiResponse - The full API response. * * @example - * var gcs = gcloud.storage(); + * var gcs = require('@google-cloud/storage')({ + * projectId: 'grape-spaceship-123' + * }); * * var config = { * destination: gcs.bucket('logging-bucket'), diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 1385675cf99..8c695de8bd9 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -47,12 +47,6 @@ var Entry = require('./entry.js'); * @param {object} options - [Configuration object](#/docs). * * @example - * var gcloud = require('google-cloud')({ - * keyFilename: '/path/to/keyfile.json', - * projectId: 'grape-spaceship-123' - * }); - * - * var logging = gcloud.logging(); * var log = logging.log('syslog'); */ function Log(logging, name) { diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index d3e13f00c0b..ef7c866183a 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -43,12 +43,6 @@ var util = require('util'); * @param {object} options - [Configuration object](#/docs). * * @example - * var gcloud = require('google-cloud')({ - * keyFilename: '/path/to/keyfile.json', - * projectId: 'grape-spaceship-123' - * }); - * - * var logging = gcloud.logging(); * var sink = logging.sink('my-sink'); */ function Sink(logging, name) { From 237143eac0f78abdea302466a1755f6ce7158646 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 16 Aug 2016 13:47:46 -0400 Subject: [PATCH 0008/1029] tests: fix assert.throws() usage (#1468) --- handwritten/logging/test/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 92e3e3aa7c1..c161064c693 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -170,13 +170,13 @@ describe('Logging', function() { it('should throw if a name is not provided', function() { assert.throws(function() { logging.createSink(); - }, 'A sink name must be provided.'); + }, /A sink name must be provided\./); }); it('should throw if a config object is not provided', function() { assert.throws(function() { logging.createSink(SINK_NAME); - }, 'A sink configuration object must be provided.'); + }, /A sink configuration object must be provided\./); }); it('should set acls for a Bucket destination', function(done) { From 06b9df49f4f5770fda8644ab32d705f5fc0849ea Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 23 Aug 2016 14:38:50 -0400 Subject: [PATCH 0009/1029] gcloud-node -> google-cloud-node (#1521) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f2c7c34e4de..61bb205e7d1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -36,7 +36,7 @@ "CONTRIBUTORS", "COPYING" ], - "repository": "googlecloudplatform/gcloud-node", + "repository": "googlecloudplatform/google-cloud-node", "keywords": [ "google apis client", "google api client", From 2e92647293686e2116d1480e97dca2d74fa78085 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 26 Aug 2016 13:25:29 -0400 Subject: [PATCH 0010/1029] add readmes for all packages (#1495) * add bigquery readme * add all readmes * copy readme as part of release script * gcloud-node -> google-cloud-node * fix youre good to gos * add resource manager scope * exclude unecessary files --- handwritten/logging/README.md | 105 ++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 handwritten/logging/README.md diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md new file mode 100644 index 00000000000..a9752390e4b --- /dev/null +++ b/handwritten/logging/README.md @@ -0,0 +1,105 @@ +# @google-cloud/logging +> Google Cloud Logging Client Library for Node.js + +*Looking for more Google APIs than just Logging? You might want to check out [`google-cloud`][google-cloud].* + +- [API Documentation][gcloud-logging-docs] +- [Official Documentation][cloud-logging-docs] + + +```sh +$ npm install --save @google-cloud/logging +``` +```js +var logging = require('@google-cloud/logging')({ + projectId: 'grape-spaceship-123', + keyFilename: '/path/to/keyfile.json' +}); + +// Create a sink using a Bucket as a destination. +// $ npm install --save @google-cloud/storage +var gcs = require('@google-cloud/storage'); + +logging.createSink('my-new-sink', { + destination: gcs.bucket('my-sink') +}, function(err, sink) {}); + +// Write a critical entry to a log. +var syslog = logging.log('syslog'); + +var resource = { + type: 'gce_instance', + labels: { + zone: 'global', + instance_id: '3' + } +}; + +var entry = syslog.entry(resource, { + delegate: process.env.user +}); + +syslog.critical(entry, function(err) {}); + +// Get all entries in your project. +logging.getEntries(function(err, entries) { + if (!err) { + // `entries` contains all of the entries from the logs in your project. + } +}); +``` + + +## Authentication + +It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services. + +### On Google Compute Engine + +If you are running this client on Google Compute Engine, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. + +``` js +// Authenticating on a global basis. +var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' + +var logging = require('@google-cloud/logging')({ + projectId: projectId +}); + +// ...you're good to go! +``` + +### Elsewhere + +If you are not running this client on Google Compute Engine, you need a Google Developers service account. To create a service account: + +1. Visit the [Google Developers Console][dev-console]. +2. Create a new project or click on an existing project. +3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services): + * Google Cloud Logging API +4. Navigate to **APIs & auth** > **Credentials** and then: + * If you want to use a new service account, click on **Create new Client ID** and select **Service account**. After the account is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. + * If you want to generate a new key for an existing service account, click on **Generate new JSON key** and download the JSON key file. + +``` js +var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' + +var logging = require('@google-cloud/logging')({ + projectId: projectId, + + // The path to your key file: + keyFilename: '/path/to/keyfile.json' + + // Or the contents of the key file: + credentials: require('./path/to/keyfile.json') +}); + +// ...you're good to go! +``` + + +[google-cloud]: https://github.com/GoogleCloudPlatform/google-cloud-node/ +[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using +[dev-console]: https://console.developers.google.com/project +[gcloud-logging-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/logging +[cloud-logging-docs]: https://cloud.google.com/logging/docs \ No newline at end of file From 99df7591a6c5426af752bd12371286a3f2f5d042 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 26 Aug 2016 17:47:55 -0400 Subject: [PATCH 0011/1029] bigquery/language/logging/prediction/vision: decouple packages (#1531) * bigquery/language/logging/prediction/vision: decouple packages * tests: allow more time for docs tests to run * add vision test * resort dependencies like npm does --- handwritten/logging/package.json | 8 +-- handwritten/logging/src/index.js | 15 ++--- handwritten/logging/src/sink.js | 4 +- handwritten/logging/test/index.js | 104 ++++++++++++++++-------------- 4 files changed, 68 insertions(+), 63 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 61bb205e7d1..55a2cf8395c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -50,17 +50,17 @@ "logging" ], "dependencies": { + "@google-cloud/common": "^0.3.0", "arrify": "^1.0.0", "extend": "^3.0.0", - "@google-cloud/bigquery": "^0.1.0", - "@google-cloud/common": "^0.1.0", - "@google-cloud/pubsub": "^0.1.0", - "@google-cloud/storage": "^0.1.0", "google-proto-files": "^0.2.1", "is": "^3.0.1", "string-format-obj": "^1.0.0" }, "devDependencies": { + "@google-cloud/bigquery": "*", + "@google-cloud/pubsub": "*", + "@google-cloud/storage": "*", "async": "^1.4.2", "methmeth": "^1.0.0", "mocha": "^3.0.1", diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index bc83a4e8460..cd5843ca1c3 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -21,14 +21,11 @@ 'use strict'; var arrify = require('arrify'); -var BigQuery = require('@google-cloud/bigquery'); var common = require('@google-cloud/common'); var extend = require('extend'); var format = require('string-format-obj'); var googleProtoFiles = require('google-proto-files'); var is = require('is'); -var PubSub = require('@google-cloud/pubsub'); -var Storage = require('@google-cloud/storage'); var util = require('util'); /** @@ -152,18 +149,18 @@ Logging.prototype.createSink = function(name, config, callback) { throw new Error('A sink configuration object must be provided.'); } - if (config.destination instanceof Storage.Bucket) { - this.setAclForBucket_(name, config, callback); + if (common.util.isCustomType(config.destination, 'bigquery/dataset')) { + this.setAclForDataset_(name, config, callback); return; } - if (config.destination instanceof BigQuery.Dataset) { - this.setAclForDataset_(name, config, callback); + if (common.util.isCustomType(config.destination, 'pubsub/topic')) { + this.setAclForTopic_(name, config, callback); return; } - if (config.destination instanceof PubSub.Topic) { - this.setAclForTopic_(name, config, callback); + if (common.util.isCustomType(config.destination, 'storage/bucket')) { + this.setAclForBucket_(name, config, callback); return; } diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index ef7c866183a..0f547cbe9ce 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -57,7 +57,9 @@ function Sink(logging, name) { * * @example * var config = { - * // ... + * destination: { + * // ... + * } * }; * * sink.create(config, function(err, sink, apiResponse) { diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index c161064c693..215a88c3ab0 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -41,21 +41,16 @@ var fakeStreamRouter = { } }; +var isCustomTypeOverride; var fakeUtil = extend({}, util, { - makeAuthenticatedRequestFactory: util.noop -}); - -function FakeBucket() { - this.calledWith_ = arguments; -} - -function FakeDataset() { - this.calledWith_ = arguments; -} + isCustomType: function() { + if (isCustomTypeOverride) { + return isCustomTypeOverride.apply(null, arguments); + } -function FakeTopic() { - this.calledWith_ = arguments; -} + return false; + } +}); function FakeEntry() { this.calledWith_ = arguments; @@ -90,15 +85,6 @@ describe('Logging', function() { streamRouter: fakeStreamRouter, util: fakeUtil }, - '@google-cloud/bigquery': { - Dataset: FakeDataset - }, - '@google-cloud/pubsub': { - Topic: FakeTopic - }, - '@google-cloud/storage': { - Bucket: FakeBucket - }, './log.js': FakeLog, './entry.js': FakeEntry, './sink.js': FakeSink @@ -106,11 +92,12 @@ describe('Logging', function() { }); beforeEach(function() { + isCustomTypeOverride = null; + logging = new Logging({ projectId: PROJECT_ID }); logging.projectId = PROJECT_ID; - logging.request = util.noop; }); @@ -179,14 +166,19 @@ describe('Logging', function() { }, /A sink configuration object must be provided\./); }); - it('should set acls for a Bucket destination', function(done) { - var bucket = new FakeBucket(); + it('should set acls for a Dataset destination', function(done) { + var dataset = {}; var CONFIG = { - destination: bucket + destination: dataset }; - logging.setAclForBucket_ = function(name, config, callback) { + isCustomTypeOverride = function(destination, type) { + assert.strictEqual(destination, dataset); + return type === 'bigquery/dataset'; + }; + + logging.setAclForDataset_ = function(name, config, callback) { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); callback(); // done() @@ -195,14 +187,19 @@ describe('Logging', function() { logging.createSink(SINK_NAME, CONFIG, done); }); - it('should set acls for a Dataset destination', function(done) { - var dataset = new FakeDataset(); + it('should set acls for a Topic destination', function(done) { + var topic = {}; var CONFIG = { - destination: dataset + destination: topic }; - logging.setAclForDataset_ = function(name, config, callback) { + isCustomTypeOverride = function(destination, type) { + assert.strictEqual(destination, topic); + return type === 'pubsub/topic'; + }; + + logging.setAclForTopic_ = function(name, config, callback) { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); callback(); // done() @@ -211,14 +208,19 @@ describe('Logging', function() { logging.createSink(SINK_NAME, CONFIG, done); }); - it('should set acls for a Topic destination', function(done) { - var topic = new FakeTopic(); + it('should set acls for a Bucket destination', function(done) { + var bucket = {}; var CONFIG = { - destination: topic + destination: bucket }; - logging.setAclForTopic_ = function(name, config, callback) { + isCustomTypeOverride = function(destination, type) { + assert.strictEqual(destination, bucket); + return type === 'storage/bucket'; + }; + + logging.setAclForBucket_ = function(name, config, callback) { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); callback(); // done() @@ -227,6 +229,7 @@ describe('Logging', function() { logging.createSink(SINK_NAME, CONFIG, done); }); + describe('API request', function() { it('should make the correct API request', function(done) { var config = { @@ -574,11 +577,12 @@ describe('Logging', function() { var bucket; beforeEach(function() { - bucket = new FakeBucket(); - bucket.name = 'bucket-name'; - bucket.acl = { - owners: { - addGroup: util.noop + bucket = { + name: 'bucket-name', + acl: { + owners: { + addGroup: util.noop + } } }; @@ -653,10 +657,11 @@ describe('Logging', function() { var dataset; beforeEach(function() { - dataset = new FakeDataset(); - dataset.id = 'dataset-id'; - dataset.parent = { - projectId: PROJECT_ID + dataset = { + id: 'dataset-id', + parent: { + projectId: PROJECT_ID + } }; CONFIG = { @@ -773,11 +778,12 @@ describe('Logging', function() { var topic; beforeEach(function() { - topic = new FakeTopic(); - topic.name = 'topic-name'; - topic.iam = { - getPolicy: util.noop, - setPolicy: util.noop + topic = { + name: 'topic-name', + iam: { + getPolicy: util.noop, + setPolicy: util.noop + } }; CONFIG = { From 950594a25f507abb500c01f61a831aff5af27a1f Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Wed, 31 Aug 2016 14:50:02 -0700 Subject: [PATCH 0012/1029] Add Gapic-generated files to logging API. (#1548) --- handwritten/logging/package.json | 2 + handwritten/logging/src/index.js | 1 + .../logging/src/v2/config_service_v2_api.js | 451 +++++++++++++++++ .../v2/config_service_v2_client_config.json | 53 ++ handwritten/logging/src/v2/index.js | 38 ++ .../logging/src/v2/logging_service_v2_api.js | 454 ++++++++++++++++++ .../v2/logging_service_v2_client_config.json | 57 +++ .../logging/src/v2/metrics_service_v2_api.js | 450 +++++++++++++++++ .../v2/metrics_service_v2_client_config.json | 53 ++ 9 files changed, 1559 insertions(+) create mode 100644 handwritten/logging/src/v2/config_service_v2_api.js create mode 100644 handwritten/logging/src/v2/config_service_v2_client_config.json create mode 100644 handwritten/logging/src/v2/index.js create mode 100644 handwritten/logging/src/v2/logging_service_v2_api.js create mode 100644 handwritten/logging/src/v2/logging_service_v2_client_config.json create mode 100644 handwritten/logging/src/v2/metrics_service_v2_api.js create mode 100644 handwritten/logging/src/v2/metrics_service_v2_client_config.json diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 55a2cf8395c..876bccad0dd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -51,8 +51,10 @@ ], "dependencies": { "@google-cloud/common": "^0.3.0", + "arguejs": "^0.2.3", "arrify": "^1.0.0", "extend": "^3.0.0", + "google-gax": "^0.6.0", "google-proto-files": "^0.2.1", "is": "^3.0.1", "string-format-obj": "^1.0.0" diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index cd5843ca1c3..5153d3eaf28 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -575,3 +575,4 @@ Logging.Logging = Logging; Logging.Sink = Sink; module.exports = Logging; +module.exports.v2 = require('./v2'); diff --git a/handwritten/logging/src/v2/config_service_v2_api.js b/handwritten/logging/src/v2/config_service_v2_api.js new file mode 100644 index 00000000000..2c0648a50c6 --- /dev/null +++ b/handwritten/logging/src/v2/config_service_v2_api.js @@ -0,0 +1,451 @@ +/* + * Copyright 2016 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * EDITING INSTRUCTIONS + * This file was generated from the file + * https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto, + * and updates to that file get reflected here through a refresh process. + * For the short term, the refresh process will only be runnable by Google + * engineers. + * + * The only allowed edits are to method and file documentation. A 3-way + * merge preserves those additions if the generated source changes. + */ +/* TODO: introduce line-wrapping so that it never exceeds the limit. */ +/* jscs: disable maximumLineLength */ +'use strict'; + +var arguejs = require('arguejs'); +var configData = require('./config_service_v2_client_config'); +var extend = require('extend'); +var gax = require('google-gax'); + +var SERVICE_ADDRESS = 'logging.googleapis.com'; + +var DEFAULT_SERVICE_PORT = 443; + +var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; + +var DEFAULT_TIMEOUT = 30; + +var PAGE_DESCRIPTORS = { + listSinks: new gax.PageDescriptor( + 'page_token', + 'next_page_token', + 'sinks') +}; + +/** + * The scopes needed to make gRPC calls to all of the methods defined in + * this service. + */ +var ALL_SCOPES = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write' +]; + +/** + * Service for configuring sinks used to export log entries outside Stackdriver + * Logging. + * + * This will be created through a builder function which can be obtained by the module. + * See the following example of how to initialize the module and how to access to the builder. + * @see {@link configServiceV2Api} + * + * @example + * var loggingV2 = require('@google-cloud/logging').v2({ + * // optional auth parameters. + * }); + * var api = loggingV2.configServiceV2Api(); + * + * @class + */ +function ConfigServiceV2Api(gaxGrpc, grpcClient, opts) { + opts = opts || {}; + var servicePath = opts.servicePath || SERVICE_ADDRESS; + var port = opts.port || DEFAULT_SERVICE_PORT; + var sslCreds = opts.sslCreds || null; + var clientConfig = opts.clientConfig || {}; + var timeout = opts.timeout || DEFAULT_TIMEOUT; + var appName = opts.appName || 'gax'; + var appVersion = opts.appVersion || gax.Version; + + var googleApiClient = [ + appName + '/' + appVersion, + CODE_GEN_NAME_VERSION, + 'nodejs/' + process.version].join(' '); + + var defaults = gaxGrpc.constructSettings( + 'google.logging.v2.ConfigServiceV2', + configData, + clientConfig, + timeout, + PAGE_DESCRIPTORS, + null, + {'x-goog-api-client': googleApiClient}); + + var stub = gaxGrpc.createStub( + servicePath, + port, + grpcClient.google.logging.v2.ConfigServiceV2, + {sslCreds: sslCreds}); + var methods = [ + 'listSinks', + 'getSink', + 'createSink', + 'updateSink', + 'deleteSink' + ]; + methods.forEach(function(methodName) { + this['_' + methodName] = gax.createApiCall( + stub.then(function(stub) { return stub[methodName].bind(stub); }), + defaults[methodName]); + }.bind(this)); +} + +// Path templates + +var PARENT_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}'); + +var SINK_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}/sinks/{sink}'); + +/** + * Returns a fully-qualified parent resource name string. + * @param {String} project + * @returns {String} + */ +ConfigServiceV2Api.prototype.parentPath = function parentPath(project) { + return PARENT_PATH_TEMPLATE.render({ + project: project + }); +}; + +/** + * Parses the parentName from a parent resource. + * @param {String} parentName + * A fully-qualified path representing a parent resources. + * @returns {String} - A string representing the project. + */ +ConfigServiceV2Api.prototype.matchProjectFromParentName = + function matchProjectFromParentName(parentName) { + return PARENT_PATH_TEMPLATE.match(parentName).project; +}; + +/** + * Returns a fully-qualified sink resource name string. + * @param {String} project + * @param {String} sink + * @returns {String} + */ +ConfigServiceV2Api.prototype.sinkPath = function sinkPath(project, sink) { + return SINK_PATH_TEMPLATE.render({ + project: project, + sink: sink + }); +}; + +/** + * Parses the sinkName from a sink resource. + * @param {String} sinkName + * A fully-qualified path representing a sink resources. + * @returns {String} - A string representing the project. + */ +ConfigServiceV2Api.prototype.matchProjectFromSinkName = + function matchProjectFromSinkName(sinkName) { + return SINK_PATH_TEMPLATE.match(sinkName).project; +}; + +/** + * Parses the sinkName from a sink resource. + * @param {String} sinkName + * A fully-qualified path representing a sink resources. + * @returns {String} - A string representing the sink. + */ +ConfigServiceV2Api.prototype.matchSinkFromSinkName = + function matchSinkFromSinkName(sinkName) { + return SINK_PATH_TEMPLATE.match(sinkName).sink; +}; + +// Service calls + +/** + * Lists sinks. + * + * @param {string} parent + * Required. The resource name containing the sinks. + * Example: `"projects/my-logging-project"`. + * @param {Object=} otherArgs + * @param {number=} otherArgs.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @returns {Stream} + * An object stream. By default, this emits an object representing + * [LogSink]{@link LogSink} on 'data' event. + * This object can also be configured to emit + * pages of the responses through the options parameter. + * + * @example + * + * var api = loggingV2.configServiceV2Api(); + * var formattedParent = api.parentPath("[PROJECT]"); + * api.listSinks(formattedParent).on('data', function(element) { + * // doThingsWith(element) + * }); + */ +ConfigServiceV2Api.prototype.listSinks = function listSinks() { + var args = arguejs({ + parent: String, + otherArgs: [Object, {}], + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + parent: args.parent + }; + if ('pageSize' in args.otherArgs) { + req.page_size = args.otherArgs.pageSize; + } + return this._listSinks(req, args.options, args.callback); +}; + +/** + * Gets a sink. + * + * @param {string} sinkName + * The resource name of the sink to return. + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogSink]{@link LogSink} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.configServiceV2Api(); + * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); + * api.getSink(formattedSinkName, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +ConfigServiceV2Api.prototype.getSink = function getSink() { + var args = arguejs({ + sinkName: String, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + sink_name: args.sinkName + }; + return this._getSink(req, args.options, args.callback); +}; + +/** + * Creates a sink. + * + * @param {string} parent + * The resource in which to create the sink. + * Example: `"projects/my-project-id"`. + * + * The new sink must be provided in the request. + * @param {Object} sink + * The new sink, which must not have an identifier that already + * exists. + * + * This object should have the same structure as [LogSink]{@link LogSink} + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogSink]{@link LogSink} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.configServiceV2Api(); + * var formattedParent = api.parentPath("[PROJECT]"); + * var sink = {}; + * api.createSink(formattedParent, sink, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +ConfigServiceV2Api.prototype.createSink = function createSink() { + var args = arguejs({ + parent: String, + sink: Object, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + parent: args.parent, + sink: args.sink + }; + return this._createSink(req, args.options, args.callback); +}; + +/** + * Creates or updates a sink. + * + * @param {string} sinkName + * The resource name of the sink to update. + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * + * The updated sink must be provided in the request and have the + * same name that is specified in `sinkName`. If the sink does not + * exist, it is created. + * @param {Object} sink + * The updated sink, whose name must be the same as the sink + * identifier in `sinkName`. If `sinkName` does not exist, then + * this method creates a new sink. + * + * This object should have the same structure as [LogSink]{@link LogSink} + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogSink]{@link LogSink} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.configServiceV2Api(); + * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); + * var sink = {}; + * api.updateSink(formattedSinkName, sink, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +ConfigServiceV2Api.prototype.updateSink = function updateSink() { + var args = arguejs({ + sinkName: String, + sink: Object, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + sink_name: args.sinkName, + sink: args.sink + }; + return this._updateSink(req, args.options, args.callback); +}; + +/** + * Deletes a sink. + * + * @param {string} sinkName + * The resource name of the sink to delete. + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.configServiceV2Api(); + * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); + * api.deleteSink(formattedSinkName, function(err) { + * if (err) { + * console.error(err); + * } + * }); + */ +ConfigServiceV2Api.prototype.deleteSink = function deleteSink() { + var args = arguejs({ + sinkName: String, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + sink_name: args.sinkName + }; + return this._deleteSink(req, args.options, args.callback); +}; + +function ConfigServiceV2ApiBuilder(gaxGrpc) { + if (!(this instanceof ConfigServiceV2ApiBuilder)) { + return new ConfigServiceV2ApiBuilder(gaxGrpc); + } + + var grpcClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/logging/v2/logging_config.proto' + }]); + extend(this, grpcClient.google.logging.v2); + + /** + * Build a new instance of {@link ConfigServiceV2Api}. + * + * @param {Object=} opts - The optional parameters. + * @param {String=} opts.servicePath + * The domain name of the API remote host. + * @param {number=} opts.port + * The port on which to connect to the remote host. + * @param {grpc.ClientCredentials=} opts.sslCreds + * A ClientCredentials for use with an SSL-enabled channel. + * @param {Object=} opts.clientConfig + * The customized config to build the call settings. See + * {@link gax.constructSettings} for the format. + * @param {number=} opts.timeout + * The default timeout, in seconds, for calls made through this client. + * @param {number=} opts.appName + * The codename of the calling service. + * @param {String=} opts.appVersion + * The version of the calling service. + */ + this.configServiceV2Api = function(opts) { + return new ConfigServiceV2Api(gaxGrpc, grpcClient, opts); + }; + extend(this.configServiceV2Api, ConfigServiceV2Api); +} +module.exports = ConfigServiceV2ApiBuilder; +module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json new file mode 100644 index 00000000000..bdfd9c9e162 --- /dev/null +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -0,0 +1,53 @@ +{ + "interfaces": { + "google.logging.v2.ConfigServiceV2": { + "retry_codes": { + "retry_codes_def": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + } + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.2, + "max_retry_delay_millis": 1000, + "initial_rpc_timeout_millis": 2000, + "rpc_timeout_multiplier": 1.5, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 45000 + } + }, + "methods": { + "ListSinks": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetSink": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateSink": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSink": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSink": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/src/v2/index.js new file mode 100644 index 00000000000..309e3183971 --- /dev/null +++ b/handwritten/logging/src/v2/index.js @@ -0,0 +1,38 @@ +/*! + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +var configServiceV2Api = require('./config_service_v2_api'); +var loggingServiceV2Api = require('./logging_service_v2_api'); +var metricsServiceV2Api = require('./metrics_service_v2_api'); +var extend = require('extend'); +var gax = require('google-gax'); + +function v2(options) { + options = extend({ + scopes: v2.ALL_SCOPES + }, options); + var gaxGrpc = gax.grpc(options); + var result = {}; + extend(result, configServiceV2Api(gaxGrpc)); + extend(result, loggingServiceV2Api(gaxGrpc)); + extend(result, metricsServiceV2Api(gaxGrpc)); + return result; +} + +v2.SERVICE_ADDRESS = loggingServiceV2Api.SERVICE_ADDRESS; +v2.ALL_SCOPES = loggingServiceV2Api.ALL_SCOPES; +module.exports = v2; diff --git a/handwritten/logging/src/v2/logging_service_v2_api.js b/handwritten/logging/src/v2/logging_service_v2_api.js new file mode 100644 index 00000000000..f233264f82f --- /dev/null +++ b/handwritten/logging/src/v2/logging_service_v2_api.js @@ -0,0 +1,454 @@ +/* + * Copyright 2016 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * EDITING INSTRUCTIONS + * This file was generated from the file + * https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto, + * and updates to that file get reflected here through a refresh process. + * For the short term, the refresh process will only be runnable by Google + * engineers. + * + * The only allowed edits are to method and file documentation. A 3-way + * merge preserves those additions if the generated source changes. + */ +/* TODO: introduce line-wrapping so that it never exceeds the limit. */ +/* jscs: disable maximumLineLength */ +'use strict'; + +var arguejs = require('arguejs'); +var configData = require('./logging_service_v2_client_config'); +var extend = require('extend'); +var gax = require('google-gax'); + +var SERVICE_ADDRESS = 'logging.googleapis.com'; + +var DEFAULT_SERVICE_PORT = 443; + +var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; + +var DEFAULT_TIMEOUT = 30; + +var PAGE_DESCRIPTORS = { + listLogEntries: new gax.PageDescriptor( + 'page_token', + 'next_page_token', + 'entries'), + listMonitoredResourceDescriptors: new gax.PageDescriptor( + 'page_token', + 'next_page_token', + 'resource_descriptors') +}; + +/** + * The scopes needed to make gRPC calls to all of the methods defined in + * this service. + */ +var ALL_SCOPES = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write' +]; + +/** + * Service for ingesting and querying logs. + * + * This will be created through a builder function which can be obtained by the module. + * See the following example of how to initialize the module and how to access to the builder. + * @see {@link loggingServiceV2Api} + * + * @example + * var loggingV2 = require('@google-cloud/logging').v2({ + * // optional auth parameters. + * }); + * var api = loggingV2.loggingServiceV2Api(); + * + * @class + */ +function LoggingServiceV2Api(gaxGrpc, grpcClient, opts) { + opts = opts || {}; + var servicePath = opts.servicePath || SERVICE_ADDRESS; + var port = opts.port || DEFAULT_SERVICE_PORT; + var sslCreds = opts.sslCreds || null; + var clientConfig = opts.clientConfig || {}; + var timeout = opts.timeout || DEFAULT_TIMEOUT; + var appName = opts.appName || 'gax'; + var appVersion = opts.appVersion || gax.Version; + + var googleApiClient = [ + appName + '/' + appVersion, + CODE_GEN_NAME_VERSION, + 'nodejs/' + process.version].join(' '); + + var defaults = gaxGrpc.constructSettings( + 'google.logging.v2.LoggingServiceV2', + configData, + clientConfig, + timeout, + PAGE_DESCRIPTORS, + null, + {'x-goog-api-client': googleApiClient}); + + var stub = gaxGrpc.createStub( + servicePath, + port, + grpcClient.google.logging.v2.LoggingServiceV2, + {sslCreds: sslCreds}); + var methods = [ + 'deleteLog', + 'writeLogEntries', + 'listLogEntries', + 'listMonitoredResourceDescriptors' + ]; + methods.forEach(function(methodName) { + this['_' + methodName] = gax.createApiCall( + stub.then(function(stub) { return stub[methodName].bind(stub); }), + defaults[methodName]); + }.bind(this)); +} + +// Path templates + +var PARENT_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}'); + +var LOG_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}/logs/{log}'); + +/** + * Returns a fully-qualified parent resource name string. + * @param {String} project + * @returns {String} + */ +LoggingServiceV2Api.prototype.parentPath = function parentPath(project) { + return PARENT_PATH_TEMPLATE.render({ + project: project + }); +}; + +/** + * Parses the parentName from a parent resource. + * @param {String} parentName + * A fully-qualified path representing a parent resources. + * @returns {String} - A string representing the project. + */ +LoggingServiceV2Api.prototype.matchProjectFromParentName = + function matchProjectFromParentName(parentName) { + return PARENT_PATH_TEMPLATE.match(parentName).project; +}; + +/** + * Returns a fully-qualified log resource name string. + * @param {String} project + * @param {String} log + * @returns {String} + */ +LoggingServiceV2Api.prototype.logPath = function logPath(project, log) { + return LOG_PATH_TEMPLATE.render({ + project: project, + log: log + }); +}; + +/** + * Parses the logName from a log resource. + * @param {String} logName + * A fully-qualified path representing a log resources. + * @returns {String} - A string representing the project. + */ +LoggingServiceV2Api.prototype.matchProjectFromLogName = + function matchProjectFromLogName(logName) { + return LOG_PATH_TEMPLATE.match(logName).project; +}; + +/** + * Parses the logName from a log resource. + * @param {String} logName + * A fully-qualified path representing a log resources. + * @returns {String} - A string representing the log. + */ +LoggingServiceV2Api.prototype.matchLogFromLogName = + function matchLogFromLogName(logName) { + return LOG_PATH_TEMPLATE.match(logName).log; +}; + +// Service calls + +/** + * Deletes a log and all its log entries. + * The log will reappear if it receives new entries. + * + * @param {string} logName + * Required. The resource name of the log to delete. Example: + * `"projects/my-project/logs/syslog"`. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.loggingServiceV2Api(); + * var formattedLogName = api.logPath("[PROJECT]", "[LOG]"); + * api.deleteLog(formattedLogName, function(err) { + * if (err) { + * console.error(err); + * } + * }); + */ +LoggingServiceV2Api.prototype.deleteLog = function deleteLog() { + var args = arguejs({ + logName: String, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + log_name: args.logName + }; + return this._deleteLog(req, args.options, args.callback); +}; + +/** + * Writes log entries to Stackdriver Logging. All log entries are + * written by this method. + * + * @param {Object[]} entries + * Required. The log entries to write. The log entries must have values for + * all required fields. + * + * To improve throughput and to avoid exceeding the quota limit for calls + * to `entries.write`, use this field to write multiple log entries at once + * rather than // calling this method for each log entry. + * + * This object should have the same structure as [LogEntry]{@link LogEntry} + * @param {Object=} otherArgs + * @param {string=} otherArgs.logName + * Optional. A default log resource name for those log entries in `entries` + * that do not specify their own `logName`. Example: + * `"projects/my-project/logs/syslog"`. See + * {@link LogEntry}. + * @param {Object=} otherArgs.resource + * Optional. A default monitored resource for those log entries in `entries` + * that do not specify their own `resource`. + * + * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} + * @param {Object.=} otherArgs.labels + * Optional. User-defined `key:value` items that are added to + * the `labels` field of each log entry in `entries`, except when a log + * entry specifies its own `key:value` item with the same key. + * Example: `{ "size": "large", "color":"red" }` + * @param {boolean=} otherArgs.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. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link WriteLogEntriesResponse} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.loggingServiceV2Api(); + * var entries = []; + * api.writeLogEntries(entries, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +LoggingServiceV2Api.prototype.writeLogEntries = function writeLogEntries() { + var args = arguejs({ + entries: Array, + otherArgs: [Object, {}], + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + entries: args.entries + }; + if ('logName' in args.otherArgs) { + req.log_name = args.otherArgs.logName; + } + if ('resource' in args.otherArgs) { + req.resource = args.otherArgs.resource; + } + if ('labels' in args.otherArgs) { + req.labels = args.otherArgs.labels; + } + if ('partialSuccess' in args.otherArgs) { + req.partial_success = args.otherArgs.partialSuccess; + } + return this._writeLogEntries(req, args.options, args.callback); +}; + +/** + * Lists log entries. Use this method to retrieve log entries from Cloud + * Logging. For ways to export log entries, see + * [Exporting Logs](https://cloud.google.com/logging/docs/export). + * + * @param {string[]} projectIds + * Required. One or more project IDs or project numbers from which to retrieve + * log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`. + * @param {Object=} otherArgs + * @param {string=} otherArgs.filter + * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). + * The filter is compared against all log entries in the projects specified by + * `projectIds`. Only entries that match the filter are retrieved. An empty + * filter matches all log entries. + * @param {string=} otherArgs.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`. + * @param {number=} otherArgs.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @returns {Stream} + * An object stream. By default, this emits an object representing + * [LogEntry]{@link LogEntry} on 'data' event. + * This object can also be configured to emit + * pages of the responses through the options parameter. + * + * @example + * + * var api = loggingV2.loggingServiceV2Api(); + * var projectIds = []; + * api.listLogEntries(projectIds).on('data', function(element) { + * // doThingsWith(element) + * }); + */ +LoggingServiceV2Api.prototype.listLogEntries = function listLogEntries() { + var args = arguejs({ + projectIds: Array, + otherArgs: [Object, {}], + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + project_ids: args.projectIds + }; + if ('filter' in args.otherArgs) { + req.filter = args.otherArgs.filter; + } + if ('orderBy' in args.otherArgs) { + req.order_by = args.otherArgs.orderBy; + } + if ('pageSize' in args.otherArgs) { + req.page_size = args.otherArgs.pageSize; + } + return this._listLogEntries(req, args.options, args.callback); +}; + +/** + * Lists the monitored resource descriptors used by Stackdriver Logging. + * + * @param {Object=} otherArgs + * @param {number=} otherArgs.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @returns {Stream} + * An object stream. By default, this emits an object representing + * [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} on 'data' event. + * This object can also be configured to emit + * pages of the responses through the options parameter. + * + * @example + * + * var api = loggingV2.loggingServiceV2Api(); + * + * api.listMonitoredResourceDescriptors().on('data', function(element) { + * // doThingsWith(element) + * }); + */ +LoggingServiceV2Api.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors() { + var args = arguejs({ + otherArgs: [Object, {}], + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + }; + if ('pageSize' in args.otherArgs) { + req.page_size = args.otherArgs.pageSize; + } + return this._listMonitoredResourceDescriptors(req, args.options, args.callback); +}; + +function LoggingServiceV2ApiBuilder(gaxGrpc) { + if (!(this instanceof LoggingServiceV2ApiBuilder)) { + return new LoggingServiceV2ApiBuilder(gaxGrpc); + } + + var grpcClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/logging/v2/logging.proto' + }]); + extend(this, grpcClient.google.logging.v2); + + /** + * Build a new instance of {@link LoggingServiceV2Api}. + * + * @param {Object=} opts - The optional parameters. + * @param {String=} opts.servicePath + * The domain name of the API remote host. + * @param {number=} opts.port + * The port on which to connect to the remote host. + * @param {grpc.ClientCredentials=} opts.sslCreds + * A ClientCredentials for use with an SSL-enabled channel. + * @param {Object=} opts.clientConfig + * The customized config to build the call settings. See + * {@link gax.constructSettings} for the format. + * @param {number=} opts.timeout + * The default timeout, in seconds, for calls made through this client. + * @param {number=} opts.appName + * The codename of the calling service. + * @param {String=} opts.appVersion + * The version of the calling service. + */ + this.loggingServiceV2Api = function(opts) { + return new LoggingServiceV2Api(gaxGrpc, grpcClient, opts); + }; + extend(this.loggingServiceV2Api, LoggingServiceV2Api); +} +module.exports = LoggingServiceV2ApiBuilder; +module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json new file mode 100644 index 00000000000..041bd4e3998 --- /dev/null +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -0,0 +1,57 @@ +{ + "interfaces": { + "google.logging.v2.LoggingServiceV2": { + "retry_codes": { + "retry_codes_def": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + } + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.2, + "max_retry_delay_millis": 1000, + "initial_rpc_timeout_millis": 2000, + "rpc_timeout_multiplier": 1.5, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 45000 + }, + "list": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.2, + "max_retry_delay_millis": 1000, + "initial_rpc_timeout_millis": 7000, + "rpc_timeout_multiplier": 1.5, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 45000 + } + }, + "methods": { + "DeleteLog": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "WriteLogEntries": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListLogEntries": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "list" + }, + "ListMonitoredResourceDescriptors": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/handwritten/logging/src/v2/metrics_service_v2_api.js b/handwritten/logging/src/v2/metrics_service_v2_api.js new file mode 100644 index 00000000000..55f5adb5353 --- /dev/null +++ b/handwritten/logging/src/v2/metrics_service_v2_api.js @@ -0,0 +1,450 @@ +/* + * Copyright 2016 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * EDITING INSTRUCTIONS + * This file was generated from the file + * https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto, + * and updates to that file get reflected here through a refresh process. + * For the short term, the refresh process will only be runnable by Google + * engineers. + * + * The only allowed edits are to method and file documentation. A 3-way + * merge preserves those additions if the generated source changes. + */ +/* TODO: introduce line-wrapping so that it never exceeds the limit. */ +/* jscs: disable maximumLineLength */ +'use strict'; + +var arguejs = require('arguejs'); +var configData = require('./metrics_service_v2_client_config'); +var extend = require('extend'); +var gax = require('google-gax'); + +var SERVICE_ADDRESS = 'logging.googleapis.com'; + +var DEFAULT_SERVICE_PORT = 443; + +var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; + +var DEFAULT_TIMEOUT = 30; + +var PAGE_DESCRIPTORS = { + listLogMetrics: new gax.PageDescriptor( + 'page_token', + 'next_page_token', + 'metrics') +}; + +/** + * The scopes needed to make gRPC calls to all of the methods defined in + * this service. + */ +var ALL_SCOPES = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write' +]; + +/** + * Service for configuring logs-based metrics. + * + * This will be created through a builder function which can be obtained by the module. + * See the following example of how to initialize the module and how to access to the builder. + * @see {@link metricsServiceV2Api} + * + * @example + * var loggingV2 = require('@google-cloud/logging').v2({ + * // optional auth parameters. + * }); + * var api = loggingV2.metricsServiceV2Api(); + * + * @class + */ +function MetricsServiceV2Api(gaxGrpc, grpcClient, opts) { + opts = opts || {}; + var servicePath = opts.servicePath || SERVICE_ADDRESS; + var port = opts.port || DEFAULT_SERVICE_PORT; + var sslCreds = opts.sslCreds || null; + var clientConfig = opts.clientConfig || {}; + var timeout = opts.timeout || DEFAULT_TIMEOUT; + var appName = opts.appName || 'gax'; + var appVersion = opts.appVersion || gax.Version; + + var googleApiClient = [ + appName + '/' + appVersion, + CODE_GEN_NAME_VERSION, + 'nodejs/' + process.version].join(' '); + + var defaults = gaxGrpc.constructSettings( + 'google.logging.v2.MetricsServiceV2', + configData, + clientConfig, + timeout, + PAGE_DESCRIPTORS, + null, + {'x-goog-api-client': googleApiClient}); + + var stub = gaxGrpc.createStub( + servicePath, + port, + grpcClient.google.logging.v2.MetricsServiceV2, + {sslCreds: sslCreds}); + var methods = [ + 'listLogMetrics', + 'getLogMetric', + 'createLogMetric', + 'updateLogMetric', + 'deleteLogMetric' + ]; + methods.forEach(function(methodName) { + this['_' + methodName] = gax.createApiCall( + stub.then(function(stub) { return stub[methodName].bind(stub); }), + defaults[methodName]); + }.bind(this)); +} + +// Path templates + +var PARENT_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}'); + +var METRIC_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}/metrics/{metric}'); + +/** + * Returns a fully-qualified parent resource name string. + * @param {String} project + * @returns {String} + */ +MetricsServiceV2Api.prototype.parentPath = function parentPath(project) { + return PARENT_PATH_TEMPLATE.render({ + project: project + }); +}; + +/** + * Parses the parentName from a parent resource. + * @param {String} parentName + * A fully-qualified path representing a parent resources. + * @returns {String} - A string representing the project. + */ +MetricsServiceV2Api.prototype.matchProjectFromParentName = + function matchProjectFromParentName(parentName) { + return PARENT_PATH_TEMPLATE.match(parentName).project; +}; + +/** + * Returns a fully-qualified metric resource name string. + * @param {String} project + * @param {String} metric + * @returns {String} + */ +MetricsServiceV2Api.prototype.metricPath = function metricPath(project, metric) { + return METRIC_PATH_TEMPLATE.render({ + project: project, + metric: metric + }); +}; + +/** + * Parses the metricName from a metric resource. + * @param {String} metricName + * A fully-qualified path representing a metric resources. + * @returns {String} - A string representing the project. + */ +MetricsServiceV2Api.prototype.matchProjectFromMetricName = + function matchProjectFromMetricName(metricName) { + return METRIC_PATH_TEMPLATE.match(metricName).project; +}; + +/** + * Parses the metricName from a metric resource. + * @param {String} metricName + * A fully-qualified path representing a metric resources. + * @returns {String} - A string representing the metric. + */ +MetricsServiceV2Api.prototype.matchMetricFromMetricName = + function matchMetricFromMetricName(metricName) { + return METRIC_PATH_TEMPLATE.match(metricName).metric; +}; + +// Service calls + +/** + * Lists logs-based metrics. + * + * @param {string} parent + * Required. The resource name containing the metrics. + * Example: `"projects/my-project-id"`. + * @param {Object=} otherArgs + * @param {number=} otherArgs.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @returns {Stream} + * An object stream. By default, this emits an object representing + * [LogMetric]{@link LogMetric} on 'data' event. + * This object can also be configured to emit + * pages of the responses through the options parameter. + * + * @example + * + * var api = loggingV2.metricsServiceV2Api(); + * var formattedParent = api.parentPath("[PROJECT]"); + * api.listLogMetrics(formattedParent).on('data', function(element) { + * // doThingsWith(element) + * }); + */ +MetricsServiceV2Api.prototype.listLogMetrics = function listLogMetrics() { + var args = arguejs({ + parent: String, + otherArgs: [Object, {}], + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + parent: args.parent + }; + if ('pageSize' in args.otherArgs) { + req.page_size = args.otherArgs.pageSize; + } + return this._listLogMetrics(req, args.options, args.callback); +}; + +/** + * Gets a logs-based metric. + * + * @param {string} metricName + * The resource name of the desired metric. + * Example: `"projects/my-project-id/metrics/my-metric-id"`. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.metricsServiceV2Api(); + * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); + * api.getLogMetric(formattedMetricName, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +MetricsServiceV2Api.prototype.getLogMetric = function getLogMetric() { + var args = arguejs({ + metricName: String, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + metric_name: args.metricName + }; + return this._getLogMetric(req, args.options, args.callback); +}; + +/** + * Creates a logs-based metric. + * + * @param {string} parent + * The resource name of the project in which to create the metric. + * Example: `"projects/my-project-id"`. + * + * The new metric must be provided in the request. + * @param {Object} metric + * The new logs-based metric, which must not have an identifier that + * already exists. + * + * This object should have the same structure as [LogMetric]{@link LogMetric} + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.metricsServiceV2Api(); + * var formattedParent = api.parentPath("[PROJECT]"); + * var metric = {}; + * api.createLogMetric(formattedParent, metric, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +MetricsServiceV2Api.prototype.createLogMetric = function createLogMetric() { + var args = arguejs({ + parent: String, + metric: Object, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + parent: args.parent, + metric: args.metric + }; + return this._createLogMetric(req, args.options, args.callback); +}; + +/** + * Creates or updates a logs-based metric. + * + * @param {string} metricName + * The resource name of the metric to update. + * Example: `"projects/my-project-id/metrics/my-metric-id"`. + * + * The updated metric must be provided in the request and have the + * same identifier that is specified in `metricName`. + * If the metric does not exist, it is created. + * @param {Object} metric + * The updated metric, whose name must be the same as the + * metric identifier in `metricName`. If `metricName` does not + * exist, then a new metric is created. + * + * This object should have the same structure as [LogMetric]{@link LogMetric} + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.metricsServiceV2Api(); + * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); + * var metric = {}; + * api.updateLogMetric(formattedMetricName, metric, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +MetricsServiceV2Api.prototype.updateLogMetric = function updateLogMetric() { + var args = arguejs({ + metricName: String, + metric: Object, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + metric_name: args.metricName, + metric: args.metric + }; + return this._updateLogMetric(req, args.options, args.callback); +}; + +/** + * Deletes a logs-based metric. + * + * @param {string} metricName + * The resource name of the metric to delete. + * Example: `"projects/my-project-id/metrics/my-metric-id"`. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = loggingV2.metricsServiceV2Api(); + * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); + * api.deleteLogMetric(formattedMetricName, function(err) { + * if (err) { + * console.error(err); + * } + * }); + */ +MetricsServiceV2Api.prototype.deleteLogMetric = function deleteLogMetric() { + var args = arguejs({ + metricName: String, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + metric_name: args.metricName + }; + return this._deleteLogMetric(req, args.options, args.callback); +}; + +function MetricsServiceV2ApiBuilder(gaxGrpc) { + if (!(this instanceof MetricsServiceV2ApiBuilder)) { + return new MetricsServiceV2ApiBuilder(gaxGrpc); + } + + var grpcClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/logging/v2/logging_metrics.proto' + }]); + extend(this, grpcClient.google.logging.v2); + + /** + * Build a new instance of {@link MetricsServiceV2Api}. + * + * @param {Object=} opts - The optional parameters. + * @param {String=} opts.servicePath + * The domain name of the API remote host. + * @param {number=} opts.port + * The port on which to connect to the remote host. + * @param {grpc.ClientCredentials=} opts.sslCreds + * A ClientCredentials for use with an SSL-enabled channel. + * @param {Object=} opts.clientConfig + * The customized config to build the call settings. See + * {@link gax.constructSettings} for the format. + * @param {number=} opts.timeout + * The default timeout, in seconds, for calls made through this client. + * @param {number=} opts.appName + * The codename of the calling service. + * @param {String=} opts.appVersion + * The version of the calling service. + */ + this.metricsServiceV2Api = function(opts) { + return new MetricsServiceV2Api(gaxGrpc, grpcClient, opts); + }; + extend(this.metricsServiceV2Api, MetricsServiceV2Api); +} +module.exports = MetricsServiceV2ApiBuilder; +module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json new file mode 100644 index 00000000000..0400cb5bb63 --- /dev/null +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -0,0 +1,53 @@ +{ + "interfaces": { + "google.logging.v2.MetricsServiceV2": { + "retry_codes": { + "retry_codes_def": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + } + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.2, + "max_retry_delay_millis": 1000, + "initial_rpc_timeout_millis": 2000, + "rpc_timeout_multiplier": 1.5, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 45000 + } + }, + "methods": { + "ListLogMetrics": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetLogMetric": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateLogMetric": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateLogMetric": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteLogMetric": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} From f5f538fbace5a11531131d2c9e6894d80eabf8fe Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 2 Sep 2016 11:12:29 -0400 Subject: [PATCH 0013/1029] logging: fix examples (#1562) --- handwritten/logging/src/log.js | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 8c695de8bd9..326dbc13f52 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -134,8 +134,8 @@ Log.formatName_ = function(projectId, name) { * the same as documented there. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.alert(entry, function(err, apiResponse) {}); @@ -151,8 +151,8 @@ Log.prototype.alert = function(entry, options, callback) { * the same as documented there. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.critical(entry, function(err, apiResponse) {}); @@ -169,8 +169,8 @@ Log.prototype.critical = function(entry, options, callback) { * the same as documented there. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.debug(entry, function(err, apiResponse) {}); @@ -186,8 +186,8 @@ Log.prototype.debug = function(entry, options, callback) { * the same as documented there. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.emergency(entry, function(err, apiResponse) {}); @@ -253,8 +253,8 @@ Log.prototype.entry = function(resource, data) { * the same as documented there. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.error(entry, function(err, apiResponse) {}); @@ -353,8 +353,8 @@ Log.prototype.getEntries = function(options, callback) { * the same as documented there. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.info(entry, function(err, apiResponse) {}); @@ -370,8 +370,8 @@ Log.prototype.info = function(entry, options, callback) { * the same as documented there. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.notice(entry, function(err, apiResponse) {}); @@ -387,8 +387,8 @@ Log.prototype.notice = function(entry, options, callback) { * the same as documented there. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.warning(entry, function(err, apiResponse) {}); @@ -416,8 +416,8 @@ Log.prototype.warning = function(entry, options, callback) { * @param {object} callback.apiResponse - The full API response. * * @example - * var entry = log.entry('compute.googleapis.com', { - * user: 'my_username' + * var entry = log.entry('gce_instance', { + * instance: 'my_instance' * }); * * log.write(entry, function(err, apiResponse) { From 81eb77fc234323f04257034d91a2ff7ed27bbfd6 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 6 Sep 2016 10:15:14 -0400 Subject: [PATCH 0014/1029] docs: remove `nextQuery` docs & annotate arrays correctly (#1559) --- handwritten/logging/src/index.js | 2 -- handwritten/logging/src/log.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 5153d3eaf28..bf30ff11853 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -255,8 +255,6 @@ Logging.prototype.entry = function(resource, data) { * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request. * @param {module:logging/entry[]} callback.entries - Entries from your logs. - * @param {?object} callback.nextQuery - If present, query with this object to - * check for more results. * @param {object} callback.apiResponse - The full API response. * * @example diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 326dbc13f52..4a826431f7b 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -286,8 +286,6 @@ Log.prototype.error = function(entry, options, callback) { * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request. * @param {module:logging/entry[]} callback.entries - Entries from this log. - * @param {?object} callback.nextQuery - If present, query with this object to - * check for more results. * @param {object} callback.apiResponse - The full API response. * * @example From 4b37bd68ca8dc21e7aaf0812cbe5a0475cec19d4 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 7 Sep 2016 12:54:34 -0400 Subject: [PATCH 0015/1029] logging: update dependencies --- handwritten/logging/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 876bccad0dd..fda811e8259 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -50,12 +50,12 @@ "logging" ], "dependencies": { - "@google-cloud/common": "^0.3.0", + "@google-cloud/common": "^0.4.0", "arguejs": "^0.2.3", "arrify": "^1.0.0", "extend": "^3.0.0", "google-gax": "^0.6.0", - "google-proto-files": "^0.2.1", + "google-proto-files": "^0.7.0", "is": "^3.0.1", "string-format-obj": "^1.0.0" }, @@ -63,7 +63,7 @@ "@google-cloud/bigquery": "*", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", - "async": "^1.4.2", + "async": "^2.0.1", "methmeth": "^1.0.0", "mocha": "^3.0.1", "node-uuid": "^1.4.3", From 8ae5f405455d0db762b7d933947ba4c2033ba15b Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 7 Sep 2016 12:55:12 -0400 Subject: [PATCH 0016/1029] logging @ 0.2.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fda811e8259..6083f1989c7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.1.1", + "version": "0.2.0", "author": "Google Inc.", "description": "Google Cloud Logging Client Library for Node.js", "contributors": [ From 2fc8b9d7a3ec68b0938fc1999d2e2f49866fd872 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Fri, 9 Sep 2016 10:01:29 -0700 Subject: [PATCH 0017/1029] Stackdriver product rename (#1580) --- handwritten/logging/README.md | 4 ++-- handwritten/logging/package.json | 6 ++++-- handwritten/logging/src/index.js | 31 ++++++++++++++----------------- handwritten/logging/src/log.js | 6 +++--- handwritten/logging/src/sink.js | 4 ++-- 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index a9752390e4b..214a8879e67 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -1,5 +1,5 @@ # @google-cloud/logging -> Google Cloud Logging Client Library for Node.js +> Stackdriver Logging Client Library for Node.js *Looking for more Google APIs than just Logging? You might want to check out [`google-cloud`][google-cloud].* @@ -76,7 +76,7 @@ If you are not running this client on Google Compute Engine, you need a Google D 1. Visit the [Google Developers Console][dev-console]. 2. Create a new project or click on an existing project. 3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services): - * Google Cloud Logging API + * Stackdriver Logging API 4. Navigate to **APIs & auth** > **Credentials** and then: * If you want to use a new service account, click on **Create new Client ID** and select **Service account**. After the account is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. * If you want to generate a new key for an existing service account, click on **Generate new JSON key** and download the JSON key file. diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6083f1989c7..148c9afb519 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -2,7 +2,7 @@ "name": "@google-cloud/logging", "version": "0.2.0", "author": "Google Inc.", - "description": "Google Cloud Logging Client Library for Node.js", + "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ { "name": "Burcu Dogan", @@ -47,7 +47,9 @@ "google cloud", "cloud", "google logging", - "logging" + "logging", + "stackdriver logging", + "stackdriver" ], "dependencies": { "@google-cloud/common": "^0.4.0", diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index bf30ff11853..d52885a3410 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -50,24 +50,20 @@ var PKG = require('../package.json'); /** *

- * **This is a Beta release of Google Cloud Logging.** This API is not covered + * **This is a Beta release of Stackdriver Logging.** This API is not covered * by any SLA or deprecation policy and may be subject to * backward-incompatible changes. *

* - * [Google Cloud Logging](https://cloud.google.com/logging/docs) collects and - * stores logs from applications and services on the Google Cloud Platform: - * - * - Export your logs to Google Cloud Storage, Google BigQuery, or Google - * Cloud Pub/Sub. - * - Integrate third-party logs from your virtual machine instances by - * installing the logging agent, `google-fluentd`. + * [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to + * store, search, analyze, monitor, and alert on log data and events from Google + * Cloud Platform and Amazon Web Services (AWS). * * @constructor * @alias module:logging - * @resource [What is Google Cloud Logging?]{@link https://cloud.google.com/logging/docs} - * @resource [Introduction to the Cloud Logging API]{@link https://cloud.google.com/logging/docs/api} + * @resource [What is Stackdriver Logging?]{@link https://cloud.google.com/logging/docs} + * @resource [Introduction to the Stackdriver Logging API]{@link https://cloud.google.com/logging/docs/api} * * @param {object} options - [Configuration object](#/docs). */ @@ -259,7 +255,7 @@ Logging.prototype.entry = function(resource, data) { * * @example * logging.getEntries(function(err, entries) { - * // `entries` is an array of Cloud Logging entry objects. + * // `entries` is an array of Stackdriver Logging entry objects. * // See the `data` property to read the data from the entry. * }); * @@ -284,7 +280,7 @@ Logging.prototype.entry = function(resource, data) { * logging.getEntries() * .on('error', console.error) * .on('data', function(entry) { - * // `entry` is a Cloud Logging entry object. + * // `entry` is a Stackdriver Logging entry object. * // See the `data` property to read the data from the entry. * }) * .on('end', function() { @@ -420,7 +416,7 @@ Logging.prototype.getSinks = function(options, callback) { }; /** - * Get a reference to a Cloud Logging log. + * Get a reference to a Stackdriver Logging log. * * @resource [Log Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs} * @@ -435,7 +431,7 @@ Logging.prototype.log = function(name) { }; /** - * Get a reference to a Cloud Logging sink. + * Get a reference to a Stackdriver Logging sink. * * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks} * @@ -451,7 +447,7 @@ Logging.prototype.sink = function(name) { /** * This method is called when creating a sink with a Bucket destination. The - * bucket must first grant proper ACL access to the Cloud Logging account. + * bucket must first grant proper ACL access to the Stackdriver Logging account. * * The parameters are the same as what {module:logging#createSink} accepts. * @@ -475,7 +471,8 @@ Logging.prototype.setAclForBucket_ = function(name, config, callback) { /** * This method is called when creating a sink with a Dataset destination. The - * dataset must first grant proper ACL access to the Cloud Logging account. + * dataset must first grant proper ACL access to the Stackdriver Logging + * account. * * The parameters are the same as what {module:logging#createSink} accepts. * @@ -519,7 +516,7 @@ Logging.prototype.setAclForDataset_ = function(name, config, callback) { /** * This method is called when creating a sink with a Topic destination. The - * topic must first grant proper ACL access to the Cloud Logging account. + * topic must first grant proper ACL access to the Stackdriver Logging account. * * The parameters are the same as what {module:logging#createSink} accepts. * diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 4a826431f7b..692e16c4147 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -290,7 +290,7 @@ Log.prototype.error = function(entry, options, callback) { * * @example * log.getEntries(function(err, entries) { - * // `entries` is an array of Cloud Logging entry objects. + * // `entries` is an array of Stackdriver Logging entry objects. * // See the `data` property to read the data from the entry. * }); * @@ -315,7 +315,7 @@ Log.prototype.error = function(entry, options, callback) { * log.getEntries() * .on('error', console.error) * .on('data', function(entry) { - * // `entry` is a Cloud Logging entry object. + * // `entry` is a Stackdriver Logging entry object. * // See the `data` property to read the data from the entry. * }) * .on('end', function() { @@ -396,7 +396,7 @@ Log.prototype.warning = function(entry, options, callback) { }; /** - * Write log entries to Cloud Logging. + * Write log entries to Stackdriver Logging. * * While you may write a single entry at a time, batching multiple entries * together is preferred to avoid reaching the queries per second limit. diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 0f547cbe9ce..f7d1d839fc9 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -30,8 +30,8 @@ var util = require('util'); */ /** * A sink is an object that lets you to specify a set of log entries to export - * to a particular destination. Cloud Logging lets you export log entries to - * destinations including Google Cloud Storage buckets (for long term log + * to a particular destination. Stackdriver Logging lets you export log entries + * to destinations including Google Cloud Storage buckets (for long term log * storage), Google BigQuery datasets (for log analysis), Google Pub/Sub (for * streaming to other applications). * From e6182a3c4432a1fffb2b1a05f4dca41f60bfe2f0 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 9 Sep 2016 15:19:15 -0400 Subject: [PATCH 0018/1029] all modules: ensure all User-Agents are set (#1568) --- handwritten/logging/package.json | 2 +- handwritten/logging/src/index.js | 4 +--- handwritten/logging/test/index.js | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 148c9afb519..2137fcc173e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "stackdriver" ], "dependencies": { - "@google-cloud/common": "^0.4.0", + "@google-cloud/common": "^0.5.0", "arguejs": "^0.2.3", "arrify": "^1.0.0", "extend": "^3.0.0", diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index d52885a3410..c20563681cd 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -46,8 +46,6 @@ var Log = require('./log.js'); */ var Sink = require('./sink.js'); -var PKG = require('../package.json'); - /** *

* **This is a Beta release of Stackdriver Logging.** This API is not covered @@ -85,7 +83,7 @@ function Logging(options) { scopes: [ 'https://www.googleapis.com/auth/cloud-platform' ], - userAgent: PKG.name + '/' + PKG.version + packageJson: require('../package.json') }; common.GrpcService.call(this, config, options); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 215a88c3ab0..a5cacbd4123 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -23,8 +23,6 @@ var googleProtoFiles = require('google-proto-files'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; -var PKG = require('../package.json'); - var extended = false; var fakeStreamRouter = { extend: function(Class, methods) { @@ -147,7 +145,7 @@ describe('Logging', function() { assert.deepEqual(calledWith.scopes, [ 'https://www.googleapis.com/auth/cloud-platform' ]); - assert.strictEqual(calledWith.userAgent, PKG.name + '/' + PKG.version); + assert.deepEqual(calledWith.packageJson, require('../package.json')); }); }); From c9663a186e915d10a9cf66d06eec838af6f1a5d5 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 26 Sep 2016 17:08:31 -0400 Subject: [PATCH 0019/1029] maintenance: add auto-updating of npm packages (#1626) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2137fcc173e..2f2dd738815 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "arrify": "^1.0.0", "extend": "^3.0.0", "google-gax": "^0.6.0", - "google-proto-files": "^0.7.0", + "google-proto-files": "^0.8.0", "is": "^3.0.1", "string-format-obj": "^1.0.0" }, From d654af3d314bd4529dcd52dceb5e9c3ac42aa37a Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 26 Sep 2016 18:55:38 -0400 Subject: [PATCH 0020/1029] all: update @google-cloud/common dependency --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2f2dd738815..01c81976e64 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "stackdriver" ], "dependencies": { - "@google-cloud/common": "^0.5.0", + "@google-cloud/common": "^0.6.0", "arguejs": "^0.2.3", "arrify": "^1.0.0", "extend": "^3.0.0", From 2050a86a02e81964e61ad96f17d0dba3229a99e3 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 26 Sep 2016 18:57:54 -0400 Subject: [PATCH 0021/1029] logging @ 0.3.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 01c81976e64..8b5646f9b66 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.2.0", + "version": "0.3.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 475c0f1058bf4e5a3103703e906d3bbab748fa07 Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Wed, 28 Sep 2016 05:06:33 -0700 Subject: [PATCH 0022/1029] Regenerate the codegen files to sync with the latest version. (#1640) --- handwritten/logging/package.json | 3 +- .../logging/src/v2/config_service_v2_api.js | 254 ++++++++------ .../logging/src/v2/logging_service_v2_api.js | 327 +++++++++++------- .../logging/src/v2/metrics_service_v2_api.js | 222 +++++++----- 4 files changed, 492 insertions(+), 314 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8b5646f9b66..e3f6e1d948b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -53,10 +53,9 @@ ], "dependencies": { "@google-cloud/common": "^0.6.0", - "arguejs": "^0.2.3", "arrify": "^1.0.0", "extend": "^3.0.0", - "google-gax": "^0.6.0", + "google-gax": "^0.7.0", "google-proto-files": "^0.8.0", "is": "^3.0.1", "string-format-obj": "^1.0.0" diff --git a/handwritten/logging/src/v2/config_service_v2_api.js b/handwritten/logging/src/v2/config_service_v2_api.js index 2c0648a50c6..a6e8a921296 100644 --- a/handwritten/logging/src/v2/config_service_v2_api.js +++ b/handwritten/logging/src/v2/config_service_v2_api.js @@ -27,7 +27,6 @@ /* jscs: disable maximumLineLength */ 'use strict'; -var arguejs = require('arguejs'); var configData = require('./config_service_v2_client_config'); var extend = require('extend'); var gax = require('google-gax'); @@ -38,12 +37,11 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; -var DEFAULT_TIMEOUT = 30; var PAGE_DESCRIPTORS = { listSinks: new gax.PageDescriptor( - 'page_token', - 'next_page_token', + 'pageToken', + 'nextPageToken', 'sinks') }; @@ -75,46 +73,47 @@ var ALL_SCOPES = [ * * @class */ -function ConfigServiceV2Api(gaxGrpc, grpcClient, opts) { +function ConfigServiceV2Api(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; var sslCreds = opts.sslCreds || null; var clientConfig = opts.clientConfig || {}; - var timeout = opts.timeout || DEFAULT_TIMEOUT; var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.Version; + var appVersion = opts.appVersion || gax.version; var googleApiClient = [ appName + '/' + appVersion, CODE_GEN_NAME_VERSION, + 'gax/' + gax.version, 'nodejs/' + process.version].join(' '); var defaults = gaxGrpc.constructSettings( 'google.logging.v2.ConfigServiceV2', configData, clientConfig, - timeout, PAGE_DESCRIPTORS, null, {'x-goog-api-client': googleApiClient}); - var stub = gaxGrpc.createStub( + var configServiceV2Stub = gaxGrpc.createStub( servicePath, port, - grpcClient.google.logging.v2.ConfigServiceV2, + grpcClients.configServiceV2Client.google.logging.v2.ConfigServiceV2, {sslCreds: sslCreds}); - var methods = [ + var configServiceV2StubMethods = [ 'listSinks', 'getSink', 'createSink', 'updateSink', 'deleteSink' ]; - methods.forEach(function(methodName) { + configServiceV2StubMethods.forEach(function(methodName) { this['_' + methodName] = gax.createApiCall( - stub.then(function(stub) { return stub[methodName].bind(stub); }), - defaults[methodName]); + configServiceV2Stub.then(function(configServiceV2Stub) { + return configServiceV2Stub[methodName].bind(configServiceV2Stub); + }), + defaults[methodName]); }.bind(this)); } @@ -189,57 +188,84 @@ ConfigServiceV2Api.prototype.matchSinkFromSinkName = * Lists sinks. * * @param {string} parent - * Required. The resource name containing the sinks. + * Required. The cloud resource containing the sinks. * Example: `"projects/my-logging-project"`. - * @param {Object=} otherArgs - * @param {number=} otherArgs.pageSize + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * + * In addition, options may contain the following optional parameters. + * @param {number=} options.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. - * @returns {Stream} - * An object stream. By default, this emits an object representing + * + * @param {function(?Error, ?Object, ?string)=} callback + * When specified, the results are not streamed but this callback + * will be called with the response object representing [ListSinksResponse]{@link ListSinksResponse}. + * The third item will be set if the response contains the token for the further results + * and can be reused to `pageToken` field in the options in the next request. + * @returns {Stream|gax.EventEmitter} + * An object stream which emits an object representing * [LogSink]{@link LogSink} on 'data' event. - * This object can also be configured to emit - * pages of the responses through the options parameter. + * When the callback is specified or streaming is suppressed through options, + * it will return an event emitter to handle the call status and the callback + * will be called with the response object. * * @example * * var api = loggingV2.configServiceV2Api(); * var formattedParent = api.parentPath("[PROJECT]"); + * // Iterate over all elements. * api.listSinks(formattedParent).on('data', function(element) { * // doThingsWith(element) * }); + * + * // Or obtain the paged response through the callback. + * function callback(err, response, nextPageToken) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * if (nextPageToken) { + * // fetch the next page. + * api.listSinks(formattedParent, {pageToken: nextPageToken}, callback); + * } + * } + * api.listSinks(formattedParent, {flattenPages: false}, callback); */ -ConfigServiceV2Api.prototype.listSinks = function listSinks() { - var args = arguejs({ - parent: String, - otherArgs: [Object, {}], - options: [gax.CallOptions], - callback: [Function] - }, arguments); +ConfigServiceV2Api.prototype.listSinks = function listSinks( + parent, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - parent: args.parent + parent: parent }; - if ('pageSize' in args.otherArgs) { - req.page_size = args.otherArgs.pageSize; + if ('pageSize' in options) { + req.pageSize = options.pageSize; } - return this._listSinks(req, args.options, args.callback); + return this._listSinks(req, options, callback); }; /** * Gets a sink. * * @param {string} sinkName - * The resource name of the sink to return. + * Required. The resource name of the sink to return. * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * @@ -259,34 +285,38 @@ ConfigServiceV2Api.prototype.listSinks = function listSinks() { * // doThingsWith(response) * }); */ -ConfigServiceV2Api.prototype.getSink = function getSink() { - var args = arguejs({ - sinkName: String, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +ConfigServiceV2Api.prototype.getSink = function getSink( + sinkName, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - sink_name: args.sinkName + sinkName: sinkName }; - return this._getSink(req, args.options, args.callback); + return this._getSink(req, options, callback); }; /** * Creates a sink. * * @param {string} parent - * The resource in which to create the sink. + * Required. The resource in which to create the sink. * Example: `"projects/my-project-id"`. - * * The new sink must be provided in the request. * @param {Object} sink - * The new sink, which must not have an identifier that already - * exists. + * Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. * * This object should have the same structure as [LogSink]{@link LogSink} - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * @@ -307,39 +337,41 @@ ConfigServiceV2Api.prototype.getSink = function getSink() { * // doThingsWith(response) * }); */ -ConfigServiceV2Api.prototype.createSink = function createSink() { - var args = arguejs({ - parent: String, - sink: Object, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +ConfigServiceV2Api.prototype.createSink = function createSink( + parent, + sink, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - parent: args.parent, - sink: args.sink + parent: parent, + sink: sink }; - return this._createSink(req, args.options, args.callback); + return this._createSink(req, options, callback); }; /** - * Creates or updates a sink. + * Updates or creates a sink. * * @param {string} sinkName - * The resource name of the sink to update. - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * - * The updated sink must be provided in the request and have the - * same name that is specified in `sinkName`. If the sink does not - * exist, it is created. + * Required. The resource name of the sink to update, including the parent + * resource and the sink identifier. If the sink does not exist, this method + * creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} sink - * The updated sink, whose name must be the same as the sink - * identifier in `sinkName`. If `sinkName` does not exist, then + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sinkName`. If `sinkName` does not exist, then * this method creates a new sink. * * This object should have the same structure as [LogSink]{@link LogSink} - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * @@ -360,29 +392,36 @@ ConfigServiceV2Api.prototype.createSink = function createSink() { * // doThingsWith(response) * }); */ -ConfigServiceV2Api.prototype.updateSink = function updateSink() { - var args = arguejs({ - sinkName: String, - sink: Object, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +ConfigServiceV2Api.prototype.updateSink = function updateSink( + sinkName, + sink, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - sink_name: args.sinkName, - sink: args.sink + sinkName: sinkName, + sink: sink }; - return this._updateSink(req, args.options, args.callback); + return this._updateSink(req, options, callback); }; /** * Deletes a sink. * * @param {string} sinkName - * The resource name of the sink to delete. - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * Required. The resource name of the sink to delete, including the parent + * resource and the sink identifier. Example: + * `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink + * does not exist. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. * @returns {gax.EventEmitter} - the event emitter to handle the call @@ -398,16 +437,21 @@ ConfigServiceV2Api.prototype.updateSink = function updateSink() { * } * }); */ -ConfigServiceV2Api.prototype.deleteSink = function deleteSink() { - var args = arguejs({ - sinkName: String, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +ConfigServiceV2Api.prototype.deleteSink = function deleteSink( + sinkName, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - sink_name: args.sinkName + sinkName: sinkName }; - return this._deleteSink(req, args.options, args.callback); + return this._deleteSink(req, options, callback); }; function ConfigServiceV2ApiBuilder(gaxGrpc) { @@ -415,11 +459,15 @@ function ConfigServiceV2ApiBuilder(gaxGrpc) { return new ConfigServiceV2ApiBuilder(gaxGrpc); } - var grpcClient = gaxGrpc.load([{ + var configServiceV2Client = gaxGrpc.load([{ root: require('google-proto-files')('..'), file: 'google/logging/v2/logging_config.proto' }]); - extend(this, grpcClient.google.logging.v2); + extend(this, configServiceV2Client.google.logging.v2); + + var grpcClients = { + configServiceV2Client: configServiceV2Client + }; /** * Build a new instance of {@link ConfigServiceV2Api}. @@ -434,15 +482,13 @@ function ConfigServiceV2ApiBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.timeout - * The default timeout, in seconds, for calls made through this client. * @param {number=} opts.appName * The codename of the calling service. * @param {String=} opts.appVersion * The version of the calling service. */ this.configServiceV2Api = function(opts) { - return new ConfigServiceV2Api(gaxGrpc, grpcClient, opts); + return new ConfigServiceV2Api(gaxGrpc, grpcClients, opts); }; extend(this.configServiceV2Api, ConfigServiceV2Api); } diff --git a/handwritten/logging/src/v2/logging_service_v2_api.js b/handwritten/logging/src/v2/logging_service_v2_api.js index f233264f82f..919cbb245bf 100644 --- a/handwritten/logging/src/v2/logging_service_v2_api.js +++ b/handwritten/logging/src/v2/logging_service_v2_api.js @@ -27,7 +27,6 @@ /* jscs: disable maximumLineLength */ 'use strict'; -var arguejs = require('arguejs'); var configData = require('./logging_service_v2_client_config'); var extend = require('extend'); var gax = require('google-gax'); @@ -38,17 +37,16 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; -var DEFAULT_TIMEOUT = 30; var PAGE_DESCRIPTORS = { listLogEntries: new gax.PageDescriptor( - 'page_token', - 'next_page_token', + 'pageToken', + 'nextPageToken', 'entries'), listMonitoredResourceDescriptors: new gax.PageDescriptor( - 'page_token', - 'next_page_token', - 'resource_descriptors') + 'pageToken', + 'nextPageToken', + 'resourceDescriptors') }; /** @@ -78,45 +76,46 @@ var ALL_SCOPES = [ * * @class */ -function LoggingServiceV2Api(gaxGrpc, grpcClient, opts) { +function LoggingServiceV2Api(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; var sslCreds = opts.sslCreds || null; var clientConfig = opts.clientConfig || {}; - var timeout = opts.timeout || DEFAULT_TIMEOUT; var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.Version; + var appVersion = opts.appVersion || gax.version; var googleApiClient = [ appName + '/' + appVersion, CODE_GEN_NAME_VERSION, + 'gax/' + gax.version, 'nodejs/' + process.version].join(' '); var defaults = gaxGrpc.constructSettings( 'google.logging.v2.LoggingServiceV2', configData, clientConfig, - timeout, PAGE_DESCRIPTORS, null, {'x-goog-api-client': googleApiClient}); - var stub = gaxGrpc.createStub( + var loggingServiceV2Stub = gaxGrpc.createStub( servicePath, port, - grpcClient.google.logging.v2.LoggingServiceV2, + grpcClients.loggingServiceV2Client.google.logging.v2.LoggingServiceV2, {sslCreds: sslCreds}); - var methods = [ + var loggingServiceV2StubMethods = [ 'deleteLog', 'writeLogEntries', 'listLogEntries', 'listMonitoredResourceDescriptors' ]; - methods.forEach(function(methodName) { + loggingServiceV2StubMethods.forEach(function(methodName) { this['_' + methodName] = gax.createApiCall( - stub.then(function(stub) { return stub[methodName].bind(stub); }), - defaults[methodName]); + loggingServiceV2Stub.then(function(loggingServiceV2Stub) { + return loggingServiceV2Stub[methodName].bind(loggingServiceV2Stub); + }), + defaults[methodName]); }.bind(this)); } @@ -194,9 +193,9 @@ LoggingServiceV2Api.prototype.matchLogFromLogName = * @param {string} logName * Required. The resource name of the log to delete. Example: * `"projects/my-project/logs/syslog"`. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. * @returns {gax.EventEmitter} - the event emitter to handle the call @@ -212,16 +211,21 @@ LoggingServiceV2Api.prototype.matchLogFromLogName = * } * }); */ -LoggingServiceV2Api.prototype.deleteLog = function deleteLog() { - var args = arguejs({ - logName: String, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +LoggingServiceV2Api.prototype.deleteLog = function deleteLog( + logName, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - log_name: args.logName + logName: logName }; - return this._deleteLog(req, args.options, args.callback); + return this._deleteLog(req, options, callback); }; /** @@ -229,39 +233,50 @@ LoggingServiceV2Api.prototype.deleteLog = function deleteLog() { * written by this method. * * @param {Object[]} entries - * Required. The log entries to write. The log entries must have values for - * all required fields. + * 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`, use this field to write multiple log entries at once - * rather than // calling this method for each log entry. + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/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. * * This object should have the same structure as [LogEntry]{@link LogEntry} - * @param {Object=} otherArgs - * @param {string=} otherArgs.logName - * Optional. A default log resource name for those log entries in `entries` - * that do not specify their own `logName`. Example: + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * + * In addition, options may contain the following optional parameters. + * @param {string=} options.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`. Example: * `"projects/my-project/logs/syslog"`. See * {@link LogEntry}. - * @param {Object=} otherArgs.resource - * Optional. A default monitored resource for those log entries in `entries` - * that do not specify their own `resource`. + * @param {Object=} options.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 {@link LogEntry}. * * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} - * @param {Object.=} otherArgs.labels - * Optional. User-defined `key:value` items that are added to - * the `labels` field of each log entry in `entries`, except when a log - * entry specifies its own `key:value` item with the same key. - * Example: `{ "size": "large", "color":"red" }` - * @param {boolean=} otherArgs.partialSuccess + * @param {Object.=} options.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 {@link LogEntry}. + * @param {boolean=} options.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. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * @@ -281,29 +296,33 @@ LoggingServiceV2Api.prototype.deleteLog = function deleteLog() { * // doThingsWith(response) * }); */ -LoggingServiceV2Api.prototype.writeLogEntries = function writeLogEntries() { - var args = arguejs({ - entries: Array, - otherArgs: [Object, {}], - options: [gax.CallOptions], - callback: [Function] - }, arguments); +LoggingServiceV2Api.prototype.writeLogEntries = function writeLogEntries( + entries, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - entries: args.entries + entries: entries }; - if ('logName' in args.otherArgs) { - req.log_name = args.otherArgs.logName; + if ('logName' in options) { + req.logName = options.logName; } - if ('resource' in args.otherArgs) { - req.resource = args.otherArgs.resource; + if ('resource' in options) { + req.resource = options.resource; } - if ('labels' in args.otherArgs) { - req.labels = args.otherArgs.labels; + if ('labels' in options) { + req.labels = options.labels; } - if ('partialSuccess' in args.otherArgs) { - req.partial_success = args.otherArgs.partialSuccess; + if ('partialSuccess' in options) { + req.partialSuccess = options.partialSuccess; } - return this._writeLogEntries(req, args.options, args.callback); + return this._writeLogEntries(req, options, callback); }; /** @@ -312,105 +331,169 @@ LoggingServiceV2Api.prototype.writeLogEntries = function writeLogEntries() { * [Exporting Logs](https://cloud.google.com/logging/docs/export). * * @param {string[]} projectIds - * Required. One or more project IDs or project numbers from which to retrieve - * log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`. - * @param {Object=} otherArgs - * @param {string=} otherArgs.filter - * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). - * The filter is compared against all log entries in the projects specified by - * `projectIds`. Only entries that match the filter are retrieved. An empty - * filter matches all log entries. - * @param {string=} otherArgs.orderBy + * Deprecated. One or more project identifiers or project numbers from which + * to retrieve log entries. Examples: `"my-project-1A"`, `"1234567890"`. If + * present, these project identifiers are converted to resource format and + * added to the list of resources in `resourceNames`. Callers should use + * `resourceNames` rather than this parameter. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * + * In addition, options may contain the following optional parameters. + * @param {string[]=} options.resourceNames + * Optional. One or more cloud resources from which to retrieve log entries. + * Example: `"projects/my-project-1A"`, `"projects/1234567890"`. Projects + * listed in `projectIds` are added to this list. + * @param {string=} options.filter + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that + * match the filter are returned. An empty filter matches all log entries. + * @param {string=} options.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`. - * @param {number=} otherArgs.pageSize + * @param {number=} options.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. - * @returns {Stream} - * An object stream. By default, this emits an object representing + * + * @param {function(?Error, ?Object, ?string)=} callback + * When specified, the results are not streamed but this callback + * will be called with the response object representing [ListLogEntriesResponse]{@link ListLogEntriesResponse}. + * The third item will be set if the response contains the token for the further results + * and can be reused to `pageToken` field in the options in the next request. + * @returns {Stream|gax.EventEmitter} + * An object stream which emits an object representing * [LogEntry]{@link LogEntry} on 'data' event. - * This object can also be configured to emit - * pages of the responses through the options parameter. + * When the callback is specified or streaming is suppressed through options, + * it will return an event emitter to handle the call status and the callback + * will be called with the response object. * * @example * * var api = loggingV2.loggingServiceV2Api(); * var projectIds = []; + * // Iterate over all elements. * api.listLogEntries(projectIds).on('data', function(element) { * // doThingsWith(element) * }); + * + * // Or obtain the paged response through the callback. + * function callback(err, response, nextPageToken) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * if (nextPageToken) { + * // fetch the next page. + * api.listLogEntries(projectIds, {pageToken: nextPageToken}, callback); + * } + * } + * api.listLogEntries(projectIds, {flattenPages: false}, callback); */ -LoggingServiceV2Api.prototype.listLogEntries = function listLogEntries() { - var args = arguejs({ - projectIds: Array, - otherArgs: [Object, {}], - options: [gax.CallOptions], - callback: [Function] - }, arguments); +LoggingServiceV2Api.prototype.listLogEntries = function listLogEntries( + projectIds, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - project_ids: args.projectIds + projectIds: projectIds }; - if ('filter' in args.otherArgs) { - req.filter = args.otherArgs.filter; + if ('resourceNames' in options) { + req.resourceNames = options.resourceNames; } - if ('orderBy' in args.otherArgs) { - req.order_by = args.otherArgs.orderBy; + if ('filter' in options) { + req.filter = options.filter; } - if ('pageSize' in args.otherArgs) { - req.page_size = args.otherArgs.pageSize; + if ('orderBy' in options) { + req.orderBy = options.orderBy; } - return this._listLogEntries(req, args.options, args.callback); + if ('pageSize' in options) { + req.pageSize = options.pageSize; + } + return this._listLogEntries(req, options, callback); }; /** * Lists the monitored resource descriptors used by Stackdriver Logging. * - * @param {Object=} otherArgs - * @param {number=} otherArgs.pageSize + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * + * In addition, options may contain the following optional parameters. + * @param {number=} options.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. - * @returns {Stream} - * An object stream. By default, this emits an object representing + * + * @param {function(?Error, ?Object, ?string)=} callback + * When specified, the results are not streamed but this callback + * will be called with the response object representing [ListMonitoredResourceDescriptorsResponse]{@link ListMonitoredResourceDescriptorsResponse}. + * The third item will be set if the response contains the token for the further results + * and can be reused to `pageToken` field in the options in the next request. + * @returns {Stream|gax.EventEmitter} + * An object stream which emits an object representing * [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} on 'data' event. - * This object can also be configured to emit - * pages of the responses through the options parameter. + * When the callback is specified or streaming is suppressed through options, + * it will return an event emitter to handle the call status and the callback + * will be called with the response object. * * @example * * var api = loggingV2.loggingServiceV2Api(); * + * // Iterate over all elements. * api.listMonitoredResourceDescriptors().on('data', function(element) { * // doThingsWith(element) * }); + * + * // Or obtain the paged response through the callback. + * function callback(err, response, nextPageToken) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * if (nextPageToken) { + * // fetch the next page. + * api.listMonitoredResourceDescriptors({pageToken: nextPageToken}, callback); + * } + * } + * api.listMonitoredResourceDescriptors({flattenPages: false}, callback); + * api.listMonitoredResourceDescriptors(function(err, response) { */ -LoggingServiceV2Api.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors() { - var args = arguejs({ - otherArgs: [Object, {}], - options: [gax.CallOptions], - callback: [Function] - }, arguments); +LoggingServiceV2Api.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors( + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { }; - if ('pageSize' in args.otherArgs) { - req.page_size = args.otherArgs.pageSize; + if ('pageSize' in options) { + req.pageSize = options.pageSize; } - return this._listMonitoredResourceDescriptors(req, args.options, args.callback); + return this._listMonitoredResourceDescriptors(req, options, callback); }; function LoggingServiceV2ApiBuilder(gaxGrpc) { @@ -418,11 +501,15 @@ function LoggingServiceV2ApiBuilder(gaxGrpc) { return new LoggingServiceV2ApiBuilder(gaxGrpc); } - var grpcClient = gaxGrpc.load([{ + var loggingServiceV2Client = gaxGrpc.load([{ root: require('google-proto-files')('..'), file: 'google/logging/v2/logging.proto' }]); - extend(this, grpcClient.google.logging.v2); + extend(this, loggingServiceV2Client.google.logging.v2); + + var grpcClients = { + loggingServiceV2Client: loggingServiceV2Client + }; /** * Build a new instance of {@link LoggingServiceV2Api}. @@ -437,15 +524,13 @@ function LoggingServiceV2ApiBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.timeout - * The default timeout, in seconds, for calls made through this client. * @param {number=} opts.appName * The codename of the calling service. * @param {String=} opts.appVersion * The version of the calling service. */ this.loggingServiceV2Api = function(opts) { - return new LoggingServiceV2Api(gaxGrpc, grpcClient, opts); + return new LoggingServiceV2Api(gaxGrpc, grpcClients, opts); }; extend(this.loggingServiceV2Api, LoggingServiceV2Api); } diff --git a/handwritten/logging/src/v2/metrics_service_v2_api.js b/handwritten/logging/src/v2/metrics_service_v2_api.js index 55f5adb5353..0f27f45b188 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_api.js +++ b/handwritten/logging/src/v2/metrics_service_v2_api.js @@ -27,7 +27,6 @@ /* jscs: disable maximumLineLength */ 'use strict'; -var arguejs = require('arguejs'); var configData = require('./metrics_service_v2_client_config'); var extend = require('extend'); var gax = require('google-gax'); @@ -38,12 +37,11 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; -var DEFAULT_TIMEOUT = 30; var PAGE_DESCRIPTORS = { listLogMetrics: new gax.PageDescriptor( - 'page_token', - 'next_page_token', + 'pageToken', + 'nextPageToken', 'metrics') }; @@ -74,46 +72,47 @@ var ALL_SCOPES = [ * * @class */ -function MetricsServiceV2Api(gaxGrpc, grpcClient, opts) { +function MetricsServiceV2Api(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; var sslCreds = opts.sslCreds || null; var clientConfig = opts.clientConfig || {}; - var timeout = opts.timeout || DEFAULT_TIMEOUT; var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.Version; + var appVersion = opts.appVersion || gax.version; var googleApiClient = [ appName + '/' + appVersion, CODE_GEN_NAME_VERSION, + 'gax/' + gax.version, 'nodejs/' + process.version].join(' '); var defaults = gaxGrpc.constructSettings( 'google.logging.v2.MetricsServiceV2', configData, clientConfig, - timeout, PAGE_DESCRIPTORS, null, {'x-goog-api-client': googleApiClient}); - var stub = gaxGrpc.createStub( + var metricsServiceV2Stub = gaxGrpc.createStub( servicePath, port, - grpcClient.google.logging.v2.MetricsServiceV2, + grpcClients.metricsServiceV2Client.google.logging.v2.MetricsServiceV2, {sslCreds: sslCreds}); - var methods = [ + var metricsServiceV2StubMethods = [ 'listLogMetrics', 'getLogMetric', 'createLogMetric', 'updateLogMetric', 'deleteLogMetric' ]; - methods.forEach(function(methodName) { + metricsServiceV2StubMethods.forEach(function(methodName) { this['_' + methodName] = gax.createApiCall( - stub.then(function(stub) { return stub[methodName].bind(stub); }), - defaults[methodName]); + metricsServiceV2Stub.then(function(metricsServiceV2Stub) { + return metricsServiceV2Stub[methodName].bind(metricsServiceV2Stub); + }), + defaults[methodName]); }.bind(this)); } @@ -190,44 +189,71 @@ MetricsServiceV2Api.prototype.matchMetricFromMetricName = * @param {string} parent * Required. The resource name containing the metrics. * Example: `"projects/my-project-id"`. - * @param {Object=} otherArgs - * @param {number=} otherArgs.pageSize + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * + * In addition, options may contain the following optional parameters. + * @param {number=} options.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. - * @returns {Stream} - * An object stream. By default, this emits an object representing + * + * @param {function(?Error, ?Object, ?string)=} callback + * When specified, the results are not streamed but this callback + * will be called with the response object representing [ListLogMetricsResponse]{@link ListLogMetricsResponse}. + * The third item will be set if the response contains the token for the further results + * and can be reused to `pageToken` field in the options in the next request. + * @returns {Stream|gax.EventEmitter} + * An object stream which emits an object representing * [LogMetric]{@link LogMetric} on 'data' event. - * This object can also be configured to emit - * pages of the responses through the options parameter. + * When the callback is specified or streaming is suppressed through options, + * it will return an event emitter to handle the call status and the callback + * will be called with the response object. * * @example * * var api = loggingV2.metricsServiceV2Api(); * var formattedParent = api.parentPath("[PROJECT]"); + * // Iterate over all elements. * api.listLogMetrics(formattedParent).on('data', function(element) { * // doThingsWith(element) * }); + * + * // Or obtain the paged response through the callback. + * function callback(err, response, nextPageToken) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * if (nextPageToken) { + * // fetch the next page. + * api.listLogMetrics(formattedParent, {pageToken: nextPageToken}, callback); + * } + * } + * api.listLogMetrics(formattedParent, {flattenPages: false}, callback); */ -MetricsServiceV2Api.prototype.listLogMetrics = function listLogMetrics() { - var args = arguejs({ - parent: String, - otherArgs: [Object, {}], - options: [gax.CallOptions], - callback: [Function] - }, arguments); +MetricsServiceV2Api.prototype.listLogMetrics = function listLogMetrics( + parent, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - parent: args.parent + parent: parent }; - if ('pageSize' in args.otherArgs) { - req.page_size = args.otherArgs.pageSize; + if ('pageSize' in options) { + req.pageSize = options.pageSize; } - return this._listLogMetrics(req, args.options, args.callback); + return this._listLogMetrics(req, options, callback); }; /** @@ -236,9 +262,9 @@ MetricsServiceV2Api.prototype.listLogMetrics = function listLogMetrics() { * @param {string} metricName * The resource name of the desired metric. * Example: `"projects/my-project-id/metrics/my-metric-id"`. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * @@ -258,16 +284,21 @@ MetricsServiceV2Api.prototype.listLogMetrics = function listLogMetrics() { * // doThingsWith(response) * }); */ -MetricsServiceV2Api.prototype.getLogMetric = function getLogMetric() { - var args = arguejs({ - metricName: String, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +MetricsServiceV2Api.prototype.getLogMetric = function getLogMetric( + metricName, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - metric_name: args.metricName + metricName: metricName }; - return this._getLogMetric(req, args.options, args.callback); + return this._getLogMetric(req, options, callback); }; /** @@ -283,9 +314,9 @@ MetricsServiceV2Api.prototype.getLogMetric = function getLogMetric() { * already exists. * * This object should have the same structure as [LogMetric]{@link LogMetric} - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * @@ -306,18 +337,23 @@ MetricsServiceV2Api.prototype.getLogMetric = function getLogMetric() { * // doThingsWith(response) * }); */ -MetricsServiceV2Api.prototype.createLogMetric = function createLogMetric() { - var args = arguejs({ - parent: String, - metric: Object, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +MetricsServiceV2Api.prototype.createLogMetric = function createLogMetric( + parent, + metric, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - parent: args.parent, - metric: args.metric + parent: parent, + metric: metric }; - return this._createLogMetric(req, args.options, args.callback); + return this._createLogMetric(req, options, callback); }; /** @@ -336,9 +372,9 @@ MetricsServiceV2Api.prototype.createLogMetric = function createLogMetric() { * exist, then a new metric is created. * * This object should have the same structure as [LogMetric]{@link LogMetric} - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * @@ -359,18 +395,23 @@ MetricsServiceV2Api.prototype.createLogMetric = function createLogMetric() { * // doThingsWith(response) * }); */ -MetricsServiceV2Api.prototype.updateLogMetric = function updateLogMetric() { - var args = arguejs({ - metricName: String, - metric: Object, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +MetricsServiceV2Api.prototype.updateLogMetric = function updateLogMetric( + metricName, + metric, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - metric_name: args.metricName, - metric: args.metric + metricName: metricName, + metric: metric }; - return this._updateLogMetric(req, args.options, args.callback); + return this._updateLogMetric(req, options, callback); }; /** @@ -379,9 +420,9 @@ MetricsServiceV2Api.prototype.updateLogMetric = function updateLogMetric() { * @param {string} metricName * The resource name of the metric to delete. * Example: `"projects/my-project-id/metrics/my-metric-id"`. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. * @returns {gax.EventEmitter} - the event emitter to handle the call @@ -397,16 +438,21 @@ MetricsServiceV2Api.prototype.updateLogMetric = function updateLogMetric() { * } * }); */ -MetricsServiceV2Api.prototype.deleteLogMetric = function deleteLogMetric() { - var args = arguejs({ - metricName: String, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +MetricsServiceV2Api.prototype.deleteLogMetric = function deleteLogMetric( + metricName, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - metric_name: args.metricName + metricName: metricName }; - return this._deleteLogMetric(req, args.options, args.callback); + return this._deleteLogMetric(req, options, callback); }; function MetricsServiceV2ApiBuilder(gaxGrpc) { @@ -414,11 +460,15 @@ function MetricsServiceV2ApiBuilder(gaxGrpc) { return new MetricsServiceV2ApiBuilder(gaxGrpc); } - var grpcClient = gaxGrpc.load([{ + var metricsServiceV2Client = gaxGrpc.load([{ root: require('google-proto-files')('..'), file: 'google/logging/v2/logging_metrics.proto' }]); - extend(this, grpcClient.google.logging.v2); + extend(this, metricsServiceV2Client.google.logging.v2); + + var grpcClients = { + metricsServiceV2Client: metricsServiceV2Client + }; /** * Build a new instance of {@link MetricsServiceV2Api}. @@ -433,15 +483,13 @@ function MetricsServiceV2ApiBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.timeout - * The default timeout, in seconds, for calls made through this client. * @param {number=} opts.appName * The codename of the calling service. * @param {String=} opts.appVersion * The version of the calling service. */ this.metricsServiceV2Api = function(opts) { - return new MetricsServiceV2Api(gaxGrpc, grpcClient, opts); + return new MetricsServiceV2Api(gaxGrpc, grpcClients, opts); }; extend(this.metricsServiceV2Api, MetricsServiceV2Api); } From e19af37c30644afc960657332337e4b91169ca94 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 5 Oct 2016 10:38:44 -0400 Subject: [PATCH 0023/1029] logging: throw when a circular reference is used in an entry (#1664) --- handwritten/logging/package.json | 1 + handwritten/logging/src/entry.js | 5 +++++ handwritten/logging/test/entry.js | 9 +++++++++ 3 files changed, 15 insertions(+) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e3f6e1d948b..c5689967efa 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,6 +58,7 @@ "google-gax": "^0.7.0", "google-proto-files": "^0.8.0", "is": "^3.0.1", + "is-circular": "^1.0.1", "string-format-obj": "^1.0.0" }, "devDependencies": { diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index cde905c87f5..a4a27e11fb9 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -23,6 +23,7 @@ var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); +var isCircular = require('is-circular'); /** * Create an entry object to define new data to insert into a log. @@ -122,6 +123,10 @@ Entry.fromApiResponse_ = function(entry) { * @private */ Entry.prototype.toJSON = function() { + if (is.object(this.data) && isCircular([this.data])) { + throw new Error('The JSON data for this entry has a circular reference.'); + } + var entry = extend(true, {}, this); var whitelist = [ diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index c8c94964431..4cbdf011c21 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -186,6 +186,15 @@ describe('Entry', function() { assert.strictEqual(json.jsonPayload, converted); }); + it('should throw with a struct with a circular reference', function() { + entry.data = { val: true }; + entry.data.data = entry.data; + + assert.throws(function() { + entry.toJSON(); + }, /The JSON data for this entry has a circular reference\./); + }); + it('should assign string data as textPayload', function() { entry.data = 'string'; var json = entry.toJSON(); From 8a58b32be944af1ac6ee1bdfcd2dcdf64f49cc25 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 14 Oct 2016 06:45:37 -0400 Subject: [PATCH 0024/1029] logging: change resource argument to metadata (#1666) --- handwritten/logging/README.md | 14 +++-- handwritten/logging/src/entry.js | 62 ++++++------------- handwritten/logging/src/log.js | 39 +++++++----- handwritten/logging/system-test/logging.js | 30 ++++++++++ handwritten/logging/test/entry.js | 69 +++------------------- handwritten/logging/test/log.js | 51 ++++++++++++---- 6 files changed, 129 insertions(+), 136 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 214a8879e67..6b439d24cc4 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -27,15 +27,17 @@ logging.createSink('my-new-sink', { // Write a critical entry to a log. var syslog = logging.log('syslog'); -var resource = { - type: 'gce_instance', - labels: { - zone: 'global', - instance_id: '3' +var metadata = { + resource: { + type: 'gce_instance', + labels: { + zone: 'global', + instance_id: '3' + } } }; -var entry = syslog.entry(resource, { +var entry = syslog.entry(metadata, { delegate: process.env.user }); diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index a4a27e11fb9..7da71fcd196 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -33,8 +33,8 @@ var isCircular = require('is-circular'); * @alias module:logging/entry * @constructor * - * @param {object=|string=} resource - See a - * [Monitored Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource). + * @param {object=} metadata - See a + * [LogEntry Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry). * @param {object|string} data - The data to use as the value for this log * entry. * @@ -52,15 +52,17 @@ var isCircular = require('is-circular'); * @example * var syslog = logging.log('syslog'); * - * var resource = { - * type: 'gce_instance', - * labels: { - * zone: 'global', - * instance_id: '3' + * var metadata = { + * resource: { + * type: 'gce_instance', + * labels: { + * zone: 'global', + * instance_id: '3' + * } * } * }; * - * var entry = syslog.entry(resource, { + * var entry = syslog.entry(metadata, { * delegate: 'my_username' * }); * @@ -80,13 +82,8 @@ var isCircular = require('is-circular'); * } * }); */ -function Entry(resource, data) { - if (!data) { - this.data = resource; - return; - } - - this.resource = resource; +function Entry(metadata, data) { + this.metadata = metadata; this.data = data; } @@ -106,12 +103,12 @@ Entry.fromApiResponse_ = function(entry) { data = common.GrpcService.structToObj_(data); } - var serializedEntry = extend(new Entry(entry.resource, data), entry); + var serializedEntry = new Entry(entry, data); - if (serializedEntry.timestamp) { - var ms = serializedEntry.timestamp.seconds * 1000; - ms += serializedEntry.timestamp.nanos / 1e6; - serializedEntry.timestamp = new Date(ms); + if (serializedEntry.metadata.timestamp) { + var ms = serializedEntry.metadata.timestamp.seconds * 1000; + ms += serializedEntry.metadata.timestamp.nanos / 1e6; + serializedEntry.metadata.timestamp = new Date(ms); } return serializedEntry; @@ -127,30 +124,7 @@ Entry.prototype.toJSON = function() { throw new Error('The JSON data for this entry has a circular reference.'); } - var entry = extend(true, {}, this); - - var whitelist = [ - 'logName', - 'resource', - 'timestamp', - 'severity', - 'insertId', - 'httpRequest', - 'labels', - 'operation' - ]; - - for (var prop in entry) { - if (whitelist.indexOf(prop) === -1) { - delete entry[prop]; - } - } - - if (is.string(this.resource)) { - entry.resource = { - type: this.resource - }; - } + var entry = extend(true, {}, this.metadata); if (is.object(this.data)) { entry.jsonPayload = common.GrpcService.objToStruct_(this.data, { diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 692e16c4147..80553447b4a 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -101,8 +101,10 @@ util.inherits(Log, common.GrpcServiceObject); */ Log.assignSeverityToEntries_ = function(entries, severity) { return arrify(entries).map(function(entry) { - return extend(new Entry(), entry, { - severity: severity + return extend(true, new Entry(), entry, { + metadata: { + severity: severity + } }); }); }; @@ -206,22 +208,24 @@ Log.prototype.emergency = function(entry, options, callback) { * * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry} * - * @param {object=|string=} resource - See a - * [Monitored Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource). + * @param {object=} metadata - See a + * [LogEntry Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry). * @param {object|string} data - The data to use as the value for this log * entry. * @return {module:logging/entry} * * @example - * var resource = { - * type: 'gce_instance', - * labels: { - * zone: 'global', - * instance_id: '3' + * var metadata = { + * resource: { + * type: 'gce_instance', + * labels: { + * zone: 'global', + * instance_id: '3' + * } * } * }; * - * var entry = log.entry(resource, { + * var entry = log.entry(metadata, { * delegate: 'my_username' * }); * @@ -240,10 +244,17 @@ Log.prototype.emergency = function(entry, options, callback) { * // } * // } */ -Log.prototype.entry = function(resource, data) { - var entryInstance = this.parent.entry(resource, data); - entryInstance.logName = this.formattedName_; - return entryInstance; +Log.prototype.entry = function(metadata, data) { + if (!data) { + data = metadata; + metadata = {}; + } + + metadata = extend({}, metadata, { + logName: this.formattedName_ + }); + + return this.parent.entry(metadata, data); }; /** diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index fbccc1689d9..d66bae369ef 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -20,6 +20,7 @@ var assert = require('assert'); var async = require('async'); var BigQuery = require('@google-cloud/bigquery'); var exec = require('methmeth'); +var extend = require('extend'); var format = require('string-format-obj'); var is = require('is'); var prop = require('propprop'); @@ -375,6 +376,35 @@ describe('Logging', function() { }); }); + it('should write a log with metadata', function(done) { + var metadata = extend({}, options, { + severity: 'DEBUG' + }); + + var data = { + embeddedData: true + }; + + var logEntry = log.entry(metadata, data); + + log.write(logEntry, function(err) { + assert.ifError(err); + + setTimeout(function() { + log.getEntries({ pageSize: 1 }, function(err, entries) { + assert.ifError(err); + + var entry = entries[0]; + + assert.strictEqual(entry.metadata.severity, metadata.severity); + assert.deepEqual(entry.data, data); + + done(); + }); + }, WRITE_CONSISTENCY_DELAY_MS); + }); + }); + it('should write to a log with alert helper', function(done) { log.alert(logEntries, options, done); }); diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 4cbdf011c21..2ed20a8dc86 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -27,7 +27,7 @@ describe('Entry', function() { var Entry; var entry; - var RESOURCE = {}; + var METADATA = {}; var DATA = {}; before(function() { @@ -40,23 +40,18 @@ describe('Entry', function() { beforeEach(function() { extend(FakeGrpcService, GrpcService); - entry = new Entry(RESOURCE, DATA); + entry = new Entry(METADATA, DATA); }); describe('instantiation', function() { - it('should treat resource as data if data is not provided', function() { - var entry = new Entry(DATA); - assert.strictEqual(entry.data, DATA); - assert.strictEqual(entry.resource, undefined); - }); - - it('should localize resource and data', function() { - assert.strictEqual(entry.resource, RESOURCE); + it('should localize metadata and data', function() { + assert.strictEqual(entry.metadata, METADATA); assert.strictEqual(entry.data, DATA); }); }); describe('fromApiResponse_', function() { + var RESOURCE = {}; var entry; var date = new Date(); @@ -82,10 +77,10 @@ describe('Entry', function() { it('should create an Entry', function() { assert(entry instanceof Entry); - assert.strictEqual(entry.resource, RESOURCE); + assert.strictEqual(entry.metadata.resource, RESOURCE); assert.strictEqual(entry.data, DATA); - assert.strictEqual(entry.extraProperty, true); - assert.deepEqual(entry.timestamp, date); + assert.strictEqual(entry.metadata.extraProperty, true); + assert.deepEqual(entry.metadata.timestamp, date); }); it('should extend the entry with proto data', function() { @@ -123,52 +118,6 @@ describe('Entry', function() { assert.deepEqual(entryBefore, entryAfter); }); - it('should only include correct properties', function() { - var propertiesToInclude = [ - 'logName', - 'resource', - 'timestamp', - 'severity', - 'insertId', - 'httpRequest', - 'labels', - 'operation' - ]; - - var value = 'value'; - - propertiesToInclude.forEach(function(property) { - entry[property] = value; - }); - - entry.extraProperty = true; - - var json = entry.toJSON(); - - assert(propertiesToInclude.every(function(property) { - if (property === 'resource') { - return json[property].type === value; - } - - return json[property] === value; - })); - - // Was removed for JSON representation... - assert.strictEqual(json.extraProperty, undefined); - // ...but still exists on the Entry. - assert.strictEqual(entry.extraProperty, true); - }); - - it('should convert a string resource to an object', function() { - entry.resource = 'resource-name'; - - var json = entry.toJSON(); - - assert.deepEqual(json.resource, { - type: entry.resource - }); - }); - it('should convert data as a struct and assign to jsonPayload', function() { var input = {}; var converted = {}; @@ -203,7 +152,7 @@ describe('Entry', function() { it('should convert a date', function() { var date = new Date(); - entry.timestamp = date; + entry.metadata.timestamp = date; var json = entry.toJSON(); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 7711faf5bcd..f8941482c77 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -123,7 +123,11 @@ describe('Log', function() { assert.deepEqual( Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY), [ - extend(true, {}, ENTRIES[0], { severity: SEVERITY }) + extend(true, {}, ENTRIES[0], { + metadata: { + severity: SEVERITY + } + }) ] ); }); @@ -132,8 +136,16 @@ describe('Log', function() { assert.deepEqual( Log.assignSeverityToEntries_(ENTRIES, SEVERITY), [ - extend(true, {}, ENTRIES[0], { severity: SEVERITY }), - extend(true, {}, ENTRIES[1], { severity: SEVERITY }) + extend(true, {}, ENTRIES[0], { + metadata: { + severity: SEVERITY + } + }), + extend(true, {}, ENTRIES[1], { + metadata: { + severity: SEVERITY + } + }) ] ); }); @@ -174,28 +186,43 @@ describe('Log', function() { describe('entry', function() { it('should return an entry from Logging', function() { - var resource = {}; + var metadata = { + val: true + }; var data = {}; var entryObject = {}; - log.parent.entry = function(resource_, data_) { - assert.strictEqual(resource_, resource); + log.parent.entry = function(metadata_, data_) { + assert.deepEqual(metadata_, extend({}, metadata, { + logName: log.formattedName_ + })); assert.strictEqual(data_, data); return entryObject; }; - var entry = log.entry(resource, data); + var entry = log.entry(metadata, data); assert.strictEqual(entry, entryObject); }); - it('should attach the log name to the entry', function() { - log.parent.entry = function() { - return {}; + it('should attach the log name to the entry', function(done) { + log.parent.entry = function(metadata) { + assert.strictEqual(metadata.logName, log.formattedName_); + done(); }; - var entry = log.entry({}, {}); - assert.strictEqual(entry.logName, log.formattedName_); + log.entry({}, {}); + }); + + it('should assume one argument means data', function(done) { + var data = {}; + + log.parent.entry = function(metadata, data_) { + assert.strictEqual(data_, data); + done(); + }; + + log.entry(data); }); }); From fef484db02bd3c9d92c886c2684eb6499e5828dc Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Mon, 17 Oct 2016 19:07:22 -0400 Subject: [PATCH 0025/1029] logging: add promise support (#1707) --- handwritten/logging/README.md | 12 +- handwritten/logging/package.json | 2 +- handwritten/logging/src/index.js | 126 ++++++++++++++------- handwritten/logging/src/log.js | 120 ++++++++++++++++++-- handwritten/logging/src/sink.js | 48 +++++++- handwritten/logging/system-test/logging.js | 8 +- handwritten/logging/test/index.js | 27 ++++- handwritten/logging/test/log.js | 53 ++++++++- handwritten/logging/test/sink.js | 17 ++- 9 files changed, 351 insertions(+), 62 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 6b439d24cc4..4757b2b0d4e 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -49,6 +49,16 @@ logging.getEntries(function(err, entries) { // `entries` contains all of the entries from the logs in your project. } }); + +// Promises are also supported by omitting callbacks. +logging.getEntries().then(function(data) { + var entries = data[0]; +}); + +// It's also possible to integrate with third-party Promise libraries. +var logging = require('@google-cloud/logging')({ + promise: require('bluebird') +}); ``` @@ -104,4 +114,4 @@ var logging = require('@google-cloud/logging')({ [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using [dev-console]: https://console.developers.google.com/project [gcloud-logging-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/logging -[cloud-logging-docs]: https://cloud.google.com/logging/docs \ No newline at end of file +[cloud-logging-docs]: https://cloud.google.com/logging/docs diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c5689967efa..0c67284794b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "stackdriver" ], "dependencies": { - "@google-cloud/common": "^0.6.0", + "@google-cloud/common": "^0.7.0", "arrify": "^1.0.0", "extend": "^3.0.0", "google-gax": "^0.7.0", diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index c20563681cd..c98f8b83c76 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -130,6 +130,14 @@ util.inherits(Logging, common.GrpcService); * } * * logging.createSink('new-sink-name', config, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * logging.createSink('new-sink-name', config).then(function(data) { + * var sink = data[0]; + * var apiResponse = data[1]; + * }); */ Logging.prototype.createSink = function(name, config, callback) { // jscs:enable maximumLineLength @@ -273,26 +281,11 @@ Logging.prototype.entry = function(resource, data) { * }, callback); * * //- - * // Get the entries from your project as a readable object stream. + * // If the callback is omitted, we'll return a Promise. * //- - * logging.getEntries() - * .on('error', console.error) - * .on('data', function(entry) { - * // `entry` is a Stackdriver Logging entry object. - * // See the `data` property to read the data from the entry. - * }) - * .on('end', function() { - * // All entries retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * logging.getEntries() - * .on('data', function(entry) { - * this.end(); - * }); + * logging.getEntries().then(function(data) { + * var entries = data[0]; + * }); */ Logging.prototype.getEntries = function(options, callback) { if (is.fn(options)) { @@ -331,6 +324,36 @@ Logging.prototype.getEntries = function(options, callback) { }); }; +/** + * List the {module:logging/entry} objects in your logs as a readable object + * stream. + * + * @param {object=} options - Configuration object. See + * {module:logging#getEntries} for a complete list of options. + * @return {stream} + * + * @example + * logging.getEntriesStream() + * .on('error', console.error) + * .on('data', function(entry) { + * // `entry` is a Stackdriver Logging entry object. + * // See the `data` property to read the data from the entry. + * }) + * .on('end', function() { + * // All entries retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * logging.getEntriesStream() + * .on('data', function(entry) { + * this.end(); + * }); + */ +Logging.prototype.getEntriesStream = common.paginator.streamify('getEntries'); + /** * Get the sinks associated with this project. * @@ -352,25 +375,11 @@ Logging.prototype.getEntries = function(options, callback) { * }); * * //- - * // Get the sinks from your project as a readable object stream. + * // If the callback is omitted, we'll return a Promise. * //- - * logging.getSinks() - * .on('error', console.error) - * .on('data', function(sink) { - * // `sink` is a Sink object. - * }) - * .on('end', function() { - * // All sinks retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * logging.getSinks() - * .on('data', function(sink) { - * this.end(); - * }); + * logging.getSinks().then(function(data) { + * var sinks = data[0]; + * }); */ Logging.prototype.getSinks = function(options, callback) { var self = this; @@ -413,6 +422,35 @@ Logging.prototype.getSinks = function(options, callback) { }); }; +/** + * Get the {module:logging/sink} objects associated with this project as a + * readable object stream. + * + * @param {object=} options - Configuration object. See + * {module:logging#getSinks} for a complete list of options. + * @return {stream} + * + * @example + * logging.getSinksStream() + * .on('error', console.error) + * .on('data', function(sink) { + * // `sink` is a Sink object. + * }) + * .on('end', function() { + * // All sinks retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * logging.getSinksStream() + * .on('data', function(sink) { + * this.end(); + * }); + */ +Logging.prototype.getSinksStream = common.paginator.streamify('getSinks'); + /** * Get a reference to a Stackdriver Logging log. * @@ -557,10 +595,18 @@ Logging.prototype.setAclForTopic_ = function(name, config, callback) { /*! Developer Documentation * - * These methods can be used with either a callback or as a readable object - * stream. `streamRouter` is used to add this dual behavior. + * These methods can be auto-paginated. + */ +common.paginator.extend(Logging, ['getEntries', 'getSinks']); + +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. */ -common.streamRouter.extend(Logging, ['getEntries', 'getSinks']); +common.util.promisifyAll(Logging, { + exclude: ['entry', 'log', 'sink'] +}); Logging.Entry = Entry; Logging.Log = Log; diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 80553447b4a..8a4e01a5a96 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -70,6 +70,13 @@ function Log(logging, name) { * // The log was deleted. * } * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.delete().then(function(data) { + * var apiResponse = data[0]; + * }); */ delete: { protoOpts: { @@ -141,6 +148,13 @@ Log.formatName_ = function(projectId, name) { * }); * * log.alert(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.alert(entry).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.alert = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'ALERT'), options, callback); @@ -158,6 +172,13 @@ Log.prototype.alert = function(entry, options, callback) { * }); * * log.critical(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.critical(entry).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.critical = function(entry, options, callback) { var entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); @@ -176,6 +197,13 @@ Log.prototype.critical = function(entry, options, callback) { * }); * * log.debug(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.debug(entry).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.debug = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback); @@ -193,6 +221,13 @@ Log.prototype.debug = function(entry, options, callback) { * }); * * log.emergency(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.emergency(entry).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.emergency = function(entry, options, callback) { var entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); @@ -269,6 +304,13 @@ Log.prototype.entry = function(metadata, data) { * }); * * log.error(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.error(entry).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.error = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'ERROR'), options, callback); @@ -321,9 +363,35 @@ Log.prototype.error = function(entry, options, callback) { * }, callback); * * //- - * // Get the entries from your project as a readable object stream. + * // If the callback is omitted, we'll return a Promise. * //- - * log.getEntries() + * log.getEntries().then(function(data) { + * var entries = data[0]; + * }); + */ +Log.prototype.getEntries = function(options, callback) { + if (is.function(options)) { + callback = options; + options = {}; + } + + options = extend({ + filter: 'logName="' + this.formattedName_ + '"' + }, options); + + return this.parent.getEntries(options, callback); +}; + +/** + * This method is a wrapper around {module:logging#getEntriesStream}, but with a + * filter specified to only return {module:logging/entry} objects from this log. + * + * @param {object=} options - Configuration object. See + * {module:logging/log#getEntries} for a complete list of options. + * @return {stream} + * + * @example + * log.getEntriesStream() * .on('error', console.error) * .on('data', function(entry) { * // `entry` is a Stackdriver Logging entry object. @@ -337,22 +405,17 @@ Log.prototype.error = function(entry, options, callback) { * // If you anticipate many results, you can end a stream early to prevent * // unnecessary processing and API requests. * //- - * log.getEntries() + * log.getEntriesStream() * .on('data', function(entry) { * this.end(); * }); */ -Log.prototype.getEntries = function(options, callback) { - if (is.function(options)) { - callback = options; - options = {}; - } - +Log.prototype.getEntriesStream = function(options) { options = extend({ filter: 'logName="' + this.formattedName_ + '"' }, options); - return this.parent.getEntries(options, callback); + return this.parent.getEntriesStream(options); }; /** @@ -367,6 +430,13 @@ Log.prototype.getEntries = function(options, callback) { * }); * * log.info(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.info(entry).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.info = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'INFO'), options, callback); @@ -384,6 +454,13 @@ Log.prototype.info = function(entry, options, callback) { * }); * * log.notice(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.notice(entry).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.notice = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback); @@ -401,6 +478,13 @@ Log.prototype.notice = function(entry, options, callback) { * }); * * log.warning(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.warning(entry).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.warning = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback); @@ -470,6 +554,13 @@ Log.prototype.warning = function(entry, options, callback) { * }; * * log.write(entries, options, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.write(entries).then(function(data) { + * var apiResponse = data[0]; + * }); */ Log.prototype.write = function(entry, options, callback) { if (is.fn(options)) { @@ -510,4 +601,13 @@ Log.prototype.formatEntryForApi_ = function(entry) { return formattedEntry; }; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +common.util.promisifyAll(Log, { + exclude: ['entry'] +}); + module.exports = Log; diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index f7d1d839fc9..e435db5584e 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -67,6 +67,14 @@ function Sink(logging, name) { * // The sink was created successfully. * } * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.create(config).then(function(data) { + * var sink = data[0]; + * var apiResponse = data[1]; + * }); */ create: true, @@ -86,6 +94,13 @@ function Sink(logging, name) { * // The log was deleted. * } * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.delete().then(function(data) { + * var apiResponse = data[0]; + * }); */ delete: { protoOpts: { @@ -111,6 +126,14 @@ function Sink(logging, name) { * * @example * sink.getMetadata(function(err, metadata, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.getMetadata().then(function(data) { + * var metadata = data[0]; + * var apiResponse = data[1]; + * }); */ getMetadata: { protoOpts: { @@ -148,7 +171,16 @@ util.inherits(Sink, common.GrpcServiceObject); * @param {object} callback.apiResponse - The full API response. * * @example - * sink.setFilter('metadata.severity = ALERT', function(err, apiResponse) {}); + * var filter = 'metadata.severity = ALERT'; + * + * sink.setFilter(filter, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.setFilter(filter).then(function(data) { + * var apiResponse = data[0]; + * }); */ Sink.prototype.setFilter = function(filter, callback) { this.setMetadata({ @@ -175,6 +207,13 @@ Sink.prototype.setFilter = function(filter, callback) { * }; * * sink.setMetadata(metadata, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.setMetadata(metadata).then(function(data) { + * var apiResponse = data[0]; + * }); */ Sink.prototype.setMetadata = function(metadata, callback) { var self = this; @@ -210,4 +249,11 @@ Sink.prototype.setMetadata = function(metadata, callback) { }); }; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +common.util.promisifyAll(Sink); + module.exports = Sink; diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index d66bae369ef..9a084ce365e 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -213,7 +213,7 @@ describe('Logging', function() { }); it('should list sinks as a stream', function(done) { - logging.getSinks({ pageSize: 1 }) + logging.getSinksStream({ pageSize: 1 }) .on('error', done) .once('data', function() { this.end(); @@ -222,7 +222,7 @@ describe('Logging', function() { }); it('should get metadata', function(done) { - logging.getSinks({ pageSize: 1 }) + logging.getSinksStream({ pageSize: 1 }) .on('error', done) .once('data', function(sink) { sink.getMetadata(function(err, metadata) { @@ -279,7 +279,7 @@ describe('Logging', function() { }); it('should list log entries as a stream', function(done) { - logging.getEntries({ pageSize: 1 }) + logging.getEntriesStream({ pageSize: 1 }) .on('error', done) .once('data', function() { this.end(); @@ -301,7 +301,7 @@ describe('Logging', function() { }); it('should list log entries as a stream', function(done) { - log.getEntries({ pageSize: 1 }) + log.getEntriesStream({ pageSize: 1 }) .on('error', done) .once('data', function() { this.end(); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index a5cacbd4123..55a36eb4842 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -24,7 +24,7 @@ var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; var extended = false; -var fakeStreamRouter = { +var fakePaginator = { extend: function(Class, methods) { if (Class.name !== 'Logging') { return; @@ -36,10 +36,14 @@ var fakeStreamRouter = { 'getEntries', 'getSinks' ]); + }, + streamify: function(methodName) { + return methodName; } }; var isCustomTypeOverride; +var promisifed = false; var fakeUtil = extend({}, util, { isCustomType: function() { if (isCustomTypeOverride) { @@ -47,6 +51,14 @@ var fakeUtil = extend({}, util, { } return false; + }, + promisifyAll: function(Class, options) { + if (Class.name !== 'Logging') { + return; + } + + promisifed = true; + assert.deepEqual(options.exclude, ['entry', 'log', 'sink']); } }); @@ -80,7 +92,7 @@ describe('Logging', function() { Logging = proxyquire('../', { '@google-cloud/common': { GrpcService: FakeGrpcService, - streamRouter: fakeStreamRouter, + paginator: fakePaginator, util: fakeUtil }, './log.js': FakeLog, @@ -101,7 +113,16 @@ describe('Logging', function() { describe('instantiation', function() { it('should extend the correct methods', function() { - assert(extended); // See `fakeStreamRouter.extend` + assert(extended); // See `fakePaginator.extend` + }); + + it('should promisify all the things', function() { + assert(promisifed); + }); + + it('should streamify the correct methods', function() { + assert.strictEqual(logging.getEntriesStream, 'getEntries'); + assert.strictEqual(logging.getSinksStream, 'getSinks'); }); it('should normalize the arguments', function() { diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index f8941482c77..4b6a5890e48 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -22,6 +22,18 @@ var GrpcServiceObject = require('@google-cloud/common').GrpcServiceObject; var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; +var promisifed = false; +var fakeUtil = extend({}, util, { + promisifyAll: function(Class, options) { + if (Class.name !== 'Log') { + return; + } + + promisifed = true; + assert.deepEqual(options.exclude, ['entry']); + } +}); + var Entry = require('../src/entry.js'); function FakeGrpcServiceObject() { @@ -55,7 +67,8 @@ describe('Log', function() { Log = proxyquire('../src/log.js', { './entry.js': Entry, '@google-cloud/common': { - GrpcServiceObject: FakeGrpcServiceObject + GrpcServiceObject: FakeGrpcServiceObject, + util: fakeUtil } }); var assignSeverityToEntries_ = Log.assignSeverityToEntries_; @@ -72,6 +85,10 @@ describe('Log', function() { }); describe('instantiation', function() { + it('should promisify all the things', function() { + assert(promisifed); + }); + it('should localize the escaped name', function() { assert.strictEqual(log.name, LOG_NAME_ENCODED); }); @@ -255,6 +272,40 @@ describe('Log', function() { }); }); + describe('getEntriesStream', function() { + var fakeStream = {}; + var EXPECTED_OPTIONS = { + filter: 'logName="' + LOG_NAME_FORMATTED + '"' + }; + + it('should call Logging getEntriesStream with defaults', function(done) { + log.parent.getEntriesStream = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS); + setImmediate(done); + return fakeStream; + }; + + var stream = log.getEntriesStream(); + assert.strictEqual(stream, fakeStream); + }); + + it('should allow overriding the options', function(done) { + var options = { + custom: true, + filter: 'custom filter' + }; + + log.parent.getEntriesStream = function(options_) { + assert.deepEqual(options_, extend({}, EXPECTED_OPTIONS, options)); + setImmediate(done); + return fakeStream; + }; + + var stream = log.getEntriesStream(options); + assert.strictEqual(stream, fakeStream); + }); + }); + describe('write', function() { var ENTRY = {}; var OPTIONS = { diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index 5c582a16bb8..fc6f442252d 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -21,6 +21,16 @@ var extend = require('extend'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; +var promisifed = false; +var fakeUtil = extend({}, util, { + promisifyAll: function(Class) { + if (Class.name === 'Sink') { + promisifed = true; + } + } +}); + + function FakeGrpcServiceObject() { this.calledWith_ = arguments; } @@ -38,7 +48,8 @@ describe('Sink', function() { before(function() { Sink = proxyquire('../src/sink.js', { '@google-cloud/common': { - GrpcServiceObject: FakeGrpcServiceObject + GrpcServiceObject: FakeGrpcServiceObject, + util: fakeUtil } }); }); @@ -88,6 +99,10 @@ describe('Sink', function() { }); }); + it('should promisify all the things', function() { + assert(promisifed); + }); + it('should localize the name', function() { assert.strictEqual(sink.name, SINK_NAME); }); From 55a2bce4884b4ed4c3618623b4a4b752aa461a27 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 17 Oct 2016 19:08:03 -0400 Subject: [PATCH 0026/1029] logging @ 0.4.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0c67284794b..0a49361dae9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.3.0", + "version": "0.4.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 93d673b9e64fe31e6e2cdaf893adc736b9d5a547 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 21 Oct 2016 15:12:52 -0400 Subject: [PATCH 0027/1029] logging: update gapic layer (#1735) --- handwritten/logging/package.json | 2 +- .../logging/src/v2/config_service_v2_api.js | 171 +++++++--------- .../logging/src/v2/logging_service_v2_api.js | 184 ++++++------------ .../logging/src/v2/metrics_service_v2_api.js | 171 +++++++--------- 4 files changed, 202 insertions(+), 326 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0a49361dae9..89f93222c64 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "@google-cloud/common": "^0.7.0", "arrify": "^1.0.0", "extend": "^3.0.0", - "google-gax": "^0.7.0", + "google-gax": "^0.8.1", "google-proto-files": "^0.8.0", "is": "^3.0.1", "is-circular": "^1.0.1", diff --git a/handwritten/logging/src/v2/config_service_v2_api.js b/handwritten/logging/src/v2/config_service_v2_api.js index a6e8a921296..03391cc3681 100644 --- a/handwritten/logging/src/v2/config_service_v2_api.js +++ b/handwritten/logging/src/v2/config_service_v2_api.js @@ -130,7 +130,7 @@ var SINK_PATH_TEMPLATE = new gax.PathTemplate( * @param {String} project * @returns {String} */ -ConfigServiceV2Api.prototype.parentPath = function parentPath(project) { +ConfigServiceV2Api.prototype.parentPath = function(project) { return PARENT_PATH_TEMPLATE.render({ project: project }); @@ -142,8 +142,7 @@ ConfigServiceV2Api.prototype.parentPath = function parentPath(project) { * A fully-qualified path representing a parent resources. * @returns {String} - A string representing the project. */ -ConfigServiceV2Api.prototype.matchProjectFromParentName = - function matchProjectFromParentName(parentName) { +ConfigServiceV2Api.prototype.matchProjectFromParentName = function(parentName) { return PARENT_PATH_TEMPLATE.match(parentName).project; }; @@ -153,7 +152,7 @@ ConfigServiceV2Api.prototype.matchProjectFromParentName = * @param {String} sink * @returns {String} */ -ConfigServiceV2Api.prototype.sinkPath = function sinkPath(project, sink) { +ConfigServiceV2Api.prototype.sinkPath = function(project, sink) { return SINK_PATH_TEMPLATE.render({ project: project, sink: sink @@ -166,8 +165,7 @@ ConfigServiceV2Api.prototype.sinkPath = function sinkPath(project, sink) { * A fully-qualified path representing a sink resources. * @returns {String} - A string representing the project. */ -ConfigServiceV2Api.prototype.matchProjectFromSinkName = - function matchProjectFromSinkName(sinkName) { +ConfigServiceV2Api.prototype.matchProjectFromSinkName = function(sinkName) { return SINK_PATH_TEMPLATE.match(sinkName).project; }; @@ -177,8 +175,7 @@ ConfigServiceV2Api.prototype.matchProjectFromSinkName = * A fully-qualified path representing a sink resources. * @returns {String} - A string representing the sink. */ -ConfigServiceV2Api.prototype.matchSinkFromSinkName = - function matchSinkFromSinkName(sinkName) { +ConfigServiceV2Api.prototype.matchSinkFromSinkName = function(sinkName) { return SINK_PATH_TEMPLATE.match(sinkName).sink; }; @@ -187,39 +184,38 @@ ConfigServiceV2Api.prototype.matchSinkFromSinkName = /** * Lists sinks. * - * @param {string} parent + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent * Required. The cloud resource containing the sinks. * Example: `"projects/my-logging-project"`. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * - * In addition, options may contain the following optional parameters. - * @param {number=} options.pageSize + * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object, ?string)=} callback * When specified, the results are not streamed but this callback * will be called with the response object representing [ListSinksResponse]{@link ListSinksResponse}. * The third item will be set if the response contains the token for the further results * and can be reused to `pageToken` field in the options in the next request. - * @returns {Stream|gax.EventEmitter} + * @returns {Stream|Promise} * An object stream which emits an object representing * [LogSink]{@link LogSink} on 'data' event. * When the callback is specified or streaming is suppressed through options, - * it will return an event emitter to handle the call status and the callback - * will be called with the response object. + * it will return a promise that resolves to the response object. The promise + * has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.configServiceV2Api(); * var formattedParent = api.parentPath("[PROJECT]"); * // Iterate over all elements. - * api.listSinks(formattedParent).on('data', function(element) { + * api.listSinks({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) * }); * @@ -232,15 +228,12 @@ ConfigServiceV2Api.prototype.matchSinkFromSinkName = * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listSinks(formattedParent, {pageToken: nextPageToken}, callback); + * api.listSinks({parent: formattedParent}, {pageToken: nextPageToken}, callback); * } * } - * api.listSinks(formattedParent, {flattenPages: false}, callback); + * api.listSinks({parent: formattedParent}, {flattenPages: false}, callback); */ -ConfigServiceV2Api.prototype.listSinks = function listSinks( - parent, - options, - callback) { +ConfigServiceV2Api.prototype.listSinks = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -248,19 +241,15 @@ ConfigServiceV2Api.prototype.listSinks = function listSinks( if (options === undefined) { options = {}; } - var req = { - parent: parent - }; - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - return this._listSinks(req, options, callback); + return this._listSinks(request, options, callback); }; /** * Gets a sink. * - * @param {string} sinkName + * @param {Object} request + * The request object that will be sent. + * @param {string} request.sinkName * Required. The resource name of the sink to return. * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object=} options @@ -270,25 +259,20 @@ ConfigServiceV2Api.prototype.listSinks = function listSinks( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogSink]{@link LogSink} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.configServiceV2Api(); * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); - * api.getSink(formattedSinkName, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * api.getSink({sinkName: formattedSinkName}).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -ConfigServiceV2Api.prototype.getSink = function getSink( - sinkName, - options, - callback) { +ConfigServiceV2Api.prototype.getSink = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -296,20 +280,19 @@ ConfigServiceV2Api.prototype.getSink = function getSink( if (options === undefined) { options = {}; } - var req = { - sinkName: sinkName - }; - return this._getSink(req, options, callback); + return this._getSink(request, options, callback); }; /** * Creates a sink. * - * @param {string} parent + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent * Required. The resource in which to create the sink. * Example: `"projects/my-project-id"`. * The new sink must be provided in the request. - * @param {Object} sink + * @param {Object} request.sink * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. * @@ -321,27 +304,25 @@ ConfigServiceV2Api.prototype.getSink = function getSink( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogSink]{@link LogSink} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.configServiceV2Api(); * var formattedParent = api.parentPath("[PROJECT]"); * var sink = {}; - * api.createSink(formattedParent, sink, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * var request = { + * parent: formattedParent, + * sink: sink + * }; + * api.createSink(request).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -ConfigServiceV2Api.prototype.createSink = function createSink( - parent, - sink, - options, - callback) { +ConfigServiceV2Api.prototype.createSink = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -349,21 +330,19 @@ ConfigServiceV2Api.prototype.createSink = function createSink( if (options === undefined) { options = {}; } - var req = { - parent: parent, - sink: sink - }; - return this._createSink(req, options, callback); + return this._createSink(request, options, callback); }; /** * Updates or creates a sink. * - * @param {string} sinkName + * @param {Object} request + * The request object that will be sent. + * @param {string} request.sinkName * Required. The resource name of the sink to update, including the parent * resource and the sink identifier. If the sink does not exist, this method * creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {Object} sink + * @param {Object} request.sink * Required. The updated sink, whose name is the same identifier that appears * as part of `sinkName`. If `sinkName` does not exist, then * this method creates a new sink. @@ -376,27 +355,25 @@ ConfigServiceV2Api.prototype.createSink = function createSink( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogSink]{@link LogSink} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.configServiceV2Api(); * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); * var sink = {}; - * api.updateSink(formattedSinkName, sink, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * var request = { + * sinkName: formattedSinkName, + * sink: sink + * }; + * api.updateSink(request).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -ConfigServiceV2Api.prototype.updateSink = function updateSink( - sinkName, - sink, - options, - callback) { +ConfigServiceV2Api.prototype.updateSink = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -404,17 +381,15 @@ ConfigServiceV2Api.prototype.updateSink = function updateSink( if (options === undefined) { options = {}; } - var req = { - sinkName: sinkName, - sink: sink - }; - return this._updateSink(req, options, callback); + return this._updateSink(request, options, callback); }; /** * Deletes a sink. * - * @param {string} sinkName + * @param {Object} request + * The request object that will be sent. + * @param {string} request.sinkName * Required. The resource name of the sink to delete, including the parent * resource and the sink identifier. Example: * `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink @@ -424,23 +399,18 @@ ConfigServiceV2Api.prototype.updateSink = function updateSink( * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.configServiceV2Api(); * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); - * api.deleteSink(formattedSinkName, function(err) { - * if (err) { - * console.error(err); - * } + * api.deleteSink({sinkName: formattedSinkName}).catch(function(err) { + * console.error(err); * }); */ -ConfigServiceV2Api.prototype.deleteSink = function deleteSink( - sinkName, - options, - callback) { +ConfigServiceV2Api.prototype.deleteSink = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -448,10 +418,7 @@ ConfigServiceV2Api.prototype.deleteSink = function deleteSink( if (options === undefined) { options = {}; } - var req = { - sinkName: sinkName - }; - return this._deleteSink(req, options, callback); + return this._deleteSink(request, options, callback); }; function ConfigServiceV2ApiBuilder(gaxGrpc) { diff --git a/handwritten/logging/src/v2/logging_service_v2_api.js b/handwritten/logging/src/v2/logging_service_v2_api.js index 919cbb245bf..9f98cdcbcd5 100644 --- a/handwritten/logging/src/v2/logging_service_v2_api.js +++ b/handwritten/logging/src/v2/logging_service_v2_api.js @@ -132,7 +132,7 @@ var LOG_PATH_TEMPLATE = new gax.PathTemplate( * @param {String} project * @returns {String} */ -LoggingServiceV2Api.prototype.parentPath = function parentPath(project) { +LoggingServiceV2Api.prototype.parentPath = function(project) { return PARENT_PATH_TEMPLATE.render({ project: project }); @@ -144,8 +144,7 @@ LoggingServiceV2Api.prototype.parentPath = function parentPath(project) { * A fully-qualified path representing a parent resources. * @returns {String} - A string representing the project. */ -LoggingServiceV2Api.prototype.matchProjectFromParentName = - function matchProjectFromParentName(parentName) { +LoggingServiceV2Api.prototype.matchProjectFromParentName = function(parentName) { return PARENT_PATH_TEMPLATE.match(parentName).project; }; @@ -155,7 +154,7 @@ LoggingServiceV2Api.prototype.matchProjectFromParentName = * @param {String} log * @returns {String} */ -LoggingServiceV2Api.prototype.logPath = function logPath(project, log) { +LoggingServiceV2Api.prototype.logPath = function(project, log) { return LOG_PATH_TEMPLATE.render({ project: project, log: log @@ -168,8 +167,7 @@ LoggingServiceV2Api.prototype.logPath = function logPath(project, log) { * A fully-qualified path representing a log resources. * @returns {String} - A string representing the project. */ -LoggingServiceV2Api.prototype.matchProjectFromLogName = - function matchProjectFromLogName(logName) { +LoggingServiceV2Api.prototype.matchProjectFromLogName = function(logName) { return LOG_PATH_TEMPLATE.match(logName).project; }; @@ -179,8 +177,7 @@ LoggingServiceV2Api.prototype.matchProjectFromLogName = * A fully-qualified path representing a log resources. * @returns {String} - A string representing the log. */ -LoggingServiceV2Api.prototype.matchLogFromLogName = - function matchLogFromLogName(logName) { +LoggingServiceV2Api.prototype.matchLogFromLogName = function(logName) { return LOG_PATH_TEMPLATE.match(logName).log; }; @@ -190,7 +187,9 @@ LoggingServiceV2Api.prototype.matchLogFromLogName = * Deletes a log and all its log entries. * The log will reappear if it receives new entries. * - * @param {string} logName + * @param {Object} request + * The request object that will be sent. + * @param {string} request.logName * Required. The resource name of the log to delete. Example: * `"projects/my-project/logs/syslog"`. * @param {Object=} options @@ -198,23 +197,18 @@ LoggingServiceV2Api.prototype.matchLogFromLogName = * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.loggingServiceV2Api(); * var formattedLogName = api.logPath("[PROJECT]", "[LOG]"); - * api.deleteLog(formattedLogName, function(err) { - * if (err) { - * console.error(err); - * } + * api.deleteLog({logName: formattedLogName}).catch(function(err) { + * console.error(err); * }); */ -LoggingServiceV2Api.prototype.deleteLog = function deleteLog( - logName, - options, - callback) { +LoggingServiceV2Api.prototype.deleteLog = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -222,17 +216,16 @@ LoggingServiceV2Api.prototype.deleteLog = function deleteLog( if (options === undefined) { options = {}; } - var req = { - logName: logName - }; - return this._deleteLog(req, options, callback); + return this._deleteLog(request, options, callback); }; /** * Writes log entries to Stackdriver Logging. All log entries are * written by this method. * - * @param {Object[]} entries + * @param {Object} request + * The request object that will be sent. + * @param {Object[]} request.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 @@ -244,17 +237,12 @@ LoggingServiceV2Api.prototype.deleteLog = function deleteLog( * calling this method for each individual log entry. * * This object should have the same structure as [LogEntry]{@link LogEntry} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * - * In addition, options may contain the following optional parameters. - * @param {string=} options.logName + * @param {string=} request.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`. Example: * `"projects/my-project/logs/syslog"`. See * {@link LogEntry}. - * @param {Object=} options.resource + * @param {Object=} request.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: * @@ -265,41 +253,38 @@ LoggingServiceV2Api.prototype.deleteLog = function deleteLog( * See {@link LogEntry}. * * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} - * @param {Object.=} options.labels + * @param {Object.=} request.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 {@link LogEntry}. - * @param {boolean=} options.partialSuccess + * @param {boolean=} request.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. - * + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link WriteLogEntriesResponse} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.loggingServiceV2Api(); * var entries = []; - * api.writeLogEntries(entries, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * api.writeLogEntries({entries: entries}).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -LoggingServiceV2Api.prototype.writeLogEntries = function writeLogEntries( - entries, - options, - callback) { +LoggingServiceV2Api.prototype.writeLogEntries = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -307,22 +292,7 @@ LoggingServiceV2Api.prototype.writeLogEntries = function writeLogEntries( if (options === undefined) { options = {}; } - var req = { - entries: entries - }; - if ('logName' in options) { - req.logName = options.logName; - } - if ('resource' in options) { - req.resource = options.resource; - } - if ('labels' in options) { - req.labels = options.labels; - } - if ('partialSuccess' in options) { - req.partialSuccess = options.partialSuccess; - } - return this._writeLogEntries(req, options, callback); + return this._writeLogEntries(request, options, callback); }; /** @@ -330,57 +300,56 @@ LoggingServiceV2Api.prototype.writeLogEntries = function writeLogEntries( * Logging. For ways to export log entries, see * [Exporting Logs](https://cloud.google.com/logging/docs/export). * - * @param {string[]} projectIds + * @param {Object} request + * The request object that will be sent. + * @param {string[]} request.projectIds * Deprecated. One or more project identifiers or project numbers from which * to retrieve log entries. Examples: `"my-project-1A"`, `"1234567890"`. If * present, these project identifiers are converted to resource format and * added to the list of resources in `resourceNames`. Callers should use * `resourceNames` rather than this parameter. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * - * In addition, options may contain the following optional parameters. - * @param {string[]=} options.resourceNames + * @param {string[]=} request.resourceNames * Optional. One or more cloud resources from which to retrieve log entries. * Example: `"projects/my-project-1A"`, `"projects/1234567890"`. Projects * listed in `projectIds` are added to this list. - * @param {string=} options.filter + * @param {string=} request.filter * Optional. A filter that chooses which log entries to return. See [Advanced * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that * match the filter are returned. An empty filter matches all log entries. - * @param {string=} options.orderBy + * @param {string=} request.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`. - * @param {number=} options.pageSize + * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object, ?string)=} callback * When specified, the results are not streamed but this callback * will be called with the response object representing [ListLogEntriesResponse]{@link ListLogEntriesResponse}. * The third item will be set if the response contains the token for the further results * and can be reused to `pageToken` field in the options in the next request. - * @returns {Stream|gax.EventEmitter} + * @returns {Stream|Promise} * An object stream which emits an object representing * [LogEntry]{@link LogEntry} on 'data' event. * When the callback is specified or streaming is suppressed through options, - * it will return an event emitter to handle the call status and the callback - * will be called with the response object. + * it will return a promise that resolves to the response object. The promise + * has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.loggingServiceV2Api(); * var projectIds = []; * // Iterate over all elements. - * api.listLogEntries(projectIds).on('data', function(element) { + * api.listLogEntries({projectIds: projectIds}).on('data', function(element) { * // doThingsWith(element) * }); * @@ -393,15 +362,12 @@ LoggingServiceV2Api.prototype.writeLogEntries = function writeLogEntries( * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listLogEntries(projectIds, {pageToken: nextPageToken}, callback); + * api.listLogEntries({projectIds: projectIds}, {pageToken: nextPageToken}, callback); * } * } - * api.listLogEntries(projectIds, {flattenPages: false}, callback); + * api.listLogEntries({projectIds: projectIds}, {flattenPages: false}, callback); */ -LoggingServiceV2Api.prototype.listLogEntries = function listLogEntries( - projectIds, - options, - callback) { +LoggingServiceV2Api.prototype.listLogEntries = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -409,57 +375,41 @@ LoggingServiceV2Api.prototype.listLogEntries = function listLogEntries( if (options === undefined) { options = {}; } - var req = { - projectIds: projectIds - }; - if ('resourceNames' in options) { - req.resourceNames = options.resourceNames; - } - if ('filter' in options) { - req.filter = options.filter; - } - if ('orderBy' in options) { - req.orderBy = options.orderBy; - } - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - return this._listLogEntries(req, options, callback); + return this._listLogEntries(request, options, callback); }; /** * Lists the monitored resource descriptors used by Stackdriver Logging. * - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * - * In addition, options may contain the following optional parameters. - * @param {number=} options.pageSize + * @param {Object} request + * The request object that will be sent. + * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object, ?string)=} callback * When specified, the results are not streamed but this callback * will be called with the response object representing [ListMonitoredResourceDescriptorsResponse]{@link ListMonitoredResourceDescriptorsResponse}. * The third item will be set if the response contains the token for the further results * and can be reused to `pageToken` field in the options in the next request. - * @returns {Stream|gax.EventEmitter} + * @returns {Stream|Promise} * An object stream which emits an object representing * [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} on 'data' event. * When the callback is specified or streaming is suppressed through options, - * it will return an event emitter to handle the call status and the callback - * will be called with the response object. + * it will return a promise that resolves to the response object. The promise + * has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.loggingServiceV2Api(); * * // Iterate over all elements. - * api.listMonitoredResourceDescriptors().on('data', function(element) { + * api.listMonitoredResourceDescriptors({}).on('data', function(element) { * // doThingsWith(element) * }); * @@ -472,15 +422,12 @@ LoggingServiceV2Api.prototype.listLogEntries = function listLogEntries( * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listMonitoredResourceDescriptors({pageToken: nextPageToken}, callback); + * api.listMonitoredResourceDescriptors({}, {pageToken: nextPageToken}, callback); * } * } - * api.listMonitoredResourceDescriptors({flattenPages: false}, callback); - * api.listMonitoredResourceDescriptors(function(err, response) { + * api.listMonitoredResourceDescriptors({}, {flattenPages: false}, callback); */ -LoggingServiceV2Api.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors( - options, - callback) { +LoggingServiceV2Api.prototype.listMonitoredResourceDescriptors = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -488,12 +435,7 @@ LoggingServiceV2Api.prototype.listMonitoredResourceDescriptors = function listMo if (options === undefined) { options = {}; } - var req = { - }; - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - return this._listMonitoredResourceDescriptors(req, options, callback); + return this._listMonitoredResourceDescriptors(request, options, callback); }; function LoggingServiceV2ApiBuilder(gaxGrpc) { diff --git a/handwritten/logging/src/v2/metrics_service_v2_api.js b/handwritten/logging/src/v2/metrics_service_v2_api.js index 0f27f45b188..5982217df24 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_api.js +++ b/handwritten/logging/src/v2/metrics_service_v2_api.js @@ -129,7 +129,7 @@ var METRIC_PATH_TEMPLATE = new gax.PathTemplate( * @param {String} project * @returns {String} */ -MetricsServiceV2Api.prototype.parentPath = function parentPath(project) { +MetricsServiceV2Api.prototype.parentPath = function(project) { return PARENT_PATH_TEMPLATE.render({ project: project }); @@ -141,8 +141,7 @@ MetricsServiceV2Api.prototype.parentPath = function parentPath(project) { * A fully-qualified path representing a parent resources. * @returns {String} - A string representing the project. */ -MetricsServiceV2Api.prototype.matchProjectFromParentName = - function matchProjectFromParentName(parentName) { +MetricsServiceV2Api.prototype.matchProjectFromParentName = function(parentName) { return PARENT_PATH_TEMPLATE.match(parentName).project; }; @@ -152,7 +151,7 @@ MetricsServiceV2Api.prototype.matchProjectFromParentName = * @param {String} metric * @returns {String} */ -MetricsServiceV2Api.prototype.metricPath = function metricPath(project, metric) { +MetricsServiceV2Api.prototype.metricPath = function(project, metric) { return METRIC_PATH_TEMPLATE.render({ project: project, metric: metric @@ -165,8 +164,7 @@ MetricsServiceV2Api.prototype.metricPath = function metricPath(project, metric) * A fully-qualified path representing a metric resources. * @returns {String} - A string representing the project. */ -MetricsServiceV2Api.prototype.matchProjectFromMetricName = - function matchProjectFromMetricName(metricName) { +MetricsServiceV2Api.prototype.matchProjectFromMetricName = function(metricName) { return METRIC_PATH_TEMPLATE.match(metricName).project; }; @@ -176,8 +174,7 @@ MetricsServiceV2Api.prototype.matchProjectFromMetricName = * A fully-qualified path representing a metric resources. * @returns {String} - A string representing the metric. */ -MetricsServiceV2Api.prototype.matchMetricFromMetricName = - function matchMetricFromMetricName(metricName) { +MetricsServiceV2Api.prototype.matchMetricFromMetricName = function(metricName) { return METRIC_PATH_TEMPLATE.match(metricName).metric; }; @@ -186,39 +183,38 @@ MetricsServiceV2Api.prototype.matchMetricFromMetricName = /** * Lists logs-based metrics. * - * @param {string} parent + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent * Required. The resource name containing the metrics. * Example: `"projects/my-project-id"`. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * - * In addition, options may contain the following optional parameters. - * @param {number=} options.pageSize + * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object, ?string)=} callback * When specified, the results are not streamed but this callback * will be called with the response object representing [ListLogMetricsResponse]{@link ListLogMetricsResponse}. * The third item will be set if the response contains the token for the further results * and can be reused to `pageToken` field in the options in the next request. - * @returns {Stream|gax.EventEmitter} + * @returns {Stream|Promise} * An object stream which emits an object representing * [LogMetric]{@link LogMetric} on 'data' event. * When the callback is specified or streaming is suppressed through options, - * it will return an event emitter to handle the call status and the callback - * will be called with the response object. + * it will return a promise that resolves to the response object. The promise + * has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.metricsServiceV2Api(); * var formattedParent = api.parentPath("[PROJECT]"); * // Iterate over all elements. - * api.listLogMetrics(formattedParent).on('data', function(element) { + * api.listLogMetrics({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) * }); * @@ -231,15 +227,12 @@ MetricsServiceV2Api.prototype.matchMetricFromMetricName = * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listLogMetrics(formattedParent, {pageToken: nextPageToken}, callback); + * api.listLogMetrics({parent: formattedParent}, {pageToken: nextPageToken}, callback); * } * } - * api.listLogMetrics(formattedParent, {flattenPages: false}, callback); + * api.listLogMetrics({parent: formattedParent}, {flattenPages: false}, callback); */ -MetricsServiceV2Api.prototype.listLogMetrics = function listLogMetrics( - parent, - options, - callback) { +MetricsServiceV2Api.prototype.listLogMetrics = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -247,19 +240,15 @@ MetricsServiceV2Api.prototype.listLogMetrics = function listLogMetrics( if (options === undefined) { options = {}; } - var req = { - parent: parent - }; - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - return this._listLogMetrics(req, options, callback); + return this._listLogMetrics(request, options, callback); }; /** * Gets a logs-based metric. * - * @param {string} metricName + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName * The resource name of the desired metric. * Example: `"projects/my-project-id/metrics/my-metric-id"`. * @param {Object=} options @@ -269,25 +258,20 @@ MetricsServiceV2Api.prototype.listLogMetrics = function listLogMetrics( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.metricsServiceV2Api(); * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); - * api.getLogMetric(formattedMetricName, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * api.getLogMetric({metricName: formattedMetricName}).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -MetricsServiceV2Api.prototype.getLogMetric = function getLogMetric( - metricName, - options, - callback) { +MetricsServiceV2Api.prototype.getLogMetric = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -295,21 +279,20 @@ MetricsServiceV2Api.prototype.getLogMetric = function getLogMetric( if (options === undefined) { options = {}; } - var req = { - metricName: metricName - }; - return this._getLogMetric(req, options, callback); + return this._getLogMetric(request, options, callback); }; /** * Creates a logs-based metric. * - * @param {string} parent + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent * The resource name of the project in which to create the metric. * Example: `"projects/my-project-id"`. * * The new metric must be provided in the request. - * @param {Object} metric + * @param {Object} request.metric * The new logs-based metric, which must not have an identifier that * already exists. * @@ -321,27 +304,25 @@ MetricsServiceV2Api.prototype.getLogMetric = function getLogMetric( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.metricsServiceV2Api(); * var formattedParent = api.parentPath("[PROJECT]"); * var metric = {}; - * api.createLogMetric(formattedParent, metric, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * var request = { + * parent: formattedParent, + * metric: metric + * }; + * api.createLogMetric(request).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -MetricsServiceV2Api.prototype.createLogMetric = function createLogMetric( - parent, - metric, - options, - callback) { +MetricsServiceV2Api.prototype.createLogMetric = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -349,24 +330,22 @@ MetricsServiceV2Api.prototype.createLogMetric = function createLogMetric( if (options === undefined) { options = {}; } - var req = { - parent: parent, - metric: metric - }; - return this._createLogMetric(req, options, callback); + return this._createLogMetric(request, options, callback); }; /** * Creates or updates a logs-based metric. * - * @param {string} metricName + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName * The resource name of the metric to update. * Example: `"projects/my-project-id/metrics/my-metric-id"`. * * The updated metric must be provided in the request and have the * same identifier that is specified in `metricName`. * If the metric does not exist, it is created. - * @param {Object} metric + * @param {Object} request.metric * The updated metric, whose name must be the same as the * metric identifier in `metricName`. If `metricName` does not * exist, then a new metric is created. @@ -379,27 +358,25 @@ MetricsServiceV2Api.prototype.createLogMetric = function createLogMetric( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.metricsServiceV2Api(); * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); * var metric = {}; - * api.updateLogMetric(formattedMetricName, metric, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * var request = { + * metricName: formattedMetricName, + * metric: metric + * }; + * api.updateLogMetric(request).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -MetricsServiceV2Api.prototype.updateLogMetric = function updateLogMetric( - metricName, - metric, - options, - callback) { +MetricsServiceV2Api.prototype.updateLogMetric = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -407,17 +384,15 @@ MetricsServiceV2Api.prototype.updateLogMetric = function updateLogMetric( if (options === undefined) { options = {}; } - var req = { - metricName: metricName, - metric: metric - }; - return this._updateLogMetric(req, options, callback); + return this._updateLogMetric(request, options, callback); }; /** * Deletes a logs-based metric. * - * @param {string} metricName + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName * The resource name of the metric to delete. * Example: `"projects/my-project-id/metrics/my-metric-id"`. * @param {Object=} options @@ -425,23 +400,18 @@ MetricsServiceV2Api.prototype.updateLogMetric = function updateLogMetric( * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = loggingV2.metricsServiceV2Api(); * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); - * api.deleteLogMetric(formattedMetricName, function(err) { - * if (err) { - * console.error(err); - * } + * api.deleteLogMetric({metricName: formattedMetricName}).catch(function(err) { + * console.error(err); * }); */ -MetricsServiceV2Api.prototype.deleteLogMetric = function deleteLogMetric( - metricName, - options, - callback) { +MetricsServiceV2Api.prototype.deleteLogMetric = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -449,10 +419,7 @@ MetricsServiceV2Api.prototype.deleteLogMetric = function deleteLogMetric( if (options === undefined) { options = {}; } - var req = { - metricName: metricName - }; - return this._deleteLogMetric(req, options, callback); + return this._deleteLogMetric(request, options, callback); }; function MetricsServiceV2ApiBuilder(gaxGrpc) { From 771ae832db252bf42f9fe9bd78d96992be19a349 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 21 Oct 2016 16:51:27 -0400 Subject: [PATCH 0028/1029] logging @ 0.5.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 89f93222c64..67e6ca0ca70 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.4.0", + "version": "0.5.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From e60333d27d636d27c1d7b9488a249a1c4399d50e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Nov 2016 11:16:08 -0500 Subject: [PATCH 0029/1029] docs: update API key generation steps (#1791) --- handwritten/logging/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 4757b2b0d4e..2a937c0bbf8 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -90,8 +90,8 @@ If you are not running this client on Google Compute Engine, you need a Google D 3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services): * Stackdriver Logging API 4. Navigate to **APIs & auth** > **Credentials** and then: - * If you want to use a new service account, click on **Create new Client ID** and select **Service account**. After the account is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. - * If you want to generate a new key for an existing service account, click on **Generate new JSON key** and download the JSON key file. + * If you want to use a new service account key, click on **Create credentials** and select **Service account key**. After the account key is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. + * If you want to generate a new service account key for an existing service account, click on **Generate new JSON key** and download the JSON key file. ``` js var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' From 570e3d1b39aa370d3a87112b5bdfa11eba53baba Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Nov 2016 14:39:40 -0500 Subject: [PATCH 0030/1029] update dependencies --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 67e6ca0ca70..24892938776 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,10 +52,10 @@ "stackdriver" ], "dependencies": { - "@google-cloud/common": "^0.7.0", + "@google-cloud/common": "^0.8.0", "arrify": "^1.0.0", "extend": "^3.0.0", - "google-gax": "^0.8.1", + "google-gax": "^0.9.1", "google-proto-files": "^0.8.0", "is": "^3.0.1", "is-circular": "^1.0.1", From 530a8ed8186c96a90743487515a9010a9460778d Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Nov 2016 16:30:09 -0500 Subject: [PATCH 0031/1029] logging @ 0.5.1 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 24892938776..fa79d494776 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.5.0", + "version": "0.5.1", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 8465eba7dec7c8523033b55c47b9c302cbc23b61 Mon Sep 17 00:00:00 2001 From: Cristian Cavalli Date: Mon, 21 Nov 2016 04:53:30 -0800 Subject: [PATCH 0032/1029] Update README - GCS Signature (#1807) Update the readme to match the current GCS IIFE invocation signature. Without updated signature invoking on property bucket will cause an exception to be thrown. --- handwritten/logging/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 2a937c0bbf8..db624cf152b 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -18,7 +18,10 @@ var logging = require('@google-cloud/logging')({ // Create a sink using a Bucket as a destination. // $ npm install --save @google-cloud/storage -var gcs = require('@google-cloud/storage'); +var gcs = require('@google-cloud/storage')({ + projectId: 'grape-spaceship-123', + keyFilename: '/path/to/keyfile.json' +}); logging.createSink('my-new-sink', { destination: gcs.bucket('my-sink') From 41f4a77b8b58586a027b99c53b0f9422399ba5a6 Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Wed, 23 Nov 2016 13:15:53 -0800 Subject: [PATCH 0033/1029] Regenerate logging API client. (#1817) --- handwritten/logging/package.json | 2 +- ..._v2_api.js => config_service_v2_client.js} | 271 +++++++++---- handwritten/logging/src/v2/index.js | 16 +- ...v2_api.js => logging_service_v2_client.js} | 370 +++++++++++++----- ...v2_api.js => metrics_service_v2_client.js} | 253 ++++++++---- 5 files changed, 642 insertions(+), 270 deletions(-) rename handwritten/logging/src/v2/{config_service_v2_api.js => config_service_v2_client.js} (57%) rename handwritten/logging/src/v2/{logging_service_v2_api.js => logging_service_v2_client.js} (50%) rename handwritten/logging/src/v2/{metrics_service_v2_api.js => metrics_service_v2_client.js} (59%) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fa79d494776..c8c09a8d4f7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "@google-cloud/common": "^0.8.0", "arrify": "^1.0.0", "extend": "^3.0.0", - "google-gax": "^0.9.1", + "google-gax": "^0.10.0", "google-proto-files": "^0.8.0", "is": "^3.0.1", "is-circular": "^1.0.1", diff --git a/handwritten/logging/src/v2/config_service_v2_api.js b/handwritten/logging/src/v2/config_service_v2_client.js similarity index 57% rename from handwritten/logging/src/v2/config_service_v2_api.js rename to handwritten/logging/src/v2/config_service_v2_client.js index 03391cc3681..ff9b0c1c7e9 100644 --- a/handwritten/logging/src/v2/config_service_v2_api.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -37,7 +37,6 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; - var PAGE_DESCRIPTORS = { listSinks: new gax.PageDescriptor( 'pageToken', @@ -58,22 +57,22 @@ var ALL_SCOPES = [ ]; /** - * Service for configuring sinks used to export log entries outside Stackdriver - * Logging. + * Service for configuring sinks used to export log entries outside of + * Stackdriver Logging. * * This will be created through a builder function which can be obtained by the module. * See the following example of how to initialize the module and how to access to the builder. - * @see {@link configServiceV2Api} + * @see {@link configServiceV2Client} * * @example * var loggingV2 = require('@google-cloud/logging').v2({ * // optional auth parameters. * }); - * var api = loggingV2.configServiceV2Api(); + * var client = loggingV2.configServiceV2Client(); * * @class */ -function ConfigServiceV2Api(gaxGrpc, grpcClients, opts) { +function ConfigServiceV2Client(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; @@ -92,8 +91,6 @@ function ConfigServiceV2Api(gaxGrpc, grpcClients, opts) { 'google.logging.v2.ConfigServiceV2', configData, clientConfig, - PAGE_DESCRIPTORS, - null, {'x-goog-api-client': googleApiClient}); var configServiceV2Stub = gaxGrpc.createStub( @@ -113,7 +110,8 @@ function ConfigServiceV2Api(gaxGrpc, grpcClients, opts) { configServiceV2Stub.then(function(configServiceV2Stub) { return configServiceV2Stub[methodName].bind(configServiceV2Stub); }), - defaults[methodName]); + defaults[methodName], + PAGE_DESCRIPTORS[methodName]); }.bind(this)); } @@ -130,7 +128,7 @@ var SINK_PATH_TEMPLATE = new gax.PathTemplate( * @param {String} project * @returns {String} */ -ConfigServiceV2Api.prototype.parentPath = function(project) { +ConfigServiceV2Client.prototype.parentPath = function(project) { return PARENT_PATH_TEMPLATE.render({ project: project }); @@ -142,7 +140,7 @@ ConfigServiceV2Api.prototype.parentPath = function(project) { * A fully-qualified path representing a parent resources. * @returns {String} - A string representing the project. */ -ConfigServiceV2Api.prototype.matchProjectFromParentName = function(parentName) { +ConfigServiceV2Client.prototype.matchProjectFromParentName = function(parentName) { return PARENT_PATH_TEMPLATE.match(parentName).project; }; @@ -152,7 +150,7 @@ ConfigServiceV2Api.prototype.matchProjectFromParentName = function(parentName) { * @param {String} sink * @returns {String} */ -ConfigServiceV2Api.prototype.sinkPath = function(project, sink) { +ConfigServiceV2Client.prototype.sinkPath = function(project, sink) { return SINK_PATH_TEMPLATE.render({ project: project, sink: sink @@ -165,7 +163,7 @@ ConfigServiceV2Api.prototype.sinkPath = function(project, sink) { * A fully-qualified path representing a sink resources. * @returns {String} - A string representing the project. */ -ConfigServiceV2Api.prototype.matchProjectFromSinkName = function(sinkName) { +ConfigServiceV2Client.prototype.matchProjectFromSinkName = function(sinkName) { return SINK_PATH_TEMPLATE.match(sinkName).project; }; @@ -175,7 +173,7 @@ ConfigServiceV2Api.prototype.matchProjectFromSinkName = function(sinkName) { * A fully-qualified path representing a sink resources. * @returns {String} - A string representing the sink. */ -ConfigServiceV2Api.prototype.matchSinkFromSinkName = function(sinkName) { +ConfigServiceV2Client.prototype.matchSinkFromSinkName = function(sinkName) { return SINK_PATH_TEMPLATE.match(sinkName).sink; }; @@ -187,8 +185,10 @@ ConfigServiceV2Api.prototype.matchSinkFromSinkName = function(sinkName) { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The cloud resource containing the sinks. - * Example: `"projects/my-logging-project"`. + * Required. The resource name where this sink was created: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -198,42 +198,64 @@ ConfigServiceV2Api.prototype.matchSinkFromSinkName = function(sinkName) { * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object, ?string)=} callback - * When specified, the results are not streamed but this callback - * will be called with the response object representing [ListSinksResponse]{@link ListSinksResponse}. - * The third item will be set if the response contains the token for the further results - * and can be reused to `pageToken` field in the options in the next request. - * @returns {Stream|Promise} - * An object stream which emits an object representing - * [LogSink]{@link LogSink} on 'data' event. - * When the callback is specified or streaming is suppressed through options, - * it will return a promise that resolves to the response object. The promise - * has a method named "cancel" which cancels the ongoing API call. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [LogSink]{@link LogSink}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListSinksResponse]{@link ListSinksResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogSink]{@link LogSink}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogSink]{@link LogSink} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListSinksResponse]{@link ListSinksResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.configServiceV2Api(); - * var formattedParent = api.parentPath("[PROJECT]"); + * var client = loggingV2.configServiceV2Client(); + * var formattedParent = client.parentPath("[PROJECT]"); * // Iterate over all elements. - * api.listSinks({parent: formattedParent}).on('data', function(element) { - * // doThingsWith(element) + * client.listSinks({parent: formattedParent}).then(function(responses) { + * var resources = responses[0]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]) + * } + * }).catch(function(err) { + * console.error(err); * }); * - * // Or obtain the paged response through the callback. - * function callback(err, response, nextPageToken) { - * if (err) { - * console.error(err); - * return; + * // Or obtain the paged response. + * var options = {autoPaginate: false}; + * function callback(responses) { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows there's more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]); * } - * // doThingsWith(response) - * if (nextPageToken) { - * // fetch the next page. - * api.listSinks({parent: formattedParent}, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listSinks(nextRequest, options).then(callback); * } * } - * api.listSinks({parent: formattedParent}, {flattenPages: false}, callback); + * client.listSinks({parent: formattedParent}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -ConfigServiceV2Api.prototype.listSinks = function(request, options, callback) { +ConfigServiceV2Client.prototype.listSinks = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -241,38 +263,93 @@ ConfigServiceV2Api.prototype.listSinks = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._listSinks(request, options, callback); }; +/** + * Equivalent to {@link listSinks}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listSinks} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name where this sink was created: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @return {Stream} + * An object stream which emits an object representing [LogSink]{@link LogSink} on 'data' event. + * + * @example + * + * var client = loggingV2.configServiceV2Client(); + * var formattedParent = client.parentPath("[PROJECT]"); + * client.listSinksStream({parent: formattedParent}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', funciton(err) { + * console.error(err); + * }); + */ +ConfigServiceV2Client.prototype.listSinksStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listSinks.createStream(this._listSinks, request, options); +}; + /** * Gets a sink. * * @param {Object} request * The request object that will be sent. * @param {string} request.sinkName - * Required. The resource name of the sink to return. - * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * Required. The resource name of the sink to return: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogSink]{@link LogSink} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [LogSink]{@link LogSink}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link LogSink}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.configServiceV2Api(); - * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); - * api.getSink({sinkName: formattedSinkName}).then(function(response) { + * var client = loggingV2.configServiceV2Client(); + * var formattedSinkName = client.sinkPath("[PROJECT]", "[SINK]"); + * client.getSink({sinkName: formattedSinkName}).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -ConfigServiceV2Api.prototype.getSink = function(request, options, callback) { +ConfigServiceV2Client.prototype.getSink = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -280,6 +357,7 @@ ConfigServiceV2Api.prototype.getSink = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._getSink(request, options, callback); }; @@ -289,40 +367,49 @@ ConfigServiceV2Api.prototype.getSink = function(request, options, callback) { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource in which to create the sink. - * Example: `"projects/my-project-id"`. - * The new sink must be provided in the request. + * Required. The resource in which to create the sink: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" * @param {Object} request.sink * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. * * This object should have the same structure as [LogSink]{@link LogSink} + * @param {boolean=} request.uniqueWriterIdentity + * Optional. Whether the sink will have a dedicated service account returned + * in the sink's writer_identity. Set this field to be true to export + * logs from one project to a different project. This field is ignored for + * non-project sinks (e.g. organization sinks) because those sinks are + * required to have dedicated service accounts. * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogSink]{@link LogSink} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [LogSink]{@link LogSink}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link LogSink}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.configServiceV2Api(); - * var formattedParent = api.parentPath("[PROJECT]"); + * var client = loggingV2.configServiceV2Client(); + * var formattedParent = client.parentPath("[PROJECT]"); * var sink = {}; * var request = { * parent: formattedParent, * sink: sink * }; - * api.createSink(request).then(function(response) { + * client.createSink(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -ConfigServiceV2Api.prototype.createSink = function(request, options, callback) { +ConfigServiceV2Client.prototype.createSink = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -330,6 +417,7 @@ ConfigServiceV2Api.prototype.createSink = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._createSink(request, options, callback); }; @@ -340,40 +428,52 @@ ConfigServiceV2Api.prototype.createSink = function(request, options, callback) { * The request object that will be sent. * @param {string} request.sinkName * Required. The resource name of the sink to update, including the parent - * resource and the sink identifier. If the sink does not exist, this method - * creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. + * 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 {Object} request.sink * Required. The updated sink, whose name is the same identifier that appears * as part of `sinkName`. If `sinkName` does not exist, then * this method creates a new sink. * * This object should have the same structure as [LogSink]{@link LogSink} + * @param {boolean=} request.uniqueWriterIdentity + * Optional. Whether the sink will have a dedicated service account returned + * in the sink's writer_identity. Set this field to be true to export + * logs from one project to a different project. This field is ignored for + * non-project sinks (e.g. organization sinks) because those sinks are + * required to have dedicated service accounts. * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogSink]{@link LogSink} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [LogSink]{@link LogSink}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link LogSink}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.configServiceV2Api(); - * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); + * var client = loggingV2.configServiceV2Client(); + * var formattedSinkName = client.sinkPath("[PROJECT]", "[SINK]"); * var sink = {}; * var request = { * sinkName: formattedSinkName, * sink: sink * }; - * api.updateSink(request).then(function(response) { + * client.updateSink(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -ConfigServiceV2Api.prototype.updateSink = function(request, options, callback) { +ConfigServiceV2Client.prototype.updateSink = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -381,6 +481,7 @@ ConfigServiceV2Api.prototype.updateSink = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._updateSink(request, options, callback); }; @@ -391,26 +492,29 @@ ConfigServiceV2Api.prototype.updateSink = function(request, options, callback) { * The request object that will be sent. * @param {string} request.sinkName * Required. The resource name of the sink to delete, including the parent - * resource and the sink identifier. Example: - * `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink - * does not exist. + * 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. * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves to the response object. + * @return {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.configServiceV2Api(); - * var formattedSinkName = api.sinkPath("[PROJECT]", "[SINK]"); - * api.deleteSink({sinkName: formattedSinkName}).catch(function(err) { + * var client = loggingV2.configServiceV2Client(); + * var formattedSinkName = client.sinkPath("[PROJECT]", "[SINK]"); + * client.deleteSink({sinkName: formattedSinkName}).catch(function(err) { * console.error(err); * }); */ -ConfigServiceV2Api.prototype.deleteSink = function(request, options, callback) { +ConfigServiceV2Client.prototype.deleteSink = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -418,12 +522,13 @@ ConfigServiceV2Api.prototype.deleteSink = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._deleteSink(request, options, callback); }; -function ConfigServiceV2ApiBuilder(gaxGrpc) { - if (!(this instanceof ConfigServiceV2ApiBuilder)) { - return new ConfigServiceV2ApiBuilder(gaxGrpc); +function ConfigServiceV2ClientBuilder(gaxGrpc) { + if (!(this instanceof ConfigServiceV2ClientBuilder)) { + return new ConfigServiceV2ClientBuilder(gaxGrpc); } var configServiceV2Client = gaxGrpc.load([{ @@ -437,7 +542,7 @@ function ConfigServiceV2ApiBuilder(gaxGrpc) { }; /** - * Build a new instance of {@link ConfigServiceV2Api}. + * Build a new instance of {@link ConfigServiceV2Client}. * * @param {Object=} opts - The optional parameters. * @param {String=} opts.servicePath @@ -454,11 +559,11 @@ function ConfigServiceV2ApiBuilder(gaxGrpc) { * @param {String=} opts.appVersion * The version of the calling service. */ - this.configServiceV2Api = function(opts) { - return new ConfigServiceV2Api(gaxGrpc, grpcClients, opts); + this.configServiceV2Client = function(opts) { + return new ConfigServiceV2Client(gaxGrpc, grpcClients, opts); }; - extend(this.configServiceV2Api, ConfigServiceV2Api); + extend(this.configServiceV2Client, ConfigServiceV2Client); } -module.exports = ConfigServiceV2ApiBuilder; +module.exports = ConfigServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/src/v2/index.js index 309e3183971..115c482b02e 100644 --- a/handwritten/logging/src/v2/index.js +++ b/handwritten/logging/src/v2/index.js @@ -15,9 +15,9 @@ */ 'use strict'; -var configServiceV2Api = require('./config_service_v2_api'); -var loggingServiceV2Api = require('./logging_service_v2_api'); -var metricsServiceV2Api = require('./metrics_service_v2_api'); +var configServiceV2Client = require('./config_service_v2_client'); +var loggingServiceV2Client = require('./logging_service_v2_client'); +var metricsServiceV2Client = require('./metrics_service_v2_client'); var extend = require('extend'); var gax = require('google-gax'); @@ -27,12 +27,12 @@ function v2(options) { }, options); var gaxGrpc = gax.grpc(options); var result = {}; - extend(result, configServiceV2Api(gaxGrpc)); - extend(result, loggingServiceV2Api(gaxGrpc)); - extend(result, metricsServiceV2Api(gaxGrpc)); + extend(result, configServiceV2Client(gaxGrpc)); + extend(result, loggingServiceV2Client(gaxGrpc)); + extend(result, metricsServiceV2Client(gaxGrpc)); return result; } -v2.SERVICE_ADDRESS = loggingServiceV2Api.SERVICE_ADDRESS; -v2.ALL_SCOPES = loggingServiceV2Api.ALL_SCOPES; +v2.SERVICE_ADDRESS = loggingServiceV2Client.SERVICE_ADDRESS; +v2.ALL_SCOPES = loggingServiceV2Client.ALL_SCOPES; module.exports = v2; diff --git a/handwritten/logging/src/v2/logging_service_v2_api.js b/handwritten/logging/src/v2/logging_service_v2_client.js similarity index 50% rename from handwritten/logging/src/v2/logging_service_v2_api.js rename to handwritten/logging/src/v2/logging_service_v2_client.js index 9f98cdcbcd5..43988f94f0e 100644 --- a/handwritten/logging/src/v2/logging_service_v2_api.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -37,7 +37,6 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; - var PAGE_DESCRIPTORS = { listLogEntries: new gax.PageDescriptor( 'pageToken', @@ -66,17 +65,17 @@ var ALL_SCOPES = [ * * This will be created through a builder function which can be obtained by the module. * See the following example of how to initialize the module and how to access to the builder. - * @see {@link loggingServiceV2Api} + * @see {@link loggingServiceV2Client} * * @example * var loggingV2 = require('@google-cloud/logging').v2({ * // optional auth parameters. * }); - * var api = loggingV2.loggingServiceV2Api(); + * var client = loggingV2.loggingServiceV2Client(); * * @class */ -function LoggingServiceV2Api(gaxGrpc, grpcClients, opts) { +function LoggingServiceV2Client(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; @@ -95,8 +94,6 @@ function LoggingServiceV2Api(gaxGrpc, grpcClients, opts) { 'google.logging.v2.LoggingServiceV2', configData, clientConfig, - PAGE_DESCRIPTORS, - null, {'x-goog-api-client': googleApiClient}); var loggingServiceV2Stub = gaxGrpc.createStub( @@ -115,7 +112,8 @@ function LoggingServiceV2Api(gaxGrpc, grpcClients, opts) { loggingServiceV2Stub.then(function(loggingServiceV2Stub) { return loggingServiceV2Stub[methodName].bind(loggingServiceV2Stub); }), - defaults[methodName]); + defaults[methodName], + PAGE_DESCRIPTORS[methodName]); }.bind(this)); } @@ -132,7 +130,7 @@ var LOG_PATH_TEMPLATE = new gax.PathTemplate( * @param {String} project * @returns {String} */ -LoggingServiceV2Api.prototype.parentPath = function(project) { +LoggingServiceV2Client.prototype.parentPath = function(project) { return PARENT_PATH_TEMPLATE.render({ project: project }); @@ -144,7 +142,7 @@ LoggingServiceV2Api.prototype.parentPath = function(project) { * A fully-qualified path representing a parent resources. * @returns {String} - A string representing the project. */ -LoggingServiceV2Api.prototype.matchProjectFromParentName = function(parentName) { +LoggingServiceV2Client.prototype.matchProjectFromParentName = function(parentName) { return PARENT_PATH_TEMPLATE.match(parentName).project; }; @@ -154,7 +152,7 @@ LoggingServiceV2Api.prototype.matchProjectFromParentName = function(parentName) * @param {String} log * @returns {String} */ -LoggingServiceV2Api.prototype.logPath = function(project, log) { +LoggingServiceV2Client.prototype.logPath = function(project, log) { return LOG_PATH_TEMPLATE.render({ project: project, log: log @@ -167,7 +165,7 @@ LoggingServiceV2Api.prototype.logPath = function(project, log) { * A fully-qualified path representing a log resources. * @returns {String} - A string representing the project. */ -LoggingServiceV2Api.prototype.matchProjectFromLogName = function(logName) { +LoggingServiceV2Client.prototype.matchProjectFromLogName = function(logName) { return LOG_PATH_TEMPLATE.match(logName).project; }; @@ -177,38 +175,46 @@ LoggingServiceV2Api.prototype.matchProjectFromLogName = function(logName) { * A fully-qualified path representing a log resources. * @returns {String} - A string representing the log. */ -LoggingServiceV2Api.prototype.matchLogFromLogName = function(logName) { +LoggingServiceV2Client.prototype.matchLogFromLogName = function(logName) { return LOG_PATH_TEMPLATE.match(logName).log; }; // Service calls /** - * Deletes a log and all its log entries. - * The log will reappear if it receives new entries. + * Deletes all the log entries in a log. + * The log reappears if it receives new entries. * * @param {Object} request * The request object that will be sent. * @param {string} request.logName - * Required. The resource name of the log to delete. Example: - * `"projects/my-project/logs/syslog"`. + * 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 + * {@link LogEntry}. * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves to the response object. + * @return {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.loggingServiceV2Api(); - * var formattedLogName = api.logPath("[PROJECT]", "[LOG]"); - * api.deleteLog({logName: formattedLogName}).catch(function(err) { + * var client = loggingV2.loggingServiceV2Client(); + * var formattedLogName = client.logPath("[PROJECT]", "[LOG]"); + * client.deleteLog({logName: formattedLogName}).catch(function(err) { * console.error(err); * }); */ -LoggingServiceV2Api.prototype.deleteLog = function(request, options, callback) { +LoggingServiceV2Client.prototype.deleteLog = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -216,6 +222,7 @@ LoggingServiceV2Api.prototype.deleteLog = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._deleteLog(request, options, callback); }; @@ -239,8 +246,15 @@ LoggingServiceV2Api.prototype.deleteLog = function(request, options, callback) { * This object should have the same structure as [LogEntry]{@link LogEntry} * @param {string=} request.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`. Example: - * `"projects/my-project/logs/syslog"`. See + * 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 * {@link LogEntry}. * @param {Object=} request.resource * Optional. A default monitored resource object that is assigned to all log @@ -270,21 +284,23 @@ LoggingServiceV2Api.prototype.deleteLog = function(request, options, callback) { * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link WriteLogEntriesResponse} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link WriteLogEntriesResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WriteLogEntriesResponse]{@link WriteLogEntriesResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.loggingServiceV2Api(); + * var client = loggingV2.loggingServiceV2Client(); * var entries = []; - * api.writeLogEntries({entries: entries}).then(function(response) { + * client.writeLogEntries({entries: entries}).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -LoggingServiceV2Api.prototype.writeLogEntries = function(request, options, callback) { +LoggingServiceV2Client.prototype.writeLogEntries = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -292,6 +308,7 @@ LoggingServiceV2Api.prototype.writeLogEntries = function(request, options, callb if (options === undefined) { options = {}; } + return this._writeLogEntries(request, options, callback); }; @@ -302,20 +319,25 @@ LoggingServiceV2Api.prototype.writeLogEntries = function(request, options, callb * * @param {Object} request * The request object that will be sent. - * @param {string[]} request.projectIds + * @param {string[]} request.resourceNames + * Required. One or more cloud 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. + * @param {string[]=} request.projectIds * Deprecated. One or more project identifiers or project numbers from which - * to retrieve log entries. Examples: `"my-project-1A"`, `"1234567890"`. If + * to retrieve log entries. Example: `"my-project-1A"`. If * present, these project identifiers are converted to resource format and * added to the list of resources in `resourceNames`. Callers should use * `resourceNames` rather than this parameter. - * @param {string[]=} request.resourceNames - * Optional. One or more cloud resources from which to retrieve log entries. - * Example: `"projects/my-project-1A"`, `"projects/1234567890"`. Projects - * listed in `projectIds` are added to this list. * @param {string=} request.filter * Optional. A filter that chooses which log entries to return. See [Advanced * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that * match the filter are returned. An empty filter matches all log entries. + * The maximum length of the filter is 20000 characters. * @param {string=} request.orderBy * Optional. How the results should be sorted. Presently, the only permitted * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -332,42 +354,64 @@ LoggingServiceV2Api.prototype.writeLogEntries = function(request, options, callb * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object, ?string)=} callback - * When specified, the results are not streamed but this callback - * will be called with the response object representing [ListLogEntriesResponse]{@link ListLogEntriesResponse}. - * The third item will be set if the response contains the token for the further results - * and can be reused to `pageToken` field in the options in the next request. - * @returns {Stream|Promise} - * An object stream which emits an object representing - * [LogEntry]{@link LogEntry} on 'data' event. - * When the callback is specified or streaming is suppressed through options, - * it will return a promise that resolves to the response object. The promise - * has a method named "cancel" which cancels the ongoing API call. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [LogEntry]{@link LogEntry}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogEntriesResponse]{@link ListLogEntriesResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogEntry]{@link LogEntry}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogEntry]{@link LogEntry} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListLogEntriesResponse]{@link ListLogEntriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.loggingServiceV2Api(); - * var projectIds = []; + * var client = loggingV2.loggingServiceV2Client(); + * var resourceNames = []; * // Iterate over all elements. - * api.listLogEntries({projectIds: projectIds}).on('data', function(element) { - * // doThingsWith(element) + * client.listLogEntries({resourceNames: resourceNames}).then(function(responses) { + * var resources = responses[0]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]) + * } + * }).catch(function(err) { + * console.error(err); * }); * - * // Or obtain the paged response through the callback. - * function callback(err, response, nextPageToken) { - * if (err) { - * console.error(err); - * return; + * // Or obtain the paged response. + * var options = {autoPaginate: false}; + * function callback(responses) { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows there's more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]); * } - * // doThingsWith(response) - * if (nextPageToken) { - * // fetch the next page. - * api.listLogEntries({projectIds: projectIds}, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listLogEntries(nextRequest, options).then(callback); * } * } - * api.listLogEntries({projectIds: projectIds}, {flattenPages: false}, callback); + * client.listLogEntries({resourceNames: resourceNames}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -LoggingServiceV2Api.prototype.listLogEntries = function(request, options, callback) { +LoggingServiceV2Client.prototype.listLogEntries = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -375,9 +419,81 @@ LoggingServiceV2Api.prototype.listLogEntries = function(request, options, callba if (options === undefined) { options = {}; } + return this._listLogEntries(request, options, callback); }; +/** + * Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogEntries} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string[]} request.resourceNames + * Required. One or more cloud 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. + * @param {string[]=} request.projectIds + * Deprecated. 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 format and + * added to the list of resources in `resourceNames`. Callers should use + * `resourceNames` rather than this parameter. + * @param {string=} request.filter + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that + * match the filter are returned. An empty filter matches all log entries. + * The maximum length of the filter is 20000 characters. + * @param {string=} request.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`. + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @return {Stream} + * An object stream which emits an object representing [LogEntry]{@link LogEntry} on 'data' event. + * + * @example + * + * var client = loggingV2.loggingServiceV2Client(); + * var resourceNames = []; + * client.listLogEntriesStream({resourceNames: resourceNames}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', funciton(err) { + * console.error(err); + * }); + */ +LoggingServiceV2Client.prototype.listLogEntriesStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listLogEntries.createStream(this._listLogEntries, request, options); +}; + /** * Lists the monitored resource descriptors used by Stackdriver Logging. * @@ -392,42 +508,64 @@ LoggingServiceV2Api.prototype.listLogEntries = function(request, options, callba * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object, ?string)=} callback - * When specified, the results are not streamed but this callback - * will be called with the response object representing [ListMonitoredResourceDescriptorsResponse]{@link ListMonitoredResourceDescriptorsResponse}. - * The third item will be set if the response contains the token for the further results - * and can be reused to `pageToken` field in the options in the next request. - * @returns {Stream|Promise} - * An object stream which emits an object representing - * [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} on 'data' event. - * When the callback is specified or streaming is suppressed through options, - * it will return a promise that resolves to the response object. The promise - * has a method named "cancel" which cancels the ongoing API call. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListMonitoredResourceDescriptorsResponse]{@link ListMonitoredResourceDescriptorsResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListMonitoredResourceDescriptorsResponse]{@link ListMonitoredResourceDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.loggingServiceV2Api(); + * var client = loggingV2.loggingServiceV2Client(); * * // Iterate over all elements. - * api.listMonitoredResourceDescriptors({}).on('data', function(element) { - * // doThingsWith(element) + * client.listMonitoredResourceDescriptors({}).then(function(responses) { + * var resources = responses[0]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]) + * } + * }).catch(function(err) { + * console.error(err); * }); * - * // Or obtain the paged response through the callback. - * function callback(err, response, nextPageToken) { - * if (err) { - * console.error(err); - * return; + * // Or obtain the paged response. + * var options = {autoPaginate: false}; + * function callback(responses) { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows there's more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]); * } - * // doThingsWith(response) - * if (nextPageToken) { - * // fetch the next page. - * api.listMonitoredResourceDescriptors({}, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); * } * } - * api.listMonitoredResourceDescriptors({}, {flattenPages: false}, callback); + * client.listMonitoredResourceDescriptors({}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -LoggingServiceV2Api.prototype.listMonitoredResourceDescriptors = function(request, options, callback) { +LoggingServiceV2Client.prototype.listMonitoredResourceDescriptors = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -435,12 +573,58 @@ LoggingServiceV2Api.prototype.listMonitoredResourceDescriptors = function(reques if (options === undefined) { options = {}; } + return this._listMonitoredResourceDescriptors(request, options, callback); }; -function LoggingServiceV2ApiBuilder(gaxGrpc) { - if (!(this instanceof LoggingServiceV2ApiBuilder)) { - return new LoggingServiceV2ApiBuilder(gaxGrpc); +/** + * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @return {Stream} + * An object stream which emits an object representing [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} on 'data' event. + * + * @example + * + * var client = loggingV2.loggingServiceV2Client(); + * + * client.listMonitoredResourceDescriptorsStream({}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', funciton(err) { + * console.error(err); + * }); + */ +LoggingServiceV2Client.prototype.listMonitoredResourceDescriptorsStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listMonitoredResourceDescriptors.createStream(this._listMonitoredResourceDescriptors, request, options); +}; + +function LoggingServiceV2ClientBuilder(gaxGrpc) { + if (!(this instanceof LoggingServiceV2ClientBuilder)) { + return new LoggingServiceV2ClientBuilder(gaxGrpc); } var loggingServiceV2Client = gaxGrpc.load([{ @@ -454,7 +638,7 @@ function LoggingServiceV2ApiBuilder(gaxGrpc) { }; /** - * Build a new instance of {@link LoggingServiceV2Api}. + * Build a new instance of {@link LoggingServiceV2Client}. * * @param {Object=} opts - The optional parameters. * @param {String=} opts.servicePath @@ -471,11 +655,11 @@ function LoggingServiceV2ApiBuilder(gaxGrpc) { * @param {String=} opts.appVersion * The version of the calling service. */ - this.loggingServiceV2Api = function(opts) { - return new LoggingServiceV2Api(gaxGrpc, grpcClients, opts); + this.loggingServiceV2Client = function(opts) { + return new LoggingServiceV2Client(gaxGrpc, grpcClients, opts); }; - extend(this.loggingServiceV2Api, LoggingServiceV2Api); + extend(this.loggingServiceV2Client, LoggingServiceV2Client); } -module.exports = LoggingServiceV2ApiBuilder; +module.exports = LoggingServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/handwritten/logging/src/v2/metrics_service_v2_api.js b/handwritten/logging/src/v2/metrics_service_v2_client.js similarity index 59% rename from handwritten/logging/src/v2/metrics_service_v2_api.js rename to handwritten/logging/src/v2/metrics_service_v2_client.js index 5982217df24..c268f8fc3e3 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_api.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -37,7 +37,6 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; - var PAGE_DESCRIPTORS = { listLogMetrics: new gax.PageDescriptor( 'pageToken', @@ -62,17 +61,17 @@ var ALL_SCOPES = [ * * This will be created through a builder function which can be obtained by the module. * See the following example of how to initialize the module and how to access to the builder. - * @see {@link metricsServiceV2Api} + * @see {@link metricsServiceV2Client} * * @example * var loggingV2 = require('@google-cloud/logging').v2({ * // optional auth parameters. * }); - * var api = loggingV2.metricsServiceV2Api(); + * var client = loggingV2.metricsServiceV2Client(); * * @class */ -function MetricsServiceV2Api(gaxGrpc, grpcClients, opts) { +function MetricsServiceV2Client(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; @@ -91,8 +90,6 @@ function MetricsServiceV2Api(gaxGrpc, grpcClients, opts) { 'google.logging.v2.MetricsServiceV2', configData, clientConfig, - PAGE_DESCRIPTORS, - null, {'x-goog-api-client': googleApiClient}); var metricsServiceV2Stub = gaxGrpc.createStub( @@ -112,7 +109,8 @@ function MetricsServiceV2Api(gaxGrpc, grpcClients, opts) { metricsServiceV2Stub.then(function(metricsServiceV2Stub) { return metricsServiceV2Stub[methodName].bind(metricsServiceV2Stub); }), - defaults[methodName]); + defaults[methodName], + PAGE_DESCRIPTORS[methodName]); }.bind(this)); } @@ -129,7 +127,7 @@ var METRIC_PATH_TEMPLATE = new gax.PathTemplate( * @param {String} project * @returns {String} */ -MetricsServiceV2Api.prototype.parentPath = function(project) { +MetricsServiceV2Client.prototype.parentPath = function(project) { return PARENT_PATH_TEMPLATE.render({ project: project }); @@ -141,7 +139,7 @@ MetricsServiceV2Api.prototype.parentPath = function(project) { * A fully-qualified path representing a parent resources. * @returns {String} - A string representing the project. */ -MetricsServiceV2Api.prototype.matchProjectFromParentName = function(parentName) { +MetricsServiceV2Client.prototype.matchProjectFromParentName = function(parentName) { return PARENT_PATH_TEMPLATE.match(parentName).project; }; @@ -151,7 +149,7 @@ MetricsServiceV2Api.prototype.matchProjectFromParentName = function(parentName) * @param {String} metric * @returns {String} */ -MetricsServiceV2Api.prototype.metricPath = function(project, metric) { +MetricsServiceV2Client.prototype.metricPath = function(project, metric) { return METRIC_PATH_TEMPLATE.render({ project: project, metric: metric @@ -164,7 +162,7 @@ MetricsServiceV2Api.prototype.metricPath = function(project, metric) { * A fully-qualified path representing a metric resources. * @returns {String} - A string representing the project. */ -MetricsServiceV2Api.prototype.matchProjectFromMetricName = function(metricName) { +MetricsServiceV2Client.prototype.matchProjectFromMetricName = function(metricName) { return METRIC_PATH_TEMPLATE.match(metricName).project; }; @@ -174,7 +172,7 @@ MetricsServiceV2Api.prototype.matchProjectFromMetricName = function(metricName) * A fully-qualified path representing a metric resources. * @returns {String} - A string representing the metric. */ -MetricsServiceV2Api.prototype.matchMetricFromMetricName = function(metricName) { +MetricsServiceV2Client.prototype.matchMetricFromMetricName = function(metricName) { return METRIC_PATH_TEMPLATE.match(metricName).metric; }; @@ -186,8 +184,9 @@ MetricsServiceV2Api.prototype.matchMetricFromMetricName = function(metricName) { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name containing the metrics. - * Example: `"projects/my-project-id"`. + * Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -197,42 +196,64 @@ MetricsServiceV2Api.prototype.matchMetricFromMetricName = function(metricName) { * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object, ?string)=} callback - * When specified, the results are not streamed but this callback - * will be called with the response object representing [ListLogMetricsResponse]{@link ListLogMetricsResponse}. - * The third item will be set if the response contains the token for the further results - * and can be reused to `pageToken` field in the options in the next request. - * @returns {Stream|Promise} - * An object stream which emits an object representing - * [LogMetric]{@link LogMetric} on 'data' event. - * When the callback is specified or streaming is suppressed through options, - * it will return a promise that resolves to the response object. The promise - * has a method named "cancel" which cancels the ongoing API call. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [LogMetric]{@link LogMetric}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogMetricsResponse]{@link ListLogMetricsResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogMetric]{@link LogMetric}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogMetric]{@link LogMetric} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListLogMetricsResponse]{@link ListLogMetricsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.metricsServiceV2Api(); - * var formattedParent = api.parentPath("[PROJECT]"); + * var client = loggingV2.metricsServiceV2Client(); + * var formattedParent = client.parentPath("[PROJECT]"); * // Iterate over all elements. - * api.listLogMetrics({parent: formattedParent}).on('data', function(element) { - * // doThingsWith(element) + * client.listLogMetrics({parent: formattedParent}).then(function(responses) { + * var resources = responses[0]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]) + * } + * }).catch(function(err) { + * console.error(err); * }); * - * // Or obtain the paged response through the callback. - * function callback(err, response, nextPageToken) { - * if (err) { - * console.error(err); - * return; + * // Or obtain the paged response. + * var options = {autoPaginate: false}; + * function callback(responses) { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows there's more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]); * } - * // doThingsWith(response) - * if (nextPageToken) { - * // fetch the next page. - * api.listLogMetrics({parent: formattedParent}, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listLogMetrics(nextRequest, options).then(callback); * } * } - * api.listLogMetrics({parent: formattedParent}, {flattenPages: false}, callback); + * client.listLogMetrics({parent: formattedParent}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -MetricsServiceV2Api.prototype.listLogMetrics = function(request, options, callback) { +MetricsServiceV2Client.prototype.listLogMetrics = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -240,38 +261,91 @@ MetricsServiceV2Api.prototype.listLogMetrics = function(request, options, callba if (options === undefined) { options = {}; } + return this._listLogMetrics(request, options, callback); }; +/** + * Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogMetrics} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @return {Stream} + * An object stream which emits an object representing [LogMetric]{@link LogMetric} on 'data' event. + * + * @example + * + * var client = loggingV2.metricsServiceV2Client(); + * var formattedParent = client.parentPath("[PROJECT]"); + * client.listLogMetricsStream({parent: formattedParent}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', funciton(err) { + * console.error(err); + * }); + */ +MetricsServiceV2Client.prototype.listLogMetricsStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listLogMetrics.createStream(this._listLogMetrics, request, options); +}; + /** * Gets a logs-based metric. * * @param {Object} request * The request object that will be sent. * @param {string} request.metricName - * The resource name of the desired metric. - * Example: `"projects/my-project-id/metrics/my-metric-id"`. + * The resource name of the desired metric: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link LogMetric}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.metricsServiceV2Api(); - * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); - * api.getLogMetric({metricName: formattedMetricName}).then(function(response) { + * var client = loggingV2.metricsServiceV2Client(); + * var formattedMetricName = client.metricPath("[PROJECT]", "[METRIC]"); + * client.getLogMetric({metricName: formattedMetricName}).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -MetricsServiceV2Api.prototype.getLogMetric = function(request, options, callback) { +MetricsServiceV2Client.prototype.getLogMetric = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -279,6 +353,7 @@ MetricsServiceV2Api.prototype.getLogMetric = function(request, options, callback if (options === undefined) { options = {}; } + return this._getLogMetric(request, options, callback); }; @@ -288,8 +363,9 @@ MetricsServiceV2Api.prototype.getLogMetric = function(request, options, callback * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The resource name of the project in which to create the metric. - * Example: `"projects/my-project-id"`. + * 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 {Object} request.metric @@ -303,26 +379,28 @@ MetricsServiceV2Api.prototype.getLogMetric = function(request, options, callback * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link LogMetric}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.metricsServiceV2Api(); - * var formattedParent = api.parentPath("[PROJECT]"); + * var client = loggingV2.metricsServiceV2Client(); + * var formattedParent = client.parentPath("[PROJECT]"); * var metric = {}; * var request = { * parent: formattedParent, * metric: metric * }; - * api.createLogMetric(request).then(function(response) { + * client.createLogMetric(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -MetricsServiceV2Api.prototype.createLogMetric = function(request, options, callback) { +MetricsServiceV2Client.prototype.createLogMetric = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -330,6 +408,7 @@ MetricsServiceV2Api.prototype.createLogMetric = function(request, options, callb if (options === undefined) { options = {}; } + return this._createLogMetric(request, options, callback); }; @@ -339,16 +418,15 @@ MetricsServiceV2Api.prototype.createLogMetric = function(request, options, callb * @param {Object} request * The request object that will be sent. * @param {string} request.metricName - * The resource name of the metric to update. - * Example: `"projects/my-project-id/metrics/my-metric-id"`. + * The resource name of the metric to update: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * - * The updated metric must be provided in the request and have the - * same identifier that is specified in `metricName`. - * If the metric does not exist, it is created. + * 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 {Object} request.metric - * The updated metric, whose name must be the same as the - * metric identifier in `metricName`. If `metricName` does not - * exist, then a new metric is created. + * The updated metric. * * This object should have the same structure as [LogMetric]{@link LogMetric} * @param {Object=} options @@ -357,26 +435,28 @@ MetricsServiceV2Api.prototype.createLogMetric = function(request, options, callb * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link LogMetric}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.metricsServiceV2Api(); - * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); + * var client = loggingV2.metricsServiceV2Client(); + * var formattedMetricName = client.metricPath("[PROJECT]", "[METRIC]"); * var metric = {}; * var request = { * metricName: formattedMetricName, * metric: metric * }; - * api.updateLogMetric(request).then(function(response) { + * client.updateLogMetric(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -MetricsServiceV2Api.prototype.updateLogMetric = function(request, options, callback) { +MetricsServiceV2Client.prototype.updateLogMetric = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -384,6 +464,7 @@ MetricsServiceV2Api.prototype.updateLogMetric = function(request, options, callb if (options === undefined) { options = {}; } + return this._updateLogMetric(request, options, callback); }; @@ -393,25 +474,26 @@ MetricsServiceV2Api.prototype.updateLogMetric = function(request, options, callb * @param {Object} request * The request object that will be sent. * @param {string} request.metricName - * The resource name of the metric to delete. - * Example: `"projects/my-project-id/metrics/my-metric-id"`. + * The resource name of the metric to delete: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves to the response object. + * @return {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = loggingV2.metricsServiceV2Api(); - * var formattedMetricName = api.metricPath("[PROJECT]", "[METRIC]"); - * api.deleteLogMetric({metricName: formattedMetricName}).catch(function(err) { + * var client = loggingV2.metricsServiceV2Client(); + * var formattedMetricName = client.metricPath("[PROJECT]", "[METRIC]"); + * client.deleteLogMetric({metricName: formattedMetricName}).catch(function(err) { * console.error(err); * }); */ -MetricsServiceV2Api.prototype.deleteLogMetric = function(request, options, callback) { +MetricsServiceV2Client.prototype.deleteLogMetric = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -419,12 +501,13 @@ MetricsServiceV2Api.prototype.deleteLogMetric = function(request, options, callb if (options === undefined) { options = {}; } + return this._deleteLogMetric(request, options, callback); }; -function MetricsServiceV2ApiBuilder(gaxGrpc) { - if (!(this instanceof MetricsServiceV2ApiBuilder)) { - return new MetricsServiceV2ApiBuilder(gaxGrpc); +function MetricsServiceV2ClientBuilder(gaxGrpc) { + if (!(this instanceof MetricsServiceV2ClientBuilder)) { + return new MetricsServiceV2ClientBuilder(gaxGrpc); } var metricsServiceV2Client = gaxGrpc.load([{ @@ -438,7 +521,7 @@ function MetricsServiceV2ApiBuilder(gaxGrpc) { }; /** - * Build a new instance of {@link MetricsServiceV2Api}. + * Build a new instance of {@link MetricsServiceV2Client}. * * @param {Object=} opts - The optional parameters. * @param {String=} opts.servicePath @@ -455,11 +538,11 @@ function MetricsServiceV2ApiBuilder(gaxGrpc) { * @param {String=} opts.appVersion * The version of the calling service. */ - this.metricsServiceV2Api = function(opts) { - return new MetricsServiceV2Api(gaxGrpc, grpcClients, opts); + this.metricsServiceV2Client = function(opts) { + return new MetricsServiceV2Client(gaxGrpc, grpcClients, opts); }; - extend(this.metricsServiceV2Api, MetricsServiceV2Api); + extend(this.metricsServiceV2Client, MetricsServiceV2Client); } -module.exports = MetricsServiceV2ApiBuilder; +module.exports = MetricsServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file From 644c400c3b7907eb412e8d3654718adfc3381856 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 23 Nov 2016 13:28:46 -0800 Subject: [PATCH 0034/1029] Log entries may be show up in the wrong order (#1815) If a timestamp doesn't exist on the Log Entry, the Logging service inserts a timestamp based on the time it receives the message. Local and network queuing / latency may cause logs to be delivered in an order different from the originating source. Attaching a timestamp at Entry creation time makes avoids this problem. --- handwritten/logging/src/entry.js | 5 +++- handwritten/logging/system-test/logging.js | 22 ++++++++++++++++ handwritten/logging/test/entry.js | 25 +++++++++++++++++-- handwritten/logging/test/log.js | 29 ++++++++-------------- 4 files changed, 59 insertions(+), 22 deletions(-) diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 7da71fcd196..4d5495f082e 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -83,7 +83,10 @@ var isCircular = require('is-circular'); * }); */ function Entry(metadata, data) { - this.metadata = metadata; + this.metadata = extend({ + timestamp: new Date() + }, metadata); + this.data = data; } diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 9a084ce365e..b00fa7943b0 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -347,6 +347,28 @@ describe('Logging', function() { }); }); + it('should preserve order of entries', function(done) { + var entry1 = log.entry('1'); + + setTimeout(function() { + var entry3 = log.entry('3'); + var entry2 = log.entry({ timestamp: entry3.metadata.timestamp }, '2'); + + // Re-arrange to confirm the timestamp is sent and honored. + log.write([entry2, entry3, entry1], options, function(err) { + assert.ifError(err); + + setTimeout(function() { + log.getEntries({ pageSize: 3 }, function(err, entries) { + assert.ifError(err); + assert.deepEqual(entries.map(prop('data')), [ '3', '2', '1' ]); + done(); + }); + }, WRITE_CONSISTENCY_DELAY_MS); + }); + }, 1000); + }); + it('should write an entry with primitive values', function(done) { var logEntry = log.entry({ when: new Date(), diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 2ed20a8dc86..b57d1ccb801 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -44,8 +44,29 @@ describe('Entry', function() { }); describe('instantiation', function() { - it('should localize metadata and data', function() { - assert.strictEqual(entry.metadata, METADATA); + it('should assign timestamp to metadata', function() { + var now = new Date(); + + var expectedTimestampBoundaries = { + start: new Date(now.getTime() - 1000), + end: new Date(now.getTime() + 1000) + }; + + assert(entry.metadata.timestamp >= expectedTimestampBoundaries.start); + assert(entry.metadata.timestamp <= expectedTimestampBoundaries.end); + }); + + it('should not assign timestamp if one is already set', function() { + var timestamp = new Date('2012'); + + var entry = new Entry({ + timestamp: timestamp + }); + + assert.strictEqual(entry.metadata.timestamp, timestamp); + }); + + it('should localize data', function() { assert.strictEqual(entry.data, DATA); }); }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 4b6a5890e48..8c348a1128b 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -19,6 +19,7 @@ var assert = require('assert'); var extend = require('extend'); var GrpcServiceObject = require('@google-cloud/common').GrpcServiceObject; +var prop = require('propprop'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; @@ -138,31 +139,21 @@ describe('Log', function() { it('should assign severity to a single entry', function() { assert.deepEqual( - Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY), - [ - extend(true, {}, ENTRIES[0], { - metadata: { - severity: SEVERITY - } - }) - ] + Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) + .map(prop('metadata')) + .map(prop('severity')), + [ SEVERITY ] ); }); it('should assign severity property to multiple entries', function() { assert.deepEqual( - Log.assignSeverityToEntries_(ENTRIES, SEVERITY), + Log.assignSeverityToEntries_(ENTRIES, SEVERITY) + .map(prop('metadata')) + .map(prop('severity')), [ - extend(true, {}, ENTRIES[0], { - metadata: { - severity: SEVERITY - } - }), - extend(true, {}, ENTRIES[1], { - metadata: { - severity: SEVERITY - } - }) + SEVERITY, + SEVERITY ] ); }); From fd3c2e3d3ed9f92d09bd427a1145a954e45f4e84 Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Sat, 26 Nov 2016 15:59:46 -0800 Subject: [PATCH 0035/1029] Fix typo in code examples in logging API autogen files (#1823) --- handwritten/logging/src/v2/config_service_v2_client.js | 2 +- handwritten/logging/src/v2/logging_service_v2_client.js | 4 ++-- handwritten/logging/src/v2/metrics_service_v2_client.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index ff9b0c1c7e9..8076756948f 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -305,7 +305,7 @@ ConfigServiceV2Client.prototype.listSinks = function(request, options, callback) * var formattedParent = client.parentPath("[PROJECT]"); * client.listSinksStream({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) - * }).on('error', funciton(err) { + * }).on('error', function(err) { * console.error(err); * }); */ diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 43988f94f0e..343d5cf812d 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -482,7 +482,7 @@ LoggingServiceV2Client.prototype.listLogEntries = function(request, options, cal * var resourceNames = []; * client.listLogEntriesStream({resourceNames: resourceNames}).on('data', function(element) { * // doThingsWith(element) - * }).on('error', funciton(err) { + * }).on('error', function(err) { * console.error(err); * }); */ @@ -610,7 +610,7 @@ LoggingServiceV2Client.prototype.listMonitoredResourceDescriptors = function(req * * client.listMonitoredResourceDescriptorsStream({}).on('data', function(element) { * // doThingsWith(element) - * }).on('error', funciton(err) { + * }).on('error', function(err) { * console.error(err); * }); */ diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index c268f8fc3e3..a8f3d989eac 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -302,7 +302,7 @@ MetricsServiceV2Client.prototype.listLogMetrics = function(request, options, cal * var formattedParent = client.parentPath("[PROJECT]"); * client.listLogMetricsStream({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) - * }).on('error', funciton(err) { + * }).on('error', function(err) { * console.error(err); * }); */ From 3adadfb81da4d7fb30c741f9d9eed092a773ed6d Mon Sep 17 00:00:00 2001 From: Cristian Cavalli Date: Fri, 2 Dec 2016 05:12:21 -0800 Subject: [PATCH 0036/1029] Add default resource generator for log entries (#1808) --- handwritten/logging/package.json | 2 +- handwritten/logging/src/log.js | 48 ++- handwritten/logging/src/metadata.js | 189 +++++++++++ handwritten/logging/system-test/logging.js | 27 ++ handwritten/logging/test/log.js | 145 ++++++--- handwritten/logging/test/metadata.js | 349 +++++++++++++++++++++ 6 files changed, 713 insertions(+), 47 deletions(-) create mode 100644 handwritten/logging/src/metadata.js create mode 100644 handwritten/logging/test/metadata.js diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c8c09a8d4f7..51af7deaa03 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -54,6 +54,7 @@ "dependencies": { "@google-cloud/common": "^0.8.0", "arrify": "^1.0.0", + "async": "^2.1.4", "extend": "^3.0.0", "google-gax": "^0.10.0", "google-proto-files": "^0.8.0", @@ -65,7 +66,6 @@ "@google-cloud/bigquery": "*", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", - "async": "^2.0.1", "methmeth": "^1.0.0", "mocha": "^3.0.1", "node-uuid": "^1.4.3", diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 8a4e01a5a96..4eb50487570 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -21,6 +21,7 @@ 'use strict'; var arrify = require('arrify'); +var async = require('async'); var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); @@ -32,6 +33,12 @@ var util = require('util'); */ var Entry = require('./entry.js'); +/** + * @type {module:logging/metadata} + * @private + */ +var Metadata = require('./metadata.js'); + /** * A log is a named collection of entries, each entry representing a timestamped * event. Logs can be produced by Google Cloud Platform services, by third-party @@ -53,6 +60,8 @@ function Log(logging, name) { this.formattedName_ = Log.formatName_(logging.projectId, name); this.name = this.formattedName_.split('/').pop(); + this.metadata_ = new Metadata(logging); + var methods = { /** * Delete the log. @@ -563,6 +572,8 @@ Log.prototype.warning = function(entry, options, callback) { * }); */ Log.prototype.write = function(entry, options, callback) { + var self = this; + if (is.fn(options)) { callback = options; options = {}; @@ -574,12 +585,19 @@ Log.prototype.write = function(entry, options, callback) { }; var reqOpts = extend({ - logName: this.formattedName_, - entries: arrify(entry).map(this.formatEntryForApi_.bind(this)) + logName: this.formattedName_ }, options); - this.request(protoOpts, reqOpts, function(err, resp) { - callback(err, resp); + var entries = arrify(entry); + + this.decorateEntries_(entries, function(err, decoratedEntries) { + // Ignore errors (the API will speak up if it has an issue). + + reqOpts.entries = decoratedEntries; + + self.request(protoOpts, reqOpts, function(err, resp) { + callback(err, resp); + }); }); }; @@ -591,14 +609,22 @@ Log.prototype.write = function(entry, options, callback) { * * @param {object} entry - An entry object. */ -Log.prototype.formatEntryForApi_ = function(entry) { - if (!(entry instanceof Entry)) { - entry = this.entry(entry); - } +Log.prototype.decorateEntries_ = function(entries, callback) { + var self = this; - var formattedEntry = entry.toJSON(); - formattedEntry.logName = this.formattedName_; - return formattedEntry; + async.map(entries, function(entry, callback) { + if (!(entry instanceof Entry)) { + entry = self.entry(entry); + } + + var decoratedEntry = entry.toJSON(); + decoratedEntry.logName = self.formattedName_; + + self.metadata_.assignDefaultResource(decoratedEntry, function(err, entry) { + // Ignore errors (the API will speak up if it has an issue). + callback(null, entry || decoratedEntry); + }); + }, callback); }; /*! Developer Documentation diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js new file mode 100644 index 00000000000..980ee9902e1 --- /dev/null +++ b/handwritten/logging/src/metadata.js @@ -0,0 +1,189 @@ +/*! + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * @module logging/metadata + */ + +'use strict'; + +/** + * The Metadata class attempts to contact the metadata service and determine, + * based on request success and environment variables, what type of resource + * the library is operating on. + * + * @constructor + * @alias module:logging/metadata + * + * @private + * + * @resource [Logs Resource API Documentation]{@link https://cloud.google.com/logging/docs/api/reference/rest/v2/MonitoredResource} + * + * @param {module:logging} logging - The parent Logging instance. + */ +function Metadata(logging) { + this.logging_ = logging; +} + +/** + * Create a descriptor for Google Cloud Functions. + * + * @param {string} projectId - The project ID. + * @returns {object} + */ +Metadata.getCloudFunctionDescriptor = function(projectId) { + return { + type: 'cloud_function', + labels: { + project_id: projectId, + function_name: process.env.FUNCTION_NAME, + region: process.env.SUPERVISOR_REGION + } + }; +}; + +/** + * Create a descriptor for Google App Engine. + * + * @param {string} projectId - The project ID. + * @returns {object} + */ +Metadata.getGAEDescriptor = function(projectId) { + return { + type: 'gae_app', + labels: { + project_id: projectId, + module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, + version_id: process.env.GAE_VERSION + } + }; +}; + +/** + * Create a descriptor for Google Compute Engine. + * + * @private + * + * @param {string} projectId - The project ID. + * @return {object} + */ +Metadata.getGCEDescriptor = function(projectId) { + return { + type: 'gce_instance', + labels: { + project_id: projectId + } + }; +}; + +/** + * Create a global descriptor. + * + * @private + * + * @param {string} projectId - The project ID. + * @returns {object} + */ +Metadata.getGlobalDescriptor = function(projectId) { + return { + type: 'global', + labels: { + project_id: projectId + } + }; +}; + +/** + * Assigns an entry with a default resource object. + * + * @param {object} entryJson - The entry object to assign a resource to. + * @param {function} callback - The callback function. + */ +Metadata.prototype.assignDefaultResource = function(entryJson, callback) { + if (entryJson.resource) { + setImmediate(function() { + callback(null, entryJson); + }); + return; + } + + this.getDefaultResource(function(err, resource) { + if (err) { + callback(err); + return; + } + + entryJson.resource = resource; + + callback(null, entryJson); + }); +}; + +/** + * Retrieve a resource object describing the current environment. + * + * @param {function} callback - The callback function. + */ +Metadata.prototype.getDefaultResource = function(callback) { + var self = this; + + this.getProjectId(function(err, projectId) { + if (err) { + callback(err); + return; + } + + self.logging_.authClient.getEnvironment(function(err, env) { + var defaultResource; + + if (env.IS_APP_ENGINE) { + defaultResource = Metadata.getGAEDescriptor(projectId); + } else if (env.IS_CLOUD_FUNCTION) { + defaultResource = Metadata.getCloudFunctionDescriptor(projectId); + } else if (env.IS_COMPUTE_ENGINE) { + defaultResource = Metadata.getGCEDescriptor(projectId); + } else { + defaultResource = Metadata.getGlobalDescriptor(projectId); + } + + callback(null, defaultResource); + }); + }); +}; + +/** + * Attempt to retrieve the project ID from the auth client. + * + * @param {function} callback - The callback function. + */ +Metadata.prototype.getProjectId = function(callback) { + if (global.GCLOUD_SANDBOX_ENV) { + return; + } + + var self = this; + + if (this.logging_.projectId) { + setImmediate(function() { + callback(null, self.logging_.projectId); + }); + return; + } + + this.logging_.authClient.getProjectId(callback); +}; + +module.exports = Metadata; diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index b00fa7943b0..887805a0442 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -427,6 +427,33 @@ describe('Logging', function() { }); }); + it('should set the default resource', function(done) { + var text = 'entry-text'; + var entry = log.entry(text); + + log.write(entry, function(err) { + assert.ifError(err); + + setTimeout(function() { + log.getEntries({ pageSize: 1 }, function(err, entries) { + assert.ifError(err); + + var entry = entries[0]; + + assert.strictEqual(entry.data, text); + assert.deepEqual(entry.metadata.resource, { + type: 'global', + labels: { + project_id: logging.projectId + } + }); + + done(); + }); + }, WRITE_CONSISTENCY_DELAY_MS); + }); + }); + it('should write to a log with alert helper', function(done) { log.alert(logEntries, options, done); }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 8c348a1128b..20408719f6c 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -37,6 +37,10 @@ var fakeUtil = extend({}, util, { var Entry = require('../src/entry.js'); +function FakeMetadata() { + this.calledWith_ = arguments; +} + function FakeGrpcServiceObject() { this.calledWith_ = arguments; this.parent = {}; @@ -67,6 +71,7 @@ describe('Log', function() { before(function() { Log = proxyquire('../src/log.js', { './entry.js': Entry, + './metadata.js': FakeMetadata, '@google-cloud/common': { GrpcServiceObject: FakeGrpcServiceObject, util: fakeUtil @@ -108,6 +113,11 @@ describe('Log', function() { assert.strictEqual(log.formattedName_, formattedName); }); + it('should localize an instance of Metadata', function() { + assert(log.metadata_ instanceof FakeMetadata); + assert.strictEqual(log.metadata_.calledWith_[0], LOGGING); + }); + it('should inherit from GrpcServiceObject', function() { assert(log instanceof FakeGrpcServiceObject); @@ -303,19 +313,19 @@ describe('Log', function() { resource: {} }; - it('should make the correct API request', function(done) { - var formattedEntry = {}; - - log.formatEntryForApi_ = function() { - return formattedEntry; + beforeEach(function() { + log.decorateEntries_ = function(entries, callback) { + callback(null, entries); }; + }); + it('should make the correct API request', function(done) { log.request = function(protoOpts, reqOpts) { assert.strictEqual(protoOpts.service, 'LoggingServiceV2'); assert.strictEqual(protoOpts.method, 'writeLogEntries'); assert.strictEqual(reqOpts.logName, log.formattedName_); - assert.strictEqual(reqOpts.entries[0], formattedEntry); + assert.strictEqual(reqOpts.entries[0], ENTRY); done(); }; @@ -323,11 +333,25 @@ describe('Log', function() { log.write(ENTRY, OPTIONS, assert.ifError); }); + it('should arrify & decorate the entries', function(done) { + var decoratedEntries = []; + + log.decorateEntries_ = function(entries, callback) { + assert.strictEqual(entries[0], ENTRY); + callback(null, decoratedEntries); + }; + + log.request = function(protoOpts, reqOpts) { + assert.strictEqual(reqOpts.entries, decoratedEntries); + done(); + }; + + log.write(ENTRY, OPTIONS, assert.ifError); + }); + it('should exec callback with only error and API response', function(done) { var args = [1, 2, 3, 4]; - log.formatEntryForApi_ = util.noop; - log.request = function(protoOpts, reqOpts, callback) { callback.apply(null, args); }; @@ -343,8 +367,6 @@ describe('Log', function() { }); it('should not require options', function(done) { - log.formatEntryForApi_ = util.noop; - log.request = function(protoOpts, reqOpts, callback) { callback(); // done() }; @@ -594,47 +616,100 @@ describe('Log', function() { }); }); - describe('formatEntryForApi_', function() { - var ENTRY = {}; - var EXPECTED_FORMATTED_ENTRY = {}; - var ENTRY_INSTANCE = new Entry(); + describe('decorateEntries_', function() { + var toJSONResponse = {}; - it('should create an entry if one is not provided', function() { - var fakeEntryInstance = { - toJSON: function() { - return EXPECTED_FORMATTED_ENTRY; - } + function FakeEntry() {} + FakeEntry.prototype.toJSON = function() { + return toJSONResponse; + }; + + beforeEach(function() { + log.entry = function() { + return new FakeEntry(); }; - log.entry = function(entry) { - assert.strictEqual(entry, ENTRY); - return fakeEntryInstance; + log.metadata_.assignDefaultResource = function(entryJson, callback) { + callback(null, entryJson); }; + }); - var formattedEntry = log.formatEntryForApi_(ENTRY); - assert.strictEqual(formattedEntry, EXPECTED_FORMATTED_ENTRY); + it('should create an Entry object if one is not provided', function(done) { + var entry = {}; + + log.entry = function(entry_) { + assert.strictEqual(entry_, entry); + return new FakeEntry(); + }; + + log.decorateEntries_([entry], function(err, decoratedEntries) { + assert.ifError(err); + assert.strictEqual(decoratedEntries[0], toJSONResponse); + done(); + }); }); - it('should get JSON format from entry object', function(done) { + it('should get JSON format from Entry object', function(done) { log.entry = function() { done(); // will result in multiple done() calls and fail the test. }; - var toJSON = ENTRY_INSTANCE.toJSON; - ENTRY_INSTANCE.toJSON = function() { - ENTRY_INSTANCE.toJSON = toJSON; - return EXPECTED_FORMATTED_ENTRY; + var entry = new Entry(); + entry.toJSON = function() { + return toJSONResponse; }; - var formattedEntry = log.formatEntryForApi_(ENTRY_INSTANCE); - assert.strictEqual(formattedEntry, EXPECTED_FORMATTED_ENTRY); - done(); + log.decorateEntries_([entry], function(err, decoratedEntries) { + assert.ifError(err); + assert.strictEqual(decoratedEntries[0], toJSONResponse); + done(); + }); }); - it('should assign the log name', function() { - var entry = log.formatEntryForApi_(ENTRY_INSTANCE); + it('should assign the log name', function(done) { + log.decorateEntries_([{}], function(err, decoratedEntries) { + assert.ifError(err); + assert.strictEqual(decoratedEntries[0].logName, log.formattedName_); + done(); + }); + }); + + it('should return extended entry with default resource', function(done) { + var entry = new FakeEntry(); + entry.toJSON = function() { + return toJSONResponse; + }; - assert.strictEqual(entry.logName, log.formattedName_); + var entryWithDefaultResource = {}; + + log.metadata_.assignDefaultResource = function(entryJson, callback) { + assert.strictEqual(entryJson, toJSONResponse); + callback(null, entryWithDefaultResource); + }; + + log.decorateEntries_([entry], function(err, decoratedEntries) { + assert.ifError(err); + assert.strictEqual(decoratedEntries[0], entryWithDefaultResource); + done(); + }); + }); + + it('should return original entry without resource', function(done) { + var entry = new Entry(); + entry.toJSON = function() { + return toJSONResponse; + }; + + log.metadata_.assignDefaultResource = function(entryJson, callback) { + assert.strictEqual(entryJson, toJSONResponse); + callback(); + }; + + log.decorateEntries_([entry], function(err, decoratedEntries) { + assert.ifError(err); + assert.strictEqual(decoratedEntries[0], toJSONResponse); + done(); + }); }); }); }); diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js new file mode 100644 index 00000000000..7a4a5fecbf4 --- /dev/null +++ b/handwritten/logging/test/metadata.js @@ -0,0 +1,349 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var assert = require('assert'); +var extend = require('extend'); + +var Metadata = require('../src/metadata.js'); + +describe('metadata', function() { + var MetadataCached; + var metadata; + + var PROJECT_ID = 'project-id'; + var LOGGING; + + var ENV_CACHED = extend({}, process.env); + + before(function() { + MetadataCached = extend({}, Metadata); + }); + + beforeEach(function() { + LOGGING = {}; + extend(Metadata, MetadataCached); + metadata = new Metadata(LOGGING); + }); + + afterEach(function() { + extend(process.env, ENV_CACHED); + }); + + describe('instantiation', function() { + it('should localize Logging instance', function() { + assert.strictEqual(metadata.logging_, LOGGING); + }); + }); + + describe('getCloudFunctionDescriptor', function() { + var FUNCTION_NAME = 'function-name'; + var SUPERVISOR_REGION = 'supervisor-region'; + + beforeEach(function() { + process.env.FUNCTION_NAME = FUNCTION_NAME; + process.env.SUPERVISOR_REGION = SUPERVISOR_REGION; + }); + + it('should return the correct descriptor', function() { + assert.deepEqual(Metadata.getCloudFunctionDescriptor(PROJECT_ID), { + type: 'cloud_function', + labels: { + project_id: PROJECT_ID, + function_name: FUNCTION_NAME, + region: SUPERVISOR_REGION + } + }); + }); + }); + + describe('getCloudFunctionDescriptor', function() { + var GAE_MODULE_NAME = 'gae-module-name'; + var GAE_SERVICE = 'gae-service'; + var GAE_VERSION = 'gae-version'; + + beforeEach(function() { + process.env.GAE_MODULE_NAME = GAE_MODULE_NAME; + process.env.GAE_SERVICE = GAE_SERVICE; + process.env.GAE_VERSION = GAE_VERSION; + }); + + it('should return the correct descriptor', function() { + assert.deepEqual(Metadata.getGAEDescriptor(PROJECT_ID), { + type: 'gae_app', + labels: { + project_id: PROJECT_ID, + module_id: GAE_SERVICE, + version_id: GAE_VERSION + } + }); + }); + + it('should use GAE_MODULE_NAME for module_id', function() { + delete process.env.GAE_SERVICE; + + var moduleId = Metadata.getGAEDescriptor(PROJECT_ID).labels.module_id; + assert.strictEqual(moduleId, GAE_MODULE_NAME); + }); + }); + + describe('getGCEDescriptor', function() { + it('should return the correct descriptor', function() { + assert.deepEqual(Metadata.getGCEDescriptor(PROJECT_ID), { + type: 'gce_instance', + labels: { + project_id: PROJECT_ID + } + }); + }); + }); + + describe('getGlobalDescriptor', function() { + it('should return the correct descriptor', function() { + assert.deepEqual(Metadata.getGlobalDescriptor(PROJECT_ID), { + type: 'global', + labels: { + project_id: PROJECT_ID + } + }); + }); + }); + + describe('assignDefaultResource', function() { + var ENTRY_JSON = {}; + + it('should return entry if it already has a resource', function(done) { + var entryJson = { resource: {} }; + + metadata.assignDefaultResource(entryJson, function(err, entryJson_) { + assert.ifError(err); + assert.strictEqual(entryJson_, entryJson); + done(); + }); + }); + + it('should get the default resource', function(done) { + metadata.getDefaultResource = function() { + done(); + }; + + metadata.assignDefaultResource(ENTRY_JSON, assert.ifError); + }); + + it('should return error from getDefaultResource', function(done) { + var error = new Error('Error.'); + + metadata.getDefaultResource = function(callback) { + callback(error); + }; + + metadata.assignDefaultResource(ENTRY_JSON, function(err) { + assert.strictEqual(err, error); + done(); + }); + }); + + it('should assign default resource to entry', function(done) { + var defaultResource = {}; + + metadata.getDefaultResource = function(callback) { + callback(null, defaultResource); + }; + + metadata.assignDefaultResource(ENTRY_JSON, function(err, entryJson) { + assert.ifError(err); + assert.strictEqual(entryJson.resource, defaultResource); + done(); + }); + }); + }); + + describe('getDefaultResource', function() { + var RETURNED_PROJECT_ID = 'project-id'; + + beforeEach(function() { + metadata.getProjectId = function(callback) { + callback(null, RETURNED_PROJECT_ID); + }; + }); + + it('should get the project ID', function(done) { + metadata.getProjectId = function() { + done(); + }; + + metadata.getDefaultResource(assert.ifError); + }); + + it('should return error from getProjectId', function(done) { + var error = new Error('Error.'); + + metadata.getProjectId = function(callback) { + callback(error); + }; + + metadata.getDefaultResource(function(err) { + assert.strictEqual(err, error); + done(); + }); + }); + + it('should get the environment from auth client', function(done) { + metadata.logging_.authClient = { + getEnvironment: function() { + done(); + } + }; + + metadata.getDefaultResource(assert.ifError); + }); + + describe('environments', function() { + describe('app engine', function() { + it('should return correct descriptor', function(done) { + var DESCRIPTOR = {}; + + Metadata.getGAEDescriptor = function(projectId) { + assert.strictEqual(projectId, RETURNED_PROJECT_ID); + return DESCRIPTOR; + }; + + metadata.logging_.authClient = { + getEnvironment: function(callback) { + callback(null, { + IS_APP_ENGINE: true + }); + } + }; + + metadata.getDefaultResource(function(err, defaultResource) { + assert.ifError(err); + assert.strictEqual(defaultResource, DESCRIPTOR); + done(); + }); + }); + }); + + describe('cloud function', function() { + it('should return correct descriptor', function(done) { + var DESCRIPTOR = {}; + + Metadata.getCloudFunctionDescriptor = function(projectId) { + assert.strictEqual(projectId, RETURNED_PROJECT_ID); + return DESCRIPTOR; + }; + + metadata.logging_.authClient = { + getEnvironment: function(callback) { + callback(null, { + IS_CLOUD_FUNCTION: true + }); + } + }; + + metadata.getDefaultResource(function(err, defaultResource) { + assert.ifError(err); + assert.strictEqual(defaultResource, DESCRIPTOR); + done(); + }); + }); + }); + + describe('compute engine', function() { + it('should return correct descriptor', function(done) { + var DESCRIPTOR = {}; + + Metadata.getGCEDescriptor = function(projectId) { + assert.strictEqual(projectId, RETURNED_PROJECT_ID); + return DESCRIPTOR; + }; + + metadata.logging_.authClient = { + getEnvironment: function(callback) { + callback(null, { + IS_COMPUTE_ENGINE: true + }); + } + }; + + metadata.getDefaultResource(function(err, defaultResource) { + assert.ifError(err); + assert.strictEqual(defaultResource, DESCRIPTOR); + done(); + }); + }); + }); + + describe('global', function() { + it('should return correct descriptor', function(done) { + var DESCRIPTOR = {}; + + Metadata.getGlobalDescriptor = function(projectId) { + assert.strictEqual(projectId, RETURNED_PROJECT_ID); + return DESCRIPTOR; + }; + + metadata.logging_.authClient = { + getEnvironment: function(callback) { + callback(null, { + IS_APP_ENGINE: false, + IS_CLOUD_FUNCTION: false, + IS_COMPUTE_ENGINE: false + }); + } + }; + + metadata.getDefaultResource(function(err, defaultResource) { + assert.ifError(err); + assert.strictEqual(defaultResource, DESCRIPTOR); + done(); + }); + }); + }); + }); + }); + + describe('getProjectId', function() { + var CACHED_PROJECT_ID = 'cached-project-id'; + + it('should exit early if in the sandbox environment', function() { + global.GCLOUD_SANDBOX_ENV = true; + assert.strictEqual(metadata.getProjectId(), undefined); + global.GCLOUD_SANDBOX_ENV = false; + }); + + it('should return cached projectId from Logging instance', function(done) { + metadata.logging_.projectId = CACHED_PROJECT_ID; + + metadata.getProjectId(function(err, projectId) { + assert.ifError(err); + assert.strictEqual(projectId, CACHED_PROJECT_ID); + done(); + }); + }); + + it('should get project ID from auth client', function(done) { + metadata.logging_.authClient = { + getProjectId: function(callback) { + callback(); // done() + } + }; + + metadata.getProjectId(done); + }); + }); +}); From 585292d9ccbf5117a918640fe65ea1ea20213554 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 5 Dec 2016 14:12:43 -0500 Subject: [PATCH 0037/1029] bump packages (#1856) --- handwritten/logging/package.json | 4 ++-- handwritten/logging/system-test/logging.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 51af7deaa03..648d0fe84fa 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -68,9 +68,9 @@ "@google-cloud/storage": "*", "methmeth": "^1.0.0", "mocha": "^3.0.1", - "node-uuid": "^1.4.3", "propprop": "^0.3.0", - "proxyquire": "^1.7.10" + "proxyquire": "^1.7.10", + "uuid": "^3.0.1" }, "scripts": { "publish-module": "node ../../scripts/publish.js logging", diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 887805a0442..750f481054c 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -26,7 +26,7 @@ var is = require('is'); var prop = require('propprop'); var PubSub = require('@google-cloud/pubsub'); var Storage = require('@google-cloud/storage'); -var uuid = require('node-uuid'); +var uuid = require('uuid'); var env = require('../../../system-test/env.js'); var Logging = require('../'); From 25c43b03bc87985059989644659144ec73266bdb Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Thu, 8 Dec 2016 03:43:46 -0800 Subject: [PATCH 0038/1029] Regenerate logging API clients. (#1870) This regeneration is for https://github.com/googleapis/googleapis/pull/208. Basically, it changes the name of 'parentPath' to 'projectPath', and we believe the new name is more understandable. This regeneration happens to include a minor change on the codegen to support LRO -- however this does not require any updates on dependencies. Simple style changes. --- .../src/v2/config_service_v2_client.js | 31 +++++++++---------- .../src/v2/logging_service_v2_client.js | 25 +++++++-------- .../src/v2/metrics_service_v2_client.js | 31 +++++++++---------- 3 files changed, 39 insertions(+), 48 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 8076756948f..4fb4e1f4ca0 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -96,7 +96,7 @@ function ConfigServiceV2Client(gaxGrpc, grpcClients, opts) { var configServiceV2Stub = gaxGrpc.createStub( servicePath, port, - grpcClients.configServiceV2Client.google.logging.v2.ConfigServiceV2, + grpcClients.google.logging.v2.ConfigServiceV2, {sslCreds: sslCreds}); var configServiceV2StubMethods = [ 'listSinks', @@ -117,31 +117,31 @@ function ConfigServiceV2Client(gaxGrpc, grpcClients, opts) { // Path templates -var PARENT_PATH_TEMPLATE = new gax.PathTemplate( +var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( 'projects/{project}'); var SINK_PATH_TEMPLATE = new gax.PathTemplate( 'projects/{project}/sinks/{sink}'); /** - * Returns a fully-qualified parent resource name string. + * Returns a fully-qualified project resource name string. * @param {String} project * @returns {String} */ -ConfigServiceV2Client.prototype.parentPath = function(project) { - return PARENT_PATH_TEMPLATE.render({ +ConfigServiceV2Client.prototype.projectPath = function(project) { + return PROJECT_PATH_TEMPLATE.render({ project: project }); }; /** - * Parses the parentName from a parent resource. - * @param {String} parentName - * A fully-qualified path representing a parent resources. + * Parses the projectName from a project resource. + * @param {String} projectName + * A fully-qualified path representing a project resources. * @returns {String} - A string representing the project. */ -ConfigServiceV2Client.prototype.matchProjectFromParentName = function(parentName) { - return PARENT_PATH_TEMPLATE.match(parentName).project; +ConfigServiceV2Client.prototype.matchProjectFromProjectName = function(projectName) { + return PROJECT_PATH_TEMPLATE.match(projectName).project; }; /** @@ -221,7 +221,7 @@ ConfigServiceV2Client.prototype.matchSinkFromSinkName = function(sinkName) { * @example * * var client = loggingV2.configServiceV2Client(); - * var formattedParent = client.parentPath("[PROJECT]"); + * var formattedParent = client.projectPath("[PROJECT]"); * // Iterate over all elements. * client.listSinks({parent: formattedParent}).then(function(responses) { * var resources = responses[0]; @@ -302,7 +302,7 @@ ConfigServiceV2Client.prototype.listSinks = function(request, options, callback) * @example * * var client = loggingV2.configServiceV2Client(); - * var formattedParent = client.parentPath("[PROJECT]"); + * var formattedParent = client.projectPath("[PROJECT]"); * client.listSinksStream({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) * }).on('error', function(err) { @@ -396,7 +396,7 @@ ConfigServiceV2Client.prototype.getSink = function(request, options, callback) { * @example * * var client = loggingV2.configServiceV2Client(); - * var formattedParent = client.parentPath("[PROJECT]"); + * var formattedParent = client.projectPath("[PROJECT]"); * var sink = {}; * var request = { * parent: formattedParent, @@ -537,9 +537,6 @@ function ConfigServiceV2ClientBuilder(gaxGrpc) { }]); extend(this, configServiceV2Client.google.logging.v2); - var grpcClients = { - configServiceV2Client: configServiceV2Client - }; /** * Build a new instance of {@link ConfigServiceV2Client}. @@ -560,7 +557,7 @@ function ConfigServiceV2ClientBuilder(gaxGrpc) { * The version of the calling service. */ this.configServiceV2Client = function(opts) { - return new ConfigServiceV2Client(gaxGrpc, grpcClients, opts); + return new ConfigServiceV2Client(gaxGrpc, configServiceV2Client, opts); }; extend(this.configServiceV2Client, ConfigServiceV2Client); } diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 343d5cf812d..4b5037e0550 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -99,7 +99,7 @@ function LoggingServiceV2Client(gaxGrpc, grpcClients, opts) { var loggingServiceV2Stub = gaxGrpc.createStub( servicePath, port, - grpcClients.loggingServiceV2Client.google.logging.v2.LoggingServiceV2, + grpcClients.google.logging.v2.LoggingServiceV2, {sslCreds: sslCreds}); var loggingServiceV2StubMethods = [ 'deleteLog', @@ -119,31 +119,31 @@ function LoggingServiceV2Client(gaxGrpc, grpcClients, opts) { // Path templates -var PARENT_PATH_TEMPLATE = new gax.PathTemplate( +var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( 'projects/{project}'); var LOG_PATH_TEMPLATE = new gax.PathTemplate( 'projects/{project}/logs/{log}'); /** - * Returns a fully-qualified parent resource name string. + * Returns a fully-qualified project resource name string. * @param {String} project * @returns {String} */ -LoggingServiceV2Client.prototype.parentPath = function(project) { - return PARENT_PATH_TEMPLATE.render({ +LoggingServiceV2Client.prototype.projectPath = function(project) { + return PROJECT_PATH_TEMPLATE.render({ project: project }); }; /** - * Parses the parentName from a parent resource. - * @param {String} parentName - * A fully-qualified path representing a parent resources. + * Parses the projectName from a project resource. + * @param {String} projectName + * A fully-qualified path representing a project resources. * @returns {String} - A string representing the project. */ -LoggingServiceV2Client.prototype.matchProjectFromParentName = function(parentName) { - return PARENT_PATH_TEMPLATE.match(parentName).project; +LoggingServiceV2Client.prototype.matchProjectFromProjectName = function(projectName) { + return PROJECT_PATH_TEMPLATE.match(projectName).project; }; /** @@ -633,9 +633,6 @@ function LoggingServiceV2ClientBuilder(gaxGrpc) { }]); extend(this, loggingServiceV2Client.google.logging.v2); - var grpcClients = { - loggingServiceV2Client: loggingServiceV2Client - }; /** * Build a new instance of {@link LoggingServiceV2Client}. @@ -656,7 +653,7 @@ function LoggingServiceV2ClientBuilder(gaxGrpc) { * The version of the calling service. */ this.loggingServiceV2Client = function(opts) { - return new LoggingServiceV2Client(gaxGrpc, grpcClients, opts); + return new LoggingServiceV2Client(gaxGrpc, loggingServiceV2Client, opts); }; extend(this.loggingServiceV2Client, LoggingServiceV2Client); } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index a8f3d989eac..7ecf32cbbd5 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -95,7 +95,7 @@ function MetricsServiceV2Client(gaxGrpc, grpcClients, opts) { var metricsServiceV2Stub = gaxGrpc.createStub( servicePath, port, - grpcClients.metricsServiceV2Client.google.logging.v2.MetricsServiceV2, + grpcClients.google.logging.v2.MetricsServiceV2, {sslCreds: sslCreds}); var metricsServiceV2StubMethods = [ 'listLogMetrics', @@ -116,31 +116,31 @@ function MetricsServiceV2Client(gaxGrpc, grpcClients, opts) { // Path templates -var PARENT_PATH_TEMPLATE = new gax.PathTemplate( +var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( 'projects/{project}'); var METRIC_PATH_TEMPLATE = new gax.PathTemplate( 'projects/{project}/metrics/{metric}'); /** - * Returns a fully-qualified parent resource name string. + * Returns a fully-qualified project resource name string. * @param {String} project * @returns {String} */ -MetricsServiceV2Client.prototype.parentPath = function(project) { - return PARENT_PATH_TEMPLATE.render({ +MetricsServiceV2Client.prototype.projectPath = function(project) { + return PROJECT_PATH_TEMPLATE.render({ project: project }); }; /** - * Parses the parentName from a parent resource. - * @param {String} parentName - * A fully-qualified path representing a parent resources. + * Parses the projectName from a project resource. + * @param {String} projectName + * A fully-qualified path representing a project resources. * @returns {String} - A string representing the project. */ -MetricsServiceV2Client.prototype.matchProjectFromParentName = function(parentName) { - return PARENT_PATH_TEMPLATE.match(parentName).project; +MetricsServiceV2Client.prototype.matchProjectFromProjectName = function(projectName) { + return PROJECT_PATH_TEMPLATE.match(projectName).project; }; /** @@ -219,7 +219,7 @@ MetricsServiceV2Client.prototype.matchMetricFromMetricName = function(metricName * @example * * var client = loggingV2.metricsServiceV2Client(); - * var formattedParent = client.parentPath("[PROJECT]"); + * var formattedParent = client.projectPath("[PROJECT]"); * // Iterate over all elements. * client.listLogMetrics({parent: formattedParent}).then(function(responses) { * var resources = responses[0]; @@ -299,7 +299,7 @@ MetricsServiceV2Client.prototype.listLogMetrics = function(request, options, cal * @example * * var client = loggingV2.metricsServiceV2Client(); - * var formattedParent = client.parentPath("[PROJECT]"); + * var formattedParent = client.projectPath("[PROJECT]"); * client.listLogMetricsStream({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) * }).on('error', function(err) { @@ -387,7 +387,7 @@ MetricsServiceV2Client.prototype.getLogMetric = function(request, options, callb * @example * * var client = loggingV2.metricsServiceV2Client(); - * var formattedParent = client.parentPath("[PROJECT]"); + * var formattedParent = client.projectPath("[PROJECT]"); * var metric = {}; * var request = { * parent: formattedParent, @@ -516,9 +516,6 @@ function MetricsServiceV2ClientBuilder(gaxGrpc) { }]); extend(this, metricsServiceV2Client.google.logging.v2); - var grpcClients = { - metricsServiceV2Client: metricsServiceV2Client - }; /** * Build a new instance of {@link MetricsServiceV2Client}. @@ -539,7 +536,7 @@ function MetricsServiceV2ClientBuilder(gaxGrpc) { * The version of the calling service. */ this.metricsServiceV2Client = function(opts) { - return new MetricsServiceV2Client(gaxGrpc, grpcClients, opts); + return new MetricsServiceV2Client(gaxGrpc, metricsServiceV2Client, opts); }; extend(this.metricsServiceV2Client, MetricsServiceV2Client); } From c216a1d0ff4444f0485d8662fcc2597e3bcaf46f Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 8 Dec 2016 18:34:53 -0500 Subject: [PATCH 0039/1029] prepare READMEs for beta release (#1864) --- handwritten/logging/README.md | 19 +++++++------------ handwritten/logging/src/index.js | 6 ------ 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index db624cf152b..5c6bbcb0bd0 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -1,5 +1,5 @@ -# @google-cloud/logging -> Stackdriver Logging Client Library for Node.js +# @google-cloud/logging ([Beta][versioning]) +> Google Stackdriver Logging Client Library for Node.js *Looking for more Google APIs than just Logging? You might want to check out [`google-cloud`][google-cloud].* @@ -69,24 +69,18 @@ var logging = require('@google-cloud/logging')({ It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services. -### On Google Compute Engine +### On Google Cloud Platform -If you are running this client on Google Compute Engine, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. +If you are running this client on Google Cloud Platform, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. ``` js -// Authenticating on a global basis. -var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' - -var logging = require('@google-cloud/logging')({ - projectId: projectId -}); - +var logging = require('@google-cloud/logging')(); // ...you're good to go! ``` ### Elsewhere -If you are not running this client on Google Compute Engine, you need a Google Developers service account. To create a service account: +If you are not running this client on Google Cloud Platform, you need a Google Developers service account. To create a service account: 1. Visit the [Google Developers Console][dev-console]. 2. Create a new project or click on an existing project. @@ -113,6 +107,7 @@ var logging = require('@google-cloud/logging')({ ``` +[versioning]: https://github.com/GoogleCloudPlatform/google-cloud-node#versioning [google-cloud]: https://github.com/GoogleCloudPlatform/google-cloud-node/ [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using [dev-console]: https://console.developers.google.com/project diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index c98f8b83c76..d9839e4094c 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -47,12 +47,6 @@ var Log = require('./log.js'); var Sink = require('./sink.js'); /** - *

- * **This is a Beta release of Stackdriver Logging.** This API is not covered - * by any SLA or deprecation policy and may be subject to - * backward-incompatible changes. - *

- * * [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to * store, search, analyze, monitor, and alert on log data and events from Google * Cloud Platform and Amazon Web Services (AWS). From 6327bada3870bcb60b8c2399c057e1cba22069b3 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 8 Dec 2016 19:43:39 -0500 Subject: [PATCH 0040/1029] all: update dependencies --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 648d0fe84fa..40586bf5448 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "stackdriver" ], "dependencies": { - "@google-cloud/common": "^0.8.0", + "@google-cloud/common": "^0.9.0", "arrify": "^1.0.0", "async": "^2.1.4", "extend": "^3.0.0", From beb01c6aab92b101bef22fc99d19130b802355df Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 8 Dec 2016 19:47:34 -0500 Subject: [PATCH 0041/1029] logging @ 0.6.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 40586bf5448..7a52c3df550 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.5.1", + "version": "0.6.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 731452fe9911c326bbb1c633d6f609561ac74b73 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 9 Jan 2017 20:44:57 -0500 Subject: [PATCH 0042/1029] update dependencies --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7a52c3df550..9c515a844fc 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "stackdriver" ], "dependencies": { - "@google-cloud/common": "^0.9.0", + "@google-cloud/common": "^0.11.0", "arrify": "^1.0.0", "async": "^2.1.4", "extend": "^3.0.0", From 7484ea4a788b4c79d12bda6e3d2fbe7ff3576a19 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 31 Jan 2017 14:28:24 -0500 Subject: [PATCH 0043/1029] logging: incorporate @google-cloud/common-grpc (#1949) --- handwritten/logging/package.json | 3 ++- handwritten/logging/src/entry.js | 6 +++--- handwritten/logging/src/index.js | 5 +++-- handwritten/logging/src/log.js | 5 +++-- handwritten/logging/src/sink.js | 5 +++-- handwritten/logging/test/entry.js | 9 +++++++-- handwritten/logging/test/index.js | 4 +++- handwritten/logging/test/log.js | 10 ++++++---- handwritten/logging/test/sink.js | 5 +++-- 9 files changed, 33 insertions(+), 19 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9c515a844fc..e24b61357e0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,8 @@ "stackdriver" ], "dependencies": { - "@google-cloud/common": "^0.11.0", + "@google-cloud/common": "^0.12.0", + "@google-cloud/common-grpc": "^0.1.1", "arrify": "^1.0.0", "async": "^2.1.4", "extend": "^3.0.0", diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 4d5495f082e..5ab9005e9a4 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -20,7 +20,7 @@ 'use strict'; -var common = require('@google-cloud/common'); +var commonGrpc = require('@google-cloud/common-grpc'); var extend = require('extend'); var is = require('is'); var isCircular = require('is-circular'); @@ -103,7 +103,7 @@ Entry.fromApiResponse_ = function(entry) { var data = entry[entry.payload]; if (entry.payload === 'jsonPayload') { - data = common.GrpcService.structToObj_(data); + data = commonGrpc.Service.structToObj_(data); } var serializedEntry = new Entry(entry, data); @@ -130,7 +130,7 @@ Entry.prototype.toJSON = function() { var entry = extend(true, {}, this.metadata); if (is.object(this.data)) { - entry.jsonPayload = common.GrpcService.objToStruct_(this.data, { + entry.jsonPayload = commonGrpc.Service.objToStruct_(this.data, { stringify: true }); } else if (is.string(this.data)) { diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index d9839e4094c..c2e46b2bedf 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -22,6 +22,7 @@ var arrify = require('arrify'); var common = require('@google-cloud/common'); +var commonGrpc = require('@google-cloud/common-grpc'); var extend = require('extend'); var format = require('string-format-obj'); var googleProtoFiles = require('google-proto-files'); @@ -80,10 +81,10 @@ function Logging(options) { packageJson: require('../package.json') }; - common.GrpcService.call(this, config, options); + commonGrpc.Service.call(this, config, options); } -util.inherits(Logging, common.GrpcService); +util.inherits(Logging, commonGrpc.Service); // jscs:disable maximumLineLength /** diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 4eb50487570..e20f4634052 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -23,6 +23,7 @@ var arrify = require('arrify'); var async = require('async'); var common = require('@google-cloud/common'); +var commonGrpc = require('@google-cloud/common-grpc'); var extend = require('extend'); var is = require('is'); var util = require('util'); @@ -98,14 +99,14 @@ function Log(logging, name) { } }; - common.GrpcServiceObject.call(this, { + commonGrpc.ServiceObject.call(this, { parent: logging, id: this.name, methods: methods }); } -util.inherits(Log, common.GrpcServiceObject); +util.inherits(Log, commonGrpc.ServiceObject); /** * Return an array of log entries with the desired severity assigned. diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index e435db5584e..0730f96b54d 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -21,6 +21,7 @@ 'use strict'; var common = require('@google-cloud/common'); +var commonGrpc = require('@google-cloud/common-grpc'); var extend = require('extend'); var util = require('util'); @@ -146,7 +147,7 @@ function Sink(logging, name) { } }; - common.GrpcServiceObject.call(this, { + commonGrpc.ServiceObject.call(this, { parent: logging, baseUrl: '/sinks', id: name, @@ -155,7 +156,7 @@ function Sink(logging, name) { }); } -util.inherits(Sink, common.GrpcServiceObject); +util.inherits(Sink, commonGrpc.ServiceObject); /** * Set the sink's filter. diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index b57d1ccb801..bf3be4c9edf 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -20,6 +20,7 @@ var assert = require('assert'); var extend = require('extend'); var GrpcService = require('@google-cloud/common').GrpcService; var proxyquire = require('proxyquire'); +var util = require('@google-cloud/common').util; function FakeGrpcService() {} @@ -32,8 +33,8 @@ describe('Entry', function() { before(function() { Entry = proxyquire('../src/entry.js', { - '@google-cloud/common': { - GrpcService: FakeGrpcService + '@google-cloud/common-grpc': { + Service: FakeGrpcService } }); }); @@ -132,6 +133,10 @@ describe('Entry', function() { }); describe('toJSON', function() { + beforeEach(function() { + FakeGrpcService.objToStruct_ = util.noop; + }); + it('should not modify the original instance', function() { var entryBefore = extend(true, {}, entry); entry.toJSON(); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 55a36eb4842..10428e02ae3 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -91,10 +91,12 @@ describe('Logging', function() { before(function() { Logging = proxyquire('../', { '@google-cloud/common': { - GrpcService: FakeGrpcService, paginator: fakePaginator, util: fakeUtil }, + '@google-cloud/common-grpc': { + Service: FakeGrpcService + }, './log.js': FakeLog, './entry.js': FakeEntry, './sink.js': FakeSink diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 20408719f6c..274bac2920f 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -70,12 +70,14 @@ describe('Log', function() { before(function() { Log = proxyquire('../src/log.js', { - './entry.js': Entry, - './metadata.js': FakeMetadata, '@google-cloud/common': { - GrpcServiceObject: FakeGrpcServiceObject, util: fakeUtil - } + }, + '@google-cloud/common-grpc': { + ServiceObject: FakeGrpcServiceObject, + }, + './entry.js': Entry, + './metadata.js': FakeMetadata }); var assignSeverityToEntries_ = Log.assignSeverityToEntries_; Log.assignSeverityToEntries_ = function() { diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index fc6f442252d..b9f2305d830 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -30,7 +30,6 @@ var fakeUtil = extend({}, util, { } }); - function FakeGrpcServiceObject() { this.calledWith_ = arguments; } @@ -48,8 +47,10 @@ describe('Sink', function() { before(function() { Sink = proxyquire('../src/sink.js', { '@google-cloud/common': { - GrpcServiceObject: FakeGrpcServiceObject, util: fakeUtil + }, + '@google-cloud/common-grpc': { + ServiceObject: FakeGrpcServiceObject, } }); }); From b93efea31a26ab161d8d1f43c9261c3aa7fe8b44 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Tue, 31 Jan 2017 16:00:57 -0500 Subject: [PATCH 0044/1029] logging @ 0.7.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e24b61357e0..5a5a6559316 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.6.0", + "version": "0.7.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From b99b6b1990638137942ccf27be19bd694efb24b7 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 14 Feb 2017 12:18:51 -0500 Subject: [PATCH 0045/1029] update deps --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5a5a6559316..2ef892ba106 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,7 +58,7 @@ "async": "^2.1.4", "extend": "^3.0.0", "google-gax": "^0.10.0", - "google-proto-files": "^0.8.0", + "google-proto-files": "^0.9.1", "is": "^3.0.1", "is-circular": "^1.0.1", "string-format-obj": "^1.0.0" From 466470062b30fe4027977892b081181e9b3701c4 Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Fri, 24 Feb 2017 08:22:38 -0800 Subject: [PATCH 0046/1029] Creates the new x-goog-api-client header. (#2020) This will send x-goog-api-client with the following format: gl-node/(node version) gccl/(library version) grpc/(grpc version) We will use this information for future tracking. The GAPIC autogen files will have a slightly different format, and that will be addressed later. This PR only changes the APIs using gRPC without the GAPIC. --- handwritten/logging/src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index c2e46b2bedf..7c395c8f511 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -66,6 +66,10 @@ function Logging(options) { return new Logging(options); } + options = extend({}, options, { + libVersion: require('../package.json').version + }); + var config = { baseUrl: 'logging.googleapis.com', service: 'logging', From 1d7e162fa1e1ef9c3b8187e994bc113d298ea0eb Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 24 Feb 2017 11:23:48 -0500 Subject: [PATCH 0047/1029] Revert "Creates the new x-goog-api-client header." (#2024) --- handwritten/logging/src/index.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 7c395c8f511..c2e46b2bedf 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -66,10 +66,6 @@ function Logging(options) { return new Logging(options); } - options = extend({}, options, { - libVersion: require('../package.json').version - }); - var config = { baseUrl: 'logging.googleapis.com', service: 'logging', From 1d1e758ebf7dabc5e42fe7f3e3366d6b40b1d23c Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 2 Mar 2017 20:27:44 -0500 Subject: [PATCH 0048/1029] docs: change Google Cloud to Cloud (#1995) --- handwritten/logging/README.md | 2 +- handwritten/logging/src/metadata.js | 2 +- handwritten/logging/src/sink.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 5c6bbcb0bd0..4266eaed6e5 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -67,7 +67,7 @@ var logging = require('@google-cloud/logging')({ ## Authentication -It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services. +It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Cloud services. ### On Google Cloud Platform diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 980ee9902e1..c483df59f92 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -39,7 +39,7 @@ function Metadata(logging) { } /** - * Create a descriptor for Google Cloud Functions. + * Create a descriptor for Cloud Functions. * * @param {string} projectId - The project ID. * @returns {object} diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 0730f96b54d..71f30f8b1b0 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -32,7 +32,7 @@ var util = require('util'); /** * A sink is an object that lets you to specify a set of log entries to export * to a particular destination. Stackdriver Logging lets you export log entries - * to destinations including Google Cloud Storage buckets (for long term log + * to destinations including Cloud Storage buckets (for long term log * storage), Google BigQuery datasets (for log analysis), Google Pub/Sub (for * streaming to other applications). * From 1108e22d72c74c788214d137b3530647053ded08 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 3 Mar 2017 07:48:36 -0800 Subject: [PATCH 0049/1029] `Log.prototype[severity]` functions cannot deal with circular references (#1983) --- handwritten/logging/src/log.js | 10 ++++++---- handwritten/logging/test/log.js | 7 ++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index e20f4634052..760796ca6e6 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -118,10 +118,12 @@ util.inherits(Log, commonGrpc.ServiceObject); */ Log.assignSeverityToEntries_ = function(entries, severity) { return arrify(entries).map(function(entry) { - return extend(true, new Entry(), entry, { - metadata: { - severity: severity - } + var metadata = extend(true, {}, entry.metadata, { + severity: severity + }); + + return extend(new Entry(), entry, { + metadata: metadata }); }); }; diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 274bac2920f..45c7e0b39c5 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -142,9 +142,13 @@ describe('Log', function() { }); describe('assignSeverityToEntries_', function() { + var circular = {}; + circular.circular = circular; + var ENTRIES = [ { data: { a: 'b' } }, - { data: { c: 'd' } } + { data: { c: 'd' } }, + { data: { e: circular }} ]; var SEVERITY = 'severity'; @@ -164,6 +168,7 @@ describe('Log', function() { .map(prop('metadata')) .map(prop('severity')), [ + SEVERITY, SEVERITY, SEVERITY ] From 8199de2fb1013e297e4763f290136a40d6ec713e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 3 Mar 2017 15:23:24 -0500 Subject: [PATCH 0050/1029] update gax & google-proto-files --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2ef892ba106..0ccb869cf33 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,8 +57,8 @@ "arrify": "^1.0.0", "async": "^2.1.4", "extend": "^3.0.0", - "google-gax": "^0.10.0", - "google-proto-files": "^0.9.1", + "google-gax": "^0.12.2", + "google-proto-files": "^0.10.0", "is": "^3.0.1", "is-circular": "^1.0.1", "string-format-obj": "^1.0.0" From 00a0288dd648e33f16173c284ce603f8d5d650df Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 3 Mar 2017 15:55:03 -0500 Subject: [PATCH 0051/1029] logging @ 0.7.1 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0ccb869cf33..cf4193cdb71 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.7.0", + "version": "0.7.1", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 7067f1358a4b5dd1aa4ada51205b9741af92e902 Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Mon, 6 Mar 2017 13:15:19 -0800 Subject: [PATCH 0052/1029] Regenerate logging API client (#2031) --- .../src/v2/config_service_v2_client.js | 137 ++++++---- .../v2/config_service_v2_client_config.json | 12 +- handwritten/logging/src/v2/index.js | 21 +- .../src/v2/logging_service_v2_client.js | 258 +++++++++++++++--- .../v2/logging_service_v2_client_config.json | 24 +- .../src/v2/metrics_service_v2_client.js | 55 ++-- .../v2/metrics_service_v2_client_config.json | 12 +- 7 files changed, 376 insertions(+), 143 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 4fb4e1f4ca0..57ab8e23b30 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -73,31 +73,36 @@ var ALL_SCOPES = [ * @class */ function ConfigServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = opts || {}; - var servicePath = opts.servicePath || SERVICE_ADDRESS; - var port = opts.port || DEFAULT_SERVICE_PORT; - var sslCreds = opts.sslCreds || null; - var clientConfig = opts.clientConfig || {}; - var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.version; + opts = extend({ + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {} + }, opts); var googleApiClient = [ - appName + '/' + appVersion, + 'gl-node/' + process.versions.node + ]; + if (opts.libName && opts.libVersion) { + googleApiClient.push(opts.libName + '/' + opts.libVersion); + } + googleApiClient.push( CODE_GEN_NAME_VERSION, 'gax/' + gax.version, - 'nodejs/' + process.version].join(' '); + 'grpc/' + gaxGrpc.grpcVersion + ); var defaults = gaxGrpc.constructSettings( 'google.logging.v2.ConfigServiceV2', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); + + var self = this; + this.auth = gaxGrpc.auth; var configServiceV2Stub = gaxGrpc.createStub( - servicePath, - port, grpcClients.google.logging.v2.ConfigServiceV2, - {sslCreds: sslCreds}); + opts); var configServiceV2StubMethods = [ 'listSinks', 'getSink', @@ -106,13 +111,16 @@ function ConfigServiceV2Client(gaxGrpc, grpcClients, opts) { 'deleteSink' ]; configServiceV2StubMethods.forEach(function(methodName) { - this['_' + methodName] = gax.createApiCall( + self['_' + methodName] = gax.createApiCall( configServiceV2Stub.then(function(configServiceV2Stub) { - return configServiceV2Stub[methodName].bind(configServiceV2Stub); + return function() { + var args = Array.prototype.slice.call(arguments, 0); + return configServiceV2Stub[methodName].apply(configServiceV2Stub, args); + }; }), defaults[methodName], PAGE_DESCRIPTORS[methodName]); - }.bind(this)); + }); } // Path templates @@ -177,6 +185,15 @@ ConfigServiceV2Client.prototype.matchSinkFromSinkName = function(sinkName) { return SINK_PATH_TEMPLATE.match(sinkName).sink; }; +/** + * Get the project ID used by this class. + * @aram {function(Error, string)} callback - the callback to be called with + * the current project Id. + */ +ConfigServiceV2Client.prototype.getProjectId = function(callback) { + return this.auth.getProjectId(callback); +}; + // Service calls /** @@ -185,10 +202,8 @@ ConfigServiceV2Client.prototype.matchSinkFromSinkName = function(sinkName) { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name where this sink was created: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" + * Required. The parent resource whose sinks are to be listed. + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -283,10 +298,8 @@ ConfigServiceV2Client.prototype.listSinks = function(request, options, callback) * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name where this sink was created: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" + * Required. The parent resource whose sinks are to be listed. + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. * @param {number=} request.pageSize * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -323,10 +336,12 @@ ConfigServiceV2Client.prototype.listSinksStream = function(request, options) { * @param {Object} request * The request object that will be sent. * @param {string} request.sinkName - * Required. The resource name of the sink to return: + * 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 * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. @@ -362,7 +377,11 @@ ConfigServiceV2Client.prototype.getSink = function(request, options, callback) { }; /** - * Creates a sink. + * 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. * * @param {Object} request * The request object that will be sent. @@ -371,17 +390,25 @@ ConfigServiceV2Client.prototype.getSink = function(request, options, callback) { * * "projects/[PROJECT_ID]" * "organizations/[ORGANIZATION_ID]" + * + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. * @param {Object} request.sink * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. * * This object should have the same structure as [LogSink]{@link LogSink} * @param {boolean=} request.uniqueWriterIdentity - * Optional. Whether the sink will have a dedicated service account returned - * in the sink's writer_identity. Set this field to be true to export - * logs from one project to a different project. This field is ignored for - * non-project sinks (e.g. organization sinks) because those sinks are - * required to have dedicated service accounts. + * 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 {@link LogSink}. * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. @@ -422,13 +449,20 @@ ConfigServiceV2Client.prototype.createSink = function(request, options, callback }; /** - * Updates or creates a sink. + * Updates a sink. If the named sink doesn't exist, then this method is + * identical to + * [sinks.create](https://cloud.google.com/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. * * @param {Object} request * The request object that will be sent. * @param {string} request.sinkName - * Required. The resource name of the sink to update, including the parent - * resource and the sink identifier: + * 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]" @@ -436,16 +470,22 @@ ConfigServiceV2Client.prototype.createSink = function(request, options, callback * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} request.sink * Required. The updated sink, whose name is the same identifier that appears - * as part of `sinkName`. If `sinkName` does not exist, then + * as part of `sink_name`. If `sink_name` does not exist, then * this method creates a new sink. * * This object should have the same structure as [LogSink]{@link LogSink} * @param {boolean=} request.uniqueWriterIdentity - * Optional. Whether the sink will have a dedicated service account returned - * in the sink's writer_identity. Set this field to be true to export - * logs from one project to a different project. This field is ignored for - * non-project sinks (e.g. organization sinks) because those sinks are - * required to have dedicated service accounts. + * Optional. See + * [sinks.create](https://cloud.google.com/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 {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. @@ -486,18 +526,21 @@ ConfigServiceV2Client.prototype.updateSink = function(request, options, callback }; /** - * Deletes a sink. + * Deletes a sink. If the sink has a unique `writer_identity`, then that + * service account is also deleted. * * @param {Object} request * The request object that will be sent. * @param {string} request.sinkName - * Required. The resource name of the sink to delete, including the parent - * resource and the sink identifier: + * 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. + * 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 * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. @@ -551,10 +594,6 @@ function ConfigServiceV2ClientBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.appName - * The codename of the calling service. - * @param {String=} opts.appVersion - * The version of the calling service. */ this.configServiceV2Client = function(opts) { return new ConfigServiceV2Client(gaxGrpc, configServiceV2Client, opts); diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index bdfd9c9e162..2c1685982f6 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -2,13 +2,11 @@ "interfaces": { "google.logging.v2.ConfigServiceV2": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] }, "retry_params": { "default": { diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/src/v2/index.js index 115c482b02e..77db934f011 100644 --- a/handwritten/logging/src/v2/index.js +++ b/handwritten/logging/src/v2/index.js @@ -1,11 +1,11 @@ -/*! - * Copyright 2016 Google Inc. All Rights Reserved. +/* + * Copyright 2016 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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, @@ -15,24 +15,25 @@ */ 'use strict'; -var configServiceV2Client = require('./config_service_v2_client'); var loggingServiceV2Client = require('./logging_service_v2_client'); +var configServiceV2Client = require('./config_service_v2_client'); var metricsServiceV2Client = require('./metrics_service_v2_client'); -var extend = require('extend'); var gax = require('google-gax'); +var extend = require('extend'); function v2(options) { options = extend({ scopes: v2.ALL_SCOPES }, options); var gaxGrpc = gax.grpc(options); - var result = {}; - extend(result, configServiceV2Client(gaxGrpc)); - extend(result, loggingServiceV2Client(gaxGrpc)); - extend(result, metricsServiceV2Client(gaxGrpc)); - return result; + return extend( + {}, + loggingServiceV2Client(gaxGrpc), + configServiceV2Client(gaxGrpc), + metricsServiceV2Client(gaxGrpc)); } v2.SERVICE_ADDRESS = loggingServiceV2Client.SERVICE_ADDRESS; v2.ALL_SCOPES = loggingServiceV2Client.ALL_SCOPES; + module.exports = v2; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 4b5037e0550..3ed647ab0bb 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -45,7 +45,11 @@ var PAGE_DESCRIPTORS = { listMonitoredResourceDescriptors: new gax.PageDescriptor( 'pageToken', 'nextPageToken', - 'resourceDescriptors') + 'resourceDescriptors'), + listLogs: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'logNames') }; /** @@ -76,45 +80,66 @@ var ALL_SCOPES = [ * @class */ function LoggingServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = opts || {}; - var servicePath = opts.servicePath || SERVICE_ADDRESS; - var port = opts.port || DEFAULT_SERVICE_PORT; - var sslCreds = opts.sslCreds || null; - var clientConfig = opts.clientConfig || {}; - var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.version; + opts = extend({ + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {} + }, opts); var googleApiClient = [ - appName + '/' + appVersion, + 'gl-node/' + process.versions.node + ]; + if (opts.libName && opts.libVersion) { + googleApiClient.push(opts.libName + '/' + opts.libVersion); + } + googleApiClient.push( CODE_GEN_NAME_VERSION, 'gax/' + gax.version, - 'nodejs/' + process.version].join(' '); + 'grpc/' + gaxGrpc.grpcVersion + ); + + var bundleDescriptors = { + writeLogEntries: new gax.BundleDescriptor( + 'entries', + [ + 'logName', + 'resource', + 'labels' + ], + null, + gax.createByteLengthFunction(grpcClients.google.logging.v2.LogEntry)) + }; var defaults = gaxGrpc.constructSettings( 'google.logging.v2.LoggingServiceV2', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); + + var self = this; + this.auth = gaxGrpc.auth; var loggingServiceV2Stub = gaxGrpc.createStub( - servicePath, - port, grpcClients.google.logging.v2.LoggingServiceV2, - {sslCreds: sslCreds}); + opts); var loggingServiceV2StubMethods = [ 'deleteLog', 'writeLogEntries', 'listLogEntries', - 'listMonitoredResourceDescriptors' + 'listMonitoredResourceDescriptors', + 'listLogs' ]; loggingServiceV2StubMethods.forEach(function(methodName) { - this['_' + methodName] = gax.createApiCall( + self['_' + methodName] = gax.createApiCall( loggingServiceV2Stub.then(function(loggingServiceV2Stub) { - return loggingServiceV2Stub[methodName].bind(loggingServiceV2Stub); + return function() { + var args = Array.prototype.slice.call(arguments, 0); + return loggingServiceV2Stub[methodName].apply(loggingServiceV2Stub, args); + }; }), defaults[methodName], - PAGE_DESCRIPTORS[methodName]); - }.bind(this)); + PAGE_DESCRIPTORS[methodName] || bundleDescriptors[methodName]); + }); } // Path templates @@ -179,6 +204,15 @@ LoggingServiceV2Client.prototype.matchLogFromLogName = function(logName) { return LOG_PATH_TEMPLATE.match(logName).log; }; +/** + * Get the project ID used by this class. + * @aram {function(Error, string)} callback - the callback to be called with + * the current project Id. + */ +LoggingServiceV2Client.prototype.getProjectId = function(callback) { + return this.auth.getProjectId(callback); +}; + // Service calls /** @@ -313,14 +347,14 @@ LoggingServiceV2Client.prototype.writeLogEntries = function(request, options, ca }; /** - * Lists log entries. Use this method to retrieve log entries from Cloud - * Logging. For ways to export log entries, see + * Lists log entries. Use this method to retrieve log entries from + * Stackdriver Logging. For ways to export log entries, see * [Exporting Logs](https://cloud.google.com/logging/docs/export). * * @param {Object} request * The request object that will be sent. * @param {string[]} request.resourceNames - * Required. One or more cloud resources from which to retrieve log + * Required. Names of one or more resources from which to retrieve log * entries: * * "projects/[PROJECT_ID]" @@ -328,15 +362,18 @@ LoggingServiceV2Client.prototype.writeLogEntries = function(request, options, ca * * Projects listed in the `project_ids` field are added to this list. * @param {string[]=} request.projectIds - * Deprecated. 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 format and - * added to the list of resources in `resourceNames`. Callers should use - * `resourceNames` rather than this parameter. + * 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`. * @param {string=} request.filter * Optional. A filter that chooses which log entries to return. See [Advanced * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that - * match the filter are returned. An empty filter matches all log entries. + * 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. * @param {string=} request.orderBy * Optional. How the results should be sorted. Presently, the only permitted @@ -439,7 +476,7 @@ LoggingServiceV2Client.prototype.listLogEntries = function(request, options, cal * @param {Object} request * The request object that will be sent. * @param {string[]} request.resourceNames - * Required. One or more cloud resources from which to retrieve log + * Required. Names of one or more resources from which to retrieve log * entries: * * "projects/[PROJECT_ID]" @@ -447,15 +484,18 @@ LoggingServiceV2Client.prototype.listLogEntries = function(request, options, cal * * Projects listed in the `project_ids` field are added to this list. * @param {string[]=} request.projectIds - * Deprecated. 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 format and - * added to the list of resources in `resourceNames`. Callers should use - * `resourceNames` rather than this parameter. + * 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`. * @param {string=} request.filter * Optional. A filter that chooses which log entries to return. See [Advanced * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that - * match the filter are returned. An empty filter matches all log entries. + * 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. * @param {string=} request.orderBy * Optional. How the results should be sorted. Presently, the only permitted @@ -495,7 +535,8 @@ LoggingServiceV2Client.prototype.listLogEntriesStream = function(request, option }; /** - * Lists the monitored resource descriptors used by Stackdriver Logging. + * Lists the descriptors for monitored resource types used by Stackdriver + * Logging. * * @param {Object} request * The request object that will be sent. @@ -622,6 +663,145 @@ LoggingServiceV2Client.prototype.listMonitoredResourceDescriptorsStream = functi return PAGE_DESCRIPTORS.listMonitoredResourceDescriptors.createStream(this._listMonitoredResourceDescriptors, request, options); }; +/** + * Lists the logs in projects or organizations. + * Only logs that have entries are listed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name that owns the logs: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of string. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogsResponse]{@link ListLogsResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of string. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of string in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListLogsResponse]{@link ListLogsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var client = loggingV2.loggingServiceV2Client(); + * var formattedParent = client.projectPath("[PROJECT]"); + * // Iterate over all elements. + * client.listLogs({parent: formattedParent}).then(function(responses) { + * var resources = responses[0]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]) + * } + * }).catch(function(err) { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * var options = {autoPaginate: false}; + * function callback(responses) { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows there's more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (var i = 0; i < resources.length; ++i) { + * // doThingsWith(resources[i]); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listLogs(nextRequest, options).then(callback); + * } + * } + * client.listLogs({parent: formattedParent}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); + */ +LoggingServiceV2Client.prototype.listLogs = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + + return this._listLogs(request, options, callback); +}; + +/** + * Equivalent to {@link listLogs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogs} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name that owns the logs: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @return {Stream} + * An object stream which emits a string on 'data' event. + * + * @example + * + * var client = loggingV2.loggingServiceV2Client(); + * var formattedParent = client.projectPath("[PROJECT]"); + * client.listLogsStream({parent: formattedParent}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', function(err) { + * console.error(err); + * }); + */ +LoggingServiceV2Client.prototype.listLogsStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listLogs.createStream(this._listLogs, request, options); +}; + function LoggingServiceV2ClientBuilder(gaxGrpc) { if (!(this instanceof LoggingServiceV2ClientBuilder)) { return new LoggingServiceV2ClientBuilder(gaxGrpc); @@ -647,10 +827,6 @@ function LoggingServiceV2ClientBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.appName - * The codename of the calling service. - * @param {String=} opts.appVersion - * The version of the calling service. */ this.loggingServiceV2Client = function(opts) { return new LoggingServiceV2Client(gaxGrpc, loggingServiceV2Client, opts); diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index 041bd4e3998..3dc284718e2 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -2,13 +2,11 @@ "interfaces": { "google.logging.v2.LoggingServiceV2": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] }, "retry_params": { "default": { @@ -39,7 +37,12 @@ "WriteLogEntries": { "timeout_millis": 30000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "default", + "bundling": { + "element_count_threshold": 100, + "request_byte_threshold": 1024, + "delay_threshold_millis": 10 + } }, "ListLogEntries": { "timeout_millis": 30000, @@ -50,6 +53,11 @@ "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" + }, + "ListLogs": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" } } } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 7ecf32cbbd5..62d5a731e8e 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -72,31 +72,36 @@ var ALL_SCOPES = [ * @class */ function MetricsServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = opts || {}; - var servicePath = opts.servicePath || SERVICE_ADDRESS; - var port = opts.port || DEFAULT_SERVICE_PORT; - var sslCreds = opts.sslCreds || null; - var clientConfig = opts.clientConfig || {}; - var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.version; + opts = extend({ + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {} + }, opts); var googleApiClient = [ - appName + '/' + appVersion, + 'gl-node/' + process.versions.node + ]; + if (opts.libName && opts.libVersion) { + googleApiClient.push(opts.libName + '/' + opts.libVersion); + } + googleApiClient.push( CODE_GEN_NAME_VERSION, 'gax/' + gax.version, - 'nodejs/' + process.version].join(' '); + 'grpc/' + gaxGrpc.grpcVersion + ); var defaults = gaxGrpc.constructSettings( 'google.logging.v2.MetricsServiceV2', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); + var self = this; + + this.auth = gaxGrpc.auth; var metricsServiceV2Stub = gaxGrpc.createStub( - servicePath, - port, grpcClients.google.logging.v2.MetricsServiceV2, - {sslCreds: sslCreds}); + opts); var metricsServiceV2StubMethods = [ 'listLogMetrics', 'getLogMetric', @@ -105,13 +110,16 @@ function MetricsServiceV2Client(gaxGrpc, grpcClients, opts) { 'deleteLogMetric' ]; metricsServiceV2StubMethods.forEach(function(methodName) { - this['_' + methodName] = gax.createApiCall( + self['_' + methodName] = gax.createApiCall( metricsServiceV2Stub.then(function(metricsServiceV2Stub) { - return metricsServiceV2Stub[methodName].bind(metricsServiceV2Stub); + return function() { + var args = Array.prototype.slice.call(arguments, 0); + return metricsServiceV2Stub[methodName].apply(metricsServiceV2Stub, args); + }; }), defaults[methodName], PAGE_DESCRIPTORS[methodName]); - }.bind(this)); + }); } // Path templates @@ -176,6 +184,15 @@ MetricsServiceV2Client.prototype.matchMetricFromMetricName = function(metricName return METRIC_PATH_TEMPLATE.match(metricName).metric; }; +/** + * Get the project ID used by this class. + * @aram {function(Error, string)} callback - the callback to be called with + * the current project Id. + */ +MetricsServiceV2Client.prototype.getProjectId = function(callback) { + return this.auth.getProjectId(callback); +}; + // Service calls /** @@ -530,10 +547,6 @@ function MetricsServiceV2ClientBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.appName - * The codename of the calling service. - * @param {String=} opts.appVersion - * The version of the calling service. */ this.metricsServiceV2Client = function(opts) { return new MetricsServiceV2Client(gaxGrpc, metricsServiceV2Client, opts); diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json index 0400cb5bb63..9bfa238cb85 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client_config.json +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -2,13 +2,11 @@ "interfaces": { "google.logging.v2.MetricsServiceV2": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] }, "retry_params": { "default": { From c7906bc78e919cc65a0a7fd2b9f503bf751bddfd Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 13 Mar 2017 15:01:18 -0400 Subject: [PATCH 0053/1029] update @google-cloud/common-grpc deps --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cf4193cdb71..75d7325aac6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -53,7 +53,7 @@ ], "dependencies": { "@google-cloud/common": "^0.12.0", - "@google-cloud/common-grpc": "^0.1.1", + "@google-cloud/common-grpc": "^0.2.0", "arrify": "^1.0.0", "async": "^2.1.4", "extend": "^3.0.0", From 4d556914eb866f114092135bccb720694fcbb9a5 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 13 Mar 2017 19:08:25 -0400 Subject: [PATCH 0054/1029] update @google-cloud/common-grpc deps --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 75d7325aac6..aa41c518411 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -53,7 +53,7 @@ ], "dependencies": { "@google-cloud/common": "^0.12.0", - "@google-cloud/common-grpc": "^0.2.0", + "@google-cloud/common-grpc": "^0.2.1", "arrify": "^1.0.0", "async": "^2.1.4", "extend": "^3.0.0", From d8ccb56dce10fd9011e555605af96c24f4c3060c Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 13 Mar 2017 17:04:06 -0700 Subject: [PATCH 0055/1029] Add insertId on log entries (#2021) --- handwritten/logging/package.json | 1 + handwritten/logging/src/entry.js | 14 ++++++++ handwritten/logging/system-test/logging.js | 20 +++++++++-- handwritten/logging/test/entry.js | 39 +++++++++++++++++++++- 4 files changed, 71 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index aa41c518411..b465d3b4878 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,6 +56,7 @@ "@google-cloud/common-grpc": "^0.2.1", "arrify": "^1.0.0", "async": "^2.1.4", + "eventid": "^0.1.0", "extend": "^3.0.0", "google-gax": "^0.12.2", "google-proto-files": "^0.10.0", diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 5ab9005e9a4..8772ae5c536 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -21,10 +21,13 @@ 'use strict'; var commonGrpc = require('@google-cloud/common-grpc'); +var EventId = require('eventid'); var extend = require('extend'); var is = require('is'); var isCircular = require('is-circular'); +var eventId = new EventId(); + /** * Create an entry object to define new data to insert into a log. * @@ -87,6 +90,17 @@ function Entry(metadata, data) { timestamp: new Date() }, metadata); + // JavaScript date has a very coarse granularity (millisecond), which makes + // it quite likely that multiple log entries would have the same timestamp. + // The Logging API doesn't guarantee to preserve insertion order for entries + // with the same timestamp. The service does use `insertId` as a secondary + // ordering for entries with the same timestamp. `insertId` needs to be + // globally unique (within the project) however. + // + // We use a globally unique monotonically increasing EventId as the + // insertId. + this.metadata.insertId = this.metadata.insertId || eventId.new(); + this.data = data; } diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 750f481054c..f4419a3c4b8 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -351,8 +351,8 @@ describe('Logging', function() { var entry1 = log.entry('1'); setTimeout(function() { - var entry3 = log.entry('3'); - var entry2 = log.entry({ timestamp: entry3.metadata.timestamp }, '2'); + var entry2 = log.entry('2'); + var entry3 = log.entry({ timestamp: entry2.metadata.timestamp }, '3'); // Re-arrange to confirm the timestamp is sent and honored. log.write([entry2, entry3, entry1], options, function(err) { @@ -369,6 +369,22 @@ describe('Logging', function() { }, 1000); }); + it('should preserve order for sequential write calls', function(done) { + var messages = ['1', '2', '3', '4', '5']; + + messages.forEach(function(message) { + log.write(log.entry(message)); + }); + + setTimeout(function() { + log.getEntries({ pageSize: messages.length }, function(err, entries) { + assert.ifError(err); + assert.deepEqual(entries.reverse().map(prop('data')), messages); + done(); + }); + }, WRITE_CONSISTENCY_DELAY_MS); + }); + it('should write an entry with primitive values', function(done) { var logEntry = log.entry({ when: new Date(), diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index bf3be4c9edf..7a069f819d7 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -24,6 +24,13 @@ var util = require('@google-cloud/common').util; function FakeGrpcService() {} +var fakeEventIdNewOverride; + +function FakeEventId() {} +FakeEventId.prototype.new = function() { + return (fakeEventIdNewOverride || util.noop).apply(null, arguments); +}; + describe('Entry', function() { var Entry; var entry; @@ -35,11 +42,13 @@ describe('Entry', function() { Entry = proxyquire('../src/entry.js', { '@google-cloud/common-grpc': { Service: FakeGrpcService - } + }, + 'eventid': FakeEventId }); }); beforeEach(function() { + fakeEventIdNewOverride = null; extend(FakeGrpcService, GrpcService); entry = new Entry(METADATA, DATA); }); @@ -67,6 +76,34 @@ describe('Entry', function() { assert.strictEqual(entry.metadata.timestamp, timestamp); }); + it('should assign insertId to metadata', function() { + var eventId = 'event-id'; + + fakeEventIdNewOverride = function() { + return eventId; + }; + + var entry = new Entry(); + + assert.strictEqual(entry.metadata.insertId, eventId); + }); + + it('should not assign insertId if one is already set', function() { + var eventId = 'event-id'; + + fakeEventIdNewOverride = function() { + return eventId; + }; + + var userDefinedInsertId = 'user-defined-insert-id'; + + var entry = new Entry({ + insertId: userDefinedInsertId + }); + + assert.strictEqual(entry.metadata.insertId, userDefinedInsertId); + }); + it('should localize data', function() { assert.strictEqual(entry.data, DATA); }); From 0fb9b94c630462a8680939dbcf91fd2571547748 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 14 Mar 2017 12:12:43 -0400 Subject: [PATCH 0056/1029] logging: test lint fix --- handwritten/logging/test/entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 7a069f819d7..9c7733a0670 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -43,7 +43,7 @@ describe('Entry', function() { '@google-cloud/common-grpc': { Service: FakeGrpcService }, - 'eventid': FakeEventId + eventid: FakeEventId }); }); From 7a140c71f8fdde3a66a127a3c4e4e7ac6ac07938 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 14 Mar 2017 16:47:06 -0400 Subject: [PATCH 0057/1029] logging @ 0.8.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b465d3b4878..60e097c12e9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.7.1", + "version": "0.8.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 246292e493a756f35b346a3c48e7677356cf9334 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 15 Mar 2017 08:08:58 -0700 Subject: [PATCH 0058/1029] logging: fix jsdoc for Log constructor (#2084) --- handwritten/logging/src/log.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 760796ca6e6..db2bb6f691b 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -40,6 +40,10 @@ var Entry = require('./entry.js'); */ var Metadata = require('./metadata.js'); +/*! Developer Documentation + * + * @param {module:logging} logging - Parent Logging instance. + */ /** * A log is a named collection of entries, each entry representing a timestamped * event. Logs can be produced by Google Cloud Platform services, by third-party @@ -52,7 +56,7 @@ var Metadata = require('./metadata.js'); * @alias module:logging/log * @constructor * - * @param {object} options - [Configuration object](#/docs). + * @param {string} name - Name of the log. * * @example * var log = logging.log('syslog'); From dde4ee414e3940260a755b6bd542c07fa6429d51 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 15 Mar 2017 09:27:46 -0700 Subject: [PATCH 0059/1029] log: accept removeCircular as an option to write (#2083) --- handwritten/logging/package.json | 1 - handwritten/logging/src/entry.js | 11 ++++++----- handwritten/logging/src/log.js | 18 +++++++++++++++--- handwritten/logging/test/entry.js | 14 ++++++++------ handwritten/logging/test/log.js | 26 ++++++++++++++++++++++++-- 5 files changed, 53 insertions(+), 17 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 60e097c12e9..2d8638daa35 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,6 @@ "google-gax": "^0.12.2", "google-proto-files": "^0.10.0", "is": "^3.0.1", - "is-circular": "^1.0.1", "string-format-obj": "^1.0.0" }, "devDependencies": { diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 8772ae5c536..498a97bd71b 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -24,7 +24,6 @@ var commonGrpc = require('@google-cloud/common-grpc'); var EventId = require('eventid'); var extend = require('extend'); var is = require('is'); -var isCircular = require('is-circular'); var eventId = new EventId(); @@ -134,17 +133,19 @@ Entry.fromApiResponse_ = function(entry) { /** * Serialize an entry to the format the API expects. * + * @param {object=} options - Configuration object. + * @param {boolean} options.removeCircular - Replace circular references in an + * object with a string value, `[Circular]`. * @private */ -Entry.prototype.toJSON = function() { - if (is.object(this.data) && isCircular([this.data])) { - throw new Error('The JSON data for this entry has a circular reference.'); - } +Entry.prototype.toJSON = function(options) { + options = options || {}; var entry = extend(true, {}, this.metadata); if (is.object(this.data)) { entry.jsonPayload = commonGrpc.Service.objToStruct_(this.data, { + removeCircular: !!options.removeCircular, stringify: true }); } else if (is.string(this.data)) { diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index db2bb6f691b..b14cb486627 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -520,6 +520,8 @@ Log.prototype.warning = function(entry, options, callback) { * @param {object[]} options.labels - Labels to set on the log. * @param {object} options.resource - A default monitored resource for entries * where one isn't specified. + * @param {boolean} options.removeCircular - Replace circular references in an + * object with a string value, `[Circular]`. * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request. * @param {object} callback.apiResponse - The full API response. @@ -597,7 +599,9 @@ Log.prototype.write = function(entry, options, callback) { var entries = arrify(entry); - this.decorateEntries_(entries, function(err, decoratedEntries) { + this.decorateEntries_(entries, { + removeCircular: options.removeCircular + }, function(err, decoratedEntries) { // Ignore errors (the API will speak up if it has an issue). reqOpts.entries = decoratedEntries; @@ -615,16 +619,24 @@ Log.prototype.write = function(entry, options, callback) { * @private * * @param {object} entry - An entry object. + * @param {object} options - configuration object + * @param {boolean} options.removeCircular - Replace circular references in an + * object with a string value, `[Circular]`. */ -Log.prototype.decorateEntries_ = function(entries, callback) { +Log.prototype.decorateEntries_ = function(entries, options, callback) { var self = this; + if (is.fn(options)) { + callback = options; + options = {}; + } + async.map(entries, function(entry, callback) { if (!(entry instanceof Entry)) { entry = self.entry(entry); } - var decoratedEntry = entry.toJSON(); + var decoratedEntry = entry.toJSON(options); decoratedEntry.logName = self.formattedName_; self.metadata_.assignDefaultResource(decoratedEntry, function(err, entry) { diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 9c7733a0670..aa4b7803f47 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -188,6 +188,7 @@ describe('Entry', function() { FakeGrpcService.objToStruct_ = function(obj, options) { assert.strictEqual(obj, input); assert.deepEqual(options, { + removeCircular: false, stringify: true }); return converted; @@ -198,13 +199,14 @@ describe('Entry', function() { assert.strictEqual(json.jsonPayload, converted); }); - it('should throw with a struct with a circular reference', function() { - entry.data = { val: true }; - entry.data.data = entry.data; + it('should pass removeCircular to objToStruct_', function(done) { + FakeGrpcService.objToStruct_ = function(obj, options) { + assert.strictEqual(options.removeCircular, true); + done(); + }; - assert.throws(function() { - entry.toJSON(); - }, /The JSON data for this entry has a circular reference\./); + entry.data = {}; + entry.toJSON({ removeCircular: true }); }); it('should assign string data as textPayload', function() { diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 45c7e0b39c5..100d1d7e512 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -321,7 +321,7 @@ describe('Log', function() { }; beforeEach(function() { - log.decorateEntries_ = function(entries, callback) { + log.decorateEntries_ = function(entries, options, callback) { callback(null, entries); }; }); @@ -343,7 +343,7 @@ describe('Log', function() { it('should arrify & decorate the entries', function(done) { var decoratedEntries = []; - log.decorateEntries_ = function(entries, callback) { + log.decorateEntries_ = function(entries, options, callback) { assert.strictEqual(entries[0], ENTRY); callback(null, decoratedEntries); }; @@ -380,6 +380,15 @@ describe('Log', function() { log.write(ENTRY, done); }); + + it('should pass options.removeCircular to decorateEntries', function(done) { + log.decorateEntries_ = function(entries, options) { + assert.strictEqual(options.removeCircular, true); + done(); + }; + + log.write(ENTRY, { removeCircular: true }, assert.ifError); + }); }); describe('severity shortcuts', function() { @@ -673,6 +682,19 @@ describe('Log', function() { }); }); + it('should pass options to toJSON', function(done) { + var options = {}; + + var entry = new Entry(); + entry.toJSON = function(options_) { + assert.strictEqual(options_, options); + setImmediate(done); + return {}; + }; + + log.decorateEntries_([entry], options, assert.ifError); + }); + it('should assign the log name', function(done) { log.decorateEntries_([{}], function(err, decoratedEntries) { assert.ifError(err); From 4423fa5f6f717596d9ea6f9c7a8def3c4d036d86 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 15 Mar 2017 13:25:24 -0400 Subject: [PATCH 0060/1029] logging: allow more time for write consistency --- handwritten/logging/system-test/logging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index f4419a3c4b8..48f9119eeb3 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -33,7 +33,7 @@ var Logging = require('../'); describe('Logging', function() { var TESTS_PREFIX = 'gcloud-logging-test'; - var WRITE_CONSISTENCY_DELAY_MS = 60000; + var WRITE_CONSISTENCY_DELAY_MS = 90000; var logging = new Logging(env); var bigQuery = new BigQuery(env); From b1602c16acf7ce75b2784b5c0750e1c33d959e9b Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Thu, 16 Mar 2017 09:30:16 -0700 Subject: [PATCH 0061/1029] Make removeCircular a property of the Log object (#2090) --- handwritten/logging/src/index.js | 7 +++++-- handwritten/logging/src/log.js | 28 ++++++++++++---------------- handwritten/logging/test/log.js | 31 ++++++++++++++++--------------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index c2e46b2bedf..83bbf2f10ba 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -452,13 +452,16 @@ Logging.prototype.getSinksStream = common.paginator.streamify('getSinks'); * @resource [Log Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs} * * @param {string} name - Name of the existing log. + * @param {object=} options - Configuration object. + * @param {boolean} options.removeCircular - Replace circular references in + * logged objects with a string value, `[Circular]`. (Default: false) * @return {module:logging/log} * * @example * var log = logging.log('my-log'); */ -Logging.prototype.log = function(name) { - return new Log(this, name); +Logging.prototype.log = function(name, options) { + return new Log(this, name, options); }; /** diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index b14cb486627..7a59c70919d 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -57,13 +57,19 @@ var Metadata = require('./metadata.js'); * @constructor * * @param {string} name - Name of the log. + * @param {object=} options - Configuration object. + * @param {boolean} options.removeCircular - Replace circular references in + * logged objects with a string value, `[Circular]`. (Default: false) * * @example * var log = logging.log('syslog'); */ -function Log(logging, name) { +function Log(logging, name, options) { + options = options || {}; + this.formattedName_ = Log.formatName_(logging.projectId, name); this.name = this.formattedName_.split('/').pop(); + this.removeCircular_ = !!options.removeCircular; this.metadata_ = new Metadata(logging); @@ -520,8 +526,6 @@ Log.prototype.warning = function(entry, options, callback) { * @param {object[]} options.labels - Labels to set on the log. * @param {object} options.resource - A default monitored resource for entries * where one isn't specified. - * @param {boolean} options.removeCircular - Replace circular references in an - * object with a string value, `[Circular]`. * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request. * @param {object} callback.apiResponse - The full API response. @@ -599,9 +603,7 @@ Log.prototype.write = function(entry, options, callback) { var entries = arrify(entry); - this.decorateEntries_(entries, { - removeCircular: options.removeCircular - }, function(err, decoratedEntries) { + this.decorateEntries_(entries, function(err, decoratedEntries) { // Ignore errors (the API will speak up if it has an issue). reqOpts.entries = decoratedEntries; @@ -619,24 +621,18 @@ Log.prototype.write = function(entry, options, callback) { * @private * * @param {object} entry - An entry object. - * @param {object} options - configuration object - * @param {boolean} options.removeCircular - Replace circular references in an - * object with a string value, `[Circular]`. */ -Log.prototype.decorateEntries_ = function(entries, options, callback) { +Log.prototype.decorateEntries_ = function(entries, callback) { var self = this; - if (is.fn(options)) { - callback = options; - options = {}; - } - async.map(entries, function(entry, callback) { if (!(entry instanceof Entry)) { entry = self.entry(entry); } - var decoratedEntry = entry.toJSON(options); + var decoratedEntry = entry.toJSON({ + removeCircular: self.removeCircular_ + }); decoratedEntry.logName = self.formattedName_; self.metadata_.assignDefaultResource(decoratedEntry, function(err, entry) { diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 100d1d7e512..b187a315404 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -101,6 +101,10 @@ describe('Log', function() { assert.strictEqual(log.name, LOG_NAME_ENCODED); }); + it('should localize removeCircular_ to default value', function() { + assert.strictEqual(log.removeCircular_, false); + }); + it('should localize the formatted name', function() { var formattedName = 'formatted-name'; @@ -139,6 +143,12 @@ describe('Log', function() { } }); }); + + it('should accept and localize options.removeCircular', function() { + var options = { removeCircular: true }; + var log = new Log(LOGGING, LOG_NAME_FORMATTED, options); + assert.strictEqual(log.removeCircular_, true); + }); }); describe('assignSeverityToEntries_', function() { @@ -321,7 +331,7 @@ describe('Log', function() { }; beforeEach(function() { - log.decorateEntries_ = function(entries, options, callback) { + log.decorateEntries_ = function(entries, callback) { callback(null, entries); }; }); @@ -343,7 +353,7 @@ describe('Log', function() { it('should arrify & decorate the entries', function(done) { var decoratedEntries = []; - log.decorateEntries_ = function(entries, options, callback) { + log.decorateEntries_ = function(entries, callback) { assert.strictEqual(entries[0], ENTRY); callback(null, decoratedEntries); }; @@ -380,15 +390,6 @@ describe('Log', function() { log.write(ENTRY, done); }); - - it('should pass options.removeCircular to decorateEntries', function(done) { - log.decorateEntries_ = function(entries, options) { - assert.strictEqual(options.removeCircular, true); - done(); - }; - - log.write(ENTRY, { removeCircular: true }, assert.ifError); - }); }); describe('severity shortcuts', function() { @@ -682,17 +683,17 @@ describe('Log', function() { }); }); - it('should pass options to toJSON', function(done) { - var options = {}; + it('should pass log.removeCircular to toJSON', function(done) { + log.removeCircular_ = true; var entry = new Entry(); entry.toJSON = function(options_) { - assert.strictEqual(options_, options); + assert.deepStrictEqual(options_, { removeCircular: true }); setImmediate(done); return {}; }; - log.decorateEntries_([entry], options, assert.ifError); + log.decorateEntries_([entry], assert.ifError); }); it('should assign the log name', function(done) { From 5390772323dc0ccbc2a9469bee1ab8454c238d3a Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 16 Mar 2017 13:01:35 -0400 Subject: [PATCH 0062/1029] logging: return serialization error to callback instead of throwing (#2081) --- handwritten/logging/src/log.js | 14 +++++++++++--- handwritten/logging/test/log.js | 14 ++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 7a59c70919d..00137e324d2 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -630,9 +630,17 @@ Log.prototype.decorateEntries_ = function(entries, callback) { entry = self.entry(entry); } - var decoratedEntry = entry.toJSON({ - removeCircular: self.removeCircular_ - }); + var decoratedEntry; + + try { + decoratedEntry = entry.toJSON({ + removeCircular: self.removeCircular_ + }); + } catch(e) { + callback(e); + return; + } + decoratedEntry.logName = self.formattedName_; self.metadata_.assignDefaultResource(decoratedEntry, function(err, entry) { diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index b187a315404..3d7841777c2 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -696,6 +696,20 @@ describe('Log', function() { log.decorateEntries_([entry], assert.ifError); }); + it('should exec callback with error from serialization', function(done) { + var error = new Error('Error.'); + + var entry = new Entry(); + entry.toJSON = function() { + throw error; + }; + + log.decorateEntries_([entry], function(err) { + assert.strictEqual(err, error); + done(); + }); + }); + it('should assign the log name', function(done) { log.decorateEntries_([{}], function(err, decoratedEntries) { assert.ifError(err); From 4b6b88a36d9782d279dfb6dec4b537c65496ea08 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 17 Mar 2017 10:31:43 -0400 Subject: [PATCH 0063/1029] tests: correct system tests for envs without projectId --- handwritten/logging/system-test/logging.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 48f9119eeb3..c748430d5e7 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -21,7 +21,6 @@ var async = require('async'); var BigQuery = require('@google-cloud/bigquery'); var exec = require('methmeth'); var extend = require('extend'); -var format = require('string-format-obj'); var is = require('is'); var prop = require('propprop'); var PubSub = require('@google-cloud/pubsub'); @@ -137,11 +136,12 @@ describe('Logging', function() { }, function(err, sink, apiResponse) { assert.ifError(err); - var destination = format('{baseUrl}/projects/{pId}/datasets/{dId}', { - baseUrl: 'bigquery.googleapis.com', - pId: dataset.parent.projectId, - dId: dataset.id - }); + var destination = 'bigquery.googleapis.com/datasets/' + dataset.id; + + // The projectId may have been replaced depending on how the system + // tests are being run, so let's not care about that. + apiResponse.destination = + apiResponse.destination.replace(/projects\/[^/]*\//, ''); assert.strictEqual(apiResponse.destination, destination); @@ -158,7 +158,13 @@ describe('Logging', function() { assert.ifError(err); var destination = 'pubsub.googleapis.com/' + topic.name; - assert.strictEqual(apiResponse.destination, destination); + + // The projectId may have been replaced depending on how the system + // tests are being run, so let's not care about that. + assert.strictEqual( + apiResponse.destination.replace(/projects\/[^/]*\//, ''), + destination.replace(/projects\/[^/]*\//, '') + ); done(); }); From 67a66e234c669daffef5d7c9f039a595d1f5d127 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 21 Mar 2017 14:24:29 -0400 Subject: [PATCH 0064/1029] logging @ 0.8.1 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2d8638daa35..239222a723f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.8.0", + "version": "0.8.1", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From a204409d8611adc42a005e6255e836dfe0b728ad Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 29 Mar 2017 07:46:24 -0700 Subject: [PATCH 0065/1029] logging: link to winston & bunyan from README (#2129) --- handwritten/logging/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 4266eaed6e5..41af3860035 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -1,6 +1,10 @@ # @google-cloud/logging ([Beta][versioning]) > Google Stackdriver Logging Client Library for Node.js +This module allows you to work with the Stackdriver Logging API. If you are already using [`winston`][winston] +or [`Bunyan`][bunyan] for logging, you might want to check out [`@google-cloud/logging-winston`][logging-winston] and +[`@google-cloud/logging-bunyan`][logging-bunyan] as higher level starting points. + *Looking for more Google APIs than just Logging? You might want to check out [`google-cloud`][google-cloud].* - [API Documentation][gcloud-logging-docs] @@ -113,3 +117,7 @@ var logging = require('@google-cloud/logging')({ [dev-console]: https://console.developers.google.com/project [gcloud-logging-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/logging [cloud-logging-docs]: https://cloud.google.com/logging/docs +[winston]: https://github.com/winstonjs/winston +[bunyan]: https://github.com/trentm/node-bunyan +[logging-winston]: https://www.npmjs.com/package/@google-cloud/logging-winston +[logging-bunyan]: https://www.npmjs.com/package/@google-cloud/logging-bunyan From 9aecedf60c83327f11a1fa36cfcb427d1b234ddc Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Thu, 30 Mar 2017 18:56:41 -0700 Subject: [PATCH 0066/1029] logging: better resource descriptor for GKE (#2163) --- handwritten/logging/src/metadata.js | 19 ++++++++++++++ handwritten/logging/test/metadata.js | 39 +++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index c483df59f92..cda6ae2a084 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -89,6 +89,23 @@ Metadata.getGCEDescriptor = function(projectId) { }; }; +/** + * Create a descriptor for Google Container Engine. + * + * @private + * + * @param {string} projectId - The project ID. + * @return {object} + */ +Metadata.getGKEDescriptor = function(projectId) { + return { + type: 'container', + labels: { + project_id: projectId, + } + }; +}; + /** * Create a global descriptor. * @@ -153,6 +170,8 @@ Metadata.prototype.getDefaultResource = function(callback) { defaultResource = Metadata.getGAEDescriptor(projectId); } else if (env.IS_CLOUD_FUNCTION) { defaultResource = Metadata.getCloudFunctionDescriptor(projectId); + } else if (env.IS_CONTAINER_ENGINE) { + defaultResource = Metadata.getGKEDescriptor(projectId); } else if (env.IS_COMPUTE_ENGINE) { defaultResource = Metadata.getGCEDescriptor(projectId); } else { diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 7a4a5fecbf4..1174e17782b 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -101,6 +101,17 @@ describe('metadata', function() { }); }); + describe('getGKEDescriptor', function() { + it('should return the correct descriptor', function() { + assert.deepEqual(Metadata.getGKEDescriptor(PROJECT_ID), { + type: 'container', + labels: { + project_id: PROJECT_ID + } + }); + }); + }); + describe('getGCEDescriptor', function() { it('should return the correct descriptor', function() { assert.deepEqual(Metadata.getGCEDescriptor(PROJECT_ID), { @@ -288,6 +299,31 @@ describe('metadata', function() { }); }); + describe('container engine', function() { + it('should return correct descriptor', function(done) { + var DESCRIPTOR = {}; + + Metadata.getGKEDescriptor = function(projectId) { + assert.strictEqual(projectId, RETURNED_PROJECT_ID); + return DESCRIPTOR; + }; + + metadata.logging_.authClient = { + getEnvironment: function(callback) { + callback(null, { + IS_CONTAINER_ENGINE: true + }); + } + }; + + metadata.getDefaultResource(function(err, defaultResource) { + assert.ifError(err); + assert.strictEqual(defaultResource, DESCRIPTOR); + done(); + }); + }); + }); + describe('global', function() { it('should return correct descriptor', function(done) { var DESCRIPTOR = {}; @@ -302,7 +338,8 @@ describe('metadata', function() { callback(null, { IS_APP_ENGINE: false, IS_CLOUD_FUNCTION: false, - IS_COMPUTE_ENGINE: false + IS_COMPUTE_ENGINE: false, + IS_CONTAINER_ENGINE: false }); } }; From 03bd8edd6d0bd96902902f41afb57de4c2307c54 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 31 Mar 2017 13:40:35 -0400 Subject: [PATCH 0067/1029] Docs fixes (#2170) datastore: fix broken links logging: fix broken links storage: fix broken links language: fix docs spanner: fix formatting in docs --- handwritten/logging/src/entry.js | 6 +++--- handwritten/logging/src/index.js | 18 +++++++++--------- handwritten/logging/src/log.js | 12 ++++++------ handwritten/logging/src/sink.js | 14 +++++++------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 498a97bd71b..a494ff5a7a7 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -30,13 +30,13 @@ var eventId = new EventId(); /** * Create an entry object to define new data to insert into a log. * - * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry} + * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * * @alias module:logging/entry * @constructor * * @param {object=} metadata - See a - * [LogEntry Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry). + * [LogEntry Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). * @param {object|string} data - The data to use as the value for this log * entry. * @@ -109,7 +109,7 @@ function Entry(metadata, data) { * @private * * @param {object} entry - An API representation of an entry. See a - * [LogEntry](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry). + * [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). * @return {module:logging/entry} */ Entry.fromApiResponse_ = function(entry) { diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 83bbf2f10ba..8e669785c29 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -90,16 +90,16 @@ util.inherits(Logging, commonGrpc.Service); /** * Create a sink. * - * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks} + * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} * @resource [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} - * @resource [projects.sinks.create API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/create} + * @resource [projects.sinks.create API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create} * * @throws {Error} if a name is not provided. * @throws {Error} if a config object is not provided. * * @param {string} name - Name of the sink. * @param {object} config - See a - * [Sink resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks#LogSink). + * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). * @param {module:storage/bucket|module:bigquery/dataset|module:pubsub/topic} config.destination - * The destination. The proper ACL scopes will be granted to the provided * destination. @@ -191,10 +191,10 @@ Logging.prototype.createSink = function(name, config, callback) { * use the object returned in other API calls, such as * {module:logging/log#write}. * - * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry} + * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * * @param {object=|string=} resource - See a - * [Monitored Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource). + * [Monitored Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource). * @param {object|string} data - The data to use as the value for this log * entry. * @return {module:logging/entry} @@ -233,7 +233,7 @@ Logging.prototype.entry = function(resource, data) { /** * List the entries in your logs. * - * @resource [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries/list} + * @resource [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} * * @param {object=} options - Filtering options. * @param {boolean} options.autoPaginate - Have pagination handled @@ -352,7 +352,7 @@ Logging.prototype.getEntriesStream = common.paginator.streamify('getEntries'); /** * Get the sinks associated with this project. * - * @resource [projects.sinks.list API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/list} + * @resource [projects.sinks.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list} * * @param {object=} options - Configuration object. * @param {boolean} options.autoPaginate - Have pagination handled @@ -449,7 +449,7 @@ Logging.prototype.getSinksStream = common.paginator.streamify('getSinks'); /** * Get a reference to a Stackdriver Logging log. * - * @resource [Log Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs} + * @resource [Log Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs} * * @param {string} name - Name of the existing log. * @param {object=} options - Configuration object. @@ -467,7 +467,7 @@ Logging.prototype.log = function(name, options) { /** * Get a reference to a Stackdriver Logging sink. * - * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks} + * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} * * @param {string} name - Name of the existing sink. * @return {module:logging/sink} diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 00137e324d2..aab982658f9 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -51,7 +51,7 @@ var Metadata = require('./metadata.js'); * produced by the Apache Web Server, but the log * `compute.googleapis.com/activity_log` is produced by Google Compute Engine. * - * @resource [Introduction to Logs]{@link https://cloud.google.com/logging/docs/api/#logs} + * @resource [Introduction to Logs]{@link https://cloud.google.com/logging/docs/basic-concepts#logs} * * @alias module:logging/log * @constructor @@ -77,7 +77,7 @@ function Log(logging, name, options) { /** * Delete the log. * - * @resource [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs/delete} + * @resource [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete} * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this @@ -263,10 +263,10 @@ Log.prototype.emergency = function(entry, options, callback) { * use the object returned in other API calls, such as * {module:logging/log#write}. * - * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry} + * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * * @param {object=} metadata - See a - * [LogEntry Resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry). + * [LogEntry Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). * @param {object|string} data - The data to use as the value for this log * entry. * @return {module:logging/entry} @@ -342,7 +342,7 @@ Log.prototype.error = function(entry, options, callback) { * This method is a wrapper around {module:logging#getEntries}, but with a * filter specified to only return entries from this log. * - * @resource [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries/list} + * @resource [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} * * @param {object=} options - Filtering options. * @param {boolean} options.autoPaginate - Have pagination handled @@ -518,7 +518,7 @@ Log.prototype.warning = function(entry, options, callback) { * While you may write a single entry at a time, batching multiple entries * together is preferred to avoid reaching the queries per second limit. * - * @resource [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries/write} + * @resource [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write} * * @param {module:logging/entry|module:logging/entry[]} entry - A log entry, or * array of entries, to write. diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 71f30f8b1b0..25ace550247 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -36,7 +36,7 @@ var util = require('util'); * storage), Google BigQuery datasets (for log analysis), Google Pub/Sub (for * streaming to other applications). * - * @resource [Introduction to Sinks]{@link https://cloud.google.com/logging/docs/api/#sinks} + * @resource [Introduction to Sinks]{@link https://cloud.google.com/logging/docs/basic-concepts#sinks} * * @alias module:logging/sink * @constructor @@ -82,7 +82,7 @@ function Sink(logging, name) { /** * Delete the sink. * - * @resource [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/delete} + * @resource [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete} * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this @@ -116,8 +116,8 @@ function Sink(logging, name) { /** * Get the sink's metadata. * - * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks#LogSink} - * @resource [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/get} + * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} + * @resource [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get} * * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this @@ -192,11 +192,11 @@ Sink.prototype.setFilter = function(filter, callback) { /** * Set the sink's metadata. * - * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks#LogSink} - * @resource [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/update} + * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} + * @resource [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update} * * @param {object} metadata - See a - * [Sink resource](https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks#LogSink). + * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this * request. From 05534f10a35d86dddc37afb12cf4a91a457be4d1 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 31 Mar 2017 13:50:44 -0400 Subject: [PATCH 0068/1029] drop support for 0.12 (#2171) * all: drop support for 0.12 [ci skip] * scripts: add more modules to blacklist for now * update common deps for service modules --- handwritten/logging/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 239222a723f..806fa8e01a3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,8 +52,8 @@ "stackdriver" ], "dependencies": { - "@google-cloud/common": "^0.12.0", - "@google-cloud/common-grpc": "^0.2.1", + "@google-cloud/common": "^0.13.0", + "@google-cloud/common-grpc": "^0.3.0", "arrify": "^1.0.0", "async": "^2.1.4", "eventid": "^0.1.0", @@ -80,6 +80,6 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=0.12.0" + "node": ">=4.0.0" } } From 091069d87e465f6bd9fcdd811614a01c0c920000 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 31 Mar 2017 14:58:15 -0400 Subject: [PATCH 0069/1029] logging @ 0.9.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 806fa8e01a3..1b40920c474 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.8.1", + "version": "0.9.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From b410e30dd66c5d1843b212a7e048dbacf169c228 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 7 Apr 2017 17:50:55 -0400 Subject: [PATCH 0070/1029] logging: convert to gax (#2072) --- handwritten/logging/package.json | 8 +- handwritten/logging/src/index.js | 326 +++++++--- handwritten/logging/src/log.js | 132 ++-- handwritten/logging/src/metadata.js | 28 +- handwritten/logging/src/sink.js | 251 ++++---- handwritten/logging/system-test/logging.js | 65 +- handwritten/logging/test/index.js | 699 +++++++++++++++++---- handwritten/logging/test/log.js | 137 ++-- handwritten/logging/test/metadata.js | 104 +-- handwritten/logging/test/sink.js | 232 ++++--- 10 files changed, 1311 insertions(+), 671 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1b40920c474..f453993e762 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,10 +58,14 @@ "async": "^2.1.4", "eventid": "^0.1.0", "extend": "^3.0.0", - "google-gax": "^0.12.2", + "google-auto-auth": "^0.5.4", + "google-gax": "^0.13.0", "google-proto-files": "^0.10.0", "is": "^3.0.1", - "string-format-obj": "^1.0.0" + "pumpify": "^1.3.5", + "stream-events": "^1.0.1", + "string-format-obj": "^1.0.0", + "through2": "^2.0.3" }, "devDependencies": { "@google-cloud/bigquery": "*", diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 8e669785c29..46bc05d79c6 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -22,12 +22,15 @@ var arrify = require('arrify'); var common = require('@google-cloud/common'); -var commonGrpc = require('@google-cloud/common-grpc'); var extend = require('extend'); var format = require('string-format-obj'); -var googleProtoFiles = require('google-proto-files'); +var googleAuth = require('google-auto-auth'); var is = require('is'); -var util = require('util'); +var pumpify = require('pumpify'); +var streamEvents = require('stream-events'); +var through = require('through2'); + +var v2 = require('./v2'); /** * @type {module:logging/entry} @@ -66,26 +69,16 @@ function Logging(options) { return new Logging(options); } - var config = { - baseUrl: 'logging.googleapis.com', - service: 'logging', - apiVersion: 'v2', - protoServices: { - ConfigServiceV2: - googleProtoFiles('logging', 'v2', 'logging_config.proto'), - LoggingServiceV2: googleProtoFiles.logging.v2 - }, - scopes: [ - 'https://www.googleapis.com/auth/cloud-platform' - ], - packageJson: require('../package.json') - }; + var options_ = extend({ + scopes: v2.ALL_SCOPES + }, options); - commonGrpc.Service.call(this, config, options); + this.api = {}; + this.auth = googleAuth(options); + this.options = options_; + this.projectId = options.projectId || '{{projectId}}'; } -util.inherits(Logging, commonGrpc.Service); - // jscs:disable maximumLineLength /** * Create a sink. @@ -100,6 +93,8 @@ util.inherits(Logging, commonGrpc.Service); * @param {string} name - Name of the sink. * @param {object} config - See a * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). + * @param {object} config.gaxOptions - Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @param {module:storage/bucket|module:bigquery/dataset|module:pubsub/topic} config.destination - * The destination. The proper ACL scopes will be granted to the provided * destination. @@ -161,17 +156,19 @@ Logging.prototype.createSink = function(name, config, callback) { return; } - var protoOpts = { - service: 'ConfigServiceV2', - method: 'createSink' - }; - var reqOpts = { parent: 'projects/' + this.projectId, sink: extend({}, config, { name: name }) }; - this.request(protoOpts, reqOpts, function(err, resp) { + delete reqOpts.sink.gaxOptions; + + this.request({ + client: 'configServiceV2Client', + method: 'createSink', + reqOpts: reqOpts, + gaxOpts: config.gaxOptions + }, function(err, resp) { if (err) { callback(err, null, resp); return; @@ -241,8 +238,8 @@ Logging.prototype.entry = function(resource, data) { * @param {string} options.filter - An * [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). * An empty filter matches all log entries. - * @param {number} options.maxApiCalls - Maximum number of API calls to make. - * @param {number} options.maxResults - Maximum number of results to return. + * @param {object} options.gaxOptions - Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @param {string} options.orderBy - How the results should be sorted, * `timestamp` (oldest first) and `timestamp desc` (newest first, * **default**). @@ -288,34 +285,33 @@ Logging.prototype.getEntries = function(options, callback) { options = {}; } - var protoOpts = { - service: 'LoggingServiceV2', - method: 'listLogEntries' - }; - var reqOpts = extend({ orderBy: 'timestamp desc' }, options); - reqOpts.projectIds = arrify(reqOpts.projectIds); - reqOpts.projectIds.push(this.projectId); - this.request(protoOpts, reqOpts, function(err, resp) { - if (err) { - callback(err, null, null, resp); - return; - } + reqOpts.resourceNames = arrify(reqOpts.resourceNames); + reqOpts.resourceNames.push('projects/' + this.projectId); - var nextQuery = null; + delete reqOpts.autoPaginate; + delete reqOpts.gaxOptions; - if (resp.nextPageToken) { - nextQuery = extend({}, reqOpts, { - pageToken: resp.nextPageToken - }); - } + var gaxOptions = extend({ + autoPaginate: options.autoPaginate + }, options.gaxOptions); + + this.request({ + client: 'loggingServiceV2Client', + method: 'listLogEntries', + reqOpts: reqOpts, + gaxOpts: gaxOptions + }, function() { + var entries = arguments[1]; - var entries = arrify(resp.entries).map(Entry.fromApiResponse_); + if (entries) { + arguments[1] = entries.map(Entry.fromApiResponse_); + } - callback(null, entries, nextQuery, resp); + callback.apply(null, arguments); }); }; @@ -347,7 +343,49 @@ Logging.prototype.getEntries = function(options, callback) { * this.end(); * }); */ -Logging.prototype.getEntriesStream = common.paginator.streamify('getEntries'); +Logging.prototype.getEntriesStream = function(options) { + var self = this; + + var requestStream; + + var userStream = streamEvents(pumpify.obj()); + + userStream.abort = function() { + if (requestStream) { + requestStream.abort(); + } + }; + + var toEntryStream = through.obj(function(entry, _, next) { + next(null, Entry.fromApiResponse_(entry)); + }); + + userStream.once('reading', function() { + var reqOpts = extend({ + orderBy: 'timestamp desc' + }, options); + reqOpts.resourceNames = arrify(reqOpts.resourceNames); + reqOpts.resourceNames.push('projects/' + self.projectId); + + delete reqOpts.autoPaginate; + delete reqOpts.gaxOptions; + + var gaxOptions = extend({ + autoPaginate: options.autoPaginate + }, options.gaxOptions); + + requestStream = self.request({ + client: 'loggingServiceV2Client', + method: 'listLogEntriesStream', + reqOpts: reqOpts, + gaxOpts: gaxOptions + }); + + userStream.setPipeline(requestStream, toEntryStream); + }); + + return userStream; +}; /** * Get the sinks associated with this project. @@ -357,8 +395,8 @@ Logging.prototype.getEntriesStream = common.paginator.streamify('getEntries'); * @param {object=} options - Configuration object. * @param {boolean} options.autoPaginate - Have pagination handled * automatically. Default: true. - * @param {number} options.maxApiCalls - Maximum number of API calls to make. - * @param {number} options.maxResults - Maximum number of results to return. + * @param {object} options.gaxOptions - Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @param {function} callback - The callback function. * @param {?error} callback.err - An error returned while making this request. * @param {module:logging/sink[]} callback.sinks - Sink objects. @@ -384,36 +422,34 @@ Logging.prototype.getSinks = function(options, callback) { options = {}; } - var protoOpts = { - service: 'ConfigServiceV2', - method: 'listSinks' - }; - var reqOpts = extend({}, options, { parent: 'projects/' + this.projectId }); - this.request(protoOpts, reqOpts, function(err, resp) { - if (err) { - callback(err, null, null, resp); - return; - } - - var nextQuery = null; - - if (resp.nextPageToken) { - nextQuery = extend({}, options, { - pageToken: resp.nextPageToken + delete reqOpts.autoPaginate; + delete reqOpts.gaxOptions; + + var gaxOptions = extend({ + autoPaginate: options.autoPaginate + }, options.gaxOptions); + + this.request({ + client: 'configServiceV2Client', + method: 'listSinks', + reqOpts: reqOpts, + gaxOpts: gaxOptions + }, function() { + var sinks = arguments[1]; + + if (sinks) { + arguments[1] = sinks.map(function(sink) { + var sinkInstance = self.sink(sink.name); + sinkInstance.metadata = sink; + return sinkInstance; }); } - var sinks = arrify(resp.sinks).map(function(sink) { - var sinkInstance = self.sink(sink.name); - sinkInstance.metadata = sink; - return sinkInstance; - }); - - callback(null, sinks, nextQuery, resp); + callback.apply(null, arguments); }); }; @@ -444,7 +480,49 @@ Logging.prototype.getSinks = function(options, callback) { * this.end(); * }); */ -Logging.prototype.getSinksStream = common.paginator.streamify('getSinks'); +Logging.prototype.getSinksStream = function(options) { + var self = this; + + options = options || {}; + + var requestStream; + var userStream = streamEvents(pumpify.obj()); + + userStream.abort = function() { + if (requestStream) { + requestStream.abort(); + } + }; + + var toSinkStream = through.obj(function(sink, _, next) { + var sinkInstance = self.sink(sink.name); + sinkInstance.metadata = sink; + next(null, sinkInstance); + }); + + userStream.once('reading', function() { + var reqOpts = extend({}, options, { + parent: 'projects/' + self.projectId + }); + + delete reqOpts.gaxOptions; + + var gaxOptions = extend({ + autoPaginate: options.autoPaginate + }, options.gaxOptions); + + requestStream = self.request({ + client: 'configServiceV2Client', + method: 'listSinksStream', + reqOpts: reqOpts, + gaxOpts: gaxOptions + }); + + userStream.setPipeline(requestStream, toSinkStream); + }); + + return userStream; +}; /** * Get a reference to a Stackdriver Logging log. @@ -479,6 +557,95 @@ Logging.prototype.sink = function(name) { return new Sink(this, name); }; +/** + * Funnel all API requests through this method, to be sure we have a project ID. + * + * @param {object} config - Configuration object. + * @param {object} config.gaxOpts - GAX options. + * @param {function} config.method - The gax method to call. + * @param {object} config.reqOpts - Request options. + * @param {function=} callback - The callback function. + */ +Logging.prototype.request = function(config, callback) { + var self = this; + var isStreamMode = !callback; + + var gaxStream; + var stream; + + if (isStreamMode) { + stream = streamEvents(through.obj()); + + stream.abort = function() { + if (gaxStream && gaxStream.cancel) { + gaxStream.cancel(); + } + }; + + stream.once('reading', makeRequestStream); + } else { + makeRequestCallback(); + } + + function prepareGaxRequest(callback) { + self.auth.getProjectId(function(err, projectId) { + if (err) { + callback(err); + return; + } + + var gaxClient = self.api[config.client]; + + if (!gaxClient) { + // Lazily instantiate client. + gaxClient = v2(self.options)[config.client](self.options); + self.api[config.client] = gaxClient; + } + + var reqOpts = extend(true, {}, config.reqOpts); + reqOpts = common.util.replaceProjectIdToken(reqOpts, projectId); + + var requestFn = gaxClient[config.method].bind( + gaxClient, + reqOpts, + config.gaxOpts + ); + + callback(null, requestFn); + }); + } + + function makeRequestCallback() { + prepareGaxRequest(function(err, requestFn) { + if (err) { + callback(err); + return; + } + + requestFn(callback); + }); + } + + function makeRequestStream() { + prepareGaxRequest(function(err, requestFn) { + if (err) { + stream.destroy(err); + return; + } + + gaxStream = requestFn(); + + gaxStream + .on('error', function(err) { + stream.destroy(err); + }) + .pipe(stream); + }); + } + + return stream; +}; + /** * This method is called when creating a sink with a Bucket destination. The * bucket must first grant proper ACL access to the Stackdriver Logging account. @@ -603,7 +770,12 @@ common.paginator.extend(Logging, ['getEntries', 'getSinks']); * that a callback is omitted. */ common.util.promisifyAll(Logging, { - exclude: ['entry', 'log', 'sink'] + exclude: [ + 'entry', + 'log', + 'request', + 'sink' + ] }); Logging.Entry = Entry; @@ -612,4 +784,4 @@ Logging.Logging = Logging; Logging.Sink = Sink; module.exports = Logging; -module.exports.v2 = require('./v2'); +module.exports.v2 = v2; diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index aab982658f9..9c4855f60ad 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -23,10 +23,8 @@ var arrify = require('arrify'); var async = require('async'); var common = require('@google-cloud/common'); -var commonGrpc = require('@google-cloud/common-grpc'); var extend = require('extend'); var is = require('is'); -var util = require('util'); /** * @type {module:logging/entry} @@ -68,56 +66,13 @@ function Log(logging, name, options) { options = options || {}; this.formattedName_ = Log.formatName_(logging.projectId, name); - this.name = this.formattedName_.split('/').pop(); - this.removeCircular_ = !!options.removeCircular; - + this.removeCircular_ = options.removeCircular === true; this.metadata_ = new Metadata(logging); - var methods = { - /** - * Delete the log. - * - * @resource [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete} - * - * @param {function=} callback - The callback function. - * @param {?error} callback.err - An error returned while making this - * request. - * @param {object} callback.apiResponse - The full API response. - * - * @example - * log.delete(function(err, apiResponse) { - * if (!err) { - * // The log was deleted. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.delete().then(function(data) { - * var apiResponse = data[0]; - * }); - */ - delete: { - protoOpts: { - service: 'LoggingServiceV2', - method: 'deleteLog' - }, - reqOpts: { - logName: this.formattedName_ - } - } - }; - - commonGrpc.ServiceObject.call(this, { - parent: logging, - id: this.name, - methods: methods - }); + this.logging = logging; + this.name = this.formattedName_.split('/').pop(); } -util.inherits(Log, commonGrpc.ServiceObject); - /** * Return an array of log entries with the desired severity assigned. * @@ -231,6 +186,50 @@ Log.prototype.debug = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback); }; +/** + * Delete the log. + * + * @resource [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete} + * + * @param {object=} gaxOptions - Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this + * request. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * log.delete(function(err, apiResponse) { + * if (!err) { + * // The log was deleted. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.delete().then(function(data) { + * var apiResponse = data[0]; + * }); + */ +Log.prototype.delete = function(gaxOptions, callback) { + if (is.fn(gaxOptions)) { + callback = gaxOptions; + gaxOptions = {}; + } + + var reqOpts = { + logName: this.formattedName_ + }; + + this.logging.request({ + client: 'loggingServiceV2Client', + method: 'deleteLog', + reqOpts: reqOpts, + gaxOpts: gaxOptions + }, callback); +}; + /** * Write a log entry with a severity of "EMERGENCY". * @@ -311,7 +310,7 @@ Log.prototype.entry = function(metadata, data) { logName: this.formattedName_ }); - return this.parent.entry(metadata, data); + return this.logging.entry(metadata, data); }; /** @@ -401,7 +400,7 @@ Log.prototype.getEntries = function(options, callback) { filter: 'logName="' + this.formattedName_ + '"' }, options); - return this.parent.getEntries(options, callback); + return this.logging.getEntries(options, callback); }; /** @@ -437,7 +436,7 @@ Log.prototype.getEntriesStream = function(options) { filter: 'logName="' + this.formattedName_ + '"' }, options); - return this.parent.getEntriesStream(options); + return this.logging.getEntriesStream(options); }; /** @@ -523,6 +522,8 @@ Log.prototype.warning = function(entry, options, callback) { * @param {module:logging/entry|module:logging/entry[]} entry - A log entry, or * array of entries, to write. * @param {object=} options - Configuration object. + * @param {object} options.gaxOptions - Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @param {object[]} options.labels - Labels to set on the log. * @param {object} options.resource - A default monitored resource for entries * where one isn't specified. @@ -592,25 +593,22 @@ Log.prototype.write = function(entry, options, callback) { options = {}; } - var protoOpts = { - service: 'LoggingServiceV2', - method: 'writeLogEntries' - }; - - var reqOpts = extend({ - logName: this.formattedName_ - }, options); - - var entries = arrify(entry); - - this.decorateEntries_(entries, function(err, decoratedEntries) { + this.decorateEntries_(arrify(entry), function(err, decoratedEntries) { // Ignore errors (the API will speak up if it has an issue). - reqOpts.entries = decoratedEntries; + var reqOpts = extend({ + logName: self.formattedName_, + entries: decoratedEntries + }, options); - self.request(protoOpts, reqOpts, function(err, resp) { - callback(err, resp); - }); + delete reqOpts.gaxOptions; + + self.logging.request({ + client: 'loggingServiceV2Client', + method: 'writeLogEntries', + reqOpts: reqOpts, + gaxOpts: options.gaxOptions + }, callback); }); }; diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index cda6ae2a084..589981b4c04 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -35,7 +35,7 @@ * @param {module:logging} logging - The parent Logging instance. */ function Metadata(logging) { - this.logging_ = logging; + this.logging = logging; } /** @@ -157,13 +157,13 @@ Metadata.prototype.assignDefaultResource = function(entryJson, callback) { Metadata.prototype.getDefaultResource = function(callback) { var self = this; - this.getProjectId(function(err, projectId) { + this.logging.auth.getProjectId(function(err, projectId) { if (err) { callback(err); return; } - self.logging_.authClient.getEnvironment(function(err, env) { + self.logging.auth.getEnvironment(function(err, env) { var defaultResource; if (env.IS_APP_ENGINE) { @@ -183,26 +183,4 @@ Metadata.prototype.getDefaultResource = function(callback) { }); }; -/** - * Attempt to retrieve the project ID from the auth client. - * - * @param {function} callback - The callback function. - */ -Metadata.prototype.getProjectId = function(callback) { - if (global.GCLOUD_SANDBOX_ENV) { - return; - } - - var self = this; - - if (this.logging_.projectId) { - setImmediate(function() { - callback(null, self.logging_.projectId); - }); - return; - } - - this.logging_.authClient.getProjectId(callback); -}; - module.exports = Metadata; diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 25ace550247..9396cc68fee 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -21,9 +21,8 @@ 'use strict'; var common = require('@google-cloud/common'); -var commonGrpc = require('@google-cloud/common-grpc'); var extend = require('extend'); -var util = require('util'); +var is = require('is'); /*! Developer Documentation * @@ -47,116 +46,135 @@ var util = require('util'); * var sink = logging.sink('my-sink'); */ function Sink(logging, name) { + this.logging = logging; this.name = name; this.formattedName_ = 'projects/' + logging.projectId + '/sinks/' + name; +} - var methods = { - /** - * Create a sink. - * - * @param {object} config - See {module:logging#createSink}. - * - * @example - * var config = { - * destination: { - * // ... - * } - * }; - * - * sink.create(config, function(err, sink, apiResponse) { - * if (!err) { - * // The sink was created successfully. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * sink.create(config).then(function(data) { - * var sink = data[0]; - * var apiResponse = data[1]; - * }); - */ - create: true, +/** + * Create a sink. + * + * @param {object} config - See {module:logging#createSink}. + * + * @example + * var config = { + * destination: { + * // ... + * } + * }; + * + * sink.create(config, function(err, sink, apiResponse) { + * if (!err) { + * // The sink was created successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.create(config).then(function(data) { + * var sink = data[0]; + * var apiResponse = data[1]; + * }); + */ +Sink.prototype.create = function(config, callback) { + this.logging.createSink(this.name, config, callback); +}; - /** - * Delete the sink. - * - * @resource [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete} - * - * @param {function=} callback - The callback function. - * @param {?error} callback.err - An error returned while making this - * request. - * @param {object} callback.apiResponse - The full API response. - * - * @example - * sink.delete(function(err, apiResponse) { - * if (!err) { - * // The log was deleted. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * sink.delete().then(function(data) { - * var apiResponse = data[0]; - * }); - */ - delete: { - protoOpts: { - service: 'ConfigServiceV2', - method: 'deleteSink' - }, - reqOpts: { - sinkName: this.formattedName_ - } - }, +/** + * Delete the sink. + * + * @resource [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete} + * + * @param {object=} gaxOptions - Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this + * request. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * sink.delete(function(err, apiResponse) { + * if (!err) { + * // The log was deleted. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.delete().then(function(data) { + * var apiResponse = data[0]; + * }); + */ +Sink.prototype.delete = function(gaxOptions, callback) { + if (is.fn(gaxOptions)) { + callback = gaxOptions; + gaxOptions = {}; + } - /** - * Get the sink's metadata. - * - * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} - * @resource [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get} - * - * @param {function=} callback - The callback function. - * @param {?error} callback.err - An error returned while making this - * request. - * @param {object} callback.metadata - The sink's metadata. - * @param {object} callback.apiResponse - The full API response. - * - * @example - * sink.getMetadata(function(err, metadata, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * sink.getMetadata().then(function(data) { - * var metadata = data[0]; - * var apiResponse = data[1]; - * }); - */ - getMetadata: { - protoOpts: { - service: 'ConfigServiceV2', - method: 'getSink' - }, - reqOpts: { - sinkName: this.formattedName_ - } - } + var reqOpts = { + sinkName: this.formattedName_ }; - commonGrpc.ServiceObject.call(this, { - parent: logging, - baseUrl: '/sinks', - id: name, - createMethod: logging.createSink.bind(logging), - methods: methods - }); -} + this.logging.request({ + client: 'configServiceV2Client', + method: 'deleteSink', + reqOpts: reqOpts, + gaxOpts: gaxOptions + }, callback); +}; + +/** + * Get the sink's metadata. + * + * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} + * @resource [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get} + * + * @param {object=} gaxOptions - Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @param {function=} callback - The callback function. + * @param {?error} callback.err - An error returned while making this + * request. + * @param {object} callback.metadata - The sink's metadata. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * sink.getMetadata(function(err, metadata, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.getMetadata().then(function(data) { + * var metadata = data[0]; + * var apiResponse = data[1]; + * }); + */ +Sink.prototype.getMetadata = function(gaxOptions, callback) { + var self = this; + + if (is.fn(gaxOptions)) { + callback = gaxOptions; + gaxOptions = {}; + } -util.inherits(Sink, commonGrpc.ServiceObject); + var reqOpts = { + sinkName: this.formattedName_ + }; + + this.logging.request({ + client: 'configServiceV2Client', + method: 'getSink', + reqOpts: reqOpts, + gaxOpts: gaxOptions + }, function() { + if (arguments[1]) { + self.metadata = arguments[1]; + } + + callback.apply(null, arguments); + }); +}; /** * Set the sink's filter. @@ -197,6 +215,8 @@ Sink.prototype.setFilter = function(filter, callback) { * * @param {object} metadata - See a * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). + * @param {object=} metadata.gaxOptions - Request configuration options, + * outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @param {function=} callback - The callback function. * @param {?error} callback.err - An error returned while making this * request. @@ -227,25 +247,24 @@ Sink.prototype.setMetadata = function(metadata, callback) { return; } - var protoOpts = { - service: 'ConfigServiceV2', - method: 'updateSink' - }; - var reqOpts = { sinkName: self.formattedName_, sink: extend({}, currentMetadata, metadata) }; - self.request(protoOpts, reqOpts, function(err, apiResponse) { - if (err) { - callback(err, apiResponse); - return; - } + delete reqOpts.sink.gaxOptions; - self.metadata = apiResponse; + self.logging.request({ + client: 'configServiceV2Client', + method: 'updateSink', + reqOpts: reqOpts, + gaxOpts: metadata.gaxOptions + }, function() { + if (arguments[1]) { + self.metadata = arguments[1]; + } - callback(null, apiResponse); + callback.apply(null, arguments); }); }); }; diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index c748430d5e7..cc6b8a4aaae 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -18,13 +18,13 @@ var assert = require('assert'); var async = require('async'); -var BigQuery = require('@google-cloud/bigquery'); +var bigqueryLibrary = require('@google-cloud/bigquery'); var exec = require('methmeth'); var extend = require('extend'); var is = require('is'); var prop = require('propprop'); -var PubSub = require('@google-cloud/pubsub'); -var Storage = require('@google-cloud/storage'); +var pubsubLibrary = require('@google-cloud/pubsub'); +var storageLibrary = require('@google-cloud/storage'); var uuid = require('uuid'); var env = require('../../../system-test/env.js'); @@ -34,10 +34,11 @@ describe('Logging', function() { var TESTS_PREFIX = 'gcloud-logging-test'; var WRITE_CONSISTENCY_DELAY_MS = 90000; + var bigQuery = bigqueryLibrary(env); + var pubsub = pubsubLibrary(env); + var storage = storageLibrary(env); + var logging = new Logging(env); - var bigQuery = new BigQuery(env); - var pubsub = new PubSub(env); - var storage = new Storage(env); // Create the possible destinations for sinks that we will create. var bucket = storage.bucket(generateName()); @@ -104,7 +105,7 @@ describe('Logging', function() { } objects = objects.filter(function(object) { - return object.id.indexOf(TESTS_PREFIX) === 0; + return (object.name || object.id).indexOf(TESTS_PREFIX) === 0; }); async.each(objects, exec('delete'), callback); @@ -277,7 +278,10 @@ describe('Logging', function() { }; it('should list log entries', function(done) { - logging.getEntries({ pageSize: 1 }, function(err, entries) { + logging.getEntries({ + autoPaginate: false, + pageSize: 1 + }, function(err, entries) { assert.ifError(err); assert.strictEqual(entries.length, 1); done(); @@ -285,12 +289,15 @@ describe('Logging', function() { }); it('should list log entries as a stream', function(done) { - logging.getEntriesStream({ pageSize: 1 }) + logging.getEntriesStream({ + autoPaginate: false, + pageSize: 1 + }) .on('error', done) .once('data', function() { this.end(); - done(); - }); + }) + .on('end', done); }); describe('log-specific entries', function() { @@ -299,7 +306,10 @@ describe('Logging', function() { }); it('should list log entries', function(done) { - log.getEntries({ pageSize: 1 }, function(err, entries) { + log.getEntries({ + autoPaginate: false, + pageSize: 1 + }, function(err, entries) { assert.ifError(err); assert.strictEqual(entries.length, 1); done(); @@ -307,7 +317,10 @@ describe('Logging', function() { }); it('should list log entries as a stream', function(done) { - log.getEntriesStream({ pageSize: 1 }) + log.getEntriesStream({ + autoPaginate: false, + pageSize: 1 + }) .on('error', done) .once('data', function() { this.end(); @@ -326,6 +339,7 @@ describe('Logging', function() { setTimeout(function() { log.getEntries({ + autoPaginate: false, pageSize: logEntries.length }, function(err, entries) { assert.ifError(err); @@ -365,7 +379,10 @@ describe('Logging', function() { assert.ifError(err); setTimeout(function() { - log.getEntries({ pageSize: 3 }, function(err, entries) { + log.getEntries({ + autoPaginate: false, + pageSize: 3 + }, function(err, entries) { assert.ifError(err); assert.deepEqual(entries.map(prop('data')), [ '3', '2', '1' ]); done(); @@ -383,7 +400,10 @@ describe('Logging', function() { }); setTimeout(function() { - log.getEntries({ pageSize: messages.length }, function(err, entries) { + log.getEntries({ + autoPaginate: false, + pageSize: messages.length + }, function(err, entries) { assert.ifError(err); assert.deepEqual(entries.reverse().map(prop('data')), messages); done(); @@ -403,7 +423,10 @@ describe('Logging', function() { assert.ifError(err); setTimeout(function() { - log.getEntries({ pageSize: 1 }, function(err, entries) { + log.getEntries({ + autoPaginate: false, + pageSize: 1 + }, function(err, entries) { assert.ifError(err); var entry = entries[0]; @@ -435,7 +458,10 @@ describe('Logging', function() { assert.ifError(err); setTimeout(function() { - log.getEntries({ pageSize: 1 }, function(err, entries) { + log.getEntries({ + autoPaginate: false, + pageSize: 1 + }, function(err, entries) { assert.ifError(err); var entry = entries[0]; @@ -457,7 +483,10 @@ describe('Logging', function() { assert.ifError(err); setTimeout(function() { - log.getEntries({ pageSize: 1 }, function(err, entries) { + log.getEntries({ + autoPaginate: false, + pageSize: 1 + }, function(err, entries) { assert.ifError(err); var entry = entries[0]; diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 10428e02ae3..39427c5f83c 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -19,10 +19,12 @@ var arrify = require('arrify'); var assert = require('assert'); var extend = require('extend'); -var googleProtoFiles = require('google-proto-files'); var proxyquire = require('proxyquire'); +var through = require('through2'); var util = require('@google-cloud/common').util; +var v2 = require('../src/v2/index.js'); + var extended = false; var fakePaginator = { extend: function(Class, methods) { @@ -42,8 +44,14 @@ var fakePaginator = { } }; +var googleAutoAuthOverride; +function fakeGoogleAutoAuth() { + return (googleAutoAuthOverride || util.noop).apply(null, arguments); +} + var isCustomTypeOverride; var promisifed = false; +var replaceProjectIdTokenOverride; var fakeUtil = extend({}, util, { isCustomType: function() { if (isCustomTypeOverride) { @@ -58,10 +66,27 @@ var fakeUtil = extend({}, util, { } promisifed = true; - assert.deepEqual(options.exclude, ['entry', 'log', 'sink']); + assert.deepEqual(options.exclude, [ + 'entry', + 'log', + 'request', + 'sink' + ]); + }, + replaceProjectIdToken: function(reqOpts) { + if (replaceProjectIdTokenOverride) { + return replaceProjectIdTokenOverride.apply(null, arguments); + } + + return reqOpts; } }); +var v2Override; +function fakeV2() { + return (v2Override || util.noop).apply(null, arguments); +} + function FakeEntry() { this.calledWith_ = arguments; } @@ -78,10 +103,6 @@ function FakeSink() { this.calledWith_ = arguments; } -function FakeGrpcService() { - this.calledWith_ = arguments; -} - describe('Logging', function() { var Logging; var logging; @@ -94,23 +115,23 @@ describe('Logging', function() { paginator: fakePaginator, util: fakeUtil }, - '@google-cloud/common-grpc': { - Service: FakeGrpcService - }, + 'google-auto-auth': fakeGoogleAutoAuth, './log.js': FakeLog, './entry.js': FakeEntry, - './sink.js': FakeSink + './sink.js': FakeSink, + './v2': fakeV2 }); }); beforeEach(function() { + googleAutoAuthOverride = null; isCustomTypeOverride = null; + replaceProjectIdTokenOverride = null; + v2Override = null; logging = new Logging({ projectId: PROJECT_ID }); - logging.projectId = PROJECT_ID; - logging.request = util.noop; }); describe('instantiation', function() { @@ -122,11 +143,6 @@ describe('Logging', function() { assert(promisifed); }); - it('should streamify the correct methods', function() { - assert.strictEqual(logging.getEntriesStream, 'getEntries'); - assert.strictEqual(logging.getSinksStream, 'getSinks'); - }); - it('should normalize the arguments', function() { var options = { projectId: PROJECT_ID, @@ -152,23 +168,43 @@ describe('Logging', function() { fakeUtil.normalizeArguments = normalizeArguments; }); - it('should inherit from GrpcService', function() { - assert(logging instanceof FakeGrpcService); + it('should initialize the API object', function() { + assert.deepEqual(logging.api, {}); + }); - var calledWith = logging.calledWith_[0]; + it('should cache a local google-auto-auth instance', function() { + var fakeGoogleAutoAuthInstance = {}; - assert.strictEqual(calledWith.baseUrl, 'logging.googleapis.com'); - assert.strictEqual(calledWith.service, 'logging'); - assert.strictEqual(calledWith.apiVersion, 'v2'); - assert.deepEqual(calledWith.protoServices, { - ConfigServiceV2: - googleProtoFiles('logging', 'v2', 'logging_config.proto'), - LoggingServiceV2: googleProtoFiles.logging.v2 - }); - assert.deepEqual(calledWith.scopes, [ - 'https://www.googleapis.com/auth/cloud-platform' - ]); - assert.deepEqual(calledWith.packageJson, require('../package.json')); + googleAutoAuthOverride = function() { + return fakeGoogleAutoAuthInstance; + }; + + var logging = new Logging({}); + assert.strictEqual(logging.auth, fakeGoogleAutoAuthInstance); + }); + + it('should localize the options', function() { + var options = { + a: 'b', + c: 'd' + }; + + var logging = new Logging(options); + + assert.notStrictEqual(logging.options, options); + + assert.deepEqual(logging.options, extend({ + scopes: v2.ALL_SCOPES + }, options)); + }); + + it('should set the projectId', function() { + assert.strictEqual(logging.projectId, PROJECT_ID); + }); + + it('should default the projectId to the token', function() { + var logging = new Logging({}); + assert.strictEqual(logging.projectId, '{{projectId}}'); }); }); @@ -250,7 +286,6 @@ describe('Logging', function() { logging.createSink(SINK_NAME, CONFIG, done); }); - describe('API request', function() { it('should make the correct API request', function(done) { var config = { @@ -262,13 +297,15 @@ describe('Logging', function() { name: SINK_NAME }); - logging.request = function(protoOpts, reqOpts) { - assert.strictEqual(protoOpts.service, 'ConfigServiceV2'); - assert.strictEqual(protoOpts.method, 'createSink'); + logging.request = function(config) { + assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.method, 'createSink'); var expectedParent = 'projects/' + logging.projectId; - assert.strictEqual(reqOpts.parent, expectedParent); - assert.deepEqual(reqOpts.sink, expectedConfig); + assert.strictEqual(config.reqOpts.parent, expectedParent); + assert.deepEqual(config.reqOpts.sink, expectedConfig); + + assert.strictEqual(config.gaxOpts, undefined); done(); }; @@ -276,12 +313,28 @@ describe('Logging', function() { logging.createSink(SINK_NAME, config, assert.ifError); }); + it('should accept GAX options', function(done) { + var config = { + a: 'b', + c: 'd', + gaxOptions: {} + }; + + logging.request = function(config_) { + assert.strictEqual(config_.reqOpts.sink.gaxOptions, undefined); + assert.strictEqual(config_.gaxOpts, config.gaxOptions); + done(); + }; + + logging.createSink(SINK_NAME, config, assert.ifError); + }); + describe('error', function() { var error = new Error('Error.'); var apiResponse = {}; beforeEach(function() { - logging.request = function(protoOpts, reqOpts, callback) { + logging.request = function(config, callback) { callback(error, apiResponse); }; }); @@ -303,7 +356,7 @@ describe('Logging', function() { }; beforeEach(function() { - logging.request = function(protoOpts, reqOpts, callback) { + logging.request = function(config, callback) { callback(null, apiResponse); }; }); @@ -344,10 +397,10 @@ describe('Logging', function() { describe('getEntries', function() { it('should accept only a callback', function(done) { - logging.request = function(protoOpts, reqOpts) { - assert.deepEqual(reqOpts, { + logging.request = function(config) { + assert.deepEqual(config.reqOpts, { orderBy: 'timestamp desc', - projectIds: [logging.projectId] + resourceNames: ['projects/' + logging.projectId] }); done(); }; @@ -358,15 +411,19 @@ describe('Logging', function() { it('should make the correct API request', function(done) { var options = {}; - logging.request = function(protoOpts, reqOpts) { - assert.strictEqual(protoOpts.service, 'LoggingServiceV2'); - assert.strictEqual(protoOpts.method, 'listLogEntries'); + logging.request = function(config) { + assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.method, 'listLogEntries'); - assert.deepEqual(reqOpts, extend(options, { + assert.deepEqual(config.reqOpts, extend(options, { orderBy: 'timestamp desc', - projectIds: [logging.projectId] + resourceNames: ['projects/' + logging.projectId] })); + assert.deepStrictEqual(config.gaxOpts, { + autoPaginate: undefined + }); + done(); }; @@ -378,8 +435,26 @@ describe('Logging', function() { orderBy: 'timestamp asc' }; - logging.request = function(protoOpts, reqOpts) { - assert.deepEqual(reqOpts.orderBy, options.orderBy); + logging.request = function(config) { + assert.deepEqual(config.reqOpts.orderBy, options.orderBy); + done(); + }; + + logging.getEntries(options, assert.ifError); + }); + + it('should accept GAX options', function(done) { + var options = { + a: 'b', + c: 'd', + gaxOptions: { + autoPaginate: true + } + }; + + logging.request = function(config) { + assert.strictEqual(config.reqOpts.gaxOptions, undefined); + assert.deepStrictEqual(config.gaxOpts, options.gaxOptions); done(); }; @@ -387,85 +462,147 @@ describe('Logging', function() { }); describe('error', function() { - var error = new Error('Error.'); - var apiResponse = {}; + var ARGS = [ + new Error('Error.'), + [], + {} + ]; beforeEach(function() { - logging.request = function(protoOpts, reqOpts, callback) { - callback(error, apiResponse); + logging.request = function(config, callback) { + callback.apply(null, ARGS); }; }); it('should execute callback with error & API response', function(done) { - logging.getEntries({}, function(err, entries, nextQuery, apiResponse_) { - assert.strictEqual(err, error); - assert.strictEqual(entries, null); - assert.strictEqual(nextQuery, null); - assert.strictEqual(apiResponse_, apiResponse); - + logging.getEntries({}, function() { + var args = [].slice.call(arguments); + assert.deepStrictEqual(args, ARGS); done(); }); }); }); describe('success', function() { - var apiResponse = { - entries: [ + var ARGS = [ + null, + [ { logName: 'syslog' } ] - }; + ]; beforeEach(function() { - logging.request = function(protoOpts, reqOpts, callback) { - callback(null, apiResponse); + logging.request = function(config, callback) { + callback.apply(null, ARGS); }; }); - it('should build a nextQuery if necessary', function(done) { - var nextPageToken = 'next-page-token'; - var apiResponseWithNextPageToken = extend({}, apiResponse, { - nextPageToken: nextPageToken - }); - var expectedNextQuery = { - orderBy: 'timestamp desc', - projectIds: [logging.projectId], - pageToken: nextPageToken - }; - - logging.request = function(protoOpts, reqOpts, callback) { - callback(null, apiResponseWithNextPageToken); - }; - - logging.getEntries({}, function(err, entries, nextQuery) { + it('should execute callback with entries & API resp', function(done) { + logging.getEntries({}, function(err, entries) { assert.ifError(err); - assert.deepEqual(nextQuery, expectedNextQuery); + var argsPassedToFromApiResponse_ = entries[0]; + assert.strictEqual( + argsPassedToFromApiResponse_[0], + ARGS[1][0] + ); done(); }); }); + }); + }); - it('should execute callback with entries & API resp', function(done) { - logging.getEntries({}, function(err, entries, nextQuery, apiResponse_) { - assert.ifError(err); + describe('getEntriesStream', function() { + var OPTIONS = { + a: 'b', + c: 'd', + gaxOptions: { + a: 'b', + c: 'd' + } + }; - var argsPassedToFromApiResponse_ = entries[0]; - assert.strictEqual( - argsPassedToFromApiResponse_[0], - apiResponse.entries[0] - ); + var REQUEST_STREAM; + var RESULT = {}; - assert.strictEqual(apiResponse_, apiResponse); + beforeEach(function() { + REQUEST_STREAM = through.obj(); + REQUEST_STREAM.push(RESULT); - done(); + logging.request = function() { + return REQUEST_STREAM; + }; + }); + + it('should make request once reading', function(done) { + logging.request = function(config) { + assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.method, 'listLogEntriesStream'); + + assert.deepEqual(config.reqOpts, { + resourceNames: [ + 'projects/' + logging.projectId + ], + orderBy: 'timestamp desc', + a: 'b', + c: 'd' }); + + assert.deepEqual(config.gaxOpts, { + autoPaginate: undefined, + a: 'b', + c: 'd' + }); + + setImmediate(done); + + return REQUEST_STREAM; + }; + + var stream = logging.getEntriesStream(OPTIONS); + stream.emit('reading'); + }); + + it('should convert results from request to Entry', function(done) { + var stream = logging.getEntriesStream(OPTIONS); + + stream.on('data', function(entry) { + var argsPassedToFromApiResponse_ = entry[0]; + assert.strictEqual( + argsPassedToFromApiResponse_, + RESULT + ); + + done(); }); + + stream.emit('reading'); + }); + + it('should expose abort function', function(done) { + REQUEST_STREAM.abort = done; + + var stream = logging.getEntriesStream(OPTIONS); + + stream.emit('reading'); + + stream.abort(); }); }); describe('getSinks', function() { + var OPTIONS = { + a: 'b', + c: 'd', + gaxOptions: { + a: 'b', + c: 'd' + } + }; + it('should accept only a callback', function(done) { logging.request = function() { done(); @@ -475,97 +612,164 @@ describe('Logging', function() { }); it('should make the correct API request', function(done) { - logging.request = function(protoOpts, reqOpts) { - assert.strictEqual(protoOpts.service, 'ConfigServiceV2'); - assert.strictEqual(protoOpts.method, 'listSinks'); + logging.request = function(config) { + assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.method, 'listSinks'); - var expectedParent = 'projects/' + logging.projectId; - assert.strictEqual(reqOpts.parent, expectedParent); + assert.deepEqual(config.reqOpts, { + parent: 'projects/' + logging.projectId, + a: 'b', + c: 'd' + }); + + assert.deepEqual(config.gaxOpts, { + autoPaginate: undefined, + a: 'b', + c: 'd' + }); done(); }; - logging.getSinks({}, assert.ifError); + logging.getSinks(OPTIONS, assert.ifError); }); describe('error', function() { - var error = new Error('Error.'); - var apiResponse = {}; + var ARGS = [ + new Error('Error.'), + [], + {} + ]; beforeEach(function() { - logging.request = function(protoOpts, reqOpts, callback) { - callback(error, apiResponse); + logging.request = function(config, callback) { + callback.apply(null, ARGS); }; }); it('should execute callback with error & API response', function(done) { - logging.getSinks({}, function(err, sinks, nextQuery, apiResponse_) { - assert.strictEqual(err, error); - assert.strictEqual(sinks, null); - assert.strictEqual(nextQuery, null); - assert.strictEqual(apiResponse_, apiResponse); - + logging.getEntries(OPTIONS, function() { + var args = [].slice.call(arguments); + assert.deepStrictEqual(args, ARGS); done(); }); }); }); describe('success', function() { - var apiResponse = { - sinks: [ + var ARGS = [ + null, + [ { name: 'sink-name' } - ] - }; + ], + {} + ]; beforeEach(function() { - logging.request = function(protoOpts, reqOpts, callback) { - callback(null, apiResponse); + logging.request = function(config, callback) { + callback.apply(null, ARGS); }; }); - it('should build a nextQuery if necessary', function(done) { - var nextPageToken = 'next-page-token'; - var apiResponseWithNextPageToken = extend({}, apiResponse, { - nextPageToken: nextPageToken - }); - var expectedNextQuery = { - pageToken: nextPageToken - }; + it('should execute callback with Logs & API resp', function(done) { + var sinkInstance = {}; - logging.request = function(protoOpts, reqOpts, callback) { - callback(null, apiResponseWithNextPageToken); + logging.sink = function(name) { + assert.strictEqual(name, ARGS[1][0].name); + return sinkInstance; }; - logging.getSinks({}, function(err, sinks, nextQuery) { + logging.getSinks(OPTIONS, function(err, sinks) { assert.ifError(err); - assert.deepEqual(nextQuery, expectedNextQuery); + assert.strictEqual(sinks[0], sinkInstance); + assert.strictEqual(sinks[0].metadata, ARGS[1][0]); done(); }); }); + }); + }); - it('should execute callback with Logs & API resp', function(done) { - var log = {}; + describe('getSinksStream', function() { + var OPTIONS = { + a: 'b', + c: 'd', + gaxOptions: { + a: 'b', + c: 'd' + } + }; + + var REQUEST_STREAM; + var RESULT = { + name: 'sink-name' + }; - logging.sink = function(name) { - assert.strictEqual(name, apiResponse.sinks[0].name); - return log; - }; + beforeEach(function() { + REQUEST_STREAM = through.obj(); + REQUEST_STREAM.push(RESULT); - logging.getSinks({}, function(err, sinks, nextQuery, apiResponse_) { - assert.ifError(err); + logging.request = function() { + return REQUEST_STREAM; + }; + }); - assert.strictEqual(sinks[0], log); - assert.strictEqual(sinks[0].metadata, apiResponse.sinks[0]); + it('should make request once reading', function(done) { + logging.request = function(config) { + assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.method, 'listSinksStream'); - assert.strictEqual(apiResponse_, apiResponse); + assert.deepEqual(config.reqOpts, { + parent: 'projects/' + logging.projectId, + a: 'b', + c: 'd' + }); - done(); + assert.deepEqual(config.gaxOpts, { + autoPaginate: undefined, + a: 'b', + c: 'd' }); + + setImmediate(done); + + return REQUEST_STREAM; + }; + + var stream = logging.getSinksStream(OPTIONS); + stream.emit('reading'); + }); + + it('should convert results from request to Sink', function(done) { + var stream = logging.getSinksStream(OPTIONS); + + var sinkInstance = {}; + + logging.sink = function(name) { + assert.strictEqual(name, RESULT.name); + return sinkInstance; + }; + + stream.on('data', function(sink) { + assert.strictEqual(sink, sinkInstance); + assert.strictEqual(sink.metadata, RESULT); + done(); }); + + stream.emit('reading'); + }); + + it('should expose abort function', function(done) { + REQUEST_STREAM.abort = done; + + var stream = logging.getSinksStream(OPTIONS); + + stream.emit('reading'); + + stream.abort(); }); }); @@ -580,6 +784,225 @@ describe('Logging', function() { }); }); + describe('request', function() { + var CONFIG = { + client: 'client', + method: 'method', + reqOpts: { + a: 'b', + c: 'd' + }, + gaxOpts: {} + }; + + var PROJECT_ID = 'project-id'; + + beforeEach(function() { + logging.auth = { + getProjectId: function(callback) { + callback(null, PROJECT_ID); + } + }; + + logging.api[CONFIG.client] = { + [CONFIG.method]: util.noop + }; + }); + + describe('prepareGaxRequest', function() { + it('should get the project ID', function(done) { + logging.auth.getProjectId = function() { + done(); + }; + + logging.request(CONFIG, assert.ifError); + }); + + it('should return error if getting project ID failed', function(done) { + var error = new Error('Error.'); + + logging.auth.getProjectId = function(callback) { + callback(error); + }; + + logging.request(CONFIG, function(err) { + assert.strictEqual(err, error); + done(); + }); + }); + + it('should initiate and cache the client', function() { + var fakeClient = { + [CONFIG.method]: util.noop + }; + + v2Override = function(options) { + assert.strictEqual(options, logging.options); + + return { + [CONFIG.client]: function(options) { + assert.strictEqual(options, logging.options); + return fakeClient; + } + }; + }; + + logging.api = {}; + + logging.request(CONFIG, assert.ifError); + + assert.strictEqual(logging.api[CONFIG.client], fakeClient); + }); + + it('should use the cached client', function(done) { + v2Override = function() { + done(new Error('Should not re-instantiate a GAX client.')); + }; + + logging.request(CONFIG); + done(); + }); + + it('should replace the project ID token', function(done) { + var replacedReqOpts = {}; + + replaceProjectIdTokenOverride = function(reqOpts, projectId) { + assert.notStrictEqual(reqOpts, CONFIG.reqOpts); + assert.deepEqual(reqOpts, CONFIG.reqOpts); + assert.strictEqual(projectId, PROJECT_ID); + + return replacedReqOpts; + }; + + logging.api[CONFIG.client][CONFIG.method] = { + bind: function(gaxClient, reqOpts) { + assert.strictEqual(reqOpts, replacedReqOpts); + + setImmediate(done); + + return util.noop; + } + }; + + logging.request(CONFIG, assert.ifError); + }); + }); + + describe('makeRequestCallback', function() { + it('should prepare the request', function(done) { + logging.api[CONFIG.client][CONFIG.method] = { + bind: function(gaxClient, reqOpts, gaxOpts) { + assert.strictEqual(gaxClient, logging.api[CONFIG.client]); + assert.deepEqual(reqOpts, CONFIG.reqOpts); + assert.strictEqual(gaxOpts, CONFIG.gaxOpts); + + setImmediate(done); + + return util.noop; + } + }; + + logging.request(CONFIG, assert.ifError); + }); + + it('should execute callback with error', function(done) { + var error = new Error('Error.'); + + logging.api[CONFIG.client][CONFIG.method] = function() { + var callback = [].slice.call(arguments).pop(); + callback(error); + }; + + logging.request(CONFIG, function(err) { + assert.strictEqual(err, error); + done(); + }); + }); + + it('should execute the request function', function() { + logging.api[CONFIG.client][CONFIG.method] = function(done) { + var callback = [].slice.call(arguments).pop(); + callback(null, done); // so it ends the test + }; + + logging.request(CONFIG, assert.ifError); + }); + }); + + describe('makeRequestStream', function() { + var GAX_STREAM; + + beforeEach(function() { + GAX_STREAM = through(); + + logging.api[CONFIG.client][CONFIG.method] = { + bind: function() { + return function() { + return GAX_STREAM; + }; + } + }; + }); + + it('should expose an abort function', function(done) { + GAX_STREAM.cancel = done; + + var requestStream = logging.request(CONFIG); + requestStream.emit('reading'); + requestStream.abort(); + }); + + it('should prepare the request once reading', function(done) { + logging.api[CONFIG.client][CONFIG.method] = { + bind: function(gaxClient, reqOpts, gaxOpts) { + assert.strictEqual(gaxClient, logging.api[CONFIG.client]); + assert.deepEqual(reqOpts, CONFIG.reqOpts); + assert.strictEqual(gaxOpts, CONFIG.gaxOpts); + + setImmediate(done); + + return function() { + return GAX_STREAM; + }; + } + }; + + var requestStream = logging.request(CONFIG); + requestStream.emit('reading'); + }); + + it('should destroy the stream with prepare error', function(done) { + var error = new Error('Error.'); + + logging.auth.getProjectId = function(callback) { + callback(error); + }; + + var requestStream = logging.request(CONFIG); + requestStream.emit('reading'); + + requestStream.on('error', function(err) { + assert.strictEqual(err, error); + done(); + }); + }); + + it('should destroy the stream with GAX error', function(done) { + var error = new Error('Error.'); + + var requestStream = logging.request(CONFIG); + requestStream.emit('reading'); + + requestStream.on('error', function(err) { + assert.strictEqual(err, error); + done(); + }); + + GAX_STREAM.emit('error', error); + }); + }); + }); + describe('sink', function() { var NAME = 'sink-name'; diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 3d7841777c2..36d2f73d6d2 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -18,7 +18,6 @@ var assert = require('assert'); var extend = require('extend'); -var GrpcServiceObject = require('@google-cloud/common').GrpcServiceObject; var prop = require('propprop'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; @@ -41,11 +40,6 @@ function FakeMetadata() { this.calledWith_ = arguments; } -function FakeGrpcServiceObject() { - this.calledWith_ = arguments; - this.parent = {}; -} - describe('Log', function() { var Log; var log; @@ -60,11 +54,7 @@ describe('Log', function() { LOG_NAME_ENCODED ].join('/'); - var LOGGING = { - projectId: PROJECT_ID, - entry: util.noop, - request: util.noop - }; + var LOGGING; var assignSeverityToEntriesOverride = null; @@ -73,9 +63,6 @@ describe('Log', function() { '@google-cloud/common': { util: fakeUtil }, - '@google-cloud/common-grpc': { - ServiceObject: FakeGrpcServiceObject, - }, './entry.js': Entry, './metadata.js': FakeMetadata }); @@ -88,7 +75,13 @@ describe('Log', function() { beforeEach(function() { assignSeverityToEntriesOverride = null; - extend(FakeGrpcServiceObject, GrpcServiceObject); + + LOGGING = { + projectId: PROJECT_ID, + entry: util.noop, + request: util.noop + }; + log = new Log(LOGGING, LOG_NAME_FORMATTED); }); @@ -124,31 +117,19 @@ describe('Log', function() { assert.strictEqual(log.metadata_.calledWith_[0], LOGGING); }); - it('should inherit from GrpcServiceObject', function() { - assert(log instanceof FakeGrpcServiceObject); - - var calledWith = log.calledWith_[0]; - - assert.strictEqual(calledWith.parent, LOGGING); - assert.strictEqual(calledWith.id, LOG_NAME_ENCODED); - assert.deepEqual(calledWith.methods, { - delete: { - protoOpts: { - service: 'LoggingServiceV2', - method: 'deleteLog' - }, - reqOpts: { - logName: log.formattedName_ - } - } - }); - }); - it('should accept and localize options.removeCircular', function() { var options = { removeCircular: true }; var log = new Log(LOGGING, LOG_NAME_FORMATTED, options); assert.strictEqual(log.removeCircular_, true); }); + + it('should localize the Logging instance', function() { + assert.strictEqual(log.logging, LOGGING); + }); + + it('should localize the name', function() { + assert.strictEqual(log.name, LOG_NAME_FORMATTED.split('/').pop()); + }); }); describe('assignSeverityToEntries_', function() { @@ -219,6 +200,36 @@ describe('Log', function() { }); }); + describe('delete', function() { + it('should accept gaxOptions', function(done) { + log.logging.request = function(config, callback) { + assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.method, 'deleteLog'); + + assert.deepEqual(config.reqOpts, { + logName: log.formattedName_ + }); + + assert.deepEqual(config.gaxOpts, {}); + + callback(); // done() + }; + + log.delete(done); + }); + + it('should accept gaxOptions', function(done) { + var gaxOptions = {}; + + log.logging.request = function(config) { + assert.strictEqual(config.gaxOpts, gaxOptions); + done(); + }; + + log.delete(gaxOptions, assert.ifError); + }); + }); + describe('entry', function() { it('should return an entry from Logging', function() { var metadata = { @@ -228,7 +239,7 @@ describe('Log', function() { var entryObject = {}; - log.parent.entry = function(metadata_, data_) { + log.logging.entry = function(metadata_, data_) { assert.deepEqual(metadata_, extend({}, metadata, { logName: log.formattedName_ })); @@ -241,7 +252,7 @@ describe('Log', function() { }); it('should attach the log name to the entry', function(done) { - log.parent.entry = function(metadata) { + log.logging.entry = function(metadata) { assert.strictEqual(metadata.logName, log.formattedName_); done(); }; @@ -252,7 +263,7 @@ describe('Log', function() { it('should assume one argument means data', function(done) { var data = {}; - log.parent.entry = function(metadata, data_) { + log.logging.entry = function(metadata, data_) { assert.strictEqual(data_, data); done(); }; @@ -267,7 +278,7 @@ describe('Log', function() { }; it('should call Logging getEntries with defaults', function(done) { - log.parent.getEntries = function(options, callback) { + log.logging.getEntries = function(options, callback) { assert.deepEqual(options, EXPECTED_OPTIONS); callback(); // done() }; @@ -281,7 +292,7 @@ describe('Log', function() { filter: 'custom filter' }; - log.parent.getEntries = function(options_, callback) { + log.logging.getEntries = function(options_, callback) { assert.deepEqual(options_, extend({}, EXPECTED_OPTIONS, options)); callback(); // done() }; @@ -297,7 +308,7 @@ describe('Log', function() { }; it('should call Logging getEntriesStream with defaults', function(done) { - log.parent.getEntriesStream = function(options) { + log.logging.getEntriesStream = function(options) { assert.deepEqual(options, EXPECTED_OPTIONS); setImmediate(done); return fakeStream; @@ -313,7 +324,7 @@ describe('Log', function() { filter: 'custom filter' }; - log.parent.getEntriesStream = function(options_) { + log.logging.getEntriesStream = function(options_) { assert.deepEqual(options_, extend({}, EXPECTED_OPTIONS, options)); setImmediate(done); return fakeStream; @@ -337,17 +348,22 @@ describe('Log', function() { }); it('should make the correct API request', function(done) { - log.request = function(protoOpts, reqOpts) { - assert.strictEqual(protoOpts.service, 'LoggingServiceV2'); - assert.strictEqual(protoOpts.method, 'writeLogEntries'); + log.logging.request = function(config, callback) { + assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.method, 'writeLogEntries'); - assert.strictEqual(reqOpts.logName, log.formattedName_); - assert.strictEqual(reqOpts.entries[0], ENTRY); + assert.deepEqual(config.reqOpts, { + logName: log.formattedName_, + entries: [ENTRY], + resource: {} + }); - done(); + assert.strictEqual(config.gaxOpts, undefined); + + callback(); }; - log.write(ENTRY, OPTIONS, assert.ifError); + log.write(ENTRY, OPTIONS, done); }); it('should arrify & decorate the entries', function(done) { @@ -358,33 +374,16 @@ describe('Log', function() { callback(null, decoratedEntries); }; - log.request = function(protoOpts, reqOpts) { - assert.strictEqual(reqOpts.entries, decoratedEntries); + log.logging.request = function(config) { + assert.strictEqual(config.reqOpts.entries, decoratedEntries); done(); }; log.write(ENTRY, OPTIONS, assert.ifError); }); - it('should exec callback with only error and API response', function(done) { - var args = [1, 2, 3, 4]; - - log.request = function(protoOpts, reqOpts, callback) { - callback.apply(null, args); - }; - - log.write(ENTRY, OPTIONS, function() { - assert.strictEqual(arguments.length, 2); - - assert.strictEqual(arguments[0], args[0]); - assert.strictEqual(arguments[1], args[1]); - - done(); - }); - }); - it('should not require options', function(done) { - log.request = function(protoOpts, reqOpts, callback) { + log.logging.request = function(config, callback) { callback(); // done() }; diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 1174e17782b..d357a68856b 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -35,7 +35,9 @@ describe('metadata', function() { }); beforeEach(function() { - LOGGING = {}; + LOGGING = { + auth: {} + }; extend(Metadata, MetadataCached); metadata = new Metadata(LOGGING); }); @@ -46,7 +48,7 @@ describe('metadata', function() { describe('instantiation', function() { it('should localize Logging instance', function() { - assert.strictEqual(metadata.logging_, LOGGING); + assert.strictEqual(metadata.logging, LOGGING); }); }); @@ -187,13 +189,13 @@ describe('metadata', function() { var RETURNED_PROJECT_ID = 'project-id'; beforeEach(function() { - metadata.getProjectId = function(callback) { + metadata.logging.auth.getProjectId = function(callback) { callback(null, RETURNED_PROJECT_ID); }; }); it('should get the project ID', function(done) { - metadata.getProjectId = function() { + metadata.logging.auth.getProjectId = function() { done(); }; @@ -203,7 +205,7 @@ describe('metadata', function() { it('should return error from getProjectId', function(done) { var error = new Error('Error.'); - metadata.getProjectId = function(callback) { + metadata.logging.auth.getProjectId = function(callback) { callback(error); }; @@ -214,10 +216,8 @@ describe('metadata', function() { }); it('should get the environment from auth client', function(done) { - metadata.logging_.authClient = { - getEnvironment: function() { - done(); - } + metadata.logging.auth.getEnvironment = function() { + done(); }; metadata.getDefaultResource(assert.ifError); @@ -233,12 +233,10 @@ describe('metadata', function() { return DESCRIPTOR; }; - metadata.logging_.authClient = { - getEnvironment: function(callback) { - callback(null, { - IS_APP_ENGINE: true - }); - } + metadata.logging.auth.getEnvironment = function(callback) { + callback(null, { + IS_APP_ENGINE: true + }); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -258,12 +256,10 @@ describe('metadata', function() { return DESCRIPTOR; }; - metadata.logging_.authClient = { - getEnvironment: function(callback) { - callback(null, { - IS_CLOUD_FUNCTION: true - }); - } + metadata.logging.auth.getEnvironment = function(callback) { + callback(null, { + IS_CLOUD_FUNCTION: true + }); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -283,12 +279,10 @@ describe('metadata', function() { return DESCRIPTOR; }; - metadata.logging_.authClient = { - getEnvironment: function(callback) { - callback(null, { - IS_COMPUTE_ENGINE: true - }); - } + metadata.logging.auth.getEnvironment = function(callback) { + callback(null, { + IS_COMPUTE_ENGINE: true + }); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -308,12 +302,10 @@ describe('metadata', function() { return DESCRIPTOR; }; - metadata.logging_.authClient = { - getEnvironment: function(callback) { - callback(null, { - IS_CONTAINER_ENGINE: true - }); - } + metadata.logging.auth.getEnvironment = function(callback) { + callback(null, { + IS_CONTAINER_ENGINE: true + }); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -333,15 +325,13 @@ describe('metadata', function() { return DESCRIPTOR; }; - metadata.logging_.authClient = { - getEnvironment: function(callback) { - callback(null, { - IS_APP_ENGINE: false, - IS_CLOUD_FUNCTION: false, - IS_COMPUTE_ENGINE: false, - IS_CONTAINER_ENGINE: false - }); - } + metadata.logging.auth.getEnvironment = function(callback) { + callback(null, { + IS_APP_ENGINE: false, + IS_CLOUD_FUNCTION: false, + IS_COMPUTE_ENGINE: false, + IS_CONTAINER_ENGINE: false + }); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -353,34 +343,4 @@ describe('metadata', function() { }); }); }); - - describe('getProjectId', function() { - var CACHED_PROJECT_ID = 'cached-project-id'; - - it('should exit early if in the sandbox environment', function() { - global.GCLOUD_SANDBOX_ENV = true; - assert.strictEqual(metadata.getProjectId(), undefined); - global.GCLOUD_SANDBOX_ENV = false; - }); - - it('should return cached projectId from Logging instance', function(done) { - metadata.logging_.projectId = CACHED_PROJECT_ID; - - metadata.getProjectId(function(err, projectId) { - assert.ifError(err); - assert.strictEqual(projectId, CACHED_PROJECT_ID); - done(); - }); - }); - - it('should get project ID from auth client', function(done) { - metadata.logging_.authClient = { - getProjectId: function(callback) { - callback(); // done() - } - }; - - metadata.getProjectId(done); - }); - }); }); diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index b9f2305d830..8821192aee6 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -30,10 +30,6 @@ var fakeUtil = extend({}, util, { } }); -function FakeGrpcServiceObject() { - this.calledWith_ = arguments; -} - describe('Sink', function() { var Sink; var sink; @@ -48,9 +44,6 @@ describe('Sink', function() { Sink = proxyquire('../src/sink.js', { '@google-cloud/common': { util: fakeUtil - }, - '@google-cloud/common-grpc': { - ServiceObject: FakeGrpcServiceObject, } }); }); @@ -60,50 +53,14 @@ describe('Sink', function() { }); describe('instantiation', function() { - it('should inherit from GrpcServiceObject', function() { - var loggingInstance = extend({}, LOGGING, { - createSink: { - bind: function(context) { - assert.strictEqual(context, loggingInstance); - } - } - }); - - var sink = new Sink(loggingInstance, SINK_NAME); - assert(sink instanceof FakeGrpcServiceObject); - - var calledWith = sink.calledWith_[0]; - - assert.strictEqual(calledWith.parent, loggingInstance); - assert.strictEqual(calledWith.baseUrl, '/sinks'); - assert.strictEqual(calledWith.id, SINK_NAME); - assert.deepEqual(calledWith.methods, { - create: true, - delete: { - protoOpts: { - service: 'ConfigServiceV2', - method: 'deleteSink' - }, - reqOpts: { - sinkName: sink.formattedName_ - } - }, - getMetadata: { - protoOpts: { - service: 'ConfigServiceV2', - method: 'getSink' - }, - reqOpts: { - sinkName: sink.formattedName_ - } - } - }); - }); - it('should promisify all the things', function() { assert(promisifed); }); + it('should localize Logging instance', function() { + assert.strictEqual(sink.logging, LOGGING); + }); + it('should localize the name', function() { assert.strictEqual(sink.name, SINK_NAME); }); @@ -116,6 +73,106 @@ describe('Sink', function() { }); }); + describe('create', function() { + it('should call parent createSink', function(done) { + var config = {}; + + sink.logging.createSink = function(name, config_, callback) { + assert.strictEqual(name, sink.name); + assert.strictEqual(config_, config); + callback(); // done() + }; + + sink.create(config, done); + }); + }); + + describe('delete', function() { + it('should accept gaxOptions', function(done) { + sink.logging.request = function(config, callback) { + assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.method, 'deleteSink'); + + assert.deepEqual(config.reqOpts, { + sinkName: sink.formattedName_ + }); + + assert.deepEqual(config.gaxOpts, {}); + + callback(); // done() + }; + + sink.delete(done); + }); + + it('should accept gaxOptions', function(done) { + var gaxOptions = {}; + + sink.logging.request = function(config) { + assert.strictEqual(config.gaxOpts, gaxOptions); + done(); + }; + + sink.delete(gaxOptions, assert.ifError); + }); + }); + + describe('getMetadata', function() { + it('should make correct request', function(done) { + sink.logging.request = function(config) { + assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.method, 'getSink'); + + assert.deepEqual(config.reqOpts, { + sinkName: sink.formattedName_ + }); + + assert.deepEqual(config.gaxOpts, {}); + + done(); + }; + + sink.getMetadata(assert.ifError); + }); + + it('should accept gaxOptions', function(done) { + var gaxOptions = {}; + + sink.logging.request = function(config) { + assert.strictEqual(config.gaxOpts, gaxOptions); + done(); + }; + + sink.delete(gaxOptions, assert.ifError); + }); + + it('should update metadata', function(done) { + var metadata = {}; + + sink.logging.request = function(config, callback) { + callback(null, metadata); + }; + + sink.getMetadata(function() { + assert.strictEqual(sink.metadata, metadata); + done(); + }); + }); + + it('should execute callback with original arguments', function(done) { + var args = [{}, {}, {}]; + + sink.logging.request = function(config, callback) { + callback.apply(null, args); + }; + + sink.getMetadata(function() { + assert.deepStrictEqual([].slice.call(arguments), args); + done(); + }); + }); + }); + describe('setFilter', function() { var FILTER = 'filter'; @@ -132,6 +189,12 @@ describe('Sink', function() { describe('setMetadata', function() { var METADATA = { a: 'b', c: 'd' }; + beforeEach(function() { + sink.getMetadata = function(callback) { + callback(null, METADATA); + }; + }); + it('should refresh the metadata', function(done) { sink.getMetadata = function() { done(); @@ -162,14 +225,16 @@ describe('Sink', function() { callback(null, currentMetadata); }; - sink.request = function(protoOpts, reqOpts) { - assert.strictEqual(protoOpts.service, 'ConfigServiceV2'); - assert.strictEqual(protoOpts.method, 'updateSink'); + sink.logging.request = function(config) { + assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.method, 'updateSink'); - assert.strictEqual(reqOpts.sinkName, sink.formattedName_); + assert.deepEqual(config.reqOpts, { + sinkName: sink.formattedName_, + sink: extend({}, currentMetadata, METADATA) + }); - var expectedMetadata = extend({}, currentMetadata, METADATA); - assert.deepEqual(reqOpts.sink, expectedMetadata); + assert.strictEqual(config.gaxOpts, undefined); done(); }; @@ -177,50 +242,43 @@ describe('Sink', function() { sink.setMetadata(METADATA, assert.ifError); }); - describe('error', function() { - var error = new Error('Error.'); - var apiResponse = {}; - - beforeEach(function() { - sink.getMetadata = function(callback) { - callback(); - }; - - sink.request = function(protoOpts, reqOpts, callback) { - callback(error, apiResponse); - }; + it('should accept gaxOptions', function(done) { + var metadata = extend({}, METADATA, { + gaxOptions: {} }); - it('should execute callback with error & API response', function(done) { - sink.setMetadata(METADATA, function(err, apiResponse_) { - assert.strictEqual(err, error); - assert.strictEqual(apiResponse_, apiResponse); + sink.logging.request = function(config) { + assert.strictEqual(config.reqOpts.sink.gaxOptions, undefined); + assert.strictEqual(config.gaxOpts, metadata.gaxOptions); + done(); + }; - done(); - }); - }); + sink.setMetadata(metadata, assert.ifError); }); - describe('success', function() { - var apiResponse = {}; + it('should update metadata', function(done) { + var metadata = {}; - beforeEach(function() { - sink.getMetadata = function(callback) { - callback(); - }; + sink.logging.request = function(config, callback) { + callback(null, metadata); + }; - sink.request = function(protoOpts, reqOpts, callback) { - callback(null, apiResponse); - }; + sink.setMetadata(metadata, function() { + assert.strictEqual(sink.metadata, metadata); + done(); }); + }); - it('should execute callback with API resp', function(done) { - sink.setMetadata(METADATA, function(err, apiResponse_) { - assert.ifError(err); - assert.strictEqual(apiResponse_, apiResponse); + it('should execute callback with original arguments', function(done) { + var args = [{}, {}, {}]; - done(); - }); + sink.logging.request = function(config, callback) { + callback.apply(null, args); + }; + + sink.setMetadata(METADATA, function() { + assert.deepStrictEqual([].slice.call(arguments), args); + done(); }); }); }); From 0a6fec7a7080a57678c8184c660ee833a3484c3c Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 10 Apr 2017 20:15:10 -0400 Subject: [PATCH 0071/1029] tests: fix snippet tests in sandbox env (#2199) --- handwritten/logging/src/index.js | 10 +++++++++ handwritten/logging/test/index.js | 34 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 46bc05d79c6..e5aeaff99d9 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -346,6 +346,8 @@ Logging.prototype.getEntries = function(options, callback) { Logging.prototype.getEntriesStream = function(options) { var self = this; + options = options || {}; + var requestStream; var userStream = streamEvents(pumpify.obj()); @@ -616,6 +618,10 @@ Logging.prototype.request = function(config, callback) { } function makeRequestCallback() { + if (global.GCLOUD_SANDBOX_ENV) { + return; + } + prepareGaxRequest(function(err, requestFn) { if (err) { callback(err); @@ -627,6 +633,10 @@ Logging.prototype.request = function(config, callback) { } function makeRequestStream() { + if (global.GCLOUD_SANDBOX_ENV) { + return through.obj(); + } + prepareGaxRequest(function(err, requestFn) { if (err) { stream.destroy(err); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 39427c5f83c..f4a13d27ac3 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -591,6 +591,13 @@ describe('Logging', function() { stream.abort(); }); + + it('should not require an options object', function() { + assert.doesNotThrow(function() { + var stream = logging.getEntriesStream(); + stream.emit('reading'); + }); + }); }); describe('getSinks', function() { @@ -889,6 +896,19 @@ describe('Logging', function() { }); describe('makeRequestCallback', function() { + it('should return if in snippet sandbox', function(done) { + logging.auth.getProjectId = function() { + done(new Error('Should not have gotten project ID.')); + }; + + global.GCLOUD_SANDBOX_ENV = true; + var returnValue = logging.request(CONFIG, assert.ifError); + delete global.GCLOUD_SANDBOX_ENV; + + assert.strictEqual(returnValue, undefined); + done(); + }); + it('should prepare the request', function(done) { logging.api[CONFIG.client][CONFIG.method] = { bind: function(gaxClient, reqOpts, gaxOpts) { @@ -944,6 +964,20 @@ describe('Logging', function() { }; }); + it('should return if in snippet sandbox', function(done) { + logging.auth.getProjectId = function() { + done(new Error('Should not have gotten project ID.')); + }; + + global.GCLOUD_SANDBOX_ENV = true; + var returnValue = logging.request(CONFIG); + returnValue.emit('reading'); + delete global.GCLOUD_SANDBOX_ENV; + + assert(returnValue instanceof require('stream')); + done(); + }); + it('should expose an abort function', function(done) { GAX_STREAM.cancel = done; From 7bfc4dbfb9cb95515f95775fa00e04a1f4436af6 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 10 Apr 2017 21:38:40 -0400 Subject: [PATCH 0072/1029] update deps --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f453993e762..ea02fa0574e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,9 +58,9 @@ "async": "^2.1.4", "eventid": "^0.1.0", "extend": "^3.0.0", - "google-auto-auth": "^0.5.4", + "google-auto-auth": "^0.6.0", "google-gax": "^0.13.0", - "google-proto-files": "^0.10.0", + "google-proto-files": "^0.11.0", "is": "^3.0.1", "pumpify": "^1.3.5", "stream-events": "^1.0.1", From 43575ebec3e44a68097623237d677b492ddfb17f Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 10 Apr 2017 23:15:31 -0400 Subject: [PATCH 0073/1029] logging: correctly pass options to googleAutoAuth --- handwritten/logging/src/index.js | 2 +- handwritten/logging/test/index.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index e5aeaff99d9..0af7be6c009 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -74,7 +74,7 @@ function Logging(options) { }, options); this.api = {}; - this.auth = googleAuth(options); + this.auth = googleAuth(options_); this.options = options_; this.projectId = options.projectId || '{{projectId}}'; } diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index f4a13d27ac3..e1a9311df1d 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -174,12 +174,19 @@ describe('Logging', function() { it('should cache a local google-auto-auth instance', function() { var fakeGoogleAutoAuthInstance = {}; + var options = { + a: 'b', + c: 'd' + }; - googleAutoAuthOverride = function() { + googleAutoAuthOverride = function(options_) { + assert.deepEqual(options_, extend({ + scopes: v2.ALL_SCOPES + }, options)); return fakeGoogleAutoAuthInstance; }; - var logging = new Logging({}); + var logging = new Logging(options); assert.strictEqual(logging.auth, fakeGoogleAutoAuthInstance); }); From a0d3ee4bacba5b961e98e5ac855c29fe4abe3941 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 10 Apr 2017 23:25:08 -0400 Subject: [PATCH 0074/1029] logging @ 0.10.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ea02fa0574e..d79d868f02c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.9.0", + "version": "0.10.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From fb7bf8e23aa9d7b90558dc4b97dcc23d7096b391 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 14 Apr 2017 11:27:52 -0400 Subject: [PATCH 0075/1029] datastore | logging: promote to GA (#2187) --- handwritten/logging/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 41af3860035..2e1241fb730 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -1,4 +1,4 @@ -# @google-cloud/logging ([Beta][versioning]) +# @google-cloud/logging ([GA][versioning]) > Google Stackdriver Logging Client Library for Node.js This module allows you to work with the Stackdriver Logging API. If you are already using [`winston`][winston] From 93be750bd29138246f0da7d332b3eda83a7eb629 Mon Sep 17 00:00:00 2001 From: Eric Uldall Date: Fri, 14 Apr 2017 09:19:55 -0700 Subject: [PATCH 0076/1029] updated FQDN's to googleapis.com with a trailing dot (#2214) --- handwritten/logging/src/log.js | 2 +- handwritten/logging/src/v2/config_service_v2_client.js | 2 +- handwritten/logging/src/v2/logging_service_v2_client.js | 6 +++--- handwritten/logging/src/v2/metrics_service_v2_client.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 9c4855f60ad..5891735b921 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -545,7 +545,7 @@ Log.prototype.warning = function(entry, options, callback) { * //- * // You may also pass multiple log entries to write. * //- - * var secondEntry = log.entry('compute.googleapis.com', { + * var secondEntry = log.entry('gce_instance', { * user: 'my_username' * }); * diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 57ab8e23b30..56fbacbb540 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -602,4 +602,4 @@ function ConfigServiceV2ClientBuilder(gaxGrpc) { } module.exports = ConfigServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 3ed647ab0bb..bfb9ea05308 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -229,7 +229,7 @@ LoggingServiceV2Client.prototype.getProjectId = function(callback) { * * `[LOG_ID]` must be URL-encoded. For example, * `"projects/my-project-id/logs/syslog"`, - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com.%2Factivity"`. * For more information about log names, see * {@link LogEntry}. * @param {Object=} options @@ -287,7 +287,7 @@ LoggingServiceV2Client.prototype.deleteLog = function(request, options, callback * * `[LOG_ID]` must be URL-encoded. For example, * `"projects/my-project-id/logs/syslog"` or - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com.%2Factivity"`. * For more information about log names, see * {@link LogEntry}. * @param {Object=} request.resource @@ -835,4 +835,4 @@ function LoggingServiceV2ClientBuilder(gaxGrpc) { } module.exports = LoggingServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 62d5a731e8e..126e3f5513a 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -555,4 +555,4 @@ function MetricsServiceV2ClientBuilder(gaxGrpc) { } module.exports = MetricsServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; From c56372a8e42254bf23b3fe5fd80db2041fb1bbd5 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Fri, 14 Apr 2017 12:34:04 -0400 Subject: [PATCH 0077/1029] logging @ 1.0.0 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d79d868f02c..0e6395fab50 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "0.10.0", + "version": "1.0.0", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 3890e9e1a40c4f6b6b6a489a19cec057b0917303 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 9 May 2017 11:25:42 -0400 Subject: [PATCH 0078/1029] Revert "updated FQDN's to googleapis.com with a trailing dot (#2214)" (#2283) This reverts commit 13d4ed52402bfb4394aea505b4bab8e6caace989. --- handwritten/logging/src/log.js | 2 +- handwritten/logging/src/v2/config_service_v2_client.js | 2 +- handwritten/logging/src/v2/logging_service_v2_client.js | 6 +++--- handwritten/logging/src/v2/metrics_service_v2_client.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 5891735b921..9c4855f60ad 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -545,7 +545,7 @@ Log.prototype.warning = function(entry, options, callback) { * //- * // You may also pass multiple log entries to write. * //- - * var secondEntry = log.entry('gce_instance', { + * var secondEntry = log.entry('compute.googleapis.com', { * user: 'my_username' * }); * diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 56fbacbb540..57ab8e23b30 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -602,4 +602,4 @@ function ConfigServiceV2ClientBuilder(gaxGrpc) { } module.exports = ConfigServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index bfb9ea05308..3ed647ab0bb 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -229,7 +229,7 @@ LoggingServiceV2Client.prototype.getProjectId = function(callback) { * * `[LOG_ID]` must be URL-encoded. For example, * `"projects/my-project-id/logs/syslog"`, - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com.%2Factivity"`. + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * For more information about log names, see * {@link LogEntry}. * @param {Object=} options @@ -287,7 +287,7 @@ LoggingServiceV2Client.prototype.deleteLog = function(request, options, callback * * `[LOG_ID]` must be URL-encoded. For example, * `"projects/my-project-id/logs/syslog"` or - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com.%2Factivity"`. + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * For more information about log names, see * {@link LogEntry}. * @param {Object=} request.resource @@ -835,4 +835,4 @@ function LoggingServiceV2ClientBuilder(gaxGrpc) { } module.exports = LoggingServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 126e3f5513a..62d5a731e8e 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -555,4 +555,4 @@ function MetricsServiceV2ClientBuilder(gaxGrpc) { } module.exports = MetricsServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file From 42bd4e8e1bef64d910d579d377a55bdc49ae3b33 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Sat, 13 May 2017 10:13:45 -0700 Subject: [PATCH 0079/1029] logging: omit logName from entries (#2305) As per [1] we do not need to have logName assigned on each entry if we are also providing it on call to entries.write. This optimization reduces the on-the-wire packet size for LogEntries. [1]: https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write --- handwritten/logging/src/log.js | 6 ------ handwritten/logging/test/log.js | 21 +-------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 9c4855f60ad..5adb096ae3e 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -306,10 +306,6 @@ Log.prototype.entry = function(metadata, data) { metadata = {}; } - metadata = extend({}, metadata, { - logName: this.formattedName_ - }); - return this.logging.entry(metadata, data); }; @@ -639,8 +635,6 @@ Log.prototype.decorateEntries_ = function(entries, callback) { return; } - decoratedEntry.logName = self.formattedName_; - self.metadata_.assignDefaultResource(decoratedEntry, function(err, entry) { // Ignore errors (the API will speak up if it has an issue). callback(null, entry || decoratedEntry); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 36d2f73d6d2..7587e9f49c6 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -240,9 +240,7 @@ describe('Log', function() { var entryObject = {}; log.logging.entry = function(metadata_, data_) { - assert.deepEqual(metadata_, extend({}, metadata, { - logName: log.formattedName_ - })); + assert.deepEqual(metadata_, metadata); assert.strictEqual(data_, data); return entryObject; }; @@ -251,15 +249,6 @@ describe('Log', function() { assert.strictEqual(entry, entryObject); }); - it('should attach the log name to the entry', function(done) { - log.logging.entry = function(metadata) { - assert.strictEqual(metadata.logName, log.formattedName_); - done(); - }; - - log.entry({}, {}); - }); - it('should assume one argument means data', function(done) { var data = {}; @@ -709,14 +698,6 @@ describe('Log', function() { }); }); - it('should assign the log name', function(done) { - log.decorateEntries_([{}], function(err, decoratedEntries) { - assert.ifError(err); - assert.strictEqual(decoratedEntries[0].logName, log.formattedName_); - done(); - }); - }); - it('should return extended entry with default resource', function(done) { var entry = new FakeEntry(); entry.toJSON = function() { From a3549fe38bfb76cf27f7a648b6ec1675763f7561 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sat, 13 May 2017 15:03:58 -0400 Subject: [PATCH 0080/1029] update deps --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0e6395fab50..64ea2dc7084 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,7 +58,7 @@ "async": "^2.1.4", "eventid": "^0.1.0", "extend": "^3.0.0", - "google-auto-auth": "^0.6.0", + "google-auto-auth": "^0.7.0", "google-gax": "^0.13.0", "google-proto-files": "^0.11.0", "is": "^3.0.1", From 1ad3a946b43b23a1f17d76298fd5ff4c59ccb75e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sat, 13 May 2017 15:17:20 -0400 Subject: [PATCH 0081/1029] logging @ 1.0.1 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 64ea2dc7084..d30f5c6a66f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "1.0.0", + "version": "1.0.1", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From d015cdd9fe3fdba29091506bfe6b33762f284739 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 17 May 2017 10:25:55 -0700 Subject: [PATCH 0082/1029] logging: omit resource from each log entry (#2309) --- handwritten/logging/package.json | 2 +- handwritten/logging/src/log.js | 53 +++++----- handwritten/logging/src/metadata.js | 26 ----- handwritten/logging/system-test/logging.js | 2 +- handwritten/logging/test/log.js | 111 +++++++++------------ handwritten/logging/test/metadata.js | 49 --------- 6 files changed, 77 insertions(+), 166 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d30f5c6a66f..3b9b5cb247a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,6 @@ "@google-cloud/common": "^0.13.0", "@google-cloud/common-grpc": "^0.3.0", "arrify": "^1.0.0", - "async": "^2.1.4", "eventid": "^0.1.0", "extend": "^3.0.0", "google-auto-auth": "^0.7.0", @@ -71,6 +70,7 @@ "@google-cloud/bigquery": "*", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", + "async": "^2.1.4", "methmeth": "^1.0.0", "mocha": "^3.0.1", "propprop": "^0.3.0", diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 5adb096ae3e..d981b7fed84 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -21,7 +21,6 @@ 'use strict'; var arrify = require('arrify'); -var async = require('async'); var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); @@ -589,12 +588,27 @@ Log.prototype.write = function(entry, options, callback) { options = {}; } - this.decorateEntries_(arrify(entry), function(err, decoratedEntries) { - // Ignore errors (the API will speak up if it has an issue). + if (!options.resource) { + this.metadata_.getDefaultResource(function(err, resource) { + // Ignore errors (the API will speak up if it has an issue). + writeWithResource(resource); + }); + } else { + writeWithResource(options.resource); + } + + function writeWithResource(resource) { + var decoratedEntries; + try { + decoratedEntries = self.decorateEntries_(arrify(entry)); + } catch (err) { + // Ignore errors (the API will speak up if it has an issue). + } var reqOpts = extend({ logName: self.formattedName_, - entries: decoratedEntries + entries: decoratedEntries, + resource: resource }, options); delete reqOpts.gaxOptions; @@ -605,41 +619,30 @@ Log.prototype.write = function(entry, options, callback) { reqOpts: reqOpts, gaxOpts: options.gaxOptions }, callback); - }); + } }; /** - * All entries are passed through here to make sure this log is attached to the - * entry. + * All entries are passed through here in order to get them serialized. * * @private * - * @param {object} entry - An entry object. + * @param {object[]} entries - Entry objects. + * @return {object[]} Serialized entries. + * @throws if there is an error during serialization. */ -Log.prototype.decorateEntries_ = function(entries, callback) { +Log.prototype.decorateEntries_ = function(entries) { var self = this; - async.map(entries, function(entry, callback) { + return entries.map(function(entry) { if (!(entry instanceof Entry)) { entry = self.entry(entry); } - var decoratedEntry; - - try { - decoratedEntry = entry.toJSON({ - removeCircular: self.removeCircular_ - }); - } catch(e) { - callback(e); - return; - } - - self.metadata_.assignDefaultResource(decoratedEntry, function(err, entry) { - // Ignore errors (the API will speak up if it has an issue). - callback(null, entry || decoratedEntry); + return entry.toJSON({ + removeCircular: self.removeCircular_ }); - }, callback); + }); }; /*! Developer Documentation diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 589981b4c04..38fce501822 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -123,32 +123,6 @@ Metadata.getGlobalDescriptor = function(projectId) { }; }; -/** - * Assigns an entry with a default resource object. - * - * @param {object} entryJson - The entry object to assign a resource to. - * @param {function} callback - The callback function. - */ -Metadata.prototype.assignDefaultResource = function(entryJson, callback) { - if (entryJson.resource) { - setImmediate(function() { - callback(null, entryJson); - }); - return; - } - - this.getDefaultResource(function(err, resource) { - if (err) { - callback(err); - return; - } - - entryJson.resource = resource; - - callback(null, entryJson); - }); -}; - /** * Retrieve a resource object describing the current environment. * diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index cc6b8a4aaae..753023928b3 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -495,7 +495,7 @@ describe('Logging', function() { assert.deepEqual(entry.metadata.resource, { type: 'global', labels: { - project_id: logging.projectId + project_id: env.projectId } }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 7587e9f49c6..bd1bb47a8cd 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -326,14 +326,40 @@ describe('Log', function() { describe('write', function() { var ENTRY = {}; - var OPTIONS = { - resource: {} - }; + var OPTIONS = {}; + var FAKE_RESOURCE = 'fake-resource'; beforeEach(function() { - log.decorateEntries_ = function(entries, callback) { - callback(null, entries); + log.decorateEntries_ = function(entries) { + return entries; + }; + log.metadata_.getDefaultResource = function(callback) { + callback(null, FAKE_RESOURCE); + }; + }); + + it('should forward options.resource to request', function(done) { + var CUSTOM_RESOURCE = 'custom-resource'; + var optionsWithResource = extend({}, OPTIONS, { + resource: CUSTOM_RESOURCE + }); + + log.logging.request = function(config, callback) { + assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.method, 'writeLogEntries'); + + assert.deepEqual(config.reqOpts, { + logName: log.formattedName_, + entries: [ENTRY], + resource: CUSTOM_RESOURCE + }); + + assert.strictEqual(config.gaxOpts, undefined); + + callback(); }; + + log.write(ENTRY, optionsWithResource, done); }); it('should make the correct API request', function(done) { @@ -344,7 +370,7 @@ describe('Log', function() { assert.deepEqual(config.reqOpts, { logName: log.formattedName_, entries: [ENTRY], - resource: {} + resource: FAKE_RESOURCE }); assert.strictEqual(config.gaxOpts, undefined); @@ -358,9 +384,9 @@ describe('Log', function() { it('should arrify & decorate the entries', function(done) { var decoratedEntries = []; - log.decorateEntries_ = function(entries, callback) { + log.decorateEntries_ = function(entries) { assert.strictEqual(entries[0], ENTRY); - callback(null, decoratedEntries); + return decoratedEntries; }; log.logging.request = function(config) { @@ -639,7 +665,7 @@ describe('Log', function() { }; }); - it('should create an Entry object if one is not provided', function(done) { + it('should create an Entry object if one is not provided', function() { var entry = {}; log.entry = function(entry_) { @@ -647,16 +673,13 @@ describe('Log', function() { return new FakeEntry(); }; - log.decorateEntries_([entry], function(err, decoratedEntries) { - assert.ifError(err); - assert.strictEqual(decoratedEntries[0], toJSONResponse); - done(); - }); + var decoratedEntries = log.decorateEntries_([entry]); + assert.strictEqual(decoratedEntries[0], toJSONResponse); }); - it('should get JSON format from Entry object', function(done) { + it('should get JSON format from Entry object', function() { log.entry = function() { - done(); // will result in multiple done() calls and fail the test. + throw new Error('should not be called'); }; var entry = new Entry(); @@ -664,11 +687,8 @@ describe('Log', function() { return toJSONResponse; }; - log.decorateEntries_([entry], function(err, decoratedEntries) { - assert.ifError(err); - assert.strictEqual(decoratedEntries[0], toJSONResponse); - done(); - }); + var decoratedEntries = log.decorateEntries_([entry]); + assert.strictEqual(decoratedEntries[0], toJSONResponse); }); it('should pass log.removeCircular to toJSON', function(done) { @@ -681,10 +701,10 @@ describe('Log', function() { return {}; }; - log.decorateEntries_([entry], assert.ifError); + log.decorateEntries_([entry]); }); - it('should exec callback with error from serialization', function(done) { + it('should throw error from serialization', function() { var error = new Error('Error.'); var entry = new Entry(); @@ -692,48 +712,11 @@ describe('Log', function() { throw error; }; - log.decorateEntries_([entry], function(err) { + try { + log.decorateEntries_([entry]); + } catch (err) { assert.strictEqual(err, error); - done(); - }); - }); - - it('should return extended entry with default resource', function(done) { - var entry = new FakeEntry(); - entry.toJSON = function() { - return toJSONResponse; - }; - - var entryWithDefaultResource = {}; - - log.metadata_.assignDefaultResource = function(entryJson, callback) { - assert.strictEqual(entryJson, toJSONResponse); - callback(null, entryWithDefaultResource); - }; - - log.decorateEntries_([entry], function(err, decoratedEntries) { - assert.ifError(err); - assert.strictEqual(decoratedEntries[0], entryWithDefaultResource); - done(); - }); - }); - - it('should return original entry without resource', function(done) { - var entry = new Entry(); - entry.toJSON = function() { - return toJSONResponse; - }; - - log.metadata_.assignDefaultResource = function(entryJson, callback) { - assert.strictEqual(entryJson, toJSONResponse); - callback(); - }; - - log.decorateEntries_([entry], function(err, decoratedEntries) { - assert.ifError(err); - assert.strictEqual(decoratedEntries[0], toJSONResponse); - done(); - }); + } }); }); }); diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index d357a68856b..4bd3ed90205 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -136,55 +136,6 @@ describe('metadata', function() { }); }); - describe('assignDefaultResource', function() { - var ENTRY_JSON = {}; - - it('should return entry if it already has a resource', function(done) { - var entryJson = { resource: {} }; - - metadata.assignDefaultResource(entryJson, function(err, entryJson_) { - assert.ifError(err); - assert.strictEqual(entryJson_, entryJson); - done(); - }); - }); - - it('should get the default resource', function(done) { - metadata.getDefaultResource = function() { - done(); - }; - - metadata.assignDefaultResource(ENTRY_JSON, assert.ifError); - }); - - it('should return error from getDefaultResource', function(done) { - var error = new Error('Error.'); - - metadata.getDefaultResource = function(callback) { - callback(error); - }; - - metadata.assignDefaultResource(ENTRY_JSON, function(err) { - assert.strictEqual(err, error); - done(); - }); - }); - - it('should assign default resource to entry', function(done) { - var defaultResource = {}; - - metadata.getDefaultResource = function(callback) { - callback(null, defaultResource); - }; - - metadata.assignDefaultResource(ENTRY_JSON, function(err, entryJson) { - assert.ifError(err); - assert.strictEqual(entryJson.resource, defaultResource); - done(); - }); - }); - }); - describe('getDefaultResource', function() { var RETURNED_PROJECT_ID = 'project-id'; From 9bb375fe87a8012da8a398c08bbf2cbb9f1cfba7 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sun, 4 Jun 2017 14:48:28 -0400 Subject: [PATCH 0083/1029] update deps --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3b9b5cb247a..186559e49e0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -59,7 +59,7 @@ "extend": "^3.0.0", "google-auto-auth": "^0.7.0", "google-gax": "^0.13.0", - "google-proto-files": "^0.11.0", + "google-proto-files": "^0.12.0", "is": "^3.0.1", "pumpify": "^1.3.5", "stream-events": "^1.0.1", From fd6ab20ab217d0ec2d768b678c79a80a73547b0d Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sun, 4 Jun 2017 14:53:15 -0400 Subject: [PATCH 0084/1029] logging @ 1.0.2 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 186559e49e0..44f6e8c800a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "1.0.1", + "version": "1.0.2", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 036228b2c5b230f6d75bc3b415f168bf50ff0698 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 12 Jun 2017 10:40:05 -0700 Subject: [PATCH 0085/1029] logging-{winston,bunyan}: improve API docs * API overview already included auth info. * Fix links. * Add missing `title`. --- handwritten/logging/src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 0af7be6c009..3ccce7eb92b 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -60,6 +60,8 @@ var Sink = require('./sink.js'); * @resource [What is Stackdriver Logging?]{@link https://cloud.google.com/logging/docs} * @resource [Introduction to the Stackdriver Logging API]{@link https://cloud.google.com/logging/docs/api} + * @resource [Logging to Stackdriver from Bunyan]{@link https://www.npmjs.com/package/@google-cloud/logging-bunyan} + * @resource [Logging to Stackdriver from Winston]{@link https://www.npmjs.com/package/@google-cloud/logging-winston} * * @param {object} options - [Configuration object](#/docs). */ From bde46e817538053949ab96e11e18ea735acaf970 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 12 Jun 2017 10:47:13 -0700 Subject: [PATCH 0086/1029] Revert "logging-{winston,bunyan}: improve API docs" (#2377) This reverts commit 8b616ea64542014090d4a68216917b2a63a3ac9d. I didn't intend to push this to master. Will open a PR instead. --- handwritten/logging/src/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 3ccce7eb92b..0af7be6c009 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -60,8 +60,6 @@ var Sink = require('./sink.js'); * @resource [What is Stackdriver Logging?]{@link https://cloud.google.com/logging/docs} * @resource [Introduction to the Stackdriver Logging API]{@link https://cloud.google.com/logging/docs/api} - * @resource [Logging to Stackdriver from Bunyan]{@link https://www.npmjs.com/package/@google-cloud/logging-bunyan} - * @resource [Logging to Stackdriver from Winston]{@link https://www.npmjs.com/package/@google-cloud/logging-winston} * * @param {object} options - [Configuration object](#/docs). */ From b020bd59ee30078e266e1892d3248e10b88744d1 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 12 Jun 2017 12:58:42 -0700 Subject: [PATCH 0087/1029] logging-{winston,bunyan}: improve API docs (#2378) * API overview already included auth info. * Fix links. * Add missing `title`. --- handwritten/logging/src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 0af7be6c009..3ccce7eb92b 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -60,6 +60,8 @@ var Sink = require('./sink.js'); * @resource [What is Stackdriver Logging?]{@link https://cloud.google.com/logging/docs} * @resource [Introduction to the Stackdriver Logging API]{@link https://cloud.google.com/logging/docs/api} + * @resource [Logging to Stackdriver from Bunyan]{@link https://www.npmjs.com/package/@google-cloud/logging-bunyan} + * @resource [Logging to Stackdriver from Winston]{@link https://www.npmjs.com/package/@google-cloud/logging-winston} * * @param {object} options - [Configuration object](#/docs). */ From cf7d8116923395662f8e1a8035a4d6bb7eb28f2b Mon Sep 17 00:00:00 2001 From: Song Wang Date: Thu, 15 Jun 2017 09:58:13 -0700 Subject: [PATCH 0088/1029] update gapic retry config (#2390) --- .../logging/src/v2/logging_service_v2_client_config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index 3dc284718e2..2b364fec9a8 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -39,9 +39,9 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default", "bundling": { - "element_count_threshold": 100, - "request_byte_threshold": 1024, - "delay_threshold_millis": 10 + "element_count_threshold": 1000, + "request_byte_threshold": 1048576, + "delay_threshold_millis": 50 } }, "ListLogEntries": { From 3db2566e6a68e93265b370e3620b02ab8ccdb066 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 23 Jun 2017 13:06:05 -0700 Subject: [PATCH 0089/1029] upgrade to google-auto-auth@0.7.1 (#2405) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 44f6e8c800a..440383795e2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "arrify": "^1.0.0", "eventid": "^0.1.0", "extend": "^3.0.0", - "google-auto-auth": "^0.7.0", + "google-auto-auth": "^0.7.1", "google-gax": "^0.13.0", "google-proto-files": "^0.12.0", "is": "^3.0.1", From c5c29aff17b04cb98f2c6eb0ca62e07f846c0efe Mon Sep 17 00:00:00 2001 From: Josh Ferge Date: Fri, 23 Jun 2017 18:34:30 -0600 Subject: [PATCH 0090/1029] remove line about batching requests all together (#2409) --- handwritten/logging/src/log.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index d981b7fed84..226d6171c57 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -509,9 +509,6 @@ Log.prototype.warning = function(entry, options, callback) { /** * Write log entries to Stackdriver Logging. * - * While you may write a single entry at a time, batching multiple entries - * together is preferred to avoid reaching the queries per second limit. - * * @resource [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write} * * @param {module:logging/entry|module:logging/entry[]} entry - A log entry, or From 01465992d3157890c82a90203ef5e7e3183a67ff Mon Sep 17 00:00:00 2001 From: Song Wang Date: Fri, 30 Jun 2017 06:00:51 -0700 Subject: [PATCH 0091/1029] Add dummy js files for gapic-based logging, pubsub and spanner (#2423) --- .../src/v2/doc/doc_google_api_label.js | 38 +++ .../doc/doc_google_api_monitored_resource.js | 94 ++++++ .../doc_google_logging_type_http_request.js | 87 +++++ .../src/v2/doc/doc_google_protobuf_any.js | 121 +++++++ .../v2/doc/doc_google_protobuf_duration.js | 84 +++++ .../v2/doc/doc_google_protobuf_timestamp.js | 88 +++++ .../logging/src/v2/doc/doc_log_entry.js | 183 ++++++++++ handwritten/logging/src/v2/doc/doc_logging.js | 314 ++++++++++++++++++ .../logging/src/v2/doc/doc_logging_config.js | 314 ++++++++++++++++++ .../logging/src/v2/doc/doc_logging_metrics.js | 208 ++++++++++++ 10 files changed, 1531 insertions(+) create mode 100644 handwritten/logging/src/v2/doc/doc_google_api_label.js create mode 100644 handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js create mode 100644 handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js create mode 100644 handwritten/logging/src/v2/doc/doc_google_protobuf_any.js create mode 100644 handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js create mode 100644 handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js create mode 100644 handwritten/logging/src/v2/doc/doc_log_entry.js create mode 100644 handwritten/logging/src/v2/doc/doc_logging.js create mode 100644 handwritten/logging/src/v2/doc/doc_logging_config.js create mode 100644 handwritten/logging/src/v2/doc/doc_logging_metrics.js diff --git a/handwritten/logging/src/v2/doc/doc_google_api_label.js b/handwritten/logging/src/v2/doc/doc_google_api_label.js new file mode 100644 index 00000000000..64701d613ac --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_google_api_label.js @@ -0,0 +1,38 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * A description of a label. + * + * @external "google.api.LabelDescriptor" + * @property {string} key + * The label key. + * + * @property {number} valueType + * The type of data that can be assigned to the label. + * + * The number should be among the values of [google.api.LabelDescriptor.ValueType]{@link external:"google.api.LabelDescriptor.ValueType"} + * + * @property {string} description + * A human-readable description for the label. + * + * @see [google.api.LabelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/label.proto} + */ \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js b/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js new file mode 100644 index 00000000000..bb2c3107f8f --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js @@ -0,0 +1,94 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * An object that describes the schema of a {@link MonitoredResource} object using a + * type name and a set of labels. For example, the monitored resource + * descriptor for Google Compute Engine VM instances has a type of + * `"gce_instance"` and specifies the use of the labels `"instance_id"` and + * `"zone"` to identify particular VM instances. + * + * Different APIs can support different monitored resource types. APIs generally + * provide a `list` method that returns the monitored resource descriptors used + * by the API. + * + * @external "google.api.MonitoredResourceDescriptor" + * @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} 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} 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 {Object[]} 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"`. + * + * This object should have the same structure as [google.api.LabelDescriptor]{@link external:"google.api.LabelDescriptor"} + * + * @see [google.api.MonitoredResourceDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} + */ + +/** + * An object representing a resource that can be used for monitoring, logging, + * billing, or other purposes. Examples include virtual machine instances, + * databases, and storage devices such as disks. The `type` field identifies a + * {@link MonitoredResourceDescriptor} object that describes the resource's + * schema. Information in the `labels` field identifies the actual resource and + * its attributes according to the schema. For example, a particular Compute + * Engine VM instance could be represented by the following object, because the + * {@link MonitoredResourceDescriptor} for `"gce_instance"` has labels + * `"instance_id"` and `"zone"`: + * + * { "type": "gce_instance", + * "labels": { "instance_id": "12345678901234", + * "zone": "us-central1-a" }} + * + * @external "google.api.MonitoredResource" + * @property {string} type + * Required. The monitored resource type. This field must match + * the `type` field of a {@link 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"`. + * + * @see [google.api.MonitoredResource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} + */ \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js b/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js new file mode 100644 index 00000000000..c424c34a7cd --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js @@ -0,0 +1,87 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * A common proto for logging HTTP requests. Only contains semantics + * defined by the HTTP specification. Product-specific logging + * information MUST be defined in a separate message. + * + * @external "google.logging.type.HttpRequest" + * @property {string} requestMethod + * The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. + * + * @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 {number} requestSize + * The size of the HTTP request message in bytes, including the request + * headers and the request body. + * + * @property {number} status + * The response code indicating the status of response. + * Examples: 200, 404. + * + * @property {number} responseSize + * The size of the HTTP response message sent back to the client, in bytes, + * including the response headers and the response body. + * + * @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} 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} 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 {Object} latency + * The request processing latency on the server, from the time the request was + * received until the response was sent. + * + * This object should have the same structure as [google.protobuf.Duration]{@link external:"google.protobuf.Duration"} + * + * @property {boolean} cacheLookup + * Whether or not a cache lookup was attempted. + * + * @property {boolean} cacheHit + * Whether or not an entity was served from cache + * (with or without validation). + * + * @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 {number} cacheFillBytes + * The number of HTTP response bytes inserted into cache. Set only when a + * cache fill was attempted. + * + * @see [google.logging.type.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/type/http_request.proto} + */ \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js b/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js new file mode 100644 index 00000000000..0697ec15814 --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js @@ -0,0 +1,121 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; + * Any any = Any.pack(foo); + * ... + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * ... + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * ... + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * + * + * # JSON + * + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * } + * + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * } + * + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message {@link google.protobuf.Duration}): + * + * { + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + * } + * + * @external "google.protobuf.Any" + * @property {string} typeUrl + * A URL/resource name whose content describes the type of the + * serialized protocol buffer message. + * + * For URLs which use the scheme `http`, `https`, or no scheme, the + * following restrictions and interpretations apply: + * + * * If no scheme is provided, `https` is assumed. + * * The last segment of the URL's path must represent the fully + * qualified name of the type (as in `path/google.protobuf.Duration`). + * The name should be in a canonical form (e.g., leading "." is + * not accepted). + * * An HTTP GET on the URL must yield a {@link google.protobuf.Type} + * value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the + * URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + * + * @property {string} value + * Must be a valid serialized protocol buffer of the above specified type. + * + * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} + */ \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js b/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js new file mode 100644 index 00000000000..b81fd71f130 --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js @@ -0,0 +1,84 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * A Duration represents a signed, fixed-length span of time represented + * as a count of seconds and fractions of seconds at nanosecond + * resolution. It is independent of any calendar and concepts like "day" + * or "month". It is related to Timestamp in that the difference between + * two Timestamp values is a Duration and it can be added or subtracted + * from a Timestamp. Range is approximately +-10,000 years. + * + * Example 1: Compute Duration from two Timestamps in pseudo code. + * + * Timestamp start = ...; + * Timestamp end = ...; + * Duration duration = ...; + * + * duration.seconds = end.seconds - start.seconds; + * duration.nanos = end.nanos - start.nanos; + * + * if (duration.seconds < 0 && duration.nanos > 0) { + * duration.seconds += 1; + * duration.nanos -= 1000000000; + * } else if (durations.seconds > 0 && duration.nanos < 0) { + * duration.seconds -= 1; + * duration.nanos += 1000000000; + * } + * + * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + * + * Timestamp start = ...; + * Duration duration = ...; + * Timestamp end = ...; + * + * end.seconds = start.seconds + duration.seconds; + * end.nanos = start.nanos + duration.nanos; + * + * if (end.nanos < 0) { + * end.seconds -= 1; + * end.nanos += 1000000000; + * } else if (end.nanos >= 1000000000) { + * end.seconds += 1; + * end.nanos -= 1000000000; + * } + * + * Example 3: Compute Duration from datetime.timedelta in Python. + * + * td = datetime.timedelta(days=3, minutes=10) + * duration = Duration() + * duration.FromTimedelta(td) + * + * @external "google.protobuf.Duration" + * @property {number} seconds + * Signed seconds of the span of time. Must be from -315,576,000,000 + * to +315,576,000,000 inclusive. + * + * @property {number} nanos + * Signed fractions of a second at nanosecond resolution of the span + * of time. Durations less than one second are represented with a 0 + * `seconds` field and a positive or negative `nanos` field. For durations + * of one second or more, a non-zero value for the `nanos` field must be + * of the same sign as the `seconds` field. Must be from -999,999,999 + * to +999,999,999 inclusive. + * + * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} + */ \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js b/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js new file mode 100644 index 00000000000..ed8fc627b92 --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js @@ -0,0 +1,88 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * A Timestamp represents a point in time independent of any time zone + * or calendar, represented as seconds and fractions of seconds at + * nanosecond resolution in UTC Epoch time. It is encoded using the + * Proleptic Gregorian Calendar which extends the Gregorian calendar + * backwards to year one. It is encoded assuming all minutes are 60 + * seconds long, i.e. leap seconds are "smeared" so that no leap second + * table is needed for interpretation. Range is from + * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. + * By restricting to that range, we ensure that we can convert to + * and from RFC 3339 date strings. + * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + * + * Example 1: Compute Timestamp from POSIX `time()`. + * + * Timestamp timestamp; + * timestamp.set_seconds(time(NULL)); + * timestamp.set_nanos(0); + * + * Example 2: Compute Timestamp from POSIX `gettimeofday()`. + * + * struct timeval tv; + * gettimeofday(&tv, NULL); + * + * Timestamp timestamp; + * timestamp.set_seconds(tv.tv_sec); + * timestamp.set_nanos(tv.tv_usec * 1000); + * + * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + * + * FILETIME ft; + * GetSystemTimeAsFileTime(&ft); + * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + * + * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + * Timestamp timestamp; + * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + * + * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + * + * long millis = System.currentTimeMillis(); + * + * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + * .setNanos((int) ((millis % 1000) * 1000000)).build(); + * + * + * Example 5: Compute Timestamp from current time in Python. + * + * timestamp = Timestamp() + * timestamp.GetCurrentTime() + * + * @external "google.protobuf.Timestamp" + * @property {number} seconds + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + * + * @property {number} nanos + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + * + * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} + */ \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_log_entry.js b/handwritten/logging/src/v2/doc/doc_log_entry.js new file mode 100644 index 00000000000..194223b50f2 --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_log_entry.js @@ -0,0 +1,183 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * An individual entry in a log. + * + * @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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_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 {Object} 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. + * + * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} + * + * @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. + * + * This object should have the same structure as [google.protobuf.Any]{@link external:"google.protobuf.Any"} + * + * @property {string} textPayload + * The log entry payload, represented as a Unicode string (UTF-8). + * + * @property {Object} jsonPayload + * The log entry payload, represented as a structure that is + * expressed as a JSON object. + * + * This object should have the same structure as [google.protobuf.Struct]{@link external:"google.protobuf.Struct"} + * + * @property {Object} timestamp + * Optional. The time the event described by the log entry occurred. If + * omitted in a new log entry, Stackdriver Logging will insert the time the + * log entry is received. Stackdriver Logging might reject log entries whose + * time stamps are more than a couple of hours in the future. Log entries + * with time stamps in the past are accepted. + * + * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * + * @property {Object} receiveTimestamp + * Output only. The time the log entry was received by Stackdriver Logging. + * + * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * + * @property {number} severity + * Optional. The severity of the log entry. The default value is + * `LogSeverity.DEFAULT`. + * + * The number should be among the values of [google.logging.type.LogSeverity]{@link external:"google.logging.type.LogSeverity"} + * + * @property {string} insertId + * Optional. A unique identifier for the log entry. If you provide a value, + * then Stackdriver Logging considers other log entries in the same project, + * with the same `timestamp`, and with the same `insert_id` to be duplicates + * which can be removed. If omitted in new log entries, then Stackdriver + * Logging will insert its own unique identifier. The `insert_id` is used + * to order log entries that have the same `timestamp` value. + * + * @property {Object} httpRequest + * Optional. Information about the HTTP request associated with this + * log entry, if applicable. + * + * This object should have the same structure as [google.logging.type.HttpRequest]{@link external:"google.logging.type.HttpRequest"} + * + * @property {Object.} labels + * Optional. A set of user-defined (key, value) data that provides additional + * information about the log entry. + * + * @property {Object} operation + * Optional. Information about an operation associated with the log entry, if + * applicable. + * + * This object should have the same structure as [LogEntryOperation]{@link LogEntryOperation} + * + * @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 {Object} sourceLocation + * Optional. Source code location information associated with the log entry, + * if any. + * + * This object should have the same structure as [LogEntrySourceLocation]{@link LogEntrySourceLocation} + * + * @class + * @see [google.logging.v2.LogEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} + */ +var LogEntry = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Additional information about a potentially long-running operation with which + * a log entry is associated. + * + * @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} first + * Optional. Set this to True if this is the first log entry in the operation. + * + * @property {boolean} last + * Optional. Set this to True if this is the last log entry in the operation. + * + * @class + * @see [google.logging.v2.LogEntryOperation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} + */ +var LogEntryOperation = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Additional information about the source code location that produced the log + * entry. + * + * @property {string} file + * Optional. Source file name. Depending on the runtime environment, this + * might be a simple name or a fully-qualified name. + * + * @property {number} 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). + * + * @class + * @see [google.logging.v2.LogEntrySourceLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} + */ +var LogEntrySourceLocation = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_logging.js b/handwritten/logging/src/v2/doc/doc_logging.js new file mode 100644 index 00000000000..a74b92ed98b --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_logging.js @@ -0,0 +1,314 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * The parameters to DeleteLog. + * + * @property {string} logName + * Required. The resource name of the log to delete: + * + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * For more information about log names, see + * {@link LogEntry}. + * + * @class + * @see [google.logging.v2.DeleteLogRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var DeleteLogRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to WriteLogEntries. + * + * @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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"` or + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * For more information about log names, see + * {@link LogEntry}. + * + * @property {Object} 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 {@link LogEntry}. + * + * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} + * + * @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 {@link LogEntry}. + * + * @property {Object[]} entries + * Required. The log entries to write. Values supplied for the fields + * `log_name`, `resource`, and `labels` in this `entries.write` request are + * inserted into those log entries in this list that do not provide their own + * values. + * + * Stackdriver Logging also creates and inserts values for `timestamp` and + * `insert_id` if the entries do not provide them. The created `insert_id` for + * the N'th entry in this list will be greater than earlier entries and less + * than later entries. Otherwise, the order of log entries in this list does + * not matter. + * + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/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. + * + * This object should have the same structure as [LogEntry]{@link 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, then the response status is the error associated + * with one of the failed entries and the response includes error details + * keyed by the entries' zero-based index in the `entries.write` method. + * + * @class + * @see [google.logging.v2.WriteLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var WriteLogEntriesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Result returned from WriteLogEntries. + * empty + * @class + * @see [google.logging.v2.WriteLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var WriteLogEntriesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Error details for WriteLogEntries with partial success. + * + * @property {Object.} logEntryErrors + * When `WriteLogEntriesRequest.partial_success` is true, records the error + * status for entries that were not written due to a permanent error, keyed + * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. + * + * Failed requests for which no entries are written will not include + * per-entry errors. + * + * @class + * @see [google.logging.v2.WriteLogEntriesPartialErrors definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var WriteLogEntriesPartialErrors = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to `ListLogEntries`. + * + * @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 parent resources from which to + * retrieve log entries: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Projects listed in the `project_ids` field are added to this list. + * + * @property {string} filter + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Filters](https://cloud.google.com/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} 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 their `insert_id` values. + * + * @property {number} pageSize + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * + * @property {string} pageToken + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * @class + * @see [google.logging.v2.ListLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var ListLogEntriesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Result returned from `ListLogEntries`. + * + * @property {Object[]} entries + * A list of log entries. + * + * This object should have the same structure as [LogEntry]{@link LogEntry} + * + * @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. + * + * @class + * @see [google.logging.v2.ListLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var ListLogEntriesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to ListMonitoredResourceDescriptors + * + * @property {number} 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} 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. + * + * @class + * @see [google.logging.v2.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var ListMonitoredResourceDescriptorsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Result returned from ListMonitoredResourceDescriptors. + * + * @property {Object[]} resourceDescriptors + * A list of resource descriptors. + * + * This object should have the same structure as [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} + * + * @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`. + * + * @class + * @see [google.logging.v2.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var ListMonitoredResourceDescriptorsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to ListLogs. + * + * @property {string} parent + * Required. The resource name that owns the logs: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * @property {number} 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} 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. + * + * @class + * @see [google.logging.v2.ListLogsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var ListLogsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Result returned from ListLogs. + * + * @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`. + * + * @class + * @see [google.logging.v2.ListLogsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} + */ +var ListLogsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_logging_config.js b/handwritten/logging/src/v2/doc/doc_logging_config.js new file mode 100644 index 00000000000..547b2dc54bc --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_logging_config.js @@ -0,0 +1,314 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * Describes a sink used to export log entries to one of the following + * destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a + * Cloud Pub/Sub topic. A logs filter controls which log entries are + * exported. The sink must be created within a project, organization, billing + * account, or folder. + * + * @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} 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](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * + * @property {string} filter + * Optional. + * An [advanced logs filter](https://cloud.google.com/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 {number} 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](https://cloud.google.com/logging/docs/api/v2/migration-to-v2). + * + * The number should be among the values of [VersionFormat]{@link VersionFormat} + * + * @property {string} writerIdentity + * Output only. An IAM identity—a service account or group—under + * which Stackdriver Logging writes the exported log entries to the sink's + * destination. This field is set by + * [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create) + * and + * [sinks.update](https://cloud.google.com/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](https://cloud.google.com/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. + * + * @property {boolean} includeChildren + * Optional. This field applies only to sinks owned by organizations and + * folders. If the field is false, the default, only the logs owned by the + * sink's parent resource are available for export. If the field is true, then + * logs from all the projects, folders, and billing accounts contained in the + * sink's parent resource are also available for export. Whether a particular + * log entry from the children is exported depends on the sink's filter + * expression. For example, if this field is true, then the filter + * `resource.type=gce_instance` would export all Compute Engine VM instance + * log entries from all projects in the sink's parent. To only export entries + * from certain child projects, filter on the project part of the log name: + * + * logName:("projects/test-project1/" OR "projects/test-project2/") AND + * resource.type=gce_instance + * + * @property {Object} 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. + * + * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * + * @property {Object} 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. + * + * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * + * @class + * @see [google.logging.v2.LogSink definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +var LogSink = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Available log entry formats. Log entries can be written to Stackdriver + * Logging in either format and can be exported in either format. + * Version 2 is the preferred format. + * + * @enum {number} + */ + VersionFormat: { + + /** + * An unspecified format version that will default to V2. + */ + VERSION_FORMAT_UNSPECIFIED: 0, + + /** + * `LogEntry` version 2 format. + */ + V2: 1, + + /** + * `LogEntry` version 1 format. + */ + V1: 2 + } +}; + +/** + * The parameters to `ListSinks`. + * + * @property {string} parent + * Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * @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 {number} 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. + * + * @class + * @see [google.logging.v2.ListSinksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +var ListSinksRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Result returned from `ListSinks`. + * + * @property {Object[]} sinks + * A list of sinks. + * + * This object should have the same structure as [LogSink]{@link LogSink} + * + * @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`. + * + * @class + * @see [google.logging.v2.ListSinksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +var ListSinksResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to `GetSink`. + * + * @property {string} sinkName + * Required. The resource name of the sink: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * + * @class + * @see [google.logging.v2.GetSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +var GetSinkRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to `CreateSink`. + * + * @property {string} parent + * Required. The resource in which to create the sink: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * + * @property {Object} sink + * Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. + * + * This object should have the same structure as [LogSink]{@link LogSink} + * + * @property {boolean} 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 + * the same group or service account used by Stackdriver Logging 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 {@link LogSink}. + * + * @class + * @see [google.logging.v2.CreateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +var CreateSinkRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to `UpdateSink`. + * + * @property {string} 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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * + * @property {Object} sink + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. If `sink_name` does not exist, then + * this method creates a new sink. + * + * This object should have the same structure as [LogSink]{@link LogSink} + * + * @property {boolean} uniqueWriterIdentity + * Optional. See + * [sinks.create](https://cloud.google.com/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 is 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 is true and the new value is false. + * + * @class + * @see [google.logging.v2.UpdateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +var UpdateSinkRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to `DeleteSink`. + * + * @property {string} 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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * + * @class + * @see [google.logging.v2.DeleteSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +var DeleteSinkRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/doc_logging_metrics.js new file mode 100644 index 00000000000..b76532ab87f --- /dev/null +++ b/handwritten/logging/src/v2/doc/doc_logging_metrics.js @@ -0,0 +1,208 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * Describes a logs-based metric. The value of the metric is the + * number of log entries that match a logs filter in a given time interval. + * + * @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} description + * Optional. A description of this metric, which is used in documentation. + * + * @property {string} filter + * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) + * 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 {number} 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. + * + * The number should be among the values of [ApiVersion]{@link ApiVersion} + * + * @class + * @see [google.logging.v2.LogMetric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} + */ +var LogMetric = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Stackdriver Logging API version. + * + * @enum {number} + */ + ApiVersion: { + + /** + * Stackdriver Logging API v2. + */ + V2: 0, + + /** + * Stackdriver Logging API v1. + */ + V1: 1 + } +}; + +/** + * The parameters to ListLogMetrics. + * + * @property {string} parent + * Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" + * + * @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 {number} 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. + * + * @class + * @see [google.logging.v2.ListLogMetricsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} + */ +var ListLogMetricsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Result returned from ListLogMetrics. + * + * @property {Object[]} metrics + * A list of logs-based metrics. + * + * This object should have the same structure as [LogMetric]{@link LogMetric} + * + * @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`. + * + * @class + * @see [google.logging.v2.ListLogMetricsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} + */ +var ListLogMetricsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to GetLogMetric. + * + * @property {string} metricName + * The resource name of the desired metric: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * @class + * @see [google.logging.v2.GetLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} + */ +var GetLogMetricRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to CreateLogMetric. + * + * @property {string} 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. + * + * @property {Object} metric + * The new logs-based metric, which must not have an identifier that + * already exists. + * + * This object should have the same structure as [LogMetric]{@link LogMetric} + * + * @class + * @see [google.logging.v2.CreateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} + */ +var CreateLogMetricRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to UpdateLogMetric. + * + * @property {string} 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. + * + * @property {Object} metric + * The updated metric. + * + * This object should have the same structure as [LogMetric]{@link LogMetric} + * + * @class + * @see [google.logging.v2.UpdateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} + */ +var UpdateLogMetricRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to DeleteLogMetric. + * + * @property {string} metricName + * The resource name of the metric to delete: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * @class + * @see [google.logging.v2.DeleteLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} + */ +var DeleteLogMetricRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file From 42d6b24f6751f28c164524367dbc262da20064d5 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 5 Jul 2017 17:08:10 -0400 Subject: [PATCH 0092/1029] logging @ 1.0.3 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 440383795e2..05989f03f60 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "1.0.2", + "version": "1.0.3", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 94280173609a794c751081cf3721271a33760316 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 19 Jul 2017 20:14:28 -0400 Subject: [PATCH 0093/1029] bigtable/datastore/logging/pubsub/spanner/vision: update common-grpc --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 05989f03f60..7866a1e8f16 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -53,7 +53,7 @@ ], "dependencies": { "@google-cloud/common": "^0.13.0", - "@google-cloud/common-grpc": "^0.3.0", + "@google-cloud/common-grpc": "^0.4.0", "arrify": "^1.0.0", "eventid": "^0.1.0", "extend": "^3.0.0", From 1f4063c4feb9f429439004d94dbb5fecf9a6b9cb Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 19 Jul 2017 20:29:50 -0400 Subject: [PATCH 0094/1029] logging @ 1.0.4 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7866a1e8f16..579d3cfed52 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "1.0.3", + "version": "1.0.4", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 5487140f5f1de40f6acc0ccb3ce3fb8cbf0c950e Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 28 Jul 2017 07:27:31 -0700 Subject: [PATCH 0095/1029] test: GAE, GKE, GCF run on GCE (#2495) Make tests ensure that getDefaultResource prefers GAE, GKE, GCF over GCE. --- handwritten/logging/test/metadata.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 4bd3ed90205..3bca55984e5 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -186,7 +186,8 @@ describe('metadata', function() { metadata.logging.auth.getEnvironment = function(callback) { callback(null, { - IS_APP_ENGINE: true + IS_APP_ENGINE: true, + IS_COMPUTE_ENGINE: true }); }; @@ -209,7 +210,8 @@ describe('metadata', function() { metadata.logging.auth.getEnvironment = function(callback) { callback(null, { - IS_CLOUD_FUNCTION: true + IS_CLOUD_FUNCTION: true, + IS_COMPUTE_ENGINE: true }); }; @@ -255,6 +257,7 @@ describe('metadata', function() { metadata.logging.auth.getEnvironment = function(callback) { callback(null, { + IS_COMPUTE_ENGINE: true, IS_CONTAINER_ENGINE: true }); }; From 8eafb9b46246041dbeeb118b29fadcaf4cefac78 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 2 Aug 2017 13:31:24 -0700 Subject: [PATCH 0096/1029] feat(logging): provide cluster_name on GKE resources (#2483) --- handwritten/logging/package.json | 1 + handwritten/logging/src/metadata.js | 31 +++++++++---- handwritten/logging/test/metadata.js | 66 +++++++++++++++++++++------- 3 files changed, 75 insertions(+), 23 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 579d3cfed52..eabe6f69fbd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,6 +57,7 @@ "arrify": "^1.0.0", "eventid": "^0.1.0", "extend": "^3.0.0", + "gcp-metadata": "^0.2.0", "google-auto-auth": "^0.7.1", "google-gax": "^0.13.0", "google-proto-files": "^0.12.0", diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 38fce501822..e115b13e254 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -20,6 +20,8 @@ 'use strict'; +var gcpMetadata = require('gcp-metadata'); + /** * The Metadata class attempts to contact the metadata service and determine, * based on request success and environment variables, what type of resource @@ -95,15 +97,25 @@ Metadata.getGCEDescriptor = function(projectId) { * @private * * @param {string} projectId - The project ID. + * @param {function} callback - The callback function. * @return {object} */ -Metadata.getGKEDescriptor = function(projectId) { - return { - type: 'container', - labels: { - project_id: projectId, +Metadata.getGKEDescriptor = function(projectId, callback) { + gcpMetadata.instance('attributes/clusterName', function(err, _, clusterName) { + if (err) { + callback(err); + return; } - }; + + callback(null, { + type: 'container', + labels: { + // TODO(ofrobots): it would be good to include the namespace_id as well. + cluster_name: clusterName, + project_id: projectId + } + }); + }); }; /** @@ -138,14 +150,17 @@ Metadata.prototype.getDefaultResource = function(callback) { } self.logging.auth.getEnvironment(function(err, env) { + if (env.IS_CONTAINER_ENGINE) { + Metadata.getGKEDescriptor(projectId, callback); + return; + } + var defaultResource; if (env.IS_APP_ENGINE) { defaultResource = Metadata.getGAEDescriptor(projectId); } else if (env.IS_CLOUD_FUNCTION) { defaultResource = Metadata.getCloudFunctionDescriptor(projectId); - } else if (env.IS_CONTAINER_ENGINE) { - defaultResource = Metadata.getGKEDescriptor(projectId); } else if (env.IS_COMPUTE_ENGINE) { defaultResource = Metadata.getGCEDescriptor(projectId); } else { diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 3bca55984e5..51a72793700 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -18,11 +18,21 @@ var assert = require('assert'); var extend = require('extend'); - -var Metadata = require('../src/metadata.js'); +var proxyquire = require('proxyquire'); + +var instanceArgsOverride; +var fakeGcpMetadata = { + instance: function(path, cb) { + setImmediate(function() { + var args = instanceArgsOverride || [null, null, 'fake-instance-value']; + cb.apply(fakeGcpMetadata, args); + }); + } +}; describe('metadata', function() { var MetadataCached; + var Metadata; var metadata; var PROJECT_ID = 'project-id'; @@ -31,6 +41,10 @@ describe('metadata', function() { var ENV_CACHED = extend({}, process.env); before(function() { + Metadata = proxyquire('../src/metadata.js', { + 'gcp-metadata': fakeGcpMetadata + }); + MetadataCached = extend({}, Metadata); }); @@ -40,6 +54,7 @@ describe('metadata', function() { }; extend(Metadata, MetadataCached); metadata = new Metadata(LOGGING); + instanceArgsOverride = null; }); afterEach(function() { @@ -104,12 +119,31 @@ describe('metadata', function() { }); describe('getGKEDescriptor', function() { - it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getGKEDescriptor(PROJECT_ID), { - type: 'container', - labels: { - project_id: PROJECT_ID - } + var CLUSTER_NAME = 'gke-cluster-name'; + + it('should return the correct descriptor', function(done) { + instanceArgsOverride = [null, null, CLUSTER_NAME]; + + Metadata.getGKEDescriptor(PROJECT_ID, function(err, descriptor) { + assert.ifError(err); + assert.deepEqual(descriptor, { + type: 'container', + labels: { + cluster_name: CLUSTER_NAME, + project_id: PROJECT_ID + } + }); + done(); + }); + }); + + it('should return error on failure to acquire metadata', function(done) { + var FAKE_ERROR = new Error(); + instanceArgsOverride = [ FAKE_ERROR ]; + + Metadata.getGKEDescriptor(PROJECT_ID, function(err) { + assert.strictEqual(err, FAKE_ERROR); + done(); }); }); }); @@ -248,12 +282,8 @@ describe('metadata', function() { describe('container engine', function() { it('should return correct descriptor', function(done) { - var DESCRIPTOR = {}; - - Metadata.getGKEDescriptor = function(projectId) { - assert.strictEqual(projectId, RETURNED_PROJECT_ID); - return DESCRIPTOR; - }; + var CLUSTER_NAME = 'overridden-value'; + instanceArgsOverride = [null, null, CLUSTER_NAME]; metadata.logging.auth.getEnvironment = function(callback) { callback(null, { @@ -264,7 +294,13 @@ describe('metadata', function() { metadata.getDefaultResource(function(err, defaultResource) { assert.ifError(err); - assert.strictEqual(defaultResource, DESCRIPTOR); + assert.deepStrictEqual(defaultResource, { + type: 'container', + labels: { + cluster_name: CLUSTER_NAME, + project_id: RETURNED_PROJECT_ID + } + }); done(); }); }); From ea3834315e50b1edaa060ea8a43e37abbec71184 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 4 Aug 2017 06:34:16 -0700 Subject: [PATCH 0097/1029] feat: we can omit project_id from the resource (#2502) --- handwritten/logging/src/metadata.js | 67 +++++++++---------------- handwritten/logging/test/metadata.js | 74 ++++++---------------------- 2 files changed, 37 insertions(+), 104 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index e115b13e254..2c46e1f2367 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -43,14 +43,12 @@ function Metadata(logging) { /** * Create a descriptor for Cloud Functions. * - * @param {string} projectId - The project ID. * @returns {object} */ -Metadata.getCloudFunctionDescriptor = function(projectId) { +Metadata.getCloudFunctionDescriptor = function() { return { type: 'cloud_function', labels: { - project_id: projectId, function_name: process.env.FUNCTION_NAME, region: process.env.SUPERVISOR_REGION } @@ -60,14 +58,12 @@ Metadata.getCloudFunctionDescriptor = function(projectId) { /** * Create a descriptor for Google App Engine. * - * @param {string} projectId - The project ID. * @returns {object} */ -Metadata.getGAEDescriptor = function(projectId) { +Metadata.getGAEDescriptor = function() { return { type: 'gae_app', labels: { - project_id: projectId, module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, version_id: process.env.GAE_VERSION } @@ -79,15 +75,11 @@ Metadata.getGAEDescriptor = function(projectId) { * * @private * - * @param {string} projectId - The project ID. * @return {object} */ -Metadata.getGCEDescriptor = function(projectId) { +Metadata.getGCEDescriptor = function() { return { - type: 'gce_instance', - labels: { - project_id: projectId - } + type: 'gce_instance' }; }; @@ -96,11 +88,10 @@ Metadata.getGCEDescriptor = function(projectId) { * * @private * - * @param {string} projectId - The project ID. * @param {function} callback - The callback function. * @return {object} */ -Metadata.getGKEDescriptor = function(projectId, callback) { +Metadata.getGKEDescriptor = function(callback) { gcpMetadata.instance('attributes/clusterName', function(err, _, clusterName) { if (err) { callback(err); @@ -111,8 +102,7 @@ Metadata.getGKEDescriptor = function(projectId, callback) { type: 'container', labels: { // TODO(ofrobots): it would be good to include the namespace_id as well. - cluster_name: clusterName, - project_id: projectId + cluster_name: clusterName } }); }); @@ -123,15 +113,11 @@ Metadata.getGKEDescriptor = function(projectId, callback) { * * @private * - * @param {string} projectId - The project ID. * @returns {object} */ -Metadata.getGlobalDescriptor = function(projectId) { +Metadata.getGlobalDescriptor = function() { return { - type: 'global', - labels: { - project_id: projectId - } + type: 'global' }; }; @@ -141,34 +127,25 @@ Metadata.getGlobalDescriptor = function(projectId) { * @param {function} callback - The callback function. */ Metadata.prototype.getDefaultResource = function(callback) { - var self = this; - - this.logging.auth.getProjectId(function(err, projectId) { - if (err) { - callback(err); + this.logging.auth.getEnvironment(function(err, env) { + if (env.IS_CONTAINER_ENGINE) { + Metadata.getGKEDescriptor(callback); return; } - self.logging.auth.getEnvironment(function(err, env) { - if (env.IS_CONTAINER_ENGINE) { - Metadata.getGKEDescriptor(projectId, callback); - return; - } - - var defaultResource; + var defaultResource; - if (env.IS_APP_ENGINE) { - defaultResource = Metadata.getGAEDescriptor(projectId); - } else if (env.IS_CLOUD_FUNCTION) { - defaultResource = Metadata.getCloudFunctionDescriptor(projectId); - } else if (env.IS_COMPUTE_ENGINE) { - defaultResource = Metadata.getGCEDescriptor(projectId); - } else { - defaultResource = Metadata.getGlobalDescriptor(projectId); - } + if (env.IS_APP_ENGINE) { + defaultResource = Metadata.getGAEDescriptor(); + } else if (env.IS_CLOUD_FUNCTION) { + defaultResource = Metadata.getCloudFunctionDescriptor(); + } else if (env.IS_COMPUTE_ENGINE) { + defaultResource = Metadata.getGCEDescriptor(); + } else { + defaultResource = Metadata.getGlobalDescriptor(); + } - callback(null, defaultResource); - }); + callback(null, defaultResource); }); }; diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 51a72793700..4885f83bb76 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -35,7 +35,6 @@ describe('metadata', function() { var Metadata; var metadata; - var PROJECT_ID = 'project-id'; var LOGGING; var ENV_CACHED = extend({}, process.env); @@ -77,10 +76,9 @@ describe('metadata', function() { }); it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getCloudFunctionDescriptor(PROJECT_ID), { + assert.deepEqual(Metadata.getCloudFunctionDescriptor(), { type: 'cloud_function', labels: { - project_id: PROJECT_ID, function_name: FUNCTION_NAME, region: SUPERVISOR_REGION } @@ -100,10 +98,9 @@ describe('metadata', function() { }); it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getGAEDescriptor(PROJECT_ID), { + assert.deepEqual(Metadata.getGAEDescriptor(), { type: 'gae_app', labels: { - project_id: PROJECT_ID, module_id: GAE_SERVICE, version_id: GAE_VERSION } @@ -113,7 +110,7 @@ describe('metadata', function() { it('should use GAE_MODULE_NAME for module_id', function() { delete process.env.GAE_SERVICE; - var moduleId = Metadata.getGAEDescriptor(PROJECT_ID).labels.module_id; + var moduleId = Metadata.getGAEDescriptor().labels.module_id; assert.strictEqual(moduleId, GAE_MODULE_NAME); }); }); @@ -124,13 +121,12 @@ describe('metadata', function() { it('should return the correct descriptor', function(done) { instanceArgsOverride = [null, null, CLUSTER_NAME]; - Metadata.getGKEDescriptor(PROJECT_ID, function(err, descriptor) { + Metadata.getGKEDescriptor(function(err, descriptor) { assert.ifError(err); assert.deepEqual(descriptor, { type: 'container', labels: { - cluster_name: CLUSTER_NAME, - project_id: PROJECT_ID + cluster_name: CLUSTER_NAME } }); done(); @@ -141,7 +137,7 @@ describe('metadata', function() { var FAKE_ERROR = new Error(); instanceArgsOverride = [ FAKE_ERROR ]; - Metadata.getGKEDescriptor(PROJECT_ID, function(err) { + Metadata.getGKEDescriptor(function(err) { assert.strictEqual(err, FAKE_ERROR); done(); }); @@ -150,56 +146,21 @@ describe('metadata', function() { describe('getGCEDescriptor', function() { it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getGCEDescriptor(PROJECT_ID), { - type: 'gce_instance', - labels: { - project_id: PROJECT_ID - } + assert.deepEqual(Metadata.getGCEDescriptor(), { + type: 'gce_instance' }); }); }); describe('getGlobalDescriptor', function() { it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getGlobalDescriptor(PROJECT_ID), { - type: 'global', - labels: { - project_id: PROJECT_ID - } + assert.deepEqual(Metadata.getGlobalDescriptor(), { + type: 'global' }); }); }); describe('getDefaultResource', function() { - var RETURNED_PROJECT_ID = 'project-id'; - - beforeEach(function() { - metadata.logging.auth.getProjectId = function(callback) { - callback(null, RETURNED_PROJECT_ID); - }; - }); - - it('should get the project ID', function(done) { - metadata.logging.auth.getProjectId = function() { - done(); - }; - - metadata.getDefaultResource(assert.ifError); - }); - - it('should return error from getProjectId', function(done) { - var error = new Error('Error.'); - - metadata.logging.auth.getProjectId = function(callback) { - callback(error); - }; - - metadata.getDefaultResource(function(err) { - assert.strictEqual(err, error); - done(); - }); - }); - it('should get the environment from auth client', function(done) { metadata.logging.auth.getEnvironment = function() { done(); @@ -213,8 +174,7 @@ describe('metadata', function() { it('should return correct descriptor', function(done) { var DESCRIPTOR = {}; - Metadata.getGAEDescriptor = function(projectId) { - assert.strictEqual(projectId, RETURNED_PROJECT_ID); + Metadata.getGAEDescriptor = function() { return DESCRIPTOR; }; @@ -237,8 +197,7 @@ describe('metadata', function() { it('should return correct descriptor', function(done) { var DESCRIPTOR = {}; - Metadata.getCloudFunctionDescriptor = function(projectId) { - assert.strictEqual(projectId, RETURNED_PROJECT_ID); + Metadata.getCloudFunctionDescriptor = function() { return DESCRIPTOR; }; @@ -261,8 +220,7 @@ describe('metadata', function() { it('should return correct descriptor', function(done) { var DESCRIPTOR = {}; - Metadata.getGCEDescriptor = function(projectId) { - assert.strictEqual(projectId, RETURNED_PROJECT_ID); + Metadata.getGCEDescriptor = function() { return DESCRIPTOR; }; @@ -297,8 +255,7 @@ describe('metadata', function() { assert.deepStrictEqual(defaultResource, { type: 'container', labels: { - cluster_name: CLUSTER_NAME, - project_id: RETURNED_PROJECT_ID + cluster_name: CLUSTER_NAME } }); done(); @@ -310,8 +267,7 @@ describe('metadata', function() { it('should return correct descriptor', function(done) { var DESCRIPTOR = {}; - Metadata.getGlobalDescriptor = function(projectId) { - assert.strictEqual(projectId, RETURNED_PROJECT_ID); + Metadata.getGlobalDescriptor = function() { return DESCRIPTOR; }; From f4e7ccbe1f30e7f400d0aa5643e471c3293991ca Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 4 Aug 2017 13:58:31 -0700 Subject: [PATCH 0098/1029] logging: provide instance_id in default GCE resource (#2509) --- handwritten/logging/src/metadata.js | 38 +++++++++++++++----------- handwritten/logging/test/metadata.js | 41 ++++++++++++++++++++++------ 2 files changed, 54 insertions(+), 25 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 2c46e1f2367..18aacffccb1 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -75,12 +75,23 @@ Metadata.getGAEDescriptor = function() { * * @private * + * @param {function} callback - The callback function. * @return {object} */ -Metadata.getGCEDescriptor = function() { - return { - type: 'gce_instance' - }; +Metadata.getGCEDescriptor = function(callback) { + gcpMetadata.instance('id', function(err, _, instanceId) { + if (err) { + callback(err); + return; + } + + callback(null, { + type: 'gce_instance', + labels: { + instance_id: instanceId + } + }); + }); }; /** @@ -130,22 +141,17 @@ Metadata.prototype.getDefaultResource = function(callback) { this.logging.auth.getEnvironment(function(err, env) { if (env.IS_CONTAINER_ENGINE) { Metadata.getGKEDescriptor(callback); - return; - } - - var defaultResource; - - if (env.IS_APP_ENGINE) { - defaultResource = Metadata.getGAEDescriptor(); + } else if (env.IS_APP_ENGINE) { + callback(null, Metadata.getGAEDescriptor()); } else if (env.IS_CLOUD_FUNCTION) { - defaultResource = Metadata.getCloudFunctionDescriptor(); + callback(null, Metadata.getCloudFunctionDescriptor()); } else if (env.IS_COMPUTE_ENGINE) { - defaultResource = Metadata.getGCEDescriptor(); + // Test for compute engine should be done after all the rest - everything + // runs on top of compute engine. + Metadata.getGCEDescriptor(callback); } else { - defaultResource = Metadata.getGlobalDescriptor(); + callback(null, Metadata.getGlobalDescriptor()); } - - callback(null, defaultResource); }); }; diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 4885f83bb76..e39bf42777c 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -145,9 +145,30 @@ describe('metadata', function() { }); describe('getGCEDescriptor', function() { - it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getGCEDescriptor(), { - type: 'gce_instance' + var INSTANCE_ID = 'fake-instance-id'; + + it('should return the correct descriptor', function(done) { + instanceArgsOverride = [null, null, INSTANCE_ID]; + + Metadata.getGCEDescriptor(function(err, descriptor) { + assert.ifError(err); + assert.deepEqual(descriptor, { + type: 'gce_instance', + labels: { + instance_id: INSTANCE_ID + } + }); + done(); + }); + }); + + it('should return error on failure to acquire metadata', function(done) { + var FAKE_ERROR = new Error(); + instanceArgsOverride = [ FAKE_ERROR ]; + + Metadata.getGCEDescriptor(function(err) { + assert.strictEqual(err, FAKE_ERROR); + done(); }); }); }); @@ -218,11 +239,8 @@ describe('metadata', function() { describe('compute engine', function() { it('should return correct descriptor', function(done) { - var DESCRIPTOR = {}; - - Metadata.getGCEDescriptor = function() { - return DESCRIPTOR; - }; + var INSTANCE_ID = 'overridden-value'; + instanceArgsOverride = [null, null, INSTANCE_ID]; metadata.logging.auth.getEnvironment = function(callback) { callback(null, { @@ -232,7 +250,12 @@ describe('metadata', function() { metadata.getDefaultResource(function(err, defaultResource) { assert.ifError(err); - assert.strictEqual(defaultResource, DESCRIPTOR); + assert.deepStrictEqual(defaultResource, { + type: 'gce_instance', + labels: { + instance_id: INSTANCE_ID + } + }); done(); }); }); From 57624a2a76acfb7c30193b91c57fe5fd235e555e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 8 Aug 2017 08:38:55 -0400 Subject: [PATCH 0099/1029] logging @ 1.0.5 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index eabe6f69fbd..ad7dfbb5b80 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "1.0.4", + "version": "1.0.5", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From 4a6284df0f3b6293d26d9532aec7800eee97a7a1 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 10 Aug 2017 09:03:04 -0400 Subject: [PATCH 0100/1029] docs (logging): fix incorrect variable name Fixes #2521 --- handwritten/logging/src/entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index a494ff5a7a7..f8175041bc8 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -69,7 +69,7 @@ var eventId = new EventId(); * }); * * syslog.alert(entry, function(err, apiResponse) { - * if (!error) { + * if (!err) { * // Log entry inserted successfully. * } * }); From 16faaefa7bacf7b619d039fc71437f2d6a40d210 Mon Sep 17 00:00:00 2001 From: Ernest Landrito Date: Thu, 10 Aug 2017 06:19:59 -0700 Subject: [PATCH 0101/1029] Logging: allow for camelcase resource labels (#2520) --- handwritten/logging/package.json | 1 + handwritten/logging/src/log.js | 4 +++ handwritten/logging/system-test/logging.js | 12 ++++++++ handwritten/logging/test/log.js | 33 ++++++++++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ad7dfbb5b80..00bacb2b76e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,6 +63,7 @@ "google-proto-files": "^0.12.0", "is": "^3.0.1", "pumpify": "^1.3.5", + "snakecase-keys": "^1.1.0", "stream-events": "^1.0.1", "string-format-obj": "^1.0.0", "through2": "^2.0.3" diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 226d6171c57..acde7b57e46 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -24,6 +24,7 @@ var arrify = require('arrify'); var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); +var snakeCaseKeys = require('snakecase-keys'); /** * @type {module:logging/entry} @@ -591,6 +592,9 @@ Log.prototype.write = function(entry, options, callback) { writeWithResource(resource); }); } else { + if (options.resource.labels) { + options.resource.labels = snakeCaseKeys(options.resource.labels); + } writeWithResource(options.resource); } diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 753023928b3..7fa50aa4864 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -505,6 +505,18 @@ describe('Logging', function() { }); }); + it('should write a log with camelcase resource label keys', function(done) { + log.write(logEntries, { + resource: { + type: 'gce_instance', + labels: { + zone: 'global', + instanceId: '3' + } + } + }, done); + }); + it('should write to a log with alert helper', function(done) { log.alert(logEntries, options, done); }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index bd1bb47a8cd..1deed4debd3 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -362,6 +362,39 @@ describe('Log', function() { log.write(ENTRY, optionsWithResource, done); }); + it('should transform camelcase label keys to snake case', function(done) { + var CUSTOM_RESOURCE = { + labels: { + camelCaseKey: 'camel-case-key-val' + } + }; + var EXPECTED_RESOURCE = { + labels: { + camel_case_key: 'camel-case-key-val' + } + }; + var optionsWithResource = extend({}, OPTIONS, { + resource: CUSTOM_RESOURCE + }); + + log.logging.request = function(config, callback) { + assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.method, 'writeLogEntries'); + + assert.deepEqual(config.reqOpts, { + logName: log.formattedName_, + entries: [ENTRY], + resource: EXPECTED_RESOURCE + }); + + assert.strictEqual(config.gaxOpts, undefined); + + callback(); + }; + + log.write(ENTRY, optionsWithResource, done); + }); + it('should make the correct API request', function(done) { log.logging.request = function(config, callback) { assert.strictEqual(config.client, 'loggingServiceV2Client'); From b7e5015d6f2ff5545664757e30e69a5483f984c3 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 10 Aug 2017 13:17:03 -0400 Subject: [PATCH 0102/1029] logging (sys test): increase consistency delay --- handwritten/logging/system-test/logging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 7fa50aa4864..67141d03379 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -32,7 +32,7 @@ var Logging = require('../'); describe('Logging', function() { var TESTS_PREFIX = 'gcloud-logging-test'; - var WRITE_CONSISTENCY_DELAY_MS = 90000; + var WRITE_CONSISTENCY_DELAY_MS = 120000; var bigQuery = bigqueryLibrary(env); var pubsub = pubsubLibrary(env); From e399b4af4fb2d590772a6c12543b43e27bc79310 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 11 Aug 2017 13:11:08 -0700 Subject: [PATCH 0103/1029] logging: use correct case for cluster-name attribtue (#2523) --- handwritten/logging/src/metadata.js | 9 ++++---- handwritten/logging/test/metadata.js | 34 ++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 18aacffccb1..73e02ac22d3 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -103,16 +103,17 @@ Metadata.getGCEDescriptor = function(callback) { * @return {object} */ Metadata.getGKEDescriptor = function(callback) { - gcpMetadata.instance('attributes/clusterName', function(err, _, clusterName) { - if (err) { - callback(err); + gcpMetadata.instance('attributes/cluster-name', function(e, _, clusterName) { + if (e) { + callback(e); return; } callback(null, { type: 'container', labels: { - // TODO(ofrobots): it would be good to include the namespace_id as well. + // TODO(ofrobots): it would be good to include the namespace_id as + // well. cluster_name: clusterName } }); diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index e39bf42777c..7297b63743e 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -20,11 +20,15 @@ var assert = require('assert'); var extend = require('extend'); var proxyquire = require('proxyquire'); -var instanceArgsOverride; +var instanceOverride; var fakeGcpMetadata = { instance: function(path, cb) { setImmediate(function() { - var args = instanceArgsOverride || [null, null, 'fake-instance-value']; + if (instanceOverride && instanceOverride.path) { + assert.strictEqual(path, instanceOverride.path); + } + var args = (instanceOverride && instanceOverride.args) || + [null, null, 'fake-instance-value']; cb.apply(fakeGcpMetadata, args); }); } @@ -53,7 +57,7 @@ describe('metadata', function() { }; extend(Metadata, MetadataCached); metadata = new Metadata(LOGGING); - instanceArgsOverride = null; + instanceOverride = null; }); afterEach(function() { @@ -119,7 +123,10 @@ describe('metadata', function() { var CLUSTER_NAME = 'gke-cluster-name'; it('should return the correct descriptor', function(done) { - instanceArgsOverride = [null, null, CLUSTER_NAME]; + instanceOverride = { + path: 'attributes/cluster-name', + args: [null, null, CLUSTER_NAME] + }; Metadata.getGKEDescriptor(function(err, descriptor) { assert.ifError(err); @@ -135,7 +142,7 @@ describe('metadata', function() { it('should return error on failure to acquire metadata', function(done) { var FAKE_ERROR = new Error(); - instanceArgsOverride = [ FAKE_ERROR ]; + instanceOverride = { args: [ FAKE_ERROR ] }; Metadata.getGKEDescriptor(function(err) { assert.strictEqual(err, FAKE_ERROR); @@ -148,7 +155,10 @@ describe('metadata', function() { var INSTANCE_ID = 'fake-instance-id'; it('should return the correct descriptor', function(done) { - instanceArgsOverride = [null, null, INSTANCE_ID]; + instanceOverride = { + path: 'id', + args: [null, null, INSTANCE_ID] + }; Metadata.getGCEDescriptor(function(err, descriptor) { assert.ifError(err); @@ -164,7 +174,7 @@ describe('metadata', function() { it('should return error on failure to acquire metadata', function(done) { var FAKE_ERROR = new Error(); - instanceArgsOverride = [ FAKE_ERROR ]; + instanceOverride = { args: [ FAKE_ERROR ] }; Metadata.getGCEDescriptor(function(err) { assert.strictEqual(err, FAKE_ERROR); @@ -240,7 +250,10 @@ describe('metadata', function() { describe('compute engine', function() { it('should return correct descriptor', function(done) { var INSTANCE_ID = 'overridden-value'; - instanceArgsOverride = [null, null, INSTANCE_ID]; + instanceOverride = { + path: 'id', + args: [null, null, INSTANCE_ID] + }; metadata.logging.auth.getEnvironment = function(callback) { callback(null, { @@ -264,7 +277,10 @@ describe('metadata', function() { describe('container engine', function() { it('should return correct descriptor', function(done) { var CLUSTER_NAME = 'overridden-value'; - instanceArgsOverride = [null, null, CLUSTER_NAME]; + instanceOverride = { + path: 'attributes/cluster-name', + args: [null, null, CLUSTER_NAME] + }; metadata.logging.auth.getEnvironment = function(callback) { callback(null, { From 56cbac362a749ac0cd5f930f8c47da43c8b243d9 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 18 Aug 2017 08:39:08 -0400 Subject: [PATCH 0104/1029] logging: restore library version to api-client header (#2540) --- handwritten/logging/src/index.js | 5 ++++- handwritten/logging/test/index.js | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 3ccce7eb92b..3894d8431eb 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -30,6 +30,7 @@ var pumpify = require('pumpify'); var streamEvents = require('stream-events'); var through = require('through2'); +var PKG = require('../package.json'); var v2 = require('./v2'); /** @@ -72,7 +73,9 @@ function Logging(options) { } var options_ = extend({ - scopes: v2.ALL_SCOPES + scopes: v2.ALL_SCOPES, + libName: 'gccl', + libVersion: PKG.version }, options); this.api = {}; diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index e1a9311df1d..2b333b873a4 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -23,6 +23,7 @@ var proxyquire = require('proxyquire'); var through = require('through2'); var util = require('@google-cloud/common').util; +var PKG = require('../package.json'); var v2 = require('../src/v2/index.js'); var extended = false; @@ -181,7 +182,9 @@ describe('Logging', function() { googleAutoAuthOverride = function(options_) { assert.deepEqual(options_, extend({ - scopes: v2.ALL_SCOPES + scopes: v2.ALL_SCOPES, + libName: 'gccl', + libVersion: PKG.version }, options)); return fakeGoogleAutoAuthInstance; }; @@ -201,7 +204,9 @@ describe('Logging', function() { assert.notStrictEqual(logging.options, options); assert.deepEqual(logging.options, extend({ - scopes: v2.ALL_SCOPES + scopes: v2.ALL_SCOPES, + libName: 'gccl', + libVersion: PKG.version }, options)); }); From ca6d81c4858872d14ef95e9385bcac131a303d7c Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 21 Aug 2017 10:17:07 -0400 Subject: [PATCH 0105/1029] logging @ 1.0.6 tagged. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 00bacb2b76e..75359948722 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "1.0.5", + "version": "1.0.6", "author": "Google Inc.", "description": "Stackdriver Logging Client Library for Node.js", "contributors": [ From c6d83207ae76eb4029a1ca34c9a1e4389a80a4e3 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Sep 2017 16:53:41 -0700 Subject: [PATCH 0106/1029] Rename COPYING to LICENSE. (#2605) * Rename COPYING to LICENSE. The open source team is asking that we use LICENSE for the license filename consistently across our repos. * Fix references of COPYING to LICENSE. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 75359948722..9bea1e25ba3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -34,7 +34,7 @@ "src", "AUTHORS", "CONTRIBUTORS", - "COPYING" + "LICENSE" ], "repository": "googlecloudplatform/google-cloud-node", "keywords": [ From ff2c59786b3164a26b7613da55aecc586e011ed4 Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 5 Oct 2017 14:56:38 -0400 Subject: [PATCH 0107/1029] Repository Migration (#1) This commit: * converts documentation to JSDoc * adds a new CI structure * adds prettier and ESLint and reformats code accordingly --- handwritten/logging/.appveyor.yml | 23 + handwritten/logging/.circleci/config.yml | 221 +++++++++ handwritten/logging/.circleci/key.json.enc | Bin 0 -> 2368 bytes handwritten/logging/.cloud-repo-tools.json | 23 + handwritten/logging/.eslintignore | 4 + handwritten/logging/.eslintrc.yml | 13 + handwritten/logging/.github/CONTRIBUTING.md | 53 ++ handwritten/logging/.github/ISSUE_TEMPLATE.md | 28 ++ .../logging/.github/PULL_REQUEST_TEMPLATE.md | 5 + handwritten/logging/.gitignore | 13 + handwritten/logging/.jsdoc.js | 45 ++ handwritten/logging/.nycrc | 26 + handwritten/logging/.prettierrc | 8 + handwritten/logging/CODE_OF_CONDUCT.md | 43 ++ handwritten/logging/LICENSE | 201 ++++++++ handwritten/logging/README.md | 201 ++++---- handwritten/logging/package.json | 37 +- handwritten/logging/src/entry.js | 13 +- handwritten/logging/src/index.js | 240 +++++---- handwritten/logging/src/log.js | 83 ++-- handwritten/logging/src/metadata.js | 18 +- handwritten/logging/src/sink.js | 96 ++-- .../src/v2/config_service_v2_client.js | 107 ++-- .../src/v2/doc/doc_google_api_label.js | 2 +- .../doc/doc_google_api_monitored_resource.js | 2 +- .../doc_google_logging_type_http_request.js | 2 +- .../src/v2/doc/doc_google_protobuf_any.js | 2 +- .../v2/doc/doc_google_protobuf_duration.js | 2 +- .../v2/doc/doc_google_protobuf_timestamp.js | 2 +- .../logging/src/v2/doc/doc_log_entry.js | 2 +- handwritten/logging/src/v2/doc/doc_logging.js | 2 +- .../logging/src/v2/doc/doc_logging_config.js | 7 +- .../logging/src/v2/doc/doc_logging_metrics.js | 7 +- handwritten/logging/src/v2/index.js | 18 +- .../src/v2/logging_service_v2_client.js | 162 ++++--- .../src/v2/metrics_service_v2_client.js | 128 +++-- handwritten/logging/system-test/.eslintrc.yml | 5 + handwritten/logging/system-test/logging.js | 459 ++++++++++-------- handwritten/logging/test/.eslintrc.yml | 5 + handwritten/logging/test/entry.js | 24 +- handwritten/logging/test/index.js | 211 ++++---- handwritten/logging/test/log.js | 64 ++- handwritten/logging/test/metadata.js | 61 +-- handwritten/logging/test/sink.js | 20 +- 44 files changed, 1851 insertions(+), 837 deletions(-) create mode 100644 handwritten/logging/.appveyor.yml create mode 100644 handwritten/logging/.circleci/config.yml create mode 100644 handwritten/logging/.circleci/key.json.enc create mode 100644 handwritten/logging/.cloud-repo-tools.json create mode 100644 handwritten/logging/.eslintignore create mode 100644 handwritten/logging/.eslintrc.yml create mode 100644 handwritten/logging/.github/CONTRIBUTING.md create mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE.md create mode 100644 handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 handwritten/logging/.gitignore create mode 100644 handwritten/logging/.jsdoc.js create mode 100644 handwritten/logging/.nycrc create mode 100644 handwritten/logging/.prettierrc create mode 100644 handwritten/logging/CODE_OF_CONDUCT.md create mode 100644 handwritten/logging/LICENSE create mode 100644 handwritten/logging/system-test/.eslintrc.yml create mode 100644 handwritten/logging/test/.eslintrc.yml diff --git a/handwritten/logging/.appveyor.yml b/handwritten/logging/.appveyor.yml new file mode 100644 index 00000000000..babe1d587f4 --- /dev/null +++ b/handwritten/logging/.appveyor.yml @@ -0,0 +1,23 @@ +environment: + matrix: + - nodejs_version: 4 + - nodejs_version: 6 + - nodejs_version: 7 + - nodejs_version: 8 + +install: + - ps: Install-Product node $env:nodejs_version + - npm install -g npm # Force using the latest npm to get dedupe during install + - set PATH=%APPDATA%\npm;%PATH% + - npm install --force --ignore-scripts + +test_script: + - node --version + - npm --version + - npm rebuild + - npm test + +build: off + +matrix: + fast_finish: true diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml new file mode 100644 index 00000000000..19849b9e8cd --- /dev/null +++ b/handwritten/logging/.circleci/config.yml @@ -0,0 +1,221 @@ +--- +# "Include" for unit tests definition. +unit_tests: &unit_tests + steps: + - checkout + - run: + name: Install modules and dependencies. + command: npm install + - run: + name: Run unit tests. + command: npm test + - run: + name: Submit coverage data to codecov. + command: node_modules/.bin/codecov + when: always + +version: 2.0 +workflows: + version: 2 + tests: + jobs: + - node4: + filters: + tags: + only: /.*/ + - node6: + filters: + tags: + only: /.*/ + - node7: + filters: + tags: + only: /.*/ + - node8: + filters: + tags: + only: /.*/ + - lint: + requires: + - node4 + - node6 + - node7 + - node8 + filters: + tags: + only: /.*/ + - docs: + requires: + - node4 + - node6 + - node7 + - node8 + filters: + tags: + only: /.*/ + - system_tests: + requires: + - lint + - docs + filters: + branches: + only: master + tags: + only: /^v[\d.]+$/ + - sample_tests: + requires: + - lint + - docs + filters: + branches: + only: master + tags: + only: /^v[\d.]+$/ + - publish_npm: + requires: + - system_tests + - sample_tests + filters: + branches: + ignore: /.*/ + tags: + only: /^v[\d.]+$/ + +jobs: + node4: + docker: + - image: node:4 + steps: + - checkout + - run: + name: Install modules and dependencies. + command: npm install --unsafe-perm + - run: + name: Run unit tests. + command: npm test + - run: + name: Submit coverage data to codecov. + command: node_modules/.bin/codecov + when: always + node6: + docker: + - image: node:6 + <<: *unit_tests + node7: + docker: + - image: node:7 + <<: *unit_tests + node8: + docker: + - image: node:8 + <<: *unit_tests + + lint: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Install modules and dependencies. + command: npm install + - run: + name: Link the module being tested to the samples. + command: | + cd samples/ + npm install + npm link @google-cloud/logging + cd .. + - run: + name: Run linting. + command: npm run lint + + docs: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Install modules and dependencies. + command: npm install + - run: + name: Build documentation. + command: npm run docs + + sample_tests: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Decrypt credentials. + command: | + openssl aes-256-cbc -d -in .circleci/key.json.enc \ + -out .circleci/key.json \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + - run: + name: Install and link the module. + command: | + npm install + npm link + - run: + name: Link the module being tested to the samples. + command: | + cd samples/ + npm install + npm link @google-cloud/storage + cd .. + - run: + name: Run sample tests. + command: npm run samples-test + environment: + GCLOUD_PROJECT: long-door-651 + GOOGLE_APPLICATION_CREDENTIALS: /var/storage/.circleci/key.json + - run: + name: Remove unencrypted key. + command: rm .circleci/key.json + when: always + working_directory: /var/storage/ + + system_tests: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Decrypt credentials. + command: | + openssl aes-256-cbc -d -in .circleci/key.json.enc \ + -out .circleci/key.json \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + - run: + name: Decrypt second account credentials (storage-specific). + command: | + openssl aes-256-cbc -d -in .circleci/no-whitelist-key.json.enc \ + -out .circleci/no-whitelist-key.json \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + - run: + name: Install modules and dependencies. + command: npm install + - run: + name: Run system tests. + command: npm run system-test + environment: + GCN_STORAGE_2ND_PROJECT_ID: gcloud-node-whitelist-ci-tests + GCN_STORAGE_2ND_PROJECT_KEY: .circleci/no-whitelist-key.json + GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json + - run: + name: Remove unencrypted key. + command: rm .circleci/key.json + when: always + + publish_npm: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Set NPM authentication. + command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + - run: + name: Publish the module to npm. + command: npm publish diff --git a/handwritten/logging/.circleci/key.json.enc b/handwritten/logging/.circleci/key.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..87aa15c6684e24140d3cae0bc7755e9e72a41740 GIT binary patch literal 2368 zcmV-G3BUGJVQh3|WM5yM*hGFbh}#Z=IM@UkxXz1(R;deJh`8^%iDpT^D?eHTS@MjK z;!SN}2T*!BThyY1uQZ}T42XD5APY|`@dR{u9dHG!9q)-559YvsM$J81E9N|wkP1{d zt>KbEE6nVKod^)R+!9OFRvl?WGprXko#ZDitVMUsYT3uhi?()3+;-Het>z}#n=6&` z13vzO)m&qd2&>_hL0#gf%&u6Evg$tS1J->Hoc=axx{6f0KH4nOtw@)2yl0}-cn=~o z6w9IJX-_w?0ES$$_g*%VImHo z5FtN2Hm~k_+Kgl8_o#%skZ0>Q5hkX^(9L56&bN5QRzJ2`d|s&5=?80!aEq$& zY?3%pZ`76v4V<%Ng^kt9F~ON`p0^4ZsPlDI(+;`nyg=`#C?q9n+$)4iqt zoAZCl8~nz1M#n#3X>{Rr)@|LU9Bne7k-hh&+M}=Ek6|nSMAbqk zh1M1U5c-uD1bEoNq{%ZAKAe1T7$d|Xeh>ZC?4g^_WHlagB(w2I=3SL)YoaG>h;&*2 z%$g)qbjz$=~@Dq0dQ^bWs{zmUPvVW3E@& zwo%~r5H|81Z=_%iHmr(E`KMU3TJ7_v^-j&MpBWn3IxXb5Q@da?i3r~bGW!dAie6PO zmoD6p*}=5oLzOjg(=ZH2nsaP3=*{lfo{+Phk-78GE@T-fYKVA6)K|cv=Bvsf@Dde4 z*q&IV-6+!2)T?vI*9XgJID@sw8JIJ$)k1b;N#hi2Y}{roKk|tPIEiW>^DBQ%HQzZI z%TpYt)%*suuH;o$HMT2+Na92*CRv&kn$WpKv*vNG-JtSsQdu;&-&DP8Pfi+Nd$JEY z`unq@yB#2_V8y;iQPr2fIp)r=b0IxVORVOj3h{o_-#=@u6$0BN&wvBCL{<{_-f5I)54^kP=*Mv4D>w(xKL@ z>|KTqPRL*Jjjy#|DcDV17K~W!YchlaoWzWgD7E*G1UvZTF%oXzv*Xp$aZmSVP zN&z(Jwz`)QsF^u|7brHl?JDxWR}FhiNej7aCJ^)TwhFYRH5@D`G2!-gUR!surQBQ z_#68)5z$^0pJnDZbXVIqdH8+nix6BP^n`h}F;JdI?TW=e8$WJU#b?Tl5If)O%lCb< zvBZPlwm=DkXby@R-Ze$R9B`cHb9bDOg&y~G&OE;+2(y&}UXeLHc-1DHu^eg({ZUC; zh766|08=V`WA+Uo%3JOf=cO>&bRcw~r-l6WZDj7iZ`w^)v+oMbf$E9mv<(p+ax~^r z?2BCsW?Nyc;-iR;&a%1)T#^MP~ zb@SYu>2s(;Tl~p}k$2Xg0Y?sc#=CXu?uS!Xv8KkLPTAh=+yY1NeMQcWMmx0{ky`uj zKkau*aN}TT(VR!PiO!Q#6$cuXaLu?`}25WjO*_S&3 z38~F)D#K15XHBarypTe_P|*4cf#n<45@GM*Ht~Nm{dTD|c zP+F|HP~*Fm&W?j-%#wZ9!f4w8ZE15~3a``|0>Qmp5G`G>G}5piK#%ubwBidSAT?~j%c>uovg`pFLc^U2a2`K%r_{4rU0=EQBH?A%|E zlf&0Hx@n*?Z|eAznrtzq0AhDx;O({A4Z*gY#w>|ew^Ht1a7zgE)5AJ)yA+nC2FIL8 zh2dE?a6ko+nc`f--eZ!Bz3N61?6LP(I@ROD(iOYss)26^{gN-JL9Gy!OxU?CfLvnE mOx$0ooXh>bkppWbrj$jPeGN?Ab)wv-c~l5*KnmrifLr{EDYFs) literal 0 HcmV?d00001 diff --git a/handwritten/logging/.cloud-repo-tools.json b/handwritten/logging/.cloud-repo-tools.json new file mode 100644 index 00000000000..eedc4410c2f --- /dev/null +++ b/handwritten/logging/.cloud-repo-tools.json @@ -0,0 +1,23 @@ +{ + "requiresKeyFile": true, + "requiresProjectId": true, + "product": "logging", + "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/logging/latest/", + "release_quality": "ga", + "samples": [ + { + "id": "logs", + "name": "Logs", + "file": "logs.js", + "docs_link": "https://cloud.google.com/logging/docs", + "usage": "node logs --help" + }, + { + "id": "sinks", + "name": "Sinks", + "file": "sinks.js", + "docs_link": "https://cloud.google.com/logging/docs", + "usage": "node sinks --help" + } + ] +} diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore new file mode 100644 index 00000000000..dcd382328c0 --- /dev/null +++ b/handwritten/logging/.eslintignore @@ -0,0 +1,4 @@ +node_modules/* +samples/node_modules/* +**/doc/*.js +src/v*/**/*.js diff --git a/handwritten/logging/.eslintrc.yml b/handwritten/logging/.eslintrc.yml new file mode 100644 index 00000000000..bed57fbc42c --- /dev/null +++ b/handwritten/logging/.eslintrc.yml @@ -0,0 +1,13 @@ +--- +extends: + - 'eslint:recommended' + - 'plugin:node/recommended' + - prettier +plugins: + - node + - prettier +rules: + prettier/prettier: error + block-scoped-var: error + eqeqeq: error + no-warning-comments: warn diff --git a/handwritten/logging/.github/CONTRIBUTING.md b/handwritten/logging/.github/CONTRIBUTING.md new file mode 100644 index 00000000000..aaeac9f9483 --- /dev/null +++ b/handwritten/logging/.github/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA] + (https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA] + (https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Submit a pull request. + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + npm test + +[setup]: https://cloud.google.com/nodejs/docs/setup diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE.md b/handwritten/logging/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000000..e87d8250499 --- /dev/null +++ b/handwritten/logging/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,28 @@ +Thanks for stopping by to let us know something could be better! + +Please run down the following list and make sure you've tried the usual "quick +fixes": + + - Search the issues already opened: https://github.com/googleapis/nodejs-logging/issues + - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js + - Check our Troubleshooting guide: https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/troubleshooting + - Check our FAQ: https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/faq + +If you are still having issues, please be sure to include as much information as +possible: + +#### Environment details + + - OS: + - Node.js version: + - npm version: + - @google-cloud/logging version: + +#### Steps to reproduce + + 1. ??? + 2. ??? + +Following these steps will guarantee the quickest resolution possible. + +Thanks! diff --git a/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md b/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..809750308d7 --- /dev/null +++ b/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +Fixes # (it's a good idea to open an issue first for discussion) + +- [ ] Tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore new file mode 100644 index 00000000000..428bfca5058 --- /dev/null +++ b/handwritten/logging/.gitignore @@ -0,0 +1,13 @@ +**/*.log +**/node_modules +.coverage +.nyc_output +docs/ +packages/google-cloud/README.md +packages/*/AUTHORS +packages/*/CONTRIBUTORS +packages/*/COPYING +system-test/secrets.js +system-test/*key.json +*.lock +*-lock.json diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js new file mode 100644 index 00000000000..7ac73157c75 --- /dev/null +++ b/handwritten/logging/.jsdoc.js @@ -0,0 +1,45 @@ +/*! + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/ink-docstrap/template', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'src' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2017 Google, Inc.', + includeDate: false, + sourceFiles: false, + systemName: 'storage', + theme: 'lumen' + } +}; diff --git a/handwritten/logging/.nycrc b/handwritten/logging/.nycrc new file mode 100644 index 00000000000..a1a8e6920ce --- /dev/null +++ b/handwritten/logging/.nycrc @@ -0,0 +1,26 @@ +{ + "report-dir": "./.coverage", + "exclude": [ + "src/*{/*,/**/*}.js", + "src/*/v*/*.js", + "test/**/*.js" + ], + "watermarks": { + "branches": [ + 95, + 100 + ], + "functions": [ + 95, + 100 + ], + "lines": [ + 95, + 100 + ], + "statements": [ + 95, + 100 + ] + } +} diff --git a/handwritten/logging/.prettierrc b/handwritten/logging/.prettierrc new file mode 100644 index 00000000000..df6eac07446 --- /dev/null +++ b/handwritten/logging/.prettierrc @@ -0,0 +1,8 @@ +--- +bracketSpacing: false +printWidth: 80 +semi: true +singleQuote: true +tabWidth: 2 +trailingComma: es5 +useTabs: false diff --git a/handwritten/logging/CODE_OF_CONDUCT.md b/handwritten/logging/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..46b2a08ea6d --- /dev/null +++ b/handwritten/logging/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/handwritten/logging/LICENSE b/handwritten/logging/LICENSE new file mode 100644 index 00000000000..1ba0da78c5e --- /dev/null +++ b/handwritten/logging/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014-2017 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. diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 2e1241fb730..e977a1cf5b0 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -1,123 +1,136 @@ -# @google-cloud/logging ([GA][versioning]) -> Google Stackdriver Logging Client Library for Node.js +Google Cloud Platform logo -This module allows you to work with the Stackdriver Logging API. If you are already using [`winston`][winston] -or [`Bunyan`][bunyan] for logging, you might want to check out [`@google-cloud/logging-winston`][logging-winston] and -[`@google-cloud/logging-bunyan`][logging-bunyan] as higher level starting points. +# Stackdriver Logging: Node.js Client -*Looking for more Google APIs than just Logging? You might want to check out [`google-cloud`][google-cloud].* +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-logging.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-logging) +[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-logging?svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-logging) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/repo-migration.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) -- [API Documentation][gcloud-logging-docs] -- [Official Documentation][cloud-logging-docs] +> Node.js idiomatic client for [Logging][product-docs]. +[Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. -```sh -$ npm install --save @google-cloud/logging -``` -```js -var logging = require('@google-cloud/logging')({ - projectId: 'grape-spaceship-123', - keyFilename: '/path/to/keyfile.json' -}); +* [Logging Node.js Client API Reference][client-docs] +* [Logging Documentation][product-docs] -// Create a sink using a Bucket as a destination. -// $ npm install --save @google-cloud/storage -var gcs = require('@google-cloud/storage')({ - projectId: 'grape-spaceship-123', - keyFilename: '/path/to/keyfile.json' -}); +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. -logging.createSink('my-new-sink', { - destination: gcs.bucket('my-sink') -}, function(err, sink) {}); - -// Write a critical entry to a log. -var syslog = logging.log('syslog'); - -var metadata = { - resource: { - type: 'gce_instance', - labels: { - zone: 'global', - instance_id: '3' - } - } -}; - -var entry = syslog.entry(metadata, { - delegate: process.env.user -}); +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained -syslog.critical(entry, function(err) {}); +**Table of contents:** -// Get all entries in your project. -logging.getEntries(function(err, entries) { - if (!err) { - // `entries` contains all of the entries from the logs in your project. - } -}); +* [QuickStart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) -// Promises are also supported by omitting callbacks. -logging.getEntries().then(function(data) { - var entries = data[0]; -}); +## Quickstart -// It's also possible to integrate with third-party Promise libraries. -var logging = require('@google-cloud/logging')({ - promise: require('bluebird') -}); -``` +### Before you begin +1. Select or create a Cloud Platform project. -## Authentication + [Go to the projects page][projects] -It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Cloud services. +1. Enable billing for your project. -### On Google Cloud Platform + [Enable billing][billing] -If you are running this client on Google Cloud Platform, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. +1. Enable the Stackdriver Logging API. -``` js -var logging = require('@google-cloud/logging')(); -// ...you're good to go! -``` + [Enable the API][enable_api] -### Elsewhere +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. -If you are not running this client on Google Cloud Platform, you need a Google Developers service account. To create a service account: +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid= +[auth]: https://cloud.google.com/docs/authentication/getting-started -1. Visit the [Google Developers Console][dev-console]. -2. Create a new project or click on an existing project. -3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services): - * Stackdriver Logging API -4. Navigate to **APIs & auth** > **Credentials** and then: - * If you want to use a new service account key, click on **Create credentials** and select **Service account key**. After the account key is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. - * If you want to generate a new service account key for an existing service account, click on **Generate new JSON key** and download the JSON key file. +### Installing the client library -``` js -var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' + npm install --save @google-cloud/logging -var logging = require('@google-cloud/logging')({ - projectId: projectId, +### Using the client library - // The path to your key file: - keyFilename: '/path/to/keyfile.json' +```javascript +// Imports the Google Cloud client library +const Logging = require('@google-cloud/logging'); - // Or the contents of the key file: - credentials: require('./path/to/keyfile.json') +// Your Google Cloud Platform project ID +const projectId = 'YOUR_PROJECT_ID'; + +// Instantiates a client +const logging = Logging({ + projectId: projectId }); -// ...you're good to go! +// The name of the log to write to +const logName = 'my-log'; +// Selects the log to write to +const log = logging.log(logName); + +// The data to write to the log +const text = 'Hello, world!'; +// The metadata associated with the entry +const metadata = { resource: { type: 'global' } }; +// Prepares a log entry +const entry = log.entry(metadata, text); + +// Writes the log entry +log.write(entry) + .then(() => { + console.log(`Logged: ${text}`); + }) + .catch((err) => { + console.error('ERROR:', err); + }); ``` +## Samples + +Samples are in the [`samples/`](https://github.com/blob/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Documentation | Source Code | +| --------------------------- | ---------------------------------- | --------------------------------- | +| Logs | [documentation](https://cloud.google.com/logging/docs) | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js) | +| Sinks | [documentation](https://cloud.google.com/logging/docs) | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. + +Please note that the auto-generated portions of the **GA** libraries (the ones +in modules such as `v1` or `v2`) are considered to be of **Beta** quality, even +if the libraries that wrap them are **GA**. + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](.github/CONTRIBUTING.md). + +## License + +Apache Version 2.0 + +See [LICENSE](LICENSE) -[versioning]: https://github.com/GoogleCloudPlatform/google-cloud-node#versioning -[google-cloud]: https://github.com/GoogleCloudPlatform/google-cloud-node/ -[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using -[dev-console]: https://console.developers.google.com/project -[gcloud-logging-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/logging -[cloud-logging-docs]: https://cloud.google.com/logging/docs -[winston]: https://github.com/winstonjs/winston -[bunyan]: https://github.com/trentm/node-bunyan -[logging-winston]: https://www.npmjs.com/package/@google-cloud/logging-winston -[logging-bunyan]: https://www.npmjs.com/package/@google-cloud/logging-bunyan +[client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest/ +[product-docs]: https://cloud.google.com/logging/docs diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9bea1e25ba3..f59d9c0324b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -36,7 +36,7 @@ "CONTRIBUTORS", "LICENSE" ], - "repository": "googlecloudplatform/google-cloud-node", + "repository": "googleapis/nodejs-logging", "keywords": [ "google apis client", "google api client", @@ -56,11 +56,11 @@ "@google-cloud/common-grpc": "^0.4.0", "arrify": "^1.0.0", "eventid": "^0.1.0", - "extend": "^3.0.0", - "gcp-metadata": "^0.2.0", + "extend": "^3.0.1", + "gcp-metadata": "^0.3.1", "google-auto-auth": "^0.7.1", - "google-gax": "^0.13.0", - "google-proto-files": "^0.12.0", + "google-gax": "^0.14.0", + "google-proto-files": "^0.13.1", "is": "^3.0.1", "pumpify": "^1.3.5", "snakecase-keys": "^1.1.0", @@ -70,19 +70,38 @@ }, "devDependencies": { "@google-cloud/bigquery": "*", + "@google-cloud/nodejs-repo-tools": "^2.0.4", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", - "async": "^2.1.4", + "async": "^2.5.0", + "codecov": "^2.3.0", + "eslint": "^4.7.2", + "eslint-config-prettier": "^2.6.0", + "eslint-plugin-node": "^5.2.0", + "eslint-plugin-prettier": "^2.3.1", + "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", + "intelli-espower-loader": "^1.0.1", + "jsdoc": "^3.5.5", "methmeth": "^1.0.0", - "mocha": "^3.0.1", + "mocha": "^4.0.0", + "nyc": "^11.2.1", + "power-assert": "^1.4.4", + "prettier": "^1.7.2", "propprop": "^0.3.0", "proxyquire": "^1.7.10", "uuid": "^3.0.1" }, "scripts": { + "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", + "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", + "test": "repo-tools test run --cmd npm -- run cover", + "docs": "jsdoc -c .jsdoc.js", + "prettier": "repo-tools exec -- prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", "publish-module": "node ../../scripts/publish.js logging", - "test": "mocha test/*.js", - "system-test": "mocha system-test/*.js --no-timeouts --bail" + "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --no-timeouts", + "samples-test": "cd samples/ && npm test && cd ../", + "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", + "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" }, "license": "Apache-2.0", "engines": { diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index f8175041bc8..a0237604052 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -85,9 +85,12 @@ var eventId = new EventId(); * }); */ function Entry(metadata, data) { - this.metadata = extend({ - timestamp: new Date() - }, metadata); + this.metadata = extend( + { + timestamp: new Date(), + }, + metadata + ); // JavaScript date has a very coarse granularity (millisecond), which makes // it quite likely that multiple log entries would have the same timestamp. @@ -146,7 +149,7 @@ Entry.prototype.toJSON = function(options) { if (is.object(this.data)) { entry.jsonPayload = commonGrpc.Service.objToStruct_(this.data, { removeCircular: !!options.removeCircular, - stringify: true + stringify: true, }); } else if (is.string(this.data)) { entry.textPayload = this.data; @@ -158,7 +161,7 @@ Entry.prototype.toJSON = function(options) { entry.timestamp = { seconds: secondsRounded, - nanos: Math.floor((seconds - secondsRounded) * 1e9) + nanos: Math.floor((seconds - secondsRounded) * 1e9), }; } diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 3894d8431eb..fcd7fdde568 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -72,16 +72,19 @@ function Logging(options) { return new Logging(options); } - var options_ = extend({ - scopes: v2.ALL_SCOPES, - libName: 'gccl', - libVersion: PKG.version - }, options); + var options_ = extend( + { + scopes: v2.ALL_SCOPES, + libName: 'gccl', + libVersion: PKG.version, + }, + options + ); this.api = {}; this.auth = googleAuth(options_); this.options = options_; - this.projectId = options.projectId || '{{projectId}}'; + this.projectId = this.options.projectId || '{{projectId}}'; } // jscs:disable maximumLineLength @@ -133,6 +136,10 @@ function Logging(options) { * var sink = data[0]; * var apiResponse = data[1]; * }); + * + * @example include:samples/sinks.js + * region_tag:logging_create_sink + * Another example: */ Logging.prototype.createSink = function(name, config, callback) { // jscs:enable maximumLineLength @@ -163,27 +170,30 @@ Logging.prototype.createSink = function(name, config, callback) { var reqOpts = { parent: 'projects/' + this.projectId, - sink: extend({}, config, { name: name }) + sink: extend({}, config, {name: name}), }; delete reqOpts.sink.gaxOptions; - this.request({ - client: 'configServiceV2Client', - method: 'createSink', - reqOpts: reqOpts, - gaxOpts: config.gaxOptions - }, function(err, resp) { - if (err) { - callback(err, null, resp); - return; - } + this.request( + { + client: 'configServiceV2Client', + method: 'createSink', + reqOpts: reqOpts, + gaxOpts: config.gaxOptions, + }, + function(err, resp) { + if (err) { + callback(err, null, resp); + return; + } - var sink = self.sink(resp.name); - sink.metadata = resp; + var sink = self.sink(resp.name); + sink.metadata = resp; - callback(null, sink, resp); - }); + callback(null, sink, resp); + } + ); }; /** @@ -283,6 +293,14 @@ Logging.prototype.entry = function(resource, data) { * logging.getEntries().then(function(data) { * var entries = data[0]; * }); + * + * @example include:samples/logs.js + * region_tag:logging_list_log_entries + * Another example: + * + * @example include:samples/logs.js + * region_tag:logging_list_log_entries_advanced + * Another example: */ Logging.prototype.getEntries = function(options, callback) { if (is.fn(options)) { @@ -290,9 +308,12 @@ Logging.prototype.getEntries = function(options, callback) { options = {}; } - var reqOpts = extend({ - orderBy: 'timestamp desc' - }, options); + var reqOpts = extend( + { + orderBy: 'timestamp desc', + }, + options + ); reqOpts.resourceNames = arrify(reqOpts.resourceNames); reqOpts.resourceNames.push('projects/' + this.projectId); @@ -300,24 +321,30 @@ Logging.prototype.getEntries = function(options, callback) { delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - var gaxOptions = extend({ - autoPaginate: options.autoPaginate - }, options.gaxOptions); + var gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); - this.request({ - client: 'loggingServiceV2Client', - method: 'listLogEntries', - reqOpts: reqOpts, - gaxOpts: gaxOptions - }, function() { - var entries = arguments[1]; + this.request( + { + client: 'loggingServiceV2Client', + method: 'listLogEntries', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + function() { + var entries = arguments[1]; - if (entries) { - arguments[1] = entries.map(Entry.fromApiResponse_); - } + if (entries) { + arguments[1] = entries.map(Entry.fromApiResponse_); + } - callback.apply(null, arguments); - }); + callback.apply(null, arguments); + } + ); }; /** @@ -368,24 +395,30 @@ Logging.prototype.getEntriesStream = function(options) { }); userStream.once('reading', function() { - var reqOpts = extend({ - orderBy: 'timestamp desc' - }, options); + var reqOpts = extend( + { + orderBy: 'timestamp desc', + }, + options + ); reqOpts.resourceNames = arrify(reqOpts.resourceNames); reqOpts.resourceNames.push('projects/' + self.projectId); delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - var gaxOptions = extend({ - autoPaginate: options.autoPaginate - }, options.gaxOptions); + var gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); requestStream = self.request({ client: 'loggingServiceV2Client', method: 'listLogEntriesStream', reqOpts: reqOpts, - gaxOpts: gaxOptions + gaxOpts: gaxOptions, }); userStream.setPipeline(requestStream, toEntryStream); @@ -420,6 +453,10 @@ Logging.prototype.getEntriesStream = function(options) { * logging.getSinks().then(function(data) { * var sinks = data[0]; * }); + * + * @example include:samples/sinks.js + * region_tag:logging_list_sinks + * Another example: */ Logging.prototype.getSinks = function(options, callback) { var self = this; @@ -430,34 +467,40 @@ Logging.prototype.getSinks = function(options, callback) { } var reqOpts = extend({}, options, { - parent: 'projects/' + this.projectId + parent: 'projects/' + this.projectId, }); delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - var gaxOptions = extend({ - autoPaginate: options.autoPaginate - }, options.gaxOptions); - - this.request({ - client: 'configServiceV2Client', - method: 'listSinks', - reqOpts: reqOpts, - gaxOpts: gaxOptions - }, function() { - var sinks = arguments[1]; - - if (sinks) { - arguments[1] = sinks.map(function(sink) { - var sinkInstance = self.sink(sink.name); - sinkInstance.metadata = sink; - return sinkInstance; - }); - } + var gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); - callback.apply(null, arguments); - }); + this.request( + { + client: 'configServiceV2Client', + method: 'listSinks', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + function() { + var sinks = arguments[1]; + + if (sinks) { + arguments[1] = sinks.map(function(sink) { + var sinkInstance = self.sink(sink.name); + sinkInstance.metadata = sink; + return sinkInstance; + }); + } + + callback.apply(null, arguments); + } + ); }; /** @@ -509,20 +552,23 @@ Logging.prototype.getSinksStream = function(options) { userStream.once('reading', function() { var reqOpts = extend({}, options, { - parent: 'projects/' + self.projectId + parent: 'projects/' + self.projectId, }); delete reqOpts.gaxOptions; - var gaxOptions = extend({ - autoPaginate: options.autoPaginate - }, options.gaxOptions); + var gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); requestStream = self.request({ client: 'configServiceV2Client', method: 'listSinksStream', reqOpts: reqOpts, - gaxOpts: gaxOptions + gaxOpts: gaxOptions, }); userStream.setPipeline(requestStream, toSinkStream); @@ -708,25 +754,28 @@ Logging.prototype.setAclForDataset_ = function(name, config, callback) { access.push({ role: 'WRITER', - groupByEmail: 'cloud-logs@google.com' + groupByEmail: 'cloud-logs@google.com', }); - dataset.setMetadata({ - access: access - }, function(err, apiResp) { - if (err) { - callback(err, null, apiResp); - return; + dataset.setMetadata( + { + access: access, + }, + function(err, apiResp) { + if (err) { + callback(err, null, apiResp); + return; + } + + config.destination = format('{baseUrl}/projects/{pId}/datasets/{dId}', { + baseUrl: 'bigquery.googleapis.com', + pId: dataset.parent.projectId, + dId: dataset.id, + }); + + self.createSink(name, config, callback); } - - config.destination = format('{baseUrl}/projects/{pId}/datasets/{dId}', { - baseUrl: 'bigquery.googleapis.com', - pId: dataset.parent.projectId, - dId: dataset.id - }); - - self.createSink(name, config, callback); - }); + ); }); }; @@ -752,9 +801,7 @@ Logging.prototype.setAclForTopic_ = function(name, config, callback) { policy.bindings.push({ role: 'roles/pubsub.publisher', - members: [ - 'serviceAccount:cloud-logs@system.gserviceaccount.com' - ] + members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], }); topic.iam.setPolicy(policy, function(err, policy, apiResp) { @@ -765,7 +812,7 @@ Logging.prototype.setAclForTopic_ = function(name, config, callback) { config.destination = format('{baseUrl}/{topicName}', { baseUrl: 'pubsub.googleapis.com', - topicName: topic.name + topicName: topic.name, }); self.createSink(name, config, callback); @@ -785,12 +832,7 @@ common.paginator.extend(Logging, ['getEntries', 'getSinks']); * that a callback is omitted. */ common.util.promisifyAll(Logging, { - exclude: [ - 'entry', - 'log', - 'request', - 'sink' - ] + exclude: ['entry', 'log', 'request', 'sink'], }); Logging.Entry = Entry; diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index acde7b57e46..02221bddf5e 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -84,11 +84,11 @@ function Log(logging, name, options) { Log.assignSeverityToEntries_ = function(entries, severity) { return arrify(entries).map(function(entry) { var metadata = extend(true, {}, entry.metadata, { - severity: severity + severity: severity, }); return extend(new Entry(), entry, { - metadata: metadata + metadata: metadata, }); }); }; @@ -211,6 +211,10 @@ Log.prototype.debug = function(entry, options, callback) { * log.delete().then(function(data) { * var apiResponse = data[0]; * }); + * + * @example include:samples/logs.js + * region_tag:logging_delete_log + * Another example: */ Log.prototype.delete = function(gaxOptions, callback) { if (is.fn(gaxOptions)) { @@ -219,15 +223,18 @@ Log.prototype.delete = function(gaxOptions, callback) { } var reqOpts = { - logName: this.formattedName_ + logName: this.formattedName_, }; - this.logging.request({ - client: 'loggingServiceV2Client', - method: 'deleteLog', - reqOpts: reqOpts, - gaxOpts: gaxOptions - }, callback); + this.logging.request( + { + client: 'loggingServiceV2Client', + method: 'deleteLog', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + callback + ); }; /** @@ -392,9 +399,12 @@ Log.prototype.getEntries = function(options, callback) { options = {}; } - options = extend({ - filter: 'logName="' + this.formattedName_ + '"' - }, options); + options = extend( + { + filter: 'logName="' + this.formattedName_ + '"', + }, + options + ); return this.logging.getEntries(options, callback); }; @@ -428,9 +438,12 @@ Log.prototype.getEntries = function(options, callback) { * }); */ Log.prototype.getEntriesStream = function(options) { - options = extend({ - filter: 'logName="' + this.formattedName_ + '"' - }, options); + options = extend( + { + filter: 'logName="' + this.formattedName_ + '"', + }, + options + ); return this.logging.getEntriesStream(options); }; @@ -577,6 +590,14 @@ Log.prototype.warning = function(entry, options, callback) { * log.write(entries).then(function(data) { * var apiResponse = data[0]; * }); + * + * @example include:samples/logs.js + * region_tag:logging_write_log_entry + * Another example: + * + * @example include:samples/logs.js + * region_tag:logging_write_log_entry_advanced + * Another example: */ Log.prototype.write = function(entry, options, callback) { var self = this; @@ -606,20 +627,26 @@ Log.prototype.write = function(entry, options, callback) { // Ignore errors (the API will speak up if it has an issue). } - var reqOpts = extend({ - logName: self.formattedName_, - entries: decoratedEntries, - resource: resource - }, options); + var reqOpts = extend( + { + logName: self.formattedName_, + entries: decoratedEntries, + resource: resource, + }, + options + ); delete reqOpts.gaxOptions; - self.logging.request({ - client: 'loggingServiceV2Client', - method: 'writeLogEntries', - reqOpts: reqOpts, - gaxOpts: options.gaxOptions - }, callback); + self.logging.request( + { + client: 'loggingServiceV2Client', + method: 'writeLogEntries', + reqOpts: reqOpts, + gaxOpts: options.gaxOptions, + }, + callback + ); } }; @@ -641,7 +668,7 @@ Log.prototype.decorateEntries_ = function(entries) { } return entry.toJSON({ - removeCircular: self.removeCircular_ + removeCircular: self.removeCircular_, }); }); }; @@ -652,7 +679,7 @@ Log.prototype.decorateEntries_ = function(entries) { * that a callback is omitted. */ common.util.promisifyAll(Log, { - exclude: ['entry'] + exclude: ['entry'], }); module.exports = Log; diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 73e02ac22d3..ff093aeb48f 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -50,8 +50,8 @@ Metadata.getCloudFunctionDescriptor = function() { type: 'cloud_function', labels: { function_name: process.env.FUNCTION_NAME, - region: process.env.SUPERVISOR_REGION - } + region: process.env.SUPERVISOR_REGION, + }, }; }; @@ -65,8 +65,8 @@ Metadata.getGAEDescriptor = function() { type: 'gae_app', labels: { module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, - version_id: process.env.GAE_VERSION - } + version_id: process.env.GAE_VERSION, + }, }; }; @@ -88,8 +88,8 @@ Metadata.getGCEDescriptor = function(callback) { callback(null, { type: 'gce_instance', labels: { - instance_id: instanceId - } + instance_id: instanceId, + }, }); }); }; @@ -114,8 +114,8 @@ Metadata.getGKEDescriptor = function(callback) { labels: { // TODO(ofrobots): it would be good to include the namespace_id as // well. - cluster_name: clusterName - } + cluster_name: clusterName, + }, }); }); }; @@ -129,7 +129,7 @@ Metadata.getGKEDescriptor = function(callback) { */ Metadata.getGlobalDescriptor = function() { return { - type: 'global' + type: 'global', }; }; diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 9396cc68fee..337b1d4dcab 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -76,6 +76,10 @@ function Sink(logging, name) { * var sink = data[0]; * var apiResponse = data[1]; * }); + * + * @example include:samples/sinks.js + * region_tag:logging_create_sink + * Another example: */ Sink.prototype.create = function(config, callback) { this.logging.createSink(this.name, config, callback); @@ -106,6 +110,10 @@ Sink.prototype.create = function(config, callback) { * sink.delete().then(function(data) { * var apiResponse = data[0]; * }); + * + * @example include:samples/sinks.js + * region_tag:logging_delete_sink + * Another example: */ Sink.prototype.delete = function(gaxOptions, callback) { if (is.fn(gaxOptions)) { @@ -114,15 +122,18 @@ Sink.prototype.delete = function(gaxOptions, callback) { } var reqOpts = { - sinkName: this.formattedName_ + sinkName: this.formattedName_, }; - this.logging.request({ - client: 'configServiceV2Client', - method: 'deleteSink', - reqOpts: reqOpts, - gaxOpts: gaxOptions - }, callback); + this.logging.request( + { + client: 'configServiceV2Client', + method: 'deleteSink', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + callback + ); }; /** @@ -149,6 +160,10 @@ Sink.prototype.delete = function(gaxOptions, callback) { * var metadata = data[0]; * var apiResponse = data[1]; * }); + * + * @example include:samples/sinks.js + * region_tag:logging_get_sink + * Another example: */ Sink.prototype.getMetadata = function(gaxOptions, callback) { var self = this; @@ -159,21 +174,24 @@ Sink.prototype.getMetadata = function(gaxOptions, callback) { } var reqOpts = { - sinkName: this.formattedName_ + sinkName: this.formattedName_, }; - this.logging.request({ - client: 'configServiceV2Client', - method: 'getSink', - reqOpts: reqOpts, - gaxOpts: gaxOptions - }, function() { - if (arguments[1]) { - self.metadata = arguments[1]; - } + this.logging.request( + { + client: 'configServiceV2Client', + method: 'getSink', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + function() { + if (arguments[1]) { + self.metadata = arguments[1]; + } - callback.apply(null, arguments); - }); + callback.apply(null, arguments); + } + ); }; /** @@ -202,9 +220,12 @@ Sink.prototype.getMetadata = function(gaxOptions, callback) { * }); */ Sink.prototype.setFilter = function(filter, callback) { - this.setMetadata({ - filter: filter - }, callback); + this.setMetadata( + { + filter: filter, + }, + callback + ); }; /** @@ -235,6 +256,10 @@ Sink.prototype.setFilter = function(filter, callback) { * sink.setMetadata(metadata).then(function(data) { * var apiResponse = data[0]; * }); + * + * @example include:samples/sinks.js + * region_tag:logging_update_sink + * Another example: */ Sink.prototype.setMetadata = function(metadata, callback) { var self = this; @@ -249,23 +274,26 @@ Sink.prototype.setMetadata = function(metadata, callback) { var reqOpts = { sinkName: self.formattedName_, - sink: extend({}, currentMetadata, metadata) + sink: extend({}, currentMetadata, metadata), }; delete reqOpts.sink.gaxOptions; - self.logging.request({ - client: 'configServiceV2Client', - method: 'updateSink', - reqOpts: reqOpts, - gaxOpts: metadata.gaxOptions - }, function() { - if (arguments[1]) { - self.metadata = arguments[1]; - } + self.logging.request( + { + client: 'configServiceV2Client', + method: 'updateSink', + reqOpts: reqOpts, + gaxOpts: metadata.gaxOptions, + }, + function() { + if (arguments[1]) { + self.metadata = arguments[1]; + } - callback.apply(null, arguments); - }); + callback.apply(null, arguments); + } + ); }); }; diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 57ab8e23b30..ee29d6ca1d4 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -38,10 +38,7 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; var PAGE_DESCRIPTORS = { - listSinks: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'sinks') + listSinks: new gax.PageDescriptor('pageToken', 'nextPageToken', 'sinks'), }; /** @@ -53,7 +50,7 @@ var ALL_SCOPES = [ 'https://www.googleapis.com/auth/cloud-platform.read-only', 'https://www.googleapis.com/auth/logging.admin', 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write' + 'https://www.googleapis.com/auth/logging.write', ]; /** @@ -73,15 +70,16 @@ var ALL_SCOPES = [ * @class */ function ConfigServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = extend({ - servicePath: SERVICE_ADDRESS, - port: DEFAULT_SERVICE_PORT, - clientConfig: {} - }, opts); - - var googleApiClient = [ - 'gl-node/' + process.versions.node - ]; + opts = extend( + { + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {}, + }, + opts + ); + + var googleApiClient = ['gl-node/' + process.versions.node]; if (opts.libName && opts.libVersion) { googleApiClient.push(opts.libName + '/' + opts.libVersion); } @@ -92,44 +90,50 @@ function ConfigServiceV2Client(gaxGrpc, grpcClients, opts) { ); var defaults = gaxGrpc.constructSettings( - 'google.logging.v2.ConfigServiceV2', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')}); + 'google.logging.v2.ConfigServiceV2', + configData, + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')} + ); var self = this; this.auth = gaxGrpc.auth; var configServiceV2Stub = gaxGrpc.createStub( - grpcClients.google.logging.v2.ConfigServiceV2, - opts); + grpcClients.google.logging.v2.ConfigServiceV2, + opts + ); var configServiceV2StubMethods = [ 'listSinks', 'getSink', 'createSink', 'updateSink', - 'deleteSink' + 'deleteSink', ]; configServiceV2StubMethods.forEach(function(methodName) { self['_' + methodName] = gax.createApiCall( configServiceV2Stub.then(function(configServiceV2Stub) { return function() { var args = Array.prototype.slice.call(arguments, 0); - return configServiceV2Stub[methodName].apply(configServiceV2Stub, args); + return configServiceV2Stub[methodName].apply( + configServiceV2Stub, + args + ); }; }), defaults[methodName], - PAGE_DESCRIPTORS[methodName]); + PAGE_DESCRIPTORS[methodName] + ); }); } // Path templates -var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}'); +var PROJECT_PATH_TEMPLATE = new gax.PathTemplate('projects/{project}'); var SINK_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}/sinks/{sink}'); + 'projects/{project}/sinks/{sink}' +); /** * Returns a fully-qualified project resource name string. @@ -138,7 +142,7 @@ var SINK_PATH_TEMPLATE = new gax.PathTemplate( */ ConfigServiceV2Client.prototype.projectPath = function(project) { return PROJECT_PATH_TEMPLATE.render({ - project: project + project: project, }); }; @@ -148,7 +152,9 @@ ConfigServiceV2Client.prototype.projectPath = function(project) { * A fully-qualified path representing a project resources. * @returns {String} - A string representing the project. */ -ConfigServiceV2Client.prototype.matchProjectFromProjectName = function(projectName) { +ConfigServiceV2Client.prototype.matchProjectFromProjectName = function( + projectName +) { return PROJECT_PATH_TEMPLATE.match(projectName).project; }; @@ -161,7 +167,7 @@ ConfigServiceV2Client.prototype.matchProjectFromProjectName = function(projectNa ConfigServiceV2Client.prototype.sinkPath = function(project, sink) { return SINK_PATH_TEMPLATE.render({ project: project, - sink: sink + sink: sink, }); }; @@ -270,7 +276,11 @@ ConfigServiceV2Client.prototype.getProjectId = function(callback) { * console.error(err); * }); */ -ConfigServiceV2Client.prototype.listSinks = function(request, options, callback) { +ConfigServiceV2Client.prototype.listSinks = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -327,7 +337,11 @@ ConfigServiceV2Client.prototype.listSinksStream = function(request, options) { options = {}; } - return PAGE_DESCRIPTORS.listSinks.createStream(this._listSinks, request, options); + return PAGE_DESCRIPTORS.listSinks.createStream( + this._listSinks, + request, + options + ); }; /** @@ -436,7 +450,11 @@ ConfigServiceV2Client.prototype.getSink = function(request, options, callback) { * console.error(err); * }); */ -ConfigServiceV2Client.prototype.createSink = function(request, options, callback) { +ConfigServiceV2Client.prototype.createSink = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -513,7 +531,11 @@ ConfigServiceV2Client.prototype.createSink = function(request, options, callback * console.error(err); * }); */ -ConfigServiceV2Client.prototype.updateSink = function(request, options, callback) { +ConfigServiceV2Client.prototype.updateSink = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -557,7 +579,11 @@ ConfigServiceV2Client.prototype.updateSink = function(request, options, callback * console.error(err); * }); */ -ConfigServiceV2Client.prototype.deleteSink = function(request, options, callback) { +ConfigServiceV2Client.prototype.deleteSink = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -574,13 +600,14 @@ function ConfigServiceV2ClientBuilder(gaxGrpc) { return new ConfigServiceV2ClientBuilder(gaxGrpc); } - var configServiceV2Client = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/logging/v2/logging_config.proto' - }]); + var configServiceV2Client = gaxGrpc.load([ + { + root: require('google-proto-files')('..'), + file: 'google/logging/v2/logging_config.proto', + }, + ]); extend(this, configServiceV2Client.google.logging.v2); - /** * Build a new instance of {@link ConfigServiceV2Client}. * @@ -602,4 +629,4 @@ function ConfigServiceV2ClientBuilder(gaxGrpc) { } module.exports = ConfigServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; diff --git a/handwritten/logging/src/v2/doc/doc_google_api_label.js b/handwritten/logging/src/v2/doc/doc_google_api_label.js index 64701d613ac..9ff6c7803de 100644 --- a/handwritten/logging/src/v2/doc/doc_google_api_label.js +++ b/handwritten/logging/src/v2/doc/doc_google_api_label.js @@ -35,4 +35,4 @@ * A human-readable description for the label. * * @see [google.api.LabelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/label.proto} - */ \ No newline at end of file + */ diff --git a/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js b/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js index bb2c3107f8f..aab530e6677 100644 --- a/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js @@ -91,4 +91,4 @@ * `"database_id"` and `"zone"`. * * @see [google.api.MonitoredResource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} - */ \ No newline at end of file + */ diff --git a/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js b/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js index c424c34a7cd..7e8e5cf35af 100644 --- a/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js +++ b/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js @@ -84,4 +84,4 @@ * cache fill was attempted. * * @see [google.logging.type.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/type/http_request.proto} - */ \ No newline at end of file + */ diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js b/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js index 0697ec15814..580d78e0e48 100644 --- a/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js +++ b/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js @@ -118,4 +118,4 @@ * Must be a valid serialized protocol buffer of the above specified type. * * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} - */ \ No newline at end of file + */ diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js b/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js index b81fd71f130..18932c372c4 100644 --- a/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js +++ b/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js @@ -81,4 +81,4 @@ * to +999,999,999 inclusive. * * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} - */ \ No newline at end of file + */ diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js b/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js index ed8fc627b92..997767b856d 100644 --- a/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js +++ b/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js @@ -85,4 +85,4 @@ * inclusive. * * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} - */ \ No newline at end of file + */ diff --git a/handwritten/logging/src/v2/doc/doc_log_entry.js b/handwritten/logging/src/v2/doc/doc_log_entry.js index 194223b50f2..1a672b1a73a 100644 --- a/handwritten/logging/src/v2/doc/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/doc_log_entry.js @@ -180,4 +180,4 @@ var LogEntryOperation = { */ var LogEntrySourceLocation = { // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file +}; diff --git a/handwritten/logging/src/v2/doc/doc_logging.js b/handwritten/logging/src/v2/doc/doc_logging.js index a74b92ed98b..354e969fd7c 100644 --- a/handwritten/logging/src/v2/doc/doc_logging.js +++ b/handwritten/logging/src/v2/doc/doc_logging.js @@ -311,4 +311,4 @@ var ListLogsRequest = { */ var ListLogsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file +}; diff --git a/handwritten/logging/src/v2/doc/doc_logging_config.js b/handwritten/logging/src/v2/doc/doc_logging_config.js index 547b2dc54bc..eba07b49439 100644 --- a/handwritten/logging/src/v2/doc/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/doc_logging_config.js @@ -125,7 +125,6 @@ var LogSink = { * @enum {number} */ VersionFormat: { - /** * An unspecified format version that will default to V2. */ @@ -139,8 +138,8 @@ var LogSink = { /** * `LogEntry` version 1 format. */ - V1: 2 - } + V1: 2, + }, }; /** @@ -311,4 +310,4 @@ var UpdateSinkRequest = { */ var DeleteSinkRequest = { // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file +}; diff --git a/handwritten/logging/src/v2/doc/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/doc_logging_metrics.js index b76532ab87f..14bb7a9052b 100644 --- a/handwritten/logging/src/v2/doc/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/doc_logging_metrics.js @@ -71,7 +71,6 @@ var LogMetric = { * @enum {number} */ ApiVersion: { - /** * Stackdriver Logging API v2. */ @@ -80,8 +79,8 @@ var LogMetric = { /** * Stackdriver Logging API v1. */ - V1: 1 - } + V1: 1, + }, }; /** @@ -205,4 +204,4 @@ var UpdateLogMetricRequest = { */ var DeleteLogMetricRequest = { // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file +}; diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/src/v2/index.js index 77db934f011..e1993dc73af 100644 --- a/handwritten/logging/src/v2/index.js +++ b/handwritten/logging/src/v2/index.js @@ -22,15 +22,19 @@ var gax = require('google-gax'); var extend = require('extend'); function v2(options) { - options = extend({ - scopes: v2.ALL_SCOPES - }, options); + options = extend( + { + scopes: v2.ALL_SCOPES, + }, + options + ); var gaxGrpc = gax.grpc(options); return extend( - {}, - loggingServiceV2Client(gaxGrpc), - configServiceV2Client(gaxGrpc), - metricsServiceV2Client(gaxGrpc)); + {}, + loggingServiceV2Client(gaxGrpc), + configServiceV2Client(gaxGrpc), + metricsServiceV2Client(gaxGrpc) + ); } v2.SERVICE_ADDRESS = loggingServiceV2Client.SERVICE_ADDRESS; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 3ed647ab0bb..d9032949f0c 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -39,17 +39,16 @@ var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; var PAGE_DESCRIPTORS = { listLogEntries: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'entries'), + 'pageToken', + 'nextPageToken', + 'entries' + ), listMonitoredResourceDescriptors: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'resourceDescriptors'), - listLogs: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'logNames') + 'pageToken', + 'nextPageToken', + 'resourceDescriptors' + ), + listLogs: new gax.PageDescriptor('pageToken', 'nextPageToken', 'logNames'), }; /** @@ -61,7 +60,7 @@ var ALL_SCOPES = [ 'https://www.googleapis.com/auth/cloud-platform.read-only', 'https://www.googleapis.com/auth/logging.admin', 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write' + 'https://www.googleapis.com/auth/logging.write', ]; /** @@ -80,15 +79,16 @@ var ALL_SCOPES = [ * @class */ function LoggingServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = extend({ - servicePath: SERVICE_ADDRESS, - port: DEFAULT_SERVICE_PORT, - clientConfig: {} - }, opts); - - var googleApiClient = [ - 'gl-node/' + process.versions.node - ]; + opts = extend( + { + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {}, + }, + opts + ); + + var googleApiClient = ['gl-node/' + process.versions.node]; if (opts.libName && opts.libVersion) { googleApiClient.push(opts.libName + '/' + opts.libVersion); } @@ -101,54 +101,55 @@ function LoggingServiceV2Client(gaxGrpc, grpcClients, opts) { var bundleDescriptors = { writeLogEntries: new gax.BundleDescriptor( 'entries', - [ - 'logName', - 'resource', - 'labels' - ], + ['logName', 'resource', 'labels'], null, - gax.createByteLengthFunction(grpcClients.google.logging.v2.LogEntry)) + gax.createByteLengthFunction(grpcClients.google.logging.v2.LogEntry) + ), }; var defaults = gaxGrpc.constructSettings( - 'google.logging.v2.LoggingServiceV2', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')}); + 'google.logging.v2.LoggingServiceV2', + configData, + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')} + ); var self = this; this.auth = gaxGrpc.auth; var loggingServiceV2Stub = gaxGrpc.createStub( - grpcClients.google.logging.v2.LoggingServiceV2, - opts); + grpcClients.google.logging.v2.LoggingServiceV2, + opts + ); var loggingServiceV2StubMethods = [ 'deleteLog', 'writeLogEntries', 'listLogEntries', 'listMonitoredResourceDescriptors', - 'listLogs' + 'listLogs', ]; loggingServiceV2StubMethods.forEach(function(methodName) { self['_' + methodName] = gax.createApiCall( loggingServiceV2Stub.then(function(loggingServiceV2Stub) { return function() { var args = Array.prototype.slice.call(arguments, 0); - return loggingServiceV2Stub[methodName].apply(loggingServiceV2Stub, args); + return loggingServiceV2Stub[methodName].apply( + loggingServiceV2Stub, + args + ); }; }), defaults[methodName], - PAGE_DESCRIPTORS[methodName] || bundleDescriptors[methodName]); + PAGE_DESCRIPTORS[methodName] || bundleDescriptors[methodName] + ); }); } // Path templates -var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}'); +var PROJECT_PATH_TEMPLATE = new gax.PathTemplate('projects/{project}'); -var LOG_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}/logs/{log}'); +var LOG_PATH_TEMPLATE = new gax.PathTemplate('projects/{project}/logs/{log}'); /** * Returns a fully-qualified project resource name string. @@ -157,7 +158,7 @@ var LOG_PATH_TEMPLATE = new gax.PathTemplate( */ LoggingServiceV2Client.prototype.projectPath = function(project) { return PROJECT_PATH_TEMPLATE.render({ - project: project + project: project, }); }; @@ -167,7 +168,9 @@ LoggingServiceV2Client.prototype.projectPath = function(project) { * A fully-qualified path representing a project resources. * @returns {String} - A string representing the project. */ -LoggingServiceV2Client.prototype.matchProjectFromProjectName = function(projectName) { +LoggingServiceV2Client.prototype.matchProjectFromProjectName = function( + projectName +) { return PROJECT_PATH_TEMPLATE.match(projectName).project; }; @@ -180,7 +183,7 @@ LoggingServiceV2Client.prototype.matchProjectFromProjectName = function(projectN LoggingServiceV2Client.prototype.logPath = function(project, log) { return LOG_PATH_TEMPLATE.render({ project: project, - log: log + log: log, }); }; @@ -248,7 +251,11 @@ LoggingServiceV2Client.prototype.getProjectId = function(callback) { * console.error(err); * }); */ -LoggingServiceV2Client.prototype.deleteLog = function(request, options, callback) { +LoggingServiceV2Client.prototype.deleteLog = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -334,7 +341,11 @@ LoggingServiceV2Client.prototype.deleteLog = function(request, options, callback * console.error(err); * }); */ -LoggingServiceV2Client.prototype.writeLogEntries = function(request, options, callback) { +LoggingServiceV2Client.prototype.writeLogEntries = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -361,7 +372,7 @@ LoggingServiceV2Client.prototype.writeLogEntries = function(request, options, ca * "organizations/[ORGANIZATION_ID]" * * Projects listed in the `project_ids` field are added to this list. - * @param {string[]=} request.projectIds + * @param {string[]} [request.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 @@ -448,7 +459,11 @@ LoggingServiceV2Client.prototype.writeLogEntries = function(request, options, ca * console.error(err); * }); */ -LoggingServiceV2Client.prototype.listLogEntries = function(request, options, callback) { +LoggingServiceV2Client.prototype.listLogEntries = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -483,7 +498,7 @@ LoggingServiceV2Client.prototype.listLogEntries = function(request, options, cal * "organizations/[ORGANIZATION_ID]" * * Projects listed in the `project_ids` field are added to this list. - * @param {string[]=} request.projectIds + * @param {string[]} [request.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 @@ -526,12 +541,19 @@ LoggingServiceV2Client.prototype.listLogEntries = function(request, options, cal * console.error(err); * }); */ -LoggingServiceV2Client.prototype.listLogEntriesStream = function(request, options) { +LoggingServiceV2Client.prototype.listLogEntriesStream = function( + request, + options +) { if (options === undefined) { options = {}; } - return PAGE_DESCRIPTORS.listLogEntries.createStream(this._listLogEntries, request, options); + return PAGE_DESCRIPTORS.listLogEntries.createStream( + this._listLogEntries, + request, + options + ); }; /** @@ -606,7 +628,11 @@ LoggingServiceV2Client.prototype.listLogEntriesStream = function(request, option * console.error(err); * }); */ -LoggingServiceV2Client.prototype.listMonitoredResourceDescriptors = function(request, options, callback) { +LoggingServiceV2Client.prototype.listMonitoredResourceDescriptors = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -655,12 +681,19 @@ LoggingServiceV2Client.prototype.listMonitoredResourceDescriptors = function(req * console.error(err); * }); */ -LoggingServiceV2Client.prototype.listMonitoredResourceDescriptorsStream = function(request, options) { +LoggingServiceV2Client.prototype.listMonitoredResourceDescriptorsStream = function( + request, + options +) { if (options === undefined) { options = {}; } - return PAGE_DESCRIPTORS.listMonitoredResourceDescriptors.createStream(this._listMonitoredResourceDescriptors, request, options); + return PAGE_DESCRIPTORS.listMonitoredResourceDescriptors.createStream( + this._listMonitoredResourceDescriptors, + request, + options + ); }; /** @@ -740,7 +773,11 @@ LoggingServiceV2Client.prototype.listMonitoredResourceDescriptorsStream = functi * console.error(err); * }); */ -LoggingServiceV2Client.prototype.listLogs = function(request, options, callback) { +LoggingServiceV2Client.prototype.listLogs = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -799,7 +836,11 @@ LoggingServiceV2Client.prototype.listLogsStream = function(request, options) { options = {}; } - return PAGE_DESCRIPTORS.listLogs.createStream(this._listLogs, request, options); + return PAGE_DESCRIPTORS.listLogs.createStream( + this._listLogs, + request, + options + ); }; function LoggingServiceV2ClientBuilder(gaxGrpc) { @@ -807,13 +848,14 @@ function LoggingServiceV2ClientBuilder(gaxGrpc) { return new LoggingServiceV2ClientBuilder(gaxGrpc); } - var loggingServiceV2Client = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/logging/v2/logging.proto' - }]); + var loggingServiceV2Client = gaxGrpc.load([ + { + root: require('google-proto-files')('..'), + file: 'google/logging/v2/logging.proto', + }, + ]); extend(this, loggingServiceV2Client.google.logging.v2); - /** * Build a new instance of {@link LoggingServiceV2Client}. * @@ -835,4 +877,4 @@ function LoggingServiceV2ClientBuilder(gaxGrpc) { } module.exports = LoggingServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 62d5a731e8e..532d56344a0 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -39,9 +39,10 @@ var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; var PAGE_DESCRIPTORS = { listLogMetrics: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'metrics') + 'pageToken', + 'nextPageToken', + 'metrics' + ), }; /** @@ -53,7 +54,7 @@ var ALL_SCOPES = [ 'https://www.googleapis.com/auth/cloud-platform.read-only', 'https://www.googleapis.com/auth/logging.admin', 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write' + 'https://www.googleapis.com/auth/logging.write', ]; /** @@ -72,15 +73,16 @@ var ALL_SCOPES = [ * @class */ function MetricsServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = extend({ - servicePath: SERVICE_ADDRESS, - port: DEFAULT_SERVICE_PORT, - clientConfig: {} - }, opts); - - var googleApiClient = [ - 'gl-node/' + process.versions.node - ]; + opts = extend( + { + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {}, + }, + opts + ); + + var googleApiClient = ['gl-node/' + process.versions.node]; if (opts.libName && opts.libVersion) { googleApiClient.push(opts.libName + '/' + opts.libVersion); } @@ -91,44 +93,50 @@ function MetricsServiceV2Client(gaxGrpc, grpcClients, opts) { ); var defaults = gaxGrpc.constructSettings( - 'google.logging.v2.MetricsServiceV2', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')}); + 'google.logging.v2.MetricsServiceV2', + configData, + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')} + ); var self = this; this.auth = gaxGrpc.auth; var metricsServiceV2Stub = gaxGrpc.createStub( - grpcClients.google.logging.v2.MetricsServiceV2, - opts); + grpcClients.google.logging.v2.MetricsServiceV2, + opts + ); var metricsServiceV2StubMethods = [ 'listLogMetrics', 'getLogMetric', 'createLogMetric', 'updateLogMetric', - 'deleteLogMetric' + 'deleteLogMetric', ]; metricsServiceV2StubMethods.forEach(function(methodName) { self['_' + methodName] = gax.createApiCall( metricsServiceV2Stub.then(function(metricsServiceV2Stub) { return function() { var args = Array.prototype.slice.call(arguments, 0); - return metricsServiceV2Stub[methodName].apply(metricsServiceV2Stub, args); + return metricsServiceV2Stub[methodName].apply( + metricsServiceV2Stub, + args + ); }; }), defaults[methodName], - PAGE_DESCRIPTORS[methodName]); + PAGE_DESCRIPTORS[methodName] + ); }); } // Path templates -var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}'); +var PROJECT_PATH_TEMPLATE = new gax.PathTemplate('projects/{project}'); var METRIC_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}/metrics/{metric}'); + 'projects/{project}/metrics/{metric}' +); /** * Returns a fully-qualified project resource name string. @@ -137,7 +145,7 @@ var METRIC_PATH_TEMPLATE = new gax.PathTemplate( */ MetricsServiceV2Client.prototype.projectPath = function(project) { return PROJECT_PATH_TEMPLATE.render({ - project: project + project: project, }); }; @@ -147,7 +155,9 @@ MetricsServiceV2Client.prototype.projectPath = function(project) { * A fully-qualified path representing a project resources. * @returns {String} - A string representing the project. */ -MetricsServiceV2Client.prototype.matchProjectFromProjectName = function(projectName) { +MetricsServiceV2Client.prototype.matchProjectFromProjectName = function( + projectName +) { return PROJECT_PATH_TEMPLATE.match(projectName).project; }; @@ -160,7 +170,7 @@ MetricsServiceV2Client.prototype.matchProjectFromProjectName = function(projectN MetricsServiceV2Client.prototype.metricPath = function(project, metric) { return METRIC_PATH_TEMPLATE.render({ project: project, - metric: metric + metric: metric, }); }; @@ -170,7 +180,9 @@ MetricsServiceV2Client.prototype.metricPath = function(project, metric) { * A fully-qualified path representing a metric resources. * @returns {String} - A string representing the project. */ -MetricsServiceV2Client.prototype.matchProjectFromMetricName = function(metricName) { +MetricsServiceV2Client.prototype.matchProjectFromMetricName = function( + metricName +) { return METRIC_PATH_TEMPLATE.match(metricName).project; }; @@ -180,7 +192,9 @@ MetricsServiceV2Client.prototype.matchProjectFromMetricName = function(metricNam * A fully-qualified path representing a metric resources. * @returns {String} - A string representing the metric. */ -MetricsServiceV2Client.prototype.matchMetricFromMetricName = function(metricName) { +MetricsServiceV2Client.prototype.matchMetricFromMetricName = function( + metricName +) { return METRIC_PATH_TEMPLATE.match(metricName).metric; }; @@ -270,7 +284,11 @@ MetricsServiceV2Client.prototype.getProjectId = function(callback) { * console.error(err); * }); */ -MetricsServiceV2Client.prototype.listLogMetrics = function(request, options, callback) { +MetricsServiceV2Client.prototype.listLogMetrics = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -323,12 +341,19 @@ MetricsServiceV2Client.prototype.listLogMetrics = function(request, options, cal * console.error(err); * }); */ -MetricsServiceV2Client.prototype.listLogMetricsStream = function(request, options) { +MetricsServiceV2Client.prototype.listLogMetricsStream = function( + request, + options +) { if (options === undefined) { options = {}; } - return PAGE_DESCRIPTORS.listLogMetrics.createStream(this._listLogMetrics, request, options); + return PAGE_DESCRIPTORS.listLogMetrics.createStream( + this._listLogMetrics, + request, + options + ); }; /** @@ -362,7 +387,11 @@ MetricsServiceV2Client.prototype.listLogMetricsStream = function(request, option * console.error(err); * }); */ -MetricsServiceV2Client.prototype.getLogMetric = function(request, options, callback) { +MetricsServiceV2Client.prototype.getLogMetric = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -417,7 +446,11 @@ MetricsServiceV2Client.prototype.getLogMetric = function(request, options, callb * console.error(err); * }); */ -MetricsServiceV2Client.prototype.createLogMetric = function(request, options, callback) { +MetricsServiceV2Client.prototype.createLogMetric = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -473,7 +506,11 @@ MetricsServiceV2Client.prototype.createLogMetric = function(request, options, ca * console.error(err); * }); */ -MetricsServiceV2Client.prototype.updateLogMetric = function(request, options, callback) { +MetricsServiceV2Client.prototype.updateLogMetric = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -510,7 +547,11 @@ MetricsServiceV2Client.prototype.updateLogMetric = function(request, options, ca * console.error(err); * }); */ -MetricsServiceV2Client.prototype.deleteLogMetric = function(request, options, callback) { +MetricsServiceV2Client.prototype.deleteLogMetric = function( + request, + options, + callback +) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -527,13 +568,14 @@ function MetricsServiceV2ClientBuilder(gaxGrpc) { return new MetricsServiceV2ClientBuilder(gaxGrpc); } - var metricsServiceV2Client = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/logging/v2/logging_metrics.proto' - }]); + var metricsServiceV2Client = gaxGrpc.load([ + { + root: require('google-proto-files')('..'), + file: 'google/logging/v2/logging_metrics.proto', + }, + ]); extend(this, metricsServiceV2Client.google.logging.v2); - /** * Build a new instance of {@link MetricsServiceV2Client}. * @@ -555,4 +597,4 @@ function MetricsServiceV2ClientBuilder(gaxGrpc) { } module.exports = MetricsServiceV2ClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; diff --git a/handwritten/logging/system-test/.eslintrc.yml b/handwritten/logging/system-test/.eslintrc.yml new file mode 100644 index 00000000000..73f7bbc946f --- /dev/null +++ b/handwritten/logging/system-test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + node/no-unpublished-require: off diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 67141d03379..97ef66321fc 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -27,18 +27,18 @@ var pubsubLibrary = require('@google-cloud/pubsub'); var storageLibrary = require('@google-cloud/storage'); var uuid = require('uuid'); -var env = require('../../../system-test/env.js'); var Logging = require('../'); describe('Logging', function() { + var PROJECT_ID; var TESTS_PREFIX = 'gcloud-logging-test'; var WRITE_CONSISTENCY_DELAY_MS = 120000; - var bigQuery = bigqueryLibrary(env); - var pubsub = pubsubLibrary(env); - var storage = storageLibrary(env); + var bigQuery = bigqueryLibrary(); + var pubsub = pubsubLibrary(); + var storage = storageLibrary(); - var logging = new Logging(env); + var logging = new Logging(); // Create the possible destinations for sinks that we will create. var bucket = storage.bucket(generateName()); @@ -46,43 +46,63 @@ describe('Logging', function() { var topic = pubsub.topic(generateName()); before(function(done) { - async.parallel([ - bucket.create.bind(bucket), - dataset.create.bind(dataset), - topic.create.bind(topic) - ], done); + async.parallel( + [ + callback => { + bucket.create(callback); + }, + callback => { + dataset.create(callback); + }, + callback => { + topic.create(callback); + }, + callback => { + logging.auth.getProjectId((err, projectId) => { + if (err) { + callback(err); + return; + } + PROJECT_ID = projectId; + callback(); + }); + }, + ], + done + ); }); after(function(done) { - async.parallel([ - deleteBuckets, - deleteDatasets, - deleteTopics, - deleteSinks - ], done); + async.parallel( + [deleteBuckets, deleteDatasets, deleteTopics, deleteSinks], + done + ); function deleteBuckets(callback) { - storage.getBuckets({ - prefix: TESTS_PREFIX - }, function(err, buckets) { - if (err) { - done(err); - return; - } + storage.getBuckets( + { + prefix: TESTS_PREFIX, + }, + function(err, buckets) { + if (err) { + done(err); + return; + } - function deleteBucket(bucket, callback) { - bucket.deleteFiles(function(err) { - if (err) { - callback(err); - return; - } + function deleteBucket(bucket, callback) { + bucket.deleteFiles(function(err) { + if (err) { + callback(err); + return; + } - bucket.delete(callback); - }); - } + bucket.delete(callback); + }); + } - async.each(buckets, deleteBucket, callback); - }); + async.each(buckets, deleteBucket, callback); + } + ); } function deleteDatasets(callback) { @@ -117,58 +137,69 @@ describe('Logging', function() { it('should create a sink with a Bucket destination', function(done) { var sink = logging.sink(generateName()); - sink.create({ - destination: bucket - }, function(err, sink, apiResponse) { - assert.ifError(err); + sink.create( + { + destination: bucket, + }, + function(err, sink, apiResponse) { + assert.ifError(err); - var destination = 'storage.googleapis.com/' + bucket.name; - assert.strictEqual(apiResponse.destination, destination); + var destination = 'storage.googleapis.com/' + bucket.name; + assert.strictEqual(apiResponse.destination, destination); - done(); - }); + done(); + } + ); }); it('should create a sink with a Dataset destination', function(done) { var sink = logging.sink(generateName()); - sink.create({ - destination: dataset - }, function(err, sink, apiResponse) { - assert.ifError(err); + sink.create( + { + destination: dataset, + }, + function(err, sink, apiResponse) { + assert.ifError(err); - var destination = 'bigquery.googleapis.com/datasets/' + dataset.id; + var destination = 'bigquery.googleapis.com/datasets/' + dataset.id; - // The projectId may have been replaced depending on how the system - // tests are being run, so let's not care about that. - apiResponse.destination = - apiResponse.destination.replace(/projects\/[^/]*\//, ''); + // The projectId may have been replaced depending on how the system + // tests are being run, so let's not care about that. + apiResponse.destination = apiResponse.destination.replace( + /projects\/[^/]*\//, + '' + ); - assert.strictEqual(apiResponse.destination, destination); + assert.strictEqual(apiResponse.destination, destination); - done(); - }); + done(); + } + ); }); it('should create a sink with a Topic destination', function(done) { var sink = logging.sink(generateName()); - sink.create({ - destination: topic - }, function(err, sink, apiResponse) { - assert.ifError(err); + sink.create( + { + destination: topic, + }, + function(err, sink, apiResponse) { + assert.ifError(err); - var destination = 'pubsub.googleapis.com/' + topic.name; + var destination = 'pubsub.googleapis.com/' + topic.name; - // The projectId may have been replaced depending on how the system - // tests are being run, so let's not care about that. - assert.strictEqual( - apiResponse.destination.replace(/projects\/[^/]*\//, ''), - destination.replace(/projects\/[^/]*\//, '') - ); + // The projectId may have been replaced depending on how the system + // tests are being run, so let's not care about that. + assert.strictEqual( + apiResponse.destination.replace(/projects\/[^/]*\//, ''), + destination.replace(/projects\/[^/]*\//, '') + ); - done(); - }); + done(); + } + ); }); describe('metadata', function() { @@ -176,14 +207,17 @@ describe('Logging', function() { var FILTER = 'severity = ALERT'; before(function(done) { - sink.create({ - destination: topic - }, done); + sink.create( + { + destination: topic, + }, + done + ); }); it('should set metadata', function(done) { var metadata = { - filter: FILTER + filter: FILTER, }; sink.setMetadata(metadata, function(err, apiResponse) { @@ -206,9 +240,12 @@ describe('Logging', function() { var sink = logging.sink(generateName()); before(function(done) { - sink.create({ - destination: topic - }, done); + sink.create( + { + destination: topic, + }, + done + ); }); it('should list sinks', function(done) { @@ -220,7 +257,8 @@ describe('Logging', function() { }); it('should list sinks as a stream', function(done) { - logging.getSinksStream({ pageSize: 1 }) + logging + .getSinksStream({pageSize: 1}) .on('error', done) .once('data', function() { this.end(); @@ -229,7 +267,8 @@ describe('Logging', function() { }); it('should get metadata', function(done) { - logging.getSinksStream({ pageSize: 1 }) + logging + .getSinksStream({pageSize: 1}) .on('error', done) .once('data', function(sink) { sink.getMetadata(function(err, metadata) { @@ -250,21 +289,21 @@ describe('Logging', function() { log.entry('log entry 1'), // object data - log.entry({ delegate: 'my_username' }), + log.entry({delegate: 'my_username'}), // various data types log.entry({ nonValue: null, boolValue: true, - arrayValue: [ 1, 2, 3 ] + arrayValue: [1, 2, 3], }), // nested object data log.entry({ nested: { - delegate: 'my_username' - } - }) + delegate: 'my_username', + }, + }), ]; var options = { @@ -272,26 +311,30 @@ describe('Logging', function() { type: 'gce_instance', labels: { zone: 'global', - instance_id: '3' - } - } + instance_id: '3', + }, + }, }; it('should list log entries', function(done) { - logging.getEntries({ - autoPaginate: false, - pageSize: 1 - }, function(err, entries) { - assert.ifError(err); - assert.strictEqual(entries.length, 1); - done(); - }); + logging.getEntries( + { + autoPaginate: false, + pageSize: 1, + }, + function(err, entries) { + assert.ifError(err); + assert.strictEqual(entries.length, 1); + done(); + } + ); }); it('should list log entries as a stream', function(done) { - logging.getEntriesStream({ + logging + .getEntriesStream({ autoPaginate: false, - pageSize: 1 + pageSize: 1, }) .on('error', done) .once('data', function() { @@ -306,20 +349,24 @@ describe('Logging', function() { }); it('should list log entries', function(done) { - log.getEntries({ - autoPaginate: false, - pageSize: 1 - }, function(err, entries) { - assert.ifError(err); - assert.strictEqual(entries.length, 1); - done(); - }); + log.getEntries( + { + autoPaginate: false, + pageSize: 1, + }, + function(err, entries) { + assert.ifError(err); + assert.strictEqual(entries.length, 1); + done(); + } + ); }); it('should list log entries as a stream', function(done) { - log.getEntriesStream({ + log + .getEntriesStream({ autoPaginate: false, - pageSize: 1 + pageSize: 1, }) .on('error', done) .once('data', function() { @@ -338,31 +385,34 @@ describe('Logging', function() { assert.ifError(err); setTimeout(function() { - log.getEntries({ - autoPaginate: false, - pageSize: logEntries.length - }, function(err, entries) { - assert.ifError(err); + log.getEntries( + { + autoPaginate: false, + pageSize: logEntries.length, + }, + function(err, entries) { + assert.ifError(err); - assert.deepEqual(entries.map(prop('data')).reverse(), [ - 'log entry 1', - { - delegate: 'my_username' - }, - { - nonValue: null, - boolValue: true, - arrayValue: [ 1, 2, 3 ] - }, - { - nested: { - delegate: 'my_username' - } - } - ]); + assert.deepEqual(entries.map(prop('data')).reverse(), [ + 'log entry 1', + { + delegate: 'my_username', + }, + { + nonValue: null, + boolValue: true, + arrayValue: [1, 2, 3], + }, + { + nested: { + delegate: 'my_username', + }, + }, + ]); - done(); - }); + done(); + } + ); }, WRITE_CONSISTENCY_DELAY_MS); }); }); @@ -372,42 +422,48 @@ describe('Logging', function() { setTimeout(function() { var entry2 = log.entry('2'); - var entry3 = log.entry({ timestamp: entry2.metadata.timestamp }, '3'); + var entry3 = log.entry({timestamp: entry2.metadata.timestamp}, '3'); // Re-arrange to confirm the timestamp is sent and honored. log.write([entry2, entry3, entry1], options, function(err) { assert.ifError(err); setTimeout(function() { - log.getEntries({ - autoPaginate: false, - pageSize: 3 - }, function(err, entries) { - assert.ifError(err); - assert.deepEqual(entries.map(prop('data')), [ '3', '2', '1' ]); - done(); - }); + log.getEntries( + { + autoPaginate: false, + pageSize: 3, + }, + function(err, entries) { + assert.ifError(err); + assert.deepEqual(entries.map(prop('data')), ['3', '2', '1']); + done(); + } + ); }, WRITE_CONSISTENCY_DELAY_MS); }); }, 1000); }); it('should preserve order for sequential write calls', function(done) { - var messages = ['1', '2', '3', '4', '5']; + var messages = ['1', '2', '3', '4', '5']; messages.forEach(function(message) { log.write(log.entry(message)); }); setTimeout(function() { - log.getEntries({ - autoPaginate: false, - pageSize: messages.length - }, function(err, entries) { - assert.ifError(err); - assert.deepEqual(entries.reverse().map(prop('data')), messages); - done(); - }); + log.getEntries( + { + autoPaginate: false, + pageSize: messages.length, + }, + function(err, entries) { + assert.ifError(err); + assert.deepEqual(entries.reverse().map(prop('data')), messages); + done(); + } + ); }, WRITE_CONSISTENCY_DELAY_MS); }); @@ -416,40 +472,43 @@ describe('Logging', function() { when: new Date(), matchUser: /username: (.+)/, matchUserError: new Error('No user found.'), - shouldNotBeSaved: undefined + shouldNotBeSaved: undefined, }); log.write(logEntry, options, function(err) { assert.ifError(err); setTimeout(function() { - log.getEntries({ - autoPaginate: false, - pageSize: 1 - }, function(err, entries) { - assert.ifError(err); + log.getEntries( + { + autoPaginate: false, + pageSize: 1, + }, + function(err, entries) { + assert.ifError(err); - var entry = entries[0]; + var entry = entries[0]; - assert.deepEqual(entry.data, { - when: logEntry.data.when.toString(), - matchUser: logEntry.data.matchUser.toString(), - matchUserError: logEntry.data.matchUserError.toString() - }); + assert.deepEqual(entry.data, { + when: logEntry.data.when.toString(), + matchUser: logEntry.data.matchUser.toString(), + matchUserError: logEntry.data.matchUserError.toString(), + }); - done(); - }); + done(); + } + ); }, WRITE_CONSISTENCY_DELAY_MS); }); }); it('should write a log with metadata', function(done) { var metadata = extend({}, options, { - severity: 'DEBUG' + severity: 'DEBUG', }); var data = { - embeddedData: true + embeddedData: true, }; var logEntry = log.entry(metadata, data); @@ -458,19 +517,22 @@ describe('Logging', function() { assert.ifError(err); setTimeout(function() { - log.getEntries({ - autoPaginate: false, - pageSize: 1 - }, function(err, entries) { - assert.ifError(err); + log.getEntries( + { + autoPaginate: false, + pageSize: 1, + }, + function(err, entries) { + assert.ifError(err); - var entry = entries[0]; + var entry = entries[0]; - assert.strictEqual(entry.metadata.severity, metadata.severity); - assert.deepEqual(entry.data, data); + assert.strictEqual(entry.metadata.severity, metadata.severity); + assert.deepEqual(entry.data, data); - done(); - }); + done(); + } + ); }, WRITE_CONSISTENCY_DELAY_MS); }); }); @@ -483,38 +545,45 @@ describe('Logging', function() { assert.ifError(err); setTimeout(function() { - log.getEntries({ - autoPaginate: false, - pageSize: 1 - }, function(err, entries) { - assert.ifError(err); + log.getEntries( + { + autoPaginate: false, + pageSize: 1, + }, + function(err, entries) { + assert.ifError(err); - var entry = entries[0]; + var entry = entries[0]; - assert.strictEqual(entry.data, text); - assert.deepEqual(entry.metadata.resource, { - type: 'global', - labels: { - project_id: env.projectId - } - }); + assert.strictEqual(entry.data, text); + assert.deepEqual(entry.metadata.resource, { + type: 'global', + labels: { + project_id: PROJECT_ID, + }, + }); - done(); - }); + done(); + } + ); }, WRITE_CONSISTENCY_DELAY_MS); }); }); it('should write a log with camelcase resource label keys', function(done) { - log.write(logEntries, { - resource: { - type: 'gce_instance', - labels: { - zone: 'global', - instanceId: '3' - } - } - }, done); + log.write( + logEntries, + { + resource: { + type: 'gce_instance', + labels: { + zone: 'global', + instanceId: '3', + }, + }, + }, + done + ); }); it('should write to a log with alert helper', function(done) { diff --git a/handwritten/logging/test/.eslintrc.yml b/handwritten/logging/test/.eslintrc.yml new file mode 100644 index 00000000000..73f7bbc946f --- /dev/null +++ b/handwritten/logging/test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + node/no-unpublished-require: off diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index aa4b7803f47..98de3f48258 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -41,9 +41,9 @@ describe('Entry', function() { before(function() { Entry = proxyquire('../src/entry.js', { '@google-cloud/common-grpc': { - Service: FakeGrpcService + Service: FakeGrpcService, }, - eventid: FakeEventId + eventid: FakeEventId, }); }); @@ -59,7 +59,7 @@ describe('Entry', function() { var expectedTimestampBoundaries = { start: new Date(now.getTime() - 1000), - end: new Date(now.getTime() + 1000) + end: new Date(now.getTime() + 1000), }; assert(entry.metadata.timestamp >= expectedTimestampBoundaries.start); @@ -70,7 +70,7 @@ describe('Entry', function() { var timestamp = new Date('2012'); var entry = new Entry({ - timestamp: timestamp + timestamp: timestamp, }); assert.strictEqual(entry.metadata.timestamp, timestamp); @@ -98,7 +98,7 @@ describe('Entry', function() { var userDefinedInsertId = 'user-defined-insert-id'; var entry = new Entry({ - insertId: userDefinedInsertId + insertId: userDefinedInsertId, }); assert.strictEqual(entry.metadata.insertId, userDefinedInsertId); @@ -129,8 +129,8 @@ describe('Entry', function() { extraProperty: true, timestamp: { seconds: secondsRounded, - nanos: Math.floor((seconds - secondsRounded) * 1e9) - } + nanos: Math.floor((seconds - secondsRounded) * 1e9), + }, }); }); @@ -147,7 +147,7 @@ describe('Entry', function() { resource: RESOURCE, payload: 'protoPayload', protoPayload: DATA, - extraProperty: true + extraProperty: true, }); assert.strictEqual(entry.data, DATA); @@ -162,7 +162,7 @@ describe('Entry', function() { resource: RESOURCE, payload: 'textPayload', textPayload: DATA, - extraProperty: true + extraProperty: true, }); assert.strictEqual(entry.data, DATA); @@ -189,7 +189,7 @@ describe('Entry', function() { assert.strictEqual(obj, input); assert.deepEqual(options, { removeCircular: false, - stringify: true + stringify: true, }); return converted; }; @@ -206,7 +206,7 @@ describe('Entry', function() { }; entry.data = {}; - entry.toJSON({ removeCircular: true }); + entry.toJSON({removeCircular: true}); }); it('should assign string data as textPayload', function() { @@ -226,7 +226,7 @@ describe('Entry', function() { assert.deepEqual(json.timestamp, { seconds: secondsRounded, - nanos: Math.floor((seconds - secondsRounded) * 1e9) + nanos: Math.floor((seconds - secondsRounded) * 1e9), }); }); }); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 2b333b873a4..2d6cc6a2b60 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -35,14 +35,11 @@ var fakePaginator = { extended = true; methods = arrify(methods); - assert.deepEqual(methods, [ - 'getEntries', - 'getSinks' - ]); + assert.deepEqual(methods, ['getEntries', 'getSinks']); }, streamify: function(methodName) { return methodName; - } + }, }; var googleAutoAuthOverride; @@ -67,12 +64,7 @@ var fakeUtil = extend({}, util, { } promisifed = true; - assert.deepEqual(options.exclude, [ - 'entry', - 'log', - 'request', - 'sink' - ]); + assert.deepEqual(options.exclude, ['entry', 'log', 'request', 'sink']); }, replaceProjectIdToken: function(reqOpts) { if (replaceProjectIdTokenOverride) { @@ -80,7 +72,7 @@ var fakeUtil = extend({}, util, { } return reqOpts; - } + }, }); var v2Override; @@ -114,13 +106,13 @@ describe('Logging', function() { Logging = proxyquire('../', { '@google-cloud/common': { paginator: fakePaginator, - util: fakeUtil + util: fakeUtil, }, 'google-auto-auth': fakeGoogleAutoAuth, './log.js': FakeLog, './entry.js': FakeEntry, './sink.js': FakeSink, - './v2': fakeV2 + './v2': fakeV2, }); }); @@ -131,7 +123,7 @@ describe('Logging', function() { v2Override = null; logging = new Logging({ - projectId: PROJECT_ID + projectId: PROJECT_ID, }); }); @@ -149,7 +141,7 @@ describe('Logging', function() { projectId: PROJECT_ID, credentials: 'credentials', email: 'email', - keyFilename: 'keyFile' + keyFilename: 'keyFile', }; var normalizeArguments = fakeUtil.normalizeArguments; @@ -177,15 +169,21 @@ describe('Logging', function() { var fakeGoogleAutoAuthInstance = {}; var options = { a: 'b', - c: 'd' + c: 'd', }; googleAutoAuthOverride = function(options_) { - assert.deepEqual(options_, extend({ - scopes: v2.ALL_SCOPES, - libName: 'gccl', - libVersion: PKG.version - }, options)); + assert.deepEqual( + options_, + extend( + { + scopes: v2.ALL_SCOPES, + libName: 'gccl', + libVersion: PKG.version, + }, + options + ) + ); return fakeGoogleAutoAuthInstance; }; @@ -196,18 +194,24 @@ describe('Logging', function() { it('should localize the options', function() { var options = { a: 'b', - c: 'd' + c: 'd', }; var logging = new Logging(options); assert.notStrictEqual(logging.options, options); - assert.deepEqual(logging.options, extend({ - scopes: v2.ALL_SCOPES, - libName: 'gccl', - libVersion: PKG.version - }, options)); + assert.deepEqual( + logging.options, + extend( + { + scopes: v2.ALL_SCOPES, + libName: 'gccl', + libVersion: PKG.version, + }, + options + ) + ); }); it('should set the projectId', function() { @@ -239,7 +243,7 @@ describe('Logging', function() { var dataset = {}; var CONFIG = { - destination: dataset + destination: dataset, }; isCustomTypeOverride = function(destination, type) { @@ -260,7 +264,7 @@ describe('Logging', function() { var topic = {}; var CONFIG = { - destination: topic + destination: topic, }; isCustomTypeOverride = function(destination, type) { @@ -281,7 +285,7 @@ describe('Logging', function() { var bucket = {}; var CONFIG = { - destination: bucket + destination: bucket, }; isCustomTypeOverride = function(destination, type) { @@ -302,11 +306,11 @@ describe('Logging', function() { it('should make the correct API request', function(done) { var config = { a: 'b', - c: 'd' + c: 'd', }; var expectedConfig = extend({}, config, { - name: SINK_NAME + name: SINK_NAME, }); logging.request = function(config) { @@ -329,7 +333,7 @@ describe('Logging', function() { var config = { a: 'b', c: 'd', - gaxOptions: {} + gaxOptions: {}, }; logging.request = function(config_) { @@ -364,7 +368,7 @@ describe('Logging', function() { describe('success', function() { var apiResponse = { - name: SINK_NAME + name: SINK_NAME, }; beforeEach(function() { @@ -412,7 +416,7 @@ describe('Logging', function() { logging.request = function(config) { assert.deepEqual(config.reqOpts, { orderBy: 'timestamp desc', - resourceNames: ['projects/' + logging.projectId] + resourceNames: ['projects/' + logging.projectId], }); done(); }; @@ -427,13 +431,16 @@ describe('Logging', function() { assert.strictEqual(config.client, 'loggingServiceV2Client'); assert.strictEqual(config.method, 'listLogEntries'); - assert.deepEqual(config.reqOpts, extend(options, { - orderBy: 'timestamp desc', - resourceNames: ['projects/' + logging.projectId] - })); + assert.deepEqual( + config.reqOpts, + extend(options, { + orderBy: 'timestamp desc', + resourceNames: ['projects/' + logging.projectId], + }) + ); assert.deepStrictEqual(config.gaxOpts, { - autoPaginate: undefined + autoPaginate: undefined, }); done(); @@ -444,7 +451,7 @@ describe('Logging', function() { it('should allow overriding orderBy', function(done) { var options = { - orderBy: 'timestamp asc' + orderBy: 'timestamp asc', }; logging.request = function(config) { @@ -460,8 +467,8 @@ describe('Logging', function() { a: 'b', c: 'd', gaxOptions: { - autoPaginate: true - } + autoPaginate: true, + }, }; logging.request = function(config) { @@ -474,11 +481,7 @@ describe('Logging', function() { }); describe('error', function() { - var ARGS = [ - new Error('Error.'), - [], - {} - ]; + var ARGS = [new Error('Error.'), [], {}]; beforeEach(function() { logging.request = function(config, callback) { @@ -500,9 +503,9 @@ describe('Logging', function() { null, [ { - logName: 'syslog' - } - ] + logName: 'syslog', + }, + ], ]; beforeEach(function() { @@ -516,10 +519,7 @@ describe('Logging', function() { assert.ifError(err); var argsPassedToFromApiResponse_ = entries[0]; - assert.strictEqual( - argsPassedToFromApiResponse_[0], - ARGS[1][0] - ); + assert.strictEqual(argsPassedToFromApiResponse_[0], ARGS[1][0]); done(); }); @@ -533,8 +533,8 @@ describe('Logging', function() { c: 'd', gaxOptions: { a: 'b', - c: 'd' - } + c: 'd', + }, }; var REQUEST_STREAM; @@ -555,18 +555,16 @@ describe('Logging', function() { assert.strictEqual(config.method, 'listLogEntriesStream'); assert.deepEqual(config.reqOpts, { - resourceNames: [ - 'projects/' + logging.projectId - ], + resourceNames: ['projects/' + logging.projectId], orderBy: 'timestamp desc', a: 'b', - c: 'd' + c: 'd', }); assert.deepEqual(config.gaxOpts, { autoPaginate: undefined, a: 'b', - c: 'd' + c: 'd', }); setImmediate(done); @@ -583,10 +581,7 @@ describe('Logging', function() { stream.on('data', function(entry) { var argsPassedToFromApiResponse_ = entry[0]; - assert.strictEqual( - argsPassedToFromApiResponse_, - RESULT - ); + assert.strictEqual(argsPassedToFromApiResponse_, RESULT); done(); }); @@ -618,8 +613,8 @@ describe('Logging', function() { c: 'd', gaxOptions: { a: 'b', - c: 'd' - } + c: 'd', + }, }; it('should accept only a callback', function(done) { @@ -638,13 +633,13 @@ describe('Logging', function() { assert.deepEqual(config.reqOpts, { parent: 'projects/' + logging.projectId, a: 'b', - c: 'd' + c: 'd', }); assert.deepEqual(config.gaxOpts, { autoPaginate: undefined, a: 'b', - c: 'd' + c: 'd', }); done(); @@ -654,11 +649,7 @@ describe('Logging', function() { }); describe('error', function() { - var ARGS = [ - new Error('Error.'), - [], - {} - ]; + var ARGS = [new Error('Error.'), [], {}]; beforeEach(function() { logging.request = function(config, callback) { @@ -680,10 +671,10 @@ describe('Logging', function() { null, [ { - name: 'sink-name' - } + name: 'sink-name', + }, ], - {} + {}, ]; beforeEach(function() { @@ -718,13 +709,13 @@ describe('Logging', function() { c: 'd', gaxOptions: { a: 'b', - c: 'd' - } + c: 'd', + }, }; var REQUEST_STREAM; var RESULT = { - name: 'sink-name' + name: 'sink-name', }; beforeEach(function() { @@ -744,13 +735,13 @@ describe('Logging', function() { assert.deepEqual(config.reqOpts, { parent: 'projects/' + logging.projectId, a: 'b', - c: 'd' + c: 'd', }); assert.deepEqual(config.gaxOpts, { autoPaginate: undefined, a: 'b', - c: 'd' + c: 'd', }); setImmediate(done); @@ -809,9 +800,9 @@ describe('Logging', function() { method: 'method', reqOpts: { a: 'b', - c: 'd' + c: 'd', }, - gaxOpts: {} + gaxOpts: {}, }; var PROJECT_ID = 'project-id'; @@ -820,11 +811,11 @@ describe('Logging', function() { logging.auth = { getProjectId: function(callback) { callback(null, PROJECT_ID); - } + }, }; logging.api[CONFIG.client] = { - [CONFIG.method]: util.noop + [CONFIG.method]: util.noop, }; }); @@ -852,7 +843,7 @@ describe('Logging', function() { it('should initiate and cache the client', function() { var fakeClient = { - [CONFIG.method]: util.noop + [CONFIG.method]: util.noop, }; v2Override = function(options) { @@ -862,7 +853,7 @@ describe('Logging', function() { [CONFIG.client]: function(options) { assert.strictEqual(options, logging.options); return fakeClient; - } + }, }; }; @@ -900,7 +891,7 @@ describe('Logging', function() { setImmediate(done); return util.noop; - } + }, }; logging.request(CONFIG, assert.ifError); @@ -931,7 +922,7 @@ describe('Logging', function() { setImmediate(done); return util.noop; - } + }, }; logging.request(CONFIG, assert.ifError); @@ -972,7 +963,7 @@ describe('Logging', function() { return function() { return GAX_STREAM; }; - } + }, }; }); @@ -1010,7 +1001,7 @@ describe('Logging', function() { return function() { return GAX_STREAM; }; - } + }, }; var requestStream = logging.request(CONFIG); @@ -1071,13 +1062,13 @@ describe('Logging', function() { name: 'bucket-name', acl: { owners: { - addGroup: util.noop - } - } + addGroup: util.noop, + }, + }, }; CONFIG = { - destination: bucket + destination: bucket, }; }); @@ -1150,12 +1141,12 @@ describe('Logging', function() { dataset = { id: 'dataset-id', parent: { - projectId: PROJECT_ID - } + projectId: PROJECT_ID, + }, }; CONFIG = { - destination: dataset + destination: dataset, }; }); @@ -1182,7 +1173,7 @@ describe('Logging', function() { describe('success', function() { var apiResponse = { - access: [{}, {}] + access: [{}, {}], }; var originalAccess = [].slice.call(apiResponse.access); @@ -1196,7 +1187,7 @@ describe('Logging', function() { it('should set the correct metadata', function(done) { var access = { role: 'WRITER', - groupByEmail: 'cloud-logs@google.com' + groupByEmail: 'cloud-logs@google.com', }; var expectedAccess = [].slice.call(originalAccess).concat(access); @@ -1246,7 +1237,7 @@ describe('Logging', function() { 'projects', dataset.parent.projectId, 'datasets', - dataset.id + dataset.id, ].join('/'); assert.strictEqual(name, SINK_NAME); @@ -1272,12 +1263,12 @@ describe('Logging', function() { name: 'topic-name', iam: { getPolicy: util.noop, - setPolicy: util.noop - } + setPolicy: util.noop, + }, }; CONFIG = { - destination: topic + destination: topic, }; }); @@ -1304,7 +1295,7 @@ describe('Logging', function() { describe('success', function() { var apiResponse = { - bindings: [{}, {}] + bindings: [{}, {}], }; var originalBindings = [].slice.call(apiResponse.bindings); @@ -1318,9 +1309,7 @@ describe('Logging', function() { it('should set the correct policy bindings', function(done) { var binding = { role: 'roles/pubsub.publisher', - members: [ - 'serviceAccount:cloud-logs@system.gserviceaccount.com' - ] + members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], }; var expectedBindings = [].slice.call(originalBindings); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 1deed4debd3..8386d09df7e 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -31,7 +31,7 @@ var fakeUtil = extend({}, util, { promisifed = true; assert.deepEqual(options.exclude, ['entry']); - } + }, }); var Entry = require('../src/entry.js'); @@ -51,8 +51,8 @@ describe('Log', function() { 'projects', PROJECT_ID, 'logs', - LOG_NAME_ENCODED - ].join('/'); + LOG_NAME_ENCODED, + ].join('/'); var LOGGING; @@ -61,15 +61,15 @@ describe('Log', function() { before(function() { Log = proxyquire('../src/log.js', { '@google-cloud/common': { - util: fakeUtil + util: fakeUtil, }, './entry.js': Entry, - './metadata.js': FakeMetadata + './metadata.js': FakeMetadata, }); var assignSeverityToEntries_ = Log.assignSeverityToEntries_; Log.assignSeverityToEntries_ = function() { - return (assignSeverityToEntriesOverride || assignSeverityToEntries_) - .apply(null, arguments); + return (assignSeverityToEntriesOverride || assignSeverityToEntries_ + ).apply(null, arguments); }; }); @@ -79,7 +79,7 @@ describe('Log', function() { LOGGING = { projectId: PROJECT_ID, entry: util.noop, - request: util.noop + request: util.noop, }; log = new Log(LOGGING, LOG_NAME_FORMATTED); @@ -118,7 +118,7 @@ describe('Log', function() { }); it('should accept and localize options.removeCircular', function() { - var options = { removeCircular: true }; + var options = {removeCircular: true}; var log = new Log(LOGGING, LOG_NAME_FORMATTED, options); assert.strictEqual(log.removeCircular_, true); }); @@ -136,11 +136,7 @@ describe('Log', function() { var circular = {}; circular.circular = circular; - var ENTRIES = [ - { data: { a: 'b' } }, - { data: { c: 'd' } }, - { data: { e: circular }} - ]; + var ENTRIES = [{data: {a: 'b'}}, {data: {c: 'd'}}, {data: {e: circular}}]; var SEVERITY = 'severity'; @@ -149,7 +145,7 @@ describe('Log', function() { Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) .map(prop('metadata')) .map(prop('severity')), - [ SEVERITY ] + [SEVERITY] ); }); @@ -158,11 +154,7 @@ describe('Log', function() { Log.assignSeverityToEntries_(ENTRIES, SEVERITY) .map(prop('metadata')) .map(prop('severity')), - [ - SEVERITY, - SEVERITY, - SEVERITY - ] + [SEVERITY, SEVERITY, SEVERITY] ); }); @@ -207,7 +199,7 @@ describe('Log', function() { assert.strictEqual(config.method, 'deleteLog'); assert.deepEqual(config.reqOpts, { - logName: log.formattedName_ + logName: log.formattedName_, }); assert.deepEqual(config.gaxOpts, {}); @@ -233,7 +225,7 @@ describe('Log', function() { describe('entry', function() { it('should return an entry from Logging', function() { var metadata = { - val: true + val: true, }; var data = {}; @@ -263,7 +255,7 @@ describe('Log', function() { describe('getEntries', function() { var EXPECTED_OPTIONS = { - filter: 'logName="' + LOG_NAME_FORMATTED + '"' + filter: 'logName="' + LOG_NAME_FORMATTED + '"', }; it('should call Logging getEntries with defaults', function(done) { @@ -278,7 +270,7 @@ describe('Log', function() { it('should allow overriding the options', function(done) { var options = { custom: true, - filter: 'custom filter' + filter: 'custom filter', }; log.logging.getEntries = function(options_, callback) { @@ -293,7 +285,7 @@ describe('Log', function() { describe('getEntriesStream', function() { var fakeStream = {}; var EXPECTED_OPTIONS = { - filter: 'logName="' + LOG_NAME_FORMATTED + '"' + filter: 'logName="' + LOG_NAME_FORMATTED + '"', }; it('should call Logging getEntriesStream with defaults', function(done) { @@ -310,7 +302,7 @@ describe('Log', function() { it('should allow overriding the options', function(done) { var options = { custom: true, - filter: 'custom filter' + filter: 'custom filter', }; log.logging.getEntriesStream = function(options_) { @@ -341,7 +333,7 @@ describe('Log', function() { it('should forward options.resource to request', function(done) { var CUSTOM_RESOURCE = 'custom-resource'; var optionsWithResource = extend({}, OPTIONS, { - resource: CUSTOM_RESOURCE + resource: CUSTOM_RESOURCE, }); log.logging.request = function(config, callback) { @@ -351,7 +343,7 @@ describe('Log', function() { assert.deepEqual(config.reqOpts, { logName: log.formattedName_, entries: [ENTRY], - resource: CUSTOM_RESOURCE + resource: CUSTOM_RESOURCE, }); assert.strictEqual(config.gaxOpts, undefined); @@ -365,16 +357,16 @@ describe('Log', function() { it('should transform camelcase label keys to snake case', function(done) { var CUSTOM_RESOURCE = { labels: { - camelCaseKey: 'camel-case-key-val' - } + camelCaseKey: 'camel-case-key-val', + }, }; var EXPECTED_RESOURCE = { labels: { - camel_case_key: 'camel-case-key-val' - } + camel_case_key: 'camel-case-key-val', + }, }; var optionsWithResource = extend({}, OPTIONS, { - resource: CUSTOM_RESOURCE + resource: CUSTOM_RESOURCE, }); log.logging.request = function(config, callback) { @@ -384,7 +376,7 @@ describe('Log', function() { assert.deepEqual(config.reqOpts, { logName: log.formattedName_, entries: [ENTRY], - resource: EXPECTED_RESOURCE + resource: EXPECTED_RESOURCE, }); assert.strictEqual(config.gaxOpts, undefined); @@ -403,7 +395,7 @@ describe('Log', function() { assert.deepEqual(config.reqOpts, { logName: log.formattedName_, entries: [ENTRY], - resource: FAKE_RESOURCE + resource: FAKE_RESOURCE, }); assert.strictEqual(config.gaxOpts, undefined); @@ -729,7 +721,7 @@ describe('Log', function() { var entry = new Entry(); entry.toJSON = function(options_) { - assert.deepStrictEqual(options_, { removeCircular: true }); + assert.deepStrictEqual(options_, {removeCircular: true}); setImmediate(done); return {}; }; diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 7297b63743e..2c7c9f746d2 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -27,11 +27,14 @@ var fakeGcpMetadata = { if (instanceOverride && instanceOverride.path) { assert.strictEqual(path, instanceOverride.path); } - var args = (instanceOverride && instanceOverride.args) || - [null, null, 'fake-instance-value']; + var args = (instanceOverride && instanceOverride.args) || [ + null, + null, + 'fake-instance-value', + ]; cb.apply(fakeGcpMetadata, args); }); - } + }, }; describe('metadata', function() { @@ -45,7 +48,7 @@ describe('metadata', function() { before(function() { Metadata = proxyquire('../src/metadata.js', { - 'gcp-metadata': fakeGcpMetadata + 'gcp-metadata': fakeGcpMetadata, }); MetadataCached = extend({}, Metadata); @@ -53,7 +56,7 @@ describe('metadata', function() { beforeEach(function() { LOGGING = { - auth: {} + auth: {}, }; extend(Metadata, MetadataCached); metadata = new Metadata(LOGGING); @@ -84,8 +87,8 @@ describe('metadata', function() { type: 'cloud_function', labels: { function_name: FUNCTION_NAME, - region: SUPERVISOR_REGION - } + region: SUPERVISOR_REGION, + }, }); }); }); @@ -106,8 +109,8 @@ describe('metadata', function() { type: 'gae_app', labels: { module_id: GAE_SERVICE, - version_id: GAE_VERSION - } + version_id: GAE_VERSION, + }, }); }); @@ -125,7 +128,7 @@ describe('metadata', function() { it('should return the correct descriptor', function(done) { instanceOverride = { path: 'attributes/cluster-name', - args: [null, null, CLUSTER_NAME] + args: [null, null, CLUSTER_NAME], }; Metadata.getGKEDescriptor(function(err, descriptor) { @@ -133,8 +136,8 @@ describe('metadata', function() { assert.deepEqual(descriptor, { type: 'container', labels: { - cluster_name: CLUSTER_NAME - } + cluster_name: CLUSTER_NAME, + }, }); done(); }); @@ -142,7 +145,7 @@ describe('metadata', function() { it('should return error on failure to acquire metadata', function(done) { var FAKE_ERROR = new Error(); - instanceOverride = { args: [ FAKE_ERROR ] }; + instanceOverride = {args: [FAKE_ERROR]}; Metadata.getGKEDescriptor(function(err) { assert.strictEqual(err, FAKE_ERROR); @@ -157,7 +160,7 @@ describe('metadata', function() { it('should return the correct descriptor', function(done) { instanceOverride = { path: 'id', - args: [null, null, INSTANCE_ID] + args: [null, null, INSTANCE_ID], }; Metadata.getGCEDescriptor(function(err, descriptor) { @@ -165,8 +168,8 @@ describe('metadata', function() { assert.deepEqual(descriptor, { type: 'gce_instance', labels: { - instance_id: INSTANCE_ID - } + instance_id: INSTANCE_ID, + }, }); done(); }); @@ -174,7 +177,7 @@ describe('metadata', function() { it('should return error on failure to acquire metadata', function(done) { var FAKE_ERROR = new Error(); - instanceOverride = { args: [ FAKE_ERROR ] }; + instanceOverride = {args: [FAKE_ERROR]}; Metadata.getGCEDescriptor(function(err) { assert.strictEqual(err, FAKE_ERROR); @@ -186,7 +189,7 @@ describe('metadata', function() { describe('getGlobalDescriptor', function() { it('should return the correct descriptor', function() { assert.deepEqual(Metadata.getGlobalDescriptor(), { - type: 'global' + type: 'global', }); }); }); @@ -212,7 +215,7 @@ describe('metadata', function() { metadata.logging.auth.getEnvironment = function(callback) { callback(null, { IS_APP_ENGINE: true, - IS_COMPUTE_ENGINE: true + IS_COMPUTE_ENGINE: true, }); }; @@ -235,7 +238,7 @@ describe('metadata', function() { metadata.logging.auth.getEnvironment = function(callback) { callback(null, { IS_CLOUD_FUNCTION: true, - IS_COMPUTE_ENGINE: true + IS_COMPUTE_ENGINE: true, }); }; @@ -252,12 +255,12 @@ describe('metadata', function() { var INSTANCE_ID = 'overridden-value'; instanceOverride = { path: 'id', - args: [null, null, INSTANCE_ID] + args: [null, null, INSTANCE_ID], }; metadata.logging.auth.getEnvironment = function(callback) { callback(null, { - IS_COMPUTE_ENGINE: true + IS_COMPUTE_ENGINE: true, }); }; @@ -266,8 +269,8 @@ describe('metadata', function() { assert.deepStrictEqual(defaultResource, { type: 'gce_instance', labels: { - instance_id: INSTANCE_ID - } + instance_id: INSTANCE_ID, + }, }); done(); }); @@ -279,13 +282,13 @@ describe('metadata', function() { var CLUSTER_NAME = 'overridden-value'; instanceOverride = { path: 'attributes/cluster-name', - args: [null, null, CLUSTER_NAME] + args: [null, null, CLUSTER_NAME], }; metadata.logging.auth.getEnvironment = function(callback) { callback(null, { IS_COMPUTE_ENGINE: true, - IS_CONTAINER_ENGINE: true + IS_CONTAINER_ENGINE: true, }); }; @@ -294,8 +297,8 @@ describe('metadata', function() { assert.deepStrictEqual(defaultResource, { type: 'container', labels: { - cluster_name: CLUSTER_NAME - } + cluster_name: CLUSTER_NAME, + }, }); done(); }); @@ -315,7 +318,7 @@ describe('metadata', function() { IS_APP_ENGINE: false, IS_CLOUD_FUNCTION: false, IS_COMPUTE_ENGINE: false, - IS_CONTAINER_ENGINE: false + IS_CONTAINER_ENGINE: false, }); }; diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index 8821192aee6..b5b21e34f91 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -27,7 +27,7 @@ var fakeUtil = extend({}, util, { if (Class.name === 'Sink') { promisifed = true; } - } + }, }); describe('Sink', function() { @@ -36,15 +36,15 @@ describe('Sink', function() { var LOGGING = { createSink: util.noop, - projectId: 'project-id' + projectId: 'project-id', }; var SINK_NAME = 'sink-name'; before(function() { Sink = proxyquire('../src/sink.js', { '@google-cloud/common': { - util: fakeUtil - } + util: fakeUtil, + }, }); }); @@ -94,7 +94,7 @@ describe('Sink', function() { assert.strictEqual(config.method, 'deleteSink'); assert.deepEqual(config.reqOpts, { - sinkName: sink.formattedName_ + sinkName: sink.formattedName_, }); assert.deepEqual(config.gaxOpts, {}); @@ -124,7 +124,7 @@ describe('Sink', function() { assert.strictEqual(config.method, 'getSink'); assert.deepEqual(config.reqOpts, { - sinkName: sink.formattedName_ + sinkName: sink.formattedName_, }); assert.deepEqual(config.gaxOpts, {}); @@ -187,7 +187,7 @@ describe('Sink', function() { }); describe('setMetadata', function() { - var METADATA = { a: 'b', c: 'd' }; + var METADATA = {a: 'b', c: 'd'}; beforeEach(function() { sink.getMetadata = function(callback) { @@ -219,7 +219,7 @@ describe('Sink', function() { }); it('should make the correct request', function(done) { - var currentMetadata = { a: 'a', e: 'e' }; + var currentMetadata = {a: 'a', e: 'e'}; sink.getMetadata = function(callback) { callback(null, currentMetadata); @@ -231,7 +231,7 @@ describe('Sink', function() { assert.deepEqual(config.reqOpts, { sinkName: sink.formattedName_, - sink: extend({}, currentMetadata, METADATA) + sink: extend({}, currentMetadata, METADATA), }); assert.strictEqual(config.gaxOpts, undefined); @@ -244,7 +244,7 @@ describe('Sink', function() { it('should accept gaxOptions', function(done) { var metadata = extend({}, METADATA, { - gaxOptions: {} + gaxOptions: {}, }); sink.logging.request = function(config) { From 1edcec0a93831ebaa583e8226743d5955577d8ed Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 19 Oct 2017 10:07:44 -0400 Subject: [PATCH 0108/1029] Add the newest autogen layer for logging. (#9) --- handwritten/logging/package.json | 4 +- .../protos/google/logging/v2/log_entry.proto | 164 ++ .../protos/google/logging/v2/logging.proto | 301 +++ .../google/logging/v2/logging_config.proto | 449 +++++ .../google/logging/v2/logging_metrics.proto | 250 +++ handwritten/logging/src/index.js | 32 +- handwritten/logging/src/log.js | 4 +- handwritten/logging/src/sink.js | 6 +- .../src/v2/config_service_v2_client.js | 1661 ++++++++++------ .../v2/config_service_v2_client_config.json | 51 +- .../src/v2/doc/doc_google_api_label.js | 38 - .../src/v2/doc/google/api/doc_distribution.js | 229 +++ .../src/v2/doc/google/api/doc_label.js | 62 + .../src/v2/doc/google/api/doc_metric.js | 242 +++ .../api/doc_monitored_resource.js} | 56 +- .../logging/type/doc_http_request.js} | 45 +- .../{ => google/logging/v2}/doc_log_entry.js | 79 +- .../{ => google/logging/v2}/doc_logging.js | 116 +- .../logging/v2}/doc_logging_config.js | 287 ++- .../logging/v2}/doc_logging_metrics.js | 150 +- .../protobuf/doc_any.js} | 54 +- .../protobuf/doc_duration.js} | 55 +- .../v2/doc/google/protobuf/doc_field_mask.js | 230 +++ .../protobuf/doc_timestamp.js} | 65 +- handwritten/logging/src/v2/index.js | 60 +- .../src/v2/logging_service_v2_client.js | 1762 +++++++++-------- .../v2/logging_service_v2_client_config.json | 23 +- .../src/v2/metrics_service_v2_client.js | 1145 +++++------ .../v2/metrics_service_v2_client_config.json | 17 +- handwritten/logging/system-test/logging.js | 6 +- handwritten/logging/test/gapic-v2.js | 1309 ++++++++++++ handwritten/logging/test/index.js | 50 +- handwritten/logging/test/log.js | 8 +- handwritten/logging/test/sink.js | 6 +- 34 files changed, 6618 insertions(+), 2398 deletions(-) create mode 100644 handwritten/logging/protos/google/logging/v2/log_entry.proto create mode 100644 handwritten/logging/protos/google/logging/v2/logging.proto create mode 100644 handwritten/logging/protos/google/logging/v2/logging_config.proto create mode 100644 handwritten/logging/protos/google/logging/v2/logging_metrics.proto delete mode 100644 handwritten/logging/src/v2/doc/doc_google_api_label.js create mode 100644 handwritten/logging/src/v2/doc/google/api/doc_distribution.js create mode 100644 handwritten/logging/src/v2/doc/google/api/doc_label.js create mode 100644 handwritten/logging/src/v2/doc/google/api/doc_metric.js rename handwritten/logging/src/v2/doc/{doc_google_api_monitored_resource.js => google/api/doc_monitored_resource.js} (70%) rename handwritten/logging/src/v2/doc/{doc_google_logging_type_http_request.js => google/logging/type/doc_http_request.js} (71%) rename handwritten/logging/src/v2/doc/{ => google/logging/v2}/doc_log_entry.js (73%) rename handwritten/logging/src/v2/doc/{ => google/logging/v2}/doc_logging.js (79%) rename handwritten/logging/src/v2/doc/{ => google/logging/v2}/doc_logging_config.js (53%) rename handwritten/logging/src/v2/doc/{ => google/logging/v2}/doc_logging_metrics.js (53%) rename handwritten/logging/src/v2/doc/{doc_google_protobuf_any.js => google/protobuf/doc_any.js} (74%) rename handwritten/logging/src/v2/doc/{doc_google_protobuf_duration.js => google/protobuf/doc_duration.js} (61%) create mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js rename handwritten/logging/src/v2/doc/{doc_google_protobuf_timestamp.js => google/protobuf/doc_timestamp.js} (54%) create mode 100644 handwritten/logging/test/gapic-v2.js diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f59d9c0324b..5a1eb313263 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -59,9 +59,11 @@ "extend": "^3.0.1", "gcp-metadata": "^0.3.1", "google-auto-auth": "^0.7.1", - "google-gax": "^0.14.0", + "google-gax": "^0.14.2", "google-proto-files": "^0.13.1", "is": "^3.0.1", + "lodash.merge": "^4.6.0", + "protobufjs": "^6.8.0", "pumpify": "^1.3.5", "snakecase-keys": "^1.1.0", "stream-events": "^1.0.1", diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto new file mode 100644 index 00000000000..3cd67b8d29f --- /dev/null +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -0,0 +1,164 @@ +// Copyright 2017 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. + +syntax = "proto3"; + +package google.logging.v2; + +import "google/api/annotations.proto"; +import "google/api/monitored_resource.proto"; +import "google/logging/type/http_request.proto"; +import "google/logging/type/log_severity.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Logging.V2"; +option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; +option java_multiple_files = true; +option java_outer_classname = "LogEntryProto"; +option java_package = "com.google.logging.v2"; + + +// An individual entry in a log. +message LogEntry { + // Required. The resource name of the log to which this log entry belongs: + // + // "projects/[PROJECT_ID]/logs/[LOG_ID]" + // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + // "folders/[FOLDER_ID]/logs/[LOG_ID]" + // + // `[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. + string log_name = 12; + + // 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. + google.api.MonitoredResource resource = 8; + + // Optional. The log entry payload, which can be one of multiple types. + oneof payload { + // The log entry payload, represented as a protocol buffer. Some + // Google Cloud Platform services use this field for their log + // entry payloads. + google.protobuf.Any proto_payload = 2; + + // The log entry payload, represented as a Unicode string (UTF-8). + string text_payload = 3; + + // The log entry payload, represented as a structure that is + // expressed as a JSON object. + google.protobuf.Struct json_payload = 6; + } + + // Optional. The time the event described by the log entry occurred. + // This time is used to compute the log entry's age and to enforce + // the logs retention period. If this field is omitted in a new log + // entry, then Stackdriver Logging assigns it the current time. + // + // Incoming log entries should have timestamps that are no more than + // the [logs retention period](/logging/quota-policy) in the past, + // and no more than 24 hours in the future. + // See the `entries.write` API method for more information. + google.protobuf.Timestamp timestamp = 9; + + // Output only. The time the log entry was received by Stackdriver Logging. + google.protobuf.Timestamp receive_timestamp = 24; + + // Optional. The severity of the log entry. The default value is + // `LogSeverity.DEFAULT`. + google.logging.type.LogSeverity severity = 10; + + // Optional. A unique identifier for the log entry. If you provide a value, + // then Stackdriver Logging considers other log entries in the same project, + // with the same `timestamp`, and with the same `insert_id` to be duplicates + // which can be removed. If omitted in new log entries, then Stackdriver + // Logging assigns its own unique identifier. The `insert_id` is also used + // to order log entries that have the same `timestamp` value. + string insert_id = 4; + + // Optional. Information about the HTTP request associated with this + // log entry, if applicable. + google.logging.type.HttpRequest http_request = 7; + + // Optional. A set of user-defined (key, value) data that provides additional + // information about the log entry. + map labels = 11; + + // Optional. Information about an operation associated with the log entry, if + // applicable. + LogEntryOperation operation = 15; + + // 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` + string trace = 22; + + // Optional. Source code location information associated with the log entry, + // if any. + LogEntrySourceLocation source_location = 23; +} + +// Additional information about a potentially long-running operation with which +// a log entry is associated. +message LogEntryOperation { + // Optional. An arbitrary operation identifier. Log entries with the + // same identifier are assumed to be part of the same operation. + string id = 1; + + // 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"`. + string producer = 2; + + // Optional. Set this to True if this is the first log entry in the operation. + bool first = 3; + + // Optional. Set this to True if this is the last log entry in the operation. + bool last = 4; +} + +// Additional information about the source code location that produced the log +// entry. +message LogEntrySourceLocation { + // Optional. Source file name. Depending on the runtime environment, this + // might be a simple name or a fully-qualified name. + string file = 1; + + // Optional. Line within the source file. 1-based; 0 indicates no line number + // available. + int64 line = 2; + + // 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). + string function = 3; +} diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto new file mode 100644 index 00000000000..8e937d88cc4 --- /dev/null +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -0,0 +1,301 @@ +// Copyright 2017 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. + +syntax = "proto3"; + +package google.logging.v2; + +import "google/api/annotations.proto"; +import "google/api/monitored_resource.proto"; +import "google/logging/v2/log_entry.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Logging.V2"; +option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; +option java_multiple_files = true; +option java_outer_classname = "LoggingProto"; +option java_package = "com.google.logging.v2"; + + +// Service for ingesting and querying logs. +service LoggingServiceV2 { + // Deletes all the log entries in a log. + // The log reappears if it receives new entries. + // Log entries written shortly before the delete operation might not be + // deleted. + rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { delete: "/v2beta1/{log_name=projects/*/logs/*}" }; + } + + // ## Log entry resources + // + // Writes log entries to Stackdriver Logging. This API method is the + // only way to send log entries to Stackdriver Logging. This method + // is used, directly or indirectly, by the Stackdriver Logging agent + // (fluentd) and all logging libraries configured to use Stackdriver + // Logging. + rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { + option (google.api.http) = { post: "/v2/entries:write" body: "*" }; + } + + // 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). + rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { + option (google.api.http) = { post: "/v2/entries:list" body: "*" }; + } + + // Lists the descriptors for monitored resource types used by Stackdriver + // Logging. + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { + option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; + } + + // Lists the logs in projects, organizations, folders, or billing accounts. + // Only logs that have entries are listed. + rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { + option (google.api.http) = { get: "/v2/{parent=projects/*}/logs" }; + } +} + +// The parameters to DeleteLog. +message DeleteLogRequest { + // Required. The resource name of the log to delete: + // + // "projects/[PROJECT_ID]/logs/[LOG_ID]" + // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + // "folders/[FOLDER_ID]/logs/[LOG_ID]" + // + // `[LOG_ID]` must be URL-encoded. For example, + // `"projects/my-project-id/logs/syslog"`, + // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + // For more information about log names, see + // [LogEntry][google.logging.v2.LogEntry]. + string log_name = 1; +} + +// The parameters to WriteLogEntries. +message WriteLogEntriesRequest { + // Optional. A default log resource name that is assigned to all log entries + // in `entries` that do not specify a value for `log_name`: + // + // "projects/[PROJECT_ID]/logs/[LOG_ID]" + // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + // "folders/[FOLDER_ID]/logs/[LOG_ID]" + // + // `[LOG_ID]` must be URL-encoded. For example, + // `"projects/my-project-id/logs/syslog"` or + // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + // For more information about log names, see + // [LogEntry][google.logging.v2.LogEntry]. + string log_name = 1; + + // 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][google.logging.v2.LogEntry]. + google.api.MonitoredResource resource = 2; + + // 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][google.logging.v2.LogEntry]. + map labels = 3; + + // Required. The log entries to send to Stackdriver Logging. The order of log + // entries in this list does not matter. Values supplied in this method's + // `log_name`, `resource`, and `labels` fields are copied into those log + // entries in this list that do not include values for their corresponding + // fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + // + // If the `timestamp` or `insert_id` fields are missing in log entries, then + // this method supplies the current time or a unique identifier, respectively. + // The supplied values are chosen so that, among the log entries that did not + // supply their own values, the entries earlier in the list will sort before + // the entries later in the list. See the `entries.list` method. + // + // Log entries with timestamps that are more than the + // [logs retention period](/logging/quota-policy) in the past or more than + // 24 hours in the future might be discarded. Discarding does not return + // an error. + // + // To improve throughput and to avoid exceeding the + // [quota limit](/logging/quota-policy) for calls to `entries.write`, + // you should try to include several log entries in this list, + // rather than calling this method for each individual log entry. + repeated LogEntry entries = 4; + + // 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, then the response status is the error associated + // with one of the failed entries and the response includes error details + // keyed by the entries' zero-based index in the `entries.write` method. + bool partial_success = 5; +} + +// Result returned from WriteLogEntries. +// empty +message WriteLogEntriesResponse { + +} + +// Error details for WriteLogEntries with partial success. +message WriteLogEntriesPartialErrors { + // When `WriteLogEntriesRequest.partial_success` is true, records the error + // status for entries that were not written due to a permanent error, keyed + // by the entry's zero-based index in `WriteLogEntriesRequest.entries`. + // + // Failed requests for which no entries are written will not include + // per-entry errors. + map log_entry_errors = 1; +} + +// The parameters to `ListLogEntries`. +message ListLogEntriesRequest { + // 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`. + repeated string project_ids = 1; + + // Required. Names of one or more parent resources from which to + // retrieve log entries: + // + // "projects/[PROJECT_ID]" + // "organizations/[ORGANIZATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]" + // "folders/[FOLDER_ID]" + // + // Projects listed in the `project_ids` field are added to this list. + repeated string resource_names = 8; + + // 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. + string filter = 2; + + // 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 their `insert_id` values. + string order_by = 3; + + // Optional. The maximum number of results to return from this request. + // Non-positive values are ignored. The presence of `next_page_token` in the + // response indicates that more results might be available. + int32 page_size = 4; + + // Optional. If present, then retrieve the next batch of results from the + // preceding call to this method. `page_token` must be the value of + // `next_page_token` from the previous response. The values of other method + // parameters should be identical to those in the previous call. + string page_token = 5; +} + +// Result returned from `ListLogEntries`. +message ListLogEntriesResponse { + // A list of log entries. If `entries` is empty, `nextPageToken` may still be + // returned, indicating that more entries may exist. See `nextPageToken` for + // more information. + repeated LogEntry entries = 1; + + // 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. + string next_page_token = 2; +} + +// The parameters to ListMonitoredResourceDescriptors +message ListMonitoredResourceDescriptorsRequest { + // 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. + int32 page_size = 1; + + // 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. + string page_token = 2; +} + +// Result returned from ListMonitoredResourceDescriptors. +message ListMonitoredResourceDescriptorsResponse { + // A list of resource descriptors. + repeated google.api.MonitoredResourceDescriptor resource_descriptors = 1; + + // 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`. + string next_page_token = 2; +} + +// The parameters to ListLogs. +message ListLogsRequest { + // Required. The resource name that owns the logs: + // + // "projects/[PROJECT_ID]" + // "organizations/[ORGANIZATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]" + // "folders/[FOLDER_ID]" + string parent = 1; + + // 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. + int32 page_size = 2; + + // 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. + string page_token = 3; +} + +// Result returned from ListLogs. +message ListLogsResponse { + // A list of log names. For example, + // `"projects/my-project/syslog"` or + // `"organizations/123/cloudresourcemanager.googleapis.com%2Factivity"`. + repeated string log_names = 3; + + // 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`. + string next_page_token = 2; +} diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto new file mode 100644 index 00000000000..b17e4a093d4 --- /dev/null +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -0,0 +1,449 @@ +// Copyright 2017 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. + +syntax = "proto3"; + +package google.logging.v2; + +import "google/api/annotations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Logging.V2"; +option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; +option java_multiple_files = true; +option java_outer_classname = "LoggingConfigProto"; +option java_package = "com.google.logging.v2"; + + +// Service for configuring sinks used to export log entries outside of +// Stackdriver Logging. +service ConfigServiceV2 { + // Lists sinks. + rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { + option (google.api.http) = { get: "/v2/{parent=projects/*}/sinks" }; + } + + // Gets a sink. + rpc GetSink(GetSinkRequest) returns (LogSink) { + option (google.api.http) = { get: "/v2/{sink_name=projects/*/sinks/*}" }; + } + + // 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. + rpc CreateSink(CreateSinkRequest) returns (LogSink) { + option (google.api.http) = { post: "/v2/{parent=projects/*}/sinks" body: "sink" }; + } + + // Updates a sink. 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 sink might also have a new `writer_identity`; see the + // `unique_writer_identity` field. + rpc UpdateSink(UpdateSinkRequest) returns (LogSink) { + option (google.api.http) = { put: "/v2/{sink_name=projects/*/sinks/*}" body: "sink" }; + } + + // Deletes a sink. If the sink has a unique `writer_identity`, then that + // service account is also deleted. + rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { delete: "/v2/{sink_name=projects/*/sinks/*}" }; + } + + // Lists all the exclusions in a parent resource. + rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { + option (google.api.http) = { get: "/v2/{parent=projects/*}/exclusions" }; + } + + // Gets the description of an exclusion. + rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { + option (google.api.http) = { get: "/v2/{name=projects/*/exclusions/*}" }; + } + + // Creates a new exclusion in a specified parent resource. + // Only log entries belonging to that resource can be excluded. + // You can have up to 10 exclusions in a resource. + rpc CreateExclusion(CreateExclusionRequest) returns (LogExclusion) { + option (google.api.http) = { post: "/v2/{parent=projects/*}/exclusions" body: "exclusion" }; + } + + // Changes one or more properties of an existing exclusion. + rpc UpdateExclusion(UpdateExclusionRequest) returns (LogExclusion) { + option (google.api.http) = { patch: "/v2/{name=projects/*/exclusions/*}" body: "exclusion" }; + } + + // Deletes an exclusion. + rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { delete: "/v2/{name=projects/*/exclusions/*}" }; + } +} + +// Describes a sink used to export log entries to one of the following +// destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a +// Cloud Pub/Sub topic. A logs filter controls which log entries are +// exported. The sink must be created within a project, organization, billing +// account, or folder. +message LogSink { + // Available log entry formats. Log entries can be written to Stackdriver + // Logging in either format and can be exported in either format. + // Version 2 is the preferred format. + enum VersionFormat { + // An unspecified format version that will default to V2. + VERSION_FORMAT_UNSPECIFIED = 0; + + // `LogEntry` version 2 format. + V2 = 1; + + // `LogEntry` version 1 format. + V1 = 2; + } + + // 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. + string name = 1; + + // 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). + string destination = 3; + + // 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 + string filter = 5; + + // Deprecated. The log entry format to use for this sink's exported log + // entries. The v2 format is used by default and cannot be changed. + VersionFormat output_version_format = 6; + + // Output only. An IAM identity—a service account or group—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. + string writer_identity = 8; + + // Optional. This field applies only to sinks owned by organizations and + // folders. If the field is false, the default, only the logs owned by the + // sink's parent resource are available for export. If the field is true, then + // logs from all the projects, folders, and billing accounts contained in the + // sink's parent resource are also available for export. Whether a particular + // log entry from the children is exported depends on the sink's filter + // expression. For example, if this field is true, then the filter + // `resource.type=gce_instance` would export all Compute Engine VM instance + // log entries from all projects in the sink's parent. To only export entries + // from certain child projects, filter on the project part of the log name: + // + // logName:("projects/test-project1/" OR "projects/test-project2/") AND + // resource.type=gce_instance + bool include_children = 9; + + // 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. + google.protobuf.Timestamp start_time = 10; + + // 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. + google.protobuf.Timestamp end_time = 11; +} + +// The parameters to `ListSinks`. +message ListSinksRequest { + // Required. The parent resource whose sinks are to be listed: + // + // "projects/[PROJECT_ID]" + // "organizations/[ORGANIZATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]" + // "folders/[FOLDER_ID]" + string parent = 1; + + // 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. + string page_token = 2; + + // 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. + int32 page_size = 3; +} + +// Result returned from `ListSinks`. +message ListSinksResponse { + // A list of sinks. + repeated LogSink sinks = 1; + + // 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`. + string next_page_token = 2; +} + +// The parameters to `GetSink`. +message GetSinkRequest { + // Required. The resource name of the sink: + // + // "projects/[PROJECT_ID]/sinks/[SINK_ID]" + // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + // "folders/[FOLDER_ID]/sinks/[SINK_ID]" + // + // Example: `"projects/my-project-id/sinks/my-sink-id"`. + string sink_name = 1; +} + +// The parameters to `CreateSink`. +message CreateSinkRequest { + // Required. The resource in which to create the sink: + // + // "projects/[PROJECT_ID]" + // "organizations/[ORGANIZATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]" + // "folders/[FOLDER_ID]" + // + // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + string parent = 1; + + // Required. The new sink, whose `name` parameter is a sink identifier that + // is not already in use. + LogSink sink = 2; + + // 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 + // the same group or service account used by Stackdriver Logging 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][google.logging.v2.LogSink]. + bool unique_writer_identity = 3; +} + +// The parameters to `UpdateSink`. +message UpdateSinkRequest { + // 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]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + // "folders/[FOLDER_ID]/sinks/[SINK_ID]" + // + // Example: `"projects/my-project-id/sinks/my-sink-id"`. + string sink_name = 1; + + // Required. The updated sink, whose name is the same identifier that appears + // as part of `sink_name`. + LogSink sink = 2; + + // 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 is 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 is true and the new value is + // set to false or defaulted to false. + bool unique_writer_identity = 3; +} + +// The parameters to `DeleteSink`. +message DeleteSinkRequest { + // 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]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + // "folders/[FOLDER_ID]/sinks/[SINK_ID]" + // + // Example: `"projects/my-project-id/sinks/my-sink-id"`. + string sink_name = 1; +} + +// Specifies a set of log entries that are not to be stored in Stackdriver +// Logging. If your project receives a large volume of logs, you might be able +// to use exclusions to reduce your chargeable logs. Exclusions are processed +// after log sinks, so you can export log entries before they are excluded. +// Audit log entries and log entries from Amazon Web Services are never +// excluded. +message LogExclusion { + // Required. A client-assigned identifier, such as + // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and + // can include only letters, digits, underscores, hyphens, and periods. + string name = 1; + + // Optional. A description of this exclusion. + string description = 2; + + // Required. + // An [advanced logs filter](/logging/docs/view/advanced_filters) + // that matches the log entries to be excluded. By using the + // [sample function](/logging/docs/view/advanced_filters#sample), + // you can exclude less than 100% of the matching log entries. + // For example, the following filter matches 99% of low-severity log + // entries from load balancers: + // + // "resource.type=http_load_balancer severity=ERROR" + // + // The maximum length of the filter is 20000 characters. + string filter = 3; + + // Optional. The metric descriptor associated with the logs-based metric. + // If unspecified, it uses a default metric descriptor with a DELTA metric + // kind, INT64 value type, with no labels and a unit of "1". Such a metric + // counts the number of log entries matching the `filter` expression. + // + // The `name`, `type`, and `description` fields in the `metric_descriptor` + // are output only, and is constructed using the `name` and `description` + // field in the LogMetric. + // + // To create a logs-based metric that records a distribution of log values, a + // DELTA metric kind with a DISTRIBUTION value type must be used along with + // a `value_extractor` expression in the LogMetric. + // + // Each label in the metric descriptor must have a matching label + // name as the key and an extractor expression as the value in the + // `label_extractors` map. + // + // The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot + // be updated once initially configured. New labels can be added in the + // `metric_descriptor`, but existing labels cannot be modified except for + // their description. + google.api.MetricDescriptor metric_descriptor = 5; + + // Optional. A `value_extractor` is required when using a distribution + // logs-based metric to extract the values to record from a log entry. + // Two functions are supported for value extraction: `EXTRACT(field)` or + // `REGEXP_EXTRACT(field, regex)`. The argument are: + // 1. field: The name of the log entry field from which the value is to be + // extracted. + // 2. regex: A regular expression using the Google RE2 syntax + // (https://github.com/google/re2/wiki/Syntax) with a single capture + // group to extract data from the specified log entry field. The value + // of the field is converted to a string before applying the regex. + // It is an error to specify a regex that does not include exactly one + // capture group. + // + // The result of the extraction must be convertible to a double type, as the + // distribution always records double values. If either the extraction or + // the conversion to double fails, then those values are not recorded in the + // distribution. + // + // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` + string value_extractor = 6; + + // Optional. A map from a label key string to an extractor expression which is + // used to extract data from a log entry field and assign as the label value. + // Each label key specified in the LabelDescriptor must have an associated + // extractor expression in this map. The syntax of the extractor expression + // is the same as for the `value_extractor` field. + // + // The extracted value is converted to the type defined in the label + // descriptor. If the either the extraction or the type conversion fails, + // the label will have a default value. The default value for a string + // label is an empty string, for an integer label its 0, and for a boolean + // label its `false`. + // + // Note that there are upper bounds on the maximum number of labels and the + // number of active time series that are allowed in a project. + map label_extractors = 7; + + // Optional. The `bucket_options` are required when the logs-based metric is + // using a DISTRIBUTION value type and it describes the bucket boundaries + // used to create a histogram of the extracted values. + google.api.Distribution.BucketOptions bucket_options = 8; + + // Deprecated. The API version that created or updated this metric. + // The v2 format is used by default and cannot be changed. + ApiVersion version = 4; +} + +// The parameters to ListLogMetrics. +message ListLogMetricsRequest { + // Required. The name of the project containing the metrics: + // + // "projects/[PROJECT_ID]" + string parent = 1; + + // 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. + string page_token = 2; + + // 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. + int32 page_size = 3; +} + +// Result returned from ListLogMetrics. +message ListLogMetricsResponse { + // A list of logs-based metrics. + repeated LogMetric metrics = 1; + + // 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`. + string next_page_token = 2; +} + +// The parameters to GetLogMetric. +message GetLogMetricRequest { + // The resource name of the desired metric: + // + // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + string metric_name = 1; +} + +// The parameters to CreateLogMetric. +message CreateLogMetricRequest { + // The resource name of the project in which to create the metric: + // + // "projects/[PROJECT_ID]" + // + // The new metric must be provided in the request. + string parent = 1; + + // The new logs-based metric, which must not have an identifier that + // already exists. + LogMetric metric = 2; +} + +// The parameters to UpdateLogMetric. +message UpdateLogMetricRequest { + // 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. + string metric_name = 1; + + // The updated metric. + LogMetric metric = 2; +} + +// The parameters to DeleteLogMetric. +message DeleteLogMetricRequest { + // The resource name of the metric to delete: + // + // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + string metric_name = 1; +} diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index fcd7fdde568..b24ce46be75 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -72,11 +72,27 @@ function Logging(options) { return new Logging(options); } + // Determine what scopes are needed. + // It is the union of the scopes on all three clients. + let scopes = []; + let clientClasses = [ + v2.ConfigServiceV2Client, + v2.LoggingServiceV2Client, + v2.MetricsServiceV2Client, + ]; + for (let clientClass of clientClasses) { + for (let scope of clientClass.scopes) { + if (clientClasses.indexOf(scope) === -1) { + scopes.push(scope); + } + } + } + var options_ = extend( { - scopes: v2.ALL_SCOPES, libName: 'gccl', libVersion: PKG.version, + scopes: scopes, }, options ); @@ -108,7 +124,7 @@ function Logging(options) { * destination. * @param {string=} config.filter - An advanced logs filter. Only log entries * matching the filter are written. - * @param {function} callback - The callback function. + * @param {function} callback - The cLoggingallback function. * @param {?error} callback.err - An error returned while making this request. * @param {module:logging/sink} callback.sink - The created Sink object. * @param {object} callback.apiResponse - The full API response. @@ -177,7 +193,7 @@ Logging.prototype.createSink = function(name, config, callback) { this.request( { - client: 'configServiceV2Client', + client: 'ConfigServiceV2Client', method: 'createSink', reqOpts: reqOpts, gaxOpts: config.gaxOptions, @@ -330,7 +346,7 @@ Logging.prototype.getEntries = function(options, callback) { this.request( { - client: 'loggingServiceV2Client', + client: 'LoggingServiceV2Client', method: 'listLogEntries', reqOpts: reqOpts, gaxOpts: gaxOptions, @@ -415,7 +431,7 @@ Logging.prototype.getEntriesStream = function(options) { ); requestStream = self.request({ - client: 'loggingServiceV2Client', + client: 'LoggingServiceV2Client', method: 'listLogEntriesStream', reqOpts: reqOpts, gaxOpts: gaxOptions, @@ -482,7 +498,7 @@ Logging.prototype.getSinks = function(options, callback) { this.request( { - client: 'configServiceV2Client', + client: 'ConfigServiceV2Client', method: 'listSinks', reqOpts: reqOpts, gaxOpts: gaxOptions, @@ -565,7 +581,7 @@ Logging.prototype.getSinksStream = function(options) { ); requestStream = self.request({ - client: 'configServiceV2Client', + client: 'ConfigServiceV2Client', method: 'listSinksStream', reqOpts: reqOpts, gaxOpts: gaxOptions, @@ -651,7 +667,7 @@ Logging.prototype.request = function(config, callback) { if (!gaxClient) { // Lazily instantiate client. - gaxClient = v2(self.options)[config.client](self.options); + gaxClient = new v2[config.client](self.options); self.api[config.client] = gaxClient; } diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 02221bddf5e..e93344bf144 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -228,7 +228,7 @@ Log.prototype.delete = function(gaxOptions, callback) { this.logging.request( { - client: 'loggingServiceV2Client', + client: 'LoggingServiceV2Client', method: 'deleteLog', reqOpts: reqOpts, gaxOpts: gaxOptions, @@ -640,7 +640,7 @@ Log.prototype.write = function(entry, options, callback) { self.logging.request( { - client: 'loggingServiceV2Client', + client: 'LoggingServiceV2Client', method: 'writeLogEntries', reqOpts: reqOpts, gaxOpts: options.gaxOptions, diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 337b1d4dcab..f5877bf8708 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -127,7 +127,7 @@ Sink.prototype.delete = function(gaxOptions, callback) { this.logging.request( { - client: 'configServiceV2Client', + client: 'ConfigServiceV2Client', method: 'deleteSink', reqOpts: reqOpts, gaxOpts: gaxOptions, @@ -179,7 +179,7 @@ Sink.prototype.getMetadata = function(gaxOptions, callback) { this.logging.request( { - client: 'configServiceV2Client', + client: 'ConfigServiceV2Client', method: 'getSink', reqOpts: reqOpts, gaxOpts: gaxOptions, @@ -281,7 +281,7 @@ Sink.prototype.setMetadata = function(metadata, callback) { self.logging.request( { - client: 'configServiceV2Client', + client: 'ConfigServiceV2Client', method: 'updateSink', reqOpts: reqOpts, gaxOpts: metadata.gaxOptions, diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index ee29d6ca1d4..129942fee34 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -1,632 +1,1131 @@ -/* - * Copyright 2016 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * EDITING INSTRUCTIONS - * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto, - * and updates to that file get reflected here through a refresh process. - * For the short term, the refresh process will only be runnable by Google - * engineers. - * - * The only allowed edits are to method and file documentation. A 3-way - * merge preserves those additions if the generated source changes. - */ -/* TODO: introduce line-wrapping so that it never exceeds the limit. */ -/* jscs: disable maximumLineLength */ -'use strict'; - -var configData = require('./config_service_v2_client_config'); -var extend = require('extend'); -var gax = require('google-gax'); - -var SERVICE_ADDRESS = 'logging.googleapis.com'; - -var DEFAULT_SERVICE_PORT = 443; +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +'use strict'; -var PAGE_DESCRIPTORS = { - listSinks: new gax.PageDescriptor('pageToken', 'nextPageToken', 'sinks'), -}; +const gapicConfig = require('./config_service_v2_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); -/** - * The scopes needed to make gRPC calls to all of the methods defined in - * this service. - */ -var ALL_SCOPES = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', -]; +const VERSION = require('../../package.json').version; /** * Service for configuring sinks used to export log entries outside of * Stackdriver Logging. * - * This will be created through a builder function which can be obtained by the module. - * See the following example of how to initialize the module and how to access to the builder. - * @see {@link configServiceV2Client} - * - * @example - * var loggingV2 = require('@google-cloud/logging').v2({ - * // optional auth parameters. - * }); - * var client = loggingV2.configServiceV2Client(); - * * @class + * @memberof v2 */ -function ConfigServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = extend( - { - servicePath: SERVICE_ADDRESS, - port: DEFAULT_SERVICE_PORT, - clientConfig: {}, - }, - opts - ); - - var googleApiClient = ['gl-node/' + process.versions.node]; - if (opts.libName && opts.libVersion) { - googleApiClient.push(opts.libName + '/' + opts.libVersion); - } - googleApiClient.push( - CODE_GEN_NAME_VERSION, - 'gax/' + gax.version, - 'grpc/' + gaxGrpc.grpcVersion - ); - - var defaults = gaxGrpc.constructSettings( - 'google.logging.v2.ConfigServiceV2', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')} - ); - - var self = this; - - this.auth = gaxGrpc.auth; - var configServiceV2Stub = gaxGrpc.createStub( - grpcClients.google.logging.v2.ConfigServiceV2, - opts - ); - var configServiceV2StubMethods = [ - 'listSinks', - 'getSink', - 'createSink', - 'updateSink', - 'deleteSink', - ]; - configServiceV2StubMethods.forEach(function(methodName) { - self['_' + methodName] = gax.createApiCall( - configServiceV2Stub.then(function(configServiceV2Stub) { - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return configServiceV2Stub[methodName].apply( - configServiceV2Stub, - args - ); - }; - }), - defaults[methodName], - PAGE_DESCRIPTORS[methodName] +class ConfigServiceV2Client { + /** + * Construct an instance of ConfigServiceV2Client. + * + * @param {object=} options - The configuration object. See the subsequent + * parameters for more details. + * @param {object=} options.credentials - Credentials object. + * @param {string=} options.credentials.client_email + * @param {string=} options.credentials.private_key + * @param {string=} options.email - Account email address. Required when + * usaing a .pem or .p12 keyFilename. + * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option above is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.projectId - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function=} options.promise - Custom promise module to use instead + * of native Promises. + * @param {string=} options.servicePath - The domain name of the + * API remote host. + */ + constructor(opts) { + this._descriptors = {}; + + // Ensure that options include the service address and port. + opts = Object.assign( + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts ); - }); -} -// Path templates + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = this.constructor.scopes; + var gaxGrpc = gax.grpc(opts); -var PROJECT_PATH_TEMPLATE = new gax.PathTemplate('projects/{project}'); + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth; -var SINK_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}/sinks/{sink}' -); + // Determine the client header string. + var clientHeader = [ + `gl-node/${process.version.node}`, + `grpc/${gaxGrpc.grpcVersion}`, + `gax/${gax.version}`, + `gapic/${VERSION}`, + ]; + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } -/** - * Returns a fully-qualified project resource name string. - * @param {String} project - * @returns {String} - */ -ConfigServiceV2Client.prototype.projectPath = function(project) { - return PROJECT_PATH_TEMPLATE.render({ - project: project, - }); -}; + // Load the applicable protos. + var protos = merge( + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging_config.proto' + ) + ); -/** - * Parses the projectName from a project resource. - * @param {String} projectName - * A fully-qualified path representing a project resources. - * @returns {String} - A string representing the project. - */ -ConfigServiceV2Client.prototype.matchProjectFromProjectName = function( - projectName -) { - return PROJECT_PATH_TEMPLATE.match(projectName).project; -}; + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + projectPathTemplate: new gax.PathTemplate('projects/{project}'), + sinkPathTemplate: new gax.PathTemplate('projects/{project}/sinks/{sink}'), + exclusionPathTemplate: new gax.PathTemplate( + 'projects/{project}/exclusions/{exclusion}' + ), + }; -/** - * Returns a fully-qualified sink resource name string. - * @param {String} project - * @param {String} sink - * @returns {String} - */ -ConfigServiceV2Client.prototype.sinkPath = function(project, sink) { - return SINK_PATH_TEMPLATE.render({ - project: project, - sink: sink, - }); -}; + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this._descriptors.page = { + listSinks: new gax.PageDescriptor('pageToken', 'nextPageToken', 'sinks'), + listExclusions: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'exclusions' + ), + }; -/** - * Parses the sinkName from a sink resource. - * @param {String} sinkName - * A fully-qualified path representing a sink resources. - * @returns {String} - A string representing the project. - */ -ConfigServiceV2Client.prototype.matchProjectFromSinkName = function(sinkName) { - return SINK_PATH_TEMPLATE.match(sinkName).project; -}; + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.logging.v2.ConfigServiceV2', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); -/** - * Parses the sinkName from a sink resource. - * @param {String} sinkName - * A fully-qualified path representing a sink resources. - * @returns {String} - A string representing the sink. - */ -ConfigServiceV2Client.prototype.matchSinkFromSinkName = function(sinkName) { - return SINK_PATH_TEMPLATE.match(sinkName).sink; -}; + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; -/** - * Get the project ID used by this class. - * @aram {function(Error, string)} callback - the callback to be called with - * the current project Id. - */ -ConfigServiceV2Client.prototype.getProjectId = function(callback) { - return this.auth.getProjectId(callback); -}; + // Put together the "service stub" for + // google.logging.v2.ConfigServiceV2. + var configServiceV2Stub = gaxGrpc.createStub( + protos.google.logging.v2.ConfigServiceV2, + opts + ); -// Service calls + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var configServiceV2StubMethods = [ + 'listSinks', + 'getSink', + 'createSink', + 'updateSink', + 'deleteSink', + 'listExclusions', + 'getExclusion', + 'createExclusion', + 'updateExclusion', + 'deleteExclusion', + ]; + for (let methodName of configServiceV2StubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + configServiceV2Stub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); + } + } -/** - * Lists sinks. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose sinks are to be listed. - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [LogSink]{@link LogSink}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListSinksResponse]{@link ListSinksResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogSink]{@link LogSink}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogSink]{@link LogSink} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListSinksResponse]{@link ListSinksResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.configServiceV2Client(); - * var formattedParent = client.projectPath("[PROJECT]"); - * // Iterate over all elements. - * client.listSinks({parent: formattedParent}).then(function(responses) { - * var resources = responses[0]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]) - * } - * }).catch(function(err) { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * var options = {autoPaginate: false}; - * function callback(responses) { - * // The actual resources in a response. - * var resources = responses[0]; - * // The next request if the response shows there's more responses. - * var nextRequest = responses[1]; - * // The actual response object, if necessary. - * // var rawResponse = responses[2]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listSinks(nextRequest, options).then(callback); - * } - * } - * client.listSinks({parent: formattedParent}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -ConfigServiceV2Client.prototype.listSinks = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'logging.googleapis.com'; } - if (options === undefined) { - options = {}; + + /** + * The port for this API service. + */ + static get port() { + return 443; } - return this._listSinks(request, options, callback); -}; + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; + } -/** - * Equivalent to {@link listSinks}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listSinks} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose sinks are to be listed. - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @return {Stream} - * An object stream which emits an object representing [LogSink]{@link LogSink} on 'data' event. - * - * @example - * - * var client = loggingV2.configServiceV2Client(); - * var formattedParent = client.projectPath("[PROJECT]"); - * client.listSinksStream({parent: formattedParent}).on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.error(err); - * }); - */ -ConfigServiceV2Client.prototype.listSinksStream = function(request, options) { - if (options === undefined) { - options = {}; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId(callback) { + return this.auth.getProjectId(callback); } - return PAGE_DESCRIPTORS.listSinks.createStream( - this._listSinks, - request, - options - ); -}; + // ------------------- + // -- Service calls -- + // ------------------- -/** - * Gets a sink. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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 - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogSink]{@link LogSink}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.configServiceV2Client(); - * var formattedSinkName = client.sinkPath("[PROJECT]", "[SINK]"); - * client.getSink({sinkName: formattedSinkName}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }).catch(function(err) { - * console.error(err); - * }); - */ -ConfigServiceV2Client.prototype.getSink = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * Lists sinks. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [LogSink]{@link google.logging.v2.LogSink}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogSink]{@link google.logging.v2.LogSink}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogSink]{@link google.logging.v2.LogSink} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * client.listSinks({parent: formattedParent}) + * .then(responses => { + * var resources = responses[0]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]) + * } + * }) + * .catch(err => { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * + * var options = {autoPaginate: false}; + * var callback = responses => { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows that there are more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listSinks(nextRequest, options).then(callback); + * } + * } + * client.listSinks({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listSinks(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listSinks(request, options, callback); } - if (options === undefined) { - options = {}; + + /** + * Equivalent to {@link listSinks}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listSinks} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @returns {Stream} + * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * client.listSinksStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listSinksStream(request, options) { + options = options || {}; + + return this._descriptors.page.listSinks.createStream( + this._innerApiCalls.listSinks, + request, + options + ); } - return this._getSink(request, options, callback); -}; + /** + * Gets a sink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.sinkName + * Required. The resource name of the sink: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + * client.getSink({sinkName: formattedSinkName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getSink(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * 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. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource in which to create the sink: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {Object} request.sink - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * This object should have the same structure as [LogSink]{@link LogSink} - * @param {boolean=} request.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 {@link LogSink}. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogSink]{@link LogSink}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.configServiceV2Client(); - * var formattedParent = client.projectPath("[PROJECT]"); - * var sink = {}; - * var request = { - * parent: formattedParent, - * sink: sink - * }; - * client.createSink(request).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }).catch(function(err) { - * console.error(err); - * }); - */ -ConfigServiceV2Client.prototype.createSink = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + return this._innerApiCalls.getSink(request, options, callback); } - if (options === undefined) { - options = {}; + + /** + * 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. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource in which to create the sink: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {Object} request.sink + * Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. + * + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} + * @param {boolean=} request.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 + * the same group or service account used by Stackdriver Logging 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 {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * var sink = {}; + * var request = { + * parent: formattedParent, + * sink: sink, + * }; + * client.createSink(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createSink(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.createSink(request, options, callback); } - return this._createSink(request, options, callback); -}; + /** + * Updates a sink. 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 sink might also have a new `writer_identity`; see the + * `unique_writer_identity` field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {Object} request.sink + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. + * + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} + * @param {boolean=} request.uniqueWriterIdentity + * Optional. See + * [sinks.create](https://cloud.google.com/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 is 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 is true and the new value is + * set to false or defaulted to false. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + * var sink = {}; + * var request = { + * sinkName: formattedSinkName, + * sink: sink, + * }; + * client.updateSink(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateSink(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Updates a sink. If the named sink doesn't exist, then this method is - * identical to - * [sinks.create](https://cloud.google.com/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. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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 {Object} request.sink - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. If `sink_name` does not exist, then - * this method creates a new sink. - * - * This object should have the same structure as [LogSink]{@link LogSink} - * @param {boolean=} request.uniqueWriterIdentity - * Optional. See - * [sinks.create](https://cloud.google.com/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 {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogSink]{@link LogSink}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.configServiceV2Client(); - * var formattedSinkName = client.sinkPath("[PROJECT]", "[SINK]"); - * var sink = {}; - * var request = { - * sinkName: formattedSinkName, - * sink: sink - * }; - * client.updateSink(request).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }).catch(function(err) { - * console.error(err); - * }); - */ -ConfigServiceV2Client.prototype.updateSink = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + return this._innerApiCalls.updateSink(request, options, callback); } - if (options === undefined) { - options = {}; + + /** + * Deletes a sink. If the sink has a unique `writer_identity`, then that + * service account is also deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @returns {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + * client.deleteSink({sinkName: formattedSinkName}).catch(err => { + * console.error(err); + * }); + */ + deleteSink(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.deleteSink(request, options, callback); } - return this._updateSink(request, options, callback); -}; + /** + * Lists all the exclusions in a parent resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose exclusions are to be listed. + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogExclusion]{@link google.logging.v2.LogExclusion} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * client.listExclusions({parent: formattedParent}) + * .then(responses => { + * var resources = responses[0]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]) + * } + * }) + * .catch(err => { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * + * var options = {autoPaginate: false}; + * var callback = responses => { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows that there are more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listExclusions(nextRequest, options).then(callback); + * } + * } + * client.listExclusions({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listExclusions(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Deletes a sink. If the sink has a unique `writer_identity`, then that - * service account is also deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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 - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.configServiceV2Client(); - * var formattedSinkName = client.sinkPath("[PROJECT]", "[SINK]"); - * client.deleteSink({sinkName: formattedSinkName}).catch(function(err) { - * console.error(err); - * }); - */ -ConfigServiceV2Client.prototype.deleteSink = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + return this._innerApiCalls.listExclusions(request, options, callback); + } + + /** + * Equivalent to {@link listExclusions}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listExclusions} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose exclusions are to be listed. + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @returns {Stream} + * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * client.listExclusionsStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listExclusionsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listExclusions.createStream( + this._innerApiCalls.listExclusions, + request, + options + ); + } + + /** + * Gets the description of an exclusion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of an existing exclusion: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + * client.getExclusion({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getExclusion(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.getExclusion(request, options, callback); + } + + /** + * Creates a new exclusion in a specified parent resource. + * Only log entries belonging to that resource can be excluded. + * You can have up to 10 exclusions in a resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource in which to create the exclusion: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {Object} request.exclusion + * Required. The new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + * + * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * var exclusion = {}; + * var request = { + * parent: formattedParent, + * exclusion: exclusion, + * }; + * client.createExclusion(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createExclusion(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.createExclusion(request, options, callback); } - if (options === undefined) { - options = {}; + + /** + * Changes one or more properties of an existing exclusion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the exclusion to update: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * @param {Object} request.exclusion + * Required. New values for the existing exclusion. Only the fields specified + * in `update_mask` are relevant. + * + * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} + * @param {Object} request.updateMask + * Required. A nonempty list of fields to change in the existing exclusion. + * New values for the fields are taken from the corresponding fields in the + * LogExclusion included in this request. Fields not mentioned in + * `update_mask` are not changed and are ignored in the request. + * + * For example, to change the filter and description of an exclusion, + * specify an `update_mask` of `"filter,description"`. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + * var exclusion = {}; + * var updateMask = {}; + * var request = { + * name: formattedName, + * exclusion: exclusion, + * updateMask: updateMask, + * }; + * client.updateExclusion(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateExclusion(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.updateExclusion(request, options, callback); } - return this._deleteSink(request, options, callback); -}; + /** + * Deletes an exclusion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of an existing exclusion to delete: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @returns {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + * client.deleteExclusion({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteExclusion(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -function ConfigServiceV2ClientBuilder(gaxGrpc) { - if (!(this instanceof ConfigServiceV2ClientBuilder)) { - return new ConfigServiceV2ClientBuilder(gaxGrpc); + return this._innerApiCalls.deleteExclusion(request, options, callback); } - var configServiceV2Client = gaxGrpc.load([ - { - root: require('google-proto-files')('..'), - file: 'google/logging/v2/logging_config.proto', - }, - ]); - extend(this, configServiceV2Client.google.logging.v2); + // -------------------- + // -- Path templates -- + // -------------------- /** - * Build a new instance of {@link ConfigServiceV2Client}. - * - * @param {Object=} opts - The optional parameters. - * @param {String=} opts.servicePath - * The domain name of the API remote host. - * @param {number=} opts.port - * The port on which to connect to the remote host. - * @param {grpc.ClientCredentials=} opts.sslCreds - * A ClientCredentials for use with an SSL-enabled channel. - * @param {Object=} opts.clientConfig - * The customized config to build the call settings. See - * {@link gax.constructSettings} for the format. + * Return a fully-qualified project resource name string. + * + * @param {String} project + * @returns {String} */ - this.configServiceV2Client = function(opts) { - return new ConfigServiceV2Client(gaxGrpc, configServiceV2Client, opts); - }; - extend(this.configServiceV2Client, ConfigServiceV2Client); + projectPath(project) { + return this._pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Return a fully-qualified sink resource name string. + * + * @param {String} project + * @param {String} sink + * @returns {String} + */ + sinkPath(project, sink) { + return this._pathTemplates.sinkPathTemplate.render({ + project: project, + sink: sink, + }); + } + + /** + * Return a fully-qualified exclusion resource name string. + * + * @param {String} project + * @param {String} exclusion + * @returns {String} + */ + exclusionPath(project, exclusion) { + return this._pathTemplates.exclusionPathTemplate.render({ + project: project, + exclusion: exclusion, + }); + } + + /** + * Parse the projectName from a project resource. + * + * @param {String} projectName + * A fully-qualified path representing a project resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromProjectName(projectName) { + return this._pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Parse the sinkName from a sink resource. + * + * @param {String} sinkName + * A fully-qualified path representing a sink resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromSinkName(sinkName) { + return this._pathTemplates.sinkPathTemplate.match(sinkName).project; + } + + /** + * Parse the sinkName from a sink resource. + * + * @param {String} sinkName + * A fully-qualified path representing a sink resources. + * @returns {String} - A string representing the sink. + */ + matchSinkFromSinkName(sinkName) { + return this._pathTemplates.sinkPathTemplate.match(sinkName).sink; + } + + /** + * Parse the exclusionName from a exclusion resource. + * + * @param {String} exclusionName + * A fully-qualified path representing a exclusion resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromExclusionName(exclusionName) { + return this._pathTemplates.exclusionPathTemplate.match(exclusionName) + .project; + } + + /** + * Parse the exclusionName from a exclusion resource. + * + * @param {String} exclusionName + * A fully-qualified path representing a exclusion resources. + * @returns {String} - A string representing the exclusion. + */ + matchExclusionFromExclusionName(exclusionName) { + return this._pathTemplates.exclusionPathTemplate.match(exclusionName) + .exclusion; + } } -module.exports = ConfigServiceV2ClientBuilder; -module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; + +module.exports = ConfigServiceV2Client; diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index 2c1685982f6..733cac2aba0 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -4,6 +4,7 @@ "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", + "INTERNAL", "UNAVAILABLE" ], "non_idempotent": [] @@ -13,35 +14,69 @@ "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.2, "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 2000, + "initial_rpc_timeout_millis": 30000, "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 45000 + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 90000 + }, + "write_sink": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.2, + "max_retry_delay_millis": 1000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.5, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 120000 } }, "methods": { "ListSinks": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetSink": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateSink": { - "timeout_millis": 30000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateSink": { - "timeout_millis": 30000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteSink": { - "timeout_millis": 30000, + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListExclusions": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteExclusion": { + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/handwritten/logging/src/v2/doc/doc_google_api_label.js b/handwritten/logging/src/v2/doc/doc_google_api_label.js deleted file mode 100644 index 9ff6c7803de..00000000000 --- a/handwritten/logging/src/v2/doc/doc_google_api_label.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ - -/** - * A description of a label. - * - * @external "google.api.LabelDescriptor" - * @property {string} key - * The label key. - * - * @property {number} valueType - * The type of data that can be assigned to the label. - * - * The number should be among the values of [google.api.LabelDescriptor.ValueType]{@link external:"google.api.LabelDescriptor.ValueType"} - * - * @property {string} description - * A human-readable description for the label. - * - * @see [google.api.LabelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/label.proto} - */ diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js new file mode 100644 index 00000000000..2ebda08c4d9 --- /dev/null +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -0,0 +1,229 @@ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * Distribution contains summary statistics for a population of values and, + * optionally, a histogram representing the distribution of those values across + * a specified set of histogram buckets. + * + * The summary statistics are the count, mean, sum of the squared deviation from + * the mean, the minimum, and the maximum of the set of population of values. + * + * The histogram is based on a sequence of buckets and gives a count of values + * that fall into each bucket. The boundaries of the buckets are given either + * explicitly or by specifying parameters for a method of computing them + * (buckets of fixed width or buckets of exponentially increasing width). + * + * Although it is not forbidden, it is generally a bad idea to include + * non-finite values (infinities or NaNs) in the population of values, as this + * will render the `mean` and `sum_of_squared_deviation` fields meaningless. + * + * @property {number} count + * The number of values in the population. Must be non-negative. + * + * @property {number} mean + * The arithmetic mean of the values in the population. If `count` is zero + * then this field must be zero. + * + * @property {number} sumOfSquaredDeviation + * The sum of squared deviations from the mean of the values in the + * population. For values x_i this is: + * + * Sum[i=1..n](https://cloud.google.com(x_i - mean)^2) + * + * Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition + * describes Welford's method for accumulating this sum in one pass. + * + * If `count` is zero then this field must be zero. + * + * @property {Object} range + * If specified, contains the range of the population values. The field + * must not be present if the `count` is zero. + * + * This object should have the same structure as [Range]{@link google.api.Range} + * + * @property {Object} bucketOptions + * Defines the histogram bucket boundaries. + * + * This object should have the same structure as [BucketOptions]{@link google.api.BucketOptions} + * + * @property {number[]} bucketCounts + * If `bucket_options` is given, then the sum of the values in `bucket_counts` + * must equal the value in `count`. If `bucket_options` is not given, no + * `bucket_counts` fields may be given. + * + * Bucket counts are given in order under the numbering scheme described + * above (the underflow bucket has number 0; the finite buckets, if any, + * have numbers 1 through N-2; the overflow bucket has number N-1). + * + * The size of `bucket_counts` must be no greater than N as defined in + * `bucket_options`. + * + * Any suffix of trailing zero bucket_count fields may be omitted. + * + * @typedef Distribution + * @memberof google.api + * @see [google.api.Distribution definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} + */ +var Distribution = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The range of the population values. + * + * @property {number} min + * The minimum of the population values. + * + * @property {number} max + * The maximum of the population values. + * + * @typedef Range + * @memberof google.api + * @see [google.api.Distribution.Range definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} + */ + Range: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * A Distribution may optionally contain a histogram of the values in the + * population. The histogram is given in `bucket_counts` as counts of values + * that fall into one of a sequence of non-overlapping buckets. The sequence + * of buckets is described by `bucket_options`. + * + * A bucket specifies an inclusive lower bound and exclusive upper bound for + * the values that are counted for that bucket. The upper bound of a bucket + * is strictly greater than the lower bound. + * + * The sequence of N buckets for a Distribution consists of an underflow + * bucket (number 0), zero or more finite buckets (number 1 through N - 2) and + * an overflow bucket (number N - 1). The buckets are contiguous: the lower + * bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. + * The buckets span the whole range of finite values: lower bound of the + * underflow bucket is -infinity and the upper bound of the overflow bucket is + * +infinity. The finite buckets are so-called because both bounds are + * finite. + * + * `BucketOptions` describes bucket boundaries in one of three ways. Two + * describe the boundaries by giving parameters for a formula to generate + * boundaries and one gives the bucket boundaries explicitly. + * + * If `bucket_boundaries` is not given, then no `bucket_counts` may be given. + * + * @property {Object} linearBuckets + * The linear bucket. + * + * This object should have the same structure as [Linear]{@link google.api.Linear} + * + * @property {Object} exponentialBuckets + * The exponential buckets. + * + * This object should have the same structure as [Exponential]{@link google.api.Exponential} + * + * @property {Object} explicitBuckets + * The explicit buckets. + * + * This object should have the same structure as [Explicit]{@link google.api.Explicit} + * + * @typedef BucketOptions + * @memberof google.api + * @see [google.api.Distribution.BucketOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} + */ + BucketOptions: { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Specify a sequence of buckets that all have the same width (except + * overflow and underflow). Each bucket represents a constant absolute + * uncertainty on the specific value in the bucket. + * + * Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for + * bucket `i`: + * + * Upper bound (0 <= i < N-1): offset + (width * i). + * Lower bound (1 <= i < N): offset + (width * (i - 1)). + * + * @property {number} numFiniteBuckets + * Must be greater than 0. + * + * @property {number} width + * Must be greater than 0. + * + * @property {number} offset + * Lower bound of the first bucket. + * + * @typedef Linear + * @memberof google.api + * @see [google.api.Distribution.BucketOptions.Linear definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} + */ + Linear: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Specify a sequence of buckets that have a width that is proportional to + * the value of the lower bound. Each bucket represents a constant relative + * uncertainty on a specific value in the bucket. + * + * Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for + * bucket i: + * + * Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). + * Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). + * + * @property {number} numFiniteBuckets + * Must be greater than 0. + * + * @property {number} growthFactor + * Must be greater than 1. + * + * @property {number} scale + * Must be greater than 0. + * + * @typedef Exponential + * @memberof google.api + * @see [google.api.Distribution.BucketOptions.Exponential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} + */ + Exponential: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * A set of buckets with arbitrary widths. + * + * Defines `size(bounds) + 1` (= N) buckets with these boundaries for + * bucket i: + * + * Upper bound (0 <= i < N-1): bounds[i] + * Lower bound (1 <= i < N); bounds[i - 1] + * + * There must be at least one element in `bounds`. If `bounds` has only one + * element, there are no finite buckets, and that single element is the + * common boundary of the overflow and underflow buckets. + * + * @property {number[]} bounds + * The values must be monotonically increasing. + * + * @typedef Explicit + * @memberof google.api + * @see [google.api.Distribution.BucketOptions.Explicit definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} + */ + Explicit: { + // This is for documentation. Actual contents will be loaded by gRPC. + } + } +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_label.js b/handwritten/logging/src/v2/doc/google/api/doc_label.js new file mode 100644 index 00000000000..602286cb52b --- /dev/null +++ b/handwritten/logging/src/v2/doc/google/api/doc_label.js @@ -0,0 +1,62 @@ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * A description of a label. + * + * @property {string} key + * The label key. + * + * @property {number} valueType + * The type of data that can be assigned to the label. + * + * The number should be among the values of [ValueType]{@link google.api.ValueType} + * + * @property {string} description + * A human-readable description for the label. + * + * @typedef LabelDescriptor + * @memberof google.api + * @see [google.api.LabelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/label.proto} + */ +var LabelDescriptor = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Value types that can be used as label values. + * + * @enum {number} + * @memberof google.api + */ + ValueType: { + + /** + * A variable-length string. This is the default. + */ + STRING: 0, + + /** + * Boolean; true or false. + */ + BOOL: 1, + + /** + * A 64-bit signed integer. + */ + INT64: 2 + } +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js new file mode 100644 index 00000000000..7a7247a2397 --- /dev/null +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -0,0 +1,242 @@ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * Defines a metric type and its schema. Once a metric descriptor is created, + * deleting or altering it stops data collection and makes the metric type's + * existing data unusable. + * + * @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 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" + * + * @property {Object[]} labels + * The set of labels that can be used to describe a specific + * instance of this metric type. For example, the + * `appengine.googleapis.com/http/server/response_latencies` metric + * type has a label for the HTTP response code, `response_code`, so + * you can look at latencies for successful responses or just + * for responses that failed. + * + * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} + * + * @property {number} metricKind + * Whether the metric records instantaneous values, changes to a value, etc. + * Some combinations of `metric_kind` and `value_type` might not be supported. + * + * The number should be among the values of [MetricKind]{@link google.api.MetricKind} + * + * @property {number} valueType + * Whether the measurement is an integer, a floating-point number, etc. + * Some combinations of `metric_kind` and `value_type` might not be supported. + * + * The number should be among the values of [ValueType]{@link google.api.ValueType} + * + * @property {string} unit + * The unit in which the metric value is reported. It is only applicable + * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The + * supported units are a subset of [The Unified Code for Units of + * Measure](http://unitsofmeasure.org/ucum.html) standard: + * + * **Basic units (UNIT)** + * + * * `bit` bit + * * `By` byte + * * `s` second + * * `min` minute + * * `h` hour + * * `d` day + * + * **Prefixes (PREFIX)** + * + * * `k` kilo (10**3) + * * `M` mega (10**6) + * * `G` giga (10**9) + * * `T` tera (10**12) + * * `P` peta (10**15) + * * `E` exa (10**18) + * * `Z` zetta (10**21) + * * `Y` yotta (10**24) + * * `m` milli (10**-3) + * * `u` micro (10**-6) + * * `n` nano (10**-9) + * * `p` pico (10**-12) + * * `f` femto (10**-15) + * * `a` atto (10**-18) + * * `z` zepto (10**-21) + * * `y` yocto (10**-24) + * * `Ki` kibi (2**10) + * * `Mi` mebi (2**20) + * * `Gi` gibi (2**30) + * * `Ti` tebi (2**40) + * + * **Grammar** + * + * The grammar includes the dimensionless unit `1`, such as `1/s`. + * + * The grammar also includes these connectors: + * + * * `/` division (as an infix operator, e.g. `1/s`). + * * `.` multiplication (as an infix operator, e.g. `GBy.d`) + * + * The grammar for a unit is as follows: + * + * Expression = Component { "." Component } { "/" Component } ; + * + * Component = [ PREFIX ] UNIT [ Annotation ] + * | Annotation + * | "1" + * ; + * + * Annotation = "{" NAME "}" ; + * + * Notes: + * + * * `Annotation` is just a comment if it follows a `UNIT` and is + * equivalent to `1` if it is used alone. For examples, + * `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. + * * `NAME` is a sequence of non-blank printable ASCII characters not + * containing '{' or '}'. + * + * @property {string} description + * A detailed description of the metric, which can be used in documentation. + * + * @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". + * + * @typedef MetricDescriptor + * @memberof google.api + * @see [google.api.MetricDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} + */ +var MetricDescriptor = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The kind of measurement. It describes how the data is reported. + * + * @enum {number} + * @memberof google.api + */ + MetricKind: { + + /** + * Do not use this default value. + */ + METRIC_KIND_UNSPECIFIED: 0, + + /** + * An instantaneous measurement of a value. + */ + GAUGE: 1, + + /** + * The change in a value during a time interval. + */ + DELTA: 2, + + /** + * A value accumulated over a time interval. Cumulative + * measurements in a time series should have the same start time + * and increasing end times, until an event resets the cumulative + * value to zero and sets a new start time for the following + * points. + */ + CUMULATIVE: 3 + }, + + /** + * The value type of a metric. + * + * @enum {number} + * @memberof google.api + */ + ValueType: { + + /** + * Do not use this default value. + */ + VALUE_TYPE_UNSPECIFIED: 0, + + /** + * The value is a boolean. + * This value type can be used only if the metric kind is `GAUGE`. + */ + BOOL: 1, + + /** + * The value is a signed 64-bit integer. + */ + INT64: 2, + + /** + * The value is a double precision floating point number. + */ + DOUBLE: 3, + + /** + * The value is a text string. + * This value type can be used only if the metric kind is `GAUGE`. + */ + STRING: 4, + + /** + * The value is a `Distribution`. + */ + DISTRIBUTION: 5, + + /** + * The value is money. + */ + MONEY: 6 + } +}; + +/** + * A specific metric, identified by specifying values for all of the + * labels of a `MetricDescriptor`. + * + * @property {string} type + * An existing metric type, see google.api.MetricDescriptor. + * For example, `custom.googleapis.com/invoice/paid/amount`. + * + * @property {Object.} labels + * The set of label values that uniquely identify this metric. All + * labels listed in the `MetricDescriptor` must be assigned values. + * + * @typedef Metric + * @memberof google.api + * @see [google.api.Metric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} + */ +var Metric = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js similarity index 70% rename from handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js rename to handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index aab530e6677..31d25663448 100644 --- a/handwritten/logging/src/v2/doc/doc_google_api_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -1,26 +1,22 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** - * An object that describes the schema of a {@link MonitoredResource} object using a + * An object that describes the schema of a MonitoredResource object using a * type name and a set of labels. For example, the monitored resource * descriptor for Google Compute Engine VM instances has a type of * `"gce_instance"` and specifies the use of the labels `"instance_id"` and @@ -30,7 +26,6 @@ * provide a `list` method that returns the monitored resource descriptors used * by the API. * - * @external "google.api.MonitoredResourceDescriptor" * @property {string} name * Optional. The resource name of the monitored resource descriptor: * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where @@ -59,30 +54,34 @@ * resource type. For example, an individual Google Cloud SQL database is * identified by values for the labels `"database_id"` and `"zone"`. * - * This object should have the same structure as [google.api.LabelDescriptor]{@link external:"google.api.LabelDescriptor"} + * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} * + * @typedef MonitoredResourceDescriptor + * @memberof google.api * @see [google.api.MonitoredResourceDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ +var MonitoredResourceDescriptor = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; /** * An object representing a resource that can be used for monitoring, logging, * billing, or other purposes. Examples include virtual machine instances, * databases, and storage devices such as disks. The `type` field identifies a - * {@link MonitoredResourceDescriptor} object that describes the resource's + * MonitoredResourceDescriptor object that describes the resource's * schema. Information in the `labels` field identifies the actual resource and * its attributes according to the schema. For example, a particular Compute * Engine VM instance could be represented by the following object, because the - * {@link MonitoredResourceDescriptor} for `"gce_instance"` has labels + * MonitoredResourceDescriptor for `"gce_instance"` has labels * `"instance_id"` and `"zone"`: * * { "type": "gce_instance", * "labels": { "instance_id": "12345678901234", * "zone": "us-central1-a" }} * - * @external "google.api.MonitoredResource" * @property {string} type * Required. The monitored resource type. This field must match - * the `type` field of a {@link MonitoredResourceDescriptor} object. For + * the `type` field of a MonitoredResourceDescriptor object. For * example, the type of a Cloud SQL database is `"cloudsql_database"`. * * @property {Object.} labels @@ -90,5 +89,10 @@ * resource descriptor. For example, Cloud SQL databases use the labels * `"database_id"` and `"zone"`. * + * @typedef MonitoredResource + * @memberof google.api * @see [google.api.MonitoredResource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ +var MonitoredResource = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js similarity index 71% rename from handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js rename to handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js index 7e8e5cf35af..66827c9d58e 100644 --- a/handwritten/logging/src/v2/doc/doc_google_logging_type_http_request.js +++ b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js @@ -1,30 +1,25 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * A common proto for logging HTTP requests. Only contains semantics * defined by the HTTP specification. Product-specific logging * information MUST be defined in a separate message. * - * @external "google.logging.type.HttpRequest" * @property {string} requestMethod * The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. * @@ -65,7 +60,7 @@ * The request processing latency on the server, from the time the request was * received until the response was sent. * - * This object should have the same structure as [google.protobuf.Duration]{@link external:"google.protobuf.Duration"} + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * * @property {boolean} cacheLookup * Whether or not a cache lookup was attempted. @@ -83,5 +78,13 @@ * The number of HTTP response bytes inserted into cache. Set only when a * cache fill was attempted. * + * @property {string} protocol + * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" + * + * @typedef HttpRequest + * @memberof google.logging.type * @see [google.logging.type.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/type/http_request.proto} */ +var HttpRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js similarity index 73% rename from handwritten/logging/src/v2/doc/doc_log_entry.js rename to handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index 1a672b1a73a..57b65d34010 100644 --- a/handwritten/logging/src/v2/doc/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -1,23 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * An individual entry in a log. @@ -48,14 +44,14 @@ * associated with the monitored resource designating the particular * database that reported the error. * - * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} + * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * * @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. * - * This object should have the same structure as [google.protobuf.Any]{@link external:"google.protobuf.Any"} + * This object should have the same structure as [Any]{@link google.protobuf.Any} * * @property {string} textPayload * The log entry payload, represented as a Unicode string (UTF-8). @@ -64,41 +60,45 @@ * The log entry payload, represented as a structure that is * expressed as a JSON object. * - * This object should have the same structure as [google.protobuf.Struct]{@link external:"google.protobuf.Struct"} + * This object should have the same structure as [Struct]{@link google.protobuf.Struct} * * @property {Object} timestamp - * Optional. The time the event described by the log entry occurred. If - * omitted in a new log entry, Stackdriver Logging will insert the time the - * log entry is received. Stackdriver Logging might reject log entries whose - * time stamps are more than a couple of hours in the future. Log entries - * with time stamps in the past are accepted. + * Optional. The time the event described by the log entry occurred. + * This time is used to compute the log entry's age and to enforce + * the logs retention period. If this field is omitted in a new log + * entry, then Stackdriver Logging assigns it the current time. + * + * Incoming log entries should have timestamps that are no more than + * the [logs retention period](https://cloud.google.com/logging/quota-policy) in the past, + * and no more than 24 hours in the future. + * See the `entries.write` API method for more information. * - * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object} receiveTimestamp * Output only. The time the log entry was received by Stackdriver Logging. * - * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {number} severity * Optional. The severity of the log entry. The default value is * `LogSeverity.DEFAULT`. * - * The number should be among the values of [google.logging.type.LogSeverity]{@link external:"google.logging.type.LogSeverity"} + * The number should be among the values of [LogSeverity]{@link google.logging.type.LogSeverity} * * @property {string} insertId * Optional. A unique identifier for the log entry. If you provide a value, * then Stackdriver Logging considers other log entries in the same project, * with the same `timestamp`, and with the same `insert_id` to be duplicates * which can be removed. If omitted in new log entries, then Stackdriver - * Logging will insert its own unique identifier. The `insert_id` is used + * Logging assigns its own unique identifier. The `insert_id` is also used * to order log entries that have the same `timestamp` value. * * @property {Object} httpRequest * Optional. Information about the HTTP request associated with this * log entry, if applicable. * - * This object should have the same structure as [google.logging.type.HttpRequest]{@link external:"google.logging.type.HttpRequest"} + * This object should have the same structure as [HttpRequest]{@link google.logging.type.HttpRequest} * * @property {Object.} labels * Optional. A set of user-defined (key, value) data that provides additional @@ -108,7 +108,7 @@ * Optional. Information about an operation associated with the log entry, if * applicable. * - * This object should have the same structure as [LogEntryOperation]{@link LogEntryOperation} + * This object should have the same structure as [LogEntryOperation]{@link google.logging.v2.LogEntryOperation} * * @property {string} trace * Optional. Resource name of the trace associated with the log entry, if any. @@ -120,9 +120,10 @@ * Optional. Source code location information associated with the log entry, * if any. * - * This object should have the same structure as [LogEntrySourceLocation]{@link LogEntrySourceLocation} + * This object should have the same structure as [LogEntrySourceLocation]{@link google.logging.v2.LogEntrySourceLocation} * - * @class + * @typedef LogEntry + * @memberof google.logging.v2 * @see [google.logging.v2.LogEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ var LogEntry = { @@ -148,7 +149,8 @@ var LogEntry = { * @property {boolean} last * Optional. Set this to True if this is the last log entry in the operation. * - * @class + * @typedef LogEntryOperation + * @memberof google.logging.v2 * @see [google.logging.v2.LogEntryOperation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ var LogEntryOperation = { @@ -175,9 +177,10 @@ var LogEntryOperation = { * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` * (Python). * - * @class + * @typedef LogEntrySourceLocation + * @memberof google.logging.v2 * @see [google.logging.v2.LogEntrySourceLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ var LogEntrySourceLocation = { // This is for documentation. Actual contents will be loaded by gRPC. -}; +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js similarity index 79% rename from handwritten/logging/src/v2/doc/doc_logging.js rename to handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 354e969fd7c..2f719982826 100644 --- a/handwritten/logging/src/v2/doc/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -1,23 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * The parameters to DeleteLog. @@ -34,9 +30,10 @@ * `"projects/my-project-id/logs/syslog"`, * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * For more information about log names, see - * {@link LogEntry}. + * LogEntry. * - * @class + * @typedef DeleteLogRequest + * @memberof google.logging.v2 * @see [google.logging.v2.DeleteLogRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var DeleteLogRequest = { @@ -59,7 +56,7 @@ var DeleteLogRequest = { * `"projects/my-project-id/logs/syslog"` or * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * For more information about log names, see - * {@link LogEntry}. + * LogEntry. * * @property {Object} resource * Optional. A default monitored resource object that is assigned to all log @@ -69,34 +66,40 @@ var DeleteLogRequest = { * "labels": { * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} * - * See {@link LogEntry}. + * See LogEntry. * - * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} + * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * * @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 {@link LogEntry}. + * See LogEntry. * * @property {Object[]} entries - * Required. The log entries to write. Values supplied for the fields - * `log_name`, `resource`, and `labels` in this `entries.write` request are - * inserted into those log entries in this list that do not provide their own - * values. - * - * Stackdriver Logging also creates and inserts values for `timestamp` and - * `insert_id` if the entries do not provide them. The created `insert_id` for - * the N'th entry in this list will be greater than earlier entries and less - * than later entries. Otherwise, the order of log entries in this list does - * not matter. + * Required. The log entries to send to Stackdriver Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the LogEntry type. + * + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * + * Log entries with timestamps that are more than the + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than + * 24 hours in the future might be discarded. Discarding does not return + * an error. * * To improve throughput and to avoid exceeding the * [quota limit](https://cloud.google.com/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. + * you should try to include several log entries in this list, + * rather than calling this method for each individual log entry. * - * This object should have the same structure as [LogEntry]{@link LogEntry} + * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} * * @property {boolean} partialSuccess * Optional. Whether valid entries should be written even if some other @@ -105,7 +108,8 @@ var DeleteLogRequest = { * with one of the failed entries and the response includes error details * keyed by the entries' zero-based index in the `entries.write` method. * - * @class + * @typedef WriteLogEntriesRequest + * @memberof google.logging.v2 * @see [google.logging.v2.WriteLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var WriteLogEntriesRequest = { @@ -115,7 +119,8 @@ var WriteLogEntriesRequest = { /** * Result returned from WriteLogEntries. * empty - * @class + * @typedef WriteLogEntriesResponse + * @memberof google.logging.v2 * @see [google.logging.v2.WriteLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var WriteLogEntriesResponse = { @@ -133,7 +138,8 @@ var WriteLogEntriesResponse = { * Failed requests for which no entries are written will not include * per-entry errors. * - * @class + * @typedef WriteLogEntriesPartialErrors + * @memberof google.logging.v2 * @see [google.logging.v2.WriteLogEntriesPartialErrors definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var WriteLogEntriesPartialErrors = { @@ -189,7 +195,8 @@ var WriteLogEntriesPartialErrors = { * `next_page_token` from the previous response. The values of other method * parameters should be identical to those in the previous call. * - * @class + * @typedef ListLogEntriesRequest + * @memberof google.logging.v2 * @see [google.logging.v2.ListLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var ListLogEntriesRequest = { @@ -200,9 +207,11 @@ var ListLogEntriesRequest = { * Result returned from `ListLogEntries`. * * @property {Object[]} entries - * A list of log entries. + * A list of log entries. If `entries` is empty, `nextPageToken` may still be + * returned, indicating that more entries may exist. See `nextPageToken` for + * more information. * - * This object should have the same structure as [LogEntry]{@link LogEntry} + * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} * * @property {string} nextPageToken * If there might be more results than those appearing in this response, then @@ -216,7 +225,8 @@ var ListLogEntriesRequest = { * 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. * - * @class + * @typedef ListLogEntriesResponse + * @memberof google.logging.v2 * @see [google.logging.v2.ListLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var ListLogEntriesResponse = { @@ -237,7 +247,8 @@ var ListLogEntriesResponse = { * `nextPageToken` from the previous response. The values of other method * parameters should be identical to those in the previous call. * - * @class + * @typedef ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2 * @see [google.logging.v2.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var ListMonitoredResourceDescriptorsRequest = { @@ -250,14 +261,15 @@ var ListMonitoredResourceDescriptorsRequest = { * @property {Object[]} resourceDescriptors * A list of resource descriptors. * - * This object should have the same structure as [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} + * This object should have the same structure as [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} * * @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`. * - * @class + * @typedef ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2 * @see [google.logging.v2.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var ListMonitoredResourceDescriptorsResponse = { @@ -286,7 +298,8 @@ var ListMonitoredResourceDescriptorsResponse = { * `nextPageToken` from the previous response. The values of other method * parameters should be identical to those in the previous call. * - * @class + * @typedef ListLogsRequest + * @memberof google.logging.v2 * @see [google.logging.v2.ListLogsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var ListLogsRequest = { @@ -306,9 +319,10 @@ var ListLogsRequest = { * `nextPageToken` is included. To get the next set of results, call this * method again using the value of `nextPageToken` as `pageToken`. * - * @class + * @typedef ListLogsResponse + * @memberof google.logging.v2 * @see [google.logging.v2.ListLogsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ var ListLogsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. -}; +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js similarity index 53% rename from handwritten/logging/src/v2/doc/doc_logging_config.js rename to handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index eba07b49439..b55de7f2338 100644 --- a/handwritten/logging/src/v2/doc/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -1,23 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * Describes a sink used to export log entries to one of the following @@ -55,13 +51,10 @@ * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR * * @property {number} 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](https://cloud.google.com/logging/docs/api/v2/migration-to-v2). + * Deprecated. The log entry format to use for this sink's exported log + * entries. The v2 format is used by default and cannot be changed. * - * The number should be among the values of [VersionFormat]{@link VersionFormat} + * The number should be among the values of [VersionFormat]{@link google.logging.v2.VersionFormat} * * @property {string} writerIdentity * Output only. An IAM identity—a service account or group—under @@ -100,7 +93,7 @@ * start time. The default value of this field is the time the sink is * created or updated. * - * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object} endTime * Optional. The time at which this sink will stop exporting log entries. Log @@ -109,9 +102,10 @@ * and an end time are provided, then the end time must be later than the * start time. * - * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * - * @class + * @typedef LogSink + * @memberof google.logging.v2 * @see [google.logging.v2.LogSink definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ var LogSink = { @@ -123,8 +117,10 @@ var LogSink = { * Version 2 is the preferred format. * * @enum {number} + * @memberof google.logging.v2 */ VersionFormat: { + /** * An unspecified format version that will default to V2. */ @@ -138,8 +134,8 @@ var LogSink = { /** * `LogEntry` version 1 format. */ - V1: 2, - }, + V1: 2 + } }; /** @@ -164,7 +160,8 @@ var LogSink = { * Non-positive values are ignored. The presence of `nextPageToken` in the * response indicates that more results might be available. * - * @class + * @typedef ListSinksRequest + * @memberof google.logging.v2 * @see [google.logging.v2.ListSinksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ var ListSinksRequest = { @@ -177,14 +174,15 @@ var ListSinksRequest = { * @property {Object[]} sinks * A list of sinks. * - * This object should have the same structure as [LogSink]{@link LogSink} + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * * @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`. * - * @class + * @typedef ListSinksResponse + * @memberof google.logging.v2 * @see [google.logging.v2.ListSinksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ var ListSinksResponse = { @@ -204,7 +202,8 @@ var ListSinksResponse = { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * - * @class + * @typedef GetSinkRequest + * @memberof google.logging.v2 * @see [google.logging.v2.GetSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ var GetSinkRequest = { @@ -228,7 +227,7 @@ var GetSinkRequest = { * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. * - * This object should have the same structure as [LogSink]{@link LogSink} + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * * @property {boolean} uniqueWriterIdentity * Optional. Determines the kind of IAM identity returned as `writer_identity` @@ -241,9 +240,10 @@ var GetSinkRequest = { * 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 {@link LogSink}. + * more information, see `writer_identity` in LogSink. * - * @class + * @typedef CreateSinkRequest + * @memberof google.logging.v2 * @see [google.logging.v2.CreateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ var CreateSinkRequest = { @@ -266,10 +266,9 @@ var CreateSinkRequest = { * * @property {Object} sink * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. If `sink_name` does not exist, then - * this method creates a new sink. + * as part of `sink_name`. * - * This object should have the same structure as [LogSink]{@link LogSink} + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * * @property {boolean} uniqueWriterIdentity * Optional. See @@ -282,9 +281,11 @@ var CreateSinkRequest = { * then there is no change to the sink's `writer_identity`. * + If the old value is 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 is true and the new value is false. + * + It is an error if the old value is true and the new value is + * set to false or defaulted to false. * - * @class + * @typedef UpdateSinkRequest + * @memberof google.logging.v2 * @see [google.logging.v2.UpdateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ var UpdateSinkRequest = { @@ -305,9 +306,209 @@ var UpdateSinkRequest = { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * - * @class + * @typedef DeleteSinkRequest + * @memberof google.logging.v2 * @see [google.logging.v2.DeleteSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ var DeleteSinkRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; + +/** + * Specifies a set of log entries that are not to be stored in Stackdriver + * Logging. If your project receives a large volume of logs, you might be able + * to use exclusions to reduce your chargeable logs. Exclusions are processed + * after log sinks, so you can export log entries before they are excluded. + * Audit log entries and log entries from Amazon Web Services are never + * excluded. + * + * @property {string} name + * Required. A client-assigned identifier, such as + * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and + * can include only letters, digits, underscores, hyphens, and periods. + * + * @property {string} description + * Optional. A description of this exclusion. + * + * @property {string} filter + * Required. + * An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) + * that matches the log entries to be excluded. By using the + * [sample function](https://cloud.google.com/logging/docs/view/advanced_filters#sample), + * you can exclude less than 100% of the matching log entries. + * For example, the following filter matches 99% of low-severity log + * entries from load balancers: + * + * "resource.type=http_load_balancer severity} labelExtractors + * Optional. A map from a label key string to an extractor expression which is + * used to extract data from a log entry field and assign as the label value. + * Each label key specified in the LabelDescriptor must have an associated + * extractor expression in this map. The syntax of the extractor expression + * is the same as for the `value_extractor` field. + * + * The extracted value is converted to the type defined in the label + * descriptor. If the either the extraction or the type conversion fails, + * the label will have a default value. The default value for a string + * label is an empty string, for an integer label its 0, and for a boolean + * label its `false`. + * + * Note that there are upper bounds on the maximum number of labels and the + * number of active time series that are allowed in a project. + * + * @property {Object} bucketOptions + * Optional. The `bucket_options` are required when the logs-based metric is + * using a DISTRIBUTION value type and it describes the bucket boundaries + * used to create a histogram of the extracted values. + * + * This object should have the same structure as [BucketOptions]{@link google.api.BucketOptions} + * * @property {number} 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. + * Deprecated. The API version that created or updated this metric. + * The v2 format is used by default and cannot be changed. * - * The number should be among the values of [ApiVersion]{@link ApiVersion} + * The number should be among the values of [ApiVersion]{@link google.logging.v2.ApiVersion} * - * @class + * @typedef LogMetric + * @memberof google.logging.v2 * @see [google.logging.v2.LogMetric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ var LogMetric = { @@ -69,8 +139,10 @@ var LogMetric = { * Stackdriver Logging API version. * * @enum {number} + * @memberof google.logging.v2 */ ApiVersion: { + /** * Stackdriver Logging API v2. */ @@ -79,8 +151,8 @@ var LogMetric = { /** * Stackdriver Logging API v1. */ - V1: 1, - }, + V1: 1 + } }; /** @@ -102,7 +174,8 @@ var LogMetric = { * Non-positive values are ignored. The presence of `nextPageToken` in the * response indicates that more results might be available. * - * @class + * @typedef ListLogMetricsRequest + * @memberof google.logging.v2 * @see [google.logging.v2.ListLogMetricsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ var ListLogMetricsRequest = { @@ -115,14 +188,15 @@ var ListLogMetricsRequest = { * @property {Object[]} metrics * A list of logs-based metrics. * - * This object should have the same structure as [LogMetric]{@link LogMetric} + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * * @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`. * - * @class + * @typedef ListLogMetricsResponse + * @memberof google.logging.v2 * @see [google.logging.v2.ListLogMetricsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ var ListLogMetricsResponse = { @@ -137,7 +211,8 @@ var ListLogMetricsResponse = { * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * - * @class + * @typedef GetLogMetricRequest + * @memberof google.logging.v2 * @see [google.logging.v2.GetLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ var GetLogMetricRequest = { @@ -158,9 +233,10 @@ var GetLogMetricRequest = { * The new logs-based metric, which must not have an identifier that * already exists. * - * This object should have the same structure as [LogMetric]{@link LogMetric} + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * - * @class + * @typedef CreateLogMetricRequest + * @memberof google.logging.v2 * @see [google.logging.v2.CreateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ var CreateLogMetricRequest = { @@ -182,9 +258,10 @@ var CreateLogMetricRequest = { * @property {Object} metric * The updated metric. * - * This object should have the same structure as [LogMetric]{@link LogMetric} + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * - * @class + * @typedef UpdateLogMetricRequest + * @memberof google.logging.v2 * @see [google.logging.v2.UpdateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ var UpdateLogMetricRequest = { @@ -199,9 +276,10 @@ var UpdateLogMetricRequest = { * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * - * @class + * @typedef DeleteLogMetricRequest + * @memberof google.logging.v2 * @see [google.logging.v2.DeleteLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ var DeleteLogMetricRequest = { // This is for documentation. Actual contents will be loaded by gRPC. -}; +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js similarity index 74% rename from handwritten/logging/src/v2/doc/doc_google_protobuf_any.js rename to handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index 580d78e0e48..1e99231c144 100644 --- a/handwritten/logging/src/v2/doc/doc_google_protobuf_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -1,23 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * `Any` contains an arbitrary serialized protocol buffer message along with a @@ -55,6 +51,16 @@ * any.Unpack(foo) * ... * + * Example 4: Pack and unpack a message in Go + * + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * * The pack methods provided by protobuf library will by default use * 'type.googleapis.com/full.type.name' as the type URL and the unpack * methods only use the fully qualified type name after the last '/' @@ -83,14 +89,13 @@ * If the embedded message type is well-known and has a custom JSON * representation, that representation will be embedded adding a field * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message {@link google.protobuf.Duration}): + * field. Example (for message google.protobuf.Duration): * * { * "@type": "type.googleapis.com/google.protobuf.Duration", * "value": "1.212s" * } * - * @external "google.protobuf.Any" * @property {string} typeUrl * A URL/resource name whose content describes the type of the * serialized protocol buffer message. @@ -103,7 +108,7 @@ * qualified name of the type (as in `path/google.protobuf.Duration`). * The name should be in a canonical form (e.g., leading "." is * not accepted). - * * An HTTP GET on the URL must yield a {@link google.protobuf.Type} + * * An HTTP GET on the URL must yield a google.protobuf.Type * value in binary format, or produce an error. * * Applications are allowed to cache lookup results based on the * URL, or have them precompiled into a binary to avoid any @@ -117,5 +122,10 @@ * @property {string} value * Must be a valid serialized protocol buffer of the above specified type. * + * @typedef Any + * @memberof google.protobuf * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} */ +var Any = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js similarity index 61% rename from handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js rename to handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js index 18932c372c4..6b107097540 100644 --- a/handwritten/logging/src/v2/doc/doc_google_protobuf_duration.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js @@ -1,23 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * A Duration represents a signed, fixed-length span of time represented @@ -27,6 +23,8 @@ * two Timestamp values is a Duration and it can be added or subtracted * from a Timestamp. Range is approximately +-10,000 years. * + * # Examples + * * Example 1: Compute Duration from two Timestamps in pseudo code. * * Timestamp start = ...; @@ -67,10 +65,20 @@ * duration = Duration() * duration.FromTimedelta(td) * - * @external "google.protobuf.Duration" + * # JSON Mapping + * + * In JSON format, the Duration type is encoded as a string rather than an + * object, where the string ends in the suffix "s" (indicating seconds) and + * is preceded by the number of seconds, with nanoseconds expressed as + * fractional seconds. For example, 3 seconds with 0 nanoseconds should be + * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + * microsecond should be expressed in JSON format as "3.000001s". + * * @property {number} seconds * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. + * to +315,576,000,000 inclusive. Note: these bounds are computed from: + * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years * * @property {number} nanos * Signed fractions of a second at nanosecond resolution of the span @@ -80,5 +88,10 @@ * of the same sign as the `seconds` field. Must be from -999,999,999 * to +999,999,999 inclusive. * + * @typedef Duration + * @memberof google.protobuf * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} */ +var Duration = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js new file mode 100644 index 00000000000..26059a71abc --- /dev/null +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -0,0 +1,230 @@ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * `FieldMask` represents a set of symbolic field paths, for example: + * + * paths: "f.a" + * paths: "f.b.d" + * + * Here `f` represents a field in some root message, `a` and `b` + * fields in the message found in `f`, and `d` a field found in the + * message in `f.b`. + * + * Field masks are used to specify a subset of fields that should be + * returned by a get operation or modified by an update operation. + * Field masks also have a custom JSON encoding (see below). + * + * # Field Masks in Projections + * + * When used in the context of a projection, a response message or + * sub-message is filtered by the API to only contain those fields as + * specified in the mask. For example, if the mask in the previous + * example is applied to a response message as follows: + * + * f { + * a : 22 + * b { + * d : 1 + * x : 2 + * } + * y : 13 + * } + * z: 8 + * + * The result will not contain specific values for fields x,y and z + * (their value will be set to the default, and omitted in proto text + * output): + * + * + * f { + * a : 22 + * b { + * d : 1 + * } + * } + * + * A repeated field is not allowed except at the last position of a + * paths string. + * + * If a FieldMask object is not present in a get operation, the + * operation applies to all fields (as if a FieldMask of all fields + * had been specified). + * + * Note that a field mask does not necessarily apply to the + * top-level response message. In case of a REST get operation, the + * field mask applies directly to the response, but in case of a REST + * list operation, the mask instead applies to each individual message + * in the returned resource list. In case of a REST custom method, + * other definitions may be used. Where the mask applies will be + * clearly documented together with its declaration in the API. In + * any case, the effect on the returned resource/resources is required + * behavior for APIs. + * + * # Field Masks in Update Operations + * + * A field mask in update operations specifies which fields of the + * targeted resource are going to be updated. The API is required + * to only change the values of the fields as specified in the mask + * and leave the others untouched. If a resource is passed in to + * describe the updated values, the API ignores the values of all + * fields not covered by the mask. + * + * If a repeated field is specified for an update operation, the existing + * repeated values in the target resource will be overwritten by the new values. + * Note that a repeated field is only allowed in the last position of a `paths` + * string. + * + * If a sub-message is specified in the last position of the field mask for an + * update operation, then the existing sub-message in the target resource is + * overwritten. Given the target message: + * + * f { + * b { + * d : 1 + * x : 2 + * } + * c : 1 + * } + * + * And an update message: + * + * f { + * b { + * d : 10 + * } + * } + * + * then if the field mask is: + * + * paths: "f.b" + * + * then the result will be: + * + * f { + * b { + * d : 10 + * } + * c : 1 + * } + * + * However, if the update mask was: + * + * paths: "f.b.d" + * + * then the result would be: + * + * f { + * b { + * d : 10 + * x : 2 + * } + * c : 1 + * } + * + * In order to reset a field's value to the default, the field must + * be in the mask and set to the default value in the provided resource. + * Hence, in order to reset all fields of a resource, provide a default + * instance of the resource and set all fields in the mask, or do + * not provide a mask as described below. + * + * If a field mask is not present on update, the operation applies to + * all fields (as if a field mask of all fields has been specified). + * Note that in the presence of schema evolution, this may mean that + * fields the client does not know and has therefore not filled into + * the request will be reset to their default. If this is unwanted + * behavior, a specific service may require a client to always specify + * a field mask, producing an error if not. + * + * As with get operations, the location of the resource which + * describes the updated values in the request message depends on the + * operation kind. In any case, the effect of the field mask is + * required to be honored by the API. + * + * ## Considerations for HTTP REST + * + * The HTTP kind of an update operation which uses a field mask must + * be set to PATCH instead of PUT in order to satisfy HTTP semantics + * (PUT must only be used for full updates). + * + * # JSON Encoding of Field Masks + * + * In JSON, a field mask is encoded as a single string where paths are + * separated by a comma. Fields name in each path are converted + * to/from lower-camel naming conventions. + * + * As an example, consider the following message declarations: + * + * message Profile { + * User user = 1; + * Photo photo = 2; + * } + * message User { + * string display_name = 1; + * string address = 2; + * } + * + * In proto a field mask for `Profile` may look as such: + * + * mask { + * paths: "user.display_name" + * paths: "photo" + * } + * + * In JSON, the same mask is represented as below: + * + * { + * mask: "user.displayName,photo" + * } + * + * # Field Masks and Oneof Fields + * + * Field masks treat fields in oneofs just as regular fields. Consider the + * following message: + * + * message SampleMessage { + * oneof test_oneof { + * string name = 4; + * SubMessage sub_message = 9; + * } + * } + * + * The field mask can be: + * + * mask { + * paths: "name" + * } + * + * Or: + * + * mask { + * paths: "sub_message" + * } + * + * Note that oneof type names ("test_oneof" in this case) cannot be used in + * paths. + * + * @property {string[]} paths + * The set of field mask paths. + * + * @typedef FieldMask + * @memberof google.protobuf + * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} + */ +var FieldMask = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js similarity index 54% rename from handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js rename to handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index 997767b856d..431e2fd5892 100644 --- a/handwritten/logging/src/v2/doc/doc_google_protobuf_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -1,23 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * A Timestamp represents a point in time independent of any time zone @@ -32,6 +28,8 @@ * and from RFC 3339 date strings. * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). * + * # Examples + * * Example 1: Compute Timestamp from POSIX `time()`. * * Timestamp timestamp; @@ -72,7 +70,29 @@ * timestamp = Timestamp() * timestamp.GetCurrentTime() * - * @external "google.protobuf.Timestamp" + * # JSON Mapping + * + * In JSON format, the Timestamp type is encoded as a string in the + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + * where {year} is always expressed using four digits while {month}, {day}, + * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + * is required, though only UTC (as indicated by "Z") is presently supported. + * + * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + * 01:30 UTC on January 15, 2017. + * + * In JavaScript, one can convert a Date object to this format using the + * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] + * method. In Python, a standard `datetime.datetime` object can be converted + * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) + * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one + * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com + * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) + * to obtain a formatter capable of generating timestamps in this format. + * * @property {number} seconds * Represents seconds of UTC time since Unix epoch * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to @@ -84,5 +104,10 @@ * that count forward in time. Must be from 0 to 999,999,999 * inclusive. * + * @typedef Timestamp + * @memberof google.protobuf * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} */ +var Timestamp = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/src/v2/index.js index e1993dc73af..12a970d82f0 100644 --- a/handwritten/logging/src/v2/index.js +++ b/handwritten/logging/src/v2/index.js @@ -1,43 +1,23 @@ -/* - * Copyright 2016 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use strict'; - -var loggingServiceV2Client = require('./logging_service_v2_client'); -var configServiceV2Client = require('./config_service_v2_client'); -var metricsServiceV2Client = require('./metrics_service_v2_client'); -var gax = require('google-gax'); -var extend = require('extend'); +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -function v2(options) { - options = extend( - { - scopes: v2.ALL_SCOPES, - }, - options - ); - var gaxGrpc = gax.grpc(options); - return extend( - {}, - loggingServiceV2Client(gaxGrpc), - configServiceV2Client(gaxGrpc), - metricsServiceV2Client(gaxGrpc) - ); -} +'use strict'; -v2.SERVICE_ADDRESS = loggingServiceV2Client.SERVICE_ADDRESS; -v2.ALL_SCOPES = loggingServiceV2Client.ALL_SCOPES; +const LoggingServiceV2Client = require('./logging_service_v2_client'); +const ConfigServiceV2Client = require('./config_service_v2_client'); +const MetricsServiceV2Client = require('./metrics_service_v2_client'); -module.exports = v2; +module.exports.LoggingServiceV2Client = LoggingServiceV2Client; +module.exports.ConfigServiceV2Client = ConfigServiceV2Client; +module.exports.MetricsServiceV2Client = MetricsServiceV2Client; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index d9032949f0c..7316cced88e 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -1,880 +1,980 @@ -/* - * Copyright 2016 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * EDITING INSTRUCTIONS - * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto, - * and updates to that file get reflected here through a refresh process. - * For the short term, the refresh process will only be runnable by Google - * engineers. - * - * The only allowed edits are to method and file documentation. A 3-way - * merge preserves those additions if the generated source changes. - */ -/* TODO: introduce line-wrapping so that it never exceeds the limit. */ -/* jscs: disable maximumLineLength */ -'use strict'; - -var configData = require('./logging_service_v2_client_config'); -var extend = require('extend'); -var gax = require('google-gax'); - -var SERVICE_ADDRESS = 'logging.googleapis.com'; +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -var DEFAULT_SERVICE_PORT = 443; +'use strict'; -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +const gapicConfig = require('./logging_service_v2_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); +const protobuf = require('protobufjs'); -var PAGE_DESCRIPTORS = { - listLogEntries: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'entries' - ), - listMonitoredResourceDescriptors: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'resourceDescriptors' - ), - listLogs: new gax.PageDescriptor('pageToken', 'nextPageToken', 'logNames'), -}; - -/** - * The scopes needed to make gRPC calls to all of the methods defined in - * this service. - */ -var ALL_SCOPES = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', -]; +const VERSION = require('../../package.json').version; /** * Service for ingesting and querying logs. * - * This will be created through a builder function which can be obtained by the module. - * See the following example of how to initialize the module and how to access to the builder. - * @see {@link loggingServiceV2Client} - * - * @example - * var loggingV2 = require('@google-cloud/logging').v2({ - * // optional auth parameters. - * }); - * var client = loggingV2.loggingServiceV2Client(); - * * @class + * @memberof v2 */ -function LoggingServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = extend( - { - servicePath: SERVICE_ADDRESS, - port: DEFAULT_SERVICE_PORT, - clientConfig: {}, - }, - opts - ); - - var googleApiClient = ['gl-node/' + process.versions.node]; - if (opts.libName && opts.libVersion) { - googleApiClient.push(opts.libName + '/' + opts.libVersion); - } - googleApiClient.push( - CODE_GEN_NAME_VERSION, - 'gax/' + gax.version, - 'grpc/' + gaxGrpc.grpcVersion - ); - - var bundleDescriptors = { - writeLogEntries: new gax.BundleDescriptor( - 'entries', - ['logName', 'resource', 'labels'], - null, - gax.createByteLengthFunction(grpcClients.google.logging.v2.LogEntry) - ), - }; - - var defaults = gaxGrpc.constructSettings( - 'google.logging.v2.LoggingServiceV2', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')} - ); - - var self = this; - - this.auth = gaxGrpc.auth; - var loggingServiceV2Stub = gaxGrpc.createStub( - grpcClients.google.logging.v2.LoggingServiceV2, - opts - ); - var loggingServiceV2StubMethods = [ - 'deleteLog', - 'writeLogEntries', - 'listLogEntries', - 'listMonitoredResourceDescriptors', - 'listLogs', - ]; - loggingServiceV2StubMethods.forEach(function(methodName) { - self['_' + methodName] = gax.createApiCall( - loggingServiceV2Stub.then(function(loggingServiceV2Stub) { - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return loggingServiceV2Stub[methodName].apply( - loggingServiceV2Stub, - args - ); - }; - }), - defaults[methodName], - PAGE_DESCRIPTORS[methodName] || bundleDescriptors[methodName] +class LoggingServiceV2Client { + /** + * Construct an instance of LoggingServiceV2Client. + * + * @param {object=} options - The configuration object. See the subsequent + * parameters for more details. + * @param {object=} options.credentials - Credentials object. + * @param {string=} options.credentials.client_email + * @param {string=} options.credentials.private_key + * @param {string=} options.email - Account email address. Required when + * usaing a .pem or .p12 keyFilename. + * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option above is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.projectId - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function=} options.promise - Custom promise module to use instead + * of native Promises. + * @param {string=} options.servicePath - The domain name of the + * API remote host. + */ + constructor(opts) { + this._descriptors = {}; + + // Ensure that options include the service address and port. + opts = Object.assign( + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts ); - }); -} - -// Path templates - -var PROJECT_PATH_TEMPLATE = new gax.PathTemplate('projects/{project}'); - -var LOG_PATH_TEMPLATE = new gax.PathTemplate('projects/{project}/logs/{log}'); -/** - * Returns a fully-qualified project resource name string. - * @param {String} project - * @returns {String} - */ -LoggingServiceV2Client.prototype.projectPath = function(project) { - return PROJECT_PATH_TEMPLATE.render({ - project: project, - }); -}; - -/** - * Parses the projectName from a project resource. - * @param {String} projectName - * A fully-qualified path representing a project resources. - * @returns {String} - A string representing the project. - */ -LoggingServiceV2Client.prototype.matchProjectFromProjectName = function( - projectName -) { - return PROJECT_PATH_TEMPLATE.match(projectName).project; -}; - -/** - * Returns a fully-qualified log resource name string. - * @param {String} project - * @param {String} log - * @returns {String} - */ -LoggingServiceV2Client.prototype.logPath = function(project, log) { - return LOG_PATH_TEMPLATE.render({ - project: project, - log: log, - }); -}; + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = this.constructor.scopes; + var gaxGrpc = gax.grpc(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth; + + // Determine the client header string. + var clientHeader = [ + `gl-node/${process.version.node}`, + `grpc/${gaxGrpc.grpcVersion}`, + `gax/${gax.version}`, + `gapic/${VERSION}`, + ]; + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + + // Load the applicable protos. + var protos = merge( + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging.proto' + ) + ); -/** - * Parses the logName from a log resource. - * @param {String} logName - * A fully-qualified path representing a log resources. - * @returns {String} - A string representing the project. - */ -LoggingServiceV2Client.prototype.matchProjectFromLogName = function(logName) { - return LOG_PATH_TEMPLATE.match(logName).project; -}; + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + projectPathTemplate: new gax.PathTemplate('projects/{project}'), + logPathTemplate: new gax.PathTemplate('projects/{project}/logs/{log}'), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this._descriptors.page = { + listLogEntries: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'entries' + ), + listMonitoredResourceDescriptors: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'resourceDescriptors' + ), + listLogs: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'logNames' + ), + }; + var protoFilesRoot = new gax.grpc.GoogleProtoFilesRoot(); + protoFilesRoot = protobuf.loadSync( + path.join( + __dirname, + '..', + '..', + 'protos', + 'google/logging/v2/logging.proto' + ), + protoFilesRoot + ); -/** - * Parses the logName from a log resource. - * @param {String} logName - * A fully-qualified path representing a log resources. - * @returns {String} - A string representing the log. - */ -LoggingServiceV2Client.prototype.matchLogFromLogName = function(logName) { - return LOG_PATH_TEMPLATE.match(logName).log; -}; + // Some methods on this API support automatically batching + // requests; denote this. + this._descriptors.batching = { + writeLogEntries: new gax.BundleDescriptor( + 'entries', + ['logName', 'resource', 'labels'], + null, + gax.createByteLengthFunction( + protoFilesRoot.lookup('google.logging.v2.LogEntry') + ) + ), + }; + + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.logging.v2.LoggingServiceV2', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); -/** - * Get the project ID used by this class. - * @aram {function(Error, string)} callback - the callback to be called with - * the current project Id. - */ -LoggingServiceV2Client.prototype.getProjectId = function(callback) { - return this.auth.getProjectId(callback); -}; + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; -// Service calls + // Put together the "service stub" for + // google.logging.v2.LoggingServiceV2. + var loggingServiceV2Stub = gaxGrpc.createStub( + protos.google.logging.v2.LoggingServiceV2, + opts + ); -/** - * Deletes all the log entries in a log. - * The log reappears if it receives new entries. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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 - * {@link LogEntry}. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.loggingServiceV2Client(); - * var formattedLogName = client.logPath("[PROJECT]", "[LOG]"); - * client.deleteLog({logName: formattedLogName}).catch(function(err) { - * console.error(err); - * }); - */ -LoggingServiceV2Client.prototype.deleteLog = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var loggingServiceV2StubMethods = [ + 'deleteLog', + 'writeLogEntries', + 'listLogEntries', + 'listMonitoredResourceDescriptors', + 'listLogs', + ]; + for (let methodName of loggingServiceV2StubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + loggingServiceV2Stub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.batching[methodName] + ); + } } - if (options === undefined) { - options = {}; + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'logging.googleapis.com'; } - return this._deleteLog(request, options, callback); -}; + /** + * The port for this API service. + */ + static get port() { + return 443; + } -/** - * Writes log entries to Stackdriver Logging. All log entries are - * written by this method. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object[]} request.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](https://cloud.google.com/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. - * - * This object should have the same structure as [LogEntry]{@link LogEntry} - * @param {string=} request.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 - * {@link LogEntry}. - * @param {Object=} request.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 {@link LogEntry}. - * - * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} - * @param {Object.=} request.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 {@link LogEntry}. - * @param {boolean=} request.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. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link WriteLogEntriesResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WriteLogEntriesResponse]{@link WriteLogEntriesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.loggingServiceV2Client(); - * var entries = []; - * client.writeLogEntries({entries: entries}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }).catch(function(err) { - * console.error(err); - * }); - */ -LoggingServiceV2Client.prototype.writeLogEntries = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; } - if (options === undefined) { - options = {}; + + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId(callback) { + return this.auth.getProjectId(callback); } - return this._writeLogEntries(request, options, callback); -}; + // ------------------- + // -- Service calls -- + // ------------------- -/** - * Lists log entries. Use this method to retrieve log entries from - * Stackdriver Logging. For ways to export log entries, see - * [Exporting Logs](https://cloud.google.com/logging/docs/export). - * - * @param {Object} request - * The request object that will be sent. - * @param {string[]} request.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. - * @param {string[]} [request.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`. - * @param {string=} request.filter - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/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. - * @param {string=} request.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`. - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [LogEntry]{@link LogEntry}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogEntriesResponse]{@link ListLogEntriesResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogEntry]{@link LogEntry}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogEntry]{@link LogEntry} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListLogEntriesResponse]{@link ListLogEntriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.loggingServiceV2Client(); - * var resourceNames = []; - * // Iterate over all elements. - * client.listLogEntries({resourceNames: resourceNames}).then(function(responses) { - * var resources = responses[0]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]) - * } - * }).catch(function(err) { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * var options = {autoPaginate: false}; - * function callback(responses) { - * // The actual resources in a response. - * var resources = responses[0]; - * // The next request if the response shows there's more responses. - * var nextRequest = responses[1]; - * // The actual response object, if necessary. - * // var rawResponse = responses[2]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listLogEntries(nextRequest, options).then(callback); - * } - * } - * client.listLogEntries({resourceNames: resourceNames}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -LoggingServiceV2Client.prototype.listLogEntries = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + /** + * Deletes all the log entries in a log. + * The log reappears if it receives new entries. + * Log entries written shortly before the delete operation might not be + * deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.logName + * Required. The resource name of the log to delete: + * + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * For more information about log names, see + * LogEntry. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @returns {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.LoggingServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + * client.deleteLog({logName: formattedLogName}).catch(err => { + * console.error(err); + * }); + */ + deleteLog(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.deleteLog(request, options, callback); } - return this._listLogEntries(request, options, callback); -}; + /** + * ## Log entry resources + * + * Writes log entries to Stackdriver Logging. This API method is the + * only way to send log entries to Stackdriver Logging. This method + * is used, directly or indirectly, by the Stackdriver Logging agent + * (fluentd) and all logging libraries configured to use Stackdriver + * Logging. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object[]} request.entries + * Required. The log entries to send to Stackdriver Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the LogEntry type. + * + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * + * Log entries with timestamps that are more than the + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than + * 24 hours in the future might be discarded. Discarding does not return + * an error. + * + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, + * you should try to include several log entries in this list, + * rather than calling this method for each individual log entry. + * + * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} + * @param {string=} request.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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"` or + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * For more information about log names, see + * LogEntry. + * @param {Object=} request.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. + * + * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} + * @param {Object.=} request.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. + * @param {boolean=} request.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, then the response status is the error associated + * with one of the failed entries and the response includes error details + * keyed by the entries' zero-based index in the `entries.write` method. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.LoggingServiceV2Client({ + * // optional auth parameters. + * }); + * + * var entries = []; + * client.writeLogEntries({entries: entries}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + writeLogEntries(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.writeLogEntries(request, options, callback); + } -/** - * Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogEntries} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string[]} request.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. - * @param {string[]} [request.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`. - * @param {string=} request.filter - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/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. - * @param {string=} request.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`. - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @return {Stream} - * An object stream which emits an object representing [LogEntry]{@link LogEntry} on 'data' event. - * - * @example - * - * var client = loggingV2.loggingServiceV2Client(); - * var resourceNames = []; - * client.listLogEntriesStream({resourceNames: resourceNames}).on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.error(err); - * }); - */ -LoggingServiceV2Client.prototype.listLogEntriesStream = function( - request, - options -) { - if (options === undefined) { - options = {}; + /** + * Lists log entries. Use this method to retrieve log entries from + * Stackdriver Logging. For ways to export log entries, see + * [Exporting Logs](https://cloud.google.com/logging/docs/export). + * + * @param {Object} request + * The request object that will be sent. + * @param {string[]} request.resourceNames + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Projects listed in the `project_ids` field are added to this list. + * @param {string[]} request.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`. + * @param {string=} request.filter + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Filters](https://cloud.google.com/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. + * @param {string=} request.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 their `insert_id` values. + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [LogEntry]{@link google.logging.v2.LogEntry}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogEntry]{@link google.logging.v2.LogEntry}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogEntry]{@link google.logging.v2.LogEntry} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.LoggingServiceV2Client({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var resourceNames = []; + * + * client.listLogEntries({resourceNames: resourceNames}) + * .then(responses => { + * var resources = responses[0]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]) + * } + * }) + * .catch(err => { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * var resourceNames = []; + * + * + * var options = {autoPaginate: false}; + * var callback = responses => { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows that there are more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listLogEntries(nextRequest, options).then(callback); + * } + * } + * client.listLogEntries({resourceNames: resourceNames}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listLogEntries(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listLogEntries(request, options, callback); } - return PAGE_DESCRIPTORS.listLogEntries.createStream( - this._listLogEntries, - request, - options - ); -}; + /** + * Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogEntries} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string[]} request.resourceNames + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Projects listed in the `project_ids` field are added to this list. + * @param {string[]} request.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`. + * @param {string=} request.filter + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Filters](https://cloud.google.com/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. + * @param {string=} request.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 their `insert_id` values. + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @returns {Stream} + * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.LoggingServiceV2Client({ + * // optional auth parameters. + * }); + * + * var resourceNames = []; + * client.listLogEntriesStream({resourceNames: resourceNames}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listLogEntriesStream(request, options) { + options = options || {}; -/** - * Lists the descriptors for monitored resource types used by Stackdriver - * Logging. - * - * @param {Object} request - * The request object that will be sent. - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListMonitoredResourceDescriptorsResponse]{@link ListMonitoredResourceDescriptorsResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListMonitoredResourceDescriptorsResponse]{@link ListMonitoredResourceDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.loggingServiceV2Client(); - * - * // Iterate over all elements. - * client.listMonitoredResourceDescriptors({}).then(function(responses) { - * var resources = responses[0]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]) - * } - * }).catch(function(err) { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * var options = {autoPaginate: false}; - * function callback(responses) { - * // The actual resources in a response. - * var resources = responses[0]; - * // The next request if the response shows there's more responses. - * var nextRequest = responses[1]; - * // The actual response object, if necessary. - * // var rawResponse = responses[2]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); - * } - * } - * client.listMonitoredResourceDescriptors({}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -LoggingServiceV2Client.prototype.listMonitoredResourceDescriptors = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + return this._descriptors.page.listLogEntries.createStream( + this._innerApiCalls.listLogEntries, + request, + options + ); } - if (options === undefined) { - options = {}; + + /** + * Lists the descriptors for monitored resource types used by Stackdriver + * Logging. + * + * @param {Object} request + * The request object that will be sent. + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.LoggingServiceV2Client({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * client.listMonitoredResourceDescriptors({}) + * .then(responses => { + * var resources = responses[0]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]) + * } + * }) + * .catch(err => { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * + * var options = {autoPaginate: false}; + * var callback = responses => { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows that there are more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); + * } + * } + * client.listMonitoredResourceDescriptors({}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listMonitoredResourceDescriptors(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listMonitoredResourceDescriptors( + request, + options, + callback + ); } - return this._listMonitoredResourceDescriptors(request, options, callback); -}; + /** + * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @returns {Stream} + * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.LoggingServiceV2Client({ + * // optional auth parameters. + * }); + * + * + * client.listMonitoredResourceDescriptorsStream({}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listMonitoredResourceDescriptorsStream(request, options) { + options = options || {}; -/** - * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @return {Stream} - * An object stream which emits an object representing [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} on 'data' event. - * - * @example - * - * var client = loggingV2.loggingServiceV2Client(); - * - * client.listMonitoredResourceDescriptorsStream({}).on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.error(err); - * }); - */ -LoggingServiceV2Client.prototype.listMonitoredResourceDescriptorsStream = function( - request, - options -) { - if (options === undefined) { - options = {}; + return this._descriptors.page.listMonitoredResourceDescriptors.createStream( + this._innerApiCalls.listMonitoredResourceDescriptors, + request, + options + ); } - return PAGE_DESCRIPTORS.listMonitoredResourceDescriptors.createStream( - this._listMonitoredResourceDescriptors, - request, - options - ); -}; - -/** - * Lists the logs in projects or organizations. - * Only logs that have entries are listed. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name that owns the logs: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of string. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogsResponse]{@link ListLogsResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of string. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of string in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListLogsResponse]{@link ListLogsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.loggingServiceV2Client(); - * var formattedParent = client.projectPath("[PROJECT]"); - * // Iterate over all elements. - * client.listLogs({parent: formattedParent}).then(function(responses) { - * var resources = responses[0]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]) - * } - * }).catch(function(err) { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * var options = {autoPaginate: false}; - * function callback(responses) { - * // The actual resources in a response. - * var resources = responses[0]; - * // The next request if the response shows there's more responses. - * var nextRequest = responses[1]; - * // The actual response object, if necessary. - * // var rawResponse = responses[2]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listLogs(nextRequest, options).then(callback); - * } - * } - * client.listLogs({parent: formattedParent}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -LoggingServiceV2Client.prototype.listLogs = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * Lists the logs in projects, organizations, folders, or billing accounts. + * Only logs that have entries are listed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name that owns the logs: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of string. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of string. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of string in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.LoggingServiceV2Client({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * client.listLogs({parent: formattedParent}) + * .then(responses => { + * var resources = responses[0]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]) + * } + * }) + * .catch(err => { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * + * var options = {autoPaginate: false}; + * var callback = responses => { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows that there are more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listLogs(nextRequest, options).then(callback); + * } + * } + * client.listLogs({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listLogs(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listLogs(request, options, callback); } - if (options === undefined) { - options = {}; + + /** + * Equivalent to {@link listLogs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogs} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name that owns the logs: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @returns {Stream} + * An object stream which emits a string on 'data' event. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.LoggingServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * client.listLogsStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listLogsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listLogs.createStream( + this._innerApiCalls.listLogs, + request, + options + ); } - return this._listLogs(request, options, callback); -}; + // -------------------- + // -- Path templates -- + // -------------------- -/** - * Equivalent to {@link listLogs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogs} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name that owns the logs: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @return {Stream} - * An object stream which emits a string on 'data' event. - * - * @example - * - * var client = loggingV2.loggingServiceV2Client(); - * var formattedParent = client.projectPath("[PROJECT]"); - * client.listLogsStream({parent: formattedParent}).on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.error(err); - * }); - */ -LoggingServiceV2Client.prototype.listLogsStream = function(request, options) { - if (options === undefined) { - options = {}; + /** + * Return a fully-qualified project resource name string. + * + * @param {String} project + * @returns {String} + */ + projectPath(project) { + return this._pathTemplates.projectPathTemplate.render({ + project: project, + }); } - return PAGE_DESCRIPTORS.listLogs.createStream( - this._listLogs, - request, - options - ); -}; + /** + * Return a fully-qualified log resource name string. + * + * @param {String} project + * @param {String} log + * @returns {String} + */ + logPath(project, log) { + return this._pathTemplates.logPathTemplate.render({ + project: project, + log: log, + }); + } -function LoggingServiceV2ClientBuilder(gaxGrpc) { - if (!(this instanceof LoggingServiceV2ClientBuilder)) { - return new LoggingServiceV2ClientBuilder(gaxGrpc); + /** + * Parse the projectName from a project resource. + * + * @param {String} projectName + * A fully-qualified path representing a project resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromProjectName(projectName) { + return this._pathTemplates.projectPathTemplate.match(projectName).project; } - var loggingServiceV2Client = gaxGrpc.load([ - { - root: require('google-proto-files')('..'), - file: 'google/logging/v2/logging.proto', - }, - ]); - extend(this, loggingServiceV2Client.google.logging.v2); + /** + * Parse the logName from a log resource. + * + * @param {String} logName + * A fully-qualified path representing a log resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromLogName(logName) { + return this._pathTemplates.logPathTemplate.match(logName).project; + } /** - * Build a new instance of {@link LoggingServiceV2Client}. - * - * @param {Object=} opts - The optional parameters. - * @param {String=} opts.servicePath - * The domain name of the API remote host. - * @param {number=} opts.port - * The port on which to connect to the remote host. - * @param {grpc.ClientCredentials=} opts.sslCreds - * A ClientCredentials for use with an SSL-enabled channel. - * @param {Object=} opts.clientConfig - * The customized config to build the call settings. See - * {@link gax.constructSettings} for the format. + * Parse the logName from a log resource. + * + * @param {String} logName + * A fully-qualified path representing a log resources. + * @returns {String} - A string representing the log. */ - this.loggingServiceV2Client = function(opts) { - return new LoggingServiceV2Client(gaxGrpc, loggingServiceV2Client, opts); - }; - extend(this.loggingServiceV2Client, LoggingServiceV2Client); + matchLogFromLogName(logName) { + return this._pathTemplates.logPathTemplate.match(logName).log; + } } -module.exports = LoggingServiceV2ClientBuilder; -module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; + +module.exports = LoggingServiceV2Client; diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index 2b364fec9a8..5d2fc1d6712 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -4,6 +4,7 @@ "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", + "INTERNAL", "UNAVAILABLE" ], "non_idempotent": [] @@ -13,29 +14,29 @@ "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.2, "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 2000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 45000 + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 90000 }, "list": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.2, "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 7000, + "initial_rpc_timeout_millis": 2000, "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 45000 + "max_rpc_timeout_millis": 10000, + "total_timeout_millis": 20000 } }, "methods": { "DeleteLog": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "WriteLogEntries": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", "bundling": { @@ -45,17 +46,17 @@ } }, "ListLogEntries": { - "timeout_millis": 30000, + "timeout_millis": 10000, "retry_codes_name": "idempotent", "retry_params_name": "list" }, "ListMonitoredResourceDescriptors": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListLogs": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 532d56344a0..3751c06477c 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -1,600 +1,631 @@ -/* - * Copyright 2016 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * EDITING INSTRUCTIONS - * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto, - * and updates to that file get reflected here through a refresh process. - * For the short term, the refresh process will only be runnable by Google - * engineers. - * - * The only allowed edits are to method and file documentation. A 3-way - * merge preserves those additions if the generated source changes. - */ -/* TODO: introduce line-wrapping so that it never exceeds the limit. */ -/* jscs: disable maximumLineLength */ -'use strict'; +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -var configData = require('./metrics_service_v2_client_config'); -var extend = require('extend'); -var gax = require('google-gax'); - -var SERVICE_ADDRESS = 'logging.googleapis.com'; - -var DEFAULT_SERVICE_PORT = 443; - -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +'use strict'; -var PAGE_DESCRIPTORS = { - listLogMetrics: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'metrics' - ), -}; +const gapicConfig = require('./metrics_service_v2_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); -/** - * The scopes needed to make gRPC calls to all of the methods defined in - * this service. - */ -var ALL_SCOPES = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', -]; +const VERSION = require('../../package.json').version; /** * Service for configuring logs-based metrics. * - * This will be created through a builder function which can be obtained by the module. - * See the following example of how to initialize the module and how to access to the builder. - * @see {@link metricsServiceV2Client} - * - * @example - * var loggingV2 = require('@google-cloud/logging').v2({ - * // optional auth parameters. - * }); - * var client = loggingV2.metricsServiceV2Client(); - * * @class + * @memberof v2 */ -function MetricsServiceV2Client(gaxGrpc, grpcClients, opts) { - opts = extend( - { - servicePath: SERVICE_ADDRESS, - port: DEFAULT_SERVICE_PORT, - clientConfig: {}, - }, - opts - ); - - var googleApiClient = ['gl-node/' + process.versions.node]; - if (opts.libName && opts.libVersion) { - googleApiClient.push(opts.libName + '/' + opts.libVersion); - } - googleApiClient.push( - CODE_GEN_NAME_VERSION, - 'gax/' + gax.version, - 'grpc/' + gaxGrpc.grpcVersion - ); - - var defaults = gaxGrpc.constructSettings( - 'google.logging.v2.MetricsServiceV2', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')} - ); - - var self = this; - - this.auth = gaxGrpc.auth; - var metricsServiceV2Stub = gaxGrpc.createStub( - grpcClients.google.logging.v2.MetricsServiceV2, - opts - ); - var metricsServiceV2StubMethods = [ - 'listLogMetrics', - 'getLogMetric', - 'createLogMetric', - 'updateLogMetric', - 'deleteLogMetric', - ]; - metricsServiceV2StubMethods.forEach(function(methodName) { - self['_' + methodName] = gax.createApiCall( - metricsServiceV2Stub.then(function(metricsServiceV2Stub) { - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return metricsServiceV2Stub[methodName].apply( - metricsServiceV2Stub, - args - ); - }; - }), - defaults[methodName], - PAGE_DESCRIPTORS[methodName] +class MetricsServiceV2Client { + /** + * Construct an instance of MetricsServiceV2Client. + * + * @param {object=} options - The configuration object. See the subsequent + * parameters for more details. + * @param {object=} options.credentials - Credentials object. + * @param {string=} options.credentials.client_email + * @param {string=} options.credentials.private_key + * @param {string=} options.email - Account email address. Required when + * usaing a .pem or .p12 keyFilename. + * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option above is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.projectId - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function=} options.promise - Custom promise module to use instead + * of native Promises. + * @param {string=} options.servicePath - The domain name of the + * API remote host. + */ + constructor(opts) { + this._descriptors = {}; + + // Ensure that options include the service address and port. + opts = Object.assign( + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts ); - }); -} - -// Path templates - -var PROJECT_PATH_TEMPLATE = new gax.PathTemplate('projects/{project}'); -var METRIC_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}/metrics/{metric}' -); - -/** - * Returns a fully-qualified project resource name string. - * @param {String} project - * @returns {String} - */ -MetricsServiceV2Client.prototype.projectPath = function(project) { - return PROJECT_PATH_TEMPLATE.render({ - project: project, - }); -}; - -/** - * Parses the projectName from a project resource. - * @param {String} projectName - * A fully-qualified path representing a project resources. - * @returns {String} - A string representing the project. - */ -MetricsServiceV2Client.prototype.matchProjectFromProjectName = function( - projectName -) { - return PROJECT_PATH_TEMPLATE.match(projectName).project; -}; - -/** - * Returns a fully-qualified metric resource name string. - * @param {String} project - * @param {String} metric - * @returns {String} - */ -MetricsServiceV2Client.prototype.metricPath = function(project, metric) { - return METRIC_PATH_TEMPLATE.render({ - project: project, - metric: metric, - }); -}; + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = this.constructor.scopes; + var gaxGrpc = gax.grpc(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth; + + // Determine the client header string. + var clientHeader = [ + `gl-node/${process.version.node}`, + `grpc/${gaxGrpc.grpcVersion}`, + `gax/${gax.version}`, + `gapic/${VERSION}`, + ]; + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + + // Load the applicable protos. + var protos = merge( + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging_metrics.proto' + ) + ); -/** - * Parses the metricName from a metric resource. - * @param {String} metricName - * A fully-qualified path representing a metric resources. - * @returns {String} - A string representing the project. - */ -MetricsServiceV2Client.prototype.matchProjectFromMetricName = function( - metricName -) { - return METRIC_PATH_TEMPLATE.match(metricName).project; -}; + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + projectPathTemplate: new gax.PathTemplate('projects/{project}'), + metricPathTemplate: new gax.PathTemplate( + 'projects/{project}/metrics/{metric}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this._descriptors.page = { + listLogMetrics: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'metrics' + ), + }; + + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.logging.v2.MetricsServiceV2', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); -/** - * Parses the metricName from a metric resource. - * @param {String} metricName - * A fully-qualified path representing a metric resources. - * @returns {String} - A string representing the metric. - */ -MetricsServiceV2Client.prototype.matchMetricFromMetricName = function( - metricName -) { - return METRIC_PATH_TEMPLATE.match(metricName).metric; -}; + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; -/** - * Get the project ID used by this class. - * @aram {function(Error, string)} callback - the callback to be called with - * the current project Id. - */ -MetricsServiceV2Client.prototype.getProjectId = function(callback) { - return this.auth.getProjectId(callback); -}; + // Put together the "service stub" for + // google.logging.v2.MetricsServiceV2. + var metricsServiceV2Stub = gaxGrpc.createStub( + protos.google.logging.v2.MetricsServiceV2, + opts + ); -// Service calls + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var metricsServiceV2StubMethods = [ + 'listLogMetrics', + 'getLogMetric', + 'createLogMetric', + 'updateLogMetric', + 'deleteLogMetric', + ]; + for (let methodName of metricsServiceV2StubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + metricsServiceV2Stub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); + } + } -/** - * Lists logs-based metrics. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project containing the metrics: - * - * "projects/[PROJECT_ID]" - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [LogMetric]{@link LogMetric}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogMetricsResponse]{@link ListLogMetricsResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogMetric]{@link LogMetric}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogMetric]{@link LogMetric} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListLogMetricsResponse]{@link ListLogMetricsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.metricsServiceV2Client(); - * var formattedParent = client.projectPath("[PROJECT]"); - * // Iterate over all elements. - * client.listLogMetrics({parent: formattedParent}).then(function(responses) { - * var resources = responses[0]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]) - * } - * }).catch(function(err) { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * var options = {autoPaginate: false}; - * function callback(responses) { - * // The actual resources in a response. - * var resources = responses[0]; - * // The next request if the response shows there's more responses. - * var nextRequest = responses[1]; - * // The actual response object, if necessary. - * // var rawResponse = responses[2]; - * for (var i = 0; i < resources.length; ++i) { - * // doThingsWith(resources[i]); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listLogMetrics(nextRequest, options).then(callback); - * } - * } - * client.listLogMetrics({parent: formattedParent}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -MetricsServiceV2Client.prototype.listLogMetrics = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'logging.googleapis.com'; } - if (options === undefined) { - options = {}; + + /** + * The port for this API service. + */ + static get port() { + return 443; } - return this._listLogMetrics(request, options, callback); -}; + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; + } -/** - * Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogMetrics} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project containing the metrics: - * - * "projects/[PROJECT_ID]" - * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @return {Stream} - * An object stream which emits an object representing [LogMetric]{@link LogMetric} on 'data' event. - * - * @example - * - * var client = loggingV2.metricsServiceV2Client(); - * var formattedParent = client.projectPath("[PROJECT]"); - * client.listLogMetricsStream({parent: formattedParent}).on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.error(err); - * }); - */ -MetricsServiceV2Client.prototype.listLogMetricsStream = function( - request, - options -) { - if (options === undefined) { - options = {}; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId(callback) { + return this.auth.getProjectId(callback); } - return PAGE_DESCRIPTORS.listLogMetrics.createStream( - this._listLogMetrics, - request, - options - ); -}; + // ------------------- + // -- Service calls -- + // ------------------- -/** - * Gets a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.metricName - * The resource name of the desired metric: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.metricsServiceV2Client(); - * var formattedMetricName = client.metricPath("[PROJECT]", "[METRIC]"); - * client.getLogMetric({metricName: formattedMetricName}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }).catch(function(err) { - * console.error(err); - * }); - */ -MetricsServiceV2Client.prototype.getLogMetric = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + /** + * Lists logs-based metrics. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [LogMetric]{@link google.logging.v2.LogMetric}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogMetric]{@link google.logging.v2.LogMetric} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.MetricsServiceV2Client({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * client.listLogMetrics({parent: formattedParent}) + * .then(responses => { + * var resources = responses[0]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]) + * } + * }) + * .catch(err => { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * + * var options = {autoPaginate: false}; + * var callback = responses => { + * // The actual resources in a response. + * var resources = responses[0]; + * // The next request if the response shows that there are more responses. + * var nextRequest = responses[1]; + * // The actual response object, if necessary. + * // var rawResponse = responses[2]; + * for (let i = 0; i < resources.length; i += 1) { + * // doThingsWith(resources[i]); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listLogMetrics(nextRequest, options).then(callback); + * } + * } + * client.listLogMetrics({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listLogMetrics(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listLogMetrics(request, options, callback); } - return this._getLogMetric(request, options, callback); -}; + /** + * Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogMetrics} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" + * @param {number=} request.pageSize + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @returns {Stream} + * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.MetricsServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * client.listLogMetricsStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listLogMetricsStream(request, options) { + options = options || {}; -/** - * Creates a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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 {Object} request.metric - * The new logs-based metric, which must not have an identifier that - * already exists. - * - * This object should have the same structure as [LogMetric]{@link LogMetric} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.metricsServiceV2Client(); - * var formattedParent = client.projectPath("[PROJECT]"); - * var metric = {}; - * var request = { - * parent: formattedParent, - * metric: metric - * }; - * client.createLogMetric(request).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }).catch(function(err) { - * console.error(err); - * }); - */ -MetricsServiceV2Client.prototype.createLogMetric = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + return this._descriptors.page.listLogMetrics.createStream( + this._innerApiCalls.listLogMetrics, + request, + options + ); } - if (options === undefined) { - options = {}; + + /** + * Gets a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName + * The resource name of the desired metric: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.MetricsServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * client.getLogMetric({metricName: formattedMetricName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getLogMetric(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.getLogMetric(request, options, callback); } - return this._createLogMetric(request, options, callback); -}; + /** + * Creates a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.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 {Object} request.metric + * The new logs-based metric, which must not have an identifier that + * already exists. + * + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.MetricsServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * var metric = {}; + * var request = { + * parent: formattedParent, + * metric: metric, + * }; + * client.createLogMetric(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createLogMetric(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.createLogMetric(request, options, callback); + } -/** - * Creates or updates a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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 {Object} request.metric - * The updated metric. - * - * This object should have the same structure as [LogMetric]{@link LogMetric} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogMetric]{@link LogMetric}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.metricsServiceV2Client(); - * var formattedMetricName = client.metricPath("[PROJECT]", "[METRIC]"); - * var metric = {}; - * var request = { - * metricName: formattedMetricName, - * metric: metric - * }; - * client.updateLogMetric(request).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }).catch(function(err) { - * console.error(err); - * }); - */ -MetricsServiceV2Client.prototype.updateLogMetric = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * Creates or updates a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.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 {Object} request.metric + * The updated metric. + * + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.MetricsServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * var metric = {}; + * var request = { + * metricName: formattedMetricName, + * metric: metric, + * }; + * client.updateLogMetric(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateLogMetric(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.updateLogMetric(request, options, callback); } - if (options === undefined) { - options = {}; + + /** + * Deletes a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName + * The resource name of the metric to delete: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @returns {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * var client = new logging.v2.MetricsServiceV2Client({ + * // optional auth parameters. + * }); + * + * var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * client.deleteLogMetric({metricName: formattedMetricName}).catch(err => { + * console.error(err); + * }); + */ + deleteLogMetric(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.deleteLogMetric(request, options, callback); } - return this._updateLogMetric(request, options, callback); -}; + // -------------------- + // -- Path templates -- + // -------------------- -/** - * Deletes a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.metricName - * The resource name of the metric to delete: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var client = loggingV2.metricsServiceV2Client(); - * var formattedMetricName = client.metricPath("[PROJECT]", "[METRIC]"); - * client.deleteLogMetric({metricName: formattedMetricName}).catch(function(err) { - * console.error(err); - * }); - */ -MetricsServiceV2Client.prototype.deleteLogMetric = function( - request, - options, - callback -) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + /** + * Return a fully-qualified project resource name string. + * + * @param {String} project + * @returns {String} + */ + projectPath(project) { + return this._pathTemplates.projectPathTemplate.render({ + project: project, + }); } - return this._deleteLogMetric(request, options, callback); -}; + /** + * Return a fully-qualified metric resource name string. + * + * @param {String} project + * @param {String} metric + * @returns {String} + */ + metricPath(project, metric) { + return this._pathTemplates.metricPathTemplate.render({ + project: project, + metric: metric, + }); + } -function MetricsServiceV2ClientBuilder(gaxGrpc) { - if (!(this instanceof MetricsServiceV2ClientBuilder)) { - return new MetricsServiceV2ClientBuilder(gaxGrpc); + /** + * Parse the projectName from a project resource. + * + * @param {String} projectName + * A fully-qualified path representing a project resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromProjectName(projectName) { + return this._pathTemplates.projectPathTemplate.match(projectName).project; } - var metricsServiceV2Client = gaxGrpc.load([ - { - root: require('google-proto-files')('..'), - file: 'google/logging/v2/logging_metrics.proto', - }, - ]); - extend(this, metricsServiceV2Client.google.logging.v2); + /** + * Parse the metricName from a metric resource. + * + * @param {String} metricName + * A fully-qualified path representing a metric resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromMetricName(metricName) { + return this._pathTemplates.metricPathTemplate.match(metricName).project; + } /** - * Build a new instance of {@link MetricsServiceV2Client}. - * - * @param {Object=} opts - The optional parameters. - * @param {String=} opts.servicePath - * The domain name of the API remote host. - * @param {number=} opts.port - * The port on which to connect to the remote host. - * @param {grpc.ClientCredentials=} opts.sslCreds - * A ClientCredentials for use with an SSL-enabled channel. - * @param {Object=} opts.clientConfig - * The customized config to build the call settings. See - * {@link gax.constructSettings} for the format. + * Parse the metricName from a metric resource. + * + * @param {String} metricName + * A fully-qualified path representing a metric resources. + * @returns {String} - A string representing the metric. */ - this.metricsServiceV2Client = function(opts) { - return new MetricsServiceV2Client(gaxGrpc, metricsServiceV2Client, opts); - }; - extend(this.metricsServiceV2Client, MetricsServiceV2Client); + matchMetricFromMetricName(metricName) { + return this._pathTemplates.metricPathTemplate.match(metricName).metric; + } } -module.exports = MetricsServiceV2ClientBuilder; -module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; + +module.exports = MetricsServiceV2Client; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json index 9bfa238cb85..a0678701c21 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client_config.json +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -4,6 +4,7 @@ "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", + "INTERNAL", "UNAVAILABLE" ], "non_idempotent": [] @@ -13,35 +14,35 @@ "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.2, "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 2000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 45000 + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 90000 } }, "methods": { "ListLogMetrics": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetLogMetric": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateLogMetric": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateLogMetric": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteLogMetric": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 97ef66321fc..f10c34b0a3a 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -32,7 +32,7 @@ var Logging = require('../'); describe('Logging', function() { var PROJECT_ID; var TESTS_PREFIX = 'gcloud-logging-test'; - var WRITE_CONSISTENCY_DELAY_MS = 120000; + var WRITE_CONSISTENCY_DELAY_MS = 3000; var bigQuery = bigqueryLibrary(); var pubsub = pubsubLibrary(); @@ -440,7 +440,7 @@ describe('Logging', function() { done(); } ); - }, WRITE_CONSISTENCY_DELAY_MS); + }, WRITE_CONSISTENCY_DELAY_MS * 4); }); }, 1000); }); @@ -464,7 +464,7 @@ describe('Logging', function() { done(); } ); - }, WRITE_CONSISTENCY_DELAY_MS); + }, WRITE_CONSISTENCY_DELAY_MS * 4); }); it('should write an entry with primitive values', function(done) { diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js new file mode 100644 index 00000000000..9ac63b48a70 --- /dev/null +++ b/handwritten/logging/test/gapic-v2.js @@ -0,0 +1,1309 @@ +// Copyright 2017, Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); + +const loggingModule = require('../src'); + +var FAKE_STATUS_CODE = 1; +var error = new Error(); +error.code = FAKE_STATUS_CODE; + +describe('LoggingServiceV2Client', () => { + describe('deleteLog', () => { + it('invokes deleteLog without error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + var request = { + logName: formattedLogName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteLog = mockSimpleGrpcMethod(request); + + client.deleteLog(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteLog with error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + var request = { + logName: formattedLogName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteLog(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('writeLogEntries', () => { + it('invokes writeLogEntries without error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var entries = []; + var request = { + entries: entries, + }; + + // Mock response + var expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.writeLogEntries(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes writeLogEntries with error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var entries = []; + var request = { + entries: entries, + }; + + // Mock Grpc layer + client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.writeLogEntries(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listLogEntries', () => { + it('invokes listLogEntries without error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var resourceNames = []; + var request = { + resourceNames: resourceNames, + }; + + // Mock response + var nextPageToken = ''; + var entriesElement = {}; + var entries = [entriesElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + entries: entries, + }; + + // Mock Grpc layer + client._innerApiCalls.listLogEntries = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.entries); + }; + + client.listLogEntries(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.entries); + done(); + }); + }); + + it('invokes listLogEntries with error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var resourceNames = []; + var request = { + resourceNames: resourceNames, + }; + + // Mock Grpc layer + client._innerApiCalls.listLogEntries = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listLogEntries(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listMonitoredResourceDescriptors', () => { + it('invokes listMonitoredResourceDescriptors without error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var request = {}; + + // Mock response + var nextPageToken = ''; + var resourceDescriptorsElement = {}; + var resourceDescriptors = [resourceDescriptorsElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + resourceDescriptors: resourceDescriptors, + }; + + // Mock Grpc layer + client._innerApiCalls.listMonitoredResourceDescriptors = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.resourceDescriptors); + }; + + client.listMonitoredResourceDescriptors(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.resourceDescriptors); + done(); + }); + }); + + it('invokes listMonitoredResourceDescriptors with error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var request = {}; + + // Mock Grpc layer + client._innerApiCalls.listMonitoredResourceDescriptors = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listMonitoredResourceDescriptors(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listLogs', () => { + it('invokes listLogs without error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var request = { + parent: formattedParent, + }; + + // Mock response + var nextPageToken = ''; + var logNamesElement = 'logNamesElement-1079688374'; + var logNames = [logNamesElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + logNames: logNames, + }; + + // Mock Grpc layer + client._innerApiCalls.listLogs = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.logNames); + }; + + client.listLogs(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.logNames); + done(); + }); + }); + + it('invokes listLogs with error', done => { + var client = new loggingModule.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var request = { + parent: formattedParent, + }; + + // Mock Grpc layer + client._innerApiCalls.listLogs = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listLogs(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); +}); +describe('ConfigServiceV2Client', () => { + describe('listSinks', () => { + it('invokes listSinks without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var request = { + parent: formattedParent, + }; + + // Mock response + var nextPageToken = ''; + var sinksElement = {}; + var sinks = [sinksElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + sinks: sinks, + }; + + // Mock Grpc layer + client._innerApiCalls.listSinks = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.sinks); + }; + + client.listSinks(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.sinks); + done(); + }); + }); + + it('invokes listSinks with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var request = { + parent: formattedParent, + }; + + // Mock Grpc layer + client._innerApiCalls.listSinks = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listSinks(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getSink', () => { + it('invokes getSink without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + var request = { + sinkName: formattedSinkName, + }; + + // Mock response + var name = 'name3373707'; + var destination = 'destination-1429847026'; + var filter = 'filter-1274492040'; + var writerIdentity = 'writerIdentity775638794'; + var includeChildren = true; + var expectedResponse = { + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, + }; + + // Mock Grpc layer + client._innerApiCalls.getSink = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getSink(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getSink with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + var request = { + sinkName: formattedSinkName, + }; + + // Mock Grpc layer + client._innerApiCalls.getSink = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getSink(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createSink', () => { + it('invokes createSink without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var sink = {}; + var request = { + parent: formattedParent, + sink: sink, + }; + + // Mock response + var name = 'name3373707'; + var destination = 'destination-1429847026'; + var filter = 'filter-1274492040'; + var writerIdentity = 'writerIdentity775638794'; + var includeChildren = true; + var expectedResponse = { + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, + }; + + // Mock Grpc layer + client._innerApiCalls.createSink = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createSink(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createSink with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var sink = {}; + var request = { + parent: formattedParent, + sink: sink, + }; + + // Mock Grpc layer + client._innerApiCalls.createSink = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createSink(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateSink', () => { + it('invokes updateSink without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + var sink = {}; + var request = { + sinkName: formattedSinkName, + sink: sink, + }; + + // Mock response + var name = 'name3373707'; + var destination = 'destination-1429847026'; + var filter = 'filter-1274492040'; + var writerIdentity = 'writerIdentity775638794'; + var includeChildren = true; + var expectedResponse = { + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, + }; + + // Mock Grpc layer + client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateSink(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateSink with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + var sink = {}; + var request = { + sinkName: formattedSinkName, + sink: sink, + }; + + // Mock Grpc layer + client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateSink(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteSink', () => { + it('invokes deleteSink without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + var request = { + sinkName: formattedSinkName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteSink = mockSimpleGrpcMethod(request); + + client.deleteSink(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteSink with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + var request = { + sinkName: formattedSinkName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteSink(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('listExclusions', () => { + it('invokes listExclusions without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var request = { + parent: formattedParent, + }; + + // Mock response + var nextPageToken = ''; + var exclusionsElement = {}; + var exclusions = [exclusionsElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + exclusions: exclusions, + }; + + // Mock Grpc layer + client._innerApiCalls.listExclusions = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.exclusions); + }; + + client.listExclusions(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.exclusions); + done(); + }); + }); + + it('invokes listExclusions with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var request = { + parent: formattedParent, + }; + + // Mock Grpc layer + client._innerApiCalls.listExclusions = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listExclusions(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getExclusion', () => { + it('invokes getExclusion without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + var request = { + name: formattedName, + }; + + // Mock response + var name2 = 'name2-1052831874'; + var description = 'description-1724546052'; + var filter = 'filter-1274492040'; + var disabled = true; + var expectedResponse = { + name: name2, + description: description, + filter: filter, + disabled: disabled, + }; + + // Mock Grpc layer + client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getExclusion(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getExclusion with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getExclusion(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createExclusion', () => { + it('invokes createExclusion without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var exclusion = {}; + var request = { + parent: formattedParent, + exclusion: exclusion, + }; + + // Mock response + var name = 'name3373707'; + var description = 'description-1724546052'; + var filter = 'filter-1274492040'; + var disabled = true; + var expectedResponse = { + name: name, + description: description, + filter: filter, + disabled: disabled, + }; + + // Mock Grpc layer + client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createExclusion(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createExclusion with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var exclusion = {}; + var request = { + parent: formattedParent, + exclusion: exclusion, + }; + + // Mock Grpc layer + client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createExclusion(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateExclusion', () => { + it('invokes updateExclusion without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + var exclusion = {}; + var updateMask = {}; + var request = { + name: formattedName, + exclusion: exclusion, + updateMask: updateMask, + }; + + // Mock response + var name2 = 'name2-1052831874'; + var description = 'description-1724546052'; + var filter = 'filter-1274492040'; + var disabled = true; + var expectedResponse = { + name: name2, + description: description, + filter: filter, + disabled: disabled, + }; + + // Mock Grpc layer + client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateExclusion(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateExclusion with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + var exclusion = {}; + var updateMask = {}; + var request = { + name: formattedName, + exclusion: exclusion, + updateMask: updateMask, + }; + + // Mock Grpc layer + client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateExclusion(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteExclusion', () => { + it('invokes deleteExclusion without error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod(request); + + client.deleteExclusion(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteExclusion with error', done => { + var client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteExclusion(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); +}); +describe('MetricsServiceV2Client', () => { + describe('listLogMetrics', () => { + it('invokes listLogMetrics without error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var request = { + parent: formattedParent, + }; + + // Mock response + var nextPageToken = ''; + var metricsElement = {}; + var metrics = [metricsElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + metrics: metrics, + }; + + // Mock Grpc layer + client._innerApiCalls.listLogMetrics = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.metrics); + }; + + client.listLogMetrics(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.metrics); + done(); + }); + }); + + it('invokes listLogMetrics with error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var request = { + parent: formattedParent, + }; + + // Mock Grpc layer + client._innerApiCalls.listLogMetrics = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listLogMetrics(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getLogMetric', () => { + it('invokes getLogMetric without error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + var request = { + metricName: formattedMetricName, + }; + + // Mock response + var name = 'name3373707'; + var description = 'description-1724546052'; + var filter = 'filter-1274492040'; + var valueExtractor = 'valueExtractor2047672534'; + var expectedResponse = { + name: name, + description: description, + filter: filter, + valueExtractor: valueExtractor, + }; + + // Mock Grpc layer + client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getLogMetric(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getLogMetric with error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + var request = { + metricName: formattedMetricName, + }; + + // Mock Grpc layer + client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getLogMetric(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createLogMetric', () => { + it('invokes createLogMetric without error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var metric = {}; + var request = { + parent: formattedParent, + metric: metric, + }; + + // Mock response + var name = 'name3373707'; + var description = 'description-1724546052'; + var filter = 'filter-1274492040'; + var valueExtractor = 'valueExtractor2047672534'; + var expectedResponse = { + name: name, + description: description, + filter: filter, + valueExtractor: valueExtractor, + }; + + // Mock Grpc layer + client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createLogMetric(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createLogMetric with error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var metric = {}; + var request = { + parent: formattedParent, + metric: metric, + }; + + // Mock Grpc layer + client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createLogMetric(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateLogMetric', () => { + it('invokes updateLogMetric without error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + var metric = {}; + var request = { + metricName: formattedMetricName, + metric: metric, + }; + + // Mock response + var name = 'name3373707'; + var description = 'description-1724546052'; + var filter = 'filter-1274492040'; + var valueExtractor = 'valueExtractor2047672534'; + var expectedResponse = { + name: name, + description: description, + filter: filter, + valueExtractor: valueExtractor, + }; + + // Mock Grpc layer + client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateLogMetric(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateLogMetric with error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + var metric = {}; + var request = { + metricName: formattedMetricName, + metric: metric, + }; + + // Mock Grpc layer + client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateLogMetric(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteLogMetric', () => { + it('invokes deleteLogMetric without error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + var request = { + metricName: formattedMetricName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod(request); + + client.deleteLogMetric(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteLogMetric with error', done => { + var client = new loggingModule.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + var request = { + metricName: formattedMetricName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteLogMetric(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); +}); + +function mockSimpleGrpcMethod(expectedRequest, response, error) { + return function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 2d6cc6a2b60..c6811734ca2 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -23,8 +23,9 @@ var proxyquire = require('proxyquire'); var through = require('through2'); var util = require('@google-cloud/common').util; +var v2 = require('../src/v2'); + var PKG = require('../package.json'); -var v2 = require('../src/v2/index.js'); var extended = false; var fakePaginator = { @@ -75,10 +76,7 @@ var fakeUtil = extend({}, util, { }, }); -var v2Override; -function fakeV2() { - return (v2Override || util.noop).apply(null, arguments); -} +function fakeV2() {} function FakeEntry() { this.calledWith_ = arguments; @@ -120,7 +118,6 @@ describe('Logging', function() { googleAutoAuthOverride = null; isCustomTypeOverride = null; replaceProjectIdTokenOverride = null; - v2Override = null; logging = new Logging({ projectId: PROJECT_ID, @@ -128,6 +125,21 @@ describe('Logging', function() { }); describe('instantiation', function() { + let EXPECTED_SCOPES = []; + let clientClasses = [ + v2.ConfigServiceV2Client, + v2.LoggingServiceV2Client, + v2.MetricsServiceV2Client, + ]; + + for (let clientClass of clientClasses) { + for (let scope of clientClass.scopes) { + if (clientClasses.indexOf(scope) === -1) { + EXPECTED_SCOPES.push(scope); + } + } + } + it('should extend the correct methods', function() { assert(extended); // See `fakePaginator.extend` }); @@ -177,9 +189,9 @@ describe('Logging', function() { options_, extend( { - scopes: v2.ALL_SCOPES, libName: 'gccl', libVersion: PKG.version, + scopes: EXPECTED_SCOPES, }, options ) @@ -205,9 +217,9 @@ describe('Logging', function() { logging.options, extend( { - scopes: v2.ALL_SCOPES, libName: 'gccl', libVersion: PKG.version, + scopes: EXPECTED_SCOPES, }, options ) @@ -314,7 +326,7 @@ describe('Logging', function() { }); logging.request = function(config) { - assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'createSink'); var expectedParent = 'projects/' + logging.projectId; @@ -428,7 +440,7 @@ describe('Logging', function() { var options = {}; logging.request = function(config) { - assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'listLogEntries'); assert.deepEqual( @@ -551,7 +563,7 @@ describe('Logging', function() { it('should make request once reading', function(done) { logging.request = function(config) { - assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'listLogEntriesStream'); assert.deepEqual(config.reqOpts, { @@ -627,7 +639,7 @@ describe('Logging', function() { it('should make the correct API request', function(done) { logging.request = function(config) { - assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'listSinks'); assert.deepEqual(config.reqOpts, { @@ -729,7 +741,7 @@ describe('Logging', function() { it('should make request once reading', function(done) { logging.request = function(config) { - assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'listSinksStream'); assert.deepEqual(config.reqOpts, { @@ -846,15 +858,9 @@ describe('Logging', function() { [CONFIG.method]: util.noop, }; - v2Override = function(options) { + fakeV2[CONFIG.client] = function(options) { assert.strictEqual(options, logging.options); - - return { - [CONFIG.client]: function(options) { - assert.strictEqual(options, logging.options); - return fakeClient; - }, - }; + return fakeClient; }; logging.api = {}; @@ -865,7 +871,7 @@ describe('Logging', function() { }); it('should use the cached client', function(done) { - v2Override = function() { + fakeV2[CONFIG.client] = function() { done(new Error('Should not re-instantiate a GAX client.')); }; diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 8386d09df7e..45a76dd2b80 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -195,7 +195,7 @@ describe('Log', function() { describe('delete', function() { it('should accept gaxOptions', function(done) { log.logging.request = function(config, callback) { - assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'deleteLog'); assert.deepEqual(config.reqOpts, { @@ -337,7 +337,7 @@ describe('Log', function() { }); log.logging.request = function(config, callback) { - assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); assert.deepEqual(config.reqOpts, { @@ -370,7 +370,7 @@ describe('Log', function() { }); log.logging.request = function(config, callback) { - assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); assert.deepEqual(config.reqOpts, { @@ -389,7 +389,7 @@ describe('Log', function() { it('should make the correct API request', function(done) { log.logging.request = function(config, callback) { - assert.strictEqual(config.client, 'loggingServiceV2Client'); + assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); assert.deepEqual(config.reqOpts, { diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index b5b21e34f91..8c7f78d3e17 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -90,7 +90,7 @@ describe('Sink', function() { describe('delete', function() { it('should accept gaxOptions', function(done) { sink.logging.request = function(config, callback) { - assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'deleteSink'); assert.deepEqual(config.reqOpts, { @@ -120,7 +120,7 @@ describe('Sink', function() { describe('getMetadata', function() { it('should make correct request', function(done) { sink.logging.request = function(config) { - assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'getSink'); assert.deepEqual(config.reqOpts, { @@ -226,7 +226,7 @@ describe('Sink', function() { }; sink.logging.request = function(config) { - assert.strictEqual(config.client, 'configServiceV2Client'); + assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'updateSink'); assert.deepEqual(config.reqOpts, { From a3eb035b0069230f3ab70ebb44575b403489d4ca Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 19 Oct 2017 08:24:36 -0700 Subject: [PATCH 0109/1029] Fix CI configuration glitches. (#10) This will make system and sample tests pass on CircleCI. --- handwritten/logging/.circleci/config.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 19849b9e8cd..2396cbf68a4 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -162,19 +162,19 @@ jobs: command: | cd samples/ npm install - npm link @google-cloud/storage + npm link @google-cloud/logging cd .. - run: name: Run sample tests. command: npm run samples-test environment: GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /var/storage/.circleci/key.json + GOOGLE_APPLICATION_CREDENTIALS: /var/logging/.circleci/key.json - run: name: Remove unencrypted key. command: rm .circleci/key.json when: always - working_directory: /var/storage/ + working_directory: /var/logging/ system_tests: docker: @@ -187,12 +187,6 @@ jobs: openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - - run: - name: Decrypt second account credentials (storage-specific). - command: | - openssl aes-256-cbc -d -in .circleci/no-whitelist-key.json.enc \ - -out .circleci/no-whitelist-key.json \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - run: name: Install modules and dependencies. command: npm install @@ -200,8 +194,6 @@ jobs: name: Run system tests. command: npm run system-test environment: - GCN_STORAGE_2ND_PROJECT_ID: gcloud-node-whitelist-ci-tests - GCN_STORAGE_2ND_PROJECT_KEY: .circleci/no-whitelist-key.json GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - run: name: Remove unencrypted key. From 7d15d23e6f154af28ec0537afef3a595d087256b Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 19 Oct 2017 14:20:33 -0700 Subject: [PATCH 0110/1029] Update scaffolding from repo-tools. (#11) --- handwritten/logging/.eslintignore | 3 +- handwritten/logging/.gitignore | 5 +- handwritten/logging/.jsdoc.js | 2 +- handwritten/logging/.mailmap | 6 ++ handwritten/logging/.prettierignore | 3 + handwritten/logging/CONTRIBUTORS | 19 +++++ handwritten/logging/README.md | 34 ++++---- handwritten/logging/package.json | 80 ++++++++----------- handwritten/logging/system-test/.eslintrc.yml | 1 + 9 files changed, 84 insertions(+), 69 deletions(-) create mode 100644 handwritten/logging/.mailmap create mode 100644 handwritten/logging/.prettierignore create mode 100644 handwritten/logging/CONTRIBUTORS diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore index dcd382328c0..f6fac98b0a8 100644 --- a/handwritten/logging/.eslintignore +++ b/handwritten/logging/.eslintignore @@ -1,4 +1,3 @@ node_modules/* samples/node_modules/* -**/doc/*.js -src/v*/**/*.js +src/**/doc/* diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index 428bfca5058..d97022b4503 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -3,10 +3,7 @@ .coverage .nyc_output docs/ -packages/google-cloud/README.md -packages/*/AUTHORS -packages/*/CONTRIBUTORS -packages/*/COPYING +out/ system-test/secrets.js system-test/*key.json *.lock diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 7ac73157c75..c46ee725e66 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -39,7 +39,7 @@ module.exports = { copyright: 'Copyright 2017 Google, Inc.', includeDate: false, sourceFiles: false, - systemName: 'storage', + systemName: '@google-cloud/logging', theme: 'lumen' } }; diff --git a/handwritten/logging/.mailmap b/handwritten/logging/.mailmap new file mode 100644 index 00000000000..2a355f2feb5 --- /dev/null +++ b/handwritten/logging/.mailmap @@ -0,0 +1,6 @@ +Jason Dobry Jason Dobry +Jason Dobry Jason Dobry +Luke Sneeringer Luke Sneeringer +Stephen Sawchuk Stephen +Stephen Sawchuk Stephen Sawchuk +Stephen Sawchuk Stephen Sawchuk diff --git a/handwritten/logging/.prettierignore b/handwritten/logging/.prettierignore new file mode 100644 index 00000000000..f6fac98b0a8 --- /dev/null +++ b/handwritten/logging/.prettierignore @@ -0,0 +1,3 @@ +node_modules/* +samples/node_modules/* +src/**/doc/* diff --git a/handwritten/logging/CONTRIBUTORS b/handwritten/logging/CONTRIBUTORS new file mode 100644 index 00000000000..5e41f150afa --- /dev/null +++ b/handwritten/logging/CONTRIBUTORS @@ -0,0 +1,19 @@ +# The names of individuals who have contributed to this project. +# +# Names are formatted as: +# name +# +Ace Nassri +Ali Ijaz Sheikh +Bill Prin +Cristian Cavalli +Dave Gramlich +Eric Uldall +Ernest Landrito +Jason Dobry +Josh Ferge +Jun Mukai +Song Wang +Stephen Sawchuk +Takashi Matsuo +Tim Swast diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index e977a1cf5b0..0f743a84e99 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -4,8 +4,8 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-logging.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-logging) -[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-logging?svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-logging) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/repo-migration.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) +[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-logging?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-logging) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) > Node.js idiomatic client for [Logging][product-docs]. @@ -21,7 +21,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. **Table of contents:** -* [QuickStart](#quickstart) +* [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) * [Using the client library](#using-the-client-library) @@ -51,7 +51,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid= +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started ### Installing the client library @@ -69,7 +69,7 @@ const projectId = 'YOUR_PROJECT_ID'; // Instantiates a client const logging = Logging({ - projectId: projectId + projectId: projectId, }); // The name of the log to write to @@ -80,29 +80,33 @@ const log = logging.log(logName); // The data to write to the log const text = 'Hello, world!'; // The metadata associated with the entry -const metadata = { resource: { type: 'global' } }; +const metadata = {resource: {type: 'global'}}; // Prepares a log entry const entry = log.entry(metadata, text); // Writes the log entry -log.write(entry) +log + .write(entry) .then(() => { console.log(`Logged: ${text}`); }) - .catch((err) => { + .catch(err => { console.error('ERROR:', err); }); ``` ## Samples -Samples are in the [`samples/`](https://github.com/blob/master/samples) directory. The samples' `README.md` +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/blob/master/samples) directory. The samples' `README.md` has instructions for running the samples. -| Sample | Documentation | Source Code | -| --------------------------- | ---------------------------------- | --------------------------------- | -| Logs | [documentation](https://cloud.google.com/logging/docs) | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js) | -| Sinks | [documentation](https://cloud.google.com/logging/docs) | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js) | +| Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | + +The [Logging Node.js Client API Reference][client-docs] documentation +also contains samples. ## Versioning @@ -114,10 +118,6 @@ unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against **GA** libraries are addressed with the highest priority. -Please note that the auto-generated portions of the **GA** libraries (the ones -in modules such as `v1` or `v2`) are considered to be of **Beta** quality, even -if the libraries that wrap them are **GA**. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5a1eb313263..30ac85632a4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,34 +1,13 @@ { "name": "@google-cloud/logging", + "description": "Stackdriver Logging Client Library for Node.js", "version": "1.0.6", + "license": "Apache-2.0", "author": "Google Inc.", - "description": "Stackdriver Logging Client Library for Node.js", - "contributors": [ - { - "name": "Burcu Dogan", - "email": "jbd@google.com" - }, - { - "name": "Johan Euphrosine", - "email": "proppy@google.com" - }, - { - "name": "Patrick Costello", - "email": "pcostell@google.com" - }, - { - "name": "Ryan Seys", - "email": "ryan@ryanseys.com" - }, - { - "name": "Silvano Luciani", - "email": "silvano@google.com" - }, - { - "name": "Stephen Sawchuk", - "email": "sawchuk@gmail.com" - } - ], + "engines": { + "node": ">=4.0.0" + }, + "repository": "googleapis/nodejs-logging", "main": "./src/index.js", "files": [ "src", @@ -36,7 +15,6 @@ "CONTRIBUTORS", "LICENSE" ], - "repository": "googleapis/nodejs-logging", "keywords": [ "google apis client", "google api client", @@ -51,6 +29,34 @@ "stackdriver logging", "stackdriver" ], + "contributors": [ + "Ace Nassri ", + "Ali Ijaz Sheikh ", + "Bill Prin ", + "Cristian Cavalli ", + "Dave Gramlich ", + "Eric Uldall ", + "Ernest Landrito ", + "Jason Dobry ", + "Josh Ferge ", + "Jun Mukai ", + "Song Wang ", + "Stephen Sawchuk ", + "Takashi Matsuo ", + "Tim Swast " + ], + "scripts": { + "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", + "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", + "test": "repo-tools test run --cmd npm -- run cover", + "docs": "jsdoc -c .jsdoc.js", + "prettier": "repo-tools exec -- prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", + "publish-module": "node ../../scripts/publish.js logging", + "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --no-timeouts", + "samples-test": "cd samples/ && npm test && cd ../", + "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", + "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" + }, "dependencies": { "@google-cloud/common": "^0.13.0", "@google-cloud/common-grpc": "^0.4.0", @@ -72,7 +78,7 @@ }, "devDependencies": { "@google-cloud/bigquery": "*", - "@google-cloud/nodejs-repo-tools": "^2.0.4", + "@google-cloud/nodejs-repo-tools": "^2.0.10", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", "async": "^2.5.0", @@ -92,21 +98,5 @@ "propprop": "^0.3.0", "proxyquire": "^1.7.10", "uuid": "^3.0.1" - }, - "scripts": { - "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", - "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", - "test": "repo-tools test run --cmd npm -- run cover", - "docs": "jsdoc -c .jsdoc.js", - "prettier": "repo-tools exec -- prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", - "publish-module": "node ../../scripts/publish.js logging", - "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --no-timeouts", - "samples-test": "cd samples/ && npm test && cd ../", - "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" - }, - "license": "Apache-2.0", - "engines": { - "node": ">=4.0.0" } } diff --git a/handwritten/logging/system-test/.eslintrc.yml b/handwritten/logging/system-test/.eslintrc.yml index 73f7bbc946f..2e6882e46d2 100644 --- a/handwritten/logging/system-test/.eslintrc.yml +++ b/handwritten/logging/system-test/.eslintrc.yml @@ -3,3 +3,4 @@ env: mocha: true rules: node/no-unpublished-require: off + no-console: off From 4277b1fc50afe3cbfd258a844c2d063b55abc67c Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 20 Oct 2017 08:35:58 -0700 Subject: [PATCH 0111/1029] Fix docs. (#12) --- handwritten/logging/CONTRIBUTORS | 1 + handwritten/logging/LICENSE | 5 +- handwritten/logging/README.md | 2 +- handwritten/logging/package.json | 3 +- handwritten/logging/src/entry.js | 43 +-- handwritten/logging/src/index.js | 390 +++++++++++++++++++++------- handwritten/logging/src/log.js | 237 +++++++++++------ handwritten/logging/src/metadata.js | 24 +- handwritten/logging/src/sink.js | 138 +++++++--- 9 files changed, 588 insertions(+), 255 deletions(-) diff --git a/handwritten/logging/CONTRIBUTORS b/handwritten/logging/CONTRIBUTORS index 5e41f150afa..f141e8a28ce 100644 --- a/handwritten/logging/CONTRIBUTORS +++ b/handwritten/logging/CONTRIBUTORS @@ -13,6 +13,7 @@ Ernest Landrito Jason Dobry Josh Ferge Jun Mukai +Luke Sneeringer Song Wang Stephen Sawchuk Takashi Matsuo diff --git a/handwritten/logging/LICENSE b/handwritten/logging/LICENSE index 1ba0da78c5e..7a4a3ea2424 100644 --- a/handwritten/logging/LICENSE +++ b/handwritten/logging/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -186,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014-2017 Google Inc. + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +199,4 @@ 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. + limitations under the License. \ No newline at end of file diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 0f743a84e99..292accdfbe5 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -68,7 +68,7 @@ const Logging = require('@google-cloud/logging'); const projectId = 'YOUR_PROJECT_ID'; // Instantiates a client -const logging = Logging({ +const logging = new Logging({ projectId: projectId, }); diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 30ac85632a4..fbf88741080 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -40,6 +40,7 @@ "Jason Dobry ", "Josh Ferge ", "Jun Mukai ", + "Luke Sneeringer ", "Song Wang ", "Stephen Sawchuk ", "Takashi Matsuo ", @@ -49,7 +50,7 @@ "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", "test": "repo-tools test run --cmd npm -- run cover", - "docs": "jsdoc -c .jsdoc.js", + "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", "prettier": "repo-tools exec -- prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", "publish-module": "node ../../scripts/publish.js logging", "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --no-timeouts", diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index a0237604052..1f28ca9de6a 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -14,10 +14,6 @@ * limitations under the License. */ -/*! - * @module logging/entry - */ - 'use strict'; var commonGrpc = require('@google-cloud/common-grpc'); @@ -30,14 +26,13 @@ var eventId = new EventId(); /** * Create an entry object to define new data to insert into a log. * - * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * - * @alias module:logging/entry - * @constructor + * @class * - * @param {object=} metadata - See a + * @param {?object} [metadata] See a * [LogEntry Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). - * @param {object|string} data - The data to use as the value for this log + * @param {object|string} data The data to use as the value for this log * entry. * * If providing an object, these value types are supported: @@ -49,9 +44,10 @@ var eventId = new EventId(); * - `Array` * * Any other types are stringified with `String(value)`. - * @return {module:logging/entry} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); * var syslog = logging.log('syslog'); * * var metadata = { @@ -76,7 +72,7 @@ var eventId = new EventId(); * * //- * // You will also receive `Entry` objects when using - * // {module:logging#getEntries} and {module:logging/log#getEntries}. + * // Logging#getEntries() and Log#getEntries(). * //- * logging.getEntries(function(err, entries) { * if (!err) { @@ -85,6 +81,12 @@ var eventId = new EventId(); * }); */ function Entry(metadata, data) { + /** + * @name Entry#metadata + * @type {object} + * @property {Date} timestamp + * @property {number} insertId + */ this.metadata = extend( { timestamp: new Date(), @@ -101,8 +103,13 @@ function Entry(metadata, data) { // // We use a globally unique monotonically increasing EventId as the // insertId. + this.metadata.insertId = this.metadata.insertId || eventId.new(); + /** + * @name Entry#data + * @type {object} + */ this.data = data; } @@ -111,9 +118,9 @@ function Entry(metadata, data) { * * @private * - * @param {object} entry - An API representation of an entry. See a + * @param {object} entry An API representation of an entry. See a * [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). - * @return {module:logging/entry} + * @returns {Entry} */ Entry.fromApiResponse_ = function(entry) { var data = entry[entry.payload]; @@ -136,10 +143,9 @@ Entry.fromApiResponse_ = function(entry) { /** * Serialize an entry to the format the API expects. * - * @param {object=} options - Configuration object. - * @param {boolean} options.removeCircular - Replace circular references in an + * @param {object} [options] Configuration object. + * @param {boolean} [options.removeCircular] Replace circular references in an * object with a string value, `[Circular]`. - * @private */ Entry.prototype.toJSON = function(options) { options = options || {}; @@ -168,4 +174,9 @@ Entry.prototype.toJSON = function(options) { return entry; }; +/** + * Reference to the {@link Entry} class. + * @name module:@google-cloud/logging.Entry + * @see Entry + */ module.exports = Entry; diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index b24ce46be75..50f7ca7ccd9 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -14,10 +14,6 @@ * limitations under the License. */ -/*! - * @module logging - */ - 'use strict'; var arrify = require('arrify'); @@ -33,38 +29,83 @@ var through = require('through2'); var PKG = require('../package.json'); var v2 = require('./v2'); -/** - * @type {module:logging/entry} - * @private - */ var Entry = require('./entry.js'); +var Log = require('./log.js'); +var Sink = require('./sink.js'); /** - * @type {module:logging/log} - * @private + * @namespace google + */ +/** + * @namespace google.api + */ +/** + * @namespace google.logging + */ +/** + * @namespace google.logging.type + */ +/** + * @namespace google.logging.v2 + */ +/** + * @namespace google.protobuf */ -var Log = require('./log.js'); /** - * @type {module:logging/sink} - * @private + * @typedef {object} ClientConfig + * @property {string} [projectId] The project ID from the Google Developer's + * Console, e.g. 'grape-spaceship-123'. We will also check the environment + * variable `GCLOUD_PROJECT` for your project ID. If your app is running in + * an environment which supports {@link https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application Application Default Credentials}, + * your project ID will be detected automatically. + * @property {string} [keyFilename] Full path to the a .json, .pem, or .p12 key + * downloaded from the Google Developers Console. If you provide a path to a + * JSON file, the `projectId` option above is not necessary. NOTE: .pem and + * .p12 require you to specify the `email` option as well. + * @property {string} [email] Account email address. Required when using a .pem + * or .p12 keyFilename. + * @property {object} [credentials] Credentials object. + * @property {string} [credentials.client_email] + * @property {string} [credentials.private_key] + * @property {boolean} [autoRetry=true] Automatically retry requests if the + * response is related to rate limits or certain intermittent server errors. + * We will exponentially backoff subsequent requests by default. + * @property {number} [maxRetries=3] Maximum number of automatic retries + * attempted before returning the error. + * @property {Constructor} [promise] Custom promise module to use instead of + * native Promises. */ -var Sink = require('./sink.js'); /** * [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to * store, search, analyze, monitor, and alert on log data and events from Google * Cloud Platform and Amazon Web Services (AWS). * - * @constructor - * @alias module:logging - - * @resource [What is Stackdriver Logging?]{@link https://cloud.google.com/logging/docs} - * @resource [Introduction to the Stackdriver Logging API]{@link https://cloud.google.com/logging/docs/api} - * @resource [Logging to Stackdriver from Bunyan]{@link https://www.npmjs.com/package/@google-cloud/logging-bunyan} - * @resource [Logging to Stackdriver from Winston]{@link https://www.npmjs.com/package/@google-cloud/logging-winston} + * @class + * + * @see [What is Stackdriver Logging?]{@link https://cloud.google.com/logging/docs} + * @see [Introduction to the Stackdriver Logging API]{@link https://cloud.google.com/logging/docs/api} + * @see [Logging to Stackdriver from Bunyan]{@link https://www.npmjs.com/package/@google-cloud/logging-bunyan} + * @see [Logging to Stackdriver from Winston]{@link https://www.npmjs.com/package/@google-cloud/logging-winston} + * + * @param {ClientConfig} [options] Configuration options. * - * @param {object} options - [Configuration object](#/docs). + * @example Import the client library + * const Logging = require('@google-cloud/logging'); + * + * @example Create a client that uses Application Default Credentials (ADC): + * const logging = new Logging(); + * + * @example Create a client with explicit credentials: + * const logging = new Logging({ + * projectId: 'your-project-id', + * keyFilename: '/path/to/keyfile.json' + * }); + * + * @example include:samples/quickstart.js + * region_tag:logging_quickstart + * Full quickstart example: */ function Logging(options) { if (!(this instanceof Logging)) { @@ -103,39 +144,59 @@ function Logging(options) { this.projectId = this.options.projectId || '{{projectId}}'; } +/** + * Config to set for the sink. Not all available options are listed here, see + * the [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink) + * definition for full details. + * + * @typedef {object} CreateSinkRequest + * @property {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {Bucket|Dataset|Topic} [destination] The destination. The proper ACL + * scopes will be granted to the provided destination. Can be one of: + * {@link https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket Bucket}, + * {@link https://cloud.google.com/nodejs/docs/reference/bigquery/latest/Dataset Dataset}, + * or {@link https://cloud.google.com/nodejs/docs/reference/pubsub/latest/Topic Topic} + * @property {string} [filter] An advanced logs filter. Only log entries + * matching the filter are written. + */ +/** + * @typedef {array} CreateSinkResponse + * @property {Sink} 0 The new {@link Sink}. + * @property {object} 1 The full API response. + */ +/** + * @callback CreateSinkCallback + * @param {?Error} err Request error, if any. + * @param {Sink} sink The new {@link Sink}. + * @param {object} apiResponse The full API response. + */ // jscs:disable maximumLineLength /** * Create a sink. * - * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} - * @resource [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} - * @resource [projects.sinks.create API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create} + * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} + * @see [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} + * @see [projects.sinks.create API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create} * - * @throws {Error} if a name is not provided. + * @param {string} name Name of the sink. + * @param {CreateSinkRequest} config Config to set for the sink. + * @param {CreateSinkCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} If a name is not provided. * @throws {Error} if a config object is not provided. - * - * @param {string} name - Name of the sink. - * @param {object} config - See a - * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). - * @param {object} config.gaxOptions - Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {module:storage/bucket|module:bigquery/dataset|module:pubsub/topic} config.destination - - * The destination. The proper ACL scopes will be granted to the provided - * destination. - * @param {string=} config.filter - An advanced logs filter. Only log entries - * matching the filter are written. - * @param {function} callback - The cLoggingallback function. - * @param {?error} callback.err - An error returned while making this request. - * @param {module:logging/sink} callback.sink - The created Sink object. - * @param {object} callback.apiResponse - The full API response. + * @see Sink#create * * @example - * var gcs = require('@google-cloud/storage')({ + * var Storage = require('@google-cloud/storage'); + * var storage = new Storage({ * projectId: 'grape-spaceship-123' * }); + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); * * var config = { - * destination: gcs.bucket('logging-bucket'), + * destination: storage.bucket('logging-bucket'), * filter: 'severity = ALERT' * }; * @@ -217,17 +278,20 @@ Logging.prototype.createSink = function(name, config, callback) { * * Note that using this method will not itself make any API requests. You will * use the object returned in other API calls, such as - * {module:logging/log#write}. + * {@link Log#write}. * - * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * - * @param {object=|string=} resource - See a + * @param {?object|?string} [resource] See a * [Monitored Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource). - * @param {object|string} data - The data to use as the value for this log + * @param {object|string} data The data to use as the value for this log * entry. - * @return {module:logging/entry} + * @returns {Entry} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * * var resource = { * type: 'gce_instance', * labels: { @@ -259,30 +323,50 @@ Logging.prototype.entry = function(resource, data) { }; /** - * List the entries in your logs. + * Query object for listing entries. * - * @resource [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} - * - * @param {object=} options - Filtering options. - * @param {boolean} options.autoPaginate - Have pagination handled - * automatically. Default: true. - * @param {string} options.filter - An + * @typedef {object} GetEntriesRequest + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {string} [filter] An * [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). * An empty filter matches all log entries. - * @param {object} options.gaxOptions - Request configuration options, outlined + * @property {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {string} options.orderBy - How the results should be sorted, + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return. + * @property {string} [orderBy] How the results should be sorted, * `timestamp` (oldest first) and `timestamp desc` (newest first, * **default**). - * @param {number} options.pageSize - Maximum number of logs to return. - * @param {string} options.pageToken - A previously-returned page token + * @property {number} [pageSize] Maximum number of logs to return. + * @property {string} [pageToken] A previously-returned page token * representing part of the larger set of results to view. - * @param {function} callback - The callback function. - * @param {?error} callback.err - An error returned while making this request. - * @param {module:logging/entry[]} callback.entries - Entries from your logs. - * @param {object} callback.apiResponse - The full API response. + */ +/** + * @typedef {array} GetEntriesResponse + * @property {Entry[]} 0 Array of {@link Entry} instances. + * @property {object} 1 The full API response. + */ +/** + * @callback GetEntriesCallback + * @param {?Error} err Request error, if any. + * @param {Entry[]} entries Array of {@link Entry} instances. + * @param {object} apiResponse The full API response. + */ +/** + * List the entries in your logs. + * + * @see [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} + * + * @param {GetEntriesRequest} [query] Query object for listing entries. + * @param {GetEntriesCallback} [callback] Callback function. + * @returns {Promise} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * * logging.getEntries(function(err, entries) { * // `entries` is an array of Stackdriver Logging entry objects. * // See the `data` property to read the data from the entry. @@ -364,14 +448,18 @@ Logging.prototype.getEntries = function(options, callback) { }; /** - * List the {module:logging/entry} objects in your logs as a readable object + * List the {@link Entry} objects in your logs as a readable object * stream. * - * @param {object=} options - Configuration object. See - * {module:logging#getEntries} for a complete list of options. - * @return {stream} + * @method Logging#getEntriesStream + * @param {GetEntriesRequest} [query] Query object for listing entries. + * @returns {ReadableStream} A readable stream that emits {@link Entry} + * instances. * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * * logging.getEntriesStream() * .on('error', console.error) * .on('data', function(entry) { @@ -443,22 +531,45 @@ Logging.prototype.getEntriesStream = function(options) { return userStream; }; +/** + * Query object for listing sinks. + * + * @typedef {object} GetSinksRequest + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return. + * @property {number} [pageSize] Maximum number of logs to return. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + */ +/** + * @typedef {array} GetSinksResponse + * @property {Sink[]} 0 Array of {@link Sink} instances. + * @property {object} 1 The full API response. + */ +/** + * @callback GetSinksCallback + * @param {?Error} err Request error, if any. + * @param {Sink[]} sinks Array of {@link Sink} instances. + * @param {object} apiResponse The full API response. + */ /** * Get the sinks associated with this project. * - * @resource [projects.sinks.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list} + * @see [projects.sinks.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list} * - * @param {object=} options - Configuration object. - * @param {boolean} options.autoPaginate - Have pagination handled - * automatically. Default: true. - * @param {object} options.gaxOptions - Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {function} callback - The callback function. - * @param {?error} callback.err - An error returned while making this request. - * @param {module:logging/sink[]} callback.sinks - Sink objects. - * @param {object} callback.apiResponse - The full API response. + * @param {GetSinksRequest} [query] Query object for listing sinks. + * @param {GetSinksCallback} [callback] Callback function. + * @returns {Promise} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * * logging.getSinks(function(err, sinks) { * // sinks is an array of Sink objects. * }); @@ -520,14 +631,18 @@ Logging.prototype.getSinks = function(options, callback) { }; /** - * Get the {module:logging/sink} objects associated with this project as a + * Get the {@link Sink} objects associated with this project as a * readable object stream. * - * @param {object=} options - Configuration object. See - * {module:logging#getSinks} for a complete list of options. - * @return {stream} + * @method Logging#getSinksStream + * @param {GetSinksRequest} [query] Query object for listing sinks. + * @returns {ReadableStream} A readable stream that emits {@link Sink} + * instances. * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * * logging.getSinksStream() * .on('error', console.error) * .on('data', function(sink) { @@ -596,15 +711,17 @@ Logging.prototype.getSinksStream = function(options) { /** * Get a reference to a Stackdriver Logging log. * - * @resource [Log Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs} + * @see [Log Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs} * - * @param {string} name - Name of the existing log. - * @param {object=} options - Configuration object. - * @param {boolean} options.removeCircular - Replace circular references in + * @param {string} name Name of the existing log. + * @param {object} [options] Configuration object. + * @param {boolean} [options.removeCircular] Replace circular references in * logged objects with a string value, `[Circular]`. (Default: false) - * @return {module:logging/log} + * @returns {Log} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); * var log = logging.log('my-log'); */ Logging.prototype.log = function(name, options) { @@ -614,12 +731,14 @@ Logging.prototype.log = function(name, options) { /** * Get a reference to a Stackdriver Logging sink. * - * @resource [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} + * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} * - * @param {string} name - Name of the existing sink. - * @return {module:logging/sink} + * @param {string} name Name of the existing sink. + * @returns {Sink} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); * var sink = logging.sink('my-sink'); */ Logging.prototype.sink = function(name) { @@ -629,11 +748,11 @@ Logging.prototype.sink = function(name) { /** * Funnel all API requests through this method, to be sure we have a project ID. * - * @param {object} config - Configuration object. - * @param {object} config.gaxOpts - GAX options. - * @param {function} config.method - The gax method to call. - * @param {object} config.reqOpts - Request options. - * @param {function=} callback - The callback function. + * @param {object} config Configuration object. + * @param {object} config.gaxOpts GAX options. + * @param {function} config.method The gax method to call. + * @param {object} config.reqOpts Request options. + * @param {function} [callback] Callback function. */ Logging.prototype.request = function(config, callback) { var self = this; @@ -727,7 +846,7 @@ Logging.prototype.request = function(config, callback) { * This method is called when creating a sink with a Bucket destination. The * bucket must first grant proper ACL access to the Stackdriver Logging account. * - * The parameters are the same as what {module:logging#createSink} accepts. + * The parameters are the same as what {@link Logging#createSink} accepts. * * @private */ @@ -752,7 +871,7 @@ Logging.prototype.setAclForBucket_ = function(name, config, callback) { * dataset must first grant proper ACL access to the Stackdriver Logging * account. * - * The parameters are the same as what {module:logging#createSink} accepts. + * The parameters are the same as what {@link Logging#createSink} accepts. * * @private */ @@ -799,7 +918,7 @@ Logging.prototype.setAclForDataset_ = function(name, config, callback) { * This method is called when creating a sink with a Topic destination. The * topic must first grant proper ACL access to the Stackdriver Logging account. * - * The parameters are the same as what {module:logging#createSink} accepts. + * The parameters are the same as what {@link Logging#createSink} accepts. * * @private */ @@ -851,10 +970,87 @@ common.util.promisifyAll(Logging, { exclude: ['entry', 'log', 'request', 'sink'], }); +/** + * {@link Entry} class. + * + * @name Logging.Entry + * @see Entry + * @type {Constructor} + */ Logging.Entry = Entry; + +/** + * {@link Log} class. + * + * @name Logging.Log + * @see Log + * @type {Constructor} + */ Logging.Log = Log; + +/** + * Reference to the {@link Logging} class. + * @name module:@google-cloud/logging.Logging + * @see Logging + */ +/** + * {@link Logging} class. + * + * @name Logging.Logging + * @see Logging + * @type {Constructor} + */ Logging.Logging = Logging; + +/** + * {@link Sink} class. + * + * @name Logging.Sink + * @see Sink + * @type {Constructor} + */ Logging.Sink = Sink; +/** + * The default export of the `@google-cloud/logging` package is the + * {@link Logging} class. + * + * See {@link Logging} and {@link ClientConfig} for client methods and + * configuration options. + * + * @module {Constructor} @google-cloud/logging + * @alias nodejs-logging + * + * @example Install the client library with npm: + * npm install --save @google-cloud/logging + * + * @example Import the client library + * const Logging = require('@google-cloud/logging'); + * + * @example Create a client that uses Application Default Credentials (ADC): + * const logging = new Logging(); + * + * @example Create a client with explicit credentials: + * const logging = new Logging({ + * projectId: 'your-project-id', + * keyFilename: '/path/to/keyfile.json' + * }); + * + * @example include:samples/quickstart.js + * region_tag:logging_quickstart + * Full quickstart example: + */ module.exports = Logging; + +/** + * Reference to the low-level auto-generated clients for the V2 Logging service. + * + * @type {object} + * @property {constructor} LoggingServiceV2Client + * Reference to {@link v2.LoggingServiceV2Client} + * @property {constructor} ConfigServiceV2Client + * Reference to {@link v2.ConfigServiceV2Client} + * @property {constructor} MetricsServiceV2Client + * Reference to {@link v2.MetricsServiceV2Client} + */ module.exports.v2 = v2; diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index e93344bf144..9837c5e43eb 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -14,10 +14,6 @@ * limitations under the License. */ -/*! - * @module logging/log - */ - 'use strict'; var arrify = require('arrify'); @@ -26,22 +22,9 @@ var extend = require('extend'); var is = require('is'); var snakeCaseKeys = require('snakecase-keys'); -/** - * @type {module:logging/entry} - * @private - */ var Entry = require('./entry.js'); - -/** - * @type {module:logging/metadata} - * @private - */ var Metadata = require('./metadata.js'); -/*! Developer Documentation - * - * @param {module:logging} logging - Parent Logging instance. - */ /** * A log is a named collection of entries, each entry representing a timestamped * event. Logs can be produced by Google Cloud Platform services, by third-party @@ -49,17 +32,19 @@ var Metadata = require('./metadata.js'); * produced by the Apache Web Server, but the log * `compute.googleapis.com/activity_log` is produced by Google Compute Engine. * - * @resource [Introduction to Logs]{@link https://cloud.google.com/logging/docs/basic-concepts#logs} + * @see [Introduction to Logs]{@link https://cloud.google.com/logging/docs/basic-concepts#logs} * - * @alias module:logging/log - * @constructor + * @class * - * @param {string} name - Name of the log. - * @param {object=} options - Configuration object. - * @param {boolean} options.removeCircular - Replace circular references in + * @param {Logging} logging {@link Logging} instance. + * @param {string} name Name of the log. + * @param {object} [options] Configuration object. + * @param {boolean} [options.removeCircular] Replace circular references in * logged objects with a string value, `[Circular]`. (Default: false) * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); * var log = logging.log('syslog'); */ function Log(logging, name, options) { @@ -70,6 +55,10 @@ function Log(logging, name, options) { this.metadata_ = new Metadata(logging); this.logging = logging; + /** + * @name Log#name + * @type {string} + */ this.name = this.formattedName_.split('/').pop(); } @@ -99,7 +88,7 @@ Log.assignSeverityToEntries_ = function(entries, severity) { * * @private * - * @return {string} + * @returns {string} */ Log.formatName_ = function(projectId, name) { var path = 'projects/' + projectId + '/logs/'; @@ -116,10 +105,18 @@ Log.formatName_ = function(projectId, name) { /** * Write a log entry with a severity of "ALERT". * - * This is a simple wrapper around {module:logging/log#write}. All arguments are + * This is a simple wrapper around {@link Log#write}. All arguments are * the same as documented there. * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -140,10 +137,18 @@ Log.prototype.alert = function(entry, options, callback) { /** * Write a log entry with a severity of "CRITICAL". * - * This is a simple wrapper around {module:logging/log#write}. All arguments are + * This is a simple wrapper around {@link Log#write}. All arguments are * the same as documented there. * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -165,10 +170,18 @@ Log.prototype.critical = function(entry, options, callback) { /** * Write a log entry with a severity of "DEBUG". * - * This is a simple wrapper around {module:logging/log#write}. All arguments are + * This is a simple wrapper around {@link Log#write}. All arguments are * the same as documented there. * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -186,19 +199,30 @@ Log.prototype.debug = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback); }; +/** + * @typedef {array} DeleteLogResponse + * @property {object} 0 The full API response. + */ +/** + * @callback DeleteLogCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ /** * Delete the log. * - * @resource [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete} + * @see [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete} * - * @param {object=} gaxOptions - Request configuration options, outlined + * @param {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {function=} callback - The callback function. - * @param {?error} callback.err - An error returned while making this - * request. - * @param {object} callback.apiResponse - The full API response. + * @param {DeleteLogCallback} [callback] Callback function. + * @returns {Promise} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * log.delete(function(err, apiResponse) { * if (!err) { * // The log was deleted. @@ -240,10 +264,18 @@ Log.prototype.delete = function(gaxOptions, callback) { /** * Write a log entry with a severity of "EMERGENCY". * - * This is a simple wrapper around {module:logging/log#write}. All arguments are + * This is a simple wrapper around {@link Log#write}. All arguments are * the same as documented there. * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -267,17 +299,21 @@ Log.prototype.emergency = function(entry, options, callback) { * * Note that using this method will not itself make any API requests. You will * use the object returned in other API calls, such as - * {module:logging/log#write}. + * {@link Log#write}. * - * @resource [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * - * @param {object=} metadata - See a + * @param {?object} metadata See a * [LogEntry Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). - * @param {object|string} data - The data to use as the value for this log + * @param {object|string} data The data to use as the value for this log * entry. - * @return {module:logging/entry} + * @returns {Entry} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var metadata = { * resource: { * type: 'gce_instance', @@ -319,10 +355,18 @@ Log.prototype.entry = function(metadata, data) { /** * Write a log entry with a severity of "ERROR". * - * This is a simple wrapper around {module:logging/log#write}. All arguments are + * This is a simple wrapper around {@link Log#write}. All arguments are * the same as documented there. * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -344,28 +388,17 @@ Log.prototype.error = function(entry, options, callback) { * This method is a wrapper around {module:logging#getEntries}, but with a * filter specified to only return entries from this log. * - * @resource [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} - * - * @param {object=} options - Filtering options. - * @param {boolean} options.autoPaginate - Have pagination handled - * automatically. Default: true. - * @param {string} options.filter - An - * [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). - * An empty filter matches all log entries. - * @param {number} options.maxApiCalls - Maximum number of API calls to make. - * @param {number} options.maxResults - Maximum number of results to return. - * @param {string} options.orderBy - How the results should be sorted, - * `timestamp` (oldest first) and `timestamp desc` (newest first, - * **default**). - * @param {number} options.pageSize - Maximum number of logs to return. - * @param {string} options.pageToken - A previously-returned page token - * representing part of the larger set of results to view. - * @param {function} callback - The callback function. - * @param {?error} callback.err - An error returned while making this request. - * @param {module:logging/entry[]} callback.entries - Entries from this log. - * @param {object} callback.apiResponse - The full API response. + * @see [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} + * + * @param {GetEntriesRequest} [query] Query object for listing entries. + * @param {GetEntriesCallback} [callback] Callback function. + * @returns {Promise} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * log.getEntries(function(err, entries) { * // `entries` is an array of Stackdriver Logging entry objects. * // See the `data` property to read the data from the entry. @@ -413,11 +446,16 @@ Log.prototype.getEntries = function(options, callback) { * This method is a wrapper around {module:logging#getEntriesStream}, but with a * filter specified to only return {module:logging/entry} objects from this log. * - * @param {object=} options - Configuration object. See - * {module:logging/log#getEntries} for a complete list of options. - * @return {stream} + * @method Log#getEntriesStream + * @param {GetEntriesRequest} [query] Query object for listing entries. + * @returns {ReadableStream} A readable stream that emits {@link Entry} + * instances. * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * log.getEntriesStream() * .on('error', console.error) * .on('data', function(entry) { @@ -451,10 +489,18 @@ Log.prototype.getEntriesStream = function(options) { /** * Write a log entry with a severity of "INFO". * - * This is a simple wrapper around {module:logging/log#write}. All arguments are + * This is a simple wrapper around {@link Log#write}. All arguments are * the same as documented there. * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -475,10 +521,18 @@ Log.prototype.info = function(entry, options, callback) { /** * Write a log entry with a severity of "NOTICE". * - * This is a simple wrapper around {module:logging/log#write}. All arguments are + * This is a simple wrapper around {@link Log#write}. All arguments are * the same as documented there. * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -499,10 +553,18 @@ Log.prototype.notice = function(entry, options, callback) { /** * Write a log entry with a severity of "WARNING". * - * This is a simple wrapper around {module:logging/log#write}. All arguments are + * This is a simple wrapper around {@link Log#write}. All arguments are * the same as documented there. * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var log = logging.log('my-log'); + * * var entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -520,22 +582,34 @@ Log.prototype.warning = function(entry, options, callback) { this.write(Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback); }; +/** + * @typedef {array} LogWriteResponse + * @property {object} 0 The full API response. + */ +/** + * @callback LogWriteCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ +/** + * Write options. + * + * @typedef {object} WriteOptions + * @property {object} gaxOptions Request configuration options, outlined here: + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {object[]} labels Labels to set on the log. + * @property {object} resource A default monitored resource for entries where + * one isn't specified. + */ /** * Write log entries to Stackdriver Logging. * - * @resource [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write} + * @see [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write} * - * @param {module:logging/entry|module:logging/entry[]} entry - A log entry, or - * array of entries, to write. - * @param {object=} options - Configuration object. - * @param {object} options.gaxOptions - Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {object[]} options.labels - Labels to set on the log. - * @param {object} options.resource - A default monitored resource for entries - * where one isn't specified. - * @param {function} callback - The callback function. - * @param {?error} callback.err - An error returned while making this request. - * @param {object} callback.apiResponse - The full API response. + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} * * @example * var entry = log.entry('gce_instance', { @@ -656,7 +730,7 @@ Log.prototype.write = function(entry, options, callback) { * @private * * @param {object[]} entries - Entry objects. - * @return {object[]} Serialized entries. + * @returns {object[]} Serialized entries. * @throws if there is an error during serialization. */ Log.prototype.decorateEntries_ = function(entries) { @@ -682,4 +756,9 @@ common.util.promisifyAll(Log, { exclude: ['entry'], }); +/** + * Reference to the {@link Log} class. + * @name module:@google-cloud/logging.Log + * @see Log + */ module.exports = Log; diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index ff093aeb48f..31e61d5d564 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -14,10 +14,6 @@ * limitations under the License. */ -/*! - * @module logging/metadata - */ - 'use strict'; var gcpMetadata = require('gcp-metadata'); @@ -27,14 +23,12 @@ var gcpMetadata = require('gcp-metadata'); * based on request success and environment variables, what type of resource * the library is operating on. * - * @constructor - * @alias module:logging/metadata - * + * @class * @private * - * @resource [Logs Resource API Documentation]{@link https://cloud.google.com/logging/docs/api/reference/rest/v2/MonitoredResource} + * @see [Logs Resource API Documentation]{@link https://cloud.google.com/logging/docs/api/reference/rest/v2/MonitoredResource} * - * @param {module:logging} logging - The parent Logging instance. + * @param {Logging} logging The parent Logging instance. */ function Metadata(logging) { this.logging = logging; @@ -73,9 +67,7 @@ Metadata.getGAEDescriptor = function() { /** * Create a descriptor for Google Compute Engine. * - * @private - * - * @param {function} callback - The callback function. + * @param {function} callback Callback function. * @return {object} */ Metadata.getGCEDescriptor = function(callback) { @@ -97,9 +89,7 @@ Metadata.getGCEDescriptor = function(callback) { /** * Create a descriptor for Google Container Engine. * - * @private - * - * @param {function} callback - The callback function. + * @param {function} callback Callback function. * @return {object} */ Metadata.getGKEDescriptor = function(callback) { @@ -123,8 +113,6 @@ Metadata.getGKEDescriptor = function(callback) { /** * Create a global descriptor. * - * @private - * * @returns {object} */ Metadata.getGlobalDescriptor = function() { @@ -136,7 +124,7 @@ Metadata.getGlobalDescriptor = function() { /** * Retrieve a resource object describing the current environment. * - * @param {function} callback - The callback function. + * @param {function} callback Callback function. */ Metadata.prototype.getDefaultResource = function(callback) { this.logging.auth.getEnvironment(function(err, env) { diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index f5877bf8708..70c2b2d7206 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -14,20 +14,12 @@ * limitations under the License. */ -/*! - * @module logging/sink - */ - 'use strict'; var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); -/*! Developer Documentation - * - * @param {module:logging} logging - The Logging instance. - */ /** * A sink is an object that lets you to specify a set of log entries to export * to a particular destination. Stackdriver Logging lets you export log entries @@ -35,18 +27,24 @@ var is = require('is'); * storage), Google BigQuery datasets (for log analysis), Google Pub/Sub (for * streaming to other applications). * - * @resource [Introduction to Sinks]{@link https://cloud.google.com/logging/docs/basic-concepts#sinks} + * @see [Introduction to Sinks]{@link https://cloud.google.com/logging/docs/basic-concepts#sinks} * - * @alias module:logging/sink - * @constructor + * @class * - * @param {object} options - [Configuration object](#/docs). + * @param {Logging} logging {@link Logging} instance. + * @param {string} name Name of the sink. * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); * var sink = logging.sink('my-sink'); */ function Sink(logging, name) { this.logging = logging; + /** + * @name Sink#name + * @type {string} + */ this.name = name; this.formattedName_ = 'projects/' + logging.projectId + '/sinks/' + name; } @@ -54,9 +52,17 @@ function Sink(logging, name) { /** * Create a sink. * - * @param {object} config - See {module:logging#createSink}. + * @param {CreateSinkRequest} config Config to set for the sink. + * @param {CreateSinkCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} if a config object is not provided. + * @see Logging#createSink * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var sink = logging.sink('my-sink'); + * * var config = { * destination: { * // ... @@ -85,19 +91,30 @@ Sink.prototype.create = function(config, callback) { this.logging.createSink(this.name, config, callback); }; +/** + * @typedef {array} DeleteSinkResponse + * @property {object} 0 The full API response. + */ +/** + * @callback DeleteSinkCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ /** * Delete the sink. * - * @resource [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete} + * @see [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete} * - * @param {object=} gaxOptions - Request configuration options, outlined + * @param {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {function=} callback - The callback function. - * @param {?error} callback.err - An error returned while making this - * request. - * @param {object} callback.apiResponse - The full API response. + * @param {DeleteSinkCallback} [callback] Callback function. + * @returns {Promise} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var sink = logging.sink('my-sink'); + * * sink.delete(function(err, apiResponse) { * if (!err) { * // The log was deleted. @@ -136,21 +153,33 @@ Sink.prototype.delete = function(gaxOptions, callback) { ); }; +/** + * @typedef {array} GetSinkMetadataResponse + * @property {object} 0 The {@link Sink} metadata. + * @property {object} 1 The full API response. + */ +/** + * @callback GetSinkMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The {@link Sink} metadata. + * @param {object} apiResponse The full API response. + */ /** * Get the sink's metadata. * - * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} - * @resource [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get} + * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} + * @see [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get} * - * @param {object=} gaxOptions - Request configuration options, outlined + * @param {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {function=} callback - The callback function. - * @param {?error} callback.err - An error returned while making this - * request. - * @param {object} callback.metadata - The sink's metadata. - * @param {object} callback.apiResponse - The full API response. + * @param {GetSinkMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var sink = logging.sink('my-sink'); + * * sink.getMetadata(function(err, metadata, apiResponse) {}); * * //- @@ -194,20 +223,31 @@ Sink.prototype.getMetadata = function(gaxOptions, callback) { ); }; +/** + * @typedef {array} SetSinkFilterResponse + * @property {object} 0 The full API response. + */ +/** + * @callback SetSinkFilterCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ /** * Set the sink's filter. * * This will override any filter that was previously set. * - * @resource [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} + * @see [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} * - * @param {string} filter - The new filter. - * @param {function=} callback - The callback function. - * @param {?error} callback.err - An error returned while making this - * request. - * @param {object} callback.apiResponse - The full API response. + * @param {string} filter The new filter. + * @param {SetSinkFilterCallback} [callback] Callback function. + * @returns {Promise} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var sink = logging.sink('my-sink'); + * * var filter = 'metadata.severity = ALERT'; * * sink.setFilter(filter, function(err, apiResponse) {}); @@ -228,22 +268,33 @@ Sink.prototype.setFilter = function(filter, callback) { ); }; +/** + * @typedef {array} SetSinkMetadataResponse + * @property {object} 0 The full API response. + */ +/** + * @callback SetSinkMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ /** * Set the sink's metadata. * - * @resource [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} - * @resource [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update} + * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} + * @see [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update} * - * @param {object} metadata - See a + * @param {object} metadata See a * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). - * @param {object=} metadata.gaxOptions - Request configuration options, + * @param {object} [metadata.gaxOptions] Request configuration options, * outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {function=} callback - The callback function. - * @param {?error} callback.err - An error returned while making this - * request. - * @param {object} callback.apiResponse - The full API response. + * @param {SetSinkMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example + * var Logging = require('@google-cloud/logging'); + * var logging = new Logging(); + * var sink = logging.sink('my-sink'); + * * var metadata = { * filter: 'metadata.severity = ALERT' * }; @@ -304,4 +355,9 @@ Sink.prototype.setMetadata = function(metadata, callback) { */ common.util.promisifyAll(Sink); +/** + * Reference to the {@link Sink} class. + * @name module:@google-cloud/logging.Sink + * @see Sink + */ module.exports = Sink; From 6e623519a40f8a17e6b5a034cb22045db5d28d2f Mon Sep 17 00:00:00 2001 From: Stephen Date: Fri, 20 Oct 2017 12:12:22 -0400 Subject: [PATCH 0112/1029] 1.1.0 (#8) --- handwritten/logging/.circleci/config.yml | 8 +++++--- handwritten/logging/package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 2396cbf68a4..1588ce4bb7b 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -117,13 +117,15 @@ jobs: - checkout - run: name: Install modules and dependencies. - command: npm install + command: | + npm install + npm link - run: name: Link the module being tested to the samples. command: | cd samples/ - npm install npm link @google-cloud/logging + npm install cd .. - run: name: Run linting. @@ -161,8 +163,8 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm install npm link @google-cloud/logging + npm install cd .. - run: name: Run sample tests. diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fbf88741080..67d1d268ab8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.0.6", + "version": "1.1.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 43c48fc07577bff9ae138a44acb45de5534f26c6 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Fri, 20 Oct 2017 11:24:15 -0700 Subject: [PATCH 0113/1029] Make a sample test more permissive. (#13) --- handwritten/logging/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index d97022b4503..6b80718f261 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -7,4 +7,4 @@ out/ system-test/secrets.js system-test/*key.json *.lock -*-lock.json +*-lock.js* From c4c98056a7fbc9ed2c70e999c4bc62cfff423edd Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 22 Oct 2017 12:15:57 -0400 Subject: [PATCH 0114/1029] Add `protos` to published npm module. (#15) --- handwritten/logging/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 67d1d268ab8..761ef9d4df3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -10,6 +10,7 @@ "repository": "googleapis/nodejs-logging", "main": "./src/index.js", "files": [ + "protos", "src", "AUTHORS", "CONTRIBUTORS", From 15b858d82c20ba03ab43fd22f0ee13f81bade8ea Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 22 Oct 2017 12:29:28 -0400 Subject: [PATCH 0115/1029] 1.1.1 (#16) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 761ef9d4df3..27576b50d34 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.1.0", + "version": "1.1.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 89b3bf29dbc17991222521a343ef5b7d858df119 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 23 Oct 2017 14:58:54 -0700 Subject: [PATCH 0116/1029] chore(package): update codecov to version 3.0.0 (#19) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 27576b50d34..f6e5415f977 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -84,7 +84,7 @@ "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", "async": "^2.5.0", - "codecov": "^2.3.0", + "codecov": "^3.0.0", "eslint": "^4.7.2", "eslint-config-prettier": "^2.6.0", "eslint-plugin-node": "^5.2.0", From c1fce2a171415059567b1e72b5252662b304ffb0 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 23 Oct 2017 19:12:49 -0400 Subject: [PATCH 0117/1029] =?UTF-8?q?Update=20gcp-metadata=20to=20the=20la?= =?UTF-8?q?test=20version=20=F0=9F=9A=80=20(#20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f6e5415f977..b8f847a70b7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -65,7 +65,7 @@ "arrify": "^1.0.0", "eventid": "^0.1.0", "extend": "^3.0.1", - "gcp-metadata": "^0.3.1", + "gcp-metadata": "^0.4.0", "google-auto-auth": "^0.7.1", "google-gax": "^0.14.2", "google-proto-files": "^0.13.1", From ac99f1069d5f84965f98d04e907ce220eeb57d67 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 30 Oct 2017 06:18:02 -0700 Subject: [PATCH 0118/1029] Upgrade repo-tools and regenerate scaffolding. (#29) --- handwritten/logging/CONTRIBUTORS | 1 + handwritten/logging/README.md | 21 ++++++++++++--------- handwritten/logging/package.json | 5 +++-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/handwritten/logging/CONTRIBUTORS b/handwritten/logging/CONTRIBUTORS index f141e8a28ce..6c8881c9fef 100644 --- a/handwritten/logging/CONTRIBUTORS +++ b/handwritten/logging/CONTRIBUTORS @@ -18,3 +18,4 @@ Song Wang Stephen Sawchuk Takashi Matsuo Tim Swast +greenkeeper[bot] diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 292accdfbe5..2543e69a88f 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -1,6 +1,6 @@ Google Cloud Platform logo -# Stackdriver Logging: Node.js Client +# [Stackdriver Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-logging.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-logging) @@ -11,7 +11,9 @@ [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. + * [Logging Node.js Client API Reference][client-docs] +* [github.com/googleapis/nodejs-logging](https://github.com/googleapis/nodejs-logging) * [Logging Documentation][product-docs] Read more about the client libraries for Cloud APIs, including the older @@ -67,7 +69,7 @@ const Logging = require('@google-cloud/logging'); // Your Google Cloud Platform project ID const projectId = 'YOUR_PROJECT_ID'; -// Instantiates a client +// Creates a client const logging = new Logging({ projectId: projectId, }); @@ -97,13 +99,13 @@ log ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/blob/master/samples) directory. The samples' `README.md` +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/master/samples) directory. The samples' `README.md` has instructions for running the samples. -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js) | -| Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/logs.js,samples/README.md) | +| Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | The [Logging Node.js Client API Reference][client-docs] documentation also contains samples. @@ -124,13 +126,14 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](.github/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-logging/blob/master/.github/CONTRIBUTING.md). ## License Apache Version 2.0 -See [LICENSE](LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest/ [product-docs]: https://cloud.google.com/logging/docs +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b8f847a70b7..85a25c01da9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -45,7 +45,8 @@ "Song Wang ", "Stephen Sawchuk ", "Takashi Matsuo ", - "Tim Swast " + "Tim Swast ", + "greenkeeper[bot] " ], "scripts": { "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", @@ -80,7 +81,7 @@ }, "devDependencies": { "@google-cloud/bigquery": "*", - "@google-cloud/nodejs-repo-tools": "^2.0.10", + "@google-cloud/nodejs-repo-tools": "^2.1.0", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", "async": "^2.5.0", From 915024b8c68301b7878441d58722e7f267d36808 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 4 Nov 2017 09:56:56 -0400 Subject: [PATCH 0119/1029] fix(package): update @google-cloud/common to version 0.14.0 (#31) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 85a25c01da9..50b54eaffdd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,7 @@ "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" }, "dependencies": { - "@google-cloud/common": "^0.13.0", + "@google-cloud/common": "^0.14.0", "@google-cloud/common-grpc": "^0.4.0", "arrify": "^1.0.0", "eventid": "^0.1.0", From 3b47efd96fd87fd358b2fd4bd768f992633dce39 Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 7 Nov 2017 19:10:08 -0500 Subject: [PATCH 0120/1029] Prettify. (#33) --- handwritten/logging/test/log.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 45a76dd2b80..51ef6b6f9b9 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -68,7 +68,8 @@ describe('Log', function() { }); var assignSeverityToEntries_ = Log.assignSeverityToEntries_; Log.assignSeverityToEntries_ = function() { - return (assignSeverityToEntriesOverride || assignSeverityToEntries_ + return ( + assignSeverityToEntriesOverride || assignSeverityToEntries_ ).apply(null, arguments); }; }); From 3b6df9d423940d1466404b96bfdd8969e0043b06 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 13 Nov 2017 15:07:18 -0500 Subject: [PATCH 0121/1029] fix(package): update google-proto-files to version 0.14.0 (#36) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 50b54eaffdd..3e65b6d8416 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,7 +69,7 @@ "gcp-metadata": "^0.4.0", "google-auto-auth": "^0.7.1", "google-gax": "^0.14.2", - "google-proto-files": "^0.13.1", + "google-proto-files": "^0.14.0", "is": "^3.0.1", "lodash.merge": "^4.6.0", "protobufjs": "^6.8.0", From 7b719fd163a782b2a4a3c77e3c8f235bf6df8c4d Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 15 Nov 2017 13:20:55 -0500 Subject: [PATCH 0122/1029] Test on Node 9. (#35) --- handwritten/logging/.appveyor.yml | 3 --- handwritten/logging/.circleci/config.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.appveyor.yml b/handwritten/logging/.appveyor.yml index babe1d587f4..24082152655 100644 --- a/handwritten/logging/.appveyor.yml +++ b/handwritten/logging/.appveyor.yml @@ -1,8 +1,5 @@ environment: matrix: - - nodejs_version: 4 - - nodejs_version: 6 - - nodejs_version: 7 - nodejs_version: 8 install: diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 1588ce4bb7b..8a90c1eb126 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -35,12 +35,17 @@ workflows: filters: tags: only: /.*/ + - node9: + filters: + tags: + only: /.*/ - lint: requires: - node4 - node6 - node7 - node8 + - node9 filters: tags: only: /.*/ @@ -50,6 +55,7 @@ workflows: - node6 - node7 - node8 + - node9 filters: tags: only: /.*/ @@ -109,6 +115,10 @@ jobs: docker: - image: node:8 <<: *unit_tests + node9: + docker: + - image: node:9 + <<: *unit_tests lint: docker: From 5da72d4f664268ff802ec1fef0b9997973a1f7b4 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 18 Nov 2017 14:55:42 -0500 Subject: [PATCH 0123/1029] fix(package): update @google-cloud/common to version 0.15.0 (#38) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3e65b6d8416..fbe5be5bd84 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,7 @@ "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" }, "dependencies": { - "@google-cloud/common": "^0.14.0", + "@google-cloud/common": "^0.15.0", "@google-cloud/common-grpc": "^0.4.0", "arrify": "^1.0.0", "eventid": "^0.1.0", From b4ad4a8c2dbb1f64e70f0c0067298ab5200b88f2 Mon Sep 17 00:00:00 2001 From: Stephen Date: Fri, 1 Dec 2017 10:23:51 -0500 Subject: [PATCH 0124/1029] Update google-auto-auth. (#40) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fbe5be5bd84..25a2681e554 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -67,7 +67,7 @@ "eventid": "^0.1.0", "extend": "^3.0.1", "gcp-metadata": "^0.4.0", - "google-auto-auth": "^0.7.1", + "google-auto-auth": "^0.8.0", "google-gax": "^0.14.2", "google-proto-files": "^0.14.0", "is": "^3.0.1", From dd5b9e62bcf51cc3d9195a9643a44139c664b5e4 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Fri, 1 Dec 2017 16:58:59 -0500 Subject: [PATCH 0125/1029] =?UTF-8?q?Update=20@google-cloud/common-grpc=20?= =?UTF-8?q?to=20the=20latest=20version=20=F0=9F=9A=80=20(#45)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 25a2681e554..9072a6d0f3a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ }, "dependencies": { "@google-cloud/common": "^0.15.0", - "@google-cloud/common-grpc": "^0.4.0", + "@google-cloud/common-grpc": "^0.5.0", "arrify": "^1.0.0", "eventid": "^0.1.0", "extend": "^3.0.1", From c53f22bdba6de73c7025e338d5a6ede717c5ae50 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 21 Dec 2017 14:09:38 -0500 Subject: [PATCH 0126/1029] =?UTF-8?q?Update=20google-auto-auth=20to=20the?= =?UTF-8?q?=20latest=20version=20=F0=9F=9A=80=20(#48)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9072a6d0f3a..3546e838b9e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -67,7 +67,7 @@ "eventid": "^0.1.0", "extend": "^3.0.1", "gcp-metadata": "^0.4.0", - "google-auto-auth": "^0.8.0", + "google-auto-auth": "^0.9.0", "google-gax": "^0.14.2", "google-proto-files": "^0.14.0", "is": "^3.0.1", From 2213cf89628fe81a1c1429d698147abc60932ed5 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Thu, 4 Jan 2018 10:37:52 -0800 Subject: [PATCH 0127/1029] fix: gcf: use correct envvar for region (#50) --- handwritten/logging/src/metadata.js | 2 +- handwritten/logging/test/metadata.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 31e61d5d564..7512d09e9bc 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -44,7 +44,7 @@ Metadata.getCloudFunctionDescriptor = function() { type: 'cloud_function', labels: { function_name: process.env.FUNCTION_NAME, - region: process.env.SUPERVISOR_REGION, + region: process.env.FUNCTION_REGION, }, }; }; diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 2c7c9f746d2..cf2a58bc08c 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -75,11 +75,11 @@ describe('metadata', function() { describe('getCloudFunctionDescriptor', function() { var FUNCTION_NAME = 'function-name'; - var SUPERVISOR_REGION = 'supervisor-region'; + var FUNCTION_REGION = 'function-region'; beforeEach(function() { process.env.FUNCTION_NAME = FUNCTION_NAME; - process.env.SUPERVISOR_REGION = SUPERVISOR_REGION; + process.env.FUNCTION_REGION = FUNCTION_REGION; }); it('should return the correct descriptor', function() { @@ -87,13 +87,13 @@ describe('metadata', function() { type: 'cloud_function', labels: { function_name: FUNCTION_NAME, - region: SUPERVISOR_REGION, + region: FUNCTION_REGION, }, }); }); }); - describe('getCloudFunctionDescriptor', function() { + describe('getGAEDescriptor', function() { var GAE_MODULE_NAME = 'gae-module-name'; var GAE_SERVICE = 'gae-service'; var GAE_VERSION = 'gae-version'; From c7ad59c8d42b475715caa3477170eae37a478f09 Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 4 Jan 2018 16:45:19 -0500 Subject: [PATCH 0128/1029] 1.1.2 (#51) * 1.1.2 * 1.1.2 --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3546e838b9e..0d83fef59a1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.1.1", + "version": "1.1.2", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 18fa4dbf33a929ff2c9d33e4470b5241ec65c1d0 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 18 Jan 2018 08:18:12 -0500 Subject: [PATCH 0129/1029] =?UTF-8?q?Update=20mocha=20to=20the=20latest=20?= =?UTF-8?q?version=20=F0=9F=9A=80=20(#56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0d83fef59a1..7abcb7f5508 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -94,7 +94,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "methmeth": "^1.0.0", - "mocha": "^4.0.0", + "mocha": "^5.0.0", "nyc": "^11.2.1", "power-assert": "^1.4.4", "prettier": "^1.7.2", From 091be9bdbab43007882338d2663aa302940a615c Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 24 Jan 2018 16:27:10 -0500 Subject: [PATCH 0130/1029] Normalize arguments when using new. (#57) --- handwritten/logging/src/index.js | 3 ++- handwritten/logging/test/index.js | 28 +++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 50f7ca7ccd9..9fa14815e61 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -109,10 +109,11 @@ var Sink = require('./sink.js'); */ function Logging(options) { if (!(this instanceof Logging)) { - options = common.util.normalizeArguments(this, options); return new Logging(options); } + options = common.util.normalizeArguments(this, options); + // Determine what scopes are needed. // It is the union of the scopes on all three clients. let scopes = []; diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index c6811734ca2..31017556c5d 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -75,6 +75,7 @@ var fakeUtil = extend({}, util, { return reqOpts; }, }); +var originalFakeUtil = extend(true, {}, fakeUtil); function fakeV2() {} @@ -115,6 +116,8 @@ describe('Logging', function() { }); beforeEach(function() { + extend(fakeUtil, originalFakeUtil); + googleAutoAuthOverride = null; isCustomTypeOverride = null; replaceProjectIdTokenOverride = null; @@ -148,29 +151,24 @@ describe('Logging', function() { assert(promisifed); }); - it('should normalize the arguments', function() { - var options = { - projectId: PROJECT_ID, - credentials: 'credentials', - email: 'email', - keyFilename: 'keyFile', - }; + it('should work without new', function() { + assert.doesNotThrow(function() { + Logging({projectId: PROJECT_ID}); + }); + }); - var normalizeArguments = fakeUtil.normalizeArguments; + it('should normalize the arguments', function() { var normalizeArgumentsCalled = false; - var fakeContext = {}; + var options = {}; fakeUtil.normalizeArguments = function(context, options_) { normalizeArgumentsCalled = true; - assert.strictEqual(context, fakeContext); - assert.strictEqual(options, options_); + assert.strictEqual(options_, options); return options_; }; - Logging.call(fakeContext, options); - assert(normalizeArgumentsCalled); - - fakeUtil.normalizeArguments = normalizeArguments; + new Logging(options); + assert.strictEqual(normalizeArgumentsCalled, true); }); it('should initialize the API object', function() { From 0a7da279d85c1baec06d55c3ac43ef52ed0d6792 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 1 Feb 2018 21:32:52 -0500 Subject: [PATCH 0131/1029] =?UTF-8?q?Update=20google-proto-files=20to=20th?= =?UTF-8?q?e=20latest=20version=20=F0=9F=9A=80=20(#60)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7abcb7f5508..ef9c1edf24a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,7 +69,7 @@ "gcp-metadata": "^0.4.0", "google-auto-auth": "^0.9.0", "google-gax": "^0.14.2", - "google-proto-files": "^0.14.0", + "google-proto-files": "^0.15.0", "is": "^3.0.1", "lodash.merge": "^4.6.0", "protobufjs": "^6.8.0", From d07bee45e14fc4fab1266fdc09fc802ed8f480f3 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 5 Feb 2018 08:59:22 -0500 Subject: [PATCH 0132/1029] =?UTF-8?q?Update=20eslint-plugin-node=20to=20th?= =?UTF-8?q?e=20latest=20version=20=F0=9F=9A=80=20(#61)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ef9c1edf24a..83790e32508 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -88,7 +88,7 @@ "codecov": "^3.0.0", "eslint": "^4.7.2", "eslint-config-prettier": "^2.6.0", - "eslint-plugin-node": "^5.2.0", + "eslint-plugin-node": "^6.0.0", "eslint-plugin-prettier": "^2.3.1", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", From fe1af0ebbb0075defc214a918fcfbf1926e737f5 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 7 Feb 2018 10:18:18 -0500 Subject: [PATCH 0133/1029] =?UTF-8?q?Update=20@google-cloud/common=20to=20?= =?UTF-8?q?the=20latest=20version=20=F0=9F=9A=80=20(#62)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 83790e32508..ae800c90240 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,7 @@ "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" }, "dependencies": { - "@google-cloud/common": "^0.15.0", + "@google-cloud/common": "^0.16.0", "@google-cloud/common-grpc": "^0.5.0", "arrify": "^1.0.0", "eventid": "^0.1.0", From ec983047dcd10545421da215f42e2a6cc6bde50e Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 7 Feb 2018 10:56:17 -0500 Subject: [PATCH 0134/1029] =?UTF-8?q?Update=20gcp-metadata=20to=20the=20la?= =?UTF-8?q?test=20version=20=F0=9F=9A=80=20(#63)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ae800c90240..b6e8e388e2b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -66,7 +66,7 @@ "arrify": "^1.0.0", "eventid": "^0.1.0", "extend": "^3.0.1", - "gcp-metadata": "^0.4.0", + "gcp-metadata": "^0.5.0", "google-auto-auth": "^0.9.0", "google-gax": "^0.14.2", "google-proto-files": "^0.15.0", From af2357640b3b1532df01a33e3af98bcb0504b1fd Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Sat, 10 Feb 2018 05:02:21 -0800 Subject: [PATCH 0135/1029] releasing v1.1.3 (#67) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b6e8e388e2b..006cefb260b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.1.2", + "version": "1.1.3", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 016ee582a1266912a5e56c1c75523384cd252eb6 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Sat, 10 Feb 2018 06:53:13 -0800 Subject: [PATCH 0136/1029] run circle as non-root user (#66) --- handwritten/logging/.circleci/config.yml | 27 ++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 8a90c1eb126..4fc3b0445de 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -91,6 +91,7 @@ jobs: node4: docker: - image: node:4 + user: node steps: - checkout - run: @@ -106,30 +107,38 @@ jobs: node6: docker: - image: node:6 + user: node <<: *unit_tests node7: docker: - image: node:7 + user: node <<: *unit_tests node8: docker: - image: node:8 + user: node <<: *unit_tests node9: docker: - image: node:9 + user: node <<: *unit_tests lint: docker: - image: node:8 + user: node steps: - checkout - run: name: Install modules and dependencies. command: | + mkdir -p /home/node/.npm-global npm install npm link + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Link the module being tested to the samples. command: | @@ -137,13 +146,18 @@ jobs: npm link @google-cloud/logging npm install cd .. + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Run linting. command: npm run lint + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global docs: docker: - image: node:8 + user: node steps: - checkout - run: @@ -156,6 +170,7 @@ jobs: sample_tests: docker: - image: node:8 + user: node steps: - checkout - run: @@ -167,8 +182,11 @@ jobs: - run: name: Install and link the module. command: | + mkdir -p /home/node/.npm-global npm install npm link + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Link the module being tested to the samples. command: | @@ -176,21 +194,25 @@ jobs: npm link @google-cloud/logging npm install cd .. + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Run sample tests. command: npm run samples-test environment: GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /var/logging/.circleci/key.json + GOOGLE_APPLICATION_CREDENTIALS: /home/node/logging-samples/.circleci/key.json + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Remove unencrypted key. command: rm .circleci/key.json when: always - working_directory: /var/logging/ + working_directory: /home/node/logging-samples system_tests: docker: - image: node:8 + user: node steps: - checkout - run: @@ -215,6 +237,7 @@ jobs: publish_npm: docker: - image: node:8 + user: node steps: - checkout - run: From fc28d10b3056701425b34c51f99f52ab4cf85bf5 Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 13 Feb 2018 18:25:40 -0500 Subject: [PATCH 0137/1029] 1.1.4 (#70) * 1.1.4 --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 006cefb260b..e35110288a5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.1.3", + "version": "1.1.4", "license": "Apache-2.0", "author": "Google Inc.", "engines": { @@ -61,7 +61,7 @@ "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" }, "dependencies": { - "@google-cloud/common": "^0.16.0", + "@google-cloud/common": "^0.16.1", "@google-cloud/common-grpc": "^0.5.0", "arrify": "^1.0.0", "eventid": "^0.1.0", From 8358b415fbdc637b358641446111eebd4f06a86b Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Fri, 16 Feb 2018 13:41:22 -0500 Subject: [PATCH 0138/1029] fix(package): update gcp-metadata to version 0.6.1 (#75) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e35110288a5..3453626de3c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -66,7 +66,7 @@ "arrify": "^1.0.0", "eventid": "^0.1.0", "extend": "^3.0.1", - "gcp-metadata": "^0.5.0", + "gcp-metadata": "^0.6.1", "google-auto-auth": "^0.9.0", "google-gax": "^0.14.2", "google-proto-files": "^0.15.0", From c54916556ecbff12e7c5951ea24ff70852251f25 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 22 Feb 2018 16:10:12 -0800 Subject: [PATCH 0139/1029] chore: removing node7 job from CircleCI (#76) * chore: removing node7 job from CircleCI * chore: rename reference --- handwritten/logging/.circleci/config.yml | 62 ++++++++---------------- 1 file changed, 21 insertions(+), 41 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 4fc3b0445de..df6566084c5 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -1,7 +1,5 @@ ---- -# "Include" for unit tests definition. -unit_tests: &unit_tests - steps: +unit_tests: + steps: &unit_tests - checkout - run: name: Install modules and dependencies. @@ -13,8 +11,7 @@ unit_tests: &unit_tests name: Submit coverage data to codecov. command: node_modules/.bin/codecov when: always - -version: 2.0 +version: 2 workflows: version: 2 tests: @@ -27,10 +24,6 @@ workflows: filters: tags: only: /.*/ - - node7: - filters: - tags: - only: /.*/ - node8: filters: tags: @@ -43,7 +36,6 @@ workflows: requires: - node4 - node6 - - node7 - node8 - node9 filters: @@ -53,7 +45,6 @@ workflows: requires: - node4 - node6 - - node7 - node8 - node9 filters: @@ -67,7 +58,7 @@ workflows: branches: only: master tags: - only: /^v[\d.]+$/ + only: '/^v[\d.]+$/' - sample_tests: requires: - lint @@ -76,7 +67,7 @@ workflows: branches: only: master tags: - only: /^v[\d.]+$/ + only: '/^v[\d.]+$/' - publish_npm: requires: - system_tests @@ -85,12 +76,11 @@ workflows: branches: ignore: /.*/ tags: - only: /^v[\d.]+$/ - + only: '/^v[\d.]+$/' jobs: node4: docker: - - image: node:4 + - image: 'node:4' user: node steps: - checkout @@ -106,28 +96,22 @@ jobs: when: always node6: docker: - - image: node:6 - user: node - <<: *unit_tests - node7: - docker: - - image: node:7 + - image: 'node:6' user: node - <<: *unit_tests + steps: *unit_tests node8: docker: - - image: node:8 + - image: 'node:8' user: node - <<: *unit_tests + steps: *unit_tests node9: docker: - - image: node:9 + - image: 'node:9' user: node - <<: *unit_tests - + steps: *unit_tests lint: docker: - - image: node:8 + - image: 'node:8' user: node steps: - checkout @@ -153,10 +137,9 @@ jobs: command: npm run lint environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - docs: docker: - - image: node:8 + - image: 'node:8' user: node steps: - checkout @@ -166,10 +149,9 @@ jobs: - run: name: Build documentation. command: npm run docs - sample_tests: docker: - - image: node:8 + - image: 'node:8' user: node steps: - checkout @@ -208,10 +190,9 @@ jobs: command: rm .circleci/key.json when: always working_directory: /home/node/logging-samples - system_tests: docker: - - image: node:8 + - image: 'node:8' user: node steps: - checkout @@ -233,16 +214,15 @@ jobs: name: Remove unencrypted key. command: rm .circleci/key.json when: always - publish_npm: docker: - - image: node:8 + - image: 'node:8' user: node steps: - checkout - run: name: Set NPM authentication. - command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + command: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - run: - name: Publish the module to npm. - command: npm publish + name: Publish the module to npm. + command: npm publish From f795c4a5a1be8b9989a93bbe895f3f3f6f3447e9 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 5 Mar 2018 15:27:15 -0500 Subject: [PATCH 0140/1029] =?UTF-8?q?Update=20proxyquire=20to=20the=20late?= =?UTF-8?q?st=20version=20=F0=9F=9A=80=20(#79)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3453626de3c..7d2355fa536 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -99,7 +99,7 @@ "power-assert": "^1.4.4", "prettier": "^1.7.2", "propprop": "^0.3.0", - "proxyquire": "^1.7.10", + "proxyquire": "^2.0.0", "uuid": "^3.0.1" } } From c49ceb5d5ab734b42c1f50c6af690b6a897a25e5 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 5 Mar 2018 16:22:21 -0500 Subject: [PATCH 0141/1029] fix(package): update google-gax to version 0.15.0 (#80) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7d2355fa536..e3757cbac99 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -68,7 +68,7 @@ "extend": "^3.0.1", "gcp-metadata": "^0.6.1", "google-auto-auth": "^0.9.0", - "google-gax": "^0.14.2", + "google-gax": "^0.15.0", "google-proto-files": "^0.15.0", "is": "^3.0.1", "lodash.merge": "^4.6.0", From f02c71204ddee00d7c4eddc775106f7bcbcfb8a8 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 7 Mar 2018 14:32:51 -0500 Subject: [PATCH 0142/1029] gcp-metadata uses promises. (#81) --- handwritten/logging/src/metadata.js | 52 +++++++++++++--------------- handwritten/logging/test/metadata.js | 40 ++++++++++++--------- 2 files changed, 48 insertions(+), 44 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 7512d09e9bc..7d9da2c521a 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -71,19 +71,17 @@ Metadata.getGAEDescriptor = function() { * @return {object} */ Metadata.getGCEDescriptor = function(callback) { - gcpMetadata.instance('id', function(err, _, instanceId) { - if (err) { - callback(err); - return; - } - - callback(null, { - type: 'gce_instance', - labels: { - instance_id: instanceId, - }, - }); - }); + gcpMetadata + .instance('id') + .then(function(instanceId) { + callback(null, { + type: 'gce_instance', + labels: { + instance_id: instanceId, + }, + }); + }) + .catch(callback); }; /** @@ -93,21 +91,19 @@ Metadata.getGCEDescriptor = function(callback) { * @return {object} */ Metadata.getGKEDescriptor = function(callback) { - gcpMetadata.instance('attributes/cluster-name', function(e, _, clusterName) { - if (e) { - callback(e); - return; - } - - callback(null, { - type: 'container', - labels: { - // TODO(ofrobots): it would be good to include the namespace_id as - // well. - cluster_name: clusterName, - }, - }); - }); + gcpMetadata + .instance('attributes/cluster-name') + .then(function(clusterName) { + callback(null, { + type: 'container', + labels: { + // TODO(ofrobots): it would be good to include the namespace_id as + // well. + cluster_name: clusterName, + }, + }); + }) + .catch(callback); }; /** diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index cf2a58bc08c..8e700ef434a 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -22,18 +22,22 @@ var proxyquire = require('proxyquire'); var instanceOverride; var fakeGcpMetadata = { - instance: function(path, cb) { - setImmediate(function() { - if (instanceOverride && instanceOverride.path) { + instance: function(path) { + if (instanceOverride) { + if (instanceOverride.path) { assert.strictEqual(path, instanceOverride.path); } - var args = (instanceOverride && instanceOverride.args) || [ - null, - null, - 'fake-instance-value', - ]; - cb.apply(fakeGcpMetadata, args); - }); + + if (instanceOverride.errorArg) { + return Promise.reject(instanceOverride.errorArg); + } + + if (instanceOverride.successArg) { + return Promise.resolve(instanceOverride.successArg); + } + } + + return Promise.resolve('fake-instance-value'); }, }; @@ -128,7 +132,7 @@ describe('metadata', function() { it('should return the correct descriptor', function(done) { instanceOverride = { path: 'attributes/cluster-name', - args: [null, null, CLUSTER_NAME], + successArg: CLUSTER_NAME, }; Metadata.getGKEDescriptor(function(err, descriptor) { @@ -145,7 +149,9 @@ describe('metadata', function() { it('should return error on failure to acquire metadata', function(done) { var FAKE_ERROR = new Error(); - instanceOverride = {args: [FAKE_ERROR]}; + instanceOverride = { + errorArg: FAKE_ERROR, + }; Metadata.getGKEDescriptor(function(err) { assert.strictEqual(err, FAKE_ERROR); @@ -160,7 +166,7 @@ describe('metadata', function() { it('should return the correct descriptor', function(done) { instanceOverride = { path: 'id', - args: [null, null, INSTANCE_ID], + successArg: INSTANCE_ID, }; Metadata.getGCEDescriptor(function(err, descriptor) { @@ -177,7 +183,9 @@ describe('metadata', function() { it('should return error on failure to acquire metadata', function(done) { var FAKE_ERROR = new Error(); - instanceOverride = {args: [FAKE_ERROR]}; + instanceOverride = { + errorArg: FAKE_ERROR, + }; Metadata.getGCEDescriptor(function(err) { assert.strictEqual(err, FAKE_ERROR); @@ -255,7 +263,7 @@ describe('metadata', function() { var INSTANCE_ID = 'overridden-value'; instanceOverride = { path: 'id', - args: [null, null, INSTANCE_ID], + successArg: INSTANCE_ID, }; metadata.logging.auth.getEnvironment = function(callback) { @@ -282,7 +290,7 @@ describe('metadata', function() { var CLUSTER_NAME = 'overridden-value'; instanceOverride = { path: 'attributes/cluster-name', - args: [null, null, CLUSTER_NAME], + successArg: CLUSTER_NAME, }; metadata.logging.auth.getEnvironment = function(callback) { From 138742dba7f74192aa4c42eeee10e6e6cd77edac Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 7 Mar 2018 14:41:30 -0500 Subject: [PATCH 0143/1029] 1.1.5 (#82) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e3757cbac99..e75b15054e3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.1.4", + "version": "1.1.5", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 15efc70f73b97d3db8d42864d22a90f6c5f894e2 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 7 Mar 2018 15:21:19 -0500 Subject: [PATCH 0144/1029] Extend system test delay. (#83) --- handwritten/logging/system-test/logging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index f10c34b0a3a..a1ab1407da9 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -32,7 +32,7 @@ var Logging = require('../'); describe('Logging', function() { var PROJECT_ID; var TESTS_PREFIX = 'gcloud-logging-test'; - var WRITE_CONSISTENCY_DELAY_MS = 3000; + var WRITE_CONSISTENCY_DELAY_MS = 10000; var bigQuery = bigqueryLibrary(); var pubsub = pubsubLibrary(); From dec25ef37f2a3a91071ee753df4c4a0e8493dfa5 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 7 Mar 2018 21:04:17 -0500 Subject: [PATCH 0145/1029] =?UTF-8?q?Update=20@google-cloud/common-grpc=20?= =?UTF-8?q?to=20the=20latest=20version=20=F0=9F=9A=80=20(#84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e75b15054e3..95a12aa7a5f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ }, "dependencies": { "@google-cloud/common": "^0.16.1", - "@google-cloud/common-grpc": "^0.5.0", + "@google-cloud/common-grpc": "^0.6.0", "arrify": "^1.0.0", "eventid": "^0.1.0", "extend": "^3.0.1", From ea1865a4772c1974aa2e7c44883f86a1eef4cbaa Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 7 Mar 2018 22:00:49 -0500 Subject: [PATCH 0146/1029] v1.1.6 (#85) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 95a12aa7a5f..42f7f3f947e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.1.5", + "version": "1.1.6", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 401fac9cd9ab73369d78cd402e68c9b59264daca Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 8 Mar 2018 10:48:02 -0500 Subject: [PATCH 0147/1029] correctly locate gcp-metadata property (#87) --- handwritten/logging/src/metadata.js | 8 ++++---- handwritten/logging/test/metadata.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 7d9da2c521a..eba59abd0d9 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -73,11 +73,11 @@ Metadata.getGAEDescriptor = function() { Metadata.getGCEDescriptor = function(callback) { gcpMetadata .instance('id') - .then(function(instanceId) { + .then(function(resp) { callback(null, { type: 'gce_instance', labels: { - instance_id: instanceId, + instance_id: resp.data, }, }); }) @@ -93,13 +93,13 @@ Metadata.getGCEDescriptor = function(callback) { Metadata.getGKEDescriptor = function(callback) { gcpMetadata .instance('attributes/cluster-name') - .then(function(clusterName) { + .then(function(resp) { callback(null, { type: 'container', labels: { // TODO(ofrobots): it would be good to include the namespace_id as // well. - cluster_name: clusterName, + cluster_name: resp.data, }, }); }) diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 8e700ef434a..0df42ba14d5 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -132,7 +132,7 @@ describe('metadata', function() { it('should return the correct descriptor', function(done) { instanceOverride = { path: 'attributes/cluster-name', - successArg: CLUSTER_NAME, + successArg: {data: CLUSTER_NAME}, }; Metadata.getGKEDescriptor(function(err, descriptor) { @@ -166,7 +166,7 @@ describe('metadata', function() { it('should return the correct descriptor', function(done) { instanceOverride = { path: 'id', - successArg: INSTANCE_ID, + successArg: {data: INSTANCE_ID}, }; Metadata.getGCEDescriptor(function(err, descriptor) { @@ -263,7 +263,7 @@ describe('metadata', function() { var INSTANCE_ID = 'overridden-value'; instanceOverride = { path: 'id', - successArg: INSTANCE_ID, + successArg: {data: INSTANCE_ID}, }; metadata.logging.auth.getEnvironment = function(callback) { @@ -290,7 +290,7 @@ describe('metadata', function() { var CLUSTER_NAME = 'overridden-value'; instanceOverride = { path: 'attributes/cluster-name', - successArg: CLUSTER_NAME, + successArg: {data: CLUSTER_NAME}, }; metadata.logging.auth.getEnvironment = function(callback) { From aa6b9127ee5c6c0fa8da1203b58514019ebfa64f Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 8 Mar 2018 11:01:06 -0500 Subject: [PATCH 0148/1029] v1.1.7 (#88) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 42f7f3f947e..1cbfd7eb93c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.1.6", + "version": "1.1.7", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 0f3cbfe2bbf9485130e8847845e22ed5ccb0d4d0 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 14 Mar 2018 16:32:52 -0400 Subject: [PATCH 0149/1029] fix(package): update google-gax to version 0.16.0 (#90) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1cbfd7eb93c..50635196d03 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -68,7 +68,7 @@ "extend": "^3.0.1", "gcp-metadata": "^0.6.1", "google-auto-auth": "^0.9.0", - "google-gax": "^0.15.0", + "google-gax": "^0.16.0", "google-proto-files": "^0.15.0", "is": "^3.0.1", "lodash.merge": "^4.6.0", From 337f365e1ddac50d0fc9c4eb938bd09bf3659a94 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 16 Mar 2018 17:11:06 -0700 Subject: [PATCH 0150/1029] Upgrade repo-tools and regenerate scaffolding. (#94) * Upgrade repo-tools and regenerate scaffolding. * make lint task work in circleci --- handwritten/logging/.github/ISSUE_TEMPLATE.md | 5 +- handwritten/logging/.gitignore | 1 - handwritten/logging/CONTRIBUTORS | 1 + handwritten/logging/README.md | 2 +- handwritten/logging/package-lock.json | 14414 ++++++++++++++++ handwritten/logging/package.json | 3 +- handwritten/logging/src/metadata.js | 2 +- 7 files changed, 14421 insertions(+), 7 deletions(-) create mode 100644 handwritten/logging/package-lock.json diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE.md b/handwritten/logging/.github/ISSUE_TEMPLATE.md index e87d8250499..2889c9945bf 100644 --- a/handwritten/logging/.github/ISSUE_TEMPLATE.md +++ b/handwritten/logging/.github/ISSUE_TEMPLATE.md @@ -4,9 +4,8 @@ Please run down the following list and make sure you've tried the usual "quick fixes": - Search the issues already opened: https://github.com/googleapis/nodejs-logging/issues + - Search the issues on our "catch-all" repository: https://github.com/GoogleCloudPlatform/google-cloud-node - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js - - Check our Troubleshooting guide: https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/troubleshooting - - Check our FAQ: https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/faq If you are still having issues, please be sure to include as much information as possible: @@ -16,7 +15,7 @@ possible: - OS: - Node.js version: - npm version: - - @google-cloud/logging version: + - `@google-cloud/logging` version: #### Steps to reproduce diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index 6b80718f261..b7d407606fb 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -7,4 +7,3 @@ out/ system-test/secrets.js system-test/*key.json *.lock -*-lock.js* diff --git a/handwritten/logging/CONTRIBUTORS b/handwritten/logging/CONTRIBUTORS index 6c8881c9fef..19e07e56f1b 100644 --- a/handwritten/logging/CONTRIBUTORS +++ b/handwritten/logging/CONTRIBUTORS @@ -4,6 +4,7 @@ # name # Ace Nassri +Alexander Fenster Ali Ijaz Sheikh Bill Prin Cristian Cavalli diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 2543e69a88f..74c9afa0aa6 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -136,4 +136,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest/ [product-docs]: https://cloud.google.com/logging/docs -[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_img]: //gstatic.com/cloudssh/images/open-btn.png diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json new file mode 100644 index 00000000000..e6e8754d338 --- /dev/null +++ b/handwritten/logging/package-lock.json @@ -0,0 +1,14414 @@ +{ + "name": "@google-cloud/logging", + "version": "1.1.7", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ava/babel-plugin-throws-helper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-2.0.0.tgz", + "integrity": "sha1-L8H+PCEacQcaTsp7j3r1hCzRrnw=", + "dev": true + }, + "@ava/babel-preset-stage-4": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@ava/babel-preset-stage-4/-/babel-preset-stage-4-1.1.0.tgz", + "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "package-hash": "1.2.0" + }, + "dependencies": { + "md5-hex": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", + "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "package-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-1.2.0.tgz", + "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", + "dev": true, + "requires": { + "md5-hex": "1.3.0" + } + } + } + }, + "@ava/babel-preset-transform-test-files": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@ava/babel-preset-transform-test-files/-/babel-preset-transform-test-files-3.0.0.tgz", + "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", + "dev": true, + "requires": { + "@ava/babel-plugin-throws-helper": "2.0.0", + "babel-plugin-espower": "2.4.0" + } + }, + "@ava/write-file-atomic": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ava/write-file-atomic/-/write-file-atomic-2.2.0.tgz", + "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "@concordance/react": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@concordance/react/-/react-1.0.0.tgz", + "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", + "dev": true, + "requires": { + "arrify": "1.0.1" + } + }, + "@google-cloud/bigquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/bigquery/-/bigquery-1.0.0.tgz", + "integrity": "sha512-2N9TCCsAezu038BL9YmYi6j36AXQU8hoOThB4dSa4x+0fWFx+e7A9zTmg4GWwSbtgpkg+29a9BuzwpfCDiIeSw==", + "dev": true, + "requires": { + "@google-cloud/common": "0.15.2", + "arrify": "1.0.1", + "duplexify": "3.5.4", + "extend": "3.0.1", + "is": "3.2.1", + "stream-events": "1.0.2", + "string-format-obj": "1.1.1", + "uuid": "3.2.1" + }, + "dependencies": { + "@google-cloud/common": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.15.2.tgz", + "integrity": "sha512-S7mSjyDjtmEAOKVFGNP11jSdt9LWo2bEu3PleJ4ttzcHSZB3qF6X1jU3MXZJ1adJpOuNiRV/mACK5cXaHA9Fnw==", + "dev": true, + "requires": { + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.1", + "create-error-class": "3.0.2", + "duplexify": "3.5.4", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.8.2", + "is": "3.2.1", + "log-driver": "1.2.5", + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.85.0", + "retry-request": "3.3.1", + "split-array-stream": "1.0.3", + "stream-events": "1.0.2", + "string-format-obj": "1.1.1", + "through2": "2.0.3" + } + }, + "gcp-metadata": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.3.1.tgz", + "integrity": "sha512-5kJPX/RXuqoLmHiOOgkSDk/LI0QaXpEvZ3pvQP4ifjGGDKZKVSOjL/GcDjXA5kLxppFCOjmmsu0Uoop9d1upaQ==", + "dev": true, + "requires": { + "extend": "3.0.1", + "retry-request": "3.3.1" + } + }, + "google-auth-library": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-0.12.0.tgz", + "integrity": "sha512-79qCXtJ1VweBmmLr4yLq9S4clZB2p5Y+iACvuKk9gu4JitEnPc+bQFmYvtCYehVR44MQzD1J8DVmYW2w677IEw==", + "dev": true, + "requires": { + "gtoken": "1.2.3", + "jws": "3.1.4", + "lodash.isstring": "4.0.1", + "lodash.merge": "4.6.1", + "request": "2.85.0" + } + }, + "google-auto-auth": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.8.2.tgz", + "integrity": "sha512-W91J1paFbyG45gpDWdTu9tKDxbiTDWYkOAxytNVF4oHVVgTCBV/8+lWdjj/6ldjN3eb+sEd9PKJBjm0kmCxvcw==", + "dev": true, + "requires": { + "async": "2.6.0", + "gcp-metadata": "0.3.1", + "google-auth-library": "0.12.0", + "request": "2.85.0" + } + }, + "google-p12-pem": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-0.1.2.tgz", + "integrity": "sha1-M8RqsCGqc0+gMys5YKmj/8svMXc=", + "dev": true, + "requires": { + "node-forge": "0.7.4" + } + }, + "gtoken": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-1.2.3.tgz", + "integrity": "sha512-wQAJflfoqSgMWrSBk9Fg86q+sd6s7y6uJhIvvIPz++RElGlMtEqsdAR2oWwZ/WTEtp7P9xFbJRrT976oRgzJ/w==", + "dev": true, + "requires": { + "google-p12-pem": "0.1.2", + "jws": "3.1.4", + "mime": "1.6.0", + "request": "2.85.0" + } + }, + "log-driver": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", + "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=", + "dev": true + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + } + } + }, + "@google-cloud/common": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.2.tgz", + "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", + "requires": { + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.1", + "create-error-class": "3.0.2", + "duplexify": "3.5.4", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.9.7", + "is": "3.2.1", + "log-driver": "1.2.7", + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.85.0", + "retry-request": "3.3.1", + "split-array-stream": "1.0.3", + "stream-events": "1.0.2", + "string-format-obj": "1.1.1", + "through2": "2.0.3" + } + }, + "@google-cloud/common-grpc": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.6.0.tgz", + "integrity": "sha512-b5i2auMeP+kPPPpWtZVgjbbbIB+3uDGw+Vww1QjG0SEQlahcGrwkCEaNLQit1R77m8ibxs+sTVa+AH/FNILAdQ==", + "requires": { + "@google-cloud/common": "0.16.2", + "dot-prop": "4.2.0", + "duplexify": "3.5.4", + "extend": "3.0.1", + "grpc": "1.9.1", + "is": "3.2.1", + "modelo": "4.2.3", + "retry-request": "3.3.1", + "through2": "2.0.3" + } + }, + "@google-cloud/nodejs-repo-tools": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.2.4.tgz", + "integrity": "sha512-yHxW7JvhnqgoIftv6dAn1r/9AEcPuumD0xXggdYHmDeyf38OMYyjTk92gP9vflTOee1JhM0vOarwGrlKYUbmnQ==", + "dev": true, + "requires": { + "ava": "0.25.0", + "colors": "1.1.2", + "fs-extra": "5.0.0", + "got": "8.2.0", + "handlebars": "4.0.11", + "lodash": "4.17.5", + "nyc": "11.4.1", + "proxyquire": "1.8.0", + "sinon": "4.3.0", + "string": "3.3.3", + "supertest": "3.0.0", + "yargs": "11.0.0", + "yargs-parser": "9.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "cliui": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", + "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", + "dev": true, + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "nyc": { + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", + "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", + "dev": true, + "requires": { + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.1", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "1.9.1", + "istanbul-lib-report": "1.1.2", + "istanbul-lib-source-maps": "1.2.2", + "istanbul-reports": "1.1.3", + "md5-hex": "1.3.0", + "merge-source-map": "1.0.4", + "micromatch": "2.3.11", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "spawn-wrap": "1.4.2", + "test-exclude": "4.1.1", + "yargs": "10.0.3", + "yargs-parser": "8.0.0" + }, + "dependencies": { + "align-text": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "append-transform": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "requires": { + "default-require-extensions": "1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-generator": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" + } + }, + "babel-template": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "bundled": true, + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "bundled": true, + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "builtin-modules": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "caching-transform": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" + } + }, + "camelcase": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true + }, + "center-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cliui": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "bundled": true, + "dev": true + }, + "core-js": { + "version": "2.5.3", + "bundled": true, + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "which": "1.3.0" + } + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-log": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "default-require-extensions": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "strip-bom": "2.0.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "esutils": { + "version": "2.0.2", + "bundled": true, + "dev": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + } + } + }, + "expand-brackets": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "bundled": true, + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "extglob": { + "version": "0.3.2", + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "bundled": true, + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-cache-dir": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "requires": { + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "for-own": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "globals": { + "version": "9.18.0", + "bundled": true, + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "bundled": true, + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invariant": { + "version": "2.2.2", + "bundled": true, + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.9.1", + "bundled": true, + "dev": true, + "requires": { + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" + } + }, + "istanbul-lib-report": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.2", + "bundled": true, + "dev": true, + "requires": { + "debug": "3.1.0", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "istanbul-reports": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "handlebars": "4.0.11" + } + }, + "js-tokens": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "lodash": { + "version": "4.17.4", + "bundled": true, + "dev": true + }, + "longest": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "lru-cache": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "md5-hex": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "md5-o-matic": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "mem": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } + }, + "merge-source-map": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "micromatch": { + "version": "2.3.11", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mimic-fn": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "1.1.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "path-exists": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "path-type": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "bundled": true, + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "pkg-dir": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "1.1.2" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "preserve": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "bundled": true, + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "bundled": true, + "dev": true + }, + "repeating": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve-from": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "right-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "semver": { + "version": "5.4.1", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true + }, + "spawn-wrap": { + "version": "1.4.2", + "bundled": true, + "dev": true, + "requires": { + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.0" + } + }, + "spdx-correct": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "test-exclude": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "2.3.11", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + } + }, + "to-fast-properties": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "yargs": { + "version": "3.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "which": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "window-size": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "10.0.3", + "bundled": true, + "dev": true, + "requires": { + "cliui": "3.2.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "8.0.0" + }, + "dependencies": { + "cliui": { + "version": "3.2.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + } + } + }, + "yargs-parser": { + "version": "8.0.0", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "proxyquire": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-1.8.0.tgz", + "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", + "dev": true, + "requires": { + "fill-keys": "1.0.2", + "module-not-found-error": "1.0.1", + "resolve": "1.1.7" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "dev": true, + "requires": { + "cliui": "4.0.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" + } + } + } + }, + "@google-cloud/pubsub": { + "version": "0.16.5", + "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-0.16.5.tgz", + "integrity": "sha512-LxFdTU1WWyJm9b7Wmrb5Ztp7SRlwESKYiWioAanyOzf2ZUAXkuz8HL+Qi92ch++rAgnQg77oxB3He2SOJxoCTA==", + "dev": true, + "requires": { + "@google-cloud/common": "0.16.2", + "arrify": "1.0.1", + "async-each": "1.0.1", + "extend": "3.0.1", + "google-auto-auth": "0.9.7", + "google-gax": "0.15.0", + "google-proto-files": "0.15.1", + "is": "3.2.1", + "lodash.chunk": "4.2.0", + "lodash.merge": "4.6.1", + "lodash.snakecase": "4.1.1", + "protobufjs": "6.8.6", + "uuid": "3.2.1" + }, + "dependencies": { + "google-gax": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.15.0.tgz", + "integrity": "sha512-a+WBi3oiV3jQ0eLCIM0GAFe8vYQ10yYuXRnjhEEXFKSNd8nW6XSQ7YWqMLIod2Xnyu6JiSSymMBwCr5YSwQyRQ==", + "dev": true, + "requires": { + "extend": "3.0.1", + "globby": "8.0.1", + "google-auto-auth": "0.9.7", + "google-proto-files": "0.15.1", + "grpc": "1.9.1", + "is-stream-ended": "0.1.3", + "lodash": "4.17.5", + "protobufjs": "6.8.6", + "readable-stream": "2.3.5", + "through2": "2.0.3" + } + } + } + }, + "@google-cloud/storage": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-1.6.0.tgz", + "integrity": "sha512-yQ63bJYoiwY220gn/KdTLPoHppAPwFHfG7VFLPwJ+1R5U1eqUN5XV2a7uPj1szGF8/gxlKm2UbE8DgoJJ76DFw==", + "dev": true, + "requires": { + "@google-cloud/common": "0.16.2", + "arrify": "1.0.1", + "async": "2.6.0", + "compressible": "2.0.13", + "concat-stream": "1.6.1", + "create-error-class": "3.0.2", + "duplexify": "3.5.4", + "extend": "3.0.1", + "gcs-resumable-upload": "0.9.0", + "hash-stream-validation": "0.2.1", + "is": "3.2.1", + "mime": "2.2.0", + "mime-types": "2.1.18", + "once": "1.4.0", + "pumpify": "1.4.0", + "request": "2.85.0", + "safe-buffer": "5.1.1", + "snakeize": "0.1.0", + "stream-events": "1.0.2", + "string-format-obj": "1.1.1", + "through2": "2.0.3" + } + }, + "@ladjs/time-require": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@ladjs/time-require/-/time-require-0.1.4.tgz", + "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", + "dev": true, + "requires": { + "chalk": "0.4.0", + "date-time": "0.1.1", + "pretty-ms": "0.2.2", + "text-table": "0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" + } + }, + "pretty-ms": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-0.2.2.tgz", + "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", + "dev": true, + "requires": { + "parse-ms": "0.1.2" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "requires": { + "call-me-maybe": "1.0.1", + "glob-to-regexp": "0.3.0" + } + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/inquire": "1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "dev": true + }, + "@sinonjs/formatio": { + "version": "2.0.0", + "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "@types/long": { + "version": "3.0.32", + "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", + "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + }, + "@types/node": { + "version": "8.9.5", + "resolved": "http://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", + "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==" + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + }, + "acorn-es7-plugin": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", + "integrity": "sha1-8u4fMiipDurRJF+asZIusucdM2s=" + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "ansi-escapes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "argv": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", + "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=", + "dev": true + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-exclude": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/arr-exclude/-/arr-exclude-1.0.0.tgz", + "integrity": "sha1-38fC5VKicHI8zaBM8xKMjL/lxjE=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-filter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", + "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=" + }, + "array-find": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", + "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, + "ascli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", + "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", + "requires": { + "colour": "0.7.1", + "optjs": "3.2.2" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.5" + } + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "atob": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", + "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" + }, + "auto-bind": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.0.tgz", + "integrity": "sha512-Zw7pZp7tztvKnWWtoII4AmqH5a2PV3ZN5F0BPRTGcc1kpRm4b6QXQnPU7Znbl6BfPfqOVOV29g4JeMqZQaqqOA==", + "dev": true + }, + "ava": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/ava/-/ava-0.25.0.tgz", + "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", + "dev": true, + "requires": { + "@ava/babel-preset-stage-4": "1.1.0", + "@ava/babel-preset-transform-test-files": "3.0.0", + "@ava/write-file-atomic": "2.2.0", + "@concordance/react": "1.0.0", + "@ladjs/time-require": "0.1.4", + "ansi-escapes": "3.0.0", + "ansi-styles": "3.2.1", + "arr-flatten": "1.1.0", + "array-union": "1.0.2", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "auto-bind": "1.2.0", + "ava-init": "0.2.1", + "babel-core": "6.26.0", + "babel-generator": "6.26.1", + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "bluebird": "3.5.1", + "caching-transform": "1.0.1", + "chalk": "2.3.2", + "chokidar": "1.7.0", + "clean-stack": "1.3.0", + "clean-yaml-object": "0.1.0", + "cli-cursor": "2.1.0", + "cli-spinners": "1.1.0", + "cli-truncate": "1.1.0", + "co-with-promise": "4.6.0", + "code-excerpt": "2.1.1", + "common-path-prefix": "1.0.0", + "concordance": "3.0.0", + "convert-source-map": "1.5.1", + "core-assert": "0.2.1", + "currently-unhandled": "0.4.1", + "debug": "3.1.0", + "dot-prop": "4.2.0", + "empower-core": "0.6.2", + "equal-length": "1.0.1", + "figures": "2.0.0", + "find-cache-dir": "1.0.0", + "fn-name": "2.0.1", + "get-port": "3.2.0", + "globby": "6.1.0", + "has-flag": "2.0.0", + "hullabaloo-config-manager": "1.1.1", + "ignore-by-default": "1.0.1", + "import-local": "0.1.1", + "indent-string": "3.2.0", + "is-ci": "1.1.0", + "is-generator-fn": "1.0.0", + "is-obj": "1.0.1", + "is-observable": "1.1.0", + "is-promise": "2.1.0", + "last-line-stream": "1.0.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.debounce": "4.0.8", + "lodash.difference": "4.5.0", + "lodash.flatten": "4.4.0", + "loud-rejection": "1.6.0", + "make-dir": "1.2.0", + "matcher": "1.1.0", + "md5-hex": "2.0.0", + "meow": "3.7.0", + "ms": "2.0.0", + "multimatch": "2.1.0", + "observable-to-promise": "0.5.0", + "option-chain": "1.0.0", + "package-hash": "2.0.0", + "pkg-conf": "2.1.0", + "plur": "2.1.2", + "pretty-ms": "3.1.0", + "require-precompiled": "0.1.0", + "resolve-cwd": "2.0.0", + "safe-buffer": "5.1.1", + "semver": "5.5.0", + "slash": "1.0.0", + "source-map-support": "0.5.4", + "stack-utils": "1.0.1", + "strip-ansi": "4.0.0", + "strip-bom-buf": "1.0.0", + "supertap": "1.0.0", + "supports-color": "5.3.0", + "trim-off-newlines": "1.0.1", + "unique-temp-dir": "1.0.0", + "update-notifier": "2.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "ava-init": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ava-init/-/ava-init-0.2.1.tgz", + "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", + "dev": true, + "requires": { + "arr-exclude": "1.0.0", + "execa": "0.7.0", + "has-yarn": "1.0.0", + "read-pkg-up": "2.0.0", + "write-pkg": "3.1.0" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "axios": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "requires": { + "follow-redirects": "1.4.1", + "is-buffer": "1.1.6" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.5", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.5", + "source-map": "0.5.7", + "trim-right": "1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.5" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-espower": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.4.0.tgz", + "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", + "dev": true, + "requires": { + "babel-generator": "6.26.1", + "babylon": "6.18.0", + "call-matcher": "1.0.1", + "core-js": "2.5.3", + "espower-location-detector": "1.0.0", + "espurify": "1.7.0", + "estraverse": "4.2.0" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", + "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.3", + "home-or-tmp": "2.0.0", + "lodash": "4.17.5", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" + }, + "dependencies": { + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.5" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.5" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.5", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + } + } + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.1" + } + }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.3.2", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "kind-of": "6.0.2", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "buf-compare": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", + "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", + "dev": true + }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", + "requires": { + "long": "3.2.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + } + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "dev": true, + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + } + }, + "caching-transform": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", + "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", + "dev": true, + "requires": { + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" + }, + "dependencies": { + "md5-hex": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", + "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + } + } + }, + "call-matcher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-matcher/-/call-matcher-1.0.1.tgz", + "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", + "dev": true, + "requires": { + "core-js": "2.5.3", + "deep-equal": "1.0.1", + "espurify": "1.7.0", + "estraverse": "4.2.0" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "call-signature": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/call-signature/-/call-signature-0.0.2.tgz", + "integrity": "sha1-qEq8glpV70yysCi9dOIFpluaSZY=" + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "2.1.1", + "map-obj": "1.0.1" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "catharsis": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", + "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", + "dev": true, + "requires": { + "underscore-contrib": "0.3.0" + } + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.3.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.1.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } + } + }, + "ci-info": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", + "dev": true + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "clean-stack": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", + "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=", + "dev": true + }, + "clean-yaml-object": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", + "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", + "dev": true + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-spinners": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.1.0.tgz", + "integrity": "sha1-8YR7FohE2RemceudFH499JfJDQY=", + "dev": true + }, + "cli-truncate": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-1.1.0.tgz", + "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", + "dev": true, + "requires": { + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "1.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "co-with-promise": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co-with-promise/-/co-with-promise-4.6.0.tgz", + "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", + "dev": true, + "requires": { + "pinkie-promise": "1.0.0" + } + }, + "code-excerpt": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-2.1.1.tgz", + "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", + "dev": true, + "requires": { + "convert-to-spaces": "1.0.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "codecov": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.0.tgz", + "integrity": "sha1-wnO4xPEpRXI+jcnSWAPYk0Pl8o4=", + "dev": true, + "requires": { + "argv": "0.0.2", + "request": "2.81.0", + "urlgrey": "0.4.4" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.14.1" + } + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + } + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "colour": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", + "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "common-path-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-1.0.0.tgz", + "integrity": "sha1-zVL28HEuC6q5fW+XModPIvR3UsA=", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "compressible": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", + "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", + "dev": true, + "requires": { + "mime-db": "1.33.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.5", + "typedarray": "0.0.6" + } + }, + "concordance": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/concordance/-/concordance-3.0.0.tgz", + "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", + "dev": true, + "requires": { + "date-time": "2.1.0", + "esutils": "2.0.2", + "fast-diff": "1.1.2", + "function-name-support": "0.2.0", + "js-string-escape": "1.0.1", + "lodash.clonedeep": "4.5.0", + "lodash.flattendeep": "4.4.0", + "lodash.merge": "4.6.1", + "md5-hex": "2.0.0", + "semver": "5.5.0", + "well-known-symbols": "1.0.0" + }, + "dependencies": { + "date-time": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", + "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", + "dev": true, + "requires": { + "time-zone": "1.0.0" + } + } + } + }, + "configstore": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", + "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "dev": true, + "requires": { + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.2.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + } + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "convert-to-spaces": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", + "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=", + "dev": true + }, + "cookiejar": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", + "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-assert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", + "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", + "dev": true, + "requires": { + "buf-compare": "1.0.1", + "is-error": "2.2.1" + } + }, + "core-js": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "requires": { + "capture-stack-trace": "1.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.1" + } + } + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "1.0.2" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "0.10.41" + } + }, + "d64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d64/-/d64-1.0.0.tgz", + "integrity": "sha1-QAKofoUMv8n52XBrYPymE6MzbpA=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "date-time": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-0.1.1.tgz", + "integrity": "sha1-7S9tk9l5DOL9ZtW1/z7dW7y/Owc=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "1.0.0" + } + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + }, + "dependencies": { + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diff-match-patch": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.0.tgz", + "integrity": "sha1-HMPIOkkNZ/ldkeOfatHy4Ia2MEg=" + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "requires": { + "arrify": "1.0.1", + "path-type": "3.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", + "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "dev": true, + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "requires": { + "is-obj": "1.0.1" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", + "requires": { + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.5", + "stream-shift": "1.0.0" + } + }, + "eastasianwidth": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", + "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "requires": { + "base64url": "2.0.0", + "safe-buffer": "5.1.1" + } + }, + "empower": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", + "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", + "requires": { + "core-js": "2.5.3", + "empower-core": "0.6.2" + } + }, + "empower-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.0.1.tgz", + "integrity": "sha1-MeMQq8BluqfDoEh+a+W7zGXzwd4=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "empower-core": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-0.6.2.tgz", + "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", + "requires": { + "call-signature": "0.0.2", + "core-js": "2.5.3" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "1.4.0" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "equal-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", + "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=", + "dev": true + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.41", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.41.tgz", + "integrity": "sha512-MYK02wXfwTMie5TEJWPolgOsXEmz7wKCQaGzgmRjZOoV6VLG8I5dSv2bn6AOClXhK64gnSQTQ9W9MKvx87J4gw==", + "dev": true, + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" + } + }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.41", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.41", + "es6-iterator": "2.0.3", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.41", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.41" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.41", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "escallmatch": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/escallmatch/-/escallmatch-1.5.0.tgz", + "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", + "dev": true, + "requires": { + "call-matcher": "1.0.1", + "esprima": "2.7.3" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", + "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", + "dev": true, + "requires": { + "esprima": "3.1.3", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.6.1" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true, + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "eslint": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.0.tgz", + "integrity": "sha512-r83L5CuqaocDvfwdojbz68b6tCUk8KJkqfppO+gmSAQqYCzTr0bCSMu6A6yFCLKG65j5eKcKUw4Cw4Yl4gfWkg==", + "dev": true, + "requires": { + "ajv": "5.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.3.2", + "concat-stream": "1.6.1", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", + "esquery": "1.0.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.3.0", + "ignore": "3.3.7", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.11.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.5", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.0.1", + "require-uncached": "1.0.3", + "semver": "5.5.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.2", + "text-table": "0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "globals": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", + "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "eslint-config-prettier": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz", + "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", + "dev": true, + "requires": { + "get-stdin": "5.0.1" + }, + "dependencies": { + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", + "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", + "dev": true, + "requires": { + "ignore": "3.3.7", + "minimatch": "3.0.4", + "resolve": "1.5.0", + "semver": "5.5.0" + }, + "dependencies": { + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + } + } + }, + "eslint-plugin-prettier": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz", + "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", + "dev": true, + "requires": { + "fast-diff": "1.1.2", + "jest-docblock": "21.2.0" + } + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espower": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.0.tgz", + "integrity": "sha1-zh7bPZhwKEH99ZbRy46FvcSujkg=", + "dev": true, + "requires": { + "array-find": "1.0.0", + "escallmatch": "1.5.0", + "escodegen": "1.9.1", + "escope": "3.6.0", + "espower-location-detector": "1.0.0", + "espurify": "1.7.0", + "estraverse": "4.2.0", + "source-map": "0.5.7", + "type-name": "2.0.2", + "xtend": "4.0.1" + } + }, + "espower-loader": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/espower-loader/-/espower-loader-1.2.2.tgz", + "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", + "dev": true, + "requires": { + "convert-source-map": "1.5.1", + "espower-source": "2.2.0", + "minimatch": "3.0.4", + "source-map-support": "0.4.18", + "xtend": "4.0.1" + }, + "dependencies": { + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + } + } + }, + "espower-location-detector": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/espower-location-detector/-/espower-location-detector-1.0.0.tgz", + "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", + "dev": true, + "requires": { + "is-url": "1.2.2", + "path-is-absolute": "1.0.1", + "source-map": "0.5.7", + "xtend": "4.0.1" + } + }, + "espower-source": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.2.0.tgz", + "integrity": "sha1-fgBSVa5HtcE2RIZEs/PYAtUD91I=", + "dev": true, + "requires": { + "acorn": "5.5.3", + "acorn-es7-plugin": "1.1.7", + "convert-source-map": "1.5.1", + "empower-assert": "1.0.1", + "escodegen": "1.9.1", + "espower": "2.1.0", + "estraverse": "4.2.0", + "merge-estraverse-visitors": "1.0.0", + "multi-stage-sourcemap": "0.2.1", + "path-is-absolute": "1.0.1", + "xtend": "4.0.1" + }, + "dependencies": { + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "dev": true + } + } + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "dev": true, + "requires": { + "acorn": "5.5.3", + "acorn-jsx": "3.0.1" + }, + "dependencies": { + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "espurify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", + "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", + "requires": { + "core-js": "2.5.3" + } + }, + "esquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", + "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.41" + } + }, + "eventid": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/eventid/-/eventid-0.1.2.tgz", + "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", + "requires": { + "d64": "1.0.0", + "uuid": "3.2.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + }, + "dependencies": { + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", + "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", + "dev": true, + "requires": { + "chardet": "0.4.2", + "iconv-lite": "0.4.19", + "tmp": "0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "fast-diff": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", + "dev": true + }, + "fast-glob": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.0.tgz", + "integrity": "sha512-4F75PTznkNtSKs2pbhtBwRkw8sRwa7LfXx5XaQJOe4IQ6yTjceLDTwM5gj1s80R2t/5WeDC1gVfm3jLE+l39Tw==", + "requires": { + "@mrmlnc/readdir-enhanced": "2.2.1", + "glob-parent": "3.1.0", + "is-glob": "4.0.0", + "merge2": "1.2.1", + "micromatch": "3.1.9" + } + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", + "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", + "dev": true, + "requires": { + "is-object": "1.0.1", + "merge-descriptors": "1.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "1.0.1", + "make-dir": "1.2.0", + "pkg-dir": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "fn-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", + "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=", + "dev": true + }, + "follow-redirects": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", + "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", + "requires": { + "debug": "3.1.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" + } + }, + "formidable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.0.tgz", + "integrity": "sha512-hr9aT30rAi7kf8Q2aaTpSP7xGMhlJ+MdrUDVZs3rxbD3L/K46A86s2VY7qC2D2kGYGBtiT/3j6wTx1eeUq5xAQ==", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.5" + } + }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.10.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-name-support": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/function-name-support/-/function-name-support-0.2.0.tgz", + "integrity": "sha1-VdO/qm6v1QWlD5vIH99XVkoLsHE=", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gcp-metadata": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", + "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", + "requires": { + "axios": "0.18.0", + "extend": "3.0.1", + "retry-axios": "0.3.2" + } + }, + "gcs-resumable-upload": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.9.0.tgz", + "integrity": "sha512-+Zrmr0JKO2y/2mg953TW6JLu+NAMHqQsKzqCm7CIT24gMQakolPJCMzDleVpVjXAqB7ZCD276tcUq2ebOfqTug==", + "dev": true, + "requires": { + "buffer-equal": "1.0.0", + "configstore": "3.1.1", + "google-auto-auth": "0.9.7", + "pumpify": "1.4.0", + "request": "2.85.0", + "stream-events": "1.0.2", + "through2": "2.0.3" + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "1.3.5" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "requires": { + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "fast-glob": "2.2.0", + "glob": "7.1.2", + "ignore": "3.3.7", + "pify": "3.0.0", + "slash": "1.0.0" + } + }, + "google-auth-library": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.3.2.tgz", + "integrity": "sha512-aRz0om4Bs85uyR2Ousk3Gb8Nffx2Sr2RoKts1smg1MhRwrehE1aD1HC4RmprNt1HVJ88IDnQ8biJQ/aXjiIxlQ==", + "requires": { + "axios": "0.18.0", + "gcp-metadata": "0.6.3", + "gtoken": "2.2.0", + "jws": "3.1.4", + "lodash.isstring": "4.0.1", + "lru-cache": "4.1.2", + "retry-axios": "0.3.2" + } + }, + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "requires": { + "async": "2.6.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.85.0" + } + }, + "google-gax": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.0.tgz", + "integrity": "sha512-sslPB7USGD8SrVUGlWFIGYVZrgZ6oj+fWUEW3f8Bk43+nxqeLyrNoI3iFBRpjLfwMCEYaXVziWNmatwLRP8azg==", + "requires": { + "duplexify": "3.5.4", + "extend": "3.0.1", + "globby": "8.0.1", + "google-auto-auth": "0.9.7", + "google-proto-files": "0.15.1", + "grpc": "1.9.1", + "is-stream-ended": "0.1.3", + "lodash": "4.17.5", + "protobufjs": "6.8.6", + "through2": "2.0.3" + } + }, + "google-p12-pem": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", + "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", + "requires": { + "node-forge": "0.7.4", + "pify": "3.0.0" + } + }, + "google-proto-files": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", + "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", + "requires": { + "globby": "7.1.1", + "power-assert": "1.4.4", + "protobufjs": "6.8.6" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "requires": { + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.7", + "pify": "3.0.0", + "slash": "1.0.0" + } + } + } + }, + "got": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/got/-/got-8.2.0.tgz", + "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", + "dev": true, + "requires": { + "@sindresorhus/is": "0.7.0", + "cacheable-request": "2.1.4", + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "into-stream": "3.1.0", + "is-retry-allowed": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.0", + "mimic-response": "1.0.0", + "p-cancelable": "0.3.0", + "p-timeout": "2.0.1", + "pify": "3.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "url-parse-lax": "3.0.0", + "url-to-options": "1.0.1" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "2.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "grpc": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.9.1.tgz", + "integrity": "sha512-WNW3MWMuAoo63AwIlzFE3T0KzzvNBSvOkg67Hm8WhvHNkXFBlIk1QyJRE3Ocm0O5eIwS7JU8Ssota53QR1zllg==", + "requires": { + "lodash": "4.17.5", + "nan": "2.10.0", + "node-pre-gyp": "0.6.39", + "protobufjs": "5.0.2" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.3" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "bundled": true + }, + "co": { + "version": "4.6.0", + "bundled": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true + }, + "extsprintf": { + "version": "1.3.0", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true + }, + "jsprim": { + "version": "1.4.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "mime-db": { + "version": "1.30.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.17", + "bundled": true, + "requires": { + "mime-db": "1.30.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "requires": { + "detect-libc": "1.0.3", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.4", + "request": "2.81.0", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "2.2.1", + "tar-pack": "3.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true + }, + "protobufjs": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.2.tgz", + "integrity": "sha1-WXSNfc8D0tsiwT2p/rAk4Wq4DJE=", + "requires": { + "ascli": "1.0.1", + "bytebuffer": "5.0.1", + "glob": "7.1.2", + "yargs": "3.32.0" + } + }, + "punycode": { + "version": "1.4.1", + "bundled": true + }, + "qs": { + "version": "6.4.0", + "bundled": true + }, + "rc": { + "version": "1.2.4", + "bundled": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true + } + } + }, + "readable-stream": { + "version": "2.3.3", + "bundled": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "semver": { + "version": "5.5.0", + "bundled": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.1", + "bundled": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.1", + "bundled": true, + "requires": { + "debug": "2.6.9", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.3.3", + "rimraf": "2.6.2", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.3", + "bundled": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.2.1", + "bundled": true + }, + "verror": { + "version": "1.10.0", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + } + } + }, + "gtoken": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.2.0.tgz", + "integrity": "sha512-tvQs8B1z5+I1FzMPZnq/OCuxTWFOkvy7cUJcpNdBOK2L7yEtPZTVCPtZU181sSDF+isUPebSqFTNTkIejFASAQ==", + "requires": { + "axios": "0.18.0", + "google-p12-pem": "1.0.2", + "jws": "3.1.4", + "mime": "2.2.0", + "pify": "3.0.0" + } + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", + "dev": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "1.4.2" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "has-yarn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-1.0.0.tgz", + "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", + "dev": true + }, + "hash-stream-validation": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/hash-stream-validation/-/hash-stream-validation-0.2.1.tgz", + "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", + "dev": true, + "requires": { + "through2": "2.0.3" + } + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.1", + "sntp": "2.1.0" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "hosted-git-info": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", + "dev": true + }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "dev": true, + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.4.1", + "domutils": "1.7.0", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.5" + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.1" + } + }, + "hullabaloo-config-manager": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/hullabaloo-config-manager/-/hullabaloo-config-manager-1.1.1.tgz", + "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", + "dev": true, + "requires": { + "dot-prop": "4.2.0", + "es6-error": "4.1.1", + "graceful-fs": "4.1.11", + "indent-string": "3.2.0", + "json5": "0.5.1", + "lodash.clonedeep": "4.5.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.isequal": "4.5.0", + "lodash.merge": "4.6.1", + "md5-hex": "2.0.0", + "package-hash": "2.0.0", + "pkg-dir": "2.0.0", + "resolve-from": "3.0.0", + "safe-buffer": "5.1.1" + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" + }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "import-local": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-0.1.1.tgz", + "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", + "dev": true, + "requires": { + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "ink-docstrap": { + "version": "git+https://github.com/docstrap/docstrap.git#0fff6c83ab7f9154b27c0996b775f1639037df9b", + "dev": true, + "requires": { + "moment": "2.21.0", + "sanitize-html": "1.18.2" + } + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "3.0.0", + "chalk": "2.3.2", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.1.0", + "figures": "2.0.0", + "lodash": "4.17.5", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "intelli-espower-loader": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/intelli-espower-loader/-/intelli-espower-loader-1.0.1.tgz", + "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", + "dev": true, + "requires": { + "espower-loader": "1.2.2" + } + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "dev": true, + "requires": { + "from2": "2.3.0", + "p-is-promise": "1.1.0" + } + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "irregular-plurals": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", + "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", + "dev": true + }, + "is": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", + "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=" + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-ci": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", + "dev": true, + "requires": { + "ci-info": "1.1.3" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-error": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.1.tgz", + "integrity": "sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-generator-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", + "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-observable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", + "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", + "dev": true, + "requires": { + "symbol-observable": "1.2.0" + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.1" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-stream-ended": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.3.tgz", + "integrity": "sha1-oEc7Jnx1ZjVIa+7cfjNE5UnRUqw=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-url": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.2.tgz", + "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "1.4.1", + "is-object": "1.0.1" + } + }, + "jest-docblock": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", + "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==", + "dev": true + }, + "js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "dev": true, + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, + "js2xmlparser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", + "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", + "dev": true, + "requires": { + "xmlcreate": "1.0.2" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "jsdoc": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", + "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", + "dev": true, + "requires": { + "babylon": "7.0.0-beta.19", + "bluebird": "3.5.1", + "catharsis": "0.8.9", + "escape-string-regexp": "1.0.5", + "js2xmlparser": "3.0.0", + "klaw": "2.0.0", + "marked": "0.3.17", + "mkdirp": "0.5.1", + "requizzle": "0.2.1", + "strip-json-comments": "2.0.1", + "taffydb": "2.6.2", + "underscore": "1.8.3" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.19", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz", + "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A==", + "dev": true + } + } + }, + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", + "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", + "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", + "dev": true + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "5.1.1" + } + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "2.0.0", + "jwa": "1.1.5", + "safe-buffer": "5.1.1" + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "klaw": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", + "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "last-line-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/last-line-stream/-/last-line-stream-1.0.0.tgz", + "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", + "dev": true, + "requires": { + "through2": "2.0.3" + } + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "4.0.1" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "lodash.chunk": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", + "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw=", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.clonedeepwith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz", + "integrity": "sha1-buMFc6A6GmDWcKYu8zwQzxr9vdQ=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.merge": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", + "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" + }, + "lodash.mergewith": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", + "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", + "dev": true + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" + }, + "lolex": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", + "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==", + "dev": true + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "lru-cache": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", + "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", + "dev": true, + "requires": { + "pify": "3.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "1.0.1" + } + }, + "marked": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.17.tgz", + "integrity": "sha512-+AKbNsjZl6jFfLPwHhWmGTqE009wTKn3RTmn9K8oUKHrX/abPJjtcRtXpYB/FFrwPJRUA86LX/de3T0knkPCmQ==", + "dev": true + }, + "matcher": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.0.tgz", + "integrity": "sha512-aZGv6JBTHqfqAd09jmAlbKnAICTfIvb5Z8gXVxPB5WZtFfHMaAMdACL7tQflD2V+6/8KNcY8s6DYtWLgpJP5lA==", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "md5-hex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", + "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "md5-o-matic": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", + "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-estraverse-visitors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/merge-estraverse-visitors/-/merge-estraverse-visitors-1.0.0.tgz", + "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "merge2": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz", + "integrity": "sha512-wUqcG5pxrAcaFI1lkqkMnk3Q7nUxV/NWfpAFSeWUwG9TRODnBDCUHa75mi3o3vLWQ5N4CQERWCauSlP0I3ZqUg==" + }, + "methmeth": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/methmeth/-/methmeth-1.1.0.tgz", + "integrity": "sha1-6AomYY5S9cQiKGG7dIUQvRDikIk=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "mime": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", + "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "mimic-response": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.4.tgz", + "integrity": "sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + }, + "dependencies": { + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "modelo": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/modelo/-/modelo-4.2.3.tgz", + "integrity": "sha512-9DITV2YEMcw7XojdfvGl3gDD8J9QjZTJ7ZOUuSAkP+F3T6rDbzMJuPktxptsdHYEvZcmXrCD3LMOhdSAEq6zKA==" + }, + "module-not-found-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", + "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", + "dev": true + }, + "moment": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", + "integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multi-stage-sourcemap": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/multi-stage-sourcemap/-/multi-stage-sourcemap-0.2.1.tgz", + "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", + "dev": true, + "requires": { + "source-map": "0.1.43" + }, + "dependencies": { + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nise": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.1.tgz", + "integrity": "sha512-kIH3X5YCj1vvj/32zDa9KNgzvfZd51ItGbiaCbtYhpnsCedLo0tIkb9zl169a41ATzF4z7kwMLz35XXDypma3g==", + "dev": true, + "requires": { + "@sinonjs/formatio": "2.0.0", + "just-extend": "1.1.27", + "lolex": "2.3.2", + "path-to-regexp": "1.7.0", + "text-encoding": "0.6.4" + } + }, + "node-forge": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.4.tgz", + "integrity": "sha512-8Df0906+tq/omxuCZD6PqhPaQDYuyJ1d+VITgxoIA8zvQd1ru+nMJcDChHH324MWitIgbVkAkQoGEEVJNpn/PA==" + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "dev": true, + "requires": { + "prepend-http": "2.0.0", + "query-string": "5.1.1", + "sort-keys": "2.0.0" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "nyc": { + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.6.0.tgz", + "integrity": "sha512-ZaXCh0wmbk2aSBH2B5hZGGvK2s9aM8DIm2rVY+BG3Fx8tUS+bpJSswUVZqOD1YfCmnYRFSqgYJSr7UeeUcW0jg==", + "dev": true, + "requires": { + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.1", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-report": "1.1.3", + "istanbul-lib-source-maps": "1.2.3", + "istanbul-reports": "1.3.0", + "md5-hex": "1.3.0", + "merge-source-map": "1.1.0", + "micromatch": "2.3.11", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "spawn-wrap": "1.4.2", + "test-exclude": "4.2.1", + "yargs": "11.1.0", + "yargs-parser": "8.1.0" + }, + "dependencies": { + "align-text": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "append-transform": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "requires": { + "default-require-extensions": "1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + }, + "atob": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-generator": { + "version": "6.26.1", + "bundled": true, + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.5", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" + } + }, + "babel-template": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.5" + } + }, + "babel-traverse": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.3", + "lodash": "4.17.5" + } + }, + "babel-types": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.5", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "bundled": true, + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "base": { + "version": "0.11.2", + "bundled": true, + "dev": true, + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "bundled": true, + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "builtin-modules": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "caching-transform": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" + } + }, + "camelcase": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true + }, + "center-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "class-utils": { + "version": "0.3.6", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } + } + }, + "cliui": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "bundled": true, + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "core-js": { + "version": "2.5.3", + "bundled": true, + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "which": "1.3.0" + } + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-log": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "default-require-extensions": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "strip-bom": "2.0.0" + } + }, + "define-property": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "detect-indent": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "esutils": { + "version": "2.0.2", + "bundled": true, + "dev": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + } + } + }, + "expand-brackets": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "bundled": true, + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "extend-shallow": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "extglob": { + "version": "0.3.2", + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "bundled": true, + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-cache-dir": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "requires": { + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "for-own": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" + } + }, + "fragment-cache": { + "version": "0.2.1", + "bundled": true, + "dev": true, + "requires": { + "map-cache": "0.2.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "get-value": { + "version": "2.0.6", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "globals": { + "version": "9.18.0", + "bundled": true, + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "bundled": true, + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "has-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "hosted-git-info": { + "version": "2.6.0", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invariant": { + "version": "2.2.3", + "bundled": true, + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-odd": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "bundled": true, + "dev": true + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.1", + "bundled": true, + "dev": true, + "requires": { + "babel-generator": "6.26.1", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.2.0", + "semver": "5.5.0" + } + }, + "istanbul-lib-report": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.3", + "bundled": true, + "dev": true, + "requires": { + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "istanbul-reports": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "handlebars": "4.0.11" + } + }, + "js-tokens": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "lodash": { + "version": "4.17.5", + "bundled": true, + "dev": true + }, + "longest": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "lru-cache": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "map-cache": { + "version": "0.2.2", + "bundled": true, + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "object-visit": "1.0.1" + } + }, + "md5-hex": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "md5-o-matic": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "mem": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "merge-source-map": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "micromatch": { + "version": "2.3.11", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mimic-fn": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "nanomatch": { + "version": "1.2.9", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" + } + }, + "normalize-path": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "1.2.0" + } + }, + "p-try": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "pascalcase": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "path-type": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "bundled": true, + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "pkg-dir": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "1.1.2" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "preserve": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "bundled": true, + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "bundled": true, + "dev": true + }, + "repeating": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve-from": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "ret": { + "version": "0.1.15", + "bundled": true, + "dev": true + }, + "right-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-regex": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "ret": "0.1.15" + } + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "set-value": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true + }, + "source-map-resolve": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "atob": "2.0.3", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "bundled": true, + "dev": true + }, + "spawn-wrap": { + "version": "1.4.2", + "bundled": true, + "dev": true, + "requires": { + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.0" + } + }, + "spdx-correct": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "split-string": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "3.0.2" + } + }, + "static-extend": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } + } + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "test-exclude": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "3.1.9", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "braces": { + "version": "2.3.1", + "bundled": true, + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "kind-of": "6.0.2", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + }, + "micromatch": { + "version": "3.1.9", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } + } + }, + "to-fast-properties": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "to-regex": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + } + } + }, + "trim-right": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "yargs": { + "version": "3.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "union-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unset-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "bundled": true, + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "bundled": true, + "dev": true + }, + "use": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "validate-npm-package-license": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" + } + }, + "which": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "window-size": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "11.1.0", + "bundled": true, + "dev": true, + "requires": { + "cliui": "4.0.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "cliui": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "yargs-parser": { + "version": "9.0.2", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "8.1.0", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "3.0.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "3.0.1" + } + }, + "observable-to-promise": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/observable-to-promise/-/observable-to-promise-0.5.0.tgz", + "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", + "dev": true, + "requires": { + "is-observable": "0.2.0", + "symbol-observable": "1.2.0" + }, + "dependencies": { + "is-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", + "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "dev": true, + "requires": { + "symbol-observable": "0.2.4" + }, + "dependencies": { + "symbol-observable": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", + "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "dev": true + } + } + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + } + }, + "option-chain": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/option-chain/-/option-chain-1.0.0.tgz", + "integrity": "sha1-k41zvU4Xg/lI00AjZEraI2aeMPI=", + "dev": true + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "optjs": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", + "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, + "p-limit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.2.0" + } + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "requires": { + "p-finally": "1.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "package-hash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-2.0.0.tgz", + "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "lodash.flattendeep": "4.4.0", + "md5-hex": "2.0.0", + "release-zalgo": "1.0.0" + } + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "6.7.1", + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0", + "semver": "5.5.0" + }, + "dependencies": { + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" + } + } + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "parse-ms": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz", + "integrity": "sha1-3T+iXtbC78e93hKtm0bBY6opIk4=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "3.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pinkie": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", + "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", + "dev": true + }, + "pinkie-promise": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", + "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", + "dev": true, + "requires": { + "pinkie": "1.0.0" + } + }, + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "load-json-file": "4.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "1.3.1", + "json-parse-better-errors": "1.0.1" + } + } + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + } + }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "dev": true, + "requires": { + "irregular-plurals": "1.4.0" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "postcss": { + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", + "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "dev": true, + "requires": { + "chalk": "2.3.2", + "source-map": "0.6.1", + "supports-color": "5.3.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "power-assert": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.4.4.tgz", + "integrity": "sha1-kpXqdDcZb1pgH95CDwQmMRhtdRc=", + "requires": { + "define-properties": "1.1.2", + "empower": "1.2.3", + "power-assert-formatter": "1.4.1", + "universal-deep-strict-equal": "1.2.2", + "xtend": "4.0.1" + } + }, + "power-assert-context-formatter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz", + "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", + "requires": { + "core-js": "2.5.3", + "power-assert-context-traversal": "1.1.1" + } + }, + "power-assert-context-reducer-ast": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.1.2.tgz", + "integrity": "sha1-SEqZ4m9Jc/+IMuXFzHVnAuYJQXQ=", + "requires": { + "acorn": "4.0.13", + "acorn-es7-plugin": "1.1.7", + "core-js": "2.5.3", + "espurify": "1.7.0", + "estraverse": "4.2.0" + } + }, + "power-assert-context-traversal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz", + "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", + "requires": { + "core-js": "2.5.3", + "estraverse": "4.2.0" + } + }, + "power-assert-formatter": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", + "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", + "requires": { + "core-js": "2.5.3", + "power-assert-context-formatter": "1.1.1", + "power-assert-context-reducer-ast": "1.1.2", + "power-assert-renderer-assertion": "1.1.1", + "power-assert-renderer-comparison": "1.1.1", + "power-assert-renderer-diagram": "1.1.2", + "power-assert-renderer-file": "1.1.1" + } + }, + "power-assert-renderer-assertion": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.1.1.tgz", + "integrity": "sha1-y/wOd+AIao+Wrz8djme57n4ozpg=", + "requires": { + "power-assert-renderer-base": "1.1.1", + "power-assert-util-string-width": "1.1.1" + } + }, + "power-assert-renderer-base": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-renderer-base/-/power-assert-renderer-base-1.1.1.tgz", + "integrity": "sha1-lqZQxv0F7hvB9mtUrWFELIs/Y+s=" + }, + "power-assert-renderer-comparison": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz", + "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", + "requires": { + "core-js": "2.5.3", + "diff-match-patch": "1.0.0", + "power-assert-renderer-base": "1.1.1", + "stringifier": "1.3.0", + "type-name": "2.0.2" + } + }, + "power-assert-renderer-diagram": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz", + "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", + "requires": { + "core-js": "2.5.3", + "power-assert-renderer-base": "1.1.1", + "power-assert-util-string-width": "1.1.1", + "stringifier": "1.3.0" + } + }, + "power-assert-renderer-file": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.1.1.tgz", + "integrity": "sha1-o34rvReMys0E5427eckv40kzxec=", + "requires": { + "power-assert-renderer-base": "1.1.1" + } + }, + "power-assert-util-string-width": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.1.1.tgz", + "integrity": "sha1-vmWet5N/3S5smncmjar2S9W3xZI=", + "requires": { + "eastasianwidth": "0.1.1" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "prettier": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.11.1.tgz", + "integrity": "sha512-T/KD65Ot0PB97xTrG8afQ46x3oiVhnfGjGESSI9NWYcG92+OUPZKkwHqGWXH2t9jK1crnQjubECW0FuOth+hxw==", + "dev": true + }, + "pretty-ms": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", + "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", + "dev": true, + "requires": { + "parse-ms": "1.0.1", + "plur": "2.1.2" + }, + "dependencies": { + "parse-ms": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", + "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", + "dev": true + } + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "propprop": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/propprop/-/propprop-0.3.1.tgz", + "integrity": "sha1-oEmjVouJZEAGfRXY7J8zc15XAXg=", + "dev": true + }, + "protobufjs": { + "version": "6.8.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", + "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", + "requires": { + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/base64": "1.1.2", + "@protobufjs/codegen": "2.0.4", + "@protobufjs/eventemitter": "1.1.0", + "@protobufjs/fetch": "1.1.0", + "@protobufjs/float": "1.0.2", + "@protobufjs/inquire": "1.1.0", + "@protobufjs/path": "1.1.2", + "@protobufjs/pool": "1.1.0", + "@protobufjs/utf8": "1.1.0", + "@types/long": "3.0.32", + "@types/node": "8.9.5", + "long": "4.0.0" + }, + "dependencies": { + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + } + } + }, + "proxyquire": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.0.0.tgz", + "integrity": "sha512-TO9TAIz0mpa+SKddXsgCFatoe/KmHvoNVj2jDMC1kXE6kKn7/4CRpxvQ+0wAK9sbMT2FVO89qItlvnZMcFbJ2Q==", + "dev": true, + "requires": { + "fill-keys": "1.0.2", + "module-not-found-error": "1.0.1", + "resolve": "1.1.7" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "requires": { + "end-of-stream": "1.4.1", + "once": "1.4.0" + } + }, + "pumpify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", + "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", + "requires": { + "duplexify": "3.5.4", + "inherits": "2.0.3", + "pump": "2.0.1" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "requires": { + "decode-uri-component": "0.2.0", + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" + } + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "rc": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", + "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", + "dev": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + }, + "dependencies": { + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "readable-stream": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", + "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.5", + "set-immediate-shim": "1.0.1" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + }, + "dependencies": { + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + } + } + }, + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, + "regexpp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.0.1.tgz", + "integrity": "sha512-8Ph721maXiOYSLtaDGKVmDn5wdsNaF6Px85qFNeMPQq0r8K5Y10tgP6YuR65Ws35n4DvzFcCxEnRNBIXQunzLw==", + "dev": true + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "1.2.6", + "safe-buffer": "5.1.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "1.2.6" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "0.5.0" + } + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "4.1.1" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "request": { + "version": "2.85.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", + "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-precompiled": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/require-precompiled/-/require-precompiled-0.1.0.tgz", + "integrity": "sha1-WhtS63Dr7UPrmC6XTIWrWVceVvo=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } + } + }, + "requizzle": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", + "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, + "retry-axios": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-0.3.2.tgz", + "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==" + }, + "retry-request": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.1.tgz", + "integrity": "sha512-PjAmtWIxjNj4Co/6FRtBl8afRP3CxrrIAnUzb1dzydfROd+6xt7xAebFeskgQgkfFf8NmzrXIoaB3HxmswXyxw==", + "requires": { + "request": "2.85.0", + "through2": "2.0.3" + } + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "2.1.0" + } + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "4.0.8" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "0.1.15" + } + }, + "samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "dev": true + }, + "sanitize-html": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.2.tgz", + "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", + "dev": true, + "requires": { + "chalk": "2.3.2", + "htmlparser2": "3.9.2", + "lodash.clonedeep": "4.5.0", + "lodash.escaperegexp": "4.1.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mergewith": "4.6.1", + "postcss": "6.0.19", + "srcset": "1.0.0", + "xtend": "4.0.1" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "5.5.0" + } + }, + "serialize-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", + "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sinon": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.3.0.tgz", + "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", + "dev": true, + "requires": { + "@sinonjs/formatio": "2.0.0", + "diff": "3.5.0", + "lodash.get": "4.4.2", + "lolex": "2.3.2", + "nise": "1.3.1", + "supports-color": "5.3.0", + "type-detect": "4.0.8" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "snakecase-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.1.1.tgz", + "integrity": "sha512-/7I66rMhAag18IH5o0jtWWCJH/f2cvICwBcSS+SBUxsorbDeBu4UvYDNlAn3MrHfk6re0rUECwaPhsZuV2P9Ng==", + "requires": { + "map-obj": "2.0.0", + "to-snake-case": "0.1.2" + } + }, + "snakeize": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/snakeize/-/snakeize-0.1.0.tgz", + "integrity": "sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.2.1" + } + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "1.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "requires": { + "atob": "2.0.3", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-support": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.4.tgz", + "integrity": "sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg==", + "dev": true, + "requires": { + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "split-array-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", + "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", + "requires": { + "async": "2.6.0", + "is-stream-ended": "0.1.3" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "3.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "srcset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz", + "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", + "dev": true, + "requires": { + "array-uniq": "1.0.3", + "number-is-nan": "1.0.1" + } + }, + "sshpk": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", + "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "stream-events": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.2.tgz", + "integrity": "sha1-q/OfZsCJCk63lbyNXoWbJhW1kLI=", + "requires": { + "stubs": "3.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/string/-/string-3.3.3.tgz", + "integrity": "sha1-XqIRzZLSKOGEKUmQpsyXs2anfLA=", + "dev": true + }, + "string-format-obj": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz", + "integrity": "sha512-Mm+sROy+pHJmx0P/0Bs1uxIX6UhGJGj6xDGQZ5zh9v/SZRmLGevp+p0VJxV7lirrkAmQ2mvva/gHKpnF/pTb+Q==" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringifier": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", + "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", + "requires": { + "core-js": "2.5.3", + "traverse": "0.6.6", + "type-name": "2.0.2" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-bom-buf": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", + "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "stubs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", + "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=" + }, + "superagent": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", + "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "cookiejar": "2.1.1", + "debug": "3.1.0", + "extend": "3.0.1", + "form-data": "2.3.2", + "formidable": "1.2.0", + "methods": "1.1.2", + "mime": "1.6.0", + "qs": "6.5.1", + "readable-stream": "2.3.5" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + } + } + }, + "supertap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supertap/-/supertap-1.0.0.tgz", + "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", + "dev": true, + "requires": { + "arrify": "1.0.1", + "indent-string": "3.2.0", + "js-yaml": "3.11.0", + "serialize-error": "2.1.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "supertest": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.0.0.tgz", + "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", + "dev": true, + "requires": { + "methods": "1.1.2", + "superagent": "3.8.2" + } + }, + "supports-color": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + } + } + }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true + }, + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "dev": true, + "requires": { + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.3.2", + "lodash": "4.17.5", + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "0.7.0" + } + }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "2.3.5", + "xtend": "4.0.1" + } + }, + "time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-no-case": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-0.1.1.tgz", + "integrity": "sha1-zzPHDg8oFo2V5BWavxUOjFQu+f4=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + } + }, + "to-snake-case": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/to-snake-case/-/to-snake-case-0.1.2.tgz", + "integrity": "sha1-0Ee22/BI2uG9wmCzwpb1TKNO7Xw=", + "requires": { + "to-space-case": "0.1.2" + } + }, + "to-space-case": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-0.1.2.tgz", + "integrity": "sha1-mma+Pr5T8nefaH8CYu/9H8W20V4=", + "requires": { + "to-no-case": "0.1.1" + } + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "requires": { + "punycode": "1.4.1" + } + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/type-name/-/type-name-2.0.2.tgz", + "integrity": "sha1-7+fUEj2KxSr/9/QMfk3sUmYAj7Q=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uid2": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", + "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I=", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "underscore-contrib": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", + "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "1.0.0" + } + }, + "unique-temp-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz", + "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", + "dev": true, + "requires": { + "mkdirp": "0.5.1", + "os-tmpdir": "1.0.2", + "uid2": "0.0.3" + } + }, + "universal-deep-strict-equal": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", + "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", + "requires": { + "array-filter": "1.0.0", + "indexof": "0.0.1", + "object-keys": "1.0.11" + } + }, + "universalify": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "update-notifier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", + "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "dev": true, + "requires": { + "boxen": "1.3.0", + "chalk": "2.3.2", + "configstore": "3.1.1", + "import-lazy": "2.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "urlgrey": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", + "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=", + "dev": true + }, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "requires": { + "kind-of": "6.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "well-known-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-1.0.0.tgz", + "integrity": "sha1-c8eK6Bp3Jqj6WY4ogIAcixYiVRg=", + "dev": true + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "widest-line": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", + "dev": true, + "requires": { + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" + } + }, + "write-json-file": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", + "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", + "dev": true, + "requires": { + "detect-indent": "5.0.0", + "graceful-fs": "4.1.11", + "make-dir": "1.2.0", + "pify": "3.0.0", + "sort-keys": "2.0.0", + "write-file-atomic": "2.3.0" + }, + "dependencies": { + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + } + } + }, + "write-pkg": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.1.0.tgz", + "integrity": "sha1-AwqZlMyZk9JbTnWp8aGSNgcpHOk=", + "dev": true, + "requires": { + "sort-keys": "2.0.0", + "write-json-file": "2.3.0" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "xmlcreate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", + "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + } + } +} diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 50635196d03..7f03ade29dd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -32,6 +32,7 @@ ], "contributors": [ "Ace Nassri ", + "Alexander Fenster ", "Ali Ijaz Sheikh ", "Bill Prin ", "Cristian Cavalli ", @@ -81,7 +82,7 @@ }, "devDependencies": { "@google-cloud/bigquery": "*", - "@google-cloud/nodejs-repo-tools": "^2.1.0", + "@google-cloud/nodejs-repo-tools": "^2.2.3", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", "async": "^2.5.0", diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index eba59abd0d9..af4720417a7 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -97,7 +97,7 @@ Metadata.getGKEDescriptor = function(callback) { callback(null, { type: 'container', labels: { - // TODO(ofrobots): it would be good to include the namespace_id as + // note(ofrobots): it would be good to include the namespace_id as // well. cluster_name: resp.data, }, From bdd2f5a438604790147ab955072c9157bcf8abef Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 19 Mar 2018 14:49:17 -0400 Subject: [PATCH 0151/1029] fix: Unique-ify getEntries resourceNames (#92) --- handwritten/logging/src/index.js | 9 ++++++++- handwritten/logging/test/index.js | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 9fa14815e61..6b01584375d 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -417,7 +417,12 @@ Logging.prototype.getEntries = function(options, callback) { ); reqOpts.resourceNames = arrify(reqOpts.resourceNames); - reqOpts.resourceNames.push('projects/' + this.projectId); + + var resourceName = 'projects/' + this.projectId; + + if (reqOpts.resourceNames.indexOf(resourceName) === -1) { + reqOpts.resourceNames.push(resourceName); + } delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; @@ -783,6 +788,8 @@ Logging.prototype.request = function(config, callback) { return; } + self.projectId = projectId; + var gaxClient = self.api[config.client]; if (!gaxClient) { diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 31017556c5d..58e30ecbbff 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -459,6 +459,21 @@ describe('Logging', function() { logging.getEntries(options, assert.ifError); }); + it('should not push the same resourceName again', function(done) { + var options = { + resourceNames: ['projects/' + logging.projectId], + }; + + logging.request = function(config) { + assert.deepEqual(config.reqOpts.resourceNames, [ + 'projects/' + logging.projectId, + ]); + done(); + }; + + logging.getEntries(options, assert.ifError); + }); + it('should allow overriding orderBy', function(done) { var options = { orderBy: 'timestamp asc', @@ -838,6 +853,17 @@ describe('Logging', function() { logging.request(CONFIG, assert.ifError); }); + it('should cache the project ID', function(done) { + logging.auth.getProjectId = function() { + setImmediate(function() { + assert.strictEqual(logging.projectId, PROJECT_ID); + done(); + }); + }; + + logging.request(CONFIG, assert.ifError); + }); + it('should return error if getting project ID failed', function(done) { var error = new Error('Error.'); From a1625d9d85ae3420af01ddce2859f1bd96682ed9 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Tue, 20 Mar 2018 08:40:11 +1300 Subject: [PATCH 0152/1029] v1.2.0 (#95) --- handwritten/logging/package-lock.json | 18 +++++++++--------- handwritten/logging/package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index e6e8754d338..a11d587f9d5 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "1.1.7", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -8915,9 +8915,9 @@ "dev": true }, "nise": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.1.tgz", - "integrity": "sha512-kIH3X5YCj1vvj/32zDa9KNgzvfZd51ItGbiaCbtYhpnsCedLo0tIkb9zl169a41ATzF4z7kwMLz35XXDypma3g==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.2.tgz", + "integrity": "sha512-KPKb+wvETBiwb4eTwtR/OsA2+iijXP+VnlSFYJo3EHjm2yjek1NWxHOUQat3i7xNLm1Bm18UA5j5Wor0yO2GtA==", "dev": true, "requires": { "@sinonjs/formatio": "2.0.0", @@ -12262,9 +12262,9 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "6.0.19", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", - "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "version": "6.0.20", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.20.tgz", + "integrity": "sha512-Opr6usW30Iy0xEDrJywDckRxtylfO7gTGs3Kfb2LdLQlGsUg89fTy0R3Vm1Dub2YHO7MK58avr0p70+uFFHb7A==", "dev": true, "requires": { "chalk": "2.3.2", @@ -12999,7 +12999,7 @@ "lodash.isplainobject": "4.0.6", "lodash.isstring": "4.0.1", "lodash.mergewith": "4.6.1", - "postcss": "6.0.19", + "postcss": "6.0.20", "srcset": "1.0.0", "xtend": "4.0.1" } @@ -13089,7 +13089,7 @@ "diff": "3.5.0", "lodash.get": "4.4.2", "lolex": "2.3.2", - "nise": "1.3.1", + "nise": "1.3.2", "supports-color": "5.3.0", "type-detect": "4.0.8" } diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7f03ade29dd..27bddd9da77 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.1.7", + "version": "1.2.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From ffa0c1ee7f9358b13123488c2e6f8fda68908c38 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 19 Mar 2018 18:31:08 -0700 Subject: [PATCH 0153/1029] chore: setup nighty build in CircleCI (#97) * chore: setup nighty build in CircleCI * chore: setup nighty build in CircleCI --- handwritten/logging/.circleci/config.yml | 48 +++++++------ .../logging/.circleci/get_workflow_name.py | 67 +++++++++++++++++++ 2 files changed, 96 insertions(+), 19 deletions(-) create mode 100644 handwritten/logging/.circleci/get_workflow_name.py diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index df6566084c5..558bf8459f6 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -1,21 +1,8 @@ -unit_tests: - steps: &unit_tests - - checkout - - run: - name: Install modules and dependencies. - command: npm install - - run: - name: Run unit tests. - command: npm test - - run: - name: Submit coverage data to codecov. - command: node_modules/.bin/codecov - when: always version: 2 workflows: version: 2 tests: - jobs: + jobs: &workflow_jobs - node4: filters: tags: @@ -77,16 +64,35 @@ workflows: ignore: /.*/ tags: only: '/^v[\d.]+$/' + nightly: + triggers: + - schedule: + cron: 0 7 * * * + filters: + branches: + only: master + jobs: *workflow_jobs jobs: node4: docker: - image: 'node:4' user: node - steps: + steps: &unit_tests_steps - checkout + - run: &remove_package_lock + name: Remove package-lock.json if needed. + command: | + WORKFLOW_NAME=`python .circleci/get_workflow_name.py` + echo "Workflow name: $WORKFLOW_NAME" + if [ "$WORKFLOW_NAME" = "nightly" ]; then + echo "Nightly build detected, removing package-lock.json." + rm -f package-lock.json samples/package-lock.json + else + echo "Not a nightly build, skipping this step." + fi - run: name: Install modules and dependencies. - command: npm install --unsafe-perm + command: npm install - run: name: Run unit tests. command: npm test @@ -98,23 +104,24 @@ jobs: docker: - image: 'node:6' user: node - steps: *unit_tests + steps: *unit_tests_steps node8: docker: - image: 'node:8' user: node - steps: *unit_tests + steps: *unit_tests_steps node9: docker: - image: 'node:9' user: node - steps: *unit_tests + steps: *unit_tests_steps lint: docker: - image: 'node:8' user: node steps: - checkout + - run: *remove_package_lock - run: name: Install modules and dependencies. command: | @@ -143,6 +150,7 @@ jobs: user: node steps: - checkout + - run: *remove_package_lock - run: name: Install modules and dependencies. command: npm install @@ -155,6 +163,7 @@ jobs: user: node steps: - checkout + - run: *remove_package_lock - run: name: Decrypt credentials. command: | @@ -196,6 +205,7 @@ jobs: user: node steps: - checkout + - run: *remove_package_lock - run: name: Decrypt credentials. command: | diff --git a/handwritten/logging/.circleci/get_workflow_name.py b/handwritten/logging/.circleci/get_workflow_name.py new file mode 100644 index 00000000000..ff6b58fd24f --- /dev/null +++ b/handwritten/logging/.circleci/get_workflow_name.py @@ -0,0 +1,67 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Get workflow name for the current build using CircleCI API. +Would be great if this information is available in one of +CircleCI environment variables, but it's not there. +https://circleci.ideas.aha.io/ideas/CCI-I-295 +""" + +import json +import os +import sys +import urllib2 + + +def main(): + try: + username = os.environ['CIRCLE_PROJECT_USERNAME'] + reponame = os.environ['CIRCLE_PROJECT_REPONAME'] + build_num = os.environ['CIRCLE_BUILD_NUM'] + except: + sys.stderr.write( + 'Looks like we are not inside CircleCI container. Exiting...\n') + return 1 + + try: + request = urllib2.Request( + "https://circleci.com/api/v1.1/project/github/%s/%s/%s" % + (username, reponame, build_num), + headers={"Accept": "application/json"}) + contents = urllib2.urlopen(request).read() + except: + sys.stderr.write('Cannot query CircleCI API. Exiting...\n') + return 1 + + try: + build_info = json.loads(contents) + except: + sys.stderr.write( + 'Cannot parse JSON received from CircleCI API. Exiting...\n') + return 1 + + try: + workflow_name = build_info['workflows']['workflow_name'] + except: + sys.stderr.write( + 'Cannot get workflow name from CircleCI build info. Exiting...\n') + return 1 + + print workflow_name + return 0 + + +retval = main() +exit(retval) From f841cb1ceaf81607e512748f66094ce216b72127 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 21 Mar 2018 10:14:47 -0400 Subject: [PATCH 0154/1029] Update google-auto-auth (#98) * Update google-auto-auth * Update package locks --- handwritten/logging/package-lock.json | 139 +++++++++++++++++++------- handwritten/logging/package.json | 2 +- 2 files changed, 102 insertions(+), 39 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index a11d587f9d5..8394e9ac6b6 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -215,6 +215,19 @@ "stream-events": "1.0.2", "string-format-obj": "1.1.1", "through2": "2.0.3" + }, + "dependencies": { + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "requires": { + "async": "2.6.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.85.0" + } + } } }, "@google-cloud/common-grpc": { @@ -1935,42 +1948,39 @@ } }, "@google-cloud/pubsub": { - "version": "0.16.5", - "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-0.16.5.tgz", - "integrity": "sha512-LxFdTU1WWyJm9b7Wmrb5Ztp7SRlwESKYiWioAanyOzf2ZUAXkuz8HL+Qi92ch++rAgnQg77oxB3He2SOJxoCTA==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-0.17.0.tgz", + "integrity": "sha512-eJ0ApkPIRKaR+kswCkLK9n97dPBFoLRVjfuqhWMl90mo0InHpyXDddgESZnmr0goQ9fJmj0GE6s7YIXdxVWHrg==", "dev": true, "requires": { "@google-cloud/common": "0.16.2", "arrify": "1.0.1", "async-each": "1.0.1", + "delay": "2.0.0", + "duplexify": "3.5.4", "extend": "3.0.1", "google-auto-auth": "0.9.7", - "google-gax": "0.15.0", + "google-gax": "0.16.0", "google-proto-files": "0.15.1", "is": "3.2.1", "lodash.chunk": "4.2.0", "lodash.merge": "4.6.1", "lodash.snakecase": "4.1.1", "protobufjs": "6.8.6", + "through2": "2.0.3", "uuid": "3.2.1" }, "dependencies": { - "google-gax": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.15.0.tgz", - "integrity": "sha512-a+WBi3oiV3jQ0eLCIM0GAFe8vYQ10yYuXRnjhEEXFKSNd8nW6XSQ7YWqMLIod2Xnyu6JiSSymMBwCr5YSwQyRQ==", + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", "dev": true, "requires": { - "extend": "3.0.1", - "globby": "8.0.1", - "google-auto-auth": "0.9.7", - "google-proto-files": "0.15.1", - "grpc": "1.9.1", - "is-stream-ended": "0.1.3", - "lodash": "4.17.5", - "protobufjs": "6.8.6", - "readable-stream": "2.3.5", - "through2": "2.0.3" + "async": "2.6.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.85.0" } } } @@ -2135,7 +2145,7 @@ }, "@types/node": { "version": "8.9.5", - "resolved": "http://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==" }, "acorn": { @@ -4304,6 +4314,15 @@ } } }, + "delay": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-2.0.0.tgz", + "integrity": "sha1-kRLq3APk7H4AKXM3iW8nO72R+uU=", + "dev": true, + "requires": { + "p-defer": "1.0.0" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4734,14 +4753,14 @@ "requires": { "ignore": "3.3.7", "minimatch": "3.0.4", - "resolve": "1.5.0", + "resolve": "1.6.0", "semver": "5.5.0" }, "dependencies": { "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz", + "integrity": "sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw==", "dev": true, "requires": { "path-parse": "1.0.5" @@ -4823,7 +4842,7 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "1.2.2", + "is-url": "1.2.3", "path-is-absolute": "1.0.1", "source-map": "0.5.7", "xtend": "4.0.1" @@ -5337,9 +5356,9 @@ } }, "formidable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.0.tgz", - "integrity": "sha512-hr9aT30rAi7kf8Q2aaTpSP7xGMhlJ+MdrUDVZs3rxbD3L/K46A86s2VY7qC2D2kGYGBtiT/3j6wTx1eeUq5xAQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", + "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==", "dev": true }, "fragment-cache": { @@ -6315,6 +6334,20 @@ "request": "2.85.0", "stream-events": "1.0.2", "through2": "2.0.3" + }, + "dependencies": { + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "dev": true, + "requires": { + "async": "2.6.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.85.0" + } + } } }, "get-caller-file": { @@ -6471,9 +6504,9 @@ } }, "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.0.tgz", + "integrity": "sha512-R6m473OqgZacPvlidJ0aownTlUWyLy654ugjKSXyi1ffIicXlXg3wMfse9T9zxqG6w01q6K1iG+b7dImMkVJ2Q==", "requires": { "async": "2.6.0", "gcp-metadata": "0.6.3", @@ -6496,6 +6529,19 @@ "lodash": "4.17.5", "protobufjs": "6.8.6", "through2": "2.0.3" + }, + "dependencies": { + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "requires": { + "async": "2.6.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.85.0" + } + } } }, "google-p12-pem": { @@ -8004,9 +8050,9 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-url": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.2.tgz", - "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.3.tgz", + "integrity": "sha512-vmOHLvzbcnsdFz8wQPXj1lgI5SE8AUlUGMenzuZzRFjoReb1WB+pLt9GrIo7BTker+aTcwrjTDle7odioWeqyw==", "dev": true }, "is-utf8": { @@ -11975,6 +12021,12 @@ "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", "dev": true }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -12482,14 +12534,25 @@ } }, "proxyquire": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.0.0.tgz", - "integrity": "sha512-TO9TAIz0mpa+SKddXsgCFatoe/KmHvoNVj2jDMC1kXE6kKn7/4CRpxvQ+0wAK9sbMT2FVO89qItlvnZMcFbJ2Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.0.1.tgz", + "integrity": "sha512-fQr3VQrbdzHrdaDn3XuisVoJlJNDJizHAvUXw9IuXRR8BpV2x0N7LsCxrpJkeKfPbNjiNU/V5vc008cI0TmzzQ==", "dev": true, "requires": { "fill-keys": "1.0.2", "module-not-found-error": "1.0.1", - "resolve": "1.1.7" + "resolve": "1.5.0" + }, + "dependencies": { + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + } } }, "pseudomap": { @@ -13602,7 +13665,7 @@ "debug": "3.1.0", "extend": "3.0.1", "form-data": "2.3.2", - "formidable": "1.2.0", + "formidable": "1.2.1", "methods": "1.1.2", "mime": "1.6.0", "qs": "6.5.1", diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 27bddd9da77..bce35527220 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -68,7 +68,7 @@ "eventid": "^0.1.0", "extend": "^3.0.1", "gcp-metadata": "^0.6.1", - "google-auto-auth": "^0.9.0", + "google-auto-auth": "^0.10.0", "google-gax": "^0.16.0", "google-proto-files": "^0.15.0", "is": "^3.0.1", From 928f48d08737a47e0e0bf047783c5028b9e94dc8 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 22 Mar 2018 13:49:43 -0400 Subject: [PATCH 0155/1029] =?UTF-8?q?Update=20@google-cloud/common=20to=20?= =?UTF-8?q?the=20latest=20version=20=F0=9F=9A=80=20(#100)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(package): update @google-cloud/common to version 0.17.0 * Update package locks --- handwritten/logging/package-lock.json | 159 +++++++++++++++++++++----- handwritten/logging/package.json | 2 +- 2 files changed, 129 insertions(+), 32 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 8394e9ac6b6..c3bc1a8d01d 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -104,7 +104,7 @@ "requires": { "array-uniq": "1.0.3", "arrify": "1.0.1", - "concat-stream": "1.6.1", + "concat-stream": "1.6.2", "create-error-class": "3.0.2", "duplexify": "3.5.4", "ent": "2.2.0", @@ -193,18 +193,18 @@ } }, "@google-cloud/common": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.2.tgz", - "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.17.0.tgz", + "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "requires": { "array-uniq": "1.0.3", "arrify": "1.0.1", - "concat-stream": "1.6.1", + "concat-stream": "1.6.2", "create-error-class": "3.0.2", "duplexify": "3.5.4", "ent": "2.2.0", "extend": "3.0.1", - "google-auto-auth": "0.9.7", + "google-auto-auth": "0.10.0", "is": "3.2.1", "log-driver": "1.2.7", "methmeth": "1.1.0", @@ -215,19 +215,6 @@ "stream-events": "1.0.2", "string-format-obj": "1.1.1", "through2": "2.0.3" - }, - "dependencies": { - "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", - "requires": { - "async": "2.6.0", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", - "request": "2.85.0" - } - } } }, "@google-cloud/common-grpc": { @@ -244,6 +231,44 @@ "modelo": "4.2.3", "retry-request": "3.3.1", "through2": "2.0.3" + }, + "dependencies": { + "@google-cloud/common": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.2.tgz", + "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", + "requires": { + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.5.4", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.9.7", + "is": "3.2.1", + "log-driver": "1.2.7", + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.85.0", + "retry-request": "3.3.1", + "split-array-stream": "1.0.3", + "stream-events": "1.0.2", + "string-format-obj": "1.1.1", + "through2": "2.0.3" + } + }, + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "requires": { + "async": "2.6.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.85.0" + } + } } }, "@google-cloud/nodejs-repo-tools": { @@ -1971,6 +1996,32 @@ "uuid": "3.2.1" }, "dependencies": { + "@google-cloud/common": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.2.tgz", + "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", + "dev": true, + "requires": { + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.5.4", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.9.7", + "is": "3.2.1", + "log-driver": "1.2.7", + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.85.0", + "retry-request": "3.3.1", + "split-array-stream": "1.0.3", + "stream-events": "1.0.2", + "string-format-obj": "1.1.1", + "through2": "2.0.3" + } + }, "google-auto-auth": { "version": "0.9.7", "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", @@ -1995,7 +2046,7 @@ "arrify": "1.0.1", "async": "2.6.0", "compressible": "2.0.13", - "concat-stream": "1.6.1", + "concat-stream": "1.6.2", "create-error-class": "3.0.2", "duplexify": "3.5.4", "extend": "3.0.1", @@ -2012,6 +2063,46 @@ "stream-events": "1.0.2", "string-format-obj": "1.1.1", "through2": "2.0.3" + }, + "dependencies": { + "@google-cloud/common": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.2.tgz", + "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", + "dev": true, + "requires": { + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.5.4", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.9.7", + "is": "3.2.1", + "log-driver": "1.2.7", + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.85.0", + "retry-request": "3.3.1", + "split-array-stream": "1.0.3", + "stream-events": "1.0.2", + "string-format-obj": "1.1.1", + "through2": "2.0.3" + } + }, + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "dev": true, + "requires": { + "async": "2.6.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.85.0" + } + } } }, "@ladjs/time-require": { @@ -3341,6 +3432,11 @@ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==" + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -4023,10 +4119,11 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { + "buffer-from": "1.0.0", "inherits": "2.0.3", "readable-stream": "2.3.5", "typedarray": "0.0.6" @@ -4270,7 +4367,7 @@ "requires": { "globby": "5.0.0", "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", "object-assign": "4.1.1", "pify": "2.3.0", "pinkie-promise": "2.0.1", @@ -4660,15 +4757,15 @@ } }, "eslint": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.0.tgz", - "integrity": "sha512-r83L5CuqaocDvfwdojbz68b6tCUk8KJkqfppO+gmSAQqYCzTr0bCSMu6A6yFCLKG65j5eKcKUw4Cw4Yl4gfWkg==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { "ajv": "5.5.2", "babel-code-frame": "6.26.0", "chalk": "2.3.2", - "concat-stream": "1.6.1", + "concat-stream": "1.6.2", "cross-spawn": "5.1.0", "debug": "3.1.0", "doctrine": "2.1.0", @@ -7966,9 +8063,9 @@ "dev": true }, "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { "is-path-inside": "1.0.1" diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bce35527220..8436ffe4f94 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" }, "dependencies": { - "@google-cloud/common": "^0.16.1", + "@google-cloud/common": "^0.17.0", "@google-cloud/common-grpc": "^0.6.0", "arrify": "^1.0.0", "eventid": "^0.1.0", From 421b75ac58cf74be36d6edb92355c0e96005b63e Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 27 Mar 2018 18:09:55 -0700 Subject: [PATCH 0156/1029] chore: workaround for repo-tools EPERM (#101) --- handwritten/logging/.circleci/config.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 558bf8459f6..dcba5b00885 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -92,7 +92,12 @@ jobs: fi - run: name: Install modules and dependencies. - command: npm install + command: |- + npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi - run: name: Run unit tests. command: npm test @@ -127,6 +132,10 @@ jobs: command: | mkdir -p /home/node/.npm-global npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi npm link environment: NPM_CONFIG_PREFIX: /home/node/.npm-global @@ -153,7 +162,12 @@ jobs: - run: *remove_package_lock - run: name: Install modules and dependencies. - command: npm install + command: |- + npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi - run: name: Build documentation. command: npm run docs From fce01516f5d56add9bfa53166555546227b84825 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 28 Mar 2018 18:42:44 -0700 Subject: [PATCH 0157/1029] chore: one more workaround for repo-tools EPERM (#103) --- handwritten/logging/.circleci/config.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index dcba5b00885..a1a6e93f69c 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -189,6 +189,10 @@ jobs: command: | mkdir -p /home/node/.npm-global npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi npm link environment: NPM_CONFIG_PREFIX: /home/node/.npm-global @@ -228,7 +232,12 @@ jobs: -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - run: name: Install modules and dependencies. - command: npm install + command: |- + npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi - run: name: Run system tests. command: npm run system-test From 70b1709a4be33a02157b7358ce9b10392e0a8729 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 2 May 2018 08:31:05 -0700 Subject: [PATCH 0158/1029] chore: lock files maintenance (#106) * chore: lock files maintenance * chore: lock files maintenance --- handwritten/logging/package-lock.json | 2773 +++++++++---------------- 1 file changed, 945 insertions(+), 1828 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index c3bc1a8d01d..a5ca2b125ae 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -21,7 +21,7 @@ "babel-plugin-transform-async-to-generator": "6.24.1", "babel-plugin-transform-es2015-destructuring": "6.23.0", "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", "babel-plugin-transform-es2015-parameters": "6.24.1", "babel-plugin-transform-es2015-spread": "6.22.0", "babel-plugin-transform-es2015-sticky-regex": "6.24.1", @@ -81,115 +81,19 @@ } }, "@google-cloud/bigquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/bigquery/-/bigquery-1.0.0.tgz", - "integrity": "sha512-2N9TCCsAezu038BL9YmYi6j36AXQU8hoOThB4dSa4x+0fWFx+e7A9zTmg4GWwSbtgpkg+29a9BuzwpfCDiIeSw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@google-cloud/bigquery/-/bigquery-1.2.0.tgz", + "integrity": "sha512-3BUL1iUrMqihnHj+VbLvzkFQ9TRRavk65K+KPGnAVT2Sbo5yKXr8lyB6VCu7bL3NyaRnZfERiJRZe/rbEvaVEg==", "dev": true, "requires": { - "@google-cloud/common": "0.15.2", + "@google-cloud/common": "0.17.0", "arrify": "1.0.1", "duplexify": "3.5.4", "extend": "3.0.1", "is": "3.2.1", - "stream-events": "1.0.2", + "stream-events": "1.0.4", "string-format-obj": "1.1.1", "uuid": "3.2.1" - }, - "dependencies": { - "@google-cloud/common": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.15.2.tgz", - "integrity": "sha512-S7mSjyDjtmEAOKVFGNP11jSdt9LWo2bEu3PleJ4ttzcHSZB3qF6X1jU3MXZJ1adJpOuNiRV/mACK5cXaHA9Fnw==", - "dev": true, - "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.5.4", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.8.2", - "is": "3.2.1", - "log-driver": "1.2.5", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.85.0", - "retry-request": "3.3.1", - "split-array-stream": "1.0.3", - "stream-events": "1.0.2", - "string-format-obj": "1.1.1", - "through2": "2.0.3" - } - }, - "gcp-metadata": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.3.1.tgz", - "integrity": "sha512-5kJPX/RXuqoLmHiOOgkSDk/LI0QaXpEvZ3pvQP4ifjGGDKZKVSOjL/GcDjXA5kLxppFCOjmmsu0Uoop9d1upaQ==", - "dev": true, - "requires": { - "extend": "3.0.1", - "retry-request": "3.3.1" - } - }, - "google-auth-library": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-0.12.0.tgz", - "integrity": "sha512-79qCXtJ1VweBmmLr4yLq9S4clZB2p5Y+iACvuKk9gu4JitEnPc+bQFmYvtCYehVR44MQzD1J8DVmYW2w677IEw==", - "dev": true, - "requires": { - "gtoken": "1.2.3", - "jws": "3.1.4", - "lodash.isstring": "4.0.1", - "lodash.merge": "4.6.1", - "request": "2.85.0" - } - }, - "google-auto-auth": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.8.2.tgz", - "integrity": "sha512-W91J1paFbyG45gpDWdTu9tKDxbiTDWYkOAxytNVF4oHVVgTCBV/8+lWdjj/6ldjN3eb+sEd9PKJBjm0kmCxvcw==", - "dev": true, - "requires": { - "async": "2.6.0", - "gcp-metadata": "0.3.1", - "google-auth-library": "0.12.0", - "request": "2.85.0" - } - }, - "google-p12-pem": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-0.1.2.tgz", - "integrity": "sha1-M8RqsCGqc0+gMys5YKmj/8svMXc=", - "dev": true, - "requires": { - "node-forge": "0.7.4" - } - }, - "gtoken": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-1.2.3.tgz", - "integrity": "sha512-wQAJflfoqSgMWrSBk9Fg86q+sd6s7y6uJhIvvIPz++RElGlMtEqsdAR2oWwZ/WTEtp7P9xFbJRrT976oRgzJ/w==", - "dev": true, - "requires": { - "google-p12-pem": "0.1.2", - "jws": "3.1.4", - "mime": "1.6.0", - "request": "2.85.0" - } - }, - "log-driver": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", - "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=", - "dev": true - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - } } }, "@google-cloud/common": { @@ -204,7 +108,7 @@ "duplexify": "3.5.4", "ent": "2.2.0", "extend": "3.0.1", - "google-auto-auth": "0.10.0", + "google-auto-auth": "0.10.1", "is": "3.2.1", "log-driver": "1.2.7", "methmeth": "1.1.0", @@ -212,69 +116,31 @@ "request": "2.85.0", "retry-request": "3.3.1", "split-array-stream": "1.0.3", - "stream-events": "1.0.2", + "stream-events": "1.0.4", "string-format-obj": "1.1.1", "through2": "2.0.3" } }, "@google-cloud/common-grpc": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.6.0.tgz", - "integrity": "sha512-b5i2auMeP+kPPPpWtZVgjbbbIB+3uDGw+Vww1QjG0SEQlahcGrwkCEaNLQit1R77m8ibxs+sTVa+AH/FNILAdQ==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.6.1.tgz", + "integrity": "sha512-pspOZVfmrCTP0svTNwFE8nYJsQp5rTUaeUpJwpgslDk5tDWFbYT3dZkANbiURcTSq0mo6hZmd+M5rPIzWMVUmA==", "requires": { - "@google-cloud/common": "0.16.2", + "@google-cloud/common": "0.17.0", "dot-prop": "4.2.0", "duplexify": "3.5.4", "extend": "3.0.1", - "grpc": "1.9.1", + "grpc": "1.11.0", "is": "3.2.1", "modelo": "4.2.3", "retry-request": "3.3.1", "through2": "2.0.3" - }, - "dependencies": { - "@google-cloud/common": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.2.tgz", - "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", - "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.5.4", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.9.7", - "is": "3.2.1", - "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.85.0", - "retry-request": "3.3.1", - "split-array-stream": "1.0.3", - "stream-events": "1.0.2", - "string-format-obj": "1.1.1", - "through2": "2.0.3" - } - }, - "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", - "requires": { - "async": "2.6.0", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", - "request": "2.85.0" - } - } } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.2.4.tgz", - "integrity": "sha512-yHxW7JvhnqgoIftv6dAn1r/9AEcPuumD0xXggdYHmDeyf38OMYyjTk92gP9vflTOee1JhM0vOarwGrlKYUbmnQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.0.tgz", + "integrity": "sha512-c8dIGESnNkmM88duFxGHvMQP5QKPgp/sfJq0QhC6+gOcJC7/PKjqd0PkmgPPeIgVl6SXy5Zf/KLbxnJUVgNT1Q==", "dev": true, "requires": { "ava": "0.25.0", @@ -285,6 +151,7 @@ "lodash": "4.17.5", "nyc": "11.4.1", "proxyquire": "1.8.0", + "semver": "5.5.0", "sinon": "4.3.0", "string": "3.3.3", "supertest": "3.0.0", @@ -299,9 +166,9 @@ "dev": true }, "cliui": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", - "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { "string-width": "2.1.1", @@ -315,6 +182,12 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "dev": true + }, "nyc": { "version": "11.4.1", "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", @@ -1956,7 +1829,7 @@ "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "dev": true, "requires": { - "cliui": "4.0.0", + "cliui": "4.1.0", "decamelize": "1.2.0", "find-up": "2.1.0", "get-caller-file": "1.0.2", @@ -1973,9 +1846,9 @@ } }, "@google-cloud/pubsub": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-0.17.0.tgz", - "integrity": "sha512-eJ0ApkPIRKaR+kswCkLK9n97dPBFoLRVjfuqhWMl90mo0InHpyXDddgESZnmr0goQ9fJmj0GE6s7YIXdxVWHrg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-0.18.0.tgz", + "integrity": "sha512-5on1I+x6jr8/cbqAO6N1GINRA81QlpzdXnonQvTkJrTz5b5FU0f4j7Ea9bdRNV5q/ShsdcIagCAO+0vL2l7thA==", "dev": true, "requires": { "@google-cloud/common": "0.16.2", @@ -1985,7 +1858,7 @@ "duplexify": "3.5.4", "extend": "3.0.1", "google-auto-auth": "0.9.7", - "google-gax": "0.16.0", + "google-gax": "0.16.1", "google-proto-files": "0.15.1", "is": "3.2.1", "lodash.chunk": "4.2.0", @@ -2017,7 +1890,7 @@ "request": "2.85.0", "retry-request": "3.3.1", "split-array-stream": "1.0.3", - "stream-events": "1.0.2", + "stream-events": "1.0.4", "string-format-obj": "1.1.1", "through2": "2.0.3" } @@ -2030,7 +1903,7 @@ "requires": { "async": "2.6.0", "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", + "google-auth-library": "1.4.0", "request": "2.85.0" } } @@ -2053,14 +1926,14 @@ "gcs-resumable-upload": "0.9.0", "hash-stream-validation": "0.2.1", "is": "3.2.1", - "mime": "2.2.0", + "mime": "2.3.1", "mime-types": "2.1.18", "once": "1.4.0", "pumpify": "1.4.0", "request": "2.85.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "snakeize": "0.1.0", - "stream-events": "1.0.2", + "stream-events": "1.0.4", "string-format-obj": "1.1.1", "through2": "2.0.3" }, @@ -2086,7 +1959,7 @@ "request": "2.85.0", "retry-request": "3.3.1", "split-array-stream": "1.0.3", - "stream-events": "1.0.2", + "stream-events": "1.0.4", "string-format-obj": "1.1.1", "through2": "2.0.3" } @@ -2099,7 +1972,7 @@ "requires": { "async": "2.6.0", "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", + "google-auth-library": "1.4.0", "request": "2.85.0" } } @@ -2235,9 +2108,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.9.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", - "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==" + "version": "8.10.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.11.tgz", + "integrity": "sha512-FM7tvbjbn2BUzM/Qsdk9LUGq3zeh7li8NcHoS398dBzqLzfmSqSP1+yKbMRTCcZzLcu2JAR5lq3IKIEYkto7iQ==" }, "acorn": { "version": "4.0.13", @@ -2354,9 +2227,9 @@ } }, "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, "ansi-regex": { @@ -2585,7 +2458,7 @@ "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "async-each": { @@ -2600,9 +2473,9 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", - "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "auto-bind": { "version": "1.2.0", @@ -2621,7 +2494,7 @@ "@ava/write-file-atomic": "2.2.0", "@concordance/react": "1.0.0", "@ladjs/time-require": "0.1.4", - "ansi-escapes": "3.0.0", + "ansi-escapes": "3.1.0", "ansi-styles": "3.2.1", "arr-flatten": "1.1.0", "array-union": "1.0.2", @@ -2629,17 +2502,17 @@ "arrify": "1.0.1", "auto-bind": "1.2.0", "ava-init": "0.2.1", - "babel-core": "6.26.0", + "babel-core": "6.26.3", "babel-generator": "6.26.1", "babel-plugin-syntax-object-rest-spread": "6.13.0", "bluebird": "3.5.1", "caching-transform": "1.0.1", - "chalk": "2.3.2", + "chalk": "2.4.1", "chokidar": "1.7.0", "clean-stack": "1.3.0", "clean-yaml-object": "0.1.0", "cli-cursor": "2.1.0", - "cli-spinners": "1.1.0", + "cli-spinners": "1.3.1", "cli-truncate": "1.1.0", "co-with-promise": "4.6.0", "code-excerpt": "2.1.1", @@ -2687,18 +2560,18 @@ "pretty-ms": "3.1.0", "require-precompiled": "0.1.0", "resolve-cwd": "2.0.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "semver": "5.5.0", "slash": "1.0.0", - "source-map-support": "0.5.4", + "source-map-support": "0.5.5", "stack-utils": "1.0.1", "strip-ansi": "4.0.0", "strip-bom-buf": "1.0.0", "supertap": "1.0.0", - "supports-color": "5.3.0", + "supports-color": "5.4.0", "trim-off-newlines": "1.0.1", "unique-temp-dir": "1.0.0", - "update-notifier": "2.3.0" + "update-notifier": "2.5.0" }, "dependencies": { "ansi-regex": { @@ -2771,9 +2644,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" }, "axios": { "version": "0.18.0", @@ -2823,9 +2696,9 @@ } }, "babel-core": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", - "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { "babel-code-frame": "6.26.0", @@ -2841,7 +2714,7 @@ "convert-source-map": "1.5.1", "debug": "2.6.9", "json5": "0.5.1", - "lodash": "4.17.5", + "lodash": "4.17.10", "minimatch": "3.0.4", "path-is-absolute": "1.0.1", "private": "0.1.8", @@ -2871,7 +2744,7 @@ "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "source-map": "0.5.7", "trim-right": "1.0.1" }, @@ -2959,7 +2832,7 @@ "requires": { "babel-runtime": "6.26.0", "babel-types": "6.26.0", - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "babel-helper-remap-async-to-generator": { @@ -3012,7 +2885,7 @@ "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.3", + "core-js": "2.5.5", "espower-location-detector": "1.0.0", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3074,9 +2947,9 @@ } }, "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", - "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { "babel-plugin-transform-strict-mode": "6.24.1", @@ -3157,11 +3030,11 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "6.26.0", + "babel-core": "6.26.3", "babel-runtime": "6.26.0", - "core-js": "2.5.3", + "core-js": "2.5.5", "home-or-tmp": "2.0.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "mkdirp": "0.5.1", "source-map-support": "0.4.18" }, @@ -3183,7 +3056,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "regenerator-runtime": "0.11.1" } }, @@ -3197,7 +3070,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "babel-traverse": { @@ -3214,7 +3087,7 @@ "debug": "2.6.9", "globals": "9.18.0", "invariant": "2.2.4", - "lodash": "4.17.5" + "lodash": "4.17.10" }, "dependencies": { "debug": { @@ -3236,7 +3109,7 @@ "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", - "lodash": "4.17.5", + "lodash": "4.17.10", "to-fast-properties": "1.0.3" } }, @@ -3272,6 +3145,32 @@ "requires": { "is-descriptor": "1.0.2" } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } } } }, @@ -3317,7 +3216,7 @@ "requires": { "ansi-align": "2.0.0", "camelcase": "4.1.0", - "chalk": "2.3.2", + "chalk": "2.4.1", "cli-boxes": "1.0.0", "string-width": "2.1.1", "term-size": "1.2.0", @@ -3373,17 +3272,15 @@ } }, "braces": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", - "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { "arr-flatten": "1.1.0", "array-unique": "0.3.2", - "define-property": "1.0.0", "extend-shallow": "2.0.1", "fill-range": "4.0.0", "isobject": "3.0.1", - "kind-of": "6.0.2", "repeat-element": "1.1.2", "snapdragon": "0.8.2", "snapdragon-node": "2.1.1", @@ -3391,14 +3288,6 @@ "to-regex": "3.0.2" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -3480,6 +3369,14 @@ "lowercase-keys": "1.0.0", "normalize-url": "2.0.1", "responselike": "1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + } } }, "caching-transform": { @@ -3521,7 +3418,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "deep-equal": "1.0.1", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3606,14 +3503,14 @@ } }, "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" + "supports-color": "5.4.0" } }, "chardet": { @@ -3630,7 +3527,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.3", + "fsevents": "1.2.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -3695,57 +3592,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -3777,9 +3623,9 @@ } }, "cli-spinners": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.1.0.tgz", - "integrity": "sha1-8YR7FohE2RemceudFH499JfJDQY=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz", + "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==", "dev": true }, "cli-truncate": { @@ -3879,163 +3725,14 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.0.tgz", - "integrity": "sha1-wnO4xPEpRXI+jcnSWAPYk0Pl8o4=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.1.tgz", + "integrity": "sha512-0TjnXrbvcPzAkRPv/Y5D8aZju/M5adkFxShRyMMgDReB8EV9nF4XMERXs6ajgLA1di9LUFW2tgePDQd2JPWy7g==", "dev": true, "requires": { "argv": "0.0.2", - "request": "2.81.0", + "request": "2.85.0", "urlgrey": "0.4.4" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.14.1" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - } } }, "collection-visit": { @@ -4125,7 +3822,7 @@ "requires": { "buffer-from": "1.0.0", "inherits": "2.0.3", - "readable-stream": "2.3.5", + "readable-stream": "2.3.6", "typedarray": "0.0.6" } }, @@ -4160,9 +3857,9 @@ } }, "configstore": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", - "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { "dot-prop": "4.2.0", @@ -4207,9 +3904,9 @@ } }, "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", + "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" }, "core-util-is": { "version": "1.0.2", @@ -4274,7 +3971,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "d64": { @@ -4330,9 +4027,9 @@ "dev": true }, "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "dev": true }, "deep-is": { @@ -4357,6 +4054,34 @@ "requires": { "is-descriptor": "1.0.2", "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } } }, "del": { @@ -4527,7 +4252,7 @@ "requires": { "end-of-stream": "1.4.1", "inherits": "2.0.3", - "readable-stream": "2.3.5", + "readable-stream": "2.3.6", "stream-shift": "1.0.0" } }, @@ -4551,7 +4276,7 @@ "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", "requires": { "base64url": "2.0.0", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "empower": { @@ -4559,14 +4284,14 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "empower-core": "0.6.2" } }, "empower-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.0.1.tgz", - "integrity": "sha1-MeMQq8BluqfDoEh+a+W7zGXzwd4=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.1.0.tgz", + "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { "estraverse": "4.2.0" @@ -4578,7 +4303,7 @@ "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.3" + "core-js": "2.5.5" } }, "end-of-stream": { @@ -4616,9 +4341,9 @@ } }, "es5-ext": { - "version": "0.10.41", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.41.tgz", - "integrity": "sha512-MYK02wXfwTMie5TEJWPolgOsXEmz7wKCQaGzgmRjZOoV6VLG8I5dSv2bn6AOClXhK64gnSQTQ9W9MKvx87J4gw==", + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", "dev": true, "requires": { "es6-iterator": "2.0.3", @@ -4639,7 +4364,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-symbol": "3.1.1" } }, @@ -4650,7 +4375,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-iterator": "2.0.3", "es6-set": "0.1.5", "es6-symbol": "3.1.1", @@ -4664,7 +4389,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1", "event-emitter": "0.3.5" @@ -4677,7 +4402,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "es6-weak-map": { @@ -4687,7 +4412,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1" } @@ -4764,7 +4489,7 @@ "requires": { "ajv": "5.5.2", "babel-code-frame": "6.26.0", - "chalk": "2.3.2", + "chalk": "2.4.1", "concat-stream": "1.6.2", "cross-spawn": "5.1.0", "debug": "3.1.0", @@ -4772,20 +4497,20 @@ "eslint-scope": "3.7.1", "eslint-visitor-keys": "1.0.0", "espree": "3.5.4", - "esquery": "1.0.0", + "esquery": "1.0.1", "esutils": "2.0.2", "file-entry-cache": "2.0.0", "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "11.3.0", - "ignore": "3.3.7", + "globals": "11.5.0", + "ignore": "3.3.8", "imurmurhash": "0.1.4", "inquirer": "3.3.0", "is-resolvable": "1.1.0", "js-yaml": "3.11.0", "json-stable-stringify-without-jsonify": "1.0.1", "levn": "0.3.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "minimatch": "3.0.4", "mkdirp": "0.5.1", "natural-compare": "1.4.0", @@ -4793,7 +4518,7 @@ "path-is-inside": "1.0.2", "pluralize": "7.0.0", "progress": "2.0.0", - "regexpp": "1.0.1", + "regexpp": "1.1.0", "require-uncached": "1.0.3", "semver": "5.5.0", "strip-ansi": "4.0.0", @@ -4809,9 +4534,9 @@ "dev": true }, "globals": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", - "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", + "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", "dev": true }, "strip-ansi": { @@ -4848,16 +4573,16 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "3.3.7", + "ignore": "3.3.8", "minimatch": "3.0.4", - "resolve": "1.6.0", + "resolve": "1.7.1", "semver": "5.5.0" }, "dependencies": { "resolve": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz", - "integrity": "sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { "path-parse": "1.0.5" @@ -4939,7 +4664,7 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "1.2.3", + "is-url": "1.2.4", "path-is-absolute": "1.0.1", "source-map": "0.5.7", "xtend": "4.0.1" @@ -4954,7 +4679,7 @@ "acorn": "5.5.3", "acorn-es7-plugin": "1.1.7", "convert-source-map": "1.5.1", - "empower-assert": "1.0.1", + "empower-assert": "1.1.0", "escodegen": "1.9.1", "espower": "2.1.0", "estraverse": "4.2.0", @@ -5001,13 +4726,13 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", "requires": { - "core-js": "2.5.3" + "core-js": "2.5.5" } }, "esquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { "estraverse": "4.2.0" @@ -5040,7 +4765,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "eventid": { @@ -5104,57 +4829,6 @@ "requires": { "is-extendable": "0.1.1" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -5234,13 +4908,13 @@ } }, "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.19", + "iconv-lite": "0.4.21", "tmp": "0.0.33" } }, @@ -5274,6 +4948,32 @@ "requires": { "is-extendable": "0.1.1" } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } } } }, @@ -5294,15 +4994,15 @@ "dev": true }, "fast-glob": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.0.tgz", - "integrity": "sha512-4F75PTznkNtSKs2pbhtBwRkw8sRwa7LfXx5XaQJOe4IQ6yTjceLDTwM5gj1s80R2t/5WeDC1gVfm3jLE+l39Tw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.1.tgz", + "integrity": "sha512-wSyW1TBK3ia5V+te0rGPXudeMHoUQW6O5Y9oATiaGhpENmEifPDlOdhpsnlj5HoG6ttIvGiY1DdCmI9X2xGMhg==", "requires": { "@mrmlnc/readdir-enhanced": "2.2.1", "glob-parent": "3.1.0", "is-glob": "4.0.0", "merge2": "1.2.1", - "micromatch": "3.1.9" + "micromatch": "3.1.10" } }, "fast-json-stable-stringify": { @@ -5473,7 +5173,7 @@ "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.5" + "readable-stream": "2.3.6" } }, "fs-extra": { @@ -5493,39 +5193,29 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", - "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", + "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", "dev": true, "optional": true, "requires": { "nan": "2.10.0", - "node-pre-gyp": "0.6.39" + "node-pre-gyp": "0.9.1" }, "dependencies": { "abbrev": { - "version": "1.1.0", + "version": "1.1.1", "bundled": true, "dev": true, "optional": true }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, "ansi-regex": { "version": "2.1.1", "bundled": true, "dev": true }, "aproba": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "dev": true, "optional": true @@ -5537,243 +5227,91 @@ "optional": true, "requires": { "delegates": "1.0.0", - "readable-stream": "2.2.9" + "readable-stream": "2.3.6" } }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", + "balanced-match": { + "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "asynckit": { - "version": "0.4.0", + "brace-expansion": { + "version": "1.1.11", "bundled": true, "dev": true, - "optional": true + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } }, - "aws-sign2": { - "version": "0.6.0", + "chownr": { + "version": "1.0.1", "bundled": true, "dev": true, "optional": true }, - "aws4": { - "version": "1.6.0", + "code-point-at": { + "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "balanced-match": { - "version": "0.4.2", + "concat-map": { + "version": "0.0.1", "bundled": true, "dev": true }, - "bcrypt-pbkdf": { - "version": "1.0.1", + "console-control-strings": { + "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } + "dev": true }, - "block-stream": { - "version": "0.0.9", + "core-util-is": { + "version": "1.0.2", "bundled": true, "dev": true, - "requires": { - "inherits": "2.0.3" - } + "optional": true }, - "boom": { - "version": "2.10.1", + "debug": { + "version": "2.6.9", "bundled": true, "dev": true, + "optional": true, "requires": { - "hoek": "2.16.3" + "ms": "2.0.0" } }, - "brace-expansion": { - "version": "1.1.7", + "deep-extend": { + "version": "0.4.2", "bundled": true, "dev": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } + "optional": true }, - "buffer-shims": { + "delegates": { "version": "1.0.0", "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, "dev": true, "optional": true }, - "co": { - "version": "4.6.0", + "detect-libc": { + "version": "1.0.3", "bundled": true, "dev": true, "optional": true }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "combined-stream": { - "version": "1.0.5", + "fs-minipass": { + "version": "1.2.5", "bundled": true, "dev": true, + "optional": true, "requires": { - "delayed-stream": "1.0.0" + "minipass": "2.2.4" } }, - "concat-map": { - "version": "0.0.1", + "fs.realpath": { + "version": "1.0.0", "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } + "dev": true, + "optional": true }, "gauge": { "version": "2.7.4", @@ -5781,7 +5319,7 @@ "dev": true, "optional": true, "requires": { - "aproba": "1.1.1", + "aproba": "1.2.0", "console-control-strings": "1.1.0", "has-unicode": "2.0.1", "object-assign": "4.1.1", @@ -5791,27 +5329,11 @@ "wide-align": "1.1.2" } }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, "glob": { "version": "7.1.2", "bundled": true, "dev": true, + "optional": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -5821,64 +5343,35 @@ "path-is-absolute": "1.0.1" } }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, "has-unicode": { "version": "2.0.1", "bundled": true, "dev": true, "optional": true }, - "hawk": { - "version": "3.1.3", + "iconv-lite": { + "version": "0.4.21", "bundled": true, "dev": true, + "optional": true, "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "safer-buffer": "2.1.2" } }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, - "http-signature": { - "version": "1.1.1", + "ignore-walk": { + "version": "3.0.1", "bundled": true, "dev": true, "optional": true, "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" + "minimatch": "3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "dev": true, + "optional": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -5890,7 +5383,7 @@ "dev": true }, "ini": { - "version": "1.3.4", + "version": "1.3.5", "bundled": true, "dev": true, "optional": true @@ -5903,111 +5396,43 @@ "number-is-nan": "1.0.1" } }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, "isarray": { "version": "1.0.0", "bundled": true, - "dev": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, "dev": true, "optional": true }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", + "minimatch": { + "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } + "brace-expansion": "1.1.11" } }, - "mime-db": { - "version": "1.27.0", + "minimist": { + "version": "0.0.8", "bundled": true, "dev": true }, - "mime-types": { - "version": "2.1.15", + "minipass": { + "version": "2.2.4", "bundled": true, "dev": true, "requires": { - "mime-db": "1.27.0" + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, - "minimatch": { - "version": "3.0.4", + "minizlib": { + "version": "1.1.0", "bundled": true, "dev": true, + "optional": true, "requires": { - "brace-expansion": "1.1.7" + "minipass": "2.2.4" } }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, "mkdirp": { "version": "0.5.1", "bundled": true, @@ -6022,23 +5447,33 @@ "dev": true, "optional": true }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" + } + }, "node-pre-gyp": { - "version": "0.6.39", + "version": "0.9.1", "bundled": true, "dev": true, "optional": true, "requires": { - "detect-libc": "1.0.2", - "hawk": "3.1.3", + "detect-libc": "1.0.3", "mkdirp": "0.5.1", + "needle": "2.2.0", "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.6", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" } }, "nopt": { @@ -6047,12 +5482,28 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { - "version": "4.1.0", + "version": "4.1.2", "bundled": true, "dev": true, "optional": true, @@ -6068,12 +5519,6 @@ "bundled": true, "dev": true }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "optional": true - }, "object-assign": { "version": "4.1.1", "bundled": true, @@ -6101,7 +5546,7 @@ "optional": true }, "osenv": { - "version": "0.1.4", + "version": "0.1.5", "bundled": true, "dev": true, "optional": true, @@ -6113,39 +5558,23 @@ "path-is-absolute": { "version": "1.0.1", "bundled": true, - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, "dev": true, "optional": true }, "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", + "version": "2.0.0", "bundled": true, "dev": true, "optional": true }, "rc": { - "version": "1.2.1", + "version": "1.2.6", "bundled": true, "dev": true, "optional": true, "requires": { "deep-extend": "0.4.2", - "ini": "1.3.4", + "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" }, @@ -6159,112 +5588,63 @@ } }, "readable-stream": { - "version": "2.2.9", + "version": "2.3.6", "bundled": true, "dev": true, + "optional": true, "requires": { - "buffer-shims": "1.0.0", "core-util-is": "1.0.2", "inherits": "2.0.3", "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, "rimraf": { - "version": "2.6.1", + "version": "2.6.2", "bundled": true, "dev": true, + "optional": true, "requires": { "glob": "7.1.2" } }, "safe-buffer": { - "version": "5.0.1", + "version": "5.1.1", "bundled": true, "dev": true }, - "semver": { - "version": "5.3.0", + "safer-buffer": { + "version": "2.1.2", "bundled": true, "dev": true, "optional": true }, - "set-blocking": { - "version": "2.0.0", + "sax": { + "version": "1.2.4", "bundled": true, "dev": true, "optional": true }, - "signal-exit": { - "version": "3.0.2", + "semver": { + "version": "5.5.0", "bundled": true, "dev": true, "optional": true }, - "sntp": { - "version": "1.0.9", + "set-blocking": { + "version": "2.0.0", "bundled": true, "dev": true, - "requires": { - "hoek": "2.16.3" - } + "optional": true }, - "sshpk": { - "version": "1.13.0", + "signal-exit": { + "version": "3.0.2", "bundled": true, "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } + "optional": true }, "string-width": { "version": "1.0.2", @@ -6277,19 +5657,14 @@ } }, "string_decoder": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "dev": true, + "optional": true, "requires": { - "safe-buffer": "5.0.1" + "safe-buffer": "5.1.1" } }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true, - "optional": true - }, "strip-ansi": { "version": "3.0.1", "bundled": true, @@ -6305,81 +5680,26 @@ "optional": true }, "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", + "version": "4.4.1", "bundled": true, "dev": true, "optional": true, "requires": { - "safe-buffer": "5.0.1" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true, - "optional": true - }, "util-deprecate": { "version": "1.0.2", "bundled": true, - "dev": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, "dev": true, "optional": true }, - "verror": { - "version": "1.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, "wide-align": { "version": "1.1.2", "bundled": true, @@ -6393,6 +5713,11 @@ "version": "1.0.2", "bundled": true, "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true } } }, @@ -6425,11 +5750,11 @@ "dev": true, "requires": { "buffer-equal": "1.0.0", - "configstore": "3.1.1", + "configstore": "3.1.2", "google-auto-auth": "0.9.7", "pumpify": "1.4.0", "request": "2.85.0", - "stream-events": "1.0.2", + "stream-events": "1.0.4", "through2": "2.0.3" }, "dependencies": { @@ -6441,7 +5766,7 @@ "requires": { "async": "2.6.0", "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", + "google-auth-library": "1.4.0", "request": "2.85.0" } } @@ -6579,21 +5904,21 @@ "requires": { "array-union": "1.0.2", "dir-glob": "2.0.0", - "fast-glob": "2.2.0", + "fast-glob": "2.2.1", "glob": "7.1.2", - "ignore": "3.3.7", + "ignore": "3.3.8", "pify": "3.0.0", "slash": "1.0.0" } }, "google-auth-library": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.3.2.tgz", - "integrity": "sha512-aRz0om4Bs85uyR2Ousk3Gb8Nffx2Sr2RoKts1smg1MhRwrehE1aD1HC4RmprNt1HVJ88IDnQ8biJQ/aXjiIxlQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.4.0.tgz", + "integrity": "sha512-vWRx6pJulK7Y5V/Xyr7MPMlx2mWfmrUVbcffZ7hpq8ElFg5S8WY6PvjMovdcr6JfuAwwpAX4R0I1XOcyWuBcUw==", "requires": { "axios": "0.18.0", "gcp-metadata": "0.6.3", - "gtoken": "2.2.0", + "gtoken": "2.3.0", "jws": "3.1.4", "lodash.isstring": "4.0.1", "lru-cache": "4.1.2", @@ -6601,44 +5926,31 @@ } }, "google-auto-auth": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.0.tgz", - "integrity": "sha512-R6m473OqgZacPvlidJ0aownTlUWyLy654ugjKSXyi1ffIicXlXg3wMfse9T9zxqG6w01q6K1iG+b7dImMkVJ2Q==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", + "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "requires": { "async": "2.6.0", "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", + "google-auth-library": "1.4.0", "request": "2.85.0" } }, "google-gax": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.0.tgz", - "integrity": "sha512-sslPB7USGD8SrVUGlWFIGYVZrgZ6oj+fWUEW3f8Bk43+nxqeLyrNoI3iFBRpjLfwMCEYaXVziWNmatwLRP8azg==", - "requires": { - "duplexify": "3.5.4", - "extend": "3.0.1", - "globby": "8.0.1", - "google-auto-auth": "0.9.7", - "google-proto-files": "0.15.1", - "grpc": "1.9.1", - "is-stream-ended": "0.1.3", - "lodash": "4.17.5", - "protobufjs": "6.8.6", - "through2": "2.0.3" - }, - "dependencies": { - "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", - "requires": { - "async": "2.6.0", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", - "request": "2.85.0" - } - } + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", + "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", + "requires": { + "duplexify": "3.5.4", + "extend": "3.0.1", + "globby": "8.0.1", + "google-auto-auth": "0.10.1", + "google-proto-files": "0.15.1", + "grpc": "1.11.0", + "is-stream-ended": "0.1.4", + "lodash": "4.17.10", + "protobufjs": "6.8.6", + "through2": "2.0.3" } }, "google-p12-pem": { @@ -6646,7 +5958,7 @@ "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", "requires": { - "node-forge": "0.7.4", + "node-forge": "0.7.5", "pify": "3.0.0" } }, @@ -6656,7 +5968,7 @@ "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", "requires": { "globby": "7.1.1", - "power-assert": "1.4.4", + "power-assert": "1.5.0", "protobufjs": "6.8.6" }, "dependencies": { @@ -6668,7 +5980,7 @@ "array-union": "1.0.2", "dir-glob": "2.0.0", "glob": "7.1.2", - "ignore": "3.3.7", + "ignore": "3.3.8", "pify": "3.0.0", "slash": "1.0.0" } @@ -6689,12 +6001,12 @@ "into-stream": "3.1.0", "is-retry-allowed": "1.1.0", "isurl": "1.0.0", - "lowercase-keys": "1.0.0", + "lowercase-keys": "1.0.1", "mimic-response": "1.0.0", "p-cancelable": "0.3.0", "p-timeout": "2.0.1", "pify": "3.0.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "timed-out": "4.0.1", "url-parse-lax": "3.0.0", "url-to-options": "1.0.1" @@ -6730,13 +6042,13 @@ "dev": true }, "grpc": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.9.1.tgz", - "integrity": "sha512-WNW3MWMuAoo63AwIlzFE3T0KzzvNBSvOkg67Hm8WhvHNkXFBlIk1QyJRE3Ocm0O5eIwS7JU8Ssota53QR1zllg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.0.tgz", + "integrity": "sha512-pTJjV/eatBQ6Rhc/jWNmUW9jE8fPrhcMYSWDSyf4l7ah1U3sIe4eIjqI/a3sm0zKbM5CuovV0ESrc+b04kr4Ig==", "requires": { - "lodash": "4.17.5", + "lodash": "4.17.10", "nan": "2.10.0", - "node-pre-gyp": "0.6.39", + "node-pre-gyp": "0.7.0", "protobufjs": "5.0.2" }, "dependencies": { @@ -6745,11 +6057,13 @@ "bundled": true }, "ajv": { - "version": "4.11.8", + "version": "5.5.2", "bundled": true, "requires": { "co": "4.6.0", - "json-stable-stringify": "1.0.1" + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ansi-regex": { @@ -6765,7 +6079,7 @@ "bundled": true, "requires": { "delegates": "1.0.0", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "asn1": { @@ -6773,7 +6087,7 @@ "bundled": true }, "assert-plus": { - "version": "0.2.0", + "version": "1.0.0", "bundled": true }, "asynckit": { @@ -6781,11 +6095,11 @@ "bundled": true }, "aws-sign2": { - "version": "0.6.0", + "version": "0.7.0", "bundled": true }, "aws4": { - "version": "1.6.0", + "version": "1.7.0", "bundled": true }, "balanced-match": { @@ -6808,14 +6122,14 @@ } }, "boom": { - "version": "2.10.1", + "version": "4.3.1", "bundled": true, "requires": { - "hoek": "2.16.3" + "hoek": "4.2.1" } }, "brace-expansion": { - "version": "1.1.8", + "version": "1.1.11", "bundled": true, "requires": { "balanced-match": "1.0.0", @@ -6835,7 +6149,7 @@ "bundled": true }, "combined-stream": { - "version": "1.0.5", + "version": "1.0.6", "bundled": true, "requires": { "delayed-stream": "1.0.0" @@ -6854,10 +6168,19 @@ "bundled": true }, "cryptiles": { - "version": "2.0.5", + "version": "3.1.2", "bundled": true, "requires": { - "boom": "2.10.1" + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "bundled": true, + "requires": { + "hoek": "4.2.1" + } + } } }, "dashdash": { @@ -6865,12 +6188,6 @@ "bundled": true, "requires": { "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } } }, "debug": { @@ -6912,17 +6229,25 @@ "version": "1.3.0", "bundled": true }, + "fast-deep-equal": { + "version": "1.1.0", + "bundled": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "bundled": true + }, "forever-agent": { "version": "0.6.1", "bundled": true }, "form-data": { - "version": "2.1.4", + "version": "2.3.2", "bundled": true, "requires": { "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, "fs.realpath": { @@ -6967,12 +6292,6 @@ "bundled": true, "requires": { "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } } }, "glob": { @@ -6992,15 +6311,15 @@ "bundled": true }, "har-schema": { - "version": "1.0.5", + "version": "2.0.0", "bundled": true }, "har-validator": { - "version": "4.2.1", + "version": "5.0.3", "bundled": true, "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" + "ajv": "5.5.2", + "har-schema": "2.0.0" } }, "has-unicode": { @@ -7008,26 +6327,26 @@ "bundled": true }, "hawk": { - "version": "3.1.3", + "version": "6.0.2", "bundled": true, "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.1", + "sntp": "2.1.0" } }, "hoek": { - "version": "2.16.3", + "version": "4.2.1", "bundled": true }, "http-signature": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "requires": { - "assert-plus": "0.2.0", + "assert-plus": "1.0.0", "jsprim": "1.4.1", - "sshpk": "1.13.1" + "sshpk": "1.14.1" } }, "inflight": { @@ -7074,21 +6393,14 @@ "version": "0.2.3", "bundled": true }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "requires": { - "jsonify": "0.0.0" - } + "json-schema-traverse": { + "version": "0.3.1", + "bundled": true }, "json-stringify-safe": { "version": "5.0.1", "bundled": true }, - "jsonify": { - "version": "0.0.0", - "bundled": true - }, "jsprim": { "version": "1.4.1", "bundled": true, @@ -7097,34 +6409,28 @@ "extsprintf": "1.3.0", "json-schema": "0.2.3", "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } } }, "mime-db": { - "version": "1.30.0", + "version": "1.33.0", "bundled": true }, "mime-types": { - "version": "2.1.17", + "version": "2.1.18", "bundled": true, "requires": { - "mime-db": "1.30.0" + "mime-db": "1.33.0" } }, "minimatch": { "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "1.1.11" } }, "minimist": { - "version": "0.0.8", + "version": "1.2.0", "bundled": true }, "mkdirp": { @@ -7132,6 +6438,12 @@ "bundled": true, "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true + } } }, "ms": { @@ -7139,16 +6451,15 @@ "bundled": true }, "node-pre-gyp": { - "version": "0.6.39", + "version": "0.7.0", "bundled": true, "requires": { "detect-libc": "1.0.3", - "hawk": "3.1.3", "mkdirp": "0.5.1", "nopt": "4.0.1", "npmlog": "4.1.2", - "rc": "1.2.4", - "request": "2.81.0", + "rc": "1.2.6", + "request": "2.83.0", "rimraf": "2.6.2", "semver": "5.5.0", "tar": "2.2.1", @@ -7160,7 +6471,7 @@ "bundled": true, "requires": { "abbrev": "1.1.1", - "osenv": "0.1.4" + "osenv": "0.1.5" } }, "npmlog": { @@ -7201,7 +6512,7 @@ "bundled": true }, "osenv": { - "version": "0.1.4", + "version": "0.1.5", "bundled": true, "requires": { "os-homedir": "1.0.2", @@ -7213,11 +6524,11 @@ "bundled": true }, "performance-now": { - "version": "0.2.0", + "version": "2.1.0", "bundled": true }, "process-nextick-args": { - "version": "1.0.7", + "version": "2.0.0", "bundled": true }, "protobufjs": { @@ -7236,62 +6547,56 @@ "bundled": true }, "qs": { - "version": "6.4.0", + "version": "6.5.1", "bundled": true }, "rc": { - "version": "1.2.4", + "version": "1.2.6", "bundled": true, "requires": { "deep-extend": "0.4.2", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true - } } }, "readable-stream": { - "version": "2.3.3", + "version": "2.3.6", "bundled": true, "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", "isarray": "1.0.0", - "process-nextick-args": "1.0.7", + "process-nextick-args": "2.0.0", "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, "request": { - "version": "2.81.0", + "version": "2.83.0", "bundled": true, "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", + "aws-sign2": "0.7.0", + "aws4": "1.7.0", "caseless": "0.12.0", - "combined-stream": "1.0.5", + "combined-stream": "1.0.6", "extend": "3.0.1", "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", + "mime-types": "2.1.18", "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", + "performance-now": "2.1.0", + "qs": "6.5.1", "safe-buffer": "5.1.1", "stringstream": "0.0.5", - "tough-cookie": "2.3.3", + "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", "uuid": "3.2.1" } @@ -7320,14 +6625,14 @@ "bundled": true }, "sntp": { - "version": "1.0.9", + "version": "2.1.0", "bundled": true, "requires": { - "hoek": "2.16.3" + "hoek": "4.2.1" } }, "sshpk": { - "version": "1.13.1", + "version": "1.14.1", "bundled": true, "requires": { "asn1": "0.2.3", @@ -7338,12 +6643,6 @@ "getpass": "0.1.7", "jsbn": "0.1.1", "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } } }, "string-width": { @@ -7356,7 +6655,7 @@ } }, "string_decoder": { - "version": "1.0.3", + "version": "1.1.1", "bundled": true, "requires": { "safe-buffer": "5.1.1" @@ -7394,14 +6693,14 @@ "fstream": "1.0.11", "fstream-ignore": "1.0.5", "once": "1.4.0", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "rimraf": "2.6.2", "tar": "2.2.1", "uid-number": "0.0.6" } }, "tough-cookie": { - "version": "2.3.3", + "version": "2.3.4", "bundled": true, "requires": { "punycode": "1.4.1" @@ -7438,12 +6737,6 @@ "assert-plus": "1.0.0", "core-util-is": "1.0.2", "extsprintf": "1.3.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } } }, "wide-align": { @@ -7460,14 +6753,14 @@ } }, "gtoken": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.2.0.tgz", - "integrity": "sha512-tvQs8B1z5+I1FzMPZnq/OCuxTWFOkvy7cUJcpNdBOK2L7yEtPZTVCPtZU181sSDF+isUPebSqFTNTkIejFASAQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", + "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", "requires": { "axios": "0.18.0", "google-p12-pem": "1.0.2", "jws": "3.1.4", - "mime": "2.2.0", + "mime": "2.3.1", "pify": "3.0.0" } }, @@ -7643,7 +6936,7 @@ "domutils": "1.7.0", "entities": "1.1.1", "inherits": "2.0.3", - "readable-stream": "2.3.5" + "readable-stream": "2.3.6" } }, "http-cache-semantics": { @@ -7681,19 +6974,22 @@ "package-hash": "2.0.0", "pkg-dir": "2.0.0", "resolve-from": "3.0.0", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } }, "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", + "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==" }, "ignore-by-default": { "version": "1.0.1", @@ -7758,7 +7054,7 @@ "version": "git+https://github.com/docstrap/docstrap.git#0fff6c83ab7f9154b27c0996b775f1639037df9b", "dev": true, "requires": { - "moment": "2.21.0", + "moment": "2.22.1", "sanitize-html": "1.18.2" } }, @@ -7768,13 +7064,13 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.3.2", + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", "cli-cursor": "2.1.0", "cli-width": "2.2.0", - "external-editor": "2.1.0", + "external-editor": "2.2.0", "figures": "2.0.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "mute-stream": "0.0.7", "run-async": "2.3.0", "rx-lite": "4.0.8", @@ -7862,11 +7158,21 @@ "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=" }, "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "6.0.2" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, "is-arrayish": { @@ -7908,21 +7214,38 @@ } }, "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "6.0.2" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } } }, "is-dotfile": { @@ -8137,9 +7460,9 @@ "dev": true }, "is-stream-ended": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.3.tgz", - "integrity": "sha1-oEc7Jnx1ZjVIa+7cfjNE5UnRUqw=" + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", + "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" }, "is-typedarray": { "version": "1.0.0", @@ -8147,9 +7470,9 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-url": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.3.tgz", - "integrity": "sha512-vmOHLvzbcnsdFz8wQPXj1lgI5SE8AUlUGMenzuZzRFjoReb1WB+pLt9GrIo7BTker+aTcwrjTDle7odioWeqyw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", "dev": true }, "is-utf8": { @@ -8249,7 +7572,7 @@ "escape-string-regexp": "1.0.5", "js2xmlparser": "3.0.0", "klaw": "2.0.0", - "marked": "0.3.17", + "marked": "0.3.19", "mkdirp": "0.5.1", "requizzle": "0.2.1", "strip-json-comments": "2.0.1", @@ -8278,9 +7601,9 @@ "dev": true }, "json-parse-better-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", - "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, "json-schema": { @@ -8293,15 +7616,6 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "0.0.0" - } - }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -8328,12 +7642,6 @@ "graceful-fs": "4.1.11" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -8359,7 +7667,7 @@ "base64url": "2.0.0", "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.9", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "jws": { @@ -8369,7 +7677,7 @@ "requires": { "base64url": "2.0.0", "jwa": "1.1.5", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "keyv": { @@ -8469,9 +7777,9 @@ } }, "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" }, "lodash.chunk": { "version": "4.2.0", @@ -8603,9 +7911,9 @@ } }, "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, "lru-cache": { @@ -8645,9 +7953,9 @@ } }, "marked": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.17.tgz", - "integrity": "sha512-+AKbNsjZl6jFfLPwHhWmGTqE009wTKn3RTmn9K8oUKHrX/abPJjtcRtXpYB/FFrwPJRUA86LX/de3T0knkPCmQ==", + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", "dev": true }, "matcher": { @@ -8841,13 +8149,13 @@ "dev": true }, "micromatch": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", - "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", - "braces": "2.3.1", + "braces": "2.3.2", "define-property": "2.0.2", "extend-shallow": "3.0.2", "extglob": "2.0.4", @@ -8861,9 +8169,9 @@ } }, "mime": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", - "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" }, "mime-db": { "version": "1.33.0", @@ -8933,9 +8241,9 @@ } }, "mocha": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.4.tgz", - "integrity": "sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.1.1.tgz", + "integrity": "sha512-kKKs/H1KrMMQIEsWNxGmb4/BGsmj0dkeyotEvbrAuQ01FcWRLssUNXCEUZk6SZtyJBi6EE7SL0zDDtItw1rGhw==", "dev": true, "requires": { "browser-stdout": "1.3.1", @@ -8946,6 +8254,7 @@ "glob": "7.1.2", "growl": "1.10.3", "he": "1.1.1", + "minimatch": "3.0.4", "mkdirp": "0.5.1", "supports-color": "4.4.0" }, @@ -8973,9 +8282,9 @@ "dev": true }, "moment": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", - "integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ==", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", + "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==", "dev": true }, "ms": { @@ -9058,9 +8367,9 @@ "dev": true }, "nise": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.2.tgz", - "integrity": "sha512-KPKb+wvETBiwb4eTwtR/OsA2+iijXP+VnlSFYJo3EHjm2yjek1NWxHOUQat3i7xNLm1Bm18UA5j5Wor0yO2GtA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.3.tgz", + "integrity": "sha512-v1J/FLUB9PfGqZLGDBhQqODkbLotP0WtLo9R4EJY2PPu5f5Xg4o0rA8FDlmrjFSv9vBBKcfnOSpfYYuu5RTHqg==", "dev": true, "requires": { "@sinonjs/formatio": "2.0.0", @@ -9071,9 +8380,9 @@ } }, "node-forge": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.4.tgz", - "integrity": "sha512-8Df0906+tq/omxuCZD6PqhPaQDYuyJ1d+VITgxoIA8zvQd1ru+nMJcDChHH324MWitIgbVkAkQoGEEVJNpn/PA==" + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", + "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" }, "normalize-package-data": { "version": "2.4.0", @@ -9130,9 +8439,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "11.6.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.6.0.tgz", - "integrity": "sha512-ZaXCh0wmbk2aSBH2B5hZGGvK2s9aM8DIm2rVY+BG3Fx8tUS+bpJSswUVZqOD1YfCmnYRFSqgYJSr7UeeUcW0jg==", + "version": "11.7.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.1.tgz", + "integrity": "sha512-EGePURSKUEpS1jWnEKAMhY+GWZzi7JC+f8iBDOATaOsLZW5hM/9eYx2dHGaEXa1ITvMm44CJugMksvP3NwMQMw==", "dev": true, "requires": { "archy": "1.0.0", @@ -9150,7 +8459,7 @@ "istanbul-lib-instrument": "1.10.1", "istanbul-lib-report": "1.1.3", "istanbul-lib-source-maps": "1.2.3", - "istanbul-reports": "1.3.0", + "istanbul-reports": "1.4.0", "md5-hex": "1.3.0", "merge-source-map": "1.1.0", "micromatch": "2.3.11", @@ -9241,7 +8550,7 @@ "dev": true }, "atob": { - "version": "2.0.3", + "version": "2.1.0", "bundled": true, "dev": true }, @@ -9283,7 +8592,7 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "regenerator-runtime": "0.11.1" } }, @@ -9311,7 +8620,7 @@ "babylon": "6.18.0", "debug": "2.6.9", "globals": "9.18.0", - "invariant": "2.2.3", + "invariant": "2.2.4", "lodash": "4.17.5" } }, @@ -9358,10 +8667,41 @@ "is-descriptor": "1.0.2" } }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, "isobject": { "version": "3.0.1", "bundled": true, "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true } } }, @@ -9447,83 +8787,32 @@ "escape-string-regexp": "1.0.5", "has-ansi": "2.0.0", "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "class-utils": { - "version": "0.3.6", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "0.1.6" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", + "supports-color": "2.0.0" + } + }, + "class-utils": { + "version": "0.3.6", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-descriptor": "0.1.6" } }, "isobject": { "version": "3.0.1", "bundled": true, "dev": true - }, - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true } } }, @@ -9586,7 +8875,7 @@ "dev": true }, "core-js": { - "version": "2.5.3", + "version": "2.5.5", "bundled": true, "dev": true }, @@ -9639,10 +8928,41 @@ "isobject": "3.0.1" }, "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, "isobject": { "version": "3.0.1", "bundled": true, "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true } } }, @@ -9979,7 +9299,7 @@ "dev": true }, "invariant": { - "version": "2.2.3", + "version": "2.2.4", "bundled": true, "dev": true, "requires": { @@ -9992,18 +9312,11 @@ "dev": true }, "is-accessor-descriptor": { - "version": "1.0.0", + "version": "0.1.6", "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } + "kind-of": "3.2.2" } }, "is-arrayish": { @@ -10025,32 +9338,25 @@ } }, "is-data-descriptor": { - "version": "1.0.0", + "version": "0.1.4", "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } + "kind-of": "3.2.2" } }, "is-descriptor": { - "version": "1.0.2", + "version": "0.1.6", "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { - "version": "6.0.2", + "version": "5.1.0", "bundled": true, "dev": true } @@ -10252,7 +9558,7 @@ } }, "istanbul-reports": { - "version": "1.3.0", + "version": "1.4.0", "bundled": true, "dev": true, "requires": { @@ -10555,39 +9861,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } } } }, @@ -11043,57 +10316,6 @@ "requires": { "is-extendable": "0.1.1" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true } } }, @@ -11115,10 +10337,41 @@ "is-descriptor": "1.0.2" } }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, "isobject": { "version": "3.0.1", "bundled": true, "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true } } }, @@ -11140,7 +10393,7 @@ "bundled": true, "dev": true, "requires": { - "atob": "2.0.3", + "atob": "2.1.0", "decode-uri-component": "0.2.0", "resolve-url": "0.2.1", "source-map-url": "0.4.0", @@ -11181,93 +10434,42 @@ }, "spdx-expression-parse": { "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "split-string": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "3.0.2" - } - }, - "static-extend": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "0.1.6" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "split-string": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "3.0.2" + } + }, + "static-extend": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-descriptor": "0.1.6" } - }, - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true } } }, @@ -11327,7 +10529,7 @@ "dev": true, "requires": { "arrify": "1.0.1", - "micromatch": "3.1.9", + "micromatch": "3.1.10", "object-assign": "4.1.1", "read-pkg-up": "1.0.1", "require-main-filename": "1.0.1" @@ -11344,17 +10546,15 @@ "dev": true }, "braces": { - "version": "2.3.1", + "version": "2.3.2", "bundled": true, "dev": true, "requires": { "arr-flatten": "1.1.0", "array-unique": "0.3.2", - "define-property": "1.0.0", "extend-shallow": "2.0.1", "fill-range": "4.0.0", "isobject": "3.0.1", - "kind-of": "6.0.2", "repeat-element": "1.1.2", "snapdragon": "0.8.2", "snapdragon-node": "2.1.1", @@ -11362,14 +10562,6 @@ "to-regex": "3.0.2" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "1.0.2" - } - }, "extend-shallow": { "version": "2.0.1", "bundled": true, @@ -11410,6 +10602,42 @@ "is-extendable": "0.1.1" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "is-descriptor": { "version": "0.1.6", "bundled": true, @@ -11482,39 +10710,29 @@ } }, "is-accessor-descriptor": { - "version": "0.1.6", + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.2" } }, "is-data-descriptor": { - "version": "0.1.4", + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "is-number": { @@ -11546,13 +10764,13 @@ "dev": true }, "micromatch": { - "version": "3.1.9", + "version": "3.1.10", "bundled": true, "dev": true, "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", - "braces": "2.3.1", + "braces": "2.3.2", "define-property": "2.0.2", "extend-shallow": "3.0.2", "extglob": "2.0.4", @@ -11929,39 +11147,6 @@ "is-descriptor": "0.1.6" } }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -12205,8 +11390,8 @@ "is-redirect": "1.0.0", "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "safe-buffer": "5.1.1", + "lowercase-keys": "1.0.1", + "safe-buffer": "5.1.2", "timed-out": "4.0.1", "unzip-response": "2.0.1", "url-parse-lax": "1.0.0" @@ -12376,7 +11561,7 @@ "dev": true, "requires": { "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.1" + "json-parse-better-errors": "1.0.2" } } } @@ -12411,14 +11596,14 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "6.0.20", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.20.tgz", - "integrity": "sha512-Opr6usW30Iy0xEDrJywDckRxtylfO7gTGs3Kfb2LdLQlGsUg89fTy0R3Vm1Dub2YHO7MK58avr0p70+uFFHb7A==", + "version": "6.0.22", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", "dev": true, "requires": { - "chalk": "2.3.2", + "chalk": "2.4.1", "source-map": "0.6.1", - "supports-color": "5.3.0" + "supports-color": "5.4.0" }, "dependencies": { "source-map": { @@ -12430,9 +11615,9 @@ } }, "power-assert": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.4.4.tgz", - "integrity": "sha1-kpXqdDcZb1pgH95CDwQmMRhtdRc=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.5.0.tgz", + "integrity": "sha512-WaWSw+Ts283o6dzxW1BxIxoaHok7aSSGx4SaR6dW62Pk31ynv9DERDieuZpPYv5XaJ+H+zdcOaJQ+PvlasAOVw==", "requires": { "define-properties": "1.1.2", "empower": "1.2.3", @@ -12446,7 +11631,7 @@ "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz", "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "power-assert-context-traversal": "1.1.1" } }, @@ -12457,7 +11642,7 @@ "requires": { "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.3", + "core-js": "2.5.5", "espurify": "1.7.0", "estraverse": "4.2.0" } @@ -12467,7 +11652,7 @@ "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz", "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "estraverse": "4.2.0" } }, @@ -12476,7 +11661,7 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "power-assert-context-formatter": "1.1.1", "power-assert-context-reducer-ast": "1.1.2", "power-assert-renderer-assertion": "1.1.1", @@ -12504,7 +11689,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz", "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "diff-match-patch": "1.0.0", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -12516,7 +11701,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz", "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "power-assert-renderer-base": "1.1.1", "power-assert-util-string-width": "1.1.1", "stringifier": "1.3.0" @@ -12557,9 +11742,9 @@ "dev": true }, "prettier": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.11.1.tgz", - "integrity": "sha512-T/KD65Ot0PB97xTrG8afQ46x3oiVhnfGjGESSI9NWYcG92+OUPZKkwHqGWXH2t9jK1crnQjubECW0FuOth+hxw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.12.1.tgz", + "integrity": "sha1-wa0g6APndJ+vkFpAnSNn4Gu+cyU=", "dev": true }, "pretty-ms": { @@ -12619,7 +11804,7 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "8.9.5", + "@types/node": "8.10.11", "long": "4.0.0" }, "dependencies": { @@ -12719,12 +11904,12 @@ } }, "rc": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", - "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "dev": true, "requires": { - "deep-extend": "0.4.2", + "deep-extend": "0.5.1", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -12777,16 +11962,16 @@ } }, "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", "isarray": "1.0.0", "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, @@ -12798,7 +11983,7 @@ "requires": { "graceful-fs": "4.1.11", "minimatch": "3.0.4", - "readable-stream": "2.3.5", + "readable-stream": "2.3.6", "set-immediate-shim": "1.0.1" } }, @@ -12854,9 +12039,9 @@ } }, "regexpp": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.0.1.tgz", - "integrity": "sha512-8Ph721maXiOYSLtaDGKVmDn5wdsNaF6Px85qFNeMPQq0r8K5Y10tgP6YuR65Ws35n4DvzFcCxEnRNBIXQunzLw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", "dev": true }, "regexpu-core": { @@ -12876,8 +12061,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.6", - "safe-buffer": "5.1.1" + "rc": "1.2.7", + "safe-buffer": "5.1.2" } }, "registry-url": { @@ -12886,7 +12071,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.6" + "rc": "1.2.7" } }, "regjsgen": { @@ -12944,7 +12129,7 @@ "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", "requires": { "aws-sign2": "0.7.0", - "aws4": "1.6.0", + "aws4": "1.7.0", "caseless": "0.12.0", "combined-stream": "1.0.6", "extend": "3.0.1", @@ -12960,7 +12145,7 @@ "oauth-sign": "0.8.2", "performance-now": "2.1.0", "qs": "6.5.1", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "stringstream": "0.0.5", "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", @@ -13052,7 +12237,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "1.0.0" + "lowercase-keys": "1.0.1" } }, "restore-cursor": { @@ -13128,9 +12313,9 @@ } }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", @@ -13140,6 +12325,12 @@ "ret": "0.1.15" } }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "samsam": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", @@ -13152,14 +12343,14 @@ "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", "dev": true, "requires": { - "chalk": "2.3.2", + "chalk": "2.4.1", "htmlparser2": "3.9.2", "lodash.clonedeep": "4.5.0", "lodash.escaperegexp": "4.1.2", "lodash.isplainobject": "4.0.6", "lodash.isstring": "4.0.1", "lodash.mergewith": "4.6.1", - "postcss": "6.0.20", + "postcss": "6.0.22", "srcset": "1.0.0", "xtend": "4.0.1" } @@ -13249,8 +12440,8 @@ "diff": "3.5.0", "lodash.get": "4.4.2", "lolex": "2.3.2", - "nise": "1.3.2", - "supports-color": "5.3.0", + "nise": "1.3.3", + "supports-color": "5.4.0", "type-detect": "4.0.8" } }, @@ -13335,57 +12526,6 @@ "requires": { "is-extendable": "0.1.1" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -13406,6 +12546,32 @@ "requires": { "is-descriptor": "1.0.2" } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } } } }, @@ -13454,7 +12620,7 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "requires": { - "atob": "2.0.3", + "atob": "2.1.1", "decode-uri-component": "0.2.0", "resolve-url": "0.2.1", "source-map-url": "0.4.0", @@ -13462,11 +12628,12 @@ } }, "source-map-support": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.4.tgz", - "integrity": "sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", + "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", "dev": true, "requires": { + "buffer-from": "1.0.0", "source-map": "0.6.1" }, "dependencies": { @@ -13521,7 +12688,7 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "requires": { "async": "2.6.0", - "is-stream-ended": "0.1.3" + "is-stream-ended": "0.1.4" } }, "split-string": { @@ -13585,64 +12752,13 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, "stream-events": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.2.tgz", - "integrity": "sha1-q/OfZsCJCk63lbyNXoWbJhW1kLI=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.4.tgz", + "integrity": "sha512-D243NJaYs/xBN2QnoiMDY7IesJFIK7gEhnvAYqJa5JvDdnh2dC4qDBwlCf0ohPpX2QRlA/4gnbnPd3rs3KxVcA==", "requires": { "stubs": "3.0.0" } @@ -13680,11 +12796,11 @@ } }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "stringifier": { @@ -13692,7 +12808,7 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -13752,9 +12868,9 @@ "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=" }, "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", + "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { "component-emitter": "1.2.1", @@ -13766,7 +12882,7 @@ "methods": "1.1.2", "mime": "1.6.0", "qs": "6.5.1", - "readable-stream": "2.3.5" + "readable-stream": "2.3.6" }, "dependencies": { "mime": { @@ -13814,13 +12930,13 @@ "dev": true, "requires": { "methods": "1.1.2", - "superagent": "3.8.2" + "superagent": "3.8.3" } }, "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -13848,8 +12964,8 @@ "requires": { "ajv": "5.5.2", "ajv-keywords": "2.1.1", - "chalk": "2.3.2", - "lodash": "4.17.5", + "chalk": "2.4.1", + "lodash": "4.17.10", "slice-ansi": "1.0.0", "string-width": "2.1.1" }, @@ -13925,7 +13041,7 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.5", + "readable-stream": "2.3.6", "xtend": "4.0.1" } }, @@ -14051,7 +13167,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "tweetnacl": { @@ -14292,15 +13408,16 @@ "dev": true }, "update-notifier": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", - "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { "boxen": "1.3.0", - "chalk": "2.3.2", - "configstore": "3.1.1", + "chalk": "2.4.1", + "configstore": "3.1.2", "import-lazy": "2.1.0", + "is-ci": "1.1.0", "is-installed-globally": "0.1.0", "is-npm": "1.0.0", "latest-version": "3.1.0", From 0bd112062f8621e7d6c4b21a42b3effc7aa33e10 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 2 May 2018 15:10:10 -0700 Subject: [PATCH 0159/1029] chore: test on node10 (#107) --- handwritten/logging/.circleci/config.yml | 77 ++++++++---------------- 1 file changed, 24 insertions(+), 53 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index a1a6e93f69c..9ad5be7f0e6 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -19,12 +19,17 @@ workflows: filters: tags: only: /.*/ + - node10: + filters: + tags: + only: /.*/ - lint: requires: - node4 - node6 - node8 - node9 + - node10 filters: tags: only: /.*/ @@ -34,6 +39,7 @@ workflows: - node6 - node8 - node9 + - node10 filters: tags: only: /.*/ @@ -90,14 +96,18 @@ jobs: else echo "Not a nightly build, skipping this step." fi - - run: - name: Install modules and dependencies. - command: |- + - run: &npm_install_and_link + name: Install and link the module. + command: | + mkdir -p /home/node/.npm-global npm install repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" if ! test -x "$repo_tools"; then chmod +x "$repo_tools" fi + npm link + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Run unit tests. command: npm test @@ -120,6 +130,11 @@ jobs: - image: 'node:9' user: node steps: *unit_tests_steps + node10: + docker: + - image: 'node:10' + user: node + steps: *unit_tests_steps lint: docker: - image: 'node:8' @@ -127,19 +142,8 @@ jobs: steps: - checkout - run: *remove_package_lock - - run: - name: Install modules and dependencies. - command: | - mkdir -p /home/node/.npm-global - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi - npm link - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: + - run: *npm_install_and_link + - run: &samples_npm_install_and_link name: Link the module being tested to the samples. command: | cd samples/ @@ -160,14 +164,7 @@ jobs: steps: - checkout - run: *remove_package_lock - - run: - name: Install modules and dependencies. - command: |- - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi + - run: *npm_install_and_link - run: name: Build documentation. command: npm run docs @@ -184,27 +181,8 @@ jobs: openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - - run: - name: Install and link the module. - command: | - mkdir -p /home/node/.npm-global - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi - npm link - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Link the module being tested to the samples. - command: | - cd samples/ - npm link @google-cloud/logging - npm install - cd .. - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global + - run: *npm_install_and_link + - run: *samples_npm_install_and_link - run: name: Run sample tests. command: npm run samples-test @@ -230,14 +208,7 @@ jobs: openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - - run: - name: Install modules and dependencies. - command: |- - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi + - run: *npm_install_and_link - run: name: Run system tests. command: npm run system-test From afbe298fbc6045b8f9678bed504387260eb2ef60 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 8 May 2018 14:27:14 -0700 Subject: [PATCH 0160/1029] chore: lock files maintenance (#109) * chore: lock files maintenance * chore: lock files maintenance --- handwritten/logging/package-lock.json | 551 +++++++------------------- 1 file changed, 133 insertions(+), 418 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index a5ca2b125ae..ce87eafb691 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -81,14 +81,14 @@ } }, "@google-cloud/bigquery": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@google-cloud/bigquery/-/bigquery-1.2.0.tgz", - "integrity": "sha512-3BUL1iUrMqihnHj+VbLvzkFQ9TRRavk65K+KPGnAVT2Sbo5yKXr8lyB6VCu7bL3NyaRnZfERiJRZe/rbEvaVEg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@google-cloud/bigquery/-/bigquery-1.3.0.tgz", + "integrity": "sha512-r4k4PvsoPB7DBBCsm4hz8WZj3KvZXikTcwSjAg+cn0JndAPIEad4XCd39RpniyPDSmp+n+d+kOAgebwMWj8q+w==", "dev": true, "requires": { "@google-cloud/common": "0.17.0", "arrify": "1.0.1", - "duplexify": "3.5.4", + "duplexify": "3.6.0", "extend": "3.0.1", "is": "3.2.1", "stream-events": "1.0.4", @@ -105,7 +105,7 @@ "arrify": "1.0.1", "concat-stream": "1.6.2", "create-error-class": "3.0.2", - "duplexify": "3.5.4", + "duplexify": "3.6.0", "ent": "2.2.0", "extend": "3.0.1", "google-auto-auth": "0.10.1", @@ -128,9 +128,9 @@ "requires": { "@google-cloud/common": "0.17.0", "dot-prop": "4.2.0", - "duplexify": "3.5.4", + "duplexify": "3.6.0", "extend": "3.0.1", - "grpc": "1.11.0", + "grpc": "1.11.3", "is": "3.2.1", "modelo": "4.2.3", "retry-request": "3.3.1", @@ -1855,7 +1855,7 @@ "arrify": "1.0.1", "async-each": "1.0.1", "delay": "2.0.0", - "duplexify": "3.5.4", + "duplexify": "3.6.0", "extend": "3.0.1", "google-auto-auth": "0.9.7", "google-gax": "0.16.1", @@ -1879,7 +1879,7 @@ "arrify": "1.0.1", "concat-stream": "1.6.2", "create-error-class": "3.0.2", - "duplexify": "3.5.4", + "duplexify": "3.6.0", "ent": "2.2.0", "extend": "3.0.1", "google-auto-auth": "0.9.7", @@ -1921,7 +1921,7 @@ "compressible": "2.0.13", "concat-stream": "1.6.2", "create-error-class": "3.0.2", - "duplexify": "3.5.4", + "duplexify": "3.6.0", "extend": "3.0.1", "gcs-resumable-upload": "0.9.0", "hash-stream-validation": "0.2.1", @@ -1929,7 +1929,7 @@ "mime": "2.3.1", "mime-types": "2.1.18", "once": "1.4.0", - "pumpify": "1.4.0", + "pumpify": "1.5.0", "request": "2.85.0", "safe-buffer": "5.1.2", "snakeize": "0.1.0", @@ -1948,7 +1948,7 @@ "arrify": "1.0.1", "concat-stream": "1.6.2", "create-error-class": "3.0.2", - "duplexify": "3.5.4", + "duplexify": "3.6.0", "ent": "2.2.0", "extend": "3.0.1", "google-auto-auth": "0.9.7", @@ -2108,9 +2108,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.11.tgz", - "integrity": "sha512-FM7tvbjbn2BUzM/Qsdk9LUGq3zeh7li8NcHoS398dBzqLzfmSqSP1+yKbMRTCcZzLcu2JAR5lq3IKIEYkto7iQ==" + "version": "8.10.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.12.tgz", + "integrity": "sha512-aRFUGj/f9JVA0qSQiCK9ebaa778mmqMIcy1eKnPktgfm9O6VsnIzzB5wJnjp9/jVrfm7fX1rr3OR1nndppGZUg==" }, "acorn": { "version": "4.0.13", @@ -2885,7 +2885,7 @@ "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.5", + "core-js": "2.5.6", "espower-location-detector": "1.0.0", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3032,7 +3032,7 @@ "requires": { "babel-core": "6.26.3", "babel-runtime": "6.26.0", - "core-js": "2.5.5", + "core-js": "2.5.6", "home-or-tmp": "2.0.0", "lodash": "4.17.10", "mkdirp": "0.5.1", @@ -3056,7 +3056,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "regenerator-runtime": "0.11.1" } }, @@ -3418,7 +3418,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "deep-equal": "1.0.1", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3904,9 +3904,9 @@ } }, "core-js": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", - "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", + "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==" }, "core-util-is": { "version": "1.0.2", @@ -4246,9 +4246,9 @@ "dev": true }, "duplexify": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", - "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "requires": { "end-of-stream": "1.4.1", "inherits": "2.0.3", @@ -4284,7 +4284,7 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "empower-core": "0.6.2" } }, @@ -4303,7 +4303,7 @@ "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.5" + "core-js": "2.5.6" } }, "end-of-stream": { @@ -4726,7 +4726,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", "requires": { - "core-js": "2.5.5" + "core-js": "2.5.6" } }, "esquery": { @@ -4914,7 +4914,7 @@ "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.21", + "iconv-lite": "0.4.22", "tmp": "0.0.33" } }, @@ -5001,7 +5001,7 @@ "@mrmlnc/readdir-enhanced": "2.2.1", "glob-parent": "3.1.0", "is-glob": "4.0.0", - "merge2": "1.2.1", + "merge2": "1.2.2", "micromatch": "3.1.10" } }, @@ -5752,7 +5752,7 @@ "buffer-equal": "1.0.0", "configstore": "3.1.2", "google-auto-auth": "0.9.7", - "pumpify": "1.4.0", + "pumpify": "1.5.0", "request": "2.85.0", "stream-events": "1.0.4", "through2": "2.0.3" @@ -5941,12 +5941,12 @@ "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "requires": { - "duplexify": "3.5.4", + "duplexify": "3.6.0", "extend": "3.0.1", "globby": "8.0.1", "google-auto-auth": "0.10.1", "google-proto-files": "0.15.1", - "grpc": "1.11.0", + "grpc": "1.11.3", "is-stream-ended": "0.1.4", "lodash": "4.17.10", "protobufjs": "6.8.6", @@ -6042,13 +6042,13 @@ "dev": true }, "grpc": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.0.tgz", - "integrity": "sha512-pTJjV/eatBQ6Rhc/jWNmUW9jE8fPrhcMYSWDSyf4l7ah1U3sIe4eIjqI/a3sm0zKbM5CuovV0ESrc+b04kr4Ig==", + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.3.tgz", + "integrity": "sha512-7fJ40USpnP7hxGK0uRoEhJz6unA5VUdwInfwAY2rK2+OVxdDJSdTZQ/8/M+1tW68pHZYgHvg2ohvJ+clhW3ANg==", "requires": { "lodash": "4.17.10", "nan": "2.10.0", - "node-pre-gyp": "0.7.0", + "node-pre-gyp": "0.10.0", "protobufjs": "5.0.2" }, "dependencies": { @@ -6056,16 +6056,6 @@ "version": "1.1.1", "bundled": true }, - "ajv": { - "version": "5.5.2", - "bundled": true, - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, "ansi-regex": { "version": "2.1.1", "bundled": true @@ -6082,52 +6072,10 @@ "readable-stream": "2.3.6" } }, - "asn1": { - "version": "0.2.3", - "bundled": true - }, - "assert-plus": { - "version": "1.0.0", - "bundled": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true - }, - "aws-sign2": { - "version": "0.7.0", - "bundled": true - }, - "aws4": { - "version": "1.7.0", - "bundled": true - }, "balanced-match": { "version": "1.0.0", "bundled": true }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "4.3.1", - "bundled": true, - "requires": { - "hoek": "4.2.1" - } - }, "brace-expansion": { "version": "1.1.11", "bundled": true, @@ -6136,25 +6084,14 @@ "concat-map": "0.0.1" } }, - "caseless": { - "version": "0.12.0", - "bundled": true - }, - "co": { - "version": "4.6.0", + "chownr": { + "version": "1.0.1", "bundled": true }, "code-point-at": { "version": "1.1.0", "bundled": true }, - "combined-stream": { - "version": "1.0.6", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, "concat-map": { "version": "0.0.1", "bundled": true @@ -6167,29 +6104,6 @@ "version": "1.0.2", "bundled": true }, - "cryptiles": { - "version": "3.1.2", - "bundled": true, - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "bundled": true, - "requires": { - "hoek": "4.2.1" - } - } - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - } - }, "debug": { "version": "2.6.9", "bundled": true, @@ -6198,11 +6112,7 @@ } }, "deep-extend": { - "version": "0.4.2", - "bundled": true - }, - "delayed-stream": { - "version": "1.0.0", + "version": "0.5.1", "bundled": true }, "delegates": { @@ -6213,66 +6123,17 @@ "version": "1.0.3", "bundled": true }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true - }, - "extsprintf": { - "version": "1.3.0", - "bundled": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "bundled": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true - }, - "form-data": { - "version": "2.3.2", + "fs-minipass": { + "version": "1.2.5", "bundled": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "minipass": "2.2.4" } }, "fs.realpath": { "version": "1.0.0", "bundled": true }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, "gauge": { "version": "2.7.4", "bundled": true, @@ -6287,13 +6148,6 @@ "wide-align": "1.1.2" } }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - } - }, "glob": { "version": "7.1.2", "bundled": true, @@ -6306,47 +6160,19 @@ "path-is-absolute": "1.0.1" } }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "2.0.0", - "bundled": true - }, - "har-validator": { - "version": "5.0.3", - "bundled": true, - "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" - } - }, "has-unicode": { "version": "2.0.1", "bundled": true }, - "hawk": { - "version": "6.0.2", - "bundled": true, - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.1", - "sntp": "2.1.0" - } - }, - "hoek": { - "version": "4.2.1", + "iconv-lite": { + "version": "0.4.19", "bundled": true }, - "http-signature": { - "version": "1.2.0", + "ignore-walk": { + "version": "3.0.1", "bundled": true, "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.14.1" + "minimatch": "3.0.4" } }, "inflight": { @@ -6372,67 +6198,36 @@ "number-is-nan": "1.0.1" } }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true - }, "isarray": { "version": "1.0.0", "bundled": true }, - "isstream": { - "version": "0.1.2", - "bundled": true - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "bundled": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true - }, - "jsprim": { - "version": "1.4.1", + "minimatch": { + "version": "3.0.4", "bundled": true, "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" + "brace-expansion": "1.1.11" } }, - "mime-db": { - "version": "1.33.0", + "minimist": { + "version": "1.2.0", "bundled": true }, - "mime-types": { - "version": "2.1.18", + "minipass": { + "version": "2.2.4", "bundled": true, "requires": { - "mime-db": "1.33.0" + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, - "minimatch": { - "version": "3.0.4", + "minizlib": { + "version": "1.1.0", "bundled": true, "requires": { - "brace-expansion": "1.1.11" + "minipass": "2.2.4" } }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, "mkdirp": { "version": "0.5.1", "bundled": true, @@ -6450,20 +6245,29 @@ "version": "2.0.0", "bundled": true }, + "needle": { + "version": "2.2.1", + "bundled": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.19", + "sax": "1.2.4" + } + }, "node-pre-gyp": { - "version": "0.7.0", + "version": "0.10.0", "bundled": true, "requires": { "detect-libc": "1.0.3", "mkdirp": "0.5.1", + "needle": "2.2.1", "nopt": "4.0.1", + "npm-packlist": "1.1.10", "npmlog": "4.1.2", - "rc": "1.2.6", - "request": "2.83.0", + "rc": "1.2.7", "rimraf": "2.6.2", "semver": "5.5.0", - "tar": "2.2.1", - "tar-pack": "3.4.1" + "tar": "4.4.2" } }, "nopt": { @@ -6474,6 +6278,18 @@ "osenv": "0.1.5" } }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" + } + }, "npmlog": { "version": "4.1.2", "bundled": true, @@ -6488,10 +6304,6 @@ "version": "1.0.1", "bundled": true }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true - }, "object-assign": { "version": "4.1.1", "bundled": true @@ -6523,10 +6335,6 @@ "version": "1.0.1", "bundled": true }, - "performance-now": { - "version": "2.1.0", - "bundled": true - }, "process-nextick-args": { "version": "2.0.0", "bundled": true @@ -6542,19 +6350,11 @@ "yargs": "3.32.0" } }, - "punycode": { - "version": "1.4.1", - "bundled": true - }, - "qs": { - "version": "6.5.1", - "bundled": true - }, "rc": { - "version": "1.2.6", + "version": "1.2.7", "bundled": true, "requires": { - "deep-extend": "0.4.2", + "deep-extend": "0.5.1", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -6573,34 +6373,6 @@ "util-deprecate": "1.0.2" } }, - "request": { - "version": "2.83.0", - "bundled": true, - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.7.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, "rimraf": { "version": "2.6.2", "bundled": true, @@ -6612,6 +6384,10 @@ "version": "5.1.1", "bundled": true }, + "sax": { + "version": "1.2.4", + "bundled": true + }, "semver": { "version": "5.5.0", "bundled": true @@ -6624,27 +6400,6 @@ "version": "3.0.2", "bundled": true }, - "sntp": { - "version": "2.1.0", - "bundled": true, - "requires": { - "hoek": "4.2.1" - } - }, - "sshpk": { - "version": "1.14.1", - "bundled": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - } - }, "string-width": { "version": "1.0.2", "bundled": true, @@ -6661,10 +6416,6 @@ "safe-buffer": "5.1.1" } }, - "stringstream": { - "version": "0.0.5", - "bundled": true - }, "strip-ansi": { "version": "3.0.1", "bundled": true, @@ -6677,68 +6428,28 @@ "bundled": true }, "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.1", - "bundled": true, - "requires": { - "debug": "2.6.9", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.3.6", - "rimraf": "2.6.2", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.4", - "bundled": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", + "version": "4.4.2", "bundled": true, "requires": { - "safe-buffer": "5.1.1" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.2", + "yallist": "3.0.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "bundled": true + } } }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true - }, "util-deprecate": { "version": "1.0.2", "bundled": true }, - "uuid": { - "version": "3.2.1", - "bundled": true - }, - "verror": { - "version": "1.10.0", - "bundled": true, - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - } - }, "wide-align": { "version": "1.1.2", "bundled": true, @@ -6749,6 +6460,10 @@ "wrappy": { "version": "1.0.2", "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true } } }, @@ -6978,9 +6693,9 @@ } }, "iconv-lite": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", - "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "version": "0.4.22", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.22.tgz", + "integrity": "sha512-1AinFBeDTnsvVEP+V1QBlHpM1UZZl7gWB6fcz7B1Ho+LI1dUh2sSrxoCfVt2PinRHzXAziSniEV3P7JbTDHcXA==", "dev": true, "requires": { "safer-buffer": "2.1.2" @@ -8133,9 +7848,9 @@ } }, "merge2": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz", - "integrity": "sha512-wUqcG5pxrAcaFI1lkqkMnk3Q7nUxV/NWfpAFSeWUwG9TRODnBDCUHa75mi3o3vLWQ5N4CQERWCauSlP0I3ZqUg==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", + "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==" }, "methmeth": { "version": "1.1.0", @@ -11631,7 +11346,7 @@ "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz", "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "power-assert-context-traversal": "1.1.1" } }, @@ -11642,7 +11357,7 @@ "requires": { "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.5", + "core-js": "2.5.6", "espurify": "1.7.0", "estraverse": "4.2.0" } @@ -11652,7 +11367,7 @@ "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz", "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "estraverse": "4.2.0" } }, @@ -11661,7 +11376,7 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "power-assert-context-formatter": "1.1.1", "power-assert-context-reducer-ast": "1.1.2", "power-assert-renderer-assertion": "1.1.1", @@ -11689,7 +11404,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz", "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "diff-match-patch": "1.0.0", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -11701,7 +11416,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz", "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "power-assert-renderer-base": "1.1.1", "power-assert-util-string-width": "1.1.1", "stringifier": "1.3.0" @@ -11804,7 +11519,7 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "8.10.11", + "@types/node": "8.10.12", "long": "4.0.0" }, "dependencies": { @@ -11852,11 +11567,11 @@ } }, "pumpify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", - "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.0.tgz", + "integrity": "sha512-UWi0klDoq8xtVzlMRgENV9F7iCTZExaJQSQL187UXsxpk9NnrKGqTqqUNYAKGOzucSOxs2+jUnRNI+rLviPhJg==", "requires": { - "duplexify": "3.5.4", + "duplexify": "3.6.0", "inherits": "2.0.3", "pump": "2.0.1" } @@ -11867,9 +11582,9 @@ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "query-string": { "version": "5.1.1", @@ -12144,7 +11859,7 @@ "mime-types": "2.1.18", "oauth-sign": "0.8.2", "performance-now": "2.1.0", - "qs": "6.5.1", + "qs": "6.5.2", "safe-buffer": "5.1.2", "stringstream": "0.0.5", "tough-cookie": "2.3.4", @@ -12808,7 +12523,7 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -12881,7 +12596,7 @@ "formidable": "1.2.1", "methods": "1.1.2", "mime": "1.6.0", - "qs": "6.5.1", + "qs": "6.5.2", "readable-stream": "2.3.6" }, "dependencies": { From 5e7737b7f2b5645846be0634053388fb4c7ce963 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 16 May 2018 16:52:19 -0700 Subject: [PATCH 0161/1029] chore: timeout for system test (#112) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8436ffe4f94..d762bdbb531 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", "prettier": "repo-tools exec -- prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", "publish-module": "node ../../scripts/publish.js logging", - "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --no-timeouts", + "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" From 8f0560d15c4bb0a3509c0724f1427aca6a6e58fd Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 21 May 2018 15:59:08 -0700 Subject: [PATCH 0162/1029] chore: the ultimate fix for repo-tools EPERM (#113) --- handwritten/logging/.circleci/config.yml | 48 +++++++----------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 9ad5be7f0e6..9c2026d1938 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -4,25 +4,17 @@ workflows: tests: jobs: &workflow_jobs - node4: - filters: + filters: &all_commits tags: only: /.*/ - node6: - filters: - tags: - only: /.*/ + filters: *all_commits - node8: - filters: - tags: - only: /.*/ + filters: *all_commits - node9: - filters: - tags: - only: /.*/ + filters: *all_commits - node10: - filters: - tags: - only: /.*/ + filters: *all_commits - lint: requires: - node4 @@ -30,9 +22,7 @@ workflows: - node8 - node9 - node10 - filters: - tags: - only: /.*/ + filters: *all_commits - docs: requires: - node4 @@ -40,27 +30,21 @@ workflows: - node8 - node9 - node10 - filters: - tags: - only: /.*/ + filters: *all_commits - system_tests: requires: - lint - docs - filters: + filters: &master_and_releases branches: only: master - tags: + tags: &releases only: '/^v[\d.]+$/' - sample_tests: requires: - lint - docs - filters: - branches: - only: master - tags: - only: '/^v[\d.]+$/' + filters: *master_and_releases - publish_npm: requires: - system_tests @@ -68,8 +52,7 @@ workflows: filters: branches: ignore: /.*/ - tags: - only: '/^v[\d.]+$/' + tags: *releases nightly: triggers: - schedule: @@ -97,15 +80,12 @@ jobs: echo "Not a nightly build, skipping this step." fi - run: &npm_install_and_link - name: Install and link the module. - command: | + name: Install and link the module + command: |- mkdir -p /home/node/.npm-global npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi npm link + chmod +x node_modules/@google-cloud/nodejs-repo-tools/bin/tools environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: From 755c0438ef261b76dc5e6e9f2b0b3d8b42239a01 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 22 May 2018 11:32:15 -0700 Subject: [PATCH 0163/1029] chore: lock files maintenance (#114) * chore: lock files maintenance * chore: lock files maintenance --- handwritten/logging/package-lock.json | 858 ++++++++++---------------- 1 file changed, 340 insertions(+), 518 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index ce87eafb691..1802e85c66c 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -113,7 +113,7 @@ "log-driver": "1.2.7", "methmeth": "1.1.0", "modelo": "4.2.3", - "request": "2.85.0", + "request": "2.87.0", "retry-request": "3.3.1", "split-array-stream": "1.0.3", "stream-events": "1.0.4", @@ -1887,7 +1887,7 @@ "log-driver": "1.2.7", "methmeth": "1.1.0", "modelo": "4.2.3", - "request": "2.85.0", + "request": "2.87.0", "retry-request": "3.3.1", "split-array-stream": "1.0.3", "stream-events": "1.0.4", @@ -1901,81 +1901,41 @@ "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", "dev": true, "requires": { - "async": "2.6.0", + "async": "2.6.1", "gcp-metadata": "0.6.3", - "google-auth-library": "1.4.0", - "request": "2.85.0" + "google-auth-library": "1.5.0", + "request": "2.87.0" } } } }, "@google-cloud/storage": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-1.6.0.tgz", - "integrity": "sha512-yQ63bJYoiwY220gn/KdTLPoHppAPwFHfG7VFLPwJ+1R5U1eqUN5XV2a7uPj1szGF8/gxlKm2UbE8DgoJJ76DFw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-1.7.0.tgz", + "integrity": "sha512-QaAxzCkbhspwajoaEnT0GcnQcpjPRcBrHYuQsXtD05BtOJgVnHCLXSsfUiRdU0nVpK+Thp7+sTkQ0fvk5PanKg==", "dev": true, "requires": { - "@google-cloud/common": "0.16.2", + "@google-cloud/common": "0.17.0", "arrify": "1.0.1", - "async": "2.6.0", + "async": "2.6.1", "compressible": "2.0.13", "concat-stream": "1.6.2", "create-error-class": "3.0.2", "duplexify": "3.6.0", "extend": "3.0.1", - "gcs-resumable-upload": "0.9.0", + "gcs-resumable-upload": "0.10.2", "hash-stream-validation": "0.2.1", "is": "3.2.1", "mime": "2.3.1", "mime-types": "2.1.18", "once": "1.4.0", - "pumpify": "1.5.0", - "request": "2.85.0", + "pumpify": "1.5.1", + "request": "2.87.0", "safe-buffer": "5.1.2", "snakeize": "0.1.0", "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" - }, - "dependencies": { - "@google-cloud/common": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.2.tgz", - "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", - "dev": true, - "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.9.7", - "is": "3.2.1", - "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.85.0", - "retry-request": "3.3.1", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" - } - }, - "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", - "dev": true, - "requires": { - "async": "2.6.0", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.4.0", - "request": "2.85.0" - } - } + "through2": "2.0.3", + "xdg-basedir": "3.0.0" } }, "@ladjs/time-require": { @@ -2033,6 +1993,11 @@ "glob-to-regexp": "0.3.0" } }, + "@nodelib/fs.stat": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.0.2.tgz", + "integrity": "sha512-vCpf75JDcdomXvUd7Rn6DfYAVqPAFI66FVjxiWGwh85OLdvfo3paBoPJaam5keIYRyUolnS7SleS/ZPCidCvzw==" + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -2095,7 +2060,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -2108,9 +2073,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.12.tgz", - "integrity": "sha512-aRFUGj/f9JVA0qSQiCK9ebaa778mmqMIcy1eKnPktgfm9O6VsnIzzB5wJnjp9/jVrfm7fX1rr3OR1nndppGZUg==" + "version": "8.10.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.17.tgz", + "integrity": "sha512-3N3FRd/rA1v5glXjb90YdYUa+sOB7WrkU2rAhKZnF4TKD86Cym9swtulGuH0p9nxo7fP5woRNa8b0oFTpCO1bg==" }, "acorn": { "version": "4.0.13", @@ -2454,9 +2419,9 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "requires": { "lodash": "4.17.10" } @@ -2546,7 +2511,7 @@ "lodash.difference": "4.5.0", "lodash.flatten": "4.4.0", "loud-rejection": "1.6.0", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "matcher": "1.1.0", "md5-hex": "2.0.0", "meow": "3.7.0", @@ -2563,7 +2528,7 @@ "safe-buffer": "5.1.2", "semver": "5.5.0", "slash": "1.0.0", - "source-map-support": "0.5.5", + "source-map-support": "0.5.6", "stack-utils": "1.0.1", "strip-ansi": "4.0.0", "strip-bom-buf": "1.0.0", @@ -2653,7 +2618,7 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "1.4.1", + "follow-redirects": "1.5.0", "is-buffer": "1.1.6" } }, @@ -2887,7 +2852,7 @@ "call-matcher": "1.0.1", "core-js": "2.5.6", "espower-location-detector": "1.0.0", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0" } }, @@ -3174,11 +3139,6 @@ } } }, - "base64url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", - "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" - }, "bcrypt-pbkdf": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", @@ -3200,14 +3160,6 @@ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "dev": true }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.2.1" - } - }, "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", @@ -3310,12 +3262,6 @@ "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", "dev": true }, - "buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", - "dev": true - }, "buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -3420,7 +3366,7 @@ "requires": { "core-js": "2.5.6", "deep-equal": "1.0.1", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0" } }, @@ -3527,7 +3473,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.2.3", + "fsevents": "1.2.4", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -3725,13 +3671,13 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.1.tgz", - "integrity": "sha512-0TjnXrbvcPzAkRPv/Y5D8aZju/M5adkFxShRyMMgDReB8EV9nF4XMERXs6ajgLA1di9LUFW2tgePDQd2JPWy7g==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.2.tgz", + "integrity": "sha512-9ljtIROIjPIUmMRqO+XuDITDoV8xRrZmA0jcEq6p2hg2+wY9wGmLfreAZGIL72IzUfdEDZaU8+Vjidg1fBQ8GQ==", "dev": true, "requires": { "argv": "0.0.2", - "request": "2.85.0", + "request": "2.87.0", "urlgrey": "0.4.4" } }, @@ -3779,9 +3725,9 @@ } }, "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, "common-path-prefix": { @@ -3864,7 +3810,7 @@ "requires": { "dot-prop": "4.2.0", "graceful-fs": "4.1.11", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "unique-string": "1.0.0", "write-file-atomic": "2.3.0", "xdg-basedir": "3.0.0" @@ -3927,29 +3873,11 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "shebang-command": "1.2.0", "which": "1.3.0" } }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "requires": { - "hoek": "4.2.1" - } - } - } - }, "crypto-random-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", @@ -4166,9 +4094,9 @@ "dev": true }, "diff-match-patch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.0.tgz", - "integrity": "sha1-HMPIOkkNZ/ldkeOfatHy4Ia2MEg=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.1.tgz", + "integrity": "sha512-A0QEhr4PxGUMEtKxd6X+JLnOTFd3BfIPSDpsc4dMvj+CbSaErDwTpoTo/nFJDMSrjxLW4BiNq+FbNisAAHhWeQ==" }, "dir-glob": { "version": "2.0.0", @@ -4213,9 +4141,9 @@ "dev": true }, "domhandler": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", - "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { "domelementtype": "1.3.0" @@ -4271,11 +4199,10 @@ } }, "ecdsa-sig-formatter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", - "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", + "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", "requires": { - "base64url": "2.0.0", "safe-buffer": "5.1.2" } }, @@ -4617,9 +4544,9 @@ "dev": true }, "espower": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.0.tgz", - "integrity": "sha1-zh7bPZhwKEH99ZbRy46FvcSujkg=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.1.tgz", + "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", "dev": true, "requires": { "array-find": "1.0.0", @@ -4627,7 +4554,7 @@ "escodegen": "1.9.1", "escope": "3.6.0", "espower-location-detector": "1.0.0", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0", "source-map": "0.5.7", "type-name": "2.0.2", @@ -4681,7 +4608,7 @@ "convert-source-map": "1.5.1", "empower-assert": "1.1.0", "escodegen": "1.9.1", - "espower": "2.1.0", + "espower": "2.1.1", "estraverse": "4.2.0", "merge-estraverse-visitors": "1.0.0", "multi-stage-sourcemap": "0.2.1", @@ -4722,9 +4649,9 @@ "dev": true }, "espurify": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", - "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", + "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", "requires": { "core-js": "2.5.6" } @@ -4838,18 +4765,18 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "2.2.4" }, "dependencies": { "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { "is-number": "2.1.0", "isobject": "2.1.0", - "randomatic": "1.1.7", + "randomatic": "3.0.0", "repeat-element": "1.1.2", "repeat-string": "1.6.1" } @@ -4914,7 +4841,7 @@ "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.22", + "iconv-lite": "0.4.23", "tmp": "0.0.33" } }, @@ -4994,11 +4921,12 @@ "dev": true }, "fast-glob": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.1.tgz", - "integrity": "sha512-wSyW1TBK3ia5V+te0rGPXudeMHoUQW6O5Y9oATiaGhpENmEifPDlOdhpsnlj5HoG6ttIvGiY1DdCmI9X2xGMhg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", + "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { "@mrmlnc/readdir-enhanced": "2.2.1", + "@nodelib/fs.stat": "1.0.2", "glob-parent": "3.1.0", "is-glob": "4.0.0", "merge2": "1.2.2", @@ -5079,7 +5007,7 @@ "dev": true, "requires": { "commondir": "1.0.1", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "pkg-dir": "2.0.0" } }, @@ -5111,9 +5039,9 @@ "dev": true }, "follow-redirects": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", - "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", + "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", "requires": { "debug": "3.1.0" } @@ -5193,14 +5121,14 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", - "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", "dev": true, "optional": true, "requires": { "nan": "2.10.0", - "node-pre-gyp": "0.9.1" + "node-pre-gyp": "0.10.0" }, "dependencies": { "abbrev": { @@ -5281,7 +5209,7 @@ } }, "deep-extend": { - "version": "0.4.2", + "version": "0.5.1", "bundled": true, "dev": true, "optional": true @@ -5459,7 +5387,7 @@ } }, "node-pre-gyp": { - "version": "0.9.1", + "version": "0.10.0", "bundled": true, "dev": true, "optional": true, @@ -5470,7 +5398,7 @@ "nopt": "4.0.1", "npm-packlist": "1.1.10", "npmlog": "4.1.2", - "rc": "1.2.6", + "rc": "1.2.7", "rimraf": "2.6.2", "semver": "5.5.0", "tar": "4.4.1" @@ -5568,12 +5496,12 @@ "optional": true }, "rc": { - "version": "1.2.6", + "version": "1.2.7", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "0.4.2", + "deep-extend": "0.5.1", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -5744,32 +5672,16 @@ } }, "gcs-resumable-upload": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.9.0.tgz", - "integrity": "sha512-+Zrmr0JKO2y/2mg953TW6JLu+NAMHqQsKzqCm7CIT24gMQakolPJCMzDleVpVjXAqB7ZCD276tcUq2ebOfqTug==", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.10.2.tgz", + "integrity": "sha1-fymz7iPc7EFwNnwHEUGCScZgVF8=", "dev": true, "requires": { - "buffer-equal": "1.0.0", "configstore": "3.1.2", - "google-auto-auth": "0.9.7", - "pumpify": "1.5.0", - "request": "2.85.0", - "stream-events": "1.0.4", - "through2": "2.0.3" - }, - "dependencies": { - "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", - "dev": true, - "requires": { - "async": "2.6.0", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.4.0", - "request": "2.85.0" - } - } + "google-auto-auth": "0.10.1", + "pumpify": "1.5.1", + "request": "2.87.0", + "stream-events": "1.0.4" } }, "get-caller-file": { @@ -5904,7 +5816,7 @@ "requires": { "array-union": "1.0.2", "dir-glob": "2.0.0", - "fast-glob": "2.2.1", + "fast-glob": "2.2.2", "glob": "7.1.2", "ignore": "3.3.8", "pify": "3.0.0", @@ -5912,16 +5824,16 @@ } }, "google-auth-library": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.4.0.tgz", - "integrity": "sha512-vWRx6pJulK7Y5V/Xyr7MPMlx2mWfmrUVbcffZ7hpq8ElFg5S8WY6PvjMovdcr6JfuAwwpAX4R0I1XOcyWuBcUw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.5.0.tgz", + "integrity": "sha512-xpibA/hkq4waBcpIkSJg4GiDAqcBWjJee3c47zj7xP3RQ0A9mc8MP3Vc9sc8SGRoDYA0OszZxTjW7SbcC4pJIA==", "requires": { "axios": "0.18.0", "gcp-metadata": "0.6.3", "gtoken": "2.3.0", - "jws": "3.1.4", + "jws": "3.1.5", "lodash.isstring": "4.0.1", - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "retry-axios": "0.3.2" } }, @@ -5930,10 +5842,10 @@ "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "requires": { - "async": "2.6.0", + "async": "2.6.1", "gcp-metadata": "0.6.3", - "google-auth-library": "1.4.0", - "request": "2.85.0" + "google-auth-library": "1.5.0", + "request": "2.87.0" } }, "google-gax": { @@ -6036,9 +5948,9 @@ "dev": true }, "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "grpc": { @@ -6049,7 +5961,7 @@ "lodash": "4.17.10", "nan": "2.10.0", "node-pre-gyp": "0.10.0", - "protobufjs": "5.0.2" + "protobufjs": "5.0.3" }, "dependencies": { "abbrev": { @@ -6340,9 +6252,9 @@ "bundled": true }, "protobufjs": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.2.tgz", - "integrity": "sha1-WXSNfc8D0tsiwT2p/rAk4Wq4DJE=", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", + "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { "ascli": "1.0.1", "bytebuffer": "5.0.1", @@ -6474,7 +6386,7 @@ "requires": { "axios": "0.18.0", "google-p12-pem": "1.0.2", - "jws": "3.1.4", + "jws": "3.1.5", "mime": "2.3.1", "pify": "3.0.0" } @@ -6602,28 +6514,12 @@ "through2": "2.0.3" } }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.1", - "sntp": "2.1.0" - } - }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "hoek": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -6647,7 +6543,7 @@ "dev": true, "requires": { "domelementtype": "1.3.0", - "domhandler": "2.4.1", + "domhandler": "2.4.2", "domutils": "1.7.0", "entities": "1.1.1", "inherits": "2.0.3", @@ -6693,9 +6589,9 @@ } }, "iconv-lite": { - "version": "0.4.22", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.22.tgz", - "integrity": "sha512-1AinFBeDTnsvVEP+V1QBlHpM1UZZl7gWB6fcz7B1Ho+LI1dUh2sSrxoCfVt2PinRHzXAziSniEV3P7JbTDHcXA==", + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { "safer-buffer": "2.1.2" @@ -6766,7 +6662,7 @@ "dev": true }, "ink-docstrap": { - "version": "git+https://github.com/docstrap/docstrap.git#0fff6c83ab7f9154b27c0996b775f1639037df9b", + "version": "git+https://github.com/docstrap/docstrap.git#1e56828b819bcbc9855543bd20809a0aed415a80", "dev": true, "requires": { "moment": "2.22.1", @@ -7375,23 +7271,21 @@ "dev": true }, "jwa": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", - "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", + "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", "requires": { - "base64url": "2.0.0", "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.9", + "ecdsa-sig-formatter": "1.0.10", "safe-buffer": "5.1.2" } }, "jws": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", - "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", + "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", "requires": { - "base64url": "2.0.0", - "jwa": "1.1.5", + "jwa": "1.1.6", "safe-buffer": "5.1.2" } }, @@ -7590,9 +7484,9 @@ "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" }, "lolex": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", - "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.6.0.tgz", + "integrity": "sha512-e1UtIo1pbrIqEXib/yMjHciyqkng5lc0rrIbytgjmRgDR9+2ceNIAcwOWSgylRjoEP9VdVguCSRwnNmlbnOUwA==", "dev": true }, "long": { @@ -7632,18 +7526,18 @@ "dev": true }, "lru-cache": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", - "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { "pseudomap": "1.0.2", "yallist": "2.1.2" } }, "make-dir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", - "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { "pify": "3.0.0" @@ -7682,6 +7576,12 @@ "escape-string-regexp": "1.0.5" } }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, "md5-hex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", @@ -7956,33 +7856,22 @@ } }, "mocha": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.1.1.tgz", - "integrity": "sha512-kKKs/H1KrMMQIEsWNxGmb4/BGsmj0dkeyotEvbrAuQ01FcWRLssUNXCEUZk6SZtyJBi6EE7SL0zDDtItw1rGhw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", "dev": true, "requires": { "browser-stdout": "1.3.1", - "commander": "2.11.0", + "commander": "2.15.1", "debug": "3.1.0", "diff": "3.5.0", "escape-string-regexp": "1.0.5", "glob": "7.1.2", - "growl": "1.10.3", + "growl": "1.10.5", "he": "1.1.1", "minimatch": "3.0.4", "mkdirp": "0.5.1", - "supports-color": "4.4.0" - }, - "dependencies": { - "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } + "supports-color": "5.4.0" } }, "modelo": { @@ -8089,7 +7978,7 @@ "requires": { "@sinonjs/formatio": "2.0.0", "just-extend": "1.1.27", - "lolex": "2.3.2", + "lolex": "2.6.0", "path-to-regexp": "1.7.0", "text-encoding": "0.6.4" } @@ -8154,9 +8043,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "11.7.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.1.tgz", - "integrity": "sha512-EGePURSKUEpS1jWnEKAMhY+GWZzi7JC+f8iBDOATaOsLZW5hM/9eYx2dHGaEXa1ITvMm44CJugMksvP3NwMQMw==", + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.8.0.tgz", + "integrity": "sha512-PUFq1PSsx5OinSk5g5aaZygcDdI3QQT5XUlbR9QRMihtMS6w0Gm8xj4BxmKeeAlpQXC5M2DIhH16Y+KejceivQ==", "dev": true, "requires": { "archy": "1.0.0", @@ -8177,7 +8066,7 @@ "istanbul-reports": "1.4.0", "md5-hex": "1.3.0", "merge-source-map": "1.1.0", - "micromatch": "2.3.11", + "micromatch": "3.1.10", "mkdirp": "0.5.1", "resolve-from": "2.0.0", "rimraf": "2.6.2", @@ -8227,12 +8116,9 @@ "dev": true }, "arr-diff": { - "version": "2.0.0", + "version": "4.0.0", "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "1.1.0" - } + "dev": true }, "arr-flatten": { "version": "1.1.0", @@ -8245,7 +8131,7 @@ "dev": true }, "array-unique": { - "version": "0.2.1", + "version": "0.3.2", "bundled": true, "dev": true }, @@ -8265,7 +8151,7 @@ "dev": true }, "atob": { - "version": "2.1.0", + "version": "2.1.1", "bundled": true, "dev": true }, @@ -8289,7 +8175,7 @@ "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "source-map": "0.5.7", "trim-right": "1.0.1" } @@ -8307,7 +8193,7 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "regenerator-runtime": "0.11.1" } }, @@ -8320,7 +8206,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "babel-traverse": { @@ -8336,7 +8222,7 @@ "debug": "2.6.9", "globals": "9.18.0", "invariant": "2.2.4", - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "babel-types": { @@ -8346,7 +8232,7 @@ "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", - "lodash": "4.17.5", + "lodash": "4.17.10", "to-fast-properties": "1.0.3" } }, @@ -8430,13 +8316,30 @@ } }, "braces": { - "version": "1.8.5", + "version": "2.3.2", "bundled": true, "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } } }, "builtin-modules": { @@ -8590,7 +8493,7 @@ "dev": true }, "core-js": { - "version": "2.5.5", + "version": "2.5.6", "bundled": true, "dev": true }, @@ -8599,7 +8502,7 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "which": "1.3.0" } }, @@ -8726,7 +8629,7 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "shebang-command": "1.2.0", "which": "1.3.0" } @@ -8734,19 +8637,35 @@ } }, "expand-brackets": { - "version": "0.1.5", + "version": "2.1.4", "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", - "bundled": true, - "dev": true, - "requires": { - "fill-range": "2.2.3" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } } }, "extend-shallow": { @@ -8769,28 +8688,88 @@ } }, "extglob": { - "version": "0.3.2", + "version": "2.0.4", "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, - "filename-regex": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, "fill-range": { - "version": "2.2.3", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } } }, "find-cache-dir": { @@ -8816,14 +8795,6 @@ "bundled": true, "dev": true }, - "for-own": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "for-in": "1.0.2" - } - }, "foreground-child": { "version": "1.5.6", "bundled": true, @@ -8874,23 +8845,6 @@ "path-is-absolute": "1.0.1" } }, - "glob-base": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-glob": "2.0.1" - } - }, "globals": { "version": "9.18.0", "bundled": true, @@ -9077,29 +9031,11 @@ } } }, - "is-dotfile": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "requires": { - "is-primitive": "2.0.0" - } - }, "is-extendable": { "version": "0.1.1", "bundled": true, "dev": true }, - "is-extglob": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "is-finite": { "version": "1.0.2", "bundled": true, @@ -9113,16 +9049,8 @@ "bundled": true, "dev": true }, - "is-glob": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, "is-number": { - "version": "2.1.0", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { @@ -9159,16 +9087,6 @@ } } }, - "is-posix-bracket": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, "is-stream": { "version": "1.1.0", "bundled": true, @@ -9195,12 +9113,9 @@ "dev": true }, "isobject": { - "version": "2.1.0", + "version": "3.0.1", "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } + "dev": true }, "istanbul-lib-coverage": { "version": "1.2.0", @@ -9341,7 +9256,7 @@ } }, "lodash": { - "version": "4.17.5", + "version": "4.17.10", "bundled": true, "dev": true }, @@ -9359,7 +9274,7 @@ } }, "lru-cache": { - "version": "4.1.2", + "version": "4.1.3", "bundled": true, "dev": true, "requires": { @@ -9417,23 +9332,30 @@ } }, "micromatch": { - "version": "2.3.11", + "version": "3.1.10", "bundled": true, "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, "mimic-fn": { @@ -9533,14 +9455,6 @@ "validate-npm-package-license": "3.0.3" } }, - "normalize-path": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, "npm-run-path": { "version": "2.0.2", "bundled": true, @@ -9594,15 +9508,6 @@ } } }, - "object.omit": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, "object.pick": { "version": "1.3.0", "bundled": true, @@ -9676,17 +9581,6 @@ "bundled": true, "dev": true }, - "parse-glob": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - } - }, "parse-json": { "version": "2.2.0", "bundled": true, @@ -9775,53 +9669,11 @@ "bundled": true, "dev": true }, - "preserve": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, "pseudomap": { "version": "1.0.2", "bundled": true, "dev": true }, - "randomatic": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, "read-pkg": { "version": "1.1.0", "bundled": true, @@ -9857,14 +9709,6 @@ "bundled": true, "dev": true }, - "regex-cache": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "is-equal-shallow": "0.1.3" - } - }, "regex-not": { "version": "1.0.2", "bundled": true, @@ -9874,11 +9718,6 @@ "safe-regex": "1.1.0" } }, - "remove-trailing-separator": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, "repeat-element": { "version": "1.1.2", "bundled": true, @@ -10108,7 +9947,7 @@ "bundled": true, "dev": true, "requires": { - "atob": "2.1.0", + "atob": "2.1.1", "decode-uri-component": "0.2.0", "resolve-url": "0.2.1", "source-map-url": "0.4.0", @@ -10764,7 +10603,7 @@ "bundled": true, "dev": true, "requires": { - "cliui": "4.0.0", + "cliui": "4.1.0", "decamelize": "1.2.0", "find-up": "2.1.0", "get-caller-file": "1.0.2", @@ -10789,7 +10628,7 @@ "dev": true }, "cliui": { - "version": "4.0.0", + "version": "4.1.0", "bundled": true, "dev": true, "requires": { @@ -11358,7 +11197,7 @@ "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", "core-js": "2.5.6", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0" } }, @@ -11405,7 +11244,7 @@ "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", "requires": { "core-js": "2.5.6", - "diff-match-patch": "1.0.0", + "diff-match-patch": "1.0.1", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", "type-name": "2.0.2" @@ -11519,7 +11358,7 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "8.10.12", + "@types/node": "8.10.17", "long": "4.0.0" }, "dependencies": { @@ -11567,9 +11406,9 @@ } }, "pumpify": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.0.tgz", - "integrity": "sha512-UWi0klDoq8xtVzlMRgENV9F7iCTZExaJQSQL187UXsxpk9NnrKGqTqqUNYAKGOzucSOxs2+jUnRNI+rLviPhJg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "requires": { "duplexify": "3.6.0", "inherits": "2.0.3", @@ -11598,23 +11437,21 @@ } }, "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", + "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" }, "dependencies": { - "kind-of": { + "is-number": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true } } }, @@ -11724,9 +11561,9 @@ } }, "regenerate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", - "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", "dev": true }, "regenerator-runtime": { @@ -11765,7 +11602,7 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "1.3.3", + "regenerate": "1.4.0", "regjsgen": "0.2.0", "regjsparser": "0.1.5" } @@ -11839,9 +11676,9 @@ } }, "request": { - "version": "2.85.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", - "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { "aws-sign2": "0.7.0", "aws4": "1.7.0", @@ -11851,7 +11688,6 @@ "forever-agent": "0.6.1", "form-data": "2.3.2", "har-validator": "5.0.3", - "hawk": "6.0.2", "http-signature": "1.2.0", "is-typedarray": "1.0.0", "isstream": "0.1.2", @@ -11861,7 +11697,6 @@ "performance-now": "2.1.0", "qs": "6.5.2", "safe-buffer": "5.1.2", - "stringstream": "0.0.5", "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", "uuid": "3.2.1" @@ -11980,7 +11815,7 @@ "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.1.tgz", "integrity": "sha512-PjAmtWIxjNj4Co/6FRtBl8afRP3CxrrIAnUzb1dzydfROd+6xt7xAebFeskgQgkfFf8NmzrXIoaB3HxmswXyxw==", "requires": { - "request": "2.85.0", + "request": "2.87.0", "through2": "2.0.3" } }, @@ -12154,7 +11989,7 @@ "@sinonjs/formatio": "2.0.0", "diff": "3.5.0", "lodash.get": "4.4.2", - "lolex": "2.3.2", + "lolex": "2.6.0", "nise": "1.3.3", "supports-color": "5.4.0", "type-detect": "4.0.8" @@ -12214,7 +12049,7 @@ "extend-shallow": "2.0.1", "map-cache": "0.2.2", "source-map": "0.5.7", - "source-map-resolve": "0.5.1", + "source-map-resolve": "0.5.2", "use": "3.1.0" }, "dependencies": { @@ -12308,14 +12143,6 @@ } } }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.2.1" - } - }, "sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", @@ -12331,9 +12158,9 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-resolve": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", - "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { "atob": "2.1.1", "decode-uri-component": "0.2.0", @@ -12343,9 +12170,9 @@ } }, "source-map-support": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", - "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { "buffer-from": "1.0.0", @@ -12402,7 +12229,7 @@ "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "requires": { - "async": "2.6.0", + "async": "2.6.1", "is-stream-ended": "0.1.4" } }, @@ -12528,11 +12355,6 @@ "type-name": "2.0.2" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -13320,7 +13142,7 @@ "requires": { "detect-indent": "5.0.0", "graceful-fs": "4.1.11", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "pify": "3.0.0", "sort-keys": "2.0.0", "write-file-atomic": "2.3.0" From df363abc85dc743090a75ad27c46edfec2d9bbea Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sun, 3 Jun 2018 17:47:21 -0700 Subject: [PATCH 0164/1029] chore(package): update nyc to version 12.0.2 (#117) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d762bdbb531..959fab29e80 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -96,7 +96,7 @@ "jsdoc": "^3.5.5", "methmeth": "^1.0.0", "mocha": "^5.0.0", - "nyc": "^11.2.1", + "nyc": "^12.0.2", "power-assert": "^1.4.4", "prettier": "^1.7.2", "propprop": "^0.3.0", From b9cd8bbd1db947d36ff12e62f6244e1dab775040 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 15 Jun 2018 19:19:26 -0700 Subject: [PATCH 0165/1029] fix: drop support for node 4.x and 9.x (#123) --- handwritten/logging/.circleci/config.yml | 24 +++--------------------- handwritten/logging/package.json | 2 +- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 9c2026d1938..6c3cacd8423 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -3,32 +3,24 @@ workflows: version: 2 tests: jobs: &workflow_jobs - - node4: + - node6: filters: &all_commits tags: only: /.*/ - - node6: - filters: *all_commits - node8: filters: *all_commits - - node9: - filters: *all_commits - node10: filters: *all_commits - lint: requires: - - node4 - node6 - node8 - - node9 - node10 filters: *all_commits - docs: requires: - - node4 - node6 - node8 - - node9 - node10 filters: *all_commits - system_tests: @@ -62,9 +54,9 @@ workflows: only: master jobs: *workflow_jobs jobs: - node4: + node6: docker: - - image: 'node:4' + - image: 'node:6' user: node steps: &unit_tests_steps - checkout @@ -95,21 +87,11 @@ jobs: name: Submit coverage data to codecov. command: node_modules/.bin/codecov when: always - node6: - docker: - - image: 'node:6' - user: node - steps: *unit_tests_steps node8: docker: - image: 'node:8' user: node steps: *unit_tests_steps - node9: - docker: - - image: 'node:9' - user: node - steps: *unit_tests_steps node10: docker: - image: 'node:10' diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 959fab29e80..552f9c08e7a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc.", "engines": { - "node": ">=4.0.0" + "node": ">=6.0.0" }, "repository": "googleapis/nodejs-logging", "main": "./src/index.js", From 1e37bdd5b774b00eeb685f65d15c5df108881744 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 15 Jun 2018 20:32:53 -0700 Subject: [PATCH 0166/1029] chore: update many dependencies (#122) --- handwritten/logging/package-lock.json | 5805 ++++++++++++------------- handwritten/logging/package.json | 56 +- 2 files changed, 2739 insertions(+), 3122 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 1802e85c66c..c085780b267 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -16,18 +16,18 @@ "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "6.22.0", - "babel-plugin-syntax-trailing-function-commas": "6.22.0", - "babel-plugin-transform-async-to-generator": "6.24.1", - "babel-plugin-transform-es2015-destructuring": "6.23.0", - "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", - "babel-plugin-transform-es2015-parameters": "6.24.1", - "babel-plugin-transform-es2015-spread": "6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "6.24.1", - "babel-plugin-transform-es2015-unicode-regex": "6.24.1", - "babel-plugin-transform-exponentiation-operator": "6.24.1", - "package-hash": "1.2.0" + "babel-plugin-check-es2015-constants": "^6.8.0", + "babel-plugin-syntax-trailing-function-commas": "^6.20.0", + "babel-plugin-transform-async-to-generator": "^6.16.0", + "babel-plugin-transform-es2015-destructuring": "^6.19.0", + "babel-plugin-transform-es2015-function-name": "^6.9.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", + "babel-plugin-transform-es2015-parameters": "^6.21.0", + "babel-plugin-transform-es2015-spread": "^6.8.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", + "babel-plugin-transform-exponentiation-operator": "^6.8.0", + "package-hash": "^1.2.0" }, "dependencies": { "md5-hex": { @@ -36,7 +36,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "package-hash": { @@ -45,7 +45,7 @@ "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", "dev": true, "requires": { - "md5-hex": "1.3.0" + "md5-hex": "^1.3.0" } } } @@ -56,8 +56,8 @@ "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", "dev": true, "requires": { - "@ava/babel-plugin-throws-helper": "2.0.0", - "babel-plugin-espower": "2.4.0" + "@ava/babel-plugin-throws-helper": "^2.0.0", + "babel-plugin-espower": "^2.3.2" } }, "@ava/write-file-atomic": { @@ -66,9 +66,142 @@ "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + }, + "@babel/code-frame": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz", + "integrity": "sha1-vs2AVIJzREDJ0TfkbXc0DmTX9Rs=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.49" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.49.tgz", + "integrity": "sha1-6c/9qROZaszseTu8JauRvBnQv3o=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.49", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.49.tgz", + "integrity": "sha1-olwRGbnwNSeGcBJuAiXAMEHI3jI=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.49", + "@babel/template": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.49" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.49.tgz", + "integrity": "sha1-z1Aj8y0q2S0Ic3STnOwJUby1FEE=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.49" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.49.tgz", + "integrity": "sha1-QNeO2glo0BGxxShm5XRs+yPldUg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.49" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.49.tgz", + "integrity": "sha1-lr3GtD4TSCASumaRsQGEktOWIsw=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + } + }, + "@babel/parser": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.49.tgz", + "integrity": "sha1-lE0MW6KBK7FZ7b0iZ0Ov0mUXm9w=", + "dev": true + }, + "@babel/template": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.49.tgz", + "integrity": "sha1-44q+ghfLl5P0YaUwbXrXRdg+HSc=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.49", + "@babel/parser": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.49", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.49.tgz", + "integrity": "sha1-TypzaCoYM07WYl0QCo0nMZ98LWg=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.49", + "@babel/generator": "7.0.0-beta.49", + "@babel/helper-function-name": "7.0.0-beta.49", + "@babel/helper-split-export-declaration": "7.0.0-beta.49", + "@babel/parser": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.49", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + }, + "dependencies": { + "globals": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", + "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.49.tgz", + "integrity": "sha1-t+Oxw/TUz+Eb34yJ8e/V4WF7h6Y=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } } }, "@concordance/react": { @@ -77,7 +210,7 @@ "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", "dev": true, "requires": { - "arrify": "1.0.1" + "arrify": "^1.0.1" } }, "@google-cloud/bigquery": { @@ -86,14 +219,14 @@ "integrity": "sha512-r4k4PvsoPB7DBBCsm4hz8WZj3KvZXikTcwSjAg+cn0JndAPIEad4XCd39RpniyPDSmp+n+d+kOAgebwMWj8q+w==", "dev": true, "requires": { - "@google-cloud/common": "0.17.0", - "arrify": "1.0.1", - "duplexify": "3.6.0", - "extend": "3.0.1", - "is": "3.2.1", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "uuid": "3.2.1" + "@google-cloud/common": "^0.17.0", + "arrify": "^1.0.0", + "duplexify": "^3.5.0", + "extend": "^3.0.1", + "is": "^3.0.1", + "stream-events": "^1.0.1", + "string-format-obj": "^1.0.0", + "uuid": "^3.1.0" } }, "@google-cloud/common": { @@ -101,24 +234,24 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.17.0.tgz", "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.10.1", - "is": "3.2.1", + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.0", + "is": "^3.2.0", "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.87.0", - "retry-request": "3.3.1", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" } }, "@google-cloud/common-grpc": { @@ -126,15 +259,15 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.6.1.tgz", "integrity": "sha512-pspOZVfmrCTP0svTNwFE8nYJsQp5rTUaeUpJwpgslDk5tDWFbYT3dZkANbiURcTSq0mo6hZmd+M5rPIzWMVUmA==", "requires": { - "@google-cloud/common": "0.17.0", - "dot-prop": "4.2.0", - "duplexify": "3.6.0", - "extend": "3.0.1", - "grpc": "1.11.3", - "is": "3.2.1", - "modelo": "4.2.3", - "retry-request": "3.3.1", - "through2": "2.0.3" + "@google-cloud/common": "^0.17.0", + "dot-prop": "^4.2.0", + "duplexify": "^3.5.1", + "extend": "^3.0.1", + "grpc": "^1.10.0", + "is": "^3.2.0", + "modelo": "^4.2.0", + "retry-request": "^3.3.1", + "through2": "^2.0.3" } }, "@google-cloud/nodejs-repo-tools": { @@ -151,7 +284,7 @@ "lodash": "4.17.5", "nyc": "11.4.1", "proxyquire": "1.8.0", - "semver": "5.5.0", + "semver": "^5.5.0", "sinon": "4.3.0", "string": "3.3.3", "supertest": "3.0.0", @@ -171,9 +304,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "is-fullwidth-code-point": { @@ -194,33 +327,33 @@ "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", "dev": true, "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "md5-hex": "1.3.0", - "merge-source-map": "1.0.4", - "micromatch": "2.3.11", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.1.1", - "yargs": "10.0.3", - "yargs-parser": "8.0.0" + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.3.0", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^1.9.1", + "istanbul-lib-report": "^1.1.2", + "istanbul-lib-source-maps": "^1.2.2", + "istanbul-reports": "^1.1.3", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.0.2", + "micromatch": "^2.3.11", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.5.4", + "signal-exit": "^3.0.1", + "spawn-wrap": "^1.4.2", + "test-exclude": "^4.1.1", + "yargs": "^10.0.3", + "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { @@ -228,9 +361,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -253,7 +386,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -266,7 +399,7 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -294,9 +427,9 @@ "bundled": true, "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" } }, "babel-generator": { @@ -304,14 +437,14 @@ "bundled": true, "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.6", + "trim-right": "^1.0.1" } }, "babel-messages": { @@ -319,7 +452,7 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -327,8 +460,8 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -336,11 +469,11 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -348,15 +481,15 @@ "bundled": true, "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, "babel-types": { @@ -364,10 +497,10 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -385,7 +518,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -394,9 +527,9 @@ "bundled": true, "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "builtin-modules": { @@ -409,9 +542,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, "camelcase": { @@ -426,8 +559,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -435,11 +568,11 @@ "bundled": true, "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "cliui": { @@ -448,8 +581,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -491,8 +624,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "debug": { @@ -518,7 +651,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "detect-indent": { @@ -526,7 +659,7 @@ "bundled": true, "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "error-ex": { @@ -534,7 +667,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "escape-string-regexp": { @@ -552,13 +685,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -566,9 +699,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -578,7 +711,7 @@ "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -586,7 +719,7 @@ "bundled": true, "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "^2.1.0" } }, "extglob": { @@ -594,7 +727,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "filename-regex": { @@ -607,11 +740,11 @@ "bundled": true, "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "find-cache-dir": { @@ -619,9 +752,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" } }, "find-up": { @@ -629,7 +762,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -642,7 +775,7 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreground-child": { @@ -650,8 +783,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, "fs.realpath": { @@ -674,12 +807,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -687,8 +820,8 @@ "bundled": true, "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -696,7 +829,7 @@ "bundled": true, "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "globals": { @@ -714,10 +847,10 @@ "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -725,7 +858,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -735,7 +868,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { @@ -758,8 +891,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -772,7 +905,7 @@ "bundled": true, "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -795,7 +928,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-dotfile": { @@ -808,7 +941,7 @@ "bundled": true, "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -826,7 +959,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -834,7 +967,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-glob": { @@ -842,7 +975,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-number": { @@ -850,7 +983,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-posix-bracket": { @@ -901,7 +1034,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -909,13 +1042,13 @@ "bundled": true, "dev": true, "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.1.1", + "semver": "^5.3.0" } }, "istanbul-lib-report": { @@ -923,10 +1056,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "supports-color": { @@ -934,7 +1067,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -944,11 +1077,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" }, "dependencies": { "debug": { @@ -966,7 +1099,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "js-tokens": { @@ -984,7 +1117,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -998,7 +1131,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -1006,11 +1139,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -1018,8 +1151,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -1044,7 +1177,7 @@ "bundled": true, "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "lru-cache": { @@ -1052,8 +1185,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "md5-hex": { @@ -1061,7 +1194,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -1074,7 +1207,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -1082,7 +1215,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } }, "micromatch": { @@ -1090,19 +1223,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "mimic-fn": { @@ -1115,7 +1248,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1141,10 +1274,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -1152,7 +1285,7 @@ "bundled": true, "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "npm-run-path": { @@ -1160,7 +1293,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -1178,8 +1311,8 @@ "bundled": true, "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "once": { @@ -1187,7 +1320,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -1195,8 +1328,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -1209,9 +1342,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "p-finally": { @@ -1229,7 +1362,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "^1.1.0" } }, "parse-glob": { @@ -1237,10 +1370,10 @@ "bundled": true, "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "parse-json": { @@ -1248,7 +1381,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -1256,7 +1389,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -1279,9 +1412,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -1299,7 +1432,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -1307,7 +1440,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -1315,8 +1448,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -1336,8 +1469,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -1345,7 +1478,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -1353,7 +1486,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1363,7 +1496,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1373,9 +1506,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -1383,8 +1516,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -1392,8 +1525,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -1408,7 +1541,7 @@ "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "remove-trailing-separator": { @@ -1431,7 +1564,7 @@ "bundled": true, "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "require-directory": { @@ -1455,7 +1588,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -1463,7 +1596,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "semver": { @@ -1481,7 +1614,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -1509,12 +1642,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.0" + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" } }, "spdx-correct": { @@ -1522,7 +1655,7 @@ "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-license-ids": "^1.0.2" } }, "spdx-expression-parse": { @@ -1540,8 +1673,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -1559,7 +1692,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -1569,7 +1702,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -1577,7 +1710,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -1595,11 +1728,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" + "arrify": "^1.0.1", + "micromatch": "^2.3.11", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, "to-fast-properties": { @@ -1618,9 +1751,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -1629,9 +1762,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -1648,8 +1781,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" } }, "which": { @@ -1657,7 +1790,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -1681,8 +1814,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { "string-width": { @@ -1690,9 +1823,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1707,9 +1840,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "y18n": { @@ -1727,18 +1860,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "8.0.0" + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.0.0" }, "dependencies": { "cliui": { @@ -1746,9 +1879,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" }, "dependencies": { "string-width": { @@ -1756,9 +1889,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1770,7 +1903,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -1788,9 +1921,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "proxyquire": { @@ -1799,9 +1932,9 @@ "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", "dev": true, "requires": { - "fill-keys": "1.0.2", - "module-not-found-error": "1.0.1", - "resolve": "1.1.7" + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.0", + "resolve": "~1.1.7" } }, "string-width": { @@ -1810,8 +1943,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -1820,7 +1953,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "yargs": { @@ -1829,18 +1962,18 @@ "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" } } } @@ -1851,22 +1984,22 @@ "integrity": "sha512-5on1I+x6jr8/cbqAO6N1GINRA81QlpzdXnonQvTkJrTz5b5FU0f4j7Ea9bdRNV5q/ShsdcIagCAO+0vL2l7thA==", "dev": true, "requires": { - "@google-cloud/common": "0.16.2", - "arrify": "1.0.1", - "async-each": "1.0.1", - "delay": "2.0.0", - "duplexify": "3.6.0", - "extend": "3.0.1", - "google-auto-auth": "0.9.7", - "google-gax": "0.16.1", - "google-proto-files": "0.15.1", - "is": "3.2.1", - "lodash.chunk": "4.2.0", - "lodash.merge": "4.6.1", - "lodash.snakecase": "4.1.1", - "protobufjs": "6.8.6", - "through2": "2.0.3", - "uuid": "3.2.1" + "@google-cloud/common": "^0.16.1", + "arrify": "^1.0.0", + "async-each": "^1.0.1", + "delay": "^2.0.0", + "duplexify": "^3.5.4", + "extend": "^3.0.1", + "google-auto-auth": "^0.9.0", + "google-gax": "^0.16.0", + "google-proto-files": "^0.15.0", + "is": "^3.0.1", + "lodash.chunk": "^4.2.0", + "lodash.merge": "^4.6.0", + "lodash.snakecase": "^4.1.1", + "protobufjs": "^6.8.1", + "through2": "^2.0.3", + "uuid": "^3.1.0" }, "dependencies": { "@google-cloud/common": { @@ -1875,24 +2008,38 @@ "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", "dev": true, "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.9.7", - "is": "3.2.1", + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.9.0", + "is": "^3.2.0", "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.87.0", - "retry-request": "3.3.1", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" + } + }, + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } }, "google-auto-auth": { @@ -1901,10 +2048,21 @@ "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", "dev": true, "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.5.0", - "request": "2.87.0" + "async": "^2.3.0", + "gcp-metadata": "^0.6.1", + "google-auth-library": "^1.3.1", + "request": "^2.79.0" + } + }, + "google-proto-files": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", + "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", + "dev": true, + "requires": { + "globby": "^7.1.1", + "power-assert": "^1.4.4", + "protobufjs": "^6.8.0" } } } @@ -1915,27 +2073,27 @@ "integrity": "sha512-QaAxzCkbhspwajoaEnT0GcnQcpjPRcBrHYuQsXtD05BtOJgVnHCLXSsfUiRdU0nVpK+Thp7+sTkQ0fvk5PanKg==", "dev": true, "requires": { - "@google-cloud/common": "0.17.0", - "arrify": "1.0.1", - "async": "2.6.1", - "compressible": "2.0.13", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "extend": "3.0.1", - "gcs-resumable-upload": "0.10.2", - "hash-stream-validation": "0.2.1", - "is": "3.2.1", - "mime": "2.3.1", - "mime-types": "2.1.18", - "once": "1.4.0", - "pumpify": "1.5.1", - "request": "2.87.0", - "safe-buffer": "5.1.2", - "snakeize": "0.1.0", - "stream-events": "1.0.4", - "through2": "2.0.3", - "xdg-basedir": "3.0.0" + "@google-cloud/common": "^0.17.0", + "arrify": "^1.0.0", + "async": "^2.0.1", + "compressible": "^2.0.12", + "concat-stream": "^1.5.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "extend": "^3.0.0", + "gcs-resumable-upload": "^0.10.2", + "hash-stream-validation": "^0.2.1", + "is": "^3.0.1", + "mime": "^2.2.0", + "mime-types": "^2.0.8", + "once": "^1.3.1", + "pumpify": "^1.5.1", + "request": "^2.85.0", + "safe-buffer": "^5.1.1", + "snakeize": "^0.1.0", + "stream-events": "^1.0.1", + "through2": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "@ladjs/time-require": { @@ -1944,10 +2102,10 @@ "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", "dev": true, "requires": { - "chalk": "0.4.0", - "date-time": "0.1.1", - "pretty-ms": "0.2.2", - "text-table": "0.2.0" + "chalk": "^0.4.0", + "date-time": "^0.1.1", + "pretty-ms": "^0.2.1", + "text-table": "^0.2.0" }, "dependencies": { "ansi-styles": { @@ -1962,9 +2120,9 @@ "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "dev": true, "requires": { - "ansi-styles": "1.0.0", - "has-color": "0.1.7", - "strip-ansi": "0.1.1" + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" } }, "pretty-ms": { @@ -1973,7 +2131,7 @@ "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", "dev": true, "requires": { - "parse-ms": "0.1.2" + "parse-ms": "^0.1.0" } }, "strip-ansi": { @@ -1989,14 +2147,14 @@ "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", "requires": { - "call-me-maybe": "1.0.1", - "glob-to-regexp": "0.3.0" + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" } }, "@nodelib/fs.stat": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.0.2.tgz", - "integrity": "sha512-vCpf75JDcdomXvUd7Rn6DfYAVqPAFI66FVjxiWGwh85OLdvfo3paBoPJaam5keIYRyUolnS7SleS/ZPCidCvzw==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz", + "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==" }, "@protobufjs/aspromise": { "version": "1.1.2", @@ -2023,8 +2181,8 @@ "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/inquire": "1.1.0" + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" } }, "@protobufjs/float": { @@ -2073,14 +2231,14 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.17.tgz", - "integrity": "sha512-3N3FRd/rA1v5glXjb90YdYUa+sOB7WrkU2rAhKZnF4TKD86Cym9swtulGuH0p9nxo7fP5woRNa8b0oFTpCO1bg==" + "version": "8.10.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", + "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==" }, "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" }, "acorn-es7-plugin": { "version": "1.1.7", @@ -2093,7 +2251,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "3.3.0" + "acorn": "^3.0.4" }, "dependencies": { "acorn": { @@ -2109,10 +2267,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { @@ -2127,9 +2285,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" }, "dependencies": { "kind-of": { @@ -2138,7 +2296,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2155,7 +2313,7 @@ "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -2176,8 +2334,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -2186,7 +2344,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2208,7 +2366,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.1" + "color-convert": "^1.9.0" } }, "anymatch": { @@ -2217,8 +2375,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" }, "dependencies": { "arr-diff": { @@ -2227,7 +2385,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "array-unique": { @@ -2242,9 +2400,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "expand-brackets": { @@ -2253,7 +2411,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "extglob": { @@ -2262,7 +2420,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-extglob": { @@ -2277,7 +2435,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "kind-of": { @@ -2286,7 +2444,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "micromatch": { @@ -2295,19 +2453,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } } } @@ -2318,7 +2476,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "argv": { @@ -2376,7 +2534,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -2399,8 +2557,8 @@ "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", "requires": { - "colour": "0.7.1", - "optjs": "3.2.2" + "colour": "~0.7.1", + "optjs": "~3.2.2" } }, "asn1": { @@ -2423,7 +2581,7 @@ "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "requires": { - "lodash": "4.17.10" + "lodash": "^4.17.10" } }, "async-each": { @@ -2454,89 +2612,89 @@ "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", "dev": true, "requires": { - "@ava/babel-preset-stage-4": "1.1.0", - "@ava/babel-preset-transform-test-files": "3.0.0", - "@ava/write-file-atomic": "2.2.0", - "@concordance/react": "1.0.0", - "@ladjs/time-require": "0.1.4", - "ansi-escapes": "3.1.0", - "ansi-styles": "3.2.1", - "arr-flatten": "1.1.0", - "array-union": "1.0.2", - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "auto-bind": "1.2.0", - "ava-init": "0.2.1", - "babel-core": "6.26.3", - "babel-generator": "6.26.1", - "babel-plugin-syntax-object-rest-spread": "6.13.0", - "bluebird": "3.5.1", - "caching-transform": "1.0.1", - "chalk": "2.4.1", - "chokidar": "1.7.0", - "clean-stack": "1.3.0", - "clean-yaml-object": "0.1.0", - "cli-cursor": "2.1.0", - "cli-spinners": "1.3.1", - "cli-truncate": "1.1.0", - "co-with-promise": "4.6.0", - "code-excerpt": "2.1.1", - "common-path-prefix": "1.0.0", - "concordance": "3.0.0", - "convert-source-map": "1.5.1", - "core-assert": "0.2.1", - "currently-unhandled": "0.4.1", - "debug": "3.1.0", - "dot-prop": "4.2.0", - "empower-core": "0.6.2", - "equal-length": "1.0.1", - "figures": "2.0.0", - "find-cache-dir": "1.0.0", - "fn-name": "2.0.1", - "get-port": "3.2.0", - "globby": "6.1.0", - "has-flag": "2.0.0", - "hullabaloo-config-manager": "1.1.1", - "ignore-by-default": "1.0.1", - "import-local": "0.1.1", - "indent-string": "3.2.0", - "is-ci": "1.1.0", - "is-generator-fn": "1.0.0", - "is-obj": "1.0.1", - "is-observable": "1.1.0", - "is-promise": "2.1.0", - "last-line-stream": "1.0.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.debounce": "4.0.8", - "lodash.difference": "4.5.0", - "lodash.flatten": "4.4.0", - "loud-rejection": "1.6.0", - "make-dir": "1.3.0", - "matcher": "1.1.0", - "md5-hex": "2.0.0", - "meow": "3.7.0", - "ms": "2.0.0", - "multimatch": "2.1.0", - "observable-to-promise": "0.5.0", - "option-chain": "1.0.0", - "package-hash": "2.0.0", - "pkg-conf": "2.1.0", - "plur": "2.1.2", - "pretty-ms": "3.1.0", - "require-precompiled": "0.1.0", - "resolve-cwd": "2.0.0", - "safe-buffer": "5.1.2", - "semver": "5.5.0", - "slash": "1.0.0", - "source-map-support": "0.5.6", - "stack-utils": "1.0.1", - "strip-ansi": "4.0.0", - "strip-bom-buf": "1.0.0", - "supertap": "1.0.0", - "supports-color": "5.4.0", - "trim-off-newlines": "1.0.1", - "unique-temp-dir": "1.0.0", - "update-notifier": "2.5.0" + "@ava/babel-preset-stage-4": "^1.1.0", + "@ava/babel-preset-transform-test-files": "^3.0.0", + "@ava/write-file-atomic": "^2.2.0", + "@concordance/react": "^1.0.0", + "@ladjs/time-require": "^0.1.4", + "ansi-escapes": "^3.0.0", + "ansi-styles": "^3.1.0", + "arr-flatten": "^1.0.1", + "array-union": "^1.0.1", + "array-uniq": "^1.0.2", + "arrify": "^1.0.0", + "auto-bind": "^1.1.0", + "ava-init": "^0.2.0", + "babel-core": "^6.17.0", + "babel-generator": "^6.26.0", + "babel-plugin-syntax-object-rest-spread": "^6.13.0", + "bluebird": "^3.0.0", + "caching-transform": "^1.0.0", + "chalk": "^2.0.1", + "chokidar": "^1.4.2", + "clean-stack": "^1.1.1", + "clean-yaml-object": "^0.1.0", + "cli-cursor": "^2.1.0", + "cli-spinners": "^1.0.0", + "cli-truncate": "^1.0.0", + "co-with-promise": "^4.6.0", + "code-excerpt": "^2.1.1", + "common-path-prefix": "^1.0.0", + "concordance": "^3.0.0", + "convert-source-map": "^1.5.1", + "core-assert": "^0.2.0", + "currently-unhandled": "^0.4.1", + "debug": "^3.0.1", + "dot-prop": "^4.1.0", + "empower-core": "^0.6.1", + "equal-length": "^1.0.0", + "figures": "^2.0.0", + "find-cache-dir": "^1.0.0", + "fn-name": "^2.0.0", + "get-port": "^3.0.0", + "globby": "^6.0.0", + "has-flag": "^2.0.0", + "hullabaloo-config-manager": "^1.1.0", + "ignore-by-default": "^1.0.0", + "import-local": "^0.1.1", + "indent-string": "^3.0.0", + "is-ci": "^1.0.7", + "is-generator-fn": "^1.0.0", + "is-obj": "^1.0.0", + "is-observable": "^1.0.0", + "is-promise": "^2.1.0", + "last-line-stream": "^1.0.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.debounce": "^4.0.3", + "lodash.difference": "^4.3.0", + "lodash.flatten": "^4.2.0", + "loud-rejection": "^1.2.0", + "make-dir": "^1.0.0", + "matcher": "^1.0.0", + "md5-hex": "^2.0.0", + "meow": "^3.7.0", + "ms": "^2.0.0", + "multimatch": "^2.1.0", + "observable-to-promise": "^0.5.0", + "option-chain": "^1.0.0", + "package-hash": "^2.0.0", + "pkg-conf": "^2.0.0", + "plur": "^2.0.0", + "pretty-ms": "^3.0.0", + "require-precompiled": "^0.1.0", + "resolve-cwd": "^2.0.0", + "safe-buffer": "^5.1.1", + "semver": "^5.4.1", + "slash": "^1.0.0", + "source-map-support": "^0.5.0", + "stack-utils": "^1.0.1", + "strip-ansi": "^4.0.0", + "strip-bom-buf": "^1.0.0", + "supertap": "^1.0.0", + "supports-color": "^5.0.0", + "trim-off-newlines": "^1.0.1", + "unique-temp-dir": "^1.0.0", + "update-notifier": "^2.3.0" }, "dependencies": { "ansi-regex": { @@ -2545,17 +2703,27 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "empower-core": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-0.6.2.tgz", + "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", + "dev": true, + "requires": { + "call-signature": "0.0.2", + "core-js": "^2.0.0" + } + }, "globby": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { - "array-union": "1.0.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -2576,7 +2744,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "strip-ansi": { @@ -2585,7 +2753,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2596,11 +2764,11 @@ "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", "dev": true, "requires": { - "arr-exclude": "1.0.0", - "execa": "0.7.0", - "has-yarn": "1.0.0", - "read-pkg-up": "2.0.0", - "write-pkg": "3.1.0" + "arr-exclude": "^1.0.0", + "execa": "^0.7.0", + "has-yarn": "^1.0.0", + "read-pkg-up": "^2.0.0", + "write-pkg": "^3.1.0" } }, "aws-sign2": { @@ -2618,8 +2786,8 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "1.5.0", - "is-buffer": "1.1.6" + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" } }, "babel-code-frame": { @@ -2628,9 +2796,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { "ansi-styles": { @@ -2645,11 +2813,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "supports-color": { @@ -2666,25 +2834,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-generator": "6.26.1", - "babel-helpers": "6.24.1", - "babel-messages": "6.23.0", - "babel-register": "6.26.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "convert-source-map": "1.5.1", - "debug": "2.6.9", - "json5": "0.5.1", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "path-is-absolute": "1.0.1", - "private": "0.1.8", - "slash": "1.0.0", - "source-map": "0.5.7" + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" }, "dependencies": { "debug": { @@ -2704,14 +2872,14 @@ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" }, "dependencies": { "jsesc": { @@ -2728,9 +2896,9 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "babel-helper-explode-assignable-expression": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-call-delegate": { @@ -2739,10 +2907,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-explode-assignable-expression": { @@ -2751,9 +2919,9 @@ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-function-name": { @@ -2762,11 +2930,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-get-function-arity": { @@ -2775,8 +2943,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-hoist-variables": { @@ -2785,8 +2953,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-regex": { @@ -2795,9 +2963,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, "babel-helper-remap-async-to-generator": { @@ -2806,11 +2974,11 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "dev": true, "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helpers": { @@ -2819,8 +2987,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, "babel-messages": { @@ -2829,7 +2997,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-check-es2015-constants": { @@ -2838,7 +3006,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-espower": { @@ -2847,13 +3015,13 @@ "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", "dev": true, "requires": { - "babel-generator": "6.26.1", - "babylon": "6.18.0", - "call-matcher": "1.0.1", - "core-js": "2.5.6", - "espower-location-detector": "1.0.0", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "babel-generator": "^6.1.0", + "babylon": "^6.1.0", + "call-matcher": "^1.0.0", + "core-js": "^2.0.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.1.1" } }, "babel-plugin-syntax-async-functions": { @@ -2886,9 +3054,9 @@ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "6.24.1", - "babel-plugin-syntax-async-functions": "6.13.0", - "babel-runtime": "6.26.0" + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -2897,7 +3065,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -2906,9 +3074,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -2917,10 +3085,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-types": "6.26.0" + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -2929,12 +3097,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "6.24.1", - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-spread": { @@ -2943,7 +3111,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -2952,9 +3120,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -2963,9 +3131,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "regexpu-core": "2.0.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { @@ -2974,9 +3142,9 @@ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", - "babel-plugin-syntax-exponentiation-operator": "6.13.0", - "babel-runtime": "6.26.0" + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-strict-mode": { @@ -2985,8 +3153,8 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-register": { @@ -2995,13 +3163,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "6.26.3", - "babel-runtime": "6.26.0", - "core-js": "2.5.6", - "home-or-tmp": "2.0.0", - "lodash": "4.17.10", - "mkdirp": "0.5.1", - "source-map-support": "0.4.18" + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" }, "dependencies": { "source-map-support": { @@ -3010,7 +3178,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -3021,8 +3189,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -3031,11 +3199,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -3044,15 +3212,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.4", - "lodash": "4.17.10" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" }, "dependencies": { "debug": { @@ -3072,10 +3240,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -3094,13 +3262,13 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -3108,7 +3276,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -3116,7 +3284,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -3124,7 +3292,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -3132,9 +3300,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -3145,7 +3313,7 @@ "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "binary-extensions": { @@ -3166,13 +3334,13 @@ "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.4.1", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "2.0.0" + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3199,8 +3367,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3209,7 +3377,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3219,7 +3387,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -3228,16 +3396,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -3245,7 +3413,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -3268,9 +3436,9 @@ "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" }, "buffer-from": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==" }, "builtin-modules": { "version": "1.1.1", @@ -3283,7 +3451,7 @@ "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { - "long": "3.2.0" + "long": "~3" } }, "cache-base": { @@ -3291,15 +3459,15 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "cacheable-request": { @@ -3331,9 +3499,9 @@ "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" }, "dependencies": { "md5-hex": { @@ -3342,7 +3510,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "write-file-atomic": { @@ -3351,9 +3519,9 @@ "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } } } @@ -3364,10 +3532,10 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.6", - "deep-equal": "1.0.1", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "core-js": "^2.0.0", + "deep-equal": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.0.0" } }, "call-me-maybe": { @@ -3386,7 +3554,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -3406,8 +3574,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" }, "dependencies": { "map-obj": { @@ -3434,7 +3602,7 @@ "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", "dev": true, "requires": { - "underscore-contrib": "0.3.0" + "underscore-contrib": "~0.3.0" } }, "center-align": { @@ -3444,8 +3612,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -3454,9 +3622,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "chardet": { @@ -3471,15 +3639,15 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.2.4", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" }, "dependencies": { "glob-parent": { @@ -3488,7 +3656,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -3503,7 +3671,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -3525,10 +3693,10 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -3536,7 +3704,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -3565,7 +3733,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-spinners": { @@ -3580,8 +3748,8 @@ "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", "dev": true, "requires": { - "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "slice-ansi": "^1.0.0", + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3602,8 +3770,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3612,7 +3780,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3628,9 +3796,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, "clone-response": { @@ -3639,7 +3807,7 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "co": { @@ -3653,7 +3821,7 @@ "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", "dev": true, "requires": { - "pinkie-promise": "1.0.0" + "pinkie-promise": "^1.0.0" } }, "code-excerpt": { @@ -3662,7 +3830,7 @@ "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", "dev": true, "requires": { - "convert-to-spaces": "1.0.2" + "convert-to-spaces": "^1.0.1" } }, "code-point-at": { @@ -3677,7 +3845,7 @@ "dev": true, "requires": { "argv": "0.0.2", - "request": "2.87.0", + "request": "^2.81.0", "urlgrey": "0.4.4" } }, @@ -3686,23 +3854,23 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "1.1.1" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", "dev": true }, "colors": { @@ -3721,7 +3889,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -3748,12 +3916,20 @@ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "compressible": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", - "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", + "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", "dev": true, "requires": { - "mime-db": "1.33.0" + "mime-db": ">= 1.34.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.34.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.34.0.tgz", + "integrity": "sha1-RS0Oz/XDA0am3B5kseruDTcZ/5o=", + "dev": true + } } }, "concat-map": { @@ -3766,10 +3942,10 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { - "buffer-from": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "concordance": { @@ -3778,17 +3954,17 @@ "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", "dev": true, "requires": { - "date-time": "2.1.0", - "esutils": "2.0.2", - "fast-diff": "1.1.2", - "function-name-support": "0.2.0", - "js-string-escape": "1.0.1", - "lodash.clonedeep": "4.5.0", - "lodash.flattendeep": "4.4.0", - "lodash.merge": "4.6.1", - "md5-hex": "2.0.0", - "semver": "5.5.0", - "well-known-symbols": "1.0.0" + "date-time": "^2.1.0", + "esutils": "^2.0.2", + "fast-diff": "^1.1.1", + "function-name-support": "^0.2.0", + "js-string-escape": "^1.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.flattendeep": "^4.4.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "semver": "^5.3.0", + "well-known-symbols": "^1.0.0" }, "dependencies": { "date-time": { @@ -3797,7 +3973,7 @@ "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "dev": true, "requires": { - "time-zone": "1.0.0" + "time-zone": "^1.0.0" } } } @@ -3808,12 +3984,12 @@ "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.3.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "convert-source-map": { @@ -3829,9 +4005,9 @@ "dev": true }, "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", "dev": true }, "copy-descriptor": { @@ -3845,14 +4021,14 @@ "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", "dev": true, "requires": { - "buf-compare": "1.0.1", - "is-error": "2.2.1" + "buf-compare": "^1.0.0", + "is-error": "^2.2.0" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==" + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" }, "core-util-is": { "version": "1.0.2", @@ -3864,7 +4040,7 @@ "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "requires": { - "capture-stack-trace": "1.0.0" + "capture-stack-trace": "^1.0.0" } }, "cross-spawn": { @@ -3873,9 +4049,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "crypto-random-string": { @@ -3890,7 +4066,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "1.0.2" + "array-find-index": "^1.0.1" } }, "d": { @@ -3899,7 +4075,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.42" + "es5-ext": "^0.10.9" } }, "d64": { @@ -3912,7 +4088,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "date-time": { @@ -3945,7 +4121,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "deep-equal": { @@ -3955,9 +4131,9 @@ "dev": true }, "deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, "deep-is": { @@ -3971,8 +4147,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "define-property": { @@ -3980,8 +4156,8 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -3989,7 +4165,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -3997,7 +4173,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -4005,9 +4181,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -4018,13 +4194,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.1", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" }, "dependencies": { "globby": { @@ -4033,12 +4209,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -4059,7 +4235,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } } } @@ -4070,7 +4246,7 @@ "integrity": "sha1-kRLq3APk7H4AKXM3iW8nO72R+uU=", "dev": true, "requires": { - "p-defer": "1.0.0" + "p-defer": "^1.0.0" } }, "delayed-stream": { @@ -4084,7 +4260,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "diff": { @@ -4103,8 +4279,8 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "requires": { - "arrify": "1.0.1", - "path-type": "3.0.0" + "arrify": "^1.0.1", + "path-type": "^3.0.0" } }, "doctrine": { @@ -4113,7 +4289,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "dom-serializer": { @@ -4122,8 +4298,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" }, "dependencies": { "domelementtype": { @@ -4146,7 +4322,7 @@ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "domutils": { @@ -4155,8 +4331,8 @@ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" + "dom-serializer": "0", + "domelementtype": "1" } }, "dot-prop": { @@ -4164,7 +4340,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "requires": { - "is-obj": "1.0.1" + "is-obj": "^1.0.0" } }, "duplexer3": { @@ -4178,16 +4354,16 @@ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "requires": { - "end-of-stream": "1.4.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "stream-shift": "1.0.0" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, "eastasianwidth": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", - "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "ecc-jsbn": { "version": "0.1.1", @@ -4195,7 +4371,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "ecdsa-sig-formatter": { @@ -4203,16 +4379,16 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "empower": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", - "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.0.tgz", + "integrity": "sha512-tP2WqM7QzrPguCCQEQfFFDF+6Pw6YWLQal3+GHQaV+0uIr0S+jyREQPWljE02zFCYPFYLZ3LosiRV+OzTrxPpQ==", "requires": { - "core-js": "2.5.6", - "empower-core": "0.6.2" + "core-js": "^2.0.0", + "empower-core": "^1.2.0" } }, "empower-assert": { @@ -4221,16 +4397,16 @@ "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.2.0" } }, "empower-core": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-0.6.2.tgz", - "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-1.2.0.tgz", + "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.6" + "core-js": "^2.0.0" } }, "end-of-stream": { @@ -4238,7 +4414,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "ent": { @@ -4264,18 +4440,18 @@ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es5-ext": { - "version": "0.10.42", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", - "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", + "version": "0.10.45", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", + "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", "dev": true, "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "next-tick": "1.0.0" + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" } }, "es6-error": { @@ -4290,9 +4466,9 @@ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, "es6-map": { @@ -4301,12 +4477,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" } }, "es6-set": { @@ -4315,11 +4491,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-iterator": "2.0.3", + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "event-emitter": "~0.3.5" } }, "es6-symbol": { @@ -4328,8 +4504,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42" + "d": "1", + "es5-ext": "~0.10.14" } }, "es6-weak-map": { @@ -4338,10 +4514,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" } }, "escallmatch": { @@ -4350,8 +4526,8 @@ "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", "dev": true, "requires": { - "call-matcher": "1.0.1", - "esprima": "2.7.3" + "call-matcher": "^1.0.0", + "esprima": "^2.0.0" }, "dependencies": { "esprima": { @@ -4369,16 +4545,16 @@ "dev": true }, "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz", + "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", "dev": true, "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" }, "dependencies": { "esprima": { @@ -4402,10 +4578,10 @@ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint": { @@ -4414,44 +4590,44 @@ "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { - "ajv": "5.5.2", - "babel-code-frame": "6.26.0", - "chalk": "2.4.1", - "concat-stream": "1.6.2", - "cross-spawn": "5.1.0", - "debug": "3.1.0", - "doctrine": "2.1.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "1.0.0", - "espree": "3.5.4", - "esquery": "1.0.1", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.5.0", - "ignore": "3.3.8", - "imurmurhash": "0.1.4", - "inquirer": "3.3.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.11.0", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", - "regexpp": "1.1.0", - "require-uncached": "1.0.3", - "semver": "5.5.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.4", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", "table": "4.0.2", - "text-table": "0.2.0" + "text-table": "~0.2.0" }, "dependencies": { "ansi-regex": { @@ -4472,7 +4648,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -4483,7 +4659,7 @@ "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { - "get-stdin": "5.0.1" + "get-stdin": "^5.0.1" }, "dependencies": { "get-stdin": { @@ -4500,19 +4676,19 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "3.3.8", - "minimatch": "3.0.4", - "resolve": "1.7.1", - "semver": "5.5.0" + "ignore": "^3.3.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", + "semver": "^5.4.1" }, "dependencies": { "resolve": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", - "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.0.tgz", + "integrity": "sha512-MNcwJ8/K9iJqFDBDyhcxZuDWvf/ai0GcAJWetx2Cvvcz4HLfA8j0KasWR5Z6ChcbjYZ+FaczcXjN2jrCXCjQ4w==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } } } @@ -4523,8 +4699,8 @@ "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", "dev": true, "requires": { - "fast-diff": "1.1.2", - "jest-docblock": "21.2.0" + "fast-diff": "^1.1.1", + "jest-docblock": "^21.0.0" } }, "eslint-scope": { @@ -4533,8 +4709,8 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint-visitor-keys": { @@ -4549,16 +4725,16 @@ "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", "dev": true, "requires": { - "array-find": "1.0.0", - "escallmatch": "1.5.0", - "escodegen": "1.9.1", - "escope": "3.6.0", - "espower-location-detector": "1.0.0", - "espurify": "1.8.0", - "estraverse": "4.2.0", - "source-map": "0.5.7", - "type-name": "2.0.2", - "xtend": "4.0.1" + "array-find": "^1.0.0", + "escallmatch": "^1.5.0", + "escodegen": "^1.7.0", + "escope": "^3.3.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.3.0", + "estraverse": "^4.1.0", + "source-map": "^0.5.0", + "type-name": "^2.0.0", + "xtend": "^4.0.0" } }, "espower-loader": { @@ -4567,11 +4743,11 @@ "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", "dev": true, "requires": { - "convert-source-map": "1.5.1", - "espower-source": "2.2.0", - "minimatch": "3.0.4", - "source-map-support": "0.4.18", - "xtend": "4.0.1" + "convert-source-map": "^1.1.0", + "espower-source": "^2.0.0", + "minimatch": "^3.0.0", + "source-map-support": "^0.4.0", + "xtend": "^4.0.0" }, "dependencies": { "source-map-support": { @@ -4580,7 +4756,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -4591,37 +4767,29 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "1.2.4", - "path-is-absolute": "1.0.1", - "source-map": "0.5.7", - "xtend": "4.0.1" + "is-url": "^1.2.1", + "path-is-absolute": "^1.0.0", + "source-map": "^0.5.0", + "xtend": "^4.0.0" } }, "espower-source": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.2.0.tgz", - "integrity": "sha1-fgBSVa5HtcE2RIZEs/PYAtUD91I=", - "dev": true, - "requires": { - "acorn": "5.5.3", - "acorn-es7-plugin": "1.1.7", - "convert-source-map": "1.5.1", - "empower-assert": "1.1.0", - "escodegen": "1.9.1", - "espower": "2.1.1", - "estraverse": "4.2.0", - "merge-estraverse-visitors": "1.0.0", - "multi-stage-sourcemap": "0.2.1", - "path-is-absolute": "1.0.1", - "xtend": "4.0.1" - }, - "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", - "dev": true - } + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.3.0.tgz", + "integrity": "sha512-Wc4kC4zUAEV7Qt31JRPoBUc5jjowHRylml2L2VaDQ1XEbnqQofGWx+gPR03TZAPokAMl5dqyL36h3ITyMXy3iA==", + "dev": true, + "requires": { + "acorn": "^5.0.0", + "acorn-es7-plugin": "^1.0.10", + "convert-source-map": "^1.1.1", + "empower-assert": "^1.0.0", + "escodegen": "^1.10.0", + "espower": "^2.1.1", + "estraverse": "^4.0.0", + "merge-estraverse-visitors": "^1.0.0", + "multi-stage-sourcemap": "^0.2.1", + "path-is-absolute": "^1.0.0", + "xtend": "^4.0.0" } }, "espree": { @@ -4630,16 +4798,8 @@ "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "5.5.3", - "acorn-jsx": "3.0.1" - }, - "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", - "dev": true - } + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" } }, "esprima": { @@ -4653,7 +4813,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", "requires": { - "core-js": "2.5.6" + "core-js": "^2.0.0" } }, "esquery": { @@ -4662,7 +4822,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -4671,7 +4831,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -4691,8 +4851,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42" + "d": "1", + "es5-ext": "~0.10.14" } }, "eventid": { @@ -4700,8 +4860,8 @@ "resolved": "https://registry.npmjs.org/eventid/-/eventid-0.1.2.tgz", "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", "requires": { - "d64": "1.0.0", - "uuid": "3.2.1" + "d64": "^1.0.0", + "uuid": "^3.0.1" } }, "execa": { @@ -4710,13 +4870,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, "expand-brackets": { @@ -4724,13 +4884,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "debug": { @@ -4746,7 +4906,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -4754,7 +4914,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -4765,7 +4925,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.4" + "fill-range": "^2.1.0" }, "dependencies": { "fill-range": { @@ -4774,11 +4934,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "3.0.0", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "is-number": { @@ -4787,7 +4947,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "isobject": { @@ -4805,7 +4965,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -4820,8 +4980,8 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -4829,7 +4989,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -4840,9 +5000,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.23", - "tmp": "0.0.33" + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" } }, "extglob": { @@ -4850,14 +5010,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -4865,7 +5025,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -4873,7 +5033,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -4881,7 +5041,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -4889,7 +5049,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -4897,9 +5057,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -4925,12 +5085,12 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { - "@mrmlnc/readdir-enhanced": "2.2.1", - "@nodelib/fs.stat": "1.0.2", - "glob-parent": "3.1.0", - "is-glob": "4.0.0", - "merge2": "1.2.2", - "micromatch": "3.1.10" + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" } }, "fast-json-stable-stringify": { @@ -4950,7 +5110,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -4959,8 +5119,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "filename-regex": { @@ -4975,8 +5135,8 @@ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", "dev": true, "requires": { - "is-object": "1.0.1", - "merge-descriptors": "1.0.1" + "is-object": "~1.0.1", + "merge-descriptors": "~1.0.0" } }, "fill-range": { @@ -4984,10 +5144,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -4995,7 +5155,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -5006,9 +5166,9 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "1.0.1", - "make-dir": "1.3.0", - "pkg-dir": "2.0.0" + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" } }, "find-up": { @@ -5017,7 +5177,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -5026,10 +5186,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" } }, "fn-name": { @@ -5043,7 +5203,7 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", "requires": { - "debug": "3.1.0" + "debug": "^3.1.0" } }, "for-in": { @@ -5057,7 +5217,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreach": { @@ -5075,9 +5235,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "0.4.0", + "asynckit": "^0.4.0", "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "mime-types": "^2.1.12" } }, "formidable": { @@ -5091,7 +5251,7 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "from2": { @@ -5100,8 +5260,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" } }, "fs-extra": { @@ -5110,9 +5270,9 @@ "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "fs.realpath": { @@ -5127,8 +5287,8 @@ "dev": true, "optional": true, "requires": { - "nan": "2.10.0", - "node-pre-gyp": "0.10.0" + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" }, "dependencies": { "abbrev": { @@ -5154,8 +5314,8 @@ "dev": true, "optional": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -5168,7 +5328,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -5232,7 +5392,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -5247,14 +5407,14 @@ "dev": true, "optional": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "glob": { @@ -5263,12 +5423,12 @@ "dev": true, "optional": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -5283,7 +5443,7 @@ "dev": true, "optional": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "^2.1.0" } }, "ignore-walk": { @@ -5292,7 +5452,7 @@ "dev": true, "optional": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { @@ -5301,8 +5461,8 @@ "dev": true, "optional": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -5321,7 +5481,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -5335,7 +5495,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -5348,8 +5508,8 @@ "bundled": true, "dev": true, "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" } }, "minizlib": { @@ -5358,7 +5518,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -5381,9 +5541,9 @@ "dev": true, "optional": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.21", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { @@ -5392,16 +5552,16 @@ "dev": true, "optional": true, "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.0", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.7", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.1" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, "nopt": { @@ -5410,8 +5570,8 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -5426,8 +5586,8 @@ "dev": true, "optional": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { @@ -5436,10 +5596,10 @@ "dev": true, "optional": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { @@ -5458,7 +5618,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -5479,8 +5639,8 @@ "dev": true, "optional": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -5501,10 +5661,10 @@ "dev": true, "optional": true, "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -5521,13 +5681,13 @@ "dev": true, "optional": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { @@ -5536,7 +5696,7 @@ "dev": true, "optional": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { @@ -5579,9 +5739,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -5590,7 +5750,7 @@ "dev": true, "optional": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -5598,7 +5758,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -5613,13 +5773,13 @@ "dev": true, "optional": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" } }, "util-deprecate": { @@ -5634,7 +5794,7 @@ "dev": true, "optional": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wrappy": { @@ -5666,8 +5826,8 @@ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", "requires": { - "axios": "0.18.0", - "extend": "3.0.1", + "axios": "^0.18.0", + "extend": "^3.0.1", "retry-axios": "0.3.2" } }, @@ -5677,11 +5837,11 @@ "integrity": "sha1-fymz7iPc7EFwNnwHEUGCScZgVF8=", "dev": true, "requires": { - "configstore": "3.1.2", - "google-auto-auth": "0.10.1", - "pumpify": "1.5.1", - "request": "2.87.0", - "stream-events": "1.0.4" + "configstore": "^3.1.2", + "google-auto-auth": "^0.10.0", + "pumpify": "^1.4.0", + "request": "^2.85.0", + "stream-events": "^1.0.3" } }, "get-caller-file": { @@ -5718,7 +5878,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "glob": { @@ -5726,12 +5886,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -5740,8 +5900,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" }, "dependencies": { "glob-parent": { @@ -5750,7 +5910,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -5765,7 +5925,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -5775,8 +5935,8 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { @@ -5784,7 +5944,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.0" } } } @@ -5800,7 +5960,7 @@ "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, "requires": { - "ini": "1.3.5" + "ini": "^1.3.4" } }, "globals": { @@ -5814,27 +5974,27 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "fast-glob": "2.2.2", - "glob": "7.1.2", - "ignore": "3.3.8", - "pify": "3.0.0", - "slash": "1.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } }, "google-auth-library": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.5.0.tgz", - "integrity": "sha512-xpibA/hkq4waBcpIkSJg4GiDAqcBWjJee3c47zj7xP3RQ0A9mc8MP3Vc9sc8SGRoDYA0OszZxTjW7SbcC4pJIA==", - "requires": { - "axios": "0.18.0", - "gcp-metadata": "0.6.3", - "gtoken": "2.3.0", - "jws": "3.1.5", - "lodash.isstring": "4.0.1", - "lru-cache": "4.1.3", - "retry-axios": "0.3.2" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz", + "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==", + "requires": { + "axios": "^0.18.0", + "gcp-metadata": "^0.6.3", + "gtoken": "^2.3.0", + "jws": "^3.1.5", + "lodash.isstring": "^4.0.1", + "lru-cache": "^4.1.3", + "retry-axios": "^0.3.2" } }, "google-auto-auth": { @@ -5842,10 +6002,10 @@ "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.5.0", - "request": "2.87.0" + "async": "^2.3.0", + "gcp-metadata": "^0.6.1", + "google-auth-library": "^1.3.1", + "request": "^2.79.0" } }, "google-gax": { @@ -5853,16 +6013,43 @@ "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "requires": { - "duplexify": "3.6.0", - "extend": "3.0.1", - "globby": "8.0.1", - "google-auto-auth": "0.10.1", - "google-proto-files": "0.15.1", - "grpc": "1.11.3", - "is-stream-ended": "0.1.4", - "lodash": "4.17.10", - "protobufjs": "6.8.6", - "through2": "2.0.3" + "duplexify": "^3.5.4", + "extend": "^3.0.0", + "globby": "^8.0.0", + "google-auto-auth": "^0.10.0", + "google-proto-files": "^0.15.0", + "grpc": "^1.10.0", + "is-stream-ended": "^0.1.0", + "lodash": "^4.17.2", + "protobufjs": "^6.8.0", + "through2": "^2.0.3" + }, + "dependencies": { + "google-proto-files": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", + "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", + "requires": { + "globby": "^7.1.1", + "power-assert": "^1.4.4", + "protobufjs": "^6.8.0" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + } + } + } } }, "google-p12-pem": { @@ -5870,33 +6057,18 @@ "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", "requires": { - "node-forge": "0.7.5", - "pify": "3.0.0" + "node-forge": "^0.7.4", + "pify": "^3.0.0" } }, "google-proto-files": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", - "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.0.tgz", + "integrity": "sha512-ZVW1m38l6dJGTqOXuEQnr5VfWxkOsdkDetWGUchq8zXbo3PSVlZU7VQM/YS1pbc/6+mZy3R+xirctVaoLzIhXw==", "requires": { - "globby": "7.1.1", - "power-assert": "1.5.0", - "protobufjs": "6.8.6" - }, - "dependencies": { - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.8", - "pify": "3.0.0", - "slash": "1.0.0" - } - } + "globby": "^8.0.0", + "power-assert": "^1.4.4", + "protobufjs": "^6.8.0" } }, "got": { @@ -5905,23 +6077,23 @@ "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", "dev": true, "requires": { - "@sindresorhus/is": "0.7.0", - "cacheable-request": "2.1.4", - "decompress-response": "3.3.0", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "into-stream": "3.1.0", - "is-retry-allowed": "1.1.0", - "isurl": "1.0.0", - "lowercase-keys": "1.0.1", - "mimic-response": "1.0.0", - "p-cancelable": "0.3.0", - "p-timeout": "2.0.1", - "pify": "3.0.0", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "url-parse-lax": "3.0.0", - "url-to-options": "1.0.1" + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" }, "dependencies": { "prepend-http": { @@ -5936,7 +6108,7 @@ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "2.0.0" + "prepend-http": "^2.0.0" } } } @@ -5954,14 +6126,14 @@ "dev": true }, "grpc": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.3.tgz", - "integrity": "sha512-7fJ40USpnP7hxGK0uRoEhJz6unA5VUdwInfwAY2rK2+OVxdDJSdTZQ/8/M+1tW68pHZYgHvg2ohvJ+clhW3ANg==", - "requires": { - "lodash": "4.17.10", - "nan": "2.10.0", - "node-pre-gyp": "0.10.0", - "protobufjs": "5.0.3" + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.3.tgz", + "integrity": "sha512-QPwbAXRXd8IyXAhTdUVgjEqSdvXoTq5uFWSo+eGMTcra12PBJUkAceD+1AUVOx1GqBY74/7T7eB7BB+UOcOY8w==", + "requires": { + "lodash": "^4.17.5", + "nan": "^2.0.0", + "node-pre-gyp": "^0.10.0", + "protobufjs": "^5.0.3" }, "dependencies": { "abbrev": { @@ -5980,8 +6152,8 @@ "version": "1.1.4", "bundled": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -5992,7 +6164,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -6039,7 +6211,7 @@ "version": "1.2.5", "bundled": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -6050,26 +6222,26 @@ "version": "2.7.4", "bundled": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "glob": { "version": "7.1.2", "bundled": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -6077,22 +6249,25 @@ "bundled": true }, "iconv-lite": { - "version": "0.4.19", - "bundled": true + "version": "0.4.23", + "bundled": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } }, "ignore-walk": { "version": "3.0.1", "bundled": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -6107,7 +6282,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -6118,7 +6293,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -6126,18 +6301,18 @@ "bundled": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.0", "bundled": true, "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" } }, "minizlib": { "version": "1.1.0", "bundled": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -6161,33 +6336,33 @@ "version": "2.2.1", "bundled": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.19", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { "version": "0.10.0", "bundled": true, "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.1", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.7", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.2" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, "nopt": { "version": "4.0.1", "bundled": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -6198,18 +6373,18 @@ "version": "1.1.10", "bundled": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { "version": "4.1.2", "bundled": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { @@ -6224,7 +6399,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -6239,8 +6414,8 @@ "version": "0.1.5", "bundled": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -6256,44 +6431,48 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { - "ascli": "1.0.1", - "bytebuffer": "5.0.1", - "glob": "7.1.2", - "yargs": "3.32.0" + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" } }, "rc": { "version": "1.2.7", "bundled": true, "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" } }, "readable-stream": { "version": "2.3.6", "bundled": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { "version": "2.6.2", "bundled": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", "bundled": true }, "sax": { @@ -6316,23 +6495,23 @@ "version": "1.0.2", "bundled": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { "version": "1.1.1", "bundled": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -6343,19 +6522,13 @@ "version": "4.4.2", "bundled": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.2", - "yallist": "3.0.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "bundled": true - } + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" } }, "util-deprecate": { @@ -6366,7 +6539,7 @@ "version": "1.1.2", "bundled": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wrappy": { @@ -6384,11 +6557,11 @@ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", "requires": { - "axios": "0.18.0", - "google-p12-pem": "1.0.2", - "jws": "3.1.5", - "mime": "2.3.1", - "pify": "3.0.0" + "axios": "^0.18.0", + "google-p12-pem": "^1.0.0", + "jws": "^3.1.4", + "mime": "^2.2.0", + "pify": "^3.0.0" } }, "handlebars": { @@ -6397,10 +6570,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "async": { @@ -6415,7 +6588,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -6430,8 +6603,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" + "ajv": "^5.1.0", + "har-schema": "^2.0.0" } }, "has-ansi": { @@ -6440,7 +6613,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-color": { @@ -6467,7 +6640,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "1.4.2" + "has-symbol-support-x": "^1.4.1" } }, "has-value": { @@ -6475,9 +6648,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -6485,8 +6658,8 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { @@ -6494,7 +6667,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6511,7 +6684,7 @@ "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "he": { @@ -6526,8 +6699,8 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" } }, "hosted-git-info": { @@ -6542,12 +6715,12 @@ "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "dev": true, "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.4.2", - "domutils": "1.7.0", - "entities": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" } }, "http-cache-semantics": { @@ -6561,9 +6734,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.14.1" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "hullabaloo-config-manager": { @@ -6572,20 +6745,20 @@ "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "es6-error": "4.1.1", - "graceful-fs": "4.1.11", - "indent-string": "3.2.0", - "json5": "0.5.1", - "lodash.clonedeep": "4.5.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.isequal": "4.5.0", - "lodash.merge": "4.6.1", - "md5-hex": "2.0.0", - "package-hash": "2.0.0", - "pkg-dir": "2.0.0", - "resolve-from": "3.0.0", - "safe-buffer": "5.1.2" + "dot-prop": "^4.1.0", + "es6-error": "^4.0.2", + "graceful-fs": "^4.1.11", + "indent-string": "^3.1.0", + "json5": "^0.5.1", + "lodash.clonedeep": "^4.5.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.isequal": "^4.5.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "package-hash": "^2.0.0", + "pkg-dir": "^2.0.0", + "resolve-from": "^3.0.0", + "safe-buffer": "^5.0.1" } }, "iconv-lite": { @@ -6594,7 +6767,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { @@ -6620,8 +6793,8 @@ "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", "dev": true, "requires": { - "pkg-dir": "2.0.0", - "resolve-cwd": "2.0.0" + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" } }, "imurmurhash": { @@ -6646,8 +6819,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -6663,10 +6836,11 @@ }, "ink-docstrap": { "version": "git+https://github.com/docstrap/docstrap.git#1e56828b819bcbc9855543bd20809a0aed415a80", + "from": "git+https://github.com/docstrap/docstrap.git", "dev": true, "requires": { - "moment": "2.22.1", - "sanitize-html": "1.18.2" + "moment": "^2.14.1", + "sanitize-html": "^1.13.0" } }, "inquirer": { @@ -6675,20 +6849,20 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "3.1.0", - "chalk": "2.4.1", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.2.0", - "figures": "2.0.0", - "lodash": "4.17.10", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" }, "dependencies": { "ansi-regex": { @@ -6709,8 +6883,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -6719,7 +6893,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -6730,7 +6904,7 @@ "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", "dev": true, "requires": { - "espower-loader": "1.2.2" + "espower-loader": "^1.0.0" } }, "into-stream": { @@ -6739,8 +6913,8 @@ "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "requires": { - "from2": "2.3.0", - "p-is-promise": "1.1.0" + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" } }, "invariant": { @@ -6749,7 +6923,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -6773,7 +6947,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6781,7 +6955,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6798,7 +6972,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -6812,7 +6986,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-ci": { @@ -6821,7 +6995,7 @@ "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "1.1.3" + "ci-info": "^1.0.0" } }, "is-data-descriptor": { @@ -6829,7 +7003,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6837,7 +7011,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6847,9 +7021,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -6871,7 +7045,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-error": { @@ -6896,7 +7070,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -6904,7 +7078,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-generator-fn": { @@ -6918,7 +7092,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.1" } }, "is-installed-globally": { @@ -6927,8 +7101,8 @@ "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { - "global-dirs": "0.1.1", - "is-path-inside": "1.0.1" + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" } }, "is-npm": { @@ -6942,7 +7116,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6950,7 +7124,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6972,7 +7146,7 @@ "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "1.2.0" + "symbol-observable": "^1.1.0" } }, "is-odd": { @@ -6980,7 +7154,7 @@ "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "requires": { - "is-number": "4.0.0" + "is-number": "^4.0.0" }, "dependencies": { "is-number": { @@ -7002,7 +7176,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -7011,7 +7185,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-plain-obj": { @@ -7025,7 +7199,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-posix-bracket": { @@ -7118,14 +7292,35 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "istanbul-lib-coverage": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.0.tgz", + "integrity": "sha512-yMSw5xLIbdaxiVXHk3amfNM2WeBxLrwH/BCyZ9HvA/fylwziAIJOG2rKqWyLqEJqwKT725vxxqidv+SyynnGAA==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.2.0.tgz", + "integrity": "sha512-ozQGtlIw+/a/F3n6QwWiuuyRAPp64+g2GVsKYsIez0sgIEzkU5ZpL2uZ5pmAzbEJ82anlRaPlOQZzkRXspgJyg==", + "dev": true, + "requires": { + "@babel/generator": "7.0.0-beta.49", + "@babel/parser": "7.0.0-beta.49", + "@babel/template": "7.0.0-beta.49", + "@babel/traverse": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.49", + "istanbul-lib-coverage": "^2.0.0", + "semver": "^5.5.0" + } + }, "isurl": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "has-to-string-tag-x": "1.4.1", - "is-object": "1.0.1" + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" } }, "jest-docblock": { @@ -7147,13 +7342,13 @@ "dev": true }, "js-yaml": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", - "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "js2xmlparser": { @@ -7162,7 +7357,7 @@ "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", "dev": true, "requires": { - "xmlcreate": "1.0.2" + "xmlcreate": "^1.0.1" } }, "jsbn": { @@ -7178,17 +7373,17 @@ "dev": true, "requires": { "babylon": "7.0.0-beta.19", - "bluebird": "3.5.1", - "catharsis": "0.8.9", - "escape-string-regexp": "1.0.5", - "js2xmlparser": "3.0.0", - "klaw": "2.0.0", - "marked": "0.3.19", - "mkdirp": "0.5.1", - "requizzle": "0.2.1", - "strip-json-comments": "2.0.1", + "bluebird": "~3.5.0", + "catharsis": "~0.8.9", + "escape-string-regexp": "~1.0.5", + "js2xmlparser": "~3.0.0", + "klaw": "~2.0.0", + "marked": "~0.3.6", + "mkdirp": "~0.5.1", + "requizzle": "~0.2.1", + "strip-json-comments": "~2.0.1", "taffydb": "2.6.2", - "underscore": "1.8.3" + "underscore": "~1.8.3" }, "dependencies": { "babylon": { @@ -7250,7 +7445,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsprim": { @@ -7277,7 +7472,7 @@ "requires": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "jws": { @@ -7285,8 +7480,8 @@ "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", "requires": { - "jwa": "1.1.6", - "safe-buffer": "5.1.2" + "jwa": "^1.1.5", + "safe-buffer": "^5.0.1" } }, "keyv": { @@ -7309,7 +7504,7 @@ "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.9" } }, "last-line-stream": { @@ -7318,7 +7513,7 @@ "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "latest-version": { @@ -7327,7 +7522,7 @@ "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "4.0.1" + "package-json": "^4.0.0" } }, "lazy-cache": { @@ -7342,7 +7537,7 @@ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "levn": { @@ -7351,8 +7546,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "load-json-file": { @@ -7361,10 +7556,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" }, "dependencies": { "pify": { @@ -7381,8 +7576,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -7484,9 +7679,9 @@ "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" }, "lolex": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.6.0.tgz", - "integrity": "sha512-e1UtIo1pbrIqEXib/yMjHciyqkng5lc0rrIbytgjmRgDR9+2ceNIAcwOWSgylRjoEP9VdVguCSRwnNmlbnOUwA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", + "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", "dev": true }, "long": { @@ -7506,7 +7701,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "loud-rejection": { @@ -7515,8 +7710,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" } }, "lowercase-keys": { @@ -7530,8 +7725,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "make-dir": { @@ -7540,7 +7735,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "map-cache": { @@ -7558,7 +7753,7 @@ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "marked": { @@ -7568,12 +7763,12 @@ "dev": true }, "matcher": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.0.tgz", - "integrity": "sha512-aZGv6JBTHqfqAd09jmAlbKnAICTfIvb5Z8gXVxPB5WZtFfHMaAMdACL7tQflD2V+6/8KNcY8s6DYtWLgpJP5lA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz", + "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.4" } }, "math-random": { @@ -7588,7 +7783,7 @@ "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -7603,7 +7798,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "meow": { @@ -7612,16 +7807,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" }, "dependencies": { "find-up": { @@ -7630,8 +7825,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "load-json-file": { @@ -7640,11 +7835,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "map-obj": { @@ -7665,7 +7860,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-type": { @@ -7674,9 +7869,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -7697,7 +7892,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "read-pkg": { @@ -7706,9 +7901,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -7717,8 +7912,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" } }, "strip-bom": { @@ -7727,7 +7922,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -7744,7 +7939,7 @@ "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "merge2": { @@ -7768,19 +7963,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } }, "mime": { @@ -7798,7 +7993,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "mime-db": "1.33.0" + "mime-db": "~1.33.0" } }, "mimic-fn": { @@ -7818,7 +8013,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -7832,8 +8027,8 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -7841,7 +8036,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -7886,9 +8081,9 @@ "dev": true }, "moment": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", - "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==", + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", "dev": true }, "ms": { @@ -7902,7 +8097,7 @@ "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", "dev": true, "requires": { - "source-map": "0.1.43" + "source-map": "^0.1.34" }, "dependencies": { "source-map": { @@ -7911,7 +8106,7 @@ "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -7922,10 +8117,10 @@ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "dev": true, "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" } }, "mute-stream": { @@ -7944,18 +8139,18 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" } }, "natural-compare": { @@ -7971,16 +8166,16 @@ "dev": true }, "nise": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.3.tgz", - "integrity": "sha512-v1J/FLUB9PfGqZLGDBhQqODkbLotP0WtLo9R4EJY2PPu5f5Xg4o0rA8FDlmrjFSv9vBBKcfnOSpfYYuu5RTHqg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.1.tgz", + "integrity": "sha512-9JX3YwoIt3kS237scmSSOpEv7vCukVzLfwK0I0XhocDSHUANid8ZHnLEULbbSkfeMn98B2y5kphIWzZUylESRQ==", "dev": true, "requires": { - "@sinonjs/formatio": "2.0.0", - "just-extend": "1.1.27", - "lolex": "2.6.0", - "path-to-regexp": "1.7.0", - "text-encoding": "0.6.4" + "@sinonjs/formatio": "^2.0.0", + "just-extend": "^1.1.27", + "lolex": "^2.3.2", + "path-to-regexp": "^1.7.0", + "text-encoding": "^0.6.4" } }, "node-forge": { @@ -7994,10 +8189,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -8006,7 +8201,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "normalize-url": { @@ -8015,9 +8210,9 @@ "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { - "prepend-http": "2.0.0", - "query-string": "5.1.1", - "sort-keys": "2.0.0" + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" }, "dependencies": { "prepend-http": { @@ -8034,7 +8229,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -8043,38 +8238,38 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.8.0.tgz", - "integrity": "sha512-PUFq1PSsx5OinSk5g5aaZygcDdI3QQT5XUlbR9QRMihtMS6w0Gm8xj4BxmKeeAlpQXC5M2DIhH16Y+KejceivQ==", - "dev": true, - "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.2.0", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.10.1", - "istanbul-lib-report": "1.1.3", - "istanbul-lib-source-maps": "1.2.3", - "istanbul-reports": "1.4.0", - "md5-hex": "1.3.0", - "merge-source-map": "1.1.0", - "micromatch": "3.1.10", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.2.1", + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-12.0.2.tgz", + "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", + "dev": true, + "requires": { + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.5.1", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^2.1.0", + "istanbul-lib-report": "^1.1.3", + "istanbul-lib-source-maps": "^1.2.5", + "istanbul-reports": "^1.4.1", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.1.0", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.1", + "spawn-wrap": "^1.4.2", + "test-exclude": "^4.2.0", "yargs": "11.1.0", - "yargs-parser": "8.1.0" + "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { @@ -8082,9 +8277,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -8093,12 +8288,7 @@ "dev": true }, "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", + "version": "3.0.0", "bundled": true, "dev": true }, @@ -8107,7 +8297,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -8155,92 +8345,6 @@ "bundled": true, "dev": true }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "babel-generator": { - "version": "6.26.1", - "bundled": true, - "dev": true, - "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "core-js": "2.5.6", - "regenerator-runtime": "0.11.1" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.10" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.4", - "lodash": "4.17.10" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, "balanced-match": { "version": "1.0.0", "bundled": true, @@ -8251,13 +8355,13 @@ "bundled": true, "dev": true, "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -8265,7 +8369,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -8273,7 +8377,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8281,7 +8385,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8289,16 +8393,11 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -8311,7 +8410,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -8320,16 +8419,16 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -8337,7 +8436,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8352,22 +8451,15 @@ "bundled": true, "dev": true, "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "caching-transform": { @@ -8375,9 +8467,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, "camelcase": { @@ -8392,20 +8484,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "class-utils": { @@ -8413,10 +8493,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -8424,13 +8504,8 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true } } }, @@ -8440,8 +8515,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -8463,8 +8538,8 @@ "bundled": true, "dev": true, "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "commondir": { @@ -8492,22 +8567,17 @@ "bundled": true, "dev": true }, - "core-js": { - "version": "2.5.6", - "bundled": true, - "dev": true - }, "cross-spawn": { "version": "4.0.2", "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.3", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "debug": { - "version": "2.6.9", + "version": "3.1.0", "bundled": true, "dev": true, "requires": { @@ -8534,7 +8604,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "define-property": { @@ -8542,8 +8612,8 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -8551,7 +8621,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8559,7 +8629,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8567,16 +8637,11 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -8584,44 +8649,26 @@ } } }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "2.0.1" - } - }, "error-ex": { "version": "1.3.1", "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, "execa": { "version": "0.7.0", "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -8629,9 +8676,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -8641,21 +8688,29 @@ "bundled": true, "dev": true, "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -8663,7 +8718,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8673,8 +8728,8 @@ "bundled": true, "dev": true, "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -8682,7 +8737,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -8692,14 +8747,14 @@ "bundled": true, "dev": true, "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -8707,7 +8762,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -8715,7 +8770,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -8723,7 +8778,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8731,7 +8786,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8739,9 +8794,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -8756,10 +8811,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -8767,7 +8822,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8777,9 +8832,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" } }, "find-up": { @@ -8787,7 +8842,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -8800,8 +8855,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, "fragment-cache": { @@ -8809,7 +8864,7 @@ "bundled": true, "dev": true, "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "fs.realpath": { @@ -8837,19 +8892,14 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, "graceful-fs": { "version": "4.1.11", "bundled": true, @@ -8860,10 +8910,10 @@ "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -8871,39 +8921,19 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "has-value": { "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -8911,34 +8941,16 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, "kind-of": { "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -8958,8 +8970,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -8967,14 +8979,6 @@ "bundled": true, "dev": true }, - "invariant": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "1.3.1" - } - }, "invert-kv": { "version": "1.0.0", "bundled": true, @@ -8985,7 +8989,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-arrayish": { @@ -9003,7 +9007,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-data-descriptor": { @@ -9011,7 +9015,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-descriptor": { @@ -9019,9 +9023,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -9036,14 +9040,6 @@ "bundled": true, "dev": true }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, "is-fullwidth-code-point": { "version": "2.0.0", "bundled": true, @@ -9054,7 +9050,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-odd": { @@ -9062,7 +9058,7 @@ "bundled": true, "dev": true, "requires": { - "is-number": "4.0.0" + "is-number": "^4.0.0" }, "dependencies": { "is-number": { @@ -9077,14 +9073,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "isobject": "^3.0.1" } }, "is-stream": { @@ -9127,21 +9116,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.1", - "bundled": true, - "dev": true, - "requires": { - "babel-generator": "6.26.1", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.2.0", - "semver": "5.5.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-report": { @@ -9149,68 +9124,53 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.2", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { + "has-flag": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, "supports-color": { "version": "3.2.3", "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } }, "istanbul-lib-source-maps": { - "version": "1.2.3", + "version": "1.2.5", "bundled": true, "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" } }, "istanbul-reports": { - "version": "1.4.0", + "version": "1.4.1", "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, - "js-tokens": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, "kind-of": { "version": "3.2.2", "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -9224,7 +9184,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -9232,11 +9192,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -9244,8 +9204,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -9255,31 +9215,18 @@ } } }, - "lodash": { - "version": "4.17.10", - "bundled": true, - "dev": true - }, "longest": { "version": "1.0.1", "bundled": true, "dev": true }, - "loose-envify": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "js-tokens": "3.0.2" - } - }, "lru-cache": { "version": "4.1.3", "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "map-cache": { @@ -9292,7 +9239,7 @@ "bundled": true, "dev": true, "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "md5-hex": { @@ -9300,7 +9247,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -9313,7 +9260,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -9321,7 +9268,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.6.1" + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -9336,19 +9283,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" }, "dependencies": { "kind-of": { @@ -9368,7 +9315,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -9381,8 +9328,8 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -9390,7 +9337,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -9413,30 +9360,20 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -9449,10 +9386,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "npm-run-path": { @@ -9460,7 +9397,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -9478,9 +9415,9 @@ "bundled": true, "dev": true, "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -9488,7 +9425,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9498,14 +9435,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "isobject": "^3.0.0" } }, "object.pick": { @@ -9513,14 +9443,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "isobject": "^3.0.1" } }, "once": { @@ -9528,7 +9451,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -9536,8 +9459,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -9550,9 +9473,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "p-finally": { @@ -9565,7 +9488,7 @@ "bundled": true, "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -9573,7 +9496,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-try": { @@ -9586,7 +9509,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "pascalcase": { @@ -9599,7 +9522,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -9622,9 +9545,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -9642,7 +9565,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -9650,7 +9573,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -9658,8 +9581,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -9679,9 +9602,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -9689,8 +9612,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -9698,24 +9621,19 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true, - "dev": true - }, "regex-not": { "version": "1.0.2", "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "repeat-element": { @@ -9728,14 +9646,6 @@ "bundled": true, "dev": true }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "1.0.2" - } - }, "require-directory": { "version": "2.1.1", "bundled": true, @@ -9767,7 +9677,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -9775,7 +9685,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-regex": { @@ -9783,7 +9693,7 @@ "bundled": true, "dev": true, "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "semver": { @@ -9801,10 +9711,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -9812,7 +9722,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9822,7 +9732,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -9845,22 +9755,30 @@ "bundled": true, "dev": true, "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.1", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -9868,7 +9786,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9878,9 +9796,9 @@ "bundled": true, "dev": true, "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -9888,7 +9806,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -9896,7 +9814,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -9904,7 +9822,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -9912,16 +9830,11 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -9934,7 +9847,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" } }, "source-map": { @@ -9943,15 +9856,15 @@ "dev": true }, "source-map-resolve": { - "version": "0.5.1", + "version": "0.5.2", "bundled": true, "dev": true, "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-url": { @@ -9964,12 +9877,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.0" + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" } }, "spdx-correct": { @@ -9977,8 +9890,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -9991,8 +9904,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -10005,7 +9918,7 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "static-extend": { @@ -10013,8 +9926,8 @@ "bundled": true, "dev": true, "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -10022,7 +9935,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -10032,31 +9945,16 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { - "version": "3.0.1", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^3.0.0" } }, "strip-bom": { @@ -10064,7 +9962,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -10072,284 +9970,24 @@ "bundled": true, "dev": true }, - "supports-color": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, "test-exclude": { "version": "4.2.1", "bundled": true, "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "3.1.10", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "0.1.6" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "1.0.2" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "6.0.2" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "6.0.2" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - } - } + "arrify": "^1.0.1", + "micromatch": "^3.1.8", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, "to-object-path": { "version": "0.3.0", "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "to-regex": { @@ -10357,10 +9995,10 @@ "bundled": true, "dev": true, "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -10368,34 +10006,19 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - } - } + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, - "trim-right": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, "uglify-js": { "version": "2.8.29", "bundled": true, "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -10404,9 +10027,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -10423,10 +10046,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -10434,7 +10057,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -10442,10 +10065,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -10455,8 +10078,8 @@ "bundled": true, "dev": true, "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -10464,9 +10087,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -10483,11 +10106,6 @@ "version": "0.1.4", "bundled": true, "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true } } }, @@ -10501,7 +10119,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" }, "dependencies": { "kind-of": { @@ -10516,16 +10134,16 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "which": { - "version": "1.3.0", + "version": "1.3.1", "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -10549,16 +10167,21 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -10566,9 +10189,17 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" } } } @@ -10583,9 +10214,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "y18n": { @@ -10603,25 +10234,20 @@ "bundled": true, "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, "camelcase": { "version": "4.1.0", "bundled": true, @@ -10632,17 +10258,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "3.0.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "yargs-parser": { @@ -10650,7 +10268,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" } } } @@ -10660,7 +10278,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -10688,9 +10306,9 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -10698,7 +10316,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "kind-of": { @@ -10706,7 +10324,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -10721,7 +10339,7 @@ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.omit": { @@ -10730,8 +10348,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "object.pick": { @@ -10739,7 +10357,7 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "observable-to-promise": { @@ -10748,8 +10366,8 @@ "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", "dev": true, "requires": { - "is-observable": "0.2.0", - "symbol-observable": "1.2.0" + "is-observable": "^0.2.0", + "symbol-observable": "^1.0.4" }, "dependencies": { "is-observable": { @@ -10758,7 +10376,7 @@ "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", "dev": true, "requires": { - "symbol-observable": "0.2.4" + "symbol-observable": "^0.2.2" }, "dependencies": { "symbol-observable": { @@ -10776,7 +10394,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -10785,7 +10403,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "optimist": { @@ -10794,8 +10412,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "option-chain": { @@ -10810,12 +10428,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" }, "dependencies": { "wordwrap": { @@ -10842,7 +10460,7 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "1.0.0" + "lcid": "^1.0.0" } }, "os-tmpdir": { @@ -10876,12 +10494,12 @@ "dev": true }, "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -10890,7 +10508,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-timeout": { @@ -10899,7 +10517,7 @@ "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { - "p-finally": "1.0.0" + "p-finally": "^1.0.0" } }, "p-try": { @@ -10914,10 +10532,10 @@ "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "lodash.flattendeep": "4.4.0", - "md5-hex": "2.0.0", - "release-zalgo": "1.0.0" + "graceful-fs": "^4.1.11", + "lodash.flattendeep": "^4.4.0", + "md5-hex": "^2.0.0", + "release-zalgo": "^1.0.0" } }, "package-json": { @@ -10926,10 +10544,10 @@ "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0", - "semver": "5.5.0" + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" }, "dependencies": { "got": { @@ -10938,17 +10556,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" } } } @@ -10959,10 +10577,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" }, "dependencies": { "is-extglob": { @@ -10977,7 +10595,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -10988,7 +10606,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "parse-ms": { @@ -11058,7 +10676,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "performance-now": { @@ -11083,7 +10701,7 @@ "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", "dev": true, "requires": { - "pinkie": "1.0.0" + "pinkie": "^1.0.0" } }, "pkg-conf": { @@ -11092,8 +10710,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "2.1.0", - "load-json-file": "4.0.0" + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" }, "dependencies": { "load-json-file": { @@ -11102,10 +10720,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, "parse-json": { @@ -11114,8 +10732,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.2" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } } } @@ -11126,7 +10744,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "2.1.0" + "find-up": "^2.1.0" } }, "plur": { @@ -11135,7 +10753,7 @@ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "dev": true, "requires": { - "irregular-plurals": "1.4.0" + "irregular-plurals": "^1.0.0" } }, "pluralize": { @@ -11155,9 +10773,9 @@ "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", "dev": true, "requires": { - "chalk": "2.4.1", - "source-map": "0.6.1", - "supports-color": "5.4.0" + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" }, "dependencies": { "source-map": { @@ -11169,45 +10787,45 @@ } }, "power-assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.5.0.tgz", - "integrity": "sha512-WaWSw+Ts283o6dzxW1BxIxoaHok7aSSGx4SaR6dW62Pk31ynv9DERDieuZpPYv5XaJ+H+zdcOaJQ+PvlasAOVw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.0.tgz", + "integrity": "sha512-nDb6a+p2C7Wj8Y2zmFtLpuv+xobXz4+bzT5s7dr0nn71tLozn7nRMQqzwbefzwZN5qOm0N7Cxhw4kXP75xboKA==", "requires": { - "define-properties": "1.1.2", - "empower": "1.2.3", - "power-assert-formatter": "1.4.1", - "universal-deep-strict-equal": "1.2.2", - "xtend": "4.0.1" + "define-properties": "^1.1.2", + "empower": "^1.3.0", + "power-assert-formatter": "^1.4.1", + "universal-deep-strict-equal": "^1.2.1", + "xtend": "^4.0.0" } }, "power-assert-context-formatter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz", - "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", + "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", "requires": { - "core-js": "2.5.6", - "power-assert-context-traversal": "1.1.1" + "core-js": "^2.0.0", + "power-assert-context-traversal": "^1.2.0" } }, "power-assert-context-reducer-ast": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.1.2.tgz", - "integrity": "sha1-SEqZ4m9Jc/+IMuXFzHVnAuYJQXQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", + "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", "requires": { - "acorn": "4.0.13", - "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.6", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "acorn": "^5.0.0", + "acorn-es7-plugin": "^1.0.12", + "core-js": "^2.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.2.0" } }, "power-assert-context-traversal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz", - "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", + "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", "requires": { - "core-js": "2.5.6", - "estraverse": "4.2.0" + "core-js": "^2.0.0", + "estraverse": "^4.1.0" } }, "power-assert-formatter": { @@ -11215,22 +10833,22 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.6", - "power-assert-context-formatter": "1.1.1", - "power-assert-context-reducer-ast": "1.1.2", - "power-assert-renderer-assertion": "1.1.1", - "power-assert-renderer-comparison": "1.1.1", - "power-assert-renderer-diagram": "1.1.2", - "power-assert-renderer-file": "1.1.1" + "core-js": "^2.0.0", + "power-assert-context-formatter": "^1.0.7", + "power-assert-context-reducer-ast": "^1.0.7", + "power-assert-renderer-assertion": "^1.0.7", + "power-assert-renderer-comparison": "^1.0.7", + "power-assert-renderer-diagram": "^1.0.7", + "power-assert-renderer-file": "^1.0.7" } }, "power-assert-renderer-assertion": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.1.1.tgz", - "integrity": "sha1-y/wOd+AIao+Wrz8djme57n4ozpg=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", + "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", "requires": { - "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "1.1.1" + "power-assert-renderer-base": "^1.1.1", + "power-assert-util-string-width": "^1.2.0" } }, "power-assert-renderer-base": { @@ -11239,42 +10857,42 @@ "integrity": "sha1-lqZQxv0F7hvB9mtUrWFELIs/Y+s=" }, "power-assert-renderer-comparison": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz", - "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", + "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", "requires": { - "core-js": "2.5.6", - "diff-match-patch": "1.0.1", - "power-assert-renderer-base": "1.1.1", - "stringifier": "1.3.0", - "type-name": "2.0.2" + "core-js": "^2.0.0", + "diff-match-patch": "^1.0.0", + "power-assert-renderer-base": "^1.1.1", + "stringifier": "^1.3.0", + "type-name": "^2.0.1" } }, "power-assert-renderer-diagram": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz", - "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", + "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", "requires": { - "core-js": "2.5.6", - "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "1.1.1", - "stringifier": "1.3.0" + "core-js": "^2.0.0", + "power-assert-renderer-base": "^1.1.1", + "power-assert-util-string-width": "^1.2.0", + "stringifier": "^1.3.0" } }, "power-assert-renderer-file": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.1.1.tgz", - "integrity": "sha1-o34rvReMys0E5427eckv40kzxec=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", + "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", "requires": { - "power-assert-renderer-base": "1.1.1" + "power-assert-renderer-base": "^1.1.1" } }, "power-assert-util-string-width": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.1.1.tgz", - "integrity": "sha1-vmWet5N/3S5smncmjar2S9W3xZI=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", + "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", "requires": { - "eastasianwidth": "0.1.1" + "eastasianwidth": "^0.2.0" } }, "prelude-ls": { @@ -11296,19 +10914,18 @@ "dev": true }, "prettier": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.12.1.tgz", - "integrity": "sha1-wa0g6APndJ+vkFpAnSNn4Gu+cyU=", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.5.tgz", + "integrity": "sha512-4M90mfvLz6yRf2Dhzd+xPIE6b4xkI8nHMJhsSm9IlfG17g6wujrrm7+H1X8x52tC4cSNm6HmuhCUSNe6Hd5wfw==", "dev": true }, "pretty-ms": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", - "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.2.0.tgz", + "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", "dev": true, "requires": { - "parse-ms": "1.0.1", - "plur": "2.1.2" + "parse-ms": "^1.0.0" }, "dependencies": { "parse-ms": { @@ -11347,19 +10964,19 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/base64": "1.1.2", - "@protobufjs/codegen": "2.0.4", - "@protobufjs/eventemitter": "1.1.0", - "@protobufjs/fetch": "1.1.0", - "@protobufjs/float": "1.0.2", - "@protobufjs/inquire": "1.1.0", - "@protobufjs/path": "1.1.2", - "@protobufjs/pool": "1.1.0", - "@protobufjs/utf8": "1.1.0", - "@types/long": "3.0.32", - "@types/node": "8.10.17", - "long": "4.0.0" + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^3.0.32", + "@types/node": "^8.9.4", + "long": "^4.0.0" }, "dependencies": { "long": { @@ -11375,9 +10992,9 @@ "integrity": "sha512-fQr3VQrbdzHrdaDn3XuisVoJlJNDJizHAvUXw9IuXRR8BpV2x0N7LsCxrpJkeKfPbNjiNU/V5vc008cI0TmzzQ==", "dev": true, "requires": { - "fill-keys": "1.0.2", - "module-not-found-error": "1.0.1", - "resolve": "1.5.0" + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.0", + "resolve": "~1.5.0" }, "dependencies": { "resolve": { @@ -11386,7 +11003,7 @@ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } } } @@ -11401,8 +11018,8 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "end-of-stream": "1.4.1", - "once": "1.4.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "pumpify": { @@ -11410,9 +11027,9 @@ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "requires": { - "duplexify": "3.6.0", - "inherits": "2.0.3", - "pump": "2.0.1" + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" } }, "punycode": { @@ -11431,9 +11048,9 @@ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { - "decode-uri-component": "0.2.0", - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" } }, "randomatic": { @@ -11442,9 +11059,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "4.0.0", - "kind-of": "6.0.2", - "math-random": "1.0.1" + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" }, "dependencies": { "is-number": { @@ -11456,15 +11073,15 @@ } }, "rc": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", - "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -11481,9 +11098,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" }, "dependencies": { "path-type": { @@ -11492,7 +11109,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "pify": { @@ -11509,8 +11126,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" } }, "readable-stream": { @@ -11518,13 +11135,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "readdirp": { @@ -11533,10 +11150,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.6", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" } }, "redent": { @@ -11545,8 +11162,8 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" }, "dependencies": { "indent-string": { @@ -11555,7 +11172,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } } } @@ -11578,7 +11195,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "regex-not": { @@ -11586,8 +11203,8 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "regexpp": { @@ -11602,9 +11219,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "1.4.0", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" } }, "registry-auth-token": { @@ -11613,8 +11230,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.7", - "safe-buffer": "5.1.2" + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" } }, "registry-url": { @@ -11623,7 +11240,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.7" + "rc": "^1.0.1" } }, "regjsgen": { @@ -11638,7 +11255,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "0.5.0" + "jsesc": "~0.5.0" } }, "release-zalgo": { @@ -11647,7 +11264,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "4.1.1" + "es6-error": "^4.0.1" } }, "remove-trailing-separator": { @@ -11672,7 +11289,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "request": { @@ -11680,26 +11297,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.7.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.2", - "safe-buffer": "5.1.2", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" } }, "require-directory": { @@ -11726,8 +11343,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" }, "dependencies": { "resolve-from": { @@ -11744,7 +11361,7 @@ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", "dev": true, "requires": { - "underscore": "1.6.0" + "underscore": "~1.6.0" }, "dependencies": { "underscore": { @@ -11767,7 +11384,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "3.0.0" + "resolve-from": "^3.0.0" } }, "resolve-from": { @@ -11787,7 +11404,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "1.0.1" + "lowercase-keys": "^1.0.0" } }, "restore-cursor": { @@ -11796,8 +11413,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "ret": { @@ -11811,12 +11428,12 @@ "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==" }, "retry-request": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.1.tgz", - "integrity": "sha512-PjAmtWIxjNj4Co/6FRtBl8afRP3CxrrIAnUzb1dzydfROd+6xt7xAebFeskgQgkfFf8NmzrXIoaB3HxmswXyxw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", + "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "requires": { - "request": "2.87.0", - "through2": "2.0.3" + "request": "^2.81.0", + "through2": "^2.0.0" } }, "right-align": { @@ -11826,7 +11443,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -11835,7 +11452,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { @@ -11844,7 +11461,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "rx-lite": { @@ -11859,7 +11476,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "4.0.8" + "rx-lite": "*" } }, "safe-buffer": { @@ -11872,14 +11489,13 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "samsam": { "version": "1.3.0", @@ -11893,16 +11509,16 @@ "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", "dev": true, "requires": { - "chalk": "2.4.1", - "htmlparser2": "3.9.2", - "lodash.clonedeep": "4.5.0", - "lodash.escaperegexp": "4.1.2", - "lodash.isplainobject": "4.0.6", - "lodash.isstring": "4.0.1", - "lodash.mergewith": "4.6.1", - "postcss": "6.0.22", - "srcset": "1.0.0", - "xtend": "4.0.1" + "chalk": "^2.3.0", + "htmlparser2": "^3.9.0", + "lodash.clonedeep": "^4.5.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.mergewith": "^4.6.0", + "postcss": "^6.0.14", + "srcset": "^1.0.0", + "xtend": "^4.0.0" } }, "semver": { @@ -11917,7 +11533,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.5.0" + "semver": "^5.0.3" } }, "serialize-error": { @@ -11943,10 +11559,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -11954,7 +11570,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -11965,7 +11581,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -11986,13 +11602,13 @@ "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", "dev": true, "requires": { - "@sinonjs/formatio": "2.0.0", - "diff": "3.5.0", - "lodash.get": "4.4.2", - "lolex": "2.6.0", - "nise": "1.3.3", - "supports-color": "5.4.0", - "type-detect": "4.0.8" + "@sinonjs/formatio": "^2.0.0", + "diff": "^3.1.0", + "lodash.get": "^4.4.2", + "lolex": "^2.2.0", + "nise": "^1.2.0", + "supports-color": "^5.1.0", + "type-detect": "^4.0.5" } }, "slash": { @@ -12006,7 +11622,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "^2.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -12028,8 +11644,8 @@ "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.1.1.tgz", "integrity": "sha512-/7I66rMhAag18IH5o0jtWWCJH/f2cvICwBcSS+SBUxsorbDeBu4UvYDNlAn3MrHfk6re0rUECwaPhsZuV2P9Ng==", "requires": { - "map-obj": "2.0.0", - "to-snake-case": "0.1.2" + "map-obj": "~2.0.0", + "to-snake-case": "~0.1.2" } }, "snakeize": { @@ -12043,14 +11659,14 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.2", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { "debug": { @@ -12066,7 +11682,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -12074,7 +11690,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -12084,9 +11700,9 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -12094,7 +11710,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -12102,7 +11718,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -12110,7 +11726,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -12118,9 +11734,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -12130,7 +11746,7 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" }, "dependencies": { "kind-of": { @@ -12138,7 +11754,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -12149,7 +11765,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "1.1.0" + "is-plain-obj": "^1.0.0" } }, "source-map": { @@ -12162,11 +11778,11 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { @@ -12175,8 +11791,8 @@ "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { - "buffer-from": "1.0.0", - "source-map": "0.6.1" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" }, "dependencies": { "source-map": { @@ -12198,8 +11814,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -12214,8 +11830,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -12229,8 +11845,8 @@ "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "requires": { - "async": "2.6.1", - "is-stream-ended": "0.1.4" + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" } }, "split-string": { @@ -12238,7 +11854,7 @@ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "sprintf-js": { @@ -12253,23 +11869,24 @@ "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", "dev": true, "requires": { - "array-uniq": "1.0.3", - "number-is-nan": "1.0.1" + "array-uniq": "^1.0.2", + "number-is-nan": "^1.0.0" } }, "sshpk": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", - "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" } }, "stack-utils": { @@ -12283,8 +11900,8 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -12292,7 +11909,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -12302,7 +11919,7 @@ "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.4.tgz", "integrity": "sha512-D243NJaYs/xBN2QnoiMDY7IesJFIK7gEhnvAYqJa5JvDdnh2dC4qDBwlCf0ohPpX2QRlA/4gnbnPd3rs3KxVcA==", "requires": { - "stubs": "3.0.0" + "stubs": "^3.0.0" } }, "stream-shift": { @@ -12332,9 +11949,9 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -12342,7 +11959,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "stringifier": { @@ -12350,9 +11967,9 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.6", - "traverse": "0.6.6", - "type-name": "2.0.2" + "core-js": "^2.0.0", + "traverse": "^0.6.6", + "type-name": "^2.0.1" } }, "strip-ansi": { @@ -12360,7 +11977,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -12375,7 +11992,7 @@ "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.1" } }, "strip-eof": { @@ -12390,7 +12007,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "strip-json-comments": { @@ -12410,16 +12027,16 @@ "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.1", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.2", - "readable-stream": "2.3.6" + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" }, "dependencies": { "mime": { @@ -12436,11 +12053,11 @@ "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", "dev": true, "requires": { - "arrify": "1.0.1", - "indent-string": "3.2.0", - "js-yaml": "3.11.0", - "serialize-error": "2.1.0", - "strip-ansi": "4.0.0" + "arrify": "^1.0.1", + "indent-string": "^3.2.0", + "js-yaml": "^3.10.0", + "serialize-error": "^2.1.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -12455,7 +12072,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -12466,8 +12083,8 @@ "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", "dev": true, "requires": { - "methods": "1.1.2", - "superagent": "3.8.3" + "methods": "~1.1.2", + "superagent": "^3.0.0" } }, "supports-color": { @@ -12476,7 +12093,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" }, "dependencies": { "has-flag": { @@ -12499,12 +12116,12 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.4.1", - "lodash": "4.17.10", + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-regex": { @@ -12525,8 +12142,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -12535,7 +12152,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -12552,7 +12169,7 @@ "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "execa": "0.7.0" + "execa": "^0.7.0" } }, "text-encoding": { @@ -12578,8 +12195,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.6", - "xtend": "4.0.1" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, "time-zone": { @@ -12600,7 +12217,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "to-fast-properties": { @@ -12619,7 +12236,7 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -12627,7 +12244,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -12637,10 +12254,10 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -12648,8 +12265,8 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, "to-snake-case": { @@ -12673,7 +12290,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "traverse": { @@ -12704,7 +12321,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -12719,7 +12336,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "type-detect": { @@ -12745,9 +12362,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "camelcase": { @@ -12764,8 +12381,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" } }, @@ -12790,9 +12407,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -12839,10 +12456,10 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -12850,7 +12467,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -12858,10 +12475,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -12872,7 +12489,7 @@ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "crypto-random-string": "1.0.0" + "crypto-random-string": "^1.0.0" } }, "unique-temp-dir": { @@ -12881,8 +12498,8 @@ "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", "dev": true, "requires": { - "mkdirp": "0.5.1", - "os-tmpdir": "1.0.2", + "mkdirp": "^0.5.1", + "os-tmpdir": "^1.0.1", "uid2": "0.0.3" } }, @@ -12891,9 +12508,9 @@ "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", "requires": { - "array-filter": "1.0.0", + "array-filter": "^1.0.0", "indexof": "0.0.1", - "object-keys": "1.0.11" + "object-keys": "^1.0.0" } }, "universalify": { @@ -12907,8 +12524,8 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -12916,9 +12533,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -12950,16 +12567,16 @@ "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { - "boxen": "1.3.0", - "chalk": "2.4.1", - "configstore": "3.1.2", - "import-lazy": "2.1.0", - "is-ci": "1.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "urix": { @@ -12973,7 +12590,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "url-to-options": { @@ -12993,7 +12610,7 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" } }, "util-deprecate": { @@ -13012,8 +12629,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "verror": { @@ -13021,9 +12638,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" } }, "well-known-symbols": { @@ -13033,12 +12650,12 @@ "dev": true }, "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -13053,7 +12670,7 @@ "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-regex": { @@ -13074,8 +12691,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -13084,7 +12701,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -13105,8 +12722,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } }, "wrappy": { @@ -13120,7 +12737,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "write-file-atomic": { @@ -13129,9 +12746,9 @@ "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" } }, "write-json-file": { @@ -13140,12 +12757,12 @@ "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", "dev": true, "requires": { - "detect-indent": "5.0.0", - "graceful-fs": "4.1.11", - "make-dir": "1.3.0", - "pify": "3.0.0", - "sort-keys": "2.0.0", - "write-file-atomic": "2.3.0" + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" }, "dependencies": { "detect-indent": { @@ -13157,13 +12774,13 @@ } }, "write-pkg": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.1.0.tgz", - "integrity": "sha1-AwqZlMyZk9JbTnWp8aGSNgcpHOk=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", + "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", "dev": true, "requires": { - "sort-keys": "2.0.0", - "write-json-file": "2.3.0" + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" } }, "xdg-basedir": { @@ -13198,13 +12815,13 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { - "camelcase": "2.1.1", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "os-locale": "1.4.0", - "string-width": "1.0.2", - "window-size": "0.1.4", - "y18n": "3.2.1" + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" } }, "yargs-parser": { @@ -13213,7 +12830,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 552f9c08e7a..6800212e879 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,44 +63,44 @@ }, "dependencies": { "@google-cloud/common": "^0.17.0", - "@google-cloud/common-grpc": "^0.6.0", - "arrify": "^1.0.0", - "eventid": "^0.1.0", + "@google-cloud/common-grpc": "^0.6.1", + "arrify": "^1.0.1", + "eventid": "^0.1.2", "extend": "^3.0.1", - "gcp-metadata": "^0.6.1", - "google-auto-auth": "^0.10.0", - "google-gax": "^0.16.0", - "google-proto-files": "^0.15.0", - "is": "^3.0.1", - "lodash.merge": "^4.6.0", - "protobufjs": "^6.8.0", - "pumpify": "^1.3.5", - "snakecase-keys": "^1.1.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.0.0", + "gcp-metadata": "^0.6.3", + "google-auto-auth": "^0.10.1", + "google-gax": "^0.16.1", + "google-proto-files": "^0.16.0", + "is": "^3.2.1", + "lodash.merge": "^4.6.1", + "protobufjs": "^6.8.6", + "pumpify": "^1.5.1", + "snakecase-keys": "^1.1.1", + "stream-events": "^1.0.4", + "string-format-obj": "^1.1.1", "through2": "^2.0.3" }, "devDependencies": { "@google-cloud/bigquery": "*", - "@google-cloud/nodejs-repo-tools": "^2.2.3", + "@google-cloud/nodejs-repo-tools": "^2.3.0", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", - "async": "^2.5.0", - "codecov": "^3.0.0", - "eslint": "^4.7.2", - "eslint-config-prettier": "^2.6.0", - "eslint-plugin-node": "^6.0.0", - "eslint-plugin-prettier": "^2.3.1", + "async": "^2.6.1", + "codecov": "^3.0.2", + "eslint": "^4.19.1", + "eslint-config-prettier": "^2.9.0", + "eslint-plugin-node": "^6.0.1", + "eslint-plugin-prettier": "^2.6.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "methmeth": "^1.0.0", - "mocha": "^5.0.0", + "methmeth": "^1.1.0", + "mocha": "^5.2.0", "nyc": "^12.0.2", - "power-assert": "^1.4.4", - "prettier": "^1.7.2", - "propprop": "^0.3.0", - "proxyquire": "^2.0.0", - "uuid": "^3.0.1" + "power-assert": "^1.6.0", + "prettier": "^1.13.5", + "propprop": "^0.3.1", + "proxyquire": "^2.0.1", + "uuid": "^3.2.1" } } From 06c21c19afca9bf23b99e63cc4064c7418f7a298 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 18 Jun 2018 07:59:46 -0700 Subject: [PATCH 0167/1029] refactor: drop dependency on string-format-obj (#124) --- handwritten/logging/package.json | 1 - handwritten/logging/src/index.js | 19 +++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6800212e879..7c6bc84c07b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -77,7 +77,6 @@ "pumpify": "^1.5.1", "snakecase-keys": "^1.1.1", "stream-events": "^1.0.4", - "string-format-obj": "^1.1.1", "through2": "^2.0.3" }, "devDependencies": { diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 6b01584375d..9817ffcc3e4 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -19,7 +19,6 @@ var arrify = require('arrify'); var common = require('@google-cloud/common'); var extend = require('extend'); -var format = require('string-format-obj'); var googleAuth = require('google-auto-auth'); var is = require('is'); var pumpify = require('pumpify'); @@ -910,12 +909,10 @@ Logging.prototype.setAclForDataset_ = function(name, config, callback) { return; } - config.destination = format('{baseUrl}/projects/{pId}/datasets/{dId}', { - baseUrl: 'bigquery.googleapis.com', - pId: dataset.parent.projectId, - dId: dataset.id, - }); - + const baseUrl = 'bigquery.googleapis.com'; + const pId = dataset.parent.projectId; + const dId = dataset.id; + config.destination = `${baseUrl}/projects/${pId}/datasets/${dId}`; self.createSink(name, config, callback); } ); @@ -953,11 +950,9 @@ Logging.prototype.setAclForTopic_ = function(name, config, callback) { return; } - config.destination = format('{baseUrl}/{topicName}', { - baseUrl: 'pubsub.googleapis.com', - topicName: topic.name, - }); - + const baseUrl = 'pubsub.googleapis.com'; + const topicName = topic.name; + config.destination = `${baseUrl}/${topicName}`; self.createSink(name, config, callback); }); }); From ffc5e24e080e9eeaba05769b35b42bb5df2100f6 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 19 Jun 2018 10:08:17 -0700 Subject: [PATCH 0168/1029] fix(package): update @google-cloud/common-grpc to version 0.7.1 (#126) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7c6bc84c07b..1540240e3b8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,7 +63,7 @@ }, "dependencies": { "@google-cloud/common": "^0.17.0", - "@google-cloud/common-grpc": "^0.6.1", + "@google-cloud/common-grpc": "^0.7.1", "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.1", From fe78088f48e1a6775162edab2ccad80650f1d8d9 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Tue, 19 Jun 2018 14:24:52 -0700 Subject: [PATCH 0169/1029] Create synth script for nodejs-logging (#127) * creates synth script * regenerated v2 Logging using synthtool --- handwritten/logging/.gitignore | 4 + handwritten/logging/CONTRIBUTORS | 1 + handwritten/logging/README.md | 4 +- handwritten/logging/package-lock.json | 198 ++++++++++++++---- handwritten/logging/package.json | 1 + .../protos/google/logging/v2/log_entry.proto | 12 ++ .../protos/google/logging/v2/logging.proto | 3 +- .../google/logging/v2/logging_config.proto | 57 ++--- .../google/logging/v2/logging_metrics.proto | 3 +- .../logging_service_v2_smoke_test.js | 48 +++++ .../src/v2/config_service_v2_client.js | 109 +++++----- .../src/v2/doc/google/api/doc_distribution.js | 4 +- .../src/v2/doc/google/api/doc_label.js | 4 +- .../src/v2/doc/google/api/doc_metric.js | 22 +- .../doc/google/api/doc_monitored_resource.js | 44 +++- .../google/logging/type/doc_http_request.js | 4 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 15 +- .../v2/doc/google/logging/v2/doc_logging.js | 4 +- .../google/logging/v2/doc_logging_config.js | 36 ++-- .../google/logging/v2/doc_logging_metrics.js | 6 +- .../src/v2/doc/google/protobuf/doc_any.js | 4 +- .../v2/doc/google/protobuf/doc_duration.js | 4 +- .../src/v2/doc/google/protobuf/doc_empty.js | 34 +++ .../v2/doc/google/protobuf/doc_field_mask.js | 4 +- .../src/v2/doc/google/protobuf/doc_struct.js | 112 ++++++++++ .../v2/doc/google/protobuf/doc_timestamp.js | 4 +- handwritten/logging/src/v2/index.js | 4 +- .../src/v2/logging_service_v2_client.js | 88 ++++---- .../src/v2/metrics_service_v2_client.js | 56 ++--- handwritten/logging/synth.py | 56 +++++ handwritten/logging/test/gapic-v2.js | 4 +- 31 files changed, 706 insertions(+), 243 deletions(-) create mode 100644 handwritten/logging/smoke-test/logging_service_v2_smoke_test.js create mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js create mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js create mode 100644 handwritten/logging/synth.py diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index b7d407606fb..082cf01ed78 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -4,6 +4,10 @@ .nyc_output docs/ out/ +build/ system-test/secrets.js system-test/*key.json *.lock +.DS_Store +google-cloud-logging-winston-*.tgz +google-cloud-logging-bunyan-*.tgz \ No newline at end of file diff --git a/handwritten/logging/CONTRIBUTORS b/handwritten/logging/CONTRIBUTORS index 19e07e56f1b..0e5910881c7 100644 --- a/handwritten/logging/CONTRIBUTORS +++ b/handwritten/logging/CONTRIBUTORS @@ -14,6 +14,7 @@ Ernest Landrito Jason Dobry Josh Ferge Jun Mukai +Justin Beckwith Luke Sneeringer Song Wang Stephen Sawchuk diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 74c9afa0aa6..93fe30a1f8c 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -1,3 +1,5 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `npm run generate-scaffolding`." Google Cloud Platform logo # [Stackdriver Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) @@ -136,4 +138,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest/ [product-docs]: https://cloud.google.com/logging/docs -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index c085780b267..c13cb46c796 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -178,9 +178,9 @@ }, "dependencies": { "globals": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", - "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.6.0.tgz", + "integrity": "sha512-IC8IL7f76dYfElTZ47+hXtEOtq/Cxqd48jR1dfSl7N3T2XA98XBnx8nkNUuy/O3TFmws107jq4Ty+3Tm81BoOA==", "dev": true } } @@ -255,19 +255,70 @@ } }, "@google-cloud/common-grpc": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.6.1.tgz", - "integrity": "sha512-pspOZVfmrCTP0svTNwFE8nYJsQp5rTUaeUpJwpgslDk5tDWFbYT3dZkANbiURcTSq0mo6hZmd+M5rPIzWMVUmA==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.7.1.tgz", + "integrity": "sha512-VK2X6rLRJIQMmkTS3p483up/Vb8zZHLoMFSmo17iiqebgaAoDpOhBiXXy4thtfabk02Nu5QtYT0QwM49OeU/ew==", "requires": { - "@google-cloud/common": "^0.17.0", + "@google-cloud/common": "^0.20.0", + "@grpc/proto-loader": "^0.1.0", "dot-prop": "^4.2.0", - "duplexify": "^3.5.1", + "duplexify": "^3.6.0", "extend": "^3.0.1", - "grpc": "^1.10.0", - "is": "^3.2.0", - "modelo": "^4.2.0", - "retry-request": "^3.3.1", + "grpc": "^1.12.3", + "is": "^3.2.1", + "retry-request": "^4.0.0", "through2": "^2.0.3" + }, + "dependencies": { + "@google-cloud/common": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.0.tgz", + "integrity": "sha512-OCeDhpt+Qr90GxMFi54302Maf45Nux8ymF/jXgpPNElJUsjTmSN+Vzg3WmfAY+TYG9MDL2VufjjwlM4XrcNYcw==", + "requires": { + "@types/duplexify": "^3.5.0", + "@types/request": "^2.47.0", + "arrify": "^1.0.1", + "axios": "^0.18.0", + "duplexify": "^3.6.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auth-library": "^1.6.0", + "is": "^3.2.1", + "pify": "^3.0.0", + "request": "^2.87.0", + "retry-request": "^3.3.1", + "split-array-stream": "^2.0.0", + "stream-events": "^1.0.4", + "through2": "^2.0.3" + }, + "dependencies": { + "retry-request": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", + "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", + "requires": { + "request": "^2.81.0", + "through2": "^2.0.0" + } + } + } + }, + "retry-request": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", + "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", + "requires": { + "through2": "^2.0.0" + } + }, + "split-array-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-2.0.0.tgz", + "integrity": "sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg==", + "requires": { + "is-stream-ended": "^0.1.4" + } + } } }, "@google-cloud/nodejs-repo-tools": { @@ -2096,6 +2147,24 @@ "xdg-basedir": "^3.0.0" } }, + "@grpc/proto-loader": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.1.0.tgz", + "integrity": "sha512-GHoZBR5N+65AWazsCiJDxeMSbUpp2qNYbjeD3mP27L2PT25+GvIupIIJiCgULH87NAiAd9SmWMRBVz+uSiHpgA==", + "requires": { + "@types/lodash": "^4.14.104", + "@types/node": "^9.4.6", + "lodash": "^4.17.5", + "protobufjs": "^6.8.6" + }, + "dependencies": { + "@types/node": { + "version": "9.6.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.22.tgz", + "integrity": "sha512-RIg9EkxzVMkNH0M4sLRngK23f5QiigJC0iODQmu4nopzstt8AjegYund3r82iMrd2BNCjcZVnklaItvKHaGfBA==" + } + } + }, "@ladjs/time-require": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@ladjs/time-require/-/time-require-0.1.4.tgz", @@ -2225,15 +2294,57 @@ "samsam": "1.3.0" } }, + "@types/caseless": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", + "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==" + }, + "@types/duplexify": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", + "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", + "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/lodash": { + "version": "4.14.110", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.110.tgz", + "integrity": "sha512-iXYLa6olt4tnsCA+ZXeP6eEW3tk1SulWeYyP/yooWfAtXjozqXgtX4+XUtMuOCfYjKGz3F34++qUc3Q+TJuIIw==" + }, "@types/long": { "version": "3.0.32", "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", - "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==" + "version": "10.3.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.4.tgz", + "integrity": "sha512-YMLlzdeNnAyLrQew39IFRkMacAR5BqKGIEei9ZjdHsIZtv+ZWKYTu1i7QJhetxQ9ReXx8w5f+cixdHZG3zgMQA==" + }, + "@types/request": { + "version": "2.47.1", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.1.tgz", + "integrity": "sha512-TV3XLvDjQbIeVxJ1Z3oCTDk/KuYwwcNKVwz2YaT0F5u86Prgc4syDAp6P96rkTQQ4bIdh+VswQIC9zS6NjY7/g==", + "requires": { + "@types/caseless": "*", + "@types/form-data": "*", + "@types/node": "*", + "@types/tough-cookie": "*" + } + }, + "@types/tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha512-MDQLxNFRLasqS4UlkWMSACMKeSm1x4Q3TxzUC7KQUsh6RK1ZrQ0VEyE3yzXcBu+K8ejVj4wuX32eUG02yNp+YQ==" }, "acorn": { "version": "5.7.1", @@ -3452,6 +3563,13 @@ "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { "long": "~3" + }, + "dependencies": { + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + } } }, "cache-base": { @@ -4435,9 +4553,9 @@ "dev": true }, "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { "is-arrayish": "^0.2.1" @@ -4637,9 +4755,9 @@ "dev": true }, "globals": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", - "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.6.0.tgz", + "integrity": "sha512-IC8IL7f76dYfElTZ47+hXtEOtq/Cxqd48jR1dfSl7N3T2XA98XBnx8nkNUuy/O3TFmws107jq4Ty+3Tm81BoOA==", "dev": true }, "strip-ansi": { @@ -4683,9 +4801,9 @@ }, "dependencies": { "resolve": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.0.tgz", - "integrity": "sha512-MNcwJ8/K9iJqFDBDyhcxZuDWvf/ai0GcAJWetx2Cvvcz4HLfA8j0KasWR5Z6ChcbjYZ+FaczcXjN2jrCXCjQ4w==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { "path-parse": "^1.0.5" @@ -6062,9 +6180,9 @@ } }, "google-proto-files": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.0.tgz", - "integrity": "sha512-ZVW1m38l6dJGTqOXuEQnr5VfWxkOsdkDetWGUchq8zXbo3PSVlZU7VQM/YS1pbc/6+mZy3R+xirctVaoLzIhXw==", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", + "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", "requires": { "globby": "^8.0.0", "power-assert": "^1.4.4", @@ -7685,9 +7803,9 @@ "dev": true }, "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "longest": { "version": "1.0.1", @@ -8166,9 +8284,9 @@ "dev": true }, "nise": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.1.tgz", - "integrity": "sha512-9JX3YwoIt3kS237scmSSOpEv7vCukVzLfwK0I0XhocDSHUANid8ZHnLEULbbSkfeMn98B2y5kphIWzZUylESRQ==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", + "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", "dev": true, "requires": { "@sinonjs/formatio": "^2.0.0", @@ -10330,9 +10448,9 @@ } }, "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" }, "object-visit": { "version": "1.0.1", @@ -10979,10 +11097,10 @@ "long": "^4.0.0" }, "dependencies": { - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "@types/node": { + "version": "8.10.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", + "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==" } } }, diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1540240e3b8..8470553bcee 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -42,6 +42,7 @@ "Jason Dobry ", "Josh Ferge ", "Jun Mukai ", + "Justin Beckwith ", "Luke Sneeringer ", "Song Wang ", "Stephen Sawchuk ", diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 3cd67b8d29f..4a52bbc8369 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -30,6 +30,7 @@ option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; option java_multiple_files = true; option java_outer_classname = "LogEntryProto"; option java_package = "com.google.logging.v2"; +option php_namespace = "Google\\Cloud\\Logging\\V2"; // An individual entry in a log. @@ -41,6 +42,10 @@ message LogEntry { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // + // A project number may optionally be used in place of PROJECT_ID. The + // project number is translated to its corresponding PROJECT_ID internally + // and the `log_name` field will contain PROJECT_ID in queries and exports. + // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. // `[LOG_ID]` must be less than 512 characters long and can only include the @@ -119,6 +124,13 @@ message LogEntry { // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` string trace = 22; + // Optional. Id of the span within the trace associated with the log entry. + // e.g. "0000000000000042" + // For Stackdriver trace spans, this is the same format that the Stackdriver + // trace API uses. + // The ID is a 16-character hexadecimal encoding of an 8-byte array. + string span_id = 27; + // Optional. Source code location information associated with the log entry, // if any. LogEntrySourceLocation source_location = 23; diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index 8e937d88cc4..a9b4e9306f3 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -30,6 +30,7 @@ option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; option java_multiple_files = true; option java_outer_classname = "LoggingProto"; option java_package = "com.google.logging.v2"; +option php_namespace = "Google\\Cloud\\Logging\\V2"; // Service for ingesting and querying logs. @@ -69,7 +70,7 @@ service LoggingServiceV2 { // Lists the logs in projects, organizations, folders, or billing accounts. // Only logs that have entries are listed. rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { - option (google.api.http) = { get: "/v2/{parent=projects/*}/logs" }; + option (google.api.http) = { get: "/v2/{parent=*/*}/logs" }; } } diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index b17e4a093d4..10095ef096d 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -27,6 +27,7 @@ option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; +option php_namespace = "Google\\Cloud\\Logging\\V2"; // Service for configuring sinks used to export log entries outside of @@ -34,63 +35,61 @@ option java_package = "com.google.logging.v2"; service ConfigServiceV2 { // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { - option (google.api.http) = { get: "/v2/{parent=projects/*}/sinks" }; + option (google.api.http) = { get: "/v2/{parent=*/*}/sinks" }; } // Gets a sink. rpc GetSink(GetSinkRequest) returns (LogSink) { - option (google.api.http) = { get: "/v2/{sink_name=projects/*/sinks/*}" }; + option (google.api.http) = { get: "/v2/{sink_name=*/*/sinks/*}" }; } // 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 + // export of newly-ingested log entries begins immediately, unless 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. rpc CreateSink(CreateSinkRequest) returns (LogSink) { - option (google.api.http) = { post: "/v2/{parent=projects/*}/sinks" body: "sink" }; + option (google.api.http) = { post: "/v2/{parent=*/*}/sinks" body: "sink" }; } // Updates a sink. 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`. + // sink with values from the new sink: `destination`, and `filter`. // The updated sink might also have a new `writer_identity`; see the // `unique_writer_identity` field. rpc UpdateSink(UpdateSinkRequest) returns (LogSink) { - option (google.api.http) = { put: "/v2/{sink_name=projects/*/sinks/*}" body: "sink" }; + option (google.api.http) = { put: "/v2/{sink_name=*/*/sinks/*}" body: "sink" }; } // Deletes a sink. If the sink has a unique `writer_identity`, then that // service account is also deleted. rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2/{sink_name=projects/*/sinks/*}" }; + option (google.api.http) = { delete: "/v2/{sink_name=*/*/sinks/*}" }; } // Lists all the exclusions in a parent resource. rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { - option (google.api.http) = { get: "/v2/{parent=projects/*}/exclusions" }; + option (google.api.http) = { get: "/v2/{parent=*/*}/exclusions" }; } // Gets the description of an exclusion. rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { get: "/v2/{name=projects/*/exclusions/*}" }; + option (google.api.http) = { get: "/v2/{name=*/*/exclusions/*}" }; } // Creates a new exclusion in a specified parent resource. // Only log entries belonging to that resource can be excluded. // You can have up to 10 exclusions in a resource. rpc CreateExclusion(CreateExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { post: "/v2/{parent=projects/*}/exclusions" body: "exclusion" }; + option (google.api.http) = { post: "/v2/{parent=*/*}/exclusions" body: "exclusion" }; } // Changes one or more properties of an existing exclusion. rpc UpdateExclusion(UpdateExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { patch: "/v2/{name=projects/*/exclusions/*}" body: "exclusion" }; + option (google.api.http) = { patch: "/v2/{name=*/*/exclusions/*}" body: "exclusion" }; } // Deletes an exclusion. rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2/{name=projects/*/exclusions/*}" }; + option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" }; } } @@ -136,8 +135,7 @@ message LogSink { // 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: + // that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR string filter = 5; @@ -177,17 +175,10 @@ message LogSink { // resource.type=gce_instance bool include_children = 9; - // 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. + // Deprecated. This field is ignored when creating or updating sinks. google.protobuf.Timestamp start_time = 10; - // 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. + // Deprecated. This field is ignored when creating or updating sinks. google.protobuf.Timestamp end_time = 11; } @@ -297,6 +288,22 @@ message UpdateSinkRequest { // + It is an error if the old value is true and the new value is // set to false or defaulted to false. bool unique_writer_identity = 3; + + // Optional. Field mask that specifies the fields in `sink` that need + // an update. A sink field will be overwritten if, and only if, it is + // in the update mask. `name` and output only fields cannot be updated. + // + // An empty updateMask is temporarily treated as using the following mask + // for backwards compatibility purposes: + // destination,filter,includeChildren + // At some point in the future, behavior will be removed and specifying an + // empty updateMask will be an error. + // + // For a detailed `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // + // Example: `updateMask=filter`. + google.protobuf.FieldMask update_mask = 4; } // The parameters to `DeleteSink`. diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index b32c40cd4a8..733d14d9c04 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -28,6 +28,7 @@ option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; option java_multiple_files = true; option java_outer_classname = "LoggingMetricsProto"; option java_package = "com.google.logging.v2"; +option php_namespace = "Google\\Cloud\\Logging\\V2"; // Service for configuring logs-based metrics. @@ -61,7 +62,7 @@ service MetricsServiceV2 { // Describes a logs-based metric. The value of the metric is the // number of log entries that match a logs filter in a given time interval. // -// A logs-based metric can also be used to extract values from logs and create a +// Logs-based metric can also be used to extract values from logs and create a // a distribution of the values. The distribution records the statistics of the // extracted values along with an optional histogram of the values as specified // by the bucket options. diff --git a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js new file mode 100644 index 00000000000..02958fe62bc --- /dev/null +++ b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js @@ -0,0 +1,48 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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'; + +describe('LoggingServiceV2SmokeTest', () => { + if (!process.env.SMOKE_TEST_PROJECT) { + throw new Error("Usage: SMOKE_TEST_PROJECT= node #{$0}"); + } + var projectId = process.env.SMOKE_TEST_PROJECT; + + it('successfully makes a call to the service', done => { + const logging = require('../src'); + + var client = new logging.v2.LoggingServiceV2Client({ + // optional auth parameters. + }); + + var formattedLogName = client.logPath(projectId, "test-" + Date.now().toString()); + var resource = {}; + var labels = {}; + var entries = []; + var request = { + logName: formattedLogName, + resource: resource, + labels: labels, + entries: entries, + }; + client.writeLogEntries(request) + .then(responses => { + var response = responses[0]; + console.log(response); + }) + .then(done) + .catch(done); + }); +}); diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 129942fee34..0df46463ac2 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, @@ -32,28 +32,28 @@ class ConfigServiceV2Client { /** * Construct an instance of ConfigServiceV2Client. * - * @param {object=} options - The configuration object. See the subsequent + * @param {object} [options] - The configuration object. See the subsequent * parameters for more details. - * @param {object=} options.credentials - Credentials object. - * @param {string=} options.credentials.client_email - * @param {string=} options.credentials.private_key - * @param {string=} options.email - Account email address. Required when - * usaing a .pem or .p12 keyFilename. - * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option above is not necessary. + * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number=} options.port - The port on which to connect to + * @param {number} [options.port] - The port on which to connect to * the remote host. - * @param {string=} options.projectId - The project ID from the Google + * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. - * @param {function=} options.promise - Custom promise module to use instead + * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string=} options.servicePath - The domain name of the + * @param {string} [options.servicePath] - The domain name of the * API remote host. */ constructor(opts) { @@ -79,7 +79,7 @@ class ConfigServiceV2Client { // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, @@ -222,16 +222,16 @@ class ConfigServiceV2Client { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [LogSink]{@link google.logging.v2.LogSink}. @@ -331,13 +331,13 @@ class ConfigServiceV2Client { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} @@ -383,10 +383,10 @@ class ConfigServiceV2Client { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" * * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. @@ -424,8 +424,7 @@ class ConfigServiceV2Client { /** * 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 + * export of newly-ingested log entries begins immediately, unless 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. * @@ -445,7 +444,7 @@ class ConfigServiceV2Client { * is not already in use. * * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} - * @param {boolean=} request.uniqueWriterIdentity + * @param {boolean} [request.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 @@ -457,10 +456,10 @@ class ConfigServiceV2Client { * 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 {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. @@ -503,8 +502,7 @@ class ConfigServiceV2Client { /** * Updates a sink. 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`. + * sink with values from the new sink: `destination`, and `filter`. * The updated sink might also have a new `writer_identity`; see the * `unique_writer_identity` field. * @@ -525,7 +523,7 @@ class ConfigServiceV2Client { * as part of `sink_name`. * * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} - * @param {boolean=} request.uniqueWriterIdentity + * @param {boolean} [request.uniqueWriterIdentity] * Optional. See * [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create) * for a description of this field. When updating a sink, the effect of this @@ -538,10 +536,27 @@ class ConfigServiceV2Client { * `writer_identity` is changed to a unique service account. * + It is an error if the old value is true and the new value is * set to false or defaulted to false. - * @param {Object=} options + * @param {Object} [request.updateMask] + * Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * + * An empty updateMask is temporarily treated as using the following mask + * for backwards compatibility purposes: + * destination,filter,includeChildren + * At some point in the future, behavior will be removed and specifying an + * empty updateMask will be an error. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Example: `updateMask=filter`. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. @@ -598,10 +613,10 @@ class ConfigServiceV2Client { * "folders/[FOLDER_ID]/sinks/[SINK_ID]" * * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error)=} callback + * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API call. @@ -641,16 +656,16 @@ class ConfigServiceV2Client { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. @@ -750,13 +765,13 @@ class ConfigServiceV2Client { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} @@ -802,10 +817,10 @@ class ConfigServiceV2Client { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. @@ -862,10 +877,10 @@ class ConfigServiceV2Client { * that is not already used in the parent resource. * * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. @@ -935,10 +950,10 @@ class ConfigServiceV2Client { * specify an `update_mask` of `"filter,description"`. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. @@ -995,10 +1010,10 @@ class ConfigServiceV2Client { * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error)=} callback + * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API call. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index 2ebda08c4d9..7629c3a8f76 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/doc/google/api/doc_label.js b/handwritten/logging/src/v2/doc/google/api/doc_label.js index 602286cb52b..0ccae3a5932 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_label.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_label.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index 7a7247a2397..7d5172fe633 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, @@ -21,14 +21,7 @@ * existing data unusable. * * @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" + * The resource name of the metric descriptor. * * @property {string} type * The metric type, including its DNS name prefix. The type is not @@ -101,8 +94,6 @@ * * **Grammar** * - * The grammar includes the dimensionless unit `1`, such as `1/s`. - * * The grammar also includes these connectors: * * * `/` division (as an infix operator, e.g. `1/s`). @@ -112,7 +103,7 @@ * * Expression = Component { "." Component } { "/" Component } ; * - * Component = [ PREFIX ] UNIT [ Annotation ] + * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] * | Annotation * | "1" * ; @@ -126,6 +117,9 @@ * `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. * * `NAME` is a sequence of non-blank printable ASCII characters not * containing '{' or '}'. + * * `1` represents dimensionless value 1, such as in `1/s`. + * * `%` represents dimensionless value 1/100, and annotates values giving + * a percentage. * * @property {string} description * A detailed description of the metric, which can be used in documentation. @@ -133,6 +127,8 @@ * @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". + * This field is optional but it is recommended to be set for any metrics + * associated with user-visible concepts, such as Quota. * * @typedef MetricDescriptor * @memberof google.api diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 31d25663448..733bf2b9e35 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, @@ -82,12 +82,12 @@ var MonitoredResourceDescriptor = { * @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"`. + * example, the type of a Compute Engine VM instance is `gce_instance`. * * @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"`. + * resource descriptor. For example, Compute Engine VM instances use the + * labels `"project_id"`, `"instance_id"`, and `"zone"`. * * @typedef MonitoredResource * @memberof google.api @@ -95,4 +95,38 @@ var MonitoredResourceDescriptor = { */ var MonitoredResource = { // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Auxiliary metadata for a MonitoredResource object. + * MonitoredResource objects contain the minimum set of information to + * uniquely identify a monitored resource instance. There is some other useful + * auxiliary metadata. Google Stackdriver Monitoring & Logging uses an ingestion + * pipeline to extract metadata for cloud resources of all types , and stores + * the metadata in this message. + * + * @property {Object} systemLabels + * Output only. Values for predefined system metadata labels. + * System labels are a kind of metadata extracted by Google Stackdriver. + * Stackdriver determines what system labels are useful and how to obtain + * their values. Some examples: "machine_image", "vpc", "subnet_id", + * "security_group", "name", etc. + * System label values can be only strings, Boolean values, or a list of + * strings. For example: + * + * { "name": "my-test-instance", + * "security_group": ["a", "b", "c"], + * "spot_instance": false } + * + * This object should have the same structure as [Struct]{@link google.protobuf.Struct} + * + * @property {Object.} userLabels + * Output only. A map of user-defined metadata labels. + * + * @typedef MonitoredResourceMetadata + * @memberof google.api + * @see [google.api.MonitoredResourceMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} + */ +var MonitoredResourceMetadata = { + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js index 66827c9d58e..a13dd3976be 100644 --- a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js +++ b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index 57b65d34010..b331ebc2348 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, @@ -26,6 +26,10 @@ * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" * + * A project number may optionally be used in place of PROJECT_ID. The + * project number is translated to its corresponding PROJECT_ID internally + * and the `log_name` field will contain PROJECT_ID in queries and exports. + * * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * `[LOG_ID]` must be less than 512 characters long and can only include the @@ -116,6 +120,13 @@ * to `//tracing.googleapis.com`. Example: * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` * + * @property {string} spanId + * Optional. Id of the span within the trace associated with the log entry. + * e.g. "0000000000000042" + * For Stackdriver trace spans, this is the same format that the Stackdriver + * trace API uses. + * The ID is a 16-character hexadecimal encoding of an 8-byte array. + * * @property {Object} sourceLocation * Optional. Source code location information associated with the log entry, * if any. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 2f719982826..0de1d4eadbb 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index b55de7f2338..4d7c3139a7f 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, @@ -45,8 +45,7 @@ * Optional. * An [advanced logs filter](https://cloud.google.com/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: + * that match the filter. For example: * * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR * @@ -88,19 +87,12 @@ * resource.type=gce_instance * * @property {Object} 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. + * Deprecated. This field is ignored when creating or updating sinks. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object} 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. + * Deprecated. This field is ignored when creating or updating sinks. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @@ -284,6 +276,24 @@ var CreateSinkRequest = { * + It is an error if the old value is true and the new value is * set to false or defaulted to false. * + * @property {Object} updateMask + * Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * + * An empty updateMask is temporarily treated as using the following mask + * for backwards compatibility purposes: + * destination,filter,includeChildren + * At some point in the future, behavior will be removed and specifying an + * empty updateMask will be an error. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Example: `updateMask=filter`. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * * @typedef UpdateSinkRequest * @memberof google.logging.v2 * @see [google.logging.v2.UpdateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index 1a6b658c67f..0938343b78d 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, @@ -19,7 +19,7 @@ * Describes a logs-based metric. The value of the metric is the * number of log entries that match a logs filter in a given time interval. * - * A logs-based metric can also be used to extract values from logs and create a + * Logs-based metric can also be used to extract values from logs and create a * a distribution of the values. The distribution records the statistics of the * extracted values along with an optional histogram of the values as specified * by the bucket options. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index 1e99231c144..f55fa17ff12 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js index 6b107097540..3ea5c376abb 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js new file mode 100644 index 00000000000..5e3640e90d8 --- /dev/null +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js @@ -0,0 +1,34 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: + * + * service Foo { + * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + * } + * + * The JSON representation for `Empty` is empty JSON object `{}`. + * @typedef Empty + * @memberof google.protobuf + * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} + */ +var Empty = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js index 26059a71abc..c82c2b33949 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js new file mode 100644 index 00000000000..efcd8ac5af9 --- /dev/null +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js @@ -0,0 +1,112 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * `Struct` represents a structured data value, consisting of fields + * which map to dynamically typed values. In some languages, `Struct` + * might be supported by a native representation. For example, in + * scripting languages like JS a struct is represented as an + * object. The details of that representation are described together + * with the proto support for the language. + * + * The JSON representation for `Struct` is JSON object. + * + * @property {Object.} fields + * Unordered map of dynamically typed values. + * + * @typedef Struct + * @memberof google.protobuf + * @see [google.protobuf.Struct definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} + */ +var Struct = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * `Value` represents a dynamically typed value which can be either + * null, a number, a string, a boolean, a recursive struct value, or a + * list of values. A producer of value is expected to set one of that + * variants, absence of any variant indicates an error. + * + * The JSON representation for `Value` is JSON value. + * + * @property {number} nullValue + * Represents a null value. + * + * The number should be among the values of [NullValue]{@link google.protobuf.NullValue} + * + * @property {number} numberValue + * Represents a double value. + * + * @property {string} stringValue + * Represents a string value. + * + * @property {boolean} boolValue + * Represents a boolean value. + * + * @property {Object} structValue + * Represents a structured value. + * + * This object should have the same structure as [Struct]{@link google.protobuf.Struct} + * + * @property {Object} listValue + * Represents a repeated `Value`. + * + * This object should have the same structure as [ListValue]{@link google.protobuf.ListValue} + * + * @typedef Value + * @memberof google.protobuf + * @see [google.protobuf.Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} + */ +var Value = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * `ListValue` is a wrapper around a repeated field of values. + * + * The JSON representation for `ListValue` is JSON array. + * + * @property {Object[]} values + * Repeated field of dynamically typed values. + * + * This object should have the same structure as [Value]{@link google.protobuf.Value} + * + * @typedef ListValue + * @memberof google.protobuf + * @see [google.protobuf.ListValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} + */ +var ListValue = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + * + * @enum {number} + * @memberof google.protobuf + */ +var NullValue = { + + /** + * Null value. + */ + NULL_VALUE: 0 +}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index 431e2fd5892..a02db52bdeb 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/src/v2/index.js index 12a970d82f0..249a385598c 100644 --- a/handwritten/logging/src/v2/index.js +++ b/handwritten/logging/src/v2/index.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 7316cced88e..494399fb716 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, @@ -32,28 +32,28 @@ class LoggingServiceV2Client { /** * Construct an instance of LoggingServiceV2Client. * - * @param {object=} options - The configuration object. See the subsequent + * @param {object} [options] - The configuration object. See the subsequent * parameters for more details. - * @param {object=} options.credentials - Credentials object. - * @param {string=} options.credentials.client_email - * @param {string=} options.credentials.private_key - * @param {string=} options.email - Account email address. Required when - * usaing a .pem or .p12 keyFilename. - * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option above is not necessary. + * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number=} options.port - The port on which to connect to + * @param {number} [options.port] - The port on which to connect to * the remote host. - * @param {string=} options.projectId - The project ID from the Google + * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. - * @param {function=} options.promise - Custom promise module to use instead + * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string=} options.servicePath - The domain name of the + * @param {string} [options.servicePath] - The domain name of the * API remote host. */ constructor(opts) { @@ -79,7 +79,7 @@ class LoggingServiceV2Client { // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, @@ -257,10 +257,10 @@ class LoggingServiceV2Client { * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * For more information about log names, see * LogEntry. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error)=} callback + * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API call. @@ -323,7 +323,7 @@ class LoggingServiceV2Client { * rather than calling this method for each individual log entry. * * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} - * @param {string=} request.logName + * @param {string} [request.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`: * @@ -337,7 +337,7 @@ class LoggingServiceV2Client { * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * For more information about log names, see * LogEntry. - * @param {Object=} request.resource + * @param {Object} [request.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: * @@ -348,21 +348,21 @@ class LoggingServiceV2Client { * See LogEntry. * * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} - * @param {Object.=} request.labels + * @param {Object.} [request.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. - * @param {boolean=} request.partialSuccess + * @param {boolean} [request.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, then the response status is the error associated * with one of the failed entries and the response includes error details * keyed by the entries' zero-based index in the `entries.write` method. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. @@ -415,13 +415,13 @@ class LoggingServiceV2Client { * "folders/[FOLDER_ID]" * * Projects listed in the `project_ids` field are added to this list. - * @param {string[]} request.projectIds + * @param {string[]} [request.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`. - * @param {string=} request.filter + * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that * match the filter are returned. An empty filter matches all log entries in @@ -429,23 +429,23 @@ class LoggingServiceV2Client { * that is not listed in `resource_names` will cause the filter to return no * results. * The maximum length of the filter is 20000 characters. - * @param {string=} request.orderBy + * @param {string} [request.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 their `insert_id` values. - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [LogEntry]{@link google.logging.v2.LogEntry}. @@ -548,13 +548,13 @@ class LoggingServiceV2Client { * "folders/[FOLDER_ID]" * * Projects listed in the `project_ids` field are added to this list. - * @param {string[]} request.projectIds + * @param {string[]} [request.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`. - * @param {string=} request.filter + * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that * match the filter are returned. An empty filter matches all log entries in @@ -562,20 +562,20 @@ class LoggingServiceV2Client { * that is not listed in `resource_names` will cause the filter to return no * results. * The maximum length of the filter is 20000 characters. - * @param {string=} request.orderBy + * @param {string} [request.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 their `insert_id` values. - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} @@ -613,16 +613,16 @@ class LoggingServiceV2Client { * * @param {Object} request * The request object that will be sent. - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. @@ -715,13 +715,13 @@ class LoggingServiceV2Client { * * @param {Object} request * The request object that will be sent. - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} @@ -766,16 +766,16 @@ class LoggingServiceV2Client { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of string. @@ -875,13 +875,13 @@ class LoggingServiceV2Client { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 3751c06477c..a58bbaf3d3c 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, @@ -31,28 +31,28 @@ class MetricsServiceV2Client { /** * Construct an instance of MetricsServiceV2Client. * - * @param {object=} options - The configuration object. See the subsequent + * @param {object} [options] - The configuration object. See the subsequent * parameters for more details. - * @param {object=} options.credentials - Credentials object. - * @param {string=} options.credentials.client_email - * @param {string=} options.credentials.private_key - * @param {string=} options.email - Account email address. Required when - * usaing a .pem or .p12 keyFilename. - * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option above is not necessary. + * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number=} options.port - The port on which to connect to + * @param {number} [options.port] - The port on which to connect to * the remote host. - * @param {string=} options.projectId - The project ID from the Google + * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. - * @param {function=} options.promise - Custom promise module to use instead + * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string=} options.servicePath - The domain name of the + * @param {string} [options.servicePath] - The domain name of the * API remote host. */ constructor(opts) { @@ -78,7 +78,7 @@ class MetricsServiceV2Client { // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, @@ -211,16 +211,16 @@ class MetricsServiceV2Client { * Required. The name of the project containing the metrics: * * "projects/[PROJECT_ID]" - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)=} callback + * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [LogMetric]{@link google.logging.v2.LogMetric}. @@ -317,13 +317,13 @@ class MetricsServiceV2Client { * Required. The name of the project containing the metrics: * * "projects/[PROJECT_ID]" - * @param {number=} request.pageSize + * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} @@ -364,10 +364,10 @@ class MetricsServiceV2Client { * The resource name of the desired metric: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. @@ -419,10 +419,10 @@ class MetricsServiceV2Client { * already exists. * * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. @@ -480,10 +480,10 @@ class MetricsServiceV2Client { * The updated metric. * * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. @@ -533,10 +533,10 @@ class MetricsServiceV2Client { * The resource name of the metric to delete: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error)=} callback + * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API call. diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py new file mode 100644 index 00000000000..fee40fc5056 --- /dev/null +++ b/handwritten/logging/synth.py @@ -0,0 +1,56 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import logging +from pathlib import Path +import subprocess + +logging.basicConfig(level=logging.DEBUG) + +gapic = gcp.GAPICGenerator() + +# tasks has two product names, and a poorly named artman yaml +v2_library = gapic.node_library( + 'logging', 'v2', + config_path='/google/logging/artman_logging.yaml', + artman_output_name='logging-v2') + + +# Copy all files except for 'README.md', 'package.json', and 'src/index.js' +s.copy(v2_library / 'protos') +s.copy(v2_library / 'src/v2') +s.copy(v2_library / 'test') +s.copy(v2_library / 'smoke-test') + +''' +Node.js specific cleanup +''' +# Repo Cleanup/Setup +# Install and Link (for linting mostly) +subprocess.run('bash', input=b'rm -rf node_modules package-lock.json') +subprocess.run( + 'bash', input=b'cd samples && rm -rf node_modules/ package-lock.json') +subprocess.run('bash', input=b'npm install && npm link') +subprocess.run('bash', input=b'cd samples && npm link ../ && npm install') + +# Generates scaffolding, enters contributors names +subprocess.run(['npm', 'run', 'generate-scaffolding']) + +# prettify and lint +subprocess.run(['npm', 'run', 'prettier']) +subprocess.run(['npm', 'run', 'lint']) diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 9ac63b48a70..f5e472c40e8 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://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, From e3e98d1f9a512f50438b18f5c08aea6de6311e22 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 20 Jun 2018 07:34:37 -0700 Subject: [PATCH 0170/1029] refactor: update to latest google-auth-library and nodejs-common (#128) --- handwritten/logging/package-lock.json | 2033 ++++++++++++++++--------- handwritten/logging/package.json | 5 +- handwritten/logging/src/index.js | 6 +- handwritten/logging/src/log.js | 2 +- handwritten/logging/src/metadata.js | 33 +- handwritten/logging/src/sink.js | 2 +- handwritten/logging/test/entry.js | 4 +- handwritten/logging/test/index.js | 26 +- handwritten/logging/test/log.js | 4 +- handwritten/logging/test/metadata.js | 38 +- handwritten/logging/test/sink.js | 4 +- 11 files changed, 1410 insertions(+), 747 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index c13cb46c796..8fa0ef2971d 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -227,31 +227,87 @@ "stream-events": "^1.0.1", "string-format-obj": "^1.0.0", "uuid": "^3.1.0" + }, + "dependencies": { + "@google-cloud/common": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.17.0.tgz", + "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", + "dev": true, + "requires": { + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.0", + "is": "^3.2.0", + "log-driver": "1.2.7", + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" + } + }, + "retry-request": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", + "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", + "dev": true, + "requires": { + "request": "^2.81.0", + "through2": "^2.0.0" + } + }, + "split-array-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", + "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", + "dev": true, + "requires": { + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" + } + } } }, "@google-cloud/common": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.17.0.tgz", - "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.0.tgz", + "integrity": "sha512-OCeDhpt+Qr90GxMFi54302Maf45Nux8ymF/jXgpPNElJUsjTmSN+Vzg3WmfAY+TYG9MDL2VufjjwlM4XrcNYcw==", "requires": { - "array-uniq": "^1.0.3", + "@types/duplexify": "^3.5.0", + "@types/request": "^2.47.0", "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", + "axios": "^0.18.0", + "duplexify": "^3.6.0", "ent": "^2.2.0", "extend": "^3.0.1", - "google-auto-auth": "^0.10.0", - "is": "^3.2.0", - "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", + "google-auth-library": "^1.6.0", + "is": "^3.2.1", + "pify": "^3.0.0", + "request": "^2.87.0", + "retry-request": "^3.3.1", + "split-array-stream": "^2.0.0", + "stream-events": "^1.0.4", "through2": "^2.0.3" + }, + "dependencies": { + "retry-request": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", + "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", + "requires": { + "request": "^2.81.0", + "through2": "^2.0.0" + } + } } }, "@google-cloud/common-grpc": { @@ -268,57 +324,6 @@ "is": "^3.2.1", "retry-request": "^4.0.0", "through2": "^2.0.3" - }, - "dependencies": { - "@google-cloud/common": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.0.tgz", - "integrity": "sha512-OCeDhpt+Qr90GxMFi54302Maf45Nux8ymF/jXgpPNElJUsjTmSN+Vzg3WmfAY+TYG9MDL2VufjjwlM4XrcNYcw==", - "requires": { - "@types/duplexify": "^3.5.0", - "@types/request": "^2.47.0", - "arrify": "^1.0.1", - "axios": "^0.18.0", - "duplexify": "^3.6.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auth-library": "^1.6.0", - "is": "^3.2.1", - "pify": "^3.0.0", - "request": "^2.87.0", - "retry-request": "^3.3.1", - "split-array-stream": "^2.0.0", - "stream-events": "^1.0.4", - "through2": "^2.0.3" - }, - "dependencies": { - "retry-request": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", - "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", - "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" - } - } - } - }, - "retry-request": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", - "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", - "requires": { - "through2": "^2.0.0" - } - }, - "split-array-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-2.0.0.tgz", - "integrity": "sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg==", - "requires": { - "is-stream-ended": "^0.1.4" - } - } } }, "@google-cloud/nodejs-repo-tools": { @@ -409,7 +414,8 @@ "dependencies": { "align-text": { "version": "0.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { "kind-of": "^3.0.2", @@ -419,22 +425,26 @@ }, "amdefine": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "ansi-styles": { "version": "2.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, "append-transform": { "version": "0.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "dev": true, "requires": { "default-require-extensions": "^1.0.0" @@ -442,12 +452,14 @@ }, "archy": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, "arr-diff": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { "arr-flatten": "^1.0.1" @@ -455,27 +467,32 @@ }, "arr-flatten": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, "array-unique": { "version": "0.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", "dev": true }, "arrify": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, "async": { "version": "1.5.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true }, "babel-code-frame": { "version": "6.26.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { "chalk": "^1.1.3", @@ -485,7 +502,8 @@ }, "babel-generator": { "version": "6.26.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", "dev": true, "requires": { "babel-messages": "^6.23.0", @@ -500,7 +518,8 @@ }, "babel-messages": { "version": "6.23.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { "babel-runtime": "^6.22.0" @@ -508,7 +527,8 @@ }, "babel-runtime": { "version": "6.26.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { "core-js": "^2.4.0", @@ -517,7 +537,8 @@ }, "babel-template": { "version": "6.26.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { "babel-runtime": "^6.26.0", @@ -529,7 +550,8 @@ }, "babel-traverse": { "version": "6.26.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { "babel-code-frame": "^6.26.0", @@ -545,7 +567,8 @@ }, "babel-types": { "version": "6.26.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { "babel-runtime": "^6.26.0", @@ -556,17 +579,20 @@ }, "babylon": { "version": "6.18.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "brace-expansion": { "version": "1.1.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -575,7 +601,8 @@ }, "braces": { "version": "1.8.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { "expand-range": "^1.8.1", @@ -585,12 +612,14 @@ }, "builtin-modules": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, "caching-transform": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", + "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", "dev": true, "requires": { "md5-hex": "^1.2.0", @@ -600,13 +629,15 @@ }, "camelcase": { "version": "1.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", "dev": true, "optional": true }, "center-align": { "version": "0.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "dev": true, "optional": true, "requires": { @@ -616,7 +647,8 @@ }, "chalk": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { "ansi-styles": "^2.2.1", @@ -628,7 +660,8 @@ }, "cliui": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "dev": true, "optional": true, "requires": { @@ -639,7 +672,8 @@ "dependencies": { "wordwrap": { "version": "0.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", "dev": true, "optional": true } @@ -647,32 +681,38 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "commondir": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "convert-source-map": { "version": "1.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, "core-js": { "version": "2.5.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=", "dev": true }, "cross-spawn": { "version": "4.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -681,7 +721,8 @@ }, "debug": { "version": "2.6.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -689,17 +730,20 @@ }, "debug-log": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", "dev": true }, "decamelize": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "default-require-extensions": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "dev": true, "requires": { "strip-bom": "^2.0.0" @@ -707,7 +751,8 @@ }, "detect-indent": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { "repeating": "^2.0.0" @@ -715,7 +760,8 @@ }, "error-ex": { "version": "1.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { "is-arrayish": "^0.2.1" @@ -723,17 +769,20 @@ }, "escape-string-regexp": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, "esutils": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, "execa": { "version": "0.7.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { "cross-spawn": "^5.0.1", @@ -747,7 +796,8 @@ "dependencies": { "cross-spawn": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -759,7 +809,8 @@ }, "expand-brackets": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { "is-posix-bracket": "^0.1.0" @@ -767,7 +818,8 @@ }, "expand-range": { "version": "1.8.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { "fill-range": "^2.1.0" @@ -775,7 +827,8 @@ }, "extglob": { "version": "0.3.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { "is-extglob": "^1.0.0" @@ -783,12 +836,14 @@ }, "filename-regex": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", "dev": true }, "fill-range": { "version": "2.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", "dev": true, "requires": { "is-number": "^2.1.0", @@ -800,7 +855,8 @@ }, "find-cache-dir": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz", + "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", "dev": true, "requires": { "commondir": "^1.0.1", @@ -810,7 +866,8 @@ }, "find-up": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { "locate-path": "^2.0.0" @@ -818,12 +875,14 @@ }, "for-in": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, "for-own": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { "for-in": "^1.0.1" @@ -831,7 +890,8 @@ }, "foreground-child": { "version": "1.5.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", "dev": true, "requires": { "cross-spawn": "^4", @@ -840,22 +900,26 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "get-caller-file": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, "get-stream": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -868,7 +932,8 @@ }, "glob-base": { "version": "0.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { "glob-parent": "^2.0.0", @@ -877,7 +942,8 @@ }, "glob-parent": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { "is-glob": "^2.0.0" @@ -885,17 +951,20 @@ }, "globals": { "version": "9.18.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true }, "graceful-fs": { "version": "4.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, "handlebars": { "version": "4.0.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { "async": "^1.4.0", @@ -906,7 +975,8 @@ "dependencies": { "source-map": { "version": "0.4.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { "amdefine": ">=0.0.4" @@ -916,7 +986,8 @@ }, "has-ansi": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -924,22 +995,26 @@ }, "has-flag": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, "hosted-git-info": { "version": "2.5.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", "dev": true }, "imurmurhash": { "version": "0.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -948,12 +1023,14 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "invariant": { "version": "2.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", "dev": true, "requires": { "loose-envify": "^1.0.0" @@ -961,22 +1038,26 @@ }, "invert-kv": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, "is-arrayish": { "version": "0.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, "is-buffer": { "version": "1.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, "is-builtin-module": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { "builtin-modules": "^1.0.0" @@ -984,12 +1065,14 @@ }, "is-dotfile": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", "dev": true }, "is-equal-shallow": { "version": "0.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { "is-primitive": "^2.0.0" @@ -997,17 +1080,20 @@ }, "is-extendable": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", "dev": true }, "is-extglob": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", "dev": true }, "is-finite": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -1015,7 +1101,8 @@ }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -1023,7 +1110,8 @@ }, "is-glob": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { "is-extglob": "^1.0.0" @@ -1031,7 +1119,8 @@ }, "is-number": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -1039,37 +1128,44 @@ }, "is-posix-bracket": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", "dev": true }, "is-primitive": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, "is-stream": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, "is-utf8": { "version": "0.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isexe": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "isobject": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "dev": true, "requires": { "isarray": "1.0.0" @@ -1077,12 +1173,14 @@ }, "istanbul-lib-coverage": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", + "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==", "dev": true }, "istanbul-lib-hook": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz", + "integrity": "sha512-U3qEgwVDUerZ0bt8cfl3dSP3S6opBoOtk3ROO5f2EfBr/SRiD9FQqzwaZBqFORu8W7O0EXpai+k7kxHK13beRg==", "dev": true, "requires": { "append-transform": "^0.4.0" @@ -1090,7 +1188,8 @@ }, "istanbul-lib-instrument": { "version": "1.9.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz", + "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", "dev": true, "requires": { "babel-generator": "^6.18.0", @@ -1104,7 +1203,8 @@ }, "istanbul-lib-report": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz", + "integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==", "dev": true, "requires": { "istanbul-lib-coverage": "^1.1.1", @@ -1115,7 +1215,8 @@ "dependencies": { "supports-color": { "version": "3.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { "has-flag": "^1.0.0" @@ -1125,7 +1226,8 @@ }, "istanbul-lib-source-maps": { "version": "1.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz", + "integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==", "dev": true, "requires": { "debug": "^3.1.0", @@ -1137,7 +1239,8 @@ "dependencies": { "debug": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -1147,7 +1250,8 @@ }, "istanbul-reports": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.3.tgz", + "integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==", "dev": true, "requires": { "handlebars": "^4.0.3" @@ -1155,17 +1259,20 @@ }, "js-tokens": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, "jsesc": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, "kind-of": { "version": "3.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -1173,13 +1280,15 @@ }, "lazy-cache": { "version": "1.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", "dev": true, "optional": true }, "lcid": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { "invert-kv": "^1.0.0" @@ -1187,7 +1296,8 @@ }, "load-json-file": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -1199,7 +1309,8 @@ }, "locate-path": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { "p-locate": "^2.0.0", @@ -1208,24 +1319,28 @@ "dependencies": { "path-exists": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true } } }, "lodash": { "version": "4.17.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", "dev": true }, "longest": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", "dev": true }, "loose-envify": { "version": "1.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { "js-tokens": "^3.0.0" @@ -1233,7 +1348,8 @@ }, "lru-cache": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", "dev": true, "requires": { "pseudomap": "^1.0.2", @@ -1242,7 +1358,8 @@ }, "md5-hex": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", + "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { "md5-o-matic": "^0.1.1" @@ -1250,12 +1367,14 @@ }, "md5-o-matic": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", + "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", "dev": true }, "mem": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { "mimic-fn": "^1.0.0" @@ -1263,7 +1382,8 @@ }, "merge-source-map": { "version": "1.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", + "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", "dev": true, "requires": { "source-map": "^0.5.6" @@ -1271,7 +1391,8 @@ }, "micromatch": { "version": "2.3.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { "arr-diff": "^2.0.0", @@ -1291,12 +1412,14 @@ }, "mimic-fn": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", "dev": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -1304,12 +1427,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" @@ -1317,12 +1442,14 @@ }, "ms": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, "normalize-package-data": { "version": "2.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { "hosted-git-info": "^2.1.4", @@ -1333,7 +1460,8 @@ }, "normalize-path": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { "remove-trailing-separator": "^1.0.1" @@ -1341,7 +1469,8 @@ }, "npm-run-path": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { "path-key": "^2.0.0" @@ -1349,17 +1478,20 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, "object.omit": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { "for-own": "^0.1.4", @@ -1368,7 +1500,8 @@ }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -1376,7 +1509,8 @@ }, "optimist": { "version": "0.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { "minimist": "~0.0.1", @@ -1385,12 +1519,14 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, "os-locale": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { "execa": "^0.7.0", @@ -1400,17 +1536,20 @@ }, "p-finally": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, "p-limit": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", "dev": true }, "p-locate": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { "p-limit": "^1.1.0" @@ -1418,7 +1557,8 @@ }, "parse-glob": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { "glob-base": "^0.3.0", @@ -1429,7 +1569,8 @@ }, "parse-json": { "version": "2.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { "error-ex": "^1.2.0" @@ -1437,7 +1578,8 @@ }, "path-exists": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { "pinkie-promise": "^2.0.0" @@ -1445,22 +1587,26 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-key": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "path-parse": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", "dev": true }, "path-type": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -1470,17 +1616,20 @@ }, "pify": { "version": "2.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, "pinkie": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", "dev": true }, "pinkie-promise": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { "pinkie": "^2.0.0" @@ -1488,7 +1637,8 @@ }, "pkg-dir": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "dev": true, "requires": { "find-up": "^1.0.0" @@ -1496,7 +1646,8 @@ "dependencies": { "find-up": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { "path-exists": "^2.0.0", @@ -1507,17 +1658,20 @@ }, "preserve": { "version": "0.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", "dev": true }, "pseudomap": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, "randomatic": { "version": "1.1.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", "dev": true, "requires": { "is-number": "^3.0.0", @@ -1526,7 +1680,8 @@ "dependencies": { "is-number": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -1534,7 +1689,8 @@ "dependencies": { "kind-of": { "version": "3.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -1544,7 +1700,8 @@ }, "kind-of": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -1554,7 +1711,8 @@ }, "read-pkg": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { "load-json-file": "^1.0.0", @@ -1564,7 +1722,8 @@ }, "read-pkg-up": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { "find-up": "^1.0.0", @@ -1573,7 +1732,8 @@ "dependencies": { "find-up": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { "path-exists": "^2.0.0", @@ -1584,12 +1744,14 @@ }, "regenerator-runtime": { "version": "0.11.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", "dev": true }, "regex-cache": { "version": "0.4.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { "is-equal-shallow": "^0.1.3" @@ -1597,22 +1759,26 @@ }, "remove-trailing-separator": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, "repeat-element": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", "dev": true }, "repeat-string": { "version": "1.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, "repeating": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { "is-finite": "^1.0.0" @@ -1620,22 +1786,26 @@ }, "require-directory": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "dev": true }, "resolve-from": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", "dev": true }, "right-align": { "version": "0.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", "dev": true, "optional": true, "requires": { @@ -1644,7 +1814,8 @@ }, "rimraf": { "version": "2.6.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { "glob": "^7.0.5" @@ -1652,17 +1823,20 @@ }, "semver": { "version": "5.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", "dev": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "shebang-command": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { "shebang-regex": "^1.0.0" @@ -1670,27 +1844,32 @@ }, "shebang-regex": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, "slide": { "version": "1.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", "dev": true }, "source-map": { "version": "0.5.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, "spawn-wrap": { "version": "1.4.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", + "integrity": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", "dev": true, "requires": { "foreground-child": "^1.5.6", @@ -1703,7 +1882,8 @@ }, "spdx-correct": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", "dev": true, "requires": { "spdx-license-ids": "^1.0.2" @@ -1711,17 +1891,20 @@ }, "spdx-expression-parse": { "version": "1.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", "dev": true }, "spdx-license-ids": { "version": "1.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", "dev": true }, "string-width": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -1730,17 +1913,20 @@ "dependencies": { "ansi-regex": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "strip-ansi": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { "ansi-regex": "^3.0.0" @@ -1750,7 +1936,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -1758,7 +1945,8 @@ }, "strip-bom": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { "is-utf8": "^0.2.0" @@ -1766,17 +1954,20 @@ }, "strip-eof": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, "supports-color": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, "test-exclude": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.1.1.tgz", + "integrity": "sha512-35+Asrsk3XHJDBgf/VRFexPgh3UyETv8IAn/LRTiZjVy6rjPVqdEk8dJcJYBzl1w0XCJM48lvTy8SfEsCWS4nA==", "dev": true, "requires": { "arrify": "^1.0.1", @@ -1788,17 +1979,20 @@ }, "to-fast-properties": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "dev": true }, "trim-right": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, "uglify-js": { "version": "2.8.29", - "bundled": true, + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "dev": true, "optional": true, "requires": { @@ -1809,7 +2003,8 @@ "dependencies": { "yargs": { "version": "3.10.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "optional": true, "requires": { @@ -1823,13 +2018,15 @@ }, "uglify-to-browserify": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", "dev": true, "optional": true }, "validate-npm-package-license": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", "dev": true, "requires": { "spdx-correct": "~1.0.0", @@ -1838,7 +2035,8 @@ }, "which": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -1846,23 +2044,27 @@ }, "which-module": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "window-size": { "version": "0.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", "dev": true, "optional": true }, "wordwrap": { "version": "0.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", "dev": true }, "wrap-ansi": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { "string-width": "^1.0.1", @@ -1871,7 +2073,8 @@ "dependencies": { "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -1883,12 +2086,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "write-file-atomic": { "version": "1.3.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -1898,17 +2103,20 @@ }, "y18n": { "version": "3.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", "dev": true }, "yallist": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "dev": true }, "yargs": { "version": "10.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.0.3.tgz", + "integrity": "sha512-DqBpQ8NAUX4GyPP/ijDGHsJya4tYqLQrjPr95HNsr1YwL3+daCfvBwg7+gIC6IdJhR2kATh3hb61vjzMWEtjdw==", "dev": true, "requires": { "cliui": "^3.2.0", @@ -1927,7 +2135,8 @@ "dependencies": { "cliui": { "version": "3.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { "string-width": "^1.0.1", @@ -1937,7 +2146,8 @@ "dependencies": { "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -1951,7 +2161,8 @@ }, "yargs-parser": { "version": "8.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.0.0.tgz", + "integrity": "sha1-IdR2Mw5agieaS4gTRb8GYQLiGcY=", "dev": true, "requires": { "camelcase": "^4.1.0" @@ -1959,7 +2170,8 @@ "dependencies": { "camelcase": { "version": "4.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true } } @@ -2115,6 +2327,26 @@ "power-assert": "^1.4.4", "protobufjs": "^6.8.0" } + }, + "retry-request": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", + "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", + "dev": true, + "requires": { + "request": "^2.81.0", + "through2": "^2.0.0" + } + }, + "split-array-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", + "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", + "dev": true, + "requires": { + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" + } } } }, @@ -2145,6 +2377,54 @@ "stream-events": "^1.0.1", "through2": "^2.0.0", "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "@google-cloud/common": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.17.0.tgz", + "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", + "dev": true, + "requires": { + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.0", + "is": "^3.2.0", + "log-driver": "1.2.7", + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" + } + }, + "retry-request": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", + "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", + "dev": true, + "requires": { + "request": "^2.81.0", + "through2": "^2.0.0" + } + }, + "split-array-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", + "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", + "dev": true, + "requires": { + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" + } + } } }, "@grpc/proto-loader": { @@ -3549,7 +3829,8 @@ "buffer-from": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==" + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "dev": true }, "builtin-modules": { "version": "1.1.1", @@ -3707,7 +3988,8 @@ "capture-stack-trace": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=" + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true }, "caseless": { "version": "0.12.0", @@ -4059,6 +4341,7 @@ "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, "requires": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -4157,6 +4440,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, "requires": { "capture-stack-trace": "^1.0.0" } @@ -5411,24 +5695,28 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "dev": true, "optional": true, "requires": { @@ -5438,12 +5726,14 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -5452,34 +5742,40 @@ }, "chownr": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "2.6.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "optional": true, "requires": { @@ -5488,25 +5784,29 @@ }, "deep-extend": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, "requires": { @@ -5515,13 +5815,15 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, "requires": { @@ -5537,7 +5839,8 @@ }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "optional": true, "requires": { @@ -5551,13 +5854,15 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.21", - "bundled": true, + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", "dev": true, "optional": true, "requires": { @@ -5566,7 +5871,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, "requires": { @@ -5575,7 +5881,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, "requires": { @@ -5585,18 +5892,21 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -5604,13 +5914,15 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -5618,12 +5930,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "minipass": { "version": "2.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", + "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, "requires": { "safe-buffer": "^5.1.1", @@ -5632,7 +5946,8 @@ }, "minizlib": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "dev": true, "optional": true, "requires": { @@ -5641,7 +5956,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" @@ -5649,13 +5965,15 @@ }, "ms": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true, "optional": true }, "needle": { "version": "2.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.0.tgz", + "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", "dev": true, "optional": true, "requires": { @@ -5666,7 +5984,8 @@ }, "node-pre-gyp": { "version": "0.10.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz", + "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", "dev": true, "optional": true, "requires": { @@ -5684,7 +6003,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, "requires": { @@ -5694,13 +6014,15 @@ }, "npm-bundled": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz", + "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.1.10", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz", + "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", "dev": true, "optional": true, "requires": { @@ -5710,7 +6032,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, "requires": { @@ -5722,18 +6045,21 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -5741,19 +6067,22 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, "requires": { @@ -5763,19 +6092,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "dev": true, "optional": true, "requires": { @@ -5787,7 +6119,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } @@ -5795,7 +6128,8 @@ }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, "requires": { @@ -5810,7 +6144,8 @@ }, "rimraf": { "version": "2.6.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "optional": true, "requires": { @@ -5819,42 +6154,49 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.5.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -5864,7 +6206,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, "requires": { @@ -5873,7 +6216,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -5881,13 +6225,15 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz", + "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", "dev": true, "optional": true, "requires": { @@ -5902,13 +6248,15 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "optional": true, "requires": { @@ -5917,12 +6265,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "yallist": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", "dev": true } } @@ -6256,19 +6606,23 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "aproba": { "version": "1.2.0", - "bundled": true + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, "are-we-there-yet": { "version": "1.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" @@ -6276,11 +6630,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6288,57 +6644,69 @@ }, "chownr": { "version": "1.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" }, "code-point-at": { "version": "1.1.0", - "bundled": true + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "concat-map": { "version": "0.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, "core-util-is": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "debug": { "version": "2.6.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } }, "deep-extend": { "version": "0.5.1", - "bundled": true + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==" }, "delegates": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, "detect-libc": { "version": "1.0.3", - "bundled": true + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "requires": { "minipass": "^2.2.1" } }, "fs.realpath": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -6352,7 +6720,8 @@ }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6364,25 +6733,29 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, "iconv-lite": { "version": "0.4.23", - "bundled": true, + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "requires": { "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { "once": "^1.3.0", "wrappy": "1" @@ -6390,37 +6763,44 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { "version": "1.3.5", - "bundled": true + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { "number-is-nan": "^1.0.0" } }, "isarray": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.0", - "bundled": true + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "minipass": { "version": "2.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.0.tgz", + "integrity": "sha512-jWC2Eg+Np4bxah7llu1IrUNSJQxtLz/J+pOjTM0nFpJXGAaV18XBWhUn031Q1tAA/TJtA1jgwnOe9S2PQa4Lbg==", "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6428,31 +6808,36 @@ }, "minizlib": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "requires": { "minipass": "^2.2.1" } }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" }, "dependencies": { "minimist": { "version": "0.0.8", - "bundled": true + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, "ms": { "version": "2.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "needle": { "version": "2.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.1.tgz", + "integrity": "sha512-t/ZswCM9JTWjAdXS9VpvqhI2Ct2sL2MdY4fUXqGJaGBk13ge99ObqRksRTbBE56K+wxUXwwfZYOuZHifFW9q+Q==", "requires": { "debug": "^2.1.2", "iconv-lite": "^0.4.4", @@ -6461,7 +6846,8 @@ }, "node-pre-gyp": { "version": "0.10.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz", + "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -6477,7 +6863,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "requires": { "abbrev": "1", "osenv": "^0.1.4" @@ -6485,11 +6872,13 @@ }, "npm-bundled": { "version": "1.0.3", - "bundled": true + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz", + "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==" }, "npm-packlist": { "version": "1.1.10", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz", + "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" @@ -6497,7 +6886,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -6507,30 +6897,36 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "object-assign": { "version": "4.1.1", - "bundled": true + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { "wrappy": "1" } }, "os-homedir": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-tmpdir": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -6538,11 +6934,13 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "process-nextick-args": { "version": "2.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "protobufjs": { "version": "5.0.3", @@ -6557,7 +6955,8 @@ }, "rc": { "version": "1.2.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "requires": { "deep-extend": "^0.5.1", "ini": "~1.3.0", @@ -6567,7 +6966,8 @@ }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -6580,38 +6980,46 @@ }, "rimraf": { "version": "2.6.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { "glob": "^7.0.5" } }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safer-buffer": { "version": "2.1.2", - "bundled": true + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sax": { "version": "1.2.4", - "bundled": true + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "semver": { "version": "5.5.0", - "bundled": true + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" }, "set-blocking": { "version": "2.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "signal-exit": { "version": "3.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6620,25 +7028,29 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, "tar": { "version": "4.4.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.2.tgz", + "integrity": "sha512-BfkE9CciGGgDsATqkikUHrQrraBCO+ke/1f6SFAEMnxyyfN9lxC+nW1NFWMpqH865DhHIy9vQi682gk1X7friw==", "requires": { "chownr": "^1.0.1", "fs-minipass": "^1.2.5", @@ -6651,22 +7063,26 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "wide-align": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "requires": { "string-width": "^1.0.2" } }, "wrappy": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "yallist": { "version": "3.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" } } }, @@ -7794,7 +8210,8 @@ "log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true }, "lolex": { "version": "2.7.0", @@ -8068,7 +8485,8 @@ "methmeth": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/methmeth/-/methmeth-1.1.0.tgz", - "integrity": "sha1-6AomYY5S9cQiKGG7dIUQvRDikIk=" + "integrity": "sha1-6AomYY5S9cQiKGG7dIUQvRDikIk=", + "dev": true }, "methods": { "version": "1.1.2", @@ -8190,7 +8608,8 @@ "modelo": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/modelo/-/modelo-4.2.3.tgz", - "integrity": "sha512-9DITV2YEMcw7XojdfvGl3gDD8J9QjZTJ7ZOUuSAkP+F3T6rDbzMJuPktxptsdHYEvZcmXrCD3LMOhdSAEq6zKA==" + "integrity": "sha512-9DITV2YEMcw7XojdfvGl3gDD8J9QjZTJ7ZOUuSAkP+F3T6rDbzMJuPktxptsdHYEvZcmXrCD3LMOhdSAEq6zKA==", + "dev": true }, "module-not-found-error": { "version": "1.0.1", @@ -8392,7 +8811,8 @@ "dependencies": { "align-text": { "version": "0.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { "kind-of": "^3.0.2", @@ -8402,17 +8822,20 @@ }, "amdefine": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, "ansi-regex": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "append-transform": { "version": "0.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "dev": true, "requires": { "default-require-extensions": "^1.0.0" @@ -8420,57 +8843,68 @@ }, "archy": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, "arr-diff": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", "dev": true }, "arr-flatten": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", "dev": true }, "arr-union": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, "array-unique": { "version": "0.3.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, "arrify": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, "assign-symbols": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, "async": { "version": "1.5.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true }, "atob": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", "dev": true }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "base": { "version": "0.11.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", "dev": true, "requires": { "cache-base": "^1.0.1", @@ -8484,7 +8918,8 @@ "dependencies": { "define-property": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { "is-descriptor": "^1.0.0" @@ -8492,7 +8927,8 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -8500,7 +8936,8 @@ }, "is-data-descriptor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -8508,7 +8945,8 @@ }, "is-descriptor": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -8518,14 +8956,16 @@ }, "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", "dev": true } } }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -8534,7 +8974,8 @@ }, "braces": { "version": "2.3.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -8551,7 +8992,8 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -8561,12 +9003,14 @@ }, "builtin-modules": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, "cache-base": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", "dev": true, "requires": { "collection-visit": "^1.0.0", @@ -8582,7 +9026,8 @@ }, "caching-transform": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", + "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", "dev": true, "requires": { "md5-hex": "^1.2.0", @@ -8592,13 +9037,15 @@ }, "camelcase": { "version": "1.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", "dev": true, "optional": true }, "center-align": { "version": "0.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "dev": true, "optional": true, "requires": { @@ -8608,7 +9055,8 @@ }, "class-utils": { "version": "0.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -8619,7 +9067,8 @@ "dependencies": { "define-property": { "version": "0.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -8629,7 +9078,8 @@ }, "cliui": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "dev": true, "optional": true, "requires": { @@ -8640,7 +9090,8 @@ "dependencies": { "wordwrap": { "version": "0.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", "dev": true, "optional": true } @@ -8648,12 +9099,14 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "collection-visit": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { "map-visit": "^1.0.0", @@ -8662,32 +9115,38 @@ }, "commondir": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "component-emitter": { "version": "1.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", "dev": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "convert-source-map": { "version": "1.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, "copy-descriptor": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, "cross-spawn": { "version": "4.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -8696,7 +9155,8 @@ }, "debug": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -8704,22 +9164,26 @@ }, "debug-log": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", "dev": true }, "decamelize": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "decode-uri-component": { "version": "0.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, "default-require-extensions": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "dev": true, "requires": { "strip-bom": "^2.0.0" @@ -8727,7 +9191,8 @@ }, "define-property": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", "dev": true, "requires": { "is-descriptor": "^1.0.2", @@ -8736,7 +9201,8 @@ "dependencies": { "is-accessor-descriptor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -8744,7 +9210,8 @@ }, "is-data-descriptor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -8752,7 +9219,8 @@ }, "is-descriptor": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -8762,14 +9230,16 @@ }, "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", "dev": true } } }, "error-ex": { "version": "1.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { "is-arrayish": "^0.2.1" @@ -8777,7 +9247,8 @@ }, "execa": { "version": "0.7.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { "cross-spawn": "^5.0.1", @@ -8791,7 +9262,8 @@ "dependencies": { "cross-spawn": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -8803,7 +9275,8 @@ }, "expand-brackets": { "version": "2.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { "debug": "^2.3.3", @@ -8817,7 +9290,8 @@ "dependencies": { "debug": { "version": "2.6.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, "requires": { "ms": "2.0.0" @@ -8825,7 +9299,8 @@ }, "define-property": { "version": "0.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -8833,7 +9308,8 @@ }, "extend-shallow": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -8843,7 +9319,8 @@ }, "extend-shallow": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { "assign-symbols": "^1.0.0", @@ -8852,7 +9329,8 @@ "dependencies": { "is-extendable": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -8862,7 +9340,8 @@ }, "extglob": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", "dev": true, "requires": { "array-unique": "^0.3.2", @@ -8877,7 +9356,8 @@ "dependencies": { "define-property": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { "is-descriptor": "^1.0.0" @@ -8885,7 +9365,8 @@ }, "extend-shallow": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -8893,7 +9374,8 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -8901,7 +9383,8 @@ }, "is-data-descriptor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -8909,7 +9392,8 @@ }, "is-descriptor": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -8919,14 +9403,16 @@ }, "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", "dev": true } } }, "fill-range": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -8937,7 +9423,8 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -8947,7 +9434,8 @@ }, "find-cache-dir": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz", + "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", "dev": true, "requires": { "commondir": "^1.0.1", @@ -8957,7 +9445,8 @@ }, "find-up": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { "locate-path": "^2.0.0" @@ -8965,12 +9454,14 @@ }, "for-in": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, "foreground-child": { "version": "1.5.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", "dev": true, "requires": { "cross-spawn": "^4", @@ -8979,7 +9470,8 @@ }, "fragment-cache": { "version": "0.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { "map-cache": "^0.2.2" @@ -8987,27 +9479,32 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "get-caller-file": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, "get-stream": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true }, "get-value": { "version": "2.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -9020,12 +9517,14 @@ }, "graceful-fs": { "version": "4.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, "handlebars": { "version": "4.0.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { "async": "^1.4.0", @@ -9036,7 +9535,8 @@ "dependencies": { "source-map": { "version": "0.4.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { "amdefine": ">=0.0.4" @@ -9046,7 +9546,8 @@ }, "has-value": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { "get-value": "^2.0.6", @@ -9056,7 +9557,8 @@ }, "has-values": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { "is-number": "^3.0.0", @@ -9065,7 +9567,8 @@ "dependencies": { "kind-of": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -9075,17 +9578,20 @@ }, "hosted-git-info": { "version": "2.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha1-IyNbKasjDFdqqw1PE/wEawsDgiI=", "dev": true }, "imurmurhash": { "version": "0.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -9094,17 +9600,20 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "invert-kv": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, "is-accessor-descriptor": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -9112,17 +9621,20 @@ }, "is-arrayish": { "version": "0.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, "is-buffer": { "version": "1.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", "dev": true }, "is-builtin-module": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { "builtin-modules": "^1.0.0" @@ -9130,7 +9642,8 @@ }, "is-data-descriptor": { "version": "0.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -9138,7 +9651,8 @@ }, "is-descriptor": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", "dev": true, "requires": { "is-accessor-descriptor": "^0.1.6", @@ -9148,24 +9662,28 @@ "dependencies": { "kind-of": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", "dev": true } } }, "is-extendable": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "is-number": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -9173,7 +9691,8 @@ }, "is-odd": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", "dev": true, "requires": { "is-number": "^4.0.0" @@ -9181,14 +9700,16 @@ "dependencies": { "is-number": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", "dev": true } } }, "is-plain-object": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", "dev": true, "requires": { "isobject": "^3.0.1" @@ -9196,42 +9717,50 @@ }, "is-stream": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, "is-utf8": { "version": "0.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, "is-windows": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", "dev": true }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isexe": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, "istanbul-lib-coverage": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", + "integrity": "sha1-99jy5CuX43/nlhFMsPnWi146Q0E=", "dev": true }, "istanbul-lib-hook": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz", + "integrity": "sha1-hTjZcDcss3FtU+VVI91UtVeo2Js=", "dev": true, "requires": { "append-transform": "^0.4.0" @@ -9239,7 +9768,8 @@ }, "istanbul-lib-report": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz", + "integrity": "sha1-LfEhiMD6d5kMDSF20tC6M5QYglk=", "dev": true, "requires": { "istanbul-lib-coverage": "^1.1.2", @@ -9250,12 +9780,14 @@ "dependencies": { "has-flag": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, "supports-color": { "version": "3.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { "has-flag": "^1.0.0" @@ -9265,7 +9797,8 @@ }, "istanbul-lib-source-maps": { "version": "1.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", + "integrity": "sha1-/+a+Tnq4bTYD5CkNVJkLFFBvybE=", "dev": true, "requires": { "debug": "^3.1.0", @@ -9277,7 +9810,8 @@ }, "istanbul-reports": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.4.1.tgz", + "integrity": "sha1-Ty6OkoqnoF0dpsQn1AmLJlXsczQ=", "dev": true, "requires": { "handlebars": "^4.0.3" @@ -9285,7 +9819,8 @@ }, "kind-of": { "version": "3.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -9293,13 +9828,15 @@ }, "lazy-cache": { "version": "1.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", "dev": true, "optional": true }, "lcid": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { "invert-kv": "^1.0.0" @@ -9307,7 +9844,8 @@ }, "load-json-file": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -9319,7 +9857,8 @@ }, "locate-path": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { "p-locate": "^2.0.0", @@ -9328,19 +9867,22 @@ "dependencies": { "path-exists": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true } } }, "longest": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", "dev": true }, "lru-cache": { "version": "4.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", "dev": true, "requires": { "pseudomap": "^1.0.2", @@ -9349,12 +9891,14 @@ }, "map-cache": { "version": "0.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, "map-visit": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { "object-visit": "^1.0.0" @@ -9362,7 +9906,8 @@ }, "md5-hex": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", + "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { "md5-o-matic": "^0.1.1" @@ -9370,12 +9915,14 @@ }, "md5-o-matic": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", + "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", "dev": true }, "mem": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { "mimic-fn": "^1.0.0" @@ -9383,7 +9930,8 @@ }, "merge-source-map": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha1-L93n5gIJOfcJBqaPLXrmheTIxkY=", "dev": true, "requires": { "source-map": "^0.6.1" @@ -9391,14 +9939,16 @@ "dependencies": { "source-map": { "version": "0.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true } } }, "micromatch": { "version": "3.1.10", - "bundled": true, + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -9418,19 +9968,22 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", "dev": true } } }, "mimic-fn": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", "dev": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -9438,12 +9991,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "mixin-deep": { "version": "1.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", "dev": true, "requires": { "for-in": "^1.0.2", @@ -9452,7 +10007,8 @@ "dependencies": { "is-extendable": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -9462,7 +10018,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" @@ -9470,12 +10027,14 @@ }, "ms": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, "nanomatch": { "version": "1.2.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -9494,14 +10053,16 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", "dev": true } } }, "normalize-package-data": { "version": "2.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "dev": true, "requires": { "hosted-git-info": "^2.1.4", @@ -9512,7 +10073,8 @@ }, "npm-run-path": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { "path-key": "^2.0.0" @@ -9520,17 +10082,20 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, "object-copy": { "version": "0.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { "copy-descriptor": "^0.1.0", @@ -9540,7 +10105,8 @@ "dependencies": { "define-property": { "version": "0.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -9550,7 +10116,8 @@ }, "object-visit": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { "isobject": "^3.0.0" @@ -9558,7 +10125,8 @@ }, "object.pick": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "requires": { "isobject": "^3.0.1" @@ -9566,7 +10134,8 @@ }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -9574,7 +10143,8 @@ }, "optimist": { "version": "0.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { "minimist": "~0.0.1", @@ -9583,12 +10153,14 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, "os-locale": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=", "dev": true, "requires": { "execa": "^0.7.0", @@ -9598,12 +10170,14 @@ }, "p-finally": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, "p-limit": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha1-DpK2vty1nwIsE9DxlJ3ILRWQnxw=", "dev": true, "requires": { "p-try": "^1.0.0" @@ -9611,7 +10185,8 @@ }, "p-locate": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { "p-limit": "^1.1.0" @@ -9619,12 +10194,14 @@ }, "p-try": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, "parse-json": { "version": "2.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { "error-ex": "^1.2.0" @@ -9632,12 +10209,14 @@ }, "pascalcase": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, "path-exists": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { "pinkie-promise": "^2.0.0" @@ -9645,22 +10224,26 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-key": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "path-parse": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", "dev": true }, "path-type": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -9670,17 +10253,20 @@ }, "pify": { "version": "2.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, "pinkie": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", "dev": true }, "pinkie-promise": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { "pinkie": "^2.0.0" @@ -9688,7 +10274,8 @@ }, "pkg-dir": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "dev": true, "requires": { "find-up": "^1.0.0" @@ -9696,7 +10283,8 @@ "dependencies": { "find-up": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { "path-exists": "^2.0.0", @@ -9707,17 +10295,20 @@ }, "posix-character-classes": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, "pseudomap": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, "read-pkg": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { "load-json-file": "^1.0.0", @@ -9727,7 +10318,8 @@ }, "read-pkg-up": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { "find-up": "^1.0.0", @@ -9736,7 +10328,8 @@ "dependencies": { "find-up": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { "path-exists": "^2.0.0", @@ -9747,7 +10340,8 @@ }, "regex-not": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", "dev": true, "requires": { "extend-shallow": "^3.0.2", @@ -9756,42 +10350,50 @@ }, "repeat-element": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", "dev": true }, "repeat-string": { "version": "1.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, "require-directory": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "dev": true }, "resolve-from": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", "dev": true }, "resolve-url": { "version": "0.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, "ret": { "version": "0.1.15", - "bundled": true, + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", "dev": true }, "right-align": { "version": "0.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", "dev": true, "optional": true, "requires": { @@ -9800,7 +10402,8 @@ }, "rimraf": { "version": "2.6.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", "dev": true, "requires": { "glob": "^7.0.5" @@ -9808,7 +10411,8 @@ }, "safe-regex": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { "ret": "~0.1.10" @@ -9816,17 +10420,20 @@ }, "semver": { "version": "5.5.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=", "dev": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "set-value": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -9837,7 +10444,8 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -9847,7 +10455,8 @@ }, "shebang-command": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { "shebang-regex": "^1.0.0" @@ -9855,22 +10464,26 @@ }, "shebang-regex": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, "slide": { "version": "1.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", "dev": true }, "snapdragon": { "version": "0.8.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", "dev": true, "requires": { "base": "^0.11.1", @@ -9885,7 +10498,8 @@ "dependencies": { "debug": { "version": "2.6.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, "requires": { "ms": "2.0.0" @@ -9893,7 +10507,8 @@ }, "define-property": { "version": "0.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -9901,7 +10516,8 @@ }, "extend-shallow": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -9911,7 +10527,8 @@ }, "snapdragon-node": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", "dev": true, "requires": { "define-property": "^1.0.0", @@ -9921,7 +10538,8 @@ "dependencies": { "define-property": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { "is-descriptor": "^1.0.0" @@ -9929,7 +10547,8 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9937,7 +10556,8 @@ }, "is-data-descriptor": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9945,7 +10565,8 @@ }, "is-descriptor": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -9955,14 +10576,16 @@ }, "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", "dev": true } } }, "snapdragon-util": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", "dev": true, "requires": { "kind-of": "^3.2.0" @@ -9970,12 +10593,14 @@ }, "source-map": { "version": "0.5.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, "source-map-resolve": { "version": "0.5.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", "dev": true, "requires": { "atob": "^2.1.1", @@ -9987,12 +10612,14 @@ }, "source-map-url": { "version": "0.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, "spawn-wrap": { "version": "1.4.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", + "integrity": "sha1-z/WOc6giRhe2Vhq9wyWG6gyCJIw=", "dev": true, "requires": { "foreground-child": "^1.5.6", @@ -10005,7 +10632,8 @@ }, "spdx-correct": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha1-BaW01xU6GVvJLDxCW2nzsqlSTII=", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -10014,12 +10642,14 @@ }, "spdx-exceptions": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha1-LHrmEFbHFKW5ubKyr30xHvXHj+k=", "dev": true }, "spdx-expression-parse": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha1-meEZt6XaAOBUkcn6M4t5BII7QdA=", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -10028,12 +10658,14 @@ }, "spdx-license-ids": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha1-enzShHDMbToc/m1miG9rxDDTrIc=", "dev": true }, "split-string": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", "dev": true, "requires": { "extend-shallow": "^3.0.0" @@ -10041,7 +10673,8 @@ }, "static-extend": { "version": "0.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { "define-property": "^0.2.5", @@ -10050,7 +10683,8 @@ "dependencies": { "define-property": { "version": "0.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -10060,7 +10694,8 @@ }, "string-width": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -10069,7 +10704,8 @@ }, "strip-ansi": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { "ansi-regex": "^3.0.0" @@ -10077,7 +10713,8 @@ }, "strip-bom": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { "is-utf8": "^0.2.0" @@ -10085,12 +10722,14 @@ }, "strip-eof": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, "test-exclude": { "version": "4.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", + "integrity": "sha1-36Ii8DSAvKaSB8pyizfXS0X3JPo=", "dev": true, "requires": { "arrify": "^1.0.1", @@ -10102,7 +10741,8 @@ }, "to-object-path": { "version": "0.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -10110,7 +10750,8 @@ }, "to-regex": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", "dev": true, "requires": { "define-property": "^2.0.2", @@ -10121,7 +10762,8 @@ }, "to-regex-range": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { "is-number": "^3.0.0", @@ -10130,7 +10772,8 @@ }, "uglify-js": { "version": "2.8.29", - "bundled": true, + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "dev": true, "optional": true, "requires": { @@ -10141,7 +10784,8 @@ "dependencies": { "yargs": { "version": "3.10.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "optional": true, "requires": { @@ -10155,13 +10799,15 @@ }, "uglify-to-browserify": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", "dev": true, "optional": true }, "union-value": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -10172,7 +10818,8 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -10180,7 +10827,8 @@ }, "set-value": { "version": "0.4.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -10193,7 +10841,8 @@ }, "unset-value": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { "has-value": "^0.3.1", @@ -10202,7 +10851,8 @@ "dependencies": { "has-value": { "version": "0.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { "get-value": "^2.0.3", @@ -10212,7 +10862,8 @@ "dependencies": { "isobject": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "dev": true, "requires": { "isarray": "1.0.0" @@ -10222,19 +10873,22 @@ }, "has-values": { "version": "0.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true } } }, "urix": { "version": "0.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, "use": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", "dev": true, "requires": { "kind-of": "^6.0.2" @@ -10242,14 +10896,16 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", "dev": true } } }, "validate-npm-package-license": { "version": "3.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha1-gWQ7y+8b3+zUYjeT3EZIlIupgzg=", "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -10258,7 +10914,8 @@ }, "which": { "version": "1.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", "dev": true, "requires": { "isexe": "^2.0.0" @@ -10266,23 +10923,27 @@ }, "which-module": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "window-size": { "version": "0.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", "dev": true, "optional": true }, "wordwrap": { "version": "0.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", "dev": true }, "wrap-ansi": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { "string-width": "^1.0.1", @@ -10291,12 +10952,14 @@ "dependencies": { "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -10304,7 +10967,8 @@ }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -10314,7 +10978,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -10324,12 +10989,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "write-file-atomic": { "version": "1.3.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -10339,17 +11006,20 @@ }, "y18n": { "version": "3.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", "dev": true }, "yallist": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "dev": true }, "yargs": { "version": "11.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha1-kLhpk07W6HERXqL/WLA/RyTtLXc=", "dev": true, "requires": { "cliui": "^4.0.0", @@ -10368,12 +11038,14 @@ "dependencies": { "camelcase": { "version": "4.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, "cliui": { "version": "4.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", "dev": true, "requires": { "string-width": "^2.1.1", @@ -10383,7 +11055,8 @@ }, "yargs-parser": { "version": "9.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { "camelcase": "^4.1.0" @@ -10393,7 +11066,8 @@ }, "yargs-parser": { "version": "8.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha1-8TdqM7Ziml0GN4KUTacyYx6WaVA=", "dev": true, "requires": { "camelcase": "^4.1.0" @@ -10401,7 +11075,8 @@ "dependencies": { "camelcase": { "version": "4.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true } } @@ -11546,11 +12221,10 @@ "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==" }, "retry-request": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", - "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", + "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", "requires": { - "request": "^2.81.0", "through2": "^2.0.0" } }, @@ -11959,12 +12633,11 @@ "dev": true }, "split-array-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", - "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-2.0.0.tgz", + "integrity": "sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg==", "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" + "is-stream-ended": "^0.1.4" } }, "split-string": { @@ -12060,7 +12733,8 @@ "string-format-obj": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz", - "integrity": "sha512-Mm+sROy+pHJmx0P/0Bs1uxIX6UhGJGj6xDGQZ5zh9v/SZRmLGevp+p0VJxV7lirrkAmQ2mvva/gHKpnF/pTb+Q==" + "integrity": "sha512-Mm+sROy+pHJmx0P/0Bs1uxIX6UhGJGj6xDGQZ5zh9v/SZRmLGevp+p0VJxV7lirrkAmQ2mvva/gHKpnF/pTb+Q==", + "dev": true }, "string-width": { "version": "1.0.2", @@ -12471,7 +13145,8 @@ "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true }, "uglify-js": { "version": "2.8.29", diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8470553bcee..c8d820aae83 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,15 +63,14 @@ "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" }, "dependencies": { - "@google-cloud/common": "^0.17.0", "@google-cloud/common-grpc": "^0.7.1", "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.1", "gcp-metadata": "^0.6.3", - "google-auto-auth": "^0.10.1", + "google-auth-library": "^1.6.0", "google-gax": "^0.16.1", - "google-proto-files": "^0.16.0", + "google-proto-files": "^0.16.1", "is": "^3.2.1", "lodash.merge": "^4.6.1", "protobufjs": "^6.8.6", diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 9817ffcc3e4..ba3e58a0dbb 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -17,9 +17,9 @@ 'use strict'; var arrify = require('arrify'); -var common = require('@google-cloud/common'); +var common = require('@google-cloud/common-grpc'); var extend = require('extend'); -var googleAuth = require('google-auto-auth'); +var {GoogleAuth} = require('google-auth-library'); var is = require('is'); var pumpify = require('pumpify'); var streamEvents = require('stream-events'); @@ -139,7 +139,7 @@ function Logging(options) { ); this.api = {}; - this.auth = googleAuth(options_); + this.auth = new GoogleAuth(options_); this.options = options_; this.projectId = this.options.projectId || '{{projectId}}'; } diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 9837c5e43eb..be6680e7c31 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -17,7 +17,7 @@ 'use strict'; var arrify = require('arrify'); -var common = require('@google-cloud/common'); +var common = require('@google-cloud/common-grpc'); var extend = require('extend'); var is = require('is'); var snakeCaseKeys = require('snakecase-keys'); diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index af4720417a7..5cc92faf900 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -123,21 +123,24 @@ Metadata.getGlobalDescriptor = function() { * @param {function} callback Callback function. */ Metadata.prototype.getDefaultResource = function(callback) { - this.logging.auth.getEnvironment(function(err, env) { - if (env.IS_CONTAINER_ENGINE) { - Metadata.getGKEDescriptor(callback); - } else if (env.IS_APP_ENGINE) { - callback(null, Metadata.getGAEDescriptor()); - } else if (env.IS_CLOUD_FUNCTION) { - callback(null, Metadata.getCloudFunctionDescriptor()); - } else if (env.IS_COMPUTE_ENGINE) { - // Test for compute engine should be done after all the rest - everything - // runs on top of compute engine. - Metadata.getGCEDescriptor(callback); - } else { - callback(null, Metadata.getGlobalDescriptor()); - } - }); + this.logging.auth + .getEnv() + .then(env => { + if (env === 'CONTAINER_ENGINE') { + Metadata.getGKEDescriptor(callback); + } else if (env === 'APP_ENGINE') { + callback(null, Metadata.getGAEDescriptor()); + } else if (env === 'CLOUD_FUNCTIONS') { + callback(null, Metadata.getCloudFunctionDescriptor()); + } else if (env === 'COMPUTE_ENGINE') { + // Test for compute engine should be done after all the rest - everything + // runs on top of compute engine. + Metadata.getGCEDescriptor(callback); + } else { + callback(null, Metadata.getGlobalDescriptor()); + } + }) + .catch(callback); }; module.exports = Metadata; diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 70c2b2d7206..28da8133df2 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -16,7 +16,7 @@ 'use strict'; -var common = require('@google-cloud/common'); +var common = require('@google-cloud/common-grpc'); var extend = require('extend'); var is = require('is'); diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 98de3f48258..9ef4aad6f64 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -18,9 +18,9 @@ var assert = require('assert'); var extend = require('extend'); -var GrpcService = require('@google-cloud/common').GrpcService; +var GrpcService = require('@google-cloud/common-grpc').GrpcService; var proxyquire = require('proxyquire'); -var util = require('@google-cloud/common').util; +var util = require('@google-cloud/common-grpc').util; function FakeGrpcService() {} diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 58e30ecbbff..8cd0fffcde9 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -21,7 +21,7 @@ var assert = require('assert'); var extend = require('extend'); var proxyquire = require('proxyquire'); var through = require('through2'); -var util = require('@google-cloud/common').util; +var util = require('@google-cloud/common-grpc').util; var v2 = require('../src/v2'); @@ -43,9 +43,9 @@ var fakePaginator = { }, }; -var googleAutoAuthOverride; -function fakeGoogleAutoAuth() { - return (googleAutoAuthOverride || util.noop).apply(null, arguments); +var googleAuthOverride; +function fakeGoogleAuth() { + return (googleAuthOverride || util.noop).apply(null, arguments); } var isCustomTypeOverride; @@ -103,11 +103,13 @@ describe('Logging', function() { before(function() { Logging = proxyquire('../', { - '@google-cloud/common': { + '@google-cloud/common-grpc': { paginator: fakePaginator, util: fakeUtil, }, - 'google-auto-auth': fakeGoogleAutoAuth, + 'google-auth-library': { + GoogleAuth: fakeGoogleAuth, + }, './log.js': FakeLog, './entry.js': FakeEntry, './sink.js': FakeSink, @@ -118,7 +120,7 @@ describe('Logging', function() { beforeEach(function() { extend(fakeUtil, originalFakeUtil); - googleAutoAuthOverride = null; + googleAuthOverride = null; isCustomTypeOverride = null; replaceProjectIdTokenOverride = null; @@ -175,14 +177,14 @@ describe('Logging', function() { assert.deepEqual(logging.api, {}); }); - it('should cache a local google-auto-auth instance', function() { - var fakeGoogleAutoAuthInstance = {}; + it('should cache a local GoogleAuth instance', function() { + var fakeGoogleAuthInstance = {}; var options = { a: 'b', c: 'd', }; - googleAutoAuthOverride = function(options_) { + googleAuthOverride = function(options_) { assert.deepEqual( options_, extend( @@ -194,11 +196,11 @@ describe('Logging', function() { options ) ); - return fakeGoogleAutoAuthInstance; + return fakeGoogleAuthInstance; }; var logging = new Logging(options); - assert.strictEqual(logging.auth, fakeGoogleAutoAuthInstance); + assert.strictEqual(logging.auth, fakeGoogleAuthInstance); }); it('should localize the options', function() { diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 51ef6b6f9b9..c76d1bf19b5 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -20,7 +20,7 @@ var assert = require('assert'); var extend = require('extend'); var prop = require('propprop'); var proxyquire = require('proxyquire'); -var util = require('@google-cloud/common').util; +var util = require('@google-cloud/common-grpc').util; var promisifed = false; var fakeUtil = extend({}, util, { @@ -60,7 +60,7 @@ describe('Log', function() { before(function() { Log = proxyquire('../src/log.js', { - '@google-cloud/common': { + '@google-cloud/common-grpc': { util: fakeUtil, }, './entry.js': Entry, diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 0df42ba14d5..ecbac268158 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -204,7 +204,7 @@ describe('metadata', function() { describe('getDefaultResource', function() { it('should get the environment from auth client', function(done) { - metadata.logging.auth.getEnvironment = function() { + metadata.logging.auth.getEnv = function() { done(); }; @@ -220,11 +220,8 @@ describe('metadata', function() { return DESCRIPTOR; }; - metadata.logging.auth.getEnvironment = function(callback) { - callback(null, { - IS_APP_ENGINE: true, - IS_COMPUTE_ENGINE: true, - }); + metadata.logging.auth.getEnv = function() { + return Promise.resolve('APP_ENGINE'); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -243,11 +240,8 @@ describe('metadata', function() { return DESCRIPTOR; }; - metadata.logging.auth.getEnvironment = function(callback) { - callback(null, { - IS_CLOUD_FUNCTION: true, - IS_COMPUTE_ENGINE: true, - }); + metadata.logging.auth.getEnv = function() { + return Promise.resolve('CLOUD_FUNCTIONS'); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -266,10 +260,8 @@ describe('metadata', function() { successArg: {data: INSTANCE_ID}, }; - metadata.logging.auth.getEnvironment = function(callback) { - callback(null, { - IS_COMPUTE_ENGINE: true, - }); + metadata.logging.auth.getEnv = function() { + return Promise.resolve('COMPUTE_ENGINE'); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -293,11 +285,8 @@ describe('metadata', function() { successArg: {data: CLUSTER_NAME}, }; - metadata.logging.auth.getEnvironment = function(callback) { - callback(null, { - IS_COMPUTE_ENGINE: true, - IS_CONTAINER_ENGINE: true, - }); + metadata.logging.auth.getEnv = function() { + return Promise.resolve('CONTAINER_ENGINE'); }; metadata.getDefaultResource(function(err, defaultResource) { @@ -321,13 +310,8 @@ describe('metadata', function() { return DESCRIPTOR; }; - metadata.logging.auth.getEnvironment = function(callback) { - callback(null, { - IS_APP_ENGINE: false, - IS_CLOUD_FUNCTION: false, - IS_COMPUTE_ENGINE: false, - IS_CONTAINER_ENGINE: false, - }); + metadata.logging.auth.getEnv = function() { + return Promise.resolve('NONE'); }; metadata.getDefaultResource(function(err, defaultResource) { diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index 8c7f78d3e17..0d3dcb6346d 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -19,7 +19,7 @@ var assert = require('assert'); var extend = require('extend'); var proxyquire = require('proxyquire'); -var util = require('@google-cloud/common').util; +var {util} = require('@google-cloud/common-grpc'); var promisifed = false; var fakeUtil = extend({}, util, { @@ -42,7 +42,7 @@ describe('Sink', function() { before(function() { Sink = proxyquire('../src/sink.js', { - '@google-cloud/common': { + '@google-cloud/common-grpc': { util: fakeUtil, }, }); From fb6b36cd6ab3e2ad00552d804c3495c0c0dfe497 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Fri, 22 Jun 2018 14:03:03 -0700 Subject: [PATCH 0171/1029] Update synth.py, removing generate-scaffolding (#130) --- handwritten/logging/synth.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index fee40fc5056..a3704bd34eb 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -48,9 +48,6 @@ subprocess.run('bash', input=b'npm install && npm link') subprocess.run('bash', input=b'cd samples && npm link ../ && npm install') -# Generates scaffolding, enters contributors names -subprocess.run(['npm', 'run', 'generate-scaffolding']) - # prettify and lint subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) From e981090fbb77c34a30fe3e8c16b4a40ff5b01c24 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 22 Jun 2018 15:27:03 -0700 Subject: [PATCH 0172/1029] chore: regenerate the library, upgrade gax --- handwritten/logging/package-lock.json | 1969 ++++++----------- handwritten/logging/package.json | 2 +- .../logging_service_v2_smoke_test.js | 6 +- .../src/v2/config_service_v2_client.js | 2 +- .../src/v2/logging_service_v2_client.js | 4 +- .../src/v2/metrics_service_v2_client.js | 2 +- 6 files changed, 700 insertions(+), 1285 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 8fa0ef2971d..e66572ef010 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -178,9 +178,9 @@ }, "dependencies": { "globals": { - "version": "11.6.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.6.0.tgz", - "integrity": "sha512-IC8IL7f76dYfElTZ47+hXtEOtq/Cxqd48jR1dfSl7N3T2XA98XBnx8nkNUuy/O3TFmws107jq4Ty+3Tm81BoOA==", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true } } @@ -278,9 +278,9 @@ } }, "@google-cloud/common": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.0.tgz", - "integrity": "sha512-OCeDhpt+Qr90GxMFi54302Maf45Nux8ymF/jXgpPNElJUsjTmSN+Vzg3WmfAY+TYG9MDL2VufjjwlM4XrcNYcw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.1.tgz", + "integrity": "sha512-LJB7CoNXEXY0mDWtF8E2cl3Y0kuMQ3wjH9Xr+Y7vH5gHgN82dDh1BMUOizRf9oXQFDWUgGERD5SdfBcjUhHmwA==", "requires": { "@types/duplexify": "^3.5.0", "@types/request": "^2.47.0", @@ -414,8 +414,7 @@ "dependencies": { "align-text": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.0.2", @@ -425,26 +424,22 @@ }, "amdefine": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "bundled": true, "dev": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "bundled": true, "dev": true }, "ansi-styles": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "bundled": true, "dev": true }, "append-transform": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", - "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "bundled": true, "dev": true, "requires": { "default-require-extensions": "^1.0.0" @@ -452,14 +447,12 @@ }, "archy": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "bundled": true, "dev": true }, "arr-diff": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "bundled": true, "dev": true, "requires": { "arr-flatten": "^1.0.1" @@ -467,32 +460,27 @@ }, "arr-flatten": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "bundled": true, "dev": true }, "array-unique": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "bundled": true, "dev": true }, "arrify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "bundled": true, "dev": true }, "async": { "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "bundled": true, "dev": true }, "babel-code-frame": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "bundled": true, "dev": true, "requires": { "chalk": "^1.1.3", @@ -502,8 +490,7 @@ }, "babel-generator": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", - "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "bundled": true, "dev": true, "requires": { "babel-messages": "^6.23.0", @@ -518,8 +505,7 @@ }, "babel-messages": { "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "bundled": true, "dev": true, "requires": { "babel-runtime": "^6.22.0" @@ -527,8 +513,7 @@ }, "babel-runtime": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "bundled": true, "dev": true, "requires": { "core-js": "^2.4.0", @@ -537,8 +522,7 @@ }, "babel-template": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "bundled": true, "dev": true, "requires": { "babel-runtime": "^6.26.0", @@ -550,8 +534,7 @@ }, "babel-traverse": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "bundled": true, "dev": true, "requires": { "babel-code-frame": "^6.26.0", @@ -567,8 +550,7 @@ }, "babel-types": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "bundled": true, "dev": true, "requires": { "babel-runtime": "^6.26.0", @@ -579,20 +561,17 @@ }, "babylon": { "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "bundled": true, "dev": true }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "bundled": true, "dev": true }, "brace-expansion": { "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "bundled": true, "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -601,8 +580,7 @@ }, "braces": { "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "bundled": true, "dev": true, "requires": { "expand-range": "^1.8.1", @@ -612,14 +590,12 @@ }, "builtin-modules": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "bundled": true, "dev": true }, "caching-transform": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", - "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", + "bundled": true, "dev": true, "requires": { "md5-hex": "^1.2.0", @@ -629,15 +605,13 @@ }, "camelcase": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "bundled": true, "dev": true, "optional": true }, "center-align": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -647,8 +621,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "bundled": true, "dev": true, "requires": { "ansi-styles": "^2.2.1", @@ -660,8 +633,7 @@ }, "cliui": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -672,8 +644,7 @@ "dependencies": { "wordwrap": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "bundled": true, "dev": true, "optional": true } @@ -681,38 +652,32 @@ }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "bundled": true, "dev": true }, "commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "bundled": true, "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "bundled": true, "dev": true }, "convert-source-map": { "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "bundled": true, "dev": true }, "core-js": { "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=", + "bundled": true, "dev": true }, "cross-spawn": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "bundled": true, "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -721,8 +686,7 @@ }, "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "bundled": true, "dev": true, "requires": { "ms": "2.0.0" @@ -730,20 +694,17 @@ }, "debug-log": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", - "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", + "bundled": true, "dev": true }, "decamelize": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "bundled": true, "dev": true }, "default-require-extensions": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", - "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "bundled": true, "dev": true, "requires": { "strip-bom": "^2.0.0" @@ -751,8 +712,7 @@ }, "detect-indent": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "bundled": true, "dev": true, "requires": { "repeating": "^2.0.0" @@ -760,8 +720,7 @@ }, "error-ex": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "bundled": true, "dev": true, "requires": { "is-arrayish": "^0.2.1" @@ -769,20 +728,17 @@ }, "escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "bundled": true, "dev": true }, "esutils": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "bundled": true, "dev": true }, "execa": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "bundled": true, "dev": true, "requires": { "cross-spawn": "^5.0.1", @@ -796,8 +752,7 @@ "dependencies": { "cross-spawn": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "bundled": true, "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -809,8 +764,7 @@ }, "expand-brackets": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "bundled": true, "dev": true, "requires": { "is-posix-bracket": "^0.1.0" @@ -818,8 +772,7 @@ }, "expand-range": { "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "bundled": true, "dev": true, "requires": { "fill-range": "^2.1.0" @@ -827,8 +780,7 @@ }, "extglob": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "bundled": true, "dev": true, "requires": { "is-extglob": "^1.0.0" @@ -836,14 +788,12 @@ }, "filename-regex": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "bundled": true, "dev": true }, "fill-range": { "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "bundled": true, "dev": true, "requires": { "is-number": "^2.1.0", @@ -855,8 +805,7 @@ }, "find-cache-dir": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz", - "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", + "bundled": true, "dev": true, "requires": { "commondir": "^1.0.1", @@ -866,8 +815,7 @@ }, "find-up": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "bundled": true, "dev": true, "requires": { "locate-path": "^2.0.0" @@ -875,14 +823,12 @@ }, "for-in": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "bundled": true, "dev": true }, "for-own": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "bundled": true, "dev": true, "requires": { "for-in": "^1.0.1" @@ -890,8 +836,7 @@ }, "foreground-child": { "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "bundled": true, "dev": true, "requires": { "cross-spawn": "^4", @@ -900,26 +845,22 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "bundled": true, "dev": true }, "get-caller-file": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "bundled": true, "dev": true }, "get-stream": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "bundled": true, "dev": true }, "glob": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "bundled": true, "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -932,8 +873,7 @@ }, "glob-base": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "bundled": true, "dev": true, "requires": { "glob-parent": "^2.0.0", @@ -942,8 +882,7 @@ }, "glob-parent": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "bundled": true, "dev": true, "requires": { "is-glob": "^2.0.0" @@ -951,20 +890,17 @@ }, "globals": { "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "bundled": true, "dev": true }, "graceful-fs": { "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "bundled": true, "dev": true }, "handlebars": { "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "bundled": true, "dev": true, "requires": { "async": "^1.4.0", @@ -975,8 +911,7 @@ "dependencies": { "source-map": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "bundled": true, "dev": true, "requires": { "amdefine": ">=0.0.4" @@ -986,8 +921,7 @@ }, "has-ansi": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "bundled": true, "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -995,26 +929,22 @@ }, "has-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "bundled": true, "dev": true }, "hosted-git-info": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "bundled": true, "dev": true }, "imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "bundled": true, "dev": true }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "dev": true, "requires": { "once": "^1.3.0", @@ -1023,14 +953,12 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "bundled": true, "dev": true }, "invariant": { "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "bundled": true, "dev": true, "requires": { "loose-envify": "^1.0.0" @@ -1038,26 +966,22 @@ }, "invert-kv": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "bundled": true, "dev": true }, "is-arrayish": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "bundled": true, "dev": true }, "is-buffer": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "bundled": true, "dev": true }, "is-builtin-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "bundled": true, "dev": true, "requires": { "builtin-modules": "^1.0.0" @@ -1065,14 +989,12 @@ }, "is-dotfile": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "bundled": true, "dev": true }, "is-equal-shallow": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "bundled": true, "dev": true, "requires": { "is-primitive": "^2.0.0" @@ -1080,20 +1002,17 @@ }, "is-extendable": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "bundled": true, "dev": true }, "is-extglob": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "bundled": true, "dev": true }, "is-finite": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "bundled": true, "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -1101,8 +1020,7 @@ }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -1110,8 +1028,7 @@ }, "is-glob": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "bundled": true, "dev": true, "requires": { "is-extglob": "^1.0.0" @@ -1119,8 +1036,7 @@ }, "is-number": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.0.2" @@ -1128,44 +1044,37 @@ }, "is-posix-bracket": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "bundled": true, "dev": true }, "is-primitive": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "bundled": true, "dev": true }, "is-stream": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "bundled": true, "dev": true }, "is-utf8": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "bundled": true, "dev": true }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "bundled": true, "dev": true }, "isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "bundled": true, "dev": true }, "isobject": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "bundled": true, "dev": true, "requires": { "isarray": "1.0.0" @@ -1173,14 +1082,12 @@ }, "istanbul-lib-coverage": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", - "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==", + "bundled": true, "dev": true }, "istanbul-lib-hook": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz", - "integrity": "sha512-U3qEgwVDUerZ0bt8cfl3dSP3S6opBoOtk3ROO5f2EfBr/SRiD9FQqzwaZBqFORu8W7O0EXpai+k7kxHK13beRg==", + "bundled": true, "dev": true, "requires": { "append-transform": "^0.4.0" @@ -1188,8 +1095,7 @@ }, "istanbul-lib-instrument": { "version": "1.9.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz", - "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", + "bundled": true, "dev": true, "requires": { "babel-generator": "^6.18.0", @@ -1203,8 +1109,7 @@ }, "istanbul-lib-report": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz", - "integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==", + "bundled": true, "dev": true, "requires": { "istanbul-lib-coverage": "^1.1.1", @@ -1215,8 +1120,7 @@ "dependencies": { "supports-color": { "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "bundled": true, "dev": true, "requires": { "has-flag": "^1.0.0" @@ -1226,8 +1130,7 @@ }, "istanbul-lib-source-maps": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz", - "integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==", + "bundled": true, "dev": true, "requires": { "debug": "^3.1.0", @@ -1239,8 +1142,7 @@ "dependencies": { "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "bundled": true, "dev": true, "requires": { "ms": "2.0.0" @@ -1250,8 +1152,7 @@ }, "istanbul-reports": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.3.tgz", - "integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==", + "bundled": true, "dev": true, "requires": { "handlebars": "^4.0.3" @@ -1259,20 +1160,17 @@ }, "js-tokens": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "bundled": true, "dev": true }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "bundled": true, "dev": true }, "kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "bundled": true, "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -1280,15 +1178,13 @@ }, "lazy-cache": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "bundled": true, "dev": true, "optional": true }, "lcid": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "bundled": true, "dev": true, "requires": { "invert-kv": "^1.0.0" @@ -1296,8 +1192,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "bundled": true, "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -1309,8 +1204,7 @@ }, "locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "bundled": true, "dev": true, "requires": { "p-locate": "^2.0.0", @@ -1319,28 +1213,24 @@ "dependencies": { "path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "bundled": true, "dev": true } } }, "lodash": { "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "bundled": true, "dev": true }, "longest": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "bundled": true, "dev": true }, "loose-envify": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "bundled": true, "dev": true, "requires": { "js-tokens": "^3.0.0" @@ -1348,8 +1238,7 @@ }, "lru-cache": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "bundled": true, "dev": true, "requires": { "pseudomap": "^1.0.2", @@ -1358,8 +1247,7 @@ }, "md5-hex": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", - "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", + "bundled": true, "dev": true, "requires": { "md5-o-matic": "^0.1.1" @@ -1367,14 +1255,12 @@ }, "md5-o-matic": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", - "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", + "bundled": true, "dev": true }, "mem": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "bundled": true, "dev": true, "requires": { "mimic-fn": "^1.0.0" @@ -1382,8 +1268,7 @@ }, "merge-source-map": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", - "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", + "bundled": true, "dev": true, "requires": { "source-map": "^0.5.6" @@ -1391,8 +1276,7 @@ }, "micromatch": { "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "bundled": true, "dev": true, "requires": { "arr-diff": "^2.0.0", @@ -1412,14 +1296,12 @@ }, "mimic-fn": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "bundled": true, "dev": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -1427,14 +1309,12 @@ }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "bundled": true, "dev": true }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "dev": true, "requires": { "minimist": "0.0.8" @@ -1442,14 +1322,12 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "bundled": true, "dev": true }, "normalize-package-data": { "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "bundled": true, "dev": true, "requires": { "hosted-git-info": "^2.1.4", @@ -1460,8 +1338,7 @@ }, "normalize-path": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "bundled": true, "dev": true, "requires": { "remove-trailing-separator": "^1.0.1" @@ -1469,8 +1346,7 @@ }, "npm-run-path": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "bundled": true, "dev": true, "requires": { "path-key": "^2.0.0" @@ -1478,20 +1354,17 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "bundled": true, "dev": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "dev": true }, "object.omit": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "bundled": true, "dev": true, "requires": { "for-own": "^0.1.4", @@ -1500,8 +1373,7 @@ }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "dev": true, "requires": { "wrappy": "1" @@ -1509,8 +1381,7 @@ }, "optimist": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "bundled": true, "dev": true, "requires": { "minimist": "~0.0.1", @@ -1519,14 +1390,12 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "dev": true }, "os-locale": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "bundled": true, "dev": true, "requires": { "execa": "^0.7.0", @@ -1536,20 +1405,17 @@ }, "p-finally": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "bundled": true, "dev": true }, "p-limit": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", - "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", + "bundled": true, "dev": true }, "p-locate": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "bundled": true, "dev": true, "requires": { "p-limit": "^1.1.0" @@ -1557,8 +1423,7 @@ }, "parse-glob": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "bundled": true, "dev": true, "requires": { "glob-base": "^0.3.0", @@ -1569,8 +1434,7 @@ }, "parse-json": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "bundled": true, "dev": true, "requires": { "error-ex": "^1.2.0" @@ -1578,8 +1442,7 @@ }, "path-exists": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "bundled": true, "dev": true, "requires": { "pinkie-promise": "^2.0.0" @@ -1587,26 +1450,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "bundled": true, "dev": true }, "path-key": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "bundled": true, "dev": true }, "path-parse": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "bundled": true, "dev": true }, "path-type": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "bundled": true, "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -1616,20 +1475,17 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "bundled": true, "dev": true }, "pinkie": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "bundled": true, "dev": true }, "pinkie-promise": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "bundled": true, "dev": true, "requires": { "pinkie": "^2.0.0" @@ -1637,8 +1493,7 @@ }, "pkg-dir": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "bundled": true, "dev": true, "requires": { "find-up": "^1.0.0" @@ -1646,8 +1501,7 @@ "dependencies": { "find-up": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "bundled": true, "dev": true, "requires": { "path-exists": "^2.0.0", @@ -1658,20 +1512,17 @@ }, "preserve": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "bundled": true, "dev": true }, "pseudomap": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "bundled": true, "dev": true }, "randomatic": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "bundled": true, "dev": true, "requires": { "is-number": "^3.0.0", @@ -1680,8 +1531,7 @@ "dependencies": { "is-number": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.0.2" @@ -1689,8 +1539,7 @@ "dependencies": { "kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "bundled": true, "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -1700,8 +1549,7 @@ }, "kind-of": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "bundled": true, "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -1711,8 +1559,7 @@ }, "read-pkg": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "bundled": true, "dev": true, "requires": { "load-json-file": "^1.0.0", @@ -1722,8 +1569,7 @@ }, "read-pkg-up": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "bundled": true, "dev": true, "requires": { "find-up": "^1.0.0", @@ -1732,8 +1578,7 @@ "dependencies": { "find-up": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "bundled": true, "dev": true, "requires": { "path-exists": "^2.0.0", @@ -1744,14 +1589,12 @@ }, "regenerator-runtime": { "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "bundled": true, "dev": true }, "regex-cache": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "bundled": true, "dev": true, "requires": { "is-equal-shallow": "^0.1.3" @@ -1759,26 +1602,22 @@ }, "remove-trailing-separator": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "bundled": true, "dev": true }, "repeat-element": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "bundled": true, "dev": true }, "repeat-string": { "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "bundled": true, "dev": true }, "repeating": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "bundled": true, "dev": true, "requires": { "is-finite": "^1.0.0" @@ -1786,26 +1625,22 @@ }, "require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "bundled": true, "dev": true }, "require-main-filename": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "bundled": true, "dev": true }, "resolve-from": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", + "bundled": true, "dev": true }, "right-align": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1814,8 +1649,7 @@ }, "rimraf": { "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "bundled": true, "dev": true, "requires": { "glob": "^7.0.5" @@ -1823,20 +1657,17 @@ }, "semver": { "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "bundled": true, "dev": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "dev": true }, "shebang-command": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "bundled": true, "dev": true, "requires": { "shebang-regex": "^1.0.0" @@ -1844,32 +1675,27 @@ }, "shebang-regex": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "bundled": true, "dev": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "dev": true }, "slide": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "bundled": true, "dev": true }, "source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "bundled": true, "dev": true }, "spawn-wrap": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", - "integrity": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", + "bundled": true, "dev": true, "requires": { "foreground-child": "^1.5.6", @@ -1882,8 +1708,7 @@ }, "spdx-correct": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "bundled": true, "dev": true, "requires": { "spdx-license-ids": "^1.0.2" @@ -1891,20 +1716,17 @@ }, "spdx-expression-parse": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "bundled": true, "dev": true }, "spdx-license-ids": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "bundled": true, "dev": true }, "string-width": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "bundled": true, "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -1913,20 +1735,17 @@ "dependencies": { "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "bundled": true, "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "bundled": true, "dev": true }, "strip-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "bundled": true, "dev": true, "requires": { "ansi-regex": "^3.0.0" @@ -1936,8 +1755,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -1945,8 +1763,7 @@ }, "strip-bom": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "bundled": true, "dev": true, "requires": { "is-utf8": "^0.2.0" @@ -1954,20 +1771,17 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "bundled": true, "dev": true }, "supports-color": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "bundled": true, "dev": true }, "test-exclude": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.1.1.tgz", - "integrity": "sha512-35+Asrsk3XHJDBgf/VRFexPgh3UyETv8IAn/LRTiZjVy6rjPVqdEk8dJcJYBzl1w0XCJM48lvTy8SfEsCWS4nA==", + "bundled": true, "dev": true, "requires": { "arrify": "^1.0.1", @@ -1979,20 +1793,17 @@ }, "to-fast-properties": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "bundled": true, "dev": true }, "trim-right": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "bundled": true, "dev": true }, "uglify-js": { "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2003,8 +1814,7 @@ "dependencies": { "yargs": { "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2018,15 +1828,13 @@ }, "uglify-to-browserify": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "bundled": true, "dev": true, "optional": true }, "validate-npm-package-license": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "bundled": true, "dev": true, "requires": { "spdx-correct": "~1.0.0", @@ -2035,8 +1843,7 @@ }, "which": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "bundled": true, "dev": true, "requires": { "isexe": "^2.0.0" @@ -2044,27 +1851,23 @@ }, "which-module": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "bundled": true, "dev": true }, "window-size": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "bundled": true, "dev": true, "optional": true }, "wordwrap": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "bundled": true, "dev": true }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "bundled": true, "dev": true, "requires": { "string-width": "^1.0.1", @@ -2073,8 +1876,7 @@ "dependencies": { "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -2086,14 +1888,12 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "bundled": true, "dev": true }, "write-file-atomic": { "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "bundled": true, "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -2103,20 +1903,17 @@ }, "y18n": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "bundled": true, "dev": true }, "yallist": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "bundled": true, "dev": true }, "yargs": { "version": "10.0.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.0.3.tgz", - "integrity": "sha512-DqBpQ8NAUX4GyPP/ijDGHsJya4tYqLQrjPr95HNsr1YwL3+daCfvBwg7+gIC6IdJhR2kATh3hb61vjzMWEtjdw==", + "bundled": true, "dev": true, "requires": { "cliui": "^3.2.0", @@ -2135,8 +1932,7 @@ "dependencies": { "cliui": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "bundled": true, "dev": true, "requires": { "string-width": "^1.0.1", @@ -2146,8 +1942,7 @@ "dependencies": { "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -2161,8 +1956,7 @@ }, "yargs-parser": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.0.0.tgz", - "integrity": "sha1-IdR2Mw5agieaS4gTRb8GYQLiGcY=", + "bundled": true, "dev": true, "requires": { "camelcase": "^4.1.0" @@ -2170,8 +1964,7 @@ "dependencies": { "camelcase": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "bundled": true, "dev": true } } @@ -2291,20 +2084,6 @@ "through2": "^2.0.3" } }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, "google-auto-auth": { "version": "0.9.7", "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", @@ -2317,6 +2096,38 @@ "request": "^2.79.0" } }, + "google-gax": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", + "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", + "dev": true, + "requires": { + "duplexify": "^3.5.4", + "extend": "^3.0.0", + "globby": "^8.0.0", + "google-auto-auth": "^0.10.0", + "google-proto-files": "^0.15.0", + "grpc": "^1.10.0", + "is-stream-ended": "^0.1.0", + "lodash": "^4.17.2", + "protobufjs": "^6.8.0", + "through2": "^2.0.3" + }, + "dependencies": { + "google-auto-auth": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", + "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", + "dev": true, + "requires": { + "async": "^2.3.0", + "gcp-metadata": "^0.6.1", + "google-auth-library": "^1.3.1", + "request": "^2.79.0" + } + } + } + }, "google-proto-files": { "version": "0.15.1", "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", @@ -2326,6 +2137,22 @@ "globby": "^7.1.1", "power-assert": "^1.4.4", "protobufjs": "^6.8.0" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + } } }, "retry-request": { @@ -2971,6 +2798,7 @@ "version": "2.6.1", "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, "requires": { "lodash": "^4.17.10" } @@ -2992,9 +2820,9 @@ "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "auto-bind": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.0.tgz", - "integrity": "sha512-Zw7pZp7tztvKnWWtoII4AmqH5a2PV3ZN5F0BPRTGcc1kpRm4b6QXQnPU7Znbl6BfPfqOVOV29g4JeMqZQaqqOA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.1.tgz", + "integrity": "sha512-/W9yj1yKmBLwpexwAujeD9YHwYmRuWFGV8HWE7smQab797VeHa4/cnE2NFeDhA+E+5e/OGBI8763EhLjfZ/MXA==", "dev": true }, "ava": { @@ -5039,9 +4867,9 @@ "dev": true }, "globals": { - "version": "11.6.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.6.0.tgz", - "integrity": "sha512-IC8IL7f76dYfElTZ47+hXtEOtq/Cxqd48jR1dfSl7N3T2XA98XBnx8nkNUuy/O3TFmws107jq4Ty+3Tm81BoOA==", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, "strip-ansi": { @@ -5695,28 +5523,24 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "bundled": true, "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "bundled": true, "dev": true }, "aproba": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "bundled": true, "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5726,14 +5550,12 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "bundled": true, "dev": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "bundled": true, "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -5742,40 +5564,34 @@ }, "chownr": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "bundled": true, "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "bundled": true, "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "bundled": true, "dev": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "bundled": true, "dev": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "bundled": true, "dev": true, "optional": true }, "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5784,29 +5600,25 @@ }, "deep-extend": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "bundled": true, "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "bundled": true, "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "bundled": true, "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5815,15 +5627,13 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "bundled": true, "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5839,8 +5649,7 @@ }, "glob": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5854,15 +5663,13 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "bundled": true, "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.21", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", - "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5871,8 +5678,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5881,8 +5687,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5892,21 +5697,18 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "bundled": true, "dev": true }, "ini": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "bundled": true, "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -5914,15 +5716,13 @@ }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "bundled": true, "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -5930,14 +5730,12 @@ }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "bundled": true, "dev": true }, "minipass": { "version": "2.2.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", - "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", + "bundled": true, "dev": true, "requires": { "safe-buffer": "^5.1.1", @@ -5946,8 +5744,7 @@ }, "minizlib": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5956,8 +5753,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "dev": true, "requires": { "minimist": "0.0.8" @@ -5965,15 +5761,13 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "bundled": true, "dev": true, "optional": true }, "needle": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.0.tgz", - "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -5984,8 +5778,7 @@ }, "node-pre-gyp": { "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz", - "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6003,8 +5796,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6014,15 +5806,13 @@ }, "npm-bundled": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz", - "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", + "bundled": true, "dev": true, "optional": true }, "npm-packlist": { "version": "1.1.10", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz", - "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6032,8 +5822,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6045,21 +5834,18 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "bundled": true, "dev": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "dev": true, "requires": { "wrappy": "1" @@ -6067,22 +5853,19 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "bundled": true, "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6092,22 +5875,19 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "bundled": true, "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "bundled": true, "dev": true, "optional": true }, "rc": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", - "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6119,8 +5899,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "bundled": true, "dev": true, "optional": true } @@ -6128,8 +5907,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6144,8 +5922,7 @@ }, "rimraf": { "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6154,49 +5931,42 @@ }, "safe-buffer": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "bundled": true, "dev": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "bundled": true, "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "bundled": true, "dev": true, "optional": true }, "semver": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "bundled": true, "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -6206,8 +5976,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6216,8 +5985,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -6225,15 +5993,13 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "bundled": true, "dev": true, "optional": true }, "tar": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz", - "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6248,15 +6014,13 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "bundled": true, "dev": true, "optional": true }, "wide-align": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -6265,14 +6029,12 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "bundled": true, "dev": true }, "yallist": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", + "bundled": true, "dev": true } } @@ -6469,6 +6231,7 @@ "version": "0.10.1", "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", + "dev": true, "requires": { "async": "^2.3.0", "gcp-metadata": "^0.6.1", @@ -6477,47 +6240,21 @@ } }, "google-gax": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", - "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.17.1.tgz", + "integrity": "sha512-fAKvFx++SRr6bGWamWuVOkJzJnQqMgpJkhaB2oEwfFJ91rbFgEmIPRmZZ/MeIVVFUOuHUVyZ8nwjm5peyTZJ6g==", "requires": { - "duplexify": "^3.5.4", - "extend": "^3.0.0", - "globby": "^8.0.0", - "google-auto-auth": "^0.10.0", - "google-proto-files": "^0.15.0", - "grpc": "^1.10.0", - "is-stream-ended": "^0.1.0", - "lodash": "^4.17.2", - "protobufjs": "^6.8.0", + "duplexify": "^3.6.0", + "extend": "^3.0.1", + "globby": "^8.0.1", + "google-auth-library": "^1.6.1", + "google-proto-files": "^0.16.0", + "grpc": "^1.12.2", + "is-stream-ended": "^0.1.4", + "lodash": "^4.17.10", + "protobufjs": "^6.8.6", + "retry-request": "^4.0.0", "through2": "^2.0.3" - }, - "dependencies": { - "google-proto-files": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", - "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", - "requires": { - "globby": "^7.1.1", - "power-assert": "^1.4.4", - "protobufjs": "^6.8.0" - }, - "dependencies": { - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - } - } - } } }, "google-p12-pem": { @@ -6594,9 +6331,9 @@ "dev": true }, "grpc": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.3.tgz", - "integrity": "sha512-QPwbAXRXd8IyXAhTdUVgjEqSdvXoTq5uFWSo+eGMTcra12PBJUkAceD+1AUVOx1GqBY74/7T7eB7BB+UOcOY8w==", + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", + "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", "requires": { "lodash": "^4.17.5", "nan": "^2.0.0", @@ -6606,23 +6343,19 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + "bundled": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "bundled": true }, "aproba": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + "bundled": true }, "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "version": "1.1.5", + "bundled": true, "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" @@ -6630,13 +6363,11 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "bundled": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "bundled": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6644,69 +6375,57 @@ }, "chownr": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" + "bundled": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "bundled": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + "bundled": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "bundled": true }, "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "bundled": true, "requires": { "ms": "2.0.0" } }, "deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==" + "version": "0.6.0", + "bundled": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + "bundled": true }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + "bundled": true }, "fs-minipass": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "bundled": true, "requires": { "minipass": "^2.2.1" } }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "bundled": true }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -6720,8 +6439,7 @@ }, "glob": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "bundled": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6733,29 +6451,25 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + "bundled": true }, "iconv-lite": { "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "bundled": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "bundled": true, "requires": { "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -6763,81 +6477,69 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "bundled": true }, "ini": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "bundled": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "requires": { "number-is-nan": "^1.0.0" } }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "bundled": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "bundled": true }, "minipass": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.0.tgz", - "integrity": "sha512-jWC2Eg+Np4bxah7llu1IrUNSJQxtLz/J+pOjTM0nFpJXGAaV18XBWhUn031Q1tAA/TJtA1jgwnOe9S2PQa4Lbg==", + "version": "2.3.3", + "bundled": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", + "bundled": true, "requires": { "minipass": "^2.2.1" } }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "requires": { "minimist": "0.0.8" }, "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "bundled": true } } }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "bundled": true }, "needle": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.1.tgz", - "integrity": "sha512-t/ZswCM9JTWjAdXS9VpvqhI2Ct2sL2MdY4fUXqGJaGBk13ge99ObqRksRTbBE56K+wxUXwwfZYOuZHifFW9q+Q==", + "bundled": true, "requires": { "debug": "^2.1.2", "iconv-lite": "^0.4.4", @@ -6846,8 +6548,7 @@ }, "node-pre-gyp": { "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz", - "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", + "bundled": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -6863,8 +6564,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "requires": { "abbrev": "1", "osenv": "^0.1.4" @@ -6872,13 +6572,11 @@ }, "npm-bundled": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz", - "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==" + "bundled": true }, "npm-packlist": { "version": "1.1.10", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz", - "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", + "bundled": true, "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" @@ -6886,8 +6584,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "bundled": true, "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -6897,36 +6594,30 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "bundled": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "bundled": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "requires": { "wrappy": "1" } }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + "bundled": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + "bundled": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "bundled": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -6934,13 +6625,11 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "bundled": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + "bundled": true }, "protobufjs": { "version": "5.0.3", @@ -6954,11 +6643,10 @@ } }, "rc": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", - "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", + "version": "1.2.8", + "bundled": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -6966,8 +6654,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "bundled": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -6980,46 +6667,38 @@ }, "rimraf": { "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "bundled": true, "requires": { "glob": "^7.0.5" } }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "bundled": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "bundled": true }, "sax": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "bundled": true }, "semver": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + "bundled": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "bundled": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + "bundled": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7028,33 +6707,29 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "bundled": true, "requires": { "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + "bundled": true }, "tar": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.2.tgz", - "integrity": "sha512-BfkE9CciGGgDsATqkikUHrQrraBCO+ke/1f6SFAEMnxyyfN9lxC+nW1NFWMpqH865DhHIy9vQi682gk1X7friw==", + "version": "4.4.4", + "bundled": true, "requires": { "chownr": "^1.0.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", + "minipass": "^2.3.3", "minizlib": "^1.1.0", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", @@ -7063,26 +6738,22 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "bundled": true }, "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "version": "1.1.3", + "bundled": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "bundled": true }, "yallist": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + "bundled": true } } }, @@ -7305,9 +6976,9 @@ } }, "ignore": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", - "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==" + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" }, "ignore-by-default": { "version": "1.0.1", @@ -8811,8 +8482,7 @@ "dependencies": { "align-text": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.0.2", @@ -8822,20 +8492,17 @@ }, "amdefine": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "bundled": true, "dev": true }, "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "bundled": true, "dev": true }, "append-transform": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", - "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "bundled": true, "dev": true, "requires": { "default-require-extensions": "^1.0.0" @@ -8843,68 +8510,57 @@ }, "archy": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "bundled": true, "dev": true }, "arr-diff": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "bundled": true, "dev": true }, "arr-flatten": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "bundled": true, "dev": true }, "arr-union": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "bundled": true, "dev": true }, "array-unique": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "bundled": true, "dev": true }, "arrify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "bundled": true, "dev": true }, "assign-symbols": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "bundled": true, "dev": true }, "async": { "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "bundled": true, "dev": true }, "atob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "bundled": true, "dev": true }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "bundled": true, "dev": true }, "base": { "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "bundled": true, "dev": true, "requires": { "cache-base": "^1.0.1", @@ -8918,8 +8574,7 @@ "dependencies": { "define-property": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^1.0.0" @@ -8927,8 +8582,7 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.0" @@ -8936,8 +8590,7 @@ }, "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.0" @@ -8945,8 +8598,7 @@ }, "is-descriptor": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "bundled": true, "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -8956,16 +8608,14 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "bundled": true, "dev": true } } }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "bundled": true, "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -8974,8 +8624,7 @@ }, "braces": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "bundled": true, "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -8992,8 +8641,7 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "bundled": true, "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -9003,14 +8651,12 @@ }, "builtin-modules": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "bundled": true, "dev": true }, "cache-base": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "bundled": true, "dev": true, "requires": { "collection-visit": "^1.0.0", @@ -9026,8 +8672,7 @@ }, "caching-transform": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", - "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", + "bundled": true, "dev": true, "requires": { "md5-hex": "^1.2.0", @@ -9037,15 +8682,13 @@ }, "camelcase": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "bundled": true, "dev": true, "optional": true }, "center-align": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -9055,8 +8698,7 @@ }, "class-utils": { "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "bundled": true, "dev": true, "requires": { "arr-union": "^3.1.0", @@ -9067,8 +8709,7 @@ "dependencies": { "define-property": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -9078,8 +8719,7 @@ }, "cliui": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -9090,8 +8730,7 @@ "dependencies": { "wordwrap": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "bundled": true, "dev": true, "optional": true } @@ -9099,14 +8738,12 @@ }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "bundled": true, "dev": true }, "collection-visit": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "bundled": true, "dev": true, "requires": { "map-visit": "^1.0.0", @@ -9115,38 +8752,32 @@ }, "commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "bundled": true, "dev": true }, "component-emitter": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "bundled": true, "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "bundled": true, "dev": true }, "convert-source-map": { "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "bundled": true, "dev": true }, "copy-descriptor": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "bundled": true, "dev": true }, "cross-spawn": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "bundled": true, "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -9155,8 +8786,7 @@ }, "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "bundled": true, "dev": true, "requires": { "ms": "2.0.0" @@ -9164,26 +8794,22 @@ }, "debug-log": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", - "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", + "bundled": true, "dev": true }, "decamelize": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "bundled": true, "dev": true }, "decode-uri-component": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "bundled": true, "dev": true }, "default-require-extensions": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", - "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "bundled": true, "dev": true, "requires": { "strip-bom": "^2.0.0" @@ -9191,8 +8817,7 @@ }, "define-property": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^1.0.2", @@ -9201,8 +8826,7 @@ "dependencies": { "is-accessor-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9210,8 +8834,7 @@ }, "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9219,8 +8842,7 @@ }, "is-descriptor": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "bundled": true, "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -9230,16 +8852,14 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "bundled": true, "dev": true } } }, "error-ex": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "bundled": true, "dev": true, "requires": { "is-arrayish": "^0.2.1" @@ -9247,8 +8867,7 @@ }, "execa": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "bundled": true, "dev": true, "requires": { "cross-spawn": "^5.0.1", @@ -9262,8 +8881,7 @@ "dependencies": { "cross-spawn": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "bundled": true, "dev": true, "requires": { "lru-cache": "^4.0.1", @@ -9275,8 +8893,7 @@ }, "expand-brackets": { "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "bundled": true, "dev": true, "requires": { "debug": "^2.3.3", @@ -9290,8 +8907,7 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "bundled": true, "dev": true, "requires": { "ms": "2.0.0" @@ -9299,8 +8915,7 @@ }, "define-property": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -9308,8 +8923,7 @@ }, "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "bundled": true, "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -9319,8 +8933,7 @@ }, "extend-shallow": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "bundled": true, "dev": true, "requires": { "assign-symbols": "^1.0.0", @@ -9329,8 +8942,7 @@ "dependencies": { "is-extendable": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "bundled": true, "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -9340,8 +8952,7 @@ }, "extglob": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "bundled": true, "dev": true, "requires": { "array-unique": "^0.3.2", @@ -9356,8 +8967,7 @@ "dependencies": { "define-property": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^1.0.0" @@ -9365,8 +8975,7 @@ }, "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "bundled": true, "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -9374,8 +8983,7 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9383,8 +8991,7 @@ }, "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9392,8 +8999,7 @@ }, "is-descriptor": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "bundled": true, "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -9403,16 +9009,14 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "bundled": true, "dev": true } } }, "fill-range": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "bundled": true, "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -9423,8 +9027,7 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "bundled": true, "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -9434,8 +9037,7 @@ }, "find-cache-dir": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz", - "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", + "bundled": true, "dev": true, "requires": { "commondir": "^1.0.1", @@ -9445,8 +9047,7 @@ }, "find-up": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "bundled": true, "dev": true, "requires": { "locate-path": "^2.0.0" @@ -9454,14 +9055,12 @@ }, "for-in": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "bundled": true, "dev": true }, "foreground-child": { "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "bundled": true, "dev": true, "requires": { "cross-spawn": "^4", @@ -9470,8 +9069,7 @@ }, "fragment-cache": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "bundled": true, "dev": true, "requires": { "map-cache": "^0.2.2" @@ -9479,32 +9077,27 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "bundled": true, "dev": true }, "get-caller-file": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "bundled": true, "dev": true }, "get-stream": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "bundled": true, "dev": true }, "get-value": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "bundled": true, "dev": true }, "glob": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "bundled": true, "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -9517,14 +9110,12 @@ }, "graceful-fs": { "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "bundled": true, "dev": true }, "handlebars": { "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "bundled": true, "dev": true, "requires": { "async": "^1.4.0", @@ -9535,8 +9126,7 @@ "dependencies": { "source-map": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "bundled": true, "dev": true, "requires": { "amdefine": ">=0.0.4" @@ -9546,8 +9136,7 @@ }, "has-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "bundled": true, "dev": true, "requires": { "get-value": "^2.0.6", @@ -9557,8 +9146,7 @@ }, "has-values": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "bundled": true, "dev": true, "requires": { "is-number": "^3.0.0", @@ -9567,8 +9155,7 @@ "dependencies": { "kind-of": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "bundled": true, "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -9578,20 +9165,17 @@ }, "hosted-git-info": { "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha1-IyNbKasjDFdqqw1PE/wEawsDgiI=", + "bundled": true, "dev": true }, "imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "bundled": true, "dev": true }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "dev": true, "requires": { "once": "^1.3.0", @@ -9600,20 +9184,17 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "bundled": true, "dev": true }, "invert-kv": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "bundled": true, "dev": true }, "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.0.2" @@ -9621,20 +9202,17 @@ }, "is-arrayish": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "bundled": true, "dev": true }, "is-buffer": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", + "bundled": true, "dev": true }, "is-builtin-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "bundled": true, "dev": true, "requires": { "builtin-modules": "^1.0.0" @@ -9642,8 +9220,7 @@ }, "is-data-descriptor": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.0.2" @@ -9651,8 +9228,7 @@ }, "is-descriptor": { "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "bundled": true, "dev": true, "requires": { "is-accessor-descriptor": "^0.1.6", @@ -9662,28 +9238,24 @@ "dependencies": { "kind-of": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "bundled": true, "dev": true } } }, "is-extendable": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "bundled": true, "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "bundled": true, "dev": true }, "is-number": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.0.2" @@ -9691,8 +9263,7 @@ }, "is-odd": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", + "bundled": true, "dev": true, "requires": { "is-number": "^4.0.0" @@ -9700,16 +9271,14 @@ "dependencies": { "is-number": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + "bundled": true, "dev": true } } }, "is-plain-object": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "bundled": true, "dev": true, "requires": { "isobject": "^3.0.1" @@ -9717,50 +9286,42 @@ }, "is-stream": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "bundled": true, "dev": true }, "is-utf8": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "bundled": true, "dev": true }, "is-windows": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", + "bundled": true, "dev": true }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "bundled": true, "dev": true }, "isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "bundled": true, "dev": true }, "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "bundled": true, "dev": true }, "istanbul-lib-coverage": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", - "integrity": "sha1-99jy5CuX43/nlhFMsPnWi146Q0E=", + "bundled": true, "dev": true }, "istanbul-lib-hook": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz", - "integrity": "sha1-hTjZcDcss3FtU+VVI91UtVeo2Js=", + "bundled": true, "dev": true, "requires": { "append-transform": "^0.4.0" @@ -9768,8 +9329,7 @@ }, "istanbul-lib-report": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz", - "integrity": "sha1-LfEhiMD6d5kMDSF20tC6M5QYglk=", + "bundled": true, "dev": true, "requires": { "istanbul-lib-coverage": "^1.1.2", @@ -9780,14 +9340,12 @@ "dependencies": { "has-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "bundled": true, "dev": true }, "supports-color": { "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "bundled": true, "dev": true, "requires": { "has-flag": "^1.0.0" @@ -9797,8 +9355,7 @@ }, "istanbul-lib-source-maps": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", - "integrity": "sha1-/+a+Tnq4bTYD5CkNVJkLFFBvybE=", + "bundled": true, "dev": true, "requires": { "debug": "^3.1.0", @@ -9810,8 +9367,7 @@ }, "istanbul-reports": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.4.1.tgz", - "integrity": "sha1-Ty6OkoqnoF0dpsQn1AmLJlXsczQ=", + "bundled": true, "dev": true, "requires": { "handlebars": "^4.0.3" @@ -9819,8 +9375,7 @@ }, "kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "bundled": true, "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -9828,15 +9383,13 @@ }, "lazy-cache": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "bundled": true, "dev": true, "optional": true }, "lcid": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "bundled": true, "dev": true, "requires": { "invert-kv": "^1.0.0" @@ -9844,8 +9397,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "bundled": true, "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -9857,8 +9409,7 @@ }, "locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "bundled": true, "dev": true, "requires": { "p-locate": "^2.0.0", @@ -9867,22 +9418,19 @@ "dependencies": { "path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "bundled": true, "dev": true } } }, "longest": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "bundled": true, "dev": true }, "lru-cache": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", + "bundled": true, "dev": true, "requires": { "pseudomap": "^1.0.2", @@ -9891,14 +9439,12 @@ }, "map-cache": { "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "bundled": true, "dev": true }, "map-visit": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "bundled": true, "dev": true, "requires": { "object-visit": "^1.0.0" @@ -9906,8 +9452,7 @@ }, "md5-hex": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", - "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", + "bundled": true, "dev": true, "requires": { "md5-o-matic": "^0.1.1" @@ -9915,14 +9460,12 @@ }, "md5-o-matic": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", - "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", + "bundled": true, "dev": true }, "mem": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "bundled": true, "dev": true, "requires": { "mimic-fn": "^1.0.0" @@ -9930,8 +9473,7 @@ }, "merge-source-map": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha1-L93n5gIJOfcJBqaPLXrmheTIxkY=", + "bundled": true, "dev": true, "requires": { "source-map": "^0.6.1" @@ -9939,16 +9481,14 @@ "dependencies": { "source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "bundled": true, "dev": true } } }, "micromatch": { "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "bundled": true, "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -9968,22 +9508,19 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "bundled": true, "dev": true } } }, "mimic-fn": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", + "bundled": true, "dev": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "bundled": true, "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -9991,14 +9528,12 @@ }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "bundled": true, "dev": true }, "mixin-deep": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "bundled": true, "dev": true, "requires": { "for-in": "^1.0.2", @@ -10007,8 +9542,7 @@ "dependencies": { "is-extendable": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "bundled": true, "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -10018,8 +9552,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "dev": true, "requires": { "minimist": "0.0.8" @@ -10027,14 +9560,12 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "bundled": true, "dev": true }, "nanomatch": { "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", + "bundled": true, "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -10053,16 +9584,14 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "bundled": true, "dev": true } } }, "normalize-package-data": { "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", + "bundled": true, "dev": true, "requires": { "hosted-git-info": "^2.1.4", @@ -10073,8 +9602,7 @@ }, "npm-run-path": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "bundled": true, "dev": true, "requires": { "path-key": "^2.0.0" @@ -10082,20 +9610,17 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "bundled": true, "dev": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "dev": true }, "object-copy": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "bundled": true, "dev": true, "requires": { "copy-descriptor": "^0.1.0", @@ -10105,8 +9630,7 @@ "dependencies": { "define-property": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -10116,8 +9640,7 @@ }, "object-visit": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "bundled": true, "dev": true, "requires": { "isobject": "^3.0.0" @@ -10125,8 +9648,7 @@ }, "object.pick": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "bundled": true, "dev": true, "requires": { "isobject": "^3.0.1" @@ -10134,8 +9656,7 @@ }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "dev": true, "requires": { "wrappy": "1" @@ -10143,8 +9664,7 @@ }, "optimist": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "bundled": true, "dev": true, "requires": { "minimist": "~0.0.1", @@ -10153,14 +9673,12 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "dev": true }, "os-locale": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=", + "bundled": true, "dev": true, "requires": { "execa": "^0.7.0", @@ -10170,14 +9688,12 @@ }, "p-finally": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "bundled": true, "dev": true }, "p-limit": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha1-DpK2vty1nwIsE9DxlJ3ILRWQnxw=", + "bundled": true, "dev": true, "requires": { "p-try": "^1.0.0" @@ -10185,8 +9701,7 @@ }, "p-locate": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "bundled": true, "dev": true, "requires": { "p-limit": "^1.1.0" @@ -10194,14 +9709,12 @@ }, "p-try": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "bundled": true, "dev": true }, "parse-json": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "bundled": true, "dev": true, "requires": { "error-ex": "^1.2.0" @@ -10209,14 +9722,12 @@ }, "pascalcase": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "bundled": true, "dev": true }, "path-exists": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "bundled": true, "dev": true, "requires": { "pinkie-promise": "^2.0.0" @@ -10224,26 +9735,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "bundled": true, "dev": true }, "path-key": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "bundled": true, "dev": true }, "path-parse": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "bundled": true, "dev": true }, "path-type": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "bundled": true, "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -10253,20 +9760,17 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "bundled": true, "dev": true }, "pinkie": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "bundled": true, "dev": true }, "pinkie-promise": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "bundled": true, "dev": true, "requires": { "pinkie": "^2.0.0" @@ -10274,8 +9778,7 @@ }, "pkg-dir": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "bundled": true, "dev": true, "requires": { "find-up": "^1.0.0" @@ -10283,8 +9786,7 @@ "dependencies": { "find-up": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "bundled": true, "dev": true, "requires": { "path-exists": "^2.0.0", @@ -10295,20 +9797,17 @@ }, "posix-character-classes": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "bundled": true, "dev": true }, "pseudomap": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "bundled": true, "dev": true }, "read-pkg": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "bundled": true, "dev": true, "requires": { "load-json-file": "^1.0.0", @@ -10318,8 +9817,7 @@ }, "read-pkg-up": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "bundled": true, "dev": true, "requires": { "find-up": "^1.0.0", @@ -10328,8 +9826,7 @@ "dependencies": { "find-up": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "bundled": true, "dev": true, "requires": { "path-exists": "^2.0.0", @@ -10340,8 +9837,7 @@ }, "regex-not": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "bundled": true, "dev": true, "requires": { "extend-shallow": "^3.0.2", @@ -10350,50 +9846,42 @@ }, "repeat-element": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "bundled": true, "dev": true }, "repeat-string": { "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "bundled": true, "dev": true }, "require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "bundled": true, "dev": true }, "require-main-filename": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "bundled": true, "dev": true }, "resolve-from": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", + "bundled": true, "dev": true }, "resolve-url": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "bundled": true, "dev": true }, "ret": { "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", + "bundled": true, "dev": true }, "right-align": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -10402,8 +9890,7 @@ }, "rimraf": { "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "bundled": true, "dev": true, "requires": { "glob": "^7.0.5" @@ -10411,8 +9898,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "bundled": true, "dev": true, "requires": { "ret": "~0.1.10" @@ -10420,20 +9906,17 @@ }, "semver": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=", + "bundled": true, "dev": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "dev": true }, "set-value": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "bundled": true, "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -10444,8 +9927,7 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "bundled": true, "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -10455,8 +9937,7 @@ }, "shebang-command": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "bundled": true, "dev": true, "requires": { "shebang-regex": "^1.0.0" @@ -10464,26 +9945,22 @@ }, "shebang-regex": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "bundled": true, "dev": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "dev": true }, "slide": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "bundled": true, "dev": true }, "snapdragon": { "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "bundled": true, "dev": true, "requires": { "base": "^0.11.1", @@ -10498,8 +9975,7 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "bundled": true, "dev": true, "requires": { "ms": "2.0.0" @@ -10507,8 +9983,7 @@ }, "define-property": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -10516,8 +9991,7 @@ }, "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "bundled": true, "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -10527,8 +10001,7 @@ }, "snapdragon-node": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "bundled": true, "dev": true, "requires": { "define-property": "^1.0.0", @@ -10538,8 +10011,7 @@ "dependencies": { "define-property": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^1.0.0" @@ -10547,8 +10019,7 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.0" @@ -10556,8 +10027,7 @@ }, "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.0" @@ -10565,8 +10035,7 @@ }, "is-descriptor": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "bundled": true, "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -10576,16 +10045,14 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "bundled": true, "dev": true } } }, "snapdragon-util": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.2.0" @@ -10593,14 +10060,12 @@ }, "source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "bundled": true, "dev": true }, "source-map-resolve": { "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "bundled": true, "dev": true, "requires": { "atob": "^2.1.1", @@ -10612,14 +10077,12 @@ }, "source-map-url": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "bundled": true, "dev": true }, "spawn-wrap": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", - "integrity": "sha1-z/WOc6giRhe2Vhq9wyWG6gyCJIw=", + "bundled": true, "dev": true, "requires": { "foreground-child": "^1.5.6", @@ -10632,8 +10095,7 @@ }, "spdx-correct": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha1-BaW01xU6GVvJLDxCW2nzsqlSTII=", + "bundled": true, "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -10642,14 +10104,12 @@ }, "spdx-exceptions": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha1-LHrmEFbHFKW5ubKyr30xHvXHj+k=", + "bundled": true, "dev": true }, "spdx-expression-parse": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha1-meEZt6XaAOBUkcn6M4t5BII7QdA=", + "bundled": true, "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -10658,14 +10118,12 @@ }, "spdx-license-ids": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha1-enzShHDMbToc/m1miG9rxDDTrIc=", + "bundled": true, "dev": true }, "split-string": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "bundled": true, "dev": true, "requires": { "extend-shallow": "^3.0.0" @@ -10673,8 +10131,7 @@ }, "static-extend": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "bundled": true, "dev": true, "requires": { "define-property": "^0.2.5", @@ -10683,8 +10140,7 @@ "dependencies": { "define-property": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "bundled": true, "dev": true, "requires": { "is-descriptor": "^0.1.0" @@ -10694,8 +10150,7 @@ }, "string-width": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "bundled": true, "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -10704,8 +10159,7 @@ }, "strip-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "bundled": true, "dev": true, "requires": { "ansi-regex": "^3.0.0" @@ -10713,8 +10167,7 @@ }, "strip-bom": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "bundled": true, "dev": true, "requires": { "is-utf8": "^0.2.0" @@ -10722,14 +10175,12 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "bundled": true, "dev": true }, "test-exclude": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", - "integrity": "sha1-36Ii8DSAvKaSB8pyizfXS0X3JPo=", + "bundled": true, "dev": true, "requires": { "arrify": "^1.0.1", @@ -10741,8 +10192,7 @@ }, "to-object-path": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "bundled": true, "dev": true, "requires": { "kind-of": "^3.0.2" @@ -10750,8 +10200,7 @@ }, "to-regex": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "bundled": true, "dev": true, "requires": { "define-property": "^2.0.2", @@ -10762,8 +10211,7 @@ }, "to-regex-range": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "bundled": true, "dev": true, "requires": { "is-number": "^3.0.0", @@ -10772,8 +10220,7 @@ }, "uglify-js": { "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -10784,8 +10231,7 @@ "dependencies": { "yargs": { "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -10799,15 +10245,13 @@ }, "uglify-to-browserify": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "bundled": true, "dev": true, "optional": true }, "union-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "bundled": true, "dev": true, "requires": { "arr-union": "^3.1.0", @@ -10818,8 +10262,7 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "bundled": true, "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -10827,8 +10270,7 @@ }, "set-value": { "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "bundled": true, "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -10841,8 +10283,7 @@ }, "unset-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "bundled": true, "dev": true, "requires": { "has-value": "^0.3.1", @@ -10851,8 +10292,7 @@ "dependencies": { "has-value": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "bundled": true, "dev": true, "requires": { "get-value": "^2.0.3", @@ -10862,8 +10302,7 @@ "dependencies": { "isobject": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "bundled": true, "dev": true, "requires": { "isarray": "1.0.0" @@ -10873,22 +10312,19 @@ }, "has-values": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "bundled": true, "dev": true } } }, "urix": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "bundled": true, "dev": true }, "use": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", + "bundled": true, "dev": true, "requires": { "kind-of": "^6.0.2" @@ -10896,16 +10332,14 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "bundled": true, "dev": true } } }, "validate-npm-package-license": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha1-gWQ7y+8b3+zUYjeT3EZIlIupgzg=", + "bundled": true, "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -10914,8 +10348,7 @@ }, "which": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "bundled": true, "dev": true, "requires": { "isexe": "^2.0.0" @@ -10923,27 +10356,23 @@ }, "which-module": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "bundled": true, "dev": true }, "window-size": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "bundled": true, "dev": true, "optional": true }, "wordwrap": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "bundled": true, "dev": true }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "bundled": true, "dev": true, "requires": { "string-width": "^1.0.1", @@ -10952,14 +10381,12 @@ "dependencies": { "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "bundled": true, "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -10967,8 +10394,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -10978,8 +10404,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -10989,14 +10414,12 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "bundled": true, "dev": true }, "write-file-atomic": { "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "bundled": true, "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -11006,20 +10429,17 @@ }, "y18n": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "bundled": true, "dev": true }, "yallist": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "bundled": true, "dev": true }, "yargs": { "version": "11.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", - "integrity": "sha1-kLhpk07W6HERXqL/WLA/RyTtLXc=", + "bundled": true, "dev": true, "requires": { "cliui": "^4.0.0", @@ -11038,14 +10458,12 @@ "dependencies": { "camelcase": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "bundled": true, "dev": true }, "cliui": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", + "bundled": true, "dev": true, "requires": { "string-width": "^2.1.1", @@ -11055,8 +10473,7 @@ }, "yargs-parser": { "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "bundled": true, "dev": true, "requires": { "camelcase": "^4.1.0" @@ -11066,8 +10483,7 @@ }, "yargs-parser": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", - "integrity": "sha1-8TdqM7Ziml0GN4KUTacyYx6WaVA=", + "bundled": true, "dev": true, "requires": { "camelcase": "^4.1.0" @@ -11075,8 +10491,7 @@ "dependencies": { "camelcase": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "bundled": true, "dev": true } } @@ -11561,9 +10976,9 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "6.0.22", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", - "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { "chalk": "^2.4.1", @@ -13307,9 +12722,9 @@ } }, "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, "unset-value": { diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c8d820aae83..d7fd7b79d2d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,7 +69,7 @@ "extend": "^3.0.1", "gcp-metadata": "^0.6.3", "google-auth-library": "^1.6.0", - "google-gax": "^0.16.1", + "google-gax": "^0.17.1", "google-proto-files": "^0.16.1", "is": "^3.2.1", "lodash.merge": "^4.6.1", diff --git a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js index 02958fe62bc..d30703b14d3 100644 --- a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js +++ b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js @@ -15,10 +15,10 @@ 'use strict'; describe('LoggingServiceV2SmokeTest', () => { - if (!process.env.SMOKE_TEST_PROJECT) { - throw new Error("Usage: SMOKE_TEST_PROJECT= node #{$0}"); + if (!process.env.GCLOUD_PROJECT) { + throw new Error("Usage: GCLOUD_PROJECT= node #{$0}"); } - var projectId = process.env.SMOKE_TEST_PROJECT; + var projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service', done => { const logging = require('../src'); diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 0df46463ac2..61028d29cad 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -72,7 +72,7 @@ class ConfigServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = gax.grpc(opts); + var gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 494399fb716..af26d89ba10 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -72,7 +72,7 @@ class LoggingServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = gax.grpc(opts); + var gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; @@ -125,7 +125,7 @@ class LoggingServiceV2Client { 'logNames' ), }; - var protoFilesRoot = new gax.grpc.GoogleProtoFilesRoot(); + var protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( path.join( __dirname, diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index a58bbaf3d3c..73f4ea285dc 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -71,7 +71,7 @@ class MetricsServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = gax.grpc(opts); + var gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; From e7c62b16ffbdcfc6ab6b3beedc10e029cabd4251 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Sat, 23 Jun 2018 11:25:12 -0700 Subject: [PATCH 0173/1029] Re-generate library using /synth.py (#135) --- handwritten/logging/package-lock.json | 5197 +++++++++++-------------- 1 file changed, 2333 insertions(+), 2864 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index e66572ef010..bc0eebdfb3a 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -16,18 +16,18 @@ "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "^6.8.0", - "babel-plugin-syntax-trailing-function-commas": "^6.20.0", - "babel-plugin-transform-async-to-generator": "^6.16.0", - "babel-plugin-transform-es2015-destructuring": "^6.19.0", - "babel-plugin-transform-es2015-function-name": "^6.9.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", - "babel-plugin-transform-es2015-parameters": "^6.21.0", - "babel-plugin-transform-es2015-spread": "^6.8.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", - "babel-plugin-transform-exponentiation-operator": "^6.8.0", - "package-hash": "^1.2.0" + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "package-hash": "1.2.0" }, "dependencies": { "md5-hex": { @@ -36,7 +36,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "package-hash": { @@ -45,7 +45,7 @@ "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", "dev": true, "requires": { - "md5-hex": "^1.3.0" + "md5-hex": "1.3.0" } } } @@ -56,8 +56,8 @@ "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", "dev": true, "requires": { - "@ava/babel-plugin-throws-helper": "^2.0.0", - "babel-plugin-espower": "^2.3.2" + "@ava/babel-plugin-throws-helper": "2.0.0", + "babel-plugin-espower": "2.4.0" } }, "@ava/write-file-atomic": { @@ -66,9 +66,9 @@ "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } }, "@babel/code-frame": { @@ -87,10 +87,10 @@ "dev": true, "requires": { "@babel/types": "7.0.0-beta.49", - "jsesc": "^2.5.1", - "lodash": "^4.17.5", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" + "jsesc": "2.5.1", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" }, "dependencies": { "jsesc": { @@ -136,9 +136,9 @@ "integrity": "sha1-lr3GtD4TSCASumaRsQGEktOWIsw=", "dev": true, "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" } }, "@babel/parser": { @@ -156,7 +156,7 @@ "@babel/code-frame": "7.0.0-beta.49", "@babel/parser": "7.0.0-beta.49", "@babel/types": "7.0.0-beta.49", - "lodash": "^4.17.5" + "lodash": "4.17.10" } }, "@babel/traverse": { @@ -171,10 +171,10 @@ "@babel/helper-split-export-declaration": "7.0.0-beta.49", "@babel/parser": "7.0.0-beta.49", "@babel/types": "7.0.0-beta.49", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.17.5" + "debug": "3.1.0", + "globals": "11.7.0", + "invariant": "2.2.4", + "lodash": "4.17.10" }, "dependencies": { "globals": { @@ -191,9 +191,9 @@ "integrity": "sha1-t+Oxw/TUz+Eb34yJ8e/V4WF7h6Y=", "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.5", - "to-fast-properties": "^2.0.0" + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "2.0.0" }, "dependencies": { "to-fast-properties": { @@ -210,7 +210,7 @@ "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", "dev": true, "requires": { - "arrify": "^1.0.1" + "arrify": "1.0.1" } }, "@google-cloud/bigquery": { @@ -219,14 +219,14 @@ "integrity": "sha512-r4k4PvsoPB7DBBCsm4hz8WZj3KvZXikTcwSjAg+cn0JndAPIEad4XCd39RpniyPDSmp+n+d+kOAgebwMWj8q+w==", "dev": true, "requires": { - "@google-cloud/common": "^0.17.0", - "arrify": "^1.0.0", - "duplexify": "^3.5.0", - "extend": "^3.0.1", - "is": "^3.0.1", - "stream-events": "^1.0.1", - "string-format-obj": "^1.0.0", - "uuid": "^3.1.0" + "@google-cloud/common": "0.17.0", + "arrify": "1.0.1", + "duplexify": "3.6.0", + "extend": "3.0.1", + "is": "3.2.1", + "stream-events": "1.0.4", + "string-format-obj": "1.1.1", + "uuid": "3.2.1" }, "dependencies": { "@google-cloud/common": { @@ -235,24 +235,24 @@ "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "dev": true, "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.10.0", - "is": "^3.2.0", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.6.0", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.10.1", + "is": "3.2.1", "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.87.0", + "retry-request": "3.3.2", + "split-array-stream": "1.0.3", + "stream-events": "1.0.4", + "string-format-obj": "1.1.1", + "through2": "2.0.3" } }, "retry-request": { @@ -261,8 +261,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" + "request": "2.87.0", + "through2": "2.0.3" } }, "split-array-stream": { @@ -271,8 +271,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" + "async": "2.6.1", + "is-stream-ended": "0.1.4" } } } @@ -282,21 +282,21 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.1.tgz", "integrity": "sha512-LJB7CoNXEXY0mDWtF8E2cl3Y0kuMQ3wjH9Xr+Y7vH5gHgN82dDh1BMUOizRf9oXQFDWUgGERD5SdfBcjUhHmwA==", "requires": { - "@types/duplexify": "^3.5.0", - "@types/request": "^2.47.0", - "arrify": "^1.0.1", - "axios": "^0.18.0", - "duplexify": "^3.6.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auth-library": "^1.6.0", - "is": "^3.2.1", - "pify": "^3.0.0", - "request": "^2.87.0", - "retry-request": "^3.3.1", - "split-array-stream": "^2.0.0", - "stream-events": "^1.0.4", - "through2": "^2.0.3" + "@types/duplexify": "3.5.0", + "@types/request": "2.47.1", + "arrify": "1.0.1", + "axios": "0.18.0", + "duplexify": "3.6.0", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auth-library": "1.6.1", + "is": "3.2.1", + "pify": "3.0.0", + "request": "2.87.0", + "retry-request": "3.3.2", + "split-array-stream": "2.0.0", + "stream-events": "1.0.4", + "through2": "2.0.3" }, "dependencies": { "retry-request": { @@ -304,8 +304,8 @@ "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" + "request": "2.87.0", + "through2": "2.0.3" } } } @@ -315,15 +315,15 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.7.1.tgz", "integrity": "sha512-VK2X6rLRJIQMmkTS3p483up/Vb8zZHLoMFSmo17iiqebgaAoDpOhBiXXy4thtfabk02Nu5QtYT0QwM49OeU/ew==", "requires": { - "@google-cloud/common": "^0.20.0", - "@grpc/proto-loader": "^0.1.0", - "dot-prop": "^4.2.0", - "duplexify": "^3.6.0", - "extend": "^3.0.1", - "grpc": "^1.12.3", - "is": "^3.2.1", - "retry-request": "^4.0.0", - "through2": "^2.0.3" + "@google-cloud/common": "0.20.1", + "@grpc/proto-loader": "0.1.0", + "dot-prop": "4.2.0", + "duplexify": "3.6.0", + "extend": "3.0.1", + "grpc": "1.12.4", + "is": "3.2.1", + "retry-request": "4.0.0", + "through2": "2.0.3" } }, "@google-cloud/nodejs-repo-tools": { @@ -340,7 +340,7 @@ "lodash": "4.17.5", "nyc": "11.4.1", "proxyquire": "1.8.0", - "semver": "^5.5.0", + "semver": "5.5.0", "sinon": "4.3.0", "string": "3.3.3", "supertest": "3.0.0", @@ -360,9 +360,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" } }, "is-fullwidth-code-point": { @@ -383,33 +383,33 @@ "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", "dev": true, "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.3.0", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.1.1", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.9.1", - "istanbul-lib-report": "^1.1.2", - "istanbul-lib-source-maps": "^1.2.2", - "istanbul-reports": "^1.1.3", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.0.2", - "micromatch": "^2.3.11", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.5.4", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.1.1", - "yargs": "^10.0.3", - "yargs-parser": "^8.0.0" + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.1", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "1.9.1", + "istanbul-lib-report": "1.1.2", + "istanbul-lib-source-maps": "1.2.2", + "istanbul-reports": "1.1.3", + "md5-hex": "1.3.0", + "merge-source-map": "1.0.4", + "micromatch": "2.3.11", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "spawn-wrap": "1.4.2", + "test-exclude": "4.1.1", + "yargs": "10.0.3", + "yargs-parser": "8.0.0" }, "dependencies": { "align-text": { @@ -417,9 +417,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" } }, "amdefine": { @@ -442,7 +442,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "^1.0.0" + "default-require-extensions": "1.0.0" } }, "archy": { @@ -455,7 +455,7 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "arr-flatten": { @@ -483,9 +483,9 @@ "bundled": true, "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" } }, "babel-generator": { @@ -493,14 +493,14 @@ "bundled": true, "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.6", - "trim-right": "^1.0.1" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" } }, "babel-messages": { @@ -508,7 +508,7 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-runtime": { @@ -516,8 +516,8 @@ "bundled": true, "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -525,11 +525,11 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" } }, "babel-traverse": { @@ -537,15 +537,15 @@ "bundled": true, "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" } }, "babel-types": { @@ -553,10 +553,10 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" } }, "babylon": { @@ -574,7 +574,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -583,9 +583,9 @@ "bundled": true, "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "builtin-modules": { @@ -598,9 +598,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" } }, "camelcase": { @@ -615,8 +615,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "chalk": { @@ -624,11 +624,11 @@ "bundled": true, "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "cliui": { @@ -637,8 +637,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" }, "dependencies": { @@ -680,8 +680,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "lru-cache": "4.1.1", + "which": "1.3.0" } }, "debug": { @@ -707,7 +707,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "2.0.0" } }, "detect-indent": { @@ -715,7 +715,7 @@ "bundled": true, "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "error-ex": { @@ -723,7 +723,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "escape-string-regexp": { @@ -741,13 +741,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" }, "dependencies": { "cross-spawn": { @@ -755,9 +755,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" } } } @@ -767,7 +767,7 @@ "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "expand-range": { @@ -775,7 +775,7 @@ "bundled": true, "dev": true, "requires": { - "fill-range": "^2.1.0" + "fill-range": "2.2.3" } }, "extglob": { @@ -783,7 +783,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "filename-regex": { @@ -796,11 +796,11 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, "find-cache-dir": { @@ -808,9 +808,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" } }, "find-up": { @@ -818,7 +818,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "for-in": { @@ -831,7 +831,7 @@ "bundled": true, "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "foreground-child": { @@ -839,8 +839,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" } }, "fs.realpath": { @@ -863,12 +863,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-base": { @@ -876,8 +876,8 @@ "bundled": true, "dev": true, "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" + "glob-parent": "2.0.0", + "is-glob": "2.0.1" } }, "glob-parent": { @@ -885,7 +885,7 @@ "bundled": true, "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "globals": { @@ -903,10 +903,10 @@ "bundled": true, "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "source-map": { @@ -914,7 +914,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -924,7 +924,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-flag": { @@ -947,8 +947,8 @@ "bundled": true, "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -961,7 +961,7 @@ "bundled": true, "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.3.1" } }, "invert-kv": { @@ -984,7 +984,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-dotfile": { @@ -997,7 +997,7 @@ "bundled": true, "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-primitive": "2.0.0" } }, "is-extendable": { @@ -1015,7 +1015,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -1023,7 +1023,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-glob": { @@ -1031,7 +1031,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "is-number": { @@ -1039,7 +1039,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-posix-bracket": { @@ -1090,7 +1090,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "^0.4.0" + "append-transform": "0.4.0" } }, "istanbul-lib-instrument": { @@ -1098,13 +1098,13 @@ "bundled": true, "dev": true, "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.1.1", - "semver": "^5.3.0" + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" } }, "istanbul-lib-report": { @@ -1112,10 +1112,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "^1.1.1", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" }, "dependencies": { "supports-color": { @@ -1123,7 +1123,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "^1.0.0" + "has-flag": "1.0.0" } } } @@ -1133,11 +1133,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.1", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "debug": "3.1.0", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" }, "dependencies": { "debug": { @@ -1155,7 +1155,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "^4.0.3" + "handlebars": "4.0.11" } }, "js-tokens": { @@ -1173,7 +1173,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "lazy-cache": { @@ -1187,7 +1187,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "load-json-file": { @@ -1195,11 +1195,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "locate-path": { @@ -1207,8 +1207,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" }, "dependencies": { "path-exists": { @@ -1233,7 +1233,7 @@ "bundled": true, "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "3.0.2" } }, "lru-cache": { @@ -1241,8 +1241,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "md5-hex": { @@ -1250,7 +1250,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "md5-o-matic": { @@ -1263,7 +1263,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.1.0" } }, "merge-source-map": { @@ -1271,7 +1271,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } }, "micromatch": { @@ -1279,19 +1279,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } }, "mimic-fn": { @@ -1304,7 +1304,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.8" } }, "minimist": { @@ -1330,10 +1330,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" } }, "normalize-path": { @@ -1341,7 +1341,7 @@ "bundled": true, "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } }, "npm-run-path": { @@ -1349,7 +1349,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -1367,8 +1367,8 @@ "bundled": true, "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, "once": { @@ -1376,7 +1376,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "optimist": { @@ -1384,8 +1384,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.8", + "wordwrap": "0.0.3" } }, "os-homedir": { @@ -1398,9 +1398,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "p-finally": { @@ -1418,7 +1418,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.1.0" } }, "parse-glob": { @@ -1426,10 +1426,10 @@ "bundled": true, "dev": true, "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" } }, "parse-json": { @@ -1437,7 +1437,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.1" } }, "path-exists": { @@ -1445,7 +1445,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } }, "path-is-absolute": { @@ -1468,9 +1468,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -1488,7 +1488,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-dir": { @@ -1496,7 +1496,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0" + "find-up": "1.1.2" }, "dependencies": { "find-up": { @@ -1504,8 +1504,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } } } @@ -1525,8 +1525,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "is-number": { @@ -1534,7 +1534,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -1542,7 +1542,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1552,7 +1552,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1562,9 +1562,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -1572,8 +1572,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" }, "dependencies": { "find-up": { @@ -1581,8 +1581,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } } } @@ -1597,7 +1597,7 @@ "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "is-equal-shallow": "0.1.3" } }, "remove-trailing-separator": { @@ -1620,7 +1620,7 @@ "bundled": true, "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "require-directory": { @@ -1644,7 +1644,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "rimraf": { @@ -1652,7 +1652,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "semver": { @@ -1670,7 +1670,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -1698,12 +1698,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.0" } }, "spdx-correct": { @@ -1711,7 +1711,7 @@ "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "^1.0.2" + "spdx-license-ids": "1.2.2" } }, "spdx-expression-parse": { @@ -1729,8 +1729,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" }, "dependencies": { "ansi-regex": { @@ -1748,7 +1748,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -1758,7 +1758,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -1766,7 +1766,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, "strip-eof": { @@ -1784,11 +1784,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "^1.0.1", - "micromatch": "^2.3.11", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" + "arrify": "1.0.1", + "micromatch": "2.3.11", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" } }, "to-fast-properties": { @@ -1807,9 +1807,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" }, "dependencies": { "yargs": { @@ -1818,9 +1818,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } } @@ -1837,8 +1837,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" } }, "which": { @@ -1846,7 +1846,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -1870,8 +1870,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "string-width": { @@ -1879,9 +1879,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -1896,9 +1896,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } }, "y18n": { @@ -1916,18 +1916,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^8.0.0" + "cliui": "3.2.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "8.0.0" }, "dependencies": { "cliui": { @@ -1935,9 +1935,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" }, "dependencies": { "string-width": { @@ -1945,9 +1945,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -1959,7 +1959,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { @@ -1977,9 +1977,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "proxyquire": { @@ -1988,9 +1988,9 @@ "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", "dev": true, "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.0", - "resolve": "~1.1.7" + "fill-keys": "1.0.2", + "module-not-found-error": "1.0.1", + "resolve": "1.1.7" } }, "string-width": { @@ -1999,8 +1999,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -2009,7 +2009,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "yargs": { @@ -2018,18 +2018,18 @@ "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" } } } @@ -2040,22 +2040,22 @@ "integrity": "sha512-5on1I+x6jr8/cbqAO6N1GINRA81QlpzdXnonQvTkJrTz5b5FU0f4j7Ea9bdRNV5q/ShsdcIagCAO+0vL2l7thA==", "dev": true, "requires": { - "@google-cloud/common": "^0.16.1", - "arrify": "^1.0.0", - "async-each": "^1.0.1", - "delay": "^2.0.0", - "duplexify": "^3.5.4", - "extend": "^3.0.1", - "google-auto-auth": "^0.9.0", - "google-gax": "^0.16.0", - "google-proto-files": "^0.15.0", - "is": "^3.0.1", - "lodash.chunk": "^4.2.0", - "lodash.merge": "^4.6.0", - "lodash.snakecase": "^4.1.1", - "protobufjs": "^6.8.1", - "through2": "^2.0.3", - "uuid": "^3.1.0" + "@google-cloud/common": "0.16.2", + "arrify": "1.0.1", + "async-each": "1.0.1", + "delay": "2.0.0", + "duplexify": "3.6.0", + "extend": "3.0.1", + "google-auto-auth": "0.9.7", + "google-gax": "0.16.1", + "google-proto-files": "0.15.1", + "is": "3.2.1", + "lodash.chunk": "4.2.0", + "lodash.merge": "4.6.1", + "lodash.snakecase": "4.1.1", + "protobufjs": "6.8.6", + "through2": "2.0.3", + "uuid": "3.2.1" }, "dependencies": { "@google-cloud/common": { @@ -2064,24 +2064,24 @@ "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", "dev": true, "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.9.0", - "is": "^3.2.0", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.6.0", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.9.7", + "is": "3.2.1", "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.87.0", + "retry-request": "3.3.2", + "split-array-stream": "1.0.3", + "stream-events": "1.0.4", + "string-format-obj": "1.1.1", + "through2": "2.0.3" } }, "google-auto-auth": { @@ -2090,10 +2090,10 @@ "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", "dev": true, "requires": { - "async": "^2.3.0", - "gcp-metadata": "^0.6.1", - "google-auth-library": "^1.3.1", - "request": "^2.79.0" + "async": "2.6.1", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.6.1", + "request": "2.87.0" } }, "google-gax": { @@ -2102,16 +2102,16 @@ "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "dev": true, "requires": { - "duplexify": "^3.5.4", - "extend": "^3.0.0", - "globby": "^8.0.0", - "google-auto-auth": "^0.10.0", - "google-proto-files": "^0.15.0", - "grpc": "^1.10.0", - "is-stream-ended": "^0.1.0", - "lodash": "^4.17.2", - "protobufjs": "^6.8.0", - "through2": "^2.0.3" + "duplexify": "3.6.0", + "extend": "3.0.1", + "globby": "8.0.1", + "google-auto-auth": "0.10.1", + "google-proto-files": "0.15.1", + "grpc": "1.12.4", + "is-stream-ended": "0.1.4", + "lodash": "4.17.10", + "protobufjs": "6.8.6", + "through2": "2.0.3" }, "dependencies": { "google-auto-auth": { @@ -2120,10 +2120,10 @@ "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "dev": true, "requires": { - "async": "^2.3.0", - "gcp-metadata": "^0.6.1", - "google-auth-library": "^1.3.1", - "request": "^2.79.0" + "async": "2.6.1", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.6.1", + "request": "2.87.0" } } } @@ -2134,9 +2134,9 @@ "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", "dev": true, "requires": { - "globby": "^7.1.1", - "power-assert": "^1.4.4", - "protobufjs": "^6.8.0" + "globby": "7.1.1", + "power-assert": "1.6.0", + "protobufjs": "6.8.6" }, "dependencies": { "globby": { @@ -2145,12 +2145,12 @@ "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "dev": true, "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.10", + "pify": "3.0.0", + "slash": "1.0.0" } } } @@ -2161,8 +2161,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" + "request": "2.87.0", + "through2": "2.0.3" } }, "split-array-stream": { @@ -2171,8 +2171,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" + "async": "2.6.1", + "is-stream-ended": "0.1.4" } } } @@ -2183,27 +2183,27 @@ "integrity": "sha512-QaAxzCkbhspwajoaEnT0GcnQcpjPRcBrHYuQsXtD05BtOJgVnHCLXSsfUiRdU0nVpK+Thp7+sTkQ0fvk5PanKg==", "dev": true, "requires": { - "@google-cloud/common": "^0.17.0", - "arrify": "^1.0.0", - "async": "^2.0.1", - "compressible": "^2.0.12", - "concat-stream": "^1.5.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "extend": "^3.0.0", - "gcs-resumable-upload": "^0.10.2", - "hash-stream-validation": "^0.2.1", - "is": "^3.0.1", - "mime": "^2.2.0", - "mime-types": "^2.0.8", - "once": "^1.3.1", - "pumpify": "^1.5.1", - "request": "^2.85.0", - "safe-buffer": "^5.1.1", - "snakeize": "^0.1.0", - "stream-events": "^1.0.1", - "through2": "^2.0.0", - "xdg-basedir": "^3.0.0" + "@google-cloud/common": "0.17.0", + "arrify": "1.0.1", + "async": "2.6.1", + "compressible": "2.0.14", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.6.0", + "extend": "3.0.1", + "gcs-resumable-upload": "0.10.2", + "hash-stream-validation": "0.2.1", + "is": "3.2.1", + "mime": "2.3.1", + "mime-types": "2.1.18", + "once": "1.4.0", + "pumpify": "1.5.1", + "request": "2.87.0", + "safe-buffer": "5.1.2", + "snakeize": "0.1.0", + "stream-events": "1.0.4", + "through2": "2.0.3", + "xdg-basedir": "3.0.0" }, "dependencies": { "@google-cloud/common": { @@ -2212,24 +2212,24 @@ "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "dev": true, "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.10.0", - "is": "^3.2.0", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.6.0", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.10.1", + "is": "3.2.1", "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.87.0", + "retry-request": "3.3.2", + "split-array-stream": "1.0.3", + "stream-events": "1.0.4", + "string-format-obj": "1.1.1", + "through2": "2.0.3" } }, "retry-request": { @@ -2238,8 +2238,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" + "request": "2.87.0", + "through2": "2.0.3" } }, "split-array-stream": { @@ -2248,8 +2248,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" + "async": "2.6.1", + "is-stream-ended": "0.1.4" } } } @@ -2259,10 +2259,10 @@ "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.1.0.tgz", "integrity": "sha512-GHoZBR5N+65AWazsCiJDxeMSbUpp2qNYbjeD3mP27L2PT25+GvIupIIJiCgULH87NAiAd9SmWMRBVz+uSiHpgA==", "requires": { - "@types/lodash": "^4.14.104", - "@types/node": "^9.4.6", - "lodash": "^4.17.5", - "protobufjs": "^6.8.6" + "@types/lodash": "4.14.110", + "@types/node": "9.6.22", + "lodash": "4.17.10", + "protobufjs": "6.8.6" }, "dependencies": { "@types/node": { @@ -2278,10 +2278,10 @@ "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", "dev": true, "requires": { - "chalk": "^0.4.0", - "date-time": "^0.1.1", - "pretty-ms": "^0.2.1", - "text-table": "^0.2.0" + "chalk": "0.4.0", + "date-time": "0.1.1", + "pretty-ms": "0.2.2", + "text-table": "0.2.0" }, "dependencies": { "ansi-styles": { @@ -2296,9 +2296,9 @@ "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "dev": true, "requires": { - "ansi-styles": "~1.0.0", - "has-color": "~0.1.0", - "strip-ansi": "~0.1.0" + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" } }, "pretty-ms": { @@ -2307,7 +2307,7 @@ "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", "dev": true, "requires": { - "parse-ms": "^0.1.0" + "parse-ms": "0.1.2" } }, "strip-ansi": { @@ -2323,8 +2323,8 @@ "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" + "call-me-maybe": "1.0.1", + "glob-to-regexp": "0.3.0" } }, "@nodelib/fs.stat": { @@ -2357,8 +2357,8 @@ "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/inquire": "1.1.0" } }, "@protobufjs/float": { @@ -2411,7 +2411,7 @@ "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", "requires": { - "@types/node": "*" + "@types/node": "10.3.5" } }, "@types/form-data": { @@ -2419,7 +2419,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "*" + "@types/node": "10.3.5" } }, "@types/lodash": { @@ -2433,19 +2433,19 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.4.tgz", - "integrity": "sha512-YMLlzdeNnAyLrQew39IFRkMacAR5BqKGIEei9ZjdHsIZtv+ZWKYTu1i7QJhetxQ9ReXx8w5f+cixdHZG3zgMQA==" + "version": "10.3.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.5.tgz", + "integrity": "sha512-6lRwZN0Y3TuglwaaZN2XPocobmzLlhxcqDjKFjNYSsXG/TFAGYkCqkzZh4+ms8iTHHQE6gJXLHPV7TziVGeWhg==" }, "@types/request": { "version": "2.47.1", "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.1.tgz", "integrity": "sha512-TV3XLvDjQbIeVxJ1Z3oCTDk/KuYwwcNKVwz2YaT0F5u86Prgc4syDAp6P96rkTQQ4bIdh+VswQIC9zS6NjY7/g==", "requires": { - "@types/caseless": "*", - "@types/form-data": "*", - "@types/node": "*", - "@types/tough-cookie": "*" + "@types/caseless": "0.12.1", + "@types/form-data": "2.2.1", + "@types/node": "10.3.5", + "@types/tough-cookie": "2.3.3" } }, "@types/tough-cookie": { @@ -2469,7 +2469,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "^3.0.4" + "acorn": "3.3.0" }, "dependencies": { "acorn": { @@ -2485,10 +2485,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ajv-keywords": { @@ -2503,9 +2503,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" }, "dependencies": { "kind-of": { @@ -2514,7 +2514,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -2531,7 +2531,7 @@ "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "dev": true, "requires": { - "string-width": "^2.0.0" + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -2552,8 +2552,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -2562,7 +2562,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -2584,7 +2584,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.2" } }, "anymatch": { @@ -2593,8 +2593,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" + "micromatch": "2.3.11", + "normalize-path": "2.1.1" }, "dependencies": { "arr-diff": { @@ -2603,7 +2603,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "array-unique": { @@ -2618,9 +2618,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "expand-brackets": { @@ -2629,7 +2629,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "extglob": { @@ -2638,7 +2638,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "is-extglob": { @@ -2653,7 +2653,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "kind-of": { @@ -2662,7 +2662,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "micromatch": { @@ -2671,19 +2671,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } } } @@ -2694,7 +2694,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" } }, "argv": { @@ -2752,7 +2752,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "^1.0.1" + "array-uniq": "1.0.3" } }, "array-uniq": { @@ -2775,8 +2775,8 @@ "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" + "colour": "0.7.1", + "optjs": "3.2.2" } }, "asn1": { @@ -2800,7 +2800,7 @@ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "dev": true, "requires": { - "lodash": "^4.17.10" + "lodash": "4.17.10" } }, "async-each": { @@ -2831,89 +2831,89 @@ "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", "dev": true, "requires": { - "@ava/babel-preset-stage-4": "^1.1.0", - "@ava/babel-preset-transform-test-files": "^3.0.0", - "@ava/write-file-atomic": "^2.2.0", - "@concordance/react": "^1.0.0", - "@ladjs/time-require": "^0.1.4", - "ansi-escapes": "^3.0.0", - "ansi-styles": "^3.1.0", - "arr-flatten": "^1.0.1", - "array-union": "^1.0.1", - "array-uniq": "^1.0.2", - "arrify": "^1.0.0", - "auto-bind": "^1.1.0", - "ava-init": "^0.2.0", - "babel-core": "^6.17.0", - "babel-generator": "^6.26.0", - "babel-plugin-syntax-object-rest-spread": "^6.13.0", - "bluebird": "^3.0.0", - "caching-transform": "^1.0.0", - "chalk": "^2.0.1", - "chokidar": "^1.4.2", - "clean-stack": "^1.1.1", - "clean-yaml-object": "^0.1.0", - "cli-cursor": "^2.1.0", - "cli-spinners": "^1.0.0", - "cli-truncate": "^1.0.0", - "co-with-promise": "^4.6.0", - "code-excerpt": "^2.1.1", - "common-path-prefix": "^1.0.0", - "concordance": "^3.0.0", - "convert-source-map": "^1.5.1", - "core-assert": "^0.2.0", - "currently-unhandled": "^0.4.1", - "debug": "^3.0.1", - "dot-prop": "^4.1.0", - "empower-core": "^0.6.1", - "equal-length": "^1.0.0", - "figures": "^2.0.0", - "find-cache-dir": "^1.0.0", - "fn-name": "^2.0.0", - "get-port": "^3.0.0", - "globby": "^6.0.0", - "has-flag": "^2.0.0", - "hullabaloo-config-manager": "^1.1.0", - "ignore-by-default": "^1.0.0", - "import-local": "^0.1.1", - "indent-string": "^3.0.0", - "is-ci": "^1.0.7", - "is-generator-fn": "^1.0.0", - "is-obj": "^1.0.0", - "is-observable": "^1.0.0", - "is-promise": "^2.1.0", - "last-line-stream": "^1.0.0", - "lodash.clonedeepwith": "^4.5.0", - "lodash.debounce": "^4.0.3", - "lodash.difference": "^4.3.0", - "lodash.flatten": "^4.2.0", - "loud-rejection": "^1.2.0", - "make-dir": "^1.0.0", - "matcher": "^1.0.0", - "md5-hex": "^2.0.0", - "meow": "^3.7.0", - "ms": "^2.0.0", - "multimatch": "^2.1.0", - "observable-to-promise": "^0.5.0", - "option-chain": "^1.0.0", - "package-hash": "^2.0.0", - "pkg-conf": "^2.0.0", - "plur": "^2.0.0", - "pretty-ms": "^3.0.0", - "require-precompiled": "^0.1.0", - "resolve-cwd": "^2.0.0", - "safe-buffer": "^5.1.1", - "semver": "^5.4.1", - "slash": "^1.0.0", - "source-map-support": "^0.5.0", - "stack-utils": "^1.0.1", - "strip-ansi": "^4.0.0", - "strip-bom-buf": "^1.0.0", - "supertap": "^1.0.0", - "supports-color": "^5.0.0", - "trim-off-newlines": "^1.0.1", - "unique-temp-dir": "^1.0.0", - "update-notifier": "^2.3.0" + "@ava/babel-preset-stage-4": "1.1.0", + "@ava/babel-preset-transform-test-files": "3.0.0", + "@ava/write-file-atomic": "2.2.0", + "@concordance/react": "1.0.0", + "@ladjs/time-require": "0.1.4", + "ansi-escapes": "3.1.0", + "ansi-styles": "3.2.1", + "arr-flatten": "1.1.0", + "array-union": "1.0.2", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "auto-bind": "1.2.1", + "ava-init": "0.2.1", + "babel-core": "6.26.3", + "babel-generator": "6.26.1", + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "bluebird": "3.5.1", + "caching-transform": "1.0.1", + "chalk": "2.4.1", + "chokidar": "1.7.0", + "clean-stack": "1.3.0", + "clean-yaml-object": "0.1.0", + "cli-cursor": "2.1.0", + "cli-spinners": "1.3.1", + "cli-truncate": "1.1.0", + "co-with-promise": "4.6.0", + "code-excerpt": "2.1.1", + "common-path-prefix": "1.0.0", + "concordance": "3.0.0", + "convert-source-map": "1.5.1", + "core-assert": "0.2.1", + "currently-unhandled": "0.4.1", + "debug": "3.1.0", + "dot-prop": "4.2.0", + "empower-core": "0.6.2", + "equal-length": "1.0.1", + "figures": "2.0.0", + "find-cache-dir": "1.0.0", + "fn-name": "2.0.1", + "get-port": "3.2.0", + "globby": "6.1.0", + "has-flag": "2.0.0", + "hullabaloo-config-manager": "1.1.1", + "ignore-by-default": "1.0.1", + "import-local": "0.1.1", + "indent-string": "3.2.0", + "is-ci": "1.1.0", + "is-generator-fn": "1.0.0", + "is-obj": "1.0.1", + "is-observable": "1.1.0", + "is-promise": "2.1.0", + "last-line-stream": "1.0.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.debounce": "4.0.8", + "lodash.difference": "4.5.0", + "lodash.flatten": "4.4.0", + "loud-rejection": "1.6.0", + "make-dir": "1.3.0", + "matcher": "1.1.1", + "md5-hex": "2.0.0", + "meow": "3.7.0", + "ms": "2.0.0", + "multimatch": "2.1.0", + "observable-to-promise": "0.5.0", + "option-chain": "1.0.0", + "package-hash": "2.0.0", + "pkg-conf": "2.1.0", + "plur": "2.1.2", + "pretty-ms": "3.2.0", + "require-precompiled": "0.1.0", + "resolve-cwd": "2.0.0", + "safe-buffer": "5.1.2", + "semver": "5.5.0", + "slash": "1.0.0", + "source-map-support": "0.5.6", + "stack-utils": "1.0.1", + "strip-ansi": "4.0.0", + "strip-bom-buf": "1.0.0", + "supertap": "1.0.0", + "supports-color": "5.4.0", + "trim-off-newlines": "1.0.1", + "unique-temp-dir": "1.0.0", + "update-notifier": "2.5.0" }, "dependencies": { "ansi-regex": { @@ -2929,7 +2929,7 @@ "dev": true, "requires": { "call-signature": "0.0.2", - "core-js": "^2.0.0" + "core-js": "2.5.7" } }, "globby": { @@ -2938,11 +2938,11 @@ "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -2963,7 +2963,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "strip-ansi": { @@ -2972,7 +2972,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -2983,11 +2983,11 @@ "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", "dev": true, "requires": { - "arr-exclude": "^1.0.0", - "execa": "^0.7.0", - "has-yarn": "^1.0.0", - "read-pkg-up": "^2.0.0", - "write-pkg": "^3.1.0" + "arr-exclude": "1.0.0", + "execa": "0.7.0", + "has-yarn": "1.0.0", + "read-pkg-up": "2.0.0", + "write-pkg": "3.2.0" } }, "aws-sign2": { @@ -3005,8 +3005,8 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" + "follow-redirects": "1.5.0", + "is-buffer": "1.1.6" } }, "babel-code-frame": { @@ -3015,9 +3015,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" }, "dependencies": { "ansi-styles": { @@ -3032,11 +3032,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "supports-color": { @@ -3053,25 +3053,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" }, "dependencies": { "debug": { @@ -3091,14 +3091,14 @@ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" }, "dependencies": { "jsesc": { @@ -3115,9 +3115,9 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-call-delegate": { @@ -3126,10 +3126,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-explode-assignable-expression": { @@ -3138,9 +3138,9 @@ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-function-name": { @@ -3149,11 +3149,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-get-function-arity": { @@ -3162,8 +3162,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-hoist-variables": { @@ -3172,8 +3172,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-regex": { @@ -3182,9 +3182,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.10" } }, "babel-helper-remap-async-to-generator": { @@ -3193,11 +3193,11 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helpers": { @@ -3206,8 +3206,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-messages": { @@ -3216,7 +3216,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-check-es2015-constants": { @@ -3225,7 +3225,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-espower": { @@ -3234,13 +3234,13 @@ "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", "dev": true, "requires": { - "babel-generator": "^6.1.0", - "babylon": "^6.1.0", - "call-matcher": "^1.0.0", - "core-js": "^2.0.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.1.1" + "babel-generator": "6.26.1", + "babylon": "6.18.0", + "call-matcher": "1.0.1", + "core-js": "2.5.7", + "espower-location-detector": "1.0.0", + "espurify": "1.8.0", + "estraverse": "4.2.0" } }, "babel-plugin-syntax-async-functions": { @@ -3273,9 +3273,9 @@ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -3284,7 +3284,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -3293,9 +3293,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -3304,10 +3304,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -3316,12 +3316,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-spread": { @@ -3330,7 +3330,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -3339,9 +3339,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -3350,9 +3350,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { @@ -3361,9 +3361,9 @@ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-strict-mode": { @@ -3372,8 +3372,8 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-register": { @@ -3382,13 +3382,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" + "babel-core": "6.26.3", + "babel-runtime": "6.26.0", + "core-js": "2.5.7", + "home-or-tmp": "2.0.0", + "lodash": "4.17.10", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" }, "dependencies": { "source-map-support": { @@ -3397,7 +3397,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } } } @@ -3408,8 +3408,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.7", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -3418,11 +3418,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.10" } }, "babel-traverse": { @@ -3431,15 +3431,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.10" }, "dependencies": { "debug": { @@ -3459,10 +3459,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "1.0.3" } }, "babylon": { @@ -3481,13 +3481,13 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" }, "dependencies": { "define-property": { @@ -3495,7 +3495,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -3503,7 +3503,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -3511,7 +3511,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -3519,9 +3519,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -3532,7 +3532,7 @@ "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true, "requires": { - "tweetnacl": "^0.14.3" + "tweetnacl": "0.14.5" } }, "binary-extensions": { @@ -3553,13 +3553,13 @@ "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.4.1", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "2.0.0" }, "dependencies": { "ansi-regex": { @@ -3586,8 +3586,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -3596,7 +3596,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -3606,7 +3606,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -3615,16 +3615,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -3632,7 +3632,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -3671,7 +3671,7 @@ "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { - "long": "~3" + "long": "3.2.0" }, "dependencies": { "long": { @@ -3686,15 +3686,15 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" } }, "cacheable-request": { @@ -3726,9 +3726,9 @@ "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", "dev": true, "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" }, "dependencies": { "md5-hex": { @@ -3737,7 +3737,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "write-file-atomic": { @@ -3746,9 +3746,9 @@ "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } } } @@ -3759,10 +3759,10 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "^2.0.0", - "deep-equal": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.0.0" + "core-js": "2.5.7", + "deep-equal": "1.0.1", + "espurify": "1.8.0", + "estraverse": "4.2.0" } }, "call-me-maybe": { @@ -3781,7 +3781,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "^0.2.0" + "callsites": "0.2.0" } }, "callsites": { @@ -3801,8 +3801,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" }, "dependencies": { "map-obj": { @@ -3830,7 +3830,7 @@ "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", "dev": true, "requires": { - "underscore-contrib": "~0.3.0" + "underscore-contrib": "0.3.0" } }, "center-align": { @@ -3840,8 +3840,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "chalk": { @@ -3850,9 +3850,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "chardet": { @@ -3867,15 +3867,14 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" }, "dependencies": { "glob-parent": { @@ -3884,7 +3883,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "is-extglob": { @@ -3899,7 +3898,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -3921,10 +3920,10 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" }, "dependencies": { "define-property": { @@ -3932,7 +3931,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -3961,7 +3960,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "2.0.0" } }, "cli-spinners": { @@ -3976,8 +3975,8 @@ "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", "dev": true, "requires": { - "slice-ansi": "^1.0.0", - "string-width": "^2.0.0" + "slice-ansi": "1.0.0", + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -3998,8 +3997,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -4008,7 +4007,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -4024,9 +4023,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" } }, "clone-response": { @@ -4035,7 +4034,7 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "mimic-response": "1.0.0" } }, "co": { @@ -4049,7 +4048,7 @@ "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", "dev": true, "requires": { - "pinkie-promise": "^1.0.0" + "pinkie-promise": "1.0.0" } }, "code-excerpt": { @@ -4058,7 +4057,7 @@ "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", "dev": true, "requires": { - "convert-to-spaces": "^1.0.1" + "convert-to-spaces": "1.0.2" } }, "code-point-at": { @@ -4073,7 +4072,7 @@ "dev": true, "requires": { "argv": "0.0.2", - "request": "^2.81.0", + "request": "2.87.0", "urlgrey": "0.4.4" } }, @@ -4082,8 +4081,8 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "map-visit": "1.0.0", + "object-visit": "1.0.1" } }, "color-convert": { @@ -4117,7 +4116,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "~1.0.0" + "delayed-stream": "1.0.0" } }, "commander": { @@ -4149,7 +4148,7 @@ "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", "dev": true, "requires": { - "mime-db": ">= 1.34.0 < 2" + "mime-db": "1.34.0" }, "dependencies": { "mime-db": { @@ -4171,10 +4170,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "buffer-from": "1.1.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" } }, "concordance": { @@ -4183,17 +4182,17 @@ "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", "dev": true, "requires": { - "date-time": "^2.1.0", - "esutils": "^2.0.2", - "fast-diff": "^1.1.1", - "function-name-support": "^0.2.0", - "js-string-escape": "^1.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.flattendeep": "^4.4.0", - "lodash.merge": "^4.6.0", - "md5-hex": "^2.0.0", - "semver": "^5.3.0", - "well-known-symbols": "^1.0.0" + "date-time": "2.1.0", + "esutils": "2.0.2", + "fast-diff": "1.1.2", + "function-name-support": "0.2.0", + "js-string-escape": "1.0.1", + "lodash.clonedeep": "4.5.0", + "lodash.flattendeep": "4.4.0", + "lodash.merge": "4.6.1", + "md5-hex": "2.0.0", + "semver": "5.5.0", + "well-known-symbols": "1.0.0" }, "dependencies": { "date-time": { @@ -4202,7 +4201,7 @@ "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "dev": true, "requires": { - "time-zone": "^1.0.0" + "time-zone": "1.0.0" } } } @@ -4213,12 +4212,12 @@ "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.3.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" } }, "convert-source-map": { @@ -4250,8 +4249,8 @@ "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", "dev": true, "requires": { - "buf-compare": "^1.0.0", - "is-error": "^2.2.0" + "buf-compare": "1.0.1", + "is-error": "2.2.1" } }, "core-js": { @@ -4270,7 +4269,7 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "^1.0.0" + "capture-stack-trace": "1.0.0" } }, "cross-spawn": { @@ -4279,9 +4278,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" } }, "crypto-random-string": { @@ -4296,7 +4295,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "^1.0.1" + "array-find-index": "1.0.2" } }, "d": { @@ -4305,7 +4304,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "^0.10.9" + "es5-ext": "0.10.45" } }, "d64": { @@ -4318,7 +4317,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "date-time": { @@ -4351,7 +4350,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "mimic-response": "1.0.0" } }, "deep-equal": { @@ -4377,8 +4376,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" + "foreach": "2.0.5", + "object-keys": "1.0.12" } }, "define-property": { @@ -4386,8 +4385,8 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -4395,7 +4394,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -4403,7 +4402,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -4411,9 +4410,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -4424,13 +4423,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" }, "dependencies": { "globby": { @@ -4439,12 +4438,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -4465,7 +4464,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } } } @@ -4476,7 +4475,7 @@ "integrity": "sha1-kRLq3APk7H4AKXM3iW8nO72R+uU=", "dev": true, "requires": { - "p-defer": "^1.0.0" + "p-defer": "1.0.0" } }, "delayed-stream": { @@ -4490,7 +4489,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "diff": { @@ -4509,8 +4508,8 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" + "arrify": "1.0.1", + "path-type": "3.0.0" } }, "doctrine": { @@ -4519,7 +4518,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2" + "esutils": "2.0.2" } }, "dom-serializer": { @@ -4528,8 +4527,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" + "domelementtype": "1.1.3", + "entities": "1.1.1" }, "dependencies": { "domelementtype": { @@ -4552,7 +4551,7 @@ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { - "domelementtype": "1" + "domelementtype": "1.3.0" } }, "domutils": { @@ -4561,8 +4560,8 @@ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" } }, "dot-prop": { @@ -4570,7 +4569,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "requires": { - "is-obj": "^1.0.0" + "is-obj": "1.0.1" } }, "duplexer3": { @@ -4584,10 +4583,10 @@ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "stream-shift": "1.0.0" } }, "eastasianwidth": { @@ -4601,7 +4600,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "0.1.1" } }, "ecdsa-sig-formatter": { @@ -4609,7 +4608,7 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", "requires": { - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "empower": { @@ -4617,8 +4616,8 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.0.tgz", "integrity": "sha512-tP2WqM7QzrPguCCQEQfFFDF+6Pw6YWLQal3+GHQaV+0uIr0S+jyREQPWljE02zFCYPFYLZ3LosiRV+OzTrxPpQ==", "requires": { - "core-js": "^2.0.0", - "empower-core": "^1.2.0" + "core-js": "2.5.7", + "empower-core": "1.2.0" } }, "empower-assert": { @@ -4627,7 +4626,7 @@ "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { - "estraverse": "^4.2.0" + "estraverse": "4.2.0" } }, "empower-core": { @@ -4636,7 +4635,7 @@ "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", "requires": { "call-signature": "0.0.2", - "core-js": "^2.0.0" + "core-js": "2.5.7" } }, "end-of-stream": { @@ -4644,7 +4643,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "once": "^1.4.0" + "once": "1.4.0" } }, "ent": { @@ -4670,7 +4669,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "es5-ext": { @@ -4679,9 +4678,9 @@ "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", "dev": true, "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" } }, "es6-error": { @@ -4696,9 +4695,9 @@ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "d": "1.0.0", + "es5-ext": "0.10.45", + "es6-symbol": "3.1.1" } }, "es6-map": { @@ -4707,12 +4706,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" + "d": "1.0.0", + "es5-ext": "0.10.45", + "es6-iterator": "2.0.3", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" } }, "es6-set": { @@ -4721,11 +4720,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", + "d": "1.0.0", + "es5-ext": "0.10.45", + "es6-iterator": "2.0.3", "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" + "event-emitter": "0.3.5" } }, "es6-symbol": { @@ -4734,8 +4733,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "1.0.0", + "es5-ext": "0.10.45" } }, "es6-weak-map": { @@ -4744,10 +4743,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" + "d": "1.0.0", + "es5-ext": "0.10.45", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" } }, "escallmatch": { @@ -4756,8 +4755,8 @@ "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", "dev": true, "requires": { - "call-matcher": "^1.0.0", - "esprima": "^2.0.0" + "call-matcher": "1.0.1", + "esprima": "2.7.3" }, "dependencies": { "esprima": { @@ -4780,11 +4779,11 @@ "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", "dev": true, "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" + "esprima": "3.1.3", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.6.1" }, "dependencies": { "esprima": { @@ -4808,10 +4807,10 @@ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "^0.1.3", - "es6-weak-map": "^2.0.1", - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.1", + "estraverse": "4.2.0" } }, "eslint": { @@ -4820,44 +4819,44 @@ "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", - "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^1.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", + "ajv": "5.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.4.1", + "concat-stream": "1.6.2", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", + "esquery": "1.0.1", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.7.0", + "ignore": "3.3.10", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.12.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.1.0", + "require-uncached": "1.0.3", + "semver": "5.5.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", "table": "4.0.2", - "text-table": "~0.2.0" + "text-table": "0.2.0" }, "dependencies": { "ansi-regex": { @@ -4878,7 +4877,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -4889,7 +4888,7 @@ "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { - "get-stdin": "^5.0.1" + "get-stdin": "5.0.1" }, "dependencies": { "get-stdin": { @@ -4906,10 +4905,10 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "^3.3.6", - "minimatch": "^3.0.4", - "resolve": "^1.3.3", - "semver": "^5.4.1" + "ignore": "3.3.10", + "minimatch": "3.0.4", + "resolve": "1.8.1", + "semver": "5.5.0" }, "dependencies": { "resolve": { @@ -4918,19 +4917,19 @@ "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } } } }, "eslint-plugin-prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz", - "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.1.tgz", + "integrity": "sha512-wNZ2z0oVCWnf+3BSI7roS+z4gGu2AwcPKUek+SlLZMZg+X0KbZLsB2knul7fd0K3iuIp402HIYzm4f2+OyfXxA==", "dev": true, "requires": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" + "fast-diff": "1.1.2", + "jest-docblock": "21.2.0" } }, "eslint-scope": { @@ -4939,8 +4938,8 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "4.2.1", + "estraverse": "4.2.0" } }, "eslint-visitor-keys": { @@ -4955,16 +4954,16 @@ "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", "dev": true, "requires": { - "array-find": "^1.0.0", - "escallmatch": "^1.5.0", - "escodegen": "^1.7.0", - "escope": "^3.3.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.3.0", - "estraverse": "^4.1.0", - "source-map": "^0.5.0", - "type-name": "^2.0.0", - "xtend": "^4.0.0" + "array-find": "1.0.0", + "escallmatch": "1.5.0", + "escodegen": "1.10.0", + "escope": "3.6.0", + "espower-location-detector": "1.0.0", + "espurify": "1.8.0", + "estraverse": "4.2.0", + "source-map": "0.5.7", + "type-name": "2.0.2", + "xtend": "4.0.1" } }, "espower-loader": { @@ -4973,11 +4972,11 @@ "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", "dev": true, "requires": { - "convert-source-map": "^1.1.0", - "espower-source": "^2.0.0", - "minimatch": "^3.0.0", - "source-map-support": "^0.4.0", - "xtend": "^4.0.0" + "convert-source-map": "1.5.1", + "espower-source": "2.3.0", + "minimatch": "3.0.4", + "source-map-support": "0.4.18", + "xtend": "4.0.1" }, "dependencies": { "source-map-support": { @@ -4986,7 +4985,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } } } @@ -4997,10 +4996,10 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "^1.2.1", - "path-is-absolute": "^1.0.0", - "source-map": "^0.5.0", - "xtend": "^4.0.0" + "is-url": "1.2.4", + "path-is-absolute": "1.0.1", + "source-map": "0.5.7", + "xtend": "4.0.1" } }, "espower-source": { @@ -5009,17 +5008,17 @@ "integrity": "sha512-Wc4kC4zUAEV7Qt31JRPoBUc5jjowHRylml2L2VaDQ1XEbnqQofGWx+gPR03TZAPokAMl5dqyL36h3ITyMXy3iA==", "dev": true, "requires": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.10", - "convert-source-map": "^1.1.1", - "empower-assert": "^1.0.0", - "escodegen": "^1.10.0", - "espower": "^2.1.1", - "estraverse": "^4.0.0", - "merge-estraverse-visitors": "^1.0.0", - "multi-stage-sourcemap": "^0.2.1", - "path-is-absolute": "^1.0.0", - "xtend": "^4.0.0" + "acorn": "5.7.1", + "acorn-es7-plugin": "1.1.7", + "convert-source-map": "1.5.1", + "empower-assert": "1.1.0", + "escodegen": "1.10.0", + "espower": "2.1.1", + "estraverse": "4.2.0", + "merge-estraverse-visitors": "1.0.0", + "multi-stage-sourcemap": "0.2.1", + "path-is-absolute": "1.0.1", + "xtend": "4.0.1" } }, "espree": { @@ -5028,8 +5027,8 @@ "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "5.7.1", + "acorn-jsx": "3.0.1" } }, "esprima": { @@ -5043,7 +5042,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", "requires": { - "core-js": "^2.0.0" + "core-js": "2.5.7" } }, "esquery": { @@ -5052,7 +5051,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "4.2.0" } }, "esrecurse": { @@ -5061,7 +5060,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "4.2.0" } }, "estraverse": { @@ -5081,8 +5080,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "1.0.0", + "es5-ext": "0.10.45" } }, "eventid": { @@ -5090,8 +5089,8 @@ "resolved": "https://registry.npmjs.org/eventid/-/eventid-0.1.2.tgz", "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", "requires": { - "d64": "^1.0.0", - "uuid": "^3.0.1" + "d64": "1.0.0", + "uuid": "3.2.1" } }, "execa": { @@ -5100,13 +5099,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } }, "expand-brackets": { @@ -5114,13 +5113,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "debug": { @@ -5136,7 +5135,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -5144,7 +5143,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5155,7 +5154,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "^2.1.0" + "fill-range": "2.2.4" }, "dependencies": { "fill-range": { @@ -5164,11 +5163,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "3.0.0", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, "is-number": { @@ -5177,7 +5176,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "isobject": { @@ -5195,7 +5194,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -5210,8 +5209,8 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -5219,7 +5218,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -5230,9 +5229,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" + "chardet": "0.4.2", + "iconv-lite": "0.4.23", + "tmp": "0.0.33" } }, "extglob": { @@ -5240,14 +5239,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -5255,7 +5254,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -5263,7 +5262,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -5271,7 +5270,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -5279,7 +5278,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -5287,9 +5286,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -5315,12 +5314,12 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.1", - "micromatch": "^3.1.10" + "@mrmlnc/readdir-enhanced": "2.2.1", + "@nodelib/fs.stat": "1.1.0", + "glob-parent": "3.1.0", + "is-glob": "4.0.0", + "merge2": "1.2.2", + "micromatch": "3.1.10" } }, "fast-json-stable-stringify": { @@ -5340,7 +5339,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "escape-string-regexp": "1.0.5" } }, "file-entry-cache": { @@ -5349,8 +5348,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "1.3.0", + "object-assign": "4.1.1" } }, "filename-regex": { @@ -5365,8 +5364,8 @@ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", "dev": true, "requires": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" + "is-object": "1.0.1", + "merge-descriptors": "1.0.1" } }, "fill-range": { @@ -5374,10 +5373,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -5385,7 +5384,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5396,9 +5395,9 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" + "commondir": "1.0.1", + "make-dir": "1.3.0", + "pkg-dir": "2.0.0" } }, "find-up": { @@ -5407,7 +5406,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "flat-cache": { @@ -5416,10 +5415,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" } }, "fn-name": { @@ -5433,7 +5432,7 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", "requires": { - "debug": "^3.1.0" + "debug": "3.1.0" } }, "for-in": { @@ -5447,7 +5446,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "foreach": { @@ -5465,9 +5464,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "^0.4.0", + "asynckit": "0.4.0", "combined-stream": "1.0.6", - "mime-types": "^2.1.12" + "mime-types": "2.1.18" } }, "formidable": { @@ -5481,7 +5480,7 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { - "map-cache": "^0.2.2" + "map-cache": "0.2.2" } }, "from2": { @@ -5490,8 +5489,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "fs-extra": { @@ -5500,9 +5499,9 @@ "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.2" } }, "fs.realpath": { @@ -5510,535 +5509,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, "function-name-support": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/function-name-support/-/function-name-support-0.2.0.tgz", @@ -6056,8 +5526,8 @@ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", "requires": { - "axios": "^0.18.0", - "extend": "^3.0.1", + "axios": "0.18.0", + "extend": "3.0.1", "retry-axios": "0.3.2" } }, @@ -6067,11 +5537,11 @@ "integrity": "sha1-fymz7iPc7EFwNnwHEUGCScZgVF8=", "dev": true, "requires": { - "configstore": "^3.1.2", - "google-auto-auth": "^0.10.0", - "pumpify": "^1.4.0", - "request": "^2.85.0", - "stream-events": "^1.0.3" + "configstore": "3.1.2", + "google-auto-auth": "0.10.1", + "pumpify": "1.5.1", + "request": "2.87.0", + "stream-events": "1.0.4" } }, "get-caller-file": { @@ -6108,7 +5578,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "glob": { @@ -6116,12 +5586,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-base": { @@ -6130,8 +5600,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" + "glob-parent": "2.0.0", + "is-glob": "2.0.1" }, "dependencies": { "glob-parent": { @@ -6140,7 +5610,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "is-extglob": { @@ -6155,7 +5625,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -6165,8 +5635,8 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "3.1.0", + "path-dirname": "1.0.2" }, "dependencies": { "is-glob": { @@ -6174,7 +5644,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "2.1.1" } } } @@ -6190,7 +5660,7 @@ "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, "requires": { - "ini": "^1.3.4" + "ini": "1.3.5" } }, "globals": { @@ -6204,13 +5674,13 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "fast-glob": "2.2.2", + "glob": "7.1.2", + "ignore": "3.3.10", + "pify": "3.0.0", + "slash": "1.0.0" } }, "google-auth-library": { @@ -6218,13 +5688,13 @@ "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz", "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==", "requires": { - "axios": "^0.18.0", - "gcp-metadata": "^0.6.3", - "gtoken": "^2.3.0", - "jws": "^3.1.5", - "lodash.isstring": "^4.0.1", - "lru-cache": "^4.1.3", - "retry-axios": "^0.3.2" + "axios": "0.18.0", + "gcp-metadata": "0.6.3", + "gtoken": "2.3.0", + "jws": "3.1.5", + "lodash.isstring": "4.0.1", + "lru-cache": "4.1.3", + "retry-axios": "0.3.2" } }, "google-auto-auth": { @@ -6233,10 +5703,10 @@ "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "dev": true, "requires": { - "async": "^2.3.0", - "gcp-metadata": "^0.6.1", - "google-auth-library": "^1.3.1", - "request": "^2.79.0" + "async": "2.6.1", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.6.1", + "request": "2.87.0" } }, "google-gax": { @@ -6244,17 +5714,17 @@ "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.17.1.tgz", "integrity": "sha512-fAKvFx++SRr6bGWamWuVOkJzJnQqMgpJkhaB2oEwfFJ91rbFgEmIPRmZZ/MeIVVFUOuHUVyZ8nwjm5peyTZJ6g==", "requires": { - "duplexify": "^3.6.0", - "extend": "^3.0.1", - "globby": "^8.0.1", - "google-auth-library": "^1.6.1", - "google-proto-files": "^0.16.0", - "grpc": "^1.12.2", - "is-stream-ended": "^0.1.4", - "lodash": "^4.17.10", - "protobufjs": "^6.8.6", - "retry-request": "^4.0.0", - "through2": "^2.0.3" + "duplexify": "3.6.0", + "extend": "3.0.1", + "globby": "8.0.1", + "google-auth-library": "1.6.1", + "google-proto-files": "0.16.1", + "grpc": "1.12.4", + "is-stream-ended": "0.1.4", + "lodash": "4.17.10", + "protobufjs": "6.8.6", + "retry-request": "4.0.0", + "through2": "2.0.3" } }, "google-p12-pem": { @@ -6262,8 +5732,8 @@ "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", "requires": { - "node-forge": "^0.7.4", - "pify": "^3.0.0" + "node-forge": "0.7.5", + "pify": "3.0.0" } }, "google-proto-files": { @@ -6271,9 +5741,9 @@ "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", "requires": { - "globby": "^8.0.0", - "power-assert": "^1.4.4", - "protobufjs": "^6.8.0" + "globby": "8.0.1", + "power-assert": "1.6.0", + "protobufjs": "6.8.6" } }, "got": { @@ -6282,23 +5752,23 @@ "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", "dev": true, "requires": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" + "@sindresorhus/is": "0.7.0", + "cacheable-request": "2.1.4", + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "into-stream": "3.1.0", + "is-retry-allowed": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "mimic-response": "1.0.0", + "p-cancelable": "0.3.0", + "p-timeout": "2.0.1", + "pify": "3.0.0", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "url-parse-lax": "3.0.0", + "url-to-options": "1.0.1" }, "dependencies": { "prepend-http": { @@ -6313,7 +5783,7 @@ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "^2.0.0" + "prepend-http": "2.0.0" } } } @@ -6335,10 +5805,10 @@ "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", "requires": { - "lodash": "^4.17.5", - "nan": "^2.0.0", - "node-pre-gyp": "^0.10.0", - "protobufjs": "^5.0.3" + "lodash": "4.17.10", + "nan": "2.10.0", + "node-pre-gyp": "0.10.0", + "protobufjs": "5.0.3" }, "dependencies": { "abbrev": { @@ -6357,8 +5827,8 @@ "version": "1.1.5", "bundled": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "balanced-match": { @@ -6369,7 +5839,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -6416,7 +5886,7 @@ "version": "1.2.5", "bundled": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.3.3" } }, "fs.realpath": { @@ -6427,26 +5897,26 @@ "version": "2.7.4", "bundled": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.3" } }, "glob": { "version": "7.1.2", "bundled": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "has-unicode": { @@ -6457,22 +5927,22 @@ "version": "0.4.23", "bundled": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": "2.1.2" } }, "ignore-walk": { "version": "3.0.1", "bundled": true, "requires": { - "minimatch": "^3.0.4" + "minimatch": "3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -6487,7 +5957,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "isarray": { @@ -6498,7 +5968,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -6509,15 +5979,15 @@ "version": "2.3.3", "bundled": true, "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "safe-buffer": "5.1.2", + "yallist": "3.0.2" } }, "minizlib": { "version": "1.1.0", "bundled": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.3.3" } }, "mkdirp": { @@ -6541,33 +6011,33 @@ "version": "2.2.1", "bundled": true, "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" + "debug": "2.6.9", + "iconv-lite": "0.4.23", + "sax": "1.2.4" } }, "node-pre-gyp": { "version": "0.10.0", "bundled": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.1", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.8", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.4" } }, "nopt": { "version": "4.0.1", "bundled": true, "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "abbrev": "1.1.1", + "osenv": "0.1.5" } }, "npm-bundled": { @@ -6578,18 +6048,18 @@ "version": "1.1.10", "bundled": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { "version": "4.1.2", "bundled": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.5", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "number-is-nan": { @@ -6604,7 +6074,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "os-homedir": { @@ -6619,8 +6089,8 @@ "version": "0.1.5", "bundled": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "path-is-absolute": { @@ -6636,40 +6106,40 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" + "ascli": "1.0.1", + "bytebuffer": "5.0.1", + "glob": "7.1.2", + "yargs": "3.32.0" } }, "rc": { "version": "1.2.8", "bundled": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.6.0", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" } }, "readable-stream": { "version": "2.3.6", "bundled": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "rimraf": { "version": "2.6.2", "bundled": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "safe-buffer": { @@ -6696,27 +6166,27 @@ "version": "3.0.2", "bundled": true }, - "string-width": { - "version": "1.0.2", + "string_decoder": { + "version": "1.1.1", "bundled": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "safe-buffer": "5.1.2" } }, - "string_decoder": { - "version": "1.1.1", + "string-width": { + "version": "1.0.2", "bundled": true, "requires": { - "safe-buffer": "~5.1.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-json-comments": { @@ -6727,13 +6197,13 @@ "version": "4.4.4", "bundled": true, "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.3", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.3.3", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.2", + "yallist": "3.0.2" } }, "util-deprecate": { @@ -6744,7 +6214,7 @@ "version": "1.1.3", "bundled": true, "requires": { - "string-width": "^1.0.2 || 2" + "string-width": "1.0.2" } }, "wrappy": { @@ -6762,11 +6232,11 @@ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", "requires": { - "axios": "^0.18.0", - "google-p12-pem": "^1.0.0", - "jws": "^3.1.4", - "mime": "^2.2.0", - "pify": "^3.0.0" + "axios": "0.18.0", + "google-p12-pem": "1.0.2", + "jws": "3.1.5", + "mime": "2.3.1", + "pify": "3.0.0" } }, "handlebars": { @@ -6775,10 +6245,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "async": { @@ -6793,7 +6263,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -6808,8 +6278,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" + "ajv": "5.5.2", + "har-schema": "2.0.0" } }, "has-ansi": { @@ -6818,7 +6288,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-color": { @@ -6845,7 +6315,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "^1.4.1" + "has-symbol-support-x": "1.4.2" } }, "has-value": { @@ -6853,9 +6323,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" } }, "has-values": { @@ -6863,8 +6333,8 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "kind-of": { @@ -6872,7 +6342,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -6889,7 +6359,7 @@ "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", "dev": true, "requires": { - "through2": "^2.0.0" + "through2": "2.0.3" } }, "he": { @@ -6904,8 +6374,8 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "hosted-git-info": { @@ -6920,12 +6390,12 @@ "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "dev": true, "requires": { - "domelementtype": "^1.3.0", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" + "domelementtype": "1.3.0", + "domhandler": "2.4.2", + "domutils": "1.7.0", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "http-cache-semantics": { @@ -6939,9 +6409,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.2" } }, "hullabaloo-config-manager": { @@ -6950,20 +6420,20 @@ "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", "dev": true, "requires": { - "dot-prop": "^4.1.0", - "es6-error": "^4.0.2", - "graceful-fs": "^4.1.11", - "indent-string": "^3.1.0", - "json5": "^0.5.1", - "lodash.clonedeep": "^4.5.0", - "lodash.clonedeepwith": "^4.5.0", - "lodash.isequal": "^4.5.0", - "lodash.merge": "^4.6.0", - "md5-hex": "^2.0.0", - "package-hash": "^2.0.0", - "pkg-dir": "^2.0.0", - "resolve-from": "^3.0.0", - "safe-buffer": "^5.0.1" + "dot-prop": "4.2.0", + "es6-error": "4.1.1", + "graceful-fs": "4.1.11", + "indent-string": "3.2.0", + "json5": "0.5.1", + "lodash.clonedeep": "4.5.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.isequal": "4.5.0", + "lodash.merge": "4.6.1", + "md5-hex": "2.0.0", + "package-hash": "2.0.0", + "pkg-dir": "2.0.0", + "resolve-from": "3.0.0", + "safe-buffer": "5.1.2" } }, "iconv-lite": { @@ -6972,7 +6442,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": "2.1.2" } }, "ignore": { @@ -6998,8 +6468,8 @@ "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", "dev": true, "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" } }, "imurmurhash": { @@ -7024,8 +6494,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -7041,11 +6511,10 @@ }, "ink-docstrap": { "version": "git+https://github.com/docstrap/docstrap.git#1e56828b819bcbc9855543bd20809a0aed415a80", - "from": "git+https://github.com/docstrap/docstrap.git", "dev": true, "requires": { - "moment": "^2.14.1", - "sanitize-html": "^1.13.0" + "moment": "2.22.2", + "sanitize-html": "1.18.2" } }, "inquirer": { @@ -7054,20 +6523,20 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.2.0", + "figures": "2.0.0", + "lodash": "4.17.10", "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" }, "dependencies": { "ansi-regex": { @@ -7088,8 +6557,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -7098,7 +6567,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -7109,7 +6578,7 @@ "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", "dev": true, "requires": { - "espower-loader": "^1.0.0" + "espower-loader": "1.2.2" } }, "into-stream": { @@ -7118,8 +6587,8 @@ "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" + "from2": "2.3.0", + "p-is-promise": "1.1.0" } }, "invariant": { @@ -7128,7 +6597,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.3.1" } }, "invert-kv": { @@ -7152,7 +6621,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -7160,7 +6629,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -7177,7 +6646,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -7191,7 +6660,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-ci": { @@ -7200,7 +6669,7 @@ "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "^1.0.0" + "ci-info": "1.1.3" } }, "is-data-descriptor": { @@ -7208,7 +6677,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -7216,7 +6685,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -7226,9 +6695,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { @@ -7250,7 +6719,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-primitive": "2.0.0" } }, "is-error": { @@ -7275,7 +6744,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -7283,7 +6752,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-generator-fn": { @@ -7297,7 +6766,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } }, "is-installed-globally": { @@ -7306,8 +6775,8 @@ "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" } }, "is-npm": { @@ -7321,7 +6790,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -7329,7 +6798,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -7351,7 +6820,7 @@ "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "^1.1.0" + "symbol-observable": "1.2.0" } }, "is-odd": { @@ -7359,7 +6828,7 @@ "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "requires": { - "is-number": "^4.0.0" + "is-number": "4.0.0" }, "dependencies": { "is-number": { @@ -7381,7 +6850,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { @@ -7390,7 +6859,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "1.0.2" } }, "is-plain-obj": { @@ -7404,7 +6873,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "is-posix-bracket": { @@ -7514,8 +6983,8 @@ "@babel/template": "7.0.0-beta.49", "@babel/traverse": "7.0.0-beta.49", "@babel/types": "7.0.0-beta.49", - "istanbul-lib-coverage": "^2.0.0", - "semver": "^5.5.0" + "istanbul-lib-coverage": "2.0.0", + "semver": "5.5.0" } }, "isurl": { @@ -7524,8 +6993,8 @@ "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" + "has-to-string-tag-x": "1.4.1", + "is-object": "1.0.1" } }, "jest-docblock": { @@ -7552,8 +7021,8 @@ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "1.0.10", + "esprima": "4.0.0" } }, "js2xmlparser": { @@ -7562,7 +7031,7 @@ "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", "dev": true, "requires": { - "xmlcreate": "^1.0.1" + "xmlcreate": "1.0.2" } }, "jsbn": { @@ -7578,17 +7047,17 @@ "dev": true, "requires": { "babylon": "7.0.0-beta.19", - "bluebird": "~3.5.0", - "catharsis": "~0.8.9", - "escape-string-regexp": "~1.0.5", - "js2xmlparser": "~3.0.0", - "klaw": "~2.0.0", - "marked": "~0.3.6", - "mkdirp": "~0.5.1", - "requizzle": "~0.2.1", - "strip-json-comments": "~2.0.1", + "bluebird": "3.5.1", + "catharsis": "0.8.9", + "escape-string-regexp": "1.0.5", + "js2xmlparser": "3.0.0", + "klaw": "2.0.0", + "marked": "0.3.19", + "mkdirp": "0.5.1", + "requizzle": "0.2.1", + "strip-json-comments": "2.0.1", "taffydb": "2.6.2", - "underscore": "~1.8.3" + "underscore": "1.8.3" }, "dependencies": { "babylon": { @@ -7650,7 +7119,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "4.1.11" } }, "jsprim": { @@ -7677,7 +7146,7 @@ "requires": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "jws": { @@ -7685,8 +7154,8 @@ "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", "requires": { - "jwa": "^1.1.5", - "safe-buffer": "^5.0.1" + "jwa": "1.1.6", + "safe-buffer": "5.1.2" } }, "keyv": { @@ -7709,7 +7178,7 @@ "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", "dev": true, "requires": { - "graceful-fs": "^4.1.9" + "graceful-fs": "4.1.11" } }, "last-line-stream": { @@ -7718,7 +7187,7 @@ "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", "dev": true, "requires": { - "through2": "^2.0.0" + "through2": "2.0.3" } }, "latest-version": { @@ -7727,7 +7196,7 @@ "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "^4.0.0" + "package-json": "4.0.1" } }, "lazy-cache": { @@ -7742,7 +7211,7 @@ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "levn": { @@ -7751,8 +7220,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "1.1.2", + "type-check": "0.3.2" } }, "load-json-file": { @@ -7761,10 +7230,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" }, "dependencies": { "pify": { @@ -7781,8 +7250,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" } }, "lodash": { @@ -7907,7 +7376,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "3.0.2" } }, "loud-rejection": { @@ -7916,8 +7385,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" } }, "lowercase-keys": { @@ -7931,8 +7400,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "make-dir": { @@ -7941,7 +7410,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "map-cache": { @@ -7959,7 +7428,7 @@ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "object-visit": "^1.0.0" + "object-visit": "1.0.1" } }, "marked": { @@ -7974,7 +7443,7 @@ "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", "dev": true, "requires": { - "escape-string-regexp": "^1.0.4" + "escape-string-regexp": "1.0.5" } }, "math-random": { @@ -7989,7 +7458,7 @@ "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "md5-o-matic": { @@ -8004,7 +7473,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "meow": { @@ -8013,16 +7482,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" }, "dependencies": { "find-up": { @@ -8031,8 +7500,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } }, "load-json-file": { @@ -8041,11 +7510,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "map-obj": { @@ -8066,7 +7535,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } }, "path-type": { @@ -8075,9 +7544,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -8098,7 +7567,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "read-pkg": { @@ -8107,9 +7576,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -8118,8 +7587,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" } }, "strip-bom": { @@ -8128,7 +7597,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } } } @@ -8145,7 +7614,7 @@ "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "4.2.0" } }, "merge2": { @@ -8170,19 +7639,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "mime": { @@ -8200,7 +7669,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "mime-db": "~1.33.0" + "mime-db": "1.33.0" } }, "mimic-fn": { @@ -8220,7 +7689,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -8234,8 +7703,8 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -8243,7 +7712,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -8305,7 +7774,7 @@ "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", "dev": true, "requires": { - "source-map": "^0.1.34" + "source-map": "0.1.43" }, "dependencies": { "source-map": { @@ -8314,7 +7783,7 @@ "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -8325,10 +7794,10 @@ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "dev": true, "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" } }, "mute-stream": { @@ -8347,18 +7816,18 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "natural-compare": { @@ -8379,11 +7848,11 @@ "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", - "lolex": "^2.3.2", - "path-to-regexp": "^1.7.0", - "text-encoding": "^0.6.4" + "@sinonjs/formatio": "2.0.0", + "just-extend": "1.1.27", + "lolex": "2.7.0", + "path-to-regexp": "1.7.0", + "text-encoding": "0.6.4" } }, "node-forge": { @@ -8397,10 +7866,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -8409,7 +7878,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } }, "normalize-url": { @@ -8418,9 +7887,9 @@ "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" + "prepend-http": "2.0.0", + "query-string": "5.1.1", + "sort-keys": "2.0.0" }, "dependencies": { "prepend-http": { @@ -8437,7 +7906,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -8451,33 +7920,33 @@ "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", "dev": true, "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^2.1.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.5", - "istanbul-reports": "^1.4.1", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.1", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "2.2.0", + "istanbul-lib-report": "1.1.3", + "istanbul-lib-source-maps": "1.2.5", + "istanbul-reports": "1.4.1", + "md5-hex": "1.3.0", + "merge-source-map": "1.1.0", + "micromatch": "3.1.10", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "spawn-wrap": "1.4.2", + "test-exclude": "4.2.1", "yargs": "11.1.0", - "yargs-parser": "^8.0.0" + "yargs-parser": "8.1.0" }, "dependencies": { "align-text": { @@ -8485,9 +7954,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" } }, "amdefine": { @@ -8505,7 +7974,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "^1.0.0" + "default-require-extensions": "1.0.0" } }, "archy": { @@ -8563,13 +8032,13 @@ "bundled": true, "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" }, "dependencies": { "define-property": { @@ -8577,7 +8046,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -8585,7 +8054,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -8593,7 +8062,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -8601,9 +8070,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "kind-of": { @@ -8618,7 +8087,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -8627,16 +8096,16 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -8644,7 +8113,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -8659,15 +8128,15 @@ "bundled": true, "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" } }, "caching-transform": { @@ -8675,9 +8144,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" } }, "camelcase": { @@ -8692,8 +8161,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "class-utils": { @@ -8701,10 +8170,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" }, "dependencies": { "define-property": { @@ -8712,7 +8181,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -8723,8 +8192,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" }, "dependencies": { @@ -8746,8 +8215,8 @@ "bundled": true, "dev": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "map-visit": "1.0.0", + "object-visit": "1.0.1" } }, "commondir": { @@ -8780,8 +8249,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "which": "1.3.1" } }, "debug": { @@ -8812,7 +8281,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "2.0.0" } }, "define-property": { @@ -8820,8 +8289,8 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -8829,7 +8298,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -8837,7 +8306,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -8845,9 +8314,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "kind-of": { @@ -8862,7 +8331,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "execa": { @@ -8870,13 +8339,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" }, "dependencies": { "cross-spawn": { @@ -8884,9 +8353,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" } } } @@ -8896,13 +8365,13 @@ "bundled": true, "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "debug": { @@ -8918,7 +8387,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -8926,7 +8395,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -8936,8 +8405,8 @@ "bundled": true, "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -8945,7 +8414,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -8955,14 +8424,14 @@ "bundled": true, "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -8970,7 +8439,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -8978,7 +8447,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -8986,7 +8455,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -8994,7 +8463,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -9002,9 +8471,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "kind-of": { @@ -9019,10 +8488,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -9030,7 +8499,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -9040,9 +8509,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" } }, "find-up": { @@ -9050,7 +8519,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "for-in": { @@ -9063,8 +8532,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" } }, "fragment-cache": { @@ -9072,7 +8541,7 @@ "bundled": true, "dev": true, "requires": { - "map-cache": "^0.2.2" + "map-cache": "0.2.2" } }, "fs.realpath": { @@ -9100,12 +8569,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "graceful-fs": { @@ -9118,10 +8587,10 @@ "bundled": true, "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "source-map": { @@ -9129,7 +8598,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -9139,9 +8608,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" } }, "has-values": { @@ -9149,8 +8618,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "kind-of": { @@ -9158,7 +8627,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -9178,8 +8647,8 @@ "bundled": true, "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -9197,7 +8666,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-arrayish": { @@ -9215,7 +8684,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-data-descriptor": { @@ -9223,7 +8692,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-descriptor": { @@ -9231,9 +8700,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { @@ -9258,7 +8727,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-odd": { @@ -9266,7 +8735,7 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^4.0.0" + "is-number": "4.0.0" }, "dependencies": { "is-number": { @@ -9281,7 +8750,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "is-stream": { @@ -9324,7 +8793,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "^0.4.0" + "append-transform": "0.4.0" } }, "istanbul-lib-report": { @@ -9332,10 +8801,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" }, "dependencies": { "has-flag": { @@ -9348,7 +8817,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "^1.0.0" + "has-flag": "1.0.0" } } } @@ -9358,11 +8827,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" } }, "istanbul-reports": { @@ -9370,7 +8839,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "^4.0.3" + "handlebars": "4.0.11" } }, "kind-of": { @@ -9378,7 +8847,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "lazy-cache": { @@ -9392,7 +8861,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "load-json-file": { @@ -9400,11 +8869,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "locate-path": { @@ -9412,8 +8881,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" }, "dependencies": { "path-exists": { @@ -9433,8 +8902,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "map-cache": { @@ -9447,7 +8916,7 @@ "bundled": true, "dev": true, "requires": { - "object-visit": "^1.0.0" + "object-visit": "1.0.1" } }, "md5-hex": { @@ -9455,7 +8924,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "md5-o-matic": { @@ -9468,7 +8937,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "merge-source-map": { @@ -9476,7 +8945,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "^0.6.1" + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -9491,19 +8960,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "kind-of": { @@ -9523,7 +8992,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -9536,8 +9005,8 @@ "bundled": true, "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -9545,7 +9014,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -9568,18 +9037,18 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "kind-of": { @@ -9594,10 +9063,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "npm-run-path": { @@ -9605,7 +9074,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -9623,9 +9092,9 @@ "bundled": true, "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { "define-property": { @@ -9633,7 +9102,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -9643,7 +9112,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "^3.0.0" + "isobject": "3.0.1" } }, "object.pick": { @@ -9651,7 +9120,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "once": { @@ -9659,7 +9128,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "optimist": { @@ -9667,8 +9136,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.8", + "wordwrap": "0.0.3" } }, "os-homedir": { @@ -9681,9 +9150,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "p-finally": { @@ -9696,7 +9165,7 @@ "bundled": true, "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "1.0.0" } }, "p-locate": { @@ -9704,7 +9173,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.2.0" } }, "p-try": { @@ -9717,7 +9186,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.1" } }, "pascalcase": { @@ -9730,7 +9199,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } }, "path-is-absolute": { @@ -9753,9 +9222,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -9773,7 +9242,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-dir": { @@ -9781,7 +9250,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0" + "find-up": "1.1.2" }, "dependencies": { "find-up": { @@ -9789,8 +9258,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } } } @@ -9810,9 +9279,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -9820,8 +9289,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" }, "dependencies": { "find-up": { @@ -9829,8 +9298,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } } } @@ -9840,8 +9309,8 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "repeat-element": { @@ -9885,7 +9354,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "rimraf": { @@ -9893,7 +9362,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "safe-regex": { @@ -9901,7 +9370,7 @@ "bundled": true, "dev": true, "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "semver": { @@ -9919,10 +9388,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { "extend-shallow": { @@ -9930,7 +9399,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -9940,7 +9409,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -9963,14 +9432,14 @@ "bundled": true, "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" }, "dependencies": { "debug": { @@ -9986,7 +9455,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -9994,7 +9463,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -10004,9 +9473,9 @@ "bundled": true, "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { "define-property": { @@ -10014,7 +9483,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -10022,7 +9491,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -10030,7 +9499,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -10038,9 +9507,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "kind-of": { @@ -10055,7 +9524,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.2.0" + "kind-of": "3.2.2" } }, "source-map": { @@ -10068,11 +9537,11 @@ "bundled": true, "dev": true, "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, "source-map-url": { @@ -10085,12 +9554,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.1" } }, "spdx-correct": { @@ -10098,8 +9567,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, "spdx-exceptions": { @@ -10112,8 +9581,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, "spdx-license-ids": { @@ -10126,7 +9595,7 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^3.0.0" + "extend-shallow": "3.0.2" } }, "static-extend": { @@ -10134,8 +9603,8 @@ "bundled": true, "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -10143,7 +9612,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -10153,8 +9622,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -10162,7 +9631,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "strip-bom": { @@ -10170,7 +9639,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, "strip-eof": { @@ -10183,11 +9652,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" + "arrify": "1.0.1", + "micromatch": "3.1.10", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" } }, "to-object-path": { @@ -10195,7 +9664,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "to-regex": { @@ -10203,10 +9672,10 @@ "bundled": true, "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -10214,8 +9683,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "3.0.0", + "repeat-string": "1.6.1" } }, "uglify-js": { @@ -10224,9 +9693,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" }, "dependencies": { "yargs": { @@ -10235,9 +9704,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } } @@ -10254,10 +9723,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { "extend-shallow": { @@ -10265,7 +9734,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "set-value": { @@ -10273,10 +9742,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } @@ -10286,8 +9755,8 @@ "bundled": true, "dev": true, "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { "has-value": { @@ -10295,9 +9764,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { "isobject": { @@ -10327,7 +9796,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" }, "dependencies": { "kind-of": { @@ -10342,8 +9811,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "which": { @@ -10351,7 +9820,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -10375,8 +9844,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "ansi-regex": { @@ -10389,7 +9858,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "string-width": { @@ -10397,9 +9866,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "strip-ansi": { @@ -10407,7 +9876,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } } } @@ -10422,9 +9891,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } }, "y18n": { @@ -10442,18 +9911,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" }, "dependencies": { "camelcase": { @@ -10466,9 +9935,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" } }, "yargs-parser": { @@ -10476,7 +9945,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" } } } @@ -10486,7 +9955,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { @@ -10514,9 +9983,9 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { "define-property": { @@ -10524,7 +9993,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "kind-of": { @@ -10532,7 +10001,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -10547,7 +10016,7 @@ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "isobject": "^3.0.0" + "isobject": "3.0.1" } }, "object.omit": { @@ -10556,8 +10025,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, "object.pick": { @@ -10565,7 +10034,7 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "observable-to-promise": { @@ -10574,8 +10043,8 @@ "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", "dev": true, "requires": { - "is-observable": "^0.2.0", - "symbol-observable": "^1.0.4" + "is-observable": "0.2.0", + "symbol-observable": "1.2.0" }, "dependencies": { "is-observable": { @@ -10584,7 +10053,7 @@ "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", "dev": true, "requires": { - "symbol-observable": "^0.2.2" + "symbol-observable": "0.2.4" }, "dependencies": { "symbol-observable": { @@ -10602,7 +10071,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "onetime": { @@ -10611,7 +10080,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "optimist": { @@ -10620,8 +10089,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.8", + "wordwrap": "0.0.3" } }, "option-chain": { @@ -10636,12 +10105,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" }, "dependencies": { "wordwrap": { @@ -10668,7 +10137,7 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "^1.0.0" + "lcid": "1.0.0" } }, "os-tmpdir": { @@ -10707,7 +10176,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "1.0.0" } }, "p-locate": { @@ -10716,7 +10185,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.3.0" } }, "p-timeout": { @@ -10725,7 +10194,7 @@ "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { - "p-finally": "^1.0.0" + "p-finally": "1.0.0" } }, "p-try": { @@ -10740,10 +10209,10 @@ "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "lodash.flattendeep": "^4.4.0", - "md5-hex": "^2.0.0", - "release-zalgo": "^1.0.0" + "graceful-fs": "4.1.11", + "lodash.flattendeep": "4.4.0", + "md5-hex": "2.0.0", + "release-zalgo": "1.0.0" } }, "package-json": { @@ -10752,10 +10221,10 @@ "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" + "got": "6.7.1", + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0", + "semver": "5.5.0" }, "dependencies": { "got": { @@ -10764,17 +10233,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.1", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" } } } @@ -10785,10 +10254,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" }, "dependencies": { "is-extglob": { @@ -10803,7 +10272,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -10814,7 +10283,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.2" } }, "parse-ms": { @@ -10884,7 +10353,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "performance-now": { @@ -10909,7 +10378,7 @@ "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", "dev": true, "requires": { - "pinkie": "^1.0.0" + "pinkie": "1.0.0" } }, "pkg-conf": { @@ -10918,8 +10387,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" + "find-up": "2.1.0", + "load-json-file": "4.0.0" }, "dependencies": { "load-json-file": { @@ -10928,10 +10397,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" } }, "parse-json": { @@ -10940,8 +10409,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "1.3.2", + "json-parse-better-errors": "1.0.2" } } } @@ -10952,7 +10421,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "^2.1.0" + "find-up": "2.1.0" } }, "plur": { @@ -10961,7 +10430,7 @@ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "dev": true, "requires": { - "irregular-plurals": "^1.0.0" + "irregular-plurals": "1.4.0" } }, "pluralize": { @@ -10981,9 +10450,9 @@ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "chalk": "2.4.1", + "source-map": "0.6.1", + "supports-color": "5.4.0" }, "dependencies": { "source-map": { @@ -10999,11 +10468,11 @@ "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.0.tgz", "integrity": "sha512-nDb6a+p2C7Wj8Y2zmFtLpuv+xobXz4+bzT5s7dr0nn71tLozn7nRMQqzwbefzwZN5qOm0N7Cxhw4kXP75xboKA==", "requires": { - "define-properties": "^1.1.2", - "empower": "^1.3.0", - "power-assert-formatter": "^1.4.1", - "universal-deep-strict-equal": "^1.2.1", - "xtend": "^4.0.0" + "define-properties": "1.1.2", + "empower": "1.3.0", + "power-assert-formatter": "1.4.1", + "universal-deep-strict-equal": "1.2.2", + "xtend": "4.0.1" } }, "power-assert-context-formatter": { @@ -11011,8 +10480,8 @@ "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", "requires": { - "core-js": "^2.0.0", - "power-assert-context-traversal": "^1.2.0" + "core-js": "2.5.7", + "power-assert-context-traversal": "1.2.0" } }, "power-assert-context-reducer-ast": { @@ -11020,11 +10489,11 @@ "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", "requires": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.12", - "core-js": "^2.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.2.0" + "acorn": "5.7.1", + "acorn-es7-plugin": "1.1.7", + "core-js": "2.5.7", + "espurify": "1.8.0", + "estraverse": "4.2.0" } }, "power-assert-context-traversal": { @@ -11032,8 +10501,8 @@ "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", "requires": { - "core-js": "^2.0.0", - "estraverse": "^4.1.0" + "core-js": "2.5.7", + "estraverse": "4.2.0" } }, "power-assert-formatter": { @@ -11041,13 +10510,13 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "^2.0.0", - "power-assert-context-formatter": "^1.0.7", - "power-assert-context-reducer-ast": "^1.0.7", - "power-assert-renderer-assertion": "^1.0.7", - "power-assert-renderer-comparison": "^1.0.7", - "power-assert-renderer-diagram": "^1.0.7", - "power-assert-renderer-file": "^1.0.7" + "core-js": "2.5.7", + "power-assert-context-formatter": "1.2.0", + "power-assert-context-reducer-ast": "1.2.0", + "power-assert-renderer-assertion": "1.2.0", + "power-assert-renderer-comparison": "1.2.0", + "power-assert-renderer-diagram": "1.2.0", + "power-assert-renderer-file": "1.2.0" } }, "power-assert-renderer-assertion": { @@ -11055,8 +10524,8 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", "requires": { - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0" + "power-assert-renderer-base": "1.1.1", + "power-assert-util-string-width": "1.2.0" } }, "power-assert-renderer-base": { @@ -11069,11 +10538,11 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", "requires": { - "core-js": "^2.0.0", - "diff-match-patch": "^1.0.0", - "power-assert-renderer-base": "^1.1.1", - "stringifier": "^1.3.0", - "type-name": "^2.0.1" + "core-js": "2.5.7", + "diff-match-patch": "1.0.1", + "power-assert-renderer-base": "1.1.1", + "stringifier": "1.3.0", + "type-name": "2.0.2" } }, "power-assert-renderer-diagram": { @@ -11081,10 +10550,10 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", "requires": { - "core-js": "^2.0.0", - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0", - "stringifier": "^1.3.0" + "core-js": "2.5.7", + "power-assert-renderer-base": "1.1.1", + "power-assert-util-string-width": "1.2.0", + "stringifier": "1.3.0" } }, "power-assert-renderer-file": { @@ -11092,7 +10561,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", "requires": { - "power-assert-renderer-base": "^1.1.1" + "power-assert-renderer-base": "1.1.1" } }, "power-assert-util-string-width": { @@ -11100,7 +10569,7 @@ "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", "requires": { - "eastasianwidth": "^0.2.0" + "eastasianwidth": "0.2.0" } }, "prelude-ls": { @@ -11133,7 +10602,7 @@ "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", "dev": true, "requires": { - "parse-ms": "^1.0.0" + "parse-ms": "1.0.1" }, "dependencies": { "parse-ms": { @@ -11172,19 +10641,19 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^3.0.32", - "@types/node": "^8.9.4", - "long": "^4.0.0" + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/base64": "1.1.2", + "@protobufjs/codegen": "2.0.4", + "@protobufjs/eventemitter": "1.1.0", + "@protobufjs/fetch": "1.1.0", + "@protobufjs/float": "1.0.2", + "@protobufjs/inquire": "1.1.0", + "@protobufjs/path": "1.1.2", + "@protobufjs/pool": "1.1.0", + "@protobufjs/utf8": "1.1.0", + "@types/long": "3.0.32", + "@types/node": "8.10.20", + "long": "4.0.0" }, "dependencies": { "@types/node": { @@ -11200,9 +10669,9 @@ "integrity": "sha512-fQr3VQrbdzHrdaDn3XuisVoJlJNDJizHAvUXw9IuXRR8BpV2x0N7LsCxrpJkeKfPbNjiNU/V5vc008cI0TmzzQ==", "dev": true, "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.0", - "resolve": "~1.5.0" + "fill-keys": "1.0.2", + "module-not-found-error": "1.0.1", + "resolve": "1.5.0" }, "dependencies": { "resolve": { @@ -11211,7 +10680,7 @@ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } } } @@ -11226,8 +10695,8 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "end-of-stream": "1.4.1", + "once": "1.4.0" } }, "pumpify": { @@ -11235,9 +10704,9 @@ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" + "duplexify": "3.6.0", + "inherits": "2.0.3", + "pump": "2.0.1" } }, "punycode": { @@ -11256,9 +10725,9 @@ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" + "decode-uri-component": "0.2.0", + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" } }, "randomatic": { @@ -11267,9 +10736,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" }, "dependencies": { "is-number": { @@ -11286,10 +10755,10 @@ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.6.0", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" }, "dependencies": { "minimist": { @@ -11306,9 +10775,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" }, "dependencies": { "path-type": { @@ -11317,7 +10786,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "^2.0.0" + "pify": "2.3.0" } }, "pify": { @@ -11334,8 +10803,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "find-up": "2.1.0", + "read-pkg": "2.0.0" } }, "readable-stream": { @@ -11343,13 +10812,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "readdirp": { @@ -11358,10 +10827,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" } }, "redent": { @@ -11370,8 +10839,8 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" }, "dependencies": { "indent-string": { @@ -11380,7 +10849,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } } } @@ -11403,7 +10872,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "is-equal-shallow": "0.1.3" } }, "regex-not": { @@ -11411,8 +10880,8 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "regexpp": { @@ -11427,9 +10896,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" + "regenerate": "1.4.0", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, "registry-auth-token": { @@ -11438,8 +10907,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "rc": "1.2.8", + "safe-buffer": "5.1.2" } }, "registry-url": { @@ -11448,7 +10917,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "^1.0.1" + "rc": "1.2.8" } }, "regjsgen": { @@ -11463,7 +10932,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "~0.5.0" + "jsesc": "0.5.0" } }, "release-zalgo": { @@ -11472,7 +10941,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "^4.0.1" + "es6-error": "4.1.1" } }, "remove-trailing-separator": { @@ -11497,7 +10966,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "request": { @@ -11505,26 +10974,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" + "aws-sign2": "0.7.0", + "aws4": "1.7.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.2", + "safe-buffer": "5.1.2", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" } }, "require-directory": { @@ -11551,8 +11020,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" + "caller-path": "0.1.0", + "resolve-from": "1.0.1" }, "dependencies": { "resolve-from": { @@ -11569,7 +11038,7 @@ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", "dev": true, "requires": { - "underscore": "~1.6.0" + "underscore": "1.6.0" }, "dependencies": { "underscore": { @@ -11592,7 +11061,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "3.0.0" } }, "resolve-from": { @@ -11612,7 +11081,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "^1.0.0" + "lowercase-keys": "1.0.1" } }, "restore-cursor": { @@ -11621,8 +11090,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "onetime": "2.0.1", + "signal-exit": "3.0.2" } }, "ret": { @@ -11640,7 +11109,7 @@ "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", "requires": { - "through2": "^2.0.0" + "through2": "2.0.3" } }, "right-align": { @@ -11650,7 +11119,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "rimraf": { @@ -11659,7 +11128,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "run-async": { @@ -11668,7 +11137,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "^2.1.0" + "is-promise": "2.1.0" } }, "rx-lite": { @@ -11683,7 +11152,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "*" + "rx-lite": "4.0.8" } }, "safe-buffer": { @@ -11696,7 +11165,7 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "safer-buffer": { @@ -11716,16 +11185,16 @@ "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", "dev": true, "requires": { - "chalk": "^2.3.0", - "htmlparser2": "^3.9.0", - "lodash.clonedeep": "^4.5.0", - "lodash.escaperegexp": "^4.1.2", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.mergewith": "^4.6.0", - "postcss": "^6.0.14", - "srcset": "^1.0.0", - "xtend": "^4.0.0" + "chalk": "2.4.1", + "htmlparser2": "3.9.2", + "lodash.clonedeep": "4.5.0", + "lodash.escaperegexp": "4.1.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mergewith": "4.6.1", + "postcss": "6.0.23", + "srcset": "1.0.0", + "xtend": "4.0.1" } }, "semver": { @@ -11740,7 +11209,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "^5.0.3" + "semver": "5.5.0" } }, "serialize-error": { @@ -11766,10 +11235,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { "extend-shallow": { @@ -11777,7 +11246,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -11788,7 +11257,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -11809,13 +11278,13 @@ "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", - "diff": "^3.1.0", - "lodash.get": "^4.4.2", - "lolex": "^2.2.0", - "nise": "^1.2.0", - "supports-color": "^5.1.0", - "type-detect": "^4.0.5" + "@sinonjs/formatio": "2.0.0", + "diff": "3.5.0", + "lodash.get": "4.4.2", + "lolex": "2.7.0", + "nise": "1.4.2", + "supports-color": "5.4.0", + "type-detect": "4.0.8" } }, "slash": { @@ -11829,7 +11298,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0" + "is-fullwidth-code-point": "2.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -11851,8 +11320,8 @@ "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.1.1.tgz", "integrity": "sha512-/7I66rMhAag18IH5o0jtWWCJH/f2cvICwBcSS+SBUxsorbDeBu4UvYDNlAn3MrHfk6re0rUECwaPhsZuV2P9Ng==", "requires": { - "map-obj": "~2.0.0", - "to-snake-case": "~0.1.2" + "map-obj": "2.0.0", + "to-snake-case": "0.1.2" } }, "snakeize": { @@ -11866,14 +11335,14 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" }, "dependencies": { "debug": { @@ -11889,7 +11358,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -11897,7 +11366,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -11907,9 +11376,9 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { "define-property": { @@ -11917,7 +11386,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -11925,7 +11394,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -11933,7 +11402,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -11941,9 +11410,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -11953,7 +11422,7 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "kind-of": "^3.2.0" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -11961,7 +11430,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -11972,7 +11441,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "^1.0.0" + "is-plain-obj": "1.1.0" } }, "source-map": { @@ -11985,11 +11454,11 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, "source-map-support": { @@ -11998,8 +11467,8 @@ "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "buffer-from": "1.1.0", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -12021,8 +11490,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, "spdx-exceptions": { @@ -12037,8 +11506,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, "spdx-license-ids": { @@ -12052,7 +11521,7 @@ "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-2.0.0.tgz", "integrity": "sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg==", "requires": { - "is-stream-ended": "^0.1.4" + "is-stream-ended": "0.1.4" } }, "split-string": { @@ -12060,7 +11529,7 @@ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "extend-shallow": "^3.0.0" + "extend-shallow": "3.0.2" } }, "sprintf-js": { @@ -12075,8 +11544,8 @@ "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", "dev": true, "requires": { - "array-uniq": "^1.0.2", - "number-is-nan": "^1.0.0" + "array-uniq": "1.0.3", + "number-is-nan": "1.0.1" } }, "sshpk": { @@ -12084,15 +11553,15 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "safer-buffer": "2.1.2", + "tweetnacl": "0.14.5" } }, "stack-utils": { @@ -12106,8 +11575,8 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -12115,7 +11584,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -12125,7 +11594,7 @@ "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.4.tgz", "integrity": "sha512-D243NJaYs/xBN2QnoiMDY7IesJFIK7gEhnvAYqJa5JvDdnh2dC4qDBwlCf0ohPpX2QRlA/4gnbnPd3rs3KxVcA==", "requires": { - "stubs": "^3.0.0" + "stubs": "3.0.0" } }, "stream-shift": { @@ -12145,6 +11614,14 @@ "integrity": "sha1-XqIRzZLSKOGEKUmQpsyXs2anfLA=", "dev": true }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, "string-format-obj": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz", @@ -12156,17 +11633,9 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "stringifier": { @@ -12174,9 +11643,9 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "^2.0.0", - "traverse": "^0.6.6", - "type-name": "^2.0.1" + "core-js": "2.5.7", + "traverse": "0.6.6", + "type-name": "2.0.2" } }, "strip-ansi": { @@ -12184,7 +11653,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -12199,7 +11668,7 @@ "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", "dev": true, "requires": { - "is-utf8": "^0.2.1" + "is-utf8": "0.2.1" } }, "strip-eof": { @@ -12214,7 +11683,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "^4.0.1" + "get-stdin": "4.0.1" } }, "strip-json-comments": { @@ -12234,16 +11703,16 @@ "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { - "component-emitter": "^1.2.0", - "cookiejar": "^2.1.0", - "debug": "^3.1.0", - "extend": "^3.0.0", - "form-data": "^2.3.1", - "formidable": "^1.2.0", - "methods": "^1.1.1", - "mime": "^1.4.1", - "qs": "^6.5.1", - "readable-stream": "^2.3.5" + "component-emitter": "1.2.1", + "cookiejar": "2.1.2", + "debug": "3.1.0", + "extend": "3.0.1", + "form-data": "2.3.2", + "formidable": "1.2.1", + "methods": "1.1.2", + "mime": "1.6.0", + "qs": "6.5.2", + "readable-stream": "2.3.6" }, "dependencies": { "mime": { @@ -12260,11 +11729,11 @@ "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", "dev": true, "requires": { - "arrify": "^1.0.1", - "indent-string": "^3.2.0", - "js-yaml": "^3.10.0", - "serialize-error": "^2.1.0", - "strip-ansi": "^4.0.0" + "arrify": "1.0.1", + "indent-string": "3.2.0", + "js-yaml": "3.12.0", + "serialize-error": "2.1.0", + "strip-ansi": "4.0.0" }, "dependencies": { "ansi-regex": { @@ -12279,7 +11748,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -12290,8 +11759,8 @@ "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", "dev": true, "requires": { - "methods": "~1.1.2", - "superagent": "^3.0.0" + "methods": "1.1.2", + "superagent": "3.8.3" } }, "supports-color": { @@ -12300,7 +11769,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" }, "dependencies": { "has-flag": { @@ -12323,12 +11792,12 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.4.1", + "lodash": "4.17.10", "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -12349,8 +11818,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -12359,7 +11828,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -12376,7 +11845,7 @@ "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "execa": "^0.7.0" + "execa": "0.7.0" } }, "text-encoding": { @@ -12402,8 +11871,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" + "readable-stream": "2.3.6", + "xtend": "4.0.1" } }, "time-zone": { @@ -12424,7 +11893,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "os-tmpdir": "1.0.2" } }, "to-fast-properties": { @@ -12443,7 +11912,7 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -12451,7 +11920,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -12461,10 +11930,10 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -12472,8 +11941,8 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "3.0.0", + "repeat-string": "1.6.1" } }, "to-snake-case": { @@ -12497,7 +11966,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "^1.4.1" + "punycode": "1.4.1" } }, "traverse": { @@ -12528,7 +11997,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "tweetnacl": { @@ -12543,7 +12012,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "1.1.2" } }, "type-detect": { @@ -12570,9 +12039,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" }, "dependencies": { "camelcase": { @@ -12589,8 +12058,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" } }, @@ -12615,9 +12084,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } } @@ -12664,10 +12133,10 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { "extend-shallow": { @@ -12675,7 +12144,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "set-value": { @@ -12683,10 +12152,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } @@ -12697,7 +12166,7 @@ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "crypto-random-string": "1.0.0" } }, "unique-temp-dir": { @@ -12706,8 +12175,8 @@ "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", "dev": true, "requires": { - "mkdirp": "^0.5.1", - "os-tmpdir": "^1.0.1", + "mkdirp": "0.5.1", + "os-tmpdir": "1.0.2", "uid2": "0.0.3" } }, @@ -12716,9 +12185,9 @@ "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", "requires": { - "array-filter": "^1.0.0", + "array-filter": "1.0.0", "indexof": "0.0.1", - "object-keys": "^1.0.0" + "object-keys": "1.0.12" } }, "universalify": { @@ -12732,8 +12201,8 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { "has-value": { @@ -12741,9 +12210,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { "isobject": { @@ -12775,16 +12244,16 @@ "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" + "boxen": "1.3.0", + "chalk": "2.4.1", + "configstore": "3.1.2", + "import-lazy": "2.1.0", + "is-ci": "1.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" } }, "urix": { @@ -12798,7 +12267,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "^1.0.1" + "prepend-http": "1.0.4" } }, "url-to-options": { @@ -12818,7 +12287,7 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" } }, "util-deprecate": { @@ -12837,8 +12306,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "verror": { @@ -12846,9 +12315,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "^1.0.0", + "assert-plus": "1.0.0", "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "extsprintf": "1.3.0" } }, "well-known-symbols": { @@ -12863,7 +12332,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -12878,7 +12347,7 @@ "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "^2.1.1" + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -12899,8 +12368,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -12909,7 +12378,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -12930,8 +12399,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" } }, "wrappy": { @@ -12945,7 +12414,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "^0.5.1" + "mkdirp": "0.5.1" } }, "write-file-atomic": { @@ -12954,9 +12423,9 @@ "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" } }, "write-json-file": { @@ -12965,12 +12434,12 @@ "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", "dev": true, "requires": { - "detect-indent": "^5.0.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "pify": "^3.0.0", - "sort-keys": "^2.0.0", - "write-file-atomic": "^2.0.0" + "detect-indent": "5.0.0", + "graceful-fs": "4.1.11", + "make-dir": "1.3.0", + "pify": "3.0.0", + "sort-keys": "2.0.0", + "write-file-atomic": "2.3.0" }, "dependencies": { "detect-indent": { @@ -12987,8 +12456,8 @@ "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", "dev": true, "requires": { - "sort-keys": "^2.0.0", - "write-json-file": "^2.2.0" + "sort-keys": "2.0.0", + "write-json-file": "2.3.0" } }, "xdg-basedir": { @@ -13023,13 +12492,13 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" } }, "yargs-parser": { @@ -13038,7 +12507,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { From d25be038f44e5e3dee0e0a6bf2c295dcc01c1dc7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Jun 2018 07:06:12 -0700 Subject: [PATCH 0174/1029] fix: update linking for samples (#136) --- handwritten/logging/.circleci/config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 6c3cacd8423..08adb028a9f 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -76,7 +76,6 @@ jobs: command: |- mkdir -p /home/node/.npm-global npm install - npm link chmod +x node_modules/@google-cloud/nodejs-repo-tools/bin/tools environment: NPM_CONFIG_PREFIX: /home/node/.npm-global @@ -109,9 +108,8 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm link @google-cloud/logging npm install - cd .. + npm link ../ environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: From f3e994ffcd9a294dd1bc2896b1dad31d4fd29df2 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Mon, 25 Jun 2018 10:14:42 -0700 Subject: [PATCH 0175/1029] Re-generate library using /synth.py (#137) --- handwritten/logging/package-lock.json | 100 ++++++++++++-------------- 1 file changed, 45 insertions(+), 55 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index bc0eebdfb3a..fe8d4435a75 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -2035,9 +2035,9 @@ } }, "@google-cloud/pubsub": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-0.18.0.tgz", - "integrity": "sha512-5on1I+x6jr8/cbqAO6N1GINRA81QlpzdXnonQvTkJrTz5b5FU0f4j7Ea9bdRNV5q/ShsdcIagCAO+0vL2l7thA==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-0.19.0.tgz", + "integrity": "sha512-XhIZSnci5fQ9xnhl/VpwVVMFiOt5uGN6S5QMNHmhZqbki/adlKXAmDOD4fncyusOZFK1WTQY35xTWHwxuso25g==", "dev": true, "requires": { "@google-cloud/common": "0.16.2", @@ -2046,9 +2046,9 @@ "delay": "2.0.0", "duplexify": "3.6.0", "extend": "3.0.1", - "google-auto-auth": "0.9.7", + "google-auto-auth": "0.10.1", "google-gax": "0.16.1", - "google-proto-files": "0.15.1", + "google-proto-files": "0.16.1", "is": "3.2.1", "lodash.chunk": "4.2.0", "lodash.merge": "4.6.1", @@ -2082,18 +2082,20 @@ "stream-events": "1.0.4", "string-format-obj": "1.1.1", "through2": "2.0.3" - } - }, - "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", - "dev": true, - "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.6.1", - "request": "2.87.0" + }, + "dependencies": { + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "dev": true, + "requires": { + "async": "2.6.1", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.6.1", + "request": "2.87.0" + } + } } }, "google-gax": { @@ -2114,43 +2116,31 @@ "through2": "2.0.3" }, "dependencies": { - "google-auto-auth": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", - "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", - "dev": true, - "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.6.1", - "request": "2.87.0" - } - } - } - }, - "google-proto-files": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", - "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", - "dev": true, - "requires": { - "globby": "7.1.1", - "power-assert": "1.6.0", - "protobufjs": "6.8.6" - }, - "dependencies": { - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "google-proto-files": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", + "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", "dev": true, "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.10", - "pify": "3.0.0", - "slash": "1.0.0" + "globby": "7.1.1", + "power-assert": "1.6.0", + "protobufjs": "6.8.6" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.10", + "pify": "3.0.0", + "slash": "1.0.0" + } + } } } } @@ -10591,9 +10581,9 @@ "dev": true }, "prettier": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.5.tgz", - "integrity": "sha512-4M90mfvLz6yRf2Dhzd+xPIE6b4xkI8nHMJhsSm9IlfG17g6wujrrm7+H1X8x52tC4cSNm6HmuhCUSNe6Hd5wfw==", + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.6.tgz", + "integrity": "sha512-p5eqCNiohWZN++7aJXUVj0JgLqHCPLf9GLIcLBHGNWs4Y9FJOPs6+KNO2WT0udJIQJTbeZFrJkjzjcb8fkAYYQ==", "dev": true }, "pretty-ms": { From 65531bc3672bc957898b552bcab303a6221fbe95 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 25 Jun 2018 10:23:17 -0700 Subject: [PATCH 0176/1029] chore(package): update eslint to version 5.0.0 (#134) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d7fd7b79d2d..09b3e3e0215 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -86,7 +86,7 @@ "@google-cloud/storage": "*", "async": "^2.6.1", "codecov": "^3.0.2", - "eslint": "^4.19.1", + "eslint": "^5.0.0", "eslint-config-prettier": "^2.9.0", "eslint-plugin-node": "^6.0.1", "eslint-plugin-prettier": "^2.6.0", From 14e7593b7964d1a6385b21b4a3e03d89e78faa28 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Jun 2018 22:50:19 -0700 Subject: [PATCH 0177/1029] refactor: drop repo-tool as an exec wrapper (#139) --- handwritten/logging/.circleci/config.yml | 1 - handwritten/logging/package.json | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 08adb028a9f..d0b2a499cf7 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -76,7 +76,6 @@ jobs: command: |- mkdir -p /home/node/.npm-global npm install - chmod +x node_modules/@google-cloud/nodejs-repo-tools/bin/tools environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 09b3e3e0215..ddc6fcae175 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,15 +52,15 @@ ], "scripts": { "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", - "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", - "test": "repo-tools test run --cmd npm -- run cover", - "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", - "prettier": "repo-tools exec -- prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", + "test-no-cover": "mocha test/*.js --no-timeouts", + "test": "npm run cover", + "docs": "jsdoc -c .jsdoc.js", + "prettier": "prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", "publish-module": "node ../../scripts/publish.js logging", - "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --timeout 600000", + "system-test": "mocha system-test/*.js --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/" + "lint": "eslint src/ samples/ system-test/ test/" }, "dependencies": { "@google-cloud/common-grpc": "^0.7.1", From 89a777fbf4cdb4776bb4178d5c11b363b8effd6a Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 26 Jun 2018 10:41:37 -0700 Subject: [PATCH 0178/1029] Re-generate library using /synth.py (#140) --- handwritten/logging/package-lock.json | 319 ++++++++++++++---- .../google/logging/type/http_request.proto | 92 +++++ .../google/logging/type/log_severity.proto | 72 ++++ .../protos/google/logging/v2/log_entry.proto | 28 +- .../protos/google/logging/v2/logging.proto | 65 +++- .../google/logging/v2/logging_config.proto | 208 +++++++++++- .../google/logging/v2/logging_metrics.proto | 26 +- .../src/v2/config_service_v2_client.js | 30 +- .../v2/config_service_v2_client_config.json | 23 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 28 +- .../v2/doc/google/logging/v2/doc_logging.js | 13 +- .../google/logging/v2/doc_logging_config.js | 4 +- .../src/v2/logging_service_v2_client.js | 67 ++-- .../v2/logging_service_v2_client_config.json | 21 +- .../v2/metrics_service_v2_client_config.json | 12 +- handwritten/logging/test/gapic-v2.js | 12 +- 16 files changed, 802 insertions(+), 218 deletions(-) create mode 100644 handwritten/logging/protos/google/logging/type/http_request.proto create mode 100644 handwritten/logging/protos/google/logging/type/log_severity.proto diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index fe8d4435a75..db2e5beb511 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -226,7 +226,7 @@ "is": "3.2.1", "stream-events": "1.0.4", "string-format-obj": "1.1.1", - "uuid": "3.2.1" + "uuid": "3.3.0" }, "dependencies": { "@google-cloud/common": { @@ -2055,7 +2055,7 @@ "lodash.snakecase": "4.1.1", "protobufjs": "6.8.6", "through2": "2.0.3", - "uuid": "3.2.1" + "uuid": "3.3.0" }, "dependencies": { "@google-cloud/common": { @@ -2401,7 +2401,7 @@ "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", "requires": { - "@types/node": "10.3.5" + "@types/node": "10.3.6" } }, "@types/form-data": { @@ -2409,7 +2409,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "10.3.5" + "@types/node": "10.3.6" } }, "@types/lodash": { @@ -2423,9 +2423,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "10.3.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.5.tgz", - "integrity": "sha512-6lRwZN0Y3TuglwaaZN2XPocobmzLlhxcqDjKFjNYSsXG/TFAGYkCqkzZh4+ms8iTHHQE6gJXLHPV7TziVGeWhg==" + "version": "10.3.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.6.tgz", + "integrity": "sha512-h7VDRFL8IhdPw1JjiNVvhr+WynfKW09q2BOflIOA0yeuXNeXBP1bIRuBrysSryH4keaJ5bYUNp63aIyQL9YpDQ==" }, "@types/request": { "version": "2.47.1", @@ -2434,7 +2434,7 @@ "requires": { "@types/caseless": "0.12.1", "@types/form-data": "2.2.1", - "@types/node": "10.3.5", + "@types/node": "10.3.6", "@types/tough-cookie": "2.3.3" } }, @@ -2454,20 +2454,12 @@ "integrity": "sha1-8u4fMiipDurRJF+asZIusucdM2s=" }, "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", + "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "3.3.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } + "acorn": "5.7.1" } }, "ajv": { @@ -2482,9 +2474,9 @@ } }, "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true }, "align-text": { @@ -4662,6 +4654,30 @@ "is-arrayish": "0.2.1" } }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.3", + "is-callable": "1.1.3", + "is-regex": "1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" + } + }, "es5-ext": { "version": "0.10.45", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", @@ -4804,21 +4820,20 @@ } }, "eslint": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.0.1.tgz", + "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", "dev": true, "requires": { - "ajv": "5.5.2", + "ajv": "6.5.1", "babel-code-frame": "6.26.0", "chalk": "2.4.1", - "concat-stream": "1.6.2", - "cross-spawn": "5.1.0", + "cross-spawn": "6.0.5", "debug": "3.1.0", "doctrine": "2.1.0", - "eslint-scope": "3.7.1", + "eslint-scope": "4.0.0", "eslint-visitor-keys": "1.0.0", - "espree": "3.5.4", + "espree": "4.0.0", "esquery": "1.0.1", "esutils": "2.0.2", "file-entry-cache": "2.0.0", @@ -4827,7 +4842,7 @@ "globals": "11.7.0", "ignore": "3.3.10", "imurmurhash": "0.1.4", - "inquirer": "3.3.0", + "inquirer": "5.2.0", "is-resolvable": "1.1.0", "js-yaml": "3.12.0", "json-stable-stringify-without-jsonify": "1.0.1", @@ -4843,24 +4858,62 @@ "regexpp": "1.1.0", "require-uncached": "1.0.3", "semver": "5.5.0", + "string.prototype.matchall": "2.0.0", "strip-ansi": "4.0.0", "strip-json-comments": "2.0.1", - "table": "4.0.2", + "table": "4.0.3", "text-table": "0.2.0" }, "dependencies": { + "ajv": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "dev": true, + "requires": { + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "1.0.4", + "path-key": "2.0.1", + "semver": "5.5.0", + "shebang-command": "1.2.0", + "which": "1.3.1" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, "globals": { "version": "11.7.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -4923,9 +4976,9 @@ } }, "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "4.2.1", @@ -5012,13 +5065,13 @@ } }, "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", + "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { "acorn": "5.7.1", - "acorn-jsx": "3.0.1" + "acorn-jsx": "4.1.1" } }, "esprima": { @@ -5080,7 +5133,7 @@ "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", "requires": { "d64": "1.0.0", - "uuid": "3.2.1" + "uuid": "3.3.0" } }, "execa": { @@ -5499,6 +5552,12 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "function-name-support": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/function-name-support/-/function-name-support-0.2.0.tgz", @@ -6272,6 +6331,15 @@ "har-schema": "2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -6299,6 +6367,12 @@ "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, "has-to-string-tag-x": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", @@ -6369,9 +6443,9 @@ } }, "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", + "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", "dev": true }, "htmlparser2": { @@ -6508,9 +6582,9 @@ } }, "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { "ansi-escapes": "3.1.0", @@ -6522,8 +6596,7 @@ "lodash": "4.17.10", "mute-stream": "0.0.7", "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", + "rxjs": "5.5.11", "string-width": "2.1.1", "strip-ansi": "4.0.0", "through": "2.3.8" @@ -6653,6 +6726,12 @@ "builtin-modules": "1.1.1" } }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, "is-ci": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", @@ -6680,6 +6759,12 @@ } } }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -6890,6 +6975,15 @@ "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", "dev": true }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "1.0.3" + } + }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", @@ -6913,6 +7007,12 @@ "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -6963,9 +7063,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.2.0.tgz", - "integrity": "sha512-ozQGtlIw+/a/F3n6QwWiuuyRAPp64+g2GVsKYsIez0sgIEzkU5ZpL2uZ5pmAzbEJ82anlRaPlOQZzkRXspgJyg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.2.1.tgz", + "integrity": "sha512-azWDq6BXKEZV1dGAnqCzBO5S+k3hX6IP63NHKXI9+sPNtaWEymJ6vh0rl65ZLgt8kbn7lmt63kdcOMXomW4B4Q==", "dev": true, "requires": { "@babel/generator": "7.0.0-beta.49", @@ -7832,6 +7932,12 @@ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "dev": true + }, "nise": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", @@ -7856,7 +7962,7 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.6.0", + "hosted-git-info": "2.6.1", "is-builtin-module": "1.0.0", "semver": "5.5.0", "validate-npm-package-license": "3.0.3" @@ -7922,7 +8028,7 @@ "glob": "7.1.2", "istanbul-lib-coverage": "1.2.0", "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "2.2.0", + "istanbul-lib-instrument": "2.2.1", "istanbul-lib-report": "1.1.3", "istanbul-lib-source-maps": "1.2.5", "istanbul-reports": "1.4.1", @@ -10874,6 +10980,15 @@ "safe-regex": "1.1.0" } }, + "regexp.prototype.flags": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", + "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", + "dev": true, + "requires": { + "define-properties": "1.1.2" + } + }, "regexpp": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", @@ -10983,7 +11098,7 @@ "safe-buffer": "5.1.2", "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", - "uuid": "3.2.1" + "uuid": "3.3.0" } }, "require-directory": { @@ -11130,19 +11245,21 @@ "is-promise": "2.1.0" } }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "rxjs": { + "version": "5.5.11", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", + "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", "dev": true, "requires": { - "rx-lite": "4.0.8" + "symbol-observable": "1.0.1" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + } } }, "safe-buffer": { @@ -11628,6 +11745,19 @@ "strip-ansi": "3.0.1" } }, + "string.prototype.matchall": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", + "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.12.0", + "function-bind": "1.1.1", + "has-symbols": "1.0.0", + "regexp.prototype.flags": "1.2.0" + } + }, "stringifier": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", @@ -11777,31 +11907,55 @@ "dev": true }, "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", + "ajv": "6.5.1", + "ajv-keywords": "3.2.0", "chalk": "2.4.1", "lodash": "4.17.10", "slice-ansi": "1.0.0", "string-width": "2.1.1" }, "dependencies": { + "ajv": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "dev": true, + "requires": { + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -12246,6 +12400,23 @@ "xdg-basedir": "3.0.0" } }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "2.1.1" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -12286,9 +12457,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.0.tgz", + "integrity": "sha512-ijO9N2xY/YaOqQ5yz5c4sy2ZjWmA6AR6zASb/gdpeKZ8+948CxwfMW9RrKVk5may6ev8c0/Xguu32e2Llelpqw==" }, "validate-npm-package-license": { "version": "3.0.3", diff --git a/handwritten/logging/protos/google/logging/type/http_request.proto b/handwritten/logging/protos/google/logging/type/http_request.proto new file mode 100644 index 00000000000..4bca5082360 --- /dev/null +++ b/handwritten/logging/protos/google/logging/type/http_request.proto @@ -0,0 +1,92 @@ +// Copyright 2018 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. + +syntax = "proto3"; + +package google.logging.type; + +import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.Logging.Type"; +option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype"; +option java_multiple_files = true; +option java_outer_classname = "HttpRequestProto"; +option java_package = "com.google.logging.type"; +option php_namespace = "Google\\Cloud\\Logging\\Type"; + + +// A common proto for logging HTTP requests. Only contains semantics +// defined by the HTTP specification. Product-specific logging +// information MUST be defined in a separate message. +message HttpRequest { + // The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. + string request_method = 1; + + // 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"`. + string request_url = 2; + + // The size of the HTTP request message in bytes, including the request + // headers and the request body. + int64 request_size = 3; + + // The response code indicating the status of response. + // Examples: 200, 404. + int32 status = 4; + + // The size of the HTTP response message sent back to the client, in bytes, + // including the response headers and the response body. + int64 response_size = 5; + + // The user agent sent by the client. Example: + // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. + string user_agent = 6; + + // The IP address (IPv4 or IPv6) of the client that issued the HTTP + // request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. + string remote_ip = 7; + + // The IP address (IPv4 or IPv6) of the origin server that the request was + // sent to. + string server_ip = 13; + + // The referer URL of the request, as defined in + // [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + string referer = 8; + + // The request processing latency on the server, from the time the request was + // received until the response was sent. + google.protobuf.Duration latency = 14; + + // Whether or not a cache lookup was attempted. + bool cache_lookup = 11; + + // Whether or not an entity was served from cache + // (with or without validation). + bool cache_hit = 9; + + // 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. + bool cache_validated_with_origin_server = 10; + + // The number of HTTP response bytes inserted into cache. Set only when a + // cache fill was attempted. + int64 cache_fill_bytes = 12; + + // Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" + string protocol = 15; +} diff --git a/handwritten/logging/protos/google/logging/type/log_severity.proto b/handwritten/logging/protos/google/logging/type/log_severity.proto new file mode 100644 index 00000000000..d366e077895 --- /dev/null +++ b/handwritten/logging/protos/google/logging/type/log_severity.proto @@ -0,0 +1,72 @@ +// Copyright 2018 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. + +syntax = "proto3"; + +package google.logging.type; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.Logging.Type"; +option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype"; +option java_multiple_files = true; +option java_outer_classname = "LogSeverityProto"; +option java_package = "com.google.logging.type"; +option php_namespace = "Google\\Cloud\\Logging\\Type"; + + +// The severity of the event described in a log entry, expressed as one of the +// standard severity levels listed below. For your reference, the levels are +// assigned the listed numeric values. The effect of using numeric values other +// than those listed is undefined. +// +// You can filter for log entries by severity. For example, the following +// filter expression will match log entries with severities `INFO`, `NOTICE`, +// and `WARNING`: +// +// severity > DEBUG AND severity <= WARNING +// +// If you are writing log entries, you should map other severity encodings to +// one of these standard levels. For example, you might map all of Java's FINE, +// FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the +// original severity level in the log entry payload if you wish. +enum LogSeverity { + // (0) The log entry has no assigned severity level. + DEFAULT = 0; + + // (100) Debug or trace information. + DEBUG = 100; + + // (200) Routine information, such as ongoing status or performance. + INFO = 200; + + // (300) Normal but significant events, such as start up, shut down, or + // a configuration change. + NOTICE = 300; + + // (400) Warning events might cause problems. + WARNING = 400; + + // (500) Error events are likely to cause problems. + ERROR = 500; + + // (600) Critical events cause more severe problems or outages. + CRITICAL = 600; + + // (700) A person must take an action immediately. + ALERT = 700; + + // (800) One or more systems are unusable. + EMERGENCY = 800; +} diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 4a52bbc8369..0e5308c21fa 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -59,7 +59,7 @@ message LogEntry { // any results. string log_name = 12; - // Required. The monitored resource associated with this log entry. + // Required. The primary 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. @@ -84,11 +84,15 @@ message LogEntry { // This time is used to compute the log entry's age and to enforce // the logs retention period. If this field is omitted in a new log // entry, then Stackdriver Logging assigns it the current time. + // Timestamps have nanosecond accuracy, but trailing zeros in the fractional + // seconds might be omitted when the timestamp is displayed. // // Incoming log entries should have timestamps that are no more than - // the [logs retention period](/logging/quota-policy) in the past, - // and no more than 24 hours in the future. - // See the `entries.write` API method for more information. + // the [logs retention period](/logging/quotas) in the past, + // and no more than 24 hours in the future. Log entries outside those time + // boundaries will not be available when calling `entries.list`, but + // those log entries can still be exported with + // [LogSinks](/logging/docs/api/tasks/exporting-logs). google.protobuf.Timestamp timestamp = 9; // Output only. The time the log entry was received by Stackdriver Logging. @@ -114,6 +118,11 @@ message LogEntry { // information about the log entry. map labels = 11; + // Output only. Additional metadata about the monitored resource. + // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have + // this field populated. + google.api.MonitoredResourceMetadata metadata = 25; + // Optional. Information about an operation associated with the log entry, if // applicable. LogEntryOperation operation = 15; @@ -124,11 +133,10 @@ message LogEntry { // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` string trace = 22; - // Optional. Id of the span within the trace associated with the log entry. - // e.g. "0000000000000042" - // For Stackdriver trace spans, this is the same format that the Stackdriver - // trace API uses. - // The ID is a 16-character hexadecimal encoding of an 8-byte array. + // Optional. The span ID within the trace associated with the log entry. For + // Stackdriver Trace spans, this is the same format that the Stackdriver Trace + // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such + // as "000000000000004a". string span_id = 27; // Optional. Source code location information associated with the log entry, diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index a9b4e9306f3..ef8b6b56b5d 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,37 +40,71 @@ service LoggingServiceV2 { // Log entries written shortly before the delete operation might not be // deleted. rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2beta1/{log_name=projects/*/logs/*}" }; + option (google.api.http) = { + delete: "/v2/{log_name=projects/*/logs/*}" + additional_bindings { + delete: "/v2/{log_name=organizations/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=folders/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=billingAccounts/*/logs/*}" + } + }; } - // ## Log entry resources - // // Writes log entries to Stackdriver Logging. This API method is the // only way to send log entries to Stackdriver Logging. This method // is used, directly or indirectly, by the Stackdriver Logging agent // (fluentd) and all logging libraries configured to use Stackdriver // Logging. + // A single request may contain log entries for a maximum of 1000 + // different resources (projects, organizations, billing accounts or + // folders) rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { - option (google.api.http) = { post: "/v2/entries:write" body: "*" }; + option (google.api.http) = { + post: "/v2/entries:write" + body: "*" + }; } // 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). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { - option (google.api.http) = { post: "/v2/entries:list" body: "*" }; + option (google.api.http) = { + post: "/v2/entries:list" + body: "*" + }; } // Lists the descriptors for monitored resource types used by Stackdriver // Logging. rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { - option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; + option (google.api.http) = { + get: "/v2/monitoredResourceDescriptors" + }; } // Lists the logs in projects, organizations, folders, or billing accounts. // Only logs that have entries are listed. rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { - option (google.api.http) = { get: "/v2/{parent=*/*}/logs" }; + option (google.api.http) = { + get: "/v2/{parent=*/*}/logs" + additional_bindings { + get: "/v2/{parent=projects/*}/logs" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/logs" + } + additional_bindings { + get: "/v2/{parent=folders/*}/logs" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/logs" + } + }; } } @@ -128,7 +162,8 @@ message WriteLogEntriesRequest { // entries in this list does not matter. Values supplied in this method's // `log_name`, `resource`, and `labels` fields are copied into those log // entries in this list that do not include values for their corresponding - // fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + // fields. For more information, see the + // [LogEntry][google.logging.v2.LogEntry] type. // // If the `timestamp` or `insert_id` fields are missing in log entries, then // this method supplies the current time or a unique identifier, respectively. @@ -138,8 +173,9 @@ message WriteLogEntriesRequest { // // Log entries with timestamps that are more than the // [logs retention period](/logging/quota-policy) in the past or more than - // 24 hours in the future might be discarded. Discarding does not return - // an error. + // 24 hours in the future will not be available when calling `entries.list`. + // However, those log entries can still be exported with + // [LogSinks](/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the // [quota limit](/logging/quota-policy) for calls to `entries.write`, @@ -153,6 +189,11 @@ message WriteLogEntriesRequest { // with one of the failed entries and the response includes error details // keyed by the entries' zero-based index in the `entries.write` method. bool partial_success = 5; + + // Optional. If true, the request should expect normal response, but the + // entries won't be persisted nor exported. Useful for checking whether the + // logging API endpoints are working properly before sending valuable data. + bool dry_run = 6; } // Result returned from WriteLogEntries. @@ -179,7 +220,7 @@ message ListLogEntriesRequest { // `"my-project-1A"`. If present, these project identifiers are converted to // resource name format and added to the list of resources in // `resource_names`. - repeated string project_ids = 1; + repeated string project_ids = 1 [deprecated = true]; // Required. Names of one or more parent resources from which to // retrieve log entries: diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 10095ef096d..dc2783e0e53 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,12 +35,40 @@ option php_namespace = "Google\\Cloud\\Logging\\V2"; service ConfigServiceV2 { // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { - option (google.api.http) = { get: "/v2/{parent=*/*}/sinks" }; + option (google.api.http) = { + get: "/v2/{parent=*/*}/sinks" + additional_bindings { + get: "/v2/{parent=projects/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=folders/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/sinks" + } + }; } // Gets a sink. rpc GetSink(GetSinkRequest) returns (LogSink) { - option (google.api.http) = { get: "/v2/{sink_name=*/*/sinks/*}" }; + option (google.api.http) = { + get: "/v2/{sink_name=*/*/sinks/*}" + additional_bindings { + get: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=folders/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }; } // Creates a sink that exports specified log entries to a destination. The @@ -48,7 +76,26 @@ service ConfigServiceV2 { // `writer_identity` is not permitted to write to the destination. A sink can // export log entries only from the resource owning the sink. rpc CreateSink(CreateSinkRequest) returns (LogSink) { - option (google.api.http) = { post: "/v2/{parent=*/*}/sinks" body: "sink" }; + option (google.api.http) = { + post: "/v2/{parent=*/*}/sinks" + body: "sink" + additional_bindings { + post: "/v2/{parent=projects/*}/sinks" + body: "sink" + } + additional_bindings { + post: "/v2/{parent=organizations/*}/sinks" + body: "sink" + } + additional_bindings { + post: "/v2/{parent=folders/*}/sinks" + body: "sink" + } + additional_bindings { + post: "/v2/{parent=billingAccounts/*}/sinks" + body: "sink" + } + }; } // Updates a sink. This method replaces the following fields in the existing @@ -56,40 +103,169 @@ service ConfigServiceV2 { // The updated sink might also have a new `writer_identity`; see the // `unique_writer_identity` field. rpc UpdateSink(UpdateSinkRequest) returns (LogSink) { - option (google.api.http) = { put: "/v2/{sink_name=*/*/sinks/*}" body: "sink" }; + option (google.api.http) = { + put: "/v2/{sink_name=*/*/sinks/*}" + body: "sink" + additional_bindings { + put: "/v2/{sink_name=projects/*/sinks/*}" + body: "sink" + } + additional_bindings { + put: "/v2/{sink_name=organizations/*/sinks/*}" + body: "sink" + } + additional_bindings { + put: "/v2/{sink_name=folders/*/sinks/*}" + body: "sink" + } + additional_bindings { + put: "/v2/{sink_name=billingAccounts/*/sinks/*}" + body: "sink" + } + additional_bindings { + patch: "/v2/{sink_name=projects/*/sinks/*}" + body: "sink" + } + additional_bindings { + patch: "/v2/{sink_name=organizations/*/sinks/*}" + body: "sink" + } + additional_bindings { + patch: "/v2/{sink_name=folders/*/sinks/*}" + body: "sink" + } + additional_bindings { + patch: "/v2/{sink_name=billingAccounts/*/sinks/*}" + body: "sink" + } + }; } // Deletes a sink. If the sink has a unique `writer_identity`, then that // service account is also deleted. rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2/{sink_name=*/*/sinks/*}" }; + option (google.api.http) = { + delete: "/v2/{sink_name=*/*/sinks/*}" + additional_bindings { + delete: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=folders/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }; } // Lists all the exclusions in a parent resource. rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { - option (google.api.http) = { get: "/v2/{parent=*/*}/exclusions" }; + option (google.api.http) = { + get: "/v2/{parent=*/*}/exclusions" + additional_bindings { + get: "/v2/{parent=projects/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=folders/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/exclusions" + } + }; } // Gets the description of an exclusion. rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { get: "/v2/{name=*/*/exclusions/*}" }; + option (google.api.http) = { + get: "/v2/{name=*/*/exclusions/*}" + additional_bindings { + get: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/exclusions/*}" + } + }; } // Creates a new exclusion in a specified parent resource. // Only log entries belonging to that resource can be excluded. // You can have up to 10 exclusions in a resource. rpc CreateExclusion(CreateExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { post: "/v2/{parent=*/*}/exclusions" body: "exclusion" }; + option (google.api.http) = { + post: "/v2/{parent=*/*}/exclusions" + body: "exclusion" + additional_bindings { + post: "/v2/{parent=projects/*}/exclusions" + body: "exclusion" + } + additional_bindings { + post: "/v2/{parent=organizations/*}/exclusions" + body: "exclusion" + } + additional_bindings { + post: "/v2/{parent=folders/*}/exclusions" + body: "exclusion" + } + additional_bindings { + post: "/v2/{parent=billingAccounts/*}/exclusions" + body: "exclusion" + } + }; } // Changes one or more properties of an existing exclusion. rpc UpdateExclusion(UpdateExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { patch: "/v2/{name=*/*/exclusions/*}" body: "exclusion" }; + option (google.api.http) = { + patch: "/v2/{name=*/*/exclusions/*}" + body: "exclusion" + additional_bindings { + patch: "/v2/{name=projects/*/exclusions/*}" + body: "exclusion" + } + additional_bindings { + patch: "/v2/{name=organizations/*/exclusions/*}" + body: "exclusion" + } + additional_bindings { + patch: "/v2/{name=folders/*/exclusions/*}" + body: "exclusion" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/exclusions/*}" + body: "exclusion" + } + }; } // Deletes an exclusion. rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" }; + option (google.api.http) = { + delete: "/v2/{name=*/*/exclusions/*}" + additional_bindings { + delete: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=billingAccounts/*/exclusions/*}" + } + }; } } @@ -142,7 +318,7 @@ message LogSink { // Deprecated. The log entry format to use for this sink's exported log // entries. The v2 format is used by default and cannot be changed. - VersionFormat output_version_format = 6; + VersionFormat output_version_format = 6 [deprecated = true]; // Output only. An IAM identity—a service account or group—under // which Stackdriver Logging writes the exported log entries to the sink's @@ -176,10 +352,10 @@ message LogSink { bool include_children = 9; // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp start_time = 10; + google.protobuf.Timestamp start_time = 10 [deprecated = true]; // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp end_time = 11; + google.protobuf.Timestamp end_time = 11 [deprecated = true]; } // The parameters to `ListSinks`. @@ -343,12 +519,12 @@ message LogExclusion { // For example, the following filter matches 99% of low-severity log // entries from load balancers: // - // "resource.type=http_load_balancer severity { diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index 733cac2aba0..c4f193a5f66 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -12,21 +12,12 @@ "retry_params": { "default": { "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.2, - "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 90000 - }, - "write_sink": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.2, - "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 120000 + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 } }, "methods": { @@ -47,7 +38,7 @@ }, "UpdateSink": { "timeout_millis": 120000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteSink": { diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index b331ebc2348..bfdd0ee61a5 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -43,7 +43,7 @@ * any results. * * @property {Object} resource - * Required. The monitored resource associated with this log entry. + * Required. The primary 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. @@ -71,11 +71,15 @@ * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * * Incoming log entries should have timestamps that are no more than - * the [logs retention period](https://cloud.google.com/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](https://cloud.google.com/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @@ -108,6 +112,13 @@ * Optional. A set of user-defined (key, value) data that provides additional * information about the log entry. * + * @property {Object} metadata + * Output only. Additional metadata about the monitored resource. + * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have + * this field populated. + * + * This object should have the same structure as [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} + * * @property {Object} operation * Optional. Information about an operation associated with the log entry, if * applicable. @@ -121,11 +132,10 @@ * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` * * @property {string} spanId - * Optional. Id of the span within the trace associated with the log entry. - * e.g. "0000000000000042" - * For Stackdriver trace spans, this is the same format that the Stackdriver - * trace API uses. - * The ID is a 16-character hexadecimal encoding of an 8-byte array. + * Optional. The span ID within the trace associated with the log entry. For + * Stackdriver Trace spans, this is the same format that the Stackdriver Trace + * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such + * as "000000000000004a". * * @property {Object} sourceLocation * Optional. Source code location information associated with the log entry, diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 0de1d4eadbb..d460c6a5adb 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -81,7 +81,8 @@ var DeleteLogRequest = { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the LogEntry type. + * fields. For more information, see the + * LogEntry type. * * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. @@ -91,8 +92,9 @@ var DeleteLogRequest = { * * Log entries with timestamps that are more than the * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, @@ -108,6 +110,11 @@ var DeleteLogRequest = { * with one of the failed entries and the response includes error details * keyed by the entries' zero-based index in the `entries.write` method. * + * @property {boolean} dryRun + * Optional. If true, the request should expect normal response, but the + * entries won't be persisted nor exported. Useful for checking whether the + * logging API endpoints are working properly before sending valuable data. + * * @typedef WriteLogEntriesRequest * @memberof google.logging.v2 * @see [google.logging.v2.WriteLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index 4d7c3139a7f..bb971975b2c 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -349,12 +349,12 @@ var DeleteSinkRequest = { * For example, the following filter matches 99% of low-severity log * entries from load balancers: * - * "resource.type=http_load_balancer severity { * var resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { @@ -488,7 +495,7 @@ class LoggingServiceV2Client { * }); * * // Or obtain the paged response. - * var resourceNames = []; + * var formattedResourceNames = []; * * * var options = {autoPaginate: false}; @@ -507,7 +514,7 @@ class LoggingServiceV2Client { * return client.listLogEntries(nextRequest, options).then(callback); * } * } - * client.listLogEntries({resourceNames: resourceNames}, options) + * client.listLogEntries({resourceNames: formattedResourceNames}, options) * .then(callback) * .catch(err => { * console.error(err); @@ -589,8 +596,8 @@ class LoggingServiceV2Client { * // optional auth parameters. * }); * - * var resourceNames = []; - * client.listLogEntriesStream({resourceNames: resourceNames}) + * var formattedResourceNames = []; + * client.listLogEntriesStream({resourceNames: formattedResourceNames}) * .on('data', element => { * // doThingsWith(element) * }).on('error', err => { @@ -917,18 +924,6 @@ class LoggingServiceV2Client { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - /** * Return a fully-qualified log resource name string. * @@ -944,14 +939,15 @@ class LoggingServiceV2Client { } /** - * Parse the projectName from a project resource. + * Return a fully-qualified project resource name string. * - * @param {String} projectName - * A fully-qualified path representing a project resources. - * @returns {String} - A string representing the project. + * @param {String} project + * @returns {String} */ - matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + projectPath(project) { + return this._pathTemplates.projectPathTemplate.render({ + project: project, + }); } /** @@ -975,6 +971,17 @@ class LoggingServiceV2Client { matchLogFromLogName(logName) { return this._pathTemplates.logPathTemplate.match(logName).log; } + + /** + * Parse the projectName from a project resource. + * + * @param {String} projectName + * A fully-qualified path representing a project resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromProjectName(projectName) { + return this._pathTemplates.projectPathTemplate.match(projectName).project; + } } module.exports = LoggingServiceV2Client; diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index 5d2fc1d6712..6359d487f2f 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -12,21 +12,12 @@ "retry_params": { "default": { "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.2, - "max_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 90000 - }, - "list": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.2, - "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 2000, - "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 20000 + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 } }, "methods": { @@ -48,7 +39,7 @@ "ListLogEntries": { "timeout_millis": 10000, "retry_codes_name": "idempotent", - "retry_params_name": "list" + "retry_params_name": "default" }, "ListMonitoredResourceDescriptors": { "timeout_millis": 60000, diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json index a0678701c21..671ed471b51 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client_config.json +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -12,12 +12,12 @@ "retry_params": { "default": { "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.2, - "max_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.5, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 90000 + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 } }, "methods": { @@ -38,7 +38,7 @@ }, "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteLogMetric": { diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index f5e472c40e8..28ce603b176 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -137,9 +137,9 @@ describe('LoggingServiceV2Client', () => { }); // Mock request - var resourceNames = []; + var formattedResourceNames = []; var request = { - resourceNames: resourceNames, + resourceNames: formattedResourceNames, }; // Mock response @@ -175,9 +175,9 @@ describe('LoggingServiceV2Client', () => { }); // Mock request - var resourceNames = []; + var formattedResourceNames = []; var request = { - resourceNames: resourceNames, + resourceNames: formattedResourceNames, }; // Mock Grpc layer @@ -534,9 +534,11 @@ describe('ConfigServiceV2Client', () => { // Mock request var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); var sink = {}; + var updateMask = {}; var request = { sinkName: formattedSinkName, sink: sink, + updateMask: updateMask, }; // Mock response @@ -575,9 +577,11 @@ describe('ConfigServiceV2Client', () => { // Mock request var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); var sink = {}; + var updateMask = {}; var request = { sinkName: formattedSinkName, sink: sink, + updateMask: updateMask, }; // Mock Grpc layer From fe4934dd980dc2c75dd6dade9c71fb83c1c5e4d1 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Wed, 27 Jun 2018 12:46:56 -0700 Subject: [PATCH 0179/1029] Re-generate library using /synth.py (#145) --- handwritten/logging/package-lock.json | 134 ++++++++++++-------------- 1 file changed, 59 insertions(+), 75 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index db2e5beb511..1db0f45ab0c 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -72,21 +72,21 @@ } }, "@babel/code-frame": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz", - "integrity": "sha1-vs2AVIJzREDJ0TfkbXc0DmTX9Rs=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", + "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", "dev": true, "requires": { - "@babel/highlight": "7.0.0-beta.49" + "@babel/highlight": "7.0.0-beta.51" } }, "@babel/generator": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.49.tgz", - "integrity": "sha1-6c/9qROZaszseTu8JauRvBnQv3o=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", + "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", "dev": true, "requires": { - "@babel/types": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.51", "jsesc": "2.5.1", "lodash": "4.17.10", "source-map": "0.5.7", @@ -102,38 +102,38 @@ } }, "@babel/helper-function-name": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.49.tgz", - "integrity": "sha1-olwRGbnwNSeGcBJuAiXAMEHI3jI=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", + "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", "dev": true, "requires": { - "@babel/helper-get-function-arity": "7.0.0-beta.49", - "@babel/template": "7.0.0-beta.49", - "@babel/types": "7.0.0-beta.49" + "@babel/helper-get-function-arity": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51" } }, "@babel/helper-get-function-arity": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.49.tgz", - "integrity": "sha1-z1Aj8y0q2S0Ic3STnOwJUby1FEE=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", + "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", "dev": true, "requires": { - "@babel/types": "7.0.0-beta.49" + "@babel/types": "7.0.0-beta.51" } }, "@babel/helper-split-export-declaration": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.49.tgz", - "integrity": "sha1-QNeO2glo0BGxxShm5XRs+yPldUg=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", + "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", "dev": true, "requires": { - "@babel/types": "7.0.0-beta.49" + "@babel/types": "7.0.0-beta.51" } }, "@babel/highlight": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.49.tgz", - "integrity": "sha1-lr3GtD4TSCASumaRsQGEktOWIsw=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", + "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", "dev": true, "requires": { "chalk": "2.4.1", @@ -142,35 +142,35 @@ } }, "@babel/parser": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.49.tgz", - "integrity": "sha1-lE0MW6KBK7FZ7b0iZ0Ov0mUXm9w=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", + "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", "dev": true }, "@babel/template": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.49.tgz", - "integrity": "sha1-44q+ghfLl5P0YaUwbXrXRdg+HSc=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", + "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", "dev": true, "requires": { - "@babel/code-frame": "7.0.0-beta.49", - "@babel/parser": "7.0.0-beta.49", - "@babel/types": "7.0.0-beta.49", + "@babel/code-frame": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", "lodash": "4.17.10" } }, "@babel/traverse": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.49.tgz", - "integrity": "sha1-TypzaCoYM07WYl0QCo0nMZ98LWg=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", + "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", "dev": true, "requires": { - "@babel/code-frame": "7.0.0-beta.49", - "@babel/generator": "7.0.0-beta.49", - "@babel/helper-function-name": "7.0.0-beta.49", - "@babel/helper-split-export-declaration": "7.0.0-beta.49", - "@babel/parser": "7.0.0-beta.49", - "@babel/types": "7.0.0-beta.49", + "@babel/code-frame": "7.0.0-beta.51", + "@babel/generator": "7.0.0-beta.51", + "@babel/helper-function-name": "7.0.0-beta.51", + "@babel/helper-split-export-declaration": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", "debug": "3.1.0", "globals": "11.7.0", "invariant": "2.2.4", @@ -186,9 +186,9 @@ } }, "@babel/types": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.49.tgz", - "integrity": "sha1-t+Oxw/TUz+Eb34yJ8e/V4WF7h6Y=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", + "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", "dev": true, "requires": { "esutils": "2.0.2", @@ -6898,21 +6898,6 @@ "symbol-observable": "1.2.0" } }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", - "requires": { - "is-number": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" - } - } - }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -7063,16 +7048,16 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.2.1.tgz", - "integrity": "sha512-azWDq6BXKEZV1dGAnqCzBO5S+k3hX6IP63NHKXI9+sPNtaWEymJ6vh0rl65ZLgt8kbn7lmt63kdcOMXomW4B4Q==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.0.tgz", + "integrity": "sha512-Ie1LGWJVCFDDJKKH4g1ffpFcZTEXEd6ay5l9fE8539y4qPErJnzo4psnGzDH92tcKvdUDdbxrKySYIbt6zB9hw==", "dev": true, "requires": { - "@babel/generator": "7.0.0-beta.49", - "@babel/parser": "7.0.0-beta.49", - "@babel/template": "7.0.0-beta.49", - "@babel/traverse": "7.0.0-beta.49", - "@babel/types": "7.0.0-beta.49", + "@babel/generator": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/traverse": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", "istanbul-lib-coverage": "2.0.0", "semver": "5.5.0" } @@ -7737,7 +7722,7 @@ "extglob": "2.0.4", "fragment-cache": "0.2.1", "kind-of": "6.0.2", - "nanomatch": "1.2.9", + "nanomatch": "1.2.13", "object.pick": "1.3.0", "regex-not": "1.0.2", "snapdragon": "0.8.2", @@ -7902,16 +7887,15 @@ "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" }, "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", "define-property": "2.0.2", "extend-shallow": "3.0.2", "fragment-cache": "0.2.1", - "is-odd": "2.0.0", "is-windows": "1.0.2", "kind-of": "6.0.2", "object.pick": "1.3.0", @@ -8028,7 +8012,7 @@ "glob": "7.1.2", "istanbul-lib-coverage": "1.2.0", "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "2.2.1", + "istanbul-lib-instrument": "2.3.0", "istanbul-lib-report": "1.1.3", "istanbul-lib-source-maps": "1.2.5", "istanbul-reports": "1.4.1", From fcc525101b7f3624a1629d50392feb9b8f38631c Mon Sep 17 00:00:00 2001 From: DPE bot Date: Thu, 28 Jun 2018 10:19:29 -0700 Subject: [PATCH 0180/1029] Re-generate library using /synth.py (#147) --- handwritten/logging/package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 1db0f45ab0c..a7e4330155a 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -2401,7 +2401,7 @@ "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", "requires": { - "@types/node": "10.3.6" + "@types/node": "10.5.0" } }, "@types/form-data": { @@ -2409,7 +2409,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "10.3.6" + "@types/node": "10.5.0" } }, "@types/lodash": { @@ -2423,9 +2423,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "10.3.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.6.tgz", - "integrity": "sha512-h7VDRFL8IhdPw1JjiNVvhr+WynfKW09q2BOflIOA0yeuXNeXBP1bIRuBrysSryH4keaJ5bYUNp63aIyQL9YpDQ==" + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.0.tgz", + "integrity": "sha512-baXPuqA7EVcBUpA5so2K26DTzk7NCWBc9xrPMu9PbUMwgusJRm9zJBPhiDmJVEcnTQ3aOxUZeuFHpd9qMYDNRg==" }, "@types/request": { "version": "2.47.1", @@ -2434,7 +2434,7 @@ "requires": { "@types/caseless": "0.12.1", "@types/form-data": "2.2.1", - "@types/node": "10.3.6", + "@types/node": "10.5.0", "@types/tough-cookie": "2.3.3" } }, @@ -11407,9 +11407,9 @@ "dev": true }, "snakecase-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.1.1.tgz", - "integrity": "sha512-/7I66rMhAag18IH5o0jtWWCJH/f2cvICwBcSS+SBUxsorbDeBu4UvYDNlAn3MrHfk6re0rUECwaPhsZuV2P9Ng==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.2.0.tgz", + "integrity": "sha512-G5Faa3wQevGXcD5e4JKfmgofO+Fu4Jg4/nLyeZqWmBqVV0/3ORgervt3EjBi6PEFKhztPQWegZspteWnycx5dg==", "requires": { "map-obj": "2.0.0", "to-snake-case": "0.1.2" From 8611c00018031599b055fd2520d1c0957448a9b3 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 29 Jun 2018 10:20:41 -0700 Subject: [PATCH 0181/1029] Re-generate library using /synth.py (#148) --- handwritten/logging/package-lock.json | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index a7e4330155a..5cc598bb48c 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -226,7 +226,7 @@ "is": "3.2.1", "stream-events": "1.0.4", "string-format-obj": "1.1.1", - "uuid": "3.3.0" + "uuid": "3.3.2" }, "dependencies": { "@google-cloud/common": { @@ -2055,7 +2055,7 @@ "lodash.snakecase": "4.1.1", "protobufjs": "6.8.6", "through2": "2.0.3", - "uuid": "3.3.0" + "uuid": "3.3.2" }, "dependencies": { "@google-cloud/common": { @@ -2401,7 +2401,7 @@ "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", "requires": { - "@types/node": "10.5.0" + "@types/node": "10.5.1" } }, "@types/form-data": { @@ -2409,7 +2409,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "10.5.0" + "@types/node": "10.5.1" } }, "@types/lodash": { @@ -2423,9 +2423,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.0.tgz", - "integrity": "sha512-baXPuqA7EVcBUpA5so2K26DTzk7NCWBc9xrPMu9PbUMwgusJRm9zJBPhiDmJVEcnTQ3aOxUZeuFHpd9qMYDNRg==" + "version": "10.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.1.tgz", + "integrity": "sha512-AFLl1IALIuyt6oK4AYZsgWVJ/5rnyzQWud7IebaZWWV3YmgtPZkQmYio9R5Ze/2pdd7XfqF5bP+hWS11mAKoOQ==" }, "@types/request": { "version": "2.47.1", @@ -2434,7 +2434,7 @@ "requires": { "@types/caseless": "0.12.1", "@types/form-data": "2.2.1", - "@types/node": "10.5.0", + "@types/node": "10.5.1", "@types/tough-cookie": "2.3.3" } }, @@ -3509,9 +3509,9 @@ } }, "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "optional": true, "requires": { "tweetnacl": "0.14.5" @@ -5133,7 +5133,7 @@ "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", "requires": { "d64": "1.0.0", - "uuid": "3.3.0" + "uuid": "3.3.2" } }, "execa": { @@ -10671,9 +10671,9 @@ "dev": true }, "prettier": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.6.tgz", - "integrity": "sha512-p5eqCNiohWZN++7aJXUVj0JgLqHCPLf9GLIcLBHGNWs4Y9FJOPs6+KNO2WT0udJIQJTbeZFrJkjzjcb8fkAYYQ==", + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz", + "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", "dev": true }, "pretty-ms": { @@ -11082,7 +11082,7 @@ "safe-buffer": "5.1.2", "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", - "uuid": "3.3.0" + "uuid": "3.3.2" } }, "require-directory": { @@ -11646,7 +11646,7 @@ "requires": { "asn1": "0.2.3", "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", + "bcrypt-pbkdf": "1.0.2", "dashdash": "1.14.1", "ecc-jsbn": "0.1.1", "getpass": "0.1.7", @@ -12441,9 +12441,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.0.tgz", - "integrity": "sha512-ijO9N2xY/YaOqQ5yz5c4sy2ZjWmA6AR6zASb/gdpeKZ8+948CxwfMW9RrKVk5may6ev8c0/Xguu32e2Llelpqw==" + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "validate-npm-package-license": { "version": "3.0.3", From 62eb593b3a1bc8fa4cbd35a67e2771c58d4a26b8 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 29 Jun 2018 19:35:49 -0700 Subject: [PATCH 0182/1029] chore(release): bump version to 2.0.0 (#149) --- handwritten/logging/package-lock.json | 2 +- handwritten/logging/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 5cc598bb48c..d115aeea742 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "1.2.0", + "version": "2.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ddc6fcae175..768425a2467 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "1.2.0", + "version": "2.0.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 770860e4444cae316cb1c59f0132efdf4abe25b2 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Sat, 30 Jun 2018 10:31:55 -0700 Subject: [PATCH 0183/1029] Re-generate library using /synth.py (#150) --- handwritten/logging/package-lock.json | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index d115aeea742..5f419002d96 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -278,9 +278,9 @@ } }, "@google-cloud/common": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.1.tgz", - "integrity": "sha512-LJB7CoNXEXY0mDWtF8E2cl3Y0kuMQ3wjH9Xr+Y7vH5gHgN82dDh1BMUOizRf9oXQFDWUgGERD5SdfBcjUhHmwA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.2.tgz", + "integrity": "sha512-7uhHepYCaGkX8mi4nNO/rS9bI6iMJW+FaKexBFpBS/60iOvVfUrRoP0j/4d5g/SWnIEaL6ai+ZV7rNnoVX/bkw==", "requires": { "@types/duplexify": "3.5.0", "@types/request": "2.47.1", @@ -293,21 +293,10 @@ "is": "3.2.1", "pify": "3.0.0", "request": "2.87.0", - "retry-request": "3.3.2", + "retry-request": "4.0.0", "split-array-stream": "2.0.0", "stream-events": "1.0.4", "through2": "2.0.3" - }, - "dependencies": { - "retry-request": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", - "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", - "requires": { - "request": "2.87.0", - "through2": "2.0.3" - } - } } }, "@google-cloud/common-grpc": { @@ -315,7 +304,7 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.7.1.tgz", "integrity": "sha512-VK2X6rLRJIQMmkTS3p483up/Vb8zZHLoMFSmo17iiqebgaAoDpOhBiXXy4thtfabk02Nu5QtYT0QwM49OeU/ew==", "requires": { - "@google-cloud/common": "0.20.1", + "@google-cloud/common": "0.20.2", "@grpc/proto-loader": "0.1.0", "dot-prop": "4.2.0", "duplexify": "3.6.0", From 8a69d24b4e2bb0fd4fb47c0f71a4e9c29f99991c Mon Sep 17 00:00:00 2001 From: DPE bot Date: Sun, 1 Jul 2018 10:15:59 -0700 Subject: [PATCH 0184/1029] Re-generate library using /synth.py (#151) --- handwritten/logging/package-lock.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 5f419002d96..d770f50cb8a 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -278,9 +278,9 @@ } }, "@google-cloud/common": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.2.tgz", - "integrity": "sha512-7uhHepYCaGkX8mi4nNO/rS9bI6iMJW+FaKexBFpBS/60iOvVfUrRoP0j/4d5g/SWnIEaL6ai+ZV7rNnoVX/bkw==", + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.3.tgz", + "integrity": "sha512-jt8/R4EqDTQccv5WA9AEaS65llM5+mlxsuWu57G5Os8HTIpgPbcsOVMUeIvmTrBuPUYSoRIMW8d/pvv/95n0+g==", "requires": { "@types/duplexify": "3.5.0", "@types/request": "2.47.1", @@ -304,7 +304,7 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.7.1.tgz", "integrity": "sha512-VK2X6rLRJIQMmkTS3p483up/Vb8zZHLoMFSmo17iiqebgaAoDpOhBiXXy4thtfabk02Nu5QtYT0QwM49OeU/ew==", "requires": { - "@google-cloud/common": "0.20.2", + "@google-cloud/common": "0.20.3", "@grpc/proto-loader": "0.1.0", "dot-prop": "4.2.0", "duplexify": "3.6.0", @@ -4814,7 +4814,7 @@ "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", "dev": true, "requires": { - "ajv": "6.5.1", + "ajv": "6.5.2", "babel-code-frame": "6.26.0", "chalk": "2.4.1", "cross-spawn": "6.0.5", @@ -4855,9 +4855,9 @@ }, "dependencies": { "ajv": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", - "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { "fast-deep-equal": "2.0.1", @@ -11885,7 +11885,7 @@ "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "6.5.1", + "ajv": "6.5.2", "ajv-keywords": "3.2.0", "chalk": "2.4.1", "lodash": "4.17.10", @@ -11894,9 +11894,9 @@ }, "dependencies": { "ajv": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", - "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { "fast-deep-equal": "2.0.1", From 164556820d076719f3b5c38ae7e5726c6738c65c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 2 Jul 2018 20:51:27 -0700 Subject: [PATCH 0185/1029] chore(deps): lock file maintenance (#152) --- handwritten/logging/package-lock.json | 5227 ++++++++++++++----------- 1 file changed, 2879 insertions(+), 2348 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index d770f50cb8a..4949e070999 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -16,18 +16,18 @@ "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "6.22.0", - "babel-plugin-syntax-trailing-function-commas": "6.22.0", - "babel-plugin-transform-async-to-generator": "6.24.1", - "babel-plugin-transform-es2015-destructuring": "6.23.0", - "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", - "babel-plugin-transform-es2015-parameters": "6.24.1", - "babel-plugin-transform-es2015-spread": "6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "6.24.1", - "babel-plugin-transform-es2015-unicode-regex": "6.24.1", - "babel-plugin-transform-exponentiation-operator": "6.24.1", - "package-hash": "1.2.0" + "babel-plugin-check-es2015-constants": "^6.8.0", + "babel-plugin-syntax-trailing-function-commas": "^6.20.0", + "babel-plugin-transform-async-to-generator": "^6.16.0", + "babel-plugin-transform-es2015-destructuring": "^6.19.0", + "babel-plugin-transform-es2015-function-name": "^6.9.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", + "babel-plugin-transform-es2015-parameters": "^6.21.0", + "babel-plugin-transform-es2015-spread": "^6.8.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", + "babel-plugin-transform-exponentiation-operator": "^6.8.0", + "package-hash": "^1.2.0" }, "dependencies": { "md5-hex": { @@ -36,7 +36,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "package-hash": { @@ -45,7 +45,7 @@ "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", "dev": true, "requires": { - "md5-hex": "1.3.0" + "md5-hex": "^1.3.0" } } } @@ -56,8 +56,8 @@ "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", "dev": true, "requires": { - "@ava/babel-plugin-throws-helper": "2.0.0", - "babel-plugin-espower": "2.4.0" + "@ava/babel-plugin-throws-helper": "^2.0.0", + "babel-plugin-espower": "^2.3.2" } }, "@ava/write-file-atomic": { @@ -66,9 +66,9 @@ "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "@babel/code-frame": { @@ -87,10 +87,10 @@ "dev": true, "requires": { "@babel/types": "7.0.0-beta.51", - "jsesc": "2.5.1", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" }, "dependencies": { "jsesc": { @@ -136,9 +136,9 @@ "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", "dev": true, "requires": { - "chalk": "2.4.1", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" } }, "@babel/parser": { @@ -156,7 +156,7 @@ "@babel/code-frame": "7.0.0-beta.51", "@babel/parser": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "lodash": "4.17.10" + "lodash": "^4.17.5" } }, "@babel/traverse": { @@ -171,10 +171,10 @@ "@babel/helper-split-export-declaration": "7.0.0-beta.51", "@babel/parser": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "debug": "3.1.0", - "globals": "11.7.0", - "invariant": "2.2.4", - "lodash": "4.17.10" + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" }, "dependencies": { "globals": { @@ -191,9 +191,9 @@ "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", "dev": true, "requires": { - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "2.0.0" + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" }, "dependencies": { "to-fast-properties": { @@ -210,7 +210,7 @@ "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", "dev": true, "requires": { - "arrify": "1.0.1" + "arrify": "^1.0.1" } }, "@google-cloud/bigquery": { @@ -219,14 +219,14 @@ "integrity": "sha512-r4k4PvsoPB7DBBCsm4hz8WZj3KvZXikTcwSjAg+cn0JndAPIEad4XCd39RpniyPDSmp+n+d+kOAgebwMWj8q+w==", "dev": true, "requires": { - "@google-cloud/common": "0.17.0", - "arrify": "1.0.1", - "duplexify": "3.6.0", - "extend": "3.0.1", - "is": "3.2.1", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "uuid": "3.3.2" + "@google-cloud/common": "^0.17.0", + "arrify": "^1.0.0", + "duplexify": "^3.5.0", + "extend": "^3.0.1", + "is": "^3.0.1", + "stream-events": "^1.0.1", + "string-format-obj": "^1.0.0", + "uuid": "^3.1.0" }, "dependencies": { "@google-cloud/common": { @@ -235,24 +235,24 @@ "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "dev": true, "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.10.1", - "is": "3.2.1", + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.0", + "is": "^3.2.0", "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.87.0", - "retry-request": "3.3.2", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" } }, "retry-request": { @@ -261,8 +261,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "2.87.0", - "through2": "2.0.3" + "request": "^2.81.0", + "through2": "^2.0.0" } }, "split-array-stream": { @@ -271,8 +271,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "2.6.1", - "is-stream-ended": "0.1.4" + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" } } } @@ -282,21 +282,21 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.3.tgz", "integrity": "sha512-jt8/R4EqDTQccv5WA9AEaS65llM5+mlxsuWu57G5Os8HTIpgPbcsOVMUeIvmTrBuPUYSoRIMW8d/pvv/95n0+g==", "requires": { - "@types/duplexify": "3.5.0", - "@types/request": "2.47.1", - "arrify": "1.0.1", - "axios": "0.18.0", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auth-library": "1.6.1", - "is": "3.2.1", - "pify": "3.0.0", - "request": "2.87.0", - "retry-request": "4.0.0", - "split-array-stream": "2.0.0", - "stream-events": "1.0.4", - "through2": "2.0.3" + "@types/duplexify": "^3.5.0", + "@types/request": "^2.47.0", + "arrify": "^1.0.1", + "axios": "^0.18.0", + "duplexify": "^3.6.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auth-library": "^1.6.0", + "is": "^3.2.1", + "pify": "^3.0.0", + "request": "^2.87.0", + "retry-request": "^4.0.0", + "split-array-stream": "^2.0.0", + "stream-events": "^1.0.4", + "through2": "^2.0.3" } }, "@google-cloud/common-grpc": { @@ -304,15 +304,15 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.7.1.tgz", "integrity": "sha512-VK2X6rLRJIQMmkTS3p483up/Vb8zZHLoMFSmo17iiqebgaAoDpOhBiXXy4thtfabk02Nu5QtYT0QwM49OeU/ew==", "requires": { - "@google-cloud/common": "0.20.3", - "@grpc/proto-loader": "0.1.0", - "dot-prop": "4.2.0", - "duplexify": "3.6.0", - "extend": "3.0.1", - "grpc": "1.12.4", - "is": "3.2.1", - "retry-request": "4.0.0", - "through2": "2.0.3" + "@google-cloud/common": "^0.20.0", + "@grpc/proto-loader": "^0.1.0", + "dot-prop": "^4.2.0", + "duplexify": "^3.6.0", + "extend": "^3.0.1", + "grpc": "^1.12.3", + "is": "^3.2.1", + "retry-request": "^4.0.0", + "through2": "^2.0.3" } }, "@google-cloud/nodejs-repo-tools": { @@ -329,7 +329,7 @@ "lodash": "4.17.5", "nyc": "11.4.1", "proxyquire": "1.8.0", - "semver": "5.5.0", + "semver": "^5.5.0", "sinon": "4.3.0", "string": "3.3.3", "supertest": "3.0.0", @@ -349,9 +349,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "is-fullwidth-code-point": { @@ -372,33 +372,33 @@ "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", "dev": true, "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "md5-hex": "1.3.0", - "merge-source-map": "1.0.4", - "micromatch": "2.3.11", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.1.1", - "yargs": "10.0.3", - "yargs-parser": "8.0.0" + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.3.0", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^1.9.1", + "istanbul-lib-report": "^1.1.2", + "istanbul-lib-source-maps": "^1.2.2", + "istanbul-reports": "^1.1.3", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.0.2", + "micromatch": "^2.3.11", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.5.4", + "signal-exit": "^3.0.1", + "spawn-wrap": "^1.4.2", + "test-exclude": "^4.1.1", + "yargs": "^10.0.3", + "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { @@ -406,9 +406,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -431,7 +431,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -444,7 +444,7 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -472,9 +472,9 @@ "bundled": true, "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" } }, "babel-generator": { @@ -482,14 +482,14 @@ "bundled": true, "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.6", + "trim-right": "^1.0.1" } }, "babel-messages": { @@ -497,7 +497,7 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -505,8 +505,8 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -514,11 +514,11 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -526,15 +526,15 @@ "bundled": true, "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, "babel-types": { @@ -542,10 +542,10 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -563,7 +563,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -572,9 +572,9 @@ "bundled": true, "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "builtin-modules": { @@ -587,9 +587,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, "camelcase": { @@ -604,8 +604,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -613,11 +613,11 @@ "bundled": true, "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "cliui": { @@ -626,8 +626,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -669,8 +669,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "debug": { @@ -696,7 +696,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "detect-indent": { @@ -704,7 +704,7 @@ "bundled": true, "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "error-ex": { @@ -712,7 +712,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "escape-string-regexp": { @@ -730,13 +730,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -744,9 +744,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -756,7 +756,7 @@ "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -764,7 +764,7 @@ "bundled": true, "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "^2.1.0" } }, "extglob": { @@ -772,7 +772,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "filename-regex": { @@ -785,11 +785,11 @@ "bundled": true, "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "find-cache-dir": { @@ -797,9 +797,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" } }, "find-up": { @@ -807,7 +807,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -820,7 +820,7 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreground-child": { @@ -828,8 +828,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, "fs.realpath": { @@ -852,12 +852,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -865,8 +865,8 @@ "bundled": true, "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -874,7 +874,7 @@ "bundled": true, "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "globals": { @@ -892,10 +892,10 @@ "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -903,7 +903,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -913,7 +913,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { @@ -936,8 +936,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -950,7 +950,7 @@ "bundled": true, "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -973,7 +973,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-dotfile": { @@ -986,7 +986,7 @@ "bundled": true, "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -1004,7 +1004,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -1012,7 +1012,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-glob": { @@ -1020,7 +1020,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-number": { @@ -1028,7 +1028,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-posix-bracket": { @@ -1079,7 +1079,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -1087,13 +1087,13 @@ "bundled": true, "dev": true, "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.1.1", + "semver": "^5.3.0" } }, "istanbul-lib-report": { @@ -1101,10 +1101,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "supports-color": { @@ -1112,7 +1112,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -1122,11 +1122,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" }, "dependencies": { "debug": { @@ -1144,7 +1144,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "js-tokens": { @@ -1162,7 +1162,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -1176,7 +1176,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -1184,11 +1184,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -1196,8 +1196,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -1222,7 +1222,7 @@ "bundled": true, "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "lru-cache": { @@ -1230,8 +1230,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "md5-hex": { @@ -1239,7 +1239,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -1252,7 +1252,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -1260,7 +1260,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } }, "micromatch": { @@ -1268,19 +1268,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "mimic-fn": { @@ -1293,7 +1293,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1319,10 +1319,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -1330,7 +1330,7 @@ "bundled": true, "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "npm-run-path": { @@ -1338,7 +1338,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -1356,8 +1356,8 @@ "bundled": true, "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "once": { @@ -1365,7 +1365,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -1373,8 +1373,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -1387,9 +1387,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "p-finally": { @@ -1407,7 +1407,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "^1.1.0" } }, "parse-glob": { @@ -1415,10 +1415,10 @@ "bundled": true, "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "parse-json": { @@ -1426,7 +1426,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -1434,7 +1434,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -1457,9 +1457,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -1477,7 +1477,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -1485,7 +1485,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -1493,8 +1493,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -1514,8 +1514,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -1523,7 +1523,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -1531,7 +1531,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1541,7 +1541,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1551,9 +1551,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -1561,8 +1561,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -1570,8 +1570,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -1586,7 +1586,7 @@ "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "remove-trailing-separator": { @@ -1609,7 +1609,7 @@ "bundled": true, "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "require-directory": { @@ -1633,7 +1633,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -1641,7 +1641,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "semver": { @@ -1659,7 +1659,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -1687,12 +1687,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.0" + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" } }, "spdx-correct": { @@ -1700,7 +1700,7 @@ "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-license-ids": "^1.0.2" } }, "spdx-expression-parse": { @@ -1718,8 +1718,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -1737,7 +1737,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -1747,7 +1747,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -1755,7 +1755,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -1773,11 +1773,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" + "arrify": "^1.0.1", + "micromatch": "^2.3.11", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, "to-fast-properties": { @@ -1796,9 +1796,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -1807,9 +1807,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -1826,8 +1826,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" } }, "which": { @@ -1835,7 +1835,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -1859,8 +1859,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { "string-width": { @@ -1868,9 +1868,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1885,9 +1885,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "y18n": { @@ -1905,18 +1905,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "8.0.0" + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.0.0" }, "dependencies": { "cliui": { @@ -1924,9 +1924,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" }, "dependencies": { "string-width": { @@ -1934,9 +1934,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1948,7 +1948,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -1966,9 +1966,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "proxyquire": { @@ -1977,9 +1977,9 @@ "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", "dev": true, "requires": { - "fill-keys": "1.0.2", - "module-not-found-error": "1.0.1", - "resolve": "1.1.7" + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.0", + "resolve": "~1.1.7" } }, "string-width": { @@ -1988,8 +1988,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -1998,7 +1998,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "yargs": { @@ -2007,18 +2007,18 @@ "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" } } } @@ -2029,22 +2029,22 @@ "integrity": "sha512-XhIZSnci5fQ9xnhl/VpwVVMFiOt5uGN6S5QMNHmhZqbki/adlKXAmDOD4fncyusOZFK1WTQY35xTWHwxuso25g==", "dev": true, "requires": { - "@google-cloud/common": "0.16.2", - "arrify": "1.0.1", - "async-each": "1.0.1", - "delay": "2.0.0", - "duplexify": "3.6.0", - "extend": "3.0.1", - "google-auto-auth": "0.10.1", - "google-gax": "0.16.1", - "google-proto-files": "0.16.1", - "is": "3.2.1", - "lodash.chunk": "4.2.0", - "lodash.merge": "4.6.1", - "lodash.snakecase": "4.1.1", - "protobufjs": "6.8.6", - "through2": "2.0.3", - "uuid": "3.3.2" + "@google-cloud/common": "^0.16.1", + "arrify": "^1.0.0", + "async-each": "^1.0.1", + "delay": "^2.0.0", + "duplexify": "^3.5.4", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.1", + "google-gax": "^0.16.0", + "google-proto-files": "^0.16.0", + "is": "^3.0.1", + "lodash.chunk": "^4.2.0", + "lodash.merge": "^4.6.0", + "lodash.snakecase": "^4.1.1", + "protobufjs": "^6.8.1", + "through2": "^2.0.3", + "uuid": "^3.1.0" }, "dependencies": { "@google-cloud/common": { @@ -2053,24 +2053,24 @@ "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", "dev": true, "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.9.7", - "is": "3.2.1", + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.9.0", + "is": "^3.2.0", "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.87.0", - "retry-request": "3.3.2", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" }, "dependencies": { "google-auto-auth": { @@ -2079,10 +2079,10 @@ "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", "dev": true, "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.6.1", - "request": "2.87.0" + "async": "^2.3.0", + "gcp-metadata": "^0.6.1", + "google-auth-library": "^1.3.1", + "request": "^2.79.0" } } } @@ -2093,16 +2093,16 @@ "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "dev": true, "requires": { - "duplexify": "3.6.0", - "extend": "3.0.1", - "globby": "8.0.1", - "google-auto-auth": "0.10.1", - "google-proto-files": "0.15.1", - "grpc": "1.12.4", - "is-stream-ended": "0.1.4", - "lodash": "4.17.10", - "protobufjs": "6.8.6", - "through2": "2.0.3" + "duplexify": "^3.5.4", + "extend": "^3.0.0", + "globby": "^8.0.0", + "google-auto-auth": "^0.10.0", + "google-proto-files": "^0.15.0", + "grpc": "^1.10.0", + "is-stream-ended": "^0.1.0", + "lodash": "^4.17.2", + "protobufjs": "^6.8.0", + "through2": "^2.0.3" }, "dependencies": { "google-proto-files": { @@ -2111,9 +2111,9 @@ "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", "dev": true, "requires": { - "globby": "7.1.1", - "power-assert": "1.6.0", - "protobufjs": "6.8.6" + "globby": "^7.1.1", + "power-assert": "^1.4.4", + "protobufjs": "^6.8.0" }, "dependencies": { "globby": { @@ -2122,12 +2122,12 @@ "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "dev": true, "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.10", - "pify": "3.0.0", - "slash": "1.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } } } @@ -2140,8 +2140,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "2.87.0", - "through2": "2.0.3" + "request": "^2.81.0", + "through2": "^2.0.0" } }, "split-array-stream": { @@ -2150,8 +2150,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "2.6.1", - "is-stream-ended": "0.1.4" + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" } } } @@ -2162,27 +2162,27 @@ "integrity": "sha512-QaAxzCkbhspwajoaEnT0GcnQcpjPRcBrHYuQsXtD05BtOJgVnHCLXSsfUiRdU0nVpK+Thp7+sTkQ0fvk5PanKg==", "dev": true, "requires": { - "@google-cloud/common": "0.17.0", - "arrify": "1.0.1", - "async": "2.6.1", - "compressible": "2.0.14", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "extend": "3.0.1", - "gcs-resumable-upload": "0.10.2", - "hash-stream-validation": "0.2.1", - "is": "3.2.1", - "mime": "2.3.1", - "mime-types": "2.1.18", - "once": "1.4.0", - "pumpify": "1.5.1", - "request": "2.87.0", - "safe-buffer": "5.1.2", - "snakeize": "0.1.0", - "stream-events": "1.0.4", - "through2": "2.0.3", - "xdg-basedir": "3.0.0" + "@google-cloud/common": "^0.17.0", + "arrify": "^1.0.0", + "async": "^2.0.1", + "compressible": "^2.0.12", + "concat-stream": "^1.5.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "extend": "^3.0.0", + "gcs-resumable-upload": "^0.10.2", + "hash-stream-validation": "^0.2.1", + "is": "^3.0.1", + "mime": "^2.2.0", + "mime-types": "^2.0.8", + "once": "^1.3.1", + "pumpify": "^1.5.1", + "request": "^2.85.0", + "safe-buffer": "^5.1.1", + "snakeize": "^0.1.0", + "stream-events": "^1.0.1", + "through2": "^2.0.0", + "xdg-basedir": "^3.0.0" }, "dependencies": { "@google-cloud/common": { @@ -2191,24 +2191,24 @@ "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "dev": true, "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.10.1", - "is": "3.2.1", + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.0", + "is": "^3.2.0", "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.87.0", - "retry-request": "3.3.2", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" } }, "retry-request": { @@ -2217,8 +2217,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "2.87.0", - "through2": "2.0.3" + "request": "^2.81.0", + "through2": "^2.0.0" } }, "split-array-stream": { @@ -2227,8 +2227,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "2.6.1", - "is-stream-ended": "0.1.4" + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" } } } @@ -2238,10 +2238,10 @@ "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.1.0.tgz", "integrity": "sha512-GHoZBR5N+65AWazsCiJDxeMSbUpp2qNYbjeD3mP27L2PT25+GvIupIIJiCgULH87NAiAd9SmWMRBVz+uSiHpgA==", "requires": { - "@types/lodash": "4.14.110", - "@types/node": "9.6.22", - "lodash": "4.17.10", - "protobufjs": "6.8.6" + "@types/lodash": "^4.14.104", + "@types/node": "^9.4.6", + "lodash": "^4.17.5", + "protobufjs": "^6.8.6" }, "dependencies": { "@types/node": { @@ -2257,10 +2257,10 @@ "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", "dev": true, "requires": { - "chalk": "0.4.0", - "date-time": "0.1.1", - "pretty-ms": "0.2.2", - "text-table": "0.2.0" + "chalk": "^0.4.0", + "date-time": "^0.1.1", + "pretty-ms": "^0.2.1", + "text-table": "^0.2.0" }, "dependencies": { "ansi-styles": { @@ -2275,9 +2275,9 @@ "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "dev": true, "requires": { - "ansi-styles": "1.0.0", - "has-color": "0.1.7", - "strip-ansi": "0.1.1" + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" } }, "pretty-ms": { @@ -2286,7 +2286,7 @@ "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", "dev": true, "requires": { - "parse-ms": "0.1.2" + "parse-ms": "^0.1.0" } }, "strip-ansi": { @@ -2302,8 +2302,8 @@ "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", "requires": { - "call-me-maybe": "1.0.1", - "glob-to-regexp": "0.3.0" + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" } }, "@nodelib/fs.stat": { @@ -2336,8 +2336,8 @@ "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/inquire": "1.1.0" + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" } }, "@protobufjs/float": { @@ -2390,7 +2390,7 @@ "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", "requires": { - "@types/node": "10.5.1" + "@types/node": "*" } }, "@types/form-data": { @@ -2398,7 +2398,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "10.5.1" + "@types/node": "*" } }, "@types/lodash": { @@ -2421,10 +2421,10 @@ "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.1.tgz", "integrity": "sha512-TV3XLvDjQbIeVxJ1Z3oCTDk/KuYwwcNKVwz2YaT0F5u86Prgc4syDAp6P96rkTQQ4bIdh+VswQIC9zS6NjY7/g==", "requires": { - "@types/caseless": "0.12.1", - "@types/form-data": "2.2.1", - "@types/node": "10.5.1", - "@types/tough-cookie": "2.3.3" + "@types/caseless": "*", + "@types/form-data": "*", + "@types/node": "*", + "@types/tough-cookie": "*" } }, "@types/tough-cookie": { @@ -2448,7 +2448,7 @@ "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "5.7.1" + "acorn": "^5.0.3" } }, "ajv": { @@ -2456,10 +2456,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { @@ -2474,9 +2474,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" }, "dependencies": { "kind-of": { @@ -2485,7 +2485,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2502,7 +2502,7 @@ "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -2523,8 +2523,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -2533,7 +2533,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2555,7 +2555,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.2" + "color-convert": "^1.9.0" } }, "anymatch": { @@ -2564,8 +2564,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" }, "dependencies": { "arr-diff": { @@ -2574,7 +2574,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "array-unique": { @@ -2589,9 +2589,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "expand-brackets": { @@ -2600,7 +2600,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "extglob": { @@ -2609,7 +2609,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-extglob": { @@ -2624,7 +2624,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "kind-of": { @@ -2633,7 +2633,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "micromatch": { @@ -2642,19 +2642,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } } } @@ -2665,7 +2665,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "argv": { @@ -2723,7 +2723,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -2746,8 +2746,8 @@ "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", "requires": { - "colour": "0.7.1", - "optjs": "3.2.2" + "colour": "~0.7.1", + "optjs": "~3.2.2" } }, "asn1": { @@ -2771,7 +2771,7 @@ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "dev": true, "requires": { - "lodash": "4.17.10" + "lodash": "^4.17.10" } }, "async-each": { @@ -2802,89 +2802,89 @@ "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", "dev": true, "requires": { - "@ava/babel-preset-stage-4": "1.1.0", - "@ava/babel-preset-transform-test-files": "3.0.0", - "@ava/write-file-atomic": "2.2.0", - "@concordance/react": "1.0.0", - "@ladjs/time-require": "0.1.4", - "ansi-escapes": "3.1.0", - "ansi-styles": "3.2.1", - "arr-flatten": "1.1.0", - "array-union": "1.0.2", - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "auto-bind": "1.2.1", - "ava-init": "0.2.1", - "babel-core": "6.26.3", - "babel-generator": "6.26.1", - "babel-plugin-syntax-object-rest-spread": "6.13.0", - "bluebird": "3.5.1", - "caching-transform": "1.0.1", - "chalk": "2.4.1", - "chokidar": "1.7.0", - "clean-stack": "1.3.0", - "clean-yaml-object": "0.1.0", - "cli-cursor": "2.1.0", - "cli-spinners": "1.3.1", - "cli-truncate": "1.1.0", - "co-with-promise": "4.6.0", - "code-excerpt": "2.1.1", - "common-path-prefix": "1.0.0", - "concordance": "3.0.0", - "convert-source-map": "1.5.1", - "core-assert": "0.2.1", - "currently-unhandled": "0.4.1", - "debug": "3.1.0", - "dot-prop": "4.2.0", - "empower-core": "0.6.2", - "equal-length": "1.0.1", - "figures": "2.0.0", - "find-cache-dir": "1.0.0", - "fn-name": "2.0.1", - "get-port": "3.2.0", - "globby": "6.1.0", - "has-flag": "2.0.0", - "hullabaloo-config-manager": "1.1.1", - "ignore-by-default": "1.0.1", - "import-local": "0.1.1", - "indent-string": "3.2.0", - "is-ci": "1.1.0", - "is-generator-fn": "1.0.0", - "is-obj": "1.0.1", - "is-observable": "1.1.0", - "is-promise": "2.1.0", - "last-line-stream": "1.0.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.debounce": "4.0.8", - "lodash.difference": "4.5.0", - "lodash.flatten": "4.4.0", - "loud-rejection": "1.6.0", - "make-dir": "1.3.0", - "matcher": "1.1.1", - "md5-hex": "2.0.0", - "meow": "3.7.0", - "ms": "2.0.0", - "multimatch": "2.1.0", - "observable-to-promise": "0.5.0", - "option-chain": "1.0.0", - "package-hash": "2.0.0", - "pkg-conf": "2.1.0", - "plur": "2.1.2", - "pretty-ms": "3.2.0", - "require-precompiled": "0.1.0", - "resolve-cwd": "2.0.0", - "safe-buffer": "5.1.2", - "semver": "5.5.0", - "slash": "1.0.0", - "source-map-support": "0.5.6", - "stack-utils": "1.0.1", - "strip-ansi": "4.0.0", - "strip-bom-buf": "1.0.0", - "supertap": "1.0.0", - "supports-color": "5.4.0", - "trim-off-newlines": "1.0.1", - "unique-temp-dir": "1.0.0", - "update-notifier": "2.5.0" + "@ava/babel-preset-stage-4": "^1.1.0", + "@ava/babel-preset-transform-test-files": "^3.0.0", + "@ava/write-file-atomic": "^2.2.0", + "@concordance/react": "^1.0.0", + "@ladjs/time-require": "^0.1.4", + "ansi-escapes": "^3.0.0", + "ansi-styles": "^3.1.0", + "arr-flatten": "^1.0.1", + "array-union": "^1.0.1", + "array-uniq": "^1.0.2", + "arrify": "^1.0.0", + "auto-bind": "^1.1.0", + "ava-init": "^0.2.0", + "babel-core": "^6.17.0", + "babel-generator": "^6.26.0", + "babel-plugin-syntax-object-rest-spread": "^6.13.0", + "bluebird": "^3.0.0", + "caching-transform": "^1.0.0", + "chalk": "^2.0.1", + "chokidar": "^1.4.2", + "clean-stack": "^1.1.1", + "clean-yaml-object": "^0.1.0", + "cli-cursor": "^2.1.0", + "cli-spinners": "^1.0.0", + "cli-truncate": "^1.0.0", + "co-with-promise": "^4.6.0", + "code-excerpt": "^2.1.1", + "common-path-prefix": "^1.0.0", + "concordance": "^3.0.0", + "convert-source-map": "^1.5.1", + "core-assert": "^0.2.0", + "currently-unhandled": "^0.4.1", + "debug": "^3.0.1", + "dot-prop": "^4.1.0", + "empower-core": "^0.6.1", + "equal-length": "^1.0.0", + "figures": "^2.0.0", + "find-cache-dir": "^1.0.0", + "fn-name": "^2.0.0", + "get-port": "^3.0.0", + "globby": "^6.0.0", + "has-flag": "^2.0.0", + "hullabaloo-config-manager": "^1.1.0", + "ignore-by-default": "^1.0.0", + "import-local": "^0.1.1", + "indent-string": "^3.0.0", + "is-ci": "^1.0.7", + "is-generator-fn": "^1.0.0", + "is-obj": "^1.0.0", + "is-observable": "^1.0.0", + "is-promise": "^2.1.0", + "last-line-stream": "^1.0.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.debounce": "^4.0.3", + "lodash.difference": "^4.3.0", + "lodash.flatten": "^4.2.0", + "loud-rejection": "^1.2.0", + "make-dir": "^1.0.0", + "matcher": "^1.0.0", + "md5-hex": "^2.0.0", + "meow": "^3.7.0", + "ms": "^2.0.0", + "multimatch": "^2.1.0", + "observable-to-promise": "^0.5.0", + "option-chain": "^1.0.0", + "package-hash": "^2.0.0", + "pkg-conf": "^2.0.0", + "plur": "^2.0.0", + "pretty-ms": "^3.0.0", + "require-precompiled": "^0.1.0", + "resolve-cwd": "^2.0.0", + "safe-buffer": "^5.1.1", + "semver": "^5.4.1", + "slash": "^1.0.0", + "source-map-support": "^0.5.0", + "stack-utils": "^1.0.1", + "strip-ansi": "^4.0.0", + "strip-bom-buf": "^1.0.0", + "supertap": "^1.0.0", + "supports-color": "^5.0.0", + "trim-off-newlines": "^1.0.1", + "unique-temp-dir": "^1.0.0", + "update-notifier": "^2.3.0" }, "dependencies": { "ansi-regex": { @@ -2900,7 +2900,7 @@ "dev": true, "requires": { "call-signature": "0.0.2", - "core-js": "2.5.7" + "core-js": "^2.0.0" } }, "globby": { @@ -2909,11 +2909,11 @@ "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { - "array-union": "1.0.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -2934,7 +2934,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "strip-ansi": { @@ -2943,7 +2943,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2954,11 +2954,11 @@ "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", "dev": true, "requires": { - "arr-exclude": "1.0.0", - "execa": "0.7.0", - "has-yarn": "1.0.0", - "read-pkg-up": "2.0.0", - "write-pkg": "3.2.0" + "arr-exclude": "^1.0.0", + "execa": "^0.7.0", + "has-yarn": "^1.0.0", + "read-pkg-up": "^2.0.0", + "write-pkg": "^3.1.0" } }, "aws-sign2": { @@ -2976,8 +2976,8 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "1.5.0", - "is-buffer": "1.1.6" + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" } }, "babel-code-frame": { @@ -2986,9 +2986,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { "ansi-styles": { @@ -3003,11 +3003,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "supports-color": { @@ -3024,25 +3024,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-generator": "6.26.1", - "babel-helpers": "6.24.1", - "babel-messages": "6.23.0", - "babel-register": "6.26.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "convert-source-map": "1.5.1", - "debug": "2.6.9", - "json5": "0.5.1", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "path-is-absolute": "1.0.1", - "private": "0.1.8", - "slash": "1.0.0", - "source-map": "0.5.7" + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" }, "dependencies": { "debug": { @@ -3062,14 +3062,14 @@ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" }, "dependencies": { "jsesc": { @@ -3086,9 +3086,9 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "babel-helper-explode-assignable-expression": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-call-delegate": { @@ -3097,10 +3097,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-explode-assignable-expression": { @@ -3109,9 +3109,9 @@ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-function-name": { @@ -3120,11 +3120,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-get-function-arity": { @@ -3133,8 +3133,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-hoist-variables": { @@ -3143,8 +3143,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-regex": { @@ -3153,9 +3153,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, "babel-helper-remap-async-to-generator": { @@ -3164,11 +3164,11 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "dev": true, "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helpers": { @@ -3177,8 +3177,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, "babel-messages": { @@ -3187,7 +3187,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-check-es2015-constants": { @@ -3196,7 +3196,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-espower": { @@ -3205,13 +3205,13 @@ "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", "dev": true, "requires": { - "babel-generator": "6.26.1", - "babylon": "6.18.0", - "call-matcher": "1.0.1", - "core-js": "2.5.7", - "espower-location-detector": "1.0.0", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "babel-generator": "^6.1.0", + "babylon": "^6.1.0", + "call-matcher": "^1.0.0", + "core-js": "^2.0.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.1.1" } }, "babel-plugin-syntax-async-functions": { @@ -3244,9 +3244,9 @@ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "6.24.1", - "babel-plugin-syntax-async-functions": "6.13.0", - "babel-runtime": "6.26.0" + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -3255,7 +3255,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -3264,9 +3264,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -3275,10 +3275,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-types": "6.26.0" + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -3287,12 +3287,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "6.24.1", - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-spread": { @@ -3301,7 +3301,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -3310,9 +3310,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -3321,9 +3321,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "regexpu-core": "2.0.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { @@ -3332,9 +3332,9 @@ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", - "babel-plugin-syntax-exponentiation-operator": "6.13.0", - "babel-runtime": "6.26.0" + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-strict-mode": { @@ -3343,8 +3343,8 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-register": { @@ -3353,13 +3353,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "6.26.3", - "babel-runtime": "6.26.0", - "core-js": "2.5.7", - "home-or-tmp": "2.0.0", - "lodash": "4.17.10", - "mkdirp": "0.5.1", - "source-map-support": "0.4.18" + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" }, "dependencies": { "source-map-support": { @@ -3368,7 +3368,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -3379,8 +3379,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.7", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -3389,11 +3389,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -3402,15 +3402,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.4", - "lodash": "4.17.10" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" }, "dependencies": { "debug": { @@ -3430,10 +3430,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -3452,13 +3452,13 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -3466,7 +3466,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -3474,7 +3474,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -3482,7 +3482,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -3490,9 +3490,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -3503,7 +3503,7 @@ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "binary-extensions": { @@ -3524,13 +3524,13 @@ "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.4.1", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "2.0.0" + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3557,8 +3557,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3567,7 +3567,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3577,7 +3577,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -3586,16 +3586,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -3603,7 +3603,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -3642,7 +3642,7 @@ "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { - "long": "3.2.0" + "long": "~3" }, "dependencies": { "long": { @@ -3657,15 +3657,15 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "cacheable-request": { @@ -3697,9 +3697,9 @@ "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" }, "dependencies": { "md5-hex": { @@ -3708,7 +3708,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "write-file-atomic": { @@ -3717,9 +3717,9 @@ "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } } } @@ -3730,10 +3730,10 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.7", - "deep-equal": "1.0.1", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "core-js": "^2.0.0", + "deep-equal": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.0.0" } }, "call-me-maybe": { @@ -3752,7 +3752,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -3772,8 +3772,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" }, "dependencies": { "map-obj": { @@ -3801,7 +3801,7 @@ "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", "dev": true, "requires": { - "underscore-contrib": "0.3.0" + "underscore-contrib": "~0.3.0" } }, "center-align": { @@ -3811,8 +3811,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -3821,9 +3821,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "chardet": { @@ -3838,14 +3838,15 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" }, "dependencies": { "glob-parent": { @@ -3854,7 +3855,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -3869,7 +3870,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -3891,10 +3892,10 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -3902,7 +3903,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -3931,7 +3932,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-spinners": { @@ -3946,8 +3947,8 @@ "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", "dev": true, "requires": { - "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "slice-ansi": "^1.0.0", + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3968,8 +3969,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3978,7 +3979,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3994,9 +3995,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, "clone-response": { @@ -4005,7 +4006,7 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "co": { @@ -4019,7 +4020,7 @@ "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", "dev": true, "requires": { - "pinkie-promise": "1.0.0" + "pinkie-promise": "^1.0.0" } }, "code-excerpt": { @@ -4028,7 +4029,7 @@ "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", "dev": true, "requires": { - "convert-to-spaces": "1.0.2" + "convert-to-spaces": "^1.0.1" } }, "code-point-at": { @@ -4043,7 +4044,7 @@ "dev": true, "requires": { "argv": "0.0.2", - "request": "2.87.0", + "request": "^2.81.0", "urlgrey": "0.4.4" } }, @@ -4052,8 +4053,8 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "color-convert": { @@ -4087,7 +4088,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -4119,7 +4120,7 @@ "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", "dev": true, "requires": { - "mime-db": "1.34.0" + "mime-db": ">= 1.34.0 < 2" }, "dependencies": { "mime-db": { @@ -4141,10 +4142,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "1.1.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "concordance": { @@ -4153,17 +4154,17 @@ "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", "dev": true, "requires": { - "date-time": "2.1.0", - "esutils": "2.0.2", - "fast-diff": "1.1.2", - "function-name-support": "0.2.0", - "js-string-escape": "1.0.1", - "lodash.clonedeep": "4.5.0", - "lodash.flattendeep": "4.4.0", - "lodash.merge": "4.6.1", - "md5-hex": "2.0.0", - "semver": "5.5.0", - "well-known-symbols": "1.0.0" + "date-time": "^2.1.0", + "esutils": "^2.0.2", + "fast-diff": "^1.1.1", + "function-name-support": "^0.2.0", + "js-string-escape": "^1.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.flattendeep": "^4.4.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "semver": "^5.3.0", + "well-known-symbols": "^1.0.0" }, "dependencies": { "date-time": { @@ -4172,7 +4173,7 @@ "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "dev": true, "requires": { - "time-zone": "1.0.0" + "time-zone": "^1.0.0" } } } @@ -4183,12 +4184,12 @@ "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.3.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "convert-source-map": { @@ -4220,8 +4221,8 @@ "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", "dev": true, "requires": { - "buf-compare": "1.0.1", - "is-error": "2.2.1" + "buf-compare": "^1.0.0", + "is-error": "^2.2.0" } }, "core-js": { @@ -4240,7 +4241,7 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "1.0.0" + "capture-stack-trace": "^1.0.0" } }, "cross-spawn": { @@ -4249,9 +4250,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.1" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "crypto-random-string": { @@ -4266,7 +4267,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "1.0.2" + "array-find-index": "^1.0.1" } }, "d": { @@ -4275,7 +4276,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.45" + "es5-ext": "^0.10.9" } }, "d64": { @@ -4288,7 +4289,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "date-time": { @@ -4321,7 +4322,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "deep-equal": { @@ -4347,8 +4348,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.12" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "define-property": { @@ -4356,8 +4357,8 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -4365,7 +4366,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -4373,7 +4374,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -4381,9 +4382,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -4394,13 +4395,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.1", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" }, "dependencies": { "globby": { @@ -4409,12 +4410,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -4435,7 +4436,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } } } @@ -4446,7 +4447,7 @@ "integrity": "sha1-kRLq3APk7H4AKXM3iW8nO72R+uU=", "dev": true, "requires": { - "p-defer": "1.0.0" + "p-defer": "^1.0.0" } }, "delayed-stream": { @@ -4460,7 +4461,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "diff": { @@ -4479,8 +4480,8 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "requires": { - "arrify": "1.0.1", - "path-type": "3.0.0" + "arrify": "^1.0.1", + "path-type": "^3.0.0" } }, "doctrine": { @@ -4489,7 +4490,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "dom-serializer": { @@ -4498,8 +4499,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" }, "dependencies": { "domelementtype": { @@ -4522,7 +4523,7 @@ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "domutils": { @@ -4531,8 +4532,8 @@ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" + "dom-serializer": "0", + "domelementtype": "1" } }, "dot-prop": { @@ -4540,7 +4541,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "requires": { - "is-obj": "1.0.1" + "is-obj": "^1.0.0" } }, "duplexer3": { @@ -4554,10 +4555,10 @@ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "requires": { - "end-of-stream": "1.4.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "stream-shift": "1.0.0" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, "eastasianwidth": { @@ -4571,7 +4572,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "ecdsa-sig-formatter": { @@ -4579,7 +4580,7 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "empower": { @@ -4587,8 +4588,8 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.0.tgz", "integrity": "sha512-tP2WqM7QzrPguCCQEQfFFDF+6Pw6YWLQal3+GHQaV+0uIr0S+jyREQPWljE02zFCYPFYLZ3LosiRV+OzTrxPpQ==", "requires": { - "core-js": "2.5.7", - "empower-core": "1.2.0" + "core-js": "^2.0.0", + "empower-core": "^1.2.0" } }, "empower-assert": { @@ -4597,7 +4598,7 @@ "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.2.0" } }, "empower-core": { @@ -4606,7 +4607,7 @@ "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.7" + "core-js": "^2.0.0" } }, "end-of-stream": { @@ -4614,7 +4615,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "ent": { @@ -4640,7 +4641,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -4649,11 +4650,11 @@ "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", "dev": true, "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.3", - "is-callable": "1.1.3", - "is-regex": "1.0.4" + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -4662,9 +4663,9 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" } }, "es5-ext": { @@ -4673,9 +4674,9 @@ "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", "dev": true, "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "next-tick": "1.0.0" + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" } }, "es6-error": { @@ -4690,9 +4691,9 @@ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, "es6-map": { @@ -4701,12 +4702,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" } }, "es6-set": { @@ -4715,11 +4716,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45", - "es6-iterator": "2.0.3", + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "event-emitter": "~0.3.5" } }, "es6-symbol": { @@ -4728,8 +4729,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45" + "d": "1", + "es5-ext": "~0.10.14" } }, "es6-weak-map": { @@ -4738,10 +4739,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" } }, "escallmatch": { @@ -4750,8 +4751,8 @@ "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", "dev": true, "requires": { - "call-matcher": "1.0.1", - "esprima": "2.7.3" + "call-matcher": "^1.0.0", + "esprima": "^2.0.0" }, "dependencies": { "esprima": { @@ -4774,11 +4775,11 @@ "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", "dev": true, "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" }, "dependencies": { "esprima": { @@ -4802,10 +4803,10 @@ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint": { @@ -4814,44 +4815,44 @@ "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", "dev": true, "requires": { - "ajv": "6.5.2", - "babel-code-frame": "6.26.0", - "chalk": "2.4.1", - "cross-spawn": "6.0.5", - "debug": "3.1.0", - "doctrine": "2.1.0", - "eslint-scope": "4.0.0", - "eslint-visitor-keys": "1.0.0", - "espree": "4.0.0", - "esquery": "1.0.1", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.7.0", - "ignore": "3.3.10", - "imurmurhash": "0.1.4", - "inquirer": "5.2.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.12.0", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", - "regexpp": "1.1.0", - "require-uncached": "1.0.3", - "semver": "5.5.0", - "string.prototype.matchall": "2.0.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", - "table": "4.0.3", - "text-table": "0.2.0" + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.5.0", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.1.0", + "require-uncached": "^1.0.3", + "semver": "^5.5.0", + "string.prototype.matchall": "^2.0.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" }, "dependencies": { "ajv": { @@ -4860,10 +4861,10 @@ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" } }, "ansi-regex": { @@ -4878,11 +4879,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "1.0.4", - "path-key": "2.0.1", - "semver": "5.5.0", - "shebang-command": "1.2.0", - "which": "1.3.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "fast-deep-equal": { @@ -4909,7 +4910,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -4920,7 +4921,7 @@ "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { - "get-stdin": "5.0.1" + "get-stdin": "^5.0.1" }, "dependencies": { "get-stdin": { @@ -4937,10 +4938,10 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "3.3.10", - "minimatch": "3.0.4", - "resolve": "1.8.1", - "semver": "5.5.0" + "ignore": "^3.3.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", + "semver": "^5.4.1" }, "dependencies": { "resolve": { @@ -4949,7 +4950,7 @@ "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } } } @@ -4960,8 +4961,8 @@ "integrity": "sha512-wNZ2z0oVCWnf+3BSI7roS+z4gGu2AwcPKUek+SlLZMZg+X0KbZLsB2knul7fd0K3iuIp402HIYzm4f2+OyfXxA==", "dev": true, "requires": { - "fast-diff": "1.1.2", - "jest-docblock": "21.2.0" + "fast-diff": "^1.1.1", + "jest-docblock": "^21.0.0" } }, "eslint-scope": { @@ -4970,8 +4971,8 @@ "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint-visitor-keys": { @@ -4986,16 +4987,16 @@ "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", "dev": true, "requires": { - "array-find": "1.0.0", - "escallmatch": "1.5.0", - "escodegen": "1.10.0", - "escope": "3.6.0", - "espower-location-detector": "1.0.0", - "espurify": "1.8.0", - "estraverse": "4.2.0", - "source-map": "0.5.7", - "type-name": "2.0.2", - "xtend": "4.0.1" + "array-find": "^1.0.0", + "escallmatch": "^1.5.0", + "escodegen": "^1.7.0", + "escope": "^3.3.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.3.0", + "estraverse": "^4.1.0", + "source-map": "^0.5.0", + "type-name": "^2.0.0", + "xtend": "^4.0.0" } }, "espower-loader": { @@ -5004,11 +5005,11 @@ "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", "dev": true, "requires": { - "convert-source-map": "1.5.1", - "espower-source": "2.3.0", - "minimatch": "3.0.4", - "source-map-support": "0.4.18", - "xtend": "4.0.1" + "convert-source-map": "^1.1.0", + "espower-source": "^2.0.0", + "minimatch": "^3.0.0", + "source-map-support": "^0.4.0", + "xtend": "^4.0.0" }, "dependencies": { "source-map-support": { @@ -5017,7 +5018,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -5028,10 +5029,10 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "1.2.4", - "path-is-absolute": "1.0.1", - "source-map": "0.5.7", - "xtend": "4.0.1" + "is-url": "^1.2.1", + "path-is-absolute": "^1.0.0", + "source-map": "^0.5.0", + "xtend": "^4.0.0" } }, "espower-source": { @@ -5040,17 +5041,17 @@ "integrity": "sha512-Wc4kC4zUAEV7Qt31JRPoBUc5jjowHRylml2L2VaDQ1XEbnqQofGWx+gPR03TZAPokAMl5dqyL36h3ITyMXy3iA==", "dev": true, "requires": { - "acorn": "5.7.1", - "acorn-es7-plugin": "1.1.7", - "convert-source-map": "1.5.1", - "empower-assert": "1.1.0", - "escodegen": "1.10.0", - "espower": "2.1.1", - "estraverse": "4.2.0", - "merge-estraverse-visitors": "1.0.0", - "multi-stage-sourcemap": "0.2.1", - "path-is-absolute": "1.0.1", - "xtend": "4.0.1" + "acorn": "^5.0.0", + "acorn-es7-plugin": "^1.0.10", + "convert-source-map": "^1.1.1", + "empower-assert": "^1.0.0", + "escodegen": "^1.10.0", + "espower": "^2.1.1", + "estraverse": "^4.0.0", + "merge-estraverse-visitors": "^1.0.0", + "multi-stage-sourcemap": "^0.2.1", + "path-is-absolute": "^1.0.0", + "xtend": "^4.0.0" } }, "espree": { @@ -5059,8 +5060,8 @@ "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { - "acorn": "5.7.1", - "acorn-jsx": "4.1.1" + "acorn": "^5.6.0", + "acorn-jsx": "^4.1.1" } }, "esprima": { @@ -5074,7 +5075,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", "requires": { - "core-js": "2.5.7" + "core-js": "^2.0.0" } }, "esquery": { @@ -5083,7 +5084,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -5092,7 +5093,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -5112,8 +5113,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45" + "d": "1", + "es5-ext": "~0.10.14" } }, "eventid": { @@ -5121,8 +5122,8 @@ "resolved": "https://registry.npmjs.org/eventid/-/eventid-0.1.2.tgz", "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", "requires": { - "d64": "1.0.0", - "uuid": "3.3.2" + "d64": "^1.0.0", + "uuid": "^3.0.1" } }, "execa": { @@ -5131,13 +5132,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, "expand-brackets": { @@ -5145,13 +5146,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "debug": { @@ -5167,7 +5168,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -5175,7 +5176,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -5186,7 +5187,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.4" + "fill-range": "^2.1.0" }, "dependencies": { "fill-range": { @@ -5195,11 +5196,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "3.0.0", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "is-number": { @@ -5208,7 +5209,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "isobject": { @@ -5226,7 +5227,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -5241,8 +5242,8 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -5250,7 +5251,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -5261,9 +5262,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.23", - "tmp": "0.0.33" + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" } }, "extglob": { @@ -5271,14 +5272,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -5286,7 +5287,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -5294,7 +5295,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -5302,7 +5303,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -5310,7 +5311,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -5318,9 +5319,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -5346,12 +5347,12 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { - "@mrmlnc/readdir-enhanced": "2.2.1", - "@nodelib/fs.stat": "1.1.0", - "glob-parent": "3.1.0", - "is-glob": "4.0.0", - "merge2": "1.2.2", - "micromatch": "3.1.10" + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" } }, "fast-json-stable-stringify": { @@ -5371,7 +5372,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -5380,8 +5381,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "filename-regex": { @@ -5396,8 +5397,8 @@ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", "dev": true, "requires": { - "is-object": "1.0.1", - "merge-descriptors": "1.0.1" + "is-object": "~1.0.1", + "merge-descriptors": "~1.0.0" } }, "fill-range": { @@ -5405,10 +5406,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -5416,7 +5417,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -5427,9 +5428,9 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "1.0.1", - "make-dir": "1.3.0", - "pkg-dir": "2.0.0" + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" } }, "find-up": { @@ -5438,7 +5439,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -5447,10 +5448,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" } }, "fn-name": { @@ -5464,7 +5465,7 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", "requires": { - "debug": "3.1.0" + "debug": "^3.1.0" } }, "for-in": { @@ -5478,7 +5479,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreach": { @@ -5496,9 +5497,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "0.4.0", + "asynckit": "^0.4.0", "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "mime-types": "^2.1.12" } }, "formidable": { @@ -5512,7 +5513,7 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "from2": { @@ -5521,8 +5522,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" } }, "fs-extra": { @@ -5531,9 +5532,9 @@ "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.2" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "fs.realpath": { @@ -5541,6 +5542,535 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -5564,8 +6094,8 @@ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", "requires": { - "axios": "0.18.0", - "extend": "3.0.1", + "axios": "^0.18.0", + "extend": "^3.0.1", "retry-axios": "0.3.2" } }, @@ -5575,11 +6105,11 @@ "integrity": "sha1-fymz7iPc7EFwNnwHEUGCScZgVF8=", "dev": true, "requires": { - "configstore": "3.1.2", - "google-auto-auth": "0.10.1", - "pumpify": "1.5.1", - "request": "2.87.0", - "stream-events": "1.0.4" + "configstore": "^3.1.2", + "google-auto-auth": "^0.10.0", + "pumpify": "^1.4.0", + "request": "^2.85.0", + "stream-events": "^1.0.3" } }, "get-caller-file": { @@ -5616,7 +6146,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "glob": { @@ -5624,12 +6154,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -5638,8 +6168,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" }, "dependencies": { "glob-parent": { @@ -5648,7 +6178,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -5663,7 +6193,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -5673,8 +6203,8 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { @@ -5682,7 +6212,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.0" } } } @@ -5698,7 +6228,7 @@ "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, "requires": { - "ini": "1.3.5" + "ini": "^1.3.4" } }, "globals": { @@ -5712,13 +6242,13 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "fast-glob": "2.2.2", - "glob": "7.1.2", - "ignore": "3.3.10", - "pify": "3.0.0", - "slash": "1.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } }, "google-auth-library": { @@ -5726,13 +6256,13 @@ "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz", "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==", "requires": { - "axios": "0.18.0", - "gcp-metadata": "0.6.3", - "gtoken": "2.3.0", - "jws": "3.1.5", - "lodash.isstring": "4.0.1", - "lru-cache": "4.1.3", - "retry-axios": "0.3.2" + "axios": "^0.18.0", + "gcp-metadata": "^0.6.3", + "gtoken": "^2.3.0", + "jws": "^3.1.5", + "lodash.isstring": "^4.0.1", + "lru-cache": "^4.1.3", + "retry-axios": "^0.3.2" } }, "google-auto-auth": { @@ -5741,10 +6271,10 @@ "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "dev": true, "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.6.1", - "request": "2.87.0" + "async": "^2.3.0", + "gcp-metadata": "^0.6.1", + "google-auth-library": "^1.3.1", + "request": "^2.79.0" } }, "google-gax": { @@ -5752,17 +6282,17 @@ "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.17.1.tgz", "integrity": "sha512-fAKvFx++SRr6bGWamWuVOkJzJnQqMgpJkhaB2oEwfFJ91rbFgEmIPRmZZ/MeIVVFUOuHUVyZ8nwjm5peyTZJ6g==", "requires": { - "duplexify": "3.6.0", - "extend": "3.0.1", - "globby": "8.0.1", - "google-auth-library": "1.6.1", - "google-proto-files": "0.16.1", - "grpc": "1.12.4", - "is-stream-ended": "0.1.4", - "lodash": "4.17.10", - "protobufjs": "6.8.6", - "retry-request": "4.0.0", - "through2": "2.0.3" + "duplexify": "^3.6.0", + "extend": "^3.0.1", + "globby": "^8.0.1", + "google-auth-library": "^1.6.1", + "google-proto-files": "^0.16.0", + "grpc": "^1.12.2", + "is-stream-ended": "^0.1.4", + "lodash": "^4.17.10", + "protobufjs": "^6.8.6", + "retry-request": "^4.0.0", + "through2": "^2.0.3" } }, "google-p12-pem": { @@ -5770,8 +6300,8 @@ "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", "requires": { - "node-forge": "0.7.5", - "pify": "3.0.0" + "node-forge": "^0.7.4", + "pify": "^3.0.0" } }, "google-proto-files": { @@ -5779,9 +6309,9 @@ "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", "requires": { - "globby": "8.0.1", - "power-assert": "1.6.0", - "protobufjs": "6.8.6" + "globby": "^8.0.0", + "power-assert": "^1.4.4", + "protobufjs": "^6.8.0" } }, "got": { @@ -5790,23 +6320,23 @@ "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", "dev": true, "requires": { - "@sindresorhus/is": "0.7.0", - "cacheable-request": "2.1.4", - "decompress-response": "3.3.0", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "into-stream": "3.1.0", - "is-retry-allowed": "1.1.0", - "isurl": "1.0.0", - "lowercase-keys": "1.0.1", - "mimic-response": "1.0.0", - "p-cancelable": "0.3.0", - "p-timeout": "2.0.1", - "pify": "3.0.0", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "url-parse-lax": "3.0.0", - "url-to-options": "1.0.1" + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" }, "dependencies": { "prepend-http": { @@ -5821,7 +6351,7 @@ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "2.0.0" + "prepend-http": "^2.0.0" } } } @@ -5843,10 +6373,10 @@ "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", "requires": { - "lodash": "4.17.10", - "nan": "2.10.0", - "node-pre-gyp": "0.10.0", - "protobufjs": "5.0.3" + "lodash": "^4.17.5", + "nan": "^2.0.0", + "node-pre-gyp": "^0.10.0", + "protobufjs": "^5.0.3" }, "dependencies": { "abbrev": { @@ -5865,8 +6395,8 @@ "version": "1.1.5", "bundled": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -5877,7 +6407,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -5924,7 +6454,7 @@ "version": "1.2.5", "bundled": true, "requires": { - "minipass": "2.3.3" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -5935,26 +6465,26 @@ "version": "2.7.4", "bundled": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.3" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "glob": { "version": "7.1.2", "bundled": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -5965,22 +6495,22 @@ "version": "0.4.23", "bundled": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { "version": "3.0.1", "bundled": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -5995,7 +6525,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -6006,7 +6536,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -6017,15 +6547,15 @@ "version": "2.3.3", "bundled": true, "requires": { - "safe-buffer": "5.1.2", - "yallist": "3.0.2" + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" } }, "minizlib": { "version": "1.1.0", "bundled": true, "requires": { - "minipass": "2.3.3" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -6049,33 +6579,33 @@ "version": "2.2.1", "bundled": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.23", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { "version": "0.10.0", "bundled": true, "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.1", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.8", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.4" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, "nopt": { "version": "4.0.1", "bundled": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -6086,18 +6616,18 @@ "version": "1.1.10", "bundled": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { "version": "4.1.2", "bundled": true, "requires": { - "are-we-there-yet": "1.1.5", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { @@ -6112,7 +6642,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -6127,8 +6657,8 @@ "version": "0.1.5", "bundled": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -6144,40 +6674,40 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { - "ascli": "1.0.1", - "bytebuffer": "5.0.1", - "glob": "7.1.2", - "yargs": "3.32.0" + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" } }, "rc": { "version": "1.2.8", "bundled": true, "requires": { - "deep-extend": "0.6.0", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" } }, "readable-stream": { "version": "2.3.6", "bundled": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { "version": "2.6.2", "bundled": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { @@ -6204,27 +6734,27 @@ "version": "3.0.2", "bundled": true }, - "string_decoder": { - "version": "1.1.1", + "string-width": { + "version": "1.0.2", "bundled": true, "requires": { - "safe-buffer": "5.1.2" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, - "string-width": { - "version": "1.0.2", + "string_decoder": { + "version": "1.1.1", "bundled": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -6235,13 +6765,13 @@ "version": "4.4.4", "bundled": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.3.3", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.2", - "yallist": "3.0.2" + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.3", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" } }, "util-deprecate": { @@ -6252,7 +6782,7 @@ "version": "1.1.3", "bundled": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -6270,11 +6800,11 @@ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", "requires": { - "axios": "0.18.0", - "google-p12-pem": "1.0.2", - "jws": "3.1.5", - "mime": "2.3.1", - "pify": "3.0.0" + "axios": "^0.18.0", + "google-p12-pem": "^1.0.0", + "jws": "^3.1.4", + "mime": "^2.2.0", + "pify": "^3.0.0" } }, "handlebars": { @@ -6283,10 +6813,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "async": { @@ -6301,7 +6831,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -6316,8 +6846,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" + "ajv": "^5.1.0", + "har-schema": "^2.0.0" } }, "has": { @@ -6326,7 +6856,7 @@ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.1.1" } }, "has-ansi": { @@ -6335,7 +6865,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-color": { @@ -6368,7 +6898,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "1.4.2" + "has-symbol-support-x": "^1.4.1" } }, "has-value": { @@ -6376,9 +6906,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -6386,8 +6916,8 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { @@ -6395,7 +6925,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6412,7 +6942,7 @@ "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "he": { @@ -6427,8 +6957,8 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" } }, "hosted-git-info": { @@ -6443,12 +6973,12 @@ "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "dev": true, "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.4.2", - "domutils": "1.7.0", - "entities": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" } }, "http-cache-semantics": { @@ -6462,9 +6992,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.14.2" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "hullabaloo-config-manager": { @@ -6473,20 +7003,20 @@ "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "es6-error": "4.1.1", - "graceful-fs": "4.1.11", - "indent-string": "3.2.0", - "json5": "0.5.1", - "lodash.clonedeep": "4.5.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.isequal": "4.5.0", - "lodash.merge": "4.6.1", - "md5-hex": "2.0.0", - "package-hash": "2.0.0", - "pkg-dir": "2.0.0", - "resolve-from": "3.0.0", - "safe-buffer": "5.1.2" + "dot-prop": "^4.1.0", + "es6-error": "^4.0.2", + "graceful-fs": "^4.1.11", + "indent-string": "^3.1.0", + "json5": "^0.5.1", + "lodash.clonedeep": "^4.5.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.isequal": "^4.5.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "package-hash": "^2.0.0", + "pkg-dir": "^2.0.0", + "resolve-from": "^3.0.0", + "safe-buffer": "^5.0.1" } }, "iconv-lite": { @@ -6495,7 +7025,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { @@ -6521,8 +7051,8 @@ "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", "dev": true, "requires": { - "pkg-dir": "2.0.0", - "resolve-cwd": "2.0.0" + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" } }, "imurmurhash": { @@ -6547,8 +7077,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -6564,10 +7094,11 @@ }, "ink-docstrap": { "version": "git+https://github.com/docstrap/docstrap.git#1e56828b819bcbc9855543bd20809a0aed415a80", + "from": "git+https://github.com/docstrap/docstrap.git", "dev": true, "requires": { - "moment": "2.22.2", - "sanitize-html": "1.18.2" + "moment": "^2.14.1", + "sanitize-html": "^1.13.0" } }, "inquirer": { @@ -6576,19 +7107,19 @@ "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { - "ansi-escapes": "3.1.0", - "chalk": "2.4.1", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.2.0", - "figures": "2.0.0", - "lodash": "4.17.10", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rxjs": "5.5.11", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" }, "dependencies": { "ansi-regex": { @@ -6609,8 +7140,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -6619,7 +7150,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -6630,7 +7161,7 @@ "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", "dev": true, "requires": { - "espower-loader": "1.2.2" + "espower-loader": "^1.0.0" } }, "into-stream": { @@ -6639,8 +7170,8 @@ "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "requires": { - "from2": "2.3.0", - "p-is-promise": "1.1.0" + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" } }, "invariant": { @@ -6649,7 +7180,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -6673,7 +7204,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6681,7 +7212,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6698,7 +7229,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -6712,7 +7243,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-callable": { @@ -6727,7 +7258,7 @@ "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "1.1.3" + "ci-info": "^1.0.0" } }, "is-data-descriptor": { @@ -6735,7 +7266,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6743,7 +7274,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6759,9 +7290,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -6783,7 +7314,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-error": { @@ -6808,7 +7339,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -6816,7 +7347,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-generator-fn": { @@ -6830,7 +7361,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.1" } }, "is-installed-globally": { @@ -6839,8 +7370,8 @@ "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { - "global-dirs": "0.1.1", - "is-path-inside": "1.0.1" + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" } }, "is-npm": { @@ -6854,7 +7385,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6862,7 +7393,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6884,7 +7415,7 @@ "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "1.2.0" + "symbol-observable": "^1.1.0" } }, "is-path-cwd": { @@ -6899,7 +7430,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -6908,7 +7439,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-plain-obj": { @@ -6922,7 +7453,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-posix-bracket": { @@ -6955,7 +7486,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.3" + "has": "^1.0.1" } }, "is-resolvable": { @@ -7047,8 +7578,8 @@ "@babel/template": "7.0.0-beta.51", "@babel/traverse": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "istanbul-lib-coverage": "2.0.0", - "semver": "5.5.0" + "istanbul-lib-coverage": "^2.0.0", + "semver": "^5.5.0" } }, "isurl": { @@ -7057,8 +7588,8 @@ "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "has-to-string-tag-x": "1.4.1", - "is-object": "1.0.1" + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" } }, "jest-docblock": { @@ -7085,8 +7616,8 @@ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "js2xmlparser": { @@ -7095,7 +7626,7 @@ "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", "dev": true, "requires": { - "xmlcreate": "1.0.2" + "xmlcreate": "^1.0.1" } }, "jsbn": { @@ -7111,17 +7642,17 @@ "dev": true, "requires": { "babylon": "7.0.0-beta.19", - "bluebird": "3.5.1", - "catharsis": "0.8.9", - "escape-string-regexp": "1.0.5", - "js2xmlparser": "3.0.0", - "klaw": "2.0.0", - "marked": "0.3.19", - "mkdirp": "0.5.1", - "requizzle": "0.2.1", - "strip-json-comments": "2.0.1", + "bluebird": "~3.5.0", + "catharsis": "~0.8.9", + "escape-string-regexp": "~1.0.5", + "js2xmlparser": "~3.0.0", + "klaw": "~2.0.0", + "marked": "~0.3.6", + "mkdirp": "~0.5.1", + "requizzle": "~0.2.1", + "strip-json-comments": "~2.0.1", "taffydb": "2.6.2", - "underscore": "1.8.3" + "underscore": "~1.8.3" }, "dependencies": { "babylon": { @@ -7183,7 +7714,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsprim": { @@ -7210,7 +7741,7 @@ "requires": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "jws": { @@ -7218,8 +7749,8 @@ "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", "requires": { - "jwa": "1.1.6", - "safe-buffer": "5.1.2" + "jwa": "^1.1.5", + "safe-buffer": "^5.0.1" } }, "keyv": { @@ -7242,7 +7773,7 @@ "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.9" } }, "last-line-stream": { @@ -7251,7 +7782,7 @@ "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "latest-version": { @@ -7260,7 +7791,7 @@ "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "4.0.1" + "package-json": "^4.0.0" } }, "lazy-cache": { @@ -7275,7 +7806,7 @@ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "levn": { @@ -7284,8 +7815,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "load-json-file": { @@ -7294,10 +7825,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" }, "dependencies": { "pify": { @@ -7314,8 +7845,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -7440,7 +7971,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "loud-rejection": { @@ -7449,8 +7980,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" } }, "lowercase-keys": { @@ -7464,8 +7995,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "make-dir": { @@ -7474,7 +8005,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "map-cache": { @@ -7492,7 +8023,7 @@ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "marked": { @@ -7507,7 +8038,7 @@ "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.4" } }, "math-random": { @@ -7522,7 +8053,7 @@ "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -7537,7 +8068,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "meow": { @@ -7546,16 +8077,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" }, "dependencies": { "find-up": { @@ -7564,8 +8095,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "load-json-file": { @@ -7574,11 +8105,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "map-obj": { @@ -7599,7 +8130,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-type": { @@ -7608,9 +8139,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -7631,7 +8162,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "read-pkg": { @@ -7640,9 +8171,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -7651,8 +8182,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" } }, "strip-bom": { @@ -7661,7 +8192,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -7678,7 +8209,7 @@ "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "merge2": { @@ -7703,19 +8234,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.13", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } }, "mime": { @@ -7733,7 +8264,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "mime-db": "1.33.0" + "mime-db": "~1.33.0" } }, "mimic-fn": { @@ -7753,7 +8284,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -7767,8 +8298,8 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -7776,7 +8307,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -7838,7 +8369,7 @@ "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", "dev": true, "requires": { - "source-map": "0.1.43" + "source-map": "^0.1.34" }, "dependencies": { "source-map": { @@ -7847,7 +8378,7 @@ "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -7858,10 +8389,10 @@ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "dev": true, "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" } }, "mute-stream": { @@ -7880,17 +8411,17 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" } }, "natural-compare": { @@ -7917,11 +8448,11 @@ "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", "dev": true, "requires": { - "@sinonjs/formatio": "2.0.0", - "just-extend": "1.1.27", - "lolex": "2.7.0", - "path-to-regexp": "1.7.0", - "text-encoding": "0.6.4" + "@sinonjs/formatio": "^2.0.0", + "just-extend": "^1.1.27", + "lolex": "^2.3.2", + "path-to-regexp": "^1.7.0", + "text-encoding": "^0.6.4" } }, "node-forge": { @@ -7935,10 +8466,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.6.1", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -7947,7 +8478,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "normalize-url": { @@ -7956,9 +8487,9 @@ "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { - "prepend-http": "2.0.0", - "query-string": "5.1.1", - "sort-keys": "2.0.0" + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" }, "dependencies": { "prepend-http": { @@ -7975,7 +8506,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -7989,33 +8520,33 @@ "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", "dev": true, "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.2.0", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "2.3.0", - "istanbul-lib-report": "1.1.3", - "istanbul-lib-source-maps": "1.2.5", - "istanbul-reports": "1.4.1", - "md5-hex": "1.3.0", - "merge-source-map": "1.1.0", - "micromatch": "3.1.10", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.2.1", + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.5.1", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^2.1.0", + "istanbul-lib-report": "^1.1.3", + "istanbul-lib-source-maps": "^1.2.5", + "istanbul-reports": "^1.4.1", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.1.0", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.1", + "spawn-wrap": "^1.4.2", + "test-exclude": "^4.2.0", "yargs": "11.1.0", - "yargs-parser": "8.1.0" + "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { @@ -8023,9 +8554,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -8043,7 +8574,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -8101,13 +8632,13 @@ "bundled": true, "dev": true, "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -8115,7 +8646,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -8123,7 +8654,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8131,7 +8662,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8139,9 +8670,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -8156,7 +8687,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -8165,16 +8696,16 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -8182,7 +8713,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8197,15 +8728,15 @@ "bundled": true, "dev": true, "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "caching-transform": { @@ -8213,9 +8744,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, "camelcase": { @@ -8230,8 +8761,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "class-utils": { @@ -8239,10 +8770,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -8250,7 +8781,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -8261,8 +8792,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -8284,8 +8815,8 @@ "bundled": true, "dev": true, "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "commondir": { @@ -8318,8 +8849,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.3", - "which": "1.3.1" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "debug": { @@ -8350,7 +8881,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "define-property": { @@ -8358,8 +8889,8 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -8367,7 +8898,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8375,7 +8906,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8383,9 +8914,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -8400,7 +8931,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "execa": { @@ -8408,13 +8939,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -8422,9 +8953,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.1" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -8434,13 +8965,13 @@ "bundled": true, "dev": true, "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "debug": { @@ -8456,7 +8987,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -8464,7 +8995,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8474,8 +9005,8 @@ "bundled": true, "dev": true, "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -8483,7 +9014,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -8493,14 +9024,14 @@ "bundled": true, "dev": true, "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -8508,7 +9039,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -8516,7 +9047,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -8524,7 +9055,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8532,7 +9063,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8540,9 +9071,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -8557,10 +9088,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -8568,7 +9099,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8578,9 +9109,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" } }, "find-up": { @@ -8588,7 +9119,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -8601,8 +9132,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, "fragment-cache": { @@ -8610,7 +9141,7 @@ "bundled": true, "dev": true, "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "fs.realpath": { @@ -8638,12 +9169,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "graceful-fs": { @@ -8656,10 +9187,10 @@ "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -8667,7 +9198,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -8677,9 +9208,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -8687,8 +9218,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { @@ -8696,7 +9227,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -8716,8 +9247,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -8735,7 +9266,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-arrayish": { @@ -8753,7 +9284,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-data-descriptor": { @@ -8761,7 +9292,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-descriptor": { @@ -8769,9 +9300,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -8796,7 +9327,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-odd": { @@ -8804,7 +9335,7 @@ "bundled": true, "dev": true, "requires": { - "is-number": "4.0.0" + "is-number": "^4.0.0" }, "dependencies": { "is-number": { @@ -8819,7 +9350,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-stream": { @@ -8862,7 +9393,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-report": { @@ -8870,10 +9401,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.2", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "has-flag": { @@ -8886,7 +9417,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -8896,11 +9427,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" } }, "istanbul-reports": { @@ -8908,7 +9439,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "kind-of": { @@ -8916,7 +9447,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -8930,7 +9461,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -8938,11 +9469,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -8950,8 +9481,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -8971,8 +9502,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "map-cache": { @@ -8985,7 +9516,7 @@ "bundled": true, "dev": true, "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "md5-hex": { @@ -8993,7 +9524,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -9006,7 +9537,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -9014,7 +9545,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.6.1" + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -9029,19 +9560,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" }, "dependencies": { "kind-of": { @@ -9061,7 +9592,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -9074,8 +9605,8 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -9083,7 +9614,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -9106,18 +9637,18 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "kind-of": { @@ -9132,10 +9663,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "npm-run-path": { @@ -9143,7 +9674,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -9161,9 +9692,9 @@ "bundled": true, "dev": true, "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -9171,7 +9702,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9181,7 +9712,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.pick": { @@ -9189,7 +9720,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "once": { @@ -9197,7 +9728,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -9205,8 +9736,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -9219,9 +9750,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "p-finally": { @@ -9234,7 +9765,7 @@ "bundled": true, "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -9242,7 +9773,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-try": { @@ -9255,7 +9786,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "pascalcase": { @@ -9268,7 +9799,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -9291,9 +9822,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -9311,7 +9842,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -9319,7 +9850,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -9327,8 +9858,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -9348,9 +9879,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -9358,8 +9889,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -9367,8 +9898,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -9378,8 +9909,8 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "repeat-element": { @@ -9423,7 +9954,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -9431,7 +9962,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-regex": { @@ -9439,7 +9970,7 @@ "bundled": true, "dev": true, "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "semver": { @@ -9457,10 +9988,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -9468,7 +9999,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9478,7 +10009,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -9501,14 +10032,14 @@ "bundled": true, "dev": true, "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.2", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { "debug": { @@ -9524,7 +10055,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -9532,7 +10063,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9542,9 +10073,9 @@ "bundled": true, "dev": true, "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -9552,7 +10083,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -9560,7 +10091,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -9568,7 +10099,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -9576,9 +10107,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -9593,7 +10124,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" } }, "source-map": { @@ -9606,11 +10137,11 @@ "bundled": true, "dev": true, "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-url": { @@ -9623,12 +10154,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.1" + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" } }, "spdx-correct": { @@ -9636,8 +10167,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -9650,8 +10181,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -9664,7 +10195,7 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "static-extend": { @@ -9672,8 +10203,8 @@ "bundled": true, "dev": true, "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -9681,7 +10212,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9691,8 +10222,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -9700,7 +10231,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "strip-bom": { @@ -9708,7 +10239,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -9721,11 +10252,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "3.1.10", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" + "arrify": "^1.0.1", + "micromatch": "^3.1.8", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, "to-object-path": { @@ -9733,7 +10264,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "to-regex": { @@ -9741,10 +10272,10 @@ "bundled": true, "dev": true, "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -9752,8 +10283,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, "uglify-js": { @@ -9762,9 +10293,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -9773,9 +10304,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -9792,10 +10323,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -9803,7 +10334,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -9811,10 +10342,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -9824,8 +10355,8 @@ "bundled": true, "dev": true, "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -9833,9 +10364,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -9865,7 +10396,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" }, "dependencies": { "kind-of": { @@ -9880,8 +10411,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "which": { @@ -9889,7 +10420,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -9913,8 +10444,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { "ansi-regex": { @@ -9927,7 +10458,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -9935,9 +10466,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "strip-ansi": { @@ -9945,7 +10476,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } } } @@ -9960,9 +10491,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "y18n": { @@ -9980,18 +10511,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" }, "dependencies": { "camelcase": { @@ -10004,9 +10535,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "yargs-parser": { @@ -10014,7 +10545,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" } } } @@ -10024,7 +10555,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -10052,9 +10583,9 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -10062,7 +10593,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "kind-of": { @@ -10070,7 +10601,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -10085,7 +10616,7 @@ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.omit": { @@ -10094,8 +10625,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "object.pick": { @@ -10103,7 +10634,7 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "observable-to-promise": { @@ -10112,8 +10643,8 @@ "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", "dev": true, "requires": { - "is-observable": "0.2.0", - "symbol-observable": "1.2.0" + "is-observable": "^0.2.0", + "symbol-observable": "^1.0.4" }, "dependencies": { "is-observable": { @@ -10122,7 +10653,7 @@ "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", "dev": true, "requires": { - "symbol-observable": "0.2.4" + "symbol-observable": "^0.2.2" }, "dependencies": { "symbol-observable": { @@ -10140,7 +10671,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -10149,7 +10680,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "optimist": { @@ -10158,8 +10689,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "option-chain": { @@ -10174,12 +10705,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" }, "dependencies": { "wordwrap": { @@ -10206,7 +10737,7 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "1.0.0" + "lcid": "^1.0.0" } }, "os-tmpdir": { @@ -10245,7 +10776,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -10254,7 +10785,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.3.0" + "p-limit": "^1.1.0" } }, "p-timeout": { @@ -10263,7 +10794,7 @@ "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { - "p-finally": "1.0.0" + "p-finally": "^1.0.0" } }, "p-try": { @@ -10278,10 +10809,10 @@ "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "lodash.flattendeep": "4.4.0", - "md5-hex": "2.0.0", - "release-zalgo": "1.0.0" + "graceful-fs": "^4.1.11", + "lodash.flattendeep": "^4.4.0", + "md5-hex": "^2.0.0", + "release-zalgo": "^1.0.0" } }, "package-json": { @@ -10290,10 +10821,10 @@ "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0", - "semver": "5.5.0" + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" }, "dependencies": { "got": { @@ -10302,17 +10833,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" } } } @@ -10323,10 +10854,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" }, "dependencies": { "is-extglob": { @@ -10341,7 +10872,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -10352,7 +10883,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.2" + "error-ex": "^1.2.0" } }, "parse-ms": { @@ -10422,7 +10953,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "performance-now": { @@ -10447,7 +10978,7 @@ "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", "dev": true, "requires": { - "pinkie": "1.0.0" + "pinkie": "^1.0.0" } }, "pkg-conf": { @@ -10456,8 +10987,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "2.1.0", - "load-json-file": "4.0.0" + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" }, "dependencies": { "load-json-file": { @@ -10466,10 +10997,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, "parse-json": { @@ -10478,8 +11009,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.2", - "json-parse-better-errors": "1.0.2" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } } } @@ -10490,7 +11021,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "2.1.0" + "find-up": "^2.1.0" } }, "plur": { @@ -10499,7 +11030,7 @@ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "dev": true, "requires": { - "irregular-plurals": "1.4.0" + "irregular-plurals": "^1.0.0" } }, "pluralize": { @@ -10519,9 +11050,9 @@ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "2.4.1", - "source-map": "0.6.1", - "supports-color": "5.4.0" + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" }, "dependencies": { "source-map": { @@ -10537,11 +11068,11 @@ "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.0.tgz", "integrity": "sha512-nDb6a+p2C7Wj8Y2zmFtLpuv+xobXz4+bzT5s7dr0nn71tLozn7nRMQqzwbefzwZN5qOm0N7Cxhw4kXP75xboKA==", "requires": { - "define-properties": "1.1.2", - "empower": "1.3.0", - "power-assert-formatter": "1.4.1", - "universal-deep-strict-equal": "1.2.2", - "xtend": "4.0.1" + "define-properties": "^1.1.2", + "empower": "^1.3.0", + "power-assert-formatter": "^1.4.1", + "universal-deep-strict-equal": "^1.2.1", + "xtend": "^4.0.0" } }, "power-assert-context-formatter": { @@ -10549,8 +11080,8 @@ "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", "requires": { - "core-js": "2.5.7", - "power-assert-context-traversal": "1.2.0" + "core-js": "^2.0.0", + "power-assert-context-traversal": "^1.2.0" } }, "power-assert-context-reducer-ast": { @@ -10558,11 +11089,11 @@ "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", "requires": { - "acorn": "5.7.1", - "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.7", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "acorn": "^5.0.0", + "acorn-es7-plugin": "^1.0.12", + "core-js": "^2.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.2.0" } }, "power-assert-context-traversal": { @@ -10570,8 +11101,8 @@ "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", "requires": { - "core-js": "2.5.7", - "estraverse": "4.2.0" + "core-js": "^2.0.0", + "estraverse": "^4.1.0" } }, "power-assert-formatter": { @@ -10579,13 +11110,13 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.7", - "power-assert-context-formatter": "1.2.0", - "power-assert-context-reducer-ast": "1.2.0", - "power-assert-renderer-assertion": "1.2.0", - "power-assert-renderer-comparison": "1.2.0", - "power-assert-renderer-diagram": "1.2.0", - "power-assert-renderer-file": "1.2.0" + "core-js": "^2.0.0", + "power-assert-context-formatter": "^1.0.7", + "power-assert-context-reducer-ast": "^1.0.7", + "power-assert-renderer-assertion": "^1.0.7", + "power-assert-renderer-comparison": "^1.0.7", + "power-assert-renderer-diagram": "^1.0.7", + "power-assert-renderer-file": "^1.0.7" } }, "power-assert-renderer-assertion": { @@ -10593,8 +11124,8 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", "requires": { - "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "1.2.0" + "power-assert-renderer-base": "^1.1.1", + "power-assert-util-string-width": "^1.2.0" } }, "power-assert-renderer-base": { @@ -10607,11 +11138,11 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", "requires": { - "core-js": "2.5.7", - "diff-match-patch": "1.0.1", - "power-assert-renderer-base": "1.1.1", - "stringifier": "1.3.0", - "type-name": "2.0.2" + "core-js": "^2.0.0", + "diff-match-patch": "^1.0.0", + "power-assert-renderer-base": "^1.1.1", + "stringifier": "^1.3.0", + "type-name": "^2.0.1" } }, "power-assert-renderer-diagram": { @@ -10619,10 +11150,10 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", "requires": { - "core-js": "2.5.7", - "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "1.2.0", - "stringifier": "1.3.0" + "core-js": "^2.0.0", + "power-assert-renderer-base": "^1.1.1", + "power-assert-util-string-width": "^1.2.0", + "stringifier": "^1.3.0" } }, "power-assert-renderer-file": { @@ -10630,7 +11161,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", "requires": { - "power-assert-renderer-base": "1.1.1" + "power-assert-renderer-base": "^1.1.1" } }, "power-assert-util-string-width": { @@ -10638,7 +11169,7 @@ "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", "requires": { - "eastasianwidth": "0.2.0" + "eastasianwidth": "^0.2.0" } }, "prelude-ls": { @@ -10671,7 +11202,7 @@ "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", "dev": true, "requires": { - "parse-ms": "1.0.1" + "parse-ms": "^1.0.0" }, "dependencies": { "parse-ms": { @@ -10710,19 +11241,19 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/base64": "1.1.2", - "@protobufjs/codegen": "2.0.4", - "@protobufjs/eventemitter": "1.1.0", - "@protobufjs/fetch": "1.1.0", - "@protobufjs/float": "1.0.2", - "@protobufjs/inquire": "1.1.0", - "@protobufjs/path": "1.1.2", - "@protobufjs/pool": "1.1.0", - "@protobufjs/utf8": "1.1.0", - "@types/long": "3.0.32", - "@types/node": "8.10.20", - "long": "4.0.0" + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^3.0.32", + "@types/node": "^8.9.4", + "long": "^4.0.0" }, "dependencies": { "@types/node": { @@ -10738,9 +11269,9 @@ "integrity": "sha512-fQr3VQrbdzHrdaDn3XuisVoJlJNDJizHAvUXw9IuXRR8BpV2x0N7LsCxrpJkeKfPbNjiNU/V5vc008cI0TmzzQ==", "dev": true, "requires": { - "fill-keys": "1.0.2", - "module-not-found-error": "1.0.1", - "resolve": "1.5.0" + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.0", + "resolve": "~1.5.0" }, "dependencies": { "resolve": { @@ -10749,7 +11280,7 @@ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } } } @@ -10764,8 +11295,8 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "end-of-stream": "1.4.1", - "once": "1.4.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "pumpify": { @@ -10773,9 +11304,9 @@ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "requires": { - "duplexify": "3.6.0", - "inherits": "2.0.3", - "pump": "2.0.1" + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" } }, "punycode": { @@ -10794,9 +11325,9 @@ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { - "decode-uri-component": "0.2.0", - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" } }, "randomatic": { @@ -10805,9 +11336,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "4.0.0", - "kind-of": "6.0.2", - "math-random": "1.0.1" + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" }, "dependencies": { "is-number": { @@ -10824,10 +11355,10 @@ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "deep-extend": "0.6.0", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -10844,9 +11375,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" }, "dependencies": { "path-type": { @@ -10855,7 +11386,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "pify": { @@ -10872,8 +11403,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" } }, "readable-stream": { @@ -10881,13 +11412,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "readdirp": { @@ -10896,10 +11427,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.6", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" } }, "redent": { @@ -10908,8 +11439,8 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" }, "dependencies": { "indent-string": { @@ -10918,7 +11449,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } } } @@ -10941,7 +11472,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "regex-not": { @@ -10949,8 +11480,8 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "regexp.prototype.flags": { @@ -10959,7 +11490,7 @@ "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", "dev": true, "requires": { - "define-properties": "1.1.2" + "define-properties": "^1.1.2" } }, "regexpp": { @@ -10974,9 +11505,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "1.4.0", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" } }, "registry-auth-token": { @@ -10985,8 +11516,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.8", - "safe-buffer": "5.1.2" + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" } }, "registry-url": { @@ -10995,7 +11526,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.8" + "rc": "^1.0.1" } }, "regjsgen": { @@ -11010,7 +11541,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "0.5.0" + "jsesc": "~0.5.0" } }, "release-zalgo": { @@ -11019,7 +11550,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "4.1.1" + "es6-error": "^4.0.1" } }, "remove-trailing-separator": { @@ -11044,7 +11575,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "request": { @@ -11052,26 +11583,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.7.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.2", - "safe-buffer": "5.1.2", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.3.2" + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" } }, "require-directory": { @@ -11098,8 +11629,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" }, "dependencies": { "resolve-from": { @@ -11116,7 +11647,7 @@ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", "dev": true, "requires": { - "underscore": "1.6.0" + "underscore": "~1.6.0" }, "dependencies": { "underscore": { @@ -11139,7 +11670,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "3.0.0" + "resolve-from": "^3.0.0" } }, "resolve-from": { @@ -11159,7 +11690,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "1.0.1" + "lowercase-keys": "^1.0.0" } }, "restore-cursor": { @@ -11168,8 +11699,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "ret": { @@ -11187,7 +11718,7 @@ "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "right-align": { @@ -11197,7 +11728,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -11206,7 +11737,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { @@ -11215,7 +11746,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "rxjs": { @@ -11245,7 +11776,7 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "safer-buffer": { @@ -11265,16 +11796,16 @@ "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", "dev": true, "requires": { - "chalk": "2.4.1", - "htmlparser2": "3.9.2", - "lodash.clonedeep": "4.5.0", - "lodash.escaperegexp": "4.1.2", - "lodash.isplainobject": "4.0.6", - "lodash.isstring": "4.0.1", - "lodash.mergewith": "4.6.1", - "postcss": "6.0.23", - "srcset": "1.0.0", - "xtend": "4.0.1" + "chalk": "^2.3.0", + "htmlparser2": "^3.9.0", + "lodash.clonedeep": "^4.5.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.mergewith": "^4.6.0", + "postcss": "^6.0.14", + "srcset": "^1.0.0", + "xtend": "^4.0.0" } }, "semver": { @@ -11289,7 +11820,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.5.0" + "semver": "^5.0.3" } }, "serialize-error": { @@ -11315,10 +11846,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -11326,7 +11857,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -11337,7 +11868,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -11358,13 +11889,13 @@ "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", "dev": true, "requires": { - "@sinonjs/formatio": "2.0.0", - "diff": "3.5.0", - "lodash.get": "4.4.2", - "lolex": "2.7.0", - "nise": "1.4.2", - "supports-color": "5.4.0", - "type-detect": "4.0.8" + "@sinonjs/formatio": "^2.0.0", + "diff": "^3.1.0", + "lodash.get": "^4.4.2", + "lolex": "^2.2.0", + "nise": "^1.2.0", + "supports-color": "^5.1.0", + "type-detect": "^4.0.5" } }, "slash": { @@ -11378,7 +11909,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "^2.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -11400,8 +11931,8 @@ "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.2.0.tgz", "integrity": "sha512-G5Faa3wQevGXcD5e4JKfmgofO+Fu4Jg4/nLyeZqWmBqVV0/3ORgervt3EjBi6PEFKhztPQWegZspteWnycx5dg==", "requires": { - "map-obj": "2.0.0", - "to-snake-case": "0.1.2" + "map-obj": "~2.0.0", + "to-snake-case": "~0.1.2" } }, "snakeize": { @@ -11415,14 +11946,14 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.2", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { "debug": { @@ -11438,7 +11969,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -11446,7 +11977,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -11456,9 +11987,9 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -11466,7 +11997,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -11474,7 +12005,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -11482,7 +12013,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -11490,9 +12021,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -11502,7 +12033,7 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" }, "dependencies": { "kind-of": { @@ -11510,7 +12041,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -11521,7 +12052,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "1.1.0" + "is-plain-obj": "^1.0.0" } }, "source-map": { @@ -11534,11 +12065,11 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { @@ -11547,8 +12078,8 @@ "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { - "buffer-from": "1.1.0", - "source-map": "0.6.1" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" }, "dependencies": { "source-map": { @@ -11570,8 +12101,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -11586,8 +12117,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -11601,7 +12132,7 @@ "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-2.0.0.tgz", "integrity": "sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg==", "requires": { - "is-stream-ended": "0.1.4" + "is-stream-ended": "^0.1.4" } }, "split-string": { @@ -11609,7 +12140,7 @@ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "sprintf-js": { @@ -11624,8 +12155,8 @@ "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", "dev": true, "requires": { - "array-uniq": "1.0.3", - "number-is-nan": "1.0.1" + "array-uniq": "^1.0.2", + "number-is-nan": "^1.0.0" } }, "sshpk": { @@ -11633,15 +12164,15 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.2", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "safer-buffer": "2.1.2", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" } }, "stack-utils": { @@ -11655,8 +12186,8 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -11664,7 +12195,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -11674,7 +12205,7 @@ "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.4.tgz", "integrity": "sha512-D243NJaYs/xBN2QnoiMDY7IesJFIK7gEhnvAYqJa5JvDdnh2dC4qDBwlCf0ohPpX2QRlA/4gnbnPd3rs3KxVcA==", "requires": { - "stubs": "3.0.0" + "stubs": "^3.0.0" } }, "stream-shift": { @@ -11694,14 +12225,6 @@ "integrity": "sha1-XqIRzZLSKOGEKUmQpsyXs2anfLA=", "dev": true }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "5.1.2" - } - }, "string-format-obj": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz", @@ -11713,9 +12236,9 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string.prototype.matchall": { @@ -11724,11 +12247,19 @@ "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", "dev": true, "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.12.0", - "function-bind": "1.1.1", - "has-symbols": "1.0.0", - "regexp.prototype.flags": "1.2.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.10.0", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "regexp.prototype.flags": "^1.2.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" } }, "stringifier": { @@ -11736,9 +12267,9 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.7", - "traverse": "0.6.6", - "type-name": "2.0.2" + "core-js": "^2.0.0", + "traverse": "^0.6.6", + "type-name": "^2.0.1" } }, "strip-ansi": { @@ -11746,7 +12277,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -11761,7 +12292,7 @@ "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.1" } }, "strip-eof": { @@ -11776,7 +12307,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "strip-json-comments": { @@ -11796,16 +12327,16 @@ "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.2", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.2", - "readable-stream": "2.3.6" + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" }, "dependencies": { "mime": { @@ -11822,11 +12353,11 @@ "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", "dev": true, "requires": { - "arrify": "1.0.1", - "indent-string": "3.2.0", - "js-yaml": "3.12.0", - "serialize-error": "2.1.0", - "strip-ansi": "4.0.0" + "arrify": "^1.0.1", + "indent-string": "^3.2.0", + "js-yaml": "^3.10.0", + "serialize-error": "^2.1.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -11841,7 +12372,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11852,8 +12383,8 @@ "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", "dev": true, "requires": { - "methods": "1.1.2", - "superagent": "3.8.3" + "methods": "~1.1.2", + "superagent": "^3.0.0" } }, "supports-color": { @@ -11862,7 +12393,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" }, "dependencies": { "has-flag": { @@ -11885,12 +12416,12 @@ "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "6.5.2", - "ajv-keywords": "3.2.0", - "chalk": "2.4.1", - "lodash": "4.17.10", + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ajv": { @@ -11899,10 +12430,10 @@ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" } }, "ansi-regex": { @@ -11935,8 +12466,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -11945,7 +12476,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11962,7 +12493,7 @@ "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "execa": "0.7.0" + "execa": "^0.7.0" } }, "text-encoding": { @@ -11988,8 +12519,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.6", - "xtend": "4.0.1" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, "time-zone": { @@ -12010,7 +12541,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "to-fast-properties": { @@ -12029,7 +12560,7 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -12037,7 +12568,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -12047,10 +12578,10 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -12058,8 +12589,8 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, "to-snake-case": { @@ -12083,7 +12614,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "traverse": { @@ -12114,7 +12645,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -12129,7 +12660,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "type-detect": { @@ -12156,9 +12687,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "camelcase": { @@ -12175,8 +12706,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" } }, @@ -12201,9 +12732,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -12250,10 +12781,10 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -12261,7 +12792,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -12269,10 +12800,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -12283,7 +12814,7 @@ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "crypto-random-string": "1.0.0" + "crypto-random-string": "^1.0.0" } }, "unique-temp-dir": { @@ -12292,8 +12823,8 @@ "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", "dev": true, "requires": { - "mkdirp": "0.5.1", - "os-tmpdir": "1.0.2", + "mkdirp": "^0.5.1", + "os-tmpdir": "^1.0.1", "uid2": "0.0.3" } }, @@ -12302,9 +12833,9 @@ "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", "requires": { - "array-filter": "1.0.0", + "array-filter": "^1.0.0", "indexof": "0.0.1", - "object-keys": "1.0.12" + "object-keys": "^1.0.0" } }, "universalify": { @@ -12318,8 +12849,8 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -12327,9 +12858,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -12361,16 +12892,16 @@ "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { - "boxen": "1.3.0", - "chalk": "2.4.1", - "configstore": "3.1.2", - "import-lazy": "2.1.0", - "is-ci": "1.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "uri-js": { @@ -12379,7 +12910,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "2.1.1" + "punycode": "^2.1.0" }, "dependencies": { "punycode": { @@ -12401,7 +12932,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "url-to-options": { @@ -12421,7 +12952,7 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" } }, "util-deprecate": { @@ -12440,8 +12971,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "verror": { @@ -12449,9 +12980,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" } }, "well-known-symbols": { @@ -12466,7 +12997,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -12481,7 +13012,7 @@ "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-regex": { @@ -12502,8 +13033,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -12512,7 +13043,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -12533,8 +13064,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } }, "wrappy": { @@ -12548,7 +13079,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "write-file-atomic": { @@ -12557,9 +13088,9 @@ "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" } }, "write-json-file": { @@ -12568,12 +13099,12 @@ "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", "dev": true, "requires": { - "detect-indent": "5.0.0", - "graceful-fs": "4.1.11", - "make-dir": "1.3.0", - "pify": "3.0.0", - "sort-keys": "2.0.0", - "write-file-atomic": "2.3.0" + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" }, "dependencies": { "detect-indent": { @@ -12590,8 +13121,8 @@ "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", "dev": true, "requires": { - "sort-keys": "2.0.0", - "write-json-file": "2.3.0" + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" } }, "xdg-basedir": { @@ -12626,13 +13157,13 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { - "camelcase": "2.1.1", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "os-locale": "1.4.0", - "string-width": "1.0.2", - "window-size": "0.1.4", - "y18n": "3.2.1" + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" } }, "yargs-parser": { @@ -12641,7 +13172,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { From 65093a63d4a9142747b3ee88fae2f61e45b3b1fc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 2 Jul 2018 22:53:06 -0700 Subject: [PATCH 0186/1029] chore(deps): lock file maintenance (#153) --- handwritten/logging/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 4949e070999..95e4683ce08 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -7247,9 +7247,9 @@ } }, "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "dev": true }, "is-ci": { From 76745e6f9adac06dfd42afdb85aed749a895d3f1 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 3 Jul 2018 22:31:36 -0700 Subject: [PATCH 0187/1029] Re-generate library using /synth.py (#154) --- handwritten/logging/package-lock.json | 5227 ++++++++--------- .../src/v2/config_service_v2_client.js | 30 +- .../v2/config_service_v2_client_config.json | 9 + .../v2/logging_service_v2_client_config.json | 9 + handwritten/logging/test/gapic-v2.js | 4 - 5 files changed, 2380 insertions(+), 2899 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 95e4683ce08..4d10a6d416f 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -16,18 +16,18 @@ "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "^6.8.0", - "babel-plugin-syntax-trailing-function-commas": "^6.20.0", - "babel-plugin-transform-async-to-generator": "^6.16.0", - "babel-plugin-transform-es2015-destructuring": "^6.19.0", - "babel-plugin-transform-es2015-function-name": "^6.9.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", - "babel-plugin-transform-es2015-parameters": "^6.21.0", - "babel-plugin-transform-es2015-spread": "^6.8.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", - "babel-plugin-transform-exponentiation-operator": "^6.8.0", - "package-hash": "^1.2.0" + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "package-hash": "1.2.0" }, "dependencies": { "md5-hex": { @@ -36,7 +36,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "package-hash": { @@ -45,7 +45,7 @@ "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", "dev": true, "requires": { - "md5-hex": "^1.3.0" + "md5-hex": "1.3.0" } } } @@ -56,8 +56,8 @@ "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", "dev": true, "requires": { - "@ava/babel-plugin-throws-helper": "^2.0.0", - "babel-plugin-espower": "^2.3.2" + "@ava/babel-plugin-throws-helper": "2.0.0", + "babel-plugin-espower": "2.4.0" } }, "@ava/write-file-atomic": { @@ -66,9 +66,9 @@ "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } }, "@babel/code-frame": { @@ -87,10 +87,10 @@ "dev": true, "requires": { "@babel/types": "7.0.0-beta.51", - "jsesc": "^2.5.1", - "lodash": "^4.17.5", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" + "jsesc": "2.5.1", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" }, "dependencies": { "jsesc": { @@ -136,9 +136,9 @@ "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", "dev": true, "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" } }, "@babel/parser": { @@ -156,7 +156,7 @@ "@babel/code-frame": "7.0.0-beta.51", "@babel/parser": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "lodash": "^4.17.5" + "lodash": "4.17.10" } }, "@babel/traverse": { @@ -171,10 +171,10 @@ "@babel/helper-split-export-declaration": "7.0.0-beta.51", "@babel/parser": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.17.5" + "debug": "3.1.0", + "globals": "11.7.0", + "invariant": "2.2.4", + "lodash": "4.17.10" }, "dependencies": { "globals": { @@ -191,9 +191,9 @@ "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.5", - "to-fast-properties": "^2.0.0" + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "2.0.0" }, "dependencies": { "to-fast-properties": { @@ -210,7 +210,7 @@ "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", "dev": true, "requires": { - "arrify": "^1.0.1" + "arrify": "1.0.1" } }, "@google-cloud/bigquery": { @@ -219,14 +219,14 @@ "integrity": "sha512-r4k4PvsoPB7DBBCsm4hz8WZj3KvZXikTcwSjAg+cn0JndAPIEad4XCd39RpniyPDSmp+n+d+kOAgebwMWj8q+w==", "dev": true, "requires": { - "@google-cloud/common": "^0.17.0", - "arrify": "^1.0.0", - "duplexify": "^3.5.0", - "extend": "^3.0.1", - "is": "^3.0.1", - "stream-events": "^1.0.1", - "string-format-obj": "^1.0.0", - "uuid": "^3.1.0" + "@google-cloud/common": "0.17.0", + "arrify": "1.0.1", + "duplexify": "3.6.0", + "extend": "3.0.1", + "is": "3.2.1", + "stream-events": "1.0.4", + "string-format-obj": "1.1.1", + "uuid": "3.3.2" }, "dependencies": { "@google-cloud/common": { @@ -235,24 +235,24 @@ "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "dev": true, "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.10.0", - "is": "^3.2.0", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.6.0", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.10.1", + "is": "3.2.1", "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.87.0", + "retry-request": "3.3.2", + "split-array-stream": "1.0.3", + "stream-events": "1.0.4", + "string-format-obj": "1.1.1", + "through2": "2.0.3" } }, "retry-request": { @@ -261,8 +261,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" + "request": "2.87.0", + "through2": "2.0.3" } }, "split-array-stream": { @@ -271,8 +271,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" + "async": "2.6.1", + "is-stream-ended": "0.1.4" } } } @@ -282,21 +282,21 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.3.tgz", "integrity": "sha512-jt8/R4EqDTQccv5WA9AEaS65llM5+mlxsuWu57G5Os8HTIpgPbcsOVMUeIvmTrBuPUYSoRIMW8d/pvv/95n0+g==", "requires": { - "@types/duplexify": "^3.5.0", - "@types/request": "^2.47.0", - "arrify": "^1.0.1", - "axios": "^0.18.0", - "duplexify": "^3.6.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auth-library": "^1.6.0", - "is": "^3.2.1", - "pify": "^3.0.0", - "request": "^2.87.0", - "retry-request": "^4.0.0", - "split-array-stream": "^2.0.0", - "stream-events": "^1.0.4", - "through2": "^2.0.3" + "@types/duplexify": "3.5.0", + "@types/request": "2.47.1", + "arrify": "1.0.1", + "axios": "0.18.0", + "duplexify": "3.6.0", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auth-library": "1.6.1", + "is": "3.2.1", + "pify": "3.0.0", + "request": "2.87.0", + "retry-request": "4.0.0", + "split-array-stream": "2.0.0", + "stream-events": "1.0.4", + "through2": "2.0.3" } }, "@google-cloud/common-grpc": { @@ -304,15 +304,15 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.7.1.tgz", "integrity": "sha512-VK2X6rLRJIQMmkTS3p483up/Vb8zZHLoMFSmo17iiqebgaAoDpOhBiXXy4thtfabk02Nu5QtYT0QwM49OeU/ew==", "requires": { - "@google-cloud/common": "^0.20.0", - "@grpc/proto-loader": "^0.1.0", - "dot-prop": "^4.2.0", - "duplexify": "^3.6.0", - "extend": "^3.0.1", - "grpc": "^1.12.3", - "is": "^3.2.1", - "retry-request": "^4.0.0", - "through2": "^2.0.3" + "@google-cloud/common": "0.20.3", + "@grpc/proto-loader": "0.1.0", + "dot-prop": "4.2.0", + "duplexify": "3.6.0", + "extend": "3.0.1", + "grpc": "1.12.4", + "is": "3.2.1", + "retry-request": "4.0.0", + "through2": "2.0.3" } }, "@google-cloud/nodejs-repo-tools": { @@ -329,7 +329,7 @@ "lodash": "4.17.5", "nyc": "11.4.1", "proxyquire": "1.8.0", - "semver": "^5.5.0", + "semver": "5.5.0", "sinon": "4.3.0", "string": "3.3.3", "supertest": "3.0.0", @@ -349,9 +349,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" } }, "is-fullwidth-code-point": { @@ -372,33 +372,33 @@ "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", "dev": true, "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.3.0", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.1.1", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.9.1", - "istanbul-lib-report": "^1.1.2", - "istanbul-lib-source-maps": "^1.2.2", - "istanbul-reports": "^1.1.3", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.0.2", - "micromatch": "^2.3.11", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.5.4", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.1.1", - "yargs": "^10.0.3", - "yargs-parser": "^8.0.0" + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.1", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "1.9.1", + "istanbul-lib-report": "1.1.2", + "istanbul-lib-source-maps": "1.2.2", + "istanbul-reports": "1.1.3", + "md5-hex": "1.3.0", + "merge-source-map": "1.0.4", + "micromatch": "2.3.11", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "spawn-wrap": "1.4.2", + "test-exclude": "4.1.1", + "yargs": "10.0.3", + "yargs-parser": "8.0.0" }, "dependencies": { "align-text": { @@ -406,9 +406,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" } }, "amdefine": { @@ -431,7 +431,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "^1.0.0" + "default-require-extensions": "1.0.0" } }, "archy": { @@ -444,7 +444,7 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "arr-flatten": { @@ -472,9 +472,9 @@ "bundled": true, "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" } }, "babel-generator": { @@ -482,14 +482,14 @@ "bundled": true, "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.6", - "trim-right": "^1.0.1" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" } }, "babel-messages": { @@ -497,7 +497,7 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-runtime": { @@ -505,8 +505,8 @@ "bundled": true, "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -514,11 +514,11 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" } }, "babel-traverse": { @@ -526,15 +526,15 @@ "bundled": true, "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" } }, "babel-types": { @@ -542,10 +542,10 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" } }, "babylon": { @@ -563,7 +563,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -572,9 +572,9 @@ "bundled": true, "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "builtin-modules": { @@ -587,9 +587,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" } }, "camelcase": { @@ -604,8 +604,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "chalk": { @@ -613,11 +613,11 @@ "bundled": true, "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "cliui": { @@ -626,8 +626,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" }, "dependencies": { @@ -669,8 +669,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "lru-cache": "4.1.1", + "which": "1.3.0" } }, "debug": { @@ -696,7 +696,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "2.0.0" } }, "detect-indent": { @@ -704,7 +704,7 @@ "bundled": true, "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "error-ex": { @@ -712,7 +712,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "escape-string-regexp": { @@ -730,13 +730,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" }, "dependencies": { "cross-spawn": { @@ -744,9 +744,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" } } } @@ -756,7 +756,7 @@ "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "expand-range": { @@ -764,7 +764,7 @@ "bundled": true, "dev": true, "requires": { - "fill-range": "^2.1.0" + "fill-range": "2.2.3" } }, "extglob": { @@ -772,7 +772,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "filename-regex": { @@ -785,11 +785,11 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, "find-cache-dir": { @@ -797,9 +797,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" } }, "find-up": { @@ -807,7 +807,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "for-in": { @@ -820,7 +820,7 @@ "bundled": true, "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "foreground-child": { @@ -828,8 +828,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" } }, "fs.realpath": { @@ -852,12 +852,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-base": { @@ -865,8 +865,8 @@ "bundled": true, "dev": true, "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" + "glob-parent": "2.0.0", + "is-glob": "2.0.1" } }, "glob-parent": { @@ -874,7 +874,7 @@ "bundled": true, "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "globals": { @@ -892,10 +892,10 @@ "bundled": true, "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "source-map": { @@ -903,7 +903,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -913,7 +913,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-flag": { @@ -936,8 +936,8 @@ "bundled": true, "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -950,7 +950,7 @@ "bundled": true, "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.3.1" } }, "invert-kv": { @@ -973,7 +973,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-dotfile": { @@ -986,7 +986,7 @@ "bundled": true, "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-primitive": "2.0.0" } }, "is-extendable": { @@ -1004,7 +1004,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -1012,7 +1012,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-glob": { @@ -1020,7 +1020,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "is-number": { @@ -1028,7 +1028,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-posix-bracket": { @@ -1079,7 +1079,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "^0.4.0" + "append-transform": "0.4.0" } }, "istanbul-lib-instrument": { @@ -1087,13 +1087,13 @@ "bundled": true, "dev": true, "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.1.1", - "semver": "^5.3.0" + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" } }, "istanbul-lib-report": { @@ -1101,10 +1101,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "^1.1.1", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" }, "dependencies": { "supports-color": { @@ -1112,7 +1112,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "^1.0.0" + "has-flag": "1.0.0" } } } @@ -1122,11 +1122,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.1", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "debug": "3.1.0", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" }, "dependencies": { "debug": { @@ -1144,7 +1144,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "^4.0.3" + "handlebars": "4.0.11" } }, "js-tokens": { @@ -1162,7 +1162,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "lazy-cache": { @@ -1176,7 +1176,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "load-json-file": { @@ -1184,11 +1184,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "locate-path": { @@ -1196,8 +1196,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" }, "dependencies": { "path-exists": { @@ -1222,7 +1222,7 @@ "bundled": true, "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "3.0.2" } }, "lru-cache": { @@ -1230,8 +1230,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "md5-hex": { @@ -1239,7 +1239,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "md5-o-matic": { @@ -1252,7 +1252,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.1.0" } }, "merge-source-map": { @@ -1260,7 +1260,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } }, "micromatch": { @@ -1268,19 +1268,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } }, "mimic-fn": { @@ -1293,7 +1293,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.8" } }, "minimist": { @@ -1319,10 +1319,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" } }, "normalize-path": { @@ -1330,7 +1330,7 @@ "bundled": true, "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } }, "npm-run-path": { @@ -1338,7 +1338,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -1356,8 +1356,8 @@ "bundled": true, "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, "once": { @@ -1365,7 +1365,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "optimist": { @@ -1373,8 +1373,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.8", + "wordwrap": "0.0.3" } }, "os-homedir": { @@ -1387,9 +1387,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "p-finally": { @@ -1407,7 +1407,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.1.0" } }, "parse-glob": { @@ -1415,10 +1415,10 @@ "bundled": true, "dev": true, "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" } }, "parse-json": { @@ -1426,7 +1426,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.1" } }, "path-exists": { @@ -1434,7 +1434,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } }, "path-is-absolute": { @@ -1457,9 +1457,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -1477,7 +1477,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-dir": { @@ -1485,7 +1485,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0" + "find-up": "1.1.2" }, "dependencies": { "find-up": { @@ -1493,8 +1493,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } } } @@ -1514,8 +1514,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "is-number": { @@ -1523,7 +1523,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -1531,7 +1531,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1541,7 +1541,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1551,9 +1551,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -1561,8 +1561,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" }, "dependencies": { "find-up": { @@ -1570,8 +1570,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } } } @@ -1586,7 +1586,7 @@ "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "is-equal-shallow": "0.1.3" } }, "remove-trailing-separator": { @@ -1609,7 +1609,7 @@ "bundled": true, "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "require-directory": { @@ -1633,7 +1633,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "rimraf": { @@ -1641,7 +1641,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "semver": { @@ -1659,7 +1659,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -1687,12 +1687,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.0" } }, "spdx-correct": { @@ -1700,7 +1700,7 @@ "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "^1.0.2" + "spdx-license-ids": "1.2.2" } }, "spdx-expression-parse": { @@ -1718,8 +1718,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" }, "dependencies": { "ansi-regex": { @@ -1737,7 +1737,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -1747,7 +1747,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -1755,7 +1755,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, "strip-eof": { @@ -1773,11 +1773,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "^1.0.1", - "micromatch": "^2.3.11", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" + "arrify": "1.0.1", + "micromatch": "2.3.11", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" } }, "to-fast-properties": { @@ -1796,9 +1796,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" }, "dependencies": { "yargs": { @@ -1807,9 +1807,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } } @@ -1826,8 +1826,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" } }, "which": { @@ -1835,7 +1835,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -1859,8 +1859,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "string-width": { @@ -1868,9 +1868,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -1885,9 +1885,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } }, "y18n": { @@ -1905,18 +1905,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^8.0.0" + "cliui": "3.2.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "8.0.0" }, "dependencies": { "cliui": { @@ -1924,9 +1924,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" }, "dependencies": { "string-width": { @@ -1934,9 +1934,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -1948,7 +1948,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { @@ -1966,9 +1966,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "proxyquire": { @@ -1977,9 +1977,9 @@ "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", "dev": true, "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.0", - "resolve": "~1.1.7" + "fill-keys": "1.0.2", + "module-not-found-error": "1.0.1", + "resolve": "1.1.7" } }, "string-width": { @@ -1988,8 +1988,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -1998,7 +1998,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "yargs": { @@ -2007,18 +2007,18 @@ "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" } } } @@ -2029,22 +2029,22 @@ "integrity": "sha512-XhIZSnci5fQ9xnhl/VpwVVMFiOt5uGN6S5QMNHmhZqbki/adlKXAmDOD4fncyusOZFK1WTQY35xTWHwxuso25g==", "dev": true, "requires": { - "@google-cloud/common": "^0.16.1", - "arrify": "^1.0.0", - "async-each": "^1.0.1", - "delay": "^2.0.0", - "duplexify": "^3.5.4", - "extend": "^3.0.1", - "google-auto-auth": "^0.10.1", - "google-gax": "^0.16.0", - "google-proto-files": "^0.16.0", - "is": "^3.0.1", - "lodash.chunk": "^4.2.0", - "lodash.merge": "^4.6.0", - "lodash.snakecase": "^4.1.1", - "protobufjs": "^6.8.1", - "through2": "^2.0.3", - "uuid": "^3.1.0" + "@google-cloud/common": "0.16.2", + "arrify": "1.0.1", + "async-each": "1.0.1", + "delay": "2.0.0", + "duplexify": "3.6.0", + "extend": "3.0.1", + "google-auto-auth": "0.10.1", + "google-gax": "0.16.1", + "google-proto-files": "0.16.1", + "is": "3.2.1", + "lodash.chunk": "4.2.0", + "lodash.merge": "4.6.1", + "lodash.snakecase": "4.1.1", + "protobufjs": "6.8.6", + "through2": "2.0.3", + "uuid": "3.3.2" }, "dependencies": { "@google-cloud/common": { @@ -2053,24 +2053,24 @@ "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", "dev": true, "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.9.0", - "is": "^3.2.0", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.6.0", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.9.7", + "is": "3.2.1", "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.87.0", + "retry-request": "3.3.2", + "split-array-stream": "1.0.3", + "stream-events": "1.0.4", + "string-format-obj": "1.1.1", + "through2": "2.0.3" }, "dependencies": { "google-auto-auth": { @@ -2079,10 +2079,10 @@ "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", "dev": true, "requires": { - "async": "^2.3.0", - "gcp-metadata": "^0.6.1", - "google-auth-library": "^1.3.1", - "request": "^2.79.0" + "async": "2.6.1", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.6.1", + "request": "2.87.0" } } } @@ -2093,16 +2093,16 @@ "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "dev": true, "requires": { - "duplexify": "^3.5.4", - "extend": "^3.0.0", - "globby": "^8.0.0", - "google-auto-auth": "^0.10.0", - "google-proto-files": "^0.15.0", - "grpc": "^1.10.0", - "is-stream-ended": "^0.1.0", - "lodash": "^4.17.2", - "protobufjs": "^6.8.0", - "through2": "^2.0.3" + "duplexify": "3.6.0", + "extend": "3.0.1", + "globby": "8.0.1", + "google-auto-auth": "0.10.1", + "google-proto-files": "0.15.1", + "grpc": "1.12.4", + "is-stream-ended": "0.1.4", + "lodash": "4.17.10", + "protobufjs": "6.8.6", + "through2": "2.0.3" }, "dependencies": { "google-proto-files": { @@ -2111,9 +2111,9 @@ "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", "dev": true, "requires": { - "globby": "^7.1.1", - "power-assert": "^1.4.4", - "protobufjs": "^6.8.0" + "globby": "7.1.1", + "power-assert": "1.6.0", + "protobufjs": "6.8.6" }, "dependencies": { "globby": { @@ -2122,12 +2122,12 @@ "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "dev": true, "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.10", + "pify": "3.0.0", + "slash": "1.0.0" } } } @@ -2140,8 +2140,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" + "request": "2.87.0", + "through2": "2.0.3" } }, "split-array-stream": { @@ -2150,8 +2150,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" + "async": "2.6.1", + "is-stream-ended": "0.1.4" } } } @@ -2162,27 +2162,27 @@ "integrity": "sha512-QaAxzCkbhspwajoaEnT0GcnQcpjPRcBrHYuQsXtD05BtOJgVnHCLXSsfUiRdU0nVpK+Thp7+sTkQ0fvk5PanKg==", "dev": true, "requires": { - "@google-cloud/common": "^0.17.0", - "arrify": "^1.0.0", - "async": "^2.0.1", - "compressible": "^2.0.12", - "concat-stream": "^1.5.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "extend": "^3.0.0", - "gcs-resumable-upload": "^0.10.2", - "hash-stream-validation": "^0.2.1", - "is": "^3.0.1", - "mime": "^2.2.0", - "mime-types": "^2.0.8", - "once": "^1.3.1", - "pumpify": "^1.5.1", - "request": "^2.85.0", - "safe-buffer": "^5.1.1", - "snakeize": "^0.1.0", - "stream-events": "^1.0.1", - "through2": "^2.0.0", - "xdg-basedir": "^3.0.0" + "@google-cloud/common": "0.17.0", + "arrify": "1.0.1", + "async": "2.6.1", + "compressible": "2.0.14", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.6.0", + "extend": "3.0.1", + "gcs-resumable-upload": "0.10.2", + "hash-stream-validation": "0.2.1", + "is": "3.2.1", + "mime": "2.3.1", + "mime-types": "2.1.18", + "once": "1.4.0", + "pumpify": "1.5.1", + "request": "2.87.0", + "safe-buffer": "5.1.2", + "snakeize": "0.1.0", + "stream-events": "1.0.4", + "through2": "2.0.3", + "xdg-basedir": "3.0.0" }, "dependencies": { "@google-cloud/common": { @@ -2191,24 +2191,24 @@ "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "dev": true, "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.10.0", - "is": "^3.2.0", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "concat-stream": "1.6.2", + "create-error-class": "3.0.2", + "duplexify": "3.6.0", + "ent": "2.2.0", + "extend": "3.0.1", + "google-auto-auth": "0.10.1", + "is": "3.2.1", "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" + "methmeth": "1.1.0", + "modelo": "4.2.3", + "request": "2.87.0", + "retry-request": "3.3.2", + "split-array-stream": "1.0.3", + "stream-events": "1.0.4", + "string-format-obj": "1.1.1", + "through2": "2.0.3" } }, "retry-request": { @@ -2217,8 +2217,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" + "request": "2.87.0", + "through2": "2.0.3" } }, "split-array-stream": { @@ -2227,8 +2227,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" + "async": "2.6.1", + "is-stream-ended": "0.1.4" } } } @@ -2238,10 +2238,10 @@ "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.1.0.tgz", "integrity": "sha512-GHoZBR5N+65AWazsCiJDxeMSbUpp2qNYbjeD3mP27L2PT25+GvIupIIJiCgULH87NAiAd9SmWMRBVz+uSiHpgA==", "requires": { - "@types/lodash": "^4.14.104", - "@types/node": "^9.4.6", - "lodash": "^4.17.5", - "protobufjs": "^6.8.6" + "@types/lodash": "4.14.110", + "@types/node": "9.6.22", + "lodash": "4.17.10", + "protobufjs": "6.8.6" }, "dependencies": { "@types/node": { @@ -2257,10 +2257,10 @@ "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", "dev": true, "requires": { - "chalk": "^0.4.0", - "date-time": "^0.1.1", - "pretty-ms": "^0.2.1", - "text-table": "^0.2.0" + "chalk": "0.4.0", + "date-time": "0.1.1", + "pretty-ms": "0.2.2", + "text-table": "0.2.0" }, "dependencies": { "ansi-styles": { @@ -2275,9 +2275,9 @@ "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "dev": true, "requires": { - "ansi-styles": "~1.0.0", - "has-color": "~0.1.0", - "strip-ansi": "~0.1.0" + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" } }, "pretty-ms": { @@ -2286,7 +2286,7 @@ "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", "dev": true, "requires": { - "parse-ms": "^0.1.0" + "parse-ms": "0.1.2" } }, "strip-ansi": { @@ -2302,8 +2302,8 @@ "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" + "call-me-maybe": "1.0.1", + "glob-to-regexp": "0.3.0" } }, "@nodelib/fs.stat": { @@ -2336,8 +2336,8 @@ "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/inquire": "1.1.0" } }, "@protobufjs/float": { @@ -2390,7 +2390,7 @@ "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", "requires": { - "@types/node": "*" + "@types/node": "10.5.1" } }, "@types/form-data": { @@ -2398,7 +2398,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "*" + "@types/node": "10.5.1" } }, "@types/lodash": { @@ -2421,10 +2421,10 @@ "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.1.tgz", "integrity": "sha512-TV3XLvDjQbIeVxJ1Z3oCTDk/KuYwwcNKVwz2YaT0F5u86Prgc4syDAp6P96rkTQQ4bIdh+VswQIC9zS6NjY7/g==", "requires": { - "@types/caseless": "*", - "@types/form-data": "*", - "@types/node": "*", - "@types/tough-cookie": "*" + "@types/caseless": "0.12.1", + "@types/form-data": "2.2.1", + "@types/node": "10.5.1", + "@types/tough-cookie": "2.3.3" } }, "@types/tough-cookie": { @@ -2448,7 +2448,7 @@ "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "^5.0.3" + "acorn": "5.7.1" } }, "ajv": { @@ -2456,10 +2456,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ajv-keywords": { @@ -2474,9 +2474,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" }, "dependencies": { "kind-of": { @@ -2485,7 +2485,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -2502,7 +2502,7 @@ "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "dev": true, "requires": { - "string-width": "^2.0.0" + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -2523,8 +2523,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -2533,7 +2533,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -2555,7 +2555,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.2" } }, "anymatch": { @@ -2564,8 +2564,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" + "micromatch": "2.3.11", + "normalize-path": "2.1.1" }, "dependencies": { "arr-diff": { @@ -2574,7 +2574,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "array-unique": { @@ -2589,9 +2589,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "expand-brackets": { @@ -2600,7 +2600,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "extglob": { @@ -2609,7 +2609,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "is-extglob": { @@ -2624,7 +2624,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "kind-of": { @@ -2633,7 +2633,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "micromatch": { @@ -2642,19 +2642,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } } } @@ -2665,7 +2665,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" } }, "argv": { @@ -2723,7 +2723,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "^1.0.1" + "array-uniq": "1.0.3" } }, "array-uniq": { @@ -2746,8 +2746,8 @@ "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" + "colour": "0.7.1", + "optjs": "3.2.2" } }, "asn1": { @@ -2771,7 +2771,7 @@ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "dev": true, "requires": { - "lodash": "^4.17.10" + "lodash": "4.17.10" } }, "async-each": { @@ -2802,89 +2802,89 @@ "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", "dev": true, "requires": { - "@ava/babel-preset-stage-4": "^1.1.0", - "@ava/babel-preset-transform-test-files": "^3.0.0", - "@ava/write-file-atomic": "^2.2.0", - "@concordance/react": "^1.0.0", - "@ladjs/time-require": "^0.1.4", - "ansi-escapes": "^3.0.0", - "ansi-styles": "^3.1.0", - "arr-flatten": "^1.0.1", - "array-union": "^1.0.1", - "array-uniq": "^1.0.2", - "arrify": "^1.0.0", - "auto-bind": "^1.1.0", - "ava-init": "^0.2.0", - "babel-core": "^6.17.0", - "babel-generator": "^6.26.0", - "babel-plugin-syntax-object-rest-spread": "^6.13.0", - "bluebird": "^3.0.0", - "caching-transform": "^1.0.0", - "chalk": "^2.0.1", - "chokidar": "^1.4.2", - "clean-stack": "^1.1.1", - "clean-yaml-object": "^0.1.0", - "cli-cursor": "^2.1.0", - "cli-spinners": "^1.0.0", - "cli-truncate": "^1.0.0", - "co-with-promise": "^4.6.0", - "code-excerpt": "^2.1.1", - "common-path-prefix": "^1.0.0", - "concordance": "^3.0.0", - "convert-source-map": "^1.5.1", - "core-assert": "^0.2.0", - "currently-unhandled": "^0.4.1", - "debug": "^3.0.1", - "dot-prop": "^4.1.0", - "empower-core": "^0.6.1", - "equal-length": "^1.0.0", - "figures": "^2.0.0", - "find-cache-dir": "^1.0.0", - "fn-name": "^2.0.0", - "get-port": "^3.0.0", - "globby": "^6.0.0", - "has-flag": "^2.0.0", - "hullabaloo-config-manager": "^1.1.0", - "ignore-by-default": "^1.0.0", - "import-local": "^0.1.1", - "indent-string": "^3.0.0", - "is-ci": "^1.0.7", - "is-generator-fn": "^1.0.0", - "is-obj": "^1.0.0", - "is-observable": "^1.0.0", - "is-promise": "^2.1.0", - "last-line-stream": "^1.0.0", - "lodash.clonedeepwith": "^4.5.0", - "lodash.debounce": "^4.0.3", - "lodash.difference": "^4.3.0", - "lodash.flatten": "^4.2.0", - "loud-rejection": "^1.2.0", - "make-dir": "^1.0.0", - "matcher": "^1.0.0", - "md5-hex": "^2.0.0", - "meow": "^3.7.0", - "ms": "^2.0.0", - "multimatch": "^2.1.0", - "observable-to-promise": "^0.5.0", - "option-chain": "^1.0.0", - "package-hash": "^2.0.0", - "pkg-conf": "^2.0.0", - "plur": "^2.0.0", - "pretty-ms": "^3.0.0", - "require-precompiled": "^0.1.0", - "resolve-cwd": "^2.0.0", - "safe-buffer": "^5.1.1", - "semver": "^5.4.1", - "slash": "^1.0.0", - "source-map-support": "^0.5.0", - "stack-utils": "^1.0.1", - "strip-ansi": "^4.0.0", - "strip-bom-buf": "^1.0.0", - "supertap": "^1.0.0", - "supports-color": "^5.0.0", - "trim-off-newlines": "^1.0.1", - "unique-temp-dir": "^1.0.0", - "update-notifier": "^2.3.0" + "@ava/babel-preset-stage-4": "1.1.0", + "@ava/babel-preset-transform-test-files": "3.0.0", + "@ava/write-file-atomic": "2.2.0", + "@concordance/react": "1.0.0", + "@ladjs/time-require": "0.1.4", + "ansi-escapes": "3.1.0", + "ansi-styles": "3.2.1", + "arr-flatten": "1.1.0", + "array-union": "1.0.2", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "auto-bind": "1.2.1", + "ava-init": "0.2.1", + "babel-core": "6.26.3", + "babel-generator": "6.26.1", + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "bluebird": "3.5.1", + "caching-transform": "1.0.1", + "chalk": "2.4.1", + "chokidar": "1.7.0", + "clean-stack": "1.3.0", + "clean-yaml-object": "0.1.0", + "cli-cursor": "2.1.0", + "cli-spinners": "1.3.1", + "cli-truncate": "1.1.0", + "co-with-promise": "4.6.0", + "code-excerpt": "2.1.1", + "common-path-prefix": "1.0.0", + "concordance": "3.0.0", + "convert-source-map": "1.5.1", + "core-assert": "0.2.1", + "currently-unhandled": "0.4.1", + "debug": "3.1.0", + "dot-prop": "4.2.0", + "empower-core": "0.6.2", + "equal-length": "1.0.1", + "figures": "2.0.0", + "find-cache-dir": "1.0.0", + "fn-name": "2.0.1", + "get-port": "3.2.0", + "globby": "6.1.0", + "has-flag": "2.0.0", + "hullabaloo-config-manager": "1.1.1", + "ignore-by-default": "1.0.1", + "import-local": "0.1.1", + "indent-string": "3.2.0", + "is-ci": "1.1.0", + "is-generator-fn": "1.0.0", + "is-obj": "1.0.1", + "is-observable": "1.1.0", + "is-promise": "2.1.0", + "last-line-stream": "1.0.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.debounce": "4.0.8", + "lodash.difference": "4.5.0", + "lodash.flatten": "4.4.0", + "loud-rejection": "1.6.0", + "make-dir": "1.3.0", + "matcher": "1.1.1", + "md5-hex": "2.0.0", + "meow": "3.7.0", + "ms": "2.0.0", + "multimatch": "2.1.0", + "observable-to-promise": "0.5.0", + "option-chain": "1.0.0", + "package-hash": "2.0.0", + "pkg-conf": "2.1.0", + "plur": "2.1.2", + "pretty-ms": "3.2.0", + "require-precompiled": "0.1.0", + "resolve-cwd": "2.0.0", + "safe-buffer": "5.1.2", + "semver": "5.5.0", + "slash": "1.0.0", + "source-map-support": "0.5.6", + "stack-utils": "1.0.1", + "strip-ansi": "4.0.0", + "strip-bom-buf": "1.0.0", + "supertap": "1.0.0", + "supports-color": "5.4.0", + "trim-off-newlines": "1.0.1", + "unique-temp-dir": "1.0.0", + "update-notifier": "2.5.0" }, "dependencies": { "ansi-regex": { @@ -2900,7 +2900,7 @@ "dev": true, "requires": { "call-signature": "0.0.2", - "core-js": "^2.0.0" + "core-js": "2.5.7" } }, "globby": { @@ -2909,11 +2909,11 @@ "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -2934,7 +2934,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "strip-ansi": { @@ -2943,7 +2943,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -2954,11 +2954,11 @@ "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", "dev": true, "requires": { - "arr-exclude": "^1.0.0", - "execa": "^0.7.0", - "has-yarn": "^1.0.0", - "read-pkg-up": "^2.0.0", - "write-pkg": "^3.1.0" + "arr-exclude": "1.0.0", + "execa": "0.7.0", + "has-yarn": "1.0.0", + "read-pkg-up": "2.0.0", + "write-pkg": "3.2.0" } }, "aws-sign2": { @@ -2976,8 +2976,8 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" + "follow-redirects": "1.5.0", + "is-buffer": "1.1.6" } }, "babel-code-frame": { @@ -2986,9 +2986,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" }, "dependencies": { "ansi-styles": { @@ -3003,11 +3003,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "supports-color": { @@ -3024,25 +3024,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" }, "dependencies": { "debug": { @@ -3062,14 +3062,14 @@ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" }, "dependencies": { "jsesc": { @@ -3086,9 +3086,9 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-call-delegate": { @@ -3097,10 +3097,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-explode-assignable-expression": { @@ -3109,9 +3109,9 @@ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-function-name": { @@ -3120,11 +3120,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-get-function-arity": { @@ -3133,8 +3133,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-hoist-variables": { @@ -3143,8 +3143,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-regex": { @@ -3153,9 +3153,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.10" } }, "babel-helper-remap-async-to-generator": { @@ -3164,11 +3164,11 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helpers": { @@ -3177,8 +3177,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-messages": { @@ -3187,7 +3187,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-check-es2015-constants": { @@ -3196,7 +3196,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-espower": { @@ -3205,13 +3205,13 @@ "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", "dev": true, "requires": { - "babel-generator": "^6.1.0", - "babylon": "^6.1.0", - "call-matcher": "^1.0.0", - "core-js": "^2.0.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.1.1" + "babel-generator": "6.26.1", + "babylon": "6.18.0", + "call-matcher": "1.0.1", + "core-js": "2.5.7", + "espower-location-detector": "1.0.0", + "espurify": "1.8.0", + "estraverse": "4.2.0" } }, "babel-plugin-syntax-async-functions": { @@ -3244,9 +3244,9 @@ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -3255,7 +3255,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -3264,9 +3264,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -3275,10 +3275,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -3287,12 +3287,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-spread": { @@ -3301,7 +3301,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -3310,9 +3310,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -3321,9 +3321,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { @@ -3332,9 +3332,9 @@ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-strict-mode": { @@ -3343,8 +3343,8 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-register": { @@ -3353,13 +3353,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" + "babel-core": "6.26.3", + "babel-runtime": "6.26.0", + "core-js": "2.5.7", + "home-or-tmp": "2.0.0", + "lodash": "4.17.10", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" }, "dependencies": { "source-map-support": { @@ -3368,7 +3368,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } } } @@ -3379,8 +3379,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.7", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -3389,11 +3389,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.10" } }, "babel-traverse": { @@ -3402,15 +3402,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.10" }, "dependencies": { "debug": { @@ -3430,10 +3430,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "1.0.3" } }, "babylon": { @@ -3452,13 +3452,13 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" }, "dependencies": { "define-property": { @@ -3466,7 +3466,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -3474,7 +3474,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -3482,7 +3482,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -3490,9 +3490,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -3503,7 +3503,7 @@ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "optional": true, "requires": { - "tweetnacl": "^0.14.3" + "tweetnacl": "0.14.5" } }, "binary-extensions": { @@ -3524,13 +3524,13 @@ "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.4.1", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "2.0.0" }, "dependencies": { "ansi-regex": { @@ -3557,8 +3557,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -3567,7 +3567,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -3577,7 +3577,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -3586,16 +3586,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -3603,7 +3603,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -3642,7 +3642,7 @@ "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { - "long": "~3" + "long": "3.2.0" }, "dependencies": { "long": { @@ -3657,15 +3657,15 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" } }, "cacheable-request": { @@ -3697,9 +3697,9 @@ "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", "dev": true, "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" }, "dependencies": { "md5-hex": { @@ -3708,7 +3708,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "write-file-atomic": { @@ -3717,9 +3717,9 @@ "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } } } @@ -3730,10 +3730,10 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "^2.0.0", - "deep-equal": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.0.0" + "core-js": "2.5.7", + "deep-equal": "1.0.1", + "espurify": "1.8.0", + "estraverse": "4.2.0" } }, "call-me-maybe": { @@ -3752,7 +3752,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "^0.2.0" + "callsites": "0.2.0" } }, "callsites": { @@ -3772,8 +3772,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" }, "dependencies": { "map-obj": { @@ -3801,7 +3801,7 @@ "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", "dev": true, "requires": { - "underscore-contrib": "~0.3.0" + "underscore-contrib": "0.3.0" } }, "center-align": { @@ -3811,8 +3811,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "chalk": { @@ -3821,9 +3821,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "chardet": { @@ -3838,15 +3838,14 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" }, "dependencies": { "glob-parent": { @@ -3855,7 +3854,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "is-extglob": { @@ -3870,7 +3869,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -3892,10 +3891,10 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" }, "dependencies": { "define-property": { @@ -3903,7 +3902,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -3932,7 +3931,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "2.0.0" } }, "cli-spinners": { @@ -3947,8 +3946,8 @@ "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", "dev": true, "requires": { - "slice-ansi": "^1.0.0", - "string-width": "^2.0.0" + "slice-ansi": "1.0.0", + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -3969,8 +3968,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -3979,7 +3978,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -3995,9 +3994,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" } }, "clone-response": { @@ -4006,7 +4005,7 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "mimic-response": "1.0.0" } }, "co": { @@ -4020,7 +4019,7 @@ "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", "dev": true, "requires": { - "pinkie-promise": "^1.0.0" + "pinkie-promise": "1.0.0" } }, "code-excerpt": { @@ -4029,7 +4028,7 @@ "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", "dev": true, "requires": { - "convert-to-spaces": "^1.0.1" + "convert-to-spaces": "1.0.2" } }, "code-point-at": { @@ -4044,7 +4043,7 @@ "dev": true, "requires": { "argv": "0.0.2", - "request": "^2.81.0", + "request": "2.87.0", "urlgrey": "0.4.4" } }, @@ -4053,8 +4052,8 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "map-visit": "1.0.0", + "object-visit": "1.0.1" } }, "color-convert": { @@ -4088,7 +4087,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "~1.0.0" + "delayed-stream": "1.0.0" } }, "commander": { @@ -4120,7 +4119,7 @@ "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", "dev": true, "requires": { - "mime-db": ">= 1.34.0 < 2" + "mime-db": "1.34.0" }, "dependencies": { "mime-db": { @@ -4142,10 +4141,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "buffer-from": "1.1.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" } }, "concordance": { @@ -4154,17 +4153,17 @@ "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", "dev": true, "requires": { - "date-time": "^2.1.0", - "esutils": "^2.0.2", - "fast-diff": "^1.1.1", - "function-name-support": "^0.2.0", - "js-string-escape": "^1.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.flattendeep": "^4.4.0", - "lodash.merge": "^4.6.0", - "md5-hex": "^2.0.0", - "semver": "^5.3.0", - "well-known-symbols": "^1.0.0" + "date-time": "2.1.0", + "esutils": "2.0.2", + "fast-diff": "1.1.2", + "function-name-support": "0.2.0", + "js-string-escape": "1.0.1", + "lodash.clonedeep": "4.5.0", + "lodash.flattendeep": "4.4.0", + "lodash.merge": "4.6.1", + "md5-hex": "2.0.0", + "semver": "5.5.0", + "well-known-symbols": "1.0.0" }, "dependencies": { "date-time": { @@ -4173,7 +4172,7 @@ "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "dev": true, "requires": { - "time-zone": "^1.0.0" + "time-zone": "1.0.0" } } } @@ -4184,12 +4183,12 @@ "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.3.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" } }, "convert-source-map": { @@ -4221,8 +4220,8 @@ "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", "dev": true, "requires": { - "buf-compare": "^1.0.0", - "is-error": "^2.2.0" + "buf-compare": "1.0.1", + "is-error": "2.2.1" } }, "core-js": { @@ -4241,7 +4240,7 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "^1.0.0" + "capture-stack-trace": "1.0.0" } }, "cross-spawn": { @@ -4250,9 +4249,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" } }, "crypto-random-string": { @@ -4267,7 +4266,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "^1.0.1" + "array-find-index": "1.0.2" } }, "d": { @@ -4276,7 +4275,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "^0.10.9" + "es5-ext": "0.10.45" } }, "d64": { @@ -4289,7 +4288,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "date-time": { @@ -4322,7 +4321,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "mimic-response": "1.0.0" } }, "deep-equal": { @@ -4348,8 +4347,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" + "foreach": "2.0.5", + "object-keys": "1.0.12" } }, "define-property": { @@ -4357,8 +4356,8 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -4366,7 +4365,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -4374,7 +4373,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -4382,9 +4381,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -4395,13 +4394,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" }, "dependencies": { "globby": { @@ -4410,12 +4409,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -4436,7 +4435,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } } } @@ -4447,7 +4446,7 @@ "integrity": "sha1-kRLq3APk7H4AKXM3iW8nO72R+uU=", "dev": true, "requires": { - "p-defer": "^1.0.0" + "p-defer": "1.0.0" } }, "delayed-stream": { @@ -4461,7 +4460,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "diff": { @@ -4480,8 +4479,8 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" + "arrify": "1.0.1", + "path-type": "3.0.0" } }, "doctrine": { @@ -4490,7 +4489,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2" + "esutils": "2.0.2" } }, "dom-serializer": { @@ -4499,8 +4498,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" + "domelementtype": "1.1.3", + "entities": "1.1.1" }, "dependencies": { "domelementtype": { @@ -4523,7 +4522,7 @@ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { - "domelementtype": "1" + "domelementtype": "1.3.0" } }, "domutils": { @@ -4532,8 +4531,8 @@ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" } }, "dot-prop": { @@ -4541,7 +4540,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "requires": { - "is-obj": "^1.0.0" + "is-obj": "1.0.1" } }, "duplexer3": { @@ -4555,10 +4554,10 @@ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "stream-shift": "1.0.0" } }, "eastasianwidth": { @@ -4572,7 +4571,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "0.1.1" } }, "ecdsa-sig-formatter": { @@ -4580,7 +4579,7 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", "requires": { - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "empower": { @@ -4588,8 +4587,8 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.0.tgz", "integrity": "sha512-tP2WqM7QzrPguCCQEQfFFDF+6Pw6YWLQal3+GHQaV+0uIr0S+jyREQPWljE02zFCYPFYLZ3LosiRV+OzTrxPpQ==", "requires": { - "core-js": "^2.0.0", - "empower-core": "^1.2.0" + "core-js": "2.5.7", + "empower-core": "1.2.0" } }, "empower-assert": { @@ -4598,7 +4597,7 @@ "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { - "estraverse": "^4.2.0" + "estraverse": "4.2.0" } }, "empower-core": { @@ -4607,7 +4606,7 @@ "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", "requires": { "call-signature": "0.0.2", - "core-js": "^2.0.0" + "core-js": "2.5.7" } }, "end-of-stream": { @@ -4615,7 +4614,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "once": "^1.4.0" + "once": "1.4.0" } }, "ent": { @@ -4641,7 +4640,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "es-abstract": { @@ -4650,11 +4649,11 @@ "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", "dev": true, "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.3", + "is-callable": "1.1.4", + "is-regex": "1.0.4" } }, "es-to-primitive": { @@ -4663,9 +4662,9 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" + "is-callable": "1.1.4", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" } }, "es5-ext": { @@ -4674,9 +4673,9 @@ "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", "dev": true, "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" } }, "es6-error": { @@ -4691,9 +4690,9 @@ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "d": "1.0.0", + "es5-ext": "0.10.45", + "es6-symbol": "3.1.1" } }, "es6-map": { @@ -4702,12 +4701,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" + "d": "1.0.0", + "es5-ext": "0.10.45", + "es6-iterator": "2.0.3", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" } }, "es6-set": { @@ -4716,11 +4715,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", + "d": "1.0.0", + "es5-ext": "0.10.45", + "es6-iterator": "2.0.3", "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" + "event-emitter": "0.3.5" } }, "es6-symbol": { @@ -4729,8 +4728,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "1.0.0", + "es5-ext": "0.10.45" } }, "es6-weak-map": { @@ -4739,10 +4738,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" + "d": "1.0.0", + "es5-ext": "0.10.45", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" } }, "escallmatch": { @@ -4751,8 +4750,8 @@ "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", "dev": true, "requires": { - "call-matcher": "^1.0.0", - "esprima": "^2.0.0" + "call-matcher": "1.0.1", + "esprima": "2.7.3" }, "dependencies": { "esprima": { @@ -4775,11 +4774,11 @@ "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", "dev": true, "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" + "esprima": "3.1.3", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.6.1" }, "dependencies": { "esprima": { @@ -4803,10 +4802,10 @@ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "^0.1.3", - "es6-weak-map": "^2.0.1", - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.1", + "estraverse": "4.2.0" } }, "eslint": { @@ -4815,44 +4814,44 @@ "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", "dev": true, "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.5.0", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", - "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.5", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^1.1.0", - "require-uncached": "^1.0.3", - "semver": "^5.5.0", - "string.prototype.matchall": "^2.0.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^4.0.3", - "text-table": "^0.2.0" + "ajv": "6.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.4.1", + "cross-spawn": "6.0.5", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "4.0.0", + "eslint-visitor-keys": "1.0.0", + "espree": "4.0.0", + "esquery": "1.0.1", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.7.0", + "ignore": "3.3.10", + "imurmurhash": "0.1.4", + "inquirer": "5.2.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.12.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.1.0", + "require-uncached": "1.0.3", + "semver": "5.5.0", + "string.prototype.matchall": "2.0.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.3", + "text-table": "0.2.0" }, "dependencies": { "ajv": { @@ -4861,10 +4860,10 @@ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" } }, "ansi-regex": { @@ -4879,11 +4878,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "nice-try": "1.0.4", + "path-key": "2.0.1", + "semver": "5.5.0", + "shebang-command": "1.2.0", + "which": "1.3.1" } }, "fast-deep-equal": { @@ -4910,7 +4909,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -4921,7 +4920,7 @@ "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { - "get-stdin": "^5.0.1" + "get-stdin": "5.0.1" }, "dependencies": { "get-stdin": { @@ -4938,10 +4937,10 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "^3.3.6", - "minimatch": "^3.0.4", - "resolve": "^1.3.3", - "semver": "^5.4.1" + "ignore": "3.3.10", + "minimatch": "3.0.4", + "resolve": "1.8.1", + "semver": "5.5.0" }, "dependencies": { "resolve": { @@ -4950,7 +4949,7 @@ "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } } } @@ -4961,8 +4960,8 @@ "integrity": "sha512-wNZ2z0oVCWnf+3BSI7roS+z4gGu2AwcPKUek+SlLZMZg+X0KbZLsB2knul7fd0K3iuIp402HIYzm4f2+OyfXxA==", "dev": true, "requires": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" + "fast-diff": "1.1.2", + "jest-docblock": "21.2.0" } }, "eslint-scope": { @@ -4971,8 +4970,8 @@ "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "4.2.1", + "estraverse": "4.2.0" } }, "eslint-visitor-keys": { @@ -4987,16 +4986,16 @@ "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", "dev": true, "requires": { - "array-find": "^1.0.0", - "escallmatch": "^1.5.0", - "escodegen": "^1.7.0", - "escope": "^3.3.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.3.0", - "estraverse": "^4.1.0", - "source-map": "^0.5.0", - "type-name": "^2.0.0", - "xtend": "^4.0.0" + "array-find": "1.0.0", + "escallmatch": "1.5.0", + "escodegen": "1.10.0", + "escope": "3.6.0", + "espower-location-detector": "1.0.0", + "espurify": "1.8.0", + "estraverse": "4.2.0", + "source-map": "0.5.7", + "type-name": "2.0.2", + "xtend": "4.0.1" } }, "espower-loader": { @@ -5005,11 +5004,11 @@ "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", "dev": true, "requires": { - "convert-source-map": "^1.1.0", - "espower-source": "^2.0.0", - "minimatch": "^3.0.0", - "source-map-support": "^0.4.0", - "xtend": "^4.0.0" + "convert-source-map": "1.5.1", + "espower-source": "2.3.0", + "minimatch": "3.0.4", + "source-map-support": "0.4.18", + "xtend": "4.0.1" }, "dependencies": { "source-map-support": { @@ -5018,7 +5017,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } } } @@ -5029,10 +5028,10 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "^1.2.1", - "path-is-absolute": "^1.0.0", - "source-map": "^0.5.0", - "xtend": "^4.0.0" + "is-url": "1.2.4", + "path-is-absolute": "1.0.1", + "source-map": "0.5.7", + "xtend": "4.0.1" } }, "espower-source": { @@ -5041,17 +5040,17 @@ "integrity": "sha512-Wc4kC4zUAEV7Qt31JRPoBUc5jjowHRylml2L2VaDQ1XEbnqQofGWx+gPR03TZAPokAMl5dqyL36h3ITyMXy3iA==", "dev": true, "requires": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.10", - "convert-source-map": "^1.1.1", - "empower-assert": "^1.0.0", - "escodegen": "^1.10.0", - "espower": "^2.1.1", - "estraverse": "^4.0.0", - "merge-estraverse-visitors": "^1.0.0", - "multi-stage-sourcemap": "^0.2.1", - "path-is-absolute": "^1.0.0", - "xtend": "^4.0.0" + "acorn": "5.7.1", + "acorn-es7-plugin": "1.1.7", + "convert-source-map": "1.5.1", + "empower-assert": "1.1.0", + "escodegen": "1.10.0", + "espower": "2.1.1", + "estraverse": "4.2.0", + "merge-estraverse-visitors": "1.0.0", + "multi-stage-sourcemap": "0.2.1", + "path-is-absolute": "1.0.1", + "xtend": "4.0.1" } }, "espree": { @@ -5060,8 +5059,8 @@ "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { - "acorn": "^5.6.0", - "acorn-jsx": "^4.1.1" + "acorn": "5.7.1", + "acorn-jsx": "4.1.1" } }, "esprima": { @@ -5075,7 +5074,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", "requires": { - "core-js": "^2.0.0" + "core-js": "2.5.7" } }, "esquery": { @@ -5084,7 +5083,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "4.2.0" } }, "esrecurse": { @@ -5093,7 +5092,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "4.2.0" } }, "estraverse": { @@ -5113,8 +5112,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "1.0.0", + "es5-ext": "0.10.45" } }, "eventid": { @@ -5122,8 +5121,8 @@ "resolved": "https://registry.npmjs.org/eventid/-/eventid-0.1.2.tgz", "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", "requires": { - "d64": "^1.0.0", - "uuid": "^3.0.1" + "d64": "1.0.0", + "uuid": "3.3.2" } }, "execa": { @@ -5132,13 +5131,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } }, "expand-brackets": { @@ -5146,13 +5145,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "debug": { @@ -5168,7 +5167,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -5176,7 +5175,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5187,7 +5186,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "^2.1.0" + "fill-range": "2.2.4" }, "dependencies": { "fill-range": { @@ -5196,11 +5195,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "3.0.0", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, "is-number": { @@ -5209,7 +5208,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "isobject": { @@ -5227,7 +5226,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -5242,8 +5241,8 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -5251,7 +5250,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -5262,9 +5261,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" + "chardet": "0.4.2", + "iconv-lite": "0.4.23", + "tmp": "0.0.33" } }, "extglob": { @@ -5272,14 +5271,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -5287,7 +5286,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -5295,7 +5294,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -5303,7 +5302,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -5311,7 +5310,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -5319,9 +5318,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -5347,12 +5346,12 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.1", - "micromatch": "^3.1.10" + "@mrmlnc/readdir-enhanced": "2.2.1", + "@nodelib/fs.stat": "1.1.0", + "glob-parent": "3.1.0", + "is-glob": "4.0.0", + "merge2": "1.2.2", + "micromatch": "3.1.10" } }, "fast-json-stable-stringify": { @@ -5372,7 +5371,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "escape-string-regexp": "1.0.5" } }, "file-entry-cache": { @@ -5381,8 +5380,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "1.3.0", + "object-assign": "4.1.1" } }, "filename-regex": { @@ -5397,8 +5396,8 @@ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", "dev": true, "requires": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" + "is-object": "1.0.1", + "merge-descriptors": "1.0.1" } }, "fill-range": { @@ -5406,10 +5405,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -5417,7 +5416,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5428,9 +5427,9 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" + "commondir": "1.0.1", + "make-dir": "1.3.0", + "pkg-dir": "2.0.0" } }, "find-up": { @@ -5439,7 +5438,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "flat-cache": { @@ -5448,10 +5447,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" } }, "fn-name": { @@ -5465,7 +5464,7 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", "requires": { - "debug": "^3.1.0" + "debug": "3.1.0" } }, "for-in": { @@ -5479,7 +5478,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "foreach": { @@ -5497,9 +5496,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "^0.4.0", + "asynckit": "0.4.0", "combined-stream": "1.0.6", - "mime-types": "^2.1.12" + "mime-types": "2.1.18" } }, "formidable": { @@ -5513,7 +5512,7 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { - "map-cache": "^0.2.2" + "map-cache": "0.2.2" } }, "from2": { @@ -5522,8 +5521,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "fs-extra": { @@ -5532,9 +5531,9 @@ "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.2" } }, "fs.realpath": { @@ -5542,535 +5541,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -6094,8 +5564,8 @@ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", "requires": { - "axios": "^0.18.0", - "extend": "^3.0.1", + "axios": "0.18.0", + "extend": "3.0.1", "retry-axios": "0.3.2" } }, @@ -6105,11 +5575,11 @@ "integrity": "sha1-fymz7iPc7EFwNnwHEUGCScZgVF8=", "dev": true, "requires": { - "configstore": "^3.1.2", - "google-auto-auth": "^0.10.0", - "pumpify": "^1.4.0", - "request": "^2.85.0", - "stream-events": "^1.0.3" + "configstore": "3.1.2", + "google-auto-auth": "0.10.1", + "pumpify": "1.5.1", + "request": "2.87.0", + "stream-events": "1.0.4" } }, "get-caller-file": { @@ -6146,7 +5616,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "glob": { @@ -6154,12 +5624,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-base": { @@ -6168,8 +5638,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" + "glob-parent": "2.0.0", + "is-glob": "2.0.1" }, "dependencies": { "glob-parent": { @@ -6178,7 +5648,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "is-extglob": { @@ -6193,7 +5663,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -6203,8 +5673,8 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "3.1.0", + "path-dirname": "1.0.2" }, "dependencies": { "is-glob": { @@ -6212,7 +5682,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "2.1.1" } } } @@ -6228,7 +5698,7 @@ "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, "requires": { - "ini": "^1.3.4" + "ini": "1.3.5" } }, "globals": { @@ -6242,13 +5712,13 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "fast-glob": "2.2.2", + "glob": "7.1.2", + "ignore": "3.3.10", + "pify": "3.0.0", + "slash": "1.0.0" } }, "google-auth-library": { @@ -6256,13 +5726,13 @@ "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz", "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==", "requires": { - "axios": "^0.18.0", - "gcp-metadata": "^0.6.3", - "gtoken": "^2.3.0", - "jws": "^3.1.5", - "lodash.isstring": "^4.0.1", - "lru-cache": "^4.1.3", - "retry-axios": "^0.3.2" + "axios": "0.18.0", + "gcp-metadata": "0.6.3", + "gtoken": "2.3.0", + "jws": "3.1.5", + "lodash.isstring": "4.0.1", + "lru-cache": "4.1.3", + "retry-axios": "0.3.2" } }, "google-auto-auth": { @@ -6271,10 +5741,10 @@ "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "dev": true, "requires": { - "async": "^2.3.0", - "gcp-metadata": "^0.6.1", - "google-auth-library": "^1.3.1", - "request": "^2.79.0" + "async": "2.6.1", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.6.1", + "request": "2.87.0" } }, "google-gax": { @@ -6282,17 +5752,17 @@ "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.17.1.tgz", "integrity": "sha512-fAKvFx++SRr6bGWamWuVOkJzJnQqMgpJkhaB2oEwfFJ91rbFgEmIPRmZZ/MeIVVFUOuHUVyZ8nwjm5peyTZJ6g==", "requires": { - "duplexify": "^3.6.0", - "extend": "^3.0.1", - "globby": "^8.0.1", - "google-auth-library": "^1.6.1", - "google-proto-files": "^0.16.0", - "grpc": "^1.12.2", - "is-stream-ended": "^0.1.4", - "lodash": "^4.17.10", - "protobufjs": "^6.8.6", - "retry-request": "^4.0.0", - "through2": "^2.0.3" + "duplexify": "3.6.0", + "extend": "3.0.1", + "globby": "8.0.1", + "google-auth-library": "1.6.1", + "google-proto-files": "0.16.1", + "grpc": "1.12.4", + "is-stream-ended": "0.1.4", + "lodash": "4.17.10", + "protobufjs": "6.8.6", + "retry-request": "4.0.0", + "through2": "2.0.3" } }, "google-p12-pem": { @@ -6300,8 +5770,8 @@ "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", "requires": { - "node-forge": "^0.7.4", - "pify": "^3.0.0" + "node-forge": "0.7.5", + "pify": "3.0.0" } }, "google-proto-files": { @@ -6309,9 +5779,9 @@ "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", "requires": { - "globby": "^8.0.0", - "power-assert": "^1.4.4", - "protobufjs": "^6.8.0" + "globby": "8.0.1", + "power-assert": "1.6.0", + "protobufjs": "6.8.6" } }, "got": { @@ -6320,23 +5790,23 @@ "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", "dev": true, "requires": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" + "@sindresorhus/is": "0.7.0", + "cacheable-request": "2.1.4", + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "into-stream": "3.1.0", + "is-retry-allowed": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "mimic-response": "1.0.0", + "p-cancelable": "0.3.0", + "p-timeout": "2.0.1", + "pify": "3.0.0", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "url-parse-lax": "3.0.0", + "url-to-options": "1.0.1" }, "dependencies": { "prepend-http": { @@ -6351,7 +5821,7 @@ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "^2.0.0" + "prepend-http": "2.0.0" } } } @@ -6373,10 +5843,10 @@ "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", "requires": { - "lodash": "^4.17.5", - "nan": "^2.0.0", - "node-pre-gyp": "^0.10.0", - "protobufjs": "^5.0.3" + "lodash": "4.17.10", + "nan": "2.10.0", + "node-pre-gyp": "0.10.0", + "protobufjs": "5.0.3" }, "dependencies": { "abbrev": { @@ -6395,8 +5865,8 @@ "version": "1.1.5", "bundled": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "balanced-match": { @@ -6407,7 +5877,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -6454,7 +5924,7 @@ "version": "1.2.5", "bundled": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.3.3" } }, "fs.realpath": { @@ -6465,26 +5935,26 @@ "version": "2.7.4", "bundled": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.3" } }, "glob": { "version": "7.1.2", "bundled": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "has-unicode": { @@ -6495,22 +5965,22 @@ "version": "0.4.23", "bundled": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": "2.1.2" } }, "ignore-walk": { "version": "3.0.1", "bundled": true, "requires": { - "minimatch": "^3.0.4" + "minimatch": "3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -6525,7 +5995,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "isarray": { @@ -6536,7 +6006,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -6547,15 +6017,15 @@ "version": "2.3.3", "bundled": true, "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "safe-buffer": "5.1.2", + "yallist": "3.0.2" } }, "minizlib": { "version": "1.1.0", "bundled": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.3.3" } }, "mkdirp": { @@ -6579,33 +6049,33 @@ "version": "2.2.1", "bundled": true, "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" + "debug": "2.6.9", + "iconv-lite": "0.4.23", + "sax": "1.2.4" } }, "node-pre-gyp": { "version": "0.10.0", "bundled": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.1", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.8", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.4" } }, "nopt": { "version": "4.0.1", "bundled": true, "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "abbrev": "1.1.1", + "osenv": "0.1.5" } }, "npm-bundled": { @@ -6616,18 +6086,18 @@ "version": "1.1.10", "bundled": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { "version": "4.1.2", "bundled": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.5", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "number-is-nan": { @@ -6642,7 +6112,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "os-homedir": { @@ -6657,8 +6127,8 @@ "version": "0.1.5", "bundled": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "path-is-absolute": { @@ -6674,40 +6144,40 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" + "ascli": "1.0.1", + "bytebuffer": "5.0.1", + "glob": "7.1.2", + "yargs": "3.32.0" } }, "rc": { "version": "1.2.8", "bundled": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.6.0", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" } }, "readable-stream": { "version": "2.3.6", "bundled": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "rimraf": { "version": "2.6.2", "bundled": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "safe-buffer": { @@ -6734,27 +6204,27 @@ "version": "3.0.2", "bundled": true }, - "string-width": { - "version": "1.0.2", + "string_decoder": { + "version": "1.1.1", "bundled": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "safe-buffer": "5.1.2" } }, - "string_decoder": { - "version": "1.1.1", + "string-width": { + "version": "1.0.2", "bundled": true, "requires": { - "safe-buffer": "~5.1.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-json-comments": { @@ -6765,13 +6235,13 @@ "version": "4.4.4", "bundled": true, "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.3", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.3.3", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.2", + "yallist": "3.0.2" } }, "util-deprecate": { @@ -6782,7 +6252,7 @@ "version": "1.1.3", "bundled": true, "requires": { - "string-width": "^1.0.2 || 2" + "string-width": "1.0.2" } }, "wrappy": { @@ -6800,11 +6270,11 @@ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", "requires": { - "axios": "^0.18.0", - "google-p12-pem": "^1.0.0", - "jws": "^3.1.4", - "mime": "^2.2.0", - "pify": "^3.0.0" + "axios": "0.18.0", + "google-p12-pem": "1.0.2", + "jws": "3.1.5", + "mime": "2.3.1", + "pify": "3.0.0" } }, "handlebars": { @@ -6813,10 +6283,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "async": { @@ -6831,7 +6301,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -6846,8 +6316,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" + "ajv": "5.5.2", + "har-schema": "2.0.0" } }, "has": { @@ -6856,7 +6326,7 @@ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "function-bind": "1.1.1" } }, "has-ansi": { @@ -6865,7 +6335,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-color": { @@ -6898,7 +6368,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "^1.4.1" + "has-symbol-support-x": "1.4.2" } }, "has-value": { @@ -6906,9 +6376,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" } }, "has-values": { @@ -6916,8 +6386,8 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "kind-of": { @@ -6925,7 +6395,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -6942,7 +6412,7 @@ "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", "dev": true, "requires": { - "through2": "^2.0.0" + "through2": "2.0.3" } }, "he": { @@ -6957,8 +6427,8 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "hosted-git-info": { @@ -6973,12 +6443,12 @@ "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "dev": true, "requires": { - "domelementtype": "^1.3.0", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" + "domelementtype": "1.3.0", + "domhandler": "2.4.2", + "domutils": "1.7.0", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "http-cache-semantics": { @@ -6992,9 +6462,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.2" } }, "hullabaloo-config-manager": { @@ -7003,20 +6473,20 @@ "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", "dev": true, "requires": { - "dot-prop": "^4.1.0", - "es6-error": "^4.0.2", - "graceful-fs": "^4.1.11", - "indent-string": "^3.1.0", - "json5": "^0.5.1", - "lodash.clonedeep": "^4.5.0", - "lodash.clonedeepwith": "^4.5.0", - "lodash.isequal": "^4.5.0", - "lodash.merge": "^4.6.0", - "md5-hex": "^2.0.0", - "package-hash": "^2.0.0", - "pkg-dir": "^2.0.0", - "resolve-from": "^3.0.0", - "safe-buffer": "^5.0.1" + "dot-prop": "4.2.0", + "es6-error": "4.1.1", + "graceful-fs": "4.1.11", + "indent-string": "3.2.0", + "json5": "0.5.1", + "lodash.clonedeep": "4.5.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.isequal": "4.5.0", + "lodash.merge": "4.6.1", + "md5-hex": "2.0.0", + "package-hash": "2.0.0", + "pkg-dir": "2.0.0", + "resolve-from": "3.0.0", + "safe-buffer": "5.1.2" } }, "iconv-lite": { @@ -7025,7 +6495,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": "2.1.2" } }, "ignore": { @@ -7051,8 +6521,8 @@ "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", "dev": true, "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" } }, "imurmurhash": { @@ -7077,8 +6547,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -7094,11 +6564,10 @@ }, "ink-docstrap": { "version": "git+https://github.com/docstrap/docstrap.git#1e56828b819bcbc9855543bd20809a0aed415a80", - "from": "git+https://github.com/docstrap/docstrap.git", "dev": true, "requires": { - "moment": "^2.14.1", - "sanitize-html": "^1.13.0" + "moment": "2.22.2", + "sanitize-html": "1.18.2" } }, "inquirer": { @@ -7107,19 +6576,19 @@ "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.2.0", + "figures": "2.0.0", + "lodash": "4.17.10", "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "run-async": "2.3.0", + "rxjs": "5.5.11", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" }, "dependencies": { "ansi-regex": { @@ -7140,8 +6609,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -7150,7 +6619,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -7161,7 +6630,7 @@ "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", "dev": true, "requires": { - "espower-loader": "^1.0.0" + "espower-loader": "1.2.2" } }, "into-stream": { @@ -7170,8 +6639,8 @@ "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" + "from2": "2.3.0", + "p-is-promise": "1.1.0" } }, "invariant": { @@ -7180,7 +6649,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.3.1" } }, "invert-kv": { @@ -7204,7 +6673,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -7212,7 +6681,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -7229,7 +6698,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -7243,7 +6712,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-callable": { @@ -7258,7 +6727,7 @@ "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "^1.0.0" + "ci-info": "1.1.3" } }, "is-data-descriptor": { @@ -7266,7 +6735,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -7274,7 +6743,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -7290,9 +6759,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { @@ -7314,7 +6783,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-primitive": "2.0.0" } }, "is-error": { @@ -7339,7 +6808,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -7347,7 +6816,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-generator-fn": { @@ -7361,7 +6830,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } }, "is-installed-globally": { @@ -7370,8 +6839,8 @@ "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" } }, "is-npm": { @@ -7385,7 +6854,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -7393,7 +6862,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -7415,7 +6884,7 @@ "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "^1.1.0" + "symbol-observable": "1.2.0" } }, "is-path-cwd": { @@ -7430,7 +6899,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { @@ -7439,7 +6908,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "1.0.2" } }, "is-plain-obj": { @@ -7453,7 +6922,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "is-posix-bracket": { @@ -7486,7 +6955,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "^1.0.1" + "has": "1.0.3" } }, "is-resolvable": { @@ -7578,8 +7047,8 @@ "@babel/template": "7.0.0-beta.51", "@babel/traverse": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "istanbul-lib-coverage": "^2.0.0", - "semver": "^5.5.0" + "istanbul-lib-coverage": "2.0.0", + "semver": "5.5.0" } }, "isurl": { @@ -7588,8 +7057,8 @@ "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" + "has-to-string-tag-x": "1.4.1", + "is-object": "1.0.1" } }, "jest-docblock": { @@ -7616,8 +7085,8 @@ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "1.0.10", + "esprima": "4.0.0" } }, "js2xmlparser": { @@ -7626,7 +7095,7 @@ "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", "dev": true, "requires": { - "xmlcreate": "^1.0.1" + "xmlcreate": "1.0.2" } }, "jsbn": { @@ -7642,17 +7111,17 @@ "dev": true, "requires": { "babylon": "7.0.0-beta.19", - "bluebird": "~3.5.0", - "catharsis": "~0.8.9", - "escape-string-regexp": "~1.0.5", - "js2xmlparser": "~3.0.0", - "klaw": "~2.0.0", - "marked": "~0.3.6", - "mkdirp": "~0.5.1", - "requizzle": "~0.2.1", - "strip-json-comments": "~2.0.1", + "bluebird": "3.5.1", + "catharsis": "0.8.9", + "escape-string-regexp": "1.0.5", + "js2xmlparser": "3.0.0", + "klaw": "2.0.0", + "marked": "0.3.19", + "mkdirp": "0.5.1", + "requizzle": "0.2.1", + "strip-json-comments": "2.0.1", "taffydb": "2.6.2", - "underscore": "~1.8.3" + "underscore": "1.8.3" }, "dependencies": { "babylon": { @@ -7714,7 +7183,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "4.1.11" } }, "jsprim": { @@ -7741,7 +7210,7 @@ "requires": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "jws": { @@ -7749,8 +7218,8 @@ "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", "requires": { - "jwa": "^1.1.5", - "safe-buffer": "^5.0.1" + "jwa": "1.1.6", + "safe-buffer": "5.1.2" } }, "keyv": { @@ -7773,7 +7242,7 @@ "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", "dev": true, "requires": { - "graceful-fs": "^4.1.9" + "graceful-fs": "4.1.11" } }, "last-line-stream": { @@ -7782,7 +7251,7 @@ "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", "dev": true, "requires": { - "through2": "^2.0.0" + "through2": "2.0.3" } }, "latest-version": { @@ -7791,7 +7260,7 @@ "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "^4.0.0" + "package-json": "4.0.1" } }, "lazy-cache": { @@ -7806,7 +7275,7 @@ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "levn": { @@ -7815,8 +7284,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "1.1.2", + "type-check": "0.3.2" } }, "load-json-file": { @@ -7825,10 +7294,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" }, "dependencies": { "pify": { @@ -7845,8 +7314,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" } }, "lodash": { @@ -7971,7 +7440,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "3.0.2" } }, "loud-rejection": { @@ -7980,8 +7449,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" } }, "lowercase-keys": { @@ -7995,8 +7464,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "make-dir": { @@ -8005,7 +7474,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "map-cache": { @@ -8023,7 +7492,7 @@ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "object-visit": "^1.0.0" + "object-visit": "1.0.1" } }, "marked": { @@ -8038,7 +7507,7 @@ "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", "dev": true, "requires": { - "escape-string-regexp": "^1.0.4" + "escape-string-regexp": "1.0.5" } }, "math-random": { @@ -8053,7 +7522,7 @@ "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "md5-o-matic": { @@ -8068,7 +7537,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "meow": { @@ -8077,16 +7546,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" }, "dependencies": { "find-up": { @@ -8095,8 +7564,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } }, "load-json-file": { @@ -8105,11 +7574,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "map-obj": { @@ -8130,7 +7599,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } }, "path-type": { @@ -8139,9 +7608,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -8162,7 +7631,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "read-pkg": { @@ -8171,9 +7640,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -8182,8 +7651,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" } }, "strip-bom": { @@ -8192,7 +7661,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } } } @@ -8209,7 +7678,7 @@ "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "4.2.0" } }, "merge2": { @@ -8234,19 +7703,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.13", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "mime": { @@ -8264,7 +7733,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "mime-db": "~1.33.0" + "mime-db": "1.33.0" } }, "mimic-fn": { @@ -8284,7 +7753,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -8298,8 +7767,8 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -8307,7 +7776,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -8369,7 +7838,7 @@ "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", "dev": true, "requires": { - "source-map": "^0.1.34" + "source-map": "0.1.43" }, "dependencies": { "source-map": { @@ -8378,7 +7847,7 @@ "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -8389,10 +7858,10 @@ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "dev": true, "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" } }, "mute-stream": { @@ -8411,17 +7880,17 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "natural-compare": { @@ -8448,11 +7917,11 @@ "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", - "lolex": "^2.3.2", - "path-to-regexp": "^1.7.0", - "text-encoding": "^0.6.4" + "@sinonjs/formatio": "2.0.0", + "just-extend": "1.1.27", + "lolex": "2.7.0", + "path-to-regexp": "1.7.0", + "text-encoding": "0.6.4" } }, "node-forge": { @@ -8466,10 +7935,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.6.1", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -8478,7 +7947,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } }, "normalize-url": { @@ -8487,9 +7956,9 @@ "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" + "prepend-http": "2.0.0", + "query-string": "5.1.1", + "sort-keys": "2.0.0" }, "dependencies": { "prepend-http": { @@ -8506,7 +7975,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -8520,33 +7989,33 @@ "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", "dev": true, "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^2.1.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.5", - "istanbul-reports": "^1.4.1", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.1", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "2.3.0", + "istanbul-lib-report": "1.1.3", + "istanbul-lib-source-maps": "1.2.5", + "istanbul-reports": "1.4.1", + "md5-hex": "1.3.0", + "merge-source-map": "1.1.0", + "micromatch": "3.1.10", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "spawn-wrap": "1.4.2", + "test-exclude": "4.2.1", "yargs": "11.1.0", - "yargs-parser": "^8.0.0" + "yargs-parser": "8.1.0" }, "dependencies": { "align-text": { @@ -8554,9 +8023,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" } }, "amdefine": { @@ -8574,7 +8043,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "^1.0.0" + "default-require-extensions": "1.0.0" } }, "archy": { @@ -8632,13 +8101,13 @@ "bundled": true, "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" }, "dependencies": { "define-property": { @@ -8646,7 +8115,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -8654,7 +8123,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -8662,7 +8131,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -8670,9 +8139,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "kind-of": { @@ -8687,7 +8156,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -8696,16 +8165,16 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -8713,7 +8182,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -8728,15 +8197,15 @@ "bundled": true, "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" } }, "caching-transform": { @@ -8744,9 +8213,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" } }, "camelcase": { @@ -8761,8 +8230,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "class-utils": { @@ -8770,10 +8239,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" }, "dependencies": { "define-property": { @@ -8781,7 +8250,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -8792,8 +8261,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" }, "dependencies": { @@ -8815,8 +8284,8 @@ "bundled": true, "dev": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "map-visit": "1.0.0", + "object-visit": "1.0.1" } }, "commondir": { @@ -8849,8 +8318,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "which": "1.3.1" } }, "debug": { @@ -8881,7 +8350,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "2.0.0" } }, "define-property": { @@ -8889,8 +8358,8 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -8898,7 +8367,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -8906,7 +8375,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -8914,9 +8383,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "kind-of": { @@ -8931,7 +8400,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "execa": { @@ -8939,13 +8408,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" }, "dependencies": { "cross-spawn": { @@ -8953,9 +8422,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" } } } @@ -8965,13 +8434,13 @@ "bundled": true, "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "debug": { @@ -8987,7 +8456,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -8995,7 +8464,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -9005,8 +8474,8 @@ "bundled": true, "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -9014,7 +8483,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -9024,14 +8493,14 @@ "bundled": true, "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -9039,7 +8508,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -9047,7 +8516,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -9055,7 +8524,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -9063,7 +8532,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -9071,9 +8540,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "kind-of": { @@ -9088,10 +8557,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -9099,7 +8568,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -9109,9 +8578,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" } }, "find-up": { @@ -9119,7 +8588,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "for-in": { @@ -9132,8 +8601,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" } }, "fragment-cache": { @@ -9141,7 +8610,7 @@ "bundled": true, "dev": true, "requires": { - "map-cache": "^0.2.2" + "map-cache": "0.2.2" } }, "fs.realpath": { @@ -9169,12 +8638,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "graceful-fs": { @@ -9187,10 +8656,10 @@ "bundled": true, "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "source-map": { @@ -9198,7 +8667,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -9208,9 +8677,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" } }, "has-values": { @@ -9218,8 +8687,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "kind-of": { @@ -9227,7 +8696,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -9247,8 +8716,8 @@ "bundled": true, "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -9266,7 +8735,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-arrayish": { @@ -9284,7 +8753,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-data-descriptor": { @@ -9292,7 +8761,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-descriptor": { @@ -9300,9 +8769,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { @@ -9327,7 +8796,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-odd": { @@ -9335,7 +8804,7 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^4.0.0" + "is-number": "4.0.0" }, "dependencies": { "is-number": { @@ -9350,7 +8819,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "is-stream": { @@ -9393,7 +8862,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "^0.4.0" + "append-transform": "0.4.0" } }, "istanbul-lib-report": { @@ -9401,10 +8870,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" }, "dependencies": { "has-flag": { @@ -9417,7 +8886,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "^1.0.0" + "has-flag": "1.0.0" } } } @@ -9427,11 +8896,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" } }, "istanbul-reports": { @@ -9439,7 +8908,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "^4.0.3" + "handlebars": "4.0.11" } }, "kind-of": { @@ -9447,7 +8916,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "lazy-cache": { @@ -9461,7 +8930,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "load-json-file": { @@ -9469,11 +8938,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "locate-path": { @@ -9481,8 +8950,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" }, "dependencies": { "path-exists": { @@ -9502,8 +8971,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "map-cache": { @@ -9516,7 +8985,7 @@ "bundled": true, "dev": true, "requires": { - "object-visit": "^1.0.0" + "object-visit": "1.0.1" } }, "md5-hex": { @@ -9524,7 +8993,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "^0.1.1" + "md5-o-matic": "0.1.1" } }, "md5-o-matic": { @@ -9537,7 +9006,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "merge-source-map": { @@ -9545,7 +9014,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "^0.6.1" + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -9560,19 +9029,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "kind-of": { @@ -9592,7 +9061,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -9605,8 +9074,8 @@ "bundled": true, "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -9614,7 +9083,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -9637,18 +9106,18 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "kind-of": { @@ -9663,10 +9132,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "npm-run-path": { @@ -9674,7 +9143,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -9692,9 +9161,9 @@ "bundled": true, "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { "define-property": { @@ -9702,7 +9171,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -9712,7 +9181,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "^3.0.0" + "isobject": "3.0.1" } }, "object.pick": { @@ -9720,7 +9189,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "once": { @@ -9728,7 +9197,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "optimist": { @@ -9736,8 +9205,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.8", + "wordwrap": "0.0.3" } }, "os-homedir": { @@ -9750,9 +9219,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "p-finally": { @@ -9765,7 +9234,7 @@ "bundled": true, "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "1.0.0" } }, "p-locate": { @@ -9773,7 +9242,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.2.0" } }, "p-try": { @@ -9786,7 +9255,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.1" } }, "pascalcase": { @@ -9799,7 +9268,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } }, "path-is-absolute": { @@ -9822,9 +9291,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -9842,7 +9311,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-dir": { @@ -9850,7 +9319,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0" + "find-up": "1.1.2" }, "dependencies": { "find-up": { @@ -9858,8 +9327,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } } } @@ -9879,9 +9348,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -9889,8 +9358,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" }, "dependencies": { "find-up": { @@ -9898,8 +9367,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } } } @@ -9909,8 +9378,8 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "repeat-element": { @@ -9954,7 +9423,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "rimraf": { @@ -9962,7 +9431,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "safe-regex": { @@ -9970,7 +9439,7 @@ "bundled": true, "dev": true, "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "semver": { @@ -9988,10 +9457,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { "extend-shallow": { @@ -9999,7 +9468,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -10009,7 +9478,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -10032,14 +9501,14 @@ "bundled": true, "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" }, "dependencies": { "debug": { @@ -10055,7 +9524,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -10063,7 +9532,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -10073,9 +9542,9 @@ "bundled": true, "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { "define-property": { @@ -10083,7 +9552,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -10091,7 +9560,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -10099,7 +9568,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -10107,9 +9576,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "kind-of": { @@ -10124,7 +9593,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.2.0" + "kind-of": "3.2.2" } }, "source-map": { @@ -10137,11 +9606,11 @@ "bundled": true, "dev": true, "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, "source-map-url": { @@ -10154,12 +9623,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.1" } }, "spdx-correct": { @@ -10167,8 +9636,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, "spdx-exceptions": { @@ -10181,8 +9650,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, "spdx-license-ids": { @@ -10195,7 +9664,7 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^3.0.0" + "extend-shallow": "3.0.2" } }, "static-extend": { @@ -10203,8 +9672,8 @@ "bundled": true, "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -10212,7 +9681,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -10222,8 +9691,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -10231,7 +9700,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "strip-bom": { @@ -10239,7 +9708,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, "strip-eof": { @@ -10252,11 +9721,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" + "arrify": "1.0.1", + "micromatch": "3.1.10", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" } }, "to-object-path": { @@ -10264,7 +9733,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "to-regex": { @@ -10272,10 +9741,10 @@ "bundled": true, "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -10283,8 +9752,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "3.0.0", + "repeat-string": "1.6.1" } }, "uglify-js": { @@ -10293,9 +9762,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" }, "dependencies": { "yargs": { @@ -10304,9 +9773,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } } @@ -10323,10 +9792,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { "extend-shallow": { @@ -10334,7 +9803,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "set-value": { @@ -10342,10 +9811,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } @@ -10355,8 +9824,8 @@ "bundled": true, "dev": true, "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { "has-value": { @@ -10364,9 +9833,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { "isobject": { @@ -10396,7 +9865,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" }, "dependencies": { "kind-of": { @@ -10411,8 +9880,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "which": { @@ -10420,7 +9889,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -10444,8 +9913,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "ansi-regex": { @@ -10458,7 +9927,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "string-width": { @@ -10466,9 +9935,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "strip-ansi": { @@ -10476,7 +9945,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } } } @@ -10491,9 +9960,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } }, "y18n": { @@ -10511,18 +9980,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" }, "dependencies": { "camelcase": { @@ -10535,9 +10004,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" } }, "yargs-parser": { @@ -10545,7 +10014,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" } } } @@ -10555,7 +10024,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { @@ -10583,9 +10052,9 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { "define-property": { @@ -10593,7 +10062,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "kind-of": { @@ -10601,7 +10070,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -10616,7 +10085,7 @@ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "isobject": "^3.0.0" + "isobject": "3.0.1" } }, "object.omit": { @@ -10625,8 +10094,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, "object.pick": { @@ -10634,7 +10103,7 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "observable-to-promise": { @@ -10643,8 +10112,8 @@ "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", "dev": true, "requires": { - "is-observable": "^0.2.0", - "symbol-observable": "^1.0.4" + "is-observable": "0.2.0", + "symbol-observable": "1.2.0" }, "dependencies": { "is-observable": { @@ -10653,7 +10122,7 @@ "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", "dev": true, "requires": { - "symbol-observable": "^0.2.2" + "symbol-observable": "0.2.4" }, "dependencies": { "symbol-observable": { @@ -10671,7 +10140,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "onetime": { @@ -10680,7 +10149,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "optimist": { @@ -10689,8 +10158,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.8", + "wordwrap": "0.0.3" } }, "option-chain": { @@ -10705,12 +10174,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" }, "dependencies": { "wordwrap": { @@ -10737,7 +10206,7 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "^1.0.0" + "lcid": "1.0.0" } }, "os-tmpdir": { @@ -10776,7 +10245,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "1.0.0" } }, "p-locate": { @@ -10785,7 +10254,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.3.0" } }, "p-timeout": { @@ -10794,7 +10263,7 @@ "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { - "p-finally": "^1.0.0" + "p-finally": "1.0.0" } }, "p-try": { @@ -10809,10 +10278,10 @@ "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "lodash.flattendeep": "^4.4.0", - "md5-hex": "^2.0.0", - "release-zalgo": "^1.0.0" + "graceful-fs": "4.1.11", + "lodash.flattendeep": "4.4.0", + "md5-hex": "2.0.0", + "release-zalgo": "1.0.0" } }, "package-json": { @@ -10821,10 +10290,10 @@ "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" + "got": "6.7.1", + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0", + "semver": "5.5.0" }, "dependencies": { "got": { @@ -10833,17 +10302,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.1", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" } } } @@ -10854,10 +10323,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" }, "dependencies": { "is-extglob": { @@ -10872,7 +10341,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -10883,7 +10352,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.2" } }, "parse-ms": { @@ -10953,7 +10422,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "performance-now": { @@ -10978,7 +10447,7 @@ "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", "dev": true, "requires": { - "pinkie": "^1.0.0" + "pinkie": "1.0.0" } }, "pkg-conf": { @@ -10987,8 +10456,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" + "find-up": "2.1.0", + "load-json-file": "4.0.0" }, "dependencies": { "load-json-file": { @@ -10997,10 +10466,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" } }, "parse-json": { @@ -11009,8 +10478,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "1.3.2", + "json-parse-better-errors": "1.0.2" } } } @@ -11021,7 +10490,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "^2.1.0" + "find-up": "2.1.0" } }, "plur": { @@ -11030,7 +10499,7 @@ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "dev": true, "requires": { - "irregular-plurals": "^1.0.0" + "irregular-plurals": "1.4.0" } }, "pluralize": { @@ -11050,9 +10519,9 @@ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "chalk": "2.4.1", + "source-map": "0.6.1", + "supports-color": "5.4.0" }, "dependencies": { "source-map": { @@ -11068,11 +10537,11 @@ "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.0.tgz", "integrity": "sha512-nDb6a+p2C7Wj8Y2zmFtLpuv+xobXz4+bzT5s7dr0nn71tLozn7nRMQqzwbefzwZN5qOm0N7Cxhw4kXP75xboKA==", "requires": { - "define-properties": "^1.1.2", - "empower": "^1.3.0", - "power-assert-formatter": "^1.4.1", - "universal-deep-strict-equal": "^1.2.1", - "xtend": "^4.0.0" + "define-properties": "1.1.2", + "empower": "1.3.0", + "power-assert-formatter": "1.4.1", + "universal-deep-strict-equal": "1.2.2", + "xtend": "4.0.1" } }, "power-assert-context-formatter": { @@ -11080,8 +10549,8 @@ "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", "requires": { - "core-js": "^2.0.0", - "power-assert-context-traversal": "^1.2.0" + "core-js": "2.5.7", + "power-assert-context-traversal": "1.2.0" } }, "power-assert-context-reducer-ast": { @@ -11089,11 +10558,11 @@ "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", "requires": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.12", - "core-js": "^2.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.2.0" + "acorn": "5.7.1", + "acorn-es7-plugin": "1.1.7", + "core-js": "2.5.7", + "espurify": "1.8.0", + "estraverse": "4.2.0" } }, "power-assert-context-traversal": { @@ -11101,8 +10570,8 @@ "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", "requires": { - "core-js": "^2.0.0", - "estraverse": "^4.1.0" + "core-js": "2.5.7", + "estraverse": "4.2.0" } }, "power-assert-formatter": { @@ -11110,13 +10579,13 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "^2.0.0", - "power-assert-context-formatter": "^1.0.7", - "power-assert-context-reducer-ast": "^1.0.7", - "power-assert-renderer-assertion": "^1.0.7", - "power-assert-renderer-comparison": "^1.0.7", - "power-assert-renderer-diagram": "^1.0.7", - "power-assert-renderer-file": "^1.0.7" + "core-js": "2.5.7", + "power-assert-context-formatter": "1.2.0", + "power-assert-context-reducer-ast": "1.2.0", + "power-assert-renderer-assertion": "1.2.0", + "power-assert-renderer-comparison": "1.2.0", + "power-assert-renderer-diagram": "1.2.0", + "power-assert-renderer-file": "1.2.0" } }, "power-assert-renderer-assertion": { @@ -11124,8 +10593,8 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", "requires": { - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0" + "power-assert-renderer-base": "1.1.1", + "power-assert-util-string-width": "1.2.0" } }, "power-assert-renderer-base": { @@ -11138,11 +10607,11 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", "requires": { - "core-js": "^2.0.0", - "diff-match-patch": "^1.0.0", - "power-assert-renderer-base": "^1.1.1", - "stringifier": "^1.3.0", - "type-name": "^2.0.1" + "core-js": "2.5.7", + "diff-match-patch": "1.0.1", + "power-assert-renderer-base": "1.1.1", + "stringifier": "1.3.0", + "type-name": "2.0.2" } }, "power-assert-renderer-diagram": { @@ -11150,10 +10619,10 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", "requires": { - "core-js": "^2.0.0", - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0", - "stringifier": "^1.3.0" + "core-js": "2.5.7", + "power-assert-renderer-base": "1.1.1", + "power-assert-util-string-width": "1.2.0", + "stringifier": "1.3.0" } }, "power-assert-renderer-file": { @@ -11161,7 +10630,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", "requires": { - "power-assert-renderer-base": "^1.1.1" + "power-assert-renderer-base": "1.1.1" } }, "power-assert-util-string-width": { @@ -11169,7 +10638,7 @@ "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", "requires": { - "eastasianwidth": "^0.2.0" + "eastasianwidth": "0.2.0" } }, "prelude-ls": { @@ -11202,7 +10671,7 @@ "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", "dev": true, "requires": { - "parse-ms": "^1.0.0" + "parse-ms": "1.0.1" }, "dependencies": { "parse-ms": { @@ -11241,19 +10710,19 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^3.0.32", - "@types/node": "^8.9.4", - "long": "^4.0.0" + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/base64": "1.1.2", + "@protobufjs/codegen": "2.0.4", + "@protobufjs/eventemitter": "1.1.0", + "@protobufjs/fetch": "1.1.0", + "@protobufjs/float": "1.0.2", + "@protobufjs/inquire": "1.1.0", + "@protobufjs/path": "1.1.2", + "@protobufjs/pool": "1.1.0", + "@protobufjs/utf8": "1.1.0", + "@types/long": "3.0.32", + "@types/node": "8.10.20", + "long": "4.0.0" }, "dependencies": { "@types/node": { @@ -11269,9 +10738,9 @@ "integrity": "sha512-fQr3VQrbdzHrdaDn3XuisVoJlJNDJizHAvUXw9IuXRR8BpV2x0N7LsCxrpJkeKfPbNjiNU/V5vc008cI0TmzzQ==", "dev": true, "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.0", - "resolve": "~1.5.0" + "fill-keys": "1.0.2", + "module-not-found-error": "1.0.1", + "resolve": "1.5.0" }, "dependencies": { "resolve": { @@ -11280,7 +10749,7 @@ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } } } @@ -11295,8 +10764,8 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "end-of-stream": "1.4.1", + "once": "1.4.0" } }, "pumpify": { @@ -11304,9 +10773,9 @@ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" + "duplexify": "3.6.0", + "inherits": "2.0.3", + "pump": "2.0.1" } }, "punycode": { @@ -11325,9 +10794,9 @@ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" + "decode-uri-component": "0.2.0", + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" } }, "randomatic": { @@ -11336,9 +10805,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" }, "dependencies": { "is-number": { @@ -11355,10 +10824,10 @@ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.6.0", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" }, "dependencies": { "minimist": { @@ -11375,9 +10844,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" }, "dependencies": { "path-type": { @@ -11386,7 +10855,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "^2.0.0" + "pify": "2.3.0" } }, "pify": { @@ -11403,8 +10872,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "find-up": "2.1.0", + "read-pkg": "2.0.0" } }, "readable-stream": { @@ -11412,13 +10881,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "readdirp": { @@ -11427,10 +10896,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" } }, "redent": { @@ -11439,8 +10908,8 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" }, "dependencies": { "indent-string": { @@ -11449,7 +10918,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } } } @@ -11472,7 +10941,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "is-equal-shallow": "0.1.3" } }, "regex-not": { @@ -11480,8 +10949,8 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "regexp.prototype.flags": { @@ -11490,7 +10959,7 @@ "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", "dev": true, "requires": { - "define-properties": "^1.1.2" + "define-properties": "1.1.2" } }, "regexpp": { @@ -11505,9 +10974,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" + "regenerate": "1.4.0", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, "registry-auth-token": { @@ -11516,8 +10985,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "rc": "1.2.8", + "safe-buffer": "5.1.2" } }, "registry-url": { @@ -11526,7 +10995,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "^1.0.1" + "rc": "1.2.8" } }, "regjsgen": { @@ -11541,7 +11010,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "~0.5.0" + "jsesc": "0.5.0" } }, "release-zalgo": { @@ -11550,7 +11019,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "^4.0.1" + "es6-error": "4.1.1" } }, "remove-trailing-separator": { @@ -11575,7 +11044,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "request": { @@ -11583,26 +11052,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" + "aws-sign2": "0.7.0", + "aws4": "1.7.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.2", + "safe-buffer": "5.1.2", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.3.2" } }, "require-directory": { @@ -11629,8 +11098,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" + "caller-path": "0.1.0", + "resolve-from": "1.0.1" }, "dependencies": { "resolve-from": { @@ -11647,7 +11116,7 @@ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", "dev": true, "requires": { - "underscore": "~1.6.0" + "underscore": "1.6.0" }, "dependencies": { "underscore": { @@ -11670,7 +11139,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "3.0.0" } }, "resolve-from": { @@ -11690,7 +11159,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "^1.0.0" + "lowercase-keys": "1.0.1" } }, "restore-cursor": { @@ -11699,8 +11168,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "onetime": "2.0.1", + "signal-exit": "3.0.2" } }, "ret": { @@ -11718,7 +11187,7 @@ "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", "requires": { - "through2": "^2.0.0" + "through2": "2.0.3" } }, "right-align": { @@ -11728,7 +11197,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "rimraf": { @@ -11737,7 +11206,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "run-async": { @@ -11746,7 +11215,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "^2.1.0" + "is-promise": "2.1.0" } }, "rxjs": { @@ -11776,7 +11245,7 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "safer-buffer": { @@ -11796,16 +11265,16 @@ "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", "dev": true, "requires": { - "chalk": "^2.3.0", - "htmlparser2": "^3.9.0", - "lodash.clonedeep": "^4.5.0", - "lodash.escaperegexp": "^4.1.2", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.mergewith": "^4.6.0", - "postcss": "^6.0.14", - "srcset": "^1.0.0", - "xtend": "^4.0.0" + "chalk": "2.4.1", + "htmlparser2": "3.9.2", + "lodash.clonedeep": "4.5.0", + "lodash.escaperegexp": "4.1.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mergewith": "4.6.1", + "postcss": "6.0.23", + "srcset": "1.0.0", + "xtend": "4.0.1" } }, "semver": { @@ -11820,7 +11289,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "^5.0.3" + "semver": "5.5.0" } }, "serialize-error": { @@ -11846,10 +11315,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { "extend-shallow": { @@ -11857,7 +11326,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -11868,7 +11337,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -11889,13 +11358,13 @@ "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", - "diff": "^3.1.0", - "lodash.get": "^4.4.2", - "lolex": "^2.2.0", - "nise": "^1.2.0", - "supports-color": "^5.1.0", - "type-detect": "^4.0.5" + "@sinonjs/formatio": "2.0.0", + "diff": "3.5.0", + "lodash.get": "4.4.2", + "lolex": "2.7.0", + "nise": "1.4.2", + "supports-color": "5.4.0", + "type-detect": "4.0.8" } }, "slash": { @@ -11909,7 +11378,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0" + "is-fullwidth-code-point": "2.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -11931,8 +11400,8 @@ "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.2.0.tgz", "integrity": "sha512-G5Faa3wQevGXcD5e4JKfmgofO+Fu4Jg4/nLyeZqWmBqVV0/3ORgervt3EjBi6PEFKhztPQWegZspteWnycx5dg==", "requires": { - "map-obj": "~2.0.0", - "to-snake-case": "~0.1.2" + "map-obj": "2.0.0", + "to-snake-case": "0.1.2" } }, "snakeize": { @@ -11946,14 +11415,14 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" }, "dependencies": { "debug": { @@ -11969,7 +11438,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -11977,7 +11446,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -11987,9 +11456,9 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { "define-property": { @@ -11997,7 +11466,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -12005,7 +11474,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -12013,7 +11482,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -12021,9 +11490,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -12033,7 +11502,7 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "kind-of": "^3.2.0" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -12041,7 +11510,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -12052,7 +11521,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "^1.0.0" + "is-plain-obj": "1.1.0" } }, "source-map": { @@ -12065,11 +11534,11 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, "source-map-support": { @@ -12078,8 +11547,8 @@ "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "buffer-from": "1.1.0", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -12101,8 +11570,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, "spdx-exceptions": { @@ -12117,8 +11586,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, "spdx-license-ids": { @@ -12132,7 +11601,7 @@ "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-2.0.0.tgz", "integrity": "sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg==", "requires": { - "is-stream-ended": "^0.1.4" + "is-stream-ended": "0.1.4" } }, "split-string": { @@ -12140,7 +11609,7 @@ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "extend-shallow": "^3.0.0" + "extend-shallow": "3.0.2" } }, "sprintf-js": { @@ -12155,8 +11624,8 @@ "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", "dev": true, "requires": { - "array-uniq": "^1.0.2", - "number-is-nan": "^1.0.0" + "array-uniq": "1.0.3", + "number-is-nan": "1.0.1" } }, "sshpk": { @@ -12164,15 +11633,15 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.2", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "safer-buffer": "2.1.2", + "tweetnacl": "0.14.5" } }, "stack-utils": { @@ -12186,8 +11655,8 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -12195,7 +11664,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -12205,7 +11674,7 @@ "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.4.tgz", "integrity": "sha512-D243NJaYs/xBN2QnoiMDY7IesJFIK7gEhnvAYqJa5JvDdnh2dC4qDBwlCf0ohPpX2QRlA/4gnbnPd3rs3KxVcA==", "requires": { - "stubs": "^3.0.0" + "stubs": "3.0.0" } }, "stream-shift": { @@ -12225,6 +11694,14 @@ "integrity": "sha1-XqIRzZLSKOGEKUmQpsyXs2anfLA=", "dev": true }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, "string-format-obj": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz", @@ -12236,9 +11713,9 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string.prototype.matchall": { @@ -12247,19 +11724,11 @@ "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.10.0", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "regexp.prototype.flags": "^1.2.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" + "define-properties": "1.1.2", + "es-abstract": "1.12.0", + "function-bind": "1.1.1", + "has-symbols": "1.0.0", + "regexp.prototype.flags": "1.2.0" } }, "stringifier": { @@ -12267,9 +11736,9 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "^2.0.0", - "traverse": "^0.6.6", - "type-name": "^2.0.1" + "core-js": "2.5.7", + "traverse": "0.6.6", + "type-name": "2.0.2" } }, "strip-ansi": { @@ -12277,7 +11746,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -12292,7 +11761,7 @@ "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", "dev": true, "requires": { - "is-utf8": "^0.2.1" + "is-utf8": "0.2.1" } }, "strip-eof": { @@ -12307,7 +11776,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "^4.0.1" + "get-stdin": "4.0.1" } }, "strip-json-comments": { @@ -12327,16 +11796,16 @@ "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { - "component-emitter": "^1.2.0", - "cookiejar": "^2.1.0", - "debug": "^3.1.0", - "extend": "^3.0.0", - "form-data": "^2.3.1", - "formidable": "^1.2.0", - "methods": "^1.1.1", - "mime": "^1.4.1", - "qs": "^6.5.1", - "readable-stream": "^2.3.5" + "component-emitter": "1.2.1", + "cookiejar": "2.1.2", + "debug": "3.1.0", + "extend": "3.0.1", + "form-data": "2.3.2", + "formidable": "1.2.1", + "methods": "1.1.2", + "mime": "1.6.0", + "qs": "6.5.2", + "readable-stream": "2.3.6" }, "dependencies": { "mime": { @@ -12353,11 +11822,11 @@ "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", "dev": true, "requires": { - "arrify": "^1.0.1", - "indent-string": "^3.2.0", - "js-yaml": "^3.10.0", - "serialize-error": "^2.1.0", - "strip-ansi": "^4.0.0" + "arrify": "1.0.1", + "indent-string": "3.2.0", + "js-yaml": "3.12.0", + "serialize-error": "2.1.0", + "strip-ansi": "4.0.0" }, "dependencies": { "ansi-regex": { @@ -12372,7 +11841,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -12383,8 +11852,8 @@ "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", "dev": true, "requires": { - "methods": "~1.1.2", - "superagent": "^3.0.0" + "methods": "1.1.2", + "superagent": "3.8.3" } }, "supports-color": { @@ -12393,7 +11862,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" }, "dependencies": { "has-flag": { @@ -12416,12 +11885,12 @@ "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "6.5.2", + "ajv-keywords": "3.2.0", + "chalk": "2.4.1", + "lodash": "4.17.10", "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "string-width": "2.1.1" }, "dependencies": { "ajv": { @@ -12430,10 +11899,10 @@ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" } }, "ansi-regex": { @@ -12466,8 +11935,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -12476,7 +11945,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -12493,7 +11962,7 @@ "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "execa": "^0.7.0" + "execa": "0.7.0" } }, "text-encoding": { @@ -12519,8 +11988,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" + "readable-stream": "2.3.6", + "xtend": "4.0.1" } }, "time-zone": { @@ -12541,7 +12010,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "os-tmpdir": "1.0.2" } }, "to-fast-properties": { @@ -12560,7 +12029,7 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -12568,7 +12037,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -12578,10 +12047,10 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -12589,8 +12058,8 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "3.0.0", + "repeat-string": "1.6.1" } }, "to-snake-case": { @@ -12614,7 +12083,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "^1.4.1" + "punycode": "1.4.1" } }, "traverse": { @@ -12645,7 +12114,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "tweetnacl": { @@ -12660,7 +12129,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "1.1.2" } }, "type-detect": { @@ -12687,9 +12156,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" }, "dependencies": { "camelcase": { @@ -12706,8 +12175,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" } }, @@ -12732,9 +12201,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } } @@ -12781,10 +12250,10 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { "extend-shallow": { @@ -12792,7 +12261,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "set-value": { @@ -12800,10 +12269,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } @@ -12814,7 +12283,7 @@ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "crypto-random-string": "1.0.0" } }, "unique-temp-dir": { @@ -12823,8 +12292,8 @@ "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", "dev": true, "requires": { - "mkdirp": "^0.5.1", - "os-tmpdir": "^1.0.1", + "mkdirp": "0.5.1", + "os-tmpdir": "1.0.2", "uid2": "0.0.3" } }, @@ -12833,9 +12302,9 @@ "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", "requires": { - "array-filter": "^1.0.0", + "array-filter": "1.0.0", "indexof": "0.0.1", - "object-keys": "^1.0.0" + "object-keys": "1.0.12" } }, "universalify": { @@ -12849,8 +12318,8 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { "has-value": { @@ -12858,9 +12327,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { "isobject": { @@ -12892,16 +12361,16 @@ "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" + "boxen": "1.3.0", + "chalk": "2.4.1", + "configstore": "3.1.2", + "import-lazy": "2.1.0", + "is-ci": "1.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" } }, "uri-js": { @@ -12910,7 +12379,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "^2.1.0" + "punycode": "2.1.1" }, "dependencies": { "punycode": { @@ -12932,7 +12401,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "^1.0.1" + "prepend-http": "1.0.4" } }, "url-to-options": { @@ -12952,7 +12421,7 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" } }, "util-deprecate": { @@ -12971,8 +12440,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "verror": { @@ -12980,9 +12449,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "^1.0.0", + "assert-plus": "1.0.0", "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "extsprintf": "1.3.0" } }, "well-known-symbols": { @@ -12997,7 +12466,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -13012,7 +12481,7 @@ "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "^2.1.1" + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -13033,8 +12502,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -13043,7 +12512,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -13064,8 +12533,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" } }, "wrappy": { @@ -13079,7 +12548,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "^0.5.1" + "mkdirp": "0.5.1" } }, "write-file-atomic": { @@ -13088,9 +12557,9 @@ "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" } }, "write-json-file": { @@ -13099,12 +12568,12 @@ "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", "dev": true, "requires": { - "detect-indent": "^5.0.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "pify": "^3.0.0", - "sort-keys": "^2.0.0", - "write-file-atomic": "^2.0.0" + "detect-indent": "5.0.0", + "graceful-fs": "4.1.11", + "make-dir": "1.3.0", + "pify": "3.0.0", + "sort-keys": "2.0.0", + "write-file-atomic": "2.3.0" }, "dependencies": { "detect-indent": { @@ -13121,8 +12590,8 @@ "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", "dev": true, "requires": { - "sort-keys": "^2.0.0", - "write-json-file": "^2.2.0" + "sort-keys": "2.0.0", + "write-json-file": "2.3.0" } }, "xdg-basedir": { @@ -13157,13 +12626,13 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" } }, "yargs-parser": { @@ -13172,7 +12641,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 9761b48d7d8..61028d29cad 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -523,7 +523,20 @@ class ConfigServiceV2Client { * as part of `sink_name`. * * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} - * @param {Object} request.updateMask + * @param {boolean} [request.uniqueWriterIdentity] + * Optional. See + * [sinks.create](https://cloud.google.com/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 is 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 is true and the new value is + * set to false or defaulted to false. + * @param {Object} [request.updateMask] * Optional. Field mask that specifies the fields in `sink` that need * an update. A sink field will be overwritten if, and only if, it is * in the update mask. `name` and output only fields cannot be updated. @@ -540,19 +553,6 @@ class ConfigServiceV2Client { * Example: `updateMask=filter`. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {boolean} [request.uniqueWriterIdentity] - * Optional. See - * [sinks.create](https://cloud.google.com/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 is 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 is true and the new value is - * set to false or defaulted to false. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. @@ -574,11 +574,9 @@ class ConfigServiceV2Client { * * var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); * var sink = {}; - * var updateMask = {}; * var request = { * sinkName: formattedSinkName, * sink: sink, - * updateMask: updateMask, * }; * client.updateSink(request) * .then(responses => { diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index c4f193a5f66..a66c127b02b 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -18,6 +18,15 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000 + }, + "write_sink": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 } }, "methods": { diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index 6359d487f2f..bda7e33bbbe 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -18,6 +18,15 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000 + }, + "list": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 } }, "methods": { diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 28ce603b176..674536c2c0a 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -534,11 +534,9 @@ describe('ConfigServiceV2Client', () => { // Mock request var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); var sink = {}; - var updateMask = {}; var request = { sinkName: formattedSinkName, sink: sink, - updateMask: updateMask, }; // Mock response @@ -577,11 +575,9 @@ describe('ConfigServiceV2Client', () => { // Mock request var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); var sink = {}; - var updateMask = {}; var request = { sinkName: formattedSinkName, sink: sink, - updateMask: updateMask, }; // Mock Grpc layer From a6bbd910b16354ec73694ab8b55f9af9b5ef5ca0 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Wed, 4 Jul 2018 10:52:57 -0700 Subject: [PATCH 0188/1029] Re-generate library using /synth.py (#155) --- handwritten/logging/package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 4d10a6d416f..792a34f3ea1 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -309,7 +309,7 @@ "dot-prop": "4.2.0", "duplexify": "3.6.0", "extend": "3.0.1", - "grpc": "1.12.4", + "grpc": "1.13.0", "is": "3.2.1", "retry-request": "4.0.0", "through2": "2.0.3" @@ -2098,7 +2098,7 @@ "globby": "8.0.1", "google-auto-auth": "0.10.1", "google-proto-files": "0.15.1", - "grpc": "1.12.4", + "grpc": "1.13.0", "is-stream-ended": "0.1.4", "lodash": "4.17.10", "protobufjs": "6.8.6", @@ -5757,7 +5757,7 @@ "globby": "8.0.1", "google-auth-library": "1.6.1", "google-proto-files": "0.16.1", - "grpc": "1.12.4", + "grpc": "1.13.0", "is-stream-ended": "0.1.4", "lodash": "4.17.10", "protobufjs": "6.8.6", @@ -5839,13 +5839,13 @@ "dev": true }, "grpc": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", - "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.0.tgz", + "integrity": "sha512-jGxWFYzttSz9pi8mu283jZvo2zIluWonQ918GMHKx8grT57GIVlvx7/82fo7AGS75lbkPoO1T6PZLvCRD9Pbtw==", "requires": { "lodash": "4.17.10", "nan": "2.10.0", - "node-pre-gyp": "0.10.0", + "node-pre-gyp": "0.10.2", "protobufjs": "5.0.3" }, "dependencies": { @@ -6055,7 +6055,7 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.2", "bundled": true, "requires": { "detect-libc": "1.0.3", From 046685a7a4971091846e0306ab89b72ef691f73f Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 6 Jul 2018 11:32:52 -0700 Subject: [PATCH 0189/1029] Re-generate library using /synth.py (#156) --- handwritten/logging/package-lock.json | 240 ++++++++++++++++++++++---- 1 file changed, 210 insertions(+), 30 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 792a34f3ea1..6dcf6c346c0 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -2239,15 +2239,15 @@ "integrity": "sha512-GHoZBR5N+65AWazsCiJDxeMSbUpp2qNYbjeD3mP27L2PT25+GvIupIIJiCgULH87NAiAd9SmWMRBVz+uSiHpgA==", "requires": { "@types/lodash": "4.14.110", - "@types/node": "9.6.22", + "@types/node": "9.6.23", "lodash": "4.17.10", "protobufjs": "6.8.6" }, "dependencies": { "@types/node": { - "version": "9.6.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.22.tgz", - "integrity": "sha512-RIg9EkxzVMkNH0M4sLRngK23f5QiigJC0iODQmu4nopzstt8AjegYund3r82iMrd2BNCjcZVnklaItvKHaGfBA==" + "version": "9.6.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.23.tgz", + "integrity": "sha512-d2SJJpwkiPudEQ3+9ysANN2Nvz4QJKUPoe/WL5zyQzI0RaEeZWH5K5xjvUIGszTItHQpFPdH+u51f6G/LkS8Cg==" } } }, @@ -2390,7 +2390,7 @@ "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", "requires": { - "@types/node": "10.5.1" + "@types/node": "10.5.2" } }, "@types/form-data": { @@ -2398,7 +2398,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "10.5.1" + "@types/node": "10.5.2" } }, "@types/lodash": { @@ -2412,9 +2412,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.1.tgz", - "integrity": "sha512-AFLl1IALIuyt6oK4AYZsgWVJ/5rnyzQWud7IebaZWWV3YmgtPZkQmYio9R5Ze/2pdd7XfqF5bP+hWS11mAKoOQ==" + "version": "10.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", + "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==" }, "@types/request": { "version": "2.47.1", @@ -2423,7 +2423,7 @@ "requires": { "@types/caseless": "0.12.1", "@types/form-data": "2.2.1", - "@types/node": "10.5.1", + "@types/node": "10.5.2", "@types/tough-cookie": "2.3.3" } }, @@ -2976,7 +2976,7 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "1.5.0", + "follow-redirects": "1.5.1", "is-buffer": "1.1.6" } }, @@ -3518,6 +3518,15 @@ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "dev": true }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", @@ -4037,14 +4046,119 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.2.tgz", - "integrity": "sha512-9ljtIROIjPIUmMRqO+XuDITDoV8xRrZmA0jcEq6p2hg2+wY9wGmLfreAZGIL72IzUfdEDZaU8+Vjidg1fBQ8GQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.3.tgz", + "integrity": "sha512-0QhresfeDaSDaApsv8NnCl5EYP8nMCSvsFUTGtxDHF6zthYcUPIAteLnPSew+cN8H4/4caN5aJ7mm1ZdIeGetQ==", "dev": true, "requires": { "argv": "0.0.2", - "request": "2.87.0", + "ignore-walk": "3.0.0", + "request": "2.81.0", "urlgrey": "0.4.4" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.14.2" + } + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.7.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.2", + "stringstream": "0.0.6", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.3.2" + } + } } }, "collection-visit": { @@ -4254,6 +4368,15 @@ "which": "1.3.1" } }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, "crypto-random-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", @@ -4955,9 +5078,9 @@ } }, "eslint-plugin-prettier": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.1.tgz", - "integrity": "sha512-wNZ2z0oVCWnf+3BSI7roS+z4gGu2AwcPKUek+SlLZMZg+X0KbZLsB2knul7fd0K3iuIp402HIYzm4f2+OyfXxA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz", + "integrity": "sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og==", "dev": true, "requires": { "fast-diff": "1.1.2", @@ -5460,9 +5583,9 @@ "dev": true }, "follow-redirects": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", - "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.1.tgz", + "integrity": "sha512-v9GI1hpaqq1ZZR6pBD1+kI7O24PhDvNGNodjS3MdcEqyrahCp8zbtpv+2B/krUnSmUH80lbAS7MrdeK5IylgKg==", "requires": { "debug": "3.1.0" } @@ -6415,12 +6538,30 @@ "through2": "2.0.3" } }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -6509,6 +6650,15 @@ "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", "dev": true }, + "ignore-walk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.0.tgz", + "integrity": "sha512-tKHrQ70YReq6IFyAs/XAQy91mgLVpLExNh3HrjExr6vqg8FLq/vd27D4eAN0K2PodhLjiQu5Xc2Q+AkW/T7hKQ==", + "dev": true, + "requires": { + "minimatch": "3.0.4" + } + }, "import-lazy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", @@ -7160,6 +7310,15 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -7186,6 +7345,12 @@ "graceful-fs": "4.1.11" } }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -7418,9 +7583,9 @@ "dev": true }, "lolex": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", - "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", + "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", "dev": true }, "long": { @@ -7919,7 +8084,7 @@ "requires": { "@sinonjs/formatio": "2.0.0", "just-extend": "1.1.27", - "lolex": "2.7.0", + "lolex": "2.7.1", "path-to-regexp": "1.7.0", "text-encoding": "0.6.4" } @@ -10721,14 +10886,14 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "8.10.20", + "@types/node": "8.10.21", "long": "4.0.0" }, "dependencies": { "@types/node": { - "version": "8.10.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", - "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==" + "version": "8.10.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz", + "integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w==" } } }, @@ -11361,7 +11526,7 @@ "@sinonjs/formatio": "2.0.0", "diff": "3.5.0", "lodash.get": "4.4.2", - "lolex": "2.7.0", + "lolex": "2.7.1", "nise": "1.4.2", "supports-color": "5.4.0", "type-detect": "4.0.8" @@ -11515,6 +11680,15 @@ } } }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, "sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", @@ -11741,6 +11915,12 @@ "type-name": "2.0.2" } }, + "stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", From d51296b832bb22a58810b98ea713104e4e37804c Mon Sep 17 00:00:00 2001 From: DPE bot Date: Sat, 7 Jul 2018 12:16:30 -0700 Subject: [PATCH 0190/1029] Re-generate library using /synth.py (#158) --- handwritten/logging/package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 6dcf6c346c0..a660622f319 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -6573,9 +6573,9 @@ } }, "hosted-git-info": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", - "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, "htmlparser2": { @@ -8100,7 +8100,7 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.6.1", + "hosted-git-info": "2.7.1", "is-builtin-module": "1.0.0", "semver": "5.5.0", "validate-npm-package-license": "3.0.3" From 54253b6b2227a0414e4b77a5ea3bf7643b483f50 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Mon, 9 Jul 2018 08:59:42 -0700 Subject: [PATCH 0191/1029] Re-generate library using /synth.py (#159) This PR was created by autosynth. --- handwritten/logging/package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index a660622f319..01433d543cd 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -7181,15 +7181,15 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "istanbul-lib-coverage": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.0.tgz", - "integrity": "sha512-yMSw5xLIbdaxiVXHk3amfNM2WeBxLrwH/BCyZ9HvA/fylwziAIJOG2rKqWyLqEJqwKT725vxxqidv+SyynnGAA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", "dev": true }, "istanbul-lib-instrument": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.0.tgz", - "integrity": "sha512-Ie1LGWJVCFDDJKKH4g1ffpFcZTEXEd6ay5l9fE8539y4qPErJnzo4psnGzDH92tcKvdUDdbxrKySYIbt6zB9hw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.1.tgz", + "integrity": "sha512-h9Vg3nfbxrF0PK0kZiNiMAyL8zXaLiBP/BXniaKSwVvAi1TaumYV2b0wPdmy1CRX3irYbYD1p4Wjbv4uyECiiQ==", "dev": true, "requires": { "@babel/generator": "7.0.0-beta.51", @@ -7197,7 +7197,7 @@ "@babel/template": "7.0.0-beta.51", "@babel/traverse": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "istanbul-lib-coverage": "2.0.0", + "istanbul-lib-coverage": "2.0.1", "semver": "5.5.0" } }, @@ -8166,7 +8166,7 @@ "glob": "7.1.2", "istanbul-lib-coverage": "1.2.0", "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "2.3.0", + "istanbul-lib-instrument": "2.3.1", "istanbul-lib-report": "1.1.3", "istanbul-lib-source-maps": "1.2.5", "istanbul-reports": "1.4.1", From fbc0a9c058345a3e84b14a8badd4eecdc20af7f8 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Mon, 9 Jul 2018 10:15:05 -0700 Subject: [PATCH 0192/1029] Re-generate library using /synth.py (#160) --- handwritten/logging/package-lock.json | 199 +++----------------------- 1 file changed, 18 insertions(+), 181 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 01433d543cd..82cee255805 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -3518,15 +3518,6 @@ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "dev": true }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", @@ -4046,119 +4037,15 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.3.tgz", - "integrity": "sha512-0QhresfeDaSDaApsv8NnCl5EYP8nMCSvsFUTGtxDHF6zthYcUPIAteLnPSew+cN8H4/4caN5aJ7mm1ZdIeGetQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.4.tgz", + "integrity": "sha512-KJyzHdg9B8U9LxXa7hS6jnEW5b1cNckLYc2YpnJ1nEFiOW+/iSzDHp+5MYEIQd9fN3/tC6WmGZmYiwxzkuGp/A==", "dev": true, "requires": { "argv": "0.0.2", - "ignore-walk": "3.0.0", - "request": "2.81.0", + "ignore-walk": "3.0.1", + "request": "2.87.0", "urlgrey": "0.4.4" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.14.2" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.7.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.2", - "stringstream": "0.0.6", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.3.2" - } - } } }, "collection-visit": { @@ -4368,15 +4255,6 @@ "which": "1.3.1" } }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, "crypto-random-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", @@ -4932,9 +4810,9 @@ } }, "eslint": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.0.1.tgz", - "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.1.0.tgz", + "integrity": "sha512-DyH6JsoA1KzA5+OSWFjg56DFJT+sDLO0yokaPZ9qY0UEmYrPA1gEX/G1MnVkmRDsksG4H1foIVz2ZXXM3hHYvw==", "dev": true, "requires": { "ajv": "6.5.2", @@ -4944,6 +4822,7 @@ "debug": "3.1.0", "doctrine": "2.1.0", "eslint-scope": "4.0.0", + "eslint-utils": "1.3.1", "eslint-visitor-keys": "1.0.0", "espree": "4.0.0", "esquery": "1.0.1", @@ -5097,6 +4976,12 @@ "estraverse": "4.2.0" } }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -6538,30 +6423,12 @@ "through2": "2.0.3" } }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -6651,9 +6518,9 @@ "dev": true }, "ignore-walk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.0.tgz", - "integrity": "sha512-tKHrQ70YReq6IFyAs/XAQy91mgLVpLExNh3HrjExr6vqg8FLq/vd27D4eAN0K2PodhLjiQu5Xc2Q+AkW/T7hKQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "requires": { "minimatch": "3.0.4" @@ -7310,15 +7177,6 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "0.0.0" - } - }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -7345,12 +7203,6 @@ "graceful-fs": "4.1.11" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -11680,15 +11532,6 @@ } } }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, "sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", @@ -11915,12 +11758,6 @@ "type-name": "2.0.2" } }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", - "dev": true - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", From 1bda648f8cddcc8548c69fb2476d5c4d79ff32d8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 9 Jul 2018 19:40:44 -0700 Subject: [PATCH 0193/1029] chore(deps): lock file maintenance (#162) --- handwritten/logging/package-lock.json | 5243 ++++++++++++++----------- 1 file changed, 2887 insertions(+), 2356 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 82cee255805..2bc8bfc2e1c 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -16,18 +16,18 @@ "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "6.22.0", - "babel-plugin-syntax-trailing-function-commas": "6.22.0", - "babel-plugin-transform-async-to-generator": "6.24.1", - "babel-plugin-transform-es2015-destructuring": "6.23.0", - "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", - "babel-plugin-transform-es2015-parameters": "6.24.1", - "babel-plugin-transform-es2015-spread": "6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "6.24.1", - "babel-plugin-transform-es2015-unicode-regex": "6.24.1", - "babel-plugin-transform-exponentiation-operator": "6.24.1", - "package-hash": "1.2.0" + "babel-plugin-check-es2015-constants": "^6.8.0", + "babel-plugin-syntax-trailing-function-commas": "^6.20.0", + "babel-plugin-transform-async-to-generator": "^6.16.0", + "babel-plugin-transform-es2015-destructuring": "^6.19.0", + "babel-plugin-transform-es2015-function-name": "^6.9.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", + "babel-plugin-transform-es2015-parameters": "^6.21.0", + "babel-plugin-transform-es2015-spread": "^6.8.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", + "babel-plugin-transform-exponentiation-operator": "^6.8.0", + "package-hash": "^1.2.0" }, "dependencies": { "md5-hex": { @@ -36,7 +36,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "package-hash": { @@ -45,7 +45,7 @@ "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", "dev": true, "requires": { - "md5-hex": "1.3.0" + "md5-hex": "^1.3.0" } } } @@ -56,8 +56,8 @@ "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", "dev": true, "requires": { - "@ava/babel-plugin-throws-helper": "2.0.0", - "babel-plugin-espower": "2.4.0" + "@ava/babel-plugin-throws-helper": "^2.0.0", + "babel-plugin-espower": "^2.3.2" } }, "@ava/write-file-atomic": { @@ -66,9 +66,9 @@ "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "@babel/code-frame": { @@ -87,10 +87,10 @@ "dev": true, "requires": { "@babel/types": "7.0.0-beta.51", - "jsesc": "2.5.1", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" }, "dependencies": { "jsesc": { @@ -136,9 +136,9 @@ "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", "dev": true, "requires": { - "chalk": "2.4.1", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" } }, "@babel/parser": { @@ -156,7 +156,7 @@ "@babel/code-frame": "7.0.0-beta.51", "@babel/parser": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "lodash": "4.17.10" + "lodash": "^4.17.5" } }, "@babel/traverse": { @@ -171,10 +171,10 @@ "@babel/helper-split-export-declaration": "7.0.0-beta.51", "@babel/parser": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "debug": "3.1.0", - "globals": "11.7.0", - "invariant": "2.2.4", - "lodash": "4.17.10" + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" }, "dependencies": { "globals": { @@ -191,9 +191,9 @@ "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", "dev": true, "requires": { - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "2.0.0" + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" }, "dependencies": { "to-fast-properties": { @@ -210,7 +210,7 @@ "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", "dev": true, "requires": { - "arrify": "1.0.1" + "arrify": "^1.0.1" } }, "@google-cloud/bigquery": { @@ -219,14 +219,14 @@ "integrity": "sha512-r4k4PvsoPB7DBBCsm4hz8WZj3KvZXikTcwSjAg+cn0JndAPIEad4XCd39RpniyPDSmp+n+d+kOAgebwMWj8q+w==", "dev": true, "requires": { - "@google-cloud/common": "0.17.0", - "arrify": "1.0.1", - "duplexify": "3.6.0", - "extend": "3.0.1", - "is": "3.2.1", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "uuid": "3.3.2" + "@google-cloud/common": "^0.17.0", + "arrify": "^1.0.0", + "duplexify": "^3.5.0", + "extend": "^3.0.1", + "is": "^3.0.1", + "stream-events": "^1.0.1", + "string-format-obj": "^1.0.0", + "uuid": "^3.1.0" }, "dependencies": { "@google-cloud/common": { @@ -235,24 +235,24 @@ "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "dev": true, "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.10.1", - "is": "3.2.1", + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.0", + "is": "^3.2.0", "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.87.0", - "retry-request": "3.3.2", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" } }, "retry-request": { @@ -261,8 +261,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "2.87.0", - "through2": "2.0.3" + "request": "^2.81.0", + "through2": "^2.0.0" } }, "split-array-stream": { @@ -271,8 +271,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "2.6.1", - "is-stream-ended": "0.1.4" + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" } } } @@ -282,21 +282,21 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.3.tgz", "integrity": "sha512-jt8/R4EqDTQccv5WA9AEaS65llM5+mlxsuWu57G5Os8HTIpgPbcsOVMUeIvmTrBuPUYSoRIMW8d/pvv/95n0+g==", "requires": { - "@types/duplexify": "3.5.0", - "@types/request": "2.47.1", - "arrify": "1.0.1", - "axios": "0.18.0", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auth-library": "1.6.1", - "is": "3.2.1", - "pify": "3.0.0", - "request": "2.87.0", - "retry-request": "4.0.0", - "split-array-stream": "2.0.0", - "stream-events": "1.0.4", - "through2": "2.0.3" + "@types/duplexify": "^3.5.0", + "@types/request": "^2.47.0", + "arrify": "^1.0.1", + "axios": "^0.18.0", + "duplexify": "^3.6.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auth-library": "^1.6.0", + "is": "^3.2.1", + "pify": "^3.0.0", + "request": "^2.87.0", + "retry-request": "^4.0.0", + "split-array-stream": "^2.0.0", + "stream-events": "^1.0.4", + "through2": "^2.0.3" } }, "@google-cloud/common-grpc": { @@ -304,15 +304,15 @@ "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.7.1.tgz", "integrity": "sha512-VK2X6rLRJIQMmkTS3p483up/Vb8zZHLoMFSmo17iiqebgaAoDpOhBiXXy4thtfabk02Nu5QtYT0QwM49OeU/ew==", "requires": { - "@google-cloud/common": "0.20.3", - "@grpc/proto-loader": "0.1.0", - "dot-prop": "4.2.0", - "duplexify": "3.6.0", - "extend": "3.0.1", - "grpc": "1.13.0", - "is": "3.2.1", - "retry-request": "4.0.0", - "through2": "2.0.3" + "@google-cloud/common": "^0.20.0", + "@grpc/proto-loader": "^0.1.0", + "dot-prop": "^4.2.0", + "duplexify": "^3.6.0", + "extend": "^3.0.1", + "grpc": "^1.12.3", + "is": "^3.2.1", + "retry-request": "^4.0.0", + "through2": "^2.0.3" } }, "@google-cloud/nodejs-repo-tools": { @@ -329,7 +329,7 @@ "lodash": "4.17.5", "nyc": "11.4.1", "proxyquire": "1.8.0", - "semver": "5.5.0", + "semver": "^5.5.0", "sinon": "4.3.0", "string": "3.3.3", "supertest": "3.0.0", @@ -349,9 +349,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "is-fullwidth-code-point": { @@ -372,33 +372,33 @@ "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", "dev": true, "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "md5-hex": "1.3.0", - "merge-source-map": "1.0.4", - "micromatch": "2.3.11", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.1.1", - "yargs": "10.0.3", - "yargs-parser": "8.0.0" + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.3.0", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^1.9.1", + "istanbul-lib-report": "^1.1.2", + "istanbul-lib-source-maps": "^1.2.2", + "istanbul-reports": "^1.1.3", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.0.2", + "micromatch": "^2.3.11", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.5.4", + "signal-exit": "^3.0.1", + "spawn-wrap": "^1.4.2", + "test-exclude": "^4.1.1", + "yargs": "^10.0.3", + "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { @@ -406,9 +406,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -431,7 +431,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -444,7 +444,7 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -472,9 +472,9 @@ "bundled": true, "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" } }, "babel-generator": { @@ -482,14 +482,14 @@ "bundled": true, "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.6", + "trim-right": "^1.0.1" } }, "babel-messages": { @@ -497,7 +497,7 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -505,8 +505,8 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -514,11 +514,11 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -526,15 +526,15 @@ "bundled": true, "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, "babel-types": { @@ -542,10 +542,10 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -563,7 +563,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -572,9 +572,9 @@ "bundled": true, "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "builtin-modules": { @@ -587,9 +587,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, "camelcase": { @@ -604,8 +604,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -613,11 +613,11 @@ "bundled": true, "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "cliui": { @@ -626,8 +626,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -669,8 +669,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "debug": { @@ -696,7 +696,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "detect-indent": { @@ -704,7 +704,7 @@ "bundled": true, "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "error-ex": { @@ -712,7 +712,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "escape-string-regexp": { @@ -730,13 +730,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -744,9 +744,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -756,7 +756,7 @@ "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -764,7 +764,7 @@ "bundled": true, "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "^2.1.0" } }, "extglob": { @@ -772,7 +772,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "filename-regex": { @@ -785,11 +785,11 @@ "bundled": true, "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "find-cache-dir": { @@ -797,9 +797,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" } }, "find-up": { @@ -807,7 +807,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -820,7 +820,7 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreground-child": { @@ -828,8 +828,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, "fs.realpath": { @@ -852,12 +852,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -865,8 +865,8 @@ "bundled": true, "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -874,7 +874,7 @@ "bundled": true, "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "globals": { @@ -892,10 +892,10 @@ "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -903,7 +903,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -913,7 +913,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { @@ -936,8 +936,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -950,7 +950,7 @@ "bundled": true, "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -973,7 +973,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-dotfile": { @@ -986,7 +986,7 @@ "bundled": true, "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -1004,7 +1004,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -1012,7 +1012,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-glob": { @@ -1020,7 +1020,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-number": { @@ -1028,7 +1028,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-posix-bracket": { @@ -1079,7 +1079,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -1087,13 +1087,13 @@ "bundled": true, "dev": true, "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.1.1", + "semver": "^5.3.0" } }, "istanbul-lib-report": { @@ -1101,10 +1101,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "supports-color": { @@ -1112,7 +1112,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -1122,11 +1122,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" }, "dependencies": { "debug": { @@ -1144,7 +1144,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "js-tokens": { @@ -1162,7 +1162,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -1176,7 +1176,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -1184,11 +1184,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -1196,8 +1196,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -1222,7 +1222,7 @@ "bundled": true, "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "lru-cache": { @@ -1230,8 +1230,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "md5-hex": { @@ -1239,7 +1239,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -1252,7 +1252,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -1260,7 +1260,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } }, "micromatch": { @@ -1268,19 +1268,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "mimic-fn": { @@ -1293,7 +1293,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1319,10 +1319,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -1330,7 +1330,7 @@ "bundled": true, "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "npm-run-path": { @@ -1338,7 +1338,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -1356,8 +1356,8 @@ "bundled": true, "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "once": { @@ -1365,7 +1365,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -1373,8 +1373,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -1387,9 +1387,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "p-finally": { @@ -1407,7 +1407,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "^1.1.0" } }, "parse-glob": { @@ -1415,10 +1415,10 @@ "bundled": true, "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "parse-json": { @@ -1426,7 +1426,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -1434,7 +1434,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -1457,9 +1457,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -1477,7 +1477,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -1485,7 +1485,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -1493,8 +1493,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -1514,8 +1514,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -1523,7 +1523,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -1531,7 +1531,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1541,7 +1541,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1551,9 +1551,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -1561,8 +1561,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -1570,8 +1570,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -1586,7 +1586,7 @@ "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "remove-trailing-separator": { @@ -1609,7 +1609,7 @@ "bundled": true, "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "require-directory": { @@ -1633,7 +1633,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -1641,7 +1641,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "semver": { @@ -1659,7 +1659,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -1687,12 +1687,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.0" + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" } }, "spdx-correct": { @@ -1700,7 +1700,7 @@ "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-license-ids": "^1.0.2" } }, "spdx-expression-parse": { @@ -1718,8 +1718,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -1737,7 +1737,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -1747,7 +1747,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -1755,7 +1755,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -1773,11 +1773,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" + "arrify": "^1.0.1", + "micromatch": "^2.3.11", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, "to-fast-properties": { @@ -1796,9 +1796,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -1807,9 +1807,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -1826,8 +1826,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" } }, "which": { @@ -1835,7 +1835,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -1859,8 +1859,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { "string-width": { @@ -1868,9 +1868,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1885,9 +1885,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "y18n": { @@ -1905,18 +1905,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "8.0.0" + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.0.0" }, "dependencies": { "cliui": { @@ -1924,9 +1924,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" }, "dependencies": { "string-width": { @@ -1934,9 +1934,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1948,7 +1948,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -1966,9 +1966,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "proxyquire": { @@ -1977,9 +1977,9 @@ "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", "dev": true, "requires": { - "fill-keys": "1.0.2", - "module-not-found-error": "1.0.1", - "resolve": "1.1.7" + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.0", + "resolve": "~1.1.7" } }, "string-width": { @@ -1988,8 +1988,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -1998,7 +1998,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "yargs": { @@ -2007,18 +2007,18 @@ "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" } } } @@ -2029,22 +2029,22 @@ "integrity": "sha512-XhIZSnci5fQ9xnhl/VpwVVMFiOt5uGN6S5QMNHmhZqbki/adlKXAmDOD4fncyusOZFK1WTQY35xTWHwxuso25g==", "dev": true, "requires": { - "@google-cloud/common": "0.16.2", - "arrify": "1.0.1", - "async-each": "1.0.1", - "delay": "2.0.0", - "duplexify": "3.6.0", - "extend": "3.0.1", - "google-auto-auth": "0.10.1", - "google-gax": "0.16.1", - "google-proto-files": "0.16.1", - "is": "3.2.1", - "lodash.chunk": "4.2.0", - "lodash.merge": "4.6.1", - "lodash.snakecase": "4.1.1", - "protobufjs": "6.8.6", - "through2": "2.0.3", - "uuid": "3.3.2" + "@google-cloud/common": "^0.16.1", + "arrify": "^1.0.0", + "async-each": "^1.0.1", + "delay": "^2.0.0", + "duplexify": "^3.5.4", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.1", + "google-gax": "^0.16.0", + "google-proto-files": "^0.16.0", + "is": "^3.0.1", + "lodash.chunk": "^4.2.0", + "lodash.merge": "^4.6.0", + "lodash.snakecase": "^4.1.1", + "protobufjs": "^6.8.1", + "through2": "^2.0.3", + "uuid": "^3.1.0" }, "dependencies": { "@google-cloud/common": { @@ -2053,24 +2053,24 @@ "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", "dev": true, "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.9.7", - "is": "3.2.1", + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.9.0", + "is": "^3.2.0", "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.87.0", - "retry-request": "3.3.2", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" }, "dependencies": { "google-auto-auth": { @@ -2079,10 +2079,10 @@ "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", "dev": true, "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.6.1", - "request": "2.87.0" + "async": "^2.3.0", + "gcp-metadata": "^0.6.1", + "google-auth-library": "^1.3.1", + "request": "^2.79.0" } } } @@ -2093,16 +2093,16 @@ "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "dev": true, "requires": { - "duplexify": "3.6.0", - "extend": "3.0.1", - "globby": "8.0.1", - "google-auto-auth": "0.10.1", - "google-proto-files": "0.15.1", - "grpc": "1.13.0", - "is-stream-ended": "0.1.4", - "lodash": "4.17.10", - "protobufjs": "6.8.6", - "through2": "2.0.3" + "duplexify": "^3.5.4", + "extend": "^3.0.0", + "globby": "^8.0.0", + "google-auto-auth": "^0.10.0", + "google-proto-files": "^0.15.0", + "grpc": "^1.10.0", + "is-stream-ended": "^0.1.0", + "lodash": "^4.17.2", + "protobufjs": "^6.8.0", + "through2": "^2.0.3" }, "dependencies": { "google-proto-files": { @@ -2111,9 +2111,9 @@ "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", "dev": true, "requires": { - "globby": "7.1.1", - "power-assert": "1.6.0", - "protobufjs": "6.8.6" + "globby": "^7.1.1", + "power-assert": "^1.4.4", + "protobufjs": "^6.8.0" }, "dependencies": { "globby": { @@ -2122,12 +2122,12 @@ "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "dev": true, "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.10", - "pify": "3.0.0", - "slash": "1.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } } } @@ -2140,8 +2140,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "2.87.0", - "through2": "2.0.3" + "request": "^2.81.0", + "through2": "^2.0.0" } }, "split-array-stream": { @@ -2150,8 +2150,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "2.6.1", - "is-stream-ended": "0.1.4" + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" } } } @@ -2162,27 +2162,27 @@ "integrity": "sha512-QaAxzCkbhspwajoaEnT0GcnQcpjPRcBrHYuQsXtD05BtOJgVnHCLXSsfUiRdU0nVpK+Thp7+sTkQ0fvk5PanKg==", "dev": true, "requires": { - "@google-cloud/common": "0.17.0", - "arrify": "1.0.1", - "async": "2.6.1", - "compressible": "2.0.14", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "extend": "3.0.1", - "gcs-resumable-upload": "0.10.2", - "hash-stream-validation": "0.2.1", - "is": "3.2.1", - "mime": "2.3.1", - "mime-types": "2.1.18", - "once": "1.4.0", - "pumpify": "1.5.1", - "request": "2.87.0", - "safe-buffer": "5.1.2", - "snakeize": "0.1.0", - "stream-events": "1.0.4", - "through2": "2.0.3", - "xdg-basedir": "3.0.0" + "@google-cloud/common": "^0.17.0", + "arrify": "^1.0.0", + "async": "^2.0.1", + "compressible": "^2.0.12", + "concat-stream": "^1.5.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "extend": "^3.0.0", + "gcs-resumable-upload": "^0.10.2", + "hash-stream-validation": "^0.2.1", + "is": "^3.0.1", + "mime": "^2.2.0", + "mime-types": "^2.0.8", + "once": "^1.3.1", + "pumpify": "^1.5.1", + "request": "^2.85.0", + "safe-buffer": "^5.1.1", + "snakeize": "^0.1.0", + "stream-events": "^1.0.1", + "through2": "^2.0.0", + "xdg-basedir": "^3.0.0" }, "dependencies": { "@google-cloud/common": { @@ -2191,24 +2191,24 @@ "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", "dev": true, "requires": { - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "concat-stream": "1.6.2", - "create-error-class": "3.0.2", - "duplexify": "3.6.0", - "ent": "2.2.0", - "extend": "3.0.1", - "google-auto-auth": "0.10.1", - "is": "3.2.1", + "array-uniq": "^1.0.3", + "arrify": "^1.0.1", + "concat-stream": "^1.6.0", + "create-error-class": "^3.0.2", + "duplexify": "^3.5.0", + "ent": "^2.2.0", + "extend": "^3.0.1", + "google-auto-auth": "^0.10.0", + "is": "^3.2.0", "log-driver": "1.2.7", - "methmeth": "1.1.0", - "modelo": "4.2.3", - "request": "2.87.0", - "retry-request": "3.3.2", - "split-array-stream": "1.0.3", - "stream-events": "1.0.4", - "string-format-obj": "1.1.1", - "through2": "2.0.3" + "methmeth": "^1.1.0", + "modelo": "^4.2.0", + "request": "^2.79.0", + "retry-request": "^3.0.0", + "split-array-stream": "^1.0.0", + "stream-events": "^1.0.1", + "string-format-obj": "^1.1.0", + "through2": "^2.0.3" } }, "retry-request": { @@ -2217,8 +2217,8 @@ "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", "dev": true, "requires": { - "request": "2.87.0", - "through2": "2.0.3" + "request": "^2.81.0", + "through2": "^2.0.0" } }, "split-array-stream": { @@ -2227,8 +2227,8 @@ "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", "dev": true, "requires": { - "async": "2.6.1", - "is-stream-ended": "0.1.4" + "async": "^2.4.0", + "is-stream-ended": "^0.1.0" } } } @@ -2238,10 +2238,10 @@ "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.1.0.tgz", "integrity": "sha512-GHoZBR5N+65AWazsCiJDxeMSbUpp2qNYbjeD3mP27L2PT25+GvIupIIJiCgULH87NAiAd9SmWMRBVz+uSiHpgA==", "requires": { - "@types/lodash": "4.14.110", - "@types/node": "9.6.23", - "lodash": "4.17.10", - "protobufjs": "6.8.6" + "@types/lodash": "^4.14.104", + "@types/node": "^9.4.6", + "lodash": "^4.17.5", + "protobufjs": "^6.8.6" }, "dependencies": { "@types/node": { @@ -2257,10 +2257,10 @@ "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", "dev": true, "requires": { - "chalk": "0.4.0", - "date-time": "0.1.1", - "pretty-ms": "0.2.2", - "text-table": "0.2.0" + "chalk": "^0.4.0", + "date-time": "^0.1.1", + "pretty-ms": "^0.2.1", + "text-table": "^0.2.0" }, "dependencies": { "ansi-styles": { @@ -2275,9 +2275,9 @@ "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "dev": true, "requires": { - "ansi-styles": "1.0.0", - "has-color": "0.1.7", - "strip-ansi": "0.1.1" + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" } }, "pretty-ms": { @@ -2286,7 +2286,7 @@ "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", "dev": true, "requires": { - "parse-ms": "0.1.2" + "parse-ms": "^0.1.0" } }, "strip-ansi": { @@ -2302,8 +2302,8 @@ "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", "requires": { - "call-me-maybe": "1.0.1", - "glob-to-regexp": "0.3.0" + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" } }, "@nodelib/fs.stat": { @@ -2336,8 +2336,8 @@ "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/inquire": "1.1.0" + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" } }, "@protobufjs/float": { @@ -2390,7 +2390,7 @@ "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", "requires": { - "@types/node": "10.5.2" + "@types/node": "*" } }, "@types/form-data": { @@ -2398,13 +2398,13 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "10.5.2" + "@types/node": "*" } }, "@types/lodash": { - "version": "4.14.110", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.110.tgz", - "integrity": "sha512-iXYLa6olt4tnsCA+ZXeP6eEW3tk1SulWeYyP/yooWfAtXjozqXgtX4+XUtMuOCfYjKGz3F34++qUc3Q+TJuIIw==" + "version": "4.14.111", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.111.tgz", + "integrity": "sha512-t2FwnkdqdZNYPJHTEF+Zf//j5d2I7UbM2Ng+vqqmUCE2RuiVVINJi9RlVdpKvqPqVItsJa0X+ra/tvmwLzlcgg==" }, "@types/long": { "version": "3.0.32", @@ -2421,10 +2421,10 @@ "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.1.tgz", "integrity": "sha512-TV3XLvDjQbIeVxJ1Z3oCTDk/KuYwwcNKVwz2YaT0F5u86Prgc4syDAp6P96rkTQQ4bIdh+VswQIC9zS6NjY7/g==", "requires": { - "@types/caseless": "0.12.1", - "@types/form-data": "2.2.1", - "@types/node": "10.5.2", - "@types/tough-cookie": "2.3.3" + "@types/caseless": "*", + "@types/form-data": "*", + "@types/node": "*", + "@types/tough-cookie": "*" } }, "@types/tough-cookie": { @@ -2448,7 +2448,7 @@ "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "5.7.1" + "acorn": "^5.0.3" } }, "ajv": { @@ -2456,10 +2456,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { @@ -2474,9 +2474,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" }, "dependencies": { "kind-of": { @@ -2485,7 +2485,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2502,7 +2502,7 @@ "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -2523,8 +2523,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -2533,7 +2533,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2555,7 +2555,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.2" + "color-convert": "^1.9.0" } }, "anymatch": { @@ -2564,8 +2564,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" }, "dependencies": { "arr-diff": { @@ -2574,7 +2574,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "array-unique": { @@ -2589,9 +2589,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "expand-brackets": { @@ -2600,7 +2600,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "extglob": { @@ -2609,7 +2609,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-extglob": { @@ -2624,7 +2624,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "kind-of": { @@ -2633,7 +2633,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "micromatch": { @@ -2642,19 +2642,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } } } @@ -2665,7 +2665,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "argv": { @@ -2723,7 +2723,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -2746,8 +2746,8 @@ "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", "requires": { - "colour": "0.7.1", - "optjs": "3.2.2" + "colour": "~0.7.1", + "optjs": "~3.2.2" } }, "asn1": { @@ -2771,7 +2771,7 @@ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "dev": true, "requires": { - "lodash": "4.17.10" + "lodash": "^4.17.10" } }, "async-each": { @@ -2802,89 +2802,89 @@ "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", "dev": true, "requires": { - "@ava/babel-preset-stage-4": "1.1.0", - "@ava/babel-preset-transform-test-files": "3.0.0", - "@ava/write-file-atomic": "2.2.0", - "@concordance/react": "1.0.0", - "@ladjs/time-require": "0.1.4", - "ansi-escapes": "3.1.0", - "ansi-styles": "3.2.1", - "arr-flatten": "1.1.0", - "array-union": "1.0.2", - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "auto-bind": "1.2.1", - "ava-init": "0.2.1", - "babel-core": "6.26.3", - "babel-generator": "6.26.1", - "babel-plugin-syntax-object-rest-spread": "6.13.0", - "bluebird": "3.5.1", - "caching-transform": "1.0.1", - "chalk": "2.4.1", - "chokidar": "1.7.0", - "clean-stack": "1.3.0", - "clean-yaml-object": "0.1.0", - "cli-cursor": "2.1.0", - "cli-spinners": "1.3.1", - "cli-truncate": "1.1.0", - "co-with-promise": "4.6.0", - "code-excerpt": "2.1.1", - "common-path-prefix": "1.0.0", - "concordance": "3.0.0", - "convert-source-map": "1.5.1", - "core-assert": "0.2.1", - "currently-unhandled": "0.4.1", - "debug": "3.1.0", - "dot-prop": "4.2.0", - "empower-core": "0.6.2", - "equal-length": "1.0.1", - "figures": "2.0.0", - "find-cache-dir": "1.0.0", - "fn-name": "2.0.1", - "get-port": "3.2.0", - "globby": "6.1.0", - "has-flag": "2.0.0", - "hullabaloo-config-manager": "1.1.1", - "ignore-by-default": "1.0.1", - "import-local": "0.1.1", - "indent-string": "3.2.0", - "is-ci": "1.1.0", - "is-generator-fn": "1.0.0", - "is-obj": "1.0.1", - "is-observable": "1.1.0", - "is-promise": "2.1.0", - "last-line-stream": "1.0.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.debounce": "4.0.8", - "lodash.difference": "4.5.0", - "lodash.flatten": "4.4.0", - "loud-rejection": "1.6.0", - "make-dir": "1.3.0", - "matcher": "1.1.1", - "md5-hex": "2.0.0", - "meow": "3.7.0", - "ms": "2.0.0", - "multimatch": "2.1.0", - "observable-to-promise": "0.5.0", - "option-chain": "1.0.0", - "package-hash": "2.0.0", - "pkg-conf": "2.1.0", - "plur": "2.1.2", - "pretty-ms": "3.2.0", - "require-precompiled": "0.1.0", - "resolve-cwd": "2.0.0", - "safe-buffer": "5.1.2", - "semver": "5.5.0", - "slash": "1.0.0", - "source-map-support": "0.5.6", - "stack-utils": "1.0.1", - "strip-ansi": "4.0.0", - "strip-bom-buf": "1.0.0", - "supertap": "1.0.0", - "supports-color": "5.4.0", - "trim-off-newlines": "1.0.1", - "unique-temp-dir": "1.0.0", - "update-notifier": "2.5.0" + "@ava/babel-preset-stage-4": "^1.1.0", + "@ava/babel-preset-transform-test-files": "^3.0.0", + "@ava/write-file-atomic": "^2.2.0", + "@concordance/react": "^1.0.0", + "@ladjs/time-require": "^0.1.4", + "ansi-escapes": "^3.0.0", + "ansi-styles": "^3.1.0", + "arr-flatten": "^1.0.1", + "array-union": "^1.0.1", + "array-uniq": "^1.0.2", + "arrify": "^1.0.0", + "auto-bind": "^1.1.0", + "ava-init": "^0.2.0", + "babel-core": "^6.17.0", + "babel-generator": "^6.26.0", + "babel-plugin-syntax-object-rest-spread": "^6.13.0", + "bluebird": "^3.0.0", + "caching-transform": "^1.0.0", + "chalk": "^2.0.1", + "chokidar": "^1.4.2", + "clean-stack": "^1.1.1", + "clean-yaml-object": "^0.1.0", + "cli-cursor": "^2.1.0", + "cli-spinners": "^1.0.0", + "cli-truncate": "^1.0.0", + "co-with-promise": "^4.6.0", + "code-excerpt": "^2.1.1", + "common-path-prefix": "^1.0.0", + "concordance": "^3.0.0", + "convert-source-map": "^1.5.1", + "core-assert": "^0.2.0", + "currently-unhandled": "^0.4.1", + "debug": "^3.0.1", + "dot-prop": "^4.1.0", + "empower-core": "^0.6.1", + "equal-length": "^1.0.0", + "figures": "^2.0.0", + "find-cache-dir": "^1.0.0", + "fn-name": "^2.0.0", + "get-port": "^3.0.0", + "globby": "^6.0.0", + "has-flag": "^2.0.0", + "hullabaloo-config-manager": "^1.1.0", + "ignore-by-default": "^1.0.0", + "import-local": "^0.1.1", + "indent-string": "^3.0.0", + "is-ci": "^1.0.7", + "is-generator-fn": "^1.0.0", + "is-obj": "^1.0.0", + "is-observable": "^1.0.0", + "is-promise": "^2.1.0", + "last-line-stream": "^1.0.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.debounce": "^4.0.3", + "lodash.difference": "^4.3.0", + "lodash.flatten": "^4.2.0", + "loud-rejection": "^1.2.0", + "make-dir": "^1.0.0", + "matcher": "^1.0.0", + "md5-hex": "^2.0.0", + "meow": "^3.7.0", + "ms": "^2.0.0", + "multimatch": "^2.1.0", + "observable-to-promise": "^0.5.0", + "option-chain": "^1.0.0", + "package-hash": "^2.0.0", + "pkg-conf": "^2.0.0", + "plur": "^2.0.0", + "pretty-ms": "^3.0.0", + "require-precompiled": "^0.1.0", + "resolve-cwd": "^2.0.0", + "safe-buffer": "^5.1.1", + "semver": "^5.4.1", + "slash": "^1.0.0", + "source-map-support": "^0.5.0", + "stack-utils": "^1.0.1", + "strip-ansi": "^4.0.0", + "strip-bom-buf": "^1.0.0", + "supertap": "^1.0.0", + "supports-color": "^5.0.0", + "trim-off-newlines": "^1.0.1", + "unique-temp-dir": "^1.0.0", + "update-notifier": "^2.3.0" }, "dependencies": { "ansi-regex": { @@ -2900,7 +2900,7 @@ "dev": true, "requires": { "call-signature": "0.0.2", - "core-js": "2.5.7" + "core-js": "^2.0.0" } }, "globby": { @@ -2909,11 +2909,11 @@ "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { - "array-union": "1.0.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -2934,7 +2934,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "strip-ansi": { @@ -2943,7 +2943,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2954,11 +2954,11 @@ "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", "dev": true, "requires": { - "arr-exclude": "1.0.0", - "execa": "0.7.0", - "has-yarn": "1.0.0", - "read-pkg-up": "2.0.0", - "write-pkg": "3.2.0" + "arr-exclude": "^1.0.0", + "execa": "^0.7.0", + "has-yarn": "^1.0.0", + "read-pkg-up": "^2.0.0", + "write-pkg": "^3.1.0" } }, "aws-sign2": { @@ -2976,8 +2976,8 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "1.5.1", - "is-buffer": "1.1.6" + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" } }, "babel-code-frame": { @@ -2986,9 +2986,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { "ansi-styles": { @@ -3003,11 +3003,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "supports-color": { @@ -3024,25 +3024,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-generator": "6.26.1", - "babel-helpers": "6.24.1", - "babel-messages": "6.23.0", - "babel-register": "6.26.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "convert-source-map": "1.5.1", - "debug": "2.6.9", - "json5": "0.5.1", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "path-is-absolute": "1.0.1", - "private": "0.1.8", - "slash": "1.0.0", - "source-map": "0.5.7" + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" }, "dependencies": { "debug": { @@ -3062,14 +3062,14 @@ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" }, "dependencies": { "jsesc": { @@ -3086,9 +3086,9 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "babel-helper-explode-assignable-expression": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-call-delegate": { @@ -3097,10 +3097,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-explode-assignable-expression": { @@ -3109,9 +3109,9 @@ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-function-name": { @@ -3120,11 +3120,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-get-function-arity": { @@ -3133,8 +3133,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-hoist-variables": { @@ -3143,8 +3143,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-regex": { @@ -3153,9 +3153,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, "babel-helper-remap-async-to-generator": { @@ -3164,11 +3164,11 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "dev": true, "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helpers": { @@ -3177,8 +3177,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, "babel-messages": { @@ -3187,7 +3187,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-check-es2015-constants": { @@ -3196,7 +3196,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-espower": { @@ -3205,13 +3205,13 @@ "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", "dev": true, "requires": { - "babel-generator": "6.26.1", - "babylon": "6.18.0", - "call-matcher": "1.0.1", - "core-js": "2.5.7", - "espower-location-detector": "1.0.0", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "babel-generator": "^6.1.0", + "babylon": "^6.1.0", + "call-matcher": "^1.0.0", + "core-js": "^2.0.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.1.1" } }, "babel-plugin-syntax-async-functions": { @@ -3244,9 +3244,9 @@ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "6.24.1", - "babel-plugin-syntax-async-functions": "6.13.0", - "babel-runtime": "6.26.0" + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -3255,7 +3255,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -3264,9 +3264,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -3275,10 +3275,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-types": "6.26.0" + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -3287,12 +3287,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "6.24.1", - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-spread": { @@ -3301,7 +3301,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -3310,9 +3310,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -3321,9 +3321,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "regexpu-core": "2.0.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { @@ -3332,9 +3332,9 @@ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", - "babel-plugin-syntax-exponentiation-operator": "6.13.0", - "babel-runtime": "6.26.0" + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-strict-mode": { @@ -3343,8 +3343,8 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-register": { @@ -3353,13 +3353,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "6.26.3", - "babel-runtime": "6.26.0", - "core-js": "2.5.7", - "home-or-tmp": "2.0.0", - "lodash": "4.17.10", - "mkdirp": "0.5.1", - "source-map-support": "0.4.18" + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" }, "dependencies": { "source-map-support": { @@ -3368,7 +3368,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -3379,8 +3379,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.7", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -3389,11 +3389,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -3402,15 +3402,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.4", - "lodash": "4.17.10" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" }, "dependencies": { "debug": { @@ -3430,10 +3430,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -3452,13 +3452,13 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -3466,7 +3466,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -3474,7 +3474,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -3482,7 +3482,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -3490,9 +3490,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -3503,7 +3503,7 @@ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "binary-extensions": { @@ -3524,13 +3524,13 @@ "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.4.1", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "2.0.0" + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3557,8 +3557,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3567,7 +3567,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3577,7 +3577,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -3586,16 +3586,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -3603,7 +3603,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -3642,7 +3642,7 @@ "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { - "long": "3.2.0" + "long": "~3" }, "dependencies": { "long": { @@ -3657,15 +3657,15 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "cacheable-request": { @@ -3697,9 +3697,9 @@ "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" }, "dependencies": { "md5-hex": { @@ -3708,7 +3708,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "write-file-atomic": { @@ -3717,9 +3717,9 @@ "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } } } @@ -3730,10 +3730,10 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.7", - "deep-equal": "1.0.1", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "core-js": "^2.0.0", + "deep-equal": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.0.0" } }, "call-me-maybe": { @@ -3752,7 +3752,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -3772,8 +3772,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" }, "dependencies": { "map-obj": { @@ -3801,7 +3801,7 @@ "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", "dev": true, "requires": { - "underscore-contrib": "0.3.0" + "underscore-contrib": "~0.3.0" } }, "center-align": { @@ -3811,8 +3811,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -3821,9 +3821,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "chardet": { @@ -3838,14 +3838,15 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" }, "dependencies": { "glob-parent": { @@ -3854,7 +3855,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -3869,7 +3870,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -3891,10 +3892,10 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -3902,7 +3903,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -3931,7 +3932,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-spinners": { @@ -3946,8 +3947,8 @@ "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", "dev": true, "requires": { - "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "slice-ansi": "^1.0.0", + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3968,8 +3969,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3978,7 +3979,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3994,9 +3995,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, "clone-response": { @@ -4005,7 +4006,7 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "co": { @@ -4019,7 +4020,7 @@ "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", "dev": true, "requires": { - "pinkie-promise": "1.0.0" + "pinkie-promise": "^1.0.0" } }, "code-excerpt": { @@ -4028,7 +4029,7 @@ "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", "dev": true, "requires": { - "convert-to-spaces": "1.0.2" + "convert-to-spaces": "^1.0.1" } }, "code-point-at": { @@ -4042,10 +4043,10 @@ "integrity": "sha512-KJyzHdg9B8U9LxXa7hS6jnEW5b1cNckLYc2YpnJ1nEFiOW+/iSzDHp+5MYEIQd9fN3/tC6WmGZmYiwxzkuGp/A==", "dev": true, "requires": { - "argv": "0.0.2", - "ignore-walk": "3.0.1", - "request": "2.87.0", - "urlgrey": "0.4.4" + "argv": "^0.0.2", + "ignore-walk": "^3.0.1", + "request": "^2.87.0", + "urlgrey": "^0.4.4" } }, "collection-visit": { @@ -4053,8 +4054,8 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "color-convert": { @@ -4088,7 +4089,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -4120,7 +4121,7 @@ "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", "dev": true, "requires": { - "mime-db": "1.34.0" + "mime-db": ">= 1.34.0 < 2" }, "dependencies": { "mime-db": { @@ -4142,10 +4143,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "1.1.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "concordance": { @@ -4154,17 +4155,17 @@ "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", "dev": true, "requires": { - "date-time": "2.1.0", - "esutils": "2.0.2", - "fast-diff": "1.1.2", - "function-name-support": "0.2.0", - "js-string-escape": "1.0.1", - "lodash.clonedeep": "4.5.0", - "lodash.flattendeep": "4.4.0", - "lodash.merge": "4.6.1", - "md5-hex": "2.0.0", - "semver": "5.5.0", - "well-known-symbols": "1.0.0" + "date-time": "^2.1.0", + "esutils": "^2.0.2", + "fast-diff": "^1.1.1", + "function-name-support": "^0.2.0", + "js-string-escape": "^1.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.flattendeep": "^4.4.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "semver": "^5.3.0", + "well-known-symbols": "^1.0.0" }, "dependencies": { "date-time": { @@ -4173,7 +4174,7 @@ "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "dev": true, "requires": { - "time-zone": "1.0.0" + "time-zone": "^1.0.0" } } } @@ -4184,12 +4185,12 @@ "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.3.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "convert-source-map": { @@ -4221,8 +4222,8 @@ "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", "dev": true, "requires": { - "buf-compare": "1.0.1", - "is-error": "2.2.1" + "buf-compare": "^1.0.0", + "is-error": "^2.2.0" } }, "core-js": { @@ -4241,7 +4242,7 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "1.0.0" + "capture-stack-trace": "^1.0.0" } }, "cross-spawn": { @@ -4250,9 +4251,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.1" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "crypto-random-string": { @@ -4267,7 +4268,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "1.0.2" + "array-find-index": "^1.0.1" } }, "d": { @@ -4276,7 +4277,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.45" + "es5-ext": "^0.10.9" } }, "d64": { @@ -4289,7 +4290,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "date-time": { @@ -4322,7 +4323,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "deep-equal": { @@ -4348,8 +4349,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.12" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "define-property": { @@ -4357,8 +4358,8 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -4366,7 +4367,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -4374,7 +4375,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -4382,9 +4383,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -4395,13 +4396,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.1", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" }, "dependencies": { "globby": { @@ -4410,12 +4411,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -4436,7 +4437,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } } } @@ -4447,7 +4448,7 @@ "integrity": "sha1-kRLq3APk7H4AKXM3iW8nO72R+uU=", "dev": true, "requires": { - "p-defer": "1.0.0" + "p-defer": "^1.0.0" } }, "delayed-stream": { @@ -4461,7 +4462,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "diff": { @@ -4480,8 +4481,8 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "requires": { - "arrify": "1.0.1", - "path-type": "3.0.0" + "arrify": "^1.0.1", + "path-type": "^3.0.0" } }, "doctrine": { @@ -4490,7 +4491,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "dom-serializer": { @@ -4499,8 +4500,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" }, "dependencies": { "domelementtype": { @@ -4523,7 +4524,7 @@ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "domutils": { @@ -4532,8 +4533,8 @@ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" + "dom-serializer": "0", + "domelementtype": "1" } }, "dot-prop": { @@ -4541,7 +4542,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "requires": { - "is-obj": "1.0.1" + "is-obj": "^1.0.0" } }, "duplexer3": { @@ -4555,10 +4556,10 @@ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "requires": { - "end-of-stream": "1.4.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "stream-shift": "1.0.0" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, "eastasianwidth": { @@ -4572,7 +4573,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "ecdsa-sig-formatter": { @@ -4580,7 +4581,7 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "empower": { @@ -4588,8 +4589,8 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.0.tgz", "integrity": "sha512-tP2WqM7QzrPguCCQEQfFFDF+6Pw6YWLQal3+GHQaV+0uIr0S+jyREQPWljE02zFCYPFYLZ3LosiRV+OzTrxPpQ==", "requires": { - "core-js": "2.5.7", - "empower-core": "1.2.0" + "core-js": "^2.0.0", + "empower-core": "^1.2.0" } }, "empower-assert": { @@ -4598,7 +4599,7 @@ "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.2.0" } }, "empower-core": { @@ -4607,7 +4608,7 @@ "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.7" + "core-js": "^2.0.0" } }, "end-of-stream": { @@ -4615,7 +4616,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "ent": { @@ -4641,7 +4642,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -4650,11 +4651,11 @@ "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", "dev": true, "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.3", - "is-callable": "1.1.4", - "is-regex": "1.0.4" + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -4663,9 +4664,9 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "1.1.4", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" } }, "es5-ext": { @@ -4674,9 +4675,9 @@ "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", "dev": true, "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "next-tick": "1.0.0" + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" } }, "es6-error": { @@ -4691,9 +4692,9 @@ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, "es6-map": { @@ -4702,12 +4703,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" } }, "es6-set": { @@ -4716,11 +4717,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45", - "es6-iterator": "2.0.3", + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "event-emitter": "~0.3.5" } }, "es6-symbol": { @@ -4729,8 +4730,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45" + "d": "1", + "es5-ext": "~0.10.14" } }, "es6-weak-map": { @@ -4739,10 +4740,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" } }, "escallmatch": { @@ -4751,8 +4752,8 @@ "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", "dev": true, "requires": { - "call-matcher": "1.0.1", - "esprima": "2.7.3" + "call-matcher": "^1.0.0", + "esprima": "^2.0.0" }, "dependencies": { "esprima": { @@ -4775,11 +4776,11 @@ "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", "dev": true, "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" }, "dependencies": { "esprima": { @@ -4803,10 +4804,10 @@ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint": { @@ -4815,45 +4816,45 @@ "integrity": "sha512-DyH6JsoA1KzA5+OSWFjg56DFJT+sDLO0yokaPZ9qY0UEmYrPA1gEX/G1MnVkmRDsksG4H1foIVz2ZXXM3hHYvw==", "dev": true, "requires": { - "ajv": "6.5.2", - "babel-code-frame": "6.26.0", - "chalk": "2.4.1", - "cross-spawn": "6.0.5", - "debug": "3.1.0", - "doctrine": "2.1.0", - "eslint-scope": "4.0.0", - "eslint-utils": "1.3.1", - "eslint-visitor-keys": "1.0.0", - "espree": "4.0.0", - "esquery": "1.0.1", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.7.0", - "ignore": "3.3.10", - "imurmurhash": "0.1.4", - "inquirer": "5.2.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.12.0", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", - "regexpp": "1.1.0", - "require-uncached": "1.0.3", - "semver": "5.5.0", - "string.prototype.matchall": "2.0.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", - "table": "4.0.3", - "text-table": "0.2.0" + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.1.0", + "require-uncached": "^1.0.3", + "semver": "^5.5.0", + "string.prototype.matchall": "^2.0.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" }, "dependencies": { "ajv": { @@ -4862,10 +4863,10 @@ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" } }, "ansi-regex": { @@ -4880,11 +4881,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "1.0.4", - "path-key": "2.0.1", - "semver": "5.5.0", - "shebang-command": "1.2.0", - "which": "1.3.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "fast-deep-equal": { @@ -4911,7 +4912,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -4922,7 +4923,7 @@ "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { - "get-stdin": "5.0.1" + "get-stdin": "^5.0.1" }, "dependencies": { "get-stdin": { @@ -4939,10 +4940,10 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "3.3.10", - "minimatch": "3.0.4", - "resolve": "1.8.1", - "semver": "5.5.0" + "ignore": "^3.3.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", + "semver": "^5.4.1" }, "dependencies": { "resolve": { @@ -4951,7 +4952,7 @@ "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } } } @@ -4962,8 +4963,8 @@ "integrity": "sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og==", "dev": true, "requires": { - "fast-diff": "1.1.2", - "jest-docblock": "21.2.0" + "fast-diff": "^1.1.1", + "jest-docblock": "^21.0.0" } }, "eslint-scope": { @@ -4972,8 +4973,8 @@ "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint-utils": { @@ -4994,16 +4995,16 @@ "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", "dev": true, "requires": { - "array-find": "1.0.0", - "escallmatch": "1.5.0", - "escodegen": "1.10.0", - "escope": "3.6.0", - "espower-location-detector": "1.0.0", - "espurify": "1.8.0", - "estraverse": "4.2.0", - "source-map": "0.5.7", - "type-name": "2.0.2", - "xtend": "4.0.1" + "array-find": "^1.0.0", + "escallmatch": "^1.5.0", + "escodegen": "^1.7.0", + "escope": "^3.3.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.3.0", + "estraverse": "^4.1.0", + "source-map": "^0.5.0", + "type-name": "^2.0.0", + "xtend": "^4.0.0" } }, "espower-loader": { @@ -5012,11 +5013,11 @@ "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", "dev": true, "requires": { - "convert-source-map": "1.5.1", - "espower-source": "2.3.0", - "minimatch": "3.0.4", - "source-map-support": "0.4.18", - "xtend": "4.0.1" + "convert-source-map": "^1.1.0", + "espower-source": "^2.0.0", + "minimatch": "^3.0.0", + "source-map-support": "^0.4.0", + "xtend": "^4.0.0" }, "dependencies": { "source-map-support": { @@ -5025,7 +5026,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -5036,10 +5037,10 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "1.2.4", - "path-is-absolute": "1.0.1", - "source-map": "0.5.7", - "xtend": "4.0.1" + "is-url": "^1.2.1", + "path-is-absolute": "^1.0.0", + "source-map": "^0.5.0", + "xtend": "^4.0.0" } }, "espower-source": { @@ -5048,17 +5049,17 @@ "integrity": "sha512-Wc4kC4zUAEV7Qt31JRPoBUc5jjowHRylml2L2VaDQ1XEbnqQofGWx+gPR03TZAPokAMl5dqyL36h3ITyMXy3iA==", "dev": true, "requires": { - "acorn": "5.7.1", - "acorn-es7-plugin": "1.1.7", - "convert-source-map": "1.5.1", - "empower-assert": "1.1.0", - "escodegen": "1.10.0", - "espower": "2.1.1", - "estraverse": "4.2.0", - "merge-estraverse-visitors": "1.0.0", - "multi-stage-sourcemap": "0.2.1", - "path-is-absolute": "1.0.1", - "xtend": "4.0.1" + "acorn": "^5.0.0", + "acorn-es7-plugin": "^1.0.10", + "convert-source-map": "^1.1.1", + "empower-assert": "^1.0.0", + "escodegen": "^1.10.0", + "espower": "^2.1.1", + "estraverse": "^4.0.0", + "merge-estraverse-visitors": "^1.0.0", + "multi-stage-sourcemap": "^0.2.1", + "path-is-absolute": "^1.0.0", + "xtend": "^4.0.0" } }, "espree": { @@ -5067,8 +5068,8 @@ "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { - "acorn": "5.7.1", - "acorn-jsx": "4.1.1" + "acorn": "^5.6.0", + "acorn-jsx": "^4.1.1" } }, "esprima": { @@ -5082,7 +5083,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", "requires": { - "core-js": "2.5.7" + "core-js": "^2.0.0" } }, "esquery": { @@ -5091,7 +5092,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -5100,7 +5101,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -5120,8 +5121,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45" + "d": "1", + "es5-ext": "~0.10.14" } }, "eventid": { @@ -5129,8 +5130,8 @@ "resolved": "https://registry.npmjs.org/eventid/-/eventid-0.1.2.tgz", "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", "requires": { - "d64": "1.0.0", - "uuid": "3.3.2" + "d64": "^1.0.0", + "uuid": "^3.0.1" } }, "execa": { @@ -5139,13 +5140,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, "expand-brackets": { @@ -5153,13 +5154,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "debug": { @@ -5175,7 +5176,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -5183,7 +5184,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -5194,7 +5195,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.4" + "fill-range": "^2.1.0" }, "dependencies": { "fill-range": { @@ -5203,11 +5204,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "3.0.0", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "is-number": { @@ -5216,7 +5217,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "isobject": { @@ -5234,7 +5235,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -5249,8 +5250,8 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -5258,7 +5259,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -5269,9 +5270,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.23", - "tmp": "0.0.33" + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" } }, "extglob": { @@ -5279,14 +5280,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -5294,7 +5295,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -5302,7 +5303,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -5310,7 +5311,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -5318,7 +5319,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -5326,9 +5327,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -5354,12 +5355,12 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { - "@mrmlnc/readdir-enhanced": "2.2.1", - "@nodelib/fs.stat": "1.1.0", - "glob-parent": "3.1.0", - "is-glob": "4.0.0", - "merge2": "1.2.2", - "micromatch": "3.1.10" + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" } }, "fast-json-stable-stringify": { @@ -5379,7 +5380,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -5388,8 +5389,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "filename-regex": { @@ -5404,8 +5405,8 @@ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", "dev": true, "requires": { - "is-object": "1.0.1", - "merge-descriptors": "1.0.1" + "is-object": "~1.0.1", + "merge-descriptors": "~1.0.0" } }, "fill-range": { @@ -5413,10 +5414,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -5424,7 +5425,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -5435,9 +5436,9 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "1.0.1", - "make-dir": "1.3.0", - "pkg-dir": "2.0.0" + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" } }, "find-up": { @@ -5446,7 +5447,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -5455,10 +5456,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" } }, "fn-name": { @@ -5472,7 +5473,7 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.1.tgz", "integrity": "sha512-v9GI1hpaqq1ZZR6pBD1+kI7O24PhDvNGNodjS3MdcEqyrahCp8zbtpv+2B/krUnSmUH80lbAS7MrdeK5IylgKg==", "requires": { - "debug": "3.1.0" + "debug": "^3.1.0" } }, "for-in": { @@ -5486,7 +5487,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreach": { @@ -5504,9 +5505,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "0.4.0", + "asynckit": "^0.4.0", "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "mime-types": "^2.1.12" } }, "formidable": { @@ -5520,7 +5521,7 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "from2": { @@ -5529,8 +5530,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" } }, "fs-extra": { @@ -5539,9 +5540,9 @@ "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.2" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "fs.realpath": { @@ -5549,6 +5550,535 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -5572,8 +6102,8 @@ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", "requires": { - "axios": "0.18.0", - "extend": "3.0.1", + "axios": "^0.18.0", + "extend": "^3.0.1", "retry-axios": "0.3.2" } }, @@ -5583,11 +6113,11 @@ "integrity": "sha1-fymz7iPc7EFwNnwHEUGCScZgVF8=", "dev": true, "requires": { - "configstore": "3.1.2", - "google-auto-auth": "0.10.1", - "pumpify": "1.5.1", - "request": "2.87.0", - "stream-events": "1.0.4" + "configstore": "^3.1.2", + "google-auto-auth": "^0.10.0", + "pumpify": "^1.4.0", + "request": "^2.85.0", + "stream-events": "^1.0.3" } }, "get-caller-file": { @@ -5624,7 +6154,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "glob": { @@ -5632,12 +6162,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -5646,8 +6176,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" }, "dependencies": { "glob-parent": { @@ -5656,7 +6186,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -5671,7 +6201,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -5681,8 +6211,8 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { @@ -5690,7 +6220,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.0" } } } @@ -5706,7 +6236,7 @@ "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, "requires": { - "ini": "1.3.5" + "ini": "^1.3.4" } }, "globals": { @@ -5720,13 +6250,13 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "fast-glob": "2.2.2", - "glob": "7.1.2", - "ignore": "3.3.10", - "pify": "3.0.0", - "slash": "1.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } }, "google-auth-library": { @@ -5734,13 +6264,13 @@ "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz", "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==", "requires": { - "axios": "0.18.0", - "gcp-metadata": "0.6.3", - "gtoken": "2.3.0", - "jws": "3.1.5", - "lodash.isstring": "4.0.1", - "lru-cache": "4.1.3", - "retry-axios": "0.3.2" + "axios": "^0.18.0", + "gcp-metadata": "^0.6.3", + "gtoken": "^2.3.0", + "jws": "^3.1.5", + "lodash.isstring": "^4.0.1", + "lru-cache": "^4.1.3", + "retry-axios": "^0.3.2" } }, "google-auto-auth": { @@ -5749,10 +6279,10 @@ "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "dev": true, "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.6.1", - "request": "2.87.0" + "async": "^2.3.0", + "gcp-metadata": "^0.6.1", + "google-auth-library": "^1.3.1", + "request": "^2.79.0" } }, "google-gax": { @@ -5760,17 +6290,17 @@ "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.17.1.tgz", "integrity": "sha512-fAKvFx++SRr6bGWamWuVOkJzJnQqMgpJkhaB2oEwfFJ91rbFgEmIPRmZZ/MeIVVFUOuHUVyZ8nwjm5peyTZJ6g==", "requires": { - "duplexify": "3.6.0", - "extend": "3.0.1", - "globby": "8.0.1", - "google-auth-library": "1.6.1", - "google-proto-files": "0.16.1", - "grpc": "1.13.0", - "is-stream-ended": "0.1.4", - "lodash": "4.17.10", - "protobufjs": "6.8.6", - "retry-request": "4.0.0", - "through2": "2.0.3" + "duplexify": "^3.6.0", + "extend": "^3.0.1", + "globby": "^8.0.1", + "google-auth-library": "^1.6.1", + "google-proto-files": "^0.16.0", + "grpc": "^1.12.2", + "is-stream-ended": "^0.1.4", + "lodash": "^4.17.10", + "protobufjs": "^6.8.6", + "retry-request": "^4.0.0", + "through2": "^2.0.3" } }, "google-p12-pem": { @@ -5778,8 +6308,8 @@ "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", "requires": { - "node-forge": "0.7.5", - "pify": "3.0.0" + "node-forge": "^0.7.4", + "pify": "^3.0.0" } }, "google-proto-files": { @@ -5787,9 +6317,9 @@ "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", "requires": { - "globby": "8.0.1", - "power-assert": "1.6.0", - "protobufjs": "6.8.6" + "globby": "^8.0.0", + "power-assert": "^1.4.4", + "protobufjs": "^6.8.0" } }, "got": { @@ -5798,23 +6328,23 @@ "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", "dev": true, "requires": { - "@sindresorhus/is": "0.7.0", - "cacheable-request": "2.1.4", - "decompress-response": "3.3.0", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "into-stream": "3.1.0", - "is-retry-allowed": "1.1.0", - "isurl": "1.0.0", - "lowercase-keys": "1.0.1", - "mimic-response": "1.0.0", - "p-cancelable": "0.3.0", - "p-timeout": "2.0.1", - "pify": "3.0.0", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "url-parse-lax": "3.0.0", - "url-to-options": "1.0.1" + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" }, "dependencies": { "prepend-http": { @@ -5829,7 +6359,7 @@ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "2.0.0" + "prepend-http": "^2.0.0" } } } @@ -5851,10 +6381,10 @@ "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.0.tgz", "integrity": "sha512-jGxWFYzttSz9pi8mu283jZvo2zIluWonQ918GMHKx8grT57GIVlvx7/82fo7AGS75lbkPoO1T6PZLvCRD9Pbtw==", "requires": { - "lodash": "4.17.10", - "nan": "2.10.0", - "node-pre-gyp": "0.10.2", - "protobufjs": "5.0.3" + "lodash": "^4.17.5", + "nan": "^2.0.0", + "node-pre-gyp": "^0.10.0", + "protobufjs": "^5.0.3" }, "dependencies": { "abbrev": { @@ -5873,8 +6403,8 @@ "version": "1.1.5", "bundled": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -5885,7 +6415,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -5932,7 +6462,7 @@ "version": "1.2.5", "bundled": true, "requires": { - "minipass": "2.3.3" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -5943,26 +6473,26 @@ "version": "2.7.4", "bundled": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.3" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "glob": { "version": "7.1.2", "bundled": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -5973,22 +6503,22 @@ "version": "0.4.23", "bundled": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { "version": "3.0.1", "bundled": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -6003,7 +6533,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -6014,7 +6544,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -6025,15 +6555,15 @@ "version": "2.3.3", "bundled": true, "requires": { - "safe-buffer": "5.1.2", - "yallist": "3.0.2" + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" } }, "minizlib": { "version": "1.1.0", "bundled": true, "requires": { - "minipass": "2.3.3" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -6057,33 +6587,33 @@ "version": "2.2.1", "bundled": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.23", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { "version": "0.10.2", "bundled": true, "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.1", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.8", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.4" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, "nopt": { "version": "4.0.1", "bundled": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -6094,18 +6624,18 @@ "version": "1.1.10", "bundled": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { "version": "4.1.2", "bundled": true, "requires": { - "are-we-there-yet": "1.1.5", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { @@ -6120,7 +6650,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -6135,8 +6665,8 @@ "version": "0.1.5", "bundled": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -6152,40 +6682,40 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { - "ascli": "1.0.1", - "bytebuffer": "5.0.1", - "glob": "7.1.2", - "yargs": "3.32.0" + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" } }, "rc": { "version": "1.2.8", "bundled": true, "requires": { - "deep-extend": "0.6.0", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" } }, "readable-stream": { "version": "2.3.6", "bundled": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { "version": "2.6.2", "bundled": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { @@ -6212,27 +6742,27 @@ "version": "3.0.2", "bundled": true }, - "string_decoder": { - "version": "1.1.1", + "string-width": { + "version": "1.0.2", "bundled": true, "requires": { - "safe-buffer": "5.1.2" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, - "string-width": { - "version": "1.0.2", + "string_decoder": { + "version": "1.1.1", "bundled": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -6243,13 +6773,13 @@ "version": "4.4.4", "bundled": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.3.3", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.2", - "yallist": "3.0.2" + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.3", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" } }, "util-deprecate": { @@ -6260,7 +6790,7 @@ "version": "1.1.3", "bundled": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -6278,11 +6808,11 @@ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", "requires": { - "axios": "0.18.0", - "google-p12-pem": "1.0.2", - "jws": "3.1.5", - "mime": "2.3.1", - "pify": "3.0.0" + "axios": "^0.18.0", + "google-p12-pem": "^1.0.0", + "jws": "^3.1.4", + "mime": "^2.2.0", + "pify": "^3.0.0" } }, "handlebars": { @@ -6291,10 +6821,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "async": { @@ -6309,7 +6839,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -6324,8 +6854,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" + "ajv": "^5.1.0", + "har-schema": "^2.0.0" } }, "has": { @@ -6334,7 +6864,7 @@ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.1.1" } }, "has-ansi": { @@ -6343,7 +6873,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-color": { @@ -6376,7 +6906,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "1.4.2" + "has-symbol-support-x": "^1.4.1" } }, "has-value": { @@ -6384,9 +6914,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -6394,8 +6924,8 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { @@ -6403,7 +6933,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6420,7 +6950,7 @@ "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "he": { @@ -6435,8 +6965,8 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" } }, "hosted-git-info": { @@ -6451,12 +6981,12 @@ "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "dev": true, "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.4.2", - "domutils": "1.7.0", - "entities": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" } }, "http-cache-semantics": { @@ -6470,9 +7000,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.14.2" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "hullabaloo-config-manager": { @@ -6481,20 +7011,20 @@ "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "es6-error": "4.1.1", - "graceful-fs": "4.1.11", - "indent-string": "3.2.0", - "json5": "0.5.1", - "lodash.clonedeep": "4.5.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.isequal": "4.5.0", - "lodash.merge": "4.6.1", - "md5-hex": "2.0.0", - "package-hash": "2.0.0", - "pkg-dir": "2.0.0", - "resolve-from": "3.0.0", - "safe-buffer": "5.1.2" + "dot-prop": "^4.1.0", + "es6-error": "^4.0.2", + "graceful-fs": "^4.1.11", + "indent-string": "^3.1.0", + "json5": "^0.5.1", + "lodash.clonedeep": "^4.5.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.isequal": "^4.5.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "package-hash": "^2.0.0", + "pkg-dir": "^2.0.0", + "resolve-from": "^3.0.0", + "safe-buffer": "^5.0.1" } }, "iconv-lite": { @@ -6503,7 +7033,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { @@ -6523,7 +7053,7 @@ "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "import-lazy": { @@ -6538,8 +7068,8 @@ "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", "dev": true, "requires": { - "pkg-dir": "2.0.0", - "resolve-cwd": "2.0.0" + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" } }, "imurmurhash": { @@ -6564,8 +7094,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -6581,10 +7111,11 @@ }, "ink-docstrap": { "version": "git+https://github.com/docstrap/docstrap.git#1e56828b819bcbc9855543bd20809a0aed415a80", + "from": "git+https://github.com/docstrap/docstrap.git", "dev": true, "requires": { - "moment": "2.22.2", - "sanitize-html": "1.18.2" + "moment": "^2.14.1", + "sanitize-html": "^1.13.0" } }, "inquirer": { @@ -6593,19 +7124,19 @@ "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { - "ansi-escapes": "3.1.0", - "chalk": "2.4.1", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.2.0", - "figures": "2.0.0", - "lodash": "4.17.10", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rxjs": "5.5.11", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" }, "dependencies": { "ansi-regex": { @@ -6626,8 +7157,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -6636,7 +7167,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -6647,7 +7178,7 @@ "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", "dev": true, "requires": { - "espower-loader": "1.2.2" + "espower-loader": "^1.0.0" } }, "into-stream": { @@ -6656,8 +7187,8 @@ "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "requires": { - "from2": "2.3.0", - "p-is-promise": "1.1.0" + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" } }, "invariant": { @@ -6666,7 +7197,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -6690,7 +7221,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6698,7 +7229,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6715,7 +7246,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -6729,7 +7260,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-callable": { @@ -6744,7 +7275,7 @@ "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "1.1.3" + "ci-info": "^1.0.0" } }, "is-data-descriptor": { @@ -6752,7 +7283,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6760,7 +7291,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6776,9 +7307,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -6800,7 +7331,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-error": { @@ -6825,7 +7356,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -6833,7 +7364,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-generator-fn": { @@ -6847,7 +7378,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.1" } }, "is-installed-globally": { @@ -6856,8 +7387,8 @@ "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { - "global-dirs": "0.1.1", - "is-path-inside": "1.0.1" + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" } }, "is-npm": { @@ -6871,7 +7402,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6879,7 +7410,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6901,7 +7432,7 @@ "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "1.2.0" + "symbol-observable": "^1.1.0" } }, "is-path-cwd": { @@ -6916,7 +7447,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -6925,7 +7456,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-plain-obj": { @@ -6939,7 +7470,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-posix-bracket": { @@ -6972,7 +7503,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.3" + "has": "^1.0.1" } }, "is-resolvable": { @@ -7064,8 +7595,8 @@ "@babel/template": "7.0.0-beta.51", "@babel/traverse": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "istanbul-lib-coverage": "2.0.1", - "semver": "5.5.0" + "istanbul-lib-coverage": "^2.0.1", + "semver": "^5.5.0" } }, "isurl": { @@ -7074,8 +7605,8 @@ "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "has-to-string-tag-x": "1.4.1", - "is-object": "1.0.1" + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" } }, "jest-docblock": { @@ -7102,8 +7633,8 @@ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "js2xmlparser": { @@ -7112,7 +7643,7 @@ "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", "dev": true, "requires": { - "xmlcreate": "1.0.2" + "xmlcreate": "^1.0.1" } }, "jsbn": { @@ -7128,17 +7659,17 @@ "dev": true, "requires": { "babylon": "7.0.0-beta.19", - "bluebird": "3.5.1", - "catharsis": "0.8.9", - "escape-string-regexp": "1.0.5", - "js2xmlparser": "3.0.0", - "klaw": "2.0.0", - "marked": "0.3.19", - "mkdirp": "0.5.1", - "requizzle": "0.2.1", - "strip-json-comments": "2.0.1", + "bluebird": "~3.5.0", + "catharsis": "~0.8.9", + "escape-string-regexp": "~1.0.5", + "js2xmlparser": "~3.0.0", + "klaw": "~2.0.0", + "marked": "~0.3.6", + "mkdirp": "~0.5.1", + "requizzle": "~0.2.1", + "strip-json-comments": "~2.0.1", "taffydb": "2.6.2", - "underscore": "1.8.3" + "underscore": "~1.8.3" }, "dependencies": { "babylon": { @@ -7200,7 +7731,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsprim": { @@ -7227,7 +7758,7 @@ "requires": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "jws": { @@ -7235,8 +7766,8 @@ "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", "requires": { - "jwa": "1.1.6", - "safe-buffer": "5.1.2" + "jwa": "^1.1.5", + "safe-buffer": "^5.0.1" } }, "keyv": { @@ -7259,7 +7790,7 @@ "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.9" } }, "last-line-stream": { @@ -7268,7 +7799,7 @@ "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "latest-version": { @@ -7277,7 +7808,7 @@ "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "4.0.1" + "package-json": "^4.0.0" } }, "lazy-cache": { @@ -7292,7 +7823,7 @@ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "levn": { @@ -7301,8 +7832,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "load-json-file": { @@ -7311,10 +7842,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" }, "dependencies": { "pify": { @@ -7331,8 +7862,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -7457,7 +7988,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "loud-rejection": { @@ -7466,8 +7997,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" } }, "lowercase-keys": { @@ -7481,8 +8012,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "make-dir": { @@ -7491,7 +8022,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "map-cache": { @@ -7509,7 +8040,7 @@ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "marked": { @@ -7524,7 +8055,7 @@ "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.4" } }, "math-random": { @@ -7539,7 +8070,7 @@ "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -7554,7 +8085,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "meow": { @@ -7563,16 +8094,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" }, "dependencies": { "find-up": { @@ -7581,8 +8112,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "load-json-file": { @@ -7591,11 +8122,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "map-obj": { @@ -7616,7 +8147,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-type": { @@ -7625,9 +8156,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -7648,7 +8179,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "read-pkg": { @@ -7657,9 +8188,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -7668,8 +8199,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" } }, "strip-bom": { @@ -7678,7 +8209,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -7695,7 +8226,7 @@ "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "merge2": { @@ -7720,19 +8251,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.13", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } }, "mime": { @@ -7750,7 +8281,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "mime-db": "1.33.0" + "mime-db": "~1.33.0" } }, "mimic-fn": { @@ -7770,7 +8301,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -7784,8 +8315,8 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -7793,7 +8324,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -7855,7 +8386,7 @@ "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", "dev": true, "requires": { - "source-map": "0.1.43" + "source-map": "^0.1.34" }, "dependencies": { "source-map": { @@ -7864,7 +8395,7 @@ "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -7875,10 +8406,10 @@ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "dev": true, "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" } }, "mute-stream": { @@ -7897,17 +8428,17 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" } }, "natural-compare": { @@ -7934,11 +8465,11 @@ "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", "dev": true, "requires": { - "@sinonjs/formatio": "2.0.0", - "just-extend": "1.1.27", - "lolex": "2.7.1", - "path-to-regexp": "1.7.0", - "text-encoding": "0.6.4" + "@sinonjs/formatio": "^2.0.0", + "just-extend": "^1.1.27", + "lolex": "^2.3.2", + "path-to-regexp": "^1.7.0", + "text-encoding": "^0.6.4" } }, "node-forge": { @@ -7952,10 +8483,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.7.1", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -7964,7 +8495,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "normalize-url": { @@ -7973,9 +8504,9 @@ "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { - "prepend-http": "2.0.0", - "query-string": "5.1.1", - "sort-keys": "2.0.0" + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" }, "dependencies": { "prepend-http": { @@ -7992,7 +8523,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -8006,33 +8537,33 @@ "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", "dev": true, "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.2.0", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "2.3.1", - "istanbul-lib-report": "1.1.3", - "istanbul-lib-source-maps": "1.2.5", - "istanbul-reports": "1.4.1", - "md5-hex": "1.3.0", - "merge-source-map": "1.1.0", - "micromatch": "3.1.10", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.2.1", + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.5.1", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^2.1.0", + "istanbul-lib-report": "^1.1.3", + "istanbul-lib-source-maps": "^1.2.5", + "istanbul-reports": "^1.4.1", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.1.0", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.1", + "spawn-wrap": "^1.4.2", + "test-exclude": "^4.2.0", "yargs": "11.1.0", - "yargs-parser": "8.1.0" + "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { @@ -8040,9 +8571,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -8060,7 +8591,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -8118,13 +8649,13 @@ "bundled": true, "dev": true, "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -8132,7 +8663,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -8140,7 +8671,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8148,7 +8679,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8156,9 +8687,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -8173,7 +8704,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -8182,16 +8713,16 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -8199,7 +8730,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8214,15 +8745,15 @@ "bundled": true, "dev": true, "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "caching-transform": { @@ -8230,9 +8761,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, "camelcase": { @@ -8247,8 +8778,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "class-utils": { @@ -8256,10 +8787,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -8267,7 +8798,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -8278,8 +8809,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -8301,8 +8832,8 @@ "bundled": true, "dev": true, "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "commondir": { @@ -8335,8 +8866,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.3", - "which": "1.3.1" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "debug": { @@ -8367,7 +8898,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "define-property": { @@ -8375,8 +8906,8 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -8384,7 +8915,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8392,7 +8923,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8400,9 +8931,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -8417,7 +8948,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "execa": { @@ -8425,13 +8956,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -8439,9 +8970,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.1" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -8451,13 +8982,13 @@ "bundled": true, "dev": true, "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "debug": { @@ -8473,7 +9004,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -8481,7 +9012,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8491,8 +9022,8 @@ "bundled": true, "dev": true, "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -8500,7 +9031,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -8510,14 +9041,14 @@ "bundled": true, "dev": true, "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -8525,7 +9056,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -8533,7 +9064,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -8541,7 +9072,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8549,7 +9080,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8557,9 +9088,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -8574,10 +9105,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -8585,7 +9116,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8595,9 +9126,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" } }, "find-up": { @@ -8605,7 +9136,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -8618,8 +9149,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, "fragment-cache": { @@ -8627,7 +9158,7 @@ "bundled": true, "dev": true, "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "fs.realpath": { @@ -8655,12 +9186,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "graceful-fs": { @@ -8673,10 +9204,10 @@ "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -8684,7 +9215,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -8694,9 +9225,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -8704,8 +9235,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { @@ -8713,7 +9244,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -8733,8 +9264,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -8752,7 +9283,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-arrayish": { @@ -8770,7 +9301,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-data-descriptor": { @@ -8778,7 +9309,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-descriptor": { @@ -8786,9 +9317,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -8813,7 +9344,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-odd": { @@ -8821,7 +9352,7 @@ "bundled": true, "dev": true, "requires": { - "is-number": "4.0.0" + "is-number": "^4.0.0" }, "dependencies": { "is-number": { @@ -8836,7 +9367,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-stream": { @@ -8879,7 +9410,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-report": { @@ -8887,10 +9418,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.2", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "has-flag": { @@ -8903,7 +9434,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -8913,11 +9444,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" } }, "istanbul-reports": { @@ -8925,7 +9456,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "kind-of": { @@ -8933,7 +9464,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -8947,7 +9478,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -8955,11 +9486,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -8967,8 +9498,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -8988,8 +9519,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "map-cache": { @@ -9002,7 +9533,7 @@ "bundled": true, "dev": true, "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "md5-hex": { @@ -9010,7 +9541,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -9023,7 +9554,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -9031,7 +9562,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.6.1" + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -9046,19 +9577,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" }, "dependencies": { "kind-of": { @@ -9078,7 +9609,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -9091,8 +9622,8 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -9100,7 +9631,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -9123,18 +9654,18 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "kind-of": { @@ -9149,10 +9680,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "npm-run-path": { @@ -9160,7 +9691,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -9178,9 +9709,9 @@ "bundled": true, "dev": true, "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -9188,7 +9719,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9198,7 +9729,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.pick": { @@ -9206,7 +9737,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "once": { @@ -9214,7 +9745,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -9222,8 +9753,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -9236,9 +9767,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "p-finally": { @@ -9251,7 +9782,7 @@ "bundled": true, "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -9259,7 +9790,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-try": { @@ -9272,7 +9803,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "pascalcase": { @@ -9285,7 +9816,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -9308,9 +9839,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -9328,7 +9859,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -9336,7 +9867,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -9344,8 +9875,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -9365,9 +9896,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -9375,8 +9906,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -9384,8 +9915,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -9395,8 +9926,8 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "repeat-element": { @@ -9440,7 +9971,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -9448,7 +9979,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-regex": { @@ -9456,7 +9987,7 @@ "bundled": true, "dev": true, "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "semver": { @@ -9474,10 +10005,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -9485,7 +10016,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9495,7 +10026,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -9518,14 +10049,14 @@ "bundled": true, "dev": true, "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.2", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { "debug": { @@ -9541,7 +10072,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -9549,7 +10080,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9559,9 +10090,9 @@ "bundled": true, "dev": true, "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -9569,7 +10100,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -9577,7 +10108,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -9585,7 +10116,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -9593,9 +10124,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -9610,7 +10141,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" } }, "source-map": { @@ -9623,11 +10154,11 @@ "bundled": true, "dev": true, "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-url": { @@ -9640,12 +10171,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.1" + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" } }, "spdx-correct": { @@ -9653,8 +10184,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -9667,8 +10198,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -9681,7 +10212,7 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "static-extend": { @@ -9689,8 +10220,8 @@ "bundled": true, "dev": true, "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -9698,7 +10229,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9708,8 +10239,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -9717,7 +10248,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "strip-bom": { @@ -9725,7 +10256,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -9738,11 +10269,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "3.1.10", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" + "arrify": "^1.0.1", + "micromatch": "^3.1.8", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, "to-object-path": { @@ -9750,7 +10281,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "to-regex": { @@ -9758,10 +10289,10 @@ "bundled": true, "dev": true, "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -9769,8 +10300,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, "uglify-js": { @@ -9779,9 +10310,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -9790,9 +10321,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -9809,10 +10340,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -9820,7 +10351,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -9828,10 +10359,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -9841,8 +10372,8 @@ "bundled": true, "dev": true, "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -9850,9 +10381,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -9882,7 +10413,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" }, "dependencies": { "kind-of": { @@ -9897,8 +10428,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "which": { @@ -9906,7 +10437,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -9930,8 +10461,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { "ansi-regex": { @@ -9944,7 +10475,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -9952,9 +10483,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "strip-ansi": { @@ -9962,7 +10493,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } } } @@ -9977,9 +10508,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "y18n": { @@ -9997,18 +10528,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" }, "dependencies": { "camelcase": { @@ -10021,9 +10552,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "yargs-parser": { @@ -10031,7 +10562,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" } } } @@ -10041,7 +10572,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -10069,9 +10600,9 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -10079,7 +10610,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "kind-of": { @@ -10087,7 +10618,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -10102,7 +10633,7 @@ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.omit": { @@ -10111,8 +10642,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "object.pick": { @@ -10120,7 +10651,7 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "observable-to-promise": { @@ -10129,8 +10660,8 @@ "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", "dev": true, "requires": { - "is-observable": "0.2.0", - "symbol-observable": "1.2.0" + "is-observable": "^0.2.0", + "symbol-observable": "^1.0.4" }, "dependencies": { "is-observable": { @@ -10139,7 +10670,7 @@ "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", "dev": true, "requires": { - "symbol-observable": "0.2.4" + "symbol-observable": "^0.2.2" }, "dependencies": { "symbol-observable": { @@ -10157,7 +10688,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -10166,7 +10697,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "optimist": { @@ -10175,8 +10706,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "option-chain": { @@ -10191,12 +10722,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" }, "dependencies": { "wordwrap": { @@ -10223,7 +10754,7 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "1.0.0" + "lcid": "^1.0.0" } }, "os-tmpdir": { @@ -10262,7 +10793,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -10271,7 +10802,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.3.0" + "p-limit": "^1.1.0" } }, "p-timeout": { @@ -10280,7 +10811,7 @@ "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { - "p-finally": "1.0.0" + "p-finally": "^1.0.0" } }, "p-try": { @@ -10295,10 +10826,10 @@ "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "lodash.flattendeep": "4.4.0", - "md5-hex": "2.0.0", - "release-zalgo": "1.0.0" + "graceful-fs": "^4.1.11", + "lodash.flattendeep": "^4.4.0", + "md5-hex": "^2.0.0", + "release-zalgo": "^1.0.0" } }, "package-json": { @@ -10307,10 +10838,10 @@ "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0", - "semver": "5.5.0" + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" }, "dependencies": { "got": { @@ -10319,17 +10850,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" } } } @@ -10340,10 +10871,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" }, "dependencies": { "is-extglob": { @@ -10358,7 +10889,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -10369,7 +10900,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.2" + "error-ex": "^1.2.0" } }, "parse-ms": { @@ -10439,7 +10970,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "performance-now": { @@ -10464,7 +10995,7 @@ "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", "dev": true, "requires": { - "pinkie": "1.0.0" + "pinkie": "^1.0.0" } }, "pkg-conf": { @@ -10473,8 +11004,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "2.1.0", - "load-json-file": "4.0.0" + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" }, "dependencies": { "load-json-file": { @@ -10483,10 +11014,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, "parse-json": { @@ -10495,8 +11026,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.2", - "json-parse-better-errors": "1.0.2" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } } } @@ -10507,7 +11038,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "2.1.0" + "find-up": "^2.1.0" } }, "plur": { @@ -10516,7 +11047,7 @@ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "dev": true, "requires": { - "irregular-plurals": "1.4.0" + "irregular-plurals": "^1.0.0" } }, "pluralize": { @@ -10536,9 +11067,9 @@ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "2.4.1", - "source-map": "0.6.1", - "supports-color": "5.4.0" + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" }, "dependencies": { "source-map": { @@ -10554,11 +11085,11 @@ "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.0.tgz", "integrity": "sha512-nDb6a+p2C7Wj8Y2zmFtLpuv+xobXz4+bzT5s7dr0nn71tLozn7nRMQqzwbefzwZN5qOm0N7Cxhw4kXP75xboKA==", "requires": { - "define-properties": "1.1.2", - "empower": "1.3.0", - "power-assert-formatter": "1.4.1", - "universal-deep-strict-equal": "1.2.2", - "xtend": "4.0.1" + "define-properties": "^1.1.2", + "empower": "^1.3.0", + "power-assert-formatter": "^1.4.1", + "universal-deep-strict-equal": "^1.2.1", + "xtend": "^4.0.0" } }, "power-assert-context-formatter": { @@ -10566,8 +11097,8 @@ "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", "requires": { - "core-js": "2.5.7", - "power-assert-context-traversal": "1.2.0" + "core-js": "^2.0.0", + "power-assert-context-traversal": "^1.2.0" } }, "power-assert-context-reducer-ast": { @@ -10575,11 +11106,11 @@ "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", "requires": { - "acorn": "5.7.1", - "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.7", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "acorn": "^5.0.0", + "acorn-es7-plugin": "^1.0.12", + "core-js": "^2.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.2.0" } }, "power-assert-context-traversal": { @@ -10587,8 +11118,8 @@ "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", "requires": { - "core-js": "2.5.7", - "estraverse": "4.2.0" + "core-js": "^2.0.0", + "estraverse": "^4.1.0" } }, "power-assert-formatter": { @@ -10596,13 +11127,13 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.7", - "power-assert-context-formatter": "1.2.0", - "power-assert-context-reducer-ast": "1.2.0", - "power-assert-renderer-assertion": "1.2.0", - "power-assert-renderer-comparison": "1.2.0", - "power-assert-renderer-diagram": "1.2.0", - "power-assert-renderer-file": "1.2.0" + "core-js": "^2.0.0", + "power-assert-context-formatter": "^1.0.7", + "power-assert-context-reducer-ast": "^1.0.7", + "power-assert-renderer-assertion": "^1.0.7", + "power-assert-renderer-comparison": "^1.0.7", + "power-assert-renderer-diagram": "^1.0.7", + "power-assert-renderer-file": "^1.0.7" } }, "power-assert-renderer-assertion": { @@ -10610,8 +11141,8 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", "requires": { - "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "1.2.0" + "power-assert-renderer-base": "^1.1.1", + "power-assert-util-string-width": "^1.2.0" } }, "power-assert-renderer-base": { @@ -10624,11 +11155,11 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", "requires": { - "core-js": "2.5.7", - "diff-match-patch": "1.0.1", - "power-assert-renderer-base": "1.1.1", - "stringifier": "1.3.0", - "type-name": "2.0.2" + "core-js": "^2.0.0", + "diff-match-patch": "^1.0.0", + "power-assert-renderer-base": "^1.1.1", + "stringifier": "^1.3.0", + "type-name": "^2.0.1" } }, "power-assert-renderer-diagram": { @@ -10636,10 +11167,10 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", "requires": { - "core-js": "2.5.7", - "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "1.2.0", - "stringifier": "1.3.0" + "core-js": "^2.0.0", + "power-assert-renderer-base": "^1.1.1", + "power-assert-util-string-width": "^1.2.0", + "stringifier": "^1.3.0" } }, "power-assert-renderer-file": { @@ -10647,7 +11178,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", "requires": { - "power-assert-renderer-base": "1.1.1" + "power-assert-renderer-base": "^1.1.1" } }, "power-assert-util-string-width": { @@ -10655,7 +11186,7 @@ "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", "requires": { - "eastasianwidth": "0.2.0" + "eastasianwidth": "^0.2.0" } }, "prelude-ls": { @@ -10688,7 +11219,7 @@ "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", "dev": true, "requires": { - "parse-ms": "1.0.1" + "parse-ms": "^1.0.0" }, "dependencies": { "parse-ms": { @@ -10727,19 +11258,19 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/base64": "1.1.2", - "@protobufjs/codegen": "2.0.4", - "@protobufjs/eventemitter": "1.1.0", - "@protobufjs/fetch": "1.1.0", - "@protobufjs/float": "1.0.2", - "@protobufjs/inquire": "1.1.0", - "@protobufjs/path": "1.1.2", - "@protobufjs/pool": "1.1.0", - "@protobufjs/utf8": "1.1.0", - "@types/long": "3.0.32", - "@types/node": "8.10.21", - "long": "4.0.0" + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^3.0.32", + "@types/node": "^8.9.4", + "long": "^4.0.0" }, "dependencies": { "@types/node": { @@ -10755,9 +11286,9 @@ "integrity": "sha512-fQr3VQrbdzHrdaDn3XuisVoJlJNDJizHAvUXw9IuXRR8BpV2x0N7LsCxrpJkeKfPbNjiNU/V5vc008cI0TmzzQ==", "dev": true, "requires": { - "fill-keys": "1.0.2", - "module-not-found-error": "1.0.1", - "resolve": "1.5.0" + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.0", + "resolve": "~1.5.0" }, "dependencies": { "resolve": { @@ -10766,7 +11297,7 @@ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } } } @@ -10781,8 +11312,8 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "end-of-stream": "1.4.1", - "once": "1.4.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "pumpify": { @@ -10790,9 +11321,9 @@ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "requires": { - "duplexify": "3.6.0", - "inherits": "2.0.3", - "pump": "2.0.1" + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" } }, "punycode": { @@ -10811,9 +11342,9 @@ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { - "decode-uri-component": "0.2.0", - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" } }, "randomatic": { @@ -10822,9 +11353,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "4.0.0", - "kind-of": "6.0.2", - "math-random": "1.0.1" + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" }, "dependencies": { "is-number": { @@ -10841,10 +11372,10 @@ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "deep-extend": "0.6.0", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -10861,9 +11392,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" }, "dependencies": { "path-type": { @@ -10872,7 +11403,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "pify": { @@ -10889,8 +11420,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" } }, "readable-stream": { @@ -10898,13 +11429,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "readdirp": { @@ -10913,10 +11444,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.6", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" } }, "redent": { @@ -10925,8 +11456,8 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" }, "dependencies": { "indent-string": { @@ -10935,7 +11466,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } } } @@ -10958,7 +11489,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "regex-not": { @@ -10966,8 +11497,8 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "regexp.prototype.flags": { @@ -10976,7 +11507,7 @@ "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", "dev": true, "requires": { - "define-properties": "1.1.2" + "define-properties": "^1.1.2" } }, "regexpp": { @@ -10991,9 +11522,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "1.4.0", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" } }, "registry-auth-token": { @@ -11002,8 +11533,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.8", - "safe-buffer": "5.1.2" + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" } }, "registry-url": { @@ -11012,7 +11543,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.8" + "rc": "^1.0.1" } }, "regjsgen": { @@ -11027,7 +11558,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "0.5.0" + "jsesc": "~0.5.0" } }, "release-zalgo": { @@ -11036,7 +11567,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "4.1.1" + "es6-error": "^4.0.1" } }, "remove-trailing-separator": { @@ -11061,7 +11592,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "request": { @@ -11069,26 +11600,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.7.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.2", - "safe-buffer": "5.1.2", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.3.2" + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" } }, "require-directory": { @@ -11115,8 +11646,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" }, "dependencies": { "resolve-from": { @@ -11133,7 +11664,7 @@ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", "dev": true, "requires": { - "underscore": "1.6.0" + "underscore": "~1.6.0" }, "dependencies": { "underscore": { @@ -11156,7 +11687,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "3.0.0" + "resolve-from": "^3.0.0" } }, "resolve-from": { @@ -11176,7 +11707,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "1.0.1" + "lowercase-keys": "^1.0.0" } }, "restore-cursor": { @@ -11185,8 +11716,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "ret": { @@ -11204,7 +11735,7 @@ "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "right-align": { @@ -11214,7 +11745,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -11223,7 +11754,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { @@ -11232,7 +11763,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "rxjs": { @@ -11262,7 +11793,7 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "safer-buffer": { @@ -11282,16 +11813,16 @@ "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", "dev": true, "requires": { - "chalk": "2.4.1", - "htmlparser2": "3.9.2", - "lodash.clonedeep": "4.5.0", - "lodash.escaperegexp": "4.1.2", - "lodash.isplainobject": "4.0.6", - "lodash.isstring": "4.0.1", - "lodash.mergewith": "4.6.1", - "postcss": "6.0.23", - "srcset": "1.0.0", - "xtend": "4.0.1" + "chalk": "^2.3.0", + "htmlparser2": "^3.9.0", + "lodash.clonedeep": "^4.5.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.mergewith": "^4.6.0", + "postcss": "^6.0.14", + "srcset": "^1.0.0", + "xtend": "^4.0.0" } }, "semver": { @@ -11306,7 +11837,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.5.0" + "semver": "^5.0.3" } }, "serialize-error": { @@ -11332,10 +11863,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -11343,7 +11874,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -11354,7 +11885,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -11375,13 +11906,13 @@ "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", "dev": true, "requires": { - "@sinonjs/formatio": "2.0.0", - "diff": "3.5.0", - "lodash.get": "4.4.2", - "lolex": "2.7.1", - "nise": "1.4.2", - "supports-color": "5.4.0", - "type-detect": "4.0.8" + "@sinonjs/formatio": "^2.0.0", + "diff": "^3.1.0", + "lodash.get": "^4.4.2", + "lolex": "^2.2.0", + "nise": "^1.2.0", + "supports-color": "^5.1.0", + "type-detect": "^4.0.5" } }, "slash": { @@ -11395,7 +11926,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "^2.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -11417,8 +11948,8 @@ "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.2.0.tgz", "integrity": "sha512-G5Faa3wQevGXcD5e4JKfmgofO+Fu4Jg4/nLyeZqWmBqVV0/3ORgervt3EjBi6PEFKhztPQWegZspteWnycx5dg==", "requires": { - "map-obj": "2.0.0", - "to-snake-case": "0.1.2" + "map-obj": "~2.0.0", + "to-snake-case": "~0.1.2" } }, "snakeize": { @@ -11432,14 +11963,14 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.2", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { "debug": { @@ -11455,7 +11986,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -11463,7 +11994,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -11473,9 +12004,9 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -11483,7 +12014,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -11491,7 +12022,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -11499,7 +12030,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -11507,9 +12038,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -11519,7 +12050,7 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" }, "dependencies": { "kind-of": { @@ -11527,7 +12058,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -11538,7 +12069,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "1.1.0" + "is-plain-obj": "^1.0.0" } }, "source-map": { @@ -11551,11 +12082,11 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { @@ -11564,8 +12095,8 @@ "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { - "buffer-from": "1.1.0", - "source-map": "0.6.1" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" }, "dependencies": { "source-map": { @@ -11587,8 +12118,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -11603,8 +12134,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -11618,7 +12149,7 @@ "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-2.0.0.tgz", "integrity": "sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg==", "requires": { - "is-stream-ended": "0.1.4" + "is-stream-ended": "^0.1.4" } }, "split-string": { @@ -11626,7 +12157,7 @@ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "sprintf-js": { @@ -11641,8 +12172,8 @@ "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", "dev": true, "requires": { - "array-uniq": "1.0.3", - "number-is-nan": "1.0.1" + "array-uniq": "^1.0.2", + "number-is-nan": "^1.0.0" } }, "sshpk": { @@ -11650,15 +12181,15 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.2", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "safer-buffer": "2.1.2", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" } }, "stack-utils": { @@ -11672,8 +12203,8 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -11681,7 +12212,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -11691,7 +12222,7 @@ "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.4.tgz", "integrity": "sha512-D243NJaYs/xBN2QnoiMDY7IesJFIK7gEhnvAYqJa5JvDdnh2dC4qDBwlCf0ohPpX2QRlA/4gnbnPd3rs3KxVcA==", "requires": { - "stubs": "3.0.0" + "stubs": "^3.0.0" } }, "stream-shift": { @@ -11711,14 +12242,6 @@ "integrity": "sha1-XqIRzZLSKOGEKUmQpsyXs2anfLA=", "dev": true }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "5.1.2" - } - }, "string-format-obj": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz", @@ -11730,9 +12253,9 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string.prototype.matchall": { @@ -11741,11 +12264,19 @@ "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", "dev": true, "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.12.0", - "function-bind": "1.1.1", - "has-symbols": "1.0.0", - "regexp.prototype.flags": "1.2.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.10.0", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "regexp.prototype.flags": "^1.2.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" } }, "stringifier": { @@ -11753,9 +12284,9 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.7", - "traverse": "0.6.6", - "type-name": "2.0.2" + "core-js": "^2.0.0", + "traverse": "^0.6.6", + "type-name": "^2.0.1" } }, "strip-ansi": { @@ -11763,7 +12294,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -11778,7 +12309,7 @@ "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.1" } }, "strip-eof": { @@ -11793,7 +12324,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "strip-json-comments": { @@ -11813,16 +12344,16 @@ "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.2", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.2", - "readable-stream": "2.3.6" + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" }, "dependencies": { "mime": { @@ -11839,11 +12370,11 @@ "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", "dev": true, "requires": { - "arrify": "1.0.1", - "indent-string": "3.2.0", - "js-yaml": "3.12.0", - "serialize-error": "2.1.0", - "strip-ansi": "4.0.0" + "arrify": "^1.0.1", + "indent-string": "^3.2.0", + "js-yaml": "^3.10.0", + "serialize-error": "^2.1.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -11858,7 +12389,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11869,8 +12400,8 @@ "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", "dev": true, "requires": { - "methods": "1.1.2", - "superagent": "3.8.3" + "methods": "~1.1.2", + "superagent": "^3.0.0" } }, "supports-color": { @@ -11879,7 +12410,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" }, "dependencies": { "has-flag": { @@ -11902,12 +12433,12 @@ "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "6.5.2", - "ajv-keywords": "3.2.0", - "chalk": "2.4.1", - "lodash": "4.17.10", + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ajv": { @@ -11916,10 +12447,10 @@ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" } }, "ansi-regex": { @@ -11952,8 +12483,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -11962,7 +12493,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11979,7 +12510,7 @@ "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "execa": "0.7.0" + "execa": "^0.7.0" } }, "text-encoding": { @@ -12005,8 +12536,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.6", - "xtend": "4.0.1" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, "time-zone": { @@ -12027,7 +12558,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "to-fast-properties": { @@ -12046,7 +12577,7 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -12054,7 +12585,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -12064,10 +12595,10 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -12075,8 +12606,8 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, "to-snake-case": { @@ -12100,7 +12631,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "traverse": { @@ -12131,7 +12662,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -12146,7 +12677,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "type-detect": { @@ -12173,9 +12704,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "camelcase": { @@ -12192,8 +12723,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" } }, @@ -12218,9 +12749,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -12267,10 +12798,10 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -12278,7 +12809,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -12286,10 +12817,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -12300,7 +12831,7 @@ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "crypto-random-string": "1.0.0" + "crypto-random-string": "^1.0.0" } }, "unique-temp-dir": { @@ -12309,8 +12840,8 @@ "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", "dev": true, "requires": { - "mkdirp": "0.5.1", - "os-tmpdir": "1.0.2", + "mkdirp": "^0.5.1", + "os-tmpdir": "^1.0.1", "uid2": "0.0.3" } }, @@ -12319,9 +12850,9 @@ "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", "requires": { - "array-filter": "1.0.0", + "array-filter": "^1.0.0", "indexof": "0.0.1", - "object-keys": "1.0.12" + "object-keys": "^1.0.0" } }, "universalify": { @@ -12335,8 +12866,8 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -12344,9 +12875,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -12378,16 +12909,16 @@ "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { - "boxen": "1.3.0", - "chalk": "2.4.1", - "configstore": "3.1.2", - "import-lazy": "2.1.0", - "is-ci": "1.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "uri-js": { @@ -12396,7 +12927,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "2.1.1" + "punycode": "^2.1.0" }, "dependencies": { "punycode": { @@ -12418,7 +12949,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "url-to-options": { @@ -12438,7 +12969,7 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" } }, "util-deprecate": { @@ -12457,8 +12988,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "verror": { @@ -12466,9 +12997,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" } }, "well-known-symbols": { @@ -12483,7 +13014,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -12498,7 +13029,7 @@ "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-regex": { @@ -12519,8 +13050,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -12529,7 +13060,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -12550,8 +13081,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } }, "wrappy": { @@ -12565,7 +13096,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "write-file-atomic": { @@ -12574,9 +13105,9 @@ "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" } }, "write-json-file": { @@ -12585,12 +13116,12 @@ "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", "dev": true, "requires": { - "detect-indent": "5.0.0", - "graceful-fs": "4.1.11", - "make-dir": "1.3.0", - "pify": "3.0.0", - "sort-keys": "2.0.0", - "write-file-atomic": "2.3.0" + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" }, "dependencies": { "detect-indent": { @@ -12607,8 +13138,8 @@ "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", "dev": true, "requires": { - "sort-keys": "2.0.0", - "write-json-file": "2.3.0" + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" } }, "xdg-basedir": { @@ -12643,13 +13174,13 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { - "camelcase": "2.1.1", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "os-locale": "1.4.0", - "string-width": "1.0.2", - "window-size": "0.1.4", - "y18n": "3.2.1" + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" } }, "yargs-parser": { @@ -12658,7 +13189,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { From 945421b02a3b792ab309c7ca0e540ed974df15f3 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 9 Jul 2018 23:03:53 -0700 Subject: [PATCH 0194/1029] fix: drop support for node.js 4.x and 9.x (#161) --- handwritten/logging/.circleci/config.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index d0b2a499cf7..1425175238c 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -78,13 +78,8 @@ jobs: npm install environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Run unit tests. - command: npm test - - run: - name: Submit coverage data to codecov. - command: node_modules/.bin/codecov - when: always + - run: npm test + - run: node_modules/.bin/codecov node8: docker: - image: 'node:8' @@ -183,9 +178,5 @@ jobs: user: node steps: - checkout - - run: - name: Set NPM authentication. - command: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - run: - name: Publish the module to npm. - command: npm publish + - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' + - run: npm publish From a5037f6a2d8bceb4861259e61ebd2bd68f77024a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 10 Jul 2018 08:06:48 -0700 Subject: [PATCH 0195/1029] chore(deps): lock file maintenance (#163) --- handwritten/logging/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 2bc8bfc2e1c..11cc90ea019 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -5079,9 +5079,9 @@ "dev": true }, "espurify": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", - "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.1.tgz", + "integrity": "sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==", "requires": { "core-js": "^2.0.0" } From 02c92f4f2ac5bac022295beb038ab5919cc80169 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 10 Jul 2018 09:40:46 -0700 Subject: [PATCH 0196/1029] chore(deps): lock file maintenance (#164) --- handwritten/logging/package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 11cc90ea019..5f51d1a2370 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -7983,12 +7983,12 @@ "dev": true }, "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "^3.0.0 || ^4.0.0" } }, "loud-rejection": { From 3ed0a29b3e04b4eb57fd0a5b3058bfcb500476f2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 10 Jul 2018 20:58:02 -0700 Subject: [PATCH 0197/1029] fix(deps): update dependency gcp-metadata to ^0.7.0 (#166) --- handwritten/logging/package-lock.json | 85 +++++++++++++++++++++++---- handwritten/logging/package.json | 2 +- 2 files changed, 73 insertions(+), 14 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 5f51d1a2370..315190de216 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -405,6 +405,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1215,7 +1216,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -2083,6 +2085,19 @@ "gcp-metadata": "^0.6.1", "google-auth-library": "^1.3.1", "request": "^2.79.0" + }, + "dependencies": { + "gcp-metadata": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", + "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", + "dev": true, + "requires": { + "axios": "^0.18.0", + "extend": "^3.0.1", + "retry-axios": "0.3.2" + } + } } } } @@ -2473,6 +2488,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -2484,6 +2500,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -5591,12 +5608,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5611,17 +5630,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5738,7 +5760,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5750,6 +5773,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5764,6 +5788,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5771,12 +5796,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5795,6 +5822,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5875,7 +5903,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5887,6 +5916,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6008,6 +6038,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6098,9 +6129,9 @@ "dev": true }, "gcp-metadata": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", - "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.7.0.tgz", + "integrity": "sha512-ffjC09amcDWjh3VZdkDngIo7WoluyC5Ag9PAYxZbmQLOLNI8lvPtoKTSCyU54j2gwy5roZh6sSMTfkY2ct7K3g==", "requires": { "axios": "^0.18.0", "extend": "^3.0.1", @@ -6271,6 +6302,18 @@ "lodash.isstring": "^4.0.1", "lru-cache": "^4.1.3", "retry-axios": "^0.3.2" + }, + "dependencies": { + "gcp-metadata": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", + "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", + "requires": { + "axios": "^0.18.0", + "extend": "^3.0.1", + "retry-axios": "0.3.2" + } + } } }, "google-auto-auth": { @@ -6283,6 +6326,19 @@ "gcp-metadata": "^0.6.1", "google-auth-library": "^1.3.1", "request": "^2.79.0" + }, + "dependencies": { + "gcp-metadata": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", + "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", + "dev": true, + "requires": { + "axios": "^0.18.0", + "extend": "^3.0.1", + "retry-axios": "0.3.2" + } + } } }, "google-gax": { @@ -7980,7 +8036,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.4.0", @@ -8570,6 +8627,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9512,7 +9570,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "lru-cache": { "version": "4.1.3", diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 768425a2467..351443074dd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -67,7 +67,7 @@ "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.1", - "gcp-metadata": "^0.6.3", + "gcp-metadata": "^0.7.0", "google-auth-library": "^1.6.0", "google-gax": "^0.17.1", "google-proto-files": "^0.16.1", From 71a9ba2609e52704e76fe76d3751aba0608f7be3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 16 Jul 2018 19:09:47 -0700 Subject: [PATCH 0198/1029] chore(deps): lock file maintenance (#168) --- handwritten/logging/package-lock.json | 1431 ++++++++++++++++++------- 1 file changed, 1055 insertions(+), 376 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 315190de216..f19851c3fb9 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -316,25 +316,25 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.0.tgz", - "integrity": "sha512-c8dIGESnNkmM88duFxGHvMQP5QKPgp/sfJq0QhC6+gOcJC7/PKjqd0PkmgPPeIgVl6SXy5Zf/KLbxnJUVgNT1Q==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.1.tgz", + "integrity": "sha512-yIOn92sjHwpF/eORQWjv7QzQPcESSRCsZshdmeX40RGRlB0+HPODRDghZq0GiCqe6zpIYZvKmiKiYd3u52P/7Q==", "dev": true, "requires": { "ava": "0.25.0", "colors": "1.1.2", "fs-extra": "5.0.0", - "got": "8.2.0", + "got": "8.3.0", "handlebars": "4.0.11", "lodash": "4.17.5", - "nyc": "11.4.1", + "nyc": "11.7.2", "proxyquire": "1.8.0", "semver": "^5.5.0", - "sinon": "4.3.0", + "sinon": "6.0.1", "string": "3.3.3", - "supertest": "3.0.0", + "supertest": "3.1.0", "yargs": "11.0.0", - "yargs-parser": "9.0.2" + "yargs-parser": "10.1.0" }, "dependencies": { "ansi-regex": { @@ -343,6 +343,12 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -367,37 +373,37 @@ "dev": true }, "nyc": { - "version": "11.4.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", - "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", + "version": "11.7.2", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.2.tgz", + "integrity": "sha512-gBt7qwsR1vryYfglVjQRx1D+AtMZW5NbUKxb+lZe8SN8KsheGCPGWEsSC9AGQG+r2+te1+10uPHUCahuqm1nGQ==", "dev": true, "requires": { "archy": "^1.0.0", "arrify": "^1.0.1", "caching-transform": "^1.0.0", - "convert-source-map": "^1.3.0", + "convert-source-map": "^1.5.1", "debug-log": "^1.0.1", "default-require-extensions": "^1.0.0", "find-cache-dir": "^0.1.1", "find-up": "^2.1.0", "foreground-child": "^1.5.3", "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.1.2", "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.9.1", - "istanbul-lib-report": "^1.1.2", - "istanbul-lib-source-maps": "^1.2.2", - "istanbul-reports": "^1.1.3", + "istanbul-lib-instrument": "^1.10.0", + "istanbul-lib-report": "^1.1.3", + "istanbul-lib-source-maps": "^1.2.3", + "istanbul-reports": "^1.4.0", "md5-hex": "^1.2.0", - "merge-source-map": "^1.0.2", - "micromatch": "^2.3.11", + "merge-source-map": "^1.1.0", + "micromatch": "^3.1.10", "mkdirp": "^0.5.0", "resolve-from": "^2.0.0", - "rimraf": "^2.5.4", + "rimraf": "^2.6.2", "signal-exit": "^3.0.1", "spawn-wrap": "^1.4.2", - "test-exclude": "^4.1.1", - "yargs": "^10.0.3", + "test-exclude": "^4.2.0", + "yargs": "11.1.0", "yargs-parser": "^8.0.0" }, "dependencies": { @@ -405,7 +411,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -441,20 +446,22 @@ "dev": true }, "arr-diff": { - "version": "2.0.0", + "version": "4.0.0", "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } + "dev": true }, "arr-flatten": { "version": "1.1.0", "bundled": true, "dev": true }, + "arr-union": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, "array-unique": { - "version": "0.2.1", + "version": "0.3.2", "bundled": true, "dev": true }, @@ -463,11 +470,21 @@ "bundled": true, "dev": true }, + "assign-symbols": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, "async": { "version": "1.5.2", "bundled": true, "dev": true }, + "atob": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, "babel-code-frame": { "version": "6.26.0", "bundled": true, @@ -479,7 +496,7 @@ } }, "babel-generator": { - "version": "6.26.0", + "version": "6.26.1", "bundled": true, "dev": true, "requires": { @@ -489,7 +506,7 @@ "detect-indent": "^4.0.0", "jsesc": "^1.3.0", "lodash": "^4.17.4", - "source-map": "^0.5.6", + "source-map": "^0.5.7", "trim-right": "^1.0.1" } }, @@ -559,8 +576,63 @@ "bundled": true, "dev": true }, + "base": { + "version": "0.11.2", + "bundled": true, + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "brace-expansion": { - "version": "1.1.8", + "version": "1.1.11", "bundled": true, "dev": true, "requires": { @@ -569,13 +641,30 @@ } }, "braces": { - "version": "1.8.5", + "version": "2.3.2", "bundled": true, "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "builtin-modules": { @@ -583,6 +672,22 @@ "bundled": true, "dev": true }, + "cache-base": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, "caching-transform": { "version": "1.0.1", "bundled": true, @@ -621,6 +726,27 @@ "supports-color": "^2.0.0" } }, + "class-utils": { + "version": "0.3.6", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "cliui": { "version": "2.1.0", "bundled": true, @@ -645,11 +771,25 @@ "bundled": true, "dev": true }, + "collection-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, "commondir": { "version": "1.0.1", "bundled": true, "dev": true }, + "component-emitter": { + "version": "1.2.1", + "bundled": true, + "dev": true + }, "concat-map": { "version": "0.0.1", "bundled": true, @@ -660,8 +800,13 @@ "bundled": true, "dev": true }, + "copy-descriptor": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "core-js": { - "version": "2.5.3", + "version": "2.5.6", "bundled": true, "dev": true }, @@ -692,6 +837,11 @@ "bundled": true, "dev": true }, + "decode-uri-component": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, "default-require-extensions": { "version": "1.0.0", "bundled": true, @@ -700,6 +850,48 @@ "strip-bom": "^2.0.0" } }, + "define-property": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "detect-indent": { "version": "4.0.0", "bundled": true, @@ -753,44 +945,139 @@ } }, "expand-brackets": { - "version": "0.1.5", + "version": "2.1.4", "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "expand-range": { - "version": "1.8.2", + "extend-shallow": { + "version": "3.0.2", "bundled": true, "dev": true, "requires": { - "fill-range": "^2.1.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } } }, "extglob": { - "version": "0.3.2", + "version": "2.0.4", "bundled": true, "dev": true, "requires": { - "is-extglob": "^1.0.0" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, - "filename-regex": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, "fill-range": { - "version": "2.2.3", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "find-cache-dir": { @@ -816,21 +1103,21 @@ "bundled": true, "dev": true }, - "for-own": { - "version": "0.1.5", + "foreground-child": { + "version": "1.5.6", "bundled": true, "dev": true, "requires": { - "for-in": "^1.0.1" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, - "foreground-child": { - "version": "1.5.6", + "fragment-cache": { + "version": "0.2.1", "bundled": true, "dev": true, "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" + "map-cache": "^0.2.2" } }, "fs.realpath": { @@ -848,6 +1135,11 @@ "bundled": true, "dev": true }, + "get-value": { + "version": "2.0.6", + "bundled": true, + "dev": true + }, "glob": { "version": "7.1.2", "bundled": true, @@ -861,23 +1153,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-base": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, "globals": { "version": "9.18.0", "bundled": true, @@ -922,32 +1197,61 @@ "bundled": true, "dev": true }, - "hosted-git-info": { - "version": "2.5.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", + "has-value": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, - "inherits": { - "version": "2.0.3", + "has-values": { + "version": "1.0.0", "bundled": true, - "dev": true - }, + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hosted-git-info": { + "version": "2.6.0", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, "invariant": { - "version": "2.2.2", + "version": "2.2.4", "bundled": true, "dev": true, "requires": { @@ -959,6 +1263,14 @@ "bundled": true, "dev": true }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, "is-arrayish": { "version": "0.2.1", "bundled": true, @@ -977,17 +1289,29 @@ "builtin-modules": "^1.0.0" } }, - "is-dotfile": { - "version": "1.0.3", + "is-data-descriptor": { + "version": "0.1.4", "bundled": true, - "dev": true + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } }, - "is-equal-shallow": { - "version": "0.1.3", + "is-descriptor": { + "version": "0.1.6", "bundled": true, "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } } }, "is-extendable": { @@ -995,11 +1319,6 @@ "bundled": true, "dev": true }, - "is-extglob": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "is-finite": { "version": "1.0.2", "bundled": true, @@ -1009,39 +1328,41 @@ } }, "is-fullwidth-code-point": { - "version": "1.0.0", + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-number": { + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "kind-of": "^3.0.2" } }, - "is-glob": { - "version": "2.0.1", + "is-odd": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "bundled": true, + "dev": true + } } }, - "is-number": { - "version": "2.1.0", + "is-plain-object": { + "version": "2.0.4", "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "isobject": "^3.0.1" } }, - "is-posix-bracket": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, "is-stream": { "version": "1.1.0", "bundled": true, @@ -1052,6 +1373,11 @@ "bundled": true, "dev": true }, + "is-windows": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, "isarray": { "version": "1.0.0", "bundled": true, @@ -1063,15 +1389,12 @@ "dev": true }, "isobject": { - "version": "2.1.0", + "version": "3.0.1", "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } + "dev": true }, "istanbul-lib-coverage": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "dev": true }, @@ -1084,7 +1407,7 @@ } }, "istanbul-lib-instrument": { - "version": "1.9.1", + "version": "1.10.1", "bundled": true, "dev": true, "requires": { @@ -1093,16 +1416,16 @@ "babel-traverse": "^6.18.0", "babel-types": "^6.18.0", "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.2.0", "semver": "^5.3.0" } }, "istanbul-lib-report": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.1.2", "mkdirp": "^0.5.1", "path-parse": "^1.0.5", "supports-color": "^3.1.2" @@ -1119,12 +1442,12 @@ } }, "istanbul-lib-source-maps": { - "version": "1.2.2", + "version": "1.2.3", "bundled": true, "dev": true, "requires": { "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.1.2", "mkdirp": "^0.5.1", "rimraf": "^2.6.1", "source-map": "^0.5.3" @@ -1141,7 +1464,7 @@ } }, "istanbul-reports": { - "version": "1.1.3", + "version": "1.4.0", "bundled": true, "dev": true, "requires": { @@ -1209,15 +1532,14 @@ } }, "lodash": { - "version": "4.17.4", + "version": "4.17.10", "bundled": true, "dev": true }, "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.3.1", @@ -1228,7 +1550,7 @@ } }, "lru-cache": { - "version": "4.1.1", + "version": "4.1.3", "bundled": true, "dev": true, "requires": { @@ -1236,6 +1558,19 @@ "yallist": "^2.1.2" } }, + "map-cache": { + "version": "0.2.2", + "bundled": true, + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, "md5-hex": { "version": "1.3.0", "bundled": true, @@ -1258,35 +1593,49 @@ } }, "merge-source-map": { - "version": "1.0.4", + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } } }, "micromatch": { - "version": "2.3.11", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "version": "3.1.10", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, "mimic-fn": { - "version": "1.1.0", + "version": "1.2.0", "bundled": true, "dev": true }, @@ -1303,6 +1652,25 @@ "bundled": true, "dev": true }, + "mixin-deep": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.1", "bundled": true, @@ -1316,6 +1684,32 @@ "bundled": true, "dev": true }, + "nanomatch": { + "version": "1.2.9", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "normalize-package-data": { "version": "2.4.0", "bundled": true, @@ -1327,14 +1721,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "normalize-path": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, "npm-run-path": { "version": "2.0.2", "bundled": true, @@ -1353,13 +1739,40 @@ "bundled": true, "dev": true }, - "object.omit": { - "version": "2.0.1", + "object-copy": { + "version": "0.1.0", "bundled": true, "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isobject": "^3.0.1" } }, "once": { @@ -1400,9 +1813,12 @@ "dev": true }, "p-limit": { - "version": "1.1.0", + "version": "1.2.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "p-try": "^1.0.0" + } }, "p-locate": { "version": "2.0.0", @@ -1412,16 +1828,10 @@ "p-limit": "^1.1.0" } }, - "parse-glob": { - "version": "3.0.4", + "p-try": { + "version": "1.0.0", "bundled": true, - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } + "dev": true }, "parse-json": { "version": "2.2.0", @@ -1431,6 +1841,11 @@ "error-ex": "^1.2.0" } }, + "pascalcase": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "path-exists": { "version": "2.1.0", "bundled": true, @@ -1501,8 +1916,8 @@ } } }, - "preserve": { - "version": "0.2.0", + "posix-character-classes": { + "version": "0.1.1", "bundled": true, "dev": true }, @@ -1511,43 +1926,6 @@ "bundled": true, "dev": true }, - "randomatic": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "read-pkg": { "version": "1.1.0", "bundled": true, @@ -1583,19 +1961,15 @@ "bundled": true, "dev": true }, - "regex-cache": { - "version": "0.4.4", + "regex-not": { + "version": "1.0.2", "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, - "remove-trailing-separator": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, "repeat-element": { "version": "1.1.2", "bundled": true, @@ -1629,6 +2003,16 @@ "bundled": true, "dev": true }, + "resolve-url": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "ret": { + "version": "0.1.15", + "bundled": true, + "dev": true + }, "right-align": { "version": "0.1.3", "bundled": true, @@ -1646,8 +2030,16 @@ "glob": "^7.0.5" } }, + "safe-regex": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, "semver": { - "version": "5.4.1", + "version": "5.5.0", "bundled": true, "dev": true }, @@ -1656,31 +2048,161 @@ "bundled": true, "dev": true }, - "shebang-command": { - "version": "1.2.0", + "set-value": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", "bundled": true, "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "kind-of": "^3.2.0" } }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", + "source-map": { + "version": "0.5.7", "bundled": true, "dev": true }, - "slide": { - "version": "1.1.6", + "source-map-resolve": { + "version": "0.5.1", "bundled": true, - "dev": true + "dev": true, + "requires": { + "atob": "^2.0.0", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } }, - "source-map": { - "version": "0.5.7", + "source-map-url": { + "version": "0.4.0", "bundled": true, "dev": true }, @@ -1698,23 +2220,60 @@ } }, "spdx-correct": { - "version": "1.0.2", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "^1.0.2" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", + "spdx-exceptions": { + "version": "2.1.0", "bundled": true, "dev": true }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "spdx-license-ids": { - "version": "1.2.2", + "version": "3.0.0", "bundled": true, "dev": true }, + "split-string": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "static-extend": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "string-width": { "version": "2.1.1", "bundled": true, @@ -1729,11 +2288,6 @@ "bundled": true, "dev": true }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, "strip-ansi": { "version": "4.0.0", "bundled": true, @@ -1771,12 +2325,12 @@ "dev": true }, "test-exclude": { - "version": "4.1.1", + "version": "4.2.1", "bundled": true, "dev": true, "requires": { "arrify": "^1.0.1", - "micromatch": "^2.3.11", + "micromatch": "^3.1.8", "object-assign": "^4.1.0", "read-pkg-up": "^1.0.1", "require-main-filename": "^1.0.1" @@ -1787,6 +2341,34 @@ "bundled": true, "dev": true }, + "to-object-path": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, "trim-right": { "version": "1.0.1", "bundled": true, @@ -1823,13 +2405,101 @@ "dev": true, "optional": true }, + "union-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unset-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "bundled": true, + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "bundled": true, + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "bundled": true, + "dev": true + }, + "use": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "validate-npm-package-license": { - "version": "3.0.1", + "version": "3.0.3", "bundled": true, "dev": true, "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "which": { @@ -1865,6 +2535,14 @@ "strip-ansi": "^3.0.1" }, "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, "string-width": { "version": "1.0.2", "bundled": true, @@ -1903,11 +2581,11 @@ "dev": true }, "yargs": { - "version": "10.0.3", + "version": "11.1.0", "bundled": true, "dev": true, "requires": { - "cliui": "^3.2.0", + "cliui": "^4.0.0", "decamelize": "^1.1.1", "find-up": "^2.1.0", "get-caller-file": "^1.0.1", @@ -1918,35 +2596,49 @@ "string-width": "^2.0.0", "which-module": "^2.0.0", "y18n": "^3.2.1", - "yargs-parser": "^8.0.0" + "yargs-parser": "^9.0.2" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, "cliui": { - "version": "3.2.0", + "version": "4.1.0", "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "yargs-parser": { + "version": "9.0.2", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "^4.1.0" } } } }, "yargs-parser": { - "version": "8.0.0", + "version": "8.1.0", "bundled": true, "dev": true, "requires": { @@ -2021,6 +2713,17 @@ "which-module": "^2.0.0", "y18n": "^3.2.1", "yargs-parser": "^9.0.2" + }, + "dependencies": { + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } } } } @@ -2085,23 +2788,21 @@ "gcp-metadata": "^0.6.1", "google-auth-library": "^1.3.1", "request": "^2.79.0" - }, - "dependencies": { - "gcp-metadata": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", - "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", - "dev": true, - "requires": { - "axios": "^0.18.0", - "extend": "^3.0.1", - "retry-axios": "0.3.2" - } - } } } } }, + "gcp-metadata": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", + "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", + "dev": true, + "requires": { + "axios": "^0.18.0", + "extend": "^3.0.1", + "retry-axios": "0.3.2" + } + }, "google-gax": { "version": "0.16.1", "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", @@ -2417,9 +3118,9 @@ } }, "@types/lodash": { - "version": "4.14.111", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.111.tgz", - "integrity": "sha512-t2FwnkdqdZNYPJHTEF+Zf//j5d2I7UbM2Ng+vqqmUCE2RuiVVINJi9RlVdpKvqPqVItsJa0X+ra/tvmwLzlcgg==" + "version": "4.14.112", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.112.tgz", + "integrity": "sha512-jDD7sendv3V7iwyRXSlECOR8HCtMN2faVA9ngLdHHihSVIwY7nbfsKl2kA6fimUDU1i5l/zgpG3aevwWnN3zCQ==" }, "@types/long": { "version": "3.0.32", @@ -2488,7 +3189,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -2500,7 +3200,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -4142,9 +4841,9 @@ }, "dependencies": { "mime-db": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.34.0.tgz", - "integrity": "sha1-RS0Oz/XDA0am3B5kseruDTcZ/5o=", + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", "dev": true } } @@ -4788,9 +5487,9 @@ "dev": true }, "escodegen": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz", - "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", + "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", "dev": true, "requires": { "esprima": "^3.1.3", @@ -5090,9 +5789,9 @@ } }, "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "espurify": { @@ -5608,14 +6307,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5630,20 +6327,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -5760,8 +6454,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -5773,7 +6466,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5788,7 +6480,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5796,14 +6487,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5822,7 +6511,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -5903,8 +6591,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -5916,7 +6603,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6038,7 +6724,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6152,9 +6837,9 @@ } }, "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, "get-port": { @@ -6379,9 +7064,9 @@ } }, "got": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/got/-/got-8.2.0.tgz", - "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.0.tgz", + "integrity": "sha512-kBNy/S2CGwrYgDSec5KTWGKUvupwkkTVAjIsVFF2shXO13xpZdFP4d4kxa//CLX2tN/rV0aYwK8vY6UKWGn2vQ==", "dev": true, "requires": { "@sindresorhus/is": "^0.7.0", @@ -6394,7 +7079,7 @@ "isurl": "^1.0.0-alpha5", "lowercase-keys": "^1.0.0", "mimic-response": "^1.0.0", - "p-cancelable": "^0.3.0", + "p-cancelable": "^0.4.0", "p-timeout": "^2.0.1", "pify": "^3.0.0", "safe-buffer": "^5.1.1", @@ -8036,8 +8721,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.4.0", @@ -8348,9 +9032,9 @@ "dev": true }, "mimic-response": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", - "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true }, "minimatch": { @@ -8627,7 +9311,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9570,8 +10253,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "lru-cache": { "version": "4.1.3", @@ -10823,9 +11505,9 @@ "dev": true }, "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", "dev": true }, "p-defer": { @@ -11960,18 +12642,18 @@ "dev": true }, "sinon": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.3.0.tgz", - "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.0.1.tgz", + "integrity": "sha512-rfszhNcfamK2+ofIPi9XqeH89pH7KGDcAtM+F9CsjHXOK3jzWG99vyhyD2V+r7s4IipmWcWUFYq4ftZ9/Eu2Wg==", "dev": true, "requires": { "@sinonjs/formatio": "^2.0.0", - "diff": "^3.1.0", + "diff": "^3.5.0", "lodash.get": "^4.4.2", - "lolex": "^2.2.0", - "nise": "^1.2.0", - "supports-color": "^5.1.0", - "type-detect": "^4.0.5" + "lolex": "^2.4.2", + "nise": "^1.3.3", + "supports-color": "^5.4.0", + "type-detect": "^4.0.8" } }, "slash": { @@ -12398,9 +13080,9 @@ "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=" }, "superagent": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", - "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", + "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", "dev": true, "requires": { "component-emitter": "^1.2.0", @@ -12408,11 +13090,11 @@ "debug": "^3.1.0", "extend": "^3.0.0", "form-data": "^2.3.1", - "formidable": "^1.2.0", + "formidable": "^1.1.1", "methods": "^1.1.1", "mime": "^1.4.1", "qs": "^6.5.1", - "readable-stream": "^2.3.5" + "readable-stream": "^2.0.5" }, "dependencies": { "mime": { @@ -12454,13 +13136,13 @@ } }, "supertest": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.0.0.tgz", - "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.1.0.tgz", + "integrity": "sha512-O44AMnmJqx294uJQjfUmEyYOg7d9mylNFsMw/Wkz4evKd1njyPrtCN+U6ZIC7sKtfEVQhfTqFFijlXx8KP/Czw==", "dev": true, "requires": { "methods": "~1.1.2", - "superagent": "^3.0.0" + "superagent": "3.8.2" } }, "supports-color": { @@ -13024,12 +13706,9 @@ "dev": true }, "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", - "requires": { - "kind-of": "^6.0.2" - } + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "util-deprecate": { "version": "1.0.2", @@ -13243,9 +13922,9 @@ } }, "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", "dev": true, "requires": { "camelcase": "^4.1.0" From f5409d58b43d599b072a1a3f29db84f50909f579 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 18 Jul 2018 00:58:26 -0700 Subject: [PATCH 0199/1029] test: use strictEqual in tests (#170) --- handwritten/logging/test/gapic-v2.js | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 674536c2c0a..23b18a03465 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -66,7 +66,7 @@ describe('LoggingServiceV2Client', () => { client.deleteLog(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -122,7 +122,7 @@ describe('LoggingServiceV2Client', () => { client.writeLogEntries(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -189,7 +189,7 @@ describe('LoggingServiceV2Client', () => { client.listLogEntries(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -250,7 +250,7 @@ describe('LoggingServiceV2Client', () => { client.listMonitoredResourceDescriptors(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -313,7 +313,7 @@ describe('LoggingServiceV2Client', () => { client.listLogs(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -377,7 +377,7 @@ describe('ConfigServiceV2Client', () => { client.listSinks(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -445,7 +445,7 @@ describe('ConfigServiceV2Client', () => { client.getSink(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -517,7 +517,7 @@ describe('ConfigServiceV2Client', () => { client.createSink(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -589,7 +589,7 @@ describe('ConfigServiceV2Client', () => { client.updateSink(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -639,7 +639,7 @@ describe('ConfigServiceV2Client', () => { client.deleteSink(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -705,7 +705,7 @@ describe('ConfigServiceV2Client', () => { client.listExclusions(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -771,7 +771,7 @@ describe('ConfigServiceV2Client', () => { client.getExclusion(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -841,7 +841,7 @@ describe('ConfigServiceV2Client', () => { client.createExclusion(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -915,7 +915,7 @@ describe('ConfigServiceV2Client', () => { client.updateExclusion(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -965,7 +965,7 @@ describe('ConfigServiceV2Client', () => { client.deleteExclusion(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -1032,7 +1032,7 @@ describe('MetricsServiceV2Client', () => { client.listLogMetrics(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -1098,7 +1098,7 @@ describe('MetricsServiceV2Client', () => { client.getLogMetric(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -1168,7 +1168,7 @@ describe('MetricsServiceV2Client', () => { client.createLogMetric(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -1238,7 +1238,7 @@ describe('MetricsServiceV2Client', () => { client.updateLogMetric(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -1288,7 +1288,7 @@ describe('MetricsServiceV2Client', () => { client.deleteLogMetric(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); From 191c69062501117e0ea57b7771608673179bc49b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 18 Jul 2018 11:19:55 -0700 Subject: [PATCH 0200/1029] chore(deps): update dependency eslint-plugin-node to v7 (#169) --- handwritten/logging/package-lock.json | 79 +++++++++++++++++++++------ handwritten/logging/package.json | 2 +- 2 files changed, 64 insertions(+), 17 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index f19851c3fb9..97634776061 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -411,6 +411,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1539,7 +1540,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -3189,6 +3191,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -3200,6 +3203,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -5650,18 +5654,44 @@ } } }, + "eslint-plugin-es": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", + "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", + "dev": true, + "requires": { + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.0" + }, + "dependencies": { + "regexpp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", + "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", + "dev": true + } + } + }, "eslint-plugin-node": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", - "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", + "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", "dev": true, "requires": { - "ignore": "^3.3.6", + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", "minimatch": "^3.0.4", - "resolve": "^1.3.3", - "semver": "^5.4.1" + "resolve": "^1.8.1", + "semver": "^5.5.0" }, "dependencies": { + "ignore": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", + "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", + "dev": true + }, "resolve": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", @@ -6307,12 +6337,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6327,17 +6359,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -6454,7 +6489,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6466,6 +6502,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6480,6 +6517,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6487,12 +6525,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6511,6 +6551,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6591,7 +6632,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6603,6 +6645,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6724,6 +6767,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8721,7 +8765,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.4.0", @@ -9311,6 +9356,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -10253,7 +10299,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "lru-cache": { "version": "4.1.3", diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 351443074dd..d405127e2e2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -88,7 +88,7 @@ "codecov": "^3.0.2", "eslint": "^5.0.0", "eslint-config-prettier": "^2.9.0", - "eslint-plugin-node": "^6.0.1", + "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.6.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", From cd65f21bc68dfb5d0bb243efaf09c209be44895d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 24 Jul 2018 10:04:35 -0700 Subject: [PATCH 0201/1029] chore(deps): lock file maintenance (#171) --- handwritten/logging/package-lock.json | 112 ++++++++++---------------- 1 file changed, 41 insertions(+), 71 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 97634776061..e5d48f09293 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -316,9 +316,9 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.1.tgz", - "integrity": "sha512-yIOn92sjHwpF/eORQWjv7QzQPcESSRCsZshdmeX40RGRlB0+HPODRDghZq0GiCqe6zpIYZvKmiKiYd3u52P/7Q==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.2.tgz", + "integrity": "sha512-Zah0wZcVifSpKIy5ulTFyGpHYAA8h/biYy8X7J2UvaXga5XlyruKrXo2K1VmBxB9MDPXa0Duz8M003pe2Ras3w==", "dev": true, "requires": { "ava": "0.25.0", @@ -411,7 +411,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1540,8 +1539,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.3.1", @@ -3125,9 +3123,9 @@ "integrity": "sha512-jDD7sendv3V7iwyRXSlECOR8HCtMN2faVA9ngLdHHihSVIwY7nbfsKl2kA6fimUDU1i5l/zgpG3aevwWnN3zCQ==" }, "@types/long": { - "version": "3.0.32", - "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", - "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { "version": "10.5.2", @@ -3191,7 +3189,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -3203,7 +3200,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -4842,14 +4838,6 @@ "dev": true, "requires": { "mime-db": ">= 1.34.0 < 2" - }, - "dependencies": { - "mime-db": { - "version": "1.35.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", - "dev": true - } } }, "concat-map": { @@ -5531,9 +5519,9 @@ } }, "eslint": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.1.0.tgz", - "integrity": "sha512-DyH6JsoA1KzA5+OSWFjg56DFJT+sDLO0yokaPZ9qY0UEmYrPA1gEX/G1MnVkmRDsksG4H1foIVz2ZXXM3hHYvw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.2.0.tgz", + "integrity": "sha512-zlggW1qp7/TBjwLfouRoY7eWXrXwJZFqCdIxxh0/LVB/QuuKuIMkzyUZEcDo6LBadsry5JcEMxIqd3H/66CXVg==", "dev": true, "requires": { "ajv": "^6.5.0", @@ -5552,7 +5540,7 @@ "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", "globals": "^11.7.0", - "ignore": "^3.3.3", + "ignore": "^4.0.2", "imurmurhash": "^0.1.4", "inquirer": "^5.2.0", "is-resolvable": "^1.1.0", @@ -5620,6 +5608,12 @@ "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, + "ignore": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", + "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -5987,9 +5981,9 @@ } }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extend-shallow": { "version": "3.0.2", @@ -6337,14 +6331,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6359,20 +6351,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -6489,8 +6478,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -6502,7 +6490,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6517,7 +6504,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6525,14 +6511,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6551,7 +6535,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6632,8 +6615,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -6645,7 +6627,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6767,7 +6748,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8765,8 +8745,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.4.0", @@ -9058,16 +9037,16 @@ "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" }, "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" }, "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", "requires": { - "mime-db": "~1.33.0" + "mime-db": "~1.35.0" } }, "mimic-fn": { @@ -9356,7 +9335,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -10299,8 +10277,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "lru-cache": { "version": "4.1.3", @@ -12042,9 +12019,9 @@ "dev": true }, "protobufjs": { - "version": "6.8.6", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", - "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", + "version": "6.8.8", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", + "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -12056,16 +12033,9 @@ "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", - "@types/long": "^3.0.32", - "@types/node": "^8.9.4", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", "long": "^4.0.0" - }, - "dependencies": { - "@types/node": { - "version": "8.10.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz", - "integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w==" - } } }, "proxyquire": { From 26b499d57c39184dcee15797dfd13c49db5a9f07 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 24 Jul 2018 10:17:41 -0700 Subject: [PATCH 0202/1029] chore(deps): lock file maintenance (#173) --- handwritten/logging/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index e5d48f09293..9e40c131f8c 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -3118,9 +3118,9 @@ } }, "@types/lodash": { - "version": "4.14.112", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.112.tgz", - "integrity": "sha512-jDD7sendv3V7iwyRXSlECOR8HCtMN2faVA9ngLdHHihSVIwY7nbfsKl2kA6fimUDU1i5l/zgpG3aevwWnN3zCQ==" + "version": "4.14.113", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.113.tgz", + "integrity": "sha512-CINMgfKUnif7fWBqPuGUsZrkER8jGU+ufyhD7FuotPqC1rRViHOJVgPuanN2Y8Vv1TqRnHDKlMnyEQLNq9eMjA==" }, "@types/long": { "version": "4.0.0", From c23ba39cc67601748cc3b8d1dcb1e3f3ba100c6b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 25 Jul 2018 12:40:10 -0700 Subject: [PATCH 0203/1029] fix: get eslint passing (#174) --- handwritten/logging/system-test/logging.js | 19 ++++++--- handwritten/logging/test/entry.js | 8 ++-- handwritten/logging/test/index.js | 49 ++++++++++++---------- handwritten/logging/test/log.js | 32 +++++++------- handwritten/logging/test/metadata.js | 10 ++--- handwritten/logging/test/sink.js | 10 ++--- 6 files changed, 69 insertions(+), 59 deletions(-) diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index a1ab1407da9..06b405eb829 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -393,7 +393,7 @@ describe('Logging', function() { function(err, entries) { assert.ifError(err); - assert.deepEqual(entries.map(prop('data')).reverse(), [ + assert.deepStrictEqual(entries.map(prop('data')).reverse(), [ 'log entry 1', { delegate: 'my_username', @@ -436,7 +436,11 @@ describe('Logging', function() { }, function(err, entries) { assert.ifError(err); - assert.deepEqual(entries.map(prop('data')), ['3', '2', '1']); + assert.deepStrictEqual(entries.map(prop('data')), [ + '3', + '2', + '1', + ]); done(); } ); @@ -460,7 +464,10 @@ describe('Logging', function() { }, function(err, entries) { assert.ifError(err); - assert.deepEqual(entries.reverse().map(prop('data')), messages); + assert.deepStrictEqual( + entries.reverse().map(prop('data')), + messages + ); done(); } ); @@ -489,7 +496,7 @@ describe('Logging', function() { var entry = entries[0]; - assert.deepEqual(entry.data, { + assert.deepStrictEqual(entry.data, { when: logEntry.data.when.toString(), matchUser: logEntry.data.matchUser.toString(), matchUserError: logEntry.data.matchUserError.toString(), @@ -528,7 +535,7 @@ describe('Logging', function() { var entry = entries[0]; assert.strictEqual(entry.metadata.severity, metadata.severity); - assert.deepEqual(entry.data, data); + assert.deepStrictEqual(entry.data, data); done(); } @@ -556,7 +563,7 @@ describe('Logging', function() { var entry = entries[0]; assert.strictEqual(entry.data, text); - assert.deepEqual(entry.metadata.resource, { + assert.deepStrictEqual(entry.metadata.resource, { type: 'global', labels: { project_id: PROJECT_ID, diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 9ef4aad6f64..3e0fc7ed4d7 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -139,7 +139,7 @@ describe('Entry', function() { assert.strictEqual(entry.metadata.resource, RESOURCE); assert.strictEqual(entry.data, DATA); assert.strictEqual(entry.metadata.extraProperty, true); - assert.deepEqual(entry.metadata.timestamp, date); + assert.deepStrictEqual(entry.metadata.timestamp, date); }); it('should extend the entry with proto data', function() { @@ -178,7 +178,7 @@ describe('Entry', function() { var entryBefore = extend(true, {}, entry); entry.toJSON(); var entryAfter = extend(true, {}, entry); - assert.deepEqual(entryBefore, entryAfter); + assert.deepStrictEqual(entryBefore, entryAfter); }); it('should convert data as a struct and assign to jsonPayload', function() { @@ -187,7 +187,7 @@ describe('Entry', function() { FakeGrpcService.objToStruct_ = function(obj, options) { assert.strictEqual(obj, input); - assert.deepEqual(options, { + assert.deepStrictEqual(options, { removeCircular: false, stringify: true, }); @@ -224,7 +224,7 @@ describe('Entry', function() { var seconds = date.getTime() / 1000; var secondsRounded = Math.floor(seconds); - assert.deepEqual(json.timestamp, { + assert.deepStrictEqual(json.timestamp, { seconds: secondsRounded, nanos: Math.floor((seconds - secondsRounded) * 1e9), }); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 8cd0fffcde9..c495767136a 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -36,7 +36,7 @@ var fakePaginator = { extended = true; methods = arrify(methods); - assert.deepEqual(methods, ['getEntries', 'getSinks']); + assert.deepStrictEqual(methods, ['getEntries', 'getSinks']); }, streamify: function(methodName) { return methodName; @@ -65,7 +65,12 @@ var fakeUtil = extend({}, util, { } promisifed = true; - assert.deepEqual(options.exclude, ['entry', 'log', 'request', 'sink']); + assert.deepStrictEqual(options.exclude, [ + 'entry', + 'log', + 'request', + 'sink', + ]); }, replaceProjectIdToken: function(reqOpts) { if (replaceProjectIdTokenOverride) { @@ -174,7 +179,7 @@ describe('Logging', function() { }); it('should initialize the API object', function() { - assert.deepEqual(logging.api, {}); + assert.deepStrictEqual(logging.api, {}); }); it('should cache a local GoogleAuth instance', function() { @@ -185,7 +190,7 @@ describe('Logging', function() { }; googleAuthOverride = function(options_) { - assert.deepEqual( + assert.deepStrictEqual( options_, extend( { @@ -213,7 +218,7 @@ describe('Logging', function() { assert.notStrictEqual(logging.options, options); - assert.deepEqual( + assert.deepStrictEqual( logging.options, extend( { @@ -331,7 +336,7 @@ describe('Logging', function() { var expectedParent = 'projects/' + logging.projectId; assert.strictEqual(config.reqOpts.parent, expectedParent); - assert.deepEqual(config.reqOpts.sink, expectedConfig); + assert.deepStrictEqual(config.reqOpts.sink, expectedConfig); assert.strictEqual(config.gaxOpts, undefined); @@ -426,7 +431,7 @@ describe('Logging', function() { describe('getEntries', function() { it('should accept only a callback', function(done) { logging.request = function(config) { - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], }); @@ -443,7 +448,7 @@ describe('Logging', function() { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'listLogEntries'); - assert.deepEqual( + assert.deepStrictEqual( config.reqOpts, extend(options, { orderBy: 'timestamp desc', @@ -467,7 +472,7 @@ describe('Logging', function() { }; logging.request = function(config) { - assert.deepEqual(config.reqOpts.resourceNames, [ + assert.deepStrictEqual(config.reqOpts.resourceNames, [ 'projects/' + logging.projectId, ]); done(); @@ -482,7 +487,7 @@ describe('Logging', function() { }; logging.request = function(config) { - assert.deepEqual(config.reqOpts.orderBy, options.orderBy); + assert.deepStrictEqual(config.reqOpts.orderBy, options.orderBy); done(); }; @@ -581,14 +586,14 @@ describe('Logging', function() { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'listLogEntriesStream'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { resourceNames: ['projects/' + logging.projectId], orderBy: 'timestamp desc', a: 'b', c: 'd', }); - assert.deepEqual(config.gaxOpts, { + assert.deepStrictEqual(config.gaxOpts, { autoPaginate: undefined, a: 'b', c: 'd', @@ -657,13 +662,13 @@ describe('Logging', function() { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'listSinks'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { parent: 'projects/' + logging.projectId, a: 'b', c: 'd', }); - assert.deepEqual(config.gaxOpts, { + assert.deepStrictEqual(config.gaxOpts, { autoPaginate: undefined, a: 'b', c: 'd', @@ -759,13 +764,13 @@ describe('Logging', function() { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'listSinksStream'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { parent: 'projects/' + logging.projectId, a: 'b', c: 'd', }); - assert.deepEqual(config.gaxOpts, { + assert.deepStrictEqual(config.gaxOpts, { autoPaginate: undefined, a: 'b', c: 'd', @@ -910,7 +915,7 @@ describe('Logging', function() { replaceProjectIdTokenOverride = function(reqOpts, projectId) { assert.notStrictEqual(reqOpts, CONFIG.reqOpts); - assert.deepEqual(reqOpts, CONFIG.reqOpts); + assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(projectId, PROJECT_ID); return replacedReqOpts; @@ -948,7 +953,7 @@ describe('Logging', function() { logging.api[CONFIG.client][CONFIG.method] = { bind: function(gaxClient, reqOpts, gaxOpts) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); - assert.deepEqual(reqOpts, CONFIG.reqOpts); + assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(gaxOpts, CONFIG.gaxOpts); setImmediate(done); @@ -1025,7 +1030,7 @@ describe('Logging', function() { logging.api[CONFIG.client][CONFIG.method] = { bind: function(gaxClient, reqOpts, gaxOpts) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); - assert.deepEqual(reqOpts, CONFIG.reqOpts); + assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(gaxOpts, CONFIG.gaxOpts); setImmediate(done); @@ -1225,8 +1230,8 @@ describe('Logging', function() { var expectedAccess = [].slice.call(originalAccess).concat(access); dataset.setMetadata = function(metadata) { - assert.deepEqual(apiResponse.access, originalAccess); - assert.deepEqual(metadata.access, expectedAccess); + assert.deepStrictEqual(apiResponse.access, originalAccess); + assert.deepStrictEqual(metadata.access, expectedAccess); done(); }; @@ -1349,7 +1354,7 @@ describe('Logging', function() { topic.iam.setPolicy = function(policy) { assert.strictEqual(policy, apiResponse); - assert.deepEqual(policy.bindings, expectedBindings); + assert.deepStrictEqual(policy.bindings, expectedBindings); done(); }; diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index c76d1bf19b5..3316f3d62a5 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -30,7 +30,7 @@ var fakeUtil = extend({}, util, { } promisifed = true; - assert.deepEqual(options.exclude, ['entry']); + assert.deepStrictEqual(options.exclude, ['entry']); }, }); @@ -142,7 +142,7 @@ describe('Log', function() { var SEVERITY = 'severity'; it('should assign severity to a single entry', function() { - assert.deepEqual( + assert.deepStrictEqual( Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) .map(prop('metadata')) .map(prop('severity')), @@ -151,7 +151,7 @@ describe('Log', function() { }); it('should assign severity property to multiple entries', function() { - assert.deepEqual( + assert.deepStrictEqual( Log.assignSeverityToEntries_(ENTRIES, SEVERITY) .map(prop('metadata')) .map(prop('severity')), @@ -160,11 +160,9 @@ describe('Log', function() { }); it('should not affect original array', function() { - var originalEntries = extend({}, ENTRIES); - + var originalEntries = ENTRIES.map(x => extend({}, x)); Log.assignSeverityToEntries_(originalEntries, SEVERITY); - - assert.deepEqual(originalEntries, ENTRIES); + assert.deepStrictEqual(originalEntries, ENTRIES); }); }); @@ -199,11 +197,11 @@ describe('Log', function() { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'deleteLog'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { logName: log.formattedName_, }); - assert.deepEqual(config.gaxOpts, {}); + assert.deepStrictEqual(config.gaxOpts, {}); callback(); // done() }; @@ -233,7 +231,7 @@ describe('Log', function() { var entryObject = {}; log.logging.entry = function(metadata_, data_) { - assert.deepEqual(metadata_, metadata); + assert.deepStrictEqual(metadata_, metadata); assert.strictEqual(data_, data); return entryObject; }; @@ -261,7 +259,7 @@ describe('Log', function() { it('should call Logging getEntries with defaults', function(done) { log.logging.getEntries = function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS); + assert.deepStrictEqual(options, EXPECTED_OPTIONS); callback(); // done() }; @@ -275,7 +273,7 @@ describe('Log', function() { }; log.logging.getEntries = function(options_, callback) { - assert.deepEqual(options_, extend({}, EXPECTED_OPTIONS, options)); + assert.deepStrictEqual(options_, extend({}, EXPECTED_OPTIONS, options)); callback(); // done() }; @@ -291,7 +289,7 @@ describe('Log', function() { it('should call Logging getEntriesStream with defaults', function(done) { log.logging.getEntriesStream = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS); + assert.deepStrictEqual(options, EXPECTED_OPTIONS); setImmediate(done); return fakeStream; }; @@ -307,7 +305,7 @@ describe('Log', function() { }; log.logging.getEntriesStream = function(options_) { - assert.deepEqual(options_, extend({}, EXPECTED_OPTIONS, options)); + assert.deepStrictEqual(options_, extend({}, EXPECTED_OPTIONS, options)); setImmediate(done); return fakeStream; }; @@ -341,7 +339,7 @@ describe('Log', function() { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { logName: log.formattedName_, entries: [ENTRY], resource: CUSTOM_RESOURCE, @@ -374,7 +372,7 @@ describe('Log', function() { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { logName: log.formattedName_, entries: [ENTRY], resource: EXPECTED_RESOURCE, @@ -393,7 +391,7 @@ describe('Log', function() { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { logName: log.formattedName_, entries: [ENTRY], resource: FAKE_RESOURCE, diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index ecbac268158..56f4abca949 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -87,7 +87,7 @@ describe('metadata', function() { }); it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getCloudFunctionDescriptor(), { + assert.deepStrictEqual(Metadata.getCloudFunctionDescriptor(), { type: 'cloud_function', labels: { function_name: FUNCTION_NAME, @@ -109,7 +109,7 @@ describe('metadata', function() { }); it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getGAEDescriptor(), { + assert.deepStrictEqual(Metadata.getGAEDescriptor(), { type: 'gae_app', labels: { module_id: GAE_SERVICE, @@ -137,7 +137,7 @@ describe('metadata', function() { Metadata.getGKEDescriptor(function(err, descriptor) { assert.ifError(err); - assert.deepEqual(descriptor, { + assert.deepStrictEqual(descriptor, { type: 'container', labels: { cluster_name: CLUSTER_NAME, @@ -171,7 +171,7 @@ describe('metadata', function() { Metadata.getGCEDescriptor(function(err, descriptor) { assert.ifError(err); - assert.deepEqual(descriptor, { + assert.deepStrictEqual(descriptor, { type: 'gce_instance', labels: { instance_id: INSTANCE_ID, @@ -196,7 +196,7 @@ describe('metadata', function() { describe('getGlobalDescriptor', function() { it('should return the correct descriptor', function() { - assert.deepEqual(Metadata.getGlobalDescriptor(), { + assert.deepStrictEqual(Metadata.getGlobalDescriptor(), { type: 'global', }); }); diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index 0d3dcb6346d..eb5b9e0a207 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -93,11 +93,11 @@ describe('Sink', function() { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'deleteSink'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { sinkName: sink.formattedName_, }); - assert.deepEqual(config.gaxOpts, {}); + assert.deepStrictEqual(config.gaxOpts, {}); callback(); // done() }; @@ -123,11 +123,11 @@ describe('Sink', function() { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'getSink'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { sinkName: sink.formattedName_, }); - assert.deepEqual(config.gaxOpts, {}); + assert.deepStrictEqual(config.gaxOpts, {}); done(); }; @@ -229,7 +229,7 @@ describe('Sink', function() { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'updateSink'); - assert.deepEqual(config.reqOpts, { + assert.deepStrictEqual(config.reqOpts, { sinkName: sink.formattedName_, sink: extend({}, currentMetadata, METADATA), }); From 72709446eef6cab19d3bc6c3fc23dfe2ae76ab19 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Jul 2018 11:24:39 -0700 Subject: [PATCH 0204/1029] chore: move mocha options to mocha.opts (#177) --- handwritten/logging/package.json | 4 ++-- handwritten/logging/test/mocha.opts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 handwritten/logging/test/mocha.opts diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d405127e2e2..0af4036bedf 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -51,8 +51,8 @@ "greenkeeper[bot] " ], "scripts": { - "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", - "test-no-cover": "mocha test/*.js --no-timeouts", + "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", + "test-no-cover": "mocha test/*.js", "test": "npm run cover", "docs": "jsdoc -c .jsdoc.js", "prettier": "prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", diff --git a/handwritten/logging/test/mocha.opts b/handwritten/logging/test/mocha.opts new file mode 100644 index 00000000000..3e740ac6e4c --- /dev/null +++ b/handwritten/logging/test/mocha.opts @@ -0,0 +1,2 @@ +--require intelli-espower-loader +--timeout 10000 From 38c159f9ac53ad227a4e6fc4646e6c5a5b3efb6f Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 30 Jul 2018 16:06:34 -0700 Subject: [PATCH 0205/1029] setup: just npm ci in synth.py (#180) --- handwritten/logging/synth.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index a3704bd34eb..dd91031e0fc 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -40,14 +40,6 @@ ''' Node.js specific cleanup ''' -# Repo Cleanup/Setup -# Install and Link (for linting mostly) -subprocess.run('bash', input=b'rm -rf node_modules package-lock.json') -subprocess.run( - 'bash', input=b'cd samples && rm -rf node_modules/ package-lock.json') -subprocess.run('bash', input=b'npm install && npm link') -subprocess.run('bash', input=b'cd samples && npm link ../ && npm install') - -# prettify and lint +subprocess.run(['npm', 'ci']) subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) From 0d90c40b1d3bb4e69f788b5a6339acfc5e94e58a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 30 Jul 2018 18:44:49 -0700 Subject: [PATCH 0206/1029] chore(deps): lock file maintenance (#181) --- handwritten/logging/package-lock.json | 57 ++++++++++++++------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 9e40c131f8c..12075ec90f5 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -316,9 +316,9 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.2.tgz", - "integrity": "sha512-Zah0wZcVifSpKIy5ulTFyGpHYAA8h/biYy8X7J2UvaXga5XlyruKrXo2K1VmBxB9MDPXa0Duz8M003pe2Ras3w==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.3.tgz", + "integrity": "sha512-aow6Os43uhdgshSe/fr43ESHNl/kHhikim9AOqIMUzEb6mip6H4d8GFKgpO/yoqUUTIhCN3sbpkKktMI5mOQHw==", "dev": true, "requires": { "ava": "0.25.0", @@ -2961,9 +2961,9 @@ }, "dependencies": { "@types/node": { - "version": "9.6.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.23.tgz", - "integrity": "sha512-d2SJJpwkiPudEQ3+9ysANN2Nvz4QJKUPoe/WL5zyQzI0RaEeZWH5K5xjvUIGszTItHQpFPdH+u51f6G/LkS8Cg==" + "version": "9.6.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.24.tgz", + "integrity": "sha512-o5K0mt8x735EaqS7F2x+5AG0b1Mt3V9jgV5SeW8SD6RNhE++dvwqLf2R2e4c8FmhNLaogz2oXrsiXnqnsBSSIQ==" } } }, @@ -3118,9 +3118,9 @@ } }, "@types/lodash": { - "version": "4.14.113", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.113.tgz", - "integrity": "sha512-CINMgfKUnif7fWBqPuGUsZrkER8jGU+ufyhD7FuotPqC1rRViHOJVgPuanN2Y8Vv1TqRnHDKlMnyEQLNq9eMjA==" + "version": "4.14.115", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.115.tgz", + "integrity": "sha512-9K/P4XMQxk61omAzQh3bbbFiqnG17eLcFysjlAYz0aPcYrVo8T+ujaCeIeY0Gpzux7x1YbxtEtLKB7ZWf79qdg==" }, "@types/long": { "version": "4.0.0", @@ -3128,9 +3128,9 @@ "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "10.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", - "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==" + "version": "10.5.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.4.tgz", + "integrity": "sha512-8TqvB0ReZWwtcd3LXq3YSrBoLyXFgBX/sBZfGye9+YS8zH7/g+i6QRIuiDmwBoTzcQ/pk89nZYTYU4c5akKkzw==" }, "@types/request": { "version": "2.47.1", @@ -5276,12 +5276,13 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "ecdsa-sig-formatter": { @@ -7142,9 +7143,9 @@ "dev": true }, "grpc": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.0.tgz", - "integrity": "sha512-jGxWFYzttSz9pi8mu283jZvo2zIluWonQ918GMHKx8grT57GIVlvx7/82fo7AGS75lbkPoO1T6PZLvCRD9Pbtw==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.1.tgz", + "integrity": "sha512-yl0xChnlUISTefOPU2NQ1cYPh5m/DTatEUV6jdRyQPE9NCrtPq7Gn6J2alMTglN7ufYbJapOd00dvhGurHH6HQ==", "requires": { "lodash": "^4.17.5", "nan": "^2.0.0", @@ -7358,12 +7359,12 @@ } }, "node-pre-gyp": { - "version": "0.10.2", + "version": "0.10.3", "bundled": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", @@ -7386,7 +7387,7 @@ "bundled": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.1.11", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -8350,9 +8351,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.1.tgz", - "integrity": "sha512-h9Vg3nfbxrF0PK0kZiNiMAyL8zXaLiBP/BXniaKSwVvAi1TaumYV2b0wPdmy1CRX3irYbYD1p4Wjbv4uyECiiQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", + "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", "dev": true, "requires": { "@babel/generator": "7.0.0-beta.51", @@ -11973,9 +11974,9 @@ "dev": true }, "prettier": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz", - "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.0.tgz", + "integrity": "sha512-KtQ2EGaUwf2EyDfp1fxyEb0PqGKakVm0WyXwDt6u+cAoxbO2Z2CwKvOe3+b4+F2IlO9lYHi1kqFuRM70ddBnow==", "dev": true }, "pretty-ms": { From 6e8f786698ad0512ab157a0731ce2d5a7a433416 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 1 Aug 2018 17:50:56 -0700 Subject: [PATCH 0207/1029] fix(deps): update dependency google-gax to ^0.18.0 (#182) --- handwritten/logging/package-lock.json | 68 +++++++++++++++++++++------ handwritten/logging/package.json | 2 +- 2 files changed, 55 insertions(+), 15 deletions(-) diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json index 12075ec90f5..b9defb3e047 100644 --- a/handwritten/logging/package-lock.json +++ b/handwritten/logging/package-lock.json @@ -411,6 +411,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1539,7 +1540,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -3189,6 +3191,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -3200,6 +3203,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -6332,12 +6336,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6352,17 +6358,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -6479,7 +6488,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6491,6 +6501,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6505,6 +6516,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6512,12 +6524,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6536,6 +6550,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6616,7 +6631,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6628,6 +6644,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6749,6 +6766,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7052,10 +7070,11 @@ } }, "google-gax": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.17.1.tgz", - "integrity": "sha512-fAKvFx++SRr6bGWamWuVOkJzJnQqMgpJkhaB2oEwfFJ91rbFgEmIPRmZZ/MeIVVFUOuHUVyZ8nwjm5peyTZJ6g==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.18.0.tgz", + "integrity": "sha512-cF2s3aTw1cWDHsjaYfIizJZT0KJF0FSM3laiCX4O/K0ZcdmeE9PitG2bxRH+dY+Sz094//m+JoH1hBtSyOf67A==", "requires": { + "@grpc/proto-loader": "^0.3.0", "duplexify": "^3.6.0", "extend": "^3.0.1", "globby": "^8.0.1", @@ -7064,9 +7083,27 @@ "grpc": "^1.12.2", "is-stream-ended": "^0.1.4", "lodash": "^4.17.10", - "protobufjs": "^6.8.6", + "protobufjs": "^6.8.8", "retry-request": "^4.0.0", "through2": "^2.0.3" + }, + "dependencies": { + "@grpc/proto-loader": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.3.0.tgz", + "integrity": "sha512-9b8S/V+3W4Gv7G/JKSZ48zApgyYbfIR7mAC9XNnaSWme3zj57MIESu0ELzm9j5oxNIpFG8DgO00iJMIUZ5luqw==", + "requires": { + "@types/lodash": "^4.14.104", + "@types/node": "^9.4.6", + "lodash": "^4.17.5", + "protobufjs": "^6.8.6" + } + }, + "@types/node": { + "version": "9.6.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.25.tgz", + "integrity": "sha512-uZpzO9MKSHy7zBiTtziA3JgZP3upcAvLTASkKgheLj6/rNZmRX4UyvsFYaY2kbYcmmh8bNZ2T0eocBRCfZdGvQ==" + } } }, "google-p12-pem": { @@ -8746,7 +8783,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.4.0", @@ -9336,6 +9374,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -10278,7 +10317,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "lru-cache": { "version": "4.1.3", diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0af4036bedf..855b467de14 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,7 +69,7 @@ "extend": "^3.0.1", "gcp-metadata": "^0.7.0", "google-auth-library": "^1.6.0", - "google-gax": "^0.17.1", + "google-gax": "^0.18.0", "google-proto-files": "^0.16.1", "is": "^3.2.1", "lodash.merge": "^4.6.1", From 1e02a20454050ef37c37f7be542cff89d3063e34 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 2 Aug 2018 05:11:17 -0700 Subject: [PATCH 0208/1029] remove that whitespace (#183) --- handwritten/logging/test/mocha.opts | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/test/mocha.opts b/handwritten/logging/test/mocha.opts index 3e740ac6e4c..8751e7bae37 100644 --- a/handwritten/logging/test/mocha.opts +++ b/handwritten/logging/test/mocha.opts @@ -1,2 +1,3 @@ --require intelli-espower-loader --timeout 10000 +--throw-deprecation From 3952b06d704e7b4c56d646ccde7c5c0d973b4e7f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 7 Aug 2018 13:59:38 -0700 Subject: [PATCH 0209/1029] chore: ignore package-lock.json (#186) * chore: ignore package-log.json * remove locky * renovateeee --- handwritten/logging/.circleci/config.yml | 17 +- .../logging/.circleci/get_workflow_name.py | 67 - handwritten/logging/.gitignore | 3 +- handwritten/logging/package-lock.json | 14000 ---------------- 4 files changed, 3 insertions(+), 14084 deletions(-) delete mode 100644 handwritten/logging/.circleci/get_workflow_name.py delete mode 100644 handwritten/logging/package-lock.json diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 1425175238c..83d0971bf3f 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -59,18 +59,7 @@ jobs: - image: 'node:6' user: node steps: &unit_tests_steps - - checkout - - run: &remove_package_lock - name: Remove package-lock.json if needed. - command: | - WORKFLOW_NAME=`python .circleci/get_workflow_name.py` - echo "Workflow name: $WORKFLOW_NAME" - if [ "$WORKFLOW_NAME" = "nightly" ]; then - echo "Nightly build detected, removing package-lock.json." - rm -f package-lock.json samples/package-lock.json - else - echo "Not a nightly build, skipping this step." - fi + - checkout - run: &npm_install_and_link name: Install and link the module command: |- @@ -96,7 +85,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: *npm_install_and_link - run: &samples_npm_install_and_link name: Link the module being tested to the samples. @@ -117,7 +105,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: *npm_install_and_link - run: name: Build documentation. @@ -128,7 +115,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: name: Decrypt credentials. command: | @@ -155,7 +141,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: name: Decrypt credentials. command: | diff --git a/handwritten/logging/.circleci/get_workflow_name.py b/handwritten/logging/.circleci/get_workflow_name.py deleted file mode 100644 index ff6b58fd24f..00000000000 --- a/handwritten/logging/.circleci/get_workflow_name.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Get workflow name for the current build using CircleCI API. -Would be great if this information is available in one of -CircleCI environment variables, but it's not there. -https://circleci.ideas.aha.io/ideas/CCI-I-295 -""" - -import json -import os -import sys -import urllib2 - - -def main(): - try: - username = os.environ['CIRCLE_PROJECT_USERNAME'] - reponame = os.environ['CIRCLE_PROJECT_REPONAME'] - build_num = os.environ['CIRCLE_BUILD_NUM'] - except: - sys.stderr.write( - 'Looks like we are not inside CircleCI container. Exiting...\n') - return 1 - - try: - request = urllib2.Request( - "https://circleci.com/api/v1.1/project/github/%s/%s/%s" % - (username, reponame, build_num), - headers={"Accept": "application/json"}) - contents = urllib2.urlopen(request).read() - except: - sys.stderr.write('Cannot query CircleCI API. Exiting...\n') - return 1 - - try: - build_info = json.loads(contents) - except: - sys.stderr.write( - 'Cannot parse JSON received from CircleCI API. Exiting...\n') - return 1 - - try: - workflow_name = build_info['workflows']['workflow_name'] - except: - sys.stderr.write( - 'Cannot get workflow name from CircleCI build info. Exiting...\n') - return 1 - - print workflow_name - return 0 - - -retval = main() -exit(retval) diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index 082cf01ed78..531c77e628b 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -10,4 +10,5 @@ system-test/*key.json *.lock .DS_Store google-cloud-logging-winston-*.tgz -google-cloud-logging-bunyan-*.tgz \ No newline at end of file +google-cloud-logging-bunyan-*.tgz +package-lock.json diff --git a/handwritten/logging/package-lock.json b/handwritten/logging/package-lock.json deleted file mode 100644 index b9defb3e047..00000000000 --- a/handwritten/logging/package-lock.json +++ /dev/null @@ -1,14000 +0,0 @@ -{ - "name": "@google-cloud/logging", - "version": "2.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@ava/babel-plugin-throws-helper": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-2.0.0.tgz", - "integrity": "sha1-L8H+PCEacQcaTsp7j3r1hCzRrnw=", - "dev": true - }, - "@ava/babel-preset-stage-4": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@ava/babel-preset-stage-4/-/babel-preset-stage-4-1.1.0.tgz", - "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", - "dev": true, - "requires": { - "babel-plugin-check-es2015-constants": "^6.8.0", - "babel-plugin-syntax-trailing-function-commas": "^6.20.0", - "babel-plugin-transform-async-to-generator": "^6.16.0", - "babel-plugin-transform-es2015-destructuring": "^6.19.0", - "babel-plugin-transform-es2015-function-name": "^6.9.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", - "babel-plugin-transform-es2015-parameters": "^6.21.0", - "babel-plugin-transform-es2015-spread": "^6.8.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", - "babel-plugin-transform-exponentiation-operator": "^6.8.0", - "package-hash": "^1.2.0" - }, - "dependencies": { - "md5-hex": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", - "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "package-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-1.2.0.tgz", - "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", - "dev": true, - "requires": { - "md5-hex": "^1.3.0" - } - } - } - }, - "@ava/babel-preset-transform-test-files": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@ava/babel-preset-transform-test-files/-/babel-preset-transform-test-files-3.0.0.tgz", - "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", - "dev": true, - "requires": { - "@ava/babel-plugin-throws-helper": "^2.0.0", - "babel-plugin-espower": "^2.3.2" - } - }, - "@ava/write-file-atomic": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ava/write-file-atomic/-/write-file-atomic-2.2.0.tgz", - "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "@babel/code-frame": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", - "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", - "dev": true, - "requires": { - "@babel/highlight": "7.0.0-beta.51" - } - }, - "@babel/generator": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", - "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51", - "jsesc": "^2.5.1", - "lodash": "^4.17.5", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", - "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", - "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", - "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", - "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/highlight": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", - "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" - } - }, - "@babel/parser": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", - "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", - "dev": true - }, - "@babel/template": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", - "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", - "dev": true, - "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "lodash": "^4.17.5" - } - }, - "@babel/traverse": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", - "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", - "dev": true, - "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "@babel/generator": "7.0.0-beta.51", - "@babel/helper-function-name": "7.0.0-beta.51", - "@babel/helper-split-export-declaration": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.17.5" - }, - "dependencies": { - "globals": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", - "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", - "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.5", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - } - } - }, - "@concordance/react": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@concordance/react/-/react-1.0.0.tgz", - "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", - "dev": true, - "requires": { - "arrify": "^1.0.1" - } - }, - "@google-cloud/bigquery": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@google-cloud/bigquery/-/bigquery-1.3.0.tgz", - "integrity": "sha512-r4k4PvsoPB7DBBCsm4hz8WZj3KvZXikTcwSjAg+cn0JndAPIEad4XCd39RpniyPDSmp+n+d+kOAgebwMWj8q+w==", - "dev": true, - "requires": { - "@google-cloud/common": "^0.17.0", - "arrify": "^1.0.0", - "duplexify": "^3.5.0", - "extend": "^3.0.1", - "is": "^3.0.1", - "stream-events": "^1.0.1", - "string-format-obj": "^1.0.0", - "uuid": "^3.1.0" - }, - "dependencies": { - "@google-cloud/common": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.17.0.tgz", - "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", - "dev": true, - "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.10.0", - "is": "^3.2.0", - "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" - } - }, - "retry-request": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", - "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", - "dev": true, - "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" - } - }, - "split-array-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", - "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", - "dev": true, - "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" - } - } - } - }, - "@google-cloud/common": { - "version": "0.20.3", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.20.3.tgz", - "integrity": "sha512-jt8/R4EqDTQccv5WA9AEaS65llM5+mlxsuWu57G5Os8HTIpgPbcsOVMUeIvmTrBuPUYSoRIMW8d/pvv/95n0+g==", - "requires": { - "@types/duplexify": "^3.5.0", - "@types/request": "^2.47.0", - "arrify": "^1.0.1", - "axios": "^0.18.0", - "duplexify": "^3.6.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auth-library": "^1.6.0", - "is": "^3.2.1", - "pify": "^3.0.0", - "request": "^2.87.0", - "retry-request": "^4.0.0", - "split-array-stream": "^2.0.0", - "stream-events": "^1.0.4", - "through2": "^2.0.3" - } - }, - "@google-cloud/common-grpc": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.7.1.tgz", - "integrity": "sha512-VK2X6rLRJIQMmkTS3p483up/Vb8zZHLoMFSmo17iiqebgaAoDpOhBiXXy4thtfabk02Nu5QtYT0QwM49OeU/ew==", - "requires": { - "@google-cloud/common": "^0.20.0", - "@grpc/proto-loader": "^0.1.0", - "dot-prop": "^4.2.0", - "duplexify": "^3.6.0", - "extend": "^3.0.1", - "grpc": "^1.12.3", - "is": "^3.2.1", - "retry-request": "^4.0.0", - "through2": "^2.0.3" - } - }, - "@google-cloud/nodejs-repo-tools": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.3.tgz", - "integrity": "sha512-aow6Os43uhdgshSe/fr43ESHNl/kHhikim9AOqIMUzEb6mip6H4d8GFKgpO/yoqUUTIhCN3sbpkKktMI5mOQHw==", - "dev": true, - "requires": { - "ava": "0.25.0", - "colors": "1.1.2", - "fs-extra": "5.0.0", - "got": "8.3.0", - "handlebars": "4.0.11", - "lodash": "4.17.5", - "nyc": "11.7.2", - "proxyquire": "1.8.0", - "semver": "^5.5.0", - "sinon": "6.0.1", - "string": "3.3.3", - "supertest": "3.1.0", - "yargs": "11.0.0", - "yargs-parser": "10.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "nyc": { - "version": "11.7.2", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.2.tgz", - "integrity": "sha512-gBt7qwsR1vryYfglVjQRx1D+AtMZW5NbUKxb+lZe8SN8KsheGCPGWEsSC9AGQG+r2+te1+10uPHUCahuqm1nGQ==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.1.2", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.10.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.3", - "istanbul-reports": "^1.4.0", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", - "yargs": "11.1.0", - "yargs-parser": "^8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "atob": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-generator": { - "version": "6.26.1", - "bundled": true, - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "base": { - "version": "0.11.2", - "bundled": true, - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "class-utils": { - "version": "0.3.6", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "core-js": { - "version": "2.5.6", - "bundled": true, - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^2.0.0" - } - }, - "define-property": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fragment-cache": { - "version": "0.2.1", - "bundled": true, - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "get-value": { - "version": "2.0.6", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "has-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hosted-git-info": { - "version": "2.6.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invariant": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-odd": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "bundled": true, - "dev": true - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.1", - "bundled": true, - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", - "semver": "^5.3.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.3", - "bundled": true, - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "istanbul-reports": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "js-tokens": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } - } - }, - "lodash": { - "version": "4.17.10", - "bundled": true, - "dev": true - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "loose-envify": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "js-tokens": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.3", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-cache": { - "version": "0.2.2", - "bundled": true, - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "nanomatch": { - "version": "1.2.9", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pascalcase": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true, - "dev": true - }, - "regex-not": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "ret": { - "version": "0.1.15", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-regex": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "set-value": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "source-map-resolve": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "atob": "^2.0.0", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "split-string": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "trim-right": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "union-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "bundled": true, - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "bundled": true, - "dev": true - }, - "use": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "validate-npm-package-license": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "yargs": { - "version": "11.1.0", - "bundled": true, - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "yargs-parser": { - "version": "9.0.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "8.1.0", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } - } - } - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "proxyquire": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-1.8.0.tgz", - "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", - "dev": true, - "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.0", - "resolve": "~1.1.7" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "yargs": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", - "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - } - } - }, - "@google-cloud/pubsub": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-0.19.0.tgz", - "integrity": "sha512-XhIZSnci5fQ9xnhl/VpwVVMFiOt5uGN6S5QMNHmhZqbki/adlKXAmDOD4fncyusOZFK1WTQY35xTWHwxuso25g==", - "dev": true, - "requires": { - "@google-cloud/common": "^0.16.1", - "arrify": "^1.0.0", - "async-each": "^1.0.1", - "delay": "^2.0.0", - "duplexify": "^3.5.4", - "extend": "^3.0.1", - "google-auto-auth": "^0.10.1", - "google-gax": "^0.16.0", - "google-proto-files": "^0.16.0", - "is": "^3.0.1", - "lodash.chunk": "^4.2.0", - "lodash.merge": "^4.6.0", - "lodash.snakecase": "^4.1.1", - "protobufjs": "^6.8.1", - "through2": "^2.0.3", - "uuid": "^3.1.0" - }, - "dependencies": { - "@google-cloud/common": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.2.tgz", - "integrity": "sha512-GrkaFoj0/oO36pNs4yLmaYhTujuA3i21FdQik99Fd/APix1uhf01VlpJY4lAteTDFLRNkRx6ydEh7OVvmeUHng==", - "dev": true, - "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.9.0", - "is": "^3.2.0", - "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" - }, - "dependencies": { - "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", - "dev": true, - "requires": { - "async": "^2.3.0", - "gcp-metadata": "^0.6.1", - "google-auth-library": "^1.3.1", - "request": "^2.79.0" - } - } - } - }, - "gcp-metadata": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", - "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", - "dev": true, - "requires": { - "axios": "^0.18.0", - "extend": "^3.0.1", - "retry-axios": "0.3.2" - } - }, - "google-gax": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", - "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", - "dev": true, - "requires": { - "duplexify": "^3.5.4", - "extend": "^3.0.0", - "globby": "^8.0.0", - "google-auto-auth": "^0.10.0", - "google-proto-files": "^0.15.0", - "grpc": "^1.10.0", - "is-stream-ended": "^0.1.0", - "lodash": "^4.17.2", - "protobufjs": "^6.8.0", - "through2": "^2.0.3" - }, - "dependencies": { - "google-proto-files": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", - "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", - "dev": true, - "requires": { - "globby": "^7.1.1", - "power-assert": "^1.4.4", - "protobufjs": "^6.8.0" - }, - "dependencies": { - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - } - } - } - } - }, - "retry-request": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", - "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", - "dev": true, - "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" - } - }, - "split-array-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", - "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", - "dev": true, - "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" - } - } - } - }, - "@google-cloud/storage": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-1.7.0.tgz", - "integrity": "sha512-QaAxzCkbhspwajoaEnT0GcnQcpjPRcBrHYuQsXtD05BtOJgVnHCLXSsfUiRdU0nVpK+Thp7+sTkQ0fvk5PanKg==", - "dev": true, - "requires": { - "@google-cloud/common": "^0.17.0", - "arrify": "^1.0.0", - "async": "^2.0.1", - "compressible": "^2.0.12", - "concat-stream": "^1.5.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "extend": "^3.0.0", - "gcs-resumable-upload": "^0.10.2", - "hash-stream-validation": "^0.2.1", - "is": "^3.0.1", - "mime": "^2.2.0", - "mime-types": "^2.0.8", - "once": "^1.3.1", - "pumpify": "^1.5.1", - "request": "^2.85.0", - "safe-buffer": "^5.1.1", - "snakeize": "^0.1.0", - "stream-events": "^1.0.1", - "through2": "^2.0.0", - "xdg-basedir": "^3.0.0" - }, - "dependencies": { - "@google-cloud/common": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.17.0.tgz", - "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==", - "dev": true, - "requires": { - "array-uniq": "^1.0.3", - "arrify": "^1.0.1", - "concat-stream": "^1.6.0", - "create-error-class": "^3.0.2", - "duplexify": "^3.5.0", - "ent": "^2.2.0", - "extend": "^3.0.1", - "google-auto-auth": "^0.10.0", - "is": "^3.2.0", - "log-driver": "1.2.7", - "methmeth": "^1.1.0", - "modelo": "^4.2.0", - "request": "^2.79.0", - "retry-request": "^3.0.0", - "split-array-stream": "^1.0.0", - "stream-events": "^1.0.1", - "string-format-obj": "^1.1.0", - "through2": "^2.0.3" - } - }, - "retry-request": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz", - "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==", - "dev": true, - "requires": { - "request": "^2.81.0", - "through2": "^2.0.0" - } - }, - "split-array-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz", - "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=", - "dev": true, - "requires": { - "async": "^2.4.0", - "is-stream-ended": "^0.1.0" - } - } - } - }, - "@grpc/proto-loader": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.1.0.tgz", - "integrity": "sha512-GHoZBR5N+65AWazsCiJDxeMSbUpp2qNYbjeD3mP27L2PT25+GvIupIIJiCgULH87NAiAd9SmWMRBVz+uSiHpgA==", - "requires": { - "@types/lodash": "^4.14.104", - "@types/node": "^9.4.6", - "lodash": "^4.17.5", - "protobufjs": "^6.8.6" - }, - "dependencies": { - "@types/node": { - "version": "9.6.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.24.tgz", - "integrity": "sha512-o5K0mt8x735EaqS7F2x+5AG0b1Mt3V9jgV5SeW8SD6RNhE++dvwqLf2R2e4c8FmhNLaogz2oXrsiXnqnsBSSIQ==" - } - } - }, - "@ladjs/time-require": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@ladjs/time-require/-/time-require-0.1.4.tgz", - "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", - "dev": true, - "requires": { - "chalk": "^0.4.0", - "date-time": "^0.1.1", - "pretty-ms": "^0.2.1", - "text-table": "^0.2.0" - }, - "dependencies": { - "ansi-styles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", - "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", - "dev": true - }, - "chalk": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", - "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", - "dev": true, - "requires": { - "ansi-styles": "~1.0.0", - "has-color": "~0.1.0", - "strip-ansi": "~0.1.0" - } - }, - "pretty-ms": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-0.2.2.tgz", - "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", - "dev": true, - "requires": { - "parse-ms": "^0.1.0" - } - }, - "strip-ansi": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", - "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", - "dev": true - } - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz", - "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==" - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" - }, - "@sindresorhus/is": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", - "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", - "dev": true - }, - "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", - "dev": true, - "requires": { - "samsam": "1.3.0" - } - }, - "@types/caseless": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", - "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==" - }, - "@types/duplexify": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@types/duplexify/-/duplexify-3.5.0.tgz", - "integrity": "sha512-+aZCCdxuR/Q6n58CBkXyqGqimIqpYUcFLfBXagXv7e9TdJUevqkKhzopBuRz3RB064sQxnJnhttHOkK/O93Ouw==", - "requires": { - "@types/node": "*" - } - }, - "@types/form-data": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", - "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", - "requires": { - "@types/node": "*" - } - }, - "@types/lodash": { - "version": "4.14.115", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.115.tgz", - "integrity": "sha512-9K/P4XMQxk61omAzQh3bbbFiqnG17eLcFysjlAYz0aPcYrVo8T+ujaCeIeY0Gpzux7x1YbxtEtLKB7ZWf79qdg==" - }, - "@types/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", - "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" - }, - "@types/node": { - "version": "10.5.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.4.tgz", - "integrity": "sha512-8TqvB0ReZWwtcd3LXq3YSrBoLyXFgBX/sBZfGye9+YS8zH7/g+i6QRIuiDmwBoTzcQ/pk89nZYTYU4c5akKkzw==" - }, - "@types/request": { - "version": "2.47.1", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.1.tgz", - "integrity": "sha512-TV3XLvDjQbIeVxJ1Z3oCTDk/KuYwwcNKVwz2YaT0F5u86Prgc4syDAp6P96rkTQQ4bIdh+VswQIC9zS6NjY7/g==", - "requires": { - "@types/caseless": "*", - "@types/form-data": "*", - "@types/node": "*", - "@types/tough-cookie": "*" - } - }, - "@types/tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha512-MDQLxNFRLasqS4UlkWMSACMKeSm1x4Q3TxzUC7KQUsh6RK1ZrQ0VEyE3yzXcBu+K8ejVj4wuX32eUG02yNp+YQ==" - }, - "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" - }, - "acorn-es7-plugin": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", - "integrity": "sha1-8u4fMiipDurRJF+asZIusucdM2s=" - }, - "acorn-jsx": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", - "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", - "dev": true, - "requires": { - "acorn": "^5.0.3" - } - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "requires": { - "string-width": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - } - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "argv": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", - "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=", - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "arr-exclude": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/arr-exclude/-/arr-exclude-1.0.0.tgz", - "integrity": "sha1-38fC5VKicHI8zaBM8xKMjL/lxjE=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=" - }, - "array-find": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", - "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "ascli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", - "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", - "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" - } - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" - }, - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" - }, - "auto-bind": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.1.tgz", - "integrity": "sha512-/W9yj1yKmBLwpexwAujeD9YHwYmRuWFGV8HWE7smQab797VeHa4/cnE2NFeDhA+E+5e/OGBI8763EhLjfZ/MXA==", - "dev": true - }, - "ava": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/ava/-/ava-0.25.0.tgz", - "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", - "dev": true, - "requires": { - "@ava/babel-preset-stage-4": "^1.1.0", - "@ava/babel-preset-transform-test-files": "^3.0.0", - "@ava/write-file-atomic": "^2.2.0", - "@concordance/react": "^1.0.0", - "@ladjs/time-require": "^0.1.4", - "ansi-escapes": "^3.0.0", - "ansi-styles": "^3.1.0", - "arr-flatten": "^1.0.1", - "array-union": "^1.0.1", - "array-uniq": "^1.0.2", - "arrify": "^1.0.0", - "auto-bind": "^1.1.0", - "ava-init": "^0.2.0", - "babel-core": "^6.17.0", - "babel-generator": "^6.26.0", - "babel-plugin-syntax-object-rest-spread": "^6.13.0", - "bluebird": "^3.0.0", - "caching-transform": "^1.0.0", - "chalk": "^2.0.1", - "chokidar": "^1.4.2", - "clean-stack": "^1.1.1", - "clean-yaml-object": "^0.1.0", - "cli-cursor": "^2.1.0", - "cli-spinners": "^1.0.0", - "cli-truncate": "^1.0.0", - "co-with-promise": "^4.6.0", - "code-excerpt": "^2.1.1", - "common-path-prefix": "^1.0.0", - "concordance": "^3.0.0", - "convert-source-map": "^1.5.1", - "core-assert": "^0.2.0", - "currently-unhandled": "^0.4.1", - "debug": "^3.0.1", - "dot-prop": "^4.1.0", - "empower-core": "^0.6.1", - "equal-length": "^1.0.0", - "figures": "^2.0.0", - "find-cache-dir": "^1.0.0", - "fn-name": "^2.0.0", - "get-port": "^3.0.0", - "globby": "^6.0.0", - "has-flag": "^2.0.0", - "hullabaloo-config-manager": "^1.1.0", - "ignore-by-default": "^1.0.0", - "import-local": "^0.1.1", - "indent-string": "^3.0.0", - "is-ci": "^1.0.7", - "is-generator-fn": "^1.0.0", - "is-obj": "^1.0.0", - "is-observable": "^1.0.0", - "is-promise": "^2.1.0", - "last-line-stream": "^1.0.0", - "lodash.clonedeepwith": "^4.5.0", - "lodash.debounce": "^4.0.3", - "lodash.difference": "^4.3.0", - "lodash.flatten": "^4.2.0", - "loud-rejection": "^1.2.0", - "make-dir": "^1.0.0", - "matcher": "^1.0.0", - "md5-hex": "^2.0.0", - "meow": "^3.7.0", - "ms": "^2.0.0", - "multimatch": "^2.1.0", - "observable-to-promise": "^0.5.0", - "option-chain": "^1.0.0", - "package-hash": "^2.0.0", - "pkg-conf": "^2.0.0", - "plur": "^2.0.0", - "pretty-ms": "^3.0.0", - "require-precompiled": "^0.1.0", - "resolve-cwd": "^2.0.0", - "safe-buffer": "^5.1.1", - "semver": "^5.4.1", - "slash": "^1.0.0", - "source-map-support": "^0.5.0", - "stack-utils": "^1.0.1", - "strip-ansi": "^4.0.0", - "strip-bom-buf": "^1.0.0", - "supertap": "^1.0.0", - "supports-color": "^5.0.0", - "trim-off-newlines": "^1.0.1", - "unique-temp-dir": "^1.0.0", - "update-notifier": "^2.3.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "empower-core": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-0.6.2.tgz", - "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", - "dev": true, - "requires": { - "call-signature": "0.0.2", - "core-js": "^2.0.0" - } - }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "ava-init": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ava-init/-/ava-init-0.2.1.tgz", - "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", - "dev": true, - "requires": { - "arr-exclude": "^1.0.0", - "execa": "^0.7.0", - "has-yarn": "^1.0.0", - "read-pkg-up": "^2.0.0", - "write-pkg": "^3.1.0" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" - }, - "axios": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", - "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", - "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - } - } - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, - "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "dev": true, - "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-espower": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.4.0.tgz", - "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", - "dev": true, - "requires": { - "babel-generator": "^6.1.0", - "babylon": "^6.1.0", - "call-matcher": "^1.0.0", - "core-js": "^2.0.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.1.1" - } - }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", - "dev": true - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", - "dev": true - }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", - "dev": true - }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", - "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", - "dev": true, - "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" - } - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", - "dev": true, - "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" - } - }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", - "dev": true, - "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - }, - "dependencies": { - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - } - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", - "dev": true - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "buf-compare": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", - "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", - "dev": true - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" - }, - "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", - "requires": { - "long": "~3" - }, - "dependencies": { - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cacheable-request": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", - "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", - "dev": true, - "requires": { - "clone-response": "1.0.2", - "get-stream": "3.0.0", - "http-cache-semantics": "3.8.1", - "keyv": "3.0.0", - "lowercase-keys": "1.0.0", - "normalize-url": "2.0.1", - "responselike": "1.0.2" - }, - "dependencies": { - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true - } - } - }, - "caching-transform": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", - "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - }, - "dependencies": { - "md5-hex": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", - "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - } - } - }, - "call-matcher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-matcher/-/call-matcher-1.0.1.tgz", - "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", - "dev": true, - "requires": { - "core-js": "^2.0.0", - "deep-equal": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.0.0" - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" - }, - "call-signature": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/call-signature/-/call-signature-0.0.2.tgz", - "integrity": "sha1-qEq8glpV70yysCi9dOIFpluaSZY=" - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - } - } - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "catharsis": { - "version": "0.8.9", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", - "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", - "dev": true, - "requires": { - "underscore-contrib": "~0.3.0" - } - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "ci-info": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", - "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", - "dev": true - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-stack": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", - "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=", - "dev": true - }, - "clean-yaml-object": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", - "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", - "dev": true - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-spinners": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz", - "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==", - "dev": true - }, - "cli-truncate": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-1.1.0.tgz", - "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", - "dev": true, - "requires": { - "slice-ansi": "^1.0.0", - "string-width": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "co-with-promise": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co-with-promise/-/co-with-promise-4.6.0.tgz", - "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", - "dev": true, - "requires": { - "pinkie-promise": "^1.0.0" - } - }, - "code-excerpt": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-2.1.1.tgz", - "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", - "dev": true, - "requires": { - "convert-to-spaces": "^1.0.1" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "codecov": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.4.tgz", - "integrity": "sha512-KJyzHdg9B8U9LxXa7hS6jnEW5b1cNckLYc2YpnJ1nEFiOW+/iSzDHp+5MYEIQd9fN3/tC6WmGZmYiwxzkuGp/A==", - "dev": true, - "requires": { - "argv": "^0.0.2", - "ignore-walk": "^3.0.1", - "request": "^2.87.0", - "urlgrey": "^0.4.4" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "dev": true, - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "colour": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "common-path-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-1.0.0.tgz", - "integrity": "sha1-zVL28HEuC6q5fW+XModPIvR3UsA=", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "compressible": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", - "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", - "dev": true, - "requires": { - "mime-db": ">= 1.34.0 < 2" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "concordance": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/concordance/-/concordance-3.0.0.tgz", - "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", - "dev": true, - "requires": { - "date-time": "^2.1.0", - "esutils": "^2.0.2", - "fast-diff": "^1.1.1", - "function-name-support": "^0.2.0", - "js-string-escape": "^1.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.flattendeep": "^4.4.0", - "lodash.merge": "^4.6.0", - "md5-hex": "^2.0.0", - "semver": "^5.3.0", - "well-known-symbols": "^1.0.0" - }, - "dependencies": { - "date-time": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", - "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", - "dev": true, - "requires": { - "time-zone": "^1.0.0" - } - } - } - }, - "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "convert-to-spaces": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", - "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=", - "dev": true - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" - }, - "core-assert": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", - "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", - "dev": true, - "requires": { - "buf-compare": "^1.0.0", - "is-error": "^2.2.0" - } - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "^0.10.9" - } - }, - "d64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d64/-/d64-1.0.0.tgz", - "integrity": "sha1-QAKofoUMv8n52XBrYPymE6MzbpA=" - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-time": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/date-time/-/date-time-0.1.1.tgz", - "integrity": "sha1-7S9tk9l5DOL9ZtW1/z7dW7y/Owc=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "dev": true, - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - } - } - }, - "delay": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-2.0.0.tgz", - "integrity": "sha1-kRLq3APk7H4AKXM3iW8nO72R+uU=", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diff-match-patch": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.1.tgz", - "integrity": "sha512-A0QEhr4PxGUMEtKxd6X+JLnOTFd3BfIPSDpsc4dMvj+CbSaErDwTpoTo/nFJDMSrjxLW4BiNq+FbNisAAHhWeQ==" - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dev": true, - "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", - "dev": true - } - } - }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "requires": { - "is-obj": "^1.0.0" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ecdsa-sig-formatter": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", - "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "empower": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.0.tgz", - "integrity": "sha512-tP2WqM7QzrPguCCQEQfFFDF+6Pw6YWLQal3+GHQaV+0uIr0S+jyREQPWljE02zFCYPFYLZ3LosiRV+OzTrxPpQ==", - "requires": { - "core-js": "^2.0.0", - "empower-core": "^1.2.0" - } - }, - "empower-assert": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.1.0.tgz", - "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", - "dev": true, - "requires": { - "estraverse": "^4.2.0" - } - }, - "empower-core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-1.2.0.tgz", - "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", - "requires": { - "call-signature": "0.0.2", - "core-js": "^2.0.0" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "requires": { - "once": "^1.4.0" - } - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", - "dev": true - }, - "equal-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", - "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "dev": true, - "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" - } - }, - "es5-ext": { - "version": "0.10.45", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" - } - }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" - } - }, - "escallmatch": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/escallmatch/-/escallmatch-1.5.0.tgz", - "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", - "dev": true, - "requires": { - "call-matcher": "^1.0.0", - "esprima": "^2.0.0" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - } - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", - "dev": true, - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "dev": true, - "requires": { - "es6-map": "^0.1.3", - "es6-weak-map": "^2.0.1", - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.2.0.tgz", - "integrity": "sha512-zlggW1qp7/TBjwLfouRoY7eWXrXwJZFqCdIxxh0/LVB/QuuKuIMkzyUZEcDo6LBadsry5JcEMxIqd3H/66CXVg==", - "dev": true, - "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.2", - "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", - "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.5", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^1.1.0", - "require-uncached": "^1.0.3", - "semver": "^5.5.0", - "string.prototype.matchall": "^2.0.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^4.0.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "globals": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", - "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", - "dev": true - }, - "ignore": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", - "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "eslint-config-prettier": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz", - "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", - "dev": true, - "requires": { - "get-stdin": "^5.0.1" - }, - "dependencies": { - "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", - "dev": true - } - } - }, - "eslint-plugin-es": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", - "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", - "dev": true, - "requires": { - "eslint-utils": "^1.3.0", - "regexpp": "^2.0.0" - }, - "dependencies": { - "regexpp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", - "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", - "dev": true - } - } - }, - "eslint-plugin-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", - "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", - "dev": true, - "requires": { - "eslint-plugin-es": "^1.3.1", - "eslint-utils": "^1.3.1", - "ignore": "^4.0.2", - "minimatch": "^3.0.4", - "resolve": "^1.8.1", - "semver": "^5.5.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", - "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - } - } - }, - "eslint-plugin-prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz", - "integrity": "sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og==", - "dev": true, - "requires": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" - } - }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", - "dev": true - }, - "espower": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.1.tgz", - "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", - "dev": true, - "requires": { - "array-find": "^1.0.0", - "escallmatch": "^1.5.0", - "escodegen": "^1.7.0", - "escope": "^3.3.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.3.0", - "estraverse": "^4.1.0", - "source-map": "^0.5.0", - "type-name": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "espower-loader": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/espower-loader/-/espower-loader-1.2.2.tgz", - "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", - "dev": true, - "requires": { - "convert-source-map": "^1.1.0", - "espower-source": "^2.0.0", - "minimatch": "^3.0.0", - "source-map-support": "^0.4.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - } - } - }, - "espower-location-detector": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/espower-location-detector/-/espower-location-detector-1.0.0.tgz", - "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", - "dev": true, - "requires": { - "is-url": "^1.2.1", - "path-is-absolute": "^1.0.0", - "source-map": "^0.5.0", - "xtend": "^4.0.0" - } - }, - "espower-source": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.3.0.tgz", - "integrity": "sha512-Wc4kC4zUAEV7Qt31JRPoBUc5jjowHRylml2L2VaDQ1XEbnqQofGWx+gPR03TZAPokAMl5dqyL36h3ITyMXy3iA==", - "dev": true, - "requires": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.10", - "convert-source-map": "^1.1.1", - "empower-assert": "^1.0.0", - "escodegen": "^1.10.0", - "espower": "^2.1.1", - "estraverse": "^4.0.0", - "merge-estraverse-visitors": "^1.0.0", - "multi-stage-sourcemap": "^0.2.1", - "path-is-absolute": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "espree": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", - "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", - "dev": true, - "requires": { - "acorn": "^5.6.0", - "acorn-jsx": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "espurify": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.1.tgz", - "integrity": "sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==", - "requires": { - "core-js": "^2.0.0" - } - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "eventid": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/eventid/-/eventid-0.1.2.tgz", - "integrity": "sha1-CyMtPiROpbHVKJhBQOpprH7IkhU=", - "requires": { - "d64": "^1.0.0", - "uuid": "^3.0.1" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" - }, - "fast-diff": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", - "dev": true - }, - "fast-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", - "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.1", - "micromatch": "^3.1.10" - } - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true, - "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "dev": true, - "requires": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "dev": true, - "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" - } - }, - "fn-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", - "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=", - "dev": true - }, - "follow-redirects": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.1.tgz", - "integrity": "sha512-v9GI1hpaqq1ZZR6pBD1+kI7O24PhDvNGNodjS3MdcEqyrahCp8zbtpv+2B/krUnSmUH80lbAS7MrdeK5IylgKg==", - "requires": { - "debug": "^3.1.0" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "requires": { - "map-cache": "^0.2.2" - } - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "function-name-support": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/function-name-support/-/function-name-support-0.2.0.tgz", - "integrity": "sha1-VdO/qm6v1QWlD5vIH99XVkoLsHE=", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gcp-metadata": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.7.0.tgz", - "integrity": "sha512-ffjC09amcDWjh3VZdkDngIo7WoluyC5Ag9PAYxZbmQLOLNI8lvPtoKTSCyU54j2gwy5roZh6sSMTfkY2ct7K3g==", - "requires": { - "axios": "^0.18.0", - "extend": "^3.0.1", - "retry-axios": "0.3.2" - } - }, - "gcs-resumable-upload": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.10.2.tgz", - "integrity": "sha1-fymz7iPc7EFwNnwHEUGCScZgVF8=", - "dev": true, - "requires": { - "configstore": "^3.1.2", - "google-auto-auth": "^0.10.0", - "pumpify": "^1.4.0", - "request": "^2.85.0", - "stream-events": "^1.0.3" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" - }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", - "dev": true, - "requires": { - "ini": "^1.3.4" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "google-auth-library": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz", - "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==", - "requires": { - "axios": "^0.18.0", - "gcp-metadata": "^0.6.3", - "gtoken": "^2.3.0", - "jws": "^3.1.5", - "lodash.isstring": "^4.0.1", - "lru-cache": "^4.1.3", - "retry-axios": "^0.3.2" - }, - "dependencies": { - "gcp-metadata": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", - "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", - "requires": { - "axios": "^0.18.0", - "extend": "^3.0.1", - "retry-axios": "0.3.2" - } - } - } - }, - "google-auto-auth": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", - "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", - "dev": true, - "requires": { - "async": "^2.3.0", - "gcp-metadata": "^0.6.1", - "google-auth-library": "^1.3.1", - "request": "^2.79.0" - }, - "dependencies": { - "gcp-metadata": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", - "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", - "dev": true, - "requires": { - "axios": "^0.18.0", - "extend": "^3.0.1", - "retry-axios": "0.3.2" - } - } - } - }, - "google-gax": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.18.0.tgz", - "integrity": "sha512-cF2s3aTw1cWDHsjaYfIizJZT0KJF0FSM3laiCX4O/K0ZcdmeE9PitG2bxRH+dY+Sz094//m+JoH1hBtSyOf67A==", - "requires": { - "@grpc/proto-loader": "^0.3.0", - "duplexify": "^3.6.0", - "extend": "^3.0.1", - "globby": "^8.0.1", - "google-auth-library": "^1.6.1", - "google-proto-files": "^0.16.0", - "grpc": "^1.12.2", - "is-stream-ended": "^0.1.4", - "lodash": "^4.17.10", - "protobufjs": "^6.8.8", - "retry-request": "^4.0.0", - "through2": "^2.0.3" - }, - "dependencies": { - "@grpc/proto-loader": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.3.0.tgz", - "integrity": "sha512-9b8S/V+3W4Gv7G/JKSZ48zApgyYbfIR7mAC9XNnaSWme3zj57MIESu0ELzm9j5oxNIpFG8DgO00iJMIUZ5luqw==", - "requires": { - "@types/lodash": "^4.14.104", - "@types/node": "^9.4.6", - "lodash": "^4.17.5", - "protobufjs": "^6.8.6" - } - }, - "@types/node": { - "version": "9.6.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.25.tgz", - "integrity": "sha512-uZpzO9MKSHy7zBiTtziA3JgZP3upcAvLTASkKgheLj6/rNZmRX4UyvsFYaY2kbYcmmh8bNZ2T0eocBRCfZdGvQ==" - } - } - }, - "google-p12-pem": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", - "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", - "requires": { - "node-forge": "^0.7.4", - "pify": "^3.0.0" - } - }, - "google-proto-files": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", - "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", - "requires": { - "globby": "^8.0.0", - "power-assert": "^1.4.4", - "protobufjs": "^6.8.0" - } - }, - "got": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/got/-/got-8.3.0.tgz", - "integrity": "sha512-kBNy/S2CGwrYgDSec5KTWGKUvupwkkTVAjIsVFF2shXO13xpZdFP4d4kxa//CLX2tN/rV0aYwK8vY6UKWGn2vQ==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" - }, - "dependencies": { - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0" - } - } - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "grpc": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.1.tgz", - "integrity": "sha512-yl0xChnlUISTefOPU2NQ1cYPh5m/DTatEUV6jdRyQPE9NCrtPq7Gn6J2alMTglN7ufYbJapOd00dvhGurHH6HQ==", - "requires": { - "lodash": "^4.17.5", - "nan": "^2.0.0", - "node-pre-gyp": "^0.10.0", - "protobufjs": "^5.0.3" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true - }, - "iconv-lite": { - "version": "0.4.23", - "bundled": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.5", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, - "minipass": { - "version": "2.3.3", - "bundled": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true - } - } - }, - "ms": { - "version": "2.0.0", - "bundled": true - }, - "needle": { - "version": "2.2.1", - "bundled": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.3", - "bundled": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true - }, - "npm-packlist": { - "version": "1.1.11", - "bundled": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true - }, - "protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" - } - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true - }, - "sax": { - "version": "1.2.4", - "bundled": true - }, - "semver": { - "version": "5.5.0", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - }, - "tar": { - "version": "4.4.4", - "bundled": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.3", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true - } - } - }, - "gtoken": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", - "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", - "requires": { - "axios": "^0.18.0", - "google-p12-pem": "^1.0.0", - "jws": "^3.1.4", - "mime": "^2.2.0", - "pify": "^3.0.0" - } - }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-color": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", - "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", - "dev": true - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "has-yarn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-1.0.0.tgz", - "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", - "dev": true - }, - "hash-stream-validation": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/hash-stream-validation/-/hash-stream-validation-0.2.1.tgz", - "integrity": "sha1-7Mm5l7IYvluzEphii7gHhptz3NE=", - "dev": true, - "requires": { - "through2": "^2.0.0" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "htmlparser2": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", - "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "hullabaloo-config-manager": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/hullabaloo-config-manager/-/hullabaloo-config-manager-1.1.1.tgz", - "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "es6-error": "^4.0.2", - "graceful-fs": "^4.1.11", - "indent-string": "^3.1.0", - "json5": "^0.5.1", - "lodash.clonedeep": "^4.5.0", - "lodash.clonedeepwith": "^4.5.0", - "lodash.isequal": "^4.5.0", - "lodash.merge": "^4.6.0", - "md5-hex": "^2.0.0", - "package-hash": "^2.0.0", - "pkg-dir": "^2.0.0", - "resolve-from": "^3.0.0", - "safe-buffer": "^5.0.1" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" - }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", - "dev": true - }, - "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "import-local": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-0.1.1.tgz", - "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", - "dev": true, - "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "ink-docstrap": { - "version": "git+https://github.com/docstrap/docstrap.git#1e56828b819bcbc9855543bd20809a0aed415a80", - "from": "git+https://github.com/docstrap/docstrap.git", - "dev": true, - "requires": { - "moment": "^2.14.1", - "sanitize-html": "^1.13.0" - } - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "intelli-espower-loader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/intelli-espower-loader/-/intelli-espower-loader-1.0.1.tgz", - "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", - "dev": true, - "requires": { - "espower-loader": "^1.0.0" - } - }, - "into-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", - "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", - "dev": true, - "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" - } - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "irregular-plurals": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", - "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", - "dev": true - }, - "is": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", - "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=" - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-ci": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", - "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", - "dev": true, - "requires": { - "ci-info": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-error": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.1.tgz", - "integrity": "sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-generator-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", - "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "dev": true, - "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - } - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", - "dev": true - }, - "is-observable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", - "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", - "dev": true, - "requires": { - "symbol-observable": "^1.1.0" - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-stream-ended": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", - "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", - "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", - "dev": true, - "requires": { - "@babel/generator": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/traverse": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "istanbul-lib-coverage": "^2.0.1", - "semver": "^5.5.0" - } - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "jest-docblock": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", - "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==", - "dev": true - }, - "js-string-escape": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", - "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "js2xmlparser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", - "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", - "dev": true, - "requires": { - "xmlcreate": "^1.0.1" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "jsdoc": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", - "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", - "dev": true, - "requires": { - "babylon": "7.0.0-beta.19", - "bluebird": "~3.5.0", - "catharsis": "~0.8.9", - "escape-string-regexp": "~1.0.5", - "js2xmlparser": "~3.0.0", - "klaw": "~2.0.0", - "marked": "~0.3.6", - "mkdirp": "~0.5.1", - "requizzle": "~0.2.1", - "strip-json-comments": "~2.0.1", - "taffydb": "2.6.2", - "underscore": "~1.8.3" - }, - "dependencies": { - "babylon": { - "version": "7.0.0-beta.19", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz", - "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A==", - "dev": true - } - } - }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "just-extend": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", - "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", - "dev": true - }, - "jwa": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", - "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", - "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", - "requires": { - "jwa": "^1.1.5", - "safe-buffer": "^5.0.1" - } - }, - "keyv": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", - "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "klaw": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", - "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "last-line-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/last-line-stream/-/last-line-stream-1.0.0.tgz", - "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", - "dev": true, - "requires": { - "through2": "^2.0.0" - } - }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true, - "requires": { - "package-json": "^4.0.0" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" - }, - "lodash.chunk": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", - "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw=", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.clonedeepwith": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz", - "integrity": "sha1-buMFc6A6GmDWcKYu8zwQzxr9vdQ=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", - "dev": true - }, - "lodash.escaperegexp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", - "dev": true - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", - "dev": true - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, - "lodash.merge": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", - "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true - }, - "lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", - "dev": true - }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true - }, - "lolex": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", - "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", - "dev": true - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "requires": { - "object-visit": "^1.0.0" - } - }, - "marked": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", - "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", - "dev": true - }, - "matcher": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz", - "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.4" - } - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "md5-hex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", - "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", - "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-estraverse-visitors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/merge-estraverse-visitors/-/merge-estraverse-visitors-1.0.0.tgz", - "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "merge2": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", - "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==" - }, - "methmeth": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/methmeth/-/methmeth-1.1.0.tgz", - "integrity": "sha1-6AomYY5S9cQiKGG7dIUQvRDikIk=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" - }, - "mime-db": { - "version": "1.35.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" - }, - "mime-types": { - "version": "2.1.19", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", - "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", - "requires": { - "mime-db": "~1.35.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", - "dev": true, - "requires": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - } - }, - "modelo": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/modelo/-/modelo-4.2.3.tgz", - "integrity": "sha512-9DITV2YEMcw7XojdfvGl3gDD8J9QjZTJ7ZOUuSAkP+F3T6rDbzMJuPktxptsdHYEvZcmXrCD3LMOhdSAEq6zKA==", - "dev": true - }, - "module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", - "dev": true - }, - "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multi-stage-sourcemap": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/multi-stage-sourcemap/-/multi-stage-sourcemap-0.2.1.tgz", - "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", - "dev": true, - "requires": { - "source-map": "^0.1.34" - }, - "dependencies": { - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "nice-try": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", - "dev": true - }, - "nise": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", - "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", - "lolex": "^2.3.2", - "path-to-regexp": "^1.7.0", - "text-encoding": "^0.6.4" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", - "dev": true, - "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - }, - "dependencies": { - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - } - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "nyc": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-12.0.2.tgz", - "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^2.1.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.5", - "istanbul-reports": "^1.4.1", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", - "yargs": "11.1.0", - "yargs-parser": "^8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "atob": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "base": { - "version": "0.11.2", - "bundled": true, - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "class-utils": { - "version": "0.3.6", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^2.0.0" - } - }, - "define-property": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fragment-cache": { - "version": "0.2.1", - "bundled": true, - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "get-value": { - "version": "2.0.6", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "has-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hosted-git-info": { - "version": "2.6.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-odd": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "bundled": true, - "dev": true - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - } - }, - "istanbul-reports": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } - } - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "lru-cache": { - "version": "4.1.3", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-cache": { - "version": "0.2.2", - "bundled": true, - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "nanomatch": { - "version": "1.2.9", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pascalcase": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "regex-not": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "ret": { - "version": "0.1.15", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-regex": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "set-value": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "bundled": true, - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "split-string": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" - } - }, - "to-object-path": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "union-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "bundled": true, - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "bundled": true, - "dev": true - }, - "use": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "validate-npm-package-license": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "yargs": { - "version": "11.1.0", - "bundled": true, - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "yargs-parser": { - "version": "9.0.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "8.1.0", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } - } - } - } - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "requires": { - "isobject": "^3.0.0" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, - "observable-to-promise": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/observable-to-promise/-/observable-to-promise-0.5.0.tgz", - "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", - "dev": true, - "requires": { - "is-observable": "^0.2.0", - "symbol-observable": "^1.0.4" - }, - "dependencies": { - "is-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", - "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", - "dev": true, - "requires": { - "symbol-observable": "^0.2.2" - }, - "dependencies": { - "symbol-observable": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", - "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", - "dev": true - } - } - } - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "option-chain": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/option-chain/-/option-chain-1.0.0.tgz", - "integrity": "sha1-k41zvU4Xg/lI00AjZEraI2aeMPI=", - "dev": true - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - } - } - }, - "optjs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-cancelable": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", - "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", - "dev": true - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "package-hash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-2.0.0.tgz", - "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "lodash.flattendeep": "^4.4.0", - "md5-hex": "^2.0.0", - "release-zalgo": "^1.0.0" - } - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "dev": true, - "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" - }, - "dependencies": { - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "dev": true, - "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - } - } - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-ms": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz", - "integrity": "sha1-3T+iXtbC78e93hKtm0bBY6opIk4=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", - "dev": true - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "^3.0.0" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "pinkie": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", - "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", - "dev": true - }, - "pinkie-promise": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", - "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", - "dev": true, - "requires": { - "pinkie": "^1.0.0" - } - }, - "pkg-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" - }, - "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "plur": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", - "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", - "dev": true, - "requires": { - "irregular-plurals": "^1.0.0" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "power-assert": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.0.tgz", - "integrity": "sha512-nDb6a+p2C7Wj8Y2zmFtLpuv+xobXz4+bzT5s7dr0nn71tLozn7nRMQqzwbefzwZN5qOm0N7Cxhw4kXP75xboKA==", - "requires": { - "define-properties": "^1.1.2", - "empower": "^1.3.0", - "power-assert-formatter": "^1.4.1", - "universal-deep-strict-equal": "^1.2.1", - "xtend": "^4.0.0" - } - }, - "power-assert-context-formatter": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", - "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", - "requires": { - "core-js": "^2.0.0", - "power-assert-context-traversal": "^1.2.0" - } - }, - "power-assert-context-reducer-ast": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", - "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", - "requires": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.12", - "core-js": "^2.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.2.0" - } - }, - "power-assert-context-traversal": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", - "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", - "requires": { - "core-js": "^2.0.0", - "estraverse": "^4.1.0" - } - }, - "power-assert-formatter": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", - "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", - "requires": { - "core-js": "^2.0.0", - "power-assert-context-formatter": "^1.0.7", - "power-assert-context-reducer-ast": "^1.0.7", - "power-assert-renderer-assertion": "^1.0.7", - "power-assert-renderer-comparison": "^1.0.7", - "power-assert-renderer-diagram": "^1.0.7", - "power-assert-renderer-file": "^1.0.7" - } - }, - "power-assert-renderer-assertion": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", - "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", - "requires": { - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0" - } - }, - "power-assert-renderer-base": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-base/-/power-assert-renderer-base-1.1.1.tgz", - "integrity": "sha1-lqZQxv0F7hvB9mtUrWFELIs/Y+s=" - }, - "power-assert-renderer-comparison": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", - "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", - "requires": { - "core-js": "^2.0.0", - "diff-match-patch": "^1.0.0", - "power-assert-renderer-base": "^1.1.1", - "stringifier": "^1.3.0", - "type-name": "^2.0.1" - } - }, - "power-assert-renderer-diagram": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", - "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", - "requires": { - "core-js": "^2.0.0", - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0", - "stringifier": "^1.3.0" - } - }, - "power-assert-renderer-file": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", - "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", - "requires": { - "power-assert-renderer-base": "^1.1.1" - } - }, - "power-assert-util-string-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", - "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", - "requires": { - "eastasianwidth": "^0.2.0" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "prettier": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.0.tgz", - "integrity": "sha512-KtQ2EGaUwf2EyDfp1fxyEb0PqGKakVm0WyXwDt6u+cAoxbO2Z2CwKvOe3+b4+F2IlO9lYHi1kqFuRM70ddBnow==", - "dev": true - }, - "pretty-ms": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.2.0.tgz", - "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", - "dev": true, - "requires": { - "parse-ms": "^1.0.0" - }, - "dependencies": { - "parse-ms": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", - "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", - "dev": true - } - } - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", - "dev": true - }, - "propprop": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/propprop/-/propprop-0.3.1.tgz", - "integrity": "sha1-oEmjVouJZEAGfRXY7J8zc15XAXg=", - "dev": true - }, - "protobufjs": { - "version": "6.8.8", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", - "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.0", - "@types/node": "^10.1.0", - "long": "^4.0.0" - } - }, - "proxyquire": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.0.1.tgz", - "integrity": "sha512-fQr3VQrbdzHrdaDn3XuisVoJlJNDJizHAvUXw9IuXRR8BpV2x0N7LsCxrpJkeKfPbNjiNU/V5vc008cI0TmzzQ==", - "dev": true, - "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.0", - "resolve": "~1.5.0" - }, - "dependencies": { - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - } - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "dependencies": { - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - }, - "dependencies": { - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - } - } - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2" - } - }, - "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", - "dev": true - }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true, - "requires": { - "rc": "^1.0.1" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - } - }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "require-precompiled": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/require-precompiled/-/require-precompiled-0.1.0.tgz", - "integrity": "sha1-WhtS63Dr7UPrmC6XTIWrWVceVvo=", - "dev": true - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true - } - } - }, - "requizzle": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", - "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", - "dev": true, - "requires": { - "underscore": "~1.6.0" - }, - "dependencies": { - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", - "dev": true - } - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" - }, - "retry-axios": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-0.3.2.tgz", - "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==" - }, - "retry-request": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", - "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", - "requires": { - "through2": "^2.0.0" - } - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "5.5.11", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", - "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - }, - "dependencies": { - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, - "sanitize-html": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.2.tgz", - "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "htmlparser2": "^3.9.0", - "lodash.clonedeep": "^4.5.0", - "lodash.escaperegexp": "^4.1.2", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.mergewith": "^4.6.0", - "postcss": "^6.0.14", - "srcset": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "dev": true, - "requires": { - "semver": "^5.0.3" - } - }, - "serialize-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", - "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "sinon": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.0.1.tgz", - "integrity": "sha512-rfszhNcfamK2+ofIPi9XqeH89pH7KGDcAtM+F9CsjHXOK3jzWG99vyhyD2V+r7s4IipmWcWUFYq4ftZ9/Eu2Wg==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^2.0.0", - "diff": "^3.5.0", - "lodash.get": "^4.4.2", - "lolex": "^2.4.2", - "nise": "^1.3.3", - "supports-color": "^5.4.0", - "type-detect": "^4.0.8" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - } - } - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, - "snakecase-keys": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-1.2.0.tgz", - "integrity": "sha512-G5Faa3wQevGXcD5e4JKfmgofO+Fu4Jg4/nLyeZqWmBqVV0/3ORgervt3EjBi6PEFKhztPQWegZspteWnycx5dg==", - "requires": { - "map-obj": "~2.0.0", - "to-snake-case": "~0.1.2" - } - }, - "snakeize": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/snakeize/-/snakeize-0.1.0.tgz", - "integrity": "sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", - "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "split-array-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-2.0.0.tgz", - "integrity": "sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg==", - "requires": { - "is-stream-ended": "^0.1.4" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "srcset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz", - "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", - "dev": true, - "requires": { - "array-uniq": "^1.0.2", - "number-is-nan": "^1.0.0" - } - }, - "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stream-events": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.4.tgz", - "integrity": "sha512-D243NJaYs/xBN2QnoiMDY7IesJFIK7gEhnvAYqJa5JvDdnh2dC4qDBwlCf0ohPpX2QRlA/4gnbnPd3rs3KxVcA==", - "requires": { - "stubs": "^3.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/string/-/string-3.3.3.tgz", - "integrity": "sha1-XqIRzZLSKOGEKUmQpsyXs2anfLA=", - "dev": true - }, - "string-format-obj": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz", - "integrity": "sha512-Mm+sROy+pHJmx0P/0Bs1uxIX6UhGJGj6xDGQZ5zh9v/SZRmLGevp+p0VJxV7lirrkAmQ2mvva/gHKpnF/pTb+Q==", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.matchall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", - "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.10.0", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "regexp.prototype.flags": "^1.2.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringifier": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", - "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", - "requires": { - "core-js": "^2.0.0", - "traverse": "^0.6.6", - "type-name": "^2.0.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-bom-buf": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", - "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", - "dev": true, - "requires": { - "is-utf8": "^0.2.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "stubs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=" - }, - "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "dev": true, - "requires": { - "component-emitter": "^1.2.0", - "cookiejar": "^2.1.0", - "debug": "^3.1.0", - "extend": "^3.0.0", - "form-data": "^2.3.1", - "formidable": "^1.1.1", - "methods": "^1.1.1", - "mime": "^1.4.1", - "qs": "^6.5.1", - "readable-stream": "^2.0.5" - }, - "dependencies": { - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - } - } - }, - "supertap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supertap/-/supertap-1.0.0.tgz", - "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "indent-string": "^3.2.0", - "js-yaml": "^3.10.0", - "serialize-error": "^2.1.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "supertest": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.1.0.tgz", - "integrity": "sha512-O44AMnmJqx294uJQjfUmEyYOg7d9mylNFsMw/Wkz4evKd1njyPrtCN+U6ZIC7sKtfEVQhfTqFFijlXx8KP/Czw==", - "dev": true, - "requires": { - "methods": "~1.1.2", - "superagent": "3.8.2" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - } - } - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, - "table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", - "dev": true, - "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "taffydb": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", - "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", - "dev": true - }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - } - }, - "text-encoding": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", - "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", - "dev": true - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "time-zone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", - "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", - "dev": true - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "to-no-case": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-0.1.1.tgz", - "integrity": "sha1-zzPHDg8oFo2V5BWavxUOjFQu+f4=" - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "to-snake-case": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/to-snake-case/-/to-snake-case-0.1.2.tgz", - "integrity": "sha1-0Ee22/BI2uG9wmCzwpb1TKNO7Xw=", - "requires": { - "to-space-case": "0.1.2" - } - }, - "to-space-case": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-0.1.2.tgz", - "integrity": "sha1-mma+Pr5T8nefaH8CYu/9H8W20V4=", - "requires": { - "to-no-case": "0.1.1" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "requires": { - "punycode": "^1.4.1" - } - }, - "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trim-off-newlines": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", - "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/type-name/-/type-name-2.0.2.tgz", - "integrity": "sha1-7+fUEj2KxSr/9/QMfk3sUmYAj7Q=" - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true, - "optional": true - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "optional": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "uid2": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", - "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I=", - "dev": true - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", - "dev": true - }, - "underscore-contrib": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", - "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", - "dev": true, - "requires": { - "underscore": "1.6.0" - }, - "dependencies": { - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", - "dev": true - } - } - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "dev": true, - "requires": { - "crypto-random-string": "^1.0.0" - } - }, - "unique-temp-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz", - "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", - "dev": true, - "requires": { - "mkdirp": "^0.5.1", - "os-tmpdir": "^1.0.1", - "uid2": "0.0.3" - } - }, - "universal-deep-strict-equal": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", - "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", - "requires": { - "array-filter": "^1.0.0", - "indexof": "0.0.1", - "object-keys": "^1.0.0" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - } - } - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, - "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", - "dev": true, - "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true - }, - "urlgrey": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", - "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "well-known-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-1.0.0.tgz", - "integrity": "sha1-c8eK6Bp3Jqj6WY4ogIAcixYiVRg=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "widest-line": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", - "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", - "dev": true, - "requires": { - "string-width": "^2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "write-json-file": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", - "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", - "dev": true, - "requires": { - "detect-indent": "^5.0.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "pify": "^3.0.0", - "sort-keys": "^2.0.0", - "write-file-atomic": "^2.0.0" - }, - "dependencies": { - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", - "dev": true - } - } - }, - "write-pkg": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", - "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", - "dev": true, - "requires": { - "sort-keys": "^2.0.0", - "write-json-file": "^2.2.0" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true - }, - "xmlcreate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", - "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - } - } -} From 8d282ac03fc76c7cd1a04a73a081d04648d2b40a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 9 Aug 2018 14:42:47 -0700 Subject: [PATCH 0210/1029] chore: do not use npm ci (#189) --- handwritten/logging/synth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index dd91031e0fc..7cdfcc0eb96 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -40,6 +40,6 @@ ''' Node.js specific cleanup ''' -subprocess.run(['npm', 'ci']) +subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) From 3e1cb3904a4a5022dd3edc2b63ffcdb63c7dab13 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 16 Aug 2018 16:28:46 -0700 Subject: [PATCH 0211/1029] chore(deps): update dependency eslint-config-prettier to v3 (#190) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 855b467de14..0d7528e4523 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -87,7 +87,7 @@ "async": "^2.6.1", "codecov": "^3.0.2", "eslint": "^5.0.0", - "eslint-config-prettier": "^2.9.0", + "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.6.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", From c46c8c4756d01a8b7e5f521f48c1456abd452ac8 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 17 Aug 2018 12:03:35 -0700 Subject: [PATCH 0212/1029] fix(gke): include namespace_id in resource (#191) Logging requires a namespace_id field for the GKE 'container' monitored resource descriptor. namespace_id is not easily available, but the namespace_name works, and is the current recommended workaround by the Logging team. Fixes: https://github.com/googleapis/nodejs-logging-bunyan/issues/123 --- handwritten/logging/src/metadata.js | 49 ++++++++++++++++++++-------- handwritten/logging/test/metadata.js | 25 ++++++++++++++ 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 5cc92faf900..51c72711c28 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -16,6 +16,7 @@ 'use strict'; +var fs = require('fs'); var gcpMetadata = require('gcp-metadata'); /** @@ -34,6 +35,9 @@ function Metadata(logging) { this.logging = logging; } +Metadata.KUBERNETES_NAMESPACE_ID_PATH = + '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; + /** * Create a descriptor for Cloud Functions. * @@ -91,19 +95,38 @@ Metadata.getGCEDescriptor = function(callback) { * @return {object} */ Metadata.getGKEDescriptor = function(callback) { - gcpMetadata - .instance('attributes/cluster-name') - .then(function(resp) { - callback(null, { - type: 'container', - labels: { - // note(ofrobots): it would be good to include the namespace_id as - // well. - cluster_name: resp.data, - }, - }); - }) - .catch(callback); + // Stackdriver Logging Monitored Resource for 'container' requires + // cluster_name and namespace_id fields. Note that these *need* to be + // snake_case. The namespace_id is not easily available from inside the + // container, but we can get the namespace_name. Logging has been using the + // namespace_name in place of namespace_id for a while now. Log correlation + // with metrics may not necessarily work however. + // + gcpMetadata.instance('attributes/cluster-name').then(function(resp) { + fs.readFile( + Metadata.KUBERNETES_NAMESPACE_ID_PATH, + 'utf8', + (err, namespace) => { + if (err) { + callback( + new Error( + `Error reading ` + + `${Metadata.KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}` + ) + ); + return; + } + + callback(null, { + type: 'container', + labels: { + cluster_name: resp.data, + namespace_id: namespace, + }, + }); + } + ); + }, callback); }; /** diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 56f4abca949..44d326587b2 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -41,6 +41,18 @@ var fakeGcpMetadata = { }, }; +var FAKE_READFILE_ERROR_MESSAGE = 'fake readFile error'; +var FAKE_READFILE_CONTENTS = 'fake readFile contents'; +var readFileShouldError; +var fakeFS = { + readFile: (filename, encoding, callback) => { + setImmediate(() => { + if (readFileShouldError) callback(new Error(FAKE_READFILE_ERROR_MESSAGE)); + else callback(null, FAKE_READFILE_CONTENTS); + }); + }, +}; + describe('metadata', function() { var MetadataCached; var Metadata; @@ -53,6 +65,7 @@ describe('metadata', function() { before(function() { Metadata = proxyquire('../src/metadata.js', { 'gcp-metadata': fakeGcpMetadata, + fs: fakeFS, }); MetadataCached = extend({}, Metadata); @@ -65,6 +78,7 @@ describe('metadata', function() { extend(Metadata, MetadataCached); metadata = new Metadata(LOGGING); instanceOverride = null; + readFileShouldError = false; }); afterEach(function() { @@ -141,6 +155,7 @@ describe('metadata', function() { type: 'container', labels: { cluster_name: CLUSTER_NAME, + namespace_id: FAKE_READFILE_CONTENTS, }, }); done(); @@ -158,6 +173,15 @@ describe('metadata', function() { done(); }); }); + + it('should return error when read of namespace file fails', function(done) { + readFileShouldError = true; + Metadata.getGKEDescriptor(function(err) { + assert.ok(err); + assert.ok(err.message.includes(FAKE_READFILE_ERROR_MESSAGE)); + done(); + }); + }); }); describe('getGCEDescriptor', function() { @@ -295,6 +319,7 @@ describe('metadata', function() { type: 'container', labels: { cluster_name: CLUSTER_NAME, + namespace_id: FAKE_READFILE_CONTENTS, }, }); done(); From 1b92d13cb99d5c68f5a7e646d0f045e7a5808f72 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 20 Aug 2018 10:57:27 -0700 Subject: [PATCH 0213/1029] chore: Release v3.0.0 (#192) --- handwritten/logging/CHANGELOG.md | 33 ++++++++++++++++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 handwritten/logging/CHANGELOG.md diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md new file mode 100644 index 00000000000..366a2d13778 --- /dev/null +++ b/handwritten/logging/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +[npm history][1] + +[1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions + +## v3.0.0 + +**This release has breaking changes**. Support for Node.js 4.x and 9.x has been dropped for this release. + +### Bug fixes +- fix(gke): include namespace_id in resource (#191) +- fix: drop support for node.js 4.x and 9.x (#161) +- Re-generate library using /synth.py (#154) + +### Keepin' the lights on +- chore(deps): update dependency eslint-config-prettier to v3 (#190) +- chore: do not use npm ci (#189) +- chore: ignore package-lock.json (#186) +- chore: update renovate config (#184) +- remove that whitespace (#183) +- fix(deps): update dependency google-gax to ^0.18.0 (#182) +- chore(deps): lock file maintenance (#181) +- setup: just npm ci in synth.py (#180) +- chore: move mocha options to mocha.opts (#177) +- chore: require node 8 for samples (#179) +- fix(deps): update dependency fluent-logger to v3 (#172) +- fix: get eslint passing (#174) +- chore(deps): update dependency eslint-plugin-node to v7 (#169) +- test: use strictEqual in tests (#170) +- fix(deps): update dependency gcp-metadata to ^0.7.0 (#166) +- fix(deps): update dependency @google-cloud/logging to v2 (#157) + diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0d7528e4523..ed04ebf50e8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "2.0.0", + "version": "3.0.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 397671184ef2fa9b44c4221461a6425c767d1376 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 20 Aug 2018 22:13:13 -0700 Subject: [PATCH 0214/1029] fix(gke): correctly detect kubernetes engine (#193) The value actually returned by google-auth-library is KUBERNETES_ENGINE. https://github.com/google/google-auth-library-nodejs/blob/bad432105f5ad0203266e9c6b31d2235fc96534b/src/auth/envDetect.ts#L21 This regressed in https://github.com/googleapis/nodejs-logging/pull/128. --- handwritten/logging/src/metadata.js | 2 +- handwritten/logging/test/metadata.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 51c72711c28..9ce6d96ece6 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -149,7 +149,7 @@ Metadata.prototype.getDefaultResource = function(callback) { this.logging.auth .getEnv() .then(env => { - if (env === 'CONTAINER_ENGINE') { + if (env === 'KUBERNETES_ENGINE') { Metadata.getGKEDescriptor(callback); } else if (env === 'APP_ENGINE') { callback(null, Metadata.getGAEDescriptor()); diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 44d326587b2..26cc7d472e9 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -310,7 +310,7 @@ describe('metadata', function() { }; metadata.logging.auth.getEnv = function() { - return Promise.resolve('CONTAINER_ENGINE'); + return Promise.resolve('KUBERNETES_ENGINE'); }; metadata.getDefaultResource(function(err, defaultResource) { From 9020a2c540964e3b515b57193a14d1e1ed068413 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 21 Aug 2018 10:23:13 -0700 Subject: [PATCH 0215/1029] chore: Release nodejs-logging v3.0.1 (#196) --- handwritten/logging/CHANGELOG.md | 8 +++++++- handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 366a2d13778..6f99726d9c7 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,9 +4,15 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v3.0.1 + +### Fixes +- fix(deps): update dependency @google-cloud/logging to v3 (#195) +- fix(gke): correctly detect kubernetes engine (#193) + ## v3.0.0 -**This release has breaking changes**. Support for Node.js 4.x and 9.x has been dropped for this release. +**This should not have been a semver major release. There are no breaking changes.** ### Bug fixes - fix(gke): include namespace_id in resource (#191) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ed04ebf50e8..89554d07c26 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "3.0.0", + "version": "3.0.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 48b7b6fed8eddfaffd2ade052a42adc13df06c5a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 22 Aug 2018 07:24:53 -0700 Subject: [PATCH 0216/1029] fix(deps): update dependency google-gax to ^0.19.0 (#198) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 89554d07c26..59db9ecd2d8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,7 +69,7 @@ "extend": "^3.0.1", "gcp-metadata": "^0.7.0", "google-auth-library": "^1.6.0", - "google-gax": "^0.18.0", + "google-gax": "^0.19.0", "google-proto-files": "^0.16.1", "is": "^3.2.1", "lodash.merge": "^4.6.1", From b78fa0945cf75ba6684d7f0ad9242fff4107cc55 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 28 Aug 2018 07:59:16 -0700 Subject: [PATCH 0217/1029] chore(deps): update dependency nyc to v13 (#200) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 59db9ecd2d8..386e6db161b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -95,7 +95,7 @@ "jsdoc": "^3.5.5", "methmeth": "^1.1.0", "mocha": "^5.2.0", - "nyc": "^12.0.2", + "nyc": "^13.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.5", "propprop": "^0.3.1", From f6a8995de63cda7e09eaaeaf2d03df42a18db0f9 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 28 Aug 2018 13:18:55 -0700 Subject: [PATCH 0218/1029] Re-generate library using /synth.py (#202) --- .../src/v2/doc/google/protobuf/doc_any.js | 21 ++++++++++++------- .../v2/doc/google/protobuf/doc_field_mask.js | 6 ++++++ .../v2/doc/google/protobuf/doc_timestamp.js | 8 ++++--- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index f55fa17ff12..c5c5bbafa23 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -97,17 +97,18 @@ * } * * @property {string} typeUrl - * A URL/resource name whose content describes the type of the - * serialized protocol buffer message. + * A URL/resource name that uniquely identifies the type of the serialized + * protocol buffer message. The last segment of the URL's path must represent + * the fully qualified name of the type (as in + * `path/google.protobuf.Duration`). The name should be in a canonical form + * (e.g., leading "." is not accepted). * - * For URLs which use the scheme `http`, `https`, or no scheme, the - * following restrictions and interpretations apply: + * In practice, teams usually precompile into the binary all types that they + * expect it to use in the context of Any. However, for URLs which use the + * scheme `http`, `https`, or no scheme, one can optionally set up a type + * server that maps type URLs to message definitions as follows: * * * If no scheme is provided, `https` is assumed. - * * The last segment of the URL's path must represent the fully - * qualified name of the type (as in `path/google.protobuf.Duration`). - * The name should be in a canonical form (e.g., leading "." is - * not accepted). * * An HTTP GET on the URL must yield a google.protobuf.Type * value in binary format, or produce an error. * * Applications are allowed to cache lookup results based on the @@ -116,6 +117,10 @@ * on changes to types. (Use versioned type names to manage * breaking changes.) * + * Note: this functionality is not currently available in the official + * protobuf release, and it is not used for type URLs beginning with + * type.googleapis.com. + * * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js index c82c2b33949..d700752b7c6 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -218,6 +218,12 @@ * Note that oneof type names ("test_oneof" in this case) cannot be used in * paths. * + * ## Field Mask Verification + * + * The implementation of any API method which has a FieldMask type field in the + * request should verify the included field paths, and return an + * `INVALID_ARGUMENT` error if any path is duplicated or unmappable. + * * @property {string[]} paths * The set of field mask paths. * diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index a02db52bdeb..51d8f40f54d 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -79,7 +79,9 @@ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required, though only UTC (as indicated by "Z") is presently supported. + * is required. A proto3 JSON serializer should always use UTC (as indicated by + * "Z") when printing the Timestamp type and a proto3 JSON parser should be + * able to accept both UTC and other timezones (as indicated by an offset). * * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past * 01:30 UTC on January 15, 2017. @@ -90,8 +92,8 @@ * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com - * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) - * to obtain a formatter capable of generating timestamps in this format. + * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- + * ) to obtain a formatter capable of generating timestamps in this format. * * @property {number} seconds * Represents seconds of UTC time since Unix epoch From 220ce64a7cf7f9453c1a265d8931d9407b43a503 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 29 Aug 2018 11:33:20 -0700 Subject: [PATCH 0219/1029] chore: upgrade to the latest common-grpc (#203) --- handwritten/logging/package.json | 33 ++++++++++--------- handwritten/logging/src/entry.js | 6 ++-- handwritten/logging/src/index.js | 11 ++++--- handwritten/logging/src/log.js | 4 +-- handwritten/logging/src/sink.js | 3 +- handwritten/logging/test/entry.js | 3 +- handwritten/logging/test/index.js | 53 +++++++++++++------------------ handwritten/logging/test/log.js | 10 +++--- handwritten/logging/test/sink.js | 7 ++-- 9 files changed, 61 insertions(+), 69 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 386e6db161b..8a2f18d0ce6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,43 +63,46 @@ "lint": "eslint src/ samples/ system-test/ test/" }, "dependencies": { - "@google-cloud/common-grpc": "^0.7.1", + "@google-cloud/common-grpc": "^0.8.0", + "@google-cloud/paginator": "^0.1.0", + "@google-cloud/projectify": "^0.3.0", + "@google-cloud/promisify": "^0.3.0", "arrify": "^1.0.1", "eventid": "^0.1.2", - "extend": "^3.0.1", + "extend": "^3.0.2", "gcp-metadata": "^0.7.0", - "google-auth-library": "^1.6.0", + "google-auth-library": "^1.6.1", "google-gax": "^0.19.0", "google-proto-files": "^0.16.1", "is": "^3.2.1", "lodash.merge": "^4.6.1", - "protobufjs": "^6.8.6", + "protobufjs": "^6.8.8", "pumpify": "^1.5.1", - "snakecase-keys": "^1.1.1", + "snakecase-keys": "^1.2.0", "stream-events": "^1.0.4", "through2": "^2.0.3" }, "devDependencies": { "@google-cloud/bigquery": "*", - "@google-cloud/nodejs-repo-tools": "^2.3.0", + "@google-cloud/nodejs-repo-tools": "^2.3.3", "@google-cloud/pubsub": "*", "@google-cloud/storage": "*", "async": "^2.6.1", - "codecov": "^3.0.2", - "eslint": "^5.0.0", - "eslint-config-prettier": "^3.0.0", - "eslint-plugin-node": "^7.0.0", - "eslint-plugin-prettier": "^2.6.0", + "codecov": "^3.0.4", + "eslint": "^5.4.0", + "eslint-config-prettier": "^3.0.1", + "eslint-plugin-node": "^7.0.1", + "eslint-plugin-prettier": "^2.6.2", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "methmeth": "^1.1.0", "mocha": "^5.2.0", - "nyc": "^13.0.0", + "nyc": "^13.0.1", "power-assert": "^1.6.0", - "prettier": "^1.13.5", + "prettier": "^1.14.2", "propprop": "^0.3.1", - "proxyquire": "^2.0.1", - "uuid": "^3.2.1" + "proxyquire": "^2.1.0", + "uuid": "^3.3.2" } } diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 1f28ca9de6a..d142e8ccef1 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -16,7 +16,7 @@ 'use strict'; -var commonGrpc = require('@google-cloud/common-grpc'); +var {Service} = require('@google-cloud/common-grpc'); var EventId = require('eventid'); var extend = require('extend'); var is = require('is'); @@ -126,7 +126,7 @@ Entry.fromApiResponse_ = function(entry) { var data = entry[entry.payload]; if (entry.payload === 'jsonPayload') { - data = commonGrpc.Service.structToObj_(data); + data = Service.structToObj_(data); } var serializedEntry = new Entry(entry, data); @@ -153,7 +153,7 @@ Entry.prototype.toJSON = function(options) { var entry = extend(true, {}, this.metadata); if (is.object(this.data)) { - entry.jsonPayload = commonGrpc.Service.objToStruct_(this.data, { + entry.jsonPayload = Service.objToStruct_(this.data, { removeCircular: !!options.removeCircular, stringify: true, }); diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index ba3e58a0dbb..17b60e9d5cd 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -18,6 +18,9 @@ var arrify = require('arrify'); var common = require('@google-cloud/common-grpc'); +const {promisifyAll} = require('@google-cloud/promisify'); +const {paginator} = require('@google-cloud/paginator'); +const {replaceProjectIdToken} = require('@google-cloud/projectify'); var extend = require('extend'); var {GoogleAuth} = require('google-auth-library'); var is = require('is'); @@ -111,8 +114,6 @@ function Logging(options) { return new Logging(options); } - options = common.util.normalizeArguments(this, options); - // Determine what scopes are needed. // It is the union of the scopes on all three clients. let scopes = []; @@ -798,7 +799,7 @@ Logging.prototype.request = function(config, callback) { } var reqOpts = extend(true, {}, config.reqOpts); - reqOpts = common.util.replaceProjectIdToken(reqOpts, projectId); + reqOpts = replaceProjectIdToken(reqOpts, projectId); var requestFn = gaxClient[config.method].bind( gaxClient, @@ -962,14 +963,14 @@ Logging.prototype.setAclForTopic_ = function(name, config, callback) { * * These methods can be auto-paginated. */ -common.paginator.extend(Logging, ['getEntries', 'getSinks']); +paginator.extend(Logging, ['getEntries', 'getSinks']); /*! Developer Documentation * * All async methods (except for streams) will return a Promise in the event * that a callback is omitted. */ -common.util.promisifyAll(Logging, { +promisifyAll(Logging, { exclude: ['entry', 'log', 'request', 'sink'], }); diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index be6680e7c31..77214c6d0bc 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -17,7 +17,7 @@ 'use strict'; var arrify = require('arrify'); -var common = require('@google-cloud/common-grpc'); +const {promisifyAll} = require('@google-cloud/promisify'); var extend = require('extend'); var is = require('is'); var snakeCaseKeys = require('snakecase-keys'); @@ -752,7 +752,7 @@ Log.prototype.decorateEntries_ = function(entries) { * All async methods (except for streams) will return a Promise in the event * that a callback is omitted. */ -common.util.promisifyAll(Log, { +promisifyAll(Log, { exclude: ['entry'], }); diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 28da8133df2..6a7583f4d6f 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -17,6 +17,7 @@ 'use strict'; var common = require('@google-cloud/common-grpc'); +const {promisifyAll} = require('@google-cloud/promisify'); var extend = require('extend'); var is = require('is'); @@ -353,7 +354,7 @@ Sink.prototype.setMetadata = function(metadata, callback) { * All async methods (except for streams) will return a Promise in the event * that a callback is omitted. */ -common.util.promisifyAll(Sink); +promisifyAll(Sink); /** * Reference to the {@link Sink} class. diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 3e0fc7ed4d7..f58e15a92f2 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -18,9 +18,8 @@ var assert = require('assert'); var extend = require('extend'); -var GrpcService = require('@google-cloud/common-grpc').GrpcService; +var {GrpcService, util} = require('@google-cloud/common-grpc'); var proxyquire = require('proxyquire'); -var util = require('@google-cloud/common-grpc').util; function FakeGrpcService() {} diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index c495767136a..1963f877a9a 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -21,7 +21,7 @@ var assert = require('assert'); var extend = require('extend'); var proxyquire = require('proxyquire'); var through = require('through2'); -var util = require('@google-cloud/common-grpc').util; +var {util} = require('@google-cloud/common-grpc'); var v2 = require('../src/v2'); @@ -29,17 +29,18 @@ var PKG = require('../package.json'); var extended = false; var fakePaginator = { - extend: function(Class, methods) { - if (Class.name !== 'Logging') { - return; - } - - extended = true; - methods = arrify(methods); - assert.deepStrictEqual(methods, ['getEntries', 'getSinks']); - }, - streamify: function(methodName) { - return methodName; + paginator: { + extend: function(Class, methods) { + if (Class.name !== 'Logging') { + return; + } + extended = true; + methods = arrify(methods); + assert.deepStrictEqual(methods, ['getEntries', 'getSinks']); + }, + streamify: function(methodName) { + return methodName; + }, }, }; @@ -56,14 +57,14 @@ var fakeUtil = extend({}, util, { if (isCustomTypeOverride) { return isCustomTypeOverride.apply(null, arguments); } - return false; }, +}); +const fakePromisify = { promisifyAll: function(Class, options) { if (Class.name !== 'Logging') { return; } - promisifed = true; assert.deepStrictEqual(options.exclude, [ 'entry', @@ -72,14 +73,16 @@ var fakeUtil = extend({}, util, { 'sink', ]); }, +}; +const fakeProjectify = { replaceProjectIdToken: function(reqOpts) { if (replaceProjectIdTokenOverride) { return replaceProjectIdTokenOverride.apply(null, arguments); } - return reqOpts; }, -}); +}; + var originalFakeUtil = extend(true, {}, fakeUtil); function fakeV2() {} @@ -109,9 +112,11 @@ describe('Logging', function() { before(function() { Logging = proxyquire('../', { '@google-cloud/common-grpc': { - paginator: fakePaginator, util: fakeUtil, }, + '@google-cloud/promisify': fakePromisify, + '@google-cloud/paginator': fakePaginator, + '@google-cloud/projectify': fakeProjectify, 'google-auth-library': { GoogleAuth: fakeGoogleAuth, }, @@ -164,20 +169,6 @@ describe('Logging', function() { }); }); - it('should normalize the arguments', function() { - var normalizeArgumentsCalled = false; - var options = {}; - - fakeUtil.normalizeArguments = function(context, options_) { - normalizeArgumentsCalled = true; - assert.strictEqual(options_, options); - return options_; - }; - - new Logging(options); - assert.strictEqual(normalizeArgumentsCalled, true); - }); - it('should initialize the API object', function() { assert.deepStrictEqual(logging.api, {}); }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 3316f3d62a5..d6a8a0b30dd 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -20,15 +20,15 @@ var assert = require('assert'); var extend = require('extend'); var prop = require('propprop'); var proxyquire = require('proxyquire'); -var util = require('@google-cloud/common-grpc').util; +var {util} = require('@google-cloud/common-grpc'); +const promisify = require('@google-cloud/promisify'); var promisifed = false; -var fakeUtil = extend({}, util, { +var fakePromisify = extend({}, promisify, { promisifyAll: function(Class, options) { if (Class.name !== 'Log') { return; } - promisifed = true; assert.deepStrictEqual(options.exclude, ['entry']); }, @@ -60,9 +60,7 @@ describe('Log', function() { before(function() { Log = proxyquire('../src/log.js', { - '@google-cloud/common-grpc': { - util: fakeUtil, - }, + '@google-cloud/promisify': fakePromisify, './entry.js': Entry, './metadata.js': FakeMetadata, }); diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index eb5b9e0a207..121519882b3 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -20,9 +20,10 @@ var assert = require('assert'); var extend = require('extend'); var proxyquire = require('proxyquire'); var {util} = require('@google-cloud/common-grpc'); +const promisify = require('@google-cloud/promisify'); var promisifed = false; -var fakeUtil = extend({}, util, { +var fakePromisify = extend({}, promisify, { promisifyAll: function(Class) { if (Class.name === 'Sink') { promisifed = true; @@ -42,9 +43,7 @@ describe('Sink', function() { before(function() { Sink = proxyquire('../src/sink.js', { - '@google-cloud/common-grpc': { - util: fakeUtil, - }, + '@google-cloud/promisify': fakePromisify, }); }); From 8c22280cd7860f7303116e2a186819f83130455b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 29 Aug 2018 12:53:54 -0700 Subject: [PATCH 0220/1029] Release v3.0.2 (#209) --- handwritten/logging/CHANGELOG.md | 12 ++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 6f99726d9c7..dcfe8b42873 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v3.0.2 + +This release contains a variety of minor internal changes. + +### Internal / Testing Changes +- chore: upgrade to the latest common-grpc (#203) +- Re-generate library using /synth.py (#202) +- chore(deps): update dependency nyc to v13 (#200) +- chore(deps): update samples dependency @google-cloud/logging-bunyan to ^0.9.0 (#199) +- fix(deps): update dependency google-gax to ^0.19.0 (#198) +- chore: use mocha for sample tests (#197) + ## v3.0.1 ### Fixes diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8a2f18d0ce6..aea9da0711d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "3.0.1", + "version": "3.0.2", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 671d4455373748ad216f3b509b4f98de5fbfc7d7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 30 Aug 2018 07:01:19 -0700 Subject: [PATCH 0221/1029] fix(deps): update dependency google-auth-library to v2 (#210) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index aea9da0711d..394912ba7b0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -71,7 +71,7 @@ "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^0.7.0", - "google-auth-library": "^1.6.1", + "google-auth-library": "^2.0.0", "google-gax": "^0.19.0", "google-proto-files": "^0.16.1", "is": "^3.2.1", From 3671c82dd7b43d7fc9a56287dac2737264e89aee Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Fri, 31 Aug 2018 16:18:40 -0700 Subject: [PATCH 0222/1029] add templates to synth.py and run it (#211) * add templates to synth.py; reformat * run synth.py to bring in templates --- handwritten/logging/.circleci/config.yml | 36 ++++++++++++------- handwritten/logging/.jsdoc.js | 4 +-- handwritten/logging/.kokoro/common.cfg | 24 +++++++++++++ .../.kokoro/continuous/node10/common.cfg | 24 +++++++++++++ .../.kokoro/continuous/node10/test.cfg | 0 .../.kokoro/continuous/node6/common.cfg | 24 +++++++++++++ .../logging/.kokoro/continuous/node6/test.cfg | 0 .../.kokoro/continuous/node8/common.cfg | 24 +++++++++++++ .../logging/.kokoro/continuous/node8/docs.cfg | 4 +++ .../logging/.kokoro/continuous/node8/lint.cfg | 4 +++ .../.kokoro/continuous/node8/samples-test.cfg | 7 ++++ .../.kokoro/continuous/node8/system-test.cfg | 7 ++++ .../logging/.kokoro/continuous/node8/test.cfg | 0 handwritten/logging/.kokoro/docs.sh | 23 ++++++++++++ handwritten/logging/.kokoro/lint.sh | 29 +++++++++++++++ .../.kokoro/presubmit/node10/common.cfg | 24 +++++++++++++ .../logging/.kokoro/presubmit/node10/test.cfg | 0 .../.kokoro/presubmit/node6/common.cfg | 24 +++++++++++++ .../logging/.kokoro/presubmit/node6/test.cfg | 0 .../.kokoro/presubmit/node8/common.cfg | 24 +++++++++++++ .../logging/.kokoro/presubmit/node8/docs.cfg | 4 +++ .../logging/.kokoro/presubmit/node8/lint.cfg | 4 +++ .../logging/.kokoro/presubmit/node8/test.cfg | 0 .../.kokoro/presubmit/windows/common.cfg | 9 +++++ .../.kokoro/presubmit/windows/test.cfg | 2 ++ handwritten/logging/.kokoro/samples-test.sh | 33 +++++++++++++++++ handwritten/logging/.kokoro/system-test.sh | 26 ++++++++++++++ handwritten/logging/.kokoro/test.bat | 26 ++++++++++++++ handwritten/logging/.kokoro/test.sh | 23 ++++++++++++ handwritten/logging/.kokoro/trampoline.sh | 27 ++++++++++++++ handwritten/logging/synth.py | 28 +++++++-------- 31 files changed, 435 insertions(+), 29 deletions(-) create mode 100644 handwritten/logging/.kokoro/common.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node10/common.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node10/test.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node6/common.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node6/test.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node8/common.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node8/docs.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node8/lint.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node8/samples-test.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node8/system-test.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node8/test.cfg create mode 100755 handwritten/logging/.kokoro/docs.sh create mode 100755 handwritten/logging/.kokoro/lint.sh create mode 100644 handwritten/logging/.kokoro/presubmit/node10/common.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node10/test.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node6/common.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node6/test.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node8/common.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node8/docs.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node8/lint.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node8/test.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/windows/common.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/windows/test.cfg create mode 100755 handwritten/logging/.kokoro/samples-test.sh create mode 100755 handwritten/logging/.kokoro/system-test.sh create mode 100644 handwritten/logging/.kokoro/test.bat create mode 100755 handwritten/logging/.kokoro/test.sh create mode 100755 handwritten/logging/.kokoro/trampoline.sh diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 83d0971bf3f..9a65e928a47 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -59,7 +59,7 @@ jobs: - image: 'node:6' user: node steps: &unit_tests_steps - - checkout + - checkout - run: &npm_install_and_link name: Install and link the module command: |- @@ -69,6 +69,7 @@ jobs: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test - run: node_modules/.bin/codecov + node8: docker: - image: 'node:8' @@ -90,8 +91,8 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm install npm link ../ + npm install environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: @@ -106,9 +107,7 @@ jobs: steps: - checkout - run: *npm_install_and_link - - run: - name: Build documentation. - command: npm run docs + - run: npm run docs sample_tests: docker: - image: 'node:8' @@ -118,9 +117,11 @@ jobs: - run: name: Decrypt credentials. command: | - openssl aes-256-cbc -d -in .circleci/key.json.enc \ + if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then + openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + fi - run: *npm_install_and_link - run: *samples_npm_install_and_link - run: @@ -128,13 +129,16 @@ jobs: command: npm run samples-test environment: GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /home/node/logging-samples/.circleci/key.json + GOOGLE_APPLICATION_CREDENTIALS: /home/node/samples/.circleci/key.json NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Remove unencrypted key. - command: rm .circleci/key.json + command: | + if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then + rm .circleci/key.json + fi when: always - working_directory: /home/node/logging-samples + working_directory: /home/node/samples/ system_tests: docker: - image: 'node:8' @@ -144,9 +148,11 @@ jobs: - run: name: Decrypt credentials. command: | - openssl aes-256-cbc -d -in .circleci/key.json.enc \ + if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then + openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + fi - run: *npm_install_and_link - run: name: Run system tests. @@ -155,7 +161,10 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - run: name: Remove unencrypted key. - command: rm .circleci/key.json + command: | + if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then + rm .circleci/key.json + fi when: always publish_npm: docker: @@ -163,5 +172,6 @@ jobs: user: node steps: - checkout - - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - run: npm publish + - run: npm install + - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + - run: npm publish --access=public diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index c46ee725e66..d8294e327bd 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -1,5 +1,5 @@ /*! - * Copyright 2017 Google Inc. All Rights Reserved. + * Copyright 2018 Google LLC. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2017 Google, Inc.', + copyright: 'Copyright 2018 Google, LLC.', includeDate: false, sourceFiles: false, systemName: '@google-cloud/logging', diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg new file mode 100644 index 00000000000..6ed7ec9130d --- /dev/null +++ b/handwritten/logging/.kokoro/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node10/common.cfg b/handwritten/logging/.kokoro/continuous/node10/common.cfg new file mode 100644 index 00000000000..6ed7ec9130d --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node10/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node10/test.cfg b/handwritten/logging/.kokoro/continuous/node10/test.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/handwritten/logging/.kokoro/continuous/node6/common.cfg b/handwritten/logging/.kokoro/continuous/node6/common.cfg new file mode 100644 index 00000000000..e488c777aaa --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node6/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:6" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node6/test.cfg b/handwritten/logging/.kokoro/continuous/node6/test.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/handwritten/logging/.kokoro/continuous/node8/common.cfg b/handwritten/logging/.kokoro/continuous/node8/common.cfg new file mode 100644 index 00000000000..08b19244b76 --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node8/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:8" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node8/docs.cfg b/handwritten/logging/.kokoro/continuous/node8/docs.cfg new file mode 100644 index 00000000000..a0f47103691 --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node8/docs.cfg @@ -0,0 +1,4 @@ +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/docs.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node8/lint.cfg b/handwritten/logging/.kokoro/continuous/node8/lint.cfg new file mode 100644 index 00000000000..403216c3eaa --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node8/lint.cfg @@ -0,0 +1,4 @@ +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/lint.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node8/samples-test.cfg b/handwritten/logging/.kokoro/continuous/node8/samples-test.cfg new file mode 100644 index 00000000000..18403029858 --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node8/samples-test.cfg @@ -0,0 +1,7 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/samples-test.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node8/system-test.cfg b/handwritten/logging/.kokoro/continuous/node8/system-test.cfg new file mode 100644 index 00000000000..1d18894c806 --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node8/system-test.cfg @@ -0,0 +1,7 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/system-test.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node8/test.cfg b/handwritten/logging/.kokoro/continuous/node8/test.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/handwritten/logging/.kokoro/docs.sh b/handwritten/logging/.kokoro/docs.sh new file mode 100755 index 00000000000..1d288f3d475 --- /dev/null +++ b/handwritten/logging/.kokoro/docs.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -xeo pipefail + +cd $(dirname $0)/.. + +npm install + +npm run docs diff --git a/handwritten/logging/.kokoro/lint.sh b/handwritten/logging/.kokoro/lint.sh new file mode 100755 index 00000000000..9d29203edc2 --- /dev/null +++ b/handwritten/logging/.kokoro/lint.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -xeo pipefail + +cd $(dirname $0)/.. + +npm install + +# Install and link samples +cd samples/ +npm link ../ +npm install +cd .. + +npm run lint diff --git a/handwritten/logging/.kokoro/presubmit/node10/common.cfg b/handwritten/logging/.kokoro/presubmit/node10/common.cfg new file mode 100644 index 00000000000..6ed7ec9130d --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node10/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/presubmit/node10/test.cfg b/handwritten/logging/.kokoro/presubmit/node10/test.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/handwritten/logging/.kokoro/presubmit/node6/common.cfg b/handwritten/logging/.kokoro/presubmit/node6/common.cfg new file mode 100644 index 00000000000..e488c777aaa --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node6/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:6" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/presubmit/node6/test.cfg b/handwritten/logging/.kokoro/presubmit/node6/test.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/handwritten/logging/.kokoro/presubmit/node8/common.cfg b/handwritten/logging/.kokoro/presubmit/node8/common.cfg new file mode 100644 index 00000000000..08b19244b76 --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node8/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:8" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/presubmit/node8/docs.cfg b/handwritten/logging/.kokoro/presubmit/node8/docs.cfg new file mode 100644 index 00000000000..a0f47103691 --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node8/docs.cfg @@ -0,0 +1,4 @@ +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/docs.sh" +} diff --git a/handwritten/logging/.kokoro/presubmit/node8/lint.cfg b/handwritten/logging/.kokoro/presubmit/node8/lint.cfg new file mode 100644 index 00000000000..403216c3eaa --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node8/lint.cfg @@ -0,0 +1,4 @@ +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/lint.sh" +} diff --git a/handwritten/logging/.kokoro/presubmit/node8/test.cfg b/handwritten/logging/.kokoro/presubmit/node8/test.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/handwritten/logging/.kokoro/presubmit/windows/common.cfg b/handwritten/logging/.kokoro/presubmit/windows/common.cfg new file mode 100644 index 00000000000..7320db792a4 --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/windows/common.cfg @@ -0,0 +1,9 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + diff --git a/handwritten/logging/.kokoro/presubmit/windows/test.cfg b/handwritten/logging/.kokoro/presubmit/windows/test.cfg new file mode 100644 index 00000000000..b799cf1b0d3 --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/windows/test.cfg @@ -0,0 +1,2 @@ +# Use the test file directly +build_file: "nodejs-logging/.kokoro/test.bat" diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh new file mode 100755 index 00000000000..93af79aa3b3 --- /dev/null +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -xeo pipefail + +# Setup service account credentials. +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GCLOUD_PROJECT=long-door-651 + +cd $(dirname $0)/.. + +npm install + +# Install and link samples +cd samples/ +npm link ../ +npm install +cd .. + +npm run samples-test diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh new file mode 100755 index 00000000000..299032dc3a2 --- /dev/null +++ b/handwritten/logging/.kokoro/system-test.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -xeo pipefail + +# Setup service account credentials. +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json + +cd $(dirname $0)/.. + +npm install + +npm run system-test diff --git a/handwritten/logging/.kokoro/test.bat b/handwritten/logging/.kokoro/test.bat new file mode 100644 index 00000000000..a8534ba801c --- /dev/null +++ b/handwritten/logging/.kokoro/test.bat @@ -0,0 +1,26 @@ +@rem Copyright 2018 gRPC authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. + +@echo "Starting Windows build" + +cd /d %~dp0 +cd .. + +call npm install || goto :error +call npm run test || goto :error + +goto :EOF + +:error +exit /b 1 diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh new file mode 100755 index 00000000000..7f49f6d32ee --- /dev/null +++ b/handwritten/logging/.kokoro/test.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -xeo pipefail + +cd $(dirname $0)/.. + +npm install +npm test +node_modules/.bin/codecov diff --git a/handwritten/logging/.kokoro/trampoline.sh b/handwritten/logging/.kokoro/trampoline.sh new file mode 100755 index 00000000000..87ffd2ca960 --- /dev/null +++ b/handwritten/logging/.kokoro/trampoline.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2017 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. + +set -xeo pipefail + +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT + +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 7cdfcc0eb96..7c280f4744a 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -17,29 +17,29 @@ import synthtool as s import synthtool.gcp as gcp import logging -from pathlib import Path import subprocess logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() +common_templates = gcp.CommonTemplates() # tasks has two product names, and a poorly named artman yaml v2_library = gapic.node_library( - 'logging', 'v2', - config_path='/google/logging/artman_logging.yaml', - artman_output_name='logging-v2') + "logging", + "v2", + config_path="/google/logging/artman_logging.yaml", + artman_output_name="logging-v2", +) +s.copy(v2_library, excludes=["src/index.js", "README.md", "package.json"]) -# Copy all files except for 'README.md', 'package.json', and 'src/index.js' -s.copy(v2_library / 'protos') -s.copy(v2_library / 'src/v2') -s.copy(v2_library / 'test') -s.copy(v2_library / 'smoke-test') +templates = common_templates.node_library() +s.copy(templates) -''' +""" Node.js specific cleanup -''' -subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'prettier']) -subprocess.run(['npm', 'run', 'lint']) +""" +subprocess.run(["npm", "install"]) +subprocess.run(["npm", "run", "prettier"]) +subprocess.run(["npm", "run", "lint"]) From 4d51b37e67ec54dc46e1396a735019cda279634a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Sep 2018 10:55:01 -0700 Subject: [PATCH 0223/1029] Retry npm install in CI (#214) --- handwritten/logging/.circleci/config.yml | 6 +- .../logging/.circleci/npm-install-retry.js | 60 +++++++++++++++++++ 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100755 handwritten/logging/.circleci/npm-install-retry.js diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 9a65e928a47..80dcf7e67d9 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -64,7 +64,7 @@ jobs: name: Install and link the module command: |- mkdir -p /home/node/.npm-global - npm install + ./.circleci/npm-install-retry.js environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test @@ -92,7 +92,7 @@ jobs: command: | cd samples/ npm link ../ - npm install + ./../.circleci/npm-install-retry.js environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: @@ -172,6 +172,6 @@ jobs: user: node steps: - checkout - - run: npm install + - run: ./.circleci/npm-install-retry.js - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - run: npm publish --access=public diff --git a/handwritten/logging/.circleci/npm-install-retry.js b/handwritten/logging/.circleci/npm-install-retry.js new file mode 100755 index 00000000000..ae3220d7348 --- /dev/null +++ b/handwritten/logging/.circleci/npm-install-retry.js @@ -0,0 +1,60 @@ +#!/usr/bin/env node + +let spawn = require('child_process').spawn; + +// +//USE: ./index.js [... NPM ARGS] +// + +let timeout = process.argv[2] || 60000; +let attempts = process.argv[3] || 3; +let args = process.argv.slice(4); +if (args.length === 0) { + args = ['install']; +} + +(function npm() { + let timer; + args.push('--verbose'); + let proc = spawn('npm', args); + proc.stdout.pipe(process.stdout); + proc.stderr.pipe(process.stderr); + proc.stdin.end(); + proc.stdout.on('data', () => { + setTimer(); + }); + proc.stderr.on('data', () => { + setTimer(); + }); + + // side effect: this also restarts when npm exits with a bad code even if it + // didnt timeout + proc.on('close', (code, signal) => { + clearTimeout(timer); + if (code || signal) { + console.log('[npm-are-you-sleeping] npm exited with code ' + code + ''); + + if (--attempts) { + console.log('[npm-are-you-sleeping] restarting'); + npm(); + } else { + console.log('[npm-are-you-sleeping] i tried lots of times. giving up.'); + throw new Error("npm install fails"); + } + } + }); + + function setTimer() { + clearTimeout(timer); + timer = setTimeout(() => { + console.log('[npm-are-you-sleeping] killing npm with SIGTERM'); + proc.kill('SIGTERM'); + // wait a couple seconds + timer = setTimeout(() => { + // its it's still not closed sigkill + console.log('[npm-are-you-sleeping] killing npm with SIGKILL'); + proc.kill('SIGKILL'); + }, 2000); + }, timeout); + } +})(); From e72094dde9a621f06cb3c0492f83d471e89db0fb Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Thu, 6 Sep 2018 11:53:58 -0700 Subject: [PATCH 0224/1029] fix(GCE): add zone label in GCE descriptor (#215) * fix(GCE): add zone label in GCE descriptor Fixes: https://github.com/googleapis/nodejs-logging/issues/27 * [squash] prettier fix * lint rules are linty * address comments --- handwritten/logging/src/metadata.js | 17 ++++++---- handwritten/logging/test/metadata.js | 50 ++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 9ce6d96ece6..71cea404c6f 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -75,17 +75,22 @@ Metadata.getGAEDescriptor = function() { * @return {object} */ Metadata.getGCEDescriptor = function(callback) { - gcpMetadata - .instance('id') - .then(function(resp) { + gcpMetadata.instance('id').then(function(idResponse) { + gcpMetadata.instance('zone').then(function(zoneResponse) { + // Some parsing is necessary. Metadata service returns a fully + // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging + // wants just the zone part. + // + const zone = zoneResponse.data.split('/').pop(); callback(null, { type: 'gce_instance', labels: { - instance_id: resp.data, + instance_id: idResponse.data, + zone: zone, }, }); - }) - .catch(callback); + }, callback); + }, callback); }; /** diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 26cc7d472e9..65bbcc6348c 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -24,16 +24,20 @@ var instanceOverride; var fakeGcpMetadata = { instance: function(path) { if (instanceOverride) { - if (instanceOverride.path) { - assert.strictEqual(path, instanceOverride.path); + var override = Array.isArray(instanceOverride) + ? instanceOverride.find(entry => entry.path === path) + : instanceOverride; + + if (override.path) { + assert.strictEqual(path, override.path); } - if (instanceOverride.errorArg) { - return Promise.reject(instanceOverride.errorArg); + if (override.errorArg) { + return Promise.reject(override.errorArg); } - if (instanceOverride.successArg) { - return Promise.resolve(instanceOverride.successArg); + if (override.successArg) { + return Promise.resolve(override.successArg); } } @@ -186,12 +190,20 @@ describe('metadata', function() { describe('getGCEDescriptor', function() { var INSTANCE_ID = 'fake-instance-id'; + var ZONE_ID = 'morrowind-vivec-1'; + var ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; it('should return the correct descriptor', function(done) { - instanceOverride = { - path: 'id', - successArg: {data: INSTANCE_ID}, - }; + instanceOverride = [ + { + path: 'id', + successArg: {data: INSTANCE_ID}, + }, + { + path: 'zone', + successArg: {data: ZONE_FULL}, + }, + ]; Metadata.getGCEDescriptor(function(err, descriptor) { assert.ifError(err); @@ -199,6 +211,7 @@ describe('metadata', function() { type: 'gce_instance', labels: { instance_id: INSTANCE_ID, + zone: ZONE_ID, }, }); done(); @@ -279,10 +292,18 @@ describe('metadata', function() { describe('compute engine', function() { it('should return correct descriptor', function(done) { var INSTANCE_ID = 'overridden-value'; - instanceOverride = { - path: 'id', - successArg: {data: INSTANCE_ID}, - }; + var ZONE_ID = 'cyrodiil-anvil-2'; + var ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + instanceOverride = [ + { + path: 'id', + successArg: {data: INSTANCE_ID}, + }, + { + path: 'zone', + successArg: {data: ZONE_FULL}, + }, + ]; metadata.logging.auth.getEnv = function() { return Promise.resolve('COMPUTE_ENGINE'); @@ -294,6 +315,7 @@ describe('metadata', function() { type: 'gce_instance', labels: { instance_id: INSTANCE_ID, + zone: ZONE_ID, }, }); done(); From 0c9a06657f17bb9238329028c710d37f0ecf3740 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Mon, 10 Sep 2018 08:05:28 -0700 Subject: [PATCH 0225/1029] Update CI config (#218) --- handwritten/logging/.circleci/config.yml | 11 +++++++---- handwritten/logging/.kokoro/common.cfg | 2 +- .../logging/.kokoro/continuous/node10/common.cfg | 2 +- .../logging/.kokoro/continuous/node6/common.cfg | 2 +- .../logging/.kokoro/continuous/node8/common.cfg | 2 +- handwritten/logging/.kokoro/docs.sh | 2 ++ handwritten/logging/.kokoro/lint.sh | 2 ++ .../logging/.kokoro/presubmit/node10/common.cfg | 2 +- .../logging/.kokoro/presubmit/node6/common.cfg | 2 +- .../logging/.kokoro/presubmit/node8/common.cfg | 2 +- handwritten/logging/.kokoro/samples-test.sh | 2 ++ handwritten/logging/.kokoro/system-test.sh | 8 ++++++++ handwritten/logging/.kokoro/test.sh | 2 ++ 13 files changed, 30 insertions(+), 11 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 80dcf7e67d9..8af6a4d0489 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -149,21 +149,24 @@ jobs: name: Decrypt credentials. command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - openssl aes-256-cbc -d -in .circleci/key.json.enc \ - -out .circleci/key.json \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + for encrypted_key in .circleci/*.json.enc; do + openssl aes-256-cbc -d -in $encrypted_key \ + -out $(echo $encrypted_key | sed 's/\.enc//') \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + done fi - run: *npm_install_and_link - run: name: Run system tests. command: npm run system-test environment: + GCLOUD_PROJECT: long-door-651 GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - run: name: Remove unencrypted key. command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - rm .circleci/key.json + rm .circleci/*.json fi when: always publish_npm: diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 6ed7ec9130d..8d06c907f37 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/continuous/node10/common.cfg b/handwritten/logging/.kokoro/continuous/node10/common.cfg index 6ed7ec9130d..8d06c907f37 100644 --- a/handwritten/logging/.kokoro/continuous/node10/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/continuous/node6/common.cfg b/handwritten/logging/.kokoro/continuous/node6/common.cfg index e488c777aaa..7e36972f6f9 100644 --- a/handwritten/logging/.kokoro/continuous/node6/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node6/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:6" + value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/continuous/node8/common.cfg b/handwritten/logging/.kokoro/continuous/node8/common.cfg index 08b19244b76..120da9af7a3 100644 --- a/handwritten/logging/.kokoro/continuous/node8/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node8/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8" + value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/docs.sh b/handwritten/logging/.kokoro/docs.sh index 1d288f3d475..3af3193411a 100755 --- a/handwritten/logging/.kokoro/docs.sh +++ b/handwritten/logging/.kokoro/docs.sh @@ -16,6 +16,8 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + cd $(dirname $0)/.. npm install diff --git a/handwritten/logging/.kokoro/lint.sh b/handwritten/logging/.kokoro/lint.sh index 9d29203edc2..7c2ea2a28f9 100755 --- a/handwritten/logging/.kokoro/lint.sh +++ b/handwritten/logging/.kokoro/lint.sh @@ -16,6 +16,8 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + cd $(dirname $0)/.. npm install diff --git a/handwritten/logging/.kokoro/presubmit/node10/common.cfg b/handwritten/logging/.kokoro/presubmit/node10/common.cfg index 6ed7ec9130d..8d06c907f37 100644 --- a/handwritten/logging/.kokoro/presubmit/node10/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node10/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/presubmit/node6/common.cfg b/handwritten/logging/.kokoro/presubmit/node6/common.cfg index e488c777aaa..7e36972f6f9 100644 --- a/handwritten/logging/.kokoro/presubmit/node6/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node6/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:6" + value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/presubmit/node8/common.cfg b/handwritten/logging/.kokoro/presubmit/node8/common.cfg index 08b19244b76..120da9af7a3 100644 --- a/handwritten/logging/.kokoro/presubmit/node8/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node8/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8" + value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index 93af79aa3b3..76edbbbb247 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -16,6 +16,8 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + # Setup service account credentials. export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json export GCLOUD_PROJECT=long-door-651 diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index 299032dc3a2..a954b79429d 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -16,11 +16,19 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + # Setup service account credentials. export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GCLOUD_PROJECT=long-door-651 cd $(dirname $0)/.. +# Run a pre-test hook, if a pre-system-test.sh is in the project +if [ -f .kokoro/pre-system-test.sh ]; then + . .kokoro/pre-system-test.sh +fi + npm install npm run system-test diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 7f49f6d32ee..51f29589b19 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -16,6 +16,8 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + cd $(dirname $0)/.. npm install From 67cf21f776447a3565cffe08cbff43588c676649 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 11 Sep 2018 14:38:34 -0700 Subject: [PATCH 0226/1029] Use let and const (#217) --- handwritten/logging/src/entry.js | 32 +-- handwritten/logging/src/index.js | 162 +++++++------ handwritten/logging/src/log.js | 158 ++++++------- handwritten/logging/src/metadata.js | 4 +- handwritten/logging/src/sink.js | 72 +++--- handwritten/logging/system-test/logging.js | 96 ++++---- handwritten/logging/test/entry.js | 70 +++--- handwritten/logging/test/index.js | 250 ++++++++++----------- handwritten/logging/test/log.js | 146 ++++++------ handwritten/logging/test/metadata.js | 68 +++--- handwritten/logging/test/sink.js | 46 ++-- 11 files changed, 551 insertions(+), 553 deletions(-) diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index d142e8ccef1..203dee57672 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -16,12 +16,12 @@ 'use strict'; -var {Service} = require('@google-cloud/common-grpc'); -var EventId = require('eventid'); -var extend = require('extend'); -var is = require('is'); +const {Service} = require('@google-cloud/common-grpc'); +const EventId = require('eventid'); +const extend = require('extend'); +const is = require('is'); -var eventId = new EventId(); +const eventId = new EventId(); /** * Create an entry object to define new data to insert into a log. @@ -46,11 +46,11 @@ var eventId = new EventId(); * Any other types are stringified with `String(value)`. * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var syslog = logging.log('syslog'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const syslog = logging.log('syslog'); * - * var metadata = { + * const metadata = { * resource: { * type: 'gce_instance', * labels: { @@ -60,7 +60,7 @@ var eventId = new EventId(); * } * }; * - * var entry = syslog.entry(metadata, { + * const entry = syslog.entry(metadata, { * delegate: 'my_username' * }); * @@ -123,16 +123,16 @@ function Entry(metadata, data) { * @returns {Entry} */ Entry.fromApiResponse_ = function(entry) { - var data = entry[entry.payload]; + let data = entry[entry.payload]; if (entry.payload === 'jsonPayload') { data = Service.structToObj_(data); } - var serializedEntry = new Entry(entry, data); + const serializedEntry = new Entry(entry, data); if (serializedEntry.metadata.timestamp) { - var ms = serializedEntry.metadata.timestamp.seconds * 1000; + let ms = serializedEntry.metadata.timestamp.seconds * 1000; ms += serializedEntry.metadata.timestamp.nanos / 1e6; serializedEntry.metadata.timestamp = new Date(ms); } @@ -150,7 +150,7 @@ Entry.fromApiResponse_ = function(entry) { Entry.prototype.toJSON = function(options) { options = options || {}; - var entry = extend(true, {}, this.metadata); + const entry = extend(true, {}, this.metadata); if (is.object(this.data)) { entry.jsonPayload = Service.objToStruct_(this.data, { @@ -162,8 +162,8 @@ Entry.prototype.toJSON = function(options) { } if (is.date(entry.timestamp)) { - var seconds = entry.timestamp.getTime() / 1000; - var secondsRounded = Math.floor(seconds); + const seconds = entry.timestamp.getTime() / 1000; + const secondsRounded = Math.floor(seconds); entry.timestamp = { seconds: secondsRounded, diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 17b60e9d5cd..b003c4a2548 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -16,24 +16,24 @@ 'use strict'; -var arrify = require('arrify'); -var common = require('@google-cloud/common-grpc'); +const arrify = require('arrify'); +const common = require('@google-cloud/common-grpc'); const {promisifyAll} = require('@google-cloud/promisify'); const {paginator} = require('@google-cloud/paginator'); const {replaceProjectIdToken} = require('@google-cloud/projectify'); -var extend = require('extend'); -var {GoogleAuth} = require('google-auth-library'); -var is = require('is'); -var pumpify = require('pumpify'); -var streamEvents = require('stream-events'); -var through = require('through2'); +const extend = require('extend'); +const {GoogleAuth} = require('google-auth-library'); +const is = require('is'); +const pumpify = require('pumpify'); +const streamEvents = require('stream-events'); +const through = require('through2'); -var PKG = require('../package.json'); -var v2 = require('./v2'); +const PKG = require('../package.json'); +const v2 = require('./v2'); -var Entry = require('./entry.js'); -var Log = require('./log.js'); -var Sink = require('./sink.js'); +const Entry = require('./entry.js'); +const Log = require('./log.js'); +const Sink = require('./sink.js'); /** * @namespace google @@ -130,7 +130,7 @@ function Logging(options) { } } - var options_ = extend( + const options_ = extend( { libName: 'gccl', libVersion: PKG.version, @@ -189,14 +189,14 @@ function Logging(options) { * @see Sink#create * * @example - * var Storage = require('@google-cloud/storage'); - * var storage = new Storage({ + * const Storage = require('@google-cloud/storage'); + * const storage = new Storage({ * projectId: 'grape-spaceship-123' * }); - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); * - * var config = { + * const config = { * destination: storage.bucket('logging-bucket'), * filter: 'severity = ALERT' * }; @@ -211,8 +211,8 @@ function Logging(options) { * // If the callback is omitted, we'll return a Promise. * //- * logging.createSink('new-sink-name', config).then(function(data) { - * var sink = data[0]; - * var apiResponse = data[1]; + * const sink = data[0]; + * const apiResponse = data[1]; * }); * * @example include:samples/sinks.js @@ -221,7 +221,7 @@ function Logging(options) { */ Logging.prototype.createSink = function(name, config, callback) { // jscs:enable maximumLineLength - var self = this; + const self = this; if (!is.string(name)) { throw new Error('A sink name must be provided.'); @@ -246,7 +246,7 @@ Logging.prototype.createSink = function(name, config, callback) { return; } - var reqOpts = { + const reqOpts = { parent: 'projects/' + this.projectId, sink: extend({}, config, {name: name}), }; @@ -266,7 +266,7 @@ Logging.prototype.createSink = function(name, config, callback) { return; } - var sink = self.sink(resp.name); + const sink = self.sink(resp.name); sink.metadata = resp; callback(null, sink, resp); @@ -290,10 +290,10 @@ Logging.prototype.createSink = function(name, config, callback) { * @returns {Entry} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); * - * var resource = { + * const resource = { * type: 'gce_instance', * labels: { * zone: 'global', @@ -301,7 +301,7 @@ Logging.prototype.createSink = function(name, config, callback) { * } * }; * - * var entry = logging.entry(resource, { + * const entry = logging.entry(resource, { * delegate: 'my_username' * }); * @@ -365,8 +365,8 @@ Logging.prototype.entry = function(resource, data) { * @returns {Promise} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); * * logging.getEntries(function(err, entries) { * // `entries` is an array of Stackdriver Logging entry objects. @@ -392,7 +392,7 @@ Logging.prototype.entry = function(resource, data) { * // If the callback is omitted, we'll return a Promise. * //- * logging.getEntries().then(function(data) { - * var entries = data[0]; + * const entries = data[0]; * }); * * @example include:samples/logs.js @@ -409,7 +409,7 @@ Logging.prototype.getEntries = function(options, callback) { options = {}; } - var reqOpts = extend( + const reqOpts = extend( { orderBy: 'timestamp desc', }, @@ -418,7 +418,7 @@ Logging.prototype.getEntries = function(options, callback) { reqOpts.resourceNames = arrify(reqOpts.resourceNames); - var resourceName = 'projects/' + this.projectId; + const resourceName = 'projects/' + this.projectId; if (reqOpts.resourceNames.indexOf(resourceName) === -1) { reqOpts.resourceNames.push(resourceName); @@ -427,7 +427,7 @@ Logging.prototype.getEntries = function(options, callback) { delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - var gaxOptions = extend( + const gaxOptions = extend( { autoPaginate: options.autoPaginate, }, @@ -442,7 +442,7 @@ Logging.prototype.getEntries = function(options, callback) { gaxOpts: gaxOptions, }, function() { - var entries = arguments[1]; + const entries = arguments[1]; if (entries) { arguments[1] = entries.map(Entry.fromApiResponse_); @@ -463,8 +463,8 @@ Logging.prototype.getEntries = function(options, callback) { * instances. * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); * * logging.getEntriesStream() * .on('error', console.error) @@ -486,13 +486,11 @@ Logging.prototype.getEntries = function(options, callback) { * }); */ Logging.prototype.getEntriesStream = function(options) { - var self = this; - + const self = this; options = options || {}; - var requestStream; - - var userStream = streamEvents(pumpify.obj()); + let requestStream; + const userStream = streamEvents(pumpify.obj()); userStream.abort = function() { if (requestStream) { @@ -500,12 +498,12 @@ Logging.prototype.getEntriesStream = function(options) { } }; - var toEntryStream = through.obj(function(entry, _, next) { + const toEntryStream = through.obj(function(entry, _, next) { next(null, Entry.fromApiResponse_(entry)); }); userStream.once('reading', function() { - var reqOpts = extend( + const reqOpts = extend( { orderBy: 'timestamp desc', }, @@ -517,7 +515,7 @@ Logging.prototype.getEntriesStream = function(options) { delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - var gaxOptions = extend( + const gaxOptions = extend( { autoPaginate: options.autoPaginate, }, @@ -573,8 +571,8 @@ Logging.prototype.getEntriesStream = function(options) { * @returns {Promise} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); * * logging.getSinks(function(err, sinks) { * // sinks is an array of Sink objects. @@ -584,7 +582,7 @@ Logging.prototype.getEntriesStream = function(options) { * // If the callback is omitted, we'll return a Promise. * //- * logging.getSinks().then(function(data) { - * var sinks = data[0]; + * const sinks = data[0]; * }); * * @example include:samples/sinks.js @@ -592,21 +590,21 @@ Logging.prototype.getEntriesStream = function(options) { * Another example: */ Logging.prototype.getSinks = function(options, callback) { - var self = this; + const self = this; if (is.fn(options)) { callback = options; options = {}; } - var reqOpts = extend({}, options, { + const reqOpts = extend({}, options, { parent: 'projects/' + this.projectId, }); delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - var gaxOptions = extend( + const gaxOptions = extend( { autoPaginate: options.autoPaginate, }, @@ -621,11 +619,11 @@ Logging.prototype.getSinks = function(options, callback) { gaxOpts: gaxOptions, }, function() { - var sinks = arguments[1]; + const sinks = arguments[1]; if (sinks) { arguments[1] = sinks.map(function(sink) { - var sinkInstance = self.sink(sink.name); + const sinkInstance = self.sink(sink.name); sinkInstance.metadata = sink; return sinkInstance; }); @@ -646,8 +644,8 @@ Logging.prototype.getSinks = function(options, callback) { * instances. * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); * * logging.getSinksStream() * .on('error', console.error) @@ -668,12 +666,12 @@ Logging.prototype.getSinks = function(options, callback) { * }); */ Logging.prototype.getSinksStream = function(options) { - var self = this; + const self = this; options = options || {}; - var requestStream; - var userStream = streamEvents(pumpify.obj()); + let requestStream; + const userStream = streamEvents(pumpify.obj()); userStream.abort = function() { if (requestStream) { @@ -681,20 +679,20 @@ Logging.prototype.getSinksStream = function(options) { } }; - var toSinkStream = through.obj(function(sink, _, next) { - var sinkInstance = self.sink(sink.name); + const toSinkStream = through.obj(function(sink, _, next) { + const sinkInstance = self.sink(sink.name); sinkInstance.metadata = sink; next(null, sinkInstance); }); userStream.once('reading', function() { - var reqOpts = extend({}, options, { + const reqOpts = extend({}, options, { parent: 'projects/' + self.projectId, }); delete reqOpts.gaxOptions; - var gaxOptions = extend( + const gaxOptions = extend( { autoPaginate: options.autoPaginate, }, @@ -726,9 +724,9 @@ Logging.prototype.getSinksStream = function(options) { * @returns {Log} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); */ Logging.prototype.log = function(name, options) { return new Log(this, name, options); @@ -743,9 +741,9 @@ Logging.prototype.log = function(name, options) { * @returns {Sink} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var sink = logging.sink('my-sink'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); */ Logging.prototype.sink = function(name) { return new Sink(this, name); @@ -761,11 +759,11 @@ Logging.prototype.sink = function(name) { * @param {function} [callback] Callback function. */ Logging.prototype.request = function(config, callback) { - var self = this; - var isStreamMode = !callback; + const self = this; + const isStreamMode = !callback; - var gaxStream; - var stream; + let gaxStream; + let stream; if (isStreamMode) { stream = streamEvents(through.obj()); @@ -790,7 +788,7 @@ Logging.prototype.request = function(config, callback) { self.projectId = projectId; - var gaxClient = self.api[config.client]; + let gaxClient = self.api[config.client]; if (!gaxClient) { // Lazily instantiate client. @@ -798,10 +796,10 @@ Logging.prototype.request = function(config, callback) { self.api[config.client] = gaxClient; } - var reqOpts = extend(true, {}, config.reqOpts); + let reqOpts = extend(true, {}, config.reqOpts); reqOpts = replaceProjectIdToken(reqOpts, projectId); - var requestFn = gaxClient[config.method].bind( + const requestFn = gaxClient[config.method].bind( gaxClient, reqOpts, config.gaxOpts @@ -859,8 +857,8 @@ Logging.prototype.request = function(config, callback) { * @private */ Logging.prototype.setAclForBucket_ = function(name, config, callback) { - var self = this; - var bucket = config.destination; + const self = this; + const bucket = config.destination; bucket.acl.owners.addGroup('cloud-logs@google.com', function(err, apiResp) { if (err) { @@ -884,8 +882,8 @@ Logging.prototype.setAclForBucket_ = function(name, config, callback) { * @private */ Logging.prototype.setAclForDataset_ = function(name, config, callback) { - var self = this; - var dataset = config.destination; + const self = this; + const dataset = config.destination; dataset.getMetadata(function(err, metadata, apiResp) { if (err) { @@ -893,7 +891,7 @@ Logging.prototype.setAclForDataset_ = function(name, config, callback) { return; } - var access = [].slice.call(arrify(metadata.access)); + const access = [].slice.call(arrify(metadata.access)); access.push({ role: 'WRITER', @@ -929,8 +927,8 @@ Logging.prototype.setAclForDataset_ = function(name, config, callback) { * @private */ Logging.prototype.setAclForTopic_ = function(name, config, callback) { - var self = this; - var topic = config.destination; + const self = this; + const topic = config.destination; topic.iam.getPolicy(function(err, policy, apiResp) { if (err) { diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 77214c6d0bc..ff8572ef8f6 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -16,14 +16,14 @@ 'use strict'; -var arrify = require('arrify'); +const arrify = require('arrify'); const {promisifyAll} = require('@google-cloud/promisify'); -var extend = require('extend'); -var is = require('is'); -var snakeCaseKeys = require('snakecase-keys'); +const extend = require('extend'); +const is = require('is'); +const snakeCaseKeys = require('snakecase-keys'); -var Entry = require('./entry.js'); -var Metadata = require('./metadata.js'); +const Entry = require('./entry.js'); +const Metadata = require('./metadata.js'); /** * A log is a named collection of entries, each entry representing a timestamped @@ -43,9 +43,9 @@ var Metadata = require('./metadata.js'); * logged objects with a string value, `[Circular]`. (Default: false) * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('syslog'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('syslog'); */ function Log(logging, name, options) { options = options || {}; @@ -72,7 +72,7 @@ function Log(logging, name, options) { */ Log.assignSeverityToEntries_ = function(entries, severity) { return arrify(entries).map(function(entry) { - var metadata = extend(true, {}, entry.metadata, { + const metadata = extend(true, {}, entry.metadata, { severity: severity, }); @@ -91,7 +91,7 @@ Log.assignSeverityToEntries_ = function(entries, severity) { * @returns {string} */ Log.formatName_ = function(projectId, name) { - var path = 'projects/' + projectId + '/logs/'; + const path = 'projects/' + projectId + '/logs/'; name = name.replace(path, ''); if (decodeURIComponent(name) === name) { @@ -113,11 +113,11 @@ Log.formatName_ = function(projectId, name) { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -127,7 +127,7 @@ Log.formatName_ = function(projectId, name) { * // If the callback is omitted, we'll return a Promise. * //- * log.alert(entry).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Log.prototype.alert = function(entry, options, callback) { @@ -145,11 +145,11 @@ Log.prototype.alert = function(entry, options, callback) { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -159,11 +159,11 @@ Log.prototype.alert = function(entry, options, callback) { * // If the callback is omitted, we'll return a Promise. * //- * log.critical(entry).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Log.prototype.critical = function(entry, options, callback) { - var entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); + const entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); this.write(entries, options, callback); }; @@ -178,11 +178,11 @@ Log.prototype.critical = function(entry, options, callback) { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -192,7 +192,7 @@ Log.prototype.critical = function(entry, options, callback) { * // If the callback is omitted, we'll return a Promise. * //- * log.debug(entry).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Log.prototype.debug = function(entry, options, callback) { @@ -219,9 +219,9 @@ Log.prototype.debug = function(entry, options, callback) { * @returns {Promise} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * * log.delete(function(err, apiResponse) { * if (!err) { @@ -233,7 +233,7 @@ Log.prototype.debug = function(entry, options, callback) { * // If the callback is omitted, we'll return a Promise. * //- * log.delete().then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); * * @example include:samples/logs.js @@ -246,7 +246,7 @@ Log.prototype.delete = function(gaxOptions, callback) { gaxOptions = {}; } - var reqOpts = { + const reqOpts = { logName: this.formattedName_, }; @@ -272,11 +272,11 @@ Log.prototype.delete = function(gaxOptions, callback) { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -286,11 +286,11 @@ Log.prototype.delete = function(gaxOptions, callback) { * // If the callback is omitted, we'll return a Promise. * //- * log.emergency(entry).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Log.prototype.emergency = function(entry, options, callback) { - var entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); + const entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); this.write(entries, options, callback); }; @@ -310,11 +310,11 @@ Log.prototype.emergency = function(entry, options, callback) { * @returns {Entry} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var metadata = { + * const metadata = { * resource: { * type: 'gce_instance', * labels: { @@ -324,7 +324,7 @@ Log.prototype.emergency = function(entry, options, callback) { * } * }; * - * var entry = log.entry(metadata, { + * const entry = log.entry(metadata, { * delegate: 'my_username' * }); * @@ -363,11 +363,11 @@ Log.prototype.entry = function(metadata, data) { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -377,7 +377,7 @@ Log.prototype.entry = function(metadata, data) { * // If the callback is omitted, we'll return a Promise. * //- * log.error(entry).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Log.prototype.error = function(entry, options, callback) { @@ -395,9 +395,9 @@ Log.prototype.error = function(entry, options, callback) { * @returns {Promise} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * * log.getEntries(function(err, entries) { * // `entries` is an array of Stackdriver Logging entry objects. @@ -423,7 +423,7 @@ Log.prototype.error = function(entry, options, callback) { * // If the callback is omitted, we'll return a Promise. * //- * log.getEntries().then(function(data) { - * var entries = data[0]; + * const entries = data[0]; * }); */ Log.prototype.getEntries = function(options, callback) { @@ -452,9 +452,9 @@ Log.prototype.getEntries = function(options, callback) { * instances. * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * * log.getEntriesStream() * .on('error', console.error) @@ -497,11 +497,11 @@ Log.prototype.getEntriesStream = function(options) { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -511,7 +511,7 @@ Log.prototype.getEntriesStream = function(options) { * // If the callback is omitted, we'll return a Promise. * //- * log.info(entry).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Log.prototype.info = function(entry, options, callback) { @@ -529,11 +529,11 @@ Log.prototype.info = function(entry, options, callback) { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -543,7 +543,7 @@ Log.prototype.info = function(entry, options, callback) { * // If the callback is omitted, we'll return a Promise. * //- * log.notice(entry).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Log.prototype.notice = function(entry, options, callback) { @@ -561,11 +561,11 @@ Log.prototype.notice = function(entry, options, callback) { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var log = logging.log('my-log'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); * - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -575,7 +575,7 @@ Log.prototype.notice = function(entry, options, callback) { * // If the callback is omitted, we'll return a Promise. * //- * log.warning(entry).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Log.prototype.warning = function(entry, options, callback) { @@ -612,7 +612,7 @@ Log.prototype.warning = function(entry, options, callback) { * @returns {Promise} * * @example - * var entry = log.entry('gce_instance', { + * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); * @@ -625,7 +625,7 @@ Log.prototype.warning = function(entry, options, callback) { * //- * // You may also pass multiple log entries to write. * //- - * var secondEntry = log.entry('compute.googleapis.com', { + * const secondEntry = log.entry('compute.googleapis.com', { * user: 'my_username' * }); * @@ -643,7 +643,7 @@ Log.prototype.warning = function(entry, options, callback) { * // Note, however, that you must provide a configuration object to specify the * // resource. * //- - * var entries = [ + * const entries = [ * { * user: 'my_username' * }, @@ -652,7 +652,7 @@ Log.prototype.warning = function(entry, options, callback) { * } * ]; * - * var options = { + * const options = { * resource: 'compute.googleapis.com' * }; * @@ -662,7 +662,7 @@ Log.prototype.warning = function(entry, options, callback) { * // If the callback is omitted, we'll return a Promise. * //- * log.write(entries).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); * * @example include:samples/logs.js @@ -674,7 +674,7 @@ Log.prototype.warning = function(entry, options, callback) { * Another example: */ Log.prototype.write = function(entry, options, callback) { - var self = this; + const self = this; if (is.fn(options)) { callback = options; @@ -694,14 +694,14 @@ Log.prototype.write = function(entry, options, callback) { } function writeWithResource(resource) { - var decoratedEntries; + let decoratedEntries; try { decoratedEntries = self.decorateEntries_(arrify(entry)); } catch (err) { // Ignore errors (the API will speak up if it has an issue). } - var reqOpts = extend( + const reqOpts = extend( { logName: self.formattedName_, entries: decoratedEntries, @@ -734,7 +734,7 @@ Log.prototype.write = function(entry, options, callback) { * @throws if there is an error during serialization. */ Log.prototype.decorateEntries_ = function(entries) { - var self = this; + const self = this; return entries.map(function(entry) { if (!(entry instanceof Entry)) { diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 71cea404c6f..f775bb41bd2 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -16,8 +16,8 @@ 'use strict'; -var fs = require('fs'); -var gcpMetadata = require('gcp-metadata'); +const fs = require('fs'); +const gcpMetadata = require('gcp-metadata'); /** * The Metadata class attempts to contact the metadata service and determine, diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 6a7583f4d6f..5b9e1dac7a7 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -16,10 +16,10 @@ 'use strict'; -var common = require('@google-cloud/common-grpc'); +const common = require('@google-cloud/common-grpc'); const {promisifyAll} = require('@google-cloud/promisify'); -var extend = require('extend'); -var is = require('is'); +const extend = require('extend'); +const is = require('is'); /** * A sink is an object that lets you to specify a set of log entries to export @@ -36,9 +36,9 @@ var is = require('is'); * @param {string} name Name of the sink. * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var sink = logging.sink('my-sink'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); */ function Sink(logging, name) { this.logging = logging; @@ -60,11 +60,11 @@ function Sink(logging, name) { * @see Logging#createSink * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var sink = logging.sink('my-sink'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); * - * var config = { + * const config = { * destination: { * // ... * } @@ -80,8 +80,8 @@ function Sink(logging, name) { * // If the callback is omitted, we'll return a Promise. * //- * sink.create(config).then(function(data) { - * var sink = data[0]; - * var apiResponse = data[1]; + * const sink = data[0]; + * const apiResponse = data[1]; * }); * * @example include:samples/sinks.js @@ -112,9 +112,9 @@ Sink.prototype.create = function(config, callback) { * @returns {Promise} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var sink = logging.sink('my-sink'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); * * sink.delete(function(err, apiResponse) { * if (!err) { @@ -126,7 +126,7 @@ Sink.prototype.create = function(config, callback) { * // If the callback is omitted, we'll return a Promise. * //- * sink.delete().then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); * * @example include:samples/sinks.js @@ -139,7 +139,7 @@ Sink.prototype.delete = function(gaxOptions, callback) { gaxOptions = {}; } - var reqOpts = { + const reqOpts = { sinkName: this.formattedName_, }; @@ -177,9 +177,9 @@ Sink.prototype.delete = function(gaxOptions, callback) { * @returns {Promise} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var sink = logging.sink('my-sink'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); * * sink.getMetadata(function(err, metadata, apiResponse) {}); * @@ -187,8 +187,8 @@ Sink.prototype.delete = function(gaxOptions, callback) { * // If the callback is omitted, we'll return a Promise. * //- * sink.getMetadata().then(function(data) { - * var metadata = data[0]; - * var apiResponse = data[1]; + * const metadata = data[0]; + * const apiResponse = data[1]; * }); * * @example include:samples/sinks.js @@ -196,14 +196,14 @@ Sink.prototype.delete = function(gaxOptions, callback) { * Another example: */ Sink.prototype.getMetadata = function(gaxOptions, callback) { - var self = this; + const self = this; if (is.fn(gaxOptions)) { callback = gaxOptions; gaxOptions = {}; } - var reqOpts = { + const reqOpts = { sinkName: this.formattedName_, }; @@ -245,11 +245,11 @@ Sink.prototype.getMetadata = function(gaxOptions, callback) { * @returns {Promise} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var sink = logging.sink('my-sink'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); * - * var filter = 'metadata.severity = ALERT'; + * const filter = 'metadata.severity = ALERT'; * * sink.setFilter(filter, function(err, apiResponse) {}); * @@ -257,7 +257,7 @@ Sink.prototype.getMetadata = function(gaxOptions, callback) { * // If the callback is omitted, we'll return a Promise. * //- * sink.setFilter(filter).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); */ Sink.prototype.setFilter = function(filter, callback) { @@ -292,11 +292,11 @@ Sink.prototype.setFilter = function(filter, callback) { * @returns {Promise} * * @example - * var Logging = require('@google-cloud/logging'); - * var logging = new Logging(); - * var sink = logging.sink('my-sink'); + * const Logging = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); * - * var metadata = { + * const metadata = { * filter: 'metadata.severity = ALERT' * }; * @@ -306,7 +306,7 @@ Sink.prototype.setFilter = function(filter, callback) { * // If the callback is omitted, we'll return a Promise. * //- * sink.setMetadata(metadata).then(function(data) { - * var apiResponse = data[0]; + * const apiResponse = data[0]; * }); * * @example include:samples/sinks.js @@ -314,7 +314,7 @@ Sink.prototype.setFilter = function(filter, callback) { * Another example: */ Sink.prototype.setMetadata = function(metadata, callback) { - var self = this; + const self = this; callback = callback || common.util.noop; @@ -324,7 +324,7 @@ Sink.prototype.setMetadata = function(metadata, callback) { return; } - var reqOpts = { + const reqOpts = { sinkName: self.formattedName_, sink: extend({}, currentMetadata, metadata), }; diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 06b405eb829..4747ef7a958 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -16,34 +16,34 @@ 'use strict'; -var assert = require('assert'); -var async = require('async'); -var bigqueryLibrary = require('@google-cloud/bigquery'); -var exec = require('methmeth'); -var extend = require('extend'); -var is = require('is'); -var prop = require('propprop'); -var pubsubLibrary = require('@google-cloud/pubsub'); -var storageLibrary = require('@google-cloud/storage'); -var uuid = require('uuid'); - -var Logging = require('../'); +const assert = require('assert'); +const async = require('async'); +const bigqueryLibrary = require('@google-cloud/bigquery'); +const exec = require('methmeth'); +const extend = require('extend'); +const is = require('is'); +const prop = require('propprop'); +const pubsubLibrary = require('@google-cloud/pubsub'); +const {Storage} = require('@google-cloud/storage'); +const uuid = require('uuid'); + +const Logging = require('../'); describe('Logging', function() { - var PROJECT_ID; - var TESTS_PREFIX = 'gcloud-logging-test'; - var WRITE_CONSISTENCY_DELAY_MS = 10000; + let PROJECT_ID; + const TESTS_PREFIX = 'gcloud-logging-test'; + const WRITE_CONSISTENCY_DELAY_MS = 10000; - var bigQuery = bigqueryLibrary(); - var pubsub = pubsubLibrary(); - var storage = storageLibrary(); + const bigQuery = bigqueryLibrary(); + const pubsub = pubsubLibrary(); + const storage = new Storage(); - var logging = new Logging(); + const logging = new Logging(); // Create the possible destinations for sinks that we will create. - var bucket = storage.bucket(generateName()); - var dataset = bigQuery.dataset(generateName().replace(/-/g, '_')); - var topic = pubsub.topic(generateName()); + const bucket = storage.bucket(generateName()); + const dataset = bigQuery.dataset(generateName().replace(/-/g, '_')); + const topic = pubsub.topic(generateName()); before(function(done) { async.parallel( @@ -135,7 +135,7 @@ describe('Logging', function() { describe('sinks', function() { it('should create a sink with a Bucket destination', function(done) { - var sink = logging.sink(generateName()); + const sink = logging.sink(generateName()); sink.create( { @@ -144,7 +144,7 @@ describe('Logging', function() { function(err, sink, apiResponse) { assert.ifError(err); - var destination = 'storage.googleapis.com/' + bucket.name; + const destination = 'storage.googleapis.com/' + bucket.name; assert.strictEqual(apiResponse.destination, destination); done(); @@ -153,7 +153,7 @@ describe('Logging', function() { }); it('should create a sink with a Dataset destination', function(done) { - var sink = logging.sink(generateName()); + const sink = logging.sink(generateName()); sink.create( { @@ -162,7 +162,7 @@ describe('Logging', function() { function(err, sink, apiResponse) { assert.ifError(err); - var destination = 'bigquery.googleapis.com/datasets/' + dataset.id; + const destination = 'bigquery.googleapis.com/datasets/' + dataset.id; // The projectId may have been replaced depending on how the system // tests are being run, so let's not care about that. @@ -179,7 +179,7 @@ describe('Logging', function() { }); it('should create a sink with a Topic destination', function(done) { - var sink = logging.sink(generateName()); + const sink = logging.sink(generateName()); sink.create( { @@ -188,7 +188,7 @@ describe('Logging', function() { function(err, sink, apiResponse) { assert.ifError(err); - var destination = 'pubsub.googleapis.com/' + topic.name; + const destination = 'pubsub.googleapis.com/' + topic.name; // The projectId may have been replaced depending on how the system // tests are being run, so let's not care about that. @@ -203,8 +203,8 @@ describe('Logging', function() { }); describe('metadata', function() { - var sink = logging.sink(generateName()); - var FILTER = 'severity = ALERT'; + const sink = logging.sink(generateName()); + const FILTER = 'severity = ALERT'; before(function(done) { sink.create( @@ -216,7 +216,7 @@ describe('Logging', function() { }); it('should set metadata', function(done) { - var metadata = { + const metadata = { filter: FILTER, }; @@ -237,7 +237,7 @@ describe('Logging', function() { }); describe('listing sinks', function() { - var sink = logging.sink(generateName()); + const sink = logging.sink(generateName()); before(function(done) { sink.create( @@ -282,9 +282,9 @@ describe('Logging', function() { }); describe('logs', function() { - var log = logging.log('syslog'); + const log = logging.log('syslog'); - var logEntries = [ + const logEntries = [ // string data log.entry('log entry 1'), @@ -306,7 +306,7 @@ describe('Logging', function() { }), ]; - var options = { + const options = { resource: { type: 'gce_instance', labels: { @@ -418,11 +418,11 @@ describe('Logging', function() { }); it('should preserve order of entries', function(done) { - var entry1 = log.entry('1'); + const entry1 = log.entry('1'); setTimeout(function() { - var entry2 = log.entry('2'); - var entry3 = log.entry({timestamp: entry2.metadata.timestamp}, '3'); + const entry2 = log.entry('2'); + const entry3 = log.entry({timestamp: entry2.metadata.timestamp}, '3'); // Re-arrange to confirm the timestamp is sent and honored. log.write([entry2, entry3, entry1], options, function(err) { @@ -450,7 +450,7 @@ describe('Logging', function() { }); it('should preserve order for sequential write calls', function(done) { - var messages = ['1', '2', '3', '4', '5']; + const messages = ['1', '2', '3', '4', '5']; messages.forEach(function(message) { log.write(log.entry(message)); @@ -475,7 +475,7 @@ describe('Logging', function() { }); it('should write an entry with primitive values', function(done) { - var logEntry = log.entry({ + const logEntry = log.entry({ when: new Date(), matchUser: /username: (.+)/, matchUserError: new Error('No user found.'), @@ -494,7 +494,7 @@ describe('Logging', function() { function(err, entries) { assert.ifError(err); - var entry = entries[0]; + const entry = entries[0]; assert.deepStrictEqual(entry.data, { when: logEntry.data.when.toString(), @@ -510,15 +510,15 @@ describe('Logging', function() { }); it('should write a log with metadata', function(done) { - var metadata = extend({}, options, { + const metadata = extend({}, options, { severity: 'DEBUG', }); - var data = { + const data = { embeddedData: true, }; - var logEntry = log.entry(metadata, data); + const logEntry = log.entry(metadata, data); log.write(logEntry, function(err) { assert.ifError(err); @@ -532,7 +532,7 @@ describe('Logging', function() { function(err, entries) { assert.ifError(err); - var entry = entries[0]; + const entry = entries[0]; assert.strictEqual(entry.metadata.severity, metadata.severity); assert.deepStrictEqual(entry.data, data); @@ -545,8 +545,8 @@ describe('Logging', function() { }); it('should set the default resource', function(done) { - var text = 'entry-text'; - var entry = log.entry(text); + const text = 'entry-text'; + const entry = log.entry(text); log.write(entry, function(err) { assert.ifError(err); @@ -560,7 +560,7 @@ describe('Logging', function() { function(err, entries) { assert.ifError(err); - var entry = entries[0]; + const entry = entries[0]; assert.strictEqual(entry.data, text); assert.deepStrictEqual(entry.metadata.resource, { diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index f58e15a92f2..06045232177 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -16,14 +16,14 @@ 'use strict'; -var assert = require('assert'); -var extend = require('extend'); -var {GrpcService, util} = require('@google-cloud/common-grpc'); -var proxyquire = require('proxyquire'); +const assert = require('assert'); +const extend = require('extend'); +const {GrpcService, util} = require('@google-cloud/common-grpc'); +const proxyquire = require('proxyquire'); function FakeGrpcService() {} -var fakeEventIdNewOverride; +let fakeEventIdNewOverride; function FakeEventId() {} FakeEventId.prototype.new = function() { @@ -31,11 +31,11 @@ FakeEventId.prototype.new = function() { }; describe('Entry', function() { - var Entry; - var entry; + let Entry; + let entry; - var METADATA = {}; - var DATA = {}; + const METADATA = {}; + const DATA = {}; before(function() { Entry = proxyquire('../src/entry.js', { @@ -54,9 +54,9 @@ describe('Entry', function() { describe('instantiation', function() { it('should assign timestamp to metadata', function() { - var now = new Date(); + const now = new Date(); - var expectedTimestampBoundaries = { + const expectedTimestampBoundaries = { start: new Date(now.getTime() - 1000), end: new Date(now.getTime() + 1000), }; @@ -66,9 +66,9 @@ describe('Entry', function() { }); it('should not assign timestamp if one is already set', function() { - var timestamp = new Date('2012'); + const timestamp = new Date('2012'); - var entry = new Entry({ + const entry = new Entry({ timestamp: timestamp, }); @@ -76,27 +76,27 @@ describe('Entry', function() { }); it('should assign insertId to metadata', function() { - var eventId = 'event-id'; + const eventId = 'event-id'; fakeEventIdNewOverride = function() { return eventId; }; - var entry = new Entry(); + const entry = new Entry(); assert.strictEqual(entry.metadata.insertId, eventId); }); it('should not assign insertId if one is already set', function() { - var eventId = 'event-id'; + const eventId = 'event-id'; fakeEventIdNewOverride = function() { return eventId; }; - var userDefinedInsertId = 'user-defined-insert-id'; + const userDefinedInsertId = 'user-defined-insert-id'; - var entry = new Entry({ + const entry = new Entry({ insertId: userDefinedInsertId, }); @@ -109,13 +109,13 @@ describe('Entry', function() { }); describe('fromApiResponse_', function() { - var RESOURCE = {}; - var entry; - var date = new Date(); + const RESOURCE = {}; + let entry; + const date = new Date(); beforeEach(function() { - var seconds = date.getTime() / 1000; - var secondsRounded = Math.floor(seconds); + const seconds = date.getTime() / 1000; + const secondsRounded = Math.floor(seconds); FakeGrpcService.structToObj_ = function(data) { return data; @@ -142,7 +142,7 @@ describe('Entry', function() { }); it('should extend the entry with proto data', function() { - var entry = Entry.fromApiResponse_({ + const entry = Entry.fromApiResponse_({ resource: RESOURCE, payload: 'protoPayload', protoPayload: DATA, @@ -157,7 +157,7 @@ describe('Entry', function() { }); it('should extend the entry with text data', function() { - var entry = Entry.fromApiResponse_({ + const entry = Entry.fromApiResponse_({ resource: RESOURCE, payload: 'textPayload', textPayload: DATA, @@ -174,15 +174,15 @@ describe('Entry', function() { }); it('should not modify the original instance', function() { - var entryBefore = extend(true, {}, entry); + const entryBefore = extend(true, {}, entry); entry.toJSON(); - var entryAfter = extend(true, {}, entry); + const entryAfter = extend(true, {}, entry); assert.deepStrictEqual(entryBefore, entryAfter); }); it('should convert data as a struct and assign to jsonPayload', function() { - var input = {}; - var converted = {}; + const input = {}; + const converted = {}; FakeGrpcService.objToStruct_ = function(obj, options) { assert.strictEqual(obj, input); @@ -194,7 +194,7 @@ describe('Entry', function() { }; entry.data = input; - var json = entry.toJSON(); + const json = entry.toJSON(); assert.strictEqual(json.jsonPayload, converted); }); @@ -210,18 +210,18 @@ describe('Entry', function() { it('should assign string data as textPayload', function() { entry.data = 'string'; - var json = entry.toJSON(); + const json = entry.toJSON(); assert.strictEqual(json.textPayload, entry.data); }); it('should convert a date', function() { - var date = new Date(); + const date = new Date(); entry.metadata.timestamp = date; - var json = entry.toJSON(); + const json = entry.toJSON(); - var seconds = date.getTime() / 1000; - var secondsRounded = Math.floor(seconds); + const seconds = date.getTime() / 1000; + const secondsRounded = Math.floor(seconds); assert.deepStrictEqual(json.timestamp, { seconds: secondsRounded, diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 1963f877a9a..8250fff3cc0 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -16,19 +16,19 @@ 'use strict'; -var arrify = require('arrify'); -var assert = require('assert'); -var extend = require('extend'); -var proxyquire = require('proxyquire'); -var through = require('through2'); -var {util} = require('@google-cloud/common-grpc'); +const arrify = require('arrify'); +const assert = require('assert'); +const extend = require('extend'); +const proxyquire = require('proxyquire'); +const through = require('through2'); +const {util} = require('@google-cloud/common-grpc'); -var v2 = require('../src/v2'); +const v2 = require('../src/v2'); -var PKG = require('../package.json'); +const PKG = require('../package.json'); -var extended = false; -var fakePaginator = { +let extended = false; +const fakePaginator = { paginator: { extend: function(Class, methods) { if (Class.name !== 'Logging') { @@ -44,15 +44,15 @@ var fakePaginator = { }, }; -var googleAuthOverride; +let googleAuthOverride; function fakeGoogleAuth() { return (googleAuthOverride || util.noop).apply(null, arguments); } -var isCustomTypeOverride; -var promisifed = false; -var replaceProjectIdTokenOverride; -var fakeUtil = extend({}, util, { +let isCustomTypeOverride; +let promisifed = false; +let replaceProjectIdTokenOverride; +const fakeUtil = extend({}, util, { isCustomType: function() { if (isCustomTypeOverride) { return isCustomTypeOverride.apply(null, arguments); @@ -83,7 +83,7 @@ const fakeProjectify = { }, }; -var originalFakeUtil = extend(true, {}, fakeUtil); +const originalFakeUtil = extend(true, {}, fakeUtil); function fakeV2() {} @@ -104,10 +104,10 @@ function FakeSink() { } describe('Logging', function() { - var Logging; - var logging; + let Logging; + let logging; - var PROJECT_ID = 'project-id'; + const PROJECT_ID = 'project-id'; before(function() { Logging = proxyquire('../', { @@ -174,8 +174,8 @@ describe('Logging', function() { }); it('should cache a local GoogleAuth instance', function() { - var fakeGoogleAuthInstance = {}; - var options = { + const fakeGoogleAuthInstance = {}; + const options = { a: 'b', c: 'd', }; @@ -195,17 +195,17 @@ describe('Logging', function() { return fakeGoogleAuthInstance; }; - var logging = new Logging(options); + const logging = new Logging(options); assert.strictEqual(logging.auth, fakeGoogleAuthInstance); }); it('should localize the options', function() { - var options = { + const options = { a: 'b', c: 'd', }; - var logging = new Logging(options); + const logging = new Logging(options); assert.notStrictEqual(logging.options, options); @@ -227,13 +227,13 @@ describe('Logging', function() { }); it('should default the projectId to the token', function() { - var logging = new Logging({}); + const logging = new Logging({}); assert.strictEqual(logging.projectId, '{{projectId}}'); }); }); describe('createSink', function() { - var SINK_NAME = 'name'; + const SINK_NAME = 'name'; it('should throw if a name is not provided', function() { assert.throws(function() { @@ -248,9 +248,9 @@ describe('Logging', function() { }); it('should set acls for a Dataset destination', function(done) { - var dataset = {}; + const dataset = {}; - var CONFIG = { + const CONFIG = { destination: dataset, }; @@ -269,9 +269,9 @@ describe('Logging', function() { }); it('should set acls for a Topic destination', function(done) { - var topic = {}; + const topic = {}; - var CONFIG = { + const CONFIG = { destination: topic, }; @@ -290,9 +290,9 @@ describe('Logging', function() { }); it('should set acls for a Bucket destination', function(done) { - var bucket = {}; + const bucket = {}; - var CONFIG = { + const CONFIG = { destination: bucket, }; @@ -312,12 +312,12 @@ describe('Logging', function() { describe('API request', function() { it('should make the correct API request', function(done) { - var config = { + const config = { a: 'b', c: 'd', }; - var expectedConfig = extend({}, config, { + const expectedConfig = extend({}, config, { name: SINK_NAME, }); @@ -325,7 +325,7 @@ describe('Logging', function() { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'createSink'); - var expectedParent = 'projects/' + logging.projectId; + const expectedParent = 'projects/' + logging.projectId; assert.strictEqual(config.reqOpts.parent, expectedParent); assert.deepStrictEqual(config.reqOpts.sink, expectedConfig); @@ -338,7 +338,7 @@ describe('Logging', function() { }); it('should accept GAX options', function(done) { - var config = { + const config = { a: 'b', c: 'd', gaxOptions: {}, @@ -354,8 +354,8 @@ describe('Logging', function() { }); describe('error', function() { - var error = new Error('Error.'); - var apiResponse = {}; + const error = new Error('Error.'); + const apiResponse = {}; beforeEach(function() { logging.request = function(config, callback) { @@ -375,7 +375,7 @@ describe('Logging', function() { }); describe('success', function() { - var apiResponse = { + const apiResponse = { name: SINK_NAME, }; @@ -386,7 +386,7 @@ describe('Logging', function() { }); it('should exec callback with Sink & API response', function(done) { - var sink = {}; + const sink = {}; logging.sink = function(name_) { assert.strictEqual(name_, SINK_NAME); @@ -408,11 +408,11 @@ describe('Logging', function() { }); describe('entry', function() { - var RESOURCE = {}; - var DATA = {}; + const RESOURCE = {}; + const DATA = {}; it('should return an Entry object', function() { - var entry = logging.entry(RESOURCE, DATA); + const entry = logging.entry(RESOURCE, DATA); assert(entry instanceof FakeEntry); assert.strictEqual(entry.calledWith_[0], RESOURCE); assert.strictEqual(entry.calledWith_[1], DATA); @@ -433,7 +433,7 @@ describe('Logging', function() { }); it('should make the correct API request', function(done) { - var options = {}; + const options = {}; logging.request = function(config) { assert.strictEqual(config.client, 'LoggingServiceV2Client'); @@ -458,7 +458,7 @@ describe('Logging', function() { }); it('should not push the same resourceName again', function(done) { - var options = { + const options = { resourceNames: ['projects/' + logging.projectId], }; @@ -473,7 +473,7 @@ describe('Logging', function() { }); it('should allow overriding orderBy', function(done) { - var options = { + const options = { orderBy: 'timestamp asc', }; @@ -486,7 +486,7 @@ describe('Logging', function() { }); it('should accept GAX options', function(done) { - var options = { + const options = { a: 'b', c: 'd', gaxOptions: { @@ -504,7 +504,7 @@ describe('Logging', function() { }); describe('error', function() { - var ARGS = [new Error('Error.'), [], {}]; + const ARGS = [new Error('Error.'), [], {}]; beforeEach(function() { logging.request = function(config, callback) { @@ -514,7 +514,7 @@ describe('Logging', function() { it('should execute callback with error & API response', function(done) { logging.getEntries({}, function() { - var args = [].slice.call(arguments); + const args = [].slice.call(arguments); assert.deepStrictEqual(args, ARGS); done(); }); @@ -522,7 +522,7 @@ describe('Logging', function() { }); describe('success', function() { - var ARGS = [ + const ARGS = [ null, [ { @@ -541,7 +541,7 @@ describe('Logging', function() { logging.getEntries({}, function(err, entries) { assert.ifError(err); - var argsPassedToFromApiResponse_ = entries[0]; + const argsPassedToFromApiResponse_ = entries[0]; assert.strictEqual(argsPassedToFromApiResponse_[0], ARGS[1][0]); done(); @@ -551,7 +551,7 @@ describe('Logging', function() { }); describe('getEntriesStream', function() { - var OPTIONS = { + const OPTIONS = { a: 'b', c: 'd', gaxOptions: { @@ -560,8 +560,8 @@ describe('Logging', function() { }, }; - var REQUEST_STREAM; - var RESULT = {}; + let REQUEST_STREAM; + const RESULT = {}; beforeEach(function() { REQUEST_STREAM = through.obj(); @@ -595,15 +595,15 @@ describe('Logging', function() { return REQUEST_STREAM; }; - var stream = logging.getEntriesStream(OPTIONS); + const stream = logging.getEntriesStream(OPTIONS); stream.emit('reading'); }); it('should convert results from request to Entry', function(done) { - var stream = logging.getEntriesStream(OPTIONS); + const stream = logging.getEntriesStream(OPTIONS); stream.on('data', function(entry) { - var argsPassedToFromApiResponse_ = entry[0]; + const argsPassedToFromApiResponse_ = entry[0]; assert.strictEqual(argsPassedToFromApiResponse_, RESULT); done(); @@ -615,7 +615,7 @@ describe('Logging', function() { it('should expose abort function', function(done) { REQUEST_STREAM.abort = done; - var stream = logging.getEntriesStream(OPTIONS); + const stream = logging.getEntriesStream(OPTIONS); stream.emit('reading'); @@ -624,14 +624,14 @@ describe('Logging', function() { it('should not require an options object', function() { assert.doesNotThrow(function() { - var stream = logging.getEntriesStream(); + const stream = logging.getEntriesStream(); stream.emit('reading'); }); }); }); describe('getSinks', function() { - var OPTIONS = { + const OPTIONS = { a: 'b', c: 'd', gaxOptions: { @@ -672,7 +672,7 @@ describe('Logging', function() { }); describe('error', function() { - var ARGS = [new Error('Error.'), [], {}]; + const ARGS = [new Error('Error.'), [], {}]; beforeEach(function() { logging.request = function(config, callback) { @@ -682,7 +682,7 @@ describe('Logging', function() { it('should execute callback with error & API response', function(done) { logging.getEntries(OPTIONS, function() { - var args = [].slice.call(arguments); + const args = [].slice.call(arguments); assert.deepStrictEqual(args, ARGS); done(); }); @@ -690,7 +690,7 @@ describe('Logging', function() { }); describe('success', function() { - var ARGS = [ + const ARGS = [ null, [ { @@ -707,7 +707,7 @@ describe('Logging', function() { }); it('should execute callback with Logs & API resp', function(done) { - var sinkInstance = {}; + const sinkInstance = {}; logging.sink = function(name) { assert.strictEqual(name, ARGS[1][0].name); @@ -727,7 +727,7 @@ describe('Logging', function() { }); describe('getSinksStream', function() { - var OPTIONS = { + const OPTIONS = { a: 'b', c: 'd', gaxOptions: { @@ -736,8 +736,8 @@ describe('Logging', function() { }, }; - var REQUEST_STREAM; - var RESULT = { + let REQUEST_STREAM; + const RESULT = { name: 'sink-name', }; @@ -772,14 +772,14 @@ describe('Logging', function() { return REQUEST_STREAM; }; - var stream = logging.getSinksStream(OPTIONS); + const stream = logging.getSinksStream(OPTIONS); stream.emit('reading'); }); it('should convert results from request to Sink', function(done) { - var stream = logging.getSinksStream(OPTIONS); + const stream = logging.getSinksStream(OPTIONS); - var sinkInstance = {}; + const sinkInstance = {}; logging.sink = function(name) { assert.strictEqual(name, RESULT.name); @@ -798,7 +798,7 @@ describe('Logging', function() { it('should expose abort function', function(done) { REQUEST_STREAM.abort = done; - var stream = logging.getSinksStream(OPTIONS); + const stream = logging.getSinksStream(OPTIONS); stream.emit('reading'); @@ -807,10 +807,10 @@ describe('Logging', function() { }); describe('log', function() { - var NAME = 'log-name'; + const NAME = 'log-name'; it('should return a Log object', function() { - var log = logging.log(NAME); + const log = logging.log(NAME); assert(log instanceof FakeLog); assert.strictEqual(log.calledWith_[0], logging); assert.strictEqual(log.calledWith_[1], NAME); @@ -818,7 +818,7 @@ describe('Logging', function() { }); describe('request', function() { - var CONFIG = { + const CONFIG = { client: 'client', method: 'method', reqOpts: { @@ -828,7 +828,7 @@ describe('Logging', function() { gaxOpts: {}, }; - var PROJECT_ID = 'project-id'; + const PROJECT_ID = 'project-id'; beforeEach(function() { logging.auth = { @@ -863,7 +863,7 @@ describe('Logging', function() { }); it('should return error if getting project ID failed', function(done) { - var error = new Error('Error.'); + const error = new Error('Error.'); logging.auth.getProjectId = function(callback) { callback(error); @@ -876,7 +876,7 @@ describe('Logging', function() { }); it('should initiate and cache the client', function() { - var fakeClient = { + const fakeClient = { [CONFIG.method]: util.noop, }; @@ -902,7 +902,7 @@ describe('Logging', function() { }); it('should replace the project ID token', function(done) { - var replacedReqOpts = {}; + const replacedReqOpts = {}; replaceProjectIdTokenOverride = function(reqOpts, projectId) { assert.notStrictEqual(reqOpts, CONFIG.reqOpts); @@ -933,7 +933,7 @@ describe('Logging', function() { }; global.GCLOUD_SANDBOX_ENV = true; - var returnValue = logging.request(CONFIG, assert.ifError); + const returnValue = logging.request(CONFIG, assert.ifError); delete global.GCLOUD_SANDBOX_ENV; assert.strictEqual(returnValue, undefined); @@ -957,10 +957,10 @@ describe('Logging', function() { }); it('should execute callback with error', function(done) { - var error = new Error('Error.'); + const error = new Error('Error.'); logging.api[CONFIG.client][CONFIG.method] = function() { - var callback = [].slice.call(arguments).pop(); + const callback = [].slice.call(arguments).pop(); callback(error); }; @@ -972,7 +972,7 @@ describe('Logging', function() { it('should execute the request function', function() { logging.api[CONFIG.client][CONFIG.method] = function(done) { - var callback = [].slice.call(arguments).pop(); + const callback = [].slice.call(arguments).pop(); callback(null, done); // so it ends the test }; @@ -981,7 +981,7 @@ describe('Logging', function() { }); describe('makeRequestStream', function() { - var GAX_STREAM; + let GAX_STREAM; beforeEach(function() { GAX_STREAM = through(); @@ -1001,7 +1001,7 @@ describe('Logging', function() { }; global.GCLOUD_SANDBOX_ENV = true; - var returnValue = logging.request(CONFIG); + const returnValue = logging.request(CONFIG); returnValue.emit('reading'); delete global.GCLOUD_SANDBOX_ENV; @@ -1012,7 +1012,7 @@ describe('Logging', function() { it('should expose an abort function', function(done) { GAX_STREAM.cancel = done; - var requestStream = logging.request(CONFIG); + const requestStream = logging.request(CONFIG); requestStream.emit('reading'); requestStream.abort(); }); @@ -1032,18 +1032,18 @@ describe('Logging', function() { }, }; - var requestStream = logging.request(CONFIG); + const requestStream = logging.request(CONFIG); requestStream.emit('reading'); }); it('should destroy the stream with prepare error', function(done) { - var error = new Error('Error.'); + const error = new Error('Error.'); logging.auth.getProjectId = function(callback) { callback(error); }; - var requestStream = logging.request(CONFIG); + const requestStream = logging.request(CONFIG); requestStream.emit('reading'); requestStream.on('error', function(err) { @@ -1053,9 +1053,9 @@ describe('Logging', function() { }); it('should destroy the stream with GAX error', function(done) { - var error = new Error('Error.'); + const error = new Error('Error.'); - var requestStream = logging.request(CONFIG); + const requestStream = logging.request(CONFIG); requestStream.emit('reading'); requestStream.on('error', function(err) { @@ -1069,10 +1069,10 @@ describe('Logging', function() { }); describe('sink', function() { - var NAME = 'sink-name'; + const NAME = 'sink-name'; it('should return a Log object', function() { - var sink = logging.sink(NAME); + const sink = logging.sink(NAME); assert(sink instanceof FakeSink); assert.strictEqual(sink.calledWith_[0], logging); assert.strictEqual(sink.calledWith_[1], NAME); @@ -1080,10 +1080,10 @@ describe('Logging', function() { }); describe('setAclForBucket_', function() { - var SINK_NAME = 'name'; - var CONFIG; + const SINK_NAME = 'name'; + let CONFIG; - var bucket; + let bucket; beforeEach(function() { bucket = { @@ -1110,8 +1110,8 @@ describe('Logging', function() { }); describe('error', function() { - var error = new Error('Error.'); - var apiResponse = {}; + const error = new Error('Error.'); + const apiResponse = {}; beforeEach(function() { bucket.acl.owners.addGroup = function(entity, callback) { @@ -1131,7 +1131,7 @@ describe('Logging', function() { }); describe('success', function() { - var apiResponse = {}; + const apiResponse = {}; beforeEach(function() { bucket.acl.owners.addGroup = function(entity, callback) { @@ -1146,7 +1146,7 @@ describe('Logging', function() { assert.strictEqual(config, CONFIG); - var expectedDestination = 'storage.googleapis.com/' + bucket.name; + const expectedDestination = 'storage.googleapis.com/' + bucket.name; assert.strictEqual(config.destination, expectedDestination); callback(); // done() @@ -1161,9 +1161,9 @@ describe('Logging', function() { }); describe('setAclForDataset_', function() { - var SINK_NAME = 'name'; - var CONFIG; - var dataset; + const SINK_NAME = 'name'; + let CONFIG; + let dataset; beforeEach(function() { dataset = { @@ -1180,8 +1180,8 @@ describe('Logging', function() { describe('metadata refresh', function() { describe('error', function() { - var error = new Error('Error.'); - var apiResponse = {}; + const error = new Error('Error.'); + const apiResponse = {}; beforeEach(function() { dataset.getMetadata = function(callback) { @@ -1200,11 +1200,11 @@ describe('Logging', function() { }); describe('success', function() { - var apiResponse = { + const apiResponse = { access: [{}, {}], }; - var originalAccess = [].slice.call(apiResponse.access); + const originalAccess = [].slice.call(apiResponse.access); beforeEach(function() { dataset.getMetadata = function(callback) { @@ -1213,12 +1213,12 @@ describe('Logging', function() { }); it('should set the correct metadata', function(done) { - var access = { + const access = { role: 'WRITER', groupByEmail: 'cloud-logs@google.com', }; - var expectedAccess = [].slice.call(originalAccess).concat(access); + const expectedAccess = [].slice.call(originalAccess).concat(access); dataset.setMetadata = function(metadata) { assert.deepStrictEqual(apiResponse.access, originalAccess); @@ -1230,8 +1230,8 @@ describe('Logging', function() { }); describe('updating metadata error', function() { - var error = new Error('Error.'); - var apiResponse = {}; + const error = new Error('Error.'); + const apiResponse = {}; beforeEach(function() { dataset.setMetadata = function(metadata, callback) { @@ -1250,7 +1250,7 @@ describe('Logging', function() { }); describe('updating metadata success', function() { - var apiResponse = {}; + const apiResponse = {}; beforeEach(function() { dataset.setMetadata = function(metadata, callback) { @@ -1260,7 +1260,7 @@ describe('Logging', function() { it('should call createSink with string destination', function(done) { logging.createSink = function(name, config, callback) { - var expectedDestination = [ + const expectedDestination = [ 'bigquery.googleapis.com', 'projects', dataset.parent.projectId, @@ -1282,9 +1282,9 @@ describe('Logging', function() { }); describe('setAclForTopic_', function() { - var SINK_NAME = 'name'; - var CONFIG; - var topic; + const SINK_NAME = 'name'; + let CONFIG; + let topic; beforeEach(function() { topic = { @@ -1302,8 +1302,8 @@ describe('Logging', function() { describe('get policy', function() { describe('error', function() { - var error = new Error('Error.'); - var apiResponse = {}; + const error = new Error('Error.'); + const apiResponse = {}; beforeEach(function() { topic.iam.getPolicy = function(callback) { @@ -1322,11 +1322,11 @@ describe('Logging', function() { }); describe('success', function() { - var apiResponse = { + const apiResponse = { bindings: [{}, {}], }; - var originalBindings = [].slice.call(apiResponse.bindings); + const originalBindings = [].slice.call(apiResponse.bindings); beforeEach(function() { topic.iam.getPolicy = function(callback) { @@ -1335,12 +1335,12 @@ describe('Logging', function() { }); it('should set the correct policy bindings', function(done) { - var binding = { + const binding = { role: 'roles/pubsub.publisher', members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], }; - var expectedBindings = [].slice.call(originalBindings); + const expectedBindings = [].slice.call(originalBindings); expectedBindings.push(binding); topic.iam.setPolicy = function(policy) { @@ -1353,8 +1353,8 @@ describe('Logging', function() { }); describe('updating policy error', function() { - var error = new Error('Error.'); - var apiResponse = {}; + const error = new Error('Error.'); + const apiResponse = {}; beforeEach(function() { topic.iam.setPolicy = function(policy, callback) { @@ -1373,7 +1373,7 @@ describe('Logging', function() { }); describe('updating policy success', function() { - var apiResponse = {}; + const apiResponse = {}; beforeEach(function() { topic.iam.setPolicy = function(policy, callback) { @@ -1383,7 +1383,7 @@ describe('Logging', function() { it('should call createSink with string destination', function(done) { logging.createSink = function(name, config, callback) { - var expectedDestination = 'pubsub.googleapis.com/' + topic.name; + const expectedDestination = 'pubsub.googleapis.com/' + topic.name; assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); assert.strictEqual(config.destination, expectedDestination); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index d6a8a0b30dd..e3f31982920 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -16,15 +16,15 @@ 'use strict'; -var assert = require('assert'); -var extend = require('extend'); -var prop = require('propprop'); -var proxyquire = require('proxyquire'); -var {util} = require('@google-cloud/common-grpc'); +const assert = require('assert'); +const extend = require('extend'); +const prop = require('propprop'); +const proxyquire = require('proxyquire'); +const {util} = require('@google-cloud/common-grpc'); const promisify = require('@google-cloud/promisify'); -var promisifed = false; -var fakePromisify = extend({}, promisify, { +let promisifed = false; +const fakePromisify = extend({}, promisify, { promisifyAll: function(Class, options) { if (Class.name !== 'Log') { return; @@ -34,29 +34,29 @@ var fakePromisify = extend({}, promisify, { }, }); -var Entry = require('../src/entry.js'); +const Entry = require('../src/entry.js'); function FakeMetadata() { this.calledWith_ = arguments; } describe('Log', function() { - var Log; - var log; + let Log; + let log; - var PROJECT_ID = 'project-id'; - var LOG_NAME = 'escaping/required/for/this/log-name'; - var LOG_NAME_ENCODED = encodeURIComponent(LOG_NAME); - var LOG_NAME_FORMATTED = [ + const PROJECT_ID = 'project-id'; + const LOG_NAME = 'escaping/required/for/this/log-name'; + const LOG_NAME_ENCODED = encodeURIComponent(LOG_NAME); + const LOG_NAME_FORMATTED = [ 'projects', PROJECT_ID, 'logs', LOG_NAME_ENCODED, ].join('/'); - var LOGGING; + let LOGGING; - var assignSeverityToEntriesOverride = null; + let assignSeverityToEntriesOverride = null; before(function() { Log = proxyquire('../src/log.js', { @@ -64,7 +64,7 @@ describe('Log', function() { './entry.js': Entry, './metadata.js': FakeMetadata, }); - var assignSeverityToEntries_ = Log.assignSeverityToEntries_; + const assignSeverityToEntries_ = Log.assignSeverityToEntries_; Log.assignSeverityToEntries_ = function() { return ( assignSeverityToEntriesOverride || assignSeverityToEntries_ @@ -98,15 +98,15 @@ describe('Log', function() { }); it('should localize the formatted name', function() { - var formattedName = 'formatted-name'; + const formattedName = 'formatted-name'; - var formatName_ = Log.formatName_; + const formatName_ = Log.formatName_; Log.formatName_ = function() { Log.formatName_ = formatName_; return formattedName; }; - var log = new Log(LOGGING, LOG_NAME_FORMATTED); + const log = new Log(LOGGING, LOG_NAME_FORMATTED); assert.strictEqual(log.formattedName_, formattedName); }); @@ -117,8 +117,8 @@ describe('Log', function() { }); it('should accept and localize options.removeCircular', function() { - var options = {removeCircular: true}; - var log = new Log(LOGGING, LOG_NAME_FORMATTED, options); + const options = {removeCircular: true}; + const log = new Log(LOGGING, LOG_NAME_FORMATTED, options); assert.strictEqual(log.removeCircular_, true); }); @@ -132,12 +132,12 @@ describe('Log', function() { }); describe('assignSeverityToEntries_', function() { - var circular = {}; + const circular = {}; circular.circular = circular; - var ENTRIES = [{data: {a: 'b'}}, {data: {c: 'd'}}, {data: {e: circular}}]; + const ENTRIES = [{data: {a: 'b'}}, {data: {c: 'd'}}, {data: {e: circular}}]; - var SEVERITY = 'severity'; + const SEVERITY = 'severity'; it('should assign severity to a single entry', function() { assert.deepStrictEqual( @@ -158,32 +158,32 @@ describe('Log', function() { }); it('should not affect original array', function() { - var originalEntries = ENTRIES.map(x => extend({}, x)); + const originalEntries = ENTRIES.map(x => extend({}, x)); Log.assignSeverityToEntries_(originalEntries, SEVERITY); assert.deepStrictEqual(originalEntries, ENTRIES); }); }); describe('formatName_', function() { - var PROJECT_ID = 'project-id'; - var NAME = 'log-name'; + const PROJECT_ID = 'project-id'; + const NAME = 'log-name'; - var EXPECTED = 'projects/' + PROJECT_ID + '/logs/' + NAME; + const EXPECTED = 'projects/' + PROJECT_ID + '/logs/' + NAME; it('should properly format the name', function() { assert.strictEqual(Log.formatName_(PROJECT_ID, NAME), EXPECTED); }); it('should encode a name that requires it', function() { - var name = 'appengine/logs'; - var expectedName = 'projects/' + PROJECT_ID + '/logs/appengine%2Flogs'; + const name = 'appengine/logs'; + const expectedName = 'projects/' + PROJECT_ID + '/logs/appengine%2Flogs'; assert.strictEqual(Log.formatName_(PROJECT_ID, name), expectedName); }); it('should not encode a name that does not require it', function() { - var name = 'appengine%2Flogs'; - var expectedName = 'projects/' + PROJECT_ID + '/logs/' + name; + const name = 'appengine%2Flogs'; + const expectedName = 'projects/' + PROJECT_ID + '/logs/' + name; assert.strictEqual(Log.formatName_(PROJECT_ID, name), expectedName); }); @@ -208,7 +208,7 @@ describe('Log', function() { }); it('should accept gaxOptions', function(done) { - var gaxOptions = {}; + const gaxOptions = {}; log.logging.request = function(config) { assert.strictEqual(config.gaxOpts, gaxOptions); @@ -221,12 +221,12 @@ describe('Log', function() { describe('entry', function() { it('should return an entry from Logging', function() { - var metadata = { + const metadata = { val: true, }; - var data = {}; + const data = {}; - var entryObject = {}; + const entryObject = {}; log.logging.entry = function(metadata_, data_) { assert.deepStrictEqual(metadata_, metadata); @@ -234,12 +234,12 @@ describe('Log', function() { return entryObject; }; - var entry = log.entry(metadata, data); + const entry = log.entry(metadata, data); assert.strictEqual(entry, entryObject); }); it('should assume one argument means data', function(done) { - var data = {}; + const data = {}; log.logging.entry = function(metadata, data_) { assert.strictEqual(data_, data); @@ -251,7 +251,7 @@ describe('Log', function() { }); describe('getEntries', function() { - var EXPECTED_OPTIONS = { + const EXPECTED_OPTIONS = { filter: 'logName="' + LOG_NAME_FORMATTED + '"', }; @@ -265,7 +265,7 @@ describe('Log', function() { }); it('should allow overriding the options', function(done) { - var options = { + const options = { custom: true, filter: 'custom filter', }; @@ -280,8 +280,8 @@ describe('Log', function() { }); describe('getEntriesStream', function() { - var fakeStream = {}; - var EXPECTED_OPTIONS = { + const fakeStream = {}; + const EXPECTED_OPTIONS = { filter: 'logName="' + LOG_NAME_FORMATTED + '"', }; @@ -292,12 +292,12 @@ describe('Log', function() { return fakeStream; }; - var stream = log.getEntriesStream(); + const stream = log.getEntriesStream(); assert.strictEqual(stream, fakeStream); }); it('should allow overriding the options', function(done) { - var options = { + const options = { custom: true, filter: 'custom filter', }; @@ -308,15 +308,15 @@ describe('Log', function() { return fakeStream; }; - var stream = log.getEntriesStream(options); + const stream = log.getEntriesStream(options); assert.strictEqual(stream, fakeStream); }); }); describe('write', function() { - var ENTRY = {}; - var OPTIONS = {}; - var FAKE_RESOURCE = 'fake-resource'; + const ENTRY = {}; + const OPTIONS = {}; + const FAKE_RESOURCE = 'fake-resource'; beforeEach(function() { log.decorateEntries_ = function(entries) { @@ -328,8 +328,8 @@ describe('Log', function() { }); it('should forward options.resource to request', function(done) { - var CUSTOM_RESOURCE = 'custom-resource'; - var optionsWithResource = extend({}, OPTIONS, { + const CUSTOM_RESOURCE = 'custom-resource'; + const optionsWithResource = extend({}, OPTIONS, { resource: CUSTOM_RESOURCE, }); @@ -352,17 +352,17 @@ describe('Log', function() { }); it('should transform camelcase label keys to snake case', function(done) { - var CUSTOM_RESOURCE = { + const CUSTOM_RESOURCE = { labels: { camelCaseKey: 'camel-case-key-val', }, }; - var EXPECTED_RESOURCE = { + const EXPECTED_RESOURCE = { labels: { camel_case_key: 'camel-case-key-val', }, }; - var optionsWithResource = extend({}, OPTIONS, { + const optionsWithResource = extend({}, OPTIONS, { resource: CUSTOM_RESOURCE, }); @@ -404,7 +404,7 @@ describe('Log', function() { }); it('should arrify & decorate the entries', function(done) { - var decoratedEntries = []; + const decoratedEntries = []; log.decorateEntries_ = function(entries) { assert.strictEqual(entries[0], ENTRY); @@ -429,8 +429,8 @@ describe('Log', function() { }); describe('severity shortcuts', function() { - var ENTRY = {}; - var LABELS = []; + const ENTRY = {}; + const LABELS = []; beforeEach(function() { log.write = util.noop; @@ -449,7 +449,7 @@ describe('Log', function() { }); it('should pass correct arguments to write', function(done) { - var assignedEntries = []; + const assignedEntries = []; assignSeverityToEntriesOverride = function() { return assignedEntries; @@ -478,7 +478,7 @@ describe('Log', function() { }); it('should pass correct arguments to write', function(done) { - var assignedEntries = []; + const assignedEntries = []; assignSeverityToEntriesOverride = function() { return assignedEntries; @@ -507,7 +507,7 @@ describe('Log', function() { }); it('should pass correct arguments to write', function(done) { - var assignedEntries = []; + const assignedEntries = []; assignSeverityToEntriesOverride = function() { return assignedEntries; @@ -536,7 +536,7 @@ describe('Log', function() { }); it('should pass correct arguments to write', function(done) { - var assignedEntries = []; + const assignedEntries = []; assignSeverityToEntriesOverride = function() { return assignedEntries; @@ -565,7 +565,7 @@ describe('Log', function() { }); it('should pass correct arguments to write', function(done) { - var assignedEntries = []; + const assignedEntries = []; assignSeverityToEntriesOverride = function() { return assignedEntries; @@ -594,7 +594,7 @@ describe('Log', function() { }); it('should pass correct arguments to write', function(done) { - var assignedEntries = []; + const assignedEntries = []; assignSeverityToEntriesOverride = function() { return assignedEntries; @@ -623,7 +623,7 @@ describe('Log', function() { }); it('should pass correct arguments to write', function(done) { - var assignedEntries = []; + const assignedEntries = []; assignSeverityToEntriesOverride = function() { return assignedEntries; @@ -652,7 +652,7 @@ describe('Log', function() { }); it('should pass correct arguments to write', function(done) { - var assignedEntries = []; + const assignedEntries = []; assignSeverityToEntriesOverride = function() { return assignedEntries; @@ -670,7 +670,7 @@ describe('Log', function() { }); describe('decorateEntries_', function() { - var toJSONResponse = {}; + const toJSONResponse = {}; function FakeEntry() {} FakeEntry.prototype.toJSON = function() { @@ -688,14 +688,14 @@ describe('Log', function() { }); it('should create an Entry object if one is not provided', function() { - var entry = {}; + const entry = {}; log.entry = function(entry_) { assert.strictEqual(entry_, entry); return new FakeEntry(); }; - var decoratedEntries = log.decorateEntries_([entry]); + const decoratedEntries = log.decorateEntries_([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); }); @@ -704,19 +704,19 @@ describe('Log', function() { throw new Error('should not be called'); }; - var entry = new Entry(); + const entry = new Entry(); entry.toJSON = function() { return toJSONResponse; }; - var decoratedEntries = log.decorateEntries_([entry]); + const decoratedEntries = log.decorateEntries_([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); }); it('should pass log.removeCircular to toJSON', function(done) { log.removeCircular_ = true; - var entry = new Entry(); + const entry = new Entry(); entry.toJSON = function(options_) { assert.deepStrictEqual(options_, {removeCircular: true}); setImmediate(done); @@ -727,9 +727,9 @@ describe('Log', function() { }); it('should throw error from serialization', function() { - var error = new Error('Error.'); + const error = new Error('Error.'); - var entry = new Entry(); + const entry = new Entry(); entry.toJSON = function() { throw error; }; diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 65bbcc6348c..f8526c62495 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -16,15 +16,15 @@ 'use strict'; -var assert = require('assert'); -var extend = require('extend'); -var proxyquire = require('proxyquire'); +const assert = require('assert'); +const extend = require('extend'); +const proxyquire = require('proxyquire'); -var instanceOverride; -var fakeGcpMetadata = { +let instanceOverride; +const fakeGcpMetadata = { instance: function(path) { if (instanceOverride) { - var override = Array.isArray(instanceOverride) + const override = Array.isArray(instanceOverride) ? instanceOverride.find(entry => entry.path === path) : instanceOverride; @@ -45,10 +45,10 @@ var fakeGcpMetadata = { }, }; -var FAKE_READFILE_ERROR_MESSAGE = 'fake readFile error'; -var FAKE_READFILE_CONTENTS = 'fake readFile contents'; -var readFileShouldError; -var fakeFS = { +const FAKE_READFILE_ERROR_MESSAGE = 'fake readFile error'; +const FAKE_READFILE_CONTENTS = 'fake readFile contents'; +let readFileShouldError; +const fakeFS = { readFile: (filename, encoding, callback) => { setImmediate(() => { if (readFileShouldError) callback(new Error(FAKE_READFILE_ERROR_MESSAGE)); @@ -58,13 +58,13 @@ var fakeFS = { }; describe('metadata', function() { - var MetadataCached; - var Metadata; - var metadata; + let MetadataCached; + let Metadata; + let metadata; - var LOGGING; + let LOGGING; - var ENV_CACHED = extend({}, process.env); + const ENV_CACHED = extend({}, process.env); before(function() { Metadata = proxyquire('../src/metadata.js', { @@ -96,8 +96,8 @@ describe('metadata', function() { }); describe('getCloudFunctionDescriptor', function() { - var FUNCTION_NAME = 'function-name'; - var FUNCTION_REGION = 'function-region'; + const FUNCTION_NAME = 'function-name'; + const FUNCTION_REGION = 'function-region'; beforeEach(function() { process.env.FUNCTION_NAME = FUNCTION_NAME; @@ -116,9 +116,9 @@ describe('metadata', function() { }); describe('getGAEDescriptor', function() { - var GAE_MODULE_NAME = 'gae-module-name'; - var GAE_SERVICE = 'gae-service'; - var GAE_VERSION = 'gae-version'; + const GAE_MODULE_NAME = 'gae-module-name'; + const GAE_SERVICE = 'gae-service'; + const GAE_VERSION = 'gae-version'; beforeEach(function() { process.env.GAE_MODULE_NAME = GAE_MODULE_NAME; @@ -139,13 +139,13 @@ describe('metadata', function() { it('should use GAE_MODULE_NAME for module_id', function() { delete process.env.GAE_SERVICE; - var moduleId = Metadata.getGAEDescriptor().labels.module_id; + const moduleId = Metadata.getGAEDescriptor().labels.module_id; assert.strictEqual(moduleId, GAE_MODULE_NAME); }); }); describe('getGKEDescriptor', function() { - var CLUSTER_NAME = 'gke-cluster-name'; + const CLUSTER_NAME = 'gke-cluster-name'; it('should return the correct descriptor', function(done) { instanceOverride = { @@ -167,7 +167,7 @@ describe('metadata', function() { }); it('should return error on failure to acquire metadata', function(done) { - var FAKE_ERROR = new Error(); + const FAKE_ERROR = new Error(); instanceOverride = { errorArg: FAKE_ERROR, }; @@ -189,9 +189,9 @@ describe('metadata', function() { }); describe('getGCEDescriptor', function() { - var INSTANCE_ID = 'fake-instance-id'; - var ZONE_ID = 'morrowind-vivec-1'; - var ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + const INSTANCE_ID = 'fake-instance-id'; + const ZONE_ID = 'morrowind-vivec-1'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; it('should return the correct descriptor', function(done) { instanceOverride = [ @@ -219,7 +219,7 @@ describe('metadata', function() { }); it('should return error on failure to acquire metadata', function(done) { - var FAKE_ERROR = new Error(); + const FAKE_ERROR = new Error(); instanceOverride = { errorArg: FAKE_ERROR, }; @@ -251,7 +251,7 @@ describe('metadata', function() { describe('environments', function() { describe('app engine', function() { it('should return correct descriptor', function(done) { - var DESCRIPTOR = {}; + const DESCRIPTOR = {}; Metadata.getGAEDescriptor = function() { return DESCRIPTOR; @@ -271,7 +271,7 @@ describe('metadata', function() { describe('cloud function', function() { it('should return correct descriptor', function(done) { - var DESCRIPTOR = {}; + const DESCRIPTOR = {}; Metadata.getCloudFunctionDescriptor = function() { return DESCRIPTOR; @@ -291,9 +291,9 @@ describe('metadata', function() { describe('compute engine', function() { it('should return correct descriptor', function(done) { - var INSTANCE_ID = 'overridden-value'; - var ZONE_ID = 'cyrodiil-anvil-2'; - var ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + const INSTANCE_ID = 'overridden-value'; + const ZONE_ID = 'cyrodiil-anvil-2'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; instanceOverride = [ { path: 'id', @@ -325,7 +325,7 @@ describe('metadata', function() { describe('container engine', function() { it('should return correct descriptor', function(done) { - var CLUSTER_NAME = 'overridden-value'; + const CLUSTER_NAME = 'overridden-value'; instanceOverride = { path: 'attributes/cluster-name', successArg: {data: CLUSTER_NAME}, @@ -351,7 +351,7 @@ describe('metadata', function() { describe('global', function() { it('should return correct descriptor', function(done) { - var DESCRIPTOR = {}; + const DESCRIPTOR = {}; Metadata.getGlobalDescriptor = function() { return DESCRIPTOR; diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index 121519882b3..1d60e592845 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -16,14 +16,14 @@ 'use strict'; -var assert = require('assert'); -var extend = require('extend'); -var proxyquire = require('proxyquire'); -var {util} = require('@google-cloud/common-grpc'); +const assert = require('assert'); +const extend = require('extend'); +const proxyquire = require('proxyquire'); +const {util} = require('@google-cloud/common-grpc'); const promisify = require('@google-cloud/promisify'); -var promisifed = false; -var fakePromisify = extend({}, promisify, { +let promisifed = false; +const fakePromisify = extend({}, promisify, { promisifyAll: function(Class) { if (Class.name === 'Sink') { promisifed = true; @@ -32,14 +32,14 @@ var fakePromisify = extend({}, promisify, { }); describe('Sink', function() { - var Sink; - var sink; + let Sink; + let sink; - var LOGGING = { + const LOGGING = { createSink: util.noop, projectId: 'project-id', }; - var SINK_NAME = 'sink-name'; + const SINK_NAME = 'sink-name'; before(function() { Sink = proxyquire('../src/sink.js', { @@ -74,7 +74,7 @@ describe('Sink', function() { describe('create', function() { it('should call parent createSink', function(done) { - var config = {}; + const config = {}; sink.logging.createSink = function(name, config_, callback) { assert.strictEqual(name, sink.name); @@ -105,7 +105,7 @@ describe('Sink', function() { }); it('should accept gaxOptions', function(done) { - var gaxOptions = {}; + const gaxOptions = {}; sink.logging.request = function(config) { assert.strictEqual(config.gaxOpts, gaxOptions); @@ -135,7 +135,7 @@ describe('Sink', function() { }); it('should accept gaxOptions', function(done) { - var gaxOptions = {}; + const gaxOptions = {}; sink.logging.request = function(config) { assert.strictEqual(config.gaxOpts, gaxOptions); @@ -146,7 +146,7 @@ describe('Sink', function() { }); it('should update metadata', function(done) { - var metadata = {}; + const metadata = {}; sink.logging.request = function(config, callback) { callback(null, metadata); @@ -159,7 +159,7 @@ describe('Sink', function() { }); it('should execute callback with original arguments', function(done) { - var args = [{}, {}, {}]; + const args = [{}, {}, {}]; sink.logging.request = function(config, callback) { callback.apply(null, args); @@ -173,7 +173,7 @@ describe('Sink', function() { }); describe('setFilter', function() { - var FILTER = 'filter'; + const FILTER = 'filter'; it('should call set metadata', function(done) { sink.setMetadata = function(metadata, callback) { @@ -186,7 +186,7 @@ describe('Sink', function() { }); describe('setMetadata', function() { - var METADATA = {a: 'b', c: 'd'}; + const METADATA = {a: 'b', c: 'd'}; beforeEach(function() { sink.getMetadata = function(callback) { @@ -203,8 +203,8 @@ describe('Sink', function() { }); it('should exec callback with error from refresh', function(done) { - var error = new Error('Error.'); - var apiResponse = {}; + const error = new Error('Error.'); + const apiResponse = {}; sink.getMetadata = function(callback) { callback(error, null, apiResponse); @@ -218,7 +218,7 @@ describe('Sink', function() { }); it('should make the correct request', function(done) { - var currentMetadata = {a: 'a', e: 'e'}; + const currentMetadata = {a: 'a', e: 'e'}; sink.getMetadata = function(callback) { callback(null, currentMetadata); @@ -242,7 +242,7 @@ describe('Sink', function() { }); it('should accept gaxOptions', function(done) { - var metadata = extend({}, METADATA, { + const metadata = extend({}, METADATA, { gaxOptions: {}, }); @@ -256,7 +256,7 @@ describe('Sink', function() { }); it('should update metadata', function(done) { - var metadata = {}; + const metadata = {}; sink.logging.request = function(config, callback) { callback(null, metadata); @@ -269,7 +269,7 @@ describe('Sink', function() { }); it('should execute callback with original arguments', function(done) { - var args = [{}, {}, {}]; + const args = [{}, {}, {}]; sink.logging.request = function(config, callback) { callback.apply(null, args); From 5272ee948cd08249bdecef637a476d1aec913182 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 13 Sep 2018 06:45:13 -0700 Subject: [PATCH 0227/1029] fix(deps): update dependency google-gax to ^0.20.0 (#220) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 394912ba7b0..ca5b96c278f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -72,7 +72,7 @@ "extend": "^3.0.2", "gcp-metadata": "^0.7.0", "google-auth-library": "^2.0.0", - "google-gax": "^0.19.0", + "google-gax": "^0.20.0", "google-proto-files": "^0.16.1", "is": "^3.2.1", "lodash.merge": "^4.6.1", From f1e17f29542d4ee3af57d42499d25b7914304399 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 14 Sep 2018 08:35:37 -0700 Subject: [PATCH 0228/1029] Switch to let/const (#221) --- .../src/v2/config_service_v2_client.js | 120 ++--- .../src/v2/doc/google/api/doc_distribution.js | 2 +- .../src/v2/doc/google/api/doc_label.js | 2 +- .../src/v2/doc/google/api/doc_metric.js | 4 +- .../doc/google/api/doc_monitored_resource.js | 6 +- .../google/logging/type/doc_http_request.js | 2 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 6 +- .../v2/doc/google/logging/v2/doc_logging.js | 20 +- .../google/logging/v2/doc_logging_config.js | 28 +- .../google/logging/v2/doc_logging_metrics.js | 14 +- .../src/v2/doc/google/protobuf/doc_any.js | 2 +- .../v2/doc/google/protobuf/doc_duration.js | 2 +- .../src/v2/doc/google/protobuf/doc_empty.js | 2 +- .../v2/doc/google/protobuf/doc_field_mask.js | 2 +- .../src/v2/doc/google/protobuf/doc_struct.js | 8 +- .../v2/doc/google/protobuf/doc_timestamp.js | 2 +- .../src/v2/logging_service_v2_client.js | 86 ++-- .../src/v2/metrics_service_v2_client.js | 66 +-- handwritten/logging/test/gapic-v2.js | 414 +++++++++--------- 19 files changed, 394 insertions(+), 394 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 61028d29cad..12d492404b0 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -72,13 +72,13 @@ class ConfigServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - var clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class ConfigServiceV2Client { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -121,7 +121,7 @@ class ConfigServiceV2Client { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.logging.v2.ConfigServiceV2', gapicConfig, opts.clientConfig, @@ -135,14 +135,14 @@ class ConfigServiceV2Client { // Put together the "service stub" for // google.logging.v2.ConfigServiceV2. - var configServiceV2Stub = gaxGrpc.createStub( + const configServiceV2Stub = gaxGrpc.createStub( protos.google.logging.v2.ConfigServiceV2, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var configServiceV2StubMethods = [ + const configServiceV2StubMethods = [ 'listSinks', 'getSink', 'createSink', @@ -159,7 +159,7 @@ class ConfigServiceV2Client { configServiceV2Stub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), @@ -255,16 +255,16 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * client.listSinks({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -274,17 +274,17 @@ class ConfigServiceV2Client { * }); * * // Or obtain the paged response. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -347,11 +347,11 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * client.listSinksStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -398,14 +398,14 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + * const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); * client.getSink({sinkName: formattedSinkName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -471,19 +471,19 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); - * var sink = {}; - * var request = { + * const formattedParent = client.projectPath('[PROJECT]'); + * const sink = {}; + * const request = { * parent: formattedParent, * sink: sink, * }; * client.createSink(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -568,19 +568,19 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - * var sink = {}; - * var request = { + * const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + * const sink = {}; + * const request = { * sinkName: formattedSinkName, * sink: sink, * }; * client.updateSink(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -625,11 +625,11 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + * const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); * client.deleteSink({sinkName: formattedSinkName}).catch(err => { * console.error(err); * }); @@ -689,16 +689,16 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * client.listExclusions({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -708,17 +708,17 @@ class ConfigServiceV2Client { * }); * * // Or obtain the paged response. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -781,11 +781,11 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * client.listExclusionsStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -832,14 +832,14 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + * const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); * client.getExclusion({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -892,19 +892,19 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); - * var exclusion = {}; - * var request = { + * const formattedParent = client.projectPath('[PROJECT]'); + * const exclusion = {}; + * const request = { * parent: formattedParent, * exclusion: exclusion, * }; * client.createExclusion(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -965,21 +965,21 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - * var exclusion = {}; - * var updateMask = {}; - * var request = { + * const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + * const exclusion = {}; + * const updateMask = {}; + * const request = { * name: formattedName, * exclusion: exclusion, * updateMask: updateMask, * }; * client.updateExclusion(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -1022,11 +1022,11 @@ class ConfigServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.ConfigServiceV2Client({ + * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. * }); * - * var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + * const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); * client.deleteExclusion({name: formattedName}).catch(err => { * console.error(err); * }); diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index 7629c3a8f76..9fbd9347733 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -79,7 +79,7 @@ * @memberof google.api * @see [google.api.Distribution definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ -var Distribution = { +const Distribution = { // This is for documentation. Actual contents will be loaded by gRPC. /** diff --git a/handwritten/logging/src/v2/doc/google/api/doc_label.js b/handwritten/logging/src/v2/doc/google/api/doc_label.js index 0ccae3a5932..b26faacb2d3 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_label.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_label.js @@ -33,7 +33,7 @@ * @memberof google.api * @see [google.api.LabelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/label.proto} */ -var LabelDescriptor = { +const LabelDescriptor = { // This is for documentation. Actual contents will be loaded by gRPC. /** diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index 7d5172fe633..ce40d36e116 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -134,7 +134,7 @@ * @memberof google.api * @see [google.api.MetricDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} */ -var MetricDescriptor = { +const MetricDescriptor = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -233,6 +233,6 @@ var MetricDescriptor = { * @memberof google.api * @see [google.api.Metric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} */ -var Metric = { +const Metric = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 733bf2b9e35..13eadf658f3 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -60,7 +60,7 @@ * @memberof google.api * @see [google.api.MonitoredResourceDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ -var MonitoredResourceDescriptor = { +const MonitoredResourceDescriptor = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -93,7 +93,7 @@ var MonitoredResourceDescriptor = { * @memberof google.api * @see [google.api.MonitoredResource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ -var MonitoredResource = { +const MonitoredResource = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -127,6 +127,6 @@ var MonitoredResource = { * @memberof google.api * @see [google.api.MonitoredResourceMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ -var MonitoredResourceMetadata = { +const MonitoredResourceMetadata = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js index a13dd3976be..ab569a284f5 100644 --- a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js +++ b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js @@ -85,6 +85,6 @@ * @memberof google.logging.type * @see [google.logging.type.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/type/http_request.proto} */ -var HttpRequest = { +const HttpRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index bfdd0ee61a5..9ebc35db0da 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -147,7 +147,7 @@ * @memberof google.logging.v2 * @see [google.logging.v2.LogEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ -var LogEntry = { +const LogEntry = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -174,7 +174,7 @@ var LogEntry = { * @memberof google.logging.v2 * @see [google.logging.v2.LogEntryOperation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ -var LogEntryOperation = { +const LogEntryOperation = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -202,6 +202,6 @@ var LogEntryOperation = { * @memberof google.logging.v2 * @see [google.logging.v2.LogEntrySourceLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ -var LogEntrySourceLocation = { +const LogEntrySourceLocation = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index d460c6a5adb..e99f5627137 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -36,7 +36,7 @@ * @memberof google.logging.v2 * @see [google.logging.v2.DeleteLogRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var DeleteLogRequest = { +const DeleteLogRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -119,7 +119,7 @@ var DeleteLogRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.WriteLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var WriteLogEntriesRequest = { +const WriteLogEntriesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -130,7 +130,7 @@ var WriteLogEntriesRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.WriteLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var WriteLogEntriesResponse = { +const WriteLogEntriesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -149,7 +149,7 @@ var WriteLogEntriesResponse = { * @memberof google.logging.v2 * @see [google.logging.v2.WriteLogEntriesPartialErrors definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var WriteLogEntriesPartialErrors = { +const WriteLogEntriesPartialErrors = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -206,7 +206,7 @@ var WriteLogEntriesPartialErrors = { * @memberof google.logging.v2 * @see [google.logging.v2.ListLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var ListLogEntriesRequest = { +const ListLogEntriesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -236,7 +236,7 @@ var ListLogEntriesRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.ListLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var ListLogEntriesResponse = { +const ListLogEntriesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -258,7 +258,7 @@ var ListLogEntriesResponse = { * @memberof google.logging.v2 * @see [google.logging.v2.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var ListMonitoredResourceDescriptorsRequest = { +const ListMonitoredResourceDescriptorsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -279,7 +279,7 @@ var ListMonitoredResourceDescriptorsRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var ListMonitoredResourceDescriptorsResponse = { +const ListMonitoredResourceDescriptorsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -309,7 +309,7 @@ var ListMonitoredResourceDescriptorsResponse = { * @memberof google.logging.v2 * @see [google.logging.v2.ListLogsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var ListLogsRequest = { +const ListLogsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -330,6 +330,6 @@ var ListLogsRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.ListLogsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ -var ListLogsResponse = { +const ListLogsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index bb971975b2c..3b187d44e0e 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -100,7 +100,7 @@ * @memberof google.logging.v2 * @see [google.logging.v2.LogSink definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var LogSink = { +const LogSink = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -156,7 +156,7 @@ var LogSink = { * @memberof google.logging.v2 * @see [google.logging.v2.ListSinksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var ListSinksRequest = { +const ListSinksRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -177,7 +177,7 @@ var ListSinksRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.ListSinksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var ListSinksResponse = { +const ListSinksResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -198,7 +198,7 @@ var ListSinksResponse = { * @memberof google.logging.v2 * @see [google.logging.v2.GetSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var GetSinkRequest = { +const GetSinkRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -238,7 +238,7 @@ var GetSinkRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.CreateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var CreateSinkRequest = { +const CreateSinkRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -298,7 +298,7 @@ var CreateSinkRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.UpdateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var UpdateSinkRequest = { +const UpdateSinkRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -320,7 +320,7 @@ var UpdateSinkRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.DeleteSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var DeleteSinkRequest = { +const DeleteSinkRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -361,7 +361,7 @@ var DeleteSinkRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.LogExclusion definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var LogExclusion = { +const LogExclusion = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -391,7 +391,7 @@ var LogExclusion = { * @memberof google.logging.v2 * @see [google.logging.v2.ListExclusionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var ListExclusionsRequest = { +const ListExclusionsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -412,7 +412,7 @@ var ListExclusionsRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.ListExclusionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var ListExclusionsResponse = { +const ListExclusionsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -433,7 +433,7 @@ var ListExclusionsResponse = { * @memberof google.logging.v2 * @see [google.logging.v2.GetExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var GetExclusionRequest = { +const GetExclusionRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -460,7 +460,7 @@ var GetExclusionRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.CreateExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var CreateExclusionRequest = { +const CreateExclusionRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -498,7 +498,7 @@ var CreateExclusionRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.UpdateExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var UpdateExclusionRequest = { +const UpdateExclusionRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -519,6 +519,6 @@ var UpdateExclusionRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.DeleteExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ -var DeleteExclusionRequest = { +const DeleteExclusionRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index 0938343b78d..5df1a4a155e 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -132,7 +132,7 @@ * @memberof google.logging.v2 * @see [google.logging.v2.LogMetric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ -var LogMetric = { +const LogMetric = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -178,7 +178,7 @@ var LogMetric = { * @memberof google.logging.v2 * @see [google.logging.v2.ListLogMetricsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ -var ListLogMetricsRequest = { +const ListLogMetricsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -199,7 +199,7 @@ var ListLogMetricsRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.ListLogMetricsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ -var ListLogMetricsResponse = { +const ListLogMetricsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -215,7 +215,7 @@ var ListLogMetricsResponse = { * @memberof google.logging.v2 * @see [google.logging.v2.GetLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ -var GetLogMetricRequest = { +const GetLogMetricRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -239,7 +239,7 @@ var GetLogMetricRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.CreateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ -var CreateLogMetricRequest = { +const CreateLogMetricRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -264,7 +264,7 @@ var CreateLogMetricRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.UpdateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ -var UpdateLogMetricRequest = { +const UpdateLogMetricRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -280,6 +280,6 @@ var UpdateLogMetricRequest = { * @memberof google.logging.v2 * @see [google.logging.v2.DeleteLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ -var DeleteLogMetricRequest = { +const DeleteLogMetricRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index c5c5bbafa23..3accb1fc0d8 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -131,6 +131,6 @@ * @memberof google.protobuf * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} */ -var Any = { +const Any = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js index 3ea5c376abb..c03ce2fb3df 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js @@ -92,6 +92,6 @@ * @memberof google.protobuf * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} */ -var Duration = { +const Duration = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js index 5e3640e90d8..b1d6b5e32a9 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js @@ -29,6 +29,6 @@ * @memberof google.protobuf * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} */ -var Empty = { +const Empty = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js index d700752b7c6..0cb35328962 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -231,6 +231,6 @@ * @memberof google.protobuf * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} */ -var FieldMask = { +const FieldMask = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js index efcd8ac5af9..ddf7e5c95dc 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js @@ -32,7 +32,7 @@ * @memberof google.protobuf * @see [google.protobuf.Struct definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ -var Struct = { +const Struct = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -72,7 +72,7 @@ var Struct = { * @memberof google.protobuf * @see [google.protobuf.Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ -var Value = { +const Value = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -90,7 +90,7 @@ var Value = { * @memberof google.protobuf * @see [google.protobuf.ListValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ -var ListValue = { +const ListValue = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -103,7 +103,7 @@ var ListValue = { * @enum {number} * @memberof google.protobuf */ -var NullValue = { +const NullValue = { /** * Null value. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index 51d8f40f54d..1ebe2e6e1a5 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -110,6 +110,6 @@ * @memberof google.protobuf * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} */ -var Timestamp = { +const Timestamp = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 19afcc54e7d..02c7b8ef3f7 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -72,13 +72,13 @@ class LoggingServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - var clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class LoggingServiceV2Client { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -125,7 +125,7 @@ class LoggingServiceV2Client { 'logNames' ), }; - var protoFilesRoot = new gax.GoogleProtoFilesRoot(); + let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( path.join( __dirname, @@ -151,7 +151,7 @@ class LoggingServiceV2Client { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.logging.v2.LoggingServiceV2', gapicConfig, opts.clientConfig, @@ -165,14 +165,14 @@ class LoggingServiceV2Client { // Put together the "service stub" for // google.logging.v2.LoggingServiceV2. - var loggingServiceV2Stub = gaxGrpc.createStub( + const loggingServiceV2Stub = gaxGrpc.createStub( protos.google.logging.v2.LoggingServiceV2, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var loggingServiceV2StubMethods = [ + const loggingServiceV2StubMethods = [ 'deleteLog', 'writeLogEntries', 'listLogEntries', @@ -184,7 +184,7 @@ class LoggingServiceV2Client { loggingServiceV2Stub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), @@ -269,11 +269,11 @@ class LoggingServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.LoggingServiceV2Client({ + * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. * }); * - * var formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + * const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); * client.deleteLog({logName: formattedLogName}).catch(err => { * console.error(err); * }); @@ -381,14 +381,14 @@ class LoggingServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.LoggingServiceV2Client({ + * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. * }); * - * var entries = []; + * const entries = []; * client.writeLogEntries({entries: entries}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -476,16 +476,16 @@ class LoggingServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.LoggingServiceV2Client({ + * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedResourceNames = []; + * const formattedResourceNames = []; * * client.listLogEntries({resourceNames: formattedResourceNames}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -495,17 +495,17 @@ class LoggingServiceV2Client { * }); * * // Or obtain the paged response. - * var formattedResourceNames = []; + * const formattedResourceNames = []; * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -592,11 +592,11 @@ class LoggingServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.LoggingServiceV2Client({ + * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. * }); * - * var formattedResourceNames = []; + * const formattedResourceNames = []; * client.listLogEntriesStream({resourceNames: formattedResourceNames}) * .on('data', element => { * // doThingsWith(element) @@ -653,14 +653,14 @@ class LoggingServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.LoggingServiceV2Client({ + * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. * }); * * // Iterate over all elements. * client.listMonitoredResourceDescriptors({}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -671,14 +671,14 @@ class LoggingServiceV2Client { * * // Or obtain the paged response. * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -738,7 +738,7 @@ class LoggingServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.LoggingServiceV2Client({ + * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. * }); * @@ -806,16 +806,16 @@ class LoggingServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.LoggingServiceV2Client({ + * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * client.listLogs({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -825,17 +825,17 @@ class LoggingServiceV2Client { * }); * * // Or obtain the paged response. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -898,11 +898,11 @@ class LoggingServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.LoggingServiceV2Client({ + * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * client.listLogsStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 73f4ea285dc..bf16ce18afd 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -71,13 +71,13 @@ class MetricsServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - var clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -88,7 +88,7 @@ class MetricsServiceV2Client { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -118,7 +118,7 @@ class MetricsServiceV2Client { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.logging.v2.MetricsServiceV2', gapicConfig, opts.clientConfig, @@ -132,14 +132,14 @@ class MetricsServiceV2Client { // Put together the "service stub" for // google.logging.v2.MetricsServiceV2. - var metricsServiceV2Stub = gaxGrpc.createStub( + const metricsServiceV2Stub = gaxGrpc.createStub( protos.google.logging.v2.MetricsServiceV2, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var metricsServiceV2StubMethods = [ + const metricsServiceV2StubMethods = [ 'listLogMetrics', 'getLogMetric', 'createLogMetric', @@ -151,7 +151,7 @@ class MetricsServiceV2Client { metricsServiceV2Stub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), @@ -244,16 +244,16 @@ class MetricsServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.MetricsServiceV2Client({ + * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * client.listLogMetrics({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -263,17 +263,17 @@ class MetricsServiceV2Client { * }); * * // Or obtain the paged response. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * - * var options = {autoPaginate: false}; - * var callback = responses => { + * const options = {autoPaginate: false}; + * const callback = responses => { * // The actual resources in a response. - * var resources = responses[0]; + * const resources = responses[0]; * // The next request if the response shows that there are more responses. - * var nextRequest = responses[1]; + * const nextRequest = responses[1]; * // The actual response object, if necessary. - * // var rawResponse = responses[2]; + * // const rawResponse = responses[2]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]); * } @@ -333,11 +333,11 @@ class MetricsServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.MetricsServiceV2Client({ + * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * client.listLogMetricsStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -379,14 +379,14 @@ class MetricsServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.MetricsServiceV2Client({ + * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. * }); * - * var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); * client.getLogMetric({metricName: formattedMetricName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -434,19 +434,19 @@ class MetricsServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.MetricsServiceV2Client({ + * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); - * var metric = {}; - * var request = { + * const formattedParent = client.projectPath('[PROJECT]'); + * const metric = {}; + * const request = { * parent: formattedParent, * metric: metric, * }; * client.createLogMetric(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -495,19 +495,19 @@ class MetricsServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.MetricsServiceV2Client({ + * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. * }); * - * var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); - * var metric = {}; - * var request = { + * const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * const metric = {}; + * const request = { * metricName: formattedMetricName, * metric: metric, * }; * client.updateLogMetric(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -545,11 +545,11 @@ class MetricsServiceV2Client { * * const logging = require('@google-cloud/logging'); * - * var client = new logging.v2.MetricsServiceV2Client({ + * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. * }); * - * var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); * client.deleteLogMetric({metricName: formattedMetricName}).catch(err => { * console.error(err); * }); diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 23b18a03465..74342e23950 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -18,21 +18,21 @@ const assert = require('assert'); const loggingModule = require('../src'); -var FAKE_STATUS_CODE = 1; -var error = new Error(); +const FAKE_STATUS_CODE = 1; +const error = new Error(); error.code = FAKE_STATUS_CODE; describe('LoggingServiceV2Client', () => { describe('deleteLog', () => { it('invokes deleteLog without error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedLogName = client.logPath('[PROJECT]', '[LOG]'); - var request = { + const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + const request = { logName: formattedLogName, }; @@ -46,14 +46,14 @@ describe('LoggingServiceV2Client', () => { }); it('invokes deleteLog with error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedLogName = client.logPath('[PROJECT]', '[LOG]'); - var request = { + const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + const request = { logName: formattedLogName, }; @@ -74,19 +74,19 @@ describe('LoggingServiceV2Client', () => { describe('writeLogEntries', () => { it('invokes writeLogEntries without error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var entries = []; - var request = { + const entries = []; + const request = { entries: entries, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( @@ -102,14 +102,14 @@ describe('LoggingServiceV2Client', () => { }); it('invokes writeLogEntries with error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var entries = []; - var request = { + const entries = []; + const request = { entries: entries, }; @@ -131,22 +131,22 @@ describe('LoggingServiceV2Client', () => { describe('listLogEntries', () => { it('invokes listLogEntries without error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedResourceNames = []; - var request = { + const formattedResourceNames = []; + const request = { resourceNames: formattedResourceNames, }; // Mock response - var nextPageToken = ''; - var entriesElement = {}; - var entries = [entriesElement]; - var expectedResponse = { + const nextPageToken = ''; + const entriesElement = {}; + const entries = [entriesElement]; + const expectedResponse = { nextPageToken: nextPageToken, entries: entries, }; @@ -169,14 +169,14 @@ describe('LoggingServiceV2Client', () => { }); it('invokes listLogEntries with error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedResourceNames = []; - var request = { + const formattedResourceNames = []; + const request = { resourceNames: formattedResourceNames, }; @@ -198,19 +198,19 @@ describe('LoggingServiceV2Client', () => { describe('listMonitoredResourceDescriptors', () => { it('invokes listMonitoredResourceDescriptors without error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var request = {}; + const request = {}; // Mock response - var nextPageToken = ''; - var resourceDescriptorsElement = {}; - var resourceDescriptors = [resourceDescriptorsElement]; - var expectedResponse = { + const nextPageToken = ''; + const resourceDescriptorsElement = {}; + const resourceDescriptors = [resourceDescriptorsElement]; + const expectedResponse = { nextPageToken: nextPageToken, resourceDescriptors: resourceDescriptors, }; @@ -233,13 +233,13 @@ describe('LoggingServiceV2Client', () => { }); it('invokes listMonitoredResourceDescriptors with error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var request = {}; + const request = {}; // Mock Grpc layer client._innerApiCalls.listMonitoredResourceDescriptors = mockSimpleGrpcMethod( @@ -259,22 +259,22 @@ describe('LoggingServiceV2Client', () => { describe('listLogs', () => { it('invokes listLogs without error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var logNamesElement = 'logNamesElement-1079688374'; - var logNames = [logNamesElement]; - var expectedResponse = { + const nextPageToken = ''; + const logNamesElement = 'logNamesElement-1079688374'; + const logNames = [logNamesElement]; + const expectedResponse = { nextPageToken: nextPageToken, logNames: logNames, }; @@ -293,14 +293,14 @@ describe('LoggingServiceV2Client', () => { }); it('invokes listLogs with error', done => { - var client = new loggingModule.v2.LoggingServiceV2Client({ + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; @@ -323,22 +323,22 @@ describe('LoggingServiceV2Client', () => { describe('ConfigServiceV2Client', () => { describe('listSinks', () => { it('invokes listSinks without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var sinksElement = {}; - var sinks = [sinksElement]; - var expectedResponse = { + const nextPageToken = ''; + const sinksElement = {}; + const sinks = [sinksElement]; + const expectedResponse = { nextPageToken: nextPageToken, sinks: sinks, }; @@ -357,14 +357,14 @@ describe('ConfigServiceV2Client', () => { }); it('invokes listSinks with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; @@ -386,24 +386,24 @@ describe('ConfigServiceV2Client', () => { describe('getSink', () => { it('invokes getSink without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - var request = { + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const request = { sinkName: formattedSinkName, }; // Mock response - var name = 'name3373707'; - var destination = 'destination-1429847026'; - var filter = 'filter-1274492040'; - var writerIdentity = 'writerIdentity775638794'; - var includeChildren = true; - var expectedResponse = { + const name = 'name3373707'; + const destination = 'destination-1429847026'; + const filter = 'filter-1274492040'; + const writerIdentity = 'writerIdentity775638794'; + const includeChildren = true; + const expectedResponse = { name: name, destination: destination, filter: filter, @@ -425,14 +425,14 @@ describe('ConfigServiceV2Client', () => { }); it('invokes getSink with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - var request = { + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const request = { sinkName: formattedSinkName, }; @@ -454,26 +454,26 @@ describe('ConfigServiceV2Client', () => { describe('createSink', () => { it('invokes createSink without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var sink = {}; - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const sink = {}; + const request = { parent: formattedParent, sink: sink, }; // Mock response - var name = 'name3373707'; - var destination = 'destination-1429847026'; - var filter = 'filter-1274492040'; - var writerIdentity = 'writerIdentity775638794'; - var includeChildren = true; - var expectedResponse = { + const name = 'name3373707'; + const destination = 'destination-1429847026'; + const filter = 'filter-1274492040'; + const writerIdentity = 'writerIdentity775638794'; + const includeChildren = true; + const expectedResponse = { name: name, destination: destination, filter: filter, @@ -495,15 +495,15 @@ describe('ConfigServiceV2Client', () => { }); it('invokes createSink with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var sink = {}; - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const sink = {}; + const request = { parent: formattedParent, sink: sink, }; @@ -526,26 +526,26 @@ describe('ConfigServiceV2Client', () => { describe('updateSink', () => { it('invokes updateSink without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - var sink = {}; - var request = { + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sink = {}; + const request = { sinkName: formattedSinkName, sink: sink, }; // Mock response - var name = 'name3373707'; - var destination = 'destination-1429847026'; - var filter = 'filter-1274492040'; - var writerIdentity = 'writerIdentity775638794'; - var includeChildren = true; - var expectedResponse = { + const name = 'name3373707'; + const destination = 'destination-1429847026'; + const filter = 'filter-1274492040'; + const writerIdentity = 'writerIdentity775638794'; + const includeChildren = true; + const expectedResponse = { name: name, destination: destination, filter: filter, @@ -567,15 +567,15 @@ describe('ConfigServiceV2Client', () => { }); it('invokes updateSink with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - var sink = {}; - var request = { + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sink = {}; + const request = { sinkName: formattedSinkName, sink: sink, }; @@ -598,14 +598,14 @@ describe('ConfigServiceV2Client', () => { describe('deleteSink', () => { it('invokes deleteSink without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - var request = { + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const request = { sinkName: formattedSinkName, }; @@ -619,14 +619,14 @@ describe('ConfigServiceV2Client', () => { }); it('invokes deleteSink with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - var request = { + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const request = { sinkName: formattedSinkName, }; @@ -647,22 +647,22 @@ describe('ConfigServiceV2Client', () => { describe('listExclusions', () => { it('invokes listExclusions without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var exclusionsElement = {}; - var exclusions = [exclusionsElement]; - var expectedResponse = { + const nextPageToken = ''; + const exclusionsElement = {}; + const exclusions = [exclusionsElement]; + const expectedResponse = { nextPageToken: nextPageToken, exclusions: exclusions, }; @@ -685,14 +685,14 @@ describe('ConfigServiceV2Client', () => { }); it('invokes listExclusions with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; @@ -714,23 +714,23 @@ describe('ConfigServiceV2Client', () => { describe('getExclusion', () => { it('invokes getExclusion without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - var request = { + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var description = 'description-1724546052'; - var filter = 'filter-1274492040'; - var disabled = true; - var expectedResponse = { + const name2 = 'name2-1052831874'; + const description = 'description-1724546052'; + const filter = 'filter-1274492040'; + const disabled = true; + const expectedResponse = { name: name2, description: description, filter: filter, @@ -751,14 +751,14 @@ describe('ConfigServiceV2Client', () => { }); it('invokes getExclusion with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - var request = { + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const request = { name: formattedName, }; @@ -780,25 +780,25 @@ describe('ConfigServiceV2Client', () => { describe('createExclusion', () => { it('invokes createExclusion without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var exclusion = {}; - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const exclusion = {}; + const request = { parent: formattedParent, exclusion: exclusion, }; // Mock response - var name = 'name3373707'; - var description = 'description-1724546052'; - var filter = 'filter-1274492040'; - var disabled = true; - var expectedResponse = { + const name = 'name3373707'; + const description = 'description-1724546052'; + const filter = 'filter-1274492040'; + const disabled = true; + const expectedResponse = { name: name, description: description, filter: filter, @@ -819,15 +819,15 @@ describe('ConfigServiceV2Client', () => { }); it('invokes createExclusion with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var exclusion = {}; - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const exclusion = {}; + const request = { parent: formattedParent, exclusion: exclusion, }; @@ -850,27 +850,27 @@ describe('ConfigServiceV2Client', () => { describe('updateExclusion', () => { it('invokes updateExclusion without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - var exclusion = {}; - var updateMask = {}; - var request = { + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const exclusion = {}; + const updateMask = {}; + const request = { name: formattedName, exclusion: exclusion, updateMask: updateMask, }; // Mock response - var name2 = 'name2-1052831874'; - var description = 'description-1724546052'; - var filter = 'filter-1274492040'; - var disabled = true; - var expectedResponse = { + const name2 = 'name2-1052831874'; + const description = 'description-1724546052'; + const filter = 'filter-1274492040'; + const disabled = true; + const expectedResponse = { name: name2, description: description, filter: filter, @@ -891,16 +891,16 @@ describe('ConfigServiceV2Client', () => { }); it('invokes updateExclusion with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - var exclusion = {}; - var updateMask = {}; - var request = { + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const exclusion = {}; + const updateMask = {}; + const request = { name: formattedName, exclusion: exclusion, updateMask: updateMask, @@ -924,14 +924,14 @@ describe('ConfigServiceV2Client', () => { describe('deleteExclusion', () => { it('invokes deleteExclusion without error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - var request = { + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const request = { name: formattedName, }; @@ -945,14 +945,14 @@ describe('ConfigServiceV2Client', () => { }); it('invokes deleteExclusion with error', done => { - var client = new loggingModule.v2.ConfigServiceV2Client({ + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - var request = { + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const request = { name: formattedName, }; @@ -974,22 +974,22 @@ describe('ConfigServiceV2Client', () => { describe('MetricsServiceV2Client', () => { describe('listLogMetrics', () => { it('invokes listLogMetrics without error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var metricsElement = {}; - var metrics = [metricsElement]; - var expectedResponse = { + const nextPageToken = ''; + const metricsElement = {}; + const metrics = [metricsElement]; + const expectedResponse = { nextPageToken: nextPageToken, metrics: metrics, }; @@ -1012,14 +1012,14 @@ describe('MetricsServiceV2Client', () => { }); it('invokes listLogMetrics with error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; @@ -1041,23 +1041,23 @@ describe('MetricsServiceV2Client', () => { describe('getLogMetric', () => { it('invokes getLogMetric without error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); - var request = { + const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const request = { metricName: formattedMetricName, }; // Mock response - var name = 'name3373707'; - var description = 'description-1724546052'; - var filter = 'filter-1274492040'; - var valueExtractor = 'valueExtractor2047672534'; - var expectedResponse = { + const name = 'name3373707'; + const description = 'description-1724546052'; + const filter = 'filter-1274492040'; + const valueExtractor = 'valueExtractor2047672534'; + const expectedResponse = { name: name, description: description, filter: filter, @@ -1078,14 +1078,14 @@ describe('MetricsServiceV2Client', () => { }); it('invokes getLogMetric with error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); - var request = { + const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const request = { metricName: formattedMetricName, }; @@ -1107,25 +1107,25 @@ describe('MetricsServiceV2Client', () => { describe('createLogMetric', () => { it('invokes createLogMetric without error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var metric = {}; - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const metric = {}; + const request = { parent: formattedParent, metric: metric, }; // Mock response - var name = 'name3373707'; - var description = 'description-1724546052'; - var filter = 'filter-1274492040'; - var valueExtractor = 'valueExtractor2047672534'; - var expectedResponse = { + const name = 'name3373707'; + const description = 'description-1724546052'; + const filter = 'filter-1274492040'; + const valueExtractor = 'valueExtractor2047672534'; + const expectedResponse = { name: name, description: description, filter: filter, @@ -1146,15 +1146,15 @@ describe('MetricsServiceV2Client', () => { }); it('invokes createLogMetric with error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var metric = {}; - var request = { + const formattedParent = client.projectPath('[PROJECT]'); + const metric = {}; + const request = { parent: formattedParent, metric: metric, }; @@ -1177,25 +1177,25 @@ describe('MetricsServiceV2Client', () => { describe('updateLogMetric', () => { it('invokes updateLogMetric without error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); - var metric = {}; - var request = { + const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const metric = {}; + const request = { metricName: formattedMetricName, metric: metric, }; // Mock response - var name = 'name3373707'; - var description = 'description-1724546052'; - var filter = 'filter-1274492040'; - var valueExtractor = 'valueExtractor2047672534'; - var expectedResponse = { + const name = 'name3373707'; + const description = 'description-1724546052'; + const filter = 'filter-1274492040'; + const valueExtractor = 'valueExtractor2047672534'; + const expectedResponse = { name: name, description: description, filter: filter, @@ -1216,15 +1216,15 @@ describe('MetricsServiceV2Client', () => { }); it('invokes updateLogMetric with error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); - var metric = {}; - var request = { + const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const metric = {}; + const request = { metricName: formattedMetricName, metric: metric, }; @@ -1247,14 +1247,14 @@ describe('MetricsServiceV2Client', () => { describe('deleteLogMetric', () => { it('invokes deleteLogMetric without error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); - var request = { + const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const request = { metricName: formattedMetricName, }; @@ -1268,14 +1268,14 @@ describe('MetricsServiceV2Client', () => { }); it('invokes deleteLogMetric with error', done => { - var client = new loggingModule.v2.MetricsServiceV2Client({ + const client = new loggingModule.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); - var request = { + const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const request = { metricName: formattedMetricName, }; From d4ef6a777557fb84ff207124dcf3ad490a4b3f2a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 14 Sep 2018 09:39:14 -0700 Subject: [PATCH 0229/1029] Use es classes (#219) --- handwritten/logging/README.md | 2 +- handwritten/logging/package.json | 4 +- handwritten/logging/src/entry.js | 168 +- handwritten/logging/src/index.js | 1513 ++++++++--------- handwritten/logging/src/log.js | 1333 ++++++++------- handwritten/logging/src/metadata.js | 262 +-- handwritten/logging/src/sink.js | 570 +++---- .../src/v2/config_service_v2_client.js | 24 +- .../src/v2/logging_service_v2_client.js | 16 +- .../src/v2/metrics_service_v2_client.js | 12 +- handwritten/logging/system-test/logging.js | 17 +- handwritten/logging/test/entry.js | 2 +- handwritten/logging/test/index.js | 24 +- handwritten/logging/test/log.js | 10 +- handwritten/logging/test/metadata.js | 4 +- handwritten/logging/test/sink.js | 4 +- 16 files changed, 1911 insertions(+), 2054 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 93fe30a1f8c..46b70a3fbdc 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -66,7 +66,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ```javascript // Imports the Google Cloud client library -const Logging = require('@google-cloud/logging'); +const {Logging} = require('@google-cloud/logging'); // Your Google Cloud Platform project ID const projectId = 'YOUR_PROJECT_ID'; diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ca5b96c278f..834b76cb053 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -85,8 +85,8 @@ "devDependencies": { "@google-cloud/bigquery": "*", "@google-cloud/nodejs-repo-tools": "^2.3.3", - "@google-cloud/pubsub": "*", - "@google-cloud/storage": "*", + "@google-cloud/pubsub": "0.20.0", + "@google-cloud/storage": "^2.0.2", "async": "^2.6.1", "codecov": "^3.0.4", "eslint": "^5.4.0", diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 203dee57672..2dfcfec0caa 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -46,7 +46,7 @@ const eventId = new EventId(); * Any other types are stringified with `String(value)`. * * @example - * const Logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const syslog = logging.log('syslog'); * @@ -80,103 +80,93 @@ const eventId = new EventId(); * } * }); */ -function Entry(metadata, data) { - /** - * @name Entry#metadata - * @type {object} - * @property {Date} timestamp - * @property {number} insertId - */ - this.metadata = extend( - { - timestamp: new Date(), - }, - metadata - ); - - // JavaScript date has a very coarse granularity (millisecond), which makes - // it quite likely that multiple log entries would have the same timestamp. - // The Logging API doesn't guarantee to preserve insertion order for entries - // with the same timestamp. The service does use `insertId` as a secondary - // ordering for entries with the same timestamp. `insertId` needs to be - // globally unique (within the project) however. - // - // We use a globally unique monotonically increasing EventId as the - // insertId. - - this.metadata.insertId = this.metadata.insertId || eventId.new(); +class Entry { + constructor(metadata, data) { + /** + * @name Entry#metadata + * @type {object} + * @property {Date} timestamp + * @property {number} insertId + */ + this.metadata = extend( + { + timestamp: new Date(), + }, + metadata + ); + // JavaScript date has a very coarse granularity (millisecond), which makes + // it quite likely that multiple log entries would have the same timestamp. + // The Logging API doesn't guarantee to preserve insertion order for entries + // with the same timestamp. The service does use `insertId` as a secondary + // ordering for entries with the same timestamp. `insertId` needs to be + // globally unique (within the project) however. + // + // We use a globally unique monotonically increasing EventId as the + // insertId. + this.metadata.insertId = this.metadata.insertId || eventId.new(); + /** + * @name Entry#data + * @type {object} + */ + this.data = data; + } /** - * @name Entry#data - * @type {object} + * Serialize an entry to the format the API expects. + * + * @param {object} [options] Configuration object. + * @param {boolean} [options.removeCircular] Replace circular references in an + * object with a string value, `[Circular]`. */ - this.data = data; -} - -/** - * Create an Entry object from an API response, such as `entries:list`. - * - * @private - * - * @param {object} entry An API representation of an entry. See a - * [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). - * @returns {Entry} - */ -Entry.fromApiResponse_ = function(entry) { - let data = entry[entry.payload]; - - if (entry.payload === 'jsonPayload') { - data = Service.structToObj_(data); - } - - const serializedEntry = new Entry(entry, data); - - if (serializedEntry.metadata.timestamp) { - let ms = serializedEntry.metadata.timestamp.seconds * 1000; - ms += serializedEntry.metadata.timestamp.nanos / 1e6; - serializedEntry.metadata.timestamp = new Date(ms); - } - - return serializedEntry; -}; - -/** - * Serialize an entry to the format the API expects. - * - * @param {object} [options] Configuration object. - * @param {boolean} [options.removeCircular] Replace circular references in an - * object with a string value, `[Circular]`. - */ -Entry.prototype.toJSON = function(options) { - options = options || {}; - - const entry = extend(true, {}, this.metadata); - - if (is.object(this.data)) { - entry.jsonPayload = Service.objToStruct_(this.data, { - removeCircular: !!options.removeCircular, - stringify: true, - }); - } else if (is.string(this.data)) { - entry.textPayload = this.data; + toJSON(options) { + options = options || {}; + const entry = extend(true, {}, this.metadata); + if (is.object(this.data)) { + entry.jsonPayload = Service.objToStruct_(this.data, { + removeCircular: !!options.removeCircular, + stringify: true, + }); + } else if (is.string(this.data)) { + entry.textPayload = this.data; + } + if (is.date(entry.timestamp)) { + const seconds = entry.timestamp.getTime() / 1000; + const secondsRounded = Math.floor(seconds); + entry.timestamp = { + seconds: secondsRounded, + nanos: Math.floor((seconds - secondsRounded) * 1e9), + }; + } + return entry; } - if (is.date(entry.timestamp)) { - const seconds = entry.timestamp.getTime() / 1000; - const secondsRounded = Math.floor(seconds); - - entry.timestamp = { - seconds: secondsRounded, - nanos: Math.floor((seconds - secondsRounded) * 1e9), - }; + /** + * Create an Entry object from an API response, such as `entries:list`. + * + * @private + * + * @param {object} entry An API representation of an entry. See a + * [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). + * @returns {Entry} + */ + static fromApiResponse_(entry) { + let data = entry[entry.payload]; + if (entry.payload === 'jsonPayload') { + data = Service.structToObj_(data); + } + const serializedEntry = new Entry(entry, data); + if (serializedEntry.metadata.timestamp) { + let ms = serializedEntry.metadata.timestamp.seconds * 1000; + ms += serializedEntry.metadata.timestamp.nanos / 1e6; + serializedEntry.metadata.timestamp = new Date(ms); + } + return serializedEntry; } - - return entry; -}; +} /** * Reference to the {@link Entry} class. * @name module:@google-cloud/logging.Entry * @see Entry */ -module.exports = Entry; +module.exports.Entry = Entry; diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index b003c4a2548..6f6bb793baf 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -31,9 +31,9 @@ const through = require('through2'); const PKG = require('../package.json'); const v2 = require('./v2'); -const Entry = require('./entry.js'); -const Log = require('./log.js'); -const Sink = require('./sink.js'); +const {Entry} = require('./entry'); +const {Log} = require('./log'); +const {Sink} = require('./sink'); /** * @namespace google @@ -53,7 +53,6 @@ const Sink = require('./sink.js'); /** * @namespace google.protobuf */ - /** * @typedef {object} ClientConfig * @property {string} [projectId] The project ID from the Google Developer's @@ -78,7 +77,6 @@ const Sink = require('./sink.js'); * @property {Constructor} [promise] Custom promise module to use instead of * native Promises. */ - /** * [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to * store, search, analyze, monitor, and alert on log data and events from Google @@ -94,7 +92,7 @@ const Sink = require('./sink.js'); * @param {ClientConfig} [options] Configuration options. * * @example Import the client library - * const Logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * @example Create a client that uses Application Default Credentials (ADC): * const logging = new Logging(); @@ -109,400 +107,289 @@ const Sink = require('./sink.js'); * region_tag:logging_quickstart * Full quickstart example: */ -function Logging(options) { - if (!(this instanceof Logging)) { - return new Logging(options); - } - - // Determine what scopes are needed. - // It is the union of the scopes on all three clients. - let scopes = []; - let clientClasses = [ - v2.ConfigServiceV2Client, - v2.LoggingServiceV2Client, - v2.MetricsServiceV2Client, - ]; - for (let clientClass of clientClasses) { - for (let scope of clientClass.scopes) { - if (clientClasses.indexOf(scope) === -1) { - scopes.push(scope); +class Logging { + constructor(options) { + // Determine what scopes are needed. + // It is the union of the scopes on all three clients. + let scopes = []; + let clientClasses = [ + v2.ConfigServiceV2Client, + v2.LoggingServiceV2Client, + v2.MetricsServiceV2Client, + ]; + for (let clientClass of clientClasses) { + for (let scope of clientClass.scopes) { + if (clientClasses.indexOf(scope) === -1) { + scopes.push(scope); + } } } + const options_ = extend( + { + libName: 'gccl', + libVersion: PKG.version, + scopes: scopes, + }, + options + ); + this.api = {}; + this.auth = new GoogleAuth(options_); + this.options = options_; + this.projectId = this.options.projectId || '{{projectId}}'; } - - const options_ = extend( - { - libName: 'gccl', - libVersion: PKG.version, - scopes: scopes, - }, - options - ); - - this.api = {}; - this.auth = new GoogleAuth(options_); - this.options = options_; - this.projectId = this.options.projectId || '{{projectId}}'; -} - -/** - * Config to set for the sink. Not all available options are listed here, see - * the [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink) - * definition for full details. - * - * @typedef {object} CreateSinkRequest - * @property {object} [gaxOptions] Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @property {Bucket|Dataset|Topic} [destination] The destination. The proper ACL - * scopes will be granted to the provided destination. Can be one of: - * {@link https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket Bucket}, - * {@link https://cloud.google.com/nodejs/docs/reference/bigquery/latest/Dataset Dataset}, - * or {@link https://cloud.google.com/nodejs/docs/reference/pubsub/latest/Topic Topic} - * @property {string} [filter] An advanced logs filter. Only log entries - * matching the filter are written. - */ -/** - * @typedef {array} CreateSinkResponse - * @property {Sink} 0 The new {@link Sink}. - * @property {object} 1 The full API response. - */ -/** - * @callback CreateSinkCallback - * @param {?Error} err Request error, if any. - * @param {Sink} sink The new {@link Sink}. - * @param {object} apiResponse The full API response. - */ -// jscs:disable maximumLineLength -/** - * Create a sink. - * - * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} - * @see [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} - * @see [projects.sinks.create API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create} - * - * @param {string} name Name of the sink. - * @param {CreateSinkRequest} config Config to set for the sink. - * @param {CreateSinkCallback} [callback] Callback function. - * @returns {Promise} - * @throws {Error} If a name is not provided. - * @throws {Error} if a config object is not provided. - * @see Sink#create - * - * @example - * const Storage = require('@google-cloud/storage'); - * const storage = new Storage({ - * projectId: 'grape-spaceship-123' - * }); - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * - * const config = { - * destination: storage.bucket('logging-bucket'), - * filter: 'severity = ALERT' - * }; - * - * function callback(err, sink, apiResponse) { - * // `sink` is a Sink object. - * } - * - * logging.createSink('new-sink-name', config, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * logging.createSink('new-sink-name', config).then(function(data) { - * const sink = data[0]; - * const apiResponse = data[1]; - * }); - * - * @example include:samples/sinks.js - * region_tag:logging_create_sink - * Another example: - */ -Logging.prototype.createSink = function(name, config, callback) { - // jscs:enable maximumLineLength - const self = this; - - if (!is.string(name)) { - throw new Error('A sink name must be provided.'); - } - - if (!is.object(config)) { - throw new Error('A sink configuration object must be provided.'); - } - - if (common.util.isCustomType(config.destination, 'bigquery/dataset')) { - this.setAclForDataset_(name, config, callback); - return; - } - - if (common.util.isCustomType(config.destination, 'pubsub/topic')) { - this.setAclForTopic_(name, config, callback); - return; - } - - if (common.util.isCustomType(config.destination, 'storage/bucket')) { - this.setAclForBucket_(name, config, callback); - return; - } - - const reqOpts = { - parent: 'projects/' + this.projectId, - sink: extend({}, config, {name: name}), - }; - - delete reqOpts.sink.gaxOptions; - - this.request( - { - client: 'ConfigServiceV2Client', - method: 'createSink', - reqOpts: reqOpts, - gaxOpts: config.gaxOptions, - }, - function(err, resp) { - if (err) { - callback(err, null, resp); - return; - } - - const sink = self.sink(resp.name); - sink.metadata = resp; - - callback(null, sink, resp); + /** + * Config to set for the sink. Not all available options are listed here, see + * the [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink) + * definition for full details. + * + * @typedef {object} CreateSinkRequest + * @property {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {Bucket|Dataset|Topic} [destination] The destination. The proper ACL + * scopes will be granted to the provided destination. Can be one of: + * {@link https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket Bucket}, + * {@link https://cloud.google.com/nodejs/docs/reference/bigquery/latest/Dataset Dataset}, + * or {@link https://cloud.google.com/nodejs/docs/reference/pubsub/latest/Topic Topic} + * @property {string} [filter] An advanced logs filter. Only log entries + * matching the filter are written. + */ + /** + * @typedef {array} CreateSinkResponse + * @property {Sink} 0 The new {@link Sink}. + * @property {object} 1 The full API response. + */ + /** + * @callback CreateSinkCallback + * @param {?Error} err Request error, if any. + * @param {Sink} sink The new {@link Sink}. + * @param {object} apiResponse The full API response. + */ + // jscs:disable maximumLineLength + /** + * Create a sink. + * + * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} + * @see [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} + * @see [projects.sinks.create API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create} + * + * @param {string} name Name of the sink. + * @param {CreateSinkRequest} config Config to set for the sink. + * @param {CreateSinkCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} If a name is not provided. + * @throws {Error} if a config object is not provided. + * @see Sink#create + * + * @example + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage({ + * projectId: 'grape-spaceship-123' + * }); + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * const config = { + * destination: storage.bucket('logging-bucket'), + * filter: 'severity = ALERT' + * }; + * + * function callback(err, sink, apiResponse) { + * // `sink` is a Sink object. + * } + * + * logging.createSink('new-sink-name', config, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * logging.createSink('new-sink-name', config).then(function(data) { + * const sink = data[0]; + * const apiResponse = data[1]; + * }); + * + * @example include:samples/sinks.js + * region_tag:logging_create_sink + * Another example: + */ + createSink(name, config, callback) { + // jscs:enable maximumLineLength + const self = this; + if (!is.string(name)) { + throw new Error('A sink name must be provided.'); } - ); -}; - -/** - * Create an entry object. - * - * Note that using this method will not itself make any API requests. You will - * use the object returned in other API calls, such as - * {@link Log#write}. - * - * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} - * - * @param {?object|?string} [resource] See a - * [Monitored Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource). - * @param {object|string} data The data to use as the value for this log - * entry. - * @returns {Entry} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * - * const resource = { - * type: 'gce_instance', - * labels: { - * zone: 'global', - * instance_id: '3' - * } - * }; - * - * const entry = logging.entry(resource, { - * delegate: 'my_username' - * }); - * - * entry.toJSON(); - * // { - * // resource: { - * // type: 'gce_instance', - * // labels: { - * // zone: 'global', - * // instance_id: '3' - * // } - * // }, - * // jsonPayload: { - * // delegate: 'my_username' - * // } - * // } - */ -Logging.prototype.entry = function(resource, data) { - return new Entry(resource, data); -}; - -/** - * Query object for listing entries. - * - * @typedef {object} GetEntriesRequest - * @property {boolean} [autoPaginate=true] Have pagination handled - * automatically. - * @property {string} [filter] An - * [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). - * An empty filter matches all log entries. - * @property {object} [gaxOptions] Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @property {number} [maxApiCalls] Maximum number of API calls to make. - * @property {number} [maxResults] Maximum number of items plus prefixes to - * return. - * @property {string} [orderBy] How the results should be sorted, - * `timestamp` (oldest first) and `timestamp desc` (newest first, - * **default**). - * @property {number} [pageSize] Maximum number of logs to return. - * @property {string} [pageToken] A previously-returned page token - * representing part of the larger set of results to view. - */ -/** - * @typedef {array} GetEntriesResponse - * @property {Entry[]} 0 Array of {@link Entry} instances. - * @property {object} 1 The full API response. - */ -/** - * @callback GetEntriesCallback - * @param {?Error} err Request error, if any. - * @param {Entry[]} entries Array of {@link Entry} instances. - * @param {object} apiResponse The full API response. - */ -/** - * List the entries in your logs. - * - * @see [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} - * - * @param {GetEntriesRequest} [query] Query object for listing entries. - * @param {GetEntriesCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * - * logging.getEntries(function(err, entries) { - * // `entries` is an array of Stackdriver Logging entry objects. - * // See the `data` property to read the data from the entry. - * }); - * - * //- - * // To control how many API requests are made and page through the results - * // manually, set `autoPaginate` to `false`. - * //- - * function callback(err, entries, nextQuery, apiResponse) { - * if (nextQuery) { - * // More results exist. - * logging.getEntries(nextQuery, callback); - * } - * } - * - * logging.getEntries({ - * autoPaginate: false - * }, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * logging.getEntries().then(function(data) { - * const entries = data[0]; - * }); - * - * @example include:samples/logs.js - * region_tag:logging_list_log_entries - * Another example: - * - * @example include:samples/logs.js - * region_tag:logging_list_log_entries_advanced - * Another example: - */ -Logging.prototype.getEntries = function(options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; + if (!is.object(config)) { + throw new Error('A sink configuration object must be provided.'); + } + if (common.util.isCustomType(config.destination, 'bigquery/dataset')) { + this.setAclForDataset_(name, config, callback); + return; + } + if (common.util.isCustomType(config.destination, 'pubsub/topic')) { + this.setAclForTopic_(name, config, callback); + return; + } + if (common.util.isCustomType(config.destination, 'storage/bucket')) { + this.setAclForBucket_(name, config, callback); + return; + } + const reqOpts = { + parent: 'projects/' + this.projectId, + sink: extend({}, config, {name: name}), + }; + delete reqOpts.sink.gaxOptions; + this.request( + { + client: 'ConfigServiceV2Client', + method: 'createSink', + reqOpts: reqOpts, + gaxOpts: config.gaxOptions, + }, + function(err, resp) { + if (err) { + callback(err, null, resp); + return; + } + const sink = self.sink(resp.name); + sink.metadata = resp; + callback(null, sink, resp); + } + ); } - const reqOpts = extend( - { - orderBy: 'timestamp desc', - }, - options - ); - - reqOpts.resourceNames = arrify(reqOpts.resourceNames); - - const resourceName = 'projects/' + this.projectId; - - if (reqOpts.resourceNames.indexOf(resourceName) === -1) { - reqOpts.resourceNames.push(resourceName); + /** + * Create an entry object. + * + * Note that using this method will not itself make any API requests. You will + * use the object returned in other API calls, such as + * {@link Log#write}. + * + * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * + * @param {?object|?string} [resource] See a + * [Monitored Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource). + * @param {object|string} data The data to use as the value for this log + * entry. + * @returns {Entry} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * const resource = { + * type: 'gce_instance', + * labels: { + * zone: 'global', + * instance_id: '3' + * } + * }; + * + * const entry = logging.entry(resource, { + * delegate: 'my_username' + * }); + * + * entry.toJSON(); + * // { + * // resource: { + * // type: 'gce_instance', + * // labels: { + * // zone: 'global', + * // instance_id: '3' + * // } + * // }, + * // jsonPayload: { + * // delegate: 'my_username' + * // } + * // } + */ + entry(resource, data) { + return new Entry(resource, data); } - delete reqOpts.autoPaginate; - delete reqOpts.gaxOptions; - - const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions - ); - - this.request( - { - client: 'LoggingServiceV2Client', - method: 'listLogEntries', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - function() { - const entries = arguments[1]; - - if (entries) { - arguments[1] = entries.map(Entry.fromApiResponse_); - } - - callback.apply(null, arguments); - } - ); -}; - -/** - * List the {@link Entry} objects in your logs as a readable object - * stream. - * - * @method Logging#getEntriesStream - * @param {GetEntriesRequest} [query] Query object for listing entries. - * @returns {ReadableStream} A readable stream that emits {@link Entry} - * instances. - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * - * logging.getEntriesStream() - * .on('error', console.error) - * .on('data', function(entry) { - * // `entry` is a Stackdriver Logging entry object. - * // See the `data` property to read the data from the entry. - * }) - * .on('end', function() { - * // All entries retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * logging.getEntriesStream() - * .on('data', function(entry) { - * this.end(); - * }); - */ -Logging.prototype.getEntriesStream = function(options) { - const self = this; - options = options || {}; - - let requestStream; - const userStream = streamEvents(pumpify.obj()); - - userStream.abort = function() { - if (requestStream) { - requestStream.abort(); + /** + * Query object for listing entries. + * + * @typedef {object} GetEntriesRequest + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {string} [filter] An + * [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). + * An empty filter matches all log entries. + * @property {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return. + * @property {string} [orderBy] How the results should be sorted, + * `timestamp` (oldest first) and `timestamp desc` (newest first, + * **default**). + * @property {number} [pageSize] Maximum number of logs to return. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + */ + /** + * @typedef {array} GetEntriesResponse + * @property {Entry[]} 0 Array of {@link Entry} instances. + * @property {object} 1 The full API response. + */ + /** + * @callback GetEntriesCallback + * @param {?Error} err Request error, if any. + * @param {Entry[]} entries Array of {@link Entry} instances. + * @param {object} apiResponse The full API response. + */ + /** + * List the entries in your logs. + * + * @see [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} + * + * @param {GetEntriesRequest} [query] Query object for listing entries. + * @param {GetEntriesCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * logging.getEntries(function(err, entries) { + * // `entries` is an array of Stackdriver Logging entry objects. + * // See the `data` property to read the data from the entry. + * }); + * + * //- + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. + * //- + * function callback(err, entries, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * logging.getEntries(nextQuery, callback); + * } + * } + * + * logging.getEntries({ + * autoPaginate: false + * }, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * logging.getEntries().then(function(data) { + * const entries = data[0]; + * }); + * + * @example include:samples/logs.js + * region_tag:logging_list_log_entries + * Another example: + * + * @example include:samples/logs.js + * region_tag:logging_list_log_entries_advanced + * Another example: + */ + getEntries(options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; } - }; - - const toEntryStream = through.obj(function(entry, _, next) { - next(null, Entry.fromApiResponse_(entry)); - }); - - userStream.once('reading', function() { const reqOpts = extend( { orderBy: 'timestamp desc', @@ -510,452 +397,480 @@ Logging.prototype.getEntriesStream = function(options) { options ); reqOpts.resourceNames = arrify(reqOpts.resourceNames); - reqOpts.resourceNames.push('projects/' + self.projectId); - + const resourceName = 'projects/' + this.projectId; + if (reqOpts.resourceNames.indexOf(resourceName) === -1) { + reqOpts.resourceNames.push(resourceName); + } delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - const gaxOptions = extend( { autoPaginate: options.autoPaginate, }, options.gaxOptions ); - - requestStream = self.request({ - client: 'LoggingServiceV2Client', - method: 'listLogEntriesStream', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }); - - userStream.setPipeline(requestStream, toEntryStream); - }); - - return userStream; -}; - -/** - * Query object for listing sinks. - * - * @typedef {object} GetSinksRequest - * @property {boolean} [autoPaginate=true] Have pagination handled - * automatically. - * @property {object} [gaxOptions] Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @property {number} [maxApiCalls] Maximum number of API calls to make. - * @property {number} [maxResults] Maximum number of items plus prefixes to - * return. - * @property {number} [pageSize] Maximum number of logs to return. - * @property {string} [pageToken] A previously-returned page token - * representing part of the larger set of results to view. - */ -/** - * @typedef {array} GetSinksResponse - * @property {Sink[]} 0 Array of {@link Sink} instances. - * @property {object} 1 The full API response. - */ -/** - * @callback GetSinksCallback - * @param {?Error} err Request error, if any. - * @param {Sink[]} sinks Array of {@link Sink} instances. - * @param {object} apiResponse The full API response. - */ -/** - * Get the sinks associated with this project. - * - * @see [projects.sinks.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list} - * - * @param {GetSinksRequest} [query] Query object for listing sinks. - * @param {GetSinksCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * - * logging.getSinks(function(err, sinks) { - * // sinks is an array of Sink objects. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * logging.getSinks().then(function(data) { - * const sinks = data[0]; - * }); - * - * @example include:samples/sinks.js - * region_tag:logging_list_sinks - * Another example: - */ -Logging.prototype.getSinks = function(options, callback) { - const self = this; - - if (is.fn(options)) { - callback = options; - options = {}; + this.request( + { + client: 'LoggingServiceV2Client', + method: 'listLogEntries', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + function() { + const entries = arguments[1]; + if (entries) { + arguments[1] = entries.map(Entry.fromApiResponse_); + } + callback.apply(null, arguments); + } + ); } - const reqOpts = extend({}, options, { - parent: 'projects/' + this.projectId, - }); - - delete reqOpts.autoPaginate; - delete reqOpts.gaxOptions; - - const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions - ); - - this.request( - { - client: 'ConfigServiceV2Client', - method: 'listSinks', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - function() { - const sinks = arguments[1]; - - if (sinks) { - arguments[1] = sinks.map(function(sink) { - const sinkInstance = self.sink(sink.name); - sinkInstance.metadata = sink; - return sinkInstance; - }); + /** + * List the {@link Entry} objects in your logs as a readable object + * stream. + * + * @method Logging#getEntriesStream + * @param {GetEntriesRequest} [query] Query object for listing entries. + * @returns {ReadableStream} A readable stream that emits {@link Entry} + * instances. + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * logging.getEntriesStream() + * .on('error', console.error) + * .on('data', function(entry) { + * // `entry` is a Stackdriver Logging entry object. + * // See the `data` property to read the data from the entry. + * }) + * .on('end', function() { + * // All entries retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * logging.getEntriesStream() + * .on('data', function(entry) { + * this.end(); + * }); + */ + getEntriesStream(options) { + const self = this; + options = options || {}; + let requestStream; + const userStream = streamEvents(pumpify.obj()); + userStream.abort = function() { + if (requestStream) { + requestStream.abort(); } - - callback.apply(null, arguments); - } - ); -}; - -/** - * Get the {@link Sink} objects associated with this project as a - * readable object stream. - * - * @method Logging#getSinksStream - * @param {GetSinksRequest} [query] Query object for listing sinks. - * @returns {ReadableStream} A readable stream that emits {@link Sink} - * instances. - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * - * logging.getSinksStream() - * .on('error', console.error) - * .on('data', function(sink) { - * // `sink` is a Sink object. - * }) - * .on('end', function() { - * // All sinks retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * logging.getSinksStream() - * .on('data', function(sink) { - * this.end(); - * }); - */ -Logging.prototype.getSinksStream = function(options) { - const self = this; - - options = options || {}; - - let requestStream; - const userStream = streamEvents(pumpify.obj()); - - userStream.abort = function() { - if (requestStream) { - requestStream.abort(); + }; + const toEntryStream = through.obj(function(entry, _, next) { + next(null, Entry.fromApiResponse_(entry)); + }); + userStream.once('reading', function() { + const reqOpts = extend( + { + orderBy: 'timestamp desc', + }, + options + ); + reqOpts.resourceNames = arrify(reqOpts.resourceNames); + reqOpts.resourceNames.push('projects/' + self.projectId); + delete reqOpts.autoPaginate; + delete reqOpts.gaxOptions; + const gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); + requestStream = self.request({ + client: 'LoggingServiceV2Client', + method: 'listLogEntriesStream', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }); + userStream.setPipeline(requestStream, toEntryStream); + }); + return userStream; + } + /** + * Query object for listing sinks. + * + * @typedef {object} GetSinksRequest + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return. + * @property {number} [pageSize] Maximum number of logs to return. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + */ + /** + * @typedef {array} GetSinksResponse + * @property {Sink[]} 0 Array of {@link Sink} instances. + * @property {object} 1 The full API response. + */ + /** + * @callback GetSinksCallback + * @param {?Error} err Request error, if any. + * @param {Sink[]} sinks Array of {@link Sink} instances. + * @param {object} apiResponse The full API response. + */ + /** + * Get the sinks associated with this project. + * + * @see [projects.sinks.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list} + * + * @param {GetSinksRequest} [query] Query object for listing sinks. + * @param {GetSinksCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * logging.getSinks(function(err, sinks) { + * // sinks is an array of Sink objects. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * logging.getSinks().then(function(data) { + * const sinks = data[0]; + * }); + * + * @example include:samples/sinks.js + * region_tag:logging_list_sinks + * Another example: + */ + getSinks(options, callback) { + const self = this; + if (is.fn(options)) { + callback = options; + options = {}; } - }; - - const toSinkStream = through.obj(function(sink, _, next) { - const sinkInstance = self.sink(sink.name); - sinkInstance.metadata = sink; - next(null, sinkInstance); - }); - - userStream.once('reading', function() { const reqOpts = extend({}, options, { - parent: 'projects/' + self.projectId, + parent: 'projects/' + this.projectId, }); - + delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - const gaxOptions = extend( { autoPaginate: options.autoPaginate, }, options.gaxOptions ); + this.request( + { + client: 'ConfigServiceV2Client', + method: 'listSinks', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + function() { + const sinks = arguments[1]; + if (sinks) { + arguments[1] = sinks.map(function(sink) { + const sinkInstance = self.sink(sink.name); + sinkInstance.metadata = sink; + return sinkInstance; + }); + } + callback.apply(null, arguments); + } + ); + } - requestStream = self.request({ - client: 'ConfigServiceV2Client', - method: 'listSinksStream', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }); - - userStream.setPipeline(requestStream, toSinkStream); - }); - - return userStream; -}; - -/** - * Get a reference to a Stackdriver Logging log. - * - * @see [Log Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs} - * - * @param {string} name Name of the existing log. - * @param {object} [options] Configuration object. - * @param {boolean} [options.removeCircular] Replace circular references in - * logged objects with a string value, `[Circular]`. (Default: false) - * @returns {Log} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - */ -Logging.prototype.log = function(name, options) { - return new Log(this, name, options); -}; - -/** - * Get a reference to a Stackdriver Logging sink. - * - * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} - * - * @param {string} name Name of the existing sink. - * @returns {Sink} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const sink = logging.sink('my-sink'); - */ -Logging.prototype.sink = function(name) { - return new Sink(this, name); -}; - -/** - * Funnel all API requests through this method, to be sure we have a project ID. - * - * @param {object} config Configuration object. - * @param {object} config.gaxOpts GAX options. - * @param {function} config.method The gax method to call. - * @param {object} config.reqOpts Request options. - * @param {function} [callback] Callback function. - */ -Logging.prototype.request = function(config, callback) { - const self = this; - const isStreamMode = !callback; - - let gaxStream; - let stream; - - if (isStreamMode) { - stream = streamEvents(through.obj()); - - stream.abort = function() { - if (gaxStream && gaxStream.cancel) { - gaxStream.cancel(); + /** + * Get the {@link Sink} objects associated with this project as a + * readable object stream. + * + * @method Logging#getSinksStream + * @param {GetSinksRequest} [query] Query object for listing sinks. + * @returns {ReadableStream} A readable stream that emits {@link Sink} + * instances. + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * logging.getSinksStream() + * .on('error', console.error) + * .on('data', function(sink) { + * // `sink` is a Sink object. + * }) + * .on('end', function() { + * // All sinks retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * logging.getSinksStream() + * .on('data', function(sink) { + * this.end(); + * }); + */ + getSinksStream(options) { + const self = this; + options = options || {}; + let requestStream; + const userStream = streamEvents(pumpify.obj()); + userStream.abort = function() { + if (requestStream) { + requestStream.abort(); } }; + const toSinkStream = through.obj(function(sink, _, next) { + const sinkInstance = self.sink(sink.name); + sinkInstance.metadata = sink; + next(null, sinkInstance); + }); + userStream.once('reading', function() { + const reqOpts = extend({}, options, { + parent: 'projects/' + self.projectId, + }); + delete reqOpts.gaxOptions; + const gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); + requestStream = self.request({ + client: 'ConfigServiceV2Client', + method: 'listSinksStream', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }); + userStream.setPipeline(requestStream, toSinkStream); + }); + return userStream; + } - stream.once('reading', makeRequestStream); - } else { - makeRequestCallback(); + /** + * Get a reference to a Stackdriver Logging log. + * + * @see [Log Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs} + * + * @param {string} name Name of the existing log. + * @param {object} [options] Configuration object. + * @param {boolean} [options.removeCircular] Replace circular references in + * logged objects with a string value, `[Circular]`. (Default: false) + * @returns {Log} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + */ + log(name, options) { + return new Log(this, name, options); } - function prepareGaxRequest(callback) { - self.auth.getProjectId(function(err, projectId) { - if (err) { - callback(err); + /** + * Get a reference to a Stackdriver Logging sink. + * + * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} + * + * @param {string} name Name of the existing sink. + * @returns {Sink} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); + */ + sink(name) { + return new Sink(this, name); + } + + /** + * Funnel all API requests through this method, to be sure we have a project ID. + * + * @param {object} config Configuration object. + * @param {object} config.gaxOpts GAX options. + * @param {function} config.method The gax method to call. + * @param {object} config.reqOpts Request options. + * @param {function} [callback] Callback function. + */ + request(config, callback) { + const self = this; + const isStreamMode = !callback; + let gaxStream; + let stream; + if (isStreamMode) { + stream = streamEvents(through.obj()); + stream.abort = function() { + if (gaxStream && gaxStream.cancel) { + gaxStream.cancel(); + } + }; + stream.once('reading', makeRequestStream); + } else { + makeRequestCallback(); + } + function prepareGaxRequest(callback) { + self.auth.getProjectId(function(err, projectId) { + if (err) { + callback(err); + return; + } + self.projectId = projectId; + let gaxClient = self.api[config.client]; + if (!gaxClient) { + // Lazily instantiate client. + gaxClient = new v2[config.client](self.options); + self.api[config.client] = gaxClient; + } + let reqOpts = extend(true, {}, config.reqOpts); + reqOpts = replaceProjectIdToken(reqOpts, projectId); + const requestFn = gaxClient[config.method].bind( + gaxClient, + reqOpts, + config.gaxOpts + ); + callback(null, requestFn); + }); + } + function makeRequestCallback() { + if (global.GCLOUD_SANDBOX_ENV) { return; } - - self.projectId = projectId; - - let gaxClient = self.api[config.client]; - - if (!gaxClient) { - // Lazily instantiate client. - gaxClient = new v2[config.client](self.options); - self.api[config.client] = gaxClient; + prepareGaxRequest(function(err, requestFn) { + if (err) { + callback(err); + return; + } + requestFn(callback); + }); + } + function makeRequestStream() { + if (global.GCLOUD_SANDBOX_ENV) { + return through.obj(); } - - let reqOpts = extend(true, {}, config.reqOpts); - reqOpts = replaceProjectIdToken(reqOpts, projectId); - - const requestFn = gaxClient[config.method].bind( - gaxClient, - reqOpts, - config.gaxOpts - ); - - callback(null, requestFn); - }); - } - - function makeRequestCallback() { - if (global.GCLOUD_SANDBOX_ENV) { - return; + prepareGaxRequest(function(err, requestFn) { + if (err) { + stream.destroy(err); + return; + } + gaxStream = requestFn(); + gaxStream + .on('error', function(err) { + stream.destroy(err); + }) + .pipe(stream); + }); } + return stream; + } - prepareGaxRequest(function(err, requestFn) { + /** + * This method is called when creating a sink with a Bucket destination. The + * bucket must first grant proper ACL access to the Stackdriver Logging account. + * + * The parameters are the same as what {@link Logging#createSink} accepts. + * + * @private + */ + setAclForBucket_(name, config, callback) { + const self = this; + const bucket = config.destination; + bucket.acl.owners.addGroup('cloud-logs@google.com', function(err, apiResp) { if (err) { - callback(err); + callback(err, null, apiResp); return; } - - requestFn(callback); + config.destination = 'storage.googleapis.com/' + bucket.name; + self.createSink(name, config, callback); }); } - function makeRequestStream() { - if (global.GCLOUD_SANDBOX_ENV) { - return through.obj(); - } - - prepareGaxRequest(function(err, requestFn) { + /** + * This method is called when creating a sink with a Dataset destination. The + * dataset must first grant proper ACL access to the Stackdriver Logging + * account. + * + * The parameters are the same as what {@link Logging#createSink} accepts. + * + * @private + */ + setAclForDataset_(name, config, callback) { + const self = this; + const dataset = config.destination; + dataset.getMetadata(function(err, metadata, apiResp) { if (err) { - stream.destroy(err); + callback(err, null, apiResp); return; } - - gaxStream = requestFn(); - - gaxStream - .on('error', function(err) { - stream.destroy(err); - }) - .pipe(stream); + const access = [].slice.call(arrify(metadata.access)); + access.push({ + role: 'WRITER', + groupByEmail: 'cloud-logs@google.com', + }); + dataset.setMetadata( + { + access: access, + }, + function(err, apiResp) { + if (err) { + callback(err, null, apiResp); + return; + } + const baseUrl = 'bigquery.googleapis.com'; + const pId = dataset.parent.projectId; + const dId = dataset.id; + config.destination = `${baseUrl}/projects/${pId}/datasets/${dId}`; + self.createSink(name, config, callback); + } + ); }); } - return stream; -}; - -/** - * This method is called when creating a sink with a Bucket destination. The - * bucket must first grant proper ACL access to the Stackdriver Logging account. - * - * The parameters are the same as what {@link Logging#createSink} accepts. - * - * @private - */ -Logging.prototype.setAclForBucket_ = function(name, config, callback) { - const self = this; - const bucket = config.destination; - - bucket.acl.owners.addGroup('cloud-logs@google.com', function(err, apiResp) { - if (err) { - callback(err, null, apiResp); - return; - } - - config.destination = 'storage.googleapis.com/' + bucket.name; - - self.createSink(name, config, callback); - }); -}; - -/** - * This method is called when creating a sink with a Dataset destination. The - * dataset must first grant proper ACL access to the Stackdriver Logging - * account. - * - * The parameters are the same as what {@link Logging#createSink} accepts. - * - * @private - */ -Logging.prototype.setAclForDataset_ = function(name, config, callback) { - const self = this; - const dataset = config.destination; - - dataset.getMetadata(function(err, metadata, apiResp) { - if (err) { - callback(err, null, apiResp); - return; - } - - const access = [].slice.call(arrify(metadata.access)); - - access.push({ - role: 'WRITER', - groupByEmail: 'cloud-logs@google.com', - }); - - dataset.setMetadata( - { - access: access, - }, - function(err, apiResp) { + /** + * This method is called when creating a sink with a Topic destination. The + * topic must first grant proper ACL access to the Stackdriver Logging account. + * + * The parameters are the same as what {@link Logging#createSink} accepts. + * + * @private + */ + setAclForTopic_(name, config, callback) { + const self = this; + const topic = config.destination; + topic.iam.getPolicy(function(err, policy, apiResp) { + if (err) { + callback(err, null, apiResp); + return; + } + policy.bindings = arrify(policy.bindings); + policy.bindings.push({ + role: 'roles/pubsub.publisher', + members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], + }); + topic.iam.setPolicy(policy, function(err, policy, apiResp) { if (err) { callback(err, null, apiResp); return; } - - const baseUrl = 'bigquery.googleapis.com'; - const pId = dataset.parent.projectId; - const dId = dataset.id; - config.destination = `${baseUrl}/projects/${pId}/datasets/${dId}`; + const baseUrl = 'pubsub.googleapis.com'; + const topicName = topic.name; + config.destination = `${baseUrl}/${topicName}`; self.createSink(name, config, callback); - } - ); - }); -}; - -/** - * This method is called when creating a sink with a Topic destination. The - * topic must first grant proper ACL access to the Stackdriver Logging account. - * - * The parameters are the same as what {@link Logging#createSink} accepts. - * - * @private - */ -Logging.prototype.setAclForTopic_ = function(name, config, callback) { - const self = this; - const topic = config.destination; - - topic.iam.getPolicy(function(err, policy, apiResp) { - if (err) { - callback(err, null, apiResp); - return; - } - - policy.bindings = arrify(policy.bindings); - - policy.bindings.push({ - role: 'roles/pubsub.publisher', - members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], - }); - - topic.iam.setPolicy(policy, function(err, policy, apiResp) { - if (err) { - callback(err, null, apiResp); - return; - } - - const baseUrl = 'pubsub.googleapis.com'; - const topicName = topic.name; - config.destination = `${baseUrl}/${topicName}`; - self.createSink(name, config, callback); + }); }); - }); -}; + } +} /*! Developer Documentation * @@ -979,7 +894,7 @@ promisifyAll(Logging, { * @see Entry * @type {Constructor} */ -Logging.Entry = Entry; +module.exports.Entry = Entry; /** * {@link Log} class. @@ -988,21 +903,7 @@ Logging.Entry = Entry; * @see Log * @type {Constructor} */ -Logging.Log = Log; - -/** - * Reference to the {@link Logging} class. - * @name module:@google-cloud/logging.Logging - * @see Logging - */ -/** - * {@link Logging} class. - * - * @name Logging.Logging - * @see Logging - * @type {Constructor} - */ -Logging.Logging = Logging; +module.exports.Log = Log; /** * {@link Sink} class. @@ -1011,7 +912,7 @@ Logging.Logging = Logging; * @see Sink * @type {Constructor} */ -Logging.Sink = Sink; +module.exports.Sink = Sink; /** * The default export of the `@google-cloud/logging` package is the @@ -1027,7 +928,7 @@ Logging.Sink = Sink; * npm install --save @google-cloud/logging * * @example Import the client library - * const Logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * @example Create a client that uses Application Default Credentials (ADC): * const logging = new Logging(); @@ -1042,7 +943,7 @@ Logging.Sink = Sink; * region_tag:logging_quickstart * Full quickstart example: */ -module.exports = Logging; +module.exports.Logging = Logging; /** * Reference to the low-level auto-generated clients for the V2 Logging service. diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index ff8572ef8f6..5117dba7908 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -22,8 +22,8 @@ const extend = require('extend'); const is = require('is'); const snakeCaseKeys = require('snakecase-keys'); -const Entry = require('./entry.js'); -const Metadata = require('./metadata.js'); +const {Entry} = require('./entry'); +const {Metadata} = require('./metadata'); /** * A log is a named collection of entries, each entry representing a timestamped @@ -43,709 +43,700 @@ const Metadata = require('./metadata.js'); * logged objects with a string value, `[Circular]`. (Default: false) * * @example - * const Logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('syslog'); */ -function Log(logging, name, options) { - options = options || {}; - - this.formattedName_ = Log.formatName_(logging.projectId, name); - this.removeCircular_ = options.removeCircular === true; - this.metadata_ = new Metadata(logging); +class Log { + constructor(logging, name, options) { + options = options || {}; + this.formattedName_ = Log.formatName_(logging.projectId, name); + this.removeCircular_ = options.removeCircular === true; + this.metadata_ = new Metadata(logging); + this.logging = logging; + /** + * @name Log#name + * @type {string} + */ + this.name = this.formattedName_.split('/').pop(); + } - this.logging = logging; /** - * @name Log#name - * @type {string} + * Write a log entry with a severity of "ALERT". + * + * This is a simple wrapper around {@link Log#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.alert(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.alert(entry).then(function(data) { + * const apiResponse = data[0]; + * }); */ - this.name = this.formattedName_.split('/').pop(); -} - -/** - * Return an array of log entries with the desired severity assigned. - * - * @private - * - * @param {object|object[]} entries - Log entries. - * @param {string} severity - The desired severity level. - */ -Log.assignSeverityToEntries_ = function(entries, severity) { - return arrify(entries).map(function(entry) { - const metadata = extend(true, {}, entry.metadata, { - severity: severity, - }); - - return extend(new Entry(), entry, { - metadata: metadata, - }); - }); -}; - -/** - * Format the name of a log. A log's full name is in the format of - * 'projects/{projectId}/logs/{logName}'. - * - * @private - * - * @returns {string} - */ -Log.formatName_ = function(projectId, name) { - const path = 'projects/' + projectId + '/logs/'; - name = name.replace(path, ''); - - if (decodeURIComponent(name) === name) { - // The name has not been encoded yet. - name = encodeURIComponent(name); + alert(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'ALERT'), options, callback); } - return path + name; -}; - -/** - * Write a log entry with a severity of "ALERT". - * - * This is a simple wrapper around {@link Log#write}. All arguments are - * the same as documented there. - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.alert(entry, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.alert(entry).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Log.prototype.alert = function(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'ALERT'), options, callback); -}; - -/** - * Write a log entry with a severity of "CRITICAL". - * - * This is a simple wrapper around {@link Log#write}. All arguments are - * the same as documented there. - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.critical(entry, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.critical(entry).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Log.prototype.critical = function(entry, options, callback) { - const entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); - this.write(entries, options, callback); -}; - -/** - * Write a log entry with a severity of "DEBUG". - * - * This is a simple wrapper around {@link Log#write}. All arguments are - * the same as documented there. - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.debug(entry, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.debug(entry).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Log.prototype.debug = function(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback); -}; - -/** - * @typedef {array} DeleteLogResponse - * @property {object} 0 The full API response. - */ -/** - * @callback DeleteLogCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ -/** - * Delete the log. - * - * @see [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete} - * - * @param {object} [gaxOptions] Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {DeleteLogCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * log.delete(function(err, apiResponse) { - * if (!err) { - * // The log was deleted. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.delete().then(function(data) { - * const apiResponse = data[0]; - * }); - * - * @example include:samples/logs.js - * region_tag:logging_delete_log - * Another example: - */ -Log.prototype.delete = function(gaxOptions, callback) { - if (is.fn(gaxOptions)) { - callback = gaxOptions; - gaxOptions = {}; + /** + * Write a log entry with a severity of "CRITICAL". + * + * This is a simple wrapper around {@link Log#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.critical(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.critical(entry).then(function(data) { + * const apiResponse = data[0]; + * }); + */ + critical(entry, options, callback) { + const entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); + this.write(entries, options, callback); } - const reqOpts = { - logName: this.formattedName_, - }; - - this.logging.request( - { - client: 'LoggingServiceV2Client', - method: 'deleteLog', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - callback - ); -}; - -/** - * Write a log entry with a severity of "EMERGENCY". - * - * This is a simple wrapper around {@link Log#write}. All arguments are - * the same as documented there. - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.emergency(entry, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.emergency(entry).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Log.prototype.emergency = function(entry, options, callback) { - const entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); - this.write(entries, options, callback); -}; - -/** - * Create an entry object for this log. - * - * Note that using this method will not itself make any API requests. You will - * use the object returned in other API calls, such as - * {@link Log#write}. - * - * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} - * - * @param {?object} metadata See a - * [LogEntry Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). - * @param {object|string} data The data to use as the value for this log - * entry. - * @returns {Entry} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const metadata = { - * resource: { - * type: 'gce_instance', - * labels: { - * zone: 'global', - * instance_id: '3' - * } - * } - * }; - * - * const entry = log.entry(metadata, { - * delegate: 'my_username' - * }); - * - * entry.toJSON(); - * // { - * // logName: 'projects/grape-spaceship-123/logs/syslog', - * // resource: { - * // type: 'gce_instance', - * // labels: { - * // zone: 'global', - * // instance_id: '3' - * // } - * // }, - * // jsonPayload: { - * // delegate: 'my_username' - * // } - * // } - */ -Log.prototype.entry = function(metadata, data) { - if (!data) { - data = metadata; - metadata = {}; + /** + * Write a log entry with a severity of "DEBUG". + * + * This is a simple wrapper around {@link Log#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.debug(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.debug(entry).then(function(data) { + * const apiResponse = data[0]; + * }); + */ + debug(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback); } - return this.logging.entry(metadata, data); -}; - -/** - * Write a log entry with a severity of "ERROR". - * - * This is a simple wrapper around {@link Log#write}. All arguments are - * the same as documented there. - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.error(entry, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.error(entry).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Log.prototype.error = function(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'ERROR'), options, callback); -}; - -/** - * This method is a wrapper around {module:logging#getEntries}, but with a - * filter specified to only return entries from this log. - * - * @see [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} - * - * @param {GetEntriesRequest} [query] Query object for listing entries. - * @param {GetEntriesCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * log.getEntries(function(err, entries) { - * // `entries` is an array of Stackdriver Logging entry objects. - * // See the `data` property to read the data from the entry. - * }); - * - * //- - * // To control how many API requests are made and page through the results - * // manually, set `autoPaginate` to `false`. - * //- - * function callback(err, entries, nextQuery, apiResponse) { - * if (nextQuery) { - * // More results exist. - * log.getEntries(nextQuery, callback); - * } - * } - * - * log.getEntries({ - * autoPaginate: false - * }, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.getEntries().then(function(data) { - * const entries = data[0]; - * }); - */ -Log.prototype.getEntries = function(options, callback) { - if (is.function(options)) { - callback = options; - options = {}; + /** + * @typedef {array} DeleteLogResponse + * @property {object} 0 The full API response. + */ + /** + * @callback DeleteLogCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Delete the log. + * + * @see [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete} + * + * @param {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @param {DeleteLogCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * log.delete(function(err, apiResponse) { + * if (!err) { + * // The log was deleted. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * @example include:samples/logs.js + * region_tag:logging_delete_log + * Another example: + */ + delete(gaxOptions, callback) { + if (is.fn(gaxOptions)) { + callback = gaxOptions; + gaxOptions = {}; + } + const reqOpts = { + logName: this.formattedName_, + }; + this.logging.request( + { + client: 'LoggingServiceV2Client', + method: 'deleteLog', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + callback + ); } - options = extend( - { - filter: 'logName="' + this.formattedName_ + '"', - }, - options - ); - - return this.logging.getEntries(options, callback); -}; - -/** - * This method is a wrapper around {module:logging#getEntriesStream}, but with a - * filter specified to only return {module:logging/entry} objects from this log. - * - * @method Log#getEntriesStream - * @param {GetEntriesRequest} [query] Query object for listing entries. - * @returns {ReadableStream} A readable stream that emits {@link Entry} - * instances. - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * log.getEntriesStream() - * .on('error', console.error) - * .on('data', function(entry) { - * // `entry` is a Stackdriver Logging entry object. - * // See the `data` property to read the data from the entry. - * }) - * .on('end', function() { - * // All entries retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * log.getEntriesStream() - * .on('data', function(entry) { - * this.end(); - * }); - */ -Log.prototype.getEntriesStream = function(options) { - options = extend( - { - filter: 'logName="' + this.formattedName_ + '"', - }, - options - ); - - return this.logging.getEntriesStream(options); -}; - -/** - * Write a log entry with a severity of "INFO". - * - * This is a simple wrapper around {@link Log#write}. All arguments are - * the same as documented there. - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.info(entry, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.info(entry).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Log.prototype.info = function(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'INFO'), options, callback); -}; - -/** - * Write a log entry with a severity of "NOTICE". - * - * This is a simple wrapper around {@link Log#write}. All arguments are - * the same as documented there. - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.notice(entry, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.notice(entry).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Log.prototype.notice = function(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback); -}; - -/** - * Write a log entry with a severity of "WARNING". - * - * This is a simple wrapper around {@link Log#write}. All arguments are - * the same as documented there. - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const log = logging.log('my-log'); - * - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.warning(entry, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.warning(entry).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Log.prototype.warning = function(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback); -}; - -/** - * @typedef {array} LogWriteResponse - * @property {object} 0 The full API response. - */ -/** - * @callback LogWriteCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ -/** - * Write options. - * - * @typedef {object} WriteOptions - * @property {object} gaxOptions Request configuration options, outlined here: - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @property {object[]} labels Labels to set on the log. - * @property {object} resource A default monitored resource for entries where - * one isn't specified. - */ -/** - * Write log entries to Stackdriver Logging. - * - * @see [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write} - * - * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. - * @param {?WriteOptions} [options] Write options - * @param {LogWriteCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const entry = log.entry('gce_instance', { - * instance: 'my_instance' - * }); - * - * log.write(entry, function(err, apiResponse) { - * if (!err) { - * // The log entry was written. - * } - * }); - * - * //- - * // You may also pass multiple log entries to write. - * //- - * const secondEntry = log.entry('compute.googleapis.com', { - * user: 'my_username' - * }); - * - * log.write([ - * entry, - * secondEntry - * ], function(err, apiResponse) { - * if (!err) { - * // The log entries were written. - * } - * }); - * - * //- - * // To save some steps, you can also pass in plain values as your entries. - * // Note, however, that you must provide a configuration object to specify the - * // resource. - * //- - * const entries = [ - * { - * user: 'my_username' - * }, - * { - * home: process.env.HOME - * } - * ]; - * - * const options = { - * resource: 'compute.googleapis.com' - * }; - * - * log.write(entries, options, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * log.write(entries).then(function(data) { - * const apiResponse = data[0]; - * }); - * - * @example include:samples/logs.js - * region_tag:logging_write_log_entry - * Another example: - * - * @example include:samples/logs.js - * region_tag:logging_write_log_entry_advanced - * Another example: - */ -Log.prototype.write = function(entry, options, callback) { - const self = this; - - if (is.fn(options)) { - callback = options; - options = {}; + /** + * Write a log entry with a severity of "EMERGENCY". + * + * This is a simple wrapper around {@link Log#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.emergency(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.emergency(entry).then(function(data) { + * const apiResponse = data[0]; + * }); + */ + emergency(entry, options, callback) { + const entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); + this.write(entries, options, callback); } - if (!options.resource) { - this.metadata_.getDefaultResource(function(err, resource) { - // Ignore errors (the API will speak up if it has an issue). - writeWithResource(resource); - }); - } else { - if (options.resource.labels) { - options.resource.labels = snakeCaseKeys(options.resource.labels); + /** + * Create an entry object for this log. + * + * Note that using this method will not itself make any API requests. You will + * use the object returned in other API calls, such as + * {@link Log#write}. + * + * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * + * @param {?object} metadata See a + * [LogEntry Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). + * @param {object|string} data The data to use as the value for this log + * entry. + * @returns {Entry} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const metadata = { + * resource: { + * type: 'gce_instance', + * labels: { + * zone: 'global', + * instance_id: '3' + * } + * } + * }; + * + * const entry = log.entry(metadata, { + * delegate: 'my_username' + * }); + * + * entry.toJSON(); + * // { + * // logName: 'projects/grape-spaceship-123/logs/syslog', + * // resource: { + * // type: 'gce_instance', + * // labels: { + * // zone: 'global', + * // instance_id: '3' + * // } + * // }, + * // jsonPayload: { + * // delegate: 'my_username' + * // } + * // } + */ + entry(metadata, data) { + if (!data) { + data = metadata; + metadata = {}; } - writeWithResource(options.resource); + return this.logging.entry(metadata, data); } - function writeWithResource(resource) { - let decoratedEntries; - try { - decoratedEntries = self.decorateEntries_(arrify(entry)); - } catch (err) { - // Ignore errors (the API will speak up if it has an issue). - } + /** + * Write a log entry with a severity of "ERROR". + * + * This is a simple wrapper around {@link Log#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.error(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.error(entry).then(function(data) { + * const apiResponse = data[0]; + * }); + */ + error(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'ERROR'), options, callback); + } - const reqOpts = extend( + /** + * This method is a wrapper around {module:logging#getEntries}, but with a + * filter specified to only return entries from this log. + * + * @see [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} + * + * @param {GetEntriesRequest} [query] Query object for listing entries. + * @param {GetEntriesCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * log.getEntries(function(err, entries) { + * // `entries` is an array of Stackdriver Logging entry objects. + * // See the `data` property to read the data from the entry. + * }); + * + * //- + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. + * //- + * function callback(err, entries, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * log.getEntries(nextQuery, callback); + * } + * } + * + * log.getEntries({ + * autoPaginate: false + * }, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.getEntries().then(function(data) { + * const entries = data[0]; + * }); + */ + getEntries(options, callback) { + if (is.function(options)) { + callback = options; + options = {}; + } + options = extend( { - logName: self.formattedName_, - entries: decoratedEntries, - resource: resource, + filter: 'logName="' + this.formattedName_ + '"', }, options ); + return this.logging.getEntries(options, callback); + } - delete reqOpts.gaxOptions; - - self.logging.request( + /** + * This method is a wrapper around {module:logging#getEntriesStream}, but with a + * filter specified to only return {module:logging/entry} objects from this log. + * + * @method Log#getEntriesStream + * @param {GetEntriesRequest} [query] Query object for listing entries. + * @returns {ReadableStream} A readable stream that emits {@link Entry} + * instances. + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * log.getEntriesStream() + * .on('error', console.error) + * .on('data', function(entry) { + * // `entry` is a Stackdriver Logging entry object. + * // See the `data` property to read the data from the entry. + * }) + * .on('end', function() { + * // All entries retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * log.getEntriesStream() + * .on('data', function(entry) { + * this.end(); + * }); + */ + getEntriesStream(options) { + options = extend( { - client: 'LoggingServiceV2Client', - method: 'writeLogEntries', - reqOpts: reqOpts, - gaxOpts: options.gaxOptions, + filter: 'logName="' + this.formattedName_ + '"', }, + options + ); + return this.logging.getEntriesStream(options); + } + + /** + * Write a log entry with a severity of "INFO". + * + * This is a simple wrapper around {@link Log#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.info(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.info(entry).then(function(data) { + * const apiResponse = data[0]; + * }); + */ + info(entry, options, callback) { + this.write(Log.assignSeverityToEntries_(entry, 'INFO'), options, callback); + } + + /** + * Write a log entry with a severity of "NOTICE". + * + * This is a simple wrapper around {@link Log#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.notice(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.notice(entry).then(function(data) { + * const apiResponse = data[0]; + * }); + */ + notice(entry, options, callback) { + this.write( + Log.assignSeverityToEntries_(entry, 'NOTICE'), + options, callback ); } -}; -/** - * All entries are passed through here in order to get them serialized. - * - * @private - * - * @param {object[]} entries - Entry objects. - * @returns {object[]} Serialized entries. - * @throws if there is an error during serialization. - */ -Log.prototype.decorateEntries_ = function(entries) { - const self = this; + /** + * Write a log entry with a severity of "WARNING". + * + * This is a simple wrapper around {@link Log#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.warning(entry, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.warning(entry).then(function(data) { + * const apiResponse = data[0]; + * }); + */ + warning(entry, options, callback) { + this.write( + Log.assignSeverityToEntries_(entry, 'WARNING'), + options, + callback + ); + } - return entries.map(function(entry) { - if (!(entry instanceof Entry)) { - entry = self.entry(entry); + /** + * @typedef {array} LogWriteResponse + * @property {object} 0 The full API response. + */ + /** + * @callback LogWriteCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Write options. + * + * @typedef {object} WriteOptions + * @property {object} gaxOptions Request configuration options, outlined here: + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {object[]} labels Labels to set on the log. + * @property {object} resource A default monitored resource for entries where + * one isn't specified. + */ + /** + * Write log entries to Stackdriver Logging. + * + * @see [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write} + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @param {LogWriteCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.write(entry, function(err, apiResponse) { + * if (!err) { + * // The log entry was written. + * } + * }); + * + * //- + * // You may also pass multiple log entries to write. + * //- + * const secondEntry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.write([ + * entry, + * secondEntry + * ], function(err, apiResponse) { + * if (!err) { + * // The log entries were written. + * } + * }); + * + * //- + * // To save some steps, you can also pass in plain values as your entries. + * // Note, however, that you must provide a configuration object to specify the + * // resource. + * //- + * const entries = [ + * { + * user: 'my_username' + * }, + * { + * home: process.env.HOME + * } + * ]; + * + * const options = { + * resource: 'compute.googleapis.com' + * }; + * + * log.write(entries, options, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * log.write(entries).then(function(data) { + * const apiResponse = data[0]; + * }); + * + * @example include:samples/logs.js + * region_tag:logging_write_log_entry + * Another example: + * + * @example include:samples/logs.js + * region_tag:logging_write_log_entry_advanced + * Another example: + */ + write(entry, options, callback) { + const self = this; + if (is.fn(options)) { + callback = options; + options = {}; + } + if (!options.resource) { + this.metadata_.getDefaultResource(function(err, resource) { + // Ignore errors (the API will speak up if it has an issue). + writeWithResource(resource); + }); + } else { + if (options.resource.labels) { + options.resource.labels = snakeCaseKeys(options.resource.labels); + } + writeWithResource(options.resource); + } + function writeWithResource(resource) { + let decoratedEntries; + try { + decoratedEntries = self.decorateEntries_(arrify(entry)); + } catch (err) { + // Ignore errors (the API will speak up if it has an issue). + } + const reqOpts = extend( + { + logName: self.formattedName_, + entries: decoratedEntries, + resource: resource, + }, + options + ); + delete reqOpts.gaxOptions; + self.logging.request( + { + client: 'LoggingServiceV2Client', + method: 'writeLogEntries', + reqOpts: reqOpts, + gaxOpts: options.gaxOptions, + }, + callback + ); } + } + + /** + * All entries are passed through here in order to get them serialized. + * + * @private + * + * @param {object[]} entries - Entry objects. + * @returns {object[]} Serialized entries. + * @throws if there is an error during serialization. + */ + decorateEntries_(entries) { + const self = this; + return entries.map(function(entry) { + if (!(entry instanceof Entry)) { + entry = self.entry(entry); + } + return entry.toJSON({ + removeCircular: self.removeCircular_, + }); + }); + } - return entry.toJSON({ - removeCircular: self.removeCircular_, + /** + * Return an array of log entries with the desired severity assigned. + * + * @private + * + * @param {object|object[]} entries - Log entries. + * @param {string} severity - The desired severity level. + */ + static assignSeverityToEntries_(entries, severity) { + return arrify(entries).map(function(entry) { + const metadata = extend(true, {}, entry.metadata, { + severity: severity, + }); + return extend(new Entry(), entry, { + metadata: metadata, + }); }); - }); -}; + } + + /** + * Format the name of a log. A log's full name is in the format of + * 'projects/{projectId}/logs/{logName}'. + * + * @private + * + * @returns {string} + */ + static formatName_(projectId, name) { + const path = 'projects/' + projectId + '/logs/'; + name = name.replace(path, ''); + if (decodeURIComponent(name) === name) { + // The name has not been encoded yet. + name = encodeURIComponent(name); + } + return path + name; + } +} /*! Developer Documentation * @@ -761,4 +752,4 @@ promisifyAll(Log, { * @name module:@google-cloud/logging.Log * @see Log */ -module.exports = Log; +module.exports.Log = Log; diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index f775bb41bd2..935f374c3c7 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -31,144 +31,144 @@ const gcpMetadata = require('gcp-metadata'); * * @param {Logging} logging The parent Logging instance. */ -function Metadata(logging) { - this.logging = logging; -} - -Metadata.KUBERNETES_NAMESPACE_ID_PATH = - '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; - -/** - * Create a descriptor for Cloud Functions. - * - * @returns {object} - */ -Metadata.getCloudFunctionDescriptor = function() { - return { - type: 'cloud_function', - labels: { - function_name: process.env.FUNCTION_NAME, - region: process.env.FUNCTION_REGION, - }, - }; -}; - -/** - * Create a descriptor for Google App Engine. - * - * @returns {object} - */ -Metadata.getGAEDescriptor = function() { - return { - type: 'gae_app', - labels: { - module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, - version_id: process.env.GAE_VERSION, - }, - }; -}; +class Metadata { + constructor(logging) { + this.logging = logging; + } + /** + * Retrieve a resource object describing the current environment. + * + * @param {function} callback Callback function. + */ + getDefaultResource(callback) { + this.logging.auth + .getEnv() + .then(env => { + if (env === 'KUBERNETES_ENGINE') { + Metadata.getGKEDescriptor(callback); + } else if (env === 'APP_ENGINE') { + callback(null, Metadata.getGAEDescriptor()); + } else if (env === 'CLOUD_FUNCTIONS') { + callback(null, Metadata.getCloudFunctionDescriptor()); + } else if (env === 'COMPUTE_ENGINE') { + // Test for compute engine should be done after all the rest - everything + // runs on top of compute engine. + Metadata.getGCEDescriptor(callback); + } else { + callback(null, Metadata.getGlobalDescriptor()); + } + }) + .catch(callback); + } -/** - * Create a descriptor for Google Compute Engine. - * - * @param {function} callback Callback function. - * @return {object} - */ -Metadata.getGCEDescriptor = function(callback) { - gcpMetadata.instance('id').then(function(idResponse) { - gcpMetadata.instance('zone').then(function(zoneResponse) { - // Some parsing is necessary. Metadata service returns a fully - // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging - // wants just the zone part. - // - const zone = zoneResponse.data.split('/').pop(); - callback(null, { - type: 'gce_instance', - labels: { - instance_id: idResponse.data, - zone: zone, - }, - }); - }, callback); - }, callback); -}; + /** + * Create a descriptor for Cloud Functions. + * + * @returns {object} + */ + static getCloudFunctionDescriptor() { + return { + type: 'cloud_function', + labels: { + function_name: process.env.FUNCTION_NAME, + region: process.env.FUNCTION_REGION, + }, + }; + } -/** - * Create a descriptor for Google Container Engine. - * - * @param {function} callback Callback function. - * @return {object} - */ -Metadata.getGKEDescriptor = function(callback) { - // Stackdriver Logging Monitored Resource for 'container' requires - // cluster_name and namespace_id fields. Note that these *need* to be - // snake_case. The namespace_id is not easily available from inside the - // container, but we can get the namespace_name. Logging has been using the - // namespace_name in place of namespace_id for a while now. Log correlation - // with metrics may not necessarily work however. - // - gcpMetadata.instance('attributes/cluster-name').then(function(resp) { - fs.readFile( - Metadata.KUBERNETES_NAMESPACE_ID_PATH, - 'utf8', - (err, namespace) => { - if (err) { - callback( - new Error( - `Error reading ` + - `${Metadata.KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}` - ) - ); - return; - } + /** + * Create a descriptor for Google App Engine. + * + * @returns {object} + */ + static getGAEDescriptor() { + return { + type: 'gae_app', + labels: { + module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, + version_id: process.env.GAE_VERSION, + }, + }; + } + /** + * Create a descriptor for Google Compute Engine. + * + * @param {function} callback Callback function. + * @return {object} + */ + static getGCEDescriptor(callback) { + gcpMetadata.instance('id').then(function(idResponse) { + gcpMetadata.instance('zone').then(function(zoneResponse) { + // Some parsing is necessary. Metadata service returns a fully + // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging + // wants just the zone part. + // + const zone = zoneResponse.data.split('/').pop(); callback(null, { - type: 'container', + type: 'gce_instance', labels: { - cluster_name: resp.data, - namespace_id: namespace, + instance_id: idResponse.data, + zone: zone, }, }); - } - ); - }, callback); -}; + }, callback); + }, callback); + } -/** - * Create a global descriptor. - * - * @returns {object} - */ -Metadata.getGlobalDescriptor = function() { - return { - type: 'global', - }; -}; + /** + * Create a descriptor for Google Container Engine. + * + * @param {function} callback Callback function. + * @return {object} + */ + static getGKEDescriptor(callback) { + // Stackdriver Logging Monitored Resource for 'container' requires + // cluster_name and namespace_id fields. Note that these *need* to be + // snake_case. The namespace_id is not easily available from inside the + // container, but we can get the namespace_name. Logging has been using the + // namespace_name in place of namespace_id for a while now. Log correlation + // with metrics may not necessarily work however. + // + gcpMetadata.instance('attributes/cluster-name').then(function(resp) { + fs.readFile( + Metadata.KUBERNETES_NAMESPACE_ID_PATH, + 'utf8', + (err, namespace) => { + if (err) { + callback( + new Error( + `Error reading ` + + `${Metadata.KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}` + ) + ); + return; + } + callback(null, { + type: 'container', + labels: { + cluster_name: resp.data, + namespace_id: namespace, + }, + }); + } + ); + }, callback); + } -/** - * Retrieve a resource object describing the current environment. - * - * @param {function} callback Callback function. - */ -Metadata.prototype.getDefaultResource = function(callback) { - this.logging.auth - .getEnv() - .then(env => { - if (env === 'KUBERNETES_ENGINE') { - Metadata.getGKEDescriptor(callback); - } else if (env === 'APP_ENGINE') { - callback(null, Metadata.getGAEDescriptor()); - } else if (env === 'CLOUD_FUNCTIONS') { - callback(null, Metadata.getCloudFunctionDescriptor()); - } else if (env === 'COMPUTE_ENGINE') { - // Test for compute engine should be done after all the rest - everything - // runs on top of compute engine. - Metadata.getGCEDescriptor(callback); - } else { - callback(null, Metadata.getGlobalDescriptor()); - } - }) - .catch(callback); -}; + /** + * Create a global descriptor. + * + * @returns {object} + */ + static getGlobalDescriptor() { + return { + type: 'global', + }; + } +} + +Metadata.KUBERNETES_NAMESPACE_ID_PATH = + '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; -module.exports = Metadata; +module.exports.Metadata = Metadata; diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index 5b9e1dac7a7..cdae34dbbc1 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -36,318 +36,308 @@ const is = require('is'); * @param {string} name Name of the sink. * * @example - * const Logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const sink = logging.sink('my-sink'); */ -function Sink(logging, name) { - this.logging = logging; - /** - * @name Sink#name - * @type {string} - */ - this.name = name; - this.formattedName_ = 'projects/' + logging.projectId + '/sinks/' + name; -} - -/** - * Create a sink. - * - * @param {CreateSinkRequest} config Config to set for the sink. - * @param {CreateSinkCallback} [callback] Callback function. - * @returns {Promise} - * @throws {Error} if a config object is not provided. - * @see Logging#createSink - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const sink = logging.sink('my-sink'); - * - * const config = { - * destination: { - * // ... - * } - * }; - * - * sink.create(config, function(err, sink, apiResponse) { - * if (!err) { - * // The sink was created successfully. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * sink.create(config).then(function(data) { - * const sink = data[0]; - * const apiResponse = data[1]; - * }); - * - * @example include:samples/sinks.js - * region_tag:logging_create_sink - * Another example: - */ -Sink.prototype.create = function(config, callback) { - this.logging.createSink(this.name, config, callback); -}; - -/** - * @typedef {array} DeleteSinkResponse - * @property {object} 0 The full API response. - */ -/** - * @callback DeleteSinkCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ -/** - * Delete the sink. - * - * @see [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete} - * - * @param {object} [gaxOptions] Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {DeleteSinkCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const sink = logging.sink('my-sink'); - * - * sink.delete(function(err, apiResponse) { - * if (!err) { - * // The log was deleted. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * sink.delete().then(function(data) { - * const apiResponse = data[0]; - * }); - * - * @example include:samples/sinks.js - * region_tag:logging_delete_sink - * Another example: - */ -Sink.prototype.delete = function(gaxOptions, callback) { - if (is.fn(gaxOptions)) { - callback = gaxOptions; - gaxOptions = {}; +class Sink { + constructor(logging, name) { + this.logging = logging; + /** + * @name Sink#name + * @type {string} + */ + this.name = name; + this.formattedName_ = 'projects/' + logging.projectId + '/sinks/' + name; } - const reqOpts = { - sinkName: this.formattedName_, - }; - - this.logging.request( - { - client: 'ConfigServiceV2Client', - method: 'deleteSink', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - callback - ); -}; - -/** - * @typedef {array} GetSinkMetadataResponse - * @property {object} 0 The {@link Sink} metadata. - * @property {object} 1 The full API response. - */ -/** - * @callback GetSinkMetadataCallback - * @param {?Error} err Request error, if any. - * @param {object} metadata The {@link Sink} metadata. - * @param {object} apiResponse The full API response. - */ -/** - * Get the sink's metadata. - * - * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} - * @see [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get} - * - * @param {object} [gaxOptions] Request configuration options, outlined - * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {GetSinkMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const sink = logging.sink('my-sink'); - * - * sink.getMetadata(function(err, metadata, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * sink.getMetadata().then(function(data) { - * const metadata = data[0]; - * const apiResponse = data[1]; - * }); - * - * @example include:samples/sinks.js - * region_tag:logging_get_sink - * Another example: - */ -Sink.prototype.getMetadata = function(gaxOptions, callback) { - const self = this; - - if (is.fn(gaxOptions)) { - callback = gaxOptions; - gaxOptions = {}; + /** + * Create a sink. + * + * @param {CreateSinkRequest} config Config to set for the sink. + * @param {CreateSinkCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} if a config object is not provided. + * @see Logging#createSink + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); + * + * const config = { + * destination: { + * // ... + * } + * }; + * + * sink.create(config, function(err, sink, apiResponse) { + * if (!err) { + * // The sink was created successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.create(config).then(function(data) { + * const sink = data[0]; + * const apiResponse = data[1]; + * }); + * + * @example include:samples/sinks.js + * region_tag:logging_create_sink + * Another example: + */ + create(config, callback) { + this.logging.createSink(this.name, config, callback); } - const reqOpts = { - sinkName: this.formattedName_, - }; - - this.logging.request( - { - client: 'ConfigServiceV2Client', - method: 'getSink', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - function() { - if (arguments[1]) { - self.metadata = arguments[1]; - } - - callback.apply(null, arguments); + /** + * @typedef {array} DeleteSinkResponse + * @property {object} 0 The full API response. + */ + /** + * @callback DeleteSinkCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Delete the sink. + * + * @see [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete} + * + * @param {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @param {DeleteSinkCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); + * + * sink.delete(function(err, apiResponse) { + * if (!err) { + * // The log was deleted. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * @example include:samples/sinks.js + * region_tag:logging_delete_sink + * Another example: + */ + delete(gaxOptions, callback) { + if (is.fn(gaxOptions)) { + callback = gaxOptions; + gaxOptions = {}; } - ); -}; - -/** - * @typedef {array} SetSinkFilterResponse - * @property {object} 0 The full API response. - */ -/** - * @callback SetSinkFilterCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ -/** - * Set the sink's filter. - * - * This will override any filter that was previously set. - * - * @see [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} - * - * @param {string} filter The new filter. - * @param {SetSinkFilterCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const sink = logging.sink('my-sink'); - * - * const filter = 'metadata.severity = ALERT'; - * - * sink.setFilter(filter, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * sink.setFilter(filter).then(function(data) { - * const apiResponse = data[0]; - * }); - */ -Sink.prototype.setFilter = function(filter, callback) { - this.setMetadata( - { - filter: filter, - }, - callback - ); -}; - -/** - * @typedef {array} SetSinkMetadataResponse - * @property {object} 0 The full API response. - */ -/** - * @callback SetSinkMetadataCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ -/** - * Set the sink's metadata. - * - * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} - * @see [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update} - * - * @param {object} metadata See a - * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). - * @param {object} [metadata.gaxOptions] Request configuration options, - * outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {SetSinkMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * const Logging = require('@google-cloud/logging'); - * const logging = new Logging(); - * const sink = logging.sink('my-sink'); - * - * const metadata = { - * filter: 'metadata.severity = ALERT' - * }; - * - * sink.setMetadata(metadata, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * sink.setMetadata(metadata).then(function(data) { - * const apiResponse = data[0]; - * }); - * - * @example include:samples/sinks.js - * region_tag:logging_update_sink - * Another example: - */ -Sink.prototype.setMetadata = function(metadata, callback) { - const self = this; - - callback = callback || common.util.noop; + const reqOpts = { + sinkName: this.formattedName_, + }; + this.logging.request( + { + client: 'ConfigServiceV2Client', + method: 'deleteSink', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + callback + ); + } - this.getMetadata(function(err, currentMetadata, apiResponse) { - if (err) { - callback(err, apiResponse); - return; + /** + * @typedef {array} GetSinkMetadataResponse + * @property {object} 0 The {@link Sink} metadata. + * @property {object} 1 The full API response. + */ + /** + * @callback GetSinkMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The {@link Sink} metadata. + * @param {object} apiResponse The full API response. + */ + /** + * Get the sink's metadata. + * + * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} + * @see [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get} + * + * @param {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @param {GetSinkMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); + * + * sink.getMetadata(function(err, metadata, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.getMetadata().then(function(data) { + * const metadata = data[0]; + * const apiResponse = data[1]; + * }); + * + * @example include:samples/sinks.js + * region_tag:logging_get_sink + * Another example: + */ + getMetadata(gaxOptions, callback) { + const self = this; + if (is.fn(gaxOptions)) { + callback = gaxOptions; + gaxOptions = {}; } - const reqOpts = { - sinkName: self.formattedName_, - sink: extend({}, currentMetadata, metadata), + sinkName: this.formattedName_, }; - - delete reqOpts.sink.gaxOptions; - - self.logging.request( + this.logging.request( { client: 'ConfigServiceV2Client', - method: 'updateSink', + method: 'getSink', reqOpts: reqOpts, - gaxOpts: metadata.gaxOptions, + gaxOpts: gaxOptions, }, function() { if (arguments[1]) { self.metadata = arguments[1]; } - callback.apply(null, arguments); } ); - }); -}; + } + + /** + * @typedef {array} SetSinkFilterResponse + * @property {object} 0 The full API response. + */ + /** + * @callback SetSinkFilterCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Set the sink's filter. + * + * This will override any filter that was previously set. + * + * @see [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} + * + * @param {string} filter The new filter. + * @param {SetSinkFilterCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); + * + * const filter = 'metadata.severity = ALERT'; + * + * sink.setFilter(filter, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.setFilter(filter).then(function(data) { + * const apiResponse = data[0]; + * }); + */ + setFilter(filter, callback) { + this.setMetadata( + { + filter: filter, + }, + callback + ); + } + + /** + * @typedef {array} SetSinkMetadataResponse + * @property {object} 0 The full API response. + */ + /** + * @callback SetSinkMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Set the sink's metadata. + * + * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} + * @see [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update} + * + * @param {object} metadata See a + * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). + * @param {object} [metadata.gaxOptions] Request configuration options, + * outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @param {SetSinkMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const sink = logging.sink('my-sink'); + * + * const metadata = { + * filter: 'metadata.severity = ALERT' + * }; + * + * sink.setMetadata(metadata, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * sink.setMetadata(metadata).then(function(data) { + * const apiResponse = data[0]; + * }); + * + * @example include:samples/sinks.js + * region_tag:logging_update_sink + * Another example: + */ + setMetadata(metadata, callback) { + const self = this; + callback = callback || common.util.noop; + this.getMetadata(function(err, currentMetadata, apiResponse) { + if (err) { + callback(err, apiResponse); + return; + } + const reqOpts = { + sinkName: self.formattedName_, + sink: extend({}, currentMetadata, metadata), + }; + delete reqOpts.sink.gaxOptions; + self.logging.request( + { + client: 'ConfigServiceV2Client', + method: 'updateSink', + reqOpts: reqOpts, + gaxOpts: metadata.gaxOptions, + }, + function() { + if (arguments[1]) { + self.metadata = arguments[1]; + } + callback.apply(null, arguments); + } + ); + }); + } +} /*! Developer Documentation * @@ -361,4 +351,4 @@ promisifyAll(Sink); * @name module:@google-cloud/logging.Sink * @see Sink */ -module.exports = Sink; +module.exports.Sink = Sink; diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 12d492404b0..119dafb64a4 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -253,7 +253,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -345,7 +345,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -396,7 +396,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -469,7 +469,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -566,7 +566,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -623,7 +623,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -687,7 +687,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -779,7 +779,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -830,7 +830,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -890,7 +890,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -963,7 +963,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -1020,7 +1020,7 @@ class ConfigServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 02c7b8ef3f7..e203b5dfb2a 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -267,7 +267,7 @@ class LoggingServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -379,7 +379,7 @@ class LoggingServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -474,7 +474,7 @@ class LoggingServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -590,7 +590,7 @@ class LoggingServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -651,7 +651,7 @@ class LoggingServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -736,7 +736,7 @@ class LoggingServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -804,7 +804,7 @@ class LoggingServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -896,7 +896,7 @@ class LoggingServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index bf16ce18afd..4086901e65b 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -242,7 +242,7 @@ class MetricsServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -331,7 +331,7 @@ class MetricsServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -377,7 +377,7 @@ class MetricsServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -432,7 +432,7 @@ class MetricsServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -493,7 +493,7 @@ class MetricsServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -543,7 +543,7 @@ class MetricsServiceV2Client { * * @example * - * const logging = require('@google-cloud/logging'); + * const {Logging} = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 4747ef7a958..bc83384f6c8 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -18,24 +18,23 @@ const assert = require('assert'); const async = require('async'); -const bigqueryLibrary = require('@google-cloud/bigquery'); +const BigQuery = require('@google-cloud/bigquery'); const exec = require('methmeth'); const extend = require('extend'); const is = require('is'); -const prop = require('propprop'); -const pubsubLibrary = require('@google-cloud/pubsub'); +const PubSub = require('@google-cloud/pubsub'); const {Storage} = require('@google-cloud/storage'); const uuid = require('uuid'); -const Logging = require('../'); +const {Logging} = require('../'); describe('Logging', function() { let PROJECT_ID; const TESTS_PREFIX = 'gcloud-logging-test'; const WRITE_CONSISTENCY_DELAY_MS = 10000; - const bigQuery = bigqueryLibrary(); - const pubsub = pubsubLibrary(); + const bigQuery = new BigQuery(); + const pubsub = new PubSub(); const storage = new Storage(); const logging = new Logging(); @@ -393,7 +392,7 @@ describe('Logging', function() { function(err, entries) { assert.ifError(err); - assert.deepStrictEqual(entries.map(prop('data')).reverse(), [ + assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ 'log entry 1', { delegate: 'my_username', @@ -436,7 +435,7 @@ describe('Logging', function() { }, function(err, entries) { assert.ifError(err); - assert.deepStrictEqual(entries.map(prop('data')), [ + assert.deepStrictEqual(entries.map(x => x.data), [ '3', '2', '1', @@ -465,7 +464,7 @@ describe('Logging', function() { function(err, entries) { assert.ifError(err); assert.deepStrictEqual( - entries.reverse().map(prop('data')), + entries.reverse().map(x => x.data), messages ); done(); diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 06045232177..31772d27e5f 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -43,7 +43,7 @@ describe('Entry', function() { Service: FakeGrpcService, }, eventid: FakeEventId, - }); + }).Entry; }); beforeEach(function() { diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 8250fff3cc0..8e5abfe9b11 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -22,9 +22,7 @@ const extend = require('extend'); const proxyquire = require('proxyquire'); const through = require('through2'); const {util} = require('@google-cloud/common-grpc'); - -const v2 = require('../src/v2'); - +const {v2} = require('../src'); const PKG = require('../package.json'); let extended = false; @@ -120,20 +118,18 @@ describe('Logging', function() { 'google-auth-library': { GoogleAuth: fakeGoogleAuth, }, - './log.js': FakeLog, - './entry.js': FakeEntry, - './sink.js': FakeSink, + './log': {Log: FakeLog}, + './entry': {Entry: FakeEntry}, + './sink': {Sink: FakeSink}, './v2': fakeV2, - }); + }).Logging; }); beforeEach(function() { extend(fakeUtil, originalFakeUtil); - googleAuthOverride = null; isCustomTypeOverride = null; replaceProjectIdTokenOverride = null; - logging = new Logging({ projectId: PROJECT_ID, }); @@ -163,12 +159,6 @@ describe('Logging', function() { assert(promisifed); }); - it('should work without new', function() { - assert.doesNotThrow(function() { - Logging({projectId: PROJECT_ID}); - }); - }); - it('should initialize the API object', function() { assert.deepStrictEqual(logging.api, {}); }); @@ -879,16 +869,12 @@ describe('Logging', function() { const fakeClient = { [CONFIG.method]: util.noop, }; - fakeV2[CONFIG.client] = function(options) { assert.strictEqual(options, logging.options); return fakeClient; }; - logging.api = {}; - logging.request(CONFIG, assert.ifError); - assert.strictEqual(logging.api[CONFIG.client], fakeClient); }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index e3f31982920..12f7f819bc5 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -34,7 +34,7 @@ const fakePromisify = extend({}, promisify, { }, }); -const Entry = require('../src/entry.js'); +const {Entry} = require('../src'); function FakeMetadata() { this.calledWith_ = arguments; @@ -59,11 +59,11 @@ describe('Log', function() { let assignSeverityToEntriesOverride = null; before(function() { - Log = proxyquire('../src/log.js', { + Log = proxyquire('../src/log', { '@google-cloud/promisify': fakePromisify, - './entry.js': Entry, - './metadata.js': FakeMetadata, - }); + './entry': {Entry: Entry}, + './metadata': {Metadata: FakeMetadata}, + }).Log; const assignSeverityToEntries_ = Log.assignSeverityToEntries_; Log.assignSeverityToEntries_ = function() { return ( diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index f8526c62495..ad0ebc10a2a 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -67,10 +67,10 @@ describe('metadata', function() { const ENV_CACHED = extend({}, process.env); before(function() { - Metadata = proxyquire('../src/metadata.js', { + Metadata = proxyquire('../src/metadata', { 'gcp-metadata': fakeGcpMetadata, fs: fakeFS, - }); + }).Metadata; MetadataCached = extend({}, Metadata); }); diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index 1d60e592845..aa83810c800 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -42,9 +42,9 @@ describe('Sink', function() { const SINK_NAME = 'sink-name'; before(function() { - Sink = proxyquire('../src/sink.js', { + Sink = proxyquire('../src/sink', { '@google-cloud/promisify': fakePromisify, - }); + }).Sink; }); beforeEach(function() { From 976ed71091c7f47f9554a425e6b71408e8b219e1 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 14 Sep 2018 17:06:32 -0700 Subject: [PATCH 0230/1029] fix(gce): instance id can be a big number (#222) Pick up latest gcp-metadata that changes the return value on instance queries. In addition this version of gcp-metadata fixes silent integer precision loss when the instance id is too big a number. --- handwritten/logging/package.json | 3 +- handwritten/logging/src/metadata.js | 8 +++-- handwritten/logging/test/metadata.js | 50 +++++++++++++++++++++++----- 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 834b76cb053..314c2984bf9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -70,7 +70,7 @@ "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", - "gcp-metadata": "^0.7.0", + "gcp-metadata": "^0.8.0", "google-auth-library": "^2.0.0", "google-gax": "^0.20.0", "google-proto-files": "^0.16.1", @@ -88,6 +88,7 @@ "@google-cloud/pubsub": "0.20.0", "@google-cloud/storage": "^2.0.2", "async": "^2.6.1", + "bignumber.js": "^7.2.1", "codecov": "^3.0.4", "eslint": "^5.4.0", "eslint-config-prettier": "^3.0.1", diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 935f374c3c7..917ce6e3580 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -104,11 +104,13 @@ class Metadata { // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging // wants just the zone part. // - const zone = zoneResponse.data.split('/').pop(); + const zone = zoneResponse.split('/').pop(); callback(null, { type: 'gce_instance', labels: { - instance_id: idResponse.data, + // idResponse can be BigNumber when the id too large for JavaScript + // numbers. Use a toString() to uniformly convert to a string. + instance_id: idResponse.toString(), zone: zone, }, }); @@ -147,7 +149,7 @@ class Metadata { callback(null, { type: 'container', labels: { - cluster_name: resp.data, + cluster_name: resp, namespace_id: namespace, }, }); diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index ad0ebc10a2a..ef7e587ebb1 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -17,6 +17,7 @@ 'use strict'; const assert = require('assert'); +const BigNumber = require('bignumber.js'); const extend = require('extend'); const proxyquire = require('proxyquire'); @@ -150,7 +151,7 @@ describe('metadata', function() { it('should return the correct descriptor', function(done) { instanceOverride = { path: 'attributes/cluster-name', - successArg: {data: CLUSTER_NAME}, + successArg: CLUSTER_NAME, }; Metadata.getGKEDescriptor(function(err, descriptor) { @@ -197,11 +198,11 @@ describe('metadata', function() { instanceOverride = [ { path: 'id', - successArg: {data: INSTANCE_ID}, + successArg: INSTANCE_ID, }, { path: 'zone', - successArg: {data: ZONE_FULL}, + successArg: ZONE_FULL, }, ]; @@ -291,17 +292,17 @@ describe('metadata', function() { describe('compute engine', function() { it('should return correct descriptor', function(done) { - const INSTANCE_ID = 'overridden-value'; + const INSTANCE_ID = 1234567; const ZONE_ID = 'cyrodiil-anvil-2'; const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; instanceOverride = [ { path: 'id', - successArg: {data: INSTANCE_ID}, + successArg: INSTANCE_ID, }, { path: 'zone', - successArg: {data: ZONE_FULL}, + successArg: ZONE_FULL, }, ]; @@ -314,7 +315,40 @@ describe('metadata', function() { assert.deepStrictEqual(defaultResource, { type: 'gce_instance', labels: { - instance_id: INSTANCE_ID, + instance_id: INSTANCE_ID.toString(), + zone: ZONE_ID, + }, + }); + done(); + }); + }); + + it('should deal with instance id being a BigNumber', done => { + const INSTANCE_ID_STRING = `3279739563200103600`; + const INSTANCE_ID = new BigNumber(INSTANCE_ID_STRING); + const ZONE_ID = 'cyrodiil-anvil-2'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + instanceOverride = [ + { + path: 'id', + successArg: INSTANCE_ID, + }, + { + path: 'zone', + successArg: ZONE_FULL, + }, + ]; + + metadata.logging.auth.getEnv = function() { + return Promise.resolve('COMPUTE_ENGINE'); + }; + + metadata.getDefaultResource(function(err, defaultResource) { + assert.ifError(err); + assert.deepStrictEqual(defaultResource, { + type: 'gce_instance', + labels: { + instance_id: INSTANCE_ID_STRING, zone: ZONE_ID, }, }); @@ -328,7 +362,7 @@ describe('metadata', function() { const CLUSTER_NAME = 'overridden-value'; instanceOverride = { path: 'attributes/cluster-name', - successArg: {data: CLUSTER_NAME}, + successArg: CLUSTER_NAME, }; metadata.logging.auth.getEnv = function() { From 74402d9261052f308bd5e3a67ccb44c8538036d6 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 14 Sep 2018 17:35:11 -0700 Subject: [PATCH 0231/1029] Release v3.0.3 (#223) --- handwritten/logging/CHANGELOG.md | 17 +++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index dcfe8b42873..268d4ce4605 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,23 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v3.0.3 + +### Implementation Changes +- fix(gce): instance id can be a big number ([#222](https://github.com/googleapis/nodejs-logging/pull/222)) +- fix(deps): update dependency google-gax to ^0.20.0 ([#220](https://github.com/googleapis/nodejs-logging/pull/220)) +- fix(GCE): add zone label in GCE descriptor ([#215](https://github.com/googleapis/nodejs-logging/pull/215)) +- fix(deps): update dependency google-auth-library to v2 ([#210](https://github.com/googleapis/nodejs-logging/pull/210)) + +### Internal / Testing Changes +- Use es classes ([#219](https://github.com/googleapis/nodejs-logging/pull/219)) +- Switch to let/const ([#221](https://github.com/googleapis/nodejs-logging/pull/221)) +- Use let and const ([#217](https://github.com/googleapis/nodejs-logging/pull/217)) +- Update CI config ([#218](https://github.com/googleapis/nodejs-logging/pull/218)) +- fix(deps): update dependency @google-cloud/storage to v2 ([#213](https://github.com/googleapis/nodejs-logging/pull/213)) +- Retry npm install in CI ([#214](https://github.com/googleapis/nodejs-logging/pull/214)) +- add templates to synth.py and run it ([#211](https://github.com/googleapis/nodejs-logging/pull/211)) + ## v3.0.2 This release contains a variety of minor internal changes. diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 314c2984bf9..7b1bc913542 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "3.0.2", + "version": "3.0.3", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From b1d78eab795fc386fb4707ef30c3d81c8bb5d1d7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 17 Sep 2018 09:47:48 -0700 Subject: [PATCH 0232/1029] Use arrow functions (#227) --- handwritten/logging/src/entry.js | 4 +- handwritten/logging/src/index.js | 50 +-- handwritten/logging/src/log.js | 61 ++-- handwritten/logging/src/metadata.js | 6 +- handwritten/logging/src/sink.js | 22 +- handwritten/logging/system-test/logging.js | 162 +++++---- handwritten/logging/test/entry.js | 54 +-- handwritten/logging/test/index.js | 396 ++++++++++----------- handwritten/logging/test/log.js | 278 +++++++-------- handwritten/logging/test/metadata.js | 112 +++--- 10 files changed, 538 insertions(+), 607 deletions(-) diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 2dfcfec0caa..1fe0880da83 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -64,7 +64,7 @@ const eventId = new EventId(); * delegate: 'my_username' * }); * - * syslog.alert(entry, function(err, apiResponse) { + * syslog.alert(entry, (err, apiResponse) => { * if (!err) { * // Log entry inserted successfully. * } @@ -74,7 +74,7 @@ const eventId = new EventId(); * // You will also receive `Entry` objects when using * // Logging#getEntries() and Log#getEntries(). * //- - * logging.getEntries(function(err, entries) { + * logging.getEntries((err, entries) => { * if (!err) { * // entries[0].data = The data value from the log entry. * } diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index 6f6bb793baf..da73649762d 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -202,7 +202,7 @@ class Logging { * //- * // If the callback is omitted, we'll return a Promise. * //- - * logging.createSink('new-sink-name', config).then(function(data) { + * logging.createSink('new-sink-name', config).then(data => { * const sink = data[0]; * const apiResponse = data[1]; * }); @@ -244,7 +244,7 @@ class Logging { reqOpts: reqOpts, gaxOpts: config.gaxOptions, }, - function(err, resp) { + (err, resp) => { if (err) { callback(err, null, resp); return; @@ -350,7 +350,7 @@ class Logging { * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * - * logging.getEntries(function(err, entries) { + * logging.getEntries((err, entries) => { * // `entries` is an array of Stackdriver Logging entry objects. * // See the `data` property to read the data from the entry. * }); @@ -373,7 +373,7 @@ class Logging { * //- * // If the callback is omitted, we'll return a Promise. * //- - * logging.getEntries().then(function(data) { + * logging.getEntries().then(data => { * const entries = data[0]; * }); * @@ -441,7 +441,7 @@ class Logging { * * logging.getEntriesStream() * .on('error', console.error) - * .on('data', function(entry) { + * .on('data', entry => { * // `entry` is a Stackdriver Logging entry object. * // See the `data` property to read the data from the entry. * }) @@ -463,15 +463,15 @@ class Logging { options = options || {}; let requestStream; const userStream = streamEvents(pumpify.obj()); - userStream.abort = function() { + userStream.abort = () => { if (requestStream) { requestStream.abort(); } }; - const toEntryStream = through.obj(function(entry, _, next) { + const toEntryStream = through.obj((entry, _, next) => { next(null, Entry.fromApiResponse_(entry)); }); - userStream.once('reading', function() { + userStream.once('reading', () => { const reqOpts = extend( { orderBy: 'timestamp desc', @@ -537,14 +537,14 @@ class Logging { * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * - * logging.getSinks(function(err, sinks) { + * logging.getSinks((err, sinks) => { * // sinks is an array of Sink objects. * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * logging.getSinks().then(function(data) { + * logging.getSinks().then(data => { * const sinks = data[0]; * }); * @@ -579,7 +579,7 @@ class Logging { function() { const sinks = arguments[1]; if (sinks) { - arguments[1] = sinks.map(function(sink) { + arguments[1] = sinks.map(sink => { const sinkInstance = self.sink(sink.name); sinkInstance.metadata = sink; return sinkInstance; @@ -605,7 +605,7 @@ class Logging { * * logging.getSinksStream() * .on('error', console.error) - * .on('data', function(sink) { + * .on('data', sink => { * // `sink` is a Sink object. * }) * .on('end', function() { @@ -626,17 +626,17 @@ class Logging { options = options || {}; let requestStream; const userStream = streamEvents(pumpify.obj()); - userStream.abort = function() { + userStream.abort = () => { if (requestStream) { requestStream.abort(); } }; - const toSinkStream = through.obj(function(sink, _, next) { + const toSinkStream = through.obj((sink, _, next) => { const sinkInstance = self.sink(sink.name); sinkInstance.metadata = sink; next(null, sinkInstance); }); - userStream.once('reading', function() { + userStream.once('reading', () => { const reqOpts = extend({}, options, { parent: 'projects/' + self.projectId, }); @@ -711,7 +711,7 @@ class Logging { let stream; if (isStreamMode) { stream = streamEvents(through.obj()); - stream.abort = function() { + stream.abort = () => { if (gaxStream && gaxStream.cancel) { gaxStream.cancel(); } @@ -721,7 +721,7 @@ class Logging { makeRequestCallback(); } function prepareGaxRequest(callback) { - self.auth.getProjectId(function(err, projectId) { + self.auth.getProjectId((err, projectId) => { if (err) { callback(err); return; @@ -747,7 +747,7 @@ class Logging { if (global.GCLOUD_SANDBOX_ENV) { return; } - prepareGaxRequest(function(err, requestFn) { + prepareGaxRequest((err, requestFn) => { if (err) { callback(err); return; @@ -759,14 +759,14 @@ class Logging { if (global.GCLOUD_SANDBOX_ENV) { return through.obj(); } - prepareGaxRequest(function(err, requestFn) { + prepareGaxRequest((err, requestFn) => { if (err) { stream.destroy(err); return; } gaxStream = requestFn(); gaxStream - .on('error', function(err) { + .on('error', err => { stream.destroy(err); }) .pipe(stream); @@ -786,7 +786,7 @@ class Logging { setAclForBucket_(name, config, callback) { const self = this; const bucket = config.destination; - bucket.acl.owners.addGroup('cloud-logs@google.com', function(err, apiResp) { + bucket.acl.owners.addGroup('cloud-logs@google.com', (err, apiResp) => { if (err) { callback(err, null, apiResp); return; @@ -808,7 +808,7 @@ class Logging { setAclForDataset_(name, config, callback) { const self = this; const dataset = config.destination; - dataset.getMetadata(function(err, metadata, apiResp) { + dataset.getMetadata((err, metadata, apiResp) => { if (err) { callback(err, null, apiResp); return; @@ -822,7 +822,7 @@ class Logging { { access: access, }, - function(err, apiResp) { + (err, apiResp) => { if (err) { callback(err, null, apiResp); return; @@ -848,7 +848,7 @@ class Logging { setAclForTopic_(name, config, callback) { const self = this; const topic = config.destination; - topic.iam.getPolicy(function(err, policy, apiResp) { + topic.iam.getPolicy((err, policy, apiResp) => { if (err) { callback(err, null, apiResp); return; @@ -858,7 +858,7 @@ class Logging { role: 'roles/pubsub.publisher', members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], }); - topic.iam.setPolicy(policy, function(err, policy, apiResp) { + topic.iam.setPolicy(policy, (err, policy, apiResp) => { if (err) { callback(err, null, apiResp); return; diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 5117dba7908..7e995506809 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -80,12 +80,12 @@ class Log { * instance: 'my_instance' * }); * - * log.alert(entry, function(err, apiResponse) {}); + * log.alert(entry, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.alert(entry).then(function(data) { + * log.alert(entry).then(data => { * const apiResponse = data[0]; * }); */ @@ -112,12 +112,12 @@ class Log { * instance: 'my_instance' * }); * - * log.critical(entry, function(err, apiResponse) {}); + * log.critical(entry, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.critical(entry).then(function(data) { + * log.critical(entry).then(data => { * const apiResponse = data[0]; * }); */ @@ -145,12 +145,12 @@ class Log { * instance: 'my_instance' * }); * - * log.debug(entry, function(err, apiResponse) {}); + * log.debug(entry, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.debug(entry).then(function(data) { + * log.debug(entry).then(data => { * const apiResponse = data[0]; * }); */ @@ -182,7 +182,7 @@ class Log { * const logging = new Logging(); * const log = logging.log('my-log'); * - * log.delete(function(err, apiResponse) { + * log.delete((err, apiResponse) => { * if (!err) { * // The log was deleted. * } @@ -191,7 +191,7 @@ class Log { * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.delete().then(function(data) { + * log.delete().then(data => { * const apiResponse = data[0]; * }); * @@ -237,12 +237,12 @@ class Log { * instance: 'my_instance' * }); * - * log.emergency(entry, function(err, apiResponse) {}); + * log.emergency(entry, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.emergency(entry).then(function(data) { + * log.emergency(entry).then(data => { * const apiResponse = data[0]; * }); */ @@ -327,12 +327,12 @@ class Log { * instance: 'my_instance' * }); * - * log.error(entry, function(err, apiResponse) {}); + * log.error(entry, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.error(entry).then(function(data) { + * log.error(entry).then(data => { * const apiResponse = data[0]; * }); */ @@ -355,7 +355,7 @@ class Log { * const logging = new Logging(); * const log = logging.log('my-log'); * - * log.getEntries(function(err, entries) { + * log.getEntries((err, entries) => { * // `entries` is an array of Stackdriver Logging entry objects. * // See the `data` property to read the data from the entry. * }); @@ -378,7 +378,7 @@ class Log { * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.getEntries().then(function(data) { + * log.getEntries().then(data => { * const entries = data[0]; * }); */ @@ -412,7 +412,7 @@ class Log { * * log.getEntriesStream() * .on('error', console.error) - * .on('data', function(entry) { + * .on('data', entry => { * // `entry` is a Stackdriver Logging entry object. * // See the `data` property to read the data from the entry. * }) @@ -458,12 +458,12 @@ class Log { * instance: 'my_instance' * }); * - * log.info(entry, function(err, apiResponse) {}); + * log.info(entry, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.info(entry).then(function(data) { + * log.info(entry).then(data => { * const apiResponse = data[0]; * }); */ @@ -490,12 +490,12 @@ class Log { * instance: 'my_instance' * }); * - * log.notice(entry, function(err, apiResponse) {}); + * log.notice(entry, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.notice(entry).then(function(data) { + * log.notice(entry).then(data => { * const apiResponse = data[0]; * }); */ @@ -526,12 +526,12 @@ class Log { * instance: 'my_instance' * }); * - * log.warning(entry, function(err, apiResponse) {}); + * log.warning(entry, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.warning(entry).then(function(data) { + * log.warning(entry).then(data => { * const apiResponse = data[0]; * }); */ @@ -577,7 +577,7 @@ class Log { * instance: 'my_instance' * }); * - * log.write(entry, function(err, apiResponse) { + * log.write(entry, (err, apiResponse) => { * if (!err) { * // The log entry was written. * } @@ -593,7 +593,7 @@ class Log { * log.write([ * entry, * secondEntry - * ], function(err, apiResponse) { + * ], (err, apiResponse) => { * if (!err) { * // The log entries were written. * } @@ -617,12 +617,12 @@ class Log { * resource: 'compute.googleapis.com' * }; * - * log.write(entries, options, function(err, apiResponse) {}); + * log.write(entries, options, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * log.write(entries).then(function(data) { + * log.write(entries).then(data => { * const apiResponse = data[0]; * }); * @@ -641,7 +641,7 @@ class Log { options = {}; } if (!options.resource) { - this.metadata_.getDefaultResource(function(err, resource) { + this.metadata_.getDefaultResource((err, resource) => { // Ignore errors (the API will speak up if it has an issue). writeWithResource(resource); }); @@ -689,13 +689,12 @@ class Log { * @throws if there is an error during serialization. */ decorateEntries_(entries) { - const self = this; - return entries.map(function(entry) { + return entries.map(entry => { if (!(entry instanceof Entry)) { - entry = self.entry(entry); + entry = this.entry(entry); } return entry.toJSON({ - removeCircular: self.removeCircular_, + removeCircular: this.removeCircular_, }); }); } @@ -709,7 +708,7 @@ class Log { * @param {string} severity - The desired severity level. */ static assignSeverityToEntries_(entries, severity) { - return arrify(entries).map(function(entry) { + return arrify(entries).map(entry => { const metadata = extend(true, {}, entry.metadata, { severity: severity, }); diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 917ce6e3580..1535f1fc8cc 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -98,8 +98,8 @@ class Metadata { * @return {object} */ static getGCEDescriptor(callback) { - gcpMetadata.instance('id').then(function(idResponse) { - gcpMetadata.instance('zone').then(function(zoneResponse) { + gcpMetadata.instance('id').then(idResponse => { + gcpMetadata.instance('zone').then(zoneResponse => { // Some parsing is necessary. Metadata service returns a fully // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging // wants just the zone part. @@ -132,7 +132,7 @@ class Metadata { // namespace_name in place of namespace_id for a while now. Log correlation // with metrics may not necessarily work however. // - gcpMetadata.instance('attributes/cluster-name').then(function(resp) { + gcpMetadata.instance('attributes/cluster-name').then(resp => { fs.readFile( Metadata.KUBERNETES_NAMESPACE_ID_PATH, 'utf8', diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index cdae34dbbc1..b71566b364b 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -71,7 +71,7 @@ class Sink { * } * }; * - * sink.create(config, function(err, sink, apiResponse) { + * sink.create(config, (err, sink, apiResponse) => { * if (!err) { * // The sink was created successfully. * } @@ -80,7 +80,7 @@ class Sink { * //- * // If the callback is omitted, we'll return a Promise. * //- - * sink.create(config).then(function(data) { + * sink.create(config).then(data => { * const sink = data[0]; * const apiResponse = data[1]; * }); @@ -117,7 +117,7 @@ class Sink { * const logging = new Logging(); * const sink = logging.sink('my-sink'); * - * sink.delete(function(err, apiResponse) { + * sink.delete((err, apiResponse) => { * if (!err) { * // The log was deleted. * } @@ -126,7 +126,7 @@ class Sink { * //- * // If the callback is omitted, we'll return a Promise. * //- - * sink.delete().then(function(data) { + * sink.delete().then(data => { * const apiResponse = data[0]; * }); * @@ -180,12 +180,12 @@ class Sink { * const logging = new Logging(); * const sink = logging.sink('my-sink'); * - * sink.getMetadata(function(err, metadata, apiResponse) {}); + * sink.getMetadata((err, metadata, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * sink.getMetadata().then(function(data) { + * sink.getMetadata().then(data => { * const metadata = data[0]; * const apiResponse = data[1]; * }); @@ -246,12 +246,12 @@ class Sink { * * const filter = 'metadata.severity = ALERT'; * - * sink.setFilter(filter, function(err, apiResponse) {}); + * sink.setFilter(filter, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * sink.setFilter(filter).then(function(data) { + * sink.setFilter(filter).then(data => { * const apiResponse = data[0]; * }); */ @@ -295,12 +295,12 @@ class Sink { * filter: 'metadata.severity = ALERT' * }; * - * sink.setMetadata(metadata, function(err, apiResponse) {}); + * sink.setMetadata(metadata, (err, apiResponse) => {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * sink.setMetadata(metadata).then(function(data) { + * sink.setMetadata(metadata).then(data => { * const apiResponse = data[0]; * }); * @@ -311,7 +311,7 @@ class Sink { setMetadata(metadata, callback) { const self = this; callback = callback || common.util.noop; - this.getMetadata(function(err, currentMetadata, apiResponse) { + this.getMetadata((err, currentMetadata, apiResponse) => { if (err) { callback(err, apiResponse); return; diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index bc83384f6c8..49872a464aa 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -28,7 +28,7 @@ const uuid = require('uuid'); const {Logging} = require('../'); -describe('Logging', function() { +describe('Logging', () => { let PROJECT_ID; const TESTS_PREFIX = 'gcloud-logging-test'; const WRITE_CONSISTENCY_DELAY_MS = 10000; @@ -44,7 +44,7 @@ describe('Logging', function() { const dataset = bigQuery.dataset(generateName().replace(/-/g, '_')); const topic = pubsub.topic(generateName()); - before(function(done) { + before(done => { async.parallel( [ callback => { @@ -71,7 +71,7 @@ describe('Logging', function() { ); }); - after(function(done) { + after(done => { async.parallel( [deleteBuckets, deleteDatasets, deleteTopics, deleteSinks], done @@ -82,14 +82,14 @@ describe('Logging', function() { { prefix: TESTS_PREFIX, }, - function(err, buckets) { + (err, buckets) => { if (err) { done(err); return; } function deleteBucket(bucket, callback) { - bucket.deleteFiles(function(err) { + bucket.deleteFiles(err => { if (err) { callback(err); return; @@ -117,13 +117,13 @@ describe('Logging', function() { } function getAndDelete(method, callback) { - method(function(err, objects) { + method((err, objects) => { if (err) { callback(err); return; } - objects = objects.filter(function(object) { + objects = objects.filter(object => { return (object.name || object.id).indexOf(TESTS_PREFIX) === 0; }); @@ -132,15 +132,15 @@ describe('Logging', function() { } }); - describe('sinks', function() { - it('should create a sink with a Bucket destination', function(done) { + describe('sinks', () => { + it('should create a sink with a Bucket destination', done => { const sink = logging.sink(generateName()); sink.create( { destination: bucket, }, - function(err, sink, apiResponse) { + (err, sink, apiResponse) => { assert.ifError(err); const destination = 'storage.googleapis.com/' + bucket.name; @@ -151,14 +151,14 @@ describe('Logging', function() { ); }); - it('should create a sink with a Dataset destination', function(done) { + it('should create a sink with a Dataset destination', done => { const sink = logging.sink(generateName()); sink.create( { destination: dataset, }, - function(err, sink, apiResponse) { + (err, sink, apiResponse) => { assert.ifError(err); const destination = 'bigquery.googleapis.com/datasets/' + dataset.id; @@ -177,14 +177,14 @@ describe('Logging', function() { ); }); - it('should create a sink with a Topic destination', function(done) { + it('should create a sink with a Topic destination', done => { const sink = logging.sink(generateName()); sink.create( { destination: topic, }, - function(err, sink, apiResponse) { + (err, sink, apiResponse) => { assert.ifError(err); const destination = 'pubsub.googleapis.com/' + topic.name; @@ -201,11 +201,11 @@ describe('Logging', function() { ); }); - describe('metadata', function() { + describe('metadata', () => { const sink = logging.sink(generateName()); const FILTER = 'severity = ALERT'; - before(function(done) { + before(done => { sink.create( { destination: topic, @@ -214,20 +214,20 @@ describe('Logging', function() { ); }); - it('should set metadata', function(done) { + it('should set metadata', done => { const metadata = { filter: FILTER, }; - sink.setMetadata(metadata, function(err, apiResponse) { + sink.setMetadata(metadata, (err, apiResponse) => { assert.ifError(err); assert.strictEqual(apiResponse.filter, FILTER); done(); }); }); - it('should set a filter', function(done) { - sink.setFilter(FILTER, function(err, apiResponse) { + it('should set a filter', done => { + sink.setFilter(FILTER, (err, apiResponse) => { assert.ifError(err); assert.strictEqual(apiResponse.filter, FILTER); done(); @@ -235,10 +235,10 @@ describe('Logging', function() { }); }); - describe('listing sinks', function() { + describe('listing sinks', () => { const sink = logging.sink(generateName()); - before(function(done) { + before(done => { sink.create( { destination: topic, @@ -247,30 +247,30 @@ describe('Logging', function() { ); }); - it('should list sinks', function(done) { - logging.getSinks(function(err, sinks) { + it('should list sinks', done => { + logging.getSinks((err, sinks) => { assert.ifError(err); assert(sinks.length > 0); done(); }); }); - it('should list sinks as a stream', function(done) { - logging + it('should list sinks as a stream', done => { + const logstream = logging .getSinksStream({pageSize: 1}) .on('error', done) - .once('data', function() { - this.end(); + .once('data', () => { + logstream.end(); done(); }); }); - it('should get metadata', function(done) { + it('should get metadata', done => { logging .getSinksStream({pageSize: 1}) .on('error', done) - .once('data', function(sink) { - sink.getMetadata(function(err, metadata) { + .once('data', sink => { + sink.getMetadata((err, metadata) => { assert.ifError(err); assert.strictEqual(is.object(metadata), true); done(); @@ -280,7 +280,7 @@ describe('Logging', function() { }); }); - describe('logs', function() { + describe('logs', () => { const log = logging.log('syslog'); const logEntries = [ @@ -315,13 +315,13 @@ describe('Logging', function() { }, }; - it('should list log entries', function(done) { + it('should list log entries', done => { logging.getEntries( { autoPaginate: false, pageSize: 1, }, - function(err, entries) { + (err, entries) => { assert.ifError(err); assert.strictEqual(entries.length, 1); done(); @@ -329,31 +329,29 @@ describe('Logging', function() { ); }); - it('should list log entries as a stream', function(done) { - logging + it('should list log entries as a stream', done => { + const logstream = logging .getEntriesStream({ autoPaginate: false, pageSize: 1, }) .on('error', done) - .once('data', function() { - this.end(); - }) + .once('data', () => logstream.end()) .on('end', done); }); - describe('log-specific entries', function() { - before(function(done) { + describe('log-specific entries', () => { + before(done => { log.write(logEntries, options, done); }); - it('should list log entries', function(done) { + it('should list log entries', done => { log.getEntries( { autoPaginate: false, pageSize: 1, }, - function(err, entries) { + (err, entries) => { assert.ifError(err); assert.strictEqual(entries.length, 1); done(); @@ -361,35 +359,35 @@ describe('Logging', function() { ); }); - it('should list log entries as a stream', function(done) { - log + it('should list log entries as a stream', done => { + const logstream = log .getEntriesStream({ autoPaginate: false, pageSize: 1, }) .on('error', done) - .once('data', function() { - this.end(); + .once('data', () => { + logstream.end(); done(); }); }); }); - it('should write a single entry to a log', function(done) { + it('should write a single entry to a log', done => { log.write(logEntries[0], options, done); }); - it('should write multiple entries to a log', function(done) { - log.write(logEntries, options, function(err) { + it('should write multiple entries to a log', done => { + log.write(logEntries, options, err => { assert.ifError(err); - setTimeout(function() { + setTimeout(() => { log.getEntries( { autoPaginate: false, pageSize: logEntries.length, }, - function(err, entries) { + (err, entries) => { assert.ifError(err); assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ @@ -416,24 +414,24 @@ describe('Logging', function() { }); }); - it('should preserve order of entries', function(done) { + it('should preserve order of entries', done => { const entry1 = log.entry('1'); - setTimeout(function() { + setTimeout(() => { const entry2 = log.entry('2'); const entry3 = log.entry({timestamp: entry2.metadata.timestamp}, '3'); // Re-arrange to confirm the timestamp is sent and honored. - log.write([entry2, entry3, entry1], options, function(err) { + log.write([entry2, entry3, entry1], options, err => { assert.ifError(err); - setTimeout(function() { + setTimeout(() => { log.getEntries( { autoPaginate: false, pageSize: 3, }, - function(err, entries) { + (err, entries) => { assert.ifError(err); assert.deepStrictEqual(entries.map(x => x.data), [ '3', @@ -448,20 +446,20 @@ describe('Logging', function() { }, 1000); }); - it('should preserve order for sequential write calls', function(done) { + it('should preserve order for sequential write calls', done => { const messages = ['1', '2', '3', '4', '5']; - messages.forEach(function(message) { + messages.forEach(message => { log.write(log.entry(message)); }); - setTimeout(function() { + setTimeout(() => { log.getEntries( { autoPaginate: false, pageSize: messages.length, }, - function(err, entries) { + (err, entries) => { assert.ifError(err); assert.deepStrictEqual( entries.reverse().map(x => x.data), @@ -473,7 +471,7 @@ describe('Logging', function() { }, WRITE_CONSISTENCY_DELAY_MS * 4); }); - it('should write an entry with primitive values', function(done) { + it('should write an entry with primitive values', done => { const logEntry = log.entry({ when: new Date(), matchUser: /username: (.+)/, @@ -481,16 +479,16 @@ describe('Logging', function() { shouldNotBeSaved: undefined, }); - log.write(logEntry, options, function(err) { + log.write(logEntry, options, err => { assert.ifError(err); - setTimeout(function() { + setTimeout(() => { log.getEntries( { autoPaginate: false, pageSize: 1, }, - function(err, entries) { + (err, entries) => { assert.ifError(err); const entry = entries[0]; @@ -508,7 +506,7 @@ describe('Logging', function() { }); }); - it('should write a log with metadata', function(done) { + it('should write a log with metadata', done => { const metadata = extend({}, options, { severity: 'DEBUG', }); @@ -519,16 +517,16 @@ describe('Logging', function() { const logEntry = log.entry(metadata, data); - log.write(logEntry, function(err) { + log.write(logEntry, err => { assert.ifError(err); - setTimeout(function() { + setTimeout(() => { log.getEntries( { autoPaginate: false, pageSize: 1, }, - function(err, entries) { + (err, entries) => { assert.ifError(err); const entry = entries[0]; @@ -543,20 +541,20 @@ describe('Logging', function() { }); }); - it('should set the default resource', function(done) { + it('should set the default resource', done => { const text = 'entry-text'; const entry = log.entry(text); - log.write(entry, function(err) { + log.write(entry, err => { assert.ifError(err); - setTimeout(function() { + setTimeout(() => { log.getEntries( { autoPaginate: false, pageSize: 1, }, - function(err, entries) { + (err, entries) => { assert.ifError(err); const entry = entries[0]; @@ -576,7 +574,7 @@ describe('Logging', function() { }); }); - it('should write a log with camelcase resource label keys', function(done) { + it('should write a log with camelcase resource label keys', done => { log.write( logEntries, { @@ -592,35 +590,35 @@ describe('Logging', function() { ); }); - it('should write to a log with alert helper', function(done) { + it('should write to a log with alert helper', done => { log.alert(logEntries, options, done); }); - it('should write to a log with critical helper', function(done) { + it('should write to a log with critical helper', done => { log.critical(logEntries, options, done); }); - it('should write to a log with debug helper', function(done) { + it('should write to a log with debug helper', done => { log.debug(logEntries, options, done); }); - it('should write to a log with emergency helper', function(done) { + it('should write to a log with emergency helper', done => { log.emergency(logEntries, options, done); }); - it('should write to a log with error helper', function(done) { + it('should write to a log with error helper', done => { log.error(logEntries, options, done); }); - it('should write to a log with info helper', function(done) { + it('should write to a log with info helper', done => { log.info(logEntries, options, done); }); - it('should write to a log with notice helper', function(done) { + it('should write to a log with notice helper', done => { log.notice(logEntries, options, done); }); - it('should write to a log with warning helper', function(done) { + it('should write to a log with warning helper', done => { log.warning(logEntries, options, done); }); }); diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 31772d27e5f..1e88b22635e 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -30,14 +30,14 @@ FakeEventId.prototype.new = function() { return (fakeEventIdNewOverride || util.noop).apply(null, arguments); }; -describe('Entry', function() { +describe('Entry', () => { let Entry; let entry; const METADATA = {}; const DATA = {}; - before(function() { + before(() => { Entry = proxyquire('../src/entry.js', { '@google-cloud/common-grpc': { Service: FakeGrpcService, @@ -46,14 +46,14 @@ describe('Entry', function() { }).Entry; }); - beforeEach(function() { + beforeEach(() => { fakeEventIdNewOverride = null; extend(FakeGrpcService, GrpcService); entry = new Entry(METADATA, DATA); }); - describe('instantiation', function() { - it('should assign timestamp to metadata', function() { + describe('instantiation', () => { + it('should assign timestamp to metadata', () => { const now = new Date(); const expectedTimestampBoundaries = { @@ -65,7 +65,7 @@ describe('Entry', function() { assert(entry.metadata.timestamp <= expectedTimestampBoundaries.end); }); - it('should not assign timestamp if one is already set', function() { + it('should not assign timestamp if one is already set', () => { const timestamp = new Date('2012'); const entry = new Entry({ @@ -75,10 +75,10 @@ describe('Entry', function() { assert.strictEqual(entry.metadata.timestamp, timestamp); }); - it('should assign insertId to metadata', function() { + it('should assign insertId to metadata', () => { const eventId = 'event-id'; - fakeEventIdNewOverride = function() { + fakeEventIdNewOverride = () => { return eventId; }; @@ -87,10 +87,10 @@ describe('Entry', function() { assert.strictEqual(entry.metadata.insertId, eventId); }); - it('should not assign insertId if one is already set', function() { + it('should not assign insertId if one is already set', () => { const eventId = 'event-id'; - fakeEventIdNewOverride = function() { + fakeEventIdNewOverride = () => { return eventId; }; @@ -103,21 +103,21 @@ describe('Entry', function() { assert.strictEqual(entry.metadata.insertId, userDefinedInsertId); }); - it('should localize data', function() { + it('should localize data', () => { assert.strictEqual(entry.data, DATA); }); }); - describe('fromApiResponse_', function() { + describe('fromApiResponse_', () => { const RESOURCE = {}; let entry; const date = new Date(); - beforeEach(function() { + beforeEach(() => { const seconds = date.getTime() / 1000; const secondsRounded = Math.floor(seconds); - FakeGrpcService.structToObj_ = function(data) { + FakeGrpcService.structToObj_ = data => { return data; }; @@ -133,7 +133,7 @@ describe('Entry', function() { }); }); - it('should create an Entry', function() { + it('should create an Entry', () => { assert(entry instanceof Entry); assert.strictEqual(entry.metadata.resource, RESOURCE); assert.strictEqual(entry.data, DATA); @@ -141,7 +141,7 @@ describe('Entry', function() { assert.deepStrictEqual(entry.metadata.timestamp, date); }); - it('should extend the entry with proto data', function() { + it('should extend the entry with proto data', () => { const entry = Entry.fromApiResponse_({ resource: RESOURCE, payload: 'protoPayload', @@ -152,11 +152,11 @@ describe('Entry', function() { assert.strictEqual(entry.data, DATA); }); - it('should extend the entry with json data', function() { + it('should extend the entry with json data', () => { assert.strictEqual(entry.data, DATA); }); - it('should extend the entry with text data', function() { + it('should extend the entry with text data', () => { const entry = Entry.fromApiResponse_({ resource: RESOURCE, payload: 'textPayload', @@ -168,23 +168,23 @@ describe('Entry', function() { }); }); - describe('toJSON', function() { - beforeEach(function() { + describe('toJSON', () => { + beforeEach(() => { FakeGrpcService.objToStruct_ = util.noop; }); - it('should not modify the original instance', function() { + it('should not modify the original instance', () => { const entryBefore = extend(true, {}, entry); entry.toJSON(); const entryAfter = extend(true, {}, entry); assert.deepStrictEqual(entryBefore, entryAfter); }); - it('should convert data as a struct and assign to jsonPayload', function() { + it('should convert data as a struct and assign to jsonPayload', () => { const input = {}; const converted = {}; - FakeGrpcService.objToStruct_ = function(obj, options) { + FakeGrpcService.objToStruct_ = (obj, options) => { assert.strictEqual(obj, input); assert.deepStrictEqual(options, { removeCircular: false, @@ -198,8 +198,8 @@ describe('Entry', function() { assert.strictEqual(json.jsonPayload, converted); }); - it('should pass removeCircular to objToStruct_', function(done) { - FakeGrpcService.objToStruct_ = function(obj, options) { + it('should pass removeCircular to objToStruct_', done => { + FakeGrpcService.objToStruct_ = (obj, options) => { assert.strictEqual(options.removeCircular, true); done(); }; @@ -208,13 +208,13 @@ describe('Entry', function() { entry.toJSON({removeCircular: true}); }); - it('should assign string data as textPayload', function() { + it('should assign string data as textPayload', () => { entry.data = 'string'; const json = entry.toJSON(); assert.strictEqual(json.textPayload, entry.data); }); - it('should convert a date', function() { + it('should convert a date', () => { const date = new Date(); entry.metadata.timestamp = date; diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 8e5abfe9b11..d6c4d21afa1 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -101,13 +101,13 @@ function FakeSink() { this.calledWith_ = arguments; } -describe('Logging', function() { +describe('Logging', () => { let Logging; let logging; const PROJECT_ID = 'project-id'; - before(function() { + before(() => { Logging = proxyquire('../', { '@google-cloud/common-grpc': { util: fakeUtil, @@ -125,7 +125,7 @@ describe('Logging', function() { }).Logging; }); - beforeEach(function() { + beforeEach(() => { extend(fakeUtil, originalFakeUtil); googleAuthOverride = null; isCustomTypeOverride = null; @@ -135,7 +135,7 @@ describe('Logging', function() { }); }); - describe('instantiation', function() { + describe('instantiation', () => { let EXPECTED_SCOPES = []; let clientClasses = [ v2.ConfigServiceV2Client, @@ -151,26 +151,26 @@ describe('Logging', function() { } } - it('should extend the correct methods', function() { + it('should extend the correct methods', () => { assert(extended); // See `fakePaginator.extend` }); - it('should promisify all the things', function() { + it('should promisify all the things', () => { assert(promisifed); }); - it('should initialize the API object', function() { + it('should initialize the API object', () => { assert.deepStrictEqual(logging.api, {}); }); - it('should cache a local GoogleAuth instance', function() { + it('should cache a local GoogleAuth instance', () => { const fakeGoogleAuthInstance = {}; const options = { a: 'b', c: 'd', }; - googleAuthOverride = function(options_) { + googleAuthOverride = options_ => { assert.deepStrictEqual( options_, extend( @@ -189,7 +189,7 @@ describe('Logging', function() { assert.strictEqual(logging.auth, fakeGoogleAuthInstance); }); - it('should localize the options', function() { + it('should localize the options', () => { const options = { a: 'b', c: 'd', @@ -212,44 +212,44 @@ describe('Logging', function() { ); }); - it('should set the projectId', function() { + it('should set the projectId', () => { assert.strictEqual(logging.projectId, PROJECT_ID); }); - it('should default the projectId to the token', function() { + it('should default the projectId to the token', () => { const logging = new Logging({}); assert.strictEqual(logging.projectId, '{{projectId}}'); }); }); - describe('createSink', function() { + describe('createSink', () => { const SINK_NAME = 'name'; - it('should throw if a name is not provided', function() { - assert.throws(function() { + it('should throw if a name is not provided', () => { + assert.throws(() => { logging.createSink(); }, /A sink name must be provided\./); }); - it('should throw if a config object is not provided', function() { - assert.throws(function() { + it('should throw if a config object is not provided', () => { + assert.throws(() => { logging.createSink(SINK_NAME); }, /A sink configuration object must be provided\./); }); - it('should set acls for a Dataset destination', function(done) { + it('should set acls for a Dataset destination', done => { const dataset = {}; const CONFIG = { destination: dataset, }; - isCustomTypeOverride = function(destination, type) { + isCustomTypeOverride = (destination, type) => { assert.strictEqual(destination, dataset); return type === 'bigquery/dataset'; }; - logging.setAclForDataset_ = function(name, config, callback) { + logging.setAclForDataset_ = (name, config, callback) => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); callback(); // done() @@ -258,19 +258,19 @@ describe('Logging', function() { logging.createSink(SINK_NAME, CONFIG, done); }); - it('should set acls for a Topic destination', function(done) { + it('should set acls for a Topic destination', done => { const topic = {}; const CONFIG = { destination: topic, }; - isCustomTypeOverride = function(destination, type) { + isCustomTypeOverride = (destination, type) => { assert.strictEqual(destination, topic); return type === 'pubsub/topic'; }; - logging.setAclForTopic_ = function(name, config, callback) { + logging.setAclForTopic_ = (name, config, callback) => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); callback(); // done() @@ -279,19 +279,19 @@ describe('Logging', function() { logging.createSink(SINK_NAME, CONFIG, done); }); - it('should set acls for a Bucket destination', function(done) { + it('should set acls for a Bucket destination', done => { const bucket = {}; const CONFIG = { destination: bucket, }; - isCustomTypeOverride = function(destination, type) { + isCustomTypeOverride = (destination, type) => { assert.strictEqual(destination, bucket); return type === 'storage/bucket'; }; - logging.setAclForBucket_ = function(name, config, callback) { + logging.setAclForBucket_ = (name, config, callback) => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); callback(); // done() @@ -300,8 +300,8 @@ describe('Logging', function() { logging.createSink(SINK_NAME, CONFIG, done); }); - describe('API request', function() { - it('should make the correct API request', function(done) { + describe('API request', () => { + it('should make the correct API request', done => { const config = { a: 'b', c: 'd', @@ -311,30 +311,27 @@ describe('Logging', function() { name: SINK_NAME, }); - logging.request = function(config) { + logging.request = config => { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'createSink'); - const expectedParent = 'projects/' + logging.projectId; assert.strictEqual(config.reqOpts.parent, expectedParent); assert.deepStrictEqual(config.reqOpts.sink, expectedConfig); - assert.strictEqual(config.gaxOpts, undefined); - done(); }; logging.createSink(SINK_NAME, config, assert.ifError); }); - it('should accept GAX options', function(done) { + it('should accept GAX options', done => { const config = { a: 'b', c: 'd', gaxOptions: {}, }; - logging.request = function(config_) { + logging.request = config_ => { assert.strictEqual(config_.reqOpts.sink.gaxOptions, undefined); assert.strictEqual(config_.gaxOpts, config.gaxOptions); done(); @@ -343,18 +340,18 @@ describe('Logging', function() { logging.createSink(SINK_NAME, config, assert.ifError); }); - describe('error', function() { + describe('error', () => { const error = new Error('Error.'); const apiResponse = {}; - beforeEach(function() { - logging.request = function(config, callback) { + beforeEach(() => { + logging.request = (config, callback) => { callback(error, apiResponse); }; }); - it('should exec callback with error & API response', function(done) { - logging.createSink(SINK_NAME, {}, function(err, sink, apiResponse_) { + it('should exec callback with error & API response', done => { + logging.createSink(SINK_NAME, {}, (err, sink, apiResponse_) => { assert.strictEqual(err, error); assert.strictEqual(sink, null); assert.strictEqual(apiResponse_, apiResponse); @@ -364,26 +361,26 @@ describe('Logging', function() { }); }); - describe('success', function() { + describe('success', () => { const apiResponse = { name: SINK_NAME, }; - beforeEach(function() { - logging.request = function(config, callback) { + beforeEach(() => { + logging.request = (config, callback) => { callback(null, apiResponse); }; }); - it('should exec callback with Sink & API response', function(done) { + it('should exec callback with Sink & API response', done => { const sink = {}; - logging.sink = function(name_) { + logging.sink = name_ => { assert.strictEqual(name_, SINK_NAME); return sink; }; - logging.createSink(SINK_NAME, {}, function(err, sink_, apiResponse_) { + logging.createSink(SINK_NAME, {}, (err, sink_, apiResponse_) => { assert.ifError(err); assert.strictEqual(sink_, sink); @@ -397,11 +394,11 @@ describe('Logging', function() { }); }); - describe('entry', function() { + describe('entry', () => { const RESOURCE = {}; const DATA = {}; - it('should return an Entry object', function() { + it('should return an Entry object', () => { const entry = logging.entry(RESOURCE, DATA); assert(entry instanceof FakeEntry); assert.strictEqual(entry.calledWith_[0], RESOURCE); @@ -409,9 +406,9 @@ describe('Logging', function() { }); }); - describe('getEntries', function() { - it('should accept only a callback', function(done) { - logging.request = function(config) { + describe('getEntries', () => { + it('should accept only a callback', done => { + logging.request = config => { assert.deepStrictEqual(config.reqOpts, { orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], @@ -422,10 +419,10 @@ describe('Logging', function() { logging.getEntries(assert.ifError); }); - it('should make the correct API request', function(done) { + it('should make the correct API request', done => { const options = {}; - logging.request = function(config) { + logging.request = config => { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'listLogEntries'); @@ -447,12 +444,12 @@ describe('Logging', function() { logging.getEntries(options, assert.ifError); }); - it('should not push the same resourceName again', function(done) { + it('should not push the same resourceName again', done => { const options = { resourceNames: ['projects/' + logging.projectId], }; - logging.request = function(config) { + logging.request = config => { assert.deepStrictEqual(config.reqOpts.resourceNames, [ 'projects/' + logging.projectId, ]); @@ -462,12 +459,12 @@ describe('Logging', function() { logging.getEntries(options, assert.ifError); }); - it('should allow overriding orderBy', function(done) { + it('should allow overriding orderBy', done => { const options = { orderBy: 'timestamp asc', }; - logging.request = function(config) { + logging.request = config => { assert.deepStrictEqual(config.reqOpts.orderBy, options.orderBy); done(); }; @@ -475,7 +472,7 @@ describe('Logging', function() { logging.getEntries(options, assert.ifError); }); - it('should accept GAX options', function(done) { + it('should accept GAX options', done => { const options = { a: 'b', c: 'd', @@ -484,7 +481,7 @@ describe('Logging', function() { }, }; - logging.request = function(config) { + logging.request = config => { assert.strictEqual(config.reqOpts.gaxOptions, undefined); assert.deepStrictEqual(config.gaxOpts, options.gaxOptions); done(); @@ -493,16 +490,16 @@ describe('Logging', function() { logging.getEntries(options, assert.ifError); }); - describe('error', function() { + describe('error', () => { const ARGS = [new Error('Error.'), [], {}]; - beforeEach(function() { - logging.request = function(config, callback) { + beforeEach(() => { + logging.request = (config, callback) => { callback.apply(null, ARGS); }; }); - it('should execute callback with error & API response', function(done) { + it('should execute callback with error & API response', done => { logging.getEntries({}, function() { const args = [].slice.call(arguments); assert.deepStrictEqual(args, ARGS); @@ -511,7 +508,7 @@ describe('Logging', function() { }); }); - describe('success', function() { + describe('success', () => { const ARGS = [ null, [ @@ -521,26 +518,24 @@ describe('Logging', function() { ], ]; - beforeEach(function() { - logging.request = function(config, callback) { + beforeEach(() => { + logging.request = (config, callback) => { callback.apply(null, ARGS); }; }); - it('should execute callback with entries & API resp', function(done) { - logging.getEntries({}, function(err, entries) { + it('should execute callback with entries & API resp', done => { + logging.getEntries({}, (err, entries) => { assert.ifError(err); - const argsPassedToFromApiResponse_ = entries[0]; assert.strictEqual(argsPassedToFromApiResponse_[0], ARGS[1][0]); - done(); }); }); }); }); - describe('getEntriesStream', function() { + describe('getEntriesStream', () => { const OPTIONS = { a: 'b', c: 'd', @@ -553,17 +548,14 @@ describe('Logging', function() { let REQUEST_STREAM; const RESULT = {}; - beforeEach(function() { + beforeEach(() => { REQUEST_STREAM = through.obj(); REQUEST_STREAM.push(RESULT); - - logging.request = function() { - return REQUEST_STREAM; - }; + logging.request = () => REQUEST_STREAM; }); - it('should make request once reading', function(done) { - logging.request = function(config) { + it('should make request once reading', done => { + logging.request = config => { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'listLogEntriesStream'); @@ -589,38 +581,32 @@ describe('Logging', function() { stream.emit('reading'); }); - it('should convert results from request to Entry', function(done) { + it('should convert results from request to Entry', done => { const stream = logging.getEntriesStream(OPTIONS); - - stream.on('data', function(entry) { + stream.on('data', entry => { const argsPassedToFromApiResponse_ = entry[0]; assert.strictEqual(argsPassedToFromApiResponse_, RESULT); - done(); }); - stream.emit('reading'); }); - it('should expose abort function', function(done) { + it('should expose abort function', done => { REQUEST_STREAM.abort = done; - const stream = logging.getEntriesStream(OPTIONS); - stream.emit('reading'); - stream.abort(); }); - it('should not require an options object', function() { - assert.doesNotThrow(function() { + it('should not require an options object', () => { + assert.doesNotThrow(() => { const stream = logging.getEntriesStream(); stream.emit('reading'); }); }); }); - describe('getSinks', function() { + describe('getSinks', () => { const OPTIONS = { a: 'b', c: 'd', @@ -630,16 +616,13 @@ describe('Logging', function() { }, }; - it('should accept only a callback', function(done) { - logging.request = function() { - done(); - }; - + it('should accept only a callback', done => { + logging.request = () => done(); logging.getSinks(assert.ifError); }); - it('should make the correct API request', function(done) { - logging.request = function(config) { + it('should make the correct API request', done => { + logging.request = config => { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'listSinks'); @@ -661,16 +644,16 @@ describe('Logging', function() { logging.getSinks(OPTIONS, assert.ifError); }); - describe('error', function() { + describe('error', () => { const ARGS = [new Error('Error.'), [], {}]; - beforeEach(function() { - logging.request = function(config, callback) { + beforeEach(() => { + logging.request = (config, callback) => { callback.apply(null, ARGS); }; }); - it('should execute callback with error & API response', function(done) { + it('should execute callback with error & API response', done => { logging.getEntries(OPTIONS, function() { const args = [].slice.call(arguments); assert.deepStrictEqual(args, ARGS); @@ -679,7 +662,7 @@ describe('Logging', function() { }); }); - describe('success', function() { + describe('success', () => { const ARGS = [ null, [ @@ -690,33 +673,29 @@ describe('Logging', function() { {}, ]; - beforeEach(function() { - logging.request = function(config, callback) { + beforeEach(() => { + logging.request = (config, callback) => { callback.apply(null, ARGS); }; }); - it('should execute callback with Logs & API resp', function(done) { + it('should execute callback with Logs & API resp', done => { const sinkInstance = {}; - - logging.sink = function(name) { + logging.sink = name => { assert.strictEqual(name, ARGS[1][0].name); return sinkInstance; }; - - logging.getSinks(OPTIONS, function(err, sinks) { + logging.getSinks(OPTIONS, (err, sinks) => { assert.ifError(err); - assert.strictEqual(sinks[0], sinkInstance); assert.strictEqual(sinks[0].metadata, ARGS[1][0]); - done(); }); }); }); }); - describe('getSinksStream', function() { + describe('getSinksStream', () => { const OPTIONS = { a: 'b', c: 'd', @@ -731,17 +710,14 @@ describe('Logging', function() { name: 'sink-name', }; - beforeEach(function() { + beforeEach(() => { REQUEST_STREAM = through.obj(); REQUEST_STREAM.push(RESULT); - - logging.request = function() { - return REQUEST_STREAM; - }; + logging.request = () => REQUEST_STREAM; }); - it('should make request once reading', function(done) { - logging.request = function(config) { + it('should make request once reading', done => { + logging.request = config => { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'listSinksStream'); @@ -766,17 +742,17 @@ describe('Logging', function() { stream.emit('reading'); }); - it('should convert results from request to Sink', function(done) { + it('should convert results from request to Sink', done => { const stream = logging.getSinksStream(OPTIONS); const sinkInstance = {}; - logging.sink = function(name) { + logging.sink = name => { assert.strictEqual(name, RESULT.name); return sinkInstance; }; - stream.on('data', function(sink) { + stream.on('data', sink => { assert.strictEqual(sink, sinkInstance); assert.strictEqual(sink.metadata, RESULT); done(); @@ -785,7 +761,7 @@ describe('Logging', function() { stream.emit('reading'); }); - it('should expose abort function', function(done) { + it('should expose abort function', done => { REQUEST_STREAM.abort = done; const stream = logging.getSinksStream(OPTIONS); @@ -796,10 +772,10 @@ describe('Logging', function() { }); }); - describe('log', function() { + describe('log', () => { const NAME = 'log-name'; - it('should return a Log object', function() { + it('should return a Log object', () => { const log = logging.log(NAME); assert(log instanceof FakeLog); assert.strictEqual(log.calledWith_[0], logging); @@ -807,7 +783,7 @@ describe('Logging', function() { }); }); - describe('request', function() { + describe('request', () => { const CONFIG = { client: 'client', method: 'method', @@ -820,9 +796,9 @@ describe('Logging', function() { const PROJECT_ID = 'project-id'; - beforeEach(function() { + beforeEach(() => { logging.auth = { - getProjectId: function(callback) { + getProjectId: callback => { callback(null, PROJECT_ID); }, }; @@ -832,18 +808,15 @@ describe('Logging', function() { }; }); - describe('prepareGaxRequest', function() { - it('should get the project ID', function(done) { - logging.auth.getProjectId = function() { - done(); - }; - + describe('prepareGaxRequest', () => { + it('should get the project ID', done => { + logging.auth.getProjectId = () => done(); logging.request(CONFIG, assert.ifError); }); - it('should cache the project ID', function(done) { - logging.auth.getProjectId = function() { - setImmediate(function() { + it('should cache the project ID', done => { + logging.auth.getProjectId = () => { + setImmediate(() => { assert.strictEqual(logging.projectId, PROJECT_ID); done(); }); @@ -852,20 +825,20 @@ describe('Logging', function() { logging.request(CONFIG, assert.ifError); }); - it('should return error if getting project ID failed', function(done) { + it('should return error if getting project ID failed', done => { const error = new Error('Error.'); - logging.auth.getProjectId = function(callback) { + logging.auth.getProjectId = callback => { callback(error); }; - logging.request(CONFIG, function(err) { + logging.request(CONFIG, err => { assert.strictEqual(err, error); done(); }); }); - it('should initiate and cache the client', function() { + it('should initiate and cache the client', () => { const fakeClient = { [CONFIG.method]: util.noop, }; @@ -878,8 +851,8 @@ describe('Logging', function() { assert.strictEqual(logging.api[CONFIG.client], fakeClient); }); - it('should use the cached client', function(done) { - fakeV2[CONFIG.client] = function() { + it('should use the cached client', done => { + fakeV2[CONFIG.client] = () => { done(new Error('Should not re-instantiate a GAX client.')); }; @@ -887,10 +860,10 @@ describe('Logging', function() { done(); }); - it('should replace the project ID token', function(done) { + it('should replace the project ID token', done => { const replacedReqOpts = {}; - replaceProjectIdTokenOverride = function(reqOpts, projectId) { + replaceProjectIdTokenOverride = (reqOpts, projectId) => { assert.notStrictEqual(reqOpts, CONFIG.reqOpts); assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(projectId, PROJECT_ID); @@ -912,8 +885,8 @@ describe('Logging', function() { }); }); - describe('makeRequestCallback', function() { - it('should return if in snippet sandbox', function(done) { + describe('makeRequestCallback', () => { + it('should return if in snippet sandbox', done => { logging.auth.getProjectId = function() { done(new Error('Should not have gotten project ID.')); }; @@ -926,7 +899,7 @@ describe('Logging', function() { done(); }); - it('should prepare the request', function(done) { + it('should prepare the request', done => { logging.api[CONFIG.client][CONFIG.method] = { bind: function(gaxClient, reqOpts, gaxOpts) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); @@ -942,7 +915,7 @@ describe('Logging', function() { logging.request(CONFIG, assert.ifError); }); - it('should execute callback with error', function(done) { + it('should execute callback with error', done => { const error = new Error('Error.'); logging.api[CONFIG.client][CONFIG.method] = function() { @@ -956,7 +929,7 @@ describe('Logging', function() { }); }); - it('should execute the request function', function() { + it('should execute the request function', () => { logging.api[CONFIG.client][CONFIG.method] = function(done) { const callback = [].slice.call(arguments).pop(); callback(null, done); // so it ends the test @@ -966,10 +939,10 @@ describe('Logging', function() { }); }); - describe('makeRequestStream', function() { + describe('makeRequestStream', () => { let GAX_STREAM; - beforeEach(function() { + beforeEach(() => { GAX_STREAM = through(); logging.api[CONFIG.client][CONFIG.method] = { @@ -981,7 +954,7 @@ describe('Logging', function() { }; }); - it('should return if in snippet sandbox', function(done) { + it('should return if in snippet sandbox', done => { logging.auth.getProjectId = function() { done(new Error('Should not have gotten project ID.')); }; @@ -995,7 +968,7 @@ describe('Logging', function() { done(); }); - it('should expose an abort function', function(done) { + it('should expose an abort function', done => { GAX_STREAM.cancel = done; const requestStream = logging.request(CONFIG); @@ -1003,7 +976,7 @@ describe('Logging', function() { requestStream.abort(); }); - it('should prepare the request once reading', function(done) { + it('should prepare the request once reading', done => { logging.api[CONFIG.client][CONFIG.method] = { bind: function(gaxClient, reqOpts, gaxOpts) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); @@ -1022,10 +995,10 @@ describe('Logging', function() { requestStream.emit('reading'); }); - it('should destroy the stream with prepare error', function(done) { + it('should destroy the stream with prepare error', done => { const error = new Error('Error.'); - logging.auth.getProjectId = function(callback) { + logging.auth.getProjectId = callback => { callback(error); }; @@ -1038,7 +1011,7 @@ describe('Logging', function() { }); }); - it('should destroy the stream with GAX error', function(done) { + it('should destroy the stream with GAX error', done => { const error = new Error('Error.'); const requestStream = logging.request(CONFIG); @@ -1054,10 +1027,10 @@ describe('Logging', function() { }); }); - describe('sink', function() { + describe('sink', () => { const NAME = 'sink-name'; - it('should return a Log object', function() { + it('should return a Log object', () => { const sink = logging.sink(NAME); assert(sink instanceof FakeSink); assert.strictEqual(sink.calledWith_[0], logging); @@ -1065,13 +1038,13 @@ describe('Logging', function() { }); }); - describe('setAclForBucket_', function() { + describe('setAclForBucket_', () => { const SINK_NAME = 'name'; let CONFIG; let bucket; - beforeEach(function() { + beforeEach(() => { bucket = { name: 'bucket-name', acl: { @@ -1086,7 +1059,7 @@ describe('Logging', function() { }; }); - it('should add cloud-logs as an owner', function(done) { + it('should add cloud-logs as an owner', done => { bucket.acl.owners.addGroup = function(entity) { assert.strictEqual(entity, 'cloud-logs@google.com'); done(); @@ -1095,17 +1068,17 @@ describe('Logging', function() { logging.setAclForBucket_(SINK_NAME, CONFIG, assert.ifError); }); - describe('error', function() { + describe('error', () => { const error = new Error('Error.'); const apiResponse = {}; - beforeEach(function() { + beforeEach(() => { bucket.acl.owners.addGroup = function(entity, callback) { callback(error, apiResponse); }; }); - it('should return error and API response to callback', function(done) { + it('should return error and API response to callback', done => { logging.setAclForBucket_(SINK_NAME, CONFIG, function(err, sink, resp) { assert.strictEqual(err, error); assert.strictEqual(sink, null); @@ -1116,18 +1089,18 @@ describe('Logging', function() { }); }); - describe('success', function() { + describe('success', () => { const apiResponse = {}; - beforeEach(function() { + beforeEach(() => { bucket.acl.owners.addGroup = function(entity, callback) { callback(null, apiResponse); }; }); - it('should call createSink with string destination', function(done) { + it('should call createSink with string destination', done => { bucket.acl.owners.addGroup = function(entity, callback) { - logging.createSink = function(name, config, callback) { + logging.createSink = (name, config, callback) => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); @@ -1146,12 +1119,12 @@ describe('Logging', function() { }); }); - describe('setAclForDataset_', function() { + describe('setAclForDataset_', () => { const SINK_NAME = 'name'; let CONFIG; let dataset; - beforeEach(function() { + beforeEach(() => { dataset = { id: 'dataset-id', parent: { @@ -1164,19 +1137,19 @@ describe('Logging', function() { }; }); - describe('metadata refresh', function() { - describe('error', function() { + describe('metadata refresh', () => { + describe('error', () => { const error = new Error('Error.'); const apiResponse = {}; - beforeEach(function() { - dataset.getMetadata = function(callback) { + beforeEach(() => { + dataset.getMetadata = callback => { callback(error, null, apiResponse); }; }); - it('should execute the callback with error & API resp', function(done) { - logging.setAclForDataset_(SINK_NAME, CONFIG, function(err, _, resp) { + it('should execute the callback with error & API resp', done => { + logging.setAclForDataset_(SINK_NAME, CONFIG, (err, _, resp) => { assert.strictEqual(err, error); assert.strictEqual(_, null); assert.strictEqual(resp, apiResponse); @@ -1185,20 +1158,20 @@ describe('Logging', function() { }); }); - describe('success', function() { + describe('success', () => { const apiResponse = { access: [{}, {}], }; const originalAccess = [].slice.call(apiResponse.access); - beforeEach(function() { - dataset.getMetadata = function(callback) { + beforeEach(() => { + dataset.getMetadata = callback => { callback(null, apiResponse, apiResponse); }; }); - it('should set the correct metadata', function(done) { + it('should set the correct metadata', done => { const access = { role: 'WRITER', groupByEmail: 'cloud-logs@google.com', @@ -1215,17 +1188,17 @@ describe('Logging', function() { logging.setAclForDataset_(SINK_NAME, CONFIG, assert.ifError); }); - describe('updating metadata error', function() { + describe('updating metadata error', () => { const error = new Error('Error.'); const apiResponse = {}; - beforeEach(function() { + beforeEach(() => { dataset.setMetadata = function(metadata, callback) { callback(error, apiResponse); }; }); - it('should exec callback with error & API response', function(done) { + it('should exec callback with error & API response', done => { logging.setAclForDataset_(SINK_NAME, CONFIG, function(err, _, res) { assert.strictEqual(err, error); assert.strictEqual(_, null); @@ -1235,17 +1208,17 @@ describe('Logging', function() { }); }); - describe('updating metadata success', function() { + describe('updating metadata success', () => { const apiResponse = {}; - beforeEach(function() { + beforeEach(() => { dataset.setMetadata = function(metadata, callback) { callback(null, apiResponse); }; }); - it('should call createSink with string destination', function(done) { - logging.createSink = function(name, config, callback) { + it('should call createSink with string destination', done => { + logging.createSink = (name, config, callback) => { const expectedDestination = [ 'bigquery.googleapis.com', 'projects', @@ -1267,12 +1240,12 @@ describe('Logging', function() { }); }); - describe('setAclForTopic_', function() { + describe('setAclForTopic_', () => { const SINK_NAME = 'name'; let CONFIG; let topic; - beforeEach(function() { + beforeEach(() => { topic = { name: 'topic-name', iam: { @@ -1286,19 +1259,19 @@ describe('Logging', function() { }; }); - describe('get policy', function() { - describe('error', function() { + describe('get policy', () => { + describe('error', () => { const error = new Error('Error.'); const apiResponse = {}; - beforeEach(function() { - topic.iam.getPolicy = function(callback) { + beforeEach(() => { + topic.iam.getPolicy = callback => { callback(error, null, apiResponse); }; }); - it('should execute the callback with error & API resp', function(done) { - logging.setAclForTopic_(SINK_NAME, CONFIG, function(err, _, resp) { + it('should execute the callback with error & API resp', done => { + logging.setAclForTopic_(SINK_NAME, CONFIG, (err, _, resp) => { assert.strictEqual(err, error); assert.strictEqual(_, null); assert.strictEqual(resp, apiResponse); @@ -1307,20 +1280,20 @@ describe('Logging', function() { }); }); - describe('success', function() { + describe('success', () => { const apiResponse = { bindings: [{}, {}], }; const originalBindings = [].slice.call(apiResponse.bindings); - beforeEach(function() { - topic.iam.getPolicy = function(callback) { + beforeEach(() => { + topic.iam.getPolicy = callback => { callback(null, apiResponse, apiResponse); }; }); - it('should set the correct policy bindings', function(done) { + it('should set the correct policy bindings', done => { const binding = { role: 'roles/pubsub.publisher', members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], @@ -1329,7 +1302,7 @@ describe('Logging', function() { const expectedBindings = [].slice.call(originalBindings); expectedBindings.push(binding); - topic.iam.setPolicy = function(policy) { + topic.iam.setPolicy = policy => { assert.strictEqual(policy, apiResponse); assert.deepStrictEqual(policy.bindings, expectedBindings); done(); @@ -1338,18 +1311,18 @@ describe('Logging', function() { logging.setAclForTopic_(SINK_NAME, CONFIG, assert.ifError); }); - describe('updating policy error', function() { + describe('updating policy error', () => { const error = new Error('Error.'); const apiResponse = {}; - beforeEach(function() { - topic.iam.setPolicy = function(policy, callback) { + beforeEach(() => { + topic.iam.setPolicy = (policy, callback) => { callback(error, null, apiResponse); }; }); - it('should exec callback with error & API response', function(done) { - logging.setAclForTopic_(SINK_NAME, CONFIG, function(err, _, res) { + it('should exec callback with error & API response', done => { + logging.setAclForTopic_(SINK_NAME, CONFIG, (err, _, res) => { assert.strictEqual(err, error); assert.strictEqual(_, null); assert.strictEqual(res, apiResponse); @@ -1358,24 +1331,23 @@ describe('Logging', function() { }); }); - describe('updating policy success', function() { + describe('updating policy success', () => { const apiResponse = {}; - beforeEach(function() { - topic.iam.setPolicy = function(policy, callback) { + beforeEach(() => { + topic.iam.setPolicy = (policy, callback) => { callback(null, apiResponse); }; }); - it('should call createSink with string destination', function(done) { - logging.createSink = function(name, config, callback) { + it('should call createSink with string destination', done => { + logging.createSink = (name, config, callback) => { const expectedDestination = 'pubsub.googleapis.com/' + topic.name; assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); assert.strictEqual(config.destination, expectedDestination); callback(); // done() }; - logging.setAclForTopic_(SINK_NAME, CONFIG, done); }); }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 12f7f819bc5..239192bf20d 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -40,7 +40,7 @@ function FakeMetadata() { this.calledWith_ = arguments; } -describe('Log', function() { +describe('Log', () => { let Log; let log; @@ -58,7 +58,7 @@ describe('Log', function() { let assignSeverityToEntriesOverride = null; - before(function() { + before(() => { Log = proxyquire('../src/log', { '@google-cloud/promisify': fakePromisify, './entry': {Entry: Entry}, @@ -72,7 +72,7 @@ describe('Log', function() { }; }); - beforeEach(function() { + beforeEach(() => { assignSeverityToEntriesOverride = null; LOGGING = { @@ -84,24 +84,24 @@ describe('Log', function() { log = new Log(LOGGING, LOG_NAME_FORMATTED); }); - describe('instantiation', function() { - it('should promisify all the things', function() { + describe('instantiation', () => { + it('should promisify all the things', () => { assert(promisifed); }); - it('should localize the escaped name', function() { + it('should localize the escaped name', () => { assert.strictEqual(log.name, LOG_NAME_ENCODED); }); - it('should localize removeCircular_ to default value', function() { + it('should localize removeCircular_ to default value', () => { assert.strictEqual(log.removeCircular_, false); }); - it('should localize the formatted name', function() { + it('should localize the formatted name', () => { const formattedName = 'formatted-name'; const formatName_ = Log.formatName_; - Log.formatName_ = function() { + Log.formatName_ = () => { Log.formatName_ = formatName_; return formattedName; }; @@ -111,27 +111,27 @@ describe('Log', function() { assert.strictEqual(log.formattedName_, formattedName); }); - it('should localize an instance of Metadata', function() { + it('should localize an instance of Metadata', () => { assert(log.metadata_ instanceof FakeMetadata); assert.strictEqual(log.metadata_.calledWith_[0], LOGGING); }); - it('should accept and localize options.removeCircular', function() { + it('should accept and localize options.removeCircular', () => { const options = {removeCircular: true}; const log = new Log(LOGGING, LOG_NAME_FORMATTED, options); assert.strictEqual(log.removeCircular_, true); }); - it('should localize the Logging instance', function() { + it('should localize the Logging instance', () => { assert.strictEqual(log.logging, LOGGING); }); - it('should localize the name', function() { + it('should localize the name', () => { assert.strictEqual(log.name, LOG_NAME_FORMATTED.split('/').pop()); }); }); - describe('assignSeverityToEntries_', function() { + describe('assignSeverityToEntries_', () => { const circular = {}; circular.circular = circular; @@ -139,7 +139,7 @@ describe('Log', function() { const SEVERITY = 'severity'; - it('should assign severity to a single entry', function() { + it('should assign severity to a single entry', () => { assert.deepStrictEqual( Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) .map(prop('metadata')) @@ -148,7 +148,7 @@ describe('Log', function() { ); }); - it('should assign severity property to multiple entries', function() { + it('should assign severity property to multiple entries', () => { assert.deepStrictEqual( Log.assignSeverityToEntries_(ENTRIES, SEVERITY) .map(prop('metadata')) @@ -157,31 +157,31 @@ describe('Log', function() { ); }); - it('should not affect original array', function() { + it('should not affect original array', () => { const originalEntries = ENTRIES.map(x => extend({}, x)); Log.assignSeverityToEntries_(originalEntries, SEVERITY); assert.deepStrictEqual(originalEntries, ENTRIES); }); }); - describe('formatName_', function() { + describe('formatName_', () => { const PROJECT_ID = 'project-id'; const NAME = 'log-name'; const EXPECTED = 'projects/' + PROJECT_ID + '/logs/' + NAME; - it('should properly format the name', function() { + it('should properly format the name', () => { assert.strictEqual(Log.formatName_(PROJECT_ID, NAME), EXPECTED); }); - it('should encode a name that requires it', function() { + it('should encode a name that requires it', () => { const name = 'appengine/logs'; const expectedName = 'projects/' + PROJECT_ID + '/logs/appengine%2Flogs'; assert.strictEqual(Log.formatName_(PROJECT_ID, name), expectedName); }); - it('should not encode a name that does not require it', function() { + it('should not encode a name that does not require it', () => { const name = 'appengine%2Flogs'; const expectedName = 'projects/' + PROJECT_ID + '/logs/' + name; @@ -189,9 +189,9 @@ describe('Log', function() { }); }); - describe('delete', function() { - it('should accept gaxOptions', function(done) { - log.logging.request = function(config, callback) { + describe('delete', () => { + it('should accept gaxOptions', done => { + log.logging.request = (config, callback) => { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'deleteLog'); @@ -207,10 +207,10 @@ describe('Log', function() { log.delete(done); }); - it('should accept gaxOptions', function(done) { + it('should accept gaxOptions', done => { const gaxOptions = {}; - log.logging.request = function(config) { + log.logging.request = config => { assert.strictEqual(config.gaxOpts, gaxOptions); done(); }; @@ -219,8 +219,8 @@ describe('Log', function() { }); }); - describe('entry', function() { - it('should return an entry from Logging', function() { + describe('entry', () => { + it('should return an entry from Logging', () => { const metadata = { val: true, }; @@ -228,7 +228,7 @@ describe('Log', function() { const entryObject = {}; - log.logging.entry = function(metadata_, data_) { + log.logging.entry = (metadata_, data_) => { assert.deepStrictEqual(metadata_, metadata); assert.strictEqual(data_, data); return entryObject; @@ -238,10 +238,10 @@ describe('Log', function() { assert.strictEqual(entry, entryObject); }); - it('should assume one argument means data', function(done) { + it('should assume one argument means data', done => { const data = {}; - log.logging.entry = function(metadata, data_) { + log.logging.entry = (metadata, data_) => { assert.strictEqual(data_, data); done(); }; @@ -250,13 +250,13 @@ describe('Log', function() { }); }); - describe('getEntries', function() { + describe('getEntries', () => { const EXPECTED_OPTIONS = { filter: 'logName="' + LOG_NAME_FORMATTED + '"', }; - it('should call Logging getEntries with defaults', function(done) { - log.logging.getEntries = function(options, callback) { + it('should call Logging getEntries with defaults', done => { + log.logging.getEntries = (options, callback) => { assert.deepStrictEqual(options, EXPECTED_OPTIONS); callback(); // done() }; @@ -264,13 +264,13 @@ describe('Log', function() { log.getEntries(done); }); - it('should allow overriding the options', function(done) { + it('should allow overriding the options', done => { const options = { custom: true, filter: 'custom filter', }; - log.logging.getEntries = function(options_, callback) { + log.logging.getEntries = (options_, callback) => { assert.deepStrictEqual(options_, extend({}, EXPECTED_OPTIONS, options)); callback(); // done() }; @@ -279,14 +279,14 @@ describe('Log', function() { }); }); - describe('getEntriesStream', function() { + describe('getEntriesStream', () => { const fakeStream = {}; const EXPECTED_OPTIONS = { filter: 'logName="' + LOG_NAME_FORMATTED + '"', }; - it('should call Logging getEntriesStream with defaults', function(done) { - log.logging.getEntriesStream = function(options) { + it('should call Logging getEntriesStream with defaults', done => { + log.logging.getEntriesStream = options => { assert.deepStrictEqual(options, EXPECTED_OPTIONS); setImmediate(done); return fakeStream; @@ -296,13 +296,13 @@ describe('Log', function() { assert.strictEqual(stream, fakeStream); }); - it('should allow overriding the options', function(done) { + it('should allow overriding the options', done => { const options = { custom: true, filter: 'custom filter', }; - log.logging.getEntriesStream = function(options_) { + log.logging.getEntriesStream = options_ => { assert.deepStrictEqual(options_, extend({}, EXPECTED_OPTIONS, options)); setImmediate(done); return fakeStream; @@ -313,27 +313,27 @@ describe('Log', function() { }); }); - describe('write', function() { + describe('write', () => { const ENTRY = {}; const OPTIONS = {}; const FAKE_RESOURCE = 'fake-resource'; - beforeEach(function() { - log.decorateEntries_ = function(entries) { + beforeEach(() => { + log.decorateEntries_ = entries => { return entries; }; - log.metadata_.getDefaultResource = function(callback) { + log.metadata_.getDefaultResource = callback => { callback(null, FAKE_RESOURCE); }; }); - it('should forward options.resource to request', function(done) { + it('should forward options.resource to request', done => { const CUSTOM_RESOURCE = 'custom-resource'; const optionsWithResource = extend({}, OPTIONS, { resource: CUSTOM_RESOURCE, }); - log.logging.request = function(config, callback) { + log.logging.request = (config, callback) => { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); @@ -351,7 +351,7 @@ describe('Log', function() { log.write(ENTRY, optionsWithResource, done); }); - it('should transform camelcase label keys to snake case', function(done) { + it('should transform camelcase label keys to snake case', done => { const CUSTOM_RESOURCE = { labels: { camelCaseKey: 'camel-case-key-val', @@ -366,7 +366,7 @@ describe('Log', function() { resource: CUSTOM_RESOURCE, }); - log.logging.request = function(config, callback) { + log.logging.request = (config, callback) => { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); @@ -384,8 +384,8 @@ describe('Log', function() { log.write(ENTRY, optionsWithResource, done); }); - it('should make the correct API request', function(done) { - log.logging.request = function(config, callback) { + it('should make the correct API request', done => { + log.logging.request = (config, callback) => { assert.strictEqual(config.client, 'LoggingServiceV2Client'); assert.strictEqual(config.method, 'writeLogEntries'); @@ -403,15 +403,15 @@ describe('Log', function() { log.write(ENTRY, OPTIONS, done); }); - it('should arrify & decorate the entries', function(done) { + it('should arrify & decorate the entries', done => { const decoratedEntries = []; - log.decorateEntries_ = function(entries) { + log.decorateEntries_ = entries => { assert.strictEqual(entries[0], ENTRY); return decoratedEntries; }; - log.logging.request = function(config) { + log.logging.request = config => { assert.strictEqual(config.reqOpts.entries, decoratedEntries); done(); }; @@ -419,8 +419,8 @@ describe('Log', function() { log.write(ENTRY, OPTIONS, assert.ifError); }); - it('should not require options', function(done) { - log.logging.request = function(config, callback) { + it('should not require options', done => { + log.logging.request = (config, callback) => { callback(); // done() }; @@ -428,46 +428,39 @@ describe('Log', function() { }); }); - describe('severity shortcuts', function() { + describe('severity shortcuts', () => { const ENTRY = {}; const LABELS = []; - beforeEach(function() { + beforeEach(() => { log.write = util.noop; }); - describe('alert', function() { - it('should format the entries', function(done) { - assignSeverityToEntriesOverride = function(entries, severity) { + describe('alert', () => { + it('should format the entries', done => { + assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'ALERT'); - done(); }; - log.alert(ENTRY, LABELS, assert.ifError); }); - it('should pass correct arguments to write', function(done) { + it('should pass correct arguments to write', done => { const assignedEntries = []; - - assignSeverityToEntriesOverride = function() { - return assignedEntries; - }; - - log.write = function(entry, labels, callback) { + assignSeverityToEntriesOverride = () => assignedEntries; + log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); callback(); // done() }; - log.alert(ENTRY, LABELS, done); }); }); - describe('critical', function() { - it('should format the entries', function(done) { - assignSeverityToEntriesOverride = function(entries, severity) { + describe('critical', () => { + it('should format the entries', done => { + assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'CRITICAL'); @@ -477,26 +470,21 @@ describe('Log', function() { log.critical(ENTRY, LABELS, assert.ifError); }); - it('should pass correct arguments to write', function(done) { + it('should pass correct arguments to write', done => { const assignedEntries = []; - - assignSeverityToEntriesOverride = function() { - return assignedEntries; - }; - - log.write = function(entry, labels, callback) { + assignSeverityToEntriesOverride = () => assignedEntries; + log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); callback(); // done() }; - log.critical(ENTRY, LABELS, done); }); }); - describe('debug', function() { - it('should format the entries', function(done) { - assignSeverityToEntriesOverride = function(entries, severity) { + describe('debug', () => { + it('should format the entries', done => { + assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'DEBUG'); @@ -506,26 +494,21 @@ describe('Log', function() { log.debug(ENTRY, LABELS, assert.ifError); }); - it('should pass correct arguments to write', function(done) { + it('should pass correct arguments to write', done => { const assignedEntries = []; - - assignSeverityToEntriesOverride = function() { - return assignedEntries; - }; - - log.write = function(entry, labels, callback) { + assignSeverityToEntriesOverride = () => assignedEntries; + log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); callback(); // done() }; - log.debug(ENTRY, LABELS, done); }); }); - describe('emergency', function() { - it('should format the entries', function(done) { - assignSeverityToEntriesOverride = function(entries, severity) { + describe('emergency', () => { + it('should format the entries', done => { + assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'EMERGENCY'); @@ -535,43 +518,36 @@ describe('Log', function() { log.emergency(ENTRY, LABELS, assert.ifError); }); - it('should pass correct arguments to write', function(done) { + it('should pass correct arguments to write', done => { const assignedEntries = []; - - assignSeverityToEntriesOverride = function() { - return assignedEntries; - }; - - log.write = function(entry, labels, callback) { + assignSeverityToEntriesOverride = () => assignedEntries; + log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); callback(); // done() }; - log.emergency(ENTRY, LABELS, done); }); }); - describe('error', function() { - it('should format the entries', function(done) { - assignSeverityToEntriesOverride = function(entries, severity) { + describe('error', () => { + it('should format the entries', done => { + assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'ERROR'); - done(); }; - log.error(ENTRY, LABELS, assert.ifError); }); - it('should pass correct arguments to write', function(done) { + it('should pass correct arguments to write', done => { const assignedEntries = []; - assignSeverityToEntriesOverride = function() { + assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = function(entry, labels, callback) { + log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); callback(); // done() @@ -581,9 +557,9 @@ describe('Log', function() { }); }); - describe('info', function() { - it('should format the entries', function(done) { - assignSeverityToEntriesOverride = function(entries, severity) { + describe('info', () => { + it('should format the entries', done => { + assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'INFO'); @@ -593,14 +569,14 @@ describe('Log', function() { log.info(ENTRY, LABELS, assert.ifError); }); - it('should pass correct arguments to write', function(done) { + it('should pass correct arguments to write', done => { const assignedEntries = []; - assignSeverityToEntriesOverride = function() { + assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = function(entry, labels, callback) { + log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); callback(); // done() @@ -610,9 +586,9 @@ describe('Log', function() { }); }); - describe('notice', function() { - it('should format the entries', function(done) { - assignSeverityToEntriesOverride = function(entries, severity) { + describe('notice', () => { + it('should format the entries', done => { + assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'NOTICE'); @@ -622,14 +598,14 @@ describe('Log', function() { log.notice(ENTRY, LABELS, assert.ifError); }); - it('should pass correct arguments to write', function(done) { + it('should pass correct arguments to write', done => { const assignedEntries = []; - assignSeverityToEntriesOverride = function() { + assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = function(entry, labels, callback) { + log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); callback(); // done() @@ -639,9 +615,9 @@ describe('Log', function() { }); }); - describe('warning', function() { - it('should format the entries', function(done) { - assignSeverityToEntriesOverride = function(entries, severity) { + describe('warning', () => { + it('should format the entries', done => { + assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'WARNING'); @@ -651,46 +627,36 @@ describe('Log', function() { log.warning(ENTRY, LABELS, assert.ifError); }); - it('should pass correct arguments to write', function(done) { + it('should pass correct arguments to write', done => { const assignedEntries = []; - - assignSeverityToEntriesOverride = function() { - return assignedEntries; - }; - - log.write = function(entry, labels, callback) { + assignSeverityToEntriesOverride = () => assignedEntries; + log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); callback(); // done() }; - log.warning(ENTRY, LABELS, done); }); }); }); - describe('decorateEntries_', function() { + describe('decorateEntries_', () => { const toJSONResponse = {}; function FakeEntry() {} - FakeEntry.prototype.toJSON = function() { - return toJSONResponse; - }; + FakeEntry.prototype.toJSON = () => toJSONResponse; - beforeEach(function() { - log.entry = function() { - return new FakeEntry(); - }; - - log.metadata_.assignDefaultResource = function(entryJson, callback) { + beforeEach(() => { + log.entry = () => new FakeEntry(); + log.metadata_.assignDefaultResource = (entryJson, callback) => { callback(null, entryJson); }; }); - it('should create an Entry object if one is not provided', function() { + it('should create an Entry object if one is not provided', () => { const entry = {}; - log.entry = function(entry_) { + log.entry = entry_ => { assert.strictEqual(entry_, entry); return new FakeEntry(); }; @@ -699,25 +665,21 @@ describe('Log', function() { assert.strictEqual(decoratedEntries[0], toJSONResponse); }); - it('should get JSON format from Entry object', function() { - log.entry = function() { + it('should get JSON format from Entry object', () => { + log.entry = () => { throw new Error('should not be called'); }; - const entry = new Entry(); - entry.toJSON = function() { - return toJSONResponse; - }; - + entry.toJSON = () => toJSONResponse; const decoratedEntries = log.decorateEntries_([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); }); - it('should pass log.removeCircular to toJSON', function(done) { + it('should pass log.removeCircular to toJSON', done => { log.removeCircular_ = true; const entry = new Entry(); - entry.toJSON = function(options_) { + entry.toJSON = options_ => { assert.deepStrictEqual(options_, {removeCircular: true}); setImmediate(done); return {}; @@ -726,11 +688,11 @@ describe('Log', function() { log.decorateEntries_([entry]); }); - it('should throw error from serialization', function() { + it('should throw error from serialization', () => { const error = new Error('Error.'); const entry = new Entry(); - entry.toJSON = function() { + entry.toJSON = () => { throw error; }; diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index ef7e587ebb1..8c6796f0a38 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -58,7 +58,7 @@ const fakeFS = { }, }; -describe('metadata', function() { +describe('metadata', () => { let MetadataCached; let Metadata; let metadata; @@ -67,7 +67,7 @@ describe('metadata', function() { const ENV_CACHED = extend({}, process.env); - before(function() { + before(() => { Metadata = proxyquire('../src/metadata', { 'gcp-metadata': fakeGcpMetadata, fs: fakeFS, @@ -76,7 +76,7 @@ describe('metadata', function() { MetadataCached = extend({}, Metadata); }); - beforeEach(function() { + beforeEach(() => { LOGGING = { auth: {}, }; @@ -86,26 +86,26 @@ describe('metadata', function() { readFileShouldError = false; }); - afterEach(function() { + afterEach(() => { extend(process.env, ENV_CACHED); }); - describe('instantiation', function() { - it('should localize Logging instance', function() { + describe('instantiation', () => { + it('should localize Logging instance', () => { assert.strictEqual(metadata.logging, LOGGING); }); }); - describe('getCloudFunctionDescriptor', function() { + describe('getCloudFunctionDescriptor', () => { const FUNCTION_NAME = 'function-name'; const FUNCTION_REGION = 'function-region'; - beforeEach(function() { + beforeEach(() => { process.env.FUNCTION_NAME = FUNCTION_NAME; process.env.FUNCTION_REGION = FUNCTION_REGION; }); - it('should return the correct descriptor', function() { + it('should return the correct descriptor', () => { assert.deepStrictEqual(Metadata.getCloudFunctionDescriptor(), { type: 'cloud_function', labels: { @@ -116,18 +116,18 @@ describe('metadata', function() { }); }); - describe('getGAEDescriptor', function() { + describe('getGAEDescriptor', () => { const GAE_MODULE_NAME = 'gae-module-name'; const GAE_SERVICE = 'gae-service'; const GAE_VERSION = 'gae-version'; - beforeEach(function() { + beforeEach(() => { process.env.GAE_MODULE_NAME = GAE_MODULE_NAME; process.env.GAE_SERVICE = GAE_SERVICE; process.env.GAE_VERSION = GAE_VERSION; }); - it('should return the correct descriptor', function() { + it('should return the correct descriptor', () => { assert.deepStrictEqual(Metadata.getGAEDescriptor(), { type: 'gae_app', labels: { @@ -137,7 +137,7 @@ describe('metadata', function() { }); }); - it('should use GAE_MODULE_NAME for module_id', function() { + it('should use GAE_MODULE_NAME for module_id', () => { delete process.env.GAE_SERVICE; const moduleId = Metadata.getGAEDescriptor().labels.module_id; @@ -145,16 +145,16 @@ describe('metadata', function() { }); }); - describe('getGKEDescriptor', function() { + describe('getGKEDescriptor', () => { const CLUSTER_NAME = 'gke-cluster-name'; - it('should return the correct descriptor', function(done) { + it('should return the correct descriptor', done => { instanceOverride = { path: 'attributes/cluster-name', successArg: CLUSTER_NAME, }; - Metadata.getGKEDescriptor(function(err, descriptor) { + Metadata.getGKEDescriptor((err, descriptor) => { assert.ifError(err); assert.deepStrictEqual(descriptor, { type: 'container', @@ -167,21 +167,21 @@ describe('metadata', function() { }); }); - it('should return error on failure to acquire metadata', function(done) { + it('should return error on failure to acquire metadata', done => { const FAKE_ERROR = new Error(); instanceOverride = { errorArg: FAKE_ERROR, }; - Metadata.getGKEDescriptor(function(err) { + Metadata.getGKEDescriptor(err => { assert.strictEqual(err, FAKE_ERROR); done(); }); }); - it('should return error when read of namespace file fails', function(done) { + it('should return error when read of namespace file fails', done => { readFileShouldError = true; - Metadata.getGKEDescriptor(function(err) { + Metadata.getGKEDescriptor(err => { assert.ok(err); assert.ok(err.message.includes(FAKE_READFILE_ERROR_MESSAGE)); done(); @@ -189,12 +189,12 @@ describe('metadata', function() { }); }); - describe('getGCEDescriptor', function() { + describe('getGCEDescriptor', () => { const INSTANCE_ID = 'fake-instance-id'; const ZONE_ID = 'morrowind-vivec-1'; const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; - it('should return the correct descriptor', function(done) { + it('should return the correct descriptor', done => { instanceOverride = [ { path: 'id', @@ -206,7 +206,7 @@ describe('metadata', function() { }, ]; - Metadata.getGCEDescriptor(function(err, descriptor) { + Metadata.getGCEDescriptor((err, descriptor) => { assert.ifError(err); assert.deepStrictEqual(descriptor, { type: 'gce_instance', @@ -219,50 +219,50 @@ describe('metadata', function() { }); }); - it('should return error on failure to acquire metadata', function(done) { + it('should return error on failure to acquire metadata', done => { const FAKE_ERROR = new Error(); instanceOverride = { errorArg: FAKE_ERROR, }; - Metadata.getGCEDescriptor(function(err) { + Metadata.getGCEDescriptor(err => { assert.strictEqual(err, FAKE_ERROR); done(); }); }); }); - describe('getGlobalDescriptor', function() { - it('should return the correct descriptor', function() { + describe('getGlobalDescriptor', () => { + it('should return the correct descriptor', () => { assert.deepStrictEqual(Metadata.getGlobalDescriptor(), { type: 'global', }); }); }); - describe('getDefaultResource', function() { - it('should get the environment from auth client', function(done) { - metadata.logging.auth.getEnv = function() { + describe('getDefaultResource', () => { + it('should get the environment from auth client', done => { + metadata.logging.auth.getEnv = () => { done(); }; metadata.getDefaultResource(assert.ifError); }); - describe('environments', function() { - describe('app engine', function() { - it('should return correct descriptor', function(done) { + describe('environments', () => { + describe('app engine', () => { + it('should return correct descriptor', done => { const DESCRIPTOR = {}; - Metadata.getGAEDescriptor = function() { + Metadata.getGAEDescriptor = () => { return DESCRIPTOR; }; - metadata.logging.auth.getEnv = function() { + metadata.logging.auth.getEnv = () => { return Promise.resolve('APP_ENGINE'); }; - metadata.getDefaultResource(function(err, defaultResource) { + metadata.getDefaultResource((err, defaultResource) => { assert.ifError(err); assert.strictEqual(defaultResource, DESCRIPTOR); done(); @@ -270,19 +270,19 @@ describe('metadata', function() { }); }); - describe('cloud function', function() { - it('should return correct descriptor', function(done) { + describe('cloud function', () => { + it('should return correct descriptor', done => { const DESCRIPTOR = {}; - Metadata.getCloudFunctionDescriptor = function() { + Metadata.getCloudFunctionDescriptor = () => { return DESCRIPTOR; }; - metadata.logging.auth.getEnv = function() { + metadata.logging.auth.getEnv = () => { return Promise.resolve('CLOUD_FUNCTIONS'); }; - metadata.getDefaultResource(function(err, defaultResource) { + metadata.getDefaultResource((err, defaultResource) => { assert.ifError(err); assert.strictEqual(defaultResource, DESCRIPTOR); done(); @@ -290,8 +290,8 @@ describe('metadata', function() { }); }); - describe('compute engine', function() { - it('should return correct descriptor', function(done) { + describe('compute engine', () => { + it('should return correct descriptor', done => { const INSTANCE_ID = 1234567; const ZONE_ID = 'cyrodiil-anvil-2'; const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; @@ -306,11 +306,11 @@ describe('metadata', function() { }, ]; - metadata.logging.auth.getEnv = function() { + metadata.logging.auth.getEnv = () => { return Promise.resolve('COMPUTE_ENGINE'); }; - metadata.getDefaultResource(function(err, defaultResource) { + metadata.getDefaultResource((err, defaultResource) => { assert.ifError(err); assert.deepStrictEqual(defaultResource, { type: 'gce_instance', @@ -339,11 +339,11 @@ describe('metadata', function() { }, ]; - metadata.logging.auth.getEnv = function() { + metadata.logging.auth.getEnv = () => { return Promise.resolve('COMPUTE_ENGINE'); }; - metadata.getDefaultResource(function(err, defaultResource) { + metadata.getDefaultResource((err, defaultResource) => { assert.ifError(err); assert.deepStrictEqual(defaultResource, { type: 'gce_instance', @@ -357,19 +357,19 @@ describe('metadata', function() { }); }); - describe('container engine', function() { - it('should return correct descriptor', function(done) { + describe('container engine', () => { + it('should return correct descriptor', done => { const CLUSTER_NAME = 'overridden-value'; instanceOverride = { path: 'attributes/cluster-name', successArg: CLUSTER_NAME, }; - metadata.logging.auth.getEnv = function() { + metadata.logging.auth.getEnv = () => { return Promise.resolve('KUBERNETES_ENGINE'); }; - metadata.getDefaultResource(function(err, defaultResource) { + metadata.getDefaultResource((err, defaultResource) => { assert.ifError(err); assert.deepStrictEqual(defaultResource, { type: 'container', @@ -383,19 +383,19 @@ describe('metadata', function() { }); }); - describe('global', function() { - it('should return correct descriptor', function(done) { + describe('global', () => { + it('should return correct descriptor', done => { const DESCRIPTOR = {}; - Metadata.getGlobalDescriptor = function() { + Metadata.getGlobalDescriptor = () => { return DESCRIPTOR; }; - metadata.logging.auth.getEnv = function() { + metadata.logging.auth.getEnv = () => { return Promise.resolve('NONE'); }; - metadata.getDefaultResource(function(err, defaultResource) { + metadata.getDefaultResource((err, defaultResource) => { assert.ifError(err); assert.strictEqual(defaultResource, DESCRIPTOR); done(); From aeda9afd1459965560cb78f96c5f7ee4ce820489 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 18 Sep 2018 10:51:41 -0700 Subject: [PATCH 0233/1029] Enable no-var in eslint (#228) --- handwritten/logging/.eslintrc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/.eslintrc.yml b/handwritten/logging/.eslintrc.yml index bed57fbc42c..65f1dce6c0c 100644 --- a/handwritten/logging/.eslintrc.yml +++ b/handwritten/logging/.eslintrc.yml @@ -11,3 +11,4 @@ rules: block-scoped-var: error eqeqeq: error no-warning-comments: warn + no-var: error From 7456b010ea951329db101c12dd01f89e96a986b7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 20 Sep 2018 12:30:01 -0700 Subject: [PATCH 0234/1029] Enable prefer-const in the eslint config (#229) --- handwritten/logging/.eslintrc.yml | 1 + .../logging_service_v2_smoke_test.js | 24 +++++++++++-------- handwritten/logging/src/index.js | 8 +++---- .../src/v2/config_service_v2_client.js | 2 +- .../src/v2/logging_service_v2_client.js | 2 +- .../src/v2/metrics_service_v2_client.js | 2 +- handwritten/logging/test/index.js | 8 +++---- 7 files changed, 26 insertions(+), 21 deletions(-) diff --git a/handwritten/logging/.eslintrc.yml b/handwritten/logging/.eslintrc.yml index 65f1dce6c0c..73eeec27612 100644 --- a/handwritten/logging/.eslintrc.yml +++ b/handwritten/logging/.eslintrc.yml @@ -12,3 +12,4 @@ rules: eqeqeq: error no-warning-comments: warn no-var: error + prefer-const: error diff --git a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js index d30703b14d3..f1ca8de3f41 100644 --- a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js +++ b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js @@ -16,30 +16,34 @@ describe('LoggingServiceV2SmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { - throw new Error("Usage: GCLOUD_PROJECT= node #{$0}"); + throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); } - var projectId = process.env.GCLOUD_PROJECT; + const projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service', done => { const logging = require('../src'); - var client = new logging.v2.LoggingServiceV2Client({ + const client = new logging.v2.LoggingServiceV2Client({ // optional auth parameters. }); - var formattedLogName = client.logPath(projectId, "test-" + Date.now().toString()); - var resource = {}; - var labels = {}; - var entries = []; - var request = { + const formattedLogName = client.logPath( + projectId, + 'test-' + Date.now().toString() + ); + const resource = {}; + const labels = {}; + const entries = []; + const request = { logName: formattedLogName, resource: resource, labels: labels, entries: entries, }; - client.writeLogEntries(request) + client + .writeLogEntries(request) .then(responses => { - var response = responses[0]; + const response = responses[0]; console.log(response); }) .then(done) diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index da73649762d..c5b692345ad 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -111,14 +111,14 @@ class Logging { constructor(options) { // Determine what scopes are needed. // It is the union of the scopes on all three clients. - let scopes = []; - let clientClasses = [ + const scopes = []; + const clientClasses = [ v2.ConfigServiceV2Client, v2.LoggingServiceV2Client, v2.MetricsServiceV2Client, ]; - for (let clientClass of clientClasses) { - for (let scope of clientClass.scopes) { + for (const clientClass of clientClasses) { + for (const scope of clientClass.scopes) { if (clientClasses.indexOf(scope) === -1) { scopes.push(scope); } diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 119dafb64a4..9a0ee5017aa 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -154,7 +154,7 @@ class ConfigServiceV2Client { 'updateExclusion', 'deleteExclusion', ]; - for (let methodName of configServiceV2StubMethods) { + for (const methodName of configServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( configServiceV2Stub.then( stub => diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index e203b5dfb2a..4f896d966bd 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -179,7 +179,7 @@ class LoggingServiceV2Client { 'listMonitoredResourceDescriptors', 'listLogs', ]; - for (let methodName of loggingServiceV2StubMethods) { + for (const methodName of loggingServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( loggingServiceV2Stub.then( stub => diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 4086901e65b..86aa9912ec0 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -146,7 +146,7 @@ class MetricsServiceV2Client { 'updateLogMetric', 'deleteLogMetric', ]; - for (let methodName of metricsServiceV2StubMethods) { + for (const methodName of metricsServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( metricsServiceV2Stub.then( stub => diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index d6c4d21afa1..822a027d111 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -136,15 +136,15 @@ describe('Logging', () => { }); describe('instantiation', () => { - let EXPECTED_SCOPES = []; - let clientClasses = [ + const EXPECTED_SCOPES = []; + const clientClasses = [ v2.ConfigServiceV2Client, v2.LoggingServiceV2Client, v2.MetricsServiceV2Client, ]; - for (let clientClass of clientClasses) { - for (let scope of clientClass.scopes) { + for (const clientClass of clientClasses) { + for (const scope of clientClass.scopes) { if (clientClasses.indexOf(scope) === -1) { EXPECTED_SCOPES.push(scope); } From 28b8ebde1549e3e8dd43625c75031d90c8902b20 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 20 Sep 2018 17:59:54 -0400 Subject: [PATCH 0235/1029] build: write logs to separate file (#230) --- handwritten/logging/system-test/logging.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 49872a464aa..2cb9b603339 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -281,7 +281,7 @@ describe('Logging', () => { }); describe('logs', () => { - const log = logging.log('syslog'); + const log = logging.log(`system-test-logs-${uuid.v4()}`); const logEntries = [ // string data @@ -315,6 +315,8 @@ describe('Logging', () => { }, }; + after(done => log.delete(done)); + it('should list log entries', done => { logging.getEntries( { From a5b8bdaabcde5f8a16572383ba9f95c42f12ff3c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 20 Sep 2018 15:49:59 -0700 Subject: [PATCH 0236/1029] Release @google-cloud/logging v4.0.0 (#231) --- handwritten/logging/CHANGELOG.md | 33 +++++++++++++++++++++++++++----- handwritten/logging/package.json | 2 +- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 268d4ce4605..ea4a01f4fad 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,20 +4,43 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions -## v3.0.3 +## v4.0.0 -### Implementation Changes +**This release has breaking changes**. This library is now compatible with es module import syntax. + +#### Old Code +```js +const logging = require('@google-cloud/logging')(); +// or... +const Logging = require('@google-cloud/logging'); +const logging = new Logging(); +``` + +#### New Code +```js +const {Logging} = require('@google-cloud/logging'); +const logging = new Logging(); +``` + +### Breaking changes +- Use es classes ([#219](https://github.com/googleapis/nodejs-logging/pull/219)) + +### Bug Fixes - fix(gce): instance id can be a big number ([#222](https://github.com/googleapis/nodejs-logging/pull/222)) -- fix(deps): update dependency google-gax to ^0.20.0 ([#220](https://github.com/googleapis/nodejs-logging/pull/220)) +- fix(deps): update dependency @google-cloud/storage to v2 ([#213](https://github.com/googleapis/nodejs-logging/pull/213)) - fix(GCE): add zone label in GCE descriptor ([#215](https://github.com/googleapis/nodejs-logging/pull/215)) - fix(deps): update dependency google-auth-library to v2 ([#210](https://github.com/googleapis/nodejs-logging/pull/210)) ### Internal / Testing Changes -- Use es classes ([#219](https://github.com/googleapis/nodejs-logging/pull/219)) +- build: write logs to separate file ([#230](https://github.com/googleapis/nodejs-logging/pull/230)) +- Enable prefer-const in the eslint config ([#229](https://github.com/googleapis/nodejs-logging/pull/229)) +- fix(deps): roll back dependency @google-cloud/logging to ^3.0.2 ([#224](https://github.com/googleapis/nodejs-logging/pull/224)) +- Enable no-var in eslint ([#228](https://github.com/googleapis/nodejs-logging/pull/228)) +- Use arrow functions ([#227](https://github.com/googleapis/nodejs-logging/pull/227)) - Switch to let/const ([#221](https://github.com/googleapis/nodejs-logging/pull/221)) +- fix(deps): update dependency google-gax to ^0.20.0 ([#220](https://github.com/googleapis/nodejs-logging/pull/220)) - Use let and const ([#217](https://github.com/googleapis/nodejs-logging/pull/217)) - Update CI config ([#218](https://github.com/googleapis/nodejs-logging/pull/218)) -- fix(deps): update dependency @google-cloud/storage to v2 ([#213](https://github.com/googleapis/nodejs-logging/pull/213)) - Retry npm install in CI ([#214](https://github.com/googleapis/nodejs-logging/pull/214)) - add templates to synth.py and run it ([#211](https://github.com/googleapis/nodejs-logging/pull/211)) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7b1bc913542..8db88d6e636 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "3.0.3", + "version": "4.0.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 190bf9756223345bf9afbe2c6819e008bf56c7df Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 20 Sep 2018 17:51:33 -0700 Subject: [PATCH 0237/1029] fix(deps): Upgrade to @google-cloud/common-grpc 0.9.0 (#232) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8db88d6e636..2f6e8961d35 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,7 +63,7 @@ "lint": "eslint src/ samples/ system-test/ test/" }, "dependencies": { - "@google-cloud/common-grpc": "^0.8.0", + "@google-cloud/common-grpc": "^0.9.0", "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.3.0", From a3f6cc1a118b2e7158ad78ba64ed9d2b84a2c3bc Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 20 Sep 2018 17:58:01 -0700 Subject: [PATCH 0238/1029] Release v4.0.1 (#233) --- handwritten/logging/CHANGELOG.md | 5 +++++ handwritten/logging/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ea4a01f4fad..7c9117b2d37 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,11 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.0.1 + +### Implementation Changes +- fix(deps): Upgrade to @google-cloud/common-grpc 0.9.0 ([#232](https://github.com/googleapis/nodejs-logging/pull/232)) + ## v4.0.0 **This release has breaking changes**. This library is now compatible with es module import syntax. diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2f6e8961d35..a2cdad0794c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.0.0", + "version": "4.0.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From bf2c1dfcfb9377f1ba5ad6f6610e50225e1f7ba0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 24 Sep 2018 17:00:58 -0700 Subject: [PATCH 0239/1029] test: remove appveyor config (#234) --- handwritten/logging/.appveyor.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 handwritten/logging/.appveyor.yml diff --git a/handwritten/logging/.appveyor.yml b/handwritten/logging/.appveyor.yml deleted file mode 100644 index 24082152655..00000000000 --- a/handwritten/logging/.appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -environment: - matrix: - - nodejs_version: 8 - -install: - - ps: Install-Product node $env:nodejs_version - - npm install -g npm # Force using the latest npm to get dedupe during install - - set PATH=%APPDATA%\npm;%PATH% - - npm install --force --ignore-scripts - -test_script: - - node --version - - npm --version - - npm rebuild - - npm test - -build: off - -matrix: - fast_finish: true From 13461368abb1447aaa523193ad0b9163af36104a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 27 Sep 2018 16:31:07 -0700 Subject: [PATCH 0240/1029] chore(deps): update dependency @google-cloud/pubsub to v0.20.1 (#236) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a2cdad0794c..3548e8f4b0e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -85,7 +85,7 @@ "devDependencies": { "@google-cloud/bigquery": "*", "@google-cloud/nodejs-repo-tools": "^2.3.3", - "@google-cloud/pubsub": "0.20.0", + "@google-cloud/pubsub": "^0.20.1", "@google-cloud/storage": "^2.0.2", "async": "^2.6.1", "bignumber.js": "^7.2.1", From 03c79e7a6cb572ac28723fc0af182c1c9fdda4e3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 1 Oct 2018 05:02:51 -0700 Subject: [PATCH 0241/1029] chore(deps): update dependency eslint-plugin-prettier to v3 (#238) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3548e8f4b0e..1e405dc0810 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -93,7 +93,7 @@ "eslint": "^5.4.0", "eslint-config-prettier": "^3.0.1", "eslint-plugin-node": "^7.0.1", - "eslint-plugin-prettier": "^2.6.2", + "eslint-plugin-prettier": "^3.0.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", From 5a0ae99d16545899f779493f4f4239c55f229f36 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 15 Oct 2018 14:43:37 -0700 Subject: [PATCH 0242/1029] build: fix codecov uploading on Kokoro (#244) * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro * build: fix codecov uploading on Kokoro --- handwritten/logging/.circleci/config.yml | 2 -- handwritten/logging/.circleci/npm-install-retry.js | 2 +- .../logging/.kokoro/presubmit/node8/samples-test.cfg | 7 +++++++ .../logging/.kokoro/presubmit/node8/system-test.cfg | 7 +++++++ handwritten/logging/.kokoro/presubmit/node8/test.cfg | 9 +++++++++ handwritten/logging/.kokoro/samples-test.sh | 7 +++++++ handwritten/logging/.kokoro/system-test.sh | 2 ++ handwritten/logging/.kokoro/test.bat | 2 ++ handwritten/logging/.kokoro/test.sh | 3 ++- handwritten/logging/codecov.yaml | 4 ++++ 10 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 handwritten/logging/.kokoro/presubmit/node8/samples-test.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node8/system-test.cfg create mode 100644 handwritten/logging/codecov.yaml diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 8af6a4d0489..da54155fc57 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -68,8 +68,6 @@ jobs: environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test - - run: node_modules/.bin/codecov - node8: docker: - image: 'node:8' diff --git a/handwritten/logging/.circleci/npm-install-retry.js b/handwritten/logging/.circleci/npm-install-retry.js index ae3220d7348..3240aa2cbf2 100755 --- a/handwritten/logging/.circleci/npm-install-retry.js +++ b/handwritten/logging/.circleci/npm-install-retry.js @@ -6,7 +6,7 @@ let spawn = require('child_process').spawn; //USE: ./index.js [... NPM ARGS] // -let timeout = process.argv[2] || 60000; +let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000; let attempts = process.argv[3] || 3; let args = process.argv.slice(4); if (args.length === 0) { diff --git a/handwritten/logging/.kokoro/presubmit/node8/samples-test.cfg b/handwritten/logging/.kokoro/presubmit/node8/samples-test.cfg new file mode 100644 index 00000000000..18403029858 --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node8/samples-test.cfg @@ -0,0 +1,7 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/samples-test.sh" +} diff --git a/handwritten/logging/.kokoro/presubmit/node8/system-test.cfg b/handwritten/logging/.kokoro/presubmit/node8/system-test.cfg new file mode 100644 index 00000000000..1d18894c806 --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node8/system-test.cfg @@ -0,0 +1,7 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/system-test.sh" +} diff --git a/handwritten/logging/.kokoro/presubmit/node8/test.cfg b/handwritten/logging/.kokoro/presubmit/node8/test.cfg index e69de29bb2d..468b8c7197a 100644 --- a/handwritten/logging/.kokoro/presubmit/node8/test.cfg +++ b/handwritten/logging/.kokoro/presubmit/node8/test.cfg @@ -0,0 +1,9 @@ +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index 76edbbbb247..5a81ec01fcc 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -24,6 +24,13 @@ export GCLOUD_PROJECT=long-door-651 cd $(dirname $0)/.. +# Run a pre-test hook, if a pre-samples-test.sh is in the project +if [ -f .kokoro/pre-samples-test.sh ]; then + set +x + . .kokoro/pre-samples-test.sh + set -x +fi + npm install # Install and link samples diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index a954b79429d..fd8f0b638d0 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -26,7 +26,9 @@ cd $(dirname $0)/.. # Run a pre-test hook, if a pre-system-test.sh is in the project if [ -f .kokoro/pre-system-test.sh ]; then + set +x . .kokoro/pre-system-test.sh + set -x fi npm install diff --git a/handwritten/logging/.kokoro/test.bat b/handwritten/logging/.kokoro/test.bat index a8534ba801c..d60473666b0 100644 --- a/handwritten/logging/.kokoro/test.bat +++ b/handwritten/logging/.kokoro/test.bat @@ -17,6 +17,8 @@ cd /d %~dp0 cd .. +call npm install -g npm@5 || goto :error + call npm install || goto :error call npm run test || goto :error diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 51f29589b19..eb25b89b95e 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -22,4 +22,5 @@ cd $(dirname $0)/.. npm install npm test -node_modules/.bin/codecov + +bash $KOKORO_GFILE_DIR/codecov.sh diff --git a/handwritten/logging/codecov.yaml b/handwritten/logging/codecov.yaml new file mode 100644 index 00000000000..5724ea9478d --- /dev/null +++ b/handwritten/logging/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com From f68a36d582c70bf4d49582e61696f73ae3886574 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 15 Oct 2018 14:52:36 -0700 Subject: [PATCH 0243/1029] fix(deps): update dependency google-proto-files to ^0.17.0 (#242) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1e405dc0810..0a8a6396b7f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -73,7 +73,7 @@ "gcp-metadata": "^0.8.0", "google-auth-library": "^2.0.0", "google-gax": "^0.20.0", - "google-proto-files": "^0.16.1", + "google-proto-files": "^0.17.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", "protobufjs": "^6.8.8", From 6125d252cc9fb04ed627fb21cbfcc0842fcd6241 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Fri, 19 Oct 2018 15:56:35 -0700 Subject: [PATCH 0244/1029] fix(test): block auth during public system tests (#249) --- handwritten/logging/package.json | 1 + handwritten/logging/system-test/logging.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0a8a6396b7f..472e76a4173 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,6 +76,7 @@ "google-proto-files": "^0.17.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", + "nock": "^10.0.1", "protobufjs": "^6.8.8", "pumpify": "^1.5.1", "snakecase-keys": "^1.2.0", diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 2cb9b603339..0969cc405f7 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -22,12 +22,19 @@ const BigQuery = require('@google-cloud/bigquery'); const exec = require('methmeth'); const extend = require('extend'); const is = require('is'); +const nock = require('nock'); const PubSub = require('@google-cloud/pubsub'); const {Storage} = require('@google-cloud/storage'); const uuid = require('uuid'); const {Logging} = require('../'); +// block all attempts to chat with the metadata server (kokoro runs on GCE) +nock('http://metadata.google.internal') + .get(() => true) + .replyWithError({code: 'ENOTFOUND'}) + .persist(); + describe('Logging', () => { let PROJECT_ID; const TESTS_PREFIX = 'gcloud-logging-test'; From cf3e4ff33bbb445a317cc265cbee9607211b9a19 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Sat, 20 Oct 2018 08:32:55 -0700 Subject: [PATCH 0245/1029] refactor: introduce typescript compiler (#246) Use TypeScript compiler with the `allowJs` option. With the toolchain in place we can start migrating the files incrementally. --- handwritten/logging/.clang-format | 3 +++ handwritten/logging/package.json | 24 ++++++++++++------- handwritten/logging/src/index.js | 2 +- .../src/v2/config_service_v2_client.js | 2 +- .../src/v2/logging_service_v2_client.js | 2 +- .../src/v2/metrics_service_v2_client.js | 2 +- handwritten/logging/synth.py | 11 +++++++++ handwritten/logging/system-test/logging.js | 2 +- handwritten/logging/test/index.js | 4 ++-- handwritten/logging/tsconfig.json | 24 +++++++++++++++++++ handwritten/logging/tslint.json | 3 +++ 11 files changed, 64 insertions(+), 15 deletions(-) create mode 100644 handwritten/logging/.clang-format create mode 100644 handwritten/logging/tsconfig.json create mode 100644 handwritten/logging/tslint.json diff --git a/handwritten/logging/.clang-format b/handwritten/logging/.clang-format new file mode 100644 index 00000000000..7d6cf97e108 --- /dev/null +++ b/handwritten/logging/.clang-format @@ -0,0 +1,3 @@ +Language: JavaScript +BasedOnStyle: Google +ColumnLimit: 80 \ No newline at end of file diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 472e76a4173..2fad65df12b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -8,10 +8,9 @@ "node": ">=6.0.0" }, "repository": "googleapis/nodejs-logging", - "main": "./src/index.js", + "main": "./build/src/index.js", "files": [ - "protos", - "src", + "build", "AUTHORS", "CONTRIBUTORS", "LICENSE" @@ -51,16 +50,23 @@ "greenkeeper[bot] " ], "scripts": { - "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", - "test-no-cover": "mocha test/*.js", + "cover": "nyc --reporter=lcov mocha build/test/*.js && nyc report", + "test-no-cover": "mocha build/test/*.js", "test": "npm run cover", "docs": "jsdoc -c .jsdoc.js", "prettier": "prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", "publish-module": "node ../../scripts/publish.js logging", - "system-test": "mocha system-test/*.js --timeout 600000", + "system-test": "mocha build/system-test/*.js --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "eslint src/ samples/ system-test/ test/" + "lint": "eslint samples/", + "check": "echo \"gts check disabled until ts migration is complete\"", + "clean": "gts clean", + "compile": "tsc -p . && cp src/v2/*.json build/src/v2 && cp -r protos build", + "fix": "gts fix", + "prepare": "npm run compile", + "pretest": "npm run compile", + "posttest": "npm run check" }, "dependencies": { "@google-cloud/common-grpc": "^0.9.0", @@ -105,6 +111,8 @@ "prettier": "^1.14.2", "propprop": "^0.3.1", "proxyquire": "^2.1.0", - "uuid": "^3.3.2" + "uuid": "^3.3.2", + "gts": "^0.8.0", + "typescript": "~3.1.0" } } diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index c5b692345ad..f7f351d0f91 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -28,7 +28,7 @@ const pumpify = require('pumpify'); const streamEvents = require('stream-events'); const through = require('through2'); -const PKG = require('../package.json'); +const PKG = require('../../package.json'); const v2 = require('./v2'); const {Entry} = require('./entry'); diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 9a0ee5017aa..4f3a22ca950 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -19,7 +19,7 @@ const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); -const VERSION = require('../../package.json').version; +const VERSION = require('../../../package.json').version; /** * Service for configuring sinks used to export log entries outside of diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 4f896d966bd..9707cbb3c4c 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -20,7 +20,7 @@ const merge = require('lodash.merge'); const path = require('path'); const protobuf = require('protobufjs'); -const VERSION = require('../../package.json').version; +const VERSION = require('../../../package.json').version; /** * Service for ingesting and querying logs. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 86aa9912ec0..1ac908727a6 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -19,7 +19,7 @@ const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); -const VERSION = require('../../package.json').version; +const VERSION = require('../../../package.json').version; /** * Service for configuring logs-based metrics. diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 7c280f4744a..974616df549 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -34,6 +34,17 @@ s.copy(v2_library, excludes=["src/index.js", "README.md", "package.json"]) +s.replace( + "src/v2/config_service_v2_client.js", "../../package.json", "../../../package.json" +) +s.replace( + "src/v2/logging_service_v2_client.js", "../../package.json", "../../../package.json" +) +s.replace( + "src/v2/metrics_service_v2_client.js", "../../package.json", "../../../package.json" +) + + templates = common_templates.node_library() s.copy(templates) diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 0969cc405f7..3ea73b80c31 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -27,7 +27,7 @@ const PubSub = require('@google-cloud/pubsub'); const {Storage} = require('@google-cloud/storage'); const uuid = require('uuid'); -const {Logging} = require('../'); +const {Logging} = require('../src/index'); // block all attempts to chat with the metadata server (kokoro runs on GCE) nock('http://metadata.google.internal') diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index 822a027d111..e1f9a520f91 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -23,7 +23,7 @@ const proxyquire = require('proxyquire'); const through = require('through2'); const {util} = require('@google-cloud/common-grpc'); const {v2} = require('../src'); -const PKG = require('../package.json'); +const PKG = require('../../package.json'); let extended = false; const fakePaginator = { @@ -108,7 +108,7 @@ describe('Logging', () => { const PROJECT_ID = 'project-id'; before(() => { - Logging = proxyquire('../', { + Logging = proxyquire('../../', { '@google-cloud/common-grpc': { util: fakeUtil, }, diff --git a/handwritten/logging/tsconfig.json b/handwritten/logging/tsconfig.json new file mode 100644 index 00000000000..75e8c330a19 --- /dev/null +++ b/handwritten/logging/tsconfig.json @@ -0,0 +1,24 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "allowJs": true, + "declaration": false, + "skipLibCheck": true + }, + "include": [ + "src/*.ts", + "src/*/js", + "src/**/*.ts", + "src/**/*.js", + "test/*.ts", + "test/*.js", + "test/**/*.ts", + "test/**/*.js", + "system-test/*.ts", + "system-test/*.js", + "system-test/**/*.ts", + "system-test/**/*.js" + ] +} diff --git a/handwritten/logging/tslint.json b/handwritten/logging/tslint.json new file mode 100644 index 00000000000..617dc975bae --- /dev/null +++ b/handwritten/logging/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "gts/tslint.json" +} From 866295084f1745690c20ee68316dac245d67f459 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Sat, 20 Oct 2018 12:39:51 -0700 Subject: [PATCH 0246/1029] chore: run gts fix (#252) --- handwritten/logging/package.json | 2 +- handwritten/logging/src/entry.js | 12 +- handwritten/logging/src/index.js | 272 +++++----- handwritten/logging/src/log.js | 218 ++++---- handwritten/logging/src/metadata.js | 71 ++- handwritten/logging/src/sink.js | 80 ++- .../src/v2/config_service_v2_client.js | 333 ++++++------ .../src/v2/doc/google/api/doc_distribution.js | 23 +- .../src/v2/doc/google/api/doc_label.js | 3 +- .../src/v2/doc/google/api/doc_metric.js | 11 +- .../doc/google/api/doc_monitored_resource.js | 12 +- .../google/logging/type/doc_http_request.js | 11 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 40 +- .../v2/doc/google/logging/v2/doc_logging.js | 53 +- .../google/logging/v2/doc_logging_config.js | 76 +-- .../google/logging/v2/doc_logging_metrics.js | 36 +- .../src/v2/doc/google/protobuf/doc_any.js | 2 +- .../v2/doc/google/protobuf/doc_duration.js | 2 +- .../src/v2/doc/google/protobuf/doc_empty.js | 2 +- .../v2/doc/google/protobuf/doc_field_mask.js | 2 +- .../src/v2/doc/google/protobuf/doc_struct.js | 18 +- .../v2/doc/google/protobuf/doc_timestamp.js | 15 +- .../src/v2/logging_service_v2_client.js | 389 +++++++------- .../src/v2/metrics_service_v2_client.js | 180 ++++--- handwritten/logging/system-test/logging.js | 490 +++++++++--------- handwritten/logging/test/entry.js | 10 +- handwritten/logging/test/gapic-v2.js | 252 +++------ handwritten/logging/test/index.js | 90 ++-- handwritten/logging/test/log.js | 55 +- handwritten/logging/test/metadata.js | 18 +- handwritten/logging/test/sink.js | 15 +- 31 files changed, 1380 insertions(+), 1413 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2fad65df12b..afc0a226884 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -60,7 +60,7 @@ "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "eslint samples/", - "check": "echo \"gts check disabled until ts migration is complete\"", + "check": "gts check", "clean": "gts clean", "compile": "tsc -p . && cp src/v2/*.json build/src/v2 && cp -r protos build", "fix": "gts fix", diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.js index 1fe0880da83..4c339498ca9 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.js @@ -31,7 +31,8 @@ const eventId = new EventId(); * @class * * @param {?object} [metadata] See a - * [LogEntry Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). + * [LogEntry + * Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). * @param {object|string} data The data to use as the value for this log * entry. * @@ -89,11 +90,10 @@ class Entry { * @property {number} insertId */ this.metadata = extend( - { - timestamp: new Date(), - }, - metadata - ); + { + timestamp: new Date(), + }, + metadata); // JavaScript date has a very coarse granularity (millisecond), which makes // it quite likely that multiple log entries would have the same timestamp. // The Logging API doesn't guarantee to preserve insertion order for entries diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.js index f7f351d0f91..a101700d17d 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.js @@ -58,8 +58,10 @@ const {Sink} = require('./sink'); * @property {string} [projectId] The project ID from the Google Developer's * Console, e.g. 'grape-spaceship-123'. We will also check the environment * variable `GCLOUD_PROJECT` for your project ID. If your app is running in - * an environment which supports {@link https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application Application Default Credentials}, - * your project ID will be detected automatically. + * an environment which supports {@link + * https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application + * Application Default Credentials}, your project ID will be detected + * automatically. * @property {string} [keyFilename] Full path to the a .json, .pem, or .p12 key * downloaded from the Google Developers Console. If you provide a path to a * JSON file, the `projectId` option above is not necessary. NOTE: .pem and @@ -94,13 +96,14 @@ const {Sink} = require('./sink'); * @example Import the client library * const {Logging} = require('@google-cloud/logging'); * - * @example Create a client that uses Application Default Credentials (ADC): - * const logging = new Logging(); + * @example Create a client that uses Application + * Default Credentials (ADC): const logging = new Logging(); * - * @example Create a client with explicit credentials: - * const logging = new Logging({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json' + * @example Create a client with explicit + * credentials: const logging = new Logging({ projectId: + * 'your-project-id', keyFilename: '/path/to/keyfile.json' * }); * * @example include:samples/quickstart.js @@ -125,13 +128,12 @@ class Logging { } } const options_ = extend( - { - libName: 'gccl', - libVersion: PKG.version, - scopes: scopes, - }, - options - ); + { + libName: 'gccl', + libVersion: PKG.version, + scopes: scopes, + }, + options); this.api = {}; this.auth = new GoogleAuth(options_); this.options = options_; @@ -139,7 +141,8 @@ class Logging { } /** * Config to set for the sink. Not all available options are listed here, see - * the [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink) + * the [Sink + * resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink) * definition for full details. * * @typedef {object} CreateSinkRequest @@ -147,9 +150,13 @@ class Logging { * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @property {Bucket|Dataset|Topic} [destination] The destination. The proper ACL * scopes will be granted to the provided destination. Can be one of: - * {@link https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket Bucket}, - * {@link https://cloud.google.com/nodejs/docs/reference/bigquery/latest/Dataset Dataset}, - * or {@link https://cloud.google.com/nodejs/docs/reference/pubsub/latest/Topic Topic} + * {@link + * https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket + * Bucket}, + * {@link + * https://cloud.google.com/nodejs/docs/reference/bigquery/latest/Dataset + * Dataset}, or {@link + * https://cloud.google.com/nodejs/docs/reference/pubsub/latest/Topic Topic} * @property {string} [filter] An advanced logs filter. Only log entries * matching the filter are written. */ @@ -238,22 +245,21 @@ class Logging { }; delete reqOpts.sink.gaxOptions; this.request( - { - client: 'ConfigServiceV2Client', - method: 'createSink', - reqOpts: reqOpts, - gaxOpts: config.gaxOptions, - }, - (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - const sink = self.sink(resp.name); - sink.metadata = resp; - callback(null, sink, resp); - } - ); + { + client: 'ConfigServiceV2Client', + method: 'createSink', + reqOpts: reqOpts, + gaxOpts: config.gaxOptions, + }, + (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + const sink = self.sink(resp.name); + sink.metadata = resp; + callback(null, sink, resp); + }); } /** @@ -266,7 +272,8 @@ class Logging { * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * * @param {?object|?string} [resource] See a - * [Monitored Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource). + * [Monitored + * Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource). * @param {object|string} data The data to use as the value for this log * entry. * @returns {Entry} @@ -312,8 +319,9 @@ class Logging { * @property {boolean} [autoPaginate=true] Have pagination handled * automatically. * @property {string} [filter] An - * [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). - * An empty filter matches all log entries. + * [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced_filters). An + * empty filter matches all log entries. * @property {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @property {number} [maxApiCalls] Maximum number of API calls to make. @@ -391,11 +399,10 @@ class Logging { options = {}; } const reqOpts = extend( - { - orderBy: 'timestamp desc', - }, - options - ); + { + orderBy: 'timestamp desc', + }, + options); reqOpts.resourceNames = arrify(reqOpts.resourceNames); const resourceName = 'projects/' + this.projectId; if (reqOpts.resourceNames.indexOf(resourceName) === -1) { @@ -404,26 +411,24 @@ class Logging { delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions - ); + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions); this.request( - { - client: 'LoggingServiceV2Client', - method: 'listLogEntries', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - function() { - const entries = arguments[1]; - if (entries) { - arguments[1] = entries.map(Entry.fromApiResponse_); - } - callback.apply(null, arguments); - } - ); + { + client: 'LoggingServiceV2Client', + method: 'listLogEntries', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + function() { + const entries = arguments[1]; + if (entries) { + arguments[1] = entries.map(Entry.fromApiResponse_); + } + callback.apply(null, arguments); + }); } /** @@ -473,21 +478,19 @@ class Logging { }); userStream.once('reading', () => { const reqOpts = extend( - { - orderBy: 'timestamp desc', - }, - options - ); + { + orderBy: 'timestamp desc', + }, + options); reqOpts.resourceNames = arrify(reqOpts.resourceNames); reqOpts.resourceNames.push('projects/' + self.projectId); delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions - ); + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions); requestStream = self.request({ client: 'LoggingServiceV2Client', method: 'listLogEntriesStream', @@ -564,30 +567,28 @@ class Logging { delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions - ); + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions); this.request( - { - client: 'ConfigServiceV2Client', - method: 'listSinks', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - function() { - const sinks = arguments[1]; - if (sinks) { - arguments[1] = sinks.map(sink => { - const sinkInstance = self.sink(sink.name); - sinkInstance.metadata = sink; - return sinkInstance; - }); - } - callback.apply(null, arguments); - } - ); + { + client: 'ConfigServiceV2Client', + method: 'listSinks', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + function() { + const sinks = arguments[1]; + if (sinks) { + arguments[1] = sinks.map(sink => { + const sinkInstance = self.sink(sink.name); + sinkInstance.metadata = sink; + return sinkInstance; + }); + } + callback.apply(null, arguments); + }); } /** @@ -642,11 +643,10 @@ class Logging { }); delete reqOpts.gaxOptions; const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions - ); + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions); requestStream = self.request({ client: 'ConfigServiceV2Client', method: 'listSinksStream', @@ -696,7 +696,8 @@ class Logging { } /** - * Funnel all API requests through this method, to be sure we have a project ID. + * Funnel all API requests through this method, to be sure we have a project + * ID. * * @param {object} config Configuration object. * @param {object} config.gaxOpts GAX options. @@ -735,11 +736,8 @@ class Logging { } let reqOpts = extend(true, {}, config.reqOpts); reqOpts = replaceProjectIdToken(reqOpts, projectId); - const requestFn = gaxClient[config.method].bind( - gaxClient, - reqOpts, - config.gaxOpts - ); + const requestFn = + gaxClient[config.method].bind(gaxClient, reqOpts, config.gaxOpts); callback(null, requestFn); }); } @@ -766,10 +764,11 @@ class Logging { } gaxStream = requestFn(); gaxStream - .on('error', err => { - stream.destroy(err); - }) - .pipe(stream); + .on('error', + err => { + stream.destroy(err); + }) + .pipe(stream); }); } return stream; @@ -777,7 +776,8 @@ class Logging { /** * This method is called when creating a sink with a Bucket destination. The - * bucket must first grant proper ACL access to the Stackdriver Logging account. + * bucket must first grant proper ACL access to the Stackdriver Logging + * account. * * The parameters are the same as what {@link Logging#createSink} accepts. * @@ -819,27 +819,27 @@ class Logging { groupByEmail: 'cloud-logs@google.com', }); dataset.setMetadata( - { - access: access, - }, - (err, apiResp) => { - if (err) { - callback(err, null, apiResp); - return; - } - const baseUrl = 'bigquery.googleapis.com'; - const pId = dataset.parent.projectId; - const dId = dataset.id; - config.destination = `${baseUrl}/projects/${pId}/datasets/${dId}`; - self.createSink(name, config, callback); - } - ); + { + access: access, + }, + (err, apiResp) => { + if (err) { + callback(err, null, apiResp); + return; + } + const baseUrl = 'bigquery.googleapis.com'; + const pId = dataset.parent.projectId; + const dId = dataset.id; + config.destination = `${baseUrl}/projects/${pId}/datasets/${dId}`; + self.createSink(name, config, callback); + }); }); } /** * This method is called when creating a sink with a Topic destination. The - * topic must first grant proper ACL access to the Stackdriver Logging account. + * topic must first grant proper ACL access to the Stackdriver Logging + * account. * * The parameters are the same as what {@link Logging#createSink} accepts. * @@ -924,19 +924,21 @@ module.exports.Sink = Sink; * @module {Constructor} @google-cloud/logging * @alias nodejs-logging * - * @example Install the client library with npm: - * npm install --save @google-cloud/logging + * @example Install the client library with npm: npm install --save + * @google-cloud/logging * * @example Import the client library * const {Logging} = require('@google-cloud/logging'); * - * @example Create a client that uses Application Default Credentials (ADC): - * const logging = new Logging(); + * @example Create a client that uses Application + * Default Credentials (ADC): const logging = new Logging(); * - * @example Create a client with explicit credentials: - * const logging = new Logging({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json' + * @example Create a client with explicit + * credentials: const logging = new Logging({ projectId: + * 'your-project-id', keyFilename: '/path/to/keyfile.json' * }); * * @example include:samples/quickstart.js diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.js index 7e995506809..e821f6b21ba 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.js @@ -208,14 +208,13 @@ class Log { logName: this.formattedName_, }; this.logging.request( - { - client: 'LoggingServiceV2Client', - method: 'deleteLog', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - callback - ); + { + client: 'LoggingServiceV2Client', + method: 'deleteLog', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + callback); } /** @@ -261,7 +260,8 @@ class Log { * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * * @param {?object} metadata See a - * [LogEntry Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). + * [LogEntry + * Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). * @param {object|string} data The data to use as the value for this log * entry. * @returns {Entry} @@ -383,17 +383,17 @@ class Log { * }); */ getEntries(options, callback) { - if (is.function(options)) { - callback = options; - options = {}; - } - options = extend( + if (is.function(options)) { - filter: 'logName="' + this.formattedName_ + '"', - }, - options - ); - return this.logging.getEntries(options, callback); + callback = options; + options = {}; + } + options = extend( + { + filter: 'logName="' + this.formattedName_ + '"', + }, + options); + return this.logging.getEntries(options, callback); } /** @@ -430,13 +430,12 @@ class Log { * }); */ getEntriesStream(options) { - options = extend( - { - filter: 'logName="' + this.formattedName_ + '"', - }, - options - ); - return this.logging.getEntriesStream(options); + options = extend( + { + filter: 'logName="' + this.formattedName_ + '"', + }, + options); + return this.logging.getEntriesStream(options); } /** @@ -468,7 +467,8 @@ class Log { * }); */ info(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'INFO'), options, callback); + this.write( + Log.assignSeverityToEntries_(entry, 'INFO'), options, callback); } /** @@ -500,11 +500,8 @@ class Log { * }); */ notice(entry, options, callback) { - this.write( - Log.assignSeverityToEntries_(entry, 'NOTICE'), - options, - callback - ); + this.write( + Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback); } /** @@ -536,11 +533,8 @@ class Log { * }); */ warning(entry, options, callback) { - this.write( - Log.assignSeverityToEntries_(entry, 'WARNING'), - options, - callback - ); + this.write( + Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback); } /** @@ -635,48 +629,46 @@ class Log { * Another example: */ write(entry, options, callback) { - const self = this; - if (is.fn(options)) { - callback = options; - options = {}; - } - if (!options.resource) { - this.metadata_.getDefaultResource((err, resource) => { - // Ignore errors (the API will speak up if it has an issue). - writeWithResource(resource); - }); - } else { - if (options.resource.labels) { - options.resource.labels = snakeCaseKeys(options.resource.labels); + const self = this; + if (is.fn(options)) { + callback = options; + options = {}; } - writeWithResource(options.resource); - } - function writeWithResource(resource) { - let decoratedEntries; - try { - decoratedEntries = self.decorateEntries_(arrify(entry)); - } catch (err) { - // Ignore errors (the API will speak up if it has an issue). + if (!options.resource) { + this.metadata_.getDefaultResource((err, resource) => { + // Ignore errors (the API will speak up if it has an issue). + writeWithResource(resource); + }); + } else { + if (options.resource.labels) { + options.resource.labels = snakeCaseKeys(options.resource.labels); + } + writeWithResource(options.resource); + } + function writeWithResource(resource) { + let decoratedEntries; + try { + decoratedEntries = self.decorateEntries_(arrify(entry)); + } catch (err) { + // Ignore errors (the API will speak up if it has an issue). + } + const reqOpts = extend( + { + logName: self.formattedName_, + entries: decoratedEntries, + resource: resource, + }, + options); + delete reqOpts.gaxOptions; + self.logging.request( + { + client: 'LoggingServiceV2Client', + method: 'writeLogEntries', + reqOpts: reqOpts, + gaxOpts: options.gaxOptions, + }, + callback); } - const reqOpts = extend( - { - logName: self.formattedName_, - entries: decoratedEntries, - resource: resource, - }, - options - ); - delete reqOpts.gaxOptions; - self.logging.request( - { - client: 'LoggingServiceV2Client', - method: 'writeLogEntries', - reqOpts: reqOpts, - gaxOpts: options.gaxOptions, - }, - callback - ); - } } /** @@ -689,14 +681,14 @@ class Log { * @throws if there is an error during serialization. */ decorateEntries_(entries) { - return entries.map(entry => { - if (!(entry instanceof Entry)) { - entry = this.entry(entry); - } - return entry.toJSON({ - removeCircular: this.removeCircular_, + return entries.map(entry => { + if (!(entry instanceof Entry)) { + entry = this.entry(entry); + } + return entry.toJSON({ + removeCircular: this.removeCircular_, + }); }); - }); } /** @@ -708,14 +700,14 @@ class Log { * @param {string} severity - The desired severity level. */ static assignSeverityToEntries_(entries, severity) { - return arrify(entries).map(entry => { - const metadata = extend(true, {}, entry.metadata, { - severity: severity, + return arrify(entries).map(entry => { + const metadata = extend(true, {}, entry.metadata, { + severity: severity, + }); + return extend(new Entry(), entry, { + metadata: metadata, + }); }); - return extend(new Entry(), entry, { - metadata: metadata, - }); - }); } /** @@ -727,28 +719,28 @@ class Log { * @returns {string} */ static formatName_(projectId, name) { - const path = 'projects/' + projectId + '/logs/'; - name = name.replace(path, ''); - if (decodeURIComponent(name) === name) { - // The name has not been encoded yet. - name = encodeURIComponent(name); - } - return path + name; + const path = 'projects/' + projectId + '/logs/'; + name = name.replace(path, ''); + if (decodeURIComponent(name) === name) { + // The name has not been encoded yet. + name = encodeURIComponent(name); + } + return path + name; + } } -} -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -promisifyAll(Log, { - exclude: ['entry'], -}); + /*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ + promisifyAll(Log, { + exclude: ['entry'], + }); -/** - * Reference to the {@link Log} class. - * @name module:@google-cloud/logging.Log - * @see Log - */ -module.exports.Log = Log; + /** + * Reference to the {@link Log} class. + * @name module:@google-cloud/logging.Log + * @see Log + */ + module.exports.Log = Log; diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.js index 1535f1fc8cc..a7f988bbba0 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.js @@ -41,24 +41,23 @@ class Metadata { * @param {function} callback Callback function. */ getDefaultResource(callback) { - this.logging.auth - .getEnv() - .then(env => { - if (env === 'KUBERNETES_ENGINE') { - Metadata.getGKEDescriptor(callback); - } else if (env === 'APP_ENGINE') { - callback(null, Metadata.getGAEDescriptor()); - } else if (env === 'CLOUD_FUNCTIONS') { - callback(null, Metadata.getCloudFunctionDescriptor()); - } else if (env === 'COMPUTE_ENGINE') { - // Test for compute engine should be done after all the rest - everything - // runs on top of compute engine. - Metadata.getGCEDescriptor(callback); - } else { - callback(null, Metadata.getGlobalDescriptor()); - } - }) - .catch(callback); + this.logging.auth.getEnv() + .then(env => { + if (env === 'KUBERNETES_ENGINE') { + Metadata.getGKEDescriptor(callback); + } else if (env === 'APP_ENGINE') { + callback(null, Metadata.getGAEDescriptor()); + } else if (env === 'CLOUD_FUNCTIONS') { + callback(null, Metadata.getCloudFunctionDescriptor()); + } else if (env === 'COMPUTE_ENGINE') { + // Test for compute engine should be done after all the rest - + // everything runs on top of compute engine. + Metadata.getGCEDescriptor(callback); + } else { + callback(null, Metadata.getGlobalDescriptor()); + } + }) + .catch(callback); } /** @@ -134,27 +133,21 @@ class Metadata { // gcpMetadata.instance('attributes/cluster-name').then(resp => { fs.readFile( - Metadata.KUBERNETES_NAMESPACE_ID_PATH, - 'utf8', - (err, namespace) => { - if (err) { - callback( - new Error( - `Error reading ` + - `${Metadata.KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}` - ) - ); - return; - } - callback(null, { - type: 'container', - labels: { - cluster_name: resp, - namespace_id: namespace, - }, + Metadata.KUBERNETES_NAMESPACE_ID_PATH, 'utf8', (err, namespace) => { + if (err) { + callback(new Error( + `Error reading ` + + `${Metadata.KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}`)); + return; + } + callback(null, { + type: 'container', + labels: { + cluster_name: resp, + namespace_id: namespace, + }, + }); }); - } - ); }, callback); } @@ -171,6 +164,6 @@ class Metadata { } Metadata.KUBERNETES_NAMESPACE_ID_PATH = - '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; + '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; module.exports.Metadata = Metadata; diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.js index b71566b364b..e9cc4aca33a 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.js @@ -143,14 +143,13 @@ class Sink { sinkName: this.formattedName_, }; this.logging.request( - { - client: 'ConfigServiceV2Client', - method: 'deleteSink', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - callback - ); + { + client: 'ConfigServiceV2Client', + method: 'deleteSink', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + callback); } /** @@ -204,19 +203,18 @@ class Sink { sinkName: this.formattedName_, }; this.logging.request( - { - client: 'ConfigServiceV2Client', - method: 'getSink', - reqOpts: reqOpts, - gaxOpts: gaxOptions, - }, - function() { - if (arguments[1]) { - self.metadata = arguments[1]; - } - callback.apply(null, arguments); - } - ); + { + client: 'ConfigServiceV2Client', + method: 'getSink', + reqOpts: reqOpts, + gaxOpts: gaxOptions, + }, + function() { + if (arguments[1]) { + self.metadata = arguments[1]; + } + callback.apply(null, arguments); + }); } /** @@ -257,11 +255,10 @@ class Sink { */ setFilter(filter, callback) { this.setMetadata( - { - filter: filter, - }, - callback - ); + { + filter: filter, + }, + callback); } /** @@ -280,9 +277,11 @@ class Sink { * @see [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update} * * @param {object} metadata See a - * [Sink resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). + * [Sink + * resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink). * @param {object} [metadata.gaxOptions] Request configuration options, - * outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * outlined here: + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @param {SetSinkMetadataCallback} [callback] Callback function. * @returns {Promise} * @@ -322,19 +321,18 @@ class Sink { }; delete reqOpts.sink.gaxOptions; self.logging.request( - { - client: 'ConfigServiceV2Client', - method: 'updateSink', - reqOpts: reqOpts, - gaxOpts: metadata.gaxOptions, - }, - function() { - if (arguments[1]) { - self.metadata = arguments[1]; - } - callback.apply(null, arguments); - } - ); + { + client: 'ConfigServiceV2Client', + method: 'updateSink', + reqOpts: reqOpts, + gaxOpts: metadata.gaxOptions, + }, + function() { + if (arguments[1]) { + self.metadata = arguments[1]; + } + callback.apply(null, arguments); + }); }); } } diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 4f3a22ca950..632bb45ddd2 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -49,8 +49,10 @@ class ConfigServiceV2Client { * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. + * {@link + * https://developers.google.com/identity/protocols/application-default-credentials + * Application Default Credentials}, your project ID will be detected + * automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. * @param {string} [options.servicePath] - The domain name of the @@ -61,13 +63,12 @@ class ConfigServiceV2Client { // Ensure that options include the service address and port. opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath: this.constructor.servicePath, - }, - opts - ); + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts); // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. @@ -90,12 +91,10 @@ class ConfigServiceV2Client { // Load the applicable protos. const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging_config.proto' - ) - ); + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging_config.proto')); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. @@ -103,9 +102,8 @@ class ConfigServiceV2Client { this._pathTemplates = { projectPathTemplate: new gax.PathTemplate('projects/{project}'), sinkPathTemplate: new gax.PathTemplate('projects/{project}/sinks/{sink}'), - exclusionPathTemplate: new gax.PathTemplate( - 'projects/{project}/exclusions/{exclusion}' - ), + exclusionPathTemplate: + new gax.PathTemplate('projects/{project}/exclusions/{exclusion}'), }; // Some of the methods on this service return "paged" results, @@ -113,20 +111,14 @@ class ConfigServiceV2Client { // pages). Denote the keys used for pagination and results. this._descriptors.page = { listSinks: new gax.PageDescriptor('pageToken', 'nextPageToken', 'sinks'), - listExclusions: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'exclusions' - ), + listExclusions: + new gax.PageDescriptor('pageToken', 'nextPageToken', 'exclusions'), }; // Put together the default options sent with requests. const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.ConfigServiceV2', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); + 'google.logging.v2.ConfigServiceV2', gapicConfig, opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')}); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -135,10 +127,8 @@ class ConfigServiceV2Client { // Put together the "service stub" for // google.logging.v2.ConfigServiceV2. - const configServiceV2Stub = gaxGrpc.createStub( - protos.google.logging.v2.ConfigServiceV2, - opts - ); + const configServiceV2Stub = + gaxGrpc.createStub(protos.google.logging.v2.ConfigServiceV2, opts); // Iterate over each of the methods that the service provides // and create an API call method for each. @@ -156,16 +146,11 @@ class ConfigServiceV2Client { ]; for (const methodName of configServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( - configServiceV2Stub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - } - ), - defaults[methodName], - this._descriptors.page[methodName] - ); + configServiceV2Stub.then(stub => function() { + const args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + }), + defaults[methodName], this._descriptors.page[methodName]); } } @@ -229,27 +214,35 @@ class ConfigServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [LogSink]{@link google.logging.v2.LogSink}. + * The second parameter to the callback is Array of [LogSink]{@link + * google.logging.v2.LogSink}. * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. + * When autoPaginate: false is specified through options, it contains the + * result in a single response. If the response indicates the next page + * exists, the third parameter is set to be used for the next request object. + * The fourth parameter keeps the raw response object of an object + * representing [ListSinksResponse]{@link + * google.logging.v2.ListSinksResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogSink]{@link google.logging.v2.LogSink}. + * The first element of the array is Array of [LogSink]{@link + * google.logging.v2.LogSink}. * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogSink]{@link google.logging.v2.LogSink} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. + * When autoPaginate: false is specified through options, the array has + * three elements. The first element is Array of [LogSink]{@link + * google.logging.v2.LogSink} in a single response. The second element is the + * next request object if the response indicates the next page exists, or + * null. The third element is an object representing [ListSinksResponse]{@link + * google.logging.v2.ListSinksResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -313,8 +306,8 @@ class ConfigServiceV2Client { * Equivalent to {@link listSinks}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listSinks} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. + * and invokes the callback registered for 'data' event for each element in + * the responses. * * The returned object has 'end' method when no more elements are required. * @@ -338,10 +331,13 @@ class ConfigServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @returns {Stream} - * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. + * An object stream which emits an object representing [LogSink]{@link + * google.logging.v2.LogSink} on 'data' event. * * @example * @@ -363,10 +359,7 @@ class ConfigServiceV2Client { options = options || {}; return this._descriptors.page.listSinks.createStream( - this._innerApiCalls.listSinks, - request, - options - ); + this._innerApiCalls.listSinks, request, options); } /** @@ -384,15 +377,19 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The second parameter to the callback is an object representing + * [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing [LogSink]{@link + * google.logging.v2.LogSink}. The promise has a method named "cancel" which + * cancels the ongoing API call. * * @example * @@ -443,29 +440,34 @@ class ConfigServiceV2Client { * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link + * google.logging.v2.LogSink} * @param {boolean} [request.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 - * the same group or service account used by Stackdriver Logging before the - * addition of writer identities to this API. The sink's destination must be - * in the same project as the sink itself. + * 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 the same group or service account used by Stackdriver + * Logging 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. + * 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 {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The second parameter to the callback is an object representing + * [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing [LogSink]{@link + * google.logging.v2.LogSink}. The promise has a method named "cancel" which + * cancels the ongoing API call. * * @example * @@ -519,16 +521,17 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} request.sink - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. + * Required. The updated sink, whose name is the same identifier that + * appears as part of `sink_name`. * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link + * google.logging.v2.LogSink} * @param {boolean} [request.uniqueWriterIdentity] * Optional. See * [sinks.create](https://cloud.google.com/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: + * 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`. @@ -552,17 +555,22 @@ class ConfigServiceV2Client { * * Example: `updateMask=filter`. * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * This object should have the same structure as [FieldMask]{@link + * google.protobuf.FieldMask} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The second parameter to the callback is an object representing + * [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing [LogSink]{@link + * google.logging.v2.LogSink}. The promise has a method named "cancel" which + * cancels the ongoing API call. * * @example * @@ -614,12 +622,15 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -663,27 +674,35 @@ class ConfigServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The second parameter to the callback is Array of [LogExclusion]{@link + * google.logging.v2.LogExclusion}. * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. + * When autoPaginate: false is specified through options, it contains the + * result in a single response. If the response indicates the next page + * exists, the third parameter is set to be used for the next request object. + * The fourth parameter keeps the raw response object of an object + * representing [ListExclusionsResponse]{@link + * google.logging.v2.ListExclusionsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The first element of the array is Array of [LogExclusion]{@link + * google.logging.v2.LogExclusion}. * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogExclusion]{@link google.logging.v2.LogExclusion} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. + * When autoPaginate: false is specified through options, the array has + * three elements. The first element is Array of [LogExclusion]{@link + * google.logging.v2.LogExclusion} in a single response. The second element is + * the next request object if the response indicates the next page exists, or + * null. The third element is an object representing + * [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -747,8 +766,8 @@ class ConfigServiceV2Client { * Equivalent to {@link listExclusions}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listExclusions} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. + * and invokes the callback registered for 'data' event for each element in + * the responses. * * The returned object has 'end' method when no more elements are required. * @@ -772,10 +791,13 @@ class ConfigServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @returns {Stream} - * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. + * An object stream which emits an object representing [LogExclusion]{@link + * google.logging.v2.LogExclusion} on 'data' event. * * @example * @@ -797,10 +819,7 @@ class ConfigServiceV2Client { options = options || {}; return this._descriptors.page.listExclusions.createStream( - this._innerApiCalls.listExclusions, - request, - options - ); + this._innerApiCalls.listExclusions, request, options); } /** @@ -818,15 +837,19 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The second parameter to the callback is an object representing + * [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * [LogExclusion]{@link google.logging.v2.LogExclusion}. The promise has a + * method named "cancel" which cancels the ongoing API call. * * @example * @@ -876,17 +899,22 @@ class ConfigServiceV2Client { * Required. The new exclusion, whose `name` parameter is an exclusion name * that is not already used in the parent resource. * - * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link + * google.logging.v2.LogExclusion} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The second parameter to the callback is an object representing + * [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * [LogExclusion]{@link google.logging.v2.LogExclusion}. The promise has a + * method named "cancel" which cancels the ongoing API call. * * @example * @@ -936,10 +964,11 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} request.exclusion - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. + * Required. New values for the existing exclusion. Only the fields + * specified in `update_mask` are relevant. * - * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link + * google.logging.v2.LogExclusion} * @param {Object} request.updateMask * Required. A nonempty list of fields to change in the existing exclusion. * New values for the fields are taken from the corresponding fields in the @@ -949,17 +978,22 @@ class ConfigServiceV2Client { * For example, to change the filter and description of an exclusion, * specify an `update_mask` of `"filter,description"`. * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * This object should have the same structure as [FieldMask]{@link + * google.protobuf.FieldMask} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The second parameter to the callback is an object representing + * [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * [LogExclusion]{@link google.logging.v2.LogExclusion}. The promise has a + * method named "cancel" which cancels the ongoing API call. * * @example * @@ -1011,12 +1045,15 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -1127,7 +1164,7 @@ class ConfigServiceV2Client { */ matchProjectFromExclusionName(exclusionName) { return this._pathTemplates.exclusionPathTemplate.match(exclusionName) - .project; + .project; } /** @@ -1139,7 +1176,7 @@ class ConfigServiceV2Client { */ matchExclusionFromExclusionName(exclusionName) { return this._pathTemplates.exclusionPathTemplate.match(exclusionName) - .exclusion; + .exclusion; } } diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index 9fbd9347733..f0468d8ec92 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -54,12 +54,14 @@ * If specified, contains the range of the population values. The field * must not be present if the `count` is zero. * - * This object should have the same structure as [Range]{@link google.api.Range} + * This object should have the same structure as [Range]{@link + * google.api.Range} * * @property {Object} bucketOptions * Defines the histogram bucket boundaries. * - * This object should have the same structure as [BucketOptions]{@link google.api.BucketOptions} + * This object should have the same structure as [BucketOptions]{@link + * google.api.BucketOptions} * * @property {number[]} bucketCounts * If `bucket_options` is given, then the sum of the values in `bucket_counts` @@ -96,7 +98,7 @@ const Distribution = { * @see [google.api.Distribution.Range definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Range: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }, /** @@ -127,17 +129,20 @@ const Distribution = { * @property {Object} linearBuckets * The linear bucket. * - * This object should have the same structure as [Linear]{@link google.api.Linear} + * This object should have the same structure as [Linear]{@link + * google.api.Linear} * * @property {Object} exponentialBuckets * The exponential buckets. * - * This object should have the same structure as [Exponential]{@link google.api.Exponential} + * This object should have the same structure as [Exponential]{@link + * google.api.Exponential} * * @property {Object} explicitBuckets * The explicit buckets. * - * This object should have the same structure as [Explicit]{@link google.api.Explicit} + * This object should have the same structure as [Explicit]{@link + * google.api.Explicit} * * @typedef BucketOptions * @memberof google.api @@ -171,7 +176,7 @@ const Distribution = { * @see [google.api.Distribution.BucketOptions.Linear definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Linear: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }, /** @@ -199,7 +204,7 @@ const Distribution = { * @see [google.api.Distribution.BucketOptions.Exponential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Exponential: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }, /** @@ -223,7 +228,7 @@ const Distribution = { * @see [google.api.Distribution.BucketOptions.Explicit definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Explicit: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. } } }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_label.js b/handwritten/logging/src/v2/doc/google/api/doc_label.js index b26faacb2d3..a8e77f843b4 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_label.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_label.js @@ -24,7 +24,8 @@ * @property {number} valueType * The type of data that can be assigned to the label. * - * The number should be among the values of [ValueType]{@link google.api.ValueType} + * The number should be among the values of [ValueType]{@link + * google.api.ValueType} * * @property {string} description * A human-readable description for the label. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index ce40d36e116..bf32ee2b32c 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -40,19 +40,22 @@ * you can look at latencies for successful responses or just * for responses that failed. * - * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} + * This object should have the same structure as [LabelDescriptor]{@link + * google.api.LabelDescriptor} * * @property {number} metricKind * Whether the metric records instantaneous values, changes to a value, etc. * Some combinations of `metric_kind` and `value_type` might not be supported. * - * The number should be among the values of [MetricKind]{@link google.api.MetricKind} + * The number should be among the values of [MetricKind]{@link + * google.api.MetricKind} * * @property {number} valueType * Whether the measurement is an integer, a floating-point number, etc. * Some combinations of `metric_kind` and `value_type` might not be supported. * - * The number should be among the values of [ValueType]{@link google.api.ValueType} + * The number should be among the values of [ValueType]{@link + * google.api.ValueType} * * @property {string} unit * The unit in which the metric value is reported. It is only applicable @@ -234,5 +237,5 @@ const MetricDescriptor = { * @see [google.api.Metric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} */ const Metric = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 13eadf658f3..d3534fba512 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -54,14 +54,15 @@ * resource type. For example, an individual Google Cloud SQL database is * identified by values for the labels `"database_id"` and `"zone"`. * - * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} + * This object should have the same structure as [LabelDescriptor]{@link + * google.api.LabelDescriptor} * * @typedef MonitoredResourceDescriptor * @memberof google.api * @see [google.api.MonitoredResourceDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ const MonitoredResourceDescriptor = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -94,7 +95,7 @@ const MonitoredResourceDescriptor = { * @see [google.api.MonitoredResource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ const MonitoredResource = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -118,7 +119,8 @@ const MonitoredResource = { * "security_group": ["a", "b", "c"], * "spot_instance": false } * - * This object should have the same structure as [Struct]{@link google.protobuf.Struct} + * This object should have the same structure as [Struct]{@link + * google.protobuf.Struct} * * @property {Object.} userLabels * Output only. A map of user-defined metadata labels. @@ -128,5 +130,5 @@ const MonitoredResource = { * @see [google.api.MonitoredResourceMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ const MonitoredResourceMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js index ab569a284f5..6245d1f675c 100644 --- a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js +++ b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js @@ -42,7 +42,8 @@ * * @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)"`. + * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET + * CLR 1.0.3705)"`. * * @property {string} remoteIp * The IP address (IPv4 or IPv6) of the client that issued the HTTP @@ -54,13 +55,15 @@ * * @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). + * [HTTP/1.1 Header Field + * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). * * @property {Object} latency * The request processing latency on the server, from the time the request was * received until the response was sent. * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * This object should have the same structure as [Duration]{@link + * google.protobuf.Duration} * * @property {boolean} cacheLookup * Whether or not a cache lookup was attempted. @@ -86,5 +89,5 @@ * @see [google.logging.type.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/type/http_request.proto} */ const HttpRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index 9ebc35db0da..8d4798dd433 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -48,14 +48,16 @@ * associated with the monitored resource designating the particular * database that reported the error. * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} + * This object should have the same structure as [MonitoredResource]{@link + * google.api.MonitoredResource} * * @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. * - * This object should have the same structure as [Any]{@link google.protobuf.Any} + * This object should have the same structure as [Any]{@link + * google.protobuf.Any} * * @property {string} textPayload * The log entry payload, represented as a Unicode string (UTF-8). @@ -64,7 +66,8 @@ * The log entry payload, represented as a structure that is * expressed as a JSON object. * - * This object should have the same structure as [Struct]{@link google.protobuf.Struct} + * This object should have the same structure as [Struct]{@link + * google.protobuf.Struct} * * @property {Object} timestamp * Optional. The time the event described by the log entry occurred. @@ -75,24 +78,27 @@ * seconds might be omitted when the timestamp is displayed. * * Incoming log entries should have timestamps that are no more than - * the [logs retention period](https://cloud.google.com/logging/quotas) in the past, - * and no more than 24 hours in the future. Log entries outside those time + * the [logs retention period](https://cloud.google.com/logging/quotas) in the + * past, and no more than 24 hours in the future. Log entries outside those time * boundaries will not be available when calling `entries.list`, but * those log entries can still be exported with * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link + * google.protobuf.Timestamp} * * @property {Object} receiveTimestamp * Output only. The time the log entry was received by Stackdriver Logging. * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link + * google.protobuf.Timestamp} * * @property {number} severity * Optional. The severity of the log entry. The default value is * `LogSeverity.DEFAULT`. * - * The number should be among the values of [LogSeverity]{@link google.logging.type.LogSeverity} + * The number should be among the values of [LogSeverity]{@link + * google.logging.type.LogSeverity} * * @property {string} insertId * Optional. A unique identifier for the log entry. If you provide a value, @@ -106,7 +112,8 @@ * Optional. Information about the HTTP request associated with this * log entry, if applicable. * - * This object should have the same structure as [HttpRequest]{@link google.logging.type.HttpRequest} + * This object should have the same structure as [HttpRequest]{@link + * google.logging.type.HttpRequest} * * @property {Object.} labels * Optional. A set of user-defined (key, value) data that provides additional @@ -117,13 +124,15 @@ * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have * this field populated. * - * This object should have the same structure as [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} + * This object should have the same structure as + * [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} * * @property {Object} operation * Optional. Information about an operation associated with the log entry, if * applicable. * - * This object should have the same structure as [LogEntryOperation]{@link google.logging.v2.LogEntryOperation} + * This object should have the same structure as [LogEntryOperation]{@link + * google.logging.v2.LogEntryOperation} * * @property {string} trace * Optional. Resource name of the trace associated with the log entry, if any. @@ -141,14 +150,15 @@ * Optional. Source code location information associated with the log entry, * if any. * - * This object should have the same structure as [LogEntrySourceLocation]{@link google.logging.v2.LogEntrySourceLocation} + * This object should have the same structure as + * [LogEntrySourceLocation]{@link google.logging.v2.LogEntrySourceLocation} * * @typedef LogEntry * @memberof google.logging.v2 * @see [google.logging.v2.LogEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ const LogEntry = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -175,7 +185,7 @@ const LogEntry = { * @see [google.logging.v2.LogEntryOperation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ const LogEntryOperation = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -203,5 +213,5 @@ const LogEntryOperation = { * @see [google.logging.v2.LogEntrySourceLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ const LogEntrySourceLocation = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index e99f5627137..553fc570189 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -37,7 +37,7 @@ * @see [google.logging.v2.DeleteLogRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const DeleteLogRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -68,7 +68,8 @@ const DeleteLogRequest = { * * See LogEntry. * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} + * This object should have the same structure as [MonitoredResource]{@link + * google.api.MonitoredResource} * * @property {Object.} labels * Optional. Default labels that are added to the `labels` field of all log @@ -91,17 +92,18 @@ const DeleteLogRequest = { * the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than - * 24 hours in the future will not be available when calling `entries.list`. - * However, those log entries can still be exported with + * [logs retention period](https://cloud.google.com/logging/quota-policy) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be exported with * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, - * you should try to include several log entries in this list, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + * `entries.write`, you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * - * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} + * This object should have the same structure as [LogEntry]{@link + * google.logging.v2.LogEntry} * * @property {boolean} partialSuccess * Optional. Whether valid entries should be written even if some other @@ -120,7 +122,7 @@ const DeleteLogRequest = { * @see [google.logging.v2.WriteLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const WriteLogEntriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -131,7 +133,7 @@ const WriteLogEntriesRequest = { * @see [google.logging.v2.WriteLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const WriteLogEntriesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -150,7 +152,7 @@ const WriteLogEntriesResponse = { * @see [google.logging.v2.WriteLogEntriesPartialErrors definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const WriteLogEntriesPartialErrors = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -176,12 +178,11 @@ const WriteLogEntriesPartialErrors = { * * @property {string} filter * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/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. + * Logs Filters](https://cloud.google.com/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} orderBy * Optional. How the results should be sorted. Presently, the only permitted @@ -207,7 +208,7 @@ const WriteLogEntriesPartialErrors = { * @see [google.logging.v2.ListLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListLogEntriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -218,7 +219,8 @@ const ListLogEntriesRequest = { * returned, indicating that more entries may exist. See `nextPageToken` for * more information. * - * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} + * This object should have the same structure as [LogEntry]{@link + * google.logging.v2.LogEntry} * * @property {string} nextPageToken * If there might be more results than those appearing in this response, then @@ -237,7 +239,7 @@ const ListLogEntriesRequest = { * @see [google.logging.v2.ListLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListLogEntriesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -259,7 +261,7 @@ const ListLogEntriesResponse = { * @see [google.logging.v2.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListMonitoredResourceDescriptorsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -268,7 +270,8 @@ const ListMonitoredResourceDescriptorsRequest = { * @property {Object[]} resourceDescriptors * A list of resource descriptors. * - * This object should have the same structure as [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} + * This object should have the same structure as + * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} * * @property {string} nextPageToken * If there might be more results than those appearing in this response, then @@ -280,7 +283,7 @@ const ListMonitoredResourceDescriptorsRequest = { * @see [google.logging.v2.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListMonitoredResourceDescriptorsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -310,7 +313,7 @@ const ListMonitoredResourceDescriptorsResponse = { * @see [google.logging.v2.ListLogsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListLogsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -331,5 +334,5 @@ const ListLogsRequest = { * @see [google.logging.v2.ListLogsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListLogsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index 3b187d44e0e..b64a6e7b009 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -39,13 +39,15 @@ * 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](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs With + * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * @property {string} filter * Optional. - * An [advanced logs filter](https://cloud.google.com/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. For example: + * An [advanced logs + * filter](https://cloud.google.com/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. For example: * * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR * @@ -53,7 +55,8 @@ * Deprecated. The log entry format to use for this sink's exported log * entries. The v2 format is used by default and cannot be changed. * - * The number should be among the values of [VersionFormat]{@link google.logging.v2.VersionFormat} + * The number should be among the values of [VersionFormat]{@link + * google.logging.v2.VersionFormat} * * @property {string} writerIdentity * Output only. An IAM identity—a service account or group—under @@ -89,12 +92,14 @@ * @property {Object} startTime * Deprecated. This field is ignored when creating or updating sinks. * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link + * google.protobuf.Timestamp} * * @property {Object} endTime * Deprecated. This field is ignored when creating or updating sinks. * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link + * google.protobuf.Timestamp} * * @typedef LogSink * @memberof google.logging.v2 @@ -157,7 +162,7 @@ const LogSink = { * @see [google.logging.v2.ListSinksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const ListSinksRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -166,7 +171,8 @@ const ListSinksRequest = { * @property {Object[]} sinks * A list of sinks. * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link + * google.logging.v2.LogSink} * * @property {string} nextPageToken * If there might be more results than appear in this response, then @@ -178,7 +184,7 @@ const ListSinksRequest = { * @see [google.logging.v2.ListSinksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const ListSinksResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -199,7 +205,7 @@ const ListSinksResponse = { * @see [google.logging.v2.GetSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const GetSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -219,7 +225,8 @@ const GetSinkRequest = { * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link + * google.logging.v2.LogSink} * * @property {boolean} uniqueWriterIdentity * Optional. Determines the kind of IAM identity returned as `writer_identity` @@ -239,7 +246,7 @@ const GetSinkRequest = { * @see [google.logging.v2.CreateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const CreateSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -260,7 +267,8 @@ const CreateSinkRequest = { * Required. The updated sink, whose name is the same identifier that appears * as part of `sink_name`. * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link + * google.logging.v2.LogSink} * * @property {boolean} uniqueWriterIdentity * Optional. See @@ -292,14 +300,15 @@ const CreateSinkRequest = { * * Example: `updateMask=filter`. * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * This object should have the same structure as [FieldMask]{@link + * google.protobuf.FieldMask} * * @typedef UpdateSinkRequest * @memberof google.logging.v2 * @see [google.logging.v2.UpdateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const UpdateSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -321,7 +330,7 @@ const UpdateSinkRequest = { * @see [google.logging.v2.DeleteSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const DeleteSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -342,9 +351,10 @@ const DeleteSinkRequest = { * * @property {string} filter * Required. - * An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) - * that matches the log entries to be excluded. By using the - * [sample function](https://cloud.google.com/logging/docs/view/advanced_filters#sample), + * An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced_filters) that + * matches the log entries to be excluded. By using the [sample + * function](https://cloud.google.com/logging/docs/view/advanced_filters#sample), * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: @@ -362,7 +372,7 @@ const DeleteSinkRequest = { * @see [google.logging.v2.LogExclusion definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const LogExclusion = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -392,7 +402,7 @@ const LogExclusion = { * @see [google.logging.v2.ListExclusionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const ListExclusionsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -401,7 +411,8 @@ const ListExclusionsRequest = { * @property {Object[]} exclusions * A list of exclusions. * - * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link + * google.logging.v2.LogExclusion} * * @property {string} nextPageToken * If there might be more results than appear in this response, then @@ -413,7 +424,7 @@ const ListExclusionsRequest = { * @see [google.logging.v2.ListExclusionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const ListExclusionsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -434,7 +445,7 @@ const ListExclusionsResponse = { * @see [google.logging.v2.GetExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const GetExclusionRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -454,14 +465,15 @@ const GetExclusionRequest = { * Required. The new exclusion, whose `name` parameter is an exclusion name * that is not already used in the parent resource. * - * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link + * google.logging.v2.LogExclusion} * * @typedef CreateExclusionRequest * @memberof google.logging.v2 * @see [google.logging.v2.CreateExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const CreateExclusionRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -481,7 +493,8 @@ const CreateExclusionRequest = { * Required. New values for the existing exclusion. Only the fields specified * in `update_mask` are relevant. * - * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link + * google.logging.v2.LogExclusion} * * @property {Object} updateMask * Required. A nonempty list of fields to change in the existing exclusion. @@ -492,14 +505,15 @@ const CreateExclusionRequest = { * For example, to change the filter and description of an exclusion, * specify an `update_mask` of `"filter,description"`. * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * This object should have the same structure as [FieldMask]{@link + * google.protobuf.FieldMask} * * @typedef UpdateExclusionRequest * @memberof google.logging.v2 * @see [google.logging.v2.UpdateExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const UpdateExclusionRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -520,5 +534,5 @@ const UpdateExclusionRequest = { * @see [google.logging.v2.DeleteExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const DeleteExclusionRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index 5df1a4a155e..ffea2414756 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -45,9 +45,9 @@ * Optional. A description of this metric, which is used in documentation. * * @property {string} filter - * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) - * which is used to match log entries. - * Example: + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is + * used to match log entries. Example: * * "resource.type=gae_app AND severity>=ERROR" * @@ -76,7 +76,8 @@ * `metric_descriptor`, but existing labels cannot be modified except for * their description. * - * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} + * This object should have the same structure as [MetricDescriptor]{@link + * google.api.MetricDescriptor} * * @property {string} valueExtractor * Optional. A `value_extractor` is required when using a distribution @@ -120,13 +121,15 @@ * using a DISTRIBUTION value type and it describes the bucket boundaries * used to create a histogram of the extracted values. * - * This object should have the same structure as [BucketOptions]{@link google.api.BucketOptions} + * This object should have the same structure as [BucketOptions]{@link + * google.api.BucketOptions} * * @property {number} version * Deprecated. The API version that created or updated this metric. * The v2 format is used by default and cannot be changed. * - * The number should be among the values of [ApiVersion]{@link google.logging.v2.ApiVersion} + * The number should be among the values of [ApiVersion]{@link + * google.logging.v2.ApiVersion} * * @typedef LogMetric * @memberof google.logging.v2 @@ -179,7 +182,7 @@ const LogMetric = { * @see [google.logging.v2.ListLogMetricsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const ListLogMetricsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -188,7 +191,8 @@ const ListLogMetricsRequest = { * @property {Object[]} metrics * A list of logs-based metrics. * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link + * google.logging.v2.LogMetric} * * @property {string} nextPageToken * If there might be more results than appear in this response, then @@ -200,7 +204,7 @@ const ListLogMetricsRequest = { * @see [google.logging.v2.ListLogMetricsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const ListLogMetricsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -216,7 +220,7 @@ const ListLogMetricsResponse = { * @see [google.logging.v2.GetLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const GetLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -233,14 +237,15 @@ const GetLogMetricRequest = { * The new logs-based metric, which must not have an identifier that * already exists. * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link + * google.logging.v2.LogMetric} * * @typedef CreateLogMetricRequest * @memberof google.logging.v2 * @see [google.logging.v2.CreateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const CreateLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -258,14 +263,15 @@ const CreateLogMetricRequest = { * @property {Object} metric * The updated metric. * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link + * google.logging.v2.LogMetric} * * @typedef UpdateLogMetricRequest * @memberof google.logging.v2 * @see [google.logging.v2.UpdateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const UpdateLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -281,5 +287,5 @@ const UpdateLogMetricRequest = { * @see [google.logging.v2.DeleteLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const DeleteLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index 3accb1fc0d8..16fe013b4ae 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -132,5 +132,5 @@ * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} */ const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js index c03ce2fb3df..45300868e1b 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js @@ -93,5 +93,5 @@ * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} */ const Duration = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js index b1d6b5e32a9..3175bad1fc4 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js @@ -30,5 +30,5 @@ * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} */ const Empty = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js index 0cb35328962..f9f9c79a4df 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -232,5 +232,5 @@ * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} */ const FieldMask = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js index ddf7e5c95dc..35c1bb31069 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js @@ -33,7 +33,7 @@ * @see [google.protobuf.Struct definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ const Struct = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -47,7 +47,8 @@ const Struct = { * @property {number} nullValue * Represents a null value. * - * The number should be among the values of [NullValue]{@link google.protobuf.NullValue} + * The number should be among the values of [NullValue]{@link + * google.protobuf.NullValue} * * @property {number} numberValue * Represents a double value. @@ -61,19 +62,21 @@ const Struct = { * @property {Object} structValue * Represents a structured value. * - * This object should have the same structure as [Struct]{@link google.protobuf.Struct} + * This object should have the same structure as [Struct]{@link + * google.protobuf.Struct} * * @property {Object} listValue * Represents a repeated `Value`. * - * This object should have the same structure as [ListValue]{@link google.protobuf.ListValue} + * This object should have the same structure as [ListValue]{@link + * google.protobuf.ListValue} * * @typedef Value * @memberof google.protobuf * @see [google.protobuf.Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ const Value = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -84,14 +87,15 @@ const Value = { * @property {Object[]} values * Repeated field of dynamically typed values. * - * This object should have the same structure as [Value]{@link google.protobuf.Value} + * This object should have the same structure as [Value]{@link + * google.protobuf.Value} * * @typedef ListValue * @memberof google.protobuf * @see [google.protobuf.ListValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ const ListValue = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index 1ebe2e6e1a5..0ac0d301d54 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -26,7 +26,8 @@ * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. * By restricting to that range, we ensure that we can convert to * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + * See + * [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). * * # Examples * @@ -87,11 +88,13 @@ * 01:30 UTC on January 15, 2017. * * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com + * to this format using + * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- * ) to obtain a formatter capable of generating timestamps in this format. * @@ -111,5 +114,5 @@ * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} */ const Timestamp = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 9707cbb3c4c..ccd28f78ff1 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -49,8 +49,10 @@ class LoggingServiceV2Client { * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. + * {@link + * https://developers.google.com/identity/protocols/application-default-credentials + * Application Default Credentials}, your project ID will be detected + * automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. * @param {string} [options.servicePath] - The domain name of the @@ -61,13 +63,12 @@ class LoggingServiceV2Client { // Ensure that options include the service address and port. opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath: this.constructor.servicePath, - }, - opts - ); + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts); // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. @@ -90,12 +91,10 @@ class LoggingServiceV2Client { // Load the applicable protos. const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging.proto' - ) - ); + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging.proto')); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. @@ -109,54 +108,32 @@ class LoggingServiceV2Client { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listLogEntries: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'entries' - ), + listLogEntries: + new gax.PageDescriptor('pageToken', 'nextPageToken', 'entries'), listMonitoredResourceDescriptors: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'resourceDescriptors' - ), - listLogs: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'logNames' - ), + 'pageToken', 'nextPageToken', 'resourceDescriptors'), + listLogs: + new gax.PageDescriptor('pageToken', 'nextPageToken', 'logNames'), }; let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( - path.join( - __dirname, - '..', - '..', - 'protos', - 'google/logging/v2/logging.proto' - ), - protoFilesRoot - ); + path.join( + __dirname, '..', '..', 'protos', 'google/logging/v2/logging.proto'), + protoFilesRoot); // Some methods on this API support automatically batching // requests; denote this. this._descriptors.batching = { writeLogEntries: new gax.BundleDescriptor( - 'entries', - ['logName', 'resource', 'labels'], - null, - gax.createByteLengthFunction( - protoFilesRoot.lookup('google.logging.v2.LogEntry') - ) - ), + 'entries', ['logName', 'resource', 'labels'], null, + gax.createByteLengthFunction( + protoFilesRoot.lookup('google.logging.v2.LogEntry'))), }; // Put together the default options sent with requests. const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.LoggingServiceV2', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); + 'google.logging.v2.LoggingServiceV2', gapicConfig, opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')}); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -165,10 +142,8 @@ class LoggingServiceV2Client { // Put together the "service stub" for // google.logging.v2.LoggingServiceV2. - const loggingServiceV2Stub = gaxGrpc.createStub( - protos.google.logging.v2.LoggingServiceV2, - opts - ); + const loggingServiceV2Stub = + gaxGrpc.createStub(protos.google.logging.v2.LoggingServiceV2, opts); // Iterate over each of the methods that the service provides // and create an API call method for each. @@ -181,17 +156,13 @@ class LoggingServiceV2Client { ]; for (const methodName of loggingServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( - loggingServiceV2Stub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - } - ), - defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.batching[methodName] - ); + loggingServiceV2Stub.then(stub => function() { + const args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + }), + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.batching[methodName]); } } @@ -258,12 +229,15 @@ class LoggingServiceV2Client { * For more information about log names, see * LogEntry. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -301,31 +275,33 @@ class LoggingServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {Object[]} request.entries - * Required. The log entries to send to Stackdriver Logging. The order of log - * entries in this list does not matter. Values supplied in this method's + * Required. The log entries to send to Stackdriver Logging. The order of + * log entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding * fields. For more information, see the * LogEntry type. * * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. + * this method supplies the current time or a unique identifier, + * respectively. The supplied values are chosen so that, among the log entries + * that did not supply their own values, the entries earlier in the list will + * sort before the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than - * 24 hours in the future will not be available when calling `entries.list`. - * However, those log entries can still be exported with + * [logs retention period](https://cloud.google.com/logging/quota-policy) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be exported + * with * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, - * you should try to include several log entries in this list, - * rather than calling this method for each individual log entry. + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + * `entries.write`, you should try to include several log entries in this + * list, rather than calling this method for each individual log entry. * - * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} + * This object should have the same structure as [LogEntry]{@link + * google.logging.v2.LogEntry} * @param {string} [request.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`: @@ -350,12 +326,13 @@ class LoggingServiceV2Client { * * See LogEntry. * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} + * This object should have the same structure as [MonitoredResource]{@link + * google.api.MonitoredResource} * @param {Object.} [request.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. + * 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. * @param {boolean} [request.partialSuccess] * Optional. Whether valid entries should be written even if some other * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any @@ -367,15 +344,20 @@ class LoggingServiceV2Client { * entries won't be persisted nor exported. Useful for checking whether the * logging API endpoints are working properly before sending valuable data. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + * The second parameter to the callback is an object representing + * [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -423,26 +405,27 @@ class LoggingServiceV2Client { * * Projects listed in the `project_ids` field are added to this list. * @param {string[]} [request.projectIds] - * Deprecated. Use `resource_names` instead. One or more project identifiers - * or project numbers from which to retrieve log entries. Example: + * 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`. * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/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. + * Optional. A filter that chooses which log entries to return. See + * [Advanced Logs + * Filters](https://cloud.google.com/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. * @param {string} [request.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 their `insert_id` values. + * 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 their `insert_id` values. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -450,27 +433,35 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [LogEntry]{@link google.logging.v2.LogEntry}. + * The second parameter to the callback is Array of [LogEntry]{@link + * google.logging.v2.LogEntry}. * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. + * When autoPaginate: false is specified through options, it contains the + * result in a single response. If the response indicates the next page + * exists, the third parameter is set to be used for the next request object. + * The fourth parameter keeps the raw response object of an object + * representing [ListLogEntriesResponse]{@link + * google.logging.v2.ListLogEntriesResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogEntry]{@link google.logging.v2.LogEntry}. + * The first element of the array is Array of [LogEntry]{@link + * google.logging.v2.LogEntry}. * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogEntry]{@link google.logging.v2.LogEntry} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. + * When autoPaginate: false is specified through options, the array has + * three elements. The first element is Array of [LogEntry]{@link + * google.logging.v2.LogEntry} in a single response. The second element is the + * next request object if the response indicates the next page exists, or + * null. The third element is an object representing + * [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -534,8 +525,8 @@ class LoggingServiceV2Client { * Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listLogEntries} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. + * and invokes the callback registered for 'data' event for each element in + * the responses. * * The returned object has 'end' method when no more elements are required. * @@ -556,26 +547,27 @@ class LoggingServiceV2Client { * * Projects listed in the `project_ids` field are added to this list. * @param {string[]} [request.projectIds] - * Deprecated. Use `resource_names` instead. One or more project identifiers - * or project numbers from which to retrieve log entries. Example: + * 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`. * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/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. + * Optional. A filter that chooses which log entries to return. See + * [Advanced Logs + * Filters](https://cloud.google.com/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. * @param {string} [request.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 their `insert_id` values. + * 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 their `insert_id` values. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -583,10 +575,13 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @returns {Stream} - * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. + * An object stream which emits an object representing [LogEntry]{@link + * google.logging.v2.LogEntry} on 'data' event. * * @example * @@ -608,10 +603,7 @@ class LoggingServiceV2Client { options = options || {}; return this._descriptors.page.listLogEntries.createStream( - this._innerApiCalls.listLogEntries, - request, - options - ); + this._innerApiCalls.listLogEntries, request, options); } /** @@ -627,27 +619,38 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * The second parameter to the callback is Array of + * [MonitoredResourceDescriptor]{@link + * google.api.MonitoredResourceDescriptor}. * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + * When autoPaginate: false is specified through options, it contains the + * result in a single response. If the response indicates the next page + * exists, the third parameter is set to be used for the next request object. + * The fourth parameter keeps the raw response object of an object + * representing [ListMonitoredResourceDescriptorsResponse]{@link + * google.logging.v2.ListMonitoredResourceDescriptorsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * The first element of the array is Array of + * [MonitoredResourceDescriptor]{@link + * google.api.MonitoredResourceDescriptor}. * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + * When autoPaginate: false is specified through options, the array has + * three elements. The first element is Array of + * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} + * in a single response. The second element is the next request object if the + * response indicates the next page exists, or null. The third element is an + * object representing [ListMonitoredResourceDescriptorsResponse]{@link + * google.logging.v2.ListMonitoredResourceDescriptorsResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -684,7 +687,8 @@ class LoggingServiceV2Client { * } * if (nextRequest) { * // Fetch the next page. - * return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); + * return client.listMonitoredResourceDescriptors(nextRequest, + * options).then(callback); * } * } * client.listMonitoredResourceDescriptors({}, options) @@ -701,18 +705,16 @@ class LoggingServiceV2Client { options = options || {}; return this._innerApiCalls.listMonitoredResourceDescriptors( - request, - options, - callback - ); + request, options, callback); } /** - * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object. + * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a + * NodeJS Stream object. * - * This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. + * This fetches the paged responses for {@link + * listMonitoredResourceDescriptors} continuously and invokes the callback + * registered for 'data' event for each element in the responses. * * The returned object has 'end' method when no more elements are required. * @@ -729,10 +731,14 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @returns {Stream} - * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. + * An object stream which emits an object representing + * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} + * on 'data' event. * * @example * @@ -754,10 +760,7 @@ class LoggingServiceV2Client { options = options || {}; return this._descriptors.page.listMonitoredResourceDescriptors.createStream( - this._innerApiCalls.listMonitoredResourceDescriptors, - request, - options - ); + this._innerApiCalls.listMonitoredResourceDescriptors, request, options); } /** @@ -780,27 +783,32 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of string. * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. + * When autoPaginate: false is specified through options, it contains the + * result in a single response. If the response indicates the next page + * exists, the third parameter is set to be used for the next request object. + * The fourth parameter keeps the raw response object of an object + * representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of string. * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of string in a single response. + * When autoPaginate: false is specified through options, the array has + * three elements. The first element is Array of string in a single response. * The second element is the next request object if the response * indicates the next page exists, or null. The third element is - * an object representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. + * an object representing [ListLogsResponse]{@link + * google.logging.v2.ListLogsResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -864,8 +872,8 @@ class LoggingServiceV2Client { * Equivalent to {@link listLogs}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listLogs} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. + * and invokes the callback registered for 'data' event for each element in + * the responses. * * The returned object has 'end' method when no more elements are required. * @@ -889,8 +897,10 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @returns {Stream} * An object stream which emits a string on 'data' event. * @@ -914,10 +924,7 @@ class LoggingServiceV2Client { options = options || {}; return this._descriptors.page.listLogs.createStream( - this._innerApiCalls.listLogs, - request, - options - ); + this._innerApiCalls.listLogs, request, options); } // -------------------- diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 1ac908727a6..b9973ad28ad 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -48,8 +48,10 @@ class MetricsServiceV2Client { * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. + * {@link + * https://developers.google.com/identity/protocols/application-default-credentials + * Application Default Credentials}, your project ID will be detected + * automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. * @param {string} [options.servicePath] - The domain name of the @@ -60,13 +62,12 @@ class MetricsServiceV2Client { // Ensure that options include the service address and port. opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath: this.constructor.servicePath, - }, - opts - ); + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts); // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. @@ -89,41 +90,32 @@ class MetricsServiceV2Client { // Load the applicable protos. const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging_metrics.proto' - ) - ); + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging_metrics.proto')); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { projectPathTemplate: new gax.PathTemplate('projects/{project}'), - metricPathTemplate: new gax.PathTemplate( - 'projects/{project}/metrics/{metric}' - ), + metricPathTemplate: + new gax.PathTemplate('projects/{project}/metrics/{metric}'), }; // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listLogMetrics: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'metrics' - ), + listLogMetrics: + new gax.PageDescriptor('pageToken', 'nextPageToken', 'metrics'), }; // Put together the default options sent with requests. const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.MetricsServiceV2', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); + 'google.logging.v2.MetricsServiceV2', gapicConfig, opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')}); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -132,10 +124,8 @@ class MetricsServiceV2Client { // Put together the "service stub" for // google.logging.v2.MetricsServiceV2. - const metricsServiceV2Stub = gaxGrpc.createStub( - protos.google.logging.v2.MetricsServiceV2, - opts - ); + const metricsServiceV2Stub = + gaxGrpc.createStub(protos.google.logging.v2.MetricsServiceV2, opts); // Iterate over each of the methods that the service provides // and create an API call method for each. @@ -148,16 +138,11 @@ class MetricsServiceV2Client { ]; for (const methodName of metricsServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( - metricsServiceV2Stub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - } - ), - defaults[methodName], - this._descriptors.page[methodName] - ); + metricsServiceV2Stub.then(stub => function() { + const args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + }), + defaults[methodName], this._descriptors.page[methodName]); } } @@ -218,27 +203,35 @@ class MetricsServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [LogMetric]{@link google.logging.v2.LogMetric}. + * The second parameter to the callback is Array of [LogMetric]{@link + * google.logging.v2.LogMetric}. * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. + * When autoPaginate: false is specified through options, it contains the + * result in a single response. If the response indicates the next page + * exists, the third parameter is set to be used for the next request object. + * The fourth parameter keeps the raw response object of an object + * representing [ListLogMetricsResponse]{@link + * google.logging.v2.ListLogMetricsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}. + * The first element of the array is Array of [LogMetric]{@link + * google.logging.v2.LogMetric}. * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogMetric]{@link google.logging.v2.LogMetric} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. + * When autoPaginate: false is specified through options, the array has + * three elements. The first element is Array of [LogMetric]{@link + * google.logging.v2.LogMetric} in a single response. The second element is + * the next request object if the response indicates the next page exists, or + * null. The third element is an object representing + * [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * @@ -302,8 +295,8 @@ class MetricsServiceV2Client { * Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listLogMetrics} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. + * and invokes the callback registered for 'data' event for each element in + * the responses. * * The returned object has 'end' method when no more elements are required. * @@ -324,10 +317,13 @@ class MetricsServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @returns {Stream} - * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. + * An object stream which emits an object representing [LogMetric]{@link + * google.logging.v2.LogMetric} on 'data' event. * * @example * @@ -349,10 +345,7 @@ class MetricsServiceV2Client { options = options || {}; return this._descriptors.page.listLogMetrics.createStream( - this._innerApiCalls.listLogMetrics, - request, - options - ); + this._innerApiCalls.listLogMetrics, request, options); } /** @@ -365,15 +358,19 @@ class MetricsServiceV2Client { * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The second parameter to the callback is an object representing + * [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * [LogMetric]{@link google.logging.v2.LogMetric}. The promise has a method + * named "cancel" which cancels the ongoing API call. * * @example * @@ -418,17 +415,22 @@ class MetricsServiceV2Client { * The new logs-based metric, which must not have an identifier that * already exists. * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link + * google.logging.v2.LogMetric} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The second parameter to the callback is an object representing + * [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * [LogMetric]{@link google.logging.v2.LogMetric}. The promise has a method + * named "cancel" which cancels the ongoing API call. * * @example * @@ -479,17 +481,22 @@ class MetricsServiceV2Client { * @param {Object} request.metric * The updated metric. * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link + * google.logging.v2.LogMetric} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The second parameter to the callback is an object representing + * [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * [LogMetric]{@link google.logging.v2.LogMetric}. The promise has a method + * named "cancel" which cancels the ongoing API call. * * @example * @@ -534,12 +541,15 @@ class MetricsServiceV2Client { * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The promise has a method named "cancel" which cancels the ongoing API + * call. * * @example * diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 3ea73b80c31..7f7c8547c64 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -31,9 +31,9 @@ const {Logging} = require('../src/index'); // block all attempts to chat with the metadata server (kokoro runs on GCE) nock('http://metadata.google.internal') - .get(() => true) - .replyWithError({code: 'ENOTFOUND'}) - .persist(); + .get(() => true) + .replyWithError({code: 'ENOTFOUND'}) + .persist(); describe('Logging', () => { let PROJECT_ID; @@ -53,62 +53,58 @@ describe('Logging', () => { before(done => { async.parallel( - [ - callback => { - bucket.create(callback); - }, - callback => { - dataset.create(callback); - }, - callback => { - topic.create(callback); - }, - callback => { - logging.auth.getProjectId((err, projectId) => { - if (err) { - callback(err); - return; - } - PROJECT_ID = projectId; - callback(); - }); - }, - ], - done - ); + [ + callback => { + bucket.create(callback); + }, + callback => { + dataset.create(callback); + }, + callback => { + topic.create(callback); + }, + callback => { + logging.auth.getProjectId((err, projectId) => { + if (err) { + callback(err); + return; + } + PROJECT_ID = projectId; + callback(); + }); + }, + ], + done); }); after(done => { async.parallel( - [deleteBuckets, deleteDatasets, deleteTopics, deleteSinks], - done - ); + [deleteBuckets, deleteDatasets, deleteTopics, deleteSinks], done); function deleteBuckets(callback) { storage.getBuckets( - { - prefix: TESTS_PREFIX, - }, - (err, buckets) => { - if (err) { - done(err); - return; - } - - function deleteBucket(bucket, callback) { - bucket.deleteFiles(err => { - if (err) { - callback(err); - return; - } + { + prefix: TESTS_PREFIX, + }, + (err, buckets) => { + if (err) { + done(err); + return; + } - bucket.delete(callback); - }); - } + function deleteBucket(bucket, callback) { + bucket.deleteFiles(err => { + if (err) { + callback(err); + return; + } - async.each(buckets, deleteBucket, callback); - } - ); + bucket.delete(callback); + }); + } + + async.each(buckets, deleteBucket, callback); + }); } function deleteDatasets(callback) { @@ -144,68 +140,63 @@ describe('Logging', () => { const sink = logging.sink(generateName()); sink.create( - { - destination: bucket, - }, - (err, sink, apiResponse) => { - assert.ifError(err); + { + destination: bucket, + }, + (err, sink, apiResponse) => { + assert.ifError(err); - const destination = 'storage.googleapis.com/' + bucket.name; - assert.strictEqual(apiResponse.destination, destination); + const destination = 'storage.googleapis.com/' + bucket.name; + assert.strictEqual(apiResponse.destination, destination); - done(); - } - ); + done(); + }); }); it('should create a sink with a Dataset destination', done => { const sink = logging.sink(generateName()); sink.create( - { - destination: dataset, - }, - (err, sink, apiResponse) => { - assert.ifError(err); + { + destination: dataset, + }, + (err, sink, apiResponse) => { + assert.ifError(err); - const destination = 'bigquery.googleapis.com/datasets/' + dataset.id; + const destination = + 'bigquery.googleapis.com/datasets/' + dataset.id; - // The projectId may have been replaced depending on how the system - // tests are being run, so let's not care about that. - apiResponse.destination = apiResponse.destination.replace( - /projects\/[^/]*\//, - '' - ); + // The projectId may have been replaced depending on how the system + // tests are being run, so let's not care about that. + apiResponse.destination = + apiResponse.destination.replace(/projects\/[^/]*\//, ''); - assert.strictEqual(apiResponse.destination, destination); + assert.strictEqual(apiResponse.destination, destination); - done(); - } - ); + done(); + }); }); it('should create a sink with a Topic destination', done => { const sink = logging.sink(generateName()); sink.create( - { - destination: topic, - }, - (err, sink, apiResponse) => { - assert.ifError(err); + { + destination: topic, + }, + (err, sink, apiResponse) => { + assert.ifError(err); - const destination = 'pubsub.googleapis.com/' + topic.name; + const destination = 'pubsub.googleapis.com/' + topic.name; - // The projectId may have been replaced depending on how the system - // tests are being run, so let's not care about that. - assert.strictEqual( - apiResponse.destination.replace(/projects\/[^/]*\//, ''), - destination.replace(/projects\/[^/]*\//, '') - ); + // The projectId may have been replaced depending on how the system + // tests are being run, so let's not care about that. + assert.strictEqual( + apiResponse.destination.replace(/projects\/[^/]*\//, ''), + destination.replace(/projects\/[^/]*\//, '')); - done(); - } - ); + done(); + }); }); describe('metadata', () => { @@ -214,11 +205,10 @@ describe('Logging', () => { before(done => { sink.create( - { - destination: topic, - }, - done - ); + { + destination: topic, + }, + done); }); it('should set metadata', done => { @@ -247,11 +237,10 @@ describe('Logging', () => { before(done => { sink.create( - { - destination: topic, - }, - done - ); + { + destination: topic, + }, + done); }); it('should list sinks', done => { @@ -263,26 +252,24 @@ describe('Logging', () => { }); it('should list sinks as a stream', done => { - const logstream = logging - .getSinksStream({pageSize: 1}) - .on('error', done) - .once('data', () => { - logstream.end(); - done(); - }); + const logstream = logging.getSinksStream({pageSize: 1}) + .on('error', done) + .once('data', () => { + logstream.end(); + done(); + }); }); it('should get metadata', done => { - logging - .getSinksStream({pageSize: 1}) - .on('error', done) - .once('data', sink => { - sink.getMetadata((err, metadata) => { - assert.ifError(err); - assert.strictEqual(is.object(metadata), true); - done(); + logging.getSinksStream({pageSize: 1}) + .on('error', done) + .once('data', sink => { + sink.getMetadata((err, metadata) => { + assert.ifError(err); + assert.strictEqual(is.object(metadata), true); + done(); + }); }); - }); }); }); }); @@ -326,27 +313,26 @@ describe('Logging', () => { it('should list log entries', done => { logging.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); - assert.strictEqual(entries.length, 1); - done(); - } - ); + { + autoPaginate: false, + pageSize: 1, + }, + (err, entries) => { + assert.ifError(err); + assert.strictEqual(entries.length, 1); + done(); + }); }); it('should list log entries as a stream', done => { const logstream = logging - .getEntriesStream({ - autoPaginate: false, - pageSize: 1, - }) - .on('error', done) - .once('data', () => logstream.end()) - .on('end', done); + .getEntriesStream({ + autoPaginate: false, + pageSize: 1, + }) + .on('error', done) + .once('data', () => logstream.end()) + .on('end', done); }); describe('log-specific entries', () => { @@ -356,29 +342,27 @@ describe('Logging', () => { it('should list log entries', done => { log.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); - assert.strictEqual(entries.length, 1); - done(); - } - ); + { + autoPaginate: false, + pageSize: 1, + }, + (err, entries) => { + assert.ifError(err); + assert.strictEqual(entries.length, 1); + done(); + }); }); it('should list log entries as a stream', done => { - const logstream = log - .getEntriesStream({ - autoPaginate: false, - pageSize: 1, - }) - .on('error', done) - .once('data', () => { - logstream.end(); - done(); - }); + const logstream = log.getEntriesStream({ + autoPaginate: false, + pageSize: 1, + }) + .on('error', done) + .once('data', () => { + logstream.end(); + done(); + }); }); }); @@ -392,33 +376,32 @@ describe('Logging', () => { setTimeout(() => { log.getEntries( - { - autoPaginate: false, - pageSize: logEntries.length, - }, - (err, entries) => { - assert.ifError(err); + { + autoPaginate: false, + pageSize: logEntries.length, + }, + (err, entries) => { + assert.ifError(err); - assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ - 'log entry 1', - { - delegate: 'my_username', - }, - { - nonValue: null, - boolValue: true, - arrayValue: [1, 2, 3], - }, - { - nested: { + assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ + 'log entry 1', + { delegate: 'my_username', }, - }, - ]); + { + nonValue: null, + boolValue: true, + arrayValue: [1, 2, 3], + }, + { + nested: { + delegate: 'my_username', + }, + }, + ]); - done(); - } - ); + done(); + }); }, WRITE_CONSISTENCY_DELAY_MS); }); }); @@ -436,20 +419,19 @@ describe('Logging', () => { setTimeout(() => { log.getEntries( - { - autoPaginate: false, - pageSize: 3, - }, - (err, entries) => { - assert.ifError(err); - assert.deepStrictEqual(entries.map(x => x.data), [ - '3', - '2', - '1', - ]); - done(); - } - ); + { + autoPaginate: false, + pageSize: 3, + }, + (err, entries) => { + assert.ifError(err); + assert.deepStrictEqual(entries.map(x => x.data), [ + '3', + '2', + '1', + ]); + done(); + }); }, WRITE_CONSISTENCY_DELAY_MS * 4); }); }, 1000); @@ -464,19 +446,16 @@ describe('Logging', () => { setTimeout(() => { log.getEntries( - { - autoPaginate: false, - pageSize: messages.length, - }, - (err, entries) => { - assert.ifError(err); - assert.deepStrictEqual( - entries.reverse().map(x => x.data), - messages - ); - done(); - } - ); + { + autoPaginate: false, + pageSize: messages.length, + }, + (err, entries) => { + assert.ifError(err); + assert.deepStrictEqual( + entries.reverse().map(x => x.data), messages); + done(); + }); }, WRITE_CONSISTENCY_DELAY_MS * 4); }); @@ -493,24 +472,23 @@ describe('Logging', () => { setTimeout(() => { log.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); + { + autoPaginate: false, + pageSize: 1, + }, + (err, entries) => { + assert.ifError(err); - const entry = entries[0]; + const entry = entries[0]; - assert.deepStrictEqual(entry.data, { - when: logEntry.data.when.toString(), - matchUser: logEntry.data.matchUser.toString(), - matchUserError: logEntry.data.matchUserError.toString(), - }); + assert.deepStrictEqual(entry.data, { + when: logEntry.data.when.toString(), + matchUser: logEntry.data.matchUser.toString(), + matchUserError: logEntry.data.matchUserError.toString(), + }); - done(); - } - ); + done(); + }); }, WRITE_CONSISTENCY_DELAY_MS); }); }); @@ -531,21 +509,20 @@ describe('Logging', () => { setTimeout(() => { log.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); + { + autoPaginate: false, + pageSize: 1, + }, + (err, entries) => { + assert.ifError(err); - const entry = entries[0]; + const entry = entries[0]; - assert.strictEqual(entry.metadata.severity, metadata.severity); - assert.deepStrictEqual(entry.data, data); + assert.strictEqual(entry.metadata.severity, metadata.severity); + assert.deepStrictEqual(entry.data, data); - done(); - } - ); + done(); + }); }, WRITE_CONSISTENCY_DELAY_MS); }); }); @@ -559,44 +536,41 @@ describe('Logging', () => { setTimeout(() => { log.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); + { + autoPaginate: false, + pageSize: 1, + }, + (err, entries) => { + assert.ifError(err); - const entry = entries[0]; + const entry = entries[0]; - assert.strictEqual(entry.data, text); - assert.deepStrictEqual(entry.metadata.resource, { - type: 'global', - labels: { - project_id: PROJECT_ID, - }, - }); + assert.strictEqual(entry.data, text); + assert.deepStrictEqual(entry.metadata.resource, { + type: 'global', + labels: { + project_id: PROJECT_ID, + }, + }); - done(); - } - ); + done(); + }); }, WRITE_CONSISTENCY_DELAY_MS); }); }); it('should write a log with camelcase resource label keys', done => { log.write( - logEntries, - { - resource: { - type: 'gce_instance', - labels: { - zone: 'global', - instanceId: '3', + logEntries, { + resource: { + type: 'gce_instance', + labels: { + zone: 'global', + instanceId: '3', + }, }, }, - }, - done - ); + done); }); it('should write to a log with alert helper', done => { diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.js index 1e88b22635e..b6cb8420230 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.js @@ -39,11 +39,11 @@ describe('Entry', () => { before(() => { Entry = proxyquire('../src/entry.js', { - '@google-cloud/common-grpc': { - Service: FakeGrpcService, - }, - eventid: FakeEventId, - }).Entry; + '@google-cloud/common-grpc': { + Service: FakeGrpcService, + }, + eventid: FakeEventId, + }).Entry; }); beforeEach(() => { diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 74342e23950..5ddf64c2de5 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -58,11 +58,8 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.deleteLog = + mockSimpleGrpcMethod(request, null, error); client.deleteLog(request, err => { assert(err instanceof Error); @@ -89,10 +86,8 @@ describe('LoggingServiceV2Client', () => { const expectedResponse = {}; // Mock Grpc layer - client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.writeLogEntries = + mockSimpleGrpcMethod(request, expectedResponse); client.writeLogEntries(request, (err, response) => { assert.ifError(err); @@ -114,11 +109,8 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.writeLogEntries = + mockSimpleGrpcMethod(request, null, error); client.writeLogEntries(request, (err, response) => { assert(err instanceof Error); @@ -152,14 +144,11 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogEntries = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.entries); - }; + client._innerApiCalls.listLogEntries = + (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.entries); + }; client.listLogEntries(request, (err, response) => { assert.ifError(err); @@ -181,11 +170,8 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogEntries = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.listLogEntries = + mockSimpleGrpcMethod(request, null, error); client.listLogEntries(request, (err, response) => { assert(err instanceof Error); @@ -216,14 +202,11 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.resourceDescriptors); - }; + client._innerApiCalls.listMonitoredResourceDescriptors = + (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.resourceDescriptors); + }; client.listMonitoredResourceDescriptors(request, (err, response) => { assert.ifError(err); @@ -242,11 +225,8 @@ describe('LoggingServiceV2Client', () => { const request = {}; // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.listMonitoredResourceDescriptors = + mockSimpleGrpcMethod(request, null, error); client.listMonitoredResourceDescriptors(request, (err, response) => { assert(err instanceof Error); @@ -305,11 +285,8 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogs = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.listLogs = + mockSimpleGrpcMethod(request, null, error); client.listLogs(request, (err, response) => { assert(err instanceof Error); @@ -369,11 +346,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listSinks = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.listSinks = + mockSimpleGrpcMethod(request, null, error); client.listSinks(request, (err, response) => { assert(err instanceof Error); @@ -412,10 +386,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getSink = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.getSink = + mockSimpleGrpcMethod(request, expectedResponse); client.getSink(request, (err, response) => { assert.ifError(err); @@ -437,11 +409,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getSink = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.getSink = + mockSimpleGrpcMethod(request, null, error); client.getSink(request, (err, response) => { assert(err instanceof Error); @@ -482,10 +451,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.createSink = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.createSink = + mockSimpleGrpcMethod(request, expectedResponse); client.createSink(request, (err, response) => { assert.ifError(err); @@ -509,11 +476,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.createSink = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.createSink = + mockSimpleGrpcMethod(request, null, error); client.createSink(request, (err, response) => { assert(err instanceof Error); @@ -554,10 +518,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.updateSink = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.updateSink = + mockSimpleGrpcMethod(request, expectedResponse); client.updateSink(request, (err, response) => { assert.ifError(err); @@ -581,11 +543,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.updateSink = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.updateSink = + mockSimpleGrpcMethod(request, null, error); client.updateSink(request, (err, response) => { assert(err instanceof Error); @@ -631,11 +590,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.deleteSink = + mockSimpleGrpcMethod(request, null, error); client.deleteSink(request, err => { assert(err instanceof Error); @@ -668,14 +624,11 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listExclusions = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.exclusions); - }; + client._innerApiCalls.listExclusions = + (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.exclusions); + }; client.listExclusions(request, (err, response) => { assert.ifError(err); @@ -697,11 +650,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listExclusions = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.listExclusions = + mockSimpleGrpcMethod(request, null, error); client.listExclusions(request, (err, response) => { assert(err instanceof Error); @@ -738,10 +688,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.getExclusion = + mockSimpleGrpcMethod(request, expectedResponse); client.getExclusion(request, (err, response) => { assert.ifError(err); @@ -763,11 +711,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.getExclusion = + mockSimpleGrpcMethod(request, null, error); client.getExclusion(request, (err, response) => { assert(err instanceof Error); @@ -806,10 +751,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.createExclusion = + mockSimpleGrpcMethod(request, expectedResponse); client.createExclusion(request, (err, response) => { assert.ifError(err); @@ -833,11 +776,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.createExclusion = + mockSimpleGrpcMethod(request, null, error); client.createExclusion(request, (err, response) => { assert(err instanceof Error); @@ -878,10 +818,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.updateExclusion = + mockSimpleGrpcMethod(request, expectedResponse); client.updateExclusion(request, (err, response) => { assert.ifError(err); @@ -907,11 +845,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.updateExclusion = + mockSimpleGrpcMethod(request, null, error); client.updateExclusion(request, (err, response) => { assert(err instanceof Error); @@ -957,11 +892,8 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.deleteExclusion = + mockSimpleGrpcMethod(request, null, error); client.deleteExclusion(request, err => { assert(err instanceof Error); @@ -995,14 +927,11 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogMetrics = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.metrics); - }; + client._innerApiCalls.listLogMetrics = + (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.metrics); + }; client.listLogMetrics(request, (err, response) => { assert.ifError(err); @@ -1024,11 +953,8 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogMetrics = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.listLogMetrics = + mockSimpleGrpcMethod(request, null, error); client.listLogMetrics(request, (err, response) => { assert(err instanceof Error); @@ -1065,10 +991,8 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.getLogMetric = + mockSimpleGrpcMethod(request, expectedResponse); client.getLogMetric(request, (err, response) => { assert.ifError(err); @@ -1090,11 +1014,8 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.getLogMetric = + mockSimpleGrpcMethod(request, null, error); client.getLogMetric(request, (err, response) => { assert(err instanceof Error); @@ -1133,10 +1054,8 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.createLogMetric = + mockSimpleGrpcMethod(request, expectedResponse); client.createLogMetric(request, (err, response) => { assert.ifError(err); @@ -1160,11 +1079,8 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.createLogMetric = + mockSimpleGrpcMethod(request, null, error); client.createLogMetric(request, (err, response) => { assert(err instanceof Error); @@ -1203,10 +1119,8 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.updateLogMetric = + mockSimpleGrpcMethod(request, expectedResponse); client.updateLogMetric(request, (err, response) => { assert.ifError(err); @@ -1230,11 +1144,8 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.updateLogMetric = + mockSimpleGrpcMethod(request, null, error); client.updateLogMetric(request, (err, response) => { assert(err instanceof Error); @@ -1280,11 +1191,8 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); + client._innerApiCalls.deleteLogMetric = + mockSimpleGrpcMethod(request, null, error); client.deleteLogMetric(request, err => { assert(err instanceof Error); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.js index e1f9a520f91..690c5c820c6 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.js @@ -109,20 +109,20 @@ describe('Logging', () => { before(() => { Logging = proxyquire('../../', { - '@google-cloud/common-grpc': { - util: fakeUtil, - }, - '@google-cloud/promisify': fakePromisify, - '@google-cloud/paginator': fakePaginator, - '@google-cloud/projectify': fakeProjectify, - 'google-auth-library': { - GoogleAuth: fakeGoogleAuth, - }, - './log': {Log: FakeLog}, - './entry': {Entry: FakeEntry}, - './sink': {Sink: FakeSink}, - './v2': fakeV2, - }).Logging; + '@google-cloud/common-grpc': { + util: fakeUtil, + }, + '@google-cloud/promisify': fakePromisify, + '@google-cloud/paginator': fakePaginator, + '@google-cloud/projectify': fakeProjectify, + 'google-auth-library': { + GoogleAuth: fakeGoogleAuth, + }, + './log': {Log: FakeLog}, + './entry': {Entry: FakeEntry}, + './sink': {Sink: FakeSink}, + './v2': fakeV2, + }).Logging; }); beforeEach(() => { @@ -152,7 +152,7 @@ describe('Logging', () => { } it('should extend the correct methods', () => { - assert(extended); // See `fakePaginator.extend` + assert(extended); // See `fakePaginator.extend` }); it('should promisify all the things', () => { @@ -172,16 +172,14 @@ describe('Logging', () => { googleAuthOverride = options_ => { assert.deepStrictEqual( - options_, - extend( - { - libName: 'gccl', - libVersion: PKG.version, - scopes: EXPECTED_SCOPES, - }, - options - ) - ); + options_, + extend( + { + libName: 'gccl', + libVersion: PKG.version, + scopes: EXPECTED_SCOPES, + }, + options)); return fakeGoogleAuthInstance; }; @@ -200,16 +198,14 @@ describe('Logging', () => { assert.notStrictEqual(logging.options, options); assert.deepStrictEqual( - logging.options, - extend( - { - libName: 'gccl', - libVersion: PKG.version, - scopes: EXPECTED_SCOPES, - }, - options - ) - ); + logging.options, + extend( + { + libName: 'gccl', + libVersion: PKG.version, + scopes: EXPECTED_SCOPES, + }, + options)); }); it('should set the projectId', () => { @@ -252,7 +248,7 @@ describe('Logging', () => { logging.setAclForDataset_ = (name, config, callback) => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); - callback(); // done() + callback(); // done() }; logging.createSink(SINK_NAME, CONFIG, done); @@ -273,7 +269,7 @@ describe('Logging', () => { logging.setAclForTopic_ = (name, config, callback) => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); - callback(); // done() + callback(); // done() }; logging.createSink(SINK_NAME, CONFIG, done); @@ -294,7 +290,7 @@ describe('Logging', () => { logging.setAclForBucket_ = (name, config, callback) => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); - callback(); // done() + callback(); // done() }; logging.createSink(SINK_NAME, CONFIG, done); @@ -427,12 +423,10 @@ describe('Logging', () => { assert.strictEqual(config.method, 'listLogEntries'); assert.deepStrictEqual( - config.reqOpts, - extend(options, { - orderBy: 'timestamp desc', - resourceNames: ['projects/' + logging.projectId], - }) - ); + config.reqOpts, extend(options, { + orderBy: 'timestamp desc', + resourceNames: ['projects/' + logging.projectId], + })); assert.deepStrictEqual(config.gaxOpts, { autoPaginate: undefined, @@ -932,7 +926,7 @@ describe('Logging', () => { it('should execute the request function', () => { logging.api[CONFIG.client][CONFIG.method] = function(done) { const callback = [].slice.call(arguments).pop(); - callback(null, done); // so it ends the test + callback(null, done); // so it ends the test }; logging.request(CONFIG, assert.ifError); @@ -1108,7 +1102,7 @@ describe('Logging', () => { const expectedDestination = 'storage.googleapis.com/' + bucket.name; assert.strictEqual(config.destination, expectedDestination); - callback(); // done() + callback(); // done() }; callback(null, apiResponse); @@ -1230,7 +1224,7 @@ describe('Logging', () => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); assert.strictEqual(config.destination, expectedDestination); - callback(); // done() + callback(); // done() }; logging.setAclForDataset_(SINK_NAME, CONFIG, done); @@ -1346,7 +1340,7 @@ describe('Logging', () => { assert.strictEqual(name, SINK_NAME); assert.strictEqual(config, CONFIG); assert.strictEqual(config.destination, expectedDestination); - callback(); // done() + callback(); // done() }; logging.setAclForTopic_(SINK_NAME, CONFIG, done); }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 239192bf20d..09f065eee76 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -60,15 +60,14 @@ describe('Log', () => { before(() => { Log = proxyquire('../src/log', { - '@google-cloud/promisify': fakePromisify, - './entry': {Entry: Entry}, - './metadata': {Metadata: FakeMetadata}, - }).Log; + '@google-cloud/promisify': fakePromisify, + './entry': {Entry: Entry}, + './metadata': {Metadata: FakeMetadata}, + }).Log; const assignSeverityToEntries_ = Log.assignSeverityToEntries_; Log.assignSeverityToEntries_ = function() { - return ( - assignSeverityToEntriesOverride || assignSeverityToEntries_ - ).apply(null, arguments); + return (assignSeverityToEntriesOverride || assignSeverityToEntries_) + .apply(null, arguments); }; }); @@ -141,20 +140,18 @@ describe('Log', () => { it('should assign severity to a single entry', () => { assert.deepStrictEqual( - Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) - .map(prop('metadata')) - .map(prop('severity')), - [SEVERITY] - ); + Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) + .map(prop('metadata')) + .map(prop('severity')), + [SEVERITY]); }); it('should assign severity property to multiple entries', () => { assert.deepStrictEqual( - Log.assignSeverityToEntries_(ENTRIES, SEVERITY) - .map(prop('metadata')) - .map(prop('severity')), - [SEVERITY, SEVERITY, SEVERITY] - ); + Log.assignSeverityToEntries_(ENTRIES, SEVERITY) + .map(prop('metadata')) + .map(prop('severity')), + [SEVERITY, SEVERITY, SEVERITY]); }); it('should not affect original array', () => { @@ -201,7 +198,7 @@ describe('Log', () => { assert.deepStrictEqual(config.gaxOpts, {}); - callback(); // done() + callback(); // done() }; log.delete(done); @@ -258,7 +255,7 @@ describe('Log', () => { it('should call Logging getEntries with defaults', done => { log.logging.getEntries = (options, callback) => { assert.deepStrictEqual(options, EXPECTED_OPTIONS); - callback(); // done() + callback(); // done() }; log.getEntries(done); @@ -272,7 +269,7 @@ describe('Log', () => { log.logging.getEntries = (options_, callback) => { assert.deepStrictEqual(options_, extend({}, EXPECTED_OPTIONS, options)); - callback(); // done() + callback(); // done() }; log.getEntries(options, done); @@ -421,7 +418,7 @@ describe('Log', () => { it('should not require options', done => { log.logging.request = (config, callback) => { - callback(); // done() + callback(); // done() }; log.write(ENTRY, done); @@ -452,7 +449,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.alert(ENTRY, LABELS, done); }); @@ -476,7 +473,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.critical(ENTRY, LABELS, done); }); @@ -500,7 +497,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.debug(ENTRY, LABELS, done); }); @@ -524,7 +521,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.emergency(ENTRY, LABELS, done); }); @@ -550,7 +547,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.error(ENTRY, LABELS, done); @@ -579,7 +576,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.info(ENTRY, LABELS, done); @@ -608,7 +605,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.notice(ENTRY, LABELS, done); @@ -633,7 +630,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.warning(ENTRY, LABELS, done); }); diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.js index 8c6796f0a38..bbe0cb08b8c 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.js @@ -25,9 +25,9 @@ let instanceOverride; const fakeGcpMetadata = { instance: function(path) { if (instanceOverride) { - const override = Array.isArray(instanceOverride) - ? instanceOverride.find(entry => entry.path === path) - : instanceOverride; + const override = Array.isArray(instanceOverride) ? + instanceOverride.find(entry => entry.path === path) : + instanceOverride; if (override.path) { assert.strictEqual(path, override.path); @@ -52,8 +52,10 @@ let readFileShouldError; const fakeFS = { readFile: (filename, encoding, callback) => { setImmediate(() => { - if (readFileShouldError) callback(new Error(FAKE_READFILE_ERROR_MESSAGE)); - else callback(null, FAKE_READFILE_CONTENTS); + if (readFileShouldError) + callback(new Error(FAKE_READFILE_ERROR_MESSAGE)); + else + callback(null, FAKE_READFILE_CONTENTS); }); }, }; @@ -69,9 +71,9 @@ describe('metadata', () => { before(() => { Metadata = proxyquire('../src/metadata', { - 'gcp-metadata': fakeGcpMetadata, - fs: fakeFS, - }).Metadata; + 'gcp-metadata': fakeGcpMetadata, + fs: fakeFS, + }).Metadata; MetadataCached = extend({}, Metadata); }); diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.js index aa83810c800..c9acef62969 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.js @@ -43,8 +43,8 @@ describe('Sink', function() { before(function() { Sink = proxyquire('../src/sink', { - '@google-cloud/promisify': fakePromisify, - }).Sink; + '@google-cloud/promisify': fakePromisify, + }).Sink; }); beforeEach(function() { @@ -66,9 +66,8 @@ describe('Sink', function() { it('should localize the formatted name', function() { assert.strictEqual( - sink.formattedName_, - 'projects/' + LOGGING.projectId + '/sinks/' + SINK_NAME - ); + sink.formattedName_, + 'projects/' + LOGGING.projectId + '/sinks/' + SINK_NAME); }); }); @@ -79,7 +78,7 @@ describe('Sink', function() { sink.logging.createSink = function(name, config_, callback) { assert.strictEqual(name, sink.name); assert.strictEqual(config_, config); - callback(); // done() + callback(); // done() }; sink.create(config, done); @@ -98,7 +97,7 @@ describe('Sink', function() { assert.deepStrictEqual(config.gaxOpts, {}); - callback(); // done() + callback(); // done() }; sink.delete(done); @@ -178,7 +177,7 @@ describe('Sink', function() { it('should call set metadata', function(done) { sink.setMetadata = function(metadata, callback) { assert.strictEqual(metadata.filter, FILTER); - callback(); // done() + callback(); // done() }; sink.setFilter(FILTER, done); From 94a8550fd3d2a8b5029717347c93d5dc1f590351 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 22 Oct 2018 08:32:22 -0700 Subject: [PATCH 0247/1029] refactor: remove async, methmeth, propprop (#253) --- handwritten/logging/package.json | 6 +- handwritten/logging/system-test/logging.js | 315 +++++++-------------- handwritten/logging/test/log.js | 9 +- 3 files changed, 105 insertions(+), 225 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index afc0a226884..8ac4fe88376 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,8 +55,7 @@ "test": "npm run cover", "docs": "jsdoc -c .jsdoc.js", "prettier": "prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", - "publish-module": "node ../../scripts/publish.js logging", - "system-test": "mocha build/system-test/*.js --timeout 600000", + "system-test": "mocha build/system-test --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "eslint samples/", @@ -94,7 +93,6 @@ "@google-cloud/nodejs-repo-tools": "^2.3.3", "@google-cloud/pubsub": "^0.20.1", "@google-cloud/storage": "^2.0.2", - "async": "^2.6.1", "bignumber.js": "^7.2.1", "codecov": "^3.0.4", "eslint": "^5.4.0", @@ -104,12 +102,10 @@ "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "methmeth": "^1.1.0", "mocha": "^5.2.0", "nyc": "^13.0.1", "power-assert": "^1.6.0", "prettier": "^1.14.2", - "propprop": "^0.3.1", "proxyquire": "^2.1.0", "uuid": "^3.3.2", "gts": "^0.8.0", diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 7f7c8547c64..3c744c34172 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -14,20 +14,15 @@ * limitations under the License. */ -'use strict'; - const assert = require('assert'); -const async = require('async'); const BigQuery = require('@google-cloud/bigquery'); -const exec = require('methmeth'); const extend = require('extend'); const is = require('is'); const nock = require('nock'); const PubSub = require('@google-cloud/pubsub'); const {Storage} = require('@google-cloud/storage'); const uuid = require('uuid'); - -const {Logging} = require('../src/index'); +const {Logging} = require('../src'); // block all attempts to chat with the metadata server (kokoro runs on GCE) nock('http://metadata.google.internal') @@ -43,7 +38,6 @@ describe('Logging', () => { const bigQuery = new BigQuery(); const pubsub = new PubSub(); const storage = new Storage(); - const logging = new Logging(); // Create the possible destinations for sinks that we will create. @@ -51,204 +45,118 @@ describe('Logging', () => { const dataset = bigQuery.dataset(generateName().replace(/-/g, '_')); const topic = pubsub.topic(generateName()); - before(done => { - async.parallel( - [ - callback => { - bucket.create(callback); - }, - callback => { - dataset.create(callback); - }, - callback => { - topic.create(callback); - }, - callback => { - logging.auth.getProjectId((err, projectId) => { - if (err) { - callback(err); - return; - } - PROJECT_ID = projectId; - callback(); - }); - }, - ], - done); + before(async () => { + await Promise.all([ + bucket.create(), dataset.create(), topic.create(), + logging.auth.getProjectId().then(projectId => { + PROJECT_ID = projectId; + }) + ]); }); - after(done => { - async.parallel( - [deleteBuckets, deleteDatasets, deleteTopics, deleteSinks], done); - - function deleteBuckets(callback) { - storage.getBuckets( - { - prefix: TESTS_PREFIX, - }, - (err, buckets) => { - if (err) { - done(err); - return; - } - - function deleteBucket(bucket, callback) { - bucket.deleteFiles(err => { - if (err) { - callback(err); - return; - } - - bucket.delete(callback); - }); - } + after(async () => { + await Promise.all( + [deleteBuckets, deleteDatasets, deleteTopics, deleteSinks]); - async.each(buckets, deleteBucket, callback); - }); + async function deleteBuckets() { + const [buckets] = await storage.getBuckets({ + prefix: TESTS_PREFIX, + }); + return Promise.all(buckets.map(async bucket => { + await bucket.deleteFiles(); + await bucket.delete(); + })); } - function deleteDatasets(callback) { - getAndDelete(bigQuery.getDatasets.bind(bigQuery), callback); + async function deleteDatasets() { + return getAndDelete(bigQuery.getDatasets.bind(bigQuery)); } - function deleteTopics(callback) { - getAndDelete(pubsub.getTopics.bind(pubsub), callback); + async function deleteTopics() { + return getAndDelete(pubsub.getTopics.bind(pubsub)); } - function deleteSinks(callback) { - getAndDelete(logging.getSinks.bind(logging), callback); + async function deleteSinks() { + return getAndDelete(logging.getSinks.bind(logging)); } - function getAndDelete(method, callback) { - method((err, objects) => { - if (err) { - callback(err); - return; - } - - objects = objects.filter(object => { - return (object.name || object.id).indexOf(TESTS_PREFIX) === 0; - }); - - async.each(objects, exec('delete'), callback); - }); + async function getAndDelete(method) { + let [objects] = await method(); + return Promise.all( + objects.filter(o => (o.name || o.id).indexOf(TESTS_PREFIX) === 0) + .map(o => o.delete())); } }); describe('sinks', () => { - it('should create a sink with a Bucket destination', done => { + it('should create a sink with a Bucket destination', async () => { const sink = logging.sink(generateName()); - - sink.create( - { - destination: bucket, - }, - (err, sink, apiResponse) => { - assert.ifError(err); - - const destination = 'storage.googleapis.com/' + bucket.name; - assert.strictEqual(apiResponse.destination, destination); - - done(); - }); + const [_, apiResponse] = await sink.create({ + destination: bucket, + }); + const destination = 'storage.googleapis.com/' + bucket.name; + assert.strictEqual(apiResponse.destination, destination); }); - it('should create a sink with a Dataset destination', done => { + it('should create a sink with a Dataset destination', async () => { const sink = logging.sink(generateName()); - - sink.create( + const [_, apiResponse] = await sink.create( { destination: dataset, }, - (err, sink, apiResponse) => { - assert.ifError(err); - - const destination = - 'bigquery.googleapis.com/datasets/' + dataset.id; + ); - // The projectId may have been replaced depending on how the system - // tests are being run, so let's not care about that. - apiResponse.destination = - apiResponse.destination.replace(/projects\/[^/]*\//, ''); + const destination = `bigquery.googleapis.com/datasets/${dataset.id}`; - assert.strictEqual(apiResponse.destination, destination); - - done(); - }); + // The projectId may have been replaced depending on how the system + // tests are being run, so let's not care about that. + apiResponse.destination = + apiResponse.destination.replace(/projects\/[^/]*\//, ''); + assert.strictEqual(apiResponse.destination, destination); }); - it('should create a sink with a Topic destination', done => { + it('should create a sink with a Topic destination', async () => { const sink = logging.sink(generateName()); - - sink.create( - { - destination: topic, - }, - (err, sink, apiResponse) => { - assert.ifError(err); - - const destination = 'pubsub.googleapis.com/' + topic.name; - - // The projectId may have been replaced depending on how the system - // tests are being run, so let's not care about that. - assert.strictEqual( - apiResponse.destination.replace(/projects\/[^/]*\//, ''), - destination.replace(/projects\/[^/]*\//, '')); - - done(); - }); + const [_, apiResponse] = await sink.create({destination: topic}); + const destination = 'pubsub.googleapis.com/' + topic.name; + + // The projectId may have been replaced depending on how the system + // tests are being run, so let's not care about that. + assert.strictEqual( + apiResponse.destination.replace(/projects\/[^/]*\//, ''), + destination.replace(/projects\/[^/]*\//, '')); }); describe('metadata', () => { const sink = logging.sink(generateName()); const FILTER = 'severity = ALERT'; - before(done => { - sink.create( - { - destination: topic, - }, - done); + before(async () => { + await sink.create({destination: topic}); }); - it('should set metadata', done => { - const metadata = { - filter: FILTER, - }; - - sink.setMetadata(metadata, (err, apiResponse) => { - assert.ifError(err); - assert.strictEqual(apiResponse.filter, FILTER); - done(); - }); + it('should set metadata', async () => { + const metadata = {filter: FILTER}; + const [apiResponse] = await sink.setMetadata(metadata); + assert.strictEqual(apiResponse.filter, FILTER); }); - it('should set a filter', done => { - sink.setFilter(FILTER, (err, apiResponse) => { - assert.ifError(err); - assert.strictEqual(apiResponse.filter, FILTER); - done(); - }); + it('should set a filter', async () => { + const [apiResponse] = await sink.setFilter(FILTER); + assert.strictEqual(apiResponse.filter, FILTER); }); }); describe('listing sinks', () => { const sink = logging.sink(generateName()); - before(done => { - sink.create( - { - destination: topic, - }, - done); + before(async () => { + await sink.create({destination: topic}); }); - it('should list sinks', done => { - logging.getSinks((err, sinks) => { - assert.ifError(err); - assert(sinks.length > 0); - done(); - }); + it('should list sinks', async () => { + const [sinks] = await logging.getSinks(); + assert(sinks.length > 0); }); it('should list sinks as a stream', done => { @@ -311,17 +219,12 @@ describe('Logging', () => { after(done => log.delete(done)); - it('should list log entries', done => { - logging.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); - assert.strictEqual(entries.length, 1); - done(); - }); + it('should list log entries', async () => { + const [entries] = await logging.getEntries({ + autoPaginate: false, + pageSize: 1, + }); + assert.strictEqual(entries.length, 1); }); it('should list log entries as a stream', done => { @@ -340,17 +243,12 @@ describe('Logging', () => { log.write(logEntries, options, done); }); - it('should list log entries', done => { - log.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); - assert.strictEqual(entries.length, 1); - done(); - }); + it('should list log entries', async () => { + const [entries] = await log.getEntries({ + autoPaginate: false, + pageSize: 1, + }); + assert.strictEqual(entries.length, 1); }); it('should list log entries as a stream', done => { @@ -370,40 +268,27 @@ describe('Logging', () => { log.write(logEntries[0], options, done); }); - it('should write multiple entries to a log', done => { - log.write(logEntries, options, err => { - assert.ifError(err); - - setTimeout(() => { - log.getEntries( - { - autoPaginate: false, - pageSize: logEntries.length, - }, - (err, entries) => { - assert.ifError(err); - - assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ - 'log entry 1', - { - delegate: 'my_username', - }, - { - nonValue: null, - boolValue: true, - arrayValue: [1, 2, 3], - }, - { - nested: { - delegate: 'my_username', - }, - }, - ]); - - done(); - }); - }, WRITE_CONSISTENCY_DELAY_MS); + it('should write multiple entries to a log', async () => { + await log.write(logEntries, options); + await new Promise(r => setTimeout(r, WRITE_CONSISTENCY_DELAY_MS)); + const [entries] = await log.getEntries({ + autoPaginate: false, + pageSize: logEntries.length, }); + assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ + 'log entry 1', + {delegate: 'my_username'}, + { + nonValue: null, + boolValue: true, + arrayValue: [1, 2, 3], + }, + { + nested: { + delegate: 'my_username', + }, + }, + ]); }); it('should preserve order of entries', done => { diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.js index 09f065eee76..5629c6cda8d 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.js @@ -18,7 +18,6 @@ const assert = require('assert'); const extend = require('extend'); -const prop = require('propprop'); const proxyquire = require('proxyquire'); const {util} = require('@google-cloud/common-grpc'); const promisify = require('@google-cloud/promisify'); @@ -141,16 +140,16 @@ describe('Log', () => { it('should assign severity to a single entry', () => { assert.deepStrictEqual( Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) - .map(prop('metadata')) - .map(prop('severity')), + .map(x => x.metadata) + .map(x => x.severity), [SEVERITY]); }); it('should assign severity property to multiple entries', () => { assert.deepStrictEqual( Log.assignSeverityToEntries_(ENTRIES, SEVERITY) - .map(prop('metadata')) - .map(prop('severity')), + .map(x => x.metadata) + .map(x => x.severity), [SEVERITY, SEVERITY, SEVERITY]); }); From b60fa0a03820696ee5941691c220138340877e7e Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 22 Oct 2018 11:27:39 -0700 Subject: [PATCH 0248/1029] chores(build): run codecov on continuous builds (#256) --- handwritten/logging/.kokoro/continuous/node8/test.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/handwritten/logging/.kokoro/continuous/node8/test.cfg b/handwritten/logging/.kokoro/continuous/node8/test.cfg index e69de29bb2d..468b8c7197a 100644 --- a/handwritten/logging/.kokoro/continuous/node8/test.cfg +++ b/handwritten/logging/.kokoro/continuous/node8/test.cfg @@ -0,0 +1,9 @@ +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} From 9a2a93ba4b3a0c8efad5b8d6326b4b5a53d60224 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 22 Oct 2018 16:43:59 -0700 Subject: [PATCH 0249/1029] chores(build): do not collect sponge.xml from windows builds (#257) --- handwritten/logging/.kokoro/presubmit/windows/common.cfg | 7 ------- 1 file changed, 7 deletions(-) diff --git a/handwritten/logging/.kokoro/presubmit/windows/common.cfg b/handwritten/logging/.kokoro/presubmit/windows/common.cfg index 7320db792a4..d6e25e0b1b8 100644 --- a/handwritten/logging/.kokoro/presubmit/windows/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/windows/common.cfg @@ -1,9 +1,2 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - From a251e0982de0bee17698c4443756352e157810d0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 23 Oct 2018 06:41:21 -0700 Subject: [PATCH 0250/1029] fix(deps): update dependency snakecase-keys to v2 (#259) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8ac4fe88376..efd87f930d7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -84,7 +84,7 @@ "nock": "^10.0.1", "protobufjs": "^6.8.8", "pumpify": "^1.5.1", - "snakecase-keys": "^1.2.0", + "snakecase-keys": "^2.0.0", "stream-events": "^1.0.4", "through2": "^2.0.3" }, From 15297ab8dc9d3dfc4f17e37faaf07c1946bf9f5f Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 23 Oct 2018 07:43:17 -0700 Subject: [PATCH 0251/1029] chore: use gts for samples; jettison prettier (#255) --- handwritten/logging/.eslintrc.yml | 3 --- handwritten/logging/.prettierignore | 3 --- handwritten/logging/.prettierrc | 8 -------- handwritten/logging/package.json | 9 +++------ 4 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 handwritten/logging/.prettierignore delete mode 100644 handwritten/logging/.prettierrc diff --git a/handwritten/logging/.eslintrc.yml b/handwritten/logging/.eslintrc.yml index 73eeec27612..2dc11775b79 100644 --- a/handwritten/logging/.eslintrc.yml +++ b/handwritten/logging/.eslintrc.yml @@ -2,12 +2,9 @@ extends: - 'eslint:recommended' - 'plugin:node/recommended' - - prettier plugins: - node - - prettier rules: - prettier/prettier: error block-scoped-var: error eqeqeq: error no-warning-comments: warn diff --git a/handwritten/logging/.prettierignore b/handwritten/logging/.prettierignore deleted file mode 100644 index f6fac98b0a8..00000000000 --- a/handwritten/logging/.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* diff --git a/handwritten/logging/.prettierrc b/handwritten/logging/.prettierrc deleted file mode 100644 index df6eac07446..00000000000 --- a/handwritten/logging/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ ---- -bracketSpacing: false -printWidth: 80 -semi: true -singleQuote: true -tabWidth: 2 -trailingComma: es5 -useTabs: false diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index efd87f930d7..7ddddac4e98 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -54,15 +54,14 @@ "test-no-cover": "mocha build/test/*.js", "test": "npm run cover", "docs": "jsdoc -c .jsdoc.js", - "prettier": "prettier --write src/*.js src/**/*.js test/*.js test/**/*.js samples/*.js samples/**/*.js system-test/*.js system-test/**/*.js", - "system-test": "mocha build/system-test --timeout 600000", + "system-test": "mocha build/system-test/*.js --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "eslint samples/", "check": "gts check", "clean": "gts clean", "compile": "tsc -p . && cp src/v2/*.json build/src/v2 && cp -r protos build", - "fix": "gts fix", + "fix": "gts fix && gts fix samples/*.js samples/**/*.js", "prepare": "npm run compile", "pretest": "npm run compile", "posttest": "npm run check" @@ -96,16 +95,14 @@ "bignumber.js": "^7.2.1", "codecov": "^3.0.4", "eslint": "^5.4.0", - "eslint-config-prettier": "^3.0.1", "eslint-plugin-node": "^7.0.1", - "eslint-plugin-prettier": "^3.0.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", "nyc": "^13.0.1", "power-assert": "^1.6.0", - "prettier": "^1.14.2", + "propprop": "^0.3.1", "proxyquire": "^2.1.0", "uuid": "^3.3.2", "gts": "^0.8.0", From 0cb07510cf7588d7db28711d1d0dccbfa81950b9 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 23 Oct 2018 15:19:26 -0700 Subject: [PATCH 0252/1029] fix(synth): s.replace import syntax of code samples in autogenerated code (#266) --- handwritten/logging/synth.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 974616df549..61bf59afe0a 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -35,13 +35,23 @@ s.copy(v2_library, excludes=["src/index.js", "README.md", "package.json"]) s.replace( - "src/v2/config_service_v2_client.js", "../../package.json", "../../../package.json" -) -s.replace( - "src/v2/logging_service_v2_client.js", "../../package.json", "../../../package.json" + [ + "src/v2/config_service_v2_client.js", + "src/v2/logging_service_v2_client.js", + "src/v2/metrics_service_v2_client.js", + ], + "../../package.json", + "../../../package.json", ) + s.replace( - "src/v2/metrics_service_v2_client.js", "../../package.json", "../../../package.json" + [ + "src/v2/config_service_v2_client.js", + "src/v2/logging_service_v2_client.js", + "src/v2/metrics_service_v2_client.js", + ], + "(\*\s*)const logging = require\('@google-cloud/logging'\);", + "\1const logging = require('@google-cloud/logging');", ) From b55540f851b1adc363d43ec498ddf413a6b06e4b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 23 Oct 2018 15:46:03 -0700 Subject: [PATCH 0253/1029] chore(typescript): convert src/ to typescript (#258) --- handwritten/logging/package.json | 23 +++-- .../logging/src/{entry.js => entry.ts} | 15 ++-- .../logging/src/{index.js => index.ts} | 84 +++++++++++-------- handwritten/logging/src/{log.js => log.ts} | 27 +++--- .../logging/src/{metadata.js => metadata.ts} | 18 ++-- handwritten/logging/src/{sink.js => sink.ts} | 38 +++++---- handwritten/logging/tsconfig.json | 2 +- 7 files changed, 126 insertions(+), 81 deletions(-) rename handwritten/logging/src/{entry.js => entry.ts} (92%) rename handwritten/logging/src/{index.js => index.ts} (94%) rename handwritten/logging/src/{log.js => log.ts} (98%) rename handwritten/logging/src/{metadata.js => metadata.ts} (90%) rename handwritten/logging/src/{sink.js => sink.ts} (94%) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7ddddac4e98..7afdd9a19ef 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -54,10 +54,10 @@ "test-no-cover": "mocha build/test/*.js", "test": "npm run cover", "docs": "jsdoc -c .jsdoc.js", - "system-test": "mocha build/system-test/*.js --timeout 600000", + "system-test": "mocha build/system-test --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "eslint samples/", + "lint": "gts check && eslint samples/", "check": "gts check", "clean": "gts clean", "compile": "tsc -p . && cp src/v2/*.json build/src/v2 && cp -r protos build", @@ -92,10 +92,19 @@ "@google-cloud/nodejs-repo-tools": "^2.3.3", "@google-cloud/pubsub": "^0.20.1", "@google-cloud/storage": "^2.0.2", + "@types/arrify": "^1.0.4", + "@types/extend": "^3.0.0", + "@types/is": "0.0.20", + "@types/mocha": "^5.2.5", + "@types/nock": "^9.3.0", + "@types/pumpify": "^1.4.1", + "@types/through2": "^2.0.34", + "@types/uuid": "^3.4.4", "bignumber.js": "^7.2.1", "codecov": "^3.0.4", "eslint": "^5.4.0", "eslint-plugin-node": "^7.0.1", + "gts": "^0.8.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", @@ -104,8 +113,12 @@ "power-assert": "^1.6.0", "propprop": "^0.3.1", "proxyquire": "^2.1.0", - "uuid": "^3.3.2", - "gts": "^0.8.0", - "typescript": "~3.1.0" + "typescript": "~3.1.0", + "uuid": "^3.3.2" + }, + "nyc": { + "exclude": [ + "build/test" + ] } } diff --git a/handwritten/logging/src/entry.js b/handwritten/logging/src/entry.ts similarity index 92% rename from handwritten/logging/src/entry.js rename to handwritten/logging/src/entry.ts index 4c339498ca9..a7a93e30ed0 100644 --- a/handwritten/logging/src/entry.js +++ b/handwritten/logging/src/entry.ts @@ -16,10 +16,11 @@ 'use strict'; -const {Service} = require('@google-cloud/common-grpc'); +import {Service} from '@google-cloud/common-grpc'; +// tslint:disable-next-line variable-name const EventId = require('eventid'); -const extend = require('extend'); -const is = require('is'); +import * as extend from 'extend'; +import * as is from 'is'; const eventId = new EventId(); @@ -82,6 +83,8 @@ const eventId = new EventId(); * }); */ class Entry { + metadata; + data; constructor(metadata, data) { /** * @name Entry#metadata @@ -122,7 +125,8 @@ class Entry { options = options || {}; const entry = extend(true, {}, this.metadata); if (is.object(this.data)) { - entry.jsonPayload = Service.objToStruct_(this.data, { + // tslint:disable-next-line no-any + entry.jsonPayload = (Service as any).objToStruct_(this.data, { removeCircular: !!options.removeCircular, stringify: true, }); @@ -152,7 +156,8 @@ class Entry { static fromApiResponse_(entry) { let data = entry[entry.payload]; if (entry.payload === 'jsonPayload') { - data = Service.structToObj_(data); + // tslint:disable-next-line no-any + data = (Service as any).structToObj_(data); } const serializedEntry = new Entry(entry, data); if (serializedEntry.metadata.timestamp) { diff --git a/handwritten/logging/src/index.js b/handwritten/logging/src/index.ts similarity index 94% rename from handwritten/logging/src/index.js rename to handwritten/logging/src/index.ts index a101700d17d..f57197469d6 100644 --- a/handwritten/logging/src/index.js +++ b/handwritten/logging/src/index.ts @@ -16,17 +16,17 @@ 'use strict'; -const arrify = require('arrify'); -const common = require('@google-cloud/common-grpc'); -const {promisifyAll} = require('@google-cloud/promisify'); -const {paginator} = require('@google-cloud/paginator'); -const {replaceProjectIdToken} = require('@google-cloud/projectify'); -const extend = require('extend'); -const {GoogleAuth} = require('google-auth-library'); -const is = require('is'); +import * as arrify from 'arrify'; +import * as common from '@google-cloud/common-grpc'; +import {promisifyAll} from '@google-cloud/promisify'; +import {paginator} from '@google-cloud/paginator'; +import {replaceProjectIdToken} from '@google-cloud/projectify'; +import * as extend from 'extend'; +import {GoogleAuth} from 'google-auth-library'; +import * as is from 'is'; const pumpify = require('pumpify'); -const streamEvents = require('stream-events'); -const through = require('through2'); +import * as streamEvents from 'stream-events'; +import * as through from 'through2'; const PKG = require('../../package.json'); const v2 = require('./v2'); @@ -111,10 +111,15 @@ const {Sink} = require('./sink'); * Full quickstart example: */ class Logging { + api; + auth: GoogleAuth; + options; + projectId: string; + constructor(options) { // Determine what scopes are needed. // It is the union of the scopes on all three clients. - const scopes = []; + const scopes: Array<{}> = []; const clientClasses = [ v2.ConfigServiceV2Client, v2.LoggingServiceV2Client, @@ -131,7 +136,7 @@ class Logging { { libName: 'gccl', libVersion: PKG.version, - scopes: scopes, + scopes, }, options); this.api = {}; @@ -241,14 +246,14 @@ class Logging { } const reqOpts = { parent: 'projects/' + this.projectId, - sink: extend({}, config, {name: name}), + sink: extend({}, config, {name}), }; delete reqOpts.sink.gaxOptions; this.request( { client: 'ConfigServiceV2Client', method: 'createSink', - reqOpts: reqOpts, + reqOpts, gaxOpts: config.gaxOptions, }, (err, resp) => { @@ -419,15 +424,15 @@ class Logging { { client: 'LoggingServiceV2Client', method: 'listLogEntries', - reqOpts: reqOpts, + reqOpts, gaxOpts: gaxOptions, }, - function() { - const entries = arguments[1]; + (...args) => { + const entries = args[1]; if (entries) { - arguments[1] = entries.map(Entry.fromApiResponse_); + args[1] = entries.map(Entry.fromApiResponse_); } - callback.apply(null, arguments); + callback.apply(null, args); }); } @@ -468,7 +473,8 @@ class Logging { options = options || {}; let requestStream; const userStream = streamEvents(pumpify.obj()); - userStream.abort = () => { + // tslint:disable-next-line no-any + (userStream as any).abort = () => { if (requestStream) { requestStream.abort(); } @@ -494,10 +500,11 @@ class Logging { requestStream = self.request({ client: 'LoggingServiceV2Client', method: 'listLogEntriesStream', - reqOpts: reqOpts, + reqOpts, gaxOpts: gaxOptions, }); - userStream.setPipeline(requestStream, toEntryStream); + // tslint:disable-next-line no-any + (userStream as any).setPipeline(requestStream, toEntryStream); }); return userStream; } @@ -575,19 +582,19 @@ class Logging { { client: 'ConfigServiceV2Client', method: 'listSinks', - reqOpts: reqOpts, + reqOpts, gaxOpts: gaxOptions, }, - function() { - const sinks = arguments[1]; + (...args) => { + const sinks = args[1]; if (sinks) { - arguments[1] = sinks.map(sink => { + args[1] = sinks.map(sink => { const sinkInstance = self.sink(sink.name); sinkInstance.metadata = sink; return sinkInstance; }); } - callback.apply(null, arguments); + callback.apply(null, args); }); } @@ -627,7 +634,8 @@ class Logging { options = options || {}; let requestStream; const userStream = streamEvents(pumpify.obj()); - userStream.abort = () => { + // tslint:disable-next-line no-any + (userStream as any).abort = () => { if (requestStream) { requestStream.abort(); } @@ -650,10 +658,11 @@ class Logging { requestStream = self.request({ client: 'ConfigServiceV2Client', method: 'listSinksStream', - reqOpts: reqOpts, + reqOpts, gaxOpts: gaxOptions, }); - userStream.setPipeline(requestStream, toSinkStream); + // tslint:disable-next-line no-any + (userStream as any).setPipeline(requestStream, toSinkStream); }); return userStream; } @@ -705,7 +714,7 @@ class Logging { * @param {object} config.reqOpts Request options. * @param {function} [callback] Callback function. */ - request(config, callback) { + request(config, callback?) { const self = this; const isStreamMode = !callback; let gaxStream; @@ -727,7 +736,7 @@ class Logging { callback(err); return; } - self.projectId = projectId; + self.projectId = projectId!; let gaxClient = self.api[config.client]; if (!gaxClient) { // Lazily instantiate client. @@ -735,14 +744,15 @@ class Logging { self.api[config.client] = gaxClient; } let reqOpts = extend(true, {}, config.reqOpts); - reqOpts = replaceProjectIdToken(reqOpts, projectId); + reqOpts = replaceProjectIdToken(reqOpts, projectId!); const requestFn = gaxClient[config.method].bind(gaxClient, reqOpts, config.gaxOpts); callback(null, requestFn); }); } function makeRequestCallback() { - if (global.GCLOUD_SANDBOX_ENV) { + // tslint:disable-next-line no-any + if ((global as any).GCLOUD_SANDBOX_ENV) { return; } prepareGaxRequest((err, requestFn) => { @@ -754,7 +764,8 @@ class Logging { }); } function makeRequestStream() { - if (global.GCLOUD_SANDBOX_ENV) { + // tslint:disable-next-line no-any + if ((global as any).GCLOUD_SANDBOX_ENV) { return through.obj(); } prepareGaxRequest((err, requestFn) => { @@ -770,6 +781,7 @@ class Logging { }) .pipe(stream); }); + return; } return stream; } @@ -820,7 +832,7 @@ class Logging { }); dataset.setMetadata( { - access: access, + access, }, (err, apiResp) => { if (err) { diff --git a/handwritten/logging/src/log.js b/handwritten/logging/src/log.ts similarity index 98% rename from handwritten/logging/src/log.js rename to handwritten/logging/src/log.ts index e821f6b21ba..c091145606c 100644 --- a/handwritten/logging/src/log.js +++ b/handwritten/logging/src/log.ts @@ -16,10 +16,10 @@ 'use strict'; -const arrify = require('arrify'); -const {promisifyAll} = require('@google-cloud/promisify'); -const extend = require('extend'); -const is = require('is'); +import * as arrify from 'arrify'; +import {promisifyAll} from '@google-cloud/promisify'; +import * as extend from 'extend'; +import * as is from 'is'; const snakeCaseKeys = require('snakecase-keys'); const {Entry} = require('./entry'); @@ -48,6 +48,11 @@ const {Metadata} = require('./metadata'); * const log = logging.log('syslog'); */ class Log { + formattedName_: string; + removeCircular_: boolean; + metadata_; + logging; + name: string; constructor(logging, name, options) { options = options || {}; this.formattedName_ = Log.formatName_(logging.projectId, name); @@ -58,7 +63,7 @@ class Log { * @name Log#name * @type {string} */ - this.name = this.formattedName_.split('/').pop(); + this.name = this.formattedName_.split('/').pop()!; } /** @@ -211,7 +216,7 @@ class Log { { client: 'LoggingServiceV2Client', method: 'deleteLog', - reqOpts: reqOpts, + reqOpts, gaxOpts: gaxOptions, }, callback); @@ -300,7 +305,7 @@ class Log { * // } * // } */ - entry(metadata, data) { + entry(metadata, data?) { if (!data) { data = metadata; metadata = {}; @@ -656,7 +661,7 @@ class Log { { logName: self.formattedName_, entries: decoratedEntries, - resource: resource, + resource, }, options); delete reqOpts.gaxOptions; @@ -664,7 +669,7 @@ class Log { { client: 'LoggingServiceV2Client', method: 'writeLogEntries', - reqOpts: reqOpts, + reqOpts, gaxOpts: options.gaxOptions, }, callback); @@ -702,10 +707,10 @@ class Log { static assignSeverityToEntries_(entries, severity) { return arrify(entries).map(entry => { const metadata = extend(true, {}, entry.metadata, { - severity: severity, + severity, }); return extend(new Entry(), entry, { - metadata: metadata, + metadata, }); }); } diff --git a/handwritten/logging/src/metadata.js b/handwritten/logging/src/metadata.ts similarity index 90% rename from handwritten/logging/src/metadata.js rename to handwritten/logging/src/metadata.ts index a7f988bbba0..20297138675 100644 --- a/handwritten/logging/src/metadata.js +++ b/handwritten/logging/src/metadata.ts @@ -16,8 +16,8 @@ 'use strict'; -const fs = require('fs'); -const gcpMetadata = require('gcp-metadata'); +import * as fs from 'fs'; +import * as gcpMetadata from 'gcp-metadata'; /** * The Metadata class attempts to contact the metadata service and determine, @@ -32,6 +32,7 @@ const gcpMetadata = require('gcp-metadata'); * @param {Logging} logging The parent Logging instance. */ class Metadata { + logging; constructor(logging) { this.logging = logging; } @@ -110,7 +111,7 @@ class Metadata { // idResponse can be BigNumber when the id too large for JavaScript // numbers. Use a toString() to uniformly convert to a string. instance_id: idResponse.toString(), - zone: zone, + zone, }, }); }, callback); @@ -133,11 +134,15 @@ class Metadata { // gcpMetadata.instance('attributes/cluster-name').then(resp => { fs.readFile( - Metadata.KUBERNETES_NAMESPACE_ID_PATH, 'utf8', (err, namespace) => { + // tslint:disable-next-line no-any + (Metadata as any).KUBERNETES_NAMESPACE_ID_PATH, 'utf8', + (err, namespace) => { if (err) { callback(new Error( `Error reading ` + - `${Metadata.KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}`)); + // tslint:disable-next-line no-any + `${(Metadata as any).KUBERNETES_NAMESPACE_ID_PATH}: ${ + err.message}`)); return; } callback(null, { @@ -163,7 +168,8 @@ class Metadata { } } -Metadata.KUBERNETES_NAMESPACE_ID_PATH = +// tslint:disable-next-line no-any +(Metadata as any).KUBERNETES_NAMESPACE_ID_PATH = '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; module.exports.Metadata = Metadata; diff --git a/handwritten/logging/src/sink.js b/handwritten/logging/src/sink.ts similarity index 94% rename from handwritten/logging/src/sink.js rename to handwritten/logging/src/sink.ts index e9cc4aca33a..44b71f885ab 100644 --- a/handwritten/logging/src/sink.js +++ b/handwritten/logging/src/sink.ts @@ -16,10 +16,10 @@ 'use strict'; -const common = require('@google-cloud/common-grpc'); -const {promisifyAll} = require('@google-cloud/promisify'); -const extend = require('extend'); -const is = require('is'); +import * as common from '@google-cloud/common-grpc'; +import {promisifyAll} from '@google-cloud/promisify'; +import * as extend from 'extend'; +import * as is from 'is'; /** * A sink is an object that lets you to specify a set of log entries to export @@ -41,6 +41,10 @@ const is = require('is'); * const sink = logging.sink('my-sink'); */ class Sink { + logging; + name: string; + formattedName_: string; + metadata; constructor(logging, name) { this.logging = logging; /** @@ -146,7 +150,7 @@ class Sink { { client: 'ConfigServiceV2Client', method: 'deleteSink', - reqOpts: reqOpts, + reqOpts, gaxOpts: gaxOptions, }, callback); @@ -193,7 +197,7 @@ class Sink { * region_tag:logging_get_sink * Another example: */ - getMetadata(gaxOptions, callback) { + getMetadata(gaxOptions, callback?) { const self = this; if (is.fn(gaxOptions)) { callback = gaxOptions; @@ -206,14 +210,14 @@ class Sink { { client: 'ConfigServiceV2Client', method: 'getSink', - reqOpts: reqOpts, + reqOpts, gaxOpts: gaxOptions, }, - function() { - if (arguments[1]) { - self.metadata = arguments[1]; + (...args) => { + if (args[1]) { + self.metadata = args[1]; } - callback.apply(null, arguments); + callback.apply(null, args); }); } @@ -256,7 +260,7 @@ class Sink { setFilter(filter, callback) { this.setMetadata( { - filter: filter, + filter, }, callback); } @@ -324,14 +328,14 @@ class Sink { { client: 'ConfigServiceV2Client', method: 'updateSink', - reqOpts: reqOpts, + reqOpts, gaxOpts: metadata.gaxOptions, }, - function() { - if (arguments[1]) { - self.metadata = arguments[1]; + (...args) => { + if (args[1]) { + self.metadata = args[1]; } - callback.apply(null, arguments); + callback.apply(null, args); }); }); } diff --git a/handwritten/logging/tsconfig.json b/handwritten/logging/tsconfig.json index 75e8c330a19..49e7f5f474a 100644 --- a/handwritten/logging/tsconfig.json +++ b/handwritten/logging/tsconfig.json @@ -4,12 +4,12 @@ "rootDir": ".", "outDir": "build", "allowJs": true, + "noImplicitAny": false, "declaration": false, "skipLibCheck": true }, "include": [ "src/*.ts", - "src/*/js", "src/**/*.ts", "src/**/*.js", "test/*.ts", From 178f43f51832040fb3e412623911868a5af0324f Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 23 Oct 2018 20:05:19 -0700 Subject: [PATCH 0254/1029] build: run tests on node11 (#268) * build: run tests on node11 * build: run tests on node11 * build: run tests on node11 * build: run tests on node11 --- .../.kokoro/continuous/node11/common.cfg | 24 +++++++++++++++++++ .../.kokoro/continuous/node11/test.cfg | 0 .../.kokoro/presubmit/node11/common.cfg | 24 +++++++++++++++++++ .../logging/.kokoro/presubmit/node11/test.cfg | 0 4 files changed, 48 insertions(+) create mode 100644 handwritten/logging/.kokoro/continuous/node11/common.cfg create mode 100644 handwritten/logging/.kokoro/continuous/node11/test.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node11/common.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node11/test.cfg diff --git a/handwritten/logging/.kokoro/continuous/node11/common.cfg b/handwritten/logging/.kokoro/continuous/node11/common.cfg new file mode 100644 index 00000000000..12ea8516130 --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node11/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:11-user" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/continuous/node11/test.cfg b/handwritten/logging/.kokoro/continuous/node11/test.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/handwritten/logging/.kokoro/presubmit/node11/common.cfg b/handwritten/logging/.kokoro/presubmit/node11/common.cfg new file mode 100644 index 00000000000..12ea8516130 --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node11/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:11-user" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/test.sh" +} diff --git a/handwritten/logging/.kokoro/presubmit/node11/test.cfg b/handwritten/logging/.kokoro/presubmit/node11/test.cfg new file mode 100644 index 00000000000..e69de29bb2d From a17831858982087896b359ad92e5b67c9aa3dccb Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 24 Oct 2018 13:32:26 -0700 Subject: [PATCH 0255/1029] chore: remove old issue template (#270) --- handwritten/logging/.github/ISSUE_TEMPLATE.md | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE.md diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE.md b/handwritten/logging/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 2889c9945bf..00000000000 --- a/handwritten/logging/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,27 +0,0 @@ -Thanks for stopping by to let us know something could be better! - -Please run down the following list and make sure you've tried the usual "quick -fixes": - - - Search the issues already opened: https://github.com/googleapis/nodejs-logging/issues - - Search the issues on our "catch-all" repository: https://github.com/GoogleCloudPlatform/google-cloud-node - - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js - -If you are still having issues, please be sure to include as much information as -possible: - -#### Environment details - - - OS: - - Node.js version: - - npm version: - - `@google-cloud/logging` version: - -#### Steps to reproduce - - 1. ??? - 2. ??? - -Following these steps will guarantee the quickest resolution possible. - -Thanks! From 4dc4e2923b10ac5b420fcead416612d50d40f182 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 26 Oct 2018 05:02:51 -0700 Subject: [PATCH 0256/1029] chore: update github issue templates (#274) --- .../.github/ISSUE_TEMPLATE/bug_report.md | 33 +++++++++++++++++++ .../.github/ISSUE_TEMPLATE/feature_request.md | 18 ++++++++++ .../.github/ISSUE_TEMPLATE/support_request.md | 7 ++++ 3 files changed, 58 insertions(+) create mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/support_request.md diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md b/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000000..b5badf84eb3 --- /dev/null +++ b/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/nodejs-logging/issues + - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node + - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js + +If you are still having issues, please be sure to include as much information as possible: + +#### Environment details + + - OS: + - Node.js version: + - npm version: + - `@google-cloud/logging` version: + +#### Steps to reproduce + + 1. ? + 2. ? + +Making sure to follow these steps will guarantee the quickest resolution possible. + +Thanks! diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md b/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000000..6365857f33c --- /dev/null +++ b/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + + **Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + **Describe the solution you'd like** +A clear and concise description of what you want to happen. + **Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + **Additional context** +Add any other context or screenshots about the feature request here. diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/support_request.md b/handwritten/logging/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 00000000000..99586903212 --- /dev/null +++ b/handwritten/logging/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. From d876cb63738efd1c26752681584bc12e4ade922a Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 26 Oct 2018 10:29:28 -0700 Subject: [PATCH 0257/1029] fix(deps): move nock to devDependencies (#276) Fix regression introduced in a3453de2d1b4715c205af92e8ebf76f0362244dd. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7afdd9a19ef..35b8e1938f8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -80,7 +80,6 @@ "google-proto-files": "^0.17.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", - "nock": "^10.0.1", "protobufjs": "^6.8.8", "pumpify": "^1.5.1", "snakecase-keys": "^2.0.0", @@ -109,6 +108,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", + "nock": "^10.0.1", "nyc": "^13.0.1", "power-assert": "^1.6.0", "propprop": "^0.3.1", From b5dd5dc3756bcafe1e5fc0a4f523c16472c6fc60 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 26 Oct 2018 13:03:00 -0700 Subject: [PATCH 0258/1029] fix(fix): no fix for samples/node_modules (#278) The current glob was catching samples/node_modules. --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 35b8e1938f8..7233098bf20 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,7 @@ "check": "gts check", "clean": "gts clean", "compile": "tsc -p . && cp src/v2/*.json build/src/v2 && cp -r protos build", - "fix": "gts fix && gts fix samples/*.js samples/**/*.js", + "fix": "gts fix && gts fix samples/*.js samples/test/*.js", "prepare": "npm run compile", "pretest": "npm run compile", "posttest": "npm run check" From 98ad93fe5d7e26ab8a8825418d94111afd1cb2fa Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 27 Oct 2018 17:02:49 -0700 Subject: [PATCH 0259/1029] test: fix the system tests with cleanup (#281) --- handwritten/logging/package.json | 1 + handwritten/logging/system-test/logging.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7233098bf20..8569781440b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -54,6 +54,7 @@ "test-no-cover": "mocha build/test/*.js", "test": "npm run cover", "docs": "jsdoc -c .jsdoc.js", + "presystem-test": "npm run compile", "system-test": "mocha build/system-test --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.js index 3c744c34172..acdbbe1408f 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.js @@ -56,7 +56,7 @@ describe('Logging', () => { after(async () => { await Promise.all( - [deleteBuckets, deleteDatasets, deleteTopics, deleteSinks]); + [deleteBuckets(), deleteDatasets(), deleteTopics(), deleteSinks()]); async function deleteBuckets() { const [buckets] = await storage.getBuckets({ From 71f8cae65b1f2eac033b84856ad908037f2cc5d7 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Sun, 28 Oct 2018 00:03:50 -0700 Subject: [PATCH 0260/1029] docs: update reference documentation docs: update reference documentation --- .../protos/google/logging/v2/log_entry.proto | 23 +- .../protos/google/logging/v2/logging.proto | 33 +- .../google/logging/v2/logging_config.proto | 17 +- .../google/logging/v2/logging_metrics.proto | 10 +- .../src/v2/config_service_v2_client.js | 280 ++++++++------- .../src/v2/doc/google/api/doc_distribution.js | 160 +++++---- .../src/v2/doc/google/api/doc_metric.js | 47 ++- .../doc/google/api/doc_monitored_resource.js | 9 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 20 +- .../v2/doc/google/logging/v2/doc_logging.js | 16 +- .../google/logging/v2/doc_logging_config.js | 10 +- .../google/logging/v2/doc_logging_metrics.js | 6 +- .../src/v2/logging_service_v2_client.js | 326 ++++++++++-------- .../src/v2/metrics_service_v2_client.js | 119 ++++--- handwritten/logging/synth.py | 15 +- 15 files changed, 649 insertions(+), 442 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 0e5308c21fa..2f1530e23f6 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2018 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // 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. +// syntax = "proto3"; @@ -83,7 +84,7 @@ message LogEntry { // Optional. The time the event described by the log entry occurred. // This time is used to compute the log entry's age and to enforce // the logs retention period. If this field is omitted in a new log - // entry, then Stackdriver Logging assigns it the current time. + // entry, then Logging assigns it the current time. // Timestamps have nanosecond accuracy, but trailing zeros in the fractional // seconds might be omitted when the timestamp is displayed. // @@ -95,7 +96,7 @@ message LogEntry { // [LogSinks](/logging/docs/api/tasks/exporting-logs). google.protobuf.Timestamp timestamp = 9; - // Output only. The time the log entry was received by Stackdriver Logging. + // Output only. The time the log entry was received by Logging. google.protobuf.Timestamp receive_timestamp = 24; // Optional. The severity of the log entry. The default value is @@ -103,9 +104,9 @@ message LogEntry { google.logging.type.LogSeverity severity = 10; // Optional. A unique identifier for the log entry. If you provide a value, - // then Stackdriver Logging considers other log entries in the same project, + // then Logging considers other log entries in the same project, // with the same `timestamp`, and with the same `insert_id` to be duplicates - // which can be removed. If omitted in new log entries, then Stackdriver + // which can be removed. If omitted in new log entries, then // Logging assigns its own unique identifier. The `insert_id` is also used // to order log entries that have the same `timestamp` value. string insert_id = 4; @@ -133,12 +134,20 @@ message LogEntry { // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` string trace = 22; - // Optional. The span ID within the trace associated with the log entry. For - // Stackdriver Trace spans, this is the same format that the Stackdriver Trace + // Optional. The span ID within the trace associated with the log entry. + // For Trace spans, this is the same format that the Trace // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such // as "000000000000004a". string span_id = 27; + // Optional. The sampling decision of the trace associated with the log entry. + // True means that the trace resource name in the `trace` field was sampled + // for storage in a trace backend. False means that the trace was not sampled + // for storage when this log entry was written, or the sampling decision was + // unknown at the time. A non-sampled `trace` value is still useful as a + // request correlation identifier. The default is False. + bool trace_sampled = 30; + // Optional. Source code location information associated with the log entry, // if any. LogEntrySourceLocation source_location = 23; diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index ef8b6b56b5d..b1812e6f82d 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2018 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // 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. +// syntax = "proto3"; @@ -54,11 +55,10 @@ service LoggingServiceV2 { }; } - // Writes log entries to Stackdriver Logging. This API method is the - // only way to send log entries to Stackdriver Logging. This method - // is used, directly or indirectly, by the Stackdriver Logging agent - // (fluentd) and all logging libraries configured to use Stackdriver - // Logging. + // Writes log entries to Logging. This API method is the + // only way to send log entries to Logging. This method + // is used, directly or indirectly, by the Logging agent + // (fluentd) and all logging libraries configured to use Logging. // A single request may contain log entries for a maximum of 1000 // different resources (projects, organizations, billing accounts or // folders) @@ -70,7 +70,7 @@ service LoggingServiceV2 { } // Lists log entries. Use this method to retrieve log entries from - // Stackdriver Logging. For ways to export log entries, see + // Logging. For ways to export log entries, see // [Exporting Logs](/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { @@ -79,8 +79,7 @@ service LoggingServiceV2 { }; } - // Lists the descriptors for monitored resource types used by Stackdriver - // Logging. + // Lists the descriptors for monitored resource types used by Logging. rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" @@ -135,11 +134,15 @@ message WriteLogEntriesRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // `[LOG_ID]` must be URL-encoded. For example, - // `"projects/my-project-id/logs/syslog"` or - // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - // For more information about log names, see - // [LogEntry][google.logging.v2.LogEntry]. + // `[LOG_ID]` must be URL-encoded. For example: + // + // "projects/my-project-id/logs/syslog" + // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + // + // The permission logging.logEntries.create is needed on each + // project, organization, billing account, or folder that is receiving + // new log entries, whether the resource is specified in + // logName or in an individual log entry. string log_name = 1; // Optional. A default monitored resource object that is assigned to all log @@ -158,7 +161,7 @@ message WriteLogEntriesRequest { // See [LogEntry][google.logging.v2.LogEntry]. map labels = 3; - // Required. The log entries to send to Stackdriver Logging. The order of log + // Required. The log entries to send to Logging. The order of log // entries in this list does not matter. Values supplied in this method's // `log_name`, `resource`, and `labels` fields are copied into those log // entries in this list that do not include values for their corresponding diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index dc2783e0e53..8803ace8180 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2018 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // 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. +// syntax = "proto3"; @@ -30,8 +31,8 @@ option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; -// Service for configuring sinks used to export log entries outside of -// Stackdriver Logging. +// Service for configuring sinks used to export log entries out of +// Logging. service ConfigServiceV2 { // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { @@ -275,7 +276,7 @@ service ConfigServiceV2 { // exported. The sink must be created within a project, organization, billing // account, or folder. message LogSink { - // Available log entry formats. Log entries can be written to Stackdriver + // Available log entry formats. Log entries can be written to // Logging in either format and can be exported in either format. // Version 2 is the preferred format. enum VersionFormat { @@ -321,7 +322,7 @@ message LogSink { VersionFormat output_version_format = 6 [deprecated = true]; // Output only. An IAM identity—a service account or group—under - // which Stackdriver Logging writes the exported log entries to the sink's + // which 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 @@ -423,7 +424,7 @@ message CreateSinkRequest { // 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 - // the same group or service account used by Stackdriver Logging before the + // the same group or service account used by Logging before the // addition of writer identities to this API. The sink's destination must be // in the same project as the sink itself. // @@ -476,7 +477,7 @@ message UpdateSinkRequest { // empty updateMask will be an error. // // For a detailed `FieldMask` definition, see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // Example: `updateMask=filter`. google.protobuf.FieldMask update_mask = 4; @@ -496,7 +497,7 @@ message DeleteSinkRequest { string sink_name = 1; } -// Specifies a set of log entries that are not to be stored in Stackdriver +// Specifies a set of log entries that are not to be stored in // Logging. If your project receives a large volume of logs, you might be able // to use exclusions to reduce your chargeable logs. Exclusions are processed // after log sinks, so you can export log entries before they are excluded. diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index a8f3fe06f21..229fb7ca5cc 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2018 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // 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. +// syntax = "proto3"; @@ -21,6 +22,7 @@ import "google/api/distribution.proto"; import "google/api/metric.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -79,12 +81,12 @@ service MetricsServiceV2 { // extracted values along with an optional histogram of the values as specified // by the bucket options. message LogMetric { - // Stackdriver Logging API version. + // Logging API version. enum ApiVersion { - // Stackdriver Logging API v2. + // Logging API v2. V2 = 0; - // Stackdriver Logging API v1. + // Logging API v1. V1 = 1; } diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 632bb45ddd2..11e021c3ae5 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -22,8 +22,8 @@ const path = require('path'); const VERSION = require('../../../package.json').version; /** - * Service for configuring sinks used to export log entries outside of - * Stackdriver Logging. + * Service for configuring sinks used to export log entries out of + * Logging. * * @class * @memberof v2 @@ -215,38 +215,43 @@ class ConfigServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [LogSink]{@link - * google.logging.v2.LogSink}. + google.logging.v2.LogSink}. * * When autoPaginate: false is specified through options, it contains the - * result in a single response. If the response indicates the next page - * exists, the third parameter is set to be used for the next request object. - * The fourth parameter keeps the raw response object of an object - * representing [ListSinksResponse]{@link - * google.logging.v2.ListSinksResponse}. + result + * in a single response. If the response indicates the next page exists, the + third + * parameter is set to be used for the next request object. The fourth + parameter keeps + * the raw response object of an object representing + [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogSink]{@link - * google.logging.v2.LogSink}. + google.logging.v2.LogSink}. * * When autoPaginate: false is specified through options, the array has - * three elements. The first element is Array of [LogSink]{@link - * google.logging.v2.LogSink} in a single response. The second element is the - * next request object if the response indicates the next page exists, or - * null. The third element is an object representing [ListSinksResponse]{@link - * google.logging.v2.ListSinksResponse}. + three elements. + * The first element is Array of [LogSink]{@link google.logging.v2.LogSink} + in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListSinksResponse]{@link + google.logging.v2.ListSinksResponse}. * * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -307,7 +312,8 @@ class ConfigServiceV2Client { * * This fetches the paged responses for {@link listSinks} continuously * and invokes the callback registered for 'data' event for each element in - * the responses. + the + * responses. * * The returned object has 'end' method when no more elements are required. * @@ -332,16 +338,17 @@ class ConfigServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @returns {Stream} * An object stream which emits an object representing [LogSink]{@link - * google.logging.v2.LogSink} on 'data' event. + google.logging.v2.LogSink} on 'data' event. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -360,7 +367,7 @@ class ConfigServiceV2Client { return this._descriptors.page.listSinks.createStream( this._innerApiCalls.listSinks, request, options); - } + }; /** * Gets a sink. @@ -378,22 +385,24 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogSink]{@link google.logging.v2.LogSink}. + [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link - * google.logging.v2.LogSink}. The promise has a method named "cancel" which - * cancels the ongoing API call. + google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -441,37 +450,42 @@ class ConfigServiceV2Client { * is not already in use. * * This object should have the same structure as [LogSink]{@link - * google.logging.v2.LogSink} + google.logging.v2.LogSink} * @param {boolean} [request.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 the same group or service account used by Stackdriver - * Logging before the addition of writer identities to this API. The sink's - * destination must be in the same project as the sink itself. + `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 + * the same group or service account used by Logging 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. + will + * be a unique service account used only for exports from the new sink. For + * more information, see `writer_identity` in LogSink. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogSink]{@link google.logging.v2.LogSink}. + [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link - * google.logging.v2.LogSink}. The promise has a method named "cancel" which - * cancels the ongoing API call. + google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -522,16 +536,20 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} request.sink * Required. The updated sink, whose name is the same identifier that - * appears as part of `sink_name`. + appears + * as part of `sink_name`. * * This object should have the same structure as [LogSink]{@link - * google.logging.v2.LogSink} + google.logging.v2.LogSink} * @param {boolean} [request.uniqueWriterIdentity] * Optional. See - * [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create) + * + [sinks.create](https://cloud.google.com/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: + 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`. @@ -551,30 +569,33 @@ class ConfigServiceV2Client { * empty updateMask will be an error. * * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask * * Example: `updateMask=filter`. * * This object should have the same structure as [FieldMask]{@link - * google.protobuf.FieldMask} + google.protobuf.FieldMask} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogSink]{@link google.logging.v2.LogSink}. + [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link - * google.logging.v2.LogSink}. The promise has a method named "cancel" which - * cancels the ongoing API call. + google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -623,18 +644,19 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -675,38 +697,43 @@ class ConfigServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [LogExclusion]{@link - * google.logging.v2.LogExclusion}. + google.logging.v2.LogExclusion}. * * When autoPaginate: false is specified through options, it contains the - * result in a single response. If the response indicates the next page - * exists, the third parameter is set to be used for the next request object. - * The fourth parameter keeps the raw response object of an object - * representing [ListExclusionsResponse]{@link - * google.logging.v2.ListExclusionsResponse}. + result + * in a single response. If the response indicates the next page exists, the + third + * parameter is set to be used for the next request object. The fourth + parameter keeps + * the raw response object of an object representing + [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogExclusion]{@link - * google.logging.v2.LogExclusion}. + google.logging.v2.LogExclusion}. * * When autoPaginate: false is specified through options, the array has - * three elements. The first element is Array of [LogExclusion]{@link - * google.logging.v2.LogExclusion} in a single response. The second element is - * the next request object if the response indicates the next page exists, or - * null. The third element is an object representing - * [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. + three elements. + * The first element is Array of [LogExclusion]{@link + google.logging.v2.LogExclusion} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListExclusionsResponse]{@link + google.logging.v2.ListExclusionsResponse}. * * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -767,7 +794,8 @@ class ConfigServiceV2Client { * * This fetches the paged responses for {@link listExclusions} continuously * and invokes the callback registered for 'data' event for each element in - * the responses. + the + * responses. * * The returned object has 'end' method when no more elements are required. * @@ -792,16 +820,17 @@ class ConfigServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @returns {Stream} * An object stream which emits an object representing [LogExclusion]{@link - * google.logging.v2.LogExclusion} on 'data' event. + google.logging.v2.LogExclusion} on 'data' event. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -820,7 +849,7 @@ class ConfigServiceV2Client { return this._descriptors.page.listExclusions.createStream( this._innerApiCalls.listExclusions, request, options); - } + }; /** * Gets the description of an exclusion. @@ -838,22 +867,24 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogExclusion]{@link google.logging.v2.LogExclusion}. + [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing - * [LogExclusion]{@link google.logging.v2.LogExclusion}. The promise has a - * method named "cancel" which cancels the ongoing API call. + [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -900,25 +931,27 @@ class ConfigServiceV2Client { * that is not already used in the parent resource. * * This object should have the same structure as [LogExclusion]{@link - * google.logging.v2.LogExclusion} + google.logging.v2.LogExclusion} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogExclusion]{@link google.logging.v2.LogExclusion}. + [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing - * [LogExclusion]{@link google.logging.v2.LogExclusion}. The promise has a - * method named "cancel" which cancels the ongoing API call. + [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -965,10 +998,11 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} request.exclusion * Required. New values for the existing exclusion. Only the fields - * specified in `update_mask` are relevant. + specified + * in `update_mask` are relevant. * * This object should have the same structure as [LogExclusion]{@link - * google.logging.v2.LogExclusion} + google.logging.v2.LogExclusion} * @param {Object} request.updateMask * Required. A nonempty list of fields to change in the existing exclusion. * New values for the fields are taken from the corresponding fields in the @@ -979,25 +1013,27 @@ class ConfigServiceV2Client { * specify an `update_mask` of `"filter,description"`. * * This object should have the same structure as [FieldMask]{@link - * google.protobuf.FieldMask} + google.protobuf.FieldMask} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogExclusion]{@link google.logging.v2.LogExclusion}. + [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing - * [LogExclusion]{@link google.logging.v2.LogExclusion}. The promise has a - * method named "cancel" which cancels the ongoing API call. + [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -1046,18 +1082,19 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -1180,4 +1217,5 @@ class ConfigServiceV2Client { } } + module.exports = ConfigServiceV2Client; diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index f0468d8ec92..21b0edf7910 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -16,24 +16,25 @@ // to be loaded as the JS file. /** - * Distribution contains summary statistics for a population of values and, - * optionally, a histogram representing the distribution of those values across - * a specified set of histogram buckets. + * `Distribution` contains summary statistics for a population of values. It + * optionally contains a histogram representing the distribution of those values + * across a set of buckets. * * The summary statistics are the count, mean, sum of the squared deviation from * the mean, the minimum, and the maximum of the set of population of values. - * * The histogram is based on a sequence of buckets and gives a count of values - * that fall into each bucket. The boundaries of the buckets are given either - * explicitly or by specifying parameters for a method of computing them - * (buckets of fixed width or buckets of exponentially increasing width). + * that fall into each bucket. The boundaries of the buckets are given either + * explicitly or by formulas for buckets of fixed or exponentially increasing + * widths. * * Although it is not forbidden, it is generally a bad idea to include * non-finite values (infinities or NaNs) in the population of values, as this * will render the `mean` and `sum_of_squared_deviation` fields meaningless. * * @property {number} count - * The number of values in the population. Must be non-negative. + * The number of values in the population. Must be non-negative. This value + * must equal the sum of the values in `bucket_counts` if a histogram is + * provided. * * @property {number} mean * The arithmetic mean of the values in the population. If `count` is zero @@ -41,7 +42,7 @@ * * @property {number} sumOfSquaredDeviation * The sum of squared deviations from the mean of the values in the - * population. For values x_i this is: + * population. For values x_i this is: * * Sum[i=1..n](https://cloud.google.com(x_i - mean)^2) * @@ -58,24 +59,34 @@ * google.api.Range} * * @property {Object} bucketOptions - * Defines the histogram bucket boundaries. + * Defines the histogram bucket boundaries. If the distribution does not + * contain a histogram, then omit this field. * * This object should have the same structure as [BucketOptions]{@link * google.api.BucketOptions} * * @property {number[]} bucketCounts - * If `bucket_options` is given, then the sum of the values in `bucket_counts` - * must equal the value in `count`. If `bucket_options` is not given, no - * `bucket_counts` fields may be given. + * The number of values in each bucket of the histogram, as described in + * `bucket_options`. If the distribution does not have a histogram, then omit + * this field. If there is a histogram, then the sum of the values in + * `bucket_counts` must equal the value in the `count` field of the + * distribution. + * + * If present, `bucket_counts` should contain N values, where N is the number + * of buckets specified in `bucket_options`. If you supply fewer than N + * values, the remaining values are assumed to be 0. * - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). + * The order of the values in `bucket_counts` follows the bucket numbering + * schemes described for the three bucket types. The first value must be the + * count for the underflow bucket (number 0). The next N-2 values are the + * counts for the finite buckets (number 1 through N-2). The N'th value in + * `bucket_counts` is the count for the overflow bucket (number N-1). * - * The size of `bucket_counts` must be no greater than N as defined in - * `bucket_options`. + * @property {Object[]} exemplars + * Must be in increasing order of `value` field. * - * Any suffix of trailing zero bucket_count fields may be omitted. + * This object should have the same structure as [Exemplar]{@link + * google.api.Exemplar} * * @typedef Distribution * @memberof google.api @@ -102,29 +113,21 @@ const Distribution = { }, /** - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_counts` as counts of values - * that fall into one of a sequence of non-overlapping buckets. The sequence - * of buckets is described by `bucket_options`. - * - * A bucket specifies an inclusive lower bound and exclusive upper bound for - * the values that are counted for that bucket. The upper bound of a bucket - * is strictly greater than the lower bound. - * - * The sequence of N buckets for a Distribution consists of an underflow - * bucket (number 0), zero or more finite buckets (number 1 through N - 2) and - * an overflow bucket (number N - 1). The buckets are contiguous: the lower - * bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. - * The buckets span the whole range of finite values: lower bound of the - * underflow bucket is -infinity and the upper bound of the overflow bucket is - * +infinity. The finite buckets are so-called because both bounds are - * finite. - * - * `BucketOptions` describes bucket boundaries in one of three ways. Two - * describe the boundaries by giving parameters for a formula to generate - * boundaries and one gives the bucket boundaries explicitly. - * - * If `bucket_boundaries` is not given, then no `bucket_counts` may be given. + * `BucketOptions` describes the bucket boundaries used to create a histogram + * for the distribution. The buckets can be in a linear sequence, an + * exponential sequence, or each bucket can be specified explicitly. + * `BucketOptions` does not include the number of values in each bucket. + * + * A bucket has an inclusive lower bound and exclusive upper bound for the + * values that are counted for that bucket. The upper bound of a bucket must + * be strictly greater than the lower bound. The sequence of N buckets for a + * distribution consists of an underflow bucket (number 0), zero or more + * finite buckets (number 1 through N - 2) and an overflow bucket (number N - + * 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the + * same as the upper bound of bucket i - 1. The buckets span the whole range + * of finite values: lower bound of the underflow bucket is -infinity and the + * upper bound of the overflow bucket is +infinity. The finite buckets are + * so-called because both bounds are finite. * * @property {Object} linearBuckets * The linear bucket. @@ -152,12 +155,12 @@ const Distribution = { // This is for documentation. Actual contents will be loaded by gRPC. /** - * Specify a sequence of buckets that all have the same width (except - * overflow and underflow). Each bucket represents a constant absolute - * uncertainty on the specific value in the bucket. + * Specifies a linear sequence of buckets that all have the same width + * (except overflow and underflow). Each bucket represents a constant + * absolute uncertainty on the specific value in the bucket. * - * Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for - * bucket `i`: + * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + * following boundaries: * * Upper bound (0 <= i < N-1): offset + (width * i). * Lower bound (1 <= i < N): offset + (width * (i - 1)). @@ -180,12 +183,12 @@ const Distribution = { }, /** - * Specify a sequence of buckets that have a width that is proportional to - * the value of the lower bound. Each bucket represents a constant relative - * uncertainty on a specific value in the bucket. + * Specifies an exponential sequence of buckets that have a width that is + * proportional to the value of the lower bound. Each bucket represents a + * constant relative uncertainty on a specific value in the bucket. * - * Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for - * bucket i: + * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + * following boundaries: * * Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). * Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). @@ -208,17 +211,17 @@ const Distribution = { }, /** - * A set of buckets with arbitrary widths. + * Specifies a set of buckets with arbitrary widths. * - * Defines `size(bounds) + 1` (= N) buckets with these boundaries for - * bucket i: + * There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following + * boundaries: * * Upper bound (0 <= i < N-1): bounds[i] * Lower bound (1 <= i < N); bounds[i - 1] * - * There must be at least one element in `bounds`. If `bounds` has only one - * element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. + * The `bounds` field must contain at least one element. If `bounds` has + * only one element, then there are no finite buckets, and that single + * element is the common boundary of the overflow and underflow buckets. * * @property {number[]} bounds * The values must be monotonically increasing. @@ -230,5 +233,46 @@ const Distribution = { Explicit: { // This is for documentation. Actual contents will be loaded by gRPC. } + }, + + /** + * Exemplars are example points that may be used to annotate aggregated + * distribution values. They are metadata that gives information about a + * particular value added to a Distribution bucket, such as a trace ID that + * was active when a value was added. They may contain further information, + * such as a example values and timestamps, origin, etc. + * + * @property {number} value + * Value of the exemplar point. This value determines to which bucket the + * exemplar belongs. + * + * @property {Object} timestamp + * The observation (sampling) time of the above value. + * + * This object should have the same structure as [Timestamp]{@link + * google.protobuf.Timestamp} + * + * @property {Object[]} attachments + * Contextual information about the example value. Examples are: + * + * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace + * + * Literal string: type.googleapis.com/google.protobuf.StringValue + * + * Labels dropped during aggregation: + * type.googleapis.com/google.monitoring.v3.DroppedLabels + * + * There may be only a single attachment of any given message type in a + * single exemplar, and this is enforced by the system. + * + * This object should have the same structure as [Any]{@link + * google.protobuf.Any} + * + * @typedef Exemplar + * @memberof google.api + * @see [google.api.Distribution.Exemplar definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} + */ + Exemplar: { + // This is for documentation. Actual contents will be loaded by gRPC. } }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index bf32ee2b32c..4c30483fd2d 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -25,11 +25,12 @@ * * @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: + * URL-encoded. All user-defined metric types have the DNS name + * `custom.googleapis.com` or `external.googleapis.com`. Metric types should + * use a natural hierarchical grouping. For example: * * "custom.googleapis.com/invoice/paid/amount" + * "external.googleapis.com/prometheus/up" * "appengine.googleapis.com/http/server/response_latencies" * * @property {Object[]} labels @@ -133,6 +134,12 @@ * This field is optional but it is recommended to be set for any metrics * associated with user-visible concepts, such as Quota. * + * @property {Object} metadata + * Optional. Metadata which can be used to guide usage of the metric. + * + * This object should have the same structure as + * [MetricDescriptorMetadata]{@link google.api.MetricDescriptorMetadata} + * * @typedef MetricDescriptor * @memberof google.api * @see [google.api.MetricDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} @@ -140,6 +147,40 @@ const MetricDescriptor = { // This is for documentation. Actual contents will be loaded by gRPC. + /** + * Additional annotations that can be used to guide the usage of a metric. + * + * @property {number} launchStage + * The launch stage of the metric definition. + * + * The number should be among the values of [LaunchStage]{@link + * google.api.LaunchStage} + * + * @property {Object} samplePeriod + * The sampling period of metric data points. For metrics which are written + * periodically, consecutive data points are stored at this time interval, + * excluding data loss due to errors. Metrics with a higher granularity have + * a smaller sampling period. + * + * This object should have the same structure as [Duration]{@link + * google.protobuf.Duration} + * + * @property {Object} ingestDelay + * The delay of data points caused by ingestion. Data points older than this + * age are guaranteed to be ingested and available to be read, excluding + * data loss due to errors. + * + * This object should have the same structure as [Duration]{@link + * google.protobuf.Duration} + * + * @typedef MetricDescriptorMetadata + * @memberof google.api + * @see [google.api.MetricDescriptor.MetricDescriptorMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} + */ + MetricDescriptorMetadata: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + /** * The kind of measurement. It describes how the data is reported. * diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index d3534fba512..0fd0057412b 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -102,15 +102,14 @@ const MonitoredResource = { * Auxiliary metadata for a MonitoredResource object. * MonitoredResource objects contain the minimum set of information to * uniquely identify a monitored resource instance. There is some other useful - * auxiliary metadata. Google Stackdriver Monitoring & Logging uses an ingestion - * pipeline to extract metadata for cloud resources of all types , and stores + * auxiliary metadata. Monitoring and Logging use an ingestion + * pipeline to extract metadata for cloud resources of all types, and store * the metadata in this message. * * @property {Object} systemLabels * Output only. Values for predefined system metadata labels. - * System labels are a kind of metadata extracted by Google Stackdriver. - * Stackdriver determines what system labels are useful and how to obtain - * their values. Some examples: "machine_image", "vpc", "subnet_id", + * System labels are a kind of metadata extracted by Google, including + * "machine_image", "vpc", "subnet_id", * "security_group", "name", etc. * System label values can be only strings, Boolean values, or a list of * strings. For example: diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index 8d4798dd433..0ad7429d0b7 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -73,7 +73,7 @@ * Optional. The time the event described by the log entry occurred. * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log - * entry, then Stackdriver Logging assigns it the current time. + * entry, then Logging assigns it the current time. * Timestamps have nanosecond accuracy, but trailing zeros in the fractional * seconds might be omitted when the timestamp is displayed. * @@ -88,7 +88,7 @@ * google.protobuf.Timestamp} * * @property {Object} receiveTimestamp - * Output only. The time the log entry was received by Stackdriver Logging. + * Output only. The time the log entry was received by Logging. * * This object should have the same structure as [Timestamp]{@link * google.protobuf.Timestamp} @@ -102,9 +102,9 @@ * * @property {string} insertId * Optional. A unique identifier for the log entry. If you provide a value, - * then Stackdriver Logging considers other log entries in the same project, + * then Logging considers other log entries in the same project, * with the same `timestamp`, and with the same `insert_id` to be duplicates - * which can be removed. If omitted in new log entries, then Stackdriver + * which can be removed. If omitted in new log entries, then * Logging assigns its own unique identifier. The `insert_id` is also used * to order log entries that have the same `timestamp` value. * @@ -141,11 +141,19 @@ * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` * * @property {string} spanId - * Optional. The span ID within the trace associated with the log entry. For - * Stackdriver Trace spans, this is the same format that the Stackdriver Trace + * Optional. The span ID within the trace associated with the log entry. + * For Trace spans, this is the same format that the Trace * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such * as "000000000000004a". * + * @property {boolean} traceSampled + * Optional. The sampling decision of the trace associated with the log entry. + * True means that the trace resource name in the `trace` field was sampled + * for storage in a trace backend. False means that the trace was not sampled + * for storage when this log entry was written, or the sampling decision was + * unknown at the time. A non-sampled `trace` value is still useful as a + * request correlation identifier. The default is False. + * * @property {Object} sourceLocation * Optional. Source code location information associated with the log entry, * if any. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 553fc570189..d66601658a6 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -52,11 +52,15 @@ const DeleteLogRequest = { * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" * - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"` or - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * For more information about log names, see - * LogEntry. + * `[LOG_ID]` must be URL-encoded. For example: + * + * "projects/my-project-id/logs/syslog" + * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + * + * The permission logging.logEntries.create is needed on each + * project, organization, billing account, or folder that is receiving + * new log entries, whether the resource is specified in + * logName or in an individual log entry. * * @property {Object} resource * Optional. A default monitored resource object that is assigned to all log @@ -78,7 +82,7 @@ const DeleteLogRequest = { * See LogEntry. * * @property {Object[]} entries - * Required. The log entries to send to Stackdriver Logging. The order of log + * Required. The log entries to send to Logging. The order of log * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index b64a6e7b009..032515e2843 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -60,7 +60,7 @@ * * @property {string} writerIdentity * Output only. An IAM identity—a service account or group—under - * which Stackdriver Logging writes the exported log entries to the sink's + * which Logging writes the exported log entries to the sink's * destination. This field is set by * [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create) * and @@ -109,7 +109,7 @@ const LogSink = { // This is for documentation. Actual contents will be loaded by gRPC. /** - * Available log entry formats. Log entries can be written to Stackdriver + * Available log entry formats. Log entries can be written to * Logging in either format and can be exported in either format. * Version 2 is the preferred format. * @@ -232,7 +232,7 @@ const GetSinkRequest = { * 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 - * the same group or service account used by Stackdriver Logging before the + * the same group or service account used by Logging before the * addition of writer identities to this API. The sink's destination must be * in the same project as the sink itself. * @@ -296,7 +296,7 @@ const CreateSinkRequest = { * empty updateMask will be an error. * * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask * * Example: `updateMask=filter`. * @@ -334,7 +334,7 @@ const DeleteSinkRequest = { }; /** - * Specifies a set of log entries that are not to be stored in Stackdriver + * Specifies a set of log entries that are not to be stored in * Logging. If your project receives a large volume of logs, you might be able * to use exclusions to reduce your chargeable logs. Exclusions are processed * after log sinks, so you can export log entries before they are excluded. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index ffea2414756..b00cb05746c 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -139,7 +139,7 @@ const LogMetric = { // This is for documentation. Actual contents will be loaded by gRPC. /** - * Stackdriver Logging API version. + * Logging API version. * * @enum {number} * @memberof google.logging.v2 @@ -147,12 +147,12 @@ const LogMetric = { ApiVersion: { /** - * Stackdriver Logging API v2. + * Logging API v2. */ V2: 0, /** - * Stackdriver Logging API v1. + * Logging API v1. */ V1: 1 } diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index ccd28f78ff1..7776a5284b0 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -121,11 +121,18 @@ class LoggingServiceV2Client { __dirname, '..', '..', 'protos', 'google/logging/v2/logging.proto'), protoFilesRoot); + // Some methods on this API support automatically batching // requests; denote this. this._descriptors.batching = { writeLogEntries: new gax.BundleDescriptor( - 'entries', ['logName', 'resource', 'labels'], null, + 'entries', + [ + 'logName', + 'resource', + 'labels', + ], + null, gax.createByteLengthFunction( protoFilesRoot.lookup('google.logging.v2.LogEntry'))), }; @@ -225,23 +232,25 @@ class LoggingServiceV2Client { * * `[LOG_ID]` must be URL-encoded. For example, * `"projects/my-project-id/logs/syslog"`, - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * + `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * For more information about log names, see * LogEntry. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -263,11 +272,10 @@ class LoggingServiceV2Client { } /** - * Writes log entries to Stackdriver Logging. This API method is the - * only way to send log entries to Stackdriver Logging. This method - * is used, directly or indirectly, by the Stackdriver Logging agent - * (fluentd) and all logging libraries configured to use Stackdriver - * Logging. + * Writes log entries to Logging. This API method is the + * only way to send log entries to Logging. This method + * is used, directly or indirectly, by the Logging agent + * (fluentd) and all logging libraries configured to use Logging. * A single request may contain log entries for a maximum of 1000 * different resources (projects, organizations, billing accounts or * folders) @@ -275,8 +283,8 @@ class LoggingServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {Object[]} request.entries - * Required. The log entries to send to Stackdriver Logging. The order of - * log entries in this list does not matter. Values supplied in this method's + * Required. The log entries to send to Logging. The order of log + * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding * fields. For more information, see the @@ -284,24 +292,27 @@ class LoggingServiceV2Client { * * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, - * respectively. The supplied values are chosen so that, among the log entries - * that did not supply their own values, the entries earlier in the list will - * sort before the entries later in the list. See the `entries.list` method. + respectively. + * The supplied values are chosen so that, among the log entries that did + not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the * [logs retention period](https://cloud.google.com/logging/quota-policy) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be exported - * with - * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + the past or more than + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. + `entries.write`, + * you should try to include several log entries in this list, + * rather than calling this method for each individual log entry. * * This object should have the same structure as [LogEntry]{@link - * google.logging.v2.LogEntry} + google.logging.v2.LogEntry} * @param {string} [request.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`: @@ -311,11 +322,16 @@ class LoggingServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" * - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"` or - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * For more information about log names, see - * LogEntry. + * `[LOG_ID]` must be URL-encoded. For example: + * + * "projects/my-project-id/logs/syslog" + * + "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + * + * The permission logging.logEntries.create is needed on each + * project, organization, billing account, or folder that is receiving + * new log entries, whether the resource is specified in + * logName or in an individual log entry. * @param {Object} [request.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: @@ -327,12 +343,13 @@ class LoggingServiceV2Client { * See LogEntry. * * This object should have the same structure as [MonitoredResource]{@link - * google.api.MonitoredResource} + google.api.MonitoredResource} * @param {Object.} [request.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. + key + * as a label in this parameter, then the log entry's label is not changed. + * See LogEntry. * @param {boolean} [request.partialSuccess] * Optional. Whether valid entries should be written even if some other * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any @@ -345,23 +362,24 @@ class LoggingServiceV2Client { * logging API endpoints are working properly before sending valuable data. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing - * [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -389,7 +407,7 @@ class LoggingServiceV2Client { /** * Lists log entries. Use this method to retrieve log entries from - * Stackdriver Logging. For ways to export log entries, see + * Logging. For ways to export log entries, see * [Exporting Logs](https://cloud.google.com/logging/docs/export). * * @param {Object} request @@ -406,26 +424,32 @@ class LoggingServiceV2Client { * Projects listed in the `project_ids` field are added to this list. * @param {string[]} [request.projectIds] * Deprecated. Use `resource_names` instead. One or more project - * identifiers or project numbers from which to retrieve log entries. Example: + 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`. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See - * [Advanced Logs - * Filters](https://cloud.google.com/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. + [Advanced + * Logs + Filters](https://cloud.google.com/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. * @param {string} [request.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 + 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 their `insert_id` values. + entries + * in order of decreasing timestamps (newest first). Entries with equal + * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -434,38 +458,43 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [LogEntry]{@link - * google.logging.v2.LogEntry}. + google.logging.v2.LogEntry}. * * When autoPaginate: false is specified through options, it contains the - * result in a single response. If the response indicates the next page - * exists, the third parameter is set to be used for the next request object. - * The fourth parameter keeps the raw response object of an object - * representing [ListLogEntriesResponse]{@link - * google.logging.v2.ListLogEntriesResponse}. + result + * in a single response. If the response indicates the next page exists, the + third + * parameter is set to be used for the next request object. The fourth + parameter keeps + * the raw response object of an object representing + [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogEntry]{@link - * google.logging.v2.LogEntry}. + google.logging.v2.LogEntry}. * * When autoPaginate: false is specified through options, the array has - * three elements. The first element is Array of [LogEntry]{@link - * google.logging.v2.LogEntry} in a single response. The second element is the - * next request object if the response indicates the next page exists, or - * null. The third element is an object representing - * [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. + three elements. + * The first element is Array of [LogEntry]{@link + google.logging.v2.LogEntry} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListLogEntriesResponse]{@link + google.logging.v2.ListLogEntriesResponse}. * * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -526,7 +555,8 @@ class LoggingServiceV2Client { * * This fetches the paged responses for {@link listLogEntries} continuously * and invokes the callback registered for 'data' event for each element in - * the responses. + the + * responses. * * The returned object has 'end' method when no more elements are required. * @@ -548,26 +578,32 @@ class LoggingServiceV2Client { * Projects listed in the `project_ids` field are added to this list. * @param {string[]} [request.projectIds] * Deprecated. Use `resource_names` instead. One or more project - * identifiers or project numbers from which to retrieve log entries. Example: + 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`. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See - * [Advanced Logs - * Filters](https://cloud.google.com/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. + [Advanced + * Logs + Filters](https://cloud.google.com/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. * @param {string} [request.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 + 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 their `insert_id` values. + entries + * in order of decreasing timestamps (newest first). Entries with equal + * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -576,16 +612,17 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @returns {Stream} * An object stream which emits an object representing [LogEntry]{@link - * google.logging.v2.LogEntry} on 'data' event. + google.logging.v2.LogEntry} on 'data' event. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -604,11 +641,10 @@ class LoggingServiceV2Client { return this._descriptors.page.listLogEntries.createStream( this._innerApiCalls.listLogEntries, request, options); - } + }; /** - * Lists the descriptors for monitored resource types used by Stackdriver - * Logging. + * Lists the descriptors for monitored resource types used by Logging. * * @param {Object} request * The request object that will be sent. @@ -620,41 +656,44 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of - * [MonitoredResourceDescriptor]{@link - * google.api.MonitoredResourceDescriptor}. + [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. * * When autoPaginate: false is specified through options, it contains the - * result in a single response. If the response indicates the next page - * exists, the third parameter is set to be used for the next request object. - * The fourth parameter keeps the raw response object of an object - * representing [ListMonitoredResourceDescriptorsResponse]{@link - * google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + result + * in a single response. If the response indicates the next page exists, the + third + * parameter is set to be used for the next request object. The fourth + parameter keeps + * the raw response object of an object representing + [ListMonitoredResourceDescriptorsResponse]{@link + google.logging.v2.ListMonitoredResourceDescriptorsResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of - * [MonitoredResourceDescriptor]{@link - * google.api.MonitoredResourceDescriptor}. + [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. * * When autoPaginate: false is specified through options, the array has - * three elements. The first element is Array of - * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} - * in a single response. The second element is the next request object if the - * response indicates the next page exists, or null. The third element is an - * object representing [ListMonitoredResourceDescriptorsResponse]{@link - * google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + three elements. + * The first element is Array of [MonitoredResourceDescriptor]{@link + google.api.MonitoredResourceDescriptor} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListMonitoredResourceDescriptorsResponse]{@link + google.logging.v2.ListMonitoredResourceDescriptorsResponse}. * * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -688,7 +727,7 @@ class LoggingServiceV2Client { * if (nextRequest) { * // Fetch the next page. * return client.listMonitoredResourceDescriptors(nextRequest, - * options).then(callback); + options).then(callback); * } * } * client.listMonitoredResourceDescriptors({}, options) @@ -710,11 +749,13 @@ class LoggingServiceV2Client { /** * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a - * NodeJS Stream object. + NodeJS Stream object. * * This fetches the paged responses for {@link - * listMonitoredResourceDescriptors} continuously and invokes the callback - * registered for 'data' event for each element in the responses. + listMonitoredResourceDescriptors} continuously + * and invokes the callback registered for 'data' event for each element in + the + * responses. * * The returned object has 'end' method when no more elements are required. * @@ -732,17 +773,18 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @returns {Stream} * An object stream which emits an object representing - * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} - * on 'data' event. + [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} + on 'data' event. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -761,7 +803,7 @@ class LoggingServiceV2Client { return this._descriptors.page.listMonitoredResourceDescriptors.createStream( this._innerApiCalls.listMonitoredResourceDescriptors, request, options); - } + }; /** * Lists the logs in projects, organizations, folders, or billing accounts. @@ -784,35 +826,40 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of string. * * When autoPaginate: false is specified through options, it contains the - * result in a single response. If the response indicates the next page - * exists, the third parameter is set to be used for the next request object. - * The fourth parameter keeps the raw response object of an object - * representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. + result + * in a single response. If the response indicates the next page exists, the + third + * parameter is set to be used for the next request object. The fourth + parameter keeps + * the raw response object of an object representing + [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of string. * * When autoPaginate: false is specified through options, the array has - * three elements. The first element is Array of string in a single response. + three elements. + * The first element is Array of string in a single response. * The second element is the next request object if the response * indicates the next page exists, or null. The third element is * an object representing [ListLogsResponse]{@link - * google.logging.v2.ListLogsResponse}. + google.logging.v2.ListLogsResponse}. * * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -873,7 +920,8 @@ class LoggingServiceV2Client { * * This fetches the paged responses for {@link listLogs} continuously * and invokes the callback registered for 'data' event for each element in - * the responses. + the + * responses. * * The returned object has 'end' method when no more elements are required. * @@ -898,15 +946,16 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @returns {Stream} * An object stream which emits a string on 'data' event. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -925,7 +974,7 @@ class LoggingServiceV2Client { return this._descriptors.page.listLogs.createStream( this._innerApiCalls.listLogs, request, options); - } + }; // -------------------- // -- Path templates -- @@ -991,4 +1040,5 @@ class LoggingServiceV2Client { } } + module.exports = LoggingServiceV2Client; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index b9973ad28ad..27bf23c76cf 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -204,38 +204,43 @@ class MetricsServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of [LogMetric]{@link - * google.logging.v2.LogMetric}. + google.logging.v2.LogMetric}. * * When autoPaginate: false is specified through options, it contains the - * result in a single response. If the response indicates the next page - * exists, the third parameter is set to be used for the next request object. - * The fourth parameter keeps the raw response object of an object - * representing [ListLogMetricsResponse]{@link - * google.logging.v2.ListLogMetricsResponse}. + result + * in a single response. If the response indicates the next page exists, the + third + * parameter is set to be used for the next request object. The fourth + parameter keeps + * the raw response object of an object representing + [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogMetric]{@link - * google.logging.v2.LogMetric}. + google.logging.v2.LogMetric}. * * When autoPaginate: false is specified through options, the array has - * three elements. The first element is Array of [LogMetric]{@link - * google.logging.v2.LogMetric} in a single response. The second element is - * the next request object if the response indicates the next page exists, or - * null. The third element is an object representing - * [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. + three elements. + * The first element is Array of [LogMetric]{@link + google.logging.v2.LogMetric} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListLogMetricsResponse]{@link + google.logging.v2.ListLogMetricsResponse}. * * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -296,7 +301,8 @@ class MetricsServiceV2Client { * * This fetches the paged responses for {@link listLogMetrics} continuously * and invokes the callback registered for 'data' event for each element in - * the responses. + the + * responses. * * The returned object has 'end' method when no more elements are required. * @@ -318,16 +324,17 @@ class MetricsServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @returns {Stream} * An object stream which emits an object representing [LogMetric]{@link - * google.logging.v2.LogMetric} on 'data' event. + google.logging.v2.LogMetric} on 'data' event. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -346,7 +353,7 @@ class MetricsServiceV2Client { return this._descriptors.page.listLogMetrics.createStream( this._innerApiCalls.listLogMetrics, request, options); - } + }; /** * Gets a logs-based metric. @@ -359,22 +366,24 @@ class MetricsServiceV2Client { * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogMetric]{@link google.logging.v2.LogMetric}. + [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing - * [LogMetric]{@link google.logging.v2.LogMetric}. The promise has a method - * named "cancel" which cancels the ongoing API call. + [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -416,25 +425,27 @@ class MetricsServiceV2Client { * already exists. * * This object should have the same structure as [LogMetric]{@link - * google.logging.v2.LogMetric} + google.logging.v2.LogMetric} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogMetric]{@link google.logging.v2.LogMetric}. + [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing - * [LogMetric]{@link google.logging.v2.LogMetric}. The promise has a method - * named "cancel" which cancels the ongoing API call. + [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -482,25 +493,27 @@ class MetricsServiceV2Client { * The updated metric. * * This object should have the same structure as [LogMetric]{@link - * google.logging.v2.LogMetric} + google.logging.v2.LogMetric} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing - * [LogMetric]{@link google.logging.v2.LogMetric}. + [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing - * [LogMetric]{@link google.logging.v2.LogMetric}. The promise has a method - * named "cancel" which cancels the ongoing API call. + [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -542,18 +555,19 @@ class MetricsServiceV2Client { * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - * details. + e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link + https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API - * call. + call. * * @example * - * const {Logging} = require('@google-cloud/logging'); + const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -638,4 +652,5 @@ class MetricsServiceV2Client { } } + module.exports = MetricsServiceV2Client; diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 61bf59afe0a..dac8771734d 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -22,8 +22,6 @@ logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() -common_templates = gcp.CommonTemplates() - # tasks has two product names, and a poorly named artman yaml v2_library = gapic.node_library( "logging", @@ -31,9 +29,7 @@ config_path="/google/logging/artman_logging.yaml", artman_output_name="logging-v2", ) - s.copy(v2_library, excludes=["src/index.js", "README.md", "package.json"]) - s.replace( [ "src/v2/config_service_v2_client.js", @@ -43,7 +39,6 @@ "../../package.json", "../../../package.json", ) - s.replace( [ "src/v2/config_service_v2_client.js", @@ -54,13 +49,11 @@ "\1const logging = require('@google-cloud/logging');", ) - +# Copy in templated files +common_templates = gcp.CommonTemplates() templates = common_templates.node_library() s.copy(templates) -""" -Node.js specific cleanup -""" +# Node.js specific cleanup subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "prettier"]) -subprocess.run(["npm", "run", "lint"]) +subprocess.run(["npm", "run", "fix"]) From 74d38f01d04391510ca2474fd5673fac953d0b8a Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Sun, 28 Oct 2018 01:01:07 -0700 Subject: [PATCH 0261/1029] feat: Introduce middleware directory (#248) --- handwritten/logging/package.json | 6 +- handwritten/logging/src/http-request.ts | 33 +++++ handwritten/logging/src/middleware/context.ts | 45 +++++++ .../middleware/express/make-http-request.ts | 37 +++++ .../src/middleware/express/make-middleware.ts | 55 ++++++++ .../express/test-make-http-request.ts | 40 ++++++ .../express/test-make-middleware.ts | 126 ++++++++++++++++++ .../logging/test/middleware/test-context.ts | 85 ++++++++++++ 8 files changed, 426 insertions(+), 1 deletion(-) create mode 100644 handwritten/logging/src/http-request.ts create mode 100644 handwritten/logging/src/middleware/context.ts create mode 100644 handwritten/logging/src/middleware/express/make-http-request.ts create mode 100644 handwritten/logging/src/middleware/express/make-middleware.ts create mode 100644 handwritten/logging/test/middleware/express/test-make-http-request.ts create mode 100644 handwritten/logging/test/middleware/express/test-make-middleware.ts create mode 100644 handwritten/logging/test/middleware/test-context.ts diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8569781440b..22f8b016dcc 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -50,7 +50,7 @@ "greenkeeper[bot] " ], "scripts": { - "cover": "nyc --reporter=lcov mocha build/test/*.js && nyc report", + "cover": "nyc --reporter=lcov mocha build/test/*.js build/test/**/*.js build/test/**/**/*.js && nyc report", "test-no-cover": "mocha build/test/*.js", "test": "npm run cover", "docs": "jsdoc -c .jsdoc.js", @@ -72,6 +72,7 @@ "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.3.0", + "@opencensus/propagation-stackdriver": "0.0.4", "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", @@ -81,6 +82,7 @@ "google-proto-files": "^0.17.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", + "on-finished": "^2.3.0", "protobufjs": "^6.8.8", "pumpify": "^1.5.1", "snakecase-keys": "^2.0.0", @@ -93,10 +95,12 @@ "@google-cloud/pubsub": "^0.20.1", "@google-cloud/storage": "^2.0.2", "@types/arrify": "^1.0.4", + "@types/express": "^4.16.0", "@types/extend": "^3.0.0", "@types/is": "0.0.20", "@types/mocha": "^5.2.5", "@types/nock": "^9.3.0", + "@types/on-finished": "^2.3.1", "@types/pumpify": "^1.4.1", "@types/through2": "^2.0.34", "@types/uuid": "^3.4.4", diff --git a/handwritten/logging/src/http-request.ts b/handwritten/logging/src/http-request.ts new file mode 100644 index 00000000000..bebb7d9abe6 --- /dev/null +++ b/handwritten/logging/src/http-request.ts @@ -0,0 +1,33 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface StackdriverHttpRequest { + requestMethod?: string; + requestUrl?: string; + requestSize?: number; + status?: number; + responseSize?: number; + userAgent?: string; + remoteIp?: string; + serverIp?: string; + referer?: string; + latency?: {seconds: number; nanos: number;}; + cacheLookup?: boolean; + cacheHit?: boolean; + cacheValidatedWithOriginServer?: boolean; + cacheFillBytes?: number; + protocol?: string; +} diff --git a/handwritten/logging/src/middleware/context.ts b/handwritten/logging/src/middleware/context.ts new file mode 100644 index 00000000000..78ecfd4893b --- /dev/null +++ b/handwritten/logging/src/middleware/context.ts @@ -0,0 +1,45 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as context from '@opencensus/propagation-stackdriver'; +import * as http from 'http'; + +export type HeaderWrapper = context.HeaderGetter&context.HeaderSetter; + +export function makeHeaderWrapper(req: http.IncomingMessage): HeaderWrapper { + const wrapper = { + setHeader(name: string, value: string) { + req.headers[name] = value; + }, + getHeader(name: string) { + return req.headers[name]; + } + }; + return wrapper; +} + +export function getOrInjectContext(headerWrapper: HeaderWrapper): + context.SpanContext { + let spanContext = context.extract(headerWrapper); + if (spanContext) { + return spanContext; + } + + // We were the first actor to detect lack of context. Establish context. + spanContext = context.generate(); + context.inject(headerWrapper, spanContext); + return spanContext; +} diff --git a/handwritten/logging/src/middleware/express/make-http-request.ts b/handwritten/logging/src/middleware/express/make-http-request.ts new file mode 100644 index 00000000000..359aaed0a0f --- /dev/null +++ b/handwritten/logging/src/middleware/express/make-http-request.ts @@ -0,0 +1,37 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Types-only import. +import {Request, Response} from 'express'; + +import {StackdriverHttpRequest} from '../../http-request'; + +export function makeHttpRequestData( + req: Request, res: Response, + latencyMilliseconds: number): StackdriverHttpRequest { + return { + status: res.statusCode, + requestUrl: req.url, + requestMethod: req.method, + userAgent: req.headers['user-agent'], + responseSize: + (res.getHeader && Number(res.getHeader('Content-Length'))) || 0, + latency: { + seconds: Math.floor(latencyMilliseconds / 1e3), + nanos: Math.floor((latencyMilliseconds % 1e3) * 1e6) + } + }; +} diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts new file mode 100644 index 00000000000..d108e114873 --- /dev/null +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -0,0 +1,55 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import onFinished = require('on-finished'); +import {getOrInjectContext, makeHeaderWrapper} from '../context'; +// Types-only import. +import {Request, Response, NextFunction} from 'express'; +import {makeHttpRequestData} from './make-http-request'; + +const CHILD_LOG_NAME_SUFFIX = 'applog'; + +export interface AnnotatedRequestType extends Request { + log: LoggerType; +} + +export function makeMiddleware( + projectId: string, + emitRequestLog: (httpRequest: HttpRequest, trace: string) => void, + makeChildLogger: (childSuffix: string, trace: string) => LoggerType) { + return (req: Request, res: Response, next: NextFunction) => { + // TODO(ofrobots): use high-resolution timer. + const requestStartMs = Date.now(); + + const wrapper = makeHeaderWrapper(req); + + const spanContext = getOrInjectContext(wrapper); + const trace = `projects/${projectId}/traces/${spanContext.traceId}`; + + // Install a child logger on the request object. + (req as AnnotatedRequestType).log = + makeChildLogger(CHILD_LOG_NAME_SUFFIX, trace); + + // Emit a 'Request Log' on the parent logger. + onFinished(res, () => { + const latencyMs = Date.now() - requestStartMs; + const httpRequest = makeHttpRequestData(req, res, latencyMs); + emitRequestLog(httpRequest, trace); + }); + + next(); + }; +} diff --git a/handwritten/logging/test/middleware/express/test-make-http-request.ts b/handwritten/logging/test/middleware/express/test-make-http-request.ts new file mode 100644 index 00000000000..6acf9a1b956 --- /dev/null +++ b/handwritten/logging/test/middleware/express/test-make-http-request.ts @@ -0,0 +1,40 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as assert from 'assert'; +// Types-only import. +import {Request, Response} from 'express'; +import {makeHttpRequestData} from '../../../src/middleware/express/make-http-request'; + +describe('middleware/express/make-http-request', () => { + it('should convert latency to proto Duration', () => { + const fakeRequest = {headers: {}}; + const fakeResponse = {}; + + const h1 = makeHttpRequestData( + fakeRequest as Request, fakeResponse as Response, 1003); + assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); + + const h2 = makeHttpRequestData( + fakeRequest as Request, fakeResponse as Response, 9003.1); + assert.deepStrictEqual(h2.latency, {seconds: 9, nanos: 3.1e6}); + + // Make sure we nanos is uint32. + const h3 = makeHttpRequestData( + fakeRequest as Request, fakeResponse as Response, 1.0000000001); + assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); + }); +}); diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts new file mode 100644 index 00000000000..6ea83186474 --- /dev/null +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -0,0 +1,126 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as assert from 'assert'; +import * as EventEmitter from 'events'; +import * as extend from 'extend'; +import * as proxyquire from 'proxyquire'; + +const FAKE_PROJECT_ID = 'project-🦄'; + +function makeFakeRequest() { + return {headers: {'content-type': 'application/🍰'}}; +} + +function makeFakeResponse() { + const ee = new EventEmitter(); + // tslint:disable-next-line:no-any + (ee as any).getHeader = (name: string) => {}; + return ee; +} + +let getOrInjectContextValue; +const FAKE_CONTEXT = { + getOrInjectContext: () => { + return getOrInjectContextValue; + } +}; + + +describe('middleware/express/make-middleware', () => { + describe('makeMiddleware', () => { + const {makeMiddleware} = proxyquire( + '../../../src/middleware/express/make-middleware', + {'../context': FAKE_CONTEXT}); + + it('should return a function accepting 3 arguments', () => { + const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}, () => {}); + assert.ok(typeof middleware === 'function'); + assert.ok(middleware.length === 3); + }); + + describe('middleware', () => { + const FAKE_SPAN_CONTEXT = {traceId: 'traceId-🥑'}; + + beforeEach(() => { + getOrInjectContextValue = undefined; + }); + + it('should call the next middleware synchronously', () => { + getOrInjectContextValue = FAKE_SPAN_CONTEXT; + const fakeRequest = makeFakeRequest(); + const fakeResponse = makeFakeResponse(); + let called = false; + + const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}, () => {}); + + middleware(fakeRequest, fakeResponse, () => { + called = true; + }); + assert.ok(called); + }); + + it('should call makeChildLogger with correct trace context', () => { + const FAKE_CHILD_LOGGER = {log: '🍌'}; + getOrInjectContextValue = FAKE_SPAN_CONTEXT; + const fakeRequest = makeFakeRequest(); + const fakeResponse = makeFakeResponse(); + + function makeChild(childSuffix, trace) { + assert.strictEqual( + trace, + `projects/${FAKE_PROJECT_ID}/traces/${ + FAKE_SPAN_CONTEXT.traceId}`); + assert.strictEqual(typeof childSuffix, 'string'); + return FAKE_CHILD_LOGGER; + } + + const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}, makeChild); + middleware(fakeRequest, fakeResponse, () => {}); + + // Should annotate the request with the child logger. + // tslint:disable-next-line:no-any + assert.strictEqual((fakeRequest as any).log, FAKE_CHILD_LOGGER); + }); + + it('should emit a request log when response is finished', (done) => { + getOrInjectContextValue = FAKE_SPAN_CONTEXT; + const fakeRequest = makeFakeRequest(); + const fakeResponse = makeFakeResponse(); + let emitRequestLogCalled = false; + + function emitRequestLog(httpRequest, trace) { + assert.strictEqual( + trace, + `projects/${FAKE_PROJECT_ID}/traces/${ + FAKE_SPAN_CONTEXT.traceId}`); + // TODO: check httpRequest properties. + emitRequestLogCalled = true; + } + + const middleware = + makeMiddleware(FAKE_PROJECT_ID, emitRequestLog, () => {}); + middleware(fakeRequest, fakeResponse, () => {}); + + setTimeout(() => { + fakeResponse.emit('finished'); + assert.strictEqual(emitRequestLogCalled, true); + done(); + }, 10); + }); + }); + }); +}); \ No newline at end of file diff --git a/handwritten/logging/test/middleware/test-context.ts b/handwritten/logging/test/middleware/test-context.ts new file mode 100644 index 00000000000..05670c6bac5 --- /dev/null +++ b/handwritten/logging/test/middleware/test-context.ts @@ -0,0 +1,85 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as assert from 'assert'; +import * as http from 'http'; +import * as proxyquire from 'proxyquire'; +import {makeHeaderWrapper} from '../../src/middleware/context'; + +const FAKE_CONTEXT = { + extract: (headerWrapper) => {}, + generate: () => {}, + inject: (headerWrapper, spanContext) => {} +}; + +const fakeContext = Object.assign({}, FAKE_CONTEXT); + +const {getOrInjectContext} = proxyquire( + '../../src/middleware/context', + {'@opencensus/propagation-stackdriver': fakeContext}); + +describe('middleware/context', () => { + describe('makeHeaderWrapper', () => { + const HEADER_NAME = 'Content-Type'; + const HEADER_VALUE = 'application/🎂'; + + it('should correctly get request headers', () => { + const req = {headers: {[HEADER_NAME]: HEADER_VALUE}}; + const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); + assert.strictEqual(wrapper.getHeader(HEADER_NAME), HEADER_VALUE); + }); + + it('should correctly set request headers', () => { + const req = {headers: {}}; + const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); + wrapper.setHeader(HEADER_NAME, HEADER_VALUE); + assert.strictEqual(req.headers[HEADER_NAME], HEADER_VALUE); + }); + }); + + describe('getOrInjectContext', () => { + beforeEach(() => { + fakeContext.extract = FAKE_CONTEXT.extract; + fakeContext.generate = FAKE_CONTEXT.generate; + fakeContext.inject = FAKE_CONTEXT.inject; + }); + + it('should return extracted context identically', () => { + const FAKE_SPAN_CONTEXT = '👾'; + fakeContext.extract = () => FAKE_SPAN_CONTEXT; + fakeContext.generate = () => assert.fail('should not be called'); + fakeContext.inject = () => assert.fail('should not be called'); + + const ret = getOrInjectContext({}); + assert.strictEqual(ret, FAKE_SPAN_CONTEXT); + }); + + it('should generate a new context if extract returns falsy', () => { + let injectWasCalled = false; + const FAKE_SPAN_CONTEXT = '👾'; + fakeContext.extract = () => false; + fakeContext.generate = () => FAKE_SPAN_CONTEXT; + fakeContext.inject = (_, spanContext) => { + injectWasCalled = true; + assert.strictEqual(spanContext, FAKE_SPAN_CONTEXT); + }; + + const ret = getOrInjectContext({}); + assert.strictEqual(ret, FAKE_SPAN_CONTEXT); + assert.ok(injectWasCalled); + }); + }); +}); \ No newline at end of file From 8d2fda04efb87493952d8d366cfed39431ad302a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 28 Oct 2018 01:08:22 -0700 Subject: [PATCH 0262/1029] fix(deps): update dependency gcp-metadata to ^0.9.0 (#279) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 22f8b016dcc..56dcde51780 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", - "gcp-metadata": "^0.8.0", + "gcp-metadata": "^0.9.0", "google-auth-library": "^2.0.0", "google-gax": "^0.20.0", "google-proto-files": "^0.17.0", From 308b871411491bc387f69d0f5c6d1219229dbf61 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 28 Oct 2018 08:34:42 -0700 Subject: [PATCH 0263/1029] chore(deps): update dependency eslint-plugin-node to v8 (#284) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 56dcde51780..ebbab046c2f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -107,7 +107,7 @@ "bignumber.js": "^7.2.1", "codecov": "^3.0.4", "eslint": "^5.4.0", - "eslint-plugin-node": "^7.0.1", + "eslint-plugin-node": "^8.0.0", "gts": "^0.8.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", From 061a0d0bd24d7eed1845a0d089e688f59792e801 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 28 Oct 2018 11:31:50 -0700 Subject: [PATCH 0264/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.6 (#283) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ebbab046c2f..4549ab86319 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -72,7 +72,7 @@ "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.3.0", - "@opencensus/propagation-stackdriver": "0.0.4", + "@opencensus/propagation-stackdriver": "0.0.6", "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", From 6c261bf28f1a7dd97dab5842ce52c14d58bd64cc Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 28 Oct 2018 15:32:12 -0700 Subject: [PATCH 0265/1029] refactor(ts): convert tests to typescript (#282) --- handwritten/logging/package.json | 1 + handwritten/logging/src/index.ts | 12 +- .../system-test/{logging.js => logging.ts} | 18 ++- .../logging/test/{entry.js => entry.ts} | 29 ++-- .../logging/test/{gapic-v2.js => gapic-v2.ts} | 139 ++++++++--------- .../logging/test/{index.js => index.ts} | 146 +++++++++--------- handwritten/logging/test/{log.js => log.ts} | 39 ++--- .../logging/test/{metadata.js => metadata.ts} | 21 +-- .../express/test-make-middleware.ts | 1 - handwritten/logging/test/{sink.js => sink.ts} | 127 +++++++-------- handwritten/logging/tsconfig.json | 5 - 11 files changed, 277 insertions(+), 261 deletions(-) rename handwritten/logging/system-test/{logging.js => logging.ts} (97%) rename handwritten/logging/test/{entry.js => entry.ts} (92%) rename handwritten/logging/test/{gapic-v2.js => gapic-v2.ts} (94%) rename handwritten/logging/test/{index.js => index.ts} (91%) rename handwritten/logging/test/{log.js => log.ts} (96%) rename handwritten/logging/test/{metadata.js => metadata.ts} (96%) rename handwritten/logging/test/{sink.js => sink.ts} (59%) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 4549ab86319..714e5402bcb 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -101,6 +101,7 @@ "@types/mocha": "^5.2.5", "@types/nock": "^9.3.0", "@types/on-finished": "^2.3.1", + "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", "@types/through2": "^2.0.34", "@types/uuid": "^3.4.4", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index f57197469d6..5ba31a85145 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -116,7 +116,7 @@ class Logging { options; projectId: string; - constructor(options) { + constructor(options?) { // Determine what scopes are needed. // It is the union of the scopes on all three clients. const scopes: Array<{}> = []; @@ -398,7 +398,8 @@ class Logging { * region_tag:logging_list_log_entries_advanced * Another example: */ - getEntries(options, callback) { + // tslint:disable-next-line no-any + getEntries(options, callback?): void|Promise { if (is.fn(options)) { callback = options; options = {}; @@ -562,7 +563,8 @@ class Logging { * region_tag:logging_list_sinks * Another example: */ - getSinks(options, callback) { + // tslint:disable-next-line no-any + getSinks(options?, callback?): void|Promise { const self = this; if (is.fn(options)) { callback = options; @@ -683,7 +685,7 @@ class Logging { * const logging = new Logging(); * const log = logging.log('my-log'); */ - log(name, options) { + log(name, options?) { return new Log(this, name, options); } @@ -957,7 +959,7 @@ module.exports.Sink = Sink; * region_tag:logging_quickstart * Full quickstart example: */ -module.exports.Logging = Logging; +export {Logging}; /** * Reference to the low-level auto-generated clients for the V2 Logging service. diff --git a/handwritten/logging/system-test/logging.js b/handwritten/logging/system-test/logging.ts similarity index 97% rename from handwritten/logging/system-test/logging.js rename to handwritten/logging/system-test/logging.ts index acdbbe1408f..bc6bc688bd0 100644 --- a/handwritten/logging/system-test/logging.js +++ b/handwritten/logging/system-test/logging.ts @@ -14,15 +14,17 @@ * limitations under the License. */ -const assert = require('assert'); +import * as assert from 'assert'; +// tslint:disable-next-line variable-name const BigQuery = require('@google-cloud/bigquery'); -const extend = require('extend'); -const is = require('is'); -const nock = require('nock'); +import * as extend from 'extend'; +import * as is from 'is'; +import * as nock from 'nock'; +// tslint:disable-next-line variable-name const PubSub = require('@google-cloud/pubsub'); -const {Storage} = require('@google-cloud/storage'); -const uuid = require('uuid'); -const {Logging} = require('../src'); +import {Storage} from '@google-cloud/storage'; +import * as uuid from 'uuid'; +import {Logging} from '../src'; // block all attempts to chat with the metadata server (kokoro runs on GCE) nock('http://metadata.google.internal') @@ -81,7 +83,7 @@ describe('Logging', () => { } async function getAndDelete(method) { - let [objects] = await method(); + const [objects] = await method(); return Promise.all( objects.filter(o => (o.name || o.id).indexOf(TESTS_PREFIX) === 0) .map(o => o.delete())); diff --git a/handwritten/logging/test/entry.js b/handwritten/logging/test/entry.ts similarity index 92% rename from handwritten/logging/test/entry.js rename to handwritten/logging/test/entry.ts index b6cb8420230..db17f624837 100644 --- a/handwritten/logging/test/entry.js +++ b/handwritten/logging/test/entry.ts @@ -16,22 +16,27 @@ 'use strict'; -const assert = require('assert'); -const extend = require('extend'); -const {GrpcService, util} = require('@google-cloud/common-grpc'); -const proxyquire = require('proxyquire'); +import * as assert from 'assert'; +import * as extend from 'extend'; +import {Service, util} from '@google-cloud/common-grpc'; +import * as proxyquire from 'proxyquire'; -function FakeGrpcService() {} +class FakeGrpcService { + static structToObj_?: Function; + static objToStruct_?: Function; +} let fakeEventIdNewOverride; -function FakeEventId() {} -FakeEventId.prototype.new = function() { - return (fakeEventIdNewOverride || util.noop).apply(null, arguments); -}; +class FakeEventId { + new() { + return (fakeEventIdNewOverride || util.noop).apply(null, arguments); + } +} describe('Entry', () => { - let Entry; + // tslint:disable-next-line no-any variable-name + let Entry: any; let entry; const METADATA = {}; @@ -48,7 +53,7 @@ describe('Entry', () => { beforeEach(() => { fakeEventIdNewOverride = null; - extend(FakeGrpcService, GrpcService); + extend(FakeGrpcService, Service); entry = new Entry(METADATA, DATA); }); @@ -69,7 +74,7 @@ describe('Entry', () => { const timestamp = new Date('2012'); const entry = new Entry({ - timestamp: timestamp, + timestamp, }); assert.strictEqual(entry.metadata.timestamp, timestamp); diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.ts similarity index 94% rename from handwritten/logging/test/gapic-v2.js rename to handwritten/logging/test/gapic-v2.ts index 5ddf64c2de5..f1a22bb02fd 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.ts @@ -14,13 +14,14 @@ 'use strict'; -const assert = require('assert'); +import * as assert from 'assert'; +import {ApiError} from '@google-cloud/common'; const loggingModule = require('../src'); const FAKE_STATUS_CODE = 1; const error = new Error(); -error.code = FAKE_STATUS_CODE; +(error as ApiError).code = FAKE_STATUS_CODE; describe('LoggingServiceV2Client', () => { describe('deleteLog', () => { @@ -79,7 +80,7 @@ describe('LoggingServiceV2Client', () => { // Mock request const entries = []; const request = { - entries: entries, + entries, }; // Mock response @@ -105,7 +106,7 @@ describe('LoggingServiceV2Client', () => { // Mock request const entries = []; const request = { - entries: entries, + entries, }; // Mock Grpc layer @@ -139,8 +140,8 @@ describe('LoggingServiceV2Client', () => { const entriesElement = {}; const entries = [entriesElement]; const expectedResponse = { - nextPageToken: nextPageToken, - entries: entries, + nextPageToken, + entries, }; // Mock Grpc layer @@ -197,8 +198,8 @@ describe('LoggingServiceV2Client', () => { const resourceDescriptorsElement = {}; const resourceDescriptors = [resourceDescriptorsElement]; const expectedResponse = { - nextPageToken: nextPageToken, - resourceDescriptors: resourceDescriptors, + nextPageToken, + resourceDescriptors, }; // Mock Grpc layer @@ -255,8 +256,8 @@ describe('LoggingServiceV2Client', () => { const logNamesElement = 'logNamesElement-1079688374'; const logNames = [logNamesElement]; const expectedResponse = { - nextPageToken: nextPageToken, - logNames: logNames, + nextPageToken, + logNames, }; // Mock Grpc layer @@ -316,8 +317,8 @@ describe('ConfigServiceV2Client', () => { const sinksElement = {}; const sinks = [sinksElement]; const expectedResponse = { - nextPageToken: nextPageToken, - sinks: sinks, + nextPageToken, + sinks, }; // Mock Grpc layer @@ -378,11 +379,11 @@ describe('ConfigServiceV2Client', () => { const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { - name: name, - destination: destination, - filter: filter, - writerIdentity: writerIdentity, - includeChildren: includeChildren, + name, + destination, + filter, + writerIdentity, + includeChildren, }; // Mock Grpc layer @@ -433,7 +434,7 @@ describe('ConfigServiceV2Client', () => { const sink = {}; const request = { parent: formattedParent, - sink: sink, + sink, }; // Mock response @@ -443,11 +444,11 @@ describe('ConfigServiceV2Client', () => { const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { - name: name, - destination: destination, - filter: filter, - writerIdentity: writerIdentity, - includeChildren: includeChildren, + name, + destination, + filter, + writerIdentity, + includeChildren, }; // Mock Grpc layer @@ -472,7 +473,7 @@ describe('ConfigServiceV2Client', () => { const sink = {}; const request = { parent: formattedParent, - sink: sink, + sink, }; // Mock Grpc layer @@ -500,7 +501,7 @@ describe('ConfigServiceV2Client', () => { const sink = {}; const request = { sinkName: formattedSinkName, - sink: sink, + sink, }; // Mock response @@ -510,11 +511,11 @@ describe('ConfigServiceV2Client', () => { const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { - name: name, - destination: destination, - filter: filter, - writerIdentity: writerIdentity, - includeChildren: includeChildren, + name, + destination, + filter, + writerIdentity, + includeChildren, }; // Mock Grpc layer @@ -539,7 +540,7 @@ describe('ConfigServiceV2Client', () => { const sink = {}; const request = { sinkName: formattedSinkName, - sink: sink, + sink, }; // Mock Grpc layer @@ -619,8 +620,8 @@ describe('ConfigServiceV2Client', () => { const exclusionsElement = {}; const exclusions = [exclusionsElement]; const expectedResponse = { - nextPageToken: nextPageToken, - exclusions: exclusions, + nextPageToken, + exclusions, }; // Mock Grpc layer @@ -682,9 +683,9 @@ describe('ConfigServiceV2Client', () => { const disabled = true; const expectedResponse = { name: name2, - description: description, - filter: filter, - disabled: disabled, + description, + filter, + disabled, }; // Mock Grpc layer @@ -735,7 +736,7 @@ describe('ConfigServiceV2Client', () => { const exclusion = {}; const request = { parent: formattedParent, - exclusion: exclusion, + exclusion, }; // Mock response @@ -744,10 +745,10 @@ describe('ConfigServiceV2Client', () => { const filter = 'filter-1274492040'; const disabled = true; const expectedResponse = { - name: name, - description: description, - filter: filter, - disabled: disabled, + name, + description, + filter, + disabled, }; // Mock Grpc layer @@ -772,7 +773,7 @@ describe('ConfigServiceV2Client', () => { const exclusion = {}; const request = { parent: formattedParent, - exclusion: exclusion, + exclusion, }; // Mock Grpc layer @@ -801,8 +802,8 @@ describe('ConfigServiceV2Client', () => { const updateMask = {}; const request = { name: formattedName, - exclusion: exclusion, - updateMask: updateMask, + exclusion, + updateMask, }; // Mock response @@ -812,9 +813,9 @@ describe('ConfigServiceV2Client', () => { const disabled = true; const expectedResponse = { name: name2, - description: description, - filter: filter, - disabled: disabled, + description, + filter, + disabled, }; // Mock Grpc layer @@ -840,8 +841,8 @@ describe('ConfigServiceV2Client', () => { const updateMask = {}; const request = { name: formattedName, - exclusion: exclusion, - updateMask: updateMask, + exclusion, + updateMask, }; // Mock Grpc layer @@ -922,8 +923,8 @@ describe('MetricsServiceV2Client', () => { const metricsElement = {}; const metrics = [metricsElement]; const expectedResponse = { - nextPageToken: nextPageToken, - metrics: metrics, + nextPageToken, + metrics, }; // Mock Grpc layer @@ -984,10 +985,10 @@ describe('MetricsServiceV2Client', () => { const filter = 'filter-1274492040'; const valueExtractor = 'valueExtractor2047672534'; const expectedResponse = { - name: name, - description: description, - filter: filter, - valueExtractor: valueExtractor, + name, + description, + filter, + valueExtractor, }; // Mock Grpc layer @@ -1038,7 +1039,7 @@ describe('MetricsServiceV2Client', () => { const metric = {}; const request = { parent: formattedParent, - metric: metric, + metric, }; // Mock response @@ -1047,10 +1048,10 @@ describe('MetricsServiceV2Client', () => { const filter = 'filter-1274492040'; const valueExtractor = 'valueExtractor2047672534'; const expectedResponse = { - name: name, - description: description, - filter: filter, - valueExtractor: valueExtractor, + name, + description, + filter, + valueExtractor, }; // Mock Grpc layer @@ -1075,7 +1076,7 @@ describe('MetricsServiceV2Client', () => { const metric = {}; const request = { parent: formattedParent, - metric: metric, + metric, }; // Mock Grpc layer @@ -1103,7 +1104,7 @@ describe('MetricsServiceV2Client', () => { const metric = {}; const request = { metricName: formattedMetricName, - metric: metric, + metric, }; // Mock response @@ -1112,10 +1113,10 @@ describe('MetricsServiceV2Client', () => { const filter = 'filter-1274492040'; const valueExtractor = 'valueExtractor2047672534'; const expectedResponse = { - name: name, - description: description, - filter: filter, - valueExtractor: valueExtractor, + name, + description, + filter, + valueExtractor, }; // Mock Grpc layer @@ -1140,7 +1141,7 @@ describe('MetricsServiceV2Client', () => { const metric = {}; const request = { metricName: formattedMetricName, - metric: metric, + metric, }; // Mock Grpc layer @@ -1203,8 +1204,8 @@ describe('MetricsServiceV2Client', () => { }); }); -function mockSimpleGrpcMethod(expectedRequest, response, error) { - return function(actualRequest, options, callback) { +function mockSimpleGrpcMethod(expectedRequest, response?, error?) { + return (actualRequest, options, callback) => { assert.deepStrictEqual(actualRequest, expectedRequest); if (error) { callback(error); diff --git a/handwritten/logging/test/index.js b/handwritten/logging/test/index.ts similarity index 91% rename from handwritten/logging/test/index.js rename to handwritten/logging/test/index.ts index 690c5c820c6..0654d373457 100644 --- a/handwritten/logging/test/index.js +++ b/handwritten/logging/test/index.ts @@ -16,27 +16,27 @@ 'use strict'; -const arrify = require('arrify'); -const assert = require('assert'); -const extend = require('extend'); -const proxyquire = require('proxyquire'); -const through = require('through2'); -const {util} = require('@google-cloud/common-grpc'); +import * as arrify from 'arrify'; +import * as assert from 'assert'; +import * as extend from 'extend'; +import * as proxyquire from 'proxyquire'; +import * as through from 'through2'; +import {util} from '@google-cloud/common-grpc'; const {v2} = require('../src'); const PKG = require('../../package.json'); let extended = false; const fakePaginator = { paginator: { - extend: function(Class, methods) { - if (Class.name !== 'Logging') { + extend(klass, methods) { + if (klass.name !== 'Logging') { return; } extended = true; methods = arrify(methods); assert.deepStrictEqual(methods, ['getEntries', 'getSinks']); }, - streamify: function(methodName) { + streamify(methodName) { return methodName; }, }, @@ -51,7 +51,7 @@ let isCustomTypeOverride; let promisifed = false; let replaceProjectIdTokenOverride; const fakeUtil = extend({}, util, { - isCustomType: function() { + isCustomType() { if (isCustomTypeOverride) { return isCustomTypeOverride.apply(null, arguments); } @@ -59,8 +59,8 @@ const fakeUtil = extend({}, util, { }, }); const fakePromisify = { - promisifyAll: function(Class, options) { - if (Class.name !== 'Logging') { + promisifyAll(c, options) { + if (c.name !== 'Logging') { return; } promisifed = true; @@ -73,7 +73,7 @@ const fakePromisify = { }, }; const fakeProjectify = { - replaceProjectIdToken: function(reqOpts) { + replaceProjectIdToken(reqOpts) { if (replaceProjectIdTokenOverride) { return replaceProjectIdTokenOverride.apply(null, arguments); } @@ -85,24 +85,33 @@ const originalFakeUtil = extend(true, {}, fakeUtil); function fakeV2() {} -function FakeEntry() { - this.calledWith_ = arguments; +class FakeEntry { + calledWith_: IArguments; + constructor() { + this.calledWith_ = arguments; + } + static fromApiResponse_() { + return arguments; + } } -FakeEntry.fromApiResponse_ = function() { - return arguments; -}; - -function FakeLog() { - this.calledWith_ = arguments; +class FakeLog { + calledWith_: IArguments; + constructor() { + this.calledWith_ = arguments; + } } -function FakeSink() { - this.calledWith_ = arguments; +class FakeSink { + calledWith_: IArguments; + constructor() { + this.calledWith_ = arguments; + } } describe('Logging', () => { - let Logging; + // tslint:disable-next-line no-any variable-name + let Logging: any; let logging; const PROJECT_ID = 'project-id'; @@ -136,7 +145,7 @@ describe('Logging', () => { }); describe('instantiation', () => { - const EXPECTED_SCOPES = []; + const EXPECTED_SCOPES: string[] = []; const clientClasses = [ v2.ConfigServiceV2Client, v2.LoggingServiceV2Client, @@ -494,8 +503,7 @@ describe('Logging', () => { }); it('should execute callback with error & API response', done => { - logging.getEntries({}, function() { - const args = [].slice.call(arguments); + logging.getEntries({}, (...args) => { assert.deepStrictEqual(args, ARGS); done(); }); @@ -522,7 +530,7 @@ describe('Logging', () => { logging.getEntries({}, (err, entries) => { assert.ifError(err); const argsPassedToFromApiResponse_ = entries[0]; - assert.strictEqual(argsPassedToFromApiResponse_[0], ARGS[1][0]); + assert.strictEqual(argsPassedToFromApiResponse_[0], ARGS[1]![0]); done(); }); }); @@ -648,8 +656,7 @@ describe('Logging', () => { }); it('should execute callback with error & API response', done => { - logging.getEntries(OPTIONS, function() { - const args = [].slice.call(arguments); + logging.getEntries(OPTIONS, (...args) => { assert.deepStrictEqual(args, ARGS); done(); }); @@ -676,13 +683,13 @@ describe('Logging', () => { it('should execute callback with Logs & API resp', done => { const sinkInstance = {}; logging.sink = name => { - assert.strictEqual(name, ARGS[1][0].name); + assert.strictEqual(name, ARGS[1]![0].name); return sinkInstance; }; logging.getSinks(OPTIONS, (err, sinks) => { assert.ifError(err); assert.strictEqual(sinks[0], sinkInstance); - assert.strictEqual(sinks[0].metadata, ARGS[1][0]); + assert.strictEqual(sinks[0].metadata, ARGS[1]![0]); done(); }); }); @@ -836,9 +843,11 @@ describe('Logging', () => { const fakeClient = { [CONFIG.method]: util.noop, }; - fakeV2[CONFIG.client] = function(options) { - assert.strictEqual(options, logging.options); - return fakeClient; + fakeV2[CONFIG.client] = class { + constructor(options) { + assert.strictEqual(options, logging.options); + return fakeClient; + } }; logging.api = {}; logging.request(CONFIG, assert.ifError); @@ -866,7 +875,7 @@ describe('Logging', () => { }; logging.api[CONFIG.client][CONFIG.method] = { - bind: function(gaxClient, reqOpts) { + bind(gaxClient, reqOpts) { assert.strictEqual(reqOpts, replacedReqOpts); setImmediate(done); @@ -881,13 +890,14 @@ describe('Logging', () => { describe('makeRequestCallback', () => { it('should return if in snippet sandbox', done => { - logging.auth.getProjectId = function() { + logging.auth.getProjectId = () => { done(new Error('Should not have gotten project ID.')); }; - - global.GCLOUD_SANDBOX_ENV = true; + // tslint:disable-next-line no-any + (global as any).GCLOUD_SANDBOX_ENV = true; const returnValue = logging.request(CONFIG, assert.ifError); - delete global.GCLOUD_SANDBOX_ENV; + // tslint:disable-next-line no-any + delete (global as any).GCLOUD_SANDBOX_ENV; assert.strictEqual(returnValue, undefined); done(); @@ -895,7 +905,7 @@ describe('Logging', () => { it('should prepare the request', done => { logging.api[CONFIG.client][CONFIG.method] = { - bind: function(gaxClient, reqOpts, gaxOpts) { + bind(gaxClient, reqOpts, gaxOpts) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(gaxOpts, CONFIG.gaxOpts); @@ -912,20 +922,20 @@ describe('Logging', () => { it('should execute callback with error', done => { const error = new Error('Error.'); - logging.api[CONFIG.client][CONFIG.method] = function() { - const callback = [].slice.call(arguments).pop(); + logging.api[CONFIG.client][CONFIG.method] = (...args) => { + const callback = args.pop(); callback(error); }; - logging.request(CONFIG, function(err) { + logging.request(CONFIG, err => { assert.strictEqual(err, error); done(); }); }); it('should execute the request function', () => { - logging.api[CONFIG.client][CONFIG.method] = function(done) { - const callback = [].slice.call(arguments).pop(); + logging.api[CONFIG.client][CONFIG.method] = (done, ...args) => { + const callback = args.pop(); callback(null, done); // so it ends the test }; @@ -940,23 +950,23 @@ describe('Logging', () => { GAX_STREAM = through(); logging.api[CONFIG.client][CONFIG.method] = { - bind: function() { - return function() { - return GAX_STREAM; - }; + bind() { + return () => GAX_STREAM; }, }; }); it('should return if in snippet sandbox', done => { - logging.auth.getProjectId = function() { + logging.auth.getProjectId = () => { done(new Error('Should not have gotten project ID.')); }; - global.GCLOUD_SANDBOX_ENV = true; + // tslint:disable-next-line no-any + (global as any).GCLOUD_SANDBOX_ENV = true; const returnValue = logging.request(CONFIG); returnValue.emit('reading'); - delete global.GCLOUD_SANDBOX_ENV; + // tslint:disable-next-line no-any + delete (global as any).GCLOUD_SANDBOX_ENV; assert(returnValue instanceof require('stream')); done(); @@ -972,16 +982,12 @@ describe('Logging', () => { it('should prepare the request once reading', done => { logging.api[CONFIG.client][CONFIG.method] = { - bind: function(gaxClient, reqOpts, gaxOpts) { + bind(gaxClient, reqOpts, gaxOpts) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(gaxOpts, CONFIG.gaxOpts); - setImmediate(done); - - return function() { - return GAX_STREAM; - }; + return () => GAX_STREAM; }, }; @@ -999,7 +1005,7 @@ describe('Logging', () => { const requestStream = logging.request(CONFIG); requestStream.emit('reading'); - requestStream.on('error', function(err) { + requestStream.on('error', err => { assert.strictEqual(err, error); done(); }); @@ -1011,7 +1017,7 @@ describe('Logging', () => { const requestStream = logging.request(CONFIG); requestStream.emit('reading'); - requestStream.on('error', function(err) { + requestStream.on('error', err => { assert.strictEqual(err, error); done(); }); @@ -1054,7 +1060,7 @@ describe('Logging', () => { }); it('should add cloud-logs as an owner', done => { - bucket.acl.owners.addGroup = function(entity) { + bucket.acl.owners.addGroup = entity => { assert.strictEqual(entity, 'cloud-logs@google.com'); done(); }; @@ -1067,13 +1073,13 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - bucket.acl.owners.addGroup = function(entity, callback) { + bucket.acl.owners.addGroup = (entity, callback) => { callback(error, apiResponse); }; }); it('should return error and API response to callback', done => { - logging.setAclForBucket_(SINK_NAME, CONFIG, function(err, sink, resp) { + logging.setAclForBucket_(SINK_NAME, CONFIG, (err, sink, resp) => { assert.strictEqual(err, error); assert.strictEqual(sink, null); assert.strictEqual(resp, apiResponse); @@ -1087,13 +1093,13 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - bucket.acl.owners.addGroup = function(entity, callback) { + bucket.acl.owners.addGroup = (entity, callback) => { callback(null, apiResponse); }; }); it('should call createSink with string destination', done => { - bucket.acl.owners.addGroup = function(entity, callback) { + bucket.acl.owners.addGroup = (entity, callback) => { logging.createSink = (name, config, callback) => { assert.strictEqual(name, SINK_NAME); @@ -1173,7 +1179,7 @@ describe('Logging', () => { const expectedAccess = [].slice.call(originalAccess).concat(access); - dataset.setMetadata = function(metadata) { + dataset.setMetadata = metadata => { assert.deepStrictEqual(apiResponse.access, originalAccess); assert.deepStrictEqual(metadata.access, expectedAccess); done(); @@ -1187,13 +1193,13 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - dataset.setMetadata = function(metadata, callback) { + dataset.setMetadata = (metadata, callback) => { callback(error, apiResponse); }; }); it('should exec callback with error & API response', done => { - logging.setAclForDataset_(SINK_NAME, CONFIG, function(err, _, res) { + logging.setAclForDataset_(SINK_NAME, CONFIG, (err, _, res) => { assert.strictEqual(err, error); assert.strictEqual(_, null); assert.strictEqual(res, apiResponse); @@ -1206,7 +1212,7 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - dataset.setMetadata = function(metadata, callback) { + dataset.setMetadata = (metadata, callback) => { callback(null, apiResponse); }; }); diff --git a/handwritten/logging/test/log.js b/handwritten/logging/test/log.ts similarity index 96% rename from handwritten/logging/test/log.js rename to handwritten/logging/test/log.ts index 5629c6cda8d..abe1c9cf5f2 100644 --- a/handwritten/logging/test/log.js +++ b/handwritten/logging/test/log.ts @@ -16,16 +16,16 @@ 'use strict'; -const assert = require('assert'); -const extend = require('extend'); -const proxyquire = require('proxyquire'); -const {util} = require('@google-cloud/common-grpc'); -const promisify = require('@google-cloud/promisify'); +import * as assert from 'assert'; +import * as extend from 'extend'; +import * as proxyquire from 'proxyquire'; +import {util} from '@google-cloud/common-grpc'; +import * as promisify from '@google-cloud/promisify'; let promisifed = false; const fakePromisify = extend({}, promisify, { - promisifyAll: function(Class, options) { - if (Class.name !== 'Log') { + promisifyAll(c, options) { + if (c.name !== 'Log') { return; } promisifed = true; @@ -35,12 +35,16 @@ const fakePromisify = extend({}, promisify, { const {Entry} = require('../src'); -function FakeMetadata() { - this.calledWith_ = arguments; +class FakeMetadata { + calledWith_: IArguments; + constructor() { + this.calledWith_ = arguments; + } } describe('Log', () => { - let Log; + // tslint:disable-next-line no-any variable-name + let Log: any; let log; const PROJECT_ID = 'project-id'; @@ -55,19 +59,18 @@ describe('Log', () => { let LOGGING; - let assignSeverityToEntriesOverride = null; + let assignSeverityToEntriesOverride: Function|null = null; before(() => { Log = proxyquire('../src/log', { '@google-cloud/promisify': fakePromisify, - './entry': {Entry: Entry}, + './entry': {Entry}, './metadata': {Metadata: FakeMetadata}, }).Log; const assignSeverityToEntries_ = Log.assignSeverityToEntries_; - Log.assignSeverityToEntries_ = function() { - return (assignSeverityToEntriesOverride || assignSeverityToEntries_) - .apply(null, arguments); - }; + Log.assignSeverityToEntries_ = (...args) => + (assignSeverityToEntriesOverride || assignSeverityToEntries_) + .apply(null, args); }); beforeEach(() => { @@ -130,11 +133,9 @@ describe('Log', () => { }); describe('assignSeverityToEntries_', () => { - const circular = {}; + const circular = {} as {circular: {}}; circular.circular = circular; - const ENTRIES = [{data: {a: 'b'}}, {data: {c: 'd'}}, {data: {e: circular}}]; - const SEVERITY = 'severity'; it('should assign severity to a single entry', () => { diff --git a/handwritten/logging/test/metadata.js b/handwritten/logging/test/metadata.ts similarity index 96% rename from handwritten/logging/test/metadata.js rename to handwritten/logging/test/metadata.ts index bbe0cb08b8c..698ae77c9fc 100644 --- a/handwritten/logging/test/metadata.js +++ b/handwritten/logging/test/metadata.ts @@ -16,14 +16,14 @@ 'use strict'; -const assert = require('assert'); -const BigNumber = require('bignumber.js'); -const extend = require('extend'); -const proxyquire = require('proxyquire'); +import * as assert from 'assert'; +import BigNumber from 'bignumber.js'; +import * as extend from 'extend'; +import * as proxyquire from 'proxyquire'; let instanceOverride; const fakeGcpMetadata = { - instance: function(path) { + instance(path) { if (instanceOverride) { const override = Array.isArray(instanceOverride) ? instanceOverride.find(entry => entry.path === path) : @@ -52,17 +52,20 @@ let readFileShouldError; const fakeFS = { readFile: (filename, encoding, callback) => { setImmediate(() => { - if (readFileShouldError) + if (readFileShouldError) { callback(new Error(FAKE_READFILE_ERROR_MESSAGE)); - else + } else { callback(null, FAKE_READFILE_CONTENTS); + } }); }, }; describe('metadata', () => { - let MetadataCached; - let Metadata; + // tslint:disable-next-line no-any variable-name + let MetadataCached: any; + // tslint:disable-next-line no-any variable-name + let Metadata: any; let metadata; let LOGGING; diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 6ea83186474..215fe4c0e0d 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -16,7 +16,6 @@ import * as assert from 'assert'; import * as EventEmitter from 'events'; -import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; const FAKE_PROJECT_ID = 'project-🦄'; diff --git a/handwritten/logging/test/sink.js b/handwritten/logging/test/sink.ts similarity index 59% rename from handwritten/logging/test/sink.js rename to handwritten/logging/test/sink.ts index c9acef62969..a4651b2644f 100644 --- a/handwritten/logging/test/sink.js +++ b/handwritten/logging/test/sink.ts @@ -16,23 +16,24 @@ 'use strict'; -const assert = require('assert'); -const extend = require('extend'); -const proxyquire = require('proxyquire'); -const {util} = require('@google-cloud/common-grpc'); -const promisify = require('@google-cloud/promisify'); +import * as assert from 'assert'; +import * as extend from 'extend'; +import * as proxyquire from 'proxyquire'; +import * as promisify from '@google-cloud/promisify'; +import {util} from '@google-cloud/common-grpc'; let promisifed = false; const fakePromisify = extend({}, promisify, { - promisifyAll: function(Class) { - if (Class.name === 'Sink') { + promisifyAll(c) { + if (c.name === 'Sink') { promisifed = true; } }, }); -describe('Sink', function() { - let Sink; +describe('Sink', () => { + // tslint:disable-next-line no-any variable-name + let Sink: any; let sink; const LOGGING = { @@ -41,41 +42,41 @@ describe('Sink', function() { }; const SINK_NAME = 'sink-name'; - before(function() { + before(() => { Sink = proxyquire('../src/sink', { '@google-cloud/promisify': fakePromisify, }).Sink; }); - beforeEach(function() { + beforeEach(() => { sink = new Sink(LOGGING, SINK_NAME); }); - describe('instantiation', function() { - it('should promisify all the things', function() { + describe('instantiation', () => { + it('should promisify all the things', () => { assert(promisifed); }); - it('should localize Logging instance', function() { + it('should localize Logging instance', () => { assert.strictEqual(sink.logging, LOGGING); }); - it('should localize the name', function() { + it('should localize the name', () => { assert.strictEqual(sink.name, SINK_NAME); }); - it('should localize the formatted name', function() { + it('should localize the formatted name', () => { assert.strictEqual( sink.formattedName_, 'projects/' + LOGGING.projectId + '/sinks/' + SINK_NAME); }); }); - describe('create', function() { - it('should call parent createSink', function(done) { + describe('create', () => { + it('should call parent createSink', done => { const config = {}; - sink.logging.createSink = function(name, config_, callback) { + sink.logging.createSink = (name, config_, callback) => { assert.strictEqual(name, sink.name); assert.strictEqual(config_, config); callback(); // done() @@ -85,9 +86,9 @@ describe('Sink', function() { }); }); - describe('delete', function() { - it('should accept gaxOptions', function(done) { - sink.logging.request = function(config, callback) { + describe('delete', () => { + it('should accept gaxOptions', done => { + sink.logging.request = (config, callback) => { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'deleteSink'); @@ -103,10 +104,10 @@ describe('Sink', function() { sink.delete(done); }); - it('should accept gaxOptions', function(done) { + it('should accept gaxOptions', done => { const gaxOptions = {}; - sink.logging.request = function(config) { + sink.logging.request = config => { assert.strictEqual(config.gaxOpts, gaxOptions); done(); }; @@ -115,9 +116,9 @@ describe('Sink', function() { }); }); - describe('getMetadata', function() { - it('should make correct request', function(done) { - sink.logging.request = function(config) { + describe('getMetadata', () => { + it('should make correct request', done => { + sink.logging.request = config => { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'getSink'); @@ -133,10 +134,10 @@ describe('Sink', function() { sink.getMetadata(assert.ifError); }); - it('should accept gaxOptions', function(done) { + it('should accept gaxOptions', done => { const gaxOptions = {}; - sink.logging.request = function(config) { + sink.logging.request = config => { assert.strictEqual(config.gaxOpts, gaxOptions); done(); }; @@ -144,38 +145,38 @@ describe('Sink', function() { sink.delete(gaxOptions, assert.ifError); }); - it('should update metadata', function(done) { + it('should update metadata', done => { const metadata = {}; - sink.logging.request = function(config, callback) { + sink.logging.request = (config, callback) => { callback(null, metadata); }; - sink.getMetadata(function() { + sink.getMetadata(() => { assert.strictEqual(sink.metadata, metadata); done(); }); }); - it('should execute callback with original arguments', function(done) { - const args = [{}, {}, {}]; + it('should execute callback with original arguments', done => { + const ARGS = [{}, {}, {}]; - sink.logging.request = function(config, callback) { - callback.apply(null, args); + sink.logging.request = (config, callback) => { + callback.apply(null, ARGS); }; - sink.getMetadata(function() { - assert.deepStrictEqual([].slice.call(arguments), args); + sink.getMetadata((...args) => { + assert.deepStrictEqual(args, ARGS); done(); }); }); }); - describe('setFilter', function() { + describe('setFilter', () => { const FILTER = 'filter'; - it('should call set metadata', function(done) { - sink.setMetadata = function(metadata, callback) { + it('should call set metadata', done => { + sink.setMetadata = (metadata, callback) => { assert.strictEqual(metadata.filter, FILTER); callback(); // done() }; @@ -184,46 +185,46 @@ describe('Sink', function() { }); }); - describe('setMetadata', function() { + describe('setMetadata', () => { const METADATA = {a: 'b', c: 'd'}; - beforeEach(function() { - sink.getMetadata = function(callback) { + beforeEach(() => { + sink.getMetadata = (callback) => { callback(null, METADATA); }; }); - it('should refresh the metadata', function(done) { - sink.getMetadata = function() { + it('should refresh the metadata', done => { + sink.getMetadata = () => { done(); }; sink.setMetadata(METADATA, assert.ifError); }); - it('should exec callback with error from refresh', function(done) { + it('should exec callback with error from refresh', done => { const error = new Error('Error.'); const apiResponse = {}; - sink.getMetadata = function(callback) { + sink.getMetadata = (callback) => { callback(error, null, apiResponse); }; - sink.setMetadata(METADATA, function(err, apiResponse_) { + sink.setMetadata(METADATA, (err, apiResponse_) => { assert.strictEqual(err, error); assert.strictEqual(apiResponse_, apiResponse); done(); }); }); - it('should make the correct request', function(done) { + it('should make the correct request', done => { const currentMetadata = {a: 'a', e: 'e'}; - sink.getMetadata = function(callback) { + sink.getMetadata = (callback) => { callback(null, currentMetadata); }; - sink.logging.request = function(config) { + sink.logging.request = (config) => { assert.strictEqual(config.client, 'ConfigServiceV2Client'); assert.strictEqual(config.method, 'updateSink'); @@ -240,12 +241,12 @@ describe('Sink', function() { sink.setMetadata(METADATA, assert.ifError); }); - it('should accept gaxOptions', function(done) { + it('should accept gaxOptions', done => { const metadata = extend({}, METADATA, { gaxOptions: {}, }); - sink.logging.request = function(config) { + sink.logging.request = (config) => { assert.strictEqual(config.reqOpts.sink.gaxOptions, undefined); assert.strictEqual(config.gaxOpts, metadata.gaxOptions); done(); @@ -254,28 +255,28 @@ describe('Sink', function() { sink.setMetadata(metadata, assert.ifError); }); - it('should update metadata', function(done) { + it('should update metadata', done => { const metadata = {}; - sink.logging.request = function(config, callback) { + sink.logging.request = (config, callback) => { callback(null, metadata); }; - sink.setMetadata(metadata, function() { + sink.setMetadata(metadata, () => { assert.strictEqual(sink.metadata, metadata); done(); }); }); - it('should execute callback with original arguments', function(done) { - const args = [{}, {}, {}]; + it('should execute callback with original arguments', done => { + const ARGS = [{}, {}, {}]; - sink.logging.request = function(config, callback) { - callback.apply(null, args); + sink.logging.request = (config, callback) => { + callback.apply(null, ARGS); }; - sink.setMetadata(METADATA, function() { - assert.deepStrictEqual([].slice.call(arguments), args); + sink.setMetadata(METADATA, (...args) => { + assert.deepStrictEqual(args, ARGS); done(); }); }); diff --git a/handwritten/logging/tsconfig.json b/handwritten/logging/tsconfig.json index 49e7f5f474a..a9d05255723 100644 --- a/handwritten/logging/tsconfig.json +++ b/handwritten/logging/tsconfig.json @@ -13,12 +13,7 @@ "src/**/*.ts", "src/**/*.js", "test/*.ts", - "test/*.js", "test/**/*.ts", - "test/**/*.js", "system-test/*.ts", - "system-test/*.js", - "system-test/**/*.ts", - "system-test/**/*.js" ] } From f516151047316075e98d768a0328584300f2a040 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 29 Oct 2018 18:34:01 -0700 Subject: [PATCH 0266/1029] fix: resolve compile errors (#287) --- handwritten/logging/package.json | 2 +- handwritten/logging/system-test/logging.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 714e5402bcb..bf0bfad633b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -93,7 +93,7 @@ "@google-cloud/bigquery": "*", "@google-cloud/nodejs-repo-tools": "^2.3.3", "@google-cloud/pubsub": "^0.20.1", - "@google-cloud/storage": "^2.0.2", + "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/express": "^4.16.0", "@types/extend": "^3.0.0", diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index bc6bc688bd0..e5213a0e226 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -165,7 +165,8 @@ describe('Logging', () => { const logstream = logging.getSinksStream({pageSize: 1}) .on('error', done) .once('data', () => { - logstream.end(); + // tslint:disable-next-line no-any + (logstream as any).end(); done(); }); }); From acebb8e8a48a742bc5e8e02bbcd90c1aab9919e3 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 29 Oct 2018 18:55:40 -0700 Subject: [PATCH 0267/1029] fix(tsconfig): disable allowJs, enable declaration (#288) --- handwritten/logging/package.json | 2 +- .../logging/src/middleware/express/make-middleware.ts | 4 +++- handwritten/logging/tsconfig.json | 5 +---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bf0bfad633b..eed190b537b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,7 @@ "lint": "gts check && eslint samples/", "check": "gts check", "clean": "gts clean", - "compile": "tsc -p . && cp src/v2/*.json build/src/v2 && cp -r protos build", + "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build", "fix": "gts fix && gts fix samples/*.js samples/test/*.js", "prepare": "npm run compile", "pretest": "npm run compile", diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index d108e114873..ce803cc311a 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -19,6 +19,7 @@ import {getOrInjectContext, makeHeaderWrapper} from '../context'; // Types-only import. import {Request, Response, NextFunction} from 'express'; import {makeHttpRequestData} from './make-http-request'; +import {StackdriverHttpRequest} from '../../http-request'; const CHILD_LOG_NAME_SUFFIX = 'applog'; @@ -28,7 +29,8 @@ export interface AnnotatedRequestType extends Request { export function makeMiddleware( projectId: string, - emitRequestLog: (httpRequest: HttpRequest, trace: string) => void, + emitRequestLog: (httpRequest: StackdriverHttpRequest, trace: string) => + void, makeChildLogger: (childSuffix: string, trace: string) => LoggerType) { return (req: Request, res: Response, next: NextFunction) => { // TODO(ofrobots): use high-resolution timer. diff --git a/handwritten/logging/tsconfig.json b/handwritten/logging/tsconfig.json index a9d05255723..4baff68efb0 100644 --- a/handwritten/logging/tsconfig.json +++ b/handwritten/logging/tsconfig.json @@ -3,17 +3,14 @@ "compilerOptions": { "rootDir": ".", "outDir": "build", - "allowJs": true, "noImplicitAny": false, - "declaration": false, "skipLibCheck": true }, "include": [ "src/*.ts", "src/**/*.ts", - "src/**/*.js", "test/*.ts", "test/**/*.ts", - "system-test/*.ts", + "system-test/*.ts" ] } From 8378fb72acfaf78550f04698dfd827f7bcaa4584 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 30 Oct 2018 06:30:00 -0700 Subject: [PATCH 0268/1029] feat: export middleware helpers (#289) --- handwritten/logging/src/index.ts | 5 +++++ .../logging/src/middleware/express/index.ts | 17 +++++++++++++++++ handwritten/logging/src/middleware/index.ts | 19 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 handwritten/logging/src/middleware/express/index.ts create mode 100644 handwritten/logging/src/middleware/index.ts diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 5ba31a85145..c65db876e89 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -27,6 +27,11 @@ import * as is from 'is'; const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; import * as through from 'through2'; +import * as middleware from './middleware'; +import {StackdriverHttpRequest as HttpRequest} from './http-request'; + +export {middleware}; +export {HttpRequest}; const PKG = require('../../package.json'); const v2 = require('./v2'); diff --git a/handwritten/logging/src/middleware/express/index.ts b/handwritten/logging/src/middleware/express/index.ts new file mode 100644 index 00000000000..aa38318d8fc --- /dev/null +++ b/handwritten/logging/src/middleware/express/index.ts @@ -0,0 +1,17 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * from './make-middleware'; diff --git a/handwritten/logging/src/middleware/index.ts b/handwritten/logging/src/middleware/index.ts new file mode 100644 index 00000000000..b924f6ecefd --- /dev/null +++ b/handwritten/logging/src/middleware/index.ts @@ -0,0 +1,19 @@ +/*! + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as express from './express'; + +export {express}; From c4571f4739df6a6ade005a114e108877147411df Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 30 Oct 2018 10:01:12 -0700 Subject: [PATCH 0269/1029] chore: include build in eslintignore (#292) --- handwritten/logging/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore index f6fac98b0a8..f08b0fd1c65 100644 --- a/handwritten/logging/.eslintignore +++ b/handwritten/logging/.eslintignore @@ -1,3 +1,4 @@ node_modules/* samples/node_modules/* src/**/doc/* +build/ From b8cfa1ace7f76944a62d2be0d95d70c23e515d54 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 30 Oct 2018 19:53:39 -0700 Subject: [PATCH 0270/1029] fix(middleware): tweak the middleware api (#291) * Child suffix is not necessary. * Make emitRequestLog optional. Make it control finish tracking. --- .../src/middleware/express/make-middleware.ts | 44 ++++++++++++------- .../express/test-make-middleware.ts | 11 +++-- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index ce803cc311a..b03ea7a127f 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -21,17 +21,30 @@ import {Request, Response, NextFunction} from 'express'; import {makeHttpRequestData} from './make-http-request'; import {StackdriverHttpRequest} from '../../http-request'; -const CHILD_LOG_NAME_SUFFIX = 'applog'; - export interface AnnotatedRequestType extends Request { log: LoggerType; } +/** + * Generates an express middleware that installs a request-specific logger on + * the `request` object. It optionally can do HttpRequest timing that can be + * used for generating request logs. This can be used to integrate with logging + * libraries such as winston and bunyan. + * + * @param projectId Generated traceIds will be associated with this project. + * @param makeChildLogger A function that generates logger instances that will + * be installed onto `req` as `req.log`. The logger should include the trace in + * each log entry's metadata (associated with the LOGGING_TRACE_KEY property. + * @param emitRequestLog Optional. A function that will emit a parent request + * log. While some environments like GAE and GCF emit parent request logs + * automatically, other environments do not. When provided this function will be + * called with a populated `StackdriverHttpRequest` which can be emitted as + * request log. + */ export function makeMiddleware( - projectId: string, - emitRequestLog: (httpRequest: StackdriverHttpRequest, trace: string) => - void, - makeChildLogger: (childSuffix: string, trace: string) => LoggerType) { + projectId: string, makeChildLogger: (trace: string) => LoggerType, + emitRequestLog?: (httpRequest: StackdriverHttpRequest, trace: string) => + void) { return (req: Request, res: Response, next: NextFunction) => { // TODO(ofrobots): use high-resolution timer. const requestStartMs = Date.now(); @@ -42,15 +55,16 @@ export function makeMiddleware( const trace = `projects/${projectId}/traces/${spanContext.traceId}`; // Install a child logger on the request object. - (req as AnnotatedRequestType).log = - makeChildLogger(CHILD_LOG_NAME_SUFFIX, trace); - - // Emit a 'Request Log' on the parent logger. - onFinished(res, () => { - const latencyMs = Date.now() - requestStartMs; - const httpRequest = makeHttpRequestData(req, res, latencyMs); - emitRequestLog(httpRequest, trace); - }); + (req as AnnotatedRequestType).log = makeChildLogger(trace); + + if (emitRequestLog) { + // Emit a 'Request Log' on the parent logger. + onFinished(res, () => { + const latencyMs = Date.now() - requestStartMs; + const httpRequest = makeHttpRequestData(req, res, latencyMs); + emitRequestLog(httpRequest, trace); + }); + } next(); }; diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 215fe4c0e0d..6bc9ff0ba75 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -46,7 +46,7 @@ describe('middleware/express/make-middleware', () => { {'../context': FAKE_CONTEXT}); it('should return a function accepting 3 arguments', () => { - const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}, () => {}); + const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}); assert.ok(typeof middleware === 'function'); assert.ok(middleware.length === 3); }); @@ -64,7 +64,7 @@ describe('middleware/express/make-middleware', () => { const fakeResponse = makeFakeResponse(); let called = false; - const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}, () => {}); + const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}); middleware(fakeRequest, fakeResponse, () => { called = true; @@ -78,16 +78,15 @@ describe('middleware/express/make-middleware', () => { const fakeRequest = makeFakeRequest(); const fakeResponse = makeFakeResponse(); - function makeChild(childSuffix, trace) { + function makeChild(trace) { assert.strictEqual( trace, `projects/${FAKE_PROJECT_ID}/traces/${ FAKE_SPAN_CONTEXT.traceId}`); - assert.strictEqual(typeof childSuffix, 'string'); return FAKE_CHILD_LOGGER; } - const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}, makeChild); + const middleware = makeMiddleware(FAKE_PROJECT_ID, makeChild); middleware(fakeRequest, fakeResponse, () => {}); // Should annotate the request with the child logger. @@ -111,7 +110,7 @@ describe('middleware/express/make-middleware', () => { } const middleware = - makeMiddleware(FAKE_PROJECT_ID, emitRequestLog, () => {}); + makeMiddleware(FAKE_PROJECT_ID, () => {}, emitRequestLog); middleware(fakeRequest, fakeResponse, () => {}); setTimeout(() => { From e0bfd2ab704c91bb09aae995264846bd83f721c3 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 31 Oct 2018 13:31:05 -0700 Subject: [PATCH 0271/1029] refactor(metadata): use async/await (#295) Get rid of unnecessary class and use async/await. --- handwritten/logging/package.json | 3 + handwritten/logging/src/log.ts | 19 +- handwritten/logging/src/metadata.ts | 253 ++++++++++------------- handwritten/logging/test/log.ts | 27 +-- handwritten/logging/test/metadata.ts | 293 +++++++++++---------------- 5 files changed, 256 insertions(+), 339 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index eed190b537b..d71d4a01f86 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -83,6 +83,7 @@ "is": "^3.2.1", "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", + "pify": "^4.0.1", "protobufjs": "^6.8.8", "pumpify": "^1.5.1", "snakecase-keys": "^2.0.0", @@ -101,10 +102,12 @@ "@types/mocha": "^5.2.5", "@types/nock": "^9.3.0", "@types/on-finished": "^2.3.1", + "@types/pify": "^3.0.2", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", "@types/through2": "^2.0.34", "@types/uuid": "^3.4.4", + "assert-rejects": "^1.0.0", "bignumber.js": "^7.2.1", "codecov": "^3.0.4", "eslint": "^5.4.0", diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index c091145606c..d0df519e87c 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -20,10 +20,12 @@ import * as arrify from 'arrify'; import {promisifyAll} from '@google-cloud/promisify'; import * as extend from 'extend'; import * as is from 'is'; + +import {getDefaultResource} from './metadata'; + const snakeCaseKeys = require('snakecase-keys'); const {Entry} = require('./entry'); -const {Metadata} = require('./metadata'); /** * A log is a named collection of entries, each entry representing a timestamped @@ -50,14 +52,12 @@ const {Metadata} = require('./metadata'); class Log { formattedName_: string; removeCircular_: boolean; - metadata_; logging; name: string; constructor(logging, name, options) { options = options || {}; this.formattedName_ = Log.formatName_(logging.projectId, name); this.removeCircular_ = options.removeCircular === true; - this.metadata_ = new Metadata(logging); this.logging = logging; /** * @name Log#name @@ -640,10 +640,15 @@ class Log { options = {}; } if (!options.resource) { - this.metadata_.getDefaultResource((err, resource) => { - // Ignore errors (the API will speak up if it has an issue). - writeWithResource(resource); - }); + getDefaultResource(this.logging.auth) + .then( + (resource) => { + writeWithResource(resource); + }, + () => { + // Ignore errors (the API will speak up if it has an issue). + writeWithResource(null); + }); } else { if (options.resource.labels) { options.resource.labels = snakeCaseKeys(options.resource.labels); diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 20297138675..573dbad16a7 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -18,158 +18,129 @@ import * as fs from 'fs'; import * as gcpMetadata from 'gcp-metadata'; +import {GoogleAuth} from 'google-auth-library'; +import * as pify from 'pify'; + +const readFile = pify(fs.readFile); /** - * The Metadata class attempts to contact the metadata service and determine, - * based on request success and environment variables, what type of resource - * the library is operating on. + * Create a descriptor for Cloud Functions. * - * @class - * @private - * - * @see [Logs Resource API Documentation]{@link https://cloud.google.com/logging/docs/api/reference/rest/v2/MonitoredResource} + * @returns {object} + */ +export function getCloudFunctionDescriptor() { + return { + type: 'cloud_function', + labels: { + function_name: process.env.FUNCTION_NAME, + region: process.env.FUNCTION_REGION, + }, + }; +} + +/** + * Create a descriptor for Google App Engine. * - * @param {Logging} logging The parent Logging instance. + * @returns {object} */ -class Metadata { - logging; - constructor(logging) { - this.logging = logging; - } - /** - * Retrieve a resource object describing the current environment. - * - * @param {function} callback Callback function. - */ - getDefaultResource(callback) { - this.logging.auth.getEnv() - .then(env => { - if (env === 'KUBERNETES_ENGINE') { - Metadata.getGKEDescriptor(callback); - } else if (env === 'APP_ENGINE') { - callback(null, Metadata.getGAEDescriptor()); - } else if (env === 'CLOUD_FUNCTIONS') { - callback(null, Metadata.getCloudFunctionDescriptor()); - } else if (env === 'COMPUTE_ENGINE') { - // Test for compute engine should be done after all the rest - - // everything runs on top of compute engine. - Metadata.getGCEDescriptor(callback); - } else { - callback(null, Metadata.getGlobalDescriptor()); - } - }) - .catch(callback); - } +export function getGAEDescriptor() { + return { + type: 'gae_app', + labels: { + module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, + version_id: process.env.GAE_VERSION, + }, + }; +} - /** - * Create a descriptor for Cloud Functions. - * - * @returns {object} - */ - static getCloudFunctionDescriptor() { - return { - type: 'cloud_function', - labels: { - function_name: process.env.FUNCTION_NAME, - region: process.env.FUNCTION_REGION, - }, - }; - } +/** + * Create a descriptor for Google Compute Engine. + * @return {object} + */ +export async function getGCEDescriptor() { + const idResponse = await gcpMetadata.instance('id'); + const zoneResponse = await gcpMetadata.instance('zone'); + // Some parsing is necessary. Metadata service returns a fully + // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging + // wants just the zone part. + // + const zone = zoneResponse.split('/').pop(); + return { + type: 'gce_instance', + labels: { + // idResponse can be BigNumber when the id too large for JavaScript + // numbers. Use a toString() to uniformly convert to a string. + instance_id: idResponse.toString(), + zone, + }, + }; +} - /** - * Create a descriptor for Google App Engine. - * - * @returns {object} - */ - static getGAEDescriptor() { - return { - type: 'gae_app', - labels: { - module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, - version_id: process.env.GAE_VERSION, - }, - }; - } +export const KUBERNETES_NAMESPACE_ID_PATH = + '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; - /** - * Create a descriptor for Google Compute Engine. - * - * @param {function} callback Callback function. - * @return {object} - */ - static getGCEDescriptor(callback) { - gcpMetadata.instance('id').then(idResponse => { - gcpMetadata.instance('zone').then(zoneResponse => { - // Some parsing is necessary. Metadata service returns a fully - // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging - // wants just the zone part. - // - const zone = zoneResponse.split('/').pop(); - callback(null, { - type: 'gce_instance', - labels: { - // idResponse can be BigNumber when the id too large for JavaScript - // numbers. Use a toString() to uniformly convert to a string. - instance_id: idResponse.toString(), - zone, - }, - }); - }, callback); - }, callback); - } +/** + * Create a descriptor for Google Container Engine. + * + * @return {object} + */ +export async function getGKEDescriptor() { + // Stackdriver Logging Monitored Resource for 'container' requires + // cluster_name and namespace_id fields. Note that these *need* to be + // snake_case. The namespace_id is not easily available from inside the + // container, but we can get the namespace_name. Logging has been using the + // namespace_name in place of namespace_id for a while now. Log correlation + // with metrics may not necessarily work however. + // + const resp = await gcpMetadata.instance('attributes/cluster-name'); - /** - * Create a descriptor for Google Container Engine. - * - * @param {function} callback Callback function. - * @return {object} - */ - static getGKEDescriptor(callback) { - // Stackdriver Logging Monitored Resource for 'container' requires - // cluster_name and namespace_id fields. Note that these *need* to be - // snake_case. The namespace_id is not easily available from inside the - // container, but we can get the namespace_name. Logging has been using the - // namespace_name in place of namespace_id for a while now. Log correlation - // with metrics may not necessarily work however. - // - gcpMetadata.instance('attributes/cluster-name').then(resp => { - fs.readFile( - // tslint:disable-next-line no-any - (Metadata as any).KUBERNETES_NAMESPACE_ID_PATH, 'utf8', - (err, namespace) => { - if (err) { - callback(new Error( - `Error reading ` + - // tslint:disable-next-line no-any - `${(Metadata as any).KUBERNETES_NAMESPACE_ID_PATH}: ${ - err.message}`)); - return; - } - callback(null, { - type: 'container', - labels: { - cluster_name: resp, - namespace_id: namespace, - }, - }); - }); - }, callback); + let namespace; + try { + namespace = await readFile(KUBERNETES_NAMESPACE_ID_PATH, 'utf8'); + } catch (err) { + throw new Error( + `Error reading ${KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}`); } - /** - * Create a global descriptor. - * - * @returns {object} - */ - static getGlobalDescriptor() { - return { - type: 'global', - }; - } + return { + type: 'container', + labels: { + cluster_name: resp, + namespace_id: namespace, + }, + }; } -// tslint:disable-next-line no-any -(Metadata as any).KUBERNETES_NAMESPACE_ID_PATH = - '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; +/** + * Create a global descriptor. + * + * @returns {object} + */ +export function getGlobalDescriptor() { + return { + type: 'global', + }; +} -module.exports.Metadata = Metadata; +/** + * Attempt to contact the metadata service and determine, + * based on request success and environment variables, what type of resource + * the library is operating on. + */ +export async function getDefaultResource(auth: GoogleAuth) { + const env = await auth.getEnv(); + switch (env) { + case 'KUBERNETES_ENGINE': + return getGKEDescriptor(); + case 'APP_ENGINE': + return getGAEDescriptor(); + case 'CLOUD_FUNCTIONS': + return getCloudFunctionDescriptor(); + case 'COMPUTE_ENGINE': + // Test for compute engine should be done after all the rest - + // everything runs on top of compute engine. + return getGCEDescriptor(); + default: + return getGlobalDescriptor(); + } +} diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index abe1c9cf5f2..2b9f00bd6cc 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -35,12 +35,13 @@ const fakePromisify = extend({}, promisify, { const {Entry} = require('../src'); -class FakeMetadata { - calledWith_: IArguments; - constructor() { - this.calledWith_ = arguments; - } -} +const originalGetDefaultResource = async () => { + return 'very-fake-resource'; +}; + +const fakeMetadata = { + getDefaultResource: originalGetDefaultResource +}; describe('Log', () => { // tslint:disable-next-line no-any variable-name @@ -65,7 +66,7 @@ describe('Log', () => { Log = proxyquire('../src/log', { '@google-cloud/promisify': fakePromisify, './entry': {Entry}, - './metadata': {Metadata: FakeMetadata}, + './metadata': fakeMetadata, }).Log; const assignSeverityToEntries_ = Log.assignSeverityToEntries_; Log.assignSeverityToEntries_ = (...args) => @@ -112,11 +113,6 @@ describe('Log', () => { assert.strictEqual(log.formattedName_, formattedName); }); - it('should localize an instance of Metadata', () => { - assert(log.metadata_ instanceof FakeMetadata); - assert.strictEqual(log.metadata_.calledWith_[0], LOGGING); - }); - it('should accept and localize options.removeCircular', () => { const options = {removeCircular: true}; const log = new Log(LOGGING, LOG_NAME_FORMATTED, options); @@ -319,8 +315,8 @@ describe('Log', () => { log.decorateEntries_ = entries => { return entries; }; - log.metadata_.getDefaultResource = callback => { - callback(null, FAKE_RESOURCE); + fakeMetadata.getDefaultResource = async () => { + return FAKE_RESOURCE; }; }); @@ -645,9 +641,6 @@ describe('Log', () => { beforeEach(() => { log.entry = () => new FakeEntry(); - log.metadata_.assignDefaultResource = (entryJson, callback) => { - callback(null, entryJson); - }; }); it('should create an Entry object if one is not provided', () => { diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 698ae77c9fc..f82652ce4d8 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -20,6 +20,7 @@ import * as assert from 'assert'; import BigNumber from 'bignumber.js'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; +import assertRejects = require('assert-rejects'); let instanceOverride; const fakeGcpMetadata = { @@ -63,30 +64,24 @@ const fakeFS = { describe('metadata', () => { // tslint:disable-next-line no-any variable-name - let MetadataCached: any; + let metadataCached: any; // tslint:disable-next-line no-any variable-name - let Metadata: any; - let metadata; - - let LOGGING; - + let metadata: any; + let AUTH; const ENV_CACHED = extend({}, process.env); before(() => { - Metadata = proxyquire('../src/metadata', { - 'gcp-metadata': fakeGcpMetadata, - fs: fakeFS, - }).Metadata; + metadata = proxyquire('../src/metadata', { + 'gcp-metadata': fakeGcpMetadata, + fs: fakeFS, + }); - MetadataCached = extend({}, Metadata); + metadataCached = extend({}, metadata); }); beforeEach(() => { - LOGGING = { - auth: {}, - }; - extend(Metadata, MetadataCached); - metadata = new Metadata(LOGGING); + AUTH = {}; + extend(metadata, metadataCached); instanceOverride = null; readFileShouldError = false; }); @@ -95,12 +90,6 @@ describe('metadata', () => { extend(process.env, ENV_CACHED); }); - describe('instantiation', () => { - it('should localize Logging instance', () => { - assert.strictEqual(metadata.logging, LOGGING); - }); - }); - describe('getCloudFunctionDescriptor', () => { const FUNCTION_NAME = 'function-name'; const FUNCTION_REGION = 'function-region'; @@ -111,7 +100,7 @@ describe('metadata', () => { }); it('should return the correct descriptor', () => { - assert.deepStrictEqual(Metadata.getCloudFunctionDescriptor(), { + assert.deepStrictEqual(metadata.getCloudFunctionDescriptor(), { type: 'cloud_function', labels: { function_name: FUNCTION_NAME, @@ -133,7 +122,7 @@ describe('metadata', () => { }); it('should return the correct descriptor', () => { - assert.deepStrictEqual(Metadata.getGAEDescriptor(), { + assert.deepStrictEqual(metadata.getGAEDescriptor(), { type: 'gae_app', labels: { module_id: GAE_SERVICE, @@ -145,7 +134,7 @@ describe('metadata', () => { it('should use GAE_MODULE_NAME for module_id', () => { delete process.env.GAE_SERVICE; - const moduleId = Metadata.getGAEDescriptor().labels.module_id; + const moduleId = metadata.getGAEDescriptor().labels.module_id; assert.strictEqual(moduleId, GAE_MODULE_NAME); }); }); @@ -153,150 +142,115 @@ describe('metadata', () => { describe('getGKEDescriptor', () => { const CLUSTER_NAME = 'gke-cluster-name'; - it('should return the correct descriptor', done => { + it('should return the correct descriptor', async () => { instanceOverride = { path: 'attributes/cluster-name', successArg: CLUSTER_NAME, }; - Metadata.getGKEDescriptor((err, descriptor) => { - assert.ifError(err); - assert.deepStrictEqual(descriptor, { - type: 'container', - labels: { - cluster_name: CLUSTER_NAME, - namespace_id: FAKE_READFILE_CONTENTS, - }, - }); - done(); + const descriptor = await metadata.getGKEDescriptor(); + assert.deepStrictEqual(descriptor, { + type: 'container', + labels: { + cluster_name: CLUSTER_NAME, + namespace_id: FAKE_READFILE_CONTENTS, + }, }); }); - it('should return error on failure to acquire metadata', done => { + it('should throw error on failure to acquire metadata', async () => { const FAKE_ERROR = new Error(); instanceOverride = { errorArg: FAKE_ERROR, }; - Metadata.getGKEDescriptor(err => { - assert.strictEqual(err, FAKE_ERROR); - done(); - }); + assertRejects(metadata.getGKEDescriptor(), (err) => err === FAKE_ERROR); }); - it('should return error when read of namespace file fails', done => { + it('should throw error when read of namespace file fails', async () => { readFileShouldError = true; - Metadata.getGKEDescriptor(err => { - assert.ok(err); - assert.ok(err.message.includes(FAKE_READFILE_ERROR_MESSAGE)); - done(); - }); - }); - }); - - describe('getGCEDescriptor', () => { - const INSTANCE_ID = 'fake-instance-id'; - const ZONE_ID = 'morrowind-vivec-1'; - const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; - - it('should return the correct descriptor', done => { - instanceOverride = [ - { - path: 'id', - successArg: INSTANCE_ID, - }, - { - path: 'zone', - successArg: ZONE_FULL, - }, - ]; - - Metadata.getGCEDescriptor((err, descriptor) => { - assert.ifError(err); - assert.deepStrictEqual(descriptor, { - type: 'gce_instance', - labels: { - instance_id: INSTANCE_ID, - zone: ZONE_ID, - }, - }); - done(); - }); - }); - - it('should return error on failure to acquire metadata', done => { - const FAKE_ERROR = new Error(); - instanceOverride = { - errorArg: FAKE_ERROR, - }; - Metadata.getGCEDescriptor(err => { - assert.strictEqual(err, FAKE_ERROR); - done(); - }); + assertRejects( + metadata.getGKEDescriptor(), + (err) => err.message.includes(FAKE_READFILE_ERROR_MESSAGE)); }); }); describe('getGlobalDescriptor', () => { it('should return the correct descriptor', () => { - assert.deepStrictEqual(Metadata.getGlobalDescriptor(), { + assert.deepStrictEqual(metadata.getGlobalDescriptor(), { type: 'global', }); }); }); describe('getDefaultResource', () => { - it('should get the environment from auth client', done => { - metadata.logging.auth.getEnv = () => { - done(); + it('should get the environment from auth client', async () => { + let called = false; + + const fakeAuth = { + async getEnv() { + called = true; + return null; + } }; - - metadata.getDefaultResource(assert.ifError); + await metadata.getDefaultResource(fakeAuth); + assert.ok(called); }); describe('environments', () => { describe('app engine', () => { - it('should return correct descriptor', done => { - const DESCRIPTOR = {}; - - Metadata.getGAEDescriptor = () => { - return DESCRIPTOR; - }; - - metadata.logging.auth.getEnv = () => { - return Promise.resolve('APP_ENGINE'); + it('should return correct descriptor', async () => { + const GAE_MODULE_NAME = 'gae-module-name'; + const GAE_SERVICE = 'gae-service'; + const GAE_VERSION = 'gae-version'; + process.env.GAE_MODULE_NAME = GAE_MODULE_NAME; + process.env.GAE_SERVICE = GAE_SERVICE; + process.env.GAE_VERSION = GAE_VERSION; + + const fakeAuth = { + async getEnv() { + return 'APP_ENGINE'; + } }; - metadata.getDefaultResource((err, defaultResource) => { - assert.ifError(err); - assert.strictEqual(defaultResource, DESCRIPTOR); - done(); + const defaultResource = await metadata.getDefaultResource(fakeAuth); + assert.deepEqual(defaultResource, { + type: 'gae_app', + labels: { + module_id: GAE_SERVICE, + version_id: GAE_VERSION, + }, }); }); }); describe('cloud function', () => { - it('should return correct descriptor', done => { - const DESCRIPTOR = {}; - - Metadata.getCloudFunctionDescriptor = () => { - return DESCRIPTOR; + it('should return correct descriptor', async () => { + const FUNCTION_NAME = 'function-name'; + const FUNCTION_REGION = 'function-region'; + process.env.FUNCTION_NAME = FUNCTION_NAME; + process.env.FUNCTION_REGION = FUNCTION_REGION; + + const fakeAuth = { + async getEnv() { + return 'CLOUD_FUNCTIONS'; + } }; - metadata.logging.auth.getEnv = () => { - return Promise.resolve('CLOUD_FUNCTIONS'); - }; - - metadata.getDefaultResource((err, defaultResource) => { - assert.ifError(err); - assert.strictEqual(defaultResource, DESCRIPTOR); - done(); + const defaultResource = await metadata.getDefaultResource(fakeAuth); + assert.deepEqual(defaultResource, { + type: 'cloud_function', + labels: { + function_name: FUNCTION_NAME, + region: FUNCTION_REGION, + }, }); }); }); describe('compute engine', () => { - it('should return correct descriptor', done => { + it('should return correct descriptor', async () => { const INSTANCE_ID = 1234567; const ZONE_ID = 'cyrodiil-anvil-2'; const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; @@ -311,24 +265,22 @@ describe('metadata', () => { }, ]; - metadata.logging.auth.getEnv = () => { - return Promise.resolve('COMPUTE_ENGINE'); + const fakeAuth = { + async getEnv() { + return 'COMPUTE_ENGINE'; + } }; - - metadata.getDefaultResource((err, defaultResource) => { - assert.ifError(err); - assert.deepStrictEqual(defaultResource, { - type: 'gce_instance', - labels: { - instance_id: INSTANCE_ID.toString(), - zone: ZONE_ID, - }, - }); - done(); + const defaultResource = await metadata.getDefaultResource(fakeAuth); + assert.deepStrictEqual(defaultResource, { + type: 'gce_instance', + labels: { + instance_id: INSTANCE_ID.toString(), + zone: ZONE_ID, + }, }); }); - it('should deal with instance id being a BigNumber', done => { + it('should deal with instance id being a BigNumber', async () => { const INSTANCE_ID_STRING = `3279739563200103600`; const INSTANCE_ID = new BigNumber(INSTANCE_ID_STRING); const ZONE_ID = 'cyrodiil-anvil-2'; @@ -344,66 +296,59 @@ describe('metadata', () => { }, ]; - metadata.logging.auth.getEnv = () => { - return Promise.resolve('COMPUTE_ENGINE'); + const fakeAuth = { + async getEnv() { + return 'COMPUTE_ENGINE'; + } }; - metadata.getDefaultResource((err, defaultResource) => { - assert.ifError(err); - assert.deepStrictEqual(defaultResource, { - type: 'gce_instance', - labels: { - instance_id: INSTANCE_ID_STRING, - zone: ZONE_ID, - }, - }); - done(); + const defaultResource = await metadata.getDefaultResource(fakeAuth); + assert.deepStrictEqual(defaultResource, { + type: 'gce_instance', + labels: { + instance_id: INSTANCE_ID_STRING, + zone: ZONE_ID, + }, }); }); }); describe('container engine', () => { - it('should return correct descriptor', done => { + it('should return correct descriptor', async () => { const CLUSTER_NAME = 'overridden-value'; instanceOverride = { path: 'attributes/cluster-name', successArg: CLUSTER_NAME, }; - metadata.logging.auth.getEnv = () => { - return Promise.resolve('KUBERNETES_ENGINE'); + const fakeAuth = { + async getEnv() { + return 'KUBERNETES_ENGINE'; + } }; - metadata.getDefaultResource((err, defaultResource) => { - assert.ifError(err); - assert.deepStrictEqual(defaultResource, { - type: 'container', - labels: { - cluster_name: CLUSTER_NAME, - namespace_id: FAKE_READFILE_CONTENTS, - }, - }); - done(); + const defaultResource = await metadata.getDefaultResource(fakeAuth); + assert.deepStrictEqual(defaultResource, { + type: 'container', + labels: { + cluster_name: CLUSTER_NAME, + namespace_id: FAKE_READFILE_CONTENTS, + }, }); }); }); describe('global', () => { - it('should return correct descriptor', done => { - const DESCRIPTOR = {}; - - Metadata.getGlobalDescriptor = () => { - return DESCRIPTOR; - }; - - metadata.logging.auth.getEnv = () => { - return Promise.resolve('NONE'); + it('should return correct descriptor', async () => { + const fakeAuth = { + async getEnv() { + return 'NONE'; + } }; - metadata.getDefaultResource((err, defaultResource) => { - assert.ifError(err); - assert.strictEqual(defaultResource, DESCRIPTOR); - done(); + const defaultResource = await metadata.getDefaultResource(fakeAuth); + assert.deepEqual(defaultResource, { + type: 'global', }); }); }); From b48030ffa6b5439d9e22885b6c5fcd27fec1674b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Oct 2018 13:39:13 -0700 Subject: [PATCH 0272/1029] fix: disable skipLibCheck in the tsconfig (#296) --- handwritten/logging/package.json | 2 +- handwritten/logging/tsconfig.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d71d4a01f86..cb8473e5d3c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -68,7 +68,7 @@ "posttest": "npm run check" }, "dependencies": { - "@google-cloud/common-grpc": "^0.9.0", + "@google-cloud/common-grpc": "^0.9.2", "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.3.0", diff --git a/handwritten/logging/tsconfig.json b/handwritten/logging/tsconfig.json index 4baff68efb0..f39b8a5188f 100644 --- a/handwritten/logging/tsconfig.json +++ b/handwritten/logging/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "rootDir": ".", "outDir": "build", - "noImplicitAny": false, - "skipLibCheck": true + "noImplicitAny": false }, "include": [ "src/*.ts", From c199f1505604b8ab93facaa39a374f26d639f156 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Oct 2018 14:10:43 -0700 Subject: [PATCH 0273/1029] fix: fix system tests by choosing semver range for BigQuery (#297) --- handwritten/logging/package.json | 2 +- handwritten/logging/system-test/logging.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cb8473e5d3c..117a2d0eefe 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -91,7 +91,7 @@ "through2": "^2.0.3" }, "devDependencies": { - "@google-cloud/bigquery": "*", + "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^2.3.3", "@google-cloud/pubsub": "^0.20.1", "@google-cloud/storage": "^2.2.0", diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index e5213a0e226..89e6fec01fd 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -15,8 +15,7 @@ */ import * as assert from 'assert'; -// tslint:disable-next-line variable-name -const BigQuery = require('@google-cloud/bigquery'); +const {BigQuery} = require('@google-cloud/bigquery'); import * as extend from 'extend'; import * as is from 'is'; import * as nock from 'nock'; From f9838c4ccf98f157a391aae247e64aa7c76e28b9 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Oct 2018 22:07:26 -0700 Subject: [PATCH 0274/1029] chore: remove a few unused deps (#299) --- handwritten/logging/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 117a2d0eefe..d8ec3f8b484 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -79,7 +79,6 @@ "gcp-metadata": "^0.9.0", "google-auth-library": "^2.0.0", "google-gax": "^0.20.0", - "google-proto-files": "^0.17.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", @@ -120,7 +119,6 @@ "nock": "^10.0.1", "nyc": "^13.0.1", "power-assert": "^1.6.0", - "propprop": "^0.3.1", "proxyquire": "^2.1.0", "typescript": "~3.1.0", "uuid": "^3.3.2" From eec8f36915fac6e9a7f0a6ed323b8c52d9f4d51c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 1 Nov 2018 12:03:54 -0700 Subject: [PATCH 0275/1029] chore: update CircleCI config (#302) --- handwritten/logging/.circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index da54155fc57..6735ebdaaa1 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -159,7 +159,8 @@ jobs: command: npm run system-test environment: GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json + GOOGLE_APPLICATION_CREDENTIALS: /home/node/project/.circleci/key.json + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Remove unencrypted key. command: | From 09ae5ee7024e642953675bdcb3600a9c774db53c Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Thu, 1 Nov 2018 17:27:31 -0700 Subject: [PATCH 0276/1029] fix(metadata): include zone on GAE descriptor (#298) --- handwritten/logging/src/metadata.ts | 15 +++++++++++++-- handwritten/logging/test/metadata.ts | 22 ++++++++++++++-------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 573dbad16a7..462d75504c8 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -23,6 +23,14 @@ import * as pify from 'pify'; const readFile = pify(fs.readFile); +function zoneFromQualifiedZone(qualified: string): string|undefined { + // Some parsing is necessary. Metadata service returns a fully + // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging + // wants just the zone part. + // + return qualified.split('/').pop(); +} + /** * Create a descriptor for Cloud Functions. * @@ -43,12 +51,15 @@ export function getCloudFunctionDescriptor() { * * @returns {object} */ -export function getGAEDescriptor() { +export async function getGAEDescriptor() { + const qualifiedZone = await gcpMetadata.instance('zone'); + const zone = zoneFromQualifiedZone(qualifiedZone); return { type: 'gae_app', labels: { module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, version_id: process.env.GAE_VERSION, + zone }, }; } @@ -64,7 +75,7 @@ export async function getGCEDescriptor() { // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging // wants just the zone part. // - const zone = zoneResponse.split('/').pop(); + const zone = zoneFromQualifiedZone(zoneResponse); return { type: 'gce_instance', labels: { diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index f82652ce4d8..6de4c7c4f57 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -121,20 +121,22 @@ describe('metadata', () => { process.env.GAE_VERSION = GAE_VERSION; }); - it('should return the correct descriptor', () => { - assert.deepStrictEqual(metadata.getGAEDescriptor(), { + it('should return the correct descriptor', async () => { + const ZONE_ID = 'cyrodiil-anvil-2'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + instanceOverride = {path: 'zone', successArg: ZONE_FULL}; + const descriptor = await metadata.getGAEDescriptor(); + assert.deepStrictEqual(descriptor, { type: 'gae_app', - labels: { - module_id: GAE_SERVICE, - version_id: GAE_VERSION, - }, + labels: + {module_id: GAE_SERVICE, version_id: GAE_VERSION, zone: ZONE_ID}, }); }); - it('should use GAE_MODULE_NAME for module_id', () => { + it('should use GAE_MODULE_NAME for module_id', async () => { delete process.env.GAE_SERVICE; - const moduleId = metadata.getGAEDescriptor().labels.module_id; + const moduleId = (await metadata.getGAEDescriptor()).labels.module_id; assert.strictEqual(moduleId, GAE_MODULE_NAME); }); }); @@ -207,6 +209,9 @@ describe('metadata', () => { process.env.GAE_MODULE_NAME = GAE_MODULE_NAME; process.env.GAE_SERVICE = GAE_SERVICE; process.env.GAE_VERSION = GAE_VERSION; + const ZONE_ID = 'cyrodiil-anvil-2'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + instanceOverride = {path: 'zone', successArg: ZONE_FULL}; const fakeAuth = { async getEnv() { @@ -220,6 +225,7 @@ describe('metadata', () => { labels: { module_id: GAE_SERVICE, version_id: GAE_VERSION, + zone: ZONE_ID }, }); }); From b609dc6f93f21aa253abda3aefbdfbf7a2bc852a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 6 Nov 2018 19:05:03 -0800 Subject: [PATCH 0277/1029] Release v4.1.0 (#305) --- handwritten/logging/CHANGELOG.md | 52 ++++++++++++++++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 7c9117b2d37..ff61d9e544d 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,58 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.1.0 + +### New Features +- feat: export middleware helpers ([#289](https://github.com/googleapis/nodejs-logging/pull/289)) +- feat: Introduce middleware directory ([#248](https://github.com/googleapis/nodejs-logging/pull/248)) + +### Bug fixes +- fix(metadata): include zone on GAE descriptor ([#298](https://github.com/googleapis/nodejs-logging/pull/298)) +- fix(middleware): tweak the middleware api ([#291](https://github.com/googleapis/nodejs-logging/pull/291)) +- fix: resolve compile errors ([#287](https://github.com/googleapis/nodejs-logging/pull/287)) +- fix(deps): move nock to devDependencies ([#276](https://github.com/googleapis/nodejs-logging/pull/276)) + +### Dependencies +- fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.6 ([#283](https://github.com/googleapis/nodejs-logging/pull/283)) +- chore(deps): update dependency eslint-plugin-node to v8 ([#284](https://github.com/googleapis/nodejs-logging/pull/284)) +- fix(deps): update dependency gcp-metadata to ^0.9.0 ([#279](https://github.com/googleapis/nodejs-logging/pull/279)) +- fix(deps): update dependency snakecase-keys to v2 ([#259](https://github.com/googleapis/nodejs-logging/pull/259)) +- refactor: remove async, methmeth, propprop ([#253](https://github.com/googleapis/nodejs-logging/pull/253)) +- fix(deps): update dependency google-proto-files to ^0.17.0 ([#242](https://github.com/googleapis/nodejs-logging/pull/242)) +- chore(deps): update dependency sinon to v7 ([#243](https://github.com/googleapis/nodejs-logging/pull/243)) +- chore(deps): update dependency eslint-plugin-prettier to v3 ([#238](https://github.com/googleapis/nodejs-logging/pull/238)) +- chore(deps): update dependency @google-cloud/pubsub to v0.20.1 ([#236](https://github.com/googleapis/nodejs-logging/pull/236)) +- fix(samples): update dependency @google-cloud/logging-winston to ^0.10.0 ([#235](https://github.com/googleapis/nodejs-logging/pull/235)) + +### Documentation +- docs: update reference documentation + +### Internal / Testing Changes +- chore: update CircleCI config ([#302](https://github.com/googleapis/nodejs-logging/pull/302)) +- chore: remove a few unused deps ([#299](https://github.com/googleapis/nodejs-logging/pull/299)) +- fix: fix system tests by choosing semver range for BigQuery ([#297](https://github.com/googleapis/nodejs-logging/pull/297)) +- fix: disable skipLibCheck in the tsconfig ([#296](https://github.com/googleapis/nodejs-logging/pull/296)) +- refactor(metadata): use async/await ([#295](https://github.com/googleapis/nodejs-logging/pull/295)) +- chore: include build in eslintignore ([#292](https://github.com/googleapis/nodejs-logging/pull/292)) +- fix(tsconfig): disable allowJs, enable declaration ([#288](https://github.com/googleapis/nodejs-logging/pull/288)) +- refactor(ts): convert tests to typescript ([#282](https://github.com/googleapis/nodejs-logging/pull/282)) +- test: fix the system tests with cleanup ([#281](https://github.com/googleapis/nodejs-logging/pull/281)) +- fix(fix): no fix for samples/node_modules ([#278](https://github.com/googleapis/nodejs-logging/pull/278)) +- chore: update github issue templates ([#274](https://github.com/googleapis/nodejs-logging/pull/274)) +- chore: remove old issue template ([#270](https://github.com/googleapis/nodejs-logging/pull/270)) +- build: run tests on node11 ([#268](https://github.com/googleapis/nodejs-logging/pull/268)) +- chore(typescript): convert src/ to typescript ([#258](https://github.com/googleapis/nodejs-logging/pull/258)) +- fix(synth): s.replace import syntax of code samples in autogenerated code ([#266](https://github.com/googleapis/nodejs-logging/pull/266)) +- chore: use gts for samples; jettison prettier ([#255](https://github.com/googleapis/nodejs-logging/pull/255)) +- chores(build): do not collect sponge.xml from windows builds ([#257](https://github.com/googleapis/nodejs-logging/pull/257)) +- chores(build): run codecov on continuous builds ([#256](https://github.com/googleapis/nodejs-logging/pull/256)) +- chore: run gts fix ([#252](https://github.com/googleapis/nodejs-logging/pull/252)) +- refactor: introduce typescript compiler ([#246](https://github.com/googleapis/nodejs-logging/pull/246)) +- fix(test): block auth during public system tests ([#249](https://github.com/googleapis/nodejs-logging/pull/249)) +- build: fix codecov uploading on Kokoro ([#244](https://github.com/googleapis/nodejs-logging/pull/244)) +- test: remove appveyor config ([#234](https://github.com/googleapis/nodejs-logging/pull/234)) + ## v4.0.1 ### Implementation Changes diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d8ec3f8b484..728baccfb2c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.0.1", + "version": "4.1.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 7eaa5f00d950c8f6be6de92ee5d6630b507ef80e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 6 Nov 2018 21:36:43 -0800 Subject: [PATCH 0278/1029] refactor: go back to prettier, use generated gapic tests (#308) --- handwritten/logging/.eslintrc.yml | 3 + handwritten/logging/.prettierignore | 3 + handwritten/logging/.prettierrc | 8 + handwritten/logging/package.json | 7 +- .../src/v2/config_service_v2_client.js | 380 ++++++++--------- .../src/v2/doc/google/api/doc_distribution.js | 34 +- .../src/v2/doc/google/api/doc_label.js | 3 +- .../src/v2/doc/google/api/doc_metric.js | 25 +- .../doc/google/api/doc_monitored_resource.js | 12 +- .../google/logging/type/doc_http_request.js | 11 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 40 +- .../v2/doc/google/logging/v2/doc_logging.js | 53 ++- .../google/logging/v2/doc_logging_config.js | 76 ++-- .../google/logging/v2/doc_logging_metrics.js | 36 +- .../src/v2/doc/google/protobuf/doc_any.js | 2 +- .../v2/doc/google/protobuf/doc_duration.js | 2 +- .../src/v2/doc/google/protobuf/doc_empty.js | 2 +- .../v2/doc/google/protobuf/doc_field_mask.js | 2 +- .../src/v2/doc/google/protobuf/doc_struct.js | 18 +- .../v2/doc/google/protobuf/doc_timestamp.js | 15 +- .../src/v2/logging_service_v2_client.js | 386 ++++++++---------- .../src/v2/metrics_service_v2_client.js | 206 +++++----- handwritten/logging/synth.py | 2 +- .../logging/test/{gapic-v2.ts => gapic-v2.js} | 378 ++++++++++------- 24 files changed, 806 insertions(+), 898 deletions(-) create mode 100644 handwritten/logging/.prettierignore create mode 100644 handwritten/logging/.prettierrc rename handwritten/logging/test/{gapic-v2.ts => gapic-v2.js} (82%) diff --git a/handwritten/logging/.eslintrc.yml b/handwritten/logging/.eslintrc.yml index 2dc11775b79..73eeec27612 100644 --- a/handwritten/logging/.eslintrc.yml +++ b/handwritten/logging/.eslintrc.yml @@ -2,9 +2,12 @@ extends: - 'eslint:recommended' - 'plugin:node/recommended' + - prettier plugins: - node + - prettier rules: + prettier/prettier: error block-scoped-var: error eqeqeq: error no-warning-comments: warn diff --git a/handwritten/logging/.prettierignore b/handwritten/logging/.prettierignore new file mode 100644 index 00000000000..f6fac98b0a8 --- /dev/null +++ b/handwritten/logging/.prettierignore @@ -0,0 +1,3 @@ +node_modules/* +samples/node_modules/* +src/**/doc/* diff --git a/handwritten/logging/.prettierrc b/handwritten/logging/.prettierrc new file mode 100644 index 00000000000..df6eac07446 --- /dev/null +++ b/handwritten/logging/.prettierrc @@ -0,0 +1,8 @@ +--- +bracketSpacing: false +printWidth: 80 +semi: true +singleQuote: true +tabWidth: 2 +trailingComma: es5 +useTabs: false diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 728baccfb2c..165f16c2c78 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,8 +61,8 @@ "lint": "gts check && eslint samples/", "check": "gts check", "clean": "gts clean", - "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build", - "fix": "gts fix && gts fix samples/*.js samples/test/*.js", + "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp test/*.js build/test", + "fix": "gts fix && eslint --fix 'samples/*.js' 'samples/**/*.js'", "prepare": "npm run compile", "pretest": "npm run compile", "posttest": "npm run check" @@ -110,7 +110,9 @@ "bignumber.js": "^7.2.1", "codecov": "^3.0.4", "eslint": "^5.4.0", + "eslint-config-prettier": "^3.1.0", "eslint-plugin-node": "^8.0.0", + "eslint-plugin-prettier": "^3.0.0", "gts": "^0.8.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", @@ -119,6 +121,7 @@ "nock": "^10.0.1", "nyc": "^13.0.1", "power-assert": "^1.6.0", + "prettier": "^1.15.1", "proxyquire": "^2.1.0", "typescript": "~3.1.0", "uuid": "^3.3.2" diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 11e021c3ae5..a81e9d1fc08 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -49,10 +49,8 @@ class ConfigServiceV2Client { * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports - * {@link - * https://developers.google.com/identity/protocols/application-default-credentials - * Application Default Credentials}, your project ID will be detected - * automatically. + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. * @param {string} [options.servicePath] - The domain name of the @@ -63,12 +61,13 @@ class ConfigServiceV2Client { // Ensure that options include the service address and port. opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath: this.constructor.servicePath, - }, - opts); + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts + ); // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. @@ -91,34 +90,51 @@ class ConfigServiceV2Client { // Load the applicable protos. const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging_config.proto')); + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging_config.proto' + ) + ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), - sinkPathTemplate: new gax.PathTemplate('projects/{project}/sinks/{sink}'), - exclusionPathTemplate: - new gax.PathTemplate('projects/{project}/exclusions/{exclusion}'), + projectPathTemplate: new gax.PathTemplate( + 'projects/{project}' + ), + sinkPathTemplate: new gax.PathTemplate( + 'projects/{project}/sinks/{sink}' + ), + exclusionPathTemplate: new gax.PathTemplate( + 'projects/{project}/exclusions/{exclusion}' + ), }; // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listSinks: new gax.PageDescriptor('pageToken', 'nextPageToken', 'sinks'), - listExclusions: - new gax.PageDescriptor('pageToken', 'nextPageToken', 'exclusions'), + listSinks: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'sinks' + ), + listExclusions: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'exclusions' + ), }; // Put together the default options sent with requests. const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.ConfigServiceV2', gapicConfig, opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')}); + 'google.logging.v2.ConfigServiceV2', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -127,8 +143,10 @@ class ConfigServiceV2Client { // Put together the "service stub" for // google.logging.v2.ConfigServiceV2. - const configServiceV2Stub = - gaxGrpc.createStub(protos.google.logging.v2.ConfigServiceV2, opts); + const configServiceV2Stub = gaxGrpc.createStub( + protos.google.logging.v2.ConfigServiceV2, + opts + ); // Iterate over each of the methods that the service provides // and create an API call method for each. @@ -146,11 +164,16 @@ class ConfigServiceV2Client { ]; for (const methodName of configServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( - configServiceV2Stub.then(stub => function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }), - defaults[methodName], this._descriptors.page[methodName]); + configServiceV2Stub.then( + stub => + function() { + const args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); } } @@ -214,40 +237,27 @@ class ConfigServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [LogSink]{@link - google.logging.v2.LogSink}. - * - * When autoPaginate: false is specified through options, it contains the - result - * in a single response. If the response indicates the next page exists, the - third - * parameter is set to be used for the next request object. The fourth - parameter keeps - * the raw response object of an object representing - [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. + * The second parameter to the callback is Array of [LogSink]{@link google.logging.v2.LogSink}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogSink]{@link - google.logging.v2.LogSink}. + * The first element of the array is Array of [LogSink]{@link google.logging.v2.LogSink}. * - * When autoPaginate: false is specified through options, the array has - three elements. - * The first element is Array of [LogSink]{@link google.logging.v2.LogSink} - in a single response. + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogSink]{@link google.logging.v2.LogSink} in a single response. * The second element is the next request object if the response * indicates the next page exists, or null. The third element is - * an object representing [ListSinksResponse]{@link - google.logging.v2.ListSinksResponse}. + * an object representing [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -311,8 +321,7 @@ class ConfigServiceV2Client { * Equivalent to {@link listSinks}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listSinks} continuously - * and invokes the callback registered for 'data' event for each element in - the + * and invokes the callback registered for 'data' event for each element in the * responses. * * The returned object has 'end' method when no more elements are required. @@ -337,14 +346,10 @@ class ConfigServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} - * An object stream which emits an object representing [LogSink]{@link - google.logging.v2.LogSink} on 'data' event. + * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. * * @example * @@ -366,7 +371,10 @@ class ConfigServiceV2Client { options = options || {}; return this._descriptors.page.listSinks.createStream( - this._innerApiCalls.listSinks, request, options); + this._innerApiCalls.listSinks, + request, + options + ); }; /** @@ -384,21 +392,15 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogSink]{@link google.logging.v2.LogSink}. + * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link - google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -449,39 +451,29 @@ class ConfigServiceV2Client { * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. * - * This object should have the same structure as [LogSink]{@link - google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * @param {boolean} [request.uniqueWriterIdentity] - * Optional. Determines the kind of IAM identity returned as - `writer_identity` + * 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 + * sink's parent is a project, then the value returned as `writer_identity` is * the same group or service account used by Logging 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 + * 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 {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogSink]{@link google.logging.v2.LogSink}. + * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link - google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -535,20 +527,15 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} request.sink - * Required. The updated sink, whose name is the same identifier that - appears + * Required. The updated sink, whose name is the same identifier that appears * as part of `sink_name`. * - * This object should have the same structure as [LogSink]{@link - google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * @param {boolean} [request.uniqueWriterIdentity] * Optional. See - * - [sinks.create](https://cloud.google.com/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 + * [sinks.create](https://cloud.google.com/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, @@ -569,29 +556,21 @@ class ConfigServiceV2Client { * empty updateMask will be an error. * * For a detailed `FieldMask` definition, see - * - https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask * * Example: `updateMask=filter`. * - * This object should have the same structure as [FieldMask]{@link - google.protobuf.FieldMask} + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogSink]{@link google.logging.v2.LogSink}. + * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link - google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -643,16 +622,12 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -696,40 +671,27 @@ class ConfigServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [LogExclusion]{@link - google.logging.v2.LogExclusion}. - * - * When autoPaginate: false is specified through options, it contains the - result - * in a single response. If the response indicates the next page exists, the - third - * parameter is set to be used for the next request object. The fourth - parameter keeps - * the raw response object of an object representing - [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. + * The second parameter to the callback is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogExclusion]{@link - google.logging.v2.LogExclusion}. + * The first element of the array is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. * - * When autoPaginate: false is specified through options, the array has - three elements. - * The first element is Array of [LogExclusion]{@link - google.logging.v2.LogExclusion} in a single response. + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogExclusion]{@link google.logging.v2.LogExclusion} in a single response. * The second element is the next request object if the response * indicates the next page exists, or null. The third element is - * an object representing [ListExclusionsResponse]{@link - google.logging.v2.ListExclusionsResponse}. + * an object representing [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -793,8 +755,7 @@ class ConfigServiceV2Client { * Equivalent to {@link listExclusions}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listExclusions} continuously - * and invokes the callback registered for 'data' event for each element in - the + * and invokes the callback registered for 'data' event for each element in the * responses. * * The returned object has 'end' method when no more elements are required. @@ -819,14 +780,10 @@ class ConfigServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} - * An object stream which emits an object representing [LogExclusion]{@link - google.logging.v2.LogExclusion} on 'data' event. + * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. * * @example * @@ -848,7 +805,10 @@ class ConfigServiceV2Client { options = options || {}; return this._descriptors.page.listExclusions.createStream( - this._innerApiCalls.listExclusions, request, options); + this._innerApiCalls.listExclusions, + request, + options + ); }; /** @@ -866,21 +826,15 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -930,24 +884,17 @@ class ConfigServiceV2Client { * Required. The new exclusion, whose `name` parameter is an exclusion name * that is not already used in the parent resource. * - * This object should have the same structure as [LogExclusion]{@link - google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -997,12 +944,10 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} request.exclusion - * Required. New values for the existing exclusion. Only the fields - specified + * Required. New values for the existing exclusion. Only the fields specified * in `update_mask` are relevant. * - * This object should have the same structure as [LogExclusion]{@link - google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} * @param {Object} request.updateMask * Required. A nonempty list of fields to change in the existing exclusion. * New values for the fields are taken from the corresponding fields in the @@ -1012,24 +957,17 @@ class ConfigServiceV2Client { * For example, to change the filter and description of an exclusion, * specify an `update_mask` of `"filter,description"`. * - * This object should have the same structure as [FieldMask]{@link - google.protobuf.FieldMask} + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -1081,16 +1019,12 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -1167,7 +1101,9 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this._pathTemplates.projectPathTemplate + .match(projectName) + .project; } /** @@ -1178,7 +1114,9 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromSinkName(sinkName) { - return this._pathTemplates.sinkPathTemplate.match(sinkName).project; + return this._pathTemplates.sinkPathTemplate + .match(sinkName) + .project; } /** @@ -1189,7 +1127,9 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the sink. */ matchSinkFromSinkName(sinkName) { - return this._pathTemplates.sinkPathTemplate.match(sinkName).sink; + return this._pathTemplates.sinkPathTemplate + .match(sinkName) + .sink; } /** @@ -1200,8 +1140,9 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromExclusionName(exclusionName) { - return this._pathTemplates.exclusionPathTemplate.match(exclusionName) - .project; + return this._pathTemplates.exclusionPathTemplate + .match(exclusionName) + .project; } /** @@ -1212,8 +1153,9 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the exclusion. */ matchExclusionFromExclusionName(exclusionName) { - return this._pathTemplates.exclusionPathTemplate.match(exclusionName) - .exclusion; + return this._pathTemplates.exclusionPathTemplate + .match(exclusionName) + .exclusion; } } diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index 21b0edf7910..dd297f6f840 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -55,15 +55,13 @@ * If specified, contains the range of the population values. The field * must not be present if the `count` is zero. * - * This object should have the same structure as [Range]{@link - * google.api.Range} + * This object should have the same structure as [Range]{@link google.api.Range} * * @property {Object} bucketOptions * Defines the histogram bucket boundaries. If the distribution does not * contain a histogram, then omit this field. * - * This object should have the same structure as [BucketOptions]{@link - * google.api.BucketOptions} + * This object should have the same structure as [BucketOptions]{@link google.api.BucketOptions} * * @property {number[]} bucketCounts * The number of values in each bucket of the histogram, as described in @@ -85,8 +83,7 @@ * @property {Object[]} exemplars * Must be in increasing order of `value` field. * - * This object should have the same structure as [Exemplar]{@link - * google.api.Exemplar} + * This object should have the same structure as [Exemplar]{@link google.api.Exemplar} * * @typedef Distribution * @memberof google.api @@ -109,7 +106,7 @@ const Distribution = { * @see [google.api.Distribution.Range definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Range: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }, /** @@ -132,20 +129,17 @@ const Distribution = { * @property {Object} linearBuckets * The linear bucket. * - * This object should have the same structure as [Linear]{@link - * google.api.Linear} + * This object should have the same structure as [Linear]{@link google.api.Linear} * * @property {Object} exponentialBuckets * The exponential buckets. * - * This object should have the same structure as [Exponential]{@link - * google.api.Exponential} + * This object should have the same structure as [Exponential]{@link google.api.Exponential} * * @property {Object} explicitBuckets * The explicit buckets. * - * This object should have the same structure as [Explicit]{@link - * google.api.Explicit} + * This object should have the same structure as [Explicit]{@link google.api.Explicit} * * @typedef BucketOptions * @memberof google.api @@ -179,7 +173,7 @@ const Distribution = { * @see [google.api.Distribution.BucketOptions.Linear definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Linear: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }, /** @@ -207,7 +201,7 @@ const Distribution = { * @see [google.api.Distribution.BucketOptions.Exponential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Exponential: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }, /** @@ -231,7 +225,7 @@ const Distribution = { * @see [google.api.Distribution.BucketOptions.Explicit definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Explicit: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. } }, @@ -249,8 +243,7 @@ const Distribution = { * @property {Object} timestamp * The observation (sampling) time of the above value. * - * This object should have the same structure as [Timestamp]{@link - * google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object[]} attachments * Contextual information about the example value. Examples are: @@ -265,14 +258,13 @@ const Distribution = { * There may be only a single attachment of any given message type in a * single exemplar, and this is enforced by the system. * - * This object should have the same structure as [Any]{@link - * google.protobuf.Any} + * This object should have the same structure as [Any]{@link google.protobuf.Any} * * @typedef Exemplar * @memberof google.api * @see [google.api.Distribution.Exemplar definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} */ Exemplar: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. } }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_label.js b/handwritten/logging/src/v2/doc/google/api/doc_label.js index a8e77f843b4..b26faacb2d3 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_label.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_label.js @@ -24,8 +24,7 @@ * @property {number} valueType * The type of data that can be assigned to the label. * - * The number should be among the values of [ValueType]{@link - * google.api.ValueType} + * The number should be among the values of [ValueType]{@link google.api.ValueType} * * @property {string} description * A human-readable description for the label. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index 4c30483fd2d..ec52c27bf2a 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -41,22 +41,19 @@ * you can look at latencies for successful responses or just * for responses that failed. * - * This object should have the same structure as [LabelDescriptor]{@link - * google.api.LabelDescriptor} + * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} * * @property {number} metricKind * Whether the metric records instantaneous values, changes to a value, etc. * Some combinations of `metric_kind` and `value_type` might not be supported. * - * The number should be among the values of [MetricKind]{@link - * google.api.MetricKind} + * The number should be among the values of [MetricKind]{@link google.api.MetricKind} * * @property {number} valueType * Whether the measurement is an integer, a floating-point number, etc. * Some combinations of `metric_kind` and `value_type` might not be supported. * - * The number should be among the values of [ValueType]{@link - * google.api.ValueType} + * The number should be among the values of [ValueType]{@link google.api.ValueType} * * @property {string} unit * The unit in which the metric value is reported. It is only applicable @@ -137,8 +134,7 @@ * @property {Object} metadata * Optional. Metadata which can be used to guide usage of the metric. * - * This object should have the same structure as - * [MetricDescriptorMetadata]{@link google.api.MetricDescriptorMetadata} + * This object should have the same structure as [MetricDescriptorMetadata]{@link google.api.MetricDescriptorMetadata} * * @typedef MetricDescriptor * @memberof google.api @@ -153,8 +149,7 @@ const MetricDescriptor = { * @property {number} launchStage * The launch stage of the metric definition. * - * The number should be among the values of [LaunchStage]{@link - * google.api.LaunchStage} + * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} * * @property {Object} samplePeriod * The sampling period of metric data points. For metrics which are written @@ -162,23 +157,21 @@ const MetricDescriptor = { * excluding data loss due to errors. Metrics with a higher granularity have * a smaller sampling period. * - * This object should have the same structure as [Duration]{@link - * google.protobuf.Duration} + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * * @property {Object} ingestDelay * The delay of data points caused by ingestion. Data points older than this * age are guaranteed to be ingested and available to be read, excluding * data loss due to errors. * - * This object should have the same structure as [Duration]{@link - * google.protobuf.Duration} + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * * @typedef MetricDescriptorMetadata * @memberof google.api * @see [google.api.MetricDescriptor.MetricDescriptorMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} */ MetricDescriptorMetadata: { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }, /** @@ -278,5 +271,5 @@ const MetricDescriptor = { * @see [google.api.Metric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} */ const Metric = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 0fd0057412b..5c185bc5cdc 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -54,15 +54,14 @@ * resource type. For example, an individual Google Cloud SQL database is * identified by values for the labels `"database_id"` and `"zone"`. * - * This object should have the same structure as [LabelDescriptor]{@link - * google.api.LabelDescriptor} + * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} * * @typedef MonitoredResourceDescriptor * @memberof google.api * @see [google.api.MonitoredResourceDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ const MonitoredResourceDescriptor = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -95,7 +94,7 @@ const MonitoredResourceDescriptor = { * @see [google.api.MonitoredResource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ const MonitoredResource = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -118,8 +117,7 @@ const MonitoredResource = { * "security_group": ["a", "b", "c"], * "spot_instance": false } * - * This object should have the same structure as [Struct]{@link - * google.protobuf.Struct} + * This object should have the same structure as [Struct]{@link google.protobuf.Struct} * * @property {Object.} userLabels * Output only. A map of user-defined metadata labels. @@ -129,5 +127,5 @@ const MonitoredResource = { * @see [google.api.MonitoredResourceMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} */ const MonitoredResourceMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js index 6245d1f675c..ab569a284f5 100644 --- a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js +++ b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js @@ -42,8 +42,7 @@ * * @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)"`. + * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. * * @property {string} remoteIp * The IP address (IPv4 or IPv6) of the client that issued the HTTP @@ -55,15 +54,13 @@ * * @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). + * [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). * * @property {Object} latency * The request processing latency on the server, from the time the request was * received until the response was sent. * - * This object should have the same structure as [Duration]{@link - * google.protobuf.Duration} + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * * @property {boolean} cacheLookup * Whether or not a cache lookup was attempted. @@ -89,5 +86,5 @@ * @see [google.logging.type.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/type/http_request.proto} */ const HttpRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index 0ad7429d0b7..2ccd1e2ac30 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -48,16 +48,14 @@ * associated with the monitored resource designating the particular * database that reported the error. * - * This object should have the same structure as [MonitoredResource]{@link - * google.api.MonitoredResource} + * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * * @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. * - * This object should have the same structure as [Any]{@link - * google.protobuf.Any} + * This object should have the same structure as [Any]{@link google.protobuf.Any} * * @property {string} textPayload * The log entry payload, represented as a Unicode string (UTF-8). @@ -66,8 +64,7 @@ * The log entry payload, represented as a structure that is * expressed as a JSON object. * - * This object should have the same structure as [Struct]{@link - * google.protobuf.Struct} + * This object should have the same structure as [Struct]{@link google.protobuf.Struct} * * @property {Object} timestamp * Optional. The time the event described by the log entry occurred. @@ -78,27 +75,24 @@ * seconds might be omitted when the timestamp is displayed. * * Incoming log entries should have timestamps that are no more than - * the [logs retention period](https://cloud.google.com/logging/quotas) in the - * past, and no more than 24 hours in the future. Log entries outside those time + * the [logs retention period](https://cloud.google.com/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time * boundaries will not be available when calling `entries.list`, but * those log entries can still be exported with * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * - * This object should have the same structure as [Timestamp]{@link - * google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object} receiveTimestamp * Output only. The time the log entry was received by Logging. * - * This object should have the same structure as [Timestamp]{@link - * google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {number} severity * Optional. The severity of the log entry. The default value is * `LogSeverity.DEFAULT`. * - * The number should be among the values of [LogSeverity]{@link - * google.logging.type.LogSeverity} + * The number should be among the values of [LogSeverity]{@link google.logging.type.LogSeverity} * * @property {string} insertId * Optional. A unique identifier for the log entry. If you provide a value, @@ -112,8 +106,7 @@ * Optional. Information about the HTTP request associated with this * log entry, if applicable. * - * This object should have the same structure as [HttpRequest]{@link - * google.logging.type.HttpRequest} + * This object should have the same structure as [HttpRequest]{@link google.logging.type.HttpRequest} * * @property {Object.} labels * Optional. A set of user-defined (key, value) data that provides additional @@ -124,15 +117,13 @@ * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have * this field populated. * - * This object should have the same structure as - * [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} + * This object should have the same structure as [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} * * @property {Object} operation * Optional. Information about an operation associated with the log entry, if * applicable. * - * This object should have the same structure as [LogEntryOperation]{@link - * google.logging.v2.LogEntryOperation} + * This object should have the same structure as [LogEntryOperation]{@link google.logging.v2.LogEntryOperation} * * @property {string} trace * Optional. Resource name of the trace associated with the log entry, if any. @@ -158,15 +149,14 @@ * Optional. Source code location information associated with the log entry, * if any. * - * This object should have the same structure as - * [LogEntrySourceLocation]{@link google.logging.v2.LogEntrySourceLocation} + * This object should have the same structure as [LogEntrySourceLocation]{@link google.logging.v2.LogEntrySourceLocation} * * @typedef LogEntry * @memberof google.logging.v2 * @see [google.logging.v2.LogEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ const LogEntry = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -193,7 +183,7 @@ const LogEntry = { * @see [google.logging.v2.LogEntryOperation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ const LogEntryOperation = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -221,5 +211,5 @@ const LogEntryOperation = { * @see [google.logging.v2.LogEntrySourceLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} */ const LogEntrySourceLocation = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index d66601658a6..2dc88eb9c01 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -37,7 +37,7 @@ * @see [google.logging.v2.DeleteLogRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const DeleteLogRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -72,8 +72,7 @@ const DeleteLogRequest = { * * See LogEntry. * - * This object should have the same structure as [MonitoredResource]{@link - * google.api.MonitoredResource} + * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * * @property {Object.} labels * Optional. Default labels that are added to the `labels` field of all log @@ -96,18 +95,17 @@ const DeleteLogRequest = { * the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be exported with + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to - * `entries.write`, you should try to include several log entries in this list, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, + * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * - * This object should have the same structure as [LogEntry]{@link - * google.logging.v2.LogEntry} + * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} * * @property {boolean} partialSuccess * Optional. Whether valid entries should be written even if some other @@ -126,7 +124,7 @@ const DeleteLogRequest = { * @see [google.logging.v2.WriteLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const WriteLogEntriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -137,7 +135,7 @@ const WriteLogEntriesRequest = { * @see [google.logging.v2.WriteLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const WriteLogEntriesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -156,7 +154,7 @@ const WriteLogEntriesResponse = { * @see [google.logging.v2.WriteLogEntriesPartialErrors definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const WriteLogEntriesPartialErrors = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -182,11 +180,12 @@ const WriteLogEntriesPartialErrors = { * * @property {string} filter * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/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. + * Logs Filters](https://cloud.google.com/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} orderBy * Optional. How the results should be sorted. Presently, the only permitted @@ -212,7 +211,7 @@ const WriteLogEntriesPartialErrors = { * @see [google.logging.v2.ListLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListLogEntriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -223,8 +222,7 @@ const ListLogEntriesRequest = { * returned, indicating that more entries may exist. See `nextPageToken` for * more information. * - * This object should have the same structure as [LogEntry]{@link - * google.logging.v2.LogEntry} + * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} * * @property {string} nextPageToken * If there might be more results than those appearing in this response, then @@ -243,7 +241,7 @@ const ListLogEntriesRequest = { * @see [google.logging.v2.ListLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListLogEntriesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -265,7 +263,7 @@ const ListLogEntriesResponse = { * @see [google.logging.v2.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListMonitoredResourceDescriptorsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -274,8 +272,7 @@ const ListMonitoredResourceDescriptorsRequest = { * @property {Object[]} resourceDescriptors * A list of resource descriptors. * - * This object should have the same structure as - * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} + * This object should have the same structure as [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} * * @property {string} nextPageToken * If there might be more results than those appearing in this response, then @@ -287,7 +284,7 @@ const ListMonitoredResourceDescriptorsRequest = { * @see [google.logging.v2.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListMonitoredResourceDescriptorsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -317,7 +314,7 @@ const ListMonitoredResourceDescriptorsResponse = { * @see [google.logging.v2.ListLogsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListLogsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -338,5 +335,5 @@ const ListLogsRequest = { * @see [google.logging.v2.ListLogsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} */ const ListLogsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index 032515e2843..a8bb50852a5 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -39,15 +39,13 @@ * 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](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * [Exporting Logs With Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * @property {string} filter * Optional. - * An [advanced logs - * filter](https://cloud.google.com/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. For example: + * An [advanced logs filter](https://cloud.google.com/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. For example: * * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR * @@ -55,8 +53,7 @@ * Deprecated. The log entry format to use for this sink's exported log * entries. The v2 format is used by default and cannot be changed. * - * The number should be among the values of [VersionFormat]{@link - * google.logging.v2.VersionFormat} + * The number should be among the values of [VersionFormat]{@link google.logging.v2.VersionFormat} * * @property {string} writerIdentity * Output only. An IAM identity—a service account or group—under @@ -92,14 +89,12 @@ * @property {Object} startTime * Deprecated. This field is ignored when creating or updating sinks. * - * This object should have the same structure as [Timestamp]{@link - * google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object} endTime * Deprecated. This field is ignored when creating or updating sinks. * - * This object should have the same structure as [Timestamp]{@link - * google.protobuf.Timestamp} + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @typedef LogSink * @memberof google.logging.v2 @@ -162,7 +157,7 @@ const LogSink = { * @see [google.logging.v2.ListSinksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const ListSinksRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -171,8 +166,7 @@ const ListSinksRequest = { * @property {Object[]} sinks * A list of sinks. * - * This object should have the same structure as [LogSink]{@link - * google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * * @property {string} nextPageToken * If there might be more results than appear in this response, then @@ -184,7 +178,7 @@ const ListSinksRequest = { * @see [google.logging.v2.ListSinksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const ListSinksResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -205,7 +199,7 @@ const ListSinksResponse = { * @see [google.logging.v2.GetSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const GetSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -225,8 +219,7 @@ const GetSinkRequest = { * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. * - * This object should have the same structure as [LogSink]{@link - * google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * * @property {boolean} uniqueWriterIdentity * Optional. Determines the kind of IAM identity returned as `writer_identity` @@ -246,7 +239,7 @@ const GetSinkRequest = { * @see [google.logging.v2.CreateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const CreateSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -267,8 +260,7 @@ const CreateSinkRequest = { * Required. The updated sink, whose name is the same identifier that appears * as part of `sink_name`. * - * This object should have the same structure as [LogSink]{@link - * google.logging.v2.LogSink} + * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * * @property {boolean} uniqueWriterIdentity * Optional. See @@ -300,15 +292,14 @@ const CreateSinkRequest = { * * Example: `updateMask=filter`. * - * This object should have the same structure as [FieldMask]{@link - * google.protobuf.FieldMask} + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * * @typedef UpdateSinkRequest * @memberof google.logging.v2 * @see [google.logging.v2.UpdateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const UpdateSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -330,7 +321,7 @@ const UpdateSinkRequest = { * @see [google.logging.v2.DeleteSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const DeleteSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -351,10 +342,9 @@ const DeleteSinkRequest = { * * @property {string} filter * Required. - * An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced_filters#sample), + * An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) + * that matches the log entries to be excluded. By using the + * [sample function](https://cloud.google.com/logging/docs/view/advanced_filters#sample), * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: @@ -372,7 +362,7 @@ const DeleteSinkRequest = { * @see [google.logging.v2.LogExclusion definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const LogExclusion = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -402,7 +392,7 @@ const LogExclusion = { * @see [google.logging.v2.ListExclusionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const ListExclusionsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -411,8 +401,7 @@ const ListExclusionsRequest = { * @property {Object[]} exclusions * A list of exclusions. * - * This object should have the same structure as [LogExclusion]{@link - * google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} * * @property {string} nextPageToken * If there might be more results than appear in this response, then @@ -424,7 +413,7 @@ const ListExclusionsRequest = { * @see [google.logging.v2.ListExclusionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const ListExclusionsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -445,7 +434,7 @@ const ListExclusionsResponse = { * @see [google.logging.v2.GetExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const GetExclusionRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -465,15 +454,14 @@ const GetExclusionRequest = { * Required. The new exclusion, whose `name` parameter is an exclusion name * that is not already used in the parent resource. * - * This object should have the same structure as [LogExclusion]{@link - * google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} * * @typedef CreateExclusionRequest * @memberof google.logging.v2 * @see [google.logging.v2.CreateExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const CreateExclusionRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -493,8 +481,7 @@ const CreateExclusionRequest = { * Required. New values for the existing exclusion. Only the fields specified * in `update_mask` are relevant. * - * This object should have the same structure as [LogExclusion]{@link - * google.logging.v2.LogExclusion} + * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} * * @property {Object} updateMask * Required. A nonempty list of fields to change in the existing exclusion. @@ -505,15 +492,14 @@ const CreateExclusionRequest = { * For example, to change the filter and description of an exclusion, * specify an `update_mask` of `"filter,description"`. * - * This object should have the same structure as [FieldMask]{@link - * google.protobuf.FieldMask} + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * * @typedef UpdateExclusionRequest * @memberof google.logging.v2 * @see [google.logging.v2.UpdateExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const UpdateExclusionRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -534,5 +520,5 @@ const UpdateExclusionRequest = { * @see [google.logging.v2.DeleteExclusionRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} */ const DeleteExclusionRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index b00cb05746c..730702b0287 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -45,9 +45,9 @@ * Optional. A description of this metric, which is used in documentation. * * @property {string} filter - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is - * used to match log entries. Example: + * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) + * which is used to match log entries. + * Example: * * "resource.type=gae_app AND severity>=ERROR" * @@ -76,8 +76,7 @@ * `metric_descriptor`, but existing labels cannot be modified except for * their description. * - * This object should have the same structure as [MetricDescriptor]{@link - * google.api.MetricDescriptor} + * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} * * @property {string} valueExtractor * Optional. A `value_extractor` is required when using a distribution @@ -121,15 +120,13 @@ * using a DISTRIBUTION value type and it describes the bucket boundaries * used to create a histogram of the extracted values. * - * This object should have the same structure as [BucketOptions]{@link - * google.api.BucketOptions} + * This object should have the same structure as [BucketOptions]{@link google.api.BucketOptions} * * @property {number} version * Deprecated. The API version that created or updated this metric. * The v2 format is used by default and cannot be changed. * - * The number should be among the values of [ApiVersion]{@link - * google.logging.v2.ApiVersion} + * The number should be among the values of [ApiVersion]{@link google.logging.v2.ApiVersion} * * @typedef LogMetric * @memberof google.logging.v2 @@ -182,7 +179,7 @@ const LogMetric = { * @see [google.logging.v2.ListLogMetricsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const ListLogMetricsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -191,8 +188,7 @@ const ListLogMetricsRequest = { * @property {Object[]} metrics * A list of logs-based metrics. * - * This object should have the same structure as [LogMetric]{@link - * google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * * @property {string} nextPageToken * If there might be more results than appear in this response, then @@ -204,7 +200,7 @@ const ListLogMetricsRequest = { * @see [google.logging.v2.ListLogMetricsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const ListLogMetricsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -220,7 +216,7 @@ const ListLogMetricsResponse = { * @see [google.logging.v2.GetLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const GetLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -237,15 +233,14 @@ const GetLogMetricRequest = { * The new logs-based metric, which must not have an identifier that * already exists. * - * This object should have the same structure as [LogMetric]{@link - * google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * * @typedef CreateLogMetricRequest * @memberof google.logging.v2 * @see [google.logging.v2.CreateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const CreateLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -263,15 +258,14 @@ const CreateLogMetricRequest = { * @property {Object} metric * The updated metric. * - * This object should have the same structure as [LogMetric]{@link - * google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * * @typedef UpdateLogMetricRequest * @memberof google.logging.v2 * @see [google.logging.v2.UpdateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const UpdateLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -287,5 +281,5 @@ const UpdateLogMetricRequest = { * @see [google.logging.v2.DeleteLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} */ const DeleteLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index 16fe013b4ae..3accb1fc0d8 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -132,5 +132,5 @@ * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} */ const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js index 45300868e1b..c03ce2fb3df 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js @@ -93,5 +93,5 @@ * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} */ const Duration = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js index 3175bad1fc4..b1d6b5e32a9 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js @@ -30,5 +30,5 @@ * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} */ const Empty = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js index f9f9c79a4df..0cb35328962 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -232,5 +232,5 @@ * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} */ const FieldMask = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js index 35c1bb31069..ddf7e5c95dc 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js @@ -33,7 +33,7 @@ * @see [google.protobuf.Struct definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ const Struct = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -47,8 +47,7 @@ const Struct = { * @property {number} nullValue * Represents a null value. * - * The number should be among the values of [NullValue]{@link - * google.protobuf.NullValue} + * The number should be among the values of [NullValue]{@link google.protobuf.NullValue} * * @property {number} numberValue * Represents a double value. @@ -62,21 +61,19 @@ const Struct = { * @property {Object} structValue * Represents a structured value. * - * This object should have the same structure as [Struct]{@link - * google.protobuf.Struct} + * This object should have the same structure as [Struct]{@link google.protobuf.Struct} * * @property {Object} listValue * Represents a repeated `Value`. * - * This object should have the same structure as [ListValue]{@link - * google.protobuf.ListValue} + * This object should have the same structure as [ListValue]{@link google.protobuf.ListValue} * * @typedef Value * @memberof google.protobuf * @see [google.protobuf.Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ const Value = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** @@ -87,15 +84,14 @@ const Value = { * @property {Object[]} values * Repeated field of dynamically typed values. * - * This object should have the same structure as [Value]{@link - * google.protobuf.Value} + * This object should have the same structure as [Value]{@link google.protobuf.Value} * * @typedef ListValue * @memberof google.protobuf * @see [google.protobuf.ListValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} */ const ListValue = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; /** diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index 0ac0d301d54..1ebe2e6e1a5 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -26,8 +26,7 @@ * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. * By restricting to that range, we ensure that we can convert to * and from RFC 3339 date strings. - * See - * [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). * * # Examples * @@ -88,13 +87,11 @@ * 01:30 UTC on January 15, 2017. * * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] + * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com + * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) + * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one + * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- * ) to obtain a formatter capable of generating timestamps in this format. * @@ -114,5 +111,5 @@ * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} */ const Timestamp = { - // This is for documentation. Actual contents will be loaded by gRPC. + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 7776a5284b0..50a1084ee64 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -49,10 +49,8 @@ class LoggingServiceV2Client { * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports - * {@link - * https://developers.google.com/identity/protocols/application-default-credentials - * Application Default Credentials}, your project ID will be detected - * automatically. + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. * @param {string} [options.servicePath] - The domain name of the @@ -63,12 +61,13 @@ class LoggingServiceV2Client { // Ensure that options include the service address and port. opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath: this.constructor.servicePath, - }, - opts); + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts + ); // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. @@ -91,56 +90,74 @@ class LoggingServiceV2Client { // Load the applicable protos. const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging.proto')); + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging.proto' + ) + ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - logPathTemplate: new gax.PathTemplate('projects/{project}/logs/{log}'), - projectPathTemplate: new gax.PathTemplate('projects/{project}'), + logPathTemplate: new gax.PathTemplate( + 'projects/{project}/logs/{log}' + ), + projectPathTemplate: new gax.PathTemplate( + 'projects/{project}' + ), }; // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listLogEntries: - new gax.PageDescriptor('pageToken', 'nextPageToken', 'entries'), + listLogEntries: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'entries' + ), listMonitoredResourceDescriptors: new gax.PageDescriptor( - 'pageToken', 'nextPageToken', 'resourceDescriptors'), - listLogs: - new gax.PageDescriptor('pageToken', 'nextPageToken', 'logNames'), + 'pageToken', + 'nextPageToken', + 'resourceDescriptors' + ), + listLogs: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'logNames' + ), }; let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( - path.join( - __dirname, '..', '..', 'protos', 'google/logging/v2/logging.proto'), - protoFilesRoot); + path.join(__dirname, '..', '..', 'protos', 'google/logging/v2/logging.proto'), + protoFilesRoot + ); // Some methods on this API support automatically batching // requests; denote this. this._descriptors.batching = { writeLogEntries: new gax.BundleDescriptor( - 'entries', - [ - 'logName', - 'resource', - 'labels', - ], - null, - gax.createByteLengthFunction( - protoFilesRoot.lookup('google.logging.v2.LogEntry'))), + 'entries', + [ + 'logName', + 'resource', + 'labels', + ], + null, + gax.createByteLengthFunction(protoFilesRoot.lookup('google.logging.v2.LogEntry')) + ), }; // Put together the default options sent with requests. const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.LoggingServiceV2', gapicConfig, opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')}); + 'google.logging.v2.LoggingServiceV2', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -149,8 +166,10 @@ class LoggingServiceV2Client { // Put together the "service stub" for // google.logging.v2.LoggingServiceV2. - const loggingServiceV2Stub = - gaxGrpc.createStub(protos.google.logging.v2.LoggingServiceV2, opts); + const loggingServiceV2Stub = gaxGrpc.createStub( + protos.google.logging.v2.LoggingServiceV2, + opts + ); // Iterate over each of the methods that the service provides // and create an API call method for each. @@ -163,13 +182,16 @@ class LoggingServiceV2Client { ]; for (const methodName of loggingServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( - loggingServiceV2Stub.then(stub => function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }), - defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.batching[methodName]); + loggingServiceV2Stub.then( + stub => + function() { + const args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] || this._descriptors.batching[methodName] + ); } } @@ -232,21 +254,16 @@ class LoggingServiceV2Client { * * `[LOG_ID]` must be URL-encoded. For example, * `"projects/my-project-id/logs/syslog"`, - * - `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * For more information about log names, see * LogEntry. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -291,28 +308,23 @@ class LoggingServiceV2Client { * LogEntry type. * * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, - respectively. - * The supplied values are chosen so that, among the log entries that did - not + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in - the past or more than + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. * However, those log entries can still be exported with - * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to - `entries.write`, + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, * rather than calling this method for each individual log entry. * - * This object should have the same structure as [LogEntry]{@link - google.logging.v2.LogEntry} + * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} * @param {string} [request.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`: @@ -325,8 +337,7 @@ class LoggingServiceV2Client { * `[LOG_ID]` must be URL-encoded. For example: * * "projects/my-project-id/logs/syslog" - * - "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" * * The permission logging.logEntries.create is needed on each * project, organization, billing account, or folder that is receiving @@ -342,12 +353,10 @@ class LoggingServiceV2Client { * * See LogEntry. * - * This object should have the same structure as [MonitoredResource]{@link - google.api.MonitoredResource} + * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * @param {Object.} [request.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 + * 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. * @param {boolean} [request.partialSuccess] @@ -361,21 +370,15 @@ class LoggingServiceV2Client { * entries won't be persisted nor exported. Useful for checking whether the * logging API endpoints are working properly before sending valuable data. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -423,31 +426,24 @@ class LoggingServiceV2Client { * * Projects listed in the `project_ids` field are added to this list. * @param {string[]} [request.projectIds] - * Deprecated. Use `resource_names` instead. One or more project - identifiers + * 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`. * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See - [Advanced - * Logs - Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only - log entries that - * match the filter are returned. An empty filter matches all log entries - in + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Filters](https://cloud.google.com/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. * @param {string} [request.orderBy] - * Optional. How the results should be sorted. Presently, the only - permitted + * 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 + * `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 their `insert_id` values. * @param {number} [request.pageSize] @@ -457,40 +453,27 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [LogEntry]{@link - google.logging.v2.LogEntry}. - * - * When autoPaginate: false is specified through options, it contains the - result - * in a single response. If the response indicates the next page exists, the - third - * parameter is set to be used for the next request object. The fourth - parameter keeps - * the raw response object of an object representing - [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. + * The second parameter to the callback is Array of [LogEntry]{@link google.logging.v2.LogEntry}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogEntry]{@link - google.logging.v2.LogEntry}. + * The first element of the array is Array of [LogEntry]{@link google.logging.v2.LogEntry}. * - * When autoPaginate: false is specified through options, the array has - three elements. - * The first element is Array of [LogEntry]{@link - google.logging.v2.LogEntry} in a single response. + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogEntry]{@link google.logging.v2.LogEntry} in a single response. * The second element is the next request object if the response * indicates the next page exists, or null. The third element is - * an object representing [ListLogEntriesResponse]{@link - google.logging.v2.ListLogEntriesResponse}. + * an object representing [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -554,8 +537,7 @@ class LoggingServiceV2Client { * Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listLogEntries} continuously - * and invokes the callback registered for 'data' event for each element in - the + * and invokes the callback registered for 'data' event for each element in the * responses. * * The returned object has 'end' method when no more elements are required. @@ -577,31 +559,24 @@ class LoggingServiceV2Client { * * Projects listed in the `project_ids` field are added to this list. * @param {string[]} [request.projectIds] - * Deprecated. Use `resource_names` instead. One or more project - identifiers + * 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`. * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See - [Advanced - * Logs - Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only - log entries that - * match the filter are returned. An empty filter matches all log entries - in + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Filters](https://cloud.google.com/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. * @param {string} [request.orderBy] - * Optional. How the results should be sorted. Presently, the only - permitted + * 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 + * `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 their `insert_id` values. * @param {number} [request.pageSize] @@ -611,14 +586,10 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} - * An object stream which emits an object representing [LogEntry]{@link - google.logging.v2.LogEntry} on 'data' event. + * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. * * @example * @@ -640,7 +611,10 @@ class LoggingServiceV2Client { options = options || {}; return this._descriptors.page.listLogEntries.createStream( - this._innerApiCalls.listLogEntries, request, options); + this._innerApiCalls.listLogEntries, + request, + options + ); }; /** @@ -655,41 +629,27 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of - [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. - * - * When autoPaginate: false is specified through options, it contains the - result - * in a single response. If the response indicates the next page exists, the - third - * parameter is set to be used for the next request object. The fourth - parameter keeps - * the raw response object of an object representing - [ListMonitoredResourceDescriptorsResponse]{@link - google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + * The second parameter to the callback is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of - [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. * - * When autoPaginate: false is specified through options, the array has - three elements. - * The first element is Array of [MonitoredResourceDescriptor]{@link - google.api.MonitoredResourceDescriptor} in a single response. + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} in a single response. * The second element is the next request object if the response * indicates the next page exists, or null. The third element is - * an object representing [ListMonitoredResourceDescriptorsResponse]{@link - google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + * an object representing [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -726,8 +686,7 @@ class LoggingServiceV2Client { * } * if (nextRequest) { * // Fetch the next page. - * return client.listMonitoredResourceDescriptors(nextRequest, - options).then(callback); + * return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); * } * } * client.listMonitoredResourceDescriptors({}, options) @@ -743,18 +702,14 @@ class LoggingServiceV2Client { } options = options || {}; - return this._innerApiCalls.listMonitoredResourceDescriptors( - request, options, callback); + return this._innerApiCalls.listMonitoredResourceDescriptors(request, options, callback); } /** - * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a - NodeJS Stream object. + * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object. * - * This fetches the paged responses for {@link - listMonitoredResourceDescriptors} continuously - * and invokes the callback registered for 'data' event for each element in - the + * This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously + * and invokes the callback registered for 'data' event for each element in the * responses. * * The returned object has 'end' method when no more elements are required. @@ -772,15 +727,10 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} - * An object stream which emits an object representing - [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} - on 'data' event. + * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. * * @example * @@ -802,7 +752,10 @@ class LoggingServiceV2Client { options = options || {}; return this._descriptors.page.listMonitoredResourceDescriptors.createStream( - this._innerApiCalls.listMonitoredResourceDescriptors, request, options); + this._innerApiCalls.listMonitoredResourceDescriptors, + request, + options + ); }; /** @@ -825,37 +778,27 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is Array of string. * - * When autoPaginate: false is specified through options, it contains the - result - * in a single response. If the response indicates the next page exists, the - third - * parameter is set to be used for the next request object. The fourth - parameter keeps - * the raw response object of an object representing - [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of string. * - * When autoPaginate: false is specified through options, the array has - three elements. + * When autoPaginate: false is specified through options, the array has three elements. * The first element is Array of string in a single response. * The second element is the next request object if the response * indicates the next page exists, or null. The third element is - * an object representing [ListLogsResponse]{@link - google.logging.v2.ListLogsResponse}. + * an object representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -919,8 +862,7 @@ class LoggingServiceV2Client { * Equivalent to {@link listLogs}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listLogs} continuously - * and invokes the callback registered for 'data' event for each element in - the + * and invokes the callback registered for 'data' event for each element in the * responses. * * The returned object has 'end' method when no more elements are required. @@ -945,11 +887,8 @@ class LoggingServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} * An object stream which emits a string on 'data' event. * @@ -973,7 +912,10 @@ class LoggingServiceV2Client { options = options || {}; return this._descriptors.page.listLogs.createStream( - this._innerApiCalls.listLogs, request, options); + this._innerApiCalls.listLogs, + request, + options + ); }; // -------------------- @@ -1014,7 +956,9 @@ class LoggingServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromLogName(logName) { - return this._pathTemplates.logPathTemplate.match(logName).project; + return this._pathTemplates.logPathTemplate + .match(logName) + .project; } /** @@ -1025,7 +969,9 @@ class LoggingServiceV2Client { * @returns {String} - A string representing the log. */ matchLogFromLogName(logName) { - return this._pathTemplates.logPathTemplate.match(logName).log; + return this._pathTemplates.logPathTemplate + .match(logName) + .log; } /** @@ -1036,7 +982,9 @@ class LoggingServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this._pathTemplates.projectPathTemplate + .match(projectName) + .project; } } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 27bf23c76cf..f53966813c3 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -48,10 +48,8 @@ class MetricsServiceV2Client { * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports - * {@link - * https://developers.google.com/identity/protocols/application-default-credentials - * Application Default Credentials}, your project ID will be detected - * automatically. + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. * @param {string} [options.servicePath] - The domain name of the @@ -62,12 +60,13 @@ class MetricsServiceV2Client { // Ensure that options include the service address and port. opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath: this.constructor.servicePath, - }, - opts); + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts + ); // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. @@ -90,32 +89,43 @@ class MetricsServiceV2Client { // Load the applicable protos. const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging_metrics.proto')); + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/logging/v2/logging_metrics.proto' + ) + ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), - metricPathTemplate: - new gax.PathTemplate('projects/{project}/metrics/{metric}'), + projectPathTemplate: new gax.PathTemplate( + 'projects/{project}' + ), + metricPathTemplate: new gax.PathTemplate( + 'projects/{project}/metrics/{metric}' + ), }; // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listLogMetrics: - new gax.PageDescriptor('pageToken', 'nextPageToken', 'metrics'), + listLogMetrics: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'metrics' + ), }; // Put together the default options sent with requests. const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.MetricsServiceV2', gapicConfig, opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')}); + 'google.logging.v2.MetricsServiceV2', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -124,8 +134,10 @@ class MetricsServiceV2Client { // Put together the "service stub" for // google.logging.v2.MetricsServiceV2. - const metricsServiceV2Stub = - gaxGrpc.createStub(protos.google.logging.v2.MetricsServiceV2, opts); + const metricsServiceV2Stub = gaxGrpc.createStub( + protos.google.logging.v2.MetricsServiceV2, + opts + ); // Iterate over each of the methods that the service provides // and create an API call method for each. @@ -138,11 +150,16 @@ class MetricsServiceV2Client { ]; for (const methodName of metricsServiceV2StubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( - metricsServiceV2Stub.then(stub => function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }), - defaults[methodName], this._descriptors.page[methodName]); + metricsServiceV2Stub.then( + stub => + function() { + const args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); } } @@ -203,40 +220,27 @@ class MetricsServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is Array of [LogMetric]{@link - google.logging.v2.LogMetric}. - * - * When autoPaginate: false is specified through options, it contains the - result - * in a single response. If the response indicates the next page exists, the - third - * parameter is set to be used for the next request object. The fourth - parameter keeps - * the raw response object of an object representing - [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. + * The second parameter to the callback is Array of [LogMetric]{@link google.logging.v2.LogMetric}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogMetric]{@link - google.logging.v2.LogMetric}. + * The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}. * - * When autoPaginate: false is specified through options, the array has - three elements. - * The first element is Array of [LogMetric]{@link - google.logging.v2.LogMetric} in a single response. + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogMetric]{@link google.logging.v2.LogMetric} in a single response. * The second element is the next request object if the response * indicates the next page exists, or null. The third element is - * an object representing [ListLogMetricsResponse]{@link - google.logging.v2.ListLogMetricsResponse}. + * an object representing [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. * - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -300,8 +304,7 @@ class MetricsServiceV2Client { * Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object. * * This fetches the paged responses for {@link listLogMetrics} continuously - * and invokes the callback registered for 'data' event for each element in - the + * and invokes the callback registered for 'data' event for each element in the * responses. * * The returned object has 'end' method when no more elements are required. @@ -323,14 +326,10 @@ class MetricsServiceV2Client { * performed per-page, this determines the maximum number of * resources in a page. * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @returns {Stream} - * An object stream which emits an object representing [LogMetric]{@link - google.logging.v2.LogMetric} on 'data' event. + * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. * * @example * @@ -352,7 +351,10 @@ class MetricsServiceV2Client { options = options || {}; return this._descriptors.page.listLogMetrics.createStream( - this._innerApiCalls.listLogMetrics, request, options); + this._innerApiCalls.listLogMetrics, + request, + options + ); }; /** @@ -365,21 +367,15 @@ class MetricsServiceV2Client { * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogMetric]{@link google.logging.v2.LogMetric}. + * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -424,24 +420,17 @@ class MetricsServiceV2Client { * The new logs-based metric, which must not have an identifier that * already exists. * - * This object should have the same structure as [LogMetric]{@link - google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogMetric]{@link google.logging.v2.LogMetric}. + * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -492,24 +481,17 @@ class MetricsServiceV2Client { * @param {Object} request.metric * The updated metric. * - * This object should have the same structure as [LogMetric]{@link - google.logging.v2.LogMetric} + * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing - [LogMetric]{@link google.logging.v2.LogMetric}. + * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -554,16 +536,12 @@ class MetricsServiceV2Client { * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, - e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link - https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the - details. + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - call. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -626,7 +604,9 @@ class MetricsServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this._pathTemplates.projectPathTemplate + .match(projectName) + .project; } /** @@ -637,7 +617,9 @@ class MetricsServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromMetricName(metricName) { - return this._pathTemplates.metricPathTemplate.match(metricName).project; + return this._pathTemplates.metricPathTemplate + .match(metricName) + .project; } /** @@ -648,7 +630,9 @@ class MetricsServiceV2Client { * @returns {String} - A string representing the metric. */ matchMetricFromMetricName(metricName) { - return this._pathTemplates.metricPathTemplate.match(metricName).metric; + return this._pathTemplates.metricPathTemplate + .match(metricName) + .metric; } } diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index dac8771734d..e705b204dce 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -51,7 +51,7 @@ # Copy in templated files common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() +templates = common_templates.node_library(source_location='build/src') s.copy(templates) # Node.js specific cleanup diff --git a/handwritten/logging/test/gapic-v2.ts b/handwritten/logging/test/gapic-v2.js similarity index 82% rename from handwritten/logging/test/gapic-v2.ts rename to handwritten/logging/test/gapic-v2.js index f1a22bb02fd..b5319a6ae01 100644 --- a/handwritten/logging/test/gapic-v2.ts +++ b/handwritten/logging/test/gapic-v2.js @@ -14,14 +14,13 @@ 'use strict'; -import * as assert from 'assert'; -import {ApiError} from '@google-cloud/common'; +const assert = require('assert'); const loggingModule = require('../src'); const FAKE_STATUS_CODE = 1; const error = new Error(); -(error as ApiError).code = FAKE_STATUS_CODE; +error.code = FAKE_STATUS_CODE; describe('LoggingServiceV2Client', () => { describe('deleteLog', () => { @@ -59,8 +58,11 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteLog = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( + request, + null, + error + ); client.deleteLog(request, err => { assert(err instanceof Error); @@ -80,15 +82,17 @@ describe('LoggingServiceV2Client', () => { // Mock request const entries = []; const request = { - entries, + entries: entries, }; // Mock response const expectedResponse = {}; // Mock Grpc layer - client._innerApiCalls.writeLogEntries = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.writeLogEntries(request, (err, response) => { assert.ifError(err); @@ -106,12 +110,15 @@ describe('LoggingServiceV2Client', () => { // Mock request const entries = []; const request = { - entries, + entries: entries, }; // Mock Grpc layer - client._innerApiCalls.writeLogEntries = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( + request, + null, + error + ); client.writeLogEntries(request, (err, response) => { assert(err instanceof Error); @@ -140,16 +147,15 @@ describe('LoggingServiceV2Client', () => { const entriesElement = {}; const entries = [entriesElement]; const expectedResponse = { - nextPageToken, - entries, + nextPageToken: nextPageToken, + entries: entries, }; // Mock Grpc layer - client._innerApiCalls.listLogEntries = - (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.entries); - }; + client._innerApiCalls.listLogEntries = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.entries); + }; client.listLogEntries(request, (err, response) => { assert.ifError(err); @@ -171,8 +177,11 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogEntries = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listLogEntries = mockSimpleGrpcMethod( + request, + null, + error + ); client.listLogEntries(request, (err, response) => { assert(err instanceof Error); @@ -198,16 +207,15 @@ describe('LoggingServiceV2Client', () => { const resourceDescriptorsElement = {}; const resourceDescriptors = [resourceDescriptorsElement]; const expectedResponse = { - nextPageToken, - resourceDescriptors, + nextPageToken: nextPageToken, + resourceDescriptors: resourceDescriptors, }; // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = - (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.resourceDescriptors); - }; + client._innerApiCalls.listMonitoredResourceDescriptors = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.resourceDescriptors); + }; client.listMonitoredResourceDescriptors(request, (err, response) => { assert.ifError(err); @@ -226,8 +234,11 @@ describe('LoggingServiceV2Client', () => { const request = {}; // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listMonitoredResourceDescriptors = mockSimpleGrpcMethod( + request, + null, + error + ); client.listMonitoredResourceDescriptors(request, (err, response) => { assert(err instanceof Error); @@ -256,8 +267,8 @@ describe('LoggingServiceV2Client', () => { const logNamesElement = 'logNamesElement-1079688374'; const logNames = [logNamesElement]; const expectedResponse = { - nextPageToken, - logNames, + nextPageToken: nextPageToken, + logNames: logNames, }; // Mock Grpc layer @@ -286,8 +297,11 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogs = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listLogs = mockSimpleGrpcMethod( + request, + null, + error + ); client.listLogs(request, (err, response) => { assert(err instanceof Error); @@ -297,6 +311,7 @@ describe('LoggingServiceV2Client', () => { }); }); }); + }); describe('ConfigServiceV2Client', () => { describe('listSinks', () => { @@ -317,8 +332,8 @@ describe('ConfigServiceV2Client', () => { const sinksElement = {}; const sinks = [sinksElement]; const expectedResponse = { - nextPageToken, - sinks, + nextPageToken: nextPageToken, + sinks: sinks, }; // Mock Grpc layer @@ -347,8 +362,11 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listSinks = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listSinks = mockSimpleGrpcMethod( + request, + null, + error + ); client.listSinks(request, (err, response) => { assert(err instanceof Error); @@ -379,16 +397,18 @@ describe('ConfigServiceV2Client', () => { const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { - name, - destination, - filter, - writerIdentity, - includeChildren, + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, }; // Mock Grpc layer - client._innerApiCalls.getSink = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.getSink = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.getSink(request, (err, response) => { assert.ifError(err); @@ -410,8 +430,11 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getSink = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getSink = mockSimpleGrpcMethod( + request, + null, + error + ); client.getSink(request, (err, response) => { assert(err instanceof Error); @@ -434,7 +457,7 @@ describe('ConfigServiceV2Client', () => { const sink = {}; const request = { parent: formattedParent, - sink, + sink: sink, }; // Mock response @@ -444,16 +467,18 @@ describe('ConfigServiceV2Client', () => { const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { - name, - destination, - filter, - writerIdentity, - includeChildren, + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, }; // Mock Grpc layer - client._innerApiCalls.createSink = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.createSink = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.createSink(request, (err, response) => { assert.ifError(err); @@ -473,12 +498,15 @@ describe('ConfigServiceV2Client', () => { const sink = {}; const request = { parent: formattedParent, - sink, + sink: sink, }; // Mock Grpc layer - client._innerApiCalls.createSink = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.createSink = mockSimpleGrpcMethod( + request, + null, + error + ); client.createSink(request, (err, response) => { assert(err instanceof Error); @@ -501,7 +529,7 @@ describe('ConfigServiceV2Client', () => { const sink = {}; const request = { sinkName: formattedSinkName, - sink, + sink: sink, }; // Mock response @@ -511,16 +539,18 @@ describe('ConfigServiceV2Client', () => { const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { - name, - destination, - filter, - writerIdentity, - includeChildren, + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, }; // Mock Grpc layer - client._innerApiCalls.updateSink = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.updateSink(request, (err, response) => { assert.ifError(err); @@ -540,12 +570,15 @@ describe('ConfigServiceV2Client', () => { const sink = {}; const request = { sinkName: formattedSinkName, - sink, + sink: sink, }; // Mock Grpc layer - client._innerApiCalls.updateSink = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + request, + null, + error + ); client.updateSink(request, (err, response) => { assert(err instanceof Error); @@ -591,8 +624,11 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteSink = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( + request, + null, + error + ); client.deleteSink(request, err => { assert(err instanceof Error); @@ -620,16 +656,15 @@ describe('ConfigServiceV2Client', () => { const exclusionsElement = {}; const exclusions = [exclusionsElement]; const expectedResponse = { - nextPageToken, - exclusions, + nextPageToken: nextPageToken, + exclusions: exclusions, }; // Mock Grpc layer - client._innerApiCalls.listExclusions = - (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.exclusions); - }; + client._innerApiCalls.listExclusions = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.exclusions); + }; client.listExclusions(request, (err, response) => { assert.ifError(err); @@ -651,8 +686,11 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listExclusions = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listExclusions = mockSimpleGrpcMethod( + request, + null, + error + ); client.listExclusions(request, (err, response) => { assert(err instanceof Error); @@ -683,14 +721,16 @@ describe('ConfigServiceV2Client', () => { const disabled = true; const expectedResponse = { name: name2, - description, - filter, - disabled, + description: description, + filter: filter, + disabled: disabled, }; // Mock Grpc layer - client._innerApiCalls.getExclusion = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.getExclusion(request, (err, response) => { assert.ifError(err); @@ -712,8 +752,11 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getExclusion = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); client.getExclusion(request, (err, response) => { assert(err instanceof Error); @@ -736,7 +779,7 @@ describe('ConfigServiceV2Client', () => { const exclusion = {}; const request = { parent: formattedParent, - exclusion, + exclusion: exclusion, }; // Mock response @@ -745,15 +788,17 @@ describe('ConfigServiceV2Client', () => { const filter = 'filter-1274492040'; const disabled = true; const expectedResponse = { - name, - description, - filter, - disabled, + name: name, + description: description, + filter: filter, + disabled: disabled, }; // Mock Grpc layer - client._innerApiCalls.createExclusion = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.createExclusion(request, (err, response) => { assert.ifError(err); @@ -773,12 +818,15 @@ describe('ConfigServiceV2Client', () => { const exclusion = {}; const request = { parent: formattedParent, - exclusion, + exclusion: exclusion, }; // Mock Grpc layer - client._innerApiCalls.createExclusion = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); client.createExclusion(request, (err, response) => { assert(err instanceof Error); @@ -802,8 +850,8 @@ describe('ConfigServiceV2Client', () => { const updateMask = {}; const request = { name: formattedName, - exclusion, - updateMask, + exclusion: exclusion, + updateMask: updateMask, }; // Mock response @@ -813,14 +861,16 @@ describe('ConfigServiceV2Client', () => { const disabled = true; const expectedResponse = { name: name2, - description, - filter, - disabled, + description: description, + filter: filter, + disabled: disabled, }; // Mock Grpc layer - client._innerApiCalls.updateExclusion = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.updateExclusion(request, (err, response) => { assert.ifError(err); @@ -841,13 +891,16 @@ describe('ConfigServiceV2Client', () => { const updateMask = {}; const request = { name: formattedName, - exclusion, - updateMask, + exclusion: exclusion, + updateMask: updateMask, }; // Mock Grpc layer - client._innerApiCalls.updateExclusion = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); client.updateExclusion(request, (err, response) => { assert(err instanceof Error); @@ -893,8 +946,11 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteExclusion = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); client.deleteExclusion(request, err => { assert(err instanceof Error); @@ -903,6 +959,7 @@ describe('ConfigServiceV2Client', () => { }); }); }); + }); describe('MetricsServiceV2Client', () => { describe('listLogMetrics', () => { @@ -923,16 +980,15 @@ describe('MetricsServiceV2Client', () => { const metricsElement = {}; const metrics = [metricsElement]; const expectedResponse = { - nextPageToken, - metrics, + nextPageToken: nextPageToken, + metrics: metrics, }; // Mock Grpc layer - client._innerApiCalls.listLogMetrics = - (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.metrics); - }; + client._innerApiCalls.listLogMetrics = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.metrics); + }; client.listLogMetrics(request, (err, response) => { assert.ifError(err); @@ -954,8 +1010,11 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogMetrics = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listLogMetrics = mockSimpleGrpcMethod( + request, + null, + error + ); client.listLogMetrics(request, (err, response) => { assert(err instanceof Error); @@ -985,15 +1044,17 @@ describe('MetricsServiceV2Client', () => { const filter = 'filter-1274492040'; const valueExtractor = 'valueExtractor2047672534'; const expectedResponse = { - name, - description, - filter, - valueExtractor, + name: name, + description: description, + filter: filter, + valueExtractor: valueExtractor, }; // Mock Grpc layer - client._innerApiCalls.getLogMetric = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.getLogMetric(request, (err, response) => { assert.ifError(err); @@ -1015,8 +1076,11 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.getLogMetric = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); client.getLogMetric(request, (err, response) => { assert(err instanceof Error); @@ -1039,7 +1103,7 @@ describe('MetricsServiceV2Client', () => { const metric = {}; const request = { parent: formattedParent, - metric, + metric: metric, }; // Mock response @@ -1048,15 +1112,17 @@ describe('MetricsServiceV2Client', () => { const filter = 'filter-1274492040'; const valueExtractor = 'valueExtractor2047672534'; const expectedResponse = { - name, - description, - filter, - valueExtractor, + name: name, + description: description, + filter: filter, + valueExtractor: valueExtractor, }; // Mock Grpc layer - client._innerApiCalls.createLogMetric = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.createLogMetric(request, (err, response) => { assert.ifError(err); @@ -1076,12 +1142,15 @@ describe('MetricsServiceV2Client', () => { const metric = {}; const request = { parent: formattedParent, - metric, + metric: metric, }; // Mock Grpc layer - client._innerApiCalls.createLogMetric = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); client.createLogMetric(request, (err, response) => { assert(err instanceof Error); @@ -1104,7 +1173,7 @@ describe('MetricsServiceV2Client', () => { const metric = {}; const request = { metricName: formattedMetricName, - metric, + metric: metric, }; // Mock response @@ -1113,15 +1182,17 @@ describe('MetricsServiceV2Client', () => { const filter = 'filter-1274492040'; const valueExtractor = 'valueExtractor2047672534'; const expectedResponse = { - name, - description, - filter, - valueExtractor, + name: name, + description: description, + filter: filter, + valueExtractor: valueExtractor, }; // Mock Grpc layer - client._innerApiCalls.updateLogMetric = - mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse + ); client.updateLogMetric(request, (err, response) => { assert.ifError(err); @@ -1141,12 +1212,15 @@ describe('MetricsServiceV2Client', () => { const metric = {}; const request = { metricName: formattedMetricName, - metric, + metric: metric, }; // Mock Grpc layer - client._innerApiCalls.updateLogMetric = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); client.updateLogMetric(request, (err, response) => { assert(err instanceof Error); @@ -1192,8 +1266,11 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteLogMetric = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); client.deleteLogMetric(request, err => { assert(err instanceof Error); @@ -1202,10 +1279,11 @@ describe('MetricsServiceV2Client', () => { }); }); }); + }); -function mockSimpleGrpcMethod(expectedRequest, response?, error?) { - return (actualRequest, options, callback) => { +function mockSimpleGrpcMethod(expectedRequest, response, error) { + return function(actualRequest, options, callback) { assert.deepStrictEqual(actualRequest, expectedRequest); if (error) { callback(error); From d5977743c007eda6b17edf9cb699937fd39eed56 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 6 Nov 2018 21:48:44 -0800 Subject: [PATCH 0279/1029] refactor(ts): use es imports and exports (#307) --- handwritten/logging/src/entry.ts | 6 ++---- handwritten/logging/src/index.ts | 19 ++++++++--------- handwritten/logging/src/log.ts | 14 ++++++------- handwritten/logging/src/metadata.ts | 2 -- handwritten/logging/src/sink.ts | 10 ++++----- handwritten/logging/system-test/logging.ts | 24 ++++++++++++++-------- handwritten/logging/test/entry.ts | 4 +--- handwritten/logging/test/index.ts | 5 ++--- handwritten/logging/test/log.ts | 8 +++----- handwritten/logging/test/metadata.ts | 2 -- handwritten/logging/test/sink.ts | 6 ++---- 11 files changed, 44 insertions(+), 56 deletions(-) diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index a7a93e30ed0..057f7b8cca5 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -'use strict'; - import {Service} from '@google-cloud/common-grpc'; // tslint:disable-next-line variable-name const EventId = require('eventid'); @@ -85,7 +83,7 @@ const eventId = new EventId(); class Entry { metadata; data; - constructor(metadata, data) { + constructor(metadata?, data?) { /** * @name Entry#metadata * @type {object} @@ -174,4 +172,4 @@ class Entry { * @name module:@google-cloud/logging.Entry * @see Entry */ -module.exports.Entry = Entry; +export {Entry}; diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index c65db876e89..b33be78c942 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -14,16 +14,15 @@ * limitations under the License. */ -'use strict'; - -import * as arrify from 'arrify'; import * as common from '@google-cloud/common-grpc'; -import {promisifyAll} from '@google-cloud/promisify'; import {paginator} from '@google-cloud/paginator'; import {replaceProjectIdToken} from '@google-cloud/projectify'; +import {promisifyAll} from '@google-cloud/promisify'; +import * as arrify from 'arrify'; import * as extend from 'extend'; import {GoogleAuth} from 'google-auth-library'; import * as is from 'is'; + const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; import * as through from 'through2'; @@ -36,9 +35,9 @@ export {HttpRequest}; const PKG = require('../../package.json'); const v2 = require('./v2'); -const {Entry} = require('./entry'); -const {Log} = require('./log'); -const {Sink} = require('./sink'); +import {Entry} from './entry'; +import {Log} from './log'; +import {Sink} from './sink'; /** * @namespace google @@ -913,7 +912,7 @@ promisifyAll(Logging, { * @see Entry * @type {Constructor} */ -module.exports.Entry = Entry; +export {Entry}; /** * {@link Log} class. @@ -922,7 +921,7 @@ module.exports.Entry = Entry; * @see Log * @type {Constructor} */ -module.exports.Log = Log; +export {Log}; /** * {@link Sink} class. @@ -931,7 +930,7 @@ module.exports.Log = Log; * @see Sink * @type {Constructor} */ -module.exports.Sink = Sink; +export {Sink}; /** * The default export of the `@google-cloud/logging` package is the diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index d0df519e87c..e36277866a9 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -14,10 +14,8 @@ * limitations under the License. */ -'use strict'; - -import * as arrify from 'arrify'; import {promisifyAll} from '@google-cloud/promisify'; +import * as arrify from 'arrify'; import * as extend from 'extend'; import * as is from 'is'; @@ -25,7 +23,7 @@ import {getDefaultResource} from './metadata'; const snakeCaseKeys = require('snakecase-keys'); -const {Entry} = require('./entry'); +import {Entry} from './entry'; /** * A log is a named collection of entries, each entry representing a timestamped @@ -204,7 +202,7 @@ class Log { * region_tag:logging_delete_log * Another example: */ - delete(gaxOptions, callback) { + delete(gaxOptions, callback?) { if (is.fn(gaxOptions)) { callback = gaxOptions; gaxOptions = {}; @@ -387,7 +385,7 @@ class Log { * const entries = data[0]; * }); */ - getEntries(options, callback) { + getEntries(options, callback?) { if (is.function(options)) { callback = options; @@ -633,7 +631,7 @@ class Log { * region_tag:logging_write_log_entry_advanced * Another example: */ - write(entry, options, callback) { + write(entry, options?, callback?) { const self = this; if (is.fn(options)) { callback = options; @@ -753,4 +751,4 @@ class Log { * @name module:@google-cloud/logging.Log * @see Log */ - module.exports.Log = Log; + export {Log}; diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 462d75504c8..d5831674dac 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -'use strict'; - import * as fs from 'fs'; import * as gcpMetadata from 'gcp-metadata'; import {GoogleAuth} from 'google-auth-library'; diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 44b71f885ab..24ea72a8a8a 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -'use strict'; - import * as common from '@google-cloud/common-grpc'; import {promisifyAll} from '@google-cloud/promisify'; import * as extend from 'extend'; @@ -93,7 +91,7 @@ class Sink { * region_tag:logging_create_sink * Another example: */ - create(config, callback) { + create(config, callback?) { this.logging.createSink(this.name, config, callback); } @@ -257,7 +255,7 @@ class Sink { * const apiResponse = data[0]; * }); */ - setFilter(filter, callback) { + setFilter(filter, callback?) { this.setMetadata( { filter, @@ -311,7 +309,7 @@ class Sink { * region_tag:logging_update_sink * Another example: */ - setMetadata(metadata, callback) { + setMetadata(metadata, callback?) { const self = this; callback = callback || common.util.noop; this.getMetadata((err, currentMetadata, apiResponse) => { @@ -353,4 +351,4 @@ promisifyAll(Sink); * @name module:@google-cloud/logging.Sink * @see Sink */ -module.exports.Sink = Sink; +export {Sink}; diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 89e6fec01fd..89b526bb13d 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -92,7 +92,8 @@ describe('Logging', () => { describe('sinks', () => { it('should create a sink with a Bucket destination', async () => { const sink = logging.sink(generateName()); - const [_, apiResponse] = await sink.create({ + // tslint:disable-next-line no-any + const [_, apiResponse] = await (sink as any).create({ destination: bucket, }); const destination = 'storage.googleapis.com/' + bucket.name; @@ -101,11 +102,13 @@ describe('Logging', () => { it('should create a sink with a Dataset destination', async () => { const sink = logging.sink(generateName()); - const [_, apiResponse] = await sink.create( - { - destination: dataset, - }, - ); + // tslint:disable-next-line no-any + const [_, apiResponse] = await (sink as any) + .create( + { + destination: dataset, + }, + ); const destination = `bigquery.googleapis.com/datasets/${dataset.id}`; @@ -118,7 +121,8 @@ describe('Logging', () => { it('should create a sink with a Topic destination', async () => { const sink = logging.sink(generateName()); - const [_, apiResponse] = await sink.create({destination: topic}); + // tslint:disable-next-line no-any + const [_, apiResponse] = await (sink as any).create({destination: topic}); const destination = 'pubsub.googleapis.com/' + topic.name; // The projectId may have been replaced depending on how the system @@ -138,12 +142,14 @@ describe('Logging', () => { it('should set metadata', async () => { const metadata = {filter: FILTER}; - const [apiResponse] = await sink.setMetadata(metadata); + // tslint:disable-next-line no-any + const [apiResponse] = await (sink as any).setMetadata(metadata); assert.strictEqual(apiResponse.filter, FILTER); }); it('should set a filter', async () => { - const [apiResponse] = await sink.setFilter(FILTER); + // tslint:disable-next-line no-any + const [apiResponse] = await (sink as any).setFilter(FILTER); assert.strictEqual(apiResponse.filter, FILTER); }); }); diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index db17f624837..7795ab78ac1 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -14,11 +14,9 @@ * limitations under the License. */ -'use strict'; - +import {Service, util} from '@google-cloud/common-grpc'; import * as assert from 'assert'; import * as extend from 'extend'; -import {Service, util} from '@google-cloud/common-grpc'; import * as proxyquire from 'proxyquire'; class FakeGrpcService { diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 0654d373457..fa4792c81ff 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -14,14 +14,13 @@ * limitations under the License. */ -'use strict'; - +import {util} from '@google-cloud/common-grpc'; import * as arrify from 'arrify'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as through from 'through2'; -import {util} from '@google-cloud/common-grpc'; + const {v2} = require('../src'); const PKG = require('../../package.json'); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 2b9f00bd6cc..3b8f4910b96 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -14,13 +14,11 @@ * limitations under the License. */ -'use strict'; - +import {util} from '@google-cloud/common-grpc'; +import * as promisify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; -import {util} from '@google-cloud/common-grpc'; -import * as promisify from '@google-cloud/promisify'; let promisifed = false; const fakePromisify = extend({}, promisify, { @@ -33,7 +31,7 @@ const fakePromisify = extend({}, promisify, { }, }); -const {Entry} = require('../src'); +import {Entry} from '../src'; const originalGetDefaultResource = async () => { return 'very-fake-resource'; diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 6de4c7c4f57..f81b1022684 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -'use strict'; - import * as assert from 'assert'; import BigNumber from 'bignumber.js'; import * as extend from 'extend'; diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index a4651b2644f..d7f550edf52 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -14,13 +14,11 @@ * limitations under the License. */ -'use strict'; - +import {util} from '@google-cloud/common-grpc'; +import * as promisify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; -import * as promisify from '@google-cloud/promisify'; -import {util} from '@google-cloud/common-grpc'; let promisifed = false; const fakePromisify = extend({}, promisify, { From 74e7464d4c4c2217666cb87575919f968ee711c8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 7 Nov 2018 08:41:19 -0800 Subject: [PATCH 0280/1029] fix(deps): update dependency through2 to v3 (#311) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 165f16c2c78..14f2f744241 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -87,7 +87,7 @@ "pumpify": "^1.5.1", "snakecase-keys": "^2.0.0", "stream-events": "^1.0.4", - "through2": "^2.0.3" + "through2": "^3.0.0" }, "devDependencies": { "@google-cloud/bigquery": "^2.0.1", From 67aa3f354b95e37df58873a2e0536799009cb5e0 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Wed, 7 Nov 2018 12:59:16 -0800 Subject: [PATCH 0281/1029] docs: update directory for docs generation (#312) --- handwritten/logging/.jsdoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index d8294e327bd..2b829d399ba 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -31,7 +31,7 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'src' + 'build/src' ], includePattern: '\\.js$' }, From 1e89b2a496040ead95b423de37dee8f0d261969a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 7 Nov 2018 13:30:36 -0800 Subject: [PATCH 0282/1029] chore(build): use the latest npm on windows for tests (#304) --- handwritten/logging/.kokoro/test.bat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handwritten/logging/.kokoro/test.bat b/handwritten/logging/.kokoro/test.bat index d60473666b0..93010a81425 100644 --- a/handwritten/logging/.kokoro/test.bat +++ b/handwritten/logging/.kokoro/test.bat @@ -17,8 +17,7 @@ cd /d %~dp0 cd .. -call npm install -g npm@5 || goto :error - +call npm install -g npm@latest || goto :error call npm install || goto :error call npm run test || goto :error From f7e9146001530824f0927a44e725eff4b42d354f Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 7 Nov 2018 13:53:23 -0800 Subject: [PATCH 0283/1029] chore: use latest npm on Windows (#313) --- handwritten/logging/.kokoro/test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/.kokoro/test.bat b/handwritten/logging/.kokoro/test.bat index 93010a81425..767320757e0 100644 --- a/handwritten/logging/.kokoro/test.bat +++ b/handwritten/logging/.kokoro/test.bat @@ -1,4 +1,4 @@ -@rem Copyright 2018 gRPC authors. +@rem Copyright 2018 Google LLC. All rights reserved. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. From bc881060e14027b36eb65d75e6b5928cf44440e1 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 9 Nov 2018 10:01:17 -0800 Subject: [PATCH 0284/1029] chore: drop contributors from multiple places (#316) --- handwritten/logging/.mailmap | 6 ------ handwritten/logging/CONTRIBUTORS | 23 ----------------------- handwritten/logging/package.json | 20 -------------------- 3 files changed, 49 deletions(-) delete mode 100644 handwritten/logging/.mailmap delete mode 100644 handwritten/logging/CONTRIBUTORS diff --git a/handwritten/logging/.mailmap b/handwritten/logging/.mailmap deleted file mode 100644 index 2a355f2feb5..00000000000 --- a/handwritten/logging/.mailmap +++ /dev/null @@ -1,6 +0,0 @@ -Jason Dobry Jason Dobry -Jason Dobry Jason Dobry -Luke Sneeringer Luke Sneeringer -Stephen Sawchuk Stephen -Stephen Sawchuk Stephen Sawchuk -Stephen Sawchuk Stephen Sawchuk diff --git a/handwritten/logging/CONTRIBUTORS b/handwritten/logging/CONTRIBUTORS deleted file mode 100644 index 0e5910881c7..00000000000 --- a/handwritten/logging/CONTRIBUTORS +++ /dev/null @@ -1,23 +0,0 @@ -# The names of individuals who have contributed to this project. -# -# Names are formatted as: -# name -# -Ace Nassri -Alexander Fenster -Ali Ijaz Sheikh -Bill Prin -Cristian Cavalli -Dave Gramlich -Eric Uldall -Ernest Landrito -Jason Dobry -Josh Ferge -Jun Mukai -Justin Beckwith -Luke Sneeringer -Song Wang -Stephen Sawchuk -Takashi Matsuo -Tim Swast -greenkeeper[bot] diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 14f2f744241..8bf22b85419 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -29,26 +29,6 @@ "stackdriver logging", "stackdriver" ], - "contributors": [ - "Ace Nassri ", - "Alexander Fenster ", - "Ali Ijaz Sheikh ", - "Bill Prin ", - "Cristian Cavalli ", - "Dave Gramlich ", - "Eric Uldall ", - "Ernest Landrito ", - "Jason Dobry ", - "Josh Ferge ", - "Jun Mukai ", - "Justin Beckwith ", - "Luke Sneeringer ", - "Song Wang ", - "Stephen Sawchuk ", - "Takashi Matsuo ", - "Tim Swast ", - "greenkeeper[bot] " - ], "scripts": { "cover": "nyc --reporter=lcov mocha build/test/*.js build/test/**/*.js build/test/**/**/*.js && nyc report", "test-no-cover": "mocha build/test/*.js", From 73f3338a27c857604149ae2ac04b322596ae7c00 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 10 Nov 2018 10:50:21 -0800 Subject: [PATCH 0285/1029] chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 (#318) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8bf22b85419..95e7ee36aa4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -71,7 +71,7 @@ }, "devDependencies": { "@google-cloud/bigquery": "^2.0.1", - "@google-cloud/nodejs-repo-tools": "^2.3.3", + "@google-cloud/nodejs-repo-tools": "^3.0.0", "@google-cloud/pubsub": "^0.20.1", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", From 81716bb1ed7c6f3844768b6627e2722584b4f066 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 11 Nov 2018 15:08:23 -0800 Subject: [PATCH 0286/1029] chore(deps): update dependency @types/is to v0.0.21 (#315) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 95e7ee36aa4..024a1ff9d79 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -77,7 +77,7 @@ "@types/arrify": "^1.0.4", "@types/express": "^4.16.0", "@types/extend": "^3.0.0", - "@types/is": "0.0.20", + "@types/is": "0.0.21", "@types/mocha": "^5.2.5", "@types/nock": "^9.3.0", "@types/on-finished": "^2.3.1", From 40c70a7e7d5c1d9b2569d53e42d73b354ac441ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 11 Nov 2018 17:27:44 -0800 Subject: [PATCH 0287/1029] chore(deps): update dependency bignumber.js to v8 (#301) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 024a1ff9d79..b84c8035c88 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -87,7 +87,7 @@ "@types/through2": "^2.0.34", "@types/uuid": "^3.4.4", "assert-rejects": "^1.0.0", - "bignumber.js": "^7.2.1", + "bignumber.js": "^8.0.0", "codecov": "^3.0.4", "eslint": "^5.4.0", "eslint-config-prettier": "^3.1.0", From 6f73dde06d8f3c8ed10fa7c4af9df1c389af692d Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Sun, 11 Nov 2018 17:35:52 -0800 Subject: [PATCH 0288/1029] refactor(ts): generate logging types from proto (#314) --- handwritten/logging/package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b84c8035c88..a4a4322bef1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -45,7 +45,9 @@ "fix": "gts fix && eslint --fix 'samples/*.js' 'samples/**/*.js'", "prepare": "npm run compile", "pretest": "npm run compile", - "posttest": "npm run check" + "posttest": "npm run check", + "proto": "npm run proto:logging", + "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files -o proto/logging.js google/logging/v2/logging.proto && pbts -o proto/logging.d.ts proto/logging.js" }, "dependencies": { "@google-cloud/common-grpc": "^0.9.2", @@ -93,6 +95,7 @@ "eslint-config-prettier": "^3.1.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", + "google-proto-files": "^0.17.0", "gts": "^0.8.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", From 899346f9dc59ec5a809ce973f640a2753c458f8a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 12 Nov 2018 15:54:52 -0800 Subject: [PATCH 0289/1029] chore: update eslintignore config (#320) --- handwritten/logging/.eslintignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore index f08b0fd1c65..2f642cb6044 100644 --- a/handwritten/logging/.eslintignore +++ b/handwritten/logging/.eslintignore @@ -1,4 +1,3 @@ -node_modules/* -samples/node_modules/* +**/node_modules src/**/doc/* build/ From 90308e227e1d036f19fbd608bcc886151fa57aa2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 13 Nov 2018 08:04:51 -0800 Subject: [PATCH 0290/1029] chore(deps): update dependency gts to ^0.9.0 (#321) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a4a4322bef1..033d276716f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -96,7 +96,7 @@ "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^0.17.0", - "gts": "^0.8.0", + "gts": "^0.9.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", From a148f77413d46a68f849b8937d41c614ac91f604 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 15 Nov 2018 09:00:12 -0800 Subject: [PATCH 0291/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.21.0 (#324) --- handwritten/logging/package.json | 2 +- handwritten/logging/system-test/logging.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 033d276716f..9d2217e44f7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.20.1", + "@google-cloud/pubsub": "^0.21.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/express": "^4.16.0", diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 89b526bb13d..9210679548d 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -19,8 +19,7 @@ const {BigQuery} = require('@google-cloud/bigquery'); import * as extend from 'extend'; import * as is from 'is'; import * as nock from 'nock'; -// tslint:disable-next-line variable-name -const PubSub = require('@google-cloud/pubsub'); +const {PubSub} = require('@google-cloud/pubsub'); import {Storage} from '@google-cloud/storage'; import * as uuid from 'uuid'; import {Logging} from '../src'; From f9119c7182faeb13af0ddd86639ebc6dd6014a76 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 15 Nov 2018 11:20:52 -0800 Subject: [PATCH 0292/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.7 (#322) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9d2217e44f7..7725aabea74 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -54,7 +54,7 @@ "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.3.0", - "@opencensus/propagation-stackdriver": "0.0.6", + "@opencensus/propagation-stackdriver": "0.0.7", "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", From 0fd3a0d319010b7645341ce9f702e7c27081c266 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 16 Nov 2018 14:04:51 -0800 Subject: [PATCH 0293/1029] fix(deps): update dependency google-gax to ^0.22.0 (#323) --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7725aabea74..3856ee63493 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -60,7 +60,7 @@ "extend": "^3.0.2", "gcp-metadata": "^0.9.0", "google-auth-library": "^2.0.0", - "google-gax": "^0.20.0", + "google-gax": "^0.22.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", @@ -95,7 +95,7 @@ "eslint-config-prettier": "^3.1.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", - "google-proto-files": "^0.17.0", + "google-proto-files": "^0.18.0", "gts": "^0.9.0", "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", "intelli-espower-loader": "^1.0.1", From 5c0383b210a9466abeaae7ba5bd551b8941cf3c8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Mon, 19 Nov 2018 11:00:00 -0800 Subject: [PATCH 0294/1029] chore: add synth.metadata chore: add synth.metadata --- handwritten/logging/synth.metadata | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 handwritten/logging/synth.metadata diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata new file mode 100644 index 00000000000..f26e69af884 --- /dev/null +++ b/handwritten/logging/synth.metadata @@ -0,0 +1,27 @@ +{ + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "5a57f0c13a358b2b15452bf2d67453774a5f6d4f", + "internalRef": "221837528" + } + }, + { + "git": { + "name": "googleapis-private", + "remote": "https://github.com/googleapis/googleapis-private.git", + "sha": "6aa8e1a447bb8d0367150356a28cb4d3f2332641", + "internalRef": "221340946" + } + }, + { + "generator": { + "name": "artman", + "version": "0.16.0", + "dockerImage": "googleapis/artman@sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b" + } + } + ] +} \ No newline at end of file From f93286697809bb471d07b740b42e73ef5556d66c Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Sat, 1 Dec 2018 18:42:16 -0800 Subject: [PATCH 0295/1029] fix(build): fix system key decryption (#332) --- handwritten/logging/.circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml index 6735ebdaaa1..86c63432242 100644 --- a/handwritten/logging/.circleci/config.yml +++ b/handwritten/logging/.circleci/config.yml @@ -116,7 +116,7 @@ jobs: name: Decrypt credentials. command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - openssl aes-256-cbc -d -in .circleci/key.json.enc \ + openssl aes-256-cbc -d -md md5 -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" fi @@ -148,7 +148,7 @@ jobs: command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then for encrypted_key in .circleci/*.json.enc; do - openssl aes-256-cbc -d -in $encrypted_key \ + openssl aes-256-cbc -d -md md5 -in $encrypted_key \ -out $(echo $encrypted_key | sed 's/\.enc//') \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" done From 3168b81b74c225233858b2a2fcf686bb3d4314e4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 2 Dec 2018 11:26:23 -0800 Subject: [PATCH 0296/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.22.0 (#333) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3856ee63493..6c3e59ab0cf 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.21.0", + "@google-cloud/pubsub": "^0.22.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/express": "^4.16.0", From 8a8f2bac13d8b076338e2102baa5d5a1746940d6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 2 Dec 2018 11:42:04 -0800 Subject: [PATCH 0297/1029] chore(deps): update dependency typescript to ~3.2.0 (#331) --- handwritten/logging/package.json | 2 +- handwritten/logging/src/index.ts | 3 ++- handwritten/logging/test/index.ts | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6c3e59ab0cf..b9621c07dd0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -106,7 +106,7 @@ "power-assert": "^1.6.0", "prettier": "^1.15.1", "proxyquire": "^2.1.0", - "typescript": "~3.1.0", + "typescript": "~3.2.0", "uuid": "^3.3.2" }, "nyc": { diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index b33be78c942..f63dee911a0 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -831,7 +831,8 @@ class Logging { callback(err, null, apiResp); return; } - const access = [].slice.call(arrify(metadata.access)); + // tslint:disable-next-line no-any + const access = ([] as any[]).slice.call(arrify(metadata.access)); access.push({ role: 'WRITER', groupByEmail: 'cloud-logs@google.com', diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index fa4792c81ff..2c44959cee3 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -1176,7 +1176,9 @@ describe('Logging', () => { groupByEmail: 'cloud-logs@google.com', }; - const expectedAccess = [].slice.call(originalAccess).concat(access); + const expectedAccess = + // tslint:disable-next-line no-any + ([] as any[]).slice.call(originalAccess).concat(access); dataset.setMetadata = metadata => { assert.deepStrictEqual(apiResponse.access, originalAccess); @@ -1298,7 +1300,8 @@ describe('Logging', () => { members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], }; - const expectedBindings = [].slice.call(originalBindings); + // tslint:disable-next-line no-any + const expectedBindings = ([] as any[]).slice.call(originalBindings); expectedBindings.push(binding); topic.iam.setPolicy = policy => { From fe6c4367317aa8f7a5e67c8aecb39ffcf4a8f55c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 3 Dec 2018 15:39:53 -0800 Subject: [PATCH 0298/1029] docs: update readme badges (#335) --- handwritten/logging/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 46b70a3fbdc..b089513e2b6 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -5,8 +5,7 @@ # [Stackdriver Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-logging.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-logging) -[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-logging?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-logging) +[![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) > Node.js idiomatic client for [Logging][product-docs]. @@ -139,3 +138,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest/ [product-docs]: https://cloud.google.com/logging/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + From 639a74e92b0d27aa0f5bb0f29c48396008030cd8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Dec 2018 08:54:34 -0800 Subject: [PATCH 0299/1029] chore: update license file (#337) --- handwritten/logging/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/LICENSE b/handwritten/logging/LICENSE index 7a4a3ea2424..d6456956733 100644 --- a/handwritten/logging/LICENSE +++ b/handwritten/logging/LICENSE @@ -199,4 +199,4 @@ 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. \ No newline at end of file + limitations under the License. From 3b35f59c19ce7aec9fcaaf1dd95065527fb49c90 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 5 Dec 2018 12:47:08 -0800 Subject: [PATCH 0300/1029] fix(docs): const logging = require.. contains binary (#338) --- handwritten/logging/package.json | 4 +- handwritten/logging/smoke-test/.eslintrc.yml | 5 ++ .../logging_service_v2_smoke_test.js | 4 -- handwritten/logging/src/v2/.eslintrc.yml | 3 + .../src/v2/config_service_v2_client.js | 61 ++++++---------- .../src/v2/logging_service_v2_client.js | 71 +++++++++---------- .../src/v2/metrics_service_v2_client.js | 31 +++----- handwritten/logging/synth.py | 9 --- handwritten/logging/test/.eslintrc.yml | 1 + handwritten/logging/test/gapic-v2.js | 27 +++++-- 10 files changed, 98 insertions(+), 118 deletions(-) create mode 100644 handwritten/logging/smoke-test/.eslintrc.yml create mode 100644 handwritten/logging/src/v2/.eslintrc.yml diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b9621c07dd0..b300bf5c392 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -38,11 +38,11 @@ "system-test": "mocha build/system-test --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "gts check && eslint samples/", + "lint": "gts check && eslint '**/*.js'", "check": "gts check", "clean": "gts clean", "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp test/*.js build/test", - "fix": "gts fix && eslint --fix 'samples/*.js' 'samples/**/*.js'", + "fix": "gts fix && eslint --fix '**/*.js'", "prepare": "npm run compile", "pretest": "npm run compile", "posttest": "npm run check", diff --git a/handwritten/logging/smoke-test/.eslintrc.yml b/handwritten/logging/smoke-test/.eslintrc.yml new file mode 100644 index 00000000000..fb2657e4cc9 --- /dev/null +++ b/handwritten/logging/smoke-test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + node/no-missing-require: off diff --git a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js index f1ca8de3f41..67adbee5c41 100644 --- a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js +++ b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js @@ -42,10 +42,6 @@ describe('LoggingServiceV2SmokeTest', () => { }; client .writeLogEntries(request) - .then(responses => { - const response = responses[0]; - console.log(response); - }) .then(done) .catch(done); }); diff --git a/handwritten/logging/src/v2/.eslintrc.yml b/handwritten/logging/src/v2/.eslintrc.yml new file mode 100644 index 00000000000..46afd952546 --- /dev/null +++ b/handwritten/logging/src/v2/.eslintrc.yml @@ -0,0 +1,3 @@ +--- +rules: + node/no-missing-require: off diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index a81e9d1fc08..2de4d4d2cde 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -101,12 +101,8 @@ class ConfigServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate( - 'projects/{project}' - ), - sinkPathTemplate: new gax.PathTemplate( - 'projects/{project}/sinks/{sink}' - ), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), + sinkPathTemplate: new gax.PathTemplate('projects/{project}/sinks/{sink}'), exclusionPathTemplate: new gax.PathTemplate( 'projects/{project}/exclusions/{exclusion}' ), @@ -116,11 +112,7 @@ class ConfigServiceV2Client { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listSinks: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'sinks' - ), + listSinks: new gax.PageDescriptor('pageToken', 'nextPageToken', 'sinks'), listExclusions: new gax.PageDescriptor( 'pageToken', 'nextPageToken', @@ -261,7 +253,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -353,7 +345,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -375,7 +367,7 @@ class ConfigServiceV2Client { request, options ); - }; + } /** * Gets a sink. @@ -404,7 +396,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -477,7 +469,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -574,7 +566,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -631,7 +623,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -695,7 +687,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -787,7 +779,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -809,7 +801,7 @@ class ConfigServiceV2Client { request, options ); - }; + } /** * Gets the description of an exclusion. @@ -838,7 +830,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -898,7 +890,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -971,7 +963,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -1028,7 +1020,7 @@ class ConfigServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.ConfigServiceV2Client({ * // optional auth parameters. @@ -1101,9 +1093,7 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate - .match(projectName) - .project; + return this._pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -1114,9 +1104,7 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromSinkName(sinkName) { - return this._pathTemplates.sinkPathTemplate - .match(sinkName) - .project; + return this._pathTemplates.sinkPathTemplate.match(sinkName).project; } /** @@ -1127,9 +1115,7 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the sink. */ matchSinkFromSinkName(sinkName) { - return this._pathTemplates.sinkPathTemplate - .match(sinkName) - .sink; + return this._pathTemplates.sinkPathTemplate.match(sinkName).sink; } /** @@ -1140,8 +1126,7 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromExclusionName(exclusionName) { - return this._pathTemplates.exclusionPathTemplate - .match(exclusionName) + return this._pathTemplates.exclusionPathTemplate.match(exclusionName) .project; } @@ -1153,11 +1138,9 @@ class ConfigServiceV2Client { * @returns {String} - A string representing the exclusion. */ matchExclusionFromExclusionName(exclusionName) { - return this._pathTemplates.exclusionPathTemplate - .match(exclusionName) + return this._pathTemplates.exclusionPathTemplate.match(exclusionName) .exclusion; } } - module.exports = ConfigServiceV2Client; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 50a1084ee64..7941f95b300 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -101,12 +101,8 @@ class LoggingServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - logPathTemplate: new gax.PathTemplate( - 'projects/{project}/logs/{log}' - ), - projectPathTemplate: new gax.PathTemplate( - 'projects/{project}' - ), + logPathTemplate: new gax.PathTemplate('projects/{project}/logs/{log}'), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), }; // Some of the methods on this service return "paged" results, @@ -131,23 +127,26 @@ class LoggingServiceV2Client { }; let protoFilesRoot = new gax.GoogleProtoFilesRoot(); protoFilesRoot = protobuf.loadSync( - path.join(__dirname, '..', '..', 'protos', 'google/logging/v2/logging.proto'), + path.join( + __dirname, + '..', + '..', + 'protos', + 'google/logging/v2/logging.proto' + ), protoFilesRoot ); - // Some methods on this API support automatically batching // requests; denote this. this._descriptors.batching = { writeLogEntries: new gax.BundleDescriptor( 'entries', - [ - 'logName', - 'resource', - 'labels', - ], + ['logName', 'resource', 'labels'], null, - gax.createByteLengthFunction(protoFilesRoot.lookup('google.logging.v2.LogEntry')) + gax.createByteLengthFunction( + protoFilesRoot.lookup('google.logging.v2.LogEntry') + ) ), }; @@ -190,7 +189,8 @@ class LoggingServiceV2Client { } ), defaults[methodName], - this._descriptors.page[methodName] || this._descriptors.batching[methodName] + this._descriptors.page[methodName] || + this._descriptors.batching[methodName] ); } } @@ -267,7 +267,7 @@ class LoggingServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -382,7 +382,7 @@ class LoggingServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -477,7 +477,7 @@ class LoggingServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -593,7 +593,7 @@ class LoggingServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -615,7 +615,7 @@ class LoggingServiceV2Client { request, options ); - }; + } /** * Lists the descriptors for monitored resource types used by Logging. @@ -653,7 +653,7 @@ class LoggingServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -702,7 +702,11 @@ class LoggingServiceV2Client { } options = options || {}; - return this._innerApiCalls.listMonitoredResourceDescriptors(request, options, callback); + return this._innerApiCalls.listMonitoredResourceDescriptors( + request, + options, + callback + ); } /** @@ -734,7 +738,7 @@ class LoggingServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -756,7 +760,7 @@ class LoggingServiceV2Client { request, options ); - }; + } /** * Lists the logs in projects, organizations, folders, or billing accounts. @@ -802,7 +806,7 @@ class LoggingServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -894,7 +898,7 @@ class LoggingServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.LoggingServiceV2Client({ * // optional auth parameters. @@ -916,7 +920,7 @@ class LoggingServiceV2Client { request, options ); - }; + } // -------------------- // -- Path templates -- @@ -956,9 +960,7 @@ class LoggingServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromLogName(logName) { - return this._pathTemplates.logPathTemplate - .match(logName) - .project; + return this._pathTemplates.logPathTemplate.match(logName).project; } /** @@ -969,9 +971,7 @@ class LoggingServiceV2Client { * @returns {String} - A string representing the log. */ matchLogFromLogName(logName) { - return this._pathTemplates.logPathTemplate - .match(logName) - .log; + return this._pathTemplates.logPathTemplate.match(logName).log; } /** @@ -982,11 +982,8 @@ class LoggingServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate - .match(projectName) - .project; + return this._pathTemplates.projectPathTemplate.match(projectName).project; } } - module.exports = LoggingServiceV2Client; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index f53966813c3..c6fe9c8749c 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -100,9 +100,7 @@ class MetricsServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate( - 'projects/{project}' - ), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), metricPathTemplate: new gax.PathTemplate( 'projects/{project}/metrics/{metric}' ), @@ -244,7 +242,7 @@ class MetricsServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -333,7 +331,7 @@ class MetricsServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -355,7 +353,7 @@ class MetricsServiceV2Client { request, options ); - }; + } /** * Gets a logs-based metric. @@ -379,7 +377,7 @@ class MetricsServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -434,7 +432,7 @@ class MetricsServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -495,7 +493,7 @@ class MetricsServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -545,7 +543,7 @@ class MetricsServiceV2Client { * * @example * - const logging = require('@google-cloud/logging'); + * const logging = require('@google-cloud/logging'); * * const client = new logging.v2.MetricsServiceV2Client({ * // optional auth parameters. @@ -604,9 +602,7 @@ class MetricsServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate - .match(projectName) - .project; + return this._pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -617,9 +613,7 @@ class MetricsServiceV2Client { * @returns {String} - A string representing the project. */ matchProjectFromMetricName(metricName) { - return this._pathTemplates.metricPathTemplate - .match(metricName) - .project; + return this._pathTemplates.metricPathTemplate.match(metricName).project; } /** @@ -630,11 +624,8 @@ class MetricsServiceV2Client { * @returns {String} - A string representing the metric. */ matchMetricFromMetricName(metricName) { - return this._pathTemplates.metricPathTemplate - .match(metricName) - .metric; + return this._pathTemplates.metricPathTemplate.match(metricName).metric; } } - module.exports = MetricsServiceV2Client; diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index e705b204dce..d61abaeb921 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -39,15 +39,6 @@ "../../package.json", "../../../package.json", ) -s.replace( - [ - "src/v2/config_service_v2_client.js", - "src/v2/logging_service_v2_client.js", - "src/v2/metrics_service_v2_client.js", - ], - "(\*\s*)const logging = require\('@google-cloud/logging'\);", - "\1const logging = require('@google-cloud/logging');", -) # Copy in templated files common_templates = gcp.CommonTemplates() diff --git a/handwritten/logging/test/.eslintrc.yml b/handwritten/logging/test/.eslintrc.yml index 73f7bbc946f..32007e3d07c 100644 --- a/handwritten/logging/test/.eslintrc.yml +++ b/handwritten/logging/test/.eslintrc.yml @@ -2,4 +2,5 @@ env: mocha: true rules: + node/no-missing-require: off node/no-unpublished-require: off diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index b5319a6ae01..74342e23950 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -152,7 +152,11 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogEntries = (actualRequest, options, callback) => { + client._innerApiCalls.listLogEntries = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.entries); }; @@ -212,7 +216,11 @@ describe('LoggingServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = (actualRequest, options, callback) => { + client._innerApiCalls.listMonitoredResourceDescriptors = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.resourceDescriptors); }; @@ -311,7 +319,6 @@ describe('LoggingServiceV2Client', () => { }); }); }); - }); describe('ConfigServiceV2Client', () => { describe('listSinks', () => { @@ -661,7 +668,11 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listExclusions = (actualRequest, options, callback) => { + client._innerApiCalls.listExclusions = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.exclusions); }; @@ -959,7 +970,6 @@ describe('ConfigServiceV2Client', () => { }); }); }); - }); describe('MetricsServiceV2Client', () => { describe('listLogMetrics', () => { @@ -985,7 +995,11 @@ describe('MetricsServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listLogMetrics = (actualRequest, options, callback) => { + client._innerApiCalls.listLogMetrics = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.metrics); }; @@ -1279,7 +1293,6 @@ describe('MetricsServiceV2Client', () => { }); }); }); - }); function mockSimpleGrpcMethod(expectedRequest, response, error) { From 94aa252bb638e66752b77ad0308ecb503d4bf8fd Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 5 Dec 2018 13:25:54 -0800 Subject: [PATCH 0301/1029] feat: release v4.1.1 (#340) --- handwritten/logging/CHANGELOG.md | 37 ++++++++++++++++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ff61d9e544d..8ced4863e5d 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,43 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.1.1 + +12-05-2018 13:12 PST + +### Implementation Changes +TypeScript related changes: +- refactor(ts): generate logging types from proto ([#314](https://github.com/googleapis/nodejs-logging/pull/314)) +- refactor(ts): use es imports and exports ([#307](https://github.com/googleapis/nodejs-logging/pull/307)) + +### Dependencies +- chore(deps): update dependency typescript to ~3.2.0 ([#331](https://github.com/googleapis/nodejs-logging/pull/331)) +- chore(deps): update dependency @google-cloud/pubsub to ^0.22.0 ([#333](https://github.com/googleapis/nodejs-logging/pull/333)) +- fix(deps): update dependency google-gax to ^0.22.0 ([#323](https://github.com/googleapis/nodejs-logging/pull/323)) +- fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.7 ([#322](https://github.com/googleapis/nodejs-logging/pull/322)) +- chore(deps): update dependency @google-cloud/pubsub to ^0.21.0 ([#324](https://github.com/googleapis/nodejs-logging/pull/324)) +- chore(deps): update dependency gts to ^0.9.0 ([#321](https://github.com/googleapis/nodejs-logging/pull/321)) +- chore(deps): update dependency bignumber.js to v8 ([#301](https://github.com/googleapis/nodejs-logging/pull/301)) +- chore(deps): update dependency @types/is to v0.0.21 ([#315](https://github.com/googleapis/nodejs-logging/pull/315)) +- chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 ([#318](https://github.com/googleapis/nodejs-logging/pull/318)) +- fix(deps): update dependency through2 to v3 ([#311](https://github.com/googleapis/nodejs-logging/pull/311)) + +### Documentation +- docs(samples): updated samples code to use async await ([#329](https://github.com/googleapis/nodejs-logging/pull/329)) +- docs: update directory for docs generation ([#312](https://github.com/googleapis/nodejs-logging/pull/312)) + +### Internal / Testing Changes +- fix(docs): const logging = require.. contains binary ([#338](https://github.com/googleapis/nodejs-logging/pull/338)) +- chore: update license file ([#337](https://github.com/googleapis/nodejs-logging/pull/337)) +- docs: update readme badges ([#335](https://github.com/googleapis/nodejs-logging/pull/335)) +- fix(build): fix system key decryption ([#332](https://github.com/googleapis/nodejs-logging/pull/332)) +- chore: add synth.metadata +- chore: update eslintignore config ([#320](https://github.com/googleapis/nodejs-logging/pull/320)) +- chore: drop contributors from multiple places ([#316](https://github.com/googleapis/nodejs-logging/pull/316)) +- chore: use latest npm on Windows ([#313](https://github.com/googleapis/nodejs-logging/pull/313)) +- chore(build): use the latest npm on windows for tests ([#304](https://github.com/googleapis/nodejs-logging/pull/304)) +- refactor: go back to prettier, use generated gapic tests ([#308](https://github.com/googleapis/nodejs-logging/pull/308)) + ## v4.1.0 ### New Features diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b300bf5c392..fbcc2b0a76f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.1.0", + "version": "4.1.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From b0629161ddcb8d57f2fe994671b9d78f5a85704f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 5 Dec 2018 15:55:25 -0800 Subject: [PATCH 0302/1029] chore: nyc ignore build/test by default (#341) --- handwritten/logging/.nycrc | 3 ++- handwritten/logging/package.json | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/.nycrc b/handwritten/logging/.nycrc index a1a8e6920ce..feb032400d4 100644 --- a/handwritten/logging/.nycrc +++ b/handwritten/logging/.nycrc @@ -3,7 +3,8 @@ "exclude": [ "src/*{/*,/**/*}.js", "src/*/v*/*.js", - "test/**/*.js" + "test/**/*.js", + "build/test" ], "watermarks": { "branches": [ diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fbcc2b0a76f..1669ff086e0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -108,10 +108,5 @@ "proxyquire": "^2.1.0", "typescript": "~3.2.0", "uuid": "^3.3.2" - }, - "nyc": { - "exclude": [ - "build/test" - ] } } From 8a46989ba8d1aa9422dff54731ae7afd251fbadc Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 5 Dec 2018 17:54:10 -0800 Subject: [PATCH 0303/1029] chore: always nyc report before calling codecov (#342) --- handwritten/logging/.kokoro/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index eb25b89b95e..4d6c3f83188 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -22,5 +22,6 @@ cd $(dirname $0)/.. npm install npm test +./node_modules/nyc/bin/nyc.js report bash $KOKORO_GFILE_DIR/codecov.sh From 0e74064e141e5a1b2851f8777900fba4be4258ee Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 10 Dec 2018 13:35:00 -0800 Subject: [PATCH 0304/1029] build: add Kokoro configs for autorelease (#346) * build: add Kokoro configs for autorelease * build: add Kokoro configs for autorelease * chore: remove CircleCI config --- handwritten/logging/.circleci/config.yml | 179 ------------------ handwritten/logging/.circleci/key.json.enc | Bin 2368 -> 0 bytes .../logging/.circleci/npm-install-retry.js | 60 ------ handwritten/logging/.kokoro/publish.sh | 31 +++ .../logging/.kokoro/release/publish.cfg | 28 +++ 5 files changed, 59 insertions(+), 239 deletions(-) delete mode 100644 handwritten/logging/.circleci/config.yml delete mode 100644 handwritten/logging/.circleci/key.json.enc delete mode 100755 handwritten/logging/.circleci/npm-install-retry.js create mode 100644 handwritten/logging/.kokoro/publish.sh create mode 100644 handwritten/logging/.kokoro/release/publish.cfg diff --git a/handwritten/logging/.circleci/config.yml b/handwritten/logging/.circleci/config.yml deleted file mode 100644 index 86c63432242..00000000000 --- a/handwritten/logging/.circleci/config.yml +++ /dev/null @@ -1,179 +0,0 @@ -version: 2 -workflows: - version: 2 - tests: - jobs: &workflow_jobs - - node6: - filters: &all_commits - tags: - only: /.*/ - - node8: - filters: *all_commits - - node10: - filters: *all_commits - - lint: - requires: - - node6 - - node8 - - node10 - filters: *all_commits - - docs: - requires: - - node6 - - node8 - - node10 - filters: *all_commits - - system_tests: - requires: - - lint - - docs - filters: &master_and_releases - branches: - only: master - tags: &releases - only: '/^v[\d.]+$/' - - sample_tests: - requires: - - lint - - docs - filters: *master_and_releases - - publish_npm: - requires: - - system_tests - - sample_tests - filters: - branches: - ignore: /.*/ - tags: *releases - nightly: - triggers: - - schedule: - cron: 0 7 * * * - filters: - branches: - only: master - jobs: *workflow_jobs -jobs: - node6: - docker: - - image: 'node:6' - user: node - steps: &unit_tests_steps - - checkout - - run: &npm_install_and_link - name: Install and link the module - command: |- - mkdir -p /home/node/.npm-global - ./.circleci/npm-install-retry.js - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: npm test - node8: - docker: - - image: 'node:8' - user: node - steps: *unit_tests_steps - node10: - docker: - - image: 'node:10' - user: node - steps: *unit_tests_steps - lint: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: *npm_install_and_link - - run: &samples_npm_install_and_link - name: Link the module being tested to the samples. - command: | - cd samples/ - npm link ../ - ./../.circleci/npm-install-retry.js - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Run linting. - command: npm run lint - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - docs: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: *npm_install_and_link - - run: npm run docs - sample_tests: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: - name: Decrypt credentials. - command: | - if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - openssl aes-256-cbc -d -md md5 -in .circleci/key.json.enc \ - -out .circleci/key.json \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - fi - - run: *npm_install_and_link - - run: *samples_npm_install_and_link - - run: - name: Run sample tests. - command: npm run samples-test - environment: - GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /home/node/samples/.circleci/key.json - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Remove unencrypted key. - command: | - if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - rm .circleci/key.json - fi - when: always - working_directory: /home/node/samples/ - system_tests: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: - name: Decrypt credentials. - command: | - if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - for encrypted_key in .circleci/*.json.enc; do - openssl aes-256-cbc -d -md md5 -in $encrypted_key \ - -out $(echo $encrypted_key | sed 's/\.enc//') \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - done - fi - - run: *npm_install_and_link - - run: - name: Run system tests. - command: npm run system-test - environment: - GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /home/node/project/.circleci/key.json - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Remove unencrypted key. - command: | - if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - rm .circleci/*.json - fi - when: always - publish_npm: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: ./.circleci/npm-install-retry.js - - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - - run: npm publish --access=public diff --git a/handwritten/logging/.circleci/key.json.enc b/handwritten/logging/.circleci/key.json.enc deleted file mode 100644 index 87aa15c6684e24140d3cae0bc7755e9e72a41740..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2368 zcmV-G3BUGJVQh3|WM5yM*hGFbh}#Z=IM@UkxXz1(R;deJh`8^%iDpT^D?eHTS@MjK z;!SN}2T*!BThyY1uQZ}T42XD5APY|`@dR{u9dHG!9q)-559YvsM$J81E9N|wkP1{d zt>KbEE6nVKod^)R+!9OFRvl?WGprXko#ZDitVMUsYT3uhi?()3+;-Het>z}#n=6&` z13vzO)m&qd2&>_hL0#gf%&u6Evg$tS1J->Hoc=axx{6f0KH4nOtw@)2yl0}-cn=~o z6w9IJX-_w?0ES$$_g*%VImHo z5FtN2Hm~k_+Kgl8_o#%skZ0>Q5hkX^(9L56&bN5QRzJ2`d|s&5=?80!aEq$& zY?3%pZ`76v4V<%Ng^kt9F~ON`p0^4ZsPlDI(+;`nyg=`#C?q9n+$)4iqt zoAZCl8~nz1M#n#3X>{Rr)@|LU9Bne7k-hh&+M}=Ek6|nSMAbqk zh1M1U5c-uD1bEoNq{%ZAKAe1T7$d|Xeh>ZC?4g^_WHlagB(w2I=3SL)YoaG>h;&*2 z%$g)qbjz$=~@Dq0dQ^bWs{zmUPvVW3E@& zwo%~r5H|81Z=_%iHmr(E`KMU3TJ7_v^-j&MpBWn3IxXb5Q@da?i3r~bGW!dAie6PO zmoD6p*}=5oLzOjg(=ZH2nsaP3=*{lfo{+Phk-78GE@T-fYKVA6)K|cv=Bvsf@Dde4 z*q&IV-6+!2)T?vI*9XgJID@sw8JIJ$)k1b;N#hi2Y}{roKk|tPIEiW>^DBQ%HQzZI z%TpYt)%*suuH;o$HMT2+Na92*CRv&kn$WpKv*vNG-JtSsQdu;&-&DP8Pfi+Nd$JEY z`unq@yB#2_V8y;iQPr2fIp)r=b0IxVORVOj3h{o_-#=@u6$0BN&wvBCL{<{_-f5I)54^kP=*Mv4D>w(xKL@ z>|KTqPRL*Jjjy#|DcDV17K~W!YchlaoWzWgD7E*G1UvZTF%oXzv*Xp$aZmSVP zN&z(Jwz`)QsF^u|7brHl?JDxWR}FhiNej7aCJ^)TwhFYRH5@D`G2!-gUR!surQBQ z_#68)5z$^0pJnDZbXVIqdH8+nix6BP^n`h}F;JdI?TW=e8$WJU#b?Tl5If)O%lCb< zvBZPlwm=DkXby@R-Ze$R9B`cHb9bDOg&y~G&OE;+2(y&}UXeLHc-1DHu^eg({ZUC; zh766|08=V`WA+Uo%3JOf=cO>&bRcw~r-l6WZDj7iZ`w^)v+oMbf$E9mv<(p+ax~^r z?2BCsW?Nyc;-iR;&a%1)T#^MP~ zb@SYu>2s(;Tl~p}k$2Xg0Y?sc#=CXu?uS!Xv8KkLPTAh=+yY1NeMQcWMmx0{ky`uj zKkau*aN}TT(VR!PiO!Q#6$cuXaLu?`}25WjO*_S&3 z38~F)D#K15XHBarypTe_P|*4cf#n<45@GM*Ht~Nm{dTD|c zP+F|HP~*Fm&W?j-%#wZ9!f4w8ZE15~3a``|0>Qmp5G`G>G}5piK#%ubwBidSAT?~j%c>uovg`pFLc^U2a2`K%r_{4rU0=EQBH?A%|E zlf&0Hx@n*?Z|eAznrtzq0AhDx;O({A4Z*gY#w>|ew^Ht1a7zgE)5AJ)yA+nC2FIL8 zh2dE?a6ko+nc`f--eZ!Bz3N61?6LP(I@ROD(iOYss)26^{gN-JL9Gy!OxU?CfLvnE mOx$0ooXh>bkppWbrj$jPeGN?Ab)wv-c~l5*KnmrifLr{EDYFs) diff --git a/handwritten/logging/.circleci/npm-install-retry.js b/handwritten/logging/.circleci/npm-install-retry.js deleted file mode 100755 index 3240aa2cbf2..00000000000 --- a/handwritten/logging/.circleci/npm-install-retry.js +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env node - -let spawn = require('child_process').spawn; - -// -//USE: ./index.js [... NPM ARGS] -// - -let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000; -let attempts = process.argv[3] || 3; -let args = process.argv.slice(4); -if (args.length === 0) { - args = ['install']; -} - -(function npm() { - let timer; - args.push('--verbose'); - let proc = spawn('npm', args); - proc.stdout.pipe(process.stdout); - proc.stderr.pipe(process.stderr); - proc.stdin.end(); - proc.stdout.on('data', () => { - setTimer(); - }); - proc.stderr.on('data', () => { - setTimer(); - }); - - // side effect: this also restarts when npm exits with a bad code even if it - // didnt timeout - proc.on('close', (code, signal) => { - clearTimeout(timer); - if (code || signal) { - console.log('[npm-are-you-sleeping] npm exited with code ' + code + ''); - - if (--attempts) { - console.log('[npm-are-you-sleeping] restarting'); - npm(); - } else { - console.log('[npm-are-you-sleeping] i tried lots of times. giving up.'); - throw new Error("npm install fails"); - } - } - }); - - function setTimer() { - clearTimeout(timer); - timer = setTimeout(() => { - console.log('[npm-are-you-sleeping] killing npm with SIGTERM'); - proc.kill('SIGTERM'); - // wait a couple seconds - timer = setTimeout(() => { - // its it's still not closed sigkill - console.log('[npm-are-you-sleeping] killing npm with SIGKILL'); - proc.kill('SIGKILL'); - }, 2000); - }, timeout); - } -})(); diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh new file mode 100644 index 00000000000..f2a8adc0b43 --- /dev/null +++ b/handwritten/logging/.kokoro/publish.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +cd $(dirname $0)/.. + +NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google_cloud_npm_token) +echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + +npm install +npm publish --access=public diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg new file mode 100644 index 00000000000..5c969abdb0c --- /dev/null +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -0,0 +1,28 @@ +# Get npm token from Keystore +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google_cloud_npm_token" + backend_type: FASTCONFIGPUSH + } + } +} + + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-scheduler/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-scheduler/.kokoro/publish.sh" +} From 73ce6179647090c6d1ce6fc6212c5a5c3ac88cc2 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 10 Dec 2018 16:11:21 -0800 Subject: [PATCH 0305/1029] fix(build): fix Kokoro release script (#347) --- handwritten/logging/.kokoro/release/publish.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 5c969abdb0c..5cb786ef76c 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -14,7 +14,7 @@ before_action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-scheduler/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -24,5 +24,5 @@ env_vars: { env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-scheduler/.kokoro/publish.sh" + value: "github/nodejs-logging/.kokoro/publish.sh" } From f96429ec2146bdb2afa42c5a5f046a348e1ba73a Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 10 Dec 2018 19:36:19 -0800 Subject: [PATCH 0306/1029] chore: fix publish.sh permission +x (#348) --- handwritten/logging/.kokoro/publish.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 handwritten/logging/.kokoro/publish.sh diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh old mode 100644 new mode 100755 From deabd65cde26e5f4dd72c7974e02a233609812da Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 11 Dec 2018 10:34:32 -0800 Subject: [PATCH 0307/1029] chore: update nyc and eslint configs (#351) --- handwritten/logging/.eslintignore | 1 + handwritten/logging/.nycrc | 1 + 2 files changed, 2 insertions(+) diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore index 2f642cb6044..f0c7aead4bf 100644 --- a/handwritten/logging/.eslintignore +++ b/handwritten/logging/.eslintignore @@ -1,3 +1,4 @@ **/node_modules src/**/doc/* build/ +docs/ diff --git a/handwritten/logging/.nycrc b/handwritten/logging/.nycrc index feb032400d4..88b001cb587 100644 --- a/handwritten/logging/.nycrc +++ b/handwritten/logging/.nycrc @@ -1,5 +1,6 @@ { "report-dir": "./.coverage", + "reporter": "lcov", "exclude": [ "src/*{/*,/**/*}.js", "src/*/v*/*.js", From b85dbadc1908bef9cda3e8685a60c851623b3c99 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 11 Dec 2018 18:38:03 -0800 Subject: [PATCH 0308/1029] chore(build): inject yoshi automation key (#352) --- handwritten/logging/.kokoro/release/publish.cfg | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 5cb786ef76c..78284018f04 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -9,6 +9,14 @@ before_action { } } +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} # Download trampoline resources. gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" From eccb162c9fcc5412a08dcbf6d9497a8285153bdb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 15 Dec 2018 10:22:03 -0800 Subject: [PATCH 0309/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.8 (#354) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1669ff086e0..e6a15712840 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -54,7 +54,7 @@ "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.3.0", - "@opencensus/propagation-stackdriver": "0.0.7", + "@opencensus/propagation-stackdriver": "0.0.8", "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", From ceb7e95fc3c4d542cb351f9b3359903a7186ca8c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 19 Dec 2018 08:46:29 -0800 Subject: [PATCH 0310/1029] refactor(ts): improve typescript types (#309) --- handwritten/logging/.gitignore | 3 - handwritten/logging/package.json | 11 +- handwritten/logging/proto/logging.d.ts | 6371 +++++++++++++++++ handwritten/logging/src/entry.ts | 40 +- handwritten/logging/src/index.ts | 48 +- handwritten/logging/src/log.ts | 194 +- handwritten/logging/src/sink.ts | 16 +- handwritten/logging/system-test/.eslintrc.yml | 6 - handwritten/logging/system-test/logging.ts | 8 +- handwritten/logging/test/.eslintrc.yml | 1 - handwritten/logging/test/log.ts | 5 +- 11 files changed, 6610 insertions(+), 93 deletions(-) create mode 100644 handwritten/logging/proto/logging.d.ts delete mode 100644 handwritten/logging/system-test/.eslintrc.yml diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index 531c77e628b..27369b261c8 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -3,12 +3,9 @@ .coverage .nyc_output docs/ -out/ build/ system-test/secrets.js system-test/*key.json *.lock .DS_Store -google-cloud-logging-winston-*.tgz -google-cloud-logging-bunyan-*.tgz package-lock.json diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e6a15712840..c29122939c3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -10,10 +10,9 @@ "repository": "googleapis/nodejs-logging", "main": "./build/src/index.js", "files": [ - "build", - "AUTHORS", - "CONTRIBUTORS", - "LICENSE" + "build/src", + "build/protos", + "build/proto" ], "keywords": [ "google apis client", @@ -41,13 +40,13 @@ "lint": "gts check && eslint '**/*.js'", "check": "gts check", "clean": "gts clean", - "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp test/*.js build/test", + "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp -r proto build && cp test/*.js build/test", "fix": "gts fix && eslint --fix '**/*.js'", "prepare": "npm run compile", "pretest": "npm run compile", "posttest": "npm run check", "proto": "npm run proto:logging", - "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files -o proto/logging.js google/logging/v2/logging.proto && pbts -o proto/logging.d.ts proto/logging.js" + "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -" }, "dependencies": { "@google-cloud/common-grpc": "^0.9.2", diff --git a/handwritten/logging/proto/logging.d.ts b/handwritten/logging/proto/logging.d.ts new file mode 100644 index 00000000000..fac423c5d8c --- /dev/null +++ b/handwritten/logging/proto/logging.d.ts @@ -0,0 +1,6371 @@ +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace logging. */ + namespace logging { + + /** Namespace v2. */ + namespace v2 { + + /** Represents a LoggingServiceV2 */ + class LoggingServiceV2 extends $protobuf.rpc.Service { + + /** + * Constructs a new LoggingServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; + + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; + + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @returns Promise + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; + + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; + + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @returns Promise + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; + + /** + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse + */ + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; + + /** + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @returns Promise + */ + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; + + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + */ + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; + + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise + */ + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; + + /** + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogsResponse + */ + public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; + + /** + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @returns Promise + */ + public listLogs(request: google.logging.v2.IListLogsRequest): Promise; + } + + namespace LoggingServiceV2 { + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @param error Error, if any + * @param [response] WriteLogEntriesResponse + */ + type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @param error Error, if any + * @param [response] ListLogEntriesResponse + */ + type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse + */ + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @param error Error, if any + * @param [response] ListLogsResponse + */ + type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; + } + + /** Properties of a DeleteLogRequest. */ + interface IDeleteLogRequest { + + /** DeleteLogRequest logName */ + logName?: (string|null); + } + + /** Represents a DeleteLogRequest. */ + class DeleteLogRequest implements IDeleteLogRequest { + + /** + * Constructs a new DeleteLogRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteLogRequest); + + /** DeleteLogRequest logName. */ + public logName: string; + + /** + * Creates a new DeleteLogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLogRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; + + /** + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; + + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; + + /** + * Verifies a DeleteLogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLogRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; + + /** + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @param message DeleteLogRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLogRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteLogEntriesRequest. */ + interface IWriteLogEntriesRequest { + + /** WriteLogEntriesRequest logName */ + logName?: (string|null); + + /** WriteLogEntriesRequest resource */ + resource?: (google.api.IMonitoredResource|null); + + /** WriteLogEntriesRequest labels */ + labels?: ({ [k: string]: string }|null); + + /** WriteLogEntriesRequest entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** WriteLogEntriesRequest partialSuccess */ + partialSuccess?: (boolean|null); + + /** WriteLogEntriesRequest dryRun */ + dryRun?: (boolean|null); + } + + /** Represents a WriteLogEntriesRequest. */ + class WriteLogEntriesRequest implements IWriteLogEntriesRequest { + + /** + * Constructs a new WriteLogEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); + + /** WriteLogEntriesRequest logName. */ + public logName: string; + + /** WriteLogEntriesRequest resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** WriteLogEntriesRequest labels. */ + public labels: { [k: string]: string }; + + /** WriteLogEntriesRequest entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** WriteLogEntriesRequest partialSuccess. */ + public partialSuccess: boolean; + + /** WriteLogEntriesRequest dryRun. */ + public dryRun: boolean; + + /** + * Creates a new WriteLogEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesRequest instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; + + /** + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; + + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; + + /** + * Verifies a WriteLogEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; + + /** + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @param message WriteLogEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteLogEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteLogEntriesResponse. */ + interface IWriteLogEntriesResponse { + } + + /** Represents a WriteLogEntriesResponse. */ + class WriteLogEntriesResponse implements IWriteLogEntriesResponse { + + /** + * Constructs a new WriteLogEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); + + /** + * Creates a new WriteLogEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesResponse instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; + + /** + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; + + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; + + /** + * Verifies a WriteLogEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; + + /** + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @param message WriteLogEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteLogEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteLogEntriesPartialErrors. */ + interface IWriteLogEntriesPartialErrors { + + /** WriteLogEntriesPartialErrors logEntryErrors */ + logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); + } + + /** Represents a WriteLogEntriesPartialErrors. */ + class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { + + /** + * Constructs a new WriteLogEntriesPartialErrors. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); + + /** WriteLogEntriesPartialErrors logEntryErrors. */ + public logEntryErrors: { [k: string]: google.rpc.IStatus }; + + /** + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesPartialErrors instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; + + /** + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; + + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; + + /** + * Verifies a WriteLogEntriesPartialErrors message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesPartialErrors + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; + + /** + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @param message WriteLogEntriesPartialErrors + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteLogEntriesPartialErrors to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogEntriesRequest. */ + interface IListLogEntriesRequest { + + /** ListLogEntriesRequest projectIds */ + projectIds?: (string[]|null); + + /** ListLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); + + /** ListLogEntriesRequest filter */ + filter?: (string|null); + + /** ListLogEntriesRequest orderBy */ + orderBy?: (string|null); + + /** ListLogEntriesRequest pageSize */ + pageSize?: (number|null); + + /** ListLogEntriesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLogEntriesRequest. */ + class ListLogEntriesRequest implements IListLogEntriesRequest { + + /** + * Constructs a new ListLogEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogEntriesRequest); + + /** ListLogEntriesRequest projectIds. */ + public projectIds: string[]; + + /** ListLogEntriesRequest resourceNames. */ + public resourceNames: string[]; + + /** ListLogEntriesRequest filter. */ + public filter: string; + + /** ListLogEntriesRequest orderBy. */ + public orderBy: string; + + /** ListLogEntriesRequest pageSize. */ + public pageSize: number; + + /** ListLogEntriesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogEntriesRequest instance + */ + public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; + + /** + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; + + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; + + /** + * Verifies a ListLogEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; + + /** + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @param message ListLogEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogEntriesResponse. */ + interface IListLogEntriesResponse { + + /** ListLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** ListLogEntriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLogEntriesResponse. */ + class ListLogEntriesResponse implements IListLogEntriesResponse { + + /** + * Constructs a new ListLogEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogEntriesResponse); + + /** ListLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** ListLogEntriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLogEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogEntriesResponse instance + */ + public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; + + /** + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; + + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; + + /** + * Verifies a ListLogEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; + + /** + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @param message ListLogEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { + + /** ListMonitoredResourceDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListMonitoredResourceDescriptorsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMonitoredResourceDescriptorsRequest. */ + class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + + /** + * Constructs a new ListMonitoredResourceDescriptorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); + + /** ListMonitoredResourceDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListMonitoredResourceDescriptorsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMonitoredResourceDescriptorsRequest instance + */ + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Verifies a ListMonitoredResourceDescriptorsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMonitoredResourceDescriptorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMonitoredResourceDescriptorsResponse. */ + interface IListMonitoredResourceDescriptorsResponse { + + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ + resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + + /** ListMonitoredResourceDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMonitoredResourceDescriptorsResponse. */ + class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + + /** + * Constructs a new ListMonitoredResourceDescriptorsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); + + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ + public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + + /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMonitoredResourceDescriptorsResponse instance + */ + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMonitoredResourceDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + + /** + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMonitoredResourceDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + + /** + * Verifies a ListMonitoredResourceDescriptorsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMonitoredResourceDescriptorsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogsRequest. */ + interface IListLogsRequest { + + /** ListLogsRequest parent */ + parent?: (string|null); + + /** ListLogsRequest pageSize */ + pageSize?: (number|null); + + /** ListLogsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLogsRequest. */ + class ListLogsRequest implements IListLogsRequest { + + /** + * Constructs a new ListLogsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogsRequest); + + /** ListLogsRequest parent. */ + public parent: string; + + /** ListLogsRequest pageSize. */ + public pageSize: number; + + /** ListLogsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLogsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogsRequest instance + */ + public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; + + /** + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; + + /** + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; + + /** + * Verifies a ListLogsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; + + /** + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * @param message ListLogsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogsResponse. */ + interface IListLogsResponse { + + /** ListLogsResponse logNames */ + logNames?: (string[]|null); + + /** ListLogsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLogsResponse. */ + class ListLogsResponse implements IListLogsResponse { + + /** + * Constructs a new ListLogsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogsResponse); + + /** ListLogsResponse logNames. */ + public logNames: string[]; + + /** ListLogsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLogsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogsResponse instance + */ + public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; + + /** + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; + + /** + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; + + /** + * Verifies a ListLogsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; + + /** + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @param message ListLogsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogEntry. */ + interface ILogEntry { + + /** LogEntry logName */ + logName?: (string|null); + + /** LogEntry resource */ + resource?: (google.api.IMonitoredResource|null); + + /** LogEntry protoPayload */ + protoPayload?: (google.protobuf.IAny|null); + + /** LogEntry textPayload */ + textPayload?: (string|null); + + /** LogEntry jsonPayload */ + jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp */ + receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity */ + severity?: (google.logging.type.LogSeverity|null); + + /** LogEntry insertId */ + insertId?: (string|null); + + /** LogEntry httpRequest */ + httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels */ + labels?: ({ [k: string]: string }|null); + + /** LogEntry metadata */ + metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation */ + operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace */ + trace?: (string|null); + + /** LogEntry spanId */ + spanId?: (string|null); + + /** LogEntry traceSampled */ + traceSampled?: (boolean|null); + + /** LogEntry sourceLocation */ + sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + } + + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { + + /** + * Constructs a new LogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogEntry); + + /** LogEntry logName. */ + public logName: string; + + /** LogEntry resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** LogEntry protoPayload. */ + public protoPayload?: (google.protobuf.IAny|null); + + /** LogEntry textPayload. */ + public textPayload: string; + + /** LogEntry jsonPayload. */ + public jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp. */ + public receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity. */ + public severity: google.logging.type.LogSeverity; + + /** LogEntry insertId. */ + public insertId: string; + + /** LogEntry httpRequest. */ + public httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels. */ + public labels: { [k: string]: string }; + + /** LogEntry metadata. */ + public metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation. */ + public operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace. */ + public trace: string; + + /** LogEntry spanId. */ + public spanId: string; + + /** LogEntry traceSampled. */ + public traceSampled: boolean; + + /** LogEntry sourceLocation. */ + public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + + /** LogEntry payload. */ + public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); + + /** + * Creates a new LogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntry instance + */ + public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; + + /** + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; + + /** + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; + + /** + * Verifies a LogEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntry + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; + + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogEntryOperation. */ + interface ILogEntryOperation { + + /** LogEntryOperation id */ + id?: (string|null); + + /** LogEntryOperation producer */ + producer?: (string|null); + + /** LogEntryOperation first */ + first?: (boolean|null); + + /** LogEntryOperation last */ + last?: (boolean|null); + } + + /** Represents a LogEntryOperation. */ + class LogEntryOperation implements ILogEntryOperation { + + /** + * Constructs a new LogEntryOperation. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogEntryOperation); + + /** LogEntryOperation id. */ + public id: string; + + /** LogEntryOperation producer. */ + public producer: string; + + /** LogEntryOperation first. */ + public first: boolean; + + /** LogEntryOperation last. */ + public last: boolean; + + /** + * Creates a new LogEntryOperation instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntryOperation instance + */ + public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; + + /** + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; + + /** + * Verifies a LogEntryOperation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntryOperation + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; + + /** + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @param message LogEntryOperation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogEntryOperation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogEntrySourceLocation. */ + interface ILogEntrySourceLocation { + + /** LogEntrySourceLocation file */ + file?: (string|null); + + /** LogEntrySourceLocation line */ + line?: (number|Long|null); + + /** LogEntrySourceLocation function */ + "function"?: (string|null); + } + + /** Represents a LogEntrySourceLocation. */ + class LogEntrySourceLocation implements ILogEntrySourceLocation { + + /** + * Constructs a new LogEntrySourceLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogEntrySourceLocation); + + /** LogEntrySourceLocation file. */ + public file: string; + + /** LogEntrySourceLocation line. */ + public line: (number|Long); + + /** LogEntrySourceLocation function. */ + public function: string; + + /** + * Creates a new LogEntrySourceLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntrySourceLocation instance + */ + public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; + + /** + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; + + /** + * Verifies a LogEntrySourceLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntrySourceLocation + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; + + /** + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @param message LogEntrySourceLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogEntrySourceLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a HttpRequest. */ + interface IHttpRequest { + + /** HttpRequest requestMethod */ + requestMethod?: (string|null); + + /** HttpRequest requestUrl */ + requestUrl?: (string|null); + + /** HttpRequest requestSize */ + requestSize?: (number|Long|null); + + /** HttpRequest status */ + status?: (number|null); + + /** HttpRequest responseSize */ + responseSize?: (number|Long|null); + + /** HttpRequest userAgent */ + userAgent?: (string|null); + + /** HttpRequest remoteIp */ + remoteIp?: (string|null); + + /** HttpRequest serverIp */ + serverIp?: (string|null); + + /** HttpRequest referer */ + referer?: (string|null); + + /** HttpRequest latency */ + latency?: (google.protobuf.IDuration|null); + + /** HttpRequest cacheLookup */ + cacheLookup?: (boolean|null); + + /** HttpRequest cacheHit */ + cacheHit?: (boolean|null); + + /** HttpRequest cacheValidatedWithOriginServer */ + cacheValidatedWithOriginServer?: (boolean|null); + + /** HttpRequest cacheFillBytes */ + cacheFillBytes?: (number|Long|null); + + /** HttpRequest protocol */ + protocol?: (string|null); + } + + /** Represents a HttpRequest. */ + class HttpRequest implements IHttpRequest { + + /** + * Constructs a new HttpRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.type.IHttpRequest); + + /** HttpRequest requestMethod. */ + public requestMethod: string; + + /** HttpRequest requestUrl. */ + public requestUrl: string; + + /** HttpRequest requestSize. */ + public requestSize: (number|Long); + + /** HttpRequest status. */ + public status: number; + + /** HttpRequest responseSize. */ + public responseSize: (number|Long); + + /** HttpRequest userAgent. */ + public userAgent: string; + + /** HttpRequest remoteIp. */ + public remoteIp: string; + + /** HttpRequest serverIp. */ + public serverIp: string; + + /** HttpRequest referer. */ + public referer: string; + + /** HttpRequest latency. */ + public latency?: (google.protobuf.IDuration|null); + + /** HttpRequest cacheLookup. */ + public cacheLookup: boolean; + + /** HttpRequest cacheHit. */ + public cacheHit: boolean; + + /** HttpRequest cacheValidatedWithOriginServer. */ + public cacheValidatedWithOriginServer: boolean; + + /** HttpRequest cacheFillBytes. */ + public cacheFillBytes: (number|Long); + + /** HttpRequest protocol. */ + public protocol: string; + + /** + * Creates a new HttpRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRequest instance + */ + public static create(properties?: google.logging.type.IHttpRequest): google.logging.type.HttpRequest; + + /** + * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @param message HttpRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @param message HttpRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.type.HttpRequest; + + /** + * Decodes a HttpRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.type.HttpRequest; + + /** + * Verifies a HttpRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.type.HttpRequest; + + /** + * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. + * @param message HttpRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.type.HttpRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** LogSeverity enum. */ + enum LogSeverity { + DEFAULT = 0, + DEBUG = 100, + INFO = 200, + NOTICE = 300, + WARNING = 400, + ERROR = 500, + CRITICAL = 600, + ALERT = 700, + EMERGENCY = 800 + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { + + /** MonitoredResourceDescriptor name */ + name?: (string|null); + + /** MonitoredResourceDescriptor type */ + type?: (string|null); + + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); + + /** MonitoredResourceDescriptor description */ + description?: (string|null); + + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + } + + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { + + /** + * Constructs a new MonitoredResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceDescriptor); + + /** MonitoredResourceDescriptor name. */ + public name: string; + + /** MonitoredResourceDescriptor type. */ + public type: string; + + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; + + /** MonitoredResourceDescriptor description. */ + public description: string; + + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceDescriptor instance + */ + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; + + /** + * Verifies a MonitoredResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { + + /** MonitoredResource type */ + type?: (string|null); + + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { + + /** + * Constructs a new MonitoredResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResource); + + /** MonitoredResource type. */ + public type: string; + + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new MonitoredResource instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResource instance + */ + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; + + /** + * Verifies a MonitoredResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResource + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { + + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); + + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); + } + + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + + /** + * Constructs a new MonitoredResourceMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceMetadata); + + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); + + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; + + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceMetadata instance + */ + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + + /** + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; + + /** + * Verifies a MonitoredResourceMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + + /** + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResourceMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { + + /** LabelDescriptor key */ + key?: (string|null); + + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|null); + + /** LabelDescriptor description */ + description?: (string|null); + } + + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { + + /** + * Constructs a new LabelDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ILabelDescriptor); + + /** LabelDescriptor key. */ + public key: string; + + /** LabelDescriptor valueType. */ + public valueType: google.api.LabelDescriptor.ValueType; + + /** LabelDescriptor description. */ + public description: string; + + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelDescriptor instance + */ + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; + + /** + * Verifies a LabelDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace LabelDescriptor { + + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue: google.protobuf.NullValue; + + /** Value numberValue. */ + public numberValue: number; + + /** Value stringValue. */ + public stringValue: string; + + /** Value boolValue. */ + public boolValue: boolean; + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: Uint8Array; + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 057f7b8cca5..272f1dc7ce2 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -19,9 +19,24 @@ import {Service} from '@google-cloud/common-grpc'; const EventId = require('eventid'); import * as extend from 'extend'; import * as is from 'is'; +import {google} from '../proto/logging'; const eventId = new EventId(); +export type LogEntry = google.logging.v2.ILogEntry; +export type Timestamp = google.protobuf.IDuration; + +export interface EntryJson { + timestamp: Timestamp|Date; + insertId: number; + jsonPayload?: google.protobuf.IStruct; + textPayload?: string; +} + +export interface ToJsonOptions { + removeCircular?: boolean; +} + /** * Create an entry object to define new data to insert into a log. * @@ -81,9 +96,11 @@ const eventId = new EventId(); * }); */ class Entry { - metadata; - data; - constructor(metadata?, data?) { + metadata: LogEntry; + // tslint:disable-next-line no-any + data: any; + // tslint:disable-next-line no-any + constructor(metadata?: LogEntry, data?: any) { /** * @name Entry#metadata * @type {object} @@ -119,9 +136,9 @@ class Entry { * @param {boolean} [options.removeCircular] Replace circular references in an * object with a string value, `[Circular]`. */ - toJSON(options) { + toJSON(options: ToJsonOptions) { options = options || {}; - const entry = extend(true, {}, this.metadata); + const entry = extend(true, {}, this.metadata) as {} as EntryJson; if (is.object(this.data)) { // tslint:disable-next-line no-any entry.jsonPayload = (Service as any).objToStruct_(this.data, { @@ -132,7 +149,7 @@ class Entry { entry.textPayload = this.data; } if (is.date(entry.timestamp)) { - const seconds = entry.timestamp.getTime() / 1000; + const seconds = (entry.timestamp as Date).getTime() / 1000; const secondsRounded = Math.floor(seconds); entry.timestamp = { seconds: secondsRounded, @@ -151,17 +168,18 @@ class Entry { * [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). * @returns {Entry} */ - static fromApiResponse_(entry) { - let data = entry[entry.payload]; + static fromApiResponse_(entry: google.logging.v2.LogEntry) { + let data = entry[entry.payload!]; if (entry.payload === 'jsonPayload') { // tslint:disable-next-line no-any data = (Service as any).structToObj_(data); } const serializedEntry = new Entry(entry, data); if (serializedEntry.metadata.timestamp) { - let ms = serializedEntry.metadata.timestamp.seconds * 1000; - ms += serializedEntry.metadata.timestamp.nanos / 1e6; - serializedEntry.metadata.timestamp = new Date(ms); + let ms = Number(serializedEntry.metadata.timestamp.seconds) * 1000; + ms += Number(serializedEntry.metadata.timestamp.nanos) / 1e6; + // tslint:disable-next-line no-any + (serializedEntry as any).metadata.timestamp = new Date(ms); } return serializedEntry; } diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index f63dee911a0..0e73ad17c7f 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -21,6 +21,7 @@ import {promisifyAll} from '@google-cloud/promisify'; import * as arrify from 'arrify'; import * as extend from 'extend'; import {GoogleAuth} from 'google-auth-library'; +import * as gax from 'google-gax'; import * as is from 'is'; const pumpify = require('pumpify'); @@ -36,8 +37,15 @@ const PKG = require('../../package.json'); const v2 = require('./v2'); import {Entry} from './entry'; -import {Log} from './log'; +import {Log, GetEntriesRequest} from './log'; import {Sink} from './sink'; +import {Duplex} from 'stream'; +import {AbortableDuplex} from '@google-cloud/common'; + +export interface LoggingOptions extends gax.GoogleAuthOptions { + autoRetry?: boolean; + maxRetries?: number; +} /** * @namespace google @@ -115,12 +123,12 @@ import {Sink} from './sink'; * Full quickstart example: */ class Logging { - api; + api: {}; auth: GoogleAuth; - options; + options: LoggingOptions; projectId: string; - constructor(options?) { + constructor(options?: LoggingOptions) { // Determine what scopes are needed. // It is the union of the scopes on all three clients. const scopes: Array<{}> = []; @@ -227,7 +235,7 @@ class Logging { * region_tag:logging_create_sink * Another example: */ - createSink(name, config, callback) { + createSink(name: string, config, callback) { // jscs:enable maximumLineLength const self = this; if (!is.string(name)) { @@ -473,22 +481,22 @@ class Logging { * this.end(); * }); */ - getEntriesStream(options) { + getEntriesStream(options: GetEntriesRequest) { const self = this; options = options || {}; - let requestStream; - const userStream = streamEvents(pumpify.obj()); - // tslint:disable-next-line no-any - (userStream as any).abort = () => { + let requestStream: Duplex; + const userStream = streamEvents(pumpify.obj()); + (userStream as AbortableDuplex).abort = () => { if (requestStream) { - requestStream.abort(); + (requestStream as AbortableDuplex).abort(); } }; const toEntryStream = through.obj((entry, _, next) => { next(null, Entry.fromApiResponse_(entry)); }); userStream.once('reading', () => { - const reqOpts = extend( + // tslint:disable-next-line no-any + const reqOpts: any = extend( { orderBy: 'timestamp desc', }, @@ -706,7 +714,7 @@ class Logging { * const logging = new Logging(); * const sink = logging.sink('my-sink'); */ - sink(name) { + sink(name: string) { return new Sink(this, name); } @@ -724,10 +732,10 @@ class Logging { const self = this; const isStreamMode = !callback; let gaxStream; - let stream; + let stream: Duplex; if (isStreamMode) { - stream = streamEvents(through.obj()); - stream.abort = () => { + stream = streamEvents(through.obj()); + (stream as AbortableDuplex).abort = () => { if (gaxStream && gaxStream.cancel) { gaxStream.cancel(); } @@ -789,7 +797,7 @@ class Logging { }); return; } - return stream; + return stream!; } /** @@ -801,7 +809,7 @@ class Logging { * * @private */ - setAclForBucket_(name, config, callback) { + setAclForBucket_(name: string, config, callback) { const self = this; const bucket = config.destination; bucket.acl.owners.addGroup('cloud-logs@google.com', (err, apiResp) => { @@ -823,7 +831,7 @@ class Logging { * * @private */ - setAclForDataset_(name, config, callback) { + setAclForDataset_(name: string, config, callback) { const self = this; const dataset = config.destination; dataset.getMetadata((err, metadata, apiResp) => { @@ -864,7 +872,7 @@ class Logging { * * @private */ - setAclForTopic_(name, config, callback) { + setAclForTopic_(name: string, config, callback) { const self = this; const topic = config.destination; topic.iam.getPolicy((err, policy, apiResp) => { diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index e36277866a9..d83d4d8a3f4 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -14,16 +14,48 @@ * limitations under the License. */ +import {DeleteCallback} from '@google-cloud/common'; import {promisifyAll} from '@google-cloud/promisify'; import * as arrify from 'arrify'; import * as extend from 'extend'; +import {CallOptions} from 'google-gax/build/src/gax'; import * as is from 'is'; +import {Response} from 'request'; +import {google} from '../proto/logging'; + +import {Logging} from '.'; +import {Entry} from './entry'; import {getDefaultResource} from './metadata'; const snakeCaseKeys = require('snakecase-keys'); -import {Entry} from './entry'; +export interface GetEntriesRequest { + autoPaginate?: boolean; + filter?: string; + gaxOptions?: CallOptions; + maxApiCalls?: number; + maxResults?: number; + orderBy?: string; + pageSize?: number; + pageToken?: string; +} + +export interface LogOptions { + removeCircular?: boolean; +} + +export type ApiResponse = [Response]; +export interface ApiResponseCallback { + (err: Error|null, apiResponse?: Response): void; +} + +export type MonitoredResource = google.api.IMonitoredResource; +export interface WriteOptions { + gaxOptions?: CallOptions; + labels?: {[index: string]: string}; + resource?: MonitoredResource; +} /** * A log is a named collection of entries, each entry representing a timestamped @@ -50,9 +82,9 @@ import {Entry} from './entry'; class Log { formattedName_: string; removeCircular_: boolean; - logging; + logging: Logging; name: string; - constructor(logging, name, options) { + constructor(logging: Logging, name: string, options: LogOptions) { options = options || {}; this.formattedName_ = Log.formatName_(logging.projectId, name); this.removeCircular_ = options.removeCircular === true; @@ -92,8 +124,21 @@ class Log { * const apiResponse = data[0]; * }); */ - alert(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'ALERT'), options, callback); + alert(entry: Entry|Entry[], options?: WriteOptions): Promise; + alert( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; + alert(entry: Entry|Entry[], callback: ApiResponseCallback): void; + alert( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + this.write( + Log.assignSeverityToEntries_(entry, 'ALERT'), options, callback!); } /** @@ -124,9 +169,21 @@ class Log { * const apiResponse = data[0]; * }); */ - critical(entry, options, callback) { + critical(entry: Entry|Entry[], options?: WriteOptions): Promise; + critical( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; + critical(entry: Entry|Entry[], callback: ApiResponseCallback): void; + critical( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); - this.write(entries, options, callback); + this.write(entries, options, callback!); } /** @@ -157,8 +214,21 @@ class Log { * const apiResponse = data[0]; * }); */ - debug(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback); + debug(entry: Entry|Entry[], options?: WriteOptions): Promise; + debug( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; + debug(entry: Entry|Entry[], callback: ApiResponseCallback): void; + debug( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + this.write( + Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback!); } /** @@ -202,11 +272,15 @@ class Log { * region_tag:logging_delete_log * Another example: */ - delete(gaxOptions, callback?) { - if (is.fn(gaxOptions)) { - callback = gaxOptions; - gaxOptions = {}; - } + delete(gaxOptions?: CallOptions): Promise; + delete(gaxOptions: CallOptions, callback: DeleteCallback): void; + delete(callback: DeleteCallback): void; + delete(optionsOrCallback?: CallOptions|DeleteCallback, cb?: DeleteCallback): + void|Promise { + const gaxOptions = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const reqOpts = { logName: this.formattedName_, }; @@ -248,9 +322,21 @@ class Log { * const apiResponse = data[0]; * }); */ - emergency(entry, options, callback) { + emergency(entry: Entry|Entry[], options?: WriteOptions): Promise; + emergency( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; + emergency(entry: Entry|Entry[], callback: ApiResponseCallback): void; + emergency( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); - this.write(entries, options, callback); + this.write(entries, options, callback!); } /** @@ -339,8 +425,21 @@ class Log { * const apiResponse = data[0]; * }); */ - error(entry, options, callback) { - this.write(Log.assignSeverityToEntries_(entry, 'ERROR'), options, callback); + error(entry: Entry|Entry[], options?: WriteOptions): Promise; + error( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; + error(entry: Entry|Entry[], callback: ApiResponseCallback): void; + error( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + this.write( + Log.assignSeverityToEntries_(entry, 'ERROR'), options, callback!); } /** @@ -385,7 +484,7 @@ class Log { * const entries = data[0]; * }); */ - getEntries(options, callback?) { + getEntries(options: GetEntriesRequest, callback?) { if (is.function(options)) { callback = options; @@ -432,7 +531,7 @@ class Log { * this.end(); * }); */ - getEntriesStream(options) { + getEntriesStream(options: GetEntriesRequest) { options = extend( { filter: 'logName="' + this.formattedName_ + '"', @@ -469,9 +568,16 @@ class Log { * const apiResponse = data[0]; * }); */ - info(entry, options, callback) { + info(entry: Entry|Entry[], options?: WriteOptions): Promise; + info(entry: Entry|Entry[], options: WriteOptions, callback: ApiResponseCallback): void; + info(entry: Entry|Entry[], callback: ApiResponseCallback): void; + info(entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback):void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write( - Log.assignSeverityToEntries_(entry, 'INFO'), options, callback); + Log.assignSeverityToEntries_(entry, 'INFO'), options, callback!); } /** @@ -502,9 +608,16 @@ class Log { * const apiResponse = data[0]; * }); */ - notice(entry, options, callback) { + notice(entry: Entry|Entry[], options?: WriteOptions): Promise; + notice(entry: Entry|Entry[], options: WriteOptions, callback: ApiResponseCallback): void; + notice(entry: Entry|Entry[], callback: ApiResponseCallback): void; + notice(entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback):void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write( - Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback); + Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback!); } /** @@ -535,9 +648,16 @@ class Log { * const apiResponse = data[0]; * }); */ - warning(entry, options, callback) { + warning(entry: Entry|Entry[], options?: WriteOptions): Promise; + warning(entry: Entry|Entry[], options: WriteOptions, callback: ApiResponseCallback): void; + warning(entry: Entry|Entry[], callback: ApiResponseCallback): void; + warning(entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback):void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write( - Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback); + Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback!); } /** @@ -631,12 +751,16 @@ class Log { * region_tag:logging_write_log_entry_advanced * Another example: */ - write(entry, options?, callback?) { + write(entry: Entry|Entry[], options?: WriteOptions): Promise; + write(entry: Entry|Entry[], options: WriteOptions, callback: ApiResponseCallback): void; + write(entry: Entry|Entry[], callback: ApiResponseCallback): void; + write(entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback): void|Promise { + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const self = this; - if (is.fn(options)) { - callback = options; - options = {}; - } + if (!options.resource) { getDefaultResource(this.logging.auth) .then( @@ -653,7 +777,7 @@ class Log { } writeWithResource(options.resource); } - function writeWithResource(resource) { + function writeWithResource(resource: {}|null) { let decoratedEntries; try { decoratedEntries = self.decorateEntries_(arrify(entry)); @@ -688,7 +812,7 @@ class Log { * @returns {object[]} Serialized entries. * @throws if there is an error during serialization. */ - decorateEntries_(entries) { + decorateEntries_(entries: Entry[]) { return entries.map(entry => { if (!(entry instanceof Entry)) { entry = this.entry(entry); @@ -707,7 +831,7 @@ class Log { * @param {object|object[]} entries - Log entries. * @param {string} severity - The desired severity level. */ - static assignSeverityToEntries_(entries, severity) { + static assignSeverityToEntries_(entries: Entry|Entry[], severity: string): Entry[] { return arrify(entries).map(entry => { const metadata = extend(true, {}, entry.metadata, { severity, @@ -726,7 +850,7 @@ class Log { * * @returns {string} */ - static formatName_(projectId, name) { + static formatName_(projectId: string, name: string) { const path = 'projects/' + projectId + '/logs/'; name = name.replace(path, ''); if (decodeURIComponent(name) === name) { diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 24ea72a8a8a..3d398f2a9c6 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -17,8 +17,11 @@ import * as common from '@google-cloud/common-grpc'; import {promisifyAll} from '@google-cloud/promisify'; import * as extend from 'extend'; +import {CallOptions} from 'google-gax/build/src/gax'; import * as is from 'is'; +import {Logging} from '.'; + /** * A sink is an object that lets you to specify a set of log entries to export * to a particular destination. Stackdriver Logging lets you export log entries @@ -39,11 +42,11 @@ import * as is from 'is'; * const sink = logging.sink('my-sink'); */ class Sink { - logging; + logging: Logging; name: string; formattedName_: string; - metadata; - constructor(logging, name) { + metadata?: {}; + constructor(logging: Logging, name: string) { this.logging = logging; /** * @name Sink#name @@ -136,7 +139,7 @@ class Sink { * region_tag:logging_delete_sink * Another example: */ - delete(gaxOptions, callback) { + delete(gaxOptions: CallOptions, callback) { if (is.fn(gaxOptions)) { callback = gaxOptions; gaxOptions = {}; @@ -195,7 +198,8 @@ class Sink { * region_tag:logging_get_sink * Another example: */ - getMetadata(gaxOptions, callback?) { + getMetadata(callback?); + getMetadata(gaxOptions: CallOptions, callback?) { const self = this; if (is.fn(gaxOptions)) { callback = gaxOptions; @@ -255,7 +259,7 @@ class Sink { * const apiResponse = data[0]; * }); */ - setFilter(filter, callback?) { + setFilter(filter: string, callback?) { this.setMetadata( { filter, diff --git a/handwritten/logging/system-test/.eslintrc.yml b/handwritten/logging/system-test/.eslintrc.yml deleted file mode 100644 index 2e6882e46d2..00000000000 --- a/handwritten/logging/system-test/.eslintrc.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -env: - mocha: true -rules: - node/no-unpublished-require: off - no-console: off diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 9210679548d..c8c46587dd0 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -23,6 +23,7 @@ const {PubSub} = require('@google-cloud/pubsub'); import {Storage} from '@google-cloud/storage'; import * as uuid from 'uuid'; import {Logging} from '../src'; +import {ServiceObject} from '@google-cloud/common'; // block all attempts to chat with the metadata server (kokoro runs on GCE) nock('http://metadata.google.internal') @@ -31,7 +32,7 @@ nock('http://metadata.google.internal') .persist(); describe('Logging', () => { - let PROJECT_ID; + let PROJECT_ID: string; const TESTS_PREFIX = 'gcloud-logging-test'; const WRITE_CONSISTENCY_DELAY_MS = 10000; @@ -77,10 +78,11 @@ describe('Logging', () => { } async function deleteSinks() { - return getAndDelete(logging.getSinks.bind(logging)); + // tslint:disable-next-line no-any + return getAndDelete(logging.getSinks.bind(logging) as any); } - async function getAndDelete(method) { + async function getAndDelete(method: () => Promise<[ServiceObject[]]>) { const [objects] = await method(); return Promise.all( objects.filter(o => (o.name || o.id).indexOf(TESTS_PREFIX) === 0) diff --git a/handwritten/logging/test/.eslintrc.yml b/handwritten/logging/test/.eslintrc.yml index 32007e3d07c..fb2657e4cc9 100644 --- a/handwritten/logging/test/.eslintrc.yml +++ b/handwritten/logging/test/.eslintrc.yml @@ -3,4 +3,3 @@ env: mocha: true rules: node/no-missing-require: off - node/no-unpublished-require: off diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 3b8f4910b96..a2142b700e6 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -32,6 +32,7 @@ const fakePromisify = extend({}, promisify, { }); import {Entry} from '../src'; +import {EntryJson} from '../src/entry'; const originalGetDefaultResource = async () => { return 'very-fake-resource'; @@ -658,7 +659,7 @@ describe('Log', () => { throw new Error('should not be called'); }; const entry = new Entry(); - entry.toJSON = () => toJSONResponse; + entry.toJSON = () => toJSONResponse as {} as EntryJson; const decoratedEntries = log.decorateEntries_([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); }); @@ -670,7 +671,7 @@ describe('Log', () => { entry.toJSON = options_ => { assert.deepStrictEqual(options_, {removeCircular: true}); setImmediate(done); - return {}; + return {} as EntryJson; }; log.decorateEntries_([entry]); From 5432edddf7ee80506870667dcd7e3317672011c3 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 2 Jan 2019 15:28:08 -0500 Subject: [PATCH 0311/1029] feat: cache detected environment's default resource (#359) --- handwritten/logging/src/index.ts | 1 + handwritten/logging/src/log.ts | 15 +++++++++------ handwritten/logging/test/log.ts | 31 +++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 0e73ad17c7f..277b02b19c4 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -127,6 +127,7 @@ class Logging { auth: GoogleAuth; options: LoggingOptions; projectId: string; + detectedResource?: object; constructor(options?: LoggingOptions) { // Determine what scopes are needed. diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index d83d4d8a3f4..b007815c5d5 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -761,21 +761,24 @@ class Log { typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const self = this; - if (!options.resource) { + if (options.resource) { + if (options.resource.labels) { + options.resource.labels = snakeCaseKeys(options.resource.labels); + } + writeWithResource(options.resource); + } else if (this.logging.detectedResource) { + writeWithResource(this.logging.detectedResource); + } else { getDefaultResource(this.logging.auth) .then( (resource) => { + this.logging.detectedResource = resource; writeWithResource(resource); }, () => { // Ignore errors (the API will speak up if it has an issue). writeWithResource(null); }); - } else { - if (options.resource.labels) { - options.resource.labels = snakeCaseKeys(options.resource.labels); - } - writeWithResource(options.resource); } function writeWithResource(resource: {}|null) { let decoratedEntries; diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index a2142b700e6..da250f98214 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -343,6 +343,37 @@ describe('Log', () => { log.write(ENTRY, optionsWithResource, done); }); + it('should cache a detected resource', done => { + const fakeResource = 'test-level-fake-resource'; + + fakeMetadata.getDefaultResource = async () => { + return fakeResource; + }; + + log.logging.request = () => { + assert.strictEqual(log.logging.detectedResource, fakeResource); + done(); + }; + + log.write(ENTRY, done); + }); + + it('should re-use detected resource', done => { + log.logging.detectedResource = 'environment-default-resource'; + + fakeMetadata.getDefaultResource = () => { + throw new Error('Cached resource was not used.'); + }; + + log.logging.request = config => { + assert.strictEqual( + config.reqOpts.resource, log.logging.detectedResource); + done(); + }; + + log.write(ENTRY, done); + }); + it('should transform camelcase label keys to snake case', done => { const CUSTOM_RESOURCE = { labels: { From 4e05d3782af1be3aaedb0fc5747227e9a13debc0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 2 Jan 2019 14:53:45 -0600 Subject: [PATCH 0312/1029] Release v4.2.0 (#360) --- handwritten/logging/CHANGELOG.md | 21 +++++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 8ced4863e5d..90a38001481 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,27 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.2.0 + +01-02-2019 12:43 PST + +### New Features +- feat: cache detected environment's default resource ([#359](https://github.com/googleapis/nodejs-logging/pull/359)) + +### Dependencies +- fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.8 ([#354](https://github.com/googleapis/nodejs-logging/pull/354)) + +### Internal / Testing Changes +- refactor: modernize the sample tests ([#356](https://github.com/googleapis/nodejs-logging/pull/356)) +- refactor(ts): improve typescript types ([#309](https://github.com/googleapis/nodejs-logging/pull/309)) +- chore(build): inject yoshi automation key ([#352](https://github.com/googleapis/nodejs-logging/pull/352)) +- chore: update nyc and eslint configs ([#351](https://github.com/googleapis/nodejs-logging/pull/351)) +- chore: fix publish.sh permission +x ([#348](https://github.com/googleapis/nodejs-logging/pull/348)) +- fix(build): fix Kokoro release script ([#347](https://github.com/googleapis/nodejs-logging/pull/347)) +- build: add Kokoro configs for autorelease ([#346](https://github.com/googleapis/nodejs-logging/pull/346)) +- chore: always nyc report before calling codecov ([#342](https://github.com/googleapis/nodejs-logging/pull/342)) +- chore: nyc ignore build/test by default ([#341](https://github.com/googleapis/nodejs-logging/pull/341)) + ## v4.1.1 12-05-2018 13:12 PST diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c29122939c3..aeda832d14f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.1.1", + "version": "4.2.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 9ec776a2b6b62874c55b670e5573d57a05af7e13 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 4 Jan 2019 15:10:43 -0800 Subject: [PATCH 0313/1029] fix(docs): removed unused gRPC message types fix(docs): removed unused gRPC message types --- .../src/v2/doc/google/api/doc_distribution.js | 56 ------------------- .../src/v2/doc/google/api/doc_metric.js | 20 ------- .../v2/doc/google/logging/v2/doc_logging.js | 19 ------- handwritten/logging/synth.metadata | 36 ++++++++---- 4 files changed, 24 insertions(+), 107 deletions(-) diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index dd297f6f840..7fd05a5fe5b 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -92,23 +92,6 @@ const Distribution = { // This is for documentation. Actual contents will be loaded by gRPC. - /** - * The range of the population values. - * - * @property {number} min - * The minimum of the population values. - * - * @property {number} max - * The maximum of the population values. - * - * @typedef Range - * @memberof google.api - * @see [google.api.Distribution.Range definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} - */ - Range: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - /** * `BucketOptions` describes the bucket boundaries used to create a histogram * for the distribution. The buckets can be in a linear sequence, an @@ -227,44 +210,5 @@ const Distribution = { Explicit: { // This is for documentation. Actual contents will be loaded by gRPC. } - }, - - /** - * Exemplars are example points that may be used to annotate aggregated - * distribution values. They are metadata that gives information about a - * particular value added to a Distribution bucket, such as a trace ID that - * was active when a value was added. They may contain further information, - * such as a example values and timestamps, origin, etc. - * - * @property {number} value - * Value of the exemplar point. This value determines to which bucket the - * exemplar belongs. - * - * @property {Object} timestamp - * The observation (sampling) time of the above value. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object[]} attachments - * Contextual information about the example value. Examples are: - * - * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace - * - * Literal string: type.googleapis.com/google.protobuf.StringValue - * - * Labels dropped during aggregation: - * type.googleapis.com/google.monitoring.v3.DroppedLabels - * - * There may be only a single attachment of any given message type in a - * single exemplar, and this is enforced by the system. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Exemplar - * @memberof google.api - * @see [google.api.Distribution.Exemplar definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} - */ - Exemplar: { - // This is for documentation. Actual contents will be loaded by gRPC. } }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index ec52c27bf2a..85066f8207a 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -252,24 +252,4 @@ const MetricDescriptor = { */ MONEY: 6 } -}; - -/** - * A specific metric, identified by specifying values for all of the - * labels of a `MetricDescriptor`. - * - * @property {string} type - * An existing metric type, see google.api.MetricDescriptor. - * For example, `custom.googleapis.com/invoice/paid/amount`. - * - * @property {Object.} labels - * The set of label values that uniquely identify this metric. All - * labels listed in the `MetricDescriptor` must be assigned values. - * - * @typedef Metric - * @memberof google.api - * @see [google.api.Metric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} - */ -const Metric = { - // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 2dc88eb9c01..70cf459b1e0 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -138,25 +138,6 @@ const WriteLogEntriesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; -/** - * Error details for WriteLogEntries with partial success. - * - * @property {Object.} logEntryErrors - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * - * Failed requests for which no entries are written will not include - * per-entry errors. - * - * @typedef WriteLogEntriesPartialErrors - * @memberof google.logging.v2 - * @see [google.logging.v2.WriteLogEntriesPartialErrors definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const WriteLogEntriesPartialErrors = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - /** * The parameters to `ListLogEntries`. * diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index f26e69af884..95191d003d6 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,26 +1,38 @@ { + "updateTime": "2019-01-03T17:50:33.539672Z", "sources": [ + { + "generator": { + "name": "artman", + "version": "0.16.4", + "dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857" + } + }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5a57f0c13a358b2b15452bf2d67453774a5f6d4f", - "internalRef": "221837528" + "sha": "2a5caab4315cb5ab3d5c97c90c6d4e9441052b16", + "internalRef": "227195651" } }, { - "git": { - "name": "googleapis-private", - "remote": "https://github.com/googleapis/googleapis-private.git", - "sha": "6aa8e1a447bb8d0367150356a28cb4d3f2332641", - "internalRef": "221340946" + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2018.12.6" } - }, + } + ], + "destinations": [ { - "generator": { - "name": "artman", - "version": "0.16.0", - "dockerImage": "googleapis/artman@sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b" + "client": { + "source": "googleapis", + "apiName": "logging", + "apiVersion": "v2", + "language": "nodejs", + "generator": "gapic", + "config": "google/logging/artman_logging.yaml" } } ] From 0c3c6687544ae233be604ac6017a08d6df7aad96 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 14 Jan 2019 12:24:06 -0800 Subject: [PATCH 0314/1029] fix(deps): update dependency google-gax to ^0.23.0 (#364) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index aeda832d14f..e16e708422e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -59,7 +59,7 @@ "extend": "^3.0.2", "gcp-metadata": "^0.9.0", "google-auth-library": "^2.0.0", - "google-gax": "^0.22.0", + "google-gax": "^0.23.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", From f5d978949a783a5d99e160de4ebceb574c182c40 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 15 Jan 2019 10:10:18 -0800 Subject: [PATCH 0315/1029] build: check broken links in generated docs (#358) * build: check dead links on Kokoro * recursive crawl local links * fix dead links in timestamp * fix links * fix broken links --- handwritten/logging/.jsdoc.js | 2 +- handwritten/logging/.kokoro/docs.sh | 8 ++++++++ handwritten/logging/package.json | 2 +- handwritten/logging/src/index.ts | 8 ++++---- .../src/v2/doc/google/api/doc_distribution.js | 2 +- .../src/v2/doc/google/protobuf/doc_timestamp.js | 6 ++---- handwritten/logging/synth.py | 16 ++++++++++++++++ 7 files changed, 33 insertions(+), 11 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 2b829d399ba..33280bccfbe 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -20,7 +20,7 @@ module.exports = { opts: { readme: './README.md', package: './package.json', - template: './node_modules/ink-docstrap/template', + template: './node_modules/jsdoc-baseline', recurse: true, verbose: true, destination: './docs/' diff --git a/handwritten/logging/.kokoro/docs.sh b/handwritten/logging/.kokoro/docs.sh index 3af3193411a..8ca19ce2885 100755 --- a/handwritten/logging/.kokoro/docs.sh +++ b/handwritten/logging/.kokoro/docs.sh @@ -23,3 +23,11 @@ cd $(dirname $0)/.. npm install npm run docs + +# Check broken links +BIN=./node_modules/.bin + +npm install broken-link-checker +npm install http-server +$BIN/http-server -p 8080 docs/ & +$BIN/blc -r http://localhost:8080 diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e16e708422e..84b82f6be08 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -96,7 +96,7 @@ "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^0.18.0", "gts": "^0.9.0", - "ink-docstrap": "git+https://github.com/docstrap/docstrap.git", + "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 277b02b19c4..72d18d29217 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -98,10 +98,10 @@ export interface LoggingOptions extends gax.GoogleAuthOptions { * * @class * - * @see [What is Stackdriver Logging?]{@link https://cloud.google.com/logging/docs} - * @see [Introduction to the Stackdriver Logging API]{@link https://cloud.google.com/logging/docs/api} - * @see [Logging to Stackdriver from Bunyan]{@link https://www.npmjs.com/package/@google-cloud/logging-bunyan} - * @see [Logging to Stackdriver from Winston]{@link https://www.npmjs.com/package/@google-cloud/logging-winston} + * @see [What is Stackdriver Logging?](https://cloud.google.com/logging/docs) + * @see [Introduction to the Stackdriver Logging API](https://cloud.google.com/logging/docs/api) + * @see [Logging to Stackdriver from Bunyan](https://www.npmjs.com/package/@google-cloud/logging-bunyan) + * @see [Logging to Stackdriver from Winston](https://www.npmjs.com/package/@google-cloud/logging-winston) * * @param {ClientConfig} [options] Configuration options. * diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index 7fd05a5fe5b..d4e28029d0b 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -44,7 +44,7 @@ * The sum of squared deviations from the mean of the values in the * population. For values x_i this is: * - * Sum[i=1..n](https://cloud.google.com(x_i - mean)^2) + * Sum\[i=1..n](x_1 - mean)^2 * * Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition * describes Welford's method for accumulating this sum in one pass. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index 1ebe2e6e1a5..1cc64cbed80 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -87,13 +87,11 @@ * 01:30 UTC on January 15, 2017. * * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] + * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) * method. In Python, a standard `datetime.datetime` object can be converted * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. + * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--) to obtain a formatter capable of generating timestamps in this format. * * @property {number} seconds * Represents seconds of UTC time since Unix epoch diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index d61abaeb921..8a6cd67a43e 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -45,6 +45,22 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates) +# [START fix-dead-link] +s.replace('**/doc/google/protobuf/doc_timestamp.js', + 'https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)', + r"https://\1)") + +s.replace('**/doc/google/protobuf/doc_timestamp.js', + 'toISOString\]', + 'toISOString)') +# [END fix-dead-link] + +s.replace('src/v2/doc/google/api/doc_distribution.js', + r"Sum\[i=1\.\.n\]\(https:\/\/cloud\.google\.com\(x_i - mean\)\^2\)", + "Sum\[i=1..n](x_1 - mean)^2") + + + # Node.js specific cleanup subprocess.run(["npm", "install"]) subprocess.run(["npm", "run", "fix"]) From 76704f9771717c1ef07a013e573125bf33381ebc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 17 Jan 2019 08:47:55 -0800 Subject: [PATCH 0316/1029] chore: update year in the license headers (#366) --- .../logging/src/v2/config_service_v2_client.js | 2 +- .../src/v2/doc/google/api/doc_distribution.js | 2 +- .../logging/src/v2/doc/google/api/doc_label.js | 2 +- .../logging/src/v2/doc/google/api/doc_metric.js | 2 +- .../src/v2/doc/google/api/doc_monitored_resource.js | 2 +- .../v2/doc/google/logging/type/doc_http_request.js | 2 +- .../src/v2/doc/google/logging/v2/doc_log_entry.js | 2 +- .../src/v2/doc/google/logging/v2/doc_logging.js | 2 +- .../v2/doc/google/logging/v2/doc_logging_config.js | 2 +- .../v2/doc/google/logging/v2/doc_logging_metrics.js | 2 +- .../logging/src/v2/doc/google/protobuf/doc_any.js | 2 +- .../src/v2/doc/google/protobuf/doc_duration.js | 2 +- .../logging/src/v2/doc/google/protobuf/doc_empty.js | 2 +- .../src/v2/doc/google/protobuf/doc_field_mask.js | 2 +- .../logging/src/v2/doc/google/protobuf/doc_struct.js | 2 +- .../src/v2/doc/google/protobuf/doc_timestamp.js | 2 +- handwritten/logging/src/v2/index.js | 2 +- .../logging/src/v2/logging_service_v2_client.js | 2 +- .../src/v2/logging_service_v2_client_config.json | 2 +- .../logging/src/v2/metrics_service_v2_client.js | 2 +- handwritten/logging/synth.metadata | 12 ++++++------ handwritten/logging/test/gapic-v2.js | 2 +- 22 files changed, 27 insertions(+), 27 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 2de4d4d2cde..764eb444a99 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index d4e28029d0b..0a95bf5aab2 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_label.js b/handwritten/logging/src/v2/doc/google/api/doc_label.js index b26faacb2d3..74d87098038 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_label.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_label.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index 85066f8207a..f2ff585a692 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 5c185bc5cdc..24321d640b0 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js index ab569a284f5..5b705250d51 100644 --- a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js +++ b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index 2ccd1e2ac30..bde594e2670 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 70cf459b1e0..4e7d7e900e9 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index a8bb50852a5..89e056bcad8 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index 730702b0287..bc28ecbee25 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index 3accb1fc0d8..f3278b34e66 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js index c03ce2fb3df..1275f8f4d13 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js index b1d6b5e32a9..0b446dd9ce4 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js index 0cb35328962..d55d97e6e38 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js index ddf7e5c95dc..ae7e4ef1ff6 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index 1cc64cbed80..b47f41c2b30 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/src/v2/index.js index 249a385598c..7e2fe4d6127 100644 --- a/handwritten/logging/src/v2/index.js +++ b/handwritten/logging/src/v2/index.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 7941f95b300..b97099ecb3d 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index bda7e33bbbe..e93f205572e 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -37,7 +37,7 @@ }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default", "bundling": { "element_count_threshold": 1000, diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index c6fe9c8749c..642344badf3 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 95191d003d6..d60b6473fc0 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-01-03T17:50:33.539672Z", + "updateTime": "2019-01-17T12:52:33.794071Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.4", - "dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857" + "version": "0.16.6", + "dockerImage": "googleapis/artman@sha256:12722f2ca3fbc3b53cc6aa5f0e569d7d221b46bd876a2136497089dec5e3634e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2a5caab4315cb5ab3d5c97c90c6d4e9441052b16", - "internalRef": "227195651" + "sha": "0ac60e21a1aa86c07c1836865b35308ba8178b05", + "internalRef": "229626798" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2018.12.6" + "version": "2019.1.16" } } ], diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 74342e23950..fce16fa698c 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 2de2603473f3a3deadcdfe1173943f0ce3cb4fa1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 17 Jan 2019 08:58:17 -0800 Subject: [PATCH 0317/1029] fix(deps): update dependency google-auth-library to v3 (#365) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 84b82f6be08..1128d3cc7f2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,7 +58,7 @@ "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^0.9.0", - "google-auth-library": "^2.0.0", + "google-auth-library": "^3.0.0", "google-gax": "^0.23.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", From 8d18e614f0485a37c719e74644d68eb80746dce9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 18 Jan 2019 09:52:38 -0800 Subject: [PATCH 0318/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.23.0 (#367) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1128d3cc7f2..477b6693863 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.22.0", + "@google-cloud/pubsub": "^0.23.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/express": "^4.16.0", From 8c4c2a06ee99d9cb9786be6a80e68b13760708ff Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 24 Jan 2019 15:39:06 -0700 Subject: [PATCH 0319/1029] build: ignore googleapis.com in doc link check (#368) --- handwritten/logging/.kokoro/docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/.kokoro/docs.sh b/handwritten/logging/.kokoro/docs.sh index 8ca19ce2885..ea6e514f45d 100755 --- a/handwritten/logging/.kokoro/docs.sh +++ b/handwritten/logging/.kokoro/docs.sh @@ -30,4 +30,4 @@ BIN=./node_modules/.bin npm install broken-link-checker npm install http-server $BIN/http-server -p 8080 docs/ & -$BIN/blc -r http://localhost:8080 +$BIN/blc http://localhost:8080 -r --exclude www.googleapis.com From 5666e89a5ae82710f9bb48acbdc633b097dcde69 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 25 Jan 2019 09:53:49 -0800 Subject: [PATCH 0320/1029] fix(deps): update dependency google-gax to ^0.24.0 (#369) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 477b6693863..5440d2ca296 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -59,7 +59,7 @@ "extend": "^3.0.2", "gcp-metadata": "^0.9.0", "google-auth-library": "^3.0.0", - "google-gax": "^0.23.0", + "google-gax": "^0.24.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", From b9b210a6a90702aa6d147a471bb3b533f50f1c57 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 26 Jan 2019 15:46:39 -0800 Subject: [PATCH 0321/1029] chore(deps): update dependency eslint-config-prettier to v4 (#370) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5440d2ca296..314297cf74d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -91,7 +91,7 @@ "bignumber.js": "^8.0.0", "codecov": "^3.0.4", "eslint": "^5.4.0", - "eslint-config-prettier": "^3.1.0", + "eslint-config-prettier": "^4.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^0.18.0", From 0caf24078e1b9f56ae412d0e81cac060fc1c9269 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 29 Jan 2019 10:07:02 -0800 Subject: [PATCH 0322/1029] fix(deps): update dependency @google-cloud/common-grpc to ^0.10.0 (#372) --- handwritten/logging/package.json | 2 +- handwritten/logging/system-test/logging.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 314297cf74d..d51e933d7a7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -49,7 +49,7 @@ "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -" }, "dependencies": { - "@google-cloud/common-grpc": "^0.9.2", + "@google-cloud/common-grpc": "^0.10.0", "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.3.0", diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index c8c46587dd0..99d5ab81700 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -85,7 +85,10 @@ describe('Logging', () => { async function getAndDelete(method: () => Promise<[ServiceObject[]]>) { const [objects] = await method(); return Promise.all( - objects.filter(o => (o.name || o.id).indexOf(TESTS_PREFIX) === 0) + objects + .filter( + // tslint:disable-next-line no-any + o => ((o as any).name || o.id).indexOf(TESTS_PREFIX) === 0) .map(o => o.delete())); } }); From e71669408a4f77e7e15fbb3cbe83bd23cece6d11 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 29 Jan 2019 10:15:09 -0800 Subject: [PATCH 0323/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.24.0 (#371) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d51e933d7a7..fc78461410f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.23.0", + "@google-cloud/pubsub": "^0.24.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/express": "^4.16.0", From eea71cb5db7baf0adcafe6e95331ed49063e426b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 30 Jan 2019 14:13:36 -0500 Subject: [PATCH 0324/1029] fix(deps): update dependency google-gax to ^0.25.0 (#373) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fc78461410f..5f31aa56eae 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -59,7 +59,7 @@ "extend": "^3.0.2", "gcp-metadata": "^0.9.0", "google-auth-library": "^3.0.0", - "google-gax": "^0.24.0", + "google-gax": "^0.25.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", From fcc265fde22cb161dbd2c7c45bc3b3dee7293345 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Thu, 31 Jan 2019 13:28:02 -0800 Subject: [PATCH 0325/1029] Release v4.3.0 (#374) --- handwritten/logging/CHANGELOG.md | 25 +++++++++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 90a38001481..0e77ad71efb 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,31 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.3.0 + +01-31-2019 12:49 PST + + +### Implementation Changes +- Modify retry settings for WriteLogEntries, update year in the license headers ([#366](https://github.com/googleapis/nodejs-logging/pull/366)) + +### Dependencies +- fix(deps): update dependency google-gax to ^0.25.0 ([#373](https://github.com/googleapis/nodejs-logging/pull/373)) +- chore(deps): update dependency @google-cloud/pubsub to ^0.24.0 ([#371](https://github.com/googleapis/nodejs-logging/pull/371)) +- fix(deps): update dependency @google-cloud/common-grpc to ^0.10.0 ([#372](https://github.com/googleapis/nodejs-logging/pull/372)) +- chore(deps): update dependency eslint-config-prettier to v4 ([#370](https://github.com/googleapis/nodejs-logging/pull/370)) +- fix(deps): update dependency google-gax to ^0.24.0 ([#369](https://github.com/googleapis/nodejs-logging/pull/369)) +- chore(deps): update dependency @google-cloud/pubsub to ^0.23.0 ([#367](https://github.com/googleapis/nodejs-logging/pull/367)) +- fix(deps): update dependency google-auth-library to v3 ([#365](https://github.com/googleapis/nodejs-logging/pull/365)) +- fix(deps): update dependency google-gax to ^0.23.0 ([#364](https://github.com/googleapis/nodejs-logging/pull/364)) + +### Documentation +- build: ignore googleapis.com in doc link check ([#368](https://github.com/googleapis/nodejs-logging/pull/368)) +- fix(docs): removed unused gRPC message types + +### Internal / Testing Changes +- build: check broken links in generated docs ([#358](https://github.com/googleapis/nodejs-logging/pull/358)) + ## v4.2.0 01-02-2019 12:43 PST diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5f31aa56eae..5c957d7cc7b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.2.0", + "version": "4.3.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 51765a3a671ef8051443eab3b625a19e94ecbe63 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 1 Feb 2019 10:10:15 -0800 Subject: [PATCH 0326/1029] Automerge by dpebot Automerge by dpebot --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5c957d7cc7b..12a7285a0f5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -105,7 +105,7 @@ "power-assert": "^1.6.0", "prettier": "^1.15.1", "proxyquire": "^2.1.0", - "typescript": "~3.2.0", + "typescript": "~3.3.0", "uuid": "^3.3.2" } } From 998f901bc7754236baa5867799dff7aa94bf867d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Sat, 2 Feb 2019 10:32:34 -0800 Subject: [PATCH 0327/1029] refactor: improve generated code style. (#377) --- .../logging/src/v2/config_service_v2_client.js | 8 ++++---- .../logging/src/v2/logging_service_v2_client.js | 12 ++++++------ .../logging/src/v2/metrics_service_v2_client.js | 4 ++-- handwritten/logging/synth.metadata | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 764eb444a99..d1b390efd86 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -265,7 +265,7 @@ class ConfigServiceV2Client { * client.listSinks({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -285,7 +285,7 @@ class ConfigServiceV2Client { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -699,7 +699,7 @@ class ConfigServiceV2Client { * client.listExclusions({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -719,7 +719,7 @@ class ConfigServiceV2Client { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index b97099ecb3d..23966a41751 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -489,7 +489,7 @@ class LoggingServiceV2Client { * client.listLogEntries({resourceNames: formattedResourceNames}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -509,7 +509,7 @@ class LoggingServiceV2Client { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -663,7 +663,7 @@ class LoggingServiceV2Client { * client.listMonitoredResourceDescriptors({}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -681,7 +681,7 @@ class LoggingServiceV2Client { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -818,7 +818,7 @@ class LoggingServiceV2Client { * client.listLogs({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -838,7 +838,7 @@ class LoggingServiceV2Client { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 642344badf3..cd79b557b59 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -254,7 +254,7 @@ class MetricsServiceV2Client { * client.listLogMetrics({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -274,7 +274,7 @@ class MetricsServiceV2Client { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index d60b6473fc0..a816efe9bad 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-01-17T12:52:33.794071Z", + "updateTime": "2019-02-02T12:18:08.168510Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.6", - "dockerImage": "googleapis/artman@sha256:12722f2ca3fbc3b53cc6aa5f0e569d7d221b46bd876a2136497089dec5e3634e" + "version": "0.16.8", + "dockerImage": "googleapis/artman@sha256:75bc07ef34a1de9895c18af54dc503ed3b3f3b52e85062e3360a979d2a0741e7" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0ac60e21a1aa86c07c1836865b35308ba8178b05", - "internalRef": "229626798" + "sha": "bce093dab3e65c40eb9a37efbdc960f34df6037a", + "internalRef": "231974277" } }, { From 4d58cba82b9285fe1330a1fb4aebe419a2080c32 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 4 Feb 2019 10:11:41 -0800 Subject: [PATCH 0328/1029] fix: stop exporting express types publicly (#376) We don't have a dependency on express. If we expose express types as part of our public, our dependent modules will need to have a dev dependency on @types/express. Otherwise they see their builds failing. Currently there is no way to express this dependency relationship to npm. Instead, let's not use express types. Ref: https://github.com/googleapis/nodejs-logging-bunyan/issues/243 --- handwritten/logging/package.json | 1 - .../src/middleware/express/make-http-request.ts | 5 ++--- .../logging/src/middleware/express/make-middleware.ts | 9 +++++---- .../test/middleware/express/test-make-http-request.ts | 10 +++++----- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 12a7285a0f5..0dc17ecfe11 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,6 @@ "@google-cloud/pubsub": "^0.24.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", - "@types/express": "^4.16.0", "@types/extend": "^3.0.0", "@types/is": "0.0.21", "@types/mocha": "^5.2.5", diff --git a/handwritten/logging/src/middleware/express/make-http-request.ts b/handwritten/logging/src/middleware/express/make-http-request.ts index 359aaed0a0f..4698bf4466f 100644 --- a/handwritten/logging/src/middleware/express/make-http-request.ts +++ b/handwritten/logging/src/middleware/express/make-http-request.ts @@ -14,13 +14,12 @@ * limitations under the License. */ -// Types-only import. -import {Request, Response} from 'express'; +import * as http from 'http'; import {StackdriverHttpRequest} from '../../http-request'; export function makeHttpRequestData( - req: Request, res: Response, + req: http.IncomingMessage, res: http.ServerResponse, latencyMilliseconds: number): StackdriverHttpRequest { return { status: res.statusCode, diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index b03ea7a127f..fcd36454a0e 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -14,14 +14,14 @@ * limitations under the License. */ +import * as http from 'http'; import onFinished = require('on-finished'); import {getOrInjectContext, makeHeaderWrapper} from '../context'; -// Types-only import. -import {Request, Response, NextFunction} from 'express'; + import {makeHttpRequestData} from './make-http-request'; import {StackdriverHttpRequest} from '../../http-request'; -export interface AnnotatedRequestType extends Request { +interface AnnotatedRequestType extends http.IncomingMessage { log: LoggerType; } @@ -45,7 +45,8 @@ export function makeMiddleware( projectId: string, makeChildLogger: (trace: string) => LoggerType, emitRequestLog?: (httpRequest: StackdriverHttpRequest, trace: string) => void) { - return (req: Request, res: Response, next: NextFunction) => { + return (req: http.IncomingMessage, res: http.ServerResponse, + next: Function) => { // TODO(ofrobots): use high-resolution timer. const requestStartMs = Date.now(); diff --git a/handwritten/logging/test/middleware/express/test-make-http-request.ts b/handwritten/logging/test/middleware/express/test-make-http-request.ts index 6acf9a1b956..c87d5b74542 100644 --- a/handwritten/logging/test/middleware/express/test-make-http-request.ts +++ b/handwritten/logging/test/middleware/express/test-make-http-request.ts @@ -15,8 +15,7 @@ */ import * as assert from 'assert'; -// Types-only import. -import {Request, Response} from 'express'; +import {IncomingMessage, ServerResponse} from 'http'; import {makeHttpRequestData} from '../../../src/middleware/express/make-http-request'; describe('middleware/express/make-http-request', () => { @@ -25,16 +24,17 @@ describe('middleware/express/make-http-request', () => { const fakeResponse = {}; const h1 = makeHttpRequestData( - fakeRequest as Request, fakeResponse as Response, 1003); + fakeRequest as IncomingMessage, fakeResponse as ServerResponse, 1003); assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); const h2 = makeHttpRequestData( - fakeRequest as Request, fakeResponse as Response, 9003.1); + fakeRequest as IncomingMessage, fakeResponse as ServerResponse, 9003.1); assert.deepStrictEqual(h2.latency, {seconds: 9, nanos: 3.1e6}); // Make sure we nanos is uint32. const h3 = makeHttpRequestData( - fakeRequest as Request, fakeResponse as Response, 1.0000000001); + fakeRequest as IncomingMessage, fakeResponse as ServerResponse, + 1.0000000001); assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); }); }); From 74cbcd41639b02f451a67c90d7b9be87db1e04a4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 5 Feb 2019 08:26:50 -0800 Subject: [PATCH 0329/1029] docs: fix example comments (#378) --- .../logging/src/v2/config_service_v2_client.js | 8 ++++---- .../logging/src/v2/logging_service_v2_client.js | 12 ++++++------ .../logging/src/v2/metrics_service_v2_client.js | 4 ++-- handwritten/logging/synth.metadata | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index d1b390efd86..767e5c49a21 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -266,7 +266,7 @@ class ConfigServiceV2Client { * .then(responses => { * const resources = responses[0]; * for (const resource of resources) { - * // doThingsWith(resources[i]) + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -286,7 +286,7 @@ class ConfigServiceV2Client { * // The actual response object, if necessary. * // const rawResponse = responses[2]; * for (const resource of resources) { - * // doThingsWith(resources[i]); + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. @@ -700,7 +700,7 @@ class ConfigServiceV2Client { * .then(responses => { * const resources = responses[0]; * for (const resource of resources) { - * // doThingsWith(resources[i]) + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -720,7 +720,7 @@ class ConfigServiceV2Client { * // The actual response object, if necessary. * // const rawResponse = responses[2]; * for (const resource of resources) { - * // doThingsWith(resources[i]); + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 23966a41751..2022099483a 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -490,7 +490,7 @@ class LoggingServiceV2Client { * .then(responses => { * const resources = responses[0]; * for (const resource of resources) { - * // doThingsWith(resources[i]) + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -510,7 +510,7 @@ class LoggingServiceV2Client { * // The actual response object, if necessary. * // const rawResponse = responses[2]; * for (const resource of resources) { - * // doThingsWith(resources[i]); + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. @@ -664,7 +664,7 @@ class LoggingServiceV2Client { * .then(responses => { * const resources = responses[0]; * for (const resource of resources) { - * // doThingsWith(resources[i]) + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -682,7 +682,7 @@ class LoggingServiceV2Client { * // The actual response object, if necessary. * // const rawResponse = responses[2]; * for (const resource of resources) { - * // doThingsWith(resources[i]); + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. @@ -819,7 +819,7 @@ class LoggingServiceV2Client { * .then(responses => { * const resources = responses[0]; * for (const resource of resources) { - * // doThingsWith(resources[i]) + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -839,7 +839,7 @@ class LoggingServiceV2Client { * // The actual response object, if necessary. * // const rawResponse = responses[2]; * for (const resource of resources) { - * // doThingsWith(resources[i]); + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index cd79b557b59..ed3afd7136f 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -255,7 +255,7 @@ class MetricsServiceV2Client { * .then(responses => { * const resources = responses[0]; * for (const resource of resources) { - * // doThingsWith(resources[i]) + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -275,7 +275,7 @@ class MetricsServiceV2Client { * // The actual response object, if necessary. * // const rawResponse = responses[2]; * for (const resource of resources) { - * // doThingsWith(resources[i]); + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index a816efe9bad..64722f852e5 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-02-02T12:18:08.168510Z", + "updateTime": "2019-02-05T12:14:23.629061Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.8", - "dockerImage": "googleapis/artman@sha256:75bc07ef34a1de9895c18af54dc503ed3b3f3b52e85062e3360a979d2a0741e7" + "version": "0.16.9", + "dockerImage": "googleapis/artman@sha256:80c39fa84e7203c8f355e01bdeef82155013cc39dcaa48fba7a6fe2c253623e3" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "bce093dab3e65c40eb9a37efbdc960f34df6037a", - "internalRef": "231974277" + "sha": "f26c727dde5051abefc5ad9e7dee82a2686ad2b0", + "internalRef": "232306662" } }, { From 73352094437b2788c6d6bed2b7e108d5020395bb Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Tue, 5 Feb 2019 13:51:55 -0800 Subject: [PATCH 0330/1029] docs: add lint/fix example to contributing guide (#379) --- handwritten/logging/.github/CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/handwritten/logging/.github/CONTRIBUTING.md b/handwritten/logging/.github/CONTRIBUTING.md index aaeac9f9483..b958f235007 100644 --- a/handwritten/logging/.github/CONTRIBUTING.md +++ b/handwritten/logging/.github/CONTRIBUTING.md @@ -50,4 +50,8 @@ accept your pull requests. npm test +1. Lint (and maybe fix) any changes: + + npm run fix + [setup]: https://cloud.google.com/nodejs/docs/setup From 5fd78b2ef1fc75a4b98ee2c12da367ed327ab02f Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 7 Feb 2019 15:39:33 -0800 Subject: [PATCH 0331/1029] chore: move CONTRIBUTING.md to root (#382) --- handwritten/logging/{.github => }/CONTRIBUTING.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename handwritten/logging/{.github => }/CONTRIBUTING.md (100%) diff --git a/handwritten/logging/.github/CONTRIBUTING.md b/handwritten/logging/CONTRIBUTING.md similarity index 100% rename from handwritten/logging/.github/CONTRIBUTING.md rename to handwritten/logging/CONTRIBUTING.md From 4d6f845b5cfe46306c03febf0bd9ffbea11f0265 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 7 Feb 2019 18:47:19 -0800 Subject: [PATCH 0332/1029] docs: update contributing path in README (#383) --- handwritten/logging/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index b089513e2b6..e5d444df153 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -127,7 +127,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-logging/blob/master/.github/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-logging/blob/master/CONTRIBUTING.md). ## License From fb518ee320f151a3a4f686261fc61472bf673d42 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Fri, 8 Feb 2019 16:41:10 -0800 Subject: [PATCH 0333/1029] build: test using @grpc/grpc-js in CI (#384) * build: test using @grpc/grpc-js in CI * simplify configs --- .../.kokoro/continuous/node8/system-test-grpcjs.cfg | 12 ++++++++++++ .../.kokoro/presubmit/node8/system-test-grpcjs.cfg | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 handwritten/logging/.kokoro/continuous/node8/system-test-grpcjs.cfg create mode 100644 handwritten/logging/.kokoro/presubmit/node8/system-test-grpcjs.cfg diff --git a/handwritten/logging/.kokoro/continuous/node8/system-test-grpcjs.cfg b/handwritten/logging/.kokoro/continuous/node8/system-test-grpcjs.cfg new file mode 100644 index 00000000000..c71fc6f047b --- /dev/null +++ b/handwritten/logging/.kokoro/continuous/node8/system-test-grpcjs.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/system-test.sh" +} + +env_vars: { + key: "GOOGLE_CLOUD_USE_GRPC_JS" + value: "1" +} diff --git a/handwritten/logging/.kokoro/presubmit/node8/system-test-grpcjs.cfg b/handwritten/logging/.kokoro/presubmit/node8/system-test-grpcjs.cfg new file mode 100644 index 00000000000..c71fc6f047b --- /dev/null +++ b/handwritten/logging/.kokoro/presubmit/node8/system-test-grpcjs.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/system-test.sh" +} + +env_vars: { + key: "GOOGLE_CLOUD_USE_GRPC_JS" + value: "1" +} From 81575298b2b285853b478851f3ef09be3a984ac4 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 10 Feb 2019 20:53:47 -0800 Subject: [PATCH 0334/1029] build: create docs test npm scripts (#385) --- handwritten/logging/.kokoro/docs.sh | 10 +--------- handwritten/logging/package.json | 7 +++++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/handwritten/logging/.kokoro/docs.sh b/handwritten/logging/.kokoro/docs.sh index ea6e514f45d..a4f318794e6 100755 --- a/handwritten/logging/.kokoro/docs.sh +++ b/handwritten/logging/.kokoro/docs.sh @@ -22,12 +22,4 @@ cd $(dirname $0)/.. npm install -npm run docs - -# Check broken links -BIN=./node_modules/.bin - -npm install broken-link-checker -npm install http-server -$BIN/http-server -p 8080 docs/ & -$BIN/blc http://localhost:8080 -r --exclude www.googleapis.com +npm run docs-test diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0dc17ecfe11..3d2cdbad575 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -46,7 +46,9 @@ "pretest": "npm run compile", "posttest": "npm run check", "proto": "npm run proto:logging", - "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -" + "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -", + "docs-test": "blcl docs -r --exclude www.googleapis.com", + "predocs-test": "npm run docs" }, "dependencies": { "@google-cloud/common-grpc": "^0.10.0", @@ -105,6 +107,7 @@ "prettier": "^1.15.1", "proxyquire": "^2.1.0", "typescript": "~3.3.0", - "uuid": "^3.3.2" + "uuid": "^3.3.2", + "broken-link-checker-local": "^0.2.0" } } From aac57f1790ce04a28090a3f48c8e89dae07313c4 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 11 Feb 2019 17:39:41 -0800 Subject: [PATCH 0335/1029] feat: include TypeScript types (#387) --- handwritten/logging/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3d2cdbad575..e95188d6831 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -9,6 +9,7 @@ }, "repository": "googleapis/nodejs-logging", "main": "./build/src/index.js", + "types": "./build/src/index.d.ts", "files": [ "build/src", "build/protos", From c53668c33eb132d903d1bbc6ca7320b81764cb0e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 11 Feb 2019 18:02:55 -0800 Subject: [PATCH 0336/1029] Release v4.4.0 (#388) --- handwritten/logging/CHANGELOG.md | 21 +++++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 0e77ad71efb..7a866ed2cf2 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,27 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.4.0 + +02-11-2019 17:40 PST + +### New Features +- feat: include TypeScript types ([#387](https://github.com/googleapis/nodejs-logging/pull/387)) + +### Bug Fixes +- fix: stop exporting express types publicly ([#376](https://github.com/googleapis/nodejs-logging/pull/376)) + +### Documentation +- docs: update contributing path in README ([#383](https://github.com/googleapis/nodejs-logging/pull/383)) +- chore: move CONTRIBUTING.md to root ([#382](https://github.com/googleapis/nodejs-logging/pull/382)) +- docs: add lint/fix example to contributing guide ([#379](https://github.com/googleapis/nodejs-logging/pull/379)) +- docs: fix example comments ([#378](https://github.com/googleapis/nodejs-logging/pull/378)) + +### Internal / Testing Changes +- build: create docs test npm scripts ([#385](https://github.com/googleapis/nodejs-logging/pull/385)) +- build: test using @grpc/grpc-js in CI ([#384](https://github.com/googleapis/nodejs-logging/pull/384)) +- refactor: improve generated code style. ([#377](https://github.com/googleapis/nodejs-logging/pull/377)) + ## v4.3.0 01-31-2019 12:49 PST diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e95188d6831..ec1eb65df20 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.3.0", + "version": "4.4.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From c6f245fbb2242271414acc7343464bc185d82fef Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 12 Feb 2019 09:30:04 -0800 Subject: [PATCH 0337/1029] chore: use proper enum for GCPEnv (#389) Strings can have typos. Use enum now that it is exported from google-auth-library. --- handwritten/logging/src/metadata.ts | 10 +++++----- handwritten/logging/test/metadata.ts | 14 ++++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index d5831674dac..69bf3f8327b 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -16,7 +16,7 @@ import * as fs from 'fs'; import * as gcpMetadata from 'gcp-metadata'; -import {GoogleAuth} from 'google-auth-library'; +import {GCPEnv, GoogleAuth} from 'google-auth-library'; import * as pify from 'pify'; const readFile = pify(fs.readFile); @@ -139,13 +139,13 @@ export function getGlobalDescriptor() { export async function getDefaultResource(auth: GoogleAuth) { const env = await auth.getEnv(); switch (env) { - case 'KUBERNETES_ENGINE': + case GCPEnv.KUBERNETES_ENGINE: return getGKEDescriptor(); - case 'APP_ENGINE': + case GCPEnv.APP_ENGINE: return getGAEDescriptor(); - case 'CLOUD_FUNCTIONS': + case GCPEnv.CLOUD_FUNCTIONS: return getCloudFunctionDescriptor(); - case 'COMPUTE_ENGINE': + case GCPEnv.COMPUTE_ENGINE: // Test for compute engine should be done after all the rest - // everything runs on top of compute engine. return getGCEDescriptor(); diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index f81b1022684..7bc6ec7aa21 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -17,7 +17,9 @@ import * as assert from 'assert'; import BigNumber from 'bignumber.js'; import * as extend from 'extend'; +import {GCPEnv} from 'google-auth-library'; import * as proxyquire from 'proxyquire'; + import assertRejects = require('assert-rejects'); let instanceOverride; @@ -213,7 +215,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { - return 'APP_ENGINE'; + return GCPEnv.APP_ENGINE; } }; @@ -238,7 +240,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { - return 'CLOUD_FUNCTIONS'; + return GCPEnv.CLOUD_FUNCTIONS; } }; @@ -271,7 +273,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { - return 'COMPUTE_ENGINE'; + return GCPEnv.COMPUTE_ENGINE; } }; const defaultResource = await metadata.getDefaultResource(fakeAuth); @@ -302,7 +304,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { - return 'COMPUTE_ENGINE'; + return GCPEnv.COMPUTE_ENGINE; } }; @@ -327,7 +329,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { - return 'KUBERNETES_ENGINE'; + return GCPEnv.KUBERNETES_ENGINE; } }; @@ -346,7 +348,7 @@ describe('metadata', () => { it('should return correct descriptor', async () => { const fakeAuth = { async getEnv() { - return 'NONE'; + return GCPEnv.NONE; } }; From 683f3a62d1232ae36ab8365060609251be0f5ecd Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 13 Feb 2019 11:51:00 -0800 Subject: [PATCH 0338/1029] refactor: expose and improve types (#393) --- handwritten/logging/src/index.ts | 32 +++++++++++++++++++++++++++++++- handwritten/logging/src/log.ts | 22 +++++++++++++++++++++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 72d18d29217..e4139f44d96 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -37,7 +37,7 @@ const PKG = require('../../package.json'); const v2 = require('./v2'); import {Entry} from './entry'; -import {Log, GetEntriesRequest} from './log'; +import {Log, GetEntriesRequest, MonitoredResource, Severity, SeverityNames} from './log'; import {Sink} from './sink'; import {Duplex} from 'stream'; import {AbortableDuplex} from '@google-cloud/common'; @@ -47,6 +47,25 @@ export interface LoggingOptions extends gax.GoogleAuthOptions { maxRetries?: number; } +/** + * For logged errors, one can provide a the service context. For more + * information see [this guide]{@link + * https://cloud.google.com/error-reporting/docs/formatting-error-messages} + * and the [official documentation]{@link + * https://cloud.google.com/error-reporting/reference/rest/v1beta1/ServiceContext}. + */ +export interface ServiceContext { + /** + * An identifier of the service, such as the name of the executable, job, or + * Google App Engine service name. + */ + service?: string; + /** + * Represents the version of the service. + */ + version?: string; +} + /** * @namespace google */ @@ -932,6 +951,8 @@ export {Entry}; * @type {Constructor} */ export {Log}; +export {Severity}; +export {SeverityNames}; /** * {@link Sink} class. @@ -942,6 +963,15 @@ export {Log}; */ export {Sink}; +/** + * {@link MonitoredResource} class. + * + * @name Logging.MonitoredResource + * @see MonitoredResource + * @type {Interface} + */ +export {MonitoredResource}; + /** * The default export of the `@google-cloud/logging` package is the * {@link Logging} class. diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index b007815c5d5..e42ed73f733 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -57,6 +57,26 @@ export interface WriteOptions { resource?: MonitoredResource; } +export enum Severity { + emergency, + alert, + critical, + error, + warning, + notice, + info, + debug +} + +export type SeverityNames = keyof typeof Severity; + +// Mapped types are only supported in type aliases and not in interfaces and +// classes. +type LogSeverityFunctions = { + // FIXME: the following can be made more precise. + [P in SeverityNames]: Function; +}; + /** * A log is a named collection of entries, each entry representing a timestamped * event. Logs can be produced by Google Cloud Platform services, by third-party @@ -79,7 +99,7 @@ export interface WriteOptions { * const logging = new Logging(); * const log = logging.log('syslog'); */ -class Log { +class Log implements LogSeverityFunctions { formattedName_: string; removeCircular_: boolean; logging: Logging; From 8efa583ffe168654aa1a81c7443d95244c482bc3 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Feb 2019 08:49:36 -0800 Subject: [PATCH 0339/1029] docs: update links in contrib guide (#399) --- handwritten/logging/CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/CONTRIBUTING.md b/handwritten/logging/CONTRIBUTING.md index b958f235007..78aaa61b269 100644 --- a/handwritten/logging/CONTRIBUTING.md +++ b/handwritten/logging/CONTRIBUTING.md @@ -16,11 +16,9 @@ Please fill out either the individual or corporate Contributor License Agreement (CLA). * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual CLA] - (https://developers.google.com/open-source/cla/individual). + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA] - (https://developers.google.com/open-source/cla/corporate). + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to From 7f9ee6c48ad1c0f83c34a45b5b9632d7c9538921 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Feb 2019 12:21:57 -0800 Subject: [PATCH 0340/1029] build: use linkinator for docs test (#397) --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ec1eb65df20..e4bee631bca 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -48,7 +48,7 @@ "posttest": "npm run check", "proto": "npm run proto:logging", "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -", - "docs-test": "blcl docs -r --exclude www.googleapis.com", + "docs-test": "linkinator docs -r --skip www.googleapis.com", "predocs-test": "npm run docs" }, "dependencies": { @@ -109,6 +109,6 @@ "proxyquire": "^2.1.0", "typescript": "~3.3.0", "uuid": "^3.3.2", - "broken-link-checker-local": "^0.2.0" + "linkinator": "^1.1.2" } } From 33f8fa807a54aa089a568f9dd537414e9afb3537 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 14 Feb 2019 12:29:12 -0800 Subject: [PATCH 0341/1029] fix(deps): update dependency @google-cloud/promisify to ^0.4.0 (#398) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e4bee631bca..3389408fbb2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "@google-cloud/common-grpc": "^0.10.0", "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", - "@google-cloud/promisify": "^0.3.0", + "@google-cloud/promisify": "^0.4.0", "@opencensus/propagation-stackdriver": "0.0.8", "arrify": "^1.0.1", "eventid": "^0.1.2", From 229cb34dec786d672e2d27376b54597cc6614083 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 14 Feb 2019 12:29:48 -0800 Subject: [PATCH 0342/1029] fix: throw on invalid credentials (#395) --- handwritten/logging/src/v2/config_service_v2_client.js | 4 ++++ .../logging/src/v2/logging_service_v2_client.js | 4 ++++ .../logging/src/v2/metrics_service_v2_client.js | 4 ++++ handwritten/logging/synth.metadata | 10 +++++----- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 767e5c49a21..a350b9e83e3 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -161,6 +161,10 @@ class ConfigServiceV2Client { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 2022099483a..1b15ec4f335 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -186,6 +186,10 @@ class LoggingServiceV2Client { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index ed3afd7136f..9334e999c1e 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -153,6 +153,10 @@ class MetricsServiceV2Client { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 64722f852e5..6fba464f7f8 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-02-05T12:14:23.629061Z", + "updateTime": "2019-02-13T12:19:42.912618Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.9", - "dockerImage": "googleapis/artman@sha256:80c39fa84e7203c8f355e01bdeef82155013cc39dcaa48fba7a6fe2c253623e3" + "version": "0.16.13", + "dockerImage": "googleapis/artman@sha256:5fd9aee1d82a00cebf425c8fa431f5457539562f5867ad9c54370f0ec9a7ccaa" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f26c727dde5051abefc5ad9e7dee82a2686ad2b0", - "internalRef": "232306662" + "sha": "ca61898878f0926dd9dcc68ba90764f17133efe4", + "internalRef": "233680013" } }, { From 1bacf34b17e34fd142c422e3a132b9e0f27b5389 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 14 Feb 2019 13:16:00 -0800 Subject: [PATCH 0343/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.9 (#394) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3389408fbb2..41ac979220a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "@google-cloud/paginator": "^0.1.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.4.0", - "@opencensus/propagation-stackdriver": "0.0.8", + "@opencensus/propagation-stackdriver": "0.0.9", "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", From 170c242654b827de315596cbd31f0d4d4a7b645a Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 15 Feb 2019 17:20:00 -0800 Subject: [PATCH 0344/1029] feat: ability to detect service context (#400) Ref: https://github.com/googleapis/nodejs-logging-bunyan/issues/135 --- handwritten/logging/src/index.ts | 2 + handwritten/logging/src/metadata.ts | 33 +++++++++++ handwritten/logging/test/metadata.ts | 82 ++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index e4139f44d96..3a4e2871a72 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -28,10 +28,12 @@ const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; import * as through from 'through2'; import * as middleware from './middleware'; +import {detectServiceContext} from './metadata'; import {StackdriverHttpRequest as HttpRequest} from './http-request'; export {middleware}; export {HttpRequest}; +export {detectServiceContext}; const PKG = require('../../package.json'); const v2 = require('./v2'); diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 69bf3f8327b..609db4f50b5 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -19,6 +19,8 @@ import * as gcpMetadata from 'gcp-metadata'; import {GCPEnv, GoogleAuth} from 'google-auth-library'; import * as pify from 'pify'; +import {ServiceContext} from './index'; + const readFile = pify(fs.readFile); function zoneFromQualifiedZone(qualified: string): string|undefined { @@ -153,3 +155,34 @@ export async function getDefaultResource(auth: GoogleAuth) { return getGlobalDescriptor(); } } + +/** + * For logged errors, users can provide a service context. This enables errors + * to be picked up Stackdriver Error Reporting. For more information see + * [this guide]{@link + * https://cloud.google.com/error-reporting/docs/formatting-error-messages} and + * the [official documentation]{@link + * https://cloud.google.com/error-reporting/reference/rest/v1beta1/ServiceContext}. + */ +export async function detectServiceContext(auth: GoogleAuth): + Promise { + const env = await auth.getEnv(); + switch (env) { + case GCPEnv.APP_ENGINE: + return { + service: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, + version: process.env.GAE_VERSION || process.env.GAE_MODULE_VERSION, + }; + case GCPEnv.CLOUD_FUNCTIONS: + return { + service: process.env.FUNCTION_NAME, + }; + // One Kubernetes we probably need to use the pod-name to describe the + // service. Currently there isn't a universal way to acquire the pod + // name from within the pod. + case GCPEnv.KUBERNETES_ENGINE: + case GCPEnv.COMPUTE_ENGINE: + default: + return null; + } +} diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 7bc6ec7aa21..2d157fd7642 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -21,6 +21,7 @@ import {GCPEnv} from 'google-auth-library'; import * as proxyquire from 'proxyquire'; import assertRejects = require('assert-rejects'); +import {detectServiceContext} from '../src/metadata'; let instanceOverride; const fakeGcpMetadata = { @@ -360,4 +361,85 @@ describe('metadata', () => { }); }); }); + + describe('detectServiceContext', () => { + it('should return the correct descriptor for App Engine', async () => { + const GAE_MODULE_NAME = 'gae-module-name'; + const GAE_MODULE_VERSION = 'gae-module-version'; + const GAE_SERVICE = 'gae-service'; + const GAE_VERSION = 'gae-version'; + process.env.GAE_MODULE_NAME = GAE_MODULE_NAME; + process.env.GAE_MODULE_VERSION = GAE_MODULE_VERSION; + process.env.GAE_SERVICE = GAE_SERVICE; + process.env.GAE_VERSION = GAE_VERSION; + const fakeAuth = { + async getEnv() { + return GCPEnv.APP_ENGINE; + } + }; + + const sc1 = await metadata.detectServiceContext(fakeAuth); + assert.deepStrictEqual(sc1, { + service: GAE_SERVICE, + version: GAE_VERSION, + }); + + delete process.env.GAE_SERVICE; + const sc2 = await metadata.detectServiceContext(fakeAuth); + assert.deepStrictEqual(sc2, { + service: GAE_MODULE_NAME, + version: GAE_VERSION, + }); + + delete process.env.GAE_VERSION; + const sc3 = await metadata.detectServiceContext(fakeAuth); + assert.deepStrictEqual(sc3, { + service: GAE_MODULE_NAME, + version: GAE_MODULE_VERSION, + }); + }); + + it('should return the correct descriptor for Cloud Functions', async () => { + const FUNCTION_NAME = process.env.FUNCTION_NAME = 'function-name'; + + const fakeAuth = { + async getEnv() { + return GCPEnv.CLOUD_FUNCTIONS; + } + }; + + const sc1 = await metadata.detectServiceContext(fakeAuth); + assert.deepStrictEqual(sc1, {service: FUNCTION_NAME}); + }); + + it('should return null on GKE', async () => { + const fakeAuth = { + async getEnv() { + return GCPEnv.KUBERNETES_ENGINE; + } + }; + const serviceContext = await metadata.detectServiceContext(fakeAuth); + assert.strictEqual(serviceContext, null); + }); + + it('should return null on GCE', async () => { + const fakeAuth = { + async getEnv() { + return GCPEnv.COMPUTE_ENGINE; + } + }; + const serviceContext = await metadata.detectServiceContext(fakeAuth); + assert.strictEqual(serviceContext, null); + }); + + it('should return null elsewhere', async () => { + const fakeAuth = { + async getEnv() { + return GCPEnv.NONE; + } + }; + const serviceContext = await metadata.detectServiceContext(fakeAuth); + assert.strictEqual(serviceContext, null); + }); + }); }); From 8b90537f8b6610614153b1fc3cddcd0c3697fad2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 18 Feb 2019 22:44:29 -0800 Subject: [PATCH 0345/1029] fix(deps): update dependency gcp-metadata to v1 (#402) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 41ac979220a..c13dacf5c61 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -60,7 +60,7 @@ "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", - "gcp-metadata": "^0.9.0", + "gcp-metadata": "^1.0.0", "google-auth-library": "^3.0.0", "google-gax": "^0.25.0", "is": "^3.2.1", From 44d96cb9c6c7ffdc51bfed24a0d194a4d519cc24 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 19 Feb 2019 15:43:24 -0500 Subject: [PATCH 0346/1029] chore(deps): update dependency mocha to v6 (#403) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c13dacf5c61..24cee060d68 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -101,7 +101,7 @@ "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^5.2.0", + "mocha": "^6.0.0", "nock": "^10.0.1", "nyc": "^13.0.1", "power-assert": "^1.6.0", From f67e4c2395a69ee78240d5a2fa80bdbe35e06640 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 26 Feb 2019 05:52:17 -0800 Subject: [PATCH 0347/1029] chore: update proto docs and code style --- .../protos/google/logging/v2/log_entry.proto | 1 - .../protos/google/logging/v2/logging.proto | 39 ++----- .../google/logging/v2/logging_config.proto | 107 +++++------------- .../google/logging/v2/logging_metrics.proto | 1 - .../src/v2/config_service_v2_client.js | 8 +- .../doc/google/api/doc_monitored_resource.js | 37 +++--- .../google/logging/type/doc_http_request.js | 6 +- .../google/logging/v2/doc_logging_config.js | 8 +- handwritten/logging/synth.metadata | 10 +- 9 files changed, 81 insertions(+), 136 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 2f1530e23f6..de9786daf73 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -33,7 +33,6 @@ option java_outer_classname = "LogEntryProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; - // An individual entry in a log. message LogEntry { // Required. The resource name of the log to which this log entry belongs: diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index b1812e6f82d..d04cd5c03dd 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -33,7 +33,6 @@ option java_outer_classname = "LoggingProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; - // Service for ingesting and querying logs. service LoggingServiceV2 { // Deletes all the log entries in a log. @@ -43,15 +42,9 @@ service LoggingServiceV2 { rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{log_name=projects/*/logs/*}" - additional_bindings { - delete: "/v2/{log_name=organizations/*/logs/*}" - } - additional_bindings { - delete: "/v2/{log_name=folders/*/logs/*}" - } - additional_bindings { - delete: "/v2/{log_name=billingAccounts/*/logs/*}" - } + additional_bindings { delete: "/v2/{log_name=organizations/*/logs/*}" } + additional_bindings { delete: "/v2/{log_name=folders/*/logs/*}" } + additional_bindings { delete: "/v2/{log_name=billingAccounts/*/logs/*}" } }; } @@ -62,7 +55,8 @@ service LoggingServiceV2 { // A single request may contain log entries for a maximum of 1000 // different resources (projects, organizations, billing accounts or // folders) - rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { + rpc WriteLogEntries(WriteLogEntriesRequest) + returns (WriteLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:write" body: "*" @@ -80,7 +74,8 @@ service LoggingServiceV2 { } // Lists the descriptors for monitored resource types used by Logging. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) + returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; @@ -91,18 +86,10 @@ service LoggingServiceV2 { rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/logs" - additional_bindings { - get: "/v2/{parent=projects/*}/logs" - } - additional_bindings { - get: "/v2/{parent=organizations/*}/logs" - } - additional_bindings { - get: "/v2/{parent=folders/*}/logs" - } - additional_bindings { - get: "/v2/{parent=billingAccounts/*}/logs" - } + additional_bindings { get: "/v2/{parent=projects/*}/logs" } + additional_bindings { get: "/v2/{parent=organizations/*}/logs" } + additional_bindings { get: "/v2/{parent=folders/*}/logs" } + additional_bindings { get: "/v2/{parent=billingAccounts/*}/logs" } }; } } @@ -201,9 +188,7 @@ message WriteLogEntriesRequest { // Result returned from WriteLogEntries. // empty -message WriteLogEntriesResponse { - -} +message WriteLogEntriesResponse {} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 8803ace8180..2afea1062df 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -30,7 +30,6 @@ option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; - // Service for configuring sinks used to export log entries out of // Logging. service ConfigServiceV2 { @@ -38,18 +37,10 @@ service ConfigServiceV2 { rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/sinks" - additional_bindings { - get: "/v2/{parent=projects/*}/sinks" - } - additional_bindings { - get: "/v2/{parent=organizations/*}/sinks" - } - additional_bindings { - get: "/v2/{parent=folders/*}/sinks" - } - additional_bindings { - get: "/v2/{parent=billingAccounts/*}/sinks" - } + additional_bindings { get: "/v2/{parent=projects/*}/sinks" } + additional_bindings { get: "/v2/{parent=organizations/*}/sinks" } + additional_bindings { get: "/v2/{parent=folders/*}/sinks" } + additional_bindings { get: "/v2/{parent=billingAccounts/*}/sinks" } }; } @@ -57,18 +48,10 @@ service ConfigServiceV2 { rpc GetSink(GetSinkRequest) returns (LogSink) { option (google.api.http) = { get: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { - get: "/v2/{sink_name=projects/*/sinks/*}" - } - additional_bindings { - get: "/v2/{sink_name=organizations/*/sinks/*}" - } - additional_bindings { - get: "/v2/{sink_name=folders/*/sinks/*}" - } - additional_bindings { - get: "/v2/{sink_name=billingAccounts/*/sinks/*}" - } + additional_bindings { get: "/v2/{sink_name=projects/*/sinks/*}" } + additional_bindings { get: "/v2/{sink_name=organizations/*/sinks/*}" } + additional_bindings { get: "/v2/{sink_name=folders/*/sinks/*}" } + additional_bindings { get: "/v2/{sink_name=billingAccounts/*/sinks/*}" } }; } @@ -80,18 +63,12 @@ service ConfigServiceV2 { option (google.api.http) = { post: "/v2/{parent=*/*}/sinks" body: "sink" - additional_bindings { - post: "/v2/{parent=projects/*}/sinks" - body: "sink" - } + additional_bindings { post: "/v2/{parent=projects/*}/sinks" body: "sink" } additional_bindings { post: "/v2/{parent=organizations/*}/sinks" body: "sink" } - additional_bindings { - post: "/v2/{parent=folders/*}/sinks" - body: "sink" - } + additional_bindings { post: "/v2/{parent=folders/*}/sinks" body: "sink" } additional_bindings { post: "/v2/{parent=billingAccounts/*}/sinks" body: "sink" @@ -147,15 +124,9 @@ service ConfigServiceV2 { rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { - delete: "/v2/{sink_name=projects/*/sinks/*}" - } - additional_bindings { - delete: "/v2/{sink_name=organizations/*/sinks/*}" - } - additional_bindings { - delete: "/v2/{sink_name=folders/*/sinks/*}" - } + additional_bindings { delete: "/v2/{sink_name=projects/*/sinks/*}" } + additional_bindings { delete: "/v2/{sink_name=organizations/*/sinks/*}" } + additional_bindings { delete: "/v2/{sink_name=folders/*/sinks/*}" } additional_bindings { delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" } @@ -166,18 +137,10 @@ service ConfigServiceV2 { rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/exclusions" - additional_bindings { - get: "/v2/{parent=projects/*}/exclusions" - } - additional_bindings { - get: "/v2/{parent=organizations/*}/exclusions" - } - additional_bindings { - get: "/v2/{parent=folders/*}/exclusions" - } - additional_bindings { - get: "/v2/{parent=billingAccounts/*}/exclusions" - } + additional_bindings { get: "/v2/{parent=projects/*}/exclusions" } + additional_bindings { get: "/v2/{parent=organizations/*}/exclusions" } + additional_bindings { get: "/v2/{parent=folders/*}/exclusions" } + additional_bindings { get: "/v2/{parent=billingAccounts/*}/exclusions" } }; } @@ -185,18 +148,10 @@ service ConfigServiceV2 { rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { option (google.api.http) = { get: "/v2/{name=*/*/exclusions/*}" - additional_bindings { - get: "/v2/{name=projects/*/exclusions/*}" - } - additional_bindings { - get: "/v2/{name=organizations/*/exclusions/*}" - } - additional_bindings { - get: "/v2/{name=folders/*/exclusions/*}" - } - additional_bindings { - get: "/v2/{name=billingAccounts/*/exclusions/*}" - } + additional_bindings { get: "/v2/{name=projects/*/exclusions/*}" } + additional_bindings { get: "/v2/{name=organizations/*/exclusions/*}" } + additional_bindings { get: "/v2/{name=folders/*/exclusions/*}" } + additional_bindings { get: "/v2/{name=billingAccounts/*/exclusions/*}" } }; } @@ -254,15 +209,9 @@ service ConfigServiceV2 { rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" - additional_bindings { - delete: "/v2/{name=projects/*/exclusions/*}" - } - additional_bindings { - delete: "/v2/{name=organizations/*/exclusions/*}" - } - additional_bindings { - delete: "/v2/{name=folders/*/exclusions/*}" - } + additional_bindings { delete: "/v2/{name=projects/*/exclusions/*}" } + additional_bindings { delete: "/v2/{name=organizations/*/exclusions/*}" } + additional_bindings { delete: "/v2/{name=folders/*/exclusions/*}" } additional_bindings { delete: "/v2/{name=billingAccounts/*/exclusions/*}" } @@ -431,7 +380,8 @@ message CreateSinkRequest { // 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][google.logging.v2.LogSink]. + // more information, see `writer_identity` in + // [LogSink][google.logging.v2.LogSink]. bool unique_writer_identity = 3; } @@ -611,8 +561,9 @@ message UpdateExclusionRequest { // Required. A nonempty list of fields to change in the existing exclusion. // New values for the fields are taken from the corresponding fields in the - // [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in - // `update_mask` are not changed and are ignored in the request. + // [LogExclusion][google.logging.v2.LogExclusion] included in this request. + // Fields not mentioned in `update_mask` are not changed and are ignored in + // the request. // // For example, to change the filter and description of an exclusion, // specify an `update_mask` of `"filter,description"`. diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 229fb7ca5cc..dd3fa87821d 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -32,7 +32,6 @@ option java_outer_classname = "LoggingMetricsProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; - // Service for configuring logs-based metrics. service MetricsServiceV2 { // Lists logs-based metrics. diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index a350b9e83e3..a28e237bb94 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -459,7 +459,8 @@ class ConfigServiceV2Client { * 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. + * more information, see `writer_identity` in + * LogSink. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. @@ -947,8 +948,9 @@ class ConfigServiceV2Client { * @param {Object} request.updateMask * Required. A nonempty list of fields to change in the existing exclusion. * New values for the fields are taken from the corresponding fields in the - * LogExclusion included in this request. Fields not mentioned in - * `update_mask` are not changed and are ignored in the request. + * LogExclusion included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. * * For example, to change the filter and description of an exclusion, * specify an `update_mask` of `"filter,description"`. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 24321d640b0..29ad2b03aec 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -16,9 +16,10 @@ // to be loaded as the JS file. /** - * An object that describes the schema of a MonitoredResource object using a - * type name and a set of labels. For example, the monitored resource - * descriptor for Google Compute Engine VM instances has a type of + * An object that describes the schema of a + * MonitoredResource object using a type name + * and a set of labels. For example, the monitored resource descriptor for + * Google Compute Engine VM instances has a type of * `"gce_instance"` and specifies the use of the labels `"instance_id"` and * `"zone"` to identify particular VM instances. * @@ -68,11 +69,13 @@ const MonitoredResourceDescriptor = { * An object representing a resource that can be used for monitoring, logging, * billing, or other purposes. Examples include virtual machine instances, * databases, and storage devices such as disks. The `type` field identifies a - * MonitoredResourceDescriptor object that describes the resource's - * schema. Information in the `labels` field identifies the actual resource and - * its attributes according to the schema. For example, a particular Compute - * Engine VM instance could be represented by the following object, because the - * MonitoredResourceDescriptor for `"gce_instance"` has labels + * MonitoredResourceDescriptor object + * that describes the resource's schema. Information in the `labels` field + * identifies the actual resource and its attributes according to the schema. + * For example, a particular Compute Engine VM instance could be represented by + * the following object, because the + * MonitoredResourceDescriptor for + * `"gce_instance"` has labels * `"instance_id"` and `"zone"`: * * { "type": "gce_instance", @@ -81,8 +84,10 @@ const MonitoredResourceDescriptor = { * * @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 Compute Engine VM instance is `gce_instance`. + * the `type` field of a + * MonitoredResourceDescriptor + * object. For example, the type of a Compute Engine VM instance is + * `gce_instance`. * * @property {Object.} labels * Required. Values for all of the labels listed in the associated monitored @@ -98,12 +103,12 @@ const MonitoredResource = { }; /** - * Auxiliary metadata for a MonitoredResource object. - * MonitoredResource objects contain the minimum set of information to - * uniquely identify a monitored resource instance. There is some other useful - * auxiliary metadata. Monitoring and Logging use an ingestion - * pipeline to extract metadata for cloud resources of all types, and store - * the metadata in this message. + * Auxiliary metadata for a MonitoredResource + * object. MonitoredResource objects contain the + * minimum set of information to uniquely identify a monitored resource + * instance. There is some other useful auxiliary metadata. Monitoring and + * Logging use an ingestion pipeline to extract metadata for cloud resources of + * all types, and store the metadata in this message. * * @property {Object} systemLabels * Output only. Values for predefined system metadata labels. diff --git a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js index 5b705250d51..b8434663c3a 100644 --- a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js +++ b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js @@ -42,7 +42,8 @@ * * @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)"`. + * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET + * CLR 1.0.3705)"`. * * @property {string} remoteIp * The IP address (IPv4 or IPv6) of the client that issued the HTTP @@ -54,7 +55,8 @@ * * @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). + * [HTTP/1.1 Header Field + * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). * * @property {Object} latency * The request processing latency on the server, from the time the request was diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index 89e056bcad8..57148ea4524 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -232,7 +232,8 @@ const GetSinkRequest = { * 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. + * more information, see `writer_identity` in + * LogSink. * * @typedef CreateSinkRequest * @memberof google.logging.v2 @@ -486,8 +487,9 @@ const CreateExclusionRequest = { * @property {Object} updateMask * Required. A nonempty list of fields to change in the existing exclusion. * New values for the fields are taken from the corresponding fields in the - * LogExclusion included in this request. Fields not mentioned in - * `update_mask` are not changed and are ignored in the request. + * LogExclusion included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. * * For example, to change the filter and description of an exclusion, * specify an `update_mask` of `"filter,description"`. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 6fba464f7f8..a2e21abca1f 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-02-13T12:19:42.912618Z", + "updateTime": "2019-02-26T12:33:03.800153Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.13", - "dockerImage": "googleapis/artman@sha256:5fd9aee1d82a00cebf425c8fa431f5457539562f5867ad9c54370f0ec9a7ccaa" + "version": "0.16.14", + "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ca61898878f0926dd9dcc68ba90764f17133efe4", - "internalRef": "233680013" + "sha": "29f098cb03a9983cc9cb15993de5da64419046f2", + "internalRef": "235621085" } }, { From afaa35d78d09e7f0b018b7b622674df5eb8a06e7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 26 Feb 2019 06:26:14 -0800 Subject: [PATCH 0348/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.25.0 (#405) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 24cee060d68..ddc2829aa60 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "devDependencies": { "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.24.0", + "@google-cloud/pubsub": "^0.25.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/extend": "^3.0.0", From 82b0b7af85cc09b6470ad65105fcc9ae769f1454 Mon Sep 17 00:00:00 2001 From: Alex <7764119+AVaksman@users.noreply.github.com> Date: Fri, 1 Mar 2019 11:39:23 -0500 Subject: [PATCH 0349/1029] refactor (typescript): noImplilcitAny (#408) --- handwritten/logging/package.json | 3 +- handwritten/logging/proto/logging_config.d.ts | 5376 +++++++++++++++++ handwritten/logging/src/index.ts | 221 +- handwritten/logging/src/log.ts | 28 +- handwritten/logging/src/sink.ts | 70 +- handwritten/logging/system-test/logging.ts | 10 +- handwritten/logging/test/index.ts | 10 +- handwritten/logging/test/sink.ts | 6 +- 8 files changed, 5615 insertions(+), 109 deletions(-) create mode 100644 handwritten/logging/proto/logging_config.d.ts diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ddc2829aa60..34d80cfb77d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -46,8 +46,9 @@ "prepare": "npm run compile", "pretest": "npm run compile", "posttest": "npm run check", - "proto": "npm run proto:logging", + "proto": "npm run proto:logging && npm run proto:logging_config", "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -", + "proto:logging_config": "pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging_config.proto | pbts -o proto/logging_config.d.ts -", "docs-test": "linkinator docs -r --skip www.googleapis.com", "predocs-test": "npm run docs" }, diff --git a/handwritten/logging/proto/logging_config.d.ts b/handwritten/logging/proto/logging_config.d.ts new file mode 100644 index 00000000000..b96ed56b7c7 --- /dev/null +++ b/handwritten/logging/proto/logging_config.d.ts @@ -0,0 +1,5376 @@ +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace logging. */ + namespace logging { + + /** Namespace v2. */ + namespace v2 { + + /** Represents a ConfigServiceV2 */ + class ConfigServiceV2 extends $protobuf.rpc.Service { + + /** + * Constructs a new ConfigServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; + + /** + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSinksResponse + */ + public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; + + /** + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @returns Promise + */ + public listSinks(request: google.logging.v2.IListSinksRequest): Promise; + + /** + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; + + /** + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @returns Promise + */ + public getSink(request: google.logging.v2.IGetSinkRequest): Promise; + + /** + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; + + /** + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @returns Promise + */ + public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; + + /** + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; + + /** + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @returns Promise + */ + public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; + + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; + + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @returns Promise + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; + + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; + + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @returns Promise + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; + + /** + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; + + /** + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @returns Promise + */ + public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; + + /** + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; + + /** + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @returns Promise + */ + public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; + + /** + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; + + /** + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @returns Promise + */ + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; + + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; + + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @returns Promise + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; + } + + namespace ConfigServiceV2 { + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @param error Error, if any + * @param [response] ListSinksResponse + */ + type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @param error Error, if any + * @param [response] ListExclusionsResponse + */ + type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a LogSink. */ + interface ILogSink { + + /** LogSink name */ + name?: (string|null); + + /** LogSink destination */ + destination?: (string|null); + + /** LogSink filter */ + filter?: (string|null); + + /** LogSink outputVersionFormat */ + outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|null); + + /** LogSink writerIdentity */ + writerIdentity?: (string|null); + + /** LogSink includeChildren */ + includeChildren?: (boolean|null); + + /** LogSink startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** LogSink endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a LogSink. */ + class LogSink implements ILogSink { + + /** + * Constructs a new LogSink. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogSink); + + /** LogSink name. */ + public name: string; + + /** LogSink destination. */ + public destination: string; + + /** LogSink filter. */ + public filter: string; + + /** LogSink outputVersionFormat. */ + public outputVersionFormat: google.logging.v2.LogSink.VersionFormat; + + /** LogSink writerIdentity. */ + public writerIdentity: string; + + /** LogSink includeChildren. */ + public includeChildren: boolean; + + /** LogSink startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** LogSink endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new LogSink instance using the specified properties. + * @param [properties] Properties to set + * @returns LogSink instance + */ + public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; + + /** + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogSink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; + + /** + * Decodes a LogSink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; + + /** + * Verifies a LogSink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogSink + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; + + /** + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @param message LogSink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogSink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace LogSink { + + /** VersionFormat enum. */ + enum VersionFormat { + VERSION_FORMAT_UNSPECIFIED = 0, + V2 = 1, + V1 = 2 + } + } + + /** Properties of a ListSinksRequest. */ + interface IListSinksRequest { + + /** ListSinksRequest parent */ + parent?: (string|null); + + /** ListSinksRequest pageToken */ + pageToken?: (string|null); + + /** ListSinksRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListSinksRequest. */ + class ListSinksRequest implements IListSinksRequest { + + /** + * Constructs a new ListSinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListSinksRequest); + + /** ListSinksRequest parent. */ + public parent: string; + + /** ListSinksRequest pageToken. */ + public pageToken: string; + + /** ListSinksRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListSinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSinksRequest instance + */ + public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; + + /** + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; + + /** + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; + + /** + * Verifies a ListSinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; + + /** + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @param message ListSinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListSinksResponse. */ + interface IListSinksResponse { + + /** ListSinksResponse sinks */ + sinks?: (google.logging.v2.ILogSink[]|null); + + /** ListSinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSinksResponse. */ + class ListSinksResponse implements IListSinksResponse { + + /** + * Constructs a new ListSinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListSinksResponse); + + /** ListSinksResponse sinks. */ + public sinks: google.logging.v2.ILogSink[]; + + /** ListSinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSinksResponse instance + */ + public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; + + /** + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; + + /** + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; + + /** + * Verifies a ListSinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; + + /** + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @param message ListSinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetSinkRequest. */ + interface IGetSinkRequest { + + /** GetSinkRequest sinkName */ + sinkName?: (string|null); + } + + /** Represents a GetSinkRequest. */ + class GetSinkRequest implements IGetSinkRequest { + + /** + * Constructs a new GetSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetSinkRequest); + + /** GetSinkRequest sinkName. */ + public sinkName: string; + + /** + * Creates a new GetSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSinkRequest instance + */ + public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; + + /** + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; + + /** + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; + + /** + * Verifies a GetSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; + + /** + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @param message GetSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateSinkRequest. */ + interface ICreateSinkRequest { + + /** CreateSinkRequest parent */ + parent?: (string|null); + + /** CreateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); + + /** CreateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + } + + /** Represents a CreateSinkRequest. */ + class CreateSinkRequest implements ICreateSinkRequest { + + /** + * Constructs a new CreateSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateSinkRequest); + + /** CreateSinkRequest parent. */ + public parent: string; + + /** CreateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** CreateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSinkRequest instance + */ + public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; + + /** + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; + + /** + * Verifies a CreateSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; + + /** + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @param message CreateSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSinkRequest. */ + interface IUpdateSinkRequest { + + /** UpdateSinkRequest sinkName */ + sinkName?: (string|null); + + /** UpdateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + + /** UpdateSinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSinkRequest. */ + class UpdateSinkRequest implements IUpdateSinkRequest { + + /** + * Constructs a new UpdateSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateSinkRequest); + + /** UpdateSinkRequest sinkName. */ + public sinkName: string; + + /** UpdateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; + + /** UpdateSinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSinkRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; + + /** + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; + + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; + + /** + * Verifies an UpdateSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; + + /** + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @param message UpdateSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteSinkRequest. */ + interface IDeleteSinkRequest { + + /** DeleteSinkRequest sinkName */ + sinkName?: (string|null); + } + + /** Represents a DeleteSinkRequest. */ + class DeleteSinkRequest implements IDeleteSinkRequest { + + /** + * Constructs a new DeleteSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteSinkRequest); + + /** DeleteSinkRequest sinkName. */ + public sinkName: string; + + /** + * Creates a new DeleteSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSinkRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + + /** + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + + /** + * Verifies a DeleteSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + + /** + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @param message DeleteSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogExclusion. */ + interface ILogExclusion { + + /** LogExclusion name */ + name?: (string|null); + + /** LogExclusion description */ + description?: (string|null); + + /** LogExclusion filter */ + filter?: (string|null); + + /** LogExclusion disabled */ + disabled?: (boolean|null); + } + + /** Represents a LogExclusion. */ + class LogExclusion implements ILogExclusion { + + /** + * Constructs a new LogExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogExclusion); + + /** LogExclusion name. */ + public name: string; + + /** LogExclusion description. */ + public description: string; + + /** LogExclusion filter. */ + public filter: string; + + /** LogExclusion disabled. */ + public disabled: boolean; + + /** + * Creates a new LogExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns LogExclusion instance + */ + public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; + + /** + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; + + /** + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; + + /** + * Verifies a LogExclusion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogExclusion + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; + + /** + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * @param message LogExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListExclusionsRequest. */ + interface IListExclusionsRequest { + + /** ListExclusionsRequest parent */ + parent?: (string|null); + + /** ListExclusionsRequest pageToken */ + pageToken?: (string|null); + + /** ListExclusionsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListExclusionsRequest. */ + class ListExclusionsRequest implements IListExclusionsRequest { + + /** + * Constructs a new ListExclusionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListExclusionsRequest); + + /** ListExclusionsRequest parent. */ + public parent: string; + + /** ListExclusionsRequest pageToken. */ + public pageToken: string; + + /** ListExclusionsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListExclusionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExclusionsRequest instance + */ + public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; + + /** + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; + + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; + + /** + * Verifies a ListExclusionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExclusionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; + + /** + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @param message ListExclusionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListExclusionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListExclusionsResponse. */ + interface IListExclusionsResponse { + + /** ListExclusionsResponse exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); + + /** ListExclusionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListExclusionsResponse. */ + class ListExclusionsResponse implements IListExclusionsResponse { + + /** + * Constructs a new ListExclusionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListExclusionsResponse); + + /** ListExclusionsResponse exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; + + /** ListExclusionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListExclusionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExclusionsResponse instance + */ + public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; + + /** + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; + + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; + + /** + * Verifies a ListExclusionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExclusionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; + + /** + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @param message ListExclusionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListExclusionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetExclusionRequest. */ + interface IGetExclusionRequest { + + /** GetExclusionRequest name */ + name?: (string|null); + } + + /** Represents a GetExclusionRequest. */ + class GetExclusionRequest implements IGetExclusionRequest { + + /** + * Constructs a new GetExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetExclusionRequest); + + /** GetExclusionRequest name. */ + public name: string; + + /** + * Creates a new GetExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; + + /** + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; + + /** + * Verifies a GetExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; + + /** + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @param message GetExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateExclusionRequest. */ + interface ICreateExclusionRequest { + + /** CreateExclusionRequest parent */ + parent?: (string|null); + + /** CreateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + } + + /** Represents a CreateExclusionRequest. */ + class CreateExclusionRequest implements ICreateExclusionRequest { + + /** + * Constructs a new CreateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateExclusionRequest); + + /** CreateExclusionRequest parent. */ + public parent: string; + + /** CreateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); + + /** + * Creates a new CreateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateExclusionRequest instance + */ + public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; + + /** + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; + + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; + + /** + * Verifies a CreateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; + + /** + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @param message CreateExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateExclusionRequest. */ + interface IUpdateExclusionRequest { + + /** UpdateExclusionRequest name */ + name?: (string|null); + + /** UpdateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + + /** UpdateExclusionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateExclusionRequest. */ + class UpdateExclusionRequest implements IUpdateExclusionRequest { + + /** + * Constructs a new UpdateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateExclusionRequest); + + /** UpdateExclusionRequest name. */ + public name: string; + + /** UpdateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); + + /** UpdateExclusionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; + + /** + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; + + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; + + /** + * Verifies an UpdateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; + + /** + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @param message UpdateExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteExclusionRequest. */ + interface IDeleteExclusionRequest { + + /** DeleteExclusionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteExclusionRequest. */ + class DeleteExclusionRequest implements IDeleteExclusionRequest { + + /** + * Constructs a new DeleteExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + + /** DeleteExclusionRequest name. */ + public name: string; + + /** + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; + + /** + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; + + /** + * Verifies a DeleteExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; + + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @param message DeleteExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 3a4e2871a72..a314c5deaf8 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -22,7 +22,9 @@ import * as arrify from 'arrify'; import * as extend from 'extend'; import {GoogleAuth} from 'google-auth-library'; import * as gax from 'google-gax'; +import {ClientReadableStream} from 'grpc'; import * as is from 'is'; +import * as request from 'request'; const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; @@ -38,17 +40,90 @@ export {detectServiceContext}; const PKG = require('../../package.json'); const v2 = require('./v2'); -import {Entry} from './entry'; -import {Log, GetEntriesRequest, MonitoredResource, Severity, SeverityNames} from './log'; +import {Entry, LogEntry} from './entry'; +import {Log, GetEntriesRequest, LogOptions, MonitoredResource, Severity, SeverityNames} from './log'; import {Sink} from './sink'; import {Duplex} from 'stream'; -import {AbortableDuplex} from '@google-cloud/common'; +import {AbortableDuplex, ApiError} from '@google-cloud/common'; +import {google} from '../proto/logging'; +import {google as google_config} from '../proto/logging_config'; + +import {Bucket} from '@google-cloud/storage'; // types only +import {Dataset, BigQuery} from '@google-cloud/bigquery'; // types only +import {Topic} from '@google-cloud/pubsub'; // types only export interface LoggingOptions extends gax.GoogleAuthOptions { autoRetry?: boolean; maxRetries?: number; } +export interface DeleteCallback { + (error?: (Error|null), response?: google.protobuf.Empty): void; +} + +export type DeleteResponse = google.protobuf.Empty; + +export type LogSink = google_config.logging.v2.ILogSink; + +export interface CreateSinkRequest { + destination: Bucket|Dataset|Topic|string; + filter?: string; + includeChildren?: boolean; + name?: string; + outputVersionFormat?: google_config.logging.v2.LogSink.VersionFormat; + gaxOptions?: gax.CallOptions; +} + +export interface CreateSinkCallback { + (err: Error|null, sink?: Sink|null, resp?: LogSink|request.Response): void; +} + +export type GetEntriesResponse = [ + Entry[], google.logging.v2.IListLogEntriesRequest, + google.logging.v2.IListLogEntriesResponse +]; + +export interface GetEntriesCallback { + (err: Error|null, entries?: Entry[], + request?: google.logging.v2.IListLogEntriesRequest, + apiResponse?: google.logging.v2.IListLogEntriesResponse): void; +} + +export interface GetSinksRequest { + autoPaginate?: boolean; + gaxOptions?: gax.CallOptions; + maxApiCalls?: number; + maxResults?: number; + pageSize?: number; + pageToken?: string; +} + +export type GetSinksResponse = [ + Sink[], google_config.logging.v2.IListSinksRequest, + google_config.logging.v2.IListSinksResponse +]; + +export interface GetSinksCallback { + (err: Error|null, entries?: Sink[], + request?: google_config.logging.v2.IListSinksRequest, + apiResponse?: google_config.logging.v2.IListSinksResponse): void; +} +export type Client = string; + +export interface RequestConfig { + client: Client; + method: string; + reqOpts?: object; + gaxOpts?: gax.CallOptions; +} + +export interface RequestCallback { + (err: Error|null, res?: TResponse): void; +} + +interface GaxRequestCallback { + (err: Error|null, requestFn?: Function): void; +} /** * For logged errors, one can provide a the service context. For more * information see [this guide]{@link @@ -144,7 +219,7 @@ export interface ServiceContext { * Full quickstart example: */ class Logging { - api: {}; + api: {[key: string]: gax.ClientStub}; auth: GoogleAuth; options: LoggingOptions; projectId: string; @@ -257,8 +332,13 @@ class Logging { * region_tag:logging_create_sink * Another example: */ - createSink(name: string, config, callback) { - // jscs:enable maximumLineLength + createSink(name: string, config: CreateSinkRequest): Promise<[Sink, LogSink]>; + createSink( + name: string, config: CreateSinkRequest, + callback: CreateSinkCallback): void; + createSink( + name: string, config: CreateSinkRequest, + callback?: CreateSinkCallback): Promise<[Sink, LogSink]>|void { const self = this; if (!is.string(name)) { throw new Error('A sink name must be provided.'); @@ -267,15 +347,15 @@ class Logging { throw new Error('A sink configuration object must be provided.'); } if (common.util.isCustomType(config.destination, 'bigquery/dataset')) { - this.setAclForDataset_(name, config, callback); + this.setAclForDataset_(name, config, callback!); return; } if (common.util.isCustomType(config.destination, 'pubsub/topic')) { - this.setAclForTopic_(name, config, callback); + this.setAclForTopic_(name, config, callback!); return; } if (common.util.isCustomType(config.destination, 'storage/bucket')) { - this.setAclForBucket_(name, config, callback); + this.setAclForBucket_(name, config, callback!); return; } const reqOpts = { @@ -292,12 +372,12 @@ class Logging { }, (err, resp) => { if (err) { - callback(err, null, resp); + callback!(err, null, resp); return; } const sink = self.sink(resp.name); sink.metadata = resp; - callback(null, sink, resp); + callback!(null, sink, resp); }); } @@ -347,7 +427,7 @@ class Logging { * // } * // } */ - entry(resource, data) { + entry(resource?: LogEntry, data?: {}|string) { return new Entry(resource, data); } @@ -432,10 +512,14 @@ class Logging { * region_tag:logging_list_log_entries_advanced * Another example: */ - // tslint:disable-next-line no-any - getEntries(options, callback?): void|Promise { - if (is.fn(options)) { - callback = options; + getEntries(options?: GetEntriesRequest): Promise; + getEntries(callback: GetEntriesCallback): void; + getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; + getEntries( + options?: GetEntriesRequest|GetEntriesCallback, + callback?: GetEntriesCallback): void|Promise { + if (typeof options === 'function') { + callback = options as GetEntriesCallback; options = {}; } const reqOpts = extend( @@ -452,9 +536,9 @@ class Logging { delete reqOpts.gaxOptions; const gaxOptions = extend( { - autoPaginate: options.autoPaginate, + autoPaginate: options!.autoPaginate, }, - options.gaxOptions); + options!.gaxOptions); this.request( { client: 'LoggingServiceV2Client', @@ -467,7 +551,7 @@ class Logging { if (entries) { args[1] = entries.map(Entry.fromApiResponse_); } - callback.apply(null, args); + callback!.apply(null, args); }); } @@ -517,8 +601,7 @@ class Logging { next(null, Entry.fromApiResponse_(entry)); }); userStream.once('reading', () => { - // tslint:disable-next-line no-any - const reqOpts: any = extend( + const reqOpts = extend( { orderBy: 'timestamp desc', }, @@ -597,11 +680,15 @@ class Logging { * region_tag:logging_list_sinks * Another example: */ - // tslint:disable-next-line no-any - getSinks(options?, callback?): void|Promise { + getSinks(options?: GetSinksRequest): Promise; + getSinks(callback: GetSinksCallback): void; + getSinks(options: GetSinksRequest, callback: GetSinksCallback): void; + getSinks( + options?: GetSinksRequest|GetSinksCallback, + callback?: GetSinksCallback): void|Promise { const self = this; - if (is.fn(options)) { - callback = options; + if (typeof options === 'function') { + callback = options as GetSinksCallback; options = {}; } const reqOpts = extend({}, options, { @@ -611,9 +698,9 @@ class Logging { delete reqOpts.gaxOptions; const gaxOptions = extend( { - autoPaginate: options.autoPaginate, + autoPaginate: (options as GetSinksRequest).autoPaginate, }, - options.gaxOptions); + (options as GetSinksRequest).gaxOptions); this.request( { client: 'ConfigServiceV2Client', @@ -624,13 +711,13 @@ class Logging { (...args) => { const sinks = args[1]; if (sinks) { - args[1] = sinks.map(sink => { - const sinkInstance = self.sink(sink.name); + args[1] = sinks.map((sink: LogSink) => { + const sinkInstance = self.sink(sink.name!); sinkInstance.metadata = sink; return sinkInstance; }); } - callback.apply(null, args); + callback!.apply(null, args); }); } @@ -665,15 +752,14 @@ class Logging { * this.end(); * }); */ - getSinksStream(options) { + getSinksStream(options: GetSinksRequest) { const self = this; options = options || {}; - let requestStream; + let requestStream: Duplex; const userStream = streamEvents(pumpify.obj()); - // tslint:disable-next-line no-any - (userStream as any).abort = () => { + (userStream as AbortableDuplex).abort = () => { if (requestStream) { - requestStream.abort(); + (requestStream as AbortableDuplex).abort(); } }; const toSinkStream = through.obj((sink, _, next) => { @@ -719,7 +805,7 @@ class Logging { * const logging = new Logging(); * const log = logging.log('my-log'); */ - log(name, options?) { + log(name: string, options?: LogOptions) { return new Log(this, name, options); } @@ -750,10 +836,12 @@ class Logging { * @param {object} config.reqOpts Request options. * @param {function} [callback] Callback function. */ - request(config, callback?) { + // tslint:disable-next-line no-any + request( + config: RequestConfig, callback?: RequestCallback) { const self = this; const isStreamMode = !callback; - let gaxStream; + let gaxStream: ClientReadableStream; let stream: Duplex; if (isStreamMode) { stream = streamEvents(through.obj()); @@ -766,7 +854,7 @@ class Logging { } else { makeRequestCallback(); } - function prepareGaxRequest(callback) { + function prepareGaxRequest(callback: GaxRequestCallback): void { self.auth.getProjectId((err, projectId) => { if (err) { callback(err); @@ -793,10 +881,10 @@ class Logging { } prepareGaxRequest((err, requestFn) => { if (err) { - callback(err); + callback!(err); return; } - requestFn(callback); + requestFn!(callback); }); } function makeRequestStream() { @@ -809,7 +897,7 @@ class Logging { stream.destroy(err); return; } - gaxStream = requestFn(); + gaxStream = requestFn!(); gaxStream .on('error', err => { @@ -831,17 +919,22 @@ class Logging { * * @private */ - setAclForBucket_(name: string, config, callback) { + setAclForBucket_( + name: string, config: CreateSinkRequest, callback: CreateSinkCallback) { const self = this; - const bucket = config.destination; - bucket.acl.owners.addGroup('cloud-logs@google.com', (err, apiResp) => { - if (err) { - callback(err, null, apiResp); - return; - } - config.destination = 'storage.googleapis.com/' + bucket.name; - self.createSink(name, config, callback); - }); + const bucket = config.destination as Bucket; + // tslint:disable-next-line no-any + (bucket.acl.owners as any) + .addGroup( + 'cloud-logs@google.com', + (err: Error, apiResp: request.Response) => { + if (err) { + callback(err, null, apiResp); + return; + } + config.destination = 'storage.googleapis.com/' + bucket.name; + self.createSink(name, config, callback); + }); } /** @@ -853,9 +946,10 @@ class Logging { * * @private */ - setAclForDataset_(name: string, config, callback) { + setAclForDataset_( + name: string, config: CreateSinkRequest, callback: CreateSinkCallback) { const self = this; - const dataset = config.destination; + const dataset = config.destination as Dataset; dataset.getMetadata((err, metadata, apiResp) => { if (err) { callback(err, null, apiResp); @@ -877,7 +971,7 @@ class Logging { return; } const baseUrl = 'bigquery.googleapis.com'; - const pId = dataset.parent.projectId; + const pId = (dataset.parent as BigQuery).projectId; const dId = dataset.id; config.destination = `${baseUrl}/projects/${pId}/datasets/${dId}`; self.createSink(name, config, callback); @@ -894,22 +988,23 @@ class Logging { * * @private */ - setAclForTopic_(name: string, config, callback) { + setAclForTopic_( + name: string, config: CreateSinkRequest, callback: CreateSinkCallback) { const self = this; - const topic = config.destination; - topic.iam.getPolicy((err, policy, apiResp) => { + const topic = config.destination as Topic; + topic.iam.getPolicy((err, policy) => { if (err) { - callback(err, null, apiResp); + callback(err, null); return; } - policy.bindings = arrify(policy.bindings); - policy.bindings.push({ + policy!.bindings = arrify(policy!.bindings); + policy!.bindings.push({ role: 'roles/pubsub.publisher', members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], }); - topic.iam.setPolicy(policy, (err, policy, apiResp) => { + topic.iam.setPolicy(policy!, (err, policy) => { if (err) { - callback(err, null, apiResp); + callback(err, null); return; } const baseUrl = 'pubsub.googleapis.com'; diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index e42ed73f733..2a00d862dc5 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -24,8 +24,8 @@ import {Response} from 'request'; import {google} from '../proto/logging'; -import {Logging} from '.'; -import {Entry} from './entry'; +import {GetEntriesCallback, GetEntriesResponse, Logging} from '.'; +import {Entry, LogEntry} from './entry'; import {getDefaultResource} from './metadata'; const snakeCaseKeys = require('snakecase-keys'); @@ -39,6 +39,7 @@ export interface GetEntriesRequest { orderBy?: string; pageSize?: number; pageToken?: string; + resourceNames?: string[]|string; } export interface LogOptions { @@ -104,7 +105,7 @@ class Log implements LogSeverityFunctions { removeCircular_: boolean; logging: Logging; name: string; - constructor(logging: Logging, name: string, options: LogOptions) { + constructor(logging: Logging, name: string, options?: LogOptions) { options = options || {}; this.formattedName_ = Log.formatName_(logging.projectId, name); this.removeCircular_ = options.removeCircular === true; @@ -409,10 +410,16 @@ class Log implements LogSeverityFunctions { * // } * // } */ - entry(metadata, data?) { + entry(metadata?: LogEntry): Entry; + entry(data?: string|{}): Entry; + entry(metadata?: LogEntry, data?: string|{}): Entry; + entry(metadataOrData?: LogEntry|string|{}, data?: string|{}) { + let metadata: LogEntry; if (!data) { - data = metadata; + data = metadataOrData as string | {}; metadata = {}; + } else { + metadata = metadataOrData as LogEntry; } return this.logging.entry(metadata, data); } @@ -504,10 +511,15 @@ class Log implements LogSeverityFunctions { * const entries = data[0]; * }); */ - getEntries(options: GetEntriesRequest, callback?) { + getEntries(options?: GetEntriesRequest): Promise; + getEntries(callback: GetEntriesCallback): void; + getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; + getEntries( + options?: GetEntriesRequest|GetEntriesCallback, + callback?: GetEntriesCallback): Promise|void { if (is.function(options)) { - callback = options; + callback = options as GetEntriesCallback; options = {}; } options = extend( @@ -515,7 +527,7 @@ class Log implements LogSeverityFunctions { filter: 'logName="' + this.formattedName_ + '"', }, options); - return this.logging.getEntries(options, callback); + return this.logging.getEntries(options as GetEntriesRequest, callback!); } /** diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 3d398f2a9c6..78792cead3b 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -20,7 +20,17 @@ import * as extend from 'extend'; import {CallOptions} from 'google-gax/build/src/gax'; import * as is from 'is'; -import {Logging} from '.'; +import {CreateSinkCallback, CreateSinkRequest, DeleteCallback, DeleteResponse, Logging, LogSink} from '.'; + +export interface SinkMetadataCallback { + (error: (Error|null), response?: LogSink): void; +} + +export type SinkMetadataResponse = [LogSink]; + +export interface SetSinkMetadata extends LogSink { + gaxOptions?: CallOptions; +} /** * A sink is an object that lets you to specify a set of log entries to export @@ -45,7 +55,7 @@ class Sink { logging: Logging; name: string; formattedName_: string; - metadata?: {}; + metadata?: LogSink; constructor(logging: Logging, name: string) { this.logging = logging; /** @@ -94,8 +104,11 @@ class Sink { * region_tag:logging_create_sink * Another example: */ - create(config, callback?) { - this.logging.createSink(this.name, config, callback); + create(config: CreateSinkRequest): Promise<[Sink, LogSink]>; + create(config: CreateSinkRequest, callback: CreateSinkCallback): void; + create(config: CreateSinkRequest, callback?: CreateSinkCallback): + Promise<[Sink, LogSink]>|void { + this.logging.createSink(this.name, config, callback!); } /** @@ -139,9 +152,13 @@ class Sink { * region_tag:logging_delete_sink * Another example: */ - delete(gaxOptions: CallOptions, callback) { - if (is.fn(gaxOptions)) { - callback = gaxOptions; + delete(gaxOptions?: CallOptions): Promise; + delete(callback: DeleteCallback): void; + delete(gaxOptions: CallOptions, callback: DeleteCallback): void; + delete(gaxOptions?: CallOptions|DeleteCallback, callback?: DeleteCallback): + Promise|void { + if (typeof gaxOptions === 'function') { + callback = gaxOptions as DeleteCallback; gaxOptions = {}; } const reqOpts = { @@ -152,7 +169,7 @@ class Sink { client: 'ConfigServiceV2Client', method: 'deleteSink', reqOpts, - gaxOpts: gaxOptions, + gaxOpts: gaxOptions as CallOptions, }, callback); } @@ -176,8 +193,8 @@ class Sink { * * @param {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. - * @param {GetSinkMetadataCallback} [callback] Callback function. - * @returns {Promise} + * @param {SinkMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example * const {Logging} = require('@google-cloud/logging'); @@ -191,24 +208,27 @@ class Sink { * //- * sink.getMetadata().then(data => { * const metadata = data[0]; - * const apiResponse = data[1]; * }); * * @example include:samples/sinks.js * region_tag:logging_get_sink * Another example: */ - getMetadata(callback?); - getMetadata(gaxOptions: CallOptions, callback?) { + getMetadata(gaxOptions?: CallOptions): Promise; + getMetadata(callback: SinkMetadataCallback): void; + getMetadata(gaxOptions: CallOptions, callback: SinkMetadataCallback): void; + getMetadata( + gaxOptions?: CallOptions|SinkMetadataCallback, + callback?: SinkMetadataCallback): Promise|void { const self = this; - if (is.fn(gaxOptions)) { + if (typeof gaxOptions === 'function') { callback = gaxOptions; gaxOptions = {}; } const reqOpts = { sinkName: this.formattedName_, }; - this.logging.request( + this.logging.request( { client: 'ConfigServiceV2Client', method: 'getSink', @@ -219,7 +239,7 @@ class Sink { if (args[1]) { self.metadata = args[1]; } - callback.apply(null, args); + callback!.apply(null, args); }); } @@ -259,12 +279,15 @@ class Sink { * const apiResponse = data[0]; * }); */ - setFilter(filter: string, callback?) { + setFilter(filter: string): Promise; + setFilter(filter: string, callback: SinkMetadataCallback): void; + setFilter(filter: string, callback?: SinkMetadataCallback): + Promise|void { this.setMetadata( { filter, }, - callback); + callback!); } /** @@ -313,12 +336,15 @@ class Sink { * region_tag:logging_update_sink * Another example: */ - setMetadata(metadata, callback?) { + setMetadata(metadata: SetSinkMetadata): Promise; + setMetadata(metadata: SetSinkMetadata, callback: SinkMetadataCallback): void; + setMetadata(metadata: SetSinkMetadata, callback?: SinkMetadataCallback): + Promise|void { const self = this; callback = callback || common.util.noop; - this.getMetadata((err, currentMetadata, apiResponse) => { + this.getMetadata((err, currentMetadata) => { if (err) { - callback(err, apiResponse); + callback!(err); return; } const reqOpts = { @@ -337,7 +363,7 @@ class Sink { if (args[1]) { self.metadata = args[1]; } - callback.apply(null, args); + callback!.apply(null, args); }); }); } diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 99d5ab81700..f0833d5062a 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -322,7 +322,7 @@ describe('Logging', () => { }, (err, entries) => { assert.ifError(err); - assert.deepStrictEqual(entries.map(x => x.data), [ + assert.deepStrictEqual(entries!.map(x => x.data), [ '3', '2', '1', @@ -350,7 +350,7 @@ describe('Logging', () => { (err, entries) => { assert.ifError(err); assert.deepStrictEqual( - entries.reverse().map(x => x.data), messages); + entries!.reverse().map(x => x.data), messages); done(); }); }, WRITE_CONSISTENCY_DELAY_MS * 4); @@ -376,7 +376,7 @@ describe('Logging', () => { (err, entries) => { assert.ifError(err); - const entry = entries[0]; + const entry = entries![0]; assert.deepStrictEqual(entry.data, { when: logEntry.data.when.toString(), @@ -413,7 +413,7 @@ describe('Logging', () => { (err, entries) => { assert.ifError(err); - const entry = entries[0]; + const entry = entries![0]; assert.strictEqual(entry.metadata.severity, metadata.severity); assert.deepStrictEqual(entry.data, data); @@ -440,7 +440,7 @@ describe('Logging', () => { (err, entries) => { assert.ifError(err); - const entry = entries[0]; + const entry = entries![0]; assert.strictEqual(entry.data, text); assert.deepStrictEqual(entry.metadata.resource, { diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 2c44959cee3..73b9ac24459 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -1263,11 +1263,10 @@ describe('Logging', () => { describe('get policy', () => { describe('error', () => { const error = new Error('Error.'); - const apiResponse = {}; beforeEach(() => { topic.iam.getPolicy = callback => { - callback(error, null, apiResponse); + callback(error, null); }; }); @@ -1275,7 +1274,7 @@ describe('Logging', () => { logging.setAclForTopic_(SINK_NAME, CONFIG, (err, _, resp) => { assert.strictEqual(err, error); assert.strictEqual(_, null); - assert.strictEqual(resp, apiResponse); + assert.strictEqual(resp, undefined); done(); }); }); @@ -1315,11 +1314,10 @@ describe('Logging', () => { describe('updating policy error', () => { const error = new Error('Error.'); - const apiResponse = {}; beforeEach(() => { topic.iam.setPolicy = (policy, callback) => { - callback(error, null, apiResponse); + callback(error, null); }; }); @@ -1327,7 +1325,7 @@ describe('Logging', () => { logging.setAclForTopic_(SINK_NAME, CONFIG, (err, _, res) => { assert.strictEqual(err, error); assert.strictEqual(_, null); - assert.strictEqual(res, apiResponse); + assert.strictEqual(res, undefined); done(); }); }); diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index d7f550edf52..93d6f87900b 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -202,15 +202,13 @@ describe('Sink', () => { it('should exec callback with error from refresh', done => { const error = new Error('Error.'); - const apiResponse = {}; sink.getMetadata = (callback) => { - callback(error, null, apiResponse); + callback(error); }; - sink.setMetadata(METADATA, (err, apiResponse_) => { + sink.setMetadata(METADATA, (err) => { assert.strictEqual(err, error); - assert.strictEqual(apiResponse_, apiResponse); done(); }); }); From 5fcd0407b5ff493ce9f095d38ade9319064b4c8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 1 Mar 2019 08:47:46 -0800 Subject: [PATCH 0350/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.26.0 (#407) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 34d80cfb77d..573dbda139c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -77,7 +77,7 @@ "devDependencies": { "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.25.0", + "@google-cloud/pubsub": "^0.26.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/extend": "^3.0.0", From 7e402a27a9c8c87ce15d14ba537f95c71ce6632b Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 4 Mar 2019 11:35:37 -0800 Subject: [PATCH 0351/1029] chore(deps): update @google-cloud/pubsub to v0.27.0 (#410) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 573dbda139c..9d2331bbbb7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -77,7 +77,7 @@ "devDependencies": { "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.26.0", + "@google-cloud/pubsub": "^0.27.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/extend": "^3.0.0", From a14f0bc527297f5529262594a465c5331c521871 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 5 Mar 2019 16:45:59 -0800 Subject: [PATCH 0352/1029] build: update release configuration --- .../logging/.kokoro/release/publish.cfg | 20 +++++++++++++++++++ handwritten/logging/synth.metadata | 8 ++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 78284018f04..d3461917430 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -18,6 +18,26 @@ before_action { } } +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +} + # Download trampoline resources. gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index a2e21abca1f..b8ac6d79905 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-02-26T12:33:03.800153Z", + "updateTime": "2019-03-05T12:18:24.487524Z", "sources": [ { "generator": { @@ -12,15 +12,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "29f098cb03a9983cc9cb15993de5da64419046f2", - "internalRef": "235621085" + "sha": "b4a22569c88f1f0444e889d8139ddacb799f287c", + "internalRef": "236712632" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.1.16" + "version": "2019.2.26" } } ], From e7b18a49b2670856dde95a2030175c9256cd118c Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 6 Mar 2019 15:23:41 -0800 Subject: [PATCH 0353/1029] build: use node10 to run samples-test, system-test etc (#413) --- handwritten/logging/.kokoro/continuous/{node8 => node10}/docs.cfg | 0 handwritten/logging/.kokoro/continuous/{node8 => node10}/lint.cfg | 0 .../logging/.kokoro/continuous/{node8 => node10}/samples-test.cfg | 0 .../.kokoro/continuous/{node8 => node10}/system-test-grpcjs.cfg | 0 .../logging/.kokoro/continuous/{node8 => node10}/system-test.cfg | 0 handwritten/logging/.kokoro/presubmit/{node8 => node10}/docs.cfg | 0 handwritten/logging/.kokoro/presubmit/{node8 => node10}/lint.cfg | 0 .../logging/.kokoro/presubmit/{node8 => node10}/samples-test.cfg | 0 .../.kokoro/presubmit/{node8 => node10}/system-test-grpcjs.cfg | 0 .../logging/.kokoro/presubmit/{node8 => node10}/system-test.cfg | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename handwritten/logging/.kokoro/continuous/{node8 => node10}/docs.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node8 => node10}/lint.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node8 => node10}/samples-test.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node8 => node10}/system-test-grpcjs.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node8 => node10}/system-test.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node8 => node10}/docs.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node8 => node10}/lint.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node8 => node10}/samples-test.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node8 => node10}/system-test-grpcjs.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node8 => node10}/system-test.cfg (100%) diff --git a/handwritten/logging/.kokoro/continuous/node8/docs.cfg b/handwritten/logging/.kokoro/continuous/node10/docs.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node8/docs.cfg rename to handwritten/logging/.kokoro/continuous/node10/docs.cfg diff --git a/handwritten/logging/.kokoro/continuous/node8/lint.cfg b/handwritten/logging/.kokoro/continuous/node10/lint.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node8/lint.cfg rename to handwritten/logging/.kokoro/continuous/node10/lint.cfg diff --git a/handwritten/logging/.kokoro/continuous/node8/samples-test.cfg b/handwritten/logging/.kokoro/continuous/node10/samples-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node8/samples-test.cfg rename to handwritten/logging/.kokoro/continuous/node10/samples-test.cfg diff --git a/handwritten/logging/.kokoro/continuous/node8/system-test-grpcjs.cfg b/handwritten/logging/.kokoro/continuous/node10/system-test-grpcjs.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node8/system-test-grpcjs.cfg rename to handwritten/logging/.kokoro/continuous/node10/system-test-grpcjs.cfg diff --git a/handwritten/logging/.kokoro/continuous/node8/system-test.cfg b/handwritten/logging/.kokoro/continuous/node10/system-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node8/system-test.cfg rename to handwritten/logging/.kokoro/continuous/node10/system-test.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node8/docs.cfg b/handwritten/logging/.kokoro/presubmit/node10/docs.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node8/docs.cfg rename to handwritten/logging/.kokoro/presubmit/node10/docs.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node8/lint.cfg b/handwritten/logging/.kokoro/presubmit/node10/lint.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node8/lint.cfg rename to handwritten/logging/.kokoro/presubmit/node10/lint.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node8/samples-test.cfg b/handwritten/logging/.kokoro/presubmit/node10/samples-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node8/samples-test.cfg rename to handwritten/logging/.kokoro/presubmit/node10/samples-test.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node8/system-test-grpcjs.cfg b/handwritten/logging/.kokoro/presubmit/node10/system-test-grpcjs.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node8/system-test-grpcjs.cfg rename to handwritten/logging/.kokoro/presubmit/node10/system-test-grpcjs.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node8/system-test.cfg b/handwritten/logging/.kokoro/presubmit/node10/system-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node8/system-test.cfg rename to handwritten/logging/.kokoro/presubmit/node10/system-test.cfg From 2e97aa96ac9ead5b65f8895d8e130c2d37c1f42d Mon Sep 17 00:00:00 2001 From: Alex <7764119+AVaksman@users.noreply.github.com> Date: Thu, 7 Mar 2019 15:27:03 -0500 Subject: [PATCH 0354/1029] fix: do not push duplicate scopes (#414) --- handwritten/logging/src/index.ts | 2 +- handwritten/logging/test/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index a314c5deaf8..1c5a0b419b1 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -236,7 +236,7 @@ class Logging { ]; for (const clientClass of clientClasses) { for (const scope of clientClass.scopes) { - if (clientClasses.indexOf(scope) === -1) { + if (scopes.indexOf(scope) === -1) { scopes.push(scope); } } diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 73b9ac24459..02fb5663f81 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -153,7 +153,7 @@ describe('Logging', () => { for (const clientClass of clientClasses) { for (const scope of clientClass.scopes) { - if (clientClasses.indexOf(scope) === -1) { + if (EXPECTED_SCOPES.indexOf(scope) === -1) { EXPECTED_SCOPES.push(scope); } } From d79e7e89cd6f6c0bb3bfa9894bb3371a043105c0 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 7 Mar 2019 18:05:08 -0800 Subject: [PATCH 0355/1029] build: Add docuploader credentials to node publish jobs (#415) --- .../logging/.kokoro/release/publish.cfg | 9 +++++ handwritten/logging/synth.metadata | 33 ++----------------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index d3461917430..2ed74a1807a 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -18,6 +18,15 @@ before_action { } } +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + # Fetch magictoken to use with Magic Github Proxy before_action { fetch_keystore { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index b8ac6d79905..b89f7fb17e8 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,38 +1,11 @@ { - "updateTime": "2019-03-05T12:18:24.487524Z", + "updateTime": "2019-03-08T00:45:42.022468Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.14", - "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b4a22569c88f1f0444e889d8139ddacb799f287c", - "internalRef": "236712632" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2019.2.26" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "logging", - "apiVersion": "v2", - "language": "nodejs", - "generator": "gapic", - "config": "google/logging/artman_logging.yaml" + "version": "0.16.15", + "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" } } ] From c5debaee02c8384660dfc46a5f33579cb6210838 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 8 Mar 2019 19:44:55 -0800 Subject: [PATCH 0356/1029] refactor: clean up types and imports (#409) --- handwritten/logging/.gitignore | 2 + handwritten/logging/package.json | 8 +- handwritten/logging/src/entry.ts | 14 ++- handwritten/logging/src/index.ts | 11 +- handwritten/logging/src/log.ts | 50 ++++++--- handwritten/logging/src/sink.ts | 4 +- handwritten/logging/system-test/logging.ts | 95 ++++++++-------- handwritten/logging/test/entry.ts | 101 ++++++++---------- handwritten/logging/test/index.ts | 10 +- .../express/test-make-middleware.ts | 6 +- .../logging/test/middleware/test-context.ts | 6 +- 11 files changed, 152 insertions(+), 155 deletions(-) diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index 27369b261c8..e84bf0fa887 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -9,3 +9,5 @@ system-test/*key.json *.lock .DS_Store package-lock.json +__pycache__ +.vscode diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9d2331bbbb7..611b82d18a8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -88,6 +88,7 @@ "@types/pify": "^3.0.2", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", + "@types/sinon": "^7.0.8", "@types/through2": "^2.0.34", "@types/uuid": "^3.4.4", "assert-rejects": "^1.0.0", @@ -99,17 +100,18 @@ "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^0.18.0", "gts": "^0.9.0", - "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", + "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", + "linkinator": "^1.1.2", "mocha": "^6.0.0", "nock": "^10.0.1", "nyc": "^13.0.1", "power-assert": "^1.6.0", "prettier": "^1.15.1", "proxyquire": "^2.1.0", + "sinon": "^7.2.5", "typescript": "~3.3.0", - "uuid": "^3.3.2", - "linkinator": "^1.1.2" + "uuid": "^3.3.2" } } diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 272f1dc7ce2..7dc535c8a42 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -25,6 +25,8 @@ const eventId = new EventId(); export type LogEntry = google.logging.v2.ILogEntry; export type Timestamp = google.protobuf.IDuration; +// tslint:disable-next-line no-any +export type Data = any; export interface EntryJson { timestamp: Timestamp|Date; @@ -97,10 +99,8 @@ export interface ToJsonOptions { */ class Entry { metadata: LogEntry; - // tslint:disable-next-line no-any - data: any; - // tslint:disable-next-line no-any - constructor(metadata?: LogEntry, data?: any) { + data: Data; + constructor(metadata?: LogEntry, data?: Data) { /** * @name Entry#metadata * @type {object} @@ -136,8 +136,7 @@ class Entry { * @param {boolean} [options.removeCircular] Replace circular references in an * object with a string value, `[Circular]`. */ - toJSON(options: ToJsonOptions) { - options = options || {}; + toJSON(options: ToJsonOptions = {}) { const entry = extend(true, {}, this.metadata) as {} as EntryJson; if (is.object(this.data)) { // tslint:disable-next-line no-any @@ -178,8 +177,7 @@ class Entry { if (serializedEntry.metadata.timestamp) { let ms = Number(serializedEntry.metadata.timestamp.seconds) * 1000; ms += Number(serializedEntry.metadata.timestamp.nanos) / 1e6; - // tslint:disable-next-line no-any - (serializedEntry as any).metadata.timestamp = new Date(ms); + serializedEntry.metadata.timestamp = new Date(ms) as Timestamp; } return serializedEntry; } diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 1c5a0b419b1..4ff2d14cec3 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -587,9 +587,7 @@ class Logging { * this.end(); * }); */ - getEntriesStream(options: GetEntriesRequest) { - const self = this; - options = options || {}; + getEntriesStream(options: GetEntriesRequest = {}) { let requestStream: Duplex; const userStream = streamEvents(pumpify.obj()); (userStream as AbortableDuplex).abort = () => { @@ -607,7 +605,7 @@ class Logging { }, options); reqOpts.resourceNames = arrify(reqOpts.resourceNames); - reqOpts.resourceNames.push('projects/' + self.projectId); + reqOpts.resourceNames.push(`projects/${this.projectId}`); delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; const gaxOptions = extend( @@ -615,7 +613,7 @@ class Logging { autoPaginate: options.autoPaginate, }, options.gaxOptions); - requestStream = self.request({ + requestStream = this.request({ client: 'LoggingServiceV2Client', method: 'listLogEntriesStream', reqOpts, @@ -921,7 +919,6 @@ class Logging { */ setAclForBucket_( name: string, config: CreateSinkRequest, callback: CreateSinkCallback) { - const self = this; const bucket = config.destination as Bucket; // tslint:disable-next-line no-any (bucket.acl.owners as any) @@ -933,7 +930,7 @@ class Logging { return; } config.destination = 'storage.googleapis.com/' + bucket.name; - self.createSink(name, config, callback); + this.createSink(name, config, callback); }); } diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 2a00d862dc5..867c88b587a 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -18,7 +18,7 @@ import {DeleteCallback} from '@google-cloud/common'; import {promisifyAll} from '@google-cloud/promisify'; import * as arrify from 'arrify'; import * as extend from 'extend'; -import {CallOptions} from 'google-gax/build/src/gax'; +import {CallOptions} from 'google-gax'; import * as is from 'is'; import {Response} from 'request'; @@ -531,8 +531,9 @@ class Log implements LogSeverityFunctions { } /** - * This method is a wrapper around {module:logging#getEntriesStream}, but with a - * filter specified to only return {module:logging/entry} objects from this log. + * This method is a wrapper around {module:logging#getEntriesStream}, but with + * a filter specified to only return {module:logging/entry} objects from this + * log. * * @method Log#getEntriesStream * @param {GetEntriesRequest} [query] Query object for listing entries. @@ -601,9 +602,14 @@ class Log implements LogSeverityFunctions { * }); */ info(entry: Entry|Entry[], options?: WriteOptions): Promise; - info(entry: Entry|Entry[], options: WriteOptions, callback: ApiResponseCallback): void; + info( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; info(entry: Entry|Entry[], callback: ApiResponseCallback): void; - info(entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback):void|Promise { + info( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = @@ -641,9 +647,14 @@ class Log implements LogSeverityFunctions { * }); */ notice(entry: Entry|Entry[], options?: WriteOptions): Promise; - notice(entry: Entry|Entry[], options: WriteOptions, callback: ApiResponseCallback): void; + notice( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; notice(entry: Entry|Entry[], callback: ApiResponseCallback): void; - notice(entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback):void|Promise { + notice( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = @@ -681,9 +692,14 @@ class Log implements LogSeverityFunctions { * }); */ warning(entry: Entry|Entry[], options?: WriteOptions): Promise; - warning(entry: Entry|Entry[], options: WriteOptions, callback: ApiResponseCallback): void; + warning( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; warning(entry: Entry|Entry[], callback: ApiResponseCallback): void; - warning(entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback):void|Promise { + warning( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = @@ -750,8 +766,8 @@ class Log implements LogSeverityFunctions { * * //- * // To save some steps, you can also pass in plain values as your entries. - * // Note, however, that you must provide a configuration object to specify the - * // resource. + * // Note, however, that you must provide a configuration object to specify + * // the resource. * //- * const entries = [ * { @@ -784,9 +800,14 @@ class Log implements LogSeverityFunctions { * Another example: */ write(entry: Entry|Entry[], options?: WriteOptions): Promise; - write(entry: Entry|Entry[], options: WriteOptions, callback: ApiResponseCallback): void; + write( + entry: Entry|Entry[], options: WriteOptions, + callback: ApiResponseCallback): void; write(entry: Entry|Entry[], callback: ApiResponseCallback): void; - write(entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback): void|Promise { + write( + entry: Entry|Entry[], + optionsOrCallback?: WriteOptions|ApiResponseCallback, + cb?: ApiResponseCallback): void|Promise { const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = @@ -866,7 +887,8 @@ class Log implements LogSeverityFunctions { * @param {object|object[]} entries - Log entries. * @param {string} severity - The desired severity level. */ - static assignSeverityToEntries_(entries: Entry|Entry[], severity: string): Entry[] { + static assignSeverityToEntries_(entries: Entry|Entry[], severity: string): + Entry[] { return arrify(entries).map(entry => { const metadata = extend(true, {}, entry.metadata, { severity, diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 78792cead3b..6e6e7650bd0 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -17,9 +17,7 @@ import * as common from '@google-cloud/common-grpc'; import {promisifyAll} from '@google-cloud/promisify'; import * as extend from 'extend'; -import {CallOptions} from 'google-gax/build/src/gax'; -import * as is from 'is'; - +import {CallOptions} from 'google-gax'; import {CreateSinkCallback, CreateSinkRequest, DeleteCallback, DeleteResponse, Logging, LogSink} from '.'; export interface SinkMetadataCallback { diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index f0833d5062a..ebd6e560558 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -14,19 +14,23 @@ * limitations under the License. */ +if (process.env.GOOGLE_CLOUD_USE_GRPC_JS) { + process.exit(0); +} + +import {BigQuery} from '@google-cloud/bigquery'; +import {ServiceObject} from '@google-cloud/common'; +import {PubSub} from '@google-cloud/pubsub'; +import {Storage} from '@google-cloud/storage'; import * as assert from 'assert'; -const {BigQuery} = require('@google-cloud/bigquery'); -import * as extend from 'extend'; -import * as is from 'is'; import * as nock from 'nock'; -const {PubSub} = require('@google-cloud/pubsub'); -import {Storage} from '@google-cloud/storage'; +import {Duplex} from 'stream'; import * as uuid from 'uuid'; -import {Logging} from '../src'; -import {ServiceObject} from '@google-cloud/common'; + +import {Logging, Sink} from '../src'; // block all attempts to chat with the metadata server (kokoro runs on GCE) -nock('http://metadata.google.internal') +nock('http://metadata.google.internal.') .get(() => true) .replyWithError({code: 'ENOTFOUND'}) .persist(); @@ -70,34 +74,33 @@ describe('Logging', () => { } async function deleteDatasets() { - return getAndDelete(bigQuery.getDatasets.bind(bigQuery)); + await getAndDelete(bigQuery.getDatasets.bind(bigQuery)); } async function deleteTopics() { - return getAndDelete(pubsub.getTopics.bind(pubsub)); + await getAndDelete(pubsub.getTopics.bind(pubsub)); } async function deleteSinks() { - // tslint:disable-next-line no-any - return getAndDelete(logging.getSinks.bind(logging) as any); + await getAndDelete(logging.getSinks.bind(logging)); } - async function getAndDelete(method: () => Promise<[ServiceObject[]]>) { + async function getAndDelete(method: Function) { const [objects] = await method(); return Promise.all( objects .filter( - // tslint:disable-next-line no-any - o => ((o as any).name || o.id).indexOf(TESTS_PREFIX) === 0) - .map(o => o.delete())); + (o: ServiceObject) => + // tslint:disable-next-line no-any + ((o as any).name || o.id).indexOf(TESTS_PREFIX) === 0) + .map((o: ServiceObject) => o.delete())); } }); describe('sinks', () => { it('should create a sink with a Bucket destination', async () => { const sink = logging.sink(generateName()); - // tslint:disable-next-line no-any - const [_, apiResponse] = await (sink as any).create({ + const [_, apiResponse] = await sink.create({ destination: bucket, }); const destination = 'storage.googleapis.com/' + bucket.name; @@ -106,33 +109,26 @@ describe('Logging', () => { it('should create a sink with a Dataset destination', async () => { const sink = logging.sink(generateName()); - // tslint:disable-next-line no-any - const [_, apiResponse] = await (sink as any) - .create( - { - destination: dataset, - }, - ); + const [_, apiResponse] = await sink.create({destination: dataset}); const destination = `bigquery.googleapis.com/datasets/${dataset.id}`; // The projectId may have been replaced depending on how the system // tests are being run, so let's not care about that. apiResponse.destination = - apiResponse.destination.replace(/projects\/[^/]*\//, ''); + apiResponse.destination!.replace(/projects\/[^/]*\//, ''); assert.strictEqual(apiResponse.destination, destination); }); it('should create a sink with a Topic destination', async () => { const sink = logging.sink(generateName()); - // tslint:disable-next-line no-any - const [_, apiResponse] = await (sink as any).create({destination: topic}); + const [_, apiResponse] = await sink.create({destination: topic}); const destination = 'pubsub.googleapis.com/' + topic.name; // The projectId may have been replaced depending on how the system // tests are being run, so let's not care about that. assert.strictEqual( - apiResponse.destination.replace(/projects\/[^/]*\//, ''), + apiResponse.destination!.replace(/projects\/[^/]*\//, ''), destination.replace(/projects\/[^/]*\//, '')); }); @@ -146,14 +142,12 @@ describe('Logging', () => { it('should set metadata', async () => { const metadata = {filter: FILTER}; - // tslint:disable-next-line no-any - const [apiResponse] = await (sink as any).setMetadata(metadata); + const [apiResponse] = await sink.setMetadata(metadata); assert.strictEqual(apiResponse.filter, FILTER); }); it('should set a filter', async () => { - // tslint:disable-next-line no-any - const [apiResponse] = await (sink as any).setFilter(FILTER); + const [apiResponse] = await sink.setFilter(FILTER); assert.strictEqual(apiResponse.filter, FILTER); }); }); @@ -171,22 +165,21 @@ describe('Logging', () => { }); it('should list sinks as a stream', done => { - const logstream = logging.getSinksStream({pageSize: 1}) - .on('error', done) - .once('data', () => { - // tslint:disable-next-line no-any - (logstream as any).end(); - done(); - }); + const logstream: Duplex = logging.getSinksStream({pageSize: 1}) + .on('error', done) + .once('data', () => { + logstream.end(); + done(); + }); }); it('should get metadata', done => { logging.getSinksStream({pageSize: 1}) .on('error', done) - .once('data', sink => { + .once('data', (sink: Sink) => { sink.getMetadata((err, metadata) => { assert.ifError(err); - assert.strictEqual(is.object(metadata), true); + assert.strictEqual(typeof metadata, 'object'); done(); }); }); @@ -240,14 +233,14 @@ describe('Logging', () => { }); it('should list log entries as a stream', done => { - const logstream = logging - .getEntriesStream({ - autoPaginate: false, - pageSize: 1, - }) - .on('error', done) - .once('data', () => logstream.end()) - .on('end', done); + const logstream: Duplex = logging + .getEntriesStream({ + autoPaginate: false, + pageSize: 1, + }) + .on('error', done) + .once('data', () => logstream.end()) + .on('end', done); }); describe('log-specific entries', () => { @@ -391,7 +384,7 @@ describe('Logging', () => { }); it('should write a log with metadata', done => { - const metadata = extend({}, options, { + const metadata = Object.assign({}, options, { severity: 'DEBUG', }); diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 7795ab78ac1..7c274f890aa 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -18,13 +18,15 @@ import {Service, util} from '@google-cloud/common-grpc'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; +import * as sinon from 'sinon'; +import * as entryTypes from '../src/entry'; class FakeGrpcService { static structToObj_?: Function; static objToStruct_?: Function; } -let fakeEventIdNewOverride; +let fakeEventIdNewOverride: Function|null; class FakeEventId { new() { @@ -34,11 +36,12 @@ class FakeEventId { describe('Entry', () => { // tslint:disable-next-line no-any variable-name - let Entry: any; - let entry; + let Entry: typeof entryTypes.Entry; + let entry: entryTypes.Entry; const METADATA = {}; const DATA = {}; + const sandbox = sinon.createSandbox(); before(() => { Entry = proxyquire('../src/entry.js', { @@ -55,54 +58,39 @@ describe('Entry', () => { entry = new Entry(METADATA, DATA); }); + afterEach(() => sandbox.restore()); + describe('instantiation', () => { it('should assign timestamp to metadata', () => { - const now = new Date(); - + const now = Date.now(); const expectedTimestampBoundaries = { - start: new Date(now.getTime() - 1000), - end: new Date(now.getTime() + 1000), + start: new Date(now - 1000), + end: new Date(now + 1000), }; - - assert(entry.metadata.timestamp >= expectedTimestampBoundaries.start); - assert(entry.metadata.timestamp <= expectedTimestampBoundaries.end); + assert(entry.metadata.timestamp! >= expectedTimestampBoundaries.start); + assert(entry.metadata.timestamp! <= expectedTimestampBoundaries.end); }); it('should not assign timestamp if one is already set', () => { - const timestamp = new Date('2012'); - - const entry = new Entry({ - timestamp, - }); - + const timestamp = new Date('2012') as entryTypes.Timestamp; + const entry = new Entry({timestamp}); assert.strictEqual(entry.metadata.timestamp, timestamp); }); it('should assign insertId to metadata', () => { const eventId = 'event-id'; - - fakeEventIdNewOverride = () => { - return eventId; - }; - + fakeEventIdNewOverride = () => eventId; const entry = new Entry(); - assert.strictEqual(entry.metadata.insertId, eventId); }); it('should not assign insertId if one is already set', () => { const eventId = 'event-id'; - - fakeEventIdNewOverride = () => { - return eventId; - }; - + fakeEventIdNewOverride = () => eventId; const userDefinedInsertId = 'user-defined-insert-id'; - const entry = new Entry({ insertId: userDefinedInsertId, }); - assert.strictEqual(entry.metadata.insertId, userDefinedInsertId); }); @@ -113,17 +101,13 @@ describe('Entry', () => { describe('fromApiResponse_', () => { const RESOURCE = {}; - let entry; + let entry: entryTypes.Entry; const date = new Date(); beforeEach(() => { const seconds = date.getTime() / 1000; const secondsRounded = Math.floor(seconds); - - FakeGrpcService.structToObj_ = data => { - return data; - }; - + FakeGrpcService.structToObj_ = data => data; entry = Entry.fromApiResponse_({ resource: RESOURCE, payload: 'jsonPayload', @@ -133,14 +117,16 @@ describe('Entry', () => { seconds: secondsRounded, nanos: Math.floor((seconds - secondsRounded) * 1e9), }, - }); + // tslint:disable-next-line: no-any + } as any); }); it('should create an Entry', () => { assert(entry instanceof Entry); assert.strictEqual(entry.metadata.resource, RESOURCE); assert.strictEqual(entry.data, DATA); - assert.strictEqual(entry.metadata.extraProperty, true); + // tslint:disable-next-line: no-any + assert.strictEqual((entry.metadata as any).extraProperty, true); assert.deepStrictEqual(entry.metadata.timestamp, date); }); @@ -150,8 +136,8 @@ describe('Entry', () => { payload: 'protoPayload', protoPayload: DATA, extraProperty: true, - }); - + // tslint:disable-next-line: no-any + } as any); assert.strictEqual(entry.data, DATA); }); @@ -163,9 +149,10 @@ describe('Entry', () => { const entry = Entry.fromApiResponse_({ resource: RESOURCE, payload: 'textPayload', - textPayload: DATA, + textPayload: DATA as string, extraProperty: true, - }); + // tslint:disable-next-line: no-any + } as any); assert.strictEqual(entry.data, DATA); }); @@ -187,14 +174,15 @@ describe('Entry', () => { const input = {}; const converted = {}; - FakeGrpcService.objToStruct_ = (obj, options) => { - assert.strictEqual(obj, input); - assert.deepStrictEqual(options, { - removeCircular: false, - stringify: true, - }); - return converted; - }; + sandbox.stub(FakeGrpcService, 'objToStruct_') + .callsFake((obj, options) => { + assert.strictEqual(obj, input); + assert.deepStrictEqual(options, { + removeCircular: false, + stringify: true, + }); + return converted; + }); entry.data = input; const json = entry.toJSON(); @@ -202,11 +190,11 @@ describe('Entry', () => { }); it('should pass removeCircular to objToStruct_', done => { - FakeGrpcService.objToStruct_ = (obj, options) => { - assert.strictEqual(options.removeCircular, true); - done(); - }; - + sandbox.stub(FakeGrpcService, 'objToStruct_') + .callsFake((obj, options) => { + assert.strictEqual(options.removeCircular, true); + done(); + }); entry.data = {}; entry.toJSON({removeCircular: true}); }); @@ -219,13 +207,10 @@ describe('Entry', () => { it('should convert a date', () => { const date = new Date(); - entry.metadata.timestamp = date; - + entry.metadata.timestamp = date as entryTypes.Timestamp; const json = entry.toJSON(); - const seconds = date.getTime() / 1000; const secondsRounded = Math.floor(seconds); - assert.deepStrictEqual(json.timestamp, { seconds: secondsRounded, nanos: Math.floor((seconds - secondsRounded) * 1e9), diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 02fb5663f81..dd12387378e 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -27,7 +27,7 @@ const PKG = require('../../package.json'); let extended = false; const fakePaginator = { paginator: { - extend(klass, methods) { + extend(klass: Function, methods: string[]) { if (klass.name !== 'Logging') { return; } @@ -35,20 +35,20 @@ const fakePaginator = { methods = arrify(methods); assert.deepStrictEqual(methods, ['getEntries', 'getSinks']); }, - streamify(methodName) { + streamify(methodName: string) { return methodName; }, }, }; -let googleAuthOverride; +let googleAuthOverride: Function|null; function fakeGoogleAuth() { return (googleAuthOverride || util.noop).apply(null, arguments); } -let isCustomTypeOverride; +let isCustomTypeOverride: Function|null; let promisifed = false; -let replaceProjectIdTokenOverride; +let replaceProjectIdTokenOverride: Function|null; const fakeUtil = extend({}, util, { isCustomType() { if (isCustomTypeOverride) { diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 6bc9ff0ba75..4bb66fbcfc4 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -31,7 +31,7 @@ function makeFakeResponse() { return ee; } -let getOrInjectContextValue; +let getOrInjectContextValue: {}|undefined; const FAKE_CONTEXT = { getOrInjectContext: () => { return getOrInjectContextValue; @@ -78,7 +78,7 @@ describe('middleware/express/make-middleware', () => { const fakeRequest = makeFakeRequest(); const fakeResponse = makeFakeResponse(); - function makeChild(trace) { + function makeChild(trace: {}) { assert.strictEqual( trace, `projects/${FAKE_PROJECT_ID}/traces/${ @@ -100,7 +100,7 @@ describe('middleware/express/make-middleware', () => { const fakeResponse = makeFakeResponse(); let emitRequestLogCalled = false; - function emitRequestLog(httpRequest, trace) { + function emitRequestLog(httpRequest: {}, trace: {}) { assert.strictEqual( trace, `projects/${FAKE_PROJECT_ID}/traces/${ diff --git a/handwritten/logging/test/middleware/test-context.ts b/handwritten/logging/test/middleware/test-context.ts index 05670c6bac5..efd36dc9cc1 100644 --- a/handwritten/logging/test/middleware/test-context.ts +++ b/handwritten/logging/test/middleware/test-context.ts @@ -20,9 +20,9 @@ import * as proxyquire from 'proxyquire'; import {makeHeaderWrapper} from '../../src/middleware/context'; const FAKE_CONTEXT = { - extract: (headerWrapper) => {}, + extract: (headerWrapper: {}) => {}, generate: () => {}, - inject: (headerWrapper, spanContext) => {} + inject: (headerWrapper: {}, spanContext: {}) => {} }; const fakeContext = Object.assign({}, FAKE_CONTEXT); @@ -43,7 +43,7 @@ describe('middleware/context', () => { }); it('should correctly set request headers', () => { - const req = {headers: {}}; + const req = {headers: {} as http.IncomingHttpHeaders}; const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); wrapper.setHeader(HEADER_NAME, HEADER_VALUE); assert.strictEqual(req.headers[HEADER_NAME], HEADER_VALUE); From b89359218a0ec9115c9a2d2ce1eebfbd19c98f1a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 9 Mar 2019 13:14:42 -0800 Subject: [PATCH 0357/1029] fix(deps): update dependency @google-cloud/paginator to ^0.2.0 (#419) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 611b82d18a8..925b1000e32 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@google-cloud/common-grpc": "^0.10.0", - "@google-cloud/paginator": "^0.1.0", + "@google-cloud/paginator": "^0.2.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.4.0", "@opencensus/propagation-stackdriver": "0.0.9", From a0d39e0552d0329d36138fbd62d9f1e230ceed81 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 12 Mar 2019 10:47:05 -0700 Subject: [PATCH 0358/1029] refactor: update json import paths (#422) refactor: update json import paths --- .../src/v2/config_service_v2_client.js | 2 +- .../src/v2/logging_service_v2_client.js | 2 +- .../src/v2/metrics_service_v2_client.js | 2 +- handwritten/logging/synth.metadata | 33 +++++++++++++++++-- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index a28e237bb94..67d20d0fb7e 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./config_service_v2_client_config'); +const gapicConfig = require('./config_service_v2_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 1b15ec4f335..56ac47f62a1 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./logging_service_v2_client_config'); +const gapicConfig = require('./logging_service_v2_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 9334e999c1e..2856a2dfc87 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./metrics_service_v2_client_config'); +const gapicConfig = require('./metrics_service_v2_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index b89f7fb17e8..7fafa9e417d 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,11 +1,38 @@ { - "updateTime": "2019-03-08T00:45:42.022468Z", + "updateTime": "2019-03-12T11:18:31.436803Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.15", - "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" + "version": "0.16.16", + "dockerImage": "googleapis/artman@sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", + "internalRef": "237945492" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.2.26" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "logging", + "apiVersion": "v2", + "language": "nodejs", + "generator": "gapic", + "config": "google/logging/artman_logging.yaml" } } ] From b8f6d2974a57538e0e8ab5cc10ee7043b8671a8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 12 Mar 2019 11:42:45 -0700 Subject: [PATCH 0359/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.28.0 (#421) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 925b1000e32..41afe324eef 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -77,7 +77,7 @@ "devDependencies": { "@google-cloud/bigquery": "^2.0.1", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.27.0", + "@google-cloud/pubsub": "^0.28.0", "@google-cloud/storage": "^2.2.0", "@types/arrify": "^1.0.4", "@types/extend": "^3.0.0", From 56ccedc45d722f5a3170af0d2ce7a09de78b2d16 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 18 Mar 2019 10:19:13 -0700 Subject: [PATCH 0360/1029] test: reap deleted resources to avoid collisions (#424) The system tests are trying to delete all buckets, datasets, topics, and sinks that match a given name pattern. If the system tests run at the same time, this leads to weird errors and conflicts. This PR tries to fix that :) --- handwritten/logging/src/log.ts | 14 +- handwritten/logging/src/metadata.ts | 7 +- handwritten/logging/system-test/logging.ts | 376 ++++++++++++--------- 3 files changed, 227 insertions(+), 170 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 867c88b587a..ce6cf67aae9 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -822,16 +822,10 @@ class Log implements LogSeverityFunctions { } else if (this.logging.detectedResource) { writeWithResource(this.logging.detectedResource); } else { - getDefaultResource(this.logging.auth) - .then( - (resource) => { - this.logging.detectedResource = resource; - writeWithResource(resource); - }, - () => { - // Ignore errors (the API will speak up if it has an issue). - writeWithResource(null); - }); + getDefaultResource(this.logging.auth).then((resource) => { + this.logging.detectedResource = resource; + writeWithResource(resource); + }); } function writeWithResource(resource: {}|null) { let decoratedEntries; diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 609db4f50b5..0d616410940 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -140,17 +140,18 @@ export function getGlobalDescriptor() { */ export async function getDefaultResource(auth: GoogleAuth) { const env = await auth.getEnv(); + switch (env) { case GCPEnv.KUBERNETES_ENGINE: - return getGKEDescriptor(); + return getGKEDescriptor().catch(() => getGlobalDescriptor()); case GCPEnv.APP_ENGINE: - return getGAEDescriptor(); + return getGAEDescriptor().catch(() => getGlobalDescriptor()); case GCPEnv.CLOUD_FUNCTIONS: return getCloudFunctionDescriptor(); case GCPEnv.COMPUTE_ENGINE: // Test for compute engine should be done after all the rest - // everything runs on top of compute engine. - return getGCEDescriptor(); + return getGCEDescriptor().catch(() => getGlobalDescriptor()); default: return getGlobalDescriptor(); } diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index ebd6e560558..5cd8172d26a 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -23,6 +23,7 @@ import {ServiceObject} from '@google-cloud/common'; import {PubSub} from '@google-cloud/pubsub'; import {Storage} from '@google-cloud/storage'; import * as assert from 'assert'; +import {HOST_ADDRESS} from 'gcp-metadata'; import * as nock from 'nock'; import {Duplex} from 'stream'; import * as uuid from 'uuid'; @@ -30,7 +31,7 @@ import * as uuid from 'uuid'; import {Logging, Sink} from '../src'; // block all attempts to chat with the metadata server (kokoro runs on GCE) -nock('http://metadata.google.internal.') +nock(HOST_ADDRESS) .get(() => true) .replyWithError({code: 'ENOTFOUND'}) .persist(); @@ -60,6 +61,9 @@ describe('Logging', () => { }); after(async () => { + const oneHourAgo = new Date(); + oneHourAgo.setHours(oneHourAgo.getHours() - 1); + await Promise.all( [deleteBuckets(), deleteDatasets(), deleteTopics(), deleteSinks()]); @@ -67,10 +71,15 @@ describe('Logging', () => { const [buckets] = await storage.getBuckets({ prefix: TESTS_PREFIX, }); - return Promise.all(buckets.map(async bucket => { - await bucket.deleteFiles(); - await bucket.delete(); - })); + return Promise.all(buckets + .filter(bucket => { + return new Date(bucket.metadata.timeCreated) < + oneHourAgo; + }) + .map(async bucket => { + await bucket.deleteFiles(); + await bucket.delete(); + })); } async function deleteDatasets() { @@ -87,13 +96,19 @@ describe('Logging', () => { async function getAndDelete(method: Function) { const [objects] = await method(); - return Promise.all( - objects - .filter( - (o: ServiceObject) => - // tslint:disable-next-line no-any - ((o as any).name || o.id).indexOf(TESTS_PREFIX) === 0) - .map((o: ServiceObject) => o.delete())); + return Promise.all(objects + .filter((o: ServiceObject) => { + // tslint:disable-next-line no-any + const name = (o as any).name || o.id; + + if (!name.startsWith(TESTS_PREFIX)) { + return false; + } + + return getDateFromGeneratedName(name) < + oneHourAgo; + }) + .map((o: ServiceObject) => o.delete())); } }); @@ -188,29 +203,61 @@ describe('Logging', () => { }); describe('logs', () => { - const log = logging.log(`system-test-logs-${uuid.v4()}`); - - const logEntries = [ - // string data - log.entry('log entry 1'), - - // object data - log.entry({delegate: 'my_username'}), - - // various data types - log.entry({ - nonValue: null, - boolValue: true, - arrayValue: [1, 2, 3], - }), - - // nested object data - log.entry({ - nested: { - delegate: 'my_username', - }, - }), - ]; + // tslint:disable-next-line no-any + const logs: any[] = []; + + function getTestLog() { + const log = logging.log(`system-test-logs-${uuid.v4()}`); + logs.push(log); + + const logEntries = [ + // string data + log.entry('log entry 1'), + + // object data + log.entry({delegate: 'my_username'}), + + // various data types + log.entry({ + nonValue: null, + boolValue: true, + arrayValue: [1, 2, 3], + }), + + // nested object data + log.entry({ + nested: { + delegate: 'my_username', + }, + }), + ]; + + return {log, logEntries}; + } + + function getEntriesFromLog(log, callback) { + let numAttempts = 0; + + setTimeout(pollForMessages, WRITE_CONSISTENCY_DELAY_MS); + + function pollForMessages() { + numAttempts++; + + log.getEntries({autoPaginate: false}, (err, entries) => { + if (err) { + callback(err); + return; + } + + if (entries!.length === 0 && numAttempts < 8) { + setTimeout(pollForMessages, WRITE_CONSISTENCY_DELAY_MS); + return; + } + + callback(null, entries); + }); + } + } const options = { resource: { @@ -222,38 +269,58 @@ describe('Logging', () => { }, }; - after(done => log.delete(done)); + after(async () => { + await new Promise(r => setTimeout(r, WRITE_CONSISTENCY_DELAY_MS)); + + for (const log of logs) { + await log.delete(); + } + }); + + it('should list log entries', (done) => { + const {log, logEntries} = getTestLog(); + + log.write(logEntries, options, err => { + assert.ifError(err); - it('should list log entries', async () => { - const [entries] = await logging.getEntries({ - autoPaginate: false, - pageSize: 1, + getEntriesFromLog(log, (err, entries) => { + assert.ifError(err); + assert.strictEqual(entries.length, logEntries.length); + done(); + }); }); - assert.strictEqual(entries.length, 1); }); it('should list log entries as a stream', done => { - const logstream: Duplex = logging - .getEntriesStream({ - autoPaginate: false, - pageSize: 1, - }) - .on('error', done) - .once('data', () => logstream.end()) - .on('end', done); + const {log, logEntries} = getTestLog(); + + log.write(logEntries, options, err => { + assert.ifError(err); + + const logstream: Duplex = logging + .getEntriesStream({ + autoPaginate: false, + pageSize: 1, + }) + .on('error', done) + .once('data', () => logstream.end()) + .on('end', done); + }); }); describe('log-specific entries', () => { + const {log, logEntries} = getTestLog(); + before(done => { log.write(logEntries, options, done); }); - it('should list log entries', async () => { - const [entries] = await log.getEntries({ - autoPaginate: false, - pageSize: 1, + it('should list log entries', (done) => { + getEntriesFromLog(log, (err, entries) => { + assert.ifError(err); + assert.strictEqual(entries.length, logEntries.length); + done(); }); - assert.strictEqual(entries.length, 1); }); it('should list log entries as a stream', done => { @@ -270,33 +337,42 @@ describe('Logging', () => { }); it('should write a single entry to a log', done => { + const {log, logEntries} = getTestLog(); log.write(logEntries[0], options, done); }); - it('should write multiple entries to a log', async () => { - await log.write(logEntries, options); - await new Promise(r => setTimeout(r, WRITE_CONSISTENCY_DELAY_MS)); - const [entries] = await log.getEntries({ - autoPaginate: false, - pageSize: logEntries.length, + it('should write multiple entries to a log', (done) => { + const {log, logEntries} = getTestLog(); + + log.write(logEntries, options, (err) => { + assert.ifError(err); + + getEntriesFromLog(log, (err, entries) => { + assert.ifError(err); + + assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ + 'log entry 1', + {delegate: 'my_username'}, + { + nonValue: null, + boolValue: true, + arrayValue: [1, 2, 3], + }, + { + nested: { + delegate: 'my_username', + }, + }, + ]); + + done(); + }); }); - assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ - 'log entry 1', - {delegate: 'my_username'}, - { - nonValue: null, - boolValue: true, - arrayValue: [1, 2, 3], - }, - { - nested: { - delegate: 'my_username', - }, - }, - ]); }); it('should preserve order of entries', done => { + const {log} = getTestLog(); + const entry1 = log.entry('1'); setTimeout(() => { @@ -307,49 +383,37 @@ describe('Logging', () => { log.write([entry2, entry3, entry1], options, err => { assert.ifError(err); - setTimeout(() => { - log.getEntries( - { - autoPaginate: false, - pageSize: 3, - }, - (err, entries) => { - assert.ifError(err); - assert.deepStrictEqual(entries!.map(x => x.data), [ - '3', - '2', - '1', - ]); - done(); - }); - }, WRITE_CONSISTENCY_DELAY_MS * 4); + getEntriesFromLog(log, (err, entries) => { + assert.ifError(err); + assert.deepStrictEqual(entries!.map(x => x.data), [ + '3', + '2', + '1', + ]); + done(); + }); }); }, 1000); }); it('should preserve order for sequential write calls', done => { + const {log} = getTestLog(); const messages = ['1', '2', '3', '4', '5']; messages.forEach(message => { - log.write(log.entry(message)); + log.write(log.entry(message), options); }); - setTimeout(() => { - log.getEntries( - { - autoPaginate: false, - pageSize: messages.length, - }, - (err, entries) => { - assert.ifError(err); - assert.deepStrictEqual( - entries!.reverse().map(x => x.data), messages); - done(); - }); - }, WRITE_CONSISTENCY_DELAY_MS * 4); + getEntriesFromLog(log, (err, entries) => { + assert.ifError(err); + assert.deepStrictEqual(entries!.reverse().map(x => x.data), messages); + done(); + }); }); it('should write an entry with primitive values', done => { + const {log} = getTestLog(); + const logEntry = log.entry({ when: new Date(), matchUser: /username: (.+)/, @@ -360,30 +424,25 @@ describe('Logging', () => { log.write(logEntry, options, err => { assert.ifError(err); - setTimeout(() => { - log.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); + getEntriesFromLog(log, (err, entries) => { + assert.ifError(err); - const entry = entries![0]; + const entry = entries![0]; - assert.deepStrictEqual(entry.data, { - when: logEntry.data.when.toString(), - matchUser: logEntry.data.matchUser.toString(), - matchUserError: logEntry.data.matchUserError.toString(), - }); + assert.deepStrictEqual(entry.data, { + when: logEntry.data.when.toString(), + matchUser: logEntry.data.matchUser.toString(), + matchUserError: logEntry.data.matchUserError.toString(), + }); - done(); - }); - }, WRITE_CONSISTENCY_DELAY_MS); + done(); + }); }); }); it('should write a log with metadata', done => { + const {log} = getTestLog(); + const metadata = Object.assign({}, options, { severity: 'DEBUG', }); @@ -397,59 +456,46 @@ describe('Logging', () => { log.write(logEntry, err => { assert.ifError(err); - setTimeout(() => { - log.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); - - const entry = entries![0]; - - assert.strictEqual(entry.metadata.severity, metadata.severity); - assert.deepStrictEqual(entry.data, data); + getEntriesFromLog(log, (err, entries) => { + assert.ifError(err); - done(); - }); - }, WRITE_CONSISTENCY_DELAY_MS); + const entry = entries![0]; + assert.strictEqual(entry.metadata.severity, metadata.severity); + assert.deepStrictEqual(entry.data, data); + done(); + }); }); }); it('should set the default resource', done => { + const {log} = getTestLog(); + const text = 'entry-text'; const entry = log.entry(text); log.write(entry, err => { assert.ifError(err); - setTimeout(() => { - log.getEntries( - { - autoPaginate: false, - pageSize: 1, - }, - (err, entries) => { - assert.ifError(err); + getEntriesFromLog(log, (err, entries) => { + assert.ifError(err); - const entry = entries![0]; + const entry = entries![0]; - assert.strictEqual(entry.data, text); - assert.deepStrictEqual(entry.metadata.resource, { - type: 'global', - labels: { - project_id: PROJECT_ID, - }, - }); + assert.strictEqual(entry.data, text); + assert.deepStrictEqual(entry.metadata.resource, { + type: 'global', + labels: { + project_id: PROJECT_ID, + }, + }); - done(); - }); - }, WRITE_CONSISTENCY_DELAY_MS); + done(); + }); }); }); it('should write a log with camelcase resource label keys', done => { + const {log, logEntries} = getTestLog(); log.write( logEntries, { resource: { @@ -464,39 +510,55 @@ describe('Logging', () => { }); it('should write to a log with alert helper', done => { + const {log, logEntries} = getTestLog(); log.alert(logEntries, options, done); }); it('should write to a log with critical helper', done => { + const {log, logEntries} = getTestLog(); log.critical(logEntries, options, done); }); it('should write to a log with debug helper', done => { + const {log, logEntries} = getTestLog(); log.debug(logEntries, options, done); }); it('should write to a log with emergency helper', done => { + const {log, logEntries} = getTestLog(); log.emergency(logEntries, options, done); }); it('should write to a log with error helper', done => { + const {log, logEntries} = getTestLog(); log.error(logEntries, options, done); }); it('should write to a log with info helper', done => { + const {log, logEntries} = getTestLog(); log.info(logEntries, options, done); }); it('should write to a log with notice helper', done => { + const {log, logEntries} = getTestLog(); log.notice(logEntries, options, done); }); it('should write to a log with warning helper', done => { + const {log, logEntries} = getTestLog(); log.warning(logEntries, options, done); }); }); function generateName() { - return TESTS_PREFIX + uuid.v1(); + return `${TESTS_PREFIX}-${Date.now()}-${uuid().split('-').pop()}`; + } + + // Parse the time the resource was created using the resource id + // Format 1: ${TESTS_PREFIX}-${date}-${uuid} + // Format 2: ${TESTS_PREFIX}_${date}_${uuid} + function getDateFromGeneratedName(name) { + const timeCreated = name.substr(TESTS_PREFIX.length + 1).split(/-|_/g)[0]; + return new Date(Number(timeCreated)); } }); From d72f916bb97147764028604ff88dac475b292831 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Mon, 18 Mar 2019 11:08:32 -0700 Subject: [PATCH 0361/1029] build: update kokoro release configuration (#428) This PR was generated using Autosynth. :rainbow: Here's the log from Synthtool: ``` synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. synthtool > Ensuring dependencies. synthtool > Pulling artman image. latest: Pulling from googleapis/artman Digest: sha256:7231f27272231a884e09edb5953148c85ecd8467780d33c4a35c3e507885715b Status: Image is up to date for googleapis/artman:latest synthtool > Cloning googleapis. synthtool > Running generator for google/logging/artman_logging.yaml. synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/logging-v2. synthtool > Replaced '../../package.json' in src/v2/config_service_v2_client.js. synthtool > Replaced '../../package.json' in src/v2/logging_service_v2_client.js. synthtool > Replaced '../../package.json' in src/v2/metrics_service_v2_client.js. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .jsdoc.js .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/docs.cfg .kokoro/continuous/node10/lint.cfg .kokoro/continuous/node10/samples-test.cfg .kokoro/continuous/node10/system-test-grpcjs.cfg .kokoro/continuous/node10/system-test.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node11/common.cfg .kokoro/continuous/node11/test.cfg .kokoro/continuous/node6/common.cfg .kokoro/continuous/node6/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/docs.cfg .kokoro/presubmit/node10/lint.cfg .kokoro/presubmit/node10/samples-test.cfg .kokoro/presubmit/node10/system-test-grpcjs.cfg .kokoro/presubmit/node10/system-test.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node11/common.cfg .kokoro/presubmit/node11/test.cfg .kokoro/presubmit/node6/common.cfg .kokoro/presubmit/node6/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE codecov.yaml renovate.json synthtool > Replaced 'https:\\/\\/cloud\\.google\\.com[\\s\\*]*http:\\/\\/(.*)[\\s\\*]*\\)' in src/v2/doc/google/protobuf/doc_timestamp.js. synthtool > Replaced 'toISOString\\]' in src/v2/doc/google/protobuf/doc_timestamp.js. synthtool > Replaced 'Sum\\[i=1\\.\\.n\\]\\(https:\\/\\/cloud\\.google\\.com\\(x_i - mean\\)\\^2\\)' in src/v2/doc/google/api/doc_distribution.js. > grpc@1.19.0 install /tmpfs/src/git/autosynth/working_repo/node_modules/grpc > node-pre-gyp install --fallback-to-build --library=static_library node-pre-gyp WARN Using needle for node-pre-gyp https download [grpc] Success: "/tmpfs/src/git/autosynth/working_repo/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" is installed via remote > protobufjs@6.8.8 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall > @google-cloud/logging@4.4.0 prepare /tmpfs/src/git/autosynth/working_repo > npm run compile > @google-cloud/logging@4.4.0 compile /tmpfs/src/git/autosynth/working_repo > tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp -r proto build && cp test/*.js build/test npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 1204 packages from 1379 contributors and audited 8674 packages in 33.681s found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details > @google-cloud/logging@4.4.0 fix /tmpfs/src/git/autosynth/working_repo > gts fix && eslint --fix '**/*.js' synthtool > Cleaned up 2 temporary directories. synthtool > Wrote metadata to synth.metadata. ``` --- handwritten/logging/.kokoro/release/publish.cfg | 9 +++++++++ handwritten/logging/synth.metadata | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 2ed74a1807a..b8c0a54c94f 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -47,6 +47,15 @@ before_action { } } +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google-cloud-logging-npm-token" + } + } +} + # Download trampoline resources. gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 7fafa9e417d..211b4c894e4 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-12T11:18:31.436803Z", + "updateTime": "2019-03-16T11:16:56.652485Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.16", - "dockerImage": "googleapis/artman@sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319" + "version": "0.16.17", + "dockerImage": "googleapis/artman@sha256:7231f27272231a884e09edb5953148c85ecd8467780d33c4a35c3e507885715b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", - "internalRef": "237945492" + "sha": "dab002e28c81adcc5601278c36d4302c2624c8e2", + "internalRef": "238726437" } }, { From 7c686689192a692670982d1e27d19510cdd77044 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 18 Mar 2019 15:04:27 -0400 Subject: [PATCH 0362/1029] chore(deps): update dependency google-proto-files to ^0.20.0 (#425) This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | google-proto-files | devDependencies | minor | [`^0.18.0` -> `^0.20.0`](https://diff.intrinsic.com/google-proto-files/0.18.0/0.20.0) | [source](https://togithub.com/googleapis/nodejs-proto-files) | --- ### Release Notes
googleapis/nodejs-proto-files ### [`v0.20.0`](https://togithub.com/googleapis/nodejs-proto-files/blob/master/CHANGELOG.md#v0200) [Compare Source](https://togithub.com/googleapis/nodejs-proto-files/compare/v0.19.0...v0.20.0) 03-15-2019 11:15 PDT This release includes updated proto files from [googleapis/googleapis](https://togithub.com/googleapis/googleapis). ##### Internal / Testing Changes - build: use per-repo npm publish token ([#​162](https://togithub.com/googleapis/nodejs-proto-files/pull/162)) ### [`v0.19.0`](https://togithub.com/googleapis/nodejs-proto-files/blob/master/CHANGELOG.md#v0190) [Compare Source](https://togithub.com/googleapis/nodejs-proto-files/compare/v0.18.0...v0.19.0) 03-13-2019 14:17 PDT ##### Implementation Changes - refactor: removed async module dependency ([#​120](https://togithub.com/googleapis/nodejs-proto-files/pull/120)) ##### New Features - Now the package includes new common proto file, `google/api/resource.proto`. ##### Dependencies - chore(deps): update dependency [@​google-cloud/nodejs-repo-tools](https://togithub.com/google-cloud/nodejs-repo-tools) to v3 ([#​111](https://togithub.com/googleapis/nodejs-proto-files/pull/111)) - chore(deps): update dependency gts to ^0.9.0 ([#​113](https://togithub.com/googleapis/nodejs-proto-files/pull/113)) - fix: Pin [@​types/sinon](https://togithub.com/types/sinon) to last compatible version ([#​116](https://togithub.com/googleapis/nodejs-proto-files/pull/116)) - chore(deps): update dependency [@​types/sinon](https://togithub.com/types/sinon) to v5.0.7 ([#​117](https://togithub.com/googleapis/nodejs-proto-files/pull/117)) - chore(deps): update dependency typescript to ~3.2.0 ([#​119](https://togithub.com/googleapis/nodejs-proto-files/pull/119)) - chore(deps): update dependency [@​types/sinon](https://togithub.com/types/sinon) to v7 ([#​137](https://togithub.com/googleapis/nodejs-proto-files/pull/137)) - chore(deps): update dependency eslint-config-prettier to v4 ([#​141](https://togithub.com/googleapis/nodejs-proto-files/pull/141)) - fix(deps): update dependency walkdir to v0.1.0 ([#​143](https://togithub.com/googleapis/nodejs-proto-files/pull/143)) - fix(deps): update dependency walkdir to v0.2.0 ([#​145](https://togithub.com/googleapis/nodejs-proto-files/pull/145)) - fix(deps): update dependency walkdir to ^0.3.0 ([#​148](https://togithub.com/googleapis/nodejs-proto-files/pull/148)) - fix(deps): update dependency [@​google-cloud/promisify](https://togithub.com/google-cloud/promisify) to ^0.4.0 ([#​153](https://togithub.com/googleapis/nodejs-proto-files/pull/153)) ##### Documentation - docs: update readme badges ([#​123](https://togithub.com/googleapis/nodejs-proto-files/pull/123)) - docs: add lint/fix example to contributing guide ([#​144](https://togithub.com/googleapis/nodejs-proto-files/pull/144)) - docs: update contributing path in README ([#​147](https://togithub.com/googleapis/nodejs-proto-files/pull/147)) - docs: update links in contrib guide ([#​155](https://togithub.com/googleapis/nodejs-proto-files/pull/155)) ##### Internal / Testing Changes - chore: update eslintignore config ([#​112](https://togithub.com/googleapis/nodejs-proto-files/pull/112)) - fix(build): fix system key decryption ([#​121](https://togithub.com/googleapis/nodejs-proto-files/pull/121)) - chore: update license file ([#​125](https://togithub.com/googleapis/nodejs-proto-files/pull/125)) - chore: nyc ignore build/test by default ([#​127](https://togithub.com/googleapis/nodejs-proto-files/pull/127)) - chore: always nyc report before calling codecov ([#​128](https://togithub.com/googleapis/nodejs-proto-files/pull/128)) - build: add Kokoro configs for autorelease ([#​131](https://togithub.com/googleapis/nodejs-proto-files/pull/131)) - fix(build): fix Kokoro release script ([#​132](https://togithub.com/googleapis/nodejs-proto-files/pull/132)) - chore: fix publish.sh permission +x ([#​133](https://togithub.com/googleapis/nodejs-proto-files/pull/133)) - chore: update nyc and eslint configs ([#​135](https://togithub.com/googleapis/nodejs-proto-files/pull/135)) - chore(build): inject yoshi automation key ([#​136](https://togithub.com/googleapis/nodejs-proto-files/pull/136)) - build: check for 404s on all docs ([#​139](https://togithub.com/googleapis/nodejs-proto-files/pull/139)) - build: ignore googleapis.com in doc link check ([#​140](https://togithub.com/googleapis/nodejs-proto-files/pull/140)) - build: test using [@​grpc/grpc-js](https://togithub.com/grpc/grpc-js) in CI ([#​150](https://togithub.com/googleapis/nodejs-proto-files/pull/150)) - build: create docs test npm scripts ([#​151](https://togithub.com/googleapis/nodejs-proto-files/pull/151)) - build: use linkinator for docs test ([#​152](https://togithub.com/googleapis/nodejs-proto-files/pull/152)) - build: exclude CONTRIBUTING.md from synthing ([#​154](https://togithub.com/googleapis/nodejs-proto-files/pull/154)) - build: use node10 to run samples-test, system-test etc ([#​158](https://togithub.com/googleapis/nodejs-proto-files/pull/158)) - build: Add docuploader credentials to node publish jobs ([#​159](https://togithub.com/googleapis/nodejs-proto-files/pull/159))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with "`rebase!`". :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 41afe324eef..d795a1e3b75 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -98,7 +98,7 @@ "eslint-config-prettier": "^4.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", - "google-proto-files": "^0.18.0", + "google-proto-files": "^0.20.0", "gts": "^0.9.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", From d3d32c70e570c752c029051d3f499b089ece9a3c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 18 Mar 2019 12:17:57 -0700 Subject: [PATCH 0363/1029] Release v4.5.0 (#423) --- handwritten/logging/CHANGELOG.md | 39 ++++++++++++++++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 7a866ed2cf2..4e5bf2c4e4c 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,45 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.5.0 + +03-13-2019 22:25 PDT + +### New Features +- feat: ability to detect service context ([#400](https://github.com/googleapis/nodejs-logging/pull/400)) + +### Bug Fixes +- fix: do not push duplicate scopes ([#414](https://github.com/googleapis/nodejs-logging/pull/414)) +- fix: throw on invalid credentials ([#395](https://github.com/googleapis/nodejs-logging/pull/395)) + +### Dependencies +- fix(deps): update dependency @google-cloud/paginator to ^0.2.0 ([#419](https://github.com/googleapis/nodejs-logging/pull/419)) +- fix(deps): update dependency gcp-metadata to v1 ([#402](https://github.com/googleapis/nodejs-logging/pull/402)) +- fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.9 ([#394](https://github.com/googleapis/nodejs-logging/pull/394)) +- fix(deps): update dependency @google-cloud/promisify to ^0.4.0 ([#398](https://github.com/googleapis/nodejs-logging/pull/398)) + +### Documentation +- docs: update links in contrib guide ([#399](https://github.com/googleapis/nodejs-logging/pull/399)) + +### Internal / Testing Changes +- chore(deps): update dependency @google-cloud/pubsub to ^0.28.0 ([#421](https://github.com/googleapis/nodejs-logging/pull/421)) +- refactor: update json import paths ([#422](https://github.com/googleapis/nodejs-logging/pull/422)) +- chore(deps): update dependency supertest to v4 ([#420](https://github.com/googleapis/nodejs-logging/pull/420)) +- refactor: clean up types and imports ([#409](https://github.com/googleapis/nodejs-logging/pull/409)) +- build: Add docuploader credentials to node publish jobs ([#415](https://github.com/googleapis/nodejs-logging/pull/415)) +- build: use node10 to run samples-test, system-test etc ([#413](https://github.com/googleapis/nodejs-logging/pull/413)) +- build: update release configuration +- chore(deps): update @google-cloud/pubsub to v0.27.0 ([#410](https://github.com/googleapis/nodejs-logging/pull/410)) +- chore(deps): update dependency @google-cloud/pubsub to ^0.26.0 ([#407](https://github.com/googleapis/nodejs-logging/pull/407)) +- refactor (typescript): noImplilcitAny ([#408](https://github.com/googleapis/nodejs-logging/pull/408)) +- chore(deps): update dependency @google-cloud/pubsub to ^0.25.0 ([#405](https://github.com/googleapis/nodejs-logging/pull/405)) +- chore: update proto docs and code style +- chore(deps): update dependency mocha to v6 ([#403](https://github.com/googleapis/nodejs-logging/pull/403)) +- build: use linkinator for docs test ([#397](https://github.com/googleapis/nodejs-logging/pull/397)) +- refactor: expose and improve types ([#393](https://github.com/googleapis/nodejs-logging/pull/393)) +- fix(deps): update dependency yargs to v13 ([#392](https://github.com/googleapis/nodejs-logging/pull/392)) +- chore: use proper enum for GCPEnv ([#389](https://github.com/googleapis/nodejs-logging/pull/389)) + ## v4.4.0 02-11-2019 17:40 PST diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d795a1e3b75..1791cd2b240 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.4.0", + "version": "4.5.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From edfe7f1dae0496dc46eaf66621f92614b8a2cb4a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 18 Mar 2019 19:31:51 -0700 Subject: [PATCH 0364/1029] fix(ts): do not require storage/pubsub types, add install test (#430) --- handwritten/logging/package.json | 4 ++ handwritten/logging/src/index.ts | 4 +- .../system-test/fixtures/sample/package.json | 23 ++++++++ .../system-test/fixtures/sample/src/index.ts | 6 ++ .../system-test/fixtures/sample/tsconfig.json | 10 ++++ handwritten/logging/system-test/install.ts | 56 +++++++++++++++++++ 6 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 handwritten/logging/system-test/fixtures/sample/package.json create mode 100644 handwritten/logging/system-test/fixtures/sample/src/index.ts create mode 100644 handwritten/logging/system-test/fixtures/sample/tsconfig.json create mode 100644 handwritten/logging/system-test/install.ts diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1791cd2b240..0a0811be267 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -83,6 +83,8 @@ "@types/extend": "^3.0.0", "@types/is": "0.0.21", "@types/mocha": "^5.2.5", + "@types/mv": "^2.1.0", + "@types/ncp": "^2.0.1", "@types/nock": "^9.3.0", "@types/on-finished": "^2.3.1", "@types/pify": "^3.0.2", @@ -105,6 +107,8 @@ "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "linkinator": "^1.1.2", "mocha": "^6.0.0", + "mv": "^2.1.1", + "ncp": "^2.0.0", "nock": "^10.0.1", "nyc": "^13.0.1", "power-assert": "^1.6.0", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 4ff2d14cec3..384b3f62a97 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -66,7 +66,9 @@ export type DeleteResponse = google.protobuf.Empty; export type LogSink = google_config.logging.v2.ILogSink; export interface CreateSinkRequest { - destination: Bucket|Dataset|Topic|string; + // destination: Bucket|Dataset|Topic|string; + // tslint:disable-next-line no-any + destination: any; filter?: string; includeChildren?: boolean; name?: string; diff --git a/handwritten/logging/system-test/fixtures/sample/package.json b/handwritten/logging/system-test/fixtures/sample/package.json new file mode 100644 index 00000000000..cbd4ba415a3 --- /dev/null +++ b/handwritten/logging/system-test/fixtures/sample/package.json @@ -0,0 +1,23 @@ +{ + "name": "logging-sample-fixture", + "description": "An app we're using to test the library.", + "scripts": { + "check": "gts check", + "clean": "gts clean", + "compile": "tsc -p .", + "fix": "gts fix", + "prepare": "npm run compile", + "pretest": "npm run compile", + "posttest": "npm run check", + "start": "node build/src/index.js" + }, + "license": "Apache-2.0", + "dependencies": { + "@google-cloud/logging": "file:./logging.tgz" + }, + "devDependencies": { + "@types/node": "^10.3.0", + "typescript": "^3.0.0", + "gts": "^0.9.0" + } +} diff --git a/handwritten/logging/system-test/fixtures/sample/src/index.ts b/handwritten/logging/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..2034b44f04f --- /dev/null +++ b/handwritten/logging/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,6 @@ +import {Logging} from '@google-cloud/logging'; +async function main() { + const logging = new Logging(); + console.log(logging); +} +main(); diff --git a/handwritten/logging/system-test/fixtures/sample/tsconfig.json b/handwritten/logging/system-test/fixtures/sample/tsconfig.json new file mode 100644 index 00000000000..f893d7afb9b --- /dev/null +++ b/handwritten/logging/system-test/fixtures/sample/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "src/*.ts" + ] +} diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts new file mode 100644 index 00000000000..e22f91b606a --- /dev/null +++ b/handwritten/logging/system-test/install.ts @@ -0,0 +1,56 @@ +/** + * Copyright 2019 Google LLC. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as execa from 'execa'; +import * as mv from 'mv'; +import {ncp} from 'ncp'; +import * as tmp from 'tmp'; +import {promisify} from 'util'; + +const keep = false; +const mvp = promisify(mv) as {} as (...args: string[]) => Promise; +const ncpp = promisify(ncp); +const stagingDir = tmp.dirSync({keep, unsafeCleanup: true}); +const stagingPath = stagingDir.name; +const pkg = require('../../package.json'); + +describe('📦 pack and install', () => { + /** + * Create a staging directory with temp fixtures used to test on a fresh + * application. + */ + it('should be able to use the d.ts', async () => { + await execa('npm', ['pack', '--unsafe-perm']); + const tarball = `google-cloud-logging-${pkg.version}.tgz`; + await mvp(tarball, `${stagingPath}/logging.tgz`); + await ncpp('system-test/fixtures/sample', `${stagingPath}/`); + await execa( + 'npm', ['install', '--unsafe-perm'], + {cwd: `${stagingPath}/`, stdio: 'inherit'}); + await execa( + 'node', ['--throw-deprecation', 'build/src/index.js'], + {cwd: `${stagingPath}/`, stdio: 'inherit'}); + }); + + /** + * CLEAN UP - remove the staging directory when done. + */ + after('cleanup staging', () => { + if (!keep) { + stagingDir.removeCallback(); + } + }); +}); From 8db7f590a7711663f0ebb00f196eb9cdb533e53b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 19 Mar 2019 03:50:10 -0700 Subject: [PATCH 0365/1029] Release v4.5.1 (#431) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 4e5bf2c4e4c..b1fe04ec52d 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.5.1 + +03-18-2019 19:32 PDT + +### Bug Fixes +- fix(ts): do not require storage/pubsub types, add install test ([#430](https://github.com/googleapis/nodejs-logging/pull/430)) + ## v4.5.0 03-13-2019 22:25 PDT diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0a0811be267..005cd43986f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.5.0", + "version": "4.5.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From f7d3e3e2f39d34c2de7939b2124aa469f0640db7 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 19 Mar 2019 18:13:43 -0700 Subject: [PATCH 0366/1029] chore: publish to npm using wombat (#433) --- handwritten/logging/.kokoro/publish.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh index f2a8adc0b43..08c6dfd2a88 100755 --- a/handwritten/logging/.kokoro/publish.sh +++ b/handwritten/logging/.kokoro/publish.sh @@ -24,8 +24,8 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source / cd $(dirname $0)/.. -NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google_cloud_npm_token) -echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc +NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-logging-npm-token) +echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc npm install -npm publish --access=public +npm publish --access=public --registry=https://wombat-dressing-room.appspot.com From 497de4e7723177295fe211aa10153607440c4a7c Mon Sep 17 00:00:00 2001 From: Dominic Kramer Date: Mon, 25 Mar 2019 14:01:08 -0700 Subject: [PATCH 0367/1029] chore: use new GCF env vars in descriptor (#436) The `K_SERVICE` and `GOOGLE_CLOUD_REGION` env vars are the preferred way of getting function name and region information going forward. --- handwritten/logging/src/metadata.ts | 9 ++++-- handwritten/logging/test/metadata.ts | 43 +++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 0d616410940..4c7044da744 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -37,11 +37,16 @@ function zoneFromQualifiedZone(qualified: string): string|undefined { * @returns {object} */ export function getCloudFunctionDescriptor() { + /** + * In GCF versions after Node 8, K_SERVICE is the preferred way to + * get the function name and GOOGLE_CLOUD_REGION is the preferred way + * to get the region. + */ return { type: 'cloud_function', labels: { - function_name: process.env.FUNCTION_NAME, - region: process.env.FUNCTION_REGION, + function_name: process.env.K_SERVICE || process.env.FUNCTION_NAME, + region: process.env.GOOGLE_CLOUD_REGION || process.env.FUNCTION_REGION, }, }; } diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 2d157fd7642..665c35f30d2 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -95,12 +95,53 @@ describe('metadata', () => { const FUNCTION_NAME = 'function-name'; const FUNCTION_REGION = 'function-region'; + const K_SERVICE = 'k-service'; + const GOOGLE_CLOUD_REGION = 'google-cloud-region'; + + const TARGET_KEYS = [ + 'FUNCTION_NAME', 'FUNCTION_REGION', 'K_SERVICE', 'GOOGLE_CLOUD_REGION' + ]; + const INITIAL_ENV: {[key: string]: string|undefined} = {}; + + before(() => { + for (const key of TARGET_KEYS) { + INITIAL_ENV[key] = process.env[key]; + } + }); + + after(() => { + for (const key of TARGET_KEYS) { + const val = INITIAL_ENV[key]; + if (val === undefined) { + delete process.env[key]; + } else { + process.env[key] = val; + } + } + }); + beforeEach(() => { + for (const key of TARGET_KEYS) { + delete process.env[key]; + } process.env.FUNCTION_NAME = FUNCTION_NAME; process.env.FUNCTION_REGION = FUNCTION_REGION; }); - it('should return the correct descriptor', () => { + it('should return the correct primary descriptor', () => { + process.env.K_SERVICE = K_SERVICE; + process.env.GOOGLE_CLOUD_REGION = GOOGLE_CLOUD_REGION; + + assert.deepStrictEqual(metadata.getCloudFunctionDescriptor(), { + type: 'cloud_function', + labels: { + function_name: K_SERVICE, + region: GOOGLE_CLOUD_REGION, + }, + }); + }); + + it('should return the correct fallback descriptor', () => { assert.deepStrictEqual(metadata.getCloudFunctionDescriptor(), { type: 'cloud_function', labels: { From 80563aaea28a6cbfd079b8ec09cbb93aa5c00652 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 28 Mar 2019 14:58:01 -0700 Subject: [PATCH 0368/1029] fix: include 'x-goog-request-params' header in requests (#439) --- .../src/v2/config_service_v2_client.js | 70 +++++++++++++++++++ .../src/v2/logging_service_v2_client.js | 14 ++++ .../src/v2/metrics_service_v2_client.js | 35 ++++++++++ handwritten/logging/synth.metadata | 10 +-- 4 files changed, 124 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 67d20d0fb7e..d56d31bf90c 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -309,6 +309,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listSinks(request, options, callback); } @@ -422,6 +429,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + sink_name: request.sinkName, + }); return this._innerApiCalls.getSink(request, options, callback); } @@ -501,6 +515,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createSink(request, options, callback); } @@ -598,6 +619,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + sink_name: request.sinkName, + }); return this._innerApiCalls.updateSink(request, options, callback); } @@ -645,6 +673,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + sink_name: request.sinkName, + }); return this._innerApiCalls.deleteSink(request, options, callback); } @@ -744,6 +779,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listExclusions(request, options, callback); } @@ -857,6 +899,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getExclusion(request, options, callback); } @@ -922,6 +971,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createExclusion(request, options, callback); } @@ -998,6 +1054,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.updateExclusion(request, options, callback); } @@ -1043,6 +1106,13 @@ class ConfigServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteExclusion(request, options, callback); } diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 56ac47f62a1..986afb885d1 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -288,6 +288,13 @@ class LoggingServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + log_name: request.logName, + }); return this._innerApiCalls.deleteLog(request, options, callback); } @@ -862,6 +869,13 @@ class LoggingServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listLogs(request, options, callback); } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 2856a2dfc87..4b9cfa14c00 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -298,6 +298,13 @@ class MetricsServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listLogMetrics(request, options, callback); } @@ -403,6 +410,13 @@ class MetricsServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + metric_name: request.metricName, + }); return this._innerApiCalls.getLogMetric(request, options, callback); } @@ -463,6 +477,13 @@ class MetricsServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createLogMetric(request, options, callback); } @@ -524,6 +545,13 @@ class MetricsServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + metric_name: request.metricName, + }); return this._innerApiCalls.updateLogMetric(request, options, callback); } @@ -564,6 +592,13 @@ class MetricsServiceV2Client { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + metric_name: request.metricName, + }); return this._innerApiCalls.deleteLogMetric(request, options, callback); } diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 211b4c894e4..c3d039a98b0 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-16T11:16:56.652485Z", + "updateTime": "2019-03-28T11:36:01.654509Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.17", - "dockerImage": "googleapis/artman@sha256:7231f27272231a884e09edb5953148c85ecd8467780d33c4a35c3e507885715b" + "version": "0.16.20", + "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dab002e28c81adcc5601278c36d4302c2624c8e2", - "internalRef": "238726437" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } }, { From 04cef83b4dfbf2ad7ec9d02160b2aabc2c6dad56 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 1 Apr 2019 09:19:40 -0700 Subject: [PATCH 0369/1029] chore(deps): update dependency typescript to ~3.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chore(deps): update dependency typescript to ~3.4.0 This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | typescript | devDependencies | minor | [`~3.3.0` -> `~3.4.0`](https://diff.intrinsic.com/typescript/3.3.4000/3.4.1) | [homepage](https://www.typescriptlang.org/), [source](https://togithub.com/Microsoft/TypeScript) | --- ### Release Notes
Microsoft/TypeScript ### [`v3.4.1`](https://togithub.com/Microsoft/TypeScript/releases/v3.4.1) [Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v3.3.4000...v3.4.1) For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-3-4/). For the complete list of fixed issues, check out the - [fixed issues query for Typescript v3.4 RC](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A%22TypeScript+3.4%22+is%3Aclosed+). - [fixed issues query for Typescript v3.4.1](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A%22TypeScript+3.4.1%22+is%3Aclosed+). Downloads are available on: - [npm](https://www.npmjs.com/package/typescript) - [Visual Studio 2017](https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.typescript-341-vs2017) ([Select new version in project options](https://togithub.com/Microsoft/TypeScript/wiki/Updating-TypeScript-in-Visual-Studio-2017)) - [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild) Special thanks to all of our contributors this release: - [@​AnyhowStep](https://togithub.com/AnyhowStep) - Alan Pierce - Alexander Tarasyuk - Anders Hejlsberg - Andy Hanson - Benedikt Meurer - Benjamin Lichtman - Collins Abitekaniza - Daniel Krom - Daniel Rosenwasser - [@​fullheightcoding](https://togithub.com/fullheightcoding) - Gabriela Araujo Britto - [@​ispedals](https://togithub.com/ispedals) - Jack Williams - Jesse Trinity - Jordi Oliveras Rovira - Joseph Wunderlich - K. Preißer - Kagami Sascha Rosylight - Klaus Meinhardt - Masahiro Wakame - Matt McCutchen - Matthew Aynalem - Mine Starks - Nathan Shively-Sanders - Ron Buckton - Ryan Cavanaugh - Sheetal Nandi - Titian Cernicova-Dragomir - [@​tomholub](https://togithub.com/tomholub) - Wenlu Wang - Wesley Wigham
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with "`rebase!`". :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#googleapis/nodejs-logging). #440 automerged by dpebot --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 005cd43986f..2d577c9beaf 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -115,7 +115,7 @@ "prettier": "^1.15.1", "proxyquire": "^2.1.0", "sinon": "^7.2.5", - "typescript": "~3.3.0", + "typescript": "~3.4.0", "uuid": "^3.3.2" } } From 85fbaccffa6545d279306f8a8e1cb2e5353ed9ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 4 Apr 2019 08:37:50 -0700 Subject: [PATCH 0370/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.10 (#444) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2d577c9beaf..4978f5aa581 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "@google-cloud/paginator": "^0.2.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.4.0", - "@opencensus/propagation-stackdriver": "0.0.9", + "@opencensus/propagation-stackdriver": "0.0.10", "arrify": "^1.0.1", "eventid": "^0.1.2", "extend": "^3.0.2", From 2121ba398f5b9ae8d5dae0acb53b29731db9e81c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 4 Apr 2019 09:57:47 -0700 Subject: [PATCH 0371/1029] chore(deps): update dependency @google-cloud/bigquery to v3 (#443) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 4978f5aa581..17af4388146 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -75,7 +75,7 @@ "through2": "^3.0.0" }, "devDependencies": { - "@google-cloud/bigquery": "^2.0.1", + "@google-cloud/bigquery": "^3.0.0", "@google-cloud/nodejs-repo-tools": "^3.0.0", "@google-cloud/pubsub": "^0.28.0", "@google-cloud/storage": "^2.2.0", From 908bed3bd00fa775fbb68fabb529876bbe357923 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 5 Apr 2019 11:14:19 -0700 Subject: [PATCH 0372/1029] fix(deps): update dependency arrify to v2 (#446) --- handwritten/logging/package.json | 3 +-- handwritten/logging/src/index.ts | 8 ++++---- handwritten/logging/src/log.ts | 6 +++--- handwritten/logging/test/index.ts | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 17af4388146..fd251687b9c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,7 +58,7 @@ "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.4.0", "@opencensus/propagation-stackdriver": "0.0.10", - "arrify": "^1.0.1", + "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^1.0.0", @@ -79,7 +79,6 @@ "@google-cloud/nodejs-repo-tools": "^3.0.0", "@google-cloud/pubsub": "^0.28.0", "@google-cloud/storage": "^2.2.0", - "@types/arrify": "^1.0.4", "@types/extend": "^3.0.0", "@types/is": "0.0.21", "@types/mocha": "^5.2.5", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 384b3f62a97..1b93ade114c 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -18,7 +18,7 @@ import * as common from '@google-cloud/common-grpc'; import {paginator} from '@google-cloud/paginator'; import {replaceProjectIdToken} from '@google-cloud/projectify'; import {promisifyAll} from '@google-cloud/promisify'; -import * as arrify from 'arrify'; +import arrify = require('arrify'); import * as extend from 'extend'; import {GoogleAuth} from 'google-auth-library'; import * as gax from 'google-gax'; @@ -529,7 +529,7 @@ class Logging { orderBy: 'timestamp desc', }, options); - reqOpts.resourceNames = arrify(reqOpts.resourceNames); + reqOpts.resourceNames = arrify(reqOpts.resourceNames!); const resourceName = 'projects/' + this.projectId; if (reqOpts.resourceNames.indexOf(resourceName) === -1) { reqOpts.resourceNames.push(resourceName); @@ -606,7 +606,7 @@ class Logging { orderBy: 'timestamp desc', }, options); - reqOpts.resourceNames = arrify(reqOpts.resourceNames); + reqOpts.resourceNames = arrify(reqOpts.resourceNames!); reqOpts.resourceNames.push(`projects/${this.projectId}`); delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; @@ -996,7 +996,7 @@ class Logging { callback(err, null); return; } - policy!.bindings = arrify(policy!.bindings); + policy!.bindings = arrify(policy!.bindings!); policy!.bindings.push({ role: 'roles/pubsub.publisher', members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index ce6cf67aae9..85acec3419e 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -16,7 +16,7 @@ import {DeleteCallback} from '@google-cloud/common'; import {promisifyAll} from '@google-cloud/promisify'; -import * as arrify from 'arrify'; +import arrify = require('arrify'); import * as extend from 'extend'; import {CallOptions} from 'google-gax'; import * as is from 'is'; @@ -830,7 +830,7 @@ class Log implements LogSeverityFunctions { function writeWithResource(resource: {}|null) { let decoratedEntries; try { - decoratedEntries = self.decorateEntries_(arrify(entry)); + decoratedEntries = self.decorateEntries_(arrify(entry) as Entry[]); } catch (err) { // Ignore errors (the API will speak up if it has an issue). } @@ -883,7 +883,7 @@ class Log implements LogSeverityFunctions { */ static assignSeverityToEntries_(entries: Entry|Entry[], severity: string): Entry[] { - return arrify(entries).map(entry => { + return (arrify(entries) as Entry[]).map(entry => { const metadata = extend(true, {}, entry.metadata, { severity, }); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index dd12387378e..330b5873296 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -15,7 +15,7 @@ */ import {util} from '@google-cloud/common-grpc'; -import * as arrify from 'arrify'; +import arrify = require('arrify'); import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; From 4c36806ed0f6d336bb555fe72f7c90413ccaef58 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 9 Apr 2019 07:53:21 -0700 Subject: [PATCH 0373/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.11 (#447) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fd251687b9c..9caa40d2340 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "@google-cloud/paginator": "^0.2.0", "@google-cloud/projectify": "^0.3.0", "@google-cloud/promisify": "^0.4.0", - "@opencensus/propagation-stackdriver": "0.0.10", + "@opencensus/propagation-stackdriver": "0.0.11", "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", From f3961b926a418fb29ed329ae89ef69ffa85f9465 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 9 Apr 2019 11:55:46 -0700 Subject: [PATCH 0374/1029] refactor: use execSync for tests (#445) --- handwritten/logging/package.json | 1 + handwritten/logging/test/metadata.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9caa40d2340..4dd0dc20729 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -94,6 +94,7 @@ "@types/uuid": "^3.4.4", "assert-rejects": "^1.0.0", "bignumber.js": "^8.0.0", + "chai": "^4.2.0", "codecov": "^3.0.4", "eslint": "^5.4.0", "eslint-config-prettier": "^4.0.0", diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 665c35f30d2..55b29faf1d0 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -21,7 +21,6 @@ import {GCPEnv} from 'google-auth-library'; import * as proxyquire from 'proxyquire'; import assertRejects = require('assert-rejects'); -import {detectServiceContext} from '../src/metadata'; let instanceOverride; const fakeGcpMetadata = { From 9f7272ef14c53ed01acd041865fa10e00536e33c Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 10 Apr 2019 12:21:09 -0700 Subject: [PATCH 0375/1029] fix(types): improve types for LogEntry (#448) Fixes: https://github.com/googleapis/nodejs-logging/issues/442 --- handwritten/logging/package.json | 3 ++- handwritten/logging/src/entry.ts | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 4dd0dc20729..de85fb846dd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -72,7 +72,8 @@ "pumpify": "^1.5.1", "snakecase-keys": "^2.0.0", "stream-events": "^1.0.4", - "through2": "^3.0.0" + "through2": "^3.0.0", + "type-fest": "^0.3.1" }, "devDependencies": { "@google-cloud/bigquery": "^3.0.0", diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 7dc535c8a42..f6c2ff0209c 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -15,6 +15,7 @@ */ import {Service} from '@google-cloud/common-grpc'; +import {Merge} from 'type-fest'; // tslint:disable-next-line variable-name const EventId = require('eventid'); import * as extend from 'extend'; @@ -23,13 +24,17 @@ import {google} from '../proto/logging'; const eventId = new EventId(); -export type LogEntry = google.logging.v2.ILogEntry; -export type Timestamp = google.protobuf.IDuration; +export type Timestamp = google.protobuf.ITimestamp|Date; +export type LogSeverity = google.logging.type.LogSeverity|string; +export type LogEntry = Merge; // tslint:disable-next-line no-any export type Data = any; export interface EntryJson { - timestamp: Timestamp|Date; + timestamp: Timestamp; insertId: number; jsonPayload?: google.protobuf.IStruct; textPayload?: string; @@ -174,10 +179,10 @@ class Entry { data = (Service as any).structToObj_(data); } const serializedEntry = new Entry(entry, data); - if (serializedEntry.metadata.timestamp) { - let ms = Number(serializedEntry.metadata.timestamp.seconds) * 1000; - ms += Number(serializedEntry.metadata.timestamp.nanos) / 1e6; - serializedEntry.metadata.timestamp = new Date(ms) as Timestamp; + if (entry.timestamp) { + let ms = Number(entry.timestamp.seconds) * 1000; + ms += Number(entry.timestamp.nanos) / 1e6; + serializedEntry.metadata.timestamp = new Date(ms); } return serializedEntry; } From 4b5311dfc89801f54ca894f84600f0a89b9e5080 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Thu, 11 Apr 2019 17:31:29 -0700 Subject: [PATCH 0376/1029] Release v4.5.2 (#449) --- handwritten/logging/CHANGELOG.md | 9 +++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index b1fe04ec52d..3c6bdfba9da 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## v4.5.2 + +04-11-2019 14:26 PDT + +This release has minor bug fixes: + +- fix(types): improve types for LogEntry ([#448](https://github.com/googleapis/nodejs-logging/pull/448)) +- fix: include 'x-goog-request-params' header in requests ([#439](https://github.com/googleapis/nodejs-logging/pull/439)) + ## v4.5.1 03-18-2019 19:32 PDT diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index de85fb846dd..e826d785c73 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.5.1", + "version": "4.5.2", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From b7401d7d9c9d44a1923238b75b1c68069df14ae6 Mon Sep 17 00:00:00 2001 From: Alex <7764119+AVaksman@users.noreply.github.com> Date: Mon, 15 Apr 2019 11:05:33 -0400 Subject: [PATCH 0377/1029] refactor: index.ts to async-first (#412) * index.ts to async-first * add tests for coverage * skip setProjectId() for getSinks() and getSinksStream() * skip setProjectId() for getEntries() and getEntriesStream() * add optional log param to GetEntriesRequest * combine user provided filter and logName filter in getEntries(Stream) functions --- handwritten/logging/src/index.ts | 376 +++++----- handwritten/logging/src/log.ts | 238 +++--- .../system-test/fixtures/sample/src/index.ts | 2 +- handwritten/logging/test/index.ts | 696 ++++++++++-------- handwritten/logging/test/log.ts | 36 +- 5 files changed, 722 insertions(+), 626 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 1b93ade114c..f24556f1660 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -17,13 +17,12 @@ import * as common from '@google-cloud/common-grpc'; import {paginator} from '@google-cloud/paginator'; import {replaceProjectIdToken} from '@google-cloud/projectify'; -import {promisifyAll} from '@google-cloud/promisify'; +import {callbackifyAll} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as extend from 'extend'; import {GoogleAuth} from 'google-auth-library'; import * as gax from 'google-gax'; import {ClientReadableStream} from 'grpc'; -import * as is from 'is'; import * as request from 'request'; const pumpify = require('pumpify'); @@ -44,7 +43,7 @@ import {Entry, LogEntry} from './entry'; import {Log, GetEntriesRequest, LogOptions, MonitoredResource, Severity, SeverityNames} from './log'; import {Sink} from './sink'; import {Duplex} from 'stream'; -import {AbortableDuplex, ApiError} from '@google-cloud/common'; +import {AbortableDuplex} from '@google-cloud/common'; import {google} from '../proto/logging'; import {google as google_config} from '../proto/logging_config'; @@ -226,6 +225,8 @@ class Logging { options: LoggingOptions; projectId: string; detectedResource?: object; + configService?: typeof v2.ConfigServiceV2Client; + loggingService?: typeof v2.LoggingServiceV2Client; constructor(options?: LoggingOptions) { // Determine what scopes are needed. @@ -254,6 +255,8 @@ class Logging { this.auth = new GoogleAuth(options_); this.options = options_; this.projectId = this.options.projectId || '{{projectId}}'; + this.configService = new v2.ConfigServiceV2Client(this.options); + this.loggingService = new v2.LoggingServiceV2Client(this.options); } /** * Config to set for the sink. Not all available options are listed here, see @@ -338,49 +341,34 @@ class Logging { createSink( name: string, config: CreateSinkRequest, callback: CreateSinkCallback): void; - createSink( - name: string, config: CreateSinkRequest, - callback?: CreateSinkCallback): Promise<[Sink, LogSink]>|void { - const self = this; - if (!is.string(name)) { + async createSink(name: string, config: CreateSinkRequest): + Promise<[Sink, LogSink]> { + if (typeof name !== 'string') { throw new Error('A sink name must be provided.'); } - if (!is.object(config)) { + if (typeof config !== 'object') { throw new Error('A sink configuration object must be provided.'); } if (common.util.isCustomType(config.destination, 'bigquery/dataset')) { - this.setAclForDataset_(name, config, callback!); - return; + await this.setAclForDataset_(config); } if (common.util.isCustomType(config.destination, 'pubsub/topic')) { - this.setAclForTopic_(name, config, callback!); - return; + await this.setAclForTopic_(config); } if (common.util.isCustomType(config.destination, 'storage/bucket')) { - this.setAclForBucket_(name, config, callback!); - return; + await this.setAclForBucket_(config); } const reqOpts = { parent: 'projects/' + this.projectId, sink: extend({}, config, {name}), }; delete reqOpts.sink.gaxOptions; - this.request( - { - client: 'ConfigServiceV2Client', - method: 'createSink', - reqOpts, - gaxOpts: config.gaxOptions, - }, - (err, resp) => { - if (err) { - callback!(err, null, resp); - return; - } - const sink = self.sink(resp.name); - sink.metadata = resp; - callback!(null, sink, resp); - }); + await this.setProjectId(reqOpts); + const [resp] = + await this.configService.createSink(reqOpts, config.gaxOptions); + const sink = this.sink(resp.name); + sink.metadata = resp; + return [sink, resp]; } /** @@ -445,6 +433,8 @@ class Logging { * empty filter matches all log entries. * @property {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {string} [log] A name of the log specifying to pnly return + * entries from this log. * @property {number} [maxApiCalls] Maximum number of API calls to make. * @property {number} [maxResults] Maximum number of items plus prefixes to * return. @@ -517,19 +507,16 @@ class Logging { getEntries(options?: GetEntriesRequest): Promise; getEntries(callback: GetEntriesCallback): void; getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; - getEntries( - options?: GetEntriesRequest|GetEntriesCallback, - callback?: GetEntriesCallback): void|Promise { - if (typeof options === 'function') { - callback = options as GetEntriesCallback; - options = {}; - } + async getEntries(opts?: GetEntriesRequest| + GetEntriesCallback): Promise { + const options = opts ? opts as GetEntriesRequest : {}; const reqOpts = extend( { orderBy: 'timestamp desc', }, options); reqOpts.resourceNames = arrify(reqOpts.resourceNames!); + this.projectId = await this.auth.getProjectId(); const resourceName = 'projects/' + this.projectId; if (reqOpts.resourceNames.indexOf(resourceName) === -1) { reqOpts.resourceNames.push(resourceName); @@ -541,20 +528,12 @@ class Logging { autoPaginate: options!.autoPaginate, }, options!.gaxOptions); - this.request( - { - client: 'LoggingServiceV2Client', - method: 'listLogEntries', - reqOpts, - gaxOpts: gaxOptions, - }, - (...args) => { - const entries = args[1]; - if (entries) { - args[1] = entries.map(Entry.fromApiResponse_); - } - callback!.apply(null, args); - }); + const resp = await this.loggingService.listLogEntries(reqOpts, gaxOptions); + const [entries] = resp; + if (entries) { + resp[0] = entries.map(Entry.fromApiResponse_); + } + return resp; } /** @@ -601,31 +580,66 @@ class Logging { next(null, Entry.fromApiResponse_(entry)); }); userStream.once('reading', () => { - const reqOpts = extend( - { - orderBy: 'timestamp desc', - }, - options); - reqOpts.resourceNames = arrify(reqOpts.resourceNames!); - reqOpts.resourceNames.push(`projects/${this.projectId}`); - delete reqOpts.autoPaginate; - delete reqOpts.gaxOptions; - const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions); - requestStream = this.request({ - client: 'LoggingServiceV2Client', - method: 'listLogEntriesStream', - reqOpts, - gaxOpts: gaxOptions, + this.auth.getProjectId().then(projectId => { + this.projectId = projectId; + if (options.log) { + if (options.filter) { + options.filter = `(${options.filter}) AND logName="${ + Log.formatName_(this.projectId, options.log)}"`; + } else { + options.filter = + `logName="${Log.formatName_(this.projectId, options.log)}"`; + } + delete options.log; + } + const reqOpts = extend( + { + orderBy: 'timestamp desc', + }, + options); + reqOpts.resourceNames = arrify(reqOpts.resourceNames!); + reqOpts.resourceNames.push(`projects/${this.projectId}`); + delete reqOpts.autoPaginate; + delete reqOpts.gaxOptions; + const gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions); + + let gaxStream: ClientReadableStream; + requestStream = streamEvents(through.obj()); + (requestStream as AbortableDuplex).abort = () => { + if (gaxStream && gaxStream.cancel) { + gaxStream.cancel(); + } + }; + // tslint:disable-next-line no-any + if (!(global as any).GCLOUD_SANDBOX_ENV) { + requestStream.once('reading', () => { + try { + gaxStream = + this.loggingService.listLogEntriesStream(reqOpts, gaxOptions); + } catch (error) { + requestStream.destroy(error); + return; + } + gaxStream + .on('error', + err => { + requestStream.destroy(err); + }) + .pipe(requestStream); + return; + }); + } + // tslint:disable-next-line no-any + (userStream as any).setPipeline(requestStream, toEntryStream); }); - // tslint:disable-next-line no-any - (userStream as any).setPipeline(requestStream, toEntryStream); }); return userStream; } + /** * Query object for listing sinks. * @@ -683,14 +697,10 @@ class Logging { getSinks(options?: GetSinksRequest): Promise; getSinks(callback: GetSinksCallback): void; getSinks(options: GetSinksRequest, callback: GetSinksCallback): void; - getSinks( - options?: GetSinksRequest|GetSinksCallback, - callback?: GetSinksCallback): void|Promise { - const self = this; - if (typeof options === 'function') { - callback = options as GetSinksCallback; - options = {}; - } + async getSinks(opts?: GetSinksRequest| + GetSinksCallback): Promise { + const options = opts ? opts as GetSinksRequest : {}; + this.projectId = await this.auth.getProjectId(); const reqOpts = extend({}, options, { parent: 'projects/' + this.projectId, }); @@ -698,27 +708,19 @@ class Logging { delete reqOpts.gaxOptions; const gaxOptions = extend( { - autoPaginate: (options as GetSinksRequest).autoPaginate, - }, - (options as GetSinksRequest).gaxOptions); - this.request( - { - client: 'ConfigServiceV2Client', - method: 'listSinks', - reqOpts, - gaxOpts: gaxOptions, + autoPaginate: options.autoPaginate, }, - (...args) => { - const sinks = args[1]; - if (sinks) { - args[1] = sinks.map((sink: LogSink) => { - const sinkInstance = self.sink(sink.name!); - sinkInstance.metadata = sink; - return sinkInstance; - }); - } - callback!.apply(null, args); - }); + options.gaxOptions); + const resp = await this.configService.listSinks(reqOpts, gaxOptions); + const [sinks] = resp; + if (sinks) { + resp[0] = sinks.map((sink: LogSink) => { + const sinkInstance = this.sink(sink.name!); + sinkInstance.metadata = sink; + return sinkInstance; + }); + } + return resp; } /** @@ -756,7 +758,7 @@ class Logging { const self = this; options = options || {}; let requestStream: Duplex; - const userStream = streamEvents(pumpify.obj()); + const userStream = streamEvents(pumpify.obj()); (userStream as AbortableDuplex).abort = () => { if (requestStream) { (requestStream as AbortableDuplex).abort(); @@ -768,23 +770,47 @@ class Logging { next(null, sinkInstance); }); userStream.once('reading', () => { - const reqOpts = extend({}, options, { - parent: 'projects/' + self.projectId, - }); - delete reqOpts.gaxOptions; - const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions); - requestStream = self.request({ - client: 'ConfigServiceV2Client', - method: 'listSinksStream', - reqOpts, - gaxOpts: gaxOptions, + this.auth.getProjectId().then(projectId => { + this.projectId = projectId; + const reqOpts = extend({}, options, { + parent: 'projects/' + self.projectId, + }); + delete reqOpts.gaxOptions; + const gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions); + + let gaxStream: ClientReadableStream; + requestStream = streamEvents(through.obj()); + (requestStream as AbortableDuplex).abort = () => { + if (gaxStream && gaxStream.cancel) { + gaxStream.cancel(); + } + }; + // tslint:disable-next-line no-any + if (!(global as any).GCLOUD_SANDBOX_ENV) { + requestStream.once('reading', () => { + try { + gaxStream = + this.configService.listSinksStream(reqOpts, gaxOptions); + } catch (error) { + requestStream.destroy(error); + return; + } + gaxStream + .on('error', + err => { + requestStream.destroy(err); + }) + .pipe(requestStream); + return; + }); + } + // tslint:disable-next-line no-any + (userStream as any).setPipeline(requestStream, toSinkStream); }); - // tslint:disable-next-line no-any - (userStream as any).setPipeline(requestStream, toSinkStream); }); return userStream; } @@ -919,21 +945,11 @@ class Logging { * * @private */ - setAclForBucket_( - name: string, config: CreateSinkRequest, callback: CreateSinkCallback) { + async setAclForBucket_(config: CreateSinkRequest) { const bucket = config.destination as Bucket; // tslint:disable-next-line no-any - (bucket.acl.owners as any) - .addGroup( - 'cloud-logs@google.com', - (err: Error, apiResp: request.Response) => { - if (err) { - callback(err, null, apiResp); - return; - } - config.destination = 'storage.googleapis.com/' + bucket.name; - this.createSink(name, config, callback); - }); + await (bucket.acl.owners as any).addGroup('cloud-logs@google.com'); + config.destination = 'storage.googleapis.com/' + bucket.name; } /** @@ -945,37 +961,22 @@ class Logging { * * @private */ - setAclForDataset_( - name: string, config: CreateSinkRequest, callback: CreateSinkCallback) { - const self = this; + async setAclForDataset_(config: CreateSinkRequest) { const dataset = config.destination as Dataset; - dataset.getMetadata((err, metadata, apiResp) => { - if (err) { - callback(err, null, apiResp); - return; - } - // tslint:disable-next-line no-any - const access = ([] as any[]).slice.call(arrify(metadata.access)); - access.push({ - role: 'WRITER', - groupByEmail: 'cloud-logs@google.com', - }); - dataset.setMetadata( - { - access, - }, - (err, apiResp) => { - if (err) { - callback(err, null, apiResp); - return; - } - const baseUrl = 'bigquery.googleapis.com'; - const pId = (dataset.parent as BigQuery).projectId; - const dId = dataset.id; - config.destination = `${baseUrl}/projects/${pId}/datasets/${dId}`; - self.createSink(name, config, callback); - }); + const [metadata] = await dataset.getMetadata(); + // tslint:disable-next-line no-any + const access = ([] as any[]).slice.call(arrify(metadata.access)); + access.push({ + role: 'WRITER', + groupByEmail: 'cloud-logs@google.com', + }); + await dataset.setMetadata({ + access, }); + const baseUrl = 'bigquery.googleapis.com'; + const pId = (dataset.parent as BigQuery).projectId; + const dId = dataset.id; + config.destination = `${baseUrl}/projects/${pId}/datasets/${dId}`; } /** @@ -987,48 +988,41 @@ class Logging { * * @private */ - setAclForTopic_( - name: string, config: CreateSinkRequest, callback: CreateSinkCallback) { - const self = this; + async setAclForTopic_(config: CreateSinkRequest) { const topic = config.destination as Topic; - topic.iam.getPolicy((err, policy) => { - if (err) { - callback(err, null); - return; - } - policy!.bindings = arrify(policy!.bindings!); - policy!.bindings.push({ - role: 'roles/pubsub.publisher', - members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], - }); - topic.iam.setPolicy(policy!, (err, policy) => { - if (err) { - callback(err, null); - return; - } - const baseUrl = 'pubsub.googleapis.com'; - const topicName = topic.name; - config.destination = `${baseUrl}/${topicName}`; - self.createSink(name, config, callback); - }); + const [policy] = await topic.iam.getPolicy(); + policy.bindings = arrify(policy.bindings!); + policy!.bindings.push({ + role: 'roles/pubsub.publisher', + members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], }); + await topic.iam.setPolicy(policy); + const baseUrl = 'pubsub.googleapis.com'; + const topicName = topic.name; + config.destination = `${baseUrl}/${topicName}`; + } + + async setProjectId(reqOpts: {}) { + if (this.projectId === '{{projectId}}') { + this.projectId = await this.auth.getProjectId(); + } + reqOpts = replaceProjectIdToken(reqOpts, this.projectId); } } /*! Developer Documentation - * - * These methods can be auto-paginated. + * All async methods (except for streams) will execute a callback in the event + * that a callback is provided. */ -paginator.extend(Logging, ['getEntries', 'getSinks']); +callbackifyAll(Logging, { + exclude: ['request'], +}); /*! Developer Documentation * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. + * These methods can be auto-paginated. */ -promisifyAll(Logging, { - exclude: ['entry', 'log', 'request', 'sink'], -}); +paginator.extend(Logging, ['getEntries', 'getSinks']); /** * {@link Entry} class. diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 85acec3419e..945f2952e9f 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -15,11 +15,10 @@ */ import {DeleteCallback} from '@google-cloud/common'; -import {promisifyAll} from '@google-cloud/promisify'; +import {callbackifyAll, promisifyAll} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as extend from 'extend'; import {CallOptions} from 'google-gax'; -import * as is from 'is'; import {Response} from 'request'; import {google} from '../proto/logging'; @@ -34,6 +33,7 @@ export interface GetEntriesRequest { autoPaginate?: boolean; filter?: string; gaxOptions?: CallOptions; + log?: string; maxApiCalls?: number; maxResults?: number; orderBy?: string; @@ -514,20 +514,18 @@ class Log implements LogSeverityFunctions { getEntries(options?: GetEntriesRequest): Promise; getEntries(callback: GetEntriesCallback): void; getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; - getEntries( - options?: GetEntriesRequest|GetEntriesCallback, - callback?: GetEntriesCallback): Promise|void { - if (is.function(options)) - { - callback = options as GetEntriesCallback; - options = {}; - } - options = extend( - { - filter: 'logName="' + this.formattedName_ + '"', - }, - options); - return this.logging.getEntries(options as GetEntriesRequest, callback!); + async getEntries(opts?: GetEntriesRequest| + GetEntriesCallback): Promise { + const options = extend({}, opts as GetEntriesRequest); + this.logging.projectId = await this.logging.auth.getProjectId(); + this.formattedName_ = Log.formatName_(this.logging.projectId, this.name); + if (options.filter) { + options.filter = + `(${options.filter}) AND logName="${this.formattedName_}"`; + } else { + options.filter = `logName="${this.formattedName_}"`; + } + return this.logging.getEntries(options); } /** @@ -565,12 +563,12 @@ class Log implements LogSeverityFunctions { * }); */ getEntriesStream(options: GetEntriesRequest) { - options = extend( - { - filter: 'logName="' + this.formattedName_ + '"', - }, - options); - return this.logging.getEntriesStream(options); + options = extend( + { + log: this.name, + }, + options); + return this.logging.getEntriesStream(options); } /** @@ -610,12 +608,11 @@ class Log implements LogSeverityFunctions { entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback): void|Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write( - Log.assignSeverityToEntries_(entry, 'INFO'), options, callback!); + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + this.write(Log.assignSeverityToEntries_(entry, 'INFO'), options, callback!); } /** @@ -655,12 +652,12 @@ class Log implements LogSeverityFunctions { entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback): void|Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write( - Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback!); + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + this.write( + Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback!); } /** @@ -700,12 +697,12 @@ class Log implements LogSeverityFunctions { entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback): void|Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write( - Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback!); + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + this.write( + Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback!); } /** @@ -808,49 +805,49 @@ class Log implements LogSeverityFunctions { entry: Entry|Entry[], optionsOrCallback?: WriteOptions|ApiResponseCallback, cb?: ApiResponseCallback): void|Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - const self = this; - - if (options.resource) { - if (options.resource.labels) { - options.resource.labels = snakeCaseKeys(options.resource.labels); - } - writeWithResource(options.resource); - } else if (this.logging.detectedResource) { - writeWithResource(this.logging.detectedResource); - } else { - getDefaultResource(this.logging.auth).then((resource) => { - this.logging.detectedResource = resource; - writeWithResource(resource); - }); + const options = + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + const self = this; + + if (options.resource) { + if (options.resource.labels) { + options.resource.labels = snakeCaseKeys(options.resource.labels); } - function writeWithResource(resource: {}|null) { - let decoratedEntries; - try { - decoratedEntries = self.decorateEntries_(arrify(entry) as Entry[]); - } catch (err) { - // Ignore errors (the API will speak up if it has an issue). - } - const reqOpts = extend( - { - logName: self.formattedName_, - entries: decoratedEntries, - resource, - }, - options); - delete reqOpts.gaxOptions; - self.logging.request( - { - client: 'LoggingServiceV2Client', - method: 'writeLogEntries', - reqOpts, - gaxOpts: options.gaxOptions, - }, - callback); + writeWithResource(options.resource); + } else if (this.logging.detectedResource) { + writeWithResource(this.logging.detectedResource); + } else { + getDefaultResource(this.logging.auth).then((resource) => { + this.logging.detectedResource = resource; + writeWithResource(resource); + }); + } + function writeWithResource(resource: {}|null) { + let decoratedEntries; + try { + decoratedEntries = self.decorateEntries_(arrify(entry) as Entry[]); + } catch (err) { + // Ignore errors (the API will speak up if it has an issue). } + const reqOpts = extend( + { + logName: self.formattedName_, + entries: decoratedEntries, + resource, + }, + options); + delete reqOpts.gaxOptions; + self.logging.request( + { + client: 'LoggingServiceV2Client', + method: 'writeLogEntries', + reqOpts, + gaxOpts: options.gaxOptions, + }, + callback); + } } /** @@ -863,14 +860,14 @@ class Log implements LogSeverityFunctions { * @throws if there is an error during serialization. */ decorateEntries_(entries: Entry[]) { - return entries.map(entry => { - if (!(entry instanceof Entry)) { - entry = this.entry(entry); - } - return entry.toJSON({ - removeCircular: this.removeCircular_, - }); + return entries.map(entry => { + if (!(entry instanceof Entry)) { + entry = this.entry(entry); + } + return entry.toJSON({ + removeCircular: this.removeCircular_, }); + }); } /** @@ -883,14 +880,14 @@ class Log implements LogSeverityFunctions { */ static assignSeverityToEntries_(entries: Entry|Entry[], severity: string): Entry[] { - return (arrify(entries) as Entry[]).map(entry => { - const metadata = extend(true, {}, entry.metadata, { - severity, - }); - return extend(new Entry(), entry, { - metadata, - }); + return (arrify(entries) as Entry[]).map(entry => { + const metadata = extend(true, {}, entry.metadata, { + severity, + }); + return extend(new Entry(), entry, { + metadata, }); + }); } /** @@ -902,28 +899,35 @@ class Log implements LogSeverityFunctions { * @returns {string} */ static formatName_(projectId: string, name: string) { - const path = 'projects/' + projectId + '/logs/'; - name = name.replace(path, ''); - if (decodeURIComponent(name) === name) { - // The name has not been encoded yet. - name = encodeURIComponent(name); - } - return path + name; - } + const path = 'projects/' + projectId + '/logs/'; + name = name.replace(path, ''); + if (decodeURIComponent(name) === name) { + // The name has not been encoded yet. + name = encodeURIComponent(name); + } + return path + name; } +} - /*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ - promisifyAll(Log, { - exclude: ['entry'], - }); +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +promisifyAll(Log, { + exclude: ['entry', 'getEntries'], +}); - /** - * Reference to the {@link Log} class. - * @name module:@google-cloud/logging.Log - * @see Log - */ - export {Log}; +callbackifyAll(Log, { + exclude: [ + 'alert', 'critical', 'debug', 'delete', 'emergency', 'entry', 'error', + 'getEntriesStream', 'info', 'notice', 'warning', 'write' + ] +}); + +/** + * Reference to the {@link Log} class. + * @name module:@google-cloud/logging.Log + * @see Log + */ +export {Log}; diff --git a/handwritten/logging/system-test/fixtures/sample/src/index.ts b/handwritten/logging/system-test/fixtures/sample/src/index.ts index 2034b44f04f..e006ba5962f 100644 --- a/handwritten/logging/system-test/fixtures/sample/src/index.ts +++ b/handwritten/logging/system-test/fixtures/sample/src/index.ts @@ -1,6 +1,6 @@ import {Logging} from '@google-cloud/logging'; async function main() { const logging = new Logging(); - console.log(logging); + console.dir(logging); } main(); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 330b5873296..4d0dedf4a74 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -15,11 +15,16 @@ */ import {util} from '@google-cloud/common-grpc'; +import {CallbackifyAllOptions} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as through from 'through2'; +import {Logging as LOGGING} from '../src/index'; + +import {GetEntriesCallback} from '../src/index'; +import {getOrInjectContext} from '../src/middleware/context'; const {v2} = require('../src'); const PKG = require('../../package.json'); @@ -47,7 +52,7 @@ function fakeGoogleAuth() { } let isCustomTypeOverride: Function|null; -let promisifed = false; +let callbackified = false; let replaceProjectIdTokenOverride: Function|null; const fakeUtil = extend({}, util, { isCustomType() { @@ -57,18 +62,13 @@ const fakeUtil = extend({}, util, { return false; }, }); -const fakePromisify = { - promisifyAll(c, options) { +const fakeCallbackify = { + callbackifyAll(c: Function, options: CallbackifyAllOptions) { if (c.name !== 'Logging') { return; } - promisifed = true; - assert.deepStrictEqual(options.exclude, [ - 'entry', - 'log', - 'request', - 'sink', - ]); + callbackified = true; + assert.deepStrictEqual(options.exclude, ['request']); }, }; const fakeProjectify = { @@ -120,7 +120,7 @@ describe('Logging', () => { '@google-cloud/common-grpc': { util: fakeUtil, }, - '@google-cloud/promisify': fakePromisify, + '@google-cloud/promisify': fakeCallbackify, '@google-cloud/paginator': fakePaginator, '@google-cloud/projectify': fakeProjectify, 'google-auth-library': { @@ -163,8 +163,8 @@ describe('Logging', () => { assert(extended); // See `fakePaginator.extend` }); - it('should promisify all the things', () => { - assert(promisifed); + it('should callbackify all the things', () => { + assert(callbackified); }); it('should initialize the API object', () => { @@ -229,19 +229,25 @@ describe('Logging', () => { describe('createSink', () => { const SINK_NAME = 'name'; + beforeEach(() => { + logging.configService.createSink = async () => [{}]; + }); + it('should throw if a name is not provided', () => { - assert.throws(() => { - logging.createSink(); - }, /A sink name must be provided\./); + const error = new Error('A sink name must be provided.'); + logging.createSink().then(util.noop, err => { + assert.deepStrictEqual(err, error); + }); }); it('should throw if a config object is not provided', () => { - assert.throws(() => { - logging.createSink(SINK_NAME); - }, /A sink configuration object must be provided\./); + const error = new Error('A sink configuration object must be provided.'); + logging.createSink(SINK_NAME).then(util.noop, err => { + assert.deepStrictEqual(err, error); + }); }); - it('should set acls for a Dataset destination', done => { + it('should set acls for a Dataset destination', async () => { const dataset = {}; const CONFIG = { @@ -253,16 +259,14 @@ describe('Logging', () => { return type === 'bigquery/dataset'; }; - logging.setAclForDataset_ = (name, config, callback) => { - assert.strictEqual(name, SINK_NAME); + logging.setAclForDataset_ = async (config) => { assert.strictEqual(config, CONFIG); - callback(); // done() }; - logging.createSink(SINK_NAME, CONFIG, done); + await logging.createSink(SINK_NAME, CONFIG); }); - it('should set acls for a Topic destination', done => { + it('should set acls for a Topic destination', async () => { const topic = {}; const CONFIG = { @@ -274,16 +278,14 @@ describe('Logging', () => { return type === 'pubsub/topic'; }; - logging.setAclForTopic_ = (name, config, callback) => { - assert.strictEqual(name, SINK_NAME); + logging.setAclForTopic_ = async (config) => { assert.strictEqual(config, CONFIG); - callback(); // done() }; - logging.createSink(SINK_NAME, CONFIG, done); + await logging.createSink(SINK_NAME, CONFIG); }); - it('should set acls for a Bucket destination', done => { + it('should set acls for a Bucket destination', async () => { const bucket = {}; const CONFIG = { @@ -295,17 +297,15 @@ describe('Logging', () => { return type === 'storage/bucket'; }; - logging.setAclForBucket_ = (name, config, callback) => { - assert.strictEqual(name, SINK_NAME); + logging.setAclForBucket_ = async (config) => { assert.strictEqual(config, CONFIG); - callback(); // done() }; - logging.createSink(SINK_NAME, CONFIG, done); + await logging.createSink(SINK_NAME, CONFIG); }); describe('API request', () => { - it('should make the correct API request', done => { + it('should call GAX method', async () => { const config = { a: 'b', c: 'd', @@ -315,33 +315,31 @@ describe('Logging', () => { name: SINK_NAME, }); - logging.request = config => { - assert.strictEqual(config.client, 'ConfigServiceV2Client'); - assert.strictEqual(config.method, 'createSink'); + logging.configService.createSink = async (reqOpts, gaxOpts) => { const expectedParent = 'projects/' + logging.projectId; - assert.strictEqual(config.reqOpts.parent, expectedParent); - assert.deepStrictEqual(config.reqOpts.sink, expectedConfig); - assert.strictEqual(config.gaxOpts, undefined); - done(); + assert.strictEqual(reqOpts.parent, expectedParent); + assert.deepStrictEqual(reqOpts.sink, expectedConfig); + assert.strictEqual(gaxOpts, undefined); + return [{}]; }; - logging.createSink(SINK_NAME, config, assert.ifError); + await logging.createSink(SINK_NAME, config); }); - it('should accept GAX options', done => { + it('should accept GAX options', async () => { const config = { a: 'b', c: 'd', gaxOptions: {}, }; - logging.request = config_ => { - assert.strictEqual(config_.reqOpts.sink.gaxOptions, undefined); - assert.strictEqual(config_.gaxOpts, config.gaxOptions); - done(); + logging.configService.createSink = async (reqOpts, gaxOpts) => { + assert.strictEqual(reqOpts.sink.gaxOptions, undefined); + assert.strictEqual(gaxOpts, config.gaxOptions); + return [{}]; }; - logging.createSink(SINK_NAME, config, assert.ifError); + await logging.createSink(SINK_NAME, config); }); describe('error', () => { @@ -354,14 +352,13 @@ describe('Logging', () => { }; }); - it('should exec callback with error & API response', done => { - logging.createSink(SINK_NAME, {}, (err, sink, apiResponse_) => { - assert.strictEqual(err, error); - assert.strictEqual(sink, null); - assert.strictEqual(apiResponse_, apiResponse); + it('should reject Promise with an error', () => { + logging.configService.createSink = async () => { + throw error; + }; - done(); - }); + logging.createSink(SINK_NAME, {}) + .then(util.noop, (err) => assert.deepStrictEqual(err, error)); }); }); @@ -376,7 +373,7 @@ describe('Logging', () => { }; }); - it('should exec callback with Sink & API response', done => { + it('should resolve Promise Sink & API response', async () => { const sink = {}; logging.sink = name_ => { @@ -384,15 +381,14 @@ describe('Logging', () => { return sink; }; - logging.createSink(SINK_NAME, {}, (err, sink_, apiResponse_) => { - assert.ifError(err); - - assert.strictEqual(sink_, sink); - assert.strictEqual(sink_.metadata, apiResponse); - assert.strictEqual(apiResponse_, apiResponse); + logging.configService.createSink = async () => { + return [apiResponse]; + }; - done(); - }); + const [sink_, apiResponse_] = await logging.createSink(SINK_NAME, {}); + assert.strictEqual(sink_, sink); + assert.strictEqual(sink_.metadata, apiResponse); + assert.strictEqual(apiResponse_, apiResponse); }); }); }); @@ -411,70 +407,74 @@ describe('Logging', () => { }); describe('getEntries', () => { - it('should accept only a callback', done => { - logging.request = config => { - assert.deepStrictEqual(config.reqOpts, { + beforeEach(() => { + logging.auth.getProjectId = async () => PROJECT_ID; + }); + + it('should exec without options', async () => { + logging.loggingService.listLogEntries = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], }); - done(); + assert.deepStrictEqual(gaxOpts, { + autoPaginate: undefined, + }); + return [[]]; }; - logging.getEntries(assert.ifError); + await logging.getEntries(); }); - it('should make the correct API request', done => { - const options = {}; - - logging.request = config => { - assert.strictEqual(config.client, 'LoggingServiceV2Client'); - assert.strictEqual(config.method, 'listLogEntries'); + it('should accept options', async () => { + const options = {filter: 'test'}; + logging.loggingService.listLogEntries = async (reqOpts, gaxOpts) => { assert.deepStrictEqual( - config.reqOpts, extend(options, { + reqOpts, extend(options, { + filter: 'test', orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], })); - assert.deepStrictEqual(config.gaxOpts, { + assert.deepStrictEqual(gaxOpts, { autoPaginate: undefined, }); - - done(); + return [[]]; }; - logging.getEntries(options, assert.ifError); + await logging.getEntries(options); }); - it('should not push the same resourceName again', done => { + it('should not push the same resourceName again', async () => { const options = { resourceNames: ['projects/' + logging.projectId], }; - logging.request = config => { - assert.deepStrictEqual(config.reqOpts.resourceNames, [ + logging.loggingService.listLogEntries = async (reqOpts) => { + assert.deepStrictEqual(reqOpts.resourceNames, [ 'projects/' + logging.projectId, ]); - done(); + return [[]]; }; logging.getEntries(options, assert.ifError); }); - it('should allow overriding orderBy', done => { + it('should allow overriding orderBy', async () => { const options = { orderBy: 'timestamp asc', }; - logging.request = config => { - assert.deepStrictEqual(config.reqOpts.orderBy, options.orderBy); - done(); + logging.loggingService.listLogEntries = async (reqOpts) => { + assert.deepStrictEqual(reqOpts.orderBy, options.orderBy); + return [[]]; }; - logging.getEntries(options, assert.ifError); + await logging.getEntries(options); }); - it('should accept GAX options', done => { + it('should accept GAX options', async () => { const options = { a: 'b', c: 'd', @@ -483,55 +483,52 @@ describe('Logging', () => { }, }; - logging.request = config => { - assert.strictEqual(config.reqOpts.gaxOptions, undefined); - assert.deepStrictEqual(config.gaxOpts, options.gaxOptions); - done(); + logging.loggingService.listLogEntries = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { + a: 'b', + c: 'd', + orderBy: 'timestamp desc', + resourceNames: ['projects/' + logging.projectId], + }); + assert.strictEqual(reqOpts.gaxOptions, undefined); + assert.deepStrictEqual(gaxOpts, options.gaxOptions); + return [[]]; }; - logging.getEntries(options, assert.ifError); + await logging.getEntries(options); }); describe('error', () => { - const ARGS = [new Error('Error.'), [], {}]; + const error = new Error('Error.'); beforeEach(() => { - logging.request = (config, callback) => { - callback.apply(null, ARGS); + logging.loggingService.listLogEntries = async () => { + throw error; }; }); - it('should execute callback with error & API response', done => { - logging.getEntries({}, (...args) => { - assert.deepStrictEqual(args, ARGS); - done(); - }); + it('should reject promise with error', () => { + logging.getEntries().then( + util.noop, (err) => assert.strictEqual(err, error)); }); }); describe('success', () => { - const ARGS = [ - null, - [ - { - logName: 'syslog', - }, - ], - ]; + const expectedResponse = [[ + { + logName: 'syslog', + }, + ]]; beforeEach(() => { - logging.request = (config, callback) => { - callback.apply(null, ARGS); + logging.loggingService.listLogEntries = async () => { + return expectedResponse; }; }); - it('should execute callback with entries & API resp', done => { - logging.getEntries({}, (err, entries) => { - assert.ifError(err); - const argsPassedToFromApiResponse_ = entries[0]; - assert.strictEqual(argsPassedToFromApiResponse_[0], ARGS[1]![0]); - done(); - }); + it('should resolve promise with entries & API resp', async () => { + const [entries] = await logging.getEntries(); + assert.strictEqual(entries[0], expectedResponse[0][0]); }); }); }); @@ -546,28 +543,90 @@ describe('Logging', () => { }, }; - let REQUEST_STREAM; + let GAX_STREAM; const RESULT = {}; beforeEach(() => { - REQUEST_STREAM = through.obj(); - REQUEST_STREAM.push(RESULT); - logging.request = () => REQUEST_STREAM; + GAX_STREAM = through.obj(); + GAX_STREAM.push(RESULT); + logging.loggingService.listLogEntriesStream = () => GAX_STREAM; + logging.auth.getProjectId = async () => PROJECT_ID; }); it('should make request once reading', done => { - logging.request = config => { - assert.strictEqual(config.client, 'LoggingServiceV2Client'); - assert.strictEqual(config.method, 'listLogEntriesStream'); + logging.loggingService.listLogEntriesStream = (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { + resourceNames: ['projects/' + logging.projectId], + orderBy: 'timestamp desc', + a: 'b', + c: 'd', + }); + + assert.deepStrictEqual(gaxOpts, { + autoPaginate: undefined, + a: 'b', + c: 'd', + }); + + setImmediate(done); + + return GAX_STREAM; + }; + + const stream = logging.getEntriesStream(OPTIONS); + stream.emit('reading'); + }); + + it('should set logName filter if has logName flag', done => { + const logName = 'log-name'; + logging = new LOGGING({projectId: PROJECT_ID}); + logging.loggingService.listLogEntriesStream = (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { + resourceNames: ['projects/' + logging.projectId], + orderBy: 'timestamp desc', + a: 'b', + c: 'd', + filter: `logName="${ + ['projects', PROJECT_ID, 'logs', encodeURIComponent(logName)] + .join('/')}"`, + }); + + assert.deepStrictEqual(gaxOpts, { + autoPaginate: undefined, + a: 'b', + c: 'd', + }); + + setImmediate(done); - assert.deepStrictEqual(config.reqOpts, { + return GAX_STREAM; + }; + + const log = logging.log('log-name'); + const stream = log.getEntriesStream(OPTIONS); + stream.emit('reading'); + }); + + it('should add logName filter to user provided filter', done => { + const logName = 'log-name'; + const OPTIONS_WITH_FILTER = extend( + { + filter: 'custom filter', + }, + OPTIONS); + logging = new LOGGING({projectId: PROJECT_ID}); + logging.loggingService.listLogEntriesStream = (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { resourceNames: ['projects/' + logging.projectId], orderBy: 'timestamp desc', a: 'b', c: 'd', + filter: `(${OPTIONS_WITH_FILTER.filter}) AND logName="${ + ['projects', PROJECT_ID, 'logs', encodeURIComponent(logName)] + .join('/')}"`, }); - assert.deepStrictEqual(config.gaxOpts, { + assert.deepStrictEqual(gaxOpts, { autoPaginate: undefined, a: 'b', c: 'd', @@ -575,11 +634,52 @@ describe('Logging', () => { setImmediate(done); - return REQUEST_STREAM; + return GAX_STREAM; }; + const log = logging.log('log-name'); + const stream = log.getEntriesStream(OPTIONS_WITH_FILTER); + stream.emit('reading'); + }); + + it('should destroy request stream if gax fails', done => { + const error = new Error('Error.'); + logging.loggingService.listLogEntriesStream = () => { + throw error; + }; + const stream = logging.getEntriesStream(OPTIONS); + stream.emit('reading'); + stream.once('error', (err) => { + assert.strictEqual(err, error); + done(); + }); + }); + + it('should destroy request stream if gaxStream catches error', done => { + const error = new Error('Error.'); + const stream = logging.getEntriesStream(OPTIONS); + stream.emit('reading'); + stream.on('error', (err) => { + assert.strictEqual(err, error); + done(); + }); + setImmediate(() => { + GAX_STREAM.emit('error', error); + }); + }); + + it('should return if in snippet sandbox', done => { + logging.setProjectId = async () => { + return done(new Error('Should not have gotten project ID')); + }; + // tslint:disable-next-line no-any + (global as any).GCLOUD_SANDBOX_ENV = true; const stream = logging.getEntriesStream(OPTIONS); stream.emit('reading'); + // tslint:disable-next-line no-any + delete (global as any).GCLOUD_SANDBOX_ENV; + assert(stream instanceof require('stream')); + done(); }); it('should convert results from request to Entry', done => { @@ -593,10 +693,12 @@ describe('Logging', () => { }); it('should expose abort function', done => { - REQUEST_STREAM.abort = done; + GAX_STREAM.cancel = done; const stream = logging.getEntriesStream(OPTIONS); stream.emit('reading'); - stream.abort(); + setImmediate(() => { + stream.abort(); + }); }); it('should not require an options object', () => { @@ -608,6 +710,9 @@ describe('Logging', () => { }); describe('getSinks', () => { + beforeEach(() => { + logging.auth.getProjectId = async () => {}; + }); const OPTIONS = { a: 'b', c: 'd', @@ -617,54 +722,47 @@ describe('Logging', () => { }, }; - it('should accept only a callback', done => { - logging.request = () => done(); - logging.getSinks(assert.ifError); + it('should exec without options', async () => { + logging.configService.listSinks = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(gaxOpts, {autoPaginate: undefined}); + return [[]]; + }; + await logging.getSinks(); }); - it('should make the correct API request', done => { - logging.request = config => { - assert.strictEqual(config.client, 'ConfigServiceV2Client'); - assert.strictEqual(config.method, 'listSinks'); - - assert.deepStrictEqual(config.reqOpts, { + it('should call gax method', async () => { + logging.configService.listSinks = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { parent: 'projects/' + logging.projectId, a: 'b', c: 'd', }); - assert.deepStrictEqual(config.gaxOpts, { + assert.deepStrictEqual(gaxOpts, { autoPaginate: undefined, a: 'b', c: 'd', }); - done(); + return [[]]; }; - logging.getSinks(OPTIONS, assert.ifError); + await logging.getSinks(OPTIONS); }); describe('error', () => { - const ARGS = [new Error('Error.'), [], {}]; - - beforeEach(() => { - logging.request = (config, callback) => { - callback.apply(null, ARGS); + it('should reject promise with error', () => { + const error = new Error('Error.'); + logging.configService.listSinks = async () => { + throw error; }; - }); - - it('should execute callback with error & API response', done => { - logging.getEntries(OPTIONS, (...args) => { - assert.deepStrictEqual(args, ARGS); - done(); - }); + logging.getSinks(OPTIONS).then( + util.noop, (err) => assert.strictEqual(err, error)); }); }); describe('success', () => { const ARGS = [ - null, [ { name: 'sink-name', @@ -674,23 +772,20 @@ describe('Logging', () => { ]; beforeEach(() => { - logging.request = (config, callback) => { - callback.apply(null, ARGS); + logging.configService.listSinks = async () => { + return ARGS; }; }); - it('should execute callback with Logs & API resp', done => { + it('should resolve promise with Logs & API resp', async () => { const sinkInstance = {}; logging.sink = name => { - assert.strictEqual(name, ARGS[1]![0].name); + assert.strictEqual(name, ARGS[0]![0].name); return sinkInstance; }; - logging.getSinks(OPTIONS, (err, sinks) => { - assert.ifError(err); - assert.strictEqual(sinks[0], sinkInstance); - assert.strictEqual(sinks[0].metadata, ARGS[1]![0]); - done(); - }); + const [sinks] = await logging.getSinks(OPTIONS); + assert.strictEqual(sinks[0], sinkInstance); + assert.strictEqual(sinks[0].metadata, ARGS[0][0].metadata); }); }); }); @@ -705,29 +800,27 @@ describe('Logging', () => { }, }; - let REQUEST_STREAM; + let GAX_STREAM; const RESULT = { name: 'sink-name', }; beforeEach(() => { - REQUEST_STREAM = through.obj(); - REQUEST_STREAM.push(RESULT); - logging.request = () => REQUEST_STREAM; + GAX_STREAM = through.obj(); + GAX_STREAM.push(RESULT); + logging.configService.listSinksStream = () => GAX_STREAM; + logging.auth.getProjectId = async () => {}; }); it('should make request once reading', done => { - logging.request = config => { - assert.strictEqual(config.client, 'ConfigServiceV2Client'); - assert.strictEqual(config.method, 'listSinksStream'); - - assert.deepStrictEqual(config.reqOpts, { + logging.configService.listSinksStream = (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { parent: 'projects/' + logging.projectId, a: 'b', c: 'd', }); - assert.deepStrictEqual(config.gaxOpts, { + assert.deepStrictEqual(gaxOpts, { autoPaginate: undefined, a: 'b', c: 'd', @@ -735,13 +828,53 @@ describe('Logging', () => { setImmediate(done); - return REQUEST_STREAM; + return GAX_STREAM; }; const stream = logging.getSinksStream(OPTIONS); stream.emit('reading'); }); + it('should destroy request stream if gax fails', done => { + const error = new Error('Error.'); + logging.configService.listSinksStream = () => { + throw error; + }; + const stream = logging.getSinksStream(OPTIONS); + stream.emit('reading'); + stream.once('error', (err) => { + assert.strictEqual(err, error); + done(); + }); + }); + + it('should destroy request stream if gaxStream catches error', done => { + const error = new Error('Error.'); + const stream = logging.getSinksStream(OPTIONS); + stream.emit('reading'); + stream.on('error', (err) => { + assert.strictEqual(err, error); + done(); + }); + setImmediate(() => { + GAX_STREAM.emit('error', error); + }); + }); + + it('should return if in snippet sandbox', done => { + logging.setProjectId = async () => { + return done(new Error('Should not have gotten project ID')); + }; + // tslint:disable-next-line no-any + (global as any).GCLOUD_SANDBOX_ENV = true; + const stream = logging.getSinksStream(OPTIONS); + stream.emit('reading'); + // tslint:disable-next-line no-any + delete (global as any).GCLOUD_SANDBOX_ENV; + assert(stream instanceof require('stream')); + done(); + }); + it('should convert results from request to Sink', done => { const stream = logging.getSinksStream(OPTIONS); @@ -762,13 +895,15 @@ describe('Logging', () => { }); it('should expose abort function', done => { - REQUEST_STREAM.abort = done; + GAX_STREAM.cancel = done; const stream = logging.getSinksStream(OPTIONS); stream.emit('reading'); - stream.abort(); + setImmediate(() => { + stream.abort(); + }); }); }); @@ -833,7 +968,7 @@ describe('Logging', () => { }; logging.request(CONFIG, err => { - assert.strictEqual(err, error); + assert.deepStrictEqual(err, error); done(); }); }); @@ -927,7 +1062,7 @@ describe('Logging', () => { }; logging.request(CONFIG, err => { - assert.strictEqual(err, error); + assert.deepStrictEqual(err, error); done(); }); }); @@ -1005,7 +1140,7 @@ describe('Logging', () => { requestStream.emit('reading'); requestStream.on('error', err => { - assert.strictEqual(err, error); + assert.deepStrictEqual(err, error); done(); }); }); @@ -1017,7 +1152,7 @@ describe('Logging', () => { requestStream.emit('reading'); requestStream.on('error', err => { - assert.strictEqual(err, error); + assert.deepStrictEqual(err, error); done(); }); @@ -1058,62 +1193,39 @@ describe('Logging', () => { }; }); - it('should add cloud-logs as an owner', done => { - bucket.acl.owners.addGroup = entity => { + it('should add cloud-logs as an owner', async () => { + bucket.acl.owners.addGroup = async (entity) => { assert.strictEqual(entity, 'cloud-logs@google.com'); - done(); }; - logging.setAclForBucket_(SINK_NAME, CONFIG, assert.ifError); + await logging.setAclForBucket_(CONFIG); }); describe('error', () => { const error = new Error('Error.'); - const apiResponse = {}; beforeEach(() => { - bucket.acl.owners.addGroup = (entity, callback) => { - callback(error, apiResponse); + bucket.acl.owners.addGroup = async () => { + throw error; }; }); - it('should return error and API response to callback', done => { - logging.setAclForBucket_(SINK_NAME, CONFIG, (err, sink, resp) => { - assert.strictEqual(err, error); - assert.strictEqual(sink, null); - assert.strictEqual(resp, apiResponse); - - done(); - }); + it('should return error', () => { + logging.setAclForBucket_(CONFIG).then( + util.noop, (err) => assert.deepStrictEqual(err, error)); }); }); describe('success', () => { - const apiResponse = {}; - beforeEach(() => { - bucket.acl.owners.addGroup = (entity, callback) => { - callback(null, apiResponse); - }; + bucket.acl.owners.addGroup = async () => {}; }); - it('should call createSink with string destination', done => { - bucket.acl.owners.addGroup = (entity, callback) => { - logging.createSink = (name, config, callback) => { - assert.strictEqual(name, SINK_NAME); - - assert.strictEqual(config, CONFIG); - - const expectedDestination = 'storage.googleapis.com/' + bucket.name; - assert.strictEqual(config.destination, expectedDestination); - - callback(); // done() - }; - - callback(null, apiResponse); - }; + it('should set string destination', async () => { + const expectedDestination = 'storage.googleapis.com/' + bucket.name; - logging.setAclForBucket_(SINK_NAME, CONFIG, done); + await logging.setAclForBucket_(CONFIG); + assert.strictEqual(CONFIG.destination, expectedDestination); }); }); }); @@ -1142,18 +1254,14 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - dataset.getMetadata = callback => { - callback(error, null, apiResponse); + dataset.getMetadata = async () => { + throw error; }; }); - it('should execute the callback with error & API resp', done => { - logging.setAclForDataset_(SINK_NAME, CONFIG, (err, _, resp) => { - assert.strictEqual(err, error); - assert.strictEqual(_, null); - assert.strictEqual(resp, apiResponse); - done(); - }); + it('should reject with error', () => { + logging.setAclForDataset_(CONFIG).then( + util.noop, (err) => assert.deepStrictEqual(err, error)); }); }); @@ -1165,12 +1273,12 @@ describe('Logging', () => { const originalAccess = [].slice.call(apiResponse.access); beforeEach(() => { - dataset.getMetadata = callback => { - callback(null, apiResponse, apiResponse); + dataset.getMetadata = async () => { + return [apiResponse, apiResponse]; }; }); - it('should set the correct metadata', done => { + it('should set the correct metadata', async () => { const access = { role: 'WRITER', groupByEmail: 'cloud-logs@google.com', @@ -1180,13 +1288,12 @@ describe('Logging', () => { // tslint:disable-next-line no-any ([] as any[]).slice.call(originalAccess).concat(access); - dataset.setMetadata = metadata => { + dataset.setMetadata = async (metadata) => { assert.deepStrictEqual(apiResponse.access, originalAccess); assert.deepStrictEqual(metadata.access, expectedAccess); - done(); }; - logging.setAclForDataset_(SINK_NAME, CONFIG, assert.ifError); + await logging.setAclForDataset_(CONFIG); }); describe('updating metadata error', () => { @@ -1194,47 +1301,33 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - dataset.setMetadata = (metadata, callback) => { - callback(error, apiResponse); + dataset.setMetadata = async () => { + throw error; }; }); - it('should exec callback with error & API response', done => { - logging.setAclForDataset_(SINK_NAME, CONFIG, (err, _, res) => { - assert.strictEqual(err, error); - assert.strictEqual(_, null); - assert.strictEqual(res, apiResponse); - done(); - }); + it('should reject with error', () => { + logging.setAclForDataset_(CONFIG).then( + util.noop, (err) => assert.deepStrictEqual(err, error)); }); }); describe('updating metadata success', () => { - const apiResponse = {}; - beforeEach(() => { - dataset.setMetadata = (metadata, callback) => { - callback(null, apiResponse); - }; + dataset.setMetadata = async () => {}; }); - it('should call createSink with string destination', done => { - logging.createSink = (name, config, callback) => { - const expectedDestination = [ - 'bigquery.googleapis.com', - 'projects', - dataset.parent.projectId, - 'datasets', - dataset.id, - ].join('/'); - - assert.strictEqual(name, SINK_NAME); - assert.strictEqual(config, CONFIG); - assert.strictEqual(config.destination, expectedDestination); - callback(); // done() - }; - - logging.setAclForDataset_(SINK_NAME, CONFIG, done); + it('should set string destination', async () => { + const expectedDestination = [ + 'bigquery.googleapis.com', + 'projects', + dataset.parent.projectId, + 'datasets', + dataset.id, + ].join('/'); + + await logging.setAclForDataset_(CONFIG); + assert.strictEqual(CONFIG.destination, expectedDestination); }); }); }); @@ -1263,20 +1356,17 @@ describe('Logging', () => { describe('get policy', () => { describe('error', () => { const error = new Error('Error.'); + const apiResponse = {}; beforeEach(() => { - topic.iam.getPolicy = callback => { - callback(error, null); + topic.iam.getPolicy = async () => { + throw error; }; }); - it('should execute the callback with error & API resp', done => { - logging.setAclForTopic_(SINK_NAME, CONFIG, (err, _, resp) => { - assert.strictEqual(err, error); - assert.strictEqual(_, null); - assert.strictEqual(resp, undefined); - done(); - }); + it('should throw error', () => { + logging.setAclForTopic_(CONFIG).then( + util.noop, (err) => assert.deepStrictEqual(err, error)); }); }); @@ -1288,12 +1378,12 @@ describe('Logging', () => { const originalBindings = [].slice.call(apiResponse.bindings); beforeEach(() => { - topic.iam.getPolicy = callback => { - callback(null, apiResponse, apiResponse); + topic.iam.getPolicy = async () => { + return [apiResponse, apiResponse]; }; }); - it('should set the correct policy bindings', done => { + it('should set the correct policy bindings', async () => { const binding = { role: 'roles/pubsub.publisher', members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], @@ -1303,31 +1393,27 @@ describe('Logging', () => { const expectedBindings = ([] as any[]).slice.call(originalBindings); expectedBindings.push(binding); - topic.iam.setPolicy = policy => { + topic.iam.setPolicy = async (policy) => { assert.strictEqual(policy, apiResponse); assert.deepStrictEqual(policy.bindings, expectedBindings); - done(); }; - logging.setAclForTopic_(SINK_NAME, CONFIG, assert.ifError); + await logging.setAclForTopic_(CONFIG); }); describe('updating policy error', () => { const error = new Error('Error.'); + const apiResponse = {}; beforeEach(() => { - topic.iam.setPolicy = (policy, callback) => { - callback(error, null); + topic.iam.setPolicy = async () => { + throw error; }; }); - it('should exec callback with error & API response', done => { - logging.setAclForTopic_(SINK_NAME, CONFIG, (err, _, res) => { - assert.strictEqual(err, error); - assert.strictEqual(_, null); - assert.strictEqual(res, undefined); - done(); - }); + it('should throw error', () => { + logging.setAclForTopic_(CONFIG).then( + util.noop, (err) => assert.deepStrictEqual(err, error)); }); }); @@ -1335,23 +1421,27 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - topic.iam.setPolicy = (policy, callback) => { - callback(null, apiResponse); - }; + topic.iam.setPolicy = async () => {}; }); - it('should call createSink with string destination', done => { - logging.createSink = (name, config, callback) => { - const expectedDestination = 'pubsub.googleapis.com/' + topic.name; - assert.strictEqual(name, SINK_NAME); - assert.strictEqual(config, CONFIG); - assert.strictEqual(config.destination, expectedDestination); - callback(); // done() - }; - logging.setAclForTopic_(SINK_NAME, CONFIG, done); + it('should set string destination', async () => { + const expectedDestination = 'pubsub.googleapis.com/' + topic.name; + await logging.setAclForTopic_(CONFIG); + assert.strictEqual(CONFIG.destination, expectedDestination); }); }); }); }); }); + + describe('updating project ID', () => { + it('should update project id in case of default placeholder', async () => { + logging = new Logging({projectId: '{{projectId}}'}); + logging.auth.getProjectId = async () => { + return PROJECT_ID; + }; + await logging.setProjectId({}); + assert.strictEqual(logging.projectId, PROJECT_ID); + }); + }); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index da250f98214..51325a32b87 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -27,7 +27,7 @@ const fakePromisify = extend({}, promisify, { return; } promisifed = true; - assert.deepStrictEqual(options.exclude, ['entry']); + assert.deepStrictEqual(options.exclude, ['entry', 'getEntries']); }, }); @@ -80,9 +80,10 @@ describe('Log', () => { projectId: PROJECT_ID, entry: util.noop, request: util.noop, + auth: util.noop, }; - log = new Log(LOGGING, LOG_NAME_FORMATTED); + log = new Log(LOGGING, LOG_NAME); }); describe('instantiation', () => { @@ -107,14 +108,14 @@ describe('Log', () => { return formattedName; }; - const log = new Log(LOGGING, LOG_NAME_FORMATTED); + const log = new Log(LOGGING, LOG_NAME); assert.strictEqual(log.formattedName_, formattedName); }); it('should accept and localize options.removeCircular', () => { const options = {removeCircular: true}; - const log = new Log(LOGGING, LOG_NAME_FORMATTED, options); + const log = new Log(LOGGING, LOG_NAME, options); assert.strictEqual(log.removeCircular_, true); }); @@ -243,38 +244,45 @@ describe('Log', () => { }); describe('getEntries', () => { + beforeEach(() => { + log.logging.auth.getProjectId = async () => PROJECT_ID; + }); + const EXPECTED_OPTIONS = { filter: 'logName="' + LOG_NAME_FORMATTED + '"', }; - it('should call Logging getEntries with defaults', done => { - log.logging.getEntries = (options, callback) => { + it('should call Logging getEntries with defaults', async () => { + log.logging.getEntries = (options) => { assert.deepStrictEqual(options, EXPECTED_OPTIONS); - callback(); // done() }; - log.getEntries(done); + await log.getEntries(); }); - it('should allow overriding the options', done => { + it('should add logName filter to user provided filter', async () => { const options = { custom: true, filter: 'custom filter', }; - log.logging.getEntries = (options_, callback) => { - assert.deepStrictEqual(options_, extend({}, EXPECTED_OPTIONS, options)); - callback(); // done() + const expectedOptions = extend({}, options); + expectedOptions.filter = + `(${options.filter}) AND logName="${log.formattedName_}"`; + + log.logging.getEntries = (options_) => { + assert.notDeepStrictEqual(options_, options); + assert.deepStrictEqual(options_, expectedOptions); }; - log.getEntries(options, done); + await log.getEntries(options); }); }); describe('getEntriesStream', () => { const fakeStream = {}; const EXPECTED_OPTIONS = { - filter: 'logName="' + LOG_NAME_FORMATTED + '"', + log: LOG_NAME_ENCODED, }; it('should call Logging getEntriesStream with defaults', done => { From 48614362501794f5ac26687489d06f24e0af61f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 22 Apr 2019 08:36:34 -0700 Subject: [PATCH 0378/1029] fix(deps): update dependency type-fest to ^0.4.0 (#455) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e826d785c73..7e7b445db63 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -73,7 +73,7 @@ "snakecase-keys": "^2.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", - "type-fest": "^0.3.1" + "type-fest": "^0.4.0" }, "devDependencies": { "@google-cloud/bigquery": "^3.0.0", From 1d6edcb6352320bc1a1b1a610511e96399622a0f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 22 Apr 2019 08:40:22 -0700 Subject: [PATCH 0379/1029] chore(deps): update dependency nyc to v14 chore(deps): update dependency nyc to v14 This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | nyc | devDependencies | major | [`^13.0.1` -> `^14.0.0`](https://diff.intrinsic.com/nyc/13.3.0/14.0.0) | [source](https://togithub.com/istanbuljs/nyc) | --- ### Release Notes
istanbuljs/nyc ### [`v14.0.0`](https://togithub.com/istanbuljs/nyc/blob/master/CHANGELOG.md#​1400httpsgithubcomistanbuljsnyccomparev1330v1400-2019-04-15) [Compare Source](https://togithub.com/istanbuljs/nyc/compare/v13.3.0...v14.0.0) ##### Bug Fixes - Add `cwd` option to instrument command ([#​1024](https://togithub.com/istanbuljs/nyc/issues/1024)) ([051d95a](https://togithub.com/istanbuljs/nyc/commit/051d95a)) - Add config values to hash salt ([#​988](https://togithub.com/istanbuljs/nyc/issues/988)) ([7ac325d](https://togithub.com/istanbuljs/nyc/commit/7ac325d)), closes [#​522](https://togithub.com/istanbuljs/nyc/issues/522) - Exclude negated not working with '--all' switch ([#​977](https://togithub.com/istanbuljs/nyc/issues/977)) ([91de23c](https://togithub.com/istanbuljs/nyc/commit/91de23c)) - Make --all work for transpiled code ([#​1047](https://togithub.com/istanbuljs/nyc/issues/1047)) ([18e04ba](https://togithub.com/istanbuljs/nyc/commit/18e04ba)) - Resolve absolute paths in nyc instrument ([#​1012](https://togithub.com/istanbuljs/nyc/issues/1012)) ([3cb1861](https://togithub.com/istanbuljs/nyc/commit/3cb1861)), closes [#​1014](https://togithub.com/istanbuljs/nyc/issues/1014) - Set processinfo pid/ppid to actual numbers ([#​1057](https://togithub.com/istanbuljs/nyc/issues/1057)) ([32f75b0](https://togithub.com/istanbuljs/nyc/commit/32f75b0)) - Use a single instance of nyc for all actions of main command. ([#​1059](https://togithub.com/istanbuljs/nyc/issues/1059)) ([b909575](https://togithub.com/istanbuljs/nyc/commit/b909575)) ##### Features - Add `delete` option to instrument command ([#​1005](https://togithub.com/istanbuljs/nyc/issues/1005)) ([d6db551](https://togithub.com/istanbuljs/nyc/commit/d6db551)) - Add `include` and `exclude` options to instrument command ([#​1007](https://togithub.com/istanbuljs/nyc/issues/1007)) ([8da097e](https://togithub.com/istanbuljs/nyc/commit/8da097e)) - Add processinfo index, add externalId ([#​1055](https://togithub.com/istanbuljs/nyc/issues/1055)) ([8dcf180](https://togithub.com/istanbuljs/nyc/commit/8dcf180)) - Add support for nyc.config.js ([#​1019](https://togithub.com/istanbuljs/nyc/issues/1019)) ([3b203c7](https://togithub.com/istanbuljs/nyc/commit/3b203c7)) - Add support to exclude files on coverage report generation ([#​982](https://togithub.com/istanbuljs/nyc/issues/982)) ([509c6aa](https://togithub.com/istanbuljs/nyc/commit/509c6aa)) - Add test-exclude args to check-coverage and report subcommands. ([0fc217e](https://togithub.com/istanbuljs/nyc/commit/0fc217e)) - Always build the processinfo temp dir ([#​1061](https://togithub.com/istanbuljs/nyc/issues/1061)) ([c213469](https://togithub.com/istanbuljs/nyc/commit/c213469)) - Enable `es-modules` option for nyc instrument command ([#​1006](https://togithub.com/istanbuljs/nyc/issues/1006)) ([596b120](https://togithub.com/istanbuljs/nyc/commit/596b120)) - Fix excludeAfterRemap functionality. ([36bcc0b](https://togithub.com/istanbuljs/nyc/commit/36bcc0b)) - Implement `nyc instrument --complete-copy` ([#​1056](https://togithub.com/istanbuljs/nyc/issues/1056)) ([2eb13c6](https://togithub.com/istanbuljs/nyc/commit/2eb13c6)) - Remove bundling ([#​1017](https://togithub.com/istanbuljs/nyc/issues/1017)) ([b25492a](https://togithub.com/istanbuljs/nyc/commit/b25492a)) - Support turning off node_modules default exclude via `exclude-node-modules` option ([#​912](https://togithub.com/istanbuljs/nyc/issues/912)) ([b7e16cd](https://togithub.com/istanbuljs/nyc/commit/b7e16cd)) - Add support for `--exclude-node-modules` to subcommands. ([#​1053](https://togithub.com/istanbuljs/nyc/issues/1053)) ([e597c46](https://togithub.com/istanbuljs/nyc/commit/e597c46)) ##### BREAKING CHANGES - The `--exclude-after-remap` option is now functional and enabled by default. This causes the `include` and `exclude` lists to be processed after using source maps to determine the original filename of sources. - Add a file named 'index.json' to the .nyc_output/processinfo directory, which has a different format from the other files in this dir. - Change the data type of the pid/ppid fields in processinfo files - `nyc instrument` now honors `include` and `exclude` settings, potentially resulting in some files that were previously instrumented being ignored. - The `plugins` option has been renamed to `parser-plugins`. - The logic involving include/exclude processing has changed. Results should be verified to ensure all desired sources have coverage data. - `nyc instrument` now enables the `--es-module` option by default. This can cause failures to instrument scripts which violate `'use strict'` rules.
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with "`rebase!`". :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#googleapis/nodejs-logging). #451 automerged by dpebot --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7e7b445db63..b91dc8f027d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -111,7 +111,7 @@ "mv": "^2.1.1", "ncp": "^2.0.0", "nock": "^10.0.1", - "nyc": "^13.0.1", + "nyc": "^14.0.0", "power-assert": "^1.6.0", "prettier": "^1.15.1", "proxyquire": "^2.1.0", From ea123ffe525afe9e5f7500b285dd6bfc84d6c7b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 27 Apr 2019 12:03:40 -0700 Subject: [PATCH 0380/1029] chore(deps): update dependency @types/nock to v10 (#457) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b91dc8f027d..38e878559d5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -85,7 +85,7 @@ "@types/mocha": "^5.2.5", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.1", - "@types/nock": "^9.3.0", + "@types/nock": "^10.0.0", "@types/on-finished": "^2.3.1", "@types/pify": "^3.0.2", "@types/proxyquire": "^1.3.28", From c7ba0fd98e23cb88bdd6db2ed4a3ada2f7acc064 Mon Sep 17 00:00:00 2001 From: Alex <7764119+AVaksman@users.noreply.github.com> Date: Mon, 29 Apr 2019 15:57:48 -0400 Subject: [PATCH 0381/1029] refactor: sink.ts to async-first (#452) * refactor sink.ts to async-first * use local variable to hold projectId value --- handwritten/logging/src/sink.ts | 108 +++++----------- handwritten/logging/test/sink.ts | 204 +++++++++++++++---------------- 2 files changed, 129 insertions(+), 183 deletions(-) diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 6e6e7650bd0..7f0d703e647 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import * as common from '@google-cloud/common-grpc'; -import {promisifyAll} from '@google-cloud/promisify'; +import {callbackifyAll, promisifyAll} from '@google-cloud/promisify'; import * as extend from 'extend'; import {CallOptions} from 'google-gax'; import {CreateSinkCallback, CreateSinkRequest, DeleteCallback, DeleteResponse, Logging, LogSink} from '.'; @@ -104,9 +103,8 @@ class Sink { */ create(config: CreateSinkRequest): Promise<[Sink, LogSink]>; create(config: CreateSinkRequest, callback: CreateSinkCallback): void; - create(config: CreateSinkRequest, callback?: CreateSinkCallback): - Promise<[Sink, LogSink]>|void { - this.logging.createSink(this.name, config, callback!); + create(config: CreateSinkRequest): Promise<[Sink, LogSink]> { + return this.logging.createSink(this.name, config); } /** @@ -153,23 +151,15 @@ class Sink { delete(gaxOptions?: CallOptions): Promise; delete(callback: DeleteCallback): void; delete(gaxOptions: CallOptions, callback: DeleteCallback): void; - delete(gaxOptions?: CallOptions|DeleteCallback, callback?: DeleteCallback): - Promise|void { - if (typeof gaxOptions === 'function') { - callback = gaxOptions as DeleteCallback; - gaxOptions = {}; - } + async delete(gaxOptions?: CallOptions| + DeleteCallback): Promise { + const projectId = await this.logging.auth.getProjectId(); + this.formattedName_ = 'projects/' + projectId + '/sinks/' + this.name; const reqOpts = { sinkName: this.formattedName_, }; - this.logging.request( - { - client: 'ConfigServiceV2Client', - method: 'deleteSink', - reqOpts, - gaxOpts: gaxOptions as CallOptions, - }, - callback); + return this.logging.configService.deleteSink( + reqOpts, gaxOptions as CallOptions); } /** @@ -215,30 +205,17 @@ class Sink { getMetadata(gaxOptions?: CallOptions): Promise; getMetadata(callback: SinkMetadataCallback): void; getMetadata(gaxOptions: CallOptions, callback: SinkMetadataCallback): void; - getMetadata( - gaxOptions?: CallOptions|SinkMetadataCallback, - callback?: SinkMetadataCallback): Promise|void { - const self = this; - if (typeof gaxOptions === 'function') { - callback = gaxOptions; - gaxOptions = {}; - } + async getMetadata(gaxOptions?: CallOptions| + SinkMetadataCallback): Promise { + const projectId = await this.logging.auth.getProjectId(); + this.formattedName_ = 'projects/' + projectId + '/sinks/' + this.name; const reqOpts = { sinkName: this.formattedName_, }; - this.logging.request( - { - client: 'ConfigServiceV2Client', - method: 'getSink', - reqOpts, - gaxOpts: gaxOptions, - }, - (...args) => { - if (args[1]) { - self.metadata = args[1]; - } - callback!.apply(null, args); - }); + + [this.metadata] = await this.logging.configService.getSink( + reqOpts, gaxOptions as CallOptions); + return [this.metadata!]; } /** @@ -279,13 +256,12 @@ class Sink { */ setFilter(filter: string): Promise; setFilter(filter: string, callback: SinkMetadataCallback): void; - setFilter(filter: string, callback?: SinkMetadataCallback): - Promise|void { - this.setMetadata( + setFilter(filter: string): Promise { + return this.setMetadata( { filter, }, - callback!); + ); } /** @@ -336,43 +312,25 @@ class Sink { */ setMetadata(metadata: SetSinkMetadata): Promise; setMetadata(metadata: SetSinkMetadata, callback: SinkMetadataCallback): void; - setMetadata(metadata: SetSinkMetadata, callback?: SinkMetadataCallback): - Promise|void { - const self = this; - callback = callback || common.util.noop; - this.getMetadata((err, currentMetadata) => { - if (err) { - callback!(err); - return; - } - const reqOpts = { - sinkName: self.formattedName_, - sink: extend({}, currentMetadata, metadata), - }; - delete reqOpts.sink.gaxOptions; - self.logging.request( - { - client: 'ConfigServiceV2Client', - method: 'updateSink', - reqOpts, - gaxOpts: metadata.gaxOptions, - }, - (...args) => { - if (args[1]) { - self.metadata = args[1]; - } - callback!.apply(null, args); - }); - }); + async setMetadata(metadata: SetSinkMetadata): Promise { + const [currentMetadata] = await this.getMetadata(); + const reqOpts = { + sinkName: this.formattedName_, + sink: extend({}, currentMetadata, metadata), + }; + delete reqOpts.sink.gaxOptions; + [this.metadata] = await this.logging.configService.updateSink( + reqOpts, metadata.gaxOptions); + return [this.metadata!]; } } /*! Developer Documentation * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. + * All async methods (except for streams) will call a callbakc in the event + * that a callback is provided. */ -promisifyAll(Sink); +callbackifyAll(Sink); /** * Reference to the {@link Sink} class. diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index 93d6f87900b..ca267477c07 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -15,16 +15,16 @@ */ import {util} from '@google-cloud/common-grpc'; -import * as promisify from '@google-cloud/promisify'; +import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; -let promisifed = false; -const fakePromisify = extend({}, promisify, { - promisifyAll(c) { +let callbackified = false; +const fakeCallbackify = extend({}, callbackify, { + callbackifyAll(c) { if (c.name === 'Sink') { - promisifed = true; + callbackified = true; } }, }); @@ -34,15 +34,19 @@ describe('Sink', () => { let Sink: any; let sink; + const PROJECT_ID = 'project-id'; + const LOGGING = { createSink: util.noop, - projectId: 'project-id', + projectId: '{{projectId}}', + auth: util.noop, + configService: util.noop, }; const SINK_NAME = 'sink-name'; before(() => { Sink = proxyquire('../src/sink', { - '@google-cloud/promisify': fakePromisify, + '@google-cloud/promisify': fakeCallbackify, }).Sink; }); @@ -52,7 +56,7 @@ describe('Sink', () => { describe('instantiation', () => { it('should promisify all the things', () => { - assert(promisifed); + assert(callbackified); }); it('should localize Logging instance', () => { @@ -71,115 +75,103 @@ describe('Sink', () => { }); describe('create', () => { - it('should call parent createSink', done => { + it('should call parent createSink', async () => { const config = {}; - sink.logging.createSink = (name, config_, callback) => { + sink.logging.createSink = async (name, config_) => { assert.strictEqual(name, sink.name); assert.strictEqual(config_, config); - callback(); // done() }; - sink.create(config, done); + await sink.create(config); }); }); describe('delete', () => { - it('should accept gaxOptions', done => { - sink.logging.request = (config, callback) => { - assert.strictEqual(config.client, 'ConfigServiceV2Client'); - assert.strictEqual(config.method, 'deleteSink'); - - assert.deepStrictEqual(config.reqOpts, { + it('should execute gax method', async () => { + sink.logging.auth.getProjectId = async () => PROJECT_ID; + sink.logging.configService.deleteSink = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { sinkName: sink.formattedName_, }); - - assert.deepStrictEqual(config.gaxOpts, {}); - - callback(); // done() + assert.strictEqual(gaxOpts, undefined); }; - sink.delete(done); + await sink.delete(); }); - it('should accept gaxOptions', done => { + it('should accept gaxOptions', async () => { const gaxOptions = {}; - sink.logging.request = config => { - assert.strictEqual(config.gaxOpts, gaxOptions); - done(); + sink.logging.getProjectId = async () => {}; + sink.logging.configService.deleteSink = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(gaxOpts, gaxOptions); }; - sink.delete(gaxOptions, assert.ifError); + await sink.delete(gaxOptions); }); }); describe('getMetadata', () => { - it('should make correct request', done => { - sink.logging.request = config => { - assert.strictEqual(config.client, 'ConfigServiceV2Client'); - assert.strictEqual(config.method, 'getSink'); - - assert.deepStrictEqual(config.reqOpts, { + beforeEach(() => { + sink.logging.auth.getProjectId = async () => PROJECT_ID; + }); + it('should execute gax method', async () => { + sink.logging.configService.getSink = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { sinkName: sink.formattedName_, }); - - assert.deepStrictEqual(config.gaxOpts, {}); - - done(); + assert.strictEqual(gaxOpts, undefined); + return []; }; - sink.getMetadata(assert.ifError); + await sink.getMetadata(); }); - it('should accept gaxOptions', done => { + it('should accept gaxOptions', async () => { const gaxOptions = {}; - sink.logging.request = config => { - assert.strictEqual(config.gaxOpts, gaxOptions); - done(); + sink.logging.configService.getSink = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(gaxOpts, gaxOptions); + return []; }; - sink.delete(gaxOptions, assert.ifError); + await sink.getMetadata(gaxOptions); }); - it('should update metadata', done => { + it('should update metadata', async () => { const metadata = {}; - sink.logging.request = (config, callback) => { - callback(null, metadata); + sink.logging.configService.getSink = async (reqOpts, gaxOpts) => { + return [metadata]; }; - sink.getMetadata(() => { - assert.strictEqual(sink.metadata, metadata); - done(); - }); + await sink.getMetadata(); + assert.strictEqual(sink.metadata, metadata); }); - it('should execute callback with original arguments', done => { + it('should return original arguments', async () => { const ARGS = [{}, {}, {}]; - sink.logging.request = (config, callback) => { - callback.apply(null, ARGS); + sink.logging.configService.getSink = async (reqOpts, gaxOpts) => { + return [ARGS]; }; - sink.getMetadata((...args) => { - assert.deepStrictEqual(args, ARGS); - done(); - }); + const [args] = await sink.getMetadata(); + assert.deepStrictEqual(args, ARGS); }); }); describe('setFilter', () => { const FILTER = 'filter'; - it('should call set metadata', done => { - sink.setMetadata = (metadata, callback) => { + it('should call set metadata', async () => { + sink.setMetadata = async (metadata) => { assert.strictEqual(metadata.filter, FILTER); - callback(); // done() + return []; }; - sink.setFilter(FILTER, done); + await sink.setFilter(FILTER); }); }); @@ -187,94 +179,90 @@ describe('Sink', () => { const METADATA = {a: 'b', c: 'd'}; beforeEach(() => { - sink.getMetadata = (callback) => { - callback(null, METADATA); + sink.getMetadata = async () => { + return [METADATA]; }; + + sink.logging.auth.getProjectId = async () => PROJECT_ID; }); - it('should refresh the metadata', done => { + it('should refresh the metadata', async () => { sink.getMetadata = () => { - done(); + return []; + }; + + sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + return [METADATA]; }; - sink.setMetadata(METADATA, assert.ifError); + assert.strictEqual(sink.metadata, undefined); + await sink.setMetadata(METADATA); + assert.deepStrictEqual(sink.metadata, METADATA); }); - it('should exec callback with error from refresh', done => { + it('should throw the error from refresh', () => { const error = new Error('Error.'); - sink.getMetadata = (callback) => { - callback(error); + sink.getMetadata = async () => { + throw error; }; - sink.setMetadata(METADATA, (err) => { - assert.strictEqual(err, error); - done(); - }); + sink.setMetadata(METADATA).then( + util.noop, (err) => assert.strictEqual(err, error)); }); - it('should make the correct request', done => { + it('should execute gax method', async () => { const currentMetadata = {a: 'a', e: 'e'}; - sink.getMetadata = (callback) => { - callback(null, currentMetadata); + sink.getMetadata = async () => { + return [currentMetadata]; }; - sink.logging.request = (config) => { - assert.strictEqual(config.client, 'ConfigServiceV2Client'); - assert.strictEqual(config.method, 'updateSink'); - - assert.deepStrictEqual(config.reqOpts, { + sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { sinkName: sink.formattedName_, sink: extend({}, currentMetadata, METADATA), }); - - assert.strictEqual(config.gaxOpts, undefined); - - done(); + assert.strictEqual(gaxOpts, undefined); + return []; }; - sink.setMetadata(METADATA, assert.ifError); + await sink.setMetadata(METADATA); }); - it('should accept gaxOptions', done => { + it('should accept gaxOptions', async () => { const metadata = extend({}, METADATA, { gaxOptions: {}, }); - sink.logging.request = (config) => { - assert.strictEqual(config.reqOpts.sink.gaxOptions, undefined); - assert.strictEqual(config.gaxOpts, metadata.gaxOptions); - done(); + sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + assert.strictEqual(reqOpts.sink.gaxOptions, undefined); + assert.strictEqual(gaxOpts, metadata.gaxOptions); + return []; }; - - sink.setMetadata(metadata, assert.ifError); + await sink.setMetadata(metadata); }); - it('should update metadata', done => { + it('should update metadata', async () => { const metadata = {}; - sink.logging.request = (config, callback) => { - callback(null, metadata); + sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + return [metadata]; }; - sink.setMetadata(metadata, () => { - assert.strictEqual(sink.metadata, metadata); - done(); - }); + await sink.setMetadata(metadata); + assert.strictEqual(sink.metadata, metadata); }); - it('should execute callback with original arguments', done => { + it('should return callback with original arguments', async () => { const ARGS = [{}, {}, {}]; - sink.logging.request = (config, callback) => { - callback.apply(null, ARGS); + sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + return [ARGS]; }; - sink.setMetadata(METADATA, (...args) => { - assert.deepStrictEqual(args, ARGS); - done(); - }); + const [args] = await sink.setMetadata(METADATA); + assert.deepStrictEqual(args, ARGS); }); }); }); From c5d37e544f0c1ac91a8b1b477cf768aed10a27f9 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 29 Apr 2019 15:04:00 -0700 Subject: [PATCH 0382/1029] update to .nycrc with --all enabled (#458) --- handwritten/logging/.nycrc | 40 ++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/handwritten/logging/.nycrc b/handwritten/logging/.nycrc index 88b001cb587..bfe4073a6ab 100644 --- a/handwritten/logging/.nycrc +++ b/handwritten/logging/.nycrc @@ -1,28 +1,22 @@ { "report-dir": "./.coverage", - "reporter": "lcov", + "reporter": ["text", "lcov"], "exclude": [ - "src/*{/*,/**/*}.js", - "src/*/v*/*.js", - "test/**/*.js", - "build/test" + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/docs", + "**/samples", + "**/scripts", + "**/src/**/v*/**/*.js", + "**/test", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" ], - "watermarks": { - "branches": [ - 95, - 100 - ], - "functions": [ - 95, - 100 - ], - "lines": [ - 95, - 100 - ], - "statements": [ - 95, - 100 - ] - } + "exclude-after-remap": false, + "all": true } From 6a4bf2079081830c75759473e283d719e21a5560 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 2 May 2019 09:15:47 -0700 Subject: [PATCH 0383/1029] fix(deps): update dependency google-gax to ^0.26.0 (#459) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 38e878559d5..7dbbbe9fe50 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,7 +63,7 @@ "extend": "^3.0.2", "gcp-metadata": "^1.0.0", "google-auth-library": "^3.0.0", - "google-gax": "^0.25.0", + "google-gax": "^0.26.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", From 5aecf86aeb1f0f4d84d3dde214098dad36272e36 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 2 May 2019 09:58:42 -0700 Subject: [PATCH 0384/1029] chore: removing node6 CI (#460) --- .../.kokoro/continuous/node6/common.cfg | 24 ------------------- .../logging/.kokoro/continuous/node6/test.cfg | 0 .../.kokoro/presubmit/node6/common.cfg | 24 ------------------- .../logging/.kokoro/presubmit/node6/test.cfg | 0 4 files changed, 48 deletions(-) delete mode 100644 handwritten/logging/.kokoro/continuous/node6/common.cfg delete mode 100644 handwritten/logging/.kokoro/continuous/node6/test.cfg delete mode 100644 handwritten/logging/.kokoro/presubmit/node6/common.cfg delete mode 100644 handwritten/logging/.kokoro/presubmit/node6/test.cfg diff --git a/handwritten/logging/.kokoro/continuous/node6/common.cfg b/handwritten/logging/.kokoro/continuous/node6/common.cfg deleted file mode 100644 index 7e36972f6f9..00000000000 --- a/handwritten/logging/.kokoro/continuous/node6/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" -} diff --git a/handwritten/logging/.kokoro/continuous/node6/test.cfg b/handwritten/logging/.kokoro/continuous/node6/test.cfg deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/handwritten/logging/.kokoro/presubmit/node6/common.cfg b/handwritten/logging/.kokoro/presubmit/node6/common.cfg deleted file mode 100644 index 7e36972f6f9..00000000000 --- a/handwritten/logging/.kokoro/presubmit/node6/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" -} diff --git a/handwritten/logging/.kokoro/presubmit/node6/test.cfg b/handwritten/logging/.kokoro/presubmit/node6/test.cfg deleted file mode 100644 index e69de29bb2d..00000000000 From bf8ed432ed40f815687b1bb2c040d5e5623a4adb Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 2 May 2019 11:30:06 -0700 Subject: [PATCH 0385/1029] build!: upgrade engines field to >=8.10.0 (#461) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7dbbbe9fe50..f03c618162e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc.", "engines": { - "node": ">=6.0.0" + "node": ">=8.10.0" }, "repository": "googleapis/nodejs-logging", "main": "./build/src/index.js", From fc34a29b42c72503766a295e998022a2924f9e81 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 3 May 2019 07:30:22 -0700 Subject: [PATCH 0386/1029] fix(deps): update dependency @google-cloud/promisify to v1 (#465) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f03c618162e..2e2304dbf9c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "@google-cloud/common-grpc": "^0.10.0", "@google-cloud/paginator": "^0.2.0", "@google-cloud/projectify": "^0.3.0", - "@google-cloud/promisify": "^0.4.0", + "@google-cloud/promisify": "^1.0.0", "@opencensus/propagation-stackdriver": "0.0.11", "arrify": "^2.0.0", "eventid": "^0.1.2", From 20b63fe18fbea410ce2fe01f96ba1b23c2359fb9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 3 May 2019 07:36:58 -0700 Subject: [PATCH 0387/1029] fix(deps): update dependency @google-cloud/projectify to v1 (#464) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2e2304dbf9c..fc7f2e8db20 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "dependencies": { "@google-cloud/common-grpc": "^0.10.0", "@google-cloud/paginator": "^0.2.0", - "@google-cloud/projectify": "^0.3.0", + "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", "@opencensus/propagation-stackdriver": "0.0.11", "arrify": "^2.0.0", From 3d17af2e0400814e4dee8e490f81964889c099eb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 3 May 2019 08:20:40 -0700 Subject: [PATCH 0388/1029] chore(deps): update dependency eslint-plugin-node to v9 (#463) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fc7f2e8db20..70dfde25b34 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -99,7 +99,7 @@ "codecov": "^3.0.4", "eslint": "^5.4.0", "eslint-config-prettier": "^4.0.0", - "eslint-plugin-node": "^8.0.0", + "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^0.20.0", "gts": "^0.9.0", From 6ee5fe43183026fa37a9c97e927dd82631daa307 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 3 May 2019 09:20:25 -0700 Subject: [PATCH 0389/1029] chore: do not run CI on grpc-js (#462) --- .../.kokoro/continuous/node10/system-test-grpcjs.cfg | 12 ------------ .../.kokoro/presubmit/node10/system-test-grpcjs.cfg | 12 ------------ 2 files changed, 24 deletions(-) delete mode 100644 handwritten/logging/.kokoro/continuous/node10/system-test-grpcjs.cfg delete mode 100644 handwritten/logging/.kokoro/presubmit/node10/system-test-grpcjs.cfg diff --git a/handwritten/logging/.kokoro/continuous/node10/system-test-grpcjs.cfg b/handwritten/logging/.kokoro/continuous/node10/system-test-grpcjs.cfg deleted file mode 100644 index c71fc6f047b..00000000000 --- a/handwritten/logging/.kokoro/continuous/node10/system-test-grpcjs.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/system-test.sh" -} - -env_vars: { - key: "GOOGLE_CLOUD_USE_GRPC_JS" - value: "1" -} diff --git a/handwritten/logging/.kokoro/presubmit/node10/system-test-grpcjs.cfg b/handwritten/logging/.kokoro/presubmit/node10/system-test-grpcjs.cfg deleted file mode 100644 index c71fc6f047b..00000000000 --- a/handwritten/logging/.kokoro/presubmit/node10/system-test-grpcjs.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/system-test.sh" -} - -env_vars: { - key: "GOOGLE_CLOUD_USE_GRPC_JS" - value: "1" -} From c1aafd97e524be6e6b36a42a6b6d595d3158d82a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 3 May 2019 11:10:17 -0700 Subject: [PATCH 0390/1029] chore(deps): update dependency gts to v1 (#456) --- handwritten/logging/package.json | 2 +- handwritten/logging/src/entry.ts | 26 +- handwritten/logging/src/http-request.ts | 2 +- handwritten/logging/src/index.ts | 215 +++++++----- handwritten/logging/src/log.ts | 332 +++++++++++------- handwritten/logging/src/metadata.ts | 14 +- handwritten/logging/src/middleware/context.ts | 9 +- .../middleware/express/make-http-request.ts | 12 +- .../src/middleware/express/make-middleware.ts | 14 +- handwritten/logging/src/sink.ts | 41 ++- .../system-test/fixtures/sample/package.json | 2 +- handwritten/logging/system-test/install.ts | 16 +- handwritten/logging/system-test/logging.ts | 176 +++++----- handwritten/logging/test/entry.ts | 40 ++- handwritten/logging/test/index.ts | 193 +++++----- handwritten/logging/test/log.ts | 71 ++-- handwritten/logging/test/metadata.ts | 62 ++-- .../express/test-make-http-request.ts | 16 +- .../express/test-make-middleware.ts | 33 +- .../logging/test/middleware/test-context.ts | 18 +- handwritten/logging/test/sink.ts | 16 +- 21 files changed, 759 insertions(+), 551 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 70dfde25b34..5ce3684a902 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -102,7 +102,7 @@ "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^0.20.0", - "gts": "^0.9.0", + "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index f6c2ff0209c..a8f7c688e78 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -24,12 +24,15 @@ import {google} from '../proto/logging'; const eventId = new EventId(); -export type Timestamp = google.protobuf.ITimestamp|Date; -export type LogSeverity = google.logging.type.LogSeverity|string; -export type LogEntry = Merge; +export type Timestamp = google.protobuf.ITimestamp | Date; +export type LogSeverity = google.logging.type.LogSeverity | string; +export type LogEntry = Merge< + google.logging.v2.ILogEntry, + { + timestamp?: Timestamp | null; + severity?: LogSeverity | null; + } +>; // tslint:disable-next-line no-any export type Data = any; @@ -113,10 +116,11 @@ class Entry { * @property {number} insertId */ this.metadata = extend( - { - timestamp: new Date(), - }, - metadata); + { + timestamp: new Date(), + }, + metadata + ); // JavaScript date has a very coarse granularity (millisecond), which makes // it quite likely that multiple log entries would have the same timestamp. // The Logging API doesn't guarantee to preserve insertion order for entries @@ -142,7 +146,7 @@ class Entry { * object with a string value, `[Circular]`. */ toJSON(options: ToJsonOptions = {}) { - const entry = extend(true, {}, this.metadata) as {} as EntryJson; + const entry = (extend(true, {}, this.metadata) as {}) as EntryJson; if (is.object(this.data)) { // tslint:disable-next-line no-any entry.jsonPayload = (Service as any).objToStruct_(this.data, { diff --git a/handwritten/logging/src/http-request.ts b/handwritten/logging/src/http-request.ts index bebb7d9abe6..039d0aef79e 100644 --- a/handwritten/logging/src/http-request.ts +++ b/handwritten/logging/src/http-request.ts @@ -24,7 +24,7 @@ export interface StackdriverHttpRequest { remoteIp?: string; serverIp?: string; referer?: string; - latency?: {seconds: number; nanos: number;}; + latency?: {seconds: number; nanos: number}; cacheLookup?: boolean; cacheHit?: boolean; cacheValidatedWithOriginServer?: boolean; diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index f24556f1660..573af479dcd 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -40,16 +40,23 @@ const PKG = require('../../package.json'); const v2 = require('./v2'); import {Entry, LogEntry} from './entry'; -import {Log, GetEntriesRequest, LogOptions, MonitoredResource, Severity, SeverityNames} from './log'; +import { + Log, + GetEntriesRequest, + LogOptions, + MonitoredResource, + Severity, + SeverityNames, +} from './log'; import {Sink} from './sink'; import {Duplex} from 'stream'; import {AbortableDuplex} from '@google-cloud/common'; import {google} from '../proto/logging'; import {google as google_config} from '../proto/logging_config'; -import {Bucket} from '@google-cloud/storage'; // types only -import {Dataset, BigQuery} from '@google-cloud/bigquery'; // types only -import {Topic} from '@google-cloud/pubsub'; // types only +import {Bucket} from '@google-cloud/storage'; // types only +import {Dataset, BigQuery} from '@google-cloud/bigquery'; // types only +import {Topic} from '@google-cloud/pubsub'; // types only export interface LoggingOptions extends gax.GoogleAuthOptions { autoRetry?: boolean; @@ -57,7 +64,7 @@ export interface LoggingOptions extends gax.GoogleAuthOptions { } export interface DeleteCallback { - (error?: (Error|null), response?: google.protobuf.Empty): void; + (error?: Error | null, response?: google.protobuf.Empty): void; } export type DeleteResponse = google.protobuf.Empty; @@ -76,18 +83,26 @@ export interface CreateSinkRequest { } export interface CreateSinkCallback { - (err: Error|null, sink?: Sink|null, resp?: LogSink|request.Response): void; + ( + err: Error | null, + sink?: Sink | null, + resp?: LogSink | request.Response + ): void; } export type GetEntriesResponse = [ - Entry[], google.logging.v2.IListLogEntriesRequest, + Entry[], + google.logging.v2.IListLogEntriesRequest, google.logging.v2.IListLogEntriesResponse ]; export interface GetEntriesCallback { - (err: Error|null, entries?: Entry[], - request?: google.logging.v2.IListLogEntriesRequest, - apiResponse?: google.logging.v2.IListLogEntriesResponse): void; + ( + err: Error | null, + entries?: Entry[], + request?: google.logging.v2.IListLogEntriesRequest, + apiResponse?: google.logging.v2.IListLogEntriesResponse + ): void; } export interface GetSinksRequest { @@ -100,14 +115,18 @@ export interface GetSinksRequest { } export type GetSinksResponse = [ - Sink[], google_config.logging.v2.IListSinksRequest, + Sink[], + google_config.logging.v2.IListSinksRequest, google_config.logging.v2.IListSinksResponse ]; export interface GetSinksCallback { - (err: Error|null, entries?: Sink[], - request?: google_config.logging.v2.IListSinksRequest, - apiResponse?: google_config.logging.v2.IListSinksResponse): void; + ( + err: Error | null, + entries?: Sink[], + request?: google_config.logging.v2.IListSinksRequest, + apiResponse?: google_config.logging.v2.IListSinksResponse + ): void; } export type Client = string; @@ -119,11 +138,11 @@ export interface RequestConfig { } export interface RequestCallback { - (err: Error|null, res?: TResponse): void; + (err: Error | null, res?: TResponse): void; } interface GaxRequestCallback { - (err: Error|null, requestFn?: Function): void; + (err: Error | null, requestFn?: Function): void; } /** * For logged errors, one can provide a the service context. For more @@ -245,12 +264,13 @@ class Logging { } } const options_ = extend( - { - libName: 'gccl', - libVersion: PKG.version, - scopes, - }, - options); + { + libName: 'gccl', + libVersion: PKG.version, + scopes, + }, + options + ); this.api = {}; this.auth = new GoogleAuth(options_); this.options = options_; @@ -339,10 +359,14 @@ class Logging { */ createSink(name: string, config: CreateSinkRequest): Promise<[Sink, LogSink]>; createSink( - name: string, config: CreateSinkRequest, - callback: CreateSinkCallback): void; - async createSink(name: string, config: CreateSinkRequest): - Promise<[Sink, LogSink]> { + name: string, + config: CreateSinkRequest, + callback: CreateSinkCallback + ): void; + async createSink( + name: string, + config: CreateSinkRequest + ): Promise<[Sink, LogSink]> { if (typeof name !== 'string') { throw new Error('A sink name must be provided.'); } @@ -364,8 +388,10 @@ class Logging { }; delete reqOpts.sink.gaxOptions; await this.setProjectId(reqOpts); - const [resp] = - await this.configService.createSink(reqOpts, config.gaxOptions); + const [resp] = await this.configService.createSink( + reqOpts, + config.gaxOptions + ); const sink = this.sink(resp.name); sink.metadata = resp; return [sink, resp]; @@ -417,7 +443,7 @@ class Logging { * // } * // } */ - entry(resource?: LogEntry, data?: {}|string) { + entry(resource?: LogEntry, data?: {} | string) { return new Entry(resource, data); } @@ -507,14 +533,16 @@ class Logging { getEntries(options?: GetEntriesRequest): Promise; getEntries(callback: GetEntriesCallback): void; getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; - async getEntries(opts?: GetEntriesRequest| - GetEntriesCallback): Promise { - const options = opts ? opts as GetEntriesRequest : {}; + async getEntries( + opts?: GetEntriesRequest | GetEntriesCallback + ): Promise { + const options = opts ? (opts as GetEntriesRequest) : {}; const reqOpts = extend( - { - orderBy: 'timestamp desc', - }, - options); + { + orderBy: 'timestamp desc', + }, + options + ); reqOpts.resourceNames = arrify(reqOpts.resourceNames!); this.projectId = await this.auth.getProjectId(); const resourceName = 'projects/' + this.projectId; @@ -524,10 +552,11 @@ class Logging { delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; const gaxOptions = extend( - { - autoPaginate: options!.autoPaginate, - }, - options!.gaxOptions); + { + autoPaginate: options!.autoPaginate, + }, + options!.gaxOptions + ); const resp = await this.loggingService.listLogEntries(reqOpts, gaxOptions); const [entries] = resp; if (entries) { @@ -584,28 +613,33 @@ class Logging { this.projectId = projectId; if (options.log) { if (options.filter) { - options.filter = `(${options.filter}) AND logName="${ - Log.formatName_(this.projectId, options.log)}"`; + options.filter = `(${ + options.filter + }) AND logName="${Log.formatName_(this.projectId, options.log)}"`; } else { - options.filter = - `logName="${Log.formatName_(this.projectId, options.log)}"`; + options.filter = `logName="${Log.formatName_( + this.projectId, + options.log + )}"`; } delete options.log; } const reqOpts = extend( - { - orderBy: 'timestamp desc', - }, - options); + { + orderBy: 'timestamp desc', + }, + options + ); reqOpts.resourceNames = arrify(reqOpts.resourceNames!); reqOpts.resourceNames.push(`projects/${this.projectId}`); delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions); + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); let gaxStream: ClientReadableStream; requestStream = streamEvents(through.obj()); @@ -618,18 +652,19 @@ class Logging { if (!(global as any).GCLOUD_SANDBOX_ENV) { requestStream.once('reading', () => { try { - gaxStream = - this.loggingService.listLogEntriesStream(reqOpts, gaxOptions); + gaxStream = this.loggingService.listLogEntriesStream( + reqOpts, + gaxOptions + ); } catch (error) { requestStream.destroy(error); return; } gaxStream - .on('error', - err => { - requestStream.destroy(err); - }) - .pipe(requestStream); + .on('error', err => { + requestStream.destroy(err); + }) + .pipe(requestStream); return; }); } @@ -697,9 +732,10 @@ class Logging { getSinks(options?: GetSinksRequest): Promise; getSinks(callback: GetSinksCallback): void; getSinks(options: GetSinksRequest, callback: GetSinksCallback): void; - async getSinks(opts?: GetSinksRequest| - GetSinksCallback): Promise { - const options = opts ? opts as GetSinksRequest : {}; + async getSinks( + opts?: GetSinksRequest | GetSinksCallback + ): Promise { + const options = opts ? (opts as GetSinksRequest) : {}; this.projectId = await this.auth.getProjectId(); const reqOpts = extend({}, options, { parent: 'projects/' + this.projectId, @@ -707,10 +743,11 @@ class Logging { delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions); + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); const resp = await this.configService.listSinks(reqOpts, gaxOptions); const [sinks] = resp; if (sinks) { @@ -777,10 +814,11 @@ class Logging { }); delete reqOpts.gaxOptions; const gaxOptions = extend( - { - autoPaginate: options.autoPaginate, - }, - options.gaxOptions); + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); let gaxStream: ClientReadableStream; requestStream = streamEvents(through.obj()); @@ -793,18 +831,19 @@ class Logging { if (!(global as any).GCLOUD_SANDBOX_ENV) { requestStream.once('reading', () => { try { - gaxStream = - this.configService.listSinksStream(reqOpts, gaxOptions); + gaxStream = this.configService.listSinksStream( + reqOpts, + gaxOptions + ); } catch (error) { requestStream.destroy(error); return; } gaxStream - .on('error', - err => { - requestStream.destroy(err); - }) - .pipe(requestStream); + .on('error', err => { + requestStream.destroy(err); + }) + .pipe(requestStream); return; }); } @@ -864,10 +903,12 @@ class Logging { */ // tslint:disable-next-line no-any request( - config: RequestConfig, callback?: RequestCallback) { + config: RequestConfig, + callback?: RequestCallback + ) { const self = this; const isStreamMode = !callback; - let gaxStream: ClientReadableStream; + let gaxStream: ClientReadableStream; let stream: Duplex; if (isStreamMode) { stream = streamEvents(through.obj()); @@ -895,8 +936,11 @@ class Logging { } let reqOpts = extend(true, {}, config.reqOpts); reqOpts = replaceProjectIdToken(reqOpts, projectId!); - const requestFn = - gaxClient[config.method].bind(gaxClient, reqOpts, config.gaxOpts); + const requestFn = gaxClient[config.method].bind( + gaxClient, + reqOpts, + config.gaxOpts + ); callback(null, requestFn); }); } @@ -925,11 +969,10 @@ class Logging { } gaxStream = requestFn!(); gaxStream - .on('error', - err => { - stream.destroy(err); - }) - .pipe(stream); + .on('error', err => { + stream.destroy(err); + }) + .pipe(stream); }); return; } diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 945f2952e9f..ea3caf2c549 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -39,7 +39,7 @@ export interface GetEntriesRequest { orderBy?: string; pageSize?: number; pageToken?: string; - resourceNames?: string[]|string; + resourceNames?: string[] | string; } export interface LogOptions { @@ -48,7 +48,7 @@ export interface LogOptions { export type ApiResponse = [Response]; export interface ApiResponseCallback { - (err: Error|null, apiResponse?: Response): void; + (err: Error | null, apiResponse?: Response): void; } export type MonitoredResource = google.api.IMonitoredResource; @@ -66,7 +66,7 @@ export enum Severity { warning, notice, info, - debug + debug, } export type SeverityNames = keyof typeof Severity; @@ -75,7 +75,7 @@ export type SeverityNames = keyof typeof Severity; // classes. type LogSeverityFunctions = { // FIXME: the following can be made more precise. - [P in SeverityNames]: Function; + [P in SeverityNames]: Function }; /** @@ -145,21 +145,27 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - alert(entry: Entry|Entry[], options?: WriteOptions): Promise; + alert(entry: Entry | Entry[], options?: WriteOptions): Promise; alert( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - alert(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + alert(entry: Entry | Entry[], callback: ApiResponseCallback): void; alert( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write( - Log.assignSeverityToEntries_(entry, 'ALERT'), options, callback!); + Log.assignSeverityToEntries_(entry, 'ALERT'), + options, + callback! + ); } /** @@ -190,19 +196,25 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - critical(entry: Entry|Entry[], options?: WriteOptions): Promise; critical( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - critical(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options?: WriteOptions + ): Promise; critical( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + critical(entry: Entry | Entry[], callback: ApiResponseCallback): void; + critical( + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); this.write(entries, options, callback!); } @@ -235,21 +247,27 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - debug(entry: Entry|Entry[], options?: WriteOptions): Promise; + debug(entry: Entry | Entry[], options?: WriteOptions): Promise; debug( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - debug(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + debug(entry: Entry | Entry[], callback: ApiResponseCallback): void; debug( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write( - Log.assignSeverityToEntries_(entry, 'DEBUG'), options, callback!); + Log.assignSeverityToEntries_(entry, 'DEBUG'), + options, + callback! + ); } /** @@ -296,23 +314,26 @@ class Log implements LogSeverityFunctions { delete(gaxOptions?: CallOptions): Promise; delete(gaxOptions: CallOptions, callback: DeleteCallback): void; delete(callback: DeleteCallback): void; - delete(optionsOrCallback?: CallOptions|DeleteCallback, cb?: DeleteCallback): - void|Promise { + delete( + optionsOrCallback?: CallOptions | DeleteCallback, + cb?: DeleteCallback + ): void | Promise { const gaxOptions = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const reqOpts = { logName: this.formattedName_, }; this.logging.request( - { - client: 'LoggingServiceV2Client', - method: 'deleteLog', - reqOpts, - gaxOpts: gaxOptions, - }, - callback); + { + client: 'LoggingServiceV2Client', + method: 'deleteLog', + reqOpts, + gaxOpts: gaxOptions, + }, + callback + ); } /** @@ -343,19 +364,25 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - emergency(entry: Entry|Entry[], options?: WriteOptions): Promise; emergency( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - emergency(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options?: WriteOptions + ): Promise; + emergency( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + emergency(entry: Entry | Entry[], callback: ApiResponseCallback): void; emergency( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); this.write(entries, options, callback!); } @@ -411,9 +438,9 @@ class Log implements LogSeverityFunctions { * // } */ entry(metadata?: LogEntry): Entry; - entry(data?: string|{}): Entry; - entry(metadata?: LogEntry, data?: string|{}): Entry; - entry(metadataOrData?: LogEntry|string|{}, data?: string|{}) { + entry(data?: string | {}): Entry; + entry(metadata?: LogEntry, data?: string | {}): Entry; + entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; if (!data) { data = metadataOrData as string | {}; @@ -452,21 +479,27 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - error(entry: Entry|Entry[], options?: WriteOptions): Promise; + error(entry: Entry | Entry[], options?: WriteOptions): Promise; error( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - error(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + error(entry: Entry | Entry[], callback: ApiResponseCallback): void; error( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write( - Log.assignSeverityToEntries_(entry, 'ERROR'), options, callback!); + Log.assignSeverityToEntries_(entry, 'ERROR'), + options, + callback! + ); } /** @@ -514,14 +547,16 @@ class Log implements LogSeverityFunctions { getEntries(options?: GetEntriesRequest): Promise; getEntries(callback: GetEntriesCallback): void; getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; - async getEntries(opts?: GetEntriesRequest| - GetEntriesCallback): Promise { + async getEntries( + opts?: GetEntriesRequest | GetEntriesCallback + ): Promise { const options = extend({}, opts as GetEntriesRequest); this.logging.projectId = await this.logging.auth.getProjectId(); this.formattedName_ = Log.formatName_(this.logging.projectId, this.name); if (options.filter) { - options.filter = - `(${options.filter}) AND logName="${this.formattedName_}"`; + options.filter = `(${options.filter}) AND logName="${ + this.formattedName_ + }"`; } else { options.filter = `logName="${this.formattedName_}"`; } @@ -564,10 +599,11 @@ class Log implements LogSeverityFunctions { */ getEntriesStream(options: GetEntriesRequest) { options = extend( - { - log: this.name, - }, - options); + { + log: this.name, + }, + options + ); return this.logging.getEntriesStream(options); } @@ -599,19 +635,22 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - info(entry: Entry|Entry[], options?: WriteOptions): Promise; + info(entry: Entry | Entry[], options?: WriteOptions): Promise; info( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - info(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + info(entry: Entry | Entry[], callback: ApiResponseCallback): void; info( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write(Log.assignSeverityToEntries_(entry, 'INFO'), options, callback!); } @@ -643,21 +682,27 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - notice(entry: Entry|Entry[], options?: WriteOptions): Promise; + notice(entry: Entry | Entry[], options?: WriteOptions): Promise; notice( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - notice(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + notice(entry: Entry | Entry[], callback: ApiResponseCallback): void; notice( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write( - Log.assignSeverityToEntries_(entry, 'NOTICE'), options, callback!); + Log.assignSeverityToEntries_(entry, 'NOTICE'), + options, + callback! + ); } /** @@ -688,21 +733,27 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - warning(entry: Entry|Entry[], options?: WriteOptions): Promise; + warning(entry: Entry | Entry[], options?: WriteOptions): Promise; warning( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - warning(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + warning(entry: Entry | Entry[], callback: ApiResponseCallback): void; warning( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; this.write( - Log.assignSeverityToEntries_(entry, 'WARNING'), options, callback!); + Log.assignSeverityToEntries_(entry, 'WARNING'), + options, + callback! + ); } /** @@ -796,19 +847,22 @@ class Log implements LogSeverityFunctions { * region_tag:logging_write_log_entry_advanced * Another example: */ - write(entry: Entry|Entry[], options?: WriteOptions): Promise; + write(entry: Entry | Entry[], options?: WriteOptions): Promise; write( - entry: Entry|Entry[], options: WriteOptions, - callback: ApiResponseCallback): void; - write(entry: Entry|Entry[], callback: ApiResponseCallback): void; + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + write(entry: Entry | Entry[], callback: ApiResponseCallback): void; write( - entry: Entry|Entry[], - optionsOrCallback?: WriteOptions|ApiResponseCallback, - cb?: ApiResponseCallback): void|Promise { + entry: Entry | Entry[], + optionsOrCallback?: WriteOptions | ApiResponseCallback, + cb?: ApiResponseCallback + ): void | Promise { const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; const self = this; if (options.resource) { @@ -819,12 +873,12 @@ class Log implements LogSeverityFunctions { } else if (this.logging.detectedResource) { writeWithResource(this.logging.detectedResource); } else { - getDefaultResource(this.logging.auth).then((resource) => { + getDefaultResource(this.logging.auth).then(resource => { this.logging.detectedResource = resource; writeWithResource(resource); }); } - function writeWithResource(resource: {}|null) { + function writeWithResource(resource: {} | null) { let decoratedEntries; try { decoratedEntries = self.decorateEntries_(arrify(entry) as Entry[]); @@ -832,21 +886,23 @@ class Log implements LogSeverityFunctions { // Ignore errors (the API will speak up if it has an issue). } const reqOpts = extend( - { - logName: self.formattedName_, - entries: decoratedEntries, - resource, - }, - options); + { + logName: self.formattedName_, + entries: decoratedEntries, + resource, + }, + options + ); delete reqOpts.gaxOptions; self.logging.request( - { - client: 'LoggingServiceV2Client', - method: 'writeLogEntries', - reqOpts, - gaxOpts: options.gaxOptions, - }, - callback); + { + client: 'LoggingServiceV2Client', + method: 'writeLogEntries', + reqOpts, + gaxOpts: options.gaxOptions, + }, + callback + ); } } @@ -878,8 +934,10 @@ class Log implements LogSeverityFunctions { * @param {object|object[]} entries - Log entries. * @param {string} severity - The desired severity level. */ - static assignSeverityToEntries_(entries: Entry|Entry[], severity: string): - Entry[] { + static assignSeverityToEntries_( + entries: Entry | Entry[], + severity: string + ): Entry[] { return (arrify(entries) as Entry[]).map(entry => { const metadata = extend(true, {}, entry.metadata, { severity, @@ -920,9 +978,19 @@ promisifyAll(Log, { callbackifyAll(Log, { exclude: [ - 'alert', 'critical', 'debug', 'delete', 'emergency', 'entry', 'error', - 'getEntriesStream', 'info', 'notice', 'warning', 'write' - ] + 'alert', + 'critical', + 'debug', + 'delete', + 'emergency', + 'entry', + 'error', + 'getEntriesStream', + 'info', + 'notice', + 'warning', + 'write', + ], }); /** diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 4c7044da744..2a8e6c62bf8 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -23,7 +23,7 @@ import {ServiceContext} from './index'; const readFile = pify(fs.readFile); -function zoneFromQualifiedZone(qualified: string): string|undefined { +function zoneFromQualifiedZone(qualified: string): string | undefined { // Some parsing is necessary. Metadata service returns a fully // qualified zone name: 'projects/{projectId}/zones/{zone}'. Logging // wants just the zone part. @@ -64,7 +64,7 @@ export async function getGAEDescriptor() { labels: { module_id: process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME, version_id: process.env.GAE_VERSION, - zone + zone, }, }; } @@ -93,7 +93,7 @@ export async function getGCEDescriptor() { } export const KUBERNETES_NAMESPACE_ID_PATH = - '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; + '/var/run/secrets/kubernetes.io/serviceaccount/namespace'; /** * Create a descriptor for Google Container Engine. @@ -115,7 +115,8 @@ export async function getGKEDescriptor() { namespace = await readFile(KUBERNETES_NAMESPACE_ID_PATH, 'utf8'); } catch (err) { throw new Error( - `Error reading ${KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}`); + `Error reading ${KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}` + ); } return { @@ -170,8 +171,9 @@ export async function getDefaultResource(auth: GoogleAuth) { * the [official documentation]{@link * https://cloud.google.com/error-reporting/reference/rest/v1beta1/ServiceContext}. */ -export async function detectServiceContext(auth: GoogleAuth): - Promise { +export async function detectServiceContext( + auth: GoogleAuth +): Promise { const env = await auth.getEnv(); switch (env) { case GCPEnv.APP_ENGINE: diff --git a/handwritten/logging/src/middleware/context.ts b/handwritten/logging/src/middleware/context.ts index 78ecfd4893b..9eb3e461f41 100644 --- a/handwritten/logging/src/middleware/context.ts +++ b/handwritten/logging/src/middleware/context.ts @@ -17,7 +17,7 @@ import * as context from '@opencensus/propagation-stackdriver'; import * as http from 'http'; -export type HeaderWrapper = context.HeaderGetter&context.HeaderSetter; +export type HeaderWrapper = context.HeaderGetter & context.HeaderSetter; export function makeHeaderWrapper(req: http.IncomingMessage): HeaderWrapper { const wrapper = { @@ -26,13 +26,14 @@ export function makeHeaderWrapper(req: http.IncomingMessage): HeaderWrapper { }, getHeader(name: string) { return req.headers[name]; - } + }, }; return wrapper; } -export function getOrInjectContext(headerWrapper: HeaderWrapper): - context.SpanContext { +export function getOrInjectContext( + headerWrapper: HeaderWrapper +): context.SpanContext { let spanContext = context.extract(headerWrapper); if (spanContext) { return spanContext; diff --git a/handwritten/logging/src/middleware/express/make-http-request.ts b/handwritten/logging/src/middleware/express/make-http-request.ts index 4698bf4466f..43316365cb3 100644 --- a/handwritten/logging/src/middleware/express/make-http-request.ts +++ b/handwritten/logging/src/middleware/express/make-http-request.ts @@ -19,18 +19,20 @@ import * as http from 'http'; import {StackdriverHttpRequest} from '../../http-request'; export function makeHttpRequestData( - req: http.IncomingMessage, res: http.ServerResponse, - latencyMilliseconds: number): StackdriverHttpRequest { + req: http.IncomingMessage, + res: http.ServerResponse, + latencyMilliseconds: number +): StackdriverHttpRequest { return { status: res.statusCode, requestUrl: req.url, requestMethod: req.method, userAgent: req.headers['user-agent'], responseSize: - (res.getHeader && Number(res.getHeader('Content-Length'))) || 0, + (res.getHeader && Number(res.getHeader('Content-Length'))) || 0, latency: { seconds: Math.floor(latencyMilliseconds / 1e3), - nanos: Math.floor((latencyMilliseconds % 1e3) * 1e6) - } + nanos: Math.floor((latencyMilliseconds % 1e3) * 1e6), + }, }; } diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index fcd36454a0e..f7a3a504f2a 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -42,11 +42,15 @@ interface AnnotatedRequestType extends http.IncomingMessage { * request log. */ export function makeMiddleware( - projectId: string, makeChildLogger: (trace: string) => LoggerType, - emitRequestLog?: (httpRequest: StackdriverHttpRequest, trace: string) => - void) { - return (req: http.IncomingMessage, res: http.ServerResponse, - next: Function) => { + projectId: string, + makeChildLogger: (trace: string) => LoggerType, + emitRequestLog?: (httpRequest: StackdriverHttpRequest, trace: string) => void +) { + return ( + req: http.IncomingMessage, + res: http.ServerResponse, + next: Function + ) => { // TODO(ofrobots): use high-resolution timer. const requestStartMs = Date.now(); diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 7f0d703e647..2c6e5f569e3 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -17,10 +17,17 @@ import {callbackifyAll, promisifyAll} from '@google-cloud/promisify'; import * as extend from 'extend'; import {CallOptions} from 'google-gax'; -import {CreateSinkCallback, CreateSinkRequest, DeleteCallback, DeleteResponse, Logging, LogSink} from '.'; +import { + CreateSinkCallback, + CreateSinkRequest, + DeleteCallback, + DeleteResponse, + Logging, + LogSink, +} from '.'; export interface SinkMetadataCallback { - (error: (Error|null), response?: LogSink): void; + (error: Error | null, response?: LogSink): void; } export type SinkMetadataResponse = [LogSink]; @@ -151,15 +158,18 @@ class Sink { delete(gaxOptions?: CallOptions): Promise; delete(callback: DeleteCallback): void; delete(gaxOptions: CallOptions, callback: DeleteCallback): void; - async delete(gaxOptions?: CallOptions| - DeleteCallback): Promise { + async delete( + gaxOptions?: CallOptions | DeleteCallback + ): Promise { const projectId = await this.logging.auth.getProjectId(); this.formattedName_ = 'projects/' + projectId + '/sinks/' + this.name; const reqOpts = { sinkName: this.formattedName_, }; return this.logging.configService.deleteSink( - reqOpts, gaxOptions as CallOptions); + reqOpts, + gaxOptions as CallOptions + ); } /** @@ -205,8 +215,9 @@ class Sink { getMetadata(gaxOptions?: CallOptions): Promise; getMetadata(callback: SinkMetadataCallback): void; getMetadata(gaxOptions: CallOptions, callback: SinkMetadataCallback): void; - async getMetadata(gaxOptions?: CallOptions| - SinkMetadataCallback): Promise { + async getMetadata( + gaxOptions?: CallOptions | SinkMetadataCallback + ): Promise { const projectId = await this.logging.auth.getProjectId(); this.formattedName_ = 'projects/' + projectId + '/sinks/' + this.name; const reqOpts = { @@ -214,7 +225,9 @@ class Sink { }; [this.metadata] = await this.logging.configService.getSink( - reqOpts, gaxOptions as CallOptions); + reqOpts, + gaxOptions as CallOptions + ); return [this.metadata!]; } @@ -257,11 +270,9 @@ class Sink { setFilter(filter: string): Promise; setFilter(filter: string, callback: SinkMetadataCallback): void; setFilter(filter: string): Promise { - return this.setMetadata( - { - filter, - }, - ); + return this.setMetadata({ + filter, + }); } /** @@ -320,7 +331,9 @@ class Sink { }; delete reqOpts.sink.gaxOptions; [this.metadata] = await this.logging.configService.updateSink( - reqOpts, metadata.gaxOptions); + reqOpts, + metadata.gaxOptions + ); return [this.metadata!]; } } diff --git a/handwritten/logging/system-test/fixtures/sample/package.json b/handwritten/logging/system-test/fixtures/sample/package.json index cbd4ba415a3..a7b5a4eacbc 100644 --- a/handwritten/logging/system-test/fixtures/sample/package.json +++ b/handwritten/logging/system-test/fixtures/sample/package.json @@ -18,6 +18,6 @@ "devDependencies": { "@types/node": "^10.3.0", "typescript": "^3.0.0", - "gts": "^0.9.0" + "gts": "^1.0.0" } } diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index e22f91b606a..584f54b17b1 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -21,7 +21,7 @@ import * as tmp from 'tmp'; import {promisify} from 'util'; const keep = false; -const mvp = promisify(mv) as {} as (...args: string[]) => Promise; +const mvp = (promisify(mv) as {}) as (...args: string[]) => Promise; const ncpp = promisify(ncp); const stagingDir = tmp.dirSync({keep, unsafeCleanup: true}); const stagingPath = stagingDir.name; @@ -37,12 +37,14 @@ describe('📦 pack and install', () => { const tarball = `google-cloud-logging-${pkg.version}.tgz`; await mvp(tarball, `${stagingPath}/logging.tgz`); await ncpp('system-test/fixtures/sample', `${stagingPath}/`); - await execa( - 'npm', ['install', '--unsafe-perm'], - {cwd: `${stagingPath}/`, stdio: 'inherit'}); - await execa( - 'node', ['--throw-deprecation', 'build/src/index.js'], - {cwd: `${stagingPath}/`, stdio: 'inherit'}); + await execa('npm', ['install', '--unsafe-perm'], { + cwd: `${stagingPath}/`, + stdio: 'inherit', + }); + await execa('node', ['--throw-deprecation', 'build/src/index.js'], { + cwd: `${stagingPath}/`, + stdio: 'inherit', + }); }); /** diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 5cd8172d26a..2dcf73d6638 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -32,9 +32,9 @@ import {Logging, Sink} from '../src'; // block all attempts to chat with the metadata server (kokoro runs on GCE) nock(HOST_ADDRESS) - .get(() => true) - .replyWithError({code: 'ENOTFOUND'}) - .persist(); + .get(() => true) + .replyWithError({code: 'ENOTFOUND'}) + .persist(); describe('Logging', () => { let PROJECT_ID: string; @@ -53,10 +53,12 @@ describe('Logging', () => { before(async () => { await Promise.all([ - bucket.create(), dataset.create(), topic.create(), + bucket.create(), + dataset.create(), + topic.create(), logging.auth.getProjectId().then(projectId => { PROJECT_ID = projectId; - }) + }), ]); }); @@ -64,22 +66,27 @@ describe('Logging', () => { const oneHourAgo = new Date(); oneHourAgo.setHours(oneHourAgo.getHours() - 1); - await Promise.all( - [deleteBuckets(), deleteDatasets(), deleteTopics(), deleteSinks()]); + await Promise.all([ + deleteBuckets(), + deleteDatasets(), + deleteTopics(), + deleteSinks(), + ]); async function deleteBuckets() { const [buckets] = await storage.getBuckets({ prefix: TESTS_PREFIX, }); - return Promise.all(buckets - .filter(bucket => { - return new Date(bucket.metadata.timeCreated) < - oneHourAgo; - }) - .map(async bucket => { - await bucket.deleteFiles(); - await bucket.delete(); - })); + return Promise.all( + buckets + .filter(bucket => { + return new Date(bucket.metadata.timeCreated) < oneHourAgo; + }) + .map(async bucket => { + await bucket.deleteFiles(); + await bucket.delete(); + }) + ); } async function deleteDatasets() { @@ -96,19 +103,20 @@ describe('Logging', () => { async function getAndDelete(method: Function) { const [objects] = await method(); - return Promise.all(objects - .filter((o: ServiceObject) => { - // tslint:disable-next-line no-any - const name = (o as any).name || o.id; - - if (!name.startsWith(TESTS_PREFIX)) { - return false; - } - - return getDateFromGeneratedName(name) < - oneHourAgo; - }) - .map((o: ServiceObject) => o.delete())); + return Promise.all( + objects + .filter((o: ServiceObject) => { + // tslint:disable-next-line no-any + const name = (o as any).name || o.id; + + if (!name.startsWith(TESTS_PREFIX)) { + return false; + } + + return getDateFromGeneratedName(name) < oneHourAgo; + }) + .map((o: ServiceObject) => o.delete()) + ); } }); @@ -130,8 +138,10 @@ describe('Logging', () => { // The projectId may have been replaced depending on how the system // tests are being run, so let's not care about that. - apiResponse.destination = - apiResponse.destination!.replace(/projects\/[^/]*\//, ''); + apiResponse.destination = apiResponse.destination!.replace( + /projects\/[^/]*\//, + '' + ); assert.strictEqual(apiResponse.destination, destination); }); @@ -143,8 +153,9 @@ describe('Logging', () => { // The projectId may have been replaced depending on how the system // tests are being run, so let's not care about that. assert.strictEqual( - apiResponse.destination!.replace(/projects\/[^/]*\//, ''), - destination.replace(/projects\/[^/]*\//, '')); + apiResponse.destination!.replace(/projects\/[^/]*\//, ''), + destination.replace(/projects\/[^/]*\//, '') + ); }); describe('metadata', () => { @@ -180,24 +191,26 @@ describe('Logging', () => { }); it('should list sinks as a stream', done => { - const logstream: Duplex = logging.getSinksStream({pageSize: 1}) - .on('error', done) - .once('data', () => { - logstream.end(); - done(); - }); + const logstream: Duplex = logging + .getSinksStream({pageSize: 1}) + .on('error', done) + .once('data', () => { + logstream.end(); + done(); + }); }); it('should get metadata', done => { - logging.getSinksStream({pageSize: 1}) - .on('error', done) - .once('data', (sink: Sink) => { - sink.getMetadata((err, metadata) => { - assert.ifError(err); - assert.strictEqual(typeof metadata, 'object'); - done(); - }); + logging + .getSinksStream({pageSize: 1}) + .on('error', done) + .once('data', (sink: Sink) => { + sink.getMetadata((err, metadata) => { + assert.ifError(err); + assert.strictEqual(typeof metadata, 'object'); + done(); }); + }); }); }); }); @@ -277,7 +290,7 @@ describe('Logging', () => { } }); - it('should list log entries', (done) => { + it('should list log entries', done => { const {log, logEntries} = getTestLog(); log.write(logEntries, options, err => { @@ -298,13 +311,13 @@ describe('Logging', () => { assert.ifError(err); const logstream: Duplex = logging - .getEntriesStream({ - autoPaginate: false, - pageSize: 1, - }) - .on('error', done) - .once('data', () => logstream.end()) - .on('end', done); + .getEntriesStream({ + autoPaginate: false, + pageSize: 1, + }) + .on('error', done) + .once('data', () => logstream.end()) + .on('end', done); }); }); @@ -315,7 +328,7 @@ describe('Logging', () => { log.write(logEntries, options, done); }); - it('should list log entries', (done) => { + it('should list log entries', done => { getEntriesFromLog(log, (err, entries) => { assert.ifError(err); assert.strictEqual(entries.length, logEntries.length); @@ -324,15 +337,16 @@ describe('Logging', () => { }); it('should list log entries as a stream', done => { - const logstream = log.getEntriesStream({ - autoPaginate: false, - pageSize: 1, - }) - .on('error', done) - .once('data', () => { - logstream.end(); - done(); - }); + const logstream = log + .getEntriesStream({ + autoPaginate: false, + pageSize: 1, + }) + .on('error', done) + .once('data', () => { + logstream.end(); + done(); + }); }); }); @@ -341,10 +355,10 @@ describe('Logging', () => { log.write(logEntries[0], options, done); }); - it('should write multiple entries to a log', (done) => { + it('should write multiple entries to a log', done => { const {log, logEntries} = getTestLog(); - log.write(logEntries, options, (err) => { + log.write(logEntries, options, err => { assert.ifError(err); getEntriesFromLog(log, (err, entries) => { @@ -385,11 +399,7 @@ describe('Logging', () => { getEntriesFromLog(log, (err, entries) => { assert.ifError(err); - assert.deepStrictEqual(entries!.map(x => x.data), [ - '3', - '2', - '1', - ]); + assert.deepStrictEqual(entries!.map(x => x.data), ['3', '2', '1']); done(); }); }); @@ -497,16 +507,18 @@ describe('Logging', () => { it('should write a log with camelcase resource label keys', done => { const {log, logEntries} = getTestLog(); log.write( - logEntries, { - resource: { - type: 'gce_instance', - labels: { - zone: 'global', - instanceId: '3', - }, + logEntries, + { + resource: { + type: 'gce_instance', + labels: { + zone: 'global', + instanceId: '3', }, }, - done); + }, + done + ); }); it('should write to a log with alert helper', done => { @@ -551,7 +563,9 @@ describe('Logging', () => { }); function generateName() { - return `${TESTS_PREFIX}-${Date.now()}-${uuid().split('-').pop()}`; + return `${TESTS_PREFIX}-${Date.now()}-${uuid() + .split('-') + .pop()}`; } // Parse the time the resource was created using the resource id diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 7c274f890aa..1213326c3c1 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -26,7 +26,7 @@ class FakeGrpcService { static objToStruct_?: Function; } -let fakeEventIdNewOverride: Function|null; +let fakeEventIdNewOverride: Function | null; class FakeEventId { new() { @@ -45,11 +45,11 @@ describe('Entry', () => { before(() => { Entry = proxyquire('../src/entry.js', { - '@google-cloud/common-grpc': { - Service: FakeGrpcService, - }, - eventid: FakeEventId, - }).Entry; + '@google-cloud/common-grpc': { + Service: FakeGrpcService, + }, + eventid: FakeEventId, + }).Entry; }); beforeEach(() => { @@ -174,15 +174,16 @@ describe('Entry', () => { const input = {}; const converted = {}; - sandbox.stub(FakeGrpcService, 'objToStruct_') - .callsFake((obj, options) => { - assert.strictEqual(obj, input); - assert.deepStrictEqual(options, { - removeCircular: false, - stringify: true, - }); - return converted; + sandbox + .stub(FakeGrpcService, 'objToStruct_') + .callsFake((obj, options) => { + assert.strictEqual(obj, input); + assert.deepStrictEqual(options, { + removeCircular: false, + stringify: true, }); + return converted; + }); entry.data = input; const json = entry.toJSON(); @@ -190,11 +191,12 @@ describe('Entry', () => { }); it('should pass removeCircular to objToStruct_', done => { - sandbox.stub(FakeGrpcService, 'objToStruct_') - .callsFake((obj, options) => { - assert.strictEqual(options.removeCircular, true); - done(); - }); + sandbox + .stub(FakeGrpcService, 'objToStruct_') + .callsFake((obj, options) => { + assert.strictEqual(options.removeCircular, true); + done(); + }); entry.data = {}; entry.toJSON({removeCircular: true}); }); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 4d0dedf4a74..459253f6197 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -46,14 +46,14 @@ const fakePaginator = { }, }; -let googleAuthOverride: Function|null; +let googleAuthOverride: Function | null; function fakeGoogleAuth() { return (googleAuthOverride || util.noop).apply(null, arguments); } -let isCustomTypeOverride: Function|null; +let isCustomTypeOverride: Function | null; let callbackified = false; -let replaceProjectIdTokenOverride: Function|null; +let replaceProjectIdTokenOverride: Function | null; const fakeUtil = extend({}, util, { isCustomType() { if (isCustomTypeOverride) { @@ -117,20 +117,20 @@ describe('Logging', () => { before(() => { Logging = proxyquire('../../', { - '@google-cloud/common-grpc': { - util: fakeUtil, - }, - '@google-cloud/promisify': fakeCallbackify, - '@google-cloud/paginator': fakePaginator, - '@google-cloud/projectify': fakeProjectify, - 'google-auth-library': { - GoogleAuth: fakeGoogleAuth, - }, - './log': {Log: FakeLog}, - './entry': {Entry: FakeEntry}, - './sink': {Sink: FakeSink}, - './v2': fakeV2, - }).Logging; + '@google-cloud/common-grpc': { + util: fakeUtil, + }, + '@google-cloud/promisify': fakeCallbackify, + '@google-cloud/paginator': fakePaginator, + '@google-cloud/projectify': fakeProjectify, + 'google-auth-library': { + GoogleAuth: fakeGoogleAuth, + }, + './log': {Log: FakeLog}, + './entry': {Entry: FakeEntry}, + './sink': {Sink: FakeSink}, + './v2': fakeV2, + }).Logging; }); beforeEach(() => { @@ -160,7 +160,7 @@ describe('Logging', () => { } it('should extend the correct methods', () => { - assert(extended); // See `fakePaginator.extend` + assert(extended); // See `fakePaginator.extend` }); it('should callbackify all the things', () => { @@ -180,14 +180,16 @@ describe('Logging', () => { googleAuthOverride = options_ => { assert.deepStrictEqual( - options_, - extend( - { - libName: 'gccl', - libVersion: PKG.version, - scopes: EXPECTED_SCOPES, - }, - options)); + options_, + extend( + { + libName: 'gccl', + libVersion: PKG.version, + scopes: EXPECTED_SCOPES, + }, + options + ) + ); return fakeGoogleAuthInstance; }; @@ -206,14 +208,16 @@ describe('Logging', () => { assert.notStrictEqual(logging.options, options); assert.deepStrictEqual( - logging.options, - extend( - { - libName: 'gccl', - libVersion: PKG.version, - scopes: EXPECTED_SCOPES, - }, - options)); + logging.options, + extend( + { + libName: 'gccl', + libVersion: PKG.version, + scopes: EXPECTED_SCOPES, + }, + options + ) + ); }); it('should set the projectId', () => { @@ -259,7 +263,7 @@ describe('Logging', () => { return type === 'bigquery/dataset'; }; - logging.setAclForDataset_ = async (config) => { + logging.setAclForDataset_ = async config => { assert.strictEqual(config, CONFIG); }; @@ -278,7 +282,7 @@ describe('Logging', () => { return type === 'pubsub/topic'; }; - logging.setAclForTopic_ = async (config) => { + logging.setAclForTopic_ = async config => { assert.strictEqual(config, CONFIG); }; @@ -297,7 +301,7 @@ describe('Logging', () => { return type === 'storage/bucket'; }; - logging.setAclForBucket_ = async (config) => { + logging.setAclForBucket_ = async config => { assert.strictEqual(config, CONFIG); }; @@ -357,8 +361,9 @@ describe('Logging', () => { throw error; }; - logging.createSink(SINK_NAME, {}) - .then(util.noop, (err) => assert.deepStrictEqual(err, error)); + logging + .createSink(SINK_NAME, {}) + .then(util.noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -431,11 +436,13 @@ describe('Logging', () => { logging.loggingService.listLogEntries = async (reqOpts, gaxOpts) => { assert.deepStrictEqual( - reqOpts, extend(options, { - filter: 'test', - orderBy: 'timestamp desc', - resourceNames: ['projects/' + logging.projectId], - })); + reqOpts, + extend(options, { + filter: 'test', + orderBy: 'timestamp desc', + resourceNames: ['projects/' + logging.projectId], + }) + ); assert.deepStrictEqual(gaxOpts, { autoPaginate: undefined, @@ -451,7 +458,7 @@ describe('Logging', () => { resourceNames: ['projects/' + logging.projectId], }; - logging.loggingService.listLogEntries = async (reqOpts) => { + logging.loggingService.listLogEntries = async reqOpts => { assert.deepStrictEqual(reqOpts.resourceNames, [ 'projects/' + logging.projectId, ]); @@ -466,7 +473,7 @@ describe('Logging', () => { orderBy: 'timestamp asc', }; - logging.loggingService.listLogEntries = async (reqOpts) => { + logging.loggingService.listLogEntries = async reqOpts => { assert.deepStrictEqual(reqOpts.orderBy, options.orderBy); return [[]]; }; @@ -508,17 +515,20 @@ describe('Logging', () => { }); it('should reject promise with error', () => { - logging.getEntries().then( - util.noop, (err) => assert.strictEqual(err, error)); + logging + .getEntries() + .then(util.noop, err => assert.strictEqual(err, error)); }); }); describe('success', () => { - const expectedResponse = [[ - { - logName: 'syslog', - }, - ]]; + const expectedResponse = [ + [ + { + logName: 'syslog', + }, + ], + ]; beforeEach(() => { logging.loggingService.listLogEntries = async () => { @@ -586,9 +596,12 @@ describe('Logging', () => { orderBy: 'timestamp desc', a: 'b', c: 'd', - filter: `logName="${ - ['projects', PROJECT_ID, 'logs', encodeURIComponent(logName)] - .join('/')}"`, + filter: `logName="${[ + 'projects', + PROJECT_ID, + 'logs', + encodeURIComponent(logName), + ].join('/')}"`, }); assert.deepStrictEqual(gaxOpts, { @@ -610,10 +623,11 @@ describe('Logging', () => { it('should add logName filter to user provided filter', done => { const logName = 'log-name'; const OPTIONS_WITH_FILTER = extend( - { - filter: 'custom filter', - }, - OPTIONS); + { + filter: 'custom filter', + }, + OPTIONS + ); logging = new LOGGING({projectId: PROJECT_ID}); logging.loggingService.listLogEntriesStream = (reqOpts, gaxOpts) => { assert.deepStrictEqual(reqOpts, { @@ -621,9 +635,12 @@ describe('Logging', () => { orderBy: 'timestamp desc', a: 'b', c: 'd', - filter: `(${OPTIONS_WITH_FILTER.filter}) AND logName="${ - ['projects', PROJECT_ID, 'logs', encodeURIComponent(logName)] - .join('/')}"`, + filter: `(${OPTIONS_WITH_FILTER.filter}) AND logName="${[ + 'projects', + PROJECT_ID, + 'logs', + encodeURIComponent(logName), + ].join('/')}"`, }); assert.deepStrictEqual(gaxOpts, { @@ -649,7 +666,7 @@ describe('Logging', () => { }; const stream = logging.getEntriesStream(OPTIONS); stream.emit('reading'); - stream.once('error', (err) => { + stream.once('error', err => { assert.strictEqual(err, error); done(); }); @@ -659,7 +676,7 @@ describe('Logging', () => { const error = new Error('Error.'); const stream = logging.getEntriesStream(OPTIONS); stream.emit('reading'); - stream.on('error', (err) => { + stream.on('error', err => { assert.strictEqual(err, error); done(); }); @@ -756,8 +773,9 @@ describe('Logging', () => { logging.configService.listSinks = async () => { throw error; }; - logging.getSinks(OPTIONS).then( - util.noop, (err) => assert.strictEqual(err, error)); + logging + .getSinks(OPTIONS) + .then(util.noop, err => assert.strictEqual(err, error)); }); }); @@ -842,7 +860,7 @@ describe('Logging', () => { }; const stream = logging.getSinksStream(OPTIONS); stream.emit('reading'); - stream.once('error', (err) => { + stream.once('error', err => { assert.strictEqual(err, error); done(); }); @@ -852,7 +870,7 @@ describe('Logging', () => { const error = new Error('Error.'); const stream = logging.getSinksStream(OPTIONS); stream.emit('reading'); - stream.on('error', (err) => { + stream.on('error', err => { assert.strictEqual(err, error); done(); }); @@ -1070,7 +1088,7 @@ describe('Logging', () => { it('should execute the request function', () => { logging.api[CONFIG.client][CONFIG.method] = (done, ...args) => { const callback = args.pop(); - callback(null, done); // so it ends the test + callback(null, done); // so it ends the test }; logging.request(CONFIG, assert.ifError); @@ -1194,7 +1212,7 @@ describe('Logging', () => { }); it('should add cloud-logs as an owner', async () => { - bucket.acl.owners.addGroup = async (entity) => { + bucket.acl.owners.addGroup = async entity => { assert.strictEqual(entity, 'cloud-logs@google.com'); }; @@ -1211,8 +1229,9 @@ describe('Logging', () => { }); it('should return error', () => { - logging.setAclForBucket_(CONFIG).then( - util.noop, (err) => assert.deepStrictEqual(err, error)); + logging + .setAclForBucket_(CONFIG) + .then(util.noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -1260,8 +1279,9 @@ describe('Logging', () => { }); it('should reject with error', () => { - logging.setAclForDataset_(CONFIG).then( - util.noop, (err) => assert.deepStrictEqual(err, error)); + logging + .setAclForDataset_(CONFIG) + .then(util.noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -1285,10 +1305,10 @@ describe('Logging', () => { }; const expectedAccess = - // tslint:disable-next-line no-any - ([] as any[]).slice.call(originalAccess).concat(access); + // tslint:disable-next-line no-any + ([] as any[]).slice.call(originalAccess).concat(access); - dataset.setMetadata = async (metadata) => { + dataset.setMetadata = async metadata => { assert.deepStrictEqual(apiResponse.access, originalAccess); assert.deepStrictEqual(metadata.access, expectedAccess); }; @@ -1307,8 +1327,9 @@ describe('Logging', () => { }); it('should reject with error', () => { - logging.setAclForDataset_(CONFIG).then( - util.noop, (err) => assert.deepStrictEqual(err, error)); + logging + .setAclForDataset_(CONFIG) + .then(util.noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -1365,8 +1386,9 @@ describe('Logging', () => { }); it('should throw error', () => { - logging.setAclForTopic_(CONFIG).then( - util.noop, (err) => assert.deepStrictEqual(err, error)); + logging + .setAclForTopic_(CONFIG) + .then(util.noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -1393,7 +1415,7 @@ describe('Logging', () => { const expectedBindings = ([] as any[]).slice.call(originalBindings); expectedBindings.push(binding); - topic.iam.setPolicy = async (policy) => { + topic.iam.setPolicy = async policy => { assert.strictEqual(policy, apiResponse); assert.deepStrictEqual(policy.bindings, expectedBindings); }; @@ -1412,8 +1434,9 @@ describe('Logging', () => { }); it('should throw error', () => { - logging.setAclForTopic_(CONFIG).then( - util.noop, (err) => assert.deepStrictEqual(err, error)); + logging + .setAclForTopic_(CONFIG) + .then(util.noop, err => assert.deepStrictEqual(err, error)); }); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 51325a32b87..2c69d4203eb 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -39,7 +39,7 @@ const originalGetDefaultResource = async () => { }; const fakeMetadata = { - getDefaultResource: originalGetDefaultResource + getDefaultResource: originalGetDefaultResource, }; describe('Log', () => { @@ -59,18 +59,20 @@ describe('Log', () => { let LOGGING; - let assignSeverityToEntriesOverride: Function|null = null; + let assignSeverityToEntriesOverride: Function | null = null; before(() => { Log = proxyquire('../src/log', { - '@google-cloud/promisify': fakePromisify, - './entry': {Entry}, - './metadata': fakeMetadata, - }).Log; + '@google-cloud/promisify': fakePromisify, + './entry': {Entry}, + './metadata': fakeMetadata, + }).Log; const assignSeverityToEntries_ = Log.assignSeverityToEntries_; Log.assignSeverityToEntries_ = (...args) => - (assignSeverityToEntriesOverride || assignSeverityToEntries_) - .apply(null, args); + (assignSeverityToEntriesOverride || assignSeverityToEntries_).apply( + null, + args + ); }); beforeEach(() => { @@ -136,18 +138,20 @@ describe('Log', () => { it('should assign severity to a single entry', () => { assert.deepStrictEqual( - Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) - .map(x => x.metadata) - .map(x => x.severity), - [SEVERITY]); + Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) + .map(x => x.metadata) + .map(x => x.severity), + [SEVERITY] + ); }); it('should assign severity property to multiple entries', () => { assert.deepStrictEqual( - Log.assignSeverityToEntries_(ENTRIES, SEVERITY) - .map(x => x.metadata) - .map(x => x.severity), - [SEVERITY, SEVERITY, SEVERITY]); + Log.assignSeverityToEntries_(ENTRIES, SEVERITY) + .map(x => x.metadata) + .map(x => x.severity), + [SEVERITY, SEVERITY, SEVERITY] + ); }); it('should not affect original array', () => { @@ -194,7 +198,7 @@ describe('Log', () => { assert.deepStrictEqual(config.gaxOpts, {}); - callback(); // done() + callback(); // done() }; log.delete(done); @@ -253,7 +257,7 @@ describe('Log', () => { }; it('should call Logging getEntries with defaults', async () => { - log.logging.getEntries = (options) => { + log.logging.getEntries = options => { assert.deepStrictEqual(options, EXPECTED_OPTIONS); }; @@ -267,10 +271,11 @@ describe('Log', () => { }; const expectedOptions = extend({}, options); - expectedOptions.filter = - `(${options.filter}) AND logName="${log.formattedName_}"`; + expectedOptions.filter = `(${options.filter}) AND logName="${ + log.formattedName_ + }"`; - log.logging.getEntries = (options_) => { + log.logging.getEntries = options_ => { assert.notDeepStrictEqual(options_, options); assert.deepStrictEqual(options_, expectedOptions); }; @@ -375,7 +380,9 @@ describe('Log', () => { log.logging.request = config => { assert.strictEqual( - config.reqOpts.resource, log.logging.detectedResource); + config.reqOpts.resource, + log.logging.detectedResource + ); done(); }; @@ -452,7 +459,7 @@ describe('Log', () => { it('should not require options', done => { log.logging.request = (config, callback) => { - callback(); // done() + callback(); // done() }; log.write(ENTRY, done); @@ -483,7 +490,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.alert(ENTRY, LABELS, done); }); @@ -507,7 +514,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.critical(ENTRY, LABELS, done); }); @@ -531,7 +538,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.debug(ENTRY, LABELS, done); }); @@ -555,7 +562,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.emergency(ENTRY, LABELS, done); }); @@ -581,7 +588,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.error(ENTRY, LABELS, done); @@ -610,7 +617,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.info(ENTRY, LABELS, done); @@ -639,7 +646,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.notice(ENTRY, LABELS, done); @@ -664,7 +671,7 @@ describe('Log', () => { log.write = (entry, labels, callback) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() + callback(); // done() }; log.warning(ENTRY, LABELS, done); }); @@ -698,7 +705,7 @@ describe('Log', () => { throw new Error('should not be called'); }; const entry = new Entry(); - entry.toJSON = () => toJSONResponse as {} as EntryJson; + entry.toJSON = () => (toJSONResponse as {}) as EntryJson; const decoratedEntries = log.decorateEntries_([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); }); diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 55b29faf1d0..d567d930636 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -26,9 +26,9 @@ let instanceOverride; const fakeGcpMetadata = { instance(path) { if (instanceOverride) { - const override = Array.isArray(instanceOverride) ? - instanceOverride.find(entry => entry.path === path) : - instanceOverride; + const override = Array.isArray(instanceOverride) + ? instanceOverride.find(entry => entry.path === path) + : instanceOverride; if (override.path) { assert.strictEqual(path, override.path); @@ -98,9 +98,12 @@ describe('metadata', () => { const GOOGLE_CLOUD_REGION = 'google-cloud-region'; const TARGET_KEYS = [ - 'FUNCTION_NAME', 'FUNCTION_REGION', 'K_SERVICE', 'GOOGLE_CLOUD_REGION' + 'FUNCTION_NAME', + 'FUNCTION_REGION', + 'K_SERVICE', + 'GOOGLE_CLOUD_REGION', ]; - const INITIAL_ENV: {[key: string]: string|undefined} = {}; + const INITIAL_ENV: {[key: string]: string | undefined} = {}; before(() => { for (const key of TARGET_KEYS) { @@ -169,8 +172,11 @@ describe('metadata', () => { const descriptor = await metadata.getGAEDescriptor(); assert.deepStrictEqual(descriptor, { type: 'gae_app', - labels: - {module_id: GAE_SERVICE, version_id: GAE_VERSION, zone: ZONE_ID}, + labels: { + module_id: GAE_SERVICE, + version_id: GAE_VERSION, + zone: ZONE_ID, + }, }); }); @@ -207,15 +213,15 @@ describe('metadata', () => { errorArg: FAKE_ERROR, }; - assertRejects(metadata.getGKEDescriptor(), (err) => err === FAKE_ERROR); + assertRejects(metadata.getGKEDescriptor(), err => err === FAKE_ERROR); }); it('should throw error when read of namespace file fails', async () => { readFileShouldError = true; - assertRejects( - metadata.getGKEDescriptor(), - (err) => err.message.includes(FAKE_READFILE_ERROR_MESSAGE)); + assertRejects(metadata.getGKEDescriptor(), err => + err.message.includes(FAKE_READFILE_ERROR_MESSAGE) + ); }); }); @@ -235,7 +241,7 @@ describe('metadata', () => { async getEnv() { called = true; return null; - } + }, }; await metadata.getDefaultResource(fakeAuth); assert.ok(called); @@ -257,16 +263,16 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.APP_ENGINE; - } + }, }; const defaultResource = await metadata.getDefaultResource(fakeAuth); - assert.deepEqual(defaultResource, { + assert.deepStrictEqual(defaultResource, { type: 'gae_app', labels: { module_id: GAE_SERVICE, version_id: GAE_VERSION, - zone: ZONE_ID + zone: ZONE_ID, }, }); }); @@ -282,11 +288,11 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.CLOUD_FUNCTIONS; - } + }, }; const defaultResource = await metadata.getDefaultResource(fakeAuth); - assert.deepEqual(defaultResource, { + assert.deepStrictEqual(defaultResource, { type: 'cloud_function', labels: { function_name: FUNCTION_NAME, @@ -315,7 +321,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.COMPUTE_ENGINE; - } + }, }; const defaultResource = await metadata.getDefaultResource(fakeAuth); assert.deepStrictEqual(defaultResource, { @@ -346,7 +352,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.COMPUTE_ENGINE; - } + }, }; const defaultResource = await metadata.getDefaultResource(fakeAuth); @@ -371,7 +377,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.KUBERNETES_ENGINE; - } + }, }; const defaultResource = await metadata.getDefaultResource(fakeAuth); @@ -390,11 +396,11 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.NONE; - } + }, }; const defaultResource = await metadata.getDefaultResource(fakeAuth); - assert.deepEqual(defaultResource, { + assert.deepStrictEqual(defaultResource, { type: 'global', }); }); @@ -415,7 +421,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.APP_ENGINE; - } + }, }; const sc1 = await metadata.detectServiceContext(fakeAuth); @@ -440,12 +446,12 @@ describe('metadata', () => { }); it('should return the correct descriptor for Cloud Functions', async () => { - const FUNCTION_NAME = process.env.FUNCTION_NAME = 'function-name'; + const FUNCTION_NAME = (process.env.FUNCTION_NAME = 'function-name'); const fakeAuth = { async getEnv() { return GCPEnv.CLOUD_FUNCTIONS; - } + }, }; const sc1 = await metadata.detectServiceContext(fakeAuth); @@ -456,7 +462,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.KUBERNETES_ENGINE; - } + }, }; const serviceContext = await metadata.detectServiceContext(fakeAuth); assert.strictEqual(serviceContext, null); @@ -466,7 +472,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.COMPUTE_ENGINE; - } + }, }; const serviceContext = await metadata.detectServiceContext(fakeAuth); assert.strictEqual(serviceContext, null); @@ -476,7 +482,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { return GCPEnv.NONE; - } + }, }; const serviceContext = await metadata.detectServiceContext(fakeAuth); assert.strictEqual(serviceContext, null); diff --git a/handwritten/logging/test/middleware/express/test-make-http-request.ts b/handwritten/logging/test/middleware/express/test-make-http-request.ts index c87d5b74542..08ca3b1fd41 100644 --- a/handwritten/logging/test/middleware/express/test-make-http-request.ts +++ b/handwritten/logging/test/middleware/express/test-make-http-request.ts @@ -24,17 +24,25 @@ describe('middleware/express/make-http-request', () => { const fakeResponse = {}; const h1 = makeHttpRequestData( - fakeRequest as IncomingMessage, fakeResponse as ServerResponse, 1003); + fakeRequest as IncomingMessage, + fakeResponse as ServerResponse, + 1003 + ); assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); const h2 = makeHttpRequestData( - fakeRequest as IncomingMessage, fakeResponse as ServerResponse, 9003.1); + fakeRequest as IncomingMessage, + fakeResponse as ServerResponse, + 9003.1 + ); assert.deepStrictEqual(h2.latency, {seconds: 9, nanos: 3.1e6}); // Make sure we nanos is uint32. const h3 = makeHttpRequestData( - fakeRequest as IncomingMessage, fakeResponse as ServerResponse, - 1.0000000001); + fakeRequest as IncomingMessage, + fakeResponse as ServerResponse, + 1.0000000001 + ); assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); }); }); diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 4bb66fbcfc4..98bd0df63dc 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -31,19 +31,19 @@ function makeFakeResponse() { return ee; } -let getOrInjectContextValue: {}|undefined; +let getOrInjectContextValue: {} | undefined; const FAKE_CONTEXT = { getOrInjectContext: () => { return getOrInjectContextValue; - } + }, }; - describe('middleware/express/make-middleware', () => { describe('makeMiddleware', () => { const {makeMiddleware} = proxyquire( - '../../../src/middleware/express/make-middleware', - {'../context': FAKE_CONTEXT}); + '../../../src/middleware/express/make-middleware', + {'../context': FAKE_CONTEXT} + ); it('should return a function accepting 3 arguments', () => { const middleware = makeMiddleware(FAKE_PROJECT_ID, () => {}); @@ -80,9 +80,9 @@ describe('middleware/express/make-middleware', () => { function makeChild(trace: {}) { assert.strictEqual( - trace, - `projects/${FAKE_PROJECT_ID}/traces/${ - FAKE_SPAN_CONTEXT.traceId}`); + trace, + `projects/${FAKE_PROJECT_ID}/traces/${FAKE_SPAN_CONTEXT.traceId}` + ); return FAKE_CHILD_LOGGER; } @@ -94,7 +94,7 @@ describe('middleware/express/make-middleware', () => { assert.strictEqual((fakeRequest as any).log, FAKE_CHILD_LOGGER); }); - it('should emit a request log when response is finished', (done) => { + it('should emit a request log when response is finished', done => { getOrInjectContextValue = FAKE_SPAN_CONTEXT; const fakeRequest = makeFakeRequest(); const fakeResponse = makeFakeResponse(); @@ -102,15 +102,18 @@ describe('middleware/express/make-middleware', () => { function emitRequestLog(httpRequest: {}, trace: {}) { assert.strictEqual( - trace, - `projects/${FAKE_PROJECT_ID}/traces/${ - FAKE_SPAN_CONTEXT.traceId}`); + trace, + `projects/${FAKE_PROJECT_ID}/traces/${FAKE_SPAN_CONTEXT.traceId}` + ); // TODO: check httpRequest properties. emitRequestLogCalled = true; } - const middleware = - makeMiddleware(FAKE_PROJECT_ID, () => {}, emitRequestLog); + const middleware = makeMiddleware( + FAKE_PROJECT_ID, + () => {}, + emitRequestLog + ); middleware(fakeRequest, fakeResponse, () => {}); setTimeout(() => { @@ -121,4 +124,4 @@ describe('middleware/express/make-middleware', () => { }); }); }); -}); \ No newline at end of file +}); diff --git a/handwritten/logging/test/middleware/test-context.ts b/handwritten/logging/test/middleware/test-context.ts index efd36dc9cc1..173e7bf8972 100644 --- a/handwritten/logging/test/middleware/test-context.ts +++ b/handwritten/logging/test/middleware/test-context.ts @@ -22,14 +22,14 @@ import {makeHeaderWrapper} from '../../src/middleware/context'; const FAKE_CONTEXT = { extract: (headerWrapper: {}) => {}, generate: () => {}, - inject: (headerWrapper: {}, spanContext: {}) => {} + inject: (headerWrapper: {}, spanContext: {}) => {}, }; const fakeContext = Object.assign({}, FAKE_CONTEXT); -const {getOrInjectContext} = proxyquire( - '../../src/middleware/context', - {'@opencensus/propagation-stackdriver': fakeContext}); +const {getOrInjectContext} = proxyquire('../../src/middleware/context', { + '@opencensus/propagation-stackdriver': fakeContext, +}); describe('middleware/context', () => { describe('makeHeaderWrapper', () => { @@ -38,13 +38,17 @@ describe('middleware/context', () => { it('should correctly get request headers', () => { const req = {headers: {[HEADER_NAME]: HEADER_VALUE}}; - const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); + const wrapper = makeHeaderWrapper( + (req as unknown) as http.IncomingMessage + ); assert.strictEqual(wrapper.getHeader(HEADER_NAME), HEADER_VALUE); }); it('should correctly set request headers', () => { const req = {headers: {} as http.IncomingHttpHeaders}; - const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); + const wrapper = makeHeaderWrapper( + (req as unknown) as http.IncomingMessage + ); wrapper.setHeader(HEADER_NAME, HEADER_VALUE); assert.strictEqual(req.headers[HEADER_NAME], HEADER_VALUE); }); @@ -82,4 +86,4 @@ describe('middleware/context', () => { assert.ok(injectWasCalled); }); }); -}); \ No newline at end of file +}); diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index ca267477c07..4babdcfc21d 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -46,8 +46,8 @@ describe('Sink', () => { before(() => { Sink = proxyquire('../src/sink', { - '@google-cloud/promisify': fakeCallbackify, - }).Sink; + '@google-cloud/promisify': fakeCallbackify, + }).Sink; }); beforeEach(() => { @@ -69,8 +69,9 @@ describe('Sink', () => { it('should localize the formatted name', () => { assert.strictEqual( - sink.formattedName_, - 'projects/' + LOGGING.projectId + '/sinks/' + SINK_NAME); + sink.formattedName_, + 'projects/' + LOGGING.projectId + '/sinks/' + SINK_NAME + ); }); }); @@ -166,7 +167,7 @@ describe('Sink', () => { const FILTER = 'filter'; it('should call set metadata', async () => { - sink.setMetadata = async (metadata) => { + sink.setMetadata = async metadata => { assert.strictEqual(metadata.filter, FILTER); return []; }; @@ -207,8 +208,9 @@ describe('Sink', () => { throw error; }; - sink.setMetadata(METADATA).then( - util.noop, (err) => assert.strictEqual(err, error)); + sink + .setMetadata(METADATA) + .then(util.noop, err => assert.strictEqual(err, error)); }); it('should execute gax method', async () => { From 1068fba5c4e5dbccfa2819a90d9ca165dee4e2fd Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 6 May 2019 21:54:45 -0700 Subject: [PATCH 0391/1029] build: patch Windows container, fixing Node 10 (#468) --- handwritten/logging/.kokoro/test.bat | 10 +++++++++- handwritten/logging/package.json | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.kokoro/test.bat b/handwritten/logging/.kokoro/test.bat index 767320757e0..fddff757050 100644 --- a/handwritten/logging/.kokoro/test.bat +++ b/handwritten/logging/.kokoro/test.bat @@ -17,7 +17,15 @@ cd /d %~dp0 cd .. -call npm install -g npm@latest || goto :error +@rem The image we're currently running has a broken version of Node.js enabled +@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional +@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to +@rem install npm for v10.15.3. +call nvm use v8.9.1 || goto :error +call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error +call nvm use v10.15.3 || goto :error +call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error + call npm install || goto :error call npm run test || goto :error diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5ce3684a902..2e9cc402835 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -104,7 +104,7 @@ "google-proto-files": "^0.20.0", "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", - "jsdoc": "^3.5.5", + "jsdoc": "3.5.5", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "linkinator": "^1.1.2", "mocha": "^6.0.0", From bebaeeddba74996432d6d89c5ae837373bdaa866 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 6 May 2019 22:25:12 -0700 Subject: [PATCH 0392/1029] build: allow Node 10 to push to codecov (#469) --- handwritten/logging/.kokoro/continuous/node10/test.cfg | 9 +++++++++ handwritten/logging/.kokoro/continuous/node8/test.cfg | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/handwritten/logging/.kokoro/continuous/node10/test.cfg b/handwritten/logging/.kokoro/continuous/node10/test.cfg index e69de29bb2d..468b8c7197a 100644 --- a/handwritten/logging/.kokoro/continuous/node10/test.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/test.cfg @@ -0,0 +1,9 @@ +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/handwritten/logging/.kokoro/continuous/node8/test.cfg b/handwritten/logging/.kokoro/continuous/node8/test.cfg index 468b8c7197a..e69de29bb2d 100644 --- a/handwritten/logging/.kokoro/continuous/node8/test.cfg +++ b/handwritten/logging/.kokoro/continuous/node8/test.cfg @@ -1,9 +0,0 @@ -# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} From 7ff143ddaeaf86fe452f63c14c925d0d58d31d8d Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 7 May 2019 10:12:29 -0700 Subject: [PATCH 0393/1029] build: allow Node 10 on presubmit to push to codecov (#470) --- handwritten/logging/.kokoro/presubmit/node10/test.cfg | 9 +++++++++ handwritten/logging/.kokoro/presubmit/node8/test.cfg | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/handwritten/logging/.kokoro/presubmit/node10/test.cfg b/handwritten/logging/.kokoro/presubmit/node10/test.cfg index e69de29bb2d..468b8c7197a 100644 --- a/handwritten/logging/.kokoro/presubmit/node10/test.cfg +++ b/handwritten/logging/.kokoro/presubmit/node10/test.cfg @@ -0,0 +1,9 @@ +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/handwritten/logging/.kokoro/presubmit/node8/test.cfg b/handwritten/logging/.kokoro/presubmit/node8/test.cfg index 468b8c7197a..e69de29bb2d 100644 --- a/handwritten/logging/.kokoro/presubmit/node8/test.cfg +++ b/handwritten/logging/.kokoro/presubmit/node8/test.cfg @@ -1,9 +0,0 @@ -# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} From 48dc7f14d636ce591cd317c7063b453d50dabd07 Mon Sep 17 00:00:00 2001 From: Alex <7764119+AVaksman@users.noreply.github.com> Date: Wed, 8 May 2019 00:06:15 -0400 Subject: [PATCH 0394/1029] refactor: log.ts to async-first (#453) --- handwritten/logging/src/log.ts | 215 ++++++------------- handwritten/logging/system-test/logging.ts | 5 + handwritten/logging/test/log.ts | 233 +++++++++------------ 3 files changed, 167 insertions(+), 286 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index ea3caf2c549..37aba922e10 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -15,7 +15,7 @@ */ import {DeleteCallback} from '@google-cloud/common'; -import {callbackifyAll, promisifyAll} from '@google-cloud/promisify'; +import {callbackifyAll} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as extend from 'extend'; import {CallOptions} from 'google-gax'; @@ -154,17 +154,11 @@ class Log implements LogSeverityFunctions { alert(entry: Entry | Entry[], callback: ApiResponseCallback): void; alert( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write( + options?: WriteOptions | ApiResponseCallback + ): Promise { + return this.write( Log.assignSeverityToEntries_(entry, 'ALERT'), - options, - callback! + options! as WriteOptions ); } @@ -196,10 +190,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - critical( - entry: Entry | Entry[], - options?: WriteOptions - ): Promise; critical( entry: Entry | Entry[], options: WriteOptions, @@ -208,15 +198,12 @@ class Log implements LogSeverityFunctions { critical(entry: Entry | Entry[], callback: ApiResponseCallback): void; critical( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - const entries = Log.assignSeverityToEntries_(entry, 'CRITICAL'); - this.write(entries, options, callback!); + options?: WriteOptions | ApiResponseCallback + ): Promise { + return this.write( + Log.assignSeverityToEntries_(entry, 'CRITICAL'), + options! as WriteOptions + ); } /** @@ -256,17 +243,11 @@ class Log implements LogSeverityFunctions { debug(entry: Entry | Entry[], callback: ApiResponseCallback): void; debug( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write( + options?: WriteOptions | ApiResponseCallback + ): Promise { + return this.write( Log.assignSeverityToEntries_(entry, 'DEBUG'), - options, - callback! + options! as WriteOptions ); } @@ -314,25 +295,17 @@ class Log implements LogSeverityFunctions { delete(gaxOptions?: CallOptions): Promise; delete(gaxOptions: CallOptions, callback: DeleteCallback): void; delete(callback: DeleteCallback): void; - delete( - optionsOrCallback?: CallOptions | DeleteCallback, - cb?: DeleteCallback - ): void | Promise { - const gaxOptions = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + async delete( + gaxOptions?: CallOptions | DeleteCallback + ): Promise { + const projectId = await this.logging.auth.getProjectId(); + this.formattedName_ = Log.formatName_(projectId, this.name); const reqOpts = { logName: this.formattedName_, }; - this.logging.request( - { - client: 'LoggingServiceV2Client', - method: 'deleteLog', - reqOpts, - gaxOpts: gaxOptions, - }, - callback + return this.logging.loggingService.deleteLog( + reqOpts, + gaxOptions! as CallOptions ); } @@ -364,10 +337,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - emergency( - entry: Entry | Entry[], - options?: WriteOptions - ): Promise; emergency( entry: Entry | Entry[], options: WriteOptions, @@ -376,15 +345,12 @@ class Log implements LogSeverityFunctions { emergency(entry: Entry | Entry[], callback: ApiResponseCallback): void; emergency( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - const entries = Log.assignSeverityToEntries_(entry, 'EMERGENCY'); - this.write(entries, options, callback!); + options?: WriteOptions | ApiResponseCallback + ): Promise { + return this.write( + Log.assignSeverityToEntries_(entry, 'EMERGENCY'), + options as WriteOptions + ); } /** @@ -488,17 +454,11 @@ class Log implements LogSeverityFunctions { error(entry: Entry | Entry[], callback: ApiResponseCallback): void; error( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write( + options?: WriteOptions | ApiResponseCallback + ): Promise { + return this.write( Log.assignSeverityToEntries_(entry, 'ERROR'), - options, - callback! + options! as WriteOptions ); } @@ -551,8 +511,8 @@ class Log implements LogSeverityFunctions { opts?: GetEntriesRequest | GetEntriesCallback ): Promise { const options = extend({}, opts as GetEntriesRequest); - this.logging.projectId = await this.logging.auth.getProjectId(); - this.formattedName_ = Log.formatName_(this.logging.projectId, this.name); + const projectId = await this.logging.auth.getProjectId(); + this.formattedName_ = Log.formatName_(projectId, this.name); if (options.filter) { options.filter = `(${options.filter}) AND logName="${ this.formattedName_ @@ -644,14 +604,12 @@ class Log implements LogSeverityFunctions { info(entry: Entry | Entry[], callback: ApiResponseCallback): void; info( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write(Log.assignSeverityToEntries_(entry, 'INFO'), options, callback!); + options?: WriteOptions | ApiResponseCallback + ): Promise { + return this.write( + Log.assignSeverityToEntries_(entry, 'INFO'), + options! as WriteOptions + ); } /** @@ -691,17 +649,11 @@ class Log implements LogSeverityFunctions { notice(entry: Entry | Entry[], callback: ApiResponseCallback): void; notice( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write( + options?: WriteOptions | ApiResponseCallback + ): Promise { + return this.write( Log.assignSeverityToEntries_(entry, 'NOTICE'), - options, - callback! + options! as WriteOptions ); } @@ -742,17 +694,11 @@ class Log implements LogSeverityFunctions { warning(entry: Entry | Entry[], callback: ApiResponseCallback): void; warning( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.write( + options?: WriteOptions | ApiResponseCallback + ): Promise { + return this.write( Log.assignSeverityToEntries_(entry, 'WARNING'), - options, - callback! + options as WriteOptions ); } @@ -854,37 +800,34 @@ class Log implements LogSeverityFunctions { callback: ApiResponseCallback ): void; write(entry: Entry | Entry[], callback: ApiResponseCallback): void; - write( + async write( entry: Entry | Entry[], - optionsOrCallback?: WriteOptions | ApiResponseCallback, - cb?: ApiResponseCallback - ): void | Promise { - const options = - typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + opts?: WriteOptions | ApiResponseCallback + ): Promise { + const options = opts ? (opts as WriteOptions) : {}; const self = this; if (options.resource) { if (options.resource.labels) { options.resource.labels = snakeCaseKeys(options.resource.labels); } - writeWithResource(options.resource); + return writeWithResource(options.resource); } else if (this.logging.detectedResource) { - writeWithResource(this.logging.detectedResource); + return writeWithResource(this.logging.detectedResource); } else { - getDefaultResource(this.logging.auth).then(resource => { - this.logging.detectedResource = resource; - writeWithResource(resource); - }); + const resource = await getDefaultResource(this.logging.auth); + this.logging.detectedResource = resource; + return writeWithResource(resource); } - function writeWithResource(resource: {} | null) { + async function writeWithResource(resource: {} | null) { let decoratedEntries; try { decoratedEntries = self.decorateEntries_(arrify(entry) as Entry[]); } catch (err) { // Ignore errors (the API will speak up if it has an issue). } + const projectId = await self.logging.auth.getProjectId(); + self.formattedName_ = Log.formatName_(projectId, self.name); const reqOpts = extend( { logName: self.formattedName_, @@ -894,14 +837,9 @@ class Log implements LogSeverityFunctions { options ); delete reqOpts.gaxOptions; - self.logging.request( - { - client: 'LoggingServiceV2Client', - method: 'writeLogEntries', - reqOpts, - gaxOpts: options.gaxOptions, - }, - callback + return self.logging.loggingService.writeLogEntries( + reqOpts, + options.gaxOptions ); } } @@ -969,29 +907,10 @@ class Log implements LogSeverityFunctions { /*! Developer Documentation * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. + * All async methods (except for streams) will call a callback in the event + * that a callback is provided . */ -promisifyAll(Log, { - exclude: ['entry', 'getEntries'], -}); - -callbackifyAll(Log, { - exclude: [ - 'alert', - 'critical', - 'debug', - 'delete', - 'emergency', - 'entry', - 'error', - 'getEntriesStream', - 'info', - 'notice', - 'warning', - 'write', - ], -}); +callbackifyAll(Log, {exclude: ['entry', 'getEntriesStream']}); /** * Reference to the {@link Log} class. diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 2dcf73d6638..fffed7b7928 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -355,6 +355,11 @@ describe('Logging', () => { log.write(logEntries[0], options, done); }); + it('should write a single entry to a log as a Promise', async () => { + const {log, logEntries} = getTestLog(); + log.write(logEntries[1], options); + }); + it('should write multiple entries to a log', done => { const {log, logEntries} = getTestLog(); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 2c69d4203eb..8ffb69da176 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -15,19 +15,19 @@ */ import {util} from '@google-cloud/common-grpc'; -import * as promisify from '@google-cloud/promisify'; +import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; -let promisifed = false; -const fakePromisify = extend({}, promisify, { - promisifyAll(c, options) { +let callbackified = false; +const fakeCallbackify = extend({}, callbackify, { + callbackifyAll(c: Function, options: callbackify.CallbackifyAllOptions) { if (c.name !== 'Log') { return; } - promisifed = true; - assert.deepStrictEqual(options.exclude, ['entry', 'getEntries']); + callbackified = true; + assert.deepStrictEqual(options.exclude, ['entry', 'getEntriesStream']); }, }); @@ -63,7 +63,7 @@ describe('Log', () => { before(() => { Log = proxyquire('../src/log', { - '@google-cloud/promisify': fakePromisify, + '@google-cloud/promisify': fakeCallbackify, './entry': {Entry}, './metadata': fakeMetadata, }).Log; @@ -79,9 +79,10 @@ describe('Log', () => { assignSeverityToEntriesOverride = null; LOGGING = { - projectId: PROJECT_ID, + projectId: '{{project-id}}', entry: util.noop, request: util.noop, + loggingService: util.noop, auth: util.noop, }; @@ -89,8 +90,8 @@ describe('Log', () => { }); describe('instantiation', () => { - it('should promisify all the things', () => { - assert(promisifed); + it('should callbackify all the things', () => { + assert(callbackified); }); it('should localize the escaped name', () => { @@ -187,32 +188,30 @@ describe('Log', () => { }); describe('delete', () => { - it('should accept gaxOptions', done => { - log.logging.request = (config, callback) => { - assert.strictEqual(config.client, 'LoggingServiceV2Client'); - assert.strictEqual(config.method, 'deleteLog'); + beforeEach(() => { + log.logging.auth.getProjectId = async () => PROJECT_ID; + }); - assert.deepStrictEqual(config.reqOpts, { + it('should execute gax method', async () => { + log.logging.loggingService.deleteLog = async (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { logName: log.formattedName_, }); - assert.deepStrictEqual(config.gaxOpts, {}); - - callback(); // done() + assert.strictEqual(gaxOpts, undefined); }; - log.delete(done); + await log.delete(); }); - it('should accept gaxOptions', done => { + it('should accept gaxOptions', async () => { const gaxOptions = {}; - log.logging.request = config => { - assert.strictEqual(config.gaxOpts, gaxOptions); - done(); + log.logging.loggingService.deleteLog = async (reqOpts, gaxOpts) => { + assert.strictEqual(gaxOpts, gaxOptions); }; - log.delete(gaxOptions, assert.ifError); + await log.delete(gaxOptions); }); }); @@ -269,6 +268,8 @@ describe('Log', () => { custom: true, filter: 'custom filter', }; + log.logging.projectId = await log.logging.auth.getProjectId(); + log.formattedName_ = Log.formatName_(log.logging.projectId, log.name); const expectedOptions = extend({}, options); expectedOptions.filter = `(${options.filter}) AND logName="${ @@ -330,66 +331,57 @@ describe('Log', () => { fakeMetadata.getDefaultResource = async () => { return FAKE_RESOURCE; }; + log.logging.auth.getProjectId = async () => PROJECT_ID; }); - it('should forward options.resource to request', done => { + it('should forward options.resource to request', async () => { const CUSTOM_RESOURCE = 'custom-resource'; const optionsWithResource = extend({}, OPTIONS, { resource: CUSTOM_RESOURCE, }); - log.logging.request = (config, callback) => { - assert.strictEqual(config.client, 'LoggingServiceV2Client'); - assert.strictEqual(config.method, 'writeLogEntries'); - - assert.deepStrictEqual(config.reqOpts, { + log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { logName: log.formattedName_, entries: [ENTRY], resource: CUSTOM_RESOURCE, }); - assert.strictEqual(config.gaxOpts, undefined); - - callback(); + assert.strictEqual(gaxOpts, undefined); }; - log.write(ENTRY, optionsWithResource, done); + await log.write(ENTRY, optionsWithResource); }); - it('should cache a detected resource', done => { + it('should cache a detected resource', async () => { const fakeResource = 'test-level-fake-resource'; fakeMetadata.getDefaultResource = async () => { return fakeResource; }; - log.logging.request = () => { + log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { assert.strictEqual(log.logging.detectedResource, fakeResource); - done(); }; - log.write(ENTRY, done); + await log.write(ENTRY); }); - it('should re-use detected resource', done => { + it('should re-use detected resource', async () => { log.logging.detectedResource = 'environment-default-resource'; fakeMetadata.getDefaultResource = () => { throw new Error('Cached resource was not used.'); }; - log.logging.request = config => { - assert.strictEqual( - config.reqOpts.resource, - log.logging.detectedResource - ); - done(); + log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + assert.strictEqual(reqOpts.resource, log.logging.detectedResource); }; - log.write(ENTRY, done); + await log.write(ENTRY); }); - it('should transform camelcase label keys to snake case', done => { + it('should transform camelcase label keys to snake case', async () => { const CUSTOM_RESOURCE = { labels: { camelCaseKey: 'camel-case-key-val', @@ -404,44 +396,34 @@ describe('Log', () => { resource: CUSTOM_RESOURCE, }); - log.logging.request = (config, callback) => { - assert.strictEqual(config.client, 'LoggingServiceV2Client'); - assert.strictEqual(config.method, 'writeLogEntries'); - - assert.deepStrictEqual(config.reqOpts, { + log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { logName: log.formattedName_, entries: [ENTRY], resource: EXPECTED_RESOURCE, }); - assert.strictEqual(config.gaxOpts, undefined); - - callback(); + assert.strictEqual(gaxOpts, undefined); }; - log.write(ENTRY, optionsWithResource, done); + await log.write(ENTRY, optionsWithResource); }); - it('should make the correct API request', done => { - log.logging.request = (config, callback) => { - assert.strictEqual(config.client, 'LoggingServiceV2Client'); - assert.strictEqual(config.method, 'writeLogEntries'); - - assert.deepStrictEqual(config.reqOpts, { + it('should call gax method', async () => { + log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + assert.deepStrictEqual(reqOpts, { logName: log.formattedName_, entries: [ENTRY], resource: FAKE_RESOURCE, }); - assert.strictEqual(config.gaxOpts, undefined); - - callback(); + assert.strictEqual(gaxOpts, undefined); }; - log.write(ENTRY, OPTIONS, done); + await log.write(ENTRY, OPTIONS); }); - it('should arrify & decorate the entries', done => { + it('should arrify & decorate the entries', async () => { const decoratedEntries = []; log.decorateEntries_ = entries => { @@ -449,20 +431,17 @@ describe('Log', () => { return decoratedEntries; }; - log.logging.request = config => { - assert.strictEqual(config.reqOpts.entries, decoratedEntries); - done(); + log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + assert.strictEqual(reqOpts.entries, decoratedEntries); }; - log.write(ENTRY, OPTIONS, assert.ifError); + await log.write(ENTRY, OPTIONS); }); - it('should not require options', done => { - log.logging.request = (config, callback) => { - callback(); // done() - }; + it('should not require options', async () => { + log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => {}; - log.write(ENTRY, done); + await log.write(ENTRY); }); }); @@ -475,205 +454,183 @@ describe('Log', () => { }); describe('alert', () => { - it('should format the entries', done => { + it('should format the entries', async () => { assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'ALERT'); - done(); }; - log.alert(ENTRY, LABELS, assert.ifError); + await log.alert(ENTRY, LABELS); }); - it('should pass correct arguments to write', done => { + it('should pass correct arguments to write', async () => { const assignedEntries = []; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = (entry, labels, callback) => { + log.write = async (entry, labels) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() }; - log.alert(ENTRY, LABELS, done); + await log.alert(ENTRY, LABELS); }); }); describe('critical', () => { - it('should format the entries', done => { + it('should format the entries', async () => { assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'CRITICAL'); - - done(); }; - log.critical(ENTRY, LABELS, assert.ifError); + await log.critical(ENTRY, LABELS); }); - it('should pass correct arguments to write', done => { + it('should pass correct arguments to write', async () => { const assignedEntries = []; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = (entry, labels, callback) => { + log.write = async (entry, labels) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() }; - log.critical(ENTRY, LABELS, done); + await log.critical(ENTRY, LABELS); }); }); describe('debug', () => { - it('should format the entries', done => { + it('should format the entries', async () => { assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'DEBUG'); - - done(); }; - log.debug(ENTRY, LABELS, assert.ifError); + await log.debug(ENTRY, LABELS); }); - it('should pass correct arguments to write', done => { + it('should pass correct arguments to write', async () => { const assignedEntries = []; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = (entry, labels, callback) => { + log.write = async (entry, labels) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() }; - log.debug(ENTRY, LABELS, done); + await log.debug(ENTRY, LABELS); }); }); describe('emergency', () => { - it('should format the entries', done => { + it('should format the entries', async () => { assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'EMERGENCY'); - - done(); }; - log.emergency(ENTRY, LABELS, assert.ifError); + await log.emergency(ENTRY, LABELS); }); - it('should pass correct arguments to write', done => { + it('should pass correct arguments to write', async () => { const assignedEntries = []; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = (entry, labels, callback) => { + log.write = async (entry, labels) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() }; - log.emergency(ENTRY, LABELS, done); + await log.emergency(ENTRY, LABELS); }); }); describe('error', () => { - it('should format the entries', done => { + it('should format the entries', async () => { assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'ERROR'); - done(); }; - log.error(ENTRY, LABELS, assert.ifError); + await log.error(ENTRY, LABELS); }); - it('should pass correct arguments to write', done => { + it('should pass correct arguments to write', async () => { const assignedEntries = []; assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = (entry, labels, callback) => { + log.write = async (entry, labels) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() }; - log.error(ENTRY, LABELS, done); + await log.error(ENTRY, LABELS); }); }); describe('info', () => { - it('should format the entries', done => { + it('should format the entries', async () => { assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'INFO'); - - done(); }; - log.info(ENTRY, LABELS, assert.ifError); + await log.info(ENTRY, LABELS); }); - it('should pass correct arguments to write', done => { + it('should pass correct arguments to write', async () => { const assignedEntries = []; assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = (entry, labels, callback) => { + log.write = async (entry, labels) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() }; - log.info(ENTRY, LABELS, done); + await log.info(ENTRY, LABELS); }); }); describe('notice', () => { - it('should format the entries', done => { + it('should format the entries', async () => { assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'NOTICE'); - - done(); }; - log.notice(ENTRY, LABELS, assert.ifError); + await log.notice(ENTRY, LABELS); }); - it('should pass correct arguments to write', done => { + it('should pass correct arguments to write', async () => { const assignedEntries = []; assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = (entry, labels, callback) => { + log.write = async (entry, labels) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() }; - log.notice(ENTRY, LABELS, done); + await log.notice(ENTRY, LABELS); }); }); describe('warning', () => { - it('should format the entries', done => { + it('should format the entries', async () => { assignSeverityToEntriesOverride = (entries, severity) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'WARNING'); - - done(); }; - log.warning(ENTRY, LABELS, assert.ifError); + await log.warning(ENTRY, LABELS); }); - it('should pass correct arguments to write', done => { + it('should pass correct arguments to write', async () => { const assignedEntries = []; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = (entry, labels, callback) => { + log.write = async (entry, labels) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); - callback(); // done() }; - log.warning(ENTRY, LABELS, done); + await log.warning(ENTRY, LABELS); }); }); }); From 022e44fb30cf248a2fc704571abc88c2bbb8e441 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 7 May 2019 21:25:16 -0700 Subject: [PATCH 0395/1029] fix(deps): update dependency @google-cloud/paginator to v1 (#467) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2e9cc402835..f44983cb945 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@google-cloud/common-grpc": "^0.10.0", - "@google-cloud/paginator": "^0.2.0", + "@google-cloud/paginator": "^1.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", "@opencensus/propagation-stackdriver": "0.0.11", From 98deb2de920c8e72e80bd015d530e1a291c4c9b9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 7 May 2019 21:45:09 -0700 Subject: [PATCH 0396/1029] chore(deps): update dependency google-proto-files to v1 (#466) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f44983cb945..b50d63875dc 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -101,7 +101,7 @@ "eslint-config-prettier": "^4.0.0", "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", - "google-proto-files": "^0.20.0", + "google-proto-files": "^1.0.0", "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "3.5.5", From 298af4025fd41f1cb76e18ba1e7df79b796f4e15 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 7 May 2019 22:07:19 -0700 Subject: [PATCH 0397/1029] chore(docs): formatting updates (#454) --- .../src/v2/doc/google/protobuf/doc_any.js | 3 +- .../v2/doc/google/protobuf/doc_field_mask.js | 44 ++++++++----------- .../v2/doc/google/protobuf/doc_timestamp.js | 26 ++++++----- handwritten/logging/synth.metadata | 12 ++--- 4 files changed, 40 insertions(+), 45 deletions(-) diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index f3278b34e66..9ff5d007807 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -98,7 +98,8 @@ * * @property {string} typeUrl * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. The last segment of the URL's path must represent + * protocol buffer message. This string must contain at least + * one "/" character. The last segment of the URL's path must represent * the fully qualified name of the type (as in * `path/google.protobuf.Duration`). The name should be in a canonical form * (e.g., leading "." is not accepted). diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js index d55d97e6e38..011207b8626 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -84,57 +84,49 @@ * describe the updated values, the API ignores the values of all * fields not covered by the mask. * - * If a repeated field is specified for an update operation, the existing - * repeated values in the target resource will be overwritten by the new values. - * Note that a repeated field is only allowed in the last position of a `paths` - * string. + * If a repeated field is specified for an update operation, new values will + * be appended to the existing repeated field in the target resource. Note that + * a repeated field is only allowed in the last position of a `paths` string. * * If a sub-message is specified in the last position of the field mask for an - * update operation, then the existing sub-message in the target resource is - * overwritten. Given the target message: + * update operation, then new value will be merged into the existing sub-message + * in the target resource. + * + * For example, given the target message: * * f { * b { - * d : 1 - * x : 2 + * d: 1 + * x: 2 * } - * c : 1 + * c: [1] * } * * And an update message: * * f { * b { - * d : 10 + * d: 10 * } + * c: [2] * } * * then if the field mask is: * - * paths: "f.b" + * paths: ["f.b", "f.c"] * * then the result will be: * * f { * b { - * d : 10 + * d: 10 + * x: 2 * } - * c : 1 + * c: [1, 2] * } * - * However, if the update mask was: - * - * paths: "f.b.d" - * - * then the result would be: - * - * f { - * b { - * d : 10 - * x : 2 - * } - * c : 1 - * } + * An implementation may provide options to override this default behavior for + * repeated and message fields. * * In order to reset a field's value to the default, the field must * be in the mask and set to the default value in the provided resource. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index b47f41c2b30..98c19dbf0d3 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -16,17 +16,19 @@ // to be loaded as the JS file. /** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + * A Timestamp represents a point in time independent of any time zone or local + * calendar, encoded as a count of seconds and fractions of seconds at + * nanosecond resolution. The count is relative to an epoch at UTC midnight on + * January 1, 1970, in the proleptic Gregorian calendar which extends the + * Gregorian calendar backwards to year one. + * + * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + * second table is needed for interpretation, using a [24-hour linear + * smear](https://developers.google.com/time/smear). + * + * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + * restricting to that range, we ensure that we can convert to and from [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. * * # Examples * @@ -91,7 +93,7 @@ * method. In Python, a standard `datetime.datetime` object can be converted * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--) to obtain a formatter capable of generating timestamps in this format. + * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format. * * @property {number} seconds * Represents seconds of UTC time since Unix epoch diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index c3d039a98b0..0d045f96bed 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-03-28T11:36:01.654509Z", + "updateTime": "2019-04-21T11:47:20.841946Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.20", - "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" + "version": "0.16.26", + "dockerImage": "googleapis/artman@sha256:314eae2a40f6f7822db77365cf5f45bd513d628ae17773fd0473f460e7c2a665" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6a84b3267b0a95e922608b9891219075047eee29", - "internalRef": "240640999" + "sha": "3369c803f56d52662ea3792076deb8545183bdb0", + "internalRef": "244282812" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.2.26" + "version": "2019.4.10" } } ], From bbfbb963d32cbfd887067baa8b447f7bc9eea4a9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 8 May 2019 14:40:32 -0400 Subject: [PATCH 0398/1029] fix(deps): update dependency gcp-metadata to v2 (#474) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b50d63875dc..7da993da8d7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,7 @@ "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", - "gcp-metadata": "^1.0.0", + "gcp-metadata": "^2.0.0", "google-auth-library": "^3.0.0", "google-gax": "^0.26.0", "is": "^3.2.1", From 1035bc33e5dd482b35808d4c33e18228165e0a14 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Wed, 8 May 2019 16:54:36 -0700 Subject: [PATCH 0399/1029] fix: DEADLINE_EXCEEDED no longer listed as idempotent --- handwritten/logging/.kokoro/lint.sh | 10 +-- handwritten/logging/.kokoro/samples-test.sh | 16 +++-- handwritten/logging/.kokoro/test.sh | 12 +++- .../src/v2/config_service_v2_client.js | 70 +++++++++---------- .../v2/config_service_v2_client_config.json | 1 - .../doc/google/api/doc_monitored_resource.js | 37 +++++----- .../v2/logging_service_v2_client_config.json | 1 - .../src/v2/metrics_service_v2_client.js | 38 +++++----- .../v2/metrics_service_v2_client_config.json | 1 - handwritten/logging/synth.metadata | 12 ++-- 10 files changed, 101 insertions(+), 97 deletions(-) diff --git a/handwritten/logging/.kokoro/lint.sh b/handwritten/logging/.kokoro/lint.sh index 7c2ea2a28f9..bcb7508363b 100755 --- a/handwritten/logging/.kokoro/lint.sh +++ b/handwritten/logging/.kokoro/lint.sh @@ -23,9 +23,11 @@ cd $(dirname $0)/.. npm install # Install and link samples -cd samples/ -npm link ../ -npm install -cd .. +if [ -f samples/package.json ]; then + cd samples/ + npm link ../ + npm install + cd .. +fi npm run lint diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index 5a81ec01fcc..f83f712a88a 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -31,12 +31,14 @@ if [ -f .kokoro/pre-samples-test.sh ]; then set -x fi -npm install +if [ -f samples/package.json ]; then + npm install -# Install and link samples -cd samples/ -npm link ../ -npm install -cd .. + # Install and link samples + cd samples/ + npm link ../ + npm install + cd .. -npm run samples-test + npm run samples-test +fi diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 4d6c3f83188..f7e9fe78163 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -22,6 +22,14 @@ cd $(dirname $0)/.. npm install npm test -./node_modules/nyc/bin/nyc.js report -bash $KOKORO_GFILE_DIR/codecov.sh +COVERAGE_NODE=10 +if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then + NYC_BIN=./node_modules/nyc/bin/nyc.js + if [ -f "$NYC_BIN" ]; then + $NYC_BIN report + fi + bash $KOKORO_GFILE_DIR/codecov.sh +else + echo "coverage is only reported for Node $COVERAGE_NODE" +fi diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index d56d31bf90c..812c4ec547a 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -101,11 +101,11 @@ class ConfigServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), - sinkPathTemplate: new gax.PathTemplate('projects/{project}/sinks/{sink}'), exclusionPathTemplate: new gax.PathTemplate( 'projects/{project}/exclusions/{exclusion}' ), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), + sinkPathTemplate: new gax.PathTemplate('projects/{project}/sinks/{sink}'), }; // Some of the methods on this service return "paged" results, @@ -1121,6 +1121,20 @@ class ConfigServiceV2Client { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified exclusion resource name string. + * + * @param {String} project + * @param {String} exclusion + * @returns {String} + */ + exclusionPath(project, exclusion) { + return this._pathTemplates.exclusionPathTemplate.render({ + project: project, + exclusion: exclusion, + }); + } + /** * Return a fully-qualified project resource name string. * @@ -1148,17 +1162,27 @@ class ConfigServiceV2Client { } /** - * Return a fully-qualified exclusion resource name string. + * Parse the exclusionName from a exclusion resource. * - * @param {String} project - * @param {String} exclusion - * @returns {String} + * @param {String} exclusionName + * A fully-qualified path representing a exclusion resources. + * @returns {String} - A string representing the project. */ - exclusionPath(project, exclusion) { - return this._pathTemplates.exclusionPathTemplate.render({ - project: project, - exclusion: exclusion, - }); + matchProjectFromExclusionName(exclusionName) { + return this._pathTemplates.exclusionPathTemplate.match(exclusionName) + .project; + } + + /** + * Parse the exclusionName from a exclusion resource. + * + * @param {String} exclusionName + * A fully-qualified path representing a exclusion resources. + * @returns {String} - A string representing the exclusion. + */ + matchExclusionFromExclusionName(exclusionName) { + return this._pathTemplates.exclusionPathTemplate.match(exclusionName) + .exclusion; } /** @@ -1193,30 +1217,6 @@ class ConfigServiceV2Client { matchSinkFromSinkName(sinkName) { return this._pathTemplates.sinkPathTemplate.match(sinkName).sink; } - - /** - * Parse the exclusionName from a exclusion resource. - * - * @param {String} exclusionName - * A fully-qualified path representing a exclusion resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromExclusionName(exclusionName) { - return this._pathTemplates.exclusionPathTemplate.match(exclusionName) - .project; - } - - /** - * Parse the exclusionName from a exclusion resource. - * - * @param {String} exclusionName - * A fully-qualified path representing a exclusion resources. - * @returns {String} - A string representing the exclusion. - */ - matchExclusionFromExclusionName(exclusionName) { - return this._pathTemplates.exclusionPathTemplate.match(exclusionName) - .exclusion; - } } module.exports = ConfigServiceV2Client; diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index a66c127b02b..7f84d5e8044 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -3,7 +3,6 @@ "google.logging.v2.ConfigServiceV2": { "retry_codes": { "idempotent": [ - "DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE" ], diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 29ad2b03aec..24321d640b0 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -16,10 +16,9 @@ // to be loaded as the JS file. /** - * An object that describes the schema of a - * MonitoredResource object using a type name - * and a set of labels. For example, the monitored resource descriptor for - * Google Compute Engine VM instances has a type of + * An object that describes the schema of a MonitoredResource object using a + * type name and a set of labels. For example, the monitored resource + * descriptor for Google Compute Engine VM instances has a type of * `"gce_instance"` and specifies the use of the labels `"instance_id"` and * `"zone"` to identify particular VM instances. * @@ -69,13 +68,11 @@ const MonitoredResourceDescriptor = { * An object representing a resource that can be used for monitoring, logging, * billing, or other purposes. Examples include virtual machine instances, * databases, and storage devices such as disks. The `type` field identifies a - * MonitoredResourceDescriptor object - * that describes the resource's schema. Information in the `labels` field - * identifies the actual resource and its attributes according to the schema. - * For example, a particular Compute Engine VM instance could be represented by - * the following object, because the - * MonitoredResourceDescriptor for - * `"gce_instance"` has labels + * MonitoredResourceDescriptor object that describes the resource's + * schema. Information in the `labels` field identifies the actual resource and + * its attributes according to the schema. For example, a particular Compute + * Engine VM instance could be represented by the following object, because the + * MonitoredResourceDescriptor for `"gce_instance"` has labels * `"instance_id"` and `"zone"`: * * { "type": "gce_instance", @@ -84,10 +81,8 @@ const MonitoredResourceDescriptor = { * * @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 Compute Engine VM instance is - * `gce_instance`. + * the `type` field of a MonitoredResourceDescriptor object. For + * example, the type of a Compute Engine VM instance is `gce_instance`. * * @property {Object.} labels * Required. Values for all of the labels listed in the associated monitored @@ -103,12 +98,12 @@ const MonitoredResource = { }; /** - * Auxiliary metadata for a MonitoredResource - * object. MonitoredResource objects contain the - * minimum set of information to uniquely identify a monitored resource - * instance. There is some other useful auxiliary metadata. Monitoring and - * Logging use an ingestion pipeline to extract metadata for cloud resources of - * all types, and store the metadata in this message. + * Auxiliary metadata for a MonitoredResource object. + * MonitoredResource objects contain the minimum set of information to + * uniquely identify a monitored resource instance. There is some other useful + * auxiliary metadata. Monitoring and Logging use an ingestion + * pipeline to extract metadata for cloud resources of all types, and store + * the metadata in this message. * * @property {Object} systemLabels * Output only. Values for predefined system metadata labels. diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index e93f205572e..ee2abd1427f 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -3,7 +3,6 @@ "google.logging.v2.LoggingServiceV2": { "retry_codes": { "idempotent": [ - "DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE" ], diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 4b9cfa14c00..df34c419bdb 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -100,10 +100,10 @@ class MetricsServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), metricPathTemplate: new gax.PathTemplate( 'projects/{project}/metrics/{metric}' ), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), }; // Some of the methods on this service return "paged" results, @@ -607,18 +607,6 @@ class MetricsServiceV2Client { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - /** * Return a fully-qualified metric resource name string. * @@ -634,14 +622,15 @@ class MetricsServiceV2Client { } /** - * Parse the projectName from a project resource. + * Return a fully-qualified project resource name string. * - * @param {String} projectName - * A fully-qualified path representing a project resources. - * @returns {String} - A string representing the project. + * @param {String} project + * @returns {String} */ - matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + projectPath(project) { + return this._pathTemplates.projectPathTemplate.render({ + project: project, + }); } /** @@ -665,6 +654,17 @@ class MetricsServiceV2Client { matchMetricFromMetricName(metricName) { return this._pathTemplates.metricPathTemplate.match(metricName).metric; } + + /** + * Parse the projectName from a project resource. + * + * @param {String} projectName + * A fully-qualified path representing a project resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromProjectName(projectName) { + return this._pathTemplates.projectPathTemplate.match(projectName).project; + } } module.exports = MetricsServiceV2Client; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json index 671ed471b51..4b086d911dd 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client_config.json +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -3,7 +3,6 @@ "google.logging.v2.MetricsServiceV2": { "retry_codes": { "idempotent": [ - "DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE" ], diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 0d045f96bed..1ef4a9e6a1c 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-04-21T11:47:20.841946Z", + "updateTime": "2019-05-08T12:03:04.701437Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.26", - "dockerImage": "googleapis/artman@sha256:314eae2a40f6f7822db77365cf5f45bd513d628ae17773fd0473f460e7c2a665" + "version": "0.19.0", + "dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3369c803f56d52662ea3792076deb8545183bdb0", - "internalRef": "244282812" + "sha": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2", + "internalRef": "247143125" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.4.10" + "version": "2019.5.2" } } ], From 7f18673e1fba49481788eb1dbfbc4055028b4022 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 10 May 2019 11:53:49 -0700 Subject: [PATCH 0400/1029] fix(deps): update dependency google-gax to v1 (#477) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7da993da8d7..ee93b7db51f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,7 +63,7 @@ "extend": "^3.0.2", "gcp-metadata": "^2.0.0", "google-auth-library": "^3.0.0", - "google-gax": "^0.26.0", + "google-gax": "^1.0.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", From c892a4a85d7c154717a2d590652da45cd4d77b0a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 10 May 2019 15:06:04 -0700 Subject: [PATCH 0401/1029] fix: DEADLINE_EXCEEDED retry code is idempotent (#478) --- .../logging/src/v2/config_service_v2_client_config.json | 1 + .../logging/src/v2/logging_service_v2_client_config.json | 1 + .../logging/src/v2/metrics_service_v2_client_config.json | 1 + handwritten/logging/synth.metadata | 6 +++--- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index 7f84d5e8044..a66c127b02b 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -3,6 +3,7 @@ "google.logging.v2.ConfigServiceV2": { "retry_codes": { "idempotent": [ + "DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE" ], diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index ee2abd1427f..e93f205572e 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -3,6 +3,7 @@ "google.logging.v2.LoggingServiceV2": { "retry_codes": { "idempotent": [ + "DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE" ], diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json index 4b086d911dd..671ed471b51 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client_config.json +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -3,6 +3,7 @@ "google.logging.v2.MetricsServiceV2": { "retry_codes": { "idempotent": [ + "DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE" ], diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 1ef4a9e6a1c..22d64f881cf 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-08T12:03:04.701437Z", + "updateTime": "2019-05-10T12:07:43.126546Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2", - "internalRef": "247143125" + "sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a", + "internalRef": "247530843" } }, { From f53f51829b17c4c2679b8d81019fe724cf0d240f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 10 May 2019 19:38:49 -0700 Subject: [PATCH 0402/1029] fix(deps): update dependency google-auth-library to v4 (#475) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ee93b7db51f..286dab8ddad 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^2.0.0", - "google-auth-library": "^3.0.0", + "google-auth-library": "^4.0.0", "google-gax": "^1.0.0", "is": "^3.2.1", "lodash.merge": "^4.6.1", From 30a965cea6d7f6890ffb061f59692a78d935f730 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Sat, 11 May 2019 15:42:33 -0700 Subject: [PATCH 0403/1029] docs: update jsdoc formatting (#480) --- handwritten/logging/src/v2/doc/google/api/doc_metric.js | 6 ++++++ .../logging/src/v2/doc/google/api/doc_monitored_resource.js | 5 +++++ handwritten/logging/synth.metadata | 6 +++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index f2ff585a692..45718f18a63 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -136,6 +136,11 @@ * * This object should have the same structure as [MetricDescriptorMetadata]{@link google.api.MetricDescriptorMetadata} * + * @property {number} launchStage + * Optional. The launch stage of the metric definition. + * + * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} + * * @typedef MetricDescriptor * @memberof google.api * @see [google.api.MetricDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} @@ -147,6 +152,7 @@ const MetricDescriptor = { * Additional annotations that can be used to guide the usage of a metric. * * @property {number} launchStage + * Deprecated. Please use the MetricDescriptor.launch_stage instead. * The launch stage of the metric definition. * * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 24321d640b0..8d5e132a417 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -56,6 +56,11 @@ * * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} * + * @property {number} launchStage + * Optional. The launch stage of the monitored resource definition. + * + * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} + * * @typedef MonitoredResourceDescriptor * @memberof google.api * @see [google.api.MonitoredResourceDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 22d64f881cf..d386224cdb8 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-10T12:07:43.126546Z", + "updateTime": "2019-05-11T11:17:55.714678Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a", - "internalRef": "247530843" + "sha": "32b08107fa1710f46287c17d5bb2016e443ed3ba", + "internalRef": "247684466" } }, { From cc91de9550872bdf2009edc238b6e5c8614ef347 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 11 May 2019 15:50:38 -0700 Subject: [PATCH 0404/1029] fix(deps): update dependency @google-cloud/common-grpc to v1 (#479) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 286dab8ddad..780b0a74361 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -53,7 +53,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "@google-cloud/common-grpc": "^0.10.0", + "@google-cloud/common-grpc": "^1.0.0", "@google-cloud/paginator": "^1.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", From 0892a43eb3c4276b9941ded67c3357c6ebf4f9b9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 13 May 2019 09:43:01 -0700 Subject: [PATCH 0405/1029] chore(deps): update dependency jsdoc to v3.6.2 (#481) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 780b0a74361..a323e635b65 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -104,7 +104,7 @@ "google-proto-files": "^1.0.0", "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", - "jsdoc": "3.5.5", + "jsdoc": "^3.6.2", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "linkinator": "^1.1.2", "mocha": "^6.0.0", From dc14af77ebff2941a2c7a35674419b33cf159f88 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 13 May 2019 09:53:35 -0700 Subject: [PATCH 0406/1029] fix(deps): update dependency type-fest to ^0.5.0 (#482) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a323e635b65..37e74f1cc16 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -73,7 +73,7 @@ "snakecase-keys": "^2.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", - "type-fest": "^0.4.0" + "type-fest": "^0.5.0" }, "devDependencies": { "@google-cloud/bigquery": "^3.0.0", From 66200432850df3179b5cf8e86f9a231b2828cb76 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 14 May 2019 13:22:02 -0700 Subject: [PATCH 0407/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.12 (#483) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 37e74f1cc16..82596946408 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "@google-cloud/paginator": "^1.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@opencensus/propagation-stackdriver": "0.0.11", + "@opencensus/propagation-stackdriver": "0.0.12", "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", From 19912a247dbd7ea1baa3557016ad5f0f7c545237 Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Wed, 15 May 2019 05:30:39 +0700 Subject: [PATCH 0408/1029] fix: use originalUrl for Express middleware's request url (#476) Fixes: #472 --- .../src/middleware/express/make-http-request.ts | 8 ++++++-- .../src/middleware/express/make-middleware.ts | 10 +++------- .../middleware/express/test-make-http-request.ts | 13 ++++++++----- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/handwritten/logging/src/middleware/express/make-http-request.ts b/handwritten/logging/src/middleware/express/make-http-request.ts index 43316365cb3..4933b8d076b 100644 --- a/handwritten/logging/src/middleware/express/make-http-request.ts +++ b/handwritten/logging/src/middleware/express/make-http-request.ts @@ -18,14 +18,18 @@ import * as http from 'http'; import {StackdriverHttpRequest} from '../../http-request'; +export interface ServerRequest extends http.IncomingMessage { + originalUrl: string; +} + export function makeHttpRequestData( - req: http.IncomingMessage, + req: ServerRequest, res: http.ServerResponse, latencyMilliseconds: number ): StackdriverHttpRequest { return { status: res.statusCode, - requestUrl: req.url, + requestUrl: req.originalUrl, requestMethod: req.method, userAgent: req.headers['user-agent'], responseSize: diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index f7a3a504f2a..50b5b873c79 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -18,10 +18,10 @@ import * as http from 'http'; import onFinished = require('on-finished'); import {getOrInjectContext, makeHeaderWrapper} from '../context'; -import {makeHttpRequestData} from './make-http-request'; +import {makeHttpRequestData, ServerRequest} from './make-http-request'; import {StackdriverHttpRequest} from '../../http-request'; -interface AnnotatedRequestType extends http.IncomingMessage { +interface AnnotatedRequestType extends ServerRequest { log: LoggerType; } @@ -46,11 +46,7 @@ export function makeMiddleware( makeChildLogger: (trace: string) => LoggerType, emitRequestLog?: (httpRequest: StackdriverHttpRequest, trace: string) => void ) { - return ( - req: http.IncomingMessage, - res: http.ServerResponse, - next: Function - ) => { + return (req: ServerRequest, res: http.ServerResponse, next: Function) => { // TODO(ofrobots): use high-resolution timer. const requestStartMs = Date.now(); diff --git a/handwritten/logging/test/middleware/express/test-make-http-request.ts b/handwritten/logging/test/middleware/express/test-make-http-request.ts index 08ca3b1fd41..3abbfe252e1 100644 --- a/handwritten/logging/test/middleware/express/test-make-http-request.ts +++ b/handwritten/logging/test/middleware/express/test-make-http-request.ts @@ -15,8 +15,11 @@ */ import * as assert from 'assert'; -import {IncomingMessage, ServerResponse} from 'http'; -import {makeHttpRequestData} from '../../../src/middleware/express/make-http-request'; +import {ServerResponse} from 'http'; +import { + makeHttpRequestData, + ServerRequest, +} from '../../../src/middleware/express/make-http-request'; describe('middleware/express/make-http-request', () => { it('should convert latency to proto Duration', () => { @@ -24,14 +27,14 @@ describe('middleware/express/make-http-request', () => { const fakeResponse = {}; const h1 = makeHttpRequestData( - fakeRequest as IncomingMessage, + fakeRequest as ServerRequest, fakeResponse as ServerResponse, 1003 ); assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); const h2 = makeHttpRequestData( - fakeRequest as IncomingMessage, + fakeRequest as ServerRequest, fakeResponse as ServerResponse, 9003.1 ); @@ -39,7 +42,7 @@ describe('middleware/express/make-http-request', () => { // Make sure we nanos is uint32. const h3 = makeHttpRequestData( - fakeRequest as IncomingMessage, + fakeRequest as ServerRequest, fakeResponse as ServerResponse, 1.0000000001 ); From 3f758e9f4646d3f5cab6e41828093a8cbdc0e8d4 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 08:14:26 -0700 Subject: [PATCH 0409/1029] build: add new kokoro config for coverage and release-please (#484) --- .../.kokoro/continuous/node10/common.cfg | 10 ++++++++ .../.kokoro/continuous/node10/test.cfg | 9 ------- .../.kokoro/presubmit/node10/common.cfg | 10 ++++++++ .../logging/.kokoro/presubmit/node10/test.cfg | 9 ------- .../.kokoro/release-candidate-issue.sh | 25 +++++++++++++++++++ .../logging/.kokoro/release-requested.sh | 25 +++++++++++++++++++ .../logging/.kokoro/release/common.cfg | 8 ++++++ .../logging/.kokoro/release/publish.cfg | 9 ------- .../release/release-candidate-issue.cfg | 22 ++++++++++++++++ .../.kokoro/release/release-requested.cfg | 22 ++++++++++++++++ handwritten/logging/.kokoro/samples-test.sh | 13 ++++++++++ handwritten/logging/.kokoro/system-test.sh | 13 ++++++++++ handwritten/logging/.kokoro/test.sh | 4 ++- handwritten/logging/synth.metadata | 8 +++--- 14 files changed, 155 insertions(+), 32 deletions(-) create mode 100755 handwritten/logging/.kokoro/release-candidate-issue.sh create mode 100755 handwritten/logging/.kokoro/release-requested.sh create mode 100644 handwritten/logging/.kokoro/release/common.cfg create mode 100644 handwritten/logging/.kokoro/release/release-candidate-issue.cfg create mode 100644 handwritten/logging/.kokoro/release/release-requested.cfg diff --git a/handwritten/logging/.kokoro/continuous/node10/common.cfg b/handwritten/logging/.kokoro/continuous/node10/common.cfg index 8d06c907f37..f8c8afae40c 100644 --- a/handwritten/logging/.kokoro/continuous/node10/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/common.cfg @@ -7,6 +7,16 @@ action { } } +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} + # Download trampoline resources. gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" diff --git a/handwritten/logging/.kokoro/continuous/node10/test.cfg b/handwritten/logging/.kokoro/continuous/node10/test.cfg index 468b8c7197a..e69de29bb2d 100644 --- a/handwritten/logging/.kokoro/continuous/node10/test.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/test.cfg @@ -1,9 +0,0 @@ -# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} diff --git a/handwritten/logging/.kokoro/presubmit/node10/common.cfg b/handwritten/logging/.kokoro/presubmit/node10/common.cfg index 8d06c907f37..f8c8afae40c 100644 --- a/handwritten/logging/.kokoro/presubmit/node10/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node10/common.cfg @@ -7,6 +7,16 @@ action { } } +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} + # Download trampoline resources. gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" diff --git a/handwritten/logging/.kokoro/presubmit/node10/test.cfg b/handwritten/logging/.kokoro/presubmit/node10/test.cfg index 468b8c7197a..e69de29bb2d 100644 --- a/handwritten/logging/.kokoro/presubmit/node10/test.cfg +++ b/handwritten/logging/.kokoro/presubmit/node10/test.cfg @@ -1,9 +0,0 @@ -# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} diff --git a/handwritten/logging/.kokoro/release-candidate-issue.sh b/handwritten/logging/.kokoro/release-candidate-issue.sh new file mode 100755 index 00000000000..6593c4dc5cf --- /dev/null +++ b/handwritten/logging/.kokoro/release-candidate-issue.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) + +npx release-please candidate-issue --token=$GITHUB_TOKEN \ + --repo-url=googleapis/nodejs-logging \ + --package-name=@google-cloud/logging diff --git a/handwritten/logging/.kokoro/release-requested.sh b/handwritten/logging/.kokoro/release-requested.sh new file mode 100755 index 00000000000..8a13ef3217b --- /dev/null +++ b/handwritten/logging/.kokoro/release-requested.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) + +npx release-please detect-checked --token=$GITHUB_TOKEN \ + --repo-url=googleapis/nodejs-logging \ + --package-name=@google-cloud/logging diff --git a/handwritten/logging/.kokoro/release/common.cfg b/handwritten/logging/.kokoro/release/common.cfg new file mode 100644 index 00000000000..3ba2eb095fe --- /dev/null +++ b/handwritten/logging/.kokoro/release/common.cfg @@ -0,0 +1,8 @@ +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index b8c0a54c94f..c1f681fcc5c 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -9,15 +9,6 @@ before_action { } } -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - } - } -} - before_action { fetch_keystore { keystore_resource { diff --git a/handwritten/logging/.kokoro/release/release-candidate-issue.cfg b/handwritten/logging/.kokoro/release/release-candidate-issue.cfg new file mode 100644 index 00000000000..e02305f16b9 --- /dev/null +++ b/handwritten/logging/.kokoro/release/release-candidate-issue.cfg @@ -0,0 +1,22 @@ +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/release-candidate-issue.sh" +} diff --git a/handwritten/logging/.kokoro/release/release-requested.cfg b/handwritten/logging/.kokoro/release/release-requested.cfg new file mode 100644 index 00000000000..89d706fefd6 --- /dev/null +++ b/handwritten/logging/.kokoro/release/release-requested.cfg @@ -0,0 +1,22 @@ +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/release-requested.sh" +} diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index f83f712a88a..07d31dccc45 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -42,3 +42,16 @@ if [ -f samples/package.json ]; then npm run samples-test fi + +# codecov combines coverage across integration and unit tests. Include +# the logic below for any environment you wish to collect coverage for: +COVERAGE_NODE=10 +if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then + NYC_BIN=./node_modules/nyc/bin/nyc.js + if [ -f "$NYC_BIN" ]; then + $NYC_BIN report || true + fi + bash $KOKORO_GFILE_DIR/codecov.sh +else + echo "coverage is only reported for Node $COVERAGE_NODE" +fi diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index fd8f0b638d0..b7374d0ad45 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -34,3 +34,16 @@ fi npm install npm run system-test + +# codecov combines coverage across integration and unit tests. Include +# the logic below for any environment you wish to collect coverage for: +COVERAGE_NODE=10 +if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then + NYC_BIN=./node_modules/nyc/bin/nyc.js + if [ -f "$NYC_BIN" ]; then + $NYC_BIN report || true + fi + bash $KOKORO_GFILE_DIR/codecov.sh +else + echo "coverage is only reported for Node $COVERAGE_NODE" +fi diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index f7e9fe78163..bfc7b26154e 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -23,11 +23,13 @@ cd $(dirname $0)/.. npm install npm test +# codecov combines coverage across integration and unit tests. Include +# the logic below for any environment you wish to collect coverage for: COVERAGE_NODE=10 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then - $NYC_BIN report + $NYC_BIN report || true fi bash $KOKORO_GFILE_DIR/codecov.sh else diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index d386224cdb8..e5117731398 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-11T11:17:55.714678Z", + "updateTime": "2019-05-17T01:08:07.591281Z", "sources": [ { "generator": { @@ -12,15 +12,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "32b08107fa1710f46287c17d5bb2016e443ed3ba", - "internalRef": "247684466" + "sha": "03269e767cff9dd644d7784a4d4350b2ba6daf69", + "internalRef": "248524261" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.4.10" } } ], From 4aadaaf8f955f957c8f46f93a55f4270e593ca54 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 17 May 2019 08:47:52 -0700 Subject: [PATCH 0410/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.29.0 (#485) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 82596946408..12be66566db 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -78,7 +78,7 @@ "devDependencies": { "@google-cloud/bigquery": "^3.0.0", "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.28.0", + "@google-cloud/pubsub": "^0.29.0", "@google-cloud/storage": "^2.2.0", "@types/extend": "^3.0.0", "@types/is": "0.0.21", From 9a28f62c87085fd50c21611bfaaeb30452077c80 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 13:41:55 -0700 Subject: [PATCH 0411/1029] build: updated kokoro config for coverage and release-please (#486) --- .../.kokoro/continuous/node10/test.cfg | 19 ++++++++++++++ .../.kokoro/release-candidate-issue.sh | 25 ------------------- .../logging/.kokoro/release-requested.sh | 25 ------------------- .../logging/.kokoro/release/publish.cfg | 9 +++++++ .../release/release-candidate-issue.cfg | 22 ---------------- .../.kokoro/release/release-requested.cfg | 22 ---------------- handwritten/logging/.kokoro/test.sh | 8 ++++++ handwritten/logging/synth.metadata | 6 ++--- 8 files changed, 39 insertions(+), 97 deletions(-) delete mode 100755 handwritten/logging/.kokoro/release-candidate-issue.sh delete mode 100755 handwritten/logging/.kokoro/release-requested.sh delete mode 100644 handwritten/logging/.kokoro/release/release-candidate-issue.cfg delete mode 100644 handwritten/logging/.kokoro/release/release-requested.cfg diff --git a/handwritten/logging/.kokoro/continuous/node10/test.cfg b/handwritten/logging/.kokoro/continuous/node10/test.cfg index e69de29bb2d..38c174e6b3d 100644 --- a/handwritten/logging/.kokoro/continuous/node10/test.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/test.cfg @@ -0,0 +1,19 @@ +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} + +# token used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} diff --git a/handwritten/logging/.kokoro/release-candidate-issue.sh b/handwritten/logging/.kokoro/release-candidate-issue.sh deleted file mode 100755 index 6593c4dc5cf..00000000000 --- a/handwritten/logging/.kokoro/release-candidate-issue.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://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. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=/home/node/.npm-global - -GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) - -npx release-please candidate-issue --token=$GITHUB_TOKEN \ - --repo-url=googleapis/nodejs-logging \ - --package-name=@google-cloud/logging diff --git a/handwritten/logging/.kokoro/release-requested.sh b/handwritten/logging/.kokoro/release-requested.sh deleted file mode 100755 index 8a13ef3217b..00000000000 --- a/handwritten/logging/.kokoro/release-requested.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://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. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=/home/node/.npm-global - -GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) - -npx release-please detect-checked --token=$GITHUB_TOKEN \ - --repo-url=googleapis/nodejs-logging \ - --package-name=@google-cloud/logging diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index c1f681fcc5c..b8c0a54c94f 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -9,6 +9,15 @@ before_action { } } +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + before_action { fetch_keystore { keystore_resource { diff --git a/handwritten/logging/.kokoro/release/release-candidate-issue.cfg b/handwritten/logging/.kokoro/release/release-candidate-issue.cfg deleted file mode 100644 index e02305f16b9..00000000000 --- a/handwritten/logging/.kokoro/release/release-candidate-issue.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/release-candidate-issue.sh" -} diff --git a/handwritten/logging/.kokoro/release/release-requested.cfg b/handwritten/logging/.kokoro/release/release-requested.cfg deleted file mode 100644 index 89d706fefd6..00000000000 --- a/handwritten/logging/.kokoro/release/release-requested.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/release-requested.sh" -} diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index bfc7b26154e..d0386816dba 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -35,3 +35,11 @@ if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then else echo "coverage is only reported for Node $COVERAGE_NODE" fi + +# if the GITHUB_TOKEN is set, we kick off a task to update the release-PR. +GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) || true +if [ "$GITHUB_TOKEN" ]; then + npx release-please release-pr --token=$GITHUB_TOKEN \ + --repo-url=googleapis/nodejs-logging \ + --package-name=@google-cloud/logging +fi diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index e5117731398..3b12ddf54a5 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-17T01:08:07.591281Z", + "updateTime": "2019-05-17T19:47:37.711101Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "03269e767cff9dd644d7784a4d4350b2ba6daf69", - "internalRef": "248524261" + "sha": "99efb1441b7c2aeb75c69f8baf9b61d4221bb744", + "internalRef": "248724297" } }, { From ee7afcad2af4e8064eeb6b8134a0aa0e92e9027a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 May 2019 14:01:39 -0700 Subject: [PATCH 0412/1029] chore: release 5.0.0 (#487) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- handwritten/logging/CHANGELOG.md | 31 ++++++++++++++++++++++++++++++- handwritten/logging/package.json | 2 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 3c6bdfba9da..f11687665f9 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,36 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [5.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v4.5.2...v5.0.0) (2019-05-17) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/common-grpc to v1 ([#479](https://www.github.com/googleapis/nodejs-logging/issues/479)) ([58e6154](https://www.github.com/googleapis/nodejs-logging/commit/58e6154)) +* **deps:** update dependency @google-cloud/paginator to v1 ([#467](https://www.github.com/googleapis/nodejs-logging/issues/467)) ([90d74bd](https://www.github.com/googleapis/nodejs-logging/commit/90d74bd)) +* **deps:** update dependency @google-cloud/projectify to v1 ([#464](https://www.github.com/googleapis/nodejs-logging/issues/464)) ([f6ef399](https://www.github.com/googleapis/nodejs-logging/commit/f6ef399)) +* **deps:** update dependency @google-cloud/promisify to v1 ([#465](https://www.github.com/googleapis/nodejs-logging/issues/465)) ([5871e4b](https://www.github.com/googleapis/nodejs-logging/commit/5871e4b)) +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.12 ([#483](https://www.github.com/googleapis/nodejs-logging/issues/483)) ([afe89de](https://www.github.com/googleapis/nodejs-logging/commit/afe89de)) +* **deps:** update dependency gcp-metadata to v2 ([#474](https://www.github.com/googleapis/nodejs-logging/issues/474)) ([125b356](https://www.github.com/googleapis/nodejs-logging/commit/125b356)) +* **deps:** update dependency google-auth-library to v4 ([#475](https://www.github.com/googleapis/nodejs-logging/issues/475)) ([558bfc5](https://www.github.com/googleapis/nodejs-logging/commit/558bfc5)) +* **deps:** update dependency google-gax to ^0.26.0 ([#459](https://www.github.com/googleapis/nodejs-logging/issues/459)) ([7417dcb](https://www.github.com/googleapis/nodejs-logging/commit/7417dcb)) +* **deps:** update dependency google-gax to v1 ([#477](https://www.github.com/googleapis/nodejs-logging/issues/477)) ([535aedb](https://www.github.com/googleapis/nodejs-logging/commit/535aedb)) +* DEADLINE_EXCEEDED no longer listed as idempotent ([473d145](https://www.github.com/googleapis/nodejs-logging/commit/473d145)) +* **deps:** update dependency type-fest to ^0.4.0 ([#455](https://www.github.com/googleapis/nodejs-logging/issues/455)) ([3c2324b](https://www.github.com/googleapis/nodejs-logging/commit/3c2324b)) +* **deps:** update dependency type-fest to ^0.5.0 ([#482](https://www.github.com/googleapis/nodejs-logging/issues/482)) ([ee5d17f](https://www.github.com/googleapis/nodejs-logging/commit/ee5d17f)) +* DEADLINE_EXCEEDED retry code is idempotent ([#478](https://www.github.com/googleapis/nodejs-logging/issues/478)) ([4fdb8c1](https://www.github.com/googleapis/nodejs-logging/commit/4fdb8c1)) +* use originalUrl for Express middleware's request url ([#476](https://www.github.com/googleapis/nodejs-logging/issues/476)) ([0ee71bd](https://www.github.com/googleapis/nodejs-logging/commit/0ee71bd)), closes [#472](https://www.github.com/googleapis/nodejs-logging/issues/472) + + +### Build System + +* upgrade engines field to >=8.10.0 ([#461](https://www.github.com/googleapis/nodejs-logging/issues/461)) ([641ce87](https://www.github.com/googleapis/nodejs-logging/commit/641ce87)) + + +### BREAKING CHANGES + +* upgrade engines field to >=8.10.0 (#461) + ## v4.5.2 04-11-2019 14:26 PDT @@ -304,4 +334,3 @@ This release contains a variety of minor internal changes. - test: use strictEqual in tests (#170) - fix(deps): update dependency gcp-metadata to ^0.7.0 (#166) - fix(deps): update dependency @google-cloud/logging to v2 (#157) - diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 12be66566db..3ef4d436122 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "4.5.2", + "version": "5.0.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From e0cfc1bc70ad0237e69dc46d02cdd294fdc34bc5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 21 May 2019 08:40:40 -0700 Subject: [PATCH 0413/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.13 (#489) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3ef4d436122..c40ec4529c6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "@google-cloud/paginator": "^1.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@opencensus/propagation-stackdriver": "0.0.12", + "@opencensus/propagation-stackdriver": "0.0.13", "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", From 74da30e2231f8bbb463d91bbd76270dd2518b6bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 21 May 2019 09:10:18 -0700 Subject: [PATCH 0414/1029] chore(deps): update dependency @google-cloud/bigquery to v4 (#490) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c40ec4529c6..e912589591e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "type-fest": "^0.5.0" }, "devDependencies": { - "@google-cloud/bigquery": "^3.0.0", + "@google-cloud/bigquery": "^4.0.0", "@google-cloud/nodejs-repo-tools": "^3.0.0", "@google-cloud/pubsub": "^0.29.0", "@google-cloud/storage": "^2.2.0", From 37ba2cd771c7d24ceb0a9f45e262b1387c15cab4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 May 2019 10:00:17 -0700 Subject: [PATCH 0415/1029] refactor: drop dependency on lodash.merge and update links (#491) --- handwritten/logging/package.json | 1 - .../src/v2/config_service_v2_client.js | 34 ++++++++----------- .../src/v2/logging_service_v2_client.js | 26 ++++++-------- .../src/v2/metrics_service_v2_client.js | 22 +++++------- handwritten/logging/synth.metadata | 12 +++---- 5 files changed, 41 insertions(+), 54 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e912589591e..8daa01c2ed6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -65,7 +65,6 @@ "google-auth-library": "^4.0.0", "google-gax": "^1.0.0", "is": "^3.2.1", - "lodash.merge": "^4.6.1", "on-finished": "^2.3.0", "pify": "^4.0.1", "protobufjs": "^6.8.8", diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 812c4ec547a..baed47b782e 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./config_service_v2_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const VERSION = require('../../../package.json').version; @@ -89,12 +88,9 @@ class ConfigServiceV2Client { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging_config.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/logging/v2/logging_config.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -234,7 +230,7 @@ class ConfigServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -350,7 +346,7 @@ class ConfigServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @returns {Stream} * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. * @@ -396,7 +392,7 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -477,7 +473,7 @@ class ConfigServiceV2Client { * LogSink. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -581,7 +577,7 @@ class ConfigServiceV2Client { * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -648,7 +644,7 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. @@ -704,7 +700,7 @@ class ConfigServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -820,7 +816,7 @@ class ConfigServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @returns {Stream} * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. * @@ -866,7 +862,7 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -933,7 +929,7 @@ class ConfigServiceV2Client { * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -1014,7 +1010,7 @@ class ConfigServiceV2Client { * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -1081,7 +1077,7 @@ class ConfigServiceV2Client { * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 986afb885d1..5f5a21bcb96 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./logging_service_v2_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const protobuf = require('protobufjs'); @@ -89,12 +88,9 @@ class LoggingServiceV2Client { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/logging/v2/logging.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -263,7 +259,7 @@ class LoggingServiceV2Client { * LogEntry. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. @@ -382,7 +378,7 @@ class LoggingServiceV2Client { * logging API endpoints are working properly before sending valuable data. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -465,7 +461,7 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -598,7 +594,7 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @returns {Stream} * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. * @@ -641,7 +637,7 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -743,7 +739,7 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @returns {Stream} * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. * @@ -794,7 +790,7 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -910,7 +906,7 @@ class LoggingServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @returns {Stream} * An object stream which emits a string on 'data' event. * diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index df34c419bdb..6a4e304ac0f 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./metrics_service_v2_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const VERSION = require('../../../package.json').version; @@ -88,12 +87,9 @@ class MetricsServiceV2Client { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/logging/v2/logging_metrics.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/logging/v2/logging_metrics.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -223,7 +219,7 @@ class MetricsServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -336,7 +332,7 @@ class MetricsServiceV2Client { * resources in a page. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @returns {Stream} * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. * @@ -377,7 +373,7 @@ class MetricsServiceV2Client { * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -439,7 +435,7 @@ class MetricsServiceV2Client { * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -507,7 +503,7 @@ class MetricsServiceV2Client { * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -567,7 +563,7 @@ class MetricsServiceV2Client { * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error)} [callback] * The function which will be called with the result of the API call. * @returns {Promise} - The promise which resolves when API call finishes. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 3b12ddf54a5..37fc48d4fd2 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-05-17T19:47:37.711101Z", + "updateTime": "2019-05-21T11:18:54.682369Z", "sources": [ { "generator": { "name": "artman", - "version": "0.19.0", - "dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e" + "version": "0.20.0", + "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "99efb1441b7c2aeb75c69f8baf9b61d4221bb744", - "internalRef": "248724297" + "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160", + "internalRef": "249058354" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.4.10" + "version": "2019.5.2" } } ], From 555ce30744f3b78add1a9f19636a51e4a349ebc6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 May 2019 13:18:02 -0700 Subject: [PATCH 0416/1029] chore: release 5.0.1 (#492) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index f11687665f9..db2a0983c74 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.0.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.0.0...v5.0.1) (2019-05-21) + + +### Bug Fixes + +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.13 ([#489](https://www.github.com/googleapis/nodejs-logging/issues/489)) ([0f57adf](https://www.github.com/googleapis/nodejs-logging/commit/0f57adf)) + ## [5.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v4.5.2...v5.0.0) (2019-05-17) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8daa01c2ed6..0acc6e48eae 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 05a01b898bfeae6ab75f683938922bda3d2fa5ae Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 May 2019 02:38:55 +0000 Subject: [PATCH 0417/1029] chore: use published jsdoc-baseline package (#493) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0acc6e48eae..467e30e04b4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -104,7 +104,7 @@ "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.6.2", - "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", + "jsdoc-baseline": "^0.1.0", "linkinator": "^1.1.2", "mocha": "^6.0.0", "mv": "^2.1.1", From 1ab5251ef0b833fe7b72ce22e729af36c18e61b2 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 May 2019 16:57:16 +0000 Subject: [PATCH 0418/1029] refactor: drop dependency on pify (#494) --- handwritten/logging/package.json | 2 -- handwritten/logging/src/metadata.ts | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 467e30e04b4..9e4ed38565a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -66,7 +66,6 @@ "google-gax": "^1.0.0", "is": "^3.2.1", "on-finished": "^2.3.0", - "pify": "^4.0.1", "protobufjs": "^6.8.8", "pumpify": "^1.5.1", "snakecase-keys": "^2.0.0", @@ -86,7 +85,6 @@ "@types/ncp": "^2.0.1", "@types/nock": "^10.0.0", "@types/on-finished": "^2.3.1", - "@types/pify": "^3.0.2", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", "@types/sinon": "^7.0.8", diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 2a8e6c62bf8..d14f9eca047 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -17,11 +17,11 @@ import * as fs from 'fs'; import * as gcpMetadata from 'gcp-metadata'; import {GCPEnv, GoogleAuth} from 'google-auth-library'; -import * as pify from 'pify'; +import {promisify} from 'util'; import {ServiceContext} from './index'; -const readFile = pify(fs.readFile); +const readFile = promisify(fs.readFile); function zoneFromQualifiedZone(qualified: string): string | undefined { // Some parsing is necessary. Metadata service returns a fully From 93d2edf4d790df88882f571ec885f40783b68d9c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 28 May 2019 08:28:32 -0700 Subject: [PATCH 0419/1029] chore(deps): update dependency bignumber.js to v9 (#497) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9e4ed38565a..1c9b9f87349 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -91,7 +91,7 @@ "@types/through2": "^2.0.34", "@types/uuid": "^3.4.4", "assert-rejects": "^1.0.0", - "bignumber.js": "^8.0.0", + "bignumber.js": "^9.0.0", "chai": "^4.2.0", "codecov": "^3.0.4", "eslint": "^5.4.0", From 0e7341b8d76778fae8d4c3eaa49976015df331b9 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 28 May 2019 11:23:08 -0700 Subject: [PATCH 0420/1029] build: add configuration for automated doc deployment (#495) --- handwritten/logging/.kokoro/release/docs.cfg | 26 ++++++++++ handwritten/logging/.kokoro/release/docs.sh | 50 ++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 handwritten/logging/.kokoro/release/docs.cfg create mode 100755 handwritten/logging/.kokoro/release/docs.sh diff --git a/handwritten/logging/.kokoro/release/docs.cfg b/handwritten/logging/.kokoro/release/docs.cfg new file mode 100644 index 00000000000..5f695482c47 --- /dev/null +++ b/handwritten/logging/.kokoro/release/docs.cfg @@ -0,0 +1,26 @@ +# service account used to publish up-to-date docs. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# doc publications use a Python image. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/release/docs.sh" +} diff --git a/handwritten/logging/.kokoro/release/docs.sh b/handwritten/logging/.kokoro/release/docs.sh new file mode 100755 index 00000000000..4d3a0868531 --- /dev/null +++ b/handwritten/logging/.kokoro/release/docs.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -eo pipefail + +# build jsdocs (Python is installed on the Node 10 docker image). +if [[ -z "$CREDENTIALS" ]]; then + # if CREDENTIALS are explicitly set, assume we're testing locally + # and don't set NPM_CONFIG_PREFIX. + export NPM_CONFIG_PREFIX=/home/node/.npm-global + export PATH="$PATH:/home/node/.npm-global/bin" + cd $(dirname $0)/../.. +fi +npm install +npm run docs + +# create docs.metadata, based on package.json and .repo-metadata.json. +npm i json@9.0.6 -g +python3 -m pip install --user gcp-docuploader +python3 -m docuploader create-metadata \ + --name=$(cat .repo-metadata.json | json name) \ + --version=$(cat package.json | json version) \ + --language=$(cat .repo-metadata.json | json language) \ + --distribution-name=$(cat .repo-metadata.json | json distribution_name) \ + --product-page=$(cat .repo-metadata.json | json product_documentation) \ + --github-repository=$(cat .repo-metadata.json | json repo) \ + --issue-tracker=$(cat .repo-metadata.json | json issue_tracker) +cp docs.metadata ./docs/docs.metadata + +# deploy the docs. +if [[ -z "$CREDENTIALS" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi +if [[ -z "$BUCKET" ]]; then + BUCKET=docs-staging +fi +python3 -m docuploader upload ./docs --credentials $CREDENTIALS --staging-bucket $BUCKET From ada47f774a87134a14a40490a36e07998f2a45bc Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 28 May 2019 20:39:24 +0000 Subject: [PATCH 0421/1029] build: ignore proto files in test coverage (#498) --- handwritten/logging/.nycrc | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/.nycrc b/handwritten/logging/.nycrc index bfe4073a6ab..83a421a0628 100644 --- a/handwritten/logging/.nycrc +++ b/handwritten/logging/.nycrc @@ -10,6 +10,7 @@ "**/samples", "**/scripts", "**/src/**/v*/**/*.js", + "**/protos", "**/test", ".jsdoc.js", "**/.jsdoc.js", From 78220e4bab88d50c0e919f8b3220b6d44a9db402 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 29 May 2019 21:53:34 +0200 Subject: [PATCH 0422/1029] build: remove verbose logging from test scripts (#499) --- handwritten/logging/.kokoro/docs.sh | 2 +- handwritten/logging/.kokoro/lint.sh | 2 +- handwritten/logging/.kokoro/samples-test.sh | 2 +- handwritten/logging/.kokoro/system-test.sh | 2 +- handwritten/logging/.kokoro/test.sh | 2 +- handwritten/logging/.kokoro/trampoline.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/.kokoro/docs.sh b/handwritten/logging/.kokoro/docs.sh index a4f318794e6..952403faede 100755 --- a/handwritten/logging/.kokoro/docs.sh +++ b/handwritten/logging/.kokoro/docs.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -xeo pipefail +set -eo pipefail export NPM_CONFIG_PREFIX=/home/node/.npm-global diff --git a/handwritten/logging/.kokoro/lint.sh b/handwritten/logging/.kokoro/lint.sh index bcb7508363b..b03cb0439a6 100755 --- a/handwritten/logging/.kokoro/lint.sh +++ b/handwritten/logging/.kokoro/lint.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -xeo pipefail +set -eo pipefail export NPM_CONFIG_PREFIX=/home/node/.npm-global diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index 07d31dccc45..20e3241c9e9 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -xeo pipefail +set -eo pipefail export NPM_CONFIG_PREFIX=/home/node/.npm-global diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index b7374d0ad45..fc5824e6667 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -xeo pipefail +set -eo pipefail export NPM_CONFIG_PREFIX=/home/node/.npm-global diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index d0386816dba..5980db1292b 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -xeo pipefail +set -eo pipefail export NPM_CONFIG_PREFIX=/home/node/.npm-global diff --git a/handwritten/logging/.kokoro/trampoline.sh b/handwritten/logging/.kokoro/trampoline.sh index 87ffd2ca960..9bd4905c4b5 100755 --- a/handwritten/logging/.kokoro/trampoline.sh +++ b/handwritten/logging/.kokoro/trampoline.sh @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -xeo pipefail +set -eo pipefail # Always run the cleanup script, regardless of the success of bouncing into # the container. From a810b8570cd69a623717883b0ebae62afb0a2668 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 30 May 2019 14:27:01 -0400 Subject: [PATCH 0423/1029] chore(deps): update dependency typescript to ~3.5.0 (#500) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1c9b9f87349..5a035e1ddd5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -113,7 +113,7 @@ "prettier": "^1.15.1", "proxyquire": "^2.1.0", "sinon": "^7.2.5", - "typescript": "~3.4.0", + "typescript": "~3.5.0", "uuid": "^3.3.2" } } From efeeb611995f385f93f27066f99076f19e43d3cc Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 3 Jun 2019 07:52:16 -0700 Subject: [PATCH 0424/1029] feat: support apiEndpoint override (#501) --- handwritten/logging/package.json | 6 +++--- handwritten/logging/src/index.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5a035e1ddd5..6c2696245d7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -75,7 +75,7 @@ }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", - "@google-cloud/nodejs-repo-tools": "^3.0.0", + "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^0.29.0", "@google-cloud/storage": "^2.2.0", "@types/extend": "^3.0.0", @@ -103,8 +103,8 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.6.2", "jsdoc-baseline": "^0.1.0", - "linkinator": "^1.1.2", - "mocha": "^6.0.0", + "linkinator": "^1.4.2", + "mocha": "^6.1.4", "mv": "^2.1.1", "ncp": "^2.0.0", "nock": "^10.0.1", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 573af479dcd..76096e4efd6 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -61,6 +61,7 @@ import {Topic} from '@google-cloud/pubsub'; // types only export interface LoggingOptions extends gax.GoogleAuthOptions { autoRetry?: boolean; maxRetries?: number; + apiEndpoint?: string; } export interface DeleteCallback { From 09bec3f52904b4b9e83b3b5c90146c83a40c0891 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 3 Jun 2019 17:04:48 +0200 Subject: [PATCH 0425/1029] feat: add .repo-metadata.json for docs generation (#502) --- handwritten/logging/.cloud-repo-tools.json | 23 ----- handwritten/logging/.readme-partials.yml | 3 + handwritten/logging/.repo-metadata.json | 13 +++ handwritten/logging/README.md | 115 +++++++++++---------- handwritten/logging/package.json | 1 - handwritten/logging/synth.metadata | 12 +-- 6 files changed, 81 insertions(+), 86 deletions(-) delete mode 100644 handwritten/logging/.cloud-repo-tools.json create mode 100644 handwritten/logging/.readme-partials.yml create mode 100644 handwritten/logging/.repo-metadata.json diff --git a/handwritten/logging/.cloud-repo-tools.json b/handwritten/logging/.cloud-repo-tools.json deleted file mode 100644 index eedc4410c2f..00000000000 --- a/handwritten/logging/.cloud-repo-tools.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "requiresKeyFile": true, - "requiresProjectId": true, - "product": "logging", - "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/logging/latest/", - "release_quality": "ga", - "samples": [ - { - "id": "logs", - "name": "Logs", - "file": "logs.js", - "docs_link": "https://cloud.google.com/logging/docs", - "usage": "node logs --help" - }, - { - "id": "sinks", - "name": "Sinks", - "file": "sinks.js", - "docs_link": "https://cloud.google.com/logging/docs", - "usage": "node sinks --help" - } - ] -} diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml new file mode 100644 index 00000000000..4b7ad0b9dd2 --- /dev/null +++ b/handwritten/logging/.readme-partials.yml @@ -0,0 +1,3 @@ +introduction: |- + [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, + monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json new file mode 100644 index 00000000000..06e28e8cc0e --- /dev/null +++ b/handwritten/logging/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "logging", + "name_pretty": "Stackdriver Logging", + "product_documentation": "https://cloud.google.com/logging/docs", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/logging/latest/", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559764", + "release_level": "ga", + "language": "nodejs", + "repo": "googleapis/nodejs-logging", + "distribution_name": "@google-cloud/logging", + "api_id": "logging.googleapis.com", + "requires_billing": true +} diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index e5d444df153..14cc145126f 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -1,21 +1,23 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "To regenerate it, use `npm run generate-scaffolding`." +[//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo # [Stackdriver Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) -> Node.js idiomatic client for [Logging][product-docs]. -[Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. -* [Logging Node.js Client API Reference][client-docs] +[Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, +monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. + + +* [Stackdriver Logging Node.js Client API Reference][client-docs] +* [Stackdriver Logging Documentation][product-docs] * [github.com/googleapis/nodejs-logging](https://github.com/googleapis/nodejs-logging) -* [Logging Documentation][product-docs] Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -24,6 +26,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. **Table of contents:** + * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) @@ -37,67 +40,55 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Before you begin -1. Select or create a Cloud Platform project. +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Stackdriver Logging API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. - [Go to the projects page][projects] +### Installing the client library -1. Enable billing for your project. +```bash +npm install @google-cloud/logging +``` - [Enable billing][billing] -1. Enable the Stackdriver Logging API. +### Using the client library - [Enable the API][enable_api] +```javascript +async function quickstart( + projectId = 'YOUR_PROJECT_ID', // Your Google Cloud Platform project ID + logName = 'my-log' // The name of the log to write to +) { + // Imports the Google Cloud client library + const {Logging} = require('@google-cloud/logging'); -1. [Set up authentication with a service account][auth] so you can access the - API from your local workstation. + // Creates a client + const logging = new Logging({projectId}); -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started + // Selects the log to write to + const log = logging.log(logName); -### Installing the client library + // The data to write to the log + const text = 'Hello, world!'; - npm install --save @google-cloud/logging + // The metadata associated with the entry + const metadata = { + resource: {type: 'global'}, + }; -### Using the client library + // Prepares a log entry + const entry = log.entry(metadata, text); + + // Writes the log entry + await log.write(entry); + console.log(`Logged: ${text}`); +} -```javascript -// Imports the Google Cloud client library -const {Logging} = require('@google-cloud/logging'); - -// Your Google Cloud Platform project ID -const projectId = 'YOUR_PROJECT_ID'; - -// Creates a client -const logging = new Logging({ - projectId: projectId, -}); - -// The name of the log to write to -const logName = 'my-log'; -// Selects the log to write to -const log = logging.log(logName); - -// The data to write to the log -const text = 'Hello, world!'; -// The metadata associated with the entry -const metadata = {resource: {type: 'global'}}; -// Prepares a log entry -const entry = log.entry(metadata, text); - -// Writes the log entry -log - .write(entry) - .then(() => { - console.log(`Logged: ${text}`); - }) - .catch(err => { - console.error('ERROR:', err); - }); ``` + + ## Samples Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/master/samples) directory. The samples' `README.md` @@ -105,22 +96,31 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Fluent | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/fluent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/fluent.js,samples/README.md) | | Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/logs.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | -The [Logging Node.js Client API Reference][client-docs] documentation + + +The [Stackdriver Logging Node.js Client API Reference][client-docs] documentation also contains samples. ## Versioning This library follows [Semantic Versioning](http://semver.org/). + This library is considered to be **General Availability (GA)**. This means it is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against **GA** libraries are addressed with the highest priority. + + + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages @@ -138,4 +138,7 @@ See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest/ [product-docs]: https://cloud.google.com/logging/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png - +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6c2696245d7..539f368e017 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -37,7 +37,6 @@ "presystem-test": "npm run compile", "system-test": "mocha build/system-test --timeout 600000", "samples-test": "cd samples/ && npm test && cd ../", - "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "gts check && eslint '**/*.js'", "check": "gts check", "clean": "gts clean", diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 37fc48d4fd2..94e9dc8fe7b 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-05-21T11:18:54.682369Z", + "updateTime": "2019-06-02T12:17:31.339926Z", "sources": [ { "generator": { "name": "artman", - "version": "0.20.0", - "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec" + "version": "0.22.0", + "dockerImage": "googleapis/artman@sha256:72f6287a42490bfe1609aed491f29411af21df3f744199fe8bb8d276c1fdf419" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160", - "internalRef": "249058354" + "sha": "a8ee1416f4c588f2ab92da72e7c1f588c784d3e6", + "internalRef": "250996044" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.4.10" } } ], From 78b2def05b425b63f0f0c490aa65106f4bf9601a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 Jun 2019 09:58:30 -0700 Subject: [PATCH 0426/1029] feat: support apiEndpoint override in client constructor (#505) --- .../src/v2/config_service_v2_client.js | 14 ++++- .../src/v2/logging_service_v2_client.js | 14 ++++- .../src/v2/metrics_service_v2_client.js | 14 ++++- handwritten/logging/synth.metadata | 12 ++-- handwritten/logging/test/gapic-v2.js | 63 +++++++++++++++++++ 5 files changed, 108 insertions(+), 9 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index baed47b782e..f8211b578c2 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -56,14 +56,18 @@ class ConfigServiceV2Client { * API remote host. */ constructor(opts) { + opts = opts || {}; this._descriptors = {}; + const servicePath = + opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; + // Ensure that options include the service address and port. opts = Object.assign( { clientConfig: {}, port: this.constructor.port, - servicePath: this.constructor.servicePath, + servicePath, }, opts ); @@ -176,6 +180,14 @@ class ConfigServiceV2Client { return 'logging.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'logging.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 5f5a21bcb96..b88af96de20 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -56,14 +56,18 @@ class LoggingServiceV2Client { * API remote host. */ constructor(opts) { + opts = opts || {}; this._descriptors = {}; + const servicePath = + opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; + // Ensure that options include the service address and port. opts = Object.assign( { clientConfig: {}, port: this.constructor.port, - servicePath: this.constructor.servicePath, + servicePath, }, opts ); @@ -202,6 +206,14 @@ class LoggingServiceV2Client { return 'logging.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'logging.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 6a4e304ac0f..e2a996683c5 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -55,14 +55,18 @@ class MetricsServiceV2Client { * API remote host. */ constructor(opts) { + opts = opts || {}; this._descriptors = {}; + const servicePath = + opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; + // Ensure that options include the service address and port. opts = Object.assign( { clientConfig: {}, port: this.constructor.port, - servicePath: this.constructor.servicePath, + servicePath, }, opts ); @@ -168,6 +172,14 @@ class MetricsServiceV2Client { return 'logging.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'logging.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 94e9dc8fe7b..ade6296dfd9 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-06-02T12:17:31.339926Z", + "updateTime": "2019-06-05T14:21:10.388885Z", "sources": [ { "generator": { "name": "artman", - "version": "0.22.0", - "dockerImage": "googleapis/artman@sha256:72f6287a42490bfe1609aed491f29411af21df3f744199fe8bb8d276c1fdf419" + "version": "0.23.1", + "dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a8ee1416f4c588f2ab92da72e7c1f588c784d3e6", - "internalRef": "250996044" + "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b", + "internalRef": "251635729" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.4.10" + "version": "2019.5.2" } } ], diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index fce16fa698c..4e15bd83077 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -23,6 +23,27 @@ const error = new Error(); error.code = FAKE_STATUS_CODE; describe('LoggingServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = loggingModule.v2.LoggingServiceV2Client.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = loggingModule.v2.LoggingServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = loggingModule.v2.LoggingServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new loggingModule.v2.LoggingServiceV2Client(); + assert(client); + }); + describe('deleteLog', () => { it('invokes deleteLog without error', done => { const client = new loggingModule.v2.LoggingServiceV2Client({ @@ -321,6 +342,27 @@ describe('LoggingServiceV2Client', () => { }); }); describe('ConfigServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = loggingModule.v2.ConfigServiceV2Client.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = loggingModule.v2.ConfigServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = loggingModule.v2.ConfigServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new loggingModule.v2.ConfigServiceV2Client(); + assert(client); + }); + describe('listSinks', () => { it('invokes listSinks without error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ @@ -972,6 +1014,27 @@ describe('ConfigServiceV2Client', () => { }); }); describe('MetricsServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = loggingModule.v2.MetricsServiceV2Client.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = loggingModule.v2.MetricsServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = loggingModule.v2.MetricsServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new loggingModule.v2.MetricsServiceV2Client(); + assert(client); + }); + describe('listLogMetrics', () => { it('invokes listLogMetrics without error', done => { const client = new loggingModule.v2.MetricsServiceV2Client({ From db922f8584e602832384b440eb05e91d36ab0e44 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 Jun 2019 10:12:10 -0700 Subject: [PATCH 0427/1029] chore: release 5.1.0 (#504) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- handwritten/logging/CHANGELOG.md | 9 +++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index db2a0983c74..88150617d44 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [5.1.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.0.1...v5.1.0) (2019-06-05) + + +### Features + +* add .repo-metadata.json for docs generation ([#502](https://www.github.com/googleapis/nodejs-logging/issues/502)) ([4a3b80a](https://www.github.com/googleapis/nodejs-logging/commit/4a3b80a)) +* support apiEndpoint override ([#501](https://www.github.com/googleapis/nodejs-logging/issues/501)) ([f701358](https://www.github.com/googleapis/nodejs-logging/commit/f701358)) +* support apiEndpoint override in client constructor ([#505](https://www.github.com/googleapis/nodejs-logging/issues/505)) ([bda7124](https://www.github.com/googleapis/nodejs-logging/commit/bda7124)) + ### [5.0.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.0.0...v5.0.1) (2019-05-21) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 539f368e017..5a5c648197b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.0.1", + "version": "5.1.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From a1b202ddbd76826de18e48774e437166b2417f90 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 7 Jun 2019 07:26:49 -0700 Subject: [PATCH 0428/1029] refactor: changes formatting of various statements --- handwritten/logging/src/index.ts | 4 ++-- handwritten/logging/src/log.ts | 6 ++---- handwritten/logging/synth.metadata | 6 +++--- handwritten/logging/test/log.ts | 4 +--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 76096e4efd6..5fd22289d1d 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -94,7 +94,7 @@ export interface CreateSinkCallback { export type GetEntriesResponse = [ Entry[], google.logging.v2.IListLogEntriesRequest, - google.logging.v2.IListLogEntriesResponse + google.logging.v2.IListLogEntriesResponse, ]; export interface GetEntriesCallback { @@ -118,7 +118,7 @@ export interface GetSinksRequest { export type GetSinksResponse = [ Sink[], google_config.logging.v2.IListSinksRequest, - google_config.logging.v2.IListSinksResponse + google_config.logging.v2.IListSinksResponse, ]; export interface GetSinksCallback { diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 37aba922e10..b85589db2b2 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -75,7 +75,7 @@ export type SeverityNames = keyof typeof Severity; // classes. type LogSeverityFunctions = { // FIXME: the following can be made more precise. - [P in SeverityNames]: Function + [P in SeverityNames]: Function; }; /** @@ -514,9 +514,7 @@ class Log implements LogSeverityFunctions { const projectId = await this.logging.auth.getProjectId(); this.formattedName_ = Log.formatName_(projectId, this.name); if (options.filter) { - options.filter = `(${options.filter}) AND logName="${ - this.formattedName_ - }"`; + options.filter = `(${options.filter}) AND logName="${this.formattedName_}"`; } else { options.filter = `logName="${this.formattedName_}"`; } diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index ade6296dfd9..0fe87b8ae8f 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-06-05T14:21:10.388885Z", + "updateTime": "2019-06-07T11:17:45.937808Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b", - "internalRef": "251635729" + "sha": "15fdbe57306e3a56069af5e2595e9b1bb33b6123", + "internalRef": "251960694" } }, { diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 8ffb69da176..9906889c7f4 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -272,9 +272,7 @@ describe('Log', () => { log.formattedName_ = Log.formatName_(log.logging.projectId, log.name); const expectedOptions = extend({}, options); - expectedOptions.filter = `(${options.filter}) AND logName="${ - log.formattedName_ - }"`; + expectedOptions.filter = `(${options.filter}) AND logName="${log.formattedName_}"`; log.logging.getEntries = options_ => { assert.notDeepStrictEqual(options_, options); From 51c06f5a80faafb51ad2c787d437907cedf67687 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 8 Jun 2019 12:41:05 -0700 Subject: [PATCH 0429/1029] refactor: run fix with new lint rules (#507) --- handwritten/logging/src/index.ts | 4 ++-- handwritten/logging/synth.metadata | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 5fd22289d1d..76096e4efd6 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -94,7 +94,7 @@ export interface CreateSinkCallback { export type GetEntriesResponse = [ Entry[], google.logging.v2.IListLogEntriesRequest, - google.logging.v2.IListLogEntriesResponse, + google.logging.v2.IListLogEntriesResponse ]; export interface GetEntriesCallback { @@ -118,7 +118,7 @@ export interface GetSinksRequest { export type GetSinksResponse = [ Sink[], google_config.logging.v2.IListSinksRequest, - google_config.logging.v2.IListSinksResponse, + google_config.logging.v2.IListSinksResponse ]; export interface GetSinksCallback { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 0fe87b8ae8f..9fb0564a4cd 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-07T11:17:45.937808Z", + "updateTime": "2019-06-08T11:16:06.314657Z", "sources": [ { "generator": { "name": "artman", - "version": "0.23.1", - "dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0" + "version": "0.24.0", + "dockerImage": "googleapis/artman@sha256:ce425884865f57f18307e597bca1a74a3619b7098688d4995261f3ffb3488681" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "15fdbe57306e3a56069af5e2595e9b1bb33b6123", - "internalRef": "251960694" + "sha": "a12347ec47a7f3d18e35f2effc4295c0b0983213", + "internalRef": "252108410" } }, { From c3588f01d1fea0bbc0b6fb614aa58d6412363252 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 10 Jun 2019 14:34:25 -0700 Subject: [PATCH 0430/1029] build: remove unused clang format (#508) --- handwritten/logging/.clang-format | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 handwritten/logging/.clang-format diff --git a/handwritten/logging/.clang-format b/handwritten/logging/.clang-format deleted file mode 100644 index 7d6cf97e108..00000000000 --- a/handwritten/logging/.clang-format +++ /dev/null @@ -1,3 +0,0 @@ -Language: JavaScript -BasedOnStyle: Google -ColumnLimit: 80 \ No newline at end of file From 0f5a7a194ab053e3c000f5c88715278d2246bf89 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 11 Jun 2019 09:21:07 -0700 Subject: [PATCH 0431/1029] fix(deps): update dependency snakecase-keys to v3 (#510) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5a5c648197b..b5e8e2fd964 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -67,7 +67,7 @@ "on-finished": "^2.3.0", "protobufjs": "^6.8.8", "pumpify": "^1.5.1", - "snakecase-keys": "^2.0.0", + "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", "type-fest": "^0.5.0" From e7d8bb567a0d9a8204741bf9f1545cdcf15ad2b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 11 Jun 2019 13:14:22 -0400 Subject: [PATCH 0432/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.14 (#509) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b5e8e2fd964..3ec8843b412 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "@google-cloud/paginator": "^1.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@opencensus/propagation-stackdriver": "0.0.13", + "@opencensus/propagation-stackdriver": "0.0.14", "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", From f600cbc787f330f1abf8dca221c6d60e0966a39b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Jun 2019 08:07:51 -0700 Subject: [PATCH 0433/1029] docs: update return type in jsdoc for Buffers (#512) --- .../logging/src/v2/doc/google/protobuf/doc_any.js | 2 +- handwritten/logging/synth.metadata | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index 9ff5d007807..cdd2fc80e49 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -125,7 +125,7 @@ * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * - * @property {string} value + * @property {Buffer} value * Must be a valid serialized protocol buffer of the above specified type. * * @typedef Any diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 9fb0564a4cd..13a2bd6ec63 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-08T11:16:06.314657Z", + "updateTime": "2019-06-12T11:18:58.409664Z", "sources": [ { "generator": { "name": "artman", - "version": "0.24.0", - "dockerImage": "googleapis/artman@sha256:ce425884865f57f18307e597bca1a74a3619b7098688d4995261f3ffb3488681" + "version": "0.24.1", + "dockerImage": "googleapis/artman@sha256:6018498e15310260dc9b03c9d576608908ed9fbabe42e1494ff3d827fea27b19" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a12347ec47a7f3d18e35f2effc4295c0b0983213", - "internalRef": "252108410" + "sha": "f117dac435e96ebe58d85280a3faf2350c4d4219", + "internalRef": "252714985" } }, { From 703826079a3cf1754f8f43414ccb8c1a03e170aa Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 12 Jun 2019 22:10:16 -0700 Subject: [PATCH 0434/1029] fix(docs): move to new client docs URL (#514) --- handwritten/logging/.repo-metadata.json | 4 ++-- handwritten/logging/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json index 06e28e8cc0e..db8e070eb27 100644 --- a/handwritten/logging/.repo-metadata.json +++ b/handwritten/logging/.repo-metadata.json @@ -2,7 +2,7 @@ "name": "logging", "name_pretty": "Stackdriver Logging", "product_documentation": "https://cloud.google.com/logging/docs", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/logging/latest/", + "client_documentation": "https://googleapis.dev/nodejs/logging/latest", "issue_tracker": "https://issuetracker.google.com/savedsearches/559764", "release_level": "ga", "language": "nodejs", @@ -10,4 +10,4 @@ "distribution_name": "@google-cloud/logging", "api_id": "logging.googleapis.com", "requires_billing": true -} +} \ No newline at end of file diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 14cc145126f..a7ef568fc1d 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -135,7 +135,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest/ +[client-docs]: https://googleapis.dev/nodejs/logging/latest [product-docs]: https://cloud.google.com/logging/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From b0bb204e899fd503623b6ce4b9bfe6bc249a5202 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 14 Jun 2019 07:44:28 -0700 Subject: [PATCH 0435/1029] chore: release 5.1.1 (#511) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- handwritten/logging/CHANGELOG.md | 9 +++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 88150617d44..4d91aa14d5c 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.1.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.1.0...v5.1.1) (2019-06-14) + + +### Bug Fixes + +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.14 ([#509](https://www.github.com/googleapis/nodejs-logging/issues/509)) ([3cba4dc](https://www.github.com/googleapis/nodejs-logging/commit/3cba4dc)) +* **deps:** update dependency snakecase-keys to v3 ([#510](https://www.github.com/googleapis/nodejs-logging/issues/510)) ([eb2193e](https://www.github.com/googleapis/nodejs-logging/commit/eb2193e)) +* **docs:** move to new client docs URL ([#514](https://www.github.com/googleapis/nodejs-logging/issues/514)) ([9043cfa](https://www.github.com/googleapis/nodejs-logging/commit/9043cfa)) + ## [5.1.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.0.1...v5.1.0) (2019-06-05) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3ec8843b412..44082a9b1be 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.1.0", + "version": "5.1.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From dbeaad82443d0f1f1144b73256dc83f11b9d095d Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 14 Jun 2019 10:33:55 -0700 Subject: [PATCH 0436/1029] fix: there is a free tier for logging (#513) --- handwritten/logging/.repo-metadata.json | 5 ++--- handwritten/logging/README.md | 1 - handwritten/logging/synth.metadata | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json index db8e070eb27..4b19132479c 100644 --- a/handwritten/logging/.repo-metadata.json +++ b/handwritten/logging/.repo-metadata.json @@ -8,6 +8,5 @@ "language": "nodejs", "repo": "googleapis/nodejs-logging", "distribution_name": "@google-cloud/logging", - "api_id": "logging.googleapis.com", - "requires_billing": true -} \ No newline at end of file + "api_id": "logging.googleapis.com" +} diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index a7ef568fc1d..4ac27625d1d 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -41,7 +41,6 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Before you begin 1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. 1. [Enable the Stackdriver Logging API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 13a2bd6ec63..413fc7f266e 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-06-12T11:18:58.409664Z", + "updateTime": "2019-06-12T23:14:54.301871Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f117dac435e96ebe58d85280a3faf2350c4d4219", - "internalRef": "252714985" + "sha": "46bfd341116c385fd1671675f918da7d513b20c4", + "internalRef": "252913906" } }, { From 942d913d6e091db33f8aaf65241b0d4c73aa7ad2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 15 Jun 2019 20:53:27 -0700 Subject: [PATCH 0437/1029] fix(deps): update dependency pumpify to v2 (#516) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 44082a9b1be..94de1012775 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -66,7 +66,7 @@ "is": "^3.2.1", "on-finished": "^2.3.0", "protobufjs": "^6.8.8", - "pumpify": "^1.5.1", + "pumpify": "^2.0.0", "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", From 91135976611548d56bab544c722431513260f009 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 15 Jun 2019 21:07:57 -0700 Subject: [PATCH 0438/1029] chore: release 5.1.2 (#517) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 4d91aa14d5c..99327810e9b 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.1.2](https://www.github.com/googleapis/nodejs-logging/compare/v5.1.1...v5.1.2) (2019-06-16) + + +### Bug Fixes + +* there is a free tier for logging ([#513](https://www.github.com/googleapis/nodejs-logging/issues/513)) ([2079598](https://www.github.com/googleapis/nodejs-logging/commit/2079598)) +* **deps:** update dependency pumpify to v2 ([#516](https://www.github.com/googleapis/nodejs-logging/issues/516)) ([11d8f34](https://www.github.com/googleapis/nodejs-logging/commit/11d8f34)) + ### [5.1.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.1.0...v5.1.1) (2019-06-14) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 94de1012775..b09294e67f4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.1.1", + "version": "5.1.2", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From eb2d5350cfc71453dccb5dc77bf29061816e62bb Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 18 Jun 2019 23:09:56 -0700 Subject: [PATCH 0439/1029] build: switch to GitHub magic proxy, for release-please (#519) --- .../.kokoro/continuous/node10/test.cfg | 22 +++++++++++++++++-- handwritten/logging/.kokoro/test.sh | 11 +++++----- handwritten/logging/synth.metadata | 10 ++++----- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/handwritten/logging/.kokoro/continuous/node10/test.cfg b/handwritten/logging/.kokoro/continuous/node10/test.cfg index 38c174e6b3d..fefee48ba76 100644 --- a/handwritten/logging/.kokoro/continuous/node10/test.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/test.cfg @@ -8,12 +8,30 @@ before_action { } } -# token used by release-please to keep an up-to-date release PR. +# tokens used by release-please to keep an up-to-date release PR. before_action { fetch_keystore { keystore_resource { keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" } } } diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 5980db1292b..6eae855d744 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -36,10 +36,11 @@ else echo "coverage is only reported for Node $COVERAGE_NODE" fi -# if the GITHUB_TOKEN is set, we kick off a task to update the release-PR. -GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) || true -if [ "$GITHUB_TOKEN" ]; then - npx release-please release-pr --token=$GITHUB_TOKEN \ +# if release-please keys set, we kick off a task to update the release-PR. +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ --repo-url=googleapis/nodejs-logging \ - --package-name=@google-cloud/logging + --package-name=@google-cloud/logging \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please fi diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 413fc7f266e..a2636c2c348 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-12T23:14:54.301871Z", + "updateTime": "2019-06-18T01:02:24.426260Z", "sources": [ { "generator": { "name": "artman", - "version": "0.24.1", - "dockerImage": "googleapis/artman@sha256:6018498e15310260dc9b03c9d576608908ed9fbabe42e1494ff3d827fea27b19" + "version": "0.26.0", + "dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "46bfd341116c385fd1671675f918da7d513b20c4", - "internalRef": "252913906" + "sha": "384aa843867c4d17756d14a01f047b6368494d32", + "internalRef": "253675319" } }, { From 3c5b0c8f8262edaa223134d4a7f899243aa9ff2f Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 25 Jun 2019 16:42:29 -0700 Subject: [PATCH 0440/1029] fix(docs): link to reference docs section on googleapis.dev (#521) * fix(docs): reference docs should link to section of googleapis.dev with API reference * fix(docs): make anchors work in jsdoc --- handwritten/logging/.jsdoc.js | 3 +++ handwritten/logging/README.md | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 33280bccfbe..527dec23a9c 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -41,5 +41,8 @@ module.exports = { sourceFiles: false, systemName: '@google-cloud/logging', theme: 'lumen' + }, + markdown: { + idInHeadings: true } }; diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 4ac27625d1d..581802d2c78 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -134,10 +134,12 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/logging/latest +[client-docs]: https://googleapis.dev/nodejs/logging/latest#reference [product-docs]: https://cloud.google.com/logging/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file +[auth]: https://cloud.google.com/docs/authentication/getting-started + + From 1a4cf1aa3026878ee61298aaef7136712a083d40 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 26 Jun 2019 15:10:24 -0700 Subject: [PATCH 0441/1029] chore: release 5.1.3 (#522) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 99327810e9b..cf860528e1a 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.1.3](https://www.github.com/googleapis/nodejs-logging/compare/v5.1.2...v5.1.3) (2019-06-26) + + +### Bug Fixes + +* **docs:** link to reference docs section on googleapis.dev ([#521](https://www.github.com/googleapis/nodejs-logging/issues/521)) ([971c1b6](https://www.github.com/googleapis/nodejs-logging/commit/971c1b6)) + ### [5.1.2](https://www.github.com/googleapis/nodejs-logging/compare/v5.1.1...v5.1.2) (2019-06-16) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b09294e67f4..41d7130e67f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.1.2", + "version": "5.1.3", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 6ec6bf2ad4b0f6ebee43ae96e8b105ed87d43c6e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 28 Jun 2019 10:06:33 -0700 Subject: [PATCH 0442/1029] build: use config file for linkinator (#524) --- handwritten/logging/linkinator.config.json | 7 +++++++ handwritten/logging/package.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 handwritten/logging/linkinator.config.json diff --git a/handwritten/logging/linkinator.config.json b/handwritten/logging/linkinator.config.json new file mode 100644 index 00000000000..d780d6bfff5 --- /dev/null +++ b/handwritten/logging/linkinator.config.json @@ -0,0 +1,7 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com" + ] +} diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 41d7130e67f..dba74496f1e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -48,7 +48,7 @@ "proto": "npm run proto:logging && npm run proto:logging_config", "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -", "proto:logging_config": "pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging_config.proto | pbts -o proto/logging_config.d.ts -", - "docs-test": "linkinator docs -r --skip www.googleapis.com", + "docs-test": "linkinator docs", "predocs-test": "npm run docs" }, "dependencies": { @@ -102,7 +102,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.6.2", "jsdoc-baseline": "^0.1.0", - "linkinator": "^1.4.2", + "linkinator": "^1.5.0", "mocha": "^6.1.4", "mv": "^2.1.1", "ncp": "^2.0.0", From 3869901f87f31fb099e6b9db1f941f010b70b7aa Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 15 Jul 2019 09:35:30 -0700 Subject: [PATCH 0443/1029] feat: add path template parsing for billing, organizations, and folders (#529) --- .../src/v2/config_service_v2_client.js | 332 ++++++++++++++++++ .../src/v2/logging_service_v2_client.js | 201 +++++++++++ .../src/v2/metrics_service_v2_client.js | 78 ++++ handwritten/logging/synth.metadata | 10 +- 4 files changed, 616 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index f8211b578c2..26479c80c66 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -101,9 +101,34 @@ class ConfigServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { + billingPathTemplate: new gax.PathTemplate( + 'billingAccounts/{billing_account}' + ), + billingExclusionPathTemplate: new gax.PathTemplate( + 'billingAccounts/{billing_account}/exclusions/{exclusion}' + ), + billingSinkPathTemplate: new gax.PathTemplate( + 'billingAccounts/{billing_account}/sinks/{sink}' + ), exclusionPathTemplate: new gax.PathTemplate( 'projects/{project}/exclusions/{exclusion}' ), + folderPathTemplate: new gax.PathTemplate('folders/{folder}'), + folderExclusionPathTemplate: new gax.PathTemplate( + 'folders/{folder}/exclusions/{exclusion}' + ), + folderSinkPathTemplate: new gax.PathTemplate( + 'folders/{folder}/sinks/{sink}' + ), + organizationPathTemplate: new gax.PathTemplate( + 'organizations/{organization}' + ), + organizationExclusionPathTemplate: new gax.PathTemplate( + 'organizations/{organization}/exclusions/{exclusion}' + ), + organizationSinkPathTemplate: new gax.PathTemplate( + 'organizations/{organization}/sinks/{sink}' + ), projectPathTemplate: new gax.PathTemplate('projects/{project}'), sinkPathTemplate: new gax.PathTemplate('projects/{project}/sinks/{sink}'), }; @@ -1129,6 +1154,46 @@ class ConfigServiceV2Client { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified billing resource name string. + * + * @param {String} billingAccount + * @returns {String} + */ + billingPath(billingAccount) { + return this._pathTemplates.billingPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Return a fully-qualified billing_exclusion resource name string. + * + * @param {String} billingAccount + * @param {String} exclusion + * @returns {String} + */ + billingExclusionPath(billingAccount, exclusion) { + return this._pathTemplates.billingExclusionPathTemplate.render({ + billing_account: billingAccount, + exclusion: exclusion, + }); + } + + /** + * Return a fully-qualified billing_sink resource name string. + * + * @param {String} billingAccount + * @param {String} sink + * @returns {String} + */ + billingSinkPath(billingAccount, sink) { + return this._pathTemplates.billingSinkPathTemplate.render({ + billing_account: billingAccount, + sink: sink, + }); + } + /** * Return a fully-qualified exclusion resource name string. * @@ -1143,6 +1208,86 @@ class ConfigServiceV2Client { }); } + /** + * Return a fully-qualified folder resource name string. + * + * @param {String} folder + * @returns {String} + */ + folderPath(folder) { + return this._pathTemplates.folderPathTemplate.render({ + folder: folder, + }); + } + + /** + * Return a fully-qualified folder_exclusion resource name string. + * + * @param {String} folder + * @param {String} exclusion + * @returns {String} + */ + folderExclusionPath(folder, exclusion) { + return this._pathTemplates.folderExclusionPathTemplate.render({ + folder: folder, + exclusion: exclusion, + }); + } + + /** + * Return a fully-qualified folder_sink resource name string. + * + * @param {String} folder + * @param {String} sink + * @returns {String} + */ + folderSinkPath(folder, sink) { + return this._pathTemplates.folderSinkPathTemplate.render({ + folder: folder, + sink: sink, + }); + } + + /** + * Return a fully-qualified organization resource name string. + * + * @param {String} organization + * @returns {String} + */ + organizationPath(organization) { + return this._pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Return a fully-qualified organization_exclusion resource name string. + * + * @param {String} organization + * @param {String} exclusion + * @returns {String} + */ + organizationExclusionPath(organization, exclusion) { + return this._pathTemplates.organizationExclusionPathTemplate.render({ + organization: organization, + exclusion: exclusion, + }); + } + + /** + * Return a fully-qualified organization_sink resource name string. + * + * @param {String} organization + * @param {String} sink + * @returns {String} + */ + organizationSinkPath(organization, sink) { + return this._pathTemplates.organizationSinkPathTemplate.render({ + organization: organization, + sink: sink, + }); + } + /** * Return a fully-qualified project resource name string. * @@ -1169,6 +1314,68 @@ class ConfigServiceV2Client { }); } + /** + * Parse the billingName from a billing resource. + * + * @param {String} billingName + * A fully-qualified path representing a billing resources. + * @returns {String} - A string representing the billing_account. + */ + matchBillingAccountFromBillingName(billingName) { + return this._pathTemplates.billingPathTemplate.match(billingName) + .billing_account; + } + + /** + * Parse the billingExclusionName from a billing_exclusion resource. + * + * @param {String} billingExclusionName + * A fully-qualified path representing a billing_exclusion resources. + * @returns {String} - A string representing the billing_account. + */ + matchBillingAccountFromBillingExclusionName(billingExclusionName) { + return this._pathTemplates.billingExclusionPathTemplate.match( + billingExclusionName + ).billing_account; + } + + /** + * Parse the billingExclusionName from a billing_exclusion resource. + * + * @param {String} billingExclusionName + * A fully-qualified path representing a billing_exclusion resources. + * @returns {String} - A string representing the exclusion. + */ + matchExclusionFromBillingExclusionName(billingExclusionName) { + return this._pathTemplates.billingExclusionPathTemplate.match( + billingExclusionName + ).exclusion; + } + + /** + * Parse the billingSinkName from a billing_sink resource. + * + * @param {String} billingSinkName + * A fully-qualified path representing a billing_sink resources. + * @returns {String} - A string representing the billing_account. + */ + matchBillingAccountFromBillingSinkName(billingSinkName) { + return this._pathTemplates.billingSinkPathTemplate.match(billingSinkName) + .billing_account; + } + + /** + * Parse the billingSinkName from a billing_sink resource. + * + * @param {String} billingSinkName + * A fully-qualified path representing a billing_sink resources. + * @returns {String} - A string representing the sink. + */ + matchSinkFromBillingSinkName(billingSinkName) { + return this._pathTemplates.billingSinkPathTemplate.match(billingSinkName) + .sink; + } + /** * Parse the exclusionName from a exclusion resource. * @@ -1193,6 +1400,131 @@ class ConfigServiceV2Client { .exclusion; } + /** + * Parse the folderName from a folder resource. + * + * @param {String} folderName + * A fully-qualified path representing a folder resources. + * @returns {String} - A string representing the folder. + */ + matchFolderFromFolderName(folderName) { + return this._pathTemplates.folderPathTemplate.match(folderName).folder; + } + + /** + * Parse the folderExclusionName from a folder_exclusion resource. + * + * @param {String} folderExclusionName + * A fully-qualified path representing a folder_exclusion resources. + * @returns {String} - A string representing the folder. + */ + matchFolderFromFolderExclusionName(folderExclusionName) { + return this._pathTemplates.folderExclusionPathTemplate.match( + folderExclusionName + ).folder; + } + + /** + * Parse the folderExclusionName from a folder_exclusion resource. + * + * @param {String} folderExclusionName + * A fully-qualified path representing a folder_exclusion resources. + * @returns {String} - A string representing the exclusion. + */ + matchExclusionFromFolderExclusionName(folderExclusionName) { + return this._pathTemplates.folderExclusionPathTemplate.match( + folderExclusionName + ).exclusion; + } + + /** + * Parse the folderSinkName from a folder_sink resource. + * + * @param {String} folderSinkName + * A fully-qualified path representing a folder_sink resources. + * @returns {String} - A string representing the folder. + */ + matchFolderFromFolderSinkName(folderSinkName) { + return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + .folder; + } + + /** + * Parse the folderSinkName from a folder_sink resource. + * + * @param {String} folderSinkName + * A fully-qualified path representing a folder_sink resources. + * @returns {String} - A string representing the sink. + */ + matchSinkFromFolderSinkName(folderSinkName) { + return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + .sink; + } + + /** + * Parse the organizationName from a organization resource. + * + * @param {String} organizationName + * A fully-qualified path representing a organization resources. + * @returns {String} - A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName) { + return this._pathTemplates.organizationPathTemplate.match(organizationName) + .organization; + } + + /** + * Parse the organizationExclusionName from a organization_exclusion resource. + * + * @param {String} organizationExclusionName + * A fully-qualified path representing a organization_exclusion resources. + * @returns {String} - A string representing the organization. + */ + matchOrganizationFromOrganizationExclusionName(organizationExclusionName) { + return this._pathTemplates.organizationExclusionPathTemplate.match( + organizationExclusionName + ).organization; + } + + /** + * Parse the organizationExclusionName from a organization_exclusion resource. + * + * @param {String} organizationExclusionName + * A fully-qualified path representing a organization_exclusion resources. + * @returns {String} - A string representing the exclusion. + */ + matchExclusionFromOrganizationExclusionName(organizationExclusionName) { + return this._pathTemplates.organizationExclusionPathTemplate.match( + organizationExclusionName + ).exclusion; + } + + /** + * Parse the organizationSinkName from a organization_sink resource. + * + * @param {String} organizationSinkName + * A fully-qualified path representing a organization_sink resources. + * @returns {String} - A string representing the organization. + */ + matchOrganizationFromOrganizationSinkName(organizationSinkName) { + return this._pathTemplates.organizationSinkPathTemplate.match( + organizationSinkName + ).organization; + } + + /** + * Parse the organizationSinkName from a organization_sink resource. + * + * @param {String} organizationSinkName + * A fully-qualified path representing a organization_sink resources. + * @returns {String} - A string representing the sink. + */ + matchSinkFromOrganizationSinkName(organizationSinkName) { + return this._pathTemplates.organizationSinkPathTemplate.match( + organizationSinkName + ).sink; + } + /** * Parse the projectName from a project resource. * diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index b88af96de20..e9847bc84dc 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -101,7 +101,23 @@ class LoggingServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { + billingPathTemplate: new gax.PathTemplate( + 'billingAccounts/{billing_account}' + ), + billingLogPathTemplate: new gax.PathTemplate( + 'billingAccounts/{billing_account}/logs/{log}' + ), + folderPathTemplate: new gax.PathTemplate('folders/{folder}'), + folderLogPathTemplate: new gax.PathTemplate( + 'folders/{folder}/logs/{log}' + ), logPathTemplate: new gax.PathTemplate('projects/{project}/logs/{log}'), + organizationPathTemplate: new gax.PathTemplate( + 'organizations/{organization}' + ), + organizationLogPathTemplate: new gax.PathTemplate( + 'organizations/{organization}/logs/{log}' + ), projectPathTemplate: new gax.PathTemplate('projects/{project}'), }; @@ -952,6 +968,58 @@ class LoggingServiceV2Client { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified billing resource name string. + * + * @param {String} billingAccount + * @returns {String} + */ + billingPath(billingAccount) { + return this._pathTemplates.billingPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Return a fully-qualified billing_log resource name string. + * + * @param {String} billingAccount + * @param {String} log + * @returns {String} + */ + billingLogPath(billingAccount, log) { + return this._pathTemplates.billingLogPathTemplate.render({ + billing_account: billingAccount, + log: log, + }); + } + + /** + * Return a fully-qualified folder resource name string. + * + * @param {String} folder + * @returns {String} + */ + folderPath(folder) { + return this._pathTemplates.folderPathTemplate.render({ + folder: folder, + }); + } + + /** + * Return a fully-qualified folder_log resource name string. + * + * @param {String} folder + * @param {String} log + * @returns {String} + */ + folderLogPath(folder, log) { + return this._pathTemplates.folderLogPathTemplate.render({ + folder: folder, + log: log, + }); + } + /** * Return a fully-qualified log resource name string. * @@ -966,6 +1034,32 @@ class LoggingServiceV2Client { }); } + /** + * Return a fully-qualified organization resource name string. + * + * @param {String} organization + * @returns {String} + */ + organizationPath(organization) { + return this._pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Return a fully-qualified organization_log resource name string. + * + * @param {String} organization + * @param {String} log + * @returns {String} + */ + organizationLogPath(organization, log) { + return this._pathTemplates.organizationLogPathTemplate.render({ + organization: organization, + log: log, + }); + } + /** * Return a fully-qualified project resource name string. * @@ -978,6 +1072,75 @@ class LoggingServiceV2Client { }); } + /** + * Parse the billingName from a billing resource. + * + * @param {String} billingName + * A fully-qualified path representing a billing resources. + * @returns {String} - A string representing the billing_account. + */ + matchBillingAccountFromBillingName(billingName) { + return this._pathTemplates.billingPathTemplate.match(billingName) + .billing_account; + } + + /** + * Parse the billingLogName from a billing_log resource. + * + * @param {String} billingLogName + * A fully-qualified path representing a billing_log resources. + * @returns {String} - A string representing the billing_account. + */ + matchBillingAccountFromBillingLogName(billingLogName) { + return this._pathTemplates.billingLogPathTemplate.match(billingLogName) + .billing_account; + } + + /** + * Parse the billingLogName from a billing_log resource. + * + * @param {String} billingLogName + * A fully-qualified path representing a billing_log resources. + * @returns {String} - A string representing the log. + */ + matchLogFromBillingLogName(billingLogName) { + return this._pathTemplates.billingLogPathTemplate.match(billingLogName).log; + } + + /** + * Parse the folderName from a folder resource. + * + * @param {String} folderName + * A fully-qualified path representing a folder resources. + * @returns {String} - A string representing the folder. + */ + matchFolderFromFolderName(folderName) { + return this._pathTemplates.folderPathTemplate.match(folderName).folder; + } + + /** + * Parse the folderLogName from a folder_log resource. + * + * @param {String} folderLogName + * A fully-qualified path representing a folder_log resources. + * @returns {String} - A string representing the folder. + */ + matchFolderFromFolderLogName(folderLogName) { + return this._pathTemplates.folderLogPathTemplate.match(folderLogName) + .folder; + } + + /** + * Parse the folderLogName from a folder_log resource. + * + * @param {String} folderLogName + * A fully-qualified path representing a folder_log resources. + * @returns {String} - A string representing the log. + */ + matchLogFromFolderLogName(folderLogName) { + return this._pathTemplates.folderLogPathTemplate.match(folderLogName).log; + } + /** * Parse the logName from a log resource. * @@ -1000,6 +1163,44 @@ class LoggingServiceV2Client { return this._pathTemplates.logPathTemplate.match(logName).log; } + /** + * Parse the organizationName from a organization resource. + * + * @param {String} organizationName + * A fully-qualified path representing a organization resources. + * @returns {String} - A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName) { + return this._pathTemplates.organizationPathTemplate.match(organizationName) + .organization; + } + + /** + * Parse the organizationLogName from a organization_log resource. + * + * @param {String} organizationLogName + * A fully-qualified path representing a organization_log resources. + * @returns {String} - A string representing the organization. + */ + matchOrganizationFromOrganizationLogName(organizationLogName) { + return this._pathTemplates.organizationLogPathTemplate.match( + organizationLogName + ).organization; + } + + /** + * Parse the organizationLogName from a organization_log resource. + * + * @param {String} organizationLogName + * A fully-qualified path representing a organization_log resources. + * @returns {String} - A string representing the log. + */ + matchLogFromOrganizationLogName(organizationLogName) { + return this._pathTemplates.organizationLogPathTemplate.match( + organizationLogName + ).log; + } + /** * Parse the projectName from a project resource. * diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index e2a996683c5..80331b663e1 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -100,9 +100,16 @@ class MetricsServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { + billingPathTemplate: new gax.PathTemplate( + 'billingAccounts/{billing_account}' + ), + folderPathTemplate: new gax.PathTemplate('folders/{folder}'), metricPathTemplate: new gax.PathTemplate( 'projects/{project}/metrics/{metric}' ), + organizationPathTemplate: new gax.PathTemplate( + 'organizations/{organization}' + ), projectPathTemplate: new gax.PathTemplate('projects/{project}'), }; @@ -615,6 +622,30 @@ class MetricsServiceV2Client { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified billing resource name string. + * + * @param {String} billingAccount + * @returns {String} + */ + billingPath(billingAccount) { + return this._pathTemplates.billingPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Return a fully-qualified folder resource name string. + * + * @param {String} folder + * @returns {String} + */ + folderPath(folder) { + return this._pathTemplates.folderPathTemplate.render({ + folder: folder, + }); + } + /** * Return a fully-qualified metric resource name string. * @@ -629,6 +660,18 @@ class MetricsServiceV2Client { }); } + /** + * Return a fully-qualified organization resource name string. + * + * @param {String} organization + * @returns {String} + */ + organizationPath(organization) { + return this._pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + /** * Return a fully-qualified project resource name string. * @@ -641,6 +684,29 @@ class MetricsServiceV2Client { }); } + /** + * Parse the billingName from a billing resource. + * + * @param {String} billingName + * A fully-qualified path representing a billing resources. + * @returns {String} - A string representing the billing_account. + */ + matchBillingAccountFromBillingName(billingName) { + return this._pathTemplates.billingPathTemplate.match(billingName) + .billing_account; + } + + /** + * Parse the folderName from a folder resource. + * + * @param {String} folderName + * A fully-qualified path representing a folder resources. + * @returns {String} - A string representing the folder. + */ + matchFolderFromFolderName(folderName) { + return this._pathTemplates.folderPathTemplate.match(folderName).folder; + } + /** * Parse the metricName from a metric resource. * @@ -663,6 +729,18 @@ class MetricsServiceV2Client { return this._pathTemplates.metricPathTemplate.match(metricName).metric; } + /** + * Parse the organizationName from a organization resource. + * + * @param {String} organizationName + * A fully-qualified path representing a organization resources. + * @returns {String} - A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName) { + return this._pathTemplates.organizationPathTemplate.match(organizationName) + .organization; + } + /** * Parse the projectName from a project resource. * diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index a2636c2c348..6b8adea0892 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-18T01:02:24.426260Z", + "updateTime": "2019-07-11T11:16:15.470106Z", "sources": [ { "generator": { "name": "artman", - "version": "0.26.0", - "dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15" + "version": "0.29.4", + "dockerImage": "googleapis/artman@sha256:63f21e83cb92680b7001dc381069e962c9e6dee314fd8365ac554c07c89221fb" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "384aa843867c4d17756d14a01f047b6368494d32", - "internalRef": "253675319" + "sha": "c50d9e822e19e069b7e3758736ea58cb4f35267c", + "internalRef": "257512381" } }, { From 8fb02e427f6c456ffb139ceba6debb7ae7be6477 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 17 Jul 2019 06:20:29 -0700 Subject: [PATCH 0444/1029] chore: release 5.2.0 (#530) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index cf860528e1a..fd39a3582a8 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [5.2.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.1.3...v5.2.0) (2019-07-17) + + +### Features + +* add path template parsing for billing, organizations, and folders ([#529](https://www.github.com/googleapis/nodejs-logging/issues/529)) ([1e8c67f](https://www.github.com/googleapis/nodejs-logging/commit/1e8c67f)) + ### [5.1.3](https://www.github.com/googleapis/nodejs-logging/compare/v5.1.2...v5.1.3) (2019-06-26) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index dba74496f1e..3b3bfcb880d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.1.3", + "version": "5.2.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From aecee598630c515246ec28565a21a0ded9b8e4cd Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Jul 2019 18:15:57 +0300 Subject: [PATCH 0445/1029] fix(deps): update dependency google-auth-library to v5 (#539) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3b3bfcb880d..e5d61e93b07 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,7 @@ "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^2.0.0", - "google-auth-library": "^4.0.0", + "google-auth-library": "^5.0.0", "google-gax": "^1.0.0", "is": "^3.2.1", "on-finished": "^2.3.0", From 14137024e4cf6a3bdb673212d6b005cda262745a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Jul 2019 18:58:28 +0300 Subject: [PATCH 0446/1029] chore(deps): update linters (#536) --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e5d61e93b07..49951082df7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -93,8 +93,8 @@ "bignumber.js": "^9.0.0", "chai": "^4.2.0", "codecov": "^3.0.4", - "eslint": "^5.4.0", - "eslint-config-prettier": "^4.0.0", + "eslint": "^6.0.0", + "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^1.0.0", From b93e6749646004736facfad0c2d4c13ef22c7b7e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Jul 2019 09:01:40 -0700 Subject: [PATCH 0447/1029] docs: use the jsdoc-fresh theme (#543) --- handwritten/logging/.jsdoc.js | 2 +- handwritten/logging/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 527dec23a9c..96d76684a94 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -20,7 +20,7 @@ module.exports = { opts: { readme: './README.md', package: './package.json', - template: './node_modules/jsdoc-baseline', + template: './node_modules/jsdoc-fresh', recurse: true, verbose: true, destination: './docs/' diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 49951082df7..4194fcd1f39 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -101,7 +101,7 @@ "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.6.2", - "jsdoc-baseline": "^0.1.0", + "jsdoc-fresh": "^1.0.1", "linkinator": "^1.5.0", "mocha": "^6.1.4", "mv": "^2.1.1", From 93c87865a5ee16a63544a24eefbbb4fcf4166a8e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Jul 2019 16:07:08 -0700 Subject: [PATCH 0448/1029] docs: document apiEndpoint over servicePath (#544) --- handwritten/logging/src/v2/config_service_v2_client.js | 2 +- handwritten/logging/src/v2/logging_service_v2_client.js | 2 +- handwritten/logging/src/v2/metrics_service_v2_client.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 26479c80c66..bf44529bfa7 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -52,7 +52,7 @@ class ConfigServiceV2Client { * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string} [options.servicePath] - The domain name of the + * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ constructor(opts) { diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index e9847bc84dc..48da4daf78d 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -52,7 +52,7 @@ class LoggingServiceV2Client { * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string} [options.servicePath] - The domain name of the + * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ constructor(opts) { diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 80331b663e1..1522f71f7e0 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -51,7 +51,7 @@ class MetricsServiceV2Client { * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string} [options.servicePath] - The domain name of the + * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ constructor(opts) { From 774e8d53991eadfed3febaf1d42c1918feb4a4b9 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 1 Aug 2019 11:38:26 -0700 Subject: [PATCH 0449/1029] test: address a couple minor issues with system tests (#548) --- handwritten/logging/system-test/logging.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index fffed7b7928..6591a883c45 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -39,7 +39,7 @@ nock(HOST_ADDRESS) describe('Logging', () => { let PROJECT_ID: string; const TESTS_PREFIX = 'gcloud-logging-test'; - const WRITE_CONSISTENCY_DELAY_MS = 10000; + const WRITE_CONSISTENCY_DELAY_MS = 15000; const bigQuery = new BigQuery(); const pubsub = new PubSub(); @@ -322,22 +322,25 @@ describe('Logging', () => { }); describe('log-specific entries', () => { - const {log, logEntries} = getTestLog(); + let logExpected, logEntriesExpected; before(done => { + const {log, logEntries} = getTestLog(); + logExpected = log; + logEntriesExpected = logEntries; log.write(logEntries, options, done); }); it('should list log entries', done => { - getEntriesFromLog(log, (err, entries) => { + getEntriesFromLog(logExpected, (err, entries) => { assert.ifError(err); - assert.strictEqual(entries.length, logEntries.length); + assert.strictEqual(entries.length, logEntriesExpected.length); done(); }); }); it('should list log entries as a stream', done => { - const logstream = log + const logstream = logExpected .getEntriesStream({ autoPaginate: false, pageSize: 1, @@ -357,7 +360,7 @@ describe('Logging', () => { it('should write a single entry to a log as a Promise', async () => { const {log, logEntries} = getTestLog(); - log.write(logEntries[1], options); + await log.write(logEntries[1], options); }); it('should write multiple entries to a log', done => { From 2bd02f7dd66168f39340efe99cc72dabf979b271 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 1 Aug 2019 11:53:43 -0700 Subject: [PATCH 0450/1029] chore: make our delete logic slightly smarter (#549) --- handwritten/logging/system-test/logging.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 6591a883c45..1a5b60dbc0c 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -39,7 +39,7 @@ nock(HOST_ADDRESS) describe('Logging', () => { let PROJECT_ID: string; const TESTS_PREFIX = 'gcloud-logging-test'; - const WRITE_CONSISTENCY_DELAY_MS = 15000; + const WRITE_CONSISTENCY_DELAY_MS = 5000; const bigQuery = new BigQuery(); const pubsub = new PubSub(); @@ -283,10 +283,21 @@ describe('Logging', () => { }; after(async () => { - await new Promise(r => setTimeout(r, WRITE_CONSISTENCY_DELAY_MS)); - for (const log of logs) { - await log.delete(); + // attempt to delete log entries multiple times, as they can + // take a variable amount of time to write to the API: + let retries = 0; + while (retries < 3) { + try { + await log.delete(); + } catch (_err) { + retries++; + console.warn(`delete of ${log.name} failed retries = ${retries}`); + await new Promise(r => setTimeout(r, WRITE_CONSISTENCY_DELAY_MS)); + continue; + } + break; + } } }); From ed855e9889586f5eadcb972c751b98563ca8d7f5 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 1 Aug 2019 12:01:45 -0700 Subject: [PATCH 0451/1029] build: add Node 12 remove Node 11 (#545) --- .../logging/.kokoro/continuous/{node11 => node12}/common.cfg | 2 +- .../logging/.kokoro/continuous/{node11 => node12}/test.cfg | 0 .../logging/.kokoro/presubmit/{node11 => node12}/common.cfg | 2 +- .../logging/.kokoro/presubmit/{node11 => node12}/test.cfg | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename handwritten/logging/.kokoro/continuous/{node11 => node12}/common.cfg (89%) rename handwritten/logging/.kokoro/continuous/{node11 => node12}/test.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node11 => node12}/common.cfg (89%) rename handwritten/logging/.kokoro/presubmit/{node11 => node12}/test.cfg (100%) diff --git a/handwritten/logging/.kokoro/continuous/node11/common.cfg b/handwritten/logging/.kokoro/continuous/node12/common.cfg similarity index 89% rename from handwritten/logging/.kokoro/continuous/node11/common.cfg rename to handwritten/logging/.kokoro/continuous/node12/common.cfg index 12ea8516130..40e5c76100c 100644 --- a/handwritten/logging/.kokoro/continuous/node11/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node12/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:11-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/continuous/node11/test.cfg b/handwritten/logging/.kokoro/continuous/node12/test.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node11/test.cfg rename to handwritten/logging/.kokoro/continuous/node12/test.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node11/common.cfg b/handwritten/logging/.kokoro/presubmit/node12/common.cfg similarity index 89% rename from handwritten/logging/.kokoro/presubmit/node11/common.cfg rename to handwritten/logging/.kokoro/presubmit/node12/common.cfg index 12ea8516130..40e5c76100c 100644 --- a/handwritten/logging/.kokoro/presubmit/node11/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node12/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:11-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/presubmit/node11/test.cfg b/handwritten/logging/.kokoro/presubmit/node12/test.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node11/test.cfg rename to handwritten/logging/.kokoro/presubmit/node12/test.cfg From 86e0dd55a1591b68235fbc6a8a72ebca78cfbcc9 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 1 Aug 2019 22:19:42 +0300 Subject: [PATCH 0452/1029] fix(deps): update dependency @google-cloud/paginator to v2 (#537) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 4194fcd1f39..5e7634dd033 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -53,7 +53,7 @@ }, "dependencies": { "@google-cloud/common-grpc": "^1.0.0", - "@google-cloud/paginator": "^1.0.0", + "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", "@opencensus/propagation-stackdriver": "0.0.14", From bbeae8b2a81e9ef427561c7992623678d083eeb0 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 1 Aug 2019 13:04:08 -0700 Subject: [PATCH 0453/1029] chore: update deps (#551) --- handwritten/logging/package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5e7634dd033..b0a83178249 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@opencensus/propagation-stackdriver": "0.0.14", + "@opencensus/propagation-stackdriver": "0.0.16", "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", @@ -70,13 +70,13 @@ "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", - "type-fest": "^0.5.0" + "type-fest": "^0.6.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", "@google-cloud/nodejs-repo-tools": "^3.3.0", - "@google-cloud/pubsub": "^0.29.0", - "@google-cloud/storage": "^2.2.0", + "@google-cloud/pubsub": "^0.30.2", + "@google-cloud/storage": "^3.0.4", "@types/extend": "^3.0.0", "@types/is": "0.0.21", "@types/mocha": "^5.2.5", @@ -98,6 +98,7 @@ "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^1.0.0", + "grpc": "^1.22.2", "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.6.2", From c99e799db8bf2753daf2b621b3627f440a387fd7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 2 Aug 2019 10:52:57 -0700 Subject: [PATCH 0454/1029] fix: allow calls with no request, add JSON proto --- handwritten/logging/protos/protos.json | 2356 +++++++++++++++++ .../logging/src/service_proto_list.json | 1 + .../src/v2/config_service_v2_client.js | 10 + .../src/v2/logging_service_v2_client.js | 5 + .../src/v2/metrics_service_v2_client.js | 5 + handwritten/logging/synth.metadata | 10 +- 6 files changed, 2382 insertions(+), 5 deletions(-) create mode 100644 handwritten/logging/protos/protos.json create mode 100644 handwritten/logging/src/service_proto_list.json diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json new file mode 100644 index 00000000000..64601a9d71f --- /dev/null +++ b/handwritten/logging/protos/protos.json @@ -0,0 +1,2356 @@ +{ + "nested": { + "google": { + "nested": { + "logging": { + "nested": { + "v2": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Logging.V2", + "go_package": "google.golang.org/genproto/googleapis/logging/v2;logging", + "java_multiple_files": true, + "java_outer_classname": "LoggingMetricsProto", + "java_package": "com.google.logging.v2", + "php_namespace": "Google\\Cloud\\Logging\\V2" + }, + "nested": { + "LoggingServiceV2": { + "methods": { + "DeleteLog": { + "requestType": "DeleteLogRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}" + } + }, + "WriteLogEntries": { + "requestType": "WriteLogEntriesRequest", + "responseType": "WriteLogEntriesResponse", + "options": { + "(google.api.http).post": "/v2/entries:write", + "(google.api.http).body": "*" + } + }, + "ListLogEntries": { + "requestType": "ListLogEntriesRequest", + "responseType": "ListLogEntriesResponse", + "options": { + "(google.api.http).post": "/v2/entries:list", + "(google.api.http).body": "*" + } + }, + "ListMonitoredResourceDescriptors": { + "requestType": "ListMonitoredResourceDescriptorsRequest", + "responseType": "ListMonitoredResourceDescriptorsResponse", + "options": { + "(google.api.http).get": "/v2/monitoredResourceDescriptors" + } + }, + "ListLogs": { + "requestType": "ListLogsRequest", + "responseType": "ListLogsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/logs", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs" + } + } + } + }, + "DeleteLogRequest": { + "fields": { + "logName": { + "type": "string", + "id": 1 + } + } + }, + "WriteLogEntriesRequest": { + "fields": { + "logName": { + "type": "string", + "id": 1 + }, + "resource": { + "type": "google.api.MonitoredResource", + "id": 2 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 4 + }, + "partialSuccess": { + "type": "bool", + "id": 5 + }, + "dryRun": { + "type": "bool", + "id": 6 + } + } + }, + "WriteLogEntriesResponse": { + "fields": {} + }, + "WriteLogEntriesPartialErrors": { + "fields": { + "logEntryErrors": { + "keyType": "int32", + "type": "google.rpc.Status", + "id": 1 + } + } + }, + "ListLogEntriesRequest": { + "fields": { + "projectIds": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "filter": { + "type": "string", + "id": 2 + }, + "orderBy": { + "type": "string", + "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 5 + } + } + }, + "ListLogEntriesResponse": { + "fields": { + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListMonitoredResourceDescriptorsRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListMonitoredResourceDescriptorsResponse": { + "fields": { + "resourceDescriptors": { + "rule": "repeated", + "type": "google.api.MonitoredResourceDescriptor", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListLogsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListLogsResponse": { + "fields": { + "logNames": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "LogEntry": { + "oneofs": { + "payload": { + "oneof": [ + "protoPayload", + "textPayload", + "jsonPayload" + ] + } + }, + "fields": { + "logName": { + "type": "string", + "id": 12 + }, + "resource": { + "type": "google.api.MonitoredResource", + "id": 8 + }, + "protoPayload": { + "type": "google.protobuf.Any", + "id": 2 + }, + "textPayload": { + "type": "string", + "id": 3 + }, + "jsonPayload": { + "type": "google.protobuf.Struct", + "id": 6 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "receiveTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 24 + }, + "severity": { + "type": "google.logging.type.LogSeverity", + "id": 10 + }, + "insertId": { + "type": "string", + "id": 4 + }, + "httpRequest": { + "type": "google.logging.type.HttpRequest", + "id": 7 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 11 + }, + "metadata": { + "type": "google.api.MonitoredResourceMetadata", + "id": 25 + }, + "operation": { + "type": "LogEntryOperation", + "id": 15 + }, + "trace": { + "type": "string", + "id": 22 + }, + "spanId": { + "type": "string", + "id": 27 + }, + "traceSampled": { + "type": "bool", + "id": 30 + }, + "sourceLocation": { + "type": "LogEntrySourceLocation", + "id": 23 + } + } + }, + "LogEntryOperation": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "producer": { + "type": "string", + "id": 2 + }, + "first": { + "type": "bool", + "id": 3 + }, + "last": { + "type": "bool", + "id": 4 + } + } + }, + "LogEntrySourceLocation": { + "fields": { + "file": { + "type": "string", + "id": 1 + }, + "line": { + "type": "int64", + "id": 2 + }, + "function": { + "type": "string", + "id": 3 + } + } + }, + "ConfigServiceV2": { + "methods": { + "ListSinks": { + "requestType": "ListSinksRequest", + "responseType": "ListSinksResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/sinks", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks" + } + }, + "GetSink": { + "requestType": "GetSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "CreateSink": { + "requestType": "CreateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).post": "/v2/{parent=*/*}/sinks", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.http).additional_bindings.body": "sink" + } + }, + "UpdateSink": { + "requestType": "UpdateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "DeleteSink": { + "requestType": "DeleteSinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "ListExclusions": { + "requestType": "ListExclusionsRequest", + "responseType": "ListExclusionsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/exclusions", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions" + } + }, + "GetExclusion": { + "requestType": "GetExclusionRequest", + "responseType": "LogExclusion", + "options": { + "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}" + } + }, + "CreateExclusion": { + "requestType": "CreateExclusionRequest", + "responseType": "LogExclusion", + "options": { + "(google.api.http).post": "/v2/{parent=*/*}/exclusions", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.http).additional_bindings.body": "exclusion" + } + }, + "UpdateExclusion": { + "requestType": "UpdateExclusionRequest", + "responseType": "LogExclusion", + "options": { + "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.http).additional_bindings.body": "exclusion" + } + }, + "DeleteExclusion": { + "requestType": "DeleteExclusionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}" + } + } + } + }, + "LogSink": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "destination": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 5 + }, + "outputVersionFormat": { + "type": "VersionFormat", + "id": 6, + "options": { + "deprecated": true + } + }, + "writerIdentity": { + "type": "string", + "id": 8 + }, + "includeChildren": { + "type": "bool", + "id": 9 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "deprecated": true + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "deprecated": true + } + } + }, + "nested": { + "VersionFormat": { + "values": { + "VERSION_FORMAT_UNSPECIFIED": 0, + "V2": 1, + "V1": 2 + } + } + } + }, + "ListSinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListSinksResponse": { + "fields": { + "sinks": { + "rule": "repeated", + "type": "LogSink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1 + } + } + }, + "CreateSinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "sink": { + "type": "LogSink", + "id": 2 + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3 + } + } + }, + "UpdateSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1 + }, + "sink": { + "type": "LogSink", + "id": 2 + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4 + } + } + }, + "DeleteSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1 + } + } + }, + "LogExclusion": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "filter": { + "type": "string", + "id": 3 + }, + "disabled": { + "type": "bool", + "id": 4 + } + } + }, + "ListExclusionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListExclusionsResponse": { + "fields": { + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "CreateExclusionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "exclusion": { + "type": "LogExclusion", + "id": 2 + } + } + }, + "UpdateExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "exclusion": { + "type": "LogExclusion", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "DeleteExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "MetricsServiceV2": { + "methods": { + "ListLogMetrics": { + "requestType": "ListLogMetricsRequest", + "responseType": "ListLogMetricsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*}/metrics" + } + }, + "GetLogMetric": { + "requestType": "GetLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).get": "/v2/{metric_name=projects/*/metrics/*}" + } + }, + "CreateLogMetric": { + "requestType": "CreateLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/metrics", + "(google.api.http).body": "metric" + } + }, + "UpdateLogMetric": { + "requestType": "UpdateLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).put": "/v2/{metric_name=projects/*/metrics/*}", + "(google.api.http).body": "metric" + } + }, + "DeleteLogMetric": { + "requestType": "DeleteLogMetricRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{metric_name=projects/*/metrics/*}" + } + } + } + }, + "LogMetric": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "filter": { + "type": "string", + "id": 3 + }, + "metricDescriptor": { + "type": "google.api.MetricDescriptor", + "id": 5 + }, + "valueExtractor": { + "type": "string", + "id": 6 + }, + "labelExtractors": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "bucketOptions": { + "type": "google.api.Distribution.BucketOptions", + "id": 8 + }, + "version": { + "type": "ApiVersion", + "id": 4, + "options": { + "deprecated": true + } + } + }, + "nested": { + "ApiVersion": { + "values": { + "V2": 0, + "V1": 1 + } + } + } + }, + "ListLogMetricsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListLogMetricsResponse": { + "fields": { + "metrics": { + "rule": "repeated", + "type": "LogMetric", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "CreateLogMetricRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "metric": { + "type": "LogMetric", + "id": 2 + } + } + }, + "UpdateLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + }, + "metric": { + "type": "LogMetric", + "id": 2 + } + } + }, + "DeleteLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + } + } + }, + "type": { + "options": { + "csharp_namespace": "Google.Cloud.Logging.Type", + "go_package": "google.golang.org/genproto/googleapis/logging/type;ltype", + "java_multiple_files": true, + "java_outer_classname": "LogSeverityProto", + "java_package": "com.google.logging.type", + "php_namespace": "Google\\Cloud\\Logging\\Type" + }, + "nested": { + "HttpRequest": { + "fields": { + "requestMethod": { + "type": "string", + "id": 1 + }, + "requestUrl": { + "type": "string", + "id": 2 + }, + "requestSize": { + "type": "int64", + "id": 3 + }, + "status": { + "type": "int32", + "id": 4 + }, + "responseSize": { + "type": "int64", + "id": 5 + }, + "userAgent": { + "type": "string", + "id": 6 + }, + "remoteIp": { + "type": "string", + "id": 7 + }, + "serverIp": { + "type": "string", + "id": 13 + }, + "referer": { + "type": "string", + "id": 8 + }, + "latency": { + "type": "google.protobuf.Duration", + "id": 14 + }, + "cacheLookup": { + "type": "bool", + "id": 11 + }, + "cacheHit": { + "type": "bool", + "id": 9 + }, + "cacheValidatedWithOriginServer": { + "type": "bool", + "id": 10 + }, + "cacheFillBytes": { + "type": "int64", + "id": 12 + }, + "protocol": { + "type": "string", + "id": 15 + } + } + }, + "LogSeverity": { + "values": { + "DEFAULT": 0, + "DEBUG": 100, + "INFO": 200, + "NOTICE": 300, + "WARNING": 400, + "ERROR": 500, + "CRITICAL": 600, + "ALERT": 700, + "EMERGENCY": 800 + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", + "java_multiple_files": true, + "java_outer_classname": "MetricProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "MonitoredResourceDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "type": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 4 + }, + "launchStage": { + "type": "LaunchStage", + "id": 7 + } + } + }, + "MonitoredResource": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "MonitoredResourceMetadata": { + "fields": { + "systemLabels": { + "type": "google.protobuf.Struct", + "id": 1 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "ValueType", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { + "values": { + "STRING": 0, + "BOOL": 1, + "INT64": 2 + } + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "Distribution": { + "fields": { + "count": { + "type": "int64", + "id": 1 + }, + "mean": { + "type": "double", + "id": 2 + }, + "sumOfSquaredDeviation": { + "type": "double", + "id": 3 + }, + "range": { + "type": "Range", + "id": 4 + }, + "bucketOptions": { + "type": "BucketOptions", + "id": 6 + }, + "bucketCounts": { + "rule": "repeated", + "type": "int64", + "id": 7 + }, + "exemplars": { + "rule": "repeated", + "type": "Exemplar", + "id": 10 + } + }, + "nested": { + "Range": { + "fields": { + "min": { + "type": "double", + "id": 1 + }, + "max": { + "type": "double", + "id": 2 + } + } + }, + "BucketOptions": { + "oneofs": { + "options": { + "oneof": [ + "linearBuckets", + "exponentialBuckets", + "explicitBuckets" + ] + } + }, + "fields": { + "linearBuckets": { + "type": "Linear", + "id": 1 + }, + "exponentialBuckets": { + "type": "Exponential", + "id": 2 + }, + "explicitBuckets": { + "type": "Explicit", + "id": 3 + } + }, + "nested": { + "Linear": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "width": { + "type": "double", + "id": 2 + }, + "offset": { + "type": "double", + "id": 3 + } + } + }, + "Exponential": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "growthFactor": { + "type": "double", + "id": 2 + }, + "scale": { + "type": "double", + "id": 3 + } + } + }, + "Explicit": { + "fields": { + "bounds": { + "rule": "repeated", + "type": "double", + "id": 1 + } + } + } + } + }, + "Exemplar": { + "fields": { + "value": { + "type": "double", + "id": 1 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "attachments": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "MetricDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 8 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 2 + }, + "metricKind": { + "type": "MetricKind", + "id": 3 + }, + "valueType": { + "type": "ValueType", + "id": 4 + }, + "unit": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7 + }, + "metadata": { + "type": "MetricDescriptorMetadata", + "id": 10 + }, + "launchStage": { + "type": "LaunchStage", + "id": 12 + } + }, + "nested": { + "MetricDescriptorMetadata": { + "fields": { + "launchStage": { + "type": "LaunchStage", + "id": 1, + "options": { + "deprecated": true + } + }, + "samplePeriod": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "ingestDelay": { + "type": "google.protobuf.Duration", + "id": 3 + } + } + }, + "MetricKind": { + "values": { + "METRIC_KIND_UNSPECIFIED": 0, + "GAUGE": 1, + "DELTA": 2, + "CUMULATIVE": 3 + } + }, + "ValueType": { + "values": { + "VALUE_TYPE_UNSPECIFIED": 0, + "BOOL": 1, + "INT64": 2, + "DOUBLE": 3, + "STRING": 4, + "DISTRIBUTION": 5, + "MONEY": 6 + } + } + } + }, + "Metric": { + "fields": { + "type": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": false + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "rpc": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/handwritten/logging/src/service_proto_list.json b/handwritten/logging/src/service_proto_list.json new file mode 100644 index 00000000000..51a794cb76c --- /dev/null +++ b/handwritten/logging/src/service_proto_list.json @@ -0,0 +1 @@ +["../protos/google/logging/v2/logging.proto", "../protos/google/logging/v2/logging_config.proto", "../protos/google/logging/v2/log_entry.proto", "../protos/google/logging/v2/logging_metrics.proto"] \ No newline at end of file diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index bf44529bfa7..082d9368fa4 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -341,6 +341,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -461,6 +462,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -547,6 +549,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -651,6 +654,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -705,6 +709,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -811,6 +816,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -931,6 +937,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1003,6 +1010,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1086,6 +1094,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1138,6 +1147,7 @@ class ConfigServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 48da4daf78d..97d5c578f49 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -311,6 +311,7 @@ class LoggingServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -438,6 +439,7 @@ class LoggingServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.writeLogEntries(request, options, callback); @@ -563,6 +565,7 @@ class LoggingServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.listLogEntries(request, options, callback); @@ -735,6 +738,7 @@ class LoggingServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.listMonitoredResourceDescriptors( @@ -892,6 +896,7 @@ class LoggingServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 1522f71f7e0..3b2abfd31a8 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -312,6 +312,7 @@ class MetricsServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -424,6 +425,7 @@ class MetricsServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -491,6 +493,7 @@ class MetricsServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -559,6 +562,7 @@ class MetricsServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -606,6 +610,7 @@ class MetricsServiceV2Client { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 6b8adea0892..ac6e1a93022 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-07-11T11:16:15.470106Z", + "updateTime": "2019-08-02T11:19:20.863807Z", "sources": [ { "generator": { "name": "artman", - "version": "0.29.4", - "dockerImage": "googleapis/artman@sha256:63f21e83cb92680b7001dc381069e962c9e6dee314fd8365ac554c07c89221fb" + "version": "0.32.0", + "dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c50d9e822e19e069b7e3758736ea58cb4f35267c", - "internalRef": "257512381" + "sha": "3a40d3a5f5e5a33fd49888a8a33ed021f65c0ccf", + "internalRef": "261297518" } }, { From ceeb4f9316a017f6782a928f084e2c3d67c82300 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 4 Aug 2019 02:16:54 +0300 Subject: [PATCH 0455/1029] fix(deps): update dependency type-fest to ^0.7.0 (#554) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b0a83178249..3687a0a1099 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -70,7 +70,7 @@ "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", - "type-fest": "^0.6.0" + "type-fest": "^0.7.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", From 277057c0f7f387e9938ac7da4578db3e9a8af494 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 5 Aug 2019 10:02:10 -0700 Subject: [PATCH 0456/1029] fix(docs): add note about batching writes (#528) --- handwritten/logging/.readme-partials.yml | 23 +++++++++++++++++++++-- handwritten/logging/README.md | 17 +++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index 4b7ad0b9dd2..6e4a0738cdf 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -1,3 +1,22 @@ introduction: |- - [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, - monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. + [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, + monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. +body: |- + ## Batching Writes + + High throughput applications should avoid awaiting calls to the logger: + + ```js + await log.write(logEntry1); + await log.write(logEntry2); + ``` + + Rather, applications should use a _fire and forget_ approach: + + ```js + log.write(logEntry1); + log.write(logEntry2); + ``` + + The `@google-cloud/logging` library will handle batching and dispatching + these log lines to the API. \ No newline at end of file diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 581802d2c78..110f100e0e4 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -85,7 +85,24 @@ async function quickstart( } ``` +## Batching Writes +High throughput applications should avoid awaiting calls to the logger: + +```js +await log.write(logEntry1); +await log.write(logEntry2); +``` + +Rather, applications should use a _fire and forget_ approach: + +```js +log.write(logEntry1); +log.write(logEntry2); +``` + +The `@google-cloud/logging` library will handle batching and dispatching +these log lines to the API. ## Samples From dba12aef05744581eeabef5aa3f7d98b08fc9589 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 5 Aug 2019 10:17:02 -0700 Subject: [PATCH 0457/1029] chore: release 5.2.1 (#540) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- handwritten/logging/CHANGELOG.md | 11 +++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index fd39a3582a8..5a28c1e5fa6 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,17 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.2.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.2.0...v5.2.1) (2019-08-05) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/paginator to v2 ([#537](https://www.github.com/googleapis/nodejs-logging/issues/537)) ([ae14f59](https://www.github.com/googleapis/nodejs-logging/commit/ae14f59)) +* **deps:** update dependency google-auth-library to v5 ([#539](https://www.github.com/googleapis/nodejs-logging/issues/539)) ([b8351a7](https://www.github.com/googleapis/nodejs-logging/commit/b8351a7)) +* allow calls with no request, add JSON proto ([9313998](https://www.github.com/googleapis/nodejs-logging/commit/9313998)) +* **deps:** update dependency type-fest to ^0.7.0 ([#554](https://www.github.com/googleapis/nodejs-logging/issues/554)) ([62362e6](https://www.github.com/googleapis/nodejs-logging/commit/62362e6)) +* **docs:** add note about batching writes ([#528](https://www.github.com/googleapis/nodejs-logging/issues/528)) ([25ba962](https://www.github.com/googleapis/nodejs-logging/commit/25ba962)) + ## [5.2.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.1.3...v5.2.0) (2019-07-17) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3687a0a1099..6e850ab9bac 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.2.0", + "version": "5.2.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 7d7c156457c02e1f48ab9be041b626cb8955aacd Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Sat, 17 Aug 2019 13:52:53 -0700 Subject: [PATCH 0458/1029] fix: add test for x-goog-api-client header (#556) --- handwritten/logging/package.json | 4 +++- handwritten/logging/src/index.ts | 8 ++------ handwritten/logging/src/log.ts | 2 +- .../src/v2/config_service_v2_client.js | 2 +- .../src/v2/logging_service_v2_client.js | 2 +- .../src/v2/metrics_service_v2_client.js | 2 +- handwritten/logging/system-test/logging.ts | 19 ++++++++++++++++--- 7 files changed, 25 insertions(+), 14 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6e850ab9bac..78f68d29baa 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "@google-cloud/common-grpc": "^1.0.0", + "@google-cloud/common-grpc": "^1.0.5", "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", @@ -69,6 +69,7 @@ "pumpify": "^2.0.0", "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", + "teeny-request": "^5.2.1", "through2": "^3.0.0", "type-fest": "^0.7.0" }, @@ -100,6 +101,7 @@ "google-proto-files": "^1.0.0", "grpc": "^1.22.2", "gts": "^1.0.0", + "http2spy": "^1.1.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 76096e4efd6..27e55647052 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -23,7 +23,7 @@ import * as extend from 'extend'; import {GoogleAuth} from 'google-auth-library'; import * as gax from 'google-gax'; import {ClientReadableStream} from 'grpc'; -import * as request from 'request'; +import {Response} from 'teeny-request'; const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; @@ -84,11 +84,7 @@ export interface CreateSinkRequest { } export interface CreateSinkCallback { - ( - err: Error | null, - sink?: Sink | null, - resp?: LogSink | request.Response - ): void; + (err: Error | null, sink?: Sink | null, resp?: LogSink | Response): void; } export type GetEntriesResponse = [ diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index b85589db2b2..ad171653fe9 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -19,7 +19,7 @@ import {callbackifyAll} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as extend from 'extend'; import {CallOptions} from 'google-gax'; -import {Response} from 'request'; +import {Response} from 'teeny-request'; import {google} from '../proto/logging'; diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 082d9368fa4..2fa373105b4 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -82,7 +82,7 @@ class ConfigServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, + `gl-node/${process.versions.node}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 97d5c578f49..5aaf2560f20 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -82,7 +82,7 @@ class LoggingServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, + `gl-node/${process.versions.node}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 3b2abfd31a8..400e3172eeb 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -81,7 +81,7 @@ class MetricsServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, + `gl-node/${process.versions.node}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 1a5b60dbc0c..b1851708076 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -27,7 +27,7 @@ import {HOST_ADDRESS} from 'gcp-metadata'; import * as nock from 'nock'; import {Duplex} from 'stream'; import * as uuid from 'uuid'; - +import * as http2spy from 'http2spy'; import {Logging, Sink} from '../src'; // block all attempts to chat with the metadata server (kokoro runs on GCE) @@ -219,8 +219,10 @@ describe('Logging', () => { // tslint:disable-next-line no-any const logs: any[] = []; - function getTestLog() { - const log = logging.log(`system-test-logs-${uuid.v4()}`); + function getTestLog(loggingInstnce = null) { + const log = (loggingInstnce || logging).log( + `system-test-logs-${uuid.v4()}` + ); logs.push(log); const logEntries = [ @@ -579,6 +581,17 @@ describe('Logging', () => { const {log, logEntries} = getTestLog(); log.warning(logEntries, options, done); }); + + it('should populate x-goog-api-client header', async () => { + const {Logging} = http2spy.require(require.resolve('../src')); + const {log, logEntries} = getTestLog(new Logging()); + await log.write(logEntries[0], options); + assert.ok( + /gl-node\/[0-9]+\.[\w.-]+ grpc\/[0-9]+\.[\w.-]+ gax\/[0-9]+\.[\w.-]+ gapic\/[0-9]+\.[\w.-]+ gccl\/[0-9]+\.[\w.-]+/.test( + http2spy.requests[0]['x-goog-api-client'][0] + ) + ); + }); }); function generateName() { From d432504afb5827bf682455162f8b342c989c7dcf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 20 Aug 2019 15:23:43 -0700 Subject: [PATCH 0459/1029] chore: release 5.2.2 (#558) --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 5a28c1e5fa6..c630eb8a0f5 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.2.2](https://www.github.com/googleapis/nodejs-logging/compare/v5.2.1...v5.2.2) (2019-08-20) + + +### Bug Fixes + +* add test for x-goog-api-client header ([#556](https://www.github.com/googleapis/nodejs-logging/issues/556)) ([f2cd5ea](https://www.github.com/googleapis/nodejs-logging/commit/f2cd5ea)) +* **deps:** update dependency yargs to v14 ([bd8da51](https://www.github.com/googleapis/nodejs-logging/commit/bd8da51)) + ### [5.2.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.2.0...v5.2.1) (2019-08-05) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 78f68d29baa..544448ae6dd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.2.1", + "version": "5.2.2", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 8581af16956fbe0a3e5a744e09d2f3832025a585 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 26 Aug 2019 04:44:36 +0300 Subject: [PATCH 0460/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.31.0 (#557) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 544448ae6dd..6def10ec2a0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "devDependencies": { "@google-cloud/bigquery": "^4.0.0", "@google-cloud/nodejs-repo-tools": "^3.3.0", - "@google-cloud/pubsub": "^0.30.2", + "@google-cloud/pubsub": "^0.31.0", "@google-cloud/storage": "^3.0.4", "@types/extend": "^3.0.0", "@types/is": "0.0.21", From 7d121f0254e256da9712ab1945625b84490d5c60 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 25 Aug 2019 19:27:22 -0700 Subject: [PATCH 0461/1029] fix: use process versions object for client header (#563) --- handwritten/logging/src/v2/config_service_v2_client.js | 2 +- .../logging/src/v2/logging_service_v2_client.js | 2 +- .../logging/src/v2/metrics_service_v2_client.js | 2 +- handwritten/logging/synth.metadata | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 2fa373105b4..082d9368fa4 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -82,7 +82,7 @@ class ConfigServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.versions.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 5aaf2560f20..97d5c578f49 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -82,7 +82,7 @@ class LoggingServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.versions.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 400e3172eeb..3b2abfd31a8 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -81,7 +81,7 @@ class MetricsServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.versions.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index ac6e1a93022..87c9a32508f 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-02T11:19:20.863807Z", + "updateTime": "2019-08-20T11:16:25.568311Z", "sources": [ { "generator": { "name": "artman", - "version": "0.32.0", - "dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d" + "version": "0.33.0", + "dockerImage": "googleapis/artman@sha256:c6231efb525569736226b1f7af7565dbc84248efafb3692a5bb1d2d8a7975d53" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a40d3a5f5e5a33fd49888a8a33ed021f65c0ccf", - "internalRef": "261297518" + "sha": "4bb50a3e4c8d49d1cec1a98434cccaeaec55a886", + "internalRef": "264193378" } }, { From 27da87bc0ec3e64a7856db383ac125b14cfb7245 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 28 Aug 2019 13:54:39 -0700 Subject: [PATCH 0462/1029] fix: use correct version for x-goog-api-client header (#565) --- handwritten/logging/src/v2/config_service_v2_client.js | 2 +- .../logging/src/v2/logging_service_v2_client.js | 2 +- .../logging/src/v2/metrics_service_v2_client.js | 2 +- handwritten/logging/synth.metadata | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 082d9368fa4..2fa373105b4 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -82,7 +82,7 @@ class ConfigServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, + `gl-node/${process.versions.node}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 97d5c578f49..5aaf2560f20 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -82,7 +82,7 @@ class LoggingServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, + `gl-node/${process.versions.node}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 3b2abfd31a8..400e3172eeb 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -81,7 +81,7 @@ class MetricsServiceV2Client { // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, + `gl-node/${process.versions.node}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 87c9a32508f..f78aeb01fb2 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-20T11:16:25.568311Z", + "updateTime": "2019-08-26T11:10:40.420409Z", "sources": [ { "generator": { "name": "artman", - "version": "0.33.0", - "dockerImage": "googleapis/artman@sha256:c6231efb525569736226b1f7af7565dbc84248efafb3692a5bb1d2d8a7975d53" + "version": "0.34.0", + "dockerImage": "googleapis/artman@sha256:38a27ba6245f96c3e86df7acb2ebcc33b4f186d9e475efe2d64303aec3d4e0ea" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4bb50a3e4c8d49d1cec1a98434cccaeaec55a886", - "internalRef": "264193378" + "sha": "b97af5f7fea49d533900b62cca171da0e49743de", + "internalRef": "265156479" } }, { From e2acab284fa86f0781ba05be1b9d959ef1c91022 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 29 Aug 2019 18:36:08 +0300 Subject: [PATCH 0463/1029] chore(deps): update dependency typescript to ~3.6.0 (#567) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6def10ec2a0..d4904825b9f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -115,7 +115,7 @@ "prettier": "^1.15.1", "proxyquire": "^2.1.0", "sinon": "^7.2.5", - "typescript": "~3.5.0", + "typescript": "~3.6.0", "uuid": "^3.3.2" } } From 41805caf2d5cd168102200e8773e0bddede5eee5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 3 Sep 2019 14:37:16 -0700 Subject: [PATCH 0464/1029] docs: update link to client docs --- handwritten/logging/README.md | 4 +--- .../src/v2/doc/google/protobuf/doc_timestamp.js | 10 ++++++---- handwritten/logging/synth.metadata | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 110f100e0e4..3d4ebb4dc0e 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -151,12 +151,10 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/logging/latest#reference +[client-docs]: https://googleapis.dev/nodejs/logging/latest [product-docs]: https://cloud.google.com/logging/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started - - diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index 98c19dbf0d3..c457acc0c7d 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -89,11 +89,13 @@ * 01:30 UTC on January 15, 2017. * * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format. + * to this format using + * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format. * * @property {number} seconds * Represents seconds of UTC time since Unix epoch diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index f78aeb01fb2..28fef8a3fd9 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-26T11:10:40.420409Z", + "updateTime": "2019-08-29T11:17:50.665248Z", "sources": [ { "generator": { "name": "artman", - "version": "0.34.0", - "dockerImage": "googleapis/artman@sha256:38a27ba6245f96c3e86df7acb2ebcc33b4f186d9e475efe2d64303aec3d4e0ea" + "version": "0.35.1", + "dockerImage": "googleapis/artman@sha256:b11c7ea0d0831c54016fb50f4b796d24d1971439b30fbc32a369ba1ac887c384" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b97af5f7fea49d533900b62cca171da0e49743de", - "internalRef": "265156479" + "sha": "e121a35579e73377f998c11bcc09ba0486736404", + "internalRef": "265953539" } }, { From 9cdcee4fc653b9f460132718b66e2f102add5924 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 5 Sep 2019 20:53:54 +0300 Subject: [PATCH 0465/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.17 (#569) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d4904825b9f..f7203f9f8f7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@opencensus/propagation-stackdriver": "0.0.16", + "@opencensus/propagation-stackdriver": "0.0.17", "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", From fa4ec7de1a46d00a0405b2223436a68d28e57237 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 5 Sep 2019 14:01:02 -0700 Subject: [PATCH 0466/1029] feat: load protos from JSON, grpc-fallback support (#571) * [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * no browser support for typescript * fix headers order in system test --- handwritten/logging/protos/protos.json | 846 +++++++++--------- .../src/v2/config_service_v2_client.js | 103 ++- .../src/v2/config_service_v2_proto_list.json | 3 + .../src/v2/logging_service_v2_client.js | 111 ++- .../src/v2/logging_service_v2_proto_list.json | 3 + .../src/v2/metrics_service_v2_client.js | 81 +- .../src/v2/metrics_service_v2_proto_list.json | 3 + handwritten/logging/synth.metadata | 10 +- handwritten/logging/synth.py | 5 +- handwritten/logging/system-test/logging.ts | 2 +- handwritten/logging/test/gapic-v2.js | 19 + 11 files changed, 646 insertions(+), 540 deletions(-) create mode 100644 handwritten/logging/src/v2/config_service_v2_proto_list.json create mode 100644 handwritten/logging/src/v2/logging_service_v2_proto_list.json create mode 100644 handwritten/logging/src/v2/metrics_service_v2_proto_list.json diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 64601a9d71f..1c61fa51088 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -15,485 +15,458 @@ "php_namespace": "Google\\Cloud\\Logging\\V2" }, "nested": { - "LoggingServiceV2": { + "ConfigServiceV2": { "methods": { - "DeleteLog": { - "requestType": "DeleteLogRequest", + "ListSinks": { + "requestType": "ListSinksRequest", + "responseType": "ListSinksResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/sinks", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks" + } + }, + "GetSink": { + "requestType": "GetSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "CreateSink": { + "requestType": "CreateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).post": "/v2/{parent=*/*}/sinks", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.http).additional_bindings.body": "sink" + } + }, + "UpdateSink": { + "requestType": "UpdateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "DeleteSink": { + "requestType": "DeleteSinkRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", - "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}" + "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" } }, - "WriteLogEntries": { - "requestType": "WriteLogEntriesRequest", - "responseType": "WriteLogEntriesResponse", + "ListExclusions": { + "requestType": "ListExclusionsRequest", + "responseType": "ListExclusionsResponse", "options": { - "(google.api.http).post": "/v2/entries:write", - "(google.api.http).body": "*" + "(google.api.http).get": "/v2/{parent=*/*}/exclusions", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions" } }, - "ListLogEntries": { - "requestType": "ListLogEntriesRequest", - "responseType": "ListLogEntriesResponse", + "GetExclusion": { + "requestType": "GetExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).post": "/v2/entries:list", - "(google.api.http).body": "*" + "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}" } }, - "ListMonitoredResourceDescriptors": { - "requestType": "ListMonitoredResourceDescriptorsRequest", - "responseType": "ListMonitoredResourceDescriptorsResponse", + "CreateExclusion": { + "requestType": "CreateExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).get": "/v2/monitoredResourceDescriptors" + "(google.api.http).post": "/v2/{parent=*/*}/exclusions", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.http).additional_bindings.body": "exclusion" } }, - "ListLogs": { - "requestType": "ListLogsRequest", - "responseType": "ListLogsResponse", + "UpdateExclusion": { + "requestType": "UpdateExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).get": "/v2/{parent=*/*}/logs", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs" + "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.http).additional_bindings.body": "exclusion" + } + }, + "DeleteExclusion": { + "requestType": "DeleteExclusionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}" } } } }, - "DeleteLogRequest": { - "fields": { - "logName": { - "type": "string", - "id": 1 - } - } - }, - "WriteLogEntriesRequest": { + "LogSink": { "fields": { - "logName": { + "name": { "type": "string", "id": 1 }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 2 - }, - "labels": { - "keyType": "string", + "destination": { "type": "string", "id": 3 }, - "entries": { - "rule": "repeated", - "type": "LogEntry", - "id": 4 - }, - "partialSuccess": { - "type": "bool", + "filter": { + "type": "string", "id": 5 }, - "dryRun": { - "type": "bool", - "id": 6 - } - } - }, - "WriteLogEntriesResponse": { - "fields": {} - }, - "WriteLogEntriesPartialErrors": { - "fields": { - "logEntryErrors": { - "keyType": "int32", - "type": "google.rpc.Status", - "id": 1 - } - } - }, - "ListLogEntriesRequest": { - "fields": { - "projectIds": { - "rule": "repeated", - "type": "string", - "id": 1, + "outputVersionFormat": { + "type": "VersionFormat", + "id": 6, "options": { "deprecated": true } }, - "resourceNames": { - "rule": "repeated", + "writerIdentity": { "type": "string", "id": 8 }, - "filter": { - "type": "string", - "id": 2 - }, - "orderBy": { - "type": "string", - "id": 3 + "includeChildren": { + "type": "bool", + "id": 9 }, - "pageSize": { - "type": "int32", - "id": 4 + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "deprecated": true + } }, - "pageToken": { - "type": "string", - "id": 5 + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "deprecated": true + } + } + }, + "nested": { + "VersionFormat": { + "values": { + "VERSION_FORMAT_UNSPECIFIED": 0, + "V2": 1, + "V1": 2 + } } } }, - "ListLogEntriesResponse": { + "ListSinksRequest": { "fields": { - "entries": { - "rule": "repeated", - "type": "LogEntry", + "parent": { + "type": "string", "id": 1 }, - "nextPageToken": { + "pageToken": { "type": "string", "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 } } }, - "ListMonitoredResourceDescriptorsRequest": { + "ListSinksResponse": { "fields": { - "pageSize": { - "type": "int32", + "sinks": { + "rule": "repeated", + "type": "LogSink", "id": 1 }, - "pageToken": { + "nextPageToken": { "type": "string", "id": 2 } } }, - "ListMonitoredResourceDescriptorsResponse": { + "GetSinkRequest": { "fields": { - "resourceDescriptors": { - "rule": "repeated", - "type": "google.api.MonitoredResourceDescriptor", - "id": 1 - }, - "nextPageToken": { + "sinkName": { "type": "string", - "id": 2 + "id": 1 } } }, - "ListLogsRequest": { + "CreateSinkRequest": { "fields": { "parent": { "type": "string", "id": 1 }, - "pageSize": { - "type": "int32", + "sink": { + "type": "LogSink", "id": 2 }, - "pageToken": { - "type": "string", + "uniqueWriterIdentity": { + "type": "bool", "id": 3 } } }, - "ListLogsResponse": { + "UpdateSinkRequest": { "fields": { - "logNames": { - "rule": "repeated", + "sinkName": { "type": "string", - "id": 3 + "id": 1 }, - "nextPageToken": { - "type": "string", + "sink": { + "type": "LogSink", "id": 2 + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4 } } }, - "LogEntry": { - "oneofs": { - "payload": { - "oneof": [ - "protoPayload", - "textPayload", - "jsonPayload" - ] + "DeleteSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1 } - }, + } + }, + "LogExclusion": { "fields": { - "logName": { + "name": { "type": "string", - "id": 12 - }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 8 + "id": 1 }, - "protoPayload": { - "type": "google.protobuf.Any", + "description": { + "type": "string", "id": 2 }, - "textPayload": { + "filter": { "type": "string", "id": 3 }, - "jsonPayload": { - "type": "google.protobuf.Struct", - "id": 6 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 9 - }, - "receiveTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 24 - }, - "severity": { - "type": "google.logging.type.LogSeverity", - "id": 10 - }, - "insertId": { - "type": "string", + "disabled": { + "type": "bool", "id": 4 - }, - "httpRequest": { - "type": "google.logging.type.HttpRequest", - "id": 7 - }, - "labels": { - "keyType": "string", + } + } + }, + "ListExclusionsRequest": { + "fields": { + "parent": { "type": "string", - "id": 11 + "id": 1 }, - "metadata": { - "type": "google.api.MonitoredResourceMetadata", - "id": 25 + "pageToken": { + "type": "string", + "id": 2 }, - "operation": { - "type": "LogEntryOperation", - "id": 15 + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListExclusionsResponse": { + "fields": { + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", + "id": 1 }, - "trace": { + "nextPageToken": { "type": "string", - "id": 22 - }, - "spanId": { + "id": 2 + } + } + }, + "GetExclusionRequest": { + "fields": { + "name": { "type": "string", - "id": 27 - }, - "traceSampled": { - "type": "bool", - "id": 30 - }, - "sourceLocation": { - "type": "LogEntrySourceLocation", - "id": 23 + "id": 1 } } }, - "LogEntryOperation": { + "CreateExclusionRequest": { "fields": { - "id": { + "parent": { "type": "string", "id": 1 }, - "producer": { - "type": "string", + "exclusion": { + "type": "LogExclusion", "id": 2 - }, - "first": { - "type": "bool", - "id": 3 - }, - "last": { - "type": "bool", - "id": 4 } } }, - "LogEntrySourceLocation": { + "UpdateExclusionRequest": { "fields": { - "file": { + "name": { "type": "string", "id": 1 }, - "line": { - "type": "int64", + "exclusion": { + "type": "LogExclusion", "id": 2 }, - "function": { - "type": "string", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 3 } } }, - "ConfigServiceV2": { + "DeleteExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "LoggingServiceV2": { "methods": { - "ListSinks": { - "requestType": "ListSinksRequest", - "responseType": "ListSinksResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/sinks", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks" - } - }, - "GetSink": { - "requestType": "GetSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "CreateSink": { - "requestType": "CreateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).post": "/v2/{parent=*/*}/sinks", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", - "(google.api.http).additional_bindings.body": "sink" - } - }, - "UpdateSink": { - "requestType": "UpdateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.http).additional_bindings.body": "sink", - "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "DeleteSink": { - "requestType": "DeleteSinkRequest", + "DeleteLog": { + "requestType": "DeleteLogRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "ListExclusions": { - "requestType": "ListExclusionsRequest", - "responseType": "ListExclusionsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/exclusions", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions" + "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}" } }, - "GetExclusion": { - "requestType": "GetExclusionRequest", - "responseType": "LogExclusion", + "WriteLogEntries": { + "requestType": "WriteLogEntriesRequest", + "responseType": "WriteLogEntriesResponse", "options": { - "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}" + "(google.api.http).post": "/v2/entries:write", + "(google.api.http).body": "*" } }, - "CreateExclusion": { - "requestType": "CreateExclusionRequest", - "responseType": "LogExclusion", + "ListLogEntries": { + "requestType": "ListLogEntriesRequest", + "responseType": "ListLogEntriesResponse", "options": { - "(google.api.http).post": "/v2/{parent=*/*}/exclusions", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", - "(google.api.http).additional_bindings.body": "exclusion" + "(google.api.http).post": "/v2/entries:list", + "(google.api.http).body": "*" } }, - "UpdateExclusion": { - "requestType": "UpdateExclusionRequest", - "responseType": "LogExclusion", + "ListMonitoredResourceDescriptors": { + "requestType": "ListMonitoredResourceDescriptorsRequest", + "responseType": "ListMonitoredResourceDescriptorsResponse", "options": { - "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.http).additional_bindings.body": "exclusion" + "(google.api.http).get": "/v2/monitoredResourceDescriptors" } }, - "DeleteExclusion": { - "requestType": "DeleteExclusionRequest", - "responseType": "google.protobuf.Empty", + "ListLogs": { + "requestType": "ListLogsRequest", + "responseType": "ListLogsResponse", "options": { - "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}" + "(google.api.http).get": "/v2/{parent=*/*}/logs", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs" } } } }, - "LogSink": { + "DeleteLogRequest": { "fields": { - "name": { + "logName": { "type": "string", "id": 1 - }, - "destination": { - "type": "string", - "id": 3 - }, - "filter": { + } + } + }, + "WriteLogEntriesRequest": { + "fields": { + "logName": { "type": "string", - "id": 5 + "id": 1 }, - "outputVersionFormat": { - "type": "VersionFormat", - "id": 6, - "options": { - "deprecated": true - } + "resource": { + "type": "google.api.MonitoredResource", + "id": 2 }, - "writerIdentity": { + "labels": { + "keyType": "string", "type": "string", - "id": 8 + "id": 3 }, - "includeChildren": { - "type": "bool", - "id": 9 + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 4 }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "deprecated": true - } + "partialSuccess": { + "type": "bool", + "id": 5 }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "deprecated": true - } + "dryRun": { + "type": "bool", + "id": 6 } - }, - "nested": { - "VersionFormat": { - "values": { - "VERSION_FORMAT_UNSPECIFIED": 0, - "V2": 1, - "V1": 2 - } + } + }, + "WriteLogEntriesResponse": { + "fields": {} + }, + "WriteLogEntriesPartialErrors": { + "fields": { + "logEntryErrors": { + "keyType": "int32", + "type": "google.rpc.Status", + "id": 1 } } }, - "ListSinksRequest": { + "ListLogEntriesRequest": { "fields": { - "parent": { + "projectIds": { + "rule": "repeated", "type": "string", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, - "pageToken": { + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "filter": { "type": "string", "id": 2 }, + "orderBy": { + "type": "string", + "id": 3 + }, "pageSize": { "type": "int32", - "id": 3 + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 5 } } }, - "ListSinksResponse": { + "ListLogEntriesResponse": { "fields": { - "sinks": { + "entries": { "rule": "repeated", - "type": "LogSink", + "type": "LogEntry", "id": 1 }, "nextPageToken": { @@ -502,148 +475,175 @@ } } }, - "GetSinkRequest": { + "ListMonitoredResourceDescriptorsRequest": { "fields": { - "sinkName": { - "type": "string", + "pageSize": { + "type": "int32", "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 } } }, - "CreateSinkRequest": { + "ListMonitoredResourceDescriptorsResponse": { "fields": { - "parent": { - "type": "string", + "resourceDescriptors": { + "rule": "repeated", + "type": "google.api.MonitoredResourceDescriptor", "id": 1 }, - "sink": { - "type": "LogSink", + "nextPageToken": { + "type": "string", "id": 2 - }, - "uniqueWriterIdentity": { - "type": "bool", - "id": 3 } } }, - "UpdateSinkRequest": { + "ListLogsRequest": { "fields": { - "sinkName": { + "parent": { "type": "string", "id": 1 }, - "sink": { - "type": "LogSink", + "pageSize": { + "type": "int32", "id": 2 }, - "uniqueWriterIdentity": { - "type": "bool", + "pageToken": { + "type": "string", "id": 3 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 4 } } }, - "DeleteSinkRequest": { + "ListLogsResponse": { "fields": { - "sinkName": { + "logNames": { + "rule": "repeated", "type": "string", - "id": 1 + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "LogExclusion": { + "LogEntry": { + "oneofs": { + "payload": { + "oneof": [ + "protoPayload", + "textPayload", + "jsonPayload" + ] + } + }, "fields": { - "name": { + "logName": { "type": "string", - "id": 1 + "id": 12 }, - "description": { - "type": "string", + "resource": { + "type": "google.api.MonitoredResource", + "id": 8 + }, + "protoPayload": { + "type": "google.protobuf.Any", "id": 2 }, - "filter": { + "textPayload": { "type": "string", "id": 3 }, - "disabled": { - "type": "bool", - "id": 4 - } - } - }, - "ListExclusionsRequest": { - "fields": { - "parent": { + "jsonPayload": { + "type": "google.protobuf.Struct", + "id": 6 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "receiveTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 24 + }, + "severity": { + "type": "google.logging.type.LogSeverity", + "id": 10 + }, + "insertId": { "type": "string", - "id": 1 + "id": 4 }, - "pageToken": { + "httpRequest": { + "type": "google.logging.type.HttpRequest", + "id": 7 + }, + "labels": { + "keyType": "string", "type": "string", - "id": 2 + "id": 11 }, - "pageSize": { - "type": "int32", - "id": 3 - } - } - }, - "ListExclusionsResponse": { - "fields": { - "exclusions": { - "rule": "repeated", - "type": "LogExclusion", - "id": 1 + "metadata": { + "type": "google.api.MonitoredResourceMetadata", + "id": 25 }, - "nextPageToken": { + "operation": { + "type": "LogEntryOperation", + "id": 15 + }, + "trace": { "type": "string", - "id": 2 - } - } - }, - "GetExclusionRequest": { - "fields": { - "name": { + "id": 22 + }, + "spanId": { "type": "string", - "id": 1 + "id": 27 + }, + "traceSampled": { + "type": "bool", + "id": 30 + }, + "sourceLocation": { + "type": "LogEntrySourceLocation", + "id": 23 } } }, - "CreateExclusionRequest": { + "LogEntryOperation": { "fields": { - "parent": { + "id": { "type": "string", "id": 1 }, - "exclusion": { - "type": "LogExclusion", + "producer": { + "type": "string", "id": 2 + }, + "first": { + "type": "bool", + "id": 3 + }, + "last": { + "type": "bool", + "id": 4 } } }, - "UpdateExclusionRequest": { + "LogEntrySourceLocation": { "fields": { - "name": { + "file": { "type": "string", "id": 1 }, - "exclusion": { - "type": "LogExclusion", + "line": { + "type": "int64", "id": 2 }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "DeleteExclusionRequest": { - "fields": { - "name": { + "function": { "type": "string", - "id": 1 + "id": 3 } } }, @@ -2209,6 +2209,30 @@ } } }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Struct": { "fields": { "fields": { @@ -2295,30 +2319,6 @@ "id": 2 } } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } } } }, diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 2fa373105b4..eb426dbc93e 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -59,6 +59,16 @@ class ConfigServiceV2Client { opts = opts || {}; this._descriptors = {}; + if (global.isBrowser) { + // If we're in browser, we use gRPC fallback. + opts.fallback = true; + } + + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; + const servicePath = opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; @@ -75,70 +85,91 @@ class ConfigServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - const gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gaxModule.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - const clientHeader = [ - `gl-node/${process.versions.node}`, - `grpc/${gaxGrpc.grpcVersion}`, - `gax/${gax.version}`, - `gapic/${VERSION}`, - ]; + const clientHeader = []; + + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } + clientHeader.push(`gax/${gaxModule.version}`); + if (opts.fallback) { + clientHeader.push(`gl-web/${gaxModule.version}`); + } else { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + clientHeader.push(`gapic/${VERSION}`); if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); const protos = gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - ['google/logging/v2/logging_config.proto'] + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - billingPathTemplate: new gax.PathTemplate( + billingPathTemplate: new gaxModule.PathTemplate( 'billingAccounts/{billing_account}' ), - billingExclusionPathTemplate: new gax.PathTemplate( + billingExclusionPathTemplate: new gaxModule.PathTemplate( 'billingAccounts/{billing_account}/exclusions/{exclusion}' ), - billingSinkPathTemplate: new gax.PathTemplate( + billingSinkPathTemplate: new gaxModule.PathTemplate( 'billingAccounts/{billing_account}/sinks/{sink}' ), - exclusionPathTemplate: new gax.PathTemplate( + exclusionPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/exclusions/{exclusion}' ), - folderPathTemplate: new gax.PathTemplate('folders/{folder}'), - folderExclusionPathTemplate: new gax.PathTemplate( + folderPathTemplate: new gaxModule.PathTemplate('folders/{folder}'), + folderExclusionPathTemplate: new gaxModule.PathTemplate( 'folders/{folder}/exclusions/{exclusion}' ), - folderSinkPathTemplate: new gax.PathTemplate( + folderSinkPathTemplate: new gaxModule.PathTemplate( 'folders/{folder}/sinks/{sink}' ), - organizationPathTemplate: new gax.PathTemplate( + organizationPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}' ), - organizationExclusionPathTemplate: new gax.PathTemplate( + organizationExclusionPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}/exclusions/{exclusion}' ), - organizationSinkPathTemplate: new gax.PathTemplate( + organizationSinkPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}/sinks/{sink}' ), - projectPathTemplate: new gax.PathTemplate('projects/{project}'), - sinkPathTemplate: new gax.PathTemplate('projects/{project}/sinks/{sink}'), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + sinkPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/sinks/{sink}' + ), }; // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listSinks: new gax.PageDescriptor('pageToken', 'nextPageToken', 'sinks'), - listExclusions: new gax.PageDescriptor( + listSinks: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'sinks' + ), + listExclusions: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'exclusions' @@ -161,7 +192,9 @@ class ConfigServiceV2Client { // Put together the "service stub" for // google.logging.v2.ConfigServiceV2. const configServiceV2Stub = gaxGrpc.createStub( - protos.google.logging.v2.ConfigServiceV2, + opts.fallback + ? protos.lookupService('google.logging.v2.ConfigServiceV2') + : protos.google.logging.v2.ConfigServiceV2, opts ); @@ -180,18 +213,16 @@ class ConfigServiceV2Client { 'deleteExclusion', ]; for (const methodName of configServiceV2StubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - configServiceV2Stub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = configServiceV2Stub.then( + stub => (...args) => { + return stub[methodName].apply(stub, args); + }, + err => () => { + throw err; + } + ); + this._innerApiCalls[methodName] = gaxModule.createApiCall( + innerCallPromise, defaults[methodName], this._descriptors.page[methodName] ); diff --git a/handwritten/logging/src/v2/config_service_v2_proto_list.json b/handwritten/logging/src/v2/config_service_v2_proto_list.json new file mode 100644 index 00000000000..880b32f9275 --- /dev/null +++ b/handwritten/logging/src/v2/config_service_v2_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/logging/v2/logging_config.proto" +] diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 5aaf2560f20..91011828218 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -17,7 +17,6 @@ const gapicConfig = require('./logging_service_v2_client_config.json'); const gax = require('google-gax'); const path = require('path'); -const protobuf = require('protobufjs'); const VERSION = require('../../../package.json').version; @@ -59,6 +58,16 @@ class LoggingServiceV2Client { opts = opts || {}; this._descriptors = {}; + if (global.isBrowser) { + // If we're in browser, we use gRPC fallback. + opts.fallback = true; + } + + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; + const servicePath = opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; @@ -75,88 +84,98 @@ class LoggingServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - const gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gaxModule.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - const clientHeader = [ - `gl-node/${process.versions.node}`, - `grpc/${gaxGrpc.grpcVersion}`, - `gax/${gax.version}`, - `gapic/${VERSION}`, - ]; + const clientHeader = []; + + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } + clientHeader.push(`gax/${gaxModule.version}`); + if (opts.fallback) { + clientHeader.push(`gl-web/${gaxModule.version}`); + } else { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + clientHeader.push(`gapic/${VERSION}`); if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); const protos = gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - ['google/logging/v2/logging.proto'] + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - billingPathTemplate: new gax.PathTemplate( + billingPathTemplate: new gaxModule.PathTemplate( 'billingAccounts/{billing_account}' ), - billingLogPathTemplate: new gax.PathTemplate( + billingLogPathTemplate: new gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), - folderPathTemplate: new gax.PathTemplate('folders/{folder}'), - folderLogPathTemplate: new gax.PathTemplate( + folderPathTemplate: new gaxModule.PathTemplate('folders/{folder}'), + folderLogPathTemplate: new gaxModule.PathTemplate( 'folders/{folder}/logs/{log}' ), - logPathTemplate: new gax.PathTemplate('projects/{project}/logs/{log}'), - organizationPathTemplate: new gax.PathTemplate( + logPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/logs/{log}' + ), + organizationPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}' ), - organizationLogPathTemplate: new gax.PathTemplate( + organizationLogPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), - projectPathTemplate: new gax.PathTemplate('projects/{project}'), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), }; // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listLogEntries: new gax.PageDescriptor( + listLogEntries: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'entries' ), - listMonitoredResourceDescriptors: new gax.PageDescriptor( + listMonitoredResourceDescriptors: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'resourceDescriptors' ), - listLogs: new gax.PageDescriptor( + listLogs: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'logNames' ), }; - let protoFilesRoot = new gax.GoogleProtoFilesRoot(); - protoFilesRoot = protobuf.loadSync( - path.join( - __dirname, - '..', - '..', - 'protos', - 'google/logging/v2/logging.proto' - ), - protoFilesRoot - ); + + const protoFilesRoot = opts.fallback + ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) + : gaxModule.protobuf.loadSync(nodejsProtoPath); // Some methods on this API support automatically batching // requests; denote this. this._descriptors.batching = { - writeLogEntries: new gax.BundleDescriptor( + writeLogEntries: new gaxModule.BundleDescriptor( 'entries', ['logName', 'resource', 'labels'], null, @@ -182,7 +201,9 @@ class LoggingServiceV2Client { // Put together the "service stub" for // google.logging.v2.LoggingServiceV2. const loggingServiceV2Stub = gaxGrpc.createStub( - protos.google.logging.v2.LoggingServiceV2, + opts.fallback + ? protos.lookupService('google.logging.v2.LoggingServiceV2') + : protos.google.logging.v2.LoggingServiceV2, opts ); @@ -196,18 +217,16 @@ class LoggingServiceV2Client { 'listLogs', ]; for (const methodName of loggingServiceV2StubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - loggingServiceV2Stub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = loggingServiceV2Stub.then( + stub => (...args) => { + return stub[methodName].apply(stub, args); + }, + err => () => { + throw err; + } + ); + this._innerApiCalls[methodName] = gaxModule.createApiCall( + innerCallPromise, defaults[methodName], this._descriptors.page[methodName] || this._descriptors.batching[methodName] diff --git a/handwritten/logging/src/v2/logging_service_v2_proto_list.json b/handwritten/logging/src/v2/logging_service_v2_proto_list.json new file mode 100644 index 00000000000..bf2f385b75d --- /dev/null +++ b/handwritten/logging/src/v2/logging_service_v2_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/logging/v2/logging.proto" +] diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 400e3172eeb..f79941732db 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -58,6 +58,16 @@ class MetricsServiceV2Client { opts = opts || {}; this._descriptors = {}; + if (global.isBrowser) { + // If we're in browser, we use gRPC fallback. + opts.fallback = true; + } + + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; + const servicePath = opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; @@ -74,50 +84,65 @@ class MetricsServiceV2Client { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - const gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gaxModule.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - const clientHeader = [ - `gl-node/${process.versions.node}`, - `grpc/${gaxGrpc.grpcVersion}`, - `gax/${gax.version}`, - `gapic/${VERSION}`, - ]; + const clientHeader = []; + + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } + clientHeader.push(`gax/${gaxModule.version}`); + if (opts.fallback) { + clientHeader.push(`gl-web/${gaxModule.version}`); + } else { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + clientHeader.push(`gapic/${VERSION}`); if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); const protos = gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - ['google/logging/v2/logging_metrics.proto'] + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - billingPathTemplate: new gax.PathTemplate( + billingPathTemplate: new gaxModule.PathTemplate( 'billingAccounts/{billing_account}' ), - folderPathTemplate: new gax.PathTemplate('folders/{folder}'), - metricPathTemplate: new gax.PathTemplate( + folderPathTemplate: new gaxModule.PathTemplate('folders/{folder}'), + metricPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/metrics/{metric}' ), - organizationPathTemplate: new gax.PathTemplate( + organizationPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}' ), - projectPathTemplate: new gax.PathTemplate('projects/{project}'), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), }; // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listLogMetrics: new gax.PageDescriptor( + listLogMetrics: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'metrics' @@ -140,7 +165,9 @@ class MetricsServiceV2Client { // Put together the "service stub" for // google.logging.v2.MetricsServiceV2. const metricsServiceV2Stub = gaxGrpc.createStub( - protos.google.logging.v2.MetricsServiceV2, + opts.fallback + ? protos.lookupService('google.logging.v2.MetricsServiceV2') + : protos.google.logging.v2.MetricsServiceV2, opts ); @@ -154,18 +181,16 @@ class MetricsServiceV2Client { 'deleteLogMetric', ]; for (const methodName of metricsServiceV2StubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - metricsServiceV2Stub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = metricsServiceV2Stub.then( + stub => (...args) => { + return stub[methodName].apply(stub, args); + }, + err => () => { + throw err; + } + ); + this._innerApiCalls[methodName] = gaxModule.createApiCall( + innerCallPromise, defaults[methodName], this._descriptors.page[methodName] ); diff --git a/handwritten/logging/src/v2/metrics_service_v2_proto_list.json b/handwritten/logging/src/v2/metrics_service_v2_proto_list.json new file mode 100644 index 00000000000..33a1febc856 --- /dev/null +++ b/handwritten/logging/src/v2/metrics_service_v2_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/logging/v2/logging_metrics.proto" +] diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 28fef8a3fd9..be8a97be62a 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-29T11:17:50.665248Z", + "updateTime": "2019-09-05T18:25:49.014940Z", "sources": [ { "generator": { "name": "artman", - "version": "0.35.1", - "dockerImage": "googleapis/artman@sha256:b11c7ea0d0831c54016fb50f4b796d24d1971439b30fbc32a369ba1ac887c384" + "version": "0.36.2", + "dockerImage": "googleapis/artman@sha256:0e6f3a668cd68afc768ecbe08817cf6e56a0e64fcbdb1c58c3b97492d12418a1" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e121a35579e73377f998c11bcc09ba0486736404", - "internalRef": "265953539" + "sha": "c9a1670dc4ab9c50757494e73f5167acd149692c", + "internalRef": "267360549" } }, { diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 8a6cd67a43e..87389cbee19 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -18,6 +18,7 @@ import synthtool.gcp as gcp import logging import subprocess +import os logging.basicConfig(level=logging.DEBUG) @@ -59,7 +60,9 @@ r"Sum\[i=1\.\.n\]\(https:\/\/cloud\.google\.com\(x_i - mean\)\^2\)", "Sum\[i=1..n](x_1 - mean)^2") - +# No browser support for TypeScript libraries yet +os.unlink("src/browser.js") +os.unlink("webpack.config.js") # Node.js specific cleanup subprocess.run(["npm", "install"]) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index b1851708076..b910167b1c3 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -587,7 +587,7 @@ describe('Logging', () => { const {log, logEntries} = getTestLog(new Logging()); await log.write(logEntries[0], options); assert.ok( - /gl-node\/[0-9]+\.[\w.-]+ grpc\/[0-9]+\.[\w.-]+ gax\/[0-9]+\.[\w.-]+ gapic\/[0-9]+\.[\w.-]+ gccl\/[0-9]+\.[\w.-]+/.test( + /gl-node\/[0-9]+\.[\w.-]+ gax\/[0-9]+\.[\w.-]+ grpc\/[0-9]+\.[\w.-]+ gapic\/[0-9]+\.[\w.-]+ gccl\/[0-9]+\.[\w.-]+/.test( http2spy.requests[0]['x-goog-api-client'][0] ) ); diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 4e15bd83077..34e9c6868e8 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -44,6 +44,13 @@ describe('LoggingServiceV2Client', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new loggingModule.v2.LoggingServiceV2Client({ + fallback: true, + }); + assert(client); + }); + describe('deleteLog', () => { it('invokes deleteLog without error', done => { const client = new loggingModule.v2.LoggingServiceV2Client({ @@ -363,6 +370,11 @@ describe('ConfigServiceV2Client', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new loggingModule.v2.ConfigServiceV2Client({fallback: true}); + assert(client); + }); + describe('listSinks', () => { it('invokes listSinks without error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ @@ -1035,6 +1047,13 @@ describe('MetricsServiceV2Client', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new loggingModule.v2.MetricsServiceV2Client({ + fallback: true, + }); + assert(client); + }); + describe('listLogMetrics', () => { it('invokes listLogMetrics without error', done => { const client = new loggingModule.v2.MetricsServiceV2Client({ From 65b3663d2bb102563756e0b242af45725540b667 Mon Sep 17 00:00:00 2001 From: Mark van den Brink Date: Thu, 5 Sep 2019 23:52:00 +0200 Subject: [PATCH 0467/1029] fix: add missing function overload (#573) * fix: add missing function overload * fix formatting --- handwritten/logging/src/log.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index ad171653fe9..b2e132ff69f 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -190,6 +190,10 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ + critical( + entry: Entry | Entry[], + options?: WriteOptions + ): Promise; critical( entry: Entry | Entry[], options: WriteOptions, From e13977b54438f8f4645c1057b9f856a545a5e71c Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Sep 2019 18:11:42 -0400 Subject: [PATCH 0468/1029] update .nycrc ignore rules (#575) --- handwritten/logging/.nycrc | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/.nycrc b/handwritten/logging/.nycrc index 83a421a0628..23e322204ec 100644 --- a/handwritten/logging/.nycrc +++ b/handwritten/logging/.nycrc @@ -6,6 +6,7 @@ "**/.coverage", "**/apis", "**/benchmark", + "**/conformance", "**/docs", "**/samples", "**/scripts", From 368ba80850324e5d1062eb0a1d0d05ac9c1c2320 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 9 Sep 2019 19:47:19 +0300 Subject: [PATCH 0469/1029] chore(deps): update dependency eslint-plugin-node to v10 (#572) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f7203f9f8f7..b75068dd280 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -96,7 +96,7 @@ "codecov": "^3.0.4", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^9.0.0", + "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^1.0.0", "grpc": "^1.22.2", From bc16c2721fc7a04400cea9a68a542294b9afb613 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Mon, 9 Sep 2019 16:10:04 -0400 Subject: [PATCH 0470/1029] chore(deps): update dependency nock to v11 (#576) --- handwritten/logging/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b75068dd280..c2996ffe1af 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -83,7 +83,6 @@ "@types/mocha": "^5.2.5", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.1", - "@types/nock": "^10.0.0", "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", @@ -109,7 +108,7 @@ "mocha": "^6.1.4", "mv": "^2.1.1", "ncp": "^2.0.0", - "nock": "^10.0.1", + "nock": "^11.3.2", "nyc": "^14.0.0", "power-assert": "^1.6.0", "prettier": "^1.15.1", From 7459106c55770c42649d1123792997563c25ad36 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 11 Sep 2019 19:47:01 +0300 Subject: [PATCH 0471/1029] chore(deps): update dependency @google-cloud/pubsub to ^0.32.0 (#577) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c2996ffe1af..da768a01fba 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "devDependencies": { "@google-cloud/bigquery": "^4.0.0", "@google-cloud/nodejs-repo-tools": "^3.3.0", - "@google-cloud/pubsub": "^0.31.0", + "@google-cloud/pubsub": "^0.32.0", "@google-cloud/storage": "^3.0.4", "@types/extend": "^3.0.0", "@types/is": "0.0.21", From 4365ceb90d73a125267fdc5190f32e6ea0bc63a2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 16 Sep 2019 13:55:27 +0300 Subject: [PATCH 0472/1029] fix(deps): update dependency type-fest to ^0.8.0 (#578) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index da768a01fba..41b346eaf90 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -71,7 +71,7 @@ "stream-events": "^1.0.4", "teeny-request": "^5.2.1", "through2": "^3.0.0", - "type-fest": "^0.7.0" + "type-fest": "^0.8.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", From c4c7dfd32ae8f215405010ea19d99575909b8583 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Sep 2019 11:08:39 -0700 Subject: [PATCH 0473/1029] chore: release 5.3.0 (#574) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- handwritten/logging/CHANGELOG.md | 16 ++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index c630eb8a0f5..a4ba63e16f4 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,22 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [5.3.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.2.2...v5.3.0) (2019-09-16) + + +### Bug Fixes + +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.17 ([#569](https://www.github.com/googleapis/nodejs-logging/issues/569)) ([7077e64](https://www.github.com/googleapis/nodejs-logging/commit/7077e64)) +* add missing function overload ([#573](https://www.github.com/googleapis/nodejs-logging/issues/573)) ([8cd073b](https://www.github.com/googleapis/nodejs-logging/commit/8cd073b)) +* use correct version for x-goog-api-client header ([#565](https://www.github.com/googleapis/nodejs-logging/issues/565)) ([7b60835](https://www.github.com/googleapis/nodejs-logging/commit/7b60835)) +* use process versions object for client header ([#563](https://www.github.com/googleapis/nodejs-logging/issues/563)) ([2ec8662](https://www.github.com/googleapis/nodejs-logging/commit/2ec8662)) +* **deps:** update dependency type-fest to ^0.8.0 ([#578](https://www.github.com/googleapis/nodejs-logging/issues/578)) ([422a0ed](https://www.github.com/googleapis/nodejs-logging/commit/422a0ed)) + + +### Features + +* load protos from JSON, grpc-fallback support ([#571](https://www.github.com/googleapis/nodejs-logging/issues/571)) ([41ef532](https://www.github.com/googleapis/nodejs-logging/commit/41ef532)) + ### [5.2.2](https://www.github.com/googleapis/nodejs-logging/compare/v5.2.1...v5.2.2) (2019-08-20) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 41b346eaf90..a10a4d48c2d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.2.2", + "version": "5.3.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 0d0e8a28e8da0feff5a264a43ddf70740ff03143 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 17 Sep 2019 09:42:44 -0700 Subject: [PATCH 0474/1029] fix(deps): updates to metadata check to better work in all environments (#581) --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a10a4d48c2d..dd7f4e58ccb 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -60,8 +60,8 @@ "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", - "gcp-metadata": "^2.0.0", - "google-auth-library": "^5.0.0", + "gcp-metadata": "^3.0.0", + "google-auth-library": "^5.2.2", "google-gax": "^1.0.0", "is": "^3.2.1", "on-finished": "^2.3.0", From 0e2cb7a4e80d182915c2fe16acd41c50fe2ed0a3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2019 10:31:07 -0700 Subject: [PATCH 0475/1029] chore: release 5.3.1 (#582) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index a4ba63e16f4..0f151ecd219 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.3.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.3.0...v5.3.1) (2019-09-17) + + +### Bug Fixes + +* **deps:** updates to metadata check to better work in all environments ([#581](https://www.github.com/googleapis/nodejs-logging/issues/581)) ([24b97e4](https://www.github.com/googleapis/nodejs-logging/commit/24b97e4)) + ## [5.3.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.2.2...v5.3.0) (2019-09-16) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index dd7f4e58ccb..a831fbf0816 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.3.0", + "version": "5.3.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 26b68eb6648364ea68b7e3aee1e63e56cd6dec9d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 18 Sep 2019 05:08:51 -0700 Subject: [PATCH 0476/1029] build: switch to releasing with GitHub bot (#584) --- .../logging/.github/release-please.yml | 0 .../.kokoro/continuous/node10/test.cfg | 28 ------------------- handwritten/logging/.kokoro/test.sh | 9 ------ handwritten/logging/synth.metadata | 10 +++---- 4 files changed, 5 insertions(+), 42 deletions(-) create mode 100644 handwritten/logging/.github/release-please.yml diff --git a/handwritten/logging/.github/release-please.yml b/handwritten/logging/.github/release-please.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/handwritten/logging/.kokoro/continuous/node10/test.cfg b/handwritten/logging/.kokoro/continuous/node10/test.cfg index fefee48ba76..468b8c7197a 100644 --- a/handwritten/logging/.kokoro/continuous/node10/test.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/test.cfg @@ -7,31 +7,3 @@ before_action { } } } - -# tokens used by release-please to keep an up-to-date release PR. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-key-release-please" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-token-release-please" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-url-release-please" - } - } -} diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 6eae855d744..9db11bb09d6 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -35,12 +35,3 @@ if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then else echo "coverage is only reported for Node $COVERAGE_NODE" fi - -# if release-please keys set, we kick off a task to update the release-PR. -if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then - npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ - --repo-url=googleapis/nodejs-logging \ - --package-name=@google-cloud/logging \ - --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ - --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please -fi diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index be8a97be62a..adb99326a8f 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-09-05T18:25:49.014940Z", + "updateTime": "2019-09-18T11:21:53.377897Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.2", - "dockerImage": "googleapis/artman@sha256:0e6f3a668cd68afc768ecbe08817cf6e56a0e64fcbdb1c58c3b97492d12418a1" + "version": "0.36.3", + "dockerImage": "googleapis/artman@sha256:66ca01f27ef7dc50fbfb7743b67028115a6a8acf43b2d82f9fc826de008adac4" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c9a1670dc4ab9c50757494e73f5167acd149692c", - "internalRef": "267360549" + "sha": "4aeb1260230bbf56c9d958ff28dfb3eba019fcd0", + "internalRef": "269598918" } }, { From 0765d3cd0e3d6ba94acfc692c47625b84ed78083 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 18 Sep 2019 17:27:02 +0300 Subject: [PATCH 0477/1029] chore(deps): update dependency @google-cloud/pubsub to v1 (#585) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a831fbf0816..cc4d8a137f1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "devDependencies": { "@google-cloud/bigquery": "^4.0.0", "@google-cloud/nodejs-repo-tools": "^3.3.0", - "@google-cloud/pubsub": "^0.32.0", + "@google-cloud/pubsub": "^1.0.0", "@google-cloud/storage": "^3.0.4", "@types/extend": "^3.0.0", "@types/is": "0.0.21", From d3e7dec784c4562290f5a7f381dfad75571655d8 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 27 Sep 2019 02:04:34 -0400 Subject: [PATCH 0478/1029] chore: add protos/ to .eslintignore --- handwritten/logging/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore index f0c7aead4bf..09b31fe735a 100644 --- a/handwritten/logging/.eslintignore +++ b/handwritten/logging/.eslintignore @@ -2,3 +2,4 @@ src/**/doc/* build/ docs/ +protos/ From 300f747886c4c511a06bbced86ba9f40160d41da Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 27 Sep 2019 17:37:07 -0400 Subject: [PATCH 0479/1029] chore: update pull request template --- handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md b/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md index 809750308d7..46cd1076bd7 100644 --- a/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md +++ b/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,7 @@ -Fixes # (it's a good idea to open an issue first for discussion) - -- [ ] Tests and linter pass +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/{{metadata['repo']['name']}}/issues) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) + +Fixes # 🦕 From 0851e7b1acb4cc848efc6b1eeb2db5e5d5827261 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 30 Sep 2019 16:44:48 -0700 Subject: [PATCH 0480/1029] chore: updated documentation and formatting --- .../google/logging/type/http_request.proto | 12 +- .../google/logging/type/log_severity.proto | 4 +- .../protos/google/logging/v2/log_entry.proto | 97 +- .../protos/google/logging/v2/logging.proto | 74 +- .../google/logging/v2/logging_config.proto | 264 +- .../google/logging/v2/logging_metrics.proto | 52 +- handwritten/logging/protos/protos.json | 3936 +++++++++-------- .../src/v2/config_service_v2_client.js | 37 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 91 +- .../v2/doc/google/logging/v2/doc_logging.js | 13 +- .../google/logging/v2/doc_logging_config.js | 154 +- .../google/logging/v2/doc_logging_metrics.js | 43 +- handwritten/logging/src/v2/index.js | 4 +- .../src/v2/logging_service_v2_client.js | 20 +- handwritten/logging/synth.metadata | 6 +- handwritten/logging/test/gapic-v2.js | 708 +-- 16 files changed, 2890 insertions(+), 2625 deletions(-) diff --git a/handwritten/logging/protos/google/logging/type/http_request.proto b/handwritten/logging/protos/google/logging/type/http_request.proto index 4bca5082360..fc1afd7dc00 100644 --- a/handwritten/logging/protos/google/logging/type/http_request.proto +++ b/handwritten/logging/protos/google/logging/type/http_request.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,14 @@ // 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. +// syntax = "proto3"; package google.logging.type; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Logging.Type"; option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype"; @@ -26,7 +27,6 @@ option java_outer_classname = "HttpRequestProto"; option java_package = "com.google.logging.type"; option php_namespace = "Google\\Cloud\\Logging\\Type"; - // A common proto for logging HTTP requests. Only contains semantics // defined by the HTTP specification. Product-specific logging // information MUST be defined in a separate message. @@ -52,7 +52,8 @@ message HttpRequest { int64 response_size = 5; // The user agent sent by the client. Example: - // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. + // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET + // CLR 1.0.3705)"`. string user_agent = 6; // The IP address (IPv4 or IPv6) of the client that issued the HTTP @@ -64,7 +65,8 @@ message HttpRequest { string server_ip = 13; // The referer URL of the request, as defined in - // [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + // [HTTP/1.1 Header Field + // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). string referer = 8; // The request processing latency on the server, from the time the request was diff --git a/handwritten/logging/protos/google/logging/type/log_severity.proto b/handwritten/logging/protos/google/logging/type/log_severity.proto index d366e077895..c6fd055a900 100644 --- a/handwritten/logging/protos/google/logging/type/log_severity.proto +++ b/handwritten/logging/protos/google/logging/type/log_severity.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // 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. +// syntax = "proto3"; @@ -25,7 +26,6 @@ option java_outer_classname = "LogSeverityProto"; option java_package = "com.google.logging.type"; option php_namespace = "Google\\Cloud\\Logging\\Type"; - // The severity of the event described in a log entry, expressed as one of the // standard severity levels listed below. For your reference, the levels are // assigned the listed numeric values. The effect of using numeric values other diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index de9786daf73..f0b03754519 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,13 +17,14 @@ syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; import "google/api/monitored_resource.proto"; import "google/logging/type/http_request.proto"; import "google/logging/type/log_severity.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -34,6 +35,7 @@ option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; // An individual entry in a log. +// message LogEntry { // Required. The resource name of the log to which this log entry belongs: // @@ -42,9 +44,9 @@ message LogEntry { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // A project number may optionally be used in place of PROJECT_ID. The - // project number is translated to its corresponding PROJECT_ID internally - // and the `log_name` field will contain PROJECT_ID in queries and exports. + // A project number may optionally be used in place of PROJECT_ID. The project + // number is translated to its corresponding PROJECT_ID internally and the + // `log_name` field will contain PROJECT_ID in queries and exports. // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -59,17 +61,23 @@ message LogEntry { // any results. string log_name = 12; - // Required. The primary 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. + // Required. The monitored resource that produced 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. google.api.MonitoredResource resource = 8; // Optional. The log entry payload, which can be one of multiple types. oneof payload { - // The log entry payload, represented as a protocol buffer. Some - // Google Cloud Platform services use this field for their log - // entry payloads. + // The log entry payload, represented as a protocol buffer. Some Google + // Cloud Platform services use this field for their log entry payloads. + // + // The following protocol buffer types are supported; user-defined types + // are not supported: + // + // "type.googleapis.com/google.cloud.audit.AuditLog" + // "type.googleapis.com/google.appengine.logging.v1.RequestLog" google.protobuf.Any proto_payload = 2; // The log entry payload, represented as a Unicode string (UTF-8). @@ -80,19 +88,18 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. - // This time is used to compute the log entry's age and to enforce - // the logs retention period. If this field is omitted in a new log - // entry, then Logging assigns it the current time. - // Timestamps have nanosecond accuracy, but trailing zeros in the fractional - // seconds might be omitted when the timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This + // time is used to compute the log entry's age and to enforce the logs + // retention period. If this field is omitted in a new log entry, then Logging + // assigns it the current time. Timestamps have nanosecond accuracy, but + // trailing zeros in the fractional seconds might be omitted when the + // timestamp is displayed. // - // Incoming log entries should have timestamps that are no more than - // the [logs retention period](/logging/quotas) in the past, - // and no more than 24 hours in the future. Log entries outside those time - // boundaries will not be available when calling `entries.list`, but - // those log entries can still be exported with - // [LogSinks](/logging/docs/api/tasks/exporting-logs). + // Incoming log entries should have timestamps that are no more than the [logs + // retention period](/logging/quotas) in the past, and no more than 24 hours + // in the future. Log entries outside those time boundaries will not be + // available when calling `entries.list`, but those log entries can still be + // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). google.protobuf.Timestamp timestamp = 9; // Output only. The time the log entry was received by Logging. @@ -103,25 +110,31 @@ message LogEntry { google.logging.type.LogSeverity severity = 10; // Optional. A unique identifier for the log entry. If you provide a value, - // then Logging considers other log entries in the same project, - // with the same `timestamp`, and with the same `insert_id` to be duplicates - // which can be removed. If omitted in new log entries, then - // Logging assigns its own unique identifier. The `insert_id` is also used - // to order log entries that have the same `timestamp` value. + // then Logging considers other log entries in the same project, with the same + // `timestamp`, and with the same `insert_id` to be duplicates which can be + // removed. If omitted in new log entries, then Logging assigns its own unique + // identifier. The `insert_id` is also used to order log entries that have the + // same `timestamp` value. string insert_id = 4; - // Optional. Information about the HTTP request associated with this - // log entry, if applicable. + // Optional. Information about the HTTP request associated with this log + // entry, if applicable. google.logging.type.HttpRequest http_request = 7; // Optional. A set of user-defined (key, value) data that provides additional // information about the log entry. map labels = 11; - // Output only. Additional metadata about the monitored resource. + // Deprecated. Output only. Additional metadata about the monitored resource. + // // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - // this field populated. - google.api.MonitoredResourceMetadata metadata = 25; + // this field populated for GKE versions older than 1.12.6. For GKE versions + // 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes + // pod labels that used to be in `metadata.userLabels` will now be present in + // the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system + // labels that were present in the `metadata.systemLabels` field will no + // longer be available in the LogEntry. + google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; // Optional. Information about an operation associated with the log entry, if // applicable. @@ -134,12 +147,14 @@ message LogEntry { string trace = 22; // Optional. The span ID within the trace associated with the log entry. - // For Trace spans, this is the same format that the Trace - // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such - // as "000000000000004a". + // + // For Trace spans, this is the same format that the Trace API v2 uses: a + // 16-character hexadecimal encoding of an 8-byte array, such as + // "000000000000004a". string span_id = 27; // Optional. The sampling decision of the trace associated with the log entry. + // // True means that the trace resource name in the `trace` field was sampled // for storage in a trace backend. False means that the trace was not sampled // for storage when this log entry was written, or the sampling decision was @@ -155,12 +170,12 @@ message LogEntry { // Additional information about a potentially long-running operation with which // a log entry is associated. message LogEntryOperation { - // Optional. An arbitrary operation identifier. Log entries with the - // same identifier are assumed to be part of the same operation. + // Optional. An arbitrary operation identifier. Log entries with the same + // identifier are assumed to be part of the same operation. string id = 1; - // Optional. An arbitrary producer identifier. The combination of - // `id` and `producer` must be globally unique. Examples for `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"`. string producer = 2; diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index d04cd5c03dd..fc421759377 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,13 +17,15 @@ syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; import "google/api/monitored_resource.proto"; import "google/logging/v2/log_entry.proto"; +import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -35,6 +37,14 @@ option php_namespace = "Google\\Cloud\\Logging\\V2"; // Service for ingesting and querying logs. service LoggingServiceV2 { + option (google.api.default_host) = "logging.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/logging.admin," + "https://www.googleapis.com/auth/logging.read," + "https://www.googleapis.com/auth/logging.write"; + // Deletes all the log entries in a log. // The log reappears if it receives new entries. // Log entries written shortly before the delete operation might not be @@ -42,9 +52,18 @@ service LoggingServiceV2 { rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{log_name=projects/*/logs/*}" - additional_bindings { delete: "/v2/{log_name=organizations/*/logs/*}" } - additional_bindings { delete: "/v2/{log_name=folders/*/logs/*}" } - additional_bindings { delete: "/v2/{log_name=billingAccounts/*/logs/*}" } + additional_bindings { + delete: "/v2/{log_name=*/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=organizations/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=folders/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=billingAccounts/*/logs/*}" + } }; } @@ -55,17 +74,16 @@ service LoggingServiceV2 { // A single request may contain log entries for a maximum of 1000 // different resources (projects, organizations, billing accounts or // folders) - rpc WriteLogEntries(WriteLogEntriesRequest) - returns (WriteLogEntriesResponse) { + rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:write" body: "*" }; } - // Lists log entries. Use this method to retrieve log entries from - // Logging. For ways to export log entries, see - // [Exporting Logs](/logging/docs/export). + // Lists log entries. Use this method to retrieve log entries that originated + // from a project/folder/organization/billing account. For ways to export log + // entries, see [Exporting Logs](/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -74,8 +92,7 @@ service LoggingServiceV2 { } // Lists the descriptors for monitored resource types used by Logging. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) - returns (ListMonitoredResourceDescriptorsResponse) { + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; @@ -86,10 +103,18 @@ service LoggingServiceV2 { rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/logs" - additional_bindings { get: "/v2/{parent=projects/*}/logs" } - additional_bindings { get: "/v2/{parent=organizations/*}/logs" } - additional_bindings { get: "/v2/{parent=folders/*}/logs" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/logs" } + additional_bindings { + get: "/v2/{parent=projects/*}/logs" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/logs" + } + additional_bindings { + get: "/v2/{parent=folders/*}/logs" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/logs" + } }; } } @@ -164,8 +189,8 @@ message WriteLogEntriesRequest { // Log entries with timestamps that are more than the // [logs retention period](/logging/quota-policy) in the past or more than // 24 hours in the future will not be available when calling `entries.list`. - // However, those log entries can still be exported with - // [LogSinks](/logging/docs/api/tasks/exporting-logs). + // However, those log entries can still be + // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the // [quota limit](/logging/quota-policy) for calls to `entries.write`, @@ -188,7 +213,9 @@ message WriteLogEntriesRequest { // Result returned from WriteLogEntries. // empty -message WriteLogEntriesResponse {} +message WriteLogEntriesResponse { + +} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { @@ -205,9 +232,7 @@ message WriteLogEntriesPartialErrors { message ListLogEntriesRequest { // 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`. + // `"my-project-1A"`. repeated string project_ids = 1 [deprecated = true]; // Required. Names of one or more parent resources from which to @@ -218,6 +243,7 @@ message ListLogEntriesRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" // + // // Projects listed in the `project_ids` field are added to this list. repeated string resource_names = 8; @@ -320,8 +346,8 @@ message ListLogsRequest { // Result returned from ListLogs. message ListLogsResponse { // A list of log names. For example, - // `"projects/my-project/syslog"` or - // `"organizations/123/cloudresourcemanager.googleapis.com%2Factivity"`. + // `"projects/my-project/logs/syslog"` or + // `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. repeated string log_names = 3; // If there might be more results than those appearing in this response, then diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 2afea1062df..1e3c84d3f41 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,12 @@ syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -30,17 +32,31 @@ option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; -// Service for configuring sinks used to export log entries out of -// Logging. +// Service for configuring sinks used to route log entries. service ConfigServiceV2 { + option (google.api.default_host) = "logging.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/logging.admin," + "https://www.googleapis.com/auth/logging.read"; + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/sinks" - additional_bindings { get: "/v2/{parent=projects/*}/sinks" } - additional_bindings { get: "/v2/{parent=organizations/*}/sinks" } - additional_bindings { get: "/v2/{parent=folders/*}/sinks" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/sinks" } + additional_bindings { + get: "/v2/{parent=projects/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=folders/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/sinks" + } }; } @@ -48,27 +64,41 @@ service ConfigServiceV2 { rpc GetSink(GetSinkRequest) returns (LogSink) { option (google.api.http) = { get: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { get: "/v2/{sink_name=projects/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=organizations/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=folders/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=billingAccounts/*/sinks/*}" } + additional_bindings { + get: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=folders/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=billingAccounts/*/sinks/*}" + } }; } - // Creates a sink that exports specified log entries to a destination. The + // Creates a sink that exports specified log entries to a destination. The // export of newly-ingested log entries begins immediately, unless the sink's - // `writer_identity` is not permitted to write to the destination. A sink can + // `writer_identity` is not permitted to write to the destination. A sink can // export log entries only from the resource owning the sink. rpc CreateSink(CreateSinkRequest) returns (LogSink) { option (google.api.http) = { post: "/v2/{parent=*/*}/sinks" body: "sink" - additional_bindings { post: "/v2/{parent=projects/*}/sinks" body: "sink" } + additional_bindings { + post: "/v2/{parent=projects/*}/sinks" + body: "sink" + } additional_bindings { post: "/v2/{parent=organizations/*}/sinks" body: "sink" } - additional_bindings { post: "/v2/{parent=folders/*}/sinks" body: "sink" } + additional_bindings { + post: "/v2/{parent=folders/*}/sinks" + body: "sink" + } additional_bindings { post: "/v2/{parent=billingAccounts/*}/sinks" body: "sink" @@ -76,8 +106,9 @@ service ConfigServiceV2 { }; } - // Updates a sink. This method replaces the following fields in the existing + // Updates a sink. This method replaces the following fields in the existing // sink with values from the new sink: `destination`, and `filter`. + // // The updated sink might also have a new `writer_identity`; see the // `unique_writer_identity` field. rpc UpdateSink(UpdateSinkRequest) returns (LogSink) { @@ -124,9 +155,15 @@ service ConfigServiceV2 { rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { delete: "/v2/{sink_name=projects/*/sinks/*}" } - additional_bindings { delete: "/v2/{sink_name=organizations/*/sinks/*}" } - additional_bindings { delete: "/v2/{sink_name=folders/*/sinks/*}" } + additional_bindings { + delete: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=folders/*/sinks/*}" + } additional_bindings { delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" } @@ -137,10 +174,18 @@ service ConfigServiceV2 { rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/exclusions" - additional_bindings { get: "/v2/{parent=projects/*}/exclusions" } - additional_bindings { get: "/v2/{parent=organizations/*}/exclusions" } - additional_bindings { get: "/v2/{parent=folders/*}/exclusions" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/exclusions" } + additional_bindings { + get: "/v2/{parent=projects/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=folders/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/exclusions" + } }; } @@ -148,10 +193,18 @@ service ConfigServiceV2 { rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { option (google.api.http) = { get: "/v2/{name=*/*/exclusions/*}" - additional_bindings { get: "/v2/{name=projects/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=organizations/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=folders/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=billingAccounts/*/exclusions/*}" } + additional_bindings { + get: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/exclusions/*}" + } }; } @@ -209,9 +262,15 @@ service ConfigServiceV2 { rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" - additional_bindings { delete: "/v2/{name=projects/*/exclusions/*}" } - additional_bindings { delete: "/v2/{name=organizations/*/exclusions/*}" } - additional_bindings { delete: "/v2/{name=folders/*/exclusions/*}" } + additional_bindings { + delete: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/exclusions/*}" + } additional_bindings { delete: "/v2/{name=billingAccounts/*/exclusions/*}" } @@ -221,9 +280,9 @@ service ConfigServiceV2 { // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a -// Cloud Pub/Sub topic. A logs filter controls which log entries are -// exported. The sink must be created within a project, organization, billing -// account, or folder. +// Cloud Pub/Sub topic. A logs filter controls which log entries are exported. +// The sink must be created within a project, organization, billing account, or +// folder. message LogSink { // Available log entry formats. Log entries can be written to // Logging in either format and can be exported in either format. @@ -240,7 +299,7 @@ message LogSink { } // Required. The client-assigned sink identifier, unique within the - // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are + // 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. @@ -254,34 +313,33 @@ message LogSink { // // 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). + // entries are not exported. For more information, see + // [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). string destination = 3; - // Optional. - // An [advanced logs filter](/logging/docs/view/advanced_filters). The only + // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only // exported log entries are those that are in the resource owning the sink and - // that match the filter. For example: + // that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR string filter = 5; // Deprecated. The log entry format to use for this sink's exported log - // entries. The v2 format is used by default and cannot be changed. + // entries. The v2 format is used by default and cannot be changed. VersionFormat output_version_format = 6 [deprecated = true]; // Output only. An IAM identity—a service account or group—under - // which 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) + // which Logging writes the exported log entries to the sink's destination. + // This field is set by + // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] // and - // [sinks.update](/logging/docs/api/reference/rest/v2/projects.sinks/update), - // based on the setting of `unique_writer_identity` in those methods. + // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] + // based on the value 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). + // 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. string writer_identity = 8; @@ -301,11 +359,33 @@ message LogSink { // resource.type=gce_instance bool include_children = 9; - // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp start_time = 10 [deprecated = true]; + // Optional. Destination dependent options. + oneof options { + // Optional. Options that affect sinks exporting data to BigQuery. + BigQueryOptions bigquery_options = 12; + } + + // Output only. The creation timestamp of the sink. + // + // This field may not be present for older sinks. + google.protobuf.Timestamp create_time = 13; + + // Output only. The last update timestamp of the sink. + // + // This field may not be present for older sinks. + google.protobuf.Timestamp update_time = 14; +} - // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp end_time = 11 [deprecated = true]; +// Options that change functionality of a sink exporting data to BigQuery. +message BigQueryOptions { + // Optional. Whether to use [BigQuery's partition + // tables](/bigquery/docs/partitioned-tables). By default, Logging + // creates dated tables based on the log entries' timestamps, e.g. + // syslog_20170523. With partitioned tables the date suffix is no longer + // present and [special query + // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. + // In both cases, tables are sharded based on UTC timezone. + bool use_partitioned_tables = 1; } // The parameters to `ListSinks`. @@ -319,13 +399,13 @@ message ListSinksRequest { string parent = 1; // 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 + // 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. string page_token = 2; // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the + // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. int32 page_size = 3; } @@ -336,7 +416,7 @@ message ListSinksResponse { repeated LogSink sinks = 1; // 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 + // `nextPageToken` is included. To get the next set of results, call the same // method again using the value of `nextPageToken` as `pageToken`. string next_page_token = 2; } @@ -371,17 +451,16 @@ message CreateSinkRequest { LogSink sink = 2; // 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 + // 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 - // the same group or service account used by Logging before the - // addition of writer identities to this API. The sink's destination must be - // in the same project as the sink itself. + // the same group or service account used by Logging 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][google.logging.v2.LogSink]. + // be a unique service account used only for exports from the new sink. For + // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. bool unique_writer_identity = 3; } @@ -402,9 +481,8 @@ message UpdateSinkRequest { // as part of `sink_name`. LogSink sink = 2; - // 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 + // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + // 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: // @@ -418,7 +496,7 @@ message UpdateSinkRequest { // Optional. Field mask that specifies the fields in `sink` that need // an update. A sink field will be overwritten if, and only if, it is - // in the update mask. `name` and output only fields cannot be updated. + // in the update mask. `name` and output only fields cannot be updated. // // An empty updateMask is temporarily treated as using the following mask // for backwards compatibility purposes: @@ -448,11 +526,11 @@ message DeleteSinkRequest { } // Specifies a set of log entries that are not to be stored in -// Logging. If your project receives a large volume of logs, you might be able -// to use exclusions to reduce your chargeable logs. Exclusions are processed -// after log sinks, so you can export log entries before they are excluded. -// Audit log entries and log entries from Amazon Web Services are never -// excluded. +// Logging. If your GCP resource receives a large volume of logs, you can +// use exclusions to reduce your chargeable logs. Exclusions are +// processed after log sinks, so you can export log entries before they are +// excluded. Note that organization-level and folder-level exclusions don't +// apply to child resources, and that you can't exclude audit log entries. message LogExclusion { // Required. A client-assigned identifier, such as // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and @@ -462,22 +540,31 @@ message LogExclusion { // Optional. A description of this exclusion. string description = 2; - // Required. - // An [advanced logs filter](/logging/docs/view/advanced_filters) + // Required. An [advanced logs filter](/logging/docs/view/advanced-queries) // that matches the log entries to be excluded. By using the - // [sample function](/logging/docs/view/advanced_filters#sample), + // [sample function](/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. - // For example, the following filter matches 99% of low-severity log - // entries from load balancers: + // For example, the following query matches 99% of low-severity log + // entries from Google Cloud Storage buckets: // - // `"resource.type=http_load_balancer severity"000000000000004a". + * + * For Trace spans, this is the same format that the Trace API v2 uses: a + * 16-character hexadecimal encoding of an 8-byte array, such as + * "000000000000004a". * * @property {boolean} traceSampled * Optional. The sampling decision of the trace associated with the log entry. + * * True means that the trace resource name in the `trace` field was sampled * for storage in a trace backend. False means that the trace was not sampled * for storage when this log entry was written, or the sampling decision was @@ -164,12 +177,12 @@ const LogEntry = { * a log entry is associated. * * @property {string} id - * Optional. An arbitrary operation identifier. Log entries with the - * same identifier are assumed to be part of the same operation. + * 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`: + * 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} first diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 4e7d7e900e9..08fd34e21cd 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -97,8 +97,8 @@ const DeleteLogRequest = { * Log entries with timestamps that are more than the * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than * 24 hours in the future will not be available when calling `entries.list`. - * However, those log entries can still be exported with - * [LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * However, those log entries can still be + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, @@ -144,9 +144,7 @@ const WriteLogEntriesResponse = { * @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`. + * `"my-project-1A"`. * * @property {string[]} resourceNames * Required. Names of one or more parent resources from which to @@ -157,6 +155,7 @@ const WriteLogEntriesResponse = { * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" * + * * Projects listed in the `project_ids` field are added to this list. * * @property {string} filter @@ -303,8 +302,8 @@ const ListLogsRequest = { * * @property {string[]} logNames * A list of log names. For example, - * `"projects/my-project/syslog"` or - * `"organizations/123/cloudresourcemanager.googleapis.com%2Factivity"`. + * `"projects/my-project/logs/syslog"` or + * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. * * @property {string} nextPageToken * If there might be more results than those appearing in this response, then diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index 57148ea4524..7459dc16d5e 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -18,13 +18,13 @@ /** * Describes a sink used to export log entries to one of the following * destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a - * Cloud Pub/Sub topic. A logs filter controls which log entries are - * exported. The sink must be created within a project, organization, billing - * account, or folder. + * Cloud Pub/Sub topic. A logs filter controls which log entries are exported. + * The sink must be created within a project, organization, billing account, or + * folder. * * @property {string} name * Required. The client-assigned sink identifier, unique within the - * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are + * 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. @@ -38,36 +38,35 @@ * * 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](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * entries are not exported. For more information, see + * [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * @property {string} filter - * Optional. - * An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). The only + * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only * exported log entries are those that are in the resource owning the sink and - * that match the filter. For example: + * that match the filter. For example: * * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR * * @property {number} outputVersionFormat * Deprecated. The log entry format to use for this sink's exported log - * entries. The v2 format is used by default and cannot be changed. + * entries. The v2 format is used by default and cannot be changed. * * The number should be among the values of [VersionFormat]{@link google.logging.v2.VersionFormat} * * @property {string} writerIdentity * Output only. An IAM identity—a service account or group—under - * which Logging writes the exported log entries to the sink's - * destination. This field is set by - * [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create) + * which Logging writes the exported log entries to the sink's destination. + * This field is set by + * sinks.create * and - * [sinks.update](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/update), - * based on the setting of `unique_writer_identity` in those methods. + * sinks.update + * based on the value 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](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + * see [Granting Access for a + * Resource](https://cloud.google.com/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. * @@ -86,13 +85,22 @@ * logName:("projects/test-project1/" OR "projects/test-project2/") AND * resource.type=gce_instance * - * @property {Object} startTime - * Deprecated. This field is ignored when creating or updating sinks. + * @property {Object} bigqueryOptions + * Optional. Options that affect sinks exporting data to BigQuery. + * + * This object should have the same structure as [BigQueryOptions]{@link google.logging.v2.BigQueryOptions} + * + * @property {Object} createTime + * Output only. The creation timestamp of the sink. + * + * This field may not be present for older sinks. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * - * @property {Object} endTime - * Deprecated. This field is ignored when creating or updating sinks. + * @property {Object} updateTime + * Output only. The last update timestamp of the sink. + * + * This field may not be present for older sinks. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @@ -130,6 +138,26 @@ const LogSink = { } }; +/** + * Options that change functionality of a sink exporting data to BigQuery. + * + * @property {boolean} usePartitionedTables + * Optional. Whether to use [BigQuery's partition + * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging + * creates dated tables based on the log entries' timestamps, e.g. + * syslog_20170523. With partitioned tables the date suffix is no longer + * present and [special query + * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. + * In both cases, tables are sharded based on UTC timezone. + * + * @typedef BigQueryOptions + * @memberof google.logging.v2 + * @see [google.logging.v2.BigQueryOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const BigQueryOptions = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * The parameters to `ListSinks`. * @@ -143,13 +171,13 @@ const LogSink = { * * @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 + * 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 {number} pageSize * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the + * Non-positive values are ignored. The presence of `nextPageToken` in the * response indicates that more results might be available. * * @typedef ListSinksRequest @@ -170,7 +198,7 @@ const ListSinksRequest = { * * @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 + * `nextPageToken` is included. To get the next set of results, call the same * method again using the value of `nextPageToken` as `pageToken`. * * @typedef ListSinksResponse @@ -223,17 +251,16 @@ const GetSinkRequest = { * * @property {boolean} 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 + * 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 - * the same group or service account used by Logging before the - * addition of writer identities to this API. The sink's destination must be - * in the same project as the sink itself. + * the same group or service account used by Logging 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. + * be a unique service account used only for exports from the new sink. For + * more information, see `writer_identity` in LogSink. * * @typedef CreateSinkRequest * @memberof google.logging.v2 @@ -264,9 +291,8 @@ const CreateSinkRequest = { * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * * @property {boolean} uniqueWriterIdentity - * Optional. See - * [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create) - * for a description of this field. When updating a sink, the effect of this + * 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: * @@ -280,7 +306,7 @@ const CreateSinkRequest = { * @property {Object} updateMask * Optional. Field mask that specifies the fields in `sink` that need * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. + * in the update mask. `name` and output only fields cannot be updated. * * An empty updateMask is temporarily treated as using the following mask * for backwards compatibility purposes: @@ -327,11 +353,11 @@ const DeleteSinkRequest = { /** * Specifies a set of log entries that are not to be stored in - * Logging. If your project receives a large volume of logs, you might be able - * to use exclusions to reduce your chargeable logs. Exclusions are processed - * after log sinks, so you can export log entries before they are excluded. - * Audit log entries and log entries from Amazon Web Services are never - * excluded. + * Logging. If your GCP resource receives a large volume of logs, you can + * use exclusions to reduce your chargeable logs. Exclusions are + * processed after log sinks, so you can export log entries before they are + * excluded. Note that organization-level and folder-level exclusions don't + * apply to child resources, and that you can't exclude audit log entries. * * @property {string} name * Required. A client-assigned identifier, such as @@ -342,21 +368,34 @@ const DeleteSinkRequest = { * Optional. A description of this exclusion. * * @property {string} filter - * Required. - * An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) + * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries) * that matches the log entries to be excluded. By using the - * [sample function](https://cloud.google.com/logging/docs/view/advanced_filters#sample), + * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), * you can exclude less than 100% of the matching log entries. - * For example, the following filter matches 99% of low-severity log - * entries from load balancers: + * For example, the following query matches 99% of low-severity log + * entries from Google Cloud Storage buckets: * - * `"resource.type=http_load_balancer severity { +describe('ConfigServiceV2Client', () => { it('has servicePath', () => { - const servicePath = loggingModule.v2.LoggingServiceV2Client.servicePath; + const servicePath = loggingModule.v2.ConfigServiceV2Client.servicePath; assert(servicePath); }); it('has apiEndpoint', () => { - const apiEndpoint = loggingModule.v2.LoggingServiceV2Client.apiEndpoint; + const apiEndpoint = loggingModule.v2.ConfigServiceV2Client.apiEndpoint; assert(apiEndpoint); }); it('has port', () => { - const port = loggingModule.v2.LoggingServiceV2Client.port; + const port = loggingModule.v2.ConfigServiceV2Client.port; assert(port); assert(typeof port === 'number'); }); it('should create a client with no options', () => { - const client = new loggingModule.v2.LoggingServiceV2Client(); + const client = new loggingModule.v2.ConfigServiceV2Client(); assert(client); }); it('should create a client with gRPC fallback', () => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - fallback: true, - }); + const client = new loggingModule.v2.ConfigServiceV2Client({fallback: true}); assert(client); }); - describe('deleteLog', () => { - it('invokes deleteLog without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + describe('listSinks', () => { + it('invokes listSinks without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + const formattedParent = client.projectPath('[PROJECT]'); const request = { - logName: formattedLogName, + parent: formattedParent, + }; + + // Mock response + const nextPageToken = ''; + const sinksElement = {}; + const sinks = [sinksElement]; + const expectedResponse = { + nextPageToken: nextPageToken, + sinks: sinks, }; // Mock Grpc layer - client._innerApiCalls.deleteLog = mockSimpleGrpcMethod(request); + client._innerApiCalls.listSinks = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.sinks); + }; - client.deleteLog(request, err => { + client.listSinks(request, (err, response) => { assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.sinks); done(); }); }); - it('invokes deleteLog with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + it('invokes listSinks with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + const formattedParent = client.projectPath('[PROJECT]'); const request = { - logName: formattedLogName, + parent: formattedParent, }; // Mock Grpc layer - client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( + client._innerApiCalls.listSinks = mockSimpleGrpcMethod( request, null, error ); - client.deleteLog(request, err => { + client.listSinks(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('writeLogEntries', () => { - it('invokes writeLogEntries without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + describe('getSink', () => { + it('invokes getSink without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const entries = []; + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); const request = { - entries: entries, + sinkName: formattedSinkName, }; // Mock response - const expectedResponse = {}; + const name = 'name3373707'; + const destination = 'destination-1429847026'; + const filter = 'filter-1274492040'; + const writerIdentity = 'writerIdentity775638794'; + const includeChildren = true; + const expectedResponse = { + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, + }; // Mock Grpc layer - client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( + client._innerApiCalls.getSink = mockSimpleGrpcMethod( request, expectedResponse ); - client.writeLogEntries(request, (err, response) => { + client.getSink(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes writeLogEntries with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + it('invokes getSink with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const entries = []; + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); const request = { - entries: entries, + sinkName: formattedSinkName, }; // Mock Grpc layer - client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( + client._innerApiCalls.getSink = mockSimpleGrpcMethod( request, null, error ); - client.writeLogEntries(request, (err, response) => { + client.getSink(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -157,65 +180,70 @@ describe('LoggingServiceV2Client', () => { }); }); - describe('listLogEntries', () => { - it('invokes listLogEntries without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + describe('createSink', () => { + it('invokes createSink without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedResourceNames = []; + const formattedParent = client.projectPath('[PROJECT]'); + const sink = {}; const request = { - resourceNames: formattedResourceNames, + parent: formattedParent, + sink: sink, }; // Mock response - const nextPageToken = ''; - const entriesElement = {}; - const entries = [entriesElement]; + const name = 'name3373707'; + const destination = 'destination-1429847026'; + const filter = 'filter-1274492040'; + const writerIdentity = 'writerIdentity775638794'; + const includeChildren = true; const expectedResponse = { - nextPageToken: nextPageToken, - entries: entries, + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, }; // Mock Grpc layer - client._innerApiCalls.listLogEntries = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.entries); - }; + client._innerApiCalls.createSink = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.listLogEntries(request, (err, response) => { + client.createSink(request, (err, response) => { assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.entries); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes listLogEntries with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + it('invokes createSink with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedResourceNames = []; + const formattedParent = client.projectPath('[PROJECT]'); + const sink = {}; const request = { - resourceNames: formattedResourceNames, + parent: formattedParent, + sink: sink, }; // Mock Grpc layer - client._innerApiCalls.listLogEntries = mockSimpleGrpcMethod( + client._innerApiCalls.createSink = mockSimpleGrpcMethod( request, null, error ); - client.listLogEntries(request, (err, response) => { + client.createSink(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -224,59 +252,70 @@ describe('LoggingServiceV2Client', () => { }); }); - describe('listMonitoredResourceDescriptors', () => { - it('invokes listMonitoredResourceDescriptors without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + describe('updateSink', () => { + it('invokes updateSink without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const request = {}; + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sink = {}; + const request = { + sinkName: formattedSinkName, + sink: sink, + }; // Mock response - const nextPageToken = ''; - const resourceDescriptorsElement = {}; - const resourceDescriptors = [resourceDescriptorsElement]; + const name = 'name3373707'; + const destination = 'destination-1429847026'; + const filter = 'filter-1274492040'; + const writerIdentity = 'writerIdentity775638794'; + const includeChildren = true; const expectedResponse = { - nextPageToken: nextPageToken, - resourceDescriptors: resourceDescriptors, + name: name, + destination: destination, + filter: filter, + writerIdentity: writerIdentity, + includeChildren: includeChildren, }; // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.resourceDescriptors); - }; + client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.listMonitoredResourceDescriptors(request, (err, response) => { + client.updateSink(request, (err, response) => { assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.resourceDescriptors); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes listMonitoredResourceDescriptors with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + it('invokes updateSink with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const request = {}; + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sink = {}; + const request = { + sinkName: formattedSinkName, + sink: sink, + }; // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = mockSimpleGrpcMethod( + client._innerApiCalls.updateSink = mockSimpleGrpcMethod( request, null, error ); - client.listMonitoredResourceDescriptors(request, (err, response) => { + client.updateSink(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -285,98 +324,57 @@ describe('LoggingServiceV2Client', () => { }); }); - describe('listLogs', () => { - it('invokes listLogs without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + describe('deleteSink', () => { + it('invokes deleteSink without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedParent = client.projectPath('[PROJECT]'); + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const logNamesElement = 'logNamesElement-1079688374'; - const logNames = [logNamesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - logNames: logNames, + sinkName: formattedSinkName, }; // Mock Grpc layer - client._innerApiCalls.listLogs = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.logNames); - }; + client._innerApiCalls.deleteSink = mockSimpleGrpcMethod(request); - client.listLogs(request, (err, response) => { + client.deleteSink(request, err => { assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.logNames); done(); }); }); - it('invokes listLogs with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ + it('invokes deleteSink with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedParent = client.projectPath('[PROJECT]'); + const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); const request = { - parent: formattedParent, + sinkName: formattedSinkName, }; // Mock Grpc layer - client._innerApiCalls.listLogs = mockSimpleGrpcMethod( + client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( request, null, error ); - client.listLogs(request, (err, response) => { + client.deleteSink(request, err => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); done(); }); }); }); -}); -describe('ConfigServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = loggingModule.v2.ConfigServiceV2Client.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = loggingModule.v2.ConfigServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = loggingModule.v2.ConfigServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new loggingModule.v2.ConfigServiceV2Client(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new loggingModule.v2.ConfigServiceV2Client({fallback: true}); - assert(client); - }); - - describe('listSinks', () => { - it('invokes listSinks without error', done => { + describe('listExclusions', () => { + it('invokes listExclusions without error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -390,27 +388,31 @@ describe('ConfigServiceV2Client', () => { // Mock response const nextPageToken = ''; - const sinksElement = {}; - const sinks = [sinksElement]; + const exclusionsElement = {}; + const exclusions = [exclusionsElement]; const expectedResponse = { nextPageToken: nextPageToken, - sinks: sinks, + exclusions: exclusions, }; // Mock Grpc layer - client._innerApiCalls.listSinks = (actualRequest, options, callback) => { + client._innerApiCalls.listExclusions = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.sinks); + callback(null, expectedResponse.exclusions); }; - client.listSinks(request, (err, response) => { + client.listExclusions(request, (err, response) => { assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.sinks); + assert.deepStrictEqual(response, expectedResponse.exclusions); done(); }); }); - it('invokes listSinks with error', done => { + it('invokes listExclusions with error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -423,13 +425,13 @@ describe('ConfigServiceV2Client', () => { }; // Mock Grpc layer - client._innerApiCalls.listSinks = mockSimpleGrpcMethod( + client._innerApiCalls.listExclusions = mockSimpleGrpcMethod( request, null, error ); - client.listSinks(request, (err, response) => { + client.listExclusions(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -438,66 +440,64 @@ describe('ConfigServiceV2Client', () => { }); }); - describe('getSink', () => { - it('invokes getSink without error', done => { + describe('getExclusion', () => { + it('invokes getExclusion without error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); const request = { - sinkName: formattedSinkName, + name: formattedName, }; // Mock response - const name = 'name3373707'; - const destination = 'destination-1429847026'; + const name2 = 'name2-1052831874'; + const description = 'description-1724546052'; const filter = 'filter-1274492040'; - const writerIdentity = 'writerIdentity775638794'; - const includeChildren = true; + const disabled = true; const expectedResponse = { - name: name, - destination: destination, + name: name2, + description: description, filter: filter, - writerIdentity: writerIdentity, - includeChildren: includeChildren, + disabled: disabled, }; // Mock Grpc layer - client._innerApiCalls.getSink = mockSimpleGrpcMethod( + client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( request, expectedResponse ); - client.getSink(request, (err, response) => { + client.getExclusion(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes getSink with error', done => { + it('invokes getExclusion with error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); const request = { - sinkName: formattedSinkName, + name: formattedName, }; // Mock Grpc layer - client._innerApiCalls.getSink = mockSimpleGrpcMethod( + client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( request, null, error ); - client.getSink(request, (err, response) => { + client.getExclusion(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -506,8 +506,8 @@ describe('ConfigServiceV2Client', () => { }); }); - describe('createSink', () => { - it('invokes createSink without error', done => { + describe('createExclusion', () => { + it('invokes createExclusion without error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -515,40 +515,38 @@ describe('ConfigServiceV2Client', () => { // Mock request const formattedParent = client.projectPath('[PROJECT]'); - const sink = {}; + const exclusion = {}; const request = { parent: formattedParent, - sink: sink, + exclusion: exclusion, }; // Mock response const name = 'name3373707'; - const destination = 'destination-1429847026'; + const description = 'description-1724546052'; const filter = 'filter-1274492040'; - const writerIdentity = 'writerIdentity775638794'; - const includeChildren = true; + const disabled = true; const expectedResponse = { name: name, - destination: destination, + description: description, filter: filter, - writerIdentity: writerIdentity, - includeChildren: includeChildren, + disabled: disabled, }; // Mock Grpc layer - client._innerApiCalls.createSink = mockSimpleGrpcMethod( + client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( request, expectedResponse ); - client.createSink(request, (err, response) => { + client.createExclusion(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes createSink with error', done => { + it('invokes createExclusion with error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -556,20 +554,20 @@ describe('ConfigServiceV2Client', () => { // Mock request const formattedParent = client.projectPath('[PROJECT]'); - const sink = {}; + const exclusion = {}; const request = { parent: formattedParent, - sink: sink, + exclusion: exclusion, }; // Mock Grpc layer - client._innerApiCalls.createSink = mockSimpleGrpcMethod( + client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( request, null, error ); - client.createSink(request, (err, response) => { + client.createExclusion(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -578,70 +576,72 @@ describe('ConfigServiceV2Client', () => { }); }); - describe('updateSink', () => { - it('invokes updateSink without error', done => { + describe('updateExclusion', () => { + it('invokes updateExclusion without error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - const sink = {}; + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const exclusion = {}; + const updateMask = {}; const request = { - sinkName: formattedSinkName, - sink: sink, + name: formattedName, + exclusion: exclusion, + updateMask: updateMask, }; // Mock response - const name = 'name3373707'; - const destination = 'destination-1429847026'; + const name2 = 'name2-1052831874'; + const description = 'description-1724546052'; const filter = 'filter-1274492040'; - const writerIdentity = 'writerIdentity775638794'; - const includeChildren = true; + const disabled = true; const expectedResponse = { - name: name, - destination: destination, + name: name2, + description: description, filter: filter, - writerIdentity: writerIdentity, - includeChildren: includeChildren, + disabled: disabled, }; // Mock Grpc layer - client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( request, expectedResponse ); - client.updateSink(request, (err, response) => { + client.updateExclusion(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes updateSink with error', done => { + it('invokes updateExclusion with error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - const sink = {}; + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const exclusion = {}; + const updateMask = {}; const request = { - sinkName: formattedSinkName, - sink: sink, + name: formattedName, + exclusion: exclusion, + updateMask: updateMask, }; // Mock Grpc layer - client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( request, null, error ); - client.updateSink(request, (err, response) => { + client.updateExclusion(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -650,180 +650,182 @@ describe('ConfigServiceV2Client', () => { }); }); - describe('deleteSink', () => { - it('invokes deleteSink without error', done => { + describe('deleteExclusion', () => { + it('invokes deleteExclusion without error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); const request = { - sinkName: formattedSinkName, + name: formattedName, }; // Mock Grpc layer - client._innerApiCalls.deleteSink = mockSimpleGrpcMethod(request); + client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod(request); - client.deleteSink(request, err => { + client.deleteExclusion(request, err => { assert.ifError(err); done(); }); }); - it('invokes deleteSink with error', done => { + it('invokes deleteExclusion with error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); const request = { - sinkName: formattedSinkName, + name: formattedName, }; // Mock Grpc layer - client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( + client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( request, null, error ); - client.deleteSink(request, err => { + client.deleteExclusion(request, err => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); }); +}); +describe('LoggingServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = loggingModule.v2.LoggingServiceV2Client.servicePath; + assert(servicePath); + }); - describe('listExclusions', () => { - it('invokes listExclusions without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + it('has apiEndpoint', () => { + const apiEndpoint = loggingModule.v2.LoggingServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = loggingModule.v2.LoggingServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new loggingModule.v2.LoggingServiceV2Client(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new loggingModule.v2.LoggingServiceV2Client({ + fallback: true, + }); + assert(client); + }); + + describe('deleteLog', () => { + it('invokes deleteLog without error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedParent = client.projectPath('[PROJECT]'); + const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const exclusionsElement = {}; - const exclusions = [exclusionsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - exclusions: exclusions, + logName: formattedLogName, }; // Mock Grpc layer - client._innerApiCalls.listExclusions = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.exclusions); - }; + client._innerApiCalls.deleteLog = mockSimpleGrpcMethod(request); - client.listExclusions(request, (err, response) => { + client.deleteLog(request, err => { assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.exclusions); done(); }); }); - it('invokes listExclusions with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + it('invokes deleteLog with error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedParent = client.projectPath('[PROJECT]'); + const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); const request = { - parent: formattedParent, + logName: formattedLogName, }; // Mock Grpc layer - client._innerApiCalls.listExclusions = mockSimpleGrpcMethod( + client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( request, null, error ); - client.listExclusions(request, (err, response) => { + client.deleteLog(request, err => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); done(); }); }); }); - describe('getExclusion', () => { - it('invokes getExclusion without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + describe('writeLogEntries', () => { + it('invokes writeLogEntries without error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const entries = []; const request = { - name: formattedName, + entries: entries, }; // Mock response - const name2 = 'name2-1052831874'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const disabled = true; - const expectedResponse = { - name: name2, - description: description, - filter: filter, - disabled: disabled, - }; + const expectedResponse = {}; // Mock Grpc layer - client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( + client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( request, expectedResponse ); - client.getExclusion(request, (err, response) => { + client.writeLogEntries(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes getExclusion with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + it('invokes writeLogEntries with error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const entries = []; const request = { - name: formattedName, + entries: entries, }; // Mock Grpc layer - client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( + client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( request, null, error ); - client.getExclusion(request, (err, response) => { + client.writeLogEntries(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -832,68 +834,65 @@ describe('ConfigServiceV2Client', () => { }); }); - describe('createExclusion', () => { - it('invokes createExclusion without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + describe('listLogEntries', () => { + it('invokes listLogEntries without error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const exclusion = {}; + const formattedResourceNames = []; const request = { - parent: formattedParent, - exclusion: exclusion, + resourceNames: formattedResourceNames, }; // Mock response - const name = 'name3373707'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const disabled = true; + const nextPageToken = ''; + const entriesElement = {}; + const entries = [entriesElement]; const expectedResponse = { - name: name, - description: description, - filter: filter, - disabled: disabled, + nextPageToken: nextPageToken, + entries: entries, }; // Mock Grpc layer - client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.listLogEntries = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.entries); + }; - client.createExclusion(request, (err, response) => { + client.listLogEntries(request, (err, response) => { assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); + assert.deepStrictEqual(response, expectedResponse.entries); done(); }); }); - it('invokes createExclusion with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + it('invokes listLogEntries with error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const exclusion = {}; + const formattedResourceNames = []; const request = { - parent: formattedParent, - exclusion: exclusion, + resourceNames: formattedResourceNames, }; // Mock Grpc layer - client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( + client._innerApiCalls.listLogEntries = mockSimpleGrpcMethod( request, null, error ); - client.createExclusion(request, (err, response) => { + client.listLogEntries(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -902,72 +901,59 @@ describe('ConfigServiceV2Client', () => { }); }); - describe('updateExclusion', () => { - it('invokes updateExclusion without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + describe('listMonitoredResourceDescriptors', () => { + it('invokes listMonitoredResourceDescriptors without error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - const exclusion = {}; - const updateMask = {}; - const request = { - name: formattedName, - exclusion: exclusion, - updateMask: updateMask, - }; + const request = {}; // Mock response - const name2 = 'name2-1052831874'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const disabled = true; + const nextPageToken = ''; + const resourceDescriptorsElement = {}; + const resourceDescriptors = [resourceDescriptorsElement]; const expectedResponse = { - name: name2, - description: description, - filter: filter, - disabled: disabled, + nextPageToken: nextPageToken, + resourceDescriptors: resourceDescriptors, }; // Mock Grpc layer - client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( - request, - expectedResponse - ); + client._innerApiCalls.listMonitoredResourceDescriptors = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.resourceDescriptors); + }; - client.updateExclusion(request, (err, response) => { + client.listMonitoredResourceDescriptors(request, (err, response) => { assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); + assert.deepStrictEqual(response, expectedResponse.resourceDescriptors); done(); }); }); - it('invokes updateExclusion with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + it('invokes listMonitoredResourceDescriptors with error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - const exclusion = {}; - const updateMask = {}; - const request = { - name: formattedName, - exclusion: exclusion, - updateMask: updateMask, - }; + const request = {}; // Mock Grpc layer - client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( + client._innerApiCalls.listMonitoredResourceDescriptors = mockSimpleGrpcMethod( request, null, error ); - client.updateExclusion(request, (err, response) => { + client.listMonitoredResourceDescriptors(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); @@ -976,50 +962,64 @@ describe('ConfigServiceV2Client', () => { }); }); - describe('deleteExclusion', () => { - it('invokes deleteExclusion without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + describe('listLogs', () => { + it('invokes listLogs without error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const formattedParent = client.projectPath('[PROJECT]'); const request = { - name: formattedName, + parent: formattedParent, + }; + + // Mock response + const nextPageToken = ''; + const logNamesElement = 'logNamesElement-1079688374'; + const logNames = [logNamesElement]; + const expectedResponse = { + nextPageToken: nextPageToken, + logNames: logNames, }; // Mock Grpc layer - client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod(request); + client._innerApiCalls.listLogs = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.logNames); + }; - client.deleteExclusion(request, err => { + client.listLogs(request, (err, response) => { assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.logNames); done(); }); }); - it('invokes deleteExclusion with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ + it('invokes listLogs with error', done => { + const client = new loggingModule.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const formattedParent = client.projectPath('[PROJECT]'); const request = { - name: formattedName, + parent: formattedParent, }; // Mock Grpc layer - client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( + client._innerApiCalls.listLogs = mockSimpleGrpcMethod( request, null, error ); - client.deleteExclusion(request, err => { + client.listLogs(request, (err, response) => { assert(err instanceof Error); assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); From f6e5a0bc41ff63728e5b8490f56635d252b8a859 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 1 Oct 2019 20:15:05 -0700 Subject: [PATCH 0481/1029] fix: use compatible version of google-gax * fix: use compatible version of google-gax * fix: use gax v1.6.3 --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cc4d8a137f1..9331ba7e0ce 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ "extend": "^3.0.2", "gcp-metadata": "^3.0.0", "google-auth-library": "^5.2.2", - "google-gax": "^1.0.0", + "google-gax": "^1.6.3", "is": "^3.2.1", "on-finished": "^2.3.0", "protobufjs": "^6.8.8", From 0d13e07ff9ac79af63f4f766fa741662da559c84 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 7 Oct 2019 13:51:34 -0700 Subject: [PATCH 0482/1029] feat: introduces startTime and endTime --- .../logging/.github/PULL_REQUEST_TEMPLATE.md | 2 +- .../google/logging/v2/logging_config.proto | 6 + handwritten/logging/protos/protos.d.ts | 10202 ++++++ handwritten/logging/protos/protos.js | 25787 ++++++++++++++++ handwritten/logging/protos/protos.json | 14 + .../google/logging/v2/doc_logging_config.js | 10 + handwritten/logging/synth.metadata | 10 +- 7 files changed, 36025 insertions(+), 6 deletions(-) create mode 100644 handwritten/logging/protos/protos.d.ts create mode 100644 handwritten/logging/protos/protos.js diff --git a/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md b/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md index 46cd1076bd7..a8d94134a27 100644 --- a/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md +++ b/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,5 @@ Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: -- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/{{metadata['repo']['name']}}/issues) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-logging/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 1e3c84d3f41..a9ccdf51cb1 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -374,6 +374,12 @@ message LogSink { // // This field may not be present for older sinks. google.protobuf.Timestamp update_time = 14; + + // Do not use. This field is ignored. + google.protobuf.Timestamp start_time = 10 [deprecated = true]; + + // Do not use. This field is ignored. + google.protobuf.Timestamp end_time = 11 [deprecated = true]; } // Options that change functionality of a sink exporting data to BigQuery. diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts new file mode 100644 index 00000000000..0a64a133796 --- /dev/null +++ b/handwritten/logging/protos/protos.d.ts @@ -0,0 +1,10202 @@ +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue: google.protobuf.NullValue; + + /** Value numberValue. */ + public numberValue: number; + + /** Value stringValue. */ + public stringValue: string; + + /** Value boolValue. */ + public boolValue: boolean; + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: Uint8Array; + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace logging. */ + namespace logging { + + /** Namespace v2. */ + namespace v2 { + + /** Represents a ConfigServiceV2 */ + class ConfigServiceV2 extends $protobuf.rpc.Service { + + /** + * Constructs a new ConfigServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; + + /** + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSinksResponse + */ + public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; + + /** + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @returns Promise + */ + public listSinks(request: google.logging.v2.IListSinksRequest): Promise; + + /** + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; + + /** + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @returns Promise + */ + public getSink(request: google.logging.v2.IGetSinkRequest): Promise; + + /** + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; + + /** + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @returns Promise + */ + public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; + + /** + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; + + /** + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @returns Promise + */ + public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; + + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; + + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @returns Promise + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; + + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; + + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @returns Promise + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; + + /** + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; + + /** + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @returns Promise + */ + public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; + + /** + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; + + /** + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @returns Promise + */ + public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; + + /** + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; + + /** + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @returns Promise + */ + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; + + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; + + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @returns Promise + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; + } + + namespace ConfigServiceV2 { + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @param error Error, if any + * @param [response] ListSinksResponse + */ + type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @param error Error, if any + * @param [response] ListExclusionsResponse + */ + type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a LogSink. */ + interface ILogSink { + + /** LogSink name */ + name?: (string|null); + + /** LogSink destination */ + destination?: (string|null); + + /** LogSink filter */ + filter?: (string|null); + + /** LogSink outputVersionFormat */ + outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|null); + + /** LogSink writerIdentity */ + writerIdentity?: (string|null); + + /** LogSink includeChildren */ + includeChildren?: (boolean|null); + + /** LogSink bigqueryOptions */ + bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogSink updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogSink startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** LogSink endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a LogSink. */ + class LogSink implements ILogSink { + + /** + * Constructs a new LogSink. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogSink); + + /** LogSink name. */ + public name: string; + + /** LogSink destination. */ + public destination: string; + + /** LogSink filter. */ + public filter: string; + + /** LogSink outputVersionFormat. */ + public outputVersionFormat: google.logging.v2.LogSink.VersionFormat; + + /** LogSink writerIdentity. */ + public writerIdentity: string; + + /** LogSink includeChildren. */ + public includeChildren: boolean; + + /** LogSink bigqueryOptions. */ + public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogSink updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogSink startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** LogSink endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** LogSink options. */ + public options?: "bigqueryOptions"; + + /** + * Creates a new LogSink instance using the specified properties. + * @param [properties] Properties to set + * @returns LogSink instance + */ + public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; + + /** + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogSink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; + + /** + * Decodes a LogSink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; + + /** + * Verifies a LogSink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogSink + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; + + /** + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @param message LogSink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogSink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace LogSink { + + /** VersionFormat enum. */ + enum VersionFormat { + VERSION_FORMAT_UNSPECIFIED = 0, + V2 = 1, + V1 = 2 + } + } + + /** Properties of a BigQueryOptions. */ + interface IBigQueryOptions { + + /** BigQueryOptions usePartitionedTables */ + usePartitionedTables?: (boolean|null); + } + + /** Represents a BigQueryOptions. */ + class BigQueryOptions implements IBigQueryOptions { + + /** + * Constructs a new BigQueryOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IBigQueryOptions); + + /** BigQueryOptions usePartitionedTables. */ + public usePartitionedTables: boolean; + + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryOptions instance + */ + public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; + + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; + + /** + * Verifies a BigQueryOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryOptions + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; + + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @param message BigQueryOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListSinksRequest. */ + interface IListSinksRequest { + + /** ListSinksRequest parent */ + parent?: (string|null); + + /** ListSinksRequest pageToken */ + pageToken?: (string|null); + + /** ListSinksRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListSinksRequest. */ + class ListSinksRequest implements IListSinksRequest { + + /** + * Constructs a new ListSinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListSinksRequest); + + /** ListSinksRequest parent. */ + public parent: string; + + /** ListSinksRequest pageToken. */ + public pageToken: string; + + /** ListSinksRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListSinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSinksRequest instance + */ + public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; + + /** + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; + + /** + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; + + /** + * Verifies a ListSinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; + + /** + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @param message ListSinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListSinksResponse. */ + interface IListSinksResponse { + + /** ListSinksResponse sinks */ + sinks?: (google.logging.v2.ILogSink[]|null); + + /** ListSinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSinksResponse. */ + class ListSinksResponse implements IListSinksResponse { + + /** + * Constructs a new ListSinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListSinksResponse); + + /** ListSinksResponse sinks. */ + public sinks: google.logging.v2.ILogSink[]; + + /** ListSinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSinksResponse instance + */ + public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; + + /** + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; + + /** + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; + + /** + * Verifies a ListSinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; + + /** + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @param message ListSinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetSinkRequest. */ + interface IGetSinkRequest { + + /** GetSinkRequest sinkName */ + sinkName?: (string|null); + } + + /** Represents a GetSinkRequest. */ + class GetSinkRequest implements IGetSinkRequest { + + /** + * Constructs a new GetSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetSinkRequest); + + /** GetSinkRequest sinkName. */ + public sinkName: string; + + /** + * Creates a new GetSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSinkRequest instance + */ + public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; + + /** + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; + + /** + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; + + /** + * Verifies a GetSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; + + /** + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @param message GetSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateSinkRequest. */ + interface ICreateSinkRequest { + + /** CreateSinkRequest parent */ + parent?: (string|null); + + /** CreateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); + + /** CreateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + } + + /** Represents a CreateSinkRequest. */ + class CreateSinkRequest implements ICreateSinkRequest { + + /** + * Constructs a new CreateSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateSinkRequest); + + /** CreateSinkRequest parent. */ + public parent: string; + + /** CreateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** CreateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSinkRequest instance + */ + public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; + + /** + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; + + /** + * Verifies a CreateSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; + + /** + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @param message CreateSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSinkRequest. */ + interface IUpdateSinkRequest { + + /** UpdateSinkRequest sinkName */ + sinkName?: (string|null); + + /** UpdateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + + /** UpdateSinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSinkRequest. */ + class UpdateSinkRequest implements IUpdateSinkRequest { + + /** + * Constructs a new UpdateSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateSinkRequest); + + /** UpdateSinkRequest sinkName. */ + public sinkName: string; + + /** UpdateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; + + /** UpdateSinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSinkRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; + + /** + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; + + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; + + /** + * Verifies an UpdateSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; + + /** + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @param message UpdateSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteSinkRequest. */ + interface IDeleteSinkRequest { + + /** DeleteSinkRequest sinkName */ + sinkName?: (string|null); + } + + /** Represents a DeleteSinkRequest. */ + class DeleteSinkRequest implements IDeleteSinkRequest { + + /** + * Constructs a new DeleteSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteSinkRequest); + + /** DeleteSinkRequest sinkName. */ + public sinkName: string; + + /** + * Creates a new DeleteSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSinkRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + + /** + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + + /** + * Verifies a DeleteSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + + /** + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @param message DeleteSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogExclusion. */ + interface ILogExclusion { + + /** LogExclusion name */ + name?: (string|null); + + /** LogExclusion description */ + description?: (string|null); + + /** LogExclusion filter */ + filter?: (string|null); + + /** LogExclusion disabled */ + disabled?: (boolean|null); + + /** LogExclusion createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogExclusion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a LogExclusion. */ + class LogExclusion implements ILogExclusion { + + /** + * Constructs a new LogExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogExclusion); + + /** LogExclusion name. */ + public name: string; + + /** LogExclusion description. */ + public description: string; + + /** LogExclusion filter. */ + public filter: string; + + /** LogExclusion disabled. */ + public disabled: boolean; + + /** LogExclusion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogExclusion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new LogExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns LogExclusion instance + */ + public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; + + /** + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; + + /** + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; + + /** + * Verifies a LogExclusion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogExclusion + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; + + /** + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * @param message LogExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListExclusionsRequest. */ + interface IListExclusionsRequest { + + /** ListExclusionsRequest parent */ + parent?: (string|null); + + /** ListExclusionsRequest pageToken */ + pageToken?: (string|null); + + /** ListExclusionsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListExclusionsRequest. */ + class ListExclusionsRequest implements IListExclusionsRequest { + + /** + * Constructs a new ListExclusionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListExclusionsRequest); + + /** ListExclusionsRequest parent. */ + public parent: string; + + /** ListExclusionsRequest pageToken. */ + public pageToken: string; + + /** ListExclusionsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListExclusionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExclusionsRequest instance + */ + public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; + + /** + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; + + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; + + /** + * Verifies a ListExclusionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExclusionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; + + /** + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @param message ListExclusionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListExclusionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListExclusionsResponse. */ + interface IListExclusionsResponse { + + /** ListExclusionsResponse exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); + + /** ListExclusionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListExclusionsResponse. */ + class ListExclusionsResponse implements IListExclusionsResponse { + + /** + * Constructs a new ListExclusionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListExclusionsResponse); + + /** ListExclusionsResponse exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; + + /** ListExclusionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListExclusionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExclusionsResponse instance + */ + public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; + + /** + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; + + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; + + /** + * Verifies a ListExclusionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExclusionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; + + /** + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @param message ListExclusionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListExclusionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetExclusionRequest. */ + interface IGetExclusionRequest { + + /** GetExclusionRequest name */ + name?: (string|null); + } + + /** Represents a GetExclusionRequest. */ + class GetExclusionRequest implements IGetExclusionRequest { + + /** + * Constructs a new GetExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetExclusionRequest); + + /** GetExclusionRequest name. */ + public name: string; + + /** + * Creates a new GetExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; + + /** + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; + + /** + * Verifies a GetExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; + + /** + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @param message GetExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateExclusionRequest. */ + interface ICreateExclusionRequest { + + /** CreateExclusionRequest parent */ + parent?: (string|null); + + /** CreateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + } + + /** Represents a CreateExclusionRequest. */ + class CreateExclusionRequest implements ICreateExclusionRequest { + + /** + * Constructs a new CreateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateExclusionRequest); + + /** CreateExclusionRequest parent. */ + public parent: string; + + /** CreateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); + + /** + * Creates a new CreateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateExclusionRequest instance + */ + public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; + + /** + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; + + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; + + /** + * Verifies a CreateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; + + /** + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @param message CreateExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateExclusionRequest. */ + interface IUpdateExclusionRequest { + + /** UpdateExclusionRequest name */ + name?: (string|null); + + /** UpdateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + + /** UpdateExclusionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateExclusionRequest. */ + class UpdateExclusionRequest implements IUpdateExclusionRequest { + + /** + * Constructs a new UpdateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateExclusionRequest); + + /** UpdateExclusionRequest name. */ + public name: string; + + /** UpdateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); + + /** UpdateExclusionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; + + /** + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; + + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; + + /** + * Verifies an UpdateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; + + /** + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @param message UpdateExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteExclusionRequest. */ + interface IDeleteExclusionRequest { + + /** DeleteExclusionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteExclusionRequest. */ + class DeleteExclusionRequest implements IDeleteExclusionRequest { + + /** + * Constructs a new DeleteExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + + /** DeleteExclusionRequest name. */ + public name: string; + + /** + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; + + /** + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; + + /** + * Verifies a DeleteExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; + + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @param message DeleteExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a LoggingServiceV2 */ + class LoggingServiceV2 extends $protobuf.rpc.Service { + + /** + * Constructs a new LoggingServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; + + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; + + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @returns Promise + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; + + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; + + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @returns Promise + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; + + /** + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse + */ + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; + + /** + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @returns Promise + */ + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; + + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + */ + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; + + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise + */ + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; + + /** + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogsResponse + */ + public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; + + /** + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @returns Promise + */ + public listLogs(request: google.logging.v2.IListLogsRequest): Promise; + } + + namespace LoggingServiceV2 { + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @param error Error, if any + * @param [response] WriteLogEntriesResponse + */ + type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @param error Error, if any + * @param [response] ListLogEntriesResponse + */ + type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse + */ + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @param error Error, if any + * @param [response] ListLogsResponse + */ + type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; + } + + /** Properties of a DeleteLogRequest. */ + interface IDeleteLogRequest { + + /** DeleteLogRequest logName */ + logName?: (string|null); + } + + /** Represents a DeleteLogRequest. */ + class DeleteLogRequest implements IDeleteLogRequest { + + /** + * Constructs a new DeleteLogRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteLogRequest); + + /** DeleteLogRequest logName. */ + public logName: string; + + /** + * Creates a new DeleteLogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLogRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; + + /** + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; + + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; + + /** + * Verifies a DeleteLogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLogRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; + + /** + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @param message DeleteLogRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLogRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteLogEntriesRequest. */ + interface IWriteLogEntriesRequest { + + /** WriteLogEntriesRequest logName */ + logName?: (string|null); + + /** WriteLogEntriesRequest resource */ + resource?: (google.api.IMonitoredResource|null); + + /** WriteLogEntriesRequest labels */ + labels?: ({ [k: string]: string }|null); + + /** WriteLogEntriesRequest entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** WriteLogEntriesRequest partialSuccess */ + partialSuccess?: (boolean|null); + + /** WriteLogEntriesRequest dryRun */ + dryRun?: (boolean|null); + } + + /** Represents a WriteLogEntriesRequest. */ + class WriteLogEntriesRequest implements IWriteLogEntriesRequest { + + /** + * Constructs a new WriteLogEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); + + /** WriteLogEntriesRequest logName. */ + public logName: string; + + /** WriteLogEntriesRequest resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** WriteLogEntriesRequest labels. */ + public labels: { [k: string]: string }; + + /** WriteLogEntriesRequest entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** WriteLogEntriesRequest partialSuccess. */ + public partialSuccess: boolean; + + /** WriteLogEntriesRequest dryRun. */ + public dryRun: boolean; + + /** + * Creates a new WriteLogEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesRequest instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; + + /** + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; + + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; + + /** + * Verifies a WriteLogEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; + + /** + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @param message WriteLogEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteLogEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteLogEntriesResponse. */ + interface IWriteLogEntriesResponse { + } + + /** Represents a WriteLogEntriesResponse. */ + class WriteLogEntriesResponse implements IWriteLogEntriesResponse { + + /** + * Constructs a new WriteLogEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); + + /** + * Creates a new WriteLogEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesResponse instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; + + /** + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; + + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; + + /** + * Verifies a WriteLogEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; + + /** + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @param message WriteLogEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteLogEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteLogEntriesPartialErrors. */ + interface IWriteLogEntriesPartialErrors { + + /** WriteLogEntriesPartialErrors logEntryErrors */ + logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); + } + + /** Represents a WriteLogEntriesPartialErrors. */ + class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { + + /** + * Constructs a new WriteLogEntriesPartialErrors. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); + + /** WriteLogEntriesPartialErrors logEntryErrors. */ + public logEntryErrors: { [k: string]: google.rpc.IStatus }; + + /** + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesPartialErrors instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; + + /** + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; + + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; + + /** + * Verifies a WriteLogEntriesPartialErrors message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesPartialErrors + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; + + /** + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @param message WriteLogEntriesPartialErrors + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteLogEntriesPartialErrors to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogEntriesRequest. */ + interface IListLogEntriesRequest { + + /** ListLogEntriesRequest projectIds */ + projectIds?: (string[]|null); + + /** ListLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); + + /** ListLogEntriesRequest filter */ + filter?: (string|null); + + /** ListLogEntriesRequest orderBy */ + orderBy?: (string|null); + + /** ListLogEntriesRequest pageSize */ + pageSize?: (number|null); + + /** ListLogEntriesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLogEntriesRequest. */ + class ListLogEntriesRequest implements IListLogEntriesRequest { + + /** + * Constructs a new ListLogEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogEntriesRequest); + + /** ListLogEntriesRequest projectIds. */ + public projectIds: string[]; + + /** ListLogEntriesRequest resourceNames. */ + public resourceNames: string[]; + + /** ListLogEntriesRequest filter. */ + public filter: string; + + /** ListLogEntriesRequest orderBy. */ + public orderBy: string; + + /** ListLogEntriesRequest pageSize. */ + public pageSize: number; + + /** ListLogEntriesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogEntriesRequest instance + */ + public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; + + /** + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; + + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; + + /** + * Verifies a ListLogEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; + + /** + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @param message ListLogEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogEntriesResponse. */ + interface IListLogEntriesResponse { + + /** ListLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** ListLogEntriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLogEntriesResponse. */ + class ListLogEntriesResponse implements IListLogEntriesResponse { + + /** + * Constructs a new ListLogEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogEntriesResponse); + + /** ListLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** ListLogEntriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLogEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogEntriesResponse instance + */ + public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; + + /** + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; + + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; + + /** + * Verifies a ListLogEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; + + /** + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @param message ListLogEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { + + /** ListMonitoredResourceDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListMonitoredResourceDescriptorsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMonitoredResourceDescriptorsRequest. */ + class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + + /** + * Constructs a new ListMonitoredResourceDescriptorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); + + /** ListMonitoredResourceDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListMonitoredResourceDescriptorsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMonitoredResourceDescriptorsRequest instance + */ + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Verifies a ListMonitoredResourceDescriptorsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMonitoredResourceDescriptorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMonitoredResourceDescriptorsResponse. */ + interface IListMonitoredResourceDescriptorsResponse { + + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ + resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + + /** ListMonitoredResourceDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMonitoredResourceDescriptorsResponse. */ + class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + + /** + * Constructs a new ListMonitoredResourceDescriptorsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); + + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ + public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + + /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMonitoredResourceDescriptorsResponse instance + */ + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMonitoredResourceDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + + /** + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMonitoredResourceDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + + /** + * Verifies a ListMonitoredResourceDescriptorsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMonitoredResourceDescriptorsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogsRequest. */ + interface IListLogsRequest { + + /** ListLogsRequest parent */ + parent?: (string|null); + + /** ListLogsRequest pageSize */ + pageSize?: (number|null); + + /** ListLogsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLogsRequest. */ + class ListLogsRequest implements IListLogsRequest { + + /** + * Constructs a new ListLogsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogsRequest); + + /** ListLogsRequest parent. */ + public parent: string; + + /** ListLogsRequest pageSize. */ + public pageSize: number; + + /** ListLogsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLogsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogsRequest instance + */ + public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; + + /** + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; + + /** + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; + + /** + * Verifies a ListLogsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; + + /** + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * @param message ListLogsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogsResponse. */ + interface IListLogsResponse { + + /** ListLogsResponse logNames */ + logNames?: (string[]|null); + + /** ListLogsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLogsResponse. */ + class ListLogsResponse implements IListLogsResponse { + + /** + * Constructs a new ListLogsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogsResponse); + + /** ListLogsResponse logNames. */ + public logNames: string[]; + + /** ListLogsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLogsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogsResponse instance + */ + public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; + + /** + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; + + /** + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; + + /** + * Verifies a ListLogsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; + + /** + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @param message ListLogsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogEntry. */ + interface ILogEntry { + + /** LogEntry logName */ + logName?: (string|null); + + /** LogEntry resource */ + resource?: (google.api.IMonitoredResource|null); + + /** LogEntry protoPayload */ + protoPayload?: (google.protobuf.IAny|null); + + /** LogEntry textPayload */ + textPayload?: (string|null); + + /** LogEntry jsonPayload */ + jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp */ + receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity */ + severity?: (google.logging.type.LogSeverity|null); + + /** LogEntry insertId */ + insertId?: (string|null); + + /** LogEntry httpRequest */ + httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels */ + labels?: ({ [k: string]: string }|null); + + /** LogEntry metadata */ + metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation */ + operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace */ + trace?: (string|null); + + /** LogEntry spanId */ + spanId?: (string|null); + + /** LogEntry traceSampled */ + traceSampled?: (boolean|null); + + /** LogEntry sourceLocation */ + sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + } + + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { + + /** + * Constructs a new LogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogEntry); + + /** LogEntry logName. */ + public logName: string; + + /** LogEntry resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** LogEntry protoPayload. */ + public protoPayload?: (google.protobuf.IAny|null); + + /** LogEntry textPayload. */ + public textPayload: string; + + /** LogEntry jsonPayload. */ + public jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp. */ + public receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity. */ + public severity: google.logging.type.LogSeverity; + + /** LogEntry insertId. */ + public insertId: string; + + /** LogEntry httpRequest. */ + public httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels. */ + public labels: { [k: string]: string }; + + /** LogEntry metadata. */ + public metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation. */ + public operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace. */ + public trace: string; + + /** LogEntry spanId. */ + public spanId: string; + + /** LogEntry traceSampled. */ + public traceSampled: boolean; + + /** LogEntry sourceLocation. */ + public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + + /** LogEntry payload. */ + public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); + + /** + * Creates a new LogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntry instance + */ + public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; + + /** + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; + + /** + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; + + /** + * Verifies a LogEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntry + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; + + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogEntryOperation. */ + interface ILogEntryOperation { + + /** LogEntryOperation id */ + id?: (string|null); + + /** LogEntryOperation producer */ + producer?: (string|null); + + /** LogEntryOperation first */ + first?: (boolean|null); + + /** LogEntryOperation last */ + last?: (boolean|null); + } + + /** Represents a LogEntryOperation. */ + class LogEntryOperation implements ILogEntryOperation { + + /** + * Constructs a new LogEntryOperation. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogEntryOperation); + + /** LogEntryOperation id. */ + public id: string; + + /** LogEntryOperation producer. */ + public producer: string; + + /** LogEntryOperation first. */ + public first: boolean; + + /** LogEntryOperation last. */ + public last: boolean; + + /** + * Creates a new LogEntryOperation instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntryOperation instance + */ + public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; + + /** + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; + + /** + * Verifies a LogEntryOperation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntryOperation + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; + + /** + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @param message LogEntryOperation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogEntryOperation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogEntrySourceLocation. */ + interface ILogEntrySourceLocation { + + /** LogEntrySourceLocation file */ + file?: (string|null); + + /** LogEntrySourceLocation line */ + line?: (number|Long|null); + + /** LogEntrySourceLocation function */ + "function"?: (string|null); + } + + /** Represents a LogEntrySourceLocation. */ + class LogEntrySourceLocation implements ILogEntrySourceLocation { + + /** + * Constructs a new LogEntrySourceLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogEntrySourceLocation); + + /** LogEntrySourceLocation file. */ + public file: string; + + /** LogEntrySourceLocation line. */ + public line: (number|Long); + + /** LogEntrySourceLocation function. */ + public function: string; + + /** + * Creates a new LogEntrySourceLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntrySourceLocation instance + */ + public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; + + /** + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; + + /** + * Verifies a LogEntrySourceLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntrySourceLocation + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; + + /** + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @param message LogEntrySourceLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogEntrySourceLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a MetricsServiceV2 */ + class MetricsServiceV2 extends $protobuf.rpc.Service { + + /** + * Constructs a new MetricsServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new MetricsServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetricsServiceV2; + + /** + * Calls ListLogMetrics. + * @param request ListLogMetricsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogMetricsResponse + */ + public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest, callback: google.logging.v2.MetricsServiceV2.ListLogMetricsCallback): void; + + /** + * Calls ListLogMetrics. + * @param request ListLogMetricsRequest message or plain object + * @returns Promise + */ + public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest): Promise; + + /** + * Calls GetLogMetric. + * @param request GetLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric + */ + public getLogMetric(request: google.logging.v2.IGetLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.GetLogMetricCallback): void; + + /** + * Calls GetLogMetric. + * @param request GetLogMetricRequest message or plain object + * @returns Promise + */ + public getLogMetric(request: google.logging.v2.IGetLogMetricRequest): Promise; + + /** + * Calls CreateLogMetric. + * @param request CreateLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric + */ + public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.CreateLogMetricCallback): void; + + /** + * Calls CreateLogMetric. + * @param request CreateLogMetricRequest message or plain object + * @returns Promise + */ + public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest): Promise; + + /** + * Calls UpdateLogMetric. + * @param request UpdateLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric + */ + public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback): void; + + /** + * Calls UpdateLogMetric. + * @param request UpdateLogMetricRequest message or plain object + * @returns Promise + */ + public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest): Promise; + + /** + * Calls DeleteLogMetric. + * @param request DeleteLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback): void; + + /** + * Calls DeleteLogMetric. + * @param request DeleteLogMetricRequest message or plain object + * @returns Promise + */ + public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest): Promise; + } + + namespace MetricsServiceV2 { + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * @param error Error, if any + * @param [response] ListLogMetricsResponse + */ + type ListLogMetricsCallback = (error: (Error|null), response?: google.logging.v2.ListLogMetricsResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type GetLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type CreateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type UpdateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteLogMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a LogMetric. */ + interface ILogMetric { + + /** LogMetric name */ + name?: (string|null); + + /** LogMetric description */ + description?: (string|null); + + /** LogMetric filter */ + filter?: (string|null); + + /** LogMetric metricDescriptor */ + metricDescriptor?: (google.api.IMetricDescriptor|null); + + /** LogMetric valueExtractor */ + valueExtractor?: (string|null); + + /** LogMetric labelExtractors */ + labelExtractors?: ({ [k: string]: string }|null); + + /** LogMetric bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** LogMetric createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric version */ + version?: (google.logging.v2.LogMetric.ApiVersion|null); + } + + /** Represents a LogMetric. */ + class LogMetric implements ILogMetric { + + /** + * Constructs a new LogMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogMetric); + + /** LogMetric name. */ + public name: string; + + /** LogMetric description. */ + public description: string; + + /** LogMetric filter. */ + public filter: string; + + /** LogMetric metricDescriptor. */ + public metricDescriptor?: (google.api.IMetricDescriptor|null); + + /** LogMetric valueExtractor. */ + public valueExtractor: string; + + /** LogMetric labelExtractors. */ + public labelExtractors: { [k: string]: string }; + + /** LogMetric bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** LogMetric createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric version. */ + public version: google.logging.v2.LogMetric.ApiVersion; + + /** + * Creates a new LogMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns LogMetric instance + */ + public static create(properties?: google.logging.v2.ILogMetric): google.logging.v2.LogMetric; + + /** + * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @param message LogMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @param message LogMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogMetric; + + /** + * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogMetric; + + /** + * Verifies a LogMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogMetric + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogMetric; + + /** + * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * @param message LogMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace LogMetric { + + /** ApiVersion enum. */ + enum ApiVersion { + V2 = 0, + V1 = 1 + } + } + + /** Properties of a ListLogMetricsRequest. */ + interface IListLogMetricsRequest { + + /** ListLogMetricsRequest parent */ + parent?: (string|null); + + /** ListLogMetricsRequest pageToken */ + pageToken?: (string|null); + + /** ListLogMetricsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListLogMetricsRequest. */ + class ListLogMetricsRequest implements IListLogMetricsRequest { + + /** + * Constructs a new ListLogMetricsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogMetricsRequest); + + /** ListLogMetricsRequest parent. */ + public parent: string; + + /** ListLogMetricsRequest pageToken. */ + public pageToken: string; + + /** ListLogMetricsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListLogMetricsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogMetricsRequest instance + */ + public static create(properties?: google.logging.v2.IListLogMetricsRequest): google.logging.v2.ListLogMetricsRequest; + + /** + * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @param message ListLogMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @param message ListLogMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsRequest; + + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsRequest; + + /** + * Verifies a ListLogMetricsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogMetricsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsRequest; + + /** + * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * @param message ListLogMetricsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogMetricsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLogMetricsResponse. */ + interface IListLogMetricsResponse { + + /** ListLogMetricsResponse metrics */ + metrics?: (google.logging.v2.ILogMetric[]|null); + + /** ListLogMetricsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLogMetricsResponse. */ + class ListLogMetricsResponse implements IListLogMetricsResponse { + + /** + * Constructs a new ListLogMetricsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogMetricsResponse); + + /** ListLogMetricsResponse metrics. */ + public metrics: google.logging.v2.ILogMetric[]; + + /** ListLogMetricsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLogMetricsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogMetricsResponse instance + */ + public static create(properties?: google.logging.v2.IListLogMetricsResponse): google.logging.v2.ListLogMetricsResponse; + + /** + * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @param message ListLogMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @param message ListLogMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsResponse; + + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsResponse; + + /** + * Verifies a ListLogMetricsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogMetricsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsResponse; + + /** + * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * @param message ListLogMetricsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLogMetricsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetLogMetricRequest. */ + interface IGetLogMetricRequest { + + /** GetLogMetricRequest metricName */ + metricName?: (string|null); + } + + /** Represents a GetLogMetricRequest. */ + class GetLogMetricRequest implements IGetLogMetricRequest { + + /** + * Constructs a new GetLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetLogMetricRequest); + + /** GetLogMetricRequest metricName. */ + public metricName: string; + + /** + * Creates a new GetLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IGetLogMetricRequest): google.logging.v2.GetLogMetricRequest; + + /** + * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @param message GetLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @param message GetLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetLogMetricRequest; + + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetLogMetricRequest; + + /** + * Verifies a GetLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetLogMetricRequest; + + /** + * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * @param message GetLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateLogMetricRequest. */ + interface ICreateLogMetricRequest { + + /** CreateLogMetricRequest parent */ + parent?: (string|null); + + /** CreateLogMetricRequest metric */ + metric?: (google.logging.v2.ILogMetric|null); + } + + /** Represents a CreateLogMetricRequest. */ + class CreateLogMetricRequest implements ICreateLogMetricRequest { + + /** + * Constructs a new CreateLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateLogMetricRequest); + + /** CreateLogMetricRequest parent. */ + public parent: string; + + /** CreateLogMetricRequest metric. */ + public metric?: (google.logging.v2.ILogMetric|null); + + /** + * Creates a new CreateLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.ICreateLogMetricRequest): google.logging.v2.CreateLogMetricRequest; + + /** + * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @param message CreateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @param message CreateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateLogMetricRequest; + + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateLogMetricRequest; + + /** + * Verifies a CreateLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateLogMetricRequest; + + /** + * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. + * @param message CreateLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateLogMetricRequest. */ + interface IUpdateLogMetricRequest { + + /** UpdateLogMetricRequest metricName */ + metricName?: (string|null); + + /** UpdateLogMetricRequest metric */ + metric?: (google.logging.v2.ILogMetric|null); + } + + /** Represents an UpdateLogMetricRequest. */ + class UpdateLogMetricRequest implements IUpdateLogMetricRequest { + + /** + * Constructs a new UpdateLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateLogMetricRequest); + + /** UpdateLogMetricRequest metricName. */ + public metricName: string; + + /** UpdateLogMetricRequest metric. */ + public metric?: (google.logging.v2.ILogMetric|null); + + /** + * Creates a new UpdateLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateLogMetricRequest): google.logging.v2.UpdateLogMetricRequest; + + /** + * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @param message UpdateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @param message UpdateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateLogMetricRequest; + + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateLogMetricRequest; + + /** + * Verifies an UpdateLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateLogMetricRequest; + + /** + * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. + * @param message UpdateLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteLogMetricRequest. */ + interface IDeleteLogMetricRequest { + + /** DeleteLogMetricRequest metricName */ + metricName?: (string|null); + } + + /** Represents a DeleteLogMetricRequest. */ + class DeleteLogMetricRequest implements IDeleteLogMetricRequest { + + /** + * Constructs a new DeleteLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteLogMetricRequest); + + /** DeleteLogMetricRequest metricName. */ + public metricName: string; + + /** + * Creates a new DeleteLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteLogMetricRequest): google.logging.v2.DeleteLogMetricRequest; + + /** + * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @param message DeleteLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @param message DeleteLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogMetricRequest; + + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogMetricRequest; + + /** + * Verifies a DeleteLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogMetricRequest; + + /** + * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. + * @param message DeleteLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a HttpRequest. */ + interface IHttpRequest { + + /** HttpRequest requestMethod */ + requestMethod?: (string|null); + + /** HttpRequest requestUrl */ + requestUrl?: (string|null); + + /** HttpRequest requestSize */ + requestSize?: (number|Long|null); + + /** HttpRequest status */ + status?: (number|null); + + /** HttpRequest responseSize */ + responseSize?: (number|Long|null); + + /** HttpRequest userAgent */ + userAgent?: (string|null); + + /** HttpRequest remoteIp */ + remoteIp?: (string|null); + + /** HttpRequest serverIp */ + serverIp?: (string|null); + + /** HttpRequest referer */ + referer?: (string|null); + + /** HttpRequest latency */ + latency?: (google.protobuf.IDuration|null); + + /** HttpRequest cacheLookup */ + cacheLookup?: (boolean|null); + + /** HttpRequest cacheHit */ + cacheHit?: (boolean|null); + + /** HttpRequest cacheValidatedWithOriginServer */ + cacheValidatedWithOriginServer?: (boolean|null); + + /** HttpRequest cacheFillBytes */ + cacheFillBytes?: (number|Long|null); + + /** HttpRequest protocol */ + protocol?: (string|null); + } + + /** Represents a HttpRequest. */ + class HttpRequest implements IHttpRequest { + + /** + * Constructs a new HttpRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.type.IHttpRequest); + + /** HttpRequest requestMethod. */ + public requestMethod: string; + + /** HttpRequest requestUrl. */ + public requestUrl: string; + + /** HttpRequest requestSize. */ + public requestSize: (number|Long); + + /** HttpRequest status. */ + public status: number; + + /** HttpRequest responseSize. */ + public responseSize: (number|Long); + + /** HttpRequest userAgent. */ + public userAgent: string; + + /** HttpRequest remoteIp. */ + public remoteIp: string; + + /** HttpRequest serverIp. */ + public serverIp: string; + + /** HttpRequest referer. */ + public referer: string; + + /** HttpRequest latency. */ + public latency?: (google.protobuf.IDuration|null); + + /** HttpRequest cacheLookup. */ + public cacheLookup: boolean; + + /** HttpRequest cacheHit. */ + public cacheHit: boolean; + + /** HttpRequest cacheValidatedWithOriginServer. */ + public cacheValidatedWithOriginServer: boolean; + + /** HttpRequest cacheFillBytes. */ + public cacheFillBytes: (number|Long); + + /** HttpRequest protocol. */ + public protocol: string; + + /** + * Creates a new HttpRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRequest instance + */ + public static create(properties?: google.logging.type.IHttpRequest): google.logging.type.HttpRequest; + + /** + * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @param message HttpRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @param message HttpRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.type.HttpRequest; + + /** + * Decodes a HttpRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.type.HttpRequest; + + /** + * Verifies a HttpRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.type.HttpRequest; + + /** + * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. + * @param message HttpRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.type.HttpRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** LogSeverity enum. */ + enum LogSeverity { + DEFAULT = 0, + DEBUG = 100, + INFO = 200, + NOTICE = 300, + WARNING = 400, + ERROR = 500, + CRITICAL = 600, + ALERT = 700, + EMERGENCY = 800 + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { + + /** MonitoredResourceDescriptor name */ + name?: (string|null); + + /** MonitoredResourceDescriptor type */ + type?: (string|null); + + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); + + /** MonitoredResourceDescriptor description */ + description?: (string|null); + + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MonitoredResourceDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|null); + } + + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { + + /** + * Constructs a new MonitoredResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceDescriptor); + + /** MonitoredResourceDescriptor name. */ + public name: string; + + /** MonitoredResourceDescriptor type. */ + public type: string; + + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; + + /** MonitoredResourceDescriptor description. */ + public description: string; + + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MonitoredResourceDescriptor launchStage. */ + public launchStage: google.api.LaunchStage; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceDescriptor instance + */ + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; + + /** + * Verifies a MonitoredResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { + + /** MonitoredResource type */ + type?: (string|null); + + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { + + /** + * Constructs a new MonitoredResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResource); + + /** MonitoredResource type. */ + public type: string; + + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new MonitoredResource instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResource instance + */ + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; + + /** + * Verifies a MonitoredResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResource + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { + + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); + + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); + } + + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + + /** + * Constructs a new MonitoredResourceMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceMetadata); + + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); + + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; + + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceMetadata instance + */ + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + + /** + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; + + /** + * Verifies a MonitoredResourceMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + + /** + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResourceMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { + + /** LabelDescriptor key */ + key?: (string|null); + + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|null); + + /** LabelDescriptor description */ + description?: (string|null); + } + + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { + + /** + * Constructs a new LabelDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ILabelDescriptor); + + /** LabelDescriptor key. */ + public key: string; + + /** LabelDescriptor valueType. */ + public valueType: google.api.LabelDescriptor.ValueType; + + /** LabelDescriptor description. */ + public description: string; + + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelDescriptor instance + */ + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; + + /** + * Verifies a LabelDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace LabelDescriptor { + + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** Properties of a Distribution. */ + interface IDistribution { + + /** Distribution count */ + count?: (number|Long|null); + + /** Distribution mean */ + mean?: (number|null); + + /** Distribution sumOfSquaredDeviation */ + sumOfSquaredDeviation?: (number|null); + + /** Distribution range */ + range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts */ + bucketCounts?: ((number|Long)[]|null); + + /** Distribution exemplars */ + exemplars?: (google.api.Distribution.IExemplar[]|null); + } + + /** Represents a Distribution. */ + class Distribution implements IDistribution { + + /** + * Constructs a new Distribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDistribution); + + /** Distribution count. */ + public count: (number|Long); + + /** Distribution mean. */ + public mean: number; + + /** Distribution sumOfSquaredDeviation. */ + public sumOfSquaredDeviation: number; + + /** Distribution range. */ + public range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts. */ + public bucketCounts: (number|Long)[]; + + /** Distribution exemplars. */ + public exemplars: google.api.Distribution.IExemplar[]; + + /** + * Creates a new Distribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Distribution instance + */ + public static create(properties?: google.api.IDistribution): google.api.Distribution; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; + + /** + * Verifies a Distribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Distribution + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Distribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Distribution { + + /** Properties of a Range. */ + interface IRange { + + /** Range min */ + min?: (number|null); + + /** Range max */ + max?: (number|null); + } + + /** Represents a Range. */ + class Range implements IRange { + + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IRange); + + /** Range min. */ + public min: number; + + /** Range max. */ + public max: number; + + /** + * Creates a new Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Range instance + */ + public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; + + /** + * Verifies a Range message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BucketOptions. */ + interface IBucketOptions { + + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + } + + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { + + /** + * Constructs a new BucketOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IBucketOptions); + + /** BucketOptions linearBuckets. */ + public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets. */ + public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets. */ + public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + + /** BucketOptions options. */ + public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + + /** + * Creates a new BucketOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BucketOptions instance + */ + public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions; + + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions; + + /** + * Verifies a BucketOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BucketOptions + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; + + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @param message BucketOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BucketOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BucketOptions { + + /** Properties of a Linear. */ + interface ILinear { + + /** Linear numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Linear width */ + width?: (number|null); + + /** Linear offset */ + offset?: (number|null); + } + + /** Represents a Linear. */ + class Linear implements ILinear { + + /** + * Constructs a new Linear. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.ILinear); + + /** Linear numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Linear width. */ + public width: number; + + /** Linear offset. */ + public offset: number; + + /** + * Creates a new Linear instance using the specified properties. + * @param [properties] Properties to set + * @returns Linear instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; + + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Linear message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Linear; + + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Linear; + + /** + * Verifies a Linear message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Linear + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @param message Linear + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Linear to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Exponential. */ + interface IExponential { + + /** Exponential numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Exponential growthFactor */ + growthFactor?: (number|null); + + /** Exponential scale */ + scale?: (number|null); + } + + /** Represents an Exponential. */ + class Exponential implements IExponential { + + /** + * Constructs a new Exponential. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + + /** Exponential numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Exponential growthFactor. */ + public growthFactor: number; + + /** Exponential scale. */ + public scale: number; + + /** + * Creates a new Exponential instance using the specified properties. + * @param [properties] Properties to set + * @returns Exponential instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exponential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Exponential; + + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Exponential; + + /** + * Verifies an Exponential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exponential + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; + + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @param message Exponential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exponential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Explicit. */ + interface IExplicit { + + /** Explicit bounds */ + bounds?: (number[]|null); + } + + /** Represents an Explicit. */ + class Explicit implements IExplicit { + + /** + * Constructs a new Explicit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + + /** Explicit bounds. */ + public bounds: number[]; + + /** + * Creates a new Explicit instance using the specified properties. + * @param [properties] Properties to set + * @returns Explicit instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; + + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Explicit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Explicit; + + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Explicit; + + /** + * Verifies an Explicit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Explicit + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; + + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @param message Explicit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Explicit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Exemplar. */ + interface IExemplar { + + /** Exemplar value */ + value?: (number|null); + + /** Exemplar timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** Exemplar attachments */ + attachments?: (google.protobuf.IAny[]|null); + } + + /** Represents an Exemplar. */ + class Exemplar implements IExemplar { + + /** + * Constructs a new Exemplar. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IExemplar); + + /** Exemplar value. */ + public value: number; + + /** Exemplar timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** Exemplar attachments. */ + public attachments: google.protobuf.IAny[]; + + /** + * Creates a new Exemplar instance using the specified properties. + * @param [properties] Properties to set + * @returns Exemplar instance + */ + public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Exemplar; + + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Exemplar; + + /** + * Verifies an Exemplar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exemplar + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; + + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @param message Exemplar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exemplar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a MetricDescriptor. */ + interface IMetricDescriptor { + + /** MetricDescriptor name */ + name?: (string|null); + + /** MetricDescriptor type */ + type?: (string|null); + + /** MetricDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MetricDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|null); + + /** MetricDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|null); + + /** MetricDescriptor unit */ + unit?: (string|null); + + /** MetricDescriptor description */ + description?: (string|null); + + /** MetricDescriptor displayName */ + displayName?: (string|null); + + /** MetricDescriptor metadata */ + metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|null); + } + + /** Represents a MetricDescriptor. */ + class MetricDescriptor implements IMetricDescriptor { + + /** + * Constructs a new MetricDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetricDescriptor); + + /** MetricDescriptor name. */ + public name: string; + + /** MetricDescriptor type. */ + public type: string; + + /** MetricDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MetricDescriptor metricKind. */ + public metricKind: google.api.MetricDescriptor.MetricKind; + + /** MetricDescriptor valueType. */ + public valueType: google.api.MetricDescriptor.ValueType; + + /** MetricDescriptor unit. */ + public unit: string; + + /** MetricDescriptor description. */ + public description: string; + + /** MetricDescriptor displayName. */ + public displayName: string; + + /** MetricDescriptor metadata. */ + public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage. */ + public launchStage: google.api.LaunchStage; + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptor instance + */ + public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; + + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; + + /** + * Verifies a MetricDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; + + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @param message MetricDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MetricDescriptor { + + /** Properties of a MetricDescriptorMetadata. */ + interface IMetricDescriptorMetadata { + + /** MetricDescriptorMetadata launchStage */ + launchStage?: (google.api.LaunchStage|null); + + /** MetricDescriptorMetadata samplePeriod */ + samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay */ + ingestDelay?: (google.protobuf.IDuration|null); + } + + /** Represents a MetricDescriptorMetadata. */ + class MetricDescriptorMetadata implements IMetricDescriptorMetadata { + + /** + * Constructs a new MetricDescriptorMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); + + /** MetricDescriptorMetadata launchStage. */ + public launchStage: google.api.LaunchStage; + + /** MetricDescriptorMetadata samplePeriod. */ + public samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay. */ + public ingestDelay?: (google.protobuf.IDuration|null); + + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptorMetadata instance + */ + public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Verifies a MetricDescriptorMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptorMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @param message MetricDescriptorMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric type */ + type?: (string|null); + + /** Metric labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetric); + + /** Metric type. */ + public type: string; + + /** Metric labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.api.IMetric): google.api.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.api.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js new file mode 100644 index 00000000000..fafdded03b3 --- /dev/null +++ b/handwritten/logging/protos/protos.js @@ -0,0 +1,25787 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("protobufjs/minimal")); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && message.hasOwnProperty("package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && message.hasOwnProperty("syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && message.hasOwnProperty("extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && message.hasOwnProperty("typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {string} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {string} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && message.hasOwnProperty("inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && message.hasOwnProperty("outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = false; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = false; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && message.hasOwnProperty("ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && message.hasOwnProperty("packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && message.hasOwnProperty("lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && message.hasOwnProperty("jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && message.hasOwnProperty("weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {string} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && message.hasOwnProperty("begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = 0; + + /** + * Value numberValue. + * @member {number} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = 0; + + /** + * Value stringValue. + * @member {string} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = ""; + + /** + * Value boolValue. + * @member {boolean} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = false; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && message.hasOwnProperty("nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && message.hasOwnProperty("structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && message.hasOwnProperty("listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nullValue = reader.int32(); + break; + case 2: + message.numberValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {string} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListValue; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + return protobuf; + })(); + + google.logging = (function() { + + /** + * Namespace logging. + * @memberof google + * @namespace + */ + var logging = {}; + + logging.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.logging + * @namespace + */ + var v2 = {}; + + v2.ConfigServiceV2 = (function() { + + /** + * Constructs a new ConfigServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a ConfigServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; + + /** + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.ConfigServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListSinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse + */ + + /** + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { + return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); + }, "name", { value: "ListSinks" }); + + /** + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ + + /** + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { + return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "GetSink" }); + + /** + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ + + /** + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { + return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "CreateSink" }); + + /** + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ + + /** + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { + return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "UpdateSink" }); + + /** + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { + return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSink" }); + + /** + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListExclusionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse + */ + + /** + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { + return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); + }, "name", { value: "ListExclusions" }); + + /** + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ + + /** + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { + return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "GetExclusion" }); + + /** + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ + + /** + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { + return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "CreateExclusion" }); + + /** + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ + + /** + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { + return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "UpdateExclusion" }); + + /** + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { + return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExclusion" }); + + /** + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ConfigServiceV2; + })(); + + v2.LogSink = (function() { + + /** + * Properties of a LogSink. + * @memberof google.logging.v2 + * @interface ILogSink + * @property {string|null} [name] LogSink name + * @property {string|null} [destination] LogSink destination + * @property {string|null} [filter] LogSink filter + * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat + * @property {string|null} [writerIdentity] LogSink writerIdentity + * @property {boolean|null} [includeChildren] LogSink includeChildren + * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + * @property {google.protobuf.ITimestamp|null} [startTime] LogSink startTime + * @property {google.protobuf.ITimestamp|null} [endTime] LogSink endTime + */ + + /** + * Constructs a new LogSink. + * @memberof google.logging.v2 + * @classdesc Represents a LogSink. + * @implements ILogSink + * @constructor + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + */ + function LogSink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogSink name. + * @member {string} name + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.name = ""; + + /** + * LogSink destination. + * @member {string} destination + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.destination = ""; + + /** + * LogSink filter. + * @member {string} filter + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.filter = ""; + + /** + * LogSink outputVersionFormat. + * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.outputVersionFormat = 0; + + /** + * LogSink writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.writerIdentity = ""; + + /** + * LogSink includeChildren. + * @member {boolean} includeChildren + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.includeChildren = false; + + /** + * LogSink bigqueryOptions. + * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.bigqueryOptions = null; + + /** + * LogSink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.createTime = null; + + /** + * LogSink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.updateTime = null; + + /** + * LogSink startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.startTime = null; + + /** + * LogSink endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LogSink options. + * @member {"bigqueryOptions"|undefined} options + * @memberof google.logging.v2.LogSink + * @instance + */ + Object.defineProperty(LogSink.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogSink instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @returns {google.logging.v2.LogSink} LogSink instance + */ + LogSink.create = function create(properties) { + return new LogSink(properties); + }; + + /** + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destination != null && message.hasOwnProperty("destination")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) + $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogSink message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogSink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogSink} LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.destination = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 6: + message.outputVersionFormat = reader.int32(); + break; + case 8: + message.writerIdentity = reader.string(); + break; + case 9: + message.includeChildren = reader.bool(); + break; + case 12: + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); + break; + case 13: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogSink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogSink} LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogSink message. + * @function verify + * @memberof google.logging.v2.LogSink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogSink.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + switch (message.outputVersionFormat) { + default: + return "outputVersionFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + if (typeof message.includeChildren !== "boolean") + return "includeChildren: boolean expected"; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + properties.options = 1; + { + var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); + if (error) + return "bigqueryOptions." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogSink + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogSink} LogSink + */ + LogSink.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogSink) + return object; + var message = new $root.google.logging.v2.LogSink(); + if (object.name != null) + message.name = String(object.name); + if (object.destination != null) + message.destination = String(object.destination); + if (object.filter != null) + message.filter = String(object.filter); + switch (object.outputVersionFormat) { + case "VERSION_FORMAT_UNSPECIFIED": + case 0: + message.outputVersionFormat = 0; + break; + case "V2": + case 1: + message.outputVersionFormat = 1; + break; + case "V1": + case 2: + message.outputVersionFormat = 2; + break; + } + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); + if (object.includeChildren != null) + message.includeChildren = Boolean(object.includeChildren); + if (object.bigqueryOptions != null) { + if (typeof object.bigqueryOptions !== "object") + throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.logging.v2.LogSink.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.logging.v2.LogSink.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.LogSink} message LogSink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogSink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.destination = ""; + object.filter = ""; + object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; + object.writerIdentity = ""; + object.includeChildren = false; + object.startTime = null; + object.endTime = null; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + object.includeChildren = message.includeChildren; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); + if (options.oneofs) + object.options = "bigqueryOptions"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this LogSink to JSON. + * @function toJSON + * @memberof google.logging.v2.LogSink + * @instance + * @returns {Object.} JSON object + */ + LogSink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * VersionFormat enum. + * @name google.logging.v2.LogSink.VersionFormat + * @enum {string} + * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value + * @property {number} V2=1 V2 value + * @property {number} V1=2 V1 value + */ + LogSink.VersionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "V2"] = 1; + values[valuesById[2] = "V1"] = 2; + return values; + })(); + + return LogSink; + })(); + + v2.BigQueryOptions = (function() { + + /** + * Properties of a BigQueryOptions. + * @memberof google.logging.v2 + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + */ + + /** + * Constructs a new BigQueryOptions. + * @memberof google.logging.v2 + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions + * @constructor + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + */ + function BigQueryOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usePartitionedTables = false; + + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @function create + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + */ + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); + }; + + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + return writer; + }; + + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.usePartitionedTables = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryOptions message. + * @function verify + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; + return null; + }; + + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + */ + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) + return object; + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + return message; + }; + + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.usePartitionedTables = false; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + return object; + }; + + /** + * Converts this BigQueryOptions to JSON. + * @function toJSON + * @memberof google.logging.v2.BigQueryOptions + * @instance + * @returns {Object.} JSON object + */ + BigQueryOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BigQueryOptions; + })(); + + v2.ListSinksRequest = (function() { + + /** + * Properties of a ListSinksRequest. + * @memberof google.logging.v2 + * @interface IListSinksRequest + * @property {string|null} [parent] ListSinksRequest parent + * @property {string|null} [pageToken] ListSinksRequest pageToken + * @property {number|null} [pageSize] ListSinksRequest pageSize + */ + + /** + * Constructs a new ListSinksRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListSinksRequest. + * @implements IListSinksRequest + * @constructor + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + */ + function ListSinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSinksRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.parent = ""; + + /** + * ListSinksRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageToken = ""; + + /** + * ListSinksRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageSize = 0; + + /** + * Creates a new ListSinksRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance + */ + ListSinksRequest.create = function create(properties) { + return new ListSinksRequest(properties); + }; + + /** + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSinksRequest message. + * @function verify + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + */ + ListSinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksRequest) + return object; + var message = new $root.google.logging.v2.ListSinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListSinksRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListSinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListSinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListSinksRequest; + })(); + + v2.ListSinksResponse = (function() { + + /** + * Properties of a ListSinksResponse. + * @memberof google.logging.v2 + * @interface IListSinksResponse + * @property {Array.|null} [sinks] ListSinksResponse sinks + * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + */ + + /** + * Constructs a new ListSinksResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListSinksResponse. + * @implements IListSinksResponse + * @constructor + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + */ + function ListSinksResponse(properties) { + this.sinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSinksResponse sinks. + * @member {Array.} sinks + * @memberof google.logging.v2.ListSinksResponse + * @instance + */ + ListSinksResponse.prototype.sinks = $util.emptyArray; + + /** + * ListSinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListSinksResponse + * @instance + */ + ListSinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSinksResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + */ + ListSinksResponse.create = function create(properties) { + return new ListSinksResponse(properties); + }; + + /** + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinks != null && message.sinks.length) + for (var i = 0; i < message.sinks.length; ++i) + $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sinks && message.sinks.length)) + message.sinks = []; + message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSinksResponse message. + * @function verify + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinks != null && message.hasOwnProperty("sinks")) { + if (!Array.isArray(message.sinks)) + return "sinks: array expected"; + for (var i = 0; i < message.sinks.length; ++i) { + var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); + if (error) + return "sinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + */ + ListSinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksResponse) + return object; + var message = new $root.google.logging.v2.ListSinksResponse(); + if (object.sinks) { + if (!Array.isArray(object.sinks)) + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); + message.sinks = []; + for (var i = 0; i < object.sinks.length; ++i) { + if (typeof object.sinks[i] !== "object") + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); + message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sinks && message.sinks.length) { + object.sinks = []; + for (var j = 0; j < message.sinks.length; ++j) + object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSinksResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListSinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListSinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListSinksResponse; + })(); + + v2.GetSinkRequest = (function() { + + /** + * Properties of a GetSinkRequest. + * @memberof google.logging.v2 + * @interface IGetSinkRequest + * @property {string|null} [sinkName] GetSinkRequest sinkName + */ + + /** + * Constructs a new GetSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetSinkRequest. + * @implements IGetSinkRequest + * @constructor + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + */ + function GetSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.GetSinkRequest + * @instance + */ + GetSinkRequest.prototype.sinkName = ""; + + /** + * Creates a new GetSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance + */ + GetSinkRequest.create = function create(properties) { + return new GetSinkRequest(properties); + }; + + /** + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + return writer; + }; + + /** + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSinkRequest message. + * @function verify + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + return null; + }; + + /** + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + */ + GetSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSinkRequest) + return object; + var message = new $root.google.logging.v2.GetSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + return message; + }; + + /** + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + return object; + }; + + /** + * Converts this GetSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetSinkRequest + * @instance + * @returns {Object.} JSON object + */ + GetSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetSinkRequest; + })(); + + v2.CreateSinkRequest = (function() { + + /** + * Properties of a CreateSinkRequest. + * @memberof google.logging.v2 + * @interface ICreateSinkRequest + * @property {string|null} [parent] CreateSinkRequest parent + * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity + */ + + /** + * Constructs a new CreateSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateSinkRequest. + * @implements ICreateSinkRequest + * @constructor + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + */ + function CreateSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSinkRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.parent = ""; + + /** + * CreateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.sink = null; + + /** + * CreateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance + */ + CreateSinkRequest.create = function create(properties) { + return new CreateSinkRequest(properties); + }; + + /** + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + return writer; + }; + + /** + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSinkRequest message. + * @function verify + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; + } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + return null; + }; + + /** + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + */ + CreateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateSinkRequest) + return object; + var message = new $root.google.logging.v2.CreateSinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + return message; + }; + + /** + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + return object; + }; + + /** + * Converts this CreateSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateSinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateSinkRequest; + })(); + + v2.UpdateSinkRequest = (function() { + + /** + * Properties of an UpdateSinkRequest. + * @memberof google.logging.v2 + * @interface IUpdateSinkRequest + * @property {string|null} [sinkName] UpdateSinkRequest sinkName + * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask + */ + + /** + * Constructs a new UpdateSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateSinkRequest. + * @implements IUpdateSinkRequest + * @constructor + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + */ + function UpdateSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.sinkName = ""; + + /** + * UpdateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.sink = null; + + /** + * UpdateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * UpdateSinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance + */ + UpdateSinkRequest.create = function create(properties) { + return new UpdateSinkRequest(properties); + }; + + /** + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + case 2: + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSinkRequest message. + * @function verify + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; + } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + */ + UpdateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSinkRequest) + return object; + var message = new $root.google.logging.v2.UpdateSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sinkName = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + object.updateMask = null; + } + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateSinkRequest; + })(); + + v2.DeleteSinkRequest = (function() { + + /** + * Properties of a DeleteSinkRequest. + * @memberof google.logging.v2 + * @interface IDeleteSinkRequest + * @property {string|null} [sinkName] DeleteSinkRequest sinkName + */ + + /** + * Constructs a new DeleteSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteSinkRequest. + * @implements IDeleteSinkRequest + * @constructor + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + */ + function DeleteSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.DeleteSinkRequest + * @instance + */ + DeleteSinkRequest.prototype.sinkName = ""; + + /** + * Creates a new DeleteSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance + */ + DeleteSinkRequest.create = function create(properties) { + return new DeleteSinkRequest(properties); + }; + + /** + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + return writer; + }; + + /** + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSinkRequest message. + * @function verify + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + return null; + }; + + /** + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + */ + DeleteSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteSinkRequest) + return object; + var message = new $root.google.logging.v2.DeleteSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + return message; + }; + + /** + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + return object; + }; + + /** + * Converts this DeleteSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteSinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteSinkRequest; + })(); + + v2.LogExclusion = (function() { + + /** + * Properties of a LogExclusion. + * @memberof google.logging.v2 + * @interface ILogExclusion + * @property {string|null} [name] LogExclusion name + * @property {string|null} [description] LogExclusion description + * @property {string|null} [filter] LogExclusion filter + * @property {boolean|null} [disabled] LogExclusion disabled + * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime + */ + + /** + * Constructs a new LogExclusion. + * @memberof google.logging.v2 + * @classdesc Represents a LogExclusion. + * @implements ILogExclusion + * @constructor + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + */ + function LogExclusion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogExclusion name. + * @member {string} name + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.name = ""; + + /** + * LogExclusion description. + * @member {string} description + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.description = ""; + + /** + * LogExclusion filter. + * @member {string} filter + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.filter = ""; + + /** + * LogExclusion disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.disabled = false; + + /** + * LogExclusion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.createTime = null; + + /** + * LogExclusion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.updateTime = null; + + /** + * Creates a new LogExclusion instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogExclusion + * @static + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @returns {google.logging.v2.LogExclusion} LogExclusion instance + */ + LogExclusion.create = function create(properties) { + return new LogExclusion(properties); + }; + + /** + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogExclusion + * @static + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogExclusion + * @static + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogExclusion} LogExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogExclusion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.disabled = reader.bool(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogExclusion} LogExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogExclusion message. + * @function verify + * @memberof google.logging.v2.LogExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogExclusion} LogExclusion + */ + LogExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogExclusion) + return object; + var message = new $root.google.logging.v2.LogExclusion(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogExclusion + * @static + * @param {google.logging.v2.LogExclusion} message LogExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.filter = ""; + object.disabled = false; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this LogExclusion to JSON. + * @function toJSON + * @memberof google.logging.v2.LogExclusion + * @instance + * @returns {Object.} JSON object + */ + LogExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogExclusion; + })(); + + v2.ListExclusionsRequest = (function() { + + /** + * Properties of a ListExclusionsRequest. + * @memberof google.logging.v2 + * @interface IListExclusionsRequest + * @property {string|null} [parent] ListExclusionsRequest parent + * @property {string|null} [pageToken] ListExclusionsRequest pageToken + * @property {number|null} [pageSize] ListExclusionsRequest pageSize + */ + + /** + * Constructs a new ListExclusionsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListExclusionsRequest. + * @implements IListExclusionsRequest + * @constructor + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + */ + function ListExclusionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListExclusionsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.parent = ""; + + /** + * ListExclusionsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.pageToken = ""; + + /** + * ListExclusionsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListExclusionsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance + */ + ListExclusionsRequest.create = function create(properties) { + return new ListExclusionsRequest(properties); + }; + + /** + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListExclusionsRequest message. + * @function verify + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExclusionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + */ + ListExclusionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsRequest) + return object; + var message = new $root.google.logging.v2.ListExclusionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExclusionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListExclusionsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListExclusionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListExclusionsRequest; + })(); + + v2.ListExclusionsResponse = (function() { + + /** + * Properties of a ListExclusionsResponse. + * @memberof google.logging.v2 + * @interface IListExclusionsResponse + * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions + * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken + */ + + /** + * Constructs a new ListExclusionsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListExclusionsResponse. + * @implements IListExclusionsResponse + * @constructor + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + */ + function ListExclusionsResponse(properties) { + this.exclusions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListExclusionsResponse exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + */ + ListExclusionsResponse.prototype.exclusions = $util.emptyArray; + + /** + * ListExclusionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + */ + ListExclusionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListExclusionsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance + */ + ListExclusionsResponse.create = function create(properties) { + return new ListExclusionsResponse(properties); + }; + + /** + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListExclusionsResponse message. + * @function verify + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExclusionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + if (error) + return "exclusions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + */ + ListExclusionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsResponse) + return object; + var message = new $root.google.logging.v2.ListExclusionsResponse(); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExclusionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exclusions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListExclusionsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListExclusionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListExclusionsResponse; + })(); + + v2.GetExclusionRequest = (function() { + + /** + * Properties of a GetExclusionRequest. + * @memberof google.logging.v2 + * @interface IGetExclusionRequest + * @property {string|null} [name] GetExclusionRequest name + */ + + /** + * Constructs a new GetExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetExclusionRequest. + * @implements IGetExclusionRequest + * @constructor + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + */ + function GetExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.GetExclusionRequest + * @instance + */ + GetExclusionRequest.prototype.name = ""; + + /** + * Creates a new GetExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance + */ + GetExclusionRequest.create = function create(properties) { + return new GetExclusionRequest(properties); + }; + + /** + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetExclusionRequest message. + * @function verify + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + */ + GetExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetExclusionRequest) + return object; + var message = new $root.google.logging.v2.GetExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + GetExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetExclusionRequest; + })(); + + v2.CreateExclusionRequest = (function() { + + /** + * Properties of a CreateExclusionRequest. + * @memberof google.logging.v2 + * @interface ICreateExclusionRequest + * @property {string|null} [parent] CreateExclusionRequest parent + * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion + */ + + /** + * Constructs a new CreateExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateExclusionRequest. + * @implements ICreateExclusionRequest + * @constructor + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + */ + function CreateExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateExclusionRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + */ + CreateExclusionRequest.prototype.parent = ""; + + /** + * CreateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + */ + CreateExclusionRequest.prototype.exclusion = null; + + /** + * Creates a new CreateExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance + */ + CreateExclusionRequest.create = function create(properties) { + return new CreateExclusionRequest(properties); + }; + + /** + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + */ + CreateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateExclusionRequest) + return object; + var message = new $root.google.logging.v2.CreateExclusionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.exclusion = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this CreateExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateExclusionRequest; + })(); + + v2.UpdateExclusionRequest = (function() { + + /** + * Properties of an UpdateExclusionRequest. + * @memberof google.logging.v2 + * @interface IUpdateExclusionRequest + * @property {string|null} [name] UpdateExclusionRequest name + * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask + */ + + /** + * Constructs a new UpdateExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateExclusionRequest. + * @implements IUpdateExclusionRequest + * @constructor + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + */ + function UpdateExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.name = ""; + + /** + * UpdateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.exclusion = null; + + /** + * UpdateExclusionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance + */ + UpdateExclusionRequest.create = function create(properties) { + return new UpdateExclusionRequest(properties); + }; + + /** + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + */ + UpdateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) + return object; + var message = new $root.google.logging.v2.UpdateExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.exclusion = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateExclusionRequest; + })(); + + v2.DeleteExclusionRequest = (function() { + + /** + * Properties of a DeleteExclusionRequest. + * @memberof google.logging.v2 + * @interface IDeleteExclusionRequest + * @property {string|null} [name] DeleteExclusionRequest name + */ + + /** + * Constructs a new DeleteExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteExclusionRequest. + * @implements IDeleteExclusionRequest + * @constructor + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + */ + function DeleteExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteExclusionRequest + * @instance + */ + DeleteExclusionRequest.prototype.name = ""; + + /** + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + */ + DeleteExclusionRequest.create = function create(properties) { + return new DeleteExclusionRequest(properties); + }; + + /** + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteExclusionRequest message. + * @function verify + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + */ + DeleteExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + return object; + var message = new $root.google.logging.v2.DeleteExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteExclusionRequest; + })(); + + v2.LoggingServiceV2 = (function() { + + /** + * Constructs a new LoggingServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a LoggingServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; + + /** + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.LoggingServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef DeleteLogCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { + return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLog" }); + + /** + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef WriteLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + */ + + /** + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { + return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); + }, "name", { value: "WriteLogEntries" }); + + /** + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + */ + + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { + return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); + }, "name", { value: "ListLogEntries" }); + + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListMonitoredResourceDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + */ + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse + */ + + /** + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { + return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); + }, "name", { value: "ListLogs" }); + + /** + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return LoggingServiceV2; + })(); + + v2.DeleteLogRequest = (function() { + + /** + * Properties of a DeleteLogRequest. + * @memberof google.logging.v2 + * @interface IDeleteLogRequest + * @property {string|null} [logName] DeleteLogRequest logName + */ + + /** + * Constructs a new DeleteLogRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteLogRequest. + * @implements IDeleteLogRequest + * @constructor + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + */ + function DeleteLogRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteLogRequest logName. + * @member {string} logName + * @memberof google.logging.v2.DeleteLogRequest + * @instance + */ + DeleteLogRequest.prototype.logName = ""; + + /** + * Creates a new DeleteLogRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance + */ + DeleteLogRequest.create = function create(properties) { + return new DeleteLogRequest(properties); + }; + + /** + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + return writer; + }; + + /** + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.logName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLogRequest message. + * @function verify + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + return null; + }; + + /** + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + */ + DeleteLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogRequest) + return object; + var message = new $root.google.logging.v2.DeleteLogRequest(); + if (object.logName != null) + message.logName = String(object.logName); + return message; + }; + + /** + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLogRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.logName = ""; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + return object; + }; + + /** + * Converts this DeleteLogRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteLogRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLogRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteLogRequest; + })(); + + v2.WriteLogEntriesRequest = (function() { + + /** + * Properties of a WriteLogEntriesRequest. + * @memberof google.logging.v2 + * @interface IWriteLogEntriesRequest + * @property {string|null} [logName] WriteLogEntriesRequest logName + * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource + * @property {Object.|null} [labels] WriteLogEntriesRequest labels + * @property {Array.|null} [entries] WriteLogEntriesRequest entries + * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess + * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun + */ + + /** + * Constructs a new WriteLogEntriesRequest. + * @memberof google.logging.v2 + * @classdesc Represents a WriteLogEntriesRequest. + * @implements IWriteLogEntriesRequest + * @constructor + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + */ + function WriteLogEntriesRequest(properties) { + this.labels = {}; + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WriteLogEntriesRequest logName. + * @member {string} logName + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.logName = ""; + + /** + * WriteLogEntriesRequest resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.resource = null; + + /** + * WriteLogEntriesRequest labels. + * @member {Object.} labels + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.labels = $util.emptyObject; + + /** + * WriteLogEntriesRequest entries. + * @member {Array.} entries + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.entries = $util.emptyArray; + + /** + * WriteLogEntriesRequest partialSuccess. + * @member {boolean} partialSuccess + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.partialSuccess = false; + + /** + * WriteLogEntriesRequest dryRun. + * @member {boolean} dryRun + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.dryRun = false; + + /** + * Creates a new WriteLogEntriesRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance + */ + WriteLogEntriesRequest.create = function create(properties) { + return new WriteLogEntriesRequest(properties); + }; + + /** + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + return writer; + }; + + /** + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.logName = reader.string(); + break; + case 2: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 3: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 5: + message.partialSuccess = reader.bool(); + break; + case 6: + message.dryRun = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteLogEntriesRequest message. + * @function verify + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteLogEntriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + if (typeof message.partialSuccess !== "boolean") + return "partialSuccess: boolean expected"; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + return null; + }; + + /** + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + */ + WriteLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) + return object; + var message = new $root.google.logging.v2.WriteLogEntriesRequest(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.partialSuccess != null) + message.partialSuccess = Boolean(object.partialSuccess); + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + return message; + }; + + /** + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteLogEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.logName = ""; + object.resource = null; + object.partialSuccess = false; + object.dryRun = false; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = message.partialSuccess; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + return object; + }; + + /** + * Converts this WriteLogEntriesRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + WriteLogEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteLogEntriesRequest; + })(); + + v2.WriteLogEntriesResponse = (function() { + + /** + * Properties of a WriteLogEntriesResponse. + * @memberof google.logging.v2 + * @interface IWriteLogEntriesResponse + */ + + /** + * Constructs a new WriteLogEntriesResponse. + * @memberof google.logging.v2 + * @classdesc Represents a WriteLogEntriesResponse. + * @implements IWriteLogEntriesResponse + * @constructor + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + */ + function WriteLogEntriesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new WriteLogEntriesResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance + */ + WriteLogEntriesResponse.create = function create(properties) { + return new WriteLogEntriesResponse(properties); + }; + + /** + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteLogEntriesResponse message. + * @function verify + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteLogEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + */ + WriteLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) + return object; + return new $root.google.logging.v2.WriteLogEntriesResponse(); + }; + + /** + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteLogEntriesResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this WriteLogEntriesResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.WriteLogEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + WriteLogEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteLogEntriesResponse; + })(); + + v2.WriteLogEntriesPartialErrors = (function() { + + /** + * Properties of a WriteLogEntriesPartialErrors. + * @memberof google.logging.v2 + * @interface IWriteLogEntriesPartialErrors + * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors + */ + + /** + * Constructs a new WriteLogEntriesPartialErrors. + * @memberof google.logging.v2 + * @classdesc Represents a WriteLogEntriesPartialErrors. + * @implements IWriteLogEntriesPartialErrors + * @constructor + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + */ + function WriteLogEntriesPartialErrors(properties) { + this.logEntryErrors = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WriteLogEntriesPartialErrors logEntryErrors. + * @member {Object.} logEntryErrors + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @instance + */ + WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; + + /** + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance + */ + WriteLogEntriesPartialErrors.create = function create(properties) { + return new WriteLogEntriesPartialErrors(properties); + }; + + /** + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesPartialErrors.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) + for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesPartialErrors.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + reader.skip().pos++; + if (message.logEntryErrors === $util.emptyObject) + message.logEntryErrors = {}; + key = reader.int32(); + reader.pos++; + message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteLogEntriesPartialErrors message. + * @function verify + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteLogEntriesPartialErrors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { + if (!$util.isObject(message.logEntryErrors)) + return "logEntryErrors: object expected"; + var key = Object.keys(message.logEntryErrors); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "logEntryErrors: integer key{k:int32} expected"; + { + var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); + if (error) + return "logEntryErrors." + error; + } + } + } + return null; + }; + + /** + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + */ + WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) + return object; + var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); + if (object.logEntryErrors) { + if (typeof object.logEntryErrors !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors = {}; + for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { + if (typeof object.logEntryErrors[keys[i]] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.logEntryErrors = {}; + var keys2; + if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { + object.logEntryErrors = {}; + for (var j = 0; j < keys2.length; ++j) + object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); + } + return object; + }; + + /** + * Converts this WriteLogEntriesPartialErrors to JSON. + * @function toJSON + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @instance + * @returns {Object.} JSON object + */ + WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteLogEntriesPartialErrors; + })(); + + v2.ListLogEntriesRequest = (function() { + + /** + * Properties of a ListLogEntriesRequest. + * @memberof google.logging.v2 + * @interface IListLogEntriesRequest + * @property {Array.|null} [projectIds] ListLogEntriesRequest projectIds + * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames + * @property {string|null} [filter] ListLogEntriesRequest filter + * @property {string|null} [orderBy] ListLogEntriesRequest orderBy + * @property {number|null} [pageSize] ListLogEntriesRequest pageSize + * @property {string|null} [pageToken] ListLogEntriesRequest pageToken + */ + + /** + * Constructs a new ListLogEntriesRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogEntriesRequest. + * @implements IListLogEntriesRequest + * @constructor + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + */ + function ListLogEntriesRequest(properties) { + this.projectIds = []; + this.resourceNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLogEntriesRequest projectIds. + * @member {Array.} projectIds + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.projectIds = $util.emptyArray; + + /** + * ListLogEntriesRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; + + /** + * ListLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.filter = ""; + + /** + * ListLogEntriesRequest orderBy. + * @member {string} orderBy + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.orderBy = ""; + + /** + * ListLogEntriesRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageSize = 0; + + /** + * ListLogEntriesRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance + */ + ListLogEntriesRequest.create = function create(properties) { + return new ListLogEntriesRequest(properties); + }; + + /** + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIds != null && message.projectIds.length) + for (var i = 0; i < message.projectIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); + return writer; + }; + + /** + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogEntriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.projectIds && message.projectIds.length)) + message.projectIds = []; + message.projectIds.push(reader.string()); + break; + case 8: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.orderBy = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + case 5: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogEntriesRequest message. + * @function verify + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogEntriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectIds != null && message.hasOwnProperty("projectIds")) { + if (!Array.isArray(message.projectIds)) + return "projectIds: array expected"; + for (var i = 0; i < message.projectIds.length; ++i) + if (!$util.isString(message.projectIds[i])) + return "projectIds: string[] expected"; + } + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + */ + ListLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) + return object; + var message = new $root.google.logging.v2.ListLogEntriesRequest(); + if (object.projectIds) { + if (!Array.isArray(object.projectIds)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.projectIds: array expected"); + message.projectIds = []; + for (var i = 0; i < object.projectIds.length; ++i) + message.projectIds[i] = String(object.projectIds[i]); + } + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.projectIds = []; + object.resourceNames = []; + } + if (options.defaults) { + object.filter = ""; + object.orderBy = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.projectIds && message.projectIds.length) { + object.projectIds = []; + for (var j = 0; j < message.projectIds.length; ++j) + object.projectIds[j] = message.projectIds[j]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } + return object; + }; + + /** + * Converts this ListLogEntriesRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListLogEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogEntriesRequest; + })(); + + v2.ListLogEntriesResponse = (function() { + + /** + * Properties of a ListLogEntriesResponse. + * @memberof google.logging.v2 + * @interface IListLogEntriesResponse + * @property {Array.|null} [entries] ListLogEntriesResponse entries + * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken + */ + + /** + * Constructs a new ListLogEntriesResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogEntriesResponse. + * @implements IListLogEntriesResponse + * @constructor + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + */ + function ListLogEntriesResponse(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLogEntriesResponse entries. + * @member {Array.} entries + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + */ + ListLogEntriesResponse.prototype.entries = $util.emptyArray; + + /** + * ListLogEntriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + */ + ListLogEntriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogEntriesResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance + */ + ListLogEntriesResponse.create = function create(properties) { + return new ListLogEntriesResponse(properties); + }; + + /** + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogEntriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogEntriesResponse message. + * @function verify + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + */ + ListLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) + return object; + var message = new $root.google.logging.v2.ListLogEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogEntriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListLogEntriesResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListLogEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogEntriesResponse; + })(); + + v2.ListMonitoredResourceDescriptorsRequest = (function() { + + /** + * Properties of a ListMonitoredResourceDescriptorsRequest. + * @memberof google.logging.v2 + * @interface IListMonitoredResourceDescriptorsRequest + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken + */ + + /** + * Constructs a new ListMonitoredResourceDescriptorsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest + * @constructor + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + */ + function ListMonitoredResourceDescriptorsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; + + /** + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance + */ + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); + }; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pageSize = reader.int32(); + break; + case 2: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMonitoredResourceDescriptorsRequest message. + * @function verify + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + */ + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) + return object; + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListMonitoredResourceDescriptorsRequest; + })(); + + v2.ListMonitoredResourceDescriptorsResponse = (function() { + + /** + * Properties of a ListMonitoredResourceDescriptorsResponse. + * @memberof google.logging.v2 + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken + */ + + /** + * Constructs a new ListMonitoredResourceDescriptorsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse + * @constructor + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + */ + function ListMonitoredResourceDescriptorsResponse(properties) { + this.resourceDescriptors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMonitoredResourceDescriptorsResponse resourceDescriptors. + * @member {Array.} resourceDescriptors + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @instance + */ + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; + + /** + * ListMonitoredResourceDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @instance + */ + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance + */ + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); + }; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceDescriptors != null && message.resourceDescriptors.length) + for (var i = 0; i < message.resourceDescriptors.length; ++i) + $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.resourceDescriptors && message.resourceDescriptors.length)) + message.resourceDescriptors = []; + message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMonitoredResourceDescriptorsResponse message. + * @function verify + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { + if (!Array.isArray(message.resourceDescriptors)) + return "resourceDescriptors: array expected"; + for (var i = 0; i < message.resourceDescriptors.length; ++i) { + var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); + if (error) + return "resourceDescriptors." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + */ + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) + return object; + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); + message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceDescriptors = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceDescriptors && message.resourceDescriptors.length) { + object.resourceDescriptors = []; + for (var j = 0; j < message.resourceDescriptors.length; ++j) + object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListMonitoredResourceDescriptorsResponse; + })(); + + v2.ListLogsRequest = (function() { + + /** + * Properties of a ListLogsRequest. + * @memberof google.logging.v2 + * @interface IListLogsRequest + * @property {string|null} [parent] ListLogsRequest parent + * @property {number|null} [pageSize] ListLogsRequest pageSize + * @property {string|null} [pageToken] ListLogsRequest pageToken + */ + + /** + * Constructs a new ListLogsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogsRequest. + * @implements IListLogsRequest + * @constructor + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + */ + function ListLogsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLogsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.parent = ""; + + /** + * ListLogsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.pageSize = 0; + + /** + * ListLogsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance + */ + ListLogsRequest.create = function create(properties) { + return new ListLogsRequest(properties); + }; + + /** + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLogsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogsRequest message. + * @function verify + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + */ + ListLogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsRequest) + return object; + var message = new $root.google.logging.v2.ListLogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListLogsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLogsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogsRequest; + })(); + + v2.ListLogsResponse = (function() { + + /** + * Properties of a ListLogsResponse. + * @memberof google.logging.v2 + * @interface IListLogsResponse + * @property {Array.|null} [logNames] ListLogsResponse logNames + * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken + */ + + /** + * Constructs a new ListLogsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogsResponse. + * @implements IListLogsResponse + * @constructor + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + */ + function ListLogsResponse(properties) { + this.logNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLogsResponse logNames. + * @member {Array.} logNames + * @memberof google.logging.v2.ListLogsResponse + * @instance + */ + ListLogsResponse.prototype.logNames = $util.emptyArray; + + /** + * ListLogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogsResponse + * @instance + */ + ListLogsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance + */ + ListLogsResponse.create = function create(properties) { + return new ListLogsResponse(properties); + }; + + /** + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.logNames != null && message.logNames.length) + for (var i = 0; i < message.logNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); + return writer; + }; + + /** + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLogsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + if (!(message.logNames && message.logNames.length)) + message.logNames = []; + message.logNames.push(reader.string()); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogsResponse message. + * @function verify + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logNames != null && message.hasOwnProperty("logNames")) { + if (!Array.isArray(message.logNames)) + return "logNames: array expected"; + for (var i = 0; i < message.logNames.length; ++i) + if (!$util.isString(message.logNames[i])) + return "logNames: string[] expected"; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + */ + ListLogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsResponse) + return object; + var message = new $root.google.logging.v2.ListLogsResponse(); + if (object.logNames) { + if (!Array.isArray(object.logNames)) + throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); + message.logNames = []; + for (var i = 0; i < object.logNames.length; ++i) + message.logNames[i] = String(object.logNames[i]); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.logNames = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.logNames && message.logNames.length) { + object.logNames = []; + for (var j = 0; j < message.logNames.length; ++j) + object.logNames[j] = message.logNames[j]; + } + return object; + }; + + /** + * Converts this ListLogsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLogsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogsResponse; + })(); + + v2.LogEntry = (function() { + + /** + * Properties of a LogEntry. + * @memberof google.logging.v2 + * @interface ILogEntry + * @property {string|null} [logName] LogEntry logName + * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource + * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload + * @property {string|null} [textPayload] LogEntry textPayload + * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload + * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp + * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp + * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity + * @property {string|null} [insertId] LogEntry insertId + * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest + * @property {Object.|null} [labels] LogEntry labels + * @property {google.api.IMonitoredResourceMetadata|null} [metadata] LogEntry metadata + * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation + * @property {string|null} [trace] LogEntry trace + * @property {string|null} [spanId] LogEntry spanId + * @property {boolean|null} [traceSampled] LogEntry traceSampled + * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation + */ + + /** + * Constructs a new LogEntry. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntry. + * @implements ILogEntry + * @constructor + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + */ + function LogEntry(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogEntry logName. + * @member {string} logName + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.logName = ""; + + /** + * LogEntry resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.resource = null; + + /** + * LogEntry protoPayload. + * @member {google.protobuf.IAny|null|undefined} protoPayload + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.protoPayload = null; + + /** + * LogEntry textPayload. + * @member {string} textPayload + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.textPayload = ""; + + /** + * LogEntry jsonPayload. + * @member {google.protobuf.IStruct|null|undefined} jsonPayload + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.jsonPayload = null; + + /** + * LogEntry timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.timestamp = null; + + /** + * LogEntry receiveTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.receiveTimestamp = null; + + /** + * LogEntry severity. + * @member {google.logging.type.LogSeverity} severity + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.severity = 0; + + /** + * LogEntry insertId. + * @member {string} insertId + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.insertId = ""; + + /** + * LogEntry httpRequest. + * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.httpRequest = null; + + /** + * LogEntry labels. + * @member {Object.} labels + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.labels = $util.emptyObject; + + /** + * LogEntry metadata. + * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.metadata = null; + + /** + * LogEntry operation. + * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.operation = null; + + /** + * LogEntry trace. + * @member {string} trace + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.trace = ""; + + /** + * LogEntry spanId. + * @member {string} spanId + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.spanId = ""; + + /** + * LogEntry traceSampled. + * @member {boolean} traceSampled + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.traceSampled = false; + + /** + * LogEntry sourceLocation. + * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.sourceLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LogEntry payload. + * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload + * @memberof google.logging.v2.LogEntry + * @instance + */ + Object.defineProperty(LogEntry.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogEntry instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + * @returns {google.logging.v2.LogEntry} LogEntry instance + */ + LogEntry.create = function create(properties) { + return new LogEntry(properties); + }; + + /** + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) + $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textPayload != null && message.hasOwnProperty("textPayload")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); + if (message.insertId != null && message.hasOwnProperty("insertId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) + $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.severity != null && message.hasOwnProperty("severity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); + if (message.operation != null && message.hasOwnProperty("operation")) + $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.trace != null && message.hasOwnProperty("trace")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.spanId != null && message.hasOwnProperty("spanId")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); + return writer; + }; + + /** + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntry message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 12: + message.logName = reader.string(); + break; + case 8: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 2: + message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.textPayload = reader.string(); + break; + case 6: + message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 9: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 24: + message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.severity = reader.int32(); + break; + case 4: + message.insertId = reader.string(); + break; + case 7: + message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); + break; + case 11: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 25: + message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); + break; + case 15: + message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); + break; + case 22: + message.trace = reader.string(); + break; + case 27: + message.spanId = reader.string(); + break; + case 30: + message.traceSampled = reader.bool(); + break; + case 23: + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogEntry message. + * @function verify + * @memberof google.logging.v2.LogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + properties.payload = 1; + { + var error = $root.google.protobuf.Any.verify(message.protoPayload); + if (error) + return "protoPayload." + error; + } + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + if (!$util.isString(message.textPayload)) + return "textPayload: string expected"; + } + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.protobuf.Struct.verify(message.jsonPayload); + if (error) + return "jsonPayload." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); + if (error) + return "receiveTimestamp." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 100: + case 200: + case 300: + case 400: + case 500: + case 600: + case 700: + case 800: + break; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + if (!$util.isString(message.insertId)) + return "insertId: string expected"; + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { + var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); + if (error) + return "httpRequest." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.operation != null && message.hasOwnProperty("operation")) { + var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); + if (error) + return "operation." + error; + } + if (message.trace != null && message.hasOwnProperty("trace")) + if (!$util.isString(message.trace)) + return "trace: string expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!$util.isString(message.spanId)) + return "spanId: string expected"; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + if (typeof message.traceSampled !== "boolean") + return "traceSampled: boolean expected"; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { + var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); + if (error) + return "sourceLocation." + error; + } + return null; + }; + + /** + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntry + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntry} LogEntry + */ + LogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntry) + return object; + var message = new $root.google.logging.v2.LogEntry(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.protoPayload != null) { + if (typeof object.protoPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); + message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); + } + if (object.textPayload != null) + message.textPayload = String(object.textPayload); + if (object.jsonPayload != null) { + if (typeof object.jsonPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); + message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.receiveTimestamp != null) { + if (typeof object.receiveTimestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); + message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); + } + switch (object.severity) { + case "DEFAULT": + case 0: + message.severity = 0; + break; + case "DEBUG": + case 100: + message.severity = 100; + break; + case "INFO": + case 200: + message.severity = 200; + break; + case "NOTICE": + case 300: + message.severity = 300; + break; + case "WARNING": + case 400: + message.severity = 400; + break; + case "ERROR": + case 500: + message.severity = 500; + break; + case "CRITICAL": + case 600: + message.severity = 600; + break; + case "ALERT": + case 700: + message.severity = 700; + break; + case "EMERGENCY": + case 800: + message.severity = 800; + break; + } + if (object.insertId != null) + message.insertId = String(object.insertId); + if (object.httpRequest != null) { + if (typeof object.httpRequest !== "object") + throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); + message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.logging.v2.LogEntry.metadata: object expected"); + message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); + } + if (object.operation != null) { + if (typeof object.operation !== "object") + throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); + message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); + } + if (object.trace != null) + message.trace = String(object.trace); + if (object.spanId != null) + message.spanId = String(object.spanId); + if (object.traceSampled != null) + message.traceSampled = Boolean(object.traceSampled); + if (object.sourceLocation != null) { + if (typeof object.sourceLocation !== "object") + throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); + } + return message; + }; + + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.LogEntry} message LogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.insertId = ""; + object.httpRequest = null; + object.resource = null; + object.timestamp = null; + object.severity = options.enums === String ? "DEFAULT" : 0; + object.logName = ""; + object.operation = null; + object.trace = ""; + object.sourceLocation = null; + object.receiveTimestamp = null; + object.metadata = null; + object.spanId = ""; + object.traceSampled = false; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); + if (options.oneofs) + object.payload = "protoPayload"; + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + object.textPayload = message.textPayload; + if (options.oneofs) + object.payload = "textPayload"; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + object.insertId = message.insertId; + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); + if (options.oneofs) + object.payload = "jsonPayload"; + } + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); + if (message.trace != null && message.hasOwnProperty("trace")) + object.trace = message.trace; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = message.spanId; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + object.traceSampled = message.traceSampled; + return object; + }; + + /** + * Converts this LogEntry to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntry + * @instance + * @returns {Object.} JSON object + */ + LogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogEntry; + })(); + + v2.LogEntryOperation = (function() { + + /** + * Properties of a LogEntryOperation. + * @memberof google.logging.v2 + * @interface ILogEntryOperation + * @property {string|null} [id] LogEntryOperation id + * @property {string|null} [producer] LogEntryOperation producer + * @property {boolean|null} [first] LogEntryOperation first + * @property {boolean|null} [last] LogEntryOperation last + */ + + /** + * Constructs a new LogEntryOperation. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntryOperation. + * @implements ILogEntryOperation + * @constructor + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + */ + function LogEntryOperation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogEntryOperation id. + * @member {string} id + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.id = ""; + + /** + * LogEntryOperation producer. + * @member {string} producer + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.producer = ""; + + /** + * LogEntryOperation first. + * @member {boolean} first + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.first = false; + + /** + * LogEntryOperation last. + * @member {boolean} last + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.last = false; + + /** + * Creates a new LogEntryOperation instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance + */ + LogEntryOperation.create = function create(properties) { + return new LogEntryOperation(properties); + }; + + /** + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntryOperation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.producer != null && message.hasOwnProperty("producer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); + if (message.first != null && message.hasOwnProperty("first")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); + if (message.last != null && message.hasOwnProperty("last")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); + return writer; + }; + + /** + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntryOperation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.producer = reader.string(); + break; + case 3: + message.first = reader.bool(); + break; + case 4: + message.last = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogEntryOperation message. + * @function verify + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntryOperation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.producer != null && message.hasOwnProperty("producer")) + if (!$util.isString(message.producer)) + return "producer: string expected"; + if (message.first != null && message.hasOwnProperty("first")) + if (typeof message.first !== "boolean") + return "first: boolean expected"; + if (message.last != null && message.hasOwnProperty("last")) + if (typeof message.last !== "boolean") + return "last: boolean expected"; + return null; + }; + + /** + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + */ + LogEntryOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntryOperation) + return object; + var message = new $root.google.logging.v2.LogEntryOperation(); + if (object.id != null) + message.id = String(object.id); + if (object.producer != null) + message.producer = String(object.producer); + if (object.first != null) + message.first = Boolean(object.first); + if (object.last != null) + message.last = Boolean(object.last); + return message; + }; + + /** + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntryOperation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.producer = ""; + object.first = false; + object.last = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.producer != null && message.hasOwnProperty("producer")) + object.producer = message.producer; + if (message.first != null && message.hasOwnProperty("first")) + object.first = message.first; + if (message.last != null && message.hasOwnProperty("last")) + object.last = message.last; + return object; + }; + + /** + * Converts this LogEntryOperation to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntryOperation + * @instance + * @returns {Object.} JSON object + */ + LogEntryOperation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogEntryOperation; + })(); + + v2.LogEntrySourceLocation = (function() { + + /** + * Properties of a LogEntrySourceLocation. + * @memberof google.logging.v2 + * @interface ILogEntrySourceLocation + * @property {string|null} [file] LogEntrySourceLocation file + * @property {number|Long|null} [line] LogEntrySourceLocation line + * @property {string|null} ["function"] LogEntrySourceLocation function + */ + + /** + * Constructs a new LogEntrySourceLocation. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntrySourceLocation. + * @implements ILogEntrySourceLocation + * @constructor + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + */ + function LogEntrySourceLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogEntrySourceLocation file. + * @member {string} file + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype.file = ""; + + /** + * LogEntrySourceLocation line. + * @member {number|Long} line + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LogEntrySourceLocation function. + * @member {string} function + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype["function"] = ""; + + /** + * Creates a new LogEntrySourceLocation instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance + */ + LogEntrySourceLocation.create = function create(properties) { + return new LogEntrySourceLocation(properties); + }; + + /** + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntrySourceLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.hasOwnProperty("file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.line != null && message.hasOwnProperty("line")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); + if (message["function"] != null && message.hasOwnProperty("function")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); + return writer; + }; + + /** + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntrySourceLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = reader.string(); + break; + case 2: + message.line = reader.int64(); + break; + case 3: + message["function"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogEntrySourceLocation message. + * @function verify + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntrySourceLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) + if (!$util.isString(message.file)) + return "file: string expected"; + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) + return "line: integer|Long expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + if (!$util.isString(message["function"])) + return "function: string expected"; + return null; + }; + + /** + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + */ + LogEntrySourceLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) + return object; + var message = new $root.google.logging.v2.LogEntrySourceLocation(); + if (object.file != null) + message.file = String(object.file); + if (object.line != null) + if ($util.Long) + (message.line = $util.Long.fromValue(object.line)).unsigned = false; + else if (typeof object.line === "string") + message.line = parseInt(object.line, 10); + else if (typeof object.line === "number") + message.line = object.line; + else if (typeof object.line === "object") + message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); + if (object["function"] != null) + message["function"] = String(object["function"]); + return message; + }; + + /** + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntrySourceLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.file = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.line = options.longs === String ? "0" : 0; + object["function"] = ""; + } + if (message.file != null && message.hasOwnProperty("file")) + object.file = message.file; + if (message.line != null && message.hasOwnProperty("line")) + if (typeof message.line === "number") + object.line = options.longs === String ? String(message.line) : message.line; + else + object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = message["function"]; + return object; + }; + + /** + * Converts this LogEntrySourceLocation to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + * @returns {Object.} JSON object + */ + LogEntrySourceLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogEntrySourceLocation; + })(); + + v2.MetricsServiceV2 = (function() { + + /** + * Constructs a new MetricsServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a MetricsServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MetricsServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetricsServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsServiceV2; + + /** + * Creates new MetricsServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.MetricsServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MetricsServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + MetricsServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef ListLogMetricsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogMetricsResponse} [response] ListLogMetricsResponse + */ + + /** + * Calls ListLogMetrics. + * @function listLogMetrics + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.ListLogMetricsCallback} callback Node-style callback called with the error, if any, and ListLogMetricsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.listLogMetrics = function listLogMetrics(request, callback) { + return this.rpcCall(listLogMetrics, $root.google.logging.v2.ListLogMetricsRequest, $root.google.logging.v2.ListLogMetricsResponse, request, callback); + }, "name", { value: "ListLogMetrics" }); + + /** + * Calls ListLogMetrics. + * @function listLogMetrics + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef GetLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ + + /** + * Calls GetLogMetric. + * @function getLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.GetLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.getLogMetric = function getLogMetric(request, callback) { + return this.rpcCall(getLogMetric, $root.google.logging.v2.GetLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "GetLogMetric" }); + + /** + * Calls GetLogMetric. + * @function getLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef CreateLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ + + /** + * Calls CreateLogMetric. + * @function createLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.CreateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.createLogMetric = function createLogMetric(request, callback) { + return this.rpcCall(createLogMetric, $root.google.logging.v2.CreateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "CreateLogMetric" }); + + /** + * Calls CreateLogMetric. + * @function createLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef UpdateLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ + + /** + * Calls UpdateLogMetric. + * @function updateLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.updateLogMetric = function updateLogMetric(request, callback) { + return this.rpcCall(updateLogMetric, $root.google.logging.v2.UpdateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "UpdateLogMetric" }); + + /** + * Calls UpdateLogMetric. + * @function updateLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef DeleteLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteLogMetric. + * @function deleteLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.deleteLogMetric = function deleteLogMetric(request, callback) { + return this.rpcCall(deleteLogMetric, $root.google.logging.v2.DeleteLogMetricRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLogMetric" }); + + /** + * Calls DeleteLogMetric. + * @function deleteLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetricsServiceV2; + })(); + + v2.LogMetric = (function() { + + /** + * Properties of a LogMetric. + * @memberof google.logging.v2 + * @interface ILogMetric + * @property {string|null} [name] LogMetric name + * @property {string|null} [description] LogMetric description + * @property {string|null} [filter] LogMetric filter + * @property {google.api.IMetricDescriptor|null} [metricDescriptor] LogMetric metricDescriptor + * @property {string|null} [valueExtractor] LogMetric valueExtractor + * @property {Object.|null} [labelExtractors] LogMetric labelExtractors + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] LogMetric bucketOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogMetric createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogMetric updateTime + * @property {google.logging.v2.LogMetric.ApiVersion|null} [version] LogMetric version + */ + + /** + * Constructs a new LogMetric. + * @memberof google.logging.v2 + * @classdesc Represents a LogMetric. + * @implements ILogMetric + * @constructor + * @param {google.logging.v2.ILogMetric=} [properties] Properties to set + */ + function LogMetric(properties) { + this.labelExtractors = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogMetric name. + * @member {string} name + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.name = ""; + + /** + * LogMetric description. + * @member {string} description + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.description = ""; + + /** + * LogMetric filter. + * @member {string} filter + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.filter = ""; + + /** + * LogMetric metricDescriptor. + * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.metricDescriptor = null; + + /** + * LogMetric valueExtractor. + * @member {string} valueExtractor + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.valueExtractor = ""; + + /** + * LogMetric labelExtractors. + * @member {Object.} labelExtractors + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.labelExtractors = $util.emptyObject; + + /** + * LogMetric bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.bucketOptions = null; + + /** + * LogMetric createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.createTime = null; + + /** + * LogMetric updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.updateTime = null; + + /** + * LogMetric version. + * @member {google.logging.v2.LogMetric.ApiVersion} version + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.version = 0; + + /** + * Creates a new LogMetric instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric=} [properties] Properties to set + * @returns {google.logging.v2.LogMetric} LogMetric instance + */ + LogMetric.create = function create(properties) { + return new LogMetric(properties); + }; + + /** + * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogMetric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueExtractor); + if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) + for (var keys = Object.keys(message.labelExtractors), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labelExtractors[keys[i]]).ldelim(); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogMetric message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogMetric} LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 5: + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + break; + case 6: + message.valueExtractor = reader.string(); + break; + case 7: + reader.skip().pos++; + if (message.labelExtractors === $util.emptyObject) + message.labelExtractors = {}; + key = reader.string(); + reader.pos++; + message.labelExtractors[key] = reader.string(); + break; + case 8: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 9: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.version = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogMetric} LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogMetric message. + * @function verify + * @memberof google.logging.v2.LogMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogMetric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); + if (error) + return "metricDescriptor." + error; + } + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + if (!$util.isString(message.valueExtractor)) + return "valueExtractor: string expected"; + if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) { + if (!$util.isObject(message.labelExtractors)) + return "labelExtractors: object expected"; + var key = Object.keys(message.labelExtractors); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labelExtractors[key[i]])) + return "labelExtractors: string{k:string} expected"; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.version != null && message.hasOwnProperty("version")) + switch (message.version) { + default: + return "version: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogMetric + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogMetric} LogMetric + */ + LogMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogMetric) + return object; + var message = new $root.google.logging.v2.LogMetric(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.metricDescriptor != null) { + if (typeof object.metricDescriptor !== "object") + throw TypeError(".google.logging.v2.LogMetric.metricDescriptor: object expected"); + message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); + } + if (object.valueExtractor != null) + message.valueExtractor = String(object.valueExtractor); + if (object.labelExtractors) { + if (typeof object.labelExtractors !== "object") + throw TypeError(".google.logging.v2.LogMetric.labelExtractors: object expected"); + message.labelExtractors = {}; + for (var keys = Object.keys(object.labelExtractors), i = 0; i < keys.length; ++i) + message.labelExtractors[keys[i]] = String(object.labelExtractors[keys[i]]); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.logging.v2.LogMetric.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogMetric.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogMetric.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.version) { + case "V2": + case 0: + message.version = 0; + break; + case "V1": + case 1: + message.version = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.LogMetric} message LogMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labelExtractors = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.filter = ""; + object.version = options.enums === String ? "V2" : 0; + object.metricDescriptor = null; + object.valueExtractor = ""; + object.bucketOptions = null; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.version != null && message.hasOwnProperty("version")) + object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + object.valueExtractor = message.valueExtractor; + var keys2; + if (message.labelExtractors && (keys2 = Object.keys(message.labelExtractors)).length) { + object.labelExtractors = {}; + for (var j = 0; j < keys2.length; ++j) + object.labelExtractors[keys2[j]] = message.labelExtractors[keys2[j]]; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this LogMetric to JSON. + * @function toJSON + * @memberof google.logging.v2.LogMetric + * @instance + * @returns {Object.} JSON object + */ + LogMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ApiVersion enum. + * @name google.logging.v2.LogMetric.ApiVersion + * @enum {string} + * @property {number} V2=0 V2 value + * @property {number} V1=1 V1 value + */ + LogMetric.ApiVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "V2"] = 0; + values[valuesById[1] = "V1"] = 1; + return values; + })(); + + return LogMetric; + })(); + + v2.ListLogMetricsRequest = (function() { + + /** + * Properties of a ListLogMetricsRequest. + * @memberof google.logging.v2 + * @interface IListLogMetricsRequest + * @property {string|null} [parent] ListLogMetricsRequest parent + * @property {string|null} [pageToken] ListLogMetricsRequest pageToken + * @property {number|null} [pageSize] ListLogMetricsRequest pageSize + */ + + /** + * Constructs a new ListLogMetricsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogMetricsRequest. + * @implements IListLogMetricsRequest + * @constructor + * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + */ + function ListLogMetricsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLogMetricsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.parent = ""; + + /** + * ListLogMetricsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.pageToken = ""; + + /** + * ListLogMetricsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListLogMetricsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest instance + */ + ListLogMetricsRequest.create = function create(properties) { + return new ListLogMetricsRequest(properties); + }; + + /** + * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogMetricsRequest message. + * @function verify + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogMetricsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + */ + ListLogMetricsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogMetricsRequest) + return object; + var message = new $root.google.logging.v2.ListLogMetricsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.ListLogMetricsRequest} message ListLogMetricsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogMetricsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListLogMetricsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLogMetricsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogMetricsRequest; + })(); + + v2.ListLogMetricsResponse = (function() { + + /** + * Properties of a ListLogMetricsResponse. + * @memberof google.logging.v2 + * @interface IListLogMetricsResponse + * @property {Array.|null} [metrics] ListLogMetricsResponse metrics + * @property {string|null} [nextPageToken] ListLogMetricsResponse nextPageToken + */ + + /** + * Constructs a new ListLogMetricsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogMetricsResponse. + * @implements IListLogMetricsResponse + * @constructor + * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + */ + function ListLogMetricsResponse(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLogMetricsResponse metrics. + * @member {Array.} metrics + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + */ + ListLogMetricsResponse.prototype.metrics = $util.emptyArray; + + /** + * ListLogMetricsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + */ + ListLogMetricsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogMetricsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse instance + */ + ListLogMetricsResponse.create = function create(properties) { + return new ListLogMetricsResponse(properties); + }; + + /** + * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.logging.v2.LogMetric.encode(message.metrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogMetricsResponse message. + * @function verify + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogMetricsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.logging.v2.LogMetric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + */ + ListLogMetricsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogMetricsResponse) + return object; + var message = new $root.google.logging.v2.ListLogMetricsResponse(); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: object expected"); + message.metrics[i] = $root.google.logging.v2.LogMetric.fromObject(object.metrics[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.ListLogMetricsResponse} message ListLogMetricsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogMetricsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.logging.v2.LogMetric.toObject(message.metrics[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListLogMetricsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLogMetricsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogMetricsResponse; + })(); + + v2.GetLogMetricRequest = (function() { + + /** + * Properties of a GetLogMetricRequest. + * @memberof google.logging.v2 + * @interface IGetLogMetricRequest + * @property {string|null} [metricName] GetLogMetricRequest metricName + */ + + /** + * Constructs a new GetLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetLogMetricRequest. + * @implements IGetLogMetricRequest + * @constructor + * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + */ + function GetLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.GetLogMetricRequest + * @instance + */ + GetLogMetricRequest.prototype.metricName = ""; + + /** + * Creates a new GetLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest instance + */ + GetLogMetricRequest.create = function create(properties) { + return new GetLogMetricRequest(properties); + }; + + /** + * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && message.hasOwnProperty("metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metricName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + */ + GetLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetLogMetricRequest) + return object; + var message = new $root.google.logging.v2.GetLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.GetLogMetricRequest} message GetLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this GetLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + GetLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetLogMetricRequest; + })(); + + v2.CreateLogMetricRequest = (function() { + + /** + * Properties of a CreateLogMetricRequest. + * @memberof google.logging.v2 + * @interface ICreateLogMetricRequest + * @property {string|null} [parent] CreateLogMetricRequest parent + * @property {google.logging.v2.ILogMetric|null} [metric] CreateLogMetricRequest metric + */ + + /** + * Constructs a new CreateLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateLogMetricRequest. + * @implements ICreateLogMetricRequest + * @constructor + * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + */ + function CreateLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateLogMetricRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + */ + CreateLogMetricRequest.prototype.parent = ""; + + /** + * CreateLogMetricRequest metric. + * @member {google.logging.v2.ILogMetric|null|undefined} metric + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + */ + CreateLogMetricRequest.prototype.metric = null; + + /** + * Creates a new CreateLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest instance + */ + CreateLogMetricRequest.create = function create(properties) { + return new CreateLogMetricRequest(properties); + }; + + /** + * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.metric != null && message.hasOwnProperty("metric")) + $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.logging.v2.LogMetric.verify(message.metric); + if (error) + return "metric." + error; + } + return null; + }; + + /** + * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + */ + CreateLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateLogMetricRequest) + return object; + var message = new $root.google.logging.v2.CreateLogMetricRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.logging.v2.CreateLogMetricRequest.metric: object expected"); + message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); + } + return message; + }; + + /** + * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.CreateLogMetricRequest} message CreateLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.metric = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); + return object; + }; + + /** + * Converts this CreateLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateLogMetricRequest; + })(); + + v2.UpdateLogMetricRequest = (function() { + + /** + * Properties of an UpdateLogMetricRequest. + * @memberof google.logging.v2 + * @interface IUpdateLogMetricRequest + * @property {string|null} [metricName] UpdateLogMetricRequest metricName + * @property {google.logging.v2.ILogMetric|null} [metric] UpdateLogMetricRequest metric + */ + + /** + * Constructs a new UpdateLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateLogMetricRequest. + * @implements IUpdateLogMetricRequest + * @constructor + * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + */ + function UpdateLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + */ + UpdateLogMetricRequest.prototype.metricName = ""; + + /** + * UpdateLogMetricRequest metric. + * @member {google.logging.v2.ILogMetric|null|undefined} metric + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + */ + UpdateLogMetricRequest.prototype.metric = null; + + /** + * Creates a new UpdateLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest instance + */ + UpdateLogMetricRequest.create = function create(properties) { + return new UpdateLogMetricRequest(properties); + }; + + /** + * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && message.hasOwnProperty("metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.metric != null && message.hasOwnProperty("metric")) + $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metricName = reader.string(); + break; + case 2: + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.logging.v2.LogMetric.verify(message.metric); + if (error) + return "metric." + error; + } + return null; + }; + + /** + * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + */ + UpdateLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateLogMetricRequest) + return object; + var message = new $root.google.logging.v2.UpdateLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.logging.v2.UpdateLogMetricRequest.metric: object expected"); + message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); + } + return message; + }; + + /** + * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.UpdateLogMetricRequest} message UpdateLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricName = ""; + object.metric = null; + } + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); + return object; + }; + + /** + * Converts this UpdateLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateLogMetricRequest; + })(); + + v2.DeleteLogMetricRequest = (function() { + + /** + * Properties of a DeleteLogMetricRequest. + * @memberof google.logging.v2 + * @interface IDeleteLogMetricRequest + * @property {string|null} [metricName] DeleteLogMetricRequest metricName + */ + + /** + * Constructs a new DeleteLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteLogMetricRequest. + * @implements IDeleteLogMetricRequest + * @constructor + * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + */ + function DeleteLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.DeleteLogMetricRequest + * @instance + */ + DeleteLogMetricRequest.prototype.metricName = ""; + + /** + * Creates a new DeleteLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest instance + */ + DeleteLogMetricRequest.create = function create(properties) { + return new DeleteLogMetricRequest(properties); + }; + + /** + * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && message.hasOwnProperty("metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metricName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + */ + DeleteLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogMetricRequest) + return object; + var message = new $root.google.logging.v2.DeleteLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.DeleteLogMetricRequest} message DeleteLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this DeleteLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteLogMetricRequest; + })(); + + return v2; + })(); + + logging.type = (function() { + + /** + * Namespace type. + * @memberof google.logging + * @namespace + */ + var type = {}; + + type.HttpRequest = (function() { + + /** + * Properties of a HttpRequest. + * @memberof google.logging.type + * @interface IHttpRequest + * @property {string|null} [requestMethod] HttpRequest requestMethod + * @property {string|null} [requestUrl] HttpRequest requestUrl + * @property {number|Long|null} [requestSize] HttpRequest requestSize + * @property {number|null} [status] HttpRequest status + * @property {number|Long|null} [responseSize] HttpRequest responseSize + * @property {string|null} [userAgent] HttpRequest userAgent + * @property {string|null} [remoteIp] HttpRequest remoteIp + * @property {string|null} [serverIp] HttpRequest serverIp + * @property {string|null} [referer] HttpRequest referer + * @property {google.protobuf.IDuration|null} [latency] HttpRequest latency + * @property {boolean|null} [cacheLookup] HttpRequest cacheLookup + * @property {boolean|null} [cacheHit] HttpRequest cacheHit + * @property {boolean|null} [cacheValidatedWithOriginServer] HttpRequest cacheValidatedWithOriginServer + * @property {number|Long|null} [cacheFillBytes] HttpRequest cacheFillBytes + * @property {string|null} [protocol] HttpRequest protocol + */ + + /** + * Constructs a new HttpRequest. + * @memberof google.logging.type + * @classdesc Represents a HttpRequest. + * @implements IHttpRequest + * @constructor + * @param {google.logging.type.IHttpRequest=} [properties] Properties to set + */ + function HttpRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRequest requestMethod. + * @member {string} requestMethod + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.requestMethod = ""; + + /** + * HttpRequest requestUrl. + * @member {string} requestUrl + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.requestUrl = ""; + + /** + * HttpRequest requestSize. + * @member {number|Long} requestSize + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.requestSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HttpRequest status. + * @member {number} status + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.status = 0; + + /** + * HttpRequest responseSize. + * @member {number|Long} responseSize + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.responseSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HttpRequest userAgent. + * @member {string} userAgent + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.userAgent = ""; + + /** + * HttpRequest remoteIp. + * @member {string} remoteIp + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.remoteIp = ""; + + /** + * HttpRequest serverIp. + * @member {string} serverIp + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.serverIp = ""; + + /** + * HttpRequest referer. + * @member {string} referer + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.referer = ""; + + /** + * HttpRequest latency. + * @member {google.protobuf.IDuration|null|undefined} latency + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.latency = null; + + /** + * HttpRequest cacheLookup. + * @member {boolean} cacheLookup + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheLookup = false; + + /** + * HttpRequest cacheHit. + * @member {boolean} cacheHit + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheHit = false; + + /** + * HttpRequest cacheValidatedWithOriginServer. + * @member {boolean} cacheValidatedWithOriginServer + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheValidatedWithOriginServer = false; + + /** + * HttpRequest cacheFillBytes. + * @member {number|Long} cacheFillBytes + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheFillBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HttpRequest protocol. + * @member {string} protocol + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.protocol = ""; + + /** + * Creates a new HttpRequest instance using the specified properties. + * @function create + * @memberof google.logging.type.HttpRequest + * @static + * @param {google.logging.type.IHttpRequest=} [properties] Properties to set + * @returns {google.logging.type.HttpRequest} HttpRequest instance + */ + HttpRequest.create = function create(properties) { + return new HttpRequest(properties); + }; + + /** + * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.type.HttpRequest + * @static + * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestMethod); + if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestUrl); + if (message.requestSize != null && message.hasOwnProperty("requestSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestSize); + if (message.status != null && message.hasOwnProperty("status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.responseSize != null && message.hasOwnProperty("responseSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.responseSize); + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.userAgent); + if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.remoteIp); + if (message.referer != null && message.hasOwnProperty("referer")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.referer); + if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.cacheHit); + if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.cacheValidatedWithOriginServer); + if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.cacheLookup); + if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.cacheFillBytes); + if (message.serverIp != null && message.hasOwnProperty("serverIp")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.serverIp); + if (message.latency != null && message.hasOwnProperty("latency")) + $root.google.protobuf.Duration.encode(message.latency, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.protocol != null && message.hasOwnProperty("protocol")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.protocol); + return writer; + }; + + /** + * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.type.HttpRequest + * @static + * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.type.HttpRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.type.HttpRequest} HttpRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.type.HttpRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.requestMethod = reader.string(); + break; + case 2: + message.requestUrl = reader.string(); + break; + case 3: + message.requestSize = reader.int64(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.responseSize = reader.int64(); + break; + case 6: + message.userAgent = reader.string(); + break; + case 7: + message.remoteIp = reader.string(); + break; + case 13: + message.serverIp = reader.string(); + break; + case 8: + message.referer = reader.string(); + break; + case 14: + message.latency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 11: + message.cacheLookup = reader.bool(); + break; + case 9: + message.cacheHit = reader.bool(); + break; + case 10: + message.cacheValidatedWithOriginServer = reader.bool(); + break; + case 12: + message.cacheFillBytes = reader.int64(); + break; + case 15: + message.protocol = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.type.HttpRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.type.HttpRequest} HttpRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRequest message. + * @function verify + * @memberof google.logging.type.HttpRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + if (!$util.isString(message.requestMethod)) + return "requestMethod: string expected"; + if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + if (!$util.isString(message.requestUrl)) + return "requestUrl: string expected"; + if (message.requestSize != null && message.hasOwnProperty("requestSize")) + if (!$util.isInteger(message.requestSize) && !(message.requestSize && $util.isInteger(message.requestSize.low) && $util.isInteger(message.requestSize.high))) + return "requestSize: integer|Long expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status)) + return "status: integer expected"; + if (message.responseSize != null && message.hasOwnProperty("responseSize")) + if (!$util.isInteger(message.responseSize) && !(message.responseSize && $util.isInteger(message.responseSize.low) && $util.isInteger(message.responseSize.high))) + return "responseSize: integer|Long expected"; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (!$util.isString(message.userAgent)) + return "userAgent: string expected"; + if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + if (!$util.isString(message.remoteIp)) + return "remoteIp: string expected"; + if (message.serverIp != null && message.hasOwnProperty("serverIp")) + if (!$util.isString(message.serverIp)) + return "serverIp: string expected"; + if (message.referer != null && message.hasOwnProperty("referer")) + if (!$util.isString(message.referer)) + return "referer: string expected"; + if (message.latency != null && message.hasOwnProperty("latency")) { + var error = $root.google.protobuf.Duration.verify(message.latency); + if (error) + return "latency." + error; + } + if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + if (typeof message.cacheLookup !== "boolean") + return "cacheLookup: boolean expected"; + if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + if (typeof message.cacheHit !== "boolean") + return "cacheHit: boolean expected"; + if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + if (typeof message.cacheValidatedWithOriginServer !== "boolean") + return "cacheValidatedWithOriginServer: boolean expected"; + if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + if (!$util.isInteger(message.cacheFillBytes) && !(message.cacheFillBytes && $util.isInteger(message.cacheFillBytes.low) && $util.isInteger(message.cacheFillBytes.high))) + return "cacheFillBytes: integer|Long expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + return null; + }; + + /** + * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.type.HttpRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.type.HttpRequest} HttpRequest + */ + HttpRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.type.HttpRequest) + return object; + var message = new $root.google.logging.type.HttpRequest(); + if (object.requestMethod != null) + message.requestMethod = String(object.requestMethod); + if (object.requestUrl != null) + message.requestUrl = String(object.requestUrl); + if (object.requestSize != null) + if ($util.Long) + (message.requestSize = $util.Long.fromValue(object.requestSize)).unsigned = false; + else if (typeof object.requestSize === "string") + message.requestSize = parseInt(object.requestSize, 10); + else if (typeof object.requestSize === "number") + message.requestSize = object.requestSize; + else if (typeof object.requestSize === "object") + message.requestSize = new $util.LongBits(object.requestSize.low >>> 0, object.requestSize.high >>> 0).toNumber(); + if (object.status != null) + message.status = object.status | 0; + if (object.responseSize != null) + if ($util.Long) + (message.responseSize = $util.Long.fromValue(object.responseSize)).unsigned = false; + else if (typeof object.responseSize === "string") + message.responseSize = parseInt(object.responseSize, 10); + else if (typeof object.responseSize === "number") + message.responseSize = object.responseSize; + else if (typeof object.responseSize === "object") + message.responseSize = new $util.LongBits(object.responseSize.low >>> 0, object.responseSize.high >>> 0).toNumber(); + if (object.userAgent != null) + message.userAgent = String(object.userAgent); + if (object.remoteIp != null) + message.remoteIp = String(object.remoteIp); + if (object.serverIp != null) + message.serverIp = String(object.serverIp); + if (object.referer != null) + message.referer = String(object.referer); + if (object.latency != null) { + if (typeof object.latency !== "object") + throw TypeError(".google.logging.type.HttpRequest.latency: object expected"); + message.latency = $root.google.protobuf.Duration.fromObject(object.latency); + } + if (object.cacheLookup != null) + message.cacheLookup = Boolean(object.cacheLookup); + if (object.cacheHit != null) + message.cacheHit = Boolean(object.cacheHit); + if (object.cacheValidatedWithOriginServer != null) + message.cacheValidatedWithOriginServer = Boolean(object.cacheValidatedWithOriginServer); + if (object.cacheFillBytes != null) + if ($util.Long) + (message.cacheFillBytes = $util.Long.fromValue(object.cacheFillBytes)).unsigned = false; + else if (typeof object.cacheFillBytes === "string") + message.cacheFillBytes = parseInt(object.cacheFillBytes, 10); + else if (typeof object.cacheFillBytes === "number") + message.cacheFillBytes = object.cacheFillBytes; + else if (typeof object.cacheFillBytes === "object") + message.cacheFillBytes = new $util.LongBits(object.cacheFillBytes.low >>> 0, object.cacheFillBytes.high >>> 0).toNumber(); + if (object.protocol != null) + message.protocol = String(object.protocol); + return message; + }; + + /** + * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.type.HttpRequest + * @static + * @param {google.logging.type.HttpRequest} message HttpRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.requestMethod = ""; + object.requestUrl = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.requestSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.requestSize = options.longs === String ? "0" : 0; + object.status = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.responseSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.responseSize = options.longs === String ? "0" : 0; + object.userAgent = ""; + object.remoteIp = ""; + object.referer = ""; + object.cacheHit = false; + object.cacheValidatedWithOriginServer = false; + object.cacheLookup = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.cacheFillBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.cacheFillBytes = options.longs === String ? "0" : 0; + object.serverIp = ""; + object.latency = null; + object.protocol = ""; + } + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + object.requestMethod = message.requestMethod; + if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + object.requestUrl = message.requestUrl; + if (message.requestSize != null && message.hasOwnProperty("requestSize")) + if (typeof message.requestSize === "number") + object.requestSize = options.longs === String ? String(message.requestSize) : message.requestSize; + else + object.requestSize = options.longs === String ? $util.Long.prototype.toString.call(message.requestSize) : options.longs === Number ? new $util.LongBits(message.requestSize.low >>> 0, message.requestSize.high >>> 0).toNumber() : message.requestSize; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.responseSize != null && message.hasOwnProperty("responseSize")) + if (typeof message.responseSize === "number") + object.responseSize = options.longs === String ? String(message.responseSize) : message.responseSize; + else + object.responseSize = options.longs === String ? $util.Long.prototype.toString.call(message.responseSize) : options.longs === Number ? new $util.LongBits(message.responseSize.low >>> 0, message.responseSize.high >>> 0).toNumber() : message.responseSize; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = message.userAgent; + if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + object.remoteIp = message.remoteIp; + if (message.referer != null && message.hasOwnProperty("referer")) + object.referer = message.referer; + if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + object.cacheHit = message.cacheHit; + if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + object.cacheValidatedWithOriginServer = message.cacheValidatedWithOriginServer; + if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + object.cacheLookup = message.cacheLookup; + if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + if (typeof message.cacheFillBytes === "number") + object.cacheFillBytes = options.longs === String ? String(message.cacheFillBytes) : message.cacheFillBytes; + else + object.cacheFillBytes = options.longs === String ? $util.Long.prototype.toString.call(message.cacheFillBytes) : options.longs === Number ? new $util.LongBits(message.cacheFillBytes.low >>> 0, message.cacheFillBytes.high >>> 0).toNumber() : message.cacheFillBytes; + if (message.serverIp != null && message.hasOwnProperty("serverIp")) + object.serverIp = message.serverIp; + if (message.latency != null && message.hasOwnProperty("latency")) + object.latency = $root.google.protobuf.Duration.toObject(message.latency, options); + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + return object; + }; + + /** + * Converts this HttpRequest to JSON. + * @function toJSON + * @memberof google.logging.type.HttpRequest + * @instance + * @returns {Object.} JSON object + */ + HttpRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRequest; + })(); + + /** + * LogSeverity enum. + * @name google.logging.type.LogSeverity + * @enum {string} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} DEBUG=100 DEBUG value + * @property {number} INFO=200 INFO value + * @property {number} NOTICE=300 NOTICE value + * @property {number} WARNING=400 WARNING value + * @property {number} ERROR=500 ERROR value + * @property {number} CRITICAL=600 CRITICAL value + * @property {number} ALERT=700 ALERT value + * @property {number} EMERGENCY=800 EMERGENCY value + */ + type.LogSeverity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[100] = "DEBUG"] = 100; + values[valuesById[200] = "INFO"] = 200; + values[valuesById[300] = "NOTICE"] = 300; + values[valuesById[400] = "WARNING"] = 400; + values[valuesById[500] = "ERROR"] = 500; + values[valuesById[600] = "CRITICAL"] = 600; + values[valuesById[700] = "ALERT"] = 700; + values[valuesById[800] = "EMERGENCY"] = 800; + return values; + })(); + + return type; + })(); + + return logging; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + api.MonitoredResourceDescriptor = (function() { + + /** + * Properties of a MonitoredResourceDescriptor. + * @memberof google.api + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + */ + + /** + * Constructs a new MonitoredResourceDescriptor. + * @memberof google.api + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor + * @constructor + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + */ + function MonitoredResourceDescriptor(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.name = ""; + + /** + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.type = ""; + + /** + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.displayName = ""; + + /** + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.description = ""; + + /** + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + */ + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); + }; + + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); + return writer; + }; + + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; + case 1: + message.type = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 7: + message.launchStage = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResourceDescriptor message. + * @function verify + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + */ + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) + return object; + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + return object; + }; + + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResourceDescriptor; + })(); + + api.MonitoredResource = (function() { + + /** + * Properties of a MonitoredResource. + * @memberof google.api + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels + */ + + /** + * Constructs a new MonitoredResource. + * @memberof google.api + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource + * @constructor + * @param {google.api.IMonitoredResource=} [properties] Properties to set + */ + function MonitoredResource(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource + * @instance + */ + MonitoredResource.prototype.type = ""; + + /** + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource + * @instance + */ + MonitoredResource.prototype.labels = $util.emptyObject; + + /** + * Creates a new MonitoredResource instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance + */ + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); + }; + + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResource message. + * @function verify + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResource} MonitoredResource + */ + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) + return object; + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.MonitoredResource} message MonitoredResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this MonitoredResource to JSON. + * @function toJSON + * @memberof google.api.MonitoredResource + * @instance + * @returns {Object.} JSON object + */ + MonitoredResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResource; + })(); + + api.MonitoredResourceMetadata = (function() { + + /** + * Properties of a MonitoredResourceMetadata. + * @memberof google.api + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + */ + + /** + * Constructs a new MonitoredResourceMetadata. + * @memberof google.api + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata + * @constructor + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + */ + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata + * @instance + */ + MonitoredResourceMetadata.prototype.systemLabels = null; + + /** + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata + * @instance + */ + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + */ + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); + }; + + /** + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 2: + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResourceMetadata message. + * @function verify + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResourceMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + */ + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) + return object; + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResourceMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this MonitoredResourceMetadata to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceMetadata + * @instance + * @returns {Object.} JSON object + */ + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResourceMetadata; + })(); + + api.LabelDescriptor = (function() { + + /** + * Properties of a LabelDescriptor. + * @memberof google.api + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description + */ + + /** + * Constructs a new LabelDescriptor. + * @memberof google.api + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor + * @constructor + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + */ + function LabelDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.key = ""; + + /** + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.valueType = 0; + + /** + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.description = ""; + + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @function create + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance + */ + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); + }; + + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && message.hasOwnProperty("key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && message.hasOwnProperty("valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.valueType = reader.int32(); + break; + case 3: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelDescriptor message. + * @function verify + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.LabelDescriptor} LabelDescriptor + */ + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) + return object; + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this LabelDescriptor to JSON. + * @function toJSON + * @memberof google.api.LabelDescriptor + * @instance + * @returns {Object.} JSON object + */ + LabelDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {string} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.Distribution = (function() { + + /** + * Properties of a Distribution. + * @memberof google.api + * @interface IDistribution + * @property {number|Long|null} [count] Distribution count + * @property {number|null} [mean] Distribution mean + * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation + * @property {google.api.Distribution.IRange|null} [range] Distribution range + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions + * @property {Array.|null} [bucketCounts] Distribution bucketCounts + * @property {Array.|null} [exemplars] Distribution exemplars + */ + + /** + * Constructs a new Distribution. + * @memberof google.api + * @classdesc Represents a Distribution. + * @implements IDistribution + * @constructor + * @param {google.api.IDistribution=} [properties] Properties to set + */ + function Distribution(properties) { + this.bucketCounts = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Distribution count. + * @member {number|Long} count + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Distribution mean. + * @member {number} mean + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.mean = 0; + + /** + * Distribution sumOfSquaredDeviation. + * @member {number} sumOfSquaredDeviation + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.sumOfSquaredDeviation = 0; + + /** + * Distribution range. + * @member {google.api.Distribution.IRange|null|undefined} range + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.range = null; + + /** + * Distribution bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketOptions = null; + + /** + * Distribution bucketCounts. + * @member {Array.} bucketCounts + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketCounts = $util.emptyArray; + + /** + * Distribution exemplars. + * @member {Array.} exemplars + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.exemplars = $util.emptyArray; + + /** + * Creates a new Distribution instance using the specified properties. + * @function create + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution=} [properties] Properties to set + * @returns {google.api.Distribution} Distribution instance + */ + Distribution.create = function create(properties) { + return new Distribution(properties); + }; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.mean != null && message.hasOwnProperty("mean")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); + if (message.range != null && message.hasOwnProperty("range")) + $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.int64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.int64(); + break; + case 2: + message.mean = reader.double(); + break; + case 3: + message.sumOfSquaredDeviation = reader.double(); + break; + case 4: + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + case 6: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else + message.bucketCounts.push(reader.int64()); + break; + case 10: + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Distribution message. + * @function verify + * @memberof google.api.Distribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Distribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (typeof message.sumOfSquaredDeviation !== "number") + return "sumOfSquaredDeviation: number expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.api.Distribution.Range.verify(message.range); + if (error) + return "range." + error; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + return null; + }; + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution} Distribution + */ + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution) + return object; + var message = new $root.google.api.Distribution(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.sumOfSquaredDeviation != null) + message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.api.Distribution.range: object expected"); + message.range = $root.google.api.Distribution.Range.fromObject(object.range); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.api.Distribution.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".google.api.Distribution.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".google.api.Distribution.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".google.api.Distribution.exemplars: object expected"); + message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution + * @static + * @param {google.api.Distribution} message Distribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Distribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.mean = 0; + object.sumOfSquaredDeviation = 0; + object.range = null; + object.bucketOptions = null; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.api.Distribution.Range.toObject(message.range, options); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + } + return object; + }; + + /** + * Converts this Distribution to JSON. + * @function toJSON + * @memberof google.api.Distribution + * @instance + * @returns {Object.} JSON object + */ + Distribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Distribution.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.api.Distribution + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max + */ + + /** + * Constructs a new Range. + * @memberof google.api.Distribution + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.api.Distribution.IRange=} [properties] Properties to set + */ + function Range(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Range min. + * @member {number} min + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.min = 0; + + /** + * Range max. + * @member {number} max + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.max = 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @returns {google.api.Distribution.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && message.hasOwnProperty("min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && message.hasOwnProperty("max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + return writer; + }; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.min = reader.double(); + break; + case 2: + message.max = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Range message. + * @function verify + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Range) + return object; + var message = new $root.google.api.Distribution.Range(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + return message; + }; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.min = 0; + object.max = 0; + } + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + return object; + }; + + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.api.Distribution.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Range; + })(); + + Distribution.BucketOptions = (function() { + + /** + * Properties of a BucketOptions. + * @memberof google.api.Distribution + * @interface IBucketOptions + * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets + * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets + * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + */ + + /** + * Constructs a new BucketOptions. + * @memberof google.api.Distribution + * @classdesc Represents a BucketOptions. + * @implements IBucketOptions + * @constructor + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + */ + function BucketOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BucketOptions linearBuckets. + * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.linearBuckets = null; + + /** + * BucketOptions exponentialBuckets. + * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.exponentialBuckets = null; + + /** + * BucketOptions explicitBuckets. + * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.explicitBuckets = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BucketOptions options. + * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + Object.defineProperty(BucketOptions.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BucketOptions instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + */ + BucketOptions.create = function create(properties) { + return new BucketOptions(properties); + }; + + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) + $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) + $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) + $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + break; + case 2: + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + break; + case 3: + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BucketOptions message. + * @function verify + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BucketOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); + if (error) + return "linearBuckets." + error; + } + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); + if (error) + return "exponentialBuckets." + error; + } + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); + if (error) + return "explicitBuckets." + error; + } + } + return null; + }; + + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions} BucketOptions + */ + BucketOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions) + return object; + var message = new $root.google.api.Distribution.BucketOptions(); + if (object.linearBuckets != null) { + if (typeof object.linearBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); + } + if (object.exponentialBuckets != null) { + if (typeof object.exponentialBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); + } + if (object.explicitBuckets != null) { + if (typeof object.explicitBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + } + return message; + }; + + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BucketOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); + if (options.oneofs) + object.options = "linearBuckets"; + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); + if (options.oneofs) + object.options = "exponentialBuckets"; + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); + if (options.oneofs) + object.options = "explicitBuckets"; + } + return object; + }; + + /** + * Converts this BucketOptions to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions + * @instance + * @returns {Object.} JSON object + */ + BucketOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + BucketOptions.Linear = (function() { + + /** + * Properties of a Linear. + * @memberof google.api.Distribution.BucketOptions + * @interface ILinear + * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets + * @property {number|null} [width] Linear width + * @property {number|null} [offset] Linear offset + */ + + /** + * Constructs a new Linear. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents a Linear. + * @implements ILinear + * @constructor + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + */ + function Linear(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Linear numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.numFiniteBuckets = 0; + + /** + * Linear width. + * @member {number} width + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.width = 0; + + /** + * Linear offset. + * @member {number} offset + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.offset = 0; + + /** + * Creates a new Linear instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance + */ + Linear.create = function create(properties) { + return new Linear(properties); + }; + + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.width != null && message.hasOwnProperty("width")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); + if (message.offset != null && message.hasOwnProperty("offset")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); + return writer; + }; + + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Linear message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.width = reader.double(); + break; + case 3: + message.offset = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Linear message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Linear.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset !== "number") + return "offset: number expected"; + return null; + }; + + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + */ + Linear.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Linear(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.width != null) + message.width = Number(object.width); + if (object.offset != null) + message.offset = Number(object.offset); + return message; + }; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.Linear} message Linear + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Linear.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.width = 0; + object.offset = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; + return object; + }; + + /** + * Converts this Linear to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + * @returns {Object.} JSON object + */ + Linear.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Linear; + })(); + + BucketOptions.Exponential = (function() { + + /** + * Properties of an Exponential. + * @memberof google.api.Distribution.BucketOptions + * @interface IExponential + * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets + * @property {number|null} [growthFactor] Exponential growthFactor + * @property {number|null} [scale] Exponential scale + */ + + /** + * Constructs a new Exponential. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Exponential. + * @implements IExponential + * @constructor + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + */ + function Exponential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Exponential numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.numFiniteBuckets = 0; + + /** + * Exponential growthFactor. + * @member {number} growthFactor + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.growthFactor = 0; + + /** + * Exponential scale. + * @member {number} scale + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.scale = 0; + + /** + * Creates a new Exponential instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance + */ + Exponential.create = function create(properties) { + return new Exponential(properties); + }; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); + if (message.scale != null && message.hasOwnProperty("scale")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); + return writer; + }; + + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exponential message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.growthFactor = reader.double(); + break; + case 3: + message.scale = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Exponential message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exponential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + if (typeof message.growthFactor !== "number") + return "growthFactor: number expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (typeof message.scale !== "number") + return "scale: number expected"; + return null; + }; + + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + */ + Exponential.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Exponential(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.growthFactor != null) + message.growthFactor = Number(object.growthFactor); + if (object.scale != null) + message.scale = Number(object.scale); + return message; + }; + + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exponential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.growthFactor = 0; + object.scale = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; + return object; + }; + + /** + * Converts this Exponential to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + * @returns {Object.} JSON object + */ + Exponential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Exponential; + })(); + + BucketOptions.Explicit = (function() { + + /** + * Properties of an Explicit. + * @memberof google.api.Distribution.BucketOptions + * @interface IExplicit + * @property {Array.|null} [bounds] Explicit bounds + */ + + /** + * Constructs a new Explicit. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Explicit. + * @implements IExplicit + * @constructor + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + */ + function Explicit(properties) { + this.bounds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Explicit bounds. + * @member {Array.} bounds + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + */ + Explicit.prototype.bounds = $util.emptyArray; + + /** + * Creates a new Explicit instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance + */ + Explicit.create = function create(properties) { + return new Explicit(properties); + }; + + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bounds != null && message.bounds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bounds.length; ++i) + writer.double(message.bounds[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Explicit message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.bounds && message.bounds.length)) + message.bounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bounds.push(reader.double()); + } else + message.bounds.push(reader.double()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Explicit message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Explicit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bounds != null && message.hasOwnProperty("bounds")) { + if (!Array.isArray(message.bounds)) + return "bounds: array expected"; + for (var i = 0; i < message.bounds.length; ++i) + if (typeof message.bounds[i] !== "number") + return "bounds: number[] expected"; + } + return null; + }; + + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + */ + Explicit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Explicit(); + if (object.bounds) { + if (!Array.isArray(object.bounds)) + throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); + message.bounds = []; + for (var i = 0; i < object.bounds.length; ++i) + message.bounds[i] = Number(object.bounds[i]); + } + return message; + }; + + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Explicit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bounds = []; + if (message.bounds && message.bounds.length) { + object.bounds = []; + for (var j = 0; j < message.bounds.length; ++j) + object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; + } + return object; + }; + + /** + * Converts this Explicit to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + * @returns {Object.} JSON object + */ + Explicit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Explicit; + })(); + + return BucketOptions; + })(); + + Distribution.Exemplar = (function() { + + /** + * Properties of an Exemplar. + * @memberof google.api.Distribution + * @interface IExemplar + * @property {number|null} [value] Exemplar value + * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp + * @property {Array.|null} [attachments] Exemplar attachments + */ + + /** + * Constructs a new Exemplar. + * @memberof google.api.Distribution + * @classdesc Represents an Exemplar. + * @implements IExemplar + * @constructor + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + */ + function Exemplar(properties) { + this.attachments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Exemplar value. + * @member {number} value + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.value = 0; + + /** + * Exemplar timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.timestamp = null; + + /** + * Exemplar attachments. + * @member {Array.} attachments + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.attachments = $util.emptyArray; + + /** + * Creates a new Exemplar instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @returns {google.api.Distribution.Exemplar} Exemplar instance + */ + Exemplar.create = function create(properties) { + return new Exemplar(properties); + }; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + case 2: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Exemplar message. + * @function verify + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exemplar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } + return null; + }; + + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Exemplar} Exemplar + */ + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Exemplar) + return object; + var message = new $root.google.api.Distribution.Exemplar(); + if (object.value != null) + message.value = Number(object.value); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); + message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.Exemplar} message Exemplar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attachments = []; + if (options.defaults) { + object.value = 0; + object.timestamp = null; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + } + return object; + }; + + /** + * Converts this Exemplar to JSON. + * @function toJSON + * @memberof google.api.Distribution.Exemplar + * @instance + * @returns {Object.} JSON object + */ + Exemplar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Exemplar; + })(); + + return Distribution; + })(); + + api.MetricDescriptor = (function() { + + /** + * Properties of a MetricDescriptor. + * @memberof google.api + * @interface IMetricDescriptor + * @property {string|null} [name] MetricDescriptor name + * @property {string|null} [type] MetricDescriptor type + * @property {Array.|null} [labels] MetricDescriptor labels + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType + * @property {string|null} [unit] MetricDescriptor unit + * @property {string|null} [description] MetricDescriptor description + * @property {string|null} [displayName] MetricDescriptor displayName + * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + */ + + /** + * Constructs a new MetricDescriptor. + * @memberof google.api + * @classdesc Represents a MetricDescriptor. + * @implements IMetricDescriptor + * @constructor + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + */ + function MetricDescriptor(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricDescriptor name. + * @member {string} name + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.name = ""; + + /** + * MetricDescriptor type. + * @member {string} type + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.type = ""; + + /** + * MetricDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.labels = $util.emptyArray; + + /** + * MetricDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metricKind = 0; + + /** + * MetricDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.valueType = 0; + + /** + * MetricDescriptor unit. + * @member {string} unit + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.unit = ""; + + /** + * MetricDescriptor description. + * @member {string} description + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.description = ""; + + /** + * MetricDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.displayName = ""; + + /** + * MetricDescriptor metadata. + * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metadata = null; + + /** + * MetricDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @returns {google.api.MetricDescriptor} MetricDescriptor instance + */ + MetricDescriptor.create = function create(properties) { + return new MetricDescriptor(properties); + }; + + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.valueType != null && message.hasOwnProperty("valueType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); + if (message.unit != null && message.hasOwnProperty("unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + return writer; + }; + + /** + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor} MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 8: + message.type = reader.string(); + break; + case 2: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 3: + message.metricKind = reader.int32(); + break; + case 4: + message.valueType = reader.int32(); + break; + case 5: + message.unit = reader.string(); + break; + case 6: + message.description = reader.string(); + break; + case 7: + message.displayName = reader.string(); + break; + case 10: + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + case 12: + message.launchStage = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor} MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricDescriptor message. + * @function verify + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + switch (message.metricKind) { + default: + return "metricKind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor} MetricDescriptor + */ + MetricDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor) + return object; + var message = new $root.google.api.MetricDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MetricDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MetricDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.metricKind) { + case "METRIC_KIND_UNSPECIFIED": + case 0: + message.metricKind = 0; + break; + case "GAUGE": + case 1: + message.metricKind = 1; + break; + case "DELTA": + case 2: + message.metricKind = 2; + break; + case "CUMULATIVE": + case 3: + message.metricKind = 3; + break; + } + switch (object.valueType) { + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + case "DOUBLE": + case 3: + message.valueType = 3; + break; + case "STRING": + case 4: + message.valueType = 4; + break; + case "DISTRIBUTION": + case 5: + message.valueType = 5; + break; + case "MONEY": + case 6: + message.valueType = 6; + break; + } + if (object.unit != null) + message.unit = String(object.unit); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + } + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.MetricDescriptor} message MetricDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.name = ""; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.unit = ""; + object.description = ""; + object.displayName = ""; + object.type = ""; + object.metadata = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + return object; + }; + + /** + * Converts this MetricDescriptor to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + MetricDescriptor.MetricDescriptorMetadata = (function() { + + /** + * Properties of a MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @interface IMetricDescriptorMetadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage + * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod + * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay + */ + + /** + * Constructs a new MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @classdesc Represents a MetricDescriptorMetadata. + * @implements IMetricDescriptorMetadata + * @constructor + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + */ + function MetricDescriptorMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricDescriptorMetadata launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.launchStage = 0; + + /** + * MetricDescriptorMetadata samplePeriod. + * @member {google.protobuf.IDuration|null|undefined} samplePeriod + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.samplePeriod = null; + + /** + * MetricDescriptorMetadata ingestDelay. + * @member {google.protobuf.IDuration|null|undefined} ingestDelay + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.ingestDelay = null; + + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance + */ + MetricDescriptorMetadata.create = function create(properties) { + return new MetricDescriptorMetadata(properties); + }; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.launchStage = reader.int32(); + break; + case 2: + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricDescriptorMetadata message. + * @function verify + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptorMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { + var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + if (error) + return "samplePeriod." + error; + } + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { + var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + if (error) + return "ingestDelay." + error; + } + return null; + }; + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + */ + MetricDescriptorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) + return object; + var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.samplePeriod != null) { + if (typeof object.samplePeriod !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); + message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); + } + if (object.ingestDelay != null) { + if (typeof object.ingestDelay !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); + message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); + } + return message; + }; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptorMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.samplePeriod = null; + object.ingestDelay = null; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); + return object; + }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptorMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MetricDescriptorMetadata; + })(); + + /** + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {string} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value + */ + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); + + /** + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {string} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value + */ + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); + + return MetricDescriptor; + })(); + + api.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.api + * @interface IMetric + * @property {string|null} [type] Metric type + * @property {Object.|null} [labels] Metric labels + */ + + /** + * Constructs a new Metric. + * @memberof google.api + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.api.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric type. + * @member {string} type + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.type = ""; + + /** + * Metric labels. + * @member {Object.} labels + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.labels = $util.emptyObject; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric=} [properties] Properties to set + * @returns {google.api.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encode + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.type = reader.string(); + break; + case 2: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.api.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.api.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Metric) + return object; + var message = new $root.google.api.Metric(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.Metric.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Metric + * @static + * @param {google.api.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.api.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metric; + })(); + + return api; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && message.hasOwnProperty("message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 5be3a912122..26f27ffc3c4 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -1163,6 +1163,20 @@ "updateTime": { "type": "google.protobuf.Timestamp", "id": 14 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "deprecated": true + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "deprecated": true + } } }, "nested": { diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index 7459dc16d5e..fc765f43201 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -104,6 +104,16 @@ * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * + * @property {Object} startTime + * Do not use. This field is ignored. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} endTime + * Do not use. This field is ignored. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * * @typedef LogSink * @memberof google.logging.v2 * @see [google.logging.v2.LogSink definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index afb527527b9..84ea6f24168 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-09-21T11:16:25.673951Z", + "updateTime": "2019-10-05T11:13:49.527316Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.3", - "dockerImage": "googleapis/artman@sha256:66ca01f27ef7dc50fbfb7743b67028115a6a8acf43b2d82f9fc826de008adac4" + "version": "0.38.0", + "dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "999d0930cea7a7cb3147a7c5432e1f011060d549", - "internalRef": "270363949" + "sha": "ceb8e2fb12f048cc94caae532ef0b4cf026a78f3", + "internalRef": "272971705" } }, { From f1e232602a2399c98bbd94bac044e118009d1067 Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 8 Oct 2019 12:48:16 -0400 Subject: [PATCH 0483/1029] fix(deps): gcp-metadata now handles ENETUNREACH (#600) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9331ba7e0ce..5cbb1aec7df 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -60,7 +60,7 @@ "arrify": "^2.0.0", "eventid": "^0.1.2", "extend": "^3.0.2", - "gcp-metadata": "^3.0.0", + "gcp-metadata": "^3.1.0", "google-auth-library": "^5.2.2", "google-gax": "^1.6.3", "is": "^3.2.1", From e8686be3d8eac7242ff6de3db9113e503a0441bc Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 8 Oct 2019 17:23:46 -0700 Subject: [PATCH 0484/1029] chore: update CONTRIBUTING.md and make releaseType node (#601) --- handwritten/logging/.github/release-please.yml | 1 + handwritten/logging/CONTRIBUTING.md | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/handwritten/logging/.github/release-please.yml b/handwritten/logging/.github/release-please.yml index e69de29bb2d..85344b92c7f 100644 --- a/handwritten/logging/.github/release-please.yml +++ b/handwritten/logging/.github/release-please.yml @@ -0,0 +1 @@ +releaseType: node diff --git a/handwritten/logging/CONTRIBUTING.md b/handwritten/logging/CONTRIBUTING.md index 78aaa61b269..f6c4cf010e3 100644 --- a/handwritten/logging/CONTRIBUTING.md +++ b/handwritten/logging/CONTRIBUTING.md @@ -34,6 +34,7 @@ accept your pull requests. 1. Ensure that your code adheres to the existing style in the code to which you are contributing. 1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. ## Running the tests @@ -46,8 +47,17 @@ accept your pull requests. 1. Run the tests: + # Run unit tests. npm test + # Run sample integration tests. + gcloud auth application-default login + npm run samples-test + + # Run all system tests. + gcloud auth application-default login + npm run system-test + 1. Lint (and maybe fix) any changes: npm run fix From 8e42d6619c7bae8f6c3bbf8346a3045aac0612e7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2019 14:15:47 -0700 Subject: [PATCH 0485/1029] chore: release 5.4.0 (#598) --- handwritten/logging/CHANGELOG.md | 13 +++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 0f151ecd219..549b17e7867 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [5.4.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.3.1...v5.4.0) (2019-10-09) + + +### Bug Fixes + +* use compatible version of google-gax ([7576ef2](https://www.github.com/googleapis/nodejs-logging/commit/7576ef2)) +* **deps:** gcp-metadata now handles ENETUNREACH ([#600](https://www.github.com/googleapis/nodejs-logging/issues/600)) ([e3ed1d6](https://www.github.com/googleapis/nodejs-logging/commit/e3ed1d6)) + + +### Features + +* introduces startTime and endTime ([4406446](https://www.github.com/googleapis/nodejs-logging/commit/4406446)) + ### [5.3.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.3.0...v5.3.1) (2019-09-17) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5cbb1aec7df..72942309dc7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.3.1", + "version": "5.4.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From b42fd3cef394e7f67eababf4bd1ccc7ad80a0977 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 9 Oct 2019 17:02:49 -0700 Subject: [PATCH 0486/1029] fix(deps): pin to newer version of grpc (#602) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 72942309dc7..89a095f3c36 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "@google-cloud/common-grpc": "^1.0.5", + "@google-cloud/common-grpc": "^1.0.6", "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", From a15fac959b268b23b0874ff5c48921099d2a1c17 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2019 17:18:58 -0700 Subject: [PATCH 0487/1029] chore: release 5.4.1 (#603) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 549b17e7867..5290619944c 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.4.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.4.0...v5.4.1) (2019-10-10) + + +### Bug Fixes + +* **deps:** pin to newer version of grpc ([#602](https://www.github.com/googleapis/nodejs-logging/issues/602)) ([23bda1d](https://www.github.com/googleapis/nodejs-logging/commit/23bda1d)) + ## [5.4.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.3.1...v5.4.0) (2019-10-09) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 89a095f3c36..4cbb34fadbd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.4.0", + "version": "5.4.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 625769c84d616b2a296b475ed65dde5d55767bec Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 15 Oct 2019 17:18:33 -0700 Subject: [PATCH 0488/1029] feat: introduce maxEntrySize, for enabling error message truncation (#607) --- handwritten/logging/src/log.ts | 50 ++++++++++++++++++++++++-- handwritten/logging/test/log.ts | 62 +++++++++++++++++++++++++++++++-- 2 files changed, 108 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index b2e132ff69f..92281d55f9c 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -24,7 +24,7 @@ import {Response} from 'teeny-request'; import {google} from '../proto/logging'; import {GetEntriesCallback, GetEntriesResponse, Logging} from '.'; -import {Entry, LogEntry} from './entry'; +import {Entry, EntryJson, LogEntry} from './entry'; import {getDefaultResource} from './metadata'; const snakeCaseKeys = require('snakecase-keys'); @@ -44,6 +44,7 @@ export interface GetEntriesRequest { export interface LogOptions { removeCircular?: boolean; + maxEntrySize?: number; // see: https://cloud.google.com/logging/quotas } export type ApiResponse = [Response]; @@ -103,12 +104,14 @@ type LogSeverityFunctions = { class Log implements LogSeverityFunctions { formattedName_: string; removeCircular_: boolean; + maxEntrySize?: number; logging: Logging; name: string; constructor(logging: Logging, name: string, options?: LogOptions) { options = options || {}; this.formattedName_ = Log.formatName_(logging.projectId, name); this.removeCircular_ = options.removeCircular === true; + this.maxEntrySize = options.maxEntrySize; this.logging = logging; /** * @name Log#name @@ -828,6 +831,7 @@ class Log implements LogSeverityFunctions { } catch (err) { // Ignore errors (the API will speak up if it has an issue). } + self.truncateEntries(decoratedEntries); const projectId = await self.logging.auth.getProjectId(); self.formattedName_ = Log.formatName_(projectId, self.name); const reqOpts = extend( @@ -855,7 +859,7 @@ class Log implements LogSeverityFunctions { * @returns {object[]} Serialized entries. * @throws if there is an error during serialization. */ - decorateEntries_(entries: Entry[]) { + decorateEntries_(entries: Entry[]): EntryJson[] { return entries.map(entry => { if (!(entry instanceof Entry)) { entry = this.entry(entry); @@ -866,6 +870,48 @@ class Log implements LogSeverityFunctions { }); } + /** + * Truncate log entries at maxEntrySize, so that error is not thrown, see: + * https://cloud.google.com/logging/quotas + * + * @private + * + * @param {object|string} the JSON log entry. + * @returns {object|string} truncated JSON log entry. + */ + private truncateEntries(entries: EntryJson[]) { + return entries.forEach(entry => { + if (this.maxEntrySize === undefined) return; + + const payloadSize = JSON.stringify(entry).length; + if (payloadSize < this.maxEntrySize) return; + + const delta = payloadSize - this.maxEntrySize; + if (entry.textPayload) { + entry.textPayload = entry.textPayload.slice( + 0, + Math.max(entry.textPayload.length - delta, 0) + ); + } else { + // Stackdriver Log Viewer picks up the summary line from the + // 'message' field. + if ( + entry.jsonPayload && + entry.jsonPayload.fields && + entry.jsonPayload.fields.message && + entry.jsonPayload.fields.message.stringValue + ) { + const text: string | null | undefined = + entry.jsonPayload.fields.message.stringValue; + entry.jsonPayload.fields.message.stringValue = text.slice( + 0, + Math.max(text.length - delta, 0) + ); + } + } + }); + } + /** * Return an array of log entries with the desired severity assigned. * diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 9906889c7f4..8082aca9b45 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -33,6 +33,7 @@ const fakeCallbackify = extend({}, callbackify, { import {Entry} from '../src'; import {EntryJson} from '../src/entry'; +import {LogOptions} from '../src/log'; const originalGetDefaultResource = async () => { return 'very-fake-resource'; @@ -76,6 +77,10 @@ describe('Log', () => { }); beforeEach(() => { + log = createLogger(); + }); + + function createLogger(maxEntrySize?: number) { assignSeverityToEntriesOverride = null; LOGGING = { @@ -86,8 +91,13 @@ describe('Log', () => { auth: util.noop, }; - log = new Log(LOGGING, LOG_NAME); - }); + const options: LogOptions = {}; + if (maxEntrySize) { + options.maxEntrySize = maxEntrySize; + } + + return new Log(LOGGING, LOG_NAME, options); + } describe('instantiation', () => { it('should callbackify all the things', () => { @@ -441,6 +451,54 @@ describe('Log', () => { await log.write(ENTRY); }); + + it('should not truncate entries by default', async () => { + const logger = createLogger(); + const entry = new Entry({}, 'hello world'.padEnd(300000, '.')); + + logger.logging.loggingService.writeLogEntries = (reqOpts, _gaxOpts) => { + assert.strictEqual(reqOpts.entries[0].textPayload.length, 300000); + }; + + await logger.write(entry); + }); + + it('should truncate string entry if maxEntrySize hit', async () => { + const truncatingLogger = createLogger(200); + const entry = new Entry({}, 'hello world'.padEnd(2000, '.')); + + truncatingLogger.logging.loggingService.writeLogEntries = ( + reqOpts, + _gaxOpts + ) => { + const text = reqOpts.entries[0].textPayload; + assert.ok(text.startsWith('hello world')); + assert.ok(text.length < 300); + }; + + await truncatingLogger.write(entry); + }); + + it('should truncate message field, on object entry, if maxEntrySize hit', async () => { + const truncatingLogger = createLogger(200); + const entry = new Entry( + {}, + { + message: 'hello world'.padEnd(2000, '.'), + } + ); + + truncatingLogger.logging.loggingService.writeLogEntries = ( + reqOpts, + _gaxOpts + ) => { + const text = reqOpts.entries[0].jsonPayload.fields.message.stringValue; + assert.ok(text.startsWith('hello world')); + assert.ok(text.length < 300); + }; + + await truncatingLogger.write(entry); + }); }); describe('severity shortcuts', () => { From 1329da14bd6e43c0d0cf64096065dbfda74906dd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2019 11:24:45 -0700 Subject: [PATCH 0489/1029] chore: release 5.5.0 (#608) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 5290619944c..f9b2fd9deb8 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [5.5.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.4.1...v5.5.0) (2019-10-16) + + +### Features + +* introduce maxEntrySize, for enabling error message truncation ([#607](https://www.github.com/googleapis/nodejs-logging/issues/607)) ([49efd49](https://www.github.com/googleapis/nodejs-logging/commit/49efd491263b518ae5cd54c9a77e5603477f96d8)) + ### [5.4.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.4.0...v5.4.1) (2019-10-10) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 4cbb34fadbd..17a361e378f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.4.1", + "version": "5.5.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 508d0247b1a15ff5e06970124effa3d13b774bec Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 17 Oct 2019 13:52:07 -0700 Subject: [PATCH 0490/1029] fix: truncate additional fields set by winston/bunyan (#609) --- handwritten/logging/package.json | 1 + handwritten/logging/src/log.ts | 39 +++++++++++++++++++------------- handwritten/logging/test/log.ts | 28 +++++++++++++++++++++++ 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 17a361e378f..e37fa9aaed5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,6 +58,7 @@ "@google-cloud/promisify": "^1.0.0", "@opencensus/propagation-stackdriver": "0.0.17", "arrify": "^2.0.0", + "dot-prop": "^5.1.0", "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^3.1.0", diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 92281d55f9c..b2fa77429ff 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -14,9 +14,10 @@ * limitations under the License. */ +import arrify = require('arrify'); import {DeleteCallback} from '@google-cloud/common'; import {callbackifyAll} from '@google-cloud/promisify'; -import arrify = require('arrify'); +import * as dotProp from 'dot-prop'; import * as extend from 'extend'; import {CallOptions} from 'google-gax'; import {Response} from 'teeny-request'; @@ -886,27 +887,33 @@ class Log implements LogSeverityFunctions { const payloadSize = JSON.stringify(entry).length; if (payloadSize < this.maxEntrySize) return; - const delta = payloadSize - this.maxEntrySize; + let delta = payloadSize - this.maxEntrySize; if (entry.textPayload) { entry.textPayload = entry.textPayload.slice( 0, Math.max(entry.textPayload.length - delta, 0) ); } else { - // Stackdriver Log Viewer picks up the summary line from the - // 'message' field. - if ( - entry.jsonPayload && - entry.jsonPayload.fields && - entry.jsonPayload.fields.message && - entry.jsonPayload.fields.message.stringValue - ) { - const text: string | null | undefined = - entry.jsonPayload.fields.message.stringValue; - entry.jsonPayload.fields.message.stringValue = text.slice( - 0, - Math.max(text.length - delta, 0) - ); + const fieldsToTruncate = [ + // Winston: + 'jsonPayload.fields.metadata.structValue.fields.stack.stringValue', + // Bunyan: + 'jsonPayload.fields.msg.stringValue', + 'jsonPayload.fields.err.structValue.fields.stack.stringValue', + 'jsonPayload.fields.err.structValue.fields.message.stringValue', + // All: + 'jsonPayload.fields.message.stringValue', + ]; + for (const field of fieldsToTruncate) { + const msg: string = dotProp.get(entry, field, ''); + if (msg !== '') { + dotProp.set( + entry, + field, + msg.slice(0, Math.max(msg.length - delta, 0)) + ); + delta -= Math.min(msg.length, delta); + } } } }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 8082aca9b45..dfa94eecdbe 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -499,6 +499,34 @@ describe('Log', () => { await truncatingLogger.write(entry); }); + + it('should truncate stack trace', async () => { + const truncatingLogger = createLogger(300); + const entry = new Entry( + {}, + { + message: 'hello world'.padEnd(2000, '.'), + metadata: { + stack: 'hello world'.padEnd(2000, '.'), + }, + } + ); + + truncatingLogger.logging.loggingService.writeLogEntries = ( + reqOpts, + _gaxOpts + ) => { + const message = + reqOpts.entries[0].jsonPayload.fields.message.stringValue; + const stack = reqOpts.entries[0].jsonPayload.fields.metadata + .structValue!.fields!.stack.stringValue; + assert.strictEqual(stack, ''); + assert.ok(message.startsWith('hello world')); + assert.ok(message.length < 400); + }; + + await truncatingLogger.write(entry); + }); }); describe('severity shortcuts', () => { From cb8439055576d9d7c094c2f1376ec82ae4853c87 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2019 15:17:12 -0700 Subject: [PATCH 0491/1029] chore: release 5.5.1 (#610) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index f9b2fd9deb8..95d4bb37c35 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.5.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.0...v5.5.1) (2019-10-17) + + +### Bug Fixes + +* truncate additional fields set by winston/bunyan ([#609](https://www.github.com/googleapis/nodejs-logging/issues/609)) ([27ac693](https://www.github.com/googleapis/nodejs-logging/commit/27ac693ec4f9afeec412e2edddf831226f2bcc60)) + ## [5.5.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.4.1...v5.5.0) (2019-10-16) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e37fa9aaed5..e5fc69cca05 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.5.0", + "version": "5.5.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 95a9296d6df1b2fd86e04b69dafbe1dfdb43de31 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 17 Oct 2019 16:22:15 -0700 Subject: [PATCH 0492/1029] refactor: drop dependency on common-grpc (#606) --- handwritten/logging/package.json | 5 +- handwritten/logging/src/common.ts | 219 ++++++++++++++++++++++++++++ handwritten/logging/src/entry.ts | 8 +- handwritten/logging/src/index.ts | 4 +- handwritten/logging/test/common.ts | 220 +++++++++++++++++++++++++++++ handwritten/logging/test/entry.ts | 60 ++++---- handwritten/logging/test/index.ts | 9 +- handwritten/logging/test/log.ts | 2 +- handwritten/logging/test/sink.ts | 2 +- 9 files changed, 482 insertions(+), 47 deletions(-) create mode 100644 handwritten/logging/src/common.ts create mode 100644 handwritten/logging/test/common.ts diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e5fc69cca05..8a1b9a7a837 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "@google-cloud/common-grpc": "^1.0.6", + "@google-cloud/common": "^2.2.2", "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", @@ -62,9 +62,8 @@ "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^3.1.0", - "google-auth-library": "^5.2.2", "google-gax": "^1.6.3", - "is": "^3.2.1", + "is": "^3.3.0", "on-finished": "^2.3.0", "protobufjs": "^6.8.8", "pumpify": "^2.0.0", diff --git a/handwritten/logging/src/common.ts b/handwritten/logging/src/common.ts new file mode 100644 index 00000000000..451eb8c4558 --- /dev/null +++ b/handwritten/logging/src/common.ts @@ -0,0 +1,219 @@ +/*! + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as is from 'is'; + +export interface ObjectToStructConverterConfig { + removeCircular?: boolean; + stringify?: boolean; +} + +export function objToStruct(obj: {}, options: ObjectToStructConverterConfig) { + return new ObjectToStructConverter(options).convert(obj); +} + +export class ObjectToStructConverter { + seenObjects: Set<{}>; + removeCircular: boolean; + stringify?: boolean; + /** + * A class that can be used to convert an object to a struct. Optionally this + * class can be used to erase/throw on circular references during conversion. + * + * @private + * + * @param {object=} options - Configuration object. + * @param {boolean} options.removeCircular - Remove circular references in the + * object with a placeholder string. (Default: `false`) + * @param {boolean} options.stringify - Stringify un-recognized types. (Default: + * `false`) + */ + constructor(options?: ObjectToStructConverterConfig) { + options = options || {}; + this.seenObjects = new Set(); + this.removeCircular = options.removeCircular === true; + this.stringify = options.stringify === true; + } + + /** + * Begin the conversion process from a JS object to an encoded gRPC Value + * message. + * + * @param {*} value - The input value. + * @return {object} - The encoded value. + * + * @example + * ObjectToStructConverter.convert({ + * aString: 'Hi' + * }); + * // { + * // fields: { + * // aString: { + * // stringValue: 'Hello!' + * // } + * // } + * // } + */ + convert(obj: {}) { + const convertedObject = { + fields: {}, + }; + this.seenObjects.add(obj); + for (const prop in obj) { + if (Object.prototype.hasOwnProperty.call(obj, prop)) { + const value = obj[prop]; + if (is.undefined(value)) { + continue; + } + convertedObject.fields[prop] = this.encodeValue_(value); + } + } + this.seenObjects.delete(obj); + return convertedObject; + } + + /** + * Convert a raw value to a type-denoted protobuf message-friendly object. + * + * @private + * + * @param {*} value - The input value. + * @return {*} - The encoded value. + * + * @example + * ObjectToStructConverter.encodeValue('Hi'); + * // { + * // stringValue: 'Hello!' + * // } + */ + encodeValue_(value: {}) { + let convertedValue; + + if (is.null(value)) { + convertedValue = { + nullValue: 0, + }; + } else if (is.number(value)) { + convertedValue = { + numberValue: value, + }; + } else if (is.string(value)) { + convertedValue = { + stringValue: value, + }; + } else if (is.boolean(value)) { + convertedValue = { + boolValue: value, + }; + } else if (Buffer.isBuffer(value)) { + convertedValue = { + blobValue: value, + }; + } else if (is.object(value)) { + if (this.seenObjects.has(value)) { + // Circular reference. + if (!this.removeCircular) { + throw new Error( + [ + 'This object contains a circular reference. To automatically', + 'remove it, set the `removeCircular` option to true.', + ].join(' ') + ); + } + convertedValue = { + stringValue: '[Circular]', + }; + } else { + convertedValue = { + structValue: this.convert(value), + }; + } + } else if (is.array(value)) { + convertedValue = { + listValue: { + values: (value as Array<{}>).map(this.encodeValue_.bind(this)), + }, + }; + } else { + if (!this.stringify) { + throw new Error('Value of type ' + typeof value + ' not recognized.'); + } + convertedValue = { + stringValue: String(value), + }; + } + return convertedValue; + } +} + +/** + * Condense a protobuf Struct into an object of only its values. + * + * @private + * + * @param {object} struct - A protobuf Struct message. + * @return {object} - The simplified object. + * + * @example + * GrpcService.structToObj_({ + * fields: { + * name: { + * kind: 'stringValue', + * stringValue: 'Stephen' + * } + * } + * }); + * // { + * // name: 'Stephen' + * // } + */ +export function structToObj(struct) { + const convertedObject = {}; + for (const prop in struct.fields) { + if (struct.fields.hasOwnProperty(prop)) { + const value = struct.fields[prop]; + convertedObject[prop] = decodeValue(value); + } + } + + return convertedObject; +} + +/** + * Decode a protobuf Struct's value. + * + * @param {object} value - A Struct's Field message. + * @return {*} - The decoded value. + */ +export function decodeValue(value) { + switch (value.kind) { + case 'structValue': { + return structToObj(value.structValue); + } + + case 'nullValue': { + return null; + } + + case 'listValue': { + return value.listValue.values.map(decodeValue); + } + + default: { + return value[value.kind]; + } + } +} diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index a8f7c688e78..e05e9302873 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import {Service} from '@google-cloud/common-grpc'; import {Merge} from 'type-fest'; // tslint:disable-next-line variable-name const EventId = require('eventid'); import * as extend from 'extend'; import * as is from 'is'; import {google} from '../proto/logging'; +import {objToStruct, structToObj} from './common'; const eventId = new EventId(); @@ -148,8 +148,7 @@ class Entry { toJSON(options: ToJsonOptions = {}) { const entry = (extend(true, {}, this.metadata) as {}) as EntryJson; if (is.object(this.data)) { - // tslint:disable-next-line no-any - entry.jsonPayload = (Service as any).objToStruct_(this.data, { + entry.jsonPayload = objToStruct(this.data, { removeCircular: !!options.removeCircular, stringify: true, }); @@ -179,8 +178,7 @@ class Entry { static fromApiResponse_(entry: google.logging.v2.LogEntry) { let data = entry[entry.payload!]; if (entry.payload === 'jsonPayload') { - // tslint:disable-next-line no-any - data = (Service as any).structToObj_(data); + data = structToObj(data); } const serializedEntry = new Entry(entry, data); if (entry.timestamp) { diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 27e55647052..81a89d4f75f 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import * as common from '@google-cloud/common-grpc'; +import * as common from '@google-cloud/common'; import {paginator} from '@google-cloud/paginator'; import {replaceProjectIdToken} from '@google-cloud/projectify'; import {callbackifyAll} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as extend from 'extend'; -import {GoogleAuth} from 'google-auth-library'; +import {GoogleAuth} from 'google-gax'; import * as gax from 'google-gax'; import {ClientReadableStream} from 'grpc'; import {Response} from 'teeny-request'; diff --git a/handwritten/logging/test/common.ts b/handwritten/logging/test/common.ts new file mode 100644 index 00000000000..616033e0d81 --- /dev/null +++ b/handwritten/logging/test/common.ts @@ -0,0 +1,220 @@ +import { + ObjectToStructConverter, + ObjectToStructConverterConfig, +} from '../src/common'; +import * as assert from 'assert'; +const OPTIONS = { + maxRetries: 3, +} as ObjectToStructConverterConfig; + +describe('ObjectToStructConverter', () => { + let objectToStructConverter; + + beforeEach(() => { + objectToStructConverter = new ObjectToStructConverter(OPTIONS); + }); + + describe('instantiation', () => { + it('should not require an options object', () => { + assert.doesNotThrow(() => { + const x = new ObjectToStructConverter(); + }); + }); + + it('should localize an empty Set for seenObjects', () => { + assert(objectToStructConverter.seenObjects instanceof Set); + assert.strictEqual(objectToStructConverter.seenObjects.size, 0); + }); + + it('should localize options', () => { + const objectToStructConverter = new ObjectToStructConverter({ + removeCircular: true, + stringify: true, + }); + + assert.strictEqual(objectToStructConverter.removeCircular, true); + assert.strictEqual(objectToStructConverter.stringify, true); + }); + + it('should set correct defaults', () => { + assert.strictEqual(objectToStructConverter.removeCircular, false); + assert.strictEqual(objectToStructConverter.stringify, false); + }); + }); + + describe('convert', () => { + it('should encode values in an Object', () => { + const inputValue = {}; + const convertedValue = {}; + + objectToStructConverter.encodeValue_ = value => { + assert.strictEqual(value, inputValue); + return convertedValue; + }; + + const struct = objectToStructConverter.convert({ + a: inputValue, + }); + + assert.strictEqual(struct.fields.a, convertedValue); + }); + + it('should support host objects', () => { + const hostObject = {hasOwnProperty: null}; + + objectToStructConverter.encodeValue_ = () => {}; + + assert.doesNotThrow(() => { + objectToStructConverter.convert(hostObject); + }); + }); + + it('should not include undefined values', done => { + objectToStructConverter.encodeValue_ = () => { + done(new Error('Should not be called')); + }; + + const struct = objectToStructConverter.convert({ + a: undefined, + }); + + assert.deepStrictEqual(struct.fields, {}); + + done(); + }); + + it('should add seen objects to set then empty set', done => { + const obj = {}; + let objectAdded; + + objectToStructConverter.seenObjects = { + add(obj) { + objectAdded = obj; + }, + delete(obj_) { + assert.strictEqual(obj_, obj); + assert.strictEqual(objectAdded, obj); + done(); + }, + }; + + objectToStructConverter.convert(obj); + }); + }); + + describe('encodeValue_', () => { + it('should convert primitive values correctly', () => { + const buffer = Buffer.from('Value'); + + assert.deepStrictEqual(objectToStructConverter.encodeValue_(null), { + nullValue: 0, + }); + + assert.deepStrictEqual(objectToStructConverter.encodeValue_(1), { + numberValue: 1, + }); + + assert.deepStrictEqual(objectToStructConverter.encodeValue_('Hi'), { + stringValue: 'Hi', + }); + + assert.deepStrictEqual(objectToStructConverter.encodeValue_(true), { + boolValue: true, + }); + + assert.strictEqual( + objectToStructConverter.encodeValue_(buffer).blobValue.toString(), + 'Value' + ); + }); + + it('should convert arrays', () => { + const convertedValue = objectToStructConverter.encodeValue_([1, 2, 3]); + + assert.deepStrictEqual(convertedValue.listValue, { + values: [ + objectToStructConverter.encodeValue_(1), + objectToStructConverter.encodeValue_(2), + objectToStructConverter.encodeValue_(3), + ], + }); + }); + + it('should throw if a type is not recognized', () => { + assert.throws(() => { + objectToStructConverter.encodeValue_(); + }, /Value of type undefined not recognized./); + }); + + describe('objects', () => { + const VALUE: {circularReference?: {}} = {}; + VALUE.circularReference = VALUE; + + it('should convert objects', () => { + const convertedValue = {}; + + objectToStructConverter.convert = value => { + assert.strictEqual(value, VALUE); + return convertedValue; + }; + + assert.deepStrictEqual(objectToStructConverter.encodeValue_(VALUE), { + structValue: convertedValue, + }); + }); + + describe('circular references', () => { + it('should throw if circular', () => { + const errorMessage = [ + 'This object contains a circular reference. To automatically', + 'remove it, set the `removeCircular` option to true.', + ].join(' '); + + objectToStructConverter.seenObjects.add(VALUE); + + assert.throws(() => { + objectToStructConverter.encodeValue_(VALUE); + }, new RegExp(errorMessage)); + }); + + describe('options.removeCircular', () => { + let objectToStructConverter; + + beforeEach(() => { + objectToStructConverter = new ObjectToStructConverter({ + removeCircular: true, + }); + + objectToStructConverter.seenObjects.add(VALUE); + }); + + it('should replace circular reference with [Circular]', () => { + assert.deepStrictEqual( + objectToStructConverter.encodeValue_(VALUE), + {stringValue: '[Circular]'} + ); + }); + }); + }); + }); + + describe('options.stringify', () => { + let objectToStructConverter; + + beforeEach(() => { + objectToStructConverter = new ObjectToStructConverter({ + stringify: true, + }); + }); + + it('should return a string if the value is not recognized', () => { + const date = new Date(); + + assert.deepStrictEqual( + objectToStructConverter.encodeValue_(date, OPTIONS), + {stringValue: String(date)} + ); + }); + }); + }); +}); diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 1213326c3c1..b3a41572bde 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -14,17 +14,12 @@ * limitations under the License. */ -import {Service, util} from '@google-cloud/common-grpc'; +import {util} from '@google-cloud/common'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; -import * as sinon from 'sinon'; import * as entryTypes from '../src/entry'; - -class FakeGrpcService { - static structToObj_?: Function; - static objToStruct_?: Function; -} +import * as common from '../src/common'; let fakeEventIdNewOverride: Function | null; @@ -34,6 +29,15 @@ class FakeEventId { } } +let fakeObjToStruct: Function | null; +let fakeStructToObj: Function | null; +const objToStruct = (obj, opts) => { + return (fakeObjToStruct || common.objToStruct)(obj, opts); +}; +const structToObj = struct => { + return (fakeStructToObj || common.structToObj)(struct); +}; + describe('Entry', () => { // tslint:disable-next-line no-any variable-name let Entry: typeof entryTypes.Entry; @@ -41,12 +45,12 @@ describe('Entry', () => { const METADATA = {}; const DATA = {}; - const sandbox = sinon.createSandbox(); before(() => { Entry = proxyquire('../src/entry.js', { - '@google-cloud/common-grpc': { - Service: FakeGrpcService, + './common': { + objToStruct, + structToObj, }, eventid: FakeEventId, }).Entry; @@ -54,11 +58,13 @@ describe('Entry', () => { beforeEach(() => { fakeEventIdNewOverride = null; - extend(FakeGrpcService, Service); entry = new Entry(METADATA, DATA); }); - afterEach(() => sandbox.restore()); + afterEach(() => { + fakeObjToStruct = null; + fakeStructToObj = null; + }); describe('instantiation', () => { it('should assign timestamp to metadata', () => { @@ -107,7 +113,7 @@ describe('Entry', () => { beforeEach(() => { const seconds = date.getTime() / 1000; const secondsRounded = Math.floor(seconds); - FakeGrpcService.structToObj_ = data => data; + fakeStructToObj = data => data; entry = Entry.fromApiResponse_({ resource: RESOURCE, payload: 'jsonPayload', @@ -160,7 +166,7 @@ describe('Entry', () => { describe('toJSON', () => { beforeEach(() => { - FakeGrpcService.objToStruct_ = util.noop; + fakeObjToStruct = util.noop; }); it('should not modify the original instance', () => { @@ -174,16 +180,14 @@ describe('Entry', () => { const input = {}; const converted = {}; - sandbox - .stub(FakeGrpcService, 'objToStruct_') - .callsFake((obj, options) => { - assert.strictEqual(obj, input); - assert.deepStrictEqual(options, { - removeCircular: false, - stringify: true, - }); - return converted; + fakeObjToStruct = (obj, options) => { + assert.strictEqual(obj, input); + assert.deepStrictEqual(options, { + removeCircular: false, + stringify: true, }); + return converted; + }; entry.data = input; const json = entry.toJSON(); @@ -191,12 +195,10 @@ describe('Entry', () => { }); it('should pass removeCircular to objToStruct_', done => { - sandbox - .stub(FakeGrpcService, 'objToStruct_') - .callsFake((obj, options) => { - assert.strictEqual(options.removeCircular, true); - done(); - }); + fakeObjToStruct = (obj, options) => { + assert.strictEqual(options.removeCircular, true); + done(); + }; entry.data = {}; entry.toJSON({removeCircular: true}); }); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 459253f6197..b3b353c786c 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import {util} from '@google-cloud/common-grpc'; +import {util} from '@google-cloud/common'; import {CallbackifyAllOptions} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as assert from 'assert'; @@ -23,9 +23,6 @@ import * as proxyquire from 'proxyquire'; import * as through from 'through2'; import {Logging as LOGGING} from '../src/index'; -import {GetEntriesCallback} from '../src/index'; -import {getOrInjectContext} from '../src/middleware/context'; - const {v2} = require('../src'); const PKG = require('../../package.json'); @@ -117,13 +114,13 @@ describe('Logging', () => { before(() => { Logging = proxyquire('../../', { - '@google-cloud/common-grpc': { + '@google-cloud/common': { util: fakeUtil, }, '@google-cloud/promisify': fakeCallbackify, '@google-cloud/paginator': fakePaginator, '@google-cloud/projectify': fakeProjectify, - 'google-auth-library': { + 'google-gax': { GoogleAuth: fakeGoogleAuth, }, './log': {Log: FakeLog}, diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index dfa94eecdbe..50b466224ac 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import {util} from '@google-cloud/common-grpc'; +import {util} from '@google-cloud/common'; import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index 4babdcfc21d..2b206bee706 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import {util} from '@google-cloud/common-grpc'; +import {util} from '@google-cloud/common'; import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; From df6374484562b512abae1d584ed00e08fc14aee2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 18 Oct 2019 02:22:35 +0300 Subject: [PATCH 0493/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.18 (#605) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8a1b9a7a837..966a0f129c6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@opencensus/propagation-stackdriver": "0.0.17", + "@opencensus/propagation-stackdriver": "0.0.18", "arrify": "^2.0.0", "dot-prop": "^5.1.0", "eventid": "^0.1.2", From 5e9e1718ffb94dbc721d120768cfc2ea04705901 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2019 16:37:09 -0700 Subject: [PATCH 0494/1029] chore: release 5.5.2 (#611) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 95d4bb37c35..6355caf9db7 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.5.2](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.1...v5.5.2) (2019-10-17) + + +### Bug Fixes + +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.18 ([#605](https://www.github.com/googleapis/nodejs-logging/issues/605)) ([0dac747](https://www.github.com/googleapis/nodejs-logging/commit/0dac747ac18484d54d2d33dbd7424b2c0294dbb9)) + ### [5.5.1](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.0...v5.5.1) (2019-10-17) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 966a0f129c6..128ac037200 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.5.1", + "version": "5.5.2", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 828aad23c6f8fe5bf3dec8c6eac0350e8278fac9 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 18 Oct 2019 20:01:34 +0300 Subject: [PATCH 0495/1029] fix(deps): update dependency @google-cloud/storage to v4 (#613) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 128ac037200..cbe0385cac8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -77,7 +77,7 @@ "@google-cloud/bigquery": "^4.0.0", "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^1.0.0", - "@google-cloud/storage": "^3.0.4", + "@google-cloud/storage": "^4.0.0", "@types/extend": "^3.0.0", "@types/is": "0.0.21", "@types/mocha": "^5.2.5", From d028dc40ddb71fcc09278e58f10f4e8e0f67d477 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 18 Oct 2019 13:28:30 -0700 Subject: [PATCH 0496/1029] refactor: reduce common dependency (#612) --- handwritten/logging/package.json | 3 -- handwritten/logging/src/index.ts | 23 +++++++------ handwritten/logging/src/log.ts | 10 +++--- handwritten/logging/system-test/logging.ts | 14 ++------ handwritten/logging/test/common.ts | 16 +++++++++ handwritten/logging/test/entry.ts | 5 ++- handwritten/logging/test/index.ts | 39 +++++++++++----------- handwritten/logging/test/log.ts | 13 ++++---- handwritten/logging/test/sink.ts | 9 +++-- 9 files changed, 68 insertions(+), 64 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cbe0385cac8..831bf52e38f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,13 +69,11 @@ "pumpify": "^2.0.0", "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", - "teeny-request": "^5.2.1", "through2": "^3.0.0", "type-fest": "^0.8.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^1.0.0", "@google-cloud/storage": "^4.0.0", "@types/extend": "^3.0.0", @@ -98,7 +96,6 @@ "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", "google-proto-files": "^1.0.0", - "grpc": "^1.22.2", "gts": "^1.0.0", "http2spy": "^1.1.0", "intelli-espower-loader": "^1.0.1", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 81a89d4f75f..99b7f7a14dd 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -14,16 +14,14 @@ * limitations under the License. */ -import * as common from '@google-cloud/common'; +import {util} from '@google-cloud/common'; import {paginator} from '@google-cloud/paginator'; import {replaceProjectIdToken} from '@google-cloud/projectify'; import {callbackifyAll} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as extend from 'extend'; -import {GoogleAuth} from 'google-gax'; import * as gax from 'google-gax'; -import {ClientReadableStream} from 'grpc'; -import {Response} from 'teeny-request'; +import {ClientReadableStream} from '@grpc/grpc-js'; const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; @@ -50,7 +48,6 @@ import { } from './log'; import {Sink} from './sink'; import {Duplex} from 'stream'; -import {AbortableDuplex} from '@google-cloud/common'; import {google} from '../proto/logging'; import {google as google_config} from '../proto/logging_config'; @@ -72,6 +69,10 @@ export type DeleteResponse = google.protobuf.Empty; export type LogSink = google_config.logging.v2.ILogSink; +export interface AbortableDuplex extends Duplex { + abort(): void; +} + export interface CreateSinkRequest { // destination: Bucket|Dataset|Topic|string; // tslint:disable-next-line no-any @@ -84,7 +85,7 @@ export interface CreateSinkRequest { } export interface CreateSinkCallback { - (err: Error | null, sink?: Sink | null, resp?: LogSink | Response): void; + (err: Error | null, sink?: Sink | null, resp?: LogSink): void; } export type GetEntriesResponse = [ @@ -237,7 +238,7 @@ export interface ServiceContext { */ class Logging { api: {[key: string]: gax.ClientStub}; - auth: GoogleAuth; + auth: gax.GoogleAuth; options: LoggingOptions; projectId: string; detectedResource?: object; @@ -269,7 +270,7 @@ class Logging { options ); this.api = {}; - this.auth = new GoogleAuth(options_); + this.auth = new gax.GoogleAuth(options_); this.options = options_; this.projectId = this.options.projectId || '{{projectId}}'; this.configService = new v2.ConfigServiceV2Client(this.options); @@ -370,13 +371,13 @@ class Logging { if (typeof config !== 'object') { throw new Error('A sink configuration object must be provided.'); } - if (common.util.isCustomType(config.destination, 'bigquery/dataset')) { + if (util.isCustomType(config.destination, 'bigquery/dataset')) { await this.setAclForDataset_(config); } - if (common.util.isCustomType(config.destination, 'pubsub/topic')) { + if (util.isCustomType(config.destination, 'pubsub/topic')) { await this.setAclForTopic_(config); } - if (common.util.isCustomType(config.destination, 'storage/bucket')) { + if (util.isCustomType(config.destination, 'storage/bucket')) { await this.setAclForBucket_(config); } const reqOpts = { diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index b2fa77429ff..6891d0df596 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -15,13 +15,10 @@ */ import arrify = require('arrify'); -import {DeleteCallback} from '@google-cloud/common'; import {callbackifyAll} from '@google-cloud/promisify'; import * as dotProp from 'dot-prop'; import * as extend from 'extend'; import {CallOptions} from 'google-gax'; -import {Response} from 'teeny-request'; - import {google} from '../proto/logging'; import {GetEntriesCallback, GetEntriesResponse, Logging} from '.'; @@ -48,10 +45,13 @@ export interface LogOptions { maxEntrySize?: number; // see: https://cloud.google.com/logging/quotas } -export type ApiResponse = [Response]; +// tslint:disable-next-line no-any +export type Metadata = any; +export type ApiResponse = [Metadata]; export interface ApiResponseCallback { - (err: Error | null, apiResponse?: Response): void; + (err: Error | null, apiResponse?: Metadata): void; } +export type DeleteCallback = ApiResponseCallback; export type MonitoredResource = google.api.IMonitoredResource; export interface WriteOptions { diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index b910167b1c3..01bd47684ea 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -14,12 +14,7 @@ * limitations under the License. */ -if (process.env.GOOGLE_CLOUD_USE_GRPC_JS) { - process.exit(0); -} - import {BigQuery} from '@google-cloud/bigquery'; -import {ServiceObject} from '@google-cloud/common'; import {PubSub} from '@google-cloud/pubsub'; import {Storage} from '@google-cloud/storage'; import * as assert from 'assert'; @@ -105,17 +100,14 @@ describe('Logging', () => { const [objects] = await method(); return Promise.all( objects - .filter((o: ServiceObject) => { - // tslint:disable-next-line no-any - const name = (o as any).name || o.id; - + .filter(o => { + const name = o.name || o.id; if (!name.startsWith(TESTS_PREFIX)) { return false; } - return getDateFromGeneratedName(name) < oneHourAgo; }) - .map((o: ServiceObject) => o.delete()) + .map(o => o.delete()) ); } }); diff --git a/handwritten/logging/test/common.ts b/handwritten/logging/test/common.ts index 616033e0d81..d8db993ee96 100644 --- a/handwritten/logging/test/common.ts +++ b/handwritten/logging/test/common.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { ObjectToStructConverter, ObjectToStructConverterConfig, diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index b3a41572bde..c2c10f28452 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import {util} from '@google-cloud/common'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; @@ -25,7 +24,7 @@ let fakeEventIdNewOverride: Function | null; class FakeEventId { new() { - return (fakeEventIdNewOverride || util.noop).apply(null, arguments); + return (fakeEventIdNewOverride || (() => {})).apply(null, arguments); } } @@ -166,7 +165,7 @@ describe('Entry', () => { describe('toJSON', () => { beforeEach(() => { - fakeObjToStruct = util.noop; + fakeObjToStruct = () => {}; }); it('should not modify the original instance', () => { diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index b3b353c786c..e15481df091 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -26,6 +26,7 @@ import {Logging as LOGGING} from '../src/index'; const {v2} = require('../src'); const PKG = require('../../package.json'); +const noop = () => {}; let extended = false; const fakePaginator = { paginator: { @@ -45,7 +46,7 @@ const fakePaginator = { let googleAuthOverride: Function | null; function fakeGoogleAuth() { - return (googleAuthOverride || util.noop).apply(null, arguments); + return (googleAuthOverride || noop).apply(null, arguments); } let isCustomTypeOverride: Function | null; @@ -236,14 +237,14 @@ describe('Logging', () => { it('should throw if a name is not provided', () => { const error = new Error('A sink name must be provided.'); - logging.createSink().then(util.noop, err => { + logging.createSink().then(noop, err => { assert.deepStrictEqual(err, error); }); }); it('should throw if a config object is not provided', () => { const error = new Error('A sink configuration object must be provided.'); - logging.createSink(SINK_NAME).then(util.noop, err => { + logging.createSink(SINK_NAME).then(noop, err => { assert.deepStrictEqual(err, error); }); }); @@ -360,7 +361,7 @@ describe('Logging', () => { logging .createSink(SINK_NAME, {}) - .then(util.noop, err => assert.deepStrictEqual(err, error)); + .then(noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -512,9 +513,7 @@ describe('Logging', () => { }); it('should reject promise with error', () => { - logging - .getEntries() - .then(util.noop, err => assert.strictEqual(err, error)); + logging.getEntries().then(noop, err => assert.strictEqual(err, error)); }); }); @@ -772,7 +771,7 @@ describe('Logging', () => { }; logging .getSinks(OPTIONS) - .then(util.noop, err => assert.strictEqual(err, error)); + .then(noop, err => assert.strictEqual(err, error)); }); }); @@ -954,7 +953,7 @@ describe('Logging', () => { }; logging.api[CONFIG.client] = { - [CONFIG.method]: util.noop, + [CONFIG.method]: noop, }; }); @@ -990,7 +989,7 @@ describe('Logging', () => { it('should initiate and cache the client', () => { const fakeClient = { - [CONFIG.method]: util.noop, + [CONFIG.method]: noop, }; fakeV2[CONFIG.client] = class { constructor(options) { @@ -1029,7 +1028,7 @@ describe('Logging', () => { setImmediate(done); - return util.noop; + return noop; }, }; @@ -1061,7 +1060,7 @@ describe('Logging', () => { setImmediate(done); - return util.noop; + return noop; }, }; @@ -1198,7 +1197,7 @@ describe('Logging', () => { name: 'bucket-name', acl: { owners: { - addGroup: util.noop, + addGroup: noop, }, }, }; @@ -1228,7 +1227,7 @@ describe('Logging', () => { it('should return error', () => { logging .setAclForBucket_(CONFIG) - .then(util.noop, err => assert.deepStrictEqual(err, error)); + .then(noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -1278,7 +1277,7 @@ describe('Logging', () => { it('should reject with error', () => { logging .setAclForDataset_(CONFIG) - .then(util.noop, err => assert.deepStrictEqual(err, error)); + .then(noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -1326,7 +1325,7 @@ describe('Logging', () => { it('should reject with error', () => { logging .setAclForDataset_(CONFIG) - .then(util.noop, err => assert.deepStrictEqual(err, error)); + .then(noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -1361,8 +1360,8 @@ describe('Logging', () => { topic = { name: 'topic-name', iam: { - getPolicy: util.noop, - setPolicy: util.noop, + getPolicy: noop, + setPolicy: noop, }, }; @@ -1385,7 +1384,7 @@ describe('Logging', () => { it('should throw error', () => { logging .setAclForTopic_(CONFIG) - .then(util.noop, err => assert.deepStrictEqual(err, error)); + .then(noop, err => assert.deepStrictEqual(err, error)); }); }); @@ -1433,7 +1432,7 @@ describe('Logging', () => { it('should throw error', () => { logging .setAclForTopic_(CONFIG) - .then(util.noop, err => assert.deepStrictEqual(err, error)); + .then(noop, err => assert.deepStrictEqual(err, error)); }); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 50b466224ac..5eb24db7376 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -14,12 +14,13 @@ * limitations under the License. */ -import {util} from '@google-cloud/common'; import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; +const noop = () => {}; + let callbackified = false; const fakeCallbackify = extend({}, callbackify, { callbackifyAll(c: Function, options: callbackify.CallbackifyAllOptions) { @@ -85,10 +86,10 @@ describe('Log', () => { LOGGING = { projectId: '{{project-id}}', - entry: util.noop, - request: util.noop, - loggingService: util.noop, - auth: util.noop, + entry: noop, + request: noop, + loggingService: noop, + auth: noop, }; const options: LogOptions = {}; @@ -534,7 +535,7 @@ describe('Log', () => { const LABELS = []; beforeEach(() => { - log.write = util.noop; + log.write = noop; }); describe('alert', () => { diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index 2b206bee706..b872943b060 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import {util} from '@google-cloud/common'; import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; @@ -37,10 +36,10 @@ describe('Sink', () => { const PROJECT_ID = 'project-id'; const LOGGING = { - createSink: util.noop, + createSink: () => {}, projectId: '{{projectId}}', - auth: util.noop, - configService: util.noop, + auth: () => {}, + configService: () => {}, }; const SINK_NAME = 'sink-name'; @@ -210,7 +209,7 @@ describe('Sink', () => { sink .setMetadata(METADATA) - .then(util.noop, err => assert.strictEqual(err, error)); + .then(() => {}, err => assert.strictEqual(err, error)); }); it('should execute gax method', async () => { From 08f5cb28c9e02a8ff9e9794aa7fae6dec8c27ac9 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 21 Oct 2019 17:59:52 -0700 Subject: [PATCH 0497/1029] fix(deps): bump google-gax to 1.7.5 (#616) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 831bf52e38f..7018c793a48 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^3.1.0", - "google-gax": "^1.6.3", + "google-gax": "^1.7.5", "is": "^3.3.0", "on-finished": "^2.3.0", "protobufjs": "^6.8.8", From 456f5d79be41f9ddcd60f9d486f6f81dca558c94 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2019 12:11:18 -0700 Subject: [PATCH 0498/1029] chore: release 5.5.3 (#614) --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 6355caf9db7..dd6aa6ef8c1 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.5.3](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.2...v5.5.3) (2019-10-22) + + +### Bug Fixes + +* **deps:** bump google-gax to 1.7.5 ([#616](https://www.github.com/googleapis/nodejs-logging/issues/616)) ([5d73a06](https://www.github.com/googleapis/nodejs-logging/commit/5d73a06083552db6aa03be4e6cb5f1de97620eec)) +* **deps:** update dependency @google-cloud/storage to v4 ([#613](https://www.github.com/googleapis/nodejs-logging/issues/613)) ([4ec4f18](https://www.github.com/googleapis/nodejs-logging/commit/4ec4f18a3e07b798882e5f17e642fae5d9f68912)) + ### [5.5.2](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.1...v5.5.2) (2019-10-17) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7018c793a48..aca7d4092e4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.5.2", + "version": "5.5.3", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 8bed9cbc8a26fbe8eeb137bc276b97b39c694c10 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 24 Oct 2019 10:52:28 -0700 Subject: [PATCH 0499/1029] refactor: improve types towards noImplicitAny (#615) --- handwritten/logging/package.json | 1 - handwritten/logging/src/common.ts | 22 ++- handwritten/logging/test/common.ts | 33 ++-- handwritten/logging/test/entry.ts | 13 +- handwritten/logging/test/log.ts | 215 +++++++++++++++++---------- handwritten/logging/test/metadata.ts | 16 +- handwritten/logging/test/sink.ts | 125 ++++++++-------- 7 files changed, 246 insertions(+), 179 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index aca7d4092e4..ff9193fe3c6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -89,7 +89,6 @@ "@types/uuid": "^3.4.4", "assert-rejects": "^1.0.0", "bignumber.js": "^9.0.0", - "chai": "^4.2.0", "codecov": "^3.0.4", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", diff --git a/handwritten/logging/src/common.ts b/handwritten/logging/src/common.ts index 451eb8c4558..78f56ebbc00 100644 --- a/handwritten/logging/src/common.ts +++ b/handwritten/logging/src/common.ts @@ -67,7 +67,8 @@ export class ObjectToStructConverter { * // } * // } */ - convert(obj: {}) { + // tslint:disable-next-line no-any + convert(obj: any) { const convertedObject = { fields: {}, }; @@ -78,7 +79,8 @@ export class ObjectToStructConverter { if (is.undefined(value)) { continue; } - convertedObject.fields[prop] = this.encodeValue_(value); + // tslint:disable-next-line no-any + (convertedObject as any).fields[prop] = this.encodeValue_(value); } } this.seenObjects.delete(obj); @@ -99,7 +101,8 @@ export class ObjectToStructConverter { * // stringValue: 'Hello!' * // } */ - encodeValue_(value: {}) { + // tslint:disable-next-line no-any + encodeValue_(value: {} | null): any { let convertedValue; if (is.null(value)) { @@ -123,7 +126,7 @@ export class ObjectToStructConverter { blobValue: value, }; } else if (is.object(value)) { - if (this.seenObjects.has(value)) { + if (this.seenObjects.has(value!)) { // Circular reference. if (!this.removeCircular) { throw new Error( @@ -138,7 +141,7 @@ export class ObjectToStructConverter { }; } else { convertedValue = { - structValue: this.convert(value), + structValue: this.convert(value!), }; } } else if (is.array(value)) { @@ -180,8 +183,10 @@ export class ObjectToStructConverter { * // name: 'Stephen' * // } */ -export function structToObj(struct) { - const convertedObject = {}; +// tslint:disable-next-line no-any +export function structToObj(struct: any) { + // tslint:disable-next-line no-any + const convertedObject = {} as any; for (const prop in struct.fields) { if (struct.fields.hasOwnProperty(prop)) { const value = struct.fields[prop]; @@ -198,7 +203,8 @@ export function structToObj(struct) { * @param {object} value - A Struct's Field message. * @return {*} - The decoded value. */ -export function decodeValue(value) { +// tslint:disable-next-line no-any +export function decodeValue(value: any) { switch (value.kind) { case 'structValue': { return structToObj(value.structValue); diff --git a/handwritten/logging/test/common.ts b/handwritten/logging/test/common.ts index d8db993ee96..36add787fd4 100644 --- a/handwritten/logging/test/common.ts +++ b/handwritten/logging/test/common.ts @@ -24,7 +24,7 @@ const OPTIONS = { } as ObjectToStructConverterConfig; describe('ObjectToStructConverter', () => { - let objectToStructConverter; + let objectToStructConverter: ObjectToStructConverter; beforeEach(() => { objectToStructConverter = new ObjectToStructConverter(OPTIONS); @@ -68,7 +68,8 @@ describe('ObjectToStructConverter', () => { return convertedValue; }; - const struct = objectToStructConverter.convert({ + // tslint:disable-next-line no-any + const struct: any = objectToStructConverter.convert({ a: inputValue, }); @@ -101,13 +102,14 @@ describe('ObjectToStructConverter', () => { it('should add seen objects to set then empty set', done => { const obj = {}; - let objectAdded; + let objectAdded: {}; - objectToStructConverter.seenObjects = { - add(obj) { + // tslint:disable-next-line no-any + (objectToStructConverter as any).seenObjects = { + add(obj: {}) { objectAdded = obj; }, - delete(obj_) { + delete(obj_: {}) { assert.strictEqual(obj_, obj); assert.strictEqual(objectAdded, obj); done(); @@ -158,7 +160,8 @@ describe('ObjectToStructConverter', () => { it('should throw if a type is not recognized', () => { assert.throws(() => { - objectToStructConverter.encodeValue_(); + // tslint:disable-next-line no-any + (objectToStructConverter as any).encodeValue_(); }, /Value of type undefined not recognized./); }); @@ -168,10 +171,10 @@ describe('ObjectToStructConverter', () => { it('should convert objects', () => { const convertedValue = {}; - objectToStructConverter.convert = value => { assert.strictEqual(value, VALUE); - return convertedValue; + // tslint:disable-next-line no-any + return convertedValue as any; }; assert.deepStrictEqual(objectToStructConverter.encodeValue_(VALUE), { @@ -194,7 +197,7 @@ describe('ObjectToStructConverter', () => { }); describe('options.removeCircular', () => { - let objectToStructConverter; + let objectToStructConverter: ObjectToStructConverter; beforeEach(() => { objectToStructConverter = new ObjectToStructConverter({ @@ -215,7 +218,7 @@ describe('ObjectToStructConverter', () => { }); describe('options.stringify', () => { - let objectToStructConverter; + let objectToStructConverter: ObjectToStructConverter; beforeEach(() => { objectToStructConverter = new ObjectToStructConverter({ @@ -225,11 +228,9 @@ describe('ObjectToStructConverter', () => { it('should return a string if the value is not recognized', () => { const date = new Date(); - - assert.deepStrictEqual( - objectToStructConverter.encodeValue_(date, OPTIONS), - {stringValue: String(date)} - ); + assert.deepStrictEqual(objectToStructConverter.encodeValue_(date), { + stringValue: String(date), + }); }); }); }); diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index c2c10f28452..caef19c42f1 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -30,10 +30,10 @@ class FakeEventId { let fakeObjToStruct: Function | null; let fakeStructToObj: Function | null; -const objToStruct = (obj, opts) => { +const objToStruct = (obj: {}, opts: {}) => { return (fakeObjToStruct || common.objToStruct)(obj, opts); }; -const structToObj = struct => { +const structToObj = (struct: {}) => { return (fakeStructToObj || common.structToObj)(struct); }; @@ -112,7 +112,7 @@ describe('Entry', () => { beforeEach(() => { const seconds = date.getTime() / 1000; const secondsRounded = Math.floor(seconds); - fakeStructToObj = data => data; + fakeStructToObj = (data: {}) => data; entry = Entry.fromApiResponse_({ resource: RESOURCE, payload: 'jsonPayload', @@ -179,7 +179,7 @@ describe('Entry', () => { const input = {}; const converted = {}; - fakeObjToStruct = (obj, options) => { + fakeObjToStruct = (obj: {}, options: {}) => { assert.strictEqual(obj, input); assert.deepStrictEqual(options, { removeCircular: false, @@ -194,7 +194,10 @@ describe('Entry', () => { }); it('should pass removeCircular to objToStruct_', done => { - fakeObjToStruct = (obj, options) => { + fakeObjToStruct = ( + obj: {}, + options: common.ObjectToStructConverterConfig + ) => { assert.strictEqual(options.removeCircular, true); done(); }; diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 5eb24db7376..a7df1ff51cf 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -18,6 +18,8 @@ import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; +import {Log as LOG, WriteOptions, GetEntriesRequest} from '../src/log'; +import {Logging} from '../src/index'; const noop = () => {}; @@ -33,7 +35,7 @@ const fakeCallbackify = extend({}, callbackify, { }); import {Entry} from '../src'; -import {EntryJson} from '../src/entry'; +import {EntryJson, LogEntry} from '../src/entry'; import {LogOptions} from '../src/log'; const originalGetDefaultResource = async () => { @@ -45,9 +47,10 @@ const fakeMetadata = { }; describe('Log', () => { - // tslint:disable-next-line no-any variable-name - let Log: any; - let log; + // tslint:disable-next-line variable-name + let Log: typeof LOG; + // tslint:disable-next-line no-any + let log: any; const PROJECT_ID = 'project-id'; const LOG_NAME = 'escaping/required/for/this/log-name'; @@ -59,7 +62,7 @@ describe('Log', () => { LOG_NAME_ENCODED, ].join('/'); - let LOGGING; + let LOGGING: Logging; let assignSeverityToEntriesOverride: Function | null = null; @@ -84,13 +87,13 @@ describe('Log', () => { function createLogger(maxEntrySize?: number) { assignSeverityToEntriesOverride = null; - LOGGING = { + LOGGING = ({ projectId: '{{project-id}}', entry: noop, request: noop, loggingService: noop, auth: noop, - }; + } as {}) as Logging; const options: LogOptions = {}; if (maxEntrySize) { @@ -145,7 +148,11 @@ describe('Log', () => { describe('assignSeverityToEntries_', () => { const circular = {} as {circular: {}}; circular.circular = circular; - const ENTRIES = [{data: {a: 'b'}}, {data: {c: 'd'}}, {data: {e: circular}}]; + const ENTRIES = [ + {data: {a: 'b'}}, + {data: {c: 'd'}}, + {data: {e: circular}}, + ] as Entry[]; const SEVERITY = 'severity'; it('should assign severity to a single entry', () => { @@ -204,7 +211,10 @@ describe('Log', () => { }); it('should execute gax method', async () => { - log.logging.loggingService.deleteLog = async (reqOpts, gaxOpts) => { + log.logging.loggingService.deleteLog = async ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { logName: log.formattedName_, }); @@ -218,7 +228,10 @@ describe('Log', () => { it('should accept gaxOptions', async () => { const gaxOptions = {}; - log.logging.loggingService.deleteLog = async (reqOpts, gaxOpts) => { + log.logging.loggingService.deleteLog = async ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.strictEqual(gaxOpts, gaxOptions); }; @@ -230,12 +243,12 @@ describe('Log', () => { it('should return an entry from Logging', () => { const metadata = { val: true, - }; + } as LogEntry; const data = {}; const entryObject = {}; - log.logging.entry = (metadata_, data_) => { + log.logging.entry = (metadata_: {}, data_: {}) => { assert.deepStrictEqual(metadata_, metadata); assert.strictEqual(data_, data); return entryObject; @@ -247,12 +260,10 @@ describe('Log', () => { it('should assume one argument means data', done => { const data = {}; - - log.logging.entry = (metadata, data_) => { + log.logging.entry = (metadata: {}, data_: {}) => { assert.strictEqual(data_, data); done(); }; - log.entry(data); }); }); @@ -267,10 +278,9 @@ describe('Log', () => { }; it('should call Logging getEntries with defaults', async () => { - log.logging.getEntries = options => { + log.logging.getEntries = (options: GetEntriesRequest) => { assert.deepStrictEqual(options, EXPECTED_OPTIONS); }; - await log.getEntries(); }); @@ -285,7 +295,7 @@ describe('Log', () => { const expectedOptions = extend({}, options); expectedOptions.filter = `(${options.filter}) AND logName="${log.formattedName_}"`; - log.logging.getEntries = options_ => { + log.logging.getEntries = (options_: {}) => { assert.notDeepStrictEqual(options_, options); assert.deepStrictEqual(options_, expectedOptions); }; @@ -301,7 +311,7 @@ describe('Log', () => { }; it('should call Logging getEntriesStream with defaults', done => { - log.logging.getEntriesStream = options => { + log.logging.getEntriesStream = (options: {}) => { assert.deepStrictEqual(options, EXPECTED_OPTIONS); setImmediate(done); return fakeStream; @@ -317,7 +327,7 @@ describe('Log', () => { filter: 'custom filter', }; - log.logging.getEntriesStream = options_ => { + log.logging.getEntriesStream = (options_: {}) => { assert.deepStrictEqual(options_, extend({}, EXPECTED_OPTIONS, options)); setImmediate(done); return fakeStream; @@ -329,14 +339,12 @@ describe('Log', () => { }); describe('write', () => { - const ENTRY = {}; + const ENTRY = {} as Entry; const OPTIONS = {}; const FAKE_RESOURCE = 'fake-resource'; beforeEach(() => { - log.decorateEntries_ = entries => { - return entries; - }; + log.decorateEntries_ = (entries: Entry[]) => entries; fakeMetadata.getDefaultResource = async () => { return FAKE_RESOURCE; }; @@ -347,9 +355,12 @@ describe('Log', () => { const CUSTOM_RESOURCE = 'custom-resource'; const optionsWithResource = extend({}, OPTIONS, { resource: CUSTOM_RESOURCE, - }); + }) as WriteOptions; - log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + log.logging.loggingService.writeLogEntries = ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { logName: log.formattedName_, entries: [ENTRY], @@ -364,29 +375,27 @@ describe('Log', () => { it('should cache a detected resource', async () => { const fakeResource = 'test-level-fake-resource'; - fakeMetadata.getDefaultResource = async () => { return fakeResource; }; - - log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + log.logging.loggingService.writeLogEntries = () => { assert.strictEqual(log.logging.detectedResource, fakeResource); }; - await log.write(ENTRY); }); it('should re-use detected resource', async () => { log.logging.detectedResource = 'environment-default-resource'; - fakeMetadata.getDefaultResource = () => { throw new Error('Cached resource was not used.'); }; - - log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + // tslint:disable-next-line no-any + log.logging.loggingService.writeLogEntries = ( + // tslint:disable-next-line no-any + reqOpts: any + ) => { assert.strictEqual(reqOpts.resource, log.logging.detectedResource); }; - await log.write(ENTRY); }); @@ -405,7 +414,10 @@ describe('Log', () => { resource: CUSTOM_RESOURCE, }); - log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + log.logging.loggingService.writeLogEntries = ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { logName: log.formattedName_, entries: [ENTRY], @@ -419,7 +431,10 @@ describe('Log', () => { }); it('should call gax method', async () => { - log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + log.logging.loggingService.writeLogEntries = ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { logName: log.formattedName_, entries: [ENTRY], @@ -433,14 +448,19 @@ describe('Log', () => { }); it('should arrify & decorate the entries', async () => { - const decoratedEntries = []; + const decoratedEntries = [] as Entry[]; - log.decorateEntries_ = entries => { + log.decorateEntries_ = (entries: Entry[]) => { assert.strictEqual(entries[0], ENTRY); return decoratedEntries; }; - log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => { + // tslint:disable-next-line no-any + log.logging.loggingService.writeLogEntries = ( + // tslint:disable-next-line no-any + reqOpts: any, + gaxOpts: {} + ) => { assert.strictEqual(reqOpts.entries, decoratedEntries); }; @@ -448,7 +468,10 @@ describe('Log', () => { }); it('should not require options', async () => { - log.logging.loggingService.writeLogEntries = (reqOpts, gaxOpts) => {}; + log.logging.loggingService.writeLogEntries = ( + reqOpts: {}, + gaxOpts: {} + ) => {}; await log.write(ENTRY); }); @@ -456,8 +479,12 @@ describe('Log', () => { it('should not truncate entries by default', async () => { const logger = createLogger(); const entry = new Entry({}, 'hello world'.padEnd(300000, '.')); - - logger.logging.loggingService.writeLogEntries = (reqOpts, _gaxOpts) => { + // tslint:disable-next-line no-any + logger.logging.loggingService.writeLogEntries = ( + // tslint:disable-next-line no-any + reqOpts: any, + _gaxOpts: {} + ) => { assert.strictEqual(reqOpts.entries[0].textPayload.length, 300000); }; @@ -469,8 +496,9 @@ describe('Log', () => { const entry = new Entry({}, 'hello world'.padEnd(2000, '.')); truncatingLogger.logging.loggingService.writeLogEntries = ( - reqOpts, - _gaxOpts + // tslint:disable-next-line no-any + reqOpts: any, + _gaxOpts: {} ) => { const text = reqOpts.entries[0].textPayload; assert.ok(text.startsWith('hello world')); @@ -490,8 +518,9 @@ describe('Log', () => { ); truncatingLogger.logging.loggingService.writeLogEntries = ( - reqOpts, - _gaxOpts + // tslint:disable-next-line no-any + reqOpts: any, + _gaxOpts: {} ) => { const text = reqOpts.entries[0].jsonPayload.fields.message.stringValue; assert.ok(text.startsWith('hello world')); @@ -514,8 +543,9 @@ describe('Log', () => { ); truncatingLogger.logging.loggingService.writeLogEntries = ( - reqOpts, - _gaxOpts + // tslint:disable-next-line no-any + reqOpts: any, + _gaxOpts: {} ) => { const message = reqOpts.entries[0].jsonPayload.fields.message.stringValue; @@ -531,8 +561,8 @@ describe('Log', () => { }); describe('severity shortcuts', () => { - const ENTRY = {}; - const LABELS = []; + const ENTRY = {} as Entry; + const LABELS = [] as WriteOptions; beforeEach(() => { log.write = noop; @@ -540,7 +570,10 @@ describe('Log', () => { describe('alert', () => { it('should format the entries', async () => { - assignSeverityToEntriesOverride = (entries, severity) => { + assignSeverityToEntriesOverride = ( + entries: Entry[], + severity: string + ) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'ALERT'); }; @@ -548,9 +581,9 @@ describe('Log', () => { }); it('should pass correct arguments to write', async () => { - const assignedEntries = []; + const assignedEntries = [] as Entry[]; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry, labels) => { + log.write = async (entry: Entry, labels: WriteOptions) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); }; @@ -560,7 +593,10 @@ describe('Log', () => { describe('critical', () => { it('should format the entries', async () => { - assignSeverityToEntriesOverride = (entries, severity) => { + assignSeverityToEntriesOverride = ( + entries: Entry[], + severity: string + ) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'CRITICAL'); }; @@ -569,9 +605,9 @@ describe('Log', () => { }); it('should pass correct arguments to write', async () => { - const assignedEntries = []; + const assignedEntries = [] as Entry[]; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry, labels) => { + log.write = async (entry: Entry, labels: WriteOptions) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); }; @@ -581,7 +617,10 @@ describe('Log', () => { describe('debug', () => { it('should format the entries', async () => { - assignSeverityToEntriesOverride = (entries, severity) => { + assignSeverityToEntriesOverride = ( + entries: Entry[], + severity: string + ) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'DEBUG'); }; @@ -590,9 +629,9 @@ describe('Log', () => { }); it('should pass correct arguments to write', async () => { - const assignedEntries = []; + const assignedEntries = [] as Entry[]; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry, labels) => { + log.write = async (entry: Entry, labels: WriteOptions) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); }; @@ -602,7 +641,10 @@ describe('Log', () => { describe('emergency', () => { it('should format the entries', async () => { - assignSeverityToEntriesOverride = (entries, severity) => { + assignSeverityToEntriesOverride = ( + entries: Entry[], + severity: string + ) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'EMERGENCY'); }; @@ -611,9 +653,9 @@ describe('Log', () => { }); it('should pass correct arguments to write', async () => { - const assignedEntries = []; + const assignedEntries = [] as Entry[]; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry, labels) => { + log.write = async (entry: Entry, labels: WriteOptions) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); }; @@ -623,7 +665,10 @@ describe('Log', () => { describe('error', () => { it('should format the entries', async () => { - assignSeverityToEntriesOverride = (entries, severity) => { + assignSeverityToEntriesOverride = ( + entries: Entry[], + severity: string + ) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'ERROR'); }; @@ -631,13 +676,13 @@ describe('Log', () => { }); it('should pass correct arguments to write', async () => { - const assignedEntries = []; + const assignedEntries = [] as Entry[]; assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = async (entry, labels) => { + log.write = async (entry: Entry, labels: WriteOptions) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); }; @@ -648,7 +693,10 @@ describe('Log', () => { describe('info', () => { it('should format the entries', async () => { - assignSeverityToEntriesOverride = (entries, severity) => { + assignSeverityToEntriesOverride = ( + entries: Entry[], + severity: string + ) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'INFO'); }; @@ -657,13 +705,13 @@ describe('Log', () => { }); it('should pass correct arguments to write', async () => { - const assignedEntries = []; + const assignedEntries = [] as Entry[]; assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = async (entry, labels) => { + log.write = async (entry: Entry, labels: WriteOptions) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); }; @@ -674,7 +722,10 @@ describe('Log', () => { describe('notice', () => { it('should format the entries', async () => { - assignSeverityToEntriesOverride = (entries, severity) => { + assignSeverityToEntriesOverride = ( + entries: Entry[], + severity: string + ) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'NOTICE'); }; @@ -683,13 +734,13 @@ describe('Log', () => { }); it('should pass correct arguments to write', async () => { - const assignedEntries = []; + const assignedEntries = [] as Entry[]; assignSeverityToEntriesOverride = () => { return assignedEntries; }; - log.write = async (entry, labels) => { + log.write = async (entry: Entry, labels: WriteOptions) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); }; @@ -700,7 +751,10 @@ describe('Log', () => { describe('warning', () => { it('should format the entries', async () => { - assignSeverityToEntriesOverride = (entries, severity) => { + assignSeverityToEntriesOverride = ( + entries: Entry[], + severity: string + ) => { assert.strictEqual(entries, ENTRY); assert.strictEqual(severity, 'WARNING'); }; @@ -709,9 +763,9 @@ describe('Log', () => { }); it('should pass correct arguments to write', async () => { - const assignedEntries = []; + const assignedEntries = [] as Entry[]; assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry, labels) => { + log.write = async (entry: Entry, labels: WriteOptions) => { assert.strictEqual(entry, assignedEntries); assert.strictEqual(labels, LABELS); }; @@ -723,19 +777,22 @@ describe('Log', () => { describe('decorateEntries_', () => { const toJSONResponse = {}; - function FakeEntry() {} - FakeEntry.prototype.toJSON = () => toJSONResponse; + class FakeEntry { + toJSON() { + return toJSONResponse; + } + } beforeEach(() => { - log.entry = () => new FakeEntry(); + log.entry = () => new FakeEntry() as Entry; }); it('should create an Entry object if one is not provided', () => { const entry = {}; - log.entry = entry_ => { + log.entry = (entry_: Entry) => { assert.strictEqual(entry_, entry); - return new FakeEntry(); + return new FakeEntry() as Entry; }; const decoratedEntries = log.decorateEntries_([entry]); diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index d567d930636..58cb2f82df3 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -22,9 +22,9 @@ import * as proxyquire from 'proxyquire'; import assertRejects = require('assert-rejects'); -let instanceOverride; +let instanceOverride: {} | null; const fakeGcpMetadata = { - instance(path) { + instance(path: string) { if (instanceOverride) { const override = Array.isArray(instanceOverride) ? instanceOverride.find(entry => entry.path === path) @@ -49,9 +49,9 @@ const fakeGcpMetadata = { const FAKE_READFILE_ERROR_MESSAGE = 'fake readFile error'; const FAKE_READFILE_CONTENTS = 'fake readFile contents'; -let readFileShouldError; +let readFileShouldError: boolean; const fakeFS = { - readFile: (filename, encoding, callback) => { + readFile: (filename: string, encoding: string, callback: Function) => { setImmediate(() => { if (readFileShouldError) { callback(new Error(FAKE_READFILE_ERROR_MESSAGE)); @@ -212,14 +212,16 @@ describe('metadata', () => { instanceOverride = { errorArg: FAKE_ERROR, }; - - assertRejects(metadata.getGKEDescriptor(), err => err === FAKE_ERROR); + assertRejects( + metadata.getGKEDescriptor(), + (err: Error) => err === FAKE_ERROR + ); }); it('should throw error when read of namespace file fails', async () => { readFileShouldError = true; - assertRejects(metadata.getGKEDescriptor(), err => + assertRejects(metadata.getGKEDescriptor(), (err: Error) => err.message.includes(FAKE_READFILE_ERROR_MESSAGE) ); }); diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index b872943b060..9496d42ac21 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -18,29 +18,34 @@ import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; +import * as sinon from 'sinon'; +import {Sink as SINK, SetSinkMetadata} from '../src/sink'; +import {Logging, CreateSinkRequest, LogSink} from '../src/index'; let callbackified = false; const fakeCallbackify = extend({}, callbackify, { - callbackifyAll(c) { + callbackifyAll(c: Function) { if (c.name === 'Sink') { callbackified = true; } }, }); +const sandbox = sinon.createSandbox(); + describe('Sink', () => { - // tslint:disable-next-line no-any variable-name - let Sink: any; - let sink; + // tslint:disable-next-line variable-name + let Sink: typeof SINK; + let sink: SINK; const PROJECT_ID = 'project-id'; - const LOGGING = { + const LOGGING = ({ createSink: () => {}, projectId: '{{projectId}}', auth: () => {}, configService: () => {}, - }; + } as {}) as Logging; const SINK_NAME = 'sink-name'; before(() => { @@ -53,6 +58,8 @@ describe('Sink', () => { sink = new Sink(LOGGING, SINK_NAME); }); + afterEach(() => sandbox.restore()); + describe('instantiation', () => { it('should promisify all the things', () => { assert(callbackified); @@ -76,13 +83,13 @@ describe('Sink', () => { describe('create', () => { it('should call parent createSink', async () => { - const config = {}; - - sink.logging.createSink = async (name, config_) => { - assert.strictEqual(name, sink.name); - assert.strictEqual(config_, config); - }; - + const config = {} as CreateSinkRequest; + sandbox + .stub(sink.logging, 'createSink') + .callsFake(async (name, config_) => { + assert.strictEqual(name, sink.name); + assert.strictEqual(config_, config); + }); await sink.create(config); }); }); @@ -90,7 +97,10 @@ describe('Sink', () => { describe('delete', () => { it('should execute gax method', async () => { sink.logging.auth.getProjectId = async () => PROJECT_ID; - sink.logging.configService.deleteSink = async (reqOpts, gaxOpts) => { + sink.logging.configService.deleteSink = async ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { sinkName: sink.formattedName_, }); @@ -102,9 +112,10 @@ describe('Sink', () => { it('should accept gaxOptions', async () => { const gaxOptions = {}; - - sink.logging.getProjectId = async () => {}; - sink.logging.configService.deleteSink = async (reqOpts, gaxOpts) => { + sink.logging.configService.deleteSink = async ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(gaxOpts, gaxOptions); }; @@ -117,7 +128,7 @@ describe('Sink', () => { sink.logging.auth.getProjectId = async () => PROJECT_ID; }); it('should execute gax method', async () => { - sink.logging.configService.getSink = async (reqOpts, gaxOpts) => { + sink.logging.configService.getSink = async (reqOpts: {}, gaxOpts: {}) => { assert.deepStrictEqual(reqOpts, { sinkName: sink.formattedName_, }); @@ -130,33 +141,25 @@ describe('Sink', () => { it('should accept gaxOptions', async () => { const gaxOptions = {}; - - sink.logging.configService.getSink = async (reqOpts, gaxOpts) => { + sink.logging.configService.getSink = async (reqOpts: {}, gaxOpts: {}) => { assert.deepStrictEqual(gaxOpts, gaxOptions); return []; }; - await sink.getMetadata(gaxOptions); }); it('should update metadata', async () => { const metadata = {}; - - sink.logging.configService.getSink = async (reqOpts, gaxOpts) => { - return [metadata]; - }; - + sandbox.stub(sink.logging.configService, 'getSink').returns([metadata]); await sink.getMetadata(); assert.strictEqual(sink.metadata, metadata); }); it('should return original arguments', async () => { const ARGS = [{}, {}, {}]; - - sink.logging.configService.getSink = async (reqOpts, gaxOpts) => { + sink.logging.configService.getSink = async (reqOpts: {}, gaxOpts: {}) => { return [ARGS]; }; - const [args] = await sink.getMetadata(); assert.deepStrictEqual(args, ARGS); }); @@ -166,35 +169,29 @@ describe('Sink', () => { const FILTER = 'filter'; it('should call set metadata', async () => { - sink.setMetadata = async metadata => { + sandbox.stub(sink, 'setMetadata').callsFake(async metadata => { assert.strictEqual(metadata.filter, FILTER); return []; - }; - + }); await sink.setFilter(FILTER); }); }); describe('setMetadata', () => { - const METADATA = {a: 'b', c: 'd'}; + const METADATA = {a: 'b', c: 'd'} as LogSink; beforeEach(() => { - sink.getMetadata = async () => { - return [METADATA]; - }; - + // tslint:disable-next-line no-any + sink.getMetadata = async () => [METADATA] as any; sink.logging.auth.getProjectId = async () => PROJECT_ID; }); it('should refresh the metadata', async () => { - sink.getMetadata = () => { - return []; - }; - - sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + // tslint:disable-next-line no-any + sink.getMetadata = () => [] as any; + sink.logging.configService.updateSink = async () => { return [METADATA]; }; - assert.strictEqual(sink.metadata, undefined); await sink.setMetadata(METADATA); assert.deepStrictEqual(sink.metadata, METADATA); @@ -202,24 +199,22 @@ describe('Sink', () => { it('should throw the error from refresh', () => { const error = new Error('Error.'); - sink.getMetadata = async () => { throw error; }; - sink .setMetadata(METADATA) .then(() => {}, err => assert.strictEqual(err, error)); }); it('should execute gax method', async () => { - const currentMetadata = {a: 'a', e: 'e'}; - - sink.getMetadata = async () => { - return [currentMetadata]; - }; - - sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + const currentMetadata = {a: 'a', e: 'e'} as LogSink; + // tslint:disable-next-line no-any + sink.getMetadata = async () => [currentMetadata] as any; + sink.logging.configService.updateSink = async ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { sinkName: sink.formattedName_, sink: extend({}, currentMetadata, METADATA), @@ -236,32 +231,36 @@ describe('Sink', () => { gaxOptions: {}, }); - sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { - assert.strictEqual(reqOpts.sink.gaxOptions, undefined); - assert.strictEqual(gaxOpts, metadata.gaxOptions); - return []; - }; + sandbox + .stub(sink.logging.configService, 'updateSink') + .callsFake(async (reqOpts, gaxOpts) => { + assert.strictEqual(reqOpts.sink.gaxOptions, undefined); + assert.strictEqual(gaxOpts, metadata.gaxOptions); + return []; + }); await sink.setMetadata(metadata); }); it('should update metadata', async () => { const metadata = {}; - - sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + sink.logging.configService.updateSink = async ( + reqOpts: {}, + gaxOpts: {} + ) => { return [metadata]; }; - await sink.setMetadata(metadata); assert.strictEqual(sink.metadata, metadata); }); it('should return callback with original arguments', async () => { const ARGS = [{}, {}, {}]; - - sink.logging.configService.updateSink = async (reqOpts, gaxOpts) => { + sink.logging.configService.updateSink = async ( + reqOpts: {}, + gaxOpts: {} + ) => { return [ARGS]; }; - const [args] = await sink.setMetadata(METADATA); assert.deepStrictEqual(args, ARGS); }); From 090d0fc37c1e4ae60ec918695b5707abf92fb305 Mon Sep 17 00:00:00 2001 From: Adri Van Houdt Date: Fri, 25 Oct 2019 18:42:53 +0200 Subject: [PATCH 0500/1029] fix(package): add missing dependency google-auth-library (#620) This got dropped in https://github.com/googleapis/nodejs-logging/commit/51dd05034abbda44b4781fae1a56c835b8cb8605 but it still being used in `src/metadata.ts` --- handwritten/logging/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ff9193fe3c6..096bd39f78b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,6 +62,7 @@ "eventid": "^0.1.2", "extend": "^3.0.2", "gcp-metadata": "^3.1.0", + "google-auth-library": "^5.2.2", "google-gax": "^1.7.5", "is": "^3.3.0", "on-finished": "^2.3.0", From edf98b6f71a44c41b11fd60eae35e9e4adb8c123 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 25 Oct 2019 14:15:33 -0700 Subject: [PATCH 0501/1029] refactor: enable noImplicitAny (#618) --- handwritten/logging/package.json | 2 + handwritten/logging/src/log.ts | 6 +- handwritten/logging/system-test/install.ts | 2 +- handwritten/logging/system-test/logging.ts | 23 +- handwritten/logging/test/index.ts | 285 ++++++++++++--------- handwritten/logging/tsconfig.json | 3 +- 6 files changed, 192 insertions(+), 129 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 096bd39f78b..f1cb1daa2a3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -87,6 +87,7 @@ "@types/pumpify": "^1.4.1", "@types/sinon": "^7.0.8", "@types/through2": "^2.0.34", + "@types/tmp": "^0.1.0", "@types/uuid": "^3.4.4", "assert-rejects": "^1.0.0", "bignumber.js": "^9.0.0", @@ -95,6 +96,7 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", + "execa": "^3.2.0", "google-proto-files": "^1.0.0", "gts": "^1.0.0", "http2spy": "^1.1.0", diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 6891d0df596..86fbb48b66f 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -826,19 +826,19 @@ class Log implements LogSeverityFunctions { return writeWithResource(resource); } async function writeWithResource(resource: {} | null) { - let decoratedEntries; + let decoratedEntries: EntryJson[]; try { decoratedEntries = self.decorateEntries_(arrify(entry) as Entry[]); } catch (err) { // Ignore errors (the API will speak up if it has an issue). } - self.truncateEntries(decoratedEntries); + self.truncateEntries(decoratedEntries!); const projectId = await self.logging.auth.getProjectId(); self.formattedName_ = Log.formatName_(projectId, self.name); const reqOpts = extend( { logName: self.formattedName_, - entries: decoratedEntries, + entries: decoratedEntries!, resource, }, options diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index 584f54b17b1..01d156f1849 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import * as execa from 'execa'; +import execa = require('execa'); import * as mv from 'mv'; import {ncp} from 'ncp'; import * as tmp from 'tmp'; diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 01bd47684ea..3de16c431bd 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -22,8 +22,8 @@ import {HOST_ADDRESS} from 'gcp-metadata'; import * as nock from 'nock'; import {Duplex} from 'stream'; import * as uuid from 'uuid'; -import * as http2spy from 'http2spy'; -import {Logging, Sink} from '../src'; +const http2spy = require('http2spy'); +import {Logging, Sink, Log, Entry} from '../src'; // block all attempts to chat with the metadata server (kokoro runs on GCE) nock(HOST_ADDRESS) @@ -99,7 +99,8 @@ describe('Logging', () => { async function getAndDelete(method: Function) { const [objects] = await method(); return Promise.all( - objects + // tslint:disable-next-line no-any + (objects as any[]) .filter(o => { const name = o.name || o.id; if (!name.startsWith(TESTS_PREFIX)) { @@ -242,7 +243,10 @@ describe('Logging', () => { return {log, logEntries}; } - function getEntriesFromLog(log, callback) { + function getEntriesFromLog( + log: Log, + callback: (err: Error | null, entries?: Entry[]) => void + ) { let numAttempts = 0; setTimeout(pollForMessages, WRITE_CONSISTENCY_DELAY_MS); @@ -303,7 +307,7 @@ describe('Logging', () => { getEntriesFromLog(log, (err, entries) => { assert.ifError(err); - assert.strictEqual(entries.length, logEntries.length); + assert.strictEqual(entries!.length, logEntries.length); done(); }); }); @@ -327,7 +331,8 @@ describe('Logging', () => { }); describe('log-specific entries', () => { - let logExpected, logEntriesExpected; + let logExpected: Log; + let logEntriesExpected: Entry[]; before(done => { const {log, logEntries} = getTestLog(); @@ -339,7 +344,7 @@ describe('Logging', () => { it('should list log entries', done => { getEntriesFromLog(logExpected, (err, entries) => { assert.ifError(err); - assert.strictEqual(entries.length, logEntriesExpected.length); + assert.strictEqual(entries!.length, logEntriesExpected.length); done(); }); }); @@ -377,7 +382,7 @@ describe('Logging', () => { getEntriesFromLog(log, (err, entries) => { assert.ifError(err); - assert.deepStrictEqual(entries.map(x => x.data).reverse(), [ + assert.deepStrictEqual(entries!.map(x => x.data).reverse(), [ 'log entry 1', {delegate: 'my_username'}, { @@ -595,7 +600,7 @@ describe('Logging', () => { // Parse the time the resource was created using the resource id // Format 1: ${TESTS_PREFIX}-${date}-${uuid} // Format 2: ${TESTS_PREFIX}_${date}_${uuid} - function getDateFromGeneratedName(name) { + function getDateFromGeneratedName(name: string) { const timeCreated = name.substr(TESTS_PREFIX.length + 1).split(/-|_/g)[0]; return new Date(Number(timeCreated)); } diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index e15481df091..a82ee6d4493 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -21,11 +21,27 @@ import * as assert from 'assert'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as through from 'through2'; -import {Logging as LOGGING} from '../src/index'; +import { + Logging as LOGGING, + LoggingOptions, + CreateSinkRequest, + GetSinksRequest, + Sink, +} from '../src/index'; +import {Duplex} from 'stream'; +import {Policy} from '@google-cloud/pubsub'; +import {GetEntriesRequest} from '../src/log'; +import {Dataset} from '@google-cloud/bigquery'; +import {Bucket} from '@google-cloud/storage'; const {v2} = require('../src'); const PKG = require('../../package.json'); +interface AbortableDuplex extends Duplex { + cancel: Function; + abort: Function; +} + const noop = () => {}; let extended = false; const fakePaginator = { @@ -70,7 +86,7 @@ const fakeCallbackify = { }, }; const fakeProjectify = { - replaceProjectIdToken(reqOpts) { + replaceProjectIdToken(reqOpts: {}) { if (replaceProjectIdTokenOverride) { return replaceProjectIdTokenOverride.apply(null, arguments); } @@ -107,9 +123,9 @@ class FakeSink { } describe('Logging', () => { - // tslint:disable-next-line no-any variable-name - let Logging: any; - let logging; + // tslint:disable-next-line variable-name + let Logging: typeof LOGGING; + let logging: LOGGING; const PROJECT_ID = 'project-id'; @@ -174,9 +190,9 @@ describe('Logging', () => { const options = { a: 'b', c: 'd', - }; + } as LoggingOptions; - googleAuthOverride = options_ => { + googleAuthOverride = (options_: {}) => { assert.deepStrictEqual( options_, extend( @@ -199,7 +215,7 @@ describe('Logging', () => { const options = { a: 'b', c: 'd', - }; + } as LoggingOptions; const logging = new Logging(options); @@ -237,14 +253,16 @@ describe('Logging', () => { it('should throw if a name is not provided', () => { const error = new Error('A sink name must be provided.'); - logging.createSink().then(noop, err => { + // tslint:disable-next-line no-any + (logging as any).createSink().then(noop, (err: Error) => { assert.deepStrictEqual(err, error); }); }); it('should throw if a config object is not provided', () => { const error = new Error('A sink configuration object must be provided.'); - logging.createSink(SINK_NAME).then(noop, err => { + // tslint:disable-next-line no-any + (logging as any).createSink(SINK_NAME).then(noop, (err: Error) => { assert.deepStrictEqual(err, error); }); }); @@ -256,7 +274,7 @@ describe('Logging', () => { destination: dataset, }; - isCustomTypeOverride = (destination, type) => { + isCustomTypeOverride = (destination: {}, type: string) => { assert.strictEqual(destination, dataset); return type === 'bigquery/dataset'; }; @@ -275,7 +293,7 @@ describe('Logging', () => { destination: topic, }; - isCustomTypeOverride = (destination, type) => { + isCustomTypeOverride = (destination: {}, type: string) => { assert.strictEqual(destination, topic); return type === 'pubsub/topic'; }; @@ -294,7 +312,7 @@ describe('Logging', () => { destination: bucket, }; - isCustomTypeOverride = (destination, type) => { + isCustomTypeOverride = (destination: {}, type: string) => { assert.strictEqual(destination, bucket); return type === 'storage/bucket'; }; @@ -308,16 +326,20 @@ describe('Logging', () => { describe('API request', () => { it('should call GAX method', async () => { - const config = { + const config = ({ a: 'b', c: 'd', - }; + } as {}) as CreateSinkRequest; const expectedConfig = extend({}, config, { name: SINK_NAME, }); - logging.configService.createSink = async (reqOpts, gaxOpts) => { + logging.configService.createSink = async ( + // tslint:disable-next-line no-any + reqOpts: any, + gaxOpts: {} + ) => { const expectedParent = 'projects/' + logging.projectId; assert.strictEqual(reqOpts.parent, expectedParent); assert.deepStrictEqual(reqOpts.sink, expectedConfig); @@ -329,13 +351,17 @@ describe('Logging', () => { }); it('should accept GAX options', async () => { - const config = { + const config = ({ a: 'b', c: 'd', gaxOptions: {}, - }; + } as {}) as CreateSinkRequest; - logging.configService.createSink = async (reqOpts, gaxOpts) => { + logging.configService.createSink = async ( + // tslint:disable-next-line no-any + reqOpts: any, + gaxOpts: {} + ) => { assert.strictEqual(reqOpts.sink.gaxOptions, undefined); assert.strictEqual(gaxOpts, config.gaxOptions); return [{}]; @@ -349,7 +375,7 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - logging.request = (config, callback) => { + (logging.request as Function) = (config: {}, callback: Function) => { callback(error, apiResponse); }; }); @@ -360,8 +386,8 @@ describe('Logging', () => { }; logging - .createSink(SINK_NAME, {}) - .then(noop, err => assert.deepStrictEqual(err, error)); + .createSink(SINK_NAME, {} as CreateSinkRequest) + .then(noop, (err: Error) => assert.deepStrictEqual(err, error)); }); }); @@ -371,13 +397,13 @@ describe('Logging', () => { }; beforeEach(() => { - logging.request = (config, callback) => { + (logging.request as Function) = (config: {}, callback: Function) => { callback(null, apiResponse); }; }); it('should resolve Promise Sink & API response', async () => { - const sink = {}; + const sink = {} as Sink; logging.sink = name_ => { assert.strictEqual(name_, SINK_NAME); @@ -388,7 +414,10 @@ describe('Logging', () => { return [apiResponse]; }; - const [sink_, apiResponse_] = await logging.createSink(SINK_NAME, {}); + const [sink_, apiResponse_] = await logging.createSink( + SINK_NAME, + {} as CreateSinkRequest + ); assert.strictEqual(sink_, sink); assert.strictEqual(sink_.metadata, apiResponse); assert.strictEqual(apiResponse_, apiResponse); @@ -402,7 +431,8 @@ describe('Logging', () => { const DATA = {}; it('should return an Entry object', () => { - const entry = logging.entry(RESOURCE, DATA); + // tslint:disable-next-line no-any + const entry = logging.entry(RESOURCE, DATA) as any; assert(entry instanceof FakeEntry); assert.strictEqual(entry.calledWith_[0], RESOURCE); assert.strictEqual(entry.calledWith_[1], DATA); @@ -415,7 +445,10 @@ describe('Logging', () => { }); it('should exec without options', async () => { - logging.loggingService.listLogEntries = async (reqOpts, gaxOpts) => { + logging.loggingService.listLogEntries = async ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], @@ -432,7 +465,10 @@ describe('Logging', () => { it('should accept options', async () => { const options = {filter: 'test'}; - logging.loggingService.listLogEntries = async (reqOpts, gaxOpts) => { + logging.loggingService.listLogEntries = async ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual( reqOpts, extend(options, { @@ -456,7 +492,8 @@ describe('Logging', () => { resourceNames: ['projects/' + logging.projectId], }; - logging.loggingService.listLogEntries = async reqOpts => { + // tslint:disable-next-line no-any + logging.loggingService.listLogEntries = async (reqOpts: any) => { assert.deepStrictEqual(reqOpts.resourceNames, [ 'projects/' + logging.projectId, ]); @@ -471,7 +508,8 @@ describe('Logging', () => { orderBy: 'timestamp asc', }; - logging.loggingService.listLogEntries = async reqOpts => { + // tslint:disable-next-line no-any + logging.loggingService.listLogEntries = async (reqOpts: any) => { assert.deepStrictEqual(reqOpts.orderBy, options.orderBy); return [[]]; }; @@ -488,7 +526,11 @@ describe('Logging', () => { }, }; - logging.loggingService.listLogEntries = async (reqOpts, gaxOpts) => { + logging.loggingService.listLogEntries = async ( + // tslint:disable-next-line no-any + reqOpts: any, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { a: 'b', c: 'd', @@ -547,20 +589,23 @@ describe('Logging', () => { a: 'b', c: 'd', }, - }; + } as GetEntriesRequest; - let GAX_STREAM; + let GAX_STREAM: AbortableDuplex; const RESULT = {}; beforeEach(() => { - GAX_STREAM = through.obj(); + GAX_STREAM = (through.obj() as {}) as AbortableDuplex; GAX_STREAM.push(RESULT); logging.loggingService.listLogEntriesStream = () => GAX_STREAM; logging.auth.getProjectId = async () => PROJECT_ID; }); it('should make request once reading', done => { - logging.loggingService.listLogEntriesStream = (reqOpts, gaxOpts) => { + logging.loggingService.listLogEntriesStream = ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { resourceNames: ['projects/' + logging.projectId], orderBy: 'timestamp desc', @@ -586,7 +631,10 @@ describe('Logging', () => { it('should set logName filter if has logName flag', done => { const logName = 'log-name'; logging = new LOGGING({projectId: PROJECT_ID}); - logging.loggingService.listLogEntriesStream = (reqOpts, gaxOpts) => { + logging.loggingService.listLogEntriesStream = ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { resourceNames: ['projects/' + logging.projectId], orderBy: 'timestamp desc', @@ -625,7 +673,10 @@ describe('Logging', () => { OPTIONS ); logging = new LOGGING({projectId: PROJECT_ID}); - logging.loggingService.listLogEntriesStream = (reqOpts, gaxOpts) => { + logging.loggingService.listLogEntriesStream = ( + reqOpts: {}, + gaxOpts: {} + ) => { assert.deepStrictEqual(reqOpts, { resourceNames: ['projects/' + logging.projectId], orderBy: 'timestamp desc', @@ -707,7 +758,7 @@ describe('Logging', () => { it('should expose abort function', done => { GAX_STREAM.cancel = done; - const stream = logging.getEntriesStream(OPTIONS); + const stream = logging.getEntriesStream(OPTIONS) as AbortableDuplex; stream.emit('reading'); setImmediate(() => { stream.abort(); @@ -724,7 +775,7 @@ describe('Logging', () => { describe('getSinks', () => { beforeEach(() => { - logging.auth.getProjectId = async () => {}; + (logging.auth.getProjectId as Function) = async () => {}; }); const OPTIONS = { a: 'b', @@ -733,10 +784,10 @@ describe('Logging', () => { a: 'b', c: 'd', }, - }; + } as GetSinksRequest; it('should exec without options', async () => { - logging.configService.listSinks = async (reqOpts, gaxOpts) => { + logging.configService.listSinks = async (reqOpts: {}, gaxOpts: {}) => { assert.deepStrictEqual(gaxOpts, {autoPaginate: undefined}); return [[]]; }; @@ -744,7 +795,7 @@ describe('Logging', () => { }); it('should call gax method', async () => { - logging.configService.listSinks = async (reqOpts, gaxOpts) => { + logging.configService.listSinks = async (reqOpts: {}, gaxOpts: {}) => { assert.deepStrictEqual(reqOpts, { parent: 'projects/' + logging.projectId, a: 'b', @@ -776,7 +827,8 @@ describe('Logging', () => { }); describe('success', () => { - const ARGS = [ + // tslint:disable-next-line no-any + const ARGS: any = [ [ { name: 'sink-name', @@ -792,7 +844,7 @@ describe('Logging', () => { }); it('should resolve promise with Logs & API resp', async () => { - const sinkInstance = {}; + const sinkInstance = {} as Sink; logging.sink = name => { assert.strictEqual(name, ARGS[0]![0].name); return sinkInstance; @@ -812,22 +864,22 @@ describe('Logging', () => { a: 'b', c: 'd', }, - }; + } as GetSinksRequest; - let GAX_STREAM; + let GAX_STREAM: AbortableDuplex; const RESULT = { name: 'sink-name', }; beforeEach(() => { - GAX_STREAM = through.obj(); + GAX_STREAM = (through.obj() as {}) as AbortableDuplex; GAX_STREAM.push(RESULT); logging.configService.listSinksStream = () => GAX_STREAM; - logging.auth.getProjectId = async () => {}; + (logging.auth.getProjectId as Function) = async () => {}; }); it('should make request once reading', done => { - logging.configService.listSinksStream = (reqOpts, gaxOpts) => { + logging.configService.listSinksStream = (reqOpts: {}, gaxOpts: {}) => { assert.deepStrictEqual(reqOpts, { parent: 'projects/' + logging.projectId, a: 'b', @@ -892,9 +944,9 @@ describe('Logging', () => { it('should convert results from request to Sink', done => { const stream = logging.getSinksStream(OPTIONS); - const sinkInstance = {}; + const sinkInstance = {} as Sink; - logging.sink = name => { + logging.sink = (name: string) => { assert.strictEqual(name, RESULT.name); return sinkInstance; }; @@ -910,11 +962,8 @@ describe('Logging', () => { it('should expose abort function', done => { GAX_STREAM.cancel = done; - - const stream = logging.getSinksStream(OPTIONS); - + const stream = logging.getSinksStream(OPTIONS) as AbortableDuplex; stream.emit('reading'); - setImmediate(() => { stream.abort(); }); @@ -925,7 +974,8 @@ describe('Logging', () => { const NAME = 'log-name'; it('should return a Log object', () => { - const log = logging.log(NAME); + // tslint:disable-next-line no-any + const log = logging.log(NAME) as any; assert(log instanceof FakeLog); assert.strictEqual(log.calledWith_[0], logging); assert.strictEqual(log.calledWith_[1], NAME); @@ -946,25 +996,26 @@ describe('Logging', () => { const PROJECT_ID = 'project-id'; beforeEach(() => { - logging.auth = { - getProjectId: callback => { + (logging.auth as {}) = { + getProjectId: (callback: Function) => { callback(null, PROJECT_ID); }, }; - logging.api[CONFIG.client] = { + // tslint:disable-next-line no-any + (logging.api as any)[CONFIG.client] = { [CONFIG.method]: noop, }; }); describe('prepareGaxRequest', () => { it('should get the project ID', done => { - logging.auth.getProjectId = () => done(); + (logging.auth.getProjectId as Function) = () => done(); logging.request(CONFIG, assert.ifError); }); it('should cache the project ID', done => { - logging.auth.getProjectId = () => { + (logging.auth.getProjectId as Function) = () => { setImmediate(() => { assert.strictEqual(logging.projectId, PROJECT_ID); done(); @@ -977,7 +1028,7 @@ describe('Logging', () => { it('should return error if getting project ID failed', done => { const error = new Error('Error.'); - logging.auth.getProjectId = callback => { + (logging.auth.getProjectId as Function) = (callback: Function) => { callback(error); }; @@ -991,8 +1042,9 @@ describe('Logging', () => { const fakeClient = { [CONFIG.method]: noop, }; - fakeV2[CONFIG.client] = class { - constructor(options) { + // tslint:disable-next-line no-any + (fakeV2 as any)[CONFIG.client] = class { + constructor(options: {}) { assert.strictEqual(options, logging.options); return fakeClient; } @@ -1003,31 +1055,28 @@ describe('Logging', () => { }); it('should use the cached client', done => { - fakeV2[CONFIG.client] = () => { + // tslint:disable-next-line no-any + (fakeV2 as any)[CONFIG.client] = () => { done(new Error('Should not re-instantiate a GAX client.')); }; - logging.request(CONFIG); done(); }); it('should replace the project ID token', done => { const replacedReqOpts = {}; - - replaceProjectIdTokenOverride = (reqOpts, projectId) => { + replaceProjectIdTokenOverride = (reqOpts: {}, projectId: string) => { assert.notStrictEqual(reqOpts, CONFIG.reqOpts); assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(projectId, PROJECT_ID); - return replacedReqOpts; }; - logging.api[CONFIG.client][CONFIG.method] = { - bind(gaxClient, reqOpts) { + // tslint:disable-next-line no-any + (logging.api as any)[CONFIG.client][CONFIG.method] = { + bind(gaxClient: {}, reqOpts: {}) { assert.strictEqual(reqOpts, replacedReqOpts); - setImmediate(done); - return noop; }, }; @@ -1038,7 +1087,7 @@ describe('Logging', () => { describe('makeRequestCallback', () => { it('should return if in snippet sandbox', done => { - logging.auth.getProjectId = () => { + (logging.auth.getProjectId as Function) = () => { done(new Error('Should not have gotten project ID.')); }; // tslint:disable-next-line no-any @@ -1052,26 +1101,24 @@ describe('Logging', () => { }); it('should prepare the request', done => { - logging.api[CONFIG.client][CONFIG.method] = { - bind(gaxClient, reqOpts, gaxOpts) { + // tslint:disable-next-line no-any + (logging.api as any)[CONFIG.client][CONFIG.method] = { + bind(gaxClient: {}, reqOpts: {}, gaxOpts: {}) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(gaxOpts, CONFIG.gaxOpts); - setImmediate(done); - return noop; }, }; - logging.request(CONFIG, assert.ifError); }); it('should execute callback with error', done => { const error = new Error('Error.'); - logging.api[CONFIG.client][CONFIG.method] = (...args) => { - const callback = args.pop(); + logging.api[CONFIG.client][CONFIG.method] = (...args: Array<{}>) => { + const callback = args.pop() as Function; callback(error); }; @@ -1082,8 +1129,11 @@ describe('Logging', () => { }); it('should execute the request function', () => { - logging.api[CONFIG.client][CONFIG.method] = (done, ...args) => { - const callback = args.pop(); + logging.api[CONFIG.client][CONFIG.method] = ( + done: boolean, + ...args: Array<{}> + ) => { + const callback = args.pop() as Function; callback(null, done); // so it ends the test }; @@ -1092,12 +1142,12 @@ describe('Logging', () => { }); describe('makeRequestStream', () => { - let GAX_STREAM; + let GAX_STREAM: AbortableDuplex; beforeEach(() => { - GAX_STREAM = through(); - - logging.api[CONFIG.client][CONFIG.method] = { + GAX_STREAM = (through() as {}) as AbortableDuplex; + // tslint:disable-next-line no-any + (logging.api as any)[CONFIG.client][CONFIG.method] = { bind() { return () => GAX_STREAM; }, @@ -1105,7 +1155,7 @@ describe('Logging', () => { }); it('should return if in snippet sandbox', done => { - logging.auth.getProjectId = () => { + (logging.auth.getProjectId as Function) = () => { done(new Error('Should not have gotten project ID.')); }; @@ -1122,15 +1172,15 @@ describe('Logging', () => { it('should expose an abort function', done => { GAX_STREAM.cancel = done; - - const requestStream = logging.request(CONFIG); + const requestStream = logging.request(CONFIG) as AbortableDuplex; requestStream.emit('reading'); requestStream.abort(); }); it('should prepare the request once reading', done => { - logging.api[CONFIG.client][CONFIG.method] = { - bind(gaxClient, reqOpts, gaxOpts) { + // tslint:disable-next-line no-any + (logging.api as any)[CONFIG.client][CONFIG.method] = { + bind(gaxClient: {}, reqOpts: {}, gaxOpts: {}) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); assert.deepStrictEqual(reqOpts, CONFIG.reqOpts); assert.strictEqual(gaxOpts, CONFIG.gaxOpts); @@ -1146,7 +1196,7 @@ describe('Logging', () => { it('should destroy the stream with prepare error', done => { const error = new Error('Error.'); - logging.auth.getProjectId = callback => { + (logging.auth.getProjectId as Function) = (callback: Function) => { callback(error); }; @@ -1179,7 +1229,8 @@ describe('Logging', () => { const NAME = 'sink-name'; it('should return a Log object', () => { - const sink = logging.sink(NAME); + // tslint:disable-next-line no-any + const sink = logging.sink(NAME) as any; assert(sink instanceof FakeSink); assert.strictEqual(sink.calledWith_[0], logging); assert.strictEqual(sink.calledWith_[1], NAME); @@ -1188,9 +1239,9 @@ describe('Logging', () => { describe('setAclForBucket_', () => { const SINK_NAME = 'name'; - let CONFIG; + let CONFIG: CreateSinkRequest; - let bucket; + let bucket: Bucket; beforeEach(() => { bucket = { @@ -1200,7 +1251,8 @@ describe('Logging', () => { addGroup: noop, }, }, - }; + // tslint:disable-next-line no-any + } as any; CONFIG = { destination: bucket, @@ -1208,7 +1260,8 @@ describe('Logging', () => { }); it('should add cloud-logs as an owner', async () => { - bucket.acl.owners.addGroup = async entity => { + // tslint:disable-next-line no-any + (bucket.acl.owners as any).addGroup = async (entity: {}) => { assert.strictEqual(entity, 'cloud-logs@google.com'); }; @@ -1219,7 +1272,8 @@ describe('Logging', () => { const error = new Error('Error.'); beforeEach(() => { - bucket.acl.owners.addGroup = async () => { + // tslint:disable-next-line no-any + (bucket.acl.owners as any).addGroup = async () => { throw error; }; }); @@ -1233,7 +1287,8 @@ describe('Logging', () => { describe('success', () => { beforeEach(() => { - bucket.acl.owners.addGroup = async () => {}; + // tslint:disable-next-line no-any + (bucket.acl.owners as any).addGroup = async () => {}; }); it('should set string destination', async () => { @@ -1247,16 +1302,16 @@ describe('Logging', () => { describe('setAclForDataset_', () => { const SINK_NAME = 'name'; - let CONFIG; - let dataset; + let CONFIG: CreateSinkRequest; + let dataset: Dataset; beforeEach(() => { - dataset = { + dataset = ({ id: 'dataset-id', parent: { projectId: PROJECT_ID, }, - }; + } as {}) as Dataset; CONFIG = { destination: dataset, @@ -1289,7 +1344,7 @@ describe('Logging', () => { const originalAccess = [].slice.call(apiResponse.access); beforeEach(() => { - dataset.getMetadata = async () => { + (dataset.getMetadata as Function) = async () => { return [apiResponse, apiResponse]; }; }); @@ -1304,7 +1359,8 @@ describe('Logging', () => { // tslint:disable-next-line no-any ([] as any[]).slice.call(originalAccess).concat(access); - dataset.setMetadata = async metadata => { + // tslint:disable-next-line no-any + (dataset.setMetadata as Function) = async (metadata: any) => { assert.deepStrictEqual(apiResponse.access, originalAccess); assert.deepStrictEqual(metadata.access, expectedAccess); }; @@ -1331,14 +1387,15 @@ describe('Logging', () => { describe('updating metadata success', () => { beforeEach(() => { - dataset.setMetadata = async () => {}; + (dataset.setMetadata as Function) = async () => {}; }); it('should set string destination', async () => { const expectedDestination = [ 'bigquery.googleapis.com', 'projects', - dataset.parent.projectId, + // tslint:disable-next-line no-any + (dataset.parent as any).projectId, 'datasets', dataset.id, ].join('/'); @@ -1352,9 +1409,9 @@ describe('Logging', () => { }); describe('setAclForTopic_', () => { - const SINK_NAME = 'name'; - let CONFIG; - let topic; + let CONFIG: CreateSinkRequest; + // tslint:disable-next-line no-any + let topic: any; beforeEach(() => { topic = { @@ -1396,7 +1453,7 @@ describe('Logging', () => { const originalBindings = [].slice.call(apiResponse.bindings); beforeEach(() => { - topic.iam.getPolicy = async () => { + (topic.iam.getPolicy as Function) = async () => { return [apiResponse, apiResponse]; }; }); @@ -1411,7 +1468,7 @@ describe('Logging', () => { const expectedBindings = ([] as any[]).slice.call(originalBindings); expectedBindings.push(binding); - topic.iam.setPolicy = async policy => { + (topic.iam.setPolicy as Function) = async (policy: Policy) => { assert.strictEqual(policy, apiResponse); assert.deepStrictEqual(policy.bindings, expectedBindings); }; @@ -1440,7 +1497,7 @@ describe('Logging', () => { const apiResponse = {}; beforeEach(() => { - topic.iam.setPolicy = async () => {}; + (topic.iam.setPolicy as Function) = async () => {}; }); it('should set string destination', async () => { diff --git a/handwritten/logging/tsconfig.json b/handwritten/logging/tsconfig.json index f39b8a5188f..0475722c55f 100644 --- a/handwritten/logging/tsconfig.json +++ b/handwritten/logging/tsconfig.json @@ -2,8 +2,7 @@ "extends": "./node_modules/gts/tsconfig-google.json", "compilerOptions": { "rootDir": ".", - "outDir": "build", - "noImplicitAny": false + "outDir": "build" }, "include": [ "src/*.ts", From 92a2fffc0f54fbe99cd69076b7f43265ae2c207c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2019 09:17:56 -0400 Subject: [PATCH 0502/1029] chore: release 5.5.4 (#621) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index dd6aa6ef8c1..7f06b1f66de 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.5.4](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.3...v5.5.4) (2019-10-25) + + +### Bug Fixes + +* **package:** add missing dependency google-auth-library ([#620](https://www.github.com/googleapis/nodejs-logging/issues/620)) ([5ef2377](https://www.github.com/googleapis/nodejs-logging/commit/5ef2377aacac94551a74d386cbb8084f3d5a7b53)) + ### [5.5.3](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.2...v5.5.3) (2019-10-22) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f1cb1daa2a3..c7a6af4bb07 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.5.3", + "version": "5.5.4", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From e346c17572f1ee6a8236f4ad4292569306aaa750 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 4 Nov 2019 10:11:04 -0800 Subject: [PATCH 0503/1029] chore: exclude gapic files from test coverage (#626) --- handwritten/logging/.nycrc | 1 - handwritten/logging/synth.metadata | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/.nycrc b/handwritten/logging/.nycrc index 23e322204ec..367688844eb 100644 --- a/handwritten/logging/.nycrc +++ b/handwritten/logging/.nycrc @@ -10,7 +10,6 @@ "**/docs", "**/samples", "**/scripts", - "**/src/**/v*/**/*.js", "**/protos", "**/test", ".jsdoc.js", diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 84ea6f24168..3013f8f189a 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-10-05T11:13:49.527316Z", + "updateTime": "2019-11-02T11:11:13.204938Z", "sources": [ { "generator": { "name": "artman", - "version": "0.38.0", - "dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf" + "version": "0.41.0", + "dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ceb8e2fb12f048cc94caae532ef0b4cf026a78f3", - "internalRef": "272971705" + "sha": "aac770126e2def40dcc387f50e8007b21c869e58", + "internalRef": "278016738" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], From 65dc3dc1c008deafa678473cd82a7d31ba87f52c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 7 Nov 2019 21:49:07 +0200 Subject: [PATCH 0504/1029] chore(deps): update dependency typescript to ~3.7.0 (#627) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c7a6af4bb07..6d96559cf01 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -113,7 +113,7 @@ "prettier": "^1.15.1", "proxyquire": "^2.1.0", "sinon": "^7.2.5", - "typescript": "~3.6.0", + "typescript": "~3.7.0", "uuid": "^3.3.2" } } From 5780532735a7d412350384a0390557c42b08ff72 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 8 Nov 2019 06:52:44 +0200 Subject: [PATCH 0505/1029] fix(deps): update dependency eventid to v1 (#628) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6d96559cf01..51b7263e920 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -59,7 +59,7 @@ "@opencensus/propagation-stackdriver": "0.0.18", "arrify": "^2.0.0", "dot-prop": "^5.1.0", - "eventid": "^0.1.2", + "eventid": "^1.0.0", "extend": "^3.0.2", "gcp-metadata": "^3.1.0", "google-auth-library": "^5.2.2", From dc3619e2d489b4bd5d5b7cdd09cc804eadbb3bd7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2019 09:49:57 -0800 Subject: [PATCH 0506/1029] chore: release 5.5.5 (#629) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 7f06b1f66de..76e4a9c394c 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [5.5.5](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.4...v5.5.5) (2019-11-08) + + +### Bug Fixes + +* **deps:** update dependency eventid to v1 ([#628](https://www.github.com/googleapis/nodejs-logging/issues/628)) ([2128ef1](https://www.github.com/googleapis/nodejs-logging/commit/2128ef195538e8149d32a0c7cbb1ee5723b161d3)) + ### [5.5.4](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.3...v5.5.4) (2019-10-25) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 51b7263e920..420fe0ab622 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.5.4", + "version": "5.5.5", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From bd44c590432f313e18ce906cc80a9de0cace6560 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 15 Nov 2019 10:20:09 -0800 Subject: [PATCH 0507/1029] chore: add gitattributes to kokoro --- handwritten/logging/.kokoro/.gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 handwritten/logging/.kokoro/.gitattributes diff --git a/handwritten/logging/.kokoro/.gitattributes b/handwritten/logging/.kokoro/.gitattributes new file mode 100644 index 00000000000..87acd4f484e --- /dev/null +++ b/handwritten/logging/.kokoro/.gitattributes @@ -0,0 +1 @@ +* linguist-generated=true From 7aa1771c3a4230877df04e6afab49fece6bb973a Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 15 Nov 2019 10:25:29 -0800 Subject: [PATCH 0508/1029] fix(docs): snippets are now replaced in jsdoc comments (#634) --- handwritten/logging/.jsdoc.js | 3 ++- handwritten/logging/package.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 96d76684a94..ddab7400ad6 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -26,7 +26,8 @@ module.exports = { destination: './docs/' }, plugins: [ - 'plugins/markdown' + 'plugins/markdown', + 'jsdoc-region-tag' ], source: { excludePattern: '(^|\\/|\\\\)[._]', diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 420fe0ab622..e9c8addc670 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -103,6 +103,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", "mocha": "^6.1.4", "mv": "^2.1.1", From 90d8c1ff79c7f7a79d511287a6570dd2124f21e3 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Nov 2019 08:54:45 -0800 Subject: [PATCH 0509/1029] chore: update license headers --- handwritten/logging/system-test/install.ts | 28 ++++++++++------------ handwritten/logging/test/common.ts | 28 ++++++++++------------ handwritten/logging/test/entry.ts | 28 ++++++++++------------ handwritten/logging/test/index.ts | 28 ++++++++++------------ handwritten/logging/test/log.ts | 28 ++++++++++------------ handwritten/logging/test/metadata.ts | 28 ++++++++++------------ handwritten/logging/test/sink.ts | 28 ++++++++++------------ 7 files changed, 91 insertions(+), 105 deletions(-) diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index 01d156f1849..26fb61498cf 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -1,18 +1,16 @@ -/** - * Copyright 2019 Google LLC. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. import execa = require('execa'); import * as mv from 'mv'; diff --git a/handwritten/logging/test/common.ts b/handwritten/logging/test/common.ts index 36add787fd4..0b7b6b49168 100644 --- a/handwritten/logging/test/common.ts +++ b/handwritten/logging/test/common.ts @@ -1,18 +1,16 @@ -/** - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. import { ObjectToStructConverter, diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index caef19c42f1..b205add7a66 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -1,18 +1,16 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. import * as assert from 'assert'; import * as extend from 'extend'; diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index a82ee6d4493..f9416baa5cc 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -1,18 +1,16 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. import {util} from '@google-cloud/common'; import {CallbackifyAllOptions} from '@google-cloud/promisify'; diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index a7df1ff51cf..87581792615 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -1,18 +1,16 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 58cb2f82df3..dea9f253e2c 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -1,18 +1,16 @@ -/** - * Copyright 2016 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2016 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. import * as assert from 'assert'; import BigNumber from 'bignumber.js'; diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index 9496d42ac21..ae4c413f5fd 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -1,18 +1,16 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; From a41f4bd20bc1b6c4a9c8f429d113713f0ff72426 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 3 Dec 2019 09:58:40 -0800 Subject: [PATCH 0510/1029] feat(samples): add example of including httpRequest metadata in log (#650) --- handwritten/logging/README.md | 1 + handwritten/logging/linkinator.config.json | 3 ++- handwritten/logging/package.json | 10 ++++------ handwritten/logging/system-test/logging.ts | 10 ++++++++-- .../test/middleware/express/test-make-middleware.ts | 4 +++- handwritten/logging/test/sink.ts | 7 ++++--- 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 3d4ebb4dc0e..b1e59c83223 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -113,6 +113,7 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | | Fluent | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/fluent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/fluent.js,samples/README.md) | +| Log HTTP Request | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/http-request.js,samples/README.md) | | Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/logs.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | diff --git a/handwritten/logging/linkinator.config.json b/handwritten/logging/linkinator.config.json index d780d6bfff5..584fe4009f1 100644 --- a/handwritten/logging/linkinator.config.json +++ b/handwritten/logging/linkinator.config.json @@ -2,6 +2,7 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com" + "www.googleapis.com", + "https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js" ] } diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e9c8addc670..b484c9fbfca 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -30,13 +30,11 @@ "stackdriver" ], "scripts": { - "cover": "nyc --reporter=lcov mocha build/test/*.js build/test/**/*.js build/test/**/**/*.js && nyc report", - "test-no-cover": "mocha build/test/*.js", - "test": "npm run cover", + "test": "c8 mocha --recursive ./build/test", "docs": "jsdoc -c .jsdoc.js", "presystem-test": "npm run compile", - "system-test": "mocha build/system-test --timeout 600000", - "samples-test": "cd samples/ && npm test && cd ../", + "system-test": "c8 mocha build/system-test --timeout 600000", + "samples-test": "cd samples/ && c8 npm test && cd ../", "lint": "gts check && eslint '**/*.js'", "check": "gts check", "clean": "gts clean", @@ -91,6 +89,7 @@ "@types/uuid": "^3.4.4", "assert-rejects": "^1.0.0", "bignumber.js": "^9.0.0", + "c8": "^6.0.1", "codecov": "^3.0.4", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", @@ -109,7 +108,6 @@ "mv": "^2.1.1", "ncp": "^2.0.0", "nock": "^11.3.2", - "nyc": "^14.0.0", "power-assert": "^1.6.0", "prettier": "^1.15.1", "proxyquire": "^2.1.0", diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 3de16c431bd..4b2ef7e5a47 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -417,7 +417,10 @@ describe('Logging', () => { getEntriesFromLog(log, (err, entries) => { assert.ifError(err); - assert.deepStrictEqual(entries!.map(x => x.data), ['3', '2', '1']); + assert.deepStrictEqual( + entries!.map(x => x.data), + ['3', '2', '1'] + ); done(); }); }); @@ -434,7 +437,10 @@ describe('Logging', () => { getEntriesFromLog(log, (err, entries) => { assert.ifError(err); - assert.deepStrictEqual(entries!.reverse().map(x => x.data), messages); + assert.deepStrictEqual( + entries!.reverse().map(x => x.data), + messages + ); done(); }); }); diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 98bd0df63dc..6e0e2e316a4 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -42,7 +42,9 @@ describe('middleware/express/make-middleware', () => { describe('makeMiddleware', () => { const {makeMiddleware} = proxyquire( '../../../src/middleware/express/make-middleware', - {'../context': FAKE_CONTEXT} + { + '../context': FAKE_CONTEXT, + } ); it('should return a function accepting 3 arguments', () => { diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index ae4c413f5fd..fb5c79a5d4b 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -200,9 +200,10 @@ describe('Sink', () => { sink.getMetadata = async () => { throw error; }; - sink - .setMetadata(METADATA) - .then(() => {}, err => assert.strictEqual(err, error)); + sink.setMetadata(METADATA).then( + () => {}, + err => assert.strictEqual(err, error) + ); }); it('should execute gax method', async () => { From 6a586ad72dfeb33d99ffacbe1a2fb72541854824 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 3 Dec 2019 10:59:29 -0800 Subject: [PATCH 0511/1029] fix!: properly depend on Long in protos (#640) --- handwritten/logging/package.json | 12 +- handwritten/logging/proto/logging.d.ts | 6371 -------- handwritten/logging/proto/logging_config.d.ts | 5376 ------- handwritten/logging/protos/protos.d.ts | 4617 +++--- handwritten/logging/protos/protos.js | 12900 ++++++++-------- handwritten/logging/protos/protos.json | 1182 +- handwritten/logging/src/entry.ts | 2 +- handwritten/logging/src/index.ts | 15 +- handwritten/logging/src/log.ts | 2 +- 9 files changed, 9376 insertions(+), 21101 deletions(-) delete mode 100644 handwritten/logging/proto/logging.d.ts delete mode 100644 handwritten/logging/proto/logging_config.d.ts diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b484c9fbfca..aa2cfe80121 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -12,8 +12,7 @@ "types": "./build/src/index.d.ts", "files": [ "build/src", - "build/protos", - "build/proto" + "build/protos" ], "keywords": [ "google apis client", @@ -38,14 +37,11 @@ "lint": "gts check && eslint '**/*.js'", "check": "gts check", "clean": "gts clean", - "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp -r proto build && cp test/*.js build/test", + "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp test/*.js build/test", "fix": "gts fix && eslint --fix '**/*.js'", "prepare": "npm run compile", "pretest": "npm run compile", "posttest": "npm run check", - "proto": "npm run proto:logging && npm run proto:logging_config", - "proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -", - "proto:logging_config": "pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging_config.proto | pbts -o proto/logging_config.d.ts -", "docs-test": "linkinator docs", "predocs-test": "npm run docs" }, @@ -61,10 +57,9 @@ "extend": "^3.0.2", "gcp-metadata": "^3.1.0", "google-auth-library": "^5.2.2", - "google-gax": "^1.7.5", + "google-gax": "^1.11.0", "is": "^3.3.0", "on-finished": "^2.3.0", - "protobufjs": "^6.8.8", "pumpify": "^2.0.0", "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", @@ -96,7 +91,6 @@ "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", "execa": "^3.2.0", - "google-proto-files": "^1.0.0", "gts": "^1.0.0", "http2spy": "^1.1.0", "intelli-espower-loader": "^1.0.1", diff --git a/handwritten/logging/proto/logging.d.ts b/handwritten/logging/proto/logging.d.ts deleted file mode 100644 index fac423c5d8c..00000000000 --- a/handwritten/logging/proto/logging.d.ts +++ /dev/null @@ -1,6371 +0,0 @@ -import * as $protobuf from "protobufjs"; -/** Namespace google. */ -export namespace google { - - /** Namespace logging. */ - namespace logging { - - /** Namespace v2. */ - namespace v2 { - - /** Represents a LoggingServiceV2 */ - class LoggingServiceV2 extends $protobuf.rpc.Service { - - /** - * Constructs a new LoggingServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; - - /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; - - /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @returns Promise - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; - - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; - - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @returns Promise - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; - - /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse - */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; - - /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @returns Promise - */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; - - /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; - - /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns Promise - */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; - - /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogsResponse - */ - public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; - - /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @returns Promise - */ - public listLogs(request: google.logging.v2.IListLogsRequest): Promise; - } - - namespace LoggingServiceV2 { - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @param error Error, if any - * @param [response] WriteLogEntriesResponse - */ - type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @param error Error, if any - * @param [response] ListLogEntriesResponse - */ - type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @param error Error, if any - * @param [response] ListMonitoredResourceDescriptorsResponse - */ - type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @param error Error, if any - * @param [response] ListLogsResponse - */ - type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; - } - - /** Properties of a DeleteLogRequest. */ - interface IDeleteLogRequest { - - /** DeleteLogRequest logName */ - logName?: (string|null); - } - - /** Represents a DeleteLogRequest. */ - class DeleteLogRequest implements IDeleteLogRequest { - - /** - * Constructs a new DeleteLogRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IDeleteLogRequest); - - /** DeleteLogRequest logName. */ - public logName: string; - - /** - * Creates a new DeleteLogRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteLogRequest instance - */ - public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; - - /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; - - /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; - - /** - * Verifies a DeleteLogRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteLogRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; - - /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @param message DeleteLogRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteLogRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WriteLogEntriesRequest. */ - interface IWriteLogEntriesRequest { - - /** WriteLogEntriesRequest logName */ - logName?: (string|null); - - /** WriteLogEntriesRequest resource */ - resource?: (google.api.IMonitoredResource|null); - - /** WriteLogEntriesRequest labels */ - labels?: ({ [k: string]: string }|null); - - /** WriteLogEntriesRequest entries */ - entries?: (google.logging.v2.ILogEntry[]|null); - - /** WriteLogEntriesRequest partialSuccess */ - partialSuccess?: (boolean|null); - - /** WriteLogEntriesRequest dryRun */ - dryRun?: (boolean|null); - } - - /** Represents a WriteLogEntriesRequest. */ - class WriteLogEntriesRequest implements IWriteLogEntriesRequest { - - /** - * Constructs a new WriteLogEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); - - /** WriteLogEntriesRequest logName. */ - public logName: string; - - /** WriteLogEntriesRequest resource. */ - public resource?: (google.api.IMonitoredResource|null); - - /** WriteLogEntriesRequest labels. */ - public labels: { [k: string]: string }; - - /** WriteLogEntriesRequest entries. */ - public entries: google.logging.v2.ILogEntry[]; - - /** WriteLogEntriesRequest partialSuccess. */ - public partialSuccess: boolean; - - /** WriteLogEntriesRequest dryRun. */ - public dryRun: boolean; - - /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WriteLogEntriesRequest instance - */ - public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; - - /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; - - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; - - /** - * Verifies a WriteLogEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WriteLogEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; - - /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. - * @param message WriteLogEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WriteLogEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WriteLogEntriesResponse. */ - interface IWriteLogEntriesResponse { - } - - /** Represents a WriteLogEntriesResponse. */ - class WriteLogEntriesResponse implements IWriteLogEntriesResponse { - - /** - * Constructs a new WriteLogEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); - - /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns WriteLogEntriesResponse instance - */ - public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; - - /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WriteLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; - - /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; - - /** - * Verifies a WriteLogEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WriteLogEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; - - /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. - * @param message WriteLogEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WriteLogEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WriteLogEntriesPartialErrors. */ - interface IWriteLogEntriesPartialErrors { - - /** WriteLogEntriesPartialErrors logEntryErrors */ - logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); - } - - /** Represents a WriteLogEntriesPartialErrors. */ - class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { - - /** - * Constructs a new WriteLogEntriesPartialErrors. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); - - /** WriteLogEntriesPartialErrors logEntryErrors. */ - public logEntryErrors: { [k: string]: google.rpc.IStatus }; - - /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. - * @param [properties] Properties to set - * @returns WriteLogEntriesPartialErrors instance - */ - public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; - - /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WriteLogEntriesPartialErrors - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; - - /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesPartialErrors - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; - - /** - * Verifies a WriteLogEntriesPartialErrors message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WriteLogEntriesPartialErrors - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; - - /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. - * @param message WriteLogEntriesPartialErrors - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WriteLogEntriesPartialErrors to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListLogEntriesRequest. */ - interface IListLogEntriesRequest { - - /** ListLogEntriesRequest projectIds */ - projectIds?: (string[]|null); - - /** ListLogEntriesRequest resourceNames */ - resourceNames?: (string[]|null); - - /** ListLogEntriesRequest filter */ - filter?: (string|null); - - /** ListLogEntriesRequest orderBy */ - orderBy?: (string|null); - - /** ListLogEntriesRequest pageSize */ - pageSize?: (number|null); - - /** ListLogEntriesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListLogEntriesRequest. */ - class ListLogEntriesRequest implements IListLogEntriesRequest { - - /** - * Constructs a new ListLogEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogEntriesRequest); - - /** ListLogEntriesRequest projectIds. */ - public projectIds: string[]; - - /** ListLogEntriesRequest resourceNames. */ - public resourceNames: string[]; - - /** ListLogEntriesRequest filter. */ - public filter: string; - - /** ListLogEntriesRequest orderBy. */ - public orderBy: string; - - /** ListLogEntriesRequest pageSize. */ - public pageSize: number; - - /** ListLogEntriesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListLogEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogEntriesRequest instance - */ - public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; - - /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; - - /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; - - /** - * Verifies a ListLogEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; - - /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. - * @param message ListLogEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLogEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListLogEntriesResponse. */ - interface IListLogEntriesResponse { - - /** ListLogEntriesResponse entries */ - entries?: (google.logging.v2.ILogEntry[]|null); - - /** ListLogEntriesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListLogEntriesResponse. */ - class ListLogEntriesResponse implements IListLogEntriesResponse { - - /** - * Constructs a new ListLogEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogEntriesResponse); - - /** ListLogEntriesResponse entries. */ - public entries: google.logging.v2.ILogEntry[]; - - /** ListLogEntriesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListLogEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogEntriesResponse instance - */ - public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; - - /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; - - /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; - - /** - * Verifies a ListLogEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; - - /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. - * @param message ListLogEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLogEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListMonitoredResourceDescriptorsRequest. */ - interface IListMonitoredResourceDescriptorsRequest { - - /** ListMonitoredResourceDescriptorsRequest pageSize */ - pageSize?: (number|null); - - /** ListMonitoredResourceDescriptorsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListMonitoredResourceDescriptorsRequest. */ - class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { - - /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); - - /** ListMonitoredResourceDescriptorsRequest pageSize. */ - public pageSize: number; - - /** ListMonitoredResourceDescriptorsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsRequest instance - */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; - - /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; - - /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMonitoredResourceDescriptorsRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; - - /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListMonitoredResourceDescriptorsResponse. */ - interface IListMonitoredResourceDescriptorsResponse { - - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ - resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); - - /** ListMonitoredResourceDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListMonitoredResourceDescriptorsResponse. */ - class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { - - /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); - - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ - public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; - - /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsResponse instance - */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; - - /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; - - /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMonitoredResourceDescriptorsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; - - /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListLogsRequest. */ - interface IListLogsRequest { - - /** ListLogsRequest parent */ - parent?: (string|null); - - /** ListLogsRequest pageSize */ - pageSize?: (number|null); - - /** ListLogsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListLogsRequest. */ - class ListLogsRequest implements IListLogsRequest { - - /** - * Constructs a new ListLogsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogsRequest); - - /** ListLogsRequest parent. */ - public parent: string; - - /** ListLogsRequest pageSize. */ - public pageSize: number; - - /** ListLogsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListLogsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogsRequest instance - */ - public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; - - /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLogsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; - - /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; - - /** - * Verifies a ListLogsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogsRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; - - /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. - * @param message ListLogsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLogsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListLogsResponse. */ - interface IListLogsResponse { - - /** ListLogsResponse logNames */ - logNames?: (string[]|null); - - /** ListLogsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListLogsResponse. */ - class ListLogsResponse implements IListLogsResponse { - - /** - * Constructs a new ListLogsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogsResponse); - - /** ListLogsResponse logNames. */ - public logNames: string[]; - - /** ListLogsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListLogsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogsResponse instance - */ - public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; - - /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLogsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; - - /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; - - /** - * Verifies a ListLogsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; - - /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. - * @param message ListLogsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLogsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LogEntry. */ - interface ILogEntry { - - /** LogEntry logName */ - logName?: (string|null); - - /** LogEntry resource */ - resource?: (google.api.IMonitoredResource|null); - - /** LogEntry protoPayload */ - protoPayload?: (google.protobuf.IAny|null); - - /** LogEntry textPayload */ - textPayload?: (string|null); - - /** LogEntry jsonPayload */ - jsonPayload?: (google.protobuf.IStruct|null); - - /** LogEntry timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry receiveTimestamp */ - receiveTimestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry severity */ - severity?: (google.logging.type.LogSeverity|null); - - /** LogEntry insertId */ - insertId?: (string|null); - - /** LogEntry httpRequest */ - httpRequest?: (google.logging.type.IHttpRequest|null); - - /** LogEntry labels */ - labels?: ({ [k: string]: string }|null); - - /** LogEntry metadata */ - metadata?: (google.api.IMonitoredResourceMetadata|null); - - /** LogEntry operation */ - operation?: (google.logging.v2.ILogEntryOperation|null); - - /** LogEntry trace */ - trace?: (string|null); - - /** LogEntry spanId */ - spanId?: (string|null); - - /** LogEntry traceSampled */ - traceSampled?: (boolean|null); - - /** LogEntry sourceLocation */ - sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); - } - - /** Represents a LogEntry. */ - class LogEntry implements ILogEntry { - - /** - * Constructs a new LogEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogEntry); - - /** LogEntry logName. */ - public logName: string; - - /** LogEntry resource. */ - public resource?: (google.api.IMonitoredResource|null); - - /** LogEntry protoPayload. */ - public protoPayload?: (google.protobuf.IAny|null); - - /** LogEntry textPayload. */ - public textPayload: string; - - /** LogEntry jsonPayload. */ - public jsonPayload?: (google.protobuf.IStruct|null); - - /** LogEntry timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry receiveTimestamp. */ - public receiveTimestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry severity. */ - public severity: google.logging.type.LogSeverity; - - /** LogEntry insertId. */ - public insertId: string; - - /** LogEntry httpRequest. */ - public httpRequest?: (google.logging.type.IHttpRequest|null); - - /** LogEntry labels. */ - public labels: { [k: string]: string }; - - /** LogEntry metadata. */ - public metadata?: (google.api.IMonitoredResourceMetadata|null); - - /** LogEntry operation. */ - public operation?: (google.logging.v2.ILogEntryOperation|null); - - /** LogEntry trace. */ - public trace: string; - - /** LogEntry spanId. */ - public spanId: string; - - /** LogEntry traceSampled. */ - public traceSampled: boolean; - - /** LogEntry sourceLocation. */ - public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); - - /** LogEntry payload. */ - public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); - - /** - * Creates a new LogEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns LogEntry instance - */ - public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; - - /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LogEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; - - /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; - - /** - * Verifies a LogEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogEntry - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; - - /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @param message LogEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LogEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LogEntryOperation. */ - interface ILogEntryOperation { - - /** LogEntryOperation id */ - id?: (string|null); - - /** LogEntryOperation producer */ - producer?: (string|null); - - /** LogEntryOperation first */ - first?: (boolean|null); - - /** LogEntryOperation last */ - last?: (boolean|null); - } - - /** Represents a LogEntryOperation. */ - class LogEntryOperation implements ILogEntryOperation { - - /** - * Constructs a new LogEntryOperation. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogEntryOperation); - - /** LogEntryOperation id. */ - public id: string; - - /** LogEntryOperation producer. */ - public producer: string; - - /** LogEntryOperation first. */ - public first: boolean; - - /** LogEntryOperation last. */ - public last: boolean; - - /** - * Creates a new LogEntryOperation instance using the specified properties. - * @param [properties] Properties to set - * @returns LogEntryOperation instance - */ - public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; - - /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LogEntryOperation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogEntryOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; - - /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogEntryOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; - - /** - * Verifies a LogEntryOperation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogEntryOperation - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; - - /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. - * @param message LogEntryOperation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LogEntryOperation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LogEntrySourceLocation. */ - interface ILogEntrySourceLocation { - - /** LogEntrySourceLocation file */ - file?: (string|null); - - /** LogEntrySourceLocation line */ - line?: (number|Long|null); - - /** LogEntrySourceLocation function */ - "function"?: (string|null); - } - - /** Represents a LogEntrySourceLocation. */ - class LogEntrySourceLocation implements ILogEntrySourceLocation { - - /** - * Constructs a new LogEntrySourceLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogEntrySourceLocation); - - /** LogEntrySourceLocation file. */ - public file: string; - - /** LogEntrySourceLocation line. */ - public line: (number|Long); - - /** LogEntrySourceLocation function. */ - public function: string; - - /** - * Creates a new LogEntrySourceLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns LogEntrySourceLocation instance - */ - public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; - - /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; - - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; - - /** - * Verifies a LogEntrySourceLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogEntrySourceLocation - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; - - /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. - * @param message LogEntrySourceLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LogEntrySourceLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a HttpRequest. */ - interface IHttpRequest { - - /** HttpRequest requestMethod */ - requestMethod?: (string|null); - - /** HttpRequest requestUrl */ - requestUrl?: (string|null); - - /** HttpRequest requestSize */ - requestSize?: (number|Long|null); - - /** HttpRequest status */ - status?: (number|null); - - /** HttpRequest responseSize */ - responseSize?: (number|Long|null); - - /** HttpRequest userAgent */ - userAgent?: (string|null); - - /** HttpRequest remoteIp */ - remoteIp?: (string|null); - - /** HttpRequest serverIp */ - serverIp?: (string|null); - - /** HttpRequest referer */ - referer?: (string|null); - - /** HttpRequest latency */ - latency?: (google.protobuf.IDuration|null); - - /** HttpRequest cacheLookup */ - cacheLookup?: (boolean|null); - - /** HttpRequest cacheHit */ - cacheHit?: (boolean|null); - - /** HttpRequest cacheValidatedWithOriginServer */ - cacheValidatedWithOriginServer?: (boolean|null); - - /** HttpRequest cacheFillBytes */ - cacheFillBytes?: (number|Long|null); - - /** HttpRequest protocol */ - protocol?: (string|null); - } - - /** Represents a HttpRequest. */ - class HttpRequest implements IHttpRequest { - - /** - * Constructs a new HttpRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.type.IHttpRequest); - - /** HttpRequest requestMethod. */ - public requestMethod: string; - - /** HttpRequest requestUrl. */ - public requestUrl: string; - - /** HttpRequest requestSize. */ - public requestSize: (number|Long); - - /** HttpRequest status. */ - public status: number; - - /** HttpRequest responseSize. */ - public responseSize: (number|Long); - - /** HttpRequest userAgent. */ - public userAgent: string; - - /** HttpRequest remoteIp. */ - public remoteIp: string; - - /** HttpRequest serverIp. */ - public serverIp: string; - - /** HttpRequest referer. */ - public referer: string; - - /** HttpRequest latency. */ - public latency?: (google.protobuf.IDuration|null); - - /** HttpRequest cacheLookup. */ - public cacheLookup: boolean; - - /** HttpRequest cacheHit. */ - public cacheHit: boolean; - - /** HttpRequest cacheValidatedWithOriginServer. */ - public cacheValidatedWithOriginServer: boolean; - - /** HttpRequest cacheFillBytes. */ - public cacheFillBytes: (number|Long); - - /** HttpRequest protocol. */ - public protocol: string; - - /** - * Creates a new HttpRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRequest instance - */ - public static create(properties?: google.logging.type.IHttpRequest): google.logging.type.HttpRequest; - - /** - * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. - * @param message HttpRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. - * @param message HttpRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.type.HttpRequest; - - /** - * Decodes a HttpRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.type.HttpRequest; - - /** - * Verifies a HttpRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.type.HttpRequest; - - /** - * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. - * @param message HttpRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.type.HttpRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** LogSeverity enum. */ - enum LogSeverity { - DEFAULT = 0, - DEBUG = 100, - INFO = 200, - NOTICE = 300, - WARNING = 400, - ERROR = 500, - CRITICAL = 600, - ALERT = 700, - EMERGENCY = 800 - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get: string; - - /** HttpRule put. */ - public put: string; - - /** HttpRule post. */ - public post: string; - - /** HttpRule delete. */ - public delete: string; - - /** HttpRule patch. */ - public patch: string; - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MonitoredResourceDescriptor. */ - interface IMonitoredResourceDescriptor { - - /** MonitoredResourceDescriptor name */ - name?: (string|null); - - /** MonitoredResourceDescriptor type */ - type?: (string|null); - - /** MonitoredResourceDescriptor displayName */ - displayName?: (string|null); - - /** MonitoredResourceDescriptor description */ - description?: (string|null); - - /** MonitoredResourceDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - } - - /** Represents a MonitoredResourceDescriptor. */ - class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { - - /** - * Constructs a new MonitoredResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMonitoredResourceDescriptor); - - /** MonitoredResourceDescriptor name. */ - public name: string; - - /** MonitoredResourceDescriptor type. */ - public type: string; - - /** MonitoredResourceDescriptor displayName. */ - public displayName: string; - - /** MonitoredResourceDescriptor description. */ - public description: string; - - /** MonitoredResourceDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoredResourceDescriptor instance - */ - public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; - - /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoredResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; - - /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoredResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; - - /** - * Verifies a MonitoredResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoredResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; - - /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @param message MonitoredResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MonitoredResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MonitoredResource. */ - interface IMonitoredResource { - - /** MonitoredResource type */ - type?: (string|null); - - /** MonitoredResource labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a MonitoredResource. */ - class MonitoredResource implements IMonitoredResource { - - /** - * Constructs a new MonitoredResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMonitoredResource); - - /** MonitoredResource type. */ - public type: string; - - /** MonitoredResource labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new MonitoredResource instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoredResource instance - */ - public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; - - /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MonitoredResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoredResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; - - /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoredResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; - - /** - * Verifies a MonitoredResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoredResource - */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; - - /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @param message MonitoredResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MonitoredResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MonitoredResourceMetadata. */ - interface IMonitoredResourceMetadata { - - /** MonitoredResourceMetadata systemLabels */ - systemLabels?: (google.protobuf.IStruct|null); - - /** MonitoredResourceMetadata userLabels */ - userLabels?: ({ [k: string]: string }|null); - } - - /** Represents a MonitoredResourceMetadata. */ - class MonitoredResourceMetadata implements IMonitoredResourceMetadata { - - /** - * Constructs a new MonitoredResourceMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMonitoredResourceMetadata); - - /** MonitoredResourceMetadata systemLabels. */ - public systemLabels?: (google.protobuf.IStruct|null); - - /** MonitoredResourceMetadata userLabels. */ - public userLabels: { [k: string]: string }; - - /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoredResourceMetadata instance - */ - public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; - - /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoredResourceMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; - - /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoredResourceMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; - - /** - * Verifies a MonitoredResourceMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoredResourceMetadata - */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; - - /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @param message MonitoredResourceMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MonitoredResourceMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { - - /** LabelDescriptor key */ - key?: (string|null); - - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|null); - - /** LabelDescriptor description */ - description?: (string|null); - } - - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { - - /** - * Constructs a new LabelDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ILabelDescriptor); - - /** LabelDescriptor key. */ - public key: string; - - /** LabelDescriptor valueType. */ - public valueType: google.api.LabelDescriptor.ValueType; - - /** LabelDescriptor description. */ - public description: string; - - /** - * Creates a new LabelDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns LabelDescriptor instance - */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; - - /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LabelDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; - - /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; - - /** - * Verifies a LabelDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LabelDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; - - /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LabelDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace LabelDescriptor { - - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; - - /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a Struct. */ - interface IStruct { - - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } - - /** Represents a Struct. */ - class Struct implements IStruct { - - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); - - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; - - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; - - /** - * Verifies a Struct message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue: google.protobuf.NullValue; - - /** Value numberValue. */ - public numberValue: number; - - /** Value stringValue. */ - public stringValue: string; - - /** Value boolValue. */ - public boolValue: boolean; - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; - - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } - - /** Represents a ListValue. */ - class ListValue implements IListValue { - - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; - - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; - - /** - * Verifies a ListValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: Uint8Array; - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } -} diff --git a/handwritten/logging/proto/logging_config.d.ts b/handwritten/logging/proto/logging_config.d.ts deleted file mode 100644 index b96ed56b7c7..00000000000 --- a/handwritten/logging/proto/logging_config.d.ts +++ /dev/null @@ -1,5376 +0,0 @@ -import * as $protobuf from "protobufjs"; -/** Namespace google. */ -export namespace google { - - /** Namespace logging. */ - namespace logging { - - /** Namespace v2. */ - namespace v2 { - - /** Represents a ConfigServiceV2 */ - class ConfigServiceV2 extends $protobuf.rpc.Service { - - /** - * Constructs a new ConfigServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; - - /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSinksResponse - */ - public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; - - /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @returns Promise - */ - public listSinks(request: google.logging.v2.IListSinksRequest): Promise; - - /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; - - /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @returns Promise - */ - public getSink(request: google.logging.v2.IGetSinkRequest): Promise; - - /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; - - /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @returns Promise - */ - public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; - - /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; - - /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @returns Promise - */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; - - /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; - - /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @returns Promise - */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; - - /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse - */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; - - /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @returns Promise - */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; - - /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; - - /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @returns Promise - */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; - - /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; - - /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @returns Promise - */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; - - /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; - - /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @returns Promise - */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; - - /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; - - /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @returns Promise - */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; - } - - namespace ConfigServiceV2 { - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @param error Error, if any - * @param [response] ListSinksResponse - */ - type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @param error Error, if any - * @param [response] LogSink - */ - type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @param error Error, if any - * @param [response] LogSink - */ - type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @param error Error, if any - * @param [response] LogSink - */ - type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @param error Error, if any - * @param [response] ListExclusionsResponse - */ - type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @param error Error, if any - * @param [response] LogExclusion - */ - type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @param error Error, if any - * @param [response] LogExclusion - */ - type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @param error Error, if any - * @param [response] LogExclusion - */ - type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of a LogSink. */ - interface ILogSink { - - /** LogSink name */ - name?: (string|null); - - /** LogSink destination */ - destination?: (string|null); - - /** LogSink filter */ - filter?: (string|null); - - /** LogSink outputVersionFormat */ - outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|null); - - /** LogSink writerIdentity */ - writerIdentity?: (string|null); - - /** LogSink includeChildren */ - includeChildren?: (boolean|null); - - /** LogSink startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** LogSink endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a LogSink. */ - class LogSink implements ILogSink { - - /** - * Constructs a new LogSink. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogSink); - - /** LogSink name. */ - public name: string; - - /** LogSink destination. */ - public destination: string; - - /** LogSink filter. */ - public filter: string; - - /** LogSink outputVersionFormat. */ - public outputVersionFormat: google.logging.v2.LogSink.VersionFormat; - - /** LogSink writerIdentity. */ - public writerIdentity: string; - - /** LogSink includeChildren. */ - public includeChildren: boolean; - - /** LogSink startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** LogSink endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new LogSink instance using the specified properties. - * @param [properties] Properties to set - * @returns LogSink instance - */ - public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; - - /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LogSink message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogSink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; - - /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogSink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; - - /** - * Verifies a LogSink message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogSink - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; - - /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. - * @param message LogSink - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LogSink to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace LogSink { - - /** VersionFormat enum. */ - enum VersionFormat { - VERSION_FORMAT_UNSPECIFIED = 0, - V2 = 1, - V1 = 2 - } - } - - /** Properties of a ListSinksRequest. */ - interface IListSinksRequest { - - /** ListSinksRequest parent */ - parent?: (string|null); - - /** ListSinksRequest pageToken */ - pageToken?: (string|null); - - /** ListSinksRequest pageSize */ - pageSize?: (number|null); - } - - /** Represents a ListSinksRequest. */ - class ListSinksRequest implements IListSinksRequest { - - /** - * Constructs a new ListSinksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListSinksRequest); - - /** ListSinksRequest parent. */ - public parent: string; - - /** ListSinksRequest pageToken. */ - public pageToken: string; - - /** ListSinksRequest pageSize. */ - public pageSize: number; - - /** - * Creates a new ListSinksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSinksRequest instance - */ - public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; - - /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSinksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSinksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; - - /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSinksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; - - /** - * Verifies a ListSinksRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSinksRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; - - /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. - * @param message ListSinksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSinksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListSinksResponse. */ - interface IListSinksResponse { - - /** ListSinksResponse sinks */ - sinks?: (google.logging.v2.ILogSink[]|null); - - /** ListSinksResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSinksResponse. */ - class ListSinksResponse implements IListSinksResponse { - - /** - * Constructs a new ListSinksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListSinksResponse); - - /** ListSinksResponse sinks. */ - public sinks: google.logging.v2.ILogSink[]; - - /** ListSinksResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSinksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSinksResponse instance - */ - public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; - - /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSinksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSinksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; - - /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSinksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; - - /** - * Verifies a ListSinksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSinksResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; - - /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. - * @param message ListSinksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSinksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSinkRequest. */ - interface IGetSinkRequest { - - /** GetSinkRequest sinkName */ - sinkName?: (string|null); - } - - /** Represents a GetSinkRequest. */ - class GetSinkRequest implements IGetSinkRequest { - - /** - * Constructs a new GetSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IGetSinkRequest); - - /** GetSinkRequest sinkName. */ - public sinkName: string; - - /** - * Creates a new GetSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSinkRequest instance - */ - public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; - - /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; - - /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; - - /** - * Verifies a GetSinkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSinkRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; - - /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. - * @param message GetSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateSinkRequest. */ - interface ICreateSinkRequest { - - /** CreateSinkRequest parent */ - parent?: (string|null); - - /** CreateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); - - /** CreateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); - } - - /** Represents a CreateSinkRequest. */ - class CreateSinkRequest implements ICreateSinkRequest { - - /** - * Constructs a new CreateSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ICreateSinkRequest); - - /** CreateSinkRequest parent. */ - public parent: string; - - /** CreateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); - - /** CreateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; - - /** - * Creates a new CreateSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSinkRequest instance - */ - public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; - - /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; - - /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; - - /** - * Verifies a CreateSinkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateSinkRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; - - /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. - * @param message CreateSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpdateSinkRequest. */ - interface IUpdateSinkRequest { - - /** UpdateSinkRequest sinkName */ - sinkName?: (string|null); - - /** UpdateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); - - /** UpdateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); - - /** UpdateSinkRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateSinkRequest. */ - class UpdateSinkRequest implements IUpdateSinkRequest { - - /** - * Constructs a new UpdateSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IUpdateSinkRequest); - - /** UpdateSinkRequest sinkName. */ - public sinkName: string; - - /** UpdateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); - - /** UpdateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; - - /** UpdateSinkRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSinkRequest instance - */ - public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; - - /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; - - /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; - - /** - * Verifies an UpdateSinkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateSinkRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; - - /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @param message UpdateSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteSinkRequest. */ - interface IDeleteSinkRequest { - - /** DeleteSinkRequest sinkName */ - sinkName?: (string|null); - } - - /** Represents a DeleteSinkRequest. */ - class DeleteSinkRequest implements IDeleteSinkRequest { - - /** - * Constructs a new DeleteSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IDeleteSinkRequest); - - /** DeleteSinkRequest sinkName. */ - public sinkName: string; - - /** - * Creates a new DeleteSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSinkRequest instance - */ - public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; - - /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; - - /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; - - /** - * Verifies a DeleteSinkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSinkRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; - - /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @param message DeleteSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LogExclusion. */ - interface ILogExclusion { - - /** LogExclusion name */ - name?: (string|null); - - /** LogExclusion description */ - description?: (string|null); - - /** LogExclusion filter */ - filter?: (string|null); - - /** LogExclusion disabled */ - disabled?: (boolean|null); - } - - /** Represents a LogExclusion. */ - class LogExclusion implements ILogExclusion { - - /** - * Constructs a new LogExclusion. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogExclusion); - - /** LogExclusion name. */ - public name: string; - - /** LogExclusion description. */ - public description: string; - - /** LogExclusion filter. */ - public filter: string; - - /** LogExclusion disabled. */ - public disabled: boolean; - - /** - * Creates a new LogExclusion instance using the specified properties. - * @param [properties] Properties to set - * @returns LogExclusion instance - */ - public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; - - /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LogExclusion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; - - /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; - - /** - * Verifies a LogExclusion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogExclusion - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; - - /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @param message LogExclusion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LogExclusion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListExclusionsRequest. */ - interface IListExclusionsRequest { - - /** ListExclusionsRequest parent */ - parent?: (string|null); - - /** ListExclusionsRequest pageToken */ - pageToken?: (string|null); - - /** ListExclusionsRequest pageSize */ - pageSize?: (number|null); - } - - /** Represents a ListExclusionsRequest. */ - class ListExclusionsRequest implements IListExclusionsRequest { - - /** - * Constructs a new ListExclusionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListExclusionsRequest); - - /** ListExclusionsRequest parent. */ - public parent: string; - - /** ListExclusionsRequest pageToken. */ - public pageToken: string; - - /** ListExclusionsRequest pageSize. */ - public pageSize: number; - - /** - * Creates a new ListExclusionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListExclusionsRequest instance - */ - public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; - - /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; - - /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; - - /** - * Verifies a ListExclusionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListExclusionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; - - /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @param message ListExclusionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListExclusionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListExclusionsResponse. */ - interface IListExclusionsResponse { - - /** ListExclusionsResponse exclusions */ - exclusions?: (google.logging.v2.ILogExclusion[]|null); - - /** ListExclusionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListExclusionsResponse. */ - class ListExclusionsResponse implements IListExclusionsResponse { - - /** - * Constructs a new ListExclusionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListExclusionsResponse); - - /** ListExclusionsResponse exclusions. */ - public exclusions: google.logging.v2.ILogExclusion[]; - - /** ListExclusionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListExclusionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListExclusionsResponse instance - */ - public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; - - /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; - - /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; - - /** - * Verifies a ListExclusionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListExclusionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; - - /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. - * @param message ListExclusionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListExclusionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetExclusionRequest. */ - interface IGetExclusionRequest { - - /** GetExclusionRequest name */ - name?: (string|null); - } - - /** Represents a GetExclusionRequest. */ - class GetExclusionRequest implements IGetExclusionRequest { - - /** - * Constructs a new GetExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IGetExclusionRequest); - - /** GetExclusionRequest name. */ - public name: string; - - /** - * Creates a new GetExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetExclusionRequest instance - */ - public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; - - /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; - - /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; - - /** - * Verifies a GetExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; - - /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. - * @param message GetExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateExclusionRequest. */ - interface ICreateExclusionRequest { - - /** CreateExclusionRequest parent */ - parent?: (string|null); - - /** CreateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); - } - - /** Represents a CreateExclusionRequest. */ - class CreateExclusionRequest implements ICreateExclusionRequest { - - /** - * Constructs a new CreateExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ICreateExclusionRequest); - - /** CreateExclusionRequest parent. */ - public parent: string; - - /** CreateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); - - /** - * Creates a new CreateExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateExclusionRequest instance - */ - public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; - - /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; - - /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; - - /** - * Verifies a CreateExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; - - /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @param message CreateExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpdateExclusionRequest. */ - interface IUpdateExclusionRequest { - - /** UpdateExclusionRequest name */ - name?: (string|null); - - /** UpdateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); - - /** UpdateExclusionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateExclusionRequest. */ - class UpdateExclusionRequest implements IUpdateExclusionRequest { - - /** - * Constructs a new UpdateExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IUpdateExclusionRequest); - - /** UpdateExclusionRequest name. */ - public name: string; - - /** UpdateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); - - /** UpdateExclusionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateExclusionRequest instance - */ - public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; - - /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; - - /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; - - /** - * Verifies an UpdateExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; - - /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. - * @param message UpdateExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteExclusionRequest. */ - interface IDeleteExclusionRequest { - - /** DeleteExclusionRequest name */ - name?: (string|null); - } - - /** Represents a DeleteExclusionRequest. */ - class DeleteExclusionRequest implements IDeleteExclusionRequest { - - /** - * Constructs a new DeleteExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IDeleteExclusionRequest); - - /** DeleteExclusionRequest name. */ - public name: string; - - /** - * Creates a new DeleteExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteExclusionRequest instance - */ - public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; - - /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; - - /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; - - /** - * Verifies a DeleteExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; - - /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. - * @param message DeleteExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get: string; - - /** HttpRule put. */ - public put: string; - - /** HttpRule post. */ - public post: string; - - /** HttpRule delete. */ - public delete: string; - - /** HttpRule patch. */ - public patch: string; - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; - - /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } -} diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 0a64a133796..94b5a518e14 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1,3 +1,18 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as Long from "long"; import * as $protobuf from "protobufjs"; /** Namespace google. */ export namespace google { @@ -5,381 +20,323 @@ export namespace google { /** Namespace protobuf. */ namespace protobuf { - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); + /** Properties of a Struct. */ + interface IStruct { - /** Duration nanos */ - nanos?: (number|null); + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new Duration. + * Constructs a new Struct. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); + constructor(properties?: google.protobuf.IStruct); - /** Duration nanos. */ - public nanos: number; + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Struct instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Duration + * @returns Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @returns Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; /** - * Verifies a Duration message. + * Verifies a Struct message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Empty. */ - interface IEmpty { + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents a Value. */ + class Value implements IValue { /** - * Constructs a new Empty. + * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue: google.protobuf.NullValue; + + /** Value numberValue. */ + public numberValue: number; + + /** Value stringValue. */ + public stringValue: string; + + /** Value boolValue. */ + public boolValue: boolean; + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); /** - * Creates a new Empty instance using the specified properties. + * Creates a new Value instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns Value instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; /** - * Verifies an Empty message. + * Verifies a Value message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldMask. */ - interface IFieldMask { + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } - /** FieldMask paths */ - paths?: (string[]|null); + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents a ListValue. */ + class ListValue implements IListValue { /** - * Constructs a new FieldMask. + * Constructs a new ListValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); + constructor(properties?: google.protobuf.IListValue); - /** FieldMask paths. */ - public paths: string[]; + /** ListValue values. */ + public values: google.protobuf.IValue[]; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns ListValue instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; /** - * Verifies a FieldMask message. + * Verifies a ListValue message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns ListValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this ListValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** Timestamp nanos */ - nanos?: (number|null); + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { /** * Constructs a new FileDescriptorSet. @@ -3479,405 +3436,463 @@ export namespace google { } } - /** Properties of a Struct. */ - interface IStruct { + /** Properties of a Duration. */ + interface IDuration { - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); } - /** Represents a Struct. */ - class Struct implements IStruct { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Struct. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStruct); + constructor(properties?: google.protobuf.IDuration); - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; /** - * Creates a new Struct instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Struct instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Struct + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Struct + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a Struct message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Struct + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Struct to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); + /** Properties of an Any. */ + interface IAny { - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); + /** Any type_url */ + type_url?: (string|null); - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); + /** Any value */ + value?: (Uint8Array|null); } - /** Represents a Value. */ - class Value implements IValue { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new Value. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue: google.protobuf.NullValue; - - /** Value numberValue. */ - public numberValue: number; - - /** Value stringValue. */ - public stringValue: string; - - /** Value boolValue. */ - public boolValue: boolean; - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); + constructor(properties?: google.protobuf.IAny); - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); + /** Any type_url. */ + public type_url: string; - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + /** Any value. */ + public value: Uint8Array; /** - * Creates a new Value instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns Value instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Value + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Value + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a Value message. + * Verifies an Any message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Value + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Value to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } + /** Properties of a Timestamp. */ + interface ITimestamp { - /** Properties of a ListValue. */ - interface IListValue { + /** Timestamp seconds */ + seconds?: (number|Long|null); - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents a ListValue. */ - class ListValue implements IListValue { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new ListValue. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IListValue); + constructor(properties?: google.protobuf.ITimestamp); - /** ListValue values. */ - public values: google.protobuf.IValue[]; + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new ListValue instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns ListValue instance + * @returns Timestamp instance */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListValue + * @returns Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListValue + * @returns Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a ListValue message. + * Verifies a Timestamp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListValue + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListValue to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Any. */ - interface IAny { + /** Properties of an Empty. */ + interface IEmpty { + } - /** Any type_url */ - type_url?: (string|null); + /** Represents an Empty. */ + class Empty implements IEmpty { - /** Any value */ - value?: (Uint8Array|null); + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Represents an Any. */ - class Any implements IAny { + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new Any. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; + constructor(properties?: google.protobuf.IFieldMask); - /** Any value. */ - public value: Uint8Array; + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new Any instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns FieldMask instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Any + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Any + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies an Any message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Any + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -3890,11 +3905,11 @@ export namespace google { /** Namespace v2. */ namespace v2 { - /** Represents a ConfigServiceV2 */ - class ConfigServiceV2 extends $protobuf.rpc.Service { + /** Represents a LoggingServiceV2 */ + class LoggingServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new ConfigServiceV2 service. + * Constructs a new LoggingServiceV2 service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -3902,3278 +3917,3278 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. + * Creates new LoggingServiceV2 service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSinksResponse + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; + public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @returns Promise - */ - public listSinks(request: google.logging.v2.IListSinksRequest): Promise; - - /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; - - /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object * @returns Promise */ - public getSink(request: google.logging.v2.IGetSinkRequest): Promise; + public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse */ - public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object * @returns Promise */ - public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object * @returns Promise */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object * @returns Promise */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogsResponse */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; + public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object + * Calls ListLogs. + * @param request ListLogsRequest message or plain object * @returns Promise */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; + public listLogs(request: google.logging.v2.IListLogsRequest): Promise; + } - /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; + namespace LoggingServiceV2 { /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @returns Promise + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @param error Error, if any + * @param [response] Empty */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; + type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @param error Error, if any + * @param [response] WriteLogEntriesResponse */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; + type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @returns Promise + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @param error Error, if any + * @param [response] ListLogEntriesResponse */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; + type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @returns Promise + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @param error Error, if any + * @param [response] ListLogsResponse */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; + type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; + } - /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; + /** Properties of a DeleteLogRequest. */ + interface IDeleteLogRequest { - /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @returns Promise - */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; + /** DeleteLogRequest logName */ + logName?: (string|null); } - namespace ConfigServiceV2 { + /** Represents a DeleteLogRequest. */ + class DeleteLogRequest implements IDeleteLogRequest { /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @param error Error, if any - * @param [response] ListSinksResponse + * Constructs a new DeleteLogRequest. + * @param [properties] Properties to set */ - type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; + constructor(properties?: google.logging.v2.IDeleteLogRequest); + + /** DeleteLogRequest logName. */ + public logName: string; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @param error Error, if any - * @param [response] LogSink + * Creates a new DeleteLogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLogRequest instance */ - type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @param error Error, if any - * @param [response] LogSink + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @param error Error, if any - * @param [response] LogSink + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @param error Error, if any - * @param [response] Empty + * Decodes a DeleteLogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @param error Error, if any - * @param [response] ListExclusionsResponse + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Verifies a DeleteLogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLogRequest */ - type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @param message DeleteLogRequest + * @param [options] Conversion options + * @returns Plain object */ - type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @param error Error, if any - * @param [response] Empty + * Converts this DeleteLogRequest to JSON. + * @returns JSON object */ - type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a LogSink. */ - interface ILogSink { - - /** LogSink name */ - name?: (string|null); + /** Properties of a WriteLogEntriesRequest. */ + interface IWriteLogEntriesRequest { - /** LogSink destination */ - destination?: (string|null); + /** WriteLogEntriesRequest logName */ + logName?: (string|null); - /** LogSink filter */ - filter?: (string|null); + /** WriteLogEntriesRequest resource */ + resource?: (google.api.IMonitoredResource|null); - /** LogSink outputVersionFormat */ - outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|null); + /** WriteLogEntriesRequest labels */ + labels?: ({ [k: string]: string }|null); - /** LogSink writerIdentity */ - writerIdentity?: (string|null); + /** WriteLogEntriesRequest entries */ + entries?: (google.logging.v2.ILogEntry[]|null); - /** LogSink includeChildren */ - includeChildren?: (boolean|null); - - /** LogSink bigqueryOptions */ - bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); - - /** LogSink createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** LogSink updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** LogSink startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** WriteLogEntriesRequest partialSuccess */ + partialSuccess?: (boolean|null); - /** LogSink endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** WriteLogEntriesRequest dryRun */ + dryRun?: (boolean|null); } - /** Represents a LogSink. */ - class LogSink implements ILogSink { + /** Represents a WriteLogEntriesRequest. */ + class WriteLogEntriesRequest implements IWriteLogEntriesRequest { /** - * Constructs a new LogSink. + * Constructs a new WriteLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogSink); - - /** LogSink name. */ - public name: string; - - /** LogSink destination. */ - public destination: string; - - /** LogSink filter. */ - public filter: string; - - /** LogSink outputVersionFormat. */ - public outputVersionFormat: google.logging.v2.LogSink.VersionFormat; - - /** LogSink writerIdentity. */ - public writerIdentity: string; - - /** LogSink includeChildren. */ - public includeChildren: boolean; + constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); - /** LogSink bigqueryOptions. */ - public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + /** WriteLogEntriesRequest logName. */ + public logName: string; - /** LogSink createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** WriteLogEntriesRequest resource. */ + public resource?: (google.api.IMonitoredResource|null); - /** LogSink updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** WriteLogEntriesRequest labels. */ + public labels: { [k: string]: string }; - /** LogSink startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** WriteLogEntriesRequest entries. */ + public entries: google.logging.v2.ILogEntry[]; - /** LogSink endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** WriteLogEntriesRequest partialSuccess. */ + public partialSuccess: boolean; - /** LogSink options. */ - public options?: "bigqueryOptions"; + /** WriteLogEntriesRequest dryRun. */ + public dryRun: boolean; /** - * Creates a new LogSink instance using the specified properties. + * Creates a new WriteLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogSink instance + * @returns WriteLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; + public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogSink + * @returns WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogSink + * @returns WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; /** - * Verifies a LogSink message. + * Verifies a WriteLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogSink + * @returns WriteLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. - * @param message LogSink + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @param message WriteLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogSink to JSON. + * Converts this WriteLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LogSink { - - /** VersionFormat enum. */ - enum VersionFormat { - VERSION_FORMAT_UNSPECIFIED = 0, - V2 = 1, - V1 = 2 - } - } - - /** Properties of a BigQueryOptions. */ - interface IBigQueryOptions { - - /** BigQueryOptions usePartitionedTables */ - usePartitionedTables?: (boolean|null); + /** Properties of a WriteLogEntriesResponse. */ + interface IWriteLogEntriesResponse { } - /** Represents a BigQueryOptions. */ - class BigQueryOptions implements IBigQueryOptions { + /** Represents a WriteLogEntriesResponse. */ + class WriteLogEntriesResponse implements IWriteLogEntriesResponse { /** - * Constructs a new BigQueryOptions. + * Constructs a new WriteLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IBigQueryOptions); - - /** BigQueryOptions usePartitionedTables. */ - public usePartitionedTables: boolean; + constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new WriteLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryOptions instance + * @returns WriteLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; + public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryOptions + * @returns WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryOptions + * @returns WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; /** - * Verifies a BigQueryOptions message. + * Verifies a WriteLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryOptions + * @returns WriteLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. - * @param message BigQueryOptions + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @param message WriteLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryOptions to JSON. + * Converts this WriteLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksRequest. */ - interface IListSinksRequest { - - /** ListSinksRequest parent */ - parent?: (string|null); - - /** ListSinksRequest pageToken */ - pageToken?: (string|null); + /** Properties of a WriteLogEntriesPartialErrors. */ + interface IWriteLogEntriesPartialErrors { - /** ListSinksRequest pageSize */ - pageSize?: (number|null); + /** WriteLogEntriesPartialErrors logEntryErrors */ + logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); } - /** Represents a ListSinksRequest. */ - class ListSinksRequest implements IListSinksRequest { + /** Represents a WriteLogEntriesPartialErrors. */ + class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { /** - * Constructs a new ListSinksRequest. + * Constructs a new WriteLogEntriesPartialErrors. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksRequest); - - /** ListSinksRequest parent. */ - public parent: string; - - /** ListSinksRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); - /** ListSinksRequest pageSize. */ - public pageSize: number; + /** WriteLogEntriesPartialErrors logEntryErrors. */ + public logEntryErrors: { [k: string]: google.rpc.IStatus }; /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksRequest instance + * @returns WriteLogEntriesPartialErrors instance */ - public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; + public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksRequest + * @returns WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksRequest + * @returns WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Verifies a ListSinksRequest message. + * Verifies a WriteLogEntriesPartialErrors message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksRequest + * @returns WriteLogEntriesPartialErrors */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. - * @param message ListSinksRequest + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @param message WriteLogEntriesPartialErrors * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksRequest to JSON. + * Converts this WriteLogEntriesPartialErrors to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksResponse. */ - interface IListSinksResponse { + /** Properties of a ListLogEntriesRequest. */ + interface IListLogEntriesRequest { - /** ListSinksResponse sinks */ - sinks?: (google.logging.v2.ILogSink[]|null); + /** ListLogEntriesRequest projectIds */ + projectIds?: (string[]|null); - /** ListSinksResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); + + /** ListLogEntriesRequest filter */ + filter?: (string|null); + + /** ListLogEntriesRequest orderBy */ + orderBy?: (string|null); + + /** ListLogEntriesRequest pageSize */ + pageSize?: (number|null); + + /** ListLogEntriesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ListSinksResponse. */ - class ListSinksResponse implements IListSinksResponse { + /** Represents a ListLogEntriesRequest. */ + class ListLogEntriesRequest implements IListLogEntriesRequest { /** - * Constructs a new ListSinksResponse. + * Constructs a new ListLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksResponse); + constructor(properties?: google.logging.v2.IListLogEntriesRequest); - /** ListSinksResponse sinks. */ - public sinks: google.logging.v2.ILogSink[]; + /** ListLogEntriesRequest projectIds. */ + public projectIds: string[]; - /** ListSinksResponse nextPageToken. */ - public nextPageToken: string; + /** ListLogEntriesRequest resourceNames. */ + public resourceNames: string[]; + + /** ListLogEntriesRequest filter. */ + public filter: string; + + /** ListLogEntriesRequest orderBy. */ + public orderBy: string; + + /** ListLogEntriesRequest pageSize. */ + public pageSize: number; + + /** ListLogEntriesRequest pageToken. */ + public pageToken: string; /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new ListLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksResponse instance + * @returns ListLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; + public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksResponse + * @returns ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksResponse + * @returns ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; /** - * Verifies a ListSinksResponse message. + * Verifies a ListLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksResponse + * @returns ListLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. - * @param message ListSinksResponse + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @param message ListLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksResponse to JSON. + * Converts this ListLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSinkRequest. */ - interface IGetSinkRequest { + /** Properties of a ListLogEntriesResponse. */ + interface IListLogEntriesResponse { - /** GetSinkRequest sinkName */ - sinkName?: (string|null); + /** ListLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** ListLogEntriesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetSinkRequest. */ - class GetSinkRequest implements IGetSinkRequest { + /** Represents a ListLogEntriesResponse. */ + class ListLogEntriesResponse implements IListLogEntriesResponse { /** - * Constructs a new GetSinkRequest. + * Constructs a new ListLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetSinkRequest); + constructor(properties?: google.logging.v2.IListLogEntriesResponse); - /** GetSinkRequest sinkName. */ - public sinkName: string; + /** ListLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** ListLogEntriesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetSinkRequest instance using the specified properties. + * Creates a new ListLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSinkRequest instance + * @returns ListLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; + public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSinkRequest + * @returns ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSinkRequest + * @returns ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; /** - * Verifies a GetSinkRequest message. + * Verifies a ListLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSinkRequest + * @returns ListLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. - * @param message GetSinkRequest + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @param message ListLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSinkRequest to JSON. + * Converts this ListLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateSinkRequest. */ - interface ICreateSinkRequest { - - /** CreateSinkRequest parent */ - parent?: (string|null); + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { - /** CreateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** ListMonitoredResourceDescriptorsRequest pageSize */ + pageSize?: (number|null); - /** CreateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** ListMonitoredResourceDescriptorsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a CreateSinkRequest. */ - class CreateSinkRequest implements ICreateSinkRequest { + /** Represents a ListMonitoredResourceDescriptorsRequest. */ + class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { /** - * Constructs a new CreateSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICreateSinkRequest); - - /** CreateSinkRequest parent. */ - public parent: string; + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); - /** CreateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + /** ListMonitoredResourceDescriptorsRequest pageSize. */ + public pageSize: number; - /** CreateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ListMonitoredResourceDescriptorsRequest pageToken. */ + public pageToken: string; /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSinkRequest instance + * @returns ListMonitoredResourceDescriptorsRequest instance */ - public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Verifies a CreateSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. - * @param message CreateSinkRequest + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSinkRequest. */ - interface IUpdateSinkRequest { - - /** UpdateSinkRequest sinkName */ - sinkName?: (string|null); - - /** UpdateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** Properties of a ListMonitoredResourceDescriptorsResponse. */ + interface IListMonitoredResourceDescriptorsResponse { - /** UpdateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ + resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); - /** UpdateSinkRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListMonitoredResourceDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateSinkRequest. */ - class UpdateSinkRequest implements IUpdateSinkRequest { + /** Represents a ListMonitoredResourceDescriptorsResponse. */ + class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { /** - * Constructs a new UpdateSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateSinkRequest); - - /** UpdateSinkRequest sinkName. */ - public sinkName: string; - - /** UpdateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); - /** UpdateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ + public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; - /** UpdateSinkRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSinkRequest instance + * @returns ListMonitoredResourceDescriptorsResponse instance */ - public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Verifies an UpdateSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @param message UpdateSinkRequest + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteSinkRequest. */ - interface IDeleteSinkRequest { + /** Properties of a ListLogsRequest. */ + interface IListLogsRequest { - /** DeleteSinkRequest sinkName */ - sinkName?: (string|null); + /** ListLogsRequest parent */ + parent?: (string|null); + + /** ListLogsRequest pageSize */ + pageSize?: (number|null); + + /** ListLogsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DeleteSinkRequest. */ - class DeleteSinkRequest implements IDeleteSinkRequest { + /** Represents a ListLogsRequest. */ + class ListLogsRequest implements IListLogsRequest { /** - * Constructs a new DeleteSinkRequest. + * Constructs a new ListLogsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteSinkRequest); + constructor(properties?: google.logging.v2.IListLogsRequest); - /** DeleteSinkRequest sinkName. */ - public sinkName: string; + /** ListLogsRequest parent. */ + public parent: string; + + /** ListLogsRequest pageSize. */ + public pageSize: number; + + /** ListLogsRequest pageToken. */ + public pageToken: string; /** - * Creates a new DeleteSinkRequest instance using the specified properties. + * Creates a new ListLogsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSinkRequest instance + * @returns ListLogsRequest instance */ - public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSinkRequest + * @returns ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSinkRequest + * @returns ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; /** - * Verifies a DeleteSinkRequest message. + * Verifies a ListLogsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSinkRequest + * @returns ListLogsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @param message DeleteSinkRequest + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * @param message ListLogsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSinkRequest to JSON. + * Converts this ListLogsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogExclusion. */ - interface ILogExclusion { - - /** LogExclusion name */ - name?: (string|null); - - /** LogExclusion description */ - description?: (string|null); - - /** LogExclusion filter */ - filter?: (string|null); - - /** LogExclusion disabled */ - disabled?: (boolean|null); + /** Properties of a ListLogsResponse. */ + interface IListLogsResponse { - /** LogExclusion createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListLogsResponse logNames */ + logNames?: (string[]|null); - /** LogExclusion updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListLogsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a LogExclusion. */ - class LogExclusion implements ILogExclusion { + /** Represents a ListLogsResponse. */ + class ListLogsResponse implements IListLogsResponse { /** - * Constructs a new LogExclusion. + * Constructs a new ListLogsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogExclusion); - - /** LogExclusion name. */ - public name: string; - - /** LogExclusion description. */ - public description: string; - - /** LogExclusion filter. */ - public filter: string; - - /** LogExclusion disabled. */ - public disabled: boolean; + constructor(properties?: google.logging.v2.IListLogsResponse); - /** LogExclusion createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListLogsResponse logNames. */ + public logNames: string[]; - /** LogExclusion updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListLogsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new LogExclusion instance using the specified properties. + * Creates a new ListLogsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns LogExclusion instance + * @returns ListLogsResponse instance */ - public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; + public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogExclusion message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogExclusion + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogExclusion + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; /** - * Verifies a LogExclusion message. + * Verifies a ListLogsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogExclusion + * @returns ListLogsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @param message LogExclusion + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @param message ListLogsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogExclusion to JSON. + * Converts this ListLogsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListExclusionsRequest. */ - interface IListExclusionsRequest { + /** Properties of a LogEntry. */ + interface ILogEntry { - /** ListExclusionsRequest parent */ - parent?: (string|null); + /** LogEntry logName */ + logName?: (string|null); - /** ListExclusionsRequest pageToken */ - pageToken?: (string|null); + /** LogEntry resource */ + resource?: (google.api.IMonitoredResource|null); - /** ListExclusionsRequest pageSize */ - pageSize?: (number|null); + /** LogEntry protoPayload */ + protoPayload?: (google.protobuf.IAny|null); + + /** LogEntry textPayload */ + textPayload?: (string|null); + + /** LogEntry jsonPayload */ + jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp */ + receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity */ + severity?: (google.logging.type.LogSeverity|null); + + /** LogEntry insertId */ + insertId?: (string|null); + + /** LogEntry httpRequest */ + httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels */ + labels?: ({ [k: string]: string }|null); + + /** LogEntry metadata */ + metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation */ + operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace */ + trace?: (string|null); + + /** LogEntry spanId */ + spanId?: (string|null); + + /** LogEntry traceSampled */ + traceSampled?: (boolean|null); + + /** LogEntry sourceLocation */ + sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); } - /** Represents a ListExclusionsRequest. */ - class ListExclusionsRequest implements IListExclusionsRequest { + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { /** - * Constructs a new ListExclusionsRequest. + * Constructs a new LogEntry. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListExclusionsRequest); + constructor(properties?: google.logging.v2.ILogEntry); - /** ListExclusionsRequest parent. */ - public parent: string; + /** LogEntry logName. */ + public logName: string; - /** ListExclusionsRequest pageToken. */ - public pageToken: string; + /** LogEntry resource. */ + public resource?: (google.api.IMonitoredResource|null); - /** ListExclusionsRequest pageSize. */ - public pageSize: number; + /** LogEntry protoPayload. */ + public protoPayload?: (google.protobuf.IAny|null); + + /** LogEntry textPayload. */ + public textPayload: string; + + /** LogEntry jsonPayload. */ + public jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp. */ + public receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity. */ + public severity: google.logging.type.LogSeverity; + + /** LogEntry insertId. */ + public insertId: string; + + /** LogEntry httpRequest. */ + public httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels. */ + public labels: { [k: string]: string }; + + /** LogEntry metadata. */ + public metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation. */ + public operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace. */ + public trace: string; + + /** LogEntry spanId. */ + public spanId: string; + + /** LogEntry traceSampled. */ + public traceSampled: boolean; + + /** LogEntry sourceLocation. */ + public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + + /** LogEntry payload. */ + public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); /** - * Creates a new ListExclusionsRequest instance using the specified properties. + * Creates a new LogEntry instance using the specified properties. * @param [properties] Properties to set - * @returns ListExclusionsRequest instance + * @returns LogEntry instance */ - public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; + public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * Decodes a LogEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExclusionsRequest + * @returns LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExclusionsRequest + * @returns LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; /** - * Verifies a ListExclusionsRequest message. + * Verifies a LogEntry message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExclusionsRequest + * @returns LogEntry */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @param message ListExclusionsRequest + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExclusionsRequest to JSON. + * Converts this LogEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListExclusionsResponse. */ - interface IListExclusionsResponse { + /** Properties of a LogEntryOperation. */ + interface ILogEntryOperation { - /** ListExclusionsResponse exclusions */ - exclusions?: (google.logging.v2.ILogExclusion[]|null); + /** LogEntryOperation id */ + id?: (string|null); - /** ListExclusionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** LogEntryOperation producer */ + producer?: (string|null); + + /** LogEntryOperation first */ + first?: (boolean|null); + + /** LogEntryOperation last */ + last?: (boolean|null); } - /** Represents a ListExclusionsResponse. */ - class ListExclusionsResponse implements IListExclusionsResponse { + /** Represents a LogEntryOperation. */ + class LogEntryOperation implements ILogEntryOperation { /** - * Constructs a new ListExclusionsResponse. + * Constructs a new LogEntryOperation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListExclusionsResponse); + constructor(properties?: google.logging.v2.ILogEntryOperation); - /** ListExclusionsResponse exclusions. */ - public exclusions: google.logging.v2.ILogExclusion[]; + /** LogEntryOperation id. */ + public id: string; - /** ListExclusionsResponse nextPageToken. */ - public nextPageToken: string; + /** LogEntryOperation producer. */ + public producer: string; + + /** LogEntryOperation first. */ + public first: boolean; + + /** LogEntryOperation last. */ + public last: boolean; /** - * Creates a new ListExclusionsResponse instance using the specified properties. + * Creates a new LogEntryOperation instance using the specified properties. * @param [properties] Properties to set - * @returns ListExclusionsResponse instance + * @returns LogEntryOperation instance */ - public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; + public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * Decodes a LogEntryOperation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExclusionsResponse + * @returns LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExclusionsResponse + * @returns LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; /** - * Verifies a ListExclusionsResponse message. + * Verifies a LogEntryOperation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExclusionsResponse + * @returns LogEntryOperation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. - * @param message ListExclusionsResponse + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @param message LogEntryOperation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExclusionsResponse to JSON. + * Converts this LogEntryOperation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetExclusionRequest. */ - interface IGetExclusionRequest { + /** Properties of a LogEntrySourceLocation. */ + interface ILogEntrySourceLocation { - /** GetExclusionRequest name */ - name?: (string|null); + /** LogEntrySourceLocation file */ + file?: (string|null); + + /** LogEntrySourceLocation line */ + line?: (number|Long|null); + + /** LogEntrySourceLocation function */ + "function"?: (string|null); } - /** Represents a GetExclusionRequest. */ - class GetExclusionRequest implements IGetExclusionRequest { + /** Represents a LogEntrySourceLocation. */ + class LogEntrySourceLocation implements ILogEntrySourceLocation { /** - * Constructs a new GetExclusionRequest. + * Constructs a new LogEntrySourceLocation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetExclusionRequest); + constructor(properties?: google.logging.v2.ILogEntrySourceLocation); - /** GetExclusionRequest name. */ - public name: string; + /** LogEntrySourceLocation file. */ + public file: string; + + /** LogEntrySourceLocation line. */ + public line: (number|Long); + + /** LogEntrySourceLocation function. */ + public function: string; /** - * Creates a new GetExclusionRequest instance using the specified properties. + * Creates a new LogEntrySourceLocation instance using the specified properties. * @param [properties] Properties to set - * @returns GetExclusionRequest instance + * @returns LogEntrySourceLocation instance */ - public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; + public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetExclusionRequest + * @returns LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetExclusionRequest + * @returns LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; /** - * Verifies a GetExclusionRequest message. + * Verifies a LogEntrySourceLocation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetExclusionRequest + * @returns LogEntrySourceLocation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. - * @param message GetExclusionRequest + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @param message LogEntrySourceLocation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetExclusionRequest to JSON. + * Converts this LogEntrySourceLocation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateExclusionRequest. */ - interface ICreateExclusionRequest { - - /** CreateExclusionRequest parent */ - parent?: (string|null); - - /** CreateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); - } - - /** Represents a CreateExclusionRequest. */ - class CreateExclusionRequest implements ICreateExclusionRequest { + /** Represents a ConfigServiceV2 */ + class ConfigServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new CreateExclusionRequest. - * @param [properties] Properties to set + * Constructs a new ConfigServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.logging.v2.ICreateExclusionRequest); - - /** CreateExclusionRequest parent. */ - public parent: string; - - /** CreateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new CreateExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateExclusionRequest instance + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSinksResponse */ - public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listSinks(request: google.logging.v2.IListSinksRequest): Promise; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; + public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; + public getSink(request: google.logging.v2.IGetSinkRequest): Promise; /** - * Verifies a CreateExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public static verify(message: { [k: string]: any }): (string|null); + public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateExclusionRequest + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; + public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @param message CreateExclusionRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; /** - * Converts this CreateExclusionRequest to JSON. - * @returns JSON object + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpdateExclusionRequest. */ - interface IUpdateExclusionRequest { - - /** UpdateExclusionRequest name */ - name?: (string|null); - - /** UpdateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); - - /** UpdateExclusionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateExclusionRequest. */ - class UpdateExclusionRequest implements IUpdateExclusionRequest { + public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; /** - * Constructs a new UpdateExclusionRequest. - * @param [properties] Properties to set + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - constructor(properties?: google.logging.v2.IUpdateExclusionRequest); - - /** UpdateExclusionRequest name. */ - public name: string; - - /** UpdateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); - - /** UpdateExclusionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; /** - * Creates a new UpdateExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateExclusionRequest instance + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @returns Promise */ - public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; + public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse */ - public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; + public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; + public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; /** - * Verifies an UpdateExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - public static verify(message: { [k: string]: any }): (string|null); + public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateExclusionRequest + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; + public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. - * @param message UpdateExclusionRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; /** - * Converts this UpdateExclusionRequest to JSON. - * @returns JSON object + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; - /** Properties of a DeleteExclusionRequest. */ - interface IDeleteExclusionRequest { + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; - /** DeleteExclusionRequest name */ - name?: (string|null); + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @returns Promise + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; } - /** Represents a DeleteExclusionRequest. */ - class DeleteExclusionRequest implements IDeleteExclusionRequest { + namespace ConfigServiceV2 { /** - * Constructs a new DeleteExclusionRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @param error Error, if any + * @param [response] ListSinksResponse */ - constructor(properties?: google.logging.v2.IDeleteExclusionRequest); - - /** DeleteExclusionRequest name. */ - public name: string; + type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteExclusionRequest instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; + type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @param error Error, if any + * @param [response] Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; + type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @param error Error, if any + * @param [response] ListExclusionsResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; + type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; /** - * Verifies a DeleteExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static verify(message: { [k: string]: any }): (string|null); + type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteExclusionRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; + type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. - * @param message DeleteExclusionRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Converts this DeleteExclusionRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @param error Error, if any + * @param [response] Empty */ - public toJSON(): { [k: string]: any }; + type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Represents a LoggingServiceV2 */ - class LoggingServiceV2 extends $protobuf.rpc.Service { + /** Properties of a LogSink. */ + interface ILogSink { - /** - * Constructs a new LoggingServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** LogSink name */ + name?: (string|null); - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; + /** LogSink destination */ + destination?: (string|null); + + /** LogSink filter */ + filter?: (string|null); + + /** LogSink outputVersionFormat */ + outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|null); + + /** LogSink writerIdentity */ + writerIdentity?: (string|null); + + /** LogSink includeChildren */ + includeChildren?: (boolean|null); + + /** LogSink bigqueryOptions */ + bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogSink updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogSink startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** LogSink endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a LogSink. */ + class LogSink implements ILogSink { /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Constructs a new LogSink. + * @param [properties] Properties to set */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; + constructor(properties?: google.logging.v2.ILogSink); + + /** LogSink name. */ + public name: string; + + /** LogSink destination. */ + public destination: string; + + /** LogSink filter. */ + public filter: string; + + /** LogSink outputVersionFormat. */ + public outputVersionFormat: google.logging.v2.LogSink.VersionFormat; + + /** LogSink writerIdentity. */ + public writerIdentity: string; + + /** LogSink includeChildren. */ + public includeChildren: boolean; + + /** LogSink bigqueryOptions. */ + public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogSink updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @returns Promise - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; + /** LogSink startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; + /** LogSink endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @returns Promise - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; + /** LogSink options. */ + public options?: "bigqueryOptions"; /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * Creates a new LogSink instance using the specified properties. + * @param [properties] Properties to set + * @returns LogSink instance */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; + public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @returns Promise + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; + public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; + public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns Promise + * Decodes a LogSink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogsResponse + * Decodes a LogSink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @returns Promise + * Verifies a LogSink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listLogs(request: google.logging.v2.IListLogsRequest): Promise; - } - - namespace LoggingServiceV2 { + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @param error Error, if any - * @param [response] Empty + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogSink */ - type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @param error Error, if any - * @param [response] WriteLogEntriesResponse + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @param message LogSink + * @param [options] Conversion options + * @returns Plain object */ - type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; + public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @param error Error, if any - * @param [response] ListLogEntriesResponse + * Converts this LogSink to JSON. + * @returns JSON object */ - type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @param error Error, if any - * @param [response] ListMonitoredResourceDescriptorsResponse - */ - type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; + namespace LogSink { - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @param error Error, if any - * @param [response] ListLogsResponse - */ - type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; + /** VersionFormat enum. */ + enum VersionFormat { + VERSION_FORMAT_UNSPECIFIED = 0, + V2 = 1, + V1 = 2 + } } - /** Properties of a DeleteLogRequest. */ - interface IDeleteLogRequest { + /** Properties of a BigQueryOptions. */ + interface IBigQueryOptions { - /** DeleteLogRequest logName */ - logName?: (string|null); + /** BigQueryOptions usePartitionedTables */ + usePartitionedTables?: (boolean|null); } - /** Represents a DeleteLogRequest. */ - class DeleteLogRequest implements IDeleteLogRequest { + /** Represents a BigQueryOptions. */ + class BigQueryOptions implements IBigQueryOptions { /** - * Constructs a new DeleteLogRequest. + * Constructs a new BigQueryOptions. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteLogRequest); + constructor(properties?: google.logging.v2.IBigQueryOptions); - /** DeleteLogRequest logName. */ - public logName: string; + /** BigQueryOptions usePartitionedTables. */ + public usePartitionedTables: boolean; /** - * Creates a new DeleteLogRequest instance using the specified properties. + * Creates a new BigQueryOptions instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteLogRequest instance + * @returns BigQueryOptions instance */ - public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; + public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. + * Decodes a BigQueryOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteLogRequest + * @returns BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteLogRequest + * @returns BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; /** - * Verifies a DeleteLogRequest message. + * Verifies a BigQueryOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteLogRequest + * @returns BigQueryOptions */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @param message DeleteLogRequest + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @param message BigQueryOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteLogRequest to JSON. + * Converts this BigQueryOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WriteLogEntriesRequest. */ - interface IWriteLogEntriesRequest { - - /** WriteLogEntriesRequest logName */ - logName?: (string|null); - - /** WriteLogEntriesRequest resource */ - resource?: (google.api.IMonitoredResource|null); - - /** WriteLogEntriesRequest labels */ - labels?: ({ [k: string]: string }|null); + /** Properties of a ListSinksRequest. */ + interface IListSinksRequest { - /** WriteLogEntriesRequest entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** ListSinksRequest parent */ + parent?: (string|null); - /** WriteLogEntriesRequest partialSuccess */ - partialSuccess?: (boolean|null); + /** ListSinksRequest pageToken */ + pageToken?: (string|null); - /** WriteLogEntriesRequest dryRun */ - dryRun?: (boolean|null); + /** ListSinksRequest pageSize */ + pageSize?: (number|null); } - /** Represents a WriteLogEntriesRequest. */ - class WriteLogEntriesRequest implements IWriteLogEntriesRequest { + /** Represents a ListSinksRequest. */ + class ListSinksRequest implements IListSinksRequest { /** - * Constructs a new WriteLogEntriesRequest. + * Constructs a new ListSinksRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); - - /** WriteLogEntriesRequest logName. */ - public logName: string; - - /** WriteLogEntriesRequest resource. */ - public resource?: (google.api.IMonitoredResource|null); - - /** WriteLogEntriesRequest labels. */ - public labels: { [k: string]: string }; + constructor(properties?: google.logging.v2.IListSinksRequest); - /** WriteLogEntriesRequest entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** ListSinksRequest parent. */ + public parent: string; - /** WriteLogEntriesRequest partialSuccess. */ - public partialSuccess: boolean; + /** ListSinksRequest pageToken. */ + public pageToken: string; - /** WriteLogEntriesRequest dryRun. */ - public dryRun: boolean; + /** ListSinksRequest pageSize. */ + public pageSize: number; /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. + * Creates a new ListSinksRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesRequest instance + * @returns ListSinksRequest instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; + public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * Decodes a ListSinksRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesRequest + * @returns ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesRequest + * @returns ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; /** - * Verifies a WriteLogEntriesRequest message. + * Verifies a ListSinksRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesRequest + * @returns ListSinksRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. - * @param message WriteLogEntriesRequest + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @param message ListSinksRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesRequest to JSON. + * Converts this ListSinksRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WriteLogEntriesResponse. */ - interface IWriteLogEntriesResponse { + /** Properties of a ListSinksResponse. */ + interface IListSinksResponse { + + /** ListSinksResponse sinks */ + sinks?: (google.logging.v2.ILogSink[]|null); + + /** ListSinksResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a WriteLogEntriesResponse. */ - class WriteLogEntriesResponse implements IWriteLogEntriesResponse { + /** Represents a ListSinksResponse. */ + class ListSinksResponse implements IListSinksResponse { /** - * Constructs a new WriteLogEntriesResponse. + * Constructs a new ListSinksResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); + constructor(properties?: google.logging.v2.IListSinksResponse); + + /** ListSinksResponse sinks. */ + public sinks: google.logging.v2.ILogSink[]; + + /** ListSinksResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. + * Creates a new ListSinksResponse instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesResponse instance + * @returns ListSinksResponse instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; + public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * Decodes a ListSinksResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesResponse + * @returns ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesResponse + * @returns ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; /** - * Verifies a WriteLogEntriesResponse message. + * Verifies a ListSinksResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesResponse + * @returns ListSinksResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. - * @param message WriteLogEntriesResponse + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @param message ListSinksResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesResponse to JSON. + * Converts this ListSinksResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WriteLogEntriesPartialErrors. */ - interface IWriteLogEntriesPartialErrors { + /** Properties of a GetSinkRequest. */ + interface IGetSinkRequest { - /** WriteLogEntriesPartialErrors logEntryErrors */ - logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); + /** GetSinkRequest sinkName */ + sinkName?: (string|null); } - /** Represents a WriteLogEntriesPartialErrors. */ - class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { + /** Represents a GetSinkRequest. */ + class GetSinkRequest implements IGetSinkRequest { /** - * Constructs a new WriteLogEntriesPartialErrors. + * Constructs a new GetSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); + constructor(properties?: google.logging.v2.IGetSinkRequest); - /** WriteLogEntriesPartialErrors logEntryErrors. */ - public logEntryErrors: { [k: string]: google.rpc.IStatus }; + /** GetSinkRequest sinkName. */ + public sinkName: string; /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * Creates a new GetSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesPartialErrors instance + * @returns GetSinkRequest instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; + public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * Decodes a GetSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesPartialErrors + * @returns GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesPartialErrors + * @returns GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; /** - * Verifies a WriteLogEntriesPartialErrors message. + * Verifies a GetSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesPartialErrors + * @returns GetSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. - * @param message WriteLogEntriesPartialErrors + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @param message GetSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesPartialErrors to JSON. + * Converts this GetSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogEntriesRequest. */ - interface IListLogEntriesRequest { - - /** ListLogEntriesRequest projectIds */ - projectIds?: (string[]|null); - - /** ListLogEntriesRequest resourceNames */ - resourceNames?: (string[]|null); - - /** ListLogEntriesRequest filter */ - filter?: (string|null); + /** Properties of a CreateSinkRequest. */ + interface ICreateSinkRequest { - /** ListLogEntriesRequest orderBy */ - orderBy?: (string|null); + /** CreateSinkRequest parent */ + parent?: (string|null); - /** ListLogEntriesRequest pageSize */ - pageSize?: (number|null); + /** CreateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); - /** ListLogEntriesRequest pageToken */ - pageToken?: (string|null); + /** CreateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); } - /** Represents a ListLogEntriesRequest. */ - class ListLogEntriesRequest implements IListLogEntriesRequest { + /** Represents a CreateSinkRequest. */ + class CreateSinkRequest implements ICreateSinkRequest { /** - * Constructs a new ListLogEntriesRequest. + * Constructs a new CreateSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogEntriesRequest); - - /** ListLogEntriesRequest projectIds. */ - public projectIds: string[]; - - /** ListLogEntriesRequest resourceNames. */ - public resourceNames: string[]; - - /** ListLogEntriesRequest filter. */ - public filter: string; + constructor(properties?: google.logging.v2.ICreateSinkRequest); - /** ListLogEntriesRequest orderBy. */ - public orderBy: string; + /** CreateSinkRequest parent. */ + public parent: string; - /** ListLogEntriesRequest pageSize. */ - public pageSize: number; + /** CreateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); - /** ListLogEntriesRequest pageToken. */ - public pageToken: string; + /** CreateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; /** - * Creates a new ListLogEntriesRequest instance using the specified properties. + * Creates a new CreateSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogEntriesRequest instance + * @returns CreateSinkRequest instance */ - public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; + public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * Decodes a CreateSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogEntriesRequest + * @returns CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogEntriesRequest + * @returns CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; /** - * Verifies a ListLogEntriesRequest message. + * Verifies a CreateSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogEntriesRequest + * @returns CreateSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. - * @param message ListLogEntriesRequest + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @param message CreateSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogEntriesRequest to JSON. + * Converts this CreateSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogEntriesResponse. */ - interface IListLogEntriesResponse { + /** Properties of an UpdateSinkRequest. */ + interface IUpdateSinkRequest { - /** ListLogEntriesResponse entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** UpdateSinkRequest sinkName */ + sinkName?: (string|null); - /** ListLogEntriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + + /** UpdateSinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListLogEntriesResponse. */ - class ListLogEntriesResponse implements IListLogEntriesResponse { + /** Represents an UpdateSinkRequest. */ + class UpdateSinkRequest implements IUpdateSinkRequest { /** - * Constructs a new ListLogEntriesResponse. + * Constructs a new UpdateSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogEntriesResponse); + constructor(properties?: google.logging.v2.IUpdateSinkRequest); - /** ListLogEntriesResponse entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** UpdateSinkRequest sinkName. */ + public sinkName: string; - /** ListLogEntriesResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; + + /** UpdateSinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListLogEntriesResponse instance using the specified properties. + * Creates a new UpdateSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogEntriesResponse instance + * @returns UpdateSinkRequest instance */ - public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; + public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * Decodes an UpdateSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogEntriesResponse + * @returns UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogEntriesResponse + * @returns UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; /** - * Verifies a ListLogEntriesResponse message. + * Verifies an UpdateSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogEntriesResponse + * @returns UpdateSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. - * @param message ListLogEntriesResponse + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @param message UpdateSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogEntriesResponse to JSON. + * Converts this UpdateSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMonitoredResourceDescriptorsRequest. */ - interface IListMonitoredResourceDescriptorsRequest { - - /** ListMonitoredResourceDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a DeleteSinkRequest. */ + interface IDeleteSinkRequest { - /** ListMonitoredResourceDescriptorsRequest pageToken */ - pageToken?: (string|null); + /** DeleteSinkRequest sinkName */ + sinkName?: (string|null); } - /** Represents a ListMonitoredResourceDescriptorsRequest. */ - class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + /** Represents a DeleteSinkRequest. */ + class DeleteSinkRequest implements IDeleteSinkRequest { /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new DeleteSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); - - /** ListMonitoredResourceDescriptorsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.logging.v2.IDeleteSinkRequest); - /** ListMonitoredResourceDescriptorsRequest pageToken. */ - public pageToken: string; + /** DeleteSinkRequest sinkName. */ + public sinkName: string; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new DeleteSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsRequest instance + * @returns DeleteSinkRequest instance */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsRequest + * @returns DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsRequest + * @returns DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a DeleteSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsRequest + * @returns DeleteSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsRequest + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @param message DeleteSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this DeleteSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMonitoredResourceDescriptorsResponse. */ - interface IListMonitoredResourceDescriptorsResponse { + /** Properties of a LogExclusion. */ + interface ILogExclusion { - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ - resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + /** LogExclusion name */ + name?: (string|null); - /** ListMonitoredResourceDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); + /** LogExclusion description */ + description?: (string|null); + + /** LogExclusion filter */ + filter?: (string|null); + + /** LogExclusion disabled */ + disabled?: (boolean|null); + + /** LogExclusion createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogExclusion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListMonitoredResourceDescriptorsResponse. */ - class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + /** Represents a LogExclusion. */ + class LogExclusion implements ILogExclusion { /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new LogExclusion. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); + constructor(properties?: google.logging.v2.ILogExclusion); - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ - public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + /** LogExclusion name. */ + public name: string; - /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** LogExclusion description. */ + public description: string; + + /** LogExclusion filter. */ + public filter: string; + + /** LogExclusion disabled. */ + public disabled: boolean; + + /** LogExclusion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogExclusion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * Creates a new LogExclusion instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsResponse instance + * @returns LogExclusion instance */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsResponse + * @returns LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsResponse + * @returns LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a LogExclusion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsResponse + * @returns LogExclusion */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsResponse + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * @param message LogExclusion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this LogExclusion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogsRequest. */ - interface IListLogsRequest { + /** Properties of a ListExclusionsRequest. */ + interface IListExclusionsRequest { - /** ListLogsRequest parent */ + /** ListExclusionsRequest parent */ parent?: (string|null); - /** ListLogsRequest pageSize */ - pageSize?: (number|null); - - /** ListLogsRequest pageToken */ + /** ListExclusionsRequest pageToken */ pageToken?: (string|null); + + /** ListExclusionsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a ListLogsRequest. */ - class ListLogsRequest implements IListLogsRequest { + /** Represents a ListExclusionsRequest. */ + class ListExclusionsRequest implements IListExclusionsRequest { /** - * Constructs a new ListLogsRequest. + * Constructs a new ListExclusionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogsRequest); + constructor(properties?: google.logging.v2.IListExclusionsRequest); - /** ListLogsRequest parent. */ + /** ListExclusionsRequest parent. */ public parent: string; - /** ListLogsRequest pageSize. */ - public pageSize: number; - - /** ListLogsRequest pageToken. */ + /** ListExclusionsRequest pageToken. */ public pageToken: string; + /** ListExclusionsRequest pageSize. */ + public pageSize: number; + /** - * Creates a new ListLogsRequest instance using the specified properties. + * Creates a new ListExclusionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogsRequest instance + * @returns ListExclusionsRequest instance */ - public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; + public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogsRequest message from the specified reader or buffer. + * Decodes a ListExclusionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogsRequest + * @returns ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogsRequest + * @returns ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; /** - * Verifies a ListLogsRequest message. + * Verifies a ListExclusionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogsRequest + * @returns ListExclusionsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. - * @param message ListLogsRequest + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @param message ListExclusionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogsRequest to JSON. + * Converts this ListExclusionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogsResponse. */ - interface IListLogsResponse { + /** Properties of a ListExclusionsResponse. */ + interface IListExclusionsResponse { - /** ListLogsResponse logNames */ - logNames?: (string[]|null); + /** ListExclusionsResponse exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); - /** ListLogsResponse nextPageToken */ + /** ListExclusionsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListLogsResponse. */ - class ListLogsResponse implements IListLogsResponse { + /** Represents a ListExclusionsResponse. */ + class ListExclusionsResponse implements IListExclusionsResponse { /** - * Constructs a new ListLogsResponse. + * Constructs a new ListExclusionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogsResponse); + constructor(properties?: google.logging.v2.IListExclusionsResponse); - /** ListLogsResponse logNames. */ - public logNames: string[]; + /** ListExclusionsResponse exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; - /** ListLogsResponse nextPageToken. */ + /** ListExclusionsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListLogsResponse instance using the specified properties. + * Creates a new ListExclusionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogsResponse instance + * @returns ListExclusionsResponse instance */ - public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; + public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogsResponse message from the specified reader or buffer. + * Decodes a ListExclusionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogsResponse + * @returns ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogsResponse + * @returns ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; /** - * Verifies a ListLogsResponse message. + * Verifies a ListExclusionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogsResponse + * @returns ListExclusionsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. - * @param message ListLogsResponse + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @param message ListExclusionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogsResponse to JSON. + * Converts this ListExclusionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntry. */ - interface ILogEntry { - - /** LogEntry logName */ - logName?: (string|null); - - /** LogEntry resource */ - resource?: (google.api.IMonitoredResource|null); - - /** LogEntry protoPayload */ - protoPayload?: (google.protobuf.IAny|null); - - /** LogEntry textPayload */ - textPayload?: (string|null); - - /** LogEntry jsonPayload */ - jsonPayload?: (google.protobuf.IStruct|null); - - /** LogEntry timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry receiveTimestamp */ - receiveTimestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry severity */ - severity?: (google.logging.type.LogSeverity|null); - - /** LogEntry insertId */ - insertId?: (string|null); - - /** LogEntry httpRequest */ - httpRequest?: (google.logging.type.IHttpRequest|null); - - /** LogEntry labels */ - labels?: ({ [k: string]: string }|null); - - /** LogEntry metadata */ - metadata?: (google.api.IMonitoredResourceMetadata|null); - - /** LogEntry operation */ - operation?: (google.logging.v2.ILogEntryOperation|null); - - /** LogEntry trace */ - trace?: (string|null); - - /** LogEntry spanId */ - spanId?: (string|null); - - /** LogEntry traceSampled */ - traceSampled?: (boolean|null); + /** Properties of a GetExclusionRequest. */ + interface IGetExclusionRequest { - /** LogEntry sourceLocation */ - sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + /** GetExclusionRequest name */ + name?: (string|null); } - /** Represents a LogEntry. */ - class LogEntry implements ILogEntry { + /** Represents a GetExclusionRequest. */ + class GetExclusionRequest implements IGetExclusionRequest { /** - * Constructs a new LogEntry. + * Constructs a new GetExclusionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntry); - - /** LogEntry logName. */ - public logName: string; + constructor(properties?: google.logging.v2.IGetExclusionRequest); - /** LogEntry resource. */ - public resource?: (google.api.IMonitoredResource|null); + /** GetExclusionRequest name. */ + public name: string; - /** LogEntry protoPayload. */ - public protoPayload?: (google.protobuf.IAny|null); + /** + * Creates a new GetExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; - /** LogEntry textPayload. */ - public textPayload: string; + /** + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry jsonPayload. */ - public jsonPayload?: (google.protobuf.IStruct|null); + /** + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; - /** LogEntry receiveTimestamp. */ - public receiveTimestamp?: (google.protobuf.ITimestamp|null); + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; - /** LogEntry severity. */ - public severity: google.logging.type.LogSeverity; + /** + * Verifies a GetExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogEntry insertId. */ - public insertId: string; + /** + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; - /** LogEntry httpRequest. */ - public httpRequest?: (google.logging.type.IHttpRequest|null); + /** + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @param message GetExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogEntry labels. */ - public labels: { [k: string]: string }; + /** + * Converts this GetExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogEntry metadata. */ - public metadata?: (google.api.IMonitoredResourceMetadata|null); + /** Properties of a CreateExclusionRequest. */ + interface ICreateExclusionRequest { - /** LogEntry operation. */ - public operation?: (google.logging.v2.ILogEntryOperation|null); + /** CreateExclusionRequest parent */ + parent?: (string|null); - /** LogEntry trace. */ - public trace: string; + /** CreateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + } - /** LogEntry spanId. */ - public spanId: string; + /** Represents a CreateExclusionRequest. */ + class CreateExclusionRequest implements ICreateExclusionRequest { - /** LogEntry traceSampled. */ - public traceSampled: boolean; + /** + * Constructs a new CreateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateExclusionRequest); - /** LogEntry sourceLocation. */ - public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + /** CreateExclusionRequest parent. */ + public parent: string; - /** LogEntry payload. */ - public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); + /** CreateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new CreateExclusionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntry instance + * @returns CreateExclusionRequest instance */ - public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; + public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a CreateExclusionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntry + * @returns CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntry + * @returns CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; /** - * Verifies a LogEntry message. + * Verifies a CreateExclusionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntry + * @returns CreateExclusionRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @param message LogEntry + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @param message CreateExclusionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntry to JSON. + * Converts this CreateExclusionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntryOperation. */ - interface ILogEntryOperation { - - /** LogEntryOperation id */ - id?: (string|null); + /** Properties of an UpdateExclusionRequest. */ + interface IUpdateExclusionRequest { - /** LogEntryOperation producer */ - producer?: (string|null); + /** UpdateExclusionRequest name */ + name?: (string|null); - /** LogEntryOperation first */ - first?: (boolean|null); + /** UpdateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); - /** LogEntryOperation last */ - last?: (boolean|null); + /** UpdateExclusionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a LogEntryOperation. */ - class LogEntryOperation implements ILogEntryOperation { + /** Represents an UpdateExclusionRequest. */ + class UpdateExclusionRequest implements IUpdateExclusionRequest { /** - * Constructs a new LogEntryOperation. + * Constructs a new UpdateExclusionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntryOperation); - - /** LogEntryOperation id. */ - public id: string; + constructor(properties?: google.logging.v2.IUpdateExclusionRequest); - /** LogEntryOperation producer. */ - public producer: string; + /** UpdateExclusionRequest name. */ + public name: string; - /** LogEntryOperation first. */ - public first: boolean; + /** UpdateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); - /** LogEntryOperation last. */ - public last: boolean; + /** UpdateExclusionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new LogEntryOperation instance using the specified properties. + * Creates a new UpdateExclusionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntryOperation instance + * @returns UpdateExclusionRequest instance */ - public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; + public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntryOperation message from the specified reader or buffer. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntryOperation + * @returns UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntryOperation + * @returns UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; /** - * Verifies a LogEntryOperation message. + * Verifies an UpdateExclusionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntryOperation + * @returns UpdateExclusionRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. - * @param message LogEntryOperation + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @param message UpdateExclusionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntryOperation to JSON. + * Converts this UpdateExclusionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntrySourceLocation. */ - interface ILogEntrySourceLocation { - - /** LogEntrySourceLocation file */ - file?: (string|null); - - /** LogEntrySourceLocation line */ - line?: (number|Long|null); + /** Properties of a DeleteExclusionRequest. */ + interface IDeleteExclusionRequest { - /** LogEntrySourceLocation function */ - "function"?: (string|null); + /** DeleteExclusionRequest name */ + name?: (string|null); } - /** Represents a LogEntrySourceLocation. */ - class LogEntrySourceLocation implements ILogEntrySourceLocation { - - /** - * Constructs a new LogEntrySourceLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogEntrySourceLocation); - - /** LogEntrySourceLocation file. */ - public file: string; - - /** LogEntrySourceLocation line. */ - public line: (number|Long); + /** Represents a DeleteExclusionRequest. */ + class DeleteExclusionRequest implements IDeleteExclusionRequest { - /** LogEntrySourceLocation function. */ - public function: string; + /** + * Constructs a new DeleteExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + + /** DeleteExclusionRequest name. */ + public name: string; /** - * Creates a new LogEntrySourceLocation instance using the specified properties. + * Creates a new DeleteExclusionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntrySourceLocation instance + * @returns DeleteExclusionRequest instance */ - public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; + public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntrySourceLocation + * @returns DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntrySourceLocation + * @returns DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; /** - * Verifies a LogEntrySourceLocation message. + * Verifies a DeleteExclusionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntrySourceLocation + * @returns DeleteExclusionRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. - * @param message LogEntrySourceLocation + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @param message DeleteExclusionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntrySourceLocation to JSON. + * Converts this DeleteExclusionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -8227,779 +8242,779 @@ export namespace google { /** Namespace api. */ namespace api { - /** Properties of a Http. */ - interface IHttp { + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** MonitoredResourceDescriptor name */ + name?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** MonitoredResourceDescriptor type */ + type?: (string|null); + + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); + + /** MonitoredResourceDescriptor description */ + description?: (string|null); + + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MonitoredResourceDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { /** - * Constructs a new Http. + * Constructs a new MonitoredResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.api.IMonitoredResourceDescriptor); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** MonitoredResourceDescriptor name. */ + public name: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** MonitoredResourceDescriptor type. */ + public type: string; + + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; + + /** MonitoredResourceDescriptor description. */ + public description: string; + + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MonitoredResourceDescriptor launchStage. */ + public launchStage: google.api.LaunchStage; /** - * Creates a new Http instance using the specified properties. + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns MonitoredResourceDescriptor instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; /** - * Verifies a Http message. + * Verifies a MonitoredResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns MonitoredResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { - /** HttpRule responseBody */ - responseBody?: (string|null); + /** MonitoredResource type */ + type?: (string|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { /** - * Constructs a new HttpRule. + * Constructs a new MonitoredResource. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get: string; - - /** HttpRule put. */ - public put: string; - - /** HttpRule post. */ - public post: string; - - /** HttpRule delete. */ - public delete: string; - - /** HttpRule patch. */ - public patch: string; - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; + constructor(properties?: google.api.IMonitoredResource); - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** MonitoredResource type. */ + public type: string; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns MonitoredResource instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; /** - * Verifies a HttpRule message. + * Verifies a MonitoredResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns MonitoredResource */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this MonitoredResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { /** - * Constructs a new CustomHttpPattern. + * Constructs a new MonitoredResourceMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.api.IMonitoredResourceMetadata); - /** CustomHttpPattern kind. */ - public kind: string; + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); - /** CustomHttpPattern path. */ - public path: string; + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns MonitoredResourceMetadata instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; /** - * Verifies a CustomHttpPattern message. + * Verifies a MonitoredResourceMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns MonitoredResourceMetadata */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResourceDescriptor. */ - interface IMonitoredResourceDescriptor { - - /** MonitoredResourceDescriptor name */ - name?: (string|null); + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { - /** MonitoredResourceDescriptor type */ - type?: (string|null); + /** LabelDescriptor key */ + key?: (string|null); - /** MonitoredResourceDescriptor displayName */ - displayName?: (string|null); + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|null); - /** MonitoredResourceDescriptor description */ + /** LabelDescriptor description */ description?: (string|null); - - /** MonitoredResourceDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - - /** MonitoredResourceDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|null); } - /** Represents a MonitoredResourceDescriptor. */ - class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new LabelDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceDescriptor); - - /** MonitoredResourceDescriptor name. */ - public name: string; + constructor(properties?: google.api.ILabelDescriptor); - /** MonitoredResourceDescriptor type. */ - public type: string; + /** LabelDescriptor key. */ + public key: string; - /** MonitoredResourceDescriptor displayName. */ - public displayName: string; + /** LabelDescriptor valueType. */ + public valueType: google.api.LabelDescriptor.ValueType; - /** MonitoredResourceDescriptor description. */ + /** LabelDescriptor description. */ public description: string; - /** MonitoredResourceDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** MonitoredResourceDescriptor launchStage. */ - public launchStage: google.api.LaunchStage; - /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceDescriptor instance + * @returns LabelDescriptor instance */ - public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceDescriptor + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceDescriptor + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a LabelDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceDescriptor + * @returns LabelDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @param message MonitoredResourceDescriptor + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this LabelDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResource. */ - interface IMonitoredResource { + namespace LabelDescriptor { - /** MonitoredResource type */ - type?: (string|null); + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } - /** MonitoredResource labels */ - labels?: ({ [k: string]: string }|null); + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 } - /** Represents a MonitoredResource. */ - class MonitoredResource implements IMonitoredResource { + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new MonitoredResource. + * Constructs a new Http. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResource); + constructor(properties?: google.api.IHttp); - /** MonitoredResource type. */ - public type: string; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** MonitoredResource labels. */ - public labels: { [k: string]: string }; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResource instance + * @returns Http instance */ - public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResource + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResource + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a MonitoredResource message. + * Verifies a Http message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResource + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @param message MonitoredResource + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResource to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResourceMetadata. */ - interface IMonitoredResourceMetadata { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** MonitoredResourceMetadata systemLabels */ - systemLabels?: (google.protobuf.IStruct|null); + /** HttpRule selector */ + selector?: (string|null); - /** MonitoredResourceMetadata userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); } - /** Represents a MonitoredResourceMetadata. */ - class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new HttpRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceMetadata); + constructor(properties?: google.api.IHttpRule); - /** MonitoredResourceMetadata systemLabels. */ - public systemLabels?: (google.protobuf.IStruct|null); + /** HttpRule selector. */ + public selector: string; - /** MonitoredResourceMetadata userLabels. */ - public userLabels: { [k: string]: string }; + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceMetadata instance + * @returns HttpRule instance */ - public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceMetadata + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceMetadata + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a HttpRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceMetadata + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @param message MonitoredResourceMetadata + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { - - /** LabelDescriptor key */ - key?: (string|null); + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** LabelDescriptor description */ - description?: (string|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new LabelDescriptor. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.api.ILabelDescriptor); - - /** LabelDescriptor key. */ - public key: string; + constructor(properties?: google.api.ICustomHttpPattern); - /** LabelDescriptor valueType. */ - public valueType: google.api.LabelDescriptor.ValueType; + /** CustomHttpPattern kind. */ + public kind: string; - /** LabelDescriptor description. */ - public description: string; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns LabelDescriptor instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LabelDescriptor + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LabelDescriptor + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a LabelDescriptor message. + * Verifies a CustomHttpPattern message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LabelDescriptor + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LabelDescriptor to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LabelDescriptor { - - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - /** Properties of a Distribution. */ interface IDistribution { diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index fafdded03b3..b8bc50e019e 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1,3 +1,17 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ (function(global, factory) { /* global define, require, module */ @@ -34,25 +48,25 @@ */ var protobuf = {}; - protobuf.Duration = (function() { + protobuf.Struct = (function() { /** - * Properties of a Duration. + * Properties of a Struct. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new Duration. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function Duration(properties) { + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60,88 +74,83 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - Duration.prototype.nanos = 0; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length) { + Struct.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -152,129 +161,131 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Duration.verify = function verify(message) { + Struct.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Duration to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return Struct; })(); - protobuf.Empty = (function() { + protobuf.Value = (function() { /** - * Properties of an Empty. + * Properties of a Value. * @memberof google.protobuf - * @interface IEmpty + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new Empty. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function Empty(properties) { + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -282,240 +293,154 @@ } /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * Value nullValue. + * @member {google.protobuf.NullValue} nullValue + * @memberof google.protobuf.Value + * @instance */ - Empty.create = function create(properties) { - return new Empty(properties); - }; + Value.prototype.nullValue = 0; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Value numberValue. + * @member {number} numberValue + * @memberof google.protobuf.Value + * @instance */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + Value.prototype.numberValue = 0; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * Value stringValue. + * @member {string} stringValue + * @memberof google.protobuf.Value + * @instance */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; + Value.prototype.stringValue = ""; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Value boolValue. + * @member {boolean} boolValue + * @memberof google.protobuf.Value + * @instance */ - Empty.toObject = function toObject() { - return {}; - }; + Value.prototype.boolValue = false; /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value * @instance - * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { + Value.prototype.structValue = null; /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance */ + Value.prototype.listValue = null; - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Value instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + if (message.nullValue != null && message.hasOwnProperty("nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && message.hasOwnProperty("structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && message.hasOwnProperty("listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + message.nullValue = reader.int32(); + break; + case 2: + message.numberValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -526,120 +451,214 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies a Value message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); } return message; }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; } return object; }; /** - * Converts this FieldMask to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldMask; + return Value; })(); - protobuf.Timestamp = (function() { + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {string} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { /** - * Properties of a Timestamp. + * Properties of a ListValue. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new Timestamp. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function Timestamp(properties) { + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -647,88 +666,78 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - Timestamp.prototype.nanos = 0; + ListValue.prototype.values = $util.emptyArray; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + ListValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + ListValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -739,110 +748,104 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + ListValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + ListValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.ListValue} ListValue */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + ListValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Timestamp to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Timestamp; + return ListValue; })(); protobuf.FileDescriptorSet = (function() { @@ -9318,25 +9321,25 @@ return GeneratedCodeInfo; })(); - protobuf.Struct = (function() { + protobuf.Duration = (function() { /** - * Properties of a Struct. + * Properties of a Duration. * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new Struct. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9344,83 +9347,88 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - Struct.prototype.fields = $util.emptyObject; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Struct instance using the specified properties. + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - Struct.create = function create(properties) { - return new Struct(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && message.hasOwnProperty("fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.fields === $util.emptyObject) - message.fields = {}; - key = reader.string(); - reader.pos++; - message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -9431,131 +9439,131 @@ }; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Struct message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Struct.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this Struct to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Struct; + return Duration; })(); - protobuf.Value = (function() { + protobuf.Any = (function() { /** - * Properties of a Value. + * Properties of an Any. * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Value. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Value(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9563,154 +9571,88 @@ } /** - * Value nullValue. - * @member {google.protobuf.NullValue} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = 0; - - /** - * Value numberValue. - * @member {number} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = 0; - - /** - * Value stringValue. - * @member {string} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = ""; - - /** - * Value boolValue. - * @member {boolean} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = false; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Any.prototype.type_url = ""; /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new Value instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Value.create = function create(properties) { - return new Value(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nullValue != null && message.hasOwnProperty("nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && message.hasOwnProperty("numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && message.hasOwnProperty("structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && message.hasOwnProperty("listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.nullValue = reader.int32(); + message.type_url = reader.string(); break; case 2: - message.numberValue = reader.double(); - break; - case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -9721,214 +9663,126 @@ }; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Value message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Value.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Any} Any */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; return message; }; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.Value} message Value + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Value.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Value to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.Value + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Value.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {string} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; + return Any; })(); - protobuf.ListValue = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a ListValue. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new ListValue. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9936,78 +9790,88 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - ListValue.prototype.values = $util.emptyArray; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ListValue instance using the specified properties. + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - ListValue.create = function create(properties) { - return new ListValue(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -10018,125 +9882,129 @@ }; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListValue message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListValue.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Timestamp} Timestamp */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this ListValue to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListValue; + return Timestamp; })(); - protobuf.Any = (function() { + protobuf.Empty = (function() { /** - * Properties of an Any. + * Properties of an Empty. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IEmpty */ /** - * Constructs a new Any. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function Any(properties) { + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10144,89 +10012,63 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - Any.create = function create(properties) { - return new Any(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; default: reader.skipType(tag & 7); break; @@ -10236,521 +10078,712 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Any.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; return null; }; /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Empty} Empty */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this Any to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Any; + return Empty; })(); - return protobuf; - })(); + protobuf.FieldMask = (function() { - google.logging = (function() { + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ - /** - * Namespace logging. - * @memberof google - * @namespace - */ - var logging = {}; + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - logging.v2 = (function() { + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; /** - * Namespace v2. - * @memberof google.logging - * @namespace + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - var v2 = {}; + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; - v2.ConfigServiceV2 = (function() { + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; - /** - * Constructs a new ConfigServiceV2 service. + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + google.logging = (function() { + + /** + * Namespace logging. + * @memberof google + * @namespace + */ + var logging = {}; + + logging.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.logging + * @namespace + */ + var v2 = {}; + + v2.LoggingServiceV2 = (function() { + + /** + * Constructs a new LoggingServiceV2 service. * @memberof google.logging.v2 - * @classdesc Represents a ConfigServiceV2 + * @classdesc Represents a LoggingServiceV2 * @extends $protobuf.rpc.Service * @constructor * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { + function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; + (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. + * Creates new LoggingServiceV2 service using the specified rpc implementation. * @function create - * @memberof google.logging.v2.ConfigServiceV2 + * @memberof google.logging.v2.LoggingServiceV2 * @static * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. + * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. */ - ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListSinksCallback + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef DeleteLogCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse + * @param {google.protobuf.Empty} [response] Empty */ /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { - return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); - }, "name", { value: "ListSinks" }); + Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { + return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLog" }); /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetSinkCallback + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef WriteLogEntriesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse */ /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { - return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "GetSink" }); + Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { + return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); + }, "name", { value: "WriteLogEntries" }); /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateSinkCallback + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogEntriesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse */ /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { - return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "CreateSink" }); + Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { + return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); + }, "name", { value: "ListLogEntries" }); /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateSinkCallback + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListMonitoredResourceDescriptorsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse */ /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { - return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "UpdateSink" }); + Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteSinkCallback + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse */ /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { - return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSink" }); + Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { + return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); + }, "name", { value: "ListLogs" }); /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ + return LoggingServiceV2; + })(); + + v2.DeleteLogRequest = (function() { + /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListExclusionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse + * Properties of a DeleteLogRequest. + * @memberof google.logging.v2 + * @interface IDeleteLogRequest + * @property {string|null} [logName] DeleteLogRequest logName */ /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse - * @returns {undefined} - * @variation 1 + * Constructs a new DeleteLogRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteLogRequest. + * @implements IDeleteLogRequest + * @constructor + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set */ - Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { - return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); - }, "name", { value: "ListExclusions" }); + function DeleteLogRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 + * DeleteLogRequest logName. + * @member {string} logName + * @memberof google.logging.v2.DeleteLogRequest * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + DeleteLogRequest.prototype.logName = ""; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Creates a new DeleteLogRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance */ + DeleteLogRequest.create = function create(properties) { + return new DeleteLogRequest(properties); + }; /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { - return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "GetExclusion" }); + DeleteLogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + return writer; + }; /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Decodes a DeleteLogRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteLogRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.logName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { - return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "CreateExclusion" }); + DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion - */ - - /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { - return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "UpdateExclusion" }); - - /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a DeleteLogRequest message. + * @function verify + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + DeleteLogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + return null; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest */ + DeleteLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogRequest) + return object; + var message = new $root.google.logging.v2.DeleteLogRequest(); + if (object.logName != null) + message.logName = String(object.logName); + return message; + }; /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { - return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteExclusion" }); + DeleteLogRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.logName = ""; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + return object; + }; /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this DeleteLogRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteLogRequest * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + DeleteLogRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ConfigServiceV2; + return DeleteLogRequest; })(); - v2.LogSink = (function() { + v2.WriteLogEntriesRequest = (function() { /** - * Properties of a LogSink. + * Properties of a WriteLogEntriesRequest. * @memberof google.logging.v2 - * @interface ILogSink - * @property {string|null} [name] LogSink name - * @property {string|null} [destination] LogSink destination - * @property {string|null} [filter] LogSink filter - * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat - * @property {string|null} [writerIdentity] LogSink writerIdentity - * @property {boolean|null} [includeChildren] LogSink includeChildren - * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime - * @property {google.protobuf.ITimestamp|null} [startTime] LogSink startTime - * @property {google.protobuf.ITimestamp|null} [endTime] LogSink endTime + * @interface IWriteLogEntriesRequest + * @property {string|null} [logName] WriteLogEntriesRequest logName + * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource + * @property {Object.|null} [labels] WriteLogEntriesRequest labels + * @property {Array.|null} [entries] WriteLogEntriesRequest entries + * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess + * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun */ /** - * Constructs a new LogSink. + * Constructs a new WriteLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogSink. - * @implements ILogSink + * @classdesc Represents a WriteLogEntriesRequest. + * @implements IWriteLogEntriesRequest * @constructor - * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set */ - function LogSink(properties) { + function WriteLogEntriesRequest(properties) { + this.labels = {}; + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10758,219 +10791,149 @@ } /** - * LogSink name. - * @member {string} name - * @memberof google.logging.v2.LogSink + * WriteLogEntriesRequest logName. + * @member {string} logName + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - LogSink.prototype.name = ""; + WriteLogEntriesRequest.prototype.logName = ""; /** - * LogSink destination. - * @member {string} destination - * @memberof google.logging.v2.LogSink + * WriteLogEntriesRequest resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - LogSink.prototype.destination = ""; + WriteLogEntriesRequest.prototype.resource = null; /** - * LogSink filter. - * @member {string} filter - * @memberof google.logging.v2.LogSink + * WriteLogEntriesRequest labels. + * @member {Object.} labels + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - LogSink.prototype.filter = ""; + WriteLogEntriesRequest.prototype.labels = $util.emptyObject; /** - * LogSink outputVersionFormat. - * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat - * @memberof google.logging.v2.LogSink + * WriteLogEntriesRequest entries. + * @member {Array.} entries + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - LogSink.prototype.outputVersionFormat = 0; + WriteLogEntriesRequest.prototype.entries = $util.emptyArray; /** - * LogSink writerIdentity. - * @member {string} writerIdentity - * @memberof google.logging.v2.LogSink + * WriteLogEntriesRequest partialSuccess. + * @member {boolean} partialSuccess + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - LogSink.prototype.writerIdentity = ""; + WriteLogEntriesRequest.prototype.partialSuccess = false; /** - * LogSink includeChildren. - * @member {boolean} includeChildren - * @memberof google.logging.v2.LogSink + * WriteLogEntriesRequest dryRun. + * @member {boolean} dryRun + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - LogSink.prototype.includeChildren = false; + WriteLogEntriesRequest.prototype.dryRun = false; /** - * LogSink bigqueryOptions. - * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions - * @memberof google.logging.v2.LogSink - * @instance + * Creates a new WriteLogEntriesRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance */ - LogSink.prototype.bigqueryOptions = null; + WriteLogEntriesRequest.create = function create(properties) { + return new WriteLogEntriesRequest(properties); + }; /** - * LogSink createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogSink - * @instance + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogSink.prototype.createTime = null; + WriteLogEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + return writer; + }; /** - * LogSink updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogSink - * @instance + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogSink.prototype.updateTime = null; - - /** - * LogSink startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.startTime = null; - - /** - * LogSink endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.endTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LogSink options. - * @member {"bigqueryOptions"|undefined} options - * @memberof google.logging.v2.LogSink - * @instance - */ - Object.defineProperty(LogSink.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LogSink instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.ILogSink=} [properties] Properties to set - * @returns {google.logging.v2.LogSink} LogSink instance - */ - LogSink.create = function create(properties) { - return new LogSink(properties); - }; - - /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogSink.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.destination != null && message.hasOwnProperty("destination")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) - $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogSink.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decode = function decode(reader, length) { + WriteLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.logName = reader.string(); + break; + case 2: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); break; case 3: - message.destination = reader.string(); + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); break; case 5: - message.filter = reader.string(); + message.partialSuccess = reader.bool(); break; case 6: - message.outputVersionFormat = reader.int32(); - break; - case 8: - message.writerIdentity = reader.string(); - break; - case 9: - message.includeChildren = reader.bool(); - break; - case 12: - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); - break; - case 13: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.dryRun = reader.bool(); break; default: reader.skipType(tag & 7); @@ -10981,253 +10944,185 @@ }; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogSink message. + * Verifies a WriteLogEntriesRequest message. * @function verify - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogSink.verify = function verify(message) { + WriteLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) - if (!$util.isString(message.destination)) - return "destination: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - switch (message.outputVersionFormat) { - default: - return "outputVersionFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - if (!$util.isString(message.writerIdentity)) - return "writerIdentity: string expected"; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - if (typeof message.includeChildren !== "boolean") - return "includeChildren: boolean expected"; - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - properties.options = 1; - { - var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); - if (error) - return "bigqueryOptions." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); if (error) - return "updateTime." + error; + return "resource." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + if (typeof message.partialSuccess !== "boolean") + return "partialSuccess: boolean expected"; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; return null; }; /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest */ - LogSink.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogSink) + WriteLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) return object; - var message = new $root.google.logging.v2.LogSink(); - if (object.name != null) - message.name = String(object.name); - if (object.destination != null) - message.destination = String(object.destination); - if (object.filter != null) - message.filter = String(object.filter); - switch (object.outputVersionFormat) { - case "VERSION_FORMAT_UNSPECIFIED": - case 0: - message.outputVersionFormat = 0; - break; - case "V2": - case 1: - message.outputVersionFormat = 1; - break; - case "V1": - case 2: - message.outputVersionFormat = 2; - break; - } - if (object.writerIdentity != null) - message.writerIdentity = String(object.writerIdentity); - if (object.includeChildren != null) - message.includeChildren = Boolean(object.includeChildren); - if (object.bigqueryOptions != null) { - if (typeof object.bigqueryOptions !== "object") - throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + var message = new $root.google.logging.v2.WriteLogEntriesRequest(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.logging.v2.LogSink.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.logging.v2.LogSink.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } } + if (object.partialSuccess != null) + message.partialSuccess = Boolean(object.partialSuccess); + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); return message; }; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.LogSink} message LogSink + * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogSink.toObject = function toObject(message, options) { + WriteLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.name = ""; - object.destination = ""; - object.filter = ""; - object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; - object.writerIdentity = ""; - object.includeChildren = false; - object.startTime = null; - object.endTime = null; - object.createTime = null; - object.updateTime = null; + object.logName = ""; + object.resource = null; + object.partialSuccess = false; + object.dryRun = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = message.destination; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - object.writerIdentity = message.writerIdentity; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - object.includeChildren = message.includeChildren; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); - if (options.oneofs) - object.options = "bigqueryOptions"; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = message.partialSuccess; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; return object; }; /** - * Converts this LogSink to JSON. + * Converts this WriteLogEntriesRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance * @returns {Object.} JSON object */ - LogSink.prototype.toJSON = function toJSON() { + WriteLogEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * VersionFormat enum. - * @name google.logging.v2.LogSink.VersionFormat - * @enum {string} - * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value - * @property {number} V2=1 V2 value - * @property {number} V1=2 V1 value - */ - LogSink.VersionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "V2"] = 1; - values[valuesById[2] = "V1"] = 2; - return values; - })(); - - return LogSink; + return WriteLogEntriesRequest; })(); - v2.BigQueryOptions = (function() { + v2.WriteLogEntriesResponse = (function() { /** - * Properties of a BigQueryOptions. + * Properties of a WriteLogEntriesResponse. * @memberof google.logging.v2 - * @interface IBigQueryOptions - * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @interface IWriteLogEntriesResponse */ /** - * Constructs a new BigQueryOptions. + * Constructs a new WriteLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a BigQueryOptions. - * @implements IBigQueryOptions + * @classdesc Represents a WriteLogEntriesResponse. + * @implements IWriteLogEntriesResponse * @constructor - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set */ - function BigQueryOptions(properties) { + function WriteLogEntriesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11235,76 +11130,63 @@ } /** - * BigQueryOptions usePartitionedTables. - * @member {boolean} usePartitionedTables - * @memberof google.logging.v2.BigQueryOptions - * @instance - */ - BigQueryOptions.prototype.usePartitionedTables = false; - - /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new WriteLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance */ - BigQueryOptions.create = function create(properties) { - return new BigQueryOptions(properties); + WriteLogEntriesResponse.create = function create(properties) { + return new WriteLogEntriesResponse(properties); }; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encode = function encode(message, writer) { + WriteLogEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); return writer; }; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decode = function decode(reader, length) { + WriteLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.usePartitionedTables = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -11314,109 +11196,95 @@ }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryOptions message. + * Verifies a WriteLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryOptions.verify = function verify(message) { + WriteLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - if (typeof message.usePartitionedTables !== "boolean") - return "usePartitionedTables: boolean expected"; return null; }; /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse */ - BigQueryOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.BigQueryOptions) + WriteLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) return object; - var message = new $root.google.logging.v2.BigQueryOptions(); - if (object.usePartitionedTables != null) - message.usePartitionedTables = Boolean(object.usePartitionedTables); - return message; + return new $root.google.logging.v2.WriteLogEntriesResponse(); }; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.usePartitionedTables = false; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - object.usePartitionedTables = message.usePartitionedTables; - return object; + WriteLogEntriesResponse.toObject = function toObject() { + return {}; }; /** - * Converts this BigQueryOptions to JSON. + * Converts this WriteLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesResponse * @instance * @returns {Object.} JSON object */ - BigQueryOptions.prototype.toJSON = function toJSON() { + WriteLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryOptions; + return WriteLogEntriesResponse; })(); - v2.ListSinksRequest = (function() { + v2.WriteLogEntriesPartialErrors = (function() { /** - * Properties of a ListSinksRequest. + * Properties of a WriteLogEntriesPartialErrors. * @memberof google.logging.v2 - * @interface IListSinksRequest - * @property {string|null} [parent] ListSinksRequest parent - * @property {string|null} [pageToken] ListSinksRequest pageToken - * @property {number|null} [pageSize] ListSinksRequest pageSize + * @interface IWriteLogEntriesPartialErrors + * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors */ /** - * Constructs a new ListSinksRequest. + * Constructs a new WriteLogEntriesPartialErrors. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksRequest. - * @implements IListSinksRequest + * @classdesc Represents a WriteLogEntriesPartialErrors. + * @implements IWriteLogEntriesPartialErrors * @constructor - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set */ - function ListSinksRequest(properties) { + function WriteLogEntriesPartialErrors(properties) { + this.logEntryErrors = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11424,101 +11292,83 @@ } /** - * ListSinksRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListSinksRequest - * @instance - */ - ListSinksRequest.prototype.parent = ""; - - /** - * ListSinksRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListSinksRequest - * @instance - */ - ListSinksRequest.prototype.pageToken = ""; - - /** - * ListSinksRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListSinksRequest + * WriteLogEntriesPartialErrors logEntryErrors. + * @member {Object.} logEntryErrors + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @instance */ - ListSinksRequest.prototype.pageSize = 0; + WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance */ - ListSinksRequest.create = function create(properties) { - return new ListSinksRequest(properties); + WriteLogEntriesPartialErrors.create = function create(properties) { + return new WriteLogEntriesPartialErrors(properties); }; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encode = function encode(message, writer) { + WriteLogEntriesPartialErrors.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) + for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decode = function decode(reader, length) { + WriteLogEntriesPartialErrors.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); + reader.skip().pos++; + if (message.logEntryErrors === $util.emptyObject) + message.logEntryErrors = {}; + key = reader.int32(); + reader.pos++; + message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11529,126 +11379,137 @@ }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksRequest message. + * Verifies a WriteLogEntriesPartialErrors message. * @function verify - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksRequest.verify = function verify(message) { + WriteLogEntriesPartialErrors.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { + if (!$util.isObject(message.logEntryErrors)) + return "logEntryErrors: object expected"; + var key = Object.keys(message.logEntryErrors); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "logEntryErrors: integer key{k:int32} expected"; + { + var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); + if (error) + return "logEntryErrors." + error; + } + } + } return null; }; /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors */ - ListSinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksRequest) + WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) return object; - var message = new $root.google.logging.v2.ListSinksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); + if (object.logEntryErrors) { + if (typeof object.logEntryErrors !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors = {}; + for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { + if (typeof object.logEntryErrors[keys[i]] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksRequest.toObject = function toObject(message, options) { + WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + if (options.objects || options.defaults) + object.logEntryErrors = {}; + var keys2; + if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { + object.logEntryErrors = {}; + for (var j = 0; j < keys2.length; ++j) + object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; return object; }; /** - * Converts this ListSinksRequest to JSON. + * Converts this WriteLogEntriesPartialErrors to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @instance * @returns {Object.} JSON object */ - ListSinksRequest.prototype.toJSON = function toJSON() { + WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksRequest; + return WriteLogEntriesPartialErrors; })(); - v2.ListSinksResponse = (function() { + v2.ListLogEntriesRequest = (function() { /** - * Properties of a ListSinksResponse. + * Properties of a ListLogEntriesRequest. * @memberof google.logging.v2 - * @interface IListSinksResponse - * @property {Array.|null} [sinks] ListSinksResponse sinks - * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + * @interface IListLogEntriesRequest + * @property {Array.|null} [projectIds] ListLogEntriesRequest projectIds + * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames + * @property {string|null} [filter] ListLogEntriesRequest filter + * @property {string|null} [orderBy] ListLogEntriesRequest orderBy + * @property {number|null} [pageSize] ListLogEntriesRequest pageSize + * @property {string|null} [pageToken] ListLogEntriesRequest pageToken */ /** - * Constructs a new ListSinksResponse. + * Constructs a new ListLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksResponse. - * @implements IListSinksResponse + * @classdesc Represents a ListLogEntriesRequest. + * @implements IListLogEntriesRequest * @constructor - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set */ - function ListSinksResponse(properties) { - this.sinks = []; + function ListLogEntriesRequest(properties) { + this.projectIds = []; + this.resourceNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11656,91 +11517,146 @@ } /** - * ListSinksResponse sinks. - * @member {Array.} sinks - * @memberof google.logging.v2.ListSinksResponse - * @instance + * ListLogEntriesRequest projectIds. + * @member {Array.} projectIds + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance */ - ListSinksResponse.prototype.sinks = $util.emptyArray; + ListLogEntriesRequest.prototype.projectIds = $util.emptyArray; /** - * ListSinksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListSinksResponse + * ListLogEntriesRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - ListSinksResponse.prototype.nextPageToken = ""; + ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; /** - * Creates a new ListSinksResponse instance using the specified properties. + * ListLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.filter = ""; + + /** + * ListLogEntriesRequest orderBy. + * @member {string} orderBy + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.orderBy = ""; + + /** + * ListLogEntriesRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageSize = 0; + + /** + * ListLogEntriesRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance */ - ListSinksResponse.create = function create(properties) { - return new ListSinksResponse(properties); + ListLogEntriesRequest.create = function create(properties) { + return new ListLogEntriesRequest(properties); }; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encode = function encode(message, writer) { + ListLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinks != null && message.sinks.length) - for (var i = 0; i < message.sinks.length; ++i) - $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.projectIds != null && message.projectIds.length) + for (var i = 0; i < message.projectIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); return writer; }; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decode = function decode(reader, length) { + ListLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.sinks && message.sinks.length)) - message.sinks = []; - message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); + if (!(message.projectIds && message.projectIds.length)) + message.projectIds = []; + message.projectIds.push(reader.string()); + break; + case 8: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); break; case 2: - message.nextPageToken = reader.string(); + message.filter = reader.string(); + break; + case 3: + message.orderBy = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + case 5: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -11751,133 +11667,176 @@ }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksResponse message. + * Verifies a ListLogEntriesRequest message. * @function verify - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksResponse.verify = function verify(message) { + ListLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinks != null && message.hasOwnProperty("sinks")) { - if (!Array.isArray(message.sinks)) - return "sinks: array expected"; - for (var i = 0; i < message.sinks.length; ++i) { - var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); - if (error) - return "sinks." + error; - } + if (message.projectIds != null && message.hasOwnProperty("projectIds")) { + if (!Array.isArray(message.projectIds)) + return "projectIds: array expected"; + for (var i = 0; i < message.projectIds.length; ++i) + if (!$util.isString(message.projectIds[i])) + return "projectIds: string[] expected"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest */ - ListSinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksResponse) + ListLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) return object; - var message = new $root.google.logging.v2.ListSinksResponse(); - if (object.sinks) { - if (!Array.isArray(object.sinks)) - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); - message.sinks = []; - for (var i = 0; i < object.sinks.length; ++i) { - if (typeof object.sinks[i] !== "object") - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); - message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); - } + var message = new $root.google.logging.v2.ListLogEntriesRequest(); + if (object.projectIds) { + if (!Array.isArray(object.projectIds)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.projectIds: array expected"); + message.projectIds = []; + for (var i = 0; i < object.projectIds.length; ++i) + message.projectIds[i] = String(object.projectIds[i]); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksResponse.toObject = function toObject(message, options) { + ListLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sinks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.sinks && message.sinks.length) { - object.sinks = []; - for (var j = 0; j < message.sinks.length; ++j) - object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); + if (options.arrays || options.defaults) { + object.projectIds = []; + object.resourceNames = []; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListSinksResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListSinksResponse - * @instance - * @returns {Object.} JSON object - */ - ListSinksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListSinksResponse; - })(); + if (options.defaults) { + object.filter = ""; + object.orderBy = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.projectIds && message.projectIds.length) { + object.projectIds = []; + for (var j = 0; j < message.projectIds.length; ++j) + object.projectIds[j] = message.projectIds[j]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } + return object; + }; - v2.GetSinkRequest = (function() { + /** + * Converts this ListLogEntriesRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListLogEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogEntriesRequest; + })(); + + v2.ListLogEntriesResponse = (function() { /** - * Properties of a GetSinkRequest. + * Properties of a ListLogEntriesResponse. * @memberof google.logging.v2 - * @interface IGetSinkRequest - * @property {string|null} [sinkName] GetSinkRequest sinkName + * @interface IListLogEntriesResponse + * @property {Array.|null} [entries] ListLogEntriesResponse entries + * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken */ /** - * Constructs a new GetSinkRequest. + * Constructs a new ListLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a GetSinkRequest. - * @implements IGetSinkRequest + * @classdesc Represents a ListLogEntriesResponse. + * @implements IListLogEntriesResponse * @constructor - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set */ - function GetSinkRequest(properties) { + function ListLogEntriesResponse(properties) { + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11885,75 +11844,91 @@ } /** - * GetSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.GetSinkRequest + * ListLogEntriesResponse entries. + * @member {Array.} entries + * @memberof google.logging.v2.ListLogEntriesResponse * @instance */ - GetSinkRequest.prototype.sinkName = ""; + ListLogEntriesResponse.prototype.entries = $util.emptyArray; /** - * Creates a new GetSinkRequest instance using the specified properties. + * ListLogEntriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + */ + ListLogEntriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance */ - GetSinkRequest.create = function create(properties) { - return new GetSinkRequest(properties); + ListLogEntriesResponse.create = function create(properties) { + return new ListLogEntriesResponse(properties); }; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encode = function encode(message, writer) { + ListLogEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decode = function decode(reader, length) { + ListLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sinkName = reader.string(); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -11964,109 +11939,134 @@ }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSinkRequest message. + * Verifies a ListLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSinkRequest.verify = function verify(message) { + ListLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse */ - GetSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetSinkRequest) + ListLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) return object; - var message = new $root.google.logging.v2.GetSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); + var message = new $root.google.logging.v2.ListLogEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSinkRequest.toObject = function toObject(message, options) { + ListLogEntriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entries = []; if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; + object.nextPageToken = ""; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetSinkRequest to JSON. + * Converts this ListLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @instance * @returns {Object.} JSON object */ - GetSinkRequest.prototype.toJSON = function toJSON() { + ListLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSinkRequest; + return ListLogEntriesResponse; })(); - v2.CreateSinkRequest = (function() { + v2.ListMonitoredResourceDescriptorsRequest = (function() { /** - * Properties of a CreateSinkRequest. + * Properties of a ListMonitoredResourceDescriptorsRequest. * @memberof google.logging.v2 - * @interface ICreateSinkRequest - * @property {string|null} [parent] CreateSinkRequest parent - * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity + * @interface IListMonitoredResourceDescriptorsRequest + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken */ /** - * Constructs a new CreateSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @memberof google.logging.v2 - * @classdesc Represents a CreateSinkRequest. - * @implements ICreateSinkRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest * @constructor - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set */ - function CreateSinkRequest(properties) { + function ListMonitoredResourceDescriptorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12074,101 +12074,88 @@ } /** - * CreateSinkRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateSinkRequest + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance */ - CreateSinkRequest.prototype.parent = ""; + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; /** - * CreateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.CreateSinkRequest + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance */ - CreateSinkRequest.prototype.sink = null; + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; /** - * CreateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.uniqueWriterIdentity = false; - - /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance */ - CreateSinkRequest.create = function create(properties) { - return new CreateSinkRequest(properties); + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); }; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSinkRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sink != null && message.hasOwnProperty("sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); return writer; }; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.pageSize = reader.int32(); break; case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -12179,132 +12166,118 @@ }; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @function verify - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSinkRequest.verify = function verify(message) { + ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; - } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest */ - CreateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateSinkRequest) + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) return object; - var message = new $root.google.logging.v2.CreateSinkRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); - } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest + * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSinkRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.sink = null; - object.uniqueWriterIdentity = false; + object.pageSize = 0; + object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance * @returns {Object.} JSON object */ - CreateSinkRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateSinkRequest; + return ListMonitoredResourceDescriptorsRequest; })(); - v2.UpdateSinkRequest = (function() { + v2.ListMonitoredResourceDescriptorsResponse = (function() { /** - * Properties of an UpdateSinkRequest. + * Properties of a ListMonitoredResourceDescriptorsResponse. * @memberof google.logging.v2 - * @interface IUpdateSinkRequest - * @property {string|null} [sinkName] UpdateSinkRequest sinkName - * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken */ /** - * Constructs a new UpdateSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @memberof google.logging.v2 - * @classdesc Represents an UpdateSinkRequest. - * @implements IUpdateSinkRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse * @constructor - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set */ - function UpdateSinkRequest(properties) { + function ListMonitoredResourceDescriptorsResponse(properties) { + this.resourceDescriptors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12312,114 +12285,91 @@ } /** - * UpdateSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.sinkName = ""; - - /** - * UpdateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.sink = null; - - /** - * UpdateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.UpdateSinkRequest + * ListMonitoredResourceDescriptorsResponse resourceDescriptors. + * @member {Array.} resourceDescriptors + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance */ - UpdateSinkRequest.prototype.uniqueWriterIdentity = false; + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; /** - * UpdateSinkRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateSinkRequest + * ListMonitoredResourceDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance */ - UpdateSinkRequest.prototype.updateMask = null; + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance */ - UpdateSinkRequest.create = function create(properties) { - return new UpdateSinkRequest(properties); + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); }; /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSinkRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - if (message.sink != null && message.hasOwnProperty("sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resourceDescriptors != null && message.resourceDescriptors.length) + for (var i = 0; i < message.resourceDescriptors.length; ++i) + $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSinkRequest.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sinkName = reader.string(); + if (!(message.resourceDescriptors && message.resourceDescriptors.length)) + message.resourceDescriptors = []; + message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); break; case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -12430,142 +12380,135 @@ }; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @function verify - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSinkRequest.verify = function verify(message) { + ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; - } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { + if (!Array.isArray(message.resourceDescriptors)) + return "resourceDescriptors: array expected"; + for (var i = 0; i < message.resourceDescriptors.length; ++i) { + var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); + if (error) + return "resourceDescriptors." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse */ - UpdateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateSinkRequest) + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) return object; - var message = new $root.google.logging.v2.UpdateSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); - } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); + message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSinkRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sinkName = ""; - object.sink = null; - object.uniqueWriterIdentity = false; - object.updateMask = null; + if (options.arrays || options.defaults) + object.resourceDescriptors = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceDescriptors && message.resourceDescriptors.length) { + object.resourceDescriptors = []; + for (var j = 0; j < message.resourceDescriptors.length; ++j) + object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); } - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance * @returns {Object.} JSON object */ - UpdateSinkRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSinkRequest; + return ListMonitoredResourceDescriptorsResponse; })(); - v2.DeleteSinkRequest = (function() { + v2.ListLogsRequest = (function() { /** - * Properties of a DeleteSinkRequest. + * Properties of a ListLogsRequest. * @memberof google.logging.v2 - * @interface IDeleteSinkRequest - * @property {string|null} [sinkName] DeleteSinkRequest sinkName + * @interface IListLogsRequest + * @property {string|null} [parent] ListLogsRequest parent + * @property {number|null} [pageSize] ListLogsRequest pageSize + * @property {string|null} [pageToken] ListLogsRequest pageToken */ /** - * Constructs a new DeleteSinkRequest. + * Constructs a new ListLogsRequest. * @memberof google.logging.v2 - * @classdesc Represents a DeleteSinkRequest. - * @implements IDeleteSinkRequest + * @classdesc Represents a ListLogsRequest. + * @implements IListLogsRequest * @constructor - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set */ - function DeleteSinkRequest(properties) { + function ListLogsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12573,75 +12516,101 @@ } /** - * DeleteSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.DeleteSinkRequest + * ListLogsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogsRequest * @instance */ - DeleteSinkRequest.prototype.sinkName = ""; + ListLogsRequest.prototype.parent = ""; /** - * Creates a new DeleteSinkRequest instance using the specified properties. + * ListLogsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.pageSize = 0; + + /** + * ListLogsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance */ - DeleteSinkRequest.create = function create(properties) { - return new DeleteSinkRequest(properties); + ListLogsRequest.create = function create(properties) { + return new ListLogsRequest(properties); }; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSinkRequest.encode = function encode(message, writer) { + ListLogsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSinkRequest.decode = function decode(reader, length) { + ListLogsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sinkName = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -12652,112 +12621,126 @@ }; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSinkRequest message. + * Verifies a ListLogsRequest message. * @function verify - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSinkRequest.verify = function verify(message) { + ListLogsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest */ - DeleteSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteSinkRequest) + ListLogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsRequest) return object; - var message = new $root.google.logging.v2.DeleteSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); + var message = new $root.google.logging.v2.ListLogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest + * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSinkRequest.toObject = function toObject(message, options) { + ListLogsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this DeleteSinkRequest to JSON. + * Converts this ListLogsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @instance * @returns {Object.} JSON object */ - DeleteSinkRequest.prototype.toJSON = function toJSON() { + ListLogsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteSinkRequest; + return ListLogsRequest; })(); - v2.LogExclusion = (function() { + v2.ListLogsResponse = (function() { /** - * Properties of a LogExclusion. + * Properties of a ListLogsResponse. * @memberof google.logging.v2 - * @interface ILogExclusion - * @property {string|null} [name] LogExclusion name - * @property {string|null} [description] LogExclusion description - * @property {string|null} [filter] LogExclusion filter - * @property {boolean|null} [disabled] LogExclusion disabled - * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime + * @interface IListLogsResponse + * @property {Array.|null} [logNames] ListLogsResponse logNames + * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken */ /** - * Constructs a new LogExclusion. + * Constructs a new ListLogsResponse. * @memberof google.logging.v2 - * @classdesc Represents a LogExclusion. - * @implements ILogExclusion + * @classdesc Represents a ListLogsResponse. + * @implements IListLogsResponse * @constructor - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set */ - function LogExclusion(properties) { + function ListLogsResponse(properties) { + this.logNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12765,140 +12748,91 @@ } /** - * LogExclusion name. - * @member {string} name - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.name = ""; - - /** - * LogExclusion description. - * @member {string} description - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.description = ""; - - /** - * LogExclusion filter. - * @member {string} filter - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.filter = ""; - - /** - * LogExclusion disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.disabled = false; - - /** - * LogExclusion createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogExclusion + * ListLogsResponse logNames. + * @member {Array.} logNames + * @memberof google.logging.v2.ListLogsResponse * @instance */ - LogExclusion.prototype.createTime = null; + ListLogsResponse.prototype.logNames = $util.emptyArray; /** - * LogExclusion updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogExclusion + * ListLogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogsResponse * @instance */ - LogExclusion.prototype.updateTime = null; + ListLogsResponse.prototype.nextPageToken = ""; /** - * Creates a new LogExclusion instance using the specified properties. + * Creates a new ListLogsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set - * @returns {google.logging.v2.LogExclusion} LogExclusion instance + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance */ - LogExclusion.create = function create(properties) { - return new LogExclusion(properties); + ListLogsResponse.create = function create(properties) { + return new ListLogsResponse(properties); }; /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogExclusion.encode = function encode(message, writer) { + ListLogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.disabled != null && message.hasOwnProperty("disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.logNames != null && message.logNames.length) + for (var i = 0; i < message.logNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); return writer; }; /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogExclusion message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogExclusion.decode = function decode(reader, length) { + ListLogsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; case 3: - message.filter = reader.string(); - break; - case 4: - message.disabled = reader.bool(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.logNames && message.logNames.length)) + message.logNames = []; + message.logNames.push(reader.string()); break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -12909,160 +12843,145 @@ }; /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogExclusion.decodeDelimited = function decodeDelimited(reader) { + ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogExclusion message. + * Verifies a ListLogsResponse message. * @function verify - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogExclusion.verify = function verify(message) { + ListLogsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; + if (message.logNames != null && message.hasOwnProperty("logNames")) { + if (!Array.isArray(message.logNames)) + return "logNames: array expected"; + for (var i = 0; i < message.logNames.length; ++i) + if (!$util.isString(message.logNames[i])) + return "logNames: string[] expected"; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse */ - LogExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogExclusion) + ListLogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsResponse) return object; - var message = new $root.google.logging.v2.LogExclusion(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + var message = new $root.google.logging.v2.ListLogsResponse(); + if (object.logNames) { + if (!Array.isArray(object.logNames)) + throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); + message.logNames = []; + for (var i = 0; i < object.logNames.length; ++i) + message.logNames[i] = String(object.logNames[i]); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.LogExclusion} message LogExclusion + * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogExclusion.toObject = function toObject(message, options) { + ListLogsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.disabled = false; - object.createTime = null; - object.updateTime = null; + if (options.arrays || options.defaults) + object.logNames = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.logNames && message.logNames.length) { + object.logNames = []; + for (var j = 0; j < message.logNames.length; ++j) + object.logNames[j] = message.logNames[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this LogExclusion to JSON. + * Converts this ListLogsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListLogsResponse * @instance * @returns {Object.} JSON object */ - LogExclusion.prototype.toJSON = function toJSON() { + ListLogsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogExclusion; + return ListLogsResponse; })(); - v2.ListExclusionsRequest = (function() { + v2.LogEntry = (function() { /** - * Properties of a ListExclusionsRequest. + * Properties of a LogEntry. * @memberof google.logging.v2 - * @interface IListExclusionsRequest - * @property {string|null} [parent] ListExclusionsRequest parent - * @property {string|null} [pageToken] ListExclusionsRequest pageToken - * @property {number|null} [pageSize] ListExclusionsRequest pageSize + * @interface ILogEntry + * @property {string|null} [logName] LogEntry logName + * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource + * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload + * @property {string|null} [textPayload] LogEntry textPayload + * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload + * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp + * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp + * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity + * @property {string|null} [insertId] LogEntry insertId + * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest + * @property {Object.|null} [labels] LogEntry labels + * @property {google.api.IMonitoredResourceMetadata|null} [metadata] LogEntry metadata + * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation + * @property {string|null} [trace] LogEntry trace + * @property {string|null} [spanId] LogEntry spanId + * @property {boolean|null} [traceSampled] LogEntry traceSampled + * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation */ /** - * Constructs a new ListExclusionsRequest. + * Constructs a new LogEntry. * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsRequest. - * @implements IListExclusionsRequest + * @classdesc Represents a LogEntry. + * @implements ILogEntry * @constructor - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set */ - function ListExclusionsRequest(properties) { + function LogEntry(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13070,864 +12989,1545 @@ } /** - * ListExclusionsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListExclusionsRequest + * LogEntry logName. + * @member {string} logName + * @memberof google.logging.v2.LogEntry * @instance */ - ListExclusionsRequest.prototype.parent = ""; + LogEntry.prototype.logName = ""; /** - * ListExclusionsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListExclusionsRequest + * LogEntry resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.LogEntry * @instance */ - ListExclusionsRequest.prototype.pageToken = ""; + LogEntry.prototype.resource = null; /** - * ListExclusionsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListExclusionsRequest + * LogEntry protoPayload. + * @member {google.protobuf.IAny|null|undefined} protoPayload + * @memberof google.logging.v2.LogEntry * @instance */ - ListExclusionsRequest.prototype.pageSize = 0; + LogEntry.prototype.protoPayload = null; /** - * Creates a new ListExclusionsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance + * LogEntry textPayload. + * @member {string} textPayload + * @memberof google.logging.v2.LogEntry + * @instance */ - ListExclusionsRequest.create = function create(properties) { - return new ListExclusionsRequest(properties); - }; + LogEntry.prototype.textPayload = ""; /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * LogEntry jsonPayload. + * @member {google.protobuf.IStruct|null|undefined} jsonPayload + * @memberof google.logging.v2.LogEntry + * @instance */ - ListExclusionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - return writer; - }; + LogEntry.prototype.jsonPayload = null; /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * LogEntry timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.logging.v2.LogEntry + * @instance */ - ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + LogEntry.prototype.timestamp = null; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * LogEntry receiveTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp + * @memberof google.logging.v2.LogEntry + * @instance */ - ListExclusionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + LogEntry.prototype.receiveTimestamp = null; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * LogEntry severity. + * @member {google.logging.type.LogSeverity} severity + * @memberof google.logging.v2.LogEntry + * @instance */ - ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + LogEntry.prototype.severity = 0; /** - * Verifies a ListExclusionsRequest message. - * @function verify - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * LogEntry insertId. + * @member {string} insertId + * @memberof google.logging.v2.LogEntry + * @instance */ - ListExclusionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - return null; - }; + LogEntry.prototype.insertId = ""; /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * LogEntry httpRequest. + * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest + * @memberof google.logging.v2.LogEntry + * @instance */ - ListExclusionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsRequest) - return object; - var message = new $root.google.logging.v2.ListExclusionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; - }; + LogEntry.prototype.httpRequest = null; /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * LogEntry labels. + * @member {Object.} labels + * @memberof google.logging.v2.LogEntry + * @instance */ - ListExclusionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - return object; - }; + LogEntry.prototype.labels = $util.emptyObject; /** - * Converts this ListExclusionsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListExclusionsRequest + * LogEntry metadata. + * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata + * @memberof google.logging.v2.LogEntry * @instance - * @returns {Object.} JSON object */ - ListExclusionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + LogEntry.prototype.metadata = null; - return ListExclusionsRequest; - })(); + /** + * LogEntry operation. + * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.operation = null; - v2.ListExclusionsResponse = (function() { + /** + * LogEntry trace. + * @member {string} trace + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.trace = ""; /** - * Properties of a ListExclusionsResponse. - * @memberof google.logging.v2 - * @interface IListExclusionsResponse - * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions - * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken + * LogEntry spanId. + * @member {string} spanId + * @memberof google.logging.v2.LogEntry + * @instance */ + LogEntry.prototype.spanId = ""; /** - * Constructs a new ListExclusionsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsResponse. - * @implements IListExclusionsResponse - * @constructor - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * LogEntry traceSampled. + * @member {boolean} traceSampled + * @memberof google.logging.v2.LogEntry + * @instance */ - function ListExclusionsResponse(properties) { - this.exclusions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LogEntry.prototype.traceSampled = false; /** - * ListExclusionsResponse exclusions. - * @member {Array.} exclusions - * @memberof google.logging.v2.ListExclusionsResponse + * LogEntry sourceLocation. + * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation + * @memberof google.logging.v2.LogEntry * @instance */ - ListExclusionsResponse.prototype.exclusions = $util.emptyArray; + LogEntry.prototype.sourceLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListExclusionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListExclusionsResponse + * LogEntry payload. + * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload + * @memberof google.logging.v2.LogEntry * @instance */ - ListExclusionsResponse.prototype.nextPageToken = ""; + Object.defineProperty(LogEntry.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListExclusionsResponse instance using the specified properties. + * Creates a new LogEntry instance using the specified properties. * @function create - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + * @returns {google.logging.v2.LogEntry} LogEntry instance */ - ListExclusionsResponse.create = function create(properties) { - return new ListExclusionsResponse(properties); + LogEntry.create = function create(properties) { + return new LogEntry(properties); }; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsResponse.encode = function encode(message, writer) { + LogEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.exclusions != null && message.exclusions.length) - for (var i = 0; i < message.exclusions.length; ++i) - $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) + $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textPayload != null && message.hasOwnProperty("textPayload")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); + if (message.insertId != null && message.hasOwnProperty("insertId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) + $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.severity != null && message.hasOwnProperty("severity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); + if (message.operation != null && message.hasOwnProperty("operation")) + $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.trace != null && message.hasOwnProperty("trace")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.spanId != null && message.hasOwnProperty("spanId")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); return writer; }; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + LogEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * Decodes a LogEntry message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.LogEntry} LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsResponse.decode = function decode(reader, length) { + LogEntry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + case 12: + message.logName = reader.string(); + break; + case 8: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); break; - default: - reader.skipType(tag & 7); + case 3: + message.textPayload = reader.string(); + break; + case 6: + message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 9: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 24: + message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.severity = reader.int32(); + break; + case 4: + message.insertId = reader.string(); + break; + case 7: + message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); + break; + case 11: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 25: + message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); + break; + case 15: + message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); + break; + case 22: + message.trace = reader.string(); + break; + case 27: + message.spanId = reader.string(); + break; + case 30: + message.traceSampled = reader.bool(); + break; + case 23: + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogEntry message. + * @function verify + * @memberof google.logging.v2.LogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + properties.payload = 1; + { + var error = $root.google.protobuf.Any.verify(message.protoPayload); + if (error) + return "protoPayload." + error; + } + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + if (!$util.isString(message.textPayload)) + return "textPayload: string expected"; + } + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.protobuf.Struct.verify(message.jsonPayload); + if (error) + return "jsonPayload." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); + if (error) + return "receiveTimestamp." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 100: + case 200: + case 300: + case 400: + case 500: + case 600: + case 700: + case 800: + break; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + if (!$util.isString(message.insertId)) + return "insertId: string expected"; + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { + var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); + if (error) + return "httpRequest." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.operation != null && message.hasOwnProperty("operation")) { + var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); + if (error) + return "operation." + error; + } + if (message.trace != null && message.hasOwnProperty("trace")) + if (!$util.isString(message.trace)) + return "trace: string expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!$util.isString(message.spanId)) + return "spanId: string expected"; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + if (typeof message.traceSampled !== "boolean") + return "traceSampled: boolean expected"; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { + var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); + if (error) + return "sourceLocation." + error; + } + return null; + }; + + /** + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntry + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntry} LogEntry + */ + LogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntry) + return object; + var message = new $root.google.logging.v2.LogEntry(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.protoPayload != null) { + if (typeof object.protoPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); + message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); + } + if (object.textPayload != null) + message.textPayload = String(object.textPayload); + if (object.jsonPayload != null) { + if (typeof object.jsonPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); + message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.receiveTimestamp != null) { + if (typeof object.receiveTimestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); + message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); + } + switch (object.severity) { + case "DEFAULT": + case 0: + message.severity = 0; + break; + case "DEBUG": + case 100: + message.severity = 100; + break; + case "INFO": + case 200: + message.severity = 200; + break; + case "NOTICE": + case 300: + message.severity = 300; + break; + case "WARNING": + case 400: + message.severity = 400; + break; + case "ERROR": + case 500: + message.severity = 500; + break; + case "CRITICAL": + case 600: + message.severity = 600; + break; + case "ALERT": + case 700: + message.severity = 700; + break; + case "EMERGENCY": + case 800: + message.severity = 800; + break; + } + if (object.insertId != null) + message.insertId = String(object.insertId); + if (object.httpRequest != null) { + if (typeof object.httpRequest !== "object") + throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); + message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.logging.v2.LogEntry.metadata: object expected"); + message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); + } + if (object.operation != null) { + if (typeof object.operation !== "object") + throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); + message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); + } + if (object.trace != null) + message.trace = String(object.trace); + if (object.spanId != null) + message.spanId = String(object.spanId); + if (object.traceSampled != null) + message.traceSampled = Boolean(object.traceSampled); + if (object.sourceLocation != null) { + if (typeof object.sourceLocation !== "object") + throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); + } + return message; + }; + + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.LogEntry} message LogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.insertId = ""; + object.httpRequest = null; + object.resource = null; + object.timestamp = null; + object.severity = options.enums === String ? "DEFAULT" : 0; + object.logName = ""; + object.operation = null; + object.trace = ""; + object.sourceLocation = null; + object.receiveTimestamp = null; + object.metadata = null; + object.spanId = ""; + object.traceSampled = false; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); + if (options.oneofs) + object.payload = "protoPayload"; + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + object.textPayload = message.textPayload; + if (options.oneofs) + object.payload = "textPayload"; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + object.insertId = message.insertId; + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); + if (options.oneofs) + object.payload = "jsonPayload"; + } + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); + if (message.trace != null && message.hasOwnProperty("trace")) + object.trace = message.trace; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = message.spanId; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + object.traceSampled = message.traceSampled; + return object; + }; + + /** + * Converts this LogEntry to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntry + * @instance + * @returns {Object.} JSON object + */ + LogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogEntry; + })(); + + v2.LogEntryOperation = (function() { + + /** + * Properties of a LogEntryOperation. + * @memberof google.logging.v2 + * @interface ILogEntryOperation + * @property {string|null} [id] LogEntryOperation id + * @property {string|null} [producer] LogEntryOperation producer + * @property {boolean|null} [first] LogEntryOperation first + * @property {boolean|null} [last] LogEntryOperation last + */ + + /** + * Constructs a new LogEntryOperation. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntryOperation. + * @implements ILogEntryOperation + * @constructor + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + */ + function LogEntryOperation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogEntryOperation id. + * @member {string} id + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.id = ""; + + /** + * LogEntryOperation producer. + * @member {string} producer + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.producer = ""; + + /** + * LogEntryOperation first. + * @member {boolean} first + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.first = false; + + /** + * LogEntryOperation last. + * @member {boolean} last + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.last = false; + + /** + * Creates a new LogEntryOperation instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance + */ + LogEntryOperation.create = function create(properties) { + return new LogEntryOperation(properties); + }; + + /** + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntryOperation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.producer != null && message.hasOwnProperty("producer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); + if (message.first != null && message.hasOwnProperty("first")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); + if (message.last != null && message.hasOwnProperty("last")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); + return writer; + }; + + /** + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntryOperation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.producer = reader.string(); + break; + case 3: + message.first = reader.bool(); + break; + case 4: + message.last = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogEntryOperation message. + * @function verify + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntryOperation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.producer != null && message.hasOwnProperty("producer")) + if (!$util.isString(message.producer)) + return "producer: string expected"; + if (message.first != null && message.hasOwnProperty("first")) + if (typeof message.first !== "boolean") + return "first: boolean expected"; + if (message.last != null && message.hasOwnProperty("last")) + if (typeof message.last !== "boolean") + return "last: boolean expected"; + return null; + }; + + /** + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + */ + LogEntryOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntryOperation) + return object; + var message = new $root.google.logging.v2.LogEntryOperation(); + if (object.id != null) + message.id = String(object.id); + if (object.producer != null) + message.producer = String(object.producer); + if (object.first != null) + message.first = Boolean(object.first); + if (object.last != null) + message.last = Boolean(object.last); + return message; + }; + + /** + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntryOperation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.producer = ""; + object.first = false; + object.last = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.producer != null && message.hasOwnProperty("producer")) + object.producer = message.producer; + if (message.first != null && message.hasOwnProperty("first")) + object.first = message.first; + if (message.last != null && message.hasOwnProperty("last")) + object.last = message.last; + return object; + }; + + /** + * Converts this LogEntryOperation to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntryOperation + * @instance + * @returns {Object.} JSON object + */ + LogEntryOperation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogEntryOperation; + })(); + + v2.LogEntrySourceLocation = (function() { + + /** + * Properties of a LogEntrySourceLocation. + * @memberof google.logging.v2 + * @interface ILogEntrySourceLocation + * @property {string|null} [file] LogEntrySourceLocation file + * @property {number|Long|null} [line] LogEntrySourceLocation line + * @property {string|null} ["function"] LogEntrySourceLocation function + */ + + /** + * Constructs a new LogEntrySourceLocation. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntrySourceLocation. + * @implements ILogEntrySourceLocation + * @constructor + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + */ + function LogEntrySourceLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogEntrySourceLocation file. + * @member {string} file + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype.file = ""; + + /** + * LogEntrySourceLocation line. + * @member {number|Long} line + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LogEntrySourceLocation function. + * @member {string} function + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype["function"] = ""; + + /** + * Creates a new LogEntrySourceLocation instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance + */ + LogEntrySourceLocation.create = function create(properties) { + return new LogEntrySourceLocation(properties); + }; + + /** + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntrySourceLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.hasOwnProperty("file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.line != null && message.hasOwnProperty("line")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); + if (message["function"] != null && message.hasOwnProperty("function")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); + return writer; + }; + + /** + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntrySourceLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = reader.string(); + break; + case 2: + message.line = reader.int64(); + break; + case 3: + message["function"] = reader.string(); + break; + default: + reader.skipType(tag & 7); break; } } - return message; - }; - - /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListExclusionsResponse message. - * @function verify - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListExclusionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exclusions != null && message.hasOwnProperty("exclusions")) { - if (!Array.isArray(message.exclusions)) - return "exclusions: array expected"; - for (var i = 0; i < message.exclusions.length; ++i) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); - if (error) - return "exclusions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + return message; + }; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogEntrySourceLocation message. + * @function verify + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntrySourceLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) + if (!$util.isString(message.file)) + return "file: string expected"; + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) + return "line: integer|Long expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + if (!$util.isString(message["function"])) + return "function: string expected"; return null; }; /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation */ - ListExclusionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsResponse) + LogEntrySourceLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) return object; - var message = new $root.google.logging.v2.ListExclusionsResponse(); - if (object.exclusions) { - if (!Array.isArray(object.exclusions)) - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); - message.exclusions = []; - for (var i = 0; i < object.exclusions.length; ++i) { - if (typeof object.exclusions[i] !== "object") - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); - message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.LogEntrySourceLocation(); + if (object.file != null) + message.file = String(object.file); + if (object.line != null) + if ($util.Long) + (message.line = $util.Long.fromValue(object.line)).unsigned = false; + else if (typeof object.line === "string") + message.line = parseInt(object.line, 10); + else if (typeof object.line === "number") + message.line = object.line; + else if (typeof object.line === "object") + message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); + if (object["function"] != null) + message["function"] = String(object["function"]); return message; }; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse + * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExclusionsResponse.toObject = function toObject(message, options) { + LogEntrySourceLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.exclusions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.exclusions && message.exclusions.length) { - object.exclusions = []; - for (var j = 0; j < message.exclusions.length; ++j) - object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + if (options.defaults) { + object.file = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.line = options.longs === String ? "0" : 0; + object["function"] = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.file != null && message.hasOwnProperty("file")) + object.file = message.file; + if (message.line != null && message.hasOwnProperty("line")) + if (typeof message.line === "number") + object.line = options.longs === String ? String(message.line) : message.line; + else + object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = message["function"]; return object; }; /** - * Converts this ListExclusionsResponse to JSON. + * Converts this LogEntrySourceLocation to JSON. * @function toJSON - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogEntrySourceLocation * @instance * @returns {Object.} JSON object */ - ListExclusionsResponse.prototype.toJSON = function toJSON() { + LogEntrySourceLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListExclusionsResponse; + return LogEntrySourceLocation; })(); - v2.GetExclusionRequest = (function() { + v2.ConfigServiceV2 = (function() { /** - * Properties of a GetExclusionRequest. + * Constructs a new ConfigServiceV2 service. * @memberof google.logging.v2 - * @interface IGetExclusionRequest - * @property {string|null} [name] GetExclusionRequest name + * @classdesc Represents a ConfigServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; /** - * Constructs a new GetExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents a GetExclusionRequest. - * @implements IGetExclusionRequest - * @constructor - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.ConfigServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. */ - function GetExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * GetExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.GetExclusionRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListSinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse + */ + + /** + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse + * @returns {undefined} + * @variation 1 */ - GetExclusionRequest.prototype.name = ""; + Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { + return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); + }, "name", { value: "ListSinks" }); /** - * Creates a new GetExclusionRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetExclusionRequest.create = function create(properties) { - return new GetExclusionRequest(properties); - }; /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink */ - GetExclusionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 */ - GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { + return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "GetSink" }); /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetExclusionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink */ - GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GetExclusionRequest message. - * @function verify - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { + return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "CreateSink" }); + + /** + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ + + /** + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { + return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "UpdateSink" }); + + /** + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetExclusionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - GetExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetExclusionRequest) - return object; - var message = new $root.google.logging.v2.GetExclusionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - GetExclusionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { + return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSink" }); /** - * Converts this GetExclusionRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.GetExclusionRequest + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetExclusionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return GetExclusionRequest; - })(); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListExclusionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse + */ - v2.CreateExclusionRequest = (function() { + /** + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { + return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); + }, "name", { value: "ListExclusions" }); /** - * Properties of a CreateExclusionRequest. - * @memberof google.logging.v2 - * @interface ICreateExclusionRequest - * @property {string|null} [parent] CreateExclusionRequest parent - * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new CreateExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents a CreateExclusionRequest. - * @implements ICreateExclusionRequest - * @constructor - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion */ - function CreateExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * CreateExclusionRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateExclusionRequest + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - CreateExclusionRequest.prototype.parent = ""; + Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { + return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "GetExclusion" }); /** - * CreateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.CreateExclusionRequest + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateExclusionRequest.prototype.exclusion = null; /** - * Creates a new CreateExclusionRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion */ - CreateExclusionRequest.create = function create(properties) { - return new CreateExclusionRequest(properties); - }; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - CreateExclusionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { + return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "CreateExclusion" }); /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateExclusionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { + return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "UpdateExclusion" }); /** - * Verifies a CreateExclusionRequest message. - * @function verify - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateExclusionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - return null; - }; /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - CreateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateExclusionRequest) - return object; - var message = new $root.google.logging.v2.CreateExclusionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } - return message; - }; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - CreateExclusionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.exclusion = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); - return object; - }; + Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { + return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExclusion" }); /** - * Converts this CreateExclusionRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateExclusionRequest + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateExclusionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return CreateExclusionRequest; + return ConfigServiceV2; })(); - v2.UpdateExclusionRequest = (function() { + v2.LogSink = (function() { /** - * Properties of an UpdateExclusionRequest. + * Properties of a LogSink. * @memberof google.logging.v2 - * @interface IUpdateExclusionRequest - * @property {string|null} [name] UpdateExclusionRequest name - * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask + * @interface ILogSink + * @property {string|null} [name] LogSink name + * @property {string|null} [destination] LogSink destination + * @property {string|null} [filter] LogSink filter + * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat + * @property {string|null} [writerIdentity] LogSink writerIdentity + * @property {boolean|null} [includeChildren] LogSink includeChildren + * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + * @property {google.protobuf.ITimestamp|null} [startTime] LogSink startTime + * @property {google.protobuf.ITimestamp|null} [endTime] LogSink endTime */ /** - * Constructs a new UpdateExclusionRequest. + * Constructs a new LogSink. * @memberof google.logging.v2 - * @classdesc Represents an UpdateExclusionRequest. - * @implements IUpdateExclusionRequest + * @classdesc Represents a LogSink. + * @implements ILogSink * @constructor - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogSink=} [properties] Properties to set */ - function UpdateExclusionRequest(properties) { + function LogSink(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13935,316 +14535,220 @@ } /** - * UpdateExclusionRequest name. + * LogSink name. * @member {string} name - * @memberof google.logging.v2.UpdateExclusionRequest - * @instance - */ - UpdateExclusionRequest.prototype.name = ""; - - /** - * UpdateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogSink * @instance */ - UpdateExclusionRequest.prototype.exclusion = null; + LogSink.prototype.name = ""; /** - * UpdateExclusionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateExclusionRequest + * LogSink destination. + * @member {string} destination + * @memberof google.logging.v2.LogSink * @instance */ - UpdateExclusionRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateExclusionRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance - */ - UpdateExclusionRequest.create = function create(properties) { - return new UpdateExclusionRequest(properties); - }; - - /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateExclusionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateExclusionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + LogSink.prototype.destination = ""; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * LogSink filter. + * @member {string} filter + * @memberof google.logging.v2.LogSink + * @instance */ - UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + LogSink.prototype.filter = ""; /** - * Verifies an UpdateExclusionRequest message. - * @function verify - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * LogSink outputVersionFormat. + * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat + * @memberof google.logging.v2.LogSink + * @instance */ - UpdateExclusionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + LogSink.prototype.outputVersionFormat = 0; /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * LogSink writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.LogSink + * @instance */ - UpdateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) - return object; - var message = new $root.google.logging.v2.UpdateExclusionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + LogSink.prototype.writerIdentity = ""; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * LogSink includeChildren. + * @member {boolean} includeChildren + * @memberof google.logging.v2.LogSink + * @instance */ - UpdateExclusionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.exclusion = null; - object.updateMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + LogSink.prototype.includeChildren = false; /** - * Converts this UpdateExclusionRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateExclusionRequest + * LogSink bigqueryOptions. + * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions + * @memberof google.logging.v2.LogSink * @instance - * @returns {Object.} JSON object */ - UpdateExclusionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + LogSink.prototype.bigqueryOptions = null; - return UpdateExclusionRequest; - })(); + /** + * LogSink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.createTime = null; - v2.DeleteExclusionRequest = (function() { + /** + * LogSink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.updateTime = null; /** - * Properties of a DeleteExclusionRequest. - * @memberof google.logging.v2 - * @interface IDeleteExclusionRequest - * @property {string|null} [name] DeleteExclusionRequest name + * LogSink startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.logging.v2.LogSink + * @instance */ + LogSink.prototype.startTime = null; /** - * Constructs a new DeleteExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteExclusionRequest. - * @implements IDeleteExclusionRequest - * @constructor - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * LogSink endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.logging.v2.LogSink + * @instance */ - function DeleteExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LogSink.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DeleteExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.DeleteExclusionRequest + * LogSink options. + * @member {"bigqueryOptions"|undefined} options + * @memberof google.logging.v2.LogSink * @instance */ - DeleteExclusionRequest.prototype.name = ""; + Object.defineProperty(LogSink.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DeleteExclusionRequest instance using the specified properties. + * Creates a new LogSink instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @returns {google.logging.v2.LogSink} LogSink instance */ - DeleteExclusionRequest.create = function create(properties) { - return new DeleteExclusionRequest(properties); + LogSink.create = function create(properties) { + return new LogSink(properties); }; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encode = function encode(message, writer) { + LogSink.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destination != null && message.hasOwnProperty("destination")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) + $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogSink.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * Decodes a LogSink message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogSink} LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decode = function decode(reader, length) { + LogSink.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 3: + message.destination = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 6: + message.outputVersionFormat = reader.int32(); + break; + case 8: + message.writerIdentity = reader.string(); + break; + case 9: + message.includeChildren = reader.bool(); + break; + case 12: + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); + break; + case 13: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -14254,307 +14758,442 @@ }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogSink message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogSink} LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + LogSink.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteExclusionRequest message. + * Verifies a LogSink message. * @function verify - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteExclusionRequest.verify = function verify(message) { + LogSink.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + switch (message.outputVersionFormat) { + default: + return "outputVersionFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + if (typeof message.includeChildren !== "boolean") + return "includeChildren: boolean expected"; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + properties.options = 1; + { + var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); + if (error) + return "bigqueryOptions." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } return null; }; /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogSink} LogSink */ - DeleteExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + LogSink.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogSink) return object; - var message = new $root.google.logging.v2.DeleteExclusionRequest(); + var message = new $root.google.logging.v2.LogSink(); if (object.name != null) message.name = String(object.name); + if (object.destination != null) + message.destination = String(object.destination); + if (object.filter != null) + message.filter = String(object.filter); + switch (object.outputVersionFormat) { + case "VERSION_FORMAT_UNSPECIFIED": + case 0: + message.outputVersionFormat = 0; + break; + case "V2": + case 1: + message.outputVersionFormat = 1; + break; + case "V1": + case 2: + message.outputVersionFormat = 2; + break; + } + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); + if (object.includeChildren != null) + message.includeChildren = Boolean(object.includeChildren); + if (object.bigqueryOptions != null) { + if (typeof object.bigqueryOptions !== "object") + throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.logging.v2.LogSink.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.logging.v2.LogSink.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } return message; }; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogSink message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {google.logging.v2.LogSink} message LogSink * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteExclusionRequest.toObject = function toObject(message, options) { + LogSink.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.destination = ""; + object.filter = ""; + object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; + object.writerIdentity = ""; + object.includeChildren = false; + object.startTime = null; + object.endTime = null; + object.createTime = null; + object.updateTime = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + object.includeChildren = message.includeChildren; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); + if (options.oneofs) + object.options = "bigqueryOptions"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this DeleteExclusionRequest to JSON. + * Converts this LogSink to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogSink * @instance * @returns {Object.} JSON object */ - DeleteExclusionRequest.prototype.toJSON = function toJSON() { + LogSink.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteExclusionRequest; - })(); - - v2.LoggingServiceV2 = (function() { - - /** - * Constructs a new LoggingServiceV2 service. - * @memberof google.logging.v2 - * @classdesc Represents a LoggingServiceV2 - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; - - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.LoggingServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. - */ - LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef DeleteLogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * VersionFormat enum. + * @name google.logging.v2.LogSink.VersionFormat + * @enum {string} + * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value + * @property {number} V2=1 V2 value + * @property {number} V1=2 V1 value */ + LogSink.VersionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "V2"] = 1; + values[valuesById[2] = "V1"] = 2; + return values; + })(); - /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { - return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteLog" }); + return LogSink; + })(); - /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v2.BigQueryOptions = (function() { /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef WriteLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + * Properties of a BigQueryOptions. + * @memberof google.logging.v2 + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables */ /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - * @returns {undefined} - * @variation 1 + * Constructs a new BigQueryOptions. + * @memberof google.logging.v2 + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions + * @constructor + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set */ - Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { - return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); - }, "name", { value: "WriteLogEntries" }); + function BigQueryOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + BigQueryOptions.prototype.usePartitionedTables = false; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + * Creates a new BigQueryOptions instance using the specified properties. + * @function create + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance */ + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); + }; /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { - return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); - }, "name", { value: "ListLogEntries" }); + BigQueryOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + return writer; + }; /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListMonitoredResourceDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + BigQueryOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.usePartitionedTables = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - * @returns {undefined} - * @variation 1 + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { - return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); - }, "name", { value: "ListMonitoredResourceDescriptors" }); + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a BigQueryOptions message. + * @function verify + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + BigQueryOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; + return null; + }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions */ + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) + return object; + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + return message; + }; /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { - return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); - }, "name", { value: "ListLogs" }); + BigQueryOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.usePartitionedTables = false; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + return object; + }; /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 + * Converts this BigQueryOptions to JSON. + * @function toJSON + * @memberof google.logging.v2.BigQueryOptions * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + BigQueryOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return LoggingServiceV2; + return BigQueryOptions; })(); - v2.DeleteLogRequest = (function() { + v2.ListSinksRequest = (function() { /** - * Properties of a DeleteLogRequest. + * Properties of a ListSinksRequest. * @memberof google.logging.v2 - * @interface IDeleteLogRequest - * @property {string|null} [logName] DeleteLogRequest logName + * @interface IListSinksRequest + * @property {string|null} [parent] ListSinksRequest parent + * @property {string|null} [pageToken] ListSinksRequest pageToken + * @property {number|null} [pageSize] ListSinksRequest pageSize */ /** - * Constructs a new DeleteLogRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteLogRequest. - * @implements IDeleteLogRequest + * Constructs a new ListSinksRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListSinksRequest. + * @implements IListSinksRequest * @constructor - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set */ - function DeleteLogRequest(properties) { + function ListSinksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14562,75 +15201,101 @@ } /** - * DeleteLogRequest logName. - * @member {string} logName - * @memberof google.logging.v2.DeleteLogRequest + * ListSinksRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListSinksRequest * @instance */ - DeleteLogRequest.prototype.logName = ""; + ListSinksRequest.prototype.parent = ""; /** - * Creates a new DeleteLogRequest instance using the specified properties. + * ListSinksRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageToken = ""; + + /** + * ListSinksRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageSize = 0; + + /** + * Creates a new ListSinksRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance */ - DeleteLogRequest.create = function create(properties) { - return new DeleteLogRequest(properties); + ListSinksRequest.create = function create(properties) { + return new ListSinksRequest(properties); }; /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogRequest.encode = function encode(message, writer) { + ListSinksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. + * Decodes a ListSinksRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogRequest.decode = function decode(reader, length) { + ListSinksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.logName = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -14641,114 +15306,126 @@ }; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { + ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteLogRequest message. + * Verifies a ListSinksRequest message. * @function verify - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteLogRequest.verify = function verify(message) { + ListSinksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest */ - DeleteLogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteLogRequest) + ListSinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksRequest) return object; - var message = new $root.google.logging.v2.DeleteLogRequest(); - if (object.logName != null) - message.logName = String(object.logName); + var message = new $root.google.logging.v2.ListSinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest + * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteLogRequest.toObject = function toObject(message, options) { + ListSinksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.logName = ""; - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this DeleteLogRequest to JSON. + * Converts this ListSinksRequest to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.ListSinksRequest * @instance * @returns {Object.} JSON object */ - DeleteLogRequest.prototype.toJSON = function toJSON() { + ListSinksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteLogRequest; + return ListSinksRequest; })(); - v2.WriteLogEntriesRequest = (function() { + v2.ListSinksResponse = (function() { /** - * Properties of a WriteLogEntriesRequest. + * Properties of a ListSinksResponse. * @memberof google.logging.v2 - * @interface IWriteLogEntriesRequest - * @property {string|null} [logName] WriteLogEntriesRequest logName - * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource - * @property {Object.|null} [labels] WriteLogEntriesRequest labels - * @property {Array.|null} [entries] WriteLogEntriesRequest entries - * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess - * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun + * @interface IListSinksResponse + * @property {Array.|null} [sinks] ListSinksResponse sinks + * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken */ /** - * Constructs a new WriteLogEntriesRequest. + * Constructs a new ListSinksResponse. * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesRequest. - * @implements IWriteLogEntriesRequest + * @classdesc Represents a ListSinksResponse. + * @implements IListSinksResponse * @constructor - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set */ - function WriteLogEntriesRequest(properties) { - this.labels = {}; - this.entries = []; + function ListSinksResponse(properties) { + this.sinks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14756,149 +15433,91 @@ } /** - * WriteLogEntriesRequest logName. - * @member {string} logName - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.logName = ""; - - /** - * WriteLogEntriesRequest resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.resource = null; - - /** - * WriteLogEntriesRequest labels. - * @member {Object.} labels - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.labels = $util.emptyObject; - - /** - * WriteLogEntriesRequest entries. - * @member {Array.} entries - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.entries = $util.emptyArray; - - /** - * WriteLogEntriesRequest partialSuccess. - * @member {boolean} partialSuccess - * @memberof google.logging.v2.WriteLogEntriesRequest + * ListSinksResponse sinks. + * @member {Array.} sinks + * @memberof google.logging.v2.ListSinksResponse * @instance */ - WriteLogEntriesRequest.prototype.partialSuccess = false; + ListSinksResponse.prototype.sinks = $util.emptyArray; /** - * WriteLogEntriesRequest dryRun. - * @member {boolean} dryRun - * @memberof google.logging.v2.WriteLogEntriesRequest + * ListSinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListSinksResponse * @instance */ - WriteLogEntriesRequest.prototype.dryRun = false; + ListSinksResponse.prototype.nextPageToken = ""; /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. + * Creates a new ListSinksResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance */ - WriteLogEntriesRequest.create = function create(properties) { - return new WriteLogEntriesRequest(properties); + ListSinksResponse.create = function create(properties) { + return new ListSinksResponse(properties); }; /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesRequest.encode = function encode(message, writer) { + ListSinksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + if (message.sinks != null && message.sinks.length) + for (var i = 0; i < message.sinks.length; ++i) + $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * Decodes a ListSinksResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesRequest.decode = function decode(reader, length) { + ListSinksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.logName = reader.string(); + if (!(message.sinks && message.sinks.length)) + message.sinks = []; + message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); break; case 2: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 3: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); - break; - case 4: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 5: - message.partialSuccess = reader.bool(); - break; - case 6: - message.dryRun = reader.bool(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14909,185 +15528,133 @@ }; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesRequest message. + * Verifies a ListSinksResponse message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesRequest.verify = function verify(message) { + ListSinksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (message.sinks != null && message.hasOwnProperty("sinks")) { + if (!Array.isArray(message.sinks)) + return "sinks: array expected"; + for (var i = 0; i < message.sinks.length; ++i) { + var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); if (error) - return "entries." + error; + return "sinks." + error; } } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - if (typeof message.partialSuccess !== "boolean") - return "partialSuccess: boolean expected"; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse */ - WriteLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) + ListSinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksResponse) return object; - var message = new $root.google.logging.v2.WriteLogEntriesRequest(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + var message = new $root.google.logging.v2.ListSinksResponse(); + if (object.sinks) { + if (!Array.isArray(object.sinks)) + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); + message.sinks = []; + for (var i = 0; i < object.sinks.length; ++i) { + if (typeof object.sinks[i] !== "object") + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); + message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); } } - if (object.partialSuccess != null) - message.partialSuccess = Boolean(object.partialSuccess); - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest + * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesRequest.toObject = function toObject(message, options) { + ListSinksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.entries = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.logName = ""; - object.resource = null; - object.partialSuccess = false; - object.dryRun = false; - } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + object.sinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sinks && message.sinks.length) { + object.sinks = []; + for (var j = 0; j < message.sinks.length; ++j) + object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - object.partialSuccess = message.partialSuccess; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this WriteLogEntriesRequest to JSON. + * Converts this ListSinksResponse to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @instance * @returns {Object.} JSON object */ - WriteLogEntriesRequest.prototype.toJSON = function toJSON() { + ListSinksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesRequest; + return ListSinksResponse; })(); - v2.WriteLogEntriesResponse = (function() { + v2.GetSinkRequest = (function() { /** - * Properties of a WriteLogEntriesResponse. + * Properties of a GetSinkRequest. * @memberof google.logging.v2 - * @interface IWriteLogEntriesResponse + * @interface IGetSinkRequest + * @property {string|null} [sinkName] GetSinkRequest sinkName */ /** - * Constructs a new WriteLogEntriesResponse. + * Constructs a new GetSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesResponse. - * @implements IWriteLogEntriesResponse + * @classdesc Represents a GetSinkRequest. + * @implements IGetSinkRequest * @constructor - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set */ - function WriteLogEntriesResponse(properties) { + function GetSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15095,63 +15662,76 @@ } /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. + * GetSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.GetSinkRequest + * @instance + */ + GetSinkRequest.prototype.sinkName = ""; + + /** + * Creates a new GetSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance */ - WriteLogEntriesResponse.create = function create(properties) { - return new WriteLogEntriesResponse(properties); + GetSinkRequest.create = function create(properties) { + return new GetSinkRequest(properties); }; /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesResponse.encode = function encode(message, writer) { + GetSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * Decodes a GetSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decode = function decode(reader, length) { + GetSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -15161,95 +15741,109 @@ }; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesResponse message. + * Verifies a GetSinkRequest message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesResponse.verify = function verify(message) { + GetSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; return null; }; /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest */ - WriteLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) + GetSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSinkRequest) return object; - return new $root.google.logging.v2.WriteLogEntriesResponse(); + var message = new $root.google.logging.v2.GetSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + return message; }; /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse + * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesResponse.toObject = function toObject() { - return {}; + GetSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + return object; }; /** - * Converts this WriteLogEntriesResponse to JSON. + * Converts this GetSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @instance * @returns {Object.} JSON object */ - WriteLogEntriesResponse.prototype.toJSON = function toJSON() { + GetSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesResponse; + return GetSinkRequest; })(); - v2.WriteLogEntriesPartialErrors = (function() { + v2.CreateSinkRequest = (function() { /** - * Properties of a WriteLogEntriesPartialErrors. + * Properties of a CreateSinkRequest. * @memberof google.logging.v2 - * @interface IWriteLogEntriesPartialErrors - * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors + * @interface ICreateSinkRequest + * @property {string|null} [parent] CreateSinkRequest parent + * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity */ /** - * Constructs a new WriteLogEntriesPartialErrors. + * Constructs a new CreateSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesPartialErrors. - * @implements IWriteLogEntriesPartialErrors + * @classdesc Represents a CreateSinkRequest. + * @implements ICreateSinkRequest * @constructor - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set */ - function WriteLogEntriesPartialErrors(properties) { - this.logEntryErrors = {}; + function CreateSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15257,83 +15851,101 @@ } /** - * WriteLogEntriesPartialErrors logEntryErrors. - * @member {Object.} logEntryErrors - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * CreateSinkRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateSinkRequest * @instance */ - WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; + CreateSinkRequest.prototype.parent = ""; /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * CreateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.sink = null; + + /** + * CreateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance */ - WriteLogEntriesPartialErrors.create = function create(properties) { - return new WriteLogEntriesPartialErrors(properties); + CreateSinkRequest.create = function create(properties) { + return new CreateSinkRequest(properties); }; /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesPartialErrors.encode = function encode(message, writer) { + CreateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) - for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); - $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); return writer; }; /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { + CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * Decodes a CreateSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesPartialErrors.decode = function decode(reader, length) { + CreateSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.logEntryErrors === $util.emptyObject) - message.logEntryErrors = {}; - key = reader.int32(); - reader.pos++; - message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + case 2: + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); break; default: reader.skipType(tag & 7); @@ -15344,137 +15956,132 @@ }; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { + CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesPartialErrors message. + * Verifies a CreateSinkRequest message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesPartialErrors.verify = function verify(message) { + CreateSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { - if (!$util.isObject(message.logEntryErrors)) - return "logEntryErrors: object expected"; - var key = Object.keys(message.logEntryErrors); - for (var i = 0; i < key.length; ++i) { - if (!$util.key32Re.test(key[i])) - return "logEntryErrors: integer key{k:int32} expected"; - { - var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); - if (error) - return "logEntryErrors." + error; - } - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; return null; }; /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest */ - WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) + CreateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateSinkRequest) return object; - var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); - if (object.logEntryErrors) { - if (typeof object.logEntryErrors !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors = {}; - for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { - if (typeof object.logEntryErrors[keys[i]] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); - } + var message = new $root.google.logging.v2.CreateSinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); return message; }; /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors + * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { + CreateSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.logEntryErrors = {}; - var keys2; - if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { - object.logEntryErrors = {}; - for (var j = 0; j < keys2.length; ++j) - object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); + if (options.defaults) { + object.parent = ""; + object.sink = null; + object.uniqueWriterIdentity = false; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; return object; }; /** - * Converts this WriteLogEntriesPartialErrors to JSON. + * Converts this CreateSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.CreateSinkRequest * @instance * @returns {Object.} JSON object */ - WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { + CreateSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesPartialErrors; + return CreateSinkRequest; })(); - v2.ListLogEntriesRequest = (function() { + v2.UpdateSinkRequest = (function() { /** - * Properties of a ListLogEntriesRequest. + * Properties of an UpdateSinkRequest. * @memberof google.logging.v2 - * @interface IListLogEntriesRequest - * @property {Array.|null} [projectIds] ListLogEntriesRequest projectIds - * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames - * @property {string|null} [filter] ListLogEntriesRequest filter - * @property {string|null} [orderBy] ListLogEntriesRequest orderBy - * @property {number|null} [pageSize] ListLogEntriesRequest pageSize - * @property {string|null} [pageToken] ListLogEntriesRequest pageToken + * @interface IUpdateSinkRequest + * @property {string|null} [sinkName] UpdateSinkRequest sinkName + * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask */ /** - * Constructs a new ListLogEntriesRequest. + * Constructs a new UpdateSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesRequest. - * @implements IListLogEntriesRequest + * @classdesc Represents an UpdateSinkRequest. + * @implements IUpdateSinkRequest * @constructor - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set */ - function ListLogEntriesRequest(properties) { - this.projectIds = []; - this.resourceNames = []; + function UpdateSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15482,146 +16089,114 @@ } /** - * ListLogEntriesRequest projectIds. - * @member {Array.} projectIds - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.projectIds = $util.emptyArray; - - /** - * ListLogEntriesRequest resourceNames. - * @member {Array.} resourceNames - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; - - /** - * ListLogEntriesRequest filter. - * @member {string} filter - * @memberof google.logging.v2.ListLogEntriesRequest + * UpdateSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - ListLogEntriesRequest.prototype.filter = ""; + UpdateSinkRequest.prototype.sinkName = ""; /** - * ListLogEntriesRequest orderBy. - * @member {string} orderBy - * @memberof google.logging.v2.ListLogEntriesRequest + * UpdateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - ListLogEntriesRequest.prototype.orderBy = ""; + UpdateSinkRequest.prototype.sink = null; /** - * ListLogEntriesRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogEntriesRequest + * UpdateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - ListLogEntriesRequest.prototype.pageSize = 0; + UpdateSinkRequest.prototype.uniqueWriterIdentity = false; /** - * ListLogEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogEntriesRequest + * UpdateSinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - ListLogEntriesRequest.prototype.pageToken = ""; + UpdateSinkRequest.prototype.updateMask = null; /** - * Creates a new ListLogEntriesRequest instance using the specified properties. + * Creates a new UpdateSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance */ - ListLogEntriesRequest.create = function create(properties) { - return new ListLogEntriesRequest(properties); + UpdateSinkRequest.create = function create(properties) { + return new UpdateSinkRequest(properties); }; /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesRequest.encode = function encode(message, writer) { + UpdateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectIds != null && message.projectIds.length) - for (var i = 0; i < message.projectIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * Decodes an UpdateSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decode = function decode(reader, length) { + UpdateSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.projectIds && message.projectIds.length)) - message.projectIds = []; - message.projectIds.push(reader.string()); - break; - case 8: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); + message.sinkName = reader.string(); break; case 2: - message.filter = reader.string(); + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); break; case 3: - message.orderBy = reader.string(); + message.uniqueWriterIdentity = reader.bool(); break; case 4: - message.pageSize = reader.int32(); - break; - case 5: - message.pageToken = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15632,176 +16207,142 @@ }; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogEntriesRequest message. + * Verifies an UpdateSinkRequest message. * @function verify - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogEntriesRequest.verify = function verify(message) { + UpdateSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectIds != null && message.hasOwnProperty("projectIds")) { - if (!Array.isArray(message.projectIds)) - return "projectIds: array expected"; - for (var i = 0; i < message.projectIds.length; ++i) - if (!$util.isString(message.projectIds[i])) - return "projectIds: string[] expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; } - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) - if (!$util.isString(message.resourceNames[i])) - return "resourceNames: string[] expected"; + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; return null; }; /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest - */ - ListLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) - return object; - var message = new $root.google.logging.v2.ListLogEntriesRequest(); - if (object.projectIds) { - if (!Array.isArray(object.projectIds)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.projectIds: array expected"); - message.projectIds = []; - for (var i = 0; i < object.projectIds.length; ++i) - message.projectIds[i] = String(object.projectIds[i]); + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + */ + UpdateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSinkRequest) + return object; + var message = new $root.google.logging.v2.UpdateSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); } - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) - message.resourceNames[i] = String(object.resourceNames[i]); + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest + * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogEntriesRequest.toObject = function toObject(message, options) { + UpdateSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.projectIds = []; - object.resourceNames = []; - } if (options.defaults) { - object.filter = ""; - object.orderBy = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.projectIds && message.projectIds.length) { - object.projectIds = []; - for (var j = 0; j < message.projectIds.length; ++j) - object.projectIds[j] = message.projectIds[j]; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = message.resourceNames[j]; + object.sinkName = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + object.updateMask = null; } + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListLogEntriesRequest to JSON. + * Converts this UpdateSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @instance * @returns {Object.} JSON object */ - ListLogEntriesRequest.prototype.toJSON = function toJSON() { + UpdateSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogEntriesRequest; + return UpdateSinkRequest; })(); - v2.ListLogEntriesResponse = (function() { + v2.DeleteSinkRequest = (function() { /** - * Properties of a ListLogEntriesResponse. + * Properties of a DeleteSinkRequest. * @memberof google.logging.v2 - * @interface IListLogEntriesResponse - * @property {Array.|null} [entries] ListLogEntriesResponse entries - * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken + * @interface IDeleteSinkRequest + * @property {string|null} [sinkName] DeleteSinkRequest sinkName */ /** - * Constructs a new ListLogEntriesResponse. + * Constructs a new DeleteSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesResponse. - * @implements IListLogEntriesResponse + * @classdesc Represents a DeleteSinkRequest. + * @implements IDeleteSinkRequest * @constructor - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set */ - function ListLogEntriesResponse(properties) { - this.entries = []; + function DeleteSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15809,91 +16350,75 @@ } /** - * ListLogEntriesResponse entries. - * @member {Array.} entries - * @memberof google.logging.v2.ListLogEntriesResponse - * @instance - */ - ListLogEntriesResponse.prototype.entries = $util.emptyArray; - - /** - * ListLogEntriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogEntriesResponse + * DeleteSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.DeleteSinkRequest * @instance */ - ListLogEntriesResponse.prototype.nextPageToken = ""; + DeleteSinkRequest.prototype.sinkName = ""; /** - * Creates a new ListLogEntriesResponse instance using the specified properties. + * Creates a new DeleteSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance */ - ListLogEntriesResponse.create = function create(properties) { - return new ListLogEntriesResponse(properties); + DeleteSinkRequest.create = function create(properties) { + return new DeleteSinkRequest(properties); }; /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesResponse.encode = function encode(message, writer) { + DeleteSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesResponse.decode = function decode(reader, length) { + DeleteSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.sinkName = reader.string(); break; default: reader.skipType(tag & 7); @@ -15904,134 +16429,112 @@ }; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogEntriesResponse message. + * Verifies a DeleteSinkRequest message. * @function verify - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogEntriesResponse.verify = function verify(message) { + DeleteSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; return null; }; /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest */ - ListLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) + DeleteSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteSinkRequest) return object; - var message = new $root.google.logging.v2.ListLogEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.DeleteSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); return message; }; /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse + * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogEntriesResponse.toObject = function toObject(message, options) { + DeleteSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entries = []; if (options.defaults) - object.nextPageToken = ""; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; return object; }; /** - * Converts this ListLogEntriesResponse to JSON. + * Converts this DeleteSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @instance * @returns {Object.} JSON object */ - ListLogEntriesResponse.prototype.toJSON = function toJSON() { + DeleteSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogEntriesResponse; + return DeleteSinkRequest; })(); - v2.ListMonitoredResourceDescriptorsRequest = (function() { + v2.LogExclusion = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsRequest. + * Properties of a LogExclusion. * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsRequest - * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken + * @interface ILogExclusion + * @property {string|null} [name] LogExclusion name + * @property {string|null} [description] LogExclusion description + * @property {string|null} [filter] LogExclusion filter + * @property {boolean|null} [disabled] LogExclusion disabled + * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime */ /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new LogExclusion. * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. - * @implements IListMonitoredResourceDescriptorsRequest + * @classdesc Represents a LogExclusion. + * @implements ILogExclusion * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsRequest(properties) { + function LogExclusion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16039,88 +16542,140 @@ } /** - * ListMonitoredResourceDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * LogExclusion name. + * @member {string} name + * @memberof google.logging.v2.LogExclusion * @instance */ - ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; + LogExclusion.prototype.name = ""; /** - * ListMonitoredResourceDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * LogExclusion description. + * @member {string} description + * @memberof google.logging.v2.LogExclusion * @instance */ - ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + LogExclusion.prototype.description = ""; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * LogExclusion filter. + * @member {string} filter + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.filter = ""; + + /** + * LogExclusion disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.disabled = false; + + /** + * LogExclusion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.createTime = null; + + /** + * LogExclusion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.updateTime = null; + + /** + * Creates a new LogExclusion instance using the specified properties. * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @returns {google.logging.v2.LogExclusion} LogExclusion instance */ - ListMonitoredResourceDescriptorsRequest.create = function create(properties) { - return new ListMonitoredResourceDescriptorsRequest(properties); + LogExclusion.create = function create(properties) { + return new LogExclusion(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { + LogExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { + LogExclusion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.pageSize = reader.int32(); + message.name = reader.string(); break; case 2: - message.pageToken = reader.string(); + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.disabled = reader.bool(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -16131,118 +16686,160 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + LogExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a LogExclusion message. * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { + LogExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.LogExclusion} LogExclusion */ - ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) + LogExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogExclusion) return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.logging.v2.LogExclusion(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest + * @param {google.logging.v2.LogExclusion} message LogExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { + LogExclusion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.description = ""; + object.filter = ""; + object.disabled = false; + object.createTime = null; + object.updateTime = null; } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this LogExclusion to JSON. * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.LogExclusion * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { + LogExclusion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsRequest; + return LogExclusion; })(); - v2.ListMonitoredResourceDescriptorsResponse = (function() { + v2.ListExclusionsRequest = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsResponse. + * Properties of a ListExclusionsRequest. * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsResponse - * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors - * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken + * @interface IListExclusionsRequest + * @property {string|null} [parent] ListExclusionsRequest parent + * @property {string|null} [pageToken] ListExclusionsRequest pageToken + * @property {number|null} [pageSize] ListExclusionsRequest pageSize */ /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new ListExclusionsRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. - * @implements IListMonitoredResourceDescriptorsResponse + * @classdesc Represents a ListExclusionsRequest. + * @implements IListExclusionsRequest * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsResponse(properties) { - this.resourceDescriptors = []; + function ListExclusionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16250,91 +16847,101 @@ } /** - * ListMonitoredResourceDescriptorsResponse resourceDescriptors. - * @member {Array.} resourceDescriptors - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * ListExclusionsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; + ListExclusionsRequest.prototype.parent = ""; /** - * ListMonitoredResourceDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * ListExclusionsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; + ListExclusionsRequest.prototype.pageToken = ""; /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * ListExclusionsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListExclusionsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance */ - ListMonitoredResourceDescriptorsResponse.create = function create(properties) { - return new ListMonitoredResourceDescriptorsResponse(properties); + ListExclusionsRequest.create = function create(properties) { + return new ListExclusionsRequest(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { + ListExclusionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceDescriptors != null && message.resourceDescriptors.length) - for (var i = 0; i < message.resourceDescriptors.length; ++i) - $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a ListExclusionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { + ListExclusionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.resourceDescriptors && message.resourceDescriptors.length)) - message.resourceDescriptors = []; - message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -16345,135 +16952,126 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { + ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a ListExclusionsRequest message. * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { + ListExclusionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { - if (!Array.isArray(message.resourceDescriptors)) - return "resourceDescriptors: array expected"; - for (var i = 0; i < message.resourceDescriptors.length; ++i) { - var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); - if (error) - return "resourceDescriptors." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest */ - ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) + ListExclusionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsRequest) return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); - if (object.resourceDescriptors) { - if (!Array.isArray(object.resourceDescriptors)) - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); - message.resourceDescriptors = []; - for (var i = 0; i < object.resourceDescriptors.length; ++i) { - if (typeof object.resourceDescriptors[i] !== "object") - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); - message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.ListExclusionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse + * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { + ListExclusionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.resourceDescriptors = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.resourceDescriptors && message.resourceDescriptors.length) { - object.resourceDescriptors = []; - for (var j = 0; j < message.resourceDescriptors.length; ++j) - object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this ListExclusionsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.ListExclusionsRequest * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { + ListExclusionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsResponse; + return ListExclusionsRequest; })(); - v2.ListLogsRequest = (function() { + v2.ListExclusionsResponse = (function() { /** - * Properties of a ListLogsRequest. + * Properties of a ListExclusionsResponse. * @memberof google.logging.v2 - * @interface IListLogsRequest - * @property {string|null} [parent] ListLogsRequest parent - * @property {number|null} [pageSize] ListLogsRequest pageSize - * @property {string|null} [pageToken] ListLogsRequest pageToken + * @interface IListExclusionsResponse + * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions + * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken */ /** - * Constructs a new ListLogsRequest. + * Constructs a new ListExclusionsResponse. * @memberof google.logging.v2 - * @classdesc Represents a ListLogsRequest. - * @implements IListLogsRequest + * @classdesc Represents a ListExclusionsResponse. + * @implements IListExclusionsResponse * @constructor - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set */ - function ListLogsRequest(properties) { + function ListExclusionsResponse(properties) { + this.exclusions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16481,101 +17079,91 @@ } /** - * ListLogsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.parent = ""; - - /** - * ListLogsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogsRequest + * ListExclusionsResponse exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.ListExclusionsResponse * @instance */ - ListLogsRequest.prototype.pageSize = 0; + ListExclusionsResponse.prototype.exclusions = $util.emptyArray; /** - * ListLogsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogsRequest + * ListExclusionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListExclusionsResponse * @instance */ - ListLogsRequest.prototype.pageToken = ""; + ListExclusionsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListLogsRequest instance using the specified properties. + * Creates a new ListExclusionsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance */ - ListLogsRequest.create = function create(properties) { - return new ListLogsRequest(properties); + ListExclusionsResponse.create = function create(properties) { + return new ListExclusionsResponse(properties); }; /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsRequest.encode = function encode(message, writer) { + ListExclusionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogsRequest message from the specified reader or buffer. + * Decodes a ListExclusionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsRequest.decode = function decode(reader, length) { + ListExclusionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -16586,126 +17174,133 @@ }; /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { + ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogsRequest message. + * Verifies a ListExclusionsResponse message. * @function verify - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogsRequest.verify = function verify(message) { + ListExclusionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + if (error) + return "exclusions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse */ - ListLogsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsRequest) + ListExclusionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsResponse) return object; - var message = new $root.google.logging.v2.ListLogsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.logging.v2.ListExclusionsResponse(); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest + * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogsRequest.toObject = function toObject(message, options) { + ListExclusionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.arrays || options.defaults) + object.exclusions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListLogsRequest to JSON. + * Converts this ListExclusionsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.ListExclusionsResponse * @instance * @returns {Object.} JSON object */ - ListLogsRequest.prototype.toJSON = function toJSON() { + ListExclusionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogsRequest; + return ListExclusionsResponse; })(); - v2.ListLogsResponse = (function() { + v2.GetExclusionRequest = (function() { /** - * Properties of a ListLogsResponse. + * Properties of a GetExclusionRequest. * @memberof google.logging.v2 - * @interface IListLogsResponse - * @property {Array.|null} [logNames] ListLogsResponse logNames - * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken + * @interface IGetExclusionRequest + * @property {string|null} [name] GetExclusionRequest name */ /** - * Constructs a new ListLogsResponse. + * Constructs a new GetExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogsResponse. - * @implements IListLogsResponse + * @classdesc Represents a GetExclusionRequest. + * @implements IGetExclusionRequest * @constructor - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set */ - function ListLogsResponse(properties) { - this.logNames = []; + function GetExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16713,91 +17308,75 @@ } /** - * ListLogsResponse logNames. - * @member {Array.} logNames - * @memberof google.logging.v2.ListLogsResponse - * @instance - */ - ListLogsResponse.prototype.logNames = $util.emptyArray; - - /** - * ListLogsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogsResponse + * GetExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.GetExclusionRequest * @instance */ - ListLogsResponse.prototype.nextPageToken = ""; + GetExclusionRequest.prototype.name = ""; /** - * Creates a new ListLogsResponse instance using the specified properties. + * Creates a new GetExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance */ - ListLogsResponse.create = function create(properties) { - return new ListLogsResponse(properties); + GetExclusionRequest.create = function create(properties) { + return new GetExclusionRequest(properties); }; /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsResponse.encode = function encode(message, writer) { + GetExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.logNames != null && message.logNames.length) - for (var i = 0; i < message.logNames.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogsResponse message from the specified reader or buffer. + * Decodes a GetExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsResponse.decode = function decode(reader, length) { + GetExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.logNames && message.logNames.length)) - message.logNames = []; - message.logNames.push(reader.string()); - break; - case 2: - message.nextPageToken = reader.string(); + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -16808,145 +17387,108 @@ }; /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { + GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogsResponse message. + * Verifies a GetExclusionRequest message. * @function verify - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogsResponse.verify = function verify(message) { + GetExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logNames != null && message.hasOwnProperty("logNames")) { - if (!Array.isArray(message.logNames)) - return "logNames: array expected"; - for (var i = 0; i < message.logNames.length; ++i) - if (!$util.isString(message.logNames[i])) - return "logNames: string[] expected"; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest */ - ListLogsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsResponse) + GetExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetExclusionRequest) return object; - var message = new $root.google.logging.v2.ListLogsResponse(); - if (object.logNames) { - if (!Array.isArray(object.logNames)) - throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); - message.logNames = []; - for (var i = 0; i < object.logNames.length; ++i) - message.logNames[i] = String(object.logNames[i]); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.GetExclusionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse + * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogsResponse.toObject = function toObject(message, options) { + GetExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.logNames = []; if (options.defaults) - object.nextPageToken = ""; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.logNames && message.logNames.length) { - object.logNames = []; - for (var j = 0; j < message.logNames.length; ++j) - object.logNames[j] = message.logNames[j]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListLogsResponse to JSON. + * Converts this GetExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.GetExclusionRequest * @instance * @returns {Object.} JSON object */ - ListLogsResponse.prototype.toJSON = function toJSON() { + GetExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogsResponse; + return GetExclusionRequest; })(); - v2.LogEntry = (function() { + v2.CreateExclusionRequest = (function() { /** - * Properties of a LogEntry. + * Properties of a CreateExclusionRequest. * @memberof google.logging.v2 - * @interface ILogEntry - * @property {string|null} [logName] LogEntry logName - * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource - * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload - * @property {string|null} [textPayload] LogEntry textPayload - * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload - * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp - * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp - * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity - * @property {string|null} [insertId] LogEntry insertId - * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest - * @property {Object.|null} [labels] LogEntry labels - * @property {google.api.IMonitoredResourceMetadata|null} [metadata] LogEntry metadata - * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation - * @property {string|null} [trace] LogEntry trace - * @property {string|null} [spanId] LogEntry spanId - * @property {boolean|null} [traceSampled] LogEntry traceSampled - * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation + * @interface ICreateExclusionRequest + * @property {string|null} [parent] CreateExclusionRequest parent + * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion */ /** - * Constructs a new LogEntry. + * Constructs a new CreateExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogEntry. - * @implements ILogEntry + * @classdesc Represents a CreateExclusionRequest. + * @implements ICreateExclusionRequest * @constructor - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set */ - function LogEntry(properties) { - this.labels = {}; + function CreateExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16954,303 +17496,88 @@ } /** - * LogEntry logName. - * @member {string} logName - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.logName = ""; - - /** - * LogEntry resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.resource = null; - - /** - * LogEntry protoPayload. - * @member {google.protobuf.IAny|null|undefined} protoPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.protoPayload = null; - - /** - * LogEntry textPayload. - * @member {string} textPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.textPayload = ""; - - /** - * LogEntry jsonPayload. - * @member {google.protobuf.IStruct|null|undefined} jsonPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.jsonPayload = null; - - /** - * LogEntry timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.timestamp = null; - - /** - * LogEntry receiveTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.receiveTimestamp = null; - - /** - * LogEntry severity. - * @member {google.logging.type.LogSeverity} severity - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.severity = 0; - - /** - * LogEntry insertId. - * @member {string} insertId - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.insertId = ""; - - /** - * LogEntry httpRequest. - * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.httpRequest = null; - - /** - * LogEntry labels. - * @member {Object.} labels - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.labels = $util.emptyObject; - - /** - * LogEntry metadata. - * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.metadata = null; - - /** - * LogEntry operation. - * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.operation = null; - - /** - * LogEntry trace. - * @member {string} trace - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.trace = ""; - - /** - * LogEntry spanId. - * @member {string} spanId - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.spanId = ""; - - /** - * LogEntry traceSampled. - * @member {boolean} traceSampled - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.traceSampled = false; - - /** - * LogEntry sourceLocation. - * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation - * @memberof google.logging.v2.LogEntry + * CreateExclusionRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateExclusionRequest * @instance */ - LogEntry.prototype.sourceLocation = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CreateExclusionRequest.prototype.parent = ""; /** - * LogEntry payload. - * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload - * @memberof google.logging.v2.LogEntry - * @instance - */ - Object.defineProperty(LogEntry.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), - set: $util.oneOfSetter($oneOfFields) - }); + * CreateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + */ + CreateExclusionRequest.prototype.exclusion = null; /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new CreateExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set - * @returns {google.logging.v2.LogEntry} LogEntry instance + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance */ - LogEntry.create = function create(properties) { - return new LogEntry(properties); + CreateExclusionRequest.create = function create(properties) { + return new CreateExclusionRequest(properties); }; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encode = function encode(message, writer) { + CreateExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) - $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textPayload != null && message.hasOwnProperty("textPayload")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); - if (message.insertId != null && message.hasOwnProperty("insertId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) - $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.severity != null && message.hasOwnProperty("severity")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); - if (message.operation != null && message.hasOwnProperty("operation")) - $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.trace != null && message.hasOwnProperty("trace")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.spanId != null && message.hasOwnProperty("spanId")) - writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a CreateExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntry} LogEntry + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decode = function decode(reader, length) { + CreateExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 12: - message.logName = reader.string(); - break; - case 8: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + case 1: + message.parent = reader.string(); break; case 2: - message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.textPayload = reader.string(); - break; - case 6: - message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 9: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 24: - message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.severity = reader.int32(); - break; - case 4: - message.insertId = reader.string(); - break; - case 7: - message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); - break; - case 11: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); - break; - case 25: - message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); - break; - case 15: - message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); - break; - case 22: - message.trace = reader.string(); - break; - case 27: - message.spanId = reader.string(); - break; - case 30: - message.traceSampled = reader.bool(); - break; - case 23: - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -17261,366 +17588,123 @@ }; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntry} LogEntry + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decodeDelimited = function decodeDelimited(reader) { + CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogEntry message. - * @function verify - * @memberof google.logging.v2.LogEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - properties.payload = 1; - { - var error = $root.google.protobuf.Any.verify(message.protoPayload); - if (error) - return "protoPayload." + error; - } - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - if (!$util.isString(message.textPayload)) - return "textPayload: string expected"; - } - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - { - var error = $root.google.protobuf.Struct.verify(message.jsonPayload); - if (error) - return "jsonPayload." + error; - } - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); - if (error) - return "receiveTimestamp." + error; - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 100: - case 200: - case 300: - case 400: - case 500: - case 600: - case 700: - case 800: - break; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - if (!$util.isString(message.insertId)) - return "insertId: string expected"; - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { - var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); - if (error) - return "httpRequest." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.operation != null && message.hasOwnProperty("operation")) { - var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); - if (error) - return "operation." + error; - } - if (message.trace != null && message.hasOwnProperty("trace")) - if (!$util.isString(message.trace)) - return "trace: string expected"; - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!$util.isString(message.spanId)) - return "spanId: string expected"; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - if (typeof message.traceSampled !== "boolean") - return "traceSampled: boolean expected"; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { - var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); if (error) - return "sourceLocation." + error; + return "exclusion." + error; } return null; }; /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntry} LogEntry + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest */ - LogEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntry) + CreateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateExclusionRequest) return object; - var message = new $root.google.logging.v2.LogEntry(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.protoPayload != null) { - if (typeof object.protoPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); - message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); - } - if (object.textPayload != null) - message.textPayload = String(object.textPayload); - if (object.jsonPayload != null) { - if (typeof object.jsonPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); - message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.receiveTimestamp != null) { - if (typeof object.receiveTimestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); - message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); - } - switch (object.severity) { - case "DEFAULT": - case 0: - message.severity = 0; - break; - case "DEBUG": - case 100: - message.severity = 100; - break; - case "INFO": - case 200: - message.severity = 200; - break; - case "NOTICE": - case 300: - message.severity = 300; - break; - case "WARNING": - case 400: - message.severity = 400; - break; - case "ERROR": - case 500: - message.severity = 500; - break; - case "CRITICAL": - case 600: - message.severity = 600; - break; - case "ALERT": - case 700: - message.severity = 700; - break; - case "EMERGENCY": - case 800: - message.severity = 800; - break; - } - if (object.insertId != null) - message.insertId = String(object.insertId); - if (object.httpRequest != null) { - if (typeof object.httpRequest !== "object") - throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); - message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.logging.v2.LogEntry.metadata: object expected"); - message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); - } - if (object.operation != null) { - if (typeof object.operation !== "object") - throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); - message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); - } - if (object.trace != null) - message.trace = String(object.trace); - if (object.spanId != null) - message.spanId = String(object.spanId); - if (object.traceSampled != null) - message.traceSampled = Boolean(object.traceSampled); - if (object.sourceLocation != null) { - if (typeof object.sourceLocation !== "object") - throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); + var message = new $root.google.logging.v2.CreateExclusionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); } return message; }; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.LogEntry} message LogEntry + * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntry.toObject = function toObject(message, options) { + CreateExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.insertId = ""; - object.httpRequest = null; - object.resource = null; - object.timestamp = null; - object.severity = options.enums === String ? "DEFAULT" : 0; - object.logName = ""; - object.operation = null; - object.trace = ""; - object.sourceLocation = null; - object.receiveTimestamp = null; - object.metadata = null; - object.spanId = ""; - object.traceSampled = false; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); - if (options.oneofs) - object.payload = "protoPayload"; - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - object.textPayload = message.textPayload; - if (options.oneofs) - object.payload = "textPayload"; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - object.insertId = message.insertId; - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); - if (options.oneofs) - object.payload = "jsonPayload"; - } - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.parent = ""; + object.exclusion = null; } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); - if (message.trace != null && message.hasOwnProperty("trace")) - object.trace = message.trace; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = message.spanId; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - object.traceSampled = message.traceSampled; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); return object; }; /** - * Converts this LogEntry to JSON. + * Converts this CreateExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.CreateExclusionRequest * @instance * @returns {Object.} JSON object */ - LogEntry.prototype.toJSON = function toJSON() { + CreateExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogEntry; + return CreateExclusionRequest; })(); - v2.LogEntryOperation = (function() { + v2.UpdateExclusionRequest = (function() { /** - * Properties of a LogEntryOperation. + * Properties of an UpdateExclusionRequest. * @memberof google.logging.v2 - * @interface ILogEntryOperation - * @property {string|null} [id] LogEntryOperation id - * @property {string|null} [producer] LogEntryOperation producer - * @property {boolean|null} [first] LogEntryOperation first - * @property {boolean|null} [last] LogEntryOperation last + * @interface IUpdateExclusionRequest + * @property {string|null} [name] UpdateExclusionRequest name + * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask */ /** - * Constructs a new LogEntryOperation. + * Constructs a new UpdateExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogEntryOperation. - * @implements ILogEntryOperation + * @classdesc Represents an UpdateExclusionRequest. + * @implements IUpdateExclusionRequest * @constructor - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set */ - function LogEntryOperation(properties) { + function UpdateExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17628,114 +17712,101 @@ } /** - * LogEntryOperation id. - * @member {string} id - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.id = ""; - - /** - * LogEntryOperation producer. - * @member {string} producer - * @memberof google.logging.v2.LogEntryOperation + * UpdateExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - LogEntryOperation.prototype.producer = ""; + UpdateExclusionRequest.prototype.name = ""; /** - * LogEntryOperation first. - * @member {boolean} first - * @memberof google.logging.v2.LogEntryOperation + * UpdateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - LogEntryOperation.prototype.first = false; + UpdateExclusionRequest.prototype.exclusion = null; /** - * LogEntryOperation last. - * @member {boolean} last - * @memberof google.logging.v2.LogEntryOperation + * UpdateExclusionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - LogEntryOperation.prototype.last = false; + UpdateExclusionRequest.prototype.updateMask = null; /** - * Creates a new LogEntryOperation instance using the specified properties. + * Creates a new UpdateExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance */ - LogEntryOperation.create = function create(properties) { - return new LogEntryOperation(properties); + UpdateExclusionRequest.create = function create(properties) { + return new UpdateExclusionRequest(properties); }; /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntryOperation.encode = function encode(message, writer) { + UpdateExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.producer != null && message.hasOwnProperty("producer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); - if (message.first != null && message.hasOwnProperty("first")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); - if (message.last != null && message.hasOwnProperty("last")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { + UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntryOperation message from the specified reader or buffer. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntryOperation.decode = function decode(reader, length) { + UpdateExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.name = reader.string(); break; case 2: - message.producer = reader.string(); + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); break; case 3: - message.first = reader.bool(); - break; - case 4: - message.last = reader.bool(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -17746,134 +17817,134 @@ }; /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { + UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogEntryOperation message. + * Verifies an UpdateExclusionRequest message. * @function verify - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntryOperation.verify = function verify(message) { + UpdateExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.producer != null && message.hasOwnProperty("producer")) - if (!$util.isString(message.producer)) - return "producer: string expected"; - if (message.first != null && message.hasOwnProperty("first")) - if (typeof message.first !== "boolean") - return "first: boolean expected"; - if (message.last != null && message.hasOwnProperty("last")) - if (typeof message.last !== "boolean") - return "last: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest */ - LogEntryOperation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntryOperation) + UpdateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) return object; - var message = new $root.google.logging.v2.LogEntryOperation(); - if (object.id != null) - message.id = String(object.id); - if (object.producer != null) - message.producer = String(object.producer); - if (object.first != null) - message.first = Boolean(object.first); - if (object.last != null) - message.last = Boolean(object.last); + var message = new $root.google.logging.v2.UpdateExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation + * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntryOperation.toObject = function toObject(message, options) { + UpdateExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.id = ""; - object.producer = ""; - object.first = false; - object.last = false; + object.name = ""; + object.exclusion = null; + object.updateMask = null; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.producer != null && message.hasOwnProperty("producer")) - object.producer = message.producer; - if (message.first != null && message.hasOwnProperty("first")) - object.first = message.first; - if (message.last != null && message.hasOwnProperty("last")) - object.last = message.last; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this LogEntryOperation to JSON. + * Converts this UpdateExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateExclusionRequest * @instance * @returns {Object.} JSON object */ - LogEntryOperation.prototype.toJSON = function toJSON() { + UpdateExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogEntryOperation; + return UpdateExclusionRequest; })(); - v2.LogEntrySourceLocation = (function() { + v2.DeleteExclusionRequest = (function() { /** - * Properties of a LogEntrySourceLocation. + * Properties of a DeleteExclusionRequest. * @memberof google.logging.v2 - * @interface ILogEntrySourceLocation - * @property {string|null} [file] LogEntrySourceLocation file - * @property {number|Long|null} [line] LogEntrySourceLocation line - * @property {string|null} ["function"] LogEntrySourceLocation function + * @interface IDeleteExclusionRequest + * @property {string|null} [name] DeleteExclusionRequest name */ /** - * Constructs a new LogEntrySourceLocation. + * Constructs a new DeleteExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogEntrySourceLocation. - * @implements ILogEntrySourceLocation + * @classdesc Represents a DeleteExclusionRequest. + * @implements IDeleteExclusionRequest * @constructor - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set */ - function LogEntrySourceLocation(properties) { + function DeleteExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17881,101 +17952,75 @@ } /** - * LogEntrySourceLocation file. - * @member {string} file - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype.file = ""; - - /** - * LogEntrySourceLocation line. - * @member {number|Long} line - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * LogEntrySourceLocation function. - * @member {string} function - * @memberof google.logging.v2.LogEntrySourceLocation + * DeleteExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteExclusionRequest * @instance */ - LogEntrySourceLocation.prototype["function"] = ""; + DeleteExclusionRequest.prototype.name = ""; /** - * Creates a new LogEntrySourceLocation instance using the specified properties. + * Creates a new DeleteExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance */ - LogEntrySourceLocation.create = function create(properties) { - return new LogEntrySourceLocation(properties); + DeleteExclusionRequest.create = function create(properties) { + return new DeleteExclusionRequest(properties); }; /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntrySourceLocation.encode = function encode(message, writer) { + DeleteExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.file != null && message.hasOwnProperty("file")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); - if (message.line != null && message.hasOwnProperty("line")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); - if (message["function"] != null && message.hasOwnProperty("function")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { + DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntrySourceLocation.decode = function decode(reader, length) { + DeleteExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.file = reader.string(); - break; - case 2: - message.line = reader.int64(); - break; - case 3: - message["function"] = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -17986,118 +18031,87 @@ }; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { + DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogEntrySourceLocation message. + * Verifies a DeleteExclusionRequest message. * @function verify - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntrySourceLocation.verify = function verify(message) { + DeleteExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) - if (!$util.isString(message.file)) - return "file: string expected"; - if (message.line != null && message.hasOwnProperty("line")) - if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) - return "line: integer|Long expected"; - if (message["function"] != null && message.hasOwnProperty("function")) - if (!$util.isString(message["function"])) - return "function: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest */ - LogEntrySourceLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) + DeleteExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) return object; - var message = new $root.google.logging.v2.LogEntrySourceLocation(); - if (object.file != null) - message.file = String(object.file); - if (object.line != null) - if ($util.Long) - (message.line = $util.Long.fromValue(object.line)).unsigned = false; - else if (typeof object.line === "string") - message.line = parseInt(object.line, 10); - else if (typeof object.line === "number") - message.line = object.line; - else if (typeof object.line === "object") - message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); - if (object["function"] != null) - message["function"] = String(object["function"]); + var message = new $root.google.logging.v2.DeleteExclusionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation + * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntrySourceLocation.toObject = function toObject(message, options) { + DeleteExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.file = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.line = options.longs === String ? "0" : 0; - object["function"] = ""; - } - if (message.file != null && message.hasOwnProperty("file")) - object.file = message.file; - if (message.line != null && message.hasOwnProperty("line")) - if (typeof message.line === "number") - object.line = options.longs === String ? String(message.line) : message.line; - else - object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; - if (message["function"] != null && message.hasOwnProperty("function")) - object["function"] = message["function"]; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this LogEntrySourceLocation to JSON. + * Converts this DeleteExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.DeleteExclusionRequest * @instance * @returns {Object.} JSON object */ - LogEntrySourceLocation.prototype.toJSON = function toJSON() { + DeleteExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogEntrySourceLocation; + return DeleteExclusionRequest; })(); v2.MetricsServiceV2 = (function() { @@ -20620,26 +20634,30 @@ */ var api = {}; - api.Http = (function() { + api.MonitoredResourceDescriptor = (function() { /** - * Properties of a Http. + * Properties of a MonitoredResourceDescriptor. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage */ /** - * Constructs a new Http. + * Constructs a new MonitoredResourceDescriptor. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function MonitoredResourceDescriptor(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20647,91 +20665,143 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + MonitoredResourceDescriptor.prototype.name = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + MonitoredResourceDescriptor.prototype.type = ""; /** - * Creates a new Http instance using the specified properties. + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.displayName = ""; + + /** + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.description = ""; + + /** + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + MonitoredResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + MonitoredResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 7: + message.launchStage = reader.int32(); break; default: reader.skipType(tag & 7); @@ -20742,353 +20812,296 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a MonitoredResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + MonitoredResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); if (error) - return "rules." + error; + return "labels." + error; } } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); } } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + MonitoredResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.labels = []; + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule + * Converts this MonitoredResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceDescriptor * @instance + * @returns {Object.} JSON object */ - HttpRule.prototype["delete"] = ""; + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = ""; + return MonitoredResourceDescriptor; + })(); - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + api.MonitoredResource = (function() { /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance + * Properties of a MonitoredResource. + * @memberof google.api + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels */ - HttpRule.prototype.body = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + * Constructs a new MonitoredResource. + * @memberof google.api + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource + * @constructor + * @param {google.api.IMonitoredResource=} [properties] Properties to set */ - HttpRule.prototype.responseBody = ""; + function MonitoredResource(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + MonitoredResource.prototype.type = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + MonitoredResource.prototype.labels = $util.emptyObject; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + MonitoredResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + MonitoredResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.type = reader.string(); break; case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -21099,240 +21112,132 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a MonitoredResource message. * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MonitoredResource} MonitoredResource */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.MonitoredResource} message MonitoredResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + MonitoredResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this MonitoredResource to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + MonitoredResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return MonitoredResource; })(); - api.CustomHttpPattern = (function() { + api.MonitoredResourceMetadata = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a MonitoredResourceMetadata. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new MonitoredResourceMetadata. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21340,88 +21245,94 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - CustomHttpPattern.prototype.kind = ""; + MonitoredResourceMetadata.prototype.systemLabels = null; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - CustomHttpPattern.prototype.path = ""; + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + MonitoredResourceMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + MonitoredResourceMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; case 2: - message.path = reader.string(); + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -21432,122 +21343,137 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a MonitoredResourceMetadata message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + MonitoredResourceMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + MonitoredResourceMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return MonitoredResourceMetadata; })(); - api.MonitoredResourceDescriptor = (function() { + api.LabelDescriptor = (function() { /** - * Properties of a MonitoredResourceDescriptor. + * Properties of a LabelDescriptor. * @memberof google.api - * @interface IMonitoredResourceDescriptor - * @property {string|null} [name] MonitoredResourceDescriptor name - * @property {string|null} [type] MonitoredResourceDescriptor type - * @property {string|null} [displayName] MonitoredResourceDescriptor displayName - * @property {string|null} [description] MonitoredResourceDescriptor description - * @property {Array.|null} [labels] MonitoredResourceDescriptor labels - * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description */ /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new LabelDescriptor. * @memberof google.api - * @classdesc Represents a MonitoredResourceDescriptor. - * @implements IMonitoredResourceDescriptor + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor * @constructor - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @param {google.api.ILabelDescriptor=} [properties] Properties to set */ - function MonitoredResourceDescriptor(properties) { - this.labels = []; + function LabelDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21555,144 +21481,102 @@ } /** - * MonitoredResourceDescriptor name. - * @member {string} name - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.name = ""; - - /** - * MonitoredResourceDescriptor type. - * @member {string} type - * @memberof google.api.MonitoredResourceDescriptor + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor * @instance */ - MonitoredResourceDescriptor.prototype.type = ""; + LabelDescriptor.prototype.key = ""; /** - * MonitoredResourceDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MonitoredResourceDescriptor + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor * @instance */ - MonitoredResourceDescriptor.prototype.displayName = ""; + LabelDescriptor.prototype.valueType = 0; /** - * MonitoredResourceDescriptor description. + * LabelDescriptor description. * @member {string} description - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.description = ""; - - /** - * MonitoredResourceDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; - - /** - * MonitoredResourceDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @instance */ - MonitoredResourceDescriptor.prototype.launchStage = 0; + LabelDescriptor.prototype.description = ""; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance */ - MonitoredResourceDescriptor.create = function create(properties) { - return new MonitoredResourceDescriptor(properties); + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); }; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encode = function encode(message, writer) { + LabelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.key != null && message.hasOwnProperty("key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && message.hasOwnProperty("valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); if (message.description != null && message.hasOwnProperty("description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { + LabelDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; case 1: - message.type = reader.string(); + message.key = reader.string(); break; case 2: - message.displayName = reader.string(); + message.valueType = reader.int32(); break; case 3: message.description = reader.string(); break; - case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 7: - message.launchStage = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -21702,201 +21586,182 @@ }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a LabelDescriptor message. * @function verify - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { + LabelDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { default: - return "launchStage: enum value expected"; + return "valueType: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: - case 5: break; } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.LabelDescriptor} LabelDescriptor */ - MonitoredResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceDescriptor) + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) return object; - var message = new $root.google.api.MonitoredResourceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } - } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": case 0: - message.launchStage = 0; + message.valueType = 0; break; - case "EARLY_ACCESS": + case "BOOL": case 1: - message.launchStage = 1; + message.valueType = 1; break; - case "ALPHA": + case "INT64": case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; + message.valueType = 2; break; } + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {google.api.LabelDescriptor} message LabelDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceDescriptor.toObject = function toObject(message, options) { + LabelDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.labels = []; if (options.defaults) { - object.type = ""; - object.displayName = ""; + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; object.description = ""; - object.name = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this LabelDescriptor to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @instance * @returns {Object.} JSON object */ - MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + LabelDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResourceDescriptor; + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; })(); - api.MonitoredResource = (function() { + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {string} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.Http = (function() { /** - * Properties of a MonitoredResource. + * Properties of a Http. * @memberof google.api - * @interface IMonitoredResource - * @property {string|null} [type] MonitoredResource type - * @property {Object.|null} [labels] MonitoredResource labels + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new MonitoredResource. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a MonitoredResource. - * @implements IMonitoredResource + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function MonitoredResource(properties) { - this.labels = {}; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21904,94 +21769,91 @@ } /** - * MonitoredResource type. - * @member {string} type - * @memberof google.api.MonitoredResource + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - MonitoredResource.prototype.type = ""; + Http.prototype.rules = $util.emptyArray; /** - * MonitoredResource labels. - * @member {Object.} labels - * @memberof google.api.MonitoredResource + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - MonitoredResource.prototype.labels = $util.emptyObject; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResource=} [properties] Properties to set - * @returns {google.api.MonitoredResource} MonitoredResource instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - MonitoredResource.create = function create(properties) { - return new MonitoredResource(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -22002,132 +21864,143 @@ }; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResource message. + * Verifies a Http message. * @function verify - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResource.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http */ - MonitoredResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResource) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.MonitoredResource(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.MonitoredResource.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.MonitoredResource} message MonitoredResource + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResource.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; + if (options.arrays || options.defaults) + object.rules = []; if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this MonitoredResource to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - MonitoredResource.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResource; + return Http; })(); - api.MonitoredResourceMetadata = (function() { + api.HttpRule = (function() { /** - * Properties of a MonitoredResourceMetadata. + * Properties of a HttpRule. * @memberof google.api - * @interface IMonitoredResourceMetadata - * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels - * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a MonitoredResourceMetadata. - * @implements IMonitoredResourceMetadata + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function MonitoredResourceMetadata(properties) { - this.userLabels = {}; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22135,94 +22008,209 @@ } /** - * MonitoredResourceMetadata systemLabels. - * @member {google.protobuf.IStruct|null|undefined} systemLabels - * @memberof google.api.MonitoredResourceMetadata + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - MonitoredResourceMetadata.prototype.systemLabels = null; + HttpRule.prototype.selector = ""; /** - * MonitoredResourceMetadata userLabels. - * @member {Object.} userLabels - * @memberof google.api.MonitoredResourceMetadata + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule * @instance */ - MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + HttpRule.prototype.get = ""; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - MonitoredResourceMetadata.create = function create(properties) { - return new MonitoredResourceMetadata(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && message.hasOwnProperty("userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.selector = reader.string(); break; case 2: - reader.skip().pos++; - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - key = reader.string(); - reader.pos++; - message.userLabels[key] = reader.string(); + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -22233,137 +22221,240 @@ }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceMetadata.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { - var error = $root.google.protobuf.Struct.verify(message.systemLabels); - if (error) - return "systemLabels." + error; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } } return null; }; /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.HttpRule} HttpRule */ - MonitoredResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceMetadata) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.MonitoredResourceMetadata(); - if (object.systemLabels != null) { - if (typeof object.systemLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); - message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static - * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceMetadata.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) - object.systemLabels = null; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - MonitoredResourceMetadata.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResourceMetadata; + return HttpRule; })(); - api.LabelDescriptor = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a LabelDescriptor. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new LabelDescriptor. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function LabelDescriptor(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22371,101 +22462,88 @@ } /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.key = ""; - - /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - LabelDescriptor.prototype.valueType = 0; + CustomHttpPattern.prototype.kind = ""; /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - LabelDescriptor.prototype.description = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && message.hasOwnProperty("key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && message.hasOwnProperty("valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.key = reader.string(); + message.kind = reader.string(); break; case 2: - message.valueType = reader.int32(); - break; - case 3: - message.description = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -22476,160 +22554,96 @@ }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LabelDescriptor message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LabelDescriptor.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - } - if (object.description != null) - message.description = String(object.description); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LabelDescriptor.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; - object.description = ""; + object.kind = ""; + object.path = ""; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this LabelDescriptor to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - LabelDescriptor.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {string} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); - - return LabelDescriptor; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {string} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; + return CustomHttpPattern; })(); api.Distribution = (function() { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 26f27ffc3c4..59be91a5800 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -13,39 +13,66 @@ "optimize_for": "SPEED" }, "nested": { - "Duration": { + "Struct": { "fields": { - "seconds": { - "type": "int64", + "fields": { + "keyType": "string", + "type": "Value", "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 } } }, - "Empty": { - "fields": {} - }, - "FieldMask": { + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, "fields": { - "paths": { - "rule": "repeated", - "type": "string", + "nullValue": { + "type": "NullValue", "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 } } }, - "Timestamp": { + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { "fields": { - "seconds": { - "type": "int64", + "values": { + "rule": "repeated", + "type": "Value", "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 } } }, @@ -929,78 +956,51 @@ } } }, - "Struct": { + "Duration": { "fields": { - "fields": { - "keyType": "string", - "type": "Value", + "seconds": { + "type": "int64", "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 } } }, - "Value": { - "oneofs": { - "kind": { - "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, + "Any": { "fields": { - "nullValue": { - "type": "NullValue", + "type_url": { + "type": "string", "id": 1 }, - "numberValue": { - "type": "double", + "value": { + "type": "bytes", "id": 2 - }, - "stringValue": { - "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "structValue": { - "type": "Struct", - "id": 5 - }, - "listValue": { - "type": "ListValue", - "id": 6 } } }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { + "Timestamp": { "fields": { - "values": { - "rule": "repeated", - "type": "Value", + "seconds": { + "type": "int64", "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 } } }, - "Any": { + "Empty": { + "fields": {} + }, + "FieldMask": { "fields": { - "type_url": { + "paths": { + "rule": "repeated", "type": "string", "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 } } } @@ -1019,205 +1019,141 @@ "php_namespace": "Google\\Cloud\\Logging\\V2" }, "nested": { - "ConfigServiceV2": { + "LoggingServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" }, "methods": { - "ListSinks": { - "requestType": "ListSinksRequest", - "responseType": "ListSinksResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/sinks", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks" - } - }, - "GetSink": { - "requestType": "GetSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "CreateSink": { - "requestType": "CreateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).post": "/v2/{parent=*/*}/sinks", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", - "(google.api.http).additional_bindings.body": "sink" - } - }, - "UpdateSink": { - "requestType": "UpdateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.http).additional_bindings.body": "sink", - "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "DeleteSink": { - "requestType": "DeleteSinkRequest", + "DeleteLog": { + "requestType": "DeleteLogRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "ListExclusions": { - "requestType": "ListExclusionsRequest", - "responseType": "ListExclusionsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/exclusions", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions" + "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}" } }, - "GetExclusion": { - "requestType": "GetExclusionRequest", - "responseType": "LogExclusion", + "WriteLogEntries": { + "requestType": "WriteLogEntriesRequest", + "responseType": "WriteLogEntriesResponse", "options": { - "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}" + "(google.api.http).post": "/v2/entries:write", + "(google.api.http).body": "*" } }, - "CreateExclusion": { - "requestType": "CreateExclusionRequest", - "responseType": "LogExclusion", + "ListLogEntries": { + "requestType": "ListLogEntriesRequest", + "responseType": "ListLogEntriesResponse", "options": { - "(google.api.http).post": "/v2/{parent=*/*}/exclusions", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", - "(google.api.http).additional_bindings.body": "exclusion" + "(google.api.http).post": "/v2/entries:list", + "(google.api.http).body": "*" } }, - "UpdateExclusion": { - "requestType": "UpdateExclusionRequest", - "responseType": "LogExclusion", + "ListMonitoredResourceDescriptors": { + "requestType": "ListMonitoredResourceDescriptorsRequest", + "responseType": "ListMonitoredResourceDescriptorsResponse", "options": { - "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.http).additional_bindings.body": "exclusion" + "(google.api.http).get": "/v2/monitoredResourceDescriptors" } }, - "DeleteExclusion": { - "requestType": "DeleteExclusionRequest", - "responseType": "google.protobuf.Empty", + "ListLogs": { + "requestType": "ListLogsRequest", + "responseType": "ListLogsResponse", "options": { - "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}" + "(google.api.http).get": "/v2/{parent=*/*}/logs", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs" } } } }, - "LogSink": { - "oneofs": { - "options": { - "oneof": [ - "bigqueryOptions" - ] - } - }, + "DeleteLogRequest": { "fields": { - "name": { + "logName": { "type": "string", "id": 1 - }, - "destination": { - "type": "string", - "id": 3 - }, - "filter": { + } + } + }, + "WriteLogEntriesRequest": { + "fields": { + "logName": { "type": "string", - "id": 5 + "id": 1 }, - "outputVersionFormat": { - "type": "VersionFormat", - "id": 6, - "options": { - "deprecated": true - } + "resource": { + "type": "google.api.MonitoredResource", + "id": 2 }, - "writerIdentity": { + "labels": { + "keyType": "string", "type": "string", - "id": 8 - }, - "includeChildren": { - "type": "bool", - "id": 9 - }, - "bigqueryOptions": { - "type": "BigQueryOptions", - "id": 12 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 13 + "id": 3 }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 14 + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 4 }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "deprecated": true - } + "partialSuccess": { + "type": "bool", + "id": 5 }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "deprecated": true - } - } - }, - "nested": { - "VersionFormat": { - "values": { - "VERSION_FORMAT_UNSPECIFIED": 0, - "V2": 1, - "V1": 2 - } + "dryRun": { + "type": "bool", + "id": 6 } } }, - "BigQueryOptions": { + "WriteLogEntriesResponse": { + "fields": {} + }, + "WriteLogEntriesPartialErrors": { "fields": { - "usePartitionedTables": { - "type": "bool", + "logEntryErrors": { + "keyType": "int32", + "type": "google.rpc.Status", "id": 1 } } }, - "ListSinksRequest": { + "ListLogEntriesRequest": { "fields": { - "parent": { + "projectIds": { + "rule": "repeated", "type": "string", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, - "pageToken": { + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "filter": { "type": "string", "id": 2 }, + "orderBy": { + "type": "string", + "id": 3 + }, "pageSize": { "type": "int32", - "id": 3 + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 5 } } }, - "ListSinksResponse": { + "ListLogEntriesResponse": { "fields": { - "sinks": { + "entries": { "rule": "repeated", - "type": "LogSink", + "type": "LogEntry", "id": 1 }, "nextPageToken": { @@ -1226,294 +1162,380 @@ } } }, - "GetSinkRequest": { + "ListMonitoredResourceDescriptorsRequest": { "fields": { - "sinkName": { - "type": "string", + "pageSize": { + "type": "int32", "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 } } }, - "CreateSinkRequest": { + "ListMonitoredResourceDescriptorsResponse": { "fields": { - "parent": { - "type": "string", + "resourceDescriptors": { + "rule": "repeated", + "type": "google.api.MonitoredResourceDescriptor", "id": 1 }, - "sink": { - "type": "LogSink", + "nextPageToken": { + "type": "string", "id": 2 - }, - "uniqueWriterIdentity": { - "type": "bool", - "id": 3 } } }, - "UpdateSinkRequest": { + "ListLogsRequest": { "fields": { - "sinkName": { + "parent": { "type": "string", "id": 1 }, - "sink": { - "type": "LogSink", + "pageSize": { + "type": "int32", "id": 2 }, - "uniqueWriterIdentity": { - "type": "bool", + "pageToken": { + "type": "string", "id": 3 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 4 } } }, - "DeleteSinkRequest": { + "ListLogsResponse": { "fields": { - "sinkName": { + "logNames": { + "rule": "repeated", "type": "string", - "id": 1 + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "LogExclusion": { + "LogEntry": { + "oneofs": { + "payload": { + "oneof": [ + "protoPayload", + "textPayload", + "jsonPayload" + ] + } + }, "fields": { - "name": { + "logName": { "type": "string", - "id": 1 + "id": 12 }, - "description": { - "type": "string", + "resource": { + "type": "google.api.MonitoredResource", + "id": 8 + }, + "protoPayload": { + "type": "google.protobuf.Any", "id": 2 }, - "filter": { + "textPayload": { "type": "string", "id": 3 }, - "disabled": { - "type": "bool", - "id": 4 + "jsonPayload": { + "type": "google.protobuf.Struct", + "id": 6 }, - "createTime": { + "timestamp": { "type": "google.protobuf.Timestamp", - "id": 5 + "id": 9 }, - "updateTime": { + "receiveTimestamp": { "type": "google.protobuf.Timestamp", - "id": 6 - } - } - }, - "ListExclusionsRequest": { - "fields": { - "parent": { + "id": 24 + }, + "severity": { + "type": "google.logging.type.LogSeverity", + "id": 10 + }, + "insertId": { "type": "string", - "id": 1 + "id": 4 }, - "pageToken": { + "httpRequest": { + "type": "google.logging.type.HttpRequest", + "id": 7 + }, + "labels": { + "keyType": "string", "type": "string", - "id": 2 + "id": 11 }, - "pageSize": { - "type": "int32", - "id": 3 - } - } - }, - "ListExclusionsResponse": { - "fields": { - "exclusions": { - "rule": "repeated", - "type": "LogExclusion", - "id": 1 + "metadata": { + "type": "google.api.MonitoredResourceMetadata", + "id": 25, + "options": { + "deprecated": true + } }, - "nextPageToken": { + "operation": { + "type": "LogEntryOperation", + "id": 15 + }, + "trace": { "type": "string", - "id": 2 - } - } - }, - "GetExclusionRequest": { - "fields": { - "name": { + "id": 22 + }, + "spanId": { "type": "string", - "id": 1 + "id": 27 + }, + "traceSampled": { + "type": "bool", + "id": 30 + }, + "sourceLocation": { + "type": "LogEntrySourceLocation", + "id": 23 } } }, - "CreateExclusionRequest": { + "LogEntryOperation": { "fields": { - "parent": { + "id": { "type": "string", "id": 1 }, - "exclusion": { - "type": "LogExclusion", + "producer": { + "type": "string", "id": 2 + }, + "first": { + "type": "bool", + "id": 3 + }, + "last": { + "type": "bool", + "id": 4 } } }, - "UpdateExclusionRequest": { + "LogEntrySourceLocation": { "fields": { - "name": { + "file": { "type": "string", "id": 1 }, - "exclusion": { - "type": "LogExclusion", + "line": { + "type": "int64", "id": 2 }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "DeleteExclusionRequest": { - "fields": { - "name": { + "function": { "type": "string", - "id": 1 + "id": 3 } } }, - "LoggingServiceV2": { + "ConfigServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" }, "methods": { - "DeleteLog": { - "requestType": "DeleteLogRequest", + "ListSinks": { + "requestType": "ListSinksRequest", + "responseType": "ListSinksResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/sinks", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks" + } + }, + "GetSink": { + "requestType": "GetSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "CreateSink": { + "requestType": "CreateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).post": "/v2/{parent=*/*}/sinks", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.http).additional_bindings.body": "sink" + } + }, + "UpdateSink": { + "requestType": "UpdateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "DeleteSink": { + "requestType": "DeleteSinkRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", - "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}" + "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" } }, - "WriteLogEntries": { - "requestType": "WriteLogEntriesRequest", - "responseType": "WriteLogEntriesResponse", + "ListExclusions": { + "requestType": "ListExclusionsRequest", + "responseType": "ListExclusionsResponse", "options": { - "(google.api.http).post": "/v2/entries:write", - "(google.api.http).body": "*" + "(google.api.http).get": "/v2/{parent=*/*}/exclusions", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions" } }, - "ListLogEntries": { - "requestType": "ListLogEntriesRequest", - "responseType": "ListLogEntriesResponse", + "GetExclusion": { + "requestType": "GetExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).post": "/v2/entries:list", - "(google.api.http).body": "*" + "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}" } }, - "ListMonitoredResourceDescriptors": { - "requestType": "ListMonitoredResourceDescriptorsRequest", - "responseType": "ListMonitoredResourceDescriptorsResponse", + "CreateExclusion": { + "requestType": "CreateExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).get": "/v2/monitoredResourceDescriptors" + "(google.api.http).post": "/v2/{parent=*/*}/exclusions", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.http).additional_bindings.body": "exclusion" } }, - "ListLogs": { - "requestType": "ListLogsRequest", - "responseType": "ListLogsResponse", + "UpdateExclusion": { + "requestType": "UpdateExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).get": "/v2/{parent=*/*}/logs", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs" + "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.http).additional_bindings.body": "exclusion" + } + }, + "DeleteExclusion": { + "requestType": "DeleteExclusionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}" } } } }, - "DeleteLogRequest": { - "fields": { - "logName": { - "type": "string", - "id": 1 + "LogSink": { + "oneofs": { + "options": { + "oneof": [ + "bigqueryOptions" + ] } - } - }, - "WriteLogEntriesRequest": { + }, "fields": { - "logName": { + "name": { "type": "string", "id": 1 }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 2 - }, - "labels": { - "keyType": "string", + "destination": { "type": "string", "id": 3 }, - "entries": { - "rule": "repeated", - "type": "LogEntry", - "id": 4 - }, - "partialSuccess": { - "type": "bool", + "filter": { + "type": "string", "id": 5 }, - "dryRun": { + "outputVersionFormat": { + "type": "VersionFormat", + "id": 6, + "options": { + "deprecated": true + } + }, + "writerIdentity": { + "type": "string", + "id": 8 + }, + "includeChildren": { "type": "bool", - "id": 6 + "id": 9 + }, + "bigqueryOptions": { + "type": "BigQueryOptions", + "id": 12 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 13 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "deprecated": true + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "deprecated": true + } + } + }, + "nested": { + "VersionFormat": { + "values": { + "VERSION_FORMAT_UNSPECIFIED": 0, + "V2": 1, + "V1": 2 + } } } }, - "WriteLogEntriesResponse": { - "fields": {} - }, - "WriteLogEntriesPartialErrors": { + "BigQueryOptions": { "fields": { - "logEntryErrors": { - "keyType": "int32", - "type": "google.rpc.Status", + "usePartitionedTables": { + "type": "bool", "id": 1 } } }, - "ListLogEntriesRequest": { + "ListSinksRequest": { "fields": { - "projectIds": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "resourceNames": { - "rule": "repeated", + "parent": { "type": "string", - "id": 8 + "id": 1 }, - "filter": { + "pageToken": { "type": "string", "id": 2 }, - "orderBy": { - "type": "string", - "id": 3 - }, "pageSize": { "type": "int32", - "id": 4 - }, - "pageToken": { - "type": "string", - "id": 5 + "id": 3 } } }, - "ListLogEntriesResponse": { + "ListSinksResponse": { "fields": { - "entries": { + "sinks": { "rule": "repeated", - "type": "LogEntry", + "type": "LogSink", "id": 1 }, "nextPageToken": { @@ -1522,181 +1544,159 @@ } } }, - "ListMonitoredResourceDescriptorsRequest": { + "GetSinkRequest": { "fields": { - "pageSize": { - "type": "int32", - "id": 1 - }, - "pageToken": { + "sinkName": { "type": "string", - "id": 2 + "id": 1 } } }, - "ListMonitoredResourceDescriptorsResponse": { + "CreateSinkRequest": { "fields": { - "resourceDescriptors": { - "rule": "repeated", - "type": "google.api.MonitoredResourceDescriptor", + "parent": { + "type": "string", "id": 1 }, - "nextPageToken": { - "type": "string", + "sink": { + "type": "LogSink", "id": 2 + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3 } } }, - "ListLogsRequest": { + "UpdateSinkRequest": { "fields": { - "parent": { + "sinkName": { "type": "string", "id": 1 }, - "pageSize": { - "type": "int32", + "sink": { + "type": "LogSink", "id": 2 }, - "pageToken": { - "type": "string", + "uniqueWriterIdentity": { + "type": "bool", "id": 3 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4 } } }, - "ListLogsResponse": { + "DeleteSinkRequest": { "fields": { - "logNames": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "nextPageToken": { + "sinkName": { "type": "string", - "id": 2 + "id": 1 } } }, - "LogEntry": { - "oneofs": { - "payload": { - "oneof": [ - "protoPayload", - "textPayload", - "jsonPayload" - ] - } - }, + "LogExclusion": { "fields": { - "logName": { + "name": { "type": "string", - "id": 12 - }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 8 + "id": 1 }, - "protoPayload": { - "type": "google.protobuf.Any", + "description": { + "type": "string", "id": 2 }, - "textPayload": { + "filter": { "type": "string", "id": 3 }, - "jsonPayload": { - "type": "google.protobuf.Struct", - "id": 6 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 9 - }, - "receiveTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 24 - }, - "severity": { - "type": "google.logging.type.LogSeverity", - "id": 10 - }, - "insertId": { - "type": "string", - "id": 4 - }, - "httpRequest": { - "type": "google.logging.type.HttpRequest", - "id": 7 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 11 - }, - "metadata": { - "type": "google.api.MonitoredResourceMetadata", - "id": 25, - "options": { - "deprecated": true - } - }, - "operation": { - "type": "LogEntryOperation", - "id": 15 - }, - "trace": { - "type": "string", - "id": 22 - }, - "spanId": { - "type": "string", - "id": 27 - }, - "traceSampled": { + "disabled": { "type": "bool", - "id": 30 + "id": 4 }, - "sourceLocation": { - "type": "LogEntrySourceLocation", - "id": 23 + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 } } }, - "LogEntryOperation": { + "ListExclusionsRequest": { "fields": { - "id": { + "parent": { "type": "string", "id": 1 }, - "producer": { + "pageToken": { "type": "string", "id": 2 }, - "first": { - "type": "bool", + "pageSize": { + "type": "int32", "id": 3 + } + } + }, + "ListExclusionsResponse": { + "fields": { + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", + "id": 1 }, - "last": { - "type": "bool", - "id": 4 + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "LogEntrySourceLocation": { + "GetExclusionRequest": { "fields": { - "file": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "CreateExclusionRequest": { + "fields": { + "parent": { "type": "string", "id": 1 }, - "line": { - "type": "int64", + "exclusion": { + "type": "LogExclusion", "id": 2 - }, - "function": { + } + } + }, + "UpdateExclusionRequest": { + "fields": { + "name": { "type": "string", + "id": 1 + }, + "exclusion": { + "type": "LogExclusion", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 3 } } }, + "DeleteExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, "MetricsServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", @@ -1962,14 +1962,104 @@ }, "api": { "options": { + "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", "java_multiple_files": true, "java_outer_classname": "MetricProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { + "MonitoredResourceDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "type": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 4 + }, + "launchStage": { + "type": "LaunchStage", + "id": 7 + } + } + }, + "MonitoredResource": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "MonitoredResourceMetadata": { + "fields": { + "systemLabels": { + "type": "google.protobuf.Struct", + "id": 1 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "ValueType", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { + "values": { + "STRING": 0, + "BOOL": 1, + "INT64": 2 + } + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, "http": { "type": "HttpRule", "id": 72295728, @@ -2073,96 +2163,6 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, - "MonitoredResourceDescriptor": { - "fields": { - "name": { - "type": "string", - "id": 5 - }, - "type": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", - "id": 4 - }, - "launchStage": { - "type": "LaunchStage", - "id": 7 - } - } - }, - "MonitoredResource": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "MonitoredResourceMetadata": { - "fields": { - "systemLabels": { - "type": "google.protobuf.Struct", - "id": 1 - }, - "userLabels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "LabelDescriptor": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "valueType": { - "type": "ValueType", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - }, - "nested": { - "ValueType": { - "values": { - "STRING": 0, - "BOOL": 1, - "INT64": 2 - } - } - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, "Distribution": { "fields": { "count": { diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index e05e9302873..b9f422182f4 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -19,7 +19,7 @@ import {Merge} from 'type-fest'; const EventId = require('eventid'); import * as extend from 'extend'; import * as is from 'is'; -import {google} from '../proto/logging'; +import {google} from '../protos/protos'; import {objToStruct, structToObj} from './common'; const eventId = new EventId(); diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 99b7f7a14dd..3733cd158ab 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -48,8 +48,7 @@ import { } from './log'; import {Sink} from './sink'; import {Duplex} from 'stream'; -import {google} from '../proto/logging'; -import {google as google_config} from '../proto/logging_config'; +import {google} from '../protos/protos'; import {Bucket} from '@google-cloud/storage'; // types only import {Dataset, BigQuery} from '@google-cloud/bigquery'; // types only @@ -67,7 +66,7 @@ export interface DeleteCallback { export type DeleteResponse = google.protobuf.Empty; -export type LogSink = google_config.logging.v2.ILogSink; +export type LogSink = google.logging.v2.ILogSink; export interface AbortableDuplex extends Duplex { abort(): void; @@ -80,7 +79,7 @@ export interface CreateSinkRequest { filter?: string; includeChildren?: boolean; name?: string; - outputVersionFormat?: google_config.logging.v2.LogSink.VersionFormat; + outputVersionFormat?: google.logging.v2.LogSink.VersionFormat; gaxOptions?: gax.CallOptions; } @@ -114,16 +113,16 @@ export interface GetSinksRequest { export type GetSinksResponse = [ Sink[], - google_config.logging.v2.IListSinksRequest, - google_config.logging.v2.IListSinksResponse + google.logging.v2.IListSinksRequest, + google.logging.v2.IListSinksResponse ]; export interface GetSinksCallback { ( err: Error | null, entries?: Sink[], - request?: google_config.logging.v2.IListSinksRequest, - apiResponse?: google_config.logging.v2.IListSinksResponse + request?: google.logging.v2.IListSinksRequest, + apiResponse?: google.logging.v2.IListSinksResponse ): void; } export type Client = string; diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 86fbb48b66f..83024d73c7e 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -19,7 +19,7 @@ import {callbackifyAll} from '@google-cloud/promisify'; import * as dotProp from 'dot-prop'; import * as extend from 'extend'; import {CallOptions} from 'google-gax'; -import {google} from '../proto/logging'; +import {google} from '../protos/protos'; import {GetEntriesCallback, GetEntriesResponse, Logging} from '.'; import {Entry, EntryJson, LogEntry} from './entry'; From 8e7cd3d1121aed8b6a212d15537e338bdfae34fd Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 3 Dec 2019 20:13:27 +0100 Subject: [PATCH 0512/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.19 (#644) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index aa2cfe80121..2de1c21121e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -50,7 +50,7 @@ "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@opencensus/propagation-stackdriver": "0.0.18", + "@opencensus/propagation-stackdriver": "0.0.19", "arrify": "^2.0.0", "dot-prop": "^5.1.0", "eventid": "^1.0.0", From ad4167d3635a4e6c5496a0cf8a672351cb119a69 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 5 Dec 2019 11:41:26 -0800 Subject: [PATCH 0513/1029] fix(deps): TypeScript 3.7.0 causes breaking change in typings (#654) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2de1c21121e..cc3c9679c31 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -106,7 +106,7 @@ "prettier": "^1.15.1", "proxyquire": "^2.1.0", "sinon": "^7.2.5", - "typescript": "~3.7.0", + "typescript": "3.6.4", "uuid": "^3.3.2" } } From 43dd6b15e8721f45d6db40b16d3e0bc943d33331 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 5 Dec 2019 16:44:34 -0800 Subject: [PATCH 0514/1029] docs: update comments --- handwritten/logging/protos/protos.d.ts | 4600 +++--- handwritten/logging/protos/protos.js | 12682 ++++++++-------- handwritten/logging/protos/protos.json | 1176 +- .../src/v2/doc/google/api/doc_metric.js | 74 +- handwritten/logging/synth.metadata | 10 +- 5 files changed, 9263 insertions(+), 9279 deletions(-) diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 94b5a518e14..c770b85a4a1 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -20,326 +20,384 @@ export namespace google { /** Namespace protobuf. */ namespace protobuf { - /** Properties of a Struct. */ - interface IStruct { + /** Properties of a Duration. */ + interface IDuration { - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); } - /** Represents a Struct. */ - class Struct implements IStruct { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Struct. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStruct); + constructor(properties?: google.protobuf.IDuration); - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; /** - * Creates a new Struct instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Struct instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Struct + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Struct + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a Struct message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Struct + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Struct to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a Value. */ - class Value implements IValue { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new Value. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue: google.protobuf.NullValue; - - /** Value numberValue. */ - public numberValue: number; - - /** Value stringValue. */ - public stringValue: string; - - /** Value boolValue. */ - public boolValue: boolean; - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new Value instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns Value instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Value + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Value + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a Value message. + * Verifies an Empty message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Value + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Value to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { + /** Properties of a FieldMask. */ + interface IFieldMask { - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents a ListValue. */ - class ListValue implements IListValue { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new ListValue. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IListValue); + constructor(properties?: google.protobuf.IFieldMask); - /** ListValue values. */ - public values: google.protobuf.IValue[]; + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new ListValue instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns ListValue instance + * @returns FieldMask instance */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListValue + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListValue + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies a ListValue message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListValue + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListValue to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new FileDescriptorSet. + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. * @param [properties] Properties to set */ constructor(properties?: google.protobuf.IFileDescriptorSet); @@ -3436,463 +3494,405 @@ export namespace google { } } - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); + /** Properties of a Struct. */ + interface IStruct { - /** Duration nanos */ - nanos?: (number|null); + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new Duration. + * Constructs a new Struct. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); + constructor(properties?: google.protobuf.IStruct); - /** Duration nanos. */ - public nanos: number; + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Struct instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Duration + * @returns Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @returns Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; /** - * Verifies a Duration message. + * Verifies a Struct message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Any. */ - interface IAny { + /** Properties of a Value. */ + interface IValue { - /** Any type_url */ - type_url?: (string|null); + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|null); - /** Any value */ - value?: (Uint8Array|null); + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); } - /** Represents an Any. */ - class Any implements IAny { + /** Represents a Value. */ + class Value implements IValue { /** - * Constructs a new Any. + * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IAny); + constructor(properties?: google.protobuf.IValue); - /** Any type_url. */ - public type_url: string; + /** Value nullValue. */ + public nullValue: google.protobuf.NullValue; - /** Any value. */ - public value: Uint8Array; + /** Value numberValue. */ + public numberValue: number; + + /** Value stringValue. */ + public stringValue: string; + + /** Value boolValue. */ + public boolValue: boolean; + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); /** - * Creates a new Any instance using the specified properties. + * Creates a new Value instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns Value instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Any + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Any + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; /** - * Verifies an Any message. + * Verifies a Value message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Any + * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Timestamp. */ - interface ITimestamp { + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } - /** Timestamp seconds */ - seconds?: (number|Long|null); + /** Properties of a ListValue. */ + interface IListValue { - /** Timestamp nanos */ - nanos?: (number|null); + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents a ListValue. */ + class ListValue implements IListValue { /** - * Constructs a new Timestamp. + * Constructs a new ListValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); + constructor(properties?: google.protobuf.IListValue); - /** Timestamp nanos. */ - public nanos: number; + /** ListValue values. */ + public values: google.protobuf.IValue[]; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns ListValue instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Timestamp + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; /** - * Verifies a Timestamp message. + * Verifies a ListValue message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns ListValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this ListValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an Any. */ + interface IAny { - /** Properties of a FieldMask. */ - interface IFieldMask { + /** Any type_url */ + type_url?: (string|null); - /** FieldMask paths */ - paths?: (string[]|null); + /** Any value */ + value?: (Uint8Array|null); } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new FieldMask. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); + constructor(properties?: google.protobuf.IAny); - /** FieldMask paths. */ - public paths: string[]; + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: Uint8Array; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a FieldMask message. + * Verifies an Any message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -3905,11 +3905,11 @@ export namespace google { /** Namespace v2. */ namespace v2 { - /** Represents a LoggingServiceV2 */ - class LoggingServiceV2 extends $protobuf.rpc.Service { + /** Represents a ConfigServiceV2 */ + class ConfigServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new LoggingServiceV2 service. + * Constructs a new ConfigServiceV2 service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -3917,3278 +3917,3278 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. + * Creates new ConfigServiceV2 service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSinksResponse */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; + public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object + * Calls ListSinks. + * @param request ListSinksRequest message or plain object * @returns Promise */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; + public listSinks(request: google.logging.v2.IListSinksRequest): Promise; /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; + public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object + * Calls GetSink. + * @param request GetSinkRequest message or plain object * @returns Promise */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; + public getSink(request: google.logging.v2.IGetSinkRequest): Promise; /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; + public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object * @returns Promise */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; + public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; + public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object * @returns Promise */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; + public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogsResponse + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; + public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object * @returns Promise */ - public listLogs(request: google.logging.v2.IListLogsRequest): Promise; - } + public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; - namespace LoggingServiceV2 { + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @param error Error, if any - * @param [response] Empty + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @returns Promise */ - type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @param error Error, if any - * @param [response] WriteLogEntriesResponse + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; + public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @param error Error, if any - * @param [response] ListLogEntriesResponse + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @returns Promise */ - type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; + public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @param error Error, if any - * @param [response] ListMonitoredResourceDescriptorsResponse + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; + public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @param error Error, if any - * @param [response] ListLogsResponse + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @returns Promise */ - type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; - } + public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; - /** Properties of a DeleteLogRequest. */ - interface IDeleteLogRequest { + /** + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; - /** DeleteLogRequest logName */ - logName?: (string|null); - } + /** + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @returns Promise + */ + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; - /** Represents a DeleteLogRequest. */ - class DeleteLogRequest implements IDeleteLogRequest { + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; /** - * Constructs a new DeleteLogRequest. - * @param [properties] Properties to set + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @returns Promise */ - constructor(properties?: google.logging.v2.IDeleteLogRequest); + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; + } - /** DeleteLogRequest logName. */ - public logName: string; + namespace ConfigServiceV2 { /** - * Creates a new DeleteLogRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteLogRequest instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @param error Error, if any + * @param [response] ListSinksResponse */ - public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; + type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; + type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @param error Error, if any + * @param [response] Empty */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; + type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Verifies a DeleteLogRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @param error Error, if any + * @param [response] ListExclusionsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteLogRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; + type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @param message DeleteLogRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Converts this DeleteLogRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public toJSON(): { [k: string]: any }; + type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a WriteLogEntriesRequest. */ - interface IWriteLogEntriesRequest { + /** Properties of a LogSink. */ + interface ILogSink { - /** WriteLogEntriesRequest logName */ - logName?: (string|null); + /** LogSink name */ + name?: (string|null); - /** WriteLogEntriesRequest resource */ - resource?: (google.api.IMonitoredResource|null); + /** LogSink destination */ + destination?: (string|null); - /** WriteLogEntriesRequest labels */ - labels?: ({ [k: string]: string }|null); + /** LogSink filter */ + filter?: (string|null); - /** WriteLogEntriesRequest entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** LogSink outputVersionFormat */ + outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|null); - /** WriteLogEntriesRequest partialSuccess */ - partialSuccess?: (boolean|null); + /** LogSink writerIdentity */ + writerIdentity?: (string|null); - /** WriteLogEntriesRequest dryRun */ - dryRun?: (boolean|null); + /** LogSink includeChildren */ + includeChildren?: (boolean|null); + + /** LogSink bigqueryOptions */ + bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogSink updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogSink startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** LogSink endTime */ + endTime?: (google.protobuf.ITimestamp|null); } - /** Represents a WriteLogEntriesRequest. */ - class WriteLogEntriesRequest implements IWriteLogEntriesRequest { + /** Represents a LogSink. */ + class LogSink implements ILogSink { /** - * Constructs a new WriteLogEntriesRequest. + * Constructs a new LogSink. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); + constructor(properties?: google.logging.v2.ILogSink); - /** WriteLogEntriesRequest logName. */ - public logName: string; + /** LogSink name. */ + public name: string; - /** WriteLogEntriesRequest resource. */ - public resource?: (google.api.IMonitoredResource|null); + /** LogSink destination. */ + public destination: string; - /** WriteLogEntriesRequest labels. */ - public labels: { [k: string]: string }; + /** LogSink filter. */ + public filter: string; - /** WriteLogEntriesRequest entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** LogSink outputVersionFormat. */ + public outputVersionFormat: google.logging.v2.LogSink.VersionFormat; - /** WriteLogEntriesRequest partialSuccess. */ - public partialSuccess: boolean; + /** LogSink writerIdentity. */ + public writerIdentity: string; - /** WriteLogEntriesRequest dryRun. */ - public dryRun: boolean; + /** LogSink includeChildren. */ + public includeChildren: boolean; + + /** LogSink bigqueryOptions. */ + public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogSink updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogSink startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** LogSink endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** LogSink options. */ + public options?: "bigqueryOptions"; /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. + * Creates a new LogSink instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesRequest instance + * @returns LogSink instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; + public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * Decodes a LogSink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesRequest + * @returns LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a LogSink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesRequest + * @returns LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; /** - * Verifies a WriteLogEntriesRequest message. + * Verifies a LogSink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesRequest + * @returns LogSink */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. - * @param message WriteLogEntriesRequest + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @param message LogSink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesRequest to JSON. + * Converts this LogSink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WriteLogEntriesResponse. */ - interface IWriteLogEntriesResponse { + namespace LogSink { + + /** VersionFormat enum. */ + enum VersionFormat { + VERSION_FORMAT_UNSPECIFIED = 0, + V2 = 1, + V1 = 2 + } } - /** Represents a WriteLogEntriesResponse. */ - class WriteLogEntriesResponse implements IWriteLogEntriesResponse { + /** Properties of a BigQueryOptions. */ + interface IBigQueryOptions { + + /** BigQueryOptions usePartitionedTables */ + usePartitionedTables?: (boolean|null); + } + + /** Represents a BigQueryOptions. */ + class BigQueryOptions implements IBigQueryOptions { /** - * Constructs a new WriteLogEntriesResponse. + * Constructs a new BigQueryOptions. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); + constructor(properties?: google.logging.v2.IBigQueryOptions); + + /** BigQueryOptions usePartitionedTables. */ + public usePartitionedTables: boolean; /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. + * Creates a new BigQueryOptions instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesResponse instance + * @returns BigQueryOptions instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; + public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * Decodes a BigQueryOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesResponse + * @returns BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesResponse + * @returns BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; /** - * Verifies a WriteLogEntriesResponse message. + * Verifies a BigQueryOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesResponse + * @returns BigQueryOptions */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. - * @param message WriteLogEntriesResponse + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @param message BigQueryOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesResponse to JSON. + * Converts this BigQueryOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WriteLogEntriesPartialErrors. */ - interface IWriteLogEntriesPartialErrors { + /** Properties of a ListSinksRequest. */ + interface IListSinksRequest { - /** WriteLogEntriesPartialErrors logEntryErrors */ - logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); + /** ListSinksRequest parent */ + parent?: (string|null); + + /** ListSinksRequest pageToken */ + pageToken?: (string|null); + + /** ListSinksRequest pageSize */ + pageSize?: (number|null); } - /** Represents a WriteLogEntriesPartialErrors. */ - class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { + /** Represents a ListSinksRequest. */ + class ListSinksRequest implements IListSinksRequest { /** - * Constructs a new WriteLogEntriesPartialErrors. + * Constructs a new ListSinksRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); + constructor(properties?: google.logging.v2.IListSinksRequest); - /** WriteLogEntriesPartialErrors logEntryErrors. */ - public logEntryErrors: { [k: string]: google.rpc.IStatus }; + /** ListSinksRequest parent. */ + public parent: string; + + /** ListSinksRequest pageToken. */ + public pageToken: string; + + /** ListSinksRequest pageSize. */ + public pageSize: number; /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * Creates a new ListSinksRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesPartialErrors instance + * @returns ListSinksRequest instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; + public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * Decodes a ListSinksRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesPartialErrors + * @returns ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesPartialErrors + * @returns ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; /** - * Verifies a WriteLogEntriesPartialErrors message. + * Verifies a ListSinksRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesPartialErrors + * @returns ListSinksRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. - * @param message WriteLogEntriesPartialErrors + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @param message ListSinksRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesPartialErrors to JSON. + * Converts this ListSinksRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogEntriesRequest. */ - interface IListLogEntriesRequest { - - /** ListLogEntriesRequest projectIds */ - projectIds?: (string[]|null); - - /** ListLogEntriesRequest resourceNames */ - resourceNames?: (string[]|null); - - /** ListLogEntriesRequest filter */ - filter?: (string|null); - - /** ListLogEntriesRequest orderBy */ - orderBy?: (string|null); + /** Properties of a ListSinksResponse. */ + interface IListSinksResponse { - /** ListLogEntriesRequest pageSize */ - pageSize?: (number|null); + /** ListSinksResponse sinks */ + sinks?: (google.logging.v2.ILogSink[]|null); - /** ListLogEntriesRequest pageToken */ - pageToken?: (string|null); + /** ListSinksResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListLogEntriesRequest. */ - class ListLogEntriesRequest implements IListLogEntriesRequest { + /** Represents a ListSinksResponse. */ + class ListSinksResponse implements IListSinksResponse { /** - * Constructs a new ListLogEntriesRequest. + * Constructs a new ListSinksResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogEntriesRequest); - - /** ListLogEntriesRequest projectIds. */ - public projectIds: string[]; - - /** ListLogEntriesRequest resourceNames. */ - public resourceNames: string[]; - - /** ListLogEntriesRequest filter. */ - public filter: string; - - /** ListLogEntriesRequest orderBy. */ - public orderBy: string; + constructor(properties?: google.logging.v2.IListSinksResponse); - /** ListLogEntriesRequest pageSize. */ - public pageSize: number; + /** ListSinksResponse sinks. */ + public sinks: google.logging.v2.ILogSink[]; - /** ListLogEntriesRequest pageToken. */ - public pageToken: string; + /** ListSinksResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListLogEntriesRequest instance using the specified properties. + * Creates a new ListSinksResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogEntriesRequest instance + * @returns ListSinksResponse instance */ - public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; + public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * Decodes a ListSinksResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogEntriesRequest + * @returns ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogEntriesRequest + * @returns ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; /** - * Verifies a ListLogEntriesRequest message. + * Verifies a ListSinksResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogEntriesRequest + * @returns ListSinksResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. - * @param message ListLogEntriesRequest + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @param message ListSinksResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogEntriesRequest to JSON. + * Converts this ListSinksResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogEntriesResponse. */ - interface IListLogEntriesResponse { - - /** ListLogEntriesResponse entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** Properties of a GetSinkRequest. */ + interface IGetSinkRequest { - /** ListLogEntriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetSinkRequest sinkName */ + sinkName?: (string|null); } - /** Represents a ListLogEntriesResponse. */ - class ListLogEntriesResponse implements IListLogEntriesResponse { + /** Represents a GetSinkRequest. */ + class GetSinkRequest implements IGetSinkRequest { /** - * Constructs a new ListLogEntriesResponse. + * Constructs a new GetSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogEntriesResponse); - - /** ListLogEntriesResponse entries. */ - public entries: google.logging.v2.ILogEntry[]; + constructor(properties?: google.logging.v2.IGetSinkRequest); - /** ListLogEntriesResponse nextPageToken. */ - public nextPageToken: string; + /** GetSinkRequest sinkName. */ + public sinkName: string; /** - * Creates a new ListLogEntriesResponse instance using the specified properties. + * Creates a new GetSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogEntriesResponse instance + * @returns GetSinkRequest instance */ - public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; + public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * Decodes a GetSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogEntriesResponse + * @returns GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogEntriesResponse + * @returns GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; /** - * Verifies a ListLogEntriesResponse message. + * Verifies a GetSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogEntriesResponse + * @returns GetSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. - * @param message ListLogEntriesResponse + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @param message GetSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogEntriesResponse to JSON. + * Converts this GetSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMonitoredResourceDescriptorsRequest. */ - interface IListMonitoredResourceDescriptorsRequest { + /** Properties of a CreateSinkRequest. */ + interface ICreateSinkRequest { - /** ListMonitoredResourceDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** CreateSinkRequest parent */ + parent?: (string|null); - /** ListMonitoredResourceDescriptorsRequest pageToken */ - pageToken?: (string|null); + /** CreateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); + + /** CreateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); } - /** Represents a ListMonitoredResourceDescriptorsRequest. */ - class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + /** Represents a CreateSinkRequest. */ + class CreateSinkRequest implements ICreateSinkRequest { /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new CreateSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); + constructor(properties?: google.logging.v2.ICreateSinkRequest); - /** ListMonitoredResourceDescriptorsRequest pageSize. */ - public pageSize: number; + /** CreateSinkRequest parent. */ + public parent: string; - /** ListMonitoredResourceDescriptorsRequest pageToken. */ - public pageToken: string; + /** CreateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** CreateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new CreateSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsRequest instance + * @returns CreateSinkRequest instance */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a CreateSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsRequest + * @returns CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsRequest + * @returns CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a CreateSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsRequest + * @returns CreateSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsRequest + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @param message CreateSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this CreateSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMonitoredResourceDescriptorsResponse. */ - interface IListMonitoredResourceDescriptorsResponse { + /** Properties of an UpdateSinkRequest. */ + interface IUpdateSinkRequest { - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ - resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + /** UpdateSinkRequest sinkName */ + sinkName?: (string|null); - /** ListMonitoredResourceDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + + /** UpdateSinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListMonitoredResourceDescriptorsResponse. */ - class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + /** Represents an UpdateSinkRequest. */ + class UpdateSinkRequest implements IUpdateSinkRequest { /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new UpdateSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); + constructor(properties?: google.logging.v2.IUpdateSinkRequest); - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ - public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + /** UpdateSinkRequest sinkName. */ + public sinkName: string; - /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; + + /** UpdateSinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * Creates a new UpdateSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsResponse instance + * @returns UpdateSinkRequest instance */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes an UpdateSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsResponse + * @returns UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsResponse + * @returns UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies an UpdateSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsResponse + * @returns UpdateSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsResponse + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @param message UpdateSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this UpdateSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogsRequest. */ - interface IListLogsRequest { - - /** ListLogsRequest parent */ - parent?: (string|null); - - /** ListLogsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a DeleteSinkRequest. */ + interface IDeleteSinkRequest { - /** ListLogsRequest pageToken */ - pageToken?: (string|null); + /** DeleteSinkRequest sinkName */ + sinkName?: (string|null); } - /** Represents a ListLogsRequest. */ - class ListLogsRequest implements IListLogsRequest { + /** Represents a DeleteSinkRequest. */ + class DeleteSinkRequest implements IDeleteSinkRequest { /** - * Constructs a new ListLogsRequest. + * Constructs a new DeleteSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogsRequest); - - /** ListLogsRequest parent. */ - public parent: string; - - /** ListLogsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.logging.v2.IDeleteSinkRequest); - /** ListLogsRequest pageToken. */ - public pageToken: string; + /** DeleteSinkRequest sinkName. */ + public sinkName: string; /** - * Creates a new ListLogsRequest instance using the specified properties. + * Creates a new DeleteSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogsRequest instance + * @returns DeleteSinkRequest instance */ - public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; + public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogsRequest message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogsRequest + * @returns DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogsRequest + * @returns DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; /** - * Verifies a ListLogsRequest message. + * Verifies a DeleteSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogsRequest + * @returns DeleteSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. - * @param message ListLogsRequest + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @param message DeleteSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogsRequest to JSON. + * Converts this DeleteSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogsResponse. */ - interface IListLogsResponse { + /** Properties of a LogExclusion. */ + interface ILogExclusion { - /** ListLogsResponse logNames */ - logNames?: (string[]|null); + /** LogExclusion name */ + name?: (string|null); - /** ListLogsResponse nextPageToken */ - nextPageToken?: (string|null); + /** LogExclusion description */ + description?: (string|null); + + /** LogExclusion filter */ + filter?: (string|null); + + /** LogExclusion disabled */ + disabled?: (boolean|null); + + /** LogExclusion createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogExclusion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListLogsResponse. */ - class ListLogsResponse implements IListLogsResponse { + /** Represents a LogExclusion. */ + class LogExclusion implements ILogExclusion { /** - * Constructs a new ListLogsResponse. + * Constructs a new LogExclusion. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogsResponse); + constructor(properties?: google.logging.v2.ILogExclusion); - /** ListLogsResponse logNames. */ - public logNames: string[]; + /** LogExclusion name. */ + public name: string; - /** ListLogsResponse nextPageToken. */ - public nextPageToken: string; + /** LogExclusion description. */ + public description: string; + + /** LogExclusion filter. */ + public filter: string; + + /** LogExclusion disabled. */ + public disabled: boolean; + + /** LogExclusion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogExclusion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListLogsResponse instance using the specified properties. + * Creates a new LogExclusion instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogsResponse instance + * @returns LogExclusion instance */ - public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; + public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogsResponse message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogsResponse + * @returns LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogsResponse + * @returns LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; /** - * Verifies a ListLogsResponse message. + * Verifies a LogExclusion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogsResponse + * @returns LogExclusion */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. - * @param message ListLogsResponse + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * @param message LogExclusion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogsResponse to JSON. + * Converts this LogExclusion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntry. */ - interface ILogEntry { - - /** LogEntry logName */ - logName?: (string|null); - - /** LogEntry resource */ - resource?: (google.api.IMonitoredResource|null); - - /** LogEntry protoPayload */ - protoPayload?: (google.protobuf.IAny|null); - - /** LogEntry textPayload */ - textPayload?: (string|null); - - /** LogEntry jsonPayload */ - jsonPayload?: (google.protobuf.IStruct|null); - - /** LogEntry timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry receiveTimestamp */ - receiveTimestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry severity */ - severity?: (google.logging.type.LogSeverity|null); - - /** LogEntry insertId */ - insertId?: (string|null); - - /** LogEntry httpRequest */ - httpRequest?: (google.logging.type.IHttpRequest|null); - - /** LogEntry labels */ - labels?: ({ [k: string]: string }|null); - - /** LogEntry metadata */ - metadata?: (google.api.IMonitoredResourceMetadata|null); - - /** LogEntry operation */ - operation?: (google.logging.v2.ILogEntryOperation|null); - - /** LogEntry trace */ - trace?: (string|null); + /** Properties of a ListExclusionsRequest. */ + interface IListExclusionsRequest { - /** LogEntry spanId */ - spanId?: (string|null); + /** ListExclusionsRequest parent */ + parent?: (string|null); - /** LogEntry traceSampled */ - traceSampled?: (boolean|null); + /** ListExclusionsRequest pageToken */ + pageToken?: (string|null); - /** LogEntry sourceLocation */ - sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + /** ListExclusionsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a LogEntry. */ - class LogEntry implements ILogEntry { + /** Represents a ListExclusionsRequest. */ + class ListExclusionsRequest implements IListExclusionsRequest { /** - * Constructs a new LogEntry. + * Constructs a new ListExclusionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntry); - - /** LogEntry logName. */ - public logName: string; - - /** LogEntry resource. */ - public resource?: (google.api.IMonitoredResource|null); - - /** LogEntry protoPayload. */ - public protoPayload?: (google.protobuf.IAny|null); - - /** LogEntry textPayload. */ - public textPayload: string; - - /** LogEntry jsonPayload. */ - public jsonPayload?: (google.protobuf.IStruct|null); - - /** LogEntry timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry receiveTimestamp. */ - public receiveTimestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry severity. */ - public severity: google.logging.type.LogSeverity; - - /** LogEntry insertId. */ - public insertId: string; - - /** LogEntry httpRequest. */ - public httpRequest?: (google.logging.type.IHttpRequest|null); - - /** LogEntry labels. */ - public labels: { [k: string]: string }; - - /** LogEntry metadata. */ - public metadata?: (google.api.IMonitoredResourceMetadata|null); - - /** LogEntry operation. */ - public operation?: (google.logging.v2.ILogEntryOperation|null); - - /** LogEntry trace. */ - public trace: string; - - /** LogEntry spanId. */ - public spanId: string; + constructor(properties?: google.logging.v2.IListExclusionsRequest); - /** LogEntry traceSampled. */ - public traceSampled: boolean; + /** ListExclusionsRequest parent. */ + public parent: string; - /** LogEntry sourceLocation. */ - public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + /** ListExclusionsRequest pageToken. */ + public pageToken: string; - /** LogEntry payload. */ - public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); + /** ListExclusionsRequest pageSize. */ + public pageSize: number; /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new ListExclusionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntry instance + * @returns ListExclusionsRequest instance */ - public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; + public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a ListExclusionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntry + * @returns ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntry + * @returns ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; /** - * Verifies a LogEntry message. + * Verifies a ListExclusionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntry + * @returns ListExclusionsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @param message LogEntry + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @param message ListExclusionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntry to JSON. + * Converts this ListExclusionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntryOperation. */ - interface ILogEntryOperation { - - /** LogEntryOperation id */ - id?: (string|null); - - /** LogEntryOperation producer */ - producer?: (string|null); + /** Properties of a ListExclusionsResponse. */ + interface IListExclusionsResponse { - /** LogEntryOperation first */ - first?: (boolean|null); + /** ListExclusionsResponse exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); - /** LogEntryOperation last */ - last?: (boolean|null); + /** ListExclusionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a LogEntryOperation. */ - class LogEntryOperation implements ILogEntryOperation { + /** Represents a ListExclusionsResponse. */ + class ListExclusionsResponse implements IListExclusionsResponse { /** - * Constructs a new LogEntryOperation. + * Constructs a new ListExclusionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntryOperation); - - /** LogEntryOperation id. */ - public id: string; - - /** LogEntryOperation producer. */ - public producer: string; + constructor(properties?: google.logging.v2.IListExclusionsResponse); - /** LogEntryOperation first. */ - public first: boolean; + /** ListExclusionsResponse exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; - /** LogEntryOperation last. */ - public last: boolean; + /** ListExclusionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new LogEntryOperation instance using the specified properties. + * Creates a new ListExclusionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntryOperation instance + * @returns ListExclusionsResponse instance */ - public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; + public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntryOperation message from the specified reader or buffer. + * Decodes a ListExclusionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntryOperation + * @returns ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntryOperation + * @returns ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; /** - * Verifies a LogEntryOperation message. + * Verifies a ListExclusionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntryOperation + * @returns ListExclusionsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. - * @param message LogEntryOperation + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @param message ListExclusionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntryOperation to JSON. + * Converts this ListExclusionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntrySourceLocation. */ - interface ILogEntrySourceLocation { - - /** LogEntrySourceLocation file */ - file?: (string|null); - - /** LogEntrySourceLocation line */ - line?: (number|Long|null); + /** Properties of a GetExclusionRequest. */ + interface IGetExclusionRequest { - /** LogEntrySourceLocation function */ - "function"?: (string|null); + /** GetExclusionRequest name */ + name?: (string|null); } - /** Represents a LogEntrySourceLocation. */ - class LogEntrySourceLocation implements ILogEntrySourceLocation { + /** Represents a GetExclusionRequest. */ + class GetExclusionRequest implements IGetExclusionRequest { /** - * Constructs a new LogEntrySourceLocation. + * Constructs a new GetExclusionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntrySourceLocation); - - /** LogEntrySourceLocation file. */ - public file: string; - - /** LogEntrySourceLocation line. */ - public line: (number|Long); + constructor(properties?: google.logging.v2.IGetExclusionRequest); - /** LogEntrySourceLocation function. */ - public function: string; + /** GetExclusionRequest name. */ + public name: string; /** - * Creates a new LogEntrySourceLocation instance using the specified properties. + * Creates a new GetExclusionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntrySourceLocation instance + * @returns GetExclusionRequest instance */ - public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; + public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * Decodes a GetExclusionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntrySourceLocation + * @returns GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntrySourceLocation + * @returns GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; /** - * Verifies a LogEntrySourceLocation message. + * Verifies a GetExclusionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntrySourceLocation + * @returns GetExclusionRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. - * @param message LogEntrySourceLocation + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @param message GetExclusionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntrySourceLocation to JSON. + * Converts this GetExclusionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a ConfigServiceV2 */ - class ConfigServiceV2 extends $protobuf.rpc.Service { + /** Properties of a CreateExclusionRequest. */ + interface ICreateExclusionRequest { - /** - * Constructs a new ConfigServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** CreateExclusionRequest parent */ + parent?: (string|null); - /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; + /** CreateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + } + + /** Represents a CreateExclusionRequest. */ + class CreateExclusionRequest implements ICreateExclusionRequest { /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSinksResponse + * Constructs a new CreateExclusionRequest. + * @param [properties] Properties to set */ - public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; + constructor(properties?: google.logging.v2.ICreateExclusionRequest); + + /** CreateExclusionRequest parent. */ + public parent: string; + + /** CreateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @returns Promise + * Creates a new CreateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateExclusionRequest instance */ - public listSinks(request: google.logging.v2.IListSinksRequest): Promise; + public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; + public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @returns Promise + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getSink(request: google.logging.v2.IGetSinkRequest): Promise; + public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @returns Promise + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink + * Verifies a CreateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @returns Promise + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateExclusionRequest */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @param message CreateExclusionRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; + public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @returns Promise + * Converts this CreateExclusionRequest to JSON. + * @returns JSON object */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateExclusionRequest. */ + interface IUpdateExclusionRequest { + + /** UpdateExclusionRequest name */ + name?: (string|null); + + /** UpdateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + + /** UpdateExclusionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateExclusionRequest. */ + class UpdateExclusionRequest implements IUpdateExclusionRequest { /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse + * Constructs a new UpdateExclusionRequest. + * @param [properties] Properties to set */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; + constructor(properties?: google.logging.v2.IUpdateExclusionRequest); + + /** UpdateExclusionRequest name. */ + public name: string; + + /** UpdateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); + + /** UpdateExclusionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @returns Promise + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateExclusionRequest instance */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; + public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; + public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @returns Promise + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; + public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @returns Promise + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion + * Verifies an UpdateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @returns Promise + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateExclusionRequest */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @param message UpdateExclusionRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; + public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @returns Promise + * Converts this UpdateExclusionRequest to JSON. + * @returns JSON object */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace ConfigServiceV2 { + /** Properties of a DeleteExclusionRequest. */ + interface IDeleteExclusionRequest { + + /** DeleteExclusionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteExclusionRequest. */ + class DeleteExclusionRequest implements IDeleteExclusionRequest { /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @param error Error, if any - * @param [response] ListSinksResponse + * Constructs a new DeleteExclusionRequest. + * @param [properties] Properties to set */ - type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; + constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + + /** DeleteExclusionRequest name. */ + public name: string; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @param error Error, if any - * @param [response] LogSink + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteExclusionRequest instance */ - type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @param error Error, if any - * @param [response] LogSink + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @param error Error, if any - * @param [response] LogSink + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @param error Error, if any - * @param [response] Empty + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @param error Error, if any - * @param [response] ListExclusionsResponse + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Verifies a DeleteExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteExclusionRequest */ - type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @param message DeleteExclusionRequest + * @param [options] Conversion options + * @returns Plain object */ - type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @param error Error, if any - * @param [response] Empty + * Converts this DeleteExclusionRequest to JSON. + * @returns JSON object */ - type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of a LogSink. */ - interface ILogSink { - - /** LogSink name */ - name?: (string|null); - - /** LogSink destination */ - destination?: (string|null); - - /** LogSink filter */ - filter?: (string|null); - - /** LogSink outputVersionFormat */ - outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|null); - - /** LogSink writerIdentity */ - writerIdentity?: (string|null); - - /** LogSink includeChildren */ - includeChildren?: (boolean|null); - - /** LogSink bigqueryOptions */ - bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); - - /** LogSink createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** LogSink updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** LogSink startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** LogSink endTime */ - endTime?: (google.protobuf.ITimestamp|null); + public toJSON(): { [k: string]: any }; } - /** Represents a LogSink. */ - class LogSink implements ILogSink { + /** Represents a LoggingServiceV2 */ + class LoggingServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new LogSink. - * @param [properties] Properties to set + * Constructs a new LoggingServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.logging.v2.ILogSink); - - /** LogSink name. */ - public name: string; - - /** LogSink destination. */ - public destination: string; - - /** LogSink filter. */ - public filter: string; - - /** LogSink outputVersionFormat. */ - public outputVersionFormat: google.logging.v2.LogSink.VersionFormat; - - /** LogSink writerIdentity. */ - public writerIdentity: string; - - /** LogSink includeChildren. */ - public includeChildren: boolean; - - /** LogSink bigqueryOptions. */ - public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** LogSink createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; - /** LogSink updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; - /** LogSink startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @returns Promise + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; - /** LogSink endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; - /** LogSink options. */ - public options?: "bigqueryOptions"; + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @returns Promise + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; /** - * Creates a new LogSink instance using the specified properties. - * @param [properties] Properties to set - * @returns LogSink instance + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse */ - public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @returns Promise */ - public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse */ - public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; /** - * Decodes a LogSink message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogSink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogSink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogsResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; + public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; /** - * Verifies a LogSink message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public listLogs(request: google.logging.v2.IListLogsRequest): Promise; + } + + namespace LoggingServiceV2 { /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogSink + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @param error Error, if any + * @param [response] Empty */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; + type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. - * @param message LogSink - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @param error Error, if any + * @param [response] WriteLogEntriesResponse */ - public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; /** - * Converts this LogSink to JSON. - * @returns JSON object + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @param error Error, if any + * @param [response] ListLogEntriesResponse */ - public toJSON(): { [k: string]: any }; - } + type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; - namespace LogSink { + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse + */ + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; - /** VersionFormat enum. */ - enum VersionFormat { - VERSION_FORMAT_UNSPECIFIED = 0, - V2 = 1, - V1 = 2 - } + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @param error Error, if any + * @param [response] ListLogsResponse + */ + type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; } - /** Properties of a BigQueryOptions. */ - interface IBigQueryOptions { + /** Properties of a DeleteLogRequest. */ + interface IDeleteLogRequest { - /** BigQueryOptions usePartitionedTables */ - usePartitionedTables?: (boolean|null); + /** DeleteLogRequest logName */ + logName?: (string|null); } - /** Represents a BigQueryOptions. */ - class BigQueryOptions implements IBigQueryOptions { + /** Represents a DeleteLogRequest. */ + class DeleteLogRequest implements IDeleteLogRequest { /** - * Constructs a new BigQueryOptions. + * Constructs a new DeleteLogRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IBigQueryOptions); + constructor(properties?: google.logging.v2.IDeleteLogRequest); - /** BigQueryOptions usePartitionedTables. */ - public usePartitionedTables: boolean; + /** DeleteLogRequest logName. */ + public logName: string; /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new DeleteLogRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryOptions instance + * @returns DeleteLogRequest instance */ - public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; + public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a DeleteLogRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryOptions + * @returns DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryOptions + * @returns DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; /** - * Verifies a BigQueryOptions message. + * Verifies a DeleteLogRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryOptions + * @returns DeleteLogRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. - * @param message BigQueryOptions + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @param message DeleteLogRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryOptions to JSON. + * Converts this DeleteLogRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksRequest. */ - interface IListSinksRequest { + /** Properties of a WriteLogEntriesRequest. */ + interface IWriteLogEntriesRequest { - /** ListSinksRequest parent */ - parent?: (string|null); + /** WriteLogEntriesRequest logName */ + logName?: (string|null); - /** ListSinksRequest pageToken */ - pageToken?: (string|null); + /** WriteLogEntriesRequest resource */ + resource?: (google.api.IMonitoredResource|null); - /** ListSinksRequest pageSize */ - pageSize?: (number|null); + /** WriteLogEntriesRequest labels */ + labels?: ({ [k: string]: string }|null); + + /** WriteLogEntriesRequest entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** WriteLogEntriesRequest partialSuccess */ + partialSuccess?: (boolean|null); + + /** WriteLogEntriesRequest dryRun */ + dryRun?: (boolean|null); } - /** Represents a ListSinksRequest. */ - class ListSinksRequest implements IListSinksRequest { + /** Represents a WriteLogEntriesRequest. */ + class WriteLogEntriesRequest implements IWriteLogEntriesRequest { /** - * Constructs a new ListSinksRequest. + * Constructs a new WriteLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksRequest); + constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); - /** ListSinksRequest parent. */ - public parent: string; + /** WriteLogEntriesRequest logName. */ + public logName: string; - /** ListSinksRequest pageToken. */ - public pageToken: string; + /** WriteLogEntriesRequest resource. */ + public resource?: (google.api.IMonitoredResource|null); - /** ListSinksRequest pageSize. */ - public pageSize: number; + /** WriteLogEntriesRequest labels. */ + public labels: { [k: string]: string }; + + /** WriteLogEntriesRequest entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** WriteLogEntriesRequest partialSuccess. */ + public partialSuccess: boolean; + + /** WriteLogEntriesRequest dryRun. */ + public dryRun: boolean; /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new WriteLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksRequest instance + * @returns WriteLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; + public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksRequest + * @returns WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksRequest + * @returns WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; /** - * Verifies a ListSinksRequest message. + * Verifies a WriteLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksRequest + * @returns WriteLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. - * @param message ListSinksRequest + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @param message WriteLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksRequest to JSON. + * Converts this WriteLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksResponse. */ - interface IListSinksResponse { - - /** ListSinksResponse sinks */ - sinks?: (google.logging.v2.ILogSink[]|null); - - /** ListSinksResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a WriteLogEntriesResponse. */ + interface IWriteLogEntriesResponse { } - /** Represents a ListSinksResponse. */ - class ListSinksResponse implements IListSinksResponse { + /** Represents a WriteLogEntriesResponse. */ + class WriteLogEntriesResponse implements IWriteLogEntriesResponse { /** - * Constructs a new ListSinksResponse. + * Constructs a new WriteLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksResponse); - - /** ListSinksResponse sinks. */ - public sinks: google.logging.v2.ILogSink[]; - - /** ListSinksResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new WriteLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksResponse instance + * @returns WriteLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; + public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksResponse + * @returns WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksResponse + * @returns WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; /** - * Verifies a ListSinksResponse message. + * Verifies a WriteLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksResponse + * @returns WriteLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. - * @param message ListSinksResponse + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @param message WriteLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksResponse to JSON. + * Converts this WriteLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSinkRequest. */ - interface IGetSinkRequest { + /** Properties of a WriteLogEntriesPartialErrors. */ + interface IWriteLogEntriesPartialErrors { - /** GetSinkRequest sinkName */ - sinkName?: (string|null); + /** WriteLogEntriesPartialErrors logEntryErrors */ + logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); } - /** Represents a GetSinkRequest. */ - class GetSinkRequest implements IGetSinkRequest { + /** Represents a WriteLogEntriesPartialErrors. */ + class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { /** - * Constructs a new GetSinkRequest. + * Constructs a new WriteLogEntriesPartialErrors. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetSinkRequest); + constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); - /** GetSinkRequest sinkName. */ - public sinkName: string; + /** WriteLogEntriesPartialErrors logEntryErrors. */ + public logEntryErrors: { [k: string]: google.rpc.IStatus }; /** - * Creates a new GetSinkRequest instance using the specified properties. + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. * @param [properties] Properties to set - * @returns GetSinkRequest instance + * @returns WriteLogEntriesPartialErrors instance */ - public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; + public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSinkRequest + * @returns WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSinkRequest + * @returns WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Verifies a GetSinkRequest message. + * Verifies a WriteLogEntriesPartialErrors message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSinkRequest + * @returns WriteLogEntriesPartialErrors */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. - * @param message GetSinkRequest + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @param message WriteLogEntriesPartialErrors * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSinkRequest to JSON. + * Converts this WriteLogEntriesPartialErrors to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateSinkRequest. */ - interface ICreateSinkRequest { + /** Properties of a ListLogEntriesRequest. */ + interface IListLogEntriesRequest { - /** CreateSinkRequest parent */ - parent?: (string|null); + /** ListLogEntriesRequest projectIds */ + projectIds?: (string[]|null); - /** CreateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** ListLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); - /** CreateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** ListLogEntriesRequest filter */ + filter?: (string|null); + + /** ListLogEntriesRequest orderBy */ + orderBy?: (string|null); + + /** ListLogEntriesRequest pageSize */ + pageSize?: (number|null); + + /** ListLogEntriesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a CreateSinkRequest. */ - class CreateSinkRequest implements ICreateSinkRequest { + /** Represents a ListLogEntriesRequest. */ + class ListLogEntriesRequest implements IListLogEntriesRequest { /** - * Constructs a new CreateSinkRequest. + * Constructs a new ListLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICreateSinkRequest); + constructor(properties?: google.logging.v2.IListLogEntriesRequest); - /** CreateSinkRequest parent. */ - public parent: string; + /** ListLogEntriesRequest projectIds. */ + public projectIds: string[]; - /** CreateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + /** ListLogEntriesRequest resourceNames. */ + public resourceNames: string[]; - /** CreateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ListLogEntriesRequest filter. */ + public filter: string; + + /** ListLogEntriesRequest orderBy. */ + public orderBy: string; + + /** ListLogEntriesRequest pageSize. */ + public pageSize: number; + + /** ListLogEntriesRequest pageToken. */ + public pageToken: string; /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new ListLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSinkRequest instance + * @returns ListLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; + public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSinkRequest + * @returns ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSinkRequest + * @returns ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; /** - * Verifies a CreateSinkRequest message. + * Verifies a ListLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSinkRequest + * @returns ListLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. - * @param message CreateSinkRequest + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @param message ListLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this ListLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSinkRequest. */ - interface IUpdateSinkRequest { - - /** UpdateSinkRequest sinkName */ - sinkName?: (string|null); - - /** UpdateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** Properties of a ListLogEntriesResponse. */ + interface IListLogEntriesResponse { - /** UpdateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** ListLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); - /** UpdateSinkRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListLogEntriesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateSinkRequest. */ - class UpdateSinkRequest implements IUpdateSinkRequest { + /** Represents a ListLogEntriesResponse. */ + class ListLogEntriesResponse implements IListLogEntriesResponse { /** - * Constructs a new UpdateSinkRequest. + * Constructs a new ListLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateSinkRequest); - - /** UpdateSinkRequest sinkName. */ - public sinkName: string; - - /** UpdateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + constructor(properties?: google.logging.v2.IListLogEntriesResponse); - /** UpdateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ListLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; - /** UpdateSinkRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListLogEntriesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateSinkRequest instance using the specified properties. + * Creates a new ListLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSinkRequest instance + * @returns ListLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; + public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSinkRequest + * @returns ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSinkRequest + * @returns ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; /** - * Verifies an UpdateSinkRequest message. + * Verifies a ListLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSinkRequest + * @returns ListLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @param message UpdateSinkRequest + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @param message ListLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSinkRequest to JSON. + * Converts this ListLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteSinkRequest. */ - interface IDeleteSinkRequest { + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { - /** DeleteSinkRequest sinkName */ - sinkName?: (string|null); + /** ListMonitoredResourceDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListMonitoredResourceDescriptorsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DeleteSinkRequest. */ - class DeleteSinkRequest implements IDeleteSinkRequest { + /** Represents a ListMonitoredResourceDescriptorsRequest. */ + class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { /** - * Constructs a new DeleteSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteSinkRequest); + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); - /** DeleteSinkRequest sinkName. */ - public sinkName: string; + /** ListMonitoredResourceDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListMonitoredResourceDescriptorsRequest pageToken. */ + public pageToken: string; /** - * Creates a new DeleteSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSinkRequest instance + * @returns ListMonitoredResourceDescriptorsRequest instance */ - public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Verifies a DeleteSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @param message DeleteSinkRequest + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogExclusion. */ - interface ILogExclusion { - - /** LogExclusion name */ - name?: (string|null); - - /** LogExclusion description */ - description?: (string|null); - - /** LogExclusion filter */ - filter?: (string|null); - - /** LogExclusion disabled */ - disabled?: (boolean|null); + /** Properties of a ListMonitoredResourceDescriptorsResponse. */ + interface IListMonitoredResourceDescriptorsResponse { - /** LogExclusion createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ + resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); - /** LogExclusion updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListMonitoredResourceDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a LogExclusion. */ - class LogExclusion implements ILogExclusion { + /** Represents a ListMonitoredResourceDescriptorsResponse. */ + class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { /** - * Constructs a new LogExclusion. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogExclusion); - - /** LogExclusion name. */ - public name: string; - - /** LogExclusion description. */ - public description: string; - - /** LogExclusion filter. */ - public filter: string; - - /** LogExclusion disabled. */ - public disabled: boolean; + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); - /** LogExclusion createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ + public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; - /** LogExclusion updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new LogExclusion instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns LogExclusion instance + * @returns ListMonitoredResourceDescriptorsResponse instance */ - public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogExclusion message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogExclusion + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogExclusion + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Verifies a LogExclusion message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogExclusion + * @returns ListMonitoredResourceDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @param message LogExclusion + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogExclusion to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListExclusionsRequest. */ - interface IListExclusionsRequest { + /** Properties of a ListLogsRequest. */ + interface IListLogsRequest { - /** ListExclusionsRequest parent */ + /** ListLogsRequest parent */ parent?: (string|null); - /** ListExclusionsRequest pageToken */ - pageToken?: (string|null); - - /** ListExclusionsRequest pageSize */ + /** ListLogsRequest pageSize */ pageSize?: (number|null); + + /** ListLogsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ListExclusionsRequest. */ - class ListExclusionsRequest implements IListExclusionsRequest { + /** Represents a ListLogsRequest. */ + class ListLogsRequest implements IListLogsRequest { /** - * Constructs a new ListExclusionsRequest. + * Constructs a new ListLogsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListExclusionsRequest); + constructor(properties?: google.logging.v2.IListLogsRequest); - /** ListExclusionsRequest parent. */ + /** ListLogsRequest parent. */ public parent: string; - /** ListExclusionsRequest pageToken. */ - public pageToken: string; - - /** ListExclusionsRequest pageSize. */ + /** ListLogsRequest pageSize. */ public pageSize: number; + /** ListLogsRequest pageToken. */ + public pageToken: string; + /** - * Creates a new ListExclusionsRequest instance using the specified properties. + * Creates a new ListLogsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListExclusionsRequest instance + * @returns ListLogsRequest instance */ - public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; + public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExclusionsRequest + * @returns ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExclusionsRequest + * @returns ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; /** - * Verifies a ListExclusionsRequest message. + * Verifies a ListLogsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExclusionsRequest + * @returns ListLogsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @param message ListExclusionsRequest + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * @param message ListLogsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExclusionsRequest to JSON. + * Converts this ListLogsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListExclusionsResponse. */ - interface IListExclusionsResponse { + /** Properties of a ListLogsResponse. */ + interface IListLogsResponse { - /** ListExclusionsResponse exclusions */ - exclusions?: (google.logging.v2.ILogExclusion[]|null); + /** ListLogsResponse logNames */ + logNames?: (string[]|null); - /** ListExclusionsResponse nextPageToken */ + /** ListLogsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListExclusionsResponse. */ - class ListExclusionsResponse implements IListExclusionsResponse { + /** Represents a ListLogsResponse. */ + class ListLogsResponse implements IListLogsResponse { /** - * Constructs a new ListExclusionsResponse. + * Constructs a new ListLogsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListExclusionsResponse); + constructor(properties?: google.logging.v2.IListLogsResponse); - /** ListExclusionsResponse exclusions. */ - public exclusions: google.logging.v2.ILogExclusion[]; + /** ListLogsResponse logNames. */ + public logNames: string[]; - /** ListExclusionsResponse nextPageToken. */ + /** ListLogsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListExclusionsResponse instance using the specified properties. + * Creates a new ListLogsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListExclusionsResponse instance + * @returns ListLogsResponse instance */ - public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; + public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExclusionsResponse + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExclusionsResponse + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; /** - * Verifies a ListExclusionsResponse message. + * Verifies a ListLogsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExclusionsResponse + * @returns ListLogsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. - * @param message ListExclusionsResponse + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @param message ListLogsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExclusionsResponse to JSON. + * Converts this ListLogsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetExclusionRequest. */ - interface IGetExclusionRequest { + /** Properties of a LogEntry. */ + interface ILogEntry { - /** GetExclusionRequest name */ - name?: (string|null); - } + /** LogEntry logName */ + logName?: (string|null); - /** Represents a GetExclusionRequest. */ - class GetExclusionRequest implements IGetExclusionRequest { + /** LogEntry resource */ + resource?: (google.api.IMonitoredResource|null); - /** - * Constructs a new GetExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IGetExclusionRequest); + /** LogEntry protoPayload */ + protoPayload?: (google.protobuf.IAny|null); - /** GetExclusionRequest name. */ - public name: string; + /** LogEntry textPayload */ + textPayload?: (string|null); - /** - * Creates a new GetExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetExclusionRequest instance - */ - public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; + /** LogEntry jsonPayload */ + jsonPayload?: (google.protobuf.IStruct|null); - /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogEntry receiveTimestamp */ + receiveTimestamp?: (google.protobuf.ITimestamp|null); - /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; + /** LogEntry severity */ + severity?: (google.logging.type.LogSeverity|null); + + /** LogEntry insertId */ + insertId?: (string|null); + + /** LogEntry httpRequest */ + httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels */ + labels?: ({ [k: string]: string }|null); + + /** LogEntry metadata */ + metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation */ + operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace */ + trace?: (string|null); + + /** LogEntry spanId */ + spanId?: (string|null); + + /** LogEntry traceSampled */ + traceSampled?: (boolean|null); + + /** LogEntry sourceLocation */ + sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + } - /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { /** - * Verifies a GetExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new LogEntry. + * @param [properties] Properties to set */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(properties?: google.logging.v2.ILogEntry); - /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; + /** LogEntry logName. */ + public logName: string; - /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. - * @param message GetExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** LogEntry resource. */ + public resource?: (google.api.IMonitoredResource|null); - /** - * Converts this GetExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** LogEntry protoPayload. */ + public protoPayload?: (google.protobuf.IAny|null); - /** Properties of a CreateExclusionRequest. */ - interface ICreateExclusionRequest { + /** LogEntry textPayload. */ + public textPayload: string; - /** CreateExclusionRequest parent */ - parent?: (string|null); + /** LogEntry jsonPayload. */ + public jsonPayload?: (google.protobuf.IStruct|null); - /** CreateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); - } + /** LogEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); - /** Represents a CreateExclusionRequest. */ - class CreateExclusionRequest implements ICreateExclusionRequest { + /** LogEntry receiveTimestamp. */ + public receiveTimestamp?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new CreateExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ICreateExclusionRequest); + /** LogEntry severity. */ + public severity: google.logging.type.LogSeverity; - /** CreateExclusionRequest parent. */ - public parent: string; + /** LogEntry insertId. */ + public insertId: string; - /** CreateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + /** LogEntry httpRequest. */ + public httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels. */ + public labels: { [k: string]: string }; + + /** LogEntry metadata. */ + public metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation. */ + public operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace. */ + public trace: string; + + /** LogEntry spanId. */ + public spanId: string; + + /** LogEntry traceSampled. */ + public traceSampled: boolean; + + /** LogEntry sourceLocation. */ + public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + + /** LogEntry payload. */ + public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); /** - * Creates a new CreateExclusionRequest instance using the specified properties. + * Creates a new LogEntry instance using the specified properties. * @param [properties] Properties to set - * @returns CreateExclusionRequest instance + * @returns LogEntry instance */ - public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; + public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateExclusionRequest + * @returns LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateExclusionRequest + * @returns LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; /** - * Verifies a CreateExclusionRequest message. + * Verifies a LogEntry message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateExclusionRequest + * @returns LogEntry */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @param message CreateExclusionRequest + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateExclusionRequest to JSON. + * Converts this LogEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateExclusionRequest. */ - interface IUpdateExclusionRequest { + /** Properties of a LogEntryOperation. */ + interface ILogEntryOperation { - /** UpdateExclusionRequest name */ - name?: (string|null); + /** LogEntryOperation id */ + id?: (string|null); - /** UpdateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); + /** LogEntryOperation producer */ + producer?: (string|null); - /** UpdateExclusionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** LogEntryOperation first */ + first?: (boolean|null); + + /** LogEntryOperation last */ + last?: (boolean|null); } - /** Represents an UpdateExclusionRequest. */ - class UpdateExclusionRequest implements IUpdateExclusionRequest { + /** Represents a LogEntryOperation. */ + class LogEntryOperation implements ILogEntryOperation { /** - * Constructs a new UpdateExclusionRequest. + * Constructs a new LogEntryOperation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateExclusionRequest); + constructor(properties?: google.logging.v2.ILogEntryOperation); - /** UpdateExclusionRequest name. */ - public name: string; + /** LogEntryOperation id. */ + public id: string; - /** UpdateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + /** LogEntryOperation producer. */ + public producer: string; - /** UpdateExclusionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** LogEntryOperation first. */ + public first: boolean; + + /** LogEntryOperation last. */ + public last: boolean; /** - * Creates a new UpdateExclusionRequest instance using the specified properties. + * Creates a new LogEntryOperation instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateExclusionRequest instance + * @returns LogEntryOperation instance */ - public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; + public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntryOperation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateExclusionRequest + * @returns LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateExclusionRequest + * @returns LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; /** - * Verifies an UpdateExclusionRequest message. + * Verifies a LogEntryOperation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateExclusionRequest + * @returns LogEntryOperation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. - * @param message UpdateExclusionRequest + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @param message LogEntryOperation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateExclusionRequest to JSON. + * Converts this LogEntryOperation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteExclusionRequest. */ - interface IDeleteExclusionRequest { + /** Properties of a LogEntrySourceLocation. */ + interface ILogEntrySourceLocation { - /** DeleteExclusionRequest name */ - name?: (string|null); + /** LogEntrySourceLocation file */ + file?: (string|null); + + /** LogEntrySourceLocation line */ + line?: (number|Long|null); + + /** LogEntrySourceLocation function */ + "function"?: (string|null); } - /** Represents a DeleteExclusionRequest. */ - class DeleteExclusionRequest implements IDeleteExclusionRequest { + /** Represents a LogEntrySourceLocation. */ + class LogEntrySourceLocation implements ILogEntrySourceLocation { /** - * Constructs a new DeleteExclusionRequest. + * Constructs a new LogEntrySourceLocation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + constructor(properties?: google.logging.v2.ILogEntrySourceLocation); - /** DeleteExclusionRequest name. */ - public name: string; + /** LogEntrySourceLocation file. */ + public file: string; + + /** LogEntrySourceLocation line. */ + public line: (number|Long); + + /** LogEntrySourceLocation function. */ + public function: string; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. + * Creates a new LogEntrySourceLocation instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteExclusionRequest instance + * @returns LogEntrySourceLocation instance */ - public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; + public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteExclusionRequest + * @returns LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteExclusionRequest + * @returns LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; /** - * Verifies a DeleteExclusionRequest message. + * Verifies a LogEntrySourceLocation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteExclusionRequest + * @returns LogEntrySourceLocation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. - * @param message DeleteExclusionRequest + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @param message LogEntrySourceLocation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteExclusionRequest to JSON. + * Converts this LogEntrySourceLocation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -8242,779 +8242,779 @@ export namespace google { /** Namespace api. */ namespace api { - /** Properties of a MonitoredResourceDescriptor. */ - interface IMonitoredResourceDescriptor { - - /** MonitoredResourceDescriptor name */ - name?: (string|null); - - /** MonitoredResourceDescriptor type */ - type?: (string|null); - - /** MonitoredResourceDescriptor displayName */ - displayName?: (string|null); - - /** MonitoredResourceDescriptor description */ - description?: (string|null); + /** Properties of a Http. */ + interface IHttp { - /** MonitoredResourceDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** MonitoredResourceDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|null); + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Represents a MonitoredResourceDescriptor. */ - class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new Http. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceDescriptor); - - /** MonitoredResourceDescriptor name. */ - public name: string; - - /** MonitoredResourceDescriptor type. */ - public type: string; - - /** MonitoredResourceDescriptor displayName. */ - public displayName: string; - - /** MonitoredResourceDescriptor description. */ - public description: string; + constructor(properties?: google.api.IHttp); - /** MonitoredResourceDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** MonitoredResourceDescriptor launchStage. */ - public launchStage: google.api.LaunchStage; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceDescriptor instance + * @returns Http instance */ - public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceDescriptor + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceDescriptor + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a Http message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceDescriptor + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @param message MonitoredResourceDescriptor + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResource. */ - interface IMonitoredResource { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** MonitoredResource type */ - type?: (string|null); + /** HttpRule selector */ + selector?: (string|null); - /** MonitoredResource labels */ - labels?: ({ [k: string]: string }|null); + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); } - /** Represents a MonitoredResource. */ - class MonitoredResource implements IMonitoredResource { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Constructs a new MonitoredResource. + * Constructs a new HttpRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResource); + constructor(properties?: google.api.IHttpRule); - /** MonitoredResource type. */ - public type: string; + /** HttpRule selector. */ + public selector: string; - /** MonitoredResource labels. */ - public labels: { [k: string]: string }; + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResource instance + * @returns HttpRule instance */ - public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResource + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResource + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; /** - * Verifies a MonitoredResource message. + * Verifies a HttpRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResource + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @param message MonitoredResource + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResource to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResourceMetadata. */ - interface IMonitoredResourceMetadata { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** MonitoredResourceMetadata systemLabels */ - systemLabels?: (google.protobuf.IStruct|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** MonitoredResourceMetadata userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a MonitoredResourceMetadata. */ - class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceMetadata); + constructor(properties?: google.api.ICustomHttpPattern); - /** MonitoredResourceMetadata systemLabels. */ - public systemLabels?: (google.protobuf.IStruct|null); + /** CustomHttpPattern kind. */ + public kind: string; - /** MonitoredResourceMetadata userLabels. */ - public userLabels: { [k: string]: string }; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceMetadata instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceMetadata + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceMetadata + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a CustomHttpPattern message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceMetadata + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @param message MonitoredResourceMetadata + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { - /** LabelDescriptor key */ - key?: (string|null); + /** MonitoredResourceDescriptor name */ + name?: (string|null); - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|null); + /** MonitoredResourceDescriptor type */ + type?: (string|null); - /** LabelDescriptor description */ + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); + + /** MonitoredResourceDescriptor description */ description?: (string|null); + + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MonitoredResourceDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|null); } - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { /** - * Constructs a new LabelDescriptor. + * Constructs a new MonitoredResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.ILabelDescriptor); + constructor(properties?: google.api.IMonitoredResourceDescriptor); - /** LabelDescriptor key. */ - public key: string; + /** MonitoredResourceDescriptor name. */ + public name: string; - /** LabelDescriptor valueType. */ - public valueType: google.api.LabelDescriptor.ValueType; + /** MonitoredResourceDescriptor type. */ + public type: string; - /** LabelDescriptor description. */ + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; + + /** MonitoredResourceDescriptor description. */ public description: string; + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MonitoredResourceDescriptor launchStage. */ + public launchStage: google.api.LaunchStage; + /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns LabelDescriptor instance + * @returns MonitoredResourceDescriptor instance */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LabelDescriptor + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LabelDescriptor + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; /** - * Verifies a LabelDescriptor message. + * Verifies a MonitoredResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LabelDescriptor + * @returns MonitoredResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LabelDescriptor to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LabelDescriptor { - - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** Properties of a Http. */ - interface IHttp { + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** MonitoredResource type */ + type?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { /** - * Constructs a new Http. + * Constructs a new MonitoredResource. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.api.IMonitoredResource); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** MonitoredResource type. */ + public type: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; /** - * Creates a new Http instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns MonitoredResource instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; /** - * Verifies a Http message. + * Verifies a MonitoredResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns MonitoredResource */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this MonitoredResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { - /** HttpRule responseBody */ - responseBody?: (string|null); + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { /** - * Constructs a new HttpRule. + * Constructs a new MonitoredResourceMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get: string; - - /** HttpRule put. */ - public put: string; - - /** HttpRule post. */ - public post: string; - - /** HttpRule delete. */ - public delete: string; - - /** HttpRule patch. */ - public patch: string; - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; + constructor(properties?: google.api.IMonitoredResourceMetadata); - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns MonitoredResourceMetadata instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; /** - * Verifies a HttpRule message. + * Verifies a MonitoredResourceMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns MonitoredResourceMetadata */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** LabelDescriptor key */ + key?: (string|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|null); + + /** LabelDescriptor description */ + description?: (string|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { /** - * Constructs a new CustomHttpPattern. + * Constructs a new LabelDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.api.ILabelDescriptor); - /** CustomHttpPattern kind. */ - public kind: string; + /** LabelDescriptor key. */ + public key: string; - /** CustomHttpPattern path. */ - public path: string; + /** LabelDescriptor valueType. */ + public valueType: google.api.LabelDescriptor.ValueType; + + /** LabelDescriptor description. */ + public description: string; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns LabelDescriptor instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; /** - * Verifies a CustomHttpPattern message. + * Verifies a LabelDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns LabelDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this LabelDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + namespace LabelDescriptor { + + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + /** Properties of a Distribution. */ interface IDistribution { diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index b8bc50e019e..5e4828dd0a9 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -48,25 +48,25 @@ */ var protobuf = {}; - protobuf.Struct = (function() { + protobuf.Duration = (function() { /** - * Properties of a Struct. + * Properties of a Duration. * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new Struct. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74,83 +74,88 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - Struct.prototype.fields = $util.emptyObject; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Struct instance using the specified properties. + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - Struct.create = function create(properties) { - return new Struct(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && message.hasOwnProperty("fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.fields === $util.emptyObject) - message.fields = {}; - key = reader.string(); - reader.pos++; - message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -161,131 +166,129 @@ }; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Struct message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Struct.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this Struct to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Struct; + return Duration; })(); - protobuf.Value = (function() { + protobuf.Empty = (function() { /** - * Properties of a Value. + * Properties of an Empty. * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue + * @interface IEmpty */ /** - * Constructs a new Value. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function Value(properties) { + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -293,154 +296,240 @@ } /** - * Value nullValue. - * @member {google.protobuf.NullValue} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = 0; - - /** - * Value numberValue. - * @member {number} numberValue - * @memberof google.protobuf.Value - * @instance + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - Value.prototype.numberValue = 0; + Empty.create = function create(properties) { + return new Empty(properties); + }; /** - * Value stringValue. - * @member {string} stringValue - * @memberof google.protobuf.Value - * @instance + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Value.prototype.stringValue = ""; + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Value boolValue. - * @member {boolean} boolValue - * @memberof google.protobuf.Value - * @instance + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Value.prototype.boolValue = false; + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.prototype.structValue = null; + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty * @instance + * @returns {Object.} JSON object */ - Value.prototype.listValue = null; + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return Empty; + })(); + + protobuf.FieldMask = (function() { /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new Value instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - Value.create = function create(properties) { - return new Value(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nullValue != null && message.hasOwnProperty("nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && message.hasOwnProperty("numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && message.hasOwnProperty("structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && message.hasOwnProperty("listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.nullValue = reader.int32(); - break; - case 2: - message.numberValue = reader.double(); - break; - case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -451,214 +540,120 @@ }; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Value message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Value.verify = function verify(message) { + FieldMask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; } return null; }; /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.FieldMask} FieldMask */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); } return message; }; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.Value} message Value + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Value.toObject = function toObject(message, options) { + FieldMask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; } return object; }; /** - * Converts this Value to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.Value + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - Value.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {string} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; + return FieldMask; })(); - protobuf.ListValue = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a ListValue. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new ListValue. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -666,78 +661,88 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - ListValue.prototype.values = $util.emptyArray; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ListValue instance using the specified properties. + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - ListValue.create = function create(properties) { - return new ListValue(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -748,104 +753,110 @@ }; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListValue message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListValue.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Timestamp} Timestamp */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this ListValue to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListValue; + return Timestamp; })(); protobuf.FileDescriptorSet = (function() { @@ -9321,25 +9332,25 @@ return GeneratedCodeInfo; })(); - protobuf.Duration = (function() { + protobuf.Struct = (function() { /** - * Properties of a Duration. + * Properties of a Struct. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new Duration. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function Duration(properties) { + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9347,88 +9358,83 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - Duration.prototype.nanos = 0; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length) { + Struct.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9439,131 +9445,131 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Duration.verify = function verify(message) { + Struct.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Duration to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return Struct; })(); - protobuf.Any = (function() { + protobuf.Value = (function() { /** - * Properties of an Any. + * Properties of a Value. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new Any. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function Any(properties) { + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9571,88 +9577,154 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any + * Value nullValue. + * @member {google.protobuf.NullValue} nullValue + * @memberof google.protobuf.Value * @instance */ - Any.prototype.type_url = ""; + Value.prototype.nullValue = 0; /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * Value numberValue. + * @member {number} numberValue + * @memberof google.protobuf.Value * @instance */ - Any.prototype.value = $util.newBuffer([]); + Value.prototype.numberValue = 0; /** - * Creates a new Any instance using the specified properties. + * Value stringValue. + * @member {string} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = ""; + + /** + * Value boolValue. + * @member {boolean} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = false; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - Any.create = function create(properties) { - return new Any(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.nullValue != null && message.hasOwnProperty("nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && message.hasOwnProperty("structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && message.hasOwnProperty("listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decode = function decode(reader, length) { + Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type_url = reader.string(); + message.nullValue = reader.int32(); break; case 2: - message.value = reader.bytes(); + message.numberValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9663,126 +9735,214 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a Value message. * @function verify - * @memberof google.protobuf.Any + * @memberof google.protobuf.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Any.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } return null; }; /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Value} Value */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Any to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Any; + return Value; })(); - protobuf.Timestamp = (function() { + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {string} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { /** - * Properties of a Timestamp. + * Properties of a ListValue. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new Timestamp. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function Timestamp(properties) { + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9790,88 +9950,78 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - Timestamp.prototype.nanos = 0; + ListValue.prototype.values = $util.emptyArray; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + ListValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + ListValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -9882,129 +10032,125 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + ListValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + ListValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.ListValue} ListValue */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + ListValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Timestamp to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Timestamp; + return ListValue; })(); - protobuf.Empty = (function() { + protobuf.Any = (function() { /** - * Properties of an Empty. + * Properties of an Any. * @memberof google.protobuf - * @interface IEmpty + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Empty. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Empty(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10012,63 +10158,89 @@ } /** - * Creates a new Empty instance using the specified properties. + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Empty.create = function create(properties) { - return new Empty(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -10078,712 +10250,521 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Empty.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Any} Any */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - return new $root.google.protobuf.Empty(); + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; }; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; }; /** - * Converts this Empty to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; + return Any; })(); - protobuf.FieldMask = (function() { + return protobuf; + })(); - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ + google.logging = (function() { - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Namespace logging. + * @memberof google + * @namespace + */ + var logging = {}; - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; + logging.v2 = (function() { /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * Namespace v2. + * @memberof google.logging + * @namespace */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; + var v2 = {}; - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FieldMask; - })(); - - return protobuf; - })(); - - google.logging = (function() { - - /** - * Namespace logging. - * @memberof google - * @namespace - */ - var logging = {}; - - logging.v2 = (function() { - - /** - * Namespace v2. - * @memberof google.logging - * @namespace - */ - var v2 = {}; - - v2.LoggingServiceV2 = (function() { + v2.ConfigServiceV2 = (function() { /** - * Constructs a new LoggingServiceV2 service. + * Constructs a new ConfigServiceV2 service. * @memberof google.logging.v2 - * @classdesc Represents a LoggingServiceV2 + * @classdesc Represents a ConfigServiceV2 * @extends $protobuf.rpc.Service * @constructor * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { + function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; + (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. + * Creates new ConfigServiceV2 service using the specified rpc implementation. * @function create - * @memberof google.logging.v2.LoggingServiceV2 + * @memberof google.logging.v2.ConfigServiceV2 * @static * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. + * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. */ - LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef DeleteLogCallback + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListSinksCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse */ /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { - return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteLog" }); + Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { + return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); + }, "name", { value: "ListSinks" }); /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef WriteLogEntriesCallback + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetSinkCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + * @param {google.logging.v2.LogSink} [response] LogSink */ /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink * @returns {undefined} * @variation 1 */ - Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { - return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); - }, "name", { value: "WriteLogEntries" }); + Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { + return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "GetSink" }); /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogEntriesCallback + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateSinkCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + * @param {google.logging.v2.LogSink} [response] LogSink */ /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink * @returns {undefined} * @variation 1 */ - Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { - return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); - }, "name", { value: "ListLogEntries" }); + Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { + return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "CreateSink" }); /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListMonitoredResourceDescriptorsCallback + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateSinkCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + * @param {google.logging.v2.LogSink} [response] LogSink */ /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink * @returns {undefined} * @variation 1 */ - Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { - return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); - }, "name", { value: "ListMonitoredResourceDescriptors" }); + Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { + return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "UpdateSink" }); /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogsCallback + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteSinkCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse + * @param {google.protobuf.Empty} [response] Empty */ /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ - Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { - return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); - }, "name", { value: "ListLogs" }); + Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { + return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSink" }); /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @returns {Promise} Promise + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ - return LoggingServiceV2; - })(); - - v2.DeleteLogRequest = (function() { - /** - * Properties of a DeleteLogRequest. - * @memberof google.logging.v2 - * @interface IDeleteLogRequest - * @property {string|null} [logName] DeleteLogRequest logName + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListExclusionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse */ /** - * Constructs a new DeleteLogRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteLogRequest. - * @implements IDeleteLogRequest - * @constructor - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse + * @returns {undefined} + * @variation 1 */ - function DeleteLogRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { + return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); + }, "name", { value: "ListExclusions" }); /** - * DeleteLogRequest logName. - * @member {string} logName - * @memberof google.logging.v2.DeleteLogRequest + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteLogRequest.prototype.logName = ""; /** - * Creates a new DeleteLogRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion */ - DeleteLogRequest.create = function create(properties) { - return new DeleteLogRequest(properties); - }; /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - DeleteLogRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - return writer; - }; + Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { + return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "GetExclusion" }); /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion */ - DeleteLogRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.logName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { + return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "CreateExclusion" }); /** - * Verifies a DeleteLogRequest message. - * @function verify - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteLogRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - return null; - }; /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion */ - DeleteLogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteLogRequest) - return object; - var message = new $root.google.logging.v2.DeleteLogRequest(); - if (object.logName != null) - message.logName = String(object.logName); - return message; - }; /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - DeleteLogRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.logName = ""; - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - return object; - }; + Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { + return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "UpdateExclusion" }); /** - * Converts this DeleteLogRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteLogRequest + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteLogRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return DeleteLogRequest; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { + return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExclusion" }); + + /** + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ConfigServiceV2; })(); - v2.WriteLogEntriesRequest = (function() { + v2.LogSink = (function() { /** - * Properties of a WriteLogEntriesRequest. + * Properties of a LogSink. * @memberof google.logging.v2 - * @interface IWriteLogEntriesRequest - * @property {string|null} [logName] WriteLogEntriesRequest logName - * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource - * @property {Object.|null} [labels] WriteLogEntriesRequest labels - * @property {Array.|null} [entries] WriteLogEntriesRequest entries - * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess - * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun + * @interface ILogSink + * @property {string|null} [name] LogSink name + * @property {string|null} [destination] LogSink destination + * @property {string|null} [filter] LogSink filter + * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat + * @property {string|null} [writerIdentity] LogSink writerIdentity + * @property {boolean|null} [includeChildren] LogSink includeChildren + * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + * @property {google.protobuf.ITimestamp|null} [startTime] LogSink startTime + * @property {google.protobuf.ITimestamp|null} [endTime] LogSink endTime */ /** - * Constructs a new WriteLogEntriesRequest. + * Constructs a new LogSink. * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesRequest. - * @implements IWriteLogEntriesRequest + * @classdesc Represents a LogSink. + * @implements ILogSink * @constructor - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogSink=} [properties] Properties to set */ - function WriteLogEntriesRequest(properties) { - this.labels = {}; - this.entries = []; + function LogSink(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10791,149 +10772,219 @@ } /** - * WriteLogEntriesRequest logName. - * @member {string} logName - * @memberof google.logging.v2.WriteLogEntriesRequest + * LogSink name. + * @member {string} name + * @memberof google.logging.v2.LogSink * @instance */ - WriteLogEntriesRequest.prototype.logName = ""; + LogSink.prototype.name = ""; /** - * WriteLogEntriesRequest resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.WriteLogEntriesRequest + * LogSink destination. + * @member {string} destination + * @memberof google.logging.v2.LogSink * @instance */ - WriteLogEntriesRequest.prototype.resource = null; + LogSink.prototype.destination = ""; /** - * WriteLogEntriesRequest labels. - * @member {Object.} labels - * @memberof google.logging.v2.WriteLogEntriesRequest + * LogSink filter. + * @member {string} filter + * @memberof google.logging.v2.LogSink * @instance */ - WriteLogEntriesRequest.prototype.labels = $util.emptyObject; + LogSink.prototype.filter = ""; /** - * WriteLogEntriesRequest entries. - * @member {Array.} entries - * @memberof google.logging.v2.WriteLogEntriesRequest + * LogSink outputVersionFormat. + * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat + * @memberof google.logging.v2.LogSink * @instance */ - WriteLogEntriesRequest.prototype.entries = $util.emptyArray; + LogSink.prototype.outputVersionFormat = 0; /** - * WriteLogEntriesRequest partialSuccess. - * @member {boolean} partialSuccess - * @memberof google.logging.v2.WriteLogEntriesRequest + * LogSink writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.LogSink * @instance */ - WriteLogEntriesRequest.prototype.partialSuccess = false; + LogSink.prototype.writerIdentity = ""; /** - * WriteLogEntriesRequest dryRun. - * @member {boolean} dryRun - * @memberof google.logging.v2.WriteLogEntriesRequest + * LogSink includeChildren. + * @member {boolean} includeChildren + * @memberof google.logging.v2.LogSink * @instance */ - WriteLogEntriesRequest.prototype.dryRun = false; + LogSink.prototype.includeChildren = false; /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance + * LogSink bigqueryOptions. + * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions + * @memberof google.logging.v2.LogSink + * @instance */ - WriteLogEntriesRequest.create = function create(properties) { - return new WriteLogEntriesRequest(properties); - }; + LogSink.prototype.bigqueryOptions = null; /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * LogSink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogSink + * @instance */ - WriteLogEntriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); - return writer; - }; + LogSink.prototype.createTime = null; /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * LogSink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogSink + * @instance */ - WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + LogSink.prototype.updateTime = null; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * LogSink startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.startTime = null; + + /** + * LogSink endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LogSink options. + * @member {"bigqueryOptions"|undefined} options + * @memberof google.logging.v2.LogSink + * @instance + */ + Object.defineProperty(LogSink.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogSink instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @returns {google.logging.v2.LogSink} LogSink instance + */ + LogSink.create = function create(properties) { + return new LogSink(properties); + }; + + /** + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destination != null && message.hasOwnProperty("destination")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) + $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogSink message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.LogSink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @returns {google.logging.v2.LogSink} LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesRequest.decode = function decode(reader, length) { + LogSink.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.logName = reader.string(); - break; - case 2: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 3: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); - break; - case 4: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + message.destination = reader.string(); break; case 5: - message.partialSuccess = reader.bool(); + message.filter = reader.string(); break; case 6: - message.dryRun = reader.bool(); + message.outputVersionFormat = reader.int32(); + break; + case 8: + message.writerIdentity = reader.string(); + break; + case 9: + message.includeChildren = reader.bool(); + break; + case 12: + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); + break; + case 13: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10944,185 +10995,253 @@ }; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a LogSink message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.LogSink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @returns {google.logging.v2.LogSink} LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + LogSink.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesRequest message. + * Verifies a LogSink message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.LogSink * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesRequest.verify = function verify(message) { + LogSink.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + switch (message.outputVersionFormat) { + default: + return "outputVersionFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + if (typeof message.includeChildren !== "boolean") + return "includeChildren: boolean expected"; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + properties.options = 1; + { + var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); + if (error) + return "bigqueryOptions." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "resource." + error; + return "createTime." + error; } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - if (typeof message.partialSuccess !== "boolean") - return "partialSuccess: boolean expected"; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; return null; }; /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.LogSink * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @returns {google.logging.v2.LogSink} LogSink */ - WriteLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) + LogSink.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogSink) return object; - var message = new $root.google.logging.v2.WriteLogEntriesRequest(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.logging.v2.LogSink(); + if (object.name != null) + message.name = String(object.name); + if (object.destination != null) + message.destination = String(object.destination); + if (object.filter != null) + message.filter = String(object.filter); + switch (object.outputVersionFormat) { + case "VERSION_FORMAT_UNSPECIFIED": + case 0: + message.outputVersionFormat = 0; + break; + case "V2": + case 1: + message.outputVersionFormat = 1; + break; + case "V1": + case 2: + message.outputVersionFormat = 2; + break; } - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); - } + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); + if (object.includeChildren != null) + message.includeChildren = Boolean(object.includeChildren); + if (object.bigqueryOptions != null) { + if (typeof object.bigqueryOptions !== "object") + throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.logging.v2.LogSink.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.logging.v2.LogSink.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } - if (object.partialSuccess != null) - message.partialSuccess = Boolean(object.partialSuccess); - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); return message; }; /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogSink message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest + * @param {google.logging.v2.LogSink} message LogSink * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesRequest.toObject = function toObject(message, options) { + LogSink.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.logName = ""; - object.resource = null; - object.partialSuccess = false; - object.dryRun = false; - } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.name = ""; + object.destination = ""; + object.filter = ""; + object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; + object.writerIdentity = ""; + object.includeChildren = false; + object.startTime = null; + object.endTime = null; + object.createTime = null; + object.updateTime = null; } - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + object.includeChildren = message.includeChildren; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); + if (options.oneofs) + object.options = "bigqueryOptions"; } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - object.partialSuccess = message.partialSuccess; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this WriteLogEntriesRequest to JSON. + * Converts this LogSink to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.LogSink * @instance * @returns {Object.} JSON object */ - WriteLogEntriesRequest.prototype.toJSON = function toJSON() { + LogSink.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesRequest; + /** + * VersionFormat enum. + * @name google.logging.v2.LogSink.VersionFormat + * @enum {string} + * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value + * @property {number} V2=1 V2 value + * @property {number} V1=2 V1 value + */ + LogSink.VersionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "V2"] = 1; + values[valuesById[2] = "V1"] = 2; + return values; + })(); + + return LogSink; })(); - v2.WriteLogEntriesResponse = (function() { + v2.BigQueryOptions = (function() { /** - * Properties of a WriteLogEntriesResponse. + * Properties of a BigQueryOptions. * @memberof google.logging.v2 - * @interface IWriteLogEntriesResponse + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables */ /** - * Constructs a new WriteLogEntriesResponse. + * Constructs a new BigQueryOptions. * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesResponse. - * @implements IWriteLogEntriesResponse + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions * @constructor - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set */ - function WriteLogEntriesResponse(properties) { + function BigQueryOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11130,63 +11249,76 @@ } /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usePartitionedTables = false; + + /** + * Creates a new BigQueryOptions instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance */ - WriteLogEntriesResponse.create = function create(properties) { - return new WriteLogEntriesResponse(properties); + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); }; /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesResponse.encode = function encode(message, writer) { + BigQueryOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); return writer; }; /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * Decodes a BigQueryOptions message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decode = function decode(reader, length) { + BigQueryOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.usePartitionedTables = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -11196,95 +11328,109 @@ }; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesResponse message. + * Verifies a BigQueryOptions message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesResponse.verify = function verify(message) { + BigQueryOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; return null; }; /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions */ - WriteLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) return object; - return new $root.google.logging.v2.WriteLogEntriesResponse(); + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + return message; }; /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesResponse.toObject = function toObject() { - return {}; + BigQueryOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.usePartitionedTables = false; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + return object; }; /** - * Converts this WriteLogEntriesResponse to JSON. + * Converts this BigQueryOptions to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.BigQueryOptions * @instance * @returns {Object.} JSON object */ - WriteLogEntriesResponse.prototype.toJSON = function toJSON() { + BigQueryOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesResponse; + return BigQueryOptions; })(); - v2.WriteLogEntriesPartialErrors = (function() { + v2.ListSinksRequest = (function() { /** - * Properties of a WriteLogEntriesPartialErrors. + * Properties of a ListSinksRequest. * @memberof google.logging.v2 - * @interface IWriteLogEntriesPartialErrors - * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors + * @interface IListSinksRequest + * @property {string|null} [parent] ListSinksRequest parent + * @property {string|null} [pageToken] ListSinksRequest pageToken + * @property {number|null} [pageSize] ListSinksRequest pageSize */ /** - * Constructs a new WriteLogEntriesPartialErrors. + * Constructs a new ListSinksRequest. * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesPartialErrors. - * @implements IWriteLogEntriesPartialErrors + * @classdesc Represents a ListSinksRequest. + * @implements IListSinksRequest * @constructor - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set */ - function WriteLogEntriesPartialErrors(properties) { - this.logEntryErrors = {}; + function ListSinksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11292,83 +11438,101 @@ } /** - * WriteLogEntriesPartialErrors logEntryErrors. - * @member {Object.} logEntryErrors - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * ListSinksRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListSinksRequest * @instance */ - WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; + ListSinksRequest.prototype.parent = ""; /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * ListSinksRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageToken = ""; + + /** + * ListSinksRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageSize = 0; + + /** + * Creates a new ListSinksRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance */ - WriteLogEntriesPartialErrors.create = function create(properties) { - return new WriteLogEntriesPartialErrors(properties); + ListSinksRequest.create = function create(properties) { + return new ListSinksRequest(properties); }; /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesPartialErrors.encode = function encode(message, writer) { + ListSinksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) - for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); - $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * Decodes a ListSinksRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesPartialErrors.decode = function decode(reader, length) { + ListSinksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.logEntryErrors === $util.emptyObject) - message.logEntryErrors = {}; - key = reader.int32(); - reader.pos++; - message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -11379,284 +11543,218 @@ }; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { + ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesPartialErrors message. + * Verifies a ListSinksRequest message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesPartialErrors.verify = function verify(message) { + ListSinksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { - if (!$util.isObject(message.logEntryErrors)) - return "logEntryErrors: object expected"; - var key = Object.keys(message.logEntryErrors); - for (var i = 0; i < key.length; ++i) { - if (!$util.key32Re.test(key[i])) - return "logEntryErrors: integer key{k:int32} expected"; - { - var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); - if (error) - return "logEntryErrors." + error; - } - } - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest */ - WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) + ListSinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksRequest) return object; - var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); - if (object.logEntryErrors) { - if (typeof object.logEntryErrors !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors = {}; - for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { - if (typeof object.logEntryErrors[keys[i]] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); - } - } + var message = new $root.google.logging.v2.ListSinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors + * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { + ListSinksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.logEntryErrors = {}; - var keys2; - if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { - object.logEntryErrors = {}; - for (var j = 0; j < keys2.length; ++j) - object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this WriteLogEntriesPartialErrors to JSON. + * Converts this ListSinksRequest to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.ListSinksRequest * @instance * @returns {Object.} JSON object */ - WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { + ListSinksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesPartialErrors; + return ListSinksRequest; })(); - v2.ListLogEntriesRequest = (function() { + v2.ListSinksResponse = (function() { /** - * Properties of a ListLogEntriesRequest. + * Properties of a ListSinksResponse. * @memberof google.logging.v2 - * @interface IListLogEntriesRequest - * @property {Array.|null} [projectIds] ListLogEntriesRequest projectIds - * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames - * @property {string|null} [filter] ListLogEntriesRequest filter - * @property {string|null} [orderBy] ListLogEntriesRequest orderBy - * @property {number|null} [pageSize] ListLogEntriesRequest pageSize - * @property {string|null} [pageToken] ListLogEntriesRequest pageToken + * @interface IListSinksResponse + * @property {Array.|null} [sinks] ListSinksResponse sinks + * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken */ /** - * Constructs a new ListLogEntriesRequest. + * Constructs a new ListSinksResponse. * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesRequest. - * @implements IListLogEntriesRequest + * @classdesc Represents a ListSinksResponse. + * @implements IListSinksResponse * @constructor - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set */ - function ListLogEntriesRequest(properties) { - this.projectIds = []; - this.resourceNames = []; - if (properties) + function ListSinksResponse(properties) { + this.sinks = []; + if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** - * ListLogEntriesRequest projectIds. - * @member {Array.} projectIds - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.projectIds = $util.emptyArray; - - /** - * ListLogEntriesRequest resourceNames. - * @member {Array.} resourceNames - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; - - /** - * ListLogEntriesRequest filter. - * @member {string} filter - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.filter = ""; - - /** - * ListLogEntriesRequest orderBy. - * @member {string} orderBy - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.orderBy = ""; - - /** - * ListLogEntriesRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogEntriesRequest + * ListSinksResponse sinks. + * @member {Array.} sinks + * @memberof google.logging.v2.ListSinksResponse * @instance */ - ListLogEntriesRequest.prototype.pageSize = 0; + ListSinksResponse.prototype.sinks = $util.emptyArray; /** - * ListLogEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogEntriesRequest + * ListSinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListSinksResponse * @instance */ - ListLogEntriesRequest.prototype.pageToken = ""; + ListSinksResponse.prototype.nextPageToken = ""; /** - * Creates a new ListLogEntriesRequest instance using the specified properties. + * Creates a new ListSinksResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance */ - ListLogEntriesRequest.create = function create(properties) { - return new ListLogEntriesRequest(properties); + ListSinksResponse.create = function create(properties) { + return new ListSinksResponse(properties); }; /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesRequest.encode = function encode(message, writer) { + ListSinksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectIds != null && message.projectIds.length) - for (var i = 0; i < message.projectIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); + if (message.sinks != null && message.sinks.length) + for (var i = 0; i < message.sinks.length; ++i) + $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * Decodes a ListSinksResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decode = function decode(reader, length) { + ListSinksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.projectIds && message.projectIds.length)) - message.projectIds = []; - message.projectIds.push(reader.string()); - break; - case 8: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); + if (!(message.sinks && message.sinks.length)) + message.sinks = []; + message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); break; case 2: - message.filter = reader.string(); - break; - case 3: - message.orderBy = reader.string(); - break; - case 4: - message.pageSize = reader.int32(); - break; - case 5: - message.pageToken = reader.string(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -11667,176 +11765,133 @@ }; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogEntriesRequest message. + * Verifies a ListSinksResponse message. * @function verify - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogEntriesRequest.verify = function verify(message) { + ListSinksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectIds != null && message.hasOwnProperty("projectIds")) { - if (!Array.isArray(message.projectIds)) - return "projectIds: array expected"; - for (var i = 0; i < message.projectIds.length; ++i) - if (!$util.isString(message.projectIds[i])) - return "projectIds: string[] expected"; - } - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) - if (!$util.isString(message.resourceNames[i])) - return "resourceNames: string[] expected"; + if (message.sinks != null && message.hasOwnProperty("sinks")) { + if (!Array.isArray(message.sinks)) + return "sinks: array expected"; + for (var i = 0; i < message.sinks.length; ++i) { + var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); + if (error) + return "sinks." + error; + } } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse */ - ListLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) + ListSinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksResponse) return object; - var message = new $root.google.logging.v2.ListLogEntriesRequest(); - if (object.projectIds) { - if (!Array.isArray(object.projectIds)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.projectIds: array expected"); - message.projectIds = []; - for (var i = 0; i < object.projectIds.length; ++i) - message.projectIds[i] = String(object.projectIds[i]); - } - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) - message.resourceNames[i] = String(object.resourceNames[i]); + var message = new $root.google.logging.v2.ListSinksResponse(); + if (object.sinks) { + if (!Array.isArray(object.sinks)) + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); + message.sinks = []; + for (var i = 0; i < object.sinks.length; ++i) { + if (typeof object.sinks[i] !== "object") + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); + message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); + } } - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest + * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogEntriesRequest.toObject = function toObject(message, options) { + ListSinksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.projectIds = []; - object.resourceNames = []; - } - if (options.defaults) { - object.filter = ""; - object.orderBy = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.projectIds && message.projectIds.length) { - object.projectIds = []; - for (var j = 0; j < message.projectIds.length; ++j) - object.projectIds[j] = message.projectIds[j]; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = message.resourceNames[j]; + if (options.arrays || options.defaults) + object.sinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sinks && message.sinks.length) { + object.sinks = []; + for (var j = 0; j < message.sinks.length; ++j) + object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListLogEntriesRequest to JSON. + * Converts this ListSinksResponse to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListSinksResponse * @instance * @returns {Object.} JSON object */ - ListLogEntriesRequest.prototype.toJSON = function toJSON() { + ListSinksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogEntriesRequest; + return ListSinksResponse; })(); - v2.ListLogEntriesResponse = (function() { + v2.GetSinkRequest = (function() { /** - * Properties of a ListLogEntriesResponse. + * Properties of a GetSinkRequest. * @memberof google.logging.v2 - * @interface IListLogEntriesResponse - * @property {Array.|null} [entries] ListLogEntriesResponse entries - * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken + * @interface IGetSinkRequest + * @property {string|null} [sinkName] GetSinkRequest sinkName */ /** - * Constructs a new ListLogEntriesResponse. + * Constructs a new GetSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesResponse. - * @implements IListLogEntriesResponse + * @classdesc Represents a GetSinkRequest. + * @implements IGetSinkRequest * @constructor - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set */ - function ListLogEntriesResponse(properties) { - this.entries = []; + function GetSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11844,91 +11899,75 @@ } /** - * ListLogEntriesResponse entries. - * @member {Array.} entries - * @memberof google.logging.v2.ListLogEntriesResponse - * @instance - */ - ListLogEntriesResponse.prototype.entries = $util.emptyArray; - - /** - * ListLogEntriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogEntriesResponse + * GetSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.GetSinkRequest * @instance */ - ListLogEntriesResponse.prototype.nextPageToken = ""; + GetSinkRequest.prototype.sinkName = ""; /** - * Creates a new ListLogEntriesResponse instance using the specified properties. + * Creates a new GetSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance */ - ListLogEntriesResponse.create = function create(properties) { - return new ListLogEntriesResponse(properties); + GetSinkRequest.create = function create(properties) { + return new GetSinkRequest(properties); }; /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesResponse.encode = function encode(message, writer) { + GetSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * Decodes a GetSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesResponse.decode = function decode(reader, length) { + GetSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.sinkName = reader.string(); break; default: reader.skipType(tag & 7); @@ -11939,134 +11978,109 @@ }; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogEntriesResponse message. + * Verifies a GetSinkRequest message. * @function verify - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogEntriesResponse.verify = function verify(message) { + GetSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; return null; }; /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest */ - ListLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) + GetSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSinkRequest) return object; - var message = new $root.google.logging.v2.ListLogEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.GetSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); return message; }; /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse + * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogEntriesResponse.toObject = function toObject(message, options) { + GetSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entries = []; if (options.defaults) - object.nextPageToken = ""; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; return object; }; /** - * Converts this ListLogEntriesResponse to JSON. + * Converts this GetSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.GetSinkRequest * @instance * @returns {Object.} JSON object */ - ListLogEntriesResponse.prototype.toJSON = function toJSON() { + GetSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogEntriesResponse; + return GetSinkRequest; })(); - v2.ListMonitoredResourceDescriptorsRequest = (function() { + v2.CreateSinkRequest = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsRequest. + * Properties of a CreateSinkRequest. * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsRequest - * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken + * @interface ICreateSinkRequest + * @property {string|null} [parent] CreateSinkRequest parent + * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity */ /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new CreateSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. - * @implements IListMonitoredResourceDescriptorsRequest + * @classdesc Represents a CreateSinkRequest. + * @implements ICreateSinkRequest * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsRequest(properties) { + function CreateSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12074,88 +12088,101 @@ } /** - * ListMonitoredResourceDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * CreateSinkRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateSinkRequest * @instance */ - ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; + CreateSinkRequest.prototype.parent = ""; /** - * ListMonitoredResourceDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * CreateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.CreateSinkRequest * @instance */ - ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + CreateSinkRequest.prototype.sink = null; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * CreateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance */ - ListMonitoredResourceDescriptorsRequest.create = function create(properties) { - return new ListMonitoredResourceDescriptorsRequest(properties); + CreateSinkRequest.create = function create(properties) { + return new CreateSinkRequest(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { + CreateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a CreateSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { + CreateSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.pageSize = reader.int32(); + message.parent = reader.string(); break; case 2: - message.pageToken = reader.string(); + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); break; default: reader.skipType(tag & 7); @@ -12166,118 +12193,132 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a CreateSinkRequest message. * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { + CreateSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; + } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; return null; }; /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest */ - ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) + CreateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateSinkRequest) return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.logging.v2.CreateSinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest + * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { + CreateSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; + object.parent = ""; + object.sink = null; + object.uniqueWriterIdentity = false; } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; return object; }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this CreateSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.CreateSinkRequest * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { + CreateSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsRequest; + return CreateSinkRequest; })(); - v2.ListMonitoredResourceDescriptorsResponse = (function() { + v2.UpdateSinkRequest = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsResponse. + * Properties of an UpdateSinkRequest. * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsResponse - * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors - * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken + * @interface IUpdateSinkRequest + * @property {string|null} [sinkName] UpdateSinkRequest sinkName + * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask */ /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new UpdateSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. - * @implements IListMonitoredResourceDescriptorsResponse + * @classdesc Represents an UpdateSinkRequest. + * @implements IUpdateSinkRequest * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsResponse(properties) { - this.resourceDescriptors = []; + function UpdateSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12285,91 +12326,114 @@ } /** - * ListMonitoredResourceDescriptorsResponse resourceDescriptors. - * @member {Array.} resourceDescriptors - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * UpdateSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; + UpdateSinkRequest.prototype.sinkName = ""; /** - * ListMonitoredResourceDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * UpdateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; + UpdateSinkRequest.prototype.sink = null; /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * UpdateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * UpdateSinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance */ - ListMonitoredResourceDescriptorsResponse.create = function create(properties) { - return new ListMonitoredResourceDescriptorsResponse(properties); + UpdateSinkRequest.create = function create(properties) { + return new UpdateSinkRequest(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { + UpdateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceDescriptors != null && message.resourceDescriptors.length) - for (var i = 0; i < message.resourceDescriptors.length; ++i) - $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes an UpdateSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { + UpdateSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.resourceDescriptors && message.resourceDescriptors.length)) - message.resourceDescriptors = []; - message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + message.sinkName = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12380,135 +12444,142 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies an UpdateSinkRequest message. * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { + UpdateSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { - if (!Array.isArray(message.resourceDescriptors)) - return "resourceDescriptors: array expected"; - for (var i = 0; i < message.resourceDescriptors.length; ++i) { - var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); - if (error) - return "resourceDescriptors." + error; - } + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; + } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest */ - ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) + UpdateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSinkRequest) return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); - if (object.resourceDescriptors) { - if (!Array.isArray(object.resourceDescriptors)) - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); - message.resourceDescriptors = []; - for (var i = 0; i < object.resourceDescriptors.length; ++i) { - if (typeof object.resourceDescriptors[i] !== "object") - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); - message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); - } + var message = new $root.google.logging.v2.UpdateSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse + * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { + UpdateSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.resourceDescriptors = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.resourceDescriptors && message.resourceDescriptors.length) { - object.resourceDescriptors = []; - for (var j = 0; j < message.resourceDescriptors.length; ++j) - object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); + if (options.defaults) { + object.sinkName = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + object.updateMask = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this UpdateSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.UpdateSinkRequest * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { + UpdateSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsResponse; + return UpdateSinkRequest; })(); - v2.ListLogsRequest = (function() { + v2.DeleteSinkRequest = (function() { /** - * Properties of a ListLogsRequest. + * Properties of a DeleteSinkRequest. * @memberof google.logging.v2 - * @interface IListLogsRequest - * @property {string|null} [parent] ListLogsRequest parent - * @property {number|null} [pageSize] ListLogsRequest pageSize - * @property {string|null} [pageToken] ListLogsRequest pageToken + * @interface IDeleteSinkRequest + * @property {string|null} [sinkName] DeleteSinkRequest sinkName */ /** - * Constructs a new ListLogsRequest. + * Constructs a new DeleteSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogsRequest. - * @implements IListLogsRequest + * @classdesc Represents a DeleteSinkRequest. + * @implements IDeleteSinkRequest * @constructor - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set */ - function ListLogsRequest(properties) { + function DeleteSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12516,101 +12587,75 @@ } /** - * ListLogsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.parent = ""; - - /** - * ListLogsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.pageSize = 0; - - /** - * ListLogsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogsRequest + * DeleteSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.DeleteSinkRequest * @instance */ - ListLogsRequest.prototype.pageToken = ""; + DeleteSinkRequest.prototype.sinkName = ""; /** - * Creates a new ListLogsRequest instance using the specified properties. + * Creates a new DeleteSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance */ - ListLogsRequest.create = function create(properties) { - return new ListLogsRequest(properties); + DeleteSinkRequest.create = function create(properties) { + return new DeleteSinkRequest(properties); }; /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsRequest.encode = function encode(message, writer) { + DeleteSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogsRequest message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsRequest.decode = function decode(reader, length) { + DeleteSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.sinkName = reader.string(); break; default: reader.skipType(tag & 7); @@ -12621,126 +12666,112 @@ }; /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogsRequest message. + * Verifies a DeleteSinkRequest message. * @function verify - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogsRequest.verify = function verify(message) { + DeleteSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; return null; }; /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest */ - ListLogsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsRequest) + DeleteSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteSinkRequest) return object; - var message = new $root.google.logging.v2.ListLogsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.logging.v2.DeleteSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); return message; }; /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest + * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogsRequest.toObject = function toObject(message, options) { + DeleteSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; return object; }; /** - * Converts this ListLogsRequest to JSON. + * Converts this DeleteSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @instance * @returns {Object.} JSON object */ - ListLogsRequest.prototype.toJSON = function toJSON() { + DeleteSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogsRequest; + return DeleteSinkRequest; })(); - v2.ListLogsResponse = (function() { + v2.LogExclusion = (function() { /** - * Properties of a ListLogsResponse. + * Properties of a LogExclusion. * @memberof google.logging.v2 - * @interface IListLogsResponse - * @property {Array.|null} [logNames] ListLogsResponse logNames - * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken + * @interface ILogExclusion + * @property {string|null} [name] LogExclusion name + * @property {string|null} [description] LogExclusion description + * @property {string|null} [filter] LogExclusion filter + * @property {boolean|null} [disabled] LogExclusion disabled + * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime */ /** - * Constructs a new ListLogsResponse. + * Constructs a new LogExclusion. * @memberof google.logging.v2 - * @classdesc Represents a ListLogsResponse. - * @implements IListLogsResponse + * @classdesc Represents a LogExclusion. + * @implements ILogExclusion * @constructor - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set */ - function ListLogsResponse(properties) { - this.logNames = []; + function LogExclusion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12748,91 +12779,140 @@ } /** - * ListLogsResponse logNames. - * @member {Array.} logNames - * @memberof google.logging.v2.ListLogsResponse + * LogExclusion name. + * @member {string} name + * @memberof google.logging.v2.LogExclusion * @instance */ - ListLogsResponse.prototype.logNames = $util.emptyArray; + LogExclusion.prototype.name = ""; /** - * ListLogsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogsResponse + * LogExclusion description. + * @member {string} description + * @memberof google.logging.v2.LogExclusion * @instance */ - ListLogsResponse.prototype.nextPageToken = ""; + LogExclusion.prototype.description = ""; /** - * Creates a new ListLogsResponse instance using the specified properties. + * LogExclusion filter. + * @member {string} filter + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.filter = ""; + + /** + * LogExclusion disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.disabled = false; + + /** + * LogExclusion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.createTime = null; + + /** + * LogExclusion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.updateTime = null; + + /** + * Creates a new LogExclusion instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @returns {google.logging.v2.LogExclusion} LogExclusion instance */ - ListLogsResponse.create = function create(properties) { - return new ListLogsResponse(properties); + LogExclusion.create = function create(properties) { + return new LogExclusion(properties); }; /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsResponse.encode = function encode(message, writer) { + LogExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.logNames != null && message.logNames.length) - for (var i = 0; i < message.logNames.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { + LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogsResponse message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsResponse.decode = function decode(reader, length) { + LogExclusion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.logNames && message.logNames.length)) - message.logNames = []; - message.logNames.push(reader.string()); + case 1: + message.name = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.disabled = reader.bool(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12843,145 +12923,160 @@ }; /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { + LogExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogsResponse message. + * Verifies a LogExclusion message. * @function verify - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogsResponse.verify = function verify(message) { + LogExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logNames != null && message.hasOwnProperty("logNames")) { - if (!Array.isArray(message.logNames)) - return "logNames: array expected"; - for (var i = 0; i < message.logNames.length; ++i) - if (!$util.isString(message.logNames[i])) - return "logNames: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.LogExclusion} LogExclusion */ - ListLogsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsResponse) + LogExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogExclusion) return object; - var message = new $root.google.logging.v2.ListLogsResponse(); - if (object.logNames) { - if (!Array.isArray(object.logNames)) - throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); - message.logNames = []; - for (var i = 0; i < object.logNames.length; ++i) - message.logNames[i] = String(object.logNames[i]); + var message = new $root.google.logging.v2.LogExclusion(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse + * @param {google.logging.v2.LogExclusion} message LogExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogsResponse.toObject = function toObject(message, options) { + LogExclusion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.logNames = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.logNames && message.logNames.length) { - object.logNames = []; - for (var j = 0; j < message.logNames.length; ++j) - object.logNames[j] = message.logNames[j]; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.filter = ""; + object.disabled = false; + object.createTime = null; + object.updateTime = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this ListLogsResponse to JSON. + * Converts this LogExclusion to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.LogExclusion * @instance * @returns {Object.} JSON object */ - ListLogsResponse.prototype.toJSON = function toJSON() { + LogExclusion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogsResponse; + return LogExclusion; })(); - v2.LogEntry = (function() { + v2.ListExclusionsRequest = (function() { /** - * Properties of a LogEntry. + * Properties of a ListExclusionsRequest. * @memberof google.logging.v2 - * @interface ILogEntry - * @property {string|null} [logName] LogEntry logName - * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource - * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload - * @property {string|null} [textPayload] LogEntry textPayload - * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload - * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp - * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp - * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity - * @property {string|null} [insertId] LogEntry insertId - * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest - * @property {Object.|null} [labels] LogEntry labels - * @property {google.api.IMonitoredResourceMetadata|null} [metadata] LogEntry metadata - * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation - * @property {string|null} [trace] LogEntry trace - * @property {string|null} [spanId] LogEntry spanId - * @property {boolean|null} [traceSampled] LogEntry traceSampled - * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation + * @interface IListExclusionsRequest + * @property {string|null} [parent] ListExclusionsRequest parent + * @property {string|null} [pageToken] ListExclusionsRequest pageToken + * @property {number|null} [pageSize] ListExclusionsRequest pageSize */ /** - * Constructs a new LogEntry. + * Constructs a new ListExclusionsRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogEntry. - * @implements ILogEntry + * @classdesc Represents a ListExclusionsRequest. + * @implements IListExclusionsRequest * @constructor - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set */ - function LogEntry(properties) { - this.labels = {}; + function ListExclusionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12989,303 +13084,323 @@ } /** - * LogEntry logName. - * @member {string} logName - * @memberof google.logging.v2.LogEntry + * ListExclusionsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - LogEntry.prototype.logName = ""; + ListExclusionsRequest.prototype.parent = ""; /** - * LogEntry resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.LogEntry + * ListExclusionsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - LogEntry.prototype.resource = null; + ListExclusionsRequest.prototype.pageToken = ""; /** - * LogEntry protoPayload. - * @member {google.protobuf.IAny|null|undefined} protoPayload - * @memberof google.logging.v2.LogEntry + * ListExclusionsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - LogEntry.prototype.protoPayload = null; + ListExclusionsRequest.prototype.pageSize = 0; /** - * LogEntry textPayload. - * @member {string} textPayload - * @memberof google.logging.v2.LogEntry - * @instance + * Creates a new ListExclusionsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance */ - LogEntry.prototype.textPayload = ""; + ListExclusionsRequest.create = function create(properties) { + return new ListExclusionsRequest(properties); + }; /** - * LogEntry jsonPayload. - * @member {google.protobuf.IStruct|null|undefined} jsonPayload - * @memberof google.logging.v2.LogEntry - * @instance + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogEntry.prototype.jsonPayload = null; + ListExclusionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; /** - * LogEntry timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.logging.v2.LogEntry - * @instance + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogEntry.prototype.timestamp = null; + ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * LogEntry receiveTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp - * @memberof google.logging.v2.LogEntry - * @instance + * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.prototype.receiveTimestamp = null; + ListExclusionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * LogEntry severity. - * @member {google.logging.type.LogSeverity} severity - * @memberof google.logging.v2.LogEntry - * @instance + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.prototype.severity = 0; + ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * LogEntry insertId. - * @member {string} insertId - * @memberof google.logging.v2.LogEntry - * @instance + * Verifies a ListExclusionsRequest message. + * @function verify + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntry.prototype.insertId = ""; + ListExclusionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; /** - * LogEntry httpRequest. - * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest - * @memberof google.logging.v2.LogEntry - * @instance + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest */ - LogEntry.prototype.httpRequest = null; + ListExclusionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsRequest) + return object; + var message = new $root.google.logging.v2.ListExclusionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; /** - * LogEntry labels. - * @member {Object.} labels - * @memberof google.logging.v2.LogEntry - * @instance + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - LogEntry.prototype.labels = $util.emptyObject; + ListExclusionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; /** - * LogEntry metadata. - * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata - * @memberof google.logging.v2.LogEntry + * Converts this ListExclusionsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListExclusionsRequest * @instance + * @returns {Object.} JSON object */ - LogEntry.prototype.metadata = null; + ListExclusionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LogEntry operation. - * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.operation = null; + return ListExclusionsRequest; + })(); - /** - * LogEntry trace. - * @member {string} trace - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.trace = ""; + v2.ListExclusionsResponse = (function() { /** - * LogEntry spanId. - * @member {string} spanId - * @memberof google.logging.v2.LogEntry - * @instance + * Properties of a ListExclusionsResponse. + * @memberof google.logging.v2 + * @interface IListExclusionsResponse + * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions + * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken */ - LogEntry.prototype.spanId = ""; /** - * LogEntry traceSampled. - * @member {boolean} traceSampled - * @memberof google.logging.v2.LogEntry - * @instance + * Constructs a new ListExclusionsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListExclusionsResponse. + * @implements IListExclusionsResponse + * @constructor + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set */ - LogEntry.prototype.traceSampled = false; + function ListExclusionsResponse(properties) { + this.exclusions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * LogEntry sourceLocation. - * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation - * @memberof google.logging.v2.LogEntry + * ListExclusionsResponse exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.ListExclusionsResponse * @instance */ - LogEntry.prototype.sourceLocation = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListExclusionsResponse.prototype.exclusions = $util.emptyArray; /** - * LogEntry payload. - * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload - * @memberof google.logging.v2.LogEntry + * ListExclusionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListExclusionsResponse * @instance */ - Object.defineProperty(LogEntry.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListExclusionsResponse.prototype.nextPageToken = ""; /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new ListExclusionsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set - * @returns {google.logging.v2.LogEntry} LogEntry instance + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance */ - LogEntry.create = function create(properties) { - return new LogEntry(properties); + ListExclusionsResponse.create = function create(properties) { + return new ListExclusionsResponse(properties); }; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encode = function encode(message, writer) { + ListExclusionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) - $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textPayload != null && message.hasOwnProperty("textPayload")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); - if (message.insertId != null && message.hasOwnProperty("insertId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) - $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.severity != null && message.hasOwnProperty("severity")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); - if (message.operation != null && message.hasOwnProperty("operation")) - $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.trace != null && message.hasOwnProperty("trace")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.spanId != null && message.hasOwnProperty("spanId")) - writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a ListExclusionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntry} LogEntry + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decode = function decode(reader, length) { + ListExclusionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 12: - message.logName = reader.string(); - break; - case 8: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + case 1: + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); break; case 2: - message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.textPayload = reader.string(); - break; - case 6: - message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 9: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 24: - message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.severity = reader.int32(); - break; - case 4: - message.insertId = reader.string(); - break; - case 7: - message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); - break; - case 11: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); - break; - case 25: - message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); - break; - case 15: - message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); - break; - case 22: - message.trace = reader.string(); - break; - case 27: - message.spanId = reader.string(); - break; - case 30: - message.traceSampled = reader.bool(); - break; - case 23: - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -13296,1238 +13411,537 @@ }; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntry} LogEntry + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decodeDelimited = function decodeDelimited(reader) { + ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogEntry message. + * Verifies a ListExclusionsResponse message. * @function verify - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntry.verify = function verify(message) { + ListExclusionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - properties.payload = 1; - { - var error = $root.google.protobuf.Any.verify(message.protoPayload); - if (error) - return "protoPayload." + error; - } - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - if (!$util.isString(message.textPayload)) - return "textPayload: string expected"; - } - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - { - var error = $root.google.protobuf.Struct.verify(message.jsonPayload); - if (error) - return "jsonPayload." + error; - } - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); - if (error) - return "receiveTimestamp." + error; - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 100: - case 200: - case 300: - case 400: - case 500: - case 600: - case 700: - case 800: - break; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - if (!$util.isString(message.insertId)) - return "insertId: string expected"; - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { - var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); - if (error) - return "httpRequest." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.operation != null && message.hasOwnProperty("operation")) { - var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); - if (error) - return "operation." + error; - } - if (message.trace != null && message.hasOwnProperty("trace")) - if (!$util.isString(message.trace)) - return "trace: string expected"; - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!$util.isString(message.spanId)) - return "spanId: string expected"; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - if (typeof message.traceSampled !== "boolean") - return "traceSampled: boolean expected"; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { - var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); - if (error) - return "sourceLocation." + error; - } - return null; - }; - - /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogEntry - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntry} LogEntry - */ - LogEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntry) - return object; - var message = new $root.google.logging.v2.LogEntry(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.protoPayload != null) { - if (typeof object.protoPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); - message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); - } - if (object.textPayload != null) - message.textPayload = String(object.textPayload); - if (object.jsonPayload != null) { - if (typeof object.jsonPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); - message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.receiveTimestamp != null) { - if (typeof object.receiveTimestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); - message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); - } - switch (object.severity) { - case "DEFAULT": - case 0: - message.severity = 0; - break; - case "DEBUG": - case 100: - message.severity = 100; - break; - case "INFO": - case 200: - message.severity = 200; - break; - case "NOTICE": - case 300: - message.severity = 300; - break; - case "WARNING": - case 400: - message.severity = 400; - break; - case "ERROR": - case 500: - message.severity = 500; - break; - case "CRITICAL": - case 600: - message.severity = 600; - break; - case "ALERT": - case 700: - message.severity = 700; - break; - case "EMERGENCY": - case 800: - message.severity = 800; - break; - } - if (object.insertId != null) - message.insertId = String(object.insertId); - if (object.httpRequest != null) { - if (typeof object.httpRequest !== "object") - throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); - message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.logging.v2.LogEntry.metadata: object expected"); - message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); - } - if (object.operation != null) { - if (typeof object.operation !== "object") - throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); - message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); - } - if (object.trace != null) - message.trace = String(object.trace); - if (object.spanId != null) - message.spanId = String(object.spanId); - if (object.traceSampled != null) - message.traceSampled = Boolean(object.traceSampled); - if (object.sourceLocation != null) { - if (typeof object.sourceLocation !== "object") - throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); - } - return message; - }; - - /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogEntry - * @static - * @param {google.logging.v2.LogEntry} message LogEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.insertId = ""; - object.httpRequest = null; - object.resource = null; - object.timestamp = null; - object.severity = options.enums === String ? "DEFAULT" : 0; - object.logName = ""; - object.operation = null; - object.trace = ""; - object.sourceLocation = null; - object.receiveTimestamp = null; - object.metadata = null; - object.spanId = ""; - object.traceSampled = false; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); - if (options.oneofs) - object.payload = "protoPayload"; - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - object.textPayload = message.textPayload; - if (options.oneofs) - object.payload = "textPayload"; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - object.insertId = message.insertId; - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); - if (options.oneofs) - object.payload = "jsonPayload"; - } - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); - if (message.trace != null && message.hasOwnProperty("trace")) - object.trace = message.trace; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = message.spanId; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - object.traceSampled = message.traceSampled; - return object; - }; - - /** - * Converts this LogEntry to JSON. - * @function toJSON - * @memberof google.logging.v2.LogEntry - * @instance - * @returns {Object.} JSON object - */ - LogEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LogEntry; - })(); - - v2.LogEntryOperation = (function() { - - /** - * Properties of a LogEntryOperation. - * @memberof google.logging.v2 - * @interface ILogEntryOperation - * @property {string|null} [id] LogEntryOperation id - * @property {string|null} [producer] LogEntryOperation producer - * @property {boolean|null} [first] LogEntryOperation first - * @property {boolean|null} [last] LogEntryOperation last - */ - - /** - * Constructs a new LogEntryOperation. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntryOperation. - * @implements ILogEntryOperation - * @constructor - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set - */ - function LogEntryOperation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LogEntryOperation id. - * @member {string} id - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.id = ""; - - /** - * LogEntryOperation producer. - * @member {string} producer - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.producer = ""; - - /** - * LogEntryOperation first. - * @member {boolean} first - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.first = false; - - /** - * LogEntryOperation last. - * @member {boolean} last - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.last = false; - - /** - * Creates a new LogEntryOperation instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance - */ - LogEntryOperation.create = function create(properties) { - return new LogEntryOperation(properties); - }; - - /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntryOperation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.producer != null && message.hasOwnProperty("producer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); - if (message.first != null && message.hasOwnProperty("first")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); - if (message.last != null && message.hasOwnProperty("last")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); - return writer; - }; - - /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LogEntryOperation message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntryOperation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.producer = reader.string(); - break; - case 3: - message.first = reader.bool(); - break; - case 4: - message.last = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogEntryOperation message. - * @function verify - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogEntryOperation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.producer != null && message.hasOwnProperty("producer")) - if (!$util.isString(message.producer)) - return "producer: string expected"; - if (message.first != null && message.hasOwnProperty("first")) - if (typeof message.first !== "boolean") - return "first: boolean expected"; - if (message.last != null && message.hasOwnProperty("last")) - if (typeof message.last !== "boolean") - return "last: boolean expected"; - return null; - }; - - /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation - */ - LogEntryOperation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntryOperation) - return object; - var message = new $root.google.logging.v2.LogEntryOperation(); - if (object.id != null) - message.id = String(object.id); - if (object.producer != null) - message.producer = String(object.producer); - if (object.first != null) - message.first = Boolean(object.first); - if (object.last != null) - message.last = Boolean(object.last); - return message; - }; - - /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogEntryOperation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.producer = ""; - object.first = false; - object.last = false; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.producer != null && message.hasOwnProperty("producer")) - object.producer = message.producer; - if (message.first != null && message.hasOwnProperty("first")) - object.first = message.first; - if (message.last != null && message.hasOwnProperty("last")) - object.last = message.last; - return object; - }; - - /** - * Converts this LogEntryOperation to JSON. - * @function toJSON - * @memberof google.logging.v2.LogEntryOperation - * @instance - * @returns {Object.} JSON object - */ - LogEntryOperation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LogEntryOperation; - })(); - - v2.LogEntrySourceLocation = (function() { - - /** - * Properties of a LogEntrySourceLocation. - * @memberof google.logging.v2 - * @interface ILogEntrySourceLocation - * @property {string|null} [file] LogEntrySourceLocation file - * @property {number|Long|null} [line] LogEntrySourceLocation line - * @property {string|null} ["function"] LogEntrySourceLocation function - */ - - /** - * Constructs a new LogEntrySourceLocation. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntrySourceLocation. - * @implements ILogEntrySourceLocation - * @constructor - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set - */ - function LogEntrySourceLocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LogEntrySourceLocation file. - * @member {string} file - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype.file = ""; - - /** - * LogEntrySourceLocation line. - * @member {number|Long} line - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * LogEntrySourceLocation function. - * @member {string} function - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype["function"] = ""; - - /** - * Creates a new LogEntrySourceLocation instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance - */ - LogEntrySourceLocation.create = function create(properties) { - return new LogEntrySourceLocation(properties); - }; - - /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntrySourceLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.hasOwnProperty("file")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); - if (message.line != null && message.hasOwnProperty("line")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); - if (message["function"] != null && message.hasOwnProperty("function")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); - return writer; - }; - - /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntrySourceLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file = reader.string(); - break; - case 2: - message.line = reader.int64(); - break; - case 3: - message["function"] = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + if (error) + return "exclusions." + error; } } - return message; - }; - - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogEntrySourceLocation message. - * @function verify - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogEntrySourceLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) - if (!$util.isString(message.file)) - return "file: string expected"; - if (message.line != null && message.hasOwnProperty("line")) - if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) - return "line: integer|Long expected"; - if (message["function"] != null && message.hasOwnProperty("function")) - if (!$util.isString(message["function"])) - return "function: string expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse */ - LogEntrySourceLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) + ListExclusionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsResponse) return object; - var message = new $root.google.logging.v2.LogEntrySourceLocation(); - if (object.file != null) - message.file = String(object.file); - if (object.line != null) - if ($util.Long) - (message.line = $util.Long.fromValue(object.line)).unsigned = false; - else if (typeof object.line === "string") - message.line = parseInt(object.line, 10); - else if (typeof object.line === "number") - message.line = object.line; - else if (typeof object.line === "object") - message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); - if (object["function"] != null) - message["function"] = String(object["function"]); + var message = new $root.google.logging.v2.ListExclusionsResponse(); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation + * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntrySourceLocation.toObject = function toObject(message, options) { + ListExclusionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.file = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.line = options.longs === String ? "0" : 0; - object["function"] = ""; + if (options.arrays || options.defaults) + object.exclusions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); } - if (message.file != null && message.hasOwnProperty("file")) - object.file = message.file; - if (message.line != null && message.hasOwnProperty("line")) - if (typeof message.line === "number") - object.line = options.longs === String ? String(message.line) : message.line; - else - object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; - if (message["function"] != null && message.hasOwnProperty("function")) - object["function"] = message["function"]; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; - - /** - * Converts this LogEntrySourceLocation to JSON. - * @function toJSON - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - * @returns {Object.} JSON object - */ - LogEntrySourceLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LogEntrySourceLocation; - })(); - - v2.ConfigServiceV2 = (function() { - - /** - * Constructs a new ConfigServiceV2 service. - * @memberof google.logging.v2 - * @classdesc Represents a ConfigServiceV2 - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; - - /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.ConfigServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. - */ - ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListSinksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse - */ - - /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { - return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); - }, "name", { value: "ListSinks" }); - - /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink - */ - - /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 + + /** + * Converts this ListExclusionsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListExclusionsResponse * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { - return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "GetSink" }); + ListExclusionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListExclusionsResponse; + })(); + + v2.GetExclusionRequest = (function() { /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a GetExclusionRequest. + * @memberof google.logging.v2 + * @interface IGetExclusionRequest + * @property {string|null} [name] GetExclusionRequest name */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * Constructs a new GetExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetExclusionRequest. + * @implements IGetExclusionRequest + * @constructor + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set */ + function GetExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 + * GetExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.GetExclusionRequest * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { - return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "CreateSink" }); + GetExclusionRequest.prototype.name = ""; /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new GetExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance */ + GetExclusionRequest.create = function create(properties) { + return new GetExclusionRequest(properties); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { - return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "UpdateSink" }); + GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Verifies a GetExclusionRequest message. + * @function verify + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { - return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSink" }); + GetExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest */ + GetExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetExclusionRequest) + return object; + var message = new $root.google.logging.v2.GetExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListExclusionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this GetExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetExclusionRequest * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { - return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); - }, "name", { value: "ListExclusions" }); + GetExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetExclusionRequest; + })(); + + v2.CreateExclusionRequest = (function() { /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a CreateExclusionRequest. + * @memberof google.logging.v2 + * @interface ICreateExclusionRequest + * @property {string|null} [parent] CreateExclusionRequest parent + * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Constructs a new CreateExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateExclusionRequest. + * @implements ICreateExclusionRequest + * @constructor + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set */ + function CreateExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * CreateExclusionRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateExclusionRequest * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { - return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "GetExclusion" }); + CreateExclusionRequest.prototype.parent = ""; /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * CreateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.CreateExclusionRequest * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreateExclusionRequest.prototype.exclusion = null; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Creates a new CreateExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance */ + CreateExclusionRequest.create = function create(properties) { + return new CreateExclusionRequest(properties); + }; /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { - return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "CreateExclusion" }); + CreateExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { - return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "UpdateExclusion" }); + CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a CreateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + CreateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest */ + CreateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateExclusionRequest) + return object; + var message = new $root.google.logging.v2.CreateExclusionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + return message; + }; /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { - return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteExclusion" }); + CreateExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.exclusion = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + return object; + }; /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this CreateExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateExclusionRequest * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + CreateExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ConfigServiceV2; + return CreateExclusionRequest; })(); - v2.LogSink = (function() { + v2.UpdateExclusionRequest = (function() { /** - * Properties of a LogSink. + * Properties of an UpdateExclusionRequest. * @memberof google.logging.v2 - * @interface ILogSink - * @property {string|null} [name] LogSink name - * @property {string|null} [destination] LogSink destination - * @property {string|null} [filter] LogSink filter - * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat - * @property {string|null} [writerIdentity] LogSink writerIdentity - * @property {boolean|null} [includeChildren] LogSink includeChildren - * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime - * @property {google.protobuf.ITimestamp|null} [startTime] LogSink startTime - * @property {google.protobuf.ITimestamp|null} [endTime] LogSink endTime + * @interface IUpdateExclusionRequest + * @property {string|null} [name] UpdateExclusionRequest name + * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask */ /** - * Constructs a new LogSink. + * Constructs a new UpdateExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogSink. - * @implements ILogSink + * @classdesc Represents an UpdateExclusionRequest. + * @implements IUpdateExclusionRequest * @constructor - * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set */ - function LogSink(properties) { + function UpdateExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14535,219 +13949,101 @@ } /** - * LogSink name. + * UpdateExclusionRequest name. * @member {string} name - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.name = ""; - - /** - * LogSink destination. - * @member {string} destination - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.destination = ""; - - /** - * LogSink filter. - * @member {string} filter - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.filter = ""; - - /** - * LogSink outputVersionFormat. - * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.outputVersionFormat = 0; - - /** - * LogSink writerIdentity. - * @member {string} writerIdentity - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.writerIdentity = ""; - - /** - * LogSink includeChildren. - * @member {boolean} includeChildren - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.includeChildren = false; - - /** - * LogSink bigqueryOptions. - * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.bigqueryOptions = null; - - /** - * LogSink createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.createTime = null; - - /** - * LogSink updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.updateTime = null; - - /** - * LogSink startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - LogSink.prototype.startTime = null; + UpdateExclusionRequest.prototype.name = ""; /** - * LogSink endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.logging.v2.LogSink + * UpdateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - LogSink.prototype.endTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateExclusionRequest.prototype.exclusion = null; /** - * LogSink options. - * @member {"bigqueryOptions"|undefined} options - * @memberof google.logging.v2.LogSink + * UpdateExclusionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - Object.defineProperty(LogSink.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateExclusionRequest.prototype.updateMask = null; /** - * Creates a new LogSink instance using the specified properties. + * Creates a new UpdateExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.ILogSink=} [properties] Properties to set - * @returns {google.logging.v2.LogSink} LogSink instance + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance */ - LogSink.create = function create(properties) { - return new LogSink(properties); + UpdateExclusionRequest.create = function create(properties) { + return new UpdateExclusionRequest(properties); }; /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogSink.encode = function encode(message, writer) { + UpdateExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.destination != null && message.hasOwnProperty("destination")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) - $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogSink.encodeDelimited = function encodeDelimited(message, writer) { + UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decode = function decode(reader, length) { + UpdateExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 3: - message.destination = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 6: - message.outputVersionFormat = reader.int32(); - break; - case 8: - message.writerIdentity = reader.string(); - break; - case 9: - message.includeChildren = reader.bool(); - break; - case 12: - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); - break; - case 13: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 2: + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); break; - case 11: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -14758,253 +14054,134 @@ }; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decodeDelimited = function decodeDelimited(reader) { + UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogSink message. + * Verifies an UpdateExclusionRequest message. * @function verify - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogSink.verify = function verify(message) { + UpdateExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) - if (!$util.isString(message.destination)) - return "destination: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - switch (message.outputVersionFormat) { - default: - return "outputVersionFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - if (!$util.isString(message.writerIdentity)) - return "writerIdentity: string expected"; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - if (typeof message.includeChildren !== "boolean") - return "includeChildren: boolean expected"; - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - properties.options = 1; - { - var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); - if (error) - return "bigqueryOptions." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); if (error) - return "startTime." + error; + return "exclusion." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "endTime." + error; + return "updateMask." + error; } return null; }; /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest */ - LogSink.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogSink) + UpdateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) return object; - var message = new $root.google.logging.v2.LogSink(); + var message = new $root.google.logging.v2.UpdateExclusionRequest(); if (object.name != null) message.name = String(object.name); - if (object.destination != null) - message.destination = String(object.destination); - if (object.filter != null) - message.filter = String(object.filter); - switch (object.outputVersionFormat) { - case "VERSION_FORMAT_UNSPECIFIED": - case 0: - message.outputVersionFormat = 0; - break; - case "V2": - case 1: - message.outputVersionFormat = 1; - break; - case "V1": - case 2: - message.outputVersionFormat = 2; - break; - } - if (object.writerIdentity != null) - message.writerIdentity = String(object.writerIdentity); - if (object.includeChildren != null) - message.includeChildren = Boolean(object.includeChildren); - if (object.bigqueryOptions != null) { - if (typeof object.bigqueryOptions !== "object") - throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.logging.v2.LogSink.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.logging.v2.LogSink.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.LogSink} message LogSink + * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogSink.toObject = function toObject(message, options) { + UpdateExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.destination = ""; - object.filter = ""; - object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; - object.writerIdentity = ""; - object.includeChildren = false; - object.startTime = null; - object.endTime = null; - object.createTime = null; - object.updateTime = null; + object.exclusion = null; + object.updateMask = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = message.destination; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - object.writerIdentity = message.writerIdentity; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - object.includeChildren = message.includeChildren; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); - if (options.oneofs) - object.options = "bigqueryOptions"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this LogSink to JSON. + * Converts this UpdateExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateExclusionRequest * @instance * @returns {Object.} JSON object */ - LogSink.prototype.toJSON = function toJSON() { + UpdateExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * VersionFormat enum. - * @name google.logging.v2.LogSink.VersionFormat - * @enum {string} - * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value - * @property {number} V2=1 V2 value - * @property {number} V1=2 V1 value - */ - LogSink.VersionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "V2"] = 1; - values[valuesById[2] = "V1"] = 2; - return values; - })(); - - return LogSink; + return UpdateExclusionRequest; })(); - v2.BigQueryOptions = (function() { + v2.DeleteExclusionRequest = (function() { /** - * Properties of a BigQueryOptions. + * Properties of a DeleteExclusionRequest. * @memberof google.logging.v2 - * @interface IBigQueryOptions - * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @interface IDeleteExclusionRequest + * @property {string|null} [name] DeleteExclusionRequest name */ /** - * Constructs a new BigQueryOptions. + * Constructs a new DeleteExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a BigQueryOptions. - * @implements IBigQueryOptions + * @classdesc Represents a DeleteExclusionRequest. + * @implements IDeleteExclusionRequest * @constructor - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set */ - function BigQueryOptions(properties) { + function DeleteExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15012,75 +14189,75 @@ } /** - * BigQueryOptions usePartitionedTables. - * @member {boolean} usePartitionedTables - * @memberof google.logging.v2.BigQueryOptions + * DeleteExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteExclusionRequest * @instance */ - BigQueryOptions.prototype.usePartitionedTables = false; + DeleteExclusionRequest.prototype.name = ""; /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new DeleteExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance */ - BigQueryOptions.create = function create(properties) { - return new BigQueryOptions(properties); + DeleteExclusionRequest.create = function create(properties) { + return new DeleteExclusionRequest(properties); }; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encode = function encode(message, writer) { + DeleteExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decode = function decode(reader, length) { + DeleteExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.usePartitionedTables = reader.bool(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -15091,109 +14268,307 @@ }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryOptions message. + * Verifies a DeleteExclusionRequest message. * @function verify - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryOptions.verify = function verify(message) { + DeleteExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - if (typeof message.usePartitionedTables !== "boolean") - return "usePartitionedTables: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest */ - BigQueryOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.BigQueryOptions) + DeleteExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) return object; - var message = new $root.google.logging.v2.BigQueryOptions(); - if (object.usePartitionedTables != null) - message.usePartitionedTables = Boolean(object.usePartitionedTables); + var message = new $root.google.logging.v2.DeleteExclusionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryOptions.toObject = function toObject(message, options) { + DeleteExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.usePartitionedTables = false; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - object.usePartitionedTables = message.usePartitionedTables; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this BigQueryOptions to JSON. + * Converts this DeleteExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.DeleteExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteExclusionRequest; + })(); + + v2.LoggingServiceV2 = (function() { + + /** + * Constructs a new LoggingServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a LoggingServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; + + /** + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.LoggingServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef DeleteLogCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { + return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLog" }); + + /** + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef WriteLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + */ + + /** + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { + return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); + }, "name", { value: "WriteLogEntries" }); + + /** + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + */ + + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { + return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); + }, "name", { value: "ListLogEntries" }); + + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListMonitoredResourceDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + */ + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse + */ + + /** + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { + return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); + }, "name", { value: "ListLogs" }); + + /** + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - BigQueryOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return BigQueryOptions; + return LoggingServiceV2; })(); - v2.ListSinksRequest = (function() { + v2.DeleteLogRequest = (function() { /** - * Properties of a ListSinksRequest. + * Properties of a DeleteLogRequest. * @memberof google.logging.v2 - * @interface IListSinksRequest - * @property {string|null} [parent] ListSinksRequest parent - * @property {string|null} [pageToken] ListSinksRequest pageToken - * @property {number|null} [pageSize] ListSinksRequest pageSize + * @interface IDeleteLogRequest + * @property {string|null} [logName] DeleteLogRequest logName */ /** - * Constructs a new ListSinksRequest. + * Constructs a new DeleteLogRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksRequest. - * @implements IListSinksRequest + * @classdesc Represents a DeleteLogRequest. + * @implements IDeleteLogRequest * @constructor - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set */ - function ListSinksRequest(properties) { + function DeleteLogRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15201,101 +14576,75 @@ } /** - * ListSinksRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListSinksRequest - * @instance - */ - ListSinksRequest.prototype.parent = ""; - - /** - * ListSinksRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListSinksRequest - * @instance - */ - ListSinksRequest.prototype.pageToken = ""; - - /** - * ListSinksRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListSinksRequest + * DeleteLogRequest logName. + * @member {string} logName + * @memberof google.logging.v2.DeleteLogRequest * @instance */ - ListSinksRequest.prototype.pageSize = 0; + DeleteLogRequest.prototype.logName = ""; /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new DeleteLogRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance */ - ListSinksRequest.create = function create(properties) { - return new ListSinksRequest(properties); + DeleteLogRequest.create = function create(properties) { + return new DeleteLogRequest(properties); }; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encode = function encode(message, writer) { + DeleteLogRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); return writer; }; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a DeleteLogRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decode = function decode(reader, length) { + DeleteLogRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); + message.logName = reader.string(); break; default: reader.skipType(tag & 7); @@ -15306,126 +14655,114 @@ }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksRequest message. + * Verifies a DeleteLogRequest message. * @function verify - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksRequest.verify = function verify(message) { + DeleteLogRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; return null; }; /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest */ - ListSinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksRequest) + DeleteLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogRequest) return object; - var message = new $root.google.logging.v2.ListSinksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.DeleteLogRequest(); + if (object.logName != null) + message.logName = String(object.logName); return message; }; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksRequest.toObject = function toObject(message, options) { + DeleteLogRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (options.defaults) + object.logName = ""; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; return object; }; /** - * Converts this ListSinksRequest to JSON. + * Converts this DeleteLogRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.DeleteLogRequest * @instance * @returns {Object.} JSON object */ - ListSinksRequest.prototype.toJSON = function toJSON() { + DeleteLogRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksRequest; + return DeleteLogRequest; })(); - v2.ListSinksResponse = (function() { + v2.WriteLogEntriesRequest = (function() { /** - * Properties of a ListSinksResponse. + * Properties of a WriteLogEntriesRequest. * @memberof google.logging.v2 - * @interface IListSinksResponse - * @property {Array.|null} [sinks] ListSinksResponse sinks - * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + * @interface IWriteLogEntriesRequest + * @property {string|null} [logName] WriteLogEntriesRequest logName + * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource + * @property {Object.|null} [labels] WriteLogEntriesRequest labels + * @property {Array.|null} [entries] WriteLogEntriesRequest entries + * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess + * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun */ /** - * Constructs a new ListSinksResponse. + * Constructs a new WriteLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksResponse. - * @implements IListSinksResponse + * @classdesc Represents a WriteLogEntriesRequest. + * @implements IWriteLogEntriesRequest * @constructor - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set */ - function ListSinksResponse(properties) { - this.sinks = []; + function WriteLogEntriesRequest(properties) { + this.labels = {}; + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15433,91 +14770,149 @@ } /** - * ListSinksResponse sinks. - * @member {Array.} sinks - * @memberof google.logging.v2.ListSinksResponse + * WriteLogEntriesRequest logName. + * @member {string} logName + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - ListSinksResponse.prototype.sinks = $util.emptyArray; + WriteLogEntriesRequest.prototype.logName = ""; /** - * ListSinksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListSinksResponse + * WriteLogEntriesRequest resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.resource = null; + + /** + * WriteLogEntriesRequest labels. + * @member {Object.} labels + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.labels = $util.emptyObject; + + /** + * WriteLogEntriesRequest entries. + * @member {Array.} entries + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.entries = $util.emptyArray; + + /** + * WriteLogEntriesRequest partialSuccess. + * @member {boolean} partialSuccess + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.partialSuccess = false; + + /** + * WriteLogEntriesRequest dryRun. + * @member {boolean} dryRun + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - ListSinksResponse.prototype.nextPageToken = ""; + WriteLogEntriesRequest.prototype.dryRun = false; /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new WriteLogEntriesRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance */ - ListSinksResponse.create = function create(properties) { - return new ListSinksResponse(properties); + WriteLogEntriesRequest.create = function create(properties) { + return new WriteLogEntriesRequest(properties); }; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encode = function encode(message, writer) { + WriteLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinks != null && message.sinks.length) - for (var i = 0; i < message.sinks.length; ++i) - $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); return writer; }; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decode = function decode(reader, length) { + WriteLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.sinks && message.sinks.length)) - message.sinks = []; - message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); + message.logName = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 3: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 5: + message.partialSuccess = reader.bool(); + break; + case 6: + message.dryRun = reader.bool(); break; default: reader.skipType(tag & 7); @@ -15528,133 +14923,185 @@ }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksResponse message. + * Verifies a WriteLogEntriesRequest message. * @function verify - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksResponse.verify = function verify(message) { + WriteLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinks != null && message.hasOwnProperty("sinks")) { - if (!Array.isArray(message.sinks)) - return "sinks: array expected"; - for (var i = 0; i < message.sinks.length; ++i) { - var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); if (error) - return "sinks." + error; + return "entries." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + if (typeof message.partialSuccess !== "boolean") + return "partialSuccess: boolean expected"; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; return null; }; /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest */ - ListSinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksResponse) + WriteLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) return object; - var message = new $root.google.logging.v2.ListSinksResponse(); - if (object.sinks) { - if (!Array.isArray(object.sinks)) - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); - message.sinks = []; - for (var i = 0; i < object.sinks.length; ++i) { - if (typeof object.sinks[i] !== "object") - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); - message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); + var message = new $root.google.logging.v2.WriteLogEntriesRequest(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.partialSuccess != null) + message.partialSuccess = Boolean(object.partialSuccess); + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); return message; }; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksResponse.toObject = function toObject(message, options) { + WriteLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.sinks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.sinks && message.sinks.length) { - object.sinks = []; - for (var j = 0; j < message.sinks.length; ++j) - object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); + object.entries = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.logName = ""; + object.resource = null; + object.partialSuccess = false; + object.dryRun = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = message.partialSuccess; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; return object; }; /** - * Converts this ListSinksResponse to JSON. + * Converts this WriteLogEntriesRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance * @returns {Object.} JSON object */ - ListSinksResponse.prototype.toJSON = function toJSON() { + WriteLogEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksResponse; + return WriteLogEntriesRequest; })(); - v2.GetSinkRequest = (function() { + v2.WriteLogEntriesResponse = (function() { /** - * Properties of a GetSinkRequest. + * Properties of a WriteLogEntriesResponse. * @memberof google.logging.v2 - * @interface IGetSinkRequest - * @property {string|null} [sinkName] GetSinkRequest sinkName + * @interface IWriteLogEntriesResponse */ /** - * Constructs a new GetSinkRequest. + * Constructs a new WriteLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a GetSinkRequest. - * @implements IGetSinkRequest + * @classdesc Represents a WriteLogEntriesResponse. + * @implements IWriteLogEntriesResponse * @constructor - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set */ - function GetSinkRequest(properties) { + function WriteLogEntriesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15662,76 +15109,63 @@ } /** - * GetSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.GetSinkRequest - * @instance - */ - GetSinkRequest.prototype.sinkName = ""; - - /** - * Creates a new GetSinkRequest instance using the specified properties. + * Creates a new WriteLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance */ - GetSinkRequest.create = function create(properties) { - return new GetSinkRequest(properties); + WriteLogEntriesResponse.create = function create(properties) { + return new WriteLogEntriesResponse(properties); }; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encode = function encode(message, writer) { + WriteLogEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decode = function decode(reader, length) { + WriteLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -15741,109 +15175,95 @@ }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSinkRequest message. + * Verifies a WriteLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSinkRequest.verify = function verify(message) { + WriteLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; return null; }; /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse */ - GetSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetSinkRequest) + WriteLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) return object; - var message = new $root.google.logging.v2.GetSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - return message; + return new $root.google.logging.v2.WriteLogEntriesResponse(); }; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - return object; + WriteLogEntriesResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetSinkRequest to JSON. + * Converts this WriteLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @instance * @returns {Object.} JSON object */ - GetSinkRequest.prototype.toJSON = function toJSON() { + WriteLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSinkRequest; + return WriteLogEntriesResponse; })(); - v2.CreateSinkRequest = (function() { + v2.WriteLogEntriesPartialErrors = (function() { /** - * Properties of a CreateSinkRequest. + * Properties of a WriteLogEntriesPartialErrors. * @memberof google.logging.v2 - * @interface ICreateSinkRequest - * @property {string|null} [parent] CreateSinkRequest parent - * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity + * @interface IWriteLogEntriesPartialErrors + * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors */ /** - * Constructs a new CreateSinkRequest. + * Constructs a new WriteLogEntriesPartialErrors. * @memberof google.logging.v2 - * @classdesc Represents a CreateSinkRequest. - * @implements ICreateSinkRequest + * @classdesc Represents a WriteLogEntriesPartialErrors. + * @implements IWriteLogEntriesPartialErrors * @constructor - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set */ - function CreateSinkRequest(properties) { + function WriteLogEntriesPartialErrors(properties) { + this.logEntryErrors = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15851,101 +15271,83 @@ } /** - * CreateSinkRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.parent = ""; - - /** - * CreateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.sink = null; - - /** - * CreateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.CreateSinkRequest + * WriteLogEntriesPartialErrors logEntryErrors. + * @member {Object.} logEntryErrors + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @instance */ - CreateSinkRequest.prototype.uniqueWriterIdentity = false; + WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance */ - CreateSinkRequest.create = function create(properties) { - return new CreateSinkRequest(properties); + WriteLogEntriesPartialErrors.create = function create(properties) { + return new WriteLogEntriesPartialErrors(properties); }; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSinkRequest.encode = function encode(message, writer) { + WriteLogEntriesPartialErrors.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sink != null && message.hasOwnProperty("sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) + for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decode = function decode(reader, length) { + WriteLogEntriesPartialErrors.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); + reader.skip().pos++; + if (message.logEntryErrors === $util.emptyObject) + message.logEntryErrors = {}; + key = reader.int32(); + reader.pos++; + message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15956,132 +15358,137 @@ }; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSinkRequest message. + * Verifies a WriteLogEntriesPartialErrors message. * @function verify - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSinkRequest.verify = function verify(message) { + WriteLogEntriesPartialErrors.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { + if (!$util.isObject(message.logEntryErrors)) + return "logEntryErrors: object expected"; + var key = Object.keys(message.logEntryErrors); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "logEntryErrors: integer key{k:int32} expected"; + { + var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); + if (error) + return "logEntryErrors." + error; + } + } } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; return null; }; /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors */ - CreateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateSinkRequest) + WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) return object; - var message = new $root.google.logging.v2.CreateSinkRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); + if (object.logEntryErrors) { + if (typeof object.logEntryErrors !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors = {}; + for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { + if (typeof object.logEntryErrors[keys[i]] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); + } } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); return message; }; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest + * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSinkRequest.toObject = function toObject(message, options) { + WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.sink = null; - object.uniqueWriterIdentity = false; + if (options.objects || options.defaults) + object.logEntryErrors = {}; + var keys2; + if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { + object.logEntryErrors = {}; + for (var j = 0; j < keys2.length; ++j) + object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; return object; }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this WriteLogEntriesPartialErrors to JSON. * @function toJSON - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @instance * @returns {Object.} JSON object */ - CreateSinkRequest.prototype.toJSON = function toJSON() { + WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateSinkRequest; + return WriteLogEntriesPartialErrors; })(); - v2.UpdateSinkRequest = (function() { + v2.ListLogEntriesRequest = (function() { /** - * Properties of an UpdateSinkRequest. + * Properties of a ListLogEntriesRequest. * @memberof google.logging.v2 - * @interface IUpdateSinkRequest - * @property {string|null} [sinkName] UpdateSinkRequest sinkName - * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask + * @interface IListLogEntriesRequest + * @property {Array.|null} [projectIds] ListLogEntriesRequest projectIds + * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames + * @property {string|null} [filter] ListLogEntriesRequest filter + * @property {string|null} [orderBy] ListLogEntriesRequest orderBy + * @property {number|null} [pageSize] ListLogEntriesRequest pageSize + * @property {string|null} [pageToken] ListLogEntriesRequest pageToken */ /** - * Constructs a new UpdateSinkRequest. + * Constructs a new ListLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents an UpdateSinkRequest. - * @implements IUpdateSinkRequest + * @classdesc Represents a ListLogEntriesRequest. + * @implements IListLogEntriesRequest * @constructor - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set */ - function UpdateSinkRequest(properties) { + function ListLogEntriesRequest(properties) { + this.projectIds = []; + this.resourceNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16089,114 +15496,146 @@ } /** - * UpdateSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.UpdateSinkRequest + * ListLogEntriesRequest projectIds. + * @member {Array.} projectIds + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - UpdateSinkRequest.prototype.sinkName = ""; + ListLogEntriesRequest.prototype.projectIds = $util.emptyArray; /** - * UpdateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.UpdateSinkRequest + * ListLogEntriesRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - UpdateSinkRequest.prototype.sink = null; + ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; /** - * UpdateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.UpdateSinkRequest + * ListLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - UpdateSinkRequest.prototype.uniqueWriterIdentity = false; + ListLogEntriesRequest.prototype.filter = ""; /** - * UpdateSinkRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateSinkRequest + * ListLogEntriesRequest orderBy. + * @member {string} orderBy + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - UpdateSinkRequest.prototype.updateMask = null; + ListLogEntriesRequest.prototype.orderBy = ""; /** - * Creates a new UpdateSinkRequest instance using the specified properties. + * ListLogEntriesRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageSize = 0; + + /** + * ListLogEntriesRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance */ - UpdateSinkRequest.create = function create(properties) { - return new UpdateSinkRequest(properties); + ListLogEntriesRequest.create = function create(properties) { + return new ListLogEntriesRequest(properties); }; /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSinkRequest.encode = function encode(message, writer) { + ListLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - if (message.sink != null && message.hasOwnProperty("sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.projectIds != null && message.projectIds.length) + for (var i = 0; i < message.projectIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); return writer; }; /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSinkRequest.decode = function decode(reader, length) { + ListLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sinkName = reader.string(); + if (!(message.projectIds && message.projectIds.length)) + message.projectIds = []; + message.projectIds.push(reader.string()); + break; + case 8: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); break; case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + message.filter = reader.string(); break; case 3: - message.uniqueWriterIdentity = reader.bool(); + message.orderBy = reader.string(); break; case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); + break; + case 5: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -16207,142 +15646,176 @@ }; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSinkRequest message. + * Verifies a ListLogEntriesRequest message. * @function verify - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSinkRequest.verify = function verify(message) { + ListLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; + if (message.projectIds != null && message.hasOwnProperty("projectIds")) { + if (!Array.isArray(message.projectIds)) + return "projectIds: array expected"; + for (var i = 0; i < message.projectIds.length; ++i) + if (!$util.isString(message.projectIds[i])) + return "projectIds: string[] expected"; } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest */ - UpdateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateSinkRequest) + ListLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) return object; - var message = new $root.google.logging.v2.UpdateSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + var message = new $root.google.logging.v2.ListLogEntriesRequest(); + if (object.projectIds) { + if (!Array.isArray(object.projectIds)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.projectIds: array expected"); + message.projectIds = []; + for (var i = 0; i < object.projectIds.length; ++i) + message.projectIds[i] = String(object.projectIds[i]); } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); } + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest + * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSinkRequest.toObject = function toObject(message, options) { + ListLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.projectIds = []; + object.resourceNames = []; + } if (options.defaults) { - object.sinkName = ""; - object.sink = null; - object.uniqueWriterIdentity = false; - object.updateMask = null; + object.filter = ""; + object.orderBy = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.projectIds && message.projectIds.length) { + object.projectIds = []; + for (var j = 0; j < message.projectIds.length; ++j) + object.projectIds[j] = message.projectIds[j]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; } - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateSinkRequest to JSON. + * Converts this ListLogEntriesRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @instance * @returns {Object.} JSON object */ - UpdateSinkRequest.prototype.toJSON = function toJSON() { + ListLogEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSinkRequest; + return ListLogEntriesRequest; })(); - v2.DeleteSinkRequest = (function() { + v2.ListLogEntriesResponse = (function() { /** - * Properties of a DeleteSinkRequest. + * Properties of a ListLogEntriesResponse. * @memberof google.logging.v2 - * @interface IDeleteSinkRequest - * @property {string|null} [sinkName] DeleteSinkRequest sinkName + * @interface IListLogEntriesResponse + * @property {Array.|null} [entries] ListLogEntriesResponse entries + * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken */ /** - * Constructs a new DeleteSinkRequest. + * Constructs a new ListLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a DeleteSinkRequest. - * @implements IDeleteSinkRequest + * @classdesc Represents a ListLogEntriesResponse. + * @implements IListLogEntriesResponse * @constructor - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set */ - function DeleteSinkRequest(properties) { + function ListLogEntriesResponse(properties) { + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16350,75 +15823,91 @@ } /** - * DeleteSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.DeleteSinkRequest + * ListLogEntriesResponse entries. + * @member {Array.} entries + * @memberof google.logging.v2.ListLogEntriesResponse * @instance */ - DeleteSinkRequest.prototype.sinkName = ""; + ListLogEntriesResponse.prototype.entries = $util.emptyArray; /** - * Creates a new DeleteSinkRequest instance using the specified properties. + * ListLogEntriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + */ + ListLogEntriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance */ - DeleteSinkRequest.create = function create(properties) { - return new DeleteSinkRequest(properties); + ListLogEntriesResponse.create = function create(properties) { + return new ListLogEntriesResponse(properties); }; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSinkRequest.encode = function encode(message, writer) { + ListLogEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSinkRequest.decode = function decode(reader, length) { + ListLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sinkName = reader.string(); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -16429,112 +15918,134 @@ }; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSinkRequest message. + * Verifies a ListLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSinkRequest.verify = function verify(message) { + ListLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse */ - DeleteSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteSinkRequest) + ListLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) return object; - var message = new $root.google.logging.v2.DeleteSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); + var message = new $root.google.logging.v2.ListLogEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest + * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSinkRequest.toObject = function toObject(message, options) { + ListLogEntriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entries = []; if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; + object.nextPageToken = ""; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteSinkRequest to JSON. + * Converts this ListLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @instance * @returns {Object.} JSON object */ - DeleteSinkRequest.prototype.toJSON = function toJSON() { + ListLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteSinkRequest; + return ListLogEntriesResponse; })(); - v2.LogExclusion = (function() { + v2.ListMonitoredResourceDescriptorsRequest = (function() { /** - * Properties of a LogExclusion. + * Properties of a ListMonitoredResourceDescriptorsRequest. * @memberof google.logging.v2 - * @interface ILogExclusion - * @property {string|null} [name] LogExclusion name - * @property {string|null} [description] LogExclusion description - * @property {string|null} [filter] LogExclusion filter - * @property {boolean|null} [disabled] LogExclusion disabled - * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime + * @interface IListMonitoredResourceDescriptorsRequest + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken */ /** - * Constructs a new LogExclusion. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogExclusion. - * @implements ILogExclusion + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest * @constructor - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set */ - function LogExclusion(properties) { + function ListMonitoredResourceDescriptorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16542,140 +16053,88 @@ } /** - * LogExclusion name. - * @member {string} name - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.name = ""; - - /** - * LogExclusion description. - * @member {string} description - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.description = ""; - - /** - * LogExclusion filter. - * @member {string} filter - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.filter = ""; - - /** - * LogExclusion disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.disabled = false; - - /** - * LogExclusion createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogExclusion + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance */ - LogExclusion.prototype.createTime = null; + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; /** - * LogExclusion updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogExclusion + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance */ - LogExclusion.prototype.updateTime = null; + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; /** - * Creates a new LogExclusion instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set - * @returns {google.logging.v2.LogExclusion} LogExclusion instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance */ - LogExclusion.create = function create(properties) { - return new LogExclusion(properties); + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); }; /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogExclusion.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.disabled != null && message.hasOwnProperty("disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); return writer; }; /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogExclusion message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogExclusion.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.pageSize = reader.int32(); break; case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.disabled = reader.bool(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -16686,160 +16145,118 @@ }; /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogExclusion.decodeDelimited = function decodeDelimited(reader) { + ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogExclusion message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @function verify - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogExclusion.verify = function verify(message) { + ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest */ - LogExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogExclusion) + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) return object; - var message = new $root.google.logging.v2.LogExclusion(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.LogExclusion} message LogExclusion + * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogExclusion.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.disabled = false; - object.createTime = null; - object.updateTime = null; + object.pageSize = 0; + object.pageToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this LogExclusion to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance * @returns {Object.} JSON object */ - LogExclusion.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogExclusion; + return ListMonitoredResourceDescriptorsRequest; })(); - v2.ListExclusionsRequest = (function() { + v2.ListMonitoredResourceDescriptorsResponse = (function() { /** - * Properties of a ListExclusionsRequest. + * Properties of a ListMonitoredResourceDescriptorsResponse. * @memberof google.logging.v2 - * @interface IListExclusionsRequest - * @property {string|null} [parent] ListExclusionsRequest parent - * @property {string|null} [pageToken] ListExclusionsRequest pageToken - * @property {number|null} [pageSize] ListExclusionsRequest pageSize + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken */ /** - * Constructs a new ListExclusionsRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsRequest. - * @implements IListExclusionsRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse * @constructor - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set */ - function ListExclusionsRequest(properties) { + function ListMonitoredResourceDescriptorsResponse(properties) { + this.resourceDescriptors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16847,101 +16264,91 @@ } /** - * ListExclusionsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.parent = ""; - - /** - * ListExclusionsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListExclusionsRequest + * ListMonitoredResourceDescriptorsResponse resourceDescriptors. + * @member {Array.} resourceDescriptors + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance */ - ListExclusionsRequest.prototype.pageToken = ""; + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; /** - * ListExclusionsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListExclusionsRequest + * ListMonitoredResourceDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance */ - ListExclusionsRequest.prototype.pageSize = 0; + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListExclusionsRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance */ - ListExclusionsRequest.create = function create(properties) { - return new ListExclusionsRequest(properties); + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); }; /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.resourceDescriptors != null && message.resourceDescriptors.length) + for (var i = 0; i < message.resourceDescriptors.length; ++i) + $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsRequest.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.resourceDescriptors && message.resourceDescriptors.length)) + message.resourceDescriptors = []; + message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); break; case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -16952,126 +16359,135 @@ }; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { + ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListExclusionsRequest message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @function verify - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListExclusionsRequest.verify = function verify(message) { + ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { + if (!Array.isArray(message.resourceDescriptors)) + return "resourceDescriptors: array expected"; + for (var i = 0; i < message.resourceDescriptors.length; ++i) { + var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); + if (error) + return "resourceDescriptors." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse */ - ListExclusionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsRequest) + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) return object; - var message = new $root.google.logging.v2.ListExclusionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); + message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExclusionsRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + if (options.arrays || options.defaults) + object.resourceDescriptors = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceDescriptors && message.resourceDescriptors.length) { + object.resourceDescriptors = []; + for (var j = 0; j < message.resourceDescriptors.length; ++j) + object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListExclusionsRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance * @returns {Object.} JSON object */ - ListExclusionsRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListExclusionsRequest; + return ListMonitoredResourceDescriptorsResponse; })(); - v2.ListExclusionsResponse = (function() { + v2.ListLogsRequest = (function() { /** - * Properties of a ListExclusionsResponse. + * Properties of a ListLogsRequest. * @memberof google.logging.v2 - * @interface IListExclusionsResponse - * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions - * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken + * @interface IListLogsRequest + * @property {string|null} [parent] ListLogsRequest parent + * @property {number|null} [pageSize] ListLogsRequest pageSize + * @property {string|null} [pageToken] ListLogsRequest pageToken */ /** - * Constructs a new ListExclusionsResponse. + * Constructs a new ListLogsRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsResponse. - * @implements IListExclusionsResponse + * @classdesc Represents a ListLogsRequest. + * @implements IListLogsRequest * @constructor - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set */ - function ListExclusionsResponse(properties) { - this.exclusions = []; + function ListLogsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17079,91 +16495,101 @@ } /** - * ListExclusionsResponse exclusions. - * @member {Array.} exclusions - * @memberof google.logging.v2.ListExclusionsResponse + * ListLogsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.parent = ""; + + /** + * ListLogsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogsRequest * @instance */ - ListExclusionsResponse.prototype.exclusions = $util.emptyArray; + ListLogsRequest.prototype.pageSize = 0; /** - * ListExclusionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListExclusionsResponse + * ListLogsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogsRequest * @instance */ - ListExclusionsResponse.prototype.nextPageToken = ""; + ListLogsRequest.prototype.pageToken = ""; /** - * Creates a new ListExclusionsResponse instance using the specified properties. + * Creates a new ListLogsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance */ - ListExclusionsResponse.create = function create(properties) { - return new ListExclusionsResponse(properties); + ListLogsRequest.create = function create(properties) { + return new ListLogsRequest(properties); }; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsResponse.encode = function encode(message, writer) { + ListLogsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.exclusions != null && message.exclusions.length) - for (var i = 0; i < message.exclusions.length; ++i) - $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsResponse.decode = function decode(reader, length) { + ListLogsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -17174,133 +16600,126 @@ }; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { + ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListExclusionsResponse message. + * Verifies a ListLogsRequest message. * @function verify - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListExclusionsResponse.verify = function verify(message) { + ListLogsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.exclusions != null && message.hasOwnProperty("exclusions")) { - if (!Array.isArray(message.exclusions)) - return "exclusions: array expected"; - for (var i = 0; i < message.exclusions.length; ++i) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); - if (error) - return "exclusions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest */ - ListExclusionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsResponse) + ListLogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsRequest) return object; - var message = new $root.google.logging.v2.ListExclusionsResponse(); - if (object.exclusions) { - if (!Array.isArray(object.exclusions)) - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); - message.exclusions = []; - for (var i = 0; i < object.exclusions.length; ++i) { - if (typeof object.exclusions[i] !== "object") - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); - message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.ListLogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse + * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExclusionsResponse.toObject = function toObject(message, options) { + ListLogsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.exclusions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.exclusions && message.exclusions.length) { - object.exclusions = []; - for (var j = 0; j < message.exclusions.length; ++j) - object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this ListExclusionsResponse to JSON. + * Converts this ListLogsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.ListLogsRequest * @instance * @returns {Object.} JSON object */ - ListExclusionsResponse.prototype.toJSON = function toJSON() { + ListLogsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListExclusionsResponse; + return ListLogsRequest; })(); - v2.GetExclusionRequest = (function() { + v2.ListLogsResponse = (function() { /** - * Properties of a GetExclusionRequest. + * Properties of a ListLogsResponse. * @memberof google.logging.v2 - * @interface IGetExclusionRequest - * @property {string|null} [name] GetExclusionRequest name + * @interface IListLogsResponse + * @property {Array.|null} [logNames] ListLogsResponse logNames + * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken */ /** - * Constructs a new GetExclusionRequest. + * Constructs a new ListLogsResponse. * @memberof google.logging.v2 - * @classdesc Represents a GetExclusionRequest. - * @implements IGetExclusionRequest + * @classdesc Represents a ListLogsResponse. + * @implements IListLogsResponse * @constructor - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set */ - function GetExclusionRequest(properties) { + function ListLogsResponse(properties) { + this.logNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17308,75 +16727,91 @@ } /** - * GetExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.GetExclusionRequest + * ListLogsResponse logNames. + * @member {Array.} logNames + * @memberof google.logging.v2.ListLogsResponse * @instance */ - GetExclusionRequest.prototype.name = ""; + ListLogsResponse.prototype.logNames = $util.emptyArray; /** - * Creates a new GetExclusionRequest instance using the specified properties. + * ListLogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogsResponse + * @instance + */ + ListLogsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance */ - GetExclusionRequest.create = function create(properties) { - return new GetExclusionRequest(properties); + ListLogsResponse.create = function create(properties) { + return new ListLogsResponse(properties); }; /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExclusionRequest.encode = function encode(message, writer) { + ListLogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.logNames != null && message.logNames.length) + for (var i = 0; i < message.logNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); return writer; }; /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decode = function decode(reader, length) { + ListLogsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); + case 3: + if (!(message.logNames && message.logNames.length)) + message.logNames = []; + message.logNames.push(reader.string()); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -17387,197 +16822,449 @@ }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetExclusionRequest message. + * Verifies a ListLogsResponse message. * @function verify - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetExclusionRequest.verify = function verify(message) { + ListLogsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.logNames != null && message.hasOwnProperty("logNames")) { + if (!Array.isArray(message.logNames)) + return "logNames: array expected"; + for (var i = 0; i < message.logNames.length; ++i) + if (!$util.isString(message.logNames[i])) + return "logNames: string[] expected"; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse */ - GetExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetExclusionRequest) + ListLogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsResponse) return object; - var message = new $root.google.logging.v2.GetExclusionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.logging.v2.ListLogsResponse(); + if (object.logNames) { + if (!Array.isArray(object.logNames)) + throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); + message.logNames = []; + for (var i = 0; i < object.logNames.length; ++i) + message.logNames[i] = String(object.logNames[i]); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest + * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetExclusionRequest.toObject = function toObject(message, options) { + ListLogsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.logNames = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.logNames && message.logNames.length) { + object.logNames = []; + for (var j = 0; j < message.logNames.length; ++j) + object.logNames[j] = message.logNames[j]; + } return object; }; /** - * Converts this GetExclusionRequest to JSON. + * Converts this ListLogsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.ListLogsResponse * @instance * @returns {Object.} JSON object */ - GetExclusionRequest.prototype.toJSON = function toJSON() { + ListLogsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetExclusionRequest; + return ListLogsResponse; })(); - v2.CreateExclusionRequest = (function() { + v2.LogEntry = (function() { /** - * Properties of a CreateExclusionRequest. + * Properties of a LogEntry. * @memberof google.logging.v2 - * @interface ICreateExclusionRequest - * @property {string|null} [parent] CreateExclusionRequest parent - * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion + * @interface ILogEntry + * @property {string|null} [logName] LogEntry logName + * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource + * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload + * @property {string|null} [textPayload] LogEntry textPayload + * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload + * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp + * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp + * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity + * @property {string|null} [insertId] LogEntry insertId + * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest + * @property {Object.|null} [labels] LogEntry labels + * @property {google.api.IMonitoredResourceMetadata|null} [metadata] LogEntry metadata + * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation + * @property {string|null} [trace] LogEntry trace + * @property {string|null} [spanId] LogEntry spanId + * @property {boolean|null} [traceSampled] LogEntry traceSampled + * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation */ /** - * Constructs a new CreateExclusionRequest. + * Constructs a new LogEntry. * @memberof google.logging.v2 - * @classdesc Represents a CreateExclusionRequest. - * @implements ICreateExclusionRequest + * @classdesc Represents a LogEntry. + * @implements ILogEntry * @constructor - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + */ + function LogEntry(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogEntry logName. + * @member {string} logName + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.logName = ""; + + /** + * LogEntry resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.resource = null; + + /** + * LogEntry protoPayload. + * @member {google.protobuf.IAny|null|undefined} protoPayload + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.protoPayload = null; + + /** + * LogEntry textPayload. + * @member {string} textPayload + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.textPayload = ""; + + /** + * LogEntry jsonPayload. + * @member {google.protobuf.IStruct|null|undefined} jsonPayload + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.jsonPayload = null; + + /** + * LogEntry timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.timestamp = null; + + /** + * LogEntry receiveTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.receiveTimestamp = null; + + /** + * LogEntry severity. + * @member {google.logging.type.LogSeverity} severity + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.severity = 0; + + /** + * LogEntry insertId. + * @member {string} insertId + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.insertId = ""; + + /** + * LogEntry httpRequest. + * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.httpRequest = null; + + /** + * LogEntry labels. + * @member {Object.} labels + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.labels = $util.emptyObject; + + /** + * LogEntry metadata. + * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.metadata = null; + + /** + * LogEntry operation. + * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.operation = null; + + /** + * LogEntry trace. + * @member {string} trace + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.trace = ""; + + /** + * LogEntry spanId. + * @member {string} spanId + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.spanId = ""; + + /** + * LogEntry traceSampled. + * @member {boolean} traceSampled + * @memberof google.logging.v2.LogEntry + * @instance */ - function CreateExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LogEntry.prototype.traceSampled = false; /** - * CreateExclusionRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateExclusionRequest + * LogEntry sourceLocation. + * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation + * @memberof google.logging.v2.LogEntry * @instance */ - CreateExclusionRequest.prototype.parent = ""; + LogEntry.prototype.sourceLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CreateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.CreateExclusionRequest + * LogEntry payload. + * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload + * @memberof google.logging.v2.LogEntry * @instance */ - CreateExclusionRequest.prototype.exclusion = null; + Object.defineProperty(LogEntry.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CreateExclusionRequest instance using the specified properties. + * Creates a new LogEntry instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + * @returns {google.logging.v2.LogEntry} LogEntry instance */ - CreateExclusionRequest.create = function create(properties) { - return new CreateExclusionRequest(properties); + LogEntry.create = function create(properties) { + return new LogEntry(properties); }; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExclusionRequest.encode = function encode(message, writer) { + LogEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) + $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textPayload != null && message.hasOwnProperty("textPayload")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); + if (message.insertId != null && message.hasOwnProperty("insertId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) + $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.severity != null && message.hasOwnProperty("severity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); + if (message.operation != null && message.hasOwnProperty("operation")) + $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.trace != null && message.hasOwnProperty("trace")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.spanId != null && message.hasOwnProperty("spanId")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); return writer; }; /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntry message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.LogEntry} LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExclusionRequest.decode = function decode(reader, length) { + LogEntry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); + case 12: + message.logName = reader.string(); + break; + case 8: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); break; case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.textPayload = reader.string(); + break; + case 6: + message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 9: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 24: + message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.severity = reader.int32(); + break; + case 4: + message.insertId = reader.string(); + break; + case 7: + message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); + break; + case 11: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 25: + message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); + break; + case 15: + message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); + break; + case 22: + message.trace = reader.string(); + break; + case 27: + message.spanId = reader.string(); + break; + case 30: + message.traceSampled = reader.bool(); + break; + case 23: + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -17588,123 +17275,366 @@ }; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.LogEntry} LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + LogEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateExclusionRequest message. + * Verifies a LogEntry message. * @function verify - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateExclusionRequest.verify = function verify(message) { + LogEntry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + var properties = {}; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + properties.payload = 1; + { + var error = $root.google.protobuf.Any.verify(message.protoPayload); + if (error) + return "protoPayload." + error; + } + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + if (!$util.isString(message.textPayload)) + return "textPayload: string expected"; + } + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.protobuf.Struct.verify(message.jsonPayload); + if (error) + return "jsonPayload." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); + if (error) + return "receiveTimestamp." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 100: + case 200: + case 300: + case 400: + case 500: + case 600: + case 700: + case 800: + break; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + if (!$util.isString(message.insertId)) + return "insertId: string expected"; + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { + var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); + if (error) + return "httpRequest." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); if (error) - return "exclusion." + error; + return "metadata." + error; + } + if (message.operation != null && message.hasOwnProperty("operation")) { + var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); + if (error) + return "operation." + error; + } + if (message.trace != null && message.hasOwnProperty("trace")) + if (!$util.isString(message.trace)) + return "trace: string expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!$util.isString(message.spanId)) + return "spanId: string expected"; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + if (typeof message.traceSampled !== "boolean") + return "traceSampled: boolean expected"; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { + var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); + if (error) + return "sourceLocation." + error; } return null; }; /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.LogEntry} LogEntry */ - CreateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateExclusionRequest) + LogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntry) return object; - var message = new $root.google.logging.v2.CreateExclusionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + var message = new $root.google.logging.v2.LogEntry(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.protoPayload != null) { + if (typeof object.protoPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); + message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); + } + if (object.textPayload != null) + message.textPayload = String(object.textPayload); + if (object.jsonPayload != null) { + if (typeof object.jsonPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); + message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.receiveTimestamp != null) { + if (typeof object.receiveTimestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); + message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); + } + switch (object.severity) { + case "DEFAULT": + case 0: + message.severity = 0; + break; + case "DEBUG": + case 100: + message.severity = 100; + break; + case "INFO": + case 200: + message.severity = 200; + break; + case "NOTICE": + case 300: + message.severity = 300; + break; + case "WARNING": + case 400: + message.severity = 400; + break; + case "ERROR": + case 500: + message.severity = 500; + break; + case "CRITICAL": + case 600: + message.severity = 600; + break; + case "ALERT": + case 700: + message.severity = 700; + break; + case "EMERGENCY": + case 800: + message.severity = 800; + break; + } + if (object.insertId != null) + message.insertId = String(object.insertId); + if (object.httpRequest != null) { + if (typeof object.httpRequest !== "object") + throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); + message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.logging.v2.LogEntry.metadata: object expected"); + message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); + } + if (object.operation != null) { + if (typeof object.operation !== "object") + throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); + message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); + } + if (object.trace != null) + message.trace = String(object.trace); + if (object.spanId != null) + message.spanId = String(object.spanId); + if (object.traceSampled != null) + message.traceSampled = Boolean(object.traceSampled); + if (object.sourceLocation != null) { + if (typeof object.sourceLocation !== "object") + throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); } return message; }; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest + * @param {google.logging.v2.LogEntry} message LogEntry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateExclusionRequest.toObject = function toObject(message, options) { + LogEntry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.parent = ""; - object.exclusion = null; + object.insertId = ""; + object.httpRequest = null; + object.resource = null; + object.timestamp = null; + object.severity = options.enums === String ? "DEFAULT" : 0; + object.logName = ""; + object.operation = null; + object.trace = ""; + object.sourceLocation = null; + object.receiveTimestamp = null; + object.metadata = null; + object.spanId = ""; + object.traceSampled = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); + if (options.oneofs) + object.payload = "protoPayload"; + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + object.textPayload = message.textPayload; + if (options.oneofs) + object.payload = "textPayload"; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + object.insertId = message.insertId; + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); + if (options.oneofs) + object.payload = "jsonPayload"; + } + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); + if (message.trace != null && message.hasOwnProperty("trace")) + object.trace = message.trace; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = message.spanId; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + object.traceSampled = message.traceSampled; return object; }; /** - * Converts this CreateExclusionRequest to JSON. + * Converts this LogEntry to JSON. * @function toJSON - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.LogEntry * @instance * @returns {Object.} JSON object */ - CreateExclusionRequest.prototype.toJSON = function toJSON() { + LogEntry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateExclusionRequest; + return LogEntry; })(); - v2.UpdateExclusionRequest = (function() { + v2.LogEntryOperation = (function() { /** - * Properties of an UpdateExclusionRequest. + * Properties of a LogEntryOperation. * @memberof google.logging.v2 - * @interface IUpdateExclusionRequest - * @property {string|null} [name] UpdateExclusionRequest name - * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask + * @interface ILogEntryOperation + * @property {string|null} [id] LogEntryOperation id + * @property {string|null} [producer] LogEntryOperation producer + * @property {boolean|null} [first] LogEntryOperation first + * @property {boolean|null} [last] LogEntryOperation last */ /** - * Constructs a new UpdateExclusionRequest. + * Constructs a new LogEntryOperation. * @memberof google.logging.v2 - * @classdesc Represents an UpdateExclusionRequest. - * @implements IUpdateExclusionRequest + * @classdesc Represents a LogEntryOperation. + * @implements ILogEntryOperation * @constructor - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set */ - function UpdateExclusionRequest(properties) { + function LogEntryOperation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17712,101 +17642,114 @@ } /** - * UpdateExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateExclusionRequest + * LogEntryOperation id. + * @member {string} id + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.id = ""; + + /** + * LogEntryOperation producer. + * @member {string} producer + * @memberof google.logging.v2.LogEntryOperation * @instance */ - UpdateExclusionRequest.prototype.name = ""; + LogEntryOperation.prototype.producer = ""; /** - * UpdateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.UpdateExclusionRequest + * LogEntryOperation first. + * @member {boolean} first + * @memberof google.logging.v2.LogEntryOperation * @instance */ - UpdateExclusionRequest.prototype.exclusion = null; + LogEntryOperation.prototype.first = false; /** - * UpdateExclusionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateExclusionRequest + * LogEntryOperation last. + * @member {boolean} last + * @memberof google.logging.v2.LogEntryOperation * @instance */ - UpdateExclusionRequest.prototype.updateMask = null; + LogEntryOperation.prototype.last = false; /** - * Creates a new UpdateExclusionRequest instance using the specified properties. + * Creates a new LogEntryOperation instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance */ - UpdateExclusionRequest.create = function create(properties) { - return new UpdateExclusionRequest(properties); + LogEntryOperation.create = function create(properties) { + return new LogEntryOperation(properties); }; /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExclusionRequest.encode = function encode(message, writer) { + LogEntryOperation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.producer != null && message.hasOwnProperty("producer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); + if (message.first != null && message.hasOwnProperty("first")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); + if (message.last != null && message.hasOwnProperty("last")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); return writer; }; /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntryOperation message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decode = function decode(reader, length) { + LogEntryOperation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.id = reader.string(); break; case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + message.producer = reader.string(); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.first = reader.bool(); + break; + case 4: + message.last = reader.bool(); break; default: reader.skipType(tag & 7); @@ -17817,134 +17760,134 @@ }; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateExclusionRequest message. + * Verifies a LogEntryOperation message. * @function verify - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateExclusionRequest.verify = function verify(message) { + LogEntryOperation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.producer != null && message.hasOwnProperty("producer")) + if (!$util.isString(message.producer)) + return "producer: string expected"; + if (message.first != null && message.hasOwnProperty("first")) + if (typeof message.first !== "boolean") + return "first: boolean expected"; + if (message.last != null && message.hasOwnProperty("last")) + if (typeof message.last !== "boolean") + return "last: boolean expected"; return null; }; /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation */ - UpdateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) + LogEntryOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntryOperation) return object; - var message = new $root.google.logging.v2.UpdateExclusionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.logging.v2.LogEntryOperation(); + if (object.id != null) + message.id = String(object.id); + if (object.producer != null) + message.producer = String(object.producer); + if (object.first != null) + message.first = Boolean(object.first); + if (object.last != null) + message.last = Boolean(object.last); return message; }; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static - * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest + * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateExclusionRequest.toObject = function toObject(message, options) { + LogEntryOperation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.exclusion = null; - object.updateMask = null; + object.id = ""; + object.producer = ""; + object.first = false; + object.last = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.producer != null && message.hasOwnProperty("producer")) + object.producer = message.producer; + if (message.first != null && message.hasOwnProperty("first")) + object.first = message.first; + if (message.last != null && message.hasOwnProperty("last")) + object.last = message.last; return object; }; /** - * Converts this UpdateExclusionRequest to JSON. + * Converts this LogEntryOperation to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @instance * @returns {Object.} JSON object */ - UpdateExclusionRequest.prototype.toJSON = function toJSON() { + LogEntryOperation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateExclusionRequest; + return LogEntryOperation; })(); - v2.DeleteExclusionRequest = (function() { + v2.LogEntrySourceLocation = (function() { /** - * Properties of a DeleteExclusionRequest. + * Properties of a LogEntrySourceLocation. * @memberof google.logging.v2 - * @interface IDeleteExclusionRequest - * @property {string|null} [name] DeleteExclusionRequest name + * @interface ILogEntrySourceLocation + * @property {string|null} [file] LogEntrySourceLocation file + * @property {number|Long|null} [line] LogEntrySourceLocation line + * @property {string|null} ["function"] LogEntrySourceLocation function */ /** - * Constructs a new DeleteExclusionRequest. + * Constructs a new LogEntrySourceLocation. * @memberof google.logging.v2 - * @classdesc Represents a DeleteExclusionRequest. - * @implements IDeleteExclusionRequest + * @classdesc Represents a LogEntrySourceLocation. + * @implements ILogEntrySourceLocation * @constructor - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set */ - function DeleteExclusionRequest(properties) { + function LogEntrySourceLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17952,75 +17895,101 @@ } /** - * DeleteExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.DeleteExclusionRequest + * LogEntrySourceLocation file. + * @member {string} file + * @memberof google.logging.v2.LogEntrySourceLocation * @instance */ - DeleteExclusionRequest.prototype.name = ""; + LogEntrySourceLocation.prototype.file = ""; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. + * LogEntrySourceLocation line. + * @member {number|Long} line + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LogEntrySourceLocation function. + * @member {string} function + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype["function"] = ""; + + /** + * Creates a new LogEntrySourceLocation instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance */ - DeleteExclusionRequest.create = function create(properties) { - return new DeleteExclusionRequest(properties); + LogEntrySourceLocation.create = function create(properties) { + return new LogEntrySourceLocation(properties); }; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encode = function encode(message, writer) { + LogEntrySourceLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.file != null && message.hasOwnProperty("file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.line != null && message.hasOwnProperty("line")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); + if (message["function"] != null && message.hasOwnProperty("function")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); return writer; }; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decode = function decode(reader, length) { + LogEntrySourceLocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.file = reader.string(); + break; + case 2: + message.line = reader.int64(); + break; + case 3: + message["function"] = reader.string(); break; default: reader.skipType(tag & 7); @@ -18031,87 +18000,118 @@ }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteExclusionRequest message. + * Verifies a LogEntrySourceLocation message. * @function verify - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteExclusionRequest.verify = function verify(message) { + LogEntrySourceLocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.file != null && message.hasOwnProperty("file")) + if (!$util.isString(message.file)) + return "file: string expected"; + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) + return "line: integer|Long expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + if (!$util.isString(message["function"])) + return "function: string expected"; return null; }; /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation */ - DeleteExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + LogEntrySourceLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) return object; - var message = new $root.google.logging.v2.DeleteExclusionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.logging.v2.LogEntrySourceLocation(); + if (object.file != null) + message.file = String(object.file); + if (object.line != null) + if ($util.Long) + (message.line = $util.Long.fromValue(object.line)).unsigned = false; + else if (typeof object.line === "string") + message.line = parseInt(object.line, 10); + else if (typeof object.line === "number") + message.line = object.line; + else if (typeof object.line === "object") + message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); + if (object["function"] != null) + message["function"] = String(object["function"]); return message; }; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteExclusionRequest.toObject = function toObject(message, options) { + LogEntrySourceLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.file = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.line = options.longs === String ? "0" : 0; + object["function"] = ""; + } + if (message.file != null && message.hasOwnProperty("file")) + object.file = message.file; + if (message.line != null && message.hasOwnProperty("line")) + if (typeof message.line === "number") + object.line = options.longs === String ? String(message.line) : message.line; + else + object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = message["function"]; return object; }; /** - * Converts this DeleteExclusionRequest to JSON. + * Converts this LogEntrySourceLocation to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @instance * @returns {Object.} JSON object */ - DeleteExclusionRequest.prototype.toJSON = function toJSON() { + LogEntrySourceLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteExclusionRequest; + return LogEntrySourceLocation; })(); v2.MetricsServiceV2 = (function() { @@ -20634,30 +20634,26 @@ */ var api = {}; - api.MonitoredResourceDescriptor = (function() { + api.Http = (function() { /** - * Properties of a MonitoredResourceDescriptor. + * Properties of a Http. * @memberof google.api - * @interface IMonitoredResourceDescriptor - * @property {string|null} [name] MonitoredResourceDescriptor name - * @property {string|null} [type] MonitoredResourceDescriptor type - * @property {string|null} [displayName] MonitoredResourceDescriptor displayName - * @property {string|null} [description] MonitoredResourceDescriptor description - * @property {Array.|null} [labels] MonitoredResourceDescriptor labels - * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a MonitoredResourceDescriptor. - * @implements IMonitoredResourceDescriptor + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function MonitoredResourceDescriptor(properties) { - this.labels = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20665,143 +20661,91 @@ } /** - * MonitoredResourceDescriptor name. - * @member {string} name - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.name = ""; - - /** - * MonitoredResourceDescriptor type. - * @member {string} type - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.type = ""; - - /** - * MonitoredResourceDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.displayName = ""; - - /** - * MonitoredResourceDescriptor description. - * @member {string} description - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.description = ""; - - /** - * MonitoredResourceDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MonitoredResourceDescriptor + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + Http.prototype.rules = $util.emptyArray; /** - * MonitoredResourceDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MonitoredResourceDescriptor + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - MonitoredResourceDescriptor.prototype.launchStage = 0; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - MonitoredResourceDescriptor.create = function create(properties) { - return new MonitoredResourceDescriptor(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; case 1: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 7: - message.launchStage = reader.int32(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -20812,296 +20756,353 @@ }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a Http message. * @function verify - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceDescriptor.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); if (error) - return "labels." + error; + return "rules." + error; } } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.Http} Http */ - MonitoredResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceDescriptor) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.MonitoredResourceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); } } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceDescriptor.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.labels = []; - if (options.defaults) { - object.type = ""; - object.displayName = ""; - object.description = ""; - object.name = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this MonitoredResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.MonitoredResourceDescriptor + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule * @instance - * @returns {Object.} JSON object */ - MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + HttpRule.prototype["delete"] = ""; - return MonitoredResourceDescriptor; - })(); + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; - api.MonitoredResource = (function() { + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; /** - * Properties of a MonitoredResource. - * @memberof google.api - * @interface IMonitoredResource - * @property {string|null} [type] MonitoredResource type - * @property {Object.|null} [labels] MonitoredResource labels + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance */ + HttpRule.prototype.body = ""; /** - * Constructs a new MonitoredResource. - * @memberof google.api - * @classdesc Represents a MonitoredResource. - * @implements IMonitoredResource - * @constructor - * @param {google.api.IMonitoredResource=} [properties] Properties to set + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance */ - function MonitoredResource(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + HttpRule.prototype.responseBody = ""; /** - * MonitoredResource type. - * @member {string} type - * @memberof google.api.MonitoredResource + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - MonitoredResource.prototype.type = ""; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * MonitoredResource labels. - * @member {Object.} labels - * @memberof google.api.MonitoredResource + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - MonitoredResource.prototype.labels = $util.emptyObject; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResource=} [properties] Properties to set - * @returns {google.api.MonitoredResource} MonitoredResource instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - MonitoredResource.create = function create(properties) { - return new MonitoredResource(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -21112,132 +21113,240 @@ }; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResource message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResource.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } } return null; }; /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.HttpRule} HttpRule */ - MonitoredResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResource) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.MonitoredResource(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.MonitoredResource.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @static - * @param {google.api.MonitoredResource} message MonitoredResource + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResource.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this MonitoredResource to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.MonitoredResource + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - MonitoredResource.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResource; + return HttpRule; })(); - api.MonitoredResourceMetadata = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a MonitoredResourceMetadata. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IMonitoredResourceMetadata - * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels - * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a MonitoredResourceMetadata. - * @implements IMonitoredResourceMetadata + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function MonitoredResourceMetadata(properties) { - this.userLabels = {}; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21245,94 +21354,88 @@ } /** - * MonitoredResourceMetadata systemLabels. - * @member {google.protobuf.IStruct|null|undefined} systemLabels - * @memberof google.api.MonitoredResourceMetadata + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - MonitoredResourceMetadata.prototype.systemLabels = null; + CustomHttpPattern.prototype.kind = ""; /** - * MonitoredResourceMetadata userLabels. - * @member {Object.} userLabels - * @memberof google.api.MonitoredResourceMetadata + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - MonitoredResourceMetadata.create = function create(properties) { - return new MonitoredResourceMetadata(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && message.hasOwnProperty("userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.kind = reader.string(); break; case 2: - reader.skip().pos++; - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - key = reader.string(); - reader.pos++; - message.userLabels[key] = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -21343,137 +21446,122 @@ }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoredResourceMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { - var error = $root.google.protobuf.Struct.verify(message.systemLabels); - if (error) - return "systemLabels." + error; - } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; - } + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - MonitoredResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceMetadata) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.MonitoredResourceMetadata(); - if (object.systemLabels != null) { - if (typeof object.systemLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); - message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); - } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); - } + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceMetadata.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) - object.systemLabels = null; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + if (options.defaults) { + object.kind = ""; + object.path = ""; } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - MonitoredResourceMetadata.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResourceMetadata; + return CustomHttpPattern; })(); - api.LabelDescriptor = (function() { + api.MonitoredResourceDescriptor = (function() { /** - * Properties of a LabelDescriptor. + * Properties of a MonitoredResourceDescriptor. * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage */ /** - * Constructs a new LabelDescriptor. + * Constructs a new MonitoredResourceDescriptor. * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set */ - function LabelDescriptor(properties) { + function MonitoredResourceDescriptor(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21481,102 +21569,144 @@ } /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - LabelDescriptor.prototype.key = ""; + MonitoredResourceDescriptor.prototype.name = ""; /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - LabelDescriptor.prototype.valueType = 0; + MonitoredResourceDescriptor.prototype.type = ""; /** - * LabelDescriptor description. + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.displayName = ""; + + /** + * MonitoredResourceDescriptor description. * @member {string} description - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - LabelDescriptor.prototype.description = ""; + MonitoredResourceDescriptor.prototype.description = ""; /** - * Creates a new LabelDescriptor instance using the specified properties. + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); }; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encode = function encode(message, writer) { + MonitoredResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && message.hasOwnProperty("key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && message.hasOwnProperty("valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); if (message.description != null && message.hasOwnProperty("description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + MonitoredResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; case 1: - message.key = reader.string(); + message.type = reader.string(); break; case 2: - message.valueType = reader.int32(); + message.displayName = reader.string(); break; case 3: message.description = reader.string(); break; + case 4: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 7: + message.launchStage = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -21586,182 +21716,201 @@ }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LabelDescriptor message. + * Verifies a MonitoredResourceDescriptor message. * @function verify - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LabelDescriptor.verify = function verify(message) { + MonitoredResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { default: - return "valueType: enum value expected"; + return "launchStage: enum value expected"; case 0: case 1: case 2: + case 3: + case 4: + case 5: break; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; return null; }; /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - case "STRING": + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": case 0: - message.valueType = 0; + message.launchStage = 0; break; - case "BOOL": + case "EARLY_ACCESS": case 1: - message.valueType = 1; + message.launchStage = 1; break; - case "INT64": + case "ALPHA": case 2: - message.valueType = 2; + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; break; } - if (object.description != null) - message.description = String(object.description); return message; }; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LabelDescriptor.toObject = function toObject(message, options) { + MonitoredResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.labels = []; if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; + object.type = ""; + object.displayName = ""; object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this LabelDescriptor to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.LabelDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @instance * @returns {Object.} JSON object */ - LabelDescriptor.prototype.toJSON = function toJSON() { + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {string} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); - - return LabelDescriptor; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {string} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; + return MonitoredResourceDescriptor; })(); - api.Http = (function() { + api.MonitoredResource = (function() { /** - * Properties of a Http. + * Properties of a MonitoredResource. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels */ /** - * Constructs a new Http. + * Constructs a new MonitoredResource. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IMonitoredResource=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function MonitoredResource(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21769,91 +21918,94 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource * @instance */ - Http.prototype.rules = $util.emptyArray; + MonitoredResource.prototype.type = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + MonitoredResource.prototype.labels = $util.emptyObject; /** - * Creates a new Http instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance */ - Http.create = function create(properties) { - return new Http(properties); + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + MonitoredResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + MonitoredResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -21864,143 +22016,132 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a MonitoredResource message. * @function verify - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + MonitoredResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResource} MonitoredResource */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @static - * @param {google.api.Http} message Http + * @param {google.api.MonitoredResource} message MonitoredResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + MonitoredResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this Http to JSON. + * Converts this MonitoredResource to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.MonitoredResource * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + MonitoredResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return MonitoredResource; })(); - api.HttpRule = (function() { + api.MonitoredResourceMetadata = (function() { /** - * Properties of a HttpRule. + * Properties of a MonitoredResourceMetadata. * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels */ /** - * Constructs a new HttpRule. + * Constructs a new MonitoredResourceMetadata. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22008,209 +22149,94 @@ } /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; - - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = ""; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + MonitoredResourceMetadata.prototype.systemLabels = null; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + MonitoredResourceMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -22221,240 +22247,137 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a MonitoredResourceMetadata message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + MonitoredResourceMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + MonitoredResourceMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResourceMetadata * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return MonitoredResourceMetadata; })(); - api.CustomHttpPattern = (function() { + api.LabelDescriptor = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a LabelDescriptor. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new LabelDescriptor. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.ILabelDescriptor=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function LabelDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22462,88 +22385,101 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor * @instance */ - CustomHttpPattern.prototype.kind = ""; + LabelDescriptor.prototype.key = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor * @instance */ - CustomHttpPattern.prototype.path = ""; + LabelDescriptor.prototype.valueType = 0; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.description = ""; + + /** + * Creates a new LabelDescriptor instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + LabelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.key != null && message.hasOwnProperty("key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && message.hasOwnProperty("valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + LabelDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + message.key = reader.string(); break; case 2: - message.path = reader.string(); + message.valueType = reader.int32(); + break; + case 3: + message.description = reader.string(); break; default: reader.skipType(tag & 7); @@ -22554,96 +22490,160 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a LabelDescriptor message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + LabelDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.LabelDescriptor} LabelDescriptor */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + } + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.LabelDescriptor} message LabelDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + LabelDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this LabelDescriptor to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.LabelDescriptor * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + LabelDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {string} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; })(); api.Distribution = (function() { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 59be91a5800..26f27ffc3c4 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -13,66 +13,39 @@ "optimize_for": "SPEED" }, "nested": { - "Struct": { + "Duration": { "fields": { - "fields": { - "keyType": "string", - "type": "Value", + "seconds": { + "type": "int64", "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 } } }, - "Value": { - "oneofs": { - "kind": { - "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, + "Empty": { + "fields": {} + }, + "FieldMask": { "fields": { - "nullValue": { - "type": "NullValue", - "id": 1 - }, - "numberValue": { - "type": "double", - "id": 2 - }, - "stringValue": { + "paths": { + "rule": "repeated", "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "structValue": { - "type": "Struct", - "id": 5 - }, - "listValue": { - "type": "ListValue", - "id": 6 + "id": 1 } } }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { + "Timestamp": { "fields": { - "values": { - "rule": "repeated", - "type": "Value", + "seconds": { + "type": "int64", "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 } } }, @@ -956,51 +929,78 @@ } } }, - "Duration": { + "Struct": { "fields": { - "seconds": { - "type": "int64", + "fields": { + "keyType": "string", + "type": "Value", "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 } } }, - "Any": { + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, "fields": { - "type_url": { - "type": "string", + "nullValue": { + "type": "NullValue", "id": 1 }, - "value": { - "type": "bytes", + "numberValue": { + "type": "double", "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 } } }, - "Timestamp": { + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { "fields": { - "seconds": { - "type": "int64", + "values": { + "rule": "repeated", + "type": "Value", "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 } } }, - "Empty": { - "fields": {} - }, - "FieldMask": { + "Any": { "fields": { - "paths": { - "rule": "repeated", + "type_url": { "type": "string", "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 } } } @@ -1019,141 +1019,205 @@ "php_namespace": "Google\\Cloud\\Logging\\V2" }, "nested": { - "LoggingServiceV2": { + "ConfigServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" }, "methods": { - "DeleteLog": { - "requestType": "DeleteLogRequest", + "ListSinks": { + "requestType": "ListSinksRequest", + "responseType": "ListSinksResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/sinks", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks" + } + }, + "GetSink": { + "requestType": "GetSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "CreateSink": { + "requestType": "CreateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).post": "/v2/{parent=*/*}/sinks", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.http).additional_bindings.body": "sink" + } + }, + "UpdateSink": { + "requestType": "UpdateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }, + "DeleteSink": { + "requestType": "DeleteSinkRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", - "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}" + "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" } }, - "WriteLogEntries": { - "requestType": "WriteLogEntriesRequest", - "responseType": "WriteLogEntriesResponse", + "ListExclusions": { + "requestType": "ListExclusionsRequest", + "responseType": "ListExclusionsResponse", "options": { - "(google.api.http).post": "/v2/entries:write", - "(google.api.http).body": "*" + "(google.api.http).get": "/v2/{parent=*/*}/exclusions", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions" } }, - "ListLogEntries": { - "requestType": "ListLogEntriesRequest", - "responseType": "ListLogEntriesResponse", + "GetExclusion": { + "requestType": "GetExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).post": "/v2/entries:list", - "(google.api.http).body": "*" + "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}" } }, - "ListMonitoredResourceDescriptors": { - "requestType": "ListMonitoredResourceDescriptorsRequest", - "responseType": "ListMonitoredResourceDescriptorsResponse", + "CreateExclusion": { + "requestType": "CreateExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).get": "/v2/monitoredResourceDescriptors" + "(google.api.http).post": "/v2/{parent=*/*}/exclusions", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.http).additional_bindings.body": "exclusion" } }, - "ListLogs": { - "requestType": "ListLogsRequest", - "responseType": "ListLogsResponse", + "UpdateExclusion": { + "requestType": "UpdateExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.http).get": "/v2/{parent=*/*}/logs", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs" + "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.http).additional_bindings.body": "exclusion" + } + }, + "DeleteExclusion": { + "requestType": "DeleteExclusionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}" } } } }, - "DeleteLogRequest": { + "LogSink": { + "oneofs": { + "options": { + "oneof": [ + "bigqueryOptions" + ] + } + }, "fields": { - "logName": { - "type": "string", - "id": 1 - } - } - }, - "WriteLogEntriesRequest": { - "fields": { - "logName": { + "name": { "type": "string", "id": 1 }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 2 - }, - "labels": { - "keyType": "string", + "destination": { "type": "string", "id": 3 }, - "entries": { - "rule": "repeated", - "type": "LogEntry", - "id": 4 - }, - "partialSuccess": { - "type": "bool", + "filter": { + "type": "string", "id": 5 }, - "dryRun": { + "outputVersionFormat": { + "type": "VersionFormat", + "id": 6, + "options": { + "deprecated": true + } + }, + "writerIdentity": { + "type": "string", + "id": 8 + }, + "includeChildren": { "type": "bool", - "id": 6 + "id": 9 + }, + "bigqueryOptions": { + "type": "BigQueryOptions", + "id": 12 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 13 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "deprecated": true + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "deprecated": true + } + } + }, + "nested": { + "VersionFormat": { + "values": { + "VERSION_FORMAT_UNSPECIFIED": 0, + "V2": 1, + "V1": 2 + } } } }, - "WriteLogEntriesResponse": { - "fields": {} - }, - "WriteLogEntriesPartialErrors": { + "BigQueryOptions": { "fields": { - "logEntryErrors": { - "keyType": "int32", - "type": "google.rpc.Status", + "usePartitionedTables": { + "type": "bool", "id": 1 } } }, - "ListLogEntriesRequest": { + "ListSinksRequest": { "fields": { - "projectIds": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "resourceNames": { - "rule": "repeated", + "parent": { "type": "string", - "id": 8 + "id": 1 }, - "filter": { + "pageToken": { "type": "string", "id": 2 }, - "orderBy": { - "type": "string", - "id": 3 - }, "pageSize": { "type": "int32", - "id": 4 - }, - "pageToken": { - "type": "string", - "id": 5 + "id": 3 } } }, - "ListLogEntriesResponse": { + "ListSinksResponse": { "fields": { - "entries": { + "sinks": { "rule": "repeated", - "type": "LogEntry", + "type": "LogSink", "id": 1 }, "nextPageToken": { @@ -1162,380 +1226,294 @@ } } }, - "ListMonitoredResourceDescriptorsRequest": { + "GetSinkRequest": { "fields": { - "pageSize": { - "type": "int32", - "id": 1 - }, - "pageToken": { + "sinkName": { "type": "string", - "id": 2 + "id": 1 } } }, - "ListMonitoredResourceDescriptorsResponse": { + "CreateSinkRequest": { "fields": { - "resourceDescriptors": { - "rule": "repeated", - "type": "google.api.MonitoredResourceDescriptor", + "parent": { + "type": "string", "id": 1 }, - "nextPageToken": { - "type": "string", + "sink": { + "type": "LogSink", "id": 2 + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3 } } }, - "ListLogsRequest": { + "UpdateSinkRequest": { "fields": { - "parent": { + "sinkName": { "type": "string", "id": 1 }, - "pageSize": { - "type": "int32", + "sink": { + "type": "LogSink", "id": 2 }, - "pageToken": { - "type": "string", + "uniqueWriterIdentity": { + "type": "bool", "id": 3 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4 } } }, - "ListLogsResponse": { + "DeleteSinkRequest": { "fields": { - "logNames": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "nextPageToken": { + "sinkName": { "type": "string", - "id": 2 + "id": 1 } } }, - "LogEntry": { - "oneofs": { - "payload": { - "oneof": [ - "protoPayload", - "textPayload", - "jsonPayload" - ] - } - }, + "LogExclusion": { "fields": { - "logName": { + "name": { "type": "string", - "id": 12 - }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 8 + "id": 1 }, - "protoPayload": { - "type": "google.protobuf.Any", + "description": { + "type": "string", "id": 2 }, - "textPayload": { + "filter": { "type": "string", "id": 3 }, - "jsonPayload": { - "type": "google.protobuf.Struct", - "id": 6 + "disabled": { + "type": "bool", + "id": 4 }, - "timestamp": { + "createTime": { "type": "google.protobuf.Timestamp", - "id": 9 + "id": 5 }, - "receiveTimestamp": { + "updateTime": { "type": "google.protobuf.Timestamp", - "id": 24 - }, - "severity": { - "type": "google.logging.type.LogSeverity", - "id": 10 - }, - "insertId": { + "id": 6 + } + } + }, + "ListExclusionsRequest": { + "fields": { + "parent": { "type": "string", - "id": 4 - }, - "httpRequest": { - "type": "google.logging.type.HttpRequest", - "id": 7 + "id": 1 }, - "labels": { - "keyType": "string", + "pageToken": { "type": "string", - "id": 11 - }, - "metadata": { - "type": "google.api.MonitoredResourceMetadata", - "id": 25, - "options": { - "deprecated": true - } + "id": 2 }, - "operation": { - "type": "LogEntryOperation", - "id": 15 + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListExclusionsResponse": { + "fields": { + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", + "id": 1 }, - "trace": { + "nextPageToken": { "type": "string", - "id": 22 - }, - "spanId": { + "id": 2 + } + } + }, + "GetExclusionRequest": { + "fields": { + "name": { "type": "string", - "id": 27 - }, - "traceSampled": { - "type": "bool", - "id": 30 - }, - "sourceLocation": { - "type": "LogEntrySourceLocation", - "id": 23 + "id": 1 } } }, - "LogEntryOperation": { + "CreateExclusionRequest": { "fields": { - "id": { + "parent": { "type": "string", "id": 1 }, - "producer": { - "type": "string", + "exclusion": { + "type": "LogExclusion", "id": 2 - }, - "first": { - "type": "bool", - "id": 3 - }, - "last": { - "type": "bool", - "id": 4 } } }, - "LogEntrySourceLocation": { + "UpdateExclusionRequest": { "fields": { - "file": { + "name": { "type": "string", "id": 1 }, - "line": { - "type": "int64", + "exclusion": { + "type": "LogExclusion", "id": 2 }, - "function": { - "type": "string", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 3 } } }, - "ConfigServiceV2": { + "DeleteExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "LoggingServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" }, "methods": { - "ListSinks": { - "requestType": "ListSinksRequest", - "responseType": "ListSinksResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/sinks", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks" - } - }, - "GetSink": { - "requestType": "GetSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "CreateSink": { - "requestType": "CreateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).post": "/v2/{parent=*/*}/sinks", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", - "(google.api.http).additional_bindings.body": "sink" - } - }, - "UpdateSink": { - "requestType": "UpdateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.http).additional_bindings.body": "sink", - "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "DeleteSink": { - "requestType": "DeleteSinkRequest", + "DeleteLog": { + "requestType": "DeleteLogRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "ListExclusions": { - "requestType": "ListExclusionsRequest", - "responseType": "ListExclusionsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/exclusions", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions" + "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}" } }, - "GetExclusion": { - "requestType": "GetExclusionRequest", - "responseType": "LogExclusion", + "WriteLogEntries": { + "requestType": "WriteLogEntriesRequest", + "responseType": "WriteLogEntriesResponse", "options": { - "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}" + "(google.api.http).post": "/v2/entries:write", + "(google.api.http).body": "*" } }, - "CreateExclusion": { - "requestType": "CreateExclusionRequest", - "responseType": "LogExclusion", + "ListLogEntries": { + "requestType": "ListLogEntriesRequest", + "responseType": "ListLogEntriesResponse", "options": { - "(google.api.http).post": "/v2/{parent=*/*}/exclusions", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", - "(google.api.http).additional_bindings.body": "exclusion" + "(google.api.http).post": "/v2/entries:list", + "(google.api.http).body": "*" } }, - "UpdateExclusion": { - "requestType": "UpdateExclusionRequest", - "responseType": "LogExclusion", + "ListMonitoredResourceDescriptors": { + "requestType": "ListMonitoredResourceDescriptorsRequest", + "responseType": "ListMonitoredResourceDescriptorsResponse", "options": { - "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.http).additional_bindings.body": "exclusion" + "(google.api.http).get": "/v2/monitoredResourceDescriptors" } }, - "DeleteExclusion": { - "requestType": "DeleteExclusionRequest", - "responseType": "google.protobuf.Empty", + "ListLogs": { + "requestType": "ListLogsRequest", + "responseType": "ListLogsResponse", "options": { - "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}" + "(google.api.http).get": "/v2/{parent=*/*}/logs", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs" } } } }, - "LogSink": { - "oneofs": { - "options": { - "oneof": [ - "bigqueryOptions" - ] + "DeleteLogRequest": { + "fields": { + "logName": { + "type": "string", + "id": 1 } - }, + } + }, + "WriteLogEntriesRequest": { "fields": { - "name": { + "logName": { "type": "string", "id": 1 }, - "destination": { - "type": "string", - "id": 3 + "resource": { + "type": "google.api.MonitoredResource", + "id": 2 }, - "filter": { + "labels": { + "keyType": "string", "type": "string", - "id": 5 - }, - "outputVersionFormat": { - "type": "VersionFormat", - "id": 6, - "options": { - "deprecated": true - } + "id": 3 }, - "writerIdentity": { - "type": "string", - "id": 8 + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 4 }, - "includeChildren": { + "partialSuccess": { "type": "bool", - "id": 9 - }, - "bigqueryOptions": { - "type": "BigQueryOptions", - "id": 12 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 13 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 14 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "deprecated": true - } + "id": 5 }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "deprecated": true - } - } - }, - "nested": { - "VersionFormat": { - "values": { - "VERSION_FORMAT_UNSPECIFIED": 0, - "V2": 1, - "V1": 2 - } + "dryRun": { + "type": "bool", + "id": 6 } } }, - "BigQueryOptions": { + "WriteLogEntriesResponse": { + "fields": {} + }, + "WriteLogEntriesPartialErrors": { "fields": { - "usePartitionedTables": { - "type": "bool", + "logEntryErrors": { + "keyType": "int32", + "type": "google.rpc.Status", "id": 1 } } }, - "ListSinksRequest": { + "ListLogEntriesRequest": { "fields": { - "parent": { + "projectIds": { + "rule": "repeated", "type": "string", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, - "pageToken": { + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "filter": { "type": "string", "id": 2 }, + "orderBy": { + "type": "string", + "id": 3 + }, "pageSize": { "type": "int32", - "id": 3 + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 5 } } }, - "ListSinksResponse": { + "ListLogEntriesResponse": { "fields": { - "sinks": { + "entries": { "rule": "repeated", - "type": "LogSink", + "type": "LogEntry", "id": 1 }, "nextPageToken": { @@ -1544,156 +1522,178 @@ } } }, - "GetSinkRequest": { + "ListMonitoredResourceDescriptorsRequest": { "fields": { - "sinkName": { - "type": "string", + "pageSize": { + "type": "int32", "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 } } }, - "CreateSinkRequest": { + "ListMonitoredResourceDescriptorsResponse": { "fields": { - "parent": { - "type": "string", + "resourceDescriptors": { + "rule": "repeated", + "type": "google.api.MonitoredResourceDescriptor", "id": 1 }, - "sink": { - "type": "LogSink", + "nextPageToken": { + "type": "string", "id": 2 - }, - "uniqueWriterIdentity": { - "type": "bool", - "id": 3 } } }, - "UpdateSinkRequest": { + "ListLogsRequest": { "fields": { - "sinkName": { + "parent": { "type": "string", "id": 1 }, - "sink": { - "type": "LogSink", + "pageSize": { + "type": "int32", "id": 2 }, - "uniqueWriterIdentity": { - "type": "bool", + "pageToken": { + "type": "string", "id": 3 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 4 } } }, - "DeleteSinkRequest": { + "ListLogsResponse": { "fields": { - "sinkName": { + "logNames": { + "rule": "repeated", "type": "string", - "id": 1 + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "LogExclusion": { + "LogEntry": { + "oneofs": { + "payload": { + "oneof": [ + "protoPayload", + "textPayload", + "jsonPayload" + ] + } + }, "fields": { - "name": { + "logName": { "type": "string", - "id": 1 + "id": 12 }, - "description": { - "type": "string", + "resource": { + "type": "google.api.MonitoredResource", + "id": 8 + }, + "protoPayload": { + "type": "google.protobuf.Any", "id": 2 }, - "filter": { + "textPayload": { "type": "string", "id": 3 }, - "disabled": { - "type": "bool", - "id": 4 + "jsonPayload": { + "type": "google.protobuf.Struct", + "id": 6 }, - "createTime": { + "timestamp": { "type": "google.protobuf.Timestamp", - "id": 5 + "id": 9 }, - "updateTime": { + "receiveTimestamp": { "type": "google.protobuf.Timestamp", - "id": 6 - } - } - }, - "ListExclusionsRequest": { - "fields": { - "parent": { + "id": 24 + }, + "severity": { + "type": "google.logging.type.LogSeverity", + "id": 10 + }, + "insertId": { + "type": "string", + "id": 4 + }, + "httpRequest": { + "type": "google.logging.type.HttpRequest", + "id": 7 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 11 + }, + "metadata": { + "type": "google.api.MonitoredResourceMetadata", + "id": 25, + "options": { + "deprecated": true + } + }, + "operation": { + "type": "LogEntryOperation", + "id": 15 + }, + "trace": { "type": "string", - "id": 1 + "id": 22 }, - "pageToken": { + "spanId": { "type": "string", - "id": 2 + "id": 27 }, - "pageSize": { - "type": "int32", - "id": 3 - } - } - }, - "ListExclusionsResponse": { - "fields": { - "exclusions": { - "rule": "repeated", - "type": "LogExclusion", - "id": 1 + "traceSampled": { + "type": "bool", + "id": 30 }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetExclusionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 + "sourceLocation": { + "type": "LogEntrySourceLocation", + "id": 23 } } }, - "CreateExclusionRequest": { + "LogEntryOperation": { "fields": { - "parent": { + "id": { "type": "string", "id": 1 }, - "exclusion": { - "type": "LogExclusion", + "producer": { + "type": "string", "id": 2 + }, + "first": { + "type": "bool", + "id": 3 + }, + "last": { + "type": "bool", + "id": 4 } } }, - "UpdateExclusionRequest": { + "LogEntrySourceLocation": { "fields": { - "name": { + "file": { "type": "string", "id": 1 }, - "exclusion": { - "type": "LogExclusion", + "line": { + "type": "int64", "id": 2 }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "DeleteExclusionRequest": { - "fields": { - "name": { + "function": { "type": "string", - "id": 1 + "id": 3 } } }, @@ -1962,104 +1962,14 @@ }, "api": { "options": { - "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", "java_multiple_files": true, "java_outer_classname": "MetricProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI" + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true }, "nested": { - "MonitoredResourceDescriptor": { - "fields": { - "name": { - "type": "string", - "id": 5 - }, - "type": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", - "id": 4 - }, - "launchStage": { - "type": "LaunchStage", - "id": 7 - } - } - }, - "MonitoredResource": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "MonitoredResourceMetadata": { - "fields": { - "systemLabels": { - "type": "google.protobuf.Struct", - "id": 1 - }, - "userLabels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "LabelDescriptor": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "valueType": { - "type": "ValueType", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - }, - "nested": { - "ValueType": { - "values": { - "STRING": 0, - "BOOL": 1, - "INT64": 2 - } - } - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, "http": { "type": "HttpRule", "id": 72295728, @@ -2163,6 +2073,96 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "MonitoredResourceDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "type": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 4 + }, + "launchStage": { + "type": "LaunchStage", + "id": 7 + } + } + }, + "MonitoredResource": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "MonitoredResourceMetadata": { + "fields": { + "systemLabels": { + "type": "google.protobuf.Struct", + "id": 1 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "ValueType", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { + "values": { + "STRING": 0, + "BOOL": 1, + "INT64": 2 + } + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, "Distribution": { "fields": { "count": { diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index 45718f18a63..019ad44e121 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -56,49 +56,22 @@ * The number should be among the values of [ValueType]{@link google.api.ValueType} * * @property {string} unit - * The unit in which the metric value is reported. It is only applicable - * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The - * supported units are a subset of [The Unified Code for Units of - * Measure](http://unitsofmeasure.org/ucum.html) standard: - * - * **Basic units (UNIT)** - * - * * `bit` bit - * * `By` byte - * * `s` second - * * `min` minute - * * `h` hour - * * `d` day - * - * **Prefixes (PREFIX)** - * - * * `k` kilo (10**3) - * * `M` mega (10**6) - * * `G` giga (10**9) - * * `T` tera (10**12) - * * `P` peta (10**15) - * * `E` exa (10**18) - * * `Z` zetta (10**21) - * * `Y` yotta (10**24) - * * `m` milli (10**-3) - * * `u` micro (10**-6) - * * `n` nano (10**-9) - * * `p` pico (10**-12) - * * `f` femto (10**-15) - * * `a` atto (10**-18) - * * `z` zepto (10**-21) - * * `y` yocto (10**-24) - * * `Ki` kibi (2**10) - * * `Mi` mebi (2**20) - * * `Gi` gibi (2**30) - * * `Ti` tebi (2**40) + * * `Ki` kibi (2^10) + * * `Mi` mebi (2^20) + * * `Gi` gibi (2^30) + * * `Ti` tebi (2^40) + * * `Pi` pebi (2^50) * * **Grammar** * * The grammar also includes these connectors: * - * * `/` division (as an infix operator, e.g. `1/s`). - * * `.` multiplication (as an infix operator, e.g. `GBy.d`) + * * `/` division or ratio (as an infix operator). For examples, + * `kBy/{email}` or `MiBy/10ms` (although you should almost never + * have `/s` in a metric `unit`; rates should always be computed at + * query time from the underlying cumulative or delta value). + * * `.` multiplication or composition (as an infix operator). For + * examples, `GBy.d` or `k{watt}.h`. * * The grammar for a unit is as follows: * @@ -113,14 +86,25 @@ * * Notes: * - * * `Annotation` is just a comment if it follows a `UNIT` and is - * equivalent to `1` if it is used alone. For examples, - * `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. + * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation + * is used alone, then the unit is equivalent to `1`. For examples, + * `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * * `NAME` is a sequence of non-blank printable ASCII characters not - * containing '{' or '}'. - * * `1` represents dimensionless value 1, such as in `1/s`. - * * `%` represents dimensionless value 1/100, and annotates values giving - * a percentage. + * containing `{` or `}`. + * * `1` represents a unitary [dimensionless + * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such + * as in `1/s`. It is typically used when none of the basic units are + * appropriate. For example, "new users per day" can be represented as + * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new + * users). Alternatively, "thousands of page views per day" would be + * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric + * value of `5.3` would mean "5300 page views per day"). + * * `%` represents dimensionless value of 1/100, and annotates values giving + * a percentage (so the metric values are typically in the range of 0..100, + * and a metric value `3` means "3 percent"). + * * `10^2.%` indicates a metric contains a ratio, typically in the range + * 0..1, that will be multiplied by 100 and displayed as a percentage + * (so a metric value `0.03` means "3 percent"). * * @property {string} description * A detailed description of the metric, which can be used in documentation. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 3013f8f189a..812d1a1d69d 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-02T11:11:13.204938Z", + "updateTime": "2019-12-04T12:19:59.746778Z", "sources": [ { "generator": { "name": "artman", - "version": "0.41.0", - "dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9" + "version": "0.42.1", + "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aac770126e2def40dcc387f50e8007b21c869e58", - "internalRef": "278016738" + "sha": "da0edeeef953b05eb1524d514d2e9842ac2df0fd", + "internalRef": "283614497" } }, { From fa510ecb8a05d54cac383d28670385fde15a44d6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2019 16:58:46 -0800 Subject: [PATCH 0515/1029] chore: release 6.0.0 (#652) --- handwritten/logging/CHANGELOG.md | 19 +++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 76e4a9c394c..4804dabbeb2 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,25 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [6.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.5...v6.0.0) (2019-12-06) + + +### ⚠ BREAKING CHANGES + +* properly depend on Long in protos (#640) + +### Features + +* **samples:** add example of including httpRequest metadata in log ([#650](https://www.github.com/googleapis/nodejs-logging/issues/650)) ([e6d293e](https://www.github.com/googleapis/nodejs-logging/commit/e6d293eab1294d4e3434dceade1f45b53060767b)) + + +### Bug Fixes + +* properly depend on Long in protos ([#640](https://www.github.com/googleapis/nodejs-logging/issues/640)) ([e22b695](https://www.github.com/googleapis/nodejs-logging/commit/e22b6959f81155989f7507c9450b5a93506bc83a)) +* **deps:** TypeScript 3.7.0 causes breaking change in typings ([#654](https://www.github.com/googleapis/nodejs-logging/issues/654)) ([432fe5d](https://www.github.com/googleapis/nodejs-logging/commit/432fe5d8cf19f4bd6b3e9863fb995db8e35ae8d8)) +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.19 ([#644](https://www.github.com/googleapis/nodejs-logging/issues/644)) ([3eaca43](https://www.github.com/googleapis/nodejs-logging/commit/3eaca4367263d6302c3dbd53109c7ed5dd4367d3)) +* **docs:** snippets are now replaced in jsdoc comments ([#634](https://www.github.com/googleapis/nodejs-logging/issues/634)) ([687fc81](https://www.github.com/googleapis/nodejs-logging/commit/687fc815c572adbab2611d3f08f7259bb91de8e6)) + ### [5.5.5](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.4...v5.5.5) (2019-11-08) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cc3c9679c31..a5347e7f32f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "5.5.5", + "version": "6.0.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From fad06f6eec2535794a908e4a4bac2365817c6c78 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 26 Dec 2019 16:33:33 -0500 Subject: [PATCH 0516/1029] docs: update jsdoc license/samples-README (#661) --- handwritten/logging/.jsdoc.js | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index ddab7400ad6..593c4fc7545 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -1,18 +1,17 @@ -/*! - * Copyright 2018 Google LLC. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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'; From 38922e44795f5eeee60f8b6416bf50b79156b3bf Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 27 Dec 2019 18:29:18 +0200 Subject: [PATCH 0517/1029] chore(deps): update dependency sinon to v8 (#663) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a5347e7f32f..5065cf52ad7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -105,7 +105,7 @@ "power-assert": "^1.6.0", "prettier": "^1.15.1", "proxyquire": "^2.1.0", - "sinon": "^7.2.5", + "sinon": "^8.0.0", "typescript": "3.6.4", "uuid": "^3.3.2" } From ce792c20a8fd80837376112ab5adc213645c19fa Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 27 Dec 2019 11:54:35 -0800 Subject: [PATCH 0518/1029] docs: add documentation for unit --- .../src/v2/doc/google/api/doc_metric.js | 52 + handwritten/logging/synth.metadata | 2991 ++++++++++++++++- 2 files changed, 3038 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index 019ad44e121..f55ae9bf4c7 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -56,6 +56,58 @@ * The number should be among the values of [ValueType]{@link google.api.ValueType} * * @property {string} unit + * The units in which the metric value is reported. It is only applicable + * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + * defines the representation of the stored metric values. + * + * Different systems may scale the values to be more easily displayed (so a + * value of `0.02KBy` _might_ be displayed as `20By`, and a value of + * `3523KBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is + * `KBy`, then the value of the metric is always in thousands of bytes, no + * matter how it may be displayed.. + * + * If you want a custom metric to record the exact number of CPU-seconds used + * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is + * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 + * CPU-seconds, then the value is written as `12005`. + * + * Alternatively, if you want a custome metric to record data in a more + * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is + * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), + * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). + * + * The supported units are a subset of [The Unified Code for Units of + * Measure](http://unitsofmeasure.org/ucum.html) standard: + * + * **Basic units (UNIT)** + * + * * `bit` bit + * * `By` byte + * * `s` second + * * `min` minute + * * `h` hour + * * `d` day + * + * **Prefixes (PREFIX)** + * + * * `k` kilo (10^3) + * * `M` mega (10^6) + * * `G` giga (10^9) + * * `T` tera (10^12) + * * `P` peta (10^15) + * * `E` exa (10^18) + * * `Z` zetta (10^21) + * * `Y` yotta (10^24) + * + * * `m` milli (10^-3) + * * `u` micro (10^-6) + * * `n` nano (10^-9) + * * `p` pico (10^-12) + * * `f` femto (10^-15) + * * `a` atto (10^-18) + * * `z` zepto (10^-21) + * * `y` yocto (10^-24) + * * * `Ki` kibi (2^10) * * `Mi` mebi (2^20) * * `Gi` gibi (2^30) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 812d1a1d69d..fb9276a1eb2 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-12-04T12:19:59.746778Z", + "updateTime": "2019-12-20T12:20:58.976639Z", "sources": [ { "generator": { "name": "artman", - "version": "0.42.1", - "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" + "version": "0.42.3", + "dockerImage": "googleapis/artman@sha256:feed210b5723c6f524b52ef6d7740a030f2d1a8f7c29a71c5e5b4481ceaad7f5" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "da0edeeef953b05eb1524d514d2e9842ac2df0fd", - "internalRef": "283614497" + "sha": "50af0530730348f1e3697bf3c70261f7daaf2981", + "internalRef": "286491002" } }, { @@ -35,5 +35,2986 @@ "config": "google/logging/artman_logging.yaml" } } + ], + "newFiles": [ + { + "path": "tslint.json" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": "synth.metadata" + }, + { + "path": "package-lock.json" + }, + { + "path": ".eslintignore" + }, + { + "path": ".nycrc" + }, + { + "path": ".gitignore" + }, + { + "path": ".prettierrc" + }, + { + "path": "LICENSE" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": "README.md" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "tsconfig.json" + }, + { + "path": ".jsdoc.js" + }, + { + "path": "codecov.yaml" + }, + { + "path": "renovate.json" + }, + { + "path": ".readme-partials.yml" + }, + { + "path": ".prettierignore" + }, + { + "path": "package.json" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": "synth.py" + }, + { + "path": ".git/config" + }, + { + "path": ".git/index" + }, + { + "path": ".git/HEAD" + }, + { + "path": ".git/packed-refs" + }, + { + "path": ".git/shallow" + }, + { + "path": ".git/logs/HEAD" + }, + { + "path": ".git/logs/refs/heads/autosynth" + }, + { + "path": ".git/logs/refs/heads/master" + }, + { + "path": ".git/logs/refs/remotes/origin/HEAD" + }, + { + "path": ".git/objects/pack/pack-5f1f02729da007e35d98ce4453a70289f650be58.pack" + }, + { + "path": ".git/objects/pack/pack-5f1f02729da007e35d98ce4453a70289f650be58.idx" + }, + { + "path": ".git/refs/heads/autosynth" + }, + { + "path": ".git/refs/heads/master" + }, + { + "path": ".git/refs/tags/v6.0.0" + }, + { + "path": ".git/refs/remotes/origin/HEAD" + }, + { + "path": "__pycache__/synth.cpython-36.pyc" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": "system-test/logging.ts" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/fixtures/sample/tsconfig.json" + }, + { + "path": "system-test/fixtures/sample/package.json" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "build/system-test/install.d.ts" + }, + { + "path": "build/system-test/logging.js.map" + }, + { + "path": "build/system-test/logging.js" + }, + { + "path": "build/system-test/install.js.map" + }, + { + "path": "build/system-test/install.js" + }, + { + "path": "build/system-test/logging.d.ts" + }, + { + "path": "build/test/index.js.map" + }, + { + "path": "build/test/entry.d.ts" + }, + { + "path": "build/test/common.js" + }, + { + "path": "build/test/log.d.ts" + }, + { + "path": "build/test/metadata.js.map" + }, + { + "path": "build/test/entry.js" + }, + { + "path": "build/test/sink.js.map" + }, + { + "path": "build/test/metadata.js" + }, + { + "path": "build/test/log.js.map" + }, + { + "path": "build/test/index.js" + }, + { + "path": "build/test/log.js" + }, + { + "path": "build/test/common.js.map" + }, + { + "path": "build/test/common.d.ts" + }, + { + "path": "build/test/metadata.d.ts" + }, + { + "path": "build/test/sink.js" + }, + { + "path": "build/test/sink.d.ts" + }, + { + "path": "build/test/entry.js.map" + }, + { + "path": "build/test/gapic-v2.js" + }, + { + "path": "build/test/index.d.ts" + }, + { + "path": "build/test/middleware/test-context.d.ts" + }, + { + "path": "build/test/middleware/test-context.js.map" + }, + { + "path": "build/test/middleware/test-context.js" + }, + { + "path": "build/test/middleware/express/test-make-http-request.d.ts" + }, + { + "path": "build/test/middleware/express/test-make-http-request.js" + }, + { + "path": "build/test/middleware/express/test-make-http-request.js.map" + }, + { + "path": "build/test/middleware/express/test-make-middleware.d.ts" + }, + { + "path": "build/test/middleware/express/test-make-middleware.js.map" + }, + { + "path": "build/test/middleware/express/test-make-middleware.js" + }, + { + "path": "build/src/index.js.map" + }, + { + "path": "build/src/entry.d.ts" + }, + { + "path": "build/src/common.js" + }, + { + "path": "build/src/log.d.ts" + }, + { + "path": "build/src/metadata.js.map" + }, + { + "path": "build/src/entry.js" + }, + { + "path": "build/src/http-request.js" + }, + { + "path": "build/src/sink.js.map" + }, + { + "path": "build/src/metadata.js" + }, + { + "path": "build/src/log.js.map" + }, + { + "path": "build/src/http-request.js.map" + }, + { + "path": "build/src/http-request.d.ts" + }, + { + "path": "build/src/index.js" + }, + { + "path": "build/src/log.js" + }, + { + "path": "build/src/common.js.map" + }, + { + "path": "build/src/common.d.ts" + }, + { + "path": "build/src/metadata.d.ts" + }, + { + "path": "build/src/sink.js" + }, + { + "path": "build/src/sink.d.ts" + }, + { + "path": "build/src/entry.js.map" + }, + { + "path": "build/src/index.d.ts" + }, + { + "path": "build/src/v2/metrics_service_v2_client.js" + }, + { + "path": "build/src/v2/logging_service_v2_proto_list.json" + }, + { + "path": "build/src/v2/config_service_v2_client.js" + }, + { + "path": "build/src/v2/logging_service_v2_client.js" + }, + { + "path": "build/src/v2/metrics_service_v2_client_config.json" + }, + { + "path": "build/src/v2/index.js" + }, + { + "path": "build/src/v2/metrics_service_v2_proto_list.json" + }, + { + "path": "build/src/v2/logging_service_v2_client_config.json" + }, + { + "path": "build/src/v2/config_service_v2_proto_list.json" + }, + { + "path": "build/src/v2/config_service_v2_client_config.json" + }, + { + "path": "build/src/v2/.eslintrc.yml" + }, + { + "path": "build/src/v2/doc/google/logging/v2/doc_logging_metrics.js" + }, + { + "path": "build/src/v2/doc/google/logging/v2/doc_logging.js" + }, + { + "path": "build/src/v2/doc/google/logging/v2/doc_logging_config.js" + }, + { + "path": "build/src/v2/doc/google/logging/v2/doc_log_entry.js" + }, + { + "path": "build/src/v2/doc/google/logging/type/doc_http_request.js" + }, + { + "path": "build/src/v2/doc/google/protobuf/doc_any.js" + }, + { + "path": "build/src/v2/doc/google/protobuf/doc_empty.js" + }, + { + "path": "build/src/v2/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "build/src/v2/doc/google/protobuf/doc_duration.js" + }, + { + "path": "build/src/v2/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "build/src/v2/doc/google/protobuf/doc_struct.js" + }, + { + "path": "build/src/v2/doc/google/api/doc_label.js" + }, + { + "path": "build/src/v2/doc/google/api/doc_distribution.js" + }, + { + "path": "build/src/v2/doc/google/api/doc_monitored_resource.js" + }, + { + "path": "build/src/v2/doc/google/api/doc_metric.js" + }, + { + "path": "build/src/middleware/index.js.map" + }, + { + "path": "build/src/middleware/context.js.map" + }, + { + "path": "build/src/middleware/index.js" + }, + { + "path": "build/src/middleware/context.d.ts" + }, + { + "path": "build/src/middleware/context.js" + }, + { + "path": "build/src/middleware/index.d.ts" + }, + { + "path": "build/src/middleware/express/index.js.map" + }, + { + "path": "build/src/middleware/express/make-middleware.js" + }, + { + "path": "build/src/middleware/express/make-http-request.js.map" + }, + { + "path": "build/src/middleware/express/make-middleware.js.map" + }, + { + "path": "build/src/middleware/express/make-middleware.d.ts" + }, + { + "path": "build/src/middleware/express/index.js" + }, + { + "path": "build/src/middleware/express/make-http-request.d.ts" + }, + { + "path": "build/src/middleware/express/make-http-request.js" + }, + { + "path": "build/src/middleware/express/index.d.ts" + }, + { + "path": "build/protos/protos.json" + }, + { + "path": "build/protos/protos.js" + }, + { + "path": "build/protos/protos.d.ts" + }, + { + "path": "build/protos/google/logging/v2/logging_config.proto" + }, + { + "path": "build/protos/google/logging/v2/logging.proto" + }, + { + "path": "build/protos/google/logging/v2/logging_metrics.proto" + }, + { + "path": "build/protos/google/logging/v2/log_entry.proto" + }, + { + "path": "build/protos/google/logging/type/http_request.proto" + }, + { + "path": "build/protos/google/logging/type/log_severity.proto" + }, + { + "path": "samples/http-request.js" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/sinks.js" + }, + { + "path": "samples/logs.js" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/fluent.js" + }, + { + "path": "samples/test/quickstart.test.js" + }, + { + "path": "samples/test/sinks.test.js" + }, + { + "path": "samples/test/logs.test.js" + }, + { + "path": "samples/test/http-request.test.js" + }, + { + "path": "samples/test/fluent.test.js" + }, + { + "path": "samples/test/.eslintrc.yml" + }, + { + "path": "smoke-test/.eslintrc.yml" + }, + { + "path": "smoke-test/logging_service_v2_smoke_test.js" + }, + { + "path": "test/log.ts" + }, + { + "path": "test/index.ts" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "test/sink.ts" + }, + { + "path": "test/entry.ts" + }, + { + "path": "test/common.ts" + }, + { + "path": "test/.eslintrc.yml" + }, + { + "path": "test/gapic-v2.js" + }, + { + "path": "test/metadata.ts" + }, + { + "path": "test/middleware/test-context.ts" + }, + { + "path": "test/middleware/express/test-make-middleware.ts" + }, + { + "path": "test/middleware/express/test-make-http-request.ts" + }, + { + "path": "node_modules/array-filter/package.json" + }, + { + "path": "node_modules/deep-extend/package.json" + }, + { + "path": "node_modules/uuid/package.json" + }, + { + "path": "node_modules/fast-text-encoding/package.json" + }, + { + "path": "node_modules/camelcase-keys/package.json" + }, + { + "path": "node_modules/camelcase-keys/node_modules/map-obj/package.json" + }, + { + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/is/package.json" + }, + { + "path": "node_modules/next-tick/package.json" + }, + { + "path": "node_modules/resolve/package.json" + }, + { + "path": "node_modules/module-not-found-error/package.json" + }, + { + "path": "node_modules/intelli-espower-loader/package.json" + }, + { + "path": "node_modules/optionator/package.json" + }, + { + "path": "node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/string-format-obj/package.json" + }, + { + "path": "node_modules/merge-estraverse-visitors/package.json" + }, + { + "path": "node_modules/restore-cursor/package.json" + }, + { + "path": "node_modules/multi-stage-sourcemap/package.json" + }, + { + "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" + }, + { + "path": "node_modules/power-assert-util-string-width/package.json" + }, + { + "path": "node_modules/once/package.json" + }, + { + "path": "node_modules/util-deprecate/package.json" + }, + { + "path": "node_modules/minimist/package.json" + }, + { + "path": "node_modules/fast-deep-equal/package.json" + }, + { + "path": "node_modules/es6-map/package.json" + }, + { + "path": "node_modules/text-table/package.json" + }, + { + "path": "node_modules/os-tmpdir/package.json" + }, + { + "path": "node_modules/boxen/package.json" + }, + { + "path": "node_modules/boxen/node_modules/type-fest/package.json" + }, + { + "path": "node_modules/deep-is/package.json" + }, + { + "path": "node_modules/assertion-error/package.json" + }, + { + "path": "node_modules/nth-check/package.json" + }, + { + "path": "node_modules/import-lazy/package.json" + }, + { + "path": "node_modules/big.js/package.json" + }, + { + "path": "node_modules/astral-regex/package.json" + }, + { + "path": "node_modules/mkdirp/package.json" + }, + { + "path": "node_modules/mkdirp/node_modules/minimist/package.json" + }, + { + "path": "node_modules/quick-lru/package.json" + }, + { + "path": "node_modules/jsdoc/package.json" + }, + { + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/growl/package.json" + }, + { + "path": "node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/doctrine/package.json" + }, + { + "path": "node_modules/@bcoe/v8-coverage/package.json" + }, + { + "path": "node_modules/chai/package.json" + }, + { + "path": "node_modules/destroy/package.json" + }, + { + "path": "node_modules/ini/package.json" + }, + { + "path": "node_modules/compressible/package.json" + }, + { + "path": "node_modules/json-parse-better-errors/package.json" + }, + { + "path": "node_modules/requizzle/package.json" + }, + { + "path": "node_modules/@szmarczak/http-timer/package.json" + }, + { + "path": "node_modules/indexof/package.json" + }, + { + "path": "node_modules/p-cancelable/package.json" + }, + { + "path": "node_modules/@sinonjs/formatio/package.json" + }, + { + "path": "node_modules/@sinonjs/samsam/package.json" + }, + { + "path": "node_modules/@sinonjs/commons/package.json" + }, + { + "path": "node_modules/@sinonjs/text-encoding/package.json" + }, + { + "path": "node_modules/snakecase-keys/package.json" + }, + { + "path": "node_modules/@types/uuid/package.json" + }, + { + "path": "node_modules/@types/is/package.json" + }, + { + "path": "node_modules/@types/sinon/package.json" + }, + { + "path": "node_modules/@types/node/package.json" + }, + { + "path": "node_modules/@types/through2/package.json" + }, + { + "path": "node_modules/@types/proxyquire/package.json" + }, + { + "path": "node_modules/@types/mv/package.json" + }, + { + "path": "node_modules/@types/ncp/package.json" + }, + { + "path": "node_modules/@types/color-name/package.json" + }, + { + "path": "node_modules/@types/duplexify/package.json" + }, + { + "path": "node_modules/@types/tmp/package.json" + }, + { + "path": "node_modules/@types/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/@types/on-finished/package.json" + }, + { + "path": "node_modules/@types/long/package.json" + }, + { + "path": "node_modules/@types/is-windows/package.json" + }, + { + "path": "node_modules/@types/extend/package.json" + }, + { + "path": "node_modules/@types/pumpify/package.json" + }, + { + "path": "node_modules/@types/mocha/package.json" + }, + { + "path": "node_modules/p-timeout/package.json" + }, + { + "path": "node_modules/p-timeout/node_modules/p-finally/package.json" + }, + { + "path": "node_modules/ext/package.json" + }, + { + "path": "node_modules/ext/node_modules/type/package.json" + }, + { + "path": "node_modules/tslint/package.json" + }, + { + "path": "node_modules/tslint/node_modules/semver/package.json" + }, + { + "path": "node_modules/is-plain-obj/package.json" + }, + { + "path": "node_modules/widest-line/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/string-width/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/natural-compare/package.json" + }, + { + "path": "node_modules/node-fetch/package.json" + }, + { + "path": "node_modules/builtin-modules/package.json" + }, + { + "path": "node_modules/xmlcreate/package.json" + }, + { + "path": "node_modules/indent-string/package.json" + }, + { + "path": "node_modules/unpipe/package.json" + }, + { + "path": "node_modules/string-width/package.json" + }, + { + "path": "node_modules/base64-js/package.json" + }, + { + "path": "node_modules/cli-width/package.json" + }, + { + "path": "node_modules/sprintf-js/package.json" + }, + { + "path": "node_modules/prelude-ls/package.json" + }, + { + "path": "node_modules/currently-unhandled/package.json" + }, + { + "path": "node_modules/ms/package.json" + }, + { + "path": "node_modules/jwa/package.json" + }, + { + "path": "node_modules/deep-equal/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + }, + { + "path": "node_modules/jws/package.json" + }, + { + "path": "node_modules/array-from/package.json" + }, + { + "path": "node_modules/crypto-random-string/package.json" + }, + { + "path": "node_modules/callsites/package.json" + }, + { + "path": "node_modules/responselike/package.json" + }, + { + "path": "node_modules/defer-to-connect/package.json" + }, + { + "path": "node_modules/core-util-is/package.json" + }, + { + "path": "node_modules/map-obj/package.json" + }, + { + "path": "node_modules/isexe/package.json" + }, + { + "path": "node_modules/is-url/package.json" + }, + { + "path": "node_modules/markdown-it/package.json" + }, + { + "path": "node_modules/sinon/package.json" + }, + { + "path": "node_modules/sinon/node_modules/diff/package.json" + }, + { + "path": "node_modules/sinon/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/decamelize/package.json" + }, + { + "path": "node_modules/strip-indent/package.json" + }, + { + "path": "node_modules/require-main-filename/package.json" + }, + { + "path": "node_modules/source-map/package.json" + }, + { + "path": "node_modules/spdx-correct/package.json" + }, + { + "path": "node_modules/semver-diff/package.json" + }, + { + "path": "node_modules/semver-diff/node_modules/semver/package.json" + }, + { + "path": "node_modules/google-auth-library/package.json" + }, + { + "path": "node_modules/tsutils/package.json" + }, + { + "path": "node_modules/type-fest/package.json" + }, + { + "path": "node_modules/entities/package.json" + }, + { + "path": "node_modules/object-keys/package.json" + }, + { + "path": "node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/prettier/package.json" + }, + { + "path": "node_modules/log-symbols/package.json" + }, + { + "path": "node_modules/@google-cloud/pubsub/package.json" + }, + { + "path": "node_modules/@google-cloud/precise-date/package.json" + }, + { + "path": "node_modules/@google-cloud/paginator/package.json" + }, + { + "path": "node_modules/@google-cloud/common/package.json" + }, + { + "path": "node_modules/@google-cloud/storage/package.json" + }, + { + "path": "node_modules/@google-cloud/storage/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/@google-cloud/projectify/package.json" + }, + { + "path": "node_modules/@google-cloud/promisify/package.json" + }, + { + "path": "node_modules/@google-cloud/bigquery/package.json" + }, + { + "path": "node_modules/@google-cloud/bigquery/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/@google-cloud/bigquery/node_modules/duplexify/package.json" + }, + { + "path": "node_modules/es6-iterator/package.json" + }, + { + "path": "node_modules/eventemitter3/package.json" + }, + { + "path": "node_modules/p-limit/package.json" + }, + { + "path": "node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/optimist/package.json" + }, + { + "path": "node_modules/tslint-config-prettier/package.json" + }, + { + "path": "node_modules/execa/package.json" + }, + { + "path": "node_modules/etag/package.json" + }, + { + "path": "node_modules/gaxios/package.json" + }, + { + "path": "node_modules/continuation-local-storage/package.json" + }, + { + "path": "node_modules/arrify/package.json" + }, + { + "path": "node_modules/esquery/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/node_modules/semver/package.json" + }, + { + "path": "node_modules/hash-stream-validation/package.json" + }, + { + "path": "node_modules/hash-stream-validation/node_modules/through2/package.json" + }, + { + "path": "node_modules/p-locate/package.json" + }, + { + "path": "node_modules/acorn-es7-plugin/package.json" + }, + { + "path": "node_modules/ajv/package.json" + }, + { + "path": "node_modules/espree/package.json" + }, + { + "path": "node_modules/isarray/package.json" + }, + { + "path": "node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/@opencensus/core/package.json" + }, + { + "path": "node_modules/@opencensus/propagation-stackdriver/package.json" + }, + { + "path": "node_modules/redent/package.json" + }, + { + "path": "node_modules/catharsis/package.json" + }, + { + "path": "node_modules/chardet/package.json" + }, + { + "path": "node_modules/domelementtype/package.json" + }, + { + "path": "node_modules/http-cache-semantics/package.json" + }, + { + "path": "node_modules/nock/package.json" + }, + { + "path": "node_modules/nock/node_modules/debug/package.json" + }, + { + "path": "node_modules/commander/package.json" + }, + { + "path": "node_modules/find-up/package.json" + }, + { + "path": "node_modules/path-type/package.json" + }, + { + "path": "node_modules/path-type/node_modules/pify/package.json" + }, + { + "path": "node_modules/es-abstract/package.json" + }, + { + "path": "node_modules/boolbase/package.json" + }, + { + "path": "node_modules/d/package.json" + }, + { + "path": "node_modules/marked/package.json" + }, + { + "path": "node_modules/is-path-inside/package.json" + }, + { + "path": "node_modules/cli-boxes/package.json" + }, + { + "path": "node_modules/is-installed-globally/package.json" + }, + { + "path": "node_modules/through2/package.json" + }, + { + "path": "node_modules/globals/package.json" + }, + { + "path": "node_modules/empower-core/package.json" + }, + { + "path": "node_modules/domutils/package.json" + }, + { + "path": "node_modules/json-buffer/package.json" + }, + { + "path": "node_modules/spdx-license-ids/package.json" + }, + { + "path": "node_modules/mime/package.json" + }, + { + "path": "node_modules/teeny-request/package.json" + }, + { + "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/teeny-request/node_modules/debug/package.json" + }, + { + "path": "node_modules/teeny-request/node_modules/agent-base/package.json" + }, + { + "path": "node_modules/locate-path/package.json" + }, + { + "path": "node_modules/tslib/package.json" + }, + { + "path": "node_modules/nise/package.json" + }, + { + "path": "node_modules/nise/node_modules/lolex/package.json" + }, + { + "path": "node_modules/google-p12-pem/package.json" + }, + { + "path": "node_modules/toidentifier/package.json" + }, + { + "path": "node_modules/power-assert-renderer-base/package.json" + }, + { + "path": "node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/eventid/package.json" + }, + { + "path": "node_modules/log-driver/package.json" + }, + { + "path": "node_modules/flatted/package.json" + }, + { + "path": "node_modules/to-space-case/package.json" + }, + { + "path": "node_modules/async-each/package.json" + }, + { + "path": "node_modules/graceful-fs/package.json" + }, + { + "path": "node_modules/array-find/package.json" + }, + { + "path": "node_modules/minimist-options/package.json" + }, + { + "path": "node_modules/minimist-options/node_modules/arrify/package.json" + }, + { + "path": "node_modules/string.prototype.trimleft/package.json" + }, + { + "path": "node_modules/traverse/package.json" + }, + { + "path": "node_modules/rc/package.json" + }, + { + "path": "node_modules/rc/node_modules/minimist/package.json" + }, + { + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/signal-exit/package.json" + }, + { + "path": "node_modules/finalhandler/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/ms/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/debug/package.json" + }, + { + "path": "node_modules/buffer-equal-constant-time/package.json" + }, + { + "path": "node_modules/merge-stream/package.json" + }, + { + "path": "node_modules/fill-keys/package.json" + }, + { + "path": "node_modules/power-assert-context-reducer-ast/package.json" + }, + { + "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" + }, + { + "path": "node_modules/power-assert-formatter/package.json" + }, + { + "path": "node_modules/rimraf/package.json" + }, + { + "path": "node_modules/lolex/package.json" + }, + { + "path": "node_modules/spdx-exceptions/package.json" + }, + { + "path": "node_modules/js2xmlparser/package.json" + }, + { + "path": "node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/depd/package.json" + }, + { + "path": "node_modules/term-size/package.json" + }, + { + "path": "node_modules/term-size/node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/term-size/node_modules/execa/package.json" + }, + { + "path": "node_modules/term-size/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/term-size/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/term-size/node_modules/npm-run-path/package.json" + }, + { + "path": "node_modules/term-size/node_modules/path-key/package.json" + }, + { + "path": "node_modules/term-size/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/term-size/node_modules/p-finally/package.json" + }, + { + "path": "node_modules/term-size/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/term-size/node_modules/which/package.json" + }, + { + "path": "node_modules/term-size/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/term-size/node_modules/yallist/package.json" + }, + { + "path": "node_modules/trim-newlines/package.json" + }, + { + "path": "node_modules/punycode/package.json" + }, + { + "path": "node_modules/regexp.prototype.flags/package.json" + }, + { + "path": "node_modules/es6-set/package.json" + }, + { + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/v8-compile-cache/package.json" + }, + { + "path": "node_modules/make-dir/package.json" + }, + { + "path": "node_modules/functional-red-black-tree/package.json" + }, + { + "path": "node_modules/urlgrey/package.json" + }, + { + "path": "node_modules/esrecurse/package.json" + }, + { + "path": "node_modules/check-error/package.json" + }, + { + "path": "node_modules/has-symbols/package.json" + }, + { + "path": "node_modules/p-defer/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + }, + { + "path": "node_modules/gcs-resumable-upload/package.json" + }, + { + "path": "node_modules/mdurl/package.json" + }, + { + "path": "node_modules/xtend/package.json" + }, + { + "path": "node_modules/underscore/package.json" + }, + { + "path": "node_modules/imurmurhash/package.json" + }, + { + "path": "node_modules/es6-weak-map/package.json" + }, + { + "path": "node_modules/strip-eof/package.json" + }, + { + "path": "node_modules/onetime/package.json" + }, + { + "path": "node_modules/resolve-from/package.json" + }, + { + "path": "node_modules/write/package.json" + }, + { + "path": "node_modules/domhandler/package.json" + }, + { + "path": "node_modules/css-what/package.json" + }, + { + "path": "node_modules/ecdsa-sig-formatter/package.json" + }, + { + "path": "node_modules/google-gax/package.json" + }, + { + "path": "node_modules/wordwrap/package.json" + }, + { + "path": "node_modules/eslint-scope/package.json" + }, + { + "path": "node_modules/is-npm/package.json" + }, + { + "path": "node_modules/http2spy/package.json" + }, + { + "path": "node_modules/get-stdin/package.json" + }, + { + "path": "node_modules/set-blocking/package.json" + }, + { + "path": "node_modules/regexpp/package.json" + }, + { + "path": "node_modules/is-promise/package.json" + }, + { + "path": "node_modules/has-flag/package.json" + }, + { + "path": "node_modules/pify/package.json" + }, + { + "path": "node_modules/type-check/package.json" + }, + { + "path": "node_modules/is-typedarray/package.json" + }, + { + "path": "node_modules/encodeurl/package.json" + }, + { + "path": "node_modules/latest-version/package.json" + }, + { + "path": "node_modules/diff/package.json" + }, + { + "path": "node_modules/foreground-child/package.json" + }, + { + "path": "node_modules/is-stream/package.json" + }, + { + "path": "node_modules/get-caller-file/package.json" + }, + { + "path": "node_modules/proxyquire/package.json" + }, + { + "path": "node_modules/which-module/package.json" + }, + { + "path": "node_modules/linkify-it/package.json" + }, + { + "path": "node_modules/inquirer/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/string-width/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/espower-loader/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + }, + { + "path": "node_modules/@babel/highlight/package.json" + }, + { + "path": "node_modules/@babel/parser/package.json" + }, + { + "path": "node_modules/@babel/code-frame/package.json" + }, + { + "path": "node_modules/es6-promisify/package.json" + }, + { + "path": "node_modules/amdefine/package.json" + }, + { + "path": "node_modules/is-ci/package.json" + }, + { + "path": "node_modules/deep-eql/package.json" + }, + { + "path": "node_modules/string.prototype.trimright/package.json" + }, + { + "path": "node_modules/mv/package.json" + }, + { + "path": "node_modules/mv/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/mv/node_modules/glob/package.json" + }, + { + "path": "node_modules/to-snake-case/package.json" + }, + { + "path": "node_modules/json-stringify-safe/package.json" + }, + { + "path": "node_modules/end-of-stream/package.json" + }, + { + "path": "node_modules/strip-final-newline/package.json" + }, + { + "path": "node_modules/glob/package.json" + }, + { + "path": "node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/object-inspect/package.json" + }, + { + "path": "node_modules/gts/package.json" + }, + { + "path": "node_modules/gts/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/gts/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/gts/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/gts/node_modules/color-name/package.json" + }, + { + "path": "node_modules/gts/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/gts/node_modules/chalk/package.json" + }, + { + "path": "node_modules/acorn/package.json" + }, + { + "path": "node_modules/path-is-inside/package.json" + }, + { + "path": "node_modules/table/package.json" + }, + { + "path": "node_modules/node-forge/package.json" + }, + { + "path": "node_modules/bignumber.js/package.json" + }, + { + "path": "node_modules/ent/package.json" + }, + { + "path": "node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/eslint-utils/package.json" + }, + { + "path": "node_modules/event-emitter/package.json" + }, + { + "path": "node_modules/statuses/package.json" + }, + { + "path": "node_modules/espower/package.json" + }, + { + "path": "node_modules/espower/node_modules/source-map/package.json" + }, + { + "path": "node_modules/is-regex/package.json" + }, + { + "path": "node_modules/taffydb/package.json" + }, + { + "path": "node_modules/core-js/package.json" + }, + { + "path": "node_modules/levn/package.json" + }, + { + "path": "node_modules/dot-prop/package.json" + }, + { + "path": "node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/power-assert-renderer-file/package.json" + }, + { + "path": "node_modules/path-parse/package.json" + }, + { + "path": "node_modules/ci-info/package.json" + }, + { + "path": "node_modules/test-exclude/package.json" + }, + { + "path": "node_modules/abort-controller/package.json" + }, + { + "path": "node_modules/normalize-package-data/package.json" + }, + { + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + }, + { + "path": "node_modules/fast-levenshtein/package.json" + }, + { + "path": "node_modules/color-convert/package.json" + }, + { + "path": "node_modules/minimatch/package.json" + }, + { + "path": "node_modules/cliui/package.json" + }, + { + "path": "node_modules/empower-assert/package.json" + }, + { + "path": "node_modules/npm-run-path/package.json" + }, + { + "path": "node_modules/snakeize/package.json" + }, + { + "path": "node_modules/ignore-walk/package.json" + }, + { + "path": "node_modules/configstore/package.json" + }, + { + "path": "node_modules/is-extglob/package.json" + }, + { + "path": "node_modules/duplexer3/package.json" + }, + { + "path": "node_modules/wide-align/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/string-width/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/propagate/package.json" + }, + { + "path": "node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/just-extend/package.json" + }, + { + "path": "node_modules/retry-request/package.json" + }, + { + "path": "node_modules/retry-request/node_modules/debug/package.json" + }, + { + "path": "node_modules/update-notifier/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/crypto-random-string/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/pify/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/dot-prop/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/configstore/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/unique-string/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/is-obj/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/xdg-basedir/package.json" + }, + { + "path": "node_modules/espurify/package.json" + }, + { + "path": "node_modules/eslint-config-prettier/package.json" + }, + { + "path": "node_modules/ansi-escapes/package.json" + }, + { + "path": "node_modules/markdown-it-anchor/package.json" + }, + { + "path": "node_modules/shimmer/package.json" + }, + { + "path": "node_modules/power-assert-renderer-comparison/package.json" + }, + { + "path": "node_modules/safe-buffer/package.json" + }, + { + "path": "node_modules/ncp/package.json" + }, + { + "path": "node_modules/has-yarn/package.json" + }, + { + "path": "node_modules/import-fresh/package.json" + }, + { + "path": "node_modules/supports-color/package.json" + }, + { + "path": "node_modules/progress/package.json" + }, + { + "path": "node_modules/typedarray/package.json" + }, + { + "path": "node_modules/path-exists/package.json" + }, + { + "path": "node_modules/inherits/package.json" + }, + { + "path": "node_modules/decompress-response/package.json" + }, + { + "path": "node_modules/object.getownpropertydescriptors/package.json" + }, + { + "path": "node_modules/mute-stream/package.json" + }, + { + "path": "node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/to-readable-stream/package.json" + }, + { + "path": "node_modules/merge-descriptors/package.json" + }, + { + "path": "node_modules/pathval/package.json" + }, + { + "path": "node_modules/fast-json-stable-stringify/package.json" + }, + { + "path": "node_modules/brace-expansion/package.json" + }, + { + "path": "node_modules/color-name/package.json" + }, + { + "path": "node_modules/js-yaml/package.json" + }, + { + "path": "node_modules/run-async/package.json" + }, + { + "path": "node_modules/human-signals/package.json" + }, + { + "path": "node_modules/eslint-visitor-keys/package.json" + }, + { + "path": "node_modules/flat-cache/package.json" + }, + { + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/range-parser/package.json" + }, + { + "path": "node_modules/parseurl/package.json" + }, + { + "path": "node_modules/node-environment-flags/package.json" + }, + { + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + }, + { + "path": "node_modules/fresh/package.json" + }, + { + "path": "node_modules/universal-deep-strict-equal/package.json" + }, + { + "path": "node_modules/assert-rejects/package.json" + }, + { + "path": "node_modules/path-to-regexp/package.json" + }, + { + "path": "node_modules/path-to-regexp/node_modules/isarray/package.json" + }, + { + "path": "node_modules/ansi-align/package.json" + }, + { + "path": "node_modules/loud-rejection/package.json" + }, + { + "path": "node_modules/@protobufjs/path/package.json" + }, + { + "path": "node_modules/@protobufjs/float/package.json" + }, + { + "path": "node_modules/@protobufjs/utf8/package.json" + }, + { + "path": "node_modules/@protobufjs/eventemitter/package.json" + }, + { + "path": "node_modules/@protobufjs/base64/package.json" + }, + { + "path": "node_modules/@protobufjs/pool/package.json" + }, + { + "path": "node_modules/@protobufjs/codegen/package.json" + }, + { + "path": "node_modules/@protobufjs/aspromise/package.json" + }, + { + "path": "node_modules/@protobufjs/fetch/package.json" + }, + { + "path": "node_modules/@protobufjs/inquire/package.json" + }, + { + "path": "node_modules/is-date-object/package.json" + }, + { + "path": "node_modules/argparse/package.json" + }, + { + "path": "node_modules/clone-response/package.json" + }, + { + "path": "node_modules/serve-static/package.json" + }, + { + "path": "node_modules/p-queue/package.json" + }, + { + "path": "node_modules/path-key/package.json" + }, + { + "path": "node_modules/lodash.camelcase/package.json" + }, + { + "path": "node_modules/duplexify/package.json" + }, + { + "path": "node_modules/ignore/package.json" + }, + { + "path": "node_modules/http-errors/package.json" + }, + { + "path": "node_modules/lodash.has/package.json" + }, + { + "path": "node_modules/package-json/package.json" + }, + { + "path": "node_modules/handlebars/package.json" + }, + { + "path": "node_modules/jsonexport/package.json" + }, + { + "path": "node_modules/uc.micro/package.json" + }, + { + "path": "node_modules/browser-stdout/package.json" + }, + { + "path": "node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/eslint/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/eslint/node_modules/path-key/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + }, + { + "path": "node_modules/eslint/node_modules/which/package.json" + }, + { + "path": "node_modules/eslint/node_modules/debug/package.json" + }, + { + "path": "node_modules/cli-cursor/package.json" + }, + { + "path": "node_modules/buffer-from/package.json" + }, + { + "path": "node_modules/eastasianwidth/package.json" + }, + { + "path": "node_modules/define-properties/package.json" + }, + { + "path": "node_modules/unique-string/package.json" + }, + { + "path": "node_modules/es5-ext/package.json" + }, + { + "path": "node_modules/json-schema-traverse/package.json" + }, + { + "path": "node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/mimic-response/package.json" + }, + { + "path": "node_modules/ee-first/package.json" + }, + { + "path": "node_modules/uglify-js/package.json" + }, + { + "path": "node_modules/p-finally/package.json" + }, + { + "path": "node_modules/load-json-file/package.json" + }, + { + "path": "node_modules/load-json-file/node_modules/pify/package.json" + }, + { + "path": "node_modules/send/package.json" + }, + { + "path": "node_modules/send/node_modules/ms/package.json" + }, + { + "path": "node_modules/send/node_modules/mime/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + }, + { + "path": "node_modules/c8/package.json" + }, + { + "path": "node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/event-target-shim/package.json" + }, + { + "path": "node_modules/strip-bom/package.json" + }, + { + "path": "node_modules/esutils/package.json" + }, + { + "path": "node_modules/esprima/package.json" + }, + { + "path": "node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/argv/package.json" + }, + { + "path": "node_modules/is-regexp/package.json" + }, + { + "path": "node_modules/emitter-listener/package.json" + }, + { + "path": "node_modules/which/package.json" + }, + { + "path": "node_modules/camelcase/package.json" + }, + { + "path": "node_modules/he/package.json" + }, + { + "path": "node_modules/tmp/package.json" + }, + { + "path": "node_modules/meow/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/meow/node_modules/find-up/package.json" + }, + { + "path": "node_modules/meow/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/meow/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/meow/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-try/package.json" + }, + { + "path": "node_modules/meow/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/empower/package.json" + }, + { + "path": "node_modules/stringifier/package.json" + }, + { + "path": "node_modules/is-arrayish/package.json" + }, + { + "path": "node_modules/escape-html/package.json" + }, + { + "path": "node_modules/cheerio/package.json" + }, + { + "path": "node_modules/iconv-lite/package.json" + }, + { + "path": "node_modules/d64/package.json" + }, + { + "path": "node_modules/js-tokens/package.json" + }, + { + "path": "node_modules/is-callable/package.json" + }, + { + "path": "node_modules/css-select/package.json" + }, + { + "path": "node_modules/es-to-primitive/package.json" + }, + { + "path": "node_modules/url-parse-lax/package.json" + }, + { + "path": "node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/source-map-support/package.json" + }, + { + "path": "node_modules/source-map-support/node_modules/source-map/package.json" + }, + { + "path": "node_modules/validate-npm-package-license/package.json" + }, + { + "path": "node_modules/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/y18n/package.json" + }, + { + "path": "node_modules/through/package.json" + }, + { + "path": "node_modules/htmlparser2/package.json" + }, + { + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/semver/package.json" + }, + { + "path": "node_modules/date-and-time/package.json" + }, + { + "path": "node_modules/p-try/package.json" + }, + { + "path": "node_modules/stubs/package.json" + }, + { + "path": "node_modules/lodash.snakecase/package.json" + }, + { + "path": "node_modules/power-assert-renderer-assertion/package.json" + }, + { + "path": "node_modules/flat/package.json" + }, + { + "path": "node_modules/is-object/package.json" + }, + { + "path": "node_modules/escallmatch/package.json" + }, + { + "path": "node_modules/escallmatch/node_modules/esprima/package.json" + }, + { + "path": "node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/file-entry-cache/package.json" + }, + { + "path": "node_modules/spdx-expression-parse/package.json" + }, + { + "path": "node_modules/concat-map/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + }, + { + "path": "node_modules/uri-js/package.json" + }, + { + "path": "node_modules/gtoken/package.json" + }, + { + "path": "node_modules/debug/package.json" + }, + { + "path": "node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/parse-json/package.json" + }, + { + "path": "node_modules/error-ex/package.json" + }, + { + "path": "node_modules/server-destroy/package.json" + }, + { + "path": "node_modules/lodash.at/package.json" + }, + { + "path": "node_modules/array-find-index/package.json" + }, + { + "path": "node_modules/linkinator/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-name/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/chalk/package.json" + }, + { + "path": "node_modules/get-stream/package.json" + }, + { + "path": "node_modules/parent-module/package.json" + }, + { + "path": "node_modules/slice-ansi/package.json" + }, + { + "path": "node_modules/safer-buffer/package.json" + }, + { + "path": "node_modules/json-bigint/package.json" + }, + { + "path": "node_modules/json-bigint/node_modules/bignumber.js/package.json" + }, + { + "path": "node_modules/prepend-http/package.json" + }, + { + "path": "node_modules/jsdoc-region-tag/package.json" + }, + { + "path": "node_modules/estraverse/package.json" + }, + { + "path": "node_modules/type/package.json" + }, + { + "path": "node_modules/require-directory/package.json" + }, + { + "path": "node_modules/on-finished/package.json" + }, + { + "path": "node_modules/figures/package.json" + }, + { + "path": "node_modules/function-bind/package.json" + }, + { + "path": "node_modules/inflight/package.json" + }, + { + "path": "node_modules/normalize-url/package.json" + }, + { + "path": "node_modules/fast-diff/package.json" + }, + { + "path": "node_modules/balanced-match/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/LICENSE" + }, + { + "path": "node_modules/typedarray-to-buffer/.travis.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/README.md" + }, + { + "path": "node_modules/typedarray-to-buffer/index.js" + }, + { + "path": "node_modules/typedarray-to-buffer/.airtap.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/test/basic.js" + }, + { + "path": "node_modules/yargs/package.json" + }, + { + "path": "node_modules/yargs/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/yargs/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/pseudomap/package.json" + }, + { + "path": "node_modules/rxjs/package.json" + }, + { + "path": "node_modules/is-stream-ended/package.json" + }, + { + "path": "node_modules/klaw/package.json" + }, + { + "path": "node_modules/gcp-metadata/package.json" + }, + { + "path": "node_modules/decamelize-keys/package.json" + }, + { + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + }, + { + "path": "node_modules/lodash/package.json" + }, + { + "path": "node_modules/yargs-unparser/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + }, + { + "path": "node_modules/type-detect/package.json" + }, + { + "path": "node_modules/string_decoder/package.json" + }, + { + "path": "node_modules/setprototypeof/package.json" + }, + { + "path": "node_modules/is-yarn-global/package.json" + }, + { + "path": "node_modules/is-glob/package.json" + }, + { + "path": "node_modules/cacheable-request/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/stream-events/package.json" + }, + { + "path": "node_modules/to-no-case/package.json" + }, + { + "path": "node_modules/object.assign/package.json" + }, + { + "path": "node_modules/ansi-colors/package.json" + }, + { + "path": "node_modules/wrap-ansi/package.json" + }, + { + "path": "node_modules/power-assert-renderer-diagram/package.json" + }, + { + "path": "node_modules/furi/package.json" + }, + { + "path": "node_modules/istanbul-reports/package.json" + }, + { + "path": "node_modules/protobufjs/package.json" + }, + { + "path": "node_modules/power-assert/package.json" + }, + { + "path": "node_modules/stream-shift/package.json" + }, + { + "path": "node_modules/got/package.json" + }, + { + "path": "node_modules/got/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/got/node_modules/@sindresorhus/is/package.json" + }, + { + "path": "node_modules/type-name/package.json" + }, + { + "path": "node_modules/dom-serializer/package.json" + }, + { + "path": "node_modules/@grpc/grpc-js/package.json" + }, + { + "path": "node_modules/@grpc/proto-loader/package.json" + }, + { + "path": "node_modules/mimic-fn/package.json" + }, + { + "path": "node_modules/object-is/package.json" + }, + { + "path": "node_modules/read-pkg/package.json" + }, + { + "path": "node_modules/escodegen/package.json" + }, + { + "path": "node_modules/escodegen/node_modules/esprima/package.json" + }, + { + "path": "node_modules/is-symbol/package.json" + }, + { + "path": "node_modules/agent-base/package.json" + }, + { + "path": "node_modules/@sindresorhus/is/package.json" + }, + { + "path": "node_modules/is-obj/package.json" + }, + { + "path": "node_modules/pump/package.json" + }, + { + "path": "node_modules/call-matcher/package.json" + }, + { + "path": "node_modules/registry-url/package.json" + }, + { + "path": "node_modules/walkdir/package.json" + }, + { + "path": "node_modules/neo-async/package.json" + }, + { + "path": "node_modules/bluebird/package.json" + }, + { + "path": "node_modules/long/package.json" + }, + { + "path": "node_modules/registry-auth-token/package.json" + }, + { + "path": "node_modules/get-func-name/package.json" + }, + { + "path": "node_modules/es6-promise/package.json" + }, + { + "path": "node_modules/http-proxy-agent/package.json" + }, + { + "path": "node_modules/http-proxy-agent/node_modules/debug/package.json" + }, + { + "path": "node_modules/http-proxy-agent/node_modules/agent-base/package.json" + }, + { + "path": "node_modules/keyv/package.json" + }, + { + "path": "node_modules/mime-types/package.json" + }, + { + "path": "node_modules/is-windows/package.json" + }, + { + "path": "node_modules/extend/package.json" + }, + { + "path": "node_modules/espower-source/package.json" + }, + { + "path": "node_modules/espower-source/node_modules/acorn/package.json" + }, + { + "path": "node_modules/hosted-git-info/package.json" + }, + { + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + }, + { + "path": "node_modules/is-arguments/package.json" + }, + { + "path": "node_modules/glob-parent/package.json" + }, + { + "path": "node_modules/concat-stream/package.json" + }, + { + "path": "node_modules/concat-stream/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/global-dirs/package.json" + }, + { + "path": "node_modules/hex2dec/package.json" + }, + { + "path": "node_modules/power-assert-context-formatter/package.json" + }, + { + "path": "node_modules/external-editor/package.json" + }, + { + "path": "node_modules/typescript/package.json" + }, + { + "path": "node_modules/mime-db/package.json" + }, + { + "path": "node_modules/convert-source-map/package.json" + }, + { + "path": "node_modules/yallist/package.json" + }, + { + "path": "node_modules/power-assert-context-traversal/package.json" + }, + { + "path": "node_modules/nice-try/package.json" + }, + { + "path": "node_modules/escope/package.json" + }, + { + "path": "node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/wrappy/package.json" + }, + { + "path": "node_modules/codecov/package.json" + }, + { + "path": "node_modules/codecov/node_modules/teeny-request/package.json" + }, + { + "path": "node_modules/codecov/node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/parse5/package.json" + }, + { + "path": "node_modules/diff-match-patch/package.json" + }, + { + "path": "node_modules/prettier-linter-helpers/package.json" + }, + { + "path": "node_modules/fs.realpath/package.json" + }, + { + "path": "node_modules/pumpify/package.json" + }, + { + "path": "node_modules/pumpify/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/pumpify/node_modules/duplexify/package.json" + }, + { + "path": "node_modules/word-wrap/package.json" + }, + { + "path": "node_modules/chalk/package.json" + }, + { + "path": "node_modules/chalk/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/async-listener/package.json" + }, + { + "path": "node_modules/async-listener/node_modules/semver/package.json" + }, + { + "path": "node_modules/has/package.json" + }, + { + "path": "node_modules/process-nextick-args/package.json" + }, + { + "path": "node_modules/xdg-basedir/package.json" + }, + { + "path": "node_modules/mocha/package.json" + }, + { + "path": "node_modules/mocha/node_modules/ms/package.json" + }, + { + "path": "node_modules/mocha/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/mocha/node_modules/find-up/package.json" + }, + { + "path": "node_modules/mocha/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/mocha/node_modules/diff/package.json" + }, + { + "path": "node_modules/mocha/node_modules/glob/package.json" + }, + { + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/mocha/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/mocha/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/mocha/node_modules/which/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs/package.json" + }, + { + "path": "node_modules/espower-location-detector/package.json" + }, + { + "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" + }, + { + "path": "node_modules/eslint-plugin-prettier/package.json" + }, + { + "path": "node_modules/path-is-absolute/package.json" + }, + { + "path": "node_modules/call-signature/package.json" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/.gitattributes" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/release/common.cfg" + }, + { + "path": "src/log.ts" + }, + { + "path": "src/service_proto_list.json" + }, + { + "path": "src/index.ts" + }, + { + "path": "src/http-request.ts" + }, + { + "path": "src/sink.ts" + }, + { + "path": "src/entry.ts" + }, + { + "path": "src/common.ts" + }, + { + "path": "src/metadata.ts" + }, + { + "path": "src/v2/metrics_service_v2_client.js" + }, + { + "path": "src/v2/logging_service_v2_proto_list.json" + }, + { + "path": "src/v2/config_service_v2_client.js" + }, + { + "path": "src/v2/logging_service_v2_client.js" + }, + { + "path": "src/v2/metrics_service_v2_client_config.json" + }, + { + "path": "src/v2/index.js" + }, + { + "path": "src/v2/metrics_service_v2_proto_list.json" + }, + { + "path": "src/v2/logging_service_v2_client_config.json" + }, + { + "path": "src/v2/config_service_v2_proto_list.json" + }, + { + "path": "src/v2/config_service_v2_client_config.json" + }, + { + "path": "src/v2/.eslintrc.yml" + }, + { + "path": "src/v2/doc/google/logging/v2/doc_logging_metrics.js" + }, + { + "path": "src/v2/doc/google/logging/v2/doc_logging.js" + }, + { + "path": "src/v2/doc/google/logging/v2/doc_logging_config.js" + }, + { + "path": "src/v2/doc/google/logging/v2/doc_log_entry.js" + }, + { + "path": "src/v2/doc/google/logging/type/doc_http_request.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_any.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_empty.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_duration.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_struct.js" + }, + { + "path": "src/v2/doc/google/api/doc_label.js" + }, + { + "path": "src/v2/doc/google/api/doc_distribution.js" + }, + { + "path": "src/v2/doc/google/api/doc_monitored_resource.js" + }, + { + "path": "src/v2/doc/google/api/doc_metric.js" + }, + { + "path": "src/middleware/index.ts" + }, + { + "path": "src/middleware/context.ts" + }, + { + "path": "src/middleware/express/make-middleware.ts" + }, + { + "path": "src/middleware/express/index.ts" + }, + { + "path": "src/middleware/express/make-http-request.ts" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/google/logging/v2/logging_config.proto" + }, + { + "path": "protos/google/logging/v2/logging.proto" + }, + { + "path": "protos/google/logging/v2/logging_metrics.proto" + }, + { + "path": "protos/google/logging/v2/log_entry.proto" + }, + { + "path": "protos/google/logging/type/http_request.proto" + }, + { + "path": "protos/google/logging/type/log_severity.proto" + } ] } \ No newline at end of file From fd0d15b08159bddb3f312c53a358c2953a9aeb3c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Dec 2019 11:36:00 -0800 Subject: [PATCH 0519/1029] refactor: use explicit mocha imports * refactor: use explicit mocha imports * fixy --- handwritten/logging/smoke-test/.eslintrc.yml | 2 -- handwritten/logging/smoke-test/logging_service_v2_smoke_test.js | 2 ++ handwritten/logging/system-test/logging.ts | 1 + handwritten/logging/test/.eslintrc.yml | 2 -- handwritten/logging/test/common.ts | 1 + handwritten/logging/test/entry.ts | 1 + handwritten/logging/test/gapic-v2.js | 1 + handwritten/logging/test/index.ts | 1 + handwritten/logging/test/log.ts | 1 + handwritten/logging/test/metadata.ts | 1 + .../logging/test/middleware/express/test-make-http-request.ts | 1 + .../logging/test/middleware/express/test-make-middleware.ts | 1 + handwritten/logging/test/middleware/test-context.ts | 1 + handwritten/logging/test/sink.ts | 1 + 14 files changed, 13 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/smoke-test/.eslintrc.yml b/handwritten/logging/smoke-test/.eslintrc.yml index fb2657e4cc9..46afd952546 100644 --- a/handwritten/logging/smoke-test/.eslintrc.yml +++ b/handwritten/logging/smoke-test/.eslintrc.yml @@ -1,5 +1,3 @@ --- -env: - mocha: true rules: node/no-missing-require: off diff --git a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js index 67adbee5c41..98ca41d9c17 100644 --- a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js +++ b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js @@ -14,6 +14,8 @@ 'use strict'; +const {describe, it} = require('mocha'); + describe('LoggingServiceV2SmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 4b2ef7e5a47..b30dbd71976 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -18,6 +18,7 @@ import {BigQuery} from '@google-cloud/bigquery'; import {PubSub} from '@google-cloud/pubsub'; import {Storage} from '@google-cloud/storage'; import * as assert from 'assert'; +import {describe, it} from 'mocha'; import {HOST_ADDRESS} from 'gcp-metadata'; import * as nock from 'nock'; import {Duplex} from 'stream'; diff --git a/handwritten/logging/test/.eslintrc.yml b/handwritten/logging/test/.eslintrc.yml index fb2657e4cc9..46afd952546 100644 --- a/handwritten/logging/test/.eslintrc.yml +++ b/handwritten/logging/test/.eslintrc.yml @@ -1,5 +1,3 @@ --- -env: - mocha: true rules: node/no-missing-require: off diff --git a/handwritten/logging/test/common.ts b/handwritten/logging/test/common.ts index 0b7b6b49168..82d3fde3356 100644 --- a/handwritten/logging/test/common.ts +++ b/handwritten/logging/test/common.ts @@ -17,6 +17,7 @@ import { ObjectToStructConverterConfig, } from '../src/common'; import * as assert from 'assert'; +import {describe, it} from 'mocha'; const OPTIONS = { maxRetries: 3, } as ObjectToStructConverterConfig; diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index b205add7a66..3036cbf5c8e 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -13,6 +13,7 @@ // limitations under the License. import * as assert from 'assert'; +import {describe, it} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as entryTypes from '../src/entry'; diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 8ee25d125fd..924cf73d637 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -15,6 +15,7 @@ 'use strict'; const assert = require('assert'); +const {describe, it} = require('mocha'); const loggingModule = require('../src'); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index f9416baa5cc..48d82bb5c57 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -16,6 +16,7 @@ import {util} from '@google-cloud/common'; import {CallbackifyAllOptions} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as assert from 'assert'; +import {describe, it} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as through from 'through2'; diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 87581792615..45db5476688 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -14,6 +14,7 @@ import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; +import {describe, it} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import {Log as LOG, WriteOptions, GetEntriesRequest} from '../src/log'; diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index dea9f253e2c..0914586a07f 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -13,6 +13,7 @@ // limitations under the License. import * as assert from 'assert'; +import {describe, it} from 'mocha'; import BigNumber from 'bignumber.js'; import * as extend from 'extend'; import {GCPEnv} from 'google-auth-library'; diff --git a/handwritten/logging/test/middleware/express/test-make-http-request.ts b/handwritten/logging/test/middleware/express/test-make-http-request.ts index 3abbfe252e1..559e8abd36d 100644 --- a/handwritten/logging/test/middleware/express/test-make-http-request.ts +++ b/handwritten/logging/test/middleware/express/test-make-http-request.ts @@ -15,6 +15,7 @@ */ import * as assert from 'assert'; +import {describe, it} from 'mocha'; import {ServerResponse} from 'http'; import { makeHttpRequestData, diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 6e0e2e316a4..85e1c5f7331 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -15,6 +15,7 @@ */ import * as assert from 'assert'; +import {describe, it} from 'mocha'; import * as EventEmitter from 'events'; import * as proxyquire from 'proxyquire'; diff --git a/handwritten/logging/test/middleware/test-context.ts b/handwritten/logging/test/middleware/test-context.ts index 173e7bf8972..968ac3eb42c 100644 --- a/handwritten/logging/test/middleware/test-context.ts +++ b/handwritten/logging/test/middleware/test-context.ts @@ -15,6 +15,7 @@ */ import * as assert from 'assert'; +import {describe, it} from 'mocha'; import * as http from 'http'; import * as proxyquire from 'proxyquire'; import {makeHeaderWrapper} from '../../src/middleware/context'; diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index fb5c79a5d4b..8796b9699ff 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -14,6 +14,7 @@ import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; +import {describe, it} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as sinon from 'sinon'; From b83b7632b1c9e3e2885d18aa9fe1077bc8c69b01 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 31 Dec 2019 00:49:47 +0200 Subject: [PATCH 0520/1029] chore(deps): update dependency c8 to v7 (#662) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5065cf52ad7..57f99f8501a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -84,7 +84,7 @@ "@types/uuid": "^3.4.4", "assert-rejects": "^1.0.0", "bignumber.js": "^9.0.0", - "c8": "^6.0.1", + "c8": "^7.0.0", "codecov": "^3.0.4", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", From 956cbe927fea4002f6a11340439839a5f2b3d79f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 31 Dec 2019 02:38:19 +0200 Subject: [PATCH 0521/1029] chore(deps): update dependency execa to v4 (#659) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 57f99f8501a..b5f21f705e2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -90,7 +90,7 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", - "execa": "^3.2.0", + "execa": "^4.0.0", "gts": "^1.0.0", "http2spy": "^1.1.0", "intelli-espower-loader": "^1.0.1", From 2a719cd2302c30fe446eb49dbb531e4fe4b24be8 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 31 Dec 2019 04:02:12 +0200 Subject: [PATCH 0522/1029] chore(deps): update dependency eslint-plugin-node to v11 (#664) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b5f21f705e2..d4c2a1fb291 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -88,7 +88,7 @@ "codecov": "^3.0.4", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", "execa": "^4.0.0", "gts": "^1.0.0", From 66e6b1aabedd8ac032d0961f3a3785d76dfb6081 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 3 Jan 2020 09:59:28 -0800 Subject: [PATCH 0523/1029] build: add **/*.d.ts to coverage ignore list --- handwritten/logging/.nycrc | 1 + handwritten/logging/protos/protos.d.ts | 2 +- handwritten/logging/protos/protos.js | 2 +- handwritten/logging/synth.metadata | 2067 +++++++++++++----------- 4 files changed, 1089 insertions(+), 983 deletions(-) diff --git a/handwritten/logging/.nycrc b/handwritten/logging/.nycrc index 367688844eb..b18d5472b62 100644 --- a/handwritten/logging/.nycrc +++ b/handwritten/logging/.nycrc @@ -12,6 +12,7 @@ "**/scripts", "**/protos", "**/test", + "**/*.d.ts", ".jsdoc.js", "**/.jsdoc.js", "karma.conf.js", diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index c770b85a4a1..a67f44193fb 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 5e4828dd0a9..3b1be1557fa 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index fb9276a1eb2..45b5f4f026c 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-12-20T12:20:58.976639Z", + "updateTime": "2020-01-03T12:17:01.487315Z", "sources": [ { "generator": { "name": "artman", - "version": "0.42.3", - "dockerImage": "googleapis/artman@sha256:feed210b5723c6f524b52ef6d7740a030f2d1a8f7c29a71c5e5b4481ceaad7f5" + "version": "0.43.0", + "dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "50af0530730348f1e3697bf3c70261f7daaf2981", - "internalRef": "286491002" + "sha": "4d45a6399e9444fbddaeb1c86aabfde210723714", + "internalRef": "287908369" } }, { @@ -38,28 +38,64 @@ ], "newFiles": [ { - "path": "tslint.json" + "path": "synth.metadata" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "linkinator.config.json" + }, + { + "path": ".prettierignore" + }, + { + "path": "tsconfig.json" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".gitignore" + }, + { + "path": "synth.py" }, { "path": "CODE_OF_CONDUCT.md" }, { - "path": "synth.metadata" + "path": "README.md" }, { "path": "package-lock.json" }, { - "path": ".eslintignore" + "path": ".prettierrc" + }, + { + "path": ".readme-partials.yml" + }, + { + "path": "codecov.yaml" }, { "path": ".nycrc" }, { - "path": ".gitignore" + "path": "package.json" }, { - "path": ".prettierrc" + "path": ".eslintrc.yml" + }, + { + "path": "tslint.json" + }, + { + "path": "renovate.json" }, { "path": "LICENSE" @@ -68,352 +104,406 @@ "path": "CHANGELOG.md" }, { - "path": "README.md" + "path": ".eslintignore" }, { - "path": "CONTRIBUTING.md" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": ".repo-metadata.json" + "path": ".github/release-please.yml" }, { - "path": "linkinator.config.json" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": "tsconfig.json" + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { - "path": ".jsdoc.js" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" }, { - "path": "codecov.yaml" + "path": ".kokoro/samples-test.sh" }, { - "path": "renovate.json" + "path": ".kokoro/system-test.sh" }, { - "path": ".readme-partials.yml" + "path": ".kokoro/docs.sh" }, { - "path": ".prettierignore" + "path": ".kokoro/lint.sh" }, { - "path": "package.json" + "path": ".kokoro/.gitattributes" }, { - "path": ".eslintrc.yml" + "path": ".kokoro/publish.sh" }, { - "path": "synth.py" + "path": ".kokoro/trampoline.sh" }, { - "path": ".git/config" + "path": ".kokoro/common.cfg" }, { - "path": ".git/index" + "path": ".kokoro/test.bat" }, { - "path": ".git/HEAD" + "path": ".kokoro/test.sh" }, { - "path": ".git/packed-refs" + "path": ".kokoro/release/docs.sh" }, { - "path": ".git/shallow" + "path": ".kokoro/release/docs.cfg" }, { - "path": ".git/logs/HEAD" + "path": ".kokoro/release/common.cfg" }, { - "path": ".git/logs/refs/heads/autosynth" + "path": ".kokoro/release/publish.cfg" }, { - "path": ".git/logs/refs/heads/master" + "path": ".kokoro/presubmit/node12/test.cfg" }, { - "path": ".git/logs/refs/remotes/origin/HEAD" + "path": ".kokoro/presubmit/node12/common.cfg" }, { - "path": ".git/objects/pack/pack-5f1f02729da007e35d98ce4453a70289f650be58.pack" + "path": ".kokoro/presubmit/node8/test.cfg" }, { - "path": ".git/objects/pack/pack-5f1f02729da007e35d98ce4453a70289f650be58.idx" + "path": ".kokoro/presubmit/node8/common.cfg" }, { - "path": ".git/refs/heads/autosynth" + "path": ".kokoro/presubmit/windows/test.cfg" }, { - "path": ".git/refs/heads/master" + "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": ".git/refs/tags/v6.0.0" + "path": ".kokoro/presubmit/node10/lint.cfg" }, { - "path": ".git/refs/remotes/origin/HEAD" + "path": ".kokoro/presubmit/node10/system-test.cfg" }, { - "path": "__pycache__/synth.cpython-36.pyc" + "path": ".kokoro/presubmit/node10/test.cfg" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": ".kokoro/presubmit/node10/docs.cfg" }, { - "path": ".github/release-please.yml" + "path": ".kokoro/presubmit/node10/common.cfg" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": ".kokoro/presubmit/node10/samples-test.cfg" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": ".kokoro/continuous/node12/test.cfg" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": ".kokoro/continuous/node12/common.cfg" }, { - "path": "system-test/logging.ts" + "path": ".kokoro/continuous/node8/test.cfg" }, { - "path": "system-test/install.ts" + "path": ".kokoro/continuous/node8/common.cfg" }, { - "path": "system-test/fixtures/sample/tsconfig.json" + "path": ".kokoro/continuous/node10/lint.cfg" }, { - "path": "system-test/fixtures/sample/package.json" + "path": ".kokoro/continuous/node10/system-test.cfg" }, { - "path": "system-test/fixtures/sample/src/index.ts" + "path": ".kokoro/continuous/node10/test.cfg" }, { - "path": "build/system-test/install.d.ts" + "path": ".kokoro/continuous/node10/docs.cfg" }, { - "path": "build/system-test/logging.js.map" + "path": ".kokoro/continuous/node10/common.cfg" }, { - "path": "build/system-test/logging.js" + "path": ".kokoro/continuous/node10/samples-test.cfg" }, { - "path": "build/system-test/install.js.map" + "path": "test/gapic-v2.js" }, { - "path": "build/system-test/install.js" + "path": "test/common.ts" }, { - "path": "build/system-test/logging.d.ts" + "path": "test/mocha.opts" }, { - "path": "build/test/index.js.map" + "path": "test/index.ts" }, { - "path": "build/test/entry.d.ts" + "path": "test/entry.ts" }, { - "path": "build/test/common.js" + "path": "test/sink.ts" }, { - "path": "build/test/log.d.ts" + "path": "test/metadata.ts" }, { - "path": "build/test/metadata.js.map" + "path": "test/log.ts" }, { - "path": "build/test/entry.js" + "path": "test/.eslintrc.yml" }, { - "path": "build/test/sink.js.map" + "path": "test/middleware/test-context.ts" }, { - "path": "build/test/metadata.js" + "path": "test/middleware/express/test-make-http-request.ts" }, { - "path": "build/test/log.js.map" + "path": "test/middleware/express/test-make-middleware.ts" }, { - "path": "build/test/index.js" + "path": "system-test/logging.ts" }, { - "path": "build/test/log.js" + "path": "system-test/install.ts" }, { - "path": "build/test/common.js.map" + "path": "system-test/fixtures/sample/tsconfig.json" }, { - "path": "build/test/common.d.ts" + "path": "system-test/fixtures/sample/package.json" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "build/test/gapic-v2.js" + }, + { + "path": "build/test/metadata.js" + }, + { + "path": "build/test/common.js" }, { "path": "build/test/metadata.d.ts" }, + { + "path": "build/test/log.d.ts" + }, { "path": "build/test/sink.js" }, + { + "path": "build/test/entry.js.map" + }, + { + "path": "build/test/sink.js.map" + }, + { + "path": "build/test/index.js" + }, + { + "path": "build/test/entry.js" + }, { "path": "build/test/sink.d.ts" }, { - "path": "build/test/entry.js.map" + "path": "build/test/common.js.map" }, { - "path": "build/test/gapic-v2.js" + "path": "build/test/log.js.map" + }, + { + "path": "build/test/entry.d.ts" + }, + { + "path": "build/test/index.js.map" + }, + { + "path": "build/test/common.d.ts" + }, + { + "path": "build/test/log.js" + }, + { + "path": "build/test/metadata.js.map" }, { "path": "build/test/index.d.ts" }, { - "path": "build/test/middleware/test-context.d.ts" + "path": "build/test/middleware/test-context.js" }, { "path": "build/test/middleware/test-context.js.map" }, { - "path": "build/test/middleware/test-context.js" + "path": "build/test/middleware/test-context.d.ts" }, { "path": "build/test/middleware/express/test-make-http-request.d.ts" }, { - "path": "build/test/middleware/express/test-make-http-request.js" + "path": "build/test/middleware/express/test-make-http-request.js.map" }, { - "path": "build/test/middleware/express/test-make-http-request.js.map" + "path": "build/test/middleware/express/test-make-middleware.js.map" }, { - "path": "build/test/middleware/express/test-make-middleware.d.ts" + "path": "build/test/middleware/express/test-make-http-request.js" }, { - "path": "build/test/middleware/express/test-make-middleware.js.map" + "path": "build/test/middleware/express/test-make-middleware.d.ts" }, { "path": "build/test/middleware/express/test-make-middleware.js" }, { - "path": "build/src/index.js.map" + "path": "build/system-test/logging.js.map" }, { - "path": "build/src/entry.d.ts" + "path": "build/system-test/install.d.ts" }, { - "path": "build/src/common.js" + "path": "build/system-test/install.js" }, { - "path": "build/src/log.d.ts" + "path": "build/system-test/install.js.map" }, { - "path": "build/src/metadata.js.map" + "path": "build/system-test/logging.d.ts" }, { - "path": "build/src/entry.js" + "path": "build/system-test/logging.js" }, { - "path": "build/src/http-request.js" + "path": "build/protos/protos.d.ts" }, { - "path": "build/src/sink.js.map" + "path": "build/protos/protos.js" }, { - "path": "build/src/metadata.js" + "path": "build/protos/protos.json" }, { - "path": "build/src/log.js.map" + "path": "build/protos/google/logging/type/http_request.proto" }, { - "path": "build/src/http-request.js.map" + "path": "build/protos/google/logging/type/log_severity.proto" }, { - "path": "build/src/http-request.d.ts" + "path": "build/protos/google/logging/v2/logging_metrics.proto" }, { - "path": "build/src/index.js" + "path": "build/protos/google/logging/v2/logging_config.proto" }, { - "path": "build/src/log.js" + "path": "build/protos/google/logging/v2/log_entry.proto" }, { - "path": "build/src/common.js.map" + "path": "build/protos/google/logging/v2/logging.proto" }, { - "path": "build/src/common.d.ts" + "path": "build/src/metadata.js" + }, + { + "path": "build/src/common.js" }, { "path": "build/src/metadata.d.ts" }, { - "path": "build/src/sink.js" + "path": "build/src/http-request.js.map" }, { - "path": "build/src/sink.d.ts" + "path": "build/src/log.d.ts" + }, + { + "path": "build/src/sink.js" }, { "path": "build/src/entry.js.map" }, { - "path": "build/src/index.d.ts" + "path": "build/src/sink.js.map" }, { - "path": "build/src/v2/metrics_service_v2_client.js" + "path": "build/src/http-request.js" }, { - "path": "build/src/v2/logging_service_v2_proto_list.json" + "path": "build/src/index.js" }, { - "path": "build/src/v2/config_service_v2_client.js" + "path": "build/src/entry.js" }, { - "path": "build/src/v2/logging_service_v2_client.js" + "path": "build/src/sink.d.ts" }, { - "path": "build/src/v2/metrics_service_v2_client_config.json" + "path": "build/src/http-request.d.ts" }, { - "path": "build/src/v2/index.js" + "path": "build/src/common.js.map" }, { - "path": "build/src/v2/metrics_service_v2_proto_list.json" + "path": "build/src/log.js.map" }, { - "path": "build/src/v2/logging_service_v2_client_config.json" + "path": "build/src/entry.d.ts" }, { - "path": "build/src/v2/config_service_v2_proto_list.json" + "path": "build/src/index.js.map" }, { - "path": "build/src/v2/config_service_v2_client_config.json" + "path": "build/src/common.d.ts" }, { - "path": "build/src/v2/.eslintrc.yml" + "path": "build/src/log.js" }, { - "path": "build/src/v2/doc/google/logging/v2/doc_logging_metrics.js" + "path": "build/src/metadata.js.map" }, { - "path": "build/src/v2/doc/google/logging/v2/doc_logging.js" + "path": "build/src/index.d.ts" }, { - "path": "build/src/v2/doc/google/logging/v2/doc_logging_config.js" + "path": "build/src/v2/metrics_service_v2_proto_list.json" }, { - "path": "build/src/v2/doc/google/logging/v2/doc_log_entry.js" + "path": "build/src/v2/metrics_service_v2_client_config.json" }, { - "path": "build/src/v2/doc/google/logging/type/doc_http_request.js" + "path": "build/src/v2/config_service_v2_client_config.json" }, { - "path": "build/src/v2/doc/google/protobuf/doc_any.js" + "path": "build/src/v2/logging_service_v2_proto_list.json" }, { - "path": "build/src/v2/doc/google/protobuf/doc_empty.js" + "path": "build/src/v2/metrics_service_v2_client.js" }, { - "path": "build/src/v2/doc/google/protobuf/doc_field_mask.js" + "path": "build/src/v2/index.js" }, { - "path": "build/src/v2/doc/google/protobuf/doc_duration.js" + "path": "build/src/v2/config_service_v2_proto_list.json" }, { - "path": "build/src/v2/doc/google/protobuf/doc_timestamp.js" + "path": "build/src/v2/logging_service_v2_client.js" }, { - "path": "build/src/v2/doc/google/protobuf/doc_struct.js" + "path": "build/src/v2/logging_service_v2_client_config.json" + }, + { + "path": "build/src/v2/.eslintrc.yml" + }, + { + "path": "build/src/v2/config_service_v2_client.js" }, { "path": "build/src/v2/doc/google/api/doc_label.js" @@ -428,2593 +518,2608 @@ "path": "build/src/v2/doc/google/api/doc_metric.js" }, { - "path": "build/src/middleware/index.js.map" + "path": "build/src/v2/doc/google/logging/type/doc_http_request.js" }, { - "path": "build/src/middleware/context.js.map" + "path": "build/src/v2/doc/google/logging/v2/doc_logging_config.js" }, { - "path": "build/src/middleware/index.js" + "path": "build/src/v2/doc/google/logging/v2/doc_log_entry.js" }, { - "path": "build/src/middleware/context.d.ts" + "path": "build/src/v2/doc/google/logging/v2/doc_logging_metrics.js" }, { - "path": "build/src/middleware/context.js" + "path": "build/src/v2/doc/google/logging/v2/doc_logging.js" }, { - "path": "build/src/middleware/index.d.ts" + "path": "build/src/v2/doc/google/protobuf/doc_timestamp.js" }, { - "path": "build/src/middleware/express/index.js.map" + "path": "build/src/v2/doc/google/protobuf/doc_duration.js" }, { - "path": "build/src/middleware/express/make-middleware.js" + "path": "build/src/v2/doc/google/protobuf/doc_field_mask.js" }, { - "path": "build/src/middleware/express/make-http-request.js.map" + "path": "build/src/v2/doc/google/protobuf/doc_any.js" }, { - "path": "build/src/middleware/express/make-middleware.js.map" + "path": "build/src/v2/doc/google/protobuf/doc_empty.js" }, { - "path": "build/src/middleware/express/make-middleware.d.ts" + "path": "build/src/v2/doc/google/protobuf/doc_struct.js" }, { - "path": "build/src/middleware/express/index.js" + "path": "build/src/middleware/context.js" }, { - "path": "build/src/middleware/express/make-http-request.d.ts" + "path": "build/src/middleware/index.js" }, { - "path": "build/src/middleware/express/make-http-request.js" + "path": "build/src/middleware/context.js.map" }, { - "path": "build/src/middleware/express/index.d.ts" + "path": "build/src/middleware/context.d.ts" }, { - "path": "build/protos/protos.json" + "path": "build/src/middleware/index.js.map" }, { - "path": "build/protos/protos.js" + "path": "build/src/middleware/index.d.ts" }, { - "path": "build/protos/protos.d.ts" + "path": "build/src/middleware/express/make-middleware.js.map" }, { - "path": "build/protos/google/logging/v2/logging_config.proto" + "path": "build/src/middleware/express/index.js" }, { - "path": "build/protos/google/logging/v2/logging.proto" + "path": "build/src/middleware/express/index.js.map" }, { - "path": "build/protos/google/logging/v2/logging_metrics.proto" + "path": "build/src/middleware/express/make-http-request.d.ts" }, { - "path": "build/protos/google/logging/v2/log_entry.proto" + "path": "build/src/middleware/express/make-http-request.js" }, { - "path": "build/protos/google/logging/type/http_request.proto" + "path": "build/src/middleware/express/make-middleware.js" }, { - "path": "build/protos/google/logging/type/log_severity.proto" + "path": "build/src/middleware/express/make-http-request.js.map" }, { - "path": "samples/http-request.js" + "path": "build/src/middleware/express/make-middleware.d.ts" }, { - "path": "samples/README.md" + "path": "build/src/middleware/express/index.d.ts" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/google/logging/type/http_request.proto" + }, + { + "path": "protos/google/logging/type/log_severity.proto" + }, + { + "path": "protos/google/logging/v2/logging_metrics.proto" }, { - "path": "samples/quickstart.js" + "path": "protos/google/logging/v2/logging_config.proto" }, { - "path": "samples/sinks.js" + "path": "protos/google/logging/v2/log_entry.proto" }, { - "path": "samples/logs.js" + "path": "protos/google/logging/v2/logging.proto" }, { - "path": "samples/package.json" + "path": ".git/shallow" }, { - "path": "samples/.eslintrc.yml" + "path": ".git/HEAD" }, { - "path": "samples/fluent.js" + "path": ".git/config" }, { - "path": "samples/test/quickstart.test.js" + "path": ".git/packed-refs" }, { - "path": "samples/test/sinks.test.js" + "path": ".git/index" }, { - "path": "samples/test/logs.test.js" + "path": ".git/objects/pack/pack-e49520443507c78c406ec9f8f8525ee9b82ef0da.idx" }, { - "path": "samples/test/http-request.test.js" + "path": ".git/objects/pack/pack-e49520443507c78c406ec9f8f8525ee9b82ef0da.pack" }, { - "path": "samples/test/fluent.test.js" + "path": ".git/logs/HEAD" }, { - "path": "samples/test/.eslintrc.yml" + "path": ".git/logs/refs/heads/master" }, { - "path": "smoke-test/.eslintrc.yml" + "path": ".git/logs/refs/heads/autosynth" }, { - "path": "smoke-test/logging_service_v2_smoke_test.js" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": "test/log.ts" + "path": ".git/refs/heads/master" }, { - "path": "test/index.ts" + "path": ".git/refs/heads/autosynth" }, { - "path": "test/mocha.opts" + "path": ".git/refs/remotes/origin/HEAD" }, { - "path": "test/sink.ts" + "path": "src/common.ts" }, { - "path": "test/entry.ts" + "path": "src/service_proto_list.json" }, { - "path": "test/common.ts" + "path": "src/http-request.ts" }, { - "path": "test/.eslintrc.yml" + "path": "src/index.ts" }, { - "path": "test/gapic-v2.js" + "path": "src/entry.ts" }, { - "path": "test/metadata.ts" + "path": "src/sink.ts" }, { - "path": "test/middleware/test-context.ts" + "path": "src/metadata.ts" }, { - "path": "test/middleware/express/test-make-middleware.ts" + "path": "src/log.ts" }, { - "path": "test/middleware/express/test-make-http-request.ts" + "path": "src/v2/metrics_service_v2_proto_list.json" }, { - "path": "node_modules/array-filter/package.json" + "path": "src/v2/metrics_service_v2_client_config.json" }, { - "path": "node_modules/deep-extend/package.json" + "path": "src/v2/config_service_v2_client_config.json" }, { - "path": "node_modules/uuid/package.json" + "path": "src/v2/logging_service_v2_proto_list.json" }, { - "path": "node_modules/fast-text-encoding/package.json" + "path": "src/v2/metrics_service_v2_client.js" }, { - "path": "node_modules/camelcase-keys/package.json" + "path": "src/v2/index.js" }, { - "path": "node_modules/camelcase-keys/node_modules/map-obj/package.json" + "path": "src/v2/config_service_v2_proto_list.json" }, { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + "path": "src/v2/logging_service_v2_client.js" }, { - "path": "node_modules/is/package.json" + "path": "src/v2/logging_service_v2_client_config.json" }, { - "path": "node_modules/next-tick/package.json" + "path": "src/v2/.eslintrc.yml" }, { - "path": "node_modules/resolve/package.json" + "path": "src/v2/config_service_v2_client.js" }, { - "path": "node_modules/module-not-found-error/package.json" + "path": "src/v2/doc/google/api/doc_label.js" }, { - "path": "node_modules/intelli-espower-loader/package.json" + "path": "src/v2/doc/google/api/doc_distribution.js" }, { - "path": "node_modules/optionator/package.json" + "path": "src/v2/doc/google/api/doc_monitored_resource.js" }, { - "path": "node_modules/strip-ansi/package.json" + "path": "src/v2/doc/google/api/doc_metric.js" }, { - "path": "node_modules/string-format-obj/package.json" + "path": "src/v2/doc/google/logging/type/doc_http_request.js" }, { - "path": "node_modules/merge-estraverse-visitors/package.json" + "path": "src/v2/doc/google/logging/v2/doc_logging_config.js" }, { - "path": "node_modules/restore-cursor/package.json" + "path": "src/v2/doc/google/logging/v2/doc_log_entry.js" }, { - "path": "node_modules/multi-stage-sourcemap/package.json" + "path": "src/v2/doc/google/logging/v2/doc_logging_metrics.js" }, { - "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" + "path": "src/v2/doc/google/logging/v2/doc_logging.js" }, { - "path": "node_modules/power-assert-util-string-width/package.json" + "path": "src/v2/doc/google/protobuf/doc_timestamp.js" }, { - "path": "node_modules/once/package.json" + "path": "src/v2/doc/google/protobuf/doc_duration.js" }, { - "path": "node_modules/util-deprecate/package.json" + "path": "src/v2/doc/google/protobuf/doc_field_mask.js" }, { - "path": "node_modules/minimist/package.json" + "path": "src/v2/doc/google/protobuf/doc_any.js" }, { - "path": "node_modules/fast-deep-equal/package.json" + "path": "src/v2/doc/google/protobuf/doc_empty.js" }, { - "path": "node_modules/es6-map/package.json" + "path": "src/v2/doc/google/protobuf/doc_struct.js" }, { - "path": "node_modules/text-table/package.json" + "path": "src/middleware/context.ts" }, { - "path": "node_modules/os-tmpdir/package.json" + "path": "src/middleware/index.ts" }, { - "path": "node_modules/boxen/package.json" + "path": "src/middleware/express/make-http-request.ts" }, { - "path": "node_modules/boxen/node_modules/type-fest/package.json" + "path": "src/middleware/express/index.ts" }, { - "path": "node_modules/deep-is/package.json" + "path": "src/middleware/express/make-middleware.ts" }, { - "path": "node_modules/assertion-error/package.json" + "path": "node_modules/strip-final-newline/package.json" }, { - "path": "node_modules/nth-check/package.json" + "path": "node_modules/progress/package.json" }, { - "path": "node_modules/import-lazy/package.json" + "path": "node_modules/is-ci/package.json" }, { - "path": "node_modules/big.js/package.json" + "path": "node_modules/lolex/package.json" }, { - "path": "node_modules/astral-regex/package.json" + "path": "node_modules/snakecase-keys/package.json" }, { - "path": "node_modules/mkdirp/package.json" + "path": "node_modules/module-not-found-error/package.json" }, { - "path": "node_modules/mkdirp/node_modules/minimist/package.json" + "path": "node_modules/lru-cache/package.json" }, { - "path": "node_modules/quick-lru/package.json" + "path": "node_modules/destroy/package.json" }, { - "path": "node_modules/jsdoc/package.json" + "path": "node_modules/power-assert-context-formatter/package.json" }, { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + "path": "node_modules/fast-json-stable-stringify/package.json" }, { - "path": "node_modules/growl/package.json" + "path": "node_modules/nice-try/package.json" }, { - "path": "node_modules/acorn-jsx/package.json" + "path": "node_modules/which-module/package.json" }, { - "path": "node_modules/doctrine/package.json" + "path": "node_modules/array-find/package.json" }, { - "path": "node_modules/@bcoe/v8-coverage/package.json" + "path": "node_modules/catharsis/package.json" }, { - "path": "node_modules/chai/package.json" + "path": "node_modules/is-promise/package.json" }, { - "path": "node_modules/destroy/package.json" + "path": "node_modules/v8-compile-cache/package.json" }, { - "path": "node_modules/ini/package.json" + "path": "node_modules/doctrine/package.json" }, { - "path": "node_modules/compressible/package.json" + "path": "node_modules/callsites/package.json" }, { - "path": "node_modules/json-parse-better-errors/package.json" + "path": "node_modules/diff/package.json" }, { - "path": "node_modules/requizzle/package.json" + "path": "node_modules/hosted-git-info/package.json" }, { - "path": "node_modules/@szmarczak/http-timer/package.json" + "path": "node_modules/color-name/package.json" }, { - "path": "node_modules/indexof/package.json" + "path": "node_modules/defer-to-connect/package.json" }, { - "path": "node_modules/p-cancelable/package.json" + "path": "node_modules/unpipe/package.json" }, { - "path": "node_modules/@sinonjs/formatio/package.json" + "path": "node_modules/emoji-regex/package.json" }, { - "path": "node_modules/@sinonjs/samsam/package.json" + "path": "node_modules/http-errors/package.json" }, { - "path": "node_modules/@sinonjs/commons/package.json" + "path": "node_modules/eventemitter3/package.json" }, { - "path": "node_modules/@sinonjs/text-encoding/package.json" + "path": "node_modules/hex2dec/package.json" }, { - "path": "node_modules/snakecase-keys/package.json" + "path": "node_modules/esutils/package.json" }, { - "path": "node_modules/@types/uuid/package.json" + "path": "node_modules/npm-run-path/package.json" }, { - "path": "node_modules/@types/is/package.json" + "path": "node_modules/he/package.json" }, { - "path": "node_modules/@types/sinon/package.json" + "path": "node_modules/on-finished/package.json" }, { - "path": "node_modules/@types/node/package.json" + "path": "node_modules/linkinator/package.json" }, { - "path": "node_modules/@types/through2/package.json" + "path": "node_modules/linkinator/node_modules/update-notifier/package.json" }, { - "path": "node_modules/@types/proxyquire/package.json" + "path": "node_modules/linkinator/node_modules/redent/package.json" }, { - "path": "node_modules/@types/mv/package.json" + "path": "node_modules/linkinator/node_modules/semver-diff/package.json" }, { - "path": "node_modules/@types/ncp/package.json" + "path": "node_modules/linkinator/node_modules/meow/package.json" }, { - "path": "node_modules/@types/color-name/package.json" + "path": "node_modules/linkinator/node_modules/term-size/package.json" }, { - "path": "node_modules/@types/duplexify/package.json" + "path": "node_modules/linkinator/node_modules/indent-string/package.json" }, { - "path": "node_modules/@types/tmp/package.json" + "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/@types/on-finished/package.json" + "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" }, { - "path": "node_modules/@types/long/package.json" + "path": "node_modules/linkinator/node_modules/boxen/package.json" }, { - "path": "node_modules/@types/is-windows/package.json" + "path": "node_modules/linkinator/node_modules/chalk/package.json" }, { - "path": "node_modules/@types/extend/package.json" + "path": "node_modules/linkinator/node_modules/arrify/package.json" }, { - "path": "node_modules/@types/pumpify/package.json" + "path": "node_modules/linkinator/node_modules/widest-line/package.json" }, { - "path": "node_modules/@types/mocha/package.json" + "path": "node_modules/linkinator/node_modules/global-dirs/package.json" }, { - "path": "node_modules/p-timeout/package.json" + "path": "node_modules/linkinator/node_modules/parse-json/package.json" }, { - "path": "node_modules/p-timeout/node_modules/p-finally/package.json" + "path": "node_modules/linkinator/node_modules/is-npm/package.json" }, { - "path": "node_modules/ext/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg/package.json" }, { - "path": "node_modules/ext/node_modules/type/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" }, { - "path": "node_modules/tslint/package.json" + "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/tslint/node_modules/semver/package.json" + "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" }, { - "path": "node_modules/is-plain-obj/package.json" + "path": "node_modules/linkinator/node_modules/strip-indent/package.json" }, { - "path": "node_modules/widest-line/package.json" + "path": "node_modules/linkinator/node_modules/quick-lru/package.json" }, { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + "path": "node_modules/linkinator/node_modules/minimist-options/package.json" }, { - "path": "node_modules/widest-line/node_modules/string-width/package.json" + "path": "node_modules/update-notifier/package.json" }, { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + "path": "node_modules/update-notifier/node_modules/dot-prop/package.json" }, { - "path": "node_modules/natural-compare/package.json" + "path": "node_modules/update-notifier/node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/node-fetch/package.json" + "path": "node_modules/update-notifier/node_modules/is-obj/package.json" }, { - "path": "node_modules/builtin-modules/package.json" + "path": "node_modules/update-notifier/node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/xmlcreate/package.json" + "path": "node_modules/update-notifier/node_modules/make-dir/package.json" }, { - "path": "node_modules/indent-string/package.json" + "path": "node_modules/update-notifier/node_modules/unique-string/package.json" }, { - "path": "node_modules/unpipe/package.json" + "path": "node_modules/update-notifier/node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/string-width/package.json" + "path": "node_modules/update-notifier/node_modules/configstore/package.json" }, { - "path": "node_modules/base64-js/package.json" + "path": "node_modules/p-cancelable/package.json" }, { - "path": "node_modules/cli-width/package.json" + "path": "node_modules/markdown-it/package.json" }, { - "path": "node_modules/sprintf-js/package.json" + "path": "node_modules/dot-prop/package.json" }, { - "path": "node_modules/prelude-ls/package.json" + "path": "node_modules/require-main-filename/package.json" }, { - "path": "node_modules/currently-unhandled/package.json" + "path": "node_modules/fast-diff/package.json" }, { - "path": "node_modules/ms/package.json" + "path": "node_modules/lodash.camelcase/package.json" }, { - "path": "node_modules/jwa/package.json" + "path": "node_modules/mv/package.json" }, { - "path": "node_modules/deep-equal/package.json" + "path": "node_modules/mv/node_modules/rimraf/package.json" }, { - "path": "node_modules/jsdoc-fresh/package.json" + "path": "node_modules/mv/node_modules/glob/package.json" }, { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + "path": "node_modules/redent/package.json" }, { - "path": "node_modules/jws/package.json" + "path": "node_modules/resolve/package.json" }, { - "path": "node_modules/array-from/package.json" + "path": "node_modules/globals/package.json" }, { - "path": "node_modules/crypto-random-string/package.json" + "path": "node_modules/range-parser/package.json" }, { - "path": "node_modules/callsites/package.json" + "path": "node_modules/string.prototype.trimright/package.json" }, { - "path": "node_modules/responselike/package.json" + "path": "node_modules/inflight/package.json" }, { - "path": "node_modules/defer-to-connect/package.json" + "path": "node_modules/debug/package.json" }, { - "path": "node_modules/core-util-is/package.json" + "path": "node_modules/htmlparser2/package.json" }, { - "path": "node_modules/map-obj/package.json" + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" }, { - "path": "node_modules/isexe/package.json" + "path": "node_modules/semver-diff/package.json" }, { - "path": "node_modules/is-url/package.json" + "path": "node_modules/semver-diff/node_modules/semver/package.json" }, { - "path": "node_modules/markdown-it/package.json" + "path": "node_modules/emitter-listener/package.json" }, { - "path": "node_modules/sinon/package.json" + "path": "node_modules/tsutils/package.json" }, { - "path": "node_modules/sinon/node_modules/diff/package.json" + "path": "node_modules/multi-stage-sourcemap/package.json" }, { - "path": "node_modules/sinon/node_modules/supports-color/package.json" + "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" }, { - "path": "node_modules/decamelize/package.json" + "path": "node_modules/ms/package.json" }, { - "path": "node_modules/strip-indent/package.json" + "path": "node_modules/linkify-it/package.json" }, { - "path": "node_modules/require-main-filename/package.json" + "path": "node_modules/through/package.json" }, { - "path": "node_modules/source-map/package.json" + "path": "node_modules/power-assert-renderer-file/package.json" }, { - "path": "node_modules/spdx-correct/package.json" + "path": "node_modules/string-width/package.json" }, { - "path": "node_modules/semver-diff/package.json" + "path": "node_modules/html-escaper/package.json" }, { - "path": "node_modules/semver-diff/node_modules/semver/package.json" + "path": "node_modules/type/package.json" }, { - "path": "node_modules/google-auth-library/package.json" + "path": "node_modules/type-fest/package.json" }, { - "path": "node_modules/tsutils/package.json" + "path": "node_modules/is/package.json" }, { - "path": "node_modules/type-fest/package.json" + "path": "node_modules/intelli-espower-loader/package.json" }, { - "path": "node_modules/entities/package.json" + "path": "node_modules/parseurl/package.json" }, { - "path": "node_modules/object-keys/package.json" + "path": "node_modules/buffer-from/package.json" }, { - "path": "node_modules/lru-cache/package.json" + "path": "node_modules/google-p12-pem/package.json" }, { - "path": "node_modules/prettier/package.json" + "path": "node_modules/get-caller-file/package.json" }, { - "path": "node_modules/log-symbols/package.json" + "path": "node_modules/klaw/package.json" }, { - "path": "node_modules/@google-cloud/pubsub/package.json" + "path": "node_modules/http-proxy-agent/package.json" }, { - "path": "node_modules/@google-cloud/precise-date/package.json" + "path": "node_modules/http-proxy-agent/node_modules/debug/package.json" }, { - "path": "node_modules/@google-cloud/paginator/package.json" + "path": "node_modules/http-proxy-agent/node_modules/agent-base/package.json" }, { - "path": "node_modules/@google-cloud/common/package.json" + "path": "node_modules/map-obj/package.json" }, { - "path": "node_modules/@google-cloud/storage/package.json" + "path": "node_modules/node-fetch/package.json" }, { - "path": "node_modules/@google-cloud/storage/node_modules/readable-stream/package.json" + "path": "node_modules/jsonexport/package.json" }, { - "path": "node_modules/@google-cloud/projectify/package.json" + "path": "node_modules/isexe/package.json" }, { - "path": "node_modules/@google-cloud/promisify/package.json" + "path": "node_modules/escallmatch/package.json" }, { - "path": "node_modules/@google-cloud/bigquery/package.json" + "path": "node_modules/escallmatch/node_modules/esprima/package.json" }, { - "path": "node_modules/@google-cloud/bigquery/node_modules/readable-stream/package.json" + "path": "node_modules/espower/package.json" }, { - "path": "node_modules/@google-cloud/bigquery/node_modules/duplexify/package.json" + "path": "node_modules/espower/node_modules/source-map/package.json" }, { - "path": "node_modules/es6-iterator/package.json" + "path": "node_modules/run-async/package.json" }, { - "path": "node_modules/eventemitter3/package.json" + "path": "node_modules/validate-npm-package-license/package.json" }, { - "path": "node_modules/p-limit/package.json" + "path": "node_modules/file-entry-cache/package.json" }, { - "path": "node_modules/readable-stream/package.json" + "path": "node_modules/meow/package.json" }, { - "path": "node_modules/optimist/package.json" + "path": "node_modules/meow/node_modules/camelcase/package.json" }, { - "path": "node_modules/tslint-config-prettier/package.json" + "path": "node_modules/meow/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/execa/package.json" + "path": "node_modules/concat-map/package.json" }, { - "path": "node_modules/etag/package.json" + "path": "node_modules/term-size/package.json" }, { - "path": "node_modules/gaxios/package.json" + "path": "node_modules/term-size/node_modules/lru-cache/package.json" }, { - "path": "node_modules/continuation-local-storage/package.json" + "path": "node_modules/term-size/node_modules/npm-run-path/package.json" }, { - "path": "node_modules/arrify/package.json" + "path": "node_modules/term-size/node_modules/yallist/package.json" }, { - "path": "node_modules/esquery/package.json" + "path": "node_modules/term-size/node_modules/path-key/package.json" }, { - "path": "node_modules/istanbul-lib-report/package.json" + "path": "node_modules/term-size/node_modules/shebang-command/package.json" }, { - "path": "node_modules/istanbul-lib-report/node_modules/make-dir/package.json" + "path": "node_modules/term-size/node_modules/execa/package.json" }, { - "path": "node_modules/istanbul-lib-report/node_modules/semver/package.json" + "path": "node_modules/term-size/node_modules/get-stream/package.json" }, { - "path": "node_modules/hash-stream-validation/package.json" + "path": "node_modules/term-size/node_modules/is-stream/package.json" }, { - "path": "node_modules/hash-stream-validation/node_modules/through2/package.json" + "path": "node_modules/term-size/node_modules/which/package.json" }, { - "path": "node_modules/p-locate/package.json" + "path": "node_modules/term-size/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/acorn-es7-plugin/package.json" + "path": "node_modules/term-size/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/ajv/package.json" + "path": "node_modules/xmlcreate/package.json" }, { - "path": "node_modules/espree/package.json" + "path": "node_modules/ansi-regex/package.json" }, { - "path": "node_modules/isarray/package.json" + "path": "node_modules/yallist/package.json" }, { - "path": "node_modules/es6-symbol/package.json" + "path": "node_modules/d64/package.json" }, { - "path": "node_modules/@opencensus/core/package.json" + "path": "node_modules/json-bigint/package.json" }, { - "path": "node_modules/@opencensus/propagation-stackdriver/package.json" + "path": "node_modules/json-bigint/node_modules/bignumber.js/package.json" }, { - "path": "node_modules/redent/package.json" + "path": "node_modules/stream-events/package.json" }, { - "path": "node_modules/catharsis/package.json" + "path": "node_modules/resolve-from/package.json" }, { - "path": "node_modules/chardet/package.json" + "path": "node_modules/is-buffer/package.json" }, { - "path": "node_modules/domelementtype/package.json" + "path": "node_modules/cliui/package.json" }, { - "path": "node_modules/http-cache-semantics/package.json" + "path": "node_modules/toidentifier/package.json" }, { - "path": "node_modules/nock/package.json" + "path": "node_modules/balanced-match/package.json" }, { - "path": "node_modules/nock/node_modules/debug/package.json" + "path": "node_modules/assert-rejects/package.json" }, { - "path": "node_modules/commander/package.json" + "path": "node_modules/marked/package.json" }, { - "path": "node_modules/find-up/package.json" + "path": "node_modules/wrappy/package.json" }, { - "path": "node_modules/path-type/package.json" + "path": "node_modules/to-snake-case/package.json" }, { - "path": "node_modules/path-type/node_modules/pify/package.json" + "path": "node_modules/jsdoc-region-tag/package.json" }, { - "path": "node_modules/es-abstract/package.json" + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" }, { - "path": "node_modules/boolbase/package.json" + "path": "node_modules/glob-parent/package.json" }, { - "path": "node_modules/d/package.json" + "path": "node_modules/xtend/package.json" }, { - "path": "node_modules/marked/package.json" + "path": "node_modules/is-arguments/package.json" }, { - "path": "node_modules/is-path-inside/package.json" + "path": "node_modules/set-blocking/package.json" }, { - "path": "node_modules/cli-boxes/package.json" + "path": "node_modules/istanbul-lib-report/package.json" }, { - "path": "node_modules/is-installed-globally/package.json" + "path": "node_modules/load-json-file/package.json" }, { - "path": "node_modules/through2/package.json" + "path": "node_modules/ansi-align/package.json" }, { - "path": "node_modules/globals/package.json" + "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/empower-core/package.json" + "path": "node_modules/ansi-align/node_modules/string-width/package.json" }, { - "path": "node_modules/domutils/package.json" + "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/json-buffer/package.json" + "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/spdx-license-ids/package.json" + "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/mime/package.json" + "path": "node_modules/duplexer3/package.json" }, { - "path": "node_modules/teeny-request/package.json" + "path": "node_modules/esprima/package.json" }, { - "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" + "path": "node_modules/is-stream-ended/package.json" }, { - "path": "node_modules/teeny-request/node_modules/debug/package.json" + "path": "node_modules/minimatch/package.json" }, { - "path": "node_modules/teeny-request/node_modules/agent-base/package.json" + "path": "node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/locate-path/package.json" + "path": "node_modules/growl/package.json" }, { - "path": "node_modules/tslib/package.json" + "path": "node_modules/string.prototype.trimleft/package.json" }, { - "path": "node_modules/nise/package.json" + "path": "node_modules/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/nise/node_modules/lolex/package.json" + "path": "node_modules/normalize-package-data/package.json" }, { - "path": "node_modules/google-p12-pem/package.json" + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" }, { - "path": "node_modules/toidentifier/package.json" + "path": "node_modules/fast-text-encoding/package.json" }, { - "path": "node_modules/power-assert-renderer-base/package.json" + "path": "node_modules/server-destroy/package.json" }, { - "path": "node_modules/read-pkg-up/package.json" + "path": "node_modules/prelude-ls/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + "path": "node_modules/d/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + "path": "node_modules/protobufjs/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + "path": "node_modules/domhandler/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + "path": "node_modules/ansi-escapes/package.json" }, { - "path": "node_modules/eventid/package.json" + "path": "node_modules/power-assert-renderer-base/package.json" }, { - "path": "node_modules/log-driver/package.json" + "path": "node_modules/boolbase/package.json" }, { - "path": "node_modules/flatted/package.json" + "path": "node_modules/indent-string/package.json" }, { - "path": "node_modules/to-space-case/package.json" + "path": "node_modules/lodash/package.json" }, { - "path": "node_modules/async-each/package.json" + "path": "node_modules/taffydb/package.json" }, { - "path": "node_modules/graceful-fs/package.json" + "path": "node_modules/extend/package.json" }, { - "path": "node_modules/array-find/package.json" + "path": "node_modules/is-yarn-global/package.json" }, { - "path": "node_modules/minimist-options/package.json" + "path": "node_modules/dom-serializer/package.json" }, { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" + "path": "node_modules/end-of-stream/package.json" }, { - "path": "node_modules/string.prototype.trimleft/package.json" + "path": "node_modules/log-symbols/package.json" }, { - "path": "node_modules/traverse/package.json" + "path": "node_modules/is-callable/package.json" }, { - "path": "node_modules/rc/package.json" + "path": "node_modules/es5-ext/package.json" }, { - "path": "node_modules/rc/node_modules/minimist/package.json" + "path": "node_modules/stringifier/package.json" }, { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + "path": "node_modules/es6-weak-map/package.json" }, { - "path": "node_modules/signal-exit/package.json" + "path": "node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/finalhandler/package.json" + "path": "node_modules/camelcase-keys/node_modules/map-obj/package.json" }, { - "path": "node_modules/finalhandler/node_modules/ms/package.json" + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" }, { - "path": "node_modules/finalhandler/node_modules/debug/package.json" + "path": "node_modules/log-driver/package.json" }, { - "path": "node_modules/buffer-equal-constant-time/package.json" + "path": "node_modules/decompress-response/package.json" }, { - "path": "node_modules/merge-stream/package.json" + "path": "node_modules/js-yaml/package.json" }, { - "path": "node_modules/fill-keys/package.json" + "path": "node_modules/cli-boxes/package.json" }, { - "path": "node_modules/power-assert-context-reducer-ast/package.json" + "path": "node_modules/is-obj/package.json" }, { - "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" + "path": "node_modules/is-typedarray/package.json" }, { - "path": "node_modules/power-assert-formatter/package.json" + "path": "node_modules/registry-auth-token/package.json" }, { - "path": "node_modules/rimraf/package.json" + "path": "node_modules/hash-stream-validation/package.json" }, { - "path": "node_modules/lolex/package.json" + "path": "node_modules/hash-stream-validation/node_modules/through2/package.json" }, { - "path": "node_modules/spdx-exceptions/package.json" + "path": "node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/js2xmlparser/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" }, { - "path": "node_modules/escape-string-regexp/package.json" + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" }, { - "path": "node_modules/depd/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" }, { - "path": "node_modules/term-size/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" }, { - "path": "node_modules/term-size/node_modules/lru-cache/package.json" + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" }, { - "path": "node_modules/term-size/node_modules/execa/package.json" + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" }, { - "path": "node_modules/term-size/node_modules/is-stream/package.json" + "path": "node_modules/buffer-equal-constant-time/package.json" }, { - "path": "node_modules/term-size/node_modules/shebang-command/package.json" + "path": "node_modules/@bcoe/v8-coverage/package.json" }, { - "path": "node_modules/term-size/node_modules/npm-run-path/package.json" + "path": "node_modules/eslint-scope/package.json" }, { - "path": "node_modules/term-size/node_modules/path-key/package.json" + "path": "node_modules/stream-shift/package.json" }, { - "path": "node_modules/term-size/node_modules/shebang-regex/package.json" + "path": "node_modules/is-extglob/package.json" }, { - "path": "node_modules/term-size/node_modules/p-finally/package.json" + "path": "node_modules/typedarray-to-buffer/index.js" }, { - "path": "node_modules/term-size/node_modules/cross-spawn/package.json" + "path": "node_modules/typedarray-to-buffer/README.md" }, { - "path": "node_modules/term-size/node_modules/which/package.json" + "path": "node_modules/typedarray-to-buffer/.airtap.yml" }, { - "path": "node_modules/term-size/node_modules/get-stream/package.json" + "path": "node_modules/typedarray-to-buffer/.travis.yml" }, { - "path": "node_modules/term-size/node_modules/yallist/package.json" + "path": "node_modules/typedarray-to-buffer/package.json" }, { - "path": "node_modules/trim-newlines/package.json" + "path": "node_modules/typedarray-to-buffer/LICENSE" }, { - "path": "node_modules/punycode/package.json" + "path": "node_modules/typedarray-to-buffer/test/basic.js" }, { - "path": "node_modules/regexp.prototype.flags/package.json" + "path": "node_modules/restore-cursor/package.json" }, { - "path": "node_modules/es6-set/package.json" + "path": "node_modules/mimic-response/package.json" }, { - "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + "path": "node_modules/normalize-url/package.json" }, { - "path": "node_modules/v8-compile-cache/package.json" + "path": "node_modules/fresh/package.json" }, { - "path": "node_modules/make-dir/package.json" + "path": "node_modules/imurmurhash/package.json" }, { - "path": "node_modules/functional-red-black-tree/package.json" + "path": "node_modules/indexof/package.json" }, { - "path": "node_modules/urlgrey/package.json" + "path": "node_modules/continuation-local-storage/package.json" }, { - "path": "node_modules/esrecurse/package.json" + "path": "node_modules/codecov/package.json" }, { - "path": "node_modules/check-error/package.json" + "path": "node_modules/codecov/node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/has-symbols/package.json" + "path": "node_modules/codecov/node_modules/teeny-request/package.json" }, { - "path": "node_modules/p-defer/package.json" + "path": "node_modules/ajv/package.json" }, { - "path": "node_modules/eslint-plugin-es/package.json" + "path": "node_modules/is-path-inside/package.json" }, { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + "path": "node_modules/import-lazy/package.json" }, { - "path": "node_modules/gcs-resumable-upload/package.json" + "path": "node_modules/json-schema-traverse/package.json" }, { - "path": "node_modules/mdurl/package.json" + "path": "node_modules/ncp/package.json" }, { - "path": "node_modules/xtend/package.json" + "path": "node_modules/rxjs/package.json" }, { - "path": "node_modules/underscore/package.json" + "path": "node_modules/p-locate/package.json" }, { - "path": "node_modules/imurmurhash/package.json" + "path": "node_modules/figures/package.json" }, { - "path": "node_modules/es6-weak-map/package.json" + "path": "node_modules/underscore/package.json" }, { - "path": "node_modules/strip-eof/package.json" + "path": "node_modules/finalhandler/package.json" }, { - "path": "node_modules/onetime/package.json" + "path": "node_modules/finalhandler/node_modules/debug/package.json" }, { - "path": "node_modules/resolve-from/package.json" + "path": "node_modules/finalhandler/node_modules/ms/package.json" }, { - "path": "node_modules/write/package.json" + "path": "node_modules/ignore/package.json" }, { - "path": "node_modules/domhandler/package.json" + "path": "node_modules/argv/package.json" }, { - "path": "node_modules/css-what/package.json" + "path": "node_modules/path-is-absolute/package.json" }, { - "path": "node_modules/ecdsa-sig-formatter/package.json" + "path": "node_modules/graceful-fs/package.json" }, { - "path": "node_modules/google-gax/package.json" + "path": "node_modules/currently-unhandled/package.json" }, { - "path": "node_modules/wordwrap/package.json" + "path": "node_modules/gcs-resumable-upload/package.json" }, { - "path": "node_modules/eslint-scope/package.json" + "path": "node_modules/google-gax/package.json" }, { - "path": "node_modules/is-npm/package.json" + "path": "node_modules/google-gax/node_modules/semver/package.json" }, { - "path": "node_modules/http2spy/package.json" + "path": "node_modules/onetime/package.json" }, { - "path": "node_modules/get-stdin/package.json" + "path": "node_modules/path-key/package.json" }, { - "path": "node_modules/set-blocking/package.json" + "path": "node_modules/core-util-is/package.json" }, { - "path": "node_modules/regexpp/package.json" + "path": "node_modules/array-filter/package.json" }, { - "path": "node_modules/is-promise/package.json" + "path": "node_modules/prepend-http/package.json" }, { - "path": "node_modules/has-flag/package.json" + "path": "node_modules/write/package.json" }, { - "path": "node_modules/pify/package.json" + "path": "node_modules/duplexify/package.json" }, { - "path": "node_modules/type-check/package.json" + "path": "node_modules/camelcase/package.json" }, { - "path": "node_modules/is-typedarray/package.json" + "path": "node_modules/error-ex/package.json" }, { - "path": "node_modules/encodeurl/package.json" + "path": "node_modules/empower-assert/package.json" }, { - "path": "node_modules/latest-version/package.json" + "path": "node_modules/boxen/package.json" }, { - "path": "node_modules/diff/package.json" + "path": "node_modules/boxen/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/foreground-child/package.json" + "path": "node_modules/boxen/node_modules/string-width/package.json" }, { - "path": "node_modules/is-stream/package.json" + "path": "node_modules/boxen/node_modules/type-fest/package.json" }, { - "path": "node_modules/get-caller-file/package.json" + "path": "node_modules/boxen/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/proxyquire/package.json" + "path": "node_modules/boxen/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/which-module/package.json" + "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/linkify-it/package.json" + "path": "node_modules/node-environment-flags/package.json" }, { - "path": "node_modules/inquirer/package.json" + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/package.json" + "path": "node_modules/c8/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + "path": "node_modules/gcp-metadata/package.json" }, { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + "path": "node_modules/json-buffer/package.json" }, { - "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/mkdirp/package.json" }, { - "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + "path": "node_modules/bluebird/package.json" }, { - "path": "node_modules/espower-loader/package.json" + "path": "node_modules/big.js/package.json" }, { - "path": "node_modules/eslint-plugin-node/package.json" + "path": "node_modules/shebang-command/package.json" }, { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + "path": "node_modules/serve-static/package.json" }, { - "path": "node_modules/@babel/highlight/package.json" + "path": "node_modules/path-parse/package.json" }, { - "path": "node_modules/@babel/parser/package.json" + "path": "node_modules/mime/package.json" }, { - "path": "node_modules/@babel/code-frame/package.json" + "path": "node_modules/yargs-unparser/package.json" }, { - "path": "node_modules/es6-promisify/package.json" + "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" }, { - "path": "node_modules/amdefine/package.json" + "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/is-ci/package.json" + "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" }, { - "path": "node_modules/deep-eql/package.json" + "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/string.prototype.trimright/package.json" + "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" }, { - "path": "node_modules/mv/package.json" + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" }, { - "path": "node_modules/mv/node_modules/rimraf/package.json" + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" }, { - "path": "node_modules/mv/node_modules/glob/package.json" + "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/to-snake-case/package.json" + "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/json-stringify-safe/package.json" + "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/end-of-stream/package.json" + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" }, { - "path": "node_modules/strip-final-newline/package.json" + "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/glob/package.json" + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" }, { - "path": "node_modules/strip-json-comments/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" }, { - "path": "node_modules/object-inspect/package.json" + "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" }, { - "path": "node_modules/gts/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/gts/node_modules/has-flag/package.json" + "path": "node_modules/lines-and-columns/package.json" }, { - "path": "node_modules/gts/node_modules/color-convert/package.json" + "path": "node_modules/is-url/package.json" }, { - "path": "node_modules/gts/node_modules/supports-color/package.json" + "path": "node_modules/chalk/package.json" }, { - "path": "node_modules/gts/node_modules/color-name/package.json" + "path": "node_modules/chalk/node_modules/color-name/package.json" }, { - "path": "node_modules/gts/node_modules/ansi-styles/package.json" + "path": "node_modules/chalk/node_modules/has-flag/package.json" }, { - "path": "node_modules/gts/node_modules/chalk/package.json" + "path": "node_modules/chalk/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/acorn/package.json" + "path": "node_modules/chalk/node_modules/supports-color/package.json" }, { - "path": "node_modules/path-is-inside/package.json" + "path": "node_modules/chalk/node_modules/color-convert/package.json" }, { - "path": "node_modules/table/package.json" + "path": "node_modules/path-to-regexp/package.json" }, { - "path": "node_modules/node-forge/package.json" + "path": "node_modules/path-to-regexp/node_modules/isarray/package.json" }, { - "path": "node_modules/bignumber.js/package.json" + "path": "node_modules/locate-path/package.json" }, { - "path": "node_modules/ent/package.json" + "path": "node_modules/spdx-expression-parse/package.json" }, { - "path": "node_modules/ansi-regex/package.json" + "path": "node_modules/power-assert-util-string-width/package.json" }, { - "path": "node_modules/eslint-utils/package.json" + "path": "node_modules/esquery/package.json" }, { - "path": "node_modules/event-emitter/package.json" + "path": "node_modules/to-readable-stream/package.json" }, { - "path": "node_modules/statuses/package.json" + "path": "node_modules/eventid/package.json" }, { - "path": "node_modules/espower/package.json" + "path": "node_modules/jsdoc-fresh/package.json" }, { - "path": "node_modules/espower/node_modules/source-map/package.json" + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" }, { - "path": "node_modules/is-regex/package.json" + "path": "node_modules/espower-location-detector/package.json" }, { - "path": "node_modules/taffydb/package.json" + "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" }, { - "path": "node_modules/core-js/package.json" + "path": "node_modules/strip-ansi/package.json" }, { - "path": "node_modules/levn/package.json" + "path": "node_modules/is-arrayish/package.json" }, { - "path": "node_modules/dot-prop/package.json" + "path": "node_modules/prettier-linter-helpers/package.json" }, { - "path": "node_modules/shebang-command/package.json" + "path": "node_modules/chardet/package.json" }, { - "path": "node_modules/power-assert-renderer-file/package.json" + "path": "node_modules/amdefine/package.json" }, { - "path": "node_modules/path-parse/package.json" + "path": "node_modules/http-cache-semantics/package.json" }, { - "path": "node_modules/ci-info/package.json" + "path": "node_modules/concat-stream/package.json" }, { - "path": "node_modules/test-exclude/package.json" + "path": "node_modules/concat-stream/node_modules/readable-stream/package.json" }, { - "path": "node_modules/abort-controller/package.json" + "path": "node_modules/has-flag/package.json" }, { - "path": "node_modules/normalize-package-data/package.json" + "path": "node_modules/cheerio/package.json" }, { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + "path": "node_modules/domelementtype/package.json" }, { - "path": "node_modules/fast-levenshtein/package.json" + "path": "node_modules/@szmarczak/http-timer/package.json" }, { - "path": "node_modules/color-convert/package.json" + "path": "node_modules/tmp/package.json" }, { - "path": "node_modules/minimatch/package.json" + "path": "node_modules/entities/package.json" }, { - "path": "node_modules/cliui/package.json" + "path": "node_modules/execa/package.json" }, { - "path": "node_modules/empower-assert/package.json" + "path": "node_modules/strip-bom/package.json" }, { - "path": "node_modules/npm-run-path/package.json" + "path": "node_modules/is-regexp/package.json" }, { - "path": "node_modules/snakeize/package.json" + "path": "node_modules/argparse/package.json" }, { - "path": "node_modules/ignore-walk/package.json" + "path": "node_modules/has/package.json" }, { - "path": "node_modules/configstore/package.json" + "path": "node_modules/ee-first/package.json" }, { - "path": "node_modules/is-extglob/package.json" + "path": "node_modules/object-inspect/package.json" }, { - "path": "node_modules/duplexer3/package.json" + "path": "node_modules/deep-equal/package.json" }, { - "path": "node_modules/wide-align/package.json" + "path": "node_modules/table/package.json" }, { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + "path": "node_modules/table/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/wide-align/node_modules/string-width/package.json" + "path": "node_modules/table/node_modules/string-width/package.json" }, { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + "path": "node_modules/table/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/propagate/package.json" + "path": "node_modules/table/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/just-extend/package.json" + "path": "node_modules/spdx-correct/package.json" }, { - "path": "node_modules/retry-request/package.json" + "path": "node_modules/get-stream/package.json" }, { - "path": "node_modules/retry-request/node_modules/debug/package.json" + "path": "node_modules/sinon/package.json" }, { - "path": "node_modules/update-notifier/package.json" + "path": "node_modules/power-assert/package.json" }, { - "path": "node_modules/update-notifier/node_modules/crypto-random-string/package.json" + "path": "node_modules/statuses/package.json" }, { - "path": "node_modules/update-notifier/node_modules/make-dir/package.json" + "path": "node_modules/@istanbuljs/schema/package.json" }, { - "path": "node_modules/update-notifier/node_modules/pify/package.json" + "path": "node_modules/es6-set/package.json" }, { - "path": "node_modules/update-notifier/node_modules/dot-prop/package.json" + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" }, { - "path": "node_modules/update-notifier/node_modules/configstore/package.json" + "path": "node_modules/proxyquire/package.json" }, { - "path": "node_modules/update-notifier/node_modules/unique-string/package.json" + "path": "node_modules/istanbul-reports/package.json" }, { - "path": "node_modules/update-notifier/node_modules/write-file-atomic/package.json" + "path": "node_modules/@grpc/grpc-js/package.json" }, { - "path": "node_modules/update-notifier/node_modules/is-obj/package.json" + "path": "node_modules/@grpc/proto-loader/package.json" }, { - "path": "node_modules/update-notifier/node_modules/xdg-basedir/package.json" + "path": "node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/espurify/package.json" + "path": "node_modules/etag/package.json" }, { - "path": "node_modules/eslint-config-prettier/package.json" + "path": "node_modules/y18n/package.json" }, { - "path": "node_modules/ansi-escapes/package.json" + "path": "node_modules/diff-match-patch/package.json" }, { - "path": "node_modules/markdown-it-anchor/package.json" + "path": "node_modules/merge-descriptors/package.json" }, { - "path": "node_modules/shimmer/package.json" + "path": "node_modules/es6-iterator/package.json" }, { - "path": "node_modules/power-assert-renderer-comparison/package.json" + "path": "node_modules/eslint-plugin-node/package.json" }, { - "path": "node_modules/safe-buffer/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" }, { - "path": "node_modules/ncp/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/has-yarn/package.json" + "path": "node_modules/natural-compare/package.json" }, { - "path": "node_modules/import-fresh/package.json" + "path": "node_modules/uuid/package.json" }, { - "path": "node_modules/supports-color/package.json" + "path": "node_modules/event-target-shim/package.json" }, { - "path": "node_modules/progress/package.json" + "path": "node_modules/arrify/package.json" }, { - "path": "node_modules/typedarray/package.json" + "path": "node_modules/widest-line/package.json" }, { - "path": "node_modules/path-exists/package.json" + "path": "node_modules/widest-line/node_modules/string-width/package.json" }, { - "path": "node_modules/inherits/package.json" + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/decompress-response/package.json" + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/object.getownpropertydescriptors/package.json" + "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/mute-stream/package.json" + "path": "node_modules/ignore-walk/package.json" }, { - "path": "node_modules/https-proxy-agent/package.json" + "path": "node_modules/util-deprecate/package.json" }, { - "path": "node_modules/to-readable-stream/package.json" + "path": "node_modules/function-bind/package.json" }, { - "path": "node_modules/merge-descriptors/package.json" + "path": "node_modules/object-is/package.json" }, { - "path": "node_modules/pathval/package.json" + "path": "node_modules/@types/color-name/package.json" }, { - "path": "node_modules/fast-json-stable-stringify/package.json" + "path": "node_modules/@types/on-finished/package.json" }, { - "path": "node_modules/brace-expansion/package.json" + "path": "node_modules/@types/mv/package.json" }, { - "path": "node_modules/color-name/package.json" + "path": "node_modules/@types/is/package.json" }, { - "path": "node_modules/js-yaml/package.json" + "path": "node_modules/@types/node/package.json" }, { - "path": "node_modules/run-async/package.json" + "path": "node_modules/@types/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/human-signals/package.json" + "path": "node_modules/@types/normalize-package-data/package.json" }, { - "path": "node_modules/eslint-visitor-keys/package.json" + "path": "node_modules/@types/extend/package.json" }, { - "path": "node_modules/flat-cache/package.json" + "path": "node_modules/@types/ncp/package.json" }, { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + "path": "node_modules/@types/duplexify/package.json" }, { - "path": "node_modules/range-parser/package.json" + "path": "node_modules/@types/tmp/package.json" }, { - "path": "node_modules/parseurl/package.json" + "path": "node_modules/@types/sinon/package.json" }, { - "path": "node_modules/node-environment-flags/package.json" + "path": "node_modules/@types/proxyquire/package.json" }, { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + "path": "node_modules/@types/uuid/package.json" }, { - "path": "node_modules/fresh/package.json" + "path": "node_modules/@types/is-windows/package.json" }, { - "path": "node_modules/universal-deep-strict-equal/package.json" + "path": "node_modules/@types/pumpify/package.json" }, { - "path": "node_modules/assert-rejects/package.json" + "path": "node_modules/@types/mocha/package.json" }, { - "path": "node_modules/path-to-regexp/package.json" + "path": "node_modules/@types/minimist/package.json" }, { - "path": "node_modules/path-to-regexp/node_modules/isarray/package.json" + "path": "node_modules/@types/fs-extra/package.json" }, { - "path": "node_modules/ansi-align/package.json" + "path": "node_modules/@types/long/package.json" }, { - "path": "node_modules/loud-rejection/package.json" + "path": "node_modules/@types/through2/package.json" }, { - "path": "node_modules/@protobufjs/path/package.json" + "path": "node_modules/is-windows/package.json" }, { - "path": "node_modules/@protobufjs/float/package.json" + "path": "node_modules/levn/package.json" }, { - "path": "node_modules/@protobufjs/utf8/package.json" + "path": "node_modules/pseudomap/package.json" }, { - "path": "node_modules/@protobufjs/eventemitter/package.json" + "path": "node_modules/global-dirs/package.json" }, { - "path": "node_modules/@protobufjs/base64/package.json" + "path": "node_modules/power-assert-renderer-diagram/package.json" }, { - "path": "node_modules/@protobufjs/pool/package.json" + "path": "node_modules/is-stream/package.json" }, { - "path": "node_modules/@protobufjs/codegen/package.json" + "path": "node_modules/es6-symbol/package.json" }, { - "path": "node_modules/@protobufjs/aspromise/package.json" + "path": "node_modules/compressible/package.json" }, { - "path": "node_modules/@protobufjs/fetch/package.json" + "path": "node_modules/parse-json/package.json" }, { - "path": "node_modules/@protobufjs/inquire/package.json" + "path": "node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/is-date-object/package.json" + "path": "node_modules/spdx-license-ids/package.json" }, { - "path": "node_modules/argparse/package.json" + "path": "node_modules/google-auth-library/package.json" }, { - "path": "node_modules/clone-response/package.json" + "path": "node_modules/brace-expansion/package.json" }, { - "path": "node_modules/serve-static/package.json" + "path": "node_modules/builtin-modules/package.json" }, { - "path": "node_modules/p-queue/package.json" + "path": "node_modules/tslint/package.json" }, { - "path": "node_modules/path-key/package.json" + "path": "node_modules/tslint/node_modules/semver/package.json" }, { - "path": "node_modules/lodash.camelcase/package.json" + "path": "node_modules/type-name/package.json" }, { - "path": "node_modules/duplexify/package.json" + "path": "node_modules/string-format-obj/package.json" }, { - "path": "node_modules/ignore/package.json" + "path": "node_modules/define-properties/package.json" }, { - "path": "node_modules/http-errors/package.json" + "path": "node_modules/universal-deep-strict-equal/package.json" }, { - "path": "node_modules/lodash.has/package.json" + "path": "node_modules/jws/package.json" }, { - "path": "node_modules/package-json/package.json" + "path": "node_modules/nth-check/package.json" }, { - "path": "node_modules/handlebars/package.json" + "path": "node_modules/p-defer/package.json" }, { - "path": "node_modules/jsonexport/package.json" + "path": "node_modules/empower/package.json" }, { - "path": "node_modules/uc.micro/package.json" + "path": "node_modules/send/package.json" }, { - "path": "node_modules/browser-stdout/package.json" + "path": "node_modules/send/node_modules/debug/package.json" }, { - "path": "node_modules/emoji-regex/package.json" + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" }, { - "path": "node_modules/eslint/package.json" + "path": "node_modules/send/node_modules/ms/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" + "path": "node_modules/send/node_modules/mime/package.json" }, { - "path": "node_modules/eslint/node_modules/path-key/package.json" + "path": "node_modules/require-directory/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + "path": "node_modules/object.assign/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + "path": "node_modules/is-npm/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/min-indent/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + "path": "node_modules/functional-red-black-tree/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + "path": "node_modules/read-pkg/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + "path": "node_modules/to-no-case/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/registry-url/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/is-regex/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/es-abstract/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/parent-module/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/type-detect/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + "path": "node_modules/signal-exit/package.json" }, { - "path": "node_modules/eslint/node_modules/which/package.json" + "path": "node_modules/import-fresh/package.json" }, { - "path": "node_modules/eslint/node_modules/debug/package.json" + "path": "node_modules/keyv/package.json" }, { - "path": "node_modules/cli-cursor/package.json" + "path": "node_modules/estraverse/package.json" }, { - "path": "node_modules/buffer-from/package.json" + "path": "node_modules/fast-deep-equal/package.json" }, { - "path": "node_modules/eastasianwidth/package.json" + "path": "node_modules/mute-stream/package.json" }, { - "path": "node_modules/define-properties/package.json" + "path": "node_modules/power-assert-context-traversal/package.json" }, { - "path": "node_modules/unique-string/package.json" + "path": "node_modules/rimraf/package.json" }, { - "path": "node_modules/es5-ext/package.json" + "path": "node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/json-schema-traverse/package.json" + "path": "node_modules/get-stdin/package.json" }, { - "path": "node_modules/shebang-regex/package.json" + "path": "node_modules/make-dir/package.json" }, { - "path": "node_modules/mimic-response/package.json" + "path": "node_modules/es6-promise/package.json" }, { - "path": "node_modules/ee-first/package.json" + "path": "node_modules/os-tmpdir/package.json" }, { - "path": "node_modules/uglify-js/package.json" + "path": "node_modules/retry-request/package.json" }, { - "path": "node_modules/p-finally/package.json" + "path": "node_modules/retry-request/node_modules/debug/package.json" }, { - "path": "node_modules/load-json-file/package.json" + "path": "node_modules/cli-cursor/package.json" }, { - "path": "node_modules/load-json-file/node_modules/pify/package.json" + "path": "node_modules/to-space-case/package.json" }, { - "path": "node_modules/send/package.json" + "path": "node_modules/ext/package.json" }, { - "path": "node_modules/send/node_modules/ms/package.json" + "path": "node_modules/ext/node_modules/type/package.json" }, { - "path": "node_modules/send/node_modules/mime/package.json" + "path": "node_modules/is-symbol/package.json" }, { - "path": "node_modules/send/node_modules/debug/package.json" + "path": "node_modules/css-what/package.json" }, { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + "path": "node_modules/ent/package.json" }, { - "path": "node_modules/c8/package.json" + "path": "node_modules/punycode/package.json" }, { - "path": "node_modules/cross-spawn/package.json" + "path": "node_modules/setprototypeof/package.json" }, { - "path": "node_modules/event-target-shim/package.json" + "path": "node_modules/word-wrap/package.json" }, { - "path": "node_modules/strip-bom/package.json" + "path": "node_modules/foreground-child/package.json" }, { - "path": "node_modules/esutils/package.json" + "path": "node_modules/@sinonjs/text-encoding/package.json" }, { - "path": "node_modules/esprima/package.json" + "path": "node_modules/@sinonjs/samsam/package.json" }, { - "path": "node_modules/ansi-styles/package.json" + "path": "node_modules/@sinonjs/commons/package.json" }, { - "path": "node_modules/argv/package.json" + "path": "node_modules/@sinonjs/formatio/package.json" }, { - "path": "node_modules/is-regexp/package.json" + "path": "node_modules/pumpify/package.json" }, { - "path": "node_modules/emitter-listener/package.json" + "path": "node_modules/pumpify/node_modules/duplexify/package.json" }, { - "path": "node_modules/which/package.json" + "path": "node_modules/pumpify/node_modules/readable-stream/package.json" }, { - "path": "node_modules/camelcase/package.json" + "path": "node_modules/es6-map/package.json" }, { - "path": "node_modules/he/package.json" + "path": "node_modules/call-signature/package.json" }, { - "path": "node_modules/tmp/package.json" + "path": "node_modules/package-json/package.json" }, { - "path": "node_modules/meow/package.json" + "path": "node_modules/css-select/package.json" }, { - "path": "node_modules/meow/node_modules/p-limit/package.json" + "path": "node_modules/path-is-inside/package.json" }, { - "path": "node_modules/meow/node_modules/p-locate/package.json" + "path": "node_modules/eslint-plugin-prettier/package.json" }, { - "path": "node_modules/meow/node_modules/find-up/package.json" + "path": "node_modules/p-finally/package.json" }, { - "path": "node_modules/meow/node_modules/locate-path/package.json" + "path": "node_modules/inquirer/package.json" }, { - "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/meow/node_modules/path-exists/package.json" + "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/meow/node_modules/camelcase/package.json" + "path": "node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/meow/node_modules/p-try/package.json" + "path": "node_modules/glob/package.json" }, { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" + "path": "node_modules/mocha/package.json" }, { - "path": "node_modules/empower/package.json" + "path": "node_modules/mocha/node_modules/diff/package.json" }, { - "path": "node_modules/stringifier/package.json" + "path": "node_modules/mocha/node_modules/color-name/package.json" }, { - "path": "node_modules/is-arrayish/package.json" + "path": "node_modules/mocha/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/escape-html/package.json" + "path": "node_modules/mocha/node_modules/ms/package.json" }, { - "path": "node_modules/cheerio/package.json" + "path": "node_modules/mocha/node_modules/string-width/package.json" }, { - "path": "node_modules/iconv-lite/package.json" + "path": "node_modules/mocha/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/d64/package.json" + "path": "node_modules/mocha/node_modules/cliui/package.json" }, { - "path": "node_modules/js-tokens/package.json" + "path": "node_modules/mocha/node_modules/p-locate/package.json" }, { - "path": "node_modules/is-callable/package.json" + "path": "node_modules/mocha/node_modules/locate-path/package.json" }, { - "path": "node_modules/css-select/package.json" + "path": "node_modules/mocha/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/es-to-primitive/package.json" + "path": "node_modules/mocha/node_modules/has-flag/package.json" }, { - "path": "node_modules/url-parse-lax/package.json" + "path": "node_modules/mocha/node_modules/glob/package.json" }, { - "path": "node_modules/write-file-atomic/package.json" + "path": "node_modules/mocha/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/source-map-support/package.json" + "path": "node_modules/mocha/node_modules/which/package.json" }, { - "path": "node_modules/source-map-support/node_modules/source-map/package.json" + "path": "node_modules/mocha/node_modules/supports-color/package.json" }, { - "path": "node_modules/validate-npm-package-license/package.json" + "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/istanbul-lib-coverage/package.json" + "path": "node_modules/mocha/node_modules/find-up/package.json" }, { - "path": "node_modules/y18n/package.json" + "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/through/package.json" + "path": "node_modules/mocha/node_modules/path-exists/package.json" }, { - "path": "node_modules/htmlparser2/package.json" + "path": "node_modules/mocha/node_modules/yargs/package.json" }, { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + "path": "node_modules/mocha/node_modules/color-convert/package.json" }, { - "path": "node_modules/semver/package.json" + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/date-and-time/package.json" + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/p-try/package.json" + "path": "node_modules/mime-db/package.json" }, { - "path": "node_modules/stubs/package.json" + "path": "node_modules/loud-rejection/package.json" }, { - "path": "node_modules/lodash.snakecase/package.json" + "path": "node_modules/event-emitter/package.json" }, { - "path": "node_modules/power-assert-renderer-assertion/package.json" + "path": "node_modules/@protobufjs/codegen/package.json" }, { - "path": "node_modules/flat/package.json" + "path": "node_modules/@protobufjs/base64/package.json" }, { - "path": "node_modules/is-object/package.json" + "path": "node_modules/@protobufjs/utf8/package.json" }, { - "path": "node_modules/escallmatch/package.json" + "path": "node_modules/@protobufjs/pool/package.json" }, { - "path": "node_modules/escallmatch/node_modules/esprima/package.json" + "path": "node_modules/@protobufjs/float/package.json" }, { - "path": "node_modules/lowercase-keys/package.json" + "path": "node_modules/@protobufjs/fetch/package.json" }, { - "path": "node_modules/file-entry-cache/package.json" + "path": "node_modules/@protobufjs/path/package.json" }, { - "path": "node_modules/spdx-expression-parse/package.json" + "path": "node_modules/@protobufjs/aspromise/package.json" }, { - "path": "node_modules/concat-map/package.json" + "path": "node_modules/@protobufjs/inquire/package.json" }, { - "path": "node_modules/v8-to-istanbul/package.json" + "path": "node_modules/@protobufjs/eventemitter/package.json" }, { - "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + "path": "node_modules/node-forge/package.json" }, { - "path": "node_modules/uri-js/package.json" + "path": "node_modules/lodash.has/package.json" }, { - "path": "node_modules/gtoken/package.json" + "path": "node_modules/source-map-support/package.json" }, { - "path": "node_modules/debug/package.json" + "path": "node_modules/source-map-support/node_modules/source-map/package.json" }, { - "path": "node_modules/yargs-parser/package.json" + "path": "node_modules/has-symbols/package.json" }, { - "path": "node_modules/parse-json/package.json" + "path": "node_modules/just-extend/package.json" }, { - "path": "node_modules/error-ex/package.json" + "path": "node_modules/stubs/package.json" }, { - "path": "node_modules/server-destroy/package.json" + "path": "node_modules/espurify/package.json" }, { "path": "node_modules/lodash.at/package.json" }, { - "path": "node_modules/array-find-index/package.json" - }, - { - "path": "node_modules/linkinator/package.json" + "path": "node_modules/ansi-styles/package.json" }, { - "path": "node_modules/linkinator/node_modules/has-flag/package.json" + "path": "node_modules/merge-estraverse-visitors/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-convert/package.json" + "path": "node_modules/ansi-colors/package.json" }, { - "path": "node_modules/linkinator/node_modules/supports-color/package.json" + "path": "node_modules/date-and-time/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-name/package.json" + "path": "node_modules/p-try/package.json" }, { - "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + "path": "node_modules/is-object/package.json" }, { - "path": "node_modules/linkinator/node_modules/chalk/package.json" + "path": "node_modules/escope/package.json" }, { - "path": "node_modules/get-stream/package.json" + "path": "node_modules/json-parse-better-errors/package.json" }, { - "path": "node_modules/parent-module/package.json" + "path": "node_modules/readable-stream/package.json" }, { - "path": "node_modules/slice-ansi/package.json" + "path": "node_modules/abort-controller/package.json" }, { - "path": "node_modules/safer-buffer/package.json" + "path": "node_modules/which/package.json" }, { - "path": "node_modules/json-bigint/package.json" + "path": "node_modules/astral-regex/package.json" }, { - "path": "node_modules/json-bigint/node_modules/bignumber.js/package.json" + "path": "node_modules/escodegen/package.json" }, { - "path": "node_modules/prepend-http/package.json" + "path": "node_modules/escodegen/node_modules/esprima/package.json" }, { - "path": "node_modules/jsdoc-region-tag/package.json" + "path": "node_modules/escodegen/node_modules/source-map/package.json" }, { - "path": "node_modules/estraverse/package.json" + "path": "node_modules/minimist/package.json" }, { - "path": "node_modules/type/package.json" + "path": "node_modules/clone-response/package.json" }, { - "path": "node_modules/require-directory/package.json" + "path": "node_modules/ecdsa-sig-formatter/package.json" }, { - "path": "node_modules/on-finished/package.json" + "path": "node_modules/requizzle/package.json" }, { - "path": "node_modules/figures/package.json" + "path": "node_modules/base64-js/package.json" }, { - "path": "node_modules/function-bind/package.json" + "path": "node_modules/async-each/package.json" }, { - "path": "node_modules/inflight/package.json" + "path": "node_modules/pify/package.json" }, { - "path": "node_modules/normalize-url/package.json" + "path": "node_modules/@opencensus/propagation-stackdriver/package.json" }, { - "path": "node_modules/fast-diff/package.json" + "path": "node_modules/@opencensus/core/package.json" }, { - "path": "node_modules/balanced-match/package.json" + "path": "node_modules/object-keys/package.json" }, { - "path": "node_modules/typedarray-to-buffer/LICENSE" + "path": "node_modules/trim-newlines/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.travis.yml" + "path": "node_modules/lodash.snakecase/package.json" }, { - "path": "node_modules/typedarray-to-buffer/README.md" + "path": "node_modules/deep-is/package.json" }, { - "path": "node_modules/typedarray-to-buffer/index.js" + "path": "node_modules/fast-levenshtein/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" + "path": "node_modules/typescript/package.json" }, { - "path": "node_modules/typedarray-to-buffer/package.json" + "path": "node_modules/shebang-regex/package.json" }, { - "path": "node_modules/typedarray-to-buffer/test/basic.js" + "path": "node_modules/eslint-plugin-es/package.json" }, { - "path": "node_modules/yargs/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/yargs/node_modules/p-locate/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" }, { - "path": "node_modules/yargs/node_modules/find-up/package.json" + "path": "node_modules/semver/package.json" }, { - "path": "node_modules/yargs/node_modules/locate-path/package.json" + "path": "node_modules/unique-string/package.json" }, { - "path": "node_modules/yargs/node_modules/path-exists/package.json" + "path": "node_modules/decamelize/package.json" }, { - "path": "node_modules/pseudomap/package.json" + "path": "node_modules/acorn/package.json" }, { - "path": "node_modules/rxjs/package.json" + "path": "node_modules/wide-align/package.json" }, { - "path": "node_modules/is-stream-ended/package.json" + "path": "node_modules/wide-align/node_modules/string-width/package.json" }, { - "path": "node_modules/klaw/package.json" + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/gcp-metadata/package.json" + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/decamelize-keys/package.json" + "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + "path": "node_modules/got/package.json" }, { - "path": "node_modules/lodash/package.json" + "path": "node_modules/got/node_modules/get-stream/package.json" }, { - "path": "node_modules/yargs-unparser/package.json" + "path": "node_modules/got/node_modules/@sindresorhus/is/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + "path": "node_modules/sprintf-js/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + "path": "node_modules/@google-cloud/bigquery/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + "path": "node_modules/@google-cloud/bigquery/node_modules/duplexify/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + "path": "node_modules/@google-cloud/bigquery/node_modules/readable-stream/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + "path": "node_modules/@google-cloud/storage/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + "path": "node_modules/@google-cloud/storage/node_modules/readable-stream/package.json" }, { - "path": "node_modules/type-detect/package.json" + "path": "node_modules/@google-cloud/pubsub/package.json" }, { - "path": "node_modules/string_decoder/package.json" + "path": "node_modules/@google-cloud/projectify/package.json" }, { - "path": "node_modules/setprototypeof/package.json" + "path": "node_modules/@google-cloud/common/package.json" }, { - "path": "node_modules/is-yarn-global/package.json" + "path": "node_modules/@google-cloud/paginator/package.json" }, { - "path": "node_modules/is-glob/package.json" + "path": "node_modules/@google-cloud/promisify/package.json" }, { - "path": "node_modules/cacheable-request/package.json" + "path": "node_modules/@google-cloud/precise-date/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + "path": "node_modules/isarray/package.json" }, { - "path": "node_modules/stream-events/package.json" + "path": "node_modules/merge-stream/package.json" }, { - "path": "node_modules/to-no-case/package.json" + "path": "node_modules/string_decoder/package.json" }, { - "path": "node_modules/object.assign/package.json" + "path": "node_modules/strip-eof/package.json" }, { - "path": "node_modules/ansi-colors/package.json" + "path": "node_modules/p-limit/package.json" }, { - "path": "node_modules/wrap-ansi/package.json" + "path": "node_modules/url-parse-lax/package.json" }, { - "path": "node_modules/power-assert-renderer-diagram/package.json" + "path": "node_modules/gts/package.json" }, { - "path": "node_modules/furi/package.json" + "path": "node_modules/gts/node_modules/chalk/package.json" }, { - "path": "node_modules/istanbul-reports/package.json" + "path": "node_modules/commander/package.json" }, { - "path": "node_modules/protobufjs/package.json" + "path": "node_modules/mimic-fn/package.json" }, { - "path": "node_modules/power-assert/package.json" + "path": "node_modules/shimmer/package.json" }, { - "path": "node_modules/stream-shift/package.json" + "path": "node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/got/package.json" + "path": "node_modules/ini/package.json" }, { - "path": "node_modules/got/node_modules/get-stream/package.json" + "path": "node_modules/js2xmlparser/package.json" }, { - "path": "node_modules/got/node_modules/@sindresorhus/is/package.json" + "path": "node_modules/spdx-exceptions/package.json" }, { - "path": "node_modules/type-name/package.json" + "path": "node_modules/external-editor/package.json" }, { - "path": "node_modules/dom-serializer/package.json" + "path": "node_modules/power-assert-formatter/package.json" }, { - "path": "node_modules/@grpc/grpc-js/package.json" + "path": "node_modules/eslint-utils/package.json" }, { - "path": "node_modules/@grpc/proto-loader/package.json" + "path": "node_modules/text-table/package.json" }, { - "path": "node_modules/mimic-fn/package.json" + "path": "node_modules/domutils/package.json" }, { - "path": "node_modules/object-is/package.json" + "path": "node_modules/supports-color/package.json" }, { - "path": "node_modules/read-pkg/package.json" + "path": "node_modules/strip-indent/package.json" }, { - "path": "node_modules/escodegen/package.json" + "path": "node_modules/fs.realpath/package.json" }, { - "path": "node_modules/escodegen/node_modules/esprima/package.json" + "path": "node_modules/parse5/package.json" }, { - "path": "node_modules/is-symbol/package.json" + "path": "node_modules/decamelize-keys/package.json" }, { - "path": "node_modules/agent-base/package.json" + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" }, { - "path": "node_modules/@sindresorhus/is/package.json" + "path": "node_modules/empower-core/package.json" }, { - "path": "node_modules/is-obj/package.json" + "path": "node_modules/acorn-es7-plugin/package.json" }, { - "path": "node_modules/pump/package.json" + "path": "node_modules/p-timeout/package.json" }, { - "path": "node_modules/call-matcher/package.json" + "path": "node_modules/espree/package.json" }, { - "path": "node_modules/registry-url/package.json" + "path": "node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/walkdir/package.json" + "path": "node_modules/responselike/package.json" }, { - "path": "node_modules/neo-async/package.json" + "path": "node_modules/propagate/package.json" }, { - "path": "node_modules/bluebird/package.json" + "path": "node_modules/next-tick/package.json" }, { - "path": "node_modules/long/package.json" + "path": "node_modules/esrecurse/package.json" }, { - "path": "node_modules/registry-auth-token/package.json" + "path": "node_modules/bignumber.js/package.json" }, { - "path": "node_modules/get-func-name/package.json" + "path": "node_modules/source-map/package.json" }, { - "path": "node_modules/es6-promise/package.json" + "path": "node_modules/find-up/package.json" }, { - "path": "node_modules/http-proxy-agent/package.json" + "path": "node_modules/traverse/package.json" }, { - "path": "node_modules/http-proxy-agent/node_modules/debug/package.json" + "path": "node_modules/es-to-primitive/package.json" }, { - "path": "node_modules/http-proxy-agent/node_modules/agent-base/package.json" + "path": "node_modules/rc/package.json" }, { - "path": "node_modules/keyv/package.json" + "path": "node_modules/rc/node_modules/minimist/package.json" }, { - "path": "node_modules/mime-types/package.json" + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/is-windows/package.json" + "path": "node_modules/safe-buffer/package.json" }, { - "path": "node_modules/extend/package.json" + "path": "node_modules/uc.micro/package.json" }, { - "path": "node_modules/espower-source/package.json" + "path": "node_modules/flat-cache/package.json" }, { - "path": "node_modules/espower-source/node_modules/acorn/package.json" + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" }, { - "path": "node_modules/hosted-git-info/package.json" + "path": "node_modules/once/package.json" }, { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + "path": "node_modules/gtoken/package.json" }, { - "path": "node_modules/is-arguments/package.json" + "path": "node_modules/urlgrey/package.json" }, { - "path": "node_modules/glob-parent/package.json" + "path": "node_modules/convert-source-map/package.json" }, { - "path": "node_modules/concat-stream/package.json" + "path": "node_modules/is-date-object/package.json" }, { - "path": "node_modules/concat-stream/node_modules/readable-stream/package.json" + "path": "node_modules/tslint-config-prettier/package.json" }, { - "path": "node_modules/global-dirs/package.json" + "path": "node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/hex2dec/package.json" + "path": "node_modules/iconv-lite/package.json" }, { - "path": "node_modules/power-assert-context-formatter/package.json" + "path": "node_modules/is-glob/package.json" }, { - "path": "node_modules/external-editor/package.json" + "path": "node_modules/furi/package.json" }, { - "path": "node_modules/typescript/package.json" + "path": "node_modules/nock/package.json" }, { - "path": "node_modules/mime-db/package.json" + "path": "node_modules/nock/node_modules/debug/package.json" }, { - "path": "node_modules/convert-source-map/package.json" + "path": "node_modules/tslib/package.json" }, { - "path": "node_modules/yallist/package.json" + "path": "node_modules/markdown-it-anchor/package.json" }, { - "path": "node_modules/power-assert-context-traversal/package.json" + "path": "node_modules/browser-stdout/package.json" }, { - "path": "node_modules/nice-try/package.json" + "path": "node_modules/path-type/package.json" }, { - "path": "node_modules/escope/package.json" + "path": "node_modules/human-signals/package.json" }, { - "path": "node_modules/is-buffer/package.json" + "path": "node_modules/snakeize/package.json" }, { - "path": "node_modules/wrappy/package.json" + "path": "node_modules/pump/package.json" }, { - "path": "node_modules/codecov/package.json" + "path": "node_modules/process-nextick-args/package.json" }, { - "path": "node_modules/codecov/node_modules/teeny-request/package.json" + "path": "node_modules/deep-extend/package.json" }, { - "path": "node_modules/codecov/node_modules/https-proxy-agent/package.json" + "path": "node_modules/power-assert-context-reducer-ast/package.json" }, { - "path": "node_modules/parse5/package.json" + "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" }, { - "path": "node_modules/diff-match-patch/package.json" + "path": "node_modules/type-check/package.json" }, { - "path": "node_modules/prettier-linter-helpers/package.json" + "path": "node_modules/teeny-request/package.json" }, { - "path": "node_modules/fs.realpath/package.json" + "path": "node_modules/teeny-request/node_modules/debug/package.json" }, { - "path": "node_modules/pumpify/package.json" + "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/pumpify/node_modules/readable-stream/package.json" + "path": "node_modules/teeny-request/node_modules/agent-base/package.json" }, { - "path": "node_modules/pumpify/node_modules/duplexify/package.json" + "path": "node_modules/jwa/package.json" }, { - "path": "node_modules/word-wrap/package.json" + "path": "node_modules/walkdir/package.json" }, { - "path": "node_modules/chalk/package.json" + "path": "node_modules/hard-rejection/package.json" }, { - "path": "node_modules/chalk/node_modules/supports-color/package.json" + "path": "node_modules/espower-source/package.json" }, { - "path": "node_modules/async-listener/package.json" + "path": "node_modules/espower-source/node_modules/acorn/package.json" }, { - "path": "node_modules/async-listener/node_modules/semver/package.json" + "path": "node_modules/mime-types/package.json" }, { - "path": "node_modules/has/package.json" + "path": "node_modules/cross-spawn/package.json" }, { - "path": "node_modules/process-nextick-args/package.json" + "path": "node_modules/@sindresorhus/is/package.json" }, { - "path": "node_modules/xdg-basedir/package.json" + "path": "node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/mocha/package.json" + "path": "node_modules/async-listener/package.json" }, { - "path": "node_modules/mocha/node_modules/ms/package.json" + "path": "node_modules/async-listener/node_modules/semver/package.json" }, { - "path": "node_modules/mocha/node_modules/p-locate/package.json" + "path": "node_modules/quick-lru/package.json" }, { - "path": "node_modules/mocha/node_modules/find-up/package.json" + "path": "node_modules/path-exists/package.json" }, { - "path": "node_modules/mocha/node_modules/locate-path/package.json" + "path": "node_modules/jsdoc/package.json" }, { - "path": "node_modules/mocha/node_modules/diff/package.json" + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/mocha/node_modules/glob/package.json" + "path": "node_modules/cacheable-request/package.json" }, { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/mocha/node_modules/supports-color/package.json" + "path": "node_modules/escape-html/package.json" }, { - "path": "node_modules/mocha/node_modules/path-exists/package.json" + "path": "node_modules/power-assert-renderer-assertion/package.json" }, { - "path": "node_modules/mocha/node_modules/which/package.json" + "path": "node_modules/minimist-options/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + "path": "node_modules/minimist-options/node_modules/arrify/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs/package.json" + "path": "node_modules/latest-version/package.json" }, { - "path": "node_modules/espower-location-detector/package.json" + "path": "node_modules/nise/package.json" }, { - "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" + "path": "node_modules/optionator/package.json" }, { - "path": "node_modules/eslint-plugin-prettier/package.json" + "path": "node_modules/slice-ansi/package.json" }, { - "path": "node_modules/path-is-absolute/package.json" + "path": "node_modules/slice-ansi/node_modules/color-name/package.json" }, { - "path": "node_modules/call-signature/package.json" + "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" }, { - "path": ".kokoro/trampoline.sh" + "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" }, { - "path": ".kokoro/test.bat" + "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" }, { - "path": ".kokoro/.gitattributes" + "path": "node_modules/power-assert-renderer-comparison/package.json" }, { - "path": ".kokoro/publish.sh" + "path": "node_modules/flatted/package.json" }, { - "path": ".kokoro/test.sh" + "path": "node_modules/inherits/package.json" }, { - "path": ".kokoro/samples-test.sh" + "path": "node_modules/depd/package.json" }, { - "path": ".kokoro/docs.sh" + "path": "node_modules/es6-promisify/package.json" }, { - "path": ".kokoro/lint.sh" + "path": "node_modules/long/package.json" }, { - "path": ".kokoro/common.cfg" + "path": "node_modules/regexpp/package.json" }, { - "path": ".kokoro/system-test.sh" + "path": "node_modules/cli-width/package.json" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": "node_modules/call-matcher/package.json" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": "node_modules/fill-keys/package.json" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": "node_modules/http2spy/package.json" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": "node_modules/eslint/package.json" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": "node_modules/eslint/node_modules/debug/package.json" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": "node_modules/eslint/node_modules/ansi-regex/package.json" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": "node_modules/eslint/node_modules/path-key/package.json" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": "node_modules/eslint/node_modules/shebang-command/package.json" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": "node_modules/eslint/node_modules/strip-ansi/package.json" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": "node_modules/eslint/node_modules/which/package.json" }, { - "path": ".kokoro/presubmit/windows/test.cfg" + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" }, { - "path": ".kokoro/presubmit/windows/common.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" }, { - "path": ".kokoro/presubmit/node8/test.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" }, { - "path": ".kokoro/presubmit/node8/common.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" }, { - "path": ".kokoro/presubmit/node10/lint.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" }, { - "path": ".kokoro/presubmit/node12/test.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" }, { - "path": ".kokoro/presubmit/node12/common.cfg" + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" }, { - "path": ".kokoro/release/publish.cfg" + "path": "node_modules/mdurl/package.json" }, { - "path": ".kokoro/release/docs.cfg" + "path": "node_modules/typedarray/package.json" }, { - "path": ".kokoro/release/docs.sh" + "path": "node_modules/v8-to-istanbul/package.json" }, { - "path": ".kokoro/release/common.cfg" + "path": "node_modules/espower-loader/package.json" }, { - "path": "src/log.ts" + "path": "node_modules/object.getownpropertydescriptors/package.json" }, { - "path": "src/service_proto_list.json" + "path": "node_modules/array-find-index/package.json" }, { - "path": "src/index.ts" + "path": "node_modules/yargs/package.json" }, { - "path": "src/http-request.ts" + "path": "node_modules/ci-info/package.json" }, { - "path": "src/sink.ts" + "path": "node_modules/color-convert/package.json" }, { - "path": "src/entry.ts" + "path": "node_modules/write-file-atomic/package.json" }, { - "path": "src/common.ts" + "path": "node_modules/eslint-visitor-keys/package.json" }, { - "path": "src/metadata.ts" + "path": "node_modules/agent-base/package.json" }, { - "path": "src/v2/metrics_service_v2_client.js" + "path": "node_modules/flat/package.json" }, { - "path": "src/v2/logging_service_v2_proto_list.json" + "path": "node_modules/through2/package.json" }, { - "path": "src/v2/config_service_v2_client.js" + "path": "node_modules/gaxios/package.json" }, { - "path": "src/v2/logging_service_v2_client.js" + "path": "node_modules/p-queue/package.json" }, { - "path": "src/v2/metrics_service_v2_client_config.json" + "path": "node_modules/encodeurl/package.json" }, { - "path": "src/v2/index.js" + "path": "node_modules/json-stringify-safe/package.json" }, { - "path": "src/v2/metrics_service_v2_proto_list.json" + "path": "node_modules/js-tokens/package.json" }, { - "path": "src/v2/logging_service_v2_client_config.json" + "path": "node_modules/strip-json-comments/package.json" }, { - "path": "src/v2/config_service_v2_proto_list.json" + "path": "node_modules/eslint-config-prettier/package.json" }, { - "path": "src/v2/config_service_v2_client_config.json" + "path": "node_modules/uri-js/package.json" }, { - "path": "src/v2/.eslintrc.yml" + "path": "node_modules/test-exclude/package.json" }, { - "path": "src/v2/doc/google/logging/v2/doc_logging_metrics.js" + "path": "node_modules/safer-buffer/package.json" }, { - "path": "src/v2/doc/google/logging/v2/doc_logging.js" + "path": "node_modules/prettier/package.json" }, { - "path": "src/v2/doc/google/logging/v2/doc_logging_config.js" + "path": "node_modules/regexp.prototype.flags/package.json" }, { - "path": "src/v2/doc/google/logging/v2/doc_log_entry.js" + "path": "node_modules/yargs-parser/package.json" }, { - "path": "src/v2/doc/google/logging/type/doc_http_request.js" + "path": "node_modules/lodash.get/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_any.js" + "path": "node_modules/@babel/code-frame/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_empty.js" + "path": "node_modules/@babel/highlight/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_field_mask.js" + "path": "node_modules/@babel/parser/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_duration.js" + "path": "node_modules/configstore/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_timestamp.js" + "path": "node_modules/is-plain-obj/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_struct.js" + "path": "node_modules/eastasianwidth/package.json" }, { - "path": "src/v2/doc/google/api/doc_label.js" + "path": "node_modules/has-yarn/package.json" }, { - "path": "src/v2/doc/google/api/doc_distribution.js" + "path": "node_modules/core-js/package.json" }, { - "path": "src/v2/doc/google/api/doc_monitored_resource.js" + "path": "samples/logs.js" }, { - "path": "src/v2/doc/google/api/doc_metric.js" + "path": "samples/fluent.js" }, { - "path": "src/middleware/index.ts" + "path": "samples/http-request.js" }, { - "path": "src/middleware/context.ts" + "path": "samples/README.md" }, { - "path": "src/middleware/express/make-middleware.ts" + "path": "samples/package.json" }, { - "path": "src/middleware/express/index.ts" + "path": "samples/quickstart.js" }, { - "path": "src/middleware/express/make-http-request.ts" + "path": "samples/.eslintrc.yml" }, { - "path": "protos/protos.json" + "path": "samples/sinks.js" }, { - "path": "protos/protos.js" + "path": "samples/test/http-request.test.js" }, { - "path": "protos/protos.d.ts" + "path": "samples/test/sinks.test.js" }, { - "path": "protos/google/logging/v2/logging_config.proto" + "path": "samples/test/logs.test.js" }, { - "path": "protos/google/logging/v2/logging.proto" + "path": "samples/test/quickstart.test.js" }, { - "path": "protos/google/logging/v2/logging_metrics.proto" + "path": "samples/test/fluent.test.js" }, { - "path": "protos/google/logging/v2/log_entry.proto" + "path": "__pycache__/synth.cpython-36.pyc" }, { - "path": "protos/google/logging/type/http_request.proto" + "path": "smoke-test/logging_service_v2_smoke_test.js" }, { - "path": "protos/google/logging/type/log_severity.proto" + "path": "smoke-test/.eslintrc.yml" } ] } \ No newline at end of file From 9d53f2b488ee421fbcb45e4f0e36f1576c5fbeb3 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 7 Jan 2020 01:06:09 +0200 Subject: [PATCH 0524/1029] chore(deps): update dependency mocha to v7 (#669) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d4c2a1fb291..b611230f8b6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -98,7 +98,7 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", - "mocha": "^6.1.4", + "mocha": "^7.0.0", "mv": "^2.1.1", "ncp": "^2.0.0", "nock": "^11.3.2", From f3f685740f72fbc9cfdc02d281cf0810966f6e80 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 7 Jan 2020 13:57:47 -0800 Subject: [PATCH 0525/1029] fix!: populate k8s_container rather than container (#674) BREAKING CHANGE: if using GKE, "Kubernetes Container" type is now properly populated, and logs will be grouped accordingly. --- handwritten/logging/src/log.ts | 1 - handwritten/logging/src/metadata.ts | 4 ++-- handwritten/logging/test/metadata.ts | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 83024d73c7e..c51e834fbb0 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -812,7 +812,6 @@ class Log implements LogSeverityFunctions { ): Promise { const options = opts ? (opts as WriteOptions) : {}; const self = this; - if (options.resource) { if (options.resource.labels) { options.resource.labels = snakeCaseKeys(options.resource.labels); diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index d14f9eca047..55d2bb63bb6 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -120,10 +120,10 @@ export async function getGKEDescriptor() { } return { - type: 'container', + type: 'k8s_container', labels: { cluster_name: resp, - namespace_id: namespace, + namespace_name: namespace, }, }; } diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 0914586a07f..9e0c9aaf4e4 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -198,10 +198,10 @@ describe('metadata', () => { const descriptor = await metadata.getGKEDescriptor(); assert.deepStrictEqual(descriptor, { - type: 'container', + type: 'k8s_container', labels: { cluster_name: CLUSTER_NAME, - namespace_id: FAKE_READFILE_CONTENTS, + namespace_name: FAKE_READFILE_CONTENTS, }, }); }); @@ -383,10 +383,10 @@ describe('metadata', () => { const defaultResource = await metadata.getDefaultResource(fakeAuth); assert.deepStrictEqual(defaultResource, { - type: 'container', + type: 'k8s_container', labels: { cluster_name: CLUSTER_NAME, - namespace_id: FAKE_READFILE_CONTENTS, + namespace_name: FAKE_READFILE_CONTENTS, }, }); }); From 25e6f47ebcc457aee6eb0479e48fc6b738ad1046 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 7 Jan 2020 15:57:30 -0800 Subject: [PATCH 0526/1029] fix(docs): point folks towards the appropriate client instantiation Co-authored-by: Benjamin E. Coe --- handwritten/logging/README.md | 6 +- handwritten/logging/synth.metadata | 2079 ++++++++++++++-------------- 2 files changed, 1059 insertions(+), 1026 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index b1e59c83223..44e5e0038f6 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -55,13 +55,13 @@ npm install @google-cloud/logging ### Using the client library ```javascript +// Imports the Google Cloud client library +const {Logging} = require('@google-cloud/logging'); + async function quickstart( projectId = 'YOUR_PROJECT_ID', // Your Google Cloud Platform project ID logName = 'my-log' // The name of the log to write to ) { - // Imports the Google Cloud client library - const {Logging} = require('@google-cloud/logging'); - // Creates a client const logging = new Logging({projectId}); diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 45b5f4f026c..dbecfbfda59 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-01-03T12:17:01.487315Z", + "updateTime": "2020-01-07T12:21:44.240814Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4d45a6399e9444fbddaeb1c86aabfde210723714", - "internalRef": "287908369" + "sha": "cb79155f596e0396dd900da93872be7066f6340d", + "internalRef": "288441307" } }, { @@ -38,3088 +38,3121 @@ ], "newFiles": [ { - "path": "synth.metadata" + "path": "codecov.yaml" }, { - "path": ".repo-metadata.json" + "path": "tslint.json" }, { - "path": "CONTRIBUTING.md" + "path": "CHANGELOG.md" }, { - "path": "linkinator.config.json" + "path": "renovate.json" }, { "path": ".prettierignore" }, { - "path": "tsconfig.json" + "path": ".nycrc" }, { - "path": ".jsdoc.js" + "path": "synth.py" }, { - "path": ".gitignore" + "path": ".eslintignore" }, { - "path": "synth.py" + "path": ".repo-metadata.json" }, { - "path": "CODE_OF_CONDUCT.md" + "path": "linkinator.config.json" }, { - "path": "README.md" + "path": ".eslintrc.yml" }, { - "path": "package-lock.json" + "path": ".jsdoc.js" }, { - "path": ".prettierrc" + "path": "synth.metadata" }, { - "path": ".readme-partials.yml" + "path": "package-lock.json" }, { - "path": "codecov.yaml" + "path": "LICENSE" }, { - "path": ".nycrc" + "path": ".readme-partials.yml" }, { - "path": "package.json" + "path": "CODE_OF_CONDUCT.md" }, { - "path": ".eslintrc.yml" + "path": "CONTRIBUTING.md" }, { - "path": "tslint.json" + "path": ".prettierrc" }, { - "path": "renovate.json" + "path": "package.json" }, { - "path": "LICENSE" + "path": ".gitignore" }, { - "path": "CHANGELOG.md" + "path": "README.md" }, { - "path": ".eslintignore" + "path": "tsconfig.json" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": "build/system-test/logging.js" }, { - "path": ".github/release-please.yml" + "path": "build/system-test/logging.d.ts" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": "build/system-test/install.d.ts" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": "build/system-test/install.js.map" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": "build/system-test/install.js" }, { - "path": ".kokoro/samples-test.sh" + "path": "build/system-test/logging.js.map" }, { - "path": ".kokoro/system-test.sh" + "path": "build/protos/protos.d.ts" }, { - "path": ".kokoro/docs.sh" + "path": "build/protos/protos.json" }, { - "path": ".kokoro/lint.sh" + "path": "build/protos/protos.js" }, { - "path": ".kokoro/.gitattributes" + "path": "build/protos/google/logging/type/http_request.proto" }, { - "path": ".kokoro/publish.sh" + "path": "build/protos/google/logging/type/log_severity.proto" }, { - "path": ".kokoro/trampoline.sh" + "path": "build/protos/google/logging/v2/logging_metrics.proto" }, { - "path": ".kokoro/common.cfg" + "path": "build/protos/google/logging/v2/logging_config.proto" }, { - "path": ".kokoro/test.bat" + "path": "build/protos/google/logging/v2/log_entry.proto" }, { - "path": ".kokoro/test.sh" + "path": "build/protos/google/logging/v2/logging.proto" }, { - "path": ".kokoro/release/docs.sh" + "path": "build/test/common.d.ts" }, { - "path": ".kokoro/release/docs.cfg" + "path": "build/test/log.js.map" }, { - "path": ".kokoro/release/common.cfg" + "path": "build/test/sink.js.map" }, { - "path": ".kokoro/release/publish.cfg" + "path": "build/test/log.d.ts" }, { - "path": ".kokoro/presubmit/node12/test.cfg" + "path": "build/test/index.js.map" }, { - "path": ".kokoro/presubmit/node12/common.cfg" + "path": "build/test/index.js" }, { - "path": ".kokoro/presubmit/node8/test.cfg" + "path": "build/test/gapic-v2.js" }, { - "path": ".kokoro/presubmit/node8/common.cfg" + "path": "build/test/common.js" }, { - "path": ".kokoro/presubmit/windows/test.cfg" + "path": "build/test/entry.js" }, { - "path": ".kokoro/presubmit/windows/common.cfg" + "path": "build/test/entry.d.ts" }, { - "path": ".kokoro/presubmit/node10/lint.cfg" + "path": "build/test/metadata.d.ts" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": "build/test/index.d.ts" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": "build/test/common.js.map" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": "build/test/metadata.js" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": "build/test/sink.d.ts" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": "build/test/sink.js" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": "build/test/entry.js.map" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": "build/test/metadata.js.map" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": "build/test/log.js" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": "build/test/middleware/test-context.d.ts" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": "build/test/middleware/test-context.js" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": "build/test/middleware/test-context.js.map" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": "build/test/middleware/express/test-make-http-request.d.ts" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": "build/test/middleware/express/test-make-http-request.js.map" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": "build/test/middleware/express/test-make-middleware.js" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": "build/test/middleware/express/test-make-middleware.js.map" }, { - "path": "test/gapic-v2.js" + "path": "build/test/middleware/express/test-make-middleware.d.ts" }, { - "path": "test/common.ts" + "path": "build/test/middleware/express/test-make-http-request.js" }, { - "path": "test/mocha.opts" + "path": "build/src/common.d.ts" }, { - "path": "test/index.ts" + "path": "build/src/log.js.map" }, { - "path": "test/entry.ts" + "path": "build/src/sink.js.map" }, { - "path": "test/sink.ts" + "path": "build/src/log.d.ts" }, { - "path": "test/metadata.ts" + "path": "build/src/index.js.map" }, { - "path": "test/log.ts" + "path": "build/src/http-request.js" }, { - "path": "test/.eslintrc.yml" + "path": "build/src/index.js" }, { - "path": "test/middleware/test-context.ts" + "path": "build/src/common.js" }, { - "path": "test/middleware/express/test-make-http-request.ts" + "path": "build/src/entry.js" }, { - "path": "test/middleware/express/test-make-middleware.ts" + "path": "build/src/entry.d.ts" }, { - "path": "system-test/logging.ts" + "path": "build/src/http-request.js.map" }, { - "path": "system-test/install.ts" + "path": "build/src/metadata.d.ts" }, { - "path": "system-test/fixtures/sample/tsconfig.json" + "path": "build/src/index.d.ts" }, { - "path": "system-test/fixtures/sample/package.json" + "path": "build/src/common.js.map" }, { - "path": "system-test/fixtures/sample/src/index.ts" + "path": "build/src/metadata.js" }, { - "path": "build/test/gapic-v2.js" + "path": "build/src/sink.d.ts" }, { - "path": "build/test/metadata.js" + "path": "build/src/http-request.d.ts" }, { - "path": "build/test/common.js" + "path": "build/src/sink.js" }, { - "path": "build/test/metadata.d.ts" + "path": "build/src/entry.js.map" }, { - "path": "build/test/log.d.ts" + "path": "build/src/metadata.js.map" }, { - "path": "build/test/sink.js" + "path": "build/src/log.js" }, { - "path": "build/test/entry.js.map" + "path": "build/src/v2/config_service_v2_client.js" }, { - "path": "build/test/sink.js.map" + "path": "build/src/v2/metrics_service_v2_proto_list.json" }, { - "path": "build/test/index.js" + "path": "build/src/v2/logging_service_v2_proto_list.json" }, { - "path": "build/test/entry.js" + "path": "build/src/v2/logging_service_v2_client.js" }, { - "path": "build/test/sink.d.ts" + "path": "build/src/v2/index.js" }, { - "path": "build/test/common.js.map" + "path": "build/src/v2/config_service_v2_proto_list.json" }, { - "path": "build/test/log.js.map" + "path": "build/src/v2/metrics_service_v2_client.js" }, { - "path": "build/test/entry.d.ts" + "path": "build/src/v2/.eslintrc.yml" }, { - "path": "build/test/index.js.map" + "path": "build/src/v2/config_service_v2_client_config.json" }, { - "path": "build/test/common.d.ts" + "path": "build/src/v2/metrics_service_v2_client_config.json" }, { - "path": "build/test/log.js" + "path": "build/src/v2/logging_service_v2_client_config.json" }, { - "path": "build/test/metadata.js.map" + "path": "build/src/v2/doc/google/protobuf/doc_field_mask.js" }, { - "path": "build/test/index.d.ts" + "path": "build/src/v2/doc/google/protobuf/doc_duration.js" }, { - "path": "build/test/middleware/test-context.js" + "path": "build/src/v2/doc/google/protobuf/doc_timestamp.js" }, { - "path": "build/test/middleware/test-context.js.map" + "path": "build/src/v2/doc/google/protobuf/doc_empty.js" }, { - "path": "build/test/middleware/test-context.d.ts" + "path": "build/src/v2/doc/google/protobuf/doc_struct.js" }, { - "path": "build/test/middleware/express/test-make-http-request.d.ts" + "path": "build/src/v2/doc/google/protobuf/doc_any.js" }, { - "path": "build/test/middleware/express/test-make-http-request.js.map" + "path": "build/src/v2/doc/google/api/doc_label.js" }, { - "path": "build/test/middleware/express/test-make-middleware.js.map" + "path": "build/src/v2/doc/google/api/doc_distribution.js" }, { - "path": "build/test/middleware/express/test-make-http-request.js" + "path": "build/src/v2/doc/google/api/doc_monitored_resource.js" }, { - "path": "build/test/middleware/express/test-make-middleware.d.ts" + "path": "build/src/v2/doc/google/api/doc_metric.js" }, { - "path": "build/test/middleware/express/test-make-middleware.js" + "path": "build/src/v2/doc/google/logging/type/doc_http_request.js" }, { - "path": "build/system-test/logging.js.map" + "path": "build/src/v2/doc/google/logging/v2/doc_logging_config.js" }, { - "path": "build/system-test/install.d.ts" + "path": "build/src/v2/doc/google/logging/v2/doc_logging.js" }, { - "path": "build/system-test/install.js" + "path": "build/src/v2/doc/google/logging/v2/doc_log_entry.js" }, { - "path": "build/system-test/install.js.map" + "path": "build/src/v2/doc/google/logging/v2/doc_logging_metrics.js" }, { - "path": "build/system-test/logging.d.ts" + "path": "build/src/middleware/context.js.map" }, { - "path": "build/system-test/logging.js" + "path": "build/src/middleware/context.d.ts" }, { - "path": "build/protos/protos.d.ts" + "path": "build/src/middleware/index.js.map" }, { - "path": "build/protos/protos.js" + "path": "build/src/middleware/index.js" }, { - "path": "build/protos/protos.json" + "path": "build/src/middleware/context.js" }, { - "path": "build/protos/google/logging/type/http_request.proto" + "path": "build/src/middleware/index.d.ts" }, { - "path": "build/protos/google/logging/type/log_severity.proto" + "path": "build/src/middleware/express/index.js.map" }, { - "path": "build/protos/google/logging/v2/logging_metrics.proto" + "path": "build/src/middleware/express/index.js" }, { - "path": "build/protos/google/logging/v2/logging_config.proto" + "path": "build/src/middleware/express/make-http-request.js.map" }, { - "path": "build/protos/google/logging/v2/log_entry.proto" + "path": "build/src/middleware/express/make-middleware.js.map" }, { - "path": "build/protos/google/logging/v2/logging.proto" + "path": "build/src/middleware/express/make-middleware.d.ts" }, { - "path": "build/src/metadata.js" + "path": "build/src/middleware/express/make-http-request.d.ts" }, { - "path": "build/src/common.js" + "path": "build/src/middleware/express/index.d.ts" }, { - "path": "build/src/metadata.d.ts" + "path": "build/src/middleware/express/make-middleware.js" }, { - "path": "build/src/http-request.js.map" + "path": "build/src/middleware/express/make-http-request.js" }, { - "path": "build/src/log.d.ts" + "path": "system-test/logging.ts" }, { - "path": "build/src/sink.js" + "path": "system-test/install.ts" }, { - "path": "build/src/entry.js.map" + "path": "system-test/fixtures/sample/package.json" }, { - "path": "build/src/sink.js.map" + "path": "system-test/fixtures/sample/tsconfig.json" }, { - "path": "build/src/http-request.js" + "path": "system-test/fixtures/sample/src/index.ts" }, { - "path": "build/src/index.js" + "path": "node_modules/eslint-visitor-keys/package.json" }, { - "path": "build/src/entry.js" + "path": "node_modules/optionator/package.json" }, { - "path": "build/src/sink.d.ts" + "path": "node_modules/to-regex-range/package.json" }, { - "path": "build/src/http-request.d.ts" + "path": "node_modules/defer-to-connect/package.json" }, { - "path": "build/src/common.js.map" + "path": "node_modules/yargs/package.json" }, { - "path": "build/src/log.js.map" + "path": "node_modules/dom-serializer/package.json" }, { - "path": "build/src/entry.d.ts" + "path": "node_modules/emoji-regex/package.json" }, { - "path": "build/src/index.js.map" + "path": "node_modules/to-space-case/package.json" }, { - "path": "build/src/common.d.ts" + "path": "node_modules/source-map-support/package.json" }, { - "path": "build/src/log.js" + "path": "node_modules/source-map-support/node_modules/source-map/package.json" }, { - "path": "build/src/metadata.js.map" + "path": "node_modules/normalize-package-data/package.json" }, { - "path": "build/src/index.d.ts" + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" }, { - "path": "build/src/v2/metrics_service_v2_proto_list.json" + "path": "node_modules/mdurl/package.json" }, { - "path": "build/src/v2/metrics_service_v2_client_config.json" + "path": "node_modules/uc.micro/package.json" }, { - "path": "build/src/v2/config_service_v2_client_config.json" + "path": "node_modules/continuation-local-storage/package.json" }, { - "path": "build/src/v2/logging_service_v2_proto_list.json" + "path": "node_modules/through2/package.json" }, { - "path": "build/src/v2/metrics_service_v2_client.js" + "path": "node_modules/make-dir/package.json" }, { - "path": "build/src/v2/index.js" + "path": "node_modules/path-type/package.json" }, { - "path": "build/src/v2/config_service_v2_proto_list.json" + "path": "node_modules/package-json/package.json" }, { - "path": "build/src/v2/logging_service_v2_client.js" + "path": "node_modules/snakeize/package.json" }, { - "path": "build/src/v2/logging_service_v2_client_config.json" + "path": "node_modules/redent/package.json" }, { - "path": "build/src/v2/.eslintrc.yml" + "path": "node_modules/which-module/package.json" }, { - "path": "build/src/v2/config_service_v2_client.js" + "path": "node_modules/es6-symbol/package.json" }, { - "path": "build/src/v2/doc/google/api/doc_label.js" + "path": "node_modules/eslint-plugin-node/package.json" }, { - "path": "build/src/v2/doc/google/api/doc_distribution.js" + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" }, { - "path": "build/src/v2/doc/google/api/doc_monitored_resource.js" + "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" }, { - "path": "build/src/v2/doc/google/api/doc_metric.js" + "path": "node_modules/keyv/package.json" }, { - "path": "build/src/v2/doc/google/logging/type/doc_http_request.js" + "path": "node_modules/hard-rejection/package.json" }, { - "path": "build/src/v2/doc/google/logging/v2/doc_logging_config.js" + "path": "node_modules/typedarray-to-buffer/.airtap.yml" }, { - "path": "build/src/v2/doc/google/logging/v2/doc_log_entry.js" + "path": "node_modules/typedarray-to-buffer/index.js" }, { - "path": "build/src/v2/doc/google/logging/v2/doc_logging_metrics.js" + "path": "node_modules/typedarray-to-buffer/LICENSE" }, { - "path": "build/src/v2/doc/google/logging/v2/doc_logging.js" + "path": "node_modules/typedarray-to-buffer/.travis.yml" }, { - "path": "build/src/v2/doc/google/protobuf/doc_timestamp.js" + "path": "node_modules/typedarray-to-buffer/package.json" }, { - "path": "build/src/v2/doc/google/protobuf/doc_duration.js" + "path": "node_modules/typedarray-to-buffer/README.md" }, { - "path": "build/src/v2/doc/google/protobuf/doc_field_mask.js" + "path": "node_modules/typedarray-to-buffer/test/basic.js" }, { - "path": "build/src/v2/doc/google/protobuf/doc_any.js" + "path": "node_modules/registry-url/package.json" }, { - "path": "build/src/v2/doc/google/protobuf/doc_empty.js" + "path": "node_modules/wrappy/package.json" }, { - "path": "build/src/v2/doc/google/protobuf/doc_struct.js" + "path": "node_modules/is-installed-globally/package.json" }, { - "path": "build/src/middleware/context.js" + "path": "node_modules/@google-cloud/bigquery/package.json" }, { - "path": "build/src/middleware/index.js" + "path": "node_modules/@google-cloud/bigquery/node_modules/duplexify/package.json" }, { - "path": "build/src/middleware/context.js.map" + "path": "node_modules/@google-cloud/bigquery/node_modules/readable-stream/package.json" }, { - "path": "build/src/middleware/context.d.ts" + "path": "node_modules/@google-cloud/promisify/package.json" }, { - "path": "build/src/middleware/index.js.map" + "path": "node_modules/@google-cloud/storage/package.json" }, { - "path": "build/src/middleware/index.d.ts" + "path": "node_modules/@google-cloud/storage/node_modules/readable-stream/package.json" }, { - "path": "build/src/middleware/express/make-middleware.js.map" + "path": "node_modules/@google-cloud/paginator/package.json" }, { - "path": "build/src/middleware/express/index.js" + "path": "node_modules/@google-cloud/projectify/package.json" }, { - "path": "build/src/middleware/express/index.js.map" + "path": "node_modules/@google-cloud/pubsub/package.json" }, { - "path": "build/src/middleware/express/make-http-request.d.ts" + "path": "node_modules/@google-cloud/common/package.json" }, { - "path": "build/src/middleware/express/make-http-request.js" + "path": "node_modules/@google-cloud/precise-date/package.json" }, { - "path": "build/src/middleware/express/make-middleware.js" + "path": "node_modules/destroy/package.json" }, { - "path": "build/src/middleware/express/make-http-request.js.map" + "path": "node_modules/power-assert-renderer-base/package.json" }, { - "path": "build/src/middleware/express/make-middleware.d.ts" + "path": "node_modules/hash-stream-validation/package.json" }, { - "path": "build/src/middleware/express/index.d.ts" + "path": "node_modules/hash-stream-validation/node_modules/through2/package.json" }, { - "path": "protos/protos.d.ts" + "path": "node_modules/domhandler/package.json" }, { - "path": "protos/protos.js" + "path": "node_modules/tsutils/package.json" }, { - "path": "protos/protos.json" + "path": "node_modules/tslint-config-prettier/package.json" }, { - "path": "protos/google/logging/type/http_request.proto" + "path": "node_modules/mkdirp/package.json" }, { - "path": "protos/google/logging/type/log_severity.proto" + "path": "node_modules/http-proxy-agent/package.json" }, { - "path": "protos/google/logging/v2/logging_metrics.proto" + "path": "node_modules/http-proxy-agent/node_modules/agent-base/package.json" }, { - "path": "protos/google/logging/v2/logging_config.proto" + "path": "node_modules/http-proxy-agent/node_modules/debug/package.json" }, { - "path": "protos/google/logging/v2/log_entry.proto" + "path": "node_modules/@protobufjs/float/package.json" }, { - "path": "protos/google/logging/v2/logging.proto" + "path": "node_modules/@protobufjs/base64/package.json" }, { - "path": ".git/shallow" + "path": "node_modules/@protobufjs/fetch/package.json" }, { - "path": ".git/HEAD" + "path": "node_modules/@protobufjs/utf8/package.json" }, { - "path": ".git/config" + "path": "node_modules/@protobufjs/pool/package.json" }, { - "path": ".git/packed-refs" + "path": "node_modules/@protobufjs/aspromise/package.json" }, { - "path": ".git/index" + "path": "node_modules/@protobufjs/eventemitter/package.json" }, { - "path": ".git/objects/pack/pack-e49520443507c78c406ec9f8f8525ee9b82ef0da.idx" + "path": "node_modules/@protobufjs/inquire/package.json" }, { - "path": ".git/objects/pack/pack-e49520443507c78c406ec9f8f8525ee9b82ef0da.pack" + "path": "node_modules/@protobufjs/path/package.json" }, { - "path": ".git/logs/HEAD" + "path": "node_modules/@protobufjs/codegen/package.json" }, { - "path": ".git/logs/refs/heads/master" + "path": "node_modules/mime-types/package.json" }, { - "path": ".git/logs/refs/heads/autosynth" + "path": "node_modules/fast-deep-equal/package.json" }, { - "path": ".git/logs/refs/remotes/origin/HEAD" + "path": "node_modules/y18n/package.json" }, { - "path": ".git/refs/heads/master" + "path": "node_modules/send/package.json" }, { - "path": ".git/refs/heads/autosynth" + "path": "node_modules/send/node_modules/mime/package.json" }, { - "path": ".git/refs/remotes/origin/HEAD" + "path": "node_modules/send/node_modules/ms/package.json" }, { - "path": "src/common.ts" + "path": "node_modules/send/node_modules/debug/package.json" }, { - "path": "src/service_proto_list.json" + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" }, { - "path": "src/http-request.ts" + "path": "node_modules/is-promise/package.json" }, { - "path": "src/index.ts" + "path": "node_modules/is-url/package.json" }, { - "path": "src/entry.ts" + "path": "node_modules/resolve-from/package.json" }, { - "path": "src/sink.ts" + "path": "node_modules/estraverse/package.json" }, { - "path": "src/metadata.ts" + "path": "node_modules/rimraf/package.json" }, { - "path": "src/log.ts" + "path": "node_modules/supports-color/package.json" }, { - "path": "src/v2/metrics_service_v2_proto_list.json" + "path": "node_modules/external-editor/package.json" }, { - "path": "src/v2/metrics_service_v2_client_config.json" + "path": "node_modules/ignore-walk/package.json" }, { - "path": "src/v2/config_service_v2_client_config.json" + "path": "node_modules/os-tmpdir/package.json" }, { - "path": "src/v2/logging_service_v2_proto_list.json" + "path": "node_modules/escape-string-regexp/package.json" }, { - "path": "src/v2/metrics_service_v2_client.js" + "path": "node_modules/camelcase-keys/package.json" }, { - "path": "src/v2/index.js" + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" }, { - "path": "src/v2/config_service_v2_proto_list.json" + "path": "node_modules/camelcase-keys/node_modules/map-obj/package.json" }, { - "path": "src/v2/logging_service_v2_client.js" + "path": "node_modules/string_decoder/package.json" }, { - "path": "src/v2/logging_service_v2_client_config.json" + "path": "node_modules/is-number/package.json" }, { - "path": "src/v2/.eslintrc.yml" + "path": "node_modules/log-symbols/package.json" }, { - "path": "src/v2/config_service_v2_client.js" + "path": "node_modules/pump/package.json" }, { - "path": "src/v2/doc/google/api/doc_label.js" + "path": "node_modules/base64-js/package.json" }, { - "path": "src/v2/doc/google/api/doc_distribution.js" + "path": "node_modules/p-try/package.json" }, { - "path": "src/v2/doc/google/api/doc_monitored_resource.js" + "path": "node_modules/flat/package.json" }, { - "path": "src/v2/doc/google/api/doc_metric.js" + "path": "node_modules/json-schema-traverse/package.json" }, { - "path": "src/v2/doc/google/logging/type/doc_http_request.js" + "path": "node_modules/color-name/package.json" }, { - "path": "src/v2/doc/google/logging/v2/doc_logging_config.js" + "path": "node_modules/fill-range/package.json" }, { - "path": "src/v2/doc/google/logging/v2/doc_log_entry.js" + "path": "node_modules/convert-source-map/package.json" }, { - "path": "src/v2/doc/google/logging/v2/doc_logging_metrics.js" + "path": "node_modules/escape-html/package.json" }, { - "path": "src/v2/doc/google/logging/v2/doc_logging.js" + "path": "node_modules/require-main-filename/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_timestamp.js" + "path": "node_modules/es-to-primitive/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_duration.js" + "path": "node_modules/decamelize-keys/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_field_mask.js" + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_any.js" + "path": "node_modules/string-width/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_empty.js" + "path": "node_modules/type/package.json" }, { - "path": "src/v2/doc/google/protobuf/doc_struct.js" + "path": "node_modules/isexe/package.json" }, { - "path": "src/middleware/context.ts" + "path": "node_modules/underscore/package.json" }, { - "path": "src/middleware/index.ts" + "path": "node_modules/lines-and-columns/package.json" }, { - "path": "src/middleware/express/make-http-request.ts" + "path": "node_modules/event-emitter/package.json" }, { - "path": "src/middleware/express/index.ts" + "path": "node_modules/isarray/package.json" }, { - "path": "src/middleware/express/make-middleware.ts" + "path": "node_modules/deep-equal/package.json" }, { - "path": "node_modules/strip-final-newline/package.json" + "path": "node_modules/async-each/package.json" }, { - "path": "node_modules/progress/package.json" + "path": "node_modules/@types/normalize-package-data/package.json" }, { - "path": "node_modules/is-ci/package.json" + "path": "node_modules/@types/through2/package.json" }, { - "path": "node_modules/lolex/package.json" + "path": "node_modules/@types/color-name/package.json" }, { - "path": "node_modules/snakecase-keys/package.json" + "path": "node_modules/@types/minimist/package.json" }, { - "path": "node_modules/module-not-found-error/package.json" + "path": "node_modules/@types/tmp/package.json" }, { - "path": "node_modules/lru-cache/package.json" + "path": "node_modules/@types/extend/package.json" }, { - "path": "node_modules/destroy/package.json" + "path": "node_modules/@types/duplexify/package.json" }, { - "path": "node_modules/power-assert-context-formatter/package.json" + "path": "node_modules/@types/mv/package.json" }, { - "path": "node_modules/fast-json-stable-stringify/package.json" + "path": "node_modules/@types/mocha/package.json" }, { - "path": "node_modules/nice-try/package.json" + "path": "node_modules/@types/sinon/package.json" }, { - "path": "node_modules/which-module/package.json" + "path": "node_modules/@types/uuid/package.json" }, { - "path": "node_modules/array-find/package.json" + "path": "node_modules/@types/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/catharsis/package.json" + "path": "node_modules/@types/on-finished/package.json" }, { - "path": "node_modules/is-promise/package.json" + "path": "node_modules/@types/node/package.json" }, { - "path": "node_modules/v8-compile-cache/package.json" + "path": "node_modules/@types/pumpify/package.json" }, { - "path": "node_modules/doctrine/package.json" + "path": "node_modules/@types/is-windows/package.json" }, { - "path": "node_modules/callsites/package.json" + "path": "node_modules/@types/is/package.json" }, { - "path": "node_modules/diff/package.json" + "path": "node_modules/@types/long/package.json" }, { - "path": "node_modules/hosted-git-info/package.json" + "path": "node_modules/@types/fs-extra/package.json" }, { - "path": "node_modules/color-name/package.json" + "path": "node_modules/@types/ncp/package.json" }, { - "path": "node_modules/defer-to-connect/package.json" + "path": "node_modules/@types/proxyquire/package.json" }, { - "path": "node_modules/unpipe/package.json" + "path": "node_modules/word-wrap/package.json" }, { - "path": "node_modules/emoji-regex/package.json" + "path": "node_modules/fast-levenshtein/package.json" }, { - "path": "node_modules/http-errors/package.json" + "path": "node_modules/minimist/package.json" }, { - "path": "node_modules/eventemitter3/package.json" + "path": "node_modules/istanbul-lib-report/package.json" }, { - "path": "node_modules/hex2dec/package.json" + "path": "node_modules/json-buffer/package.json" }, { - "path": "node_modules/esutils/package.json" + "path": "node_modules/cli-width/package.json" }, { - "path": "node_modules/npm-run-path/package.json" + "path": "node_modules/builtin-modules/package.json" }, { - "path": "node_modules/he/package.json" + "path": "node_modules/validate-npm-package-license/package.json" }, { - "path": "node_modules/on-finished/package.json" + "path": "node_modules/minimist-options/package.json" }, { - "path": "node_modules/linkinator/package.json" + "path": "node_modules/minimist-options/node_modules/arrify/package.json" }, { - "path": "node_modules/linkinator/node_modules/update-notifier/package.json" + "path": "node_modules/camelcase/package.json" }, { - "path": "node_modules/linkinator/node_modules/redent/package.json" + "path": "node_modules/astral-regex/package.json" }, { - "path": "node_modules/linkinator/node_modules/semver-diff/package.json" + "path": "node_modules/d64/package.json" }, { - "path": "node_modules/linkinator/node_modules/meow/package.json" + "path": "node_modules/read-pkg/package.json" }, { - "path": "node_modules/linkinator/node_modules/term-size/package.json" + "path": "node_modules/serve-static/package.json" }, { - "path": "node_modules/linkinator/node_modules/indent-string/package.json" + "path": "node_modules/ignore/package.json" }, { - "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" + "path": "node_modules/acorn/package.json" }, { - "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" + "path": "node_modules/arrify/package.json" }, { - "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" + "path": "node_modules/node-forge/package.json" }, { - "path": "node_modules/linkinator/node_modules/boxen/package.json" + "path": "node_modules/call-matcher/package.json" }, { - "path": "node_modules/linkinator/node_modules/chalk/package.json" + "path": "node_modules/got/package.json" }, { - "path": "node_modules/linkinator/node_modules/arrify/package.json" + "path": "node_modules/got/node_modules/get-stream/package.json" }, { - "path": "node_modules/linkinator/node_modules/widest-line/package.json" + "path": "node_modules/got/node_modules/@sindresorhus/is/package.json" }, { - "path": "node_modules/linkinator/node_modules/global-dirs/package.json" + "path": "node_modules/get-stream/package.json" }, { - "path": "node_modules/linkinator/node_modules/parse-json/package.json" + "path": "node_modules/growl/package.json" }, { - "path": "node_modules/linkinator/node_modules/is-npm/package.json" + "path": "node_modules/tmp/package.json" }, { - "path": "node_modules/linkinator/node_modules/read-pkg/package.json" + "path": "node_modules/range-parser/package.json" }, { - "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" + "path": "node_modules/lodash.get/package.json" }, { - "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" + "path": "node_modules/balanced-match/package.json" }, { - "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" + "path": "node_modules/strip-bom/package.json" }, { - "path": "node_modules/linkinator/node_modules/strip-indent/package.json" + "path": "node_modules/path-is-inside/package.json" }, { - "path": "node_modules/linkinator/node_modules/quick-lru/package.json" + "path": "node_modules/array-filter/package.json" }, { - "path": "node_modules/linkinator/node_modules/minimist-options/package.json" + "path": "node_modules/esquery/package.json" }, { - "path": "node_modules/update-notifier/package.json" + "path": "node_modules/cross-spawn/package.json" }, { - "path": "node_modules/update-notifier/node_modules/dot-prop/package.json" + "path": "node_modules/locate-path/package.json" }, { - "path": "node_modules/update-notifier/node_modules/crypto-random-string/package.json" + "path": "node_modules/@istanbuljs/schema/package.json" }, { - "path": "node_modules/update-notifier/node_modules/is-obj/package.json" + "path": "node_modules/jsdoc/package.json" }, { - "path": "node_modules/update-notifier/node_modules/xdg-basedir/package.json" + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/update-notifier/node_modules/make-dir/package.json" + "path": "node_modules/core-js/package.json" }, { - "path": "node_modules/update-notifier/node_modules/unique-string/package.json" + "path": "node_modules/prettier/package.json" }, { - "path": "node_modules/update-notifier/node_modules/write-file-atomic/package.json" + "path": "node_modules/extend/package.json" }, { - "path": "node_modules/update-notifier/node_modules/configstore/package.json" + "path": "node_modules/function-bind/package.json" }, { - "path": "node_modules/p-cancelable/package.json" + "path": "node_modules/domutils/package.json" }, { - "path": "node_modules/markdown-it/package.json" + "path": "node_modules/prelude-ls/package.json" }, { - "path": "node_modules/dot-prop/package.json" + "path": "node_modules/currently-unhandled/package.json" }, { - "path": "node_modules/require-main-filename/package.json" + "path": "node_modules/he/package.json" }, { - "path": "node_modules/fast-diff/package.json" + "path": "node_modules/brace-expansion/package.json" }, { - "path": "node_modules/lodash.camelcase/package.json" + "path": "node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/mv/package.json" + "path": "node_modules/spdx-exceptions/package.json" }, { - "path": "node_modules/mv/node_modules/rimraf/package.json" + "path": "node_modules/power-assert-context-traversal/package.json" }, { - "path": "node_modules/mv/node_modules/glob/package.json" + "path": "node_modules/is-typedarray/package.json" }, { - "path": "node_modules/redent/package.json" + "path": "node_modules/binary-extensions/package.json" }, { - "path": "node_modules/resolve/package.json" + "path": "node_modules/has-flag/package.json" }, { - "path": "node_modules/globals/package.json" + "path": "node_modules/iconv-lite/package.json" }, { - "path": "node_modules/range-parser/package.json" + "path": "node_modules/jwa/package.json" }, { - "path": "node_modules/string.prototype.trimright/package.json" + "path": "node_modules/fresh/package.json" }, { - "path": "node_modules/inflight/package.json" + "path": "node_modules/is-path-inside/package.json" }, { - "path": "node_modules/debug/package.json" + "path": "node_modules/is-glob/package.json" }, { - "path": "node_modules/htmlparser2/package.json" + "path": "node_modules/linkify-it/package.json" }, { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + "path": "node_modules/parent-module/package.json" }, { - "path": "node_modules/semver-diff/package.json" + "path": "node_modules/compressible/package.json" }, { - "path": "node_modules/semver-diff/node_modules/semver/package.json" + "path": "node_modules/ee-first/package.json" }, { - "path": "node_modules/emitter-listener/package.json" + "path": "node_modules/glob-parent/package.json" }, { - "path": "node_modules/tsutils/package.json" + "path": "node_modules/json-stringify-safe/package.json" }, { - "path": "node_modules/multi-stage-sourcemap/package.json" + "path": "node_modules/is-object/package.json" }, { - "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" + "path": "node_modules/get-stdin/package.json" }, { - "path": "node_modules/ms/package.json" + "path": "node_modules/is-buffer/package.json" }, { - "path": "node_modules/linkify-it/package.json" + "path": "node_modules/lolex/package.json" }, { - "path": "node_modules/through/package.json" + "path": "node_modules/htmlparser2/package.json" }, { - "path": "node_modules/power-assert-renderer-file/package.json" + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" }, { - "path": "node_modules/string-width/package.json" + "path": "node_modules/prettier-linter-helpers/package.json" }, { - "path": "node_modules/html-escaper/package.json" + "path": "node_modules/npm-run-path/package.json" }, { - "path": "node_modules/type/package.json" + "path": "node_modules/duplexify/package.json" }, { - "path": "node_modules/type-fest/package.json" + "path": "node_modules/get-caller-file/package.json" }, { - "path": "node_modules/is/package.json" + "path": "node_modules/decamelize/package.json" }, { - "path": "node_modules/intelli-espower-loader/package.json" + "path": "node_modules/marked/package.json" }, { - "path": "node_modules/parseurl/package.json" + "path": "node_modules/diff/package.json" }, { - "path": "node_modules/buffer-from/package.json" + "path": "node_modules/object.assign/package.json" }, { - "path": "node_modules/google-p12-pem/package.json" + "path": "node_modules/power-assert-util-string-width/package.json" }, { - "path": "node_modules/get-caller-file/package.json" + "path": "node_modules/flat-cache/package.json" }, { - "path": "node_modules/klaw/package.json" + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" }, { - "path": "node_modules/http-proxy-agent/package.json" + "path": "node_modules/once/package.json" }, { - "path": "node_modules/http-proxy-agent/node_modules/debug/package.json" + "path": "node_modules/is-arguments/package.json" }, { - "path": "node_modules/http-proxy-agent/node_modules/agent-base/package.json" + "path": "node_modules/buffer-from/package.json" }, { - "path": "node_modules/map-obj/package.json" + "path": "node_modules/which/package.json" }, { - "path": "node_modules/node-fetch/package.json" + "path": "node_modules/is-symbol/package.json" }, { - "path": "node_modules/jsonexport/package.json" + "path": "node_modules/ajv/package.json" }, { - "path": "node_modules/isexe/package.json" + "path": "node_modules/clone-response/package.json" }, { - "path": "node_modules/escallmatch/package.json" + "path": "node_modules/lodash.snakecase/package.json" }, { - "path": "node_modules/escallmatch/node_modules/esprima/package.json" + "path": "node_modules/power-assert-renderer-comparison/package.json" }, { - "path": "node_modules/espower/package.json" + "path": "node_modules/doctrine/package.json" }, { - "path": "node_modules/espower/node_modules/source-map/package.json" + "path": "node_modules/is-callable/package.json" }, { - "path": "node_modules/run-async/package.json" + "path": "node_modules/parseurl/package.json" }, { - "path": "node_modules/validate-npm-package-license/package.json" + "path": "node_modules/type-detect/package.json" }, { - "path": "node_modules/file-entry-cache/package.json" + "path": "node_modules/espower-loader/package.json" }, { - "path": "node_modules/meow/package.json" + "path": "node_modules/is-obj/package.json" }, { - "path": "node_modules/meow/node_modules/camelcase/package.json" + "path": "node_modules/file-entry-cache/package.json" }, { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" + "path": "node_modules/d/package.json" }, { - "path": "node_modules/concat-map/package.json" + "path": "node_modules/responselike/package.json" }, { - "path": "node_modules/term-size/package.json" + "path": "node_modules/ansi-colors/package.json" }, { - "path": "node_modules/term-size/node_modules/lru-cache/package.json" + "path": "node_modules/has-yarn/package.json" }, { - "path": "node_modules/term-size/node_modules/npm-run-path/package.json" + "path": "node_modules/linkinator/package.json" }, { - "path": "node_modules/term-size/node_modules/yallist/package.json" + "path": "node_modules/linkinator/node_modules/redent/package.json" }, { - "path": "node_modules/term-size/node_modules/path-key/package.json" + "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/term-size/node_modules/shebang-command/package.json" + "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/term-size/node_modules/execa/package.json" + "path": "node_modules/linkinator/node_modules/minimist-options/package.json" }, { - "path": "node_modules/term-size/node_modules/get-stream/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg/package.json" }, { - "path": "node_modules/term-size/node_modules/is-stream/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" }, { - "path": "node_modules/term-size/node_modules/which/package.json" + "path": "node_modules/linkinator/node_modules/arrify/package.json" }, { - "path": "node_modules/term-size/node_modules/shebang-regex/package.json" + "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" }, { - "path": "node_modules/term-size/node_modules/cross-spawn/package.json" + "path": "node_modules/linkinator/node_modules/term-size/package.json" }, { - "path": "node_modules/xmlcreate/package.json" + "path": "node_modules/linkinator/node_modules/is-npm/package.json" }, { - "path": "node_modules/ansi-regex/package.json" + "path": "node_modules/linkinator/node_modules/indent-string/package.json" }, { - "path": "node_modules/yallist/package.json" + "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" }, { - "path": "node_modules/d64/package.json" + "path": "node_modules/linkinator/node_modules/chalk/package.json" }, { - "path": "node_modules/json-bigint/package.json" + "path": "node_modules/linkinator/node_modules/global-dirs/package.json" }, { - "path": "node_modules/json-bigint/node_modules/bignumber.js/package.json" + "path": "node_modules/linkinator/node_modules/strip-indent/package.json" }, { - "path": "node_modules/stream-events/package.json" + "path": "node_modules/linkinator/node_modules/update-notifier/package.json" }, { - "path": "node_modules/resolve-from/package.json" + "path": "node_modules/linkinator/node_modules/meow/package.json" }, { - "path": "node_modules/is-buffer/package.json" + "path": "node_modules/linkinator/node_modules/quick-lru/package.json" }, { - "path": "node_modules/cliui/package.json" + "path": "node_modules/linkinator/node_modules/parse-json/package.json" }, { - "path": "node_modules/toidentifier/package.json" + "path": "node_modules/linkinator/node_modules/widest-line/package.json" }, { - "path": "node_modules/balanced-match/package.json" + "path": "node_modules/linkinator/node_modules/semver-diff/package.json" }, { - "path": "node_modules/assert-rejects/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/marked/package.json" + "path": "node_modules/linkinator/node_modules/boxen/package.json" }, { - "path": "node_modules/wrappy/package.json" + "path": "node_modules/mv/package.json" }, { - "path": "node_modules/to-snake-case/package.json" + "path": "node_modules/mv/node_modules/rimraf/package.json" }, { - "path": "node_modules/jsdoc-region-tag/package.json" + "path": "node_modules/mv/node_modules/glob/package.json" }, { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + "path": "node_modules/ext/package.json" }, { - "path": "node_modules/glob-parent/package.json" + "path": "node_modules/ext/node_modules/type/package.json" }, { - "path": "node_modules/xtend/package.json" + "path": "node_modules/jws/package.json" }, { - "path": "node_modules/is-arguments/package.json" + "path": "node_modules/p-finally/package.json" + }, + { + "path": "node_modules/json-parse-better-errors/package.json" + }, + { + "path": "node_modules/is-stream-ended/package.json" + }, + { + "path": "node_modules/anymatch/package.json" }, { "path": "node_modules/set-blocking/package.json" }, { - "path": "node_modules/istanbul-lib-report/package.json" + "path": "node_modules/yargs-parser/package.json" }, { - "path": "node_modules/load-json-file/package.json" + "path": "node_modules/regexp.prototype.flags/package.json" }, { - "path": "node_modules/ansi-align/package.json" + "path": "node_modules/sprintf-js/package.json" }, { - "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" + "path": "node_modules/boolbase/package.json" }, { - "path": "node_modules/ansi-align/node_modules/string-width/package.json" + "path": "node_modules/string.prototype.trimright/package.json" }, { - "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" + "path": "node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" + "path": "node_modules/intelli-espower-loader/package.json" }, { - "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/espower-source/package.json" }, { - "path": "node_modules/duplexer3/package.json" + "path": "node_modules/espower-source/node_modules/acorn/package.json" }, { - "path": "node_modules/esprima/package.json" + "path": "node_modules/ansi-regex/package.json" }, { - "path": "node_modules/is-stream-ended/package.json" + "path": "node_modules/next-tick/package.json" }, { - "path": "node_modules/minimatch/package.json" + "path": "node_modules/is-date-object/package.json" }, { - "path": "node_modules/crypto-random-string/package.json" + "path": "node_modules/concat-stream/package.json" }, { - "path": "node_modules/growl/package.json" + "path": "node_modules/concat-stream/node_modules/readable-stream/package.json" }, { - "path": "node_modules/string.prototype.trimleft/package.json" + "path": "node_modules/http-errors/package.json" }, { - "path": "node_modules/istanbul-lib-coverage/package.json" + "path": "node_modules/path-key/package.json" }, { - "path": "node_modules/normalize-package-data/package.json" + "path": "node_modules/ini/package.json" }, { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + "path": "node_modules/json-bigint/package.json" }, { - "path": "node_modules/fast-text-encoding/package.json" + "path": "node_modules/json-bigint/node_modules/bignumber.js/package.json" }, { - "path": "node_modules/server-destroy/package.json" + "path": "node_modules/object.getownpropertydescriptors/package.json" }, { - "path": "node_modules/prelude-ls/package.json" + "path": "node_modules/rxjs/package.json" }, { - "path": "node_modules/d/package.json" + "path": "node_modules/power-assert-renderer-file/package.json" + }, + { + "path": "node_modules/@grpc/proto-loader/package.json" + }, + { + "path": "node_modules/@grpc/grpc-js/package.json" + }, + { + "path": "node_modules/argparse/package.json" + }, + { + "path": "node_modules/has/package.json" + }, + { + "path": "node_modules/type-fest/package.json" }, { "path": "node_modules/protobufjs/package.json" }, { - "path": "node_modules/domhandler/package.json" + "path": "node_modules/gtoken/package.json" }, { - "path": "node_modules/ansi-escapes/package.json" + "path": "node_modules/uri-js/package.json" }, { - "path": "node_modules/power-assert-renderer-base/package.json" + "path": "node_modules/min-indent/package.json" }, { - "path": "node_modules/boolbase/package.json" + "path": "node_modules/map-obj/package.json" }, { - "path": "node_modules/indent-string/package.json" + "path": "node_modules/just-extend/package.json" }, { - "path": "node_modules/lodash/package.json" + "path": "node_modules/nise/package.json" }, { - "path": "node_modules/taffydb/package.json" + "path": "node_modules/fast-text-encoding/package.json" }, { - "path": "node_modules/extend/package.json" + "path": "node_modules/js-tokens/package.json" }, { - "path": "node_modules/is-yarn-global/package.json" + "path": "node_modules/ansi-escapes/package.json" }, { - "path": "node_modules/dom-serializer/package.json" + "path": "node_modules/term-size/package.json" }, { - "path": "node_modules/end-of-stream/package.json" + "path": "node_modules/term-size/node_modules/get-stream/package.json" }, { - "path": "node_modules/log-symbols/package.json" + "path": "node_modules/term-size/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/is-callable/package.json" + "path": "node_modules/term-size/node_modules/npm-run-path/package.json" }, { - "path": "node_modules/es5-ext/package.json" + "path": "node_modules/term-size/node_modules/which/package.json" }, { - "path": "node_modules/stringifier/package.json" + "path": "node_modules/term-size/node_modules/path-key/package.json" }, { - "path": "node_modules/es6-weak-map/package.json" + "path": "node_modules/term-size/node_modules/execa/package.json" }, { - "path": "node_modules/camelcase-keys/package.json" + "path": "node_modules/term-size/node_modules/is-stream/package.json" }, { - "path": "node_modules/camelcase-keys/node_modules/map-obj/package.json" + "path": "node_modules/term-size/node_modules/yallist/package.json" }, { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + "path": "node_modules/term-size/node_modules/lru-cache/package.json" }, { - "path": "node_modules/log-driver/package.json" + "path": "node_modules/term-size/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/decompress-response/package.json" + "path": "node_modules/term-size/node_modules/shebang-command/package.json" }, { - "path": "node_modules/js-yaml/package.json" + "path": "node_modules/run-async/package.json" }, { - "path": "node_modules/cli-boxes/package.json" + "path": "node_modules/find-up/package.json" }, { - "path": "node_modules/is-obj/package.json" + "path": "node_modules/string-format-obj/package.json" }, { - "path": "node_modules/is-typedarray/package.json" + "path": "node_modules/es6-promisify/package.json" }, { - "path": "node_modules/registry-auth-token/package.json" + "path": "node_modules/wide-align/package.json" }, { - "path": "node_modules/hash-stream-validation/package.json" + "path": "node_modules/wide-align/node_modules/string-width/package.json" }, { - "path": "node_modules/hash-stream-validation/node_modules/through2/package.json" + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/read-pkg-up/package.json" + "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + "path": "node_modules/nock/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" + "path": "node_modules/nock/node_modules/debug/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" + "path": "node_modules/is-npm/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + "path": "node_modules/cli-boxes/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + "path": "node_modules/array-find-index/package.json" }, { - "path": "node_modules/buffer-equal-constant-time/package.json" + "path": "node_modules/mime/package.json" }, { - "path": "node_modules/@bcoe/v8-coverage/package.json" + "path": "node_modules/empower-assert/package.json" }, { - "path": "node_modules/eslint-scope/package.json" + "path": "node_modules/execa/package.json" }, { - "path": "node_modules/stream-shift/package.json" + "path": "node_modules/human-signals/package.json" }, { "path": "node_modules/is-extglob/package.json" }, { - "path": "node_modules/typedarray-to-buffer/index.js" + "path": "node_modules/yargs-unparser/package.json" }, { - "path": "node_modules/typedarray-to-buffer/README.md" + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" + "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.travis.yml" + "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" }, { - "path": "node_modules/typedarray-to-buffer/package.json" + "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" }, { - "path": "node_modules/typedarray-to-buffer/LICENSE" + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" }, { - "path": "node_modules/typedarray-to-buffer/test/basic.js" + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/restore-cursor/package.json" + "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/mimic-response/package.json" + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" }, { - "path": "node_modules/normalize-url/package.json" + "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/fresh/package.json" + "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" }, { - "path": "node_modules/imurmurhash/package.json" + "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/indexof/package.json" + "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" }, { - "path": "node_modules/continuation-local-storage/package.json" + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" }, { - "path": "node_modules/codecov/package.json" + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" }, { - "path": "node_modules/codecov/node_modules/https-proxy-agent/package.json" + "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/codecov/node_modules/teeny-request/package.json" + "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/ajv/package.json" + "path": "node_modules/deep-extend/package.json" }, { - "path": "node_modules/is-path-inside/package.json" + "path": "node_modules/google-gax/package.json" }, { - "path": "node_modules/import-lazy/package.json" + "path": "node_modules/google-gax/node_modules/semver/package.json" }, { - "path": "node_modules/json-schema-traverse/package.json" + "path": "node_modules/strip-eof/package.json" }, { - "path": "node_modules/ncp/package.json" + "path": "node_modules/eslint-scope/package.json" }, { - "path": "node_modules/rxjs/package.json" + "path": "node_modules/ms/package.json" }, { - "path": "node_modules/p-locate/package.json" + "path": "node_modules/parse5/package.json" }, { - "path": "node_modules/figures/package.json" + "path": "node_modules/indent-string/package.json" }, { - "path": "node_modules/underscore/package.json" + "path": "node_modules/@sinonjs/text-encoding/package.json" }, { - "path": "node_modules/finalhandler/package.json" + "path": "node_modules/@sinonjs/commons/package.json" }, { - "path": "node_modules/finalhandler/node_modules/debug/package.json" + "path": "node_modules/@sinonjs/formatio/package.json" }, { - "path": "node_modules/finalhandler/node_modules/ms/package.json" + "path": "node_modules/@sinonjs/samsam/package.json" }, { - "path": "node_modules/ignore/package.json" + "path": "node_modules/inherits/package.json" }, { - "path": "node_modules/argv/package.json" + "path": "node_modules/js2xmlparser/package.json" }, { - "path": "node_modules/path-is-absolute/package.json" + "path": "node_modules/css-select/package.json" }, { - "path": "node_modules/graceful-fs/package.json" + "path": "node_modules/codecov/package.json" }, { - "path": "node_modules/currently-unhandled/package.json" + "path": "node_modules/codecov/node_modules/teeny-request/package.json" }, { - "path": "node_modules/gcs-resumable-upload/package.json" + "path": "node_modules/codecov/node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/google-gax/package.json" + "path": "node_modules/trim-newlines/package.json" }, { - "path": "node_modules/google-gax/node_modules/semver/package.json" + "path": "node_modules/gts/package.json" }, { - "path": "node_modules/onetime/package.json" + "path": "node_modules/gts/node_modules/chalk/package.json" }, { - "path": "node_modules/path-key/package.json" + "path": "node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/core-util-is/package.json" + "path": "node_modules/html-escaper/package.json" }, { - "path": "node_modules/array-filter/package.json" + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" }, { - "path": "node_modules/prepend-http/package.json" + "path": "node_modules/mocha/package.json" }, { - "path": "node_modules/write/package.json" + "path": "node_modules/mocha/node_modules/yargs/package.json" }, { - "path": "node_modules/duplexify/package.json" + "path": "node_modules/mocha/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/camelcase/package.json" + "path": "node_modules/mocha/node_modules/supports-color/package.json" }, { - "path": "node_modules/error-ex/package.json" + "path": "node_modules/mocha/node_modules/color-name/package.json" }, { - "path": "node_modules/empower-assert/package.json" + "path": "node_modules/mocha/node_modules/string-width/package.json" }, { - "path": "node_modules/boxen/package.json" + "path": "node_modules/mocha/node_modules/locate-path/package.json" }, { - "path": "node_modules/boxen/node_modules/emoji-regex/package.json" + "path": "node_modules/mocha/node_modules/has-flag/package.json" }, { - "path": "node_modules/boxen/node_modules/string-width/package.json" + "path": "node_modules/mocha/node_modules/diff/package.json" }, { - "path": "node_modules/boxen/node_modules/type-fest/package.json" + "path": "node_modules/mocha/node_modules/which/package.json" }, { - "path": "node_modules/boxen/node_modules/ansi-regex/package.json" + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/boxen/node_modules/strip-ansi/package.json" + "path": "node_modules/mocha/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/mocha/node_modules/find-up/package.json" }, { - "path": "node_modules/node-environment-flags/package.json" + "path": "node_modules/mocha/node_modules/ms/package.json" }, { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/c8/package.json" + "path": "node_modules/mocha/node_modules/cliui/package.json" }, { - "path": "node_modules/gcp-metadata/package.json" + "path": "node_modules/mocha/node_modules/glob/package.json" }, { - "path": "node_modules/json-buffer/package.json" + "path": "node_modules/mocha/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/mkdirp/package.json" + "path": "node_modules/mocha/node_modules/color-convert/package.json" }, { - "path": "node_modules/bluebird/package.json" + "path": "node_modules/mocha/node_modules/p-locate/package.json" }, { - "path": "node_modules/big.js/package.json" + "path": "node_modules/mocha/node_modules/path-exists/package.json" }, { - "path": "node_modules/shebang-command/package.json" + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/serve-static/package.json" + "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/path-parse/package.json" + "path": "node_modules/mocha/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/mime/package.json" + "path": "node_modules/graceful-fs/package.json" }, { - "path": "node_modules/yargs-unparser/package.json" + "path": "node_modules/sinon/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" + "path": "node_modules/uuid/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" + "path": "node_modules/typescript/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" + "path": "node_modules/entities/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" + "path": "node_modules/universal-deep-strict-equal/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" + "path": "node_modules/toidentifier/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + "path": "node_modules/urlgrey/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + "path": "node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" + "path": "node_modules/async-listener/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" + "path": "node_modules/async-listener/node_modules/semver/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/call-signature/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + "path": "node_modules/to-no-case/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" + "path": "node_modules/ci-info/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + "path": "node_modules/chalk/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + "path": "node_modules/chalk/node_modules/supports-color/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" + "path": "node_modules/chalk/node_modules/color-name/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + "path": "node_modules/chalk/node_modules/has-flag/package.json" }, { - "path": "node_modules/lines-and-columns/package.json" + "path": "node_modules/chalk/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/is-url/package.json" + "path": "node_modules/chalk/node_modules/color-convert/package.json" }, { - "path": "node_modules/chalk/package.json" + "path": "node_modules/is-binary-path/package.json" }, { - "path": "node_modules/chalk/node_modules/color-name/package.json" + "path": "node_modules/cliui/package.json" }, { - "path": "node_modules/chalk/node_modules/has-flag/package.json" + "path": "node_modules/nice-try/package.json" }, { - "path": "node_modules/chalk/node_modules/ansi-styles/package.json" + "path": "node_modules/global-dirs/package.json" }, { - "path": "node_modules/chalk/node_modules/supports-color/package.json" + "path": "node_modules/import-lazy/package.json" }, { - "path": "node_modules/chalk/node_modules/color-convert/package.json" + "path": "node_modules/depd/package.json" }, { - "path": "node_modules/path-to-regexp/package.json" + "path": "node_modules/path-is-absolute/package.json" }, { - "path": "node_modules/path-to-regexp/node_modules/isarray/package.json" + "path": "node_modules/object-keys/package.json" }, { - "path": "node_modules/locate-path/package.json" + "path": "node_modules/istanbul-reports/package.json" }, { - "path": "node_modules/spdx-expression-parse/package.json" + "path": "node_modules/google-auth-library/package.json" }, { - "path": "node_modules/power-assert-util-string-width/package.json" + "path": "node_modules/p-defer/package.json" }, { - "path": "node_modules/esquery/package.json" + "path": "node_modules/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/to-readable-stream/package.json" + "path": "node_modules/fast-json-stable-stringify/package.json" }, { - "path": "node_modules/eventid/package.json" + "path": "node_modules/type-name/package.json" }, { - "path": "node_modules/jsdoc-fresh/package.json" + "path": "node_modules/traverse/package.json" }, { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + "path": "node_modules/module-not-found-error/package.json" }, { - "path": "node_modules/espower-location-detector/package.json" + "path": "node_modules/cheerio/package.json" }, { - "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" + "path": "node_modules/power-assert-context-reducer-ast/package.json" }, { - "path": "node_modules/strip-ansi/package.json" + "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" }, { - "path": "node_modules/is-arrayish/package.json" + "path": "node_modules/minimatch/package.json" }, { - "path": "node_modules/prettier-linter-helpers/package.json" + "path": "node_modules/jsdoc-fresh/package.json" }, { - "path": "node_modules/chardet/package.json" + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" }, { - "path": "node_modules/amdefine/package.json" + "path": "node_modules/stream-events/package.json" }, { - "path": "node_modules/http-cache-semantics/package.json" + "path": "node_modules/inquirer/package.json" }, { - "path": "node_modules/concat-stream/package.json" + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/concat-stream/node_modules/readable-stream/package.json" + "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/has-flag/package.json" + "path": "node_modules/indexof/package.json" }, { - "path": "node_modules/cheerio/package.json" + "path": "node_modules/through/package.json" }, { - "path": "node_modules/domelementtype/package.json" + "path": "node_modules/restore-cursor/package.json" }, { - "path": "node_modules/@szmarczak/http-timer/package.json" + "path": "node_modules/esrecurse/package.json" }, { - "path": "node_modules/tmp/package.json" + "path": "node_modules/glob/package.json" }, { - "path": "node_modules/entities/package.json" + "path": "node_modules/ansi-styles/package.json" }, { - "path": "node_modules/execa/package.json" + "path": "node_modules/globals/package.json" }, { - "path": "node_modules/strip-bom/package.json" + "path": "node_modules/gcp-metadata/package.json" }, { - "path": "node_modules/is-regexp/package.json" + "path": "node_modules/js-yaml/package.json" }, { - "path": "node_modules/argparse/package.json" + "path": "node_modules/xtend/package.json" }, { - "path": "node_modules/has/package.json" + "path": "node_modules/multi-stage-sourcemap/package.json" }, { - "path": "node_modules/ee-first/package.json" + "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" }, { - "path": "node_modules/object-inspect/package.json" + "path": "node_modules/css-what/package.json" }, { - "path": "node_modules/deep-equal/package.json" + "path": "node_modules/latest-version/package.json" }, { - "path": "node_modules/table/package.json" + "path": "node_modules/lodash.at/package.json" }, { - "path": "node_modules/table/node_modules/emoji-regex/package.json" + "path": "node_modules/is-stream/package.json" }, { - "path": "node_modules/table/node_modules/string-width/package.json" + "path": "node_modules/foreground-child/package.json" }, { - "path": "node_modules/table/node_modules/ansi-regex/package.json" + "path": "node_modules/power-assert/package.json" }, { - "path": "node_modules/table/node_modules/strip-ansi/package.json" + "path": "node_modules/yallist/package.json" }, { - "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/spdx-license-ids/package.json" }, { - "path": "node_modules/spdx-correct/package.json" + "path": "node_modules/etag/package.json" }, { - "path": "node_modules/get-stream/package.json" + "path": "node_modules/duplexer3/package.json" }, { - "path": "node_modules/sinon/package.json" + "path": "node_modules/walkdir/package.json" }, { - "path": "node_modules/power-assert/package.json" + "path": "node_modules/espurify/package.json" }, { - "path": "node_modules/statuses/package.json" + "path": "node_modules/path-parse/package.json" }, { - "path": "node_modules/@istanbuljs/schema/package.json" + "path": "node_modules/es6-map/package.json" }, { - "path": "node_modules/es6-set/package.json" + "path": "node_modules/punycode/package.json" }, { - "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + "path": "node_modules/jsdoc-region-tag/package.json" }, { - "path": "node_modules/proxyquire/package.json" + "path": "node_modules/url-parse-lax/package.json" }, { - "path": "node_modules/istanbul-reports/package.json" + "path": "node_modules/on-finished/package.json" }, { - "path": "node_modules/@grpc/grpc-js/package.json" + "path": "node_modules/inflight/package.json" }, { - "path": "node_modules/@grpc/proto-loader/package.json" + "path": "node_modules/is-plain-obj/package.json" }, { - "path": "node_modules/lowercase-keys/package.json" + "path": "node_modules/encodeurl/package.json" }, { - "path": "node_modules/etag/package.json" + "path": "node_modules/readable-stream/package.json" }, { - "path": "node_modules/y18n/package.json" + "path": "node_modules/require-directory/package.json" }, { - "path": "node_modules/diff-match-patch/package.json" + "path": "node_modules/unpipe/package.json" }, { - "path": "node_modules/merge-descriptors/package.json" + "path": "node_modules/http2spy/package.json" }, { - "path": "node_modules/es6-iterator/package.json" + "path": "node_modules/nth-check/package.json" }, { - "path": "node_modules/eslint-plugin-node/package.json" + "path": "node_modules/@sindresorhus/is/package.json" }, { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + "path": "node_modules/spdx-expression-parse/package.json" }, { - "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" + "path": "node_modules/text-table/package.json" }, { - "path": "node_modules/natural-compare/package.json" + "path": "node_modules/color-convert/package.json" }, { - "path": "node_modules/uuid/package.json" + "path": "node_modules/markdown-it-anchor/package.json" }, { - "path": "node_modules/event-target-shim/package.json" + "path": "node_modules/spdx-correct/package.json" }, { - "path": "node_modules/arrify/package.json" + "path": "node_modules/hosted-git-info/package.json" }, { - "path": "node_modules/widest-line/package.json" + "path": "node_modules/esutils/package.json" }, { - "path": "node_modules/widest-line/node_modules/string-width/package.json" + "path": "node_modules/agent-base/package.json" }, { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + "path": "node_modules/configstore/package.json" }, { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + "path": "node_modules/stubs/package.json" }, { - "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/ansi-align/package.json" }, { - "path": "node_modules/ignore-walk/package.json" + "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/util-deprecate/package.json" + "path": "node_modules/ansi-align/node_modules/string-width/package.json" }, { - "path": "node_modules/function-bind/package.json" + "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/object-is/package.json" + "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/@types/color-name/package.json" + "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/@types/on-finished/package.json" + "path": "node_modules/pumpify/package.json" }, { - "path": "node_modules/@types/mv/package.json" + "path": "node_modules/pumpify/node_modules/duplexify/package.json" }, { - "path": "node_modules/@types/is/package.json" + "path": "node_modules/pumpify/node_modules/readable-stream/package.json" }, { - "path": "node_modules/@types/node/package.json" + "path": "node_modules/to-snake-case/package.json" }, { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" + "path": "node_modules/is-windows/package.json" }, { - "path": "node_modules/@types/normalize-package-data/package.json" + "path": "node_modules/esprima/package.json" }, { - "path": "node_modules/@types/extend/package.json" + "path": "node_modules/semver/package.json" }, { - "path": "node_modules/@types/ncp/package.json" + "path": "node_modules/strip-indent/package.json" }, { - "path": "node_modules/@types/duplexify/package.json" + "path": "node_modules/eslint-utils/package.json" }, { - "path": "node_modules/@types/tmp/package.json" + "path": "node_modules/update-notifier/package.json" }, { - "path": "node_modules/@types/sinon/package.json" + "path": "node_modules/update-notifier/node_modules/make-dir/package.json" }, { - "path": "node_modules/@types/proxyquire/package.json" + "path": "node_modules/update-notifier/node_modules/is-obj/package.json" }, { - "path": "node_modules/@types/uuid/package.json" + "path": "node_modules/update-notifier/node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/@types/is-windows/package.json" + "path": "node_modules/update-notifier/node_modules/configstore/package.json" }, { - "path": "node_modules/@types/pumpify/package.json" + "path": "node_modules/update-notifier/node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/@types/mocha/package.json" + "path": "node_modules/update-notifier/node_modules/dot-prop/package.json" }, { - "path": "node_modules/@types/minimist/package.json" + "path": "node_modules/update-notifier/node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/@types/fs-extra/package.json" + "path": "node_modules/update-notifier/node_modules/unique-string/package.json" }, { - "path": "node_modules/@types/long/package.json" + "path": "node_modules/lru-cache/package.json" }, { - "path": "node_modules/@types/through2/package.json" + "path": "node_modules/big.js/package.json" }, { - "path": "node_modules/is-windows/package.json" + "path": "node_modules/domelementtype/package.json" }, { - "path": "node_modules/levn/package.json" + "path": "node_modules/server-destroy/package.json" }, { - "path": "node_modules/pseudomap/package.json" + "path": "node_modules/shebang-regex/package.json" }, { - "path": "node_modules/global-dirs/package.json" + "path": "node_modules/process-nextick-args/package.json" }, { - "path": "node_modules/power-assert-renderer-diagram/package.json" + "path": "node_modules/deep-is/package.json" }, { - "path": "node_modules/is-stream/package.json" + "path": "node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/es6-symbol/package.json" + "path": "node_modules/mute-stream/package.json" }, { - "path": "node_modules/compressible/package.json" + "path": "node_modules/registry-auth-token/package.json" }, { - "path": "node_modules/parse-json/package.json" + "path": "node_modules/espower-location-detector/package.json" }, { - "path": "node_modules/xdg-basedir/package.json" + "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" }, { - "path": "node_modules/spdx-license-ids/package.json" + "path": "node_modules/flatted/package.json" }, { - "path": "node_modules/google-auth-library/package.json" + "path": "node_modules/mime-db/package.json" }, { - "path": "node_modules/brace-expansion/package.json" + "path": "node_modules/has-symbols/package.json" }, { - "path": "node_modules/builtin-modules/package.json" + "path": "node_modules/klaw/package.json" }, { - "path": "node_modules/tslint/package.json" + "path": "node_modules/emitter-listener/package.json" }, { - "path": "node_modules/tslint/node_modules/semver/package.json" + "path": "node_modules/meow/package.json" }, { - "path": "node_modules/type-name/package.json" + "path": "node_modules/meow/node_modules/camelcase/package.json" }, { - "path": "node_modules/string-format-obj/package.json" + "path": "node_modules/meow/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/define-properties/package.json" + "path": "node_modules/@szmarczak/http-timer/package.json" }, { - "path": "node_modules/universal-deep-strict-equal/package.json" + "path": "node_modules/load-json-file/package.json" }, { - "path": "node_modules/jws/package.json" + "path": "node_modules/is-yarn-global/package.json" }, { - "path": "node_modules/nth-check/package.json" + "path": "node_modules/path-to-regexp/package.json" }, { - "path": "node_modules/p-defer/package.json" + "path": "node_modules/path-to-regexp/node_modules/isarray/package.json" }, { - "path": "node_modules/empower/package.json" + "path": "node_modules/gcs-resumable-upload/package.json" }, { - "path": "node_modules/send/package.json" + "path": "node_modules/lodash.camelcase/package.json" }, { - "path": "node_modules/send/node_modules/debug/package.json" + "path": "node_modules/fs.realpath/package.json" }, { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + "path": "node_modules/typedarray/package.json" }, { - "path": "node_modules/send/node_modules/ms/package.json" + "path": "node_modules/eventid/package.json" }, { - "path": "node_modules/send/node_modules/mime/package.json" + "path": "node_modules/progress/package.json" }, { - "path": "node_modules/require-directory/package.json" + "path": "node_modules/eastasianwidth/package.json" }, { - "path": "node_modules/object.assign/package.json" + "path": "node_modules/string.prototype.trimleft/package.json" }, { - "path": "node_modules/is-npm/package.json" + "path": "node_modules/ecdsa-sig-formatter/package.json" }, { - "path": "node_modules/min-indent/package.json" + "path": "node_modules/buffer-equal-constant-time/package.json" }, { - "path": "node_modules/functional-red-black-tree/package.json" + "path": "node_modules/dot-prop/package.json" }, { - "path": "node_modules/read-pkg/package.json" + "path": "node_modules/http-cache-semantics/package.json" }, { - "path": "node_modules/to-no-case/package.json" + "path": "node_modules/type-check/package.json" }, { - "path": "node_modules/registry-url/package.json" + "path": "node_modules/es5-ext/package.json" }, { - "path": "node_modules/is-regex/package.json" + "path": "node_modules/readdirp/package.json" }, { - "path": "node_modules/es-abstract/package.json" + "path": "node_modules/util-deprecate/package.json" }, { - "path": "node_modules/parent-module/package.json" + "path": "node_modules/bignumber.js/package.json" }, { - "path": "node_modules/type-detect/package.json" + "path": "node_modules/define-properties/package.json" }, { - "path": "node_modules/signal-exit/package.json" + "path": "node_modules/es6-iterator/package.json" }, { - "path": "node_modules/import-fresh/package.json" + "path": "node_modules/taffydb/package.json" }, { - "path": "node_modules/keyv/package.json" + "path": "node_modules/regexpp/package.json" }, { - "path": "node_modules/estraverse/package.json" + "path": "node_modules/statuses/package.json" }, { - "path": "node_modules/fast-deep-equal/package.json" + "path": "node_modules/mimic-response/package.json" }, { - "path": "node_modules/mute-stream/package.json" + "path": "node_modules/escope/package.json" }, { - "path": "node_modules/power-assert-context-traversal/package.json" + "path": "node_modules/hex2dec/package.json" }, { - "path": "node_modules/rimraf/package.json" + "path": "node_modules/es6-promise/package.json" }, { - "path": "node_modules/is-installed-globally/package.json" + "path": "node_modules/argv/package.json" }, { - "path": "node_modules/get-stdin/package.json" + "path": "node_modules/p-timeout/package.json" }, { - "path": "node_modules/make-dir/package.json" + "path": "node_modules/ent/package.json" }, { - "path": "node_modules/es6-promise/package.json" + "path": "node_modules/power-assert-renderer-diagram/package.json" }, { - "path": "node_modules/os-tmpdir/package.json" + "path": "node_modules/pify/package.json" }, { - "path": "node_modules/retry-request/package.json" + "path": "node_modules/mimic-fn/package.json" }, { - "path": "node_modules/retry-request/node_modules/debug/package.json" + "path": "node_modules/p-locate/package.json" }, { - "path": "node_modules/cli-cursor/package.json" + "path": "node_modules/assert-rejects/package.json" }, { - "path": "node_modules/to-space-case/package.json" + "path": "node_modules/log-driver/package.json" }, { - "path": "node_modules/ext/package.json" + "path": "node_modules/chardet/package.json" }, { - "path": "node_modules/ext/node_modules/type/package.json" + "path": "node_modules/quick-lru/package.json" }, { - "path": "node_modules/is-symbol/package.json" + "path": "node_modules/browser-stdout/package.json" }, { - "path": "node_modules/css-what/package.json" + "path": "node_modules/eslint-plugin-es/package.json" }, { - "path": "node_modules/ent/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/punycode/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" }, { - "path": "node_modules/setprototypeof/package.json" + "path": "node_modules/v8-compile-cache/package.json" }, { - "path": "node_modules/word-wrap/package.json" + "path": "node_modules/rc/package.json" }, { - "path": "node_modules/foreground-child/package.json" + "path": "node_modules/rc/node_modules/minimist/package.json" }, { - "path": "node_modules/@sinonjs/text-encoding/package.json" + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/@sinonjs/samsam/package.json" + "path": "node_modules/parse-json/package.json" }, { - "path": "node_modules/@sinonjs/commons/package.json" + "path": "node_modules/pseudomap/package.json" }, { - "path": "node_modules/@sinonjs/formatio/package.json" + "path": "node_modules/tslint/package.json" }, { - "path": "node_modules/pumpify/package.json" + "path": "node_modules/tslint/node_modules/semver/package.json" }, { - "path": "node_modules/pumpify/node_modules/duplexify/package.json" + "path": "node_modules/abort-controller/package.json" }, { - "path": "node_modules/pumpify/node_modules/readable-stream/package.json" + "path": "node_modules/write/package.json" }, { - "path": "node_modules/es6-map/package.json" + "path": "node_modules/braces/package.json" }, { - "path": "node_modules/call-signature/package.json" + "path": "node_modules/xmlcreate/package.json" }, { - "path": "node_modules/package-json/package.json" + "path": "node_modules/finalhandler/package.json" }, { - "path": "node_modules/css-select/package.json" + "path": "node_modules/finalhandler/node_modules/ms/package.json" }, { - "path": "node_modules/path-is-inside/package.json" + "path": "node_modules/finalhandler/node_modules/debug/package.json" }, { - "path": "node_modules/eslint-plugin-prettier/package.json" + "path": "node_modules/eslint-config-prettier/package.json" }, { - "path": "node_modules/p-finally/package.json" + "path": "node_modules/google-p12-pem/package.json" }, { - "path": "node_modules/inquirer/package.json" + "path": "node_modules/fill-keys/package.json" }, { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + "path": "node_modules/espree/package.json" }, { - "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" + "path": "node_modules/requizzle/package.json" }, { - "path": "node_modules/acorn-jsx/package.json" + "path": "node_modules/imurmurhash/package.json" }, { - "path": "node_modules/glob/package.json" + "path": "node_modules/catharsis/package.json" }, { - "path": "node_modules/mocha/package.json" + "path": "node_modules/decompress-response/package.json" }, { - "path": "node_modules/mocha/node_modules/diff/package.json" + "path": "node_modules/onetime/package.json" }, { - "path": "node_modules/mocha/node_modules/color-name/package.json" + "path": "node_modules/empower-core/package.json" }, { - "path": "node_modules/mocha/node_modules/emoji-regex/package.json" + "path": "node_modules/error-ex/package.json" }, { - "path": "node_modules/mocha/node_modules/ms/package.json" + "path": "node_modules/is-regex/package.json" }, { - "path": "node_modules/mocha/node_modules/string-width/package.json" + "path": "node_modules/escallmatch/package.json" }, { - "path": "node_modules/mocha/node_modules/ansi-regex/package.json" + "path": "node_modules/escallmatch/node_modules/esprima/package.json" }, { - "path": "node_modules/mocha/node_modules/cliui/package.json" + "path": "node_modules/amdefine/package.json" }, { - "path": "node_modules/mocha/node_modules/p-locate/package.json" + "path": "node_modules/merge-descriptors/package.json" }, { - "path": "node_modules/mocha/node_modules/locate-path/package.json" + "path": "node_modules/@babel/code-frame/package.json" }, { - "path": "node_modules/mocha/node_modules/strip-ansi/package.json" + "path": "node_modules/@babel/highlight/package.json" }, { - "path": "node_modules/mocha/node_modules/has-flag/package.json" + "path": "node_modules/@babel/parser/package.json" }, { - "path": "node_modules/mocha/node_modules/glob/package.json" + "path": "node_modules/functional-red-black-tree/package.json" }, { - "path": "node_modules/mocha/node_modules/ansi-styles/package.json" + "path": "node_modules/snakecase-keys/package.json" }, { - "path": "node_modules/mocha/node_modules/which/package.json" + "path": "node_modules/path-exists/package.json" }, { - "path": "node_modules/mocha/node_modules/supports-color/package.json" + "path": "node_modules/callsites/package.json" }, { - "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/bluebird/package.json" }, { - "path": "node_modules/mocha/node_modules/find-up/package.json" + "path": "node_modules/p-limit/package.json" }, { - "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" + "path": "node_modules/object-inspect/package.json" }, { - "path": "node_modules/mocha/node_modules/path-exists/package.json" + "path": "node_modules/node-fetch/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs/package.json" + "path": "node_modules/is/package.json" }, { - "path": "node_modules/mocha/node_modules/color-convert/package.json" + "path": "node_modules/@opencensus/propagation-stackdriver/package.json" }, { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + "path": "node_modules/@opencensus/core/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + "path": "node_modules/object-is/package.json" }, { - "path": "node_modules/mime-db/package.json" + "path": "node_modules/event-target-shim/package.json" }, { - "path": "node_modules/loud-rejection/package.json" + "path": "node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/event-emitter/package.json" + "path": "node_modules/shimmer/package.json" }, { - "path": "node_modules/@protobufjs/codegen/package.json" + "path": "node_modules/to-readable-stream/package.json" }, { - "path": "node_modules/@protobufjs/base64/package.json" + "path": "node_modules/v8-to-istanbul/package.json" }, { - "path": "node_modules/@protobufjs/utf8/package.json" + "path": "node_modules/import-fresh/package.json" }, { - "path": "node_modules/@protobufjs/pool/package.json" + "path": "node_modules/acorn-es7-plugin/package.json" }, { - "path": "node_modules/@protobufjs/float/package.json" + "path": "node_modules/date-and-time/package.json" }, { - "path": "node_modules/@protobufjs/fetch/package.json" + "path": "node_modules/es-abstract/package.json" }, { - "path": "node_modules/@protobufjs/path/package.json" + "path": "node_modules/es6-set/package.json" }, { - "path": "node_modules/@protobufjs/aspromise/package.json" + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" }, { - "path": "node_modules/@protobufjs/inquire/package.json" + "path": "node_modules/empower/package.json" }, { - "path": "node_modules/@protobufjs/eventemitter/package.json" + "path": "node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/node-forge/package.json" + "path": "node_modules/picomatch/package.json" }, { - "path": "node_modules/lodash.has/package.json" + "path": "node_modules/c8/package.json" }, { - "path": "node_modules/source-map-support/package.json" + "path": "node_modules/teeny-request/package.json" }, { - "path": "node_modules/source-map-support/node_modules/source-map/package.json" + "path": "node_modules/teeny-request/node_modules/agent-base/package.json" }, { - "path": "node_modules/has-symbols/package.json" + "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/just-extend/package.json" + "path": "node_modules/teeny-request/node_modules/debug/package.json" }, { - "path": "node_modules/stubs/package.json" + "path": "node_modules/merge-stream/package.json" }, { - "path": "node_modules/espurify/package.json" + "path": "node_modules/power-assert-formatter/package.json" }, { - "path": "node_modules/lodash.at/package.json" + "path": "node_modules/natural-compare/package.json" }, { - "path": "node_modules/ansi-styles/package.json" + "path": "node_modules/@bcoe/v8-coverage/package.json" }, { "path": "node_modules/merge-estraverse-visitors/package.json" }, { - "path": "node_modules/ansi-colors/package.json" + "path": "node_modules/widest-line/package.json" }, { - "path": "node_modules/date-and-time/package.json" + "path": "node_modules/widest-line/node_modules/string-width/package.json" }, { - "path": "node_modules/p-try/package.json" + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/is-object/package.json" + "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/escope/package.json" + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/json-parse-better-errors/package.json" + "path": "node_modules/espower/package.json" }, { - "path": "node_modules/readable-stream/package.json" + "path": "node_modules/espower/node_modules/source-map/package.json" }, { - "path": "node_modules/abort-controller/package.json" + "path": "node_modules/prepend-http/package.json" }, { - "path": "node_modules/which/package.json" + "path": "node_modules/eslint-plugin-prettier/package.json" }, { - "path": "node_modules/astral-regex/package.json" + "path": "node_modules/diff-match-patch/package.json" }, { - "path": "node_modules/escodegen/package.json" + "path": "node_modules/cacheable-request/package.json" }, { - "path": "node_modules/escodegen/node_modules/esprima/package.json" + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/escodegen/node_modules/source-map/package.json" + "path": "node_modules/commander/package.json" }, { - "path": "node_modules/minimist/package.json" + "path": "node_modules/setprototypeof/package.json" }, { - "path": "node_modules/clone-response/package.json" + "path": "node_modules/lodash.has/package.json" }, { - "path": "node_modules/ecdsa-sig-formatter/package.json" + "path": "node_modules/is-regexp/package.json" }, { - "path": "node_modules/requizzle/package.json" + "path": "node_modules/long/package.json" }, { - "path": "node_modules/base64-js/package.json" + "path": "node_modules/array-find/package.json" }, { - "path": "node_modules/async-each/package.json" + "path": "node_modules/cli-cursor/package.json" }, { - "path": "node_modules/pify/package.json" + "path": "node_modules/shebang-command/package.json" }, { - "path": "node_modules/@opencensus/propagation-stackdriver/package.json" + "path": "node_modules/slice-ansi/package.json" }, { - "path": "node_modules/@opencensus/core/package.json" + "path": "node_modules/slice-ansi/node_modules/color-name/package.json" }, { - "path": "node_modules/object-keys/package.json" + "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/trim-newlines/package.json" + "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/lodash.snakecase/package.json" + "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" }, { - "path": "node_modules/deep-is/package.json" + "path": "node_modules/eslint/package.json" }, { - "path": "node_modules/fast-levenshtein/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" }, { - "path": "node_modules/typescript/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" }, { - "path": "node_modules/shebang-regex/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" }, { - "path": "node_modules/eslint-plugin-es/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" }, { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" }, { - "path": "node_modules/semver/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" }, { - "path": "node_modules/unique-string/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" }, { - "path": "node_modules/decamelize/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" }, { - "path": "node_modules/acorn/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" }, { - "path": "node_modules/wide-align/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" }, { - "path": "node_modules/wide-align/node_modules/string-width/package.json" + "path": "node_modules/eslint/node_modules/which/package.json" }, { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + "path": "node_modules/eslint/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + "path": "node_modules/eslint/node_modules/path-key/package.json" }, { - "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/got/package.json" + "path": "node_modules/eslint/node_modules/shebang-command/package.json" }, { - "path": "node_modules/got/node_modules/get-stream/package.json" + "path": "node_modules/eslint/node_modules/debug/package.json" }, { - "path": "node_modules/got/node_modules/@sindresorhus/is/package.json" + "path": "node_modules/eslint/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/sprintf-js/package.json" + "path": "node_modules/is-arrayish/package.json" }, { - "path": "node_modules/@google-cloud/bigquery/package.json" + "path": "node_modules/concat-map/package.json" }, { - "path": "node_modules/@google-cloud/bigquery/node_modules/duplexify/package.json" + "path": "node_modules/power-assert-renderer-assertion/package.json" }, { - "path": "node_modules/@google-cloud/bigquery/node_modules/readable-stream/package.json" + "path": "node_modules/signal-exit/package.json" }, { - "path": "node_modules/@google-cloud/storage/package.json" + "path": "node_modules/es6-weak-map/package.json" }, { - "path": "node_modules/@google-cloud/storage/node_modules/readable-stream/package.json" + "path": "node_modules/eventemitter3/package.json" }, { - "path": "node_modules/@google-cloud/pubsub/package.json" + "path": "node_modules/normalize-url/package.json" }, { - "path": "node_modules/@google-cloud/projectify/package.json" + "path": "node_modules/tslib/package.json" }, { - "path": "node_modules/@google-cloud/common/package.json" + "path": "node_modules/jsonexport/package.json" }, { - "path": "node_modules/@google-cloud/paginator/package.json" + "path": "node_modules/power-assert-context-formatter/package.json" }, { - "path": "node_modules/@google-cloud/promisify/package.json" + "path": "node_modules/furi/package.json" }, { - "path": "node_modules/@google-cloud/precise-date/package.json" + "path": "node_modules/normalize-path/package.json" }, { - "path": "node_modules/isarray/package.json" + "path": "node_modules/source-map/package.json" }, { - "path": "node_modules/merge-stream/package.json" + "path": "node_modules/chokidar/package.json" }, { - "path": "node_modules/string_decoder/package.json" + "path": "node_modules/table/package.json" }, { - "path": "node_modules/strip-eof/package.json" + "path": "node_modules/table/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/p-limit/package.json" + "path": "node_modules/table/node_modules/string-width/package.json" }, { - "path": "node_modules/url-parse-lax/package.json" + "path": "node_modules/table/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/gts/package.json" + "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/gts/node_modules/chalk/package.json" + "path": "node_modules/table/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/commander/package.json" + "path": "node_modules/safe-buffer/package.json" }, { - "path": "node_modules/mimic-fn/package.json" + "path": "node_modules/figures/package.json" }, { - "path": "node_modules/shimmer/package.json" + "path": "node_modules/markdown-it/package.json" }, { - "path": "node_modules/https-proxy-agent/package.json" + "path": "node_modules/is-ci/package.json" }, { - "path": "node_modules/ini/package.json" + "path": "node_modules/strip-final-newline/package.json" }, { - "path": "node_modules/js2xmlparser/package.json" + "path": "node_modules/ncp/package.json" }, { - "path": "node_modules/spdx-exceptions/package.json" + "path": "node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/external-editor/package.json" + "path": "node_modules/core-util-is/package.json" }, { - "path": "node_modules/power-assert-formatter/package.json" + "path": "node_modules/fast-diff/package.json" }, { - "path": "node_modules/eslint-utils/package.json" + "path": "node_modules/gaxios/package.json" }, { - "path": "node_modules/text-table/package.json" + "path": "node_modules/semver-diff/package.json" }, { - "path": "node_modules/domutils/package.json" + "path": "node_modules/semver-diff/node_modules/semver/package.json" }, { - "path": "node_modules/supports-color/package.json" + "path": "node_modules/unique-string/package.json" }, { - "path": "node_modules/strip-indent/package.json" + "path": "node_modules/end-of-stream/package.json" }, { - "path": "node_modules/fs.realpath/package.json" + "path": "node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/parse5/package.json" + "path": "node_modules/proxyquire/package.json" }, { - "path": "node_modules/decamelize-keys/package.json" + "path": "node_modules/p-queue/package.json" }, { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + "path": "node_modules/safer-buffer/package.json" }, { - "path": "node_modules/empower-core/package.json" + "path": "node_modules/node-environment-flags/package.json" }, { - "path": "node_modules/acorn-es7-plugin/package.json" + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" }, { - "path": "node_modules/p-timeout/package.json" + "path": "node_modules/p-cancelable/package.json" }, { - "path": "node_modules/espree/package.json" + "path": "node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" }, { - "path": "node_modules/responselike/package.json" + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" }, { - "path": "node_modules/propagate/package.json" + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" }, { - "path": "node_modules/next-tick/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" }, { - "path": "node_modules/esrecurse/package.json" + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" }, { - "path": "node_modules/bignumber.js/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" }, { - "path": "node_modules/source-map/package.json" + "path": "node_modules/test-exclude/package.json" }, { - "path": "node_modules/find-up/package.json" + "path": "node_modules/debug/package.json" }, { - "path": "node_modules/traverse/package.json" + "path": "node_modules/levn/package.json" }, { - "path": "node_modules/es-to-primitive/package.json" + "path": "node_modules/retry-request/package.json" }, { - "path": "node_modules/rc/package.json" + "path": "node_modules/retry-request/node_modules/debug/package.json" }, { - "path": "node_modules/rc/node_modules/minimist/package.json" + "path": "node_modules/stream-shift/package.json" }, { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + "path": "node_modules/escodegen/package.json" }, { - "path": "node_modules/safe-buffer/package.json" + "path": "node_modules/escodegen/node_modules/esprima/package.json" }, { - "path": "node_modules/uc.micro/package.json" + "path": "node_modules/escodegen/node_modules/source-map/package.json" }, { - "path": "node_modules/flat-cache/package.json" + "path": "node_modules/lodash/package.json" }, { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + "path": "node_modules/boxen/package.json" }, { - "path": "node_modules/once/package.json" + "path": "node_modules/boxen/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/gtoken/package.json" + "path": "node_modules/boxen/node_modules/string-width/package.json" }, { - "path": "node_modules/urlgrey/package.json" + "path": "node_modules/boxen/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/convert-source-map/package.json" + "path": "node_modules/boxen/node_modules/type-fest/package.json" }, { - "path": "node_modules/is-date-object/package.json" + "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/tslint-config-prettier/package.json" + "path": "node_modules/boxen/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/escape-string-regexp/package.json" + "path": "node_modules/loud-rejection/package.json" }, { - "path": "node_modules/iconv-lite/package.json" + "path": "node_modules/stringifier/package.json" }, { - "path": "node_modules/is-glob/package.json" + "path": "node_modules/strip-ansi/package.json" }, { - "path": "node_modules/furi/package.json" + "path": "node_modules/resolve/package.json" + }, + { + "path": "node_modules/propagate/package.json" }, { - "path": "node_modules/nock/package.json" + "path": "__pycache__/synth.cpython-36.pyc" }, { - "path": "node_modules/nock/node_modules/debug/package.json" + "path": "protos/protos.d.ts" }, { - "path": "node_modules/tslib/package.json" + "path": "protos/protos.json" }, { - "path": "node_modules/markdown-it-anchor/package.json" + "path": "protos/protos.js" }, { - "path": "node_modules/browser-stdout/package.json" + "path": "protos/google/logging/type/http_request.proto" }, { - "path": "node_modules/path-type/package.json" + "path": "protos/google/logging/type/log_severity.proto" }, { - "path": "node_modules/human-signals/package.json" + "path": "protos/google/logging/v2/logging_metrics.proto" }, { - "path": "node_modules/snakeize/package.json" + "path": "protos/google/logging/v2/logging_config.proto" }, { - "path": "node_modules/pump/package.json" + "path": "protos/google/logging/v2/log_entry.proto" }, { - "path": "node_modules/process-nextick-args/package.json" + "path": "protos/google/logging/v2/logging.proto" }, { - "path": "node_modules/deep-extend/package.json" + "path": ".git/shallow" }, { - "path": "node_modules/power-assert-context-reducer-ast/package.json" + "path": ".git/config" }, { - "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" + "path": ".git/HEAD" }, { - "path": "node_modules/type-check/package.json" + "path": ".git/index" }, { - "path": "node_modules/teeny-request/package.json" + "path": ".git/packed-refs" }, { - "path": "node_modules/teeny-request/node_modules/debug/package.json" + "path": ".git/objects/pack/pack-c806209fd040ad89e4760dac7923f8a194d8239e.pack" }, { - "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" + "path": ".git/objects/pack/pack-c806209fd040ad89e4760dac7923f8a194d8239e.idx" }, { - "path": "node_modules/teeny-request/node_modules/agent-base/package.json" + "path": ".git/logs/HEAD" }, { - "path": "node_modules/jwa/package.json" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": "node_modules/walkdir/package.json" + "path": ".git/logs/refs/heads/autosynth" }, { - "path": "node_modules/hard-rejection/package.json" + "path": ".git/logs/refs/heads/master" }, { - "path": "node_modules/espower-source/package.json" + "path": ".git/refs/remotes/origin/HEAD" }, { - "path": "node_modules/espower-source/node_modules/acorn/package.json" + "path": ".git/refs/heads/autosynth" }, { - "path": "node_modules/mime-types/package.json" + "path": ".git/refs/heads/master" }, { - "path": "node_modules/cross-spawn/package.json" + "path": "test/metadata.ts" }, { - "path": "node_modules/@sindresorhus/is/package.json" + "path": "test/sink.ts" }, { - "path": "node_modules/wrap-ansi/package.json" + "path": "test/gapic-v2.js" }, { - "path": "node_modules/async-listener/package.json" + "path": "test/index.ts" }, { - "path": "node_modules/async-listener/node_modules/semver/package.json" + "path": "test/.eslintrc.yml" }, { - "path": "node_modules/quick-lru/package.json" + "path": "test/log.ts" }, { - "path": "node_modules/path-exists/package.json" + "path": "test/common.ts" }, { - "path": "node_modules/jsdoc/package.json" + "path": "test/entry.ts" }, { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + "path": "test/mocha.opts" }, { - "path": "node_modules/cacheable-request/package.json" + "path": "test/middleware/test-context.ts" }, { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + "path": "test/middleware/express/test-make-http-request.ts" }, { - "path": "node_modules/escape-html/package.json" + "path": "test/middleware/express/test-make-middleware.ts" }, { - "path": "node_modules/power-assert-renderer-assertion/package.json" + "path": "src/http-request.ts" }, { - "path": "node_modules/minimist-options/package.json" + "path": "src/metadata.ts" }, { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" + "path": "src/sink.ts" }, { - "path": "node_modules/latest-version/package.json" + "path": "src/service_proto_list.json" }, { - "path": "node_modules/nise/package.json" + "path": "src/index.ts" }, { - "path": "node_modules/optionator/package.json" + "path": "src/log.ts" }, { - "path": "node_modules/slice-ansi/package.json" + "path": "src/common.ts" }, { - "path": "node_modules/slice-ansi/node_modules/color-name/package.json" + "path": "src/entry.ts" }, { - "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" + "path": "src/v2/config_service_v2_client.js" }, { - "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" + "path": "src/v2/metrics_service_v2_proto_list.json" }, { - "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" + "path": "src/v2/logging_service_v2_proto_list.json" }, { - "path": "node_modules/power-assert-renderer-comparison/package.json" + "path": "src/v2/logging_service_v2_client.js" }, { - "path": "node_modules/flatted/package.json" + "path": "src/v2/index.js" }, { - "path": "node_modules/inherits/package.json" + "path": "src/v2/config_service_v2_proto_list.json" }, { - "path": "node_modules/depd/package.json" + "path": "src/v2/metrics_service_v2_client.js" }, { - "path": "node_modules/es6-promisify/package.json" + "path": "src/v2/.eslintrc.yml" }, { - "path": "node_modules/long/package.json" + "path": "src/v2/config_service_v2_client_config.json" }, { - "path": "node_modules/regexpp/package.json" + "path": "src/v2/metrics_service_v2_client_config.json" }, { - "path": "node_modules/cli-width/package.json" + "path": "src/v2/logging_service_v2_client_config.json" }, { - "path": "node_modules/call-matcher/package.json" + "path": "src/v2/doc/google/protobuf/doc_field_mask.js" }, { - "path": "node_modules/fill-keys/package.json" + "path": "src/v2/doc/google/protobuf/doc_duration.js" }, { - "path": "node_modules/http2spy/package.json" + "path": "src/v2/doc/google/protobuf/doc_timestamp.js" }, { - "path": "node_modules/eslint/package.json" + "path": "src/v2/doc/google/protobuf/doc_empty.js" }, { - "path": "node_modules/eslint/node_modules/debug/package.json" + "path": "src/v2/doc/google/protobuf/doc_struct.js" }, { - "path": "node_modules/eslint/node_modules/ansi-regex/package.json" + "path": "src/v2/doc/google/protobuf/doc_any.js" }, { - "path": "node_modules/eslint/node_modules/path-key/package.json" + "path": "src/v2/doc/google/api/doc_label.js" }, { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" + "path": "src/v2/doc/google/api/doc_distribution.js" }, { - "path": "node_modules/eslint/node_modules/strip-ansi/package.json" + "path": "src/v2/doc/google/api/doc_monitored_resource.js" }, { - "path": "node_modules/eslint/node_modules/which/package.json" + "path": "src/v2/doc/google/api/doc_metric.js" }, { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + "path": "src/v2/doc/google/logging/type/doc_http_request.js" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + "path": "src/v2/doc/google/logging/v2/doc_logging_config.js" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + "path": "src/v2/doc/google/logging/v2/doc_logging.js" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + "path": "src/v2/doc/google/logging/v2/doc_log_entry.js" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + "path": "src/v2/doc/google/logging/v2/doc_logging_metrics.js" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + "path": "src/middleware/index.ts" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + "path": "src/middleware/context.ts" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + "path": "src/middleware/express/make-http-request.ts" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + "path": "src/middleware/express/make-middleware.ts" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "src/middleware/express/index.ts" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + "path": ".kokoro/.gitattributes" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + "path": ".kokoro/test.bat" }, { - "path": "node_modules/mdurl/package.json" + "path": ".kokoro/publish.sh" }, { - "path": "node_modules/typedarray/package.json" + "path": ".kokoro/system-test.sh" }, { - "path": "node_modules/v8-to-istanbul/package.json" + "path": ".kokoro/docs.sh" }, { - "path": "node_modules/espower-loader/package.json" + "path": ".kokoro/test.sh" }, { - "path": "node_modules/object.getownpropertydescriptors/package.json" + "path": ".kokoro/lint.sh" }, { - "path": "node_modules/array-find-index/package.json" + "path": ".kokoro/common.cfg" }, { - "path": "node_modules/yargs/package.json" + "path": ".kokoro/samples-test.sh" }, { - "path": "node_modules/ci-info/package.json" + "path": ".kokoro/trampoline.sh" }, { - "path": "node_modules/color-convert/package.json" + "path": ".kokoro/continuous/node8/test.cfg" }, { - "path": "node_modules/write-file-atomic/package.json" + "path": ".kokoro/continuous/node8/common.cfg" }, { - "path": "node_modules/eslint-visitor-keys/package.json" + "path": ".kokoro/continuous/node12/test.cfg" }, { - "path": "node_modules/agent-base/package.json" + "path": ".kokoro/continuous/node12/common.cfg" }, { - "path": "node_modules/flat/package.json" + "path": ".kokoro/continuous/node10/docs.cfg" }, { - "path": "node_modules/through2/package.json" + "path": ".kokoro/continuous/node10/system-test.cfg" }, { - "path": "node_modules/gaxios/package.json" + "path": ".kokoro/continuous/node10/test.cfg" }, { - "path": "node_modules/p-queue/package.json" + "path": ".kokoro/continuous/node10/samples-test.cfg" }, { - "path": "node_modules/encodeurl/package.json" + "path": ".kokoro/continuous/node10/lint.cfg" }, { - "path": "node_modules/json-stringify-safe/package.json" + "path": ".kokoro/continuous/node10/common.cfg" }, { - "path": "node_modules/js-tokens/package.json" + "path": ".kokoro/presubmit/windows/test.cfg" }, { - "path": "node_modules/strip-json-comments/package.json" + "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": "node_modules/eslint-config-prettier/package.json" + "path": ".kokoro/presubmit/node8/test.cfg" }, { - "path": "node_modules/uri-js/package.json" + "path": ".kokoro/presubmit/node8/common.cfg" }, { - "path": "node_modules/test-exclude/package.json" + "path": ".kokoro/presubmit/node12/test.cfg" }, { - "path": "node_modules/safer-buffer/package.json" + "path": ".kokoro/presubmit/node12/common.cfg" }, { - "path": "node_modules/prettier/package.json" + "path": ".kokoro/presubmit/node10/docs.cfg" }, { - "path": "node_modules/regexp.prototype.flags/package.json" + "path": ".kokoro/presubmit/node10/system-test.cfg" }, { - "path": "node_modules/yargs-parser/package.json" + "path": ".kokoro/presubmit/node10/test.cfg" }, { - "path": "node_modules/lodash.get/package.json" + "path": ".kokoro/presubmit/node10/samples-test.cfg" }, { - "path": "node_modules/@babel/code-frame/package.json" + "path": ".kokoro/presubmit/node10/lint.cfg" }, { - "path": "node_modules/@babel/highlight/package.json" + "path": ".kokoro/presubmit/node10/common.cfg" }, { - "path": "node_modules/@babel/parser/package.json" + "path": ".kokoro/release/publish.cfg" }, { - "path": "node_modules/configstore/package.json" + "path": ".kokoro/release/docs.cfg" }, { - "path": "node_modules/is-plain-obj/package.json" + "path": ".kokoro/release/docs.sh" }, { - "path": "node_modules/eastasianwidth/package.json" + "path": ".kokoro/release/common.cfg" }, { - "path": "node_modules/has-yarn/package.json" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": "node_modules/core-js/package.json" + "path": ".github/release-please.yml" }, { - "path": "samples/logs.js" + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { - "path": "samples/fluent.js" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" }, { - "path": "samples/http-request.js" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": "samples/README.md" + "path": "smoke-test/logging_service_v2_smoke_test.js" }, { - "path": "samples/package.json" + "path": "smoke-test/.eslintrc.yml" }, { "path": "samples/quickstart.js" }, { - "path": "samples/.eslintrc.yml" + "path": "samples/http-request.js" }, { "path": "samples/sinks.js" }, { - "path": "samples/test/http-request.test.js" + "path": "samples/.eslintrc.yml" }, { - "path": "samples/test/sinks.test.js" + "path": "samples/package.json" }, { - "path": "samples/test/logs.test.js" + "path": "samples/fluent.js" }, { - "path": "samples/test/quickstart.test.js" + "path": "samples/README.md" + }, + { + "path": "samples/logs.js" }, { "path": "samples/test/fluent.test.js" }, { - "path": "__pycache__/synth.cpython-36.pyc" + "path": "samples/test/http-request.test.js" }, { - "path": "smoke-test/logging_service_v2_smoke_test.js" + "path": "samples/test/logs.test.js" }, { - "path": "smoke-test/.eslintrc.yml" + "path": "samples/test/sinks.test.js" + }, + { + "path": "samples/test/quickstart.test.js" } ] } \ No newline at end of file From d8aa1ab364863a028380716446d9f1407d7a0334 Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 9 Jan 2020 14:06:33 -0500 Subject: [PATCH 0527/1029] fix(types): extend constructor options from gax (#676) --- handwritten/logging/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 3733cd158ab..3641bc37731 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -54,7 +54,7 @@ import {Bucket} from '@google-cloud/storage'; // types only import {Dataset, BigQuery} from '@google-cloud/bigquery'; // types only import {Topic} from '@google-cloud/pubsub'; // types only -export interface LoggingOptions extends gax.GoogleAuthOptions { +export interface LoggingOptions extends gax.GrpcClientOptions { autoRetry?: boolean; maxRetries?: number; apiEndpoint?: string; From 138e8a3c1840b54f1f7434c68ad3f33c49453af0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2020 11:26:29 -0800 Subject: [PATCH 0528/1029] chore: release 7.0.0 (#675) --- handwritten/logging/CHANGELOG.md | 18 ++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 4804dabbeb2..6536134d4a9 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,24 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [7.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v6.0.0...v7.0.0) (2020-01-09) + + +### ⚠ BREAKING CHANGES + +* if using GKE, "Kubernetes Container" type is now properly populated, and logs will be grouped accordingly. + +### Features + +* **samples:** increase logging client scope ([#670](https://www.github.com/googleapis/nodejs-logging/issues/670)) ([5f35601](https://www.github.com/googleapis/nodejs-logging/commit/5f356014d72a523fc7061caf7bd0143166af6c91)) + + +### Bug Fixes + +* populate k8s_container rather than container ([#674](https://www.github.com/googleapis/nodejs-logging/issues/674)) ([fa32048](https://www.github.com/googleapis/nodejs-logging/commit/fa3204877cf6f6b943950994d49c0f7d7def5096)) +* **docs:** point folks towards the appropriate client instantiation ([091d7dd](https://www.github.com/googleapis/nodejs-logging/commit/091d7dd28d5f50cb0cf274bb370b36cdf612d42a)) +* **types:** extend constructor options from gax ([#676](https://www.github.com/googleapis/nodejs-logging/issues/676)) ([5156538](https://www.github.com/googleapis/nodejs-logging/commit/51565388f25ef16d7ab9c20c1d96e2a4adb78149)) + ## [6.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v5.5.5...v6.0.0) (2019-12-06) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b611230f8b6..b89cf96221b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "6.0.0", + "version": "7.0.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 2997a27c09526e5a70dae4c21962c59f9ec6866f Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Fri, 10 Jan 2020 16:58:52 -0800 Subject: [PATCH 0529/1029] chore: reenable obsolete file tracking (#677) --- handwritten/logging/synth.py | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 87389cbee19..70a8355959d 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -21,6 +21,7 @@ import os logging.basicConfig(level=logging.DEBUG) +s.metadata.set_track_obsolete_files(True) gapic = gcp.GAPICGenerator() # tasks has two product names, and a poorly named artman yaml From 4140d8892e5c27330262de35413cb4866c1a8a0b Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 21 Jan 2020 15:40:36 -0800 Subject: [PATCH 0530/1029] build: update windows configuration to match new vm --- handwritten/logging/.kokoro/test.bat | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/.kokoro/test.bat b/handwritten/logging/.kokoro/test.bat index fddff757050..ae59e59be3e 100644 --- a/handwritten/logging/.kokoro/test.bat +++ b/handwritten/logging/.kokoro/test.bat @@ -17,14 +17,12 @@ cd /d %~dp0 cd .. -@rem The image we're currently running has a broken version of Node.js enabled -@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional -@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to -@rem install npm for v10.15.3. -call nvm use v8.9.1 || goto :error -call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error -call nvm use v10.15.3 || goto :error -call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error +@rem npm path is not currently set in our image, we should fix this next time +@rem we upgrade Node.js in the image: +SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm + +call nvm use v12.14.1 +call which node call npm install || goto :error call npm run test || goto :error From e11f6d26c7653505addca3a766d11ac86cd85b40 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 Jan 2020 16:25:36 -0800 Subject: [PATCH 0531/1029] chore: clear synth.metadata --- handwritten/logging/synth.metadata | 3158 ---------------------------- 1 file changed, 3158 deletions(-) delete mode 100644 handwritten/logging/synth.metadata diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata deleted file mode 100644 index dbecfbfda59..00000000000 --- a/handwritten/logging/synth.metadata +++ /dev/null @@ -1,3158 +0,0 @@ -{ - "updateTime": "2020-01-07T12:21:44.240814Z", - "sources": [ - { - "generator": { - "name": "artman", - "version": "0.43.0", - "dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cb79155f596e0396dd900da93872be7066f6340d", - "internalRef": "288441307" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "logging", - "apiVersion": "v2", - "language": "nodejs", - "generator": "gapic", - "config": "google/logging/artman_logging.yaml" - } - } - ], - "newFiles": [ - { - "path": "codecov.yaml" - }, - { - "path": "tslint.json" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": "renovate.json" - }, - { - "path": ".prettierignore" - }, - { - "path": ".nycrc" - }, - { - "path": "synth.py" - }, - { - "path": ".eslintignore" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": "linkinator.config.json" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": ".jsdoc.js" - }, - { - "path": "synth.metadata" - }, - { - "path": "package-lock.json" - }, - { - "path": "LICENSE" - }, - { - "path": ".readme-partials.yml" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": ".prettierrc" - }, - { - "path": "package.json" - }, - { - "path": ".gitignore" - }, - { - "path": "README.md" - }, - { - "path": "tsconfig.json" - }, - { - "path": "build/system-test/logging.js" - }, - { - "path": "build/system-test/logging.d.ts" - }, - { - "path": "build/system-test/install.d.ts" - }, - { - "path": "build/system-test/install.js.map" - }, - { - "path": "build/system-test/install.js" - }, - { - "path": "build/system-test/logging.js.map" - }, - { - "path": "build/protos/protos.d.ts" - }, - { - "path": "build/protos/protos.json" - }, - { - "path": "build/protos/protos.js" - }, - { - "path": "build/protos/google/logging/type/http_request.proto" - }, - { - "path": "build/protos/google/logging/type/log_severity.proto" - }, - { - "path": "build/protos/google/logging/v2/logging_metrics.proto" - }, - { - "path": "build/protos/google/logging/v2/logging_config.proto" - }, - { - "path": "build/protos/google/logging/v2/log_entry.proto" - }, - { - "path": "build/protos/google/logging/v2/logging.proto" - }, - { - "path": "build/test/common.d.ts" - }, - { - "path": "build/test/log.js.map" - }, - { - "path": "build/test/sink.js.map" - }, - { - "path": "build/test/log.d.ts" - }, - { - "path": "build/test/index.js.map" - }, - { - "path": "build/test/index.js" - }, - { - "path": "build/test/gapic-v2.js" - }, - { - "path": "build/test/common.js" - }, - { - "path": "build/test/entry.js" - }, - { - "path": "build/test/entry.d.ts" - }, - { - "path": "build/test/metadata.d.ts" - }, - { - "path": "build/test/index.d.ts" - }, - { - "path": "build/test/common.js.map" - }, - { - "path": "build/test/metadata.js" - }, - { - "path": "build/test/sink.d.ts" - }, - { - "path": "build/test/sink.js" - }, - { - "path": "build/test/entry.js.map" - }, - { - "path": "build/test/metadata.js.map" - }, - { - "path": "build/test/log.js" - }, - { - "path": "build/test/middleware/test-context.d.ts" - }, - { - "path": "build/test/middleware/test-context.js" - }, - { - "path": "build/test/middleware/test-context.js.map" - }, - { - "path": "build/test/middleware/express/test-make-http-request.d.ts" - }, - { - "path": "build/test/middleware/express/test-make-http-request.js.map" - }, - { - "path": "build/test/middleware/express/test-make-middleware.js" - }, - { - "path": "build/test/middleware/express/test-make-middleware.js.map" - }, - { - "path": "build/test/middleware/express/test-make-middleware.d.ts" - }, - { - "path": "build/test/middleware/express/test-make-http-request.js" - }, - { - "path": "build/src/common.d.ts" - }, - { - "path": "build/src/log.js.map" - }, - { - "path": "build/src/sink.js.map" - }, - { - "path": "build/src/log.d.ts" - }, - { - "path": "build/src/index.js.map" - }, - { - "path": "build/src/http-request.js" - }, - { - "path": "build/src/index.js" - }, - { - "path": "build/src/common.js" - }, - { - "path": "build/src/entry.js" - }, - { - "path": "build/src/entry.d.ts" - }, - { - "path": "build/src/http-request.js.map" - }, - { - "path": "build/src/metadata.d.ts" - }, - { - "path": "build/src/index.d.ts" - }, - { - "path": "build/src/common.js.map" - }, - { - "path": "build/src/metadata.js" - }, - { - "path": "build/src/sink.d.ts" - }, - { - "path": "build/src/http-request.d.ts" - }, - { - "path": "build/src/sink.js" - }, - { - "path": "build/src/entry.js.map" - }, - { - "path": "build/src/metadata.js.map" - }, - { - "path": "build/src/log.js" - }, - { - "path": "build/src/v2/config_service_v2_client.js" - }, - { - "path": "build/src/v2/metrics_service_v2_proto_list.json" - }, - { - "path": "build/src/v2/logging_service_v2_proto_list.json" - }, - { - "path": "build/src/v2/logging_service_v2_client.js" - }, - { - "path": "build/src/v2/index.js" - }, - { - "path": "build/src/v2/config_service_v2_proto_list.json" - }, - { - "path": "build/src/v2/metrics_service_v2_client.js" - }, - { - "path": "build/src/v2/.eslintrc.yml" - }, - { - "path": "build/src/v2/config_service_v2_client_config.json" - }, - { - "path": "build/src/v2/metrics_service_v2_client_config.json" - }, - { - "path": "build/src/v2/logging_service_v2_client_config.json" - }, - { - "path": "build/src/v2/doc/google/protobuf/doc_field_mask.js" - }, - { - "path": "build/src/v2/doc/google/protobuf/doc_duration.js" - }, - { - "path": "build/src/v2/doc/google/protobuf/doc_timestamp.js" - }, - { - "path": "build/src/v2/doc/google/protobuf/doc_empty.js" - }, - { - "path": "build/src/v2/doc/google/protobuf/doc_struct.js" - }, - { - "path": "build/src/v2/doc/google/protobuf/doc_any.js" - }, - { - "path": "build/src/v2/doc/google/api/doc_label.js" - }, - { - "path": "build/src/v2/doc/google/api/doc_distribution.js" - }, - { - "path": "build/src/v2/doc/google/api/doc_monitored_resource.js" - }, - { - "path": "build/src/v2/doc/google/api/doc_metric.js" - }, - { - "path": "build/src/v2/doc/google/logging/type/doc_http_request.js" - }, - { - "path": "build/src/v2/doc/google/logging/v2/doc_logging_config.js" - }, - { - "path": "build/src/v2/doc/google/logging/v2/doc_logging.js" - }, - { - "path": "build/src/v2/doc/google/logging/v2/doc_log_entry.js" - }, - { - "path": "build/src/v2/doc/google/logging/v2/doc_logging_metrics.js" - }, - { - "path": "build/src/middleware/context.js.map" - }, - { - "path": "build/src/middleware/context.d.ts" - }, - { - "path": "build/src/middleware/index.js.map" - }, - { - "path": "build/src/middleware/index.js" - }, - { - "path": "build/src/middleware/context.js" - }, - { - "path": "build/src/middleware/index.d.ts" - }, - { - "path": "build/src/middleware/express/index.js.map" - }, - { - "path": "build/src/middleware/express/index.js" - }, - { - "path": "build/src/middleware/express/make-http-request.js.map" - }, - { - "path": "build/src/middleware/express/make-middleware.js.map" - }, - { - "path": "build/src/middleware/express/make-middleware.d.ts" - }, - { - "path": "build/src/middleware/express/make-http-request.d.ts" - }, - { - "path": "build/src/middleware/express/index.d.ts" - }, - { - "path": "build/src/middleware/express/make-middleware.js" - }, - { - "path": "build/src/middleware/express/make-http-request.js" - }, - { - "path": "system-test/logging.ts" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "system-test/fixtures/sample/package.json" - }, - { - "path": "system-test/fixtures/sample/tsconfig.json" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": "node_modules/eslint-visitor-keys/package.json" - }, - { - "path": "node_modules/optionator/package.json" - }, - { - "path": "node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/defer-to-connect/package.json" - }, - { - "path": "node_modules/yargs/package.json" - }, - { - "path": "node_modules/dom-serializer/package.json" - }, - { - "path": "node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/to-space-case/package.json" - }, - { - "path": "node_modules/source-map-support/package.json" - }, - { - "path": "node_modules/source-map-support/node_modules/source-map/package.json" - }, - { - "path": "node_modules/normalize-package-data/package.json" - }, - { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" - }, - { - "path": "node_modules/mdurl/package.json" - }, - { - "path": "node_modules/uc.micro/package.json" - }, - { - "path": "node_modules/continuation-local-storage/package.json" - }, - { - "path": "node_modules/through2/package.json" - }, - { - "path": "node_modules/make-dir/package.json" - }, - { - "path": "node_modules/path-type/package.json" - }, - { - "path": "node_modules/package-json/package.json" - }, - { - "path": "node_modules/snakeize/package.json" - }, - { - "path": "node_modules/redent/package.json" - }, - { - "path": "node_modules/which-module/package.json" - }, - { - "path": "node_modules/es6-symbol/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/keyv/package.json" - }, - { - "path": "node_modules/hard-rejection/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/index.js" - }, - { - "path": "node_modules/typedarray-to-buffer/LICENSE" - }, - { - "path": "node_modules/typedarray-to-buffer/.travis.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/README.md" - }, - { - "path": "node_modules/typedarray-to-buffer/test/basic.js" - }, - { - "path": "node_modules/registry-url/package.json" - }, - { - "path": "node_modules/wrappy/package.json" - }, - { - "path": "node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/@google-cloud/bigquery/package.json" - }, - { - "path": "node_modules/@google-cloud/bigquery/node_modules/duplexify/package.json" - }, - { - "path": "node_modules/@google-cloud/bigquery/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/@google-cloud/promisify/package.json" - }, - { - "path": "node_modules/@google-cloud/storage/package.json" - }, - { - "path": "node_modules/@google-cloud/storage/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/@google-cloud/paginator/package.json" - }, - { - "path": "node_modules/@google-cloud/projectify/package.json" - }, - { - "path": "node_modules/@google-cloud/pubsub/package.json" - }, - { - "path": "node_modules/@google-cloud/common/package.json" - }, - { - "path": "node_modules/@google-cloud/precise-date/package.json" - }, - { - "path": "node_modules/destroy/package.json" - }, - { - "path": "node_modules/power-assert-renderer-base/package.json" - }, - { - "path": "node_modules/hash-stream-validation/package.json" - }, - { - "path": "node_modules/hash-stream-validation/node_modules/through2/package.json" - }, - { - "path": "node_modules/domhandler/package.json" - }, - { - "path": "node_modules/tsutils/package.json" - }, - { - "path": "node_modules/tslint-config-prettier/package.json" - }, - { - "path": "node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/http-proxy-agent/package.json" - }, - { - "path": "node_modules/http-proxy-agent/node_modules/agent-base/package.json" - }, - { - "path": "node_modules/http-proxy-agent/node_modules/debug/package.json" - }, - { - "path": "node_modules/@protobufjs/float/package.json" - }, - { - "path": "node_modules/@protobufjs/base64/package.json" - }, - { - "path": "node_modules/@protobufjs/fetch/package.json" - }, - { - "path": "node_modules/@protobufjs/utf8/package.json" - }, - { - "path": "node_modules/@protobufjs/pool/package.json" - }, - { - "path": "node_modules/@protobufjs/aspromise/package.json" - }, - { - "path": "node_modules/@protobufjs/eventemitter/package.json" - }, - { - "path": "node_modules/@protobufjs/inquire/package.json" - }, - { - "path": "node_modules/@protobufjs/path/package.json" - }, - { - "path": "node_modules/@protobufjs/codegen/package.json" - }, - { - "path": "node_modules/mime-types/package.json" - }, - { - "path": "node_modules/fast-deep-equal/package.json" - }, - { - "path": "node_modules/y18n/package.json" - }, - { - "path": "node_modules/send/package.json" - }, - { - "path": "node_modules/send/node_modules/mime/package.json" - }, - { - "path": "node_modules/send/node_modules/ms/package.json" - }, - { - "path": "node_modules/send/node_modules/debug/package.json" - }, - { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" - }, - { - "path": "node_modules/is-promise/package.json" - }, - { - "path": "node_modules/is-url/package.json" - }, - { - "path": "node_modules/resolve-from/package.json" - }, - { - "path": "node_modules/estraverse/package.json" - }, - { - "path": "node_modules/rimraf/package.json" - }, - { - "path": "node_modules/supports-color/package.json" - }, - { - "path": "node_modules/external-editor/package.json" - }, - { - "path": "node_modules/ignore-walk/package.json" - }, - { - "path": "node_modules/os-tmpdir/package.json" - }, - { - "path": "node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/camelcase-keys/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/is-number/package.json" - }, - { - "path": "node_modules/log-symbols/package.json" - }, - { - "path": "node_modules/pump/package.json" - }, - { - "path": "node_modules/base64-js/package.json" - }, - { - "path": "node_modules/p-try/package.json" - }, - { - "path": "node_modules/flat/package.json" - }, - { - "path": "node_modules/json-schema-traverse/package.json" - }, - { - "path": "node_modules/color-name/package.json" - }, - { - "path": "node_modules/fill-range/package.json" - }, - { - "path": "node_modules/convert-source-map/package.json" - }, - { - "path": "node_modules/escape-html/package.json" - }, - { - "path": "node_modules/require-main-filename/package.json" - }, - { - "path": "node_modules/es-to-primitive/package.json" - }, - { - "path": "node_modules/decamelize-keys/package.json" - }, - { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/string-width/package.json" - }, - { - "path": "node_modules/type/package.json" - }, - { - "path": "node_modules/isexe/package.json" - }, - { - "path": "node_modules/underscore/package.json" - }, - { - "path": "node_modules/lines-and-columns/package.json" - }, - { - "path": "node_modules/event-emitter/package.json" - }, - { - "path": "node_modules/isarray/package.json" - }, - { - "path": "node_modules/deep-equal/package.json" - }, - { - "path": "node_modules/async-each/package.json" - }, - { - "path": "node_modules/@types/normalize-package-data/package.json" - }, - { - "path": "node_modules/@types/through2/package.json" - }, - { - "path": "node_modules/@types/color-name/package.json" - }, - { - "path": "node_modules/@types/minimist/package.json" - }, - { - "path": "node_modules/@types/tmp/package.json" - }, - { - "path": "node_modules/@types/extend/package.json" - }, - { - "path": "node_modules/@types/duplexify/package.json" - }, - { - "path": "node_modules/@types/mv/package.json" - }, - { - "path": "node_modules/@types/mocha/package.json" - }, - { - "path": "node_modules/@types/sinon/package.json" - }, - { - "path": "node_modules/@types/uuid/package.json" - }, - { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/@types/on-finished/package.json" - }, - { - "path": "node_modules/@types/node/package.json" - }, - { - "path": "node_modules/@types/pumpify/package.json" - }, - { - "path": "node_modules/@types/is-windows/package.json" - }, - { - "path": "node_modules/@types/is/package.json" - }, - { - "path": "node_modules/@types/long/package.json" - }, - { - "path": "node_modules/@types/fs-extra/package.json" - }, - { - "path": "node_modules/@types/ncp/package.json" - }, - { - "path": "node_modules/@types/proxyquire/package.json" - }, - { - "path": "node_modules/word-wrap/package.json" - }, - { - "path": "node_modules/fast-levenshtein/package.json" - }, - { - "path": "node_modules/minimist/package.json" - }, - { - "path": "node_modules/istanbul-lib-report/package.json" - }, - { - "path": "node_modules/json-buffer/package.json" - }, - { - "path": "node_modules/cli-width/package.json" - }, - { - "path": "node_modules/builtin-modules/package.json" - }, - { - "path": "node_modules/validate-npm-package-license/package.json" - }, - { - "path": "node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" - }, - { - "path": "node_modules/camelcase/package.json" - }, - { - "path": "node_modules/astral-regex/package.json" - }, - { - "path": "node_modules/d64/package.json" - }, - { - "path": "node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/serve-static/package.json" - }, - { - "path": "node_modules/ignore/package.json" - }, - { - "path": "node_modules/acorn/package.json" - }, - { - "path": "node_modules/arrify/package.json" - }, - { - "path": "node_modules/node-forge/package.json" - }, - { - "path": "node_modules/call-matcher/package.json" - }, - { - "path": "node_modules/got/package.json" - }, - { - "path": "node_modules/got/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/got/node_modules/@sindresorhus/is/package.json" - }, - { - "path": "node_modules/get-stream/package.json" - }, - { - "path": "node_modules/growl/package.json" - }, - { - "path": "node_modules/tmp/package.json" - }, - { - "path": "node_modules/range-parser/package.json" - }, - { - "path": "node_modules/lodash.get/package.json" - }, - { - "path": "node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/strip-bom/package.json" - }, - { - "path": "node_modules/path-is-inside/package.json" - }, - { - "path": "node_modules/array-filter/package.json" - }, - { - "path": "node_modules/esquery/package.json" - }, - { - "path": "node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/locate-path/package.json" - }, - { - "path": "node_modules/@istanbuljs/schema/package.json" - }, - { - "path": "node_modules/jsdoc/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/core-js/package.json" - }, - { - "path": "node_modules/prettier/package.json" - }, - { - "path": "node_modules/extend/package.json" - }, - { - "path": "node_modules/function-bind/package.json" - }, - { - "path": "node_modules/domutils/package.json" - }, - { - "path": "node_modules/prelude-ls/package.json" - }, - { - "path": "node_modules/currently-unhandled/package.json" - }, - { - "path": "node_modules/he/package.json" - }, - { - "path": "node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/acorn-jsx/package.json" - }, - { - "path": "node_modules/spdx-exceptions/package.json" - }, - { - "path": "node_modules/power-assert-context-traversal/package.json" - }, - { - "path": "node_modules/is-typedarray/package.json" - }, - { - "path": "node_modules/binary-extensions/package.json" - }, - { - "path": "node_modules/has-flag/package.json" - }, - { - "path": "node_modules/iconv-lite/package.json" - }, - { - "path": "node_modules/jwa/package.json" - }, - { - "path": "node_modules/fresh/package.json" - }, - { - "path": "node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/is-glob/package.json" - }, - { - "path": "node_modules/linkify-it/package.json" - }, - { - "path": "node_modules/parent-module/package.json" - }, - { - "path": "node_modules/compressible/package.json" - }, - { - "path": "node_modules/ee-first/package.json" - }, - { - "path": "node_modules/glob-parent/package.json" - }, - { - "path": "node_modules/json-stringify-safe/package.json" - }, - { - "path": "node_modules/is-object/package.json" - }, - { - "path": "node_modules/get-stdin/package.json" - }, - { - "path": "node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/lolex/package.json" - }, - { - "path": "node_modules/htmlparser2/package.json" - }, - { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/prettier-linter-helpers/package.json" - }, - { - "path": "node_modules/npm-run-path/package.json" - }, - { - "path": "node_modules/duplexify/package.json" - }, - { - "path": "node_modules/get-caller-file/package.json" - }, - { - "path": "node_modules/decamelize/package.json" - }, - { - "path": "node_modules/marked/package.json" - }, - { - "path": "node_modules/diff/package.json" - }, - { - "path": "node_modules/object.assign/package.json" - }, - { - "path": "node_modules/power-assert-util-string-width/package.json" - }, - { - "path": "node_modules/flat-cache/package.json" - }, - { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/once/package.json" - }, - { - "path": "node_modules/is-arguments/package.json" - }, - { - "path": "node_modules/buffer-from/package.json" - }, - { - "path": "node_modules/which/package.json" - }, - { - "path": "node_modules/is-symbol/package.json" - }, - { - "path": "node_modules/ajv/package.json" - }, - { - "path": "node_modules/clone-response/package.json" - }, - { - "path": "node_modules/lodash.snakecase/package.json" - }, - { - "path": "node_modules/power-assert-renderer-comparison/package.json" - }, - { - "path": "node_modules/doctrine/package.json" - }, - { - "path": "node_modules/is-callable/package.json" - }, - { - "path": "node_modules/parseurl/package.json" - }, - { - "path": "node_modules/type-detect/package.json" - }, - { - "path": "node_modules/espower-loader/package.json" - }, - { - "path": "node_modules/is-obj/package.json" - }, - { - "path": "node_modules/file-entry-cache/package.json" - }, - { - "path": "node_modules/d/package.json" - }, - { - "path": "node_modules/responselike/package.json" - }, - { - "path": "node_modules/ansi-colors/package.json" - }, - { - "path": "node_modules/has-yarn/package.json" - }, - { - "path": "node_modules/linkinator/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/redent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/arrify/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/term-size/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-npm/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/indent-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/chalk/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/meow/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/parse-json/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/widest-line/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/boxen/package.json" - }, - { - "path": "node_modules/mv/package.json" - }, - { - "path": "node_modules/mv/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/mv/node_modules/glob/package.json" - }, - { - "path": "node_modules/ext/package.json" - }, - { - "path": "node_modules/ext/node_modules/type/package.json" - }, - { - "path": "node_modules/jws/package.json" - }, - { - "path": "node_modules/p-finally/package.json" - }, - { - "path": "node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/is-stream-ended/package.json" - }, - { - "path": "node_modules/anymatch/package.json" - }, - { - "path": "node_modules/set-blocking/package.json" - }, - { - "path": "node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/regexp.prototype.flags/package.json" - }, - { - "path": "node_modules/sprintf-js/package.json" - }, - { - "path": "node_modules/boolbase/package.json" - }, - { - "path": "node_modules/string.prototype.trimright/package.json" - }, - { - "path": "node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/intelli-espower-loader/package.json" - }, - { - "path": "node_modules/espower-source/package.json" - }, - { - "path": "node_modules/espower-source/node_modules/acorn/package.json" - }, - { - "path": "node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/next-tick/package.json" - }, - { - "path": "node_modules/is-date-object/package.json" - }, - { - "path": "node_modules/concat-stream/package.json" - }, - { - "path": "node_modules/concat-stream/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/http-errors/package.json" - }, - { - "path": "node_modules/path-key/package.json" - }, - { - "path": "node_modules/ini/package.json" - }, - { - "path": "node_modules/json-bigint/package.json" - }, - { - "path": "node_modules/json-bigint/node_modules/bignumber.js/package.json" - }, - { - "path": "node_modules/object.getownpropertydescriptors/package.json" - }, - { - "path": "node_modules/rxjs/package.json" - }, - { - "path": "node_modules/power-assert-renderer-file/package.json" - }, - { - "path": "node_modules/@grpc/proto-loader/package.json" - }, - { - "path": "node_modules/@grpc/grpc-js/package.json" - }, - { - "path": "node_modules/argparse/package.json" - }, - { - "path": "node_modules/has/package.json" - }, - { - "path": "node_modules/type-fest/package.json" - }, - { - "path": "node_modules/protobufjs/package.json" - }, - { - "path": "node_modules/gtoken/package.json" - }, - { - "path": "node_modules/uri-js/package.json" - }, - { - "path": "node_modules/min-indent/package.json" - }, - { - "path": "node_modules/map-obj/package.json" - }, - { - "path": "node_modules/just-extend/package.json" - }, - { - "path": "node_modules/nise/package.json" - }, - { - "path": "node_modules/fast-text-encoding/package.json" - }, - { - "path": "node_modules/js-tokens/package.json" - }, - { - "path": "node_modules/ansi-escapes/package.json" - }, - { - "path": "node_modules/term-size/package.json" - }, - { - "path": "node_modules/term-size/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/term-size/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/term-size/node_modules/npm-run-path/package.json" - }, - { - "path": "node_modules/term-size/node_modules/which/package.json" - }, - { - "path": "node_modules/term-size/node_modules/path-key/package.json" - }, - { - "path": "node_modules/term-size/node_modules/execa/package.json" - }, - { - "path": "node_modules/term-size/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/term-size/node_modules/yallist/package.json" - }, - { - "path": "node_modules/term-size/node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/term-size/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/term-size/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/run-async/package.json" - }, - { - "path": "node_modules/find-up/package.json" - }, - { - "path": "node_modules/string-format-obj/package.json" - }, - { - "path": "node_modules/es6-promisify/package.json" - }, - { - "path": "node_modules/wide-align/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/nock/package.json" - }, - { - "path": "node_modules/nock/node_modules/debug/package.json" - }, - { - "path": "node_modules/is-npm/package.json" - }, - { - "path": "node_modules/cli-boxes/package.json" - }, - { - "path": "node_modules/array-find-index/package.json" - }, - { - "path": "node_modules/mime/package.json" - }, - { - "path": "node_modules/empower-assert/package.json" - }, - { - "path": "node_modules/execa/package.json" - }, - { - "path": "node_modules/human-signals/package.json" - }, - { - "path": "node_modules/is-extglob/package.json" - }, - { - "path": "node_modules/yargs-unparser/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/deep-extend/package.json" - }, - { - "path": "node_modules/google-gax/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/semver/package.json" - }, - { - "path": "node_modules/strip-eof/package.json" - }, - { - "path": "node_modules/eslint-scope/package.json" - }, - { - "path": "node_modules/ms/package.json" - }, - { - "path": "node_modules/parse5/package.json" - }, - { - "path": "node_modules/indent-string/package.json" - }, - { - "path": "node_modules/@sinonjs/text-encoding/package.json" - }, - { - "path": "node_modules/@sinonjs/commons/package.json" - }, - { - "path": "node_modules/@sinonjs/formatio/package.json" - }, - { - "path": "node_modules/@sinonjs/samsam/package.json" - }, - { - "path": "node_modules/inherits/package.json" - }, - { - "path": "node_modules/js2xmlparser/package.json" - }, - { - "path": "node_modules/css-select/package.json" - }, - { - "path": "node_modules/codecov/package.json" - }, - { - "path": "node_modules/codecov/node_modules/teeny-request/package.json" - }, - { - "path": "node_modules/codecov/node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/gts/package.json" - }, - { - "path": "node_modules/gts/node_modules/chalk/package.json" - }, - { - "path": "node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/html-escaper/package.json" - }, - { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" - }, - { - "path": "node_modules/mocha/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/package.json" - }, - { - "path": "node_modules/mocha/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-name/package.json" - }, - { - "path": "node_modules/mocha/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/mocha/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/mocha/node_modules/diff/package.json" - }, - { - "path": "node_modules/mocha/node_modules/which/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/find-up/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ms/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/package.json" - }, - { - "path": "node_modules/mocha/node_modules/glob/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/mocha/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/mocha/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/sinon/package.json" - }, - { - "path": "node_modules/uuid/package.json" - }, - { - "path": "node_modules/typescript/package.json" - }, - { - "path": "node_modules/entities/package.json" - }, - { - "path": "node_modules/universal-deep-strict-equal/package.json" - }, - { - "path": "node_modules/toidentifier/package.json" - }, - { - "path": "node_modules/urlgrey/package.json" - }, - { - "path": "node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/async-listener/package.json" - }, - { - "path": "node_modules/async-listener/node_modules/semver/package.json" - }, - { - "path": "node_modules/call-signature/package.json" - }, - { - "path": "node_modules/to-no-case/package.json" - }, - { - "path": "node_modules/ci-info/package.json" - }, - { - "path": "node_modules/chalk/package.json" - }, - { - "path": "node_modules/chalk/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/chalk/node_modules/color-name/package.json" - }, - { - "path": "node_modules/chalk/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/chalk/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/chalk/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/is-binary-path/package.json" - }, - { - "path": "node_modules/cliui/package.json" - }, - { - "path": "node_modules/nice-try/package.json" - }, - { - "path": "node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/import-lazy/package.json" - }, - { - "path": "node_modules/depd/package.json" - }, - { - "path": "node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/object-keys/package.json" - }, - { - "path": "node_modules/istanbul-reports/package.json" - }, - { - "path": "node_modules/google-auth-library/package.json" - }, - { - "path": "node_modules/p-defer/package.json" - }, - { - "path": "node_modules/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/fast-json-stable-stringify/package.json" - }, - { - "path": "node_modules/type-name/package.json" - }, - { - "path": "node_modules/traverse/package.json" - }, - { - "path": "node_modules/module-not-found-error/package.json" - }, - { - "path": "node_modules/cheerio/package.json" - }, - { - "path": "node_modules/power-assert-context-reducer-ast/package.json" - }, - { - "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" - }, - { - "path": "node_modules/minimatch/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" - }, - { - "path": "node_modules/stream-events/package.json" - }, - { - "path": "node_modules/inquirer/package.json" - }, - { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/indexof/package.json" - }, - { - "path": "node_modules/through/package.json" - }, - { - "path": "node_modules/restore-cursor/package.json" - }, - { - "path": "node_modules/esrecurse/package.json" - }, - { - "path": "node_modules/glob/package.json" - }, - { - "path": "node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/globals/package.json" - }, - { - "path": "node_modules/gcp-metadata/package.json" - }, - { - "path": "node_modules/js-yaml/package.json" - }, - { - "path": "node_modules/xtend/package.json" - }, - { - "path": "node_modules/multi-stage-sourcemap/package.json" - }, - { - "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" - }, - { - "path": "node_modules/css-what/package.json" - }, - { - "path": "node_modules/latest-version/package.json" - }, - { - "path": "node_modules/lodash.at/package.json" - }, - { - "path": "node_modules/is-stream/package.json" - }, - { - "path": "node_modules/foreground-child/package.json" - }, - { - "path": "node_modules/power-assert/package.json" - }, - { - "path": "node_modules/yallist/package.json" - }, - { - "path": "node_modules/spdx-license-ids/package.json" - }, - { - "path": "node_modules/etag/package.json" - }, - { - "path": "node_modules/duplexer3/package.json" - }, - { - "path": "node_modules/walkdir/package.json" - }, - { - "path": "node_modules/espurify/package.json" - }, - { - "path": "node_modules/path-parse/package.json" - }, - { - "path": "node_modules/es6-map/package.json" - }, - { - "path": "node_modules/punycode/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/package.json" - }, - { - "path": "node_modules/url-parse-lax/package.json" - }, - { - "path": "node_modules/on-finished/package.json" - }, - { - "path": "node_modules/inflight/package.json" - }, - { - "path": "node_modules/is-plain-obj/package.json" - }, - { - "path": "node_modules/encodeurl/package.json" - }, - { - "path": "node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/require-directory/package.json" - }, - { - "path": "node_modules/unpipe/package.json" - }, - { - "path": "node_modules/http2spy/package.json" - }, - { - "path": "node_modules/nth-check/package.json" - }, - { - "path": "node_modules/@sindresorhus/is/package.json" - }, - { - "path": "node_modules/spdx-expression-parse/package.json" - }, - { - "path": "node_modules/text-table/package.json" - }, - { - "path": "node_modules/color-convert/package.json" - }, - { - "path": "node_modules/markdown-it-anchor/package.json" - }, - { - "path": "node_modules/spdx-correct/package.json" - }, - { - "path": "node_modules/hosted-git-info/package.json" - }, - { - "path": "node_modules/esutils/package.json" - }, - { - "path": "node_modules/agent-base/package.json" - }, - { - "path": "node_modules/configstore/package.json" - }, - { - "path": "node_modules/stubs/package.json" - }, - { - "path": "node_modules/ansi-align/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/pumpify/package.json" - }, - { - "path": "node_modules/pumpify/node_modules/duplexify/package.json" - }, - { - "path": "node_modules/pumpify/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/to-snake-case/package.json" - }, - { - "path": "node_modules/is-windows/package.json" - }, - { - "path": "node_modules/esprima/package.json" - }, - { - "path": "node_modules/semver/package.json" - }, - { - "path": "node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/is-obj/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/configstore/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/unique-string/package.json" - }, - { - "path": "node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/big.js/package.json" - }, - { - "path": "node_modules/domelementtype/package.json" - }, - { - "path": "node_modules/server-destroy/package.json" - }, - { - "path": "node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/deep-is/package.json" - }, - { - "path": "node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/mute-stream/package.json" - }, - { - "path": "node_modules/registry-auth-token/package.json" - }, - { - "path": "node_modules/espower-location-detector/package.json" - }, - { - "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" - }, - { - "path": "node_modules/flatted/package.json" - }, - { - "path": "node_modules/mime-db/package.json" - }, - { - "path": "node_modules/has-symbols/package.json" - }, - { - "path": "node_modules/klaw/package.json" - }, - { - "path": "node_modules/emitter-listener/package.json" - }, - { - "path": "node_modules/meow/package.json" - }, - { - "path": "node_modules/meow/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/@szmarczak/http-timer/package.json" - }, - { - "path": "node_modules/load-json-file/package.json" - }, - { - "path": "node_modules/is-yarn-global/package.json" - }, - { - "path": "node_modules/path-to-regexp/package.json" - }, - { - "path": "node_modules/path-to-regexp/node_modules/isarray/package.json" - }, - { - "path": "node_modules/gcs-resumable-upload/package.json" - }, - { - "path": "node_modules/lodash.camelcase/package.json" - }, - { - "path": "node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/typedarray/package.json" - }, - { - "path": "node_modules/eventid/package.json" - }, - { - "path": "node_modules/progress/package.json" - }, - { - "path": "node_modules/eastasianwidth/package.json" - }, - { - "path": "node_modules/string.prototype.trimleft/package.json" - }, - { - "path": "node_modules/ecdsa-sig-formatter/package.json" - }, - { - "path": "node_modules/buffer-equal-constant-time/package.json" - }, - { - "path": "node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/http-cache-semantics/package.json" - }, - { - "path": "node_modules/type-check/package.json" - }, - { - "path": "node_modules/es5-ext/package.json" - }, - { - "path": "node_modules/readdirp/package.json" - }, - { - "path": "node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/bignumber.js/package.json" - }, - { - "path": "node_modules/define-properties/package.json" - }, - { - "path": "node_modules/es6-iterator/package.json" - }, - { - "path": "node_modules/taffydb/package.json" - }, - { - "path": "node_modules/regexpp/package.json" - }, - { - "path": "node_modules/statuses/package.json" - }, - { - "path": "node_modules/mimic-response/package.json" - }, - { - "path": "node_modules/escope/package.json" - }, - { - "path": "node_modules/hex2dec/package.json" - }, - { - "path": "node_modules/es6-promise/package.json" - }, - { - "path": "node_modules/argv/package.json" - }, - { - "path": "node_modules/p-timeout/package.json" - }, - { - "path": "node_modules/ent/package.json" - }, - { - "path": "node_modules/power-assert-renderer-diagram/package.json" - }, - { - "path": "node_modules/pify/package.json" - }, - { - "path": "node_modules/mimic-fn/package.json" - }, - { - "path": "node_modules/p-locate/package.json" - }, - { - "path": "node_modules/assert-rejects/package.json" - }, - { - "path": "node_modules/log-driver/package.json" - }, - { - "path": "node_modules/chardet/package.json" - }, - { - "path": "node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/browser-stdout/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" - }, - { - "path": "node_modules/v8-compile-cache/package.json" - }, - { - "path": "node_modules/rc/package.json" - }, - { - "path": "node_modules/rc/node_modules/minimist/package.json" - }, - { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/parse-json/package.json" - }, - { - "path": "node_modules/pseudomap/package.json" - }, - { - "path": "node_modules/tslint/package.json" - }, - { - "path": "node_modules/tslint/node_modules/semver/package.json" - }, - { - "path": "node_modules/abort-controller/package.json" - }, - { - "path": "node_modules/write/package.json" - }, - { - "path": "node_modules/braces/package.json" - }, - { - "path": "node_modules/xmlcreate/package.json" - }, - { - "path": "node_modules/finalhandler/package.json" - }, - { - "path": "node_modules/finalhandler/node_modules/ms/package.json" - }, - { - "path": "node_modules/finalhandler/node_modules/debug/package.json" - }, - { - "path": "node_modules/eslint-config-prettier/package.json" - }, - { - "path": "node_modules/google-p12-pem/package.json" - }, - { - "path": "node_modules/fill-keys/package.json" - }, - { - "path": "node_modules/espree/package.json" - }, - { - "path": "node_modules/requizzle/package.json" - }, - { - "path": "node_modules/imurmurhash/package.json" - }, - { - "path": "node_modules/catharsis/package.json" - }, - { - "path": "node_modules/decompress-response/package.json" - }, - { - "path": "node_modules/onetime/package.json" - }, - { - "path": "node_modules/empower-core/package.json" - }, - { - "path": "node_modules/error-ex/package.json" - }, - { - "path": "node_modules/is-regex/package.json" - }, - { - "path": "node_modules/escallmatch/package.json" - }, - { - "path": "node_modules/escallmatch/node_modules/esprima/package.json" - }, - { - "path": "node_modules/amdefine/package.json" - }, - { - "path": "node_modules/merge-descriptors/package.json" - }, - { - "path": "node_modules/@babel/code-frame/package.json" - }, - { - "path": "node_modules/@babel/highlight/package.json" - }, - { - "path": "node_modules/@babel/parser/package.json" - }, - { - "path": "node_modules/functional-red-black-tree/package.json" - }, - { - "path": "node_modules/snakecase-keys/package.json" - }, - { - "path": "node_modules/path-exists/package.json" - }, - { - "path": "node_modules/callsites/package.json" - }, - { - "path": "node_modules/bluebird/package.json" - }, - { - "path": "node_modules/p-limit/package.json" - }, - { - "path": "node_modules/object-inspect/package.json" - }, - { - "path": "node_modules/node-fetch/package.json" - }, - { - "path": "node_modules/is/package.json" - }, - { - "path": "node_modules/@opencensus/propagation-stackdriver/package.json" - }, - { - "path": "node_modules/@opencensus/core/package.json" - }, - { - "path": "node_modules/object-is/package.json" - }, - { - "path": "node_modules/event-target-shim/package.json" - }, - { - "path": "node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/shimmer/package.json" - }, - { - "path": "node_modules/to-readable-stream/package.json" - }, - { - "path": "node_modules/v8-to-istanbul/package.json" - }, - { - "path": "node_modules/import-fresh/package.json" - }, - { - "path": "node_modules/acorn-es7-plugin/package.json" - }, - { - "path": "node_modules/date-and-time/package.json" - }, - { - "path": "node_modules/es-abstract/package.json" - }, - { - "path": "node_modules/es6-set/package.json" - }, - { - "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" - }, - { - "path": "node_modules/empower/package.json" - }, - { - "path": "node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/picomatch/package.json" - }, - { - "path": "node_modules/c8/package.json" - }, - { - "path": "node_modules/teeny-request/package.json" - }, - { - "path": "node_modules/teeny-request/node_modules/agent-base/package.json" - }, - { - "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/teeny-request/node_modules/debug/package.json" - }, - { - "path": "node_modules/merge-stream/package.json" - }, - { - "path": "node_modules/power-assert-formatter/package.json" - }, - { - "path": "node_modules/natural-compare/package.json" - }, - { - "path": "node_modules/@bcoe/v8-coverage/package.json" - }, - { - "path": "node_modules/merge-estraverse-visitors/package.json" - }, - { - "path": "node_modules/widest-line/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/string-width/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/espower/package.json" - }, - { - "path": "node_modules/espower/node_modules/source-map/package.json" - }, - { - "path": "node_modules/prepend-http/package.json" - }, - { - "path": "node_modules/eslint-plugin-prettier/package.json" - }, - { - "path": "node_modules/diff-match-patch/package.json" - }, - { - "path": "node_modules/cacheable-request/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/commander/package.json" - }, - { - "path": "node_modules/setprototypeof/package.json" - }, - { - "path": "node_modules/lodash.has/package.json" - }, - { - "path": "node_modules/is-regexp/package.json" - }, - { - "path": "node_modules/long/package.json" - }, - { - "path": "node_modules/array-find/package.json" - }, - { - "path": "node_modules/cli-cursor/package.json" - }, - { - "path": "node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/slice-ansi/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/color-name/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/eslint/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" - }, - { - "path": "node_modules/eslint/node_modules/which/package.json" - }, - { - "path": "node_modules/eslint/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/path-key/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/eslint/node_modules/debug/package.json" - }, - { - "path": "node_modules/eslint/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/is-arrayish/package.json" - }, - { - "path": "node_modules/concat-map/package.json" - }, - { - "path": "node_modules/power-assert-renderer-assertion/package.json" - }, - { - "path": "node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/es6-weak-map/package.json" - }, - { - "path": "node_modules/eventemitter3/package.json" - }, - { - "path": "node_modules/normalize-url/package.json" - }, - { - "path": "node_modules/tslib/package.json" - }, - { - "path": "node_modules/jsonexport/package.json" - }, - { - "path": "node_modules/power-assert-context-formatter/package.json" - }, - { - "path": "node_modules/furi/package.json" - }, - { - "path": "node_modules/normalize-path/package.json" - }, - { - "path": "node_modules/source-map/package.json" - }, - { - "path": "node_modules/chokidar/package.json" - }, - { - "path": "node_modules/table/package.json" - }, - { - "path": "node_modules/table/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/table/node_modules/string-width/package.json" - }, - { - "path": "node_modules/table/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/table/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/figures/package.json" - }, - { - "path": "node_modules/markdown-it/package.json" - }, - { - "path": "node_modules/is-ci/package.json" - }, - { - "path": "node_modules/strip-final-newline/package.json" - }, - { - "path": "node_modules/ncp/package.json" - }, - { - "path": "node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/core-util-is/package.json" - }, - { - "path": "node_modules/fast-diff/package.json" - }, - { - "path": "node_modules/gaxios/package.json" - }, - { - "path": "node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/semver-diff/node_modules/semver/package.json" - }, - { - "path": "node_modules/unique-string/package.json" - }, - { - "path": "node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/proxyquire/package.json" - }, - { - "path": "node_modules/p-queue/package.json" - }, - { - "path": "node_modules/safer-buffer/package.json" - }, - { - "path": "node_modules/node-environment-flags/package.json" - }, - { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" - }, - { - "path": "node_modules/p-cancelable/package.json" - }, - { - "path": "node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/test-exclude/package.json" - }, - { - "path": "node_modules/debug/package.json" - }, - { - "path": "node_modules/levn/package.json" - }, - { - "path": "node_modules/retry-request/package.json" - }, - { - "path": "node_modules/retry-request/node_modules/debug/package.json" - }, - { - "path": "node_modules/stream-shift/package.json" - }, - { - "path": "node_modules/escodegen/package.json" - }, - { - "path": "node_modules/escodegen/node_modules/esprima/package.json" - }, - { - "path": "node_modules/escodegen/node_modules/source-map/package.json" - }, - { - "path": "node_modules/lodash/package.json" - }, - { - "path": "node_modules/boxen/package.json" - }, - { - "path": "node_modules/boxen/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/boxen/node_modules/string-width/package.json" - }, - { - "path": "node_modules/boxen/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/boxen/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/boxen/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/loud-rejection/package.json" - }, - { - "path": "node_modules/stringifier/package.json" - }, - { - "path": "node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/resolve/package.json" - }, - { - "path": "node_modules/propagate/package.json" - }, - { - "path": "__pycache__/synth.cpython-36.pyc" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.json" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/google/logging/type/http_request.proto" - }, - { - "path": "protos/google/logging/type/log_severity.proto" - }, - { - "path": "protos/google/logging/v2/logging_metrics.proto" - }, - { - "path": "protos/google/logging/v2/logging_config.proto" - }, - { - "path": "protos/google/logging/v2/log_entry.proto" - }, - { - "path": "protos/google/logging/v2/logging.proto" - }, - { - "path": ".git/shallow" - }, - { - "path": ".git/config" - }, - { - "path": ".git/HEAD" - }, - { - "path": ".git/index" - }, - { - "path": ".git/packed-refs" - }, - { - "path": ".git/objects/pack/pack-c806209fd040ad89e4760dac7923f8a194d8239e.pack" - }, - { - "path": ".git/objects/pack/pack-c806209fd040ad89e4760dac7923f8a194d8239e.idx" - }, - { - "path": ".git/logs/HEAD" - }, - { - "path": ".git/logs/refs/remotes/origin/HEAD" - }, - { - "path": ".git/logs/refs/heads/autosynth" - }, - { - "path": ".git/logs/refs/heads/master" - }, - { - "path": ".git/refs/remotes/origin/HEAD" - }, - { - "path": ".git/refs/heads/autosynth" - }, - { - "path": ".git/refs/heads/master" - }, - { - "path": "test/metadata.ts" - }, - { - "path": "test/sink.ts" - }, - { - "path": "test/gapic-v2.js" - }, - { - "path": "test/index.ts" - }, - { - "path": "test/.eslintrc.yml" - }, - { - "path": "test/log.ts" - }, - { - "path": "test/common.ts" - }, - { - "path": "test/entry.ts" - }, - { - "path": "test/mocha.opts" - }, - { - "path": "test/middleware/test-context.ts" - }, - { - "path": "test/middleware/express/test-make-http-request.ts" - }, - { - "path": "test/middleware/express/test-make-middleware.ts" - }, - { - "path": "src/http-request.ts" - }, - { - "path": "src/metadata.ts" - }, - { - "path": "src/sink.ts" - }, - { - "path": "src/service_proto_list.json" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/log.ts" - }, - { - "path": "src/common.ts" - }, - { - "path": "src/entry.ts" - }, - { - "path": "src/v2/config_service_v2_client.js" - }, - { - "path": "src/v2/metrics_service_v2_proto_list.json" - }, - { - "path": "src/v2/logging_service_v2_proto_list.json" - }, - { - "path": "src/v2/logging_service_v2_client.js" - }, - { - "path": "src/v2/index.js" - }, - { - "path": "src/v2/config_service_v2_proto_list.json" - }, - { - "path": "src/v2/metrics_service_v2_client.js" - }, - { - "path": "src/v2/.eslintrc.yml" - }, - { - "path": "src/v2/config_service_v2_client_config.json" - }, - { - "path": "src/v2/metrics_service_v2_client_config.json" - }, - { - "path": "src/v2/logging_service_v2_client_config.json" - }, - { - "path": "src/v2/doc/google/protobuf/doc_field_mask.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_duration.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_timestamp.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_empty.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_struct.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_any.js" - }, - { - "path": "src/v2/doc/google/api/doc_label.js" - }, - { - "path": "src/v2/doc/google/api/doc_distribution.js" - }, - { - "path": "src/v2/doc/google/api/doc_monitored_resource.js" - }, - { - "path": "src/v2/doc/google/api/doc_metric.js" - }, - { - "path": "src/v2/doc/google/logging/type/doc_http_request.js" - }, - { - "path": "src/v2/doc/google/logging/v2/doc_logging_config.js" - }, - { - "path": "src/v2/doc/google/logging/v2/doc_logging.js" - }, - { - "path": "src/v2/doc/google/logging/v2/doc_log_entry.js" - }, - { - "path": "src/v2/doc/google/logging/v2/doc_logging_metrics.js" - }, - { - "path": "src/middleware/index.ts" - }, - { - "path": "src/middleware/context.ts" - }, - { - "path": "src/middleware/express/make-http-request.ts" - }, - { - "path": "src/middleware/express/make-middleware.ts" - }, - { - "path": "src/middleware/express/index.ts" - }, - { - "path": ".kokoro/.gitattributes" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/common.cfg" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": "smoke-test/logging_service_v2_smoke_test.js" - }, - { - "path": "smoke-test/.eslintrc.yml" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/http-request.js" - }, - { - "path": "samples/sinks.js" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/fluent.js" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/logs.js" - }, - { - "path": "samples/test/fluent.test.js" - }, - { - "path": "samples/test/http-request.test.js" - }, - { - "path": "samples/test/logs.test.js" - }, - { - "path": "samples/test/sinks.test.js" - }, - { - "path": "samples/test/quickstart.test.js" - } - ] -} \ No newline at end of file From cdd8272829d213f5bda4ffbfff63f6702a2ae196 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 24 Jan 2020 15:54:46 +0100 Subject: [PATCH 0532/1029] fix(deps): update dependency type-fest to ^0.9.0 (#682) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b89cf96221b..b3c5284de8e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -64,7 +64,7 @@ "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", - "type-fest": "^0.8.0" + "type-fest": "^0.9.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", From 8c25f61a33e71d09886734fe8119c250ecb9dc89 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2020 15:10:38 -0800 Subject: [PATCH 0533/1029] chore: release 7.0.1 (#683) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 6536134d4a9..e0f8264a266 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [7.0.1](https://www.github.com/googleapis/nodejs-logging/compare/v7.0.0...v7.0.1) (2020-01-24) + + +### Bug Fixes + +* **deps:** update dependency type-fest to ^0.9.0 ([#682](https://www.github.com/googleapis/nodejs-logging/issues/682)) ([e39c401](https://www.github.com/googleapis/nodejs-logging/commit/e39c401513327292c0cb8fef0a2aa9bb4e90287d)) + ## [7.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v6.0.0...v7.0.0) (2020-01-09) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b3c5284de8e..041fe064ab4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "7.0.0", + "version": "7.0.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From bc9e62650344f885fe72835c8663f38db10f1b5c Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 28 Jan 2020 12:53:58 -0500 Subject: [PATCH 0534/1029] feat: support uniqueWriterIdentity in Sink.create (#686) --- handwritten/logging/src/index.ts | 5 +++++ handwritten/logging/test/index.ts | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 3641bc37731..a941d99e5b6 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -80,6 +80,7 @@ export interface CreateSinkRequest { includeChildren?: boolean; name?: string; outputVersionFormat?: google.logging.v2.LogSink.VersionFormat; + uniqueWriterIdentity?: string; gaxOptions?: gax.CallOptions; } @@ -295,6 +296,8 @@ class Logging { * https://cloud.google.com/nodejs/docs/reference/pubsub/latest/Topic Topic} * @property {string} [filter] An advanced logs filter. Only log entries * matching the filter are written. + * @property {string} [uniqueWriterIdentity] Determines the kind of IAM + * identity returned as `writerIdentity` in the new sink. See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create#query-parameters}. */ /** * @typedef {array} CreateSinkResponse @@ -382,8 +385,10 @@ class Logging { const reqOpts = { parent: 'projects/' + this.projectId, sink: extend({}, config, {name}), + uniqueWriterIdentity: config.uniqueWriterIdentity, }; delete reqOpts.sink.gaxOptions; + delete reqOpts.sink.uniqueWriterIdentity; await this.setProjectId(reqOpts); const [resp] = await this.configService.createSink( reqOpts, diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 48d82bb5c57..0ec64b6fbc4 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -349,6 +349,28 @@ describe('Logging', () => { await logging.createSink(SINK_NAME, config); }); + it('should accept uniqueWriterIdentity', async () => { + const config = { + destination: '...', + uniqueWriterIdentity: '...', + }; + + logging.configService.createSink = async ( + // tslint:disable-next-line no-any + reqOpts: any, + gaxOpts: {} + ) => { + assert.strictEqual( + reqOpts.uniqueWriterIdentity, + config.uniqueWriterIdentity + ); + assert.strictEqual(reqOpts.sink.uniqueWriterIdentity, undefined); + return [{}]; + }; + + await logging.createSink(SINK_NAME, config); + }); + it('should accept GAX options', async () => { const config = ({ a: 'b', From 3046d0b7d497b461db0e1edce4e82f835a1a405b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Jan 2020 14:25:29 -0800 Subject: [PATCH 0535/1029] chore: regenerated files Co-authored-by: Alexander Fenster --- .../src/v2/config_service_v2_client.js | 2 +- .../src/v2/doc/google/api/doc_distribution.js | 2 +- .../src/v2/doc/google/api/doc_label.js | 2 +- .../src/v2/doc/google/api/doc_metric.js | 2 +- .../doc/google/api/doc_monitored_resource.js | 2 +- .../google/logging/type/doc_http_request.js | 2 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 2 +- .../v2/doc/google/logging/v2/doc_logging.js | 2 +- .../google/logging/v2/doc_logging_config.js | 2 +- .../google/logging/v2/doc_logging_metrics.js | 2 +- .../src/v2/doc/google/protobuf/doc_any.js | 2 +- .../v2/doc/google/protobuf/doc_duration.js | 2 +- .../src/v2/doc/google/protobuf/doc_empty.js | 2 +- .../v2/doc/google/protobuf/doc_field_mask.js | 2 +- .../src/v2/doc/google/protobuf/doc_struct.js | 2 +- .../v2/doc/google/protobuf/doc_timestamp.js | 2 +- handwritten/logging/src/v2/index.js | 2 +- .../src/v2/logging_service_v2_client.js | 2 +- .../src/v2/metrics_service_v2_client.js | 2 +- handwritten/logging/synth.metadata | 467 ++++++++++++++++++ handwritten/logging/test/gapic-v2.js | 2 +- 21 files changed, 487 insertions(+), 20 deletions(-) create mode 100644 handwritten/logging/synth.metadata diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 088fcd910c6..934efbac1b2 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js index 0a95bf5aab2..a2b267280e1 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_label.js b/handwritten/logging/src/v2/doc/google/api/doc_label.js index 74d87098038..24d32531adc 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_label.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_label.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js index f55ae9bf4c7..455d1b756cb 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_metric.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index 8d5e132a417..be4e189fc16 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js index b8434663c3a..de897f53ab9 100644 --- a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js +++ b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index 702efa099eb..12115574657 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 08fd34e21cd..c9e1b1f9983 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index fc765f43201..96e3a455d55 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index 5134048e607..d14bbf8e129 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js index cdd2fc80e49..813682aa336 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js index 1275f8f4d13..bd4b4ee6067 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js index 0b446dd9ce4..1e3961d6609 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js index 011207b8626..59e745f36c2 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js index ae7e4ef1ff6..a143b9a6d2d 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js index c457acc0c7d..ad801cc9a10 100644 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/src/v2/index.js index 7e02e13988f..745d8f5f213 100644 --- a/handwritten/logging/src/v2/index.js +++ b/handwritten/logging/src/v2/index.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 460fb9acc36..7e161f23043 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index f79941732db..f8d7101d7a7 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata new file mode 100644 index 00000000000..fe84ea514ee --- /dev/null +++ b/handwritten/logging/synth.metadata @@ -0,0 +1,467 @@ +{ + "updateTime": "2020-01-28T12:25:20.168811Z", + "sources": [ + { + "generator": { + "name": "artman", + "version": "0.44.3", + "dockerImage": "googleapis/artman@sha256:62b8b29acaae54b06a4183aa772e65b106e92d4bc466eb4db07953ab78bdb90c" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", + "internalRef": "291821782" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.10.17" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "logging", + "apiVersion": "v2", + "language": "nodejs", + "generator": "gapic", + "config": "google/logging/artman_logging.yaml" + } + } + ], + "newFiles": [ + { + "path": ".eslintignore" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".gitignore" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".kokoro/.gitattributes" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/release/common.cfg" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".nycrc" + }, + { + "path": ".prettierignore" + }, + { + "path": ".prettierrc" + }, + { + "path": ".readme-partials.yml" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "LICENSE" + }, + { + "path": "README.md" + }, + { + "path": "codecov.yaml" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "package.json" + }, + { + "path": "protos/google/logging/type/http_request.proto" + }, + { + "path": "protos/google/logging/type/log_severity.proto" + }, + { + "path": "protos/google/logging/v2/log_entry.proto" + }, + { + "path": "protos/google/logging/v2/logging.proto" + }, + { + "path": "protos/google/logging/v2/logging_config.proto" + }, + { + "path": "protos/google/logging/v2/logging_metrics.proto" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "renovate.json" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/fluent.js" + }, + { + "path": "samples/http-request.js" + }, + { + "path": "samples/logs.js" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/sinks.js" + }, + { + "path": "samples/test/fluent.test.js" + }, + { + "path": "samples/test/http-request.test.js" + }, + { + "path": "samples/test/logs.test.js" + }, + { + "path": "samples/test/quickstart.test.js" + }, + { + "path": "samples/test/sinks.test.js" + }, + { + "path": "smoke-test/.eslintrc.yml" + }, + { + "path": "smoke-test/logging_service_v2_smoke_test.js" + }, + { + "path": "src/common.ts" + }, + { + "path": "src/entry.ts" + }, + { + "path": "src/http-request.ts" + }, + { + "path": "src/index.ts" + }, + { + "path": "src/log.ts" + }, + { + "path": "src/metadata.ts" + }, + { + "path": "src/middleware/context.ts" + }, + { + "path": "src/middleware/express/index.ts" + }, + { + "path": "src/middleware/express/make-http-request.ts" + }, + { + "path": "src/middleware/express/make-middleware.ts" + }, + { + "path": "src/middleware/index.ts" + }, + { + "path": "src/service_proto_list.json" + }, + { + "path": "src/sink.ts" + }, + { + "path": "src/v2/.eslintrc.yml" + }, + { + "path": "src/v2/config_service_v2_client.js" + }, + { + "path": "src/v2/config_service_v2_client_config.json" + }, + { + "path": "src/v2/config_service_v2_proto_list.json" + }, + { + "path": "src/v2/doc/google/api/doc_distribution.js" + }, + { + "path": "src/v2/doc/google/api/doc_label.js" + }, + { + "path": "src/v2/doc/google/api/doc_metric.js" + }, + { + "path": "src/v2/doc/google/api/doc_monitored_resource.js" + }, + { + "path": "src/v2/doc/google/logging/type/doc_http_request.js" + }, + { + "path": "src/v2/doc/google/logging/v2/doc_log_entry.js" + }, + { + "path": "src/v2/doc/google/logging/v2/doc_logging.js" + }, + { + "path": "src/v2/doc/google/logging/v2/doc_logging_config.js" + }, + { + "path": "src/v2/doc/google/logging/v2/doc_logging_metrics.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_any.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_duration.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_empty.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_struct.js" + }, + { + "path": "src/v2/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "src/v2/index.js" + }, + { + "path": "src/v2/logging_service_v2_client.js" + }, + { + "path": "src/v2/logging_service_v2_client_config.json" + }, + { + "path": "src/v2/logging_service_v2_proto_list.json" + }, + { + "path": "src/v2/metrics_service_v2_client.js" + }, + { + "path": "src/v2/metrics_service_v2_client_config.json" + }, + { + "path": "src/v2/metrics_service_v2_proto_list.json" + }, + { + "path": "synth.py" + }, + { + "path": "system-test/fixtures/sample/package.json" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "system-test/fixtures/sample/tsconfig.json" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/logging.ts" + }, + { + "path": "test/.eslintrc.yml" + }, + { + "path": "test/common.ts" + }, + { + "path": "test/entry.ts" + }, + { + "path": "test/gapic-v2.js" + }, + { + "path": "test/index.ts" + }, + { + "path": "test/log.ts" + }, + { + "path": "test/metadata.ts" + }, + { + "path": "test/middleware/express/test-make-http-request.ts" + }, + { + "path": "test/middleware/express/test-make-middleware.ts" + }, + { + "path": "test/middleware/test-context.ts" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "test/sink.ts" + }, + { + "path": "tsconfig.json" + }, + { + "path": "tslint.json" + } + ] +} \ No newline at end of file diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 924cf73d637..09f24287fa0 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From a5370dc5a2c92dfe1f8f1ade96193fa7ab61b4c5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jan 2020 11:41:40 -0800 Subject: [PATCH 0536/1029] fix: enum, bytes, and Long types now accept strings --- handwritten/logging/protos/protos.d.ts | 112 ++++++++++++------------- handwritten/logging/synth.metadata | 14 ++-- 2 files changed, 65 insertions(+), 61 deletions(-) diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index a67f44193fb..b6974fc050b 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -24,7 +24,7 @@ export namespace google { interface IDuration { /** Duration seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Duration nanos */ nanos?: (number|null); @@ -40,7 +40,7 @@ export namespace google { constructor(properties?: google.protobuf.IDuration); /** Duration seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Duration nanos. */ public nanos: number; @@ -294,7 +294,7 @@ export namespace google { interface ITimestamp { /** Timestamp seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Timestamp nanos */ nanos?: (number|null); @@ -310,7 +310,7 @@ export namespace google { constructor(properties?: google.protobuf.ITimestamp); /** Timestamp seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Timestamp nanos. */ public nanos: number; @@ -1077,10 +1077,10 @@ export namespace google { number?: (number|null); /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); /** FieldDescriptorProto typeName */ typeName?: (string|null); @@ -1117,10 +1117,10 @@ export namespace google { public number: number; /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); /** FieldDescriptorProto typeName. */ public typeName: string; @@ -1895,7 +1895,7 @@ export namespace google { javaStringCheckUtf8?: (boolean|null); /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); /** FileOptions goPackage */ goPackage?: (string|null); @@ -1968,7 +1968,7 @@ export namespace google { public javaStringCheckUtf8: boolean; /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); /** FileOptions goPackage. */ public goPackage: string; @@ -2214,13 +2214,13 @@ export namespace google { interface IFieldOptions { /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); /** FieldOptions packed */ packed?: (boolean|null); /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); /** FieldOptions lazy */ lazy?: (boolean|null); @@ -2245,13 +2245,13 @@ export namespace google { constructor(properties?: google.protobuf.IFieldOptions); /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); /** FieldOptions packed. */ public packed: boolean; /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); /** FieldOptions lazy. */ public lazy: boolean; @@ -2750,7 +2750,7 @@ export namespace google { deprecated?: (boolean|null); /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -2775,7 +2775,7 @@ export namespace google { public deprecated: boolean; /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); /** MethodOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2871,16 +2871,16 @@ export namespace google { identifierValue?: (string|null); /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); + positiveIntValue?: (number|Long|string|null); /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); + negativeIntValue?: (number|Long|string|null); /** UninterpretedOption doubleValue */ doubleValue?: (number|null); /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + stringValue?: (Uint8Array|string|null); /** UninterpretedOption aggregateValue */ aggregateValue?: (string|null); @@ -2902,16 +2902,16 @@ export namespace google { public identifierValue: string; /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); + public positiveIntValue: (number|Long|string); /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); + public negativeIntValue: (number|Long|string); /** UninterpretedOption doubleValue. */ public doubleValue: number; /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + public stringValue: (Uint8Array|string); /** UninterpretedOption aggregateValue. */ public aggregateValue: string; @@ -3588,7 +3588,7 @@ export namespace google { interface IValue { /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|null); + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); /** Value numberValue */ numberValue?: (number|null); @@ -3616,7 +3616,7 @@ export namespace google { constructor(properties?: google.protobuf.IValue); /** Value nullValue. */ - public nullValue: google.protobuf.NullValue; + public nullValue: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue); /** Value numberValue. */ public numberValue: number; @@ -3809,7 +3809,7 @@ export namespace google { type_url?: (string|null); /** Any value */ - value?: (Uint8Array|null); + value?: (Uint8Array|string|null); } /** Represents an Any. */ @@ -3825,7 +3825,7 @@ export namespace google { public type_url: string; /** Any value. */ - public value: Uint8Array; + public value: (Uint8Array|string); /** * Creates a new Any instance using the specified properties. @@ -4152,7 +4152,7 @@ export namespace google { filter?: (string|null); /** LogSink outputVersionFormat */ - outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|null); + outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat|null); /** LogSink writerIdentity */ writerIdentity?: (string|null); @@ -4195,7 +4195,7 @@ export namespace google { public filter: string; /** LogSink outputVersionFormat. */ - public outputVersionFormat: google.logging.v2.LogSink.VersionFormat; + public outputVersionFormat: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat); /** LogSink writerIdentity. */ public writerIdentity: string; @@ -6820,7 +6820,7 @@ export namespace google { receiveTimestamp?: (google.protobuf.ITimestamp|null); /** LogEntry severity */ - severity?: (google.logging.type.LogSeverity|null); + severity?: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity|null); /** LogEntry insertId */ insertId?: (string|null); @@ -6881,7 +6881,7 @@ export namespace google { public receiveTimestamp?: (google.protobuf.ITimestamp|null); /** LogEntry severity. */ - public severity: google.logging.type.LogSeverity; + public severity: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity); /** LogEntry insertId. */ public insertId: string; @@ -7099,7 +7099,7 @@ export namespace google { file?: (string|null); /** LogEntrySourceLocation line */ - line?: (number|Long|null); + line?: (number|Long|string|null); /** LogEntrySourceLocation function */ "function"?: (string|null); @@ -7118,7 +7118,7 @@ export namespace google { public file: string; /** LogEntrySourceLocation line. */ - public line: (number|Long); + public line: (number|Long|string); /** LogEntrySourceLocation function. */ public function: string; @@ -7354,7 +7354,7 @@ export namespace google { updateTime?: (google.protobuf.ITimestamp|null); /** LogMetric version */ - version?: (google.logging.v2.LogMetric.ApiVersion|null); + version?: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion|null); } /** Represents a LogMetric. */ @@ -7394,7 +7394,7 @@ export namespace google { public updateTime?: (google.protobuf.ITimestamp|null); /** LogMetric version. */ - public version: google.logging.v2.LogMetric.ApiVersion; + public version: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion); /** * Creates a new LogMetric instance using the specified properties. @@ -8060,13 +8060,13 @@ export namespace google { requestUrl?: (string|null); /** HttpRequest requestSize */ - requestSize?: (number|Long|null); + requestSize?: (number|Long|string|null); /** HttpRequest status */ status?: (number|null); /** HttpRequest responseSize */ - responseSize?: (number|Long|null); + responseSize?: (number|Long|string|null); /** HttpRequest userAgent */ userAgent?: (string|null); @@ -8093,7 +8093,7 @@ export namespace google { cacheValidatedWithOriginServer?: (boolean|null); /** HttpRequest cacheFillBytes */ - cacheFillBytes?: (number|Long|null); + cacheFillBytes?: (number|Long|string|null); /** HttpRequest protocol */ protocol?: (string|null); @@ -8115,13 +8115,13 @@ export namespace google { public requestUrl: string; /** HttpRequest requestSize. */ - public requestSize: (number|Long); + public requestSize: (number|Long|string); /** HttpRequest status. */ public status: number; /** HttpRequest responseSize. */ - public responseSize: (number|Long); + public responseSize: (number|Long|string); /** HttpRequest userAgent. */ public userAgent: string; @@ -8148,7 +8148,7 @@ export namespace google { public cacheValidatedWithOriginServer: boolean; /** HttpRequest cacheFillBytes. */ - public cacheFillBytes: (number|Long); + public cacheFillBytes: (number|Long|string); /** HttpRequest protocol. */ public protocol: string; @@ -8600,7 +8600,7 @@ export namespace google { labels?: (google.api.ILabelDescriptor[]|null); /** MonitoredResourceDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|null); + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); } /** Represents a MonitoredResourceDescriptor. */ @@ -8628,7 +8628,7 @@ export namespace google { public labels: google.api.ILabelDescriptor[]; /** MonitoredResourceDescriptor launchStage. */ - public launchStage: google.api.LaunchStage; + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); /** * Creates a new MonitoredResourceDescriptor instance using the specified properties. @@ -8900,7 +8900,7 @@ export namespace google { key?: (string|null); /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|null); + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); /** LabelDescriptor description */ description?: (string|null); @@ -8919,7 +8919,7 @@ export namespace google { public key: string; /** LabelDescriptor valueType. */ - public valueType: google.api.LabelDescriptor.ValueType; + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); /** LabelDescriptor description. */ public description: string; @@ -9019,7 +9019,7 @@ export namespace google { interface IDistribution { /** Distribution count */ - count?: (number|Long|null); + count?: (number|Long|string|null); /** Distribution mean */ mean?: (number|null); @@ -9034,7 +9034,7 @@ export namespace google { bucketOptions?: (google.api.Distribution.IBucketOptions|null); /** Distribution bucketCounts */ - bucketCounts?: ((number|Long)[]|null); + bucketCounts?: ((number|Long|string)[]|null); /** Distribution exemplars */ exemplars?: (google.api.Distribution.IExemplar[]|null); @@ -9050,7 +9050,7 @@ export namespace google { constructor(properties?: google.api.IDistribution); /** Distribution count. */ - public count: (number|Long); + public count: (number|Long|string); /** Distribution mean. */ public mean: number; @@ -9065,7 +9065,7 @@ export namespace google { public bucketOptions?: (google.api.Distribution.IBucketOptions|null); /** Distribution bucketCounts. */ - public bucketCounts: (number|Long)[]; + public bucketCounts: (number|Long|string)[]; /** Distribution exemplars. */ public exemplars: google.api.Distribution.IExemplar[]; @@ -9757,10 +9757,10 @@ export namespace google { labels?: (google.api.ILabelDescriptor[]|null); /** MetricDescriptor metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|null); + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); /** MetricDescriptor valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|null); + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); /** MetricDescriptor unit */ unit?: (string|null); @@ -9775,7 +9775,7 @@ export namespace google { metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); /** MetricDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|null); + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); } /** Represents a MetricDescriptor. */ @@ -9797,10 +9797,10 @@ export namespace google { public labels: google.api.ILabelDescriptor[]; /** MetricDescriptor metricKind. */ - public metricKind: google.api.MetricDescriptor.MetricKind; + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); /** MetricDescriptor valueType. */ - public valueType: google.api.MetricDescriptor.ValueType; + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); /** MetricDescriptor unit. */ public unit: string; @@ -9815,7 +9815,7 @@ export namespace google { public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); /** MetricDescriptor launchStage. */ - public launchStage: google.api.LaunchStage; + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); /** * Creates a new MetricDescriptor instance using the specified properties. @@ -9894,7 +9894,7 @@ export namespace google { interface IMetricDescriptorMetadata { /** MetricDescriptorMetadata launchStage */ - launchStage?: (google.api.LaunchStage|null); + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); /** MetricDescriptorMetadata samplePeriod */ samplePeriod?: (google.protobuf.IDuration|null); @@ -9913,7 +9913,7 @@ export namespace google { constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); /** MetricDescriptorMetadata launchStage. */ - public launchStage: google.api.LaunchStage; + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); /** MetricDescriptorMetadata samplePeriod. */ public samplePeriod?: (google.protobuf.IDuration|null); diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index fe84ea514ee..c2935877e56 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,20 @@ { - "updateTime": "2020-01-28T12:25:20.168811Z", + "updateTime": "2020-01-29T12:25:58.462892Z", "sources": [ { "generator": { "name": "artman", - "version": "0.44.3", - "dockerImage": "googleapis/artman@sha256:62b8b29acaae54b06a4183aa772e65b106e92d4bc466eb4db07953ab78bdb90c" + "version": "0.44.4", + "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", - "internalRef": "291821782" + "sha": "cf3b61102ed5f36b827bc82ec39be09525f018c8", + "internalRef": "292034635", + "log": "cf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" } }, { @@ -403,6 +404,9 @@ { "path": "src/v2/metrics_service_v2_proto_list.json" }, + { + "path": "synth.metadata" + }, { "path": "synth.py" }, From efc5c02a1ffe93cd8ebbc848c5cbb23a336554d0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 21:00:59 -0800 Subject: [PATCH 0537/1029] chore: release 7.1.0 (#687) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- handwritten/logging/CHANGELOG.md | 12 ++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index e0f8264a266..d8558a56ee5 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [7.1.0](https://www.github.com/googleapis/nodejs-logging/compare/v7.0.1...v7.1.0) (2020-01-29) + + +### Features + +* support uniqueWriterIdentity in Sink.create ([#686](https://www.github.com/googleapis/nodejs-logging/issues/686)) ([41c0346](https://www.github.com/googleapis/nodejs-logging/commit/41c0346199c2afba8a00b434f0eda886ebbaa5fa)) + + +### Bug Fixes + +* enum, bytes, and Long types now accept strings ([6605067](https://www.github.com/googleapis/nodejs-logging/commit/6605067b6570983b9fcedc1e971663795e6bc11d)) + ### [7.0.1](https://www.github.com/googleapis/nodejs-logging/compare/v7.0.0...v7.0.1) (2020-01-24) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 041fe064ab4..ad38bfbb4bc 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "7.0.1", + "version": "7.1.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From db183694dcc3b974b49616e03c60d121beb3452e Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 30 Jan 2020 09:37:53 -0500 Subject: [PATCH 0538/1029] test: when cleaning, only delete logs that exist (#688) --- handwritten/logging/system-test/logging.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index b30dbd71976..76c872c5b42 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -290,8 +290,14 @@ describe('Logging', () => { try { await log.delete(); } catch (_err) { + if (_err.code === 5) { + break; + } retries++; - console.warn(`delete of ${log.name} failed retries = ${retries}`); + console.warn( + `delete of ${log.name} failed retries = ${retries}`, + _err.message + ); await new Promise(r => setTimeout(r, WRITE_CONSISTENCY_DELAY_MS)); continue; } From b201100b15c77a1d4364212acd713cbb97d3d2cc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 30 Jan 2020 16:34:16 +0100 Subject: [PATCH 0539/1029] chore(deps): update dependency @types/mocha to v7 --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ad38bfbb4bc..981cd8ad3d1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -72,7 +72,7 @@ "@google-cloud/storage": "^4.0.0", "@types/extend": "^3.0.0", "@types/is": "0.0.21", - "@types/mocha": "^5.2.5", + "@types/mocha": "^7.0.0", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.1", "@types/on-finished": "^2.3.1", From 294d1e44ed2b9a21ce61a2f96b38b804629926cb Mon Sep 17 00:00:00 2001 From: Stephen Date: Fri, 31 Jan 2020 13:00:45 -0500 Subject: [PATCH 0540/1029] feat: add getLogs() and getLogsStream() (#692) --- handwritten/logging/src/index.ts | 206 ++++++++++++++++++++- handwritten/logging/system-test/logging.ts | 68 +++---- handwritten/logging/test/index.ts | 175 ++++++++++++++++- 3 files changed, 416 insertions(+), 33 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index a941d99e5b6..1084dcf9082 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -103,6 +103,30 @@ export interface GetEntriesCallback { ): void; } +export interface GetLogsRequest { + autoPaginate?: boolean; + gaxOptions?: gax.CallOptions; + maxApiCalls?: number; + maxResults?: number; + pageSize?: number; + pageToken?: string; +} + +export type GetLogsResponse = [ + Sink[], + google.logging.v2.IListLogsRequest, + google.logging.v2.IListLogsResponse +]; + +export interface GetLogsCallback { + ( + err: Error | null, + entries?: Sink[], + request?: google.logging.v2.IListLogsRequest, + apiResponse?: google.logging.v2.IListLogsResponse + ): void; +} + export interface GetSinksRequest { autoPaginate?: boolean; gaxOptions?: gax.CallOptions; @@ -677,6 +701,186 @@ class Logging { return userStream; } + /** + * Query object for listing entries. + * + * @typedef {object} GetLogsRequest + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return. + * @property {number} [pageSize] Maximum number of logs to return. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + */ + /** + * @typedef {array} GetLogsResponse + * @property {Log[]} 0 Array of {@link Log} instances. + * @property {object} 1 The full API response. + */ + /** + * @callback GetLogsCallback + * @param {?Error} err Request error, if any. + * @param {Log[]} logs Array of {@link Log} instances. + * @param {object} apiResponse The full API response. + */ + /** + * List the entries in your logs. + * + * @see [logs.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/logs/list} + * + * @param {GetLogsRequest} [query] Query object for listing entries. + * @param {GetLogsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * logging.getLogs((err, logs) => { + * // `logs` is an array of Stackdriver Logging log objects. + * }); + * + * //- + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. + * //- + * function callback(err, entries, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * logging.getLogs(nextQuery, callback); + * } + * } + * + * logging.getLogs({ + * autoPaginate: false + * }, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * logging.getLogs().then(data => { + * const entries = data[0]; + * }); + * + * @example include:samples/logs.js + * region_tag:logging_list_logs + * Another example: + */ + getLogs(options?: GetLogsRequest): Promise; + getLogs(callback: GetLogsCallback): void; + getLogs(options: GetLogsRequest, callback: GetLogsCallback): void; + async getLogs( + opts?: GetLogsRequest | GetLogsCallback + ): Promise { + const options = opts ? (opts as GetSinksRequest) : {}; + this.projectId = await this.auth.getProjectId(); + const reqOpts = extend({}, options, { + parent: 'projects/' + this.projectId, + }); + delete reqOpts.autoPaginate; + delete reqOpts.gaxOptions; + const gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); + const resp = await this.loggingService.listLogs(reqOpts, gaxOptions); + const [logs] = resp; + if (logs) { + resp[0] = logs.map((logName: string) => this.log(logName)); + } + return resp; + } + + /** + * List the {@link Log} objects in your project as a readable object stream. + * + * @method Logging#getLogsStream + * @param {GetLogsRequest} [query] Query object for listing entries. + * @returns {ReadableStream} A readable stream that emits {@link Log} + * instances. + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * logging.getLogsStream() + * .on('error', console.error) + * .on('data', log => { + * // `log` is a Stackdriver Logging log object. + * }) + * .on('end', function() { + * // All logs retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * logging.getLogsStream() + * .on('data', log => { + * this.end(); + * }); + */ + getLogsStream(options: GetLogsRequest = {}) { + options = options || {}; + let requestStream: Duplex; + const userStream = streamEvents(pumpify.obj()); + (userStream as AbortableDuplex).abort = () => { + if (requestStream) { + (requestStream as AbortableDuplex).abort(); + } + }; + const toLogStream = through.obj((logName, _, next) => { + next(null, this.log(logName)); + }); + userStream.once('reading', () => { + this.auth.getProjectId().then(projectId => { + this.projectId = projectId; + const reqOpts = extend({}, options, { + parent: 'projects/' + this.projectId, + }); + delete reqOpts.gaxOptions; + const gaxOptions = extend( + { + autoPaginate: options.autoPaginate, + }, + options.gaxOptions + ); + + let gaxStream: ClientReadableStream; + requestStream = streamEvents(through.obj()); + (requestStream as AbortableDuplex).abort = () => { + if (gaxStream && gaxStream.cancel) { + gaxStream.cancel(); + } + }; + requestStream.once('reading', () => { + try { + gaxStream = this.loggingService.listLogsStream(reqOpts, gaxOptions); + } catch (error) { + requestStream.destroy(error); + return; + } + gaxStream + .on('error', err => { + requestStream.destroy(err); + }) + .pipe(requestStream); + return; + }); + // tslint:disable-next-line no-any + (userStream as any).setPipeline(requestStream, toLogStream); + }); + }); + return userStream; + } + /** * Query object for listing sinks. * @@ -1067,7 +1271,7 @@ callbackifyAll(Logging, { * * These methods can be auto-paginated. */ -paginator.extend(Logging, ['getEntries', 'getSinks']); +paginator.extend(Logging, ['getEntries', 'getLogs', 'getSinks']); /** * {@link Entry} class. diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 76c872c5b42..249b8d1320d 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -34,7 +34,7 @@ nock(HOST_ADDRESS) describe('Logging', () => { let PROJECT_ID: string; - const TESTS_PREFIX = 'gcloud-logging-test'; + const TESTS_PREFIX = 'nodejs-logging-system-test'; const WRITE_CONSISTENCY_DELAY_MS = 5000; const bigQuery = new BigQuery(); @@ -67,6 +67,7 @@ describe('Logging', () => { deleteDatasets(), deleteTopics(), deleteSinks(), + deleteLogs(), ]); async function deleteBuckets() { @@ -97,6 +98,20 @@ describe('Logging', () => { await getAndDelete(logging.getSinks.bind(logging)); } + async function deleteLogs() { + const [logs] = await logging.getLogs(); + const logsToDelete = logs.filter(log => { + return ( + log.name.includes(TESTS_PREFIX) && + getDateFromGeneratedName(log.name) < oneHourAgo + ); + }); + + for (const log of logsToDelete) { + await log.delete(); + } + } + async function getAndDelete(method: Function) { const [objects] = await method(); return Promise.all( @@ -210,14 +225,8 @@ describe('Logging', () => { }); describe('logs', () => { - // tslint:disable-next-line no-any - const logs: any[] = []; - function getTestLog(loggingInstnce = null) { - const log = (loggingInstnce || logging).log( - `system-test-logs-${uuid.v4()}` - ); - logs.push(log); + const log = (loggingInstnce || logging).log(generateName()); const logEntries = [ // string data @@ -281,29 +290,26 @@ describe('Logging', () => { }, }; - after(async () => { - for (const log of logs) { - // attempt to delete log entries multiple times, as they can - // take a variable amount of time to write to the API: - let retries = 0; - while (retries < 3) { - try { - await log.delete(); - } catch (_err) { - if (_err.code === 5) { - break; - } - retries++; - console.warn( - `delete of ${log.name} failed retries = ${retries}`, - _err.message - ); - await new Promise(r => setTimeout(r, WRITE_CONSISTENCY_DELAY_MS)); - continue; - } - break; - } - } + describe('listing logs', () => { + before(async () => { + const {log, logEntries} = getTestLog(); + await log.write(logEntries, options); + }); + + it('should list logs', async () => { + const [logs] = await logging.getLogs(); + assert(logs.length > 0); + }); + + it('should list logs as a stream', done => { + const stream: Duplex = logging + .getLogsStream({pageSize: 1}) + .on('error', done) + .once('data', () => { + stream.end(); + done(); + }); + }); }); it('should list log entries', done => { diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 0ec64b6fbc4..4160fdfb36d 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -23,6 +23,8 @@ import * as through from 'through2'; import { Logging as LOGGING, LoggingOptions, + GetLogsRequest, + Log, CreateSinkRequest, GetSinksRequest, Sink, @@ -51,7 +53,7 @@ const fakePaginator = { } extended = true; methods = arrify(methods); - assert.deepStrictEqual(methods, ['getEntries', 'getSinks']); + assert.deepStrictEqual(methods, ['getEntries', 'getLogs', 'getSinks']); }, streamify(methodName: string) { return methodName; @@ -794,6 +796,177 @@ describe('Logging', () => { }); }); + describe('getLogs', () => { + beforeEach(() => { + (logging.auth.getProjectId as Function) = async () => {}; + }); + const OPTIONS = { + a: 'b', + c: 'd', + gaxOptions: { + a: 'b', + c: 'd', + }, + } as GetLogsRequest; + + it('should exec without options', async () => { + logging.loggingService.listLogs = async (reqOpts: {}, gaxOpts: {}) => { + assert.deepStrictEqual(gaxOpts, {autoPaginate: undefined}); + return [[]]; + }; + await logging.getLogs(); + }); + + it('should call gax method', async () => { + logging.loggingService.listLogs = async (reqOpts: {}, gaxOpts: {}) => { + assert.deepStrictEqual(reqOpts, { + parent: 'projects/' + logging.projectId, + a: 'b', + c: 'd', + }); + + assert.deepStrictEqual(gaxOpts, { + autoPaginate: undefined, + a: 'b', + c: 'd', + }); + + return [[]]; + }; + + await logging.getLogs(OPTIONS); + }); + + describe('error', () => { + it('should reject promise with error', () => { + const error = new Error('Error.'); + logging.loggingService.listLogs = async () => { + throw error; + }; + logging + .getLogs(OPTIONS) + .then(noop, err => assert.strictEqual(err, error)); + }); + }); + + describe('success', () => { + const RESPONSE = ['log1']; + + beforeEach(() => { + logging.loggingService.listLogs = async () => { + return [RESPONSE]; + }; + }); + + it('should resolve promise with Logs & API resp', async () => { + const logInstance = {} as Log; + logging.log = name => { + assert.strictEqual(name, RESPONSE[0]); + return logInstance; + }; + const [logs] = await logging.getLogs(OPTIONS); + assert.strictEqual(logs[0], logInstance); + }); + }); + }); + + describe('getLogsStream', () => { + const OPTIONS = { + a: 'b', + c: 'd', + gaxOptions: { + a: 'b', + c: 'd', + }, + } as GetLogsRequest; + + let GAX_STREAM: AbortableDuplex; + const RESPONSE = ['log1']; + + beforeEach(() => { + GAX_STREAM = (through.obj() as {}) as AbortableDuplex; + GAX_STREAM.push(RESPONSE[0]); + logging.loggingService.listLogsStream = () => GAX_STREAM; + (logging.auth.getProjectId as Function) = async () => {}; + }); + + it('should make request once reading', done => { + logging.loggingService.listLogsStream = (reqOpts: {}, gaxOpts: {}) => { + assert.deepStrictEqual(reqOpts, { + parent: 'projects/' + logging.projectId, + a: 'b', + c: 'd', + }); + + assert.deepStrictEqual(gaxOpts, { + autoPaginate: undefined, + a: 'b', + c: 'd', + }); + + setImmediate(done); + + return GAX_STREAM; + }; + + const stream = logging.getLogsStream(OPTIONS); + stream.emit('reading'); + }); + + it('should destroy request stream if gax fails', done => { + const error = new Error('Error.'); + logging.loggingService.listLogsStream = () => { + throw error; + }; + const stream = logging.getLogsStream(OPTIONS); + stream.emit('reading'); + stream.once('error', err => { + assert.strictEqual(err, error); + done(); + }); + }); + + it('should destroy request stream if gaxStream catches error', done => { + const error = new Error('Error.'); + const stream = logging.getLogsStream(OPTIONS); + stream.emit('reading'); + stream.on('error', err => { + assert.strictEqual(err, error); + done(); + }); + setImmediate(() => { + GAX_STREAM.emit('error', error); + }); + }); + + it('should convert results from request to Log', done => { + const stream = logging.getLogsStream(OPTIONS); + + const logInstance = {} as Log; + + logging.log = (name: string) => { + assert.strictEqual(name, RESPONSE[0]); + return logInstance; + }; + + stream.on('data', log => { + assert.strictEqual(log, logInstance); + done(); + }); + + stream.emit('reading'); + }); + + it('should expose abort function', done => { + GAX_STREAM.cancel = done; + const stream = logging.getLogsStream(OPTIONS) as AbortableDuplex; + stream.emit('reading'); + setImmediate(() => { + stream.abort(); + }); + }); + }); + describe('getSinks', () => { beforeEach(() => { (logging.auth.getProjectId as Function) = async () => {}; From 92b07a728e2114a46c3b1f16bf47fafdcd525ec8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 17:22:45 -0800 Subject: [PATCH 0541/1029] chore: skip img.shields.io in docs test --- handwritten/logging/linkinator.config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/linkinator.config.json b/handwritten/logging/linkinator.config.json index 584fe4009f1..95a8ebb281b 100644 --- a/handwritten/logging/linkinator.config.json +++ b/handwritten/logging/linkinator.config.json @@ -3,6 +3,7 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js" + "https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js", + "img.shields.io" ] } From e7500876dfc984e7096b418f6fd168523f1cb79e Mon Sep 17 00:00:00 2001 From: Stephen Date: Mon, 3 Feb 2020 17:36:16 -0500 Subject: [PATCH 0542/1029] test: make less requests to avoid quota limit (#698) --- handwritten/logging/system-test/logging.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 249b8d1320d..009f809c028 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -99,7 +99,9 @@ describe('Logging', () => { } async function deleteLogs() { - const [logs] = await logging.getLogs(); + const [logs] = await logging.getLogs({ + pageSize: 10000, + }); const logsToDelete = logs.filter(log => { return ( log.name.includes(TESTS_PREFIX) && @@ -108,7 +110,13 @@ describe('Logging', () => { }); for (const log of logsToDelete) { - await log.delete(); + try { + await log.delete(); + } catch (e) { + if (e.code !== 5) { + console.warn(`Deleting ${log.name} failed:`, e.message); + } + } } } From f54827fc925ec6bf139bebbea02f551c4653cf41 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Feb 2020 19:57:45 -0800 Subject: [PATCH 0543/1029] test: modernize mocha config (#695) * test: modernize mocha config * Update package.json --- handwritten/logging/.mocharc.json | 5 +++++ handwritten/logging/package.json | 2 -- handwritten/logging/test/mocha.opts | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 handwritten/logging/.mocharc.json delete mode 100644 handwritten/logging/test/mocha.opts diff --git a/handwritten/logging/.mocharc.json b/handwritten/logging/.mocharc.json new file mode 100644 index 00000000000..670c5e2c24b --- /dev/null +++ b/handwritten/logging/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 981cd8ad3d1..7acae912057 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -93,7 +93,6 @@ "execa": "^4.0.0", "gts": "^1.0.0", "http2spy": "^1.1.0", - "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", @@ -102,7 +101,6 @@ "mv": "^2.1.1", "ncp": "^2.0.0", "nock": "^11.3.2", - "power-assert": "^1.6.0", "prettier": "^1.15.1", "proxyquire": "^2.1.0", "sinon": "^8.0.0", diff --git a/handwritten/logging/test/mocha.opts b/handwritten/logging/test/mocha.opts deleted file mode 100644 index 8751e7bae37..00000000000 --- a/handwritten/logging/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require intelli-espower-loader ---timeout 10000 ---throw-deprecation From 9da00d9cc674fa8d1d1c112ab79033afb2c935e0 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 5 Feb 2020 16:45:20 -0500 Subject: [PATCH 0544/1029] test: retry rate limit deletion errors (#699) Co-authored-by: Benjamin E. Coe --- handwritten/logging/system-test/logging.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 009f809c028..f5ed46709b9 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -99,21 +99,39 @@ describe('Logging', () => { } async function deleteLogs() { + const maxPatienceMs = 300000; // 5 minutes. const [logs] = await logging.getLogs({ pageSize: 10000, }); const logsToDelete = logs.filter(log => { return ( - log.name.includes(TESTS_PREFIX) && + log.name.startsWith(TESTS_PREFIX) && getDateFromGeneratedName(log.name) < oneHourAgo ); }); + if (logsToDelete.length > 0) { + console.log('Deleting', logsToDelete.length, 'test logs'); + } + + let numLogsDeleted = 0; for (const log of logsToDelete) { try { await log.delete(); + numLogsDeleted++; + + // A one second gap is preferred between delete calls to avoid rate + // limiting. + let timeoutMs = 1000; + if (numLogsDeleted * 1000 > maxPatienceMs) { + // This is taking too long. If we hit the rate limit, we'll + // hopefully scoop up the stragglers on a future test run. + timeoutMs = 10; + } + await new Promise(res => setTimeout(res, timeoutMs)); } catch (e) { if (e.code !== 5) { + // Log exists, but couldn't be deleted. console.warn(`Deleting ${log.name} failed:`, e.message); } } From 3552fa225965b34e2397e6c626df5a0ae2d2de28 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 7 Feb 2020 23:53:41 +0100 Subject: [PATCH 0545/1029] fix(deps): update dependency type-fest to ^0.10.0 (#697) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7acae912057..91c23d9f1a5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -64,7 +64,7 @@ "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", - "type-fest": "^0.9.0" + "type-fest": "^0.10.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", From f57e22fdee7a9801ce81667d52d10a811dcd2af8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 10 Feb 2020 09:15:17 -0800 Subject: [PATCH 0546/1029] feat: add CMEK config and update grpc config logic (#700) --- .../protos/google/logging/v2/log_entry.proto | 24 +- .../protos/google/logging/v2/logging.proto | 41 +- .../google/logging/v2/logging_config.proto | 288 +- .../google/logging/v2/logging_metrics.proto | 70 +- handwritten/logging/protos/protos.d.ts | 14710 +++--- handwritten/logging/protos/protos.js | 43443 ++++++++-------- handwritten/logging/protos/protos.json | 4331 +- .../src/v2/config_service_v2_client.js | 169 + .../v2/config_service_v2_client_config.json | 16 +- .../v2/doc/google/logging/v2/doc_log_entry.js | 13 +- .../v2/doc/google/logging/v2/doc_logging.js | 2 +- .../google/logging/v2/doc_logging_config.js | 157 +- .../google/logging/v2/doc_logging_metrics.js | 12 +- .../src/v2/logging_service_v2_client.js | 12 +- .../src/v2/metrics_service_v2_client.js | 12 +- handwritten/logging/synth.metadata | 445 +- handwritten/logging/test/gapic-v2.js | 128 + 17 files changed, 33345 insertions(+), 30528 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index f0b03754519..3f9c3d51d76 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.logging.v2; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/logging/type/http_request.proto"; import "google/logging/type/log_severity.proto"; import "google/protobuf/any.proto"; @@ -36,7 +37,17 @@ option php_namespace = "Google\\Cloud\\Logging\\V2"; // An individual entry in a log. // +// message LogEntry { + option (google.api.resource) = { + type: "logging.googleapis.com/Log" + pattern: "projects/{project}/logs/{log}" + pattern: "organizations/{organization}/logs/{log}" + pattern: "folders/{folder}/logs/{log}" + pattern: "billingAccounts/{billing_account}/logs/{log}" + name_field: "log_name" + }; + // Required. The resource name of the log to which this log entry belongs: // // "projects/[PROJECT_ID]/logs/[LOG_ID]" @@ -111,10 +122,15 @@ message LogEntry { // Optional. A unique identifier for the log entry. If you provide a value, // then Logging considers other log entries in the same project, with the same - // `timestamp`, and with the same `insert_id` to be duplicates which can be - // removed. If omitted in new log entries, then Logging assigns its own unique - // identifier. The `insert_id` is also used to order log entries that have the - // same `timestamp` value. + // `timestamp`, and with the same `insert_id` to be duplicates which are + // removed in a single query result. However, there are no guarantees of + // de-duplication in the export of logs. + // + // If the `insert_id` is omitted when writing a log entry, the Logging API + // assigns its own unique identifier in this field. + // + // In queries, the `insert_id` is also used to order log entries that have + // the same `log_name` and `timestamp` values. string insert_id = 4; // Optional. Information about the HTTP request associated with this log diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index fc421759377..41575061076 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -17,7 +17,10 @@ syntax = "proto3"; package google.logging.v2; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/logging/v2/log_entry.proto"; import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; @@ -25,7 +28,6 @@ import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "google/api/annotations.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -45,10 +47,10 @@ service LoggingServiceV2 { "https://www.googleapis.com/auth/logging.read," "https://www.googleapis.com/auth/logging.write"; - // Deletes all the log entries in a log. - // The log reappears if it receives new entries. - // Log entries written shortly before the delete operation might not be - // deleted. + // Deletes all the log entries in a log. The log reappears if it receives new + // entries. Log entries written shortly before the delete operation might not + // be deleted. Entries received after the delete operation with a timestamp + // before the operation will be deleted. rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{log_name=projects/*/logs/*}" @@ -65,6 +67,7 @@ service LoggingServiceV2 { delete: "/v2/{log_name=billingAccounts/*/logs/*}" } }; + option (google.api.method_signature) = "log_name"; } // Writes log entries to Logging. This API method is the @@ -79,6 +82,7 @@ service LoggingServiceV2 { post: "/v2/entries:write" body: "*" }; + option (google.api.method_signature) = "log_name,resource,labels,entries"; } // Lists log entries. Use this method to retrieve log entries that originated @@ -116,6 +120,7 @@ service LoggingServiceV2 { get: "/v2/{parent=billingAccounts/*}/logs" } }; + option (google.api.method_signature) = "parent"; } } @@ -133,7 +138,12 @@ message DeleteLogRequest { // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. // For more information about log names, see // [LogEntry][google.logging.v2.LogEntry]. - string log_name = 1; + string log_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; } // The parameters to WriteLogEntries. @@ -155,7 +165,9 @@ message WriteLogEntriesRequest { // project, organization, billing account, or folder that is receiving // new log entries, whether the resource is specified in // logName or in an individual log entry. - string log_name = 1; + string log_name = 1 [(google.api.resource_reference) = { + type: "logging.googleapis.com/Log" + }]; // Optional. A default monitored resource object that is assigned to all log // entries in `entries` that do not specify a value for `resource`. Example: @@ -196,7 +208,7 @@ message WriteLogEntriesRequest { // [quota limit](/logging/quota-policy) for calls to `entries.write`, // you should try to include several log entries in this list, // rather than calling this method for each individual log entry. - repeated LogEntry entries = 4; + repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. Whether valid entries should be written even if some other // entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any @@ -245,10 +257,15 @@ message ListLogEntriesRequest { // // // Projects listed in the `project_ids` field are added to this list. - repeated string resource_names = 8; + repeated string resource_names = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Filters](/logging/docs/view/advanced_filters). Only log entries that + // Logs Queries](/logging/docs/view/advanced-queries). 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 @@ -329,7 +346,9 @@ message ListLogsRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1; + string parent = 1 [(google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + }]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index a9ccdf51cb1..7fb830ded21 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -17,12 +17,14 @@ syntax = "proto3"; package google.logging.v2; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -58,6 +60,7 @@ service ConfigServiceV2 { get: "/v2/{parent=billingAccounts/*}/sinks" } }; + option (google.api.method_signature) = "parent"; } // Gets a sink. @@ -77,6 +80,7 @@ service ConfigServiceV2 { get: "/v2/{sink_name=billingAccounts/*/sinks/*}" } }; + option (google.api.method_signature) = "sink_name"; } // Creates a sink that exports specified log entries to a destination. The @@ -104,6 +108,7 @@ service ConfigServiceV2 { body: "sink" } }; + option (google.api.method_signature) = "parent,sink"; } // Updates a sink. This method replaces the following fields in the existing @@ -148,6 +153,8 @@ service ConfigServiceV2 { body: "sink" } }; + option (google.api.method_signature) = "sink_name,sink,update_mask"; + option (google.api.method_signature) = "sink_name,sink"; } // Deletes a sink. If the sink has a unique `writer_identity`, then that @@ -168,6 +175,7 @@ service ConfigServiceV2 { delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" } }; + option (google.api.method_signature) = "sink_name"; } // Lists all the exclusions in a parent resource. @@ -187,6 +195,7 @@ service ConfigServiceV2 { get: "/v2/{parent=billingAccounts/*}/exclusions" } }; + option (google.api.method_signature) = "parent"; } // Gets the description of an exclusion. @@ -206,6 +215,7 @@ service ConfigServiceV2 { get: "/v2/{name=billingAccounts/*/exclusions/*}" } }; + option (google.api.method_signature) = "name"; } // Creates a new exclusion in a specified parent resource. @@ -232,6 +242,7 @@ service ConfigServiceV2 { body: "exclusion" } }; + option (google.api.method_signature) = "parent,exclusion"; } // Changes one or more properties of an existing exclusion. @@ -256,6 +267,7 @@ service ConfigServiceV2 { body: "exclusion" } }; + option (google.api.method_signature) = "name,exclusion,update_mask"; } // Deletes an exclusion. @@ -275,6 +287,49 @@ service ConfigServiceV2 { delete: "/v2/{name=billingAccounts/*/exclusions/*}" } }; + option (google.api.method_signature) = "name"; + } + + // Gets the Logs Router CMEK settings for the given resource. + // + // Note: CMEK for the Logs Router can currently only be configured for GCP + // organizations. Once configured, it applies to all projects and folders in + // the GCP organization. + // + // See [Enabling CMEK for Logs + // Router](/logging/docs/routing/managed-encryption) for more information. + rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { + option (google.api.http) = { + get: "/v2/{name=*/*}/cmekSettings" + additional_bindings { + get: "/v2/{name=organizations/*}/cmekSettings" + } + }; + } + + // Updates the Logs Router CMEK settings for the given resource. + // + // Note: CMEK for the Logs Router can currently only be configured for GCP + // organizations. Once configured, it applies to all projects and folders in + // the GCP organization. + // + // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] + // will fail if 1) `kms_key_name` is invalid, or 2) the associated service + // account does not have the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + // 3) access to the key is disabled. + // + // See [Enabling CMEK for Logs + // Router](/logging/docs/routing/managed-encryption) for more information. + rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { + option (google.api.http) = { + patch: "/v2/{name=*/*}/cmekSettings" + body: "cmek_settings" + additional_bindings { + patch: "/v2/{name=organizations/*}/cmekSettings" + body: "cmek_settings" + } + }; } } @@ -284,6 +339,14 @@ service ConfigServiceV2 { // The sink must be created within a project, organization, billing account, or // folder. message LogSink { + option (google.api.resource) = { + type: "logging.googleapis.com/Sink" + pattern: "projects/{project}/sinks/{sink}" + pattern: "organizations/{organization}/sinks/{sink}" + pattern: "folders/{folder}/sinks/{sink}" + pattern: "billingAccounts/{billing_account}/sinks/{sink}" + }; + // Available log entry formats. Log entries can be written to // Logging in either format and can be exported in either format. // Version 2 is the preferred format. @@ -302,7 +365,7 @@ message LogSink { // 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. + // periods. First character has to be alphanumeric. string name = 1; // Required. The export destination: @@ -315,7 +378,9 @@ message LogSink { // 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). - string destination = 3; + string destination = 3 [(google.api.resource_reference) = { + type: "*" + }]; // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only // exported log entries are those that are in the resource owning the sink and @@ -324,6 +389,14 @@ message LogSink { // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR string filter = 5; + // Optional. A description of this sink. + // The maximum length of the description is 8000 characters. + string description = 18; + + // Optional. If set to True, then this sink is disabled and it does not + // export any log entries. + bool disabled = 19; + // Deprecated. The log entry format to use for this sink's exported log // entries. The v2 format is used by default and cannot be changed. VersionFormat output_version_format = 6 [deprecated = true]; @@ -342,7 +415,7 @@ message LogSink { // 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. - string writer_identity = 8; + string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. This field applies only to sinks owned by organizations and // folders. If the field is false, the default, only the logs owned by the @@ -368,12 +441,12 @@ message LogSink { // Output only. The creation timestamp of the sink. // // This field may not be present for older sinks. - google.protobuf.Timestamp create_time = 13; + google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the sink. // // This field may not be present for older sinks. - google.protobuf.Timestamp update_time = 14; + google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // Do not use. This field is ignored. google.protobuf.Timestamp start_time = 10 [deprecated = true]; @@ -392,6 +465,14 @@ message BigQueryOptions { // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. // In both cases, tables are sharded based on UTC timezone. bool use_partitioned_tables = 1; + + // Output only. True if new timestamp column based partitioning is in use, + // false if legacy ingestion-time partitioning is in use. + // All new sinks will have this field set true and will use timestamp column + // based partitioning. If use_partitioned_tables is false, this value has no + // meaning and will be false. Legacy sinks using partitioned tables will have + // this field set to false. + bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The parameters to `ListSinks`. @@ -402,7 +483,12 @@ message ListSinksRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Sink" + } + ]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of @@ -437,7 +523,12 @@ message GetSinkRequest { // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // // Example: `"projects/my-project-id/sinks/my-sink-id"`. - string sink_name = 1; + string sink_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Sink" + } + ]; } // The parameters to `CreateSink`. @@ -450,11 +541,16 @@ message CreateSinkRequest { // "folders/[FOLDER_ID]" // // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Sink" + } + ]; // Required. The new sink, whose `name` parameter is a sink identifier that // is not already in use. - LogSink sink = 2; + LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // 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 @@ -481,11 +577,16 @@ message UpdateSinkRequest { // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // // Example: `"projects/my-project-id/sinks/my-sink-id"`. - string sink_name = 1; + string sink_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Sink" + } + ]; // Required. The updated sink, whose name is the same identifier that appears // as part of `sink_name`. - LogSink sink = 2; + LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] // for a description of this field. When updating a sink, the effect of this @@ -528,7 +629,12 @@ message DeleteSinkRequest { // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // // Example: `"projects/my-project-id/sinks/my-sink-id"`. - string sink_name = 1; + string sink_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Sink" + } + ]; } // Specifies a set of log entries that are not to be stored in @@ -538,9 +644,18 @@ message DeleteSinkRequest { // excluded. Note that organization-level and folder-level exclusions don't // apply to child resources, and that you can't exclude audit log entries. message LogExclusion { + option (google.api.resource) = { + type: "logging.googleapis.com/Exclusion" + pattern: "projects/{project}/exclusions/{exclusion}" + pattern: "organizations/{organization}/exclusions/{exclusion}" + pattern: "folders/{folder}/exclusions/{exclusion}" + pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}" + }; + // Required. A client-assigned identifier, such as // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and // can include only letters, digits, underscores, hyphens, and periods. + // First character has to be alphanumeric. string name = 1; // Optional. A description of this exclusion. @@ -581,7 +696,12 @@ message ListExclusionsRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Exclusion" + } + ]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of @@ -616,7 +736,12 @@ message GetExclusionRequest { // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" // // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Exclusion" + } + ]; } // The parameters to `CreateExclusion`. @@ -629,7 +754,12 @@ message CreateExclusionRequest { // "folders/[FOLDER_ID]" // // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Exclusion" + } + ]; // Required. The new exclusion, whose `name` parameter is an exclusion name // that is not already used in the parent resource. @@ -646,11 +776,16 @@ message UpdateExclusionRequest { // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" // // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Exclusion" + } + ]; // Required. New values for the existing exclusion. Only the fields specified // in `update_mask` are relevant. - LogExclusion exclusion = 2; + LogExclusion exclusion = 2 [(google.api.field_behavior) = REQUIRED]; // Required. A non-empty list of fields to change in the existing exclusion. // New values for the fields are taken from the corresponding fields in the @@ -659,7 +794,7 @@ message UpdateExclusionRequest { // // For example, to change the filter and description of an exclusion, // specify an `update_mask` of `"filter,description"`. - google.protobuf.FieldMask update_mask = 3; + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; } // The parameters to `DeleteExclusion`. @@ -672,5 +807,120 @@ message DeleteExclusionRequest { // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" // // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Exclusion" + } + ]; +} + +// The parameters to +// [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. +// +// See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) +// for more information. +message GetCmekSettingsRequest { + // Required. The resource for which to retrieve CMEK settings. + // + // "projects/[PROJECT_ID]/cmekSettings" + // "organizations/[ORGANIZATION_ID]/cmekSettings" + // "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + // "folders/[FOLDER_ID]/cmekSettings" + // + // Example: `"organizations/12345/cmekSettings"`. + // + // Note: CMEK for the Logs Router can currently only be configured for GCP + // organizations. Once configured, it applies to all projects and folders in + // the GCP organization. + string name = 1; +} + +// The parameters to +// [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. +// +// See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) +// for more information. +message UpdateCmekSettingsRequest { + // Required. The resource name for the CMEK settings to update. + // + // "projects/[PROJECT_ID]/cmekSettings" + // "organizations/[ORGANIZATION_ID]/cmekSettings" + // "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + // "folders/[FOLDER_ID]/cmekSettings" + // + // Example: `"organizations/12345/cmekSettings"`. + // + // Note: CMEK for the Logs Router can currently only be configured for GCP + // organizations. Once configured, it applies to all projects and folders in + // the GCP organization. + string name = 1; + + // Required. The CMEK settings to update. + // + // See [Enabling CMEK for Logs + // Router](/logging/docs/routing/managed-encryption) for more information. + CmekSettings cmek_settings = 2; + + // Optional. Field mask identifying which fields from `cmek_settings` should + // be updated. A field will be overwritten if and only if it is in the update + // mask. Output only fields cannot be updated. + // + // See [FieldMask][google.protobuf.FieldMask] for more information. + // + // Example: `"updateMask=kmsKeyName"` + google.protobuf.FieldMask update_mask = 3; +} + +// Describes the customer-managed encryption key (CMEK) settings associated with +// a project, folder, organization, billing account, or flexible resource. +// +// Note: CMEK for the Logs Router can currently only be configured for GCP +// organizations. Once configured, it applies to all projects and folders in the +// GCP organization. +// +// See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) +// for more information. +message CmekSettings { + // Output Only. The resource name of the CMEK settings. string name = 1; + + // The resource name for the configured Cloud KMS key. + // + // KMS key name format: + // "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + // + // For example: + // `"projects/my-project-id/locations/my-region/keyRings/key-ring-name/cryptoKeys/key-name"` + // + // + // + // To enable CMEK for the Logs Router, set this field to a valid + // `kms_key_name` for which the associated service account has the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. + // + // The Cloud KMS key used by the Log Router can be updated by changing the + // `kms_key_name` to a new valid key name. Encryption operations that are in + // progress will be completed with the key that was in use when they started. + // Decryption operations will be completed using the key that was used at the + // time of encryption unless access to that key has been revoked. + // + // To disable CMEK for the Logs Router, set this field to an empty string. + // + // See [Enabling CMEK for Logs + // Router](/logging/docs/routing/managed-encryption) for more information. + string kms_key_name = 2; + + // Output Only. The service account that will be used by the Logs Router to + // access your Cloud KMS key. + // + // Before enabling CMEK for Logs Router, you must first assign the role + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that + // the Logs Router will use to access your Cloud KMS key. Use + // [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to + // obtain the service account ID. + // + // See [Enabling CMEK for Logs + // Router](/logging/docs/routing/managed-encryption) for more information. + string service_account_id = 3; } diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 0c294b1013e..41fe2ea8820 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -17,13 +17,16 @@ syntax = "proto3"; package google.logging.v2; +import "google/api/client.proto"; import "google/api/distribution.proto"; +import "google/api/field_behavior.proto"; import "google/api/metric.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; -import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -48,6 +51,7 @@ service MetricsServiceV2 { option (google.api.http) = { get: "/v2/{parent=projects/*}/metrics" }; + option (google.api.method_signature) = "parent"; } // Gets a logs-based metric. @@ -55,6 +59,7 @@ service MetricsServiceV2 { option (google.api.http) = { get: "/v2/{metric_name=projects/*/metrics/*}" }; + option (google.api.method_signature) = "metric_name"; } // Creates a logs-based metric. @@ -63,6 +68,7 @@ service MetricsServiceV2 { post: "/v2/{parent=projects/*}/metrics" body: "metric" }; + option (google.api.method_signature) = "parent,metric"; } // Creates or updates a logs-based metric. @@ -71,6 +77,7 @@ service MetricsServiceV2 { put: "/v2/{metric_name=projects/*/metrics/*}" body: "metric" }; + option (google.api.method_signature) = "metric_name,metric"; } // Deletes a logs-based metric. @@ -78,6 +85,7 @@ service MetricsServiceV2 { option (google.api.http) = { delete: "/v2/{metric_name=projects/*/metrics/*}" }; + option (google.api.method_signature) = "metric_name"; } } @@ -89,6 +97,11 @@ service MetricsServiceV2 { // extracted values along with an optional histogram of the values as specified // by the bucket options. message LogMetric { + option (google.api.resource) = { + type: "logging.googleapis.com/Metric" + pattern: "projects/{project}/metrics/{metric}" + }; + // Logging API version. enum ApiVersion { // Logging API v2. @@ -211,7 +224,12 @@ message ListLogMetricsRequest { // Required. The name of the project containing the metrics: // // "projects/[PROJECT_ID]" - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of @@ -238,45 +256,65 @@ message ListLogMetricsResponse { // The parameters to GetLogMetric. message GetLogMetricRequest { - // The resource name of the desired metric: + // Required. The resource name of the desired metric: // // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - string metric_name = 1; + string metric_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Metric" + } + ]; } // The parameters to CreateLogMetric. message CreateLogMetricRequest { - // The resource name of the project in which to create the metric: + // Required. The resource name of the project in which to create the metric: // // "projects/[PROJECT_ID]" // // The new metric must be provided in the request. - string parent = 1; - - // The new logs-based metric, which must not have an identifier that + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Metric" + } + ]; + + // Required. The new logs-based metric, which must not have an identifier that // already exists. - LogMetric metric = 2; + LogMetric metric = 2 [(google.api.field_behavior) = REQUIRED]; } // The parameters to UpdateLogMetric. message UpdateLogMetricRequest { - // The resource name of the metric to update: + // Required. The resource name of the metric to update: // // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" // // The updated metric must be provided in the request and it's // `name` field must be the same as `[METRIC_ID]` If the metric // does not exist in `[PROJECT_ID]`, then a new metric is created. - string metric_name = 1; - - // The updated metric. - LogMetric metric = 2; + string metric_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Metric" + } + ]; + + // Required. The updated metric. + LogMetric metric = 2 [(google.api.field_behavior) = REQUIRED]; } // The parameters to DeleteLogMetric. message DeleteLogMetricRequest { - // The resource name of the metric to delete: + // Required. The resource name of the metric to delete: // // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - string metric_name = 1; + string metric_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Metric" + } + ]; } diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index b6974fc050b..34e56abb31d 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -17,3899 +17,3660 @@ import * as $protobuf from "protobufjs"; /** Namespace google. */ export namespace google { - /** Namespace protobuf. */ - namespace protobuf { + /** Namespace logging. */ + namespace logging { - /** Properties of a Duration. */ - interface IDuration { + /** Namespace v2. */ + namespace v2 { - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** Represents a ConfigServiceV2 */ + class ConfigServiceV2 extends $protobuf.rpc.Service { - /** Duration nanos */ - nanos?: (number|null); - } + /** + * Constructs a new ConfigServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Represents a Duration. */ - class Duration implements IDuration { + /** + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); + /** + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSinksResponse + */ + public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; - /** Duration seconds. */ - public seconds: (number|Long|string); + /** + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @returns Promise + */ + public listSinks(request: google.logging.v2.IListSinksRequest): Promise; - /** Duration nanos. */ - public nanos: number; + /** + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + /** + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @returns Promise + */ + public getSink(request: google.logging.v2.IGetSinkRequest): Promise; - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @returns Promise + */ + public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + /** + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + /** + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @returns Promise + */ + public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @returns Promise + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @returns Promise + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; - /** Properties of an Empty. */ - interface IEmpty { - } + /** + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; - /** Represents an Empty. */ - class Empty implements IEmpty { + /** + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @returns Promise + */ + public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); + /** + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + /** + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @returns Promise + */ + public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @returns Promise + */ + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + /** + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @returns Promise + */ + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Calls GetCmekSettings. + * @param request GetCmekSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmekSettings + */ + public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback): void; - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + /** + * Calls GetCmekSettings. + * @param request GetCmekSettingsRequest message or plain object + * @returns Promise + */ + public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest): Promise; - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls UpdateCmekSettings. + * @param request UpdateCmekSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmekSettings + */ + public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback): void; - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Calls UpdateCmekSettings. + * @param request UpdateCmekSettingsRequest message or plain object + * @returns Promise + */ + public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest): Promise; + } - /** Properties of a FieldMask. */ - interface IFieldMask { + namespace ConfigServiceV2 { - /** FieldMask paths */ - paths?: (string[]|null); - } + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @param error Error, if any + * @param [response] ListSinksResponse + */ + type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; - /** FieldMask paths. */ - public paths: string[]; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @param error Error, if any + * @param [response] ListExclusionsResponse + */ + type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. + * @param error Error, if any + * @param [response] CmekSettings + */ + type GetCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. + * @param error Error, if any + * @param [response] CmekSettings + */ + type UpdateCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; + } - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a LogSink. */ + interface ILogSink { - /** Properties of a Timestamp. */ - interface ITimestamp { + /** LogSink name */ + name?: (string|null); - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** LogSink destination */ + destination?: (string|null); - /** Timestamp nanos */ - nanos?: (number|null); - } + /** LogSink filter */ + filter?: (string|null); - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** LogSink description */ + description?: (string|null); - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); + /** LogSink disabled */ + disabled?: (boolean|null); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** LogSink outputVersionFormat */ + outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat|null); - /** Timestamp nanos. */ - public nanos: number; + /** LogSink writerIdentity */ + writerIdentity?: (string|null); - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + /** LogSink includeChildren */ + includeChildren?: (boolean|null); - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogSink bigqueryOptions */ + bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogSink createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + /** LogSink updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + /** LogSink startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LogSink endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + /** Represents a LogSink. */ + class LogSink implements ILogSink { - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new LogSink. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogSink); - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** LogSink name. */ + public name: string; - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** LogSink destination. */ + public destination: string; - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } + /** LogSink filter. */ + public filter: string; - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** LogSink description. */ + public description: string; - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + /** LogSink disabled. */ + public disabled: boolean; - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** LogSink outputVersionFormat. */ + public outputVersionFormat: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat); - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + /** LogSink writerIdentity. */ + public writerIdentity: string; - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogSink includeChildren. */ + public includeChildren: boolean; - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogSink bigqueryOptions. */ + public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + /** LogSink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + /** LogSink updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LogSink startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + /** LogSink endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** LogSink options. */ + public options?: "bigqueryOptions"; - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new LogSink instance using the specified properties. + * @param [properties] Properties to set + * @returns LogSink instance + */ + public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { + /** + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto name */ - name?: (string|null); + /** + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto package */ - "package"?: (string|null); + /** + * Decodes a LogSink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); + /** + * Decodes a LogSink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); + /** + * Verifies a LogSink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); + /** + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogSink + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @param message LogSink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** + * Converts this LogSink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + namespace LogSink { - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** VersionFormat enum. */ + enum VersionFormat { + VERSION_FORMAT_UNSPECIFIED = 0, + V2 = 1, + V1 = 2 + } + } - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** Properties of a BigQueryOptions. */ + interface IBigQueryOptions { - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** BigQueryOptions usePartitionedTables */ + usePartitionedTables?: (boolean|null); - /** FileDescriptorProto syntax */ - syntax?: (string|null); - } + /** BigQueryOptions usesTimestampColumnPartitioning */ + usesTimestampColumnPartitioning?: (boolean|null); + } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a BigQueryOptions. */ + class BigQueryOptions implements IBigQueryOptions { - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); + /** + * Constructs a new BigQueryOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IBigQueryOptions); - /** FileDescriptorProto name. */ - public name: string; + /** BigQueryOptions usePartitionedTables. */ + public usePartitionedTables: boolean; - /** FileDescriptorProto package. */ - public package: string; + /** BigQueryOptions usesTimestampColumnPartitioning. */ + public usesTimestampColumnPartitioning: boolean; - /** FileDescriptorProto dependency. */ - public dependency: string[]; + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryOptions instance + */ + public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** + * Verifies a BigQueryOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryOptions + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @param message BigQueryOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** + * Converts this BigQueryOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileDescriptorProto syntax. */ - public syntax: string; + /** Properties of a ListSinksRequest. */ + interface IListSinksRequest { - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + /** ListSinksRequest parent */ + parent?: (string|null); - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListSinksRequest pageToken */ + pageToken?: (string|null); - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListSinksRequest pageSize */ + pageSize?: (number|null); + } - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + /** Represents a ListSinksRequest. */ + class ListSinksRequest implements IListSinksRequest { - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + /** + * Constructs a new ListSinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListSinksRequest); - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListSinksRequest parent. */ + public parent: string; - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + /** ListSinksRequest pageToken. */ + public pageToken: string; - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListSinksRequest pageSize. */ + public pageSize: number; - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new ListSinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSinksRequest instance + */ + public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { + /** + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto name */ - name?: (string|null); + /** + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** + * Decodes a ListSinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** + * Verifies a ListSinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @param message ListSinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** + * Converts this ListSinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ExtensionRange start */ - start?: (number|null); + /** Properties of a ListSinksResponse. */ + interface IListSinksResponse { - /** ExtensionRange end */ - end?: (number|null); + /** ListSinksResponse sinks */ + sinks?: (google.logging.v2.ILogSink[]|null); - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); + /** ListSinksResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** Represents a ListSinksResponse. */ + class ListSinksResponse implements IListSinksResponse { /** - * Constructs a new ExtensionRange. + * Constructs a new ListSinksResponse. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; + constructor(properties?: google.logging.v2.IListSinksResponse); - /** ExtensionRange end. */ - public end: number; + /** ListSinksResponse sinks. */ + public sinks: google.logging.v2.ILogSink[]; - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** ListSinksResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ExtensionRange instance using the specified properties. + * Creates a new ListSinksResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRange instance + * @returns ListSinksResponse instance */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRange message from the specified reader or buffer. + * Decodes a ListSinksResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExtensionRange + * @returns ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRange + * @returns ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; /** - * Verifies an ExtensionRange message. + * Verifies a ListSinksResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRange + * @returns ListSinksResponse */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @param message ListSinksResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRange to JSON. + * Converts this ListSinksResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); + /** Properties of a GetSinkRequest. */ + interface IGetSinkRequest { - /** ReservedRange end */ - end?: (number|null); + /** GetSinkRequest sinkName */ + sinkName?: (string|null); } - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** Represents a GetSinkRequest. */ + class GetSinkRequest implements IGetSinkRequest { /** - * Constructs a new ReservedRange. + * Constructs a new GetSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; + constructor(properties?: google.logging.v2.IGetSinkRequest); - /** ReservedRange end. */ - public end: number; + /** GetSinkRequest sinkName. */ + public sinkName: string; /** - * Creates a new ReservedRange instance using the specified properties. + * Creates a new GetSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReservedRange instance + * @returns GetSinkRequest instance */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReservedRange message from the specified reader or buffer. + * Decodes a GetSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReservedRange + * @returns GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReservedRange + * @returns GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; /** - * Verifies a ReservedRange message. + * Verifies a GetSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReservedRange + * @returns GetSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @param message GetSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReservedRange to JSON. + * Converts this GetSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** Properties of a CreateSinkRequest. */ + interface ICreateSinkRequest { - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** CreateSinkRequest parent */ + parent?: (string|null); - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** CreateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + /** CreateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + } - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Represents a CreateSinkRequest. */ + class CreateSinkRequest implements ICreateSinkRequest { - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + /** + * Constructs a new CreateSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateSinkRequest); - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateSinkRequest parent. */ + public parent: string; - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + /** CreateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + /** + * Creates a new CreateSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSinkRequest instance + */ + public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + /** + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** + * Verifies a CreateSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldDescriptorProto name */ - name?: (string|null); + /** + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; - /** FieldDescriptorProto number */ - number?: (number|null); + /** + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @param message CreateSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + /** + * Converts this CreateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** Properties of an UpdateSinkRequest. */ + interface IUpdateSinkRequest { - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** UpdateSinkRequest sinkName */ + sinkName?: (string|null); - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** UpdateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** UpdateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** UpdateSinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** Represents an UpdateSinkRequest. */ + class UpdateSinkRequest implements IUpdateSinkRequest { - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - } + /** + * Constructs a new UpdateSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateSinkRequest); - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** UpdateSinkRequest sinkName. */ + public sinkName: string; - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + /** UpdateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); - /** FieldDescriptorProto name. */ - public name: string; + /** UpdateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; - /** FieldDescriptorProto number. */ - public number: number; + /** UpdateSinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + /** + * Creates a new UpdateSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSinkRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** + * Verifies an UpdateSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @param message UpdateSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + /** + * Converts this UpdateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a DeleteSinkRequest. */ + interface IDeleteSinkRequest { - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeleteSinkRequest sinkName */ + sinkName?: (string|null); + } - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + /** Represents a DeleteSinkRequest. */ + class DeleteSinkRequest implements IDeleteSinkRequest { - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + /** + * Constructs a new DeleteSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteSinkRequest); - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DeleteSinkRequest sinkName. */ + public sinkName: string; - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + /** + * Creates a new DeleteSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSinkRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - namespace FieldDescriptorProto { + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } + /** + * Verifies a DeleteSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { + /** + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; - /** OneofDescriptorProto name */ - name?: (string|null); + /** + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @param message DeleteSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } + /** + * Converts this DeleteSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Properties of a LogExclusion. */ + interface ILogExclusion { - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); + /** LogExclusion name */ + name?: (string|null); - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** LogExclusion description */ + description?: (string|null); - namespace EnumDescriptorProto { + /** LogExclusion filter */ + filter?: (string|null); - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** LogExclusion disabled */ + disabled?: (boolean|null); - /** EnumReservedRange start */ - start?: (number|null); + /** LogExclusion createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** EnumReservedRange end */ - end?: (number|null); + /** LogExclusion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** Represents a LogExclusion. */ + class LogExclusion implements ILogExclusion { /** - * Constructs a new EnumReservedRange. + * Constructs a new LogExclusion. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + constructor(properties?: google.logging.v2.ILogExclusion); - /** EnumReservedRange start. */ - public start: number; + /** LogExclusion name. */ + public name: string; - /** EnumReservedRange end. */ - public end: number; + /** LogExclusion description. */ + public description: string; + + /** LogExclusion filter. */ + public filter: string; + + /** LogExclusion disabled. */ + public disabled: boolean; + + /** LogExclusion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogExclusion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new EnumReservedRange instance using the specified properties. + * Creates a new LogExclusion instance using the specified properties. * @param [properties] Properties to set - * @returns EnumReservedRange instance + * @returns LogExclusion instance */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumReservedRange + * @returns LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumReservedRange + * @returns LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; /** - * Verifies an EnumReservedRange message. + * Verifies a LogExclusion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumReservedRange + * @returns LogExclusion */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * @param message LogExclusion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumReservedRange to JSON. + * Converts this LogExclusion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** Properties of a ListExclusionsRequest. */ + interface IListExclusionsRequest { - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** ListExclusionsRequest parent */ + parent?: (string|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } + /** ListExclusionsRequest pageToken */ + pageToken?: (string|null); - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** ListExclusionsRequest pageSize */ + pageSize?: (number|null); + } - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + /** Represents a ListExclusionsRequest. */ + class ListExclusionsRequest implements IListExclusionsRequest { - /** EnumValueDescriptorProto name. */ - public name: string; + /** + * Constructs a new ListExclusionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListExclusionsRequest); - /** EnumValueDescriptorProto number. */ - public number: number; + /** ListExclusionsRequest parent. */ + public parent: string; - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** ListExclusionsRequest pageToken. */ + public pageToken: string; - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + /** ListExclusionsRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ListExclusionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExclusionsRequest instance + */ + public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + /** + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + /** + * Verifies a ListExclusionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExclusionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @param message ListExclusionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** + * Converts this ListExclusionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ServiceDescriptorProto name */ - name?: (string|null); + /** Properties of a ListExclusionsResponse. */ + interface IListExclusionsResponse { - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** ListExclusionsResponse exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } + /** ListExclusionsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** Represents a ListExclusionsResponse. */ + class ListExclusionsResponse implements IListExclusionsResponse { - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + /** + * Constructs a new ListExclusionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListExclusionsResponse); - /** ServiceDescriptorProto name. */ - public name: string; + /** ListExclusionsResponse exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** ListExclusionsResponse nextPageToken. */ + public nextPageToken: string; - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** + * Creates a new ListExclusionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExclusionsResponse instance + */ + public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + /** + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + /** + * Verifies a ListExclusionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExclusionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + /** + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @param message ListExclusionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this ListExclusionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a GetExclusionRequest. */ + interface IGetExclusionRequest { - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + /** GetExclusionRequest name */ + name?: (string|null); + } - /** MethodDescriptorProto name */ - name?: (string|null); + /** Represents a GetExclusionRequest. */ + class GetExclusionRequest implements IGetExclusionRequest { - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** + * Constructs a new GetExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetExclusionRequest); - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** GetExclusionRequest name. */ + public name: string; - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** + * Creates a new GetExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } + /** + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; - /** MethodDescriptorProto name. */ - public name: string; + /** + * Verifies a GetExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @param message GetExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** + * Converts this GetExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** Properties of a CreateExclusionRequest. */ + interface ICreateExclusionRequest { - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** CreateExclusionRequest parent */ + parent?: (string|null); - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + /** CreateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + } - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a CreateExclusionRequest. */ + class CreateExclusionRequest implements ICreateExclusionRequest { - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new CreateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateExclusionRequest); - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + /** CreateExclusionRequest parent. */ + public parent: string; - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + /** CreateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new CreateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateExclusionRequest instance + */ + public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + /** + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; - /** Properties of a FileOptions. */ - interface IFileOptions { + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; - /** FileOptions javaPackage */ - javaPackage?: (string|null); + /** + * Verifies a CreateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); + /** + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); + /** + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @param message CreateExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); + /** + * Converts this CreateExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** Properties of an UpdateExclusionRequest. */ + interface IUpdateExclusionRequest { - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + /** UpdateExclusionRequest name */ + name?: (string|null); - /** FileOptions goPackage */ - goPackage?: (string|null); + /** UpdateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** UpdateExclusionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** Represents an UpdateExclusionRequest. */ + class UpdateExclusionRequest implements IUpdateExclusionRequest { - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** + * Constructs a new UpdateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateExclusionRequest); - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); + /** UpdateExclusionRequest name. */ + public name: string; - /** FileOptions deprecated */ - deprecated?: (boolean|null); + /** UpdateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** UpdateExclusionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); + /** + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); + /** + * Verifies an UpdateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); + /** + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @param message UpdateExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { + /** + * Converts this UpdateExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** Properties of a DeleteExclusionRequest. */ + interface IDeleteExclusionRequest { - /** FileOptions javaPackage. */ - public javaPackage: string; + /** DeleteExclusionRequest name */ + name?: (string|null); + } - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** Represents a DeleteExclusionRequest. */ + class DeleteExclusionRequest implements IDeleteExclusionRequest { - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** + * Constructs a new DeleteExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteExclusionRequest); - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** DeleteExclusionRequest name. */ + public name: string; - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; - /** FileOptions goPackage. */ - public goPackage: string; + /** + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; + /** + * Verifies a DeleteExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @param message DeleteExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * Converts this DeleteExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** Properties of a GetCmekSettingsRequest. */ + interface IGetCmekSettingsRequest { - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** GetCmekSettingsRequest name */ + name?: (string|null); + } - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** Represents a GetCmekSettingsRequest. */ + class GetCmekSettingsRequest implements IGetCmekSettingsRequest { - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** + * Constructs a new GetCmekSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetCmekSettingsRequest); - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** GetCmekSettingsRequest name. */ + public name: string; - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** + * Creates a new GetCmekSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCmekSettingsRequest instance + */ + public static create(properties?: google.logging.v2.IGetCmekSettingsRequest): google.logging.v2.GetCmekSettingsRequest; - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @param message GetCmekSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + /** + * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @param message GetCmekSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetCmekSettingsRequest; - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetCmekSettingsRequest; - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + /** + * Verifies a GetCmekSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + /** + * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCmekSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetCmekSettingsRequest; - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * @param message GetCmekSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + /** + * Converts this GetCmekSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of an UpdateCmekSettingsRequest. */ + interface IUpdateCmekSettingsRequest { - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** UpdateCmekSettingsRequest name */ + name?: (string|null); - namespace FileOptions { + /** UpdateCmekSettingsRequest cmekSettings */ + cmekSettings?: (google.logging.v2.ICmekSettings|null); - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 + /** UpdateCmekSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - } - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** Represents an UpdateCmekSettingsRequest. */ + class UpdateCmekSettingsRequest implements IUpdateCmekSettingsRequest { - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Constructs a new UpdateCmekSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateCmekSettingsRequest); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** UpdateCmekSettingsRequest name. */ + public name: string; - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** UpdateCmekSettingsRequest cmekSettings. */ + public cmekSettings?: (google.logging.v2.ICmekSettings|null); - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** UpdateCmekSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a new UpdateCmekSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCmekSettingsRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateCmekSettingsRequest): google.logging.v2.UpdateCmekSettingsRequest; - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** + * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @param message UpdateCmekSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** + * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @param message UpdateCmekSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateCmekSettingsRequest; - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateCmekSettingsRequest; - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** + * Verifies an UpdateCmekSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** + * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCmekSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateCmekSettingsRequest; - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateCmekSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + /** + * Converts this UpdateCmekSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a CmekSettings. */ + interface ICmekSettings { - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** CmekSettings name */ + name?: (string|null); - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + /** CmekSettings kmsKeyName */ + kmsKeyName?: (string|null); - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + /** CmekSettings serviceAccountId */ + serviceAccountId?: (string|null); + } - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a CmekSettings. */ + class CmekSettings implements ICmekSettings { - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + /** + * Constructs a new CmekSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICmekSettings); - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CmekSettings name. */ + public name: string; - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** CmekSettings kmsKeyName. */ + public kmsKeyName: string; - /** Properties of a FieldOptions. */ - interface IFieldOptions { + /** CmekSettings serviceAccountId. */ + public serviceAccountId: string; - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + /** + * Creates a new CmekSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CmekSettings instance + */ + public static create(properties?: google.logging.v2.ICmekSettings): google.logging.v2.CmekSettings; - /** FieldOptions packed */ - packed?: (boolean|null); + /** + * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @param message CmekSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** + * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @param message CmekSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** + * Decodes a CmekSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CmekSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CmekSettings; - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** + * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CmekSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CmekSettings; - /** FieldOptions weak */ - weak?: (boolean|null); + /** + * Verifies a CmekSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmekSettings + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CmekSettings; - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** + * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * @param message CmekSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CmekSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** + * Converts this CmekSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** Represents a LoggingServiceV2 */ + class LoggingServiceV2 extends $protobuf.rpc.Service { - /** FieldOptions packed. */ - public packed: boolean; + /** + * Constructs a new LoggingServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; - /** FieldOptions lazy. */ - public lazy: boolean; + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @returns Promise + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; - /** FieldOptions weak. */ - public weak: boolean; + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @returns Promise + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + /** + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse + */ + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @returns Promise + */ + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + */ + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise + */ + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + /** + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogsResponse + */ + public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @returns Promise + */ + public listLogs(request: google.logging.v2.IListLogsRequest): Promise; + } - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + namespace LoggingServiceV2 { - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @param error Error, if any + * @param [response] WriteLogEntriesResponse + */ + type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; - namespace FieldOptions { + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @param error Error, if any + * @param [response] ListLogEntriesResponse + */ + type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse + */ + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @param error Error, if any + * @param [response] ListLogsResponse + */ + type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; } - } - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** Properties of a DeleteLogRequest. */ + interface IDeleteLogRequest { - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** DeleteLogRequest logName */ + logName?: (string|null); + } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents a DeleteLogRequest. */ + class DeleteLogRequest implements IDeleteLogRequest { - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); + /** + * Constructs a new DeleteLogRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteLogRequest); - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** DeleteLogRequest logName. */ + public logName: string; - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + /** + * Creates a new DeleteLogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLogRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a DeleteLogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + /** + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLogRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @param message DeleteLogRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this DeleteLogRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of an EnumOptions. */ - interface IEnumOptions { + /** Properties of a WriteLogEntriesRequest. */ + interface IWriteLogEntriesRequest { - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** WriteLogEntriesRequest logName */ + logName?: (string|null); - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** WriteLogEntriesRequest resource */ + resource?: (google.api.IMonitoredResource|null); - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** WriteLogEntriesRequest labels */ + labels?: ({ [k: string]: string }|null); - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** WriteLogEntriesRequest entries */ + entries?: (google.logging.v2.ILogEntry[]|null); - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); + /** WriteLogEntriesRequest partialSuccess */ + partialSuccess?: (boolean|null); - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** WriteLogEntriesRequest dryRun */ + dryRun?: (boolean|null); + } - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** Represents a WriteLogEntriesRequest. */ + class WriteLogEntriesRequest implements IWriteLogEntriesRequest { - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Constructs a new WriteLogEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + /** WriteLogEntriesRequest logName. */ + public logName: string; - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** WriteLogEntriesRequest resource. */ + public resource?: (google.api.IMonitoredResource|null); - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** WriteLogEntriesRequest labels. */ + public labels: { [k: string]: string }; - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + /** WriteLogEntriesRequest entries. */ + public entries: google.logging.v2.ILogEntry[]; - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + /** WriteLogEntriesRequest partialSuccess. */ + public partialSuccess: boolean; - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** WriteLogEntriesRequest dryRun. */ + public dryRun: boolean; - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + /** + * Creates a new WriteLogEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesRequest instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Verifies a WriteLogEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); + /** + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @param message WriteLogEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** + * Converts this WriteLogEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Properties of a WriteLogEntriesResponse. */ + interface IWriteLogEntriesResponse { + } - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + /** Represents a WriteLogEntriesResponse. */ + class WriteLogEntriesResponse implements IWriteLogEntriesResponse { - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new WriteLogEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new WriteLogEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesResponse instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + /** + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + /** + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a WriteLogEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + /** + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @param message WriteLogEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** + * Converts this WriteLogEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Properties of a WriteLogEntriesPartialErrors. */ + interface IWriteLogEntriesPartialErrors { - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** WriteLogEntriesPartialErrors logEntryErrors */ + logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); + } - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - } + /** Represents a WriteLogEntriesPartialErrors. */ + class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** + * Constructs a new WriteLogEntriesPartialErrors. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); + /** WriteLogEntriesPartialErrors logEntryErrors. */ + public logEntryErrors: { [k: string]: google.rpc.IStatus }; - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteLogEntriesPartialErrors instance + */ + public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + /** + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + /** + * Verifies a WriteLogEntriesPartialErrors message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + /** + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteLogEntriesPartialErrors + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @param message WriteLogEntriesPartialErrors + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + /** + * Converts this WriteLogEntriesPartialErrors to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a ListLogEntriesRequest. */ + interface IListLogEntriesRequest { - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListLogEntriesRequest projectIds */ + projectIds?: (string[]|null); - /** Properties of a MethodOptions. */ - interface IMethodOptions { + /** ListLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** ListLogEntriesRequest filter */ + filter?: (string|null); - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** ListLogEntriesRequest orderBy */ + orderBy?: (string|null); - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** ListLogEntriesRequest pageSize */ + pageSize?: (number|null); - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** ListLogEntriesRequest pageToken */ + pageToken?: (string|null); + } - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } + /** Represents a ListLogEntriesRequest. */ + class ListLogEntriesRequest implements IListLogEntriesRequest { - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** + * Constructs a new ListLogEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogEntriesRequest); - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); + /** ListLogEntriesRequest projectIds. */ + public projectIds: string[]; - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** ListLogEntriesRequest resourceNames. */ + public resourceNames: string[]; - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** ListLogEntriesRequest filter. */ + public filter: string; - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ListLogEntriesRequest orderBy. */ + public orderBy: string; - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + /** ListLogEntriesRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListLogEntriesRequest pageToken. */ + public pageToken: string; - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogEntriesRequest instance + */ + public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + /** + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + /** + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ListLogEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; - namespace MethodOptions { + /** + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @param message ListLogEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 + /** + * Converts this ListLogEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** Properties of a ListLogEntriesResponse. */ + interface IListLogEntriesResponse { - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** ListLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); + /** ListLogEntriesResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); + /** Represents a ListLogEntriesResponse. */ + class ListLogEntriesResponse implements IListLogEntriesResponse { - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** + * Constructs a new ListLogEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogEntriesResponse); - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** ListLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } + /** ListLogEntriesResponse nextPageToken. */ + public nextPageToken: string; - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** + * Creates a new ListLogEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogEntriesResponse instance + */ + public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); + /** + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; + /** + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** UninterpretedOption identifierValue. */ - public identifierValue: string; + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); + /** + * Verifies a ListLogEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); + /** + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @param message ListLogEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** + * Converts this ListLogEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListMonitoredResourceDescriptorsRequest pageSize */ + pageSize?: (number|null); - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListMonitoredResourceDescriptorsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + /** Represents a ListMonitoredResourceDescriptorsRequest. */ + class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + /** + * Constructs a new ListMonitoredResourceDescriptorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListMonitoredResourceDescriptorsRequest pageSize. */ + public pageSize: number; - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + /** ListMonitoredResourceDescriptorsRequest pageToken. */ + public pageToken: string; - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMonitoredResourceDescriptorsRequest instance + */ + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - namespace UninterpretedOption { + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a NamePart. */ - interface INamePart { + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; - /** NamePart namePart */ - namePart: string; + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; - /** NamePart isExtension */ - isExtension: boolean; + /** + * Verifies a ListMonitoredResourceDescriptorsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMonitoredResourceDescriptorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** Properties of a ListMonitoredResourceDescriptorsResponse. */ + interface IListMonitoredResourceDescriptorsResponse { + + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ + resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + + /** ListMonitoredResourceDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMonitoredResourceDescriptorsResponse. */ + class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { /** - * Constructs a new NamePart. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); - /** NamePart namePart. */ - public namePart: string; + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ + public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; - /** NamePart isExtension. */ - public isExtension: boolean; + /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new NamePart instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns NamePart instance + * @returns ListMonitoredResourceDescriptorsResponse instance */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NamePart message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NamePart + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NamePart + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Verifies a NamePart message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NamePart + * @returns ListMonitoredResourceDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NamePart to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Properties of a ListLogsRequest. */ + interface IListLogsRequest { - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } + /** ListLogsRequest parent */ + parent?: (string|null); - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** ListLogsRequest pageSize */ + pageSize?: (number|null); - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + /** ListLogsRequest pageToken */ + pageToken?: (string|null); + } - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** Represents a ListLogsRequest. */ + class ListLogsRequest implements IListLogsRequest { - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + /** + * Constructs a new ListLogsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogsRequest); - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListLogsRequest parent. */ + public parent: string; - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListLogsRequest pageSize. */ + public pageSize: number; - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + /** ListLogsRequest pageToken. */ + public pageToken: string; - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + /** + * Creates a new ListLogsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogsRequest instance + */ + public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + /** + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ListLogsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; - namespace SourceCodeInfo { + /** + * Verifies a ListLogsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a Location. */ - interface ILocation { + /** + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; - /** Location path */ - path?: (number[]|null); + /** + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * @param message ListLogsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Location span */ - span?: (number[]|null); + /** + * Converts this ListLogsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Location leadingComments */ - leadingComments?: (string|null); + /** Properties of a ListLogsResponse. */ + interface IListLogsResponse { - /** Location trailingComments */ - trailingComments?: (string|null); + /** ListLogsResponse logNames */ + logNames?: (string[]|null); - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); + /** ListLogsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a Location. */ - class Location implements ILocation { + /** Represents a ListLogsResponse. */ + class ListLogsResponse implements IListLogsResponse { /** - * Constructs a new Location. + * Constructs a new ListLogsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; + constructor(properties?: google.logging.v2.IListLogsResponse); - /** Location trailingComments. */ - public trailingComments: string; + /** ListLogsResponse logNames. */ + public logNames: string[]; - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** ListLogsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Location instance using the specified properties. + * Creates a new ListLogsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Location instance + * @returns ListLogsResponse instance */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Location message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Location + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; /** - * Decodes a Location message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Location + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; /** - * Verifies a Location message. + * Verifies a ListLogsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Location + * @returns ListLogsResponse */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @param message ListLogsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Location to JSON. + * Converts this ListLogsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Properties of a LogEntry. */ + interface ILogEntry { - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + /** LogEntry logName */ + logName?: (string|null); - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** LogEntry resource */ + resource?: (google.api.IMonitoredResource|null); - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + /** LogEntry protoPayload */ + protoPayload?: (google.protobuf.IAny|null); - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogEntry textPayload */ + textPayload?: (string|null); - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogEntry jsonPayload */ + jsonPayload?: (google.protobuf.IStruct|null); - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + /** LogEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + /** LogEntry receiveTimestamp */ + receiveTimestamp?: (google.protobuf.ITimestamp|null); - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LogEntry severity */ + severity?: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity|null); - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + /** LogEntry insertId */ + insertId?: (string|null); - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** LogEntry httpRequest */ + httpRequest?: (google.logging.type.IHttpRequest|null); - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** LogEntry labels */ + labels?: ({ [k: string]: string }|null); - namespace GeneratedCodeInfo { + /** LogEntry metadata */ + metadata?: (google.api.IMonitoredResourceMetadata|null); - /** Properties of an Annotation. */ - interface IAnnotation { + /** LogEntry operation */ + operation?: (google.logging.v2.ILogEntryOperation|null); - /** Annotation path */ - path?: (number[]|null); + /** LogEntry trace */ + trace?: (string|null); - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** LogEntry spanId */ + spanId?: (string|null); - /** Annotation begin */ - begin?: (number|null); + /** LogEntry traceSampled */ + traceSampled?: (boolean|null); - /** Annotation end */ - end?: (number|null); + /** LogEntry sourceLocation */ + sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); } - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { /** - * Constructs a new Annotation. + * Constructs a new LogEntry. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + constructor(properties?: google.logging.v2.ILogEntry); - /** Annotation path. */ - public path: number[]; + /** LogEntry logName. */ + public logName: string; - /** Annotation sourceFile. */ - public sourceFile: string; + /** LogEntry resource. */ + public resource?: (google.api.IMonitoredResource|null); - /** Annotation begin. */ - public begin: number; + /** LogEntry protoPayload. */ + public protoPayload?: (google.protobuf.IAny|null); - /** Annotation end. */ - public end: number; + /** LogEntry textPayload. */ + public textPayload: string; + + /** LogEntry jsonPayload. */ + public jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp. */ + public receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity. */ + public severity: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity); + + /** LogEntry insertId. */ + public insertId: string; + + /** LogEntry httpRequest. */ + public httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels. */ + public labels: { [k: string]: string }; + + /** LogEntry metadata. */ + public metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** LogEntry operation. */ + public operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace. */ + public trace: string; + + /** LogEntry spanId. */ + public spanId: string; + + /** LogEntry traceSampled. */ + public traceSampled: boolean; + + /** LogEntry sourceLocation. */ + public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + + /** LogEntry payload. */ + public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); /** - * Creates a new Annotation instance using the specified properties. + * Creates a new LogEntry instance using the specified properties. * @param [properties] Properties to set - * @returns Annotation instance + * @returns LogEntry instance */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a LogEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Annotation + * @returns LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a LogEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Annotation + * @returns LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; /** - * Verifies an Annotation message. + * Verifies a LogEntry message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Annotation + * @returns LogEntry */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Annotation to JSON. + * Converts this LogEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Properties of a Struct. */ - interface IStruct { - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } + /** Properties of a LogEntryOperation. */ + interface ILogEntryOperation { - /** Represents a Struct. */ - class Struct implements IStruct { + /** LogEntryOperation id */ + id?: (string|null); - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); + /** LogEntryOperation producer */ + producer?: (string|null); - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; + /** LogEntryOperation first */ + first?: (boolean|null); - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogEntryOperation last */ + last?: (boolean|null); + } - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a LogEntryOperation. */ + class LogEntryOperation implements ILogEntryOperation { - /** - * Decodes a Struct message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + /** + * Constructs a new LogEntryOperation. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogEntryOperation); - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + /** LogEntryOperation id. */ + public id: string; - /** - * Verifies a Struct message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LogEntryOperation producer. */ + public producer: string; - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + /** LogEntryOperation first. */ + public first: boolean; - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** LogEntryOperation last. */ + public last: boolean; - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new LogEntryOperation instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntryOperation instance + */ + public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; - /** Properties of a Value. */ - interface IValue { + /** + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + /** + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; - /** Value numberValue */ - numberValue?: (number|null); + /** + * Decodes a LogEntryOperation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; - /** Value stringValue */ - stringValue?: (string|null); + /** + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; - /** Value boolValue */ - boolValue?: (boolean|null); + /** + * Verifies a LogEntryOperation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); + /** + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntryOperation + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } + /** + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @param message LogEntryOperation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a Value. */ - class Value implements IValue { + /** + * Converts this LogEntryOperation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); + /** Properties of a LogEntrySourceLocation. */ + interface ILogEntrySourceLocation { - /** Value nullValue. */ - public nullValue: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue); + /** LogEntrySourceLocation file */ + file?: (string|null); - /** Value numberValue. */ - public numberValue: number; + /** LogEntrySourceLocation line */ + line?: (number|Long|string|null); - /** Value stringValue. */ - public stringValue: string; + /** LogEntrySourceLocation function */ + "function"?: (string|null); + } - /** Value boolValue. */ - public boolValue: boolean; + /** Represents a LogEntrySourceLocation. */ + class LogEntrySourceLocation implements ILogEntrySourceLocation { - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); + /** + * Constructs a new LogEntrySourceLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogEntrySourceLocation); - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); + /** LogEntrySourceLocation file. */ + public file: string; - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + /** LogEntrySourceLocation line. */ + public line: (number|Long|string); - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + /** LogEntrySourceLocation function. */ + public function: string; - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new LogEntrySourceLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntrySourceLocation instance + */ + public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + /** + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; - - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } - - /** Represents a ListValue. */ - class ListValue implements IListValue { - - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; - - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; - - /** - * Verifies a ListValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a LogEntrySourceLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntrySourceLocation + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; - /** Namespace logging. */ - namespace logging { + /** + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @param message LogEntrySourceLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Namespace v2. */ - namespace v2 { + /** + * Converts this LogEntrySourceLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a ConfigServiceV2 */ - class ConfigServiceV2 extends $protobuf.rpc.Service { + /** Represents a MetricsServiceV2 */ + class MetricsServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new ConfigServiceV2 service. + * Constructs a new MetricsServiceV2 service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -3917,6192 +3678,7033 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. + * Creates new MetricsServiceV2 service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetricsServiceV2; /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSinksResponse + * Calls ListLogMetrics. + * @param request ListLogMetricsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogMetricsResponse */ - public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; + public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest, callback: google.logging.v2.MetricsServiceV2.ListLogMetricsCallback): void; /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object + * Calls ListLogMetrics. + * @param request ListLogMetricsRequest message or plain object * @returns Promise */ - public listSinks(request: google.logging.v2.IListSinksRequest): Promise; + public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest): Promise; /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink + * Calls GetLogMetric. + * @param request GetLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; + public getLogMetric(request: google.logging.v2.IGetLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.GetLogMetricCallback): void; /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object + * Calls GetLogMetric. + * @param request GetLogMetricRequest message or plain object * @returns Promise */ - public getSink(request: google.logging.v2.IGetSinkRequest): Promise; + public getLogMetric(request: google.logging.v2.IGetLogMetricRequest): Promise; /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink + * Calls CreateLogMetric. + * @param request CreateLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; + public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.CreateLogMetricCallback): void; /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object + * Calls CreateLogMetric. + * @param request CreateLogMetricRequest message or plain object * @returns Promise */ - public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; + public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest): Promise; /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink + * Calls UpdateLogMetric. + * @param request UpdateLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; + public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback): void; /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object + * Calls UpdateLogMetric. + * @param request UpdateLogMetricRequest message or plain object * @returns Promise */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; + public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest): Promise; /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object + * Calls DeleteLogMetric. + * @param request DeleteLogMetricRequest message or plain object * @param callback Node-style callback called with the error, if any, and Empty */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; - - /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @returns Promise - */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; - - /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse - */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; - - /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @returns Promise - */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; - - /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; + public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback): void; /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object + * Calls DeleteLogMetric. + * @param request DeleteLogMetricRequest message or plain object * @returns Promise */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; + public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest): Promise; + } - /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; + namespace MetricsServiceV2 { /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @returns Promise + * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * @param error Error, if any + * @param [response] ListLogMetricsResponse */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; + type ListLogMetricsCallback = (error: (Error|null), response?: google.logging.v2.ListLogMetricsResponse) => void; /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion + * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * @param error Error, if any + * @param [response] LogMetric */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; + type GetLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @returns Promise + * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * @param error Error, if any + * @param [response] LogMetric */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; + type CreateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * @param error Error, if any + * @param [response] LogMetric */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; + type UpdateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @returns Promise + * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * @param error Error, if any + * @param [response] Empty */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; + type DeleteLogMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - namespace ConfigServiceV2 { + /** Properties of a LogMetric. */ + interface ILogMetric { + + /** LogMetric name */ + name?: (string|null); + + /** LogMetric description */ + description?: (string|null); + + /** LogMetric filter */ + filter?: (string|null); + + /** LogMetric metricDescriptor */ + metricDescriptor?: (google.api.IMetricDescriptor|null); + + /** LogMetric valueExtractor */ + valueExtractor?: (string|null); + + /** LogMetric labelExtractors */ + labelExtractors?: ({ [k: string]: string }|null); + + /** LogMetric bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** LogMetric createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric version */ + version?: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion|null); + } + + /** Represents a LogMetric. */ + class LogMetric implements ILogMetric { /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @param error Error, if any - * @param [response] ListSinksResponse + * Constructs a new LogMetric. + * @param [properties] Properties to set */ - type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; + constructor(properties?: google.logging.v2.ILogMetric); + + /** LogMetric name. */ + public name: string; + + /** LogMetric description. */ + public description: string; + + /** LogMetric filter. */ + public filter: string; + + /** LogMetric metricDescriptor. */ + public metricDescriptor?: (google.api.IMetricDescriptor|null); + + /** LogMetric valueExtractor. */ + public valueExtractor: string; + + /** LogMetric labelExtractors. */ + public labelExtractors: { [k: string]: string }; + + /** LogMetric bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** LogMetric createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric version. */ + public version: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion); /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @param error Error, if any - * @param [response] LogSink + * Creates a new LogMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns LogMetric instance */ - type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static create(properties?: google.logging.v2.ILogMetric): google.logging.v2.LogMetric; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @param error Error, if any - * @param [response] LogSink + * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @param message LogMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static encode(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @param error Error, if any - * @param [response] LogSink + * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @param message LogMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static encodeDelimited(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @param error Error, if any - * @param [response] Empty + * Decodes a LogMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogMetric; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @param error Error, if any - * @param [response] ListExclusionsResponse + * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogMetric; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Verifies a LogMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogMetric */ - type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogMetric; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * @param message LogMetric + * @param [options] Conversion options + * @returns Plain object */ - type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static toObject(message: google.logging.v2.LogMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @param error Error, if any - * @param [response] Empty + * Converts this LogMetric to JSON. + * @returns JSON object */ - type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a LogSink. */ - interface ILogSink { + namespace LogMetric { - /** LogSink name */ - name?: (string|null); + /** ApiVersion enum. */ + enum ApiVersion { + V2 = 0, + V1 = 1 + } + } - /** LogSink destination */ - destination?: (string|null); + /** Properties of a ListLogMetricsRequest. */ + interface IListLogMetricsRequest { - /** LogSink filter */ - filter?: (string|null); + /** ListLogMetricsRequest parent */ + parent?: (string|null); - /** LogSink outputVersionFormat */ - outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat|null); + /** ListLogMetricsRequest pageToken */ + pageToken?: (string|null); - /** LogSink writerIdentity */ - writerIdentity?: (string|null); + /** ListLogMetricsRequest pageSize */ + pageSize?: (number|null); + } - /** LogSink includeChildren */ - includeChildren?: (boolean|null); + /** Represents a ListLogMetricsRequest. */ + class ListLogMetricsRequest implements IListLogMetricsRequest { - /** LogSink bigqueryOptions */ - bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + /** + * Constructs a new ListLogMetricsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogMetricsRequest); - /** LogSink createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListLogMetricsRequest parent. */ + public parent: string; - /** LogSink updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListLogMetricsRequest pageToken. */ + public pageToken: string; - /** LogSink startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** ListLogMetricsRequest pageSize. */ + public pageSize: number; - /** LogSink endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } + /** + * Creates a new ListLogMetricsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogMetricsRequest instance + */ + public static create(properties?: google.logging.v2.IListLogMetricsRequest): google.logging.v2.ListLogMetricsRequest; - /** Represents a LogSink. */ - class LogSink implements ILogSink { + /** + * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @param message ListLogMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @param message ListLogMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new LogSink. - * @param [properties] Properties to set + * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: google.logging.v2.ILogSink); + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsRequest; - /** LogSink name. */ - public name: string; + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsRequest; - /** LogSink destination. */ - public destination: string; + /** + * Verifies a ListLogMetricsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogSink filter. */ - public filter: string; + /** + * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogMetricsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsRequest; - /** LogSink outputVersionFormat. */ - public outputVersionFormat: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat); + /** + * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * @param message ListLogMetricsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogSink writerIdentity. */ - public writerIdentity: string; + /** + * Converts this ListLogMetricsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogSink includeChildren. */ - public includeChildren: boolean; + /** Properties of a ListLogMetricsResponse. */ + interface IListLogMetricsResponse { - /** LogSink bigqueryOptions. */ - public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + /** ListLogMetricsResponse metrics */ + metrics?: (google.logging.v2.ILogMetric[]|null); - /** LogSink createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListLogMetricsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** LogSink updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Represents a ListLogMetricsResponse. */ + class ListLogMetricsResponse implements IListLogMetricsResponse { - /** LogSink startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new ListLogMetricsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogMetricsResponse); - /** LogSink endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** ListLogMetricsResponse metrics. */ + public metrics: google.logging.v2.ILogMetric[]; - /** LogSink options. */ - public options?: "bigqueryOptions"; + /** ListLogMetricsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new LogSink instance using the specified properties. + * Creates a new ListLogMetricsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns LogSink instance + * @returns ListLogMetricsResponse instance */ - public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; + public static create(properties?: google.logging.v2.IListLogMetricsResponse): google.logging.v2.ListLogMetricsResponse; /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode + * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @param message ListLogMetricsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode + * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @param message ListLogMetricsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes a ListLogMetricsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogSink + * @returns ListLogMetricsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsResponse; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogSink + * @returns ListLogMetricsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsResponse; /** - * Verifies a LogSink message. + * Verifies a ListLogMetricsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogSink + * @returns ListLogMetricsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsResponse; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. - * @param message LogSink + * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * @param message ListLogMetricsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogSink to JSON. + * Converts this ListLogMetricsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LogSink { - - /** VersionFormat enum. */ - enum VersionFormat { - VERSION_FORMAT_UNSPECIFIED = 0, - V2 = 1, - V1 = 2 - } - } - - /** Properties of a BigQueryOptions. */ - interface IBigQueryOptions { + /** Properties of a GetLogMetricRequest. */ + interface IGetLogMetricRequest { - /** BigQueryOptions usePartitionedTables */ - usePartitionedTables?: (boolean|null); + /** GetLogMetricRequest metricName */ + metricName?: (string|null); } - /** Represents a BigQueryOptions. */ - class BigQueryOptions implements IBigQueryOptions { + /** Represents a GetLogMetricRequest. */ + class GetLogMetricRequest implements IGetLogMetricRequest { /** - * Constructs a new BigQueryOptions. + * Constructs a new GetLogMetricRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IBigQueryOptions); + constructor(properties?: google.logging.v2.IGetLogMetricRequest); - /** BigQueryOptions usePartitionedTables. */ - public usePartitionedTables: boolean; + /** GetLogMetricRequest metricName. */ + public metricName: string; /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new GetLogMetricRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryOptions instance + * @returns GetLogMetricRequest instance */ - public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; + public static create(properties?: google.logging.v2.IGetLogMetricRequest): google.logging.v2.GetLogMetricRequest; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode + * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @param message GetLogMetricRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode + * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @param message GetLogMetricRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a GetLogMetricRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryOptions + * @returns GetLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetLogMetricRequest; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryOptions + * @returns GetLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetLogMetricRequest; /** - * Verifies a BigQueryOptions message. + * Verifies a GetLogMetricRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryOptions + * @returns GetLogMetricRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetLogMetricRequest; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. - * @param message BigQueryOptions + * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * @param message GetLogMetricRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryOptions to JSON. + * Converts this GetLogMetricRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksRequest. */ - interface IListSinksRequest { + /** Properties of a CreateLogMetricRequest. */ + interface ICreateLogMetricRequest { - /** ListSinksRequest parent */ + /** CreateLogMetricRequest parent */ parent?: (string|null); - /** ListSinksRequest pageToken */ - pageToken?: (string|null); - - /** ListSinksRequest pageSize */ - pageSize?: (number|null); + /** CreateLogMetricRequest metric */ + metric?: (google.logging.v2.ILogMetric|null); } - /** Represents a ListSinksRequest. */ - class ListSinksRequest implements IListSinksRequest { + /** Represents a CreateLogMetricRequest. */ + class CreateLogMetricRequest implements ICreateLogMetricRequest { /** - * Constructs a new ListSinksRequest. + * Constructs a new CreateLogMetricRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksRequest); + constructor(properties?: google.logging.v2.ICreateLogMetricRequest); - /** ListSinksRequest parent. */ + /** CreateLogMetricRequest parent. */ public parent: string; - /** ListSinksRequest pageToken. */ - public pageToken: string; - - /** ListSinksRequest pageSize. */ - public pageSize: number; + /** CreateLogMetricRequest metric. */ + public metric?: (google.logging.v2.ILogMetric|null); /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new CreateLogMetricRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksRequest instance + * @returns CreateLogMetricRequest instance */ - public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; + public static create(properties?: google.logging.v2.ICreateLogMetricRequest): google.logging.v2.CreateLogMetricRequest; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @param message CreateLogMetricRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @param message CreateLogMetricRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a CreateLogMetricRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksRequest + * @returns CreateLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateLogMetricRequest; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksRequest + * @returns CreateLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateLogMetricRequest; /** - * Verifies a ListSinksRequest message. + * Verifies a CreateLogMetricRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksRequest + * @returns CreateLogMetricRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateLogMetricRequest; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. - * @param message ListSinksRequest + * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. + * @param message CreateLogMetricRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CreateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksRequest to JSON. + * Converts this CreateLogMetricRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksResponse. */ - interface IListSinksResponse { + /** Properties of an UpdateLogMetricRequest. */ + interface IUpdateLogMetricRequest { - /** ListSinksResponse sinks */ - sinks?: (google.logging.v2.ILogSink[]|null); + /** UpdateLogMetricRequest metricName */ + metricName?: (string|null); - /** ListSinksResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateLogMetricRequest metric */ + metric?: (google.logging.v2.ILogMetric|null); } - /** Represents a ListSinksResponse. */ - class ListSinksResponse implements IListSinksResponse { + /** Represents an UpdateLogMetricRequest. */ + class UpdateLogMetricRequest implements IUpdateLogMetricRequest { /** - * Constructs a new ListSinksResponse. + * Constructs a new UpdateLogMetricRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksResponse); + constructor(properties?: google.logging.v2.IUpdateLogMetricRequest); - /** ListSinksResponse sinks. */ - public sinks: google.logging.v2.ILogSink[]; + /** UpdateLogMetricRequest metricName. */ + public metricName: string; - /** ListSinksResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateLogMetricRequest metric. */ + public metric?: (google.logging.v2.ILogMetric|null); /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new UpdateLogMetricRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksResponse instance + * @returns UpdateLogMetricRequest instance */ - public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; + public static create(properties?: google.logging.v2.IUpdateLogMetricRequest): google.logging.v2.UpdateLogMetricRequest; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @param message UpdateLogMetricRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @param message UpdateLogMetricRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksResponse + * @returns UpdateLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateLogMetricRequest; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksResponse + * @returns UpdateLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateLogMetricRequest; /** - * Verifies a ListSinksResponse message. + * Verifies an UpdateLogMetricRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksResponse + * @returns UpdateLogMetricRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateLogMetricRequest; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. - * @param message ListSinksResponse + * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. + * @param message UpdateLogMetricRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksResponse to JSON. + * Converts this UpdateLogMetricRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSinkRequest. */ - interface IGetSinkRequest { + /** Properties of a DeleteLogMetricRequest. */ + interface IDeleteLogMetricRequest { - /** GetSinkRequest sinkName */ - sinkName?: (string|null); + /** DeleteLogMetricRequest metricName */ + metricName?: (string|null); } - /** Represents a GetSinkRequest. */ - class GetSinkRequest implements IGetSinkRequest { + /** Represents a DeleteLogMetricRequest. */ + class DeleteLogMetricRequest implements IDeleteLogMetricRequest { /** - * Constructs a new GetSinkRequest. + * Constructs a new DeleteLogMetricRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetSinkRequest); + constructor(properties?: google.logging.v2.IDeleteLogMetricRequest); - /** GetSinkRequest sinkName. */ - public sinkName: string; + /** DeleteLogMetricRequest metricName. */ + public metricName: string; /** - * Creates a new GetSinkRequest instance using the specified properties. + * Creates a new DeleteLogMetricRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSinkRequest instance + * @returns DeleteLogMetricRequest instance */ - public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; + public static create(properties?: google.logging.v2.IDeleteLogMetricRequest): google.logging.v2.DeleteLogMetricRequest; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @param message DeleteLogMetricRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @param message DeleteLogMetricRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSinkRequest + * @returns DeleteLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogMetricRequest; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSinkRequest + * @returns DeleteLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogMetricRequest; /** - * Verifies a GetSinkRequest message. + * Verifies a DeleteLogMetricRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSinkRequest + * @returns DeleteLogMetricRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogMetricRequest; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. - * @param message GetSinkRequest + * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. + * @param message DeleteLogMetricRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a HttpRequest. */ + interface IHttpRequest { + + /** HttpRequest requestMethod */ + requestMethod?: (string|null); + + /** HttpRequest requestUrl */ + requestUrl?: (string|null); + + /** HttpRequest requestSize */ + requestSize?: (number|Long|string|null); + + /** HttpRequest status */ + status?: (number|null); + + /** HttpRequest responseSize */ + responseSize?: (number|Long|string|null); + + /** HttpRequest userAgent */ + userAgent?: (string|null); + + /** HttpRequest remoteIp */ + remoteIp?: (string|null); + + /** HttpRequest serverIp */ + serverIp?: (string|null); + + /** HttpRequest referer */ + referer?: (string|null); + + /** HttpRequest latency */ + latency?: (google.protobuf.IDuration|null); + + /** HttpRequest cacheLookup */ + cacheLookup?: (boolean|null); + + /** HttpRequest cacheHit */ + cacheHit?: (boolean|null); + + /** HttpRequest cacheValidatedWithOriginServer */ + cacheValidatedWithOriginServer?: (boolean|null); + + /** HttpRequest cacheFillBytes */ + cacheFillBytes?: (number|Long|string|null); + + /** HttpRequest protocol */ + protocol?: (string|null); + } + + /** Represents a HttpRequest. */ + class HttpRequest implements IHttpRequest { + + /** + * Constructs a new HttpRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.type.IHttpRequest); + + /** HttpRequest requestMethod. */ + public requestMethod: string; + + /** HttpRequest requestUrl. */ + public requestUrl: string; + + /** HttpRequest requestSize. */ + public requestSize: (number|Long|string); + + /** HttpRequest status. */ + public status: number; + + /** HttpRequest responseSize. */ + public responseSize: (number|Long|string); - /** - * Converts this GetSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpRequest userAgent. */ + public userAgent: string; - /** Properties of a CreateSinkRequest. */ - interface ICreateSinkRequest { + /** HttpRequest remoteIp. */ + public remoteIp: string; - /** CreateSinkRequest parent */ - parent?: (string|null); + /** HttpRequest serverIp. */ + public serverIp: string; - /** CreateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** HttpRequest referer. */ + public referer: string; - /** CreateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); - } + /** HttpRequest latency. */ + public latency?: (google.protobuf.IDuration|null); - /** Represents a CreateSinkRequest. */ - class CreateSinkRequest implements ICreateSinkRequest { + /** HttpRequest cacheLookup. */ + public cacheLookup: boolean; - /** - * Constructs a new CreateSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ICreateSinkRequest); + /** HttpRequest cacheHit. */ + public cacheHit: boolean; - /** CreateSinkRequest parent. */ - public parent: string; + /** HttpRequest cacheValidatedWithOriginServer. */ + public cacheValidatedWithOriginServer: boolean; - /** CreateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + /** HttpRequest cacheFillBytes. */ + public cacheFillBytes: (number|Long|string); - /** CreateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** HttpRequest protocol. */ + public protocol: string; /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new HttpRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSinkRequest instance + * @returns HttpRequest instance */ - public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; + public static create(properties?: google.logging.type.IHttpRequest): google.logging.type.HttpRequest; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @param message HttpRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @param message HttpRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a HttpRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSinkRequest + * @returns HttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.type.HttpRequest; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a HttpRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSinkRequest + * @returns HttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.type.HttpRequest; /** - * Verifies a CreateSinkRequest message. + * Verifies a HttpRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSinkRequest + * @returns HttpRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.type.HttpRequest; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. - * @param message CreateSinkRequest + * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. + * @param message HttpRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.type.HttpRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this HttpRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSinkRequest. */ - interface IUpdateSinkRequest { + /** LogSeverity enum. */ + enum LogSeverity { + DEFAULT = 0, + DEBUG = 100, + INFO = 200, + NOTICE = 300, + WARNING = 400, + ERROR = 500, + CRITICAL = 600, + ALERT = 700, + EMERGENCY = 800 + } + } + } - /** UpdateSinkRequest sinkName */ - sinkName?: (string|null); + /** Namespace api. */ + namespace api { - /** UpdateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } - /** UpdateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** UpdateSinkRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** ResourceDescriptor type */ + type?: (string|null); - /** Represents an UpdateSinkRequest. */ - class UpdateSinkRequest implements IUpdateSinkRequest { + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** - * Constructs a new UpdateSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IUpdateSinkRequest); + /** ResourceDescriptor nameField */ + nameField?: (string|null); - /** UpdateSinkRequest sinkName. */ - public sinkName: string; + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** UpdateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + /** ResourceDescriptor plural */ + plural?: (string|null); - /** UpdateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ResourceDescriptor singular */ + singular?: (string|null); + } - /** UpdateSinkRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { - /** - * Creates a new UpdateSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSinkRequest instance - */ - public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); - /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ResourceDescriptor type. */ + public type: string; - /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ResourceDescriptor pattern. */ + public pattern: string[]; - /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; + /** ResourceDescriptor nameField. */ + public nameField: string; - /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - /** - * Verifies an UpdateSinkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ResourceDescriptor plural. */ + public plural: string; - /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateSinkRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; + /** ResourceDescriptor singular. */ + public singular: string; - /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @param message UpdateSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - /** - * Converts this UpdateSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a DeleteSinkRequest. */ - interface IDeleteSinkRequest { + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - /** DeleteSinkRequest sinkName */ - sinkName?: (string|null); - } + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - /** Represents a DeleteSinkRequest. */ - class DeleteSinkRequest implements IDeleteSinkRequest { + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - /** - * Constructs a new DeleteSinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IDeleteSinkRequest); + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** DeleteSinkRequest sinkName. */ - public sinkName: string; + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new DeleteSinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSinkRequest instance - */ - public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + namespace ResourceDescriptor { - /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } - /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + /** ResourceReference type */ + type?: (string|null); - /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + /** ResourceReference childType */ + childType?: (string|null); + } - /** - * Verifies a DeleteSinkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { - /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSinkRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); - /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @param message DeleteSinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ResourceReference type. */ + public type: string; - /** - * Converts this DeleteSinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ResourceReference childType. */ + public childType: string; - /** Properties of a LogExclusion. */ - interface ILogExclusion { + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - /** LogExclusion name */ - name?: (string|null); + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogExclusion description */ - description?: (string|null); + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogExclusion filter */ - filter?: (string|null); + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - /** LogExclusion disabled */ - disabled?: (boolean|null); + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - /** LogExclusion createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogExclusion updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - /** Represents a LogExclusion. */ - class LogExclusion implements ILogExclusion { + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new LogExclusion. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogExclusion); + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogExclusion name. */ - public name: string; + /** Properties of a Http. */ + interface IHttp { - /** LogExclusion description. */ - public description: string; + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** LogExclusion filter. */ - public filter: string; + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } - /** LogExclusion disabled. */ - public disabled: boolean; + /** Represents a Http. */ + class Http implements IHttp { - /** LogExclusion createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); - /** LogExclusion updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** - * Creates a new LogExclusion instance using the specified properties. - * @param [properties] Properties to set - * @returns LogExclusion instance - */ - public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; - /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; - /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a LogExclusion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - /** - * Verifies a LogExclusion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogExclusion - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @param message LogExclusion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; - /** - * Converts this LogExclusion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a ListExclusionsRequest. */ - interface IListExclusionsRequest { + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListExclusionsRequest parent */ - parent?: (string|null); + /** Properties of a HttpRule. */ + interface IHttpRule { - /** ListExclusionsRequest pageToken */ - pageToken?: (string|null); + /** HttpRule selector */ + selector?: (string|null); - /** ListExclusionsRequest pageSize */ - pageSize?: (number|null); - } + /** HttpRule get */ + get?: (string|null); - /** Represents a ListExclusionsRequest. */ - class ListExclusionsRequest implements IListExclusionsRequest { + /** HttpRule put */ + put?: (string|null); - /** - * Constructs a new ListExclusionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListExclusionsRequest); + /** HttpRule post */ + post?: (string|null); - /** ListExclusionsRequest parent. */ - public parent: string; + /** HttpRule delete */ + "delete"?: (string|null); - /** ListExclusionsRequest pageToken. */ - public pageToken: string; + /** HttpRule patch */ + patch?: (string|null); - /** ListExclusionsRequest pageSize. */ - public pageSize: number; + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** - * Creates a new ListExclusionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListExclusionsRequest instance - */ - public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; + /** HttpRule body */ + body?: (string|null); - /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule responseBody */ + responseBody?: (string|null); - /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } - /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { - /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); - /** - * Verifies a ListExclusionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** HttpRule selector. */ + public selector: string; - /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListExclusionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; + /** HttpRule get. */ + public get: string; - /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @param message ListExclusionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** HttpRule put. */ + public put: string; - /** - * Converts this ListExclusionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpRule post. */ + public post: string; - /** Properties of a ListExclusionsResponse. */ - interface IListExclusionsResponse { + /** HttpRule delete. */ + public delete: string; - /** ListExclusionsResponse exclusions */ - exclusions?: (google.logging.v2.ILogExclusion[]|null); + /** HttpRule patch. */ + public patch: string; - /** ListExclusionsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** Represents a ListExclusionsResponse. */ - class ListExclusionsResponse implements IListExclusionsResponse { + /** HttpRule body. */ + public body: string; - /** - * Constructs a new ListExclusionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListExclusionsResponse); + /** HttpRule responseBody. */ + public responseBody: string; - /** ListExclusionsResponse exclusions. */ - public exclusions: google.logging.v2.ILogExclusion[]; + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; - /** ListExclusionsResponse nextPageToken. */ - public nextPageToken: string; + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - /** - * Creates a new ListExclusionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListExclusionsResponse instance - */ - public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - /** - * Verifies a ListExclusionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListExclusionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. - * @param message ListExclusionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ListExclusionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a GetExclusionRequest. */ - interface IGetExclusionRequest { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** GetExclusionRequest name */ - name?: (string|null); - } + /** CustomHttpPattern kind */ + kind?: (string|null); - /** Represents a GetExclusionRequest. */ - class GetExclusionRequest implements IGetExclusionRequest { + /** CustomHttpPattern path */ + path?: (string|null); + } - /** - * Constructs a new GetExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IGetExclusionRequest); + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { - /** GetExclusionRequest name. */ - public name: string; + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); - /** - * Creates a new GetExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetExclusionRequest instance - */ - public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; + /** CustomHttpPattern kind. */ + public kind: string; - /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** CustomHttpPattern path. */ + public path: string; - /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a GetExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. - * @param message GetExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this GetExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - /** Properties of a CreateExclusionRequest. */ - interface ICreateExclusionRequest { + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** CreateExclusionRequest parent */ - parent?: (string|null); + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** CreateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); - } + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { - /** Represents a CreateExclusionRequest. */ - class CreateExclusionRequest implements ICreateExclusionRequest { + /** MonitoredResourceDescriptor name */ + name?: (string|null); - /** - * Constructs a new CreateExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ICreateExclusionRequest); + /** MonitoredResourceDescriptor type */ + type?: (string|null); - /** CreateExclusionRequest parent. */ - public parent: string; + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); - /** CreateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + /** MonitoredResourceDescriptor description */ + description?: (string|null); - /** - * Creates a new CreateExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateExclusionRequest instance - */ - public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); - /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MonitoredResourceDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + } - /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { - /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; + /** + * Constructs a new MonitoredResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceDescriptor); - /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; + /** MonitoredResourceDescriptor name. */ + public name: string; - /** - * Verifies a CreateExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MonitoredResourceDescriptor type. */ + public type: string; - /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; - /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @param message CreateExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MonitoredResourceDescriptor description. */ + public description: string; - /** - * Converts this CreateExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; - /** Properties of an UpdateExclusionRequest. */ - interface IUpdateExclusionRequest { + /** MonitoredResourceDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** UpdateExclusionRequest name */ - name?: (string|null); + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceDescriptor instance + */ + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; - /** UpdateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - /** UpdateExclusionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an UpdateExclusionRequest. */ - class UpdateExclusionRequest implements IUpdateExclusionRequest { + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; - /** - * Constructs a new UpdateExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IUpdateExclusionRequest); + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; - /** UpdateExclusionRequest name. */ - public name: string; + /** + * Verifies a MonitoredResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** UpdateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; - /** UpdateExclusionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new UpdateExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateExclusionRequest instance - */ - public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { - /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MonitoredResource type */ + type?: (string|null); - /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); + } - /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { - /** - * Verifies an UpdateExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new MonitoredResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResource); - /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; + /** MonitoredResource type. */ + public type: string; - /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. - * @param message UpdateExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; - /** - * Converts this UpdateExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new MonitoredResource instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResource instance + */ + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; - /** Properties of a DeleteExclusionRequest. */ - interface IDeleteExclusionRequest { + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** DeleteExclusionRequest name */ - name?: (string|null); - } + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; - /** Represents a DeleteExclusionRequest. */ - class DeleteExclusionRequest implements IDeleteExclusionRequest { + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; - /** - * Constructs a new DeleteExclusionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + /** + * Verifies a MonitoredResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** DeleteExclusionRequest name. */ - public name: string; + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResource + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; - /** - * Creates a new DeleteExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteExclusionRequest instance - */ - public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this MonitoredResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { - /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); - /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); + } - /** - * Verifies a DeleteExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { - /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteExclusionRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; + /** + * Constructs a new MonitoredResourceMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceMetadata); - /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. - * @param message DeleteExclusionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); - /** - * Converts this DeleteExclusionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; - /** Represents a LoggingServiceV2 */ - class LoggingServiceV2 extends $protobuf.rpc.Service { + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceMetadata instance + */ + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; - /** - * Constructs a new LoggingServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; + /** + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; - /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @returns Promise - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; + /** + * Verifies a MonitoredResourceMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @returns Promise - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; + /** + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; - /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse - */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; + /** + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @returns Promise - */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; + /** + * Converts this MonitoredResourceMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { - /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns Promise - */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; + /** LabelDescriptor key */ + key?: (string|null); - /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogsResponse - */ - public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); - /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @returns Promise - */ - public listLogs(request: google.logging.v2.IListLogsRequest): Promise; - } + /** LabelDescriptor description */ + description?: (string|null); + } - namespace LoggingServiceV2 { + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** + * Constructs a new LabelDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ILabelDescriptor); - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @param error Error, if any - * @param [response] WriteLogEntriesResponse - */ - type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; + /** LabelDescriptor key. */ + public key: string; - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @param error Error, if any - * @param [response] ListLogEntriesResponse - */ - type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; + /** LabelDescriptor valueType. */ + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @param error Error, if any - * @param [response] ListMonitoredResourceDescriptorsResponse - */ - type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; + /** LabelDescriptor description. */ + public description: string; - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @param error Error, if any - * @param [response] ListLogsResponse - */ - type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; - } + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelDescriptor instance + */ + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; - /** Properties of a DeleteLogRequest. */ - interface IDeleteLogRequest { + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - /** DeleteLogRequest logName */ - logName?: (string|null); - } + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a DeleteLogRequest. */ - class DeleteLogRequest implements IDeleteLogRequest { + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; - /** - * Constructs a new DeleteLogRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IDeleteLogRequest); + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; - /** DeleteLogRequest logName. */ - public logName: string; + /** + * Verifies a LabelDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new DeleteLogRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteLogRequest instance - */ - public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; - /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this LabelDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; + namespace LabelDescriptor { - /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } - /** - * Verifies a DeleteLogRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } - /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteLogRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; + /** Properties of a Distribution. */ + interface IDistribution { - /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @param message DeleteLogRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Distribution count */ + count?: (number|Long|string|null); - /** - * Converts this DeleteLogRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Distribution mean */ + mean?: (number|null); - /** Properties of a WriteLogEntriesRequest. */ - interface IWriteLogEntriesRequest { + /** Distribution sumOfSquaredDeviation */ + sumOfSquaredDeviation?: (number|null); - /** WriteLogEntriesRequest logName */ - logName?: (string|null); + /** Distribution range */ + range?: (google.api.Distribution.IRange|null); - /** WriteLogEntriesRequest resource */ - resource?: (google.api.IMonitoredResource|null); + /** Distribution bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); - /** WriteLogEntriesRequest labels */ - labels?: ({ [k: string]: string }|null); + /** Distribution bucketCounts */ + bucketCounts?: ((number|Long|string)[]|null); + + /** Distribution exemplars */ + exemplars?: (google.api.Distribution.IExemplar[]|null); + } + + /** Represents a Distribution. */ + class Distribution implements IDistribution { - /** WriteLogEntriesRequest entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** + * Constructs a new Distribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDistribution); - /** WriteLogEntriesRequest partialSuccess */ - partialSuccess?: (boolean|null); + /** Distribution count. */ + public count: (number|Long|string); - /** WriteLogEntriesRequest dryRun */ - dryRun?: (boolean|null); - } + /** Distribution mean. */ + public mean: number; - /** Represents a WriteLogEntriesRequest. */ - class WriteLogEntriesRequest implements IWriteLogEntriesRequest { + /** Distribution sumOfSquaredDeviation. */ + public sumOfSquaredDeviation: number; - /** - * Constructs a new WriteLogEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); + /** Distribution range. */ + public range?: (google.api.Distribution.IRange|null); - /** WriteLogEntriesRequest logName. */ - public logName: string; + /** Distribution bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); - /** WriteLogEntriesRequest resource. */ - public resource?: (google.api.IMonitoredResource|null); + /** Distribution bucketCounts. */ + public bucketCounts: (number|Long|string)[]; - /** WriteLogEntriesRequest labels. */ - public labels: { [k: string]: string }; + /** Distribution exemplars. */ + public exemplars: google.api.Distribution.IExemplar[]; - /** WriteLogEntriesRequest entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** + * Creates a new Distribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Distribution instance + */ + public static create(properties?: google.api.IDistribution): google.api.Distribution; - /** WriteLogEntriesRequest partialSuccess. */ - public partialSuccess: boolean; + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - /** WriteLogEntriesRequest dryRun. */ - public dryRun: boolean; + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WriteLogEntriesRequest instance - */ - public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; + /** + * Decodes a Distribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; - /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; - /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a Distribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Distribution + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution; - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a WriteLogEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this Distribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WriteLogEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; + namespace Distribution { - /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. - * @param message WriteLogEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a Range. */ + interface IRange { - /** - * Converts this WriteLogEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Range min */ + min?: (number|null); - /** Properties of a WriteLogEntriesResponse. */ - interface IWriteLogEntriesResponse { + /** Range max */ + max?: (number|null); } - /** Represents a WriteLogEntriesResponse. */ - class WriteLogEntriesResponse implements IWriteLogEntriesResponse { + /** Represents a Range. */ + class Range implements IRange { /** - * Constructs a new WriteLogEntriesResponse. + * Constructs a new Range. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); + constructor(properties?: google.api.Distribution.IRange); + + /** Range min. */ + public min: number; + + /** Range max. */ + public max: number; /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. + * Creates a new Range instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesResponse instance + * @returns Range instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; + public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * Decodes a Range message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesResponse + * @returns Range * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a Range message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesResponse + * @returns Range * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; /** - * Verifies a WriteLogEntriesResponse message. + * Verifies a Range message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Range message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesResponse + * @returns Range */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. - * @param message WriteLogEntriesResponse + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesResponse to JSON. + * Converts this Range to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WriteLogEntriesPartialErrors. */ - interface IWriteLogEntriesPartialErrors { + /** Properties of a BucketOptions. */ + interface IBucketOptions { - /** WriteLogEntriesPartialErrors logEntryErrors */ - logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); } - /** Represents a WriteLogEntriesPartialErrors. */ - class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { /** - * Constructs a new WriteLogEntriesPartialErrors. + * Constructs a new BucketOptions. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); + constructor(properties?: google.api.Distribution.IBucketOptions); - /** WriteLogEntriesPartialErrors logEntryErrors. */ - public logEntryErrors: { [k: string]: google.rpc.IStatus }; + /** BucketOptions linearBuckets. */ + public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets. */ + public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets. */ + public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + + /** BucketOptions options. */ + public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * Creates a new BucketOptions instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesPartialErrors instance + * @returns BucketOptions instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; + public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * Decodes a BucketOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesPartialErrors + * @returns BucketOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesPartialErrors + * @returns BucketOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions; /** - * Verifies a WriteLogEntriesPartialErrors message. + * Verifies a BucketOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesPartialErrors + * @returns BucketOptions */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. - * @param message WriteLogEntriesPartialErrors + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @param message BucketOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesPartialErrors to JSON. + * Converts this BucketOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogEntriesRequest. */ - interface IListLogEntriesRequest { + namespace BucketOptions { - /** ListLogEntriesRequest projectIds */ - projectIds?: (string[]|null); + /** Properties of a Linear. */ + interface ILinear { - /** ListLogEntriesRequest resourceNames */ - resourceNames?: (string[]|null); + /** Linear numFiniteBuckets */ + numFiniteBuckets?: (number|null); - /** ListLogEntriesRequest filter */ - filter?: (string|null); + /** Linear width */ + width?: (number|null); - /** ListLogEntriesRequest orderBy */ - orderBy?: (string|null); + /** Linear offset */ + offset?: (number|null); + } - /** ListLogEntriesRequest pageSize */ - pageSize?: (number|null); + /** Represents a Linear. */ + class Linear implements ILinear { - /** ListLogEntriesRequest pageToken */ - pageToken?: (string|null); - } + /** + * Constructs a new Linear. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.ILinear); - /** Represents a ListLogEntriesRequest. */ - class ListLogEntriesRequest implements IListLogEntriesRequest { + /** Linear numFiniteBuckets. */ + public numFiniteBuckets: number; - /** - * Constructs a new ListLogEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogEntriesRequest); + /** Linear width. */ + public width: number; - /** ListLogEntriesRequest projectIds. */ - public projectIds: string[]; + /** Linear offset. */ + public offset: number; - /** ListLogEntriesRequest resourceNames. */ - public resourceNames: string[]; + /** + * Creates a new Linear instance using the specified properties. + * @param [properties] Properties to set + * @returns Linear instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; - /** ListLogEntriesRequest filter. */ - public filter: string; + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListLogEntriesRequest orderBy. */ - public orderBy: string; + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListLogEntriesRequest pageSize. */ - public pageSize: number; + /** + * Decodes a Linear message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Linear; - /** ListLogEntriesRequest pageToken. */ - public pageToken: string; + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Linear; - /** - * Creates a new ListLogEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogEntriesRequest instance - */ - public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; + /** + * Verifies a Linear message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Linear + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; - /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @param message Linear + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; + /** + * Converts this Linear to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Exponential. */ + interface IExponential { + + /** Exponential numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Exponential growthFactor */ + growthFactor?: (number|null); + + /** Exponential scale */ + scale?: (number|null); + } + + /** Represents an Exponential. */ + class Exponential implements IExponential { + + /** + * Constructs a new Exponential. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + + /** Exponential numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Exponential growthFactor. */ + public growthFactor: number; + + /** Exponential scale. */ + public scale: number; + + /** + * Creates a new Exponential instance using the specified properties. + * @param [properties] Properties to set + * @returns Exponential instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ListLogEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an Exponential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Exponential; - /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Exponential; - /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. - * @param message ListLogEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an Exponential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ListLogEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exponential + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; - /** Properties of a ListLogEntriesResponse. */ - interface IListLogEntriesResponse { + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @param message Exponential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListLogEntriesResponse entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** + * Converts this Exponential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListLogEntriesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Properties of an Explicit. */ + interface IExplicit { - /** Represents a ListLogEntriesResponse. */ - class ListLogEntriesResponse implements IListLogEntriesResponse { + /** Explicit bounds */ + bounds?: (number[]|null); + } - /** - * Constructs a new ListLogEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogEntriesResponse); + /** Represents an Explicit. */ + class Explicit implements IExplicit { - /** ListLogEntriesResponse entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** + * Constructs a new Explicit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); - /** ListLogEntriesResponse nextPageToken. */ - public nextPageToken: string; + /** Explicit bounds. */ + public bounds: number[]; - /** - * Creates a new ListLogEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogEntriesResponse instance - */ - public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; + /** + * Creates a new Explicit instance using the specified properties. + * @param [properties] Properties to set + * @returns Explicit instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; - /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; + /** + * Decodes an Explicit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Explicit; - /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Explicit; - /** - * Verifies a ListLogEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies an Explicit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Explicit + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; - /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. - * @param message ListLogEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @param message Explicit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ListLogEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Explicit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Properties of a ListMonitoredResourceDescriptorsRequest. */ - interface IListMonitoredResourceDescriptorsRequest { + /** Properties of an Exemplar. */ + interface IExemplar { - /** ListMonitoredResourceDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** Exemplar value */ + value?: (number|null); - /** ListMonitoredResourceDescriptorsRequest pageToken */ - pageToken?: (string|null); - } + /** Exemplar timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); - /** Represents a ListMonitoredResourceDescriptorsRequest. */ - class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + /** Exemplar attachments */ + attachments?: (google.protobuf.IAny[]|null); + } + + /** Represents an Exemplar. */ + class Exemplar implements IExemplar { /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new Exemplar. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); + constructor(properties?: google.api.Distribution.IExemplar); - /** ListMonitoredResourceDescriptorsRequest pageSize. */ - public pageSize: number; + /** Exemplar value. */ + public value: number; - /** ListMonitoredResourceDescriptorsRequest pageToken. */ - public pageToken: string; + /** Exemplar timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** Exemplar attachments. */ + public attachments: google.protobuf.IAny[]; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new Exemplar instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsRequest instance + * @returns Exemplar instance */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes an Exemplar message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsRequest + * @returns Exemplar * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Exemplar; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes an Exemplar message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsRequest + * @returns Exemplar * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Exemplar; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies an Exemplar message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsRequest + * @returns Exemplar */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsRequest + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @param message Exemplar * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this Exemplar to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a ListMonitoredResourceDescriptorsResponse. */ - interface IListMonitoredResourceDescriptorsResponse { + /** Properties of a MetricDescriptor. */ + interface IMetricDescriptor { - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ - resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + /** MetricDescriptor name */ + name?: (string|null); - /** ListMonitoredResourceDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); + /** MetricDescriptor type */ + type?: (string|null); + + /** MetricDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MetricDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + + /** MetricDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + + /** MetricDescriptor unit */ + unit?: (string|null); + + /** MetricDescriptor description */ + description?: (string|null); + + /** MetricDescriptor displayName */ + displayName?: (string|null); + + /** MetricDescriptor metadata */ + metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + } + + /** Represents a MetricDescriptor. */ + class MetricDescriptor implements IMetricDescriptor { + + /** + * Constructs a new MetricDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetricDescriptor); + + /** MetricDescriptor name. */ + public name: string; + + /** MetricDescriptor type. */ + public type: string; + + /** MetricDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MetricDescriptor metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + + /** MetricDescriptor valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** MetricDescriptor unit. */ + public unit: string; + + /** MetricDescriptor description. */ + public description: string; + + /** MetricDescriptor displayName. */ + public displayName: string; + + /** MetricDescriptor metadata. */ + public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptor instance + */ + public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; + + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; + + /** + * Verifies a MetricDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; + + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @param message MetricDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MetricDescriptor { + + /** Properties of a MetricDescriptorMetadata. */ + interface IMetricDescriptorMetadata { + + /** MetricDescriptorMetadata launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptorMetadata samplePeriod */ + samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay */ + ingestDelay?: (google.protobuf.IDuration|null); } - /** Represents a ListMonitoredResourceDescriptorsResponse. */ - class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + /** Represents a MetricDescriptorMetadata. */ + class MetricDescriptorMetadata implements IMetricDescriptorMetadata { /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new MetricDescriptorMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); + constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ - public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + /** MetricDescriptorMetadata launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** MetricDescriptorMetadata samplePeriod. */ + public samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay. */ + public ingestDelay?: (google.protobuf.IDuration|null); /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * Creates a new MetricDescriptorMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsResponse instance + * @returns MetricDescriptorMetadata instance */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsResponse + * @returns MetricDescriptorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsResponse + * @returns MetricDescriptorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a MetricDescriptorMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsResponse + * @returns MetricDescriptorMetadata */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsResponse + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @param message MetricDescriptorMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this MetricDescriptorMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogsRequest. */ - interface IListLogsRequest { + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric type */ + type?: (string|null); + + /** Metric labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetric); + + /** Metric type. */ + public type: string; + + /** Metric labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.api.IMetric): google.api.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.api.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** ListLogsRequest parent */ - parent?: (string|null); + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** ListLogsRequest pageSize */ - pageSize?: (number|null); + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** ListLogsRequest pageToken */ - pageToken?: (string|null); - } + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** Represents a ListLogsRequest. */ - class ListLogsRequest implements IListLogsRequest { + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** - * Constructs a new ListLogsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogsRequest); + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** ListLogsRequest parent. */ - public parent: string; + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); - /** ListLogsRequest pageSize. */ - public pageSize: number; + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** ListLogsRequest pageToken. */ - public pageToken: string; + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } - /** - * Creates a new ListLogsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogsRequest instance - */ - public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { - /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto name. */ + public name: string; - /** - * Decodes a ListLogsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; + /** FileDescriptorProto package. */ + public package: string; - /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** - * Verifies a ListLogsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogsRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. - * @param message ListLogsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** - * Converts this ListLogsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** Properties of a ListLogsResponse. */ - interface IListLogsResponse { + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** ListLogsResponse logNames */ - logNames?: (string[]|null); + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** ListLogsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** Represents a ListLogsResponse. */ - class ListLogsResponse implements IListLogsResponse { + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Constructs a new ListLogsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogsResponse); + /** FileDescriptorProto syntax. */ + public syntax: string; - /** ListLogsResponse logNames. */ - public logNames: string[]; + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - /** ListLogsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ListLogsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogsResponse instance - */ - public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - /** - * Decodes a ListLogsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - /** - * Verifies a ListLogsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. - * @param message ListLogsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DescriptorProto name */ + name?: (string|null); - /** - * Converts this ListLogsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** Properties of a LogEntry. */ - interface ILogEntry { + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** LogEntry logName */ - logName?: (string|null); + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** LogEntry resource */ - resource?: (google.api.IMonitoredResource|null); + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** LogEntry protoPayload */ - protoPayload?: (google.protobuf.IAny|null); + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** LogEntry textPayload */ - textPayload?: (string|null); + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** LogEntry jsonPayload */ - jsonPayload?: (google.protobuf.IStruct|null); + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** LogEntry timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** LogEntry receiveTimestamp */ - receiveTimestamp?: (google.protobuf.ITimestamp|null); + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** LogEntry severity */ - severity?: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity|null); + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { - /** LogEntry insertId */ - insertId?: (string|null); + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); - /** LogEntry httpRequest */ - httpRequest?: (google.logging.type.IHttpRequest|null); + /** DescriptorProto name. */ + public name: string; - /** LogEntry labels */ - labels?: ({ [k: string]: string }|null); + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** LogEntry metadata */ - metadata?: (google.api.IMonitoredResourceMetadata|null); + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** LogEntry operation */ - operation?: (google.logging.v2.ILogEntryOperation|null); + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** LogEntry trace */ - trace?: (string|null); + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** LogEntry spanId */ - spanId?: (string|null); + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** LogEntry traceSampled */ - traceSampled?: (boolean|null); + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** LogEntry sourceLocation */ - sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); - } + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** Represents a LogEntry. */ - class LogEntry implements ILogEntry { + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** - * Constructs a new LogEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogEntry); + /** DescriptorProto reservedName. */ + public reservedName: string[]; - /** LogEntry logName. */ - public logName: string; + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - /** LogEntry resource. */ - public resource?: (google.api.IMonitoredResource|null); + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry protoPayload. */ - public protoPayload?: (google.protobuf.IAny|null); + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry textPayload. */ - public textPayload: string; + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - /** LogEntry jsonPayload. */ - public jsonPayload?: (google.protobuf.IStruct|null); + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - /** LogEntry timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogEntry receiveTimestamp. */ - public receiveTimestamp?: (google.protobuf.ITimestamp|null); + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - /** LogEntry severity. */ - public severity: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity); + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogEntry insertId. */ - public insertId: string; + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogEntry httpRequest. */ - public httpRequest?: (google.logging.type.IHttpRequest|null); + namespace DescriptorProto { - /** LogEntry labels. */ - public labels: { [k: string]: string }; + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** LogEntry metadata. */ - public metadata?: (google.api.IMonitoredResourceMetadata|null); + /** ExtensionRange start */ + start?: (number|null); - /** LogEntry operation. */ - public operation?: (google.logging.v2.ILogEntryOperation|null); + /** ExtensionRange end */ + end?: (number|null); - /** LogEntry trace. */ - public trace: string; + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** LogEntry spanId. */ - public spanId: string; + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** LogEntry traceSampled. */ - public traceSampled: boolean; + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** LogEntry sourceLocation. */ - public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + /** ExtensionRange start. */ + public start: number; - /** LogEntry payload. */ - public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new ExtensionRange instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntry instance + * @returns ExtensionRange instance */ - public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes an ExtensionRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntry + * @returns ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntry + * @returns ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; /** - * Verifies a LogEntry message. + * Verifies an ExtensionRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntry + * @returns ExtensionRange */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @param message LogEntry + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntry to JSON. + * Converts this ExtensionRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntryOperation. */ - interface ILogEntryOperation { - - /** LogEntryOperation id */ - id?: (string|null); - - /** LogEntryOperation producer */ - producer?: (string|null); + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** LogEntryOperation first */ - first?: (boolean|null); + /** ReservedRange start */ + start?: (number|null); - /** LogEntryOperation last */ - last?: (boolean|null); + /** ReservedRange end */ + end?: (number|null); } - /** Represents a LogEntryOperation. */ - class LogEntryOperation implements ILogEntryOperation { + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { /** - * Constructs a new LogEntryOperation. + * Constructs a new ReservedRange. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntryOperation); - - /** LogEntryOperation id. */ - public id: string; - - /** LogEntryOperation producer. */ - public producer: string; + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** LogEntryOperation first. */ - public first: boolean; + /** ReservedRange start. */ + public start: number; - /** LogEntryOperation last. */ - public last: boolean; + /** ReservedRange end. */ + public end: number; /** - * Creates a new LogEntryOperation instance using the specified properties. + * Creates a new ReservedRange instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntryOperation instance + * @returns ReservedRange instance */ - public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntryOperation message from the specified reader or buffer. + * Decodes a ReservedRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntryOperation + * @returns ReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntryOperation + * @returns ReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; /** - * Verifies a LogEntryOperation message. + * Verifies a ReservedRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntryOperation + * @returns ReservedRange */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. - * @param message LogEntryOperation + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntryOperation to JSON. + * Converts this ReservedRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - /** Properties of a LogEntrySourceLocation. */ - interface ILogEntrySourceLocation { + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - /** LogEntrySourceLocation file */ - file?: (string|null); + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** LogEntrySourceLocation line */ - line?: (number|Long|string|null); + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** LogEntrySourceLocation function */ - "function"?: (string|null); - } + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** Represents a LogEntrySourceLocation. */ - class LogEntrySourceLocation implements ILogEntrySourceLocation { + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; - /** - * Constructs a new LogEntrySourceLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogEntrySourceLocation); + /** FieldDescriptorProto jsonName. */ + public jsonName: string; - /** LogEntrySourceLocation file. */ - public file: string; + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); - /** LogEntrySourceLocation line. */ - public line: (number|Long|string); + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - /** LogEntrySourceLocation function. */ - public function: string; + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new LogEntrySourceLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns LogEntrySourceLocation instance - */ - public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - /** - * Verifies a LogEntrySourceLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogEntrySourceLocation - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. - * @param message LogEntrySourceLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace FieldDescriptorProto { - /** - * Converts this LogEntrySourceLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 } - /** Represents a MetricsServiceV2 */ - class MetricsServiceV2 extends $protobuf.rpc.Service { + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } - /** - * Constructs a new MetricsServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** - * Creates new MetricsServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetricsServiceV2; + /** OneofDescriptorProto name */ + name?: (string|null); - /** - * Calls ListLogMetrics. - * @param request ListLogMetricsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogMetricsResponse - */ - public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest, callback: google.logging.v2.MetricsServiceV2.ListLogMetricsCallback): void; + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } - /** - * Calls ListLogMetrics. - * @param request ListLogMetricsRequest message or plain object - * @returns Promise - */ - public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest): Promise; + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { - /** - * Calls GetLogMetric. - * @param request GetLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric - */ - public getLogMetric(request: google.logging.v2.IGetLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.GetLogMetricCallback): void; + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls GetLogMetric. - * @param request GetLogMetricRequest message or plain object - * @returns Promise - */ - public getLogMetric(request: google.logging.v2.IGetLogMetricRequest): Promise; + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls CreateLogMetric. - * @param request CreateLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric - */ - public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.CreateLogMetricCallback): void; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - /** - * Calls CreateLogMetric. - * @param request CreateLogMetricRequest message or plain object - * @returns Promise - */ - public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest): Promise; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - /** - * Calls UpdateLogMetric. - * @param request UpdateLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric - */ - public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback): void; + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Calls UpdateLogMetric. - * @param request UpdateLogMetricRequest message or plain object - * @returns Promise - */ - public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest): Promise; + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - /** - * Calls DeleteLogMetric. - * @param request DeleteLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback): void; + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls DeleteLogMetric. - * @param request DeleteLogMetricRequest message or plain object - * @returns Promise - */ - public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest): Promise; - } + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - namespace MetricsServiceV2 { + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. - * @param error Error, if any - * @param [response] ListLogMetricsResponse - */ - type ListLogMetricsCallback = (error: (Error|null), response?: google.logging.v2.ListLogMetricsResponse) => void; + /** EnumDescriptorProto name */ + name?: (string|null); - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. - * @param error Error, if any - * @param [response] LogMetric - */ - type GetLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. - * @param error Error, if any - * @param [response] LogMetric - */ - type CreateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. - * @param error Error, if any - * @param [response] LogMetric - */ - type UpdateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteLogMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** Properties of a LogMetric. */ - interface ILogMetric { + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { - /** LogMetric name */ - name?: (string|null); + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** LogMetric description */ - description?: (string|null); + /** EnumDescriptorProto name. */ + public name: string; - /** LogMetric filter */ - filter?: (string|null); + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** LogMetric metricDescriptor */ - metricDescriptor?: (google.api.IMetricDescriptor|null); + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); - /** LogMetric valueExtractor */ - valueExtractor?: (string|null); + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - /** LogMetric labelExtractors */ - labelExtractors?: ({ [k: string]: string }|null); + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; - /** LogMetric bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - /** LogMetric createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogMetric updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogMetric version */ - version?: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion|null); - } + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - /** Represents a LogMetric. */ - class LogMetric implements ILogMetric { + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - /** - * Constructs a new LogMetric. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogMetric); + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogMetric name. */ - public name: string; + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - /** LogMetric description. */ - public description: string; + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogMetric filter. */ - public filter: string; + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { - /** LogMetric metricDescriptor. */ - public metricDescriptor?: (google.api.IMetricDescriptor|null); + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** LogMetric valueExtractor. */ - public valueExtractor: string; + /** EnumReservedRange start */ + start?: (number|null); - /** LogMetric labelExtractors. */ - public labelExtractors: { [k: string]: string }; + /** EnumReservedRange end */ + end?: (number|null); + } - /** LogMetric bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { - /** LogMetric createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** LogMetric updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** EnumReservedRange start. */ + public start: number; - /** LogMetric version. */ - public version: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion); + /** EnumReservedRange end. */ + public end: number; /** - * Creates a new LogMetric instance using the specified properties. + * Creates a new EnumReservedRange instance using the specified properties. * @param [properties] Properties to set - * @returns LogMetric instance + * @returns EnumReservedRange instance */ - public static create(properties?: google.logging.v2.ILogMetric): google.logging.v2.LogMetric; + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. - * @param message LogMetric message or plain object to encode + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. - * @param message LogMetric message or plain object to encode + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogMetric message from the specified reader or buffer. + * Decodes an EnumReservedRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogMetric + * @returns EnumReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogMetric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogMetric + * @returns EnumReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogMetric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Verifies a LogMetric message. + * Verifies an EnumReservedRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogMetric + * @returns EnumReservedRange */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogMetric; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Creates a plain object from a LogMetric message. Also converts values to other types if specified. - * @param message LogMetric + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogMetric to JSON. + * Converts this EnumReservedRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - namespace LogMetric { + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** ApiVersion enum. */ - enum ApiVersion { - V2 = 0, - V1 = 1 - } - } + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** Properties of a ListLogMetricsRequest. */ - interface IListLogMetricsRequest { + /** EnumValueDescriptorProto number */ + number?: (number|null); - /** ListLogMetricsRequest parent */ - parent?: (string|null); + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } - /** ListLogMetricsRequest pageToken */ - pageToken?: (string|null); + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - /** ListLogMetricsRequest pageSize */ - pageSize?: (number|null); - } + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** Represents a ListLogMetricsRequest. */ - class ListLogMetricsRequest implements IListLogMetricsRequest { + /** EnumValueDescriptorProto name. */ + public name: string; - /** - * Constructs a new ListLogMetricsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogMetricsRequest); + /** EnumValueDescriptorProto number. */ + public number: number; - /** ListLogMetricsRequest parent. */ - public parent: string; + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); - /** ListLogMetricsRequest pageToken. */ - public pageToken: string; + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - /** ListLogMetricsRequest pageSize. */ - public pageSize: number; + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ListLogMetricsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogMetricsRequest instance - */ - public static create(properties?: google.logging.v2.IListLogMetricsRequest): google.logging.v2.ListLogMetricsRequest; + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. - * @param message ListLogMetricsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - /** - * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. - * @param message ListLogMetricsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogMetricsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsRequest; + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogMetricsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsRequest; + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - /** - * Verifies a ListLogMetricsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogMetricsRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsRequest; + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { - /** - * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. - * @param message ListLogMetricsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** - * Converts this ListLogMetricsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ServiceDescriptorProto name. */ + public name: string; - /** Properties of a ListLogMetricsResponse. */ - interface IListLogMetricsResponse { + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** ListLogMetricsResponse metrics */ - metrics?: (google.logging.v2.ILogMetric[]|null); + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); - /** ListLogMetricsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - /** Represents a ListLogMetricsResponse. */ - class ListLogMetricsResponse implements IListLogMetricsResponse { + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ListLogMetricsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogMetricsResponse); + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListLogMetricsResponse metrics. */ - public metrics: google.logging.v2.ILogMetric[]; + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - /** ListLogMetricsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - /** - * Creates a new ListLogMetricsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogMetricsResponse instance - */ - public static create(properties?: google.logging.v2.IListLogMetricsResponse): google.logging.v2.ListLogMetricsResponse; + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. - * @param message ListLogMetricsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - /** - * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. - * @param message ListLogMetricsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogMetricsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsResponse; + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogMetricsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsResponse; + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** - * Verifies a ListLogMetricsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MethodDescriptorProto name */ + name?: (string|null); - /** - * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogMetricsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsResponse; + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** - * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. - * @param message ListLogMetricsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** - * Converts this ListLogMetricsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** Properties of a GetLogMetricRequest. */ - interface IGetLogMetricRequest { + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** GetLogMetricRequest metricName */ - metricName?: (string|null); - } + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } - /** Represents a GetLogMetricRequest. */ - class GetLogMetricRequest implements IGetLogMetricRequest { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { - /** - * Constructs a new GetLogMetricRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IGetLogMetricRequest); + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** GetLogMetricRequest metricName. */ - public metricName: string; + /** MethodDescriptorProto name. */ + public name: string; - /** - * Creates a new GetLogMetricRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetLogMetricRequest instance - */ - public static create(properties?: google.logging.v2.IGetLogMetricRequest): google.logging.v2.GetLogMetricRequest; + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** - * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. - * @param message GetLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** - * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. - * @param message GetLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetLogMetricRequest; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetLogMetricRequest; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - /** - * Verifies a GetLogMetricRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetLogMetricRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetLogMetricRequest; + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. - * @param message GetLogMetricRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.GetLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - /** - * Converts this GetLogMetricRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - /** Properties of a CreateLogMetricRequest. */ - interface ICreateLogMetricRequest { + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** CreateLogMetricRequest parent */ - parent?: (string|null); + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - /** CreateLogMetricRequest metric */ - metric?: (google.logging.v2.ILogMetric|null); - } + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a CreateLogMetricRequest. */ - class CreateLogMetricRequest implements ICreateLogMetricRequest { + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new CreateLogMetricRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ICreateLogMetricRequest); + /** Properties of a FileOptions. */ + interface IFileOptions { - /** CreateLogMetricRequest parent. */ - public parent: string; + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** CreateLogMetricRequest metric. */ - public metric?: (google.logging.v2.ILogMetric|null); + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** - * Creates a new CreateLogMetricRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateLogMetricRequest instance - */ - public static create(properties?: google.logging.v2.ICreateLogMetricRequest): google.logging.v2.CreateLogMetricRequest; + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** - * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @param message CreateLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** - * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @param message CreateLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateLogMetricRequest; + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateLogMetricRequest; + /** FileOptions goPackage */ + goPackage?: (string|null); - /** - * Verifies a CreateLogMetricRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** - * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateLogMetricRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateLogMetricRequest; + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** - * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. - * @param message CreateLogMetricRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.CreateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** - * Converts this CreateLogMetricRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); - /** Properties of an UpdateLogMetricRequest. */ - interface IUpdateLogMetricRequest { + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** UpdateLogMetricRequest metricName */ - metricName?: (string|null); + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** UpdateLogMetricRequest metric */ - metric?: (google.logging.v2.ILogMetric|null); - } + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** Represents an UpdateLogMetricRequest. */ - class UpdateLogMetricRequest implements IUpdateLogMetricRequest { + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** - * Constructs a new UpdateLogMetricRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IUpdateLogMetricRequest); + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** UpdateLogMetricRequest metricName. */ - public metricName: string; + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** UpdateLogMetricRequest metric. */ - public metric?: (google.logging.v2.ILogMetric|null); + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - /** - * Creates a new UpdateLogMetricRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateLogMetricRequest instance - */ - public static create(properties?: google.logging.v2.IUpdateLogMetricRequest): google.logging.v2.UpdateLogMetricRequest; + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** - * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @param message UpdateLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); - /** - * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @param message UpdateLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateLogMetricRequest; + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateLogMetricRequest; + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - /** - * Verifies an UpdateLogMetricRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** - * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateLogMetricRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateLogMetricRequest; + /** FileOptions javaPackage. */ + public javaPackage: string; - /** - * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. - * @param message UpdateLogMetricRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.UpdateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** - * Converts this UpdateLogMetricRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** Properties of a DeleteLogMetricRequest. */ - interface IDeleteLogMetricRequest { + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** DeleteLogMetricRequest metricName */ - metricName?: (string|null); - } + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** Represents a DeleteLogMetricRequest. */ - class DeleteLogMetricRequest implements IDeleteLogMetricRequest { + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - /** - * Constructs a new DeleteLogMetricRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IDeleteLogMetricRequest); + /** FileOptions goPackage. */ + public goPackage: string; - /** DeleteLogMetricRequest metricName. */ - public metricName: string; + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** - * Creates a new DeleteLogMetricRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteLogMetricRequest instance - */ - public static create(properties?: google.logging.v2.IDeleteLogMetricRequest): google.logging.v2.DeleteLogMetricRequest; + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** - * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. - * @param message DeleteLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. - * @param message DeleteLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogMetricRequest; + /** FileOptions deprecated. */ + public deprecated: boolean; - /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogMetricRequest; + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** - * Verifies a DeleteLogMetricRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** - * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteLogMetricRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogMetricRequest; + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** - * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. - * @param message DeleteLogMetricRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.DeleteLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** - * Converts this DeleteLogMetricRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** Namespace type. */ - namespace type { + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** Properties of a HttpRequest. */ - interface IHttpRequest { + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** HttpRequest requestMethod */ - requestMethod?: (string|null); + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** HttpRequest requestUrl */ - requestUrl?: (string|null); + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** HttpRequest requestSize */ - requestSize?: (number|Long|string|null); + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - /** HttpRequest status */ - status?: (number|null); + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRequest responseSize */ - responseSize?: (number|Long|string|null); + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRequest userAgent */ - userAgent?: (string|null); + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - /** HttpRequest remoteIp */ - remoteIp?: (string|null); + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - /** HttpRequest serverIp */ - serverIp?: (string|null); + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** HttpRequest referer */ - referer?: (string|null); + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - /** HttpRequest latency */ - latency?: (google.protobuf.IDuration|null); + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HttpRequest cacheLookup */ - cacheLookup?: (boolean|null); + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** HttpRequest cacheHit */ - cacheHit?: (boolean|null); + namespace FileOptions { - /** HttpRequest cacheValidatedWithOriginServer */ - cacheValidatedWithOriginServer?: (boolean|null); + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } - /** HttpRequest cacheFillBytes */ - cacheFillBytes?: (number|Long|string|null); + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** HttpRequest protocol */ - protocol?: (string|null); - } + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** Represents a HttpRequest. */ - class HttpRequest implements IHttpRequest { + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** - * Constructs a new HttpRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.type.IHttpRequest); + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** HttpRequest requestMethod. */ - public requestMethod: string; + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** HttpRequest requestUrl. */ - public requestUrl: string; + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** HttpRequest requestSize. */ - public requestSize: (number|Long|string); + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } - /** HttpRequest status. */ - public status: number; + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { - /** HttpRequest responseSize. */ - public responseSize: (number|Long|string); + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); - /** HttpRequest userAgent. */ - public userAgent: string; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** HttpRequest remoteIp. */ - public remoteIp: string; + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; - /** HttpRequest serverIp. */ - public serverIp: string; + /** MessageOptions deprecated. */ + public deprecated: boolean; - /** HttpRequest referer. */ - public referer: string; + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** HttpRequest latency. */ - public latency?: (google.protobuf.IDuration|null); + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** HttpRequest cacheLookup. */ - public cacheLookup: boolean; + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - /** HttpRequest cacheHit. */ - public cacheHit: boolean; + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRequest cacheValidatedWithOriginServer. */ - public cacheValidatedWithOriginServer: boolean; + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRequest cacheFillBytes. */ - public cacheFillBytes: (number|Long|string); + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - /** HttpRequest protocol. */ - public protocol: string; + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - /** - * Creates a new HttpRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRequest instance - */ - public static create(properties?: google.logging.type.IHttpRequest): google.logging.type.HttpRequest; + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. - * @param message HttpRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - /** - * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. - * @param message HttpRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a HttpRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.type.HttpRequest; + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a HttpRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.type.HttpRequest; + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** - * Verifies a HttpRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** - * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.type.HttpRequest; + /** FieldOptions packed */ + packed?: (boolean|null); - /** - * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. - * @param message HttpRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.type.HttpRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** - * Converts this HttpRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** LogSeverity enum. */ - enum LogSeverity { - DEFAULT = 0, - DEBUG = 100, - INFO = 200, - NOTICE = 300, - WARNING = 400, - ERROR = 500, - CRITICAL = 600, - ALERT = 700, - EMERGENCY = 800 - } - } - } + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** Namespace api. */ - namespace api { + /** FieldOptions weak */ + weak?: (boolean|null); - /** Properties of a Http. */ - interface IHttp { + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { /** - * Constructs a new Http. + * Constructs a new FieldOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new Http instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns FieldOptions instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; /** - * Verifies a Http message. + * Verifies a FieldOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns FieldOptions */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this FieldOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); + namespace FieldOptions { - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } - /** HttpRule body */ - body?: (string|null); + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } - /** HttpRule responseBody */ - responseBody?: (string|null); + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { /** - * Constructs a new HttpRule. + * Constructs a new OneofOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get: string; - - /** HttpRule put. */ - public put: string; - - /** HttpRule post. */ - public post: string; - - /** HttpRule delete. */ - public delete: string; - - /** HttpRule patch. */ - public patch: string; - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + constructor(properties?: google.protobuf.IOneofOptions); - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns OneofOptions instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; /** - * Verifies a HttpRule message. + * Verifies an OneofOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns OneofOptions */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this OneofOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new CustomHttpPattern. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.protobuf.IEnumOptions); - /** CustomHttpPattern kind. */ - public kind: string; + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** CustomHttpPattern path. */ - public path: string; + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns EnumOptions instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; /** - * Verifies a CustomHttpPattern message. + * Verifies an EnumOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResourceDescriptor. */ - interface IMonitoredResourceDescriptor { - - /** MonitoredResourceDescriptor name */ - name?: (string|null); - - /** MonitoredResourceDescriptor type */ - type?: (string|null); - - /** MonitoredResourceDescriptor displayName */ - displayName?: (string|null); - - /** MonitoredResourceDescriptor description */ - description?: (string|null); + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** MonitoredResourceDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** MonitoredResourceDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents a MonitoredResourceDescriptor. */ - class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new EnumValueOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceDescriptor); - - /** MonitoredResourceDescriptor name. */ - public name: string; - - /** MonitoredResourceDescriptor type. */ - public type: string; - - /** MonitoredResourceDescriptor displayName. */ - public displayName: string; - - /** MonitoredResourceDescriptor description. */ - public description: string; + constructor(properties?: google.protobuf.IEnumValueOptions); - /** MonitoredResourceDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** MonitoredResourceDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceDescriptor instance + * @returns EnumValueOptions instance */ - public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceDescriptor + * @returns EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceDescriptor + * @returns EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies an EnumValueOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceDescriptor + * @returns EnumValueOptions */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @param message MonitoredResourceDescriptor + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this EnumValueOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResource. */ - interface IMonitoredResource { + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** MonitoredResource type */ - type?: (string|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** MonitoredResource labels */ - labels?: ({ [k: string]: string }|null); + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); } - /** Represents a MonitoredResource. */ - class MonitoredResource implements IMonitoredResource { + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { /** - * Constructs a new MonitoredResource. + * Constructs a new ServiceOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResource); + constructor(properties?: google.protobuf.IServiceOptions); - /** MonitoredResource type. */ - public type: string; + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** MonitoredResource labels. */ - public labels: { [k: string]: string }; + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResource instance + * @returns ServiceOptions instance */ - public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResource + * @returns ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResource + * @returns ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; /** - * Verifies a MonitoredResource message. + * Verifies a ServiceOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResource + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @param message MonitoredResource + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResource to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResourceMetadata. */ - interface IMonitoredResourceMetadata { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** MonitoredResourceMetadata systemLabels */ - systemLabels?: (google.protobuf.IStruct|null); + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** MonitoredResourceMetadata userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); } - /** Represents a MonitoredResourceMetadata. */ - class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceMetadata); + constructor(properties?: google.protobuf.IMethodOptions); - /** MonitoredResourceMetadata systemLabels. */ - public systemLabels?: (google.protobuf.IStruct|null); + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** MonitoredResourceMetadata userLabels. */ - public userLabels: { [k: string]: string }; + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceMetadata instance + * @returns MethodOptions instance */ - public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceMetadata + * @returns MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceMetadata + * @returns MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a MethodOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceMetadata + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @param message MonitoredResourceMetadata + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { + namespace MethodOptions { - /** LabelDescriptor key */ - key?: (string|null); + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** LabelDescriptor description */ - description?: (string|null); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); } - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new LabelDescriptor. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.api.ILabelDescriptor); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** LabelDescriptor key. */ - public key: string; + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** LabelDescriptor valueType. */ - public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** LabelDescriptor description. */ - public description: string; + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @param [properties] Properties to set - * @returns LabelDescriptor instance + * @returns UninterpretedOption instance */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LabelDescriptor + * @returns UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LabelDescriptor + * @returns UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies a LabelDescriptor message. + * Verifies an UninterpretedOption message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LabelDescriptor + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LabelDescriptor to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LabelDescriptor { + namespace UninterpretedOption { - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; } - } - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } + /** Represents a NamePart. */ + class NamePart implements INamePart { - /** Properties of a Distribution. */ - interface IDistribution { + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** Distribution count */ - count?: (number|Long|string|null); + /** NamePart namePart. */ + public namePart: string; - /** Distribution mean */ - mean?: (number|null); + /** NamePart isExtension. */ + public isExtension: boolean; - /** Distribution sumOfSquaredDeviation */ - sumOfSquaredDeviation?: (number|null); + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - /** Distribution range */ - range?: (google.api.Distribution.IRange|null); + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - /** Distribution bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Distribution bucketCounts */ - bucketCounts?: ((number|Long|string)[]|null); + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** Distribution exemplars */ - exemplars?: (google.api.Distribution.IExemplar[]|null); + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); } - /** Represents a Distribution. */ - class Distribution implements IDistribution { + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { /** - * Constructs a new Distribution. + * Constructs a new SourceCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.api.IDistribution); - - /** Distribution count. */ - public count: (number|Long|string); - - /** Distribution mean. */ - public mean: number; - - /** Distribution sumOfSquaredDeviation. */ - public sumOfSquaredDeviation: number; - - /** Distribution range. */ - public range?: (google.api.Distribution.IRange|null); - - /** Distribution bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); - - /** Distribution bucketCounts. */ - public bucketCounts: (number|Long|string)[]; + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** Distribution exemplars. */ - public exemplars: google.api.Distribution.IExemplar[]; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a new Distribution instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns Distribution instance + * @returns SourceCodeInfo instance */ - public static create(properties?: google.api.IDistribution): google.api.Distribution; + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Distribution + * @returns SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Distribution + * @returns SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; /** - * Verifies a Distribution message. + * Verifies a SourceCodeInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Distribution + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @param message Distribution + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Distribution to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Distribution { + namespace SourceCodeInfo { - /** Properties of a Range. */ - interface IRange { + /** Properties of a Location. */ + interface ILocation { - /** Range min */ - min?: (number|null); + /** Location path */ + path?: (number[]|null); - /** Range max */ - max?: (number|null); + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); } - /** Represents a Range. */ - class Range implements IRange { + /** Represents a Location. */ + class Location implements ILocation { /** - * Constructs a new Range. + * Constructs a new Location. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IRange); + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** Range min. */ - public min: number; + /** Location path. */ + public path: number[]; - /** Range max. */ - public max: number; + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; /** - * Creates a new Range instance using the specified properties. + * Creates a new Location instance using the specified properties. * @param [properties] Properties to set - * @returns Range instance + * @returns Location instance */ - public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Range message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Range + * @returns Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a Range message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Range - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @param message Range - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this Range to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + namespace GeneratedCodeInfo { - /** Properties of a BucketOptions. */ - interface IBucketOptions { + /** Properties of an Annotation. */ + interface IAnnotation { - /** BucketOptions linearBuckets */ - linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + /** Annotation path */ + path?: (number[]|null); - /** BucketOptions exponentialBuckets */ - exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** BucketOptions explicitBuckets */ - explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); } - /** Represents a BucketOptions. */ - class BucketOptions implements IBucketOptions { + /** Represents an Annotation. */ + class Annotation implements IAnnotation { /** - * Constructs a new BucketOptions. + * Constructs a new Annotation. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IBucketOptions); + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** BucketOptions linearBuckets. */ - public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + /** Annotation path. */ + public path: number[]; - /** BucketOptions exponentialBuckets. */ - public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** Annotation sourceFile. */ + public sourceFile: string; - /** BucketOptions explicitBuckets. */ - public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** Annotation begin. */ + public begin: number; - /** BucketOptions options. */ - public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + /** Annotation end. */ + public end: number; /** - * Creates a new BucketOptions instance using the specified properties. + * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set - * @returns BucketOptions instance + * @returns Annotation instance */ - public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BucketOptions message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BucketOptions + * @returns Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BucketOptions + * @returns Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Verifies a BucketOptions message. + * Verifies an Annotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BucketOptions + * @returns Annotation */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @param message BucketOptions + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BucketOptions to JSON. + * Converts this Annotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - namespace BucketOptions { + /** Properties of a Duration. */ + interface IDuration { - /** Properties of a Linear. */ - interface ILinear { + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** Linear numFiniteBuckets */ - numFiniteBuckets?: (number|null); + /** Duration nanos */ + nanos?: (number|null); + } - /** Linear width */ - width?: (number|null); + /** Represents a Duration. */ + class Duration implements IDuration { - /** Linear offset */ - offset?: (number|null); - } + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); - /** Represents a Linear. */ - class Linear implements ILinear { + /** Duration seconds. */ + public seconds: (number|Long|string); - /** - * Constructs a new Linear. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.ILinear); + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Linear numFiniteBuckets. */ - public numFiniteBuckets: number; + /** Properties of an Empty. */ + interface IEmpty { + } - /** Linear width. */ - public width: number; + /** Represents an Empty. */ + class Empty implements IEmpty { - /** Linear offset. */ - public offset: number; + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); - /** - * Creates a new Linear instance using the specified properties. - * @param [properties] Properties to set - * @returns Linear instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Linear message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Linear; + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Linear; + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - /** - * Verifies a Linear message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Linear - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @param message Linear - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Linear to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of an Exponential. */ - interface IExponential { + /** Properties of a FieldMask. */ + interface IFieldMask { - /** Exponential numFiniteBuckets */ - numFiniteBuckets?: (number|null); + /** FieldMask paths */ + paths?: (string[]|null); + } - /** Exponential growthFactor */ - growthFactor?: (number|null); + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { - /** Exponential scale */ - scale?: (number|null); - } + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); - /** Represents an Exponential. */ - class Exponential implements IExponential { + /** FieldMask paths. */ + public paths: string[]; - /** - * Constructs a new Exponential. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - /** Exponential numFiniteBuckets. */ - public numFiniteBuckets: number; + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - /** Exponential growthFactor. */ - public growthFactor: number; + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - /** Exponential scale. */ - public scale: number; + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - /** - * Creates a new Exponential instance using the specified properties. - * @param [properties] Properties to set - * @returns Exponential instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - /** - * Decodes an Exponential message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Exponential; + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Exponential; + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies an Exponential message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a Timestamp. */ + interface ITimestamp { - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exponential - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @param message Exponential - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Timestamp nanos */ + nanos?: (number|null); + } - /** - * Converts this Exponential to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { - /** Properties of an Explicit. */ - interface IExplicit { + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); - /** Explicit bounds */ - bounds?: (number[]|null); - } + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** Represents an Explicit. */ - class Explicit implements IExplicit { + /** Timestamp nanos. */ + public nanos: number; - /** - * Constructs a new Explicit. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - /** Explicit bounds. */ - public bounds: number[]; + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Explicit instance using the specified properties. - * @param [properties] Properties to set - * @returns Explicit instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - /** - * Decodes an Explicit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Explicit; + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Explicit; + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - /** - * Verifies an Explicit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Explicit - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @param message Explicit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a Struct. */ + interface IStruct { - /** - * Converts this Explicit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } - /** Properties of an Exemplar. */ - interface IExemplar { + /** Represents a Struct. */ + class Struct implements IStruct { - /** Exemplar value */ - value?: (number|null); + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); - /** Exemplar timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; - /** Exemplar attachments */ - attachments?: (google.protobuf.IAny[]|null); - } + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - /** Represents an Exemplar. */ - class Exemplar implements IExemplar { + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Exemplar. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IExemplar); + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; - /** Exemplar value. */ - public value: number; + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; - /** Exemplar timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Exemplar attachments. */ - public attachments: google.protobuf.IAny[]; + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - /** - * Creates a new Exemplar instance using the specified properties. - * @param [properties] Properties to set - * @returns Exemplar instance - */ - public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a Value. */ + interface IValue { - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Exemplar; + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Exemplar; + /** Value numberValue */ + numberValue?: (number|null); - /** - * Verifies an Exemplar message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Value stringValue */ + stringValue?: (string|null); - /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exemplar - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; + /** Value boolValue */ + boolValue?: (boolean|null); - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @param message Exemplar - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); - /** - * Converts this Exemplar to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); } - /** Properties of a MetricDescriptor. */ - interface IMetricDescriptor { + /** Represents a Value. */ + class Value implements IValue { - /** MetricDescriptor name */ - name?: (string|null); + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); - /** MetricDescriptor type */ - type?: (string|null); + /** Value nullValue. */ + public nullValue: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue); - /** MetricDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); + /** Value numberValue. */ + public numberValue: number; - /** MetricDescriptor metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + /** Value stringValue. */ + public stringValue: string; - /** MetricDescriptor valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + /** Value boolValue. */ + public boolValue: boolean; - /** MetricDescriptor unit */ - unit?: (string|null); + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); - /** MetricDescriptor description */ - description?: (string|null); + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); - /** MetricDescriptor displayName */ - displayName?: (string|null); + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - /** MetricDescriptor metadata */ - metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - /** MetricDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - } + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a MetricDescriptor. */ - class MetricDescriptor implements IMetricDescriptor { + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new MetricDescriptor. - * @param [properties] Properties to set + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: google.api.IMetricDescriptor); + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; - /** MetricDescriptor name. */ - public name: string; + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; - /** MetricDescriptor type. */ - public type: string; + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MetricDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; - /** MetricDescriptor metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MetricDescriptor valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MetricDescriptor unit. */ - public unit: string; + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } - /** MetricDescriptor description. */ - public description: string; + /** Properties of a ListValue. */ + interface IListValue { - /** MetricDescriptor displayName. */ - public displayName: string; + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { - /** MetricDescriptor metadata. */ - public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); - /** MetricDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** ListValue values. */ + public values: google.protobuf.IValue[]; /** - * Creates a new MetricDescriptor instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @param [properties] Properties to set - * @returns MetricDescriptor instance + * @returns ListValue instance */ - public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetricDescriptor message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetricDescriptor + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetricDescriptor + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; /** - * Verifies a MetricDescriptor message. + * Verifies a ListValue message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetricDescriptor + * @returns ListValue */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. - * @param message MetricDescriptor + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetricDescriptor to JSON. + * Converts this ListValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace MetricDescriptor { - - /** Properties of a MetricDescriptorMetadata. */ - interface IMetricDescriptorMetadata { - - /** MetricDescriptorMetadata launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** MetricDescriptorMetadata samplePeriod */ - samplePeriod?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata ingestDelay */ - ingestDelay?: (google.protobuf.IDuration|null); - } - - /** Represents a MetricDescriptorMetadata. */ - class MetricDescriptorMetadata implements IMetricDescriptorMetadata { - - /** - * Constructs a new MetricDescriptorMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - - /** MetricDescriptorMetadata launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** MetricDescriptorMetadata samplePeriod. */ - public samplePeriod?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata ingestDelay. */ - public ingestDelay?: (google.protobuf.IDuration|null); - - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricDescriptorMetadata instance - */ - public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Verifies a MetricDescriptorMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricDescriptorMetadata - */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @param message MetricDescriptorMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricDescriptorMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** MetricKind enum. */ - enum MetricKind { - METRIC_KIND_UNSPECIFIED = 0, - GAUGE = 1, - DELTA = 2, - CUMULATIVE = 3 - } - - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - BOOL = 1, - INT64 = 2, - DOUBLE = 3, - STRING = 4, - DISTRIBUTION = 5, - MONEY = 6 - } - } - - /** Properties of a Metric. */ - interface IMetric { + /** Properties of an Any. */ + interface IAny { - /** Metric type */ - type?: (string|null); + /** Any type_url */ + type_url?: (string|null); - /** Metric labels */ - labels?: ({ [k: string]: string }|null); + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents a Metric. */ - class Metric implements IMetric { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new Metric. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMetric); + constructor(properties?: google.protobuf.IAny); - /** Metric type. */ - public type: string; + /** Any type_url. */ + public type_url: string; - /** Metric labels. */ - public labels: { [k: string]: string }; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new Metric instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns Metric instance + * @returns Any instance */ - public static create(properties?: google.api.IMetric): google.api.Metric; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Metric + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Metric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Metric + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Metric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a Metric message. + * Verifies an Any message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Metric + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.api.Metric; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metric to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 3b1be1557fa..6dd9d2a1de5 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -39,2427 +39,1216 @@ */ var google = {}; - google.protobuf = (function() { + google.logging = (function() { /** - * Namespace protobuf. + * Namespace logging. * @memberof google * @namespace */ - var protobuf = {}; - - protobuf.Duration = (function() { + var logging = {}; - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ + logging.v2 = (function() { /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * Namespace v2. + * @memberof google.logging + * @namespace */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + var v2 = {}; - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + v2.ConfigServiceV2 = (function() { - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; + /** + * Constructs a new ConfigServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a ConfigServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; + (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; + /** + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.ConfigServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListSinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse + */ - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { + return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); + }, "name", { value: "ListSinks" }); - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; + /** + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { + return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "GetSink" }); - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; + /** + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ - return Duration; - })(); + /** + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { + return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "CreateSink" }); - protobuf.Empty = (function() { + /** + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { + return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "UpdateSink" }); - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; + /** + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { + return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSink" }); - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListExclusionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse + */ - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { + return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); + }, "name", { value: "ListExclusions" }); - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; + /** + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { + return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "GetExclusion" }); - return Empty; - })(); + /** + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - protobuf.FieldMask = (function() { + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ + /** + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { + return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "CreateExclusion" }); - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; + /** + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { + return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "UpdateExclusion" }); - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; + /** + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { + return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExclusion" }); - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; + /** + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetCmekSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.CmekSettings} [response] CmekSettings + */ - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; + /** + * Calls GetCmekSettings. + * @function getCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getCmekSettings = function getCmekSettings(request, callback) { + return this.rpcCall(getCmekSettings, $root.google.logging.v2.GetCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); + }, "name", { value: "GetCmekSettings" }); - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls GetCmekSettings. + * @function getCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return FieldMask; - })(); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateCmekSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.CmekSettings} [response] CmekSettings + */ - protobuf.Timestamp = (function() { + /** + * Calls UpdateCmekSettings. + * @function updateCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateCmekSettings = function updateCmekSettings(request, callback) { + return this.rpcCall(updateCmekSettings, $root.google.logging.v2.UpdateCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); + }, "name", { value: "UpdateCmekSettings" }); - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ + /** + * Calls UpdateCmekSettings. + * @function updateCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return ConfigServiceV2; + })(); - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + v2.LogSink = (function() { - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; + /** + * Properties of a LogSink. + * @memberof google.logging.v2 + * @interface ILogSink + * @property {string|null} [name] LogSink name + * @property {string|null} [destination] LogSink destination + * @property {string|null} [filter] LogSink filter + * @property {string|null} [description] LogSink description + * @property {boolean|null} [disabled] LogSink disabled + * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat + * @property {string|null} [writerIdentity] LogSink writerIdentity + * @property {boolean|null} [includeChildren] LogSink includeChildren + * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + * @property {google.protobuf.ITimestamp|null} [startTime] LogSink startTime + * @property {google.protobuf.ITimestamp|null} [endTime] LogSink endTime + */ - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; + /** + * Constructs a new LogSink. + * @memberof google.logging.v2 + * @classdesc Represents a LogSink. + * @implements ILogSink + * @constructor + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + */ + function LogSink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; + /** + * LogSink name. + * @member {string} name + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.name = ""; - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * LogSink destination. + * @member {string} destination + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.destination = ""; - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * LogSink filter. + * @member {string} filter + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.filter = ""; - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * LogSink description. + * @member {string} description + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.description = ""; - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; + /** + * LogSink disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.disabled = false; - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; + /** + * LogSink outputVersionFormat. + * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.outputVersionFormat = 0; - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; + /** + * LogSink writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.writerIdentity = ""; - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * LogSink includeChildren. + * @member {boolean} includeChildren + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.includeChildren = false; - return Timestamp; - })(); + /** + * LogSink bigqueryOptions. + * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.bigqueryOptions = null; - protobuf.FileDescriptorSet = (function() { + /** + * LogSink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.createTime = null; - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ + /** + * LogSink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.updateTime = null; - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * LogSink startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.startTime = null; - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; + /** + * LogSink endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.endTime = null; - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * LogSink options. + * @member {"bigqueryOptions"|undefined} options + * @memberof google.logging.v2.LogSink + * @instance + */ + Object.defineProperty(LogSink.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new LogSink instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @returns {google.logging.v2.LogSink} LogSink instance + */ + LogSink.create = function create(properties) { + return new LogSink(properties); + }; - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destination != null && message.hasOwnProperty("destination")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) + $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.disabled); + return writer; + }; - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; + /** + * Decodes a LogSink message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogSink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogSink} LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.destination = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 18: + message.description = reader.string(); + break; + case 19: + message.disabled = reader.bool(); + break; + case 6: + message.outputVersionFormat = reader.int32(); + break; + case 8: + message.writerIdentity = reader.string(); + break; + case 9: + message.includeChildren = reader.bool(); + break; + case 12: + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); + break; + case 13: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return null; - }; + return message; + }; - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; + /** + * Decodes a LogSink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogSink} LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a LogSink message. + * @function verify + * @memberof google.logging.v2.LogSink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogSink.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + switch (message.outputVersionFormat) { + default: + return "outputVersionFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + if (typeof message.includeChildren !== "boolean") + return "includeChildren: boolean expected"; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + properties.options = 1; + { + var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); + if (error) + return "bigqueryOptions." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; - return FileDescriptorSet; - })(); + /** + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogSink + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogSink} LogSink + */ + LogSink.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogSink) + return object; + var message = new $root.google.logging.v2.LogSink(); + if (object.name != null) + message.name = String(object.name); + if (object.destination != null) + message.destination = String(object.destination); + if (object.filter != null) + message.filter = String(object.filter); + if (object.description != null) + message.description = String(object.description); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + switch (object.outputVersionFormat) { + case "VERSION_FORMAT_UNSPECIFIED": + case 0: + message.outputVersionFormat = 0; + break; + case "V2": + case 1: + message.outputVersionFormat = 1; + break; + case "V1": + case 2: + message.outputVersionFormat = 2; + break; + } + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); + if (object.includeChildren != null) + message.includeChildren = Boolean(object.includeChildren); + if (object.bigqueryOptions != null) { + if (typeof object.bigqueryOptions !== "object") + throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.logging.v2.LogSink.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.logging.v2.LogSink.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; - protobuf.FileDescriptorProto = (function() { + /** + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.LogSink} message LogSink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogSink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.destination = ""; + object.filter = ""; + object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; + object.writerIdentity = ""; + object.includeChildren = false; + object.startTime = null; + object.endTime = null; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.disabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + object.includeChildren = message.includeChildren; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); + if (options.oneofs) + object.options = "bigqueryOptions"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - */ + /** + * Converts this LogSink to JSON. + * @function toJSON + * @memberof google.logging.v2.LogSink + * @instance + * @returns {Object.} JSON object + */ + LogSink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * VersionFormat enum. + * @name google.logging.v2.LogSink.VersionFormat + * @enum {string} + * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value + * @property {number} V2=1 V2 value + * @property {number} V1=2 V1 value + */ + LogSink.VersionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "V2"] = 1; + values[valuesById[2] = "V1"] = 2; + return values; + })(); - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; + return LogSink; + })(); - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; + v2.BigQueryOptions = (function() { - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + /** + * Properties of a BigQueryOptions. + * @memberof google.logging.v2 + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning + */ - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + /** + * Constructs a new BigQueryOptions. + * @memberof google.logging.v2 + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions + * @constructor + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + */ + function BigQueryOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usePartitionedTables = false; - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + /** + * BigQueryOptions usesTimestampColumnPartitioning. + * @member {boolean} usesTimestampColumnPartitioning + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @function create + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + */ + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); + }; - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); + return writer; + }; - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.usePartitionedTables = reader.bool(); + break; + case 3: + message.usesTimestampColumnPartitioning = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; + /** + * Verifies a BigQueryOptions message. + * @function verify + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + if (typeof message.usesTimestampColumnPartitioning !== "boolean") + return "usesTimestampColumnPartitioning: boolean expected"; + return null; + }; - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + */ + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) + return object; + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + if (object.usesTimestampColumnPartitioning != null) + message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); + return message; + }; - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && message.hasOwnProperty("package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && message.hasOwnProperty("syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - return writer; - }; + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.usePartitionedTables = false; + object.usesTimestampColumnPartitioning = false; + } + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; + return object; + }; - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this BigQueryOptions to JSON. + * @function toJSON + * @memberof google.logging.v2.BigQueryOptions + * @instance + * @returns {Object.} JSON object + */ + BigQueryOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return BigQueryOptions; + })(); - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + v2.ListSinksRequest = (function() { /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end + * Properties of a ListSinksRequest. + * @memberof google.logging.v2 + * @interface IListSinksRequest + * @property {string|null} [parent] ListSinksRequest parent + * @property {string|null} [pageToken] ListSinksRequest pageToken + * @property {number|null} [pageSize] ListSinksRequest pageSize */ /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange + * Constructs a new ListSinksRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListSinksRequest. + * @implements IListSinksRequest * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set */ - function ReservedRange(properties) { + function ListSinksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2467,1537 +1256,1340 @@ } /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange + * ListSinksRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListSinksRequest * @instance */ - ReservedRange.prototype.start = 0; + ListSinksRequest.prototype.parent = ""; /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange + * ListSinksRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListSinksRequest * @instance */ - ReservedRange.prototype.end = 0; + ListSinksRequest.prototype.pageToken = ""; /** - * Creates a new ReservedRange instance using the specified properties. + * ListSinksRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageSize = 0; + + /** + * Creates a new ListSinksRequest instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); + ListSinksRequest.create = function create(properties) { + return new ListSinksRequest(properties); }; /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encode = function encode(message, writer) { + ListSinksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReservedRange message from the specified reader or buffer. + * Decodes a ListSinksRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReservedRange.decode = function decode(reader, length) { + ListSinksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Verifies a ListSinksRequest message. + * @function verify + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + */ + ListSinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksRequest) + return object; + var message = new $root.google.logging.v2.ListSinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListSinksRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListSinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListSinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ExtensionRangeOptions; - })(); + return ListSinksRequest; + })(); - protobuf.FieldDescriptorProto = (function() { + v2.ListSinksResponse = (function() { - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - */ + /** + * Properties of a ListSinksResponse. + * @memberof google.logging.v2 + * @interface IListSinksResponse + * @property {Array.|null} [sinks] ListSinksResponse sinks + * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + */ - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ListSinksResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListSinksResponse. + * @implements IListSinksResponse + * @constructor + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + */ + function ListSinksResponse(properties) { + this.sinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; + /** + * ListSinksResponse sinks. + * @member {Array.} sinks + * @memberof google.logging.v2.ListSinksResponse + * @instance + */ + ListSinksResponse.prototype.sinks = $util.emptyArray; - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; + /** + * ListSinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListSinksResponse + * @instance + */ + ListSinksResponse.prototype.nextPageToken = ""; - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; + /** + * Creates a new ListSinksResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + */ + ListSinksResponse.create = function create(properties) { + return new ListSinksResponse(properties); + }; - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; + /** + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinks != null && message.sinks.length) + for (var i = 0; i < message.sinks.length; ++i) + $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; + /** + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; + /** + * Decodes a ListSinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sinks && message.sinks.length)) + message.sinks = []; + message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; + /** + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; + /** + * Verifies a ListSinksResponse message. + * @function verify + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinks != null && message.hasOwnProperty("sinks")) { + if (!Array.isArray(message.sinks)) + return "sinks: array expected"; + for (var i = 0; i < message.sinks.length; ++i) { + var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); + if (error) + return "sinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; + /** + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + */ + ListSinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksResponse) + return object; + var message = new $root.google.logging.v2.ListSinksResponse(); + if (object.sinks) { + if (!Array.isArray(object.sinks)) + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); + message.sinks = []; + for (var i = 0; i < object.sinks.length; ++i) { + if (typeof object.sinks[i] !== "object") + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); + message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; + /** + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sinks && message.sinks.length) { + object.sinks = []; + for (var j = 0; j < message.sinks.length; ++j) + object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; + /** + * Converts this ListSinksResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListSinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListSinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && message.hasOwnProperty("extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && message.hasOwnProperty("number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && message.hasOwnProperty("label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && message.hasOwnProperty("typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - return writer; - }; + return ListSinksResponse; + })(); - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2.GetSinkRequest = (function() { - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Properties of a GetSinkRequest. + * @memberof google.logging.v2 + * @interface IGetSinkRequest + * @property {string|null} [sinkName] GetSinkRequest sinkName + */ + + /** + * Constructs a new GetSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetSinkRequest. + * @implements IGetSinkRequest + * @constructor + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + */ + function GetSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * GetSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.GetSinkRequest + * @instance + */ + GetSinkRequest.prototype.sinkName = ""; - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; + /** + * Creates a new GetSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance + */ + GetSinkRequest.create = function create(properties) { + return new GetSinkRequest(properties); + }; + + /** + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + return writer; + }; + + /** + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; + return message; + }; - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + /** + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSinkRequest message. + * @function verify + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + return null; + }; + + /** + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + */ + GetSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSinkRequest) + return object; + var message = new $root.google.logging.v2.GetSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + return message; + }; + + /** + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - return message; - }; + }; + + /** + * Converts this GetSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetSinkRequest + * @instance + * @returns {Object.} JSON object + */ + GetSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetSinkRequest; + })(); + + v2.CreateSinkRequest = (function() { + + /** + * Properties of a CreateSinkRequest. + * @memberof google.logging.v2 + * @interface ICreateSinkRequest + * @property {string|null} [parent] CreateSinkRequest parent + * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity + */ - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; + /** + * Constructs a new CreateSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateSinkRequest. + * @implements ICreateSinkRequest + * @constructor + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + */ + function CreateSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - return object; - }; - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CreateSinkRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.parent = ""; - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); + /** + * CreateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.sink = null; - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - return values; - })(); + /** + * CreateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance + */ + CreateSinkRequest.create = function create(properties) { + return new CreateSinkRequest(properties); + }; + + /** + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + return writer; + }; + + /** + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSinkRequest message. + * @function verify + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; + } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + return null; + }; - return FieldDescriptorProto; - })(); + /** + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + */ + CreateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateSinkRequest) + return object; + var message = new $root.google.logging.v2.CreateSinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + return message; + }; - protobuf.OneofDescriptorProto = (function() { + /** + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + return object; + }; - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ + /** + * Converts this CreateSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateSinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return CreateSinkRequest; + })(); - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; + v2.UpdateSinkRequest = (function() { - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; + /** + * Properties of an UpdateSinkRequest. + * @memberof google.logging.v2 + * @interface IUpdateSinkRequest + * @property {string|null} [sinkName] UpdateSinkRequest sinkName + * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask + */ - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; + /** + * Constructs a new UpdateSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateSinkRequest. + * @implements IUpdateSinkRequest + * @constructor + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + */ + function UpdateSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * UpdateSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.sinkName = ""; - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UpdateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.sink = null; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * UpdateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.uniqueWriterIdentity = false; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * UpdateSinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.updateMask = null; - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; + /** + * Creates a new UpdateSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance + */ + UpdateSinkRequest.create = function create(properties) { + return new UpdateSinkRequest(properties); + }; - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; + /** + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; + /** + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + case 2: + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return OneofDescriptorProto; - })(); + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - protobuf.EnumDescriptorProto = (function() { + /** + * Verifies an UpdateSinkRequest message. + * @function verify + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; + } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ + /** + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + */ + UpdateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSinkRequest) + return object; + var message = new $root.google.logging.v2.UpdateSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sinkName = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + object.updateMask = null; + } + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this UpdateSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; + return UpdateSinkRequest; + })(); - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + v2.DeleteSinkRequest = (function() { - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; + /** + * Properties of a DeleteSinkRequest. + * @memberof google.logging.v2 + * @interface IDeleteSinkRequest + * @property {string|null} [sinkName] DeleteSinkRequest sinkName + */ - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * Constructs a new DeleteSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteSinkRequest. + * @implements IDeleteSinkRequest + * @constructor + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + */ + function DeleteSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DeleteSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.DeleteSinkRequest + * @instance + */ + DeleteSinkRequest.prototype.sinkName = ""; - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; + /** + * Creates a new DeleteSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance + */ + DeleteSinkRequest.create = function create(properties) { + return new DeleteSinkRequest(properties); + }; - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; + /** + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + return writer; + }; - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; + /** + * Verifies a DeleteSinkRequest message. + * @function verify + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + return null; + }; - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; + /** + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + */ + DeleteSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteSinkRequest) + return object; + var message = new $root.google.logging.v2.DeleteSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + return message; + }; - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; + /** + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + return object; + }; - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this DeleteSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteSinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - EnumDescriptorProto.EnumReservedRange = (function() { + return DeleteSinkRequest; + })(); + + v2.LogExclusion = (function() { /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end + * Properties of a LogExclusion. + * @memberof google.logging.v2 + * @interface ILogExclusion + * @property {string|null} [name] LogExclusion name + * @property {string|null} [description] LogExclusion description + * @property {string|null} [filter] LogExclusion filter + * @property {boolean|null} [disabled] LogExclusion disabled + * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime */ /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange + * Constructs a new LogExclusion. + * @memberof google.logging.v2 + * @classdesc Represents a LogExclusion. + * @implements ILogExclusion * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set */ - function EnumReservedRange(properties) { + function LogExclusion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4005,88 +2597,140 @@ } /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * LogExclusion name. + * @member {string} name + * @memberof google.logging.v2.LogExclusion * @instance */ - EnumReservedRange.prototype.start = 0; + LogExclusion.prototype.name = ""; /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * LogExclusion description. + * @member {string} description + * @memberof google.logging.v2.LogExclusion * @instance */ - EnumReservedRange.prototype.end = 0; + LogExclusion.prototype.description = ""; /** - * Creates a new EnumReservedRange instance using the specified properties. + * LogExclusion filter. + * @member {string} filter + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.filter = ""; + + /** + * LogExclusion disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.disabled = false; + + /** + * LogExclusion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.createTime = null; + + /** + * LogExclusion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.updateTime = null; + + /** + * Creates a new LogExclusion instance using the specified properties. * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @returns {google.logging.v2.LogExclusion} LogExclusion instance */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); + LogExclusion.create = function create(properties) { + return new LogExclusion(properties); }; /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumReservedRange.encode = function encode(message, writer) { + LogExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumReservedRange.decode = function decode(reader, length) { + LogExclusion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.start = reader.int32(); + message.name = reader.string(); break; case 2: - message.end = reader.int32(); + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.disabled = reader.bool(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4097,4010 +2741,4232 @@ }; /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + LogExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumReservedRange message. + * Verifies a LogExclusion message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumReservedRange.verify = function verify(message) { + LogExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @returns {google.logging.v2.LogExclusion} LogExclusion */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + LogExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogExclusion) return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; + var message = new $root.google.logging.v2.LogExclusion(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {google.logging.v2.LogExclusion} message LogExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumReservedRange.toObject = function toObject(message, options) { + LogExclusion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.start = 0; - object.end = 0; + object.name = ""; + object.description = ""; + object.filter = ""; + object.disabled = false; + object.createTime = null; + object.updateTime = null; } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this EnumReservedRange to JSON. + * Converts this LogExclusion to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.LogExclusion * @instance * @returns {Object.} JSON object */ - EnumReservedRange.prototype.toJSON = function toJSON() { + LogExclusion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumReservedRange; + return LogExclusion; })(); - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && message.hasOwnProperty("number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + v2.ListExclusionsRequest = (function() { - return EnumValueDescriptorProto; - })(); + /** + * Properties of a ListExclusionsRequest. + * @memberof google.logging.v2 + * @interface IListExclusionsRequest + * @property {string|null} [parent] ListExclusionsRequest parent + * @property {string|null} [pageToken] ListExclusionsRequest pageToken + * @property {number|null} [pageSize] ListExclusionsRequest pageSize + */ - protobuf.ServiceDescriptorProto = (function() { + /** + * Constructs a new ListExclusionsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListExclusionsRequest. + * @implements IListExclusionsRequest + * @constructor + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + */ + function ListExclusionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ + /** + * ListExclusionsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.parent = ""; - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ListExclusionsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.pageToken = ""; - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; + /** + * ListExclusionsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.pageSize = 0; - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + /** + * Creates a new ListExclusionsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance + */ + ListExclusionsRequest.create = function create(properties) { + return new ListExclusionsRequest(properties); + }; - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; + /** + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; + /** + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a ListExclusionsRequest message. + * @function verify + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExclusionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + */ + ListExclusionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsRequest) + return object; + var message = new $root.google.logging.v2.ListExclusionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; + /** + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExclusionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; + }; - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; + /** + * Converts this ListExclusionsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListExclusionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ListExclusionsRequest; + })(); - return ServiceDescriptorProto; - })(); + v2.ListExclusionsResponse = (function() { - protobuf.MethodDescriptorProto = (function() { + /** + * Properties of a ListExclusionsResponse. + * @memberof google.logging.v2 + * @interface IListExclusionsResponse + * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions + * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken + */ - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ + /** + * Constructs a new ListExclusionsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListExclusionsResponse. + * @implements IListExclusionsResponse + * @constructor + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + */ + function ListExclusionsResponse(properties) { + this.exclusions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ListExclusionsResponse exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + */ + ListExclusionsResponse.prototype.exclusions = $util.emptyArray; + + /** + * ListExclusionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + */ + ListExclusionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListExclusionsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance + */ + ListExclusionsResponse.create = function create(properties) { + return new ListExclusionsResponse(properties); + }; - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; + /** + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; + /** + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; + /** + * Verifies a ListExclusionsResponse message. + * @function verify + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExclusionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + if (error) + return "exclusions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; + /** + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + */ + ListExclusionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsResponse) + return object; + var message = new $root.google.logging.v2.ListExclusionsResponse(); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; + /** + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExclusionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exclusions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && message.hasOwnProperty("inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && message.hasOwnProperty("outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && message.hasOwnProperty("options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; + /** + * Converts this ListExclusionsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListExclusionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return ListExclusionsResponse; + })(); - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v2.GetExclusionRequest = (function() { - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a GetExclusionRequest. + * @memberof google.logging.v2 + * @interface IGetExclusionRequest + * @property {string|null} [name] GetExclusionRequest name + */ - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; + /** + * Constructs a new GetExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetExclusionRequest. + * @implements IGetExclusionRequest + * @constructor + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + */ + function GetExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; + /** + * GetExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.GetExclusionRequest + * @instance + */ + GetExclusionRequest.prototype.name = ""; - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; + /** + * Creates a new GetExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance + */ + GetExclusionRequest.create = function create(properties) { + return new GetExclusionRequest(properties); + }; + + /** + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return MethodDescriptorProto; - })(); + /** + * Verifies a GetExclusionRequest message. + * @function verify + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - protobuf.FileOptions = (function() { + /** + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + */ + GetExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetExclusionRequest) + return object; + var message = new $root.google.logging.v2.GetExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - */ + /** + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this GetExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + GetExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; + return GetExclusionRequest; + })(); - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; + v2.CreateExclusionRequest = (function() { - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; + /** + * Properties of a CreateExclusionRequest. + * @memberof google.logging.v2 + * @interface ICreateExclusionRequest + * @property {string|null} [parent] CreateExclusionRequest parent + * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion + */ - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * Constructs a new CreateExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateExclusionRequest. + * @implements ICreateExclusionRequest + * @constructor + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + */ + function CreateExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * CreateExclusionRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + */ + CreateExclusionRequest.prototype.parent = ""; - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * CreateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + */ + CreateExclusionRequest.prototype.exclusion = null; - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + /** + * Creates a new CreateExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance + */ + CreateExclusionRequest.create = function create(properties) { + return new CreateExclusionRequest(properties); + }; + + /** + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + /** + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = false; + /** + * Verifies a CreateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + */ + CreateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateExclusionRequest) + return object; + var message = new $root.google.logging.v2.CreateExclusionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + return message; + }; - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = false; + /** + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.exclusion = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + return object; + }; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + /** + * Converts this CreateExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + return CreateExclusionRequest; + })(); - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + v2.UpdateExclusionRequest = (function() { - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; + /** + * Properties of an UpdateExclusionRequest. + * @memberof google.logging.v2 + * @interface IUpdateExclusionRequest + * @property {string|null} [name] UpdateExclusionRequest name + * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask + */ - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; + /** + * Constructs a new UpdateExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateExclusionRequest. + * @implements IUpdateExclusionRequest + * @constructor + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + */ + function UpdateExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; + /** + * UpdateExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.name = ""; - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; + /** + * UpdateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.exclusion = null; - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * UpdateExclusionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.updateMask = null; - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; + /** + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance + */ + UpdateExclusionRequest.create = function create(properties) { + return new UpdateExclusionRequest(properties); + }; - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; + /** + * Verifies an UpdateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - if (typeof message.phpGenericServices !== "boolean") - return "phpGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "uninterpretedOption." + error; + return "updateMask." + error; } - } - return null; - }; + return null; + }; - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.phpGenericServices != null) - message.phpGenericServices = Boolean(object.phpGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + */ + UpdateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) + return object; + var message = new $root.google.logging.v2.UpdateExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.exclusion = null; + object.updateMask = null; } - } - return message; - }; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpGenericServices = false; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + /** + * Converts this UpdateExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateExclusionRequest; + })(); + + v2.DeleteExclusionRequest = (function() { + + /** + * Properties of a DeleteExclusionRequest. + * @memberof google.logging.v2 + * @interface IDeleteExclusionRequest + * @property {string|null} [name] DeleteExclusionRequest name + */ + + /** + * Constructs a new DeleteExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteExclusionRequest. + * @implements IDeleteExclusionRequest + * @constructor + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + */ + function DeleteExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return object; - }; - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * DeleteExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteExclusionRequest + * @instance + */ + DeleteExclusionRequest.prototype.name = ""; + + /** + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + */ + DeleteExclusionRequest.create = function create(properties) { + return new DeleteExclusionRequest(properties); + }; + + /** + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteExclusionRequest message. + * @function verify + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + */ + DeleteExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + return object; + var message = new $root.google.logging.v2.DeleteExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; + /** + * Converts this DeleteExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteExclusionRequest; })(); - return FileOptions; - })(); + v2.GetCmekSettingsRequest = (function() { - protobuf.MessageOptions = (function() { + /** + * Properties of a GetCmekSettingsRequest. + * @memberof google.logging.v2 + * @interface IGetCmekSettingsRequest + * @property {string|null} [name] GetCmekSettingsRequest name + */ - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - */ + /** + * Constructs a new GetCmekSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetCmekSettingsRequest. + * @implements IGetCmekSettingsRequest + * @constructor + * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + */ + function GetCmekSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * GetCmekSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.GetCmekSettingsRequest + * @instance + */ + GetCmekSettingsRequest.prototype.name = ""; - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + /** + * Creates a new GetCmekSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest instance + */ + GetCmekSettingsRequest.create = function create(properties) { + return new GetCmekSettingsRequest(properties); + }; - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCmekSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCmekSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetCmekSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCmekSettingsRequest message. + * @function verify + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCmekSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + */ + GetCmekSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetCmekSettingsRequest) + return object; + var message = new $root.google.logging.v2.GetCmekSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.GetCmekSettingsRequest} message GetCmekSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCmekSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetCmekSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetCmekSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetCmekSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCmekSettingsRequest; + })(); + + v2.UpdateCmekSettingsRequest = (function() { + + /** + * Properties of an UpdateCmekSettingsRequest. + * @memberof google.logging.v2 + * @interface IUpdateCmekSettingsRequest + * @property {string|null} [name] UpdateCmekSettingsRequest name + * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] UpdateCmekSettingsRequest cmekSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmekSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateCmekSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateCmekSettingsRequest. + * @implements IUpdateCmekSettingsRequest + * @constructor + * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + */ + function UpdateCmekSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + /** + * UpdateCmekSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.name = ""; - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * UpdateCmekSettingsRequest cmekSettings. + * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.cmekSettings = null; - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; + /** + * UpdateCmekSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.updateMask = null; - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Creates a new UpdateCmekSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest instance + */ + UpdateCmekSettingsRequest.create = function create(properties) { + return new UpdateCmekSettingsRequest(properties); + }; - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCmekSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) + $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCmekSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + /** + * Verifies an UpdateCmekSettingsRequest message. + * @function verify + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCmekSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { + var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); if (error) - return "uninterpretedOption." + error; + return "cmekSettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + */ + UpdateCmekSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateCmekSettingsRequest) + return object; + var message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cmekSettings != null) { + if (typeof object.cmekSettings !== "object") + throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.cmekSettings: object expected"); + message.cmekSettings = $root.google.logging.v2.CmekSettings.fromObject(object.cmekSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - } - return null; - }; + return message; + }; - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.UpdateCmekSettingsRequest} message UpdateCmekSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCmekSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.cmekSettings = null; + object.updateMask = null; } - } - return message; - }; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) + object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + /** + * Converts this UpdateCmekSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCmekSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCmekSettingsRequest; + })(); + + v2.CmekSettings = (function() { + + /** + * Properties of a CmekSettings. + * @memberof google.logging.v2 + * @interface ICmekSettings + * @property {string|null} [name] CmekSettings name + * @property {string|null} [kmsKeyName] CmekSettings kmsKeyName + * @property {string|null} [serviceAccountId] CmekSettings serviceAccountId + */ + + /** + * Constructs a new CmekSettings. + * @memberof google.logging.v2 + * @classdesc Represents a CmekSettings. + * @implements ICmekSettings + * @constructor + * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + */ + function CmekSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return object; - }; - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CmekSettings name. + * @member {string} name + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.name = ""; - return MessageOptions; - })(); + /** + * CmekSettings kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.kmsKeyName = ""; - protobuf.FieldOptions = (function() { + /** + * CmekSettings serviceAccountId. + * @member {string} serviceAccountId + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.serviceAccountId = ""; - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - */ + /** + * Creates a new CmekSettings instance using the specified properties. + * @function create + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + * @returns {google.logging.v2.CmekSettings} CmekSettings instance + */ + CmekSettings.create = function create(properties) { + return new CmekSettings(properties); + }; + + /** + * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmekSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountId); + return writer; + }; + + /** + * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmekSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CmekSettings message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CmekSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CmekSettings} CmekSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmekSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CmekSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.kmsKeyName = reader.string(); + break; + case 3: + message.serviceAccountId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CmekSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CmekSettings} CmekSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmekSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CmekSettings message. + * @function verify + * @memberof google.logging.v2.CmekSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CmekSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + if (!$util.isString(message.serviceAccountId)) + return "serviceAccountId: string expected"; + return null; + }; + + /** + * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CmekSettings + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CmekSettings} CmekSettings + */ + CmekSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CmekSettings) + return object; + var message = new $root.google.logging.v2.CmekSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.serviceAccountId != null) + message.serviceAccountId = String(object.serviceAccountId); + return message; + }; + + /** + * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.CmekSettings} message CmekSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CmekSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.kmsKeyName = ""; + object.serviceAccountId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + object.serviceAccountId = message.serviceAccountId; + return object; + }; - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this CmekSettings to JSON. + * @function toJSON + * @memberof google.logging.v2.CmekSettings + * @instance + * @returns {Object.} JSON object + */ + CmekSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; + return CmekSettings; + })(); - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; + v2.LoggingServiceV2 = (function() { - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + /** + * Constructs a new LoggingServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a LoggingServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.LoggingServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef DeleteLogCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { + return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLog" }); - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; + /** + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && message.hasOwnProperty("ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && message.hasOwnProperty("packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && message.hasOwnProperty("lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && message.hasOwnProperty("jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && message.hasOwnProperty("weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef WriteLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + */ - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { + return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); + }, "name", { value: "WriteLogEntries" }); - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + */ - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { + return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); + }, "name", { value: "ListLogEntries" }); - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListMonitoredResourceDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + */ + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse + */ + + /** + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { + return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); + }, "name", { value: "ListLogs" }); - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {string} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; + return LoggingServiceV2; })(); - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {string} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); + v2.DeleteLogRequest = (function() { - return FieldOptions; - })(); + /** + * Properties of a DeleteLogRequest. + * @memberof google.logging.v2 + * @interface IDeleteLogRequest + * @property {string|null} [logName] DeleteLogRequest logName + */ - protobuf.OneofOptions = (function() { + /** + * Constructs a new DeleteLogRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteLogRequest. + * @implements IDeleteLogRequest + * @constructor + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + */ + function DeleteLogRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ + /** + * DeleteLogRequest logName. + * @member {string} logName + * @memberof google.logging.v2.DeleteLogRequest + * @instance + */ + DeleteLogRequest.prototype.logName = ""; - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new DeleteLogRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance + */ + DeleteLogRequest.create = function create(properties) { + return new DeleteLogRequest(properties); + }; - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + return writer; + }; + + /** + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.logName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLogRequest message. + * @function verify + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + return null; + }; + + /** + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + */ + DeleteLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogRequest) + return object; + var message = new $root.google.logging.v2.DeleteLogRequest(); + if (object.logName != null) + message.logName = String(object.logName); + return message; + }; + + /** + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLogRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.logName = ""; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + return object; + }; + + /** + * Converts this DeleteLogRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteLogRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLogRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; + return DeleteLogRequest; + })(); - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + v2.WriteLogEntriesRequest = (function() { - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a WriteLogEntriesRequest. + * @memberof google.logging.v2 + * @interface IWriteLogEntriesRequest + * @property {string|null} [logName] WriteLogEntriesRequest logName + * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource + * @property {Object.|null} [labels] WriteLogEntriesRequest labels + * @property {Array.|null} [entries] WriteLogEntriesRequest entries + * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess + * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun + */ - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new WriteLogEntriesRequest. + * @memberof google.logging.v2 + * @classdesc Represents a WriteLogEntriesRequest. + * @implements IWriteLogEntriesRequest + * @constructor + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + */ + function WriteLogEntriesRequest(properties) { + this.labels = {}; + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * WriteLogEntriesRequest logName. + * @member {string} logName + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.logName = ""; - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * WriteLogEntriesRequest resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.resource = null; - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * WriteLogEntriesRequest labels. + * @member {Object.} labels + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.labels = $util.emptyObject; - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * WriteLogEntriesRequest entries. + * @member {Array.} entries + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.entries = $util.emptyArray; - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * WriteLogEntriesRequest partialSuccess. + * @member {boolean} partialSuccess + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.partialSuccess = false; + + /** + * WriteLogEntriesRequest dryRun. + * @member {boolean} dryRun + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.dryRun = false; + + /** + * Creates a new WriteLogEntriesRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance + */ + WriteLogEntriesRequest.create = function create(properties) { + return new WriteLogEntriesRequest(properties); + }; + + /** + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + return writer; + }; - return OneofOptions; - })(); + /** + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.EnumOptions = (function() { + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.logName = reader.string(); + break; + case 2: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 3: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 5: + message.partialSuccess = reader.bool(); + break; + case 6: + message.dryRun = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ + /** + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a WriteLogEntriesRequest message. + * @function verify + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteLogEntriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + if (typeof message.partialSuccess !== "boolean") + return "partialSuccess: boolean expected"; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + return null; + }; - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; + /** + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + */ + WriteLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) + return object; + var message = new $root.google.logging.v2.WriteLogEntriesRequest(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.partialSuccess != null) + message.partialSuccess = Boolean(object.partialSuccess); + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + return message; + }; - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; + /** + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteLogEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.logName = ""; + object.resource = null; + object.partialSuccess = false; + object.dryRun = false; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = message.partialSuccess; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + return object; + }; - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Converts this WriteLogEntriesRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + WriteLogEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; + return WriteLogEntriesRequest; + })(); - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + v2.WriteLogEntriesResponse = (function() { - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a WriteLogEntriesResponse. + * @memberof google.logging.v2 + * @interface IWriteLogEntriesResponse + */ - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new WriteLogEntriesResponse. + * @memberof google.logging.v2 + * @classdesc Represents a WriteLogEntriesResponse. + * @implements IWriteLogEntriesResponse + * @constructor + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + */ + function WriteLogEntriesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new WriteLogEntriesResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance + */ + WriteLogEntriesResponse.create = function create(properties) { + return new WriteLogEntriesResponse(properties); + }; - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a WriteLogEntriesResponse message. + * @function verify + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteLogEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - return EnumOptions; - })(); + /** + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + */ + WriteLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) + return object; + return new $root.google.logging.v2.WriteLogEntriesResponse(); + }; - protobuf.EnumValueOptions = (function() { + /** + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteLogEntriesResponse.toObject = function toObject() { + return {}; + }; - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ + /** + * Converts this WriteLogEntriesResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.WriteLogEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + WriteLogEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return WriteLogEntriesResponse; + })(); - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; + v2.WriteLogEntriesPartialErrors = (function() { - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Properties of a WriteLogEntriesPartialErrors. + * @memberof google.logging.v2 + * @interface IWriteLogEntriesPartialErrors + * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors + */ - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; + /** + * Constructs a new WriteLogEntriesPartialErrors. + * @memberof google.logging.v2 + * @classdesc Represents a WriteLogEntriesPartialErrors. + * @implements IWriteLogEntriesPartialErrors + * @constructor + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + */ + function WriteLogEntriesPartialErrors(properties) { + this.logEntryErrors = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * WriteLogEntriesPartialErrors logEntryErrors. + * @member {Object.} logEntryErrors + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @instance + */ + WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance + */ + WriteLogEntriesPartialErrors.create = function create(properties) { + return new WriteLogEntriesPartialErrors(properties); + }; + + /** + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesPartialErrors.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) + for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesPartialErrors.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + reader.skip().pos++; + if (message.logEntryErrors === $util.emptyObject) + message.logEntryErrors = {}; + key = reader.int32(); + reader.pos++; + message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + /** + * Verifies a WriteLogEntriesPartialErrors message. + * @function verify + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteLogEntriesPartialErrors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { + if (!$util.isObject(message.logEntryErrors)) + return "logEntryErrors: object expected"; + var key = Object.keys(message.logEntryErrors); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "logEntryErrors: integer key{k:int32} expected"; + { + var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); + if (error) + return "logEntryErrors." + error; + } + } } - } - return null; - }; + return null; + }; - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + */ + WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) + return object; + var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); + if (object.logEntryErrors) { + if (typeof object.logEntryErrors !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors = {}; + for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { + if (typeof object.logEntryErrors[keys[i]] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); + } } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + return message; + }; - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.logEntryErrors = {}; + var keys2; + if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { + object.logEntryErrors = {}; + for (var j = 0; j < keys2.length; ++j) + object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); + } + return object; + }; - return EnumValueOptions; - })(); + /** + * Converts this WriteLogEntriesPartialErrors to JSON. + * @function toJSON + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @instance + * @returns {Object.} JSON object + */ + WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - protobuf.ServiceOptions = (function() { + return WriteLogEntriesPartialErrors; + })(); - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - */ + v2.ListLogEntriesRequest = (function() { - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ListLogEntriesRequest. + * @memberof google.logging.v2 + * @interface IListLogEntriesRequest + * @property {Array.|null} [projectIds] ListLogEntriesRequest projectIds + * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames + * @property {string|null} [filter] ListLogEntriesRequest filter + * @property {string|null} [orderBy] ListLogEntriesRequest orderBy + * @property {number|null} [pageSize] ListLogEntriesRequest pageSize + * @property {string|null} [pageToken] ListLogEntriesRequest pageToken + */ - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; + /** + * Constructs a new ListLogEntriesRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogEntriesRequest. + * @implements IListLogEntriesRequest + * @constructor + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + */ + function ListLogEntriesRequest(properties) { + this.projectIds = []; + this.resourceNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * ListLogEntriesRequest projectIds. + * @member {Array.} projectIds + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.projectIds = $util.emptyArray; - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + /** + * ListLogEntriesRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + /** + * ListLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.filter = ""; - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; + /** + * ListLogEntriesRequest orderBy. + * @member {string} orderBy + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.orderBy = ""; - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - return writer; - }; + /** + * ListLogEntriesRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageSize = 0; - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListLogEntriesRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageToken = ""; - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance + */ + ListLogEntriesRequest.create = function create(properties) { + return new ListLogEntriesRequest(properties); + }; - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIds != null && message.projectIds.length) + for (var i = 0; i < message.projectIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); + return writer; + }; - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - return null; - }; + /** + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogEntriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.projectIds && message.projectIds.length)) + message.projectIds = []; + message.projectIds.push(reader.string()); + break; + case 8: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.orderBy = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + case 5: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - return object; - }; + return message; + }; - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return ServiceOptions; - })(); + /** + * Verifies a ListLogEntriesRequest message. + * @function verify + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogEntriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectIds != null && message.hasOwnProperty("projectIds")) { + if (!Array.isArray(message.projectIds)) + return "projectIds: array expected"; + for (var i = 0; i < message.projectIds.length; ++i) + if (!$util.isString(message.projectIds[i])) + return "projectIds: string[] expected"; + } + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - protobuf.MethodOptions = (function() { + /** + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + */ + ListLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) + return object; + var message = new $root.google.logging.v2.ListLogEntriesRequest(); + if (object.projectIds) { + if (!Array.isArray(object.projectIds)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.projectIds: array expected"); + message.projectIds = []; + for (var i = 0; i < object.projectIds.length; ++i) + message.projectIds[i] = String(object.projectIds[i]); + } + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ + /** + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.projectIds = []; + object.resourceNames = []; + } + if (options.defaults) { + object.filter = ""; + object.orderBy = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.projectIds && message.projectIds.length) { + object.projectIds = []; + for (var j = 0; j < message.projectIds.length; ++j) + object.projectIds[j] = message.projectIds[j]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } + return object; + }; - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this ListLogEntriesRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListLogEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; + return ListLogEntriesRequest; + })(); - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; + v2.ListLogEntriesResponse = (function() { - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Properties of a ListLogEntriesResponse. + * @memberof google.logging.v2 + * @interface IListLogEntriesResponse + * @property {Array.|null} [entries] ListLogEntriesResponse entries + * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken + */ - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; + /** + * Constructs a new ListLogEntriesResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogEntriesResponse. + * @implements IListLogEntriesResponse + * @constructor + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + */ + function ListLogEntriesResponse(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + /** + * ListLogEntriesResponse entries. + * @member {Array.} entries + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + */ + ListLogEntriesResponse.prototype.entries = $util.emptyArray; - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; + /** + * ListLogEntriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + */ + ListLogEntriesResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; + /** + * Creates a new ListLogEntriesResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance + */ + ListLogEntriesResponse.create = function create(properties) { + return new ListLogEntriesResponse(properties); + }; - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogEntriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; + /** + * Verifies a ListLogEntriesResponse message. + * @function verify + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + */ + ListLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) + return object; + var message = new $root.google.logging.v2.ListLogEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogEntriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + /** + * Converts this ListLogEntriesResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListLogEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogEntriesResponse; + })(); + + v2.ListMonitoredResourceDescriptorsRequest = (function() { + + /** + * Properties of a ListMonitoredResourceDescriptorsRequest. + * @memberof google.logging.v2 + * @interface IListMonitoredResourceDescriptorsRequest + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken + */ + + /** + * Constructs a new ListMonitoredResourceDescriptorsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest + * @constructor + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + */ + function ListMonitoredResourceDescriptorsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {string} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); + /** + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; - return MethodOptions; - })(); + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance + */ + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); + }; - protobuf.UninterpretedOption = (function() { + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pageSize = reader.int32(); + break; + case 2: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMonitoredResourceDescriptorsRequest message. + * @function verify + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ + /** + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + */ + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) + return object; + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; + /** + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; + return ListMonitoredResourceDescriptorsRequest; + })(); - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + v2.ListMonitoredResourceDescriptorsResponse = (function() { - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Properties of a ListMonitoredResourceDescriptorsResponse. + * @memberof google.logging.v2 + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken + */ - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; + /** + * Constructs a new ListMonitoredResourceDescriptorsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse + * @constructor + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + */ + function ListMonitoredResourceDescriptorsResponse(properties) { + this.resourceDescriptors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + /** + * ListMonitoredResourceDescriptorsResponse resourceDescriptors. + * @member {Array.} resourceDescriptors + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @instance + */ + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; + /** + * ListMonitoredResourceDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @instance + */ + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; + /** + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance + */ + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); + }; - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceDescriptors != null && message.resourceDescriptors.length) + for (var i = 0; i < message.resourceDescriptors.length; ++i) + $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.resourceDescriptors && message.resourceDescriptors.length)) + message.resourceDescriptors = []; + message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; + /** + * Verifies a ListMonitoredResourceDescriptorsResponse message. + * @function verify + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { + if (!Array.isArray(message.resourceDescriptors)) + return "resourceDescriptors: array expected"; + for (var i = 0; i < message.resourceDescriptors.length; ++i) { + var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); + if (error) + return "resourceDescriptors." + error; + } } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; + /** + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + */ + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) + return object; + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); + message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceDescriptors = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceDescriptors && message.resourceDescriptors.length) { + object.resourceDescriptors = []; + for (var j = 0; j < message.resourceDescriptors.length; ++j) + object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - UninterpretedOption.NamePart = (function() { + return ListMonitoredResourceDescriptorsResponse; + })(); + + v2.ListLogsRequest = (function() { /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension + * Properties of a ListLogsRequest. + * @memberof google.logging.v2 + * @interface IListLogsRequest + * @property {string|null} [parent] ListLogsRequest parent + * @property {number|null} [pageSize] ListLogsRequest pageSize + * @property {string|null} [pageToken] ListLogsRequest pageToken */ /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart + * Constructs a new ListLogsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogsRequest. + * @implements IListLogsRequest * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set */ - function NamePart(properties) { + function ListLogsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8108,423 +6974,231 @@ } /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart + * ListLogsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogsRequest * @instance */ - NamePart.prototype.namePart = ""; + ListLogsRequest.prototype.parent = ""; /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart + * ListLogsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogsRequest * @instance */ - NamePart.prototype.isExtension = false; + ListLogsRequest.prototype.pageSize = 0; /** - * Creates a new NamePart instance using the specified properties. + * ListLogsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogsRequest instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance */ - NamePart.create = function create(properties) { - return new NamePart(properties); + ListLogsRequest.create = function create(properties) { + return new ListLogsRequest(properties); }; /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + ListLogsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NamePart message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + ListLogsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.namePart = reader.string(); + message.parent = reader.string(); break; case 2: - message.isExtension = reader.bool(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); break; } } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NamePart message. + * Verifies a ListLogsRequest message. * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + ListLogsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + ListLogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsRequest) return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); + var message = new $root.google.logging.v2.ListLogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + ListLogsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.namePart = ""; - object.isExtension = false; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this NamePart to JSON. + * Converts this ListLogsRequest to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.logging.v2.ListLogsRequest * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ListLogsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - SourceCodeInfo.Location = (function() { + return ListLogsRequest; + })(); + + v2.ListLogsResponse = (function() { /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + * Properties of a ListLogsResponse. + * @memberof google.logging.v2 + * @interface IListLogsResponse + * @property {Array.|null} [logNames] ListLogsResponse logNames + * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken */ /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation + * Constructs a new ListLogsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogsResponse. + * @implements IListLogsResponse * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; + function ListLogsResponse(properties) { + this.logNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8532,152 +7206,91 @@ } /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location + * ListLogsResponse logNames. + * @member {Array.} logNames + * @memberof google.logging.v2.ListLogsResponse * @instance */ - Location.prototype.trailingComments = ""; + ListLogsResponse.prototype.logNames = $util.emptyArray; /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location + * ListLogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogsResponse * @instance */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + ListLogsResponse.prototype.nextPageToken = ""; /** - * Creates a new Location instance using the specified properties. + * Creates a new ListLogsResponse instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance */ - Location.create = function create(properties) { - return new Location(properties); + ListLogsResponse.create = function create(properties) { + return new ListLogsResponse(properties); }; /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + ListLogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.logNames != null && message.logNames.length) + for (var i = 0; i < message.logNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); return writer; }; /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Location message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + ListLogsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); + if (!(message.logNames && message.logNames.length)) + message.logNames = []; + message.logNames.push(reader.string()); break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -8688,390 +7301,145 @@ }; /** - * Decodes a Location message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Location message. + * Verifies a ListLogsResponse message. * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.logging.v2.ListLogsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + ListLogsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; + if (message.logNames != null && message.hasOwnProperty("logNames")) { + if (!Array.isArray(message.logNames)) + return "logNames: array expected"; + for (var i = 0; i < message.logNames.length; ++i) + if (!$util.isString(message.logNames[i])) + return "logNames: string[] expected"; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + /** + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + */ + ListLogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsResponse) + return object; + var message = new $root.google.logging.v2.ListLogsResponse(); + if (object.logNames) { + if (!Array.isArray(object.logNames)) + throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); + message.logNames = []; + for (var i = 0; i < object.logNames.length; ++i) + message.logNames[i] = String(object.logNames[i]); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + ListLogsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; + if (options.arrays || options.defaults) + object.logNames = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.logNames && message.logNames.length) { + object.logNames = []; + for (var j = 0; j < message.logNames.length; ++j) + object.logNames[j] = message.logNames[j]; + } + return object; + }; - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; + /** + * Converts this ListLogsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLogsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ListLogsResponse; + })(); - GeneratedCodeInfo.Annotation = (function() { + v2.LogEntry = (function() { /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end + * Properties of a LogEntry. + * @memberof google.logging.v2 + * @interface ILogEntry + * @property {string|null} [logName] LogEntry logName + * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource + * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload + * @property {string|null} [textPayload] LogEntry textPayload + * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload + * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp + * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp + * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity + * @property {string|null} [insertId] LogEntry insertId + * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest + * @property {Object.|null} [labels] LogEntry labels + * @property {google.api.IMonitoredResourceMetadata|null} [metadata] LogEntry metadata + * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation + * @property {string|null} [trace] LogEntry trace + * @property {string|null} [spanId] LogEntry spanId + * @property {boolean|null} [traceSampled] LogEntry traceSampled + * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation */ /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation + * Constructs a new LogEntry. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntry. + * @implements ILogEntry * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set */ - function Annotation(properties) { - this.path = []; + function LogEntry(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9079,125 +7447,303 @@ } /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * LogEntry logName. + * @member {string} logName + * @memberof google.logging.v2.LogEntry * @instance */ - Annotation.prototype.path = $util.emptyArray; + LogEntry.prototype.logName = ""; /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * LogEntry resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.LogEntry * @instance */ - Annotation.prototype.sourceFile = ""; + LogEntry.prototype.resource = null; /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * LogEntry protoPayload. + * @member {google.protobuf.IAny|null|undefined} protoPayload + * @memberof google.logging.v2.LogEntry * @instance */ - Annotation.prototype.begin = 0; + LogEntry.prototype.protoPayload = null; /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * LogEntry textPayload. + * @member {string} textPayload + * @memberof google.logging.v2.LogEntry * @instance */ - Annotation.prototype.end = 0; + LogEntry.prototype.textPayload = ""; /** - * Creates a new Annotation instance using the specified properties. + * LogEntry jsonPayload. + * @member {google.protobuf.IStruct|null|undefined} jsonPayload + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.jsonPayload = null; + + /** + * LogEntry timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.timestamp = null; + + /** + * LogEntry receiveTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.receiveTimestamp = null; + + /** + * LogEntry severity. + * @member {google.logging.type.LogSeverity} severity + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.severity = 0; + + /** + * LogEntry insertId. + * @member {string} insertId + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.insertId = ""; + + /** + * LogEntry httpRequest. + * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.httpRequest = null; + + /** + * LogEntry labels. + * @member {Object.} labels + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.labels = $util.emptyObject; + + /** + * LogEntry metadata. + * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.metadata = null; + + /** + * LogEntry operation. + * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.operation = null; + + /** + * LogEntry trace. + * @member {string} trace + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.trace = ""; + + /** + * LogEntry spanId. + * @member {string} spanId + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.spanId = ""; + + /** + * LogEntry traceSampled. + * @member {boolean} traceSampled + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.traceSampled = false; + + /** + * LogEntry sourceLocation. + * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.sourceLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LogEntry payload. + * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload + * @memberof google.logging.v2.LogEntry + * @instance + */ + Object.defineProperty(LogEntry.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogEntry instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.logging.v2.LogEntry * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + * @returns {google.logging.v2.LogEntry} LogEntry instance */ - Annotation.create = function create(properties) { - return new Annotation(properties); + LogEntry.create = function create(properties) { + return new LogEntry(properties); }; /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.logging.v2.LogEntry * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encode = function encode(message, writer) { + LogEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && message.hasOwnProperty("begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && message.hasOwnProperty("end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) + $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textPayload != null && message.hasOwnProperty("textPayload")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); + if (message.insertId != null && message.hasOwnProperty("insertId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) + $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.severity != null && message.hasOwnProperty("severity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); + if (message.operation != null && message.hasOwnProperty("operation")) + $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.trace != null && message.hasOwnProperty("trace")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.spanId != null && message.hasOwnProperty("spanId")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); return writer; }; /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.logging.v2.LogEntry * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { + LogEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a LogEntry message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.logging.v2.LogEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @returns {google.logging.v2.LogEntry} LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Annotation.decode = function decode(reader, length) { + LogEntry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); + case 12: + message.logName = reader.string(); + break; + case 8: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); break; case 2: - message.sourceFile = reader.string(); + message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); break; case 3: - message.begin = reader.int32(); + message.textPayload = reader.string(); + break; + case 6: + message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 9: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 24: + message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.severity = reader.int32(); break; case 4: - message.end = reader.int32(); + message.insertId = reader.string(); + break; + case 7: + message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); + break; + case 11: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 25: + message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); + break; + case 15: + message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); + break; + case 22: + message.trace = reader.string(); + break; + case 27: + message.spanId = reader.string(); + break; + case 30: + message.traceSampled = reader.bool(); + break; + case 23: + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9208,1563 +7754,1752 @@ }; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a LogEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.logging.v2.LogEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @returns {google.logging.v2.LogEntry} LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Annotation.decodeDelimited = function decodeDelimited(reader) { + LogEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Annotation message. + * Verifies a LogEntry message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.logging.v2.LogEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Annotation.verify = function verify(message) { + LogEntry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; + var properties = {}; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + properties.payload = 1; + { + var error = $root.google.protobuf.Any.verify(message.protoPayload); + if (error) + return "protoPayload." + error; + } + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + if (!$util.isString(message.textPayload)) + return "textPayload: string expected"; + } + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.protobuf.Struct.verify(message.jsonPayload); + if (error) + return "jsonPayload." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); + if (error) + return "receiveTimestamp." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 100: + case 200: + case 300: + case 400: + case 500: + case 600: + case 700: + case 800: + break; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + if (!$util.isString(message.insertId)) + return "insertId: string expected"; + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { + var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); + if (error) + return "httpRequest." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.operation != null && message.hasOwnProperty("operation")) { + var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); + if (error) + return "operation." + error; + } + if (message.trace != null && message.hasOwnProperty("trace")) + if (!$util.isString(message.trace)) + return "trace: string expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!$util.isString(message.spanId)) + return "spanId: string expected"; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + if (typeof message.traceSampled !== "boolean") + return "traceSampled: boolean expected"; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { + var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); + if (error) + return "sourceLocation." + error; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; return null; }; /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.logging.v2.LogEntry * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @returns {google.logging.v2.LogEntry} LogEntry */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + LogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntry) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; + var message = new $root.google.logging.v2.LogEntry(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; + if (object.protoPayload != null) { + if (typeof object.protoPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); + message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; + if (object.textPayload != null) + message.textPayload = String(object.textPayload); + if (object.jsonPayload != null) { + if (typeof object.jsonPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); + message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Struct = (function() { - - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ - - /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct - * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set - */ - function Struct(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. - * @function create - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance - */ - Struct.create = function create(properties) { - return new Struct(properties); - }; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && message.hasOwnProperty("fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); } - return writer; - }; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - reader.skip().pos++; - if (message.fields === $util.emptyObject) - message.fields = {}; - key = reader.string(); - reader.pos++; - message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + if (object.receiveTimestamp != null) { + if (typeof object.receiveTimestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); + message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); + } + switch (object.severity) { + case "DEFAULT": + case 0: + message.severity = 0; break; - default: - reader.skipType(tag & 7); + case "DEBUG": + case 100: + message.severity = 100; + break; + case "INFO": + case 200: + message.severity = 200; + break; + case "NOTICE": + case 300: + message.severity = 300; + break; + case "WARNING": + case 400: + message.severity = 400; + break; + case "ERROR": + case 500: + message.severity = 500; + break; + case "CRITICAL": + case 600: + message.severity = 600; + break; + case "ALERT": + case 700: + message.severity = 700; + break; + case "EMERGENCY": + case 800: + message.severity = 800; break; } - } - return message; - }; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Struct message. - * @function verify - * @memberof google.protobuf.Struct - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Struct.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; + if (object.insertId != null) + message.insertId = String(object.insertId); + if (object.httpRequest != null) { + if (typeof object.httpRequest !== "object") + throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); + message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.logging.v2.LogEntry.metadata: object expected"); + message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); + } + if (object.operation != null) { + if (typeof object.operation !== "object") + throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); + message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); } - } - return null; - }; - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Struct - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct - */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) - return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + if (object.trace != null) + message.trace = String(object.trace); + if (object.spanId != null) + message.spanId = String(object.spanId); + if (object.traceSampled != null) + message.traceSampled = Boolean(object.traceSampled); + if (object.sourceLocation != null) { + if (typeof object.sourceLocation !== "object") + throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); } - } - return message; - }; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.Struct} message Struct - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Struct.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } - return object; - }; - - /** - * Converts this Struct to JSON. - * @function toJSON - * @memberof google.protobuf.Struct - * @instance - * @returns {Object.} JSON object - */ - Struct.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Struct; - })(); - - protobuf.Value = (function() { - - /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue - */ - - /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return message; + }; - /** - * Value nullValue. - * @member {google.protobuf.NullValue} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = 0; + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.LogEntry} message LogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.insertId = ""; + object.httpRequest = null; + object.resource = null; + object.timestamp = null; + object.severity = options.enums === String ? "DEFAULT" : 0; + object.logName = ""; + object.operation = null; + object.trace = ""; + object.sourceLocation = null; + object.receiveTimestamp = null; + object.metadata = null; + object.spanId = ""; + object.traceSampled = false; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); + if (options.oneofs) + object.payload = "protoPayload"; + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + object.textPayload = message.textPayload; + if (options.oneofs) + object.payload = "textPayload"; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + object.insertId = message.insertId; + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); + if (options.oneofs) + object.payload = "jsonPayload"; + } + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); + if (message.trace != null && message.hasOwnProperty("trace")) + object.trace = message.trace; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = message.spanId; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + object.traceSampled = message.traceSampled; + return object; + }; - /** - * Value numberValue. - * @member {number} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = 0; + /** + * Converts this LogEntry to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntry + * @instance + * @returns {Object.} JSON object + */ + LogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Value stringValue. - * @member {string} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = ""; + return LogEntry; + })(); - /** - * Value boolValue. - * @member {boolean} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = false; + v2.LogEntryOperation = (function() { - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; + /** + * Properties of a LogEntryOperation. + * @memberof google.logging.v2 + * @interface ILogEntryOperation + * @property {string|null} [id] LogEntryOperation id + * @property {string|null} [producer] LogEntryOperation producer + * @property {boolean|null} [first] LogEntryOperation first + * @property {boolean|null} [last] LogEntryOperation last + */ - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; + /** + * Constructs a new LogEntryOperation. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntryOperation. + * @implements ILogEntryOperation + * @constructor + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + */ + function LogEntryOperation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * LogEntryOperation id. + * @member {string} id + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.id = ""; - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * LogEntryOperation producer. + * @member {string} producer + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.producer = ""; - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; + /** + * LogEntryOperation first. + * @member {boolean} first + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.first = false; - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nullValue != null && message.hasOwnProperty("nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && message.hasOwnProperty("numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && message.hasOwnProperty("structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && message.hasOwnProperty("listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * LogEntryOperation last. + * @member {boolean} last + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.last = false; - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new LogEntryOperation instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance + */ + LogEntryOperation.create = function create(properties) { + return new LogEntryOperation(properties); + }; - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nullValue = reader.int32(); - break; - case 2: - message.numberValue = reader.double(); - break; - case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntryOperation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.producer != null && message.hasOwnProperty("producer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); + if (message.first != null && message.hasOwnProperty("first")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); + if (message.last != null && message.hasOwnProperty("last")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); + return writer; + }; + + /** + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntryOperation message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntryOperation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.producer = reader.string(); + break; + case 3: + message.first = reader.bool(); + break; + case 4: + message.last = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Value message. - * @function verify - * @memberof google.protobuf.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } - return null; - }; + /** + * Verifies a LogEntryOperation message. + * @function verify + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntryOperation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.producer != null && message.hasOwnProperty("producer")) + if (!$util.isString(message.producer)) + return "producer: string expected"; + if (message.first != null && message.hasOwnProperty("first")) + if (typeof message.first !== "boolean") + return "first: boolean expected"; + if (message.last != null && message.hasOwnProperty("last")) + if (typeof message.last !== "boolean") + return "last: boolean expected"; + return null; + }; - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) - return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } - return message; - }; + /** + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + */ + LogEntryOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntryOperation) + return object; + var message = new $root.google.logging.v2.LogEntryOperation(); + if (object.id != null) + message.id = String(object.id); + if (object.producer != null) + message.producer = String(object.producer); + if (object.first != null) + message.first = Boolean(object.first); + if (object.last != null) + message.last = Boolean(object.last); + return message; + }; - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; + /** + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntryOperation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.producer = ""; + object.first = false; + object.last = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.producer != null && message.hasOwnProperty("producer")) + object.producer = message.producer; + if (message.first != null && message.hasOwnProperty("first")) + object.first = message.first; + if (message.last != null && message.hasOwnProperty("last")) + object.last = message.last; + return object; + }; - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.protobuf.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this LogEntryOperation to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntryOperation + * @instance + * @returns {Object.} JSON object + */ + LogEntryOperation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Value; - })(); + return LogEntryOperation; + })(); - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {string} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); + v2.LogEntrySourceLocation = (function() { - protobuf.ListValue = (function() { + /** + * Properties of a LogEntrySourceLocation. + * @memberof google.logging.v2 + * @interface ILogEntrySourceLocation + * @property {string|null} [file] LogEntrySourceLocation file + * @property {number|Long|null} [line] LogEntrySourceLocation line + * @property {string|null} ["function"] LogEntrySourceLocation function + */ - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ + /** + * Constructs a new LogEntrySourceLocation. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntrySourceLocation. + * @implements ILogEntrySourceLocation + * @constructor + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + */ + function LogEntrySourceLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue - * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set - */ - function ListValue(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * LogEntrySourceLocation file. + * @member {string} file + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype.file = ""; - /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; + /** + * LogEntrySourceLocation line. + * @member {number|Long} line + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a new ListValue instance using the specified properties. - * @function create - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance - */ - ListValue.create = function create(properties) { - return new ListValue(properties); - }; + /** + * LogEntrySourceLocation function. + * @member {string} function + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype["function"] = ""; - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new LogEntrySourceLocation instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance + */ + LogEntrySourceLocation.create = function create(properties) { + return new LogEntrySourceLocation(properties); + }; - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntrySourceLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.hasOwnProperty("file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.line != null && message.hasOwnProperty("line")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); + if (message["function"] != null && message.hasOwnProperty("function")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); + return writer; + }; - /** - * Decodes a ListValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntrySourceLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = reader.string(); + break; + case 2: + message.line = reader.int64(); + break; + case 3: + message["function"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListValue message. - * @function verify - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; + /** + * Verifies a LogEntrySourceLocation message. + * @function verify + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntrySourceLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) + if (!$util.isString(message.file)) + return "file: string expected"; + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) + return "line: integer|Long expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + if (!$util.isString(message["function"])) + return "function: string expected"; + return null; + }; - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue - */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } - return message; - }; + /** + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + */ + LogEntrySourceLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) + return object; + var message = new $root.google.logging.v2.LogEntrySourceLocation(); + if (object.file != null) + message.file = String(object.file); + if (object.line != null) + if ($util.Long) + (message.line = $util.Long.fromValue(object.line)).unsigned = false; + else if (typeof object.line === "string") + message.line = parseInt(object.line, 10); + else if (typeof object.line === "number") + message.line = object.line; + else if (typeof object.line === "object") + message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); + if (object["function"] != null) + message["function"] = String(object["function"]); + return message; + }; - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.ListValue} message ListValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } - return object; - }; + /** + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntrySourceLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.file = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.line = options.longs === String ? "0" : 0; + object["function"] = ""; + } + if (message.file != null && message.hasOwnProperty("file")) + object.file = message.file; + if (message.line != null && message.hasOwnProperty("line")) + if (typeof message.line === "number") + object.line = options.longs === String ? String(message.line) : message.line; + else + object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = message["function"]; + return object; + }; - /** - * Converts this ListValue to JSON. - * @function toJSON - * @memberof google.protobuf.ListValue - * @instance - * @returns {Object.} JSON object - */ - ListValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this LogEntrySourceLocation to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + * @returns {Object.} JSON object + */ + LogEntrySourceLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListValue; - })(); + return LogEntrySourceLocation; + })(); - protobuf.Any = (function() { + v2.MetricsServiceV2 = (function() { - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ + /** + * Constructs a new MetricsServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a MetricsServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MetricsServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + (MetricsServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsServiceV2; - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; + /** + * Creates new MetricsServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.MetricsServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MetricsServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + MetricsServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef ListLogMetricsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogMetricsResponse} [response] ListLogMetricsResponse + */ - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; + /** + * Calls ListLogMetrics. + * @function listLogMetrics + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.ListLogMetricsCallback} callback Node-style callback called with the error, if any, and ListLogMetricsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.listLogMetrics = function listLogMetrics(request, callback) { + return this.rpcCall(listLogMetrics, $root.google.logging.v2.ListLogMetricsRequest, $root.google.logging.v2.ListLogMetricsResponse, request, callback); + }, "name", { value: "ListLogMetrics" }); - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; + /** + * Calls ListLogMetrics. + * @function listLogMetrics + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef GetLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls GetLogMetric. + * @function getLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.GetLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.getLogMetric = function getLogMetric(request, callback) { + return this.rpcCall(getLogMetric, $root.google.logging.v2.GetLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "GetLogMetric" }); - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls GetLogMetric. + * @function getLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef CreateLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; + /** + * Calls CreateLogMetric. + * @function createLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.CreateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.createLogMetric = function createLogMetric(request, callback) { + return this.rpcCall(createLogMetric, $root.google.logging.v2.CreateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "CreateLogMetric" }); - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; + /** + * Calls CreateLogMetric. + * @function createLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef UpdateLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ - return Any; - })(); + /** + * Calls UpdateLogMetric. + * @function updateLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.updateLogMetric = function updateLogMetric(request, callback) { + return this.rpcCall(updateLogMetric, $root.google.logging.v2.UpdateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "UpdateLogMetric" }); - return protobuf; - })(); + /** + * Calls UpdateLogMetric. + * @function updateLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - google.logging = (function() { + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef DeleteLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Namespace logging. - * @memberof google - * @namespace - */ - var logging = {}; + /** + * Calls DeleteLogMetric. + * @function deleteLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.deleteLogMetric = function deleteLogMetric(request, callback) { + return this.rpcCall(deleteLogMetric, $root.google.logging.v2.DeleteLogMetricRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLogMetric" }); - logging.v2 = (function() { + /** + * Calls DeleteLogMetric. + * @function deleteLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Namespace v2. - * @memberof google.logging - * @namespace - */ - var v2 = {}; + return MetricsServiceV2; + })(); - v2.ConfigServiceV2 = (function() { + v2.LogMetric = (function() { /** - * Constructs a new ConfigServiceV2 service. + * Properties of a LogMetric. * @memberof google.logging.v2 - * @classdesc Represents a ConfigServiceV2 - * @extends $protobuf.rpc.Service + * @interface ILogMetric + * @property {string|null} [name] LogMetric name + * @property {string|null} [description] LogMetric description + * @property {string|null} [filter] LogMetric filter + * @property {google.api.IMetricDescriptor|null} [metricDescriptor] LogMetric metricDescriptor + * @property {string|null} [valueExtractor] LogMetric valueExtractor + * @property {Object.|null} [labelExtractors] LogMetric labelExtractors + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] LogMetric bucketOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogMetric createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogMetric updateTime + * @property {google.logging.v2.LogMetric.ApiVersion|null} [version] LogMetric version + */ + + /** + * Constructs a new LogMetric. + * @memberof google.logging.v2 + * @classdesc Represents a LogMetric. + * @implements ILogMetric * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.logging.v2.ILogMetric=} [properties] Properties to set */ - function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function LogMetric(properties) { + this.labelExtractors = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; + /** + * LogMetric name. + * @member {string} name + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.name = ""; /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.ConfigServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. + * LogMetric description. + * @member {string} description + * @memberof google.logging.v2.LogMetric + * @instance */ - ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + LogMetric.prototype.description = ""; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListSinksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse + * LogMetric filter. + * @member {string} filter + * @memberof google.logging.v2.LogMetric + * @instance */ + LogMetric.prototype.filter = ""; /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 + * LogMetric metricDescriptor. + * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor + * @memberof google.logging.v2.LogMetric * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { - return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); - }, "name", { value: "ListSinks" }); + LogMetric.prototype.metricDescriptor = null; /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 + * LogMetric valueExtractor. + * @member {string} valueExtractor + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.valueExtractor = ""; + + /** + * LogMetric labelExtractors. + * @member {Object.} labelExtractors + * @memberof google.logging.v2.LogMetric * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + LogMetric.prototype.labelExtractors = $util.emptyObject; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * LogMetric bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.logging.v2.LogMetric + * @instance */ + LogMetric.prototype.bucketOptions = null; /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 + * LogMetric createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogMetric * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { - return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "GetSink" }); + LogMetric.prototype.createTime = null; + + /** + * LogMetric updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.updateTime = null; + + /** + * LogMetric version. + * @member {google.logging.v2.LogMetric.ApiVersion} version + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.version = 0; + + /** + * Creates a new LogMetric instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric=} [properties] Properties to set + * @returns {google.logging.v2.LogMetric} LogMetric instance + */ + LogMetric.create = function create(properties) { + return new LogMetric(properties); + }; + + /** + * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogMetric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueExtractor); + if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) + for (var keys = Object.keys(message.labelExtractors), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labelExtractors[keys[i]]).ldelim(); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + LogMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * Decodes a LogMetric message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogMetric} LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + LogMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 5: + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + break; + case 6: + message.valueExtractor = reader.string(); + break; + case 7: + reader.skip().pos++; + if (message.labelExtractors === $util.emptyObject) + message.labelExtractors = {}; + key = reader.string(); + reader.pos++; + message.labelExtractors[key] = reader.string(); + break; + case 8: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 9: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.version = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 + * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogMetric} LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { - return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "CreateSink" }); + LogMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a LogMetric message. + * @function verify + * @memberof google.logging.v2.LogMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + LogMetric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); + if (error) + return "metricDescriptor." + error; + } + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + if (!$util.isString(message.valueExtractor)) + return "valueExtractor: string expected"; + if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) { + if (!$util.isObject(message.labelExtractors)) + return "labelExtractors: object expected"; + var key = Object.keys(message.labelExtractors); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labelExtractors[key[i]])) + return "labelExtractors: string{k:string} expected"; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.version != null && message.hasOwnProperty("version")) + switch (message.version) { + default: + return "version: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogMetric + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogMetric} LogMetric */ + LogMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogMetric) + return object; + var message = new $root.google.logging.v2.LogMetric(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.metricDescriptor != null) { + if (typeof object.metricDescriptor !== "object") + throw TypeError(".google.logging.v2.LogMetric.metricDescriptor: object expected"); + message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); + } + if (object.valueExtractor != null) + message.valueExtractor = String(object.valueExtractor); + if (object.labelExtractors) { + if (typeof object.labelExtractors !== "object") + throw TypeError(".google.logging.v2.LogMetric.labelExtractors: object expected"); + message.labelExtractors = {}; + for (var keys = Object.keys(object.labelExtractors), i = 0; i < keys.length; ++i) + message.labelExtractors[keys[i]] = String(object.labelExtractors[keys[i]]); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.logging.v2.LogMetric.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogMetric.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogMetric.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.version) { + case "V2": + case 0: + message.version = 0; + break; + case "V1": + case 1: + message.version = 1; + break; + } + return message; + }; /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 + * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.LogMetric} message LogMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { - return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "UpdateSink" }); + LogMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labelExtractors = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.filter = ""; + object.version = options.enums === String ? "V2" : 0; + object.metricDescriptor = null; + object.valueExtractor = ""; + object.bucketOptions = null; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.version != null && message.hasOwnProperty("version")) + object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + object.valueExtractor = message.valueExtractor; + var keys2; + if (message.labelExtractors && (keys2 = Object.keys(message.labelExtractors)).length) { + object.labelExtractors = {}; + for (var j = 0; j < keys2.length; ++j) + object.labelExtractors[keys2[j]] = message.labelExtractors[keys2[j]]; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this LogMetric to JSON. + * @function toJSON + * @memberof google.logging.v2.LogMetric * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + LogMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * ApiVersion enum. + * @name google.logging.v2.LogMetric.ApiVersion + * @enum {string} + * @property {number} V2=0 V2 value + * @property {number} V1=1 V1 value */ + LogMetric.ApiVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "V2"] = 0; + values[valuesById[1] = "V1"] = 1; + return values; + })(); - /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { - return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSink" }); + return LogMetric; + })(); - /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v2.ListLogMetricsRequest = (function() { /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListExclusionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse + * Properties of a ListLogMetricsRequest. + * @memberof google.logging.v2 + * @interface IListLogMetricsRequest + * @property {string|null} [parent] ListLogMetricsRequest parent + * @property {string|null} [pageToken] ListLogMetricsRequest pageToken + * @property {number|null} [pageSize] ListLogMetricsRequest pageSize */ /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse - * @returns {undefined} - * @variation 1 + * Constructs a new ListLogMetricsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogMetricsRequest. + * @implements IListLogMetricsRequest + * @constructor + * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set */ - Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { - return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); - }, "name", { value: "ListExclusions" }); + function ListLogMetricsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 + * ListLogMetricsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogMetricsRequest * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion */ + ListLogMetricsRequest.prototype.parent = ""; /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * ListLogMetricsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogMetricsRequest * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { - return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "GetExclusion" }); + ListLogMetricsRequest.prototype.pageToken = ""; /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * ListLogMetricsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogMetricsRequest * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListLogMetricsRequest.prototype.pageSize = 0; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Creates a new ListLogMetricsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest instance */ + ListLogMetricsRequest.create = function create(properties) { + return new ListLogMetricsRequest(properties); + }; /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 + * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { - return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "CreateExclusion" }); + ListLogMetricsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListLogMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListLogMetricsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 + * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { - return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "UpdateExclusion" }); + ListLogMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListLogMetricsRequest message. + * @function verify + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListLogMetricsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest */ + ListLogMetricsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogMetricsRequest) + return object; + var message = new $root.google.logging.v2.ListLogMetricsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.ListLogMetricsRequest} message ListLogMetricsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { - return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteExclusion" }); + ListLogMetricsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this ListLogMetricsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogMetricsRequest * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListLogMetricsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ConfigServiceV2; + return ListLogMetricsRequest; })(); - v2.LogSink = (function() { + v2.ListLogMetricsResponse = (function() { /** - * Properties of a LogSink. + * Properties of a ListLogMetricsResponse. * @memberof google.logging.v2 - * @interface ILogSink - * @property {string|null} [name] LogSink name - * @property {string|null} [destination] LogSink destination - * @property {string|null} [filter] LogSink filter - * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat - * @property {string|null} [writerIdentity] LogSink writerIdentity - * @property {boolean|null} [includeChildren] LogSink includeChildren - * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime - * @property {google.protobuf.ITimestamp|null} [startTime] LogSink startTime - * @property {google.protobuf.ITimestamp|null} [endTime] LogSink endTime + * @interface IListLogMetricsResponse + * @property {Array.|null} [metrics] ListLogMetricsResponse metrics + * @property {string|null} [nextPageToken] ListLogMetricsResponse nextPageToken */ /** - * Constructs a new LogSink. + * Constructs a new ListLogMetricsResponse. * @memberof google.logging.v2 - * @classdesc Represents a LogSink. - * @implements ILogSink + * @classdesc Represents a ListLogMetricsResponse. + * @implements IListLogMetricsResponse * @constructor - * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set */ - function LogSink(properties) { + function ListLogMetricsResponse(properties) { + this.metrics = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10772,219 +9507,304 @@ } /** - * LogSink name. - * @member {string} name - * @memberof google.logging.v2.LogSink + * ListLogMetricsResponse metrics. + * @member {Array.} metrics + * @memberof google.logging.v2.ListLogMetricsResponse * @instance */ - LogSink.prototype.name = ""; + ListLogMetricsResponse.prototype.metrics = $util.emptyArray; /** - * LogSink destination. - * @member {string} destination - * @memberof google.logging.v2.LogSink + * ListLogMetricsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogMetricsResponse * @instance */ - LogSink.prototype.destination = ""; + ListLogMetricsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogMetricsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse instance + */ + ListLogMetricsResponse.create = function create(properties) { + return new ListLogMetricsResponse(properties); + }; + + /** + * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.logging.v2.LogMetric.encode(message.metrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * LogSink filter. - * @member {string} filter - * @memberof google.logging.v2.LogSink - * @instance + * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.prototype.filter = ""; + ListLogMetricsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * LogSink outputVersionFormat. - * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat - * @memberof google.logging.v2.LogSink - * @instance + * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.prototype.outputVersionFormat = 0; + ListLogMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * LogSink writerIdentity. - * @member {string} writerIdentity - * @memberof google.logging.v2.LogSink - * @instance + * Verifies a ListLogMetricsResponse message. + * @function verify + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogSink.prototype.writerIdentity = ""; + ListLogMetricsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.logging.v2.LogMetric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * LogSink includeChildren. - * @member {boolean} includeChildren - * @memberof google.logging.v2.LogSink - * @instance + * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse */ - LogSink.prototype.includeChildren = false; + ListLogMetricsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogMetricsResponse) + return object; + var message = new $root.google.logging.v2.ListLogMetricsResponse(); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: object expected"); + message.metrics[i] = $root.google.logging.v2.LogMetric.fromObject(object.metrics[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * LogSink bigqueryOptions. - * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions - * @memberof google.logging.v2.LogSink - * @instance + * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.ListLogMetricsResponse} message ListLogMetricsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - LogSink.prototype.bigqueryOptions = null; + ListLogMetricsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.logging.v2.LogMetric.toObject(message.metrics[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * LogSink createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogSink + * Converts this ListLogMetricsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogMetricsResponse * @instance + * @returns {Object.} JSON object */ - LogSink.prototype.createTime = null; + ListLogMetricsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LogSink updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.updateTime = null; + return ListLogMetricsResponse; + })(); + + v2.GetLogMetricRequest = (function() { /** - * LogSink startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.logging.v2.LogSink - * @instance + * Properties of a GetLogMetricRequest. + * @memberof google.logging.v2 + * @interface IGetLogMetricRequest + * @property {string|null} [metricName] GetLogMetricRequest metricName */ - LogSink.prototype.startTime = null; /** - * LogSink endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.logging.v2.LogSink - * @instance + * Constructs a new GetLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetLogMetricRequest. + * @implements IGetLogMetricRequest + * @constructor + * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set */ - LogSink.prototype.endTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + function GetLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * LogSink options. - * @member {"bigqueryOptions"|undefined} options - * @memberof google.logging.v2.LogSink + * GetLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.GetLogMetricRequest * @instance */ - Object.defineProperty(LogSink.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetLogMetricRequest.prototype.metricName = ""; /** - * Creates a new LogSink instance using the specified properties. + * Creates a new GetLogMetricRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.ILogSink=} [properties] Properties to set - * @returns {google.logging.v2.LogSink} LogSink instance - */ - LogSink.create = function create(properties) { - return new LogSink(properties); - }; - - /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogSink.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.destination != null && message.hasOwnProperty("destination")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) - $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest instance + */ + GetLogMetricRequest.create = function create(properties) { + return new GetLogMetricRequest(properties); + }; + + /** + * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && message.hasOwnProperty("metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); return writer; }; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.GetLogMetricRequest * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogSink.encodeDelimited = function encodeDelimited(message, writer) { + GetLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes a GetLogMetricRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.GetLogMetricRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decode = function decode(reader, length) { + GetLogMetricRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLogMetricRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 3: - message.destination = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 6: - message.outputVersionFormat = reader.int32(); - break; - case 8: - message.writerIdentity = reader.string(); - break; - case 9: - message.includeChildren = reader.bool(); - break; - case 12: - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); - break; - case 13: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.metricName = reader.string(); break; default: reader.skipType(tag & 7); @@ -10995,253 +9815,108 @@ }; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.GetLogMetricRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decodeDelimited = function decodeDelimited(reader) { + GetLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogSink message. + * Verifies a GetLogMetricRequest message. * @function verify - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.GetLogMetricRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogSink.verify = function verify(message) { + GetLogMetricRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) - if (!$util.isString(message.destination)) - return "destination: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - switch (message.outputVersionFormat) { - default: - return "outputVersionFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - if (!$util.isString(message.writerIdentity)) - return "writerIdentity: string expected"; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - if (typeof message.includeChildren !== "boolean") - return "includeChildren: boolean expected"; - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - properties.options = 1; - { - var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); - if (error) - return "bigqueryOptions." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; return null; }; /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.GetLogMetricRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest */ - LogSink.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogSink) + GetLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetLogMetricRequest) return object; - var message = new $root.google.logging.v2.LogSink(); - if (object.name != null) - message.name = String(object.name); - if (object.destination != null) - message.destination = String(object.destination); - if (object.filter != null) - message.filter = String(object.filter); - switch (object.outputVersionFormat) { - case "VERSION_FORMAT_UNSPECIFIED": - case 0: - message.outputVersionFormat = 0; - break; - case "V2": - case 1: - message.outputVersionFormat = 1; - break; - case "V1": - case 2: - message.outputVersionFormat = 2; - break; - } - if (object.writerIdentity != null) - message.writerIdentity = String(object.writerIdentity); - if (object.includeChildren != null) - message.includeChildren = Boolean(object.includeChildren); - if (object.bigqueryOptions != null) { - if (typeof object.bigqueryOptions !== "object") - throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.logging.v2.LogSink.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.logging.v2.LogSink.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; - - /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.LogSink} message LogSink - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogSink.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.destination = ""; - object.filter = ""; - object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; - object.writerIdentity = ""; - object.includeChildren = false; - object.startTime = null; - object.endTime = null; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = message.destination; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - object.writerIdentity = message.writerIdentity; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - object.includeChildren = message.includeChildren; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); - if (options.oneofs) - object.options = "bigqueryOptions"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var message = new $root.google.logging.v2.GetLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.GetLogMetricRequest} message GetLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; return object; }; /** - * Converts this LogSink to JSON. + * Converts this GetLogMetricRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.GetLogMetricRequest * @instance * @returns {Object.} JSON object */ - LogSink.prototype.toJSON = function toJSON() { + GetLogMetricRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * VersionFormat enum. - * @name google.logging.v2.LogSink.VersionFormat - * @enum {string} - * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value - * @property {number} V2=1 V2 value - * @property {number} V1=2 V1 value - */ - LogSink.VersionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "V2"] = 1; - values[valuesById[2] = "V1"] = 2; - return values; - })(); - - return LogSink; + return GetLogMetricRequest; })(); - v2.BigQueryOptions = (function() { + v2.CreateLogMetricRequest = (function() { /** - * Properties of a BigQueryOptions. + * Properties of a CreateLogMetricRequest. * @memberof google.logging.v2 - * @interface IBigQueryOptions - * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @interface ICreateLogMetricRequest + * @property {string|null} [parent] CreateLogMetricRequest parent + * @property {google.logging.v2.ILogMetric|null} [metric] CreateLogMetricRequest metric */ /** - * Constructs a new BigQueryOptions. + * Constructs a new CreateLogMetricRequest. * @memberof google.logging.v2 - * @classdesc Represents a BigQueryOptions. - * @implements IBigQueryOptions + * @classdesc Represents a CreateLogMetricRequest. + * @implements ICreateLogMetricRequest * @constructor - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set */ - function BigQueryOptions(properties) { + function CreateLogMetricRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11249,75 +9924,88 @@ } /** - * BigQueryOptions usePartitionedTables. - * @member {boolean} usePartitionedTables - * @memberof google.logging.v2.BigQueryOptions + * CreateLogMetricRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateLogMetricRequest * @instance */ - BigQueryOptions.prototype.usePartitionedTables = false; + CreateLogMetricRequest.prototype.parent = ""; /** - * Creates a new BigQueryOptions instance using the specified properties. + * CreateLogMetricRequest metric. + * @member {google.logging.v2.ILogMetric|null|undefined} metric + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + */ + CreateLogMetricRequest.prototype.metric = null; + + /** + * Creates a new CreateLogMetricRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @static - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest instance */ - BigQueryOptions.create = function create(properties) { - return new BigQueryOptions(properties); + CreateLogMetricRequest.create = function create(properties) { + return new CreateLogMetricRequest(properties); }; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encode = function encode(message, writer) { + CreateLogMetricRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.metric != null && message.hasOwnProperty("metric")) + $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + CreateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a CreateLogMetricRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decode = function decode(reader, length) { + CreateLogMetricRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLogMetricRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.usePartitionedTables = reader.bool(); + message.parent = reader.string(); + break; + case 2: + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11328,109 +10016,122 @@ }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + CreateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryOptions message. + * Verifies a CreateLogMetricRequest message. * @function verify - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryOptions.verify = function verify(message) { + CreateLogMetricRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - if (typeof message.usePartitionedTables !== "boolean") - return "usePartitionedTables: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.logging.v2.LogMetric.verify(message.metric); + if (error) + return "metric." + error; + } return null; }; /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest */ - BigQueryOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.BigQueryOptions) + CreateLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateLogMetricRequest) return object; - var message = new $root.google.logging.v2.BigQueryOptions(); - if (object.usePartitionedTables != null) - message.usePartitionedTables = Boolean(object.usePartitionedTables); + var message = new $root.google.logging.v2.CreateLogMetricRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.logging.v2.CreateLogMetricRequest.metric: object expected"); + message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); + } return message; }; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @static - * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {google.logging.v2.CreateLogMetricRequest} message CreateLogMetricRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryOptions.toObject = function toObject(message, options) { + CreateLogMetricRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.usePartitionedTables = false; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - object.usePartitionedTables = message.usePartitionedTables; + if (options.defaults) { + object.parent = ""; + object.metric = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); return object; }; /** - * Converts this BigQueryOptions to JSON. + * Converts this CreateLogMetricRequest to JSON. * @function toJSON - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.CreateLogMetricRequest * @instance * @returns {Object.} JSON object */ - BigQueryOptions.prototype.toJSON = function toJSON() { + CreateLogMetricRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryOptions; + return CreateLogMetricRequest; })(); - v2.ListSinksRequest = (function() { + v2.UpdateLogMetricRequest = (function() { /** - * Properties of a ListSinksRequest. + * Properties of an UpdateLogMetricRequest. * @memberof google.logging.v2 - * @interface IListSinksRequest - * @property {string|null} [parent] ListSinksRequest parent - * @property {string|null} [pageToken] ListSinksRequest pageToken - * @property {number|null} [pageSize] ListSinksRequest pageSize + * @interface IUpdateLogMetricRequest + * @property {string|null} [metricName] UpdateLogMetricRequest metricName + * @property {google.logging.v2.ILogMetric|null} [metric] UpdateLogMetricRequest metric */ /** - * Constructs a new ListSinksRequest. + * Constructs a new UpdateLogMetricRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksRequest. - * @implements IListSinksRequest + * @classdesc Represents an UpdateLogMetricRequest. + * @implements IUpdateLogMetricRequest * @constructor - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set */ - function ListSinksRequest(properties) { + function UpdateLogMetricRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11438,101 +10139,88 @@ } /** - * ListSinksRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListSinksRequest - * @instance - */ - ListSinksRequest.prototype.parent = ""; - - /** - * ListSinksRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListSinksRequest + * UpdateLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.UpdateLogMetricRequest * @instance */ - ListSinksRequest.prototype.pageToken = ""; + UpdateLogMetricRequest.prototype.metricName = ""; /** - * ListSinksRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListSinksRequest + * UpdateLogMetricRequest metric. + * @member {google.logging.v2.ILogMetric|null|undefined} metric + * @memberof google.logging.v2.UpdateLogMetricRequest * @instance */ - ListSinksRequest.prototype.pageSize = 0; + UpdateLogMetricRequest.prototype.metric = null; /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new UpdateLogMetricRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksRequest - * @static - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest instance */ - ListSinksRequest.create = function create(properties) { - return new ListSinksRequest(properties); + UpdateLogMetricRequest.create = function create(properties) { + return new UpdateLogMetricRequest(properties); }; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.UpdateLogMetricRequest * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encode = function encode(message, writer) { + UpdateLogMetricRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.metricName != null && message.hasOwnProperty("metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.metric != null && message.hasOwnProperty("metric")) + $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.UpdateLogMetricRequest * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.UpdateLogMetricRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decode = function decode(reader, length) { + UpdateLogMetricRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateLogMetricRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.metricName = reader.string(); break; case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11543,126 +10231,121 @@ }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.UpdateLogMetricRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksRequest message. + * Verifies an UpdateLogMetricRequest message. * @function verify - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.UpdateLogMetricRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksRequest.verify = function verify(message) { + UpdateLogMetricRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.logging.v2.LogMetric.verify(message.metric); + if (error) + return "metric." + error; + } return null; }; /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.UpdateLogMetricRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest */ - ListSinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksRequest) + UpdateLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateLogMetricRequest) return object; - var message = new $root.google.logging.v2.ListSinksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.UpdateLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.logging.v2.UpdateLogMetricRequest.metric: object expected"); + message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); + } return message; }; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.UpdateLogMetricRequest * @static - * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {google.logging.v2.UpdateLogMetricRequest} message UpdateLogMetricRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksRequest.toObject = function toObject(message, options) { + UpdateLogMetricRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.metricName = ""; + object.metric = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); return object; }; /** - * Converts this ListSinksRequest to JSON. + * Converts this UpdateLogMetricRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.UpdateLogMetricRequest * @instance * @returns {Object.} JSON object */ - ListSinksRequest.prototype.toJSON = function toJSON() { + UpdateLogMetricRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksRequest; + return UpdateLogMetricRequest; })(); - v2.ListSinksResponse = (function() { + v2.DeleteLogMetricRequest = (function() { /** - * Properties of a ListSinksResponse. + * Properties of a DeleteLogMetricRequest. * @memberof google.logging.v2 - * @interface IListSinksResponse - * @property {Array.|null} [sinks] ListSinksResponse sinks - * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + * @interface IDeleteLogMetricRequest + * @property {string|null} [metricName] DeleteLogMetricRequest metricName */ /** - * Constructs a new ListSinksResponse. + * Constructs a new DeleteLogMetricRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksResponse. - * @implements IListSinksResponse + * @classdesc Represents a DeleteLogMetricRequest. + * @implements IDeleteLogMetricRequest * @constructor - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set */ - function ListSinksResponse(properties) { - this.sinks = []; + function DeleteLogMetricRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11670,91 +10353,75 @@ } /** - * ListSinksResponse sinks. - * @member {Array.} sinks - * @memberof google.logging.v2.ListSinksResponse - * @instance - */ - ListSinksResponse.prototype.sinks = $util.emptyArray; - - /** - * ListSinksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListSinksResponse + * DeleteLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.DeleteLogMetricRequest * @instance */ - ListSinksResponse.prototype.nextPageToken = ""; + DeleteLogMetricRequest.prototype.metricName = ""; /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new DeleteLogMetricRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @static - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest instance */ - ListSinksResponse.create = function create(properties) { - return new ListSinksResponse(properties); + DeleteLogMetricRequest.create = function create(properties) { + return new DeleteLogMetricRequest(properties); }; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encode = function encode(message, writer) { + DeleteLogMetricRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinks != null && message.sinks.length) - for (var i = 0; i < message.sinks.length; ++i) - $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.metricName != null && message.hasOwnProperty("metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); return writer; }; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decode = function decode(reader, length) { + DeleteLogMetricRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogMetricRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.sinks && message.sinks.length)) - message.sinks = []; - message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.metricName = reader.string(); break; default: reader.skipType(tag & 7); @@ -11765,133 +10432,133 @@ }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksResponse message. + * Verifies a DeleteLogMetricRequest message. * @function verify - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksResponse.verify = function verify(message) { + DeleteLogMetricRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinks != null && message.hasOwnProperty("sinks")) { - if (!Array.isArray(message.sinks)) - return "sinks: array expected"; - for (var i = 0; i < message.sinks.length; ++i) { - var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); - if (error) - return "sinks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; return null; }; /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest */ - ListSinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksResponse) + DeleteLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogMetricRequest) return object; - var message = new $root.google.logging.v2.ListSinksResponse(); - if (object.sinks) { - if (!Array.isArray(object.sinks)) - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); - message.sinks = []; - for (var i = 0; i < object.sinks.length; ++i) { - if (typeof object.sinks[i] !== "object") - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); - message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.DeleteLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); return message; }; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @static - * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {google.logging.v2.DeleteLogMetricRequest} message DeleteLogMetricRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksResponse.toObject = function toObject(message, options) { + DeleteLogMetricRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sinks = []; if (options.defaults) - object.nextPageToken = ""; - if (message.sinks && message.sinks.length) { - object.sinks = []; - for (var j = 0; j < message.sinks.length; ++j) - object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; return object; }; /** - * Converts this ListSinksResponse to JSON. + * Converts this DeleteLogMetricRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteLogMetricRequest * @instance * @returns {Object.} JSON object */ - ListSinksResponse.prototype.toJSON = function toJSON() { + DeleteLogMetricRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksResponse; + return DeleteLogMetricRequest; })(); - v2.GetSinkRequest = (function() { + return v2; + })(); + + logging.type = (function() { + + /** + * Namespace type. + * @memberof google.logging + * @namespace + */ + var type = {}; + + type.HttpRequest = (function() { /** - * Properties of a GetSinkRequest. - * @memberof google.logging.v2 - * @interface IGetSinkRequest - * @property {string|null} [sinkName] GetSinkRequest sinkName + * Properties of a HttpRequest. + * @memberof google.logging.type + * @interface IHttpRequest + * @property {string|null} [requestMethod] HttpRequest requestMethod + * @property {string|null} [requestUrl] HttpRequest requestUrl + * @property {number|Long|null} [requestSize] HttpRequest requestSize + * @property {number|null} [status] HttpRequest status + * @property {number|Long|null} [responseSize] HttpRequest responseSize + * @property {string|null} [userAgent] HttpRequest userAgent + * @property {string|null} [remoteIp] HttpRequest remoteIp + * @property {string|null} [serverIp] HttpRequest serverIp + * @property {string|null} [referer] HttpRequest referer + * @property {google.protobuf.IDuration|null} [latency] HttpRequest latency + * @property {boolean|null} [cacheLookup] HttpRequest cacheLookup + * @property {boolean|null} [cacheHit] HttpRequest cacheHit + * @property {boolean|null} [cacheValidatedWithOriginServer] HttpRequest cacheValidatedWithOriginServer + * @property {number|Long|null} [cacheFillBytes] HttpRequest cacheFillBytes + * @property {string|null} [protocol] HttpRequest protocol */ /** - * Constructs a new GetSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents a GetSinkRequest. - * @implements IGetSinkRequest + * Constructs a new HttpRequest. + * @memberof google.logging.type + * @classdesc Represents a HttpRequest. + * @implements IHttpRequest * @constructor - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @param {google.logging.type.IHttpRequest=} [properties] Properties to set */ - function GetSinkRequest(properties) { + function HttpRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11899,75 +10566,257 @@ } /** - * GetSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.GetSinkRequest + * HttpRequest requestMethod. + * @member {string} requestMethod + * @memberof google.logging.type.HttpRequest * @instance */ - GetSinkRequest.prototype.sinkName = ""; + HttpRequest.prototype.requestMethod = ""; /** - * Creates a new GetSinkRequest instance using the specified properties. + * HttpRequest requestUrl. + * @member {string} requestUrl + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.requestUrl = ""; + + /** + * HttpRequest requestSize. + * @member {number|Long} requestSize + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.requestSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HttpRequest status. + * @member {number} status + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.status = 0; + + /** + * HttpRequest responseSize. + * @member {number|Long} responseSize + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.responseSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HttpRequest userAgent. + * @member {string} userAgent + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.userAgent = ""; + + /** + * HttpRequest remoteIp. + * @member {string} remoteIp + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.remoteIp = ""; + + /** + * HttpRequest serverIp. + * @member {string} serverIp + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.serverIp = ""; + + /** + * HttpRequest referer. + * @member {string} referer + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.referer = ""; + + /** + * HttpRequest latency. + * @member {google.protobuf.IDuration|null|undefined} latency + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.latency = null; + + /** + * HttpRequest cacheLookup. + * @member {boolean} cacheLookup + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheLookup = false; + + /** + * HttpRequest cacheHit. + * @member {boolean} cacheHit + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheHit = false; + + /** + * HttpRequest cacheValidatedWithOriginServer. + * @member {boolean} cacheValidatedWithOriginServer + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheValidatedWithOriginServer = false; + + /** + * HttpRequest cacheFillBytes. + * @member {number|Long} cacheFillBytes + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheFillBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HttpRequest protocol. + * @member {string} protocol + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.protocol = ""; + + /** + * Creates a new HttpRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @static - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance + * @param {google.logging.type.IHttpRequest=} [properties] Properties to set + * @returns {google.logging.type.HttpRequest} HttpRequest instance */ - GetSinkRequest.create = function create(properties) { - return new GetSinkRequest(properties); + HttpRequest.create = function create(properties) { + return new HttpRequest(properties); }; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encode = function encode(message, writer) { + HttpRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestMethod); + if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestUrl); + if (message.requestSize != null && message.hasOwnProperty("requestSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestSize); + if (message.status != null && message.hasOwnProperty("status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.responseSize != null && message.hasOwnProperty("responseSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.responseSize); + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.userAgent); + if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.remoteIp); + if (message.referer != null && message.hasOwnProperty("referer")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.referer); + if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.cacheHit); + if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.cacheValidatedWithOriginServer); + if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.cacheLookup); + if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.cacheFillBytes); + if (message.serverIp != null && message.hasOwnProperty("serverIp")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.serverIp); + if (message.latency != null && message.hasOwnProperty("latency")) + $root.google.protobuf.Duration.encode(message.latency, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.protocol != null && message.hasOwnProperty("protocol")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.protocol); return writer; }; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + HttpRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a HttpRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.type.HttpRequest} HttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decode = function decode(reader, length) { + HttpRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.type.HttpRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sinkName = reader.string(); + message.requestMethod = reader.string(); + break; + case 2: + message.requestUrl = reader.string(); + break; + case 3: + message.requestSize = reader.int64(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.responseSize = reader.int64(); + break; + case 6: + message.userAgent = reader.string(); + break; + case 7: + message.remoteIp = reader.string(); + break; + case 13: + message.serverIp = reader.string(); + break; + case 8: + message.referer = reader.string(); + break; + case 14: + message.latency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 11: + message.cacheLookup = reader.bool(); + break; + case 9: + message.cacheHit = reader.bool(); + break; + case 10: + message.cacheValidatedWithOriginServer = reader.bool(); + break; + case 12: + message.cacheFillBytes = reader.int64(); + break; + case 15: + message.protocol = reader.string(); break; default: reader.skipType(tag & 7); @@ -11978,2210 +10827,3302 @@ }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a HttpRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.type.HttpRequest} HttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + HttpRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSinkRequest message. + * Verifies a HttpRequest message. * @function verify - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSinkRequest.verify = function verify(message) { + HttpRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + if (!$util.isString(message.requestMethod)) + return "requestMethod: string expected"; + if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + if (!$util.isString(message.requestUrl)) + return "requestUrl: string expected"; + if (message.requestSize != null && message.hasOwnProperty("requestSize")) + if (!$util.isInteger(message.requestSize) && !(message.requestSize && $util.isInteger(message.requestSize.low) && $util.isInteger(message.requestSize.high))) + return "requestSize: integer|Long expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status)) + return "status: integer expected"; + if (message.responseSize != null && message.hasOwnProperty("responseSize")) + if (!$util.isInteger(message.responseSize) && !(message.responseSize && $util.isInteger(message.responseSize.low) && $util.isInteger(message.responseSize.high))) + return "responseSize: integer|Long expected"; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (!$util.isString(message.userAgent)) + return "userAgent: string expected"; + if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + if (!$util.isString(message.remoteIp)) + return "remoteIp: string expected"; + if (message.serverIp != null && message.hasOwnProperty("serverIp")) + if (!$util.isString(message.serverIp)) + return "serverIp: string expected"; + if (message.referer != null && message.hasOwnProperty("referer")) + if (!$util.isString(message.referer)) + return "referer: string expected"; + if (message.latency != null && message.hasOwnProperty("latency")) { + var error = $root.google.protobuf.Duration.verify(message.latency); + if (error) + return "latency." + error; + } + if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + if (typeof message.cacheLookup !== "boolean") + return "cacheLookup: boolean expected"; + if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + if (typeof message.cacheHit !== "boolean") + return "cacheHit: boolean expected"; + if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + if (typeof message.cacheValidatedWithOriginServer !== "boolean") + return "cacheValidatedWithOriginServer: boolean expected"; + if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + if (!$util.isInteger(message.cacheFillBytes) && !(message.cacheFillBytes && $util.isInteger(message.cacheFillBytes.low) && $util.isInteger(message.cacheFillBytes.high))) + return "cacheFillBytes: integer|Long expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; return null; }; /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.type.HttpRequest} HttpRequest */ - GetSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetSinkRequest) + HttpRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.type.HttpRequest) return object; - var message = new $root.google.logging.v2.GetSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); + var message = new $root.google.logging.type.HttpRequest(); + if (object.requestMethod != null) + message.requestMethod = String(object.requestMethod); + if (object.requestUrl != null) + message.requestUrl = String(object.requestUrl); + if (object.requestSize != null) + if ($util.Long) + (message.requestSize = $util.Long.fromValue(object.requestSize)).unsigned = false; + else if (typeof object.requestSize === "string") + message.requestSize = parseInt(object.requestSize, 10); + else if (typeof object.requestSize === "number") + message.requestSize = object.requestSize; + else if (typeof object.requestSize === "object") + message.requestSize = new $util.LongBits(object.requestSize.low >>> 0, object.requestSize.high >>> 0).toNumber(); + if (object.status != null) + message.status = object.status | 0; + if (object.responseSize != null) + if ($util.Long) + (message.responseSize = $util.Long.fromValue(object.responseSize)).unsigned = false; + else if (typeof object.responseSize === "string") + message.responseSize = parseInt(object.responseSize, 10); + else if (typeof object.responseSize === "number") + message.responseSize = object.responseSize; + else if (typeof object.responseSize === "object") + message.responseSize = new $util.LongBits(object.responseSize.low >>> 0, object.responseSize.high >>> 0).toNumber(); + if (object.userAgent != null) + message.userAgent = String(object.userAgent); + if (object.remoteIp != null) + message.remoteIp = String(object.remoteIp); + if (object.serverIp != null) + message.serverIp = String(object.serverIp); + if (object.referer != null) + message.referer = String(object.referer); + if (object.latency != null) { + if (typeof object.latency !== "object") + throw TypeError(".google.logging.type.HttpRequest.latency: object expected"); + message.latency = $root.google.protobuf.Duration.fromObject(object.latency); + } + if (object.cacheLookup != null) + message.cacheLookup = Boolean(object.cacheLookup); + if (object.cacheHit != null) + message.cacheHit = Boolean(object.cacheHit); + if (object.cacheValidatedWithOriginServer != null) + message.cacheValidatedWithOriginServer = Boolean(object.cacheValidatedWithOriginServer); + if (object.cacheFillBytes != null) + if ($util.Long) + (message.cacheFillBytes = $util.Long.fromValue(object.cacheFillBytes)).unsigned = false; + else if (typeof object.cacheFillBytes === "string") + message.cacheFillBytes = parseInt(object.cacheFillBytes, 10); + else if (typeof object.cacheFillBytes === "number") + message.cacheFillBytes = object.cacheFillBytes; + else if (typeof object.cacheFillBytes === "object") + message.cacheFillBytes = new $util.LongBits(object.cacheFillBytes.low >>> 0, object.cacheFillBytes.high >>> 0).toNumber(); + if (object.protocol != null) + message.protocol = String(object.protocol); return message; }; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @static - * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {google.logging.type.HttpRequest} message HttpRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSinkRequest.toObject = function toObject(message, options) { + HttpRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; + if (options.defaults) { + object.requestMethod = ""; + object.requestUrl = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.requestSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.requestSize = options.longs === String ? "0" : 0; + object.status = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.responseSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.responseSize = options.longs === String ? "0" : 0; + object.userAgent = ""; + object.remoteIp = ""; + object.referer = ""; + object.cacheHit = false; + object.cacheValidatedWithOriginServer = false; + object.cacheLookup = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.cacheFillBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.cacheFillBytes = options.longs === String ? "0" : 0; + object.serverIp = ""; + object.latency = null; + object.protocol = ""; + } + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + object.requestMethod = message.requestMethod; + if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + object.requestUrl = message.requestUrl; + if (message.requestSize != null && message.hasOwnProperty("requestSize")) + if (typeof message.requestSize === "number") + object.requestSize = options.longs === String ? String(message.requestSize) : message.requestSize; + else + object.requestSize = options.longs === String ? $util.Long.prototype.toString.call(message.requestSize) : options.longs === Number ? new $util.LongBits(message.requestSize.low >>> 0, message.requestSize.high >>> 0).toNumber() : message.requestSize; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.responseSize != null && message.hasOwnProperty("responseSize")) + if (typeof message.responseSize === "number") + object.responseSize = options.longs === String ? String(message.responseSize) : message.responseSize; + else + object.responseSize = options.longs === String ? $util.Long.prototype.toString.call(message.responseSize) : options.longs === Number ? new $util.LongBits(message.responseSize.low >>> 0, message.responseSize.high >>> 0).toNumber() : message.responseSize; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = message.userAgent; + if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + object.remoteIp = message.remoteIp; + if (message.referer != null && message.hasOwnProperty("referer")) + object.referer = message.referer; + if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + object.cacheHit = message.cacheHit; + if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + object.cacheValidatedWithOriginServer = message.cacheValidatedWithOriginServer; + if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + object.cacheLookup = message.cacheLookup; + if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + if (typeof message.cacheFillBytes === "number") + object.cacheFillBytes = options.longs === String ? String(message.cacheFillBytes) : message.cacheFillBytes; + else + object.cacheFillBytes = options.longs === String ? $util.Long.prototype.toString.call(message.cacheFillBytes) : options.longs === Number ? new $util.LongBits(message.cacheFillBytes.low >>> 0, message.cacheFillBytes.high >>> 0).toNumber() : message.cacheFillBytes; + if (message.serverIp != null && message.hasOwnProperty("serverIp")) + object.serverIp = message.serverIp; + if (message.latency != null && message.hasOwnProperty("latency")) + object.latency = $root.google.protobuf.Duration.toObject(message.latency, options); + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; return object; }; /** - * Converts this GetSinkRequest to JSON. + * Converts this HttpRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.type.HttpRequest * @instance * @returns {Object.} JSON object */ - GetSinkRequest.prototype.toJSON = function toJSON() { + HttpRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSinkRequest; + return HttpRequest; + })(); + + /** + * LogSeverity enum. + * @name google.logging.type.LogSeverity + * @enum {string} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} DEBUG=100 DEBUG value + * @property {number} INFO=200 INFO value + * @property {number} NOTICE=300 NOTICE value + * @property {number} WARNING=400 WARNING value + * @property {number} ERROR=500 ERROR value + * @property {number} CRITICAL=600 CRITICAL value + * @property {number} ALERT=700 ALERT value + * @property {number} EMERGENCY=800 EMERGENCY value + */ + type.LogSeverity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[100] = "DEBUG"] = 100; + values[valuesById[200] = "INFO"] = 200; + values[valuesById[300] = "NOTICE"] = 300; + values[valuesById[400] = "WARNING"] = 400; + values[valuesById[500] = "ERROR"] = 500; + values[valuesById[600] = "CRITICAL"] = 600; + values[valuesById[700] = "ALERT"] = 700; + values[valuesById[800] = "EMERGENCY"] = 800; + return values; + })(); + + return type; + })(); + + return logging; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && message.hasOwnProperty("nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && message.hasOwnProperty("history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && message.hasOwnProperty("plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && message.hasOwnProperty("singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pattern = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; })(); - v2.CreateSinkRequest = (function() { + return ResourceDescriptor; + })(); - /** - * Properties of a CreateSinkRequest. - * @memberof google.logging.v2 - * @interface ICreateSinkRequest - * @property {string|null} [parent] CreateSinkRequest parent - * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity - */ + api.ResourceReference = (function() { - /** - * Constructs a new CreateSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents a CreateSinkRequest. - * @implements ICreateSinkRequest - * @constructor - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set - */ - function CreateSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ - /** - * CreateSinkRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.parent = ""; + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * CreateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.sink = null; + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; - /** - * CreateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.uniqueWriterIdentity = false; + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; - /** - * Creates a new CreateSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance - */ - CreateSinkRequest.create = function create(properties) { - return new CreateSinkRequest(properties); - }; + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; - /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sink != null && message.hasOwnProperty("sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - return writer; - }; + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && message.hasOwnProperty("childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; - /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; - /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a CreateSinkRequest message. - * @function verify - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; - } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; - return null; - }; + return ResourceReference; + })(); - /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest - */ - CreateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateSinkRequest) - return object; - var message = new $root.google.logging.v2.CreateSinkRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); - } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); - return message; - }; + api.Http = (function() { - /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.sink = null; - object.uniqueWriterIdentity = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; - return object; - }; + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ - /** - * Converts this CreateSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateSinkRequest - * @instance - * @returns {Object.} JSON object - */ - CreateSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return CreateSinkRequest; - })(); + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; - v2.UpdateSinkRequest = (function() { + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; - /** - * Properties of an UpdateSinkRequest. - * @memberof google.logging.v2 - * @interface IUpdateSinkRequest - * @property {string|null} [sinkName] UpdateSinkRequest sinkName - * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask - */ + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new UpdateSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateSinkRequest. - * @implements IUpdateSinkRequest - * @constructor - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set - */ - function UpdateSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; - /** - * UpdateSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.sinkName = ""; + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; - /** - * UpdateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.sink = null; + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; - /** - * UpdateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.uniqueWriterIdentity = false; + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * UpdateSinkRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.updateMask = null; + return Http; + })(); - /** - * Creates a new UpdateSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance - */ - UpdateSinkRequest.create = function create(properties) { - return new UpdateSinkRequest(properties); - }; + api.HttpRule = (function() { - /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - if (message.sink != null && message.hasOwnProperty("sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ - /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; - case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; - /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; - /** - * Verifies an UpdateSinkRequest message. - * @function verify - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; - } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; - /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest - */ - UpdateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateSinkRequest) - return object; - var message = new $root.google.logging.v2.UpdateSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); - } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; - /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sinkName = ""; - object.sink = null; - object.uniqueWriterIdentity = false; - object.updateMask = null; - } - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; - /** - * Converts this UpdateSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; - return UpdateSinkRequest; - })(); + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; - v2.DeleteSinkRequest = (function() { + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; - /** - * Properties of a DeleteSinkRequest. - * @memberof google.logging.v2 - * @interface IDeleteSinkRequest - * @property {string|null} [sinkName] DeleteSinkRequest sinkName - */ + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; - /** - * Constructs a new DeleteSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteSinkRequest. - * @implements IDeleteSinkRequest - * @constructor - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set - */ - function DeleteSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * DeleteSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.DeleteSinkRequest - * @instance - */ - DeleteSinkRequest.prototype.sinkName = ""; + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new DeleteSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance - */ - DeleteSinkRequest.create = function create(properties) { - return new DeleteSinkRequest(properties); - }; + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; - /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - return writer; - }; + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; - /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a DeleteSinkRequest message. - * @function verify - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - return null; - }; + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest - */ - DeleteSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteSinkRequest) - return object; - var message = new $root.google.logging.v2.DeleteSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - return message; - }; + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; - /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - }; - - /** - * Converts this DeleteSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteSinkRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteSinkRequest; - })(); - - v2.LogExclusion = (function() { - - /** - * Properties of a LogExclusion. - * @memberof google.logging.v2 - * @interface ILogExclusion - * @property {string|null} [name] LogExclusion name - * @property {string|null} [description] LogExclusion description - * @property {string|null} [filter] LogExclusion filter - * @property {boolean|null} [disabled] LogExclusion disabled - * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime - */ - - /** - * Constructs a new LogExclusion. - * @memberof google.logging.v2 - * @classdesc Represents a LogExclusion. - * @implements ILogExclusion - * @constructor - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set - */ - function LogExclusion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; - /** - * LogExclusion name. - * @member {string} name - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.name = ""; - - /** - * LogExclusion description. - * @member {string} description - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.description = ""; - - /** - * LogExclusion filter. - * @member {string} filter - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.filter = ""; + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; - /** - * LogExclusion disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.disabled = false; + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LogExclusion createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.createTime = null; + return HttpRule; + })(); - /** - * LogExclusion updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.updateTime = null; + api.CustomHttpPattern = (function() { - /** - * Creates a new LogExclusion instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set - * @returns {google.logging.v2.LogExclusion} LogExclusion instance - */ - LogExclusion.create = function create(properties) { - return new LogExclusion(properties); - }; + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ - /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogExclusion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.disabled != null && message.hasOwnProperty("disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; - /** - * Decodes a LogExclusion message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogExclusion} LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogExclusion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.disabled = reader.bool(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; - /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogExclusion} LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogExclusion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; - /** - * Verifies a LogExclusion message. - * @function verify - * @memberof google.logging.v2.LogExclusion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogExclusion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; - /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogExclusion - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogExclusion} LogExclusion - */ - LogExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogExclusion) - return object; - var message = new $root.google.logging.v2.LogExclusion(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.LogExclusion} message LogExclusion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogExclusion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.disabled = false; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this LogExclusion to JSON. - * @function toJSON - * @memberof google.logging.v2.LogExclusion - * @instance - * @returns {Object.} JSON object - */ - LogExclusion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; - return LogExclusion; - })(); + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; - v2.ListExclusionsRequest = (function() { + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; - /** - * Properties of a ListExclusionsRequest. - * @memberof google.logging.v2 - * @interface IListExclusionsRequest - * @property {string|null} [parent] ListExclusionsRequest parent - * @property {string|null} [pageToken] ListExclusionsRequest pageToken - * @property {number|null} [pageSize] ListExclusionsRequest pageSize - */ + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ListExclusionsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsRequest. - * @implements IListExclusionsRequest - * @constructor - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set - */ - function ListExclusionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return CustomHttpPattern; + })(); - /** - * ListExclusionsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.parent = ""; + api.MonitoredResourceDescriptor = (function() { - /** - * ListExclusionsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.pageToken = ""; + /** + * Properties of a MonitoredResourceDescriptor. + * @memberof google.api + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + */ - /** - * ListExclusionsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.pageSize = 0; + /** + * Constructs a new MonitoredResourceDescriptor. + * @memberof google.api + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor + * @constructor + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + */ + function MonitoredResourceDescriptor(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ListExclusionsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance - */ - ListExclusionsRequest.create = function create(properties) { - return new ListExclusionsRequest(properties); - }; + /** + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.name = ""; - /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListExclusionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - return writer; - }; + /** + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.type = ""; - /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.displayName = ""; - /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListExclusionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.description = ""; - /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; - /** - * Verifies a ListExclusionsRequest message. - * @function verify - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListExclusionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - return null; - }; + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; - /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest - */ - ListExclusionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsRequest) - return object; - var message = new $root.google.logging.v2.ListExclusionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; - }; + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + */ + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); + }; - /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListExclusionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - return object; - }; + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); + return writer; + }; - /** - * Converts this ListExclusionsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListExclusionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; + case 1: + message.type = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 7: + message.launchStage = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return ListExclusionsRequest; - })(); + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - v2.ListExclusionsResponse = (function() { + /** + * Verifies a MonitoredResourceDescriptor message. + * @function verify + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; - /** - * Properties of a ListExclusionsResponse. - * @memberof google.logging.v2 - * @interface IListExclusionsResponse - * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions - * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken - */ + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + */ + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) + return object; + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + return message; + }; - /** - * Constructs a new ListExclusionsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsResponse. - * @implements IListExclusionsResponse - * @constructor - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set - */ - function ListExclusionsResponse(properties) { - this.exclusions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + return object; + }; - /** - * ListExclusionsResponse exclusions. - * @member {Array.} exclusions - * @memberof google.logging.v2.ListExclusionsResponse - * @instance - */ - ListExclusionsResponse.prototype.exclusions = $util.emptyArray; + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ListExclusionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListExclusionsResponse - * @instance - */ - ListExclusionsResponse.prototype.nextPageToken = ""; + return MonitoredResourceDescriptor; + })(); - /** - * Creates a new ListExclusionsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance - */ - ListExclusionsResponse.create = function create(properties) { - return new ListExclusionsResponse(properties); - }; + api.MonitoredResource = (function() { - /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListExclusionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exclusions != null && message.exclusions.length) - for (var i = 0; i < message.exclusions.length; ++i) - $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * Properties of a MonitoredResource. + * @memberof google.api + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels + */ + + /** + * Constructs a new MonitoredResource. + * @memberof google.api + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource + * @constructor + * @param {google.api.IMonitoredResource=} [properties] Properties to set + */ + function MonitoredResource(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource + * @instance + */ + MonitoredResource.prototype.type = ""; - /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListExclusionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource + * @instance + */ + MonitoredResource.prototype.labels = $util.emptyObject; - /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new MonitoredResource instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance + */ + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); + }; - /** - * Verifies a ListExclusionsResponse message. - * @function verify - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListExclusionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exclusions != null && message.hasOwnProperty("exclusions")) { - if (!Array.isArray(message.exclusions)) - return "exclusions: array expected"; - for (var i = 0; i < message.exclusions.length; ++i) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); - if (error) - return "exclusions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; - /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse - */ - ListExclusionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsResponse) - return object; - var message = new $root.google.logging.v2.ListExclusionsResponse(); - if (object.exclusions) { - if (!Array.isArray(object.exclusions)) - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); - message.exclusions = []; - for (var i = 0; i < object.exclusions.length; ++i) { - if (typeof object.exclusions[i] !== "object") - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); - message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListExclusionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exclusions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.exclusions && message.exclusions.length) { - object.exclusions = []; - for (var j = 0; j < message.exclusions.length; ++j) - object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListExclusionsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListExclusionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListExclusionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - return ListExclusionsResponse; - })(); + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - v2.GetExclusionRequest = (function() { + /** + * Verifies a MonitoredResource message. + * @function verify + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; - /** - * Properties of a GetExclusionRequest. - * @memberof google.logging.v2 - * @interface IGetExclusionRequest - * @property {string|null} [name] GetExclusionRequest name - */ + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResource} MonitoredResource + */ + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) + return object; + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; - /** - * Constructs a new GetExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents a GetExclusionRequest. - * @implements IGetExclusionRequest - * @constructor - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set - */ - function GetExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.MonitoredResource} message MonitoredResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } + return object; + }; - /** - * GetExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.GetExclusionRequest - * @instance - */ - GetExclusionRequest.prototype.name = ""; + /** + * Converts this MonitoredResource to JSON. + * @function toJSON + * @memberof google.api.MonitoredResource + * @instance + * @returns {Object.} JSON object + */ + MonitoredResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new GetExclusionRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance - */ - GetExclusionRequest.create = function create(properties) { - return new GetExclusionRequest(properties); - }; + return MonitoredResource; + })(); - /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetExclusionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + api.MonitoredResourceMetadata = (function() { - /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a MonitoredResourceMetadata. + * @memberof google.api + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + */ - /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetExclusionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new MonitoredResourceMetadata. + * @memberof google.api + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata + * @constructor + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + */ + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata + * @instance + */ + MonitoredResourceMetadata.prototype.systemLabels = null; - /** - * Verifies a GetExclusionRequest message. - * @function verify - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetExclusionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata + * @instance + */ + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; - /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest - */ - GetExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetExclusionRequest) - return object; - var message = new $root.google.logging.v2.GetExclusionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + */ + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); + }; - /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.GetExclusionRequest - * @static - * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetExclusionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + return writer; + }; - /** - * Converts this GetExclusionRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.GetExclusionRequest - * @instance - * @returns {Object.} JSON object - */ - GetExclusionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return GetExclusionRequest; - })(); + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 2: + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - v2.CreateExclusionRequest = (function() { + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a CreateExclusionRequest. - * @memberof google.logging.v2 - * @interface ICreateExclusionRequest - * @property {string|null} [parent] CreateExclusionRequest parent - * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion - */ + /** + * Verifies a MonitoredResourceMetadata message. + * @function verify + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResourceMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } + return null; + }; - /** - * Constructs a new CreateExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents a CreateExclusionRequest. - * @implements ICreateExclusionRequest - * @constructor - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set - */ - function CreateExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + */ + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) + return object; + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResourceMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; } + return object; + }; + + /** + * Converts this MonitoredResourceMetadata to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceMetadata + * @instance + * @returns {Object.} JSON object + */ + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * CreateExclusionRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateExclusionRequest - * @instance - */ - CreateExclusionRequest.prototype.parent = ""; + return MonitoredResourceMetadata; + })(); - /** - * CreateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.CreateExclusionRequest - * @instance - */ - CreateExclusionRequest.prototype.exclusion = null; + api.LabelDescriptor = (function() { - /** - * Creates a new CreateExclusionRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance - */ - CreateExclusionRequest.create = function create(properties) { - return new CreateExclusionRequest(properties); - }; + /** + * Properties of a LabelDescriptor. + * @memberof google.api + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description + */ - /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateExclusionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new LabelDescriptor. + * @memberof google.api + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor + * @constructor + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + */ + function LabelDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.key = ""; - /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateExclusionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.valueType = 0; - /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.description = ""; - /** - * Verifies a CreateExclusionRequest message. - * @function verify - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateExclusionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - return null; - }; + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @function create + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance + */ + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); + }; - /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest - */ - CreateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateExclusionRequest) - return object; - var message = new $root.google.logging.v2.CreateExclusionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && message.hasOwnProperty("key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && message.hasOwnProperty("valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.valueType = reader.int32(); + break; + case 3: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateExclusionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.exclusion = null; + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelDescriptor message. + * @function verify + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.LabelDescriptor} LabelDescriptor + */ + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) return object; - }; + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; - /** - * Converts this CreateExclusionRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateExclusionRequest - * @instance - * @returns {Object.} JSON object - */ - CreateExclusionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; - return CreateExclusionRequest; + /** + * Converts this LabelDescriptor to JSON. + * @function toJSON + * @memberof google.api.LabelDescriptor + * @instance + * @returns {Object.} JSON object + */ + LabelDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; })(); - v2.UpdateExclusionRequest = (function() { + return LabelDescriptor; + })(); - /** - * Properties of an UpdateExclusionRequest. - * @memberof google.logging.v2 - * @interface IUpdateExclusionRequest - * @property {string|null} [name] UpdateExclusionRequest name - * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask - */ + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {string} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); - /** - * Constructs a new UpdateExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateExclusionRequest. - * @implements IUpdateExclusionRequest - * @constructor - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set - */ - function UpdateExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + api.Distribution = (function() { + + /** + * Properties of a Distribution. + * @memberof google.api + * @interface IDistribution + * @property {number|Long|null} [count] Distribution count + * @property {number|null} [mean] Distribution mean + * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation + * @property {google.api.Distribution.IRange|null} [range] Distribution range + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions + * @property {Array.|null} [bucketCounts] Distribution bucketCounts + * @property {Array.|null} [exemplars] Distribution exemplars + */ + + /** + * Constructs a new Distribution. + * @memberof google.api + * @classdesc Represents a Distribution. + * @implements IDistribution + * @constructor + * @param {google.api.IDistribution=} [properties] Properties to set + */ + function Distribution(properties) { + this.bucketCounts = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Distribution count. + * @member {number|Long} count + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Distribution mean. + * @member {number} mean + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.mean = 0; - /** - * UpdateExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateExclusionRequest - * @instance - */ - UpdateExclusionRequest.prototype.name = ""; + /** + * Distribution sumOfSquaredDeviation. + * @member {number} sumOfSquaredDeviation + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.sumOfSquaredDeviation = 0; - /** - * UpdateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.UpdateExclusionRequest - * @instance - */ - UpdateExclusionRequest.prototype.exclusion = null; + /** + * Distribution range. + * @member {google.api.Distribution.IRange|null|undefined} range + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.range = null; - /** - * UpdateExclusionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateExclusionRequest - * @instance - */ - UpdateExclusionRequest.prototype.updateMask = null; + /** + * Distribution bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketOptions = null; - /** - * Creates a new UpdateExclusionRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance - */ - UpdateExclusionRequest.create = function create(properties) { - return new UpdateExclusionRequest(properties); - }; + /** + * Distribution bucketCounts. + * @member {Array.} bucketCounts + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketCounts = $util.emptyArray; - /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateExclusionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Distribution exemplars. + * @member {Array.} exemplars + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.exemplars = $util.emptyArray; - /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Distribution instance using the specified properties. + * @function create + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution=} [properties] Properties to set + * @returns {google.api.Distribution} Distribution instance + */ + Distribution.create = function create(properties) { + return new Distribution(properties); + }; - /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateExclusionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.mean != null && message.hasOwnProperty("mean")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); + if (message.range != null && message.hasOwnProperty("range")) + $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.int64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an UpdateExclusionRequest message. - * @function verify - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateExclusionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + /** + * Decodes a Distribution message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.int64(); + break; + case 2: + message.mean = reader.double(); + break; + case 3: + message.sumOfSquaredDeviation = reader.double(); + break; + case 4: + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + case 6: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else + message.bucketCounts.push(reader.int64()); + break; + case 10: + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest - */ - UpdateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) - return object; - var message = new $root.google.logging.v2.UpdateExclusionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateExclusionRequest - * @static - * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateExclusionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.exclusion = null; - object.updateMask = null; + /** + * Verifies a Distribution message. + * @function verify + * @memberof google.api.Distribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Distribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (typeof message.sumOfSquaredDeviation !== "number") + return "sumOfSquaredDeviation: number expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.api.Distribution.Range.verify(message.range); + if (error) + return "range." + error; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + } + return null; + }; + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution} Distribution + */ + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution) return object; - }; + var message = new $root.google.api.Distribution(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.sumOfSquaredDeviation != null) + message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.api.Distribution.range: object expected"); + message.range = $root.google.api.Distribution.Range.fromObject(object.range); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.api.Distribution.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".google.api.Distribution.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".google.api.Distribution.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".google.api.Distribution.exemplars: object expected"); + message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + } + } + return message; + }; - /** - * Converts this UpdateExclusionRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateExclusionRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateExclusionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution + * @static + * @param {google.api.Distribution} message Distribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Distribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.mean = 0; + object.sumOfSquaredDeviation = 0; + object.range = null; + object.bucketOptions = null; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.api.Distribution.Range.toObject(message.range, options); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + } + return object; + }; - return UpdateExclusionRequest; - })(); + /** + * Converts this Distribution to JSON. + * @function toJSON + * @memberof google.api.Distribution + * @instance + * @returns {Object.} JSON object + */ + Distribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.DeleteExclusionRequest = (function() { + Distribution.Range = (function() { /** - * Properties of a DeleteExclusionRequest. - * @memberof google.logging.v2 - * @interface IDeleteExclusionRequest - * @property {string|null} [name] DeleteExclusionRequest name + * Properties of a Range. + * @memberof google.api.Distribution + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max */ /** - * Constructs a new DeleteExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteExclusionRequest. - * @implements IDeleteExclusionRequest + * Constructs a new Range. + * @memberof google.api.Distribution + * @classdesc Represents a Range. + * @implements IRange * @constructor - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @param {google.api.Distribution.IRange=} [properties] Properties to set */ - function DeleteExclusionRequest(properties) { + function Range(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14189,75 +14130,88 @@ } /** - * DeleteExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.DeleteExclusionRequest + * Range min. + * @member {number} min + * @memberof google.api.Distribution.Range * @instance */ - DeleteExclusionRequest.prototype.name = ""; + Range.prototype.min = 0; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. + * Range max. + * @member {number} max + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.max = 0; + + /** + * Creates a new Range instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @static - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @returns {google.api.Distribution.Range} Range instance */ - DeleteExclusionRequest.create = function create(properties) { - return new DeleteExclusionRequest(properties); + Range.create = function create(properties) { + return new Range(properties); }; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.api.Distribution.IRange} message Range message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encode = function encode(message, writer) { + Range.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.min != null && message.hasOwnProperty("min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && message.hasOwnProperty("max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); return writer; }; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.api.Distribution.IRange} message Range message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + Range.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * Decodes a Range message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.api.Distribution.Range} Range * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decode = function decode(reader, length) { + Range.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.min = reader.double(); + break; + case 2: + message.max = reader.double(); break; default: reader.skipType(tag & 7); @@ -14268,840 +14222,1073 @@ }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a Range message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.api.Distribution.Range} Range * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + Range.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteExclusionRequest message. + * Verifies a Range message. * @function verify - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteExclusionRequest.verify = function verify(message) { + Range.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; return null; }; /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Range message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.api.Distribution.Range} Range */ - DeleteExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Range) return object; - var message = new $root.google.logging.v2.DeleteExclusionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.api.Distribution.Range(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); return message; }; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a Range message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @static - * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {google.api.Distribution.Range} message Range * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteExclusionRequest.toObject = function toObject(message, options) { + Range.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.min = 0; + object.max = 0; + } + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; return object; }; /** - * Converts this DeleteExclusionRequest to JSON. + * Converts this Range to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.api.Distribution.Range * @instance * @returns {Object.} JSON object */ - DeleteExclusionRequest.prototype.toJSON = function toJSON() { + Range.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteExclusionRequest; + return Range; })(); - v2.LoggingServiceV2 = (function() { + Distribution.BucketOptions = (function() { /** - * Constructs a new LoggingServiceV2 service. - * @memberof google.logging.v2 - * @classdesc Represents a LoggingServiceV2 - * @extends $protobuf.rpc.Service + * Properties of a BucketOptions. + * @memberof google.api.Distribution + * @interface IBucketOptions + * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets + * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets + * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + */ + + /** + * Constructs a new BucketOptions. + * @memberof google.api.Distribution + * @classdesc Represents a BucketOptions. + * @implements IBucketOptions * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set */ - function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function BucketOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.LoggingServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. + * BucketOptions linearBuckets. + * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance */ - LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + BucketOptions.prototype.linearBuckets = null; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef DeleteLogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * BucketOptions exponentialBuckets. + * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance */ + BucketOptions.prototype.exponentialBuckets = null; /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 + * BucketOptions explicitBuckets. + * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets + * @memberof google.api.Distribution.BucketOptions * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { - return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteLog" }); + BucketOptions.prototype.explicitBuckets = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 + * BucketOptions options. + * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options + * @memberof google.api.Distribution.BucketOptions * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Object.defineProperty(BucketOptions.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef WriteLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + * Creates a new BucketOptions instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions} BucketOptions instance */ + BucketOptions.create = function create(properties) { + return new BucketOptions(properties); + }; /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { - return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); - }, "name", { value: "WriteLogEntries" }); + BucketOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) + $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) + $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) + $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + * Decodes a BucketOptions message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + BucketOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + break; + case 2: + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + break; + case 3: + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse - * @returns {undefined} - * @variation 1 + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { - return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); - }, "name", { value: "ListLogEntries" }); + BucketOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a BucketOptions message. + * @function verify + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + BucketOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); + if (error) + return "linearBuckets." + error; + } + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); + if (error) + return "exponentialBuckets." + error; + } + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); + if (error) + return "explicitBuckets." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListMonitoredResourceDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions} BucketOptions */ + BucketOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions) + return object; + var message = new $root.google.api.Distribution.BucketOptions(); + if (object.linearBuckets != null) { + if (typeof object.linearBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); + } + if (object.exponentialBuckets != null) { + if (typeof object.exponentialBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); + } + if (object.explicitBuckets != null) { + if (typeof object.explicitBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + } + return message; + }; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { - return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); - }, "name", { value: "ListMonitoredResourceDescriptors" }); + BucketOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); + if (options.oneofs) + object.options = "linearBuckets"; + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); + if (options.oneofs) + object.options = "exponentialBuckets"; + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); + if (options.oneofs) + object.options = "explicitBuckets"; + } + return object; + }; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 + * Converts this BucketOptions to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + BucketOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse - */ + BucketOptions.Linear = (function() { - /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { - return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); - }, "name", { value: "ListLogs" }); + /** + * Properties of a Linear. + * @memberof google.api.Distribution.BucketOptions + * @interface ILinear + * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets + * @property {number|null} [width] Linear width + * @property {number|null} [offset] Linear offset + */ - /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new Linear. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents a Linear. + * @implements ILinear + * @constructor + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + */ + function Linear(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return LoggingServiceV2; - })(); + /** + * Linear numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.numFiniteBuckets = 0; - v2.DeleteLogRequest = (function() { + /** + * Linear width. + * @member {number} width + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.width = 0; - /** - * Properties of a DeleteLogRequest. - * @memberof google.logging.v2 - * @interface IDeleteLogRequest - * @property {string|null} [logName] DeleteLogRequest logName - */ + /** + * Linear offset. + * @member {number} offset + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.offset = 0; - /** - * Constructs a new DeleteLogRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteLogRequest. - * @implements IDeleteLogRequest - * @constructor - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set - */ - function DeleteLogRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new Linear instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance + */ + Linear.create = function create(properties) { + return new Linear(properties); + }; + + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.width != null && message.hasOwnProperty("width")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); + if (message.offset != null && message.hasOwnProperty("offset")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); + return writer; + }; + + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Linear message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.width = reader.double(); + break; + case 3: + message.offset = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Linear message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Linear.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset !== "number") + return "offset: number expected"; + return null; + }; + + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + */ + Linear.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Linear(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.width != null) + message.width = Number(object.width); + if (object.offset != null) + message.offset = Number(object.offset); + return message; + }; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.Linear} message Linear + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Linear.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.width = 0; + object.offset = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; + return object; + }; - /** - * DeleteLogRequest logName. - * @member {string} logName - * @memberof google.logging.v2.DeleteLogRequest - * @instance - */ - DeleteLogRequest.prototype.logName = ""; + /** + * Converts this Linear to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + * @returns {Object.} JSON object + */ + Linear.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new DeleteLogRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance - */ - DeleteLogRequest.create = function create(properties) { - return new DeleteLogRequest(properties); - }; + return Linear; + })(); - /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLogRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - return writer; - }; + BucketOptions.Exponential = (function() { - /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an Exponential. + * @memberof google.api.Distribution.BucketOptions + * @interface IExponential + * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets + * @property {number|null} [growthFactor] Exponential growthFactor + * @property {number|null} [scale] Exponential scale + */ - /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLogRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.logName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new Exponential. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Exponential. + * @implements IExponential + * @constructor + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + */ + function Exponential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Exponential numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.numFiniteBuckets = 0; - /** - * Verifies a DeleteLogRequest message. - * @function verify - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteLogRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - return null; - }; + /** + * Exponential growthFactor. + * @member {number} growthFactor + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.growthFactor = 0; - /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest - */ - DeleteLogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteLogRequest) - return object; - var message = new $root.google.logging.v2.DeleteLogRequest(); - if (object.logName != null) - message.logName = String(object.logName); - return message; - }; + /** + * Exponential scale. + * @member {number} scale + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.scale = 0; - /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteLogRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.logName = ""; - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - return object; - }; + /** + * Creates a new Exponential instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance + */ + Exponential.create = function create(properties) { + return new Exponential(properties); + }; - /** - * Converts this DeleteLogRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteLogRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteLogRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); + if (message.scale != null && message.hasOwnProperty("scale")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); + return writer; + }; - return DeleteLogRequest; - })(); + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - v2.WriteLogEntriesRequest = (function() { + /** + * Decodes an Exponential message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.growthFactor = reader.double(); + break; + case 3: + message.scale = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a WriteLogEntriesRequest. - * @memberof google.logging.v2 - * @interface IWriteLogEntriesRequest - * @property {string|null} [logName] WriteLogEntriesRequest logName - * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource - * @property {Object.|null} [labels] WriteLogEntriesRequest labels - * @property {Array.|null} [entries] WriteLogEntriesRequest entries - * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess - * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun - */ + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new WriteLogEntriesRequest. - * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesRequest. - * @implements IWriteLogEntriesRequest - * @constructor - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set - */ - function WriteLogEntriesRequest(properties) { - this.labels = {}; - this.entries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies an Exponential message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exponential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + if (typeof message.growthFactor !== "number") + return "growthFactor: number expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (typeof message.scale !== "number") + return "scale: number expected"; + return null; + }; - /** - * WriteLogEntriesRequest logName. - * @member {string} logName - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.logName = ""; + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + */ + Exponential.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Exponential(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.growthFactor != null) + message.growthFactor = Number(object.growthFactor); + if (object.scale != null) + message.scale = Number(object.scale); + return message; + }; - /** - * WriteLogEntriesRequest resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.resource = null; + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exponential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.growthFactor = 0; + object.scale = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; + return object; + }; - /** - * WriteLogEntriesRequest labels. - * @member {Object.} labels - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.labels = $util.emptyObject; + /** + * Converts this Exponential to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + * @returns {Object.} JSON object + */ + Exponential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * WriteLogEntriesRequest entries. - * @member {Array.} entries - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.entries = $util.emptyArray; + return Exponential; + })(); - /** - * WriteLogEntriesRequest partialSuccess. - * @member {boolean} partialSuccess - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.partialSuccess = false; + BucketOptions.Explicit = (function() { - /** - * WriteLogEntriesRequest dryRun. - * @member {boolean} dryRun - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.dryRun = false; + /** + * Properties of an Explicit. + * @memberof google.api.Distribution.BucketOptions + * @interface IExplicit + * @property {Array.|null} [bounds] Explicit bounds + */ - /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance - */ - WriteLogEntriesRequest.create = function create(properties) { - return new WriteLogEntriesRequest(properties); - }; + /** + * Constructs a new Explicit. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Explicit. + * @implements IExplicit + * @constructor + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + */ + function Explicit(properties) { + this.bounds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Explicit bounds. + * @member {Array.} bounds + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + */ + Explicit.prototype.bounds = $util.emptyArray; - /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); - return writer; - }; + /** + * Creates a new Explicit instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance + */ + Explicit.create = function create(properties) { + return new Explicit(properties); + }; - /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bounds != null && message.bounds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bounds.length; ++i) + writer.double(message.bounds[i]); + writer.ldelim(); + } + return writer; + }; - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.logName = reader.string(); - break; - case 2: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 3: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); - break; - case 4: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 5: - message.partialSuccess = reader.bool(); - break; - case 6: - message.dryRun = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Explicit message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.bounds && message.bounds.length)) + message.bounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bounds.push(reader.double()); + } else + message.bounds.push(reader.double()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a WriteLogEntriesRequest message. - * @function verify - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WriteLogEntriesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; + /** + * Verifies an Explicit message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Explicit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bounds != null && message.hasOwnProperty("bounds")) { + if (!Array.isArray(message.bounds)) + return "bounds: array expected"; + for (var i = 0; i < message.bounds.length; ++i) + if (typeof message.bounds[i] !== "number") + return "bounds: number[] expected"; + } + return null; + }; + + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + */ + Explicit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Explicit(); + if (object.bounds) { + if (!Array.isArray(object.bounds)) + throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); + message.bounds = []; + for (var i = 0; i < object.bounds.length; ++i) + message.bounds[i] = Number(object.bounds[i]); } - } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - if (typeof message.partialSuccess !== "boolean") - return "partialSuccess: boolean expected"; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; - return null; - }; + return message; + }; - /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest - */ - WriteLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) - return object; - var message = new $root.google.logging.v2.WriteLogEntriesRequest(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Explicit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bounds = []; + if (message.bounds && message.bounds.length) { + object.bounds = []; + for (var j = 0; j < message.bounds.length; ++j) + object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; } - } - if (object.partialSuccess != null) - message.partialSuccess = Boolean(object.partialSuccess); - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); - return message; - }; + return object; + }; - /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WriteLogEntriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.logName = ""; - object.resource = null; - object.partialSuccess = false; - object.dryRun = false; - } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); - } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - object.partialSuccess = message.partialSuccess; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; - return object; - }; + /** + * Converts this Explicit to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + * @returns {Object.} JSON object + */ + Explicit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this WriteLogEntriesRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - * @returns {Object.} JSON object - */ - WriteLogEntriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Explicit; + })(); - return WriteLogEntriesRequest; + return BucketOptions; })(); - v2.WriteLogEntriesResponse = (function() { + Distribution.Exemplar = (function() { /** - * Properties of a WriteLogEntriesResponse. - * @memberof google.logging.v2 - * @interface IWriteLogEntriesResponse + * Properties of an Exemplar. + * @memberof google.api.Distribution + * @interface IExemplar + * @property {number|null} [value] Exemplar value + * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp + * @property {Array.|null} [attachments] Exemplar attachments */ /** - * Constructs a new WriteLogEntriesResponse. - * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesResponse. - * @implements IWriteLogEntriesResponse + * Constructs a new Exemplar. + * @memberof google.api.Distribution + * @classdesc Represents an Exemplar. + * @implements IExemplar * @constructor - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set */ - function WriteLogEntriesResponse(properties) { + function Exemplar(properties) { + this.attachments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15109,63 +15296,105 @@ } /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. + * Exemplar value. + * @member {number} value + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.value = 0; + + /** + * Exemplar timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.timestamp = null; + + /** + * Exemplar attachments. + * @member {Array.} attachments + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.attachments = $util.emptyArray; + + /** + * Creates a new Exemplar instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @static - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @returns {google.api.Distribution.Exemplar} Exemplar instance */ - WriteLogEntriesResponse.create = function create(properties) { - return new WriteLogEntriesResponse(properties); + Exemplar.create = function create(properties) { + return new Exemplar(properties); }; /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesResponse.encode = function encode(message, writer) { + Exemplar.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * Decodes an Exemplar message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.api.Distribution.Exemplar} Exemplar * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decode = function decode(reader, length) { + Exemplar.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + case 2: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -15175,320 +15404,656 @@ }; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes an Exemplar message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.api.Distribution.Exemplar} Exemplar * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + Exemplar.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesResponse message. + * Verifies an Exemplar message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesResponse.verify = function verify(message) { + Exemplar.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } return null; }; /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.api.Distribution.Exemplar} Exemplar */ - WriteLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Exemplar) return object; - return new $root.google.logging.v2.WriteLogEntriesResponse(); + var message = new $root.google.api.Distribution.Exemplar(); + if (object.value != null) + message.value = Number(object.value); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); + message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); + } + } + return message; }; /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @static - * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse + * @param {google.api.Distribution.Exemplar} message Exemplar * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesResponse.toObject = function toObject() { - return {}; + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attachments = []; + if (options.defaults) { + object.value = 0; + object.timestamp = null; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + } + return object; }; /** - * Converts this WriteLogEntriesResponse to JSON. + * Converts this Exemplar to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.api.Distribution.Exemplar * @instance * @returns {Object.} JSON object */ - WriteLogEntriesResponse.prototype.toJSON = function toJSON() { + Exemplar.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesResponse; + return Exemplar; })(); - v2.WriteLogEntriesPartialErrors = (function() { + return Distribution; + })(); - /** - * Properties of a WriteLogEntriesPartialErrors. - * @memberof google.logging.v2 - * @interface IWriteLogEntriesPartialErrors - * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors - */ + api.MetricDescriptor = (function() { - /** - * Constructs a new WriteLogEntriesPartialErrors. - * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesPartialErrors. - * @implements IWriteLogEntriesPartialErrors - * @constructor - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set - */ - function WriteLogEntriesPartialErrors(properties) { - this.logEntryErrors = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a MetricDescriptor. + * @memberof google.api + * @interface IMetricDescriptor + * @property {string|null} [name] MetricDescriptor name + * @property {string|null} [type] MetricDescriptor type + * @property {Array.|null} [labels] MetricDescriptor labels + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType + * @property {string|null} [unit] MetricDescriptor unit + * @property {string|null} [description] MetricDescriptor description + * @property {string|null} [displayName] MetricDescriptor displayName + * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + */ - /** - * WriteLogEntriesPartialErrors logEntryErrors. - * @member {Object.} logEntryErrors - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @instance - */ - WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; + /** + * Constructs a new MetricDescriptor. + * @memberof google.api + * @classdesc Represents a MetricDescriptor. + * @implements IMetricDescriptor + * @constructor + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + */ + function MetricDescriptor(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. - * @function create - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance - */ - WriteLogEntriesPartialErrors.create = function create(properties) { - return new WriteLogEntriesPartialErrors(properties); - }; + /** + * MetricDescriptor name. + * @member {string} name + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.name = ""; + + /** + * MetricDescriptor type. + * @member {string} type + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.type = ""; + + /** + * MetricDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.labels = $util.emptyArray; + + /** + * MetricDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metricKind = 0; + + /** + * MetricDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.valueType = 0; + + /** + * MetricDescriptor unit. + * @member {string} unit + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.unit = ""; + + /** + * MetricDescriptor description. + * @member {string} description + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.description = ""; + + /** + * MetricDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.displayName = ""; + + /** + * MetricDescriptor metadata. + * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metadata = null; + + /** + * MetricDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @returns {google.api.MetricDescriptor} MetricDescriptor instance + */ + MetricDescriptor.create = function create(properties) { + return new MetricDescriptor(properties); + }; - /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesPartialErrors.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) - for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); - $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.valueType != null && message.hasOwnProperty("valueType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); + if (message.unit != null && message.hasOwnProperty("unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + return writer; + }; - /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesPartialErrors.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - reader.skip().pos++; - if (message.logEntryErrors === $util.emptyObject) - message.logEntryErrors = {}; - key = reader.int32(); - reader.pos++; - message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a MetricDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor} MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 8: + message.type = reader.string(); + break; + case 2: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 3: + message.metricKind = reader.int32(); + break; + case 4: + message.valueType = reader.int32(); + break; + case 5: + message.unit = reader.string(); + break; + case 6: + message.description = reader.string(); + break; + case 7: + message.displayName = reader.string(); + break; + case 10: + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + case 12: + message.launchStage = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor} MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a WriteLogEntriesPartialErrors message. - * @function verify - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WriteLogEntriesPartialErrors.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { - if (!$util.isObject(message.logEntryErrors)) - return "logEntryErrors: object expected"; - var key = Object.keys(message.logEntryErrors); - for (var i = 0; i < key.length; ++i) { - if (!$util.key32Re.test(key[i])) - return "logEntryErrors: integer key{k:int32} expected"; - { - var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); - if (error) - return "logEntryErrors." + error; - } - } + /** + * Verifies a MetricDescriptor message. + * @function verify + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + switch (message.metricKind) { + default: + return "metricKind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - return null; - }; - - /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors - */ - WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) - return object; - var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); - if (object.logEntryErrors) { - if (typeof object.logEntryErrors !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors = {}; - for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { - if (typeof object.logEntryErrors[keys[i]] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); - } + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; } - return message; - }; - - /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.logEntryErrors = {}; - var keys2; - if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { - object.logEntryErrors = {}; - for (var j = 0; j < keys2.length; ++j) - object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; } + return null; + }; + + /** + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor} MetricDescriptor + */ + MetricDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor) return object; - }; + var message = new $root.google.api.MetricDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MetricDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MetricDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.metricKind) { + case "METRIC_KIND_UNSPECIFIED": + case 0: + message.metricKind = 0; + break; + case "GAUGE": + case 1: + message.metricKind = 1; + break; + case "DELTA": + case 2: + message.metricKind = 2; + break; + case "CUMULATIVE": + case 3: + message.metricKind = 3; + break; + } + switch (object.valueType) { + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + case "DOUBLE": + case 3: + message.valueType = 3; + break; + case "STRING": + case 4: + message.valueType = 4; + break; + case "DISTRIBUTION": + case 5: + message.valueType = 5; + break; + case "MONEY": + case 6: + message.valueType = 6; + break; + } + if (object.unit != null) + message.unit = String(object.unit); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + } + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + return message; + }; - /** - * Converts this WriteLogEntriesPartialErrors to JSON. - * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @instance - * @returns {Object.} JSON object - */ - WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.MetricDescriptor} message MetricDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.name = ""; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.unit = ""; + object.description = ""; + object.displayName = ""; + object.type = ""; + object.metadata = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + return object; + }; - return WriteLogEntriesPartialErrors; - })(); + /** + * Converts this MetricDescriptor to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.ListLogEntriesRequest = (function() { + MetricDescriptor.MetricDescriptorMetadata = (function() { /** - * Properties of a ListLogEntriesRequest. - * @memberof google.logging.v2 - * @interface IListLogEntriesRequest - * @property {Array.|null} [projectIds] ListLogEntriesRequest projectIds - * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames - * @property {string|null} [filter] ListLogEntriesRequest filter - * @property {string|null} [orderBy] ListLogEntriesRequest orderBy - * @property {number|null} [pageSize] ListLogEntriesRequest pageSize - * @property {string|null} [pageToken] ListLogEntriesRequest pageToken + * Properties of a MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @interface IMetricDescriptorMetadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage + * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod + * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay */ /** - * Constructs a new ListLogEntriesRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesRequest. - * @implements IListLogEntriesRequest + * Constructs a new MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @classdesc Represents a MetricDescriptorMetadata. + * @implements IMetricDescriptorMetadata * @constructor - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set */ - function ListLogEntriesRequest(properties) { - this.projectIds = []; - this.resourceNames = []; + function MetricDescriptorMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15496,146 +16061,101 @@ } /** - * ListLogEntriesRequest projectIds. - * @member {Array.} projectIds - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.projectIds = $util.emptyArray; - - /** - * ListLogEntriesRequest resourceNames. - * @member {Array.} resourceNames - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; - - /** - * ListLogEntriesRequest filter. - * @member {string} filter - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.filter = ""; - - /** - * ListLogEntriesRequest orderBy. - * @member {string} orderBy - * @memberof google.logging.v2.ListLogEntriesRequest + * MetricDescriptorMetadata launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @instance */ - ListLogEntriesRequest.prototype.orderBy = ""; + MetricDescriptorMetadata.prototype.launchStage = 0; /** - * ListLogEntriesRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogEntriesRequest + * MetricDescriptorMetadata samplePeriod. + * @member {google.protobuf.IDuration|null|undefined} samplePeriod + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @instance */ - ListLogEntriesRequest.prototype.pageSize = 0; + MetricDescriptorMetadata.prototype.samplePeriod = null; /** - * ListLogEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogEntriesRequest + * MetricDescriptorMetadata ingestDelay. + * @member {google.protobuf.IDuration|null|undefined} ingestDelay + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @instance */ - ListLogEntriesRequest.prototype.pageToken = ""; + MetricDescriptorMetadata.prototype.ingestDelay = null; /** - * Creates a new ListLogEntriesRequest instance using the specified properties. + * Creates a new MetricDescriptorMetadata instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance */ - ListLogEntriesRequest.create = function create(properties) { - return new ListLogEntriesRequest(properties); + MetricDescriptorMetadata.create = function create(properties) { + return new MetricDescriptorMetadata(properties); }; /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesRequest.encode = function encode(message, writer) { + MetricDescriptorMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectIds != null && message.projectIds.length) - for (var i = 0; i < message.projectIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decode = function decode(reader, length) { + MetricDescriptorMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.projectIds && message.projectIds.length)) - message.projectIds = []; - message.projectIds.push(reader.string()); - break; - case 8: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); + message.launchStage = reader.int32(); break; case 2: - message.filter = reader.string(); + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; case 3: - message.orderBy = reader.string(); - break; - case 4: - message.pageSize = reader.int32(); - break; - case 5: - message.pageToken = reader.string(); + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15646,1995 +16166,2038 @@ }; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogEntriesRequest message. + * Verifies a MetricDescriptorMetadata message. * @function verify - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogEntriesRequest.verify = function verify(message) { + MetricDescriptorMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectIds != null && message.hasOwnProperty("projectIds")) { - if (!Array.isArray(message.projectIds)) - return "projectIds: array expected"; - for (var i = 0; i < message.projectIds.length; ++i) - if (!$util.isString(message.projectIds[i])) - return "projectIds: string[] expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { + var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + if (error) + return "samplePeriod." + error; } - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) - if (!$util.isString(message.resourceNames[i])) - return "resourceNames: string[] expected"; + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { + var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + if (error) + return "ingestDelay." + error; } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; return null; }; /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata */ - ListLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) + MetricDescriptorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) return object; - var message = new $root.google.logging.v2.ListLogEntriesRequest(); - if (object.projectIds) { - if (!Array.isArray(object.projectIds)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.projectIds: array expected"); - message.projectIds = []; - for (var i = 0; i < object.projectIds.length; ++i) - message.projectIds[i] = String(object.projectIds[i]); + var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; } - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) - message.resourceNames[i] = String(object.resourceNames[i]); + if (object.samplePeriod != null) { + if (typeof object.samplePeriod !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); + message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); + } + if (object.ingestDelay != null) { + if (typeof object.ingestDelay !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); + message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); } - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest + * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogEntriesRequest.toObject = function toObject(message, options) { + MetricDescriptorMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.projectIds = []; - object.resourceNames = []; - } if (options.defaults) { - object.filter = ""; - object.orderBy = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.projectIds && message.projectIds.length) { - object.projectIds = []; - for (var j = 0; j < message.projectIds.length; ++j) - object.projectIds[j] = message.projectIds[j]; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = message.resourceNames[j]; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.samplePeriod = null; + object.ingestDelay = null; } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); return object; }; /** - * Converts this ListLogEntriesRequest to JSON. + * Converts this MetricDescriptorMetadata to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @instance * @returns {Object.} JSON object */ - ListLogEntriesRequest.prototype.toJSON = function toJSON() { + MetricDescriptorMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogEntriesRequest; - })(); + return MetricDescriptorMetadata; + })(); + + /** + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {string} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value + */ + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); + + /** + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {string} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value + */ + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); + + return MetricDescriptor; + })(); + + api.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.api + * @interface IMetric + * @property {string|null} [type] Metric type + * @property {Object.|null} [labels] Metric labels + */ + + /** + * Constructs a new Metric. + * @memberof google.api + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.api.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric type. + * @member {string} type + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.type = ""; + + /** + * Metric labels. + * @member {Object.} labels + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.labels = $util.emptyObject; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric=} [properties] Properties to set + * @returns {google.api.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encode + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.type = reader.string(); + break; + case 2: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - v2.ListLogEntriesResponse = (function() { + /** + * Verifies a Metric message. + * @function verify + * @memberof google.api.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; - /** - * Properties of a ListLogEntriesResponse. - * @memberof google.logging.v2 - * @interface IListLogEntriesResponse - * @property {Array.|null} [entries] ListLogEntriesResponse entries - * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken - */ + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.api.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Metric) + return object; + var message = new $root.google.api.Metric(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.Metric.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; - /** - * Constructs a new ListLogEntriesResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesResponse. - * @implements IListLogEntriesResponse - * @constructor - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set - */ - function ListLogEntriesResponse(properties) { - this.entries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Metric + * @static + * @param {google.api.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; - /** - * ListLogEntriesResponse entries. - * @member {Array.} entries - * @memberof google.logging.v2.ListLogEntriesResponse - * @instance - */ - ListLogEntriesResponse.prototype.entries = $util.emptyArray; + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.api.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ListLogEntriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogEntriesResponse - * @instance - */ - ListLogEntriesResponse.prototype.nextPageToken = ""; + return Metric; + })(); - /** - * Creates a new ListLogEntriesResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance - */ - ListLogEntriesResponse.create = function create(properties) { - return new ListLogEntriesResponse(properties); - }; + return api; + })(); - /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogEntriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + google.protobuf = (function() { - /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; - /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogEntriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; - /** - * Verifies a ListLogEntriesResponse message. - * @function verify - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLogEntriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; - /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse - */ - ListLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) - return object; - var message = new $root.google.logging.v2.ListLogEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); - } + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLogEntriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; - }; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; - /** - * Converts this ListLogEntriesResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListLogEntriesResponse - * @instance - * @returns {Object.} JSON object - */ - ListLogEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; - return ListLogEntriesResponse; - })(); + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.ListMonitoredResourceDescriptorsRequest = (function() { + return FileDescriptorSet; + })(); - /** - * Properties of a ListMonitoredResourceDescriptorsRequest. - * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsRequest - * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken - */ + protobuf.FileDescriptorProto = (function() { - /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. - * @implements IListMonitoredResourceDescriptorsRequest - * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - */ - function ListMonitoredResourceDescriptorsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ - /** - * ListMonitoredResourceDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListMonitoredResourceDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; - /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance - */ - ListMonitoredResourceDescriptorsRequest.create = function create(properties) { - return new ListMonitoredResourceDescriptorsRequest(properties); - }; + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; - /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - return writer; - }; + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; - /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pageSize = reader.int32(); - break; - case 2: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; - /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. - * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; - /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest - */ - ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) - return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; - /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; - /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @instance - * @returns {Object.} JSON object - */ - ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; - return ListMonitoredResourceDescriptorsRequest; - })(); + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; - v2.ListMonitoredResourceDescriptorsResponse = (function() { + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; - /** - * Properties of a ListMonitoredResourceDescriptorsResponse. - * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsResponse - * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors - * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken - */ + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && message.hasOwnProperty("package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && message.hasOwnProperty("syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; - /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. - * @implements IListMonitoredResourceDescriptorsResponse - * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - */ - function ListMonitoredResourceDescriptorsResponse(properties) { - this.resourceDescriptors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * ListMonitoredResourceDescriptorsResponse resourceDescriptors. - * @member {Array.} resourceDescriptors - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @instance - */ - ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; - - /** - * ListMonitoredResourceDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @instance - */ - ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance - */ - ListMonitoredResourceDescriptorsResponse.create = function create(properties) { - return new ListMonitoredResourceDescriptorsResponse(properties); - }; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceDescriptors != null && message.resourceDescriptors.length) - for (var i = 0; i < message.resourceDescriptors.length; ++i) - $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.resourceDescriptors && message.resourceDescriptors.length)) - message.resourceDescriptors = []; - message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; } - return message; - }; - - /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; - /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. - * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { - if (!Array.isArray(message.resourceDescriptors)) - return "resourceDescriptors: array expected"; - for (var i = 0; i < message.resourceDescriptors.length; ++i) { - var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); - if (error) - return "resourceDescriptors." + error; - } + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse - */ - ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) - return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); - if (object.resourceDescriptors) { - if (!Array.isArray(object.resourceDescriptors)) - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); - message.resourceDescriptors = []; - for (var i = 0; i < object.resourceDescriptors.length; ++i) { - if (typeof object.resourceDescriptors[i] !== "object") - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); - message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); - } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceDescriptors = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.resourceDescriptors && message.resourceDescriptors.length) { - object.resourceDescriptors = []; - for (var j = 0; j < message.resourceDescriptors.length; ++j) - object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @instance - * @returns {Object.} JSON object - */ - ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListMonitoredResourceDescriptorsResponse; - })(); - - v2.ListLogsRequest = (function() { - - /** - * Properties of a ListLogsRequest. - * @memberof google.logging.v2 - * @interface IListLogsRequest - * @property {string|null} [parent] ListLogsRequest parent - * @property {number|null} [pageSize] ListLogsRequest pageSize - * @property {string|null} [pageToken] ListLogsRequest pageToken - */ - - /** - * Constructs a new ListLogsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogsRequest. - * @implements IListLogsRequest - * @constructor - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set - */ - function ListLogsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; - /** - * ListLogsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.parent = ""; - - /** - * ListLogsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.pageSize = 0; - - /** - * ListLogsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.pageToken = ""; + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; - /** - * Creates a new ListLogsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance - */ - ListLogsRequest.create = function create(properties) { - return new ListLogsRequest(properties); - }; + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + return FileDescriptorProto; + })(); - /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + protobuf.DescriptorProto = (function() { - /** - * Decodes a ListLogsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ - /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies a ListLogsRequest message. - * @function verify - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLogsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; - /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest - */ - ListLogsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsRequest) - return object; - var message = new $root.google.logging.v2.ListLogsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; - /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLogsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; - /** - * Converts this ListLogsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListLogsRequest - * @instance - * @returns {Object.} JSON object - */ - ListLogsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; - return ListLogsRequest; - })(); + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; - v2.ListLogsResponse = (function() { + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; - /** - * Properties of a ListLogsResponse. - * @memberof google.logging.v2 - * @interface IListLogsResponse - * @property {Array.|null} [logNames] ListLogsResponse logNames - * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken - */ + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; - /** - * Constructs a new ListLogsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogsResponse. - * @implements IListLogsResponse - * @constructor - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set - */ - function ListLogsResponse(properties) { - this.logNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; - /** - * ListLogsResponse logNames. - * @member {Array.} logNames - * @memberof google.logging.v2.ListLogsResponse - * @instance - */ - ListLogsResponse.prototype.logNames = $util.emptyArray; + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * ListLogsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogsResponse - * @instance - */ - ListLogsResponse.prototype.nextPageToken = ""; + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Creates a new ListLogsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance - */ - ListLogsResponse.create = function create(properties) { - return new ListLogsResponse(properties); - }; + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; - /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.logNames != null && message.logNames.length) - for (var i = 0; i < message.logNames.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); - return writer; - }; + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; - /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListLogsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - if (!(message.logNames && message.logNames.length)) - message.logNames = []; - message.logNames.push(reader.string()); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListLogsResponse message. - * @function verify - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLogsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logNames != null && message.hasOwnProperty("logNames")) { - if (!Array.isArray(message.logNames)) - return "logNames: array expected"; - for (var i = 0; i < message.logNames.length; ++i) - if (!$util.isString(message.logNames[i])) - return "logNames: string[] expected"; + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; - /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse - */ - ListLogsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsResponse) - return object; - var message = new $root.google.logging.v2.ListLogsResponse(); - if (object.logNames) { - if (!Array.isArray(object.logNames)) - throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); - message.logNames = []; - for (var i = 0; i < object.logNames.length; ++i) - message.logNames[i] = String(object.logNames[i]); + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLogsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.logNames = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.logNames && message.logNames.length) { - object.logNames = []; - for (var j = 0; j < message.logNames.length; ++j) - object.logNames[j] = message.logNames[j]; + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); } - return object; - }; - - /** - * Converts this ListLogsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListLogsResponse - * @instance - * @returns {Object.} JSON object - */ - ListLogsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListLogsResponse; - })(); - - v2.LogEntry = (function() { - - /** - * Properties of a LogEntry. - * @memberof google.logging.v2 - * @interface ILogEntry - * @property {string|null} [logName] LogEntry logName - * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource - * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload - * @property {string|null} [textPayload] LogEntry textPayload - * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload - * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp - * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp - * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity - * @property {string|null} [insertId] LogEntry insertId - * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest - * @property {Object.|null} [labels] LogEntry labels - * @property {google.api.IMonitoredResourceMetadata|null} [metadata] LogEntry metadata - * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation - * @property {string|null} [trace] LogEntry trace - * @property {string|null} [spanId] LogEntry spanId - * @property {boolean|null} [traceSampled] LogEntry traceSampled - * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation - */ - - /** - * Constructs a new LogEntry. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntry. - * @implements ILogEntry - * @constructor - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set - */ - function LogEntry(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; - /** - * LogEntry logName. - * @member {string} logName - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.logName = ""; - - /** - * LogEntry resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.resource = null; - - /** - * LogEntry protoPayload. - * @member {google.protobuf.IAny|null|undefined} protoPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.protoPayload = null; - - /** - * LogEntry textPayload. - * @member {string} textPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.textPayload = ""; - - /** - * LogEntry jsonPayload. - * @member {google.protobuf.IStruct|null|undefined} jsonPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.jsonPayload = null; - - /** - * LogEntry timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.timestamp = null; - - /** - * LogEntry receiveTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.receiveTimestamp = null; - - /** - * LogEntry severity. - * @member {google.logging.type.LogSeverity} severity - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.severity = 0; - - /** - * LogEntry insertId. - * @member {string} insertId - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.insertId = ""; - - /** - * LogEntry httpRequest. - * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.httpRequest = null; - - /** - * LogEntry labels. - * @member {Object.} labels - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.labels = $util.emptyObject; - - /** - * LogEntry metadata. - * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.metadata = null; + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; - /** - * LogEntry operation. - * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.operation = null; + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LogEntry trace. - * @member {string} trace - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.trace = ""; + DescriptorProto.ExtensionRange = (function() { /** - * LogEntry spanId. - * @member {string} spanId - * @memberof google.logging.v2.LogEntry - * @instance + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options */ - LogEntry.prototype.spanId = ""; /** - * LogEntry traceSampled. - * @member {boolean} traceSampled - * @memberof google.logging.v2.LogEntry - * @instance + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set */ - LogEntry.prototype.traceSampled = false; + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * LogEntry sourceLocation. - * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation - * @memberof google.logging.v2.LogEntry + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @instance */ - LogEntry.prototype.sourceLocation = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ExtensionRange.prototype.start = 0; /** - * LogEntry payload. - * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload - * @memberof google.logging.v2.LogEntry + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @instance */ - Object.defineProperty(LogEntry.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LogEntry instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogEntry - * @static - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set - * @returns {google.logging.v2.LogEntry} LogEntry instance - */ - LogEntry.create = function create(properties) { - return new LogEntry(properties); - }; - - /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogEntry - * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) - $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textPayload != null && message.hasOwnProperty("textPayload")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); - if (message.insertId != null && message.hasOwnProperty("insertId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) - $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.severity != null && message.hasOwnProperty("severity")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); - if (message.operation != null && message.hasOwnProperty("operation")) - $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.trace != null && message.hasOwnProperty("trace")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.spanId != null && message.hasOwnProperty("spanId")) - writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); - return writer; - }; - - /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogEntry - * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LogEntry message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntry} LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 12: - message.logName = reader.string(); - break; - case 8: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 2: - message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.textPayload = reader.string(); - break; - case 6: - message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 9: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 24: - message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.severity = reader.int32(); - break; - case 4: - message.insertId = reader.string(); - break; - case 7: - message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); - break; - case 11: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); - break; - case 25: - message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); - break; - case 15: - message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); - break; - case 22: - message.trace = reader.string(); - break; - case 27: - message.spanId = reader.string(); - break; - case 30: - message.traceSampled = reader.bool(); - break; - case 23: - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + ExtensionRange.prototype.end = 0; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogEntry + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntry} LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance */ - LogEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); }; /** - * Verifies a LogEntry message. - * @function verify - * @memberof google.logging.v2.LogEntry + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - properties.payload = 1; - { - var error = $root.google.protobuf.Any.verify(message.protoPayload); - if (error) - return "protoPayload." + error; - } - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - if (!$util.isString(message.textPayload)) - return "textPayload: string expected"; - } - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - { - var error = $root.google.protobuf.Struct.verify(message.jsonPayload); - if (error) - return "jsonPayload." + error; - } - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); - if (error) - return "receiveTimestamp." + error; - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 100: - case 200: - case 300: - case 400: - case 500: - case 600: - case 700: - case 800: - break; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - if (!$util.isString(message.insertId)) - return "insertId: string expected"; - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { - var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); - if (error) - return "httpRequest." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.operation != null && message.hasOwnProperty("operation")) { - var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); - if (error) - return "operation." + error; - } - if (message.trace != null && message.hasOwnProperty("trace")) - if (!$util.isString(message.trace)) - return "trace: string expected"; - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!$util.isString(message.spanId)) - return "spanId: string expected"; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - if (typeof message.traceSampled !== "boolean") - return "traceSampled: boolean expected"; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { - var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); - if (error) - return "sourceLocation." + error; - } - return null; + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; }; /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogEntry + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntry} LogEntry + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntry) - return object; - var message = new $root.google.logging.v2.LogEntry(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.protoPayload != null) { - if (typeof object.protoPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); - message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); - } - if (object.textPayload != null) - message.textPayload = String(object.textPayload); - if (object.jsonPayload != null) { - if (typeof object.jsonPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); - message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.receiveTimestamp != null) { - if (typeof object.receiveTimestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); - message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); - } - switch (object.severity) { - case "DEFAULT": - case 0: - message.severity = 0; - break; - case "DEBUG": - case 100: - message.severity = 100; - break; - case "INFO": - case 200: - message.severity = 200; - break; - case "NOTICE": - case 300: - message.severity = 300; - break; - case "WARNING": - case 400: - message.severity = 400; - break; - case "ERROR": - case 500: - message.severity = 500; - break; - case "CRITICAL": - case 600: - message.severity = 600; - break; - case "ALERT": - case 700: - message.severity = 700; - break; - case "EMERGENCY": - case 800: - message.severity = 800; - break; - } - if (object.insertId != null) - message.insertId = String(object.insertId); - if (object.httpRequest != null) { - if (typeof object.httpRequest !== "object") - throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); - message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.logging.v2.LogEntry.metadata: object expected"); - message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (object.operation != null) { - if (typeof object.operation !== "object") - throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); - message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; } - if (object.trace != null) - message.trace = String(object.trace); - if (object.spanId != null) - message.spanId = String(object.spanId); - if (object.traceSampled != null) - message.traceSampled = Boolean(object.traceSampled); - if (object.sourceLocation != null) { - if (typeof object.sourceLocation !== "object") - throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogEntry + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.logging.v2.LogEntry} message LogEntry + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntry.toObject = function toObject(message, options) { + ExtensionRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.insertId = ""; - object.httpRequest = null; - object.resource = null; - object.timestamp = null; - object.severity = options.enums === String ? "DEFAULT" : 0; - object.logName = ""; - object.operation = null; - object.trace = ""; - object.sourceLocation = null; - object.receiveTimestamp = null; - object.metadata = null; - object.spanId = ""; - object.traceSampled = false; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); - if (options.oneofs) - object.payload = "protoPayload"; - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - object.textPayload = message.textPayload; - if (options.oneofs) - object.payload = "textPayload"; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - object.insertId = message.insertId; - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); - if (options.oneofs) - object.payload = "jsonPayload"; - } - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.start = 0; + object.end = 0; + object.options = null; } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); - if (message.trace != null && message.hasOwnProperty("trace")) - object.trace = message.trace; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = message.spanId; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - object.traceSampled = message.traceSampled; + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); return object; }; /** - * Converts this LogEntry to JSON. + * Converts this ExtensionRange to JSON. * @function toJSON - * @memberof google.logging.v2.LogEntry + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @instance * @returns {Object.} JSON object */ - LogEntry.prototype.toJSON = function toJSON() { + ExtensionRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogEntry; + return ExtensionRange; })(); - v2.LogEntryOperation = (function() { + DescriptorProto.ReservedRange = (function() { /** - * Properties of a LogEntryOperation. - * @memberof google.logging.v2 - * @interface ILogEntryOperation - * @property {string|null} [id] LogEntryOperation id - * @property {string|null} [producer] LogEntryOperation producer - * @property {boolean|null} [first] LogEntryOperation first - * @property {boolean|null} [last] LogEntryOperation last + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end */ /** - * Constructs a new LogEntryOperation. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntryOperation. - * @implements ILogEntryOperation + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange * @constructor - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set */ - function LogEntryOperation(properties) { + function ReservedRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17642,114 +18205,88 @@ } /** - * LogEntryOperation id. - * @member {string} id - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.id = ""; - - /** - * LogEntryOperation producer. - * @member {string} producer - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.producer = ""; - - /** - * LogEntryOperation first. - * @member {boolean} first - * @memberof google.logging.v2.LogEntryOperation + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance */ - LogEntryOperation.prototype.first = false; + ReservedRange.prototype.start = 0; /** - * LogEntryOperation last. - * @member {boolean} last - * @memberof google.logging.v2.LogEntryOperation + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance */ - LogEntryOperation.prototype.last = false; + ReservedRange.prototype.end = 0; /** - * Creates a new LogEntryOperation instance using the specified properties. + * Creates a new ReservedRange instance using the specified properties. * @function create - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance */ - LogEntryOperation.create = function create(properties) { - return new LogEntryOperation(properties); + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); }; /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntryOperation.encode = function encode(message, writer) { + ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.producer != null && message.hasOwnProperty("producer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); - if (message.first != null && message.hasOwnProperty("first")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); - if (message.last != null && message.hasOwnProperty("last")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntryOperation message from the specified reader or buffer. + * Decodes a ReservedRange message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntryOperation.decode = function decode(reader, length) { + ReservedRange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.start = reader.int32(); break; case 2: - message.producer = reader.string(); - break; - case 3: - message.first = reader.bool(); - break; - case 4: - message.last = reader.bool(); + message.end = reader.int32(); break; default: reader.skipType(tag & 7); @@ -17760,1035 +18297,1445 @@ }; /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { + ReservedRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogEntryOperation message. + * Verifies a ReservedRange message. * @function verify - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntryOperation.verify = function verify(message) { + ReservedRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.producer != null && message.hasOwnProperty("producer")) - if (!$util.isString(message.producer)) - return "producer: string expected"; - if (message.first != null && message.hasOwnProperty("first")) - if (typeof message.first !== "boolean") - return "first: boolean expected"; - if (message.last != null && message.hasOwnProperty("last")) - if (typeof message.last !== "boolean") - return "last: boolean expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; return null; }; /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange */ - LogEntryOperation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntryOperation) + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) return object; - var message = new $root.google.logging.v2.LogEntryOperation(); - if (object.id != null) - message.id = String(object.id); - if (object.producer != null) - message.producer = String(object.producer); - if (object.first != null) - message.first = Boolean(object.first); - if (object.last != null) - message.last = Boolean(object.last); + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; return message; }; /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntryOperation.toObject = function toObject(message, options) { + ReservedRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.id = ""; - object.producer = ""; - object.first = false; - object.last = false; + object.start = 0; + object.end = 0; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.producer != null && message.hasOwnProperty("producer")) - object.producer = message.producer; - if (message.first != null && message.hasOwnProperty("first")) - object.first = message.first; - if (message.last != null && message.hasOwnProperty("last")) - object.last = message.last; + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; return object; }; /** - * Converts this LogEntryOperation to JSON. + * Converts this ReservedRange to JSON. * @function toJSON - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance * @returns {Object.} JSON object */ - LogEntryOperation.prototype.toJSON = function toJSON() { + ReservedRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogEntryOperation; + return ReservedRange; })(); - v2.LogEntrySourceLocation = (function() { + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a LogEntrySourceLocation. - * @memberof google.logging.v2 - * @interface ILogEntrySourceLocation - * @property {string|null} [file] LogEntrySourceLocation file - * @property {number|Long|null} [line] LogEntrySourceLocation line - * @property {string|null} ["function"] LogEntrySourceLocation function - */ + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - /** - * Constructs a new LogEntrySourceLocation. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntrySourceLocation. - * @implements ILogEntrySourceLocation - * @constructor - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set - */ - function LogEntrySourceLocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } + return message; + }; - /** - * LogEntrySourceLocation file. - * @member {string} file - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype.file = ""; + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * LogEntrySourceLocation line. - * @member {number|Long} line - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LogEntrySourceLocation function. - * @member {string} function - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype["function"] = ""; + return ExtensionRangeOptions; + })(); - /** - * Creates a new LogEntrySourceLocation instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance - */ - LogEntrySourceLocation.create = function create(properties) { - return new LogEntrySourceLocation(properties); - }; + protobuf.FieldDescriptorProto = (function() { - /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntrySourceLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.hasOwnProperty("file")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); - if (message.line != null && message.hasOwnProperty("line")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); - if (message["function"] != null && message.hasOwnProperty("function")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); - return writer; - }; + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + */ - /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntrySourceLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file = reader.string(); - break; - case 2: - message.line = reader.int64(); - break; - case 3: - message["function"] = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; - /** - * Verifies a LogEntrySourceLocation message. - * @function verify - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogEntrySourceLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) - if (!$util.isString(message.file)) - return "file: string expected"; - if (message.line != null && message.hasOwnProperty("line")) - if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) - return "line: integer|Long expected"; - if (message["function"] != null && message.hasOwnProperty("function")) - if (!$util.isString(message["function"])) - return "function: string expected"; - return null; - }; + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; - /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation - */ - LogEntrySourceLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) - return object; - var message = new $root.google.logging.v2.LogEntrySourceLocation(); - if (object.file != null) - message.file = String(object.file); - if (object.line != null) - if ($util.Long) - (message.line = $util.Long.fromValue(object.line)).unsigned = false; - else if (typeof object.line === "string") - message.line = parseInt(object.line, 10); - else if (typeof object.line === "number") - message.line = object.line; - else if (typeof object.line === "object") - message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); - if (object["function"] != null) - message["function"] = String(object["function"]); - return message; - }; + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; - /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogEntrySourceLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.file = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.line = options.longs === String ? "0" : 0; - object["function"] = ""; - } - if (message.file != null && message.hasOwnProperty("file")) - object.file = message.file; - if (message.line != null && message.hasOwnProperty("line")) - if (typeof message.line === "number") - object.line = options.longs === String ? String(message.line) : message.line; - else - object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; - if (message["function"] != null && message.hasOwnProperty("function")) - object["function"] = message["function"]; - return object; - }; + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; - /** - * Converts this LogEntrySourceLocation to JSON. - * @function toJSON - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - * @returns {Object.} JSON object - */ - LogEntrySourceLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; - return LogEntrySourceLocation; - })(); + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; - v2.MetricsServiceV2 = (function() { + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; - /** - * Constructs a new MetricsServiceV2 service. - * @memberof google.logging.v2 - * @classdesc Represents a MetricsServiceV2 - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function MetricsServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && message.hasOwnProperty("extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && message.hasOwnProperty("typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - (MetricsServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsServiceV2; - - /** - * Creates new MetricsServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.MetricsServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {MetricsServiceV2} RPC service. Useful where requests and/or responses are streamed. - */ - MetricsServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef ListLogMetricsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogMetricsResponse} [response] ListLogMetricsResponse - */ + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls ListLogMetrics. - * @function listLogMetrics - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.ListLogMetricsCallback} callback Node-style callback called with the error, if any, and ListLogMetricsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricsServiceV2.prototype.listLogMetrics = function listLogMetrics(request, callback) { - return this.rpcCall(listLogMetrics, $root.google.logging.v2.ListLogMetricsRequest, $root.google.logging.v2.ListLogMetricsResponse, request, callback); - }, "name", { value: "ListLogMetrics" }); + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Calls ListLogMetrics. - * @function listLogMetrics - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + return message; + }; - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef GetLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric - */ + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + return object; + }; - /** - * Calls GetLogMetric. - * @function getLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.GetLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricsServiceV2.prototype.getLogMetric = function getLogMetric(request, callback) { - return this.rpcCall(getLogMetric, $root.google.logging.v2.GetLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "GetLogMetric" }); + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls GetLogMetric. - * @function getLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {string} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef CreateLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric - */ + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {string} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); - /** - * Calls CreateLogMetric. - * @function createLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.CreateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricsServiceV2.prototype.createLogMetric = function createLogMetric(request, callback) { - return this.rpcCall(createLogMetric, $root.google.logging.v2.CreateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "CreateLogMetric" }); + return FieldDescriptorProto; + })(); - /** - * Calls CreateLogMetric. - * @function createLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + protobuf.OneofDescriptorProto = (function() { - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef UpdateLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric - */ + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ - /** - * Calls UpdateLogMetric. - * @function updateLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricsServiceV2.prototype.updateLogMetric = function updateLogMetric(request, callback) { - return this.rpcCall(updateLogMetric, $root.google.logging.v2.UpdateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "UpdateLogMetric" }); + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls UpdateLogMetric. - * @function updateLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; - /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef DeleteLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; - /** - * Calls DeleteLogMetric. - * @function deleteLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricsServiceV2.prototype.deleteLogMetric = function deleteLogMetric(request, callback) { - return this.rpcCall(deleteLogMetric, $root.google.logging.v2.DeleteLogMetricRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteLogMetric" }); + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; - /** - * Calls DeleteLogMetric. - * @function deleteLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - return MetricsServiceV2; - })(); + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - v2.LogMetric = (function() { + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a LogMetric. - * @memberof google.logging.v2 - * @interface ILogMetric - * @property {string|null} [name] LogMetric name - * @property {string|null} [description] LogMetric description - * @property {string|null} [filter] LogMetric filter - * @property {google.api.IMetricDescriptor|null} [metricDescriptor] LogMetric metricDescriptor - * @property {string|null} [valueExtractor] LogMetric valueExtractor - * @property {Object.|null} [labelExtractors] LogMetric labelExtractors - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] LogMetric bucketOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogMetric createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogMetric updateTime - * @property {google.logging.v2.LogMetric.ApiVersion|null} [version] LogMetric version - */ + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new LogMetric. - * @memberof google.logging.v2 - * @classdesc Represents a LogMetric. - * @implements ILogMetric - * @constructor - * @param {google.logging.v2.ILogMetric=} [properties] Properties to set - */ - function LogMetric(properties) { - this.labelExtractors = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; } + return null; + }; - /** - * LogMetric name. - * @member {string} name - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.name = ""; - - /** - * LogMetric description. - * @member {string} description - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.description = ""; + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; - /** - * LogMetric filter. - * @member {string} filter - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.filter = ""; + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; - /** - * LogMetric metricDescriptor. - * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.metricDescriptor = null; + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LogMetric valueExtractor. - * @member {string} valueExtractor - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.valueExtractor = ""; + return OneofDescriptorProto; + })(); - /** - * LogMetric labelExtractors. - * @member {Object.} labelExtractors - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.labelExtractors = $util.emptyObject; + protobuf.EnumDescriptorProto = (function() { - /** - * LogMetric bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.bucketOptions = null; + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ - /** - * LogMetric createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.createTime = null; + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LogMetric updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.updateTime = null; + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; - /** - * LogMetric version. - * @member {google.logging.v2.LogMetric.ApiVersion} version - * @memberof google.logging.v2.LogMetric - * @instance - */ - LogMetric.prototype.version = 0; + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; - /** - * Creates a new LogMetric instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogMetric - * @static - * @param {google.logging.v2.ILogMetric=} [properties] Properties to set - * @returns {google.logging.v2.LogMetric} LogMetric instance - */ - LogMetric.create = function create(properties) { - return new LogMetric(properties); - }; + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; - /** - * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogMetric - * @static - * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogMetric.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.version != null && message.hasOwnProperty("version")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) - $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueExtractor); - if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) - for (var keys = Object.keys(message.labelExtractors), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labelExtractors[keys[i]]).ldelim(); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogMetric - * @static - * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogMetric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Decodes a LogMetric message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogMetric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogMetric} LogMetric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogMetric.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 5: - message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); - break; - case 6: - message.valueExtractor = reader.string(); - break; - case 7: - reader.skip().pos++; - if (message.labelExtractors === $util.emptyObject) - message.labelExtractors = {}; - key = reader.string(); - reader.pos++; - message.labelExtractors[key] = reader.string(); - break; - case 8: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - case 9: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.version = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; - /** - * Decodes a LogMetric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogMetric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogMetric} LogMetric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogMetric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; - /** - * Verifies a LogMetric message. - * @function verify - * @memberof google.logging.v2.LogMetric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogMetric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { - var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); - if (error) - return "metricDescriptor." + error; - } - if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) - if (!$util.isString(message.valueExtractor)) - return "valueExtractor: string expected"; - if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) { - if (!$util.isObject(message.labelExtractors)) - return "labelExtractors: object expected"; - var key = Object.keys(message.labelExtractors); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labelExtractors[key[i]])) - return "labelExtractors: string{k:string} expected"; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); - if (error) - return "bucketOptions." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.version != null && message.hasOwnProperty("version")) - switch (message.version) { - default: - return "version: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogMetric - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogMetric} LogMetric - */ - LogMetric.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogMetric) - return object; - var message = new $root.google.logging.v2.LogMetric(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.metricDescriptor != null) { - if (typeof object.metricDescriptor !== "object") - throw TypeError(".google.logging.v2.LogMetric.metricDescriptor: object expected"); - message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); - } - if (object.valueExtractor != null) - message.valueExtractor = String(object.valueExtractor); - if (object.labelExtractors) { - if (typeof object.labelExtractors !== "object") - throw TypeError(".google.logging.v2.LogMetric.labelExtractors: object expected"); - message.labelExtractors = {}; - for (var keys = Object.keys(object.labelExtractors), i = 0; i < keys.length; ++i) - message.labelExtractors[keys[i]] = String(object.labelExtractors[keys[i]]); - } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.logging.v2.LogMetric.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogMetric.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogMetric.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.version) { - case "V2": - case 0: - message.version = 0; - break; - case "V1": + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.version = 1; + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; - /** - * Creates a plain object from a LogMetric message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogMetric - * @static - * @param {google.logging.v2.LogMetric} message LogMetric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogMetric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labelExtractors = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.version = options.enums === String ? "V2" : 0; - object.metricDescriptor = null; - object.valueExtractor = ""; - object.bucketOptions = null; - object.createTime = null; - object.updateTime = null; + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.version != null && message.hasOwnProperty("version")) - object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) - object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); - if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) - object.valueExtractor = message.valueExtractor; - var keys2; - if (message.labelExtractors && (keys2 = Object.keys(message.labelExtractors)).length) { - object.labelExtractors = {}; - for (var j = 0; j < keys2.length; ++j) - object.labelExtractors[keys2[j]] = message.labelExtractors[keys2[j]]; + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; - - /** - * Converts this LogMetric to JSON. - * @function toJSON - * @memberof google.logging.v2.LogMetric - * @instance - * @returns {Object.} JSON object - */ - LogMetric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; - /** - * ApiVersion enum. - * @name google.logging.v2.LogMetric.ApiVersion - * @enum {string} - * @property {number} V2=0 V2 value - * @property {number} V1=1 V1 value - */ - LogMetric.ApiVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "V2"] = 0; - values[valuesById[1] = "V1"] = 1; - return values; - })(); + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; - return LogMetric; - })(); + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.ListLogMetricsRequest = (function() { + EnumDescriptorProto.EnumReservedRange = (function() { /** - * Properties of a ListLogMetricsRequest. - * @memberof google.logging.v2 - * @interface IListLogMetricsRequest - * @property {string|null} [parent] ListLogMetricsRequest parent - * @property {string|null} [pageToken] ListLogMetricsRequest pageToken - * @property {number|null} [pageSize] ListLogMetricsRequest pageSize + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end */ /** - * Constructs a new ListLogMetricsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogMetricsRequest. - * @implements IListLogMetricsRequest + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange * @constructor - * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set */ - function ListLogMetricsRequest(properties) { + function EnumReservedRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18796,101 +19743,88 @@ } /** - * ListLogMetricsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListLogMetricsRequest - * @instance - */ - ListLogMetricsRequest.prototype.parent = ""; - - /** - * ListLogMetricsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogMetricsRequest + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance */ - ListLogMetricsRequest.prototype.pageToken = ""; + EnumReservedRange.prototype.start = 0; /** - * ListLogMetricsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogMetricsRequest + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance */ - ListLogMetricsRequest.prototype.pageSize = 0; + EnumReservedRange.prototype.end = 0; /** - * Creates a new ListLogMetricsRequest instance using the specified properties. + * Creates a new EnumReservedRange instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest instance + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance */ - ListLogMetricsRequest.create = function create(properties) { - return new ListLogMetricsRequest(properties); + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); }; /** - * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsRequest.encode = function encode(message, writer) { + EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; /** - * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * Decodes an EnumReservedRange message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsRequest.decode = function decode(reader, length) { + EnumReservedRange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.start = reader.int32(); break; case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); + message.end = reader.int32(); break; default: reader.skipType(tag & 7); @@ -18901,1759 +19835,1981 @@ }; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogMetricsRequest message. + * Verifies an EnumReservedRange message. * @function verify - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogMetricsRequest.verify = function verify(message) { + EnumReservedRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; return null; }; /** - * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange */ - ListLogMetricsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogMetricsRequest) + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) return object; - var message = new $root.google.logging.v2.ListLogMetricsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; return message; }; /** - * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.logging.v2.ListLogMetricsRequest} message ListLogMetricsRequest + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogMetricsRequest.toObject = function toObject(message, options) { + EnumReservedRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.start = 0; + object.end = 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; return object; }; /** - * Converts this ListLogMetricsRequest to JSON. + * Converts this EnumReservedRange to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance * @returns {Object.} JSON object */ - ListLogMetricsRequest.prototype.toJSON = function toJSON() { + EnumReservedRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogMetricsRequest; + return EnumReservedRange; })(); - v2.ListLogMetricsResponse = (function() { + return EnumDescriptorProto; + })(); - /** - * Properties of a ListLogMetricsResponse. - * @memberof google.logging.v2 - * @interface IListLogMetricsResponse - * @property {Array.|null} [metrics] ListLogMetricsResponse metrics - * @property {string|null} [nextPageToken] ListLogMetricsResponse nextPageToken - */ + protobuf.EnumValueDescriptorProto = (function() { - /** - * Constructs a new ListLogMetricsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogMetricsResponse. - * @implements IListLogMetricsResponse - * @constructor - * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set - */ - function ListLogMetricsResponse(properties) { - this.metrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ - /** - * ListLogMetricsResponse metrics. - * @member {Array.} metrics - * @memberof google.logging.v2.ListLogMetricsResponse - * @instance - */ - ListLogMetricsResponse.prototype.metrics = $util.emptyArray; + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListLogMetricsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogMetricsResponse - * @instance - */ - ListLogMetricsResponse.prototype.nextPageToken = ""; + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; - /** - * Creates a new ListLogMetricsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListLogMetricsResponse - * @static - * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse instance - */ - ListLogMetricsResponse.create = function create(properties) { - return new ListLogMetricsResponse(properties); - }; + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; - /** - * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListLogMetricsResponse - * @static - * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogMetricsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.logging.v2.LogMetric.encode(message.metrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListLogMetricsResponse - * @static - * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListLogMetricsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogMetricsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListLogMetricsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogMetricsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListLogMetricsResponse message. - * @function verify - * @memberof google.logging.v2.ListLogMetricsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLogMetricsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.logging.v2.LogMetric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListLogMetricsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse - */ - ListLogMetricsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogMetricsResponse) - return object; - var message = new $root.google.logging.v2.ListLogMetricsResponse(); - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: object expected"); - message.metrics[i] = $root.google.logging.v2.LogMetric.fromObject(object.metrics[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; - /** - * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListLogMetricsResponse - * @static - * @param {google.logging.v2.ListLogMetricsResponse} message ListLogMetricsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLogMetricsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metrics = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.logging.v2.LogMetric.toObject(message.metrics[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListLogMetricsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListLogMetricsResponse - * @instance - * @returns {Object.} JSON object - */ - ListLogMetricsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return EnumValueDescriptorProto; + })(); - return ListLogMetricsResponse; - })(); + protobuf.ServiceDescriptorProto = (function() { - v2.GetLogMetricRequest = (function() { + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ - /** - * Properties of a GetLogMetricRequest. - * @memberof google.logging.v2 - * @interface IGetLogMetricRequest - * @property {string|null} [metricName] GetLogMetricRequest metricName - */ + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new GetLogMetricRequest. - * @memberof google.logging.v2 - * @classdesc Represents a GetLogMetricRequest. - * @implements IGetLogMetricRequest - * @constructor - * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set - */ - function GetLogMetricRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; - /** - * GetLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.GetLogMetricRequest - * @instance - */ - GetLogMetricRequest.prototype.metricName = ""; + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; - /** - * Creates a new GetLogMetricRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.GetLogMetricRequest - * @static - * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest instance - */ - GetLogMetricRequest.create = function create(properties) { - return new GetLogMetricRequest(properties); - }; + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; - /** - * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.GetLogMetricRequest - * @static - * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetLogMetricRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && message.hasOwnProperty("metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - return writer; - }; + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; - /** - * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.GetLogMetricRequest - * @static - * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.GetLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetLogMetricRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLogMetricRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metricName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; } - return message; - }; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.GetLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; - /** - * Verifies a GetLogMetricRequest message. - * @function verify - * @memberof google.logging.v2.GetLogMetricRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetLogMetricRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - return null; - }; + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; - /** - * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.GetLogMetricRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest - */ - GetLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetLogMetricRequest) - return object; - var message = new $root.google.logging.v2.GetLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); - return message; - }; + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.GetLogMetricRequest - * @static - * @param {google.logging.v2.GetLogMetricRequest} message GetLogMetricRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetLogMetricRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - return object; - }; + return ServiceDescriptorProto; + })(); - /** - * Converts this GetLogMetricRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.GetLogMetricRequest - * @instance - * @returns {Object.} JSON object - */ - GetLogMetricRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + protobuf.MethodDescriptorProto = (function() { - return GetLogMetricRequest; - })(); + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ - v2.CreateLogMetricRequest = (function() { + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a CreateLogMetricRequest. - * @memberof google.logging.v2 - * @interface ICreateLogMetricRequest - * @property {string|null} [parent] CreateLogMetricRequest parent - * @property {google.logging.v2.ILogMetric|null} [metric] CreateLogMetricRequest metric - */ + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; - /** - * Constructs a new CreateLogMetricRequest. - * @memberof google.logging.v2 - * @classdesc Represents a CreateLogMetricRequest. - * @implements ICreateLogMetricRequest - * @constructor - * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set - */ - function CreateLogMetricRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; - /** - * CreateLogMetricRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateLogMetricRequest - * @instance - */ - CreateLogMetricRequest.prototype.parent = ""; + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; - /** - * CreateLogMetricRequest metric. - * @member {google.logging.v2.ILogMetric|null|undefined} metric - * @memberof google.logging.v2.CreateLogMetricRequest - * @instance - */ - CreateLogMetricRequest.prototype.metric = null; + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; - /** - * Creates a new CreateLogMetricRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest instance - */ - CreateLogMetricRequest.create = function create(properties) { - return new CreateLogMetricRequest(properties); - }; + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; - /** - * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateLogMetricRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.metric != null && message.hasOwnProperty("metric")) - $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; - /** - * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; - /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateLogMetricRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLogMetricRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && message.hasOwnProperty("inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && message.hasOwnProperty("outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; - /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a CreateLogMetricRequest message. - * @function verify - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateLogMetricRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.metric != null && message.hasOwnProperty("metric")) { - var error = $root.google.logging.v2.LogMetric.verify(message.metric); - if (error) - return "metric." + error; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest - */ - CreateLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateLogMetricRequest) - return object; - var message = new $root.google.logging.v2.CreateLogMetricRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.logging.v2.CreateLogMetricRequest.metric: object expected"); - message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); - } - return message; - }; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {google.logging.v2.CreateLogMetricRequest} message CreateLogMetricRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateLogMetricRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.metric = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; - }; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; - /** - * Converts this CreateLogMetricRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateLogMetricRequest - * @instance - * @returns {Object.} JSON object - */ - CreateLogMetricRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; - return CreateLogMetricRequest; - })(); + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.UpdateLogMetricRequest = (function() { + return MethodDescriptorProto; + })(); - /** - * Properties of an UpdateLogMetricRequest. - * @memberof google.logging.v2 - * @interface IUpdateLogMetricRequest - * @property {string|null} [metricName] UpdateLogMetricRequest metricName - * @property {google.logging.v2.ILogMetric|null} [metric] UpdateLogMetricRequest metric - */ + protobuf.FileOptions = (function() { - /** - * Constructs a new UpdateLogMetricRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateLogMetricRequest. - * @implements IUpdateLogMetricRequest - * @constructor - * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set - */ - function UpdateLogMetricRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ - /** - * UpdateLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.UpdateLogMetricRequest - * @instance - */ - UpdateLogMetricRequest.prototype.metricName = ""; + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * UpdateLogMetricRequest metric. - * @member {google.logging.v2.ILogMetric|null|undefined} metric - * @memberof google.logging.v2.UpdateLogMetricRequest - * @instance - */ - UpdateLogMetricRequest.prototype.metric = null; + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; - /** - * Creates a new UpdateLogMetricRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest instance - */ - UpdateLogMetricRequest.create = function create(properties) { - return new UpdateLogMetricRequest(properties); - }; + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; - /** - * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateLogMetricRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && message.hasOwnProperty("metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - if (message.metric != null && message.hasOwnProperty("metric")) - $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; - /** - * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; - /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateLogMetricRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateLogMetricRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metricName = reader.string(); - break; - case 2: - message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; - /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; - /** - * Verifies an UpdateLogMetricRequest message. - * @function verify - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateLogMetricRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - if (message.metric != null && message.hasOwnProperty("metric")) { - var error = $root.google.logging.v2.LogMetric.verify(message.metric); - if (error) - return "metric." + error; - } - return null; - }; + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; - /** - * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest - */ - UpdateLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateLogMetricRequest) - return object; - var message = new $root.google.logging.v2.UpdateLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.logging.v2.UpdateLogMetricRequest.metric: object expected"); - message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); - } - return message; - }; + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; - /** - * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {google.logging.v2.UpdateLogMetricRequest} message UpdateLogMetricRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateLogMetricRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.metricName = ""; - object.metric = null; - } - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); - return object; - }; + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; - /** - * Converts this UpdateLogMetricRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateLogMetricRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateLogMetricRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; - return UpdateLogMetricRequest; - })(); + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; - v2.DeleteLogMetricRequest = (function() { + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = false; - /** - * Properties of a DeleteLogMetricRequest. - * @memberof google.logging.v2 - * @interface IDeleteLogMetricRequest - * @property {string|null} [metricName] DeleteLogMetricRequest metricName - */ + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; - /** - * Constructs a new DeleteLogMetricRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteLogMetricRequest. - * @implements IDeleteLogMetricRequest - * @constructor - * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set - */ - function DeleteLogMetricRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; - /** - * DeleteLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.DeleteLogMetricRequest - * @instance - */ - DeleteLogMetricRequest.prototype.metricName = ""; + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; - /** - * Creates a new DeleteLogMetricRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest instance - */ - DeleteLogMetricRequest.create = function create(properties) { - return new DeleteLogMetricRequest(properties); - }; + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; - /** - * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLogMetricRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && message.hasOwnProperty("metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - return writer; - }; + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; - /** - * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; - /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLogMetricRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogMetricRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metricName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; - /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Verifies a DeleteLogMetricRequest message. - * @function verify - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteLogMetricRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - return null; - }; + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - /** - * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest - */ - DeleteLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteLogMetricRequest) - return object; - var message = new $root.google.logging.v2.DeleteLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); - return message; - }; + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; - /** - * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {google.logging.v2.DeleteLogMetricRequest} message DeleteLogMetricRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteLogMetricRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - return object; - }; + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; - /** - * Converts this DeleteLogMetricRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteLogMetricRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteLogMetricRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return DeleteLogMetricRequest; - })(); + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return v2; - })(); + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - logging.type = (function() { + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; /** - * Namespace type. - * @memberof google.logging - * @namespace + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions */ - var type = {}; - - type.HttpRequest = (function() { - - /** - * Properties of a HttpRequest. - * @memberof google.logging.type - * @interface IHttpRequest - * @property {string|null} [requestMethod] HttpRequest requestMethod - * @property {string|null} [requestUrl] HttpRequest requestUrl - * @property {number|Long|null} [requestSize] HttpRequest requestSize - * @property {number|null} [status] HttpRequest status - * @property {number|Long|null} [responseSize] HttpRequest responseSize - * @property {string|null} [userAgent] HttpRequest userAgent - * @property {string|null} [remoteIp] HttpRequest remoteIp - * @property {string|null} [serverIp] HttpRequest serverIp - * @property {string|null} [referer] HttpRequest referer - * @property {google.protobuf.IDuration|null} [latency] HttpRequest latency - * @property {boolean|null} [cacheLookup] HttpRequest cacheLookup - * @property {boolean|null} [cacheHit] HttpRequest cacheHit - * @property {boolean|null} [cacheValidatedWithOriginServer] HttpRequest cacheValidatedWithOriginServer - * @property {number|Long|null} [cacheFillBytes] HttpRequest cacheFillBytes - * @property {string|null} [protocol] HttpRequest protocol - */ - - /** - * Constructs a new HttpRequest. - * @memberof google.logging.type - * @classdesc Represents a HttpRequest. - * @implements IHttpRequest - * @constructor - * @param {google.logging.type.IHttpRequest=} [properties] Properties to set - */ - function HttpRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; - /** - * HttpRequest requestMethod. - * @member {string} requestMethod - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.requestMethod = ""; - - /** - * HttpRequest requestUrl. - * @member {string} requestUrl - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.requestUrl = ""; - - /** - * HttpRequest requestSize. - * @member {number|Long} requestSize - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.requestSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * HttpRequest status. - * @member {number} status - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.status = 0; - - /** - * HttpRequest responseSize. - * @member {number|Long} responseSize - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.responseSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * HttpRequest userAgent. - * @member {string} userAgent - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.userAgent = ""; - - /** - * HttpRequest remoteIp. - * @member {string} remoteIp - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.remoteIp = ""; - - /** - * HttpRequest serverIp. - * @member {string} serverIp - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.serverIp = ""; - - /** - * HttpRequest referer. - * @member {string} referer - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.referer = ""; - - /** - * HttpRequest latency. - * @member {google.protobuf.IDuration|null|undefined} latency - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.latency = null; - - /** - * HttpRequest cacheLookup. - * @member {boolean} cacheLookup - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.cacheLookup = false; - - /** - * HttpRequest cacheHit. - * @member {boolean} cacheHit - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.cacheHit = false; - - /** - * HttpRequest cacheValidatedWithOriginServer. - * @member {boolean} cacheValidatedWithOriginServer - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.cacheValidatedWithOriginServer = false; + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = false; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; - /** - * HttpRequest cacheFillBytes. - * @member {number|Long} cacheFillBytes - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.cacheFillBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * HttpRequest protocol. - * @member {string} protocol - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.protocol = ""; + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); - /** - * Creates a new HttpRequest instance using the specified properties. - * @function create - * @memberof google.logging.type.HttpRequest - * @static - * @param {google.logging.type.IHttpRequest=} [properties] Properties to set - * @returns {google.logging.type.HttpRequest} HttpRequest instance - */ - HttpRequest.create = function create(properties) { - return new HttpRequest(properties); - }; + return FileOptions; + })(); - /** - * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.type.HttpRequest - * @static - * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestMethod); - if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestUrl); - if (message.requestSize != null && message.hasOwnProperty("requestSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestSize); - if (message.status != null && message.hasOwnProperty("status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.responseSize != null && message.hasOwnProperty("responseSize")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.responseSize); - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.userAgent); - if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.remoteIp); - if (message.referer != null && message.hasOwnProperty("referer")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.referer); - if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.cacheHit); - if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.cacheValidatedWithOriginServer); - if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.cacheLookup); - if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) - writer.uint32(/* id 12, wireType 0 =*/96).int64(message.cacheFillBytes); - if (message.serverIp != null && message.hasOwnProperty("serverIp")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.serverIp); - if (message.latency != null && message.hasOwnProperty("latency")) - $root.google.protobuf.Duration.encode(message.latency, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.protocol != null && message.hasOwnProperty("protocol")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.protocol); - return writer; - }; + protobuf.MessageOptions = (function() { - /** - * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.type.HttpRequest - * @static - * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ - /** - * Decodes a HttpRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.type.HttpRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.type.HttpRequest} HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.type.HttpRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.requestMethod = reader.string(); - break; - case 2: - message.requestUrl = reader.string(); - break; - case 3: - message.requestSize = reader.int64(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.responseSize = reader.int64(); - break; - case 6: - message.userAgent = reader.string(); - break; - case 7: - message.remoteIp = reader.string(); - break; - case 13: - message.serverIp = reader.string(); - break; - case 8: - message.referer = reader.string(); - break; - case 14: - message.latency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 11: - message.cacheLookup = reader.bool(); - break; - case 9: - message.cacheHit = reader.bool(); - break; - case 10: - message.cacheValidatedWithOriginServer = reader.bool(); - break; - case 12: - message.cacheFillBytes = reader.int64(); - break; - case 15: - message.protocol = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a HttpRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.type.HttpRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.type.HttpRequest} HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; - /** - * Verifies a HttpRequest message. - * @function verify - * @memberof google.logging.type.HttpRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) - if (!$util.isString(message.requestMethod)) - return "requestMethod: string expected"; - if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) - if (!$util.isString(message.requestUrl)) - return "requestUrl: string expected"; - if (message.requestSize != null && message.hasOwnProperty("requestSize")) - if (!$util.isInteger(message.requestSize) && !(message.requestSize && $util.isInteger(message.requestSize.low) && $util.isInteger(message.requestSize.high))) - return "requestSize: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isInteger(message.status)) - return "status: integer expected"; - if (message.responseSize != null && message.hasOwnProperty("responseSize")) - if (!$util.isInteger(message.responseSize) && !(message.responseSize && $util.isInteger(message.responseSize.low) && $util.isInteger(message.responseSize.high))) - return "responseSize: integer|Long expected"; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - if (!$util.isString(message.userAgent)) - return "userAgent: string expected"; - if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) - if (!$util.isString(message.remoteIp)) - return "remoteIp: string expected"; - if (message.serverIp != null && message.hasOwnProperty("serverIp")) - if (!$util.isString(message.serverIp)) - return "serverIp: string expected"; - if (message.referer != null && message.hasOwnProperty("referer")) - if (!$util.isString(message.referer)) - return "referer: string expected"; - if (message.latency != null && message.hasOwnProperty("latency")) { - var error = $root.google.protobuf.Duration.verify(message.latency); - if (error) - return "latency." + error; - } - if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) - if (typeof message.cacheLookup !== "boolean") - return "cacheLookup: boolean expected"; - if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) - if (typeof message.cacheHit !== "boolean") - return "cacheHit: boolean expected"; - if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) - if (typeof message.cacheValidatedWithOriginServer !== "boolean") - return "cacheValidatedWithOriginServer: boolean expected"; - if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) - if (!$util.isInteger(message.cacheFillBytes) && !(message.cacheFillBytes && $util.isInteger(message.cacheFillBytes.low) && $util.isInteger(message.cacheFillBytes.high))) - return "cacheFillBytes: integer|Long expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - return null; - }; + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; - /** - * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.type.HttpRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.type.HttpRequest} HttpRequest - */ - HttpRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.type.HttpRequest) - return object; - var message = new $root.google.logging.type.HttpRequest(); - if (object.requestMethod != null) - message.requestMethod = String(object.requestMethod); - if (object.requestUrl != null) - message.requestUrl = String(object.requestUrl); - if (object.requestSize != null) - if ($util.Long) - (message.requestSize = $util.Long.fromValue(object.requestSize)).unsigned = false; - else if (typeof object.requestSize === "string") - message.requestSize = parseInt(object.requestSize, 10); - else if (typeof object.requestSize === "number") - message.requestSize = object.requestSize; - else if (typeof object.requestSize === "object") - message.requestSize = new $util.LongBits(object.requestSize.low >>> 0, object.requestSize.high >>> 0).toNumber(); - if (object.status != null) - message.status = object.status | 0; - if (object.responseSize != null) - if ($util.Long) - (message.responseSize = $util.Long.fromValue(object.responseSize)).unsigned = false; - else if (typeof object.responseSize === "string") - message.responseSize = parseInt(object.responseSize, 10); - else if (typeof object.responseSize === "number") - message.responseSize = object.responseSize; - else if (typeof object.responseSize === "object") - message.responseSize = new $util.LongBits(object.responseSize.low >>> 0, object.responseSize.high >>> 0).toNumber(); - if (object.userAgent != null) - message.userAgent = String(object.userAgent); - if (object.remoteIp != null) - message.remoteIp = String(object.remoteIp); - if (object.serverIp != null) - message.serverIp = String(object.serverIp); - if (object.referer != null) - message.referer = String(object.referer); - if (object.latency != null) { - if (typeof object.latency !== "object") - throw TypeError(".google.logging.type.HttpRequest.latency: object expected"); - message.latency = $root.google.protobuf.Duration.fromObject(object.latency); + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - if (object.cacheLookup != null) - message.cacheLookup = Boolean(object.cacheLookup); - if (object.cacheHit != null) - message.cacheHit = Boolean(object.cacheHit); - if (object.cacheValidatedWithOriginServer != null) - message.cacheValidatedWithOriginServer = Boolean(object.cacheValidatedWithOriginServer); - if (object.cacheFillBytes != null) - if ($util.Long) - (message.cacheFillBytes = $util.Long.fromValue(object.cacheFillBytes)).unsigned = false; - else if (typeof object.cacheFillBytes === "string") - message.cacheFillBytes = parseInt(object.cacheFillBytes, 10); - else if (typeof object.cacheFillBytes === "number") - message.cacheFillBytes = object.cacheFillBytes; - else if (typeof object.cacheFillBytes === "object") - message.cacheFillBytes = new $util.LongBits(object.cacheFillBytes.low >>> 0, object.cacheFillBytes.high >>> 0).toNumber(); - if (object.protocol != null) - message.protocol = String(object.protocol); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.type.HttpRequest - * @static - * @param {google.logging.type.HttpRequest} message HttpRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.requestMethod = ""; - object.requestUrl = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.requestSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.requestSize = options.longs === String ? "0" : 0; - object.status = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.responseSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.responseSize = options.longs === String ? "0" : 0; - object.userAgent = ""; - object.remoteIp = ""; - object.referer = ""; - object.cacheHit = false; - object.cacheValidatedWithOriginServer = false; - object.cacheLookup = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.cacheFillBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.cacheFillBytes = options.longs === String ? "0" : 0; - object.serverIp = ""; - object.latency = null; - object.protocol = ""; + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; } - if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) - object.requestMethod = message.requestMethod; - if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) - object.requestUrl = message.requestUrl; - if (message.requestSize != null && message.hasOwnProperty("requestSize")) - if (typeof message.requestSize === "number") - object.requestSize = options.longs === String ? String(message.requestSize) : message.requestSize; - else - object.requestSize = options.longs === String ? $util.Long.prototype.toString.call(message.requestSize) : options.longs === Number ? new $util.LongBits(message.requestSize.low >>> 0, message.requestSize.high >>> 0).toNumber() : message.requestSize; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.responseSize != null && message.hasOwnProperty("responseSize")) - if (typeof message.responseSize === "number") - object.responseSize = options.longs === String ? String(message.responseSize) : message.responseSize; - else - object.responseSize = options.longs === String ? $util.Long.prototype.toString.call(message.responseSize) : options.longs === Number ? new $util.LongBits(message.responseSize.low >>> 0, message.responseSize.high >>> 0).toNumber() : message.responseSize; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - object.userAgent = message.userAgent; - if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) - object.remoteIp = message.remoteIp; - if (message.referer != null && message.hasOwnProperty("referer")) - object.referer = message.referer; - if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) - object.cacheHit = message.cacheHit; - if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) - object.cacheValidatedWithOriginServer = message.cacheValidatedWithOriginServer; - if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) - object.cacheLookup = message.cacheLookup; - if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) - if (typeof message.cacheFillBytes === "number") - object.cacheFillBytes = options.longs === String ? String(message.cacheFillBytes) : message.cacheFillBytes; - else - object.cacheFillBytes = options.longs === String ? $util.Long.prototype.toString.call(message.cacheFillBytes) : options.longs === Number ? new $util.LongBits(message.cacheFillBytes.low >>> 0, message.cacheFillBytes.high >>> 0).toNumber() : message.cacheFillBytes; - if (message.serverIp != null && message.hasOwnProperty("serverIp")) - object.serverIp = message.serverIp; - if (message.latency != null && message.hasOwnProperty("latency")) - object.latency = $root.google.protobuf.Duration.toObject(message.latency, options); - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - return object; - }; + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; - /** - * Converts this HttpRequest to JSON. - * @function toJSON - * @memberof google.logging.type.HttpRequest - * @instance - * @returns {Object.} JSON object - */ - HttpRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; - return HttpRequest; - })(); + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; /** - * LogSeverity enum. - * @name google.logging.type.LogSeverity - * @enum {string} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} DEBUG=100 DEBUG value - * @property {number} INFO=200 INFO value - * @property {number} NOTICE=300 NOTICE value - * @property {number} WARNING=400 WARNING value - * @property {number} ERROR=500 ERROR value - * @property {number} CRITICAL=600 CRITICAL value - * @property {number} ALERT=700 ALERT value - * @property {number} EMERGENCY=800 EMERGENCY value + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object */ - type.LogSeverity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[100] = "DEBUG"] = 100; - values[valuesById[200] = "INFO"] = 200; - values[valuesById[300] = "NOTICE"] = 300; - values[valuesById[400] = "WARNING"] = 400; - values[valuesById[500] = "ERROR"] = 500; - values[valuesById[600] = "CRITICAL"] = 600; - values[valuesById[700] = "ALERT"] = 700; - values[valuesById[800] = "EMERGENCY"] = 800; - return values; - })(); + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return type; + return MessageOptions; })(); - return logging; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20661,91 +21817,193 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions * @instance */ - Http.prototype.rules = $util.emptyArray; + FieldOptions.prototype.ctype = 0; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + FieldOptions.prototype.packed = false; /** - * Creates a new Http instance using the specified properties. + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - Http.create = function create(properties) { - return new Http(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.ctype != null && message.hasOwnProperty("ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && message.hasOwnProperty("packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && message.hasOwnProperty("lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && message.hasOwnProperty("jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && message.hasOwnProperty("weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + FieldOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.ctype = reader.int32(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -20756,353 +22014,391 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a FieldOptions message. * @function verify - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + FieldOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "rules." + error; + return "uninterpretedOption." + error; } } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.protobuf.FieldOptions} FieldOptions */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @static - * @param {google.api.Http} message Http + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** - * Converts this Http to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value */ - HttpRule.prototype["delete"] = ""; + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {string} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value */ - HttpRule.prototype.patch = ""; + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + return FieldOptions; + })(); - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + protobuf.OneofOptions = (function() { /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ - HttpRule.prototype.responseBody = ""; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + OneofOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + OneofOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -21113,240 +22409,127 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + OneofOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies an OneofOptions message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + OneofOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "additionalBindings." + error; + return "uninterpretedOption." + error; } } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.OneofOptions} OneofOptions */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.protobuf.OneofOptions} message OneofOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + OneofOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this OneofOptions to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + OneofOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return OneofOptions; })(); - api.CustomHttpPattern = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function EnumOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21354,88 +22537,104 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions * @instance */ - CustomHttpPattern.prototype.kind = ""; + EnumOptions.prototype.allowAlias = false; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions * @instance */ - CustomHttpPattern.prototype.path = ""; + EnumOptions.prototype.deprecated = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + EnumOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; case 2: - message.path = reader.string(); + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -21446,122 +22645,144 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + EnumOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.EnumOptions} EnumOptions */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return EnumOptions; })(); - api.MonitoredResourceDescriptor = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of a MonitoredResourceDescriptor. - * @memberof google.api - * @interface IMonitoredResourceDescriptor - * @property {string|null} [name] MonitoredResourceDescriptor name - * @property {string|null} [type] MonitoredResourceDescriptor type - * @property {string|null} [displayName] MonitoredResourceDescriptor displayName - * @property {string|null} [description] MonitoredResourceDescriptor description - * @property {Array.|null} [labels] MonitoredResourceDescriptor labels - * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ /** - * Constructs a new MonitoredResourceDescriptor. - * @memberof google.api - * @classdesc Represents a MonitoredResourceDescriptor. - * @implements IMonitoredResourceDescriptor + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function MonitoredResourceDescriptor(properties) { - this.labels = []; + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21569,143 +22790,91 @@ } /** - * MonitoredResourceDescriptor name. - * @member {string} name - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.name = ""; - - /** - * MonitoredResourceDescriptor type. - * @member {string} type - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.type = ""; - - /** - * MonitoredResourceDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.displayName = ""; - - /** - * MonitoredResourceDescriptor description. - * @member {string} description - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.description = ""; - - /** - * MonitoredResourceDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MonitoredResourceDescriptor + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + EnumValueOptions.prototype.deprecated = false; /** - * MonitoredResourceDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MonitoredResourceDescriptor + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions * @instance */ - MonitoredResourceDescriptor.prototype.launchStage = 0; + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance */ - MonitoredResourceDescriptor.create = function create(properties) { - return new MonitoredResourceDescriptor(properties); + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); }; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encode = function encode(message, writer) { + EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { + EnumValueOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; case 1: - message.type = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + message.deprecated = reader.bool(); break; - case 7: - message.launchStage = reader.int32(); + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -21716,201 +22885,137 @@ }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies an EnumValueOptions message. * @function verify - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "labels." + error; + return "uninterpretedOption." + error; } } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } return null; }; /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - MonitoredResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceDescriptor) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - var message = new $root.google.api.MonitoredResourceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } return message; }; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceDescriptor.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.labels = []; - if (options.defaults) { - object.type = ""; - object.displayName = ""; - object.description = ""; - object.name = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResourceDescriptor; + return EnumValueOptions; })(); - api.MonitoredResource = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of a MonitoredResource. - * @memberof google.api - * @interface IMonitoredResource - * @property {string|null} [type] MonitoredResource type - * @property {Object.|null} [labels] MonitoredResource labels + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ /** - * Constructs a new MonitoredResource. - * @memberof google.api - * @classdesc Represents a MonitoredResource. - * @implements IMonitoredResource + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function MonitoredResource(properties) { - this.labels = {}; + function ServiceOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21918,94 +23023,117 @@ } /** - * MonitoredResource type. - * @member {string} type - * @memberof google.api.MonitoredResource + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions * @instance */ - MonitoredResource.prototype.type = ""; + ServiceOptions.prototype.deprecated = false; /** - * MonitoredResource labels. - * @member {Object.} labels - * @memberof google.api.MonitoredResource + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions * @instance */ - MonitoredResource.prototype.labels = $util.emptyObject; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new MonitoredResource instance using the specified properties. + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.api.IMonitoredResource=} [properties] Properties to set - * @returns {google.api.MonitoredResource} MonitoredResource instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - MonitoredResource.create = function create(properties) { - return new MonitoredResource(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encode = function encode(message, writer) { + ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decode = function decode(reader, length) { + ServiceOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 2: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); break; default: reader.skipType(tag & 7); @@ -22016,132 +23144,156 @@ }; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResource message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResource.verify = function verify(message) { + ServiceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; return null; }; /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - MonitoredResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResource) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.api.MonitoredResource(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.MonitoredResource.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.api.MonitoredResource} message MonitoredResource + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResource.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this MonitoredResource to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.api.MonitoredResource + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - MonitoredResource.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResource; + return ServiceOptions; })(); - api.MonitoredResourceMetadata = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a MonitoredResourceMetadata. - * @memberof google.api - * @interface IMonitoredResourceMetadata - * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels - * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http */ /** - * Constructs a new MonitoredResourceMetadata. - * @memberof google.api - * @classdesc Represents a MonitoredResourceMetadata. - * @implements IMonitoredResourceMetadata + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function MonitoredResourceMetadata(properties) { - this.userLabels = {}; + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22149,94 +23301,133 @@ } /** - * MonitoredResourceMetadata systemLabels. - * @member {google.protobuf.IStruct|null|undefined} systemLabels - * @memberof google.api.MonitoredResourceMetadata + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - MonitoredResourceMetadata.prototype.systemLabels = null; + MethodOptions.prototype.deprecated = false; /** - * MonitoredResourceMetadata userLabels. - * @member {Object.} userLabels - * @memberof google.api.MonitoredResourceMetadata + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions * @instance */ - MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + MethodOptions.prototype.idempotencyLevel = 0; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - MonitoredResourceMetadata.create = function create(properties) { - return new MonitoredResourceMetadata(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encode = function encode(message, writer) { + MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && message.hasOwnProperty("userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decode = function decode(reader, length) { + MethodOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + case 33: + message.deprecated = reader.bool(); break; - case 2: - reader.skip().pos++; - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - key = reader.string(); - reader.pos++; - message.userLabels[key] = reader.string(); + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -22247,239 +23438,374 @@ }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceMetadata.verify = function verify(message) { + MethodOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { - var error = $root.google.protobuf.Struct.verify(message.systemLabels); - if (error) - return "systemLabels." + error; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; } return null; }; /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.protobuf.MethodOptions} MethodOptions */ - MonitoredResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceMetadata) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.api.MonitoredResourceMetadata(); - if (object.systemLabels != null) { - if (typeof object.systemLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); - message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); } return message; }; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceMetadata.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) - object.systemLabels = null; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance - * @returns {Object.} JSON object */ - MonitoredResourceMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MonitoredResourceMetadata; - })(); - - api.LabelDescriptor = (function() { + UninterpretedOption.prototype.identifierValue = ""; /** - * Properties of a LabelDescriptor. - * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Constructs a new LabelDescriptor. - * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor - * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - function LabelDescriptor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - LabelDescriptor.prototype.key = ""; + UninterpretedOption.prototype.doubleValue = 0; /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - LabelDescriptor.prototype.valueType = 0; + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - LabelDescriptor.prototype.description = ""; + UninterpretedOption.prototype.aggregateValue = ""; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @function create - * @memberof google.api.LabelDescriptor + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.api.LabelDescriptor + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && message.hasOwnProperty("key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && message.hasOwnProperty("valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.api.LabelDescriptor + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + UninterpretedOption.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; case 2: - message.valueType = reader.int32(); + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; case 3: - message.description = reader.string(); + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); break; default: reader.skipType(tag & 7); @@ -22490,188 +23816,422 @@ }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.LabelDescriptor + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; }; /** - * Verifies a LabelDescriptor message. - * @function verify - * @memberof google.api.LabelDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object */ - LabelDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.LabelDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor - */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) - return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - } - if (object.description != null) - message.description = String(object.description); - return message; - }; + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; - /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LabelDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; - object.description = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; - /** - * Converts this LabelDescriptor to JSON. - * @function toJSON - * @memberof google.api.LabelDescriptor - * @instance - * @returns {Object.} JSON object - */ - LabelDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {string} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; + return NamePart; })(); - return LabelDescriptor; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {string} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; + return UninterpretedOption; })(); - api.Distribution = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a Distribution. - * @memberof google.api - * @interface IDistribution - * @property {number|Long|null} [count] Distribution count - * @property {number|null} [mean] Distribution mean - * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation - * @property {google.api.Distribution.IRange|null} [range] Distribution range - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions - * @property {Array.|null} [bucketCounts] Distribution bucketCounts - * @property {Array.|null} [exemplars] Distribution exemplars + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new Distribution. - * @memberof google.api - * @classdesc Represents a Distribution. - * @implements IDistribution + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.api.IDistribution=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function Distribution(properties) { - this.bucketCounts = []; - this.exemplars = []; + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22679,167 +24239,78 @@ } /** - * Distribution count. - * @member {number|Long} count - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Distribution mean. - * @member {number} mean - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.mean = 0; - - /** - * Distribution sumOfSquaredDeviation. - * @member {number} sumOfSquaredDeviation - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.sumOfSquaredDeviation = 0; - - /** - * Distribution range. - * @member {google.api.Distribution.IRange|null|undefined} range - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.range = null; - - /** - * Distribution bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.bucketOptions = null; - - /** - * Distribution bucketCounts. - * @member {Array.} bucketCounts - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.bucketCounts = $util.emptyArray; - - /** - * Distribution exemplars. - * @member {Array.} exemplars - * @memberof google.api.Distribution + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - Distribution.prototype.exemplars = $util.emptyArray; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new Distribution instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.api.IDistribution=} [properties] Properties to set - * @returns {google.api.Distribution} Distribution instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - Distribution.create = function create(properties) { - return new Distribution(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encode = function encode(message, writer) { + SourceCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.count != null && message.hasOwnProperty("count")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && message.hasOwnProperty("mean")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && message.hasOwnProperty("range")) - $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.int64(message.bucketCounts[i]); - writer.ldelim(); - } - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution} Distribution + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decode = function decode(reader, length) { + SourceCodeInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.count = reader.int64(); - break; - case 2: - message.mean = reader.double(); - break; - case 3: - message.sumOfSquaredDeviation = reader.double(); - break; - case 4: - message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); - break; - case 6: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bucketCounts.push(reader.int64()); - } else - message.bucketCounts.push(reader.int64()); - break; - case 10: - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -22850,219 +24321,128 @@ }; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution} Distribution + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Distribution message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Distribution.verify = function verify(message) { + SourceCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.mean != null && message.hasOwnProperty("mean")) - if (typeof message.mean !== "number") - return "mean: number expected"; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - if (typeof message.sumOfSquaredDeviation !== "number") - return "sumOfSquaredDeviation: number expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.api.Distribution.Range.verify(message.range); - if (error) - return "range." + error; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); - if (error) - return "bucketOptions." + error; - } - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; - } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); if (error) - return "exemplars." + error; + return "location." + error; } } return null; }; /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution} Distribution + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - var message = new $root.google.api.Distribution(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.mean != null) - message.mean = Number(object.mean); - if (object.sumOfSquaredDeviation != null) - message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.api.Distribution.range: object expected"); - message.range = $root.google.api.Distribution.Range.fromObject(object.range); - } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.api.Distribution.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); - } - if (object.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".google.api.Distribution.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); - } - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".google.api.Distribution.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".google.api.Distribution.exemplars: object expected"); - message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); } } return message; }; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.api.Distribution} message Distribution + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Distribution.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.bucketCounts = []; - object.exemplars = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - object.mean = 0; - object.sumOfSquaredDeviation = 0; - object.range = null; - object.bucketOptions = null; - } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.mean != null && message.hasOwnProperty("mean")) - object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.api.Distribution.Range.toObject(message.range, options); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; - } - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); } return object; }; /** - * Converts this Distribution to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.api.Distribution + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - Distribution.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Distribution.Range = (function() { + SourceCodeInfo.Location = (function() { /** - * Properties of a Range. - * @memberof google.api.Distribution - * @interface IRange - * @property {number|null} [min] Range min - * @property {number|null} [max] Range max + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments */ /** - * Constructs a new Range. - * @memberof google.api.Distribution - * @classdesc Represents a Range. - * @implements IRange + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation * @constructor - * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set */ - function Range(properties) { + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23070,88 +24450,152 @@ } /** - * Range min. - * @member {number} min - * @memberof google.api.Distribution.Range + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - Range.prototype.min = 0; + Location.prototype.path = $util.emptyArray; /** - * Range max. - * @member {number} max - * @memberof google.api.Distribution.Range + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - Range.prototype.max = 0; + Location.prototype.span = $util.emptyArray; /** - * Creates a new Range instance using the specified properties. + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. * @function create - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.api.Distribution.IRange=} [properties] Properties to set - * @returns {google.api.Distribution.Range} Range instance + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance */ - Range.create = function create(properties) { - return new Range(properties); + Location.create = function create(properties) { + return new Location(properties); }; /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Range.encode = function encode(message, writer) { + Location.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.min != null && message.hasOwnProperty("min")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && message.hasOwnProperty("max")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); return writer; }; /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Range.encodeDelimited = function encodeDelimited(message, writer) { + Location.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Range message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Range} Range + * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Range.decode = function decode(reader, length) { + Location.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.min = reader.double(); + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); break; case 2: - message.max = reader.double(); + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -23162,118 +24606,390 @@ }; /** - * Decodes a Range message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Range} Range + * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Range.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Range message. + * Verifies a Location message. * @function verify - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Range.verify = function verify(message) { + Location.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min !== "number") - return "min: number expected"; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max !== "number") - return "max: number expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } return null; }; /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. + * Creates a Location message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.Range} Range + * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - Range.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Range) + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; - var message = new $root.google.api.Distribution.Range(); - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } return message; }; /** - * Creates a plain object from a Range message. Also converts values to other types if specified. + * Creates a plain object from a Location message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.api.Distribution.Range} message Range + * @param {google.protobuf.SourceCodeInfo.Location} message Location * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Range.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } if (options.defaults) { - object.min = 0; - object.max = 0; + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; } - if (message.min != null && message.hasOwnProperty("min")) - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (message.max != null && message.hasOwnProperty("max")) - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; return object; }; /** - * Converts this Range to JSON. + * Converts this Location to JSON. * @function toJSON - * @memberof google.api.Distribution.Range + * @memberof google.protobuf.SourceCodeInfo.Location * @instance * @returns {Object.} JSON object */ - Range.prototype.toJSON = function toJSON() { + Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Range; + return Location; })(); - Distribution.BucketOptions = (function() { + return SourceCodeInfo; + })(); - /** - * Properties of a BucketOptions. - * @memberof google.api.Distribution - * @interface IBucketOptions - * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets - * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets - * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end */ /** - * Constructs a new BucketOptions. - * @memberof google.api.Distribution - * @classdesc Represents a BucketOptions. - * @implements IBucketOptions + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation * @constructor - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set */ - function BucketOptions(properties) { + function Annotation(properties) { + this.path = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23281,115 +24997,125 @@ } /** - * BucketOptions linearBuckets. - * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets - * @memberof google.api.Distribution.BucketOptions + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - BucketOptions.prototype.linearBuckets = null; + Annotation.prototype.path = $util.emptyArray; /** - * BucketOptions exponentialBuckets. - * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets - * @memberof google.api.Distribution.BucketOptions + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - BucketOptions.prototype.exponentialBuckets = null; + Annotation.prototype.sourceFile = ""; /** - * BucketOptions explicitBuckets. - * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets - * @memberof google.api.Distribution.BucketOptions + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - BucketOptions.prototype.explicitBuckets = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Annotation.prototype.begin = 0; /** - * BucketOptions options. - * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options - * @memberof google.api.Distribution.BucketOptions + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Object.defineProperty(BucketOptions.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), - set: $util.oneOfSetter($oneOfFields) - }); + Annotation.prototype.end = 0; /** - * Creates a new BucketOptions instance using the specified properties. + * Creates a new Annotation instance using the specified properties. * @function create - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance */ - BucketOptions.create = function create(properties) { - return new BucketOptions(properties); + Annotation.create = function create(properties) { + return new Annotation(properties); }; /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BucketOptions.encode = function encode(message, writer) { + Annotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) - $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) - $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) - $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && message.hasOwnProperty("begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + Annotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BucketOptions message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BucketOptions.decode = function decode(reader, length) { + Annotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); break; case 2: - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + message.sourceFile = reader.string(); break; case 3: - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); break; default: reader.skipType(tag & 7); @@ -23400,1104 +25126,1179 @@ }; /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BucketOptions.decodeDelimited = function decodeDelimited(reader) { + Annotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BucketOptions message. + * Verifies an Annotation message. * @function verify - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BucketOptions.verify = function verify(message) { + Annotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); - if (error) - return "linearBuckets." + error; - } - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); - if (error) - return "exponentialBuckets." + error; - } - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); - if (error) - return "explicitBuckets." + error; - } + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; return null; }; /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation */ - BucketOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions) + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; - var message = new $root.google.api.Distribution.BucketOptions(); - if (object.linearBuckets != null) { - if (typeof object.linearBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); - } - if (object.exponentialBuckets != null) { - if (typeof object.exponentialBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); - } - if (object.explicitBuckets != null) { - if (typeof object.explicitBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; return message; }; /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BucketOptions.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); - if (options.oneofs) - object.options = "linearBuckets"; - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); - if (options.oneofs) - object.options = "exponentialBuckets"; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); - if (options.oneofs) - object.options = "explicitBuckets"; + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; return object; }; /** - * Converts this BucketOptions to JSON. + * Converts this Annotation to JSON. * @function toJSON - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance * @returns {Object.} JSON object */ - BucketOptions.prototype.toJSON = function toJSON() { + Annotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BucketOptions.Linear = (function() { + return Annotation; + })(); - /** - * Properties of a Linear. - * @memberof google.api.Distribution.BucketOptions - * @interface ILinear - * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets - * @property {number|null} [width] Linear width - * @property {number|null} [offset] Linear offset - */ + return GeneratedCodeInfo; + })(); - /** - * Constructs a new Linear. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents a Linear. - * @implements ILinear - * @constructor - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - */ - function Linear(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.Duration = (function() { - /** - * Linear numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.numFiniteBuckets = 0; + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ - /** - * Linear width. - * @member {number} width - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.width = 0; + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Linear offset. - * @member {number} offset - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.offset = 0; + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a new Linear instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance - */ - Linear.create = function create(properties) { - return new Linear(properties); - }; + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.width != null && message.hasOwnProperty("width")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); - if (message.offset != null && message.hasOwnProperty("offset")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); - return writer; - }; + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; - /** - * Decodes a Linear message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.width = reader.double(); - break; - case 3: - message.offset = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a Linear message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Linear.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (typeof message.width !== "number") - return "width: number expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset !== "number") - return "offset: number expected"; - return null; - }; + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - */ - Linear.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Linear(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.width != null) - message.width = Number(object.width); - if (object.offset != null) - message.offset = Number(object.offset); - return message; - }; + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.Linear} message Linear - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Linear.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.width = 0; - object.offset = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.width != null && message.hasOwnProperty("width")) - object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; - return object; - }; + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; - /** - * Converts this Linear to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - * @returns {Object.} JSON object - */ - Linear.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; - return Linear; - })(); + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - BucketOptions.Exponential = (function() { + return Duration; + })(); - /** - * Properties of an Exponential. - * @memberof google.api.Distribution.BucketOptions - * @interface IExponential - * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets - * @property {number|null} [growthFactor] Exponential growthFactor - * @property {number|null} [scale] Exponential scale - */ + protobuf.Empty = (function() { - /** - * Constructs a new Exponential. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Exponential. - * @implements IExponential - * @constructor - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - */ - function Exponential(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ - /** - * Exponential numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.numFiniteBuckets = 0; + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Exponential growthFactor. - * @member {number} growthFactor - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.growthFactor = 0; + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; - /** - * Exponential scale. - * @member {number} scale - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.scale = 0; + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Creates a new Exponential instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance - */ - Exponential.create = function create(properties) { - return new Exponential(properties); - }; + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); - if (message.scale != null && message.hasOwnProperty("scale")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); - return writer; - }; + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an Exponential message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.growthFactor = reader.double(); - break; - case 3: - message.scale = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; - /** - * Verifies an Exponential message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exponential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - if (typeof message.growthFactor !== "number") - return "growthFactor: number expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (typeof message.scale !== "number") - return "scale: number expected"; - return null; - }; + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - */ - Exponential.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Exponential(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.growthFactor != null) - message.growthFactor = Number(object.growthFactor); - if (object.scale != null) - message.scale = Number(object.scale); - return message; - }; + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exponential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.growthFactor = 0; - object.scale = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; - return object; - }; + protobuf.FieldMask = (function() { - /** - * Converts this Exponential to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - * @returns {Object.} JSON object - */ - Exponential.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ - return Exponential; - })(); + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - BucketOptions.Explicit = (function() { + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; - /** - * Properties of an Explicit. - * @memberof google.api.Distribution.BucketOptions - * @interface IExplicit - * @property {Array.|null} [bounds] Explicit bounds - */ + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; - /** - * Constructs a new Explicit. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Explicit. - * @implements IExplicit - * @constructor - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - */ - function Explicit(properties) { - this.bounds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * Explicit bounds. - * @member {Array.} bounds - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - */ - Explicit.prototype.bounds = $util.emptyArray; + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new Explicit instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance - */ - Explicit.create = function create(properties) { - return new Explicit(properties); - }; + return FieldMask; + })(); - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bounds != null && message.bounds.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.bounds.length; ++i) - writer.double(message.bounds[i]); - writer.ldelim(); - } - return writer; - }; + protobuf.Timestamp = (function() { - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ - /** - * Decodes an Explicit message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.bounds && message.bounds.length)) - message.bounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bounds.push(reader.double()); - } else - message.bounds.push(reader.double()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Verifies an Explicit message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Explicit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bounds != null && message.hasOwnProperty("bounds")) { - if (!Array.isArray(message.bounds)) - return "bounds: array expected"; - for (var i = 0; i < message.bounds.length; ++i) - if (typeof message.bounds[i] !== "number") - return "bounds: number[] expected"; - } - return null; - }; + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - */ - Explicit.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Explicit(); - if (object.bounds) { - if (!Array.isArray(object.bounds)) - throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); - message.bounds = []; - for (var i = 0; i < object.bounds.length; ++i) - message.bounds[i] = Number(object.bounds[i]); - } - return message; - }; + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Explicit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bounds = []; - if (message.bounds && message.bounds.length) { - object.bounds = []; - for (var j = 0; j < message.bounds.length; ++j) - object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; - } - return object; - }; + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; - /** - * Converts this Explicit to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - * @returns {Object.} JSON object - */ - Explicit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return Explicit; - })(); + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return BucketOptions; - })(); + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Distribution.Exemplar = (function() { + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; - /** - * Properties of an Exemplar. - * @memberof google.api.Distribution - * @interface IExemplar - * @property {number|null} [value] Exemplar value - * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp - * @property {Array.|null} [attachments] Exemplar attachments - */ + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; - /** - * Constructs a new Exemplar. - * @memberof google.api.Distribution - * @classdesc Represents an Exemplar. - * @implements IExemplar - * @constructor - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - */ - function Exemplar(properties) { - this.attachments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; - /** - * Exemplar value. - * @member {number} value - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.value = 0; + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Exemplar timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.timestamp = null; + return Timestamp; + })(); - /** - * Exemplar attachments. - * @member {Array.} attachments - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.attachments = $util.emptyArray; + protobuf.Struct = (function() { - /** - * Creates a new Exemplar instance using the specified properties. - * @function create - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - * @returns {google.api.Distribution.Exemplar} Exemplar instance - */ - Exemplar.create = function create(properties) { - return new Exemplar(properties); - }; + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ - /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.attachments != null && message.attachments.length) - for (var i = 0; i < message.attachments.length; ++i) - $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.double(); - break; - case 2: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.attachments && message.attachments.length)) - message.attachments = []; - message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } - return message; - }; + return writer; + }; - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an Exemplar message. - * @function verify - * @memberof google.api.Distribution.Exemplar - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exemplar.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.attachments != null && message.hasOwnProperty("attachments")) { - if (!Array.isArray(message.attachments)) - return "attachments: array expected"; - for (var i = 0; i < message.attachments.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.attachments[i]); - if (error) - return "attachments." + error; - } + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.Exemplar - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.Exemplar} Exemplar - */ - Exemplar.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Exemplar) - return object; - var message = new $root.google.api.Distribution.Exemplar(); - if (object.value != null) - message.value = Number(object.value); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.attachments) { - if (!Array.isArray(object.attachments)) - throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); - message.attachments = []; - for (var i = 0; i < object.attachments.length; ++i) { - if (typeof object.attachments[i] !== "object") - throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); - message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); - } - } - return message; - }; + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.Exemplar} message Exemplar - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exemplar.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attachments = []; - if (options.defaults) { - object.value = 0; - object.timestamp = null; + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.attachments && message.attachments.length) { - object.attachments = []; - for (var j = 0; j < message.attachments.length; ++j) - object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); } - return object; - }; + } + return message; + }; - /** - * Converts this Exemplar to JSON. - * @function toJSON - * @memberof google.api.Distribution.Exemplar - * @instance - * @returns {Object.} JSON object - */ - Exemplar.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; - return Exemplar; - })(); + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Distribution; + return Struct; })(); - api.MetricDescriptor = (function() { + protobuf.Value = (function() { /** - * Properties of a MetricDescriptor. - * @memberof google.api - * @interface IMetricDescriptor - * @property {string|null} [name] MetricDescriptor name - * @property {string|null} [type] MetricDescriptor type - * @property {Array.|null} [labels] MetricDescriptor labels - * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind - * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType - * @property {string|null} [unit] MetricDescriptor unit - * @property {string|null} [description] MetricDescriptor description - * @property {string|null} [displayName] MetricDescriptor displayName - * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new MetricDescriptor. - * @memberof google.api - * @classdesc Represents a MetricDescriptor. - * @implements IMetricDescriptor + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function MetricDescriptor(properties) { - this.labels = []; + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24505,195 +26306,154 @@ } /** - * MetricDescriptor name. - * @member {string} name - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.name = ""; - - /** - * MetricDescriptor type. - * @member {string} type - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.type = ""; - - /** - * MetricDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MetricDescriptor + * Value nullValue. + * @member {google.protobuf.NullValue} nullValue + * @memberof google.protobuf.Value * @instance */ - MetricDescriptor.prototype.labels = $util.emptyArray; + Value.prototype.nullValue = 0; /** - * MetricDescriptor metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.api.MetricDescriptor + * Value numberValue. + * @member {number} numberValue + * @memberof google.protobuf.Value * @instance */ - MetricDescriptor.prototype.metricKind = 0; + Value.prototype.numberValue = 0; /** - * MetricDescriptor valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.api.MetricDescriptor + * Value stringValue. + * @member {string} stringValue + * @memberof google.protobuf.Value * @instance */ - MetricDescriptor.prototype.valueType = 0; + Value.prototype.stringValue = ""; /** - * MetricDescriptor unit. - * @member {string} unit - * @memberof google.api.MetricDescriptor + * Value boolValue. + * @member {boolean} boolValue + * @memberof google.protobuf.Value * @instance */ - MetricDescriptor.prototype.unit = ""; + Value.prototype.boolValue = false; /** - * MetricDescriptor description. - * @member {string} description - * @memberof google.api.MetricDescriptor + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value * @instance */ - MetricDescriptor.prototype.description = ""; + Value.prototype.structValue = null; /** - * MetricDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MetricDescriptor + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value * @instance */ - MetricDescriptor.prototype.displayName = ""; + Value.prototype.listValue = null; - /** - * MetricDescriptor metadata. - * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.metadata = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * MetricDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value * @instance */ - MetricDescriptor.prototype.launchStage = 0; + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new MetricDescriptor instance using the specified properties. + * Creates a new Value instance using the specified properties. * @function create - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @static - * @param {google.api.IMetricDescriptor=} [properties] Properties to set - * @returns {google.api.MetricDescriptor} MetricDescriptor instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - MetricDescriptor.create = function create(properties) { - return new MetricDescriptor(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && message.hasOwnProperty("valueType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); - if (message.unit != null && message.hasOwnProperty("unit")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.metadata != null && message.hasOwnProperty("metadata")) - $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + if (message.nullValue != null && message.hasOwnProperty("nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && message.hasOwnProperty("structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && message.hasOwnProperty("listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetricDescriptor message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decode = function decode(reader, length) { + Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 8: - message.type = reader.string(); + message.nullValue = reader.int32(); break; case 2: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + message.numberValue = reader.double(); break; case 3: - message.metricKind = reader.int32(); + message.stringValue = reader.string(); break; case 4: - message.valueType = reader.int32(); + message.boolValue = reader.bool(); break; case 5: - message.unit = reader.string(); + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; case 6: - message.description = reader.string(); - break; - case 7: - message.displayName = reader.string(); - break; - case 10: - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); - break; - case 12: - message.launchStage = reader.int32(); + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -24704,616 +26464,422 @@ }; /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetricDescriptor message. + * Verifies a Value message. * @function verify - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricDescriptor.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - switch (message.metricKind) { + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { default: - return "metricKind: enum value expected"; + return "nullValue: enum value expected"; case 0: - case 1: - case 2: - case 3: break; } - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; } - if (message.unit != null && message.hasOwnProperty("unit")) - if (!$util.isString(message.unit)) - return "unit: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); - if (error) - return "metadata." + error; } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; } + } return null; }; /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.protobuf.Value} Value */ - MetricDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - var message = new $root.google.api.MetricDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MetricDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MetricDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } - } - switch (object.metricKind) { - case "METRIC_KIND_UNSPECIFIED": - case 0: - message.metricKind = 0; - break; - case "GAUGE": - case 1: - message.metricKind = 1; - break; - case "DELTA": - case 2: - message.metricKind = 2; - break; - case "CUMULATIVE": - case 3: - message.metricKind = 3; - break; - } - switch (object.valueType) { - case "VALUE_TYPE_UNSPECIFIED": + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - case "DOUBLE": - case 3: - message.valueType = 3; - break; - case "STRING": - case 4: - message.valueType = 4; - break; - case "DISTRIBUTION": - case 5: - message.valueType = 5; - break; - case "MONEY": - case 6: - message.valueType = 6; + message.nullValue = 0; break; } - if (object.unit != null) - message.unit = String(object.unit); - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); } return message; }; /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @static - * @param {google.api.MetricDescriptor} message MetricDescriptor + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetricDescriptor.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.labels = []; - if (options.defaults) { - object.name = ""; - object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.unit = ""; - object.description = ""; - object.displayName = ""; - object.type = ""; - object.metadata = null; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = message.unit; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this MetricDescriptor to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.api.MetricDescriptor + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - MetricDescriptor.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - MetricDescriptor.MetricDescriptorMetadata = (function() { - - /** - * Properties of a MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @interface IMetricDescriptorMetadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage - * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod - * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay - */ - - /** - * Constructs a new MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @classdesc Represents a MetricDescriptorMetadata. - * @implements IMetricDescriptorMetadata - * @constructor - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - */ - function MetricDescriptorMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricDescriptorMetadata launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.launchStage = 0; - - /** - * MetricDescriptorMetadata samplePeriod. - * @member {google.protobuf.IDuration|null|undefined} samplePeriod - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.samplePeriod = null; + return Value; + })(); - /** - * MetricDescriptorMetadata ingestDelay. - * @member {google.protobuf.IDuration|null|undefined} ingestDelay - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.ingestDelay = null; + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {string} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @function create - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance - */ - MetricDescriptorMetadata.create = function create(properties) { - return new MetricDescriptorMetadata(properties); - }; + protobuf.ListValue = (function() { - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) - $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) - $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.launchStage = reader.int32(); - break; - case 2: - message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; - /** - * Verifies a MetricDescriptorMetadata message. - * @function verify - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricDescriptorMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { - var error = $root.google.protobuf.Duration.verify(message.samplePeriod); - if (error) - return "samplePeriod." + error; - } - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { - var error = $root.google.protobuf.Duration.verify(message.ingestDelay); - if (error) - return "ingestDelay." + error; - } - return null; - }; + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - */ - MetricDescriptorMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) - return object; - var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "EARLY_ACCESS": + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; - case "DEPRECATED": - case 5: - message.launchStage = 5; + default: + reader.skipType(tag & 7); break; } - if (object.samplePeriod != null) { - if (typeof object.samplePeriod !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); - message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); - } - if (object.ingestDelay != null) { - if (typeof object.ingestDelay !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); - message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricDescriptorMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.samplePeriod = null; - object.ingestDelay = null; - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) - object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) - object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); - return object; - }; + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this MetricDescriptorMetadata to JSON. - * @function toJSON - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - * @returns {Object.} JSON object - */ - MetricDescriptorMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; - return MetricDescriptorMetadata; - })(); + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; /** - * MetricKind enum. - * @name google.api.MetricDescriptor.MetricKind - * @enum {string} - * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value - * @property {number} GAUGE=1 GAUGE value - * @property {number} DELTA=2 DELTA value - * @property {number} CUMULATIVE=3 CUMULATIVE value + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - MetricDescriptor.MetricKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "GAUGE"] = 1; - values[valuesById[2] = "DELTA"] = 2; - values[valuesById[3] = "CUMULATIVE"] = 3; - return values; - })(); + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; /** - * ValueType enum. - * @name google.api.MetricDescriptor.ValueType - * @enum {string} - * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - * @property {number} DOUBLE=3 DOUBLE value - * @property {number} STRING=4 STRING value - * @property {number} DISTRIBUTION=5 DISTRIBUTION value - * @property {number} MONEY=6 MONEY value + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object */ - MetricDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - values[valuesById[3] = "DOUBLE"] = 3; - values[valuesById[4] = "STRING"] = 4; - values[valuesById[5] = "DISTRIBUTION"] = 5; - values[valuesById[6] = "MONEY"] = 6; - return values; - })(); + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MetricDescriptor; + return ListValue; })(); - api.Metric = (function() { + protobuf.Any = (function() { /** - * Properties of a Metric. - * @memberof google.api - * @interface IMetric - * @property {string|null} [type] Metric type - * @property {Object.|null} [labels] Metric labels + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Metric. - * @memberof google.api - * @classdesc Represents a Metric. - * @implements IMetric + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.api.IMetric=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Metric(properties) { - this.labels = {}; + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25321,94 +26887,88 @@ } /** - * Metric type. - * @member {string} type - * @memberof google.api.Metric + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Metric.prototype.type = ""; + Any.prototype.type_url = ""; /** - * Metric labels. - * @member {Object.} labels - * @memberof google.api.Metric + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - Metric.prototype.labels = $util.emptyObject; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new Metric instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @static - * @param {google.api.IMetric=} [properties] Properties to set - * @returns {google.api.Metric} Metric instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Metric.create = function create(properties) { - return new Metric(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @static - * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @static - * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Metric} Metric + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.type = reader.string(); + case 1: + message.type_url = reader.string(); break; case 2: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -25419,113 +26979,108 @@ }; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Metric} Metric + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metric message. + * Verifies an Any message. * @function verify - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metric.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.api.Metric} Metric + * @returns {google.protobuf.Any} Any */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Metric) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.api.Metric(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.Metric.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; return message; }; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @static - * @param {google.api.Metric} message Metric + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Metric.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Metric to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.api.Metric + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Metric.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Metric; + return Any; })(); - return api; + return protobuf; })(); google.rpc = (function() { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 26f27ffc3c4..8d9896080f2 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -2,2394 +2,2691 @@ "nested": { "google": { "nested": { - "protobuf": { - "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, + "logging": { "nested": { - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, + "v2": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Logging.V2", + "go_package": "google.golang.org/genproto/googleapis/logging/v2;logging", + "java_multiple_files": true, + "java_outer_classname": "LoggingMetricsProto", + "java_package": "com.google.logging.v2", + "php_namespace": "Google\\Cloud\\Logging\\V2" + }, + "nested": { + "ConfigServiceV2": { "options": { - "packed": false + "(google.api.default_host)": "logging.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" + }, + "methods": { + "ListSinks": { + "requestType": "ListSinksRequest", + "responseType": "ListSinksResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/sinks", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.method_signature)": "parent" + } + }, + "GetSink": { + "requestType": "GetSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name" + } + }, + "CreateSink": { + "requestType": "CreateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).post": "/v2/{parent=*/*}/sinks", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.method_signature)": "parent,sink" + } + }, + "UpdateSink": { + "requestType": "UpdateSinkRequest", + "responseType": "LogSink", + "options": { + "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name,sink" + } + }, + "DeleteSink": { + "requestType": "DeleteSinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name" + } + }, + "ListExclusions": { + "requestType": "ListExclusionsRequest", + "responseType": "ListExclusionsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/exclusions", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.method_signature)": "parent" + } + }, + "GetExclusion": { + "requestType": "GetExclusionRequest", + "responseType": "LogExclusion", + "options": { + "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.method_signature)": "name" + } + }, + "CreateExclusion": { + "requestType": "CreateExclusionRequest", + "responseType": "LogExclusion", + "options": { + "(google.api.http).post": "/v2/{parent=*/*}/exclusions", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.http).additional_bindings.body": "exclusion", + "(google.api.method_signature)": "parent,exclusion" + } + }, + "UpdateExclusion": { + "requestType": "UpdateExclusionRequest", + "responseType": "LogExclusion", + "options": { + "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.http).additional_bindings.body": "exclusion", + "(google.api.method_signature)": "name,exclusion,update_mask" + } + }, + "DeleteExclusion": { + "requestType": "DeleteExclusionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.method_signature)": "name" + } + }, + "GetCmekSettings": { + "requestType": "GetCmekSettingsRequest", + "responseType": "CmekSettings", + "options": { + "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" + } + }, + "UpdateCmekSettings": { + "requestType": "UpdateCmekSettingsRequest", + "responseType": "CmekSettings", + "options": { + "(google.api.http).patch": "/v2/{name=*/*}/cmekSettings", + "(google.api.http).body": "cmek_settings", + "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*}/cmekSettings", + "(google.api.http).additional_bindings.body": "cmek_settings" + } + } } }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, + "LogSink": { "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 + "(google.api.resource).type": "logging.googleapis.com/Sink", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/sinks/{sink}" + }, + "oneofs": { + "options": { + "oneof": [ + "bigqueryOptions" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "destination": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "*" + } + }, + "filter": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 18 + }, + "disabled": { + "type": "bool", + "id": 19 + }, + "outputVersionFormat": { + "type": "VersionFormat", + "id": 6, + "options": { + "deprecated": true + } + }, + "writerIdentity": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "includeChildren": { + "type": "bool", + "id": 9 + }, + "bigqueryOptions": { + "type": "BigQueryOptions", + "id": 12 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "deprecated": true + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "deprecated": true + } + } + }, + "nested": { + "VersionFormat": { + "values": { + "VERSION_FORMAT_UNSPECIFIED": 0, + "V2": 1, + "V1": 2 + } + } + } }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { + "BigQueryOptions": { "fields": { - "start": { - "type": "int32", + "usePartitionedTables": { + "type": "bool", "id": 1 }, - "end": { - "type": "int32", + "usesTimestampColumnPartitioning": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListSinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Sink" + } + }, + "pageToken": { + "type": "string", "id": 2 }, - "options": { - "type": "ExtensionRangeOptions", + "pageSize": { + "type": "int32", "id": 3 } } }, - "ReservedRange": { + "ListSinksResponse": { "fields": { - "start": { - "type": "int32", + "sinks": { + "rule": "repeated", + "type": "LogSink", "id": 1 }, - "end": { - "type": "int32", + "nextPageToken": { + "type": "string", "id": 2 } } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 }, - "options": { - "type": "FieldOptions", - "id": 8 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 + "GetSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Sink" + } + } } }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3 + "CreateSinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Sink" + } + }, + "sink": { + "type": "LogSink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3 + } } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 + "UpdateSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Sink" + } + }, + "sink": { + "type": "LogSink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4 + } + } }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { + "DeleteSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Sink" + } + } + } + }, + "LogExclusion": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/Exclusion", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/exclusions/{exclusion}" + }, "fields": { - "start": { - "type": "int32", + "name": { + "type": "string", "id": 1 }, - "end": { - "type": "int32", + "description": { + "type": "string", "id": 2 + }, + "filter": { + "type": "string", + "id": 3 + }, + "disabled": { + "type": "bool", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 } } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 + "ListExclusionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Exclusion" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } + } }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 + "ListExclusionsResponse": { + "fields": { + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } }, - "inputType": { - "type": "string", - "id": 2 + "GetExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Exclusion" + } + } + } }, - "outputType": { - "type": "string", - "id": 3 + "CreateExclusionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Exclusion" + } + }, + "exclusion": { + "type": "LogExclusion", + "id": 2 + } + } }, - "options": { - "type": "MethodOptions", - "id": 4 + "UpdateExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Exclusion" + } + }, + "exclusion": { + "type": "LogExclusion", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false + "DeleteExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Exclusion" + } + } } }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false + "GetCmekSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 }, - "javaOuterClassname": { - "type": "string", - "id": 8 + "UpdateCmekSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "cmekSettings": { + "type": "CmekSettings", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false + "CmekSettings": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "kmsKeyName": { + "type": "string", + "id": 2 + }, + "serviceAccountId": { + "type": "string", + "id": 3 + } } }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, + "LoggingServiceV2": { "options": { - "deprecated": true + "(google.api.default_host)": "logging.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + }, + "methods": { + "DeleteLog": { + "requestType": "DeleteLogRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}", + "(google.api.method_signature)": "log_name" + } + }, + "WriteLogEntries": { + "requestType": "WriteLogEntriesRequest", + "responseType": "WriteLogEntriesResponse", + "options": { + "(google.api.http).post": "/v2/entries:write", + "(google.api.http).body": "*", + "(google.api.method_signature)": "log_name,resource,labels,entries" + } + }, + "ListLogEntries": { + "requestType": "ListLogEntriesRequest", + "responseType": "ListLogEntriesResponse", + "options": { + "(google.api.http).post": "/v2/entries:list", + "(google.api.http).body": "*" + } + }, + "ListMonitoredResourceDescriptors": { + "requestType": "ListMonitoredResourceDescriptorsRequest", + "responseType": "ListMonitoredResourceDescriptorsResponse", + "options": { + "(google.api.http).get": "/v2/monitoredResourceDescriptors" + } + }, + "ListLogs": { + "requestType": "ListLogsRequest", + "responseType": "ListLogsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/logs", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", + "(google.api.method_signature)": "parent" + } + } } }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false + "DeleteLogRequest": { + "fields": { + "logName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" + } + } } }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" + "WriteLogEntriesRequest": { + "fields": { + "logName": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "logging.googleapis.com/Log" + } + }, + "resource": { + "type": "google.api.MonitoredResource", + "id": 2 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "partialSuccess": { + "type": "bool", + "id": 5 + }, + "dryRun": { + "type": "bool", + "id": 6 + } } }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } + "WriteLogEntriesResponse": { + "fields": {} }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false + "WriteLogEntriesPartialErrors": { + "fields": { + "logEntryErrors": { + "keyType": "int32", + "type": "google.rpc.Status", + "id": 1 + } } }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false + "ListLogEntriesRequest": { + "fields": { + "projectIds": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "orderBy": { + "type": "string", + "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 5 + } } }, - "phpGenericServices": { - "type": "bool", - "id": 42, - "options": { - "default": false + "ListLogEntriesResponse": { + "fields": { + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } } }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false + "ListMonitoredResourceDescriptorsRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + } } }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": false + "ListMonitoredResourceDescriptorsResponse": { + "fields": { + "resourceDescriptors": { + "rule": "repeated", + "type": "google.api.MonitoredResourceDescriptor", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } } }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false + "ListLogsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } } }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false + "ListLogsResponse": { + "fields": { + "logNames": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } } }, - "deprecated": { - "type": "bool", - "id": 3, + "LogEntry": { "options": { - "default": false + "(google.api.resource).type": "logging.googleapis.com/Log", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/logs/{log}", + "(google.api.resource).name_field": "log_name" + }, + "oneofs": { + "payload": { + "oneof": [ + "protoPayload", + "textPayload", + "jsonPayload" + ] + } + }, + "fields": { + "logName": { + "type": "string", + "id": 12 + }, + "resource": { + "type": "google.api.MonitoredResource", + "id": 8 + }, + "protoPayload": { + "type": "google.protobuf.Any", + "id": 2 + }, + "textPayload": { + "type": "string", + "id": 3 + }, + "jsonPayload": { + "type": "google.protobuf.Struct", + "id": 6 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "receiveTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 24 + }, + "severity": { + "type": "google.logging.type.LogSeverity", + "id": 10 + }, + "insertId": { + "type": "string", + "id": 4 + }, + "httpRequest": { + "type": "google.logging.type.HttpRequest", + "id": 7 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 11 + }, + "metadata": { + "type": "google.api.MonitoredResourceMetadata", + "id": 25, + "options": { + "deprecated": true + } + }, + "operation": { + "type": "LogEntryOperation", + "id": 15 + }, + "trace": { + "type": "string", + "id": 22 + }, + "spanId": { + "type": "string", + "id": 27 + }, + "traceSampled": { + "type": "bool", + "id": 30 + }, + "sourceLocation": { + "type": "LogEntrySourceLocation", + "id": 23 + } } }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" + "LogEntryOperation": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "producer": { + "type": "string", + "id": 2 + }, + "first": { + "type": "bool", + "id": 3 + }, + "last": { + "type": "bool", + "id": 4 + } } }, - "packed": { - "type": "bool", - "id": 2 + "LogEntrySourceLocation": { + "fields": { + "file": { + "type": "string", + "id": 1 + }, + "line": { + "type": "int64", + "id": 2 + }, + "function": { + "type": "string", + "id": 3 + } + } }, - "jstype": { - "type": "JSType", - "id": 6, + "MetricsServiceV2": { "options": { - "default": "JS_NORMAL" + "(google.api.default_host)": "logging.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + }, + "methods": { + "ListLogMetrics": { + "requestType": "ListLogMetricsRequest", + "responseType": "ListLogMetricsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*}/metrics", + "(google.api.method_signature)": "parent" + } + }, + "GetLogMetric": { + "requestType": "GetLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).get": "/v2/{metric_name=projects/*/metrics/*}", + "(google.api.method_signature)": "metric_name" + } + }, + "CreateLogMetric": { + "requestType": "CreateLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/metrics", + "(google.api.http).body": "metric", + "(google.api.method_signature)": "parent,metric" + } + }, + "UpdateLogMetric": { + "requestType": "UpdateLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).put": "/v2/{metric_name=projects/*/metrics/*}", + "(google.api.http).body": "metric", + "(google.api.method_signature)": "metric_name,metric" + } + }, + "DeleteLogMetric": { + "requestType": "DeleteLogMetricRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{metric_name=projects/*/metrics/*}", + "(google.api.method_signature)": "metric_name" + } + } } }, - "lazy": { - "type": "bool", - "id": 5, + "LogMetric": { "options": { - "default": false + "(google.api.resource).type": "logging.googleapis.com/Metric", + "(google.api.resource).pattern": "projects/{project}/metrics/{metric}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "filter": { + "type": "string", + "id": 3 + }, + "metricDescriptor": { + "type": "google.api.MetricDescriptor", + "id": 5 + }, + "valueExtractor": { + "type": "string", + "id": 6 + }, + "labelExtractors": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "bucketOptions": { + "type": "google.api.Distribution.BucketOptions", + "id": 8 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "version": { + "type": "ApiVersion", + "id": 4, + "options": { + "deprecated": true + } + } + }, + "nested": { + "ApiVersion": { + "values": { + "V2": 0, + "V1": 1 + } + } } }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false + "ListLogMetricsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } } }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false + "ListLogMetricsResponse": { + "fields": { + "metrics": { + "rule": "repeated", + "type": "LogMetric", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } } }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 + "GetLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Metric" + } + } } }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 + "CreateLogMetricRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Metric" + } + }, + "metric": { + "type": "LogMetric", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } } - } - } - }, - "OneofOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false + "UpdateLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Metric" + } + }, + "metric": { + "type": "LogMetric", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } } }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false + "DeleteLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Metric" + } + } } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] + } }, - "ServiceOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } + "type": { + "options": { + "csharp_namespace": "Google.Cloud.Logging.Type", + "go_package": "google.golang.org/genproto/googleapis/logging/type;ltype", + "java_multiple_files": true, + "java_outer_classname": "LogSeverityProto", + "java_package": "com.google.logging.type", + "php_namespace": "Google\\Cloud\\Logging\\Type" }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" + "nested": { + "HttpRequest": { + "fields": { + "requestMethod": { + "type": "string", + "id": 1 + }, + "requestUrl": { + "type": "string", + "id": 2 + }, + "requestSize": { + "type": "int64", + "id": 3 + }, + "status": { + "type": "int32", + "id": 4 + }, + "responseSize": { + "type": "int64", + "id": 5 + }, + "userAgent": { + "type": "string", + "id": 6 + }, + "remoteIp": { + "type": "string", + "id": 7 + }, + "serverIp": { + "type": "string", + "id": 13 + }, + "referer": { + "type": "string", + "id": 8 + }, + "latency": { + "type": "google.protobuf.Duration", + "id": 14 + }, + "cacheLookup": { + "type": "bool", + "id": 11 + }, + "cacheHit": { + "type": "bool", + "id": 9 + }, + "cacheValidatedWithOriginServer": { + "type": "bool", + "id": 10 + }, + "cacheFillBytes": { + "type": "int64", + "id": 12 + }, + "protocol": { + "type": "string", + "id": 15 + } } }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { + "LogSeverity": { "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 + "DEFAULT": 0, + "DEBUG": 100, + "INFO": 200, + "NOTICE": 300, + "WARNING": 400, + "ERROR": 500, + "CRITICAL": 600, + "ALERT": 700, + "EMERGENCY": 800 } } } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", + "java_multiple_files": true, + "java_outer_classname": "MetricProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } }, - "UninterpretedOption": { + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { "fields": { - "name": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { "rule": "repeated", - "type": "NamePart", + "type": "string", "id": 2 }, - "identifierValue": { + "nameField": { "type": "string", "id": 3 }, - "positiveIntValue": { - "type": "uint64", + "history": { + "type": "History", "id": 4 }, - "negativeIntValue": { - "type": "int64", + "plural": { + "type": "string", "id": 5 }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { + "singular": { "type": "string", - "id": 8 + "id": 6 } }, "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 } } } }, - "SourceCodeInfo": { + "ResourceReference": { "fields": { - "location": { - "rule": "repeated", - "type": "Location", + "type": { + "type": "string", "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } + }, + "childType": { + "type": "string", + "id": 2 } } }, - "GeneratedCodeInfo": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { "fields": { - "annotation": { + "rules": { "rule": "repeated", - "type": "Annotation", + "type": "HttpRule", "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] } }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - } - } + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 } } }, - "Struct": { + "CustomHttpPattern": { "fields": { - "fields": { - "keyType": "string", - "type": "Value", + "kind": { + "type": "string", "id": 1 + }, + "path": { + "type": "string", + "id": 2 } } }, - "Value": { - "oneofs": { - "kind": { - "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, + "MonitoredResourceDescriptor": { "fields": { - "nullValue": { - "type": "NullValue", + "name": { + "type": "string", + "id": 5 + }, + "type": { + "type": "string", "id": 1 }, - "numberValue": { - "type": "double", + "displayName": { + "type": "string", "id": 2 }, - "stringValue": { + "description": { "type": "string", "id": 3 }, - "boolValue": { - "type": "bool", + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", "id": 4 }, - "structValue": { - "type": "Struct", - "id": 5 - }, - "listValue": { - "type": "ListValue", - "id": 6 - } - } - }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { - "fields": { - "values": { - "rule": "repeated", - "type": "Value", - "id": 1 + "launchStage": { + "type": "LaunchStage", + "id": 7 } } }, - "Any": { + "MonitoredResource": { "fields": { - "type_url": { + "type": { "type": "string", "id": 1 }, - "value": { - "type": "bytes", + "labels": { + "keyType": "string", + "type": "string", "id": 2 } - } - } - } - }, - "logging": { - "nested": { - "v2": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Logging.V2", - "go_package": "google.golang.org/genproto/googleapis/logging/v2;logging", - "java_multiple_files": true, - "java_outer_classname": "LoggingMetricsProto", - "java_package": "com.google.logging.v2", - "php_namespace": "Google\\Cloud\\Logging\\V2" - }, - "nested": { - "ConfigServiceV2": { - "options": { - "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" - }, - "methods": { - "ListSinks": { - "requestType": "ListSinksRequest", - "responseType": "ListSinksResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/sinks", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks" - } - }, - "GetSink": { - "requestType": "GetSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "CreateSink": { - "requestType": "CreateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).post": "/v2/{parent=*/*}/sinks", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", - "(google.api.http).additional_bindings.body": "sink" - } - }, - "UpdateSink": { - "requestType": "UpdateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.http).additional_bindings.body": "sink", - "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "DeleteSink": { - "requestType": "DeleteSinkRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - }, - "ListExclusions": { - "requestType": "ListExclusionsRequest", - "responseType": "ListExclusionsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/exclusions", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions" - } - }, - "GetExclusion": { - "requestType": "GetExclusionRequest", - "responseType": "LogExclusion", - "options": { - "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}" - } - }, - "CreateExclusion": { - "requestType": "CreateExclusionRequest", - "responseType": "LogExclusion", - "options": { - "(google.api.http).post": "/v2/{parent=*/*}/exclusions", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", - "(google.api.http).additional_bindings.body": "exclusion" - } - }, - "UpdateExclusion": { - "requestType": "UpdateExclusionRequest", - "responseType": "LogExclusion", - "options": { - "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.http).additional_bindings.body": "exclusion" - } - }, - "DeleteExclusion": { - "requestType": "DeleteExclusionRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}" - } - } - } - }, - "LogSink": { - "oneofs": { - "options": { - "oneof": [ - "bigqueryOptions" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "destination": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 5 - }, - "outputVersionFormat": { - "type": "VersionFormat", - "id": 6, - "options": { - "deprecated": true - } - }, - "writerIdentity": { - "type": "string", - "id": 8 - }, - "includeChildren": { - "type": "bool", - "id": 9 - }, - "bigqueryOptions": { - "type": "BigQueryOptions", - "id": 12 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 13 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 14 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "deprecated": true - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "deprecated": true - } - } - }, - "nested": { - "VersionFormat": { - "values": { - "VERSION_FORMAT_UNSPECIFIED": 0, - "V2": 1, - "V1": 2 - } - } - } + } + }, + "MonitoredResourceMetadata": { + "fields": { + "systemLabels": { + "type": "google.protobuf.Struct", + "id": 1 }, - "BigQueryOptions": { - "fields": { - "usePartitionedTables": { - "type": "bool", - "id": 1 - } - } + "userLabels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 }, - "ListSinksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageToken": { - "type": "string", - "id": 2 - }, - "pageSize": { - "type": "int32", - "id": 3 - } - } + "valueType": { + "type": "ValueType", + "id": 2 }, - "ListSinksResponse": { - "fields": { - "sinks": { - "rule": "repeated", - "type": "LogSink", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { + "values": { + "STRING": 0, + "BOOL": 1, + "INT64": 2 } + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "Distribution": { + "fields": { + "count": { + "type": "int64", + "id": 1 }, - "GetSinkRequest": { - "fields": { - "sinkName": { - "type": "string", - "id": 1 - } - } + "mean": { + "type": "double", + "id": 2 }, - "CreateSinkRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "sink": { - "type": "LogSink", - "id": 2 - }, - "uniqueWriterIdentity": { - "type": "bool", - "id": 3 - } - } + "sumOfSquaredDeviation": { + "type": "double", + "id": 3 }, - "UpdateSinkRequest": { - "fields": { - "sinkName": { - "type": "string", - "id": 1 - }, - "sink": { - "type": "LogSink", - "id": 2 - }, - "uniqueWriterIdentity": { - "type": "bool", - "id": 3 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 4 - } - } + "range": { + "type": "Range", + "id": 4 }, - "DeleteSinkRequest": { - "fields": { - "sinkName": { - "type": "string", - "id": 1 - } - } + "bucketOptions": { + "type": "BucketOptions", + "id": 6 }, - "LogExclusion": { + "bucketCounts": { + "rule": "repeated", + "type": "int64", + "id": 7 + }, + "exemplars": { + "rule": "repeated", + "type": "Exemplar", + "id": 10 + } + }, + "nested": { + "Range": { "fields": { - "name": { - "type": "string", + "min": { + "type": "double", "id": 1 }, - "description": { - "type": "string", + "max": { + "type": "double", "id": 2 - }, - "filter": { - "type": "string", - "id": 3 - }, - "disabled": { - "type": "bool", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 } } }, - "ListExclusionsRequest": { + "BucketOptions": { + "oneofs": { + "options": { + "oneof": [ + "linearBuckets", + "exponentialBuckets", + "explicitBuckets" + ] + } + }, "fields": { - "parent": { - "type": "string", + "linearBuckets": { + "type": "Linear", "id": 1 }, - "pageToken": { - "type": "string", + "exponentialBuckets": { + "type": "Exponential", "id": 2 }, - "pageSize": { - "type": "int32", + "explicitBuckets": { + "type": "Explicit", "id": 3 } - } - }, - "ListExclusionsResponse": { - "fields": { - "exclusions": { - "rule": "repeated", - "type": "LogExclusion", - "id": 1 + }, + "nested": { + "Linear": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "width": { + "type": "double", + "id": 2 + }, + "offset": { + "type": "double", + "id": 3 + } + } }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetExclusionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 + "Exponential": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "growthFactor": { + "type": "double", + "id": 2 + }, + "scale": { + "type": "double", + "id": 3 + } + } + }, + "Explicit": { + "fields": { + "bounds": { + "rule": "repeated", + "type": "double", + "id": 1 + } + } } } }, - "CreateExclusionRequest": { + "Exemplar": { "fields": { - "parent": { - "type": "string", + "value": { + "type": "double", "id": 1 }, - "exclusion": { - "type": "LogExclusion", + "timestamp": { + "type": "google.protobuf.Timestamp", "id": 2 + }, + "attachments": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 } } + } + } + }, + "MetricDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "UpdateExclusionRequest": { + "type": { + "type": "string", + "id": 8 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 2 + }, + "metricKind": { + "type": "MetricKind", + "id": 3 + }, + "valueType": { + "type": "ValueType", + "id": 4 + }, + "unit": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7 + }, + "metadata": { + "type": "MetricDescriptorMetadata", + "id": 10 + }, + "launchStage": { + "type": "LaunchStage", + "id": 12 + } + }, + "nested": { + "MetricDescriptorMetadata": { "fields": { - "name": { - "type": "string", - "id": 1 + "launchStage": { + "type": "LaunchStage", + "id": 1, + "options": { + "deprecated": true + } }, - "exclusion": { - "type": "LogExclusion", + "samplePeriod": { + "type": "google.protobuf.Duration", "id": 2 }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "ingestDelay": { + "type": "google.protobuf.Duration", "id": 3 } } }, - "DeleteExclusionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } + "MetricKind": { + "values": { + "METRIC_KIND_UNSPECIFIED": 0, + "GAUGE": 1, + "DELTA": 2, + "CUMULATIVE": 3 } }, - "LoggingServiceV2": { - "options": { - "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - }, - "methods": { - "DeleteLog": { - "requestType": "DeleteLogRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", - "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}" - } - }, - "WriteLogEntries": { - "requestType": "WriteLogEntriesRequest", - "responseType": "WriteLogEntriesResponse", - "options": { - "(google.api.http).post": "/v2/entries:write", - "(google.api.http).body": "*" - } - }, - "ListLogEntries": { - "requestType": "ListLogEntriesRequest", - "responseType": "ListLogEntriesResponse", - "options": { - "(google.api.http).post": "/v2/entries:list", - "(google.api.http).body": "*" - } - }, - "ListMonitoredResourceDescriptors": { - "requestType": "ListMonitoredResourceDescriptorsRequest", - "responseType": "ListMonitoredResourceDescriptorsResponse", - "options": { - "(google.api.http).get": "/v2/monitoredResourceDescriptors" - } - }, - "ListLogs": { - "requestType": "ListLogsRequest", - "responseType": "ListLogsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/logs", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs" - } - } + "ValueType": { + "values": { + "VALUE_TYPE_UNSPECIFIED": 0, + "BOOL": 1, + "INT64": 2, + "DOUBLE": 3, + "STRING": 4, + "DISTRIBUTION": 5, + "MONEY": 6 } + } + } + }, + "Metric": { + "fields": { + "type": { + "type": "string", + "id": 3 }, - "DeleteLogRequest": { - "fields": { - "logName": { - "type": "string", - "id": 1 - } + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false } }, - "WriteLogEntriesRequest": { - "fields": { - "logName": { - "type": "string", - "id": 1 - }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 2 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "entries": { - "rule": "repeated", - "type": "LogEntry", - "id": 4 - }, - "partialSuccess": { - "type": "bool", - "id": 5 - }, - "dryRun": { - "type": "bool", - "id": 6 - } + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false } }, - "WriteLogEntriesResponse": { - "fields": {} + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 }, - "WriteLogEntriesPartialErrors": { - "fields": { - "logEntryErrors": { - "keyType": "int32", - "type": "google.rpc.Status", - "id": 1 - } - } + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 }, - "ListLogEntriesRequest": { - "fields": { - "projectIds": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "resourceNames": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "filter": { - "type": "string", - "id": 2 - }, - "orderBy": { - "type": "string", - "id": 3 - }, - "pageSize": { - "type": "int32", - "id": 4 - }, - "pageToken": { - "type": "string", - "id": 5 - } - } + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 }, - "ListLogEntriesResponse": { - "fields": { - "entries": { - "rule": "repeated", - "type": "LogEntry", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } + "options": { + "type": "FileOptions", + "id": 8 }, - "ListMonitoredResourceDescriptorsRequest": { - "fields": { - "pageSize": { - "type": "int32", - "id": 1 - }, - "pageToken": { - "type": "string", - "id": 2 - } - } + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 }, - "ListMonitoredResourceDescriptorsResponse": { - "fields": { - "resourceDescriptors": { - "rule": "repeated", - "type": "google.api.MonitoredResourceDescriptor", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "ListLogsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 }, - "ListLogsResponse": { - "fields": { - "logNames": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 }, - "LogEntry": { - "oneofs": { - "payload": { - "oneof": [ - "protoPayload", - "textPayload", - "jsonPayload" - ] - } - }, - "fields": { - "logName": { - "type": "string", - "id": 12 - }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 8 - }, - "protoPayload": { - "type": "google.protobuf.Any", - "id": 2 - }, - "textPayload": { - "type": "string", - "id": 3 - }, - "jsonPayload": { - "type": "google.protobuf.Struct", - "id": 6 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 9 - }, - "receiveTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 24 - }, - "severity": { - "type": "google.logging.type.LogSeverity", - "id": 10 - }, - "insertId": { - "type": "string", - "id": 4 - }, - "httpRequest": { - "type": "google.logging.type.HttpRequest", - "id": 7 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 11 - }, - "metadata": { - "type": "google.api.MonitoredResourceMetadata", - "id": 25, - "options": { - "deprecated": true - } - }, - "operation": { - "type": "LogEntryOperation", - "id": 15 - }, - "trace": { - "type": "string", - "id": 22 - }, - "spanId": { - "type": "string", - "id": 27 - }, - "traceSampled": { - "type": "bool", - "id": 30 - }, - "sourceLocation": { - "type": "LogEntrySourceLocation", - "id": 23 - } - } + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 }, - "LogEntryOperation": { + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { "fields": { - "id": { - "type": "string", + "start": { + "type": "int32", "id": 1 }, - "producer": { - "type": "string", + "end": { + "type": "int32", "id": 2 }, - "first": { - "type": "bool", + "options": { + "type": "ExtensionRangeOptions", "id": 3 - }, - "last": { - "type": "bool", - "id": 4 } } }, - "LogEntrySourceLocation": { + "ReservedRange": { "fields": { - "file": { - "type": "string", + "start": { + "type": "int32", "id": 1 }, - "line": { - "type": "int64", + "end": { + "type": "int32", "id": 2 - }, - "function": { - "type": "string", - "id": 3 } } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "MetricsServiceV2": { - "options": { - "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - }, - "methods": { - "ListLogMetrics": { - "requestType": "ListLogMetricsRequest", - "responseType": "ListLogMetricsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=projects/*}/metrics" - } - }, - "GetLogMetric": { - "requestType": "GetLogMetricRequest", - "responseType": "LogMetric", - "options": { - "(google.api.http).get": "/v2/{metric_name=projects/*/metrics/*}" - } - }, - "CreateLogMetric": { - "requestType": "CreateLogMetricRequest", - "responseType": "LogMetric", - "options": { - "(google.api.http).post": "/v2/{parent=projects/*}/metrics", - "(google.api.http).body": "metric" - } - }, - "UpdateLogMetric": { - "requestType": "UpdateLogMetricRequest", - "responseType": "LogMetric", - "options": { - "(google.api.http).put": "/v2/{metric_name=projects/*/metrics/*}", - "(google.api.http).body": "metric" - } - }, - "DeleteLogMetric": { - "requestType": "DeleteLogMetricRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{metric_name=projects/*/metrics/*}" - } - } - } + "number": { + "type": "int32", + "id": 3 }, - "LogMetric": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "filter": { - "type": "string", - "id": 3 - }, - "metricDescriptor": { - "type": "google.api.MetricDescriptor", - "id": 5 - }, - "valueExtractor": { - "type": "string", - "id": 6 - }, - "labelExtractors": { - "keyType": "string", - "type": "string", - "id": 7 - }, - "bucketOptions": { - "type": "google.api.Distribution.BucketOptions", - "id": 8 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 9 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "version": { - "type": "ApiVersion", - "id": 4, - "options": { - "deprecated": true - } - } - }, - "nested": { - "ApiVersion": { - "values": { - "V2": 0, - "V1": 1 - } - } + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 } }, - "ListLogMetricsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageToken": { - "type": "string", - "id": 2 - }, - "pageSize": { - "type": "int32", - "id": 3 - } + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 }, - "ListLogMetricsResponse": { + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { "fields": { - "metrics": { - "rule": "repeated", - "type": "LogMetric", + "start": { + "type": "int32", "id": 1 }, - "nextPageToken": { - "type": "string", + "end": { + "type": "int32", "id": 2 } } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "GetLogMetricRequest": { - "fields": { - "metricName": { - "type": "string", - "id": 1 - } - } + "number": { + "type": "int32", + "id": 2 }, - "CreateLogMetricRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "metric": { - "type": "LogMetric", - "id": 2 - } - } + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "UpdateLogMetricRequest": { - "fields": { - "metricName": { - "type": "string", - "id": 1 - }, - "metric": { - "type": "LogMetric", - "id": 2 - } + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false } }, - "DeleteLogMetricRequest": { - "fields": { - "metricName": { - "type": "string", - "id": 1 - } + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false } } } }, - "type": { - "options": { - "csharp_namespace": "Google.Cloud.Logging.Type", - "go_package": "google.golang.org/genproto/googleapis/logging/type;ltype", - "java_multiple_files": true, - "java_outer_classname": "LogSeverityProto", - "java_package": "com.google.logging.type", - "php_namespace": "Google\\Cloud\\Logging\\Type" - }, - "nested": { - "HttpRequest": { - "fields": { - "requestMethod": { - "type": "string", - "id": 1 - }, - "requestUrl": { - "type": "string", - "id": 2 - }, - "requestSize": { - "type": "int64", - "id": 3 - }, - "status": { - "type": "int32", - "id": 4 - }, - "responseSize": { - "type": "int64", - "id": 5 - }, - "userAgent": { - "type": "string", - "id": 6 - }, - "remoteIp": { - "type": "string", - "id": 7 - }, - "serverIp": { - "type": "string", - "id": 13 - }, - "referer": { - "type": "string", - "id": 8 - }, - "latency": { - "type": "google.protobuf.Duration", - "id": 14 - }, - "cacheLookup": { - "type": "bool", - "id": 11 - }, - "cacheHit": { - "type": "bool", - "id": 9 - }, - "cacheValidatedWithOriginServer": { - "type": "bool", - "id": 10 - }, - "cacheFillBytes": { - "type": "int64", - "id": 12 - }, - "protocol": { - "type": "string", - "id": 15 - } + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false } }, - "LogSeverity": { - "values": { - "DEFAULT": 0, - "DEBUG": 100, - "INFO": 200, - "NOTICE": 300, - "WARNING": 400, - "ERROR": 500, - "CRITICAL": 600, - "ALERT": 700, - "EMERGENCY": 800 + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", - "java_multiple_files": true, - "java_outer_classname": "MetricProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 }, - "fullyDecodeReservedExpansion": { + "ccEnableArenas": { "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 + "id": 31, + "options": { + "default": false + } }, - "get": { + "objcClassPrefix": { "type": "string", - "id": 2 + "id": 36 }, - "put": { + "csharpNamespace": { "type": "string", - "id": 3 + "id": 37 }, - "post": { + "swiftPrefix": { "type": "string", - "id": 4 + "id": 39 }, - "delete": { + "phpClassPrefix": { "type": "string", - "id": 5 + "id": 40 }, - "patch": { + "phpNamespace": { "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 + "id": 41 }, - "body": { + "phpMetadataNamespace": { "type": "string", - "id": 7 + "id": 44 }, - "responseBody": { + "rubyPackage": { "type": "string", - "id": 12 + "id": 45 }, - "additionalBindings": { + "uninterpretedOption": { "rule": "repeated", - "type": "HttpRule", - "id": 11 + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } } } }, - "CustomHttpPattern": { + "MessageOptions": { "fields": { - "kind": { - "type": "string", - "id": 1 + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } }, - "path": { - "type": "string", + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } } } }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] }, - "MonitoredResourceDescriptor": { + "EnumOptions": { "fields": { - "name": { - "type": "string", - "id": 5 - }, - "type": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", + "allowAlias": { + "type": "bool", "id": 2 }, - "description": { - "type": "string", - "id": 3 + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } }, - "labels": { + "uninterpretedOption": { "rule": "repeated", - "type": "LabelDescriptor", - "id": 4 - }, - "launchStage": { - "type": "LaunchStage", - "id": 7 + "type": "UninterpretedOption", + "id": 999 } - } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] }, - "MonitoredResource": { + "EnumValueOptions": { "fields": { - "type": { - "type": "string", - "id": 1 + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 } - } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] }, - "MonitoredResourceMetadata": { + "ServiceOptions": { "fields": { - "systemLabels": { - "type": "google.protobuf.Struct", - "id": 1 + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } }, - "userLabels": { - "keyType": "string", - "type": "string", - "id": 2 + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 } - } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] }, - "LabelDescriptor": { + "MethodOptions": { "fields": { - "key": { - "type": "string", - "id": 1 + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } }, - "valueType": { - "type": "ValueType", - "id": 2 + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } }, - "description": { - "type": "string", - "id": 3 + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 } }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], "nested": { - "ValueType": { + "IdempotencyLevel": { "values": { - "STRING": 0, - "BOOL": 1, - "INT64": 2 + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 } } } }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "Distribution": { + "UninterpretedOption": { "fields": { - "count": { - "type": "int64", - "id": 1 - }, - "mean": { - "type": "double", + "name": { + "rule": "repeated", + "type": "NamePart", "id": 2 }, - "sumOfSquaredDeviation": { - "type": "double", + "identifierValue": { + "type": "string", "id": 3 }, - "range": { - "type": "Range", + "positiveIntValue": { + "type": "uint64", "id": 4 }, - "bucketOptions": { - "type": "BucketOptions", + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", "id": 6 }, - "bucketCounts": { - "rule": "repeated", - "type": "int64", + "stringValue": { + "type": "bytes", "id": 7 }, - "exemplars": { - "rule": "repeated", - "type": "Exemplar", - "id": 10 + "aggregateValue": { + "type": "string", + "id": 8 } }, "nested": { - "Range": { + "NamePart": { "fields": { - "min": { - "type": "double", + "namePart": { + "rule": "required", + "type": "string", "id": 1 }, - "max": { - "type": "double", + "isExtension": { + "rule": "required", + "type": "bool", "id": 2 } } - }, - "BucketOptions": { - "oneofs": { - "options": { - "oneof": [ - "linearBuckets", - "exponentialBuckets", - "explicitBuckets" - ] - } - }, + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { "fields": { - "linearBuckets": { - "type": "Linear", + "path": { + "rule": "repeated", + "type": "int32", "id": 1 }, - "exponentialBuckets": { - "type": "Exponential", + "span": { + "rule": "repeated", + "type": "int32", "id": 2 }, - "explicitBuckets": { - "type": "Explicit", + "leadingComments": { + "type": "string", "id": 3 - } - }, - "nested": { - "Linear": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "width": { - "type": "double", - "id": 2 - }, - "offset": { - "type": "double", - "id": 3 - } - } }, - "Exponential": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "growthFactor": { - "type": "double", - "id": 2 - }, - "scale": { - "type": "double", - "id": 3 - } - } + "trailingComments": { + "type": "string", + "id": 4 }, - "Explicit": { - "fields": { - "bounds": { - "rule": "repeated", - "type": "double", - "id": 1 - } - } + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 } } - }, - "Exemplar": { + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { "fields": { - "value": { - "type": "double", + "path": { + "rule": "repeated", + "type": "int32", "id": 1 }, - "timestamp": { - "type": "google.protobuf.Timestamp", + "sourceFile": { + "type": "string", "id": 2 }, - "attachments": { - "rule": "repeated", - "type": "google.protobuf.Any", + "begin": { + "type": "int32", "id": 3 + }, + "end": { + "type": "int32", + "id": 4 } } } } }, - "MetricDescriptor": { + "Duration": { "fields": { - "name": { - "type": "string", + "seconds": { + "type": "int64", "id": 1 }, - "type": { + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", "type": "string", - "id": 8 + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", "id": 2 }, - "metricKind": { - "type": "MetricKind", + "stringValue": { + "type": "string", "id": 3 }, - "valueType": { - "type": "ValueType", + "boolValue": { + "type": "bool", "id": 4 }, - "unit": { - "type": "string", + "structValue": { + "type": "Struct", "id": 5 }, - "description": { - "type": "string", + "listValue": { + "type": "ListValue", "id": 6 - }, - "displayName": { - "type": "string", - "id": 7 - }, - "metadata": { - "type": "MetricDescriptorMetadata", - "id": 10 - }, - "launchStage": { - "type": "LaunchStage", - "id": 12 } - }, - "nested": { - "MetricDescriptorMetadata": { - "fields": { - "launchStage": { - "type": "LaunchStage", - "id": 1, - "options": { - "deprecated": true - } - }, - "samplePeriod": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "ingestDelay": { - "type": "google.protobuf.Duration", - "id": 3 - } - } - }, - "MetricKind": { - "values": { - "METRIC_KIND_UNSPECIFIED": 0, - "GAUGE": 1, - "DELTA": 2, - "CUMULATIVE": 3 - } - }, - "ValueType": { - "values": { - "VALUE_TYPE_UNSPECIFIED": 0, - "BOOL": 1, - "INT64": 2, - "DOUBLE": 3, - "STRING": 4, - "DISTRIBUTION": 5, - "MONEY": 6 - } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 } } }, - "Metric": { + "Any": { "fields": { - "type": { + "type_url": { "type": "string", - "id": 3 + "id": 1 }, - "labels": { - "keyType": "string", - "type": "string", + "value": { + "type": "bytes", "id": 2 } } diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 934efbac1b2..2ac43f7de96 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -210,6 +210,8 @@ class ConfigServiceV2Client { 'createExclusion', 'updateExclusion', 'deleteExclusion', + 'getCmekSettings', + 'updateCmekSettings', ]; for (const methodName of configServiceV2StubMethods) { const innerCallPromise = configServiceV2Stub.then( @@ -1188,6 +1190,173 @@ class ConfigServiceV2Client { return this._innerApiCalls.deleteExclusion(request, options, callback); } + /** + * Gets the Logs Router CMEK settings for the given resource. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.name] + * Required. The resource for which to retrieve CMEK settings. + * + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * + * Example: `"organizations/12345/cmekSettings"`. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * const client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * + * client.getCmekSettings({}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getCmekSettings(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); + + return this._innerApiCalls.getCmekSettings(request, options, callback); + } + + /** + * Updates the Logs Router CMEK settings for the given resource. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * + * UpdateCmekSettings + * will fail if 1) `kms_key_name` is invalid, or 2) the associated service + * account does not have the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + * 3) access to the key is disabled. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.name] + * Required. The resource name for the CMEK settings to update. + * + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * + * Example: `"organizations/12345/cmekSettings"`. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * @param {Object} [request.cmekSettings] + * Required. The CMEK settings to update. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * + * This object should have the same structure as [CmekSettings]{@link google.logging.v2.CmekSettings} + * @param {Object} [request.updateMask] + * Optional. Field mask identifying which fields from `cmek_settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * + * See FieldMask for more information. + * + * Example: `"updateMask=kmsKeyName"` + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * const client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * + * client.updateCmekSettings({}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateCmekSettings(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); + + return this._innerApiCalls.updateCmekSettings(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index a66c127b02b..00582c9d6cb 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -7,7 +7,11 @@ "INTERNAL", "UNAVAILABLE" ], - "non_idempotent": [] + "non_idempotent": [], + "idempotent2": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] }, "retry_params": { "default": { @@ -79,6 +83,16 @@ "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" + }, + "GetCmekSettings": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent2", + "retry_params_name": "default" + }, + "UpdateCmekSettings": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index 12115574657..ae902a1a178 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -102,10 +102,15 @@ * @property {string} insertId * Optional. A unique identifier for the log entry. If you provide a value, * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which can be - * removed. If omitted in new log entries, then Logging assigns its own unique - * identifier. The `insert_id` is also used to order log entries that have the - * same `timestamp` value. + * `timestamp`, and with the same `insert_id` to be duplicates which are + * removed in a single query result. However, there are no guarantees of + * de-duplication in the export of logs. + * + * If the `insert_id` is omitted when writing a log entry, the Logging API + * assigns its own unique identifier in this field. + * + * In queries, the `insert_id` is also used to order log entries that have + * the same `log_name` and `timestamp` values. * * @property {Object} httpRequest * Optional. Information about the HTTP request associated with this log diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index c9e1b1f9983..168a458728d 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -160,7 +160,7 @@ const WriteLogEntriesResponse = { * * @property {string} filter * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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 diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index 96e3a455d55..18c2c744a3c 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -27,7 +27,7 @@ * 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. + * periods. First character has to be alphanumeric. * * @property {string} destination * Required. The export destination: @@ -48,6 +48,14 @@ * * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR * + * @property {string} description + * Optional. A description of this sink. + * The maximum length of the description is 8000 characters. + * + * @property {boolean} disabled + * Optional. If set to True, then this sink is disabled and it does not + * export any log entries. + * * @property {number} outputVersionFormat * Deprecated. The log entry format to use for this sink's exported log * entries. The v2 format is used by default and cannot be changed. @@ -160,6 +168,14 @@ const LogSink = { * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. * In both cases, tables are sharded based on UTC timezone. * + * @property {boolean} usesTimestampColumnPartitioning + * Output only. True if new timestamp column based partitioning is in use, + * false if legacy ingestion-time partitioning is in use. + * All new sinks will have this field set true and will use timestamp column + * based partitioning. If use_partitioned_tables is false, this value has no + * meaning and will be false. Legacy sinks using partitioned tables will have + * this field set to false. + * * @typedef BigQueryOptions * @memberof google.logging.v2 * @see [google.logging.v2.BigQueryOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} @@ -373,6 +389,7 @@ const DeleteSinkRequest = { * Required. A client-assigned identifier, such as * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and * can include only letters, digits, underscores, hyphens, and periods. + * First character has to be alphanumeric. * * @property {string} description * Optional. A description of this exclusion. @@ -571,4 +588,142 @@ const UpdateExclusionRequest = { */ const DeleteExclusionRequest = { // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to + * GetCmekSettings. + * + * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * @property {string} name + * Required. The resource for which to retrieve CMEK settings. + * + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * + * Example: `"organizations/12345/cmekSettings"`. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * + * @typedef GetCmekSettingsRequest + * @memberof google.logging.v2 + * @see [google.logging.v2.GetCmekSettingsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const GetCmekSettingsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to + * UpdateCmekSettings. + * + * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * @property {string} name + * Required. The resource name for the CMEK settings to update. + * + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * + * Example: `"organizations/12345/cmekSettings"`. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * + * @property {Object} cmekSettings + * Required. The CMEK settings to update. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * + * This object should have the same structure as [CmekSettings]{@link google.logging.v2.CmekSettings} + * + * @property {Object} updateMask + * Optional. Field mask identifying which fields from `cmek_settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * + * See FieldMask for more information. + * + * Example: `"updateMask=kmsKeyName"` + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @typedef UpdateCmekSettingsRequest + * @memberof google.logging.v2 + * @see [google.logging.v2.UpdateCmekSettingsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const UpdateCmekSettingsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Describes the customer-managed encryption key (CMEK) settings associated with + * a project, folder, organization, billing account, or flexible resource. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in the + * GCP organization. + * + * See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * @property {string} name + * Output Only. The resource name of the CMEK settings. + * + * @property {string} kmsKeyName + * The resource name for the configured Cloud KMS key. + * + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * + * For example: + * `"projects/my-project-id/locations/my-region/keyRings/key-ring-name/cryptoKeys/key-name"` + * + * + * + * To enable CMEK for the Logs Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. + * + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name. Encryption operations that are in + * progress will be completed with the key that was in use when they started. + * Decryption operations will be completed using the key that was used at the + * time of encryption unless access to that key has been revoked. + * + * To disable CMEK for the Logs Router, set this field to an empty string. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * + * @property {string} serviceAccountId + * Output Only. The service account that will be used by the Logs Router to + * access your Cloud KMS key. + * + * Before enabling CMEK for Logs Router, you must first assign the role + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that + * the Logs Router will use to access your Cloud KMS key. Use + * GetCmekSettings to + * obtain the service account ID. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * + * @typedef CmekSettings + * @memberof google.logging.v2 + * @see [google.logging.v2.CmekSettings definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const CmekSettings = { + // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index d14bbf8e129..5afdd0c2405 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -220,7 +220,7 @@ const ListLogMetricsResponse = { * The parameters to GetLogMetric. * * @property {string} metricName - * The resource name of the desired metric: + * Required. The resource name of the desired metric: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @@ -236,14 +236,14 @@ const GetLogMetricRequest = { * The parameters to CreateLogMetric. * * @property {string} parent - * The resource name of the project in which to create the metric: + * Required. The resource name of the project in which to create the metric: * * "projects/[PROJECT_ID]" * * The new metric must be provided in the request. * * @property {Object} metric - * The new logs-based metric, which must not have an identifier that + * Required. The new logs-based metric, which must not have an identifier that * already exists. * * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} @@ -260,7 +260,7 @@ const CreateLogMetricRequest = { * The parameters to UpdateLogMetric. * * @property {string} metricName - * The resource name of the metric to update: + * Required. The resource name of the metric to update: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @@ -269,7 +269,7 @@ const CreateLogMetricRequest = { * does not exist in `[PROJECT_ID]`, then a new metric is created. * * @property {Object} metric - * The updated metric. + * Required. The updated metric. * * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * @@ -285,7 +285,7 @@ const UpdateLogMetricRequest = { * The parameters to DeleteLogMetric. * * @property {string} metricName - * The resource name of the metric to delete: + * Required. The resource name of the metric to delete: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index 7e161f23043..b7912abd9f4 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -284,10 +284,10 @@ class LoggingServiceV2Client { // ------------------- /** - * Deletes all the log entries in a log. - * The log reappears if it receives new entries. - * Log entries written shortly before the delete operation might not be - * deleted. + * Deletes all the log entries in a log. The log reappears if it receives new + * entries. Log entries written shortly before the delete operation might not + * be deleted. Entries received after the delete operation with a timestamp + * before the operation will be deleted. * * @param {Object} request * The request object that will be sent. @@ -488,7 +488,7 @@ class LoggingServiceV2Client { * `"my-project-1A"`. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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 @@ -621,7 +621,7 @@ class LoggingServiceV2Client { * `"my-project-1A"`. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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 diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index f8d7101d7a7..1662d1a3fb1 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -413,7 +413,7 @@ class MetricsServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.metricName - * The resource name of the desired metric: + * Required. The resource name of the desired metric: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] @@ -469,13 +469,13 @@ class MetricsServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The resource name of the project in which to create the metric: + * Required. The resource name of the project in which to create the metric: * * "projects/[PROJECT_ID]" * * The new metric must be provided in the request. * @param {Object} request.metric - * The new logs-based metric, which must not have an identifier that + * Required. The new logs-based metric, which must not have an identifier that * already exists. * * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} @@ -537,7 +537,7 @@ class MetricsServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.metricName - * The resource name of the metric to update: + * Required. The resource name of the metric to update: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @@ -545,7 +545,7 @@ class MetricsServiceV2Client { * `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 {Object} request.metric - * The updated metric. + * Required. The updated metric. * * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} * @param {Object} [options] @@ -606,7 +606,7 @@ class MetricsServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.metricName - * The resource name of the metric to delete: + * Required. The resource name of the metric to delete: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {Object} [options] diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index c2935877e56..b5bbd57ad81 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,27 +1,27 @@ { - "updateTime": "2020-01-29T12:25:58.462892Z", + "updateTime": "2020-02-08T12:26:38.106455Z", "sources": [ { "generator": { "name": "artman", - "version": "0.44.4", - "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" + "version": "0.45.0", + "dockerImage": "googleapis/artman@sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cf3b61102ed5f36b827bc82ec39be09525f018c8", - "internalRef": "292034635", - "log": "cf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" + "sha": "e7d8a694f4559201e6913f6610069cb08b39274e", + "internalRef": "293903652", + "log": "e7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\ne46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\n" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], @@ -36,436 +36,5 @@ "config": "google/logging/artman_logging.yaml" } } - ], - "newFiles": [ - { - "path": ".eslintignore" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".gitignore" - }, - { - "path": ".jsdoc.js" - }, - { - "path": ".kokoro/.gitattributes" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/release/common.cfg" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".nycrc" - }, - { - "path": ".prettierignore" - }, - { - "path": ".prettierrc" - }, - { - "path": ".readme-partials.yml" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "LICENSE" - }, - { - "path": "README.md" - }, - { - "path": "codecov.yaml" - }, - { - "path": "linkinator.config.json" - }, - { - "path": "package.json" - }, - { - "path": "protos/google/logging/type/http_request.proto" - }, - { - "path": "protos/google/logging/type/log_severity.proto" - }, - { - "path": "protos/google/logging/v2/log_entry.proto" - }, - { - "path": "protos/google/logging/v2/logging.proto" - }, - { - "path": "protos/google/logging/v2/logging_config.proto" - }, - { - "path": "protos/google/logging/v2/logging_metrics.proto" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "renovate.json" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/fluent.js" - }, - { - "path": "samples/http-request.js" - }, - { - "path": "samples/logs.js" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/sinks.js" - }, - { - "path": "samples/test/fluent.test.js" - }, - { - "path": "samples/test/http-request.test.js" - }, - { - "path": "samples/test/logs.test.js" - }, - { - "path": "samples/test/quickstart.test.js" - }, - { - "path": "samples/test/sinks.test.js" - }, - { - "path": "smoke-test/.eslintrc.yml" - }, - { - "path": "smoke-test/logging_service_v2_smoke_test.js" - }, - { - "path": "src/common.ts" - }, - { - "path": "src/entry.ts" - }, - { - "path": "src/http-request.ts" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/log.ts" - }, - { - "path": "src/metadata.ts" - }, - { - "path": "src/middleware/context.ts" - }, - { - "path": "src/middleware/express/index.ts" - }, - { - "path": "src/middleware/express/make-http-request.ts" - }, - { - "path": "src/middleware/express/make-middleware.ts" - }, - { - "path": "src/middleware/index.ts" - }, - { - "path": "src/service_proto_list.json" - }, - { - "path": "src/sink.ts" - }, - { - "path": "src/v2/.eslintrc.yml" - }, - { - "path": "src/v2/config_service_v2_client.js" - }, - { - "path": "src/v2/config_service_v2_client_config.json" - }, - { - "path": "src/v2/config_service_v2_proto_list.json" - }, - { - "path": "src/v2/doc/google/api/doc_distribution.js" - }, - { - "path": "src/v2/doc/google/api/doc_label.js" - }, - { - "path": "src/v2/doc/google/api/doc_metric.js" - }, - { - "path": "src/v2/doc/google/api/doc_monitored_resource.js" - }, - { - "path": "src/v2/doc/google/logging/type/doc_http_request.js" - }, - { - "path": "src/v2/doc/google/logging/v2/doc_log_entry.js" - }, - { - "path": "src/v2/doc/google/logging/v2/doc_logging.js" - }, - { - "path": "src/v2/doc/google/logging/v2/doc_logging_config.js" - }, - { - "path": "src/v2/doc/google/logging/v2/doc_logging_metrics.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_any.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_duration.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_empty.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_field_mask.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_struct.js" - }, - { - "path": "src/v2/doc/google/protobuf/doc_timestamp.js" - }, - { - "path": "src/v2/index.js" - }, - { - "path": "src/v2/logging_service_v2_client.js" - }, - { - "path": "src/v2/logging_service_v2_client_config.json" - }, - { - "path": "src/v2/logging_service_v2_proto_list.json" - }, - { - "path": "src/v2/metrics_service_v2_client.js" - }, - { - "path": "src/v2/metrics_service_v2_client_config.json" - }, - { - "path": "src/v2/metrics_service_v2_proto_list.json" - }, - { - "path": "synth.metadata" - }, - { - "path": "synth.py" - }, - { - "path": "system-test/fixtures/sample/package.json" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": "system-test/fixtures/sample/tsconfig.json" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "system-test/logging.ts" - }, - { - "path": "test/.eslintrc.yml" - }, - { - "path": "test/common.ts" - }, - { - "path": "test/entry.ts" - }, - { - "path": "test/gapic-v2.js" - }, - { - "path": "test/index.ts" - }, - { - "path": "test/log.ts" - }, - { - "path": "test/metadata.ts" - }, - { - "path": "test/middleware/express/test-make-http-request.ts" - }, - { - "path": "test/middleware/express/test-make-middleware.ts" - }, - { - "path": "test/middleware/test-context.ts" - }, - { - "path": "test/mocha.opts" - }, - { - "path": "test/sink.ts" - }, - { - "path": "tsconfig.json" - }, - { - "path": "tslint.json" - } ] } \ No newline at end of file diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index 09f24287fa0..fffe6809cc1 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -130,12 +130,16 @@ describe('ConfigServiceV2Client', () => { const name = 'name3373707'; const destination = 'destination-1429847026'; const filter = 'filter-1274492040'; + const description = 'description-1724546052'; + const disabled = true; const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { name: name, destination: destination, filter: filter, + description: description, + disabled: disabled, writerIdentity: writerIdentity, includeChildren: includeChildren, }; @@ -200,12 +204,16 @@ describe('ConfigServiceV2Client', () => { const name = 'name3373707'; const destination = 'destination-1429847026'; const filter = 'filter-1274492040'; + const description = 'description-1724546052'; + const disabled = true; const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { name: name, destination: destination, filter: filter, + description: description, + disabled: disabled, writerIdentity: writerIdentity, includeChildren: includeChildren, }; @@ -272,12 +280,16 @@ describe('ConfigServiceV2Client', () => { const name = 'name3373707'; const destination = 'destination-1429847026'; const filter = 'filter-1274492040'; + const description = 'description-1724546052'; + const disabled = true; const writerIdentity = 'writerIdentity775638794'; const includeChildren = true; const expectedResponse = { name: name, destination: destination, filter: filter, + description: description, + disabled: disabled, writerIdentity: writerIdentity, includeChildren: includeChildren, }; @@ -699,6 +711,122 @@ describe('ConfigServiceV2Client', () => { }); }); }); + + describe('getCmekSettings', () => { + it('invokes getCmekSettings without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock response + const name = 'name3373707'; + const kmsKeyName = 'kmsKeyName2094986649'; + const serviceAccountId = 'serviceAccountId-111486921'; + const expectedResponse = { + name: name, + kmsKeyName: kmsKeyName, + serviceAccountId: serviceAccountId, + }; + + // Mock Grpc layer + client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getCmekSettings(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getCmekSettings with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock Grpc layer + client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getCmekSettings(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateCmekSettings', () => { + it('invokes updateCmekSettings without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock response + const name = 'name3373707'; + const kmsKeyName = 'kmsKeyName2094986649'; + const serviceAccountId = 'serviceAccountId-111486921'; + const expectedResponse = { + name: name, + kmsKeyName: kmsKeyName, + serviceAccountId: serviceAccountId, + }; + + // Mock Grpc layer + client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateCmekSettings(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateCmekSettings with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock Grpc layer + client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateCmekSettings(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); }); describe('LoggingServiceV2Client', () => { it('has servicePath', () => { From 2cff102f9805fe1c4e20218e42902f83d5e4c698 Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 11 Feb 2020 15:41:54 -0500 Subject: [PATCH 0547/1029] test: ignore getLogs() error in cleanup (#703) --- handwritten/logging/system-test/logging.ts | 28 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index f5ed46709b9..13df97c26df 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -100,9 +100,19 @@ describe('Logging', () => { async function deleteLogs() { const maxPatienceMs = 300000; // 5 minutes. - const [logs] = await logging.getLogs({ - pageSize: 10000, - }); + let logs; + + try { + [logs] = await logging.getLogs({ + pageSize: 10000, + }); + } catch (e) { + console.warn('Error retrieving logs:'); + console.warn(` ${e.message}`); + console.warn('No test logs were deleted'); + return; + } + const logsToDelete = logs.filter(log => { return ( log.name.startsWith(TESTS_PREFIX) && @@ -111,7 +121,7 @@ describe('Logging', () => { }); if (logsToDelete.length > 0) { - console.log('Deleting', logsToDelete.length, 'test logs'); + console.log('Deleting', logsToDelete.length, 'test logs...'); } let numLogsDeleted = 0; @@ -130,12 +140,22 @@ describe('Logging', () => { } await new Promise(res => setTimeout(res, timeoutMs)); } catch (e) { + if (e.code === 8) { + console.warn( + 'Rate limit reached. The next test run will attempt to delete the rest' + ); + break; + } if (e.code !== 5) { // Log exists, but couldn't be deleted. console.warn(`Deleting ${log.name} failed:`, e.message); } } } + + if (logsToDelete.length > 0) { + console.log(`${numLogsDeleted}/${logsToDelete.length} logs deleted`); + } } async function getAndDelete(method: Function) { From 7872f92f8f7a1bbacaec1dbb820810a297c6a7b3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 11 Feb 2020 22:18:32 +0100 Subject: [PATCH 0548/1029] chore(deps): update dependency linkinator to v2 (#701) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 91c23d9f1a5..2c492f6fbce 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -96,7 +96,7 @@ "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", + "linkinator": "^2.0.0", "mocha": "^7.0.0", "mv": "^2.1.1", "ncp": "^2.0.0", From 00203d2e264d3e9b9ce25d2ee6a5e5bd10fab4c4 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 11 Feb 2020 22:34:46 -0800 Subject: [PATCH 0549/1029] build: add GitHub actions config for unit tests * build: add GitHub actions config for unit tests * chore: link root directory before linting * chore: also need to npm i --- handwritten/logging/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2c492f6fbce..f72d28e3659 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -43,7 +43,8 @@ "pretest": "npm run compile", "posttest": "npm run check", "docs-test": "linkinator docs", - "predocs-test": "npm run docs" + "predocs-test": "npm run docs", + "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { "@google-cloud/common": "^2.2.2", From 3f74801b990e13f8657da7b43a6d671d0e85b321 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 12 Feb 2020 11:58:22 -0500 Subject: [PATCH 0550/1029] test: grant proper permissions to bucket destination (#706) --- handwritten/logging/system-test/logging.ts | 51 +++++++++++----------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 13df97c26df..7a8b28d7bea 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -32,31 +32,34 @@ nock(HOST_ADDRESS) .replyWithError({code: 'ENOTFOUND'}) .persist(); -describe('Logging', () => { - let PROJECT_ID: string; - const TESTS_PREFIX = 'nodejs-logging-system-test'; - const WRITE_CONSISTENCY_DELAY_MS = 5000; - +describe('Logging', async () => { const bigQuery = new BigQuery(); const pubsub = new PubSub(); const storage = new Storage(); const logging = new Logging(); + const PROJECT_ID = await logging.auth.getProjectId(); + const TESTS_PREFIX = 'nodejs-logging-system-test'; + const WRITE_CONSISTENCY_DELAY_MS = 5000; + // Create the possible destinations for sinks that we will create. const bucket = storage.bucket(generateName()); const dataset = bigQuery.dataset(generateName().replace(/-/g, '_')); const topic = pubsub.topic(generateName()); - before(async () => { - await Promise.all([ - bucket.create(), - dataset.create(), - topic.create(), - logging.auth.getProjectId().then(projectId => { - PROJECT_ID = projectId; - }), - ]); + const serviceAccount = (await logging.auth.getCredentials()).client_email; + + await bucket.create(); + await bucket.iam.setPolicy({ + bindings: [ + { + role: 'roles/storage.admin', + members: [`serviceAccount:${serviceAccount}`], + }, + ], }); + await dataset.create(); + await topic.create(); after(async () => { const oneHourAgo = new Date(); @@ -71,19 +74,15 @@ describe('Logging', () => { ]); async function deleteBuckets() { - const [buckets] = await storage.getBuckets({ - prefix: TESTS_PREFIX, + const [buckets] = await storage.getBuckets({prefix: TESTS_PREFIX}); + const bucketsToDelete = buckets.filter(bucket => { + return new Date(bucket.metadata.timeCreated) < oneHourAgo; }); - return Promise.all( - buckets - .filter(bucket => { - return new Date(bucket.metadata.timeCreated) < oneHourAgo; - }) - .map(async bucket => { - await bucket.deleteFiles(); - await bucket.delete(); - }) - ); + + for (const bucket of bucketsToDelete) { + await bucket.deleteFiles(); + await bucket.delete(); + } } async function deleteDatasets() { From 1b45fb86d3c286416e927dfdf9f7de095da09b6d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Feb 2020 11:38:01 -0800 Subject: [PATCH 0551/1029] fix: use logging api resource for metric (#704) Co-authored-by: Justin Beckwith Co-authored-by: Benjamin E. Coe --- .../logging/protos/google/logging/v2/logging.proto | 3 ++- .../protos/google/logging/v2/logging_metrics.proto | 2 +- handwritten/logging/protos/protos.json | 5 +++-- handwritten/logging/synth.metadata | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index 41575061076..c3a5246334c 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.logging.v2; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; @@ -27,7 +28,6 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -93,6 +93,7 @@ service LoggingServiceV2 { post: "/v2/entries:list" body: "*" }; + option (google.api.method_signature) = "resource_names,filter,order_by"; } // Lists the descriptors for monitored resource types used by Logging. diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 41fe2ea8820..582c067e683 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -277,7 +277,7 @@ message CreateLogMetricRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Metric" + type: "logging.googleapis.com/Metric" } ]; diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 8d9896080f2..2e63241b227 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -559,7 +559,8 @@ "responseType": "ListLogEntriesResponse", "options": { "(google.api.http).post": "/v2/entries:list", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource_names,filter,order_by" } }, "ListMonitoredResourceDescriptors": { @@ -1035,7 +1036,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Metric" + "(google.api.resource_reference).type": "logging.googleapis.com/Metric" } }, "metric": { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index b5bbd57ad81..68dd549bda9 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-02-08T12:26:38.106455Z", + "updateTime": "2020-02-11T12:27:57.639724Z", "sources": [ { "generator": { @@ -12,9 +12,9 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e7d8a694f4559201e6913f6610069cb08b39274e", - "internalRef": "293903652", - "log": "e7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\ne46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\n" + "sha": "5006247aa157e59118833658084345ee59af7c09", + "internalRef": "294383128", + "log": "5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\n" } }, { From 85c073d3075f4273b4cfa61ee364c0c0059ef9b7 Mon Sep 17 00:00:00 2001 From: Andrew Zammit Date: Wed, 19 Feb 2020 07:19:41 -0700 Subject: [PATCH 0552/1029] fix(types): write options dryRun and partialSuccess (#711) (#712) --- handwritten/logging/src/log.ts | 7 +++++++ handwritten/logging/test/log.ts | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index c51e834fbb0..cfa9f8d7c97 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -55,8 +55,10 @@ export type DeleteCallback = ApiResponseCallback; export type MonitoredResource = google.api.IMonitoredResource; export interface WriteOptions { + dryRun?: boolean; gaxOptions?: CallOptions; labels?: {[index: string]: string}; + partialSuccess?: boolean; resource?: MonitoredResource; } @@ -721,9 +723,14 @@ class Log implements LogSeverityFunctions { * Write options. * * @typedef {object} WriteOptions + * @property {boolean} [dryRun] If true, the request should expect normal + * response, but the entries won't be persisted nor exported. * @property {object} gaxOptions Request configuration options, outlined here: * https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @property {object[]} labels Labels to set on the log. + * @property {boolean} [partialSuccess] Whether valid entries should be + * written even if some other entries fail due to INVALID_ARGUMENT + * or PERMISSION_DENIED errors. * @property {object} resource A default monitored resource for entries where * one isn't specified. */ diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 45db5476688..3ccd55f080b 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -475,6 +475,18 @@ describe('Log', () => { await log.write(ENTRY); }); + it('should pass through additional options', async () => { + log.logging.loggingService.writeLogEntries = ( + reqOpts: WriteOptions, + gaxOpts: {} + ) => { + assert.strictEqual(reqOpts.dryRun, true); + assert.strictEqual(reqOpts.partialSuccess, false); + }; + + await log.write(ENTRY, {dryRun: true, partialSuccess: false}); + }); + it('should not truncate entries by default', async () => { const logger = createLogger(); const entry = new Entry({}, 'hello world'.padEnd(300000, '.')); From f6596c1f43381a9c4c31cc7cc55166f152417b3e Mon Sep 17 00:00:00 2001 From: Lalji Kanjareeya <46327204+laljikanjareeya@users.noreply.github.com> Date: Wed, 19 Feb 2020 20:26:23 +0530 Subject: [PATCH 0553/1029] fix(docs): orderby samples and documentation (#713) Co-authored-by: Stephen --- handwritten/logging/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 1084dcf9082..f2518058071 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -491,7 +491,7 @@ class Logging { * @property {number} [maxResults] Maximum number of items plus prefixes to * return. * @property {string} [orderBy] How the results should be sorted, - * `timestamp` (oldest first) and `timestamp desc` (newest first, + * `timestamp asc` (oldest first) and `timestamp desc` (newest first, * **default**). * @property {number} [pageSize] Maximum number of logs to return. * @property {string} [pageToken] A previously-returned page token From ce5b8206a138e801c9f2c8c5aa5ca5480d4d9e1d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2020 14:46:35 -0800 Subject: [PATCH 0554/1029] chore: release 7.2.0 (#694) --- handwritten/logging/CHANGELOG.md | 16 ++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index d8558a56ee5..d3fd6a23d01 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,22 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [7.2.0](https://www.github.com/googleapis/nodejs-logging/compare/v7.1.0...v7.2.0) (2020-02-19) + + +### Features + +* add CMEK config and update grpc config logic ([#700](https://www.github.com/googleapis/nodejs-logging/issues/700)) ([a3fb0f3](https://www.github.com/googleapis/nodejs-logging/commit/a3fb0f3b55583220883fb83504f94f57cf907267)) +* add getLogs() and getLogsStream() ([#692](https://www.github.com/googleapis/nodejs-logging/issues/692)) ([d582eeb](https://www.github.com/googleapis/nodejs-logging/commit/d582eebb79d183a5fa1403764fc72816f2939b87)) + + +### Bug Fixes + +* **deps:** update dependency type-fest to ^0.10.0 ([#697](https://www.github.com/googleapis/nodejs-logging/issues/697)) ([395a31d](https://www.github.com/googleapis/nodejs-logging/commit/395a31db786bd416c9387e5b893803c839b39ae7)) +* use logging api resource for metric ([#704](https://www.github.com/googleapis/nodejs-logging/issues/704)) ([0239b81](https://www.github.com/googleapis/nodejs-logging/commit/0239b81ed816412e2a06bcfaaa347552cb00dc29)) +* **docs:** orderby samples and documentation ([#713](https://www.github.com/googleapis/nodejs-logging/issues/713)) ([e703c23](https://www.github.com/googleapis/nodejs-logging/commit/e703c23c4f4c9a49878a50013e6208e2f9aae2cf)) +* **types:** write options dryRun and partialSuccess ([#711](https://www.github.com/googleapis/nodejs-logging/issues/711)) ([#712](https://www.github.com/googleapis/nodejs-logging/issues/712)) ([56a8ed8](https://www.github.com/googleapis/nodejs-logging/commit/56a8ed84ab5d9bad137e8b5ac779a2f1e24aed6a)) + ## [7.1.0](https://www.github.com/googleapis/nodejs-logging/compare/v7.0.1...v7.1.0) (2020-01-29) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f72d28e3659..c6d6e8b6e1d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "7.1.0", + "version": "7.2.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 806cd0f0eea6776c8efb2afca74b6c0e4addabed Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 20 Feb 2020 00:26:52 +0100 Subject: [PATCH 0555/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.20 (#714) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c6d6e8b6e1d..8e352207a52 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -51,7 +51,7 @@ "@google-cloud/paginator": "^2.0.0", "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@opencensus/propagation-stackdriver": "0.0.19", + "@opencensus/propagation-stackdriver": "0.0.20", "arrify": "^2.0.0", "dot-prop": "^5.1.0", "eventid": "^1.0.0", From 127f52d832598cbfbf3f205e6a2962b4293b769f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 20 Feb 2020 02:30:06 +0100 Subject: [PATCH 0556/1029] chore(deps): update dependency sinon to v9 --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8e352207a52..03f24991cbc 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -104,7 +104,7 @@ "nock": "^11.3.2", "prettier": "^1.15.1", "proxyquire": "^2.1.0", - "sinon": "^8.0.0", + "sinon": "^9.0.0", "typescript": "3.6.4", "uuid": "^3.3.2" } From d9624b7127fc3d0c8f5516df744e637c97503a9a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 20 Feb 2020 07:16:19 +0100 Subject: [PATCH 0557/1029] chore(deps): update dependency nock to v12 This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [nock](https://togithub.com/nock/nock) | devDependencies | major | [`^11.3.2` -> `^12.0.0`](https://renovatebot.com/diffs/npm/nock/11.9.1/12.0.1) | --- ### Release Notes
nock/nock ### [`v12.0.1`](https://togithub.com/nock/nock/releases/v12.0.1) [Compare Source](https://togithub.com/nock/nock/compare/v12.0.0...v12.0.1) ##### Bug Fixes - Replace a few more uses of lodash ([#​1916](https://togithub.com/nock/nock/issues/1916)) ([1f47f1a](https://togithub.com/nock/nock/commit/1f47f1a1ee977df0414a9865d6f329247cb7398f)), closes [#​1285](https://togithub.com/nock/nock/issues/1285) ### [`v12.0.0`](https://togithub.com/nock/nock/releases/v12.0.0) [Compare Source](https://togithub.com/nock/nock/compare/v11.9.1...v12.0.0) ##### BREAKING CHANGES - Require Node 10+ ([#​1895](https://togithub.com/nock/nock/issues/1895)) ([123832e](https://togithub.com/nock/nock/commit/123832ebad65c70bc501cce2b656403382e234c5)), closes [#​1895](https://togithub.com/nock/nock/issues/1895) - Do not return the `nock` global from `cleanAll()` ([#​1872](https://togithub.com/nock/nock/issues/1872)) ([0a4a944](https://togithub.com/nock/nock/commit/0a4a944566116618bf8897d7dc6dcf943ba89fe6)), closes [#​1872](https://togithub.com/nock/nock/issues/1872) - Drop support for String constructor ([#​1873](https://togithub.com/nock/nock/issues/1873)) ([e33b3e8](https://togithub.com/nock/nock/commit/e33b3e86d047362d359f88f9df698f4f103a80ad)), closes [#​1873](https://togithub.com/nock/nock/issues/1873) When checking types of strings, Nock will no longer recognize the String constructor, only string primitives. ##### Features - Allow passing a function to `enableNetConnect()` ([#​1889](https://togithub.com/nock/nock/issues/1889)) ([7f9e26c](https://togithub.com/nock/nock/commit/7f9e26c0e9e853feeabd6819827cc9c069994542))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is stale, or if you tick the rebase/retry checkbox below. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 03f24991cbc..69e004490d5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -101,7 +101,7 @@ "mocha": "^7.0.0", "mv": "^2.1.1", "ncp": "^2.0.0", - "nock": "^11.3.2", + "nock": "^12.0.0", "prettier": "^1.15.1", "proxyquire": "^2.1.0", "sinon": "^9.0.0", From a5ec7201c01d55dcc518017c6f9daee0e2f47b40 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2020 22:31:00 -0800 Subject: [PATCH 0558/1029] chore: release 7.2.1 (#716) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index d3fd6a23d01..fb202f13972 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [7.2.1](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.0...v7.2.1) (2020-02-20) + + +### Bug Fixes + +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.20 ([#714](https://www.github.com/googleapis/nodejs-logging/issues/714)) ([865b19f](https://www.github.com/googleapis/nodejs-logging/commit/865b19f95af7e541dbe215cdf72bf34df2c6567d)) + ## [7.2.0](https://www.github.com/googleapis/nodejs-logging/compare/v7.1.0...v7.2.0) (2020-02-19) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 69e004490d5..2e3470da4d8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "7.2.0", + "version": "7.2.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 9038167028fb6056c5ee8781b505ad41063196c8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 20 Feb 2020 19:58:48 +0100 Subject: [PATCH 0559/1029] fix(deps): update dependency type-fest to ^0.11.0 (#718) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2e3470da4d8..c80d0192d66 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -65,7 +65,7 @@ "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", - "type-fest": "^0.10.0" + "type-fest": "^0.11.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", From aa6a086783750b3946d3428d386f772949c0c195 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2020 20:55:43 +0000 Subject: [PATCH 0560/1029] chore: release 7.2.2 :robot: I have created a release \*beep\* \*boop\* --- ### [7.2.2](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.1...v7.2.2) (2020-02-20) ### Bug Fixes * **deps:** update dependency type-fest to ^0.11.0 ([#718](https://www.github.com/googleapis/nodejs-logging/issues/718)) ([17decd4](https://www.github.com/googleapis/nodejs-logging/commit/17decd4af5caa96f8508ebdf876277b1efbd5e66)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index fb202f13972..f7a24825ab2 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [7.2.2](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.1...v7.2.2) (2020-02-20) + + +### Bug Fixes + +* **deps:** update dependency type-fest to ^0.11.0 ([#718](https://www.github.com/googleapis/nodejs-logging/issues/718)) ([17decd4](https://www.github.com/googleapis/nodejs-logging/commit/17decd4af5caa96f8508ebdf876277b1efbd5e66)) + ### [7.2.1](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.0...v7.2.1) (2020-02-20) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c80d0192d66..de1130f243f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "7.2.1", + "version": "7.2.2", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From 0ae7b513ed5e44997bed39135d51c01c8b6ea657 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 20 Feb 2020 13:13:18 -0800 Subject: [PATCH 0561/1029] fix(docs): writeLog should be in async function This PR was generated using Autosynth. :rainbow: Commits in this repo since last synth: 8ccd960a5d4d006ef5e371bfcf1e428721ccb898 docs(samples): move awaits into async scope (#693)
Log from Synthtool ``` synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. On branch autosynth nothing to commit, working tree clean HEAD detached at FETCH_HEAD nothing to commit, working tree clean synthtool > Ensuring dependencies. synthtool > Pulling artman image. latest: Pulling from googleapis/artman Digest: sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b Status: Image is up to date for googleapis/artman:latest synthtool > Cloning googleapis. synthtool > Running generator for google/logging/artman_logging.yaml. synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/logging-v2. synthtool > Replaced '../../package.json' in src/v2/config_service_v2_client.js. synthtool > Replaced '../../package.json' in src/v2/logging_service_v2_client.js. synthtool > Replaced '../../package.json' in src/v2/metrics_service_v2_client.js. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .github/PULL_REQUEST_TEMPLATE.md .github/release-please.yml .github/workflows/ci.yaml .jsdoc.js .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/docs.cfg .kokoro/continuous/node10/lint.cfg .kokoro/continuous/node10/samples-test.cfg .kokoro/continuous/node10/system-test.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node12/common.cfg .kokoro/continuous/node12/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/docs.cfg .kokoro/presubmit/node10/lint.cfg .kokoro/presubmit/node10/samples-test.cfg .kokoro/presubmit/node10/system-test.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node12/common.cfg .kokoro/presubmit/node12/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/docs.cfg .kokoro/release/docs.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md codecov.yaml renovate.json samples/README.md synthtool > Replaced 'https:\\/\\/cloud\\.google\\.com[\\s\\*]*http:\\/\\/(.*)[\\s\\*]*\\)' in src/v2/doc/google/protobuf/doc_timestamp.js. synthtool > No replacements made in **/doc/google/protobuf/doc_timestamp.js for pattern toISOString\], maybe replacement is not longer needed? synthtool > Replaced 'Sum\\[i=1\\.\\.n\\]\\(https:\\/\\/cloud\\.google\\.com\\(x_i - mean\\)\\^2\\)' in src/v2/doc/google/api/doc_distribution.js. npm WARN npm npm does not support Node.js v12.15.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > protobufjs@6.8.8 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall > @google-cloud/logging@7.1.0 prepare /tmpfs/src/git/autosynth/working_repo > npm run compile npm WARN npm npm does not support Node.js v12.15.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/logging@7.1.0 compile /tmpfs/src/git/autosynth/working_repo > tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp test/*.js build/test npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 687 packages from 1216 contributors and audited 2438 packages in 18.883s found 0 vulnerabilities npm WARN npm npm does not support Node.js v12.15.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/logging@7.1.0 fix /tmpfs/src/git/autosynth/working_repo > gts fix && eslint --fix '**/*.js' synthtool > Wrote metadata to synth.metadata. ```
--- handwritten/logging/README.md | 9 ++++++--- handwritten/logging/synth.metadata | 22 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 44e5e0038f6..3168e09fc3f 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -79,9 +79,12 @@ async function quickstart( // Prepares a log entry const entry = log.entry(metadata, text); - // Writes the log entry - await log.write(entry); - console.log(`Logged: ${text}`); + async function writeLog() { + // Writes the log entry + await log.write(entry); + console.log(`Logged: ${text}`); + } + writeLog(); } ``` diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 68dd549bda9..b4ffe3e7912 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,6 +1,20 @@ { - "updateTime": "2020-02-11T12:27:57.639724Z", + "updateTime": "2020-02-14T12:26:52.438900Z", "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/nodejs-logging.git", + "sha": "8ccd960a5d4d006ef5e371bfcf1e428721ccb898" + } + }, + { + "git": { + "name": "synthtool", + "remote": "rpc://devrel/cloud/libraries/tools/autosynth", + "sha": "dd7cd93888cbeb1d4c56a1ca814491c7813160e8" + } + }, { "generator": { "name": "artman", @@ -12,9 +26,9 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5006247aa157e59118833658084345ee59af7c09", - "internalRef": "294383128", - "log": "5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\n" + "sha": "5169f46d9f792e2934d9fa25c36d0515b4fd0024", + "internalRef": "295026522", + "log": "5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n0646bc775203077226c2c34d3e4d50cc4ec53660\nRemove unnecessary languages from bigquery-related artman configuration files.\n\nPiperOrigin-RevId: 294809380\n\n8b78aa04382e3d4147112ad6d344666771bb1909\nUpdate backend.proto for schemes and protocol\n\nPiperOrigin-RevId: 294788800\n\n80b8f8b3de2359831295e24e5238641a38d8488f\nAdds artman config files for bigquerystorage endpoints v1beta2, v1alpha2, v1\n\nPiperOrigin-RevId: 294763931\n\n2c17ac33b226194041155bb5340c3f34733f1b3a\nAdd parameter to sample generated for UpdateInstance. Related to https://github.com/googleapis/python-redis/issues/4\n\nPiperOrigin-RevId: 294734008\n\nd5e8a8953f2acdfe96fb15e85eb2f33739623957\nMove bigquery datatransfer to gapic v2.\n\nPiperOrigin-RevId: 294703703\n\nefd36705972cfcd7d00ab4c6dfa1135bafacd4ae\nfix: Add two annotations that we missed.\n\nPiperOrigin-RevId: 294664231\n\n8a36b928873ff9c05b43859b9d4ea14cd205df57\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1beta2).\n\nPiperOrigin-RevId: 294459768\n\nc7a3caa2c40c49f034a3c11079dd90eb24987047\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1).\n\nPiperOrigin-RevId: 294456889\n\n" } }, { From e116fae1455b745336d04b3be2b8642dc2294cb0 Mon Sep 17 00:00:00 2001 From: Andrew Zammit Date: Wed, 26 Feb 2020 09:26:38 -0700 Subject: [PATCH 0562/1029] chore(docs): stackdriver logging limits of 256kb/entry and 10mb/write, force compilation before doc script (#531) (#724) --- handwritten/logging/package.json | 1 + handwritten/logging/src/entry.ts | 5 +++++ handwritten/logging/src/index.ts | 9 +++++++-- handwritten/logging/src/log.ts | 14 ++++++++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index de1130f243f..00f439aaab0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -31,6 +31,7 @@ "scripts": { "test": "c8 mocha --recursive ./build/test", "docs": "jsdoc -c .jsdoc.js", + "predocs": "npm run compile", "presystem-test": "npm run compile", "system-test": "c8 mocha build/system-test --timeout 600000", "samples-test": "cd samples/ && c8 npm test && cd ../", diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index b9f422182f4..764da8bc4d2 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -50,6 +50,11 @@ export interface ToJsonOptions { /** * Create an entry object to define new data to insert into a log. * + * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} + * dictates that the maximum log entry size, including all + * [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, + * cannot exceed _approximately_ 256 KB. + * * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * * @class diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index f2518058071..37b7be29e2b 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -426,10 +426,15 @@ class Logging { /** * Create an entry object. * - * Note that using this method will not itself make any API requests. You will - * use the object returned in other API calls, such as + * Using this method will not itself make any API requests. You will use + * the object returned in other API calls, such as * {@link Log#write}. * + * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} + * dictates that the maximum log entry size, including all + * [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, + * cannot exceed _approximately_ 256 KB. + * * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * * @param {?object|?string} [resource] See a diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index cfa9f8d7c97..01fe1104f5a 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -366,10 +366,15 @@ class Log implements LogSeverityFunctions { /** * Create an entry object for this log. * - * Note that using this method will not itself make any API requests. You will - * use the object returned in other API calls, such as + * Using this method will not itself make any API requests. You will use + * the object returned in other API calls, such as * {@link Log#write}. * + * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} + * dictates that the maximum log entry size, including all + * [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, + * cannot exceed _approximately_ 256 KB. + * * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} * * @param {?object} metadata See a @@ -737,6 +742,11 @@ class Log implements LogSeverityFunctions { /** * Write log entries to Stackdriver Logging. * + * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} + * dictates that the maximum cumulative size of all entries per write, + * including all [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, + * cannot exceed _approximately_ 10 MB. + * * @see [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write} * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. From a1407e33df5f6807b7a9d2f3eb1f471f6088aa1d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2020 14:39:32 -0800 Subject: [PATCH 0563/1029] chore: release 7.2.3 (#720) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index f7a24825ab2..f3a6fb8c564 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [7.2.3](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.2...v7.2.3) (2020-02-26) + + +### Bug Fixes + +* **docs:** writeLog should be in async function ([498a2c3](https://www.github.com/googleapis/nodejs-logging/commit/498a2c3825644b2f6a71ac3e314ba2e3de9fac62)), closes [#693](https://www.github.com/googleapis/nodejs-logging/issues/693) + ### [7.2.2](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.1...v7.2.2) (2020-02-20) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 00f439aaab0..23beeff7444 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "7.2.2", + "version": "7.2.3", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From a623f66f1c2b1654940858a86659600135dd1a56 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 26 Feb 2020 15:46:29 -0800 Subject: [PATCH 0564/1029] feat: export protos in src/index.ts --- handwritten/logging/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 37b7be29e2b..4ae3ccd2fff 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -1361,3 +1361,5 @@ export {Logging}; * Reference to {@link v2.MetricsServiceV2Client} */ module.exports.v2 = v2; +import * as protos from '../protos/protos'; +export {protos}; From 6e5baea499213bd1a88e5a028ffef5c10e45b8d6 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 26 Feb 2020 20:00:15 -0800 Subject: [PATCH 0565/1029] build: add publish.yml enabling GitHub app for publishes --- handwritten/logging/.github/publish.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 handwritten/logging/.github/publish.yml diff --git a/handwritten/logging/.github/publish.yml b/handwritten/logging/.github/publish.yml new file mode 100644 index 00000000000..e69de29bb2d From b0ac102aadfcdb4d516285f859d58084c5db9c37 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 21:38:49 -0800 Subject: [PATCH 0566/1029] chore: update jsdoc.js (#729) --- handwritten/logging/.jsdoc.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 593c4fc7545..f2e188e7add 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -36,11 +36,14 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2018 Google, LLC.', + copyright: 'Copyright 2019 Google, LLC.', includeDate: false, sourceFiles: false, systemName: '@google-cloud/logging', - theme: 'lumen' + theme: 'lumen', + default: { + "outputSourceFiles": false + } }, markdown: { idInHeadings: true From 97a8603d5bc25f040e732379d56aaffe9214431c Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 5 Mar 2020 15:45:20 -0800 Subject: [PATCH 0567/1029] build(test): adds support for build cop, fixes codecov.io (#731) --- handwritten/logging/.kokoro/samples-test.sh | 11 +++++++++ handwritten/logging/.kokoro/system-test.sh | 12 +++++++++ handwritten/logging/.kokoro/test.sh | 11 +++++++++ handwritten/logging/.mocharc.js | 27 +++++++++++++++++++++ handwritten/logging/.mocharc.json | 5 ---- 5 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 handwritten/logging/.mocharc.js delete mode 100644 handwritten/logging/.mocharc.json diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index 20e3241c9e9..86e83c9d3da 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -39,6 +39,17 @@ if [ -f samples/package.json ]; then npm link ../ npm install cd .. + # If tests are running against master, configure Build Cop + # to open issues on failures: + if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then + export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml + export MOCHA_REPORTER=xunit + cleanup() { + chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop + $KOKORO_GFILE_DIR/linux_amd64/buildcop + } + trap cleanup EXIT HUP + fi npm run samples-test fi diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index fc5824e6667..dfae142a231 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -33,6 +33,18 @@ fi npm install +# If tests are running against master, configure Build Cop +# to open issues on failures: +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then + export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml + export MOCHA_REPORTER=xunit + cleanup() { + chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop + $KOKORO_GFILE_DIR/linux_amd64/buildcop + } + trap cleanup EXIT HUP +fi + npm run system-test # codecov combines coverage across integration and unit tests. Include diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 9db11bb09d6..8d9c2954579 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -21,6 +21,17 @@ export NPM_CONFIG_PREFIX=/home/node/.npm-global cd $(dirname $0)/.. npm install +# If tests are running against master, configure Build Cop +# to open issues on failures: +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then + export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml + export MOCHA_REPORTER=xunit + cleanup() { + chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop + $KOKORO_GFILE_DIR/linux_amd64/buildcop + } + trap cleanup EXIT HUP +fi npm test # codecov combines coverage across integration and unit tests. Include diff --git a/handwritten/logging/.mocharc.js b/handwritten/logging/.mocharc.js new file mode 100644 index 00000000000..0791971cf1d --- /dev/null +++ b/handwritten/logging/.mocharc.js @@ -0,0 +1,27 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} diff --git a/handwritten/logging/.mocharc.json b/handwritten/logging/.mocharc.json deleted file mode 100644 index 670c5e2c24b..00000000000 --- a/handwritten/logging/.mocharc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} From 5e7deeb7cb4119f9ecd0bc6f88b850752c858540 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 5 Mar 2020 16:07:45 -0800 Subject: [PATCH 0568/1029] chore: test build cop (#732) --- handwritten/logging/system-test/logging.ts | 9 +++++++++ handwritten/logging/test/log.ts | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 7a8b28d7bea..8601a86576c 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -668,4 +668,13 @@ describe('Logging', async () => { const timeCreated = name.substr(TESTS_PREFIX.length + 1).split(/-|_/g)[0]; return new Date(Number(timeCreated)); } + + it('fails in continuous (system)', () => { + if ( + process.env.KOKORO_BUILD_ARTIFACTS_SUBDIR && + process.env.KOKORO_BUILD_ARTIFACTS_SUBDIR.includes('continuous') + ) { + assert.strictEqual(true, false); + } + }); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 3ccd55f080b..59db3c6ba5b 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -848,4 +848,13 @@ describe('Log', () => { } }); }); + + it('fails in continuous (unit)', () => { + if ( + process.env.KOKORO_BUILD_ARTIFACTS_SUBDIR && + process.env.KOKORO_BUILD_ARTIFACTS_SUBDIR.includes('continuous') + ) { + assert.strictEqual(true, false); + } + }); }); From 6c745d208539b7212b638ed43bcb0e4d71561c1d Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 5 Mar 2020 16:58:51 -0800 Subject: [PATCH 0569/1029] build: mocharc needs to export (#734) --- handwritten/logging/.mocharc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/.mocharc.js b/handwritten/logging/.mocharc.js index 0791971cf1d..ff7b34fa5d1 100644 --- a/handwritten/logging/.mocharc.js +++ b/handwritten/logging/.mocharc.js @@ -25,3 +25,4 @@ if (process.env.MOCHA_REPORTER) { if (process.env.MOCHA_REPORTER_OUTPUT) { config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; } +module.exports = config From b38976755c07b12ec3b1aea89656070db15843d1 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 5 Mar 2020 17:26:41 -0800 Subject: [PATCH 0570/1029] test: remove fake failing tests used to test build-cop (#738) --- handwritten/logging/system-test/logging.ts | 9 --------- handwritten/logging/test/log.ts | 9 --------- 2 files changed, 18 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 8601a86576c..7a8b28d7bea 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -668,13 +668,4 @@ describe('Logging', async () => { const timeCreated = name.substr(TESTS_PREFIX.length + 1).split(/-|_/g)[0]; return new Date(Number(timeCreated)); } - - it('fails in continuous (system)', () => { - if ( - process.env.KOKORO_BUILD_ARTIFACTS_SUBDIR && - process.env.KOKORO_BUILD_ARTIFACTS_SUBDIR.includes('continuous') - ) { - assert.strictEqual(true, false); - } - }); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 59db3c6ba5b..3ccd55f080b 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -848,13 +848,4 @@ describe('Log', () => { } }); }); - - it('fails in continuous (unit)', () => { - if ( - process.env.KOKORO_BUILD_ARTIFACTS_SUBDIR && - process.env.KOKORO_BUILD_ARTIFACTS_SUBDIR.includes('continuous') - ) { - assert.strictEqual(true, false); - } - }); }); From a1ce16d6b92d64d9eb733bc35bc6f594d3ab3c32 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 9 Mar 2020 14:06:03 -0700 Subject: [PATCH 0571/1029] build: update linkinator config (#733) --- handwritten/logging/linkinator.config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/linkinator.config.json b/handwritten/logging/linkinator.config.json index 95a8ebb281b..96e52dca3c7 100644 --- a/handwritten/logging/linkinator.config.json +++ b/handwritten/logging/linkinator.config.json @@ -5,5 +5,7 @@ "www.googleapis.com", "https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js", "img.shields.io" - ] + ], + "silent": true, + "concurrency": 10 } From 4c53ff8a0b5365dc00a1f459a1e6d5b943057e87 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 Mar 2020 22:29:53 +0100 Subject: [PATCH 0572/1029] fix(deps): update dependency type-fest to ^0.12.0 (#741) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 23beeff7444..b5396c81b3f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -66,7 +66,7 @@ "snakecase-keys": "^3.0.0", "stream-events": "^1.0.4", "through2": "^3.0.0", - "type-fest": "^0.11.0" + "type-fest": "^0.12.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.0.0", From 5180251a9a215250d10ad72949c4c56b72acbb9d Mon Sep 17 00:00:00 2001 From: Andrew Zammit Date: Mon, 9 Mar 2020 23:09:07 -0700 Subject: [PATCH 0573/1029] chore(test): ensure writeLogEntries is actually called on log write. (#721) --- handwritten/logging/src/log.ts | 2 + handwritten/logging/test/log.ts | 859 +++++++++++++------------------- 2 files changed, 342 insertions(+), 519 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 01fe1104f5a..675a6837a98 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -867,6 +867,7 @@ class Log implements LogSeverityFunctions { } } + // TODO proper signature of `private decorateEntries` (sans underscore suffix) /** * All entries are passed through here in order to get them serialized. * @@ -887,6 +888,7 @@ class Log implements LogSeverityFunctions { }); } + // TODO consider refactoring `truncateEntries` so that it does not mutate /** * Truncate log entries at maxEntrySize, so that error is not thrown, see: * https://cloud.google.com/logging/quotas diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 3ccd55f080b..a5a3a24819f 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -12,38 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; import {describe, it} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; -import {Log as LOG, WriteOptions, GetEntriesRequest} from '../src/log'; -import {Logging} from '../src/index'; - -const noop = () => {}; - -let callbackified = false; -const fakeCallbackify = extend({}, callbackify, { - callbackifyAll(c: Function, options: callbackify.CallbackifyAllOptions) { - if (c.name !== 'Log') { - return; - } - callbackified = true; - assert.deepStrictEqual(options.exclude, ['entry', 'getEntriesStream']); - }, -}); - -import {Entry} from '../src'; -import {EntryJson, LogEntry} from '../src/entry'; -import {LogOptions} from '../src/log'; - -const originalGetDefaultResource = async () => { - return 'very-fake-resource'; -}; - -const fakeMetadata = { - getDefaultResource: originalGetDefaultResource, -}; +import * as sinon from 'sinon'; +import {Entry, Logging} from '../src'; +import {Log as LOG, LogOptions, WriteOptions} from '../src/log'; +import {Data, EntryJson, LogEntry} from '../src/entry'; describe('Log', () => { // tslint:disable-next-line variable-name @@ -52,6 +28,7 @@ describe('Log', () => { let log: any; const PROJECT_ID = 'project-id'; + const FAKE_RESOURCE = 'fake-resource'; const LOG_NAME = 'escaping/required/for/this/log-name'; const LOG_NAME_ENCODED = encodeURIComponent(LOG_NAME); const LOG_NAME_FORMATTED = [ @@ -63,35 +40,54 @@ describe('Log', () => { let LOGGING: Logging; - let assignSeverityToEntriesOverride: Function | null = null; + const callbackifyFake = { + callbackifyAll: sinon.stub(), + }; + + const metadataFake = { + getDefaultResource: sinon.stub(), + }; before(() => { Log = proxyquire('../src/log', { - '@google-cloud/promisify': fakeCallbackify, + '@google-cloud/promisify': callbackifyFake, './entry': {Entry}, - './metadata': fakeMetadata, + './metadata': metadataFake, }).Log; - const assignSeverityToEntries_ = Log.assignSeverityToEntries_; - Log.assignSeverityToEntries_ = (...args) => - (assignSeverityToEntriesOverride || assignSeverityToEntries_).apply( - null, - args - ); + + log = createLogger(); }); beforeEach(() => { - log = createLogger(); + metadataFake.getDefaultResource.reset(); + log.logging.entry.reset(); + log.logging.getEntries.reset(); + log.logging.getEntriesStream.reset(); + log.logging.request.reset(); + log.logging.loggingService.deleteLog.reset(); + log.logging.loggingService.writeLogEntries.reset(); + log.logging.auth.getEnv.reset(); + log.logging.auth.getProjectId.reset(); + + metadataFake.getDefaultResource.returns(FAKE_RESOURCE); + log.logging.auth.getProjectId.resolves(PROJECT_ID); }); function createLogger(maxEntrySize?: number) { - assignSeverityToEntriesOverride = null; - LOGGING = ({ projectId: '{{project-id}}', - entry: noop, - request: noop, - loggingService: noop, - auth: noop, + entry: sinon.stub(), + getEntries: sinon.stub(), + getEntriesStream: sinon.stub(), + request: sinon.stub(), + loggingService: { + deleteLog: sinon.stub(), + writeLogEntries: sinon.stub(), + }, + auth: { + getEnv: sinon.stub(), + getProjectId: sinon.stub(), + }, } as {}) as Logging; const options: LogOptions = {}; @@ -104,7 +100,12 @@ describe('Log', () => { describe('instantiation', () => { it('should callbackify all the things', () => { - assert(callbackified); + assert( + callbackifyFake.callbackifyAll.calledWithExactly( + Log, + sinon.match({exclude: ['entry', 'getEntriesStream']}) + ) + ); }); it('should localize the escaped name', () => { @@ -142,6 +143,10 @@ describe('Log', () => { it('should localize the name', () => { assert.strictEqual(log.name, LOG_NAME_FORMATTED.split('/').pop()); }); + + it('should default to no max entry size', () => { + assert.strictEqual(log.maxEntrySize, undefined); + }); }); describe('assignSeverityToEntries_', () => { @@ -205,36 +210,23 @@ describe('Log', () => { }); describe('delete', () => { - beforeEach(() => { - log.logging.auth.getProjectId = async () => PROJECT_ID; - }); - it('should execute gax method', async () => { - log.logging.loggingService.deleteLog = async ( - reqOpts: {}, - gaxOpts: {} - ) => { - assert.deepStrictEqual(reqOpts, { - logName: log.formattedName_, - }); - - assert.strictEqual(gaxOpts, undefined); - }; - await log.delete(); + assert( + log.logging.loggingService.deleteLog.calledWithExactly( + { + logName: log.formattedName_, + }, + undefined + ) + ); }); it('should accept gaxOptions', async () => { - const gaxOptions = {}; - - log.logging.loggingService.deleteLog = async ( - reqOpts: {}, - gaxOpts: {} - ) => { - assert.strictEqual(gaxOpts, gaxOptions); - }; - - await log.delete(gaxOptions); + await log.delete({}); + assert( + log.logging.loggingService.deleteLog.calledWith(sinon.match.any, {}) + ); }); }); @@ -244,43 +236,29 @@ describe('Log', () => { val: true, } as LogEntry; const data = {}; - const entryObject = {}; - - log.logging.entry = (metadata_: {}, data_: {}) => { - assert.deepStrictEqual(metadata_, metadata); - assert.strictEqual(data_, data); - return entryObject; - }; + log.logging.entry.returns(entryObject); const entry = log.entry(metadata, data); assert.strictEqual(entry, entryObject); + assert(log.logging.entry.calledWithExactly(metadata, data)); }); - it('should assume one argument means data', done => { + it('should assume one argument means data', () => { const data = {}; - log.logging.entry = (metadata: {}, data_: {}) => { - assert.strictEqual(data_, data); - done(); - }; log.entry(data); + assert(log.logging.entry.calledWith(sinon.match.any, data)); }); }); describe('getEntries', () => { - beforeEach(() => { - log.logging.auth.getProjectId = async () => PROJECT_ID; - }); - - const EXPECTED_OPTIONS = { - filter: 'logName="' + LOG_NAME_FORMATTED + '"', - }; - it('should call Logging getEntries with defaults', async () => { - log.logging.getEntries = (options: GetEntriesRequest) => { - assert.deepStrictEqual(options, EXPECTED_OPTIONS); - }; await log.getEntries(); + assert( + log.logging.getEntries.calledWithExactly({ + filter: `logName="${LOG_NAME_FORMATTED}"`, + }) + ); }); it('should add logName filter to user provided filter', async () => { @@ -288,66 +266,76 @@ describe('Log', () => { custom: true, filter: 'custom filter', }; - log.logging.projectId = await log.logging.auth.getProjectId(); - log.formattedName_ = Log.formatName_(log.logging.projectId, log.name); - const expectedOptions = extend({}, options); - expectedOptions.filter = `(${options.filter}) AND logName="${log.formattedName_}"`; - - log.logging.getEntries = (options_: {}) => { - assert.notDeepStrictEqual(options_, options); - assert.deepStrictEqual(options_, expectedOptions); - }; + expectedOptions.filter = `(${options.filter}) AND logName="${LOG_NAME_FORMATTED}"`; await log.getEntries(options); + assert(log.logging.getEntries.calledWithExactly(expectedOptions)); }); }); describe('getEntriesStream', () => { - const fakeStream = {}; - const EXPECTED_OPTIONS = { - log: LOG_NAME_ENCODED, - }; - - it('should call Logging getEntriesStream with defaults', done => { - log.logging.getEntriesStream = (options: {}) => { - assert.deepStrictEqual(options, EXPECTED_OPTIONS); - setImmediate(done); - return fakeStream; - }; + const FAKE_STREAM = {}; + + beforeEach(() => { + log.logging.getEntriesStream.returns(FAKE_STREAM); + }); + it('should call Logging getEntriesStream with defaults', () => { const stream = log.getEntriesStream(); - assert.strictEqual(stream, fakeStream); + assert.strictEqual(stream, FAKE_STREAM); + assert( + log.logging.getEntriesStream.calledWithExactly({ + log: LOG_NAME_ENCODED, + }) + ); }); - it('should allow overriding the options', done => { + it('should allow overriding the options', () => { const options = { custom: true, filter: 'custom filter', }; - log.logging.getEntriesStream = (options_: {}) => { - assert.deepStrictEqual(options_, extend({}, EXPECTED_OPTIONS, options)); - setImmediate(done); - return fakeStream; - }; - const stream = log.getEntriesStream(options); - assert.strictEqual(stream, fakeStream); + assert.strictEqual(stream, FAKE_STREAM); + assert( + log.logging.getEntriesStream.calledWithExactly( + extend( + {}, + { + log: LOG_NAME_ENCODED, + }, + options + ) + ) + ); }); }); describe('write', () => { - const ENTRY = {} as Entry; - const OPTIONS = {}; - const FAKE_RESOURCE = 'fake-resource'; + let ENTRY: Entry; + let ENTRIES: Entry[]; + let OPTIONS: WriteOptions; + let truncateEntriesStub: sinon.SinonStub; + let decorateEntriesStub: sinon.SinonStub; + let origDetectedResource: string; + + before(() => { + origDetectedResource = log.logging.detectedResource; + }); beforeEach(() => { - log.decorateEntries_ = (entries: Entry[]) => entries; - fakeMetadata.getDefaultResource = async () => { - return FAKE_RESOURCE; - }; - log.logging.auth.getProjectId = async () => PROJECT_ID; + ENTRY = {} as Entry; + ENTRIES = [ENTRY] as Entry[]; + OPTIONS = {} as WriteOptions; + decorateEntriesStub = sinon.stub(log, 'decorateEntries_').returnsArg(0); + truncateEntriesStub = sinon.stub(log, 'truncateEntries').returnsArg(0); + }); + afterEach(() => { + decorateEntriesStub.restore(); + truncateEntriesStub.restore(); + log.logging.detectedResource = origDetectedResource; }); it('should forward options.resource to request', async () => { @@ -356,46 +344,43 @@ describe('Log', () => { resource: CUSTOM_RESOURCE, }) as WriteOptions; - log.logging.loggingService.writeLogEntries = ( - reqOpts: {}, - gaxOpts: {} - ) => { - assert.deepStrictEqual(reqOpts, { - logName: log.formattedName_, - entries: [ENTRY], - resource: CUSTOM_RESOURCE, - }); - - assert.strictEqual(gaxOpts, undefined); - }; - - await log.write(ENTRY, optionsWithResource); + await log.write(ENTRIES, optionsWithResource); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWithExactly( + { + logName: log.formattedName_, + entries: ENTRIES, + resource: CUSTOM_RESOURCE, + }, + undefined + ) + ); }); it('should cache a detected resource', async () => { const fakeResource = 'test-level-fake-resource'; - fakeMetadata.getDefaultResource = async () => { - return fakeResource; - }; - log.logging.loggingService.writeLogEntries = () => { - assert.strictEqual(log.logging.detectedResource, fakeResource); - }; - await log.write(ENTRY); + metadataFake.getDefaultResource.resetBehavior(); + metadataFake.getDefaultResource.resolves(fakeResource); + + await log.write(ENTRIES); + assert(log.logging.loggingService.writeLogEntries.calledOnce); + assert.strictEqual(log.logging.detectedResource, fakeResource); }); it('should re-use detected resource', async () => { - log.logging.detectedResource = 'environment-default-resource'; - fakeMetadata.getDefaultResource = () => { - throw new Error('Cached resource was not used.'); - }; - // tslint:disable-next-line no-any - log.logging.loggingService.writeLogEntries = ( - // tslint:disable-next-line no-any - reqOpts: any - ) => { - assert.strictEqual(reqOpts.resource, log.logging.detectedResource); - }; - await log.write(ENTRY); + const reusableDetectedResource = 'environment-default-resource'; + log.logging.detectedResource = reusableDetectedResource; + metadataFake.getDefaultResource.resetBehavior(); + metadataFake.getDefaultResource.throws('Cached resource was not used.'); + + await log.write(ENTRIES); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWith( + sinon.match({ + resource: reusableDetectedResource, + }) + ) + ); }); it('should transform camelcase label keys to snake case', async () => { @@ -413,439 +398,275 @@ describe('Log', () => { resource: CUSTOM_RESOURCE, }); - log.logging.loggingService.writeLogEntries = ( - reqOpts: {}, - gaxOpts: {} - ) => { - assert.deepStrictEqual(reqOpts, { - logName: log.formattedName_, - entries: [ENTRY], - resource: EXPECTED_RESOURCE, - }); - - assert.strictEqual(gaxOpts, undefined); - }; - - await log.write(ENTRY, optionsWithResource); + await log.write(ENTRIES, optionsWithResource); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWithExactly( + { + logName: log.formattedName_, + entries: ENTRIES, + resource: EXPECTED_RESOURCE, + }, + undefined + ) + ); }); it('should call gax method', async () => { - log.logging.loggingService.writeLogEntries = ( - reqOpts: {}, - gaxOpts: {} - ) => { - assert.deepStrictEqual(reqOpts, { - logName: log.formattedName_, - entries: [ENTRY], - resource: FAKE_RESOURCE, - }); - - assert.strictEqual(gaxOpts, undefined); - }; - - await log.write(ENTRY, OPTIONS); + await log.write(ENTRIES, OPTIONS); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWithExactly( + { + logName: log.formattedName_, + entries: ENTRIES, + resource: FAKE_RESOURCE, + }, + undefined + ) + ); }); - it('should arrify & decorate the entries', async () => { - const decoratedEntries = [] as Entry[]; + it('should decorate the entries', async () => { + decorateEntriesStub.resetBehavior(); + decorateEntriesStub.returns('decorated entries'); - log.decorateEntries_ = (entries: Entry[]) => { - assert.strictEqual(entries[0], ENTRY); - return decoratedEntries; - }; + await log.write(ENTRIES, OPTIONS); + assert(decorateEntriesStub.calledOnceWithExactly(ENTRIES)); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWith( + sinon.match({ + entries: 'decorated entries', + }) + ) + ); + }); - // tslint:disable-next-line no-any - log.logging.loggingService.writeLogEntries = ( - // tslint:disable-next-line no-any - reqOpts: any, - gaxOpts: {} - ) => { - assert.strictEqual(reqOpts.entries, decoratedEntries); - }; + it('should arrify the entries', async () => { + const arrifiedEntries: Entry[] = [ENTRY]; await log.write(ENTRY, OPTIONS); + assert(decorateEntriesStub.calledOnceWithExactly(arrifiedEntries)); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWith( + sinon.match({ + entries: arrifiedEntries, + }) + ) + ); }); - it('should not require options', async () => { - log.logging.loggingService.writeLogEntries = ( - reqOpts: {}, - gaxOpts: {} - ) => {}; + it('should truncate the entries after decorating', async () => { + await log.write(ENTRIES, OPTIONS); + assert(truncateEntriesStub.calledAfter(decorateEntriesStub)); + assert(truncateEntriesStub.calledOnceWithExactly(ENTRIES)); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWith( + sinon.match({ + entries: ENTRIES, + }) + ) + ); + }); + it('should not require options', async () => { await log.write(ENTRY); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWithExactly( + sinon.match.object, + undefined + ) + ); }); it('should pass through additional options', async () => { - log.logging.loggingService.writeLogEntries = ( - reqOpts: WriteOptions, - gaxOpts: {} - ) => { - assert.strictEqual(reqOpts.dryRun, true); - assert.strictEqual(reqOpts.partialSuccess, false); - }; - await log.write(ENTRY, {dryRun: true, partialSuccess: false}); - }); - - it('should not truncate entries by default', async () => { - const logger = createLogger(); - const entry = new Entry({}, 'hello world'.padEnd(300000, '.')); - // tslint:disable-next-line no-any - logger.logging.loggingService.writeLogEntries = ( - // tslint:disable-next-line no-any - reqOpts: any, - _gaxOpts: {} - ) => { - assert.strictEqual(reqOpts.entries[0].textPayload.length, 300000); - }; - - await logger.write(entry); - }); - - it('should truncate string entry if maxEntrySize hit', async () => { - const truncatingLogger = createLogger(200); - const entry = new Entry({}, 'hello world'.padEnd(2000, '.')); - - truncatingLogger.logging.loggingService.writeLogEntries = ( - // tslint:disable-next-line no-any - reqOpts: any, - _gaxOpts: {} - ) => { - const text = reqOpts.entries[0].textPayload; - assert.ok(text.startsWith('hello world')); - assert.ok(text.length < 300); - }; - - await truncatingLogger.write(entry); - }); - - it('should truncate message field, on object entry, if maxEntrySize hit', async () => { - const truncatingLogger = createLogger(200); - const entry = new Entry( - {}, - { - message: 'hello world'.padEnd(2000, '.'), - } - ); - - truncatingLogger.logging.loggingService.writeLogEntries = ( - // tslint:disable-next-line no-any - reqOpts: any, - _gaxOpts: {} - ) => { - const text = reqOpts.entries[0].jsonPayload.fields.message.stringValue; - assert.ok(text.startsWith('hello world')); - assert.ok(text.length < 300); - }; - - await truncatingLogger.write(entry); - }); - - it('should truncate stack trace', async () => { - const truncatingLogger = createLogger(300); - const entry = new Entry( - {}, - { - message: 'hello world'.padEnd(2000, '.'), - metadata: { - stack: 'hello world'.padEnd(2000, '.'), - }, - } + assert( + log.logging.loggingService.writeLogEntries.calledOnceWith( + sinon.match({ + dryRun: true, + partialSuccess: false, + }) + ) ); - - truncatingLogger.logging.loggingService.writeLogEntries = ( - // tslint:disable-next-line no-any - reqOpts: any, - _gaxOpts: {} - ) => { - const message = - reqOpts.entries[0].jsonPayload.fields.message.stringValue; - const stack = reqOpts.entries[0].jsonPayload.fields.metadata - .structValue!.fields!.stack.stringValue; - assert.strictEqual(stack, ''); - assert.ok(message.startsWith('hello world')); - assert.ok(message.length < 400); - }; - - await truncatingLogger.write(entry); }); }); - describe('severity shortcuts', () => { - const ENTRY = {} as Entry; - const LABELS = [] as WriteOptions; + describe('truncateEntries', () => { + const entryMetaMaxLength = 100; - beforeEach(() => { - log.write = noop; - }); - - describe('alert', () => { - it('should format the entries', async () => { - assignSeverityToEntriesOverride = ( - entries: Entry[], - severity: string - ) => { - assert.strictEqual(entries, ENTRY); - assert.strictEqual(severity, 'ALERT'); - }; - await log.alert(ENTRY, LABELS); - }); - - it('should pass correct arguments to write', async () => { - const assignedEntries = [] as Entry[]; - assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry: Entry, labels: WriteOptions) => { - assert.strictEqual(entry, assignedEntries); - assert.strictEqual(labels, LABELS); - }; - await log.alert(ENTRY, LABELS); - }); - }); - - describe('critical', () => { - it('should format the entries', async () => { - assignSeverityToEntriesOverride = ( - entries: Entry[], - severity: string - ) => { - assert.strictEqual(entries, ENTRY); - assert.strictEqual(severity, 'CRITICAL'); - }; + function entriesFactory(message: Data): EntryJson[] { + return [new Entry({}, message).toJSON()]; + } - await log.critical(ENTRY, LABELS); - }); + it('should not truncate entries by default', () => { + const longEntry = 'hello world'.padEnd(3e5, '.'); + const entries = entriesFactory(longEntry); - it('should pass correct arguments to write', async () => { - const assignedEntries = [] as Entry[]; - assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry: Entry, labels: WriteOptions) => { - assert.strictEqual(entry, assignedEntries); - assert.strictEqual(labels, LABELS); - }; - await log.critical(ENTRY, LABELS); - }); + log.truncateEntries(entries); + const text = entries[0].textPayload; + assert.ok(text, longEntry); }); - describe('debug', () => { - it('should format the entries', async () => { - assignSeverityToEntriesOverride = ( - entries: Entry[], - severity: string - ) => { - assert.strictEqual(entries, ENTRY); - assert.strictEqual(severity, 'DEBUG'); - }; + it('should truncate string entry if maxEntrySize hit', () => { + const maxSize = 2e2; + const longEntry = 'hello world'.padEnd(maxSize * 10, '.'); + const entries = entriesFactory(longEntry); - await log.debug(ENTRY, LABELS); - }); + log.maxEntrySize = maxSize; + log.truncateEntries(entries); - it('should pass correct arguments to write', async () => { - const assignedEntries = [] as Entry[]; - assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry: Entry, labels: WriteOptions) => { - assert.strictEqual(entry, assignedEntries); - assert.strictEqual(labels, LABELS); - }; - await log.debug(ENTRY, LABELS); - }); + const text: string = entries[0].textPayload!; + assert.ok(text.startsWith('hello world')); + assert.ok(text.length < maxSize + entryMetaMaxLength); }); - describe('emergency', () => { - it('should format the entries', async () => { - assignSeverityToEntriesOverride = ( - entries: Entry[], - severity: string - ) => { - assert.strictEqual(entries, ENTRY); - assert.strictEqual(severity, 'EMERGENCY'); - }; + it('should not truncate string entry if less than maxEntrySize', () => { + const maxSize = 2e3; // something greater than message length and entry overhead + const shortEntry = 'hello world'; + const entries = entriesFactory(shortEntry); - await log.emergency(ENTRY, LABELS); - }); + log.maxEntrySize = maxSize; + log.truncateEntries(entries); - it('should pass correct arguments to write', async () => { - const assignedEntries = [] as Entry[]; - assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry: Entry, labels: WriteOptions) => { - assert.strictEqual(entry, assignedEntries); - assert.strictEqual(labels, LABELS); - }; - await log.emergency(ENTRY, LABELS); - }); + const text: string = entries[0].textPayload!; + assert.strictEqual(text, shortEntry); }); - describe('error', () => { - it('should format the entries', async () => { - assignSeverityToEntriesOverride = ( - entries: Entry[], - severity: string - ) => { - assert.strictEqual(entries, ENTRY); - assert.strictEqual(severity, 'ERROR'); - }; - await log.error(ENTRY, LABELS); - }); - - it('should pass correct arguments to write', async () => { - const assignedEntries = [] as Entry[]; - - assignSeverityToEntriesOverride = () => { - return assignedEntries; - }; + it('should truncate message field, on object entry, if maxEntrySize hit', () => { + const maxSize = 2e2; + const longEntry = 'hello world'.padEnd(maxSize * 10, '.'); + const entries = entriesFactory({message: longEntry}); - log.write = async (entry: Entry, labels: WriteOptions) => { - assert.strictEqual(entry, assignedEntries); - assert.strictEqual(labels, LABELS); - }; + log.maxEntrySize = maxSize; + log.truncateEntries(entries); - await log.error(ENTRY, LABELS); - }); + const text: string = entries[0].jsonPayload!.fields!.message.stringValue!; + assert.ok(text.startsWith('hello world')); + assert.ok(text.length < maxSize + entryMetaMaxLength); }); - describe('info', () => { - it('should format the entries', async () => { - assignSeverityToEntriesOverride = ( - entries: Entry[], - severity: string - ) => { - assert.strictEqual(entries, ENTRY); - assert.strictEqual(severity, 'INFO'); - }; - - await log.info(ENTRY, LABELS); + it('should truncate stack trace', async () => { + const maxSize = 300; + const entries = entriesFactory({ + message: 'hello world'.padEnd(2000, '.'), + metadata: { + stack: 'hello world'.padEnd(2000, '.'), + }, }); - it('should pass correct arguments to write', async () => { - const assignedEntries = [] as Entry[]; - - assignSeverityToEntriesOverride = () => { - return assignedEntries; - }; + log.maxEntrySize = maxSize; + log.truncateEntries(entries); - log.write = async (entry: Entry, labels: WriteOptions) => { - assert.strictEqual(entry, assignedEntries); - assert.strictEqual(labels, LABELS); - }; - - await log.info(ENTRY, LABELS); - }); + const message: string = entries[0].jsonPayload!.fields!.message + .stringValue!; + const stack: string = entries[0].jsonPayload!.fields!.metadata + .structValue!.fields!.stack.stringValue!; + assert.strictEqual(stack, ''); + assert.ok(message.startsWith('hello world')); + assert.ok(message.length < maxSize + entryMetaMaxLength); }); + }); - describe('notice', () => { - it('should format the entries', async () => { - assignSeverityToEntriesOverride = ( - entries: Entry[], - severity: string - ) => { - assert.strictEqual(entries, ENTRY); - assert.strictEqual(severity, 'NOTICE'); - }; - - await log.notice(ENTRY, LABELS); - }); - - it('should pass correct arguments to write', async () => { - const assignedEntries = [] as Entry[]; - - assignSeverityToEntriesOverride = () => { - return assignedEntries; - }; - - log.write = async (entry: Entry, labels: WriteOptions) => { - assert.strictEqual(entry, assignedEntries); - assert.strictEqual(labels, LABELS); - }; - - await log.notice(ENTRY, LABELS); - }); - }); + describe('severity shortcuts', () => { + let ENTRY: Entry; + let LABELS: WriteOptions; + let assignSeverityStub: sinon.SinonStub; + let writeStub: sinon.SinonStub; - describe('warning', () => { - it('should format the entries', async () => { - assignSeverityToEntriesOverride = ( - entries: Entry[], - severity: string - ) => { - assert.strictEqual(entries, ENTRY); - assert.strictEqual(severity, 'WARNING'); - }; + beforeEach(() => { + ENTRY = {} as Entry; + LABELS = [] as WriteOptions; + assignSeverityStub = sinon.stub(Log, 'assignSeverityToEntries_'); + writeStub = sinon.stub(log, 'write'); + }); + + afterEach(() => { + assignSeverityStub.restore(); + writeStub.restore(); + }); + + [ + 'alert', + 'critical', + 'debug', + 'emergency', + 'error', + 'info', + 'notice', + 'warning', + ].forEach(severityMethodName => { + describe(severityMethodName, () => { + let severityMethod: Function; + + beforeEach(() => { + severityMethod = log[severityMethodName].bind(log); + }); - await log.warning(ENTRY, LABELS); - }); + it('should format the entries', async () => { + const severity = severityMethodName.toUpperCase(); + await severityMethod(ENTRY, LABELS); + assert(assignSeverityStub.calledOnceWith(ENTRY, severity)); + }); - it('should pass correct arguments to write', async () => { - const assignedEntries = [] as Entry[]; - assignSeverityToEntriesOverride = () => assignedEntries; - log.write = async (entry: Entry, labels: WriteOptions) => { - assert.strictEqual(entry, assignedEntries); - assert.strictEqual(labels, LABELS); - }; - await log.warning(ENTRY, LABELS); + it('should pass correct arguments to write', async () => { + const assignedEntries = [] as Entry[]; + assignSeverityStub.returns(assignedEntries); + await severityMethod(ENTRY, LABELS); + assert(writeStub.calledOnceWith(assignedEntries)); + }); }); }); }); describe('decorateEntries_', () => { - const toJSONResponse = {}; - - class FakeEntry { - toJSON() { - return toJSONResponse; - } - } + // tslint:disable-next-line no-any + let toJSONResponse: any; + let logEntryStub: sinon.SinonStub; + let toJSONStub: sinon.SinonStub; beforeEach(() => { - log.entry = () => new FakeEntry() as Entry; + toJSONResponse = {}; + toJSONStub = sinon.stub().returns(toJSONResponse); + logEntryStub = sinon.stub(log, 'entry').returns({ + toJSON: toJSONStub, + }); + }); + + afterEach(() => { + logEntryStub.restore(); }); it('should create an Entry object if one is not provided', () => { const entry = {}; - - log.entry = (entry_: Entry) => { - assert.strictEqual(entry_, entry); - return new FakeEntry() as Entry; - }; - const decoratedEntries = log.decorateEntries_([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); + assert(log.entry.calledWithExactly(entry)); }); it('should get JSON format from Entry object', () => { - log.entry = () => { - throw new Error('should not be called'); - }; const entry = new Entry(); entry.toJSON = () => (toJSONResponse as {}) as EntryJson; const decoratedEntries = log.decorateEntries_([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); + assert(log.entry.notCalled); }); - it('should pass log.removeCircular to toJSON', done => { + it('should pass log.removeCircular to toJSON', () => { log.removeCircular_ = true; - const entry = new Entry(); - entry.toJSON = options_ => { - assert.deepStrictEqual(options_, {removeCircular: true}); - setImmediate(done); - return {} as EntryJson; - }; + const localJSONStub = sinon + .stub(entry, 'toJSON') + .returns({} as EntryJson); log.decorateEntries_([entry]); + assert(localJSONStub.calledWithExactly({removeCircular: true})); }); it('should throw error from serialization', () => { - const error = new Error('Error.'); - const entry = new Entry(); - entry.toJSON = () => { - throw error; - }; - - try { + sinon.stub(entry, 'toJSON').throws('Error.'); + assert.throws(() => { log.decorateEntries_([entry]); - } catch (err) { - assert.strictEqual(err, error); - } + }, 'Error.'); }); }); }); From b30b80096660d941445ef74f1a08fc5ddfa6a066 Mon Sep 17 00:00:00 2001 From: Lalji Kanjareeya <46327204+laljikanjareeya@users.noreply.github.com> Date: Wed, 11 Mar 2020 14:50:03 +0530 Subject: [PATCH 0574/1029] fix(docs): documentation for overloaded methods (#725) Fixes #723 --- handwritten/logging/src/index.ts | 31 +++---- handwritten/logging/src/log.ts | 148 +++++++++++++++---------------- handwritten/logging/src/sink.ts | 24 ++--- 3 files changed, 102 insertions(+), 101 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 4ae3ccd2fff..2a6654908c4 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -300,6 +300,13 @@ class Logging { this.configService = new v2.ConfigServiceV2Client(this.options); this.loggingService = new v2.LoggingServiceV2Client(this.options); } + + createSink(name: string, config: CreateSinkRequest): Promise<[Sink, LogSink]>; + createSink( + name: string, + config: CreateSinkRequest, + callback: CreateSinkCallback + ): void; /** * Config to set for the sink. Not all available options are listed here, see * the [Sink @@ -381,12 +388,6 @@ class Logging { * region_tag:logging_create_sink * Another example: */ - createSink(name: string, config: CreateSinkRequest): Promise<[Sink, LogSink]>; - createSink( - name: string, - config: CreateSinkRequest, - callback: CreateSinkCallback - ): void; async createSink( name: string, config: CreateSinkRequest @@ -478,6 +479,9 @@ class Logging { return new Entry(resource, data); } + getEntries(options?: GetEntriesRequest): Promise; + getEntries(callback: GetEntriesCallback): void; + getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; /** * Query object for listing entries. * @@ -561,9 +565,6 @@ class Logging { * region_tag:logging_list_log_entries_advanced * Another example: */ - getEntries(options?: GetEntriesRequest): Promise; - getEntries(callback: GetEntriesCallback): void; - getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; async getEntries( opts?: GetEntriesRequest | GetEntriesCallback ): Promise { @@ -706,6 +707,9 @@ class Logging { return userStream; } + getLogs(options?: GetLogsRequest): Promise; + getLogs(callback: GetLogsCallback): void; + getLogs(options: GetLogsRequest, callback: GetLogsCallback): void; /** * Query object for listing entries. * @@ -775,9 +779,6 @@ class Logging { * region_tag:logging_list_logs * Another example: */ - getLogs(options?: GetLogsRequest): Promise; - getLogs(callback: GetLogsCallback): void; - getLogs(options: GetLogsRequest, callback: GetLogsCallback): void; async getLogs( opts?: GetLogsRequest | GetLogsCallback ): Promise { @@ -886,6 +887,9 @@ class Logging { return userStream; } + getSinks(options?: GetSinksRequest): Promise; + getSinks(callback: GetSinksCallback): void; + getSinks(options: GetSinksRequest, callback: GetSinksCallback): void; /** * Query object for listing sinks. * @@ -940,9 +944,6 @@ class Logging { * region_tag:logging_list_sinks * Another example: */ - getSinks(options?: GetSinksRequest): Promise; - getSinks(callback: GetSinksCallback): void; - getSinks(options: GetSinksRequest, callback: GetSinksCallback): void; async getSinks( opts?: GetSinksRequest | GetSinksCallback ): Promise { diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 675a6837a98..f6271e3539f 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -123,6 +123,13 @@ class Log implements LogSeverityFunctions { this.name = this.formattedName_.split('/').pop()!; } + alert(entry: Entry | Entry[], options?: WriteOptions): Promise; + alert( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + alert(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "ALERT". * @@ -151,13 +158,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - alert(entry: Entry | Entry[], options?: WriteOptions): Promise; - alert( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - alert(entry: Entry | Entry[], callback: ApiResponseCallback): void; alert( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -168,6 +168,16 @@ class Log implements LogSeverityFunctions { ); } + critical( + entry: Entry | Entry[], + options?: WriteOptions + ): Promise; + critical( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + critical(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "CRITICAL". * @@ -196,16 +206,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - critical( - entry: Entry | Entry[], - options?: WriteOptions - ): Promise; - critical( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - critical(entry: Entry | Entry[], callback: ApiResponseCallback): void; critical( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -216,6 +216,13 @@ class Log implements LogSeverityFunctions { ); } + debug(entry: Entry | Entry[], options?: WriteOptions): Promise; + debug( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + debug(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "DEBUG". * @@ -244,13 +251,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - debug(entry: Entry | Entry[], options?: WriteOptions): Promise; - debug( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - debug(entry: Entry | Entry[], callback: ApiResponseCallback): void; debug( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -261,6 +261,9 @@ class Log implements LogSeverityFunctions { ); } + delete(gaxOptions?: CallOptions): Promise; + delete(gaxOptions: CallOptions, callback: DeleteCallback): void; + delete(callback: DeleteCallback): void; /** * @typedef {array} DeleteLogResponse * @property {object} 0 The full API response. @@ -302,9 +305,6 @@ class Log implements LogSeverityFunctions { * region_tag:logging_delete_log * Another example: */ - delete(gaxOptions?: CallOptions): Promise; - delete(gaxOptions: CallOptions, callback: DeleteCallback): void; - delete(callback: DeleteCallback): void; async delete( gaxOptions?: CallOptions | DeleteCallback ): Promise { @@ -319,6 +319,12 @@ class Log implements LogSeverityFunctions { ); } + emergency( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + emergency(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "EMERGENCY". * @@ -347,12 +353,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - emergency( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - emergency(entry: Entry | Entry[], callback: ApiResponseCallback): void; emergency( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -363,6 +363,9 @@ class Log implements LogSeverityFunctions { ); } + entry(metadata?: LogEntry): Entry; + entry(data?: string | {}): Entry; + entry(metadata?: LogEntry, data?: string | {}): Entry; /** * Create an entry object for this log. * @@ -418,9 +421,6 @@ class Log implements LogSeverityFunctions { * // } * // } */ - entry(metadata?: LogEntry): Entry; - entry(data?: string | {}): Entry; - entry(metadata?: LogEntry, data?: string | {}): Entry; entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; if (!data) { @@ -432,6 +432,13 @@ class Log implements LogSeverityFunctions { return this.logging.entry(metadata, data); } + error(entry: Entry | Entry[], options?: WriteOptions): Promise; + error( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + error(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "ERROR". * @@ -460,13 +467,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - error(entry: Entry | Entry[], options?: WriteOptions): Promise; - error( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - error(entry: Entry | Entry[], callback: ApiResponseCallback): void; error( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -477,6 +477,9 @@ class Log implements LogSeverityFunctions { ); } + getEntries(options?: GetEntriesRequest): Promise; + getEntries(callback: GetEntriesCallback): void; + getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; /** * This method is a wrapper around {module:logging#getEntries}, but with a * filter specified to only return entries from this log. @@ -519,9 +522,6 @@ class Log implements LogSeverityFunctions { * const entries = data[0]; * }); */ - getEntries(options?: GetEntriesRequest): Promise; - getEntries(callback: GetEntriesCallback): void; - getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; async getEntries( opts?: GetEntriesRequest | GetEntriesCallback ): Promise { @@ -580,6 +580,13 @@ class Log implements LogSeverityFunctions { return this.logging.getEntriesStream(options); } + info(entry: Entry | Entry[], options?: WriteOptions): Promise; + info( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + info(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "INFO". * @@ -608,13 +615,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - info(entry: Entry | Entry[], options?: WriteOptions): Promise; - info( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - info(entry: Entry | Entry[], callback: ApiResponseCallback): void; info( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -625,6 +625,13 @@ class Log implements LogSeverityFunctions { ); } + notice(entry: Entry | Entry[], options?: WriteOptions): Promise; + notice( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + notice(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "NOTICE". * @@ -653,13 +660,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - notice(entry: Entry | Entry[], options?: WriteOptions): Promise; - notice( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - notice(entry: Entry | Entry[], callback: ApiResponseCallback): void; notice( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -670,6 +670,13 @@ class Log implements LogSeverityFunctions { ); } + warning(entry: Entry | Entry[], options?: WriteOptions): Promise; + warning( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + warning(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "WARNING". * @@ -698,13 +705,6 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); */ - warning(entry: Entry | Entry[], options?: WriteOptions): Promise; - warning( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - warning(entry: Entry | Entry[], callback: ApiResponseCallback): void; warning( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -715,6 +715,13 @@ class Log implements LogSeverityFunctions { ); } + write(entry: Entry | Entry[], options?: WriteOptions): Promise; + write( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + write(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * @typedef {array} LogWriteResponse * @property {object} 0 The full API response. @@ -816,13 +823,6 @@ class Log implements LogSeverityFunctions { * region_tag:logging_write_log_entry_advanced * Another example: */ - write(entry: Entry | Entry[], options?: WriteOptions): Promise; - write( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - write(entry: Entry | Entry[], callback: ApiResponseCallback): void; async write( entry: Entry | Entry[], opts?: WriteOptions | ApiResponseCallback diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 2c6e5f569e3..14ffaef90f5 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -70,6 +70,8 @@ class Sink { this.formattedName_ = 'projects/' + logging.projectId + '/sinks/' + name; } + create(config: CreateSinkRequest): Promise<[Sink, LogSink]>; + create(config: CreateSinkRequest, callback: CreateSinkCallback): void; /** * Create a sink. * @@ -108,12 +110,13 @@ class Sink { * region_tag:logging_create_sink * Another example: */ - create(config: CreateSinkRequest): Promise<[Sink, LogSink]>; - create(config: CreateSinkRequest, callback: CreateSinkCallback): void; create(config: CreateSinkRequest): Promise<[Sink, LogSink]> { return this.logging.createSink(this.name, config); } + delete(gaxOptions?: CallOptions): Promise; + delete(callback: DeleteCallback): void; + delete(gaxOptions: CallOptions, callback: DeleteCallback): void; /** * @typedef {array} DeleteSinkResponse * @property {object} 0 The full API response. @@ -155,9 +158,6 @@ class Sink { * region_tag:logging_delete_sink * Another example: */ - delete(gaxOptions?: CallOptions): Promise; - delete(callback: DeleteCallback): void; - delete(gaxOptions: CallOptions, callback: DeleteCallback): void; async delete( gaxOptions?: CallOptions | DeleteCallback ): Promise { @@ -172,6 +172,9 @@ class Sink { ); } + getMetadata(gaxOptions?: CallOptions): Promise; + getMetadata(callback: SinkMetadataCallback): void; + getMetadata(gaxOptions: CallOptions, callback: SinkMetadataCallback): void; /** * @typedef {array} GetSinkMetadataResponse * @property {object} 0 The {@link Sink} metadata. @@ -212,9 +215,6 @@ class Sink { * region_tag:logging_get_sink * Another example: */ - getMetadata(gaxOptions?: CallOptions): Promise; - getMetadata(callback: SinkMetadataCallback): void; - getMetadata(gaxOptions: CallOptions, callback: SinkMetadataCallback): void; async getMetadata( gaxOptions?: CallOptions | SinkMetadataCallback ): Promise { @@ -231,6 +231,8 @@ class Sink { return [this.metadata!]; } + setFilter(filter: string): Promise; + setFilter(filter: string, callback: SinkMetadataCallback): void; /** * @typedef {array} SetSinkFilterResponse * @property {object} 0 The full API response. @@ -267,14 +269,14 @@ class Sink { * const apiResponse = data[0]; * }); */ - setFilter(filter: string): Promise; - setFilter(filter: string, callback: SinkMetadataCallback): void; setFilter(filter: string): Promise { return this.setMetadata({ filter, }); } + setMetadata(metadata: SetSinkMetadata): Promise; + setMetadata(metadata: SetSinkMetadata, callback: SinkMetadataCallback): void; /** * @typedef {array} SetSinkMetadataResponse * @property {object} 0 The full API response. @@ -321,8 +323,6 @@ class Sink { * region_tag:logging_update_sink * Another example: */ - setMetadata(metadata: SetSinkMetadata): Promise; - setMetadata(metadata: SetSinkMetadata, callback: SinkMetadataCallback): void; async setMetadata(metadata: SetSinkMetadata): Promise { const [currentMetadata] = await this.getMetadata(); const reqOpts = { From 05f56bc7e0df4aef8f74557b9ad64c1e1190032b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2020 14:59:25 -0700 Subject: [PATCH 0575/1029] chore: release 7.3.0 (#727) --- handwritten/logging/CHANGELOG.md | 13 +++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index f3a6fb8c564..0355bef48e5 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [7.3.0](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.3...v7.3.0) (2020-03-11) + + +### Features + +* export protos in src/index.ts ([0dbbe35](https://www.github.com/googleapis/nodejs-logging/commit/0dbbe351f3143e8103929ac5862bd7c2c8ff6716)) + + +### Bug Fixes + +* **deps:** update dependency type-fest to ^0.12.0 ([#741](https://www.github.com/googleapis/nodejs-logging/issues/741)) ([c011c7d](https://www.github.com/googleapis/nodejs-logging/commit/c011c7d62c23814b9abe9b8a6e6f6f493f8a5027)) +* **docs:** documentation for overloaded methods ([#725](https://www.github.com/googleapis/nodejs-logging/issues/725)) ([06a2cea](https://www.github.com/googleapis/nodejs-logging/commit/06a2cea1845ec2de441e156df6fdea04fb7b8955)), closes [#723](https://www.github.com/googleapis/nodejs-logging/issues/723) + ### [7.2.3](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.2...v7.2.3) (2020-02-26) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b5396c81b3f..085dff534d1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "description": "Stackdriver Logging Client Library for Node.js", - "version": "7.2.3", + "version": "7.3.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { From a6824a4de2d1ede1d4bc84ad2e495770cb2d0413 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 11 Mar 2020 15:35:13 -0700 Subject: [PATCH 0576/1029] chore: update uuid dependency (#744) --- handwritten/logging/package.json | 4 ++-- handwritten/logging/system-test/logging.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 085dff534d1..309eda60643 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -83,7 +83,7 @@ "@types/sinon": "^7.0.8", "@types/through2": "^2.0.34", "@types/tmp": "^0.1.0", - "@types/uuid": "^3.4.4", + "@types/uuid": "^7.0.0", "assert-rejects": "^1.0.0", "bignumber.js": "^9.0.0", "c8": "^7.0.0", @@ -107,6 +107,6 @@ "proxyquire": "^2.1.0", "sinon": "^9.0.0", "typescript": "3.6.4", - "uuid": "^3.3.2" + "uuid": "^7.0.2" } } diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 7a8b28d7bea..5181a22a225 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -22,7 +22,7 @@ import {describe, it} from 'mocha'; import {HOST_ADDRESS} from 'gcp-metadata'; import * as nock from 'nock'; import {Duplex} from 'stream'; -import * as uuid from 'uuid'; +import {v4} from 'uuid'; const http2spy = require('http2spy'); import {Logging, Sink, Log, Entry} from '../src'; @@ -656,7 +656,7 @@ describe('Logging', async () => { }); function generateName() { - return `${TESTS_PREFIX}-${Date.now()}-${uuid() + return `${TESTS_PREFIX}-${Date.now()}-${v4() .split('-') .pop()}`; } From 37ac688e0a40aeefcb77c7300cdcc3a47d396dfb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 11 Mar 2020 17:25:22 -0700 Subject: [PATCH 0577/1029] fix!: proto annotations Co-authored-by: Benjamin E. Coe --- .../protos/google/logging/v2/log_entry.proto | 93 +- .../protos/google/logging/v2/logging.proto | 64 +- .../google/logging/v2/logging_config.proto | 386 ++- .../google/logging/v2/logging_metrics.proto | 36 +- handwritten/logging/protos/protos.d.ts | 604 ++++- handwritten/logging/protos/protos.js | 2205 +++++++++++++---- handwritten/logging/protos/protos.json | 571 ++++- .../src/v2/config_service_v2_client.js | 757 +++--- .../v2/config_service_v2_client_config.json | 43 +- .../doc/google/api/doc_monitored_resource.js | 33 - .../v2/doc/google/logging/v2/doc_log_entry.js | 52 +- .../v2/doc/google/logging/v2/doc_logging.js | 14 +- .../google/logging/v2/doc_logging_config.js | 257 +- .../google/logging/v2/doc_logging_metrics.js | 4 +- .../src/v2/logging_service_v2_client.js | 223 +- .../v2/logging_service_v2_client_config.json | 23 +- .../src/v2/metrics_service_v2_client.js | 114 +- .../v2/metrics_service_v2_client_config.json | 5 +- handwritten/logging/synth.metadata | 26 +- handwritten/logging/test/gapic-v2.js | 303 ++- 20 files changed, 4101 insertions(+), 1712 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 3f9c3d51d76..ba8a08ff2c0 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.logging.v2; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; import "google/logging/type/http_request.proto"; @@ -55,9 +56,9 @@ message LogEntry { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // A project number may optionally be used in place of PROJECT_ID. The project - // number is translated to its corresponding PROJECT_ID internally and the - // `log_name` field will contain PROJECT_ID in queries and exports. + // A project number may be used in place of PROJECT_ID. The project number is + // translated to its corresponding PROJECT_ID internally and the `log_name` + // field will contain PROJECT_ID in queries and exports. // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -70,16 +71,16 @@ message LogEntry { // 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. - string log_name = 12; + string log_name = 12 [(google.api.field_behavior) = REQUIRED]; // Required. The monitored resource that produced 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. - google.api.MonitoredResource resource = 8; + google.api.MonitoredResource resource = 8 [(google.api.field_behavior) = REQUIRED]; - // Optional. The log entry payload, which can be one of multiple types. + // The log entry payload, which can be one of multiple types. oneof payload { // The log entry payload, represented as a protocol buffer. Some Google // Cloud Platform services use this field for their log entry payloads. @@ -99,29 +100,27 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. This - // time is used to compute the log entry's age and to enforce the logs - // retention period. If this field is omitted in a new log entry, then Logging - // assigns it the current time. Timestamps have nanosecond accuracy, but - // trailing zeros in the fractional seconds might be omitted when the - // timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This time is used + // to compute the log entry's age and to enforce the logs retention period. + // If this field is omitted in a new log entry, then Logging assigns it the + // current time. Timestamps have nanosecond accuracy, but trailing zeros in + // the fractional seconds might be omitted when the timestamp is displayed. // // Incoming log entries should have timestamps that are no more than the [logs // retention period](/logging/quotas) in the past, and no more than 24 hours // in the future. Log entries outside those time boundaries will not be // available when calling `entries.list`, but those log entries can still be // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). - google.protobuf.Timestamp timestamp = 9; + google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. - google.protobuf.Timestamp receive_timestamp = 24; + google.protobuf.Timestamp receive_timestamp = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The severity of the log entry. The default value is - // `LogSeverity.DEFAULT`. - google.logging.type.LogSeverity severity = 10; + // Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. + google.logging.type.LogSeverity severity = 10 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A unique identifier for the log entry. If you provide a value, - // then Logging considers other log entries in the same project, with the same + // Optional. A unique identifier for the log entry. If you provide a value, then + // Logging considers other log entries in the same project, with the same // `timestamp`, and with the same `insert_id` to be duplicates which are // removed in a single query result. However, there are no guarantees of // de-duplication in the export of logs. @@ -131,43 +130,32 @@ message LogEntry { // // In queries, the `insert_id` is also used to order log entries that have // the same `log_name` and `timestamp` values. - string insert_id = 4; + string insert_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Information about the HTTP request associated with this log - // entry, if applicable. - google.logging.type.HttpRequest http_request = 7; + // Optional. Information about the HTTP request associated with this log entry, if + // applicable. + google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. A set of user-defined (key, value) data that provides additional // information about the log entry. - map labels = 11; - - // Deprecated. Output only. Additional metadata about the monitored resource. - // - // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - // this field populated for GKE versions older than 1.12.6. For GKE versions - // 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes - // pod labels that used to be in `metadata.userLabels` will now be present in - // the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system - // labels that were present in the `metadata.systemLabels` field will no - // longer be available in the LogEntry. - google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Information about an operation associated with the log entry, if // applicable. - LogEntryOperation operation = 15; + LogEntryOperation operation = 15 [(google.api.field_behavior) = OPTIONAL]; - // 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: + // 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` - string trace = 22; + string trace = 22 [(google.api.field_behavior) = OPTIONAL]; // Optional. The span ID within the trace associated with the log entry. // // For Trace spans, this is the same format that the Trace API v2 uses: a // 16-character hexadecimal encoding of an 8-byte array, such as - // "000000000000004a". - string span_id = 27; + // `000000000000004a`. + string span_id = 27 [(google.api.field_behavior) = OPTIONAL]; // Optional. The sampling decision of the trace associated with the log entry. // @@ -176,11 +164,10 @@ message LogEntry { // for storage when this log entry was written, or the sampling decision was // unknown at the time. A non-sampled `trace` value is still useful as a // request correlation identifier. The default is False. - bool trace_sampled = 30; + bool trace_sampled = 30 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Source code location information associated with the log entry, - // if any. - LogEntrySourceLocation source_location = 23; + // Optional. Source code location information associated with the log entry, if any. + LogEntrySourceLocation source_location = 23 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about a potentially long-running operation with which @@ -188,18 +175,18 @@ message LogEntry { message LogEntryOperation { // Optional. An arbitrary operation identifier. Log entries with the same // identifier are assumed to be part of the same operation. - string id = 1; + string id = 1 [(google.api.field_behavior) = OPTIONAL]; // 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"`. - string producer = 2; + string producer = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the first log entry in the operation. - bool first = 3; + bool first = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the last log entry in the operation. - bool last = 4; + bool last = 4 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about the source code location that produced the log @@ -207,11 +194,11 @@ message LogEntryOperation { message LogEntrySourceLocation { // Optional. Source file name. Depending on the runtime environment, this // might be a simple name or a fully-qualified name. - string file = 1; + string file = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Line within the source file. 1-based; 0 indicates no line number // available. - int64 line = 2; + int64 line = 2 [(google.api.field_behavior) = OPTIONAL]; // 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 @@ -219,5 +206,5 @@ message LogEntrySourceLocation { // less meaningful. The format can vary by language. For example: // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` // (Python). - string function = 3; + string function = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index c3a5246334c..00af178c328 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; @@ -28,6 +27,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -142,7 +142,7 @@ message DeleteLogRequest { string log_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" + type: "logging.googleapis.com/Log" } ]; } @@ -162,13 +162,16 @@ message WriteLogEntriesRequest { // "projects/my-project-id/logs/syslog" // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" // - // The permission logging.logEntries.create is needed on each - // project, organization, billing account, or folder that is receiving - // new log entries, whether the resource is specified in - // logName or in an individual log entry. - string log_name = 1 [(google.api.resource_reference) = { - type: "logging.googleapis.com/Log" - }]; + // The permission `logging.logEntries.create` is needed on each project, + // organization, billing account, or folder that is receiving new log + // entries, whether the resource is specified in `logName` or in an + // individual log entry. + string log_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Log" + } + ]; // Optional. A default monitored resource object that is assigned to all log // entries in `entries` that do not specify a value for `resource`. Example: @@ -178,13 +181,13 @@ message WriteLogEntriesRequest { // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} // // See [LogEntry][google.logging.v2.LogEntry]. - google.api.MonitoredResource resource = 2; + google.api.MonitoredResource resource = 2 [(google.api.field_behavior) = OPTIONAL]; // 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][google.logging.v2.LogEntry]. - map labels = 3; + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; // Required. The log entries to send to Logging. The order of log // entries in this list does not matter. Values supplied in this method's @@ -216,19 +219,16 @@ message WriteLogEntriesRequest { // entry is not written, then the response status is the error associated // with one of the failed entries and the response includes error details // keyed by the entries' zero-based index in the `entries.write` method. - bool partial_success = 5; + bool partial_success = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, the request should expect normal response, but the // entries won't be persisted nor exported. Useful for checking whether the // logging API endpoints are working properly before sending valuable data. - bool dry_run = 6; + bool dry_run = 6 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from WriteLogEntries. -// empty -message WriteLogEntriesResponse { - -} +message WriteLogEntriesResponse {} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { @@ -243,11 +243,6 @@ message WriteLogEntriesPartialErrors { // The parameters to `ListLogEntries`. message ListLogEntriesRequest { - // Deprecated. Use `resource_names` instead. One or more project identifiers - // or project numbers from which to retrieve log entries. Example: - // `"my-project-1A"`. - repeated string project_ids = 1 [deprecated = true]; - // Required. Names of one or more parent resources from which to // retrieve log entries: // @@ -272,7 +267,7 @@ message ListLogEntriesRequest { // that is not listed in `resource_names` will cause the filter to return no // results. // The maximum length of the filter is 20000 characters. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. How the results should be sorted. Presently, the only permitted // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -280,18 +275,18 @@ message ListLogEntriesRequest { // `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 their `insert_id` values. - string order_by = 3; + string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `next_page_token` in the // response indicates that more results might be available. - int32 page_size = 4; + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `page_token` must be the value of // `next_page_token` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 5; + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListLogEntries`. @@ -319,13 +314,13 @@ message ListMonitoredResourceDescriptorsRequest { // 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. - int32 page_size = 1; + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // 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. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListMonitoredResourceDescriptors. @@ -347,20 +342,23 @@ message ListLogsRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1 [(google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" - }]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; // 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. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // 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. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogs. diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 7fb830ded21..1062a6521ce 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -43,6 +43,79 @@ service ConfigServiceV2 { "https://www.googleapis.com/auth/logging.admin," "https://www.googleapis.com/auth/logging.read"; + // Lists buckets (Beta). + rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*/locations/*}/buckets" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=folders/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*/locations/*}/buckets" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a bucket (Beta). + rpc GetBucket(GetBucketRequest) returns (LogBucket) { + option (google.api.http) = { + get: "/v2/{name=*/*/locations/*/buckets/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/buckets/*}" + } + }; + } + + // Updates a bucket. This method replaces the following fields in the + // existing bucket with values from the new bucket: `retention_period` + // + // If the retention period is decreased and the bucket is locked, + // FAILED_PRECONDITION will be returned. + // + // If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + // will be returned. + // + // A buckets region may not be modified after it is created. + // This method is in Beta. + rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) { + option (google.api.http) = { + patch: "/v2/{name=*/*/locations/*/buckets/*}" + body: "bucket" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=folders/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + body: "bucket" + } + }; + } + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { @@ -333,6 +406,48 @@ service ConfigServiceV2 { } } +// Describes a repository of logs (Beta). +message LogBucket { + option (google.api.resource) = { + type: "logging.googleapis.com/LogBucket" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}" + pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}" + pattern: "folders/{folder}/locations/{location}/buckets/{bucket}" + pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" + }; + + // The resource name of the bucket. + // For example: + // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The + // supported locations are: + // "global" + // "us-central1" + // + // For the location of `global` it is unspecified where logs are actually + // stored. + // Once a bucket has been created, the location can not be changed. + string name = 1; + + // Describes this bucket. + string description = 3; + + // Output only. The creation timestamp of the bucket. This is not set for any of the + // default buckets. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the bucket. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Logs will be retained by default for this amount of time, after which they + // will automatically be deleted. The minimum retention period is 1 day. + // If this value is set to zero at bucket creation time, the default time of + // 30 days will be used. + int32 retention_days = 11; + + // Output only. The bucket lifecycle state. + LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a // Cloud Pub/Sub topic. A logs filter controls which log entries are exported. @@ -340,7 +455,7 @@ service ConfigServiceV2 { // folder. message LogSink { option (google.api.resource) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" pattern: "projects/{project}/sinks/{sink}" pattern: "organizations/{organization}/sinks/{sink}" pattern: "folders/{folder}/sinks/{sink}" @@ -361,12 +476,12 @@ message LogSink { V1 = 2; } - // 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. First character has to be alphanumeric. - string name = 1; + // 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. + // First character has to be alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The export destination: // @@ -378,36 +493,37 @@ message LogSink { // 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). - string destination = 3 [(google.api.resource_reference) = { - type: "*" - }]; + string destination = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "*" + } + ]; // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only // exported log entries are those that are in the resource owning the sink and // that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - string filter = 5; + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A description of this sink. // The maximum length of the description is 8000 characters. - string description = 18; + string description = 18 [(google.api.field_behavior) = OPTIONAL]; // Optional. If set to True, then this sink is disabled and it does not // export any log entries. - bool disabled = 19; + bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; // Deprecated. The log entry format to use for this sink's exported log // entries. The v2 format is used by default and cannot be changed. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity—a service account or group—under - // which Logging writes the exported log entries to the sink's destination. - // This field is set by - // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - // and - // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] - // based on the value of `unique_writer_identity` in those methods. + // Output only. An IAM identity–a service account or group—under which Logging + // writes the exported log entries to the sink's destination. This field is + // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + // value 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, @@ -430,12 +546,12 @@ message LogSink { // // logName:("projects/test-project1/" OR "projects/test-project2/") AND // resource.type=gce_instance - bool include_children = 9; + bool include_children = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Destination dependent options. + // Destination dependent options. oneof options { // Optional. Options that affect sinks exporting data to BigQuery. - BigQueryOptions bigquery_options = 12; + BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL]; } // Output only. The creation timestamp of the sink. @@ -447,12 +563,6 @@ message LogSink { // // This field may not be present for older sinks. google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Do not use. This field is ignored. - google.protobuf.Timestamp start_time = 10 [deprecated = true]; - - // Do not use. This field is ignored. - google.protobuf.Timestamp end_time = 11 [deprecated = true]; } // Options that change functionality of a sink exporting data to BigQuery. @@ -464,7 +574,7 @@ message BigQueryOptions { // present and [special query // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. // In both cases, tables are sharded based on UTC timezone. - bool use_partitioned_tables = 1; + bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. True if new timestamp column based partitioning is in use, // false if legacy ingestion-time partitioning is in use. @@ -475,6 +585,113 @@ message BigQueryOptions { bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// LogBucket lifecycle states (Beta). +enum LifecycleState { + // Unspecified state. This is only used/useful for distinguishing + // unset values. + LIFECYCLE_STATE_UNSPECIFIED = 0; + + // The normal and active state. + ACTIVE = 1; + + // The bucket has been marked for deletion by the user. + DELETE_REQUESTED = 2; +} + +// The parameters to `ListBuckets` (Beta). +message ListBucketsRequest { + // Required. The parent resource whose buckets are to be listed: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + // + // Note: The locations portion of the resource must be specified, but + // supplying the character `-` in place of [LOCATION_ID] will return all + // buckets. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogBucket" + }]; + + // 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. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from ListBuckets (Beta). +message ListBucketsResponse { + // A list of buckets. + repeated LogBucket buckets = 1; + + // 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`. + string next_page_token = 2; +} + +// The parameters to `UpdateBucket` (Beta). +message UpdateBucketRequest { + // Required. The full resource name of the bucket to update. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + // requires permission "resourcemanager.projects.updateLiens" to set the + // locked property + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; + + // Required. The updated bucket. + LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Field mask that specifies the fields in `bucket` that need an update. A + // bucket field will be overwritten if, and only if, it is in the update + // mask. `name` and output only fields cannot be updated. + // + // For a detailed `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + // + // Example: `updateMask=retention_days`. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `GetBucket` (Beta). +message GetBucketRequest { + // Required. The resource name of the bucket: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; +} + // The parameters to `ListSinks`. message ListSinksRequest { // Required. The parent resource whose sinks are to be listed: @@ -486,7 +703,7 @@ message ListSinksRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Sink" + child_type: "logging.googleapis.com/LogSink" } ]; @@ -494,12 +711,12 @@ message ListSinksRequest { // 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. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // 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. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListSinks`. @@ -526,7 +743,7 @@ message GetSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; } @@ -544,7 +761,7 @@ message CreateSinkRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Sink" + child_type: "logging.googleapis.com/LogSink" } ]; @@ -563,13 +780,13 @@ message CreateSinkRequest { // 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][google.logging.v2.LogSink]. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `UpdateSink`. message UpdateSinkRequest { - // Required. The full resource name of the sink to update, including the - // parent resource and the sink identifier: + // 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]" @@ -580,12 +797,12 @@ message UpdateSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; - // Required. The updated sink, whose name is the same identifier that appears - // as part of `sink_name`. + // Required. The updated sink, whose name is the same identifier that appears as part + // of `sink_name`. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] @@ -599,7 +816,7 @@ message UpdateSinkRequest { // `writer_identity` is changed to a unique service account. // + It is an error if the old value is true and the new value is // set to false or defaulted to false. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Field mask that specifies the fields in `sink` that need // an update. A sink field will be overwritten if, and only if, it is @@ -615,13 +832,13 @@ message UpdateSinkRequest { // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // Example: `updateMask=filter`. - google.protobuf.FieldMask update_mask = 4; + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `DeleteSink`. message DeleteSinkRequest { - // Required. The full resource name of the sink to delete, including the - // parent resource and the sink identifier: + // 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]" @@ -632,7 +849,7 @@ message DeleteSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; } @@ -645,21 +862,21 @@ message DeleteSinkRequest { // apply to child resources, and that you can't exclude audit log entries. message LogExclusion { option (google.api.resource) = { - type: "logging.googleapis.com/Exclusion" + type: "logging.googleapis.com/LogExclusion" pattern: "projects/{project}/exclusions/{exclusion}" pattern: "organizations/{organization}/exclusions/{exclusion}" pattern: "folders/{folder}/exclusions/{exclusion}" pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}" }; - // Required. A client-assigned identifier, such as - // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - // can include only letters, digits, underscores, hyphens, and periods. - // First character has to be alphanumeric. - string name = 1; + // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. + // Identifiers are limited to 100 characters and can include only letters, + // digits, underscores, hyphens, and periods. First character has to be + // alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A description of this exclusion. - string description = 2; + string description = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. An [advanced logs filter](/logging/docs/view/advanced-queries) // that matches the log entries to be excluded. By using the @@ -669,23 +886,23 @@ message LogExclusion { // entries from Google Cloud Storage buckets: // // `"resource.type=gcs_bucket severity=ERROR" // // The maximum length of the filter is 20000 characters. - string filter = 3; + string filter = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The metric descriptor associated with the logs-based metric. // If unspecified, it uses a default metric descriptor with a DELTA metric @@ -160,7 +160,7 @@ message LogMetric { // be updated once initially configured. New labels can be added in the // `metric_descriptor`, but existing labels cannot be modified except for // their description. - google.api.MetricDescriptor metric_descriptor = 5; + google.api.MetricDescriptor metric_descriptor = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A `value_extractor` is required when using a distribution // logs-based metric to extract the values to record from a log entry. @@ -181,7 +181,7 @@ message LogMetric { // distribution. // // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - string value_extractor = 6; + string value_extractor = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A map from a label key string to an extractor expression which is // used to extract data from a log entry field and assign as the label value. @@ -197,22 +197,22 @@ message LogMetric { // // Note that there are upper bounds on the maximum number of labels and the // number of active time series that are allowed in a project. - map label_extractors = 7; + map label_extractors = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The `bucket_options` are required when the logs-based metric is // using a DISTRIBUTION value type and it describes the bucket boundaries // used to create a histogram of the extracted values. - google.api.Distribution.BucketOptions bucket_options = 8; + google.api.Distribution.BucketOptions bucket_options = 8 [(google.api.field_behavior) = OPTIONAL]; // Output only. The creation timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp create_time = 9; + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp update_time = 10; + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Deprecated. The API version that created or updated this metric. // The v2 format is used by default and cannot be changed. @@ -235,12 +235,12 @@ message ListLogMetricsRequest { // 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. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // 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. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogMetrics. @@ -262,7 +262,7 @@ message GetLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; } @@ -277,7 +277,7 @@ message CreateLogMetricRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + child_type: "logging.googleapis.com/LogMetric" } ]; @@ -298,7 +298,7 @@ message UpdateLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; @@ -314,7 +314,7 @@ message DeleteLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; } diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 34e56abb31d..264185b8fc3 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -43,6 +43,48 @@ export namespace google { */ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; + /** + * Calls ListBuckets. + * @param request ListBucketsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBucketsResponse + */ + public listBuckets(request: google.logging.v2.IListBucketsRequest, callback: google.logging.v2.ConfigServiceV2.ListBucketsCallback): void; + + /** + * Calls ListBuckets. + * @param request ListBucketsRequest message or plain object + * @returns Promise + */ + public listBuckets(request: google.logging.v2.IListBucketsRequest): Promise; + + /** + * Calls GetBucket. + * @param request GetBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogBucket + */ + public getBucket(request: google.logging.v2.IGetBucketRequest, callback: google.logging.v2.ConfigServiceV2.GetBucketCallback): void; + + /** + * Calls GetBucket. + * @param request GetBucketRequest message or plain object + * @returns Promise + */ + public getBucket(request: google.logging.v2.IGetBucketRequest): Promise; + + /** + * Calls UpdateBucket. + * @param request UpdateBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogBucket + */ + public updateBucket(request: google.logging.v2.IUpdateBucketRequest, callback: google.logging.v2.ConfigServiceV2.UpdateBucketCallback): void; + + /** + * Calls UpdateBucket. + * @param request UpdateBucketRequest message or plain object + * @returns Promise + */ + public updateBucket(request: google.logging.v2.IUpdateBucketRequest): Promise; + /** * Calls ListSinks. * @param request ListSinksRequest message or plain object @@ -214,6 +256,27 @@ export namespace google { namespace ConfigServiceV2 { + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. + * @param error Error, if any + * @param [response] ListBucketsResponse + */ + type ListBucketsCallback = (error: (Error|null), response?: google.logging.v2.ListBucketsResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. + * @param error Error, if any + * @param [response] LogBucket + */ + type GetBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. + * @param error Error, if any + * @param [response] LogBucket + */ + type UpdateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. * @param error Error, if any @@ -299,6 +362,126 @@ export namespace google { type UpdateCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; } + /** Properties of a LogBucket. */ + interface ILogBucket { + + /** LogBucket name */ + name?: (string|null); + + /** LogBucket description */ + description?: (string|null); + + /** LogBucket createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket retentionDays */ + retentionDays?: (number|null); + + /** LogBucket lifecycleState */ + lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); + } + + /** Represents a LogBucket. */ + class LogBucket implements ILogBucket { + + /** + * Constructs a new LogBucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogBucket); + + /** LogBucket name. */ + public name: string; + + /** LogBucket description. */ + public description: string; + + /** LogBucket createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket retentionDays. */ + public retentionDays: number; + + /** LogBucket lifecycleState. */ + public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); + + /** + * Creates a new LogBucket instance using the specified properties. + * @param [properties] Properties to set + * @returns LogBucket instance + */ + public static create(properties?: google.logging.v2.ILogBucket): google.logging.v2.LogBucket; + + /** + * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * @param message LogBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * @param message LogBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogBucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogBucket; + + /** + * Decodes a LogBucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogBucket; + + /** + * Verifies a LogBucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogBucket + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogBucket; + + /** + * Creates a plain object from a LogBucket message. Also converts values to other types if specified. + * @param message LogBucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogBucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a LogSink. */ interface ILogSink { @@ -334,12 +517,6 @@ export namespace google { /** LogSink updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - - /** LogSink startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** LogSink endTime */ - endTime?: (google.protobuf.ITimestamp|null); } /** Represents a LogSink. */ @@ -384,12 +561,6 @@ export namespace google { /** LogSink updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** LogSink startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** LogSink endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - /** LogSink options. */ public options?: "bigqueryOptions"; @@ -570,6 +741,403 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** LifecycleState enum. */ + enum LifecycleState { + LIFECYCLE_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + DELETE_REQUESTED = 2 + } + + /** Properties of a ListBucketsRequest. */ + interface IListBucketsRequest { + + /** ListBucketsRequest parent */ + parent?: (string|null); + + /** ListBucketsRequest pageToken */ + pageToken?: (string|null); + + /** ListBucketsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListBucketsRequest. */ + class ListBucketsRequest implements IListBucketsRequest { + + /** + * Constructs a new ListBucketsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListBucketsRequest); + + /** ListBucketsRequest parent. */ + public parent: string; + + /** ListBucketsRequest pageToken. */ + public pageToken: string; + + /** ListBucketsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListBucketsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBucketsRequest instance + */ + public static create(properties?: google.logging.v2.IListBucketsRequest): google.logging.v2.ListBucketsRequest; + + /** + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @param message ListBucketsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @param message ListBucketsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsRequest; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsRequest; + + /** + * Verifies a ListBucketsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBucketsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsRequest; + + /** + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * @param message ListBucketsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListBucketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBucketsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListBucketsResponse. */ + interface IListBucketsResponse { + + /** ListBucketsResponse buckets */ + buckets?: (google.logging.v2.ILogBucket[]|null); + + /** ListBucketsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListBucketsResponse. */ + class ListBucketsResponse implements IListBucketsResponse { + + /** + * Constructs a new ListBucketsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListBucketsResponse); + + /** ListBucketsResponse buckets. */ + public buckets: google.logging.v2.ILogBucket[]; + + /** ListBucketsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListBucketsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBucketsResponse instance + */ + public static create(properties?: google.logging.v2.IListBucketsResponse): google.logging.v2.ListBucketsResponse; + + /** + * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @param message ListBucketsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @param message ListBucketsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBucketsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBucketsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsResponse; + + /** + * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBucketsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsResponse; + + /** + * Verifies a ListBucketsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBucketsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsResponse; + + /** + * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. + * @param message ListBucketsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListBucketsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBucketsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateBucketRequest. */ + interface IUpdateBucketRequest { + + /** UpdateBucketRequest name */ + name?: (string|null); + + /** UpdateBucketRequest bucket */ + bucket?: (google.logging.v2.ILogBucket|null); + + /** UpdateBucketRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateBucketRequest. */ + class UpdateBucketRequest implements IUpdateBucketRequest { + + /** + * Constructs a new UpdateBucketRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateBucketRequest); + + /** UpdateBucketRequest name. */ + public name: string; + + /** UpdateBucketRequest bucket. */ + public bucket?: (google.logging.v2.ILogBucket|null); + + /** UpdateBucketRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateBucketRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBucketRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateBucketRequest): google.logging.v2.UpdateBucketRequest; + + /** + * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @param message UpdateBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @param message UpdateBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBucketRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateBucketRequest; + + /** + * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateBucketRequest; + + /** + * Verifies an UpdateBucketRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBucketRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateBucketRequest; + + /** + * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. + * @param message UpdateBucketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBucketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetBucketRequest. */ + interface IGetBucketRequest { + + /** GetBucketRequest name */ + name?: (string|null); + } + + /** Represents a GetBucketRequest. */ + class GetBucketRequest implements IGetBucketRequest { + + /** + * Constructs a new GetBucketRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetBucketRequest); + + /** GetBucketRequest name. */ + public name: string; + + /** + * Creates a new GetBucketRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBucketRequest instance + */ + public static create(properties?: google.logging.v2.IGetBucketRequest): google.logging.v2.GetBucketRequest; + + /** + * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @param message GetBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @param message GetBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBucketRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetBucketRequest; + + /** + * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetBucketRequest; + + /** + * Verifies a GetBucketRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBucketRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetBucketRequest; + + /** + * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. + * @param message GetBucketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBucketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ListSinksRequest. */ interface IListSinksRequest { @@ -2664,9 +3232,6 @@ export namespace google { /** Properties of a ListLogEntriesRequest. */ interface IListLogEntriesRequest { - /** ListLogEntriesRequest projectIds */ - projectIds?: (string[]|null); - /** ListLogEntriesRequest resourceNames */ resourceNames?: (string[]|null); @@ -2692,9 +3257,6 @@ export namespace google { */ constructor(properties?: google.logging.v2.IListLogEntriesRequest); - /** ListLogEntriesRequest projectIds. */ - public projectIds: string[]; - /** ListLogEntriesRequest resourceNames. */ public resourceNames: string[]; @@ -3303,9 +3865,6 @@ export namespace google { /** LogEntry labels */ labels?: ({ [k: string]: string }|null); - /** LogEntry metadata */ - metadata?: (google.api.IMonitoredResourceMetadata|null); - /** LogEntry operation */ operation?: (google.logging.v2.ILogEntryOperation|null); @@ -3364,9 +3923,6 @@ export namespace google { /** LogEntry labels. */ public labels: { [k: string]: string }; - /** LogEntry metadata. */ - public metadata?: (google.api.IMonitoredResourceMetadata|null); - /** LogEntry operation. */ public operation?: (google.logging.v2.ILogEntryOperation|null); diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 6dd9d2a1de5..8ac5349d844 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -89,6 +89,105 @@ return new this(rpcImpl, requestDelimited, responseDelimited); }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListBucketsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListBucketsResponse} [response] ListBucketsResponse + */ + + /** + * Calls ListBuckets. + * @function listBuckets + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListBucketsCallback} callback Node-style callback called with the error, if any, and ListBucketsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listBuckets = function listBuckets(request, callback) { + return this.rpcCall(listBuckets, $root.google.logging.v2.ListBucketsRequest, $root.google.logging.v2.ListBucketsResponse, request, callback); + }, "name", { value: "ListBuckets" }); + + /** + * Calls ListBuckets. + * @function listBuckets + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogBucket} [response] LogBucket + */ + + /** + * Calls GetBucket. + * @function getBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetBucketCallback} callback Node-style callback called with the error, if any, and LogBucket + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getBucket = function getBucket(request, callback) { + return this.rpcCall(getBucket, $root.google.logging.v2.GetBucketRequest, $root.google.logging.v2.LogBucket, request, callback); + }, "name", { value: "GetBucket" }); + + /** + * Calls GetBucket. + * @function getBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogBucket} [response] LogBucket + */ + + /** + * Calls UpdateBucket. + * @function updateBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateBucketCallback} callback Node-style callback called with the error, if any, and LogBucket + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateBucket = function updateBucket(request, callback) { + return this.rpcCall(updateBucket, $root.google.logging.v2.UpdateBucketRequest, $root.google.logging.v2.LogBucket, request, callback); + }, "name", { value: "UpdateBucket" }); + + /** + * Calls UpdateBucket. + * @function updateBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. * @memberof google.logging.v2.ConfigServiceV2 @@ -488,36 +587,29 @@ return ConfigServiceV2; })(); - v2.LogSink = (function() { + v2.LogBucket = (function() { /** - * Properties of a LogSink. + * Properties of a LogBucket. * @memberof google.logging.v2 - * @interface ILogSink - * @property {string|null} [name] LogSink name - * @property {string|null} [destination] LogSink destination - * @property {string|null} [filter] LogSink filter - * @property {string|null} [description] LogSink description - * @property {boolean|null} [disabled] LogSink disabled - * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat - * @property {string|null} [writerIdentity] LogSink writerIdentity - * @property {boolean|null} [includeChildren] LogSink includeChildren - * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime - * @property {google.protobuf.ITimestamp|null} [startTime] LogSink startTime - * @property {google.protobuf.ITimestamp|null} [endTime] LogSink endTime + * @interface ILogBucket + * @property {string|null} [name] LogBucket name + * @property {string|null} [description] LogBucket description + * @property {google.protobuf.ITimestamp|null} [createTime] LogBucket createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogBucket updateTime + * @property {number|null} [retentionDays] LogBucket retentionDays + * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState */ /** - * Constructs a new LogSink. + * Constructs a new LogBucket. * @memberof google.logging.v2 - * @classdesc Represents a LogSink. - * @implements ILogSink + * @classdesc Represents a LogBucket. + * @implements ILogBucket * @constructor - * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @param {google.logging.v2.ILogBucket=} [properties] Properties to set */ - function LogSink(properties) { + function LogBucket(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -525,204 +617,120 @@ } /** - * LogSink name. + * LogBucket name. * @member {string} name - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.name = ""; - - /** - * LogSink destination. - * @member {string} destination - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.destination = ""; - - /** - * LogSink filter. - * @member {string} filter - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @instance */ - LogSink.prototype.filter = ""; + LogBucket.prototype.name = ""; /** - * LogSink description. + * LogBucket description. * @member {string} description - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.description = ""; - - /** - * LogSink disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.disabled = false; - - /** - * LogSink outputVersionFormat. - * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.outputVersionFormat = 0; - - /** - * LogSink writerIdentity. - * @member {string} writerIdentity - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.writerIdentity = ""; - - /** - * LogSink includeChildren. - * @member {boolean} includeChildren - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.includeChildren = false; - - /** - * LogSink bigqueryOptions. - * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @instance */ - LogSink.prototype.bigqueryOptions = null; + LogBucket.prototype.description = ""; /** - * LogSink createTime. + * LogBucket createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @instance */ - LogSink.prototype.createTime = null; + LogBucket.prototype.createTime = null; /** - * LogSink updateTime. + * LogBucket updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.updateTime = null; - - /** - * LogSink startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @instance */ - LogSink.prototype.startTime = null; + LogBucket.prototype.updateTime = null; /** - * LogSink endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.logging.v2.LogSink + * LogBucket retentionDays. + * @member {number} retentionDays + * @memberof google.logging.v2.LogBucket * @instance */ - LogSink.prototype.endTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + LogBucket.prototype.retentionDays = 0; /** - * LogSink options. - * @member {"bigqueryOptions"|undefined} options - * @memberof google.logging.v2.LogSink + * LogBucket lifecycleState. + * @member {google.logging.v2.LifecycleState} lifecycleState + * @memberof google.logging.v2.LogBucket * @instance */ - Object.defineProperty(LogSink.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); + LogBucket.prototype.lifecycleState = 0; /** - * Creates a new LogSink instance using the specified properties. + * Creates a new LogBucket instance using the specified properties. * @function create - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @static - * @param {google.logging.v2.ILogSink=} [properties] Properties to set - * @returns {google.logging.v2.LogSink} LogSink instance + * @param {google.logging.v2.ILogBucket=} [properties] Properties to set + * @returns {google.logging.v2.LogBucket} LogBucket instance */ - LogSink.create = function create(properties) { - return new LogSink(properties); + LogBucket.create = function create(properties) { + return new LogBucket(properties); }; /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogSink.encode = function encode(message, writer) { + LogBucket.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.destination != null && message.hasOwnProperty("destination")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) - $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); - if (message.disabled != null && message.hasOwnProperty("disabled")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.disabled); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.lifecycleState); return writer; }; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogSink.encodeDelimited = function encodeDelimited(message, writer) { + LogBucket.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes a LogBucket message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.LogBucket} LogBucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decode = function decode(reader, length) { + LogBucket.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogBucket(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -730,40 +738,19 @@ message.name = reader.string(); break; case 3: - message.destination = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 18: message.description = reader.string(); break; - case 19: - message.disabled = reader.bool(); - break; - case 6: - message.outputVersionFormat = reader.int32(); - break; - case 8: - message.writerIdentity = reader.string(); - break; - case 9: - message.includeChildren = reader.bool(); - break; - case 12: - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); - break; - case 13: + case 4: message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 14: + case 5: message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 10: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; case 11: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.retentionDays = reader.int32(); + break; + case 12: + message.lifecycleState = reader.int32(); break; default: reader.skipType(tag & 7); @@ -774,270 +761,1584 @@ }; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes a LogBucket message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.LogBucket} LogBucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decodeDelimited = function decodeDelimited(reader) { + LogBucket.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogSink message. + * Verifies a LogBucket message. * @function verify - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogBucket * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogSink.verify = function verify(message) { + LogBucket.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) - if (!$util.isString(message.destination)) - return "destination: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - switch (message.outputVersionFormat) { + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + if (!$util.isInteger(message.retentionDays)) + return "retentionDays: integer expected"; + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + switch (message.lifecycleState) { default: - return "outputVersionFormat: enum value expected"; + return "lifecycleState: enum value expected"; case 0: case 1: case 2: break; } - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - if (!$util.isString(message.writerIdentity)) - return "writerIdentity: string expected"; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - if (typeof message.includeChildren !== "boolean") - return "includeChildren: boolean expected"; - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - properties.options = 1; - { - var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); + return null; + }; + + /** + * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogBucket + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogBucket} LogBucket + */ + LogBucket.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogBucket) + return object; + var message = new $root.google.logging.v2.LogBucket(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogBucket.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogBucket.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.retentionDays != null) + message.retentionDays = object.retentionDays | 0; + switch (object.lifecycleState) { + case "LIFECYCLE_STATE_UNSPECIFIED": + case 0: + message.lifecycleState = 0; + break; + case "ACTIVE": + case 1: + message.lifecycleState = 1; + break; + case "DELETE_REQUESTED": + case 2: + message.lifecycleState = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a LogBucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogBucket + * @static + * @param {google.logging.v2.LogBucket} message LogBucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogBucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.retentionDays = 0; + object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + object.retentionDays = message.retentionDays; + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; + return object; + }; + + /** + * Converts this LogBucket to JSON. + * @function toJSON + * @memberof google.logging.v2.LogBucket + * @instance + * @returns {Object.} JSON object + */ + LogBucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogBucket; + })(); + + v2.LogSink = (function() { + + /** + * Properties of a LogSink. + * @memberof google.logging.v2 + * @interface ILogSink + * @property {string|null} [name] LogSink name + * @property {string|null} [destination] LogSink destination + * @property {string|null} [filter] LogSink filter + * @property {string|null} [description] LogSink description + * @property {boolean|null} [disabled] LogSink disabled + * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat + * @property {string|null} [writerIdentity] LogSink writerIdentity + * @property {boolean|null} [includeChildren] LogSink includeChildren + * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + */ + + /** + * Constructs a new LogSink. + * @memberof google.logging.v2 + * @classdesc Represents a LogSink. + * @implements ILogSink + * @constructor + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + */ + function LogSink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogSink name. + * @member {string} name + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.name = ""; + + /** + * LogSink destination. + * @member {string} destination + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.destination = ""; + + /** + * LogSink filter. + * @member {string} filter + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.filter = ""; + + /** + * LogSink description. + * @member {string} description + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.description = ""; + + /** + * LogSink disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.disabled = false; + + /** + * LogSink outputVersionFormat. + * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.outputVersionFormat = 0; + + /** + * LogSink writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.writerIdentity = ""; + + /** + * LogSink includeChildren. + * @member {boolean} includeChildren + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.includeChildren = false; + + /** + * LogSink bigqueryOptions. + * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.bigqueryOptions = null; + + /** + * LogSink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.createTime = null; + + /** + * LogSink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LogSink options. + * @member {"bigqueryOptions"|undefined} options + * @memberof google.logging.v2.LogSink + * @instance + */ + Object.defineProperty(LogSink.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogSink instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @returns {google.logging.v2.LogSink} LogSink instance + */ + LogSink.create = function create(properties) { + return new LogSink(properties); + }; + + /** + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destination != null && message.hasOwnProperty("destination")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) + $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogSink message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogSink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogSink} LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.destination = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 18: + message.description = reader.string(); + break; + case 19: + message.disabled = reader.bool(); + break; + case 6: + message.outputVersionFormat = reader.int32(); + break; + case 8: + message.writerIdentity = reader.string(); + break; + case 9: + message.includeChildren = reader.bool(); + break; + case 12: + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); + break; + case 13: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogSink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogSink} LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogSink message. + * @function verify + * @memberof google.logging.v2.LogSink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogSink.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + switch (message.outputVersionFormat) { + default: + return "outputVersionFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + if (typeof message.includeChildren !== "boolean") + return "includeChildren: boolean expected"; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + properties.options = 1; + { + var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); + if (error) + return "bigqueryOptions." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogSink + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogSink} LogSink + */ + LogSink.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogSink) + return object; + var message = new $root.google.logging.v2.LogSink(); + if (object.name != null) + message.name = String(object.name); + if (object.destination != null) + message.destination = String(object.destination); + if (object.filter != null) + message.filter = String(object.filter); + if (object.description != null) + message.description = String(object.description); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + switch (object.outputVersionFormat) { + case "VERSION_FORMAT_UNSPECIFIED": + case 0: + message.outputVersionFormat = 0; + break; + case "V2": + case 1: + message.outputVersionFormat = 1; + break; + case "V1": + case 2: + message.outputVersionFormat = 2; + break; + } + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); + if (object.includeChildren != null) + message.includeChildren = Boolean(object.includeChildren); + if (object.bigqueryOptions != null) { + if (typeof object.bigqueryOptions !== "object") + throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.LogSink} message LogSink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogSink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.destination = ""; + object.filter = ""; + object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; + object.writerIdentity = ""; + object.includeChildren = false; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.disabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + object.includeChildren = message.includeChildren; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); + if (options.oneofs) + object.options = "bigqueryOptions"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this LogSink to JSON. + * @function toJSON + * @memberof google.logging.v2.LogSink + * @instance + * @returns {Object.} JSON object + */ + LogSink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * VersionFormat enum. + * @name google.logging.v2.LogSink.VersionFormat + * @enum {string} + * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value + * @property {number} V2=1 V2 value + * @property {number} V1=2 V1 value + */ + LogSink.VersionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "V2"] = 1; + values[valuesById[2] = "V1"] = 2; + return values; + })(); + + return LogSink; + })(); + + v2.BigQueryOptions = (function() { + + /** + * Properties of a BigQueryOptions. + * @memberof google.logging.v2 + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning + */ + + /** + * Constructs a new BigQueryOptions. + * @memberof google.logging.v2 + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions + * @constructor + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + */ + function BigQueryOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usePartitionedTables = false; + + /** + * BigQueryOptions usesTimestampColumnPartitioning. + * @member {boolean} usesTimestampColumnPartitioning + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; + + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @function create + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + */ + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); + }; + + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); + return writer; + }; + + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.usePartitionedTables = reader.bool(); + break; + case 3: + message.usesTimestampColumnPartitioning = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryOptions message. + * @function verify + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + if (typeof message.usesTimestampColumnPartitioning !== "boolean") + return "usesTimestampColumnPartitioning: boolean expected"; + return null; + }; + + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + */ + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) + return object; + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + if (object.usesTimestampColumnPartitioning != null) + message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); + return message; + }; + + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.usePartitionedTables = false; + object.usesTimestampColumnPartitioning = false; + } + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; + return object; + }; + + /** + * Converts this BigQueryOptions to JSON. + * @function toJSON + * @memberof google.logging.v2.BigQueryOptions + * @instance + * @returns {Object.} JSON object + */ + BigQueryOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BigQueryOptions; + })(); + + /** + * LifecycleState enum. + * @name google.logging.v2.LifecycleState + * @enum {string} + * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value + */ + v2.LifecycleState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "DELETE_REQUESTED"] = 2; + return values; + })(); + + v2.ListBucketsRequest = (function() { + + /** + * Properties of a ListBucketsRequest. + * @memberof google.logging.v2 + * @interface IListBucketsRequest + * @property {string|null} [parent] ListBucketsRequest parent + * @property {string|null} [pageToken] ListBucketsRequest pageToken + * @property {number|null} [pageSize] ListBucketsRequest pageSize + */ + + /** + * Constructs a new ListBucketsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListBucketsRequest. + * @implements IListBucketsRequest + * @constructor + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + */ + function ListBucketsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBucketsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.parent = ""; + + /** + * ListBucketsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.pageToken = ""; + + /** + * ListBucketsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListBucketsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance + */ + ListBucketsRequest.create = function create(properties) { + return new ListBucketsRequest(properties); + }; + + /** + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBucketsRequest message. + * @function verify + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBucketsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + */ + ListBucketsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsRequest) + return object; + var message = new $root.google.logging.v2.ListBucketsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBucketsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListBucketsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListBucketsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBucketsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBucketsRequest; + })(); + + v2.ListBucketsResponse = (function() { + + /** + * Properties of a ListBucketsResponse. + * @memberof google.logging.v2 + * @interface IListBucketsResponse + * @property {Array.|null} [buckets] ListBucketsResponse buckets + * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken + */ + + /** + * Constructs a new ListBucketsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListBucketsResponse. + * @implements IListBucketsResponse + * @constructor + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + */ + function ListBucketsResponse(properties) { + this.buckets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBucketsResponse buckets. + * @member {Array.} buckets + * @memberof google.logging.v2.ListBucketsResponse + * @instance + */ + ListBucketsResponse.prototype.buckets = $util.emptyArray; + + /** + * ListBucketsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListBucketsResponse + * @instance + */ + ListBucketsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListBucketsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance + */ + ListBucketsResponse.create = function create(properties) { + return new ListBucketsResponse(properties); + }; + + /** + * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buckets != null && message.buckets.length) + for (var i = 0; i < message.buckets.length; ++i) + $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBucketsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBucketsResponse message. + * @function verify + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBucketsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!Array.isArray(message.buckets)) + return "buckets: array expected"; + for (var i = 0; i < message.buckets.length; ++i) { + var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); if (error) - return "bigqueryOptions." + error; + return "buckets." + error; } } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + */ + ListBucketsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsResponse) + return object; + var message = new $root.google.logging.v2.ListBucketsResponse(); + if (object.buckets) { + if (!Array.isArray(object.buckets)) + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); + message.buckets = []; + for (var i = 0; i < object.buckets.length; ++i) { + if (typeof object.buckets[i] !== "object") + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); + message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); + } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBucketsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buckets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.buckets && message.buckets.length) { + object.buckets = []; + for (var j = 0; j < message.buckets.length; ++j) + object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListBucketsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListBucketsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBucketsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBucketsResponse; + })(); + + v2.UpdateBucketRequest = (function() { + + /** + * Properties of an UpdateBucketRequest. + * @memberof google.logging.v2 + * @interface IUpdateBucketRequest + * @property {string|null} [name] UpdateBucketRequest name + * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask + */ + + /** + * Constructs a new UpdateBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateBucketRequest. + * @implements IUpdateBucketRequest + * @constructor + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + */ + function UpdateBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.name = ""; + + /** + * UpdateBucketRequest bucket. + * @member {google.logging.v2.ILogBucket|null|undefined} bucket + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.bucket = null; + + /** + * UpdateBucketRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance + */ + UpdateBucketRequest.create = function create(properties) { + return new UpdateBucketRequest(properties); + }; + + /** + * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.bucket != null && message.hasOwnProperty("bucket")) + $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + return message; + }; + + /** + * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBucketRequest message. + * @function verify + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + var error = $root.google.logging.v2.LogBucket.verify(message.bucket); if (error) - return "startTime." + error; + return "bucket." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "endTime." + error; + return "updateMask." + error; } return null; }; /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest */ - LogSink.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogSink) + UpdateBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateBucketRequest) return object; - var message = new $root.google.logging.v2.LogSink(); + var message = new $root.google.logging.v2.UpdateBucketRequest(); if (object.name != null) message.name = String(object.name); - if (object.destination != null) - message.destination = String(object.destination); - if (object.filter != null) - message.filter = String(object.filter); - if (object.description != null) - message.description = String(object.description); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - switch (object.outputVersionFormat) { - case "VERSION_FORMAT_UNSPECIFIED": - case 0: - message.outputVersionFormat = 0; - break; - case "V2": - case 1: - message.outputVersionFormat = 1; - break; - case "V1": - case 2: - message.outputVersionFormat = 2; - break; - } - if (object.writerIdentity != null) - message.writerIdentity = String(object.writerIdentity); - if (object.includeChildren != null) - message.includeChildren = Boolean(object.includeChildren); - if (object.bigqueryOptions != null) { - if (typeof object.bigqueryOptions !== "object") - throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); + message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.logging.v2.LogSink.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.logging.v2.LogSink.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.LogSink} message LogSink + * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogSink.toObject = function toObject(message, options) { + UpdateBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.destination = ""; - object.filter = ""; - object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; - object.writerIdentity = ""; - object.includeChildren = false; - object.startTime = null; - object.endTime = null; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.disabled = false; + object.bucket = null; + object.updateMask = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = message.destination; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - object.writerIdentity = message.writerIdentity; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - object.includeChildren = message.includeChildren; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); - if (options.oneofs) - object.options = "bigqueryOptions"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this LogSink to JSON. + * Converts this UpdateBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.UpdateBucketRequest * @instance * @returns {Object.} JSON object */ - LogSink.prototype.toJSON = function toJSON() { + UpdateBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * VersionFormat enum. - * @name google.logging.v2.LogSink.VersionFormat - * @enum {string} - * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value - * @property {number} V2=1 V2 value - * @property {number} V1=2 V1 value - */ - LogSink.VersionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "V2"] = 1; - values[valuesById[2] = "V1"] = 2; - return values; - })(); - - return LogSink; + return UpdateBucketRequest; })(); - v2.BigQueryOptions = (function() { + v2.GetBucketRequest = (function() { /** - * Properties of a BigQueryOptions. + * Properties of a GetBucketRequest. * @memberof google.logging.v2 - * @interface IBigQueryOptions - * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables - * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning + * @interface IGetBucketRequest + * @property {string|null} [name] GetBucketRequest name */ /** - * Constructs a new BigQueryOptions. + * Constructs a new GetBucketRequest. * @memberof google.logging.v2 - * @classdesc Represents a BigQueryOptions. - * @implements IBigQueryOptions + * @classdesc Represents a GetBucketRequest. + * @implements IGetBucketRequest * @constructor - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set */ - function BigQueryOptions(properties) { + function GetBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1045,88 +2346,75 @@ } /** - * BigQueryOptions usePartitionedTables. - * @member {boolean} usePartitionedTables - * @memberof google.logging.v2.BigQueryOptions - * @instance - */ - BigQueryOptions.prototype.usePartitionedTables = false; - - /** - * BigQueryOptions usesTimestampColumnPartitioning. - * @member {boolean} usesTimestampColumnPartitioning - * @memberof google.logging.v2.BigQueryOptions + * GetBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.GetBucketRequest * @instance */ - BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; + GetBucketRequest.prototype.name = ""; /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new GetBucketRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance */ - BigQueryOptions.create = function create(properties) { - return new BigQueryOptions(properties); + GetBucketRequest.create = function create(properties) { + return new GetBucketRequest(properties); }; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encode = function encode(message, writer) { + GetBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a GetBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decode = function decode(reader, length) { + GetBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.usePartitionedTables = reader.bool(); - break; - case 3: - message.usesTimestampColumnPartitioning = reader.bool(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -1137,96 +2425,87 @@ }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryOptions message. + * Verifies a GetBucketRequest message. * @function verify - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryOptions.verify = function verify(message) { + GetBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - if (typeof message.usePartitionedTables !== "boolean") - return "usePartitionedTables: boolean expected"; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - if (typeof message.usesTimestampColumnPartitioning !== "boolean") - return "usesTimestampColumnPartitioning: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest */ - BigQueryOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.BigQueryOptions) + GetBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetBucketRequest) return object; - var message = new $root.google.logging.v2.BigQueryOptions(); - if (object.usePartitionedTables != null) - message.usePartitionedTables = Boolean(object.usePartitionedTables); - if (object.usesTimestampColumnPartitioning != null) - message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); + var message = new $root.google.logging.v2.GetBucketRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryOptions.toObject = function toObject(message, options) { + GetBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.usePartitionedTables = false; - object.usesTimestampColumnPartitioning = false; - } - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - object.usePartitionedTables = message.usePartitionedTables; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this BigQueryOptions to JSON. + * Converts this GetBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.GetBucketRequest * @instance * @returns {Object.} JSON object */ - BigQueryOptions.prototype.toJSON = function toJSON() { + GetBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryOptions; + return GetBucketRequest; })(); v2.ListSinksRequest = (function() { @@ -5949,7 +7228,6 @@ * Properties of a ListLogEntriesRequest. * @memberof google.logging.v2 * @interface IListLogEntriesRequest - * @property {Array.|null} [projectIds] ListLogEntriesRequest projectIds * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames * @property {string|null} [filter] ListLogEntriesRequest filter * @property {string|null} [orderBy] ListLogEntriesRequest orderBy @@ -5966,7 +7244,6 @@ * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set */ function ListLogEntriesRequest(properties) { - this.projectIds = []; this.resourceNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -5974,14 +7251,6 @@ this[keys[i]] = properties[keys[i]]; } - /** - * ListLogEntriesRequest projectIds. - * @member {Array.} projectIds - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.projectIds = $util.emptyArray; - /** * ListLogEntriesRequest resourceNames. * @member {Array.} resourceNames @@ -6046,9 +7315,6 @@ ListLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectIds != null && message.projectIds.length) - for (var i = 0; i < message.projectIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); if (message.orderBy != null && message.hasOwnProperty("orderBy")) @@ -6094,11 +7360,6 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.projectIds && message.projectIds.length)) - message.projectIds = []; - message.projectIds.push(reader.string()); - break; case 8: if (!(message.resourceNames && message.resourceNames.length)) message.resourceNames = []; @@ -6151,13 +7412,6 @@ ListLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectIds != null && message.hasOwnProperty("projectIds")) { - if (!Array.isArray(message.projectIds)) - return "projectIds: array expected"; - for (var i = 0; i < message.projectIds.length; ++i) - if (!$util.isString(message.projectIds[i])) - return "projectIds: string[] expected"; - } if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { if (!Array.isArray(message.resourceNames)) return "resourceNames: array expected"; @@ -6192,13 +7446,6 @@ if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) return object; var message = new $root.google.logging.v2.ListLogEntriesRequest(); - if (object.projectIds) { - if (!Array.isArray(object.projectIds)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.projectIds: array expected"); - message.projectIds = []; - for (var i = 0; i < object.projectIds.length; ++i) - message.projectIds[i] = String(object.projectIds[i]); - } if (object.resourceNames) { if (!Array.isArray(object.resourceNames)) throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); @@ -6230,21 +7477,14 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.projectIds = []; + if (options.arrays || options.defaults) object.resourceNames = []; - } if (options.defaults) { object.filter = ""; object.orderBy = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.projectIds && message.projectIds.length) { - object.projectIds = []; - for (var j = 0; j < message.projectIds.length; ++j) - object.projectIds[j] = message.projectIds[j]; - } if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; if (message.orderBy != null && message.hasOwnProperty("orderBy")) @@ -7422,7 +8662,6 @@ * @property {string|null} [insertId] LogEntry insertId * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest * @property {Object.|null} [labels] LogEntry labels - * @property {google.api.IMonitoredResourceMetadata|null} [metadata] LogEntry metadata * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation * @property {string|null} [trace] LogEntry trace * @property {string|null} [spanId] LogEntry spanId @@ -7534,14 +8773,6 @@ */ LogEntry.prototype.labels = $util.emptyObject; - /** - * LogEntry metadata. - * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.metadata = null; - /** * LogEntry operation. * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation @@ -7649,8 +8880,6 @@ $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); if (message.spanId != null && message.hasOwnProperty("spanId")) writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) @@ -7727,9 +8956,6 @@ reader.pos++; message.labels[key] = reader.string(); break; - case 25: - message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); - break; case 15: message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); break; @@ -7855,11 +9081,6 @@ if (!$util.isString(message.labels[key[i]])) return "labels: string{k:string} expected"; } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } if (message.operation != null && message.hasOwnProperty("operation")) { var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); if (error) @@ -7975,11 +9196,6 @@ for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.logging.v2.LogEntry.metadata: object expected"); - message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); - } if (object.operation != null) { if (typeof object.operation !== "object") throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); @@ -8025,7 +9241,6 @@ object.trace = ""; object.sourceLocation = null; object.receiveTimestamp = null; - object.metadata = null; object.spanId = ""; object.traceSampled = false; } @@ -8070,8 +9285,6 @@ object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); if (message.spanId != null && message.hasOwnProperty("spanId")) object.spanId = message.spanId; if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 2e63241b227..49ef95cbf03 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -21,6 +21,33 @@ "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" }, "methods": { + "ListBuckets": { + "requestType": "ListBucketsRequest", + "responseType": "ListBucketsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*/locations/*}/buckets", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*}/buckets", + "(google.api.method_signature)": "parent" + } + }, + "GetBucket": { + "requestType": "GetBucketRequest", + "responseType": "LogBucket", + "options": { + "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" + } + }, + "UpdateBucket": { + "requestType": "UpdateBucketRequest", + "responseType": "LogBucket", + "options": { + "(google.api.http).patch": "/v2/{name=*/*/locations/*/buckets/*}", + "(google.api.http).body": "bucket", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", + "(google.api.http).additional_bindings.body": "bucket" + } + }, "ListSinks": { "requestType": "ListSinksRequest", "responseType": "ListSinksResponse", @@ -140,9 +167,50 @@ } } }, + "LogBucket": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/LogBucket", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "retentionDays": { + "type": "int32", + "id": 11 + }, + "lifecycleState": { + "type": "LifecycleState", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "LogSink": { "options": { - "(google.api.resource).type": "logging.googleapis.com/Sink", + "(google.api.resource).type": "logging.googleapis.com/LogSink", "(google.api.resource).pattern": "billingAccounts/{billing_account}/sinks/{sink}" }, "oneofs": { @@ -155,26 +223,39 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "destination": { "type": "string", "id": 3, "options": { + "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "*" } }, "filter": { "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "description": { "type": "string", - "id": 18 + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "disabled": { "type": "bool", - "id": 19 + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "outputVersionFormat": { "type": "VersionFormat", @@ -192,11 +273,17 @@ }, "includeChildren": { "type": "bool", - "id": 9 + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "bigqueryOptions": { "type": "BigQueryOptions", - "id": 12 + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "createTime": { "type": "google.protobuf.Timestamp", @@ -211,20 +298,6 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "deprecated": true - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "deprecated": true - } } }, "nested": { @@ -241,7 +314,10 @@ "fields": { "usePartitionedTables": { "type": "bool", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "usesTimestampColumnPartitioning": { "type": "bool", @@ -252,23 +328,113 @@ } } }, - "ListSinksRequest": { + "LifecycleState": { + "values": { + "LIFECYCLE_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "DELETE_REQUESTED": 2 + } + }, + "ListBucketsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Sink" + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogBucket" } }, "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBucketsResponse": { + "fields": { + "buckets": { + "rule": "repeated", + "type": "LogBucket", + "id": 1 + }, + "nextPageToken": { "type": "string", "id": 2 + } + } + }, + "UpdateBucketRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } + }, + "bucket": { + "type": "LogBucket", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetBucketRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } + } + } + }, + "ListSinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageSize": { "type": "int32", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -292,7 +458,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Sink" + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" } } } @@ -304,7 +470,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Sink" + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" } }, "sink": { @@ -316,7 +482,10 @@ }, "uniqueWriterIdentity": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -327,7 +496,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Sink" + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" } }, "sink": { @@ -339,11 +508,17 @@ }, "uniqueWriterIdentity": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -354,40 +529,58 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Sink" + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" } } } }, "LogExclusion": { "options": { - "(google.api.resource).type": "logging.googleapis.com/Exclusion", + "(google.api.resource).type": "logging.googleapis.com/LogExclusion", "(google.api.resource).pattern": "billingAccounts/{billing_account}/exclusions/{exclusion}" }, "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "description": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "filter": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "disabled": { "type": "bool", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 6 + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -398,16 +591,22 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Exclusion" + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" } }, "pageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageSize": { "type": "int32", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -431,7 +630,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Exclusion" + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" } } } @@ -443,12 +642,15 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Exclusion" + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" } }, "exclusion": { "type": "LogExclusion", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -459,7 +661,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Exclusion" + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" } }, "exclusion": { @@ -485,7 +687,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Exclusion" + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" } } } @@ -494,7 +696,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/CmekSettings" + } } } }, @@ -502,23 +708,39 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "cmekSettings": { "type": "CmekSettings", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, "CmekSettings": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/CmekSettings", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/cmekSettings" + }, "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "kmsKeyName": { "type": "string", @@ -526,7 +748,10 @@ }, "serviceAccountId": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -588,7 +813,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" + "(google.api.resource_reference).type": "logging.googleapis.com/Log" } } } @@ -599,17 +824,24 @@ "type": "string", "id": 1, "options": { + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "logging.googleapis.com/Log" } }, "resource": { "type": "google.api.MonitoredResource", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "labels": { "keyType": "string", "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "entries": { "rule": "repeated", @@ -621,11 +853,17 @@ }, "partialSuccess": { "type": "bool", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "dryRun": { "type": "bool", - "id": 6 + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -643,14 +881,6 @@ }, "ListLogEntriesRequest": { "fields": { - "projectIds": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, "resourceNames": { "rule": "repeated", "type": "string", @@ -662,19 +892,31 @@ }, "filter": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "orderBy": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageSize": { "type": "int32", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -695,11 +937,17 @@ "fields": { "pageSize": { "type": "int32", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -722,16 +970,23 @@ "type": "string", "id": 1, "options": { + "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" } }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -766,11 +1021,17 @@ "fields": { "logName": { "type": "string", - "id": 12 + "id": 12, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "resource": { "type": "google.api.MonitoredResource", - "id": 8 + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "protoPayload": { "type": "google.protobuf.Any", @@ -786,55 +1047,81 @@ }, "timestamp": { "type": "google.protobuf.Timestamp", - "id": 9 + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "receiveTimestamp": { "type": "google.protobuf.Timestamp", - "id": 24 + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "severity": { "type": "google.logging.type.LogSeverity", - "id": 10 + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "insertId": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "httpRequest": { "type": "google.logging.type.HttpRequest", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "labels": { "keyType": "string", "type": "string", - "id": 11 - }, - "metadata": { - "type": "google.api.MonitoredResourceMetadata", - "id": 25, + "id": 11, "options": { - "deprecated": true + "(google.api.field_behavior)": "OPTIONAL" } }, "operation": { "type": "LogEntryOperation", - "id": 15 + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "trace": { "type": "string", - "id": 22 + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "spanId": { "type": "string", - "id": 27 + "id": 27, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "traceSampled": { "type": "bool", - "id": 30 + "id": 30, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "sourceLocation": { "type": "LogEntrySourceLocation", - "id": 23 + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -842,19 +1129,31 @@ "fields": { "id": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "producer": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "first": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "last": { "type": "bool", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -862,15 +1161,24 @@ "fields": { "file": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "line": { "type": "int64", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "function": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -926,46 +1234,73 @@ }, "LogMetric": { "options": { - "(google.api.resource).type": "logging.googleapis.com/Metric", + "(google.api.resource).type": "logging.googleapis.com/LogMetric", "(google.api.resource).pattern": "projects/{project}/metrics/{metric}" }, "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "description": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "filter": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "metricDescriptor": { "type": "google.api.MetricDescriptor", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "valueExtractor": { "type": "string", - "id": 6 + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "labelExtractors": { "keyType": "string", "type": "string", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "bucketOptions": { "type": "google.api.Distribution.BucketOptions", - "id": 8 + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 9 + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 10 + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "version": { "type": "ApiVersion", @@ -996,11 +1331,17 @@ }, "pageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageSize": { "type": "int32", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1024,7 +1365,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Metric" + "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" } } } @@ -1036,7 +1377,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Metric" + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogMetric" } }, "metric": { @@ -1055,7 +1396,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Metric" + "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" } }, "metric": { @@ -1074,7 +1415,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Metric" + "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" } } } diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js index 2ac43f7de96..bd057e9db64 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ b/handwritten/logging/src/v2/config_service_v2_client.js @@ -125,44 +125,25 @@ class ConfigServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - billingPathTemplate: new gaxModule.PathTemplate( + billingAccountPathTemplate: new gaxModule.PathTemplate( 'billingAccounts/{billing_account}' ), - billingExclusionPathTemplate: new gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/exclusions/{exclusion}' - ), - billingSinkPathTemplate: new gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/sinks/{sink}' - ), - exclusionPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/exclusions/{exclusion}' - ), folderPathTemplate: new gaxModule.PathTemplate('folders/{folder}'), - folderExclusionPathTemplate: new gaxModule.PathTemplate( - 'folders/{folder}/exclusions/{exclusion}' - ), - folderSinkPathTemplate: new gaxModule.PathTemplate( - 'folders/{folder}/sinks/{sink}' - ), organizationPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}' ), - organizationExclusionPathTemplate: new gaxModule.PathTemplate( - 'organizations/{organization}/exclusions/{exclusion}' - ), - organizationSinkPathTemplate: new gaxModule.PathTemplate( - 'organizations/{organization}/sinks/{sink}' - ), projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - sinkPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/sinks/{sink}' - ), }; // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { + listBuckets: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'buckets' + ), listSinks: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -200,6 +181,9 @@ class ConfigServiceV2Client { // Iterate over each of the methods that the service provides // and create an API call method for each. const configServiceV2StubMethods = [ + 'listBuckets', + 'getBucket', + 'updateBucket', 'listSinks', 'getSink', 'createSink', @@ -279,6 +263,339 @@ class ConfigServiceV2Client { // -- Service calls -- // ------------------- + /** + * Lists buckets (Beta). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {number} [request.pageSize] + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [LogBucket]{@link google.logging.v2.LogBucket}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListBucketsResponse]{@link google.logging.v2.ListBucketsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogBucket]{@link google.logging.v2.LogBucket}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogBucket]{@link google.logging.v2.LogBucket} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListBucketsResponse]{@link google.logging.v2.ListBucketsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * const client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * const parent = ''; + * + * client.listBuckets({parent: parent}) + * .then(responses => { + * const resources = responses[0]; + * for (const resource of resources) { + * // doThingsWith(resource) + * } + * }) + * .catch(err => { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * const parent = ''; + * + * + * const options = {autoPaginate: false}; + * const callback = responses => { + * // The actual resources in a response. + * const resources = responses[0]; + * // The next request if the response shows that there are more responses. + * const nextRequest = responses[1]; + * // The actual response object, if necessary. + * // const rawResponse = responses[2]; + * for (const resource of resources) { + * // doThingsWith(resource); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listBuckets(nextRequest, options).then(callback); + * } + * } + * client.listBuckets({parent: parent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listBuckets(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); + + return this._innerApiCalls.listBuckets(request, options, callback); + } + + /** + * Equivalent to {@link listBuckets}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listBuckets} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {number} [request.pageSize] + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @returns {Stream} + * An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * const client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * const parent = ''; + * client.listBucketsStream({parent: parent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listBucketsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listBuckets.createStream( + this._innerApiCalls.listBuckets, + request, + options + ); + } + + /** + * Gets a bucket (Beta). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the bucket: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * const client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * const name = ''; + * client.getBucket({name: name}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getBucket(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); + + return this._innerApiCalls.getBucket(request, options, callback); + } + + /** + * Updates a bucket. This method replaces the following fields in the + * existing bucket with values from the new bucket: `retention_period` + * + * If the retention period is decreased and the bucket is locked, + * FAILED_PRECONDITION will be returned. + * + * If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + * will be returned. + * + * A buckets region may not be modified after it is created. + * This method is in Beta. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the bucket to update. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + * requires permission "resourcemanager.projects.updateLiens" to set the + * locked property + * @param {Object} request.bucket + * Required. The updated bucket. + * + * This object should have the same structure as [LogBucket]{@link google.logging.v2.LogBucket} + * @param {Object} request.updateMask + * Required. Field mask that specifies the fields in `bucket` that need an update. A + * bucket field will be overwritten if, and only if, it is in the update + * mask. `name` and output only fields cannot be updated. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * + * Example: `updateMask=retention_days`. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const logging = require('@google-cloud/logging'); + * + * const client = new logging.v2.ConfigServiceV2Client({ + * // optional auth parameters. + * }); + * + * const name = ''; + * const bucket = {}; + * const updateMask = {}; + * const request = { + * name: name, + * bucket: bucket, + * updateMask: updateMask, + * }; + * client.updateBucket(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateBucket(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); + + return this._innerApiCalls.updateBucket(request, options, callback); + } + /** * Lists sinks. * @@ -479,8 +796,8 @@ class ConfigServiceV2Client { * // optional auth parameters. * }); * - * const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - * client.getSink({sinkName: formattedSinkName}) + * const sinkName = ''; + * client.getSink({sinkName: sinkName}) * .then(responses => { * const response = responses[0]; * // doThingsWith(response) @@ -603,8 +920,8 @@ class ConfigServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.sinkName - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: + * 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]" @@ -613,8 +930,8 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/sinks/my-sink-id"`. * @param {Object} request.sink - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. + * Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. * * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * @param {boolean} [request.uniqueWriterIdentity] @@ -665,10 +982,10 @@ class ConfigServiceV2Client { * // optional auth parameters. * }); * - * const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + * const sinkName = ''; * const sink = {}; * const request = { - * sinkName: formattedSinkName, + * sinkName: sinkName, * sink: sink, * }; * client.updateSink(request) @@ -705,8 +1022,8 @@ class ConfigServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.sinkName - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: + * 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]" @@ -730,8 +1047,8 @@ class ConfigServiceV2Client { * // optional auth parameters. * }); * - * const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); - * client.deleteSink({sinkName: formattedSinkName}).catch(err => { + * const sinkName = ''; + * client.deleteSink({sinkName: sinkName}).catch(err => { * console.error(err); * }); */ @@ -953,8 +1270,8 @@ class ConfigServiceV2Client { * // optional auth parameters. * }); * - * const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - * client.getExclusion({name: formattedName}) + * const name = ''; + * client.getExclusion({name: name}) * .then(responses => { * const response = responses[0]; * // doThingsWith(response) @@ -1069,13 +1386,13 @@ class ConfigServiceV2Client { * * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * @param {Object} request.exclusion - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. + * Required. New values for the existing exclusion. Only the fields specified in + * `update_mask` are relevant. * * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} * @param {Object} request.updateMask - * Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the + * Required. A non-empty list of fields to change in the existing exclusion. New values + * for the fields are taken from the corresponding fields in the * LogExclusion included in this request. Fields not mentioned in * `update_mask` are not changed and are ignored in the request. * @@ -1102,11 +1419,11 @@ class ConfigServiceV2Client { * // optional auth parameters. * }); * - * const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + * const name = ''; * const exclusion = {}; * const updateMask = {}; * const request = { - * name: formattedName, + * name: name, * exclusion: exclusion, * updateMask: updateMask, * }; @@ -1167,8 +1484,8 @@ class ConfigServiceV2Client { * // optional auth parameters. * }); * - * const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); - * client.deleteExclusion({name: formattedName}).catch(err => { + * const name = ''; + * client.deleteExclusion({name: name}).catch(err => { * console.error(err); * }); */ @@ -1202,7 +1519,7 @@ class ConfigServiceV2Client { * * @param {Object} request * The request object that will be sent. - * @param {string} [request.name] + * @param {string} request.name * Required. The resource for which to retrieve CMEK settings. * * "projects/[PROJECT_ID]/cmekSettings" @@ -1234,8 +1551,8 @@ class ConfigServiceV2Client { * // optional auth parameters. * }); * - * - * client.getCmekSettings({}) + * const name = ''; + * client.getCmekSettings({name: name}) * .then(responses => { * const response = responses[0]; * // doThingsWith(response) @@ -1280,7 +1597,7 @@ class ConfigServiceV2Client { * * @param {Object} request * The request object that will be sent. - * @param {string} [request.name] + * @param {string} request.name * Required. The resource name for the CMEK settings to update. * * "projects/[PROJECT_ID]/cmekSettings" @@ -1293,7 +1610,7 @@ class ConfigServiceV2Client { * Note: CMEK for the Logs Router can currently only be configured for GCP * organizations. Once configured, it applies to all projects and folders in * the GCP organization. - * @param {Object} [request.cmekSettings] + * @param {Object} request.cmekSettings * Required. The CMEK settings to update. * * See [Enabling CMEK for Logs @@ -1329,8 +1646,13 @@ class ConfigServiceV2Client { * // optional auth parameters. * }); * - * - * client.updateCmekSettings({}) + * const name = ''; + * const cmekSettings = {}; + * const request = { + * name: name, + * cmekSettings: cmekSettings, + * }; + * client.updateCmekSettings(request) * .then(responses => { * const response = responses[0]; * // doThingsWith(response) @@ -1362,59 +1684,17 @@ class ConfigServiceV2Client { // -------------------- /** - * Return a fully-qualified billing resource name string. + * Return a fully-qualified billing_account resource name string. * * @param {String} billingAccount * @returns {String} */ - billingPath(billingAccount) { - return this._pathTemplates.billingPathTemplate.render({ + billingAccountPath(billingAccount) { + return this._pathTemplates.billingAccountPathTemplate.render({ billing_account: billingAccount, }); } - /** - * Return a fully-qualified billing_exclusion resource name string. - * - * @param {String} billingAccount - * @param {String} exclusion - * @returns {String} - */ - billingExclusionPath(billingAccount, exclusion) { - return this._pathTemplates.billingExclusionPathTemplate.render({ - billing_account: billingAccount, - exclusion: exclusion, - }); - } - - /** - * Return a fully-qualified billing_sink resource name string. - * - * @param {String} billingAccount - * @param {String} sink - * @returns {String} - */ - billingSinkPath(billingAccount, sink) { - return this._pathTemplates.billingSinkPathTemplate.render({ - billing_account: billingAccount, - sink: sink, - }); - } - - /** - * Return a fully-qualified exclusion resource name string. - * - * @param {String} project - * @param {String} exclusion - * @returns {String} - */ - exclusionPath(project, exclusion) { - return this._pathTemplates.exclusionPathTemplate.render({ - project: project, - exclusion: exclusion, - }); - } - /** * Return a fully-qualified folder resource name string. * @@ -1427,34 +1707,6 @@ class ConfigServiceV2Client { }); } - /** - * Return a fully-qualified folder_exclusion resource name string. - * - * @param {String} folder - * @param {String} exclusion - * @returns {String} - */ - folderExclusionPath(folder, exclusion) { - return this._pathTemplates.folderExclusionPathTemplate.render({ - folder: folder, - exclusion: exclusion, - }); - } - - /** - * Return a fully-qualified folder_sink resource name string. - * - * @param {String} folder - * @param {String} sink - * @returns {String} - */ - folderSinkPath(folder, sink) { - return this._pathTemplates.folderSinkPathTemplate.render({ - folder: folder, - sink: sink, - }); - } - /** * Return a fully-qualified organization resource name string. * @@ -1467,34 +1719,6 @@ class ConfigServiceV2Client { }); } - /** - * Return a fully-qualified organization_exclusion resource name string. - * - * @param {String} organization - * @param {String} exclusion - * @returns {String} - */ - organizationExclusionPath(organization, exclusion) { - return this._pathTemplates.organizationExclusionPathTemplate.render({ - organization: organization, - exclusion: exclusion, - }); - } - - /** - * Return a fully-qualified organization_sink resource name string. - * - * @param {String} organization - * @param {String} sink - * @returns {String} - */ - organizationSinkPath(organization, sink) { - return this._pathTemplates.organizationSinkPathTemplate.render({ - organization: organization, - sink: sink, - }); - } - /** * Return a fully-qualified project resource name string. * @@ -1508,105 +1732,18 @@ class ConfigServiceV2Client { } /** - * Return a fully-qualified sink resource name string. + * Parse the billingAccountName from a billing_account resource. * - * @param {String} project - * @param {String} sink - * @returns {String} - */ - sinkPath(project, sink) { - return this._pathTemplates.sinkPathTemplate.render({ - project: project, - sink: sink, - }); - } - - /** - * Parse the billingName from a billing resource. - * - * @param {String} billingName - * A fully-qualified path representing a billing resources. + * @param {String} billingAccountName + * A fully-qualified path representing a billing_account resources. * @returns {String} - A string representing the billing_account. */ - matchBillingAccountFromBillingName(billingName) { - return this._pathTemplates.billingPathTemplate.match(billingName) - .billing_account; - } - - /** - * Parse the billingExclusionName from a billing_exclusion resource. - * - * @param {String} billingExclusionName - * A fully-qualified path representing a billing_exclusion resources. - * @returns {String} - A string representing the billing_account. - */ - matchBillingAccountFromBillingExclusionName(billingExclusionName) { - return this._pathTemplates.billingExclusionPathTemplate.match( - billingExclusionName + matchBillingAccountFromBillingAccountName(billingAccountName) { + return this._pathTemplates.billingAccountPathTemplate.match( + billingAccountName ).billing_account; } - /** - * Parse the billingExclusionName from a billing_exclusion resource. - * - * @param {String} billingExclusionName - * A fully-qualified path representing a billing_exclusion resources. - * @returns {String} - A string representing the exclusion. - */ - matchExclusionFromBillingExclusionName(billingExclusionName) { - return this._pathTemplates.billingExclusionPathTemplate.match( - billingExclusionName - ).exclusion; - } - - /** - * Parse the billingSinkName from a billing_sink resource. - * - * @param {String} billingSinkName - * A fully-qualified path representing a billing_sink resources. - * @returns {String} - A string representing the billing_account. - */ - matchBillingAccountFromBillingSinkName(billingSinkName) { - return this._pathTemplates.billingSinkPathTemplate.match(billingSinkName) - .billing_account; - } - - /** - * Parse the billingSinkName from a billing_sink resource. - * - * @param {String} billingSinkName - * A fully-qualified path representing a billing_sink resources. - * @returns {String} - A string representing the sink. - */ - matchSinkFromBillingSinkName(billingSinkName) { - return this._pathTemplates.billingSinkPathTemplate.match(billingSinkName) - .sink; - } - - /** - * Parse the exclusionName from a exclusion resource. - * - * @param {String} exclusionName - * A fully-qualified path representing a exclusion resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromExclusionName(exclusionName) { - return this._pathTemplates.exclusionPathTemplate.match(exclusionName) - .project; - } - - /** - * Parse the exclusionName from a exclusion resource. - * - * @param {String} exclusionName - * A fully-qualified path representing a exclusion resources. - * @returns {String} - A string representing the exclusion. - */ - matchExclusionFromExclusionName(exclusionName) { - return this._pathTemplates.exclusionPathTemplate.match(exclusionName) - .exclusion; - } - /** * Parse the folderName from a folder resource. * @@ -1618,56 +1755,6 @@ class ConfigServiceV2Client { return this._pathTemplates.folderPathTemplate.match(folderName).folder; } - /** - * Parse the folderExclusionName from a folder_exclusion resource. - * - * @param {String} folderExclusionName - * A fully-qualified path representing a folder_exclusion resources. - * @returns {String} - A string representing the folder. - */ - matchFolderFromFolderExclusionName(folderExclusionName) { - return this._pathTemplates.folderExclusionPathTemplate.match( - folderExclusionName - ).folder; - } - - /** - * Parse the folderExclusionName from a folder_exclusion resource. - * - * @param {String} folderExclusionName - * A fully-qualified path representing a folder_exclusion resources. - * @returns {String} - A string representing the exclusion. - */ - matchExclusionFromFolderExclusionName(folderExclusionName) { - return this._pathTemplates.folderExclusionPathTemplate.match( - folderExclusionName - ).exclusion; - } - - /** - * Parse the folderSinkName from a folder_sink resource. - * - * @param {String} folderSinkName - * A fully-qualified path representing a folder_sink resources. - * @returns {String} - A string representing the folder. - */ - matchFolderFromFolderSinkName(folderSinkName) { - return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) - .folder; - } - - /** - * Parse the folderSinkName from a folder_sink resource. - * - * @param {String} folderSinkName - * A fully-qualified path representing a folder_sink resources. - * @returns {String} - A string representing the sink. - */ - matchSinkFromFolderSinkName(folderSinkName) { - return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) - .sink; - } - /** * Parse the organizationName from a organization resource. * @@ -1680,58 +1767,6 @@ class ConfigServiceV2Client { .organization; } - /** - * Parse the organizationExclusionName from a organization_exclusion resource. - * - * @param {String} organizationExclusionName - * A fully-qualified path representing a organization_exclusion resources. - * @returns {String} - A string representing the organization. - */ - matchOrganizationFromOrganizationExclusionName(organizationExclusionName) { - return this._pathTemplates.organizationExclusionPathTemplate.match( - organizationExclusionName - ).organization; - } - - /** - * Parse the organizationExclusionName from a organization_exclusion resource. - * - * @param {String} organizationExclusionName - * A fully-qualified path representing a organization_exclusion resources. - * @returns {String} - A string representing the exclusion. - */ - matchExclusionFromOrganizationExclusionName(organizationExclusionName) { - return this._pathTemplates.organizationExclusionPathTemplate.match( - organizationExclusionName - ).exclusion; - } - - /** - * Parse the organizationSinkName from a organization_sink resource. - * - * @param {String} organizationSinkName - * A fully-qualified path representing a organization_sink resources. - * @returns {String} - A string representing the organization. - */ - matchOrganizationFromOrganizationSinkName(organizationSinkName) { - return this._pathTemplates.organizationSinkPathTemplate.match( - organizationSinkName - ).organization; - } - - /** - * Parse the organizationSinkName from a organization_sink resource. - * - * @param {String} organizationSinkName - * A fully-qualified path representing a organization_sink resources. - * @returns {String} - A string representing the sink. - */ - matchSinkFromOrganizationSinkName(organizationSinkName) { - return this._pathTemplates.organizationSinkPathTemplate.match( - organizationSinkName - ).sink; - } - /** * Parse the projectName from a project resource. * @@ -1742,28 +1777,6 @@ class ConfigServiceV2Client { matchProjectFromProjectName(projectName) { return this._pathTemplates.projectPathTemplate.match(projectName).project; } - - /** - * Parse the sinkName from a sink resource. - * - * @param {String} sinkName - * A fully-qualified path representing a sink resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromSinkName(sinkName) { - return this._pathTemplates.sinkPathTemplate.match(sinkName).project; - } - - /** - * Parse the sinkName from a sink resource. - * - * @param {String} sinkName - * A fully-qualified path representing a sink resources. - * @returns {String} - A string representing the sink. - */ - matchSinkFromSinkName(sinkName) { - return this._pathTemplates.sinkPathTemplate.match(sinkName).sink; - } } module.exports = ConfigServiceV2Client; diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index 00582c9d6cb..1acb08853ca 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -4,14 +4,9 @@ "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", - "INTERNAL", "UNAVAILABLE" ], - "non_idempotent": [], - "idempotent2": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] + "non_idempotent": [] }, "retry_params": { "default": { @@ -22,18 +17,24 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000 - }, - "write_sink": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 } }, "methods": { + "ListBuckets": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetBucket": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "UpdateBucket": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ListSinks": { "timeout_millis": 60000, "retry_codes_name": "idempotent", @@ -45,18 +46,18 @@ "retry_params_name": "default" }, "CreateSink": { - "timeout_millis": 120000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateSink": { - "timeout_millis": 120000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListExclusions": { @@ -81,12 +82,12 @@ }, "DeleteExclusion": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateCmekSettings": { diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js index be4e189fc16..8f6519290c0 100644 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js @@ -100,37 +100,4 @@ const MonitoredResourceDescriptor = { */ const MonitoredResource = { // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Auxiliary metadata for a MonitoredResource object. - * MonitoredResource objects contain the minimum set of information to - * uniquely identify a monitored resource instance. There is some other useful - * auxiliary metadata. Monitoring and Logging use an ingestion - * pipeline to extract metadata for cloud resources of all types, and store - * the metadata in this message. - * - * @property {Object} systemLabels - * Output only. Values for predefined system metadata labels. - * System labels are a kind of metadata extracted by Google, including - * "machine_image", "vpc", "subnet_id", - * "security_group", "name", etc. - * System label values can be only strings, Boolean values, or a list of - * strings. For example: - * - * { "name": "my-test-instance", - * "security_group": ["a", "b", "c"], - * "spot_instance": false } - * - * This object should have the same structure as [Struct]{@link google.protobuf.Struct} - * - * @property {Object.} userLabels - * Output only. A map of user-defined metadata labels. - * - * @typedef MonitoredResourceMetadata - * @memberof google.api - * @see [google.api.MonitoredResourceMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} - */ -const MonitoredResourceMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js index ae902a1a178..3f0e80f3e1b 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js @@ -26,9 +26,9 @@ * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" * - * A project number may optionally be used in place of PROJECT_ID. The project - * number is translated to its corresponding PROJECT_ID internally and the - * `log_name` field will contain PROJECT_ID in queries and exports. + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. * * `[LOG_ID]` must be URL-encoded within `log_name`. Example: * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -73,12 +73,11 @@ * This object should have the same structure as [Struct]{@link google.protobuf.Struct} * * @property {Object} timestamp - * Optional. The time the event described by the log entry occurred. This - * time is used to compute the log entry's age and to enforce the logs - * retention period. If this field is omitted in a new log entry, then Logging - * assigns it the current time. Timestamps have nanosecond accuracy, but - * trailing zeros in the fractional seconds might be omitted when the - * timestamp is displayed. + * Optional. The time the event described by the log entry occurred. This time is used + * to compute the log entry's age and to enforce the logs retention period. + * If this field is omitted in a new log entry, then Logging assigns it the + * current time. Timestamps have nanosecond accuracy, but trailing zeros in + * the fractional seconds might be omitted when the timestamp is displayed. * * Incoming log entries should have timestamps that are no more than the [logs * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours @@ -94,14 +93,13 @@ * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {number} severity - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. + * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. * * The number should be among the values of [LogSeverity]{@link google.logging.type.LogSeverity} * * @property {string} insertId - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same + * Optional. A unique identifier for the log entry. If you provide a value, then + * Logging considers other log entries in the same project, with the same * `timestamp`, and with the same `insert_id` to be duplicates which are * removed in a single query result. However, there are no guarantees of * de-duplication in the export of logs. @@ -113,8 +111,8 @@ * the same `log_name` and `timestamp` values. * * @property {Object} httpRequest - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. + * Optional. Information about the HTTP request associated with this log entry, if + * applicable. * * This object should have the same structure as [HttpRequest]{@link google.logging.type.HttpRequest} * @@ -122,19 +120,6 @@ * Optional. A set of user-defined (key, value) data that provides additional * information about the log entry. * - * @property {Object} metadata - * Deprecated. Output only. Additional metadata about the monitored resource. - * - * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - * this field populated for GKE versions older than 1.12.6. For GKE versions - * 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes - * pod labels that used to be in `metadata.userLabels` will now be present in - * the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system - * labels that were present in the `metadata.systemLabels` field will no - * longer be available in the LogEntry. - * - * This object should have the same structure as [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} - * * @property {Object} operation * Optional. Information about an operation associated with the log entry, if * applicable. @@ -142,9 +127,9 @@ * This object should have the same structure as [LogEntryOperation]{@link google.logging.v2.LogEntryOperation} * * @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: + * 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} spanId @@ -152,7 +137,7 @@ * * For Trace spans, this is the same format that the Trace API v2 uses: a * 16-character hexadecimal encoding of an 8-byte array, such as - * "000000000000004a". + * `000000000000004a`. * * @property {boolean} traceSampled * Optional. The sampling decision of the trace associated with the log entry. @@ -164,8 +149,7 @@ * request correlation identifier. The default is False. * * @property {Object} sourceLocation - * Optional. Source code location information associated with the log entry, - * if any. + * Optional. Source code location information associated with the log entry, if any. * * This object should have the same structure as [LogEntrySourceLocation]{@link google.logging.v2.LogEntrySourceLocation} * diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js index 168a458728d..82725e7310d 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js @@ -57,10 +57,10 @@ const DeleteLogRequest = { * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" * - * The permission logging.logEntries.create is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * logName or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * * @property {Object} resource * Optional. A default monitored resource object that is assigned to all log @@ -129,7 +129,6 @@ const WriteLogEntriesRequest = { /** * Result returned from WriteLogEntries. - * empty * @typedef WriteLogEntriesResponse * @memberof google.logging.v2 * @see [google.logging.v2.WriteLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} @@ -141,11 +140,6 @@ const WriteLogEntriesResponse = { /** * The parameters to `ListLogEntries`. * - * @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"`. - * * @property {string[]} resourceNames * Required. Names of one or more parent resources from which to * retrieve log entries: diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js index 18c2c744a3c..3872e8d977c 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js @@ -15,6 +15,54 @@ // Note: this file is purely for documentation. Any contents are not expected // to be loaded as the JS file. +/** + * Describes a repository of logs (Beta). + * + * @property {string} name + * The resource name of the bucket. + * For example: + * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The + * supported locations are: + * "global" + * "us-central1" + * + * For the location of `global` it is unspecified where logs are actually + * stored. + * Once a bucket has been created, the location can not be changed. + * + * @property {string} description + * Describes this bucket. + * + * @property {Object} createTime + * Output only. The creation timestamp of the bucket. This is not set for any of the + * default buckets. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} updateTime + * Output only. The last update timestamp of the bucket. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {number} retentionDays + * Logs will be retained by default for this amount of time, after which they + * will automatically be deleted. The minimum retention period is 1 day. + * If this value is set to zero at bucket creation time, the default time of + * 30 days will be used. + * + * @property {number} lifecycleState + * Output only. The bucket lifecycle state. + * + * The number should be among the values of [LifecycleState]{@link google.logging.v2.LifecycleState} + * + * @typedef LogBucket + * @memberof google.logging.v2 + * @see [google.logging.v2.LogBucket definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const LogBucket = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * Describes a sink used to export log entries to one of the following * destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a @@ -23,11 +71,11 @@ * folder. * * @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. First character has to be alphanumeric. + * 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. + * First character has to be alphanumeric. * * @property {string} destination * Required. The export destination: @@ -63,13 +111,11 @@ * The number should be among the values of [VersionFormat]{@link google.logging.v2.VersionFormat} * * @property {string} writerIdentity - * Output only. An IAM identity—a service account or group—under - * which Logging writes the exported log entries to the sink's destination. - * This field is set by - * sinks.create - * and - * sinks.update - * based on the value of `unique_writer_identity` in those methods. + * Output only. An IAM identity–a service account or group—under which Logging + * writes the exported log entries to the sink's destination. This field is + * set by sinks.create and + * sinks.update based on the + * value 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, @@ -112,16 +158,6 @@ * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * - * @property {Object} startTime - * Do not use. This field is ignored. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} endTime - * Do not use. This field is ignored. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * * @typedef LogSink * @memberof google.logging.v2 * @see [google.logging.v2.LogSink definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} @@ -184,6 +220,124 @@ const BigQueryOptions = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * The parameters to `ListBuckets` (Beta). + * + * @property {string} parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * + * @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 {number} 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. + * + * @typedef ListBucketsRequest + * @memberof google.logging.v2 + * @see [google.logging.v2.ListBucketsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const ListBucketsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The response from ListBuckets (Beta). + * + * @property {Object[]} buckets + * A list of buckets. + * + * This object should have the same structure as [LogBucket]{@link google.logging.v2.LogBucket} + * + * @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`. + * + * @typedef ListBucketsResponse + * @memberof google.logging.v2 + * @see [google.logging.v2.ListBucketsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const ListBucketsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to `UpdateBucket` (Beta). + * + * @property {string} name + * Required. The full resource name of the bucket to update. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + * requires permission "resourcemanager.projects.updateLiens" to set the + * locked property + * + * @property {Object} bucket + * Required. The updated bucket. + * + * This object should have the same structure as [LogBucket]{@link google.logging.v2.LogBucket} + * + * @property {Object} updateMask + * Required. Field mask that specifies the fields in `bucket` that need an update. A + * bucket field will be overwritten if, and only if, it is in the update + * mask. `name` and output only fields cannot be updated. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * + * Example: `updateMask=retention_days`. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @typedef UpdateBucketRequest + * @memberof google.logging.v2 + * @see [google.logging.v2.UpdateBucketRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const UpdateBucketRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The parameters to `GetBucket` (Beta). + * + * @property {string} name + * Required. The resource name of the bucket: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * + * @typedef GetBucketRequest + * @memberof google.logging.v2 + * @see [google.logging.v2.GetBucketRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} + */ +const GetBucketRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * The parameters to `ListSinks`. * @@ -300,8 +454,8 @@ const CreateSinkRequest = { * The parameters to `UpdateSink`. * * @property {string} sinkName - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: + * 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]" @@ -311,8 +465,8 @@ const CreateSinkRequest = { * Example: `"projects/my-project-id/sinks/my-sink-id"`. * * @property {Object} sink - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. + * Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. * * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} * @@ -359,8 +513,8 @@ const UpdateSinkRequest = { * The parameters to `DeleteSink`. * * @property {string} sinkName - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: + * 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]" @@ -386,10 +540,10 @@ const DeleteSinkRequest = { * apply to child resources, and that you can't exclude audit log entries. * * @property {string} name - * Required. A client-assigned identifier, such as - * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - * can include only letters, digits, underscores, hyphens, and periods. - * First character has to be alphanumeric. + * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. + * Identifiers are limited to 100 characters and can include only letters, + * digits, underscores, hyphens, and periods. First character has to be + * alphanumeric. * * @property {string} description * Optional. A description of this exclusion. @@ -545,14 +699,14 @@ const CreateExclusionRequest = { * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. * * @property {Object} exclusion - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. + * Required. New values for the existing exclusion. Only the fields specified in + * `update_mask` are relevant. * * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} * * @property {Object} updateMask - * Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the + * Required. A non-empty list of fields to change in the existing exclusion. New values + * for the fields are taken from the corresponding fields in the * LogExclusion included in this request. Fields not mentioned in * `update_mask` are not changed and are ignored in the request. * @@ -679,7 +833,7 @@ const UpdateCmekSettingsRequest = { * for more information. * * @property {string} name - * Output Only. The resource name of the CMEK settings. + * Output only. The resource name of the CMEK settings. * * @property {string} kmsKeyName * The resource name for the configured Cloud KMS key. @@ -708,8 +862,8 @@ const UpdateCmekSettingsRequest = { * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. * * @property {string} serviceAccountId - * Output Only. The service account that will be used by the Logs Router to - * access your Cloud KMS key. + * Output only. The service account that will be used by the Logs Router to access your + * Cloud KMS key. * * Before enabling CMEK for Logs Router, you must first assign the role * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that @@ -726,4 +880,29 @@ const UpdateCmekSettingsRequest = { */ const CmekSettings = { // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * LogBucket lifecycle states (Beta). + * + * @enum {number} + * @memberof google.logging.v2 + */ +const LifecycleState = { + + /** + * Unspecified state. This is only used/useful for distinguishing + * unset values. + */ + LIFECYCLE_STATE_UNSPECIFIED: 0, + + /** + * The normal and active state. + */ + ACTIVE: 1, + + /** + * The bucket has been marked for deletion by the user. + */ + DELETE_REQUESTED: 2 }; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js index 5afdd0c2405..8e585883eeb 100644 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js +++ b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js @@ -44,8 +44,8 @@ * The maximum length of the description is 8000 characters. * * @property {string} filter - * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) - * which is used to match log entries. + * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is + * used to match log entries. * Example: * * "resource.type=gae_app AND severity>=ERROR" diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js index b7912abd9f4..de6296f5872 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ b/handwritten/logging/src/v2/logging_service_v2_client.js @@ -125,25 +125,13 @@ class LoggingServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - billingPathTemplate: new gaxModule.PathTemplate( + billingAccountPathTemplate: new gaxModule.PathTemplate( 'billingAccounts/{billing_account}' ), - billingLogPathTemplate: new gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/logs/{log}' - ), folderPathTemplate: new gaxModule.PathTemplate('folders/{folder}'), - folderLogPathTemplate: new gaxModule.PathTemplate( - 'folders/{folder}/logs/{log}' - ), - logPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/logs/{log}' - ), organizationPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}' ), - organizationLogPathTemplate: new gaxModule.PathTemplate( - 'organizations/{organization}/logs/{log}' - ), projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), }; @@ -168,23 +156,6 @@ class LoggingServiceV2Client { ), }; - const protoFilesRoot = opts.fallback - ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) - : gaxModule.protobuf.loadSync(nodejsProtoPath); - - // Some methods on this API support automatically batching - // requests; denote this. - this._descriptors.batching = { - writeLogEntries: new gaxModule.BundleDescriptor( - 'entries', - ['logName', 'resource', 'labels'], - null, - gax.createByteLengthFunction( - protoFilesRoot.lookup('google.logging.v2.LogEntry') - ) - ), - }; - // Put together the default options sent with requests. const defaults = gaxGrpc.constructSettings( 'google.logging.v2.LoggingServiceV2', @@ -228,8 +199,7 @@ class LoggingServiceV2Client { this._innerApiCalls[methodName] = gaxModule.createApiCall( innerCallPromise, defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.batching[methodName] + this._descriptors.page[methodName] ); } } @@ -320,8 +290,8 @@ class LoggingServiceV2Client { * // optional auth parameters. * }); * - * const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); - * client.deleteLog({logName: formattedLogName}).catch(err => { + * const logName = ''; + * client.deleteLog({logName: logName}).catch(err => { * console.error(err); * }); */ @@ -394,10 +364,10 @@ class LoggingServiceV2Client { * "projects/my-project-id/logs/syslog" * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" * - * The permission logging.logEntries.create is needed on each - * project, organization, billing account, or folder that is receiving - * new log entries, whether the resource is specified in - * logName or in an individual log entry. + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. * @param {Object} [request.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: @@ -482,10 +452,6 @@ class LoggingServiceV2Client { * * * Projects listed in the `project_ids` field are added to this list. - * @param {string[]} [request.projectIds] - * Deprecated. Use `resource_names` instead. One or more project identifiers - * or project numbers from which to retrieve log entries. Example: - * `"my-project-1A"`. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that @@ -615,10 +581,6 @@ class LoggingServiceV2Client { * * * Projects listed in the `project_ids` field are added to this list. - * @param {string[]} [request.projectIds] - * Deprecated. Use `resource_names` instead. One or more project identifiers - * or project numbers from which to retrieve log entries. Example: - * `"my-project-1A"`. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that @@ -991,28 +953,14 @@ class LoggingServiceV2Client { // -------------------- /** - * Return a fully-qualified billing resource name string. - * - * @param {String} billingAccount - * @returns {String} - */ - billingPath(billingAccount) { - return this._pathTemplates.billingPathTemplate.render({ - billing_account: billingAccount, - }); - } - - /** - * Return a fully-qualified billing_log resource name string. + * Return a fully-qualified billing_account resource name string. * * @param {String} billingAccount - * @param {String} log * @returns {String} */ - billingLogPath(billingAccount, log) { - return this._pathTemplates.billingLogPathTemplate.render({ + billingAccountPath(billingAccount) { + return this._pathTemplates.billingAccountPathTemplate.render({ billing_account: billingAccount, - log: log, }); } @@ -1028,34 +976,6 @@ class LoggingServiceV2Client { }); } - /** - * Return a fully-qualified folder_log resource name string. - * - * @param {String} folder - * @param {String} log - * @returns {String} - */ - folderLogPath(folder, log) { - return this._pathTemplates.folderLogPathTemplate.render({ - folder: folder, - log: log, - }); - } - - /** - * Return a fully-qualified log resource name string. - * - * @param {String} project - * @param {String} log - * @returns {String} - */ - logPath(project, log) { - return this._pathTemplates.logPathTemplate.render({ - project: project, - log: log, - }); - } - /** * Return a fully-qualified organization resource name string. * @@ -1068,20 +988,6 @@ class LoggingServiceV2Client { }); } - /** - * Return a fully-qualified organization_log resource name string. - * - * @param {String} organization - * @param {String} log - * @returns {String} - */ - organizationLogPath(organization, log) { - return this._pathTemplates.organizationLogPathTemplate.render({ - organization: organization, - log: log, - }); - } - /** * Return a fully-qualified project resource name string. * @@ -1095,38 +1001,16 @@ class LoggingServiceV2Client { } /** - * Parse the billingName from a billing resource. + * Parse the billingAccountName from a billing_account resource. * - * @param {String} billingName - * A fully-qualified path representing a billing resources. + * @param {String} billingAccountName + * A fully-qualified path representing a billing_account resources. * @returns {String} - A string representing the billing_account. */ - matchBillingAccountFromBillingName(billingName) { - return this._pathTemplates.billingPathTemplate.match(billingName) - .billing_account; - } - - /** - * Parse the billingLogName from a billing_log resource. - * - * @param {String} billingLogName - * A fully-qualified path representing a billing_log resources. - * @returns {String} - A string representing the billing_account. - */ - matchBillingAccountFromBillingLogName(billingLogName) { - return this._pathTemplates.billingLogPathTemplate.match(billingLogName) - .billing_account; - } - - /** - * Parse the billingLogName from a billing_log resource. - * - * @param {String} billingLogName - * A fully-qualified path representing a billing_log resources. - * @returns {String} - A string representing the log. - */ - matchLogFromBillingLogName(billingLogName) { - return this._pathTemplates.billingLogPathTemplate.match(billingLogName).log; + matchBillingAccountFromBillingAccountName(billingAccountName) { + return this._pathTemplates.billingAccountPathTemplate.match( + billingAccountName + ).billing_account; } /** @@ -1140,51 +1024,6 @@ class LoggingServiceV2Client { return this._pathTemplates.folderPathTemplate.match(folderName).folder; } - /** - * Parse the folderLogName from a folder_log resource. - * - * @param {String} folderLogName - * A fully-qualified path representing a folder_log resources. - * @returns {String} - A string representing the folder. - */ - matchFolderFromFolderLogName(folderLogName) { - return this._pathTemplates.folderLogPathTemplate.match(folderLogName) - .folder; - } - - /** - * Parse the folderLogName from a folder_log resource. - * - * @param {String} folderLogName - * A fully-qualified path representing a folder_log resources. - * @returns {String} - A string representing the log. - */ - matchLogFromFolderLogName(folderLogName) { - return this._pathTemplates.folderLogPathTemplate.match(folderLogName).log; - } - - /** - * Parse the logName from a log resource. - * - * @param {String} logName - * A fully-qualified path representing a log resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromLogName(logName) { - return this._pathTemplates.logPathTemplate.match(logName).project; - } - - /** - * Parse the logName from a log resource. - * - * @param {String} logName - * A fully-qualified path representing a log resources. - * @returns {String} - A string representing the log. - */ - matchLogFromLogName(logName) { - return this._pathTemplates.logPathTemplate.match(logName).log; - } - /** * Parse the organizationName from a organization resource. * @@ -1197,32 +1036,6 @@ class LoggingServiceV2Client { .organization; } - /** - * Parse the organizationLogName from a organization_log resource. - * - * @param {String} organizationLogName - * A fully-qualified path representing a organization_log resources. - * @returns {String} - A string representing the organization. - */ - matchOrganizationFromOrganizationLogName(organizationLogName) { - return this._pathTemplates.organizationLogPathTemplate.match( - organizationLogName - ).organization; - } - - /** - * Parse the organizationLogName from a organization_log resource. - * - * @param {String} organizationLogName - * A fully-qualified path representing a organization_log resources. - * @returns {String} - A string representing the log. - */ - matchLogFromOrganizationLogName(organizationLogName) { - return this._pathTemplates.organizationLogPathTemplate.match( - organizationLogName - ).log; - } - /** * Parse the projectName from a project resource. * diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index e93f205572e..5d45d38cbbd 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -4,7 +4,6 @@ "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", - "INTERNAL", "UNAVAILABLE" ], "non_idempotent": [] @@ -18,36 +17,22 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000 - }, - "list": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 } }, "methods": { "DeleteLog": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - "bundling": { - "element_count_threshold": 1000, - "request_byte_threshold": 1048576, - "delay_threshold_millis": 50 - } + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" }, "ListLogEntries": { "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListMonitoredResourceDescriptors": { diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js index 1662d1a3fb1..8ac2c2606b1 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ b/handwritten/logging/src/v2/metrics_service_v2_client.js @@ -125,16 +125,9 @@ class MetricsServiceV2Client { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - billingPathTemplate: new gaxModule.PathTemplate( - 'billingAccounts/{billing_account}' - ), - folderPathTemplate: new gaxModule.PathTemplate('folders/{folder}'), - metricPathTemplate: new gaxModule.PathTemplate( + logMetricPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/metrics/{metric}' ), - organizationPathTemplate: new gaxModule.PathTemplate( - 'organizations/{organization}' - ), projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), }; @@ -435,7 +428,7 @@ class MetricsServiceV2Client { * // optional auth parameters. * }); * - * const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); * client.getLogMetric({metricName: formattedMetricName}) * .then(responses => { * const response = responses[0]; @@ -567,7 +560,7 @@ class MetricsServiceV2Client { * // optional auth parameters. * }); * - * const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); * const metric = {}; * const request = { * metricName: formattedMetricName, @@ -625,7 +618,7 @@ class MetricsServiceV2Client { * // optional auth parameters. * }); * - * const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + * const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); * client.deleteLogMetric({metricName: formattedMetricName}).catch(err => { * console.error(err); * }); @@ -653,55 +646,19 @@ class MetricsServiceV2Client { // -------------------- /** - * Return a fully-qualified billing resource name string. - * - * @param {String} billingAccount - * @returns {String} - */ - billingPath(billingAccount) { - return this._pathTemplates.billingPathTemplate.render({ - billing_account: billingAccount, - }); - } - - /** - * Return a fully-qualified folder resource name string. - * - * @param {String} folder - * @returns {String} - */ - folderPath(folder) { - return this._pathTemplates.folderPathTemplate.render({ - folder: folder, - }); - } - - /** - * Return a fully-qualified metric resource name string. + * Return a fully-qualified log_metric resource name string. * * @param {String} project * @param {String} metric * @returns {String} */ - metricPath(project, metric) { - return this._pathTemplates.metricPathTemplate.render({ + logMetricPath(project, metric) { + return this._pathTemplates.logMetricPathTemplate.render({ project: project, metric: metric, }); } - /** - * Return a fully-qualified organization resource name string. - * - * @param {String} organization - * @returns {String} - */ - organizationPath(organization) { - return this._pathTemplates.organizationPathTemplate.render({ - organization: organization, - }); - } - /** * Return a fully-qualified project resource name string. * @@ -715,60 +672,27 @@ class MetricsServiceV2Client { } /** - * Parse the billingName from a billing resource. - * - * @param {String} billingName - * A fully-qualified path representing a billing resources. - * @returns {String} - A string representing the billing_account. - */ - matchBillingAccountFromBillingName(billingName) { - return this._pathTemplates.billingPathTemplate.match(billingName) - .billing_account; - } - - /** - * Parse the folderName from a folder resource. + * Parse the logMetricName from a log_metric resource. * - * @param {String} folderName - * A fully-qualified path representing a folder resources. - * @returns {String} - A string representing the folder. - */ - matchFolderFromFolderName(folderName) { - return this._pathTemplates.folderPathTemplate.match(folderName).folder; - } - - /** - * Parse the metricName from a metric resource. - * - * @param {String} metricName - * A fully-qualified path representing a metric resources. + * @param {String} logMetricName + * A fully-qualified path representing a log_metric resources. * @returns {String} - A string representing the project. */ - matchProjectFromMetricName(metricName) { - return this._pathTemplates.metricPathTemplate.match(metricName).project; + matchProjectFromLogMetricName(logMetricName) { + return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + .project; } /** - * Parse the metricName from a metric resource. + * Parse the logMetricName from a log_metric resource. * - * @param {String} metricName - * A fully-qualified path representing a metric resources. + * @param {String} logMetricName + * A fully-qualified path representing a log_metric resources. * @returns {String} - A string representing the metric. */ - matchMetricFromMetricName(metricName) { - return this._pathTemplates.metricPathTemplate.match(metricName).metric; - } - - /** - * Parse the organizationName from a organization resource. - * - * @param {String} organizationName - * A fully-qualified path representing a organization resources. - * @returns {String} - A string representing the organization. - */ - matchOrganizationFromOrganizationName(organizationName) { - return this._pathTemplates.organizationPathTemplate.match(organizationName) - .organization; + matchMetricFromLogMetricName(logMetricName) { + return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + .metric; } /** diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json index 671ed471b51..e047e96c874 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client_config.json +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -4,7 +4,6 @@ "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", - "INTERNAL", "UNAVAILABLE" ], "non_idempotent": [] @@ -38,12 +37,12 @@ }, "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" } } diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index b4ffe3e7912..9e5d3208e4c 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,34 +1,20 @@ { - "updateTime": "2020-02-14T12:26:52.438900Z", + "updateTime": "2020-03-08T11:30:18.289668Z", "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "8ccd960a5d4d006ef5e371bfcf1e428721ccb898" - } - }, - { - "git": { - "name": "synthtool", - "remote": "rpc://devrel/cloud/libraries/tools/autosynth", - "sha": "dd7cd93888cbeb1d4c56a1ca814491c7813160e8" - } - }, { "generator": { "name": "artman", - "version": "0.45.0", - "dockerImage": "googleapis/artman@sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b" + "version": "1.0.0", + "dockerImage": "googleapis/artman@sha256:f37f2464788cb551299209b4fcab4eb323533154488c2ef9ec0c75d7c2b4b482" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5169f46d9f792e2934d9fa25c36d0515b4fd0024", - "internalRef": "295026522", - "log": "5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n0646bc775203077226c2c34d3e4d50cc4ec53660\nRemove unnecessary languages from bigquery-related artman configuration files.\n\nPiperOrigin-RevId: 294809380\n\n8b78aa04382e3d4147112ad6d344666771bb1909\nUpdate backend.proto for schemes and protocol\n\nPiperOrigin-RevId: 294788800\n\n80b8f8b3de2359831295e24e5238641a38d8488f\nAdds artman config files for bigquerystorage endpoints v1beta2, v1alpha2, v1\n\nPiperOrigin-RevId: 294763931\n\n2c17ac33b226194041155bb5340c3f34733f1b3a\nAdd parameter to sample generated for UpdateInstance. Related to https://github.com/googleapis/python-redis/issues/4\n\nPiperOrigin-RevId: 294734008\n\nd5e8a8953f2acdfe96fb15e85eb2f33739623957\nMove bigquery datatransfer to gapic v2.\n\nPiperOrigin-RevId: 294703703\n\nefd36705972cfcd7d00ab4c6dfa1135bafacd4ae\nfix: Add two annotations that we missed.\n\nPiperOrigin-RevId: 294664231\n\n8a36b928873ff9c05b43859b9d4ea14cd205df57\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1beta2).\n\nPiperOrigin-RevId: 294459768\n\nc7a3caa2c40c49f034a3c11079dd90eb24987047\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1).\n\nPiperOrigin-RevId: 294456889\n\n" + "sha": "b6927fca808f38df32a642c560082f5bf6538ced", + "internalRef": "299503150", + "log": "b6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\nf0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n1e47e676cddbbd8d93f19ba0665af15b5532417e\nFix: Restore a method signature for UpdateCluster\n\nPiperOrigin-RevId: 296901854\n\n7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\nd9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n" } }, { diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js index fffe6809cc1..d9eac0ae387 100644 --- a/handwritten/logging/test/gapic-v2.js +++ b/handwritten/logging/test/gapic-v2.js @@ -50,6 +50,209 @@ describe('ConfigServiceV2Client', () => { assert(client); }); + describe('listBuckets', () => { + it('invokes listBuckets without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const parent = 'parent-995424086'; + const request = { + parent: parent, + }; + + // Mock response + const nextPageToken = ''; + const bucketsElement = {}; + const buckets = [bucketsElement]; + const expectedResponse = { + nextPageToken: nextPageToken, + buckets: buckets, + }; + + // Mock Grpc layer + client._innerApiCalls.listBuckets = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.buckets); + }; + + client.listBuckets(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.buckets); + done(); + }); + }); + + it('invokes listBuckets with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const parent = 'parent-995424086'; + const request = { + parent: parent, + }; + + // Mock Grpc layer + client._innerApiCalls.listBuckets = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listBuckets(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getBucket', () => { + it('invokes getBucket without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const name = 'name3373707'; + const request = { + name: name, + }; + + // Mock response + const name2 = 'name2-1052831874'; + const description = 'description-1724546052'; + const retentionDays = 1544391896; + const expectedResponse = { + name: name2, + description: description, + retentionDays: retentionDays, + }; + + // Mock Grpc layer + client._innerApiCalls.getBucket = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getBucket(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getBucket with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const name = 'name3373707'; + const request = { + name: name, + }; + + // Mock Grpc layer + client._innerApiCalls.getBucket = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getBucket(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateBucket', () => { + it('invokes updateBucket without error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const name = 'name3373707'; + const bucket = {}; + const updateMask = {}; + const request = { + name: name, + bucket: bucket, + updateMask: updateMask, + }; + + // Mock response + const name2 = 'name2-1052831874'; + const description = 'description-1724546052'; + const retentionDays = 1544391896; + const expectedResponse = { + name: name2, + description: description, + retentionDays: retentionDays, + }; + + // Mock Grpc layer + client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateBucket(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateBucket with error', done => { + const client = new loggingModule.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const name = 'name3373707'; + const bucket = {}; + const updateMask = {}; + const request = { + name: name, + bucket: bucket, + updateMask: updateMask, + }; + + // Mock Grpc layer + client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateBucket(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listSinks', () => { it('invokes listSinks without error', done => { const client = new loggingModule.v2.ConfigServiceV2Client({ @@ -121,9 +324,9 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sinkName = 'sinkName-1391757129'; const request = { - sinkName: formattedSinkName, + sinkName: sinkName, }; // Mock response @@ -164,9 +367,9 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sinkName = 'sinkName-1391757129'; const request = { - sinkName: formattedSinkName, + sinkName: sinkName, }; // Mock Grpc layer @@ -269,10 +472,10 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sinkName = 'sinkName-1391757129'; const sink = {}; const request = { - sinkName: formattedSinkName, + sinkName: sinkName, sink: sink, }; @@ -314,10 +517,10 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sinkName = 'sinkName-1391757129'; const sink = {}; const request = { - sinkName: formattedSinkName, + sinkName: sinkName, sink: sink, }; @@ -345,9 +548,9 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sinkName = 'sinkName-1391757129'; const request = { - sinkName: formattedSinkName, + sinkName: sinkName, }; // Mock Grpc layer @@ -366,9 +569,9 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedSinkName = client.sinkPath('[PROJECT]', '[SINK]'); + const sinkName = 'sinkName-1391757129'; const request = { - sinkName: formattedSinkName, + sinkName: sinkName, }; // Mock Grpc layer @@ -461,9 +664,9 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const name = 'name3373707'; const request = { - name: formattedName, + name: name, }; // Mock response @@ -498,9 +701,9 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const name = 'name3373707'; const request = { - name: formattedName, + name: name, }; // Mock Grpc layer @@ -597,11 +800,11 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const name = 'name3373707'; const exclusion = {}; const updateMask = {}; const request = { - name: formattedName, + name: name, exclusion: exclusion, updateMask: updateMask, }; @@ -638,11 +841,11 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const name = 'name3373707'; const exclusion = {}; const updateMask = {}; const request = { - name: formattedName, + name: name, exclusion: exclusion, updateMask: updateMask, }; @@ -671,9 +874,9 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const name = 'name3373707'; const request = { - name: formattedName, + name: name, }; // Mock Grpc layer @@ -692,9 +895,9 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const formattedName = client.exclusionPath('[PROJECT]', '[EXCLUSION]'); + const name = 'name3373707'; const request = { - name: formattedName, + name: name, }; // Mock Grpc layer @@ -720,14 +923,17 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const request = {}; + const name = 'name3373707'; + const request = { + name: name, + }; // Mock response - const name = 'name3373707'; + const name2 = 'name2-1052831874'; const kmsKeyName = 'kmsKeyName2094986649'; const serviceAccountId = 'serviceAccountId-111486921'; const expectedResponse = { - name: name, + name: name2, kmsKeyName: kmsKeyName, serviceAccountId: serviceAccountId, }; @@ -752,7 +958,10 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const request = {}; + const name = 'name3373707'; + const request = { + name: name, + }; // Mock Grpc layer client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( @@ -778,14 +987,19 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const request = {}; + const name = 'name3373707'; + const cmekSettings = {}; + const request = { + name: name, + cmekSettings: cmekSettings, + }; // Mock response - const name = 'name3373707'; + const name2 = 'name2-1052831874'; const kmsKeyName = 'kmsKeyName2094986649'; const serviceAccountId = 'serviceAccountId-111486921'; const expectedResponse = { - name: name, + name: name2, kmsKeyName: kmsKeyName, serviceAccountId: serviceAccountId, }; @@ -810,7 +1024,12 @@ describe('ConfigServiceV2Client', () => { }); // Mock request - const request = {}; + const name = 'name3373707'; + const cmekSettings = {}; + const request = { + name: name, + cmekSettings: cmekSettings, + }; // Mock Grpc layer client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( @@ -865,9 +1084,9 @@ describe('LoggingServiceV2Client', () => { }); // Mock request - const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + const logName = 'logName2013526694'; const request = { - logName: formattedLogName, + logName: logName, }; // Mock Grpc layer @@ -886,9 +1105,9 @@ describe('LoggingServiceV2Client', () => { }); // Mock request - const formattedLogName = client.logPath('[PROJECT]', '[LOG]'); + const logName = 'logName2013526694'; const request = { - logName: formattedLogName, + logName: logName, }; // Mock Grpc layer @@ -1258,7 +1477,7 @@ describe('MetricsServiceV2Client', () => { }); // Mock request - const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); const request = { metricName: formattedMetricName, }; @@ -1295,7 +1514,7 @@ describe('MetricsServiceV2Client', () => { }); // Mock request - const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); const request = { metricName: formattedMetricName, }; @@ -1394,7 +1613,7 @@ describe('MetricsServiceV2Client', () => { }); // Mock request - const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); const metric = {}; const request = { metricName: formattedMetricName, @@ -1433,7 +1652,7 @@ describe('MetricsServiceV2Client', () => { }); // Mock request - const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); const metric = {}; const request = { metricName: formattedMetricName, @@ -1464,7 +1683,7 @@ describe('MetricsServiceV2Client', () => { }); // Mock request - const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); const request = { metricName: formattedMetricName, }; @@ -1485,7 +1704,7 @@ describe('MetricsServiceV2Client', () => { }); // Mock request - const formattedMetricName = client.metricPath('[PROJECT]', '[METRIC]'); + const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); const request = { metricName: formattedMetricName, }; From 561538e9ebf88f7a11bacbcac5f45bd580254d09 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 19 Mar 2020 09:26:23 -0700 Subject: [PATCH 0578/1029] chore: remove snippet leading whitespace (#751) --- handwritten/logging/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 3168e09fc3f..029ff1f495b 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -149,6 +149,12 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-logging/blob/master/CONTRIBUTING.md). +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + ## License Apache Version 2.0 From 0e1e6aa44ee08672e2afcd8770fb23e12f2fb34c Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 19 Mar 2020 17:09:09 -0400 Subject: [PATCH 0579/1029] test: allow appropriate waiting times (#754) --- handwritten/logging/system-test/logging.ts | 105 ++++++++++++--------- 1 file changed, 63 insertions(+), 42 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 5181a22a225..8596013af6f 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -300,10 +300,13 @@ describe('Logging', async () => { function getEntriesFromLog( log: Log, + config: {numExpectedMessages: number}, callback: (err: Error | null, entries?: Entry[]) => void ) { let numAttempts = 0; + const numExpectedMessages = config.numExpectedMessages; + setTimeout(pollForMessages, WRITE_CONSISTENCY_DELAY_MS); function pollForMessages() { @@ -315,7 +318,7 @@ describe('Logging', async () => { return; } - if (entries!.length === 0 && numAttempts < 8) { + if (entries!.length < numExpectedMessages && numAttempts < 8) { setTimeout(pollForMessages, WRITE_CONSISTENCY_DELAY_MS); return; } @@ -363,11 +366,15 @@ describe('Logging', async () => { log.write(logEntries, options, err => { assert.ifError(err); - getEntriesFromLog(log, (err, entries) => { - assert.ifError(err); - assert.strictEqual(entries!.length, logEntries.length); - done(); - }); + getEntriesFromLog( + log, + {numExpectedMessages: logEntries.length}, + (err, entries) => { + assert.ifError(err); + assert.strictEqual(entries!.length, logEntries.length); + done(); + } + ); }); }); @@ -400,11 +407,15 @@ describe('Logging', async () => { }); it('should list log entries', done => { - getEntriesFromLog(logExpected, (err, entries) => { - assert.ifError(err); - assert.strictEqual(entries!.length, logEntriesExpected.length); - done(); - }); + getEntriesFromLog( + logExpected, + {numExpectedMessages: logEntriesExpected.length}, + (err, entries) => { + assert.ifError(err); + assert.strictEqual(entries!.length, logEntriesExpected.length); + done(); + } + ); }); it('should list log entries as a stream', done => { @@ -437,26 +448,30 @@ describe('Logging', async () => { log.write(logEntries, options, err => { assert.ifError(err); - getEntriesFromLog(log, (err, entries) => { - assert.ifError(err); + getEntriesFromLog( + log, + {numExpectedMessages: logEntries.length}, + (err, entries) => { + assert.ifError(err); - assert.deepStrictEqual(entries!.map(x => x.data).reverse(), [ - 'log entry 1', - {delegate: 'my_username'}, - { - nonValue: null, - boolValue: true, - arrayValue: [1, 2, 3], - }, - { - nested: { - delegate: 'my_username', + assert.deepStrictEqual(entries!.map(x => x.data).reverse(), [ + 'log entry 1', + {delegate: 'my_username'}, + { + nonValue: null, + boolValue: true, + arrayValue: [1, 2, 3], }, - }, - ]); + { + nested: { + delegate: 'my_username', + }, + }, + ]); - done(); - }); + done(); + } + ); }); }); @@ -473,7 +488,7 @@ describe('Logging', async () => { log.write([entry2, entry3, entry1], options, err => { assert.ifError(err); - getEntriesFromLog(log, (err, entries) => { + getEntriesFromLog(log, {numExpectedMessages: 3}, (err, entries) => { assert.ifError(err); assert.deepStrictEqual( entries!.map(x => x.data), @@ -489,18 +504,24 @@ describe('Logging', async () => { const {log} = getTestLog(); const messages = ['1', '2', '3', '4', '5']; - messages.forEach(message => { - log.write(log.entry(message), options); - }); + (async () => { + for (const message of messages) { + await log.write(log.entry(message), options); + } - getEntriesFromLog(log, (err, entries) => { - assert.ifError(err); - assert.deepStrictEqual( - entries!.reverse().map(x => x.data), - messages + getEntriesFromLog( + log, + {numExpectedMessages: messages.length}, + (err, entries) => { + assert.ifError(err); + assert.deepStrictEqual( + entries!.reverse().map(x => x.data), + messages + ); + done(); + } ); - done(); - }); + })(); }); it('should write an entry with primitive values', done => { @@ -516,7 +537,7 @@ describe('Logging', async () => { log.write(logEntry, options, err => { assert.ifError(err); - getEntriesFromLog(log, (err, entries) => { + getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { assert.ifError(err); const entry = entries![0]; @@ -548,7 +569,7 @@ describe('Logging', async () => { log.write(logEntry, err => { assert.ifError(err); - getEntriesFromLog(log, (err, entries) => { + getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { assert.ifError(err); const entry = entries![0]; @@ -568,7 +589,7 @@ describe('Logging', async () => { log.write(entry, err => { assert.ifError(err); - getEntriesFromLog(log, (err, entries) => { + getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { assert.ifError(err); const entry = entries![0]; From 720ab7036d2cdb41732f13041c5f0c069df78c77 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 23 Mar 2020 18:36:24 -0700 Subject: [PATCH 0580/1029] docs: document version support goals (#762) --- handwritten/logging/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 029ff1f495b..389076da20a 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -74,6 +74,8 @@ async function quickstart( // The metadata associated with the entry const metadata = { resource: {type: 'global'}, + // See: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity + severity: 'INFO', }; // Prepares a log entry @@ -126,6 +128,27 @@ has instructions for running the samples. The [Stackdriver Logging Node.js Client API Reference][client-docs] documentation also contains samples. +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targetting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + ## Versioning This library follows [Semantic Versioning](http://semver.org/). From f6f3b1cb448e890cd6c2b9db8b130cda9c2ad94c Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 25 Mar 2020 09:51:38 -0700 Subject: [PATCH 0581/1029] feat!: move API to Typescript generation (#758) --- handwritten/logging/.gitignore | 3 +- handwritten/logging/.jsdoc.js | 10 +- handwritten/logging/.mocharc.json | 5 + handwritten/logging/linkinator.config.json | 1 - handwritten/logging/package.json | 135 +- .../google/cloud/common_resources.proto | 52 + .../protos/google/logging/v2/log_entry.proto | 3 +- .../protos/google/logging/v2/logging.proto | 3 +- .../google/logging/v2/logging_config.proto | 15 +- .../google/logging/v2/logging_metrics.proto | 3 +- handwritten/logging/protos/protos.d.ts | 5584 +++--- handwritten/logging/protos/protos.js | 14698 ++++++++-------- handwritten/logging/protos/protos.json | 1736 +- handwritten/logging/src/index.ts | 4 +- .../logging/src/service_proto_list.json | 1 - .../src/v2/config_service_v2_client.js | 1782 -- .../src/v2/config_service_v2_client.ts | 2905 +++ .../v2/config_service_v2_client_config.json | 33 +- .../src/v2/config_service_v2_proto_list.json | 5 +- .../src/v2/doc/google/api/doc_distribution.js | 214 - .../src/v2/doc/google/api/doc_label.js | 62 - .../src/v2/doc/google/api/doc_metric.js | 297 - .../doc/google/api/doc_monitored_resource.js | 103 - .../google/logging/type/doc_http_request.js | 92 - .../v2/doc/google/logging/v2/doc_log_entry.js | 217 - .../v2/doc/google/logging/v2/doc_logging.js | 313 - .../google/logging/v2/doc_logging_config.js | 908 - .../google/logging/v2/doc_logging_metrics.js | 298 - .../src/v2/doc/google/protobuf/doc_any.js | 137 - .../v2/doc/google/protobuf/doc_duration.js | 97 - .../src/v2/doc/google/protobuf/doc_empty.js | 34 - .../v2/doc/google/protobuf/doc_field_mask.js | 228 - .../src/v2/doc/google/protobuf/doc_struct.js | 112 - .../v2/doc/google/protobuf/doc_timestamp.js | 117 - handwritten/logging/src/v2/index.ts | 21 + .../src/v2/logging_service_v2_client.js | 1051 -- .../src/v2/logging_service_v2_client.ts | 2011 +++ .../v2/logging_service_v2_client_config.json | 26 +- .../src/v2/logging_service_v2_proto_list.json | 5 +- .../src/v2/metrics_service_v2_client.js | 710 - .../src/v2/metrics_service_v2_client.ts | 1742 ++ .../v2/metrics_service_v2_client_config.json | 14 +- .../src/v2/metrics_service_v2_proto_list.json | 3 + handwritten/logging/synth.metadata | 27 +- handwritten/logging/synth.py | 51 +- .../system-test/fixtures/sample/package.json | 23 - .../fixtures/sample/src}/index.js | 17 +- .../system-test/fixtures/sample/src/index.ts | 25 +- .../system-test/fixtures/sample/tsconfig.json | 10 - handwritten/logging/system-test/install.ts | 73 +- handwritten/logging/system-test/logging.ts | 2 +- .../test/gapic-config_service_v2-v2.ts | 915 + .../test/gapic-logging_service_v2-v2.ts | 392 + .../test/gapic-metrics_service_v2-v2.ts | 373 + handwritten/logging/test/gapic-v2.js | 1739 -- handwritten/logging/test/index.ts | 12 +- .../express/test-make-middleware.ts | 2 +- handwritten/logging/tsconfig.json | 7 +- handwritten/logging/webpack.config.js | 64 + 59 files changed, 19744 insertions(+), 19778 deletions(-) create mode 100644 handwritten/logging/.mocharc.json create mode 100644 handwritten/logging/protos/google/cloud/common_resources.proto delete mode 100644 handwritten/logging/src/service_proto_list.json delete mode 100644 handwritten/logging/src/v2/config_service_v2_client.js create mode 100644 handwritten/logging/src/v2/config_service_v2_client.ts delete mode 100644 handwritten/logging/src/v2/doc/google/api/doc_distribution.js delete mode 100644 handwritten/logging/src/v2/doc/google/api/doc_label.js delete mode 100644 handwritten/logging/src/v2/doc/google/api/doc_metric.js delete mode 100644 handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js delete mode 100644 handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js delete mode 100644 handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js delete mode 100644 handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js delete mode 100644 handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js delete mode 100644 handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_metrics.js delete mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_any.js delete mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js delete mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js delete mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js delete mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js delete mode 100644 handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js create mode 100644 handwritten/logging/src/v2/index.ts delete mode 100644 handwritten/logging/src/v2/logging_service_v2_client.js create mode 100644 handwritten/logging/src/v2/logging_service_v2_client.ts delete mode 100644 handwritten/logging/src/v2/metrics_service_v2_client.js create mode 100644 handwritten/logging/src/v2/metrics_service_v2_client.ts delete mode 100644 handwritten/logging/system-test/fixtures/sample/package.json rename handwritten/logging/{src/v2 => system-test/fixtures/sample/src}/index.js (58%) delete mode 100644 handwritten/logging/system-test/fixtures/sample/tsconfig.json create mode 100644 handwritten/logging/test/gapic-config_service_v2-v2.ts create mode 100644 handwritten/logging/test/gapic-logging_service_v2-v2.ts create mode 100644 handwritten/logging/test/gapic-metrics_service_v2-v2.ts delete mode 100644 handwritten/logging/test/gapic-v2.js create mode 100644 handwritten/logging/webpack.config.js diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index e84bf0fa887..5d32b23782f 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -1,8 +1,10 @@ **/*.log **/node_modules .coverage +coverage .nyc_output docs/ +out/ build/ system-test/secrets.js system-test/*key.json @@ -10,4 +12,3 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ -.vscode diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index f2e188e7add..884203d2bfb 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. // +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -31,7 +34,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'build/src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -42,7 +46,7 @@ module.exports = { systemName: '@google-cloud/logging', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: { diff --git a/handwritten/logging/.mocharc.json b/handwritten/logging/.mocharc.json new file mode 100644 index 00000000000..670c5e2c24b --- /dev/null +++ b/handwritten/logging/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/handwritten/logging/linkinator.config.json b/handwritten/logging/linkinator.config.json index 96e52dca3c7..29a223b6db6 100644 --- a/handwritten/logging/linkinator.config.json +++ b/handwritten/logging/linkinator.config.json @@ -3,7 +3,6 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js", "img.shields.io" ], "silent": true, diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 309eda60643..f4ca4c769c2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,19 +1,7 @@ { "name": "@google-cloud/logging", - "description": "Stackdriver Logging Client Library for Node.js", "version": "7.3.0", - "license": "Apache-2.0", - "author": "Google Inc.", - "engines": { - "node": ">=8.10.0" - }, - "repository": "googleapis/nodejs-logging", - "main": "./build/src/index.js", - "types": "./build/src/index.d.ts", - "files": [ - "build/src", - "build/protos" - ], + "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", "google api client", @@ -28,85 +16,104 @@ "stackdriver logging", "stackdriver" ], + "repository": "googleapis/nodejs-logging", + "license": "Apache-2.0", + "author": "Google Inc.", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], "scripts": { - "test": "c8 mocha --recursive ./build/test", - "docs": "jsdoc -c .jsdoc.js", - "predocs": "npm run compile", - "presystem-test": "npm run compile", - "system-test": "c8 mocha build/system-test --timeout 600000", - "samples-test": "cd samples/ && c8 npm test && cd ../", - "lint": "gts check && eslint '**/*.js'", "check": "gts check", "clean": "gts clean", - "compile": "tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp test/*.js build/test", - "fix": "gts fix && eslint --fix '**/*.js'", + "compile": "tsc -p . && cp -r proto* build/", + "compile-protos": "compileProtos src", + "predocs": "npm run compile", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix && eslint '**/*.js' --fix", + "prelint": "cd samples; npm link ../; npm i", + "lint": "gts fix && eslint samples/*.js", "prepare": "npm run compile", + "samples-test": "cd samples/ && npm link ../ && rm -rf node_modules && npm install && npm test && cd ../", + "presystem-test": "npm run compile", + "system-test": "mocha build/system-test --timeout 600000", "pretest": "npm run compile", - "posttest": "npm run check", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm i" + "test": "c8 mocha build/test", + "posttest": "npm run check" }, "dependencies": { - "@google-cloud/common": "^2.2.2", - "@google-cloud/paginator": "^2.0.0", - "@google-cloud/projectify": "^1.0.0", - "@google-cloud/promisify": "^1.0.0", + "@google-cloud/common": "^2.4.0", + "@google-cloud/paginator": "^2.0.3", + "@google-cloud/projectify": "^1.0.4", + "@google-cloud/promisify": "^1.0.4", "@opencensus/propagation-stackdriver": "0.0.20", - "arrify": "^2.0.0", - "dot-prop": "^5.1.0", + "arrify": "^2.0.1", + "dot-prop": "^5.2.0", "eventid": "^1.0.0", "extend": "^3.0.2", - "gcp-metadata": "^3.1.0", - "google-auth-library": "^5.2.2", - "google-gax": "^1.11.0", + "gcp-metadata": "^3.5.0", + "google-auth-library": "^5.10.1", + "google-gax": "^1.15.1", "is": "^3.3.0", "on-finished": "^2.3.0", - "pumpify": "^2.0.0", - "snakecase-keys": "^3.0.0", - "stream-events": "^1.0.4", - "through2": "^3.0.0", + "pumpify": "^2.0.1", + "snakecase-keys": "^3.1.2", + "stream-events": "^1.0.5", + "through2": "^3.0.1", "type-fest": "^0.12.0" }, "devDependencies": { - "@google-cloud/bigquery": "^4.0.0", - "@google-cloud/pubsub": "^1.0.0", - "@google-cloud/storage": "^4.0.0", - "@types/extend": "^3.0.0", + "@google-cloud/bigquery": "^4.7.0", + "@google-cloud/pubsub": "^1.6.0", + "@google-cloud/storage": "^4.6.0", + "@types/extend": "^3.0.1", "@types/is": "0.0.21", - "@types/mocha": "^7.0.0", + "@types/mocha": "^7.0.2", "@types/mv": "^2.1.0", - "@types/ncp": "^2.0.1", + "@types/ncp": "^2.0.3", + "@types/node": "^13.9.2", "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", - "@types/sinon": "^7.0.8", + "@types/sinon": "^7.5.2", "@types/through2": "^2.0.34", "@types/tmp": "^0.1.0", - "@types/uuid": "^7.0.0", + "@types/uuid": "^7.0.2", "assert-rejects": "^1.0.0", "bignumber.js": "^9.0.0", - "c8": "^7.0.0", - "codecov": "^3.0.4", - "eslint": "^6.0.0", - "eslint-config-prettier": "^6.0.0", + "c8": "^7.1.0", + "codecov": "^3.6.5", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.10.0", "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.0.0", + "eslint-plugin-prettier": "^3.1.2", "execa": "^4.0.0", - "gts": "^1.0.0", + "gts": "^1.1.2", "http2spy": "^1.1.0", - "jsdoc": "^3.6.2", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^2.0.0", - "mocha": "^7.0.0", + "jsdoc": "^3.6.3", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.4", + "linkinator": "^2.0.3", + "mocha": "^7.1.1", "mv": "^2.1.1", "ncp": "^2.0.0", - "nock": "^12.0.0", - "prettier": "^1.15.1", - "proxyquire": "^2.1.0", - "sinon": "^9.0.0", - "typescript": "3.6.4", - "uuid": "^7.0.2" + "nock": "^12.0.3", + "null-loader": "^3.0.0", + "pack-n-play": "^1.0.0-2", + "power-assert": "^1.6.1", + "prettier": "^1.19.1", + "proxyquire": "^2.1.3", + "sinon": "^9.0.1", + "ts-loader": "^6.2.1", + "typescript": "^3.7.0", + "uuid": "^7.0.2", + "webpack": "^4.42.0", + "webpack-cli": "^3.3.11" + }, + "engines": { + "node": ">=8.10.0" } } diff --git a/handwritten/logging/protos/google/cloud/common_resources.proto b/handwritten/logging/protos/google/cloud/common_resources.proto new file mode 100644 index 00000000000..56c9f800d5e --- /dev/null +++ b/handwritten/logging/protos/google/cloud/common_resources.proto @@ -0,0 +1,52 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file contains stub messages for common resources in GCP. +// It is not intended to be directly generated, and is instead used by +// other tooling to be able to match common resource patterns. +syntax = "proto3"; + +package google.cloud; + +import "google/api/resource.proto"; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Project" + pattern: "projects/{project}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Organization" + pattern: "organizations/{organization}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Folder" + pattern: "folders/{folder}" +}; + + +option (google.api.resource_definition) = { + type: "cloudbilling.googleapis.com/BillingAccount" + pattern: "billingAccounts/{billing_account}" +}; + +option (google.api.resource_definition) = { + type: "locations.googleapis.com/Location" + pattern: "projects/{project}/locations/{location}" +}; + diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index ba8a08ff2c0..eb5b5d0c9a8 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index 00af178c328..3abf79db4f0 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 1062a6521ce..3981ccdb96a 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -33,6 +32,18 @@ option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/BillingAccountLocation" + pattern: "billingAccounts/{billing_account}/locations/{location}" +}; // Service for configuring sinks used to route log entries. service ConfigServiceV2 { diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 96dbe30f598..15ab65bb954 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 264185b8fc3..9d16044f366 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -23,4200 +23,4200 @@ export namespace google { /** Namespace v2. */ namespace v2 { - /** Represents a ConfigServiceV2 */ - class ConfigServiceV2 extends $protobuf.rpc.Service { - - /** - * Constructs a new ConfigServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; - - /** - * Calls ListBuckets. - * @param request ListBucketsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBucketsResponse - */ - public listBuckets(request: google.logging.v2.IListBucketsRequest, callback: google.logging.v2.ConfigServiceV2.ListBucketsCallback): void; - - /** - * Calls ListBuckets. - * @param request ListBucketsRequest message or plain object - * @returns Promise - */ - public listBuckets(request: google.logging.v2.IListBucketsRequest): Promise; + /** Properties of a LogEntry. */ + interface ILogEntry { - /** - * Calls GetBucket. - * @param request GetBucketRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogBucket - */ - public getBucket(request: google.logging.v2.IGetBucketRequest, callback: google.logging.v2.ConfigServiceV2.GetBucketCallback): void; + /** LogEntry logName */ + logName?: (string|null); - /** - * Calls GetBucket. - * @param request GetBucketRequest message or plain object - * @returns Promise - */ - public getBucket(request: google.logging.v2.IGetBucketRequest): Promise; + /** LogEntry resource */ + resource?: (google.api.IMonitoredResource|null); - /** - * Calls UpdateBucket. - * @param request UpdateBucketRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogBucket - */ - public updateBucket(request: google.logging.v2.IUpdateBucketRequest, callback: google.logging.v2.ConfigServiceV2.UpdateBucketCallback): void; + /** LogEntry protoPayload */ + protoPayload?: (google.protobuf.IAny|null); - /** - * Calls UpdateBucket. - * @param request UpdateBucketRequest message or plain object - * @returns Promise - */ - public updateBucket(request: google.logging.v2.IUpdateBucketRequest): Promise; + /** LogEntry textPayload */ + textPayload?: (string|null); - /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSinksResponse - */ - public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; + /** LogEntry jsonPayload */ + jsonPayload?: (google.protobuf.IStruct|null); - /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @returns Promise - */ - public listSinks(request: google.logging.v2.IListSinksRequest): Promise; + /** LogEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); - /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; + /** LogEntry receiveTimestamp */ + receiveTimestamp?: (google.protobuf.ITimestamp|null); - /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @returns Promise - */ - public getSink(request: google.logging.v2.IGetSinkRequest): Promise; + /** LogEntry severity */ + severity?: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity|null); - /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; + /** LogEntry insertId */ + insertId?: (string|null); - /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @returns Promise - */ - public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; + /** LogEntry httpRequest */ + httpRequest?: (google.logging.type.IHttpRequest|null); - /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; + /** LogEntry labels */ + labels?: ({ [k: string]: string }|null); - /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @returns Promise - */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; + /** LogEntry operation */ + operation?: (google.logging.v2.ILogEntryOperation|null); - /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; + /** LogEntry trace */ + trace?: (string|null); - /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @returns Promise - */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; + /** LogEntry spanId */ + spanId?: (string|null); - /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse - */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; + /** LogEntry traceSampled */ + traceSampled?: (boolean|null); - /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @returns Promise - */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; + /** LogEntry sourceLocation */ + sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + } - /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @returns Promise + * Constructs a new LogEntry. + * @param [properties] Properties to set */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; + constructor(properties?: google.logging.v2.ILogEntry); - /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; + /** LogEntry logName. */ + public logName: string; - /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @returns Promise - */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; + /** LogEntry resource. */ + public resource?: (google.api.IMonitoredResource|null); - /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; + /** LogEntry protoPayload. */ + public protoPayload?: (google.protobuf.IAny|null); - /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @returns Promise - */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; + /** LogEntry textPayload. */ + public textPayload: string; - /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; + /** LogEntry jsonPayload. */ + public jsonPayload?: (google.protobuf.IStruct|null); - /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @returns Promise - */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; + /** LogEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); - /** - * Calls GetCmekSettings. - * @param request GetCmekSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CmekSettings - */ - public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback): void; + /** LogEntry receiveTimestamp. */ + public receiveTimestamp?: (google.protobuf.ITimestamp|null); - /** - * Calls GetCmekSettings. - * @param request GetCmekSettingsRequest message or plain object - * @returns Promise - */ - public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest): Promise; + /** LogEntry severity. */ + public severity: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity); - /** - * Calls UpdateCmekSettings. - * @param request UpdateCmekSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CmekSettings - */ - public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback): void; + /** LogEntry insertId. */ + public insertId: string; - /** - * Calls UpdateCmekSettings. - * @param request UpdateCmekSettingsRequest message or plain object - * @returns Promise - */ - public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest): Promise; - } + /** LogEntry httpRequest. */ + public httpRequest?: (google.logging.type.IHttpRequest|null); - namespace ConfigServiceV2 { + /** LogEntry labels. */ + public labels: { [k: string]: string }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. - * @param error Error, if any - * @param [response] ListBucketsResponse - */ - type ListBucketsCallback = (error: (Error|null), response?: google.logging.v2.ListBucketsResponse) => void; + /** LogEntry operation. */ + public operation?: (google.logging.v2.ILogEntryOperation|null); - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. - * @param error Error, if any - * @param [response] LogBucket - */ - type GetBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** LogEntry trace. */ + public trace: string; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. - * @param error Error, if any - * @param [response] LogBucket - */ - type UpdateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** LogEntry spanId. */ + public spanId: string; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @param error Error, if any - * @param [response] ListSinksResponse - */ - type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; + /** LogEntry traceSampled. */ + public traceSampled: boolean; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @param error Error, if any - * @param [response] LogSink - */ - type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + /** LogEntry sourceLocation. */ + public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @param error Error, if any - * @param [response] LogSink - */ - type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + /** LogEntry payload. */ + public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @param error Error, if any - * @param [response] LogSink + * Creates a new LogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntry instance */ - type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @param error Error, if any - * @param [response] Empty + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @param error Error, if any - * @param [response] ListExclusionsResponse + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; + public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Decodes a LogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @param error Error, if any - * @param [response] LogExclusion + * Verifies a LogEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @param error Error, if any - * @param [response] Empty + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntry */ - type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. - * @param error Error, if any - * @param [response] CmekSettings + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry + * @param [options] Conversion options + * @returns Plain object */ - type GetCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; + public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. - * @param error Error, if any - * @param [response] CmekSettings + * Converts this LogEntry to JSON. + * @returns JSON object */ - type UpdateCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a LogBucket. */ - interface ILogBucket { - - /** LogBucket name */ - name?: (string|null); - - /** LogBucket description */ - description?: (string|null); + /** Properties of a LogEntryOperation. */ + interface ILogEntryOperation { - /** LogBucket createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** LogEntryOperation id */ + id?: (string|null); - /** LogBucket updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** LogEntryOperation producer */ + producer?: (string|null); - /** LogBucket retentionDays */ - retentionDays?: (number|null); + /** LogEntryOperation first */ + first?: (boolean|null); - /** LogBucket lifecycleState */ - lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); + /** LogEntryOperation last */ + last?: (boolean|null); } - /** Represents a LogBucket. */ - class LogBucket implements ILogBucket { + /** Represents a LogEntryOperation. */ + class LogEntryOperation implements ILogEntryOperation { /** - * Constructs a new LogBucket. + * Constructs a new LogEntryOperation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogBucket); - - /** LogBucket name. */ - public name: string; - - /** LogBucket description. */ - public description: string; + constructor(properties?: google.logging.v2.ILogEntryOperation); - /** LogBucket createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** LogEntryOperation id. */ + public id: string; - /** LogBucket updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** LogEntryOperation producer. */ + public producer: string; - /** LogBucket retentionDays. */ - public retentionDays: number; + /** LogEntryOperation first. */ + public first: boolean; - /** LogBucket lifecycleState. */ - public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); + /** LogEntryOperation last. */ + public last: boolean; /** - * Creates a new LogBucket instance using the specified properties. + * Creates a new LogEntryOperation instance using the specified properties. * @param [properties] Properties to set - * @returns LogBucket instance + * @returns LogEntryOperation instance */ - public static create(properties?: google.logging.v2.ILogBucket): google.logging.v2.LogBucket; + public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; /** - * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. - * @param message LogBucket message or plain object to encode + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. - * @param message LogBucket message or plain object to encode + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogBucket message from the specified reader or buffer. + * Decodes a LogEntryOperation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogBucket + * @returns LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogBucket; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; /** - * Decodes a LogBucket message from the specified reader or buffer, length delimited. + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogBucket + * @returns LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogBucket; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; /** - * Verifies a LogBucket message. + * Verifies a LogEntryOperation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogBucket + * @returns LogEntryOperation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogBucket; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; /** - * Creates a plain object from a LogBucket message. Also converts values to other types if specified. - * @param message LogBucket + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @param message LogEntryOperation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogBucket to JSON. + * Converts this LogEntryOperation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogSink. */ - interface ILogSink { - - /** LogSink name */ - name?: (string|null); - - /** LogSink destination */ - destination?: (string|null); - - /** LogSink filter */ - filter?: (string|null); - - /** LogSink description */ - description?: (string|null); - - /** LogSink disabled */ - disabled?: (boolean|null); - - /** LogSink outputVersionFormat */ - outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat|null); - - /** LogSink writerIdentity */ - writerIdentity?: (string|null); - - /** LogSink includeChildren */ - includeChildren?: (boolean|null); + /** Properties of a LogEntrySourceLocation. */ + interface ILogEntrySourceLocation { - /** LogSink bigqueryOptions */ - bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + /** LogEntrySourceLocation file */ + file?: (string|null); - /** LogSink createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** LogEntrySourceLocation line */ + line?: (number|Long|string|null); - /** LogSink updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** LogEntrySourceLocation function */ + "function"?: (string|null); } - /** Represents a LogSink. */ - class LogSink implements ILogSink { + /** Represents a LogEntrySourceLocation. */ + class LogEntrySourceLocation implements ILogEntrySourceLocation { /** - * Constructs a new LogSink. + * Constructs a new LogEntrySourceLocation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogSink); - - /** LogSink name. */ - public name: string; - - /** LogSink destination. */ - public destination: string; - - /** LogSink filter. */ - public filter: string; - - /** LogSink description. */ - public description: string; - - /** LogSink disabled. */ - public disabled: boolean; - - /** LogSink outputVersionFormat. */ - public outputVersionFormat: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat); - - /** LogSink writerIdentity. */ - public writerIdentity: string; - - /** LogSink includeChildren. */ - public includeChildren: boolean; - - /** LogSink bigqueryOptions. */ - public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + constructor(properties?: google.logging.v2.ILogEntrySourceLocation); - /** LogSink createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** LogEntrySourceLocation file. */ + public file: string; - /** LogSink updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** LogEntrySourceLocation line. */ + public line: (number|Long|string); - /** LogSink options. */ - public options?: "bigqueryOptions"; + /** LogEntrySourceLocation function. */ + public function: string; /** - * Creates a new LogSink instance using the specified properties. + * Creates a new LogEntrySourceLocation instance using the specified properties. * @param [properties] Properties to set - * @returns LogSink instance + * @returns LogEntrySourceLocation instance */ - public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; + public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogSink + * @returns LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogSink + * @returns LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; /** - * Verifies a LogSink message. + * Verifies a LogEntrySourceLocation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogSink + * @returns LogEntrySourceLocation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. - * @param message LogSink + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @param message LogEntrySourceLocation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogSink to JSON. + * Converts this LogEntrySourceLocation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LogSink { - - /** VersionFormat enum. */ - enum VersionFormat { - VERSION_FORMAT_UNSPECIFIED = 0, - V2 = 1, - V1 = 2 - } - } + /** Represents a LoggingServiceV2 */ + class LoggingServiceV2 extends $protobuf.rpc.Service { - /** Properties of a BigQueryOptions. */ - interface IBigQueryOptions { + /** + * Constructs a new LoggingServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** BigQueryOptions usePartitionedTables */ - usePartitionedTables?: (boolean|null); + /** + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; - /** BigQueryOptions usesTimestampColumnPartitioning */ - usesTimestampColumnPartitioning?: (boolean|null); - } + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; - /** Represents a BigQueryOptions. */ - class BigQueryOptions implements IBigQueryOptions { + /** + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @returns Promise + */ + public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; /** - * Constructs a new BigQueryOptions. - * @param [properties] Properties to set + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse */ - constructor(properties?: google.logging.v2.IBigQueryOptions); + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; - /** BigQueryOptions usePartitionedTables. */ - public usePartitionedTables: boolean; + /** + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @returns Promise + */ + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; - /** BigQueryOptions usesTimestampColumnPartitioning. */ - public usesTimestampColumnPartitioning: boolean; + /** + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse + */ + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; /** - * Creates a new BigQueryOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryOptions instance + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @returns Promise */ - public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse */ - public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; + public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; + public listLogs(request: google.logging.v2.IListLogsRequest): Promise; + } + + namespace LoggingServiceV2 { /** - * Verifies a BigQueryOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @param error Error, if any + * @param [response] Empty */ - public static verify(message: { [k: string]: any }): (string|null); + type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryOptions + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @param error Error, if any + * @param [response] WriteLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; + type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. - * @param message BigQueryOptions - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @param error Error, if any + * @param [response] ListLogEntriesResponse */ - public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; /** - * Converts this BigQueryOptions to JSON. - * @returns JSON object + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse */ - public toJSON(): { [k: string]: any }; - } + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; - /** LifecycleState enum. */ - enum LifecycleState { - LIFECYCLE_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - DELETE_REQUESTED = 2 + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @param error Error, if any + * @param [response] ListLogsResponse + */ + type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; } - /** Properties of a ListBucketsRequest. */ - interface IListBucketsRequest { - - /** ListBucketsRequest parent */ - parent?: (string|null); - - /** ListBucketsRequest pageToken */ - pageToken?: (string|null); + /** Properties of a DeleteLogRequest. */ + interface IDeleteLogRequest { - /** ListBucketsRequest pageSize */ - pageSize?: (number|null); + /** DeleteLogRequest logName */ + logName?: (string|null); } - /** Represents a ListBucketsRequest. */ - class ListBucketsRequest implements IListBucketsRequest { + /** Represents a DeleteLogRequest. */ + class DeleteLogRequest implements IDeleteLogRequest { /** - * Constructs a new ListBucketsRequest. + * Constructs a new DeleteLogRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListBucketsRequest); - - /** ListBucketsRequest parent. */ - public parent: string; - - /** ListBucketsRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.logging.v2.IDeleteLogRequest); - /** ListBucketsRequest pageSize. */ - public pageSize: number; + /** DeleteLogRequest logName. */ + public logName: string; /** - * Creates a new ListBucketsRequest instance using the specified properties. + * Creates a new DeleteLogRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListBucketsRequest instance + * @returns DeleteLogRequest instance */ - public static create(properties?: google.logging.v2.IListBucketsRequest): google.logging.v2.ListBucketsRequest; + public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; /** - * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. - * @param message ListBucketsRequest message or plain object to encode + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. - * @param message ListBucketsRequest message or plain object to encode + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer. + * Decodes a DeleteLogRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBucketsRequest + * @returns DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBucketsRequest + * @returns DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; /** - * Verifies a ListBucketsRequest message. + * Verifies a DeleteLogRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBucketsRequest + * @returns DeleteLogRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; /** - * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. - * @param message ListBucketsRequest + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @param message DeleteLogRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListBucketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBucketsRequest to JSON. + * Converts this DeleteLogRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListBucketsResponse. */ - interface IListBucketsResponse { + /** Properties of a WriteLogEntriesRequest. */ + interface IWriteLogEntriesRequest { - /** ListBucketsResponse buckets */ - buckets?: (google.logging.v2.ILogBucket[]|null); + /** WriteLogEntriesRequest logName */ + logName?: (string|null); - /** ListBucketsResponse nextPageToken */ - nextPageToken?: (string|null); + /** WriteLogEntriesRequest resource */ + resource?: (google.api.IMonitoredResource|null); + + /** WriteLogEntriesRequest labels */ + labels?: ({ [k: string]: string }|null); + + /** WriteLogEntriesRequest entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** WriteLogEntriesRequest partialSuccess */ + partialSuccess?: (boolean|null); + + /** WriteLogEntriesRequest dryRun */ + dryRun?: (boolean|null); } - /** Represents a ListBucketsResponse. */ - class ListBucketsResponse implements IListBucketsResponse { + /** Represents a WriteLogEntriesRequest. */ + class WriteLogEntriesRequest implements IWriteLogEntriesRequest { /** - * Constructs a new ListBucketsResponse. + * Constructs a new WriteLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListBucketsResponse); + constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); - /** ListBucketsResponse buckets. */ - public buckets: google.logging.v2.ILogBucket[]; + /** WriteLogEntriesRequest logName. */ + public logName: string; - /** ListBucketsResponse nextPageToken. */ - public nextPageToken: string; + /** WriteLogEntriesRequest resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** WriteLogEntriesRequest labels. */ + public labels: { [k: string]: string }; + + /** WriteLogEntriesRequest entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** WriteLogEntriesRequest partialSuccess. */ + public partialSuccess: boolean; + + /** WriteLogEntriesRequest dryRun. */ + public dryRun: boolean; /** - * Creates a new ListBucketsResponse instance using the specified properties. + * Creates a new WriteLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListBucketsResponse instance + * @returns WriteLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.IListBucketsResponse): google.logging.v2.ListBucketsResponse; + public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; /** - * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. - * @param message ListBucketsResponse message or plain object to encode + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. - * @param message ListBucketsResponse message or plain object to encode + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBucketsResponse message from the specified reader or buffer. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBucketsResponse + * @returns WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; /** - * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBucketsResponse + * @returns WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; /** - * Verifies a ListBucketsResponse message. + * Verifies a WriteLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBucketsResponse + * @returns WriteLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; /** - * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. - * @param message ListBucketsResponse + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @param message WriteLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListBucketsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBucketsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpdateBucketRequest. */ - interface IUpdateBucketRequest { - - /** UpdateBucketRequest name */ - name?: (string|null); + public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UpdateBucketRequest bucket */ - bucket?: (google.logging.v2.ILogBucket|null); + /** + * Converts this WriteLogEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** UpdateBucketRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a WriteLogEntriesResponse. */ + interface IWriteLogEntriesResponse { } - /** Represents an UpdateBucketRequest. */ - class UpdateBucketRequest implements IUpdateBucketRequest { + /** Represents a WriteLogEntriesResponse. */ + class WriteLogEntriesResponse implements IWriteLogEntriesResponse { /** - * Constructs a new UpdateBucketRequest. + * Constructs a new WriteLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateBucketRequest); - - /** UpdateBucketRequest name. */ - public name: string; - - /** UpdateBucketRequest bucket. */ - public bucket?: (google.logging.v2.ILogBucket|null); - - /** UpdateBucketRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); /** - * Creates a new UpdateBucketRequest instance using the specified properties. + * Creates a new WriteLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateBucketRequest instance + * @returns WriteLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IUpdateBucketRequest): google.logging.v2.UpdateBucketRequest; + public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; /** - * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. - * @param message UpdateBucketRequest message or plain object to encode + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. - * @param message UpdateBucketRequest message or plain object to encode + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateBucketRequest + * @returns WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateBucketRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateBucketRequest + * @returns WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateBucketRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; /** - * Verifies an UpdateBucketRequest message. + * Verifies a WriteLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateBucketRequest + * @returns WriteLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateBucketRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; /** - * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. - * @param message UpdateBucketRequest + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @param message WriteLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateBucketRequest to JSON. + * Converts this WriteLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetBucketRequest. */ - interface IGetBucketRequest { + /** Properties of a WriteLogEntriesPartialErrors. */ + interface IWriteLogEntriesPartialErrors { - /** GetBucketRequest name */ - name?: (string|null); + /** WriteLogEntriesPartialErrors logEntryErrors */ + logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); } - /** Represents a GetBucketRequest. */ - class GetBucketRequest implements IGetBucketRequest { + /** Represents a WriteLogEntriesPartialErrors. */ + class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { /** - * Constructs a new GetBucketRequest. + * Constructs a new WriteLogEntriesPartialErrors. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetBucketRequest); + constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); - /** GetBucketRequest name. */ - public name: string; + /** WriteLogEntriesPartialErrors logEntryErrors. */ + public logEntryErrors: { [k: string]: google.rpc.IStatus }; /** - * Creates a new GetBucketRequest instance using the specified properties. + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. * @param [properties] Properties to set - * @returns GetBucketRequest instance + * @returns WriteLogEntriesPartialErrors instance */ - public static create(properties?: google.logging.v2.IGetBucketRequest): google.logging.v2.GetBucketRequest; + public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. - * @param message GetBucketRequest message or plain object to encode + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. - * @param message GetBucketRequest message or plain object to encode + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBucketRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBucketRequest + * @returns WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetBucketRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBucketRequest + * @returns WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetBucketRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Verifies a GetBucketRequest message. + * Verifies a WriteLogEntriesPartialErrors message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBucketRequest + * @returns WriteLogEntriesPartialErrors */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetBucketRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. - * @param message GetBucketRequest + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @param message WriteLogEntriesPartialErrors * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBucketRequest to JSON. + * Converts this WriteLogEntriesPartialErrors to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksRequest. */ - interface IListSinksRequest { + /** Properties of a ListLogEntriesRequest. */ + interface IListLogEntriesRequest { - /** ListSinksRequest parent */ - parent?: (string|null); + /** ListLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); - /** ListSinksRequest pageToken */ - pageToken?: (string|null); + /** ListLogEntriesRequest filter */ + filter?: (string|null); - /** ListSinksRequest pageSize */ + /** ListLogEntriesRequest orderBy */ + orderBy?: (string|null); + + /** ListLogEntriesRequest pageSize */ pageSize?: (number|null); + + /** ListLogEntriesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ListSinksRequest. */ - class ListSinksRequest implements IListSinksRequest { + /** Represents a ListLogEntriesRequest. */ + class ListLogEntriesRequest implements IListLogEntriesRequest { /** - * Constructs a new ListSinksRequest. + * Constructs a new ListLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksRequest); + constructor(properties?: google.logging.v2.IListLogEntriesRequest); - /** ListSinksRequest parent. */ - public parent: string; + /** ListLogEntriesRequest resourceNames. */ + public resourceNames: string[]; - /** ListSinksRequest pageToken. */ - public pageToken: string; + /** ListLogEntriesRequest filter. */ + public filter: string; - /** ListSinksRequest pageSize. */ + /** ListLogEntriesRequest orderBy. */ + public orderBy: string; + + /** ListLogEntriesRequest pageSize. */ public pageSize: number; + /** ListLogEntriesRequest pageToken. */ + public pageToken: string; + /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new ListLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksRequest instance + * @returns ListLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; + public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksRequest + * @returns ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksRequest + * @returns ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; /** - * Verifies a ListSinksRequest message. + * Verifies a ListLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksRequest + * @returns ListLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. - * @param message ListSinksRequest + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @param message ListLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksRequest to JSON. + * Converts this ListLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksResponse. */ - interface IListSinksResponse { + /** Properties of a ListLogEntriesResponse. */ + interface IListLogEntriesResponse { - /** ListSinksResponse sinks */ - sinks?: (google.logging.v2.ILogSink[]|null); + /** ListLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); - /** ListSinksResponse nextPageToken */ + /** ListLogEntriesResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListSinksResponse. */ - class ListSinksResponse implements IListSinksResponse { + /** Represents a ListLogEntriesResponse. */ + class ListLogEntriesResponse implements IListLogEntriesResponse { /** - * Constructs a new ListSinksResponse. + * Constructs a new ListLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksResponse); + constructor(properties?: google.logging.v2.IListLogEntriesResponse); - /** ListSinksResponse sinks. */ - public sinks: google.logging.v2.ILogSink[]; + /** ListLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; - /** ListSinksResponse nextPageToken. */ + /** ListLogEntriesResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new ListLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksResponse instance + * @returns ListLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; + public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksResponse + * @returns ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksResponse + * @returns ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; /** - * Verifies a ListSinksResponse message. + * Verifies a ListLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksResponse + * @returns ListLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. - * @param message ListSinksResponse + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @param message ListLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksResponse to JSON. + * Converts this ListLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSinkRequest. */ - interface IGetSinkRequest { + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { - /** GetSinkRequest sinkName */ - sinkName?: (string|null); + /** ListMonitoredResourceDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListMonitoredResourceDescriptorsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetSinkRequest. */ - class GetSinkRequest implements IGetSinkRequest { + /** Represents a ListMonitoredResourceDescriptorsRequest. */ + class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { /** - * Constructs a new GetSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetSinkRequest); + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); - /** GetSinkRequest sinkName. */ - public sinkName: string; + /** ListMonitoredResourceDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListMonitoredResourceDescriptorsRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSinkRequest instance + * @returns ListMonitoredResourceDescriptorsRequest instance */ - public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Verifies a GetSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. - * @param message GetSinkRequest + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateSinkRequest. */ - interface ICreateSinkRequest { - - /** CreateSinkRequest parent */ - parent?: (string|null); + /** Properties of a ListMonitoredResourceDescriptorsResponse. */ + interface IListMonitoredResourceDescriptorsResponse { - /** CreateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ + resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); - /** CreateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** ListMonitoredResourceDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateSinkRequest. */ - class CreateSinkRequest implements ICreateSinkRequest { + /** Represents a ListMonitoredResourceDescriptorsResponse. */ + class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { /** - * Constructs a new CreateSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICreateSinkRequest); - - /** CreateSinkRequest parent. */ - public parent: string; + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); - /** CreateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ + public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; - /** CreateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSinkRequest instance + * @returns ListMonitoredResourceDescriptorsResponse instance */ - public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Verifies a CreateSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. - * @param message CreateSinkRequest + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSinkRequest. */ - interface IUpdateSinkRequest { - - /** UpdateSinkRequest sinkName */ - sinkName?: (string|null); + /** Properties of a ListLogsRequest. */ + interface IListLogsRequest { - /** UpdateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** ListLogsRequest parent */ + parent?: (string|null); - /** UpdateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** ListLogsRequest pageSize */ + pageSize?: (number|null); - /** UpdateSinkRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListLogsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an UpdateSinkRequest. */ - class UpdateSinkRequest implements IUpdateSinkRequest { + /** Represents a ListLogsRequest. */ + class ListLogsRequest implements IListLogsRequest { /** - * Constructs a new UpdateSinkRequest. + * Constructs a new ListLogsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateSinkRequest); - - /** UpdateSinkRequest sinkName. */ - public sinkName: string; + constructor(properties?: google.logging.v2.IListLogsRequest); - /** UpdateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + /** ListLogsRequest parent. */ + public parent: string; - /** UpdateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ListLogsRequest pageSize. */ + public pageSize: number; - /** UpdateSinkRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListLogsRequest pageToken. */ + public pageToken: string; /** - * Creates a new UpdateSinkRequest instance using the specified properties. + * Creates a new ListLogsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSinkRequest instance + * @returns ListLogsRequest instance */ - public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; + public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSinkRequest + * @returns ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSinkRequest + * @returns ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; /** - * Verifies an UpdateSinkRequest message. + * Verifies a ListLogsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSinkRequest + * @returns ListLogsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @param message UpdateSinkRequest + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * @param message ListLogsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSinkRequest to JSON. + * Converts this ListLogsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteSinkRequest. */ - interface IDeleteSinkRequest { + /** Properties of a ListLogsResponse. */ + interface IListLogsResponse { - /** DeleteSinkRequest sinkName */ - sinkName?: (string|null); + /** ListLogsResponse logNames */ + logNames?: (string[]|null); + + /** ListLogsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteSinkRequest. */ - class DeleteSinkRequest implements IDeleteSinkRequest { + /** Represents a ListLogsResponse. */ + class ListLogsResponse implements IListLogsResponse { /** - * Constructs a new DeleteSinkRequest. + * Constructs a new ListLogsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteSinkRequest); + constructor(properties?: google.logging.v2.IListLogsResponse); - /** DeleteSinkRequest sinkName. */ - public sinkName: string; + /** ListLogsResponse logNames. */ + public logNames: string[]; + + /** ListLogsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteSinkRequest instance using the specified properties. + * Creates a new ListLogsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSinkRequest instance + * @returns ListLogsResponse instance */ - public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSinkRequest + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSinkRequest + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; /** - * Verifies a DeleteSinkRequest message. + * Verifies a ListLogsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSinkRequest + * @returns ListLogsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @param message DeleteSinkRequest + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @param message ListLogsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSinkRequest to JSON. + * Converts this ListLogsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogExclusion. */ - interface ILogExclusion { + /** Represents a ConfigServiceV2 */ + class ConfigServiceV2 extends $protobuf.rpc.Service { - /** LogExclusion name */ - name?: (string|null); + /** + * Constructs a new ConfigServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** LogExclusion description */ - description?: (string|null); + /** + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; - /** LogExclusion filter */ - filter?: (string|null); + /** + * Calls ListBuckets. + * @param request ListBucketsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBucketsResponse + */ + public listBuckets(request: google.logging.v2.IListBucketsRequest, callback: google.logging.v2.ConfigServiceV2.ListBucketsCallback): void; - /** LogExclusion disabled */ - disabled?: (boolean|null); + /** + * Calls ListBuckets. + * @param request ListBucketsRequest message or plain object + * @returns Promise + */ + public listBuckets(request: google.logging.v2.IListBucketsRequest): Promise; - /** LogExclusion createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Calls GetBucket. + * @param request GetBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogBucket + */ + public getBucket(request: google.logging.v2.IGetBucketRequest, callback: google.logging.v2.ConfigServiceV2.GetBucketCallback): void; - /** LogExclusion updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** + * Calls GetBucket. + * @param request GetBucketRequest message or plain object + * @returns Promise + */ + public getBucket(request: google.logging.v2.IGetBucketRequest): Promise; - /** Represents a LogExclusion. */ - class LogExclusion implements ILogExclusion { + /** + * Calls UpdateBucket. + * @param request UpdateBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogBucket + */ + public updateBucket(request: google.logging.v2.IUpdateBucketRequest, callback: google.logging.v2.ConfigServiceV2.UpdateBucketCallback): void; + + /** + * Calls UpdateBucket. + * @param request UpdateBucketRequest message or plain object + * @returns Promise + */ + public updateBucket(request: google.logging.v2.IUpdateBucketRequest): Promise; + + /** + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSinksResponse + */ + public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; + + /** + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @returns Promise + */ + public listSinks(request: google.logging.v2.IListSinksRequest): Promise; + + /** + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; + + /** + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @returns Promise + */ + public getSink(request: google.logging.v2.IGetSinkRequest): Promise; + + /** + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; + + /** + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @returns Promise + */ + public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; + + /** + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink + */ + public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; + + /** + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @returns Promise + */ + public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; + + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; + + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @returns Promise + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; + + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; + + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @returns Promise + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; /** - * Constructs a new LogExclusion. - * @param [properties] Properties to set + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - constructor(properties?: google.logging.v2.ILogExclusion); - - /** LogExclusion name. */ - public name: string; - - /** LogExclusion description. */ - public description: string; - - /** LogExclusion filter. */ - public filter: string; - - /** LogExclusion disabled. */ - public disabled: boolean; + public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; - /** LogExclusion createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @returns Promise + */ + public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; - /** LogExclusion updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion + */ + public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; /** - * Creates a new LogExclusion instance using the specified properties. - * @param [properties] Properties to set - * @returns LogExclusion instance + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @returns Promise */ - public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; + public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; /** - * Decodes a LogExclusion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; /** - * Verifies a LogExclusion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetCmekSettings. + * @param request GetCmekSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmekSettings */ - public static verify(message: { [k: string]: any }): (string|null); + public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback): void; /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogExclusion + * Calls GetCmekSettings. + * @param request GetCmekSettingsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; + public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest): Promise; /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @param message LogExclusion - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateCmekSettings. + * @param request UpdateCmekSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmekSettings */ - public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback): void; /** - * Converts this LogExclusion to JSON. - * @returns JSON object + * Calls UpdateCmekSettings. + * @param request UpdateCmekSettingsRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest): Promise; } - /** Properties of a ListExclusionsRequest. */ - interface IListExclusionsRequest { - - /** ListExclusionsRequest parent */ - parent?: (string|null); - - /** ListExclusionsRequest pageToken */ - pageToken?: (string|null); + namespace ConfigServiceV2 { - /** ListExclusionsRequest pageSize */ - pageSize?: (number|null); - } + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. + * @param error Error, if any + * @param [response] ListBucketsResponse + */ + type ListBucketsCallback = (error: (Error|null), response?: google.logging.v2.ListBucketsResponse) => void; - /** Represents a ListExclusionsRequest. */ - class ListExclusionsRequest implements IListExclusionsRequest { + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. + * @param error Error, if any + * @param [response] LogBucket + */ + type GetBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; /** - * Constructs a new ListExclusionsRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. + * @param error Error, if any + * @param [response] LogBucket */ - constructor(properties?: google.logging.v2.IListExclusionsRequest); + type UpdateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; - /** ListExclusionsRequest parent. */ - public parent: string; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @param error Error, if any + * @param [response] ListSinksResponse + */ + type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; - /** ListExclusionsRequest pageToken. */ - public pageToken: string; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; - /** ListExclusionsRequest pageSize. */ - public pageSize: number; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Creates a new ListExclusionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListExclusionsRequest instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; + type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @param error Error, if any + * @param [response] Empty */ - public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @param error Error, if any + * @param [response] ListExclusionsResponse */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; + type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; + type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Verifies a ListExclusionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static verify(message: { [k: string]: any }): (string|null); + type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListExclusionsRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @param error Error, if any + * @param [response] Empty */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; + type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @param message ListExclusionsRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. + * @param error Error, if any + * @param [response] CmekSettings */ - public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; /** - * Converts this ListExclusionsRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. + * @param error Error, if any + * @param [response] CmekSettings */ - public toJSON(): { [k: string]: any }; + type UpdateCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; } - /** Properties of a ListExclusionsResponse. */ - interface IListExclusionsResponse { + /** Properties of a LogBucket. */ + interface ILogBucket { + + /** LogBucket name */ + name?: (string|null); + + /** LogBucket description */ + description?: (string|null); - /** ListExclusionsResponse exclusions */ - exclusions?: (google.logging.v2.ILogExclusion[]|null); + /** LogBucket createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ListExclusionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** LogBucket updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket retentionDays */ + retentionDays?: (number|null); + + /** LogBucket lifecycleState */ + lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); } - /** Represents a ListExclusionsResponse. */ - class ListExclusionsResponse implements IListExclusionsResponse { + /** Represents a LogBucket. */ + class LogBucket implements ILogBucket { /** - * Constructs a new ListExclusionsResponse. + * Constructs a new LogBucket. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListExclusionsResponse); + constructor(properties?: google.logging.v2.ILogBucket); - /** ListExclusionsResponse exclusions. */ - public exclusions: google.logging.v2.ILogExclusion[]; + /** LogBucket name. */ + public name: string; - /** ListExclusionsResponse nextPageToken. */ - public nextPageToken: string; + /** LogBucket description. */ + public description: string; + + /** LogBucket createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket retentionDays. */ + public retentionDays: number; + + /** LogBucket lifecycleState. */ + public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); /** - * Creates a new ListExclusionsResponse instance using the specified properties. + * Creates a new LogBucket instance using the specified properties. * @param [properties] Properties to set - * @returns ListExclusionsResponse instance + * @returns LogBucket instance */ - public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; + public static create(properties?: google.logging.v2.ILogBucket): google.logging.v2.LogBucket; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode + * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * @param message LogBucket message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode + * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * @param message LogBucket message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * Decodes a LogBucket message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExclusionsResponse + * @returns LogBucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogBucket; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * Decodes a LogBucket message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExclusionsResponse + * @returns LogBucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogBucket; /** - * Verifies a ListExclusionsResponse message. + * Verifies a LogBucket message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExclusionsResponse + * @returns LogBucket */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogBucket; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. - * @param message ListExclusionsResponse + * Creates a plain object from a LogBucket message. Also converts values to other types if specified. + * @param message LogBucket * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExclusionsResponse to JSON. + * Converts this LogBucket to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetExclusionRequest. */ - interface IGetExclusionRequest { + /** Properties of a LogSink. */ + interface ILogSink { - /** GetExclusionRequest name */ + /** LogSink name */ name?: (string|null); + + /** LogSink destination */ + destination?: (string|null); + + /** LogSink filter */ + filter?: (string|null); + + /** LogSink description */ + description?: (string|null); + + /** LogSink disabled */ + disabled?: (boolean|null); + + /** LogSink outputVersionFormat */ + outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat|null); + + /** LogSink writerIdentity */ + writerIdentity?: (string|null); + + /** LogSink includeChildren */ + includeChildren?: (boolean|null); + + /** LogSink bigqueryOptions */ + bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogSink updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a GetExclusionRequest. */ - class GetExclusionRequest implements IGetExclusionRequest { + /** Represents a LogSink. */ + class LogSink implements ILogSink { /** - * Constructs a new GetExclusionRequest. + * Constructs a new LogSink. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetExclusionRequest); + constructor(properties?: google.logging.v2.ILogSink); - /** GetExclusionRequest name. */ + /** LogSink name. */ public name: string; + /** LogSink destination. */ + public destination: string; + + /** LogSink filter. */ + public filter: string; + + /** LogSink description. */ + public description: string; + + /** LogSink disabled. */ + public disabled: boolean; + + /** LogSink outputVersionFormat. */ + public outputVersionFormat: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat); + + /** LogSink writerIdentity. */ + public writerIdentity: string; + + /** LogSink includeChildren. */ + public includeChildren: boolean; + + /** LogSink bigqueryOptions. */ + public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogSink updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogSink options. */ + public options?: "bigqueryOptions"; + /** - * Creates a new GetExclusionRequest instance using the specified properties. + * Creates a new LogSink instance using the specified properties. * @param [properties] Properties to set - * @returns GetExclusionRequest instance + * @returns LogSink instance */ - public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; + public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. + * Decodes a LogSink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetExclusionRequest + * @returns LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogSink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetExclusionRequest + * @returns LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; /** - * Verifies a GetExclusionRequest message. + * Verifies a LogSink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetExclusionRequest + * @returns LogSink */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. - * @param message GetExclusionRequest + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @param message LogSink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetExclusionRequest to JSON. + * Converts this LogSink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateExclusionRequest. */ - interface ICreateExclusionRequest { + namespace LogSink { - /** CreateExclusionRequest parent */ - parent?: (string|null); + /** VersionFormat enum. */ + enum VersionFormat { + VERSION_FORMAT_UNSPECIFIED = 0, + V2 = 1, + V1 = 2 + } + } - /** CreateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); + /** Properties of a BigQueryOptions. */ + interface IBigQueryOptions { + + /** BigQueryOptions usePartitionedTables */ + usePartitionedTables?: (boolean|null); + + /** BigQueryOptions usesTimestampColumnPartitioning */ + usesTimestampColumnPartitioning?: (boolean|null); } - /** Represents a CreateExclusionRequest. */ - class CreateExclusionRequest implements ICreateExclusionRequest { + /** Represents a BigQueryOptions. */ + class BigQueryOptions implements IBigQueryOptions { /** - * Constructs a new CreateExclusionRequest. + * Constructs a new BigQueryOptions. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICreateExclusionRequest); + constructor(properties?: google.logging.v2.IBigQueryOptions); - /** CreateExclusionRequest parent. */ - public parent: string; + /** BigQueryOptions usePartitionedTables. */ + public usePartitionedTables: boolean; - /** CreateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + /** BigQueryOptions usesTimestampColumnPartitioning. */ + public usesTimestampColumnPartitioning: boolean; /** - * Creates a new CreateExclusionRequest instance using the specified properties. + * Creates a new BigQueryOptions instance using the specified properties. * @param [properties] Properties to set - * @returns CreateExclusionRequest instance + * @returns BigQueryOptions instance */ - public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; + public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * Decodes a BigQueryOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateExclusionRequest + * @returns BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateExclusionRequest + * @returns BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; /** - * Verifies a CreateExclusionRequest message. + * Verifies a BigQueryOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateExclusionRequest + * @returns BigQueryOptions */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @param message CreateExclusionRequest + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @param message BigQueryOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateExclusionRequest to JSON. + * Converts this BigQueryOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateExclusionRequest. */ - interface IUpdateExclusionRequest { + /** LifecycleState enum. */ + enum LifecycleState { + LIFECYCLE_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + DELETE_REQUESTED = 2 + } - /** UpdateExclusionRequest name */ - name?: (string|null); + /** Properties of a ListBucketsRequest. */ + interface IListBucketsRequest { - /** UpdateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); + /** ListBucketsRequest parent */ + parent?: (string|null); - /** UpdateExclusionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListBucketsRequest pageToken */ + pageToken?: (string|null); + + /** ListBucketsRequest pageSize */ + pageSize?: (number|null); } - /** Represents an UpdateExclusionRequest. */ - class UpdateExclusionRequest implements IUpdateExclusionRequest { + /** Represents a ListBucketsRequest. */ + class ListBucketsRequest implements IListBucketsRequest { /** - * Constructs a new UpdateExclusionRequest. + * Constructs a new ListBucketsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateExclusionRequest); + constructor(properties?: google.logging.v2.IListBucketsRequest); - /** UpdateExclusionRequest name. */ - public name: string; + /** ListBucketsRequest parent. */ + public parent: string; - /** UpdateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + /** ListBucketsRequest pageToken. */ + public pageToken: string; - /** UpdateExclusionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListBucketsRequest pageSize. */ + public pageSize: number; /** - * Creates a new UpdateExclusionRequest instance using the specified properties. + * Creates a new ListBucketsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateExclusionRequest instance + * @returns ListBucketsRequest instance */ - public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; + public static create(properties?: google.logging.v2.IListBucketsRequest): google.logging.v2.ListBucketsRequest; /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @param message ListBucketsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @param message ListBucketsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * Decodes a ListBucketsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateExclusionRequest + * @returns ListBucketsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsRequest; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateExclusionRequest + * @returns ListBucketsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsRequest; /** - * Verifies an UpdateExclusionRequest message. + * Verifies a ListBucketsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateExclusionRequest + * @returns ListBucketsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsRequest; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. - * @param message UpdateExclusionRequest + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * @param message ListBucketsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListBucketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateExclusionRequest to JSON. + * Converts this ListBucketsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteExclusionRequest. */ - interface IDeleteExclusionRequest { + /** Properties of a ListBucketsResponse. */ + interface IListBucketsResponse { - /** DeleteExclusionRequest name */ - name?: (string|null); + /** ListBucketsResponse buckets */ + buckets?: (google.logging.v2.ILogBucket[]|null); + + /** ListBucketsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteExclusionRequest. */ - class DeleteExclusionRequest implements IDeleteExclusionRequest { + /** Represents a ListBucketsResponse. */ + class ListBucketsResponse implements IListBucketsResponse { /** - * Constructs a new DeleteExclusionRequest. + * Constructs a new ListBucketsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + constructor(properties?: google.logging.v2.IListBucketsResponse); - /** DeleteExclusionRequest name. */ - public name: string; + /** ListBucketsResponse buckets. */ + public buckets: google.logging.v2.ILogBucket[]; + + /** ListBucketsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. + * Creates a new ListBucketsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteExclusionRequest instance + * @returns ListBucketsResponse instance */ - public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; + public static create(properties?: google.logging.v2.IListBucketsResponse): google.logging.v2.ListBucketsResponse; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode + * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @param message ListBucketsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode + * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @param message ListBucketsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * Decodes a ListBucketsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteExclusionRequest + * @returns ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsResponse; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteExclusionRequest + * @returns ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsResponse; /** - * Verifies a DeleteExclusionRequest message. + * Verifies a ListBucketsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteExclusionRequest + * @returns ListBucketsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsResponse; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. - * @param message DeleteExclusionRequest + * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. + * @param message ListBucketsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListBucketsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteExclusionRequest to JSON. + * Converts this ListBucketsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetCmekSettingsRequest. */ - interface IGetCmekSettingsRequest { + /** Properties of an UpdateBucketRequest. */ + interface IUpdateBucketRequest { - /** GetCmekSettingsRequest name */ + /** UpdateBucketRequest name */ name?: (string|null); + + /** UpdateBucketRequest bucket */ + bucket?: (google.logging.v2.ILogBucket|null); + + /** UpdateBucketRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a GetCmekSettingsRequest. */ - class GetCmekSettingsRequest implements IGetCmekSettingsRequest { + /** Represents an UpdateBucketRequest. */ + class UpdateBucketRequest implements IUpdateBucketRequest { /** - * Constructs a new GetCmekSettingsRequest. + * Constructs a new UpdateBucketRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetCmekSettingsRequest); + constructor(properties?: google.logging.v2.IUpdateBucketRequest); - /** GetCmekSettingsRequest name. */ + /** UpdateBucketRequest name. */ public name: string; + /** UpdateBucketRequest bucket. */ + public bucket?: (google.logging.v2.ILogBucket|null); + + /** UpdateBucketRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + /** - * Creates a new GetCmekSettingsRequest instance using the specified properties. + * Creates a new UpdateBucketRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetCmekSettingsRequest instance + * @returns UpdateBucketRequest instance */ - public static create(properties?: google.logging.v2.IGetCmekSettingsRequest): google.logging.v2.GetCmekSettingsRequest; + public static create(properties?: google.logging.v2.IUpdateBucketRequest): google.logging.v2.UpdateBucketRequest; /** - * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. - * @param message GetCmekSettingsRequest message or plain object to encode + * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @param message UpdateBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. - * @param message GetCmekSettingsRequest message or plain object to encode + * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @param message UpdateBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * Decodes an UpdateBucketRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCmekSettingsRequest + * @returns UpdateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetCmekSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateBucketRequest; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCmekSettingsRequest + * @returns UpdateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetCmekSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateBucketRequest; /** - * Verifies a GetCmekSettingsRequest message. + * Verifies an UpdateBucketRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCmekSettingsRequest + * @returns UpdateBucketRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetCmekSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateBucketRequest; /** - * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. - * @param message GetCmekSettingsRequest + * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. + * @param message UpdateBucketRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCmekSettingsRequest to JSON. + * Converts this UpdateBucketRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateCmekSettingsRequest. */ - interface IUpdateCmekSettingsRequest { + /** Properties of a GetBucketRequest. */ + interface IGetBucketRequest { - /** UpdateCmekSettingsRequest name */ + /** GetBucketRequest name */ name?: (string|null); - - /** UpdateCmekSettingsRequest cmekSettings */ - cmekSettings?: (google.logging.v2.ICmekSettings|null); - - /** UpdateCmekSettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an UpdateCmekSettingsRequest. */ - class UpdateCmekSettingsRequest implements IUpdateCmekSettingsRequest { + /** Represents a GetBucketRequest. */ + class GetBucketRequest implements IGetBucketRequest { /** - * Constructs a new UpdateCmekSettingsRequest. + * Constructs a new GetBucketRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateCmekSettingsRequest); + constructor(properties?: google.logging.v2.IGetBucketRequest); - /** UpdateCmekSettingsRequest name. */ + /** GetBucketRequest name. */ public name: string; - /** UpdateCmekSettingsRequest cmekSettings. */ - public cmekSettings?: (google.logging.v2.ICmekSettings|null); - - /** UpdateCmekSettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Creates a new UpdateCmekSettingsRequest instance using the specified properties. + * Creates a new GetBucketRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateCmekSettingsRequest instance + * @returns GetBucketRequest instance */ - public static create(properties?: google.logging.v2.IUpdateCmekSettingsRequest): google.logging.v2.UpdateCmekSettingsRequest; + public static create(properties?: google.logging.v2.IGetBucketRequest): google.logging.v2.GetBucketRequest; /** - * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. - * @param message UpdateCmekSettingsRequest message or plain object to encode + * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @param message GetBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. - * @param message UpdateCmekSettingsRequest message or plain object to encode + * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @param message GetBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. + * Decodes a GetBucketRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateCmekSettingsRequest + * @returns GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateCmekSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetBucketRequest; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateCmekSettingsRequest + * @returns GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateCmekSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetBucketRequest; /** - * Verifies an UpdateCmekSettingsRequest message. + * Verifies a GetBucketRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateCmekSettingsRequest + * @returns GetBucketRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateCmekSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetBucketRequest; /** - * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateCmekSettingsRequest + * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. + * @param message GetBucketRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateCmekSettingsRequest to JSON. + * Converts this GetBucketRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CmekSettings. */ - interface ICmekSettings { + /** Properties of a ListSinksRequest. */ + interface IListSinksRequest { - /** CmekSettings name */ - name?: (string|null); + /** ListSinksRequest parent */ + parent?: (string|null); - /** CmekSettings kmsKeyName */ - kmsKeyName?: (string|null); + /** ListSinksRequest pageToken */ + pageToken?: (string|null); - /** CmekSettings serviceAccountId */ - serviceAccountId?: (string|null); + /** ListSinksRequest pageSize */ + pageSize?: (number|null); } - /** Represents a CmekSettings. */ - class CmekSettings implements ICmekSettings { + /** Represents a ListSinksRequest. */ + class ListSinksRequest implements IListSinksRequest { /** - * Constructs a new CmekSettings. + * Constructs a new ListSinksRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICmekSettings); + constructor(properties?: google.logging.v2.IListSinksRequest); - /** CmekSettings name. */ - public name: string; + /** ListSinksRequest parent. */ + public parent: string; - /** CmekSettings kmsKeyName. */ - public kmsKeyName: string; + /** ListSinksRequest pageToken. */ + public pageToken: string; - /** CmekSettings serviceAccountId. */ - public serviceAccountId: string; + /** ListSinksRequest pageSize. */ + public pageSize: number; /** - * Creates a new CmekSettings instance using the specified properties. + * Creates a new ListSinksRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CmekSettings instance + * @returns ListSinksRequest instance */ - public static create(properties?: google.logging.v2.ICmekSettings): google.logging.v2.CmekSettings; + public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; /** - * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. - * @param message CmekSettings message or plain object to encode + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. - * @param message CmekSettings message or plain object to encode + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CmekSettings message from the specified reader or buffer. + * Decodes a ListSinksRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CmekSettings + * @returns ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CmekSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; /** - * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CmekSettings + * @returns ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CmekSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; /** - * Verifies a CmekSettings message. + * Verifies a ListSinksRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CmekSettings + * @returns ListSinksRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CmekSettings; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; /** - * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. - * @param message CmekSettings + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @param message ListSinksRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CmekSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CmekSettings to JSON. + * Converts this ListSinksRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a LoggingServiceV2 */ - class LoggingServiceV2 extends $protobuf.rpc.Service { - - /** - * Constructs a new LoggingServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; - - /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; + /** Properties of a ListSinksResponse. */ + interface IListSinksResponse { - /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @returns Promise - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; + /** ListSinksResponse sinks */ + sinks?: (google.logging.v2.ILogSink[]|null); - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; + /** ListSinksResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @returns Promise - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; + /** Represents a ListSinksResponse. */ + class ListSinksResponse implements IListSinksResponse { /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * Constructs a new ListSinksResponse. + * @param [properties] Properties to set */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; + constructor(properties?: google.logging.v2.IListSinksResponse); - /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @returns Promise - */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; + /** ListSinksResponse sinks. */ + public sinks: google.logging.v2.ILogSink[]; - /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; + /** ListSinksResponse nextPageToken. */ + public nextPageToken: string; /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns Promise + * Creates a new ListSinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSinksResponse instance */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; + public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogsResponse + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; + public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @returns Promise + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLogs(request: google.logging.v2.IListLogsRequest): Promise; - } + public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - namespace LoggingServiceV2 { + /** + * Decodes a ListSinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @param error Error, if any - * @param [response] Empty + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @param error Error, if any - * @param [response] WriteLogEntriesResponse + * Verifies a ListSinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @param error Error, if any - * @param [response] ListLogEntriesResponse + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSinksResponse */ - type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @param error Error, if any - * @param [response] ListMonitoredResourceDescriptorsResponse + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @param message ListSinksResponse + * @param [options] Conversion options + * @returns Plain object */ - type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; + public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @param error Error, if any - * @param [response] ListLogsResponse + * Converts this ListSinksResponse to JSON. + * @returns JSON object */ - type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteLogRequest. */ - interface IDeleteLogRequest { + /** Properties of a GetSinkRequest. */ + interface IGetSinkRequest { - /** DeleteLogRequest logName */ - logName?: (string|null); + /** GetSinkRequest sinkName */ + sinkName?: (string|null); } - /** Represents a DeleteLogRequest. */ - class DeleteLogRequest implements IDeleteLogRequest { + /** Represents a GetSinkRequest. */ + class GetSinkRequest implements IGetSinkRequest { /** - * Constructs a new DeleteLogRequest. + * Constructs a new GetSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteLogRequest); + constructor(properties?: google.logging.v2.IGetSinkRequest); - /** DeleteLogRequest logName. */ - public logName: string; + /** GetSinkRequest sinkName. */ + public sinkName: string; /** - * Creates a new DeleteLogRequest instance using the specified properties. + * Creates a new GetSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteLogRequest instance + * @returns GetSinkRequest instance */ - public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; + public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. + * Decodes a GetSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteLogRequest + * @returns GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteLogRequest + * @returns GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; /** - * Verifies a DeleteLogRequest message. + * Verifies a GetSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteLogRequest + * @returns GetSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @param message DeleteLogRequest + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @param message GetSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteLogRequest to JSON. + * Converts this GetSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WriteLogEntriesRequest. */ - interface IWriteLogEntriesRequest { - - /** WriteLogEntriesRequest logName */ - logName?: (string|null); - - /** WriteLogEntriesRequest resource */ - resource?: (google.api.IMonitoredResource|null); - - /** WriteLogEntriesRequest labels */ - labels?: ({ [k: string]: string }|null); + /** Properties of a CreateSinkRequest. */ + interface ICreateSinkRequest { - /** WriteLogEntriesRequest entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** CreateSinkRequest parent */ + parent?: (string|null); - /** WriteLogEntriesRequest partialSuccess */ - partialSuccess?: (boolean|null); + /** CreateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); - /** WriteLogEntriesRequest dryRun */ - dryRun?: (boolean|null); + /** CreateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); } - /** Represents a WriteLogEntriesRequest. */ - class WriteLogEntriesRequest implements IWriteLogEntriesRequest { + /** Represents a CreateSinkRequest. */ + class CreateSinkRequest implements ICreateSinkRequest { /** - * Constructs a new WriteLogEntriesRequest. + * Constructs a new CreateSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); - - /** WriteLogEntriesRequest logName. */ - public logName: string; - - /** WriteLogEntriesRequest resource. */ - public resource?: (google.api.IMonitoredResource|null); - - /** WriteLogEntriesRequest labels. */ - public labels: { [k: string]: string }; + constructor(properties?: google.logging.v2.ICreateSinkRequest); - /** WriteLogEntriesRequest entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** CreateSinkRequest parent. */ + public parent: string; - /** WriteLogEntriesRequest partialSuccess. */ - public partialSuccess: boolean; + /** CreateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); - /** WriteLogEntriesRequest dryRun. */ - public dryRun: boolean; + /** CreateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. + * Creates a new CreateSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesRequest instance + * @returns CreateSinkRequest instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; + public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * Decodes a CreateSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesRequest + * @returns CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesRequest + * @returns CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; /** - * Verifies a WriteLogEntriesRequest message. + * Verifies a CreateSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesRequest + * @returns CreateSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. - * @param message WriteLogEntriesRequest + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @param message CreateSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSinkRequest. */ + interface IUpdateSinkRequest { + + /** UpdateSinkRequest sinkName */ + sinkName?: (string|null); - /** - * Converts this WriteLogEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** UpdateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); - /** Properties of a WriteLogEntriesResponse. */ - interface IWriteLogEntriesResponse { + /** UpdateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + + /** UpdateSinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a WriteLogEntriesResponse. */ - class WriteLogEntriesResponse implements IWriteLogEntriesResponse { + /** Represents an UpdateSinkRequest. */ + class UpdateSinkRequest implements IUpdateSinkRequest { /** - * Constructs a new WriteLogEntriesResponse. + * Constructs a new UpdateSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); + constructor(properties?: google.logging.v2.IUpdateSinkRequest); + + /** UpdateSinkRequest sinkName. */ + public sinkName: string; + + /** UpdateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; + + /** UpdateSinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. + * Creates a new UpdateSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesResponse instance + * @returns UpdateSinkRequest instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; + public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * Decodes an UpdateSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesResponse + * @returns UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesResponse + * @returns UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; /** - * Verifies a WriteLogEntriesResponse message. + * Verifies an UpdateSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesResponse + * @returns UpdateSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. - * @param message WriteLogEntriesResponse + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @param message UpdateSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesResponse to JSON. + * Converts this UpdateSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WriteLogEntriesPartialErrors. */ - interface IWriteLogEntriesPartialErrors { + /** Properties of a DeleteSinkRequest. */ + interface IDeleteSinkRequest { - /** WriteLogEntriesPartialErrors logEntryErrors */ - logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); + /** DeleteSinkRequest sinkName */ + sinkName?: (string|null); } - /** Represents a WriteLogEntriesPartialErrors. */ - class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { + /** Represents a DeleteSinkRequest. */ + class DeleteSinkRequest implements IDeleteSinkRequest { /** - * Constructs a new WriteLogEntriesPartialErrors. + * Constructs a new DeleteSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); + constructor(properties?: google.logging.v2.IDeleteSinkRequest); - /** WriteLogEntriesPartialErrors logEntryErrors. */ - public logEntryErrors: { [k: string]: google.rpc.IStatus }; + /** DeleteSinkRequest sinkName. */ + public sinkName: string; /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * Creates a new DeleteSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WriteLogEntriesPartialErrors instance + * @returns DeleteSinkRequest instance */ - public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; + public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WriteLogEntriesPartialErrors + * @returns DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesPartialErrors + * @returns DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; /** - * Verifies a WriteLogEntriesPartialErrors message. + * Verifies a DeleteSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WriteLogEntriesPartialErrors + * @returns DeleteSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. - * @param message WriteLogEntriesPartialErrors + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @param message DeleteSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WriteLogEntriesPartialErrors to JSON. + * Converts this DeleteSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogEntriesRequest. */ - interface IListLogEntriesRequest { + /** Properties of a LogExclusion. */ + interface ILogExclusion { - /** ListLogEntriesRequest resourceNames */ - resourceNames?: (string[]|null); + /** LogExclusion name */ + name?: (string|null); - /** ListLogEntriesRequest filter */ + /** LogExclusion description */ + description?: (string|null); + + /** LogExclusion filter */ filter?: (string|null); - /** ListLogEntriesRequest orderBy */ - orderBy?: (string|null); + /** LogExclusion disabled */ + disabled?: (boolean|null); - /** ListLogEntriesRequest pageSize */ - pageSize?: (number|null); + /** LogExclusion createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ListLogEntriesRequest pageToken */ - pageToken?: (string|null); + /** LogExclusion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListLogEntriesRequest. */ - class ListLogEntriesRequest implements IListLogEntriesRequest { + /** Represents a LogExclusion. */ + class LogExclusion implements ILogExclusion { /** - * Constructs a new ListLogEntriesRequest. + * Constructs a new LogExclusion. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogEntriesRequest); + constructor(properties?: google.logging.v2.ILogExclusion); - /** ListLogEntriesRequest resourceNames. */ - public resourceNames: string[]; + /** LogExclusion name. */ + public name: string; - /** ListLogEntriesRequest filter. */ + /** LogExclusion description. */ + public description: string; + + /** LogExclusion filter. */ public filter: string; - /** ListLogEntriesRequest orderBy. */ - public orderBy: string; + /** LogExclusion disabled. */ + public disabled: boolean; - /** ListLogEntriesRequest pageSize. */ - public pageSize: number; + /** LogExclusion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ListLogEntriesRequest pageToken. */ - public pageToken: string; + /** LogExclusion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListLogEntriesRequest instance using the specified properties. + * Creates a new LogExclusion instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogEntriesRequest instance + * @returns LogExclusion instance */ - public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; + public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogEntriesRequest + * @returns LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogEntriesRequest + * @returns LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; /** - * Verifies a ListLogEntriesRequest message. + * Verifies a LogExclusion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogEntriesRequest + * @returns LogExclusion */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. - * @param message ListLogEntriesRequest + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * @param message LogExclusion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogEntriesRequest to JSON. + * Converts this LogExclusion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogEntriesResponse. */ - interface IListLogEntriesResponse { + /** Properties of a ListExclusionsRequest. */ + interface IListExclusionsRequest { - /** ListLogEntriesResponse entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** ListExclusionsRequest parent */ + parent?: (string|null); + + /** ListExclusionsRequest pageToken */ + pageToken?: (string|null); - /** ListLogEntriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListExclusionsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a ListLogEntriesResponse. */ - class ListLogEntriesResponse implements IListLogEntriesResponse { + /** Represents a ListExclusionsRequest. */ + class ListExclusionsRequest implements IListExclusionsRequest { /** - * Constructs a new ListLogEntriesResponse. + * Constructs a new ListExclusionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogEntriesResponse); + constructor(properties?: google.logging.v2.IListExclusionsRequest); - /** ListLogEntriesResponse entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** ListExclusionsRequest parent. */ + public parent: string; - /** ListLogEntriesResponse nextPageToken. */ - public nextPageToken: string; + /** ListExclusionsRequest pageToken. */ + public pageToken: string; + + /** ListExclusionsRequest pageSize. */ + public pageSize: number; /** - * Creates a new ListLogEntriesResponse instance using the specified properties. + * Creates a new ListExclusionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogEntriesResponse instance + * @returns ListExclusionsRequest instance */ - public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; + public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * Decodes a ListExclusionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogEntriesResponse + * @returns ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogEntriesResponse + * @returns ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; /** - * Verifies a ListLogEntriesResponse message. + * Verifies a ListExclusionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogEntriesResponse + * @returns ListExclusionsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. - * @param message ListLogEntriesResponse + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @param message ListExclusionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogEntriesResponse to JSON. + * Converts this ListExclusionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMonitoredResourceDescriptorsRequest. */ - interface IListMonitoredResourceDescriptorsRequest { + /** Properties of a ListExclusionsResponse. */ + interface IListExclusionsResponse { - /** ListMonitoredResourceDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** ListExclusionsResponse exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); - /** ListMonitoredResourceDescriptorsRequest pageToken */ - pageToken?: (string|null); + /** ListExclusionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListMonitoredResourceDescriptorsRequest. */ - class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + /** Represents a ListExclusionsResponse. */ + class ListExclusionsResponse implements IListExclusionsResponse { /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new ListExclusionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); + constructor(properties?: google.logging.v2.IListExclusionsResponse); - /** ListMonitoredResourceDescriptorsRequest pageSize. */ - public pageSize: number; + /** ListExclusionsResponse exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; - /** ListMonitoredResourceDescriptorsRequest pageToken. */ - public pageToken: string; + /** ListExclusionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new ListExclusionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsRequest instance + * @returns ListExclusionsResponse instance */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a ListExclusionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsRequest + * @returns ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsRequest + * @returns ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a ListExclusionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsRequest + * @returns ListExclusionsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsRequest + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @param message ListExclusionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this ListExclusionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMonitoredResourceDescriptorsResponse. */ - interface IListMonitoredResourceDescriptorsResponse { - - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ - resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + /** Properties of a GetExclusionRequest. */ + interface IGetExclusionRequest { - /** ListMonitoredResourceDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetExclusionRequest name */ + name?: (string|null); } - /** Represents a ListMonitoredResourceDescriptorsResponse. */ - class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + /** Represents a GetExclusionRequest. */ + class GetExclusionRequest implements IGetExclusionRequest { /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new GetExclusionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); - - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ - public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + constructor(properties?: google.logging.v2.IGetExclusionRequest); - /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** GetExclusionRequest name. */ + public name: string; /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * Creates a new GetExclusionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsResponse instance + * @returns GetExclusionRequest instance */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a GetExclusionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsResponse + * @returns GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsResponse + * @returns GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a GetExclusionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsResponse + * @returns GetExclusionRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsResponse + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @param message GetExclusionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this GetExclusionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogsRequest. */ - interface IListLogsRequest { + /** Properties of a CreateExclusionRequest. */ + interface ICreateExclusionRequest { - /** ListLogsRequest parent */ + /** CreateExclusionRequest parent */ parent?: (string|null); - /** ListLogsRequest pageSize */ - pageSize?: (number|null); - - /** ListLogsRequest pageToken */ - pageToken?: (string|null); + /** CreateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); } - /** Represents a ListLogsRequest. */ - class ListLogsRequest implements IListLogsRequest { + /** Represents a CreateExclusionRequest. */ + class CreateExclusionRequest implements ICreateExclusionRequest { /** - * Constructs a new ListLogsRequest. + * Constructs a new CreateExclusionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogsRequest); + constructor(properties?: google.logging.v2.ICreateExclusionRequest); - /** ListLogsRequest parent. */ + /** CreateExclusionRequest parent. */ public parent: string; - /** ListLogsRequest pageSize. */ - public pageSize: number; - - /** ListLogsRequest pageToken. */ - public pageToken: string; + /** CreateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); /** - * Creates a new ListLogsRequest instance using the specified properties. + * Creates a new CreateExclusionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogsRequest instance + * @returns CreateExclusionRequest instance */ - public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; + public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; - /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode + /** + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogsRequest message from the specified reader or buffer. + * Decodes a CreateExclusionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogsRequest + * @returns CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogsRequest + * @returns CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; /** - * Verifies a ListLogsRequest message. + * Verifies a CreateExclusionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogsRequest + * @returns CreateExclusionRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. - * @param message ListLogsRequest + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @param message CreateExclusionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogsRequest to JSON. + * Converts this CreateExclusionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogsResponse. */ - interface IListLogsResponse { + /** Properties of an UpdateExclusionRequest. */ + interface IUpdateExclusionRequest { - /** ListLogsResponse logNames */ - logNames?: (string[]|null); + /** UpdateExclusionRequest name */ + name?: (string|null); - /** ListLogsResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + + /** UpdateExclusionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListLogsResponse. */ - class ListLogsResponse implements IListLogsResponse { + /** Represents an UpdateExclusionRequest. */ + class UpdateExclusionRequest implements IUpdateExclusionRequest { /** - * Constructs a new ListLogsResponse. + * Constructs a new UpdateExclusionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogsResponse); + constructor(properties?: google.logging.v2.IUpdateExclusionRequest); - /** ListLogsResponse logNames. */ - public logNames: string[]; + /** UpdateExclusionRequest name. */ + public name: string; - /** ListLogsResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); + + /** UpdateExclusionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListLogsResponse instance using the specified properties. + * Creates a new UpdateExclusionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogsResponse instance + * @returns UpdateExclusionRequest instance */ - public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; + public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogsResponse message from the specified reader or buffer. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogsResponse + * @returns UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogsResponse + * @returns UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; /** - * Verifies a ListLogsResponse message. + * Verifies an UpdateExclusionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogsResponse + * @returns UpdateExclusionRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. - * @param message ListLogsResponse + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @param message UpdateExclusionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogsResponse to JSON. + * Converts this UpdateExclusionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntry. */ - interface ILogEntry { - - /** LogEntry logName */ - logName?: (string|null); - - /** LogEntry resource */ - resource?: (google.api.IMonitoredResource|null); - - /** LogEntry protoPayload */ - protoPayload?: (google.protobuf.IAny|null); - - /** LogEntry textPayload */ - textPayload?: (string|null); - - /** LogEntry jsonPayload */ - jsonPayload?: (google.protobuf.IStruct|null); - - /** LogEntry timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry receiveTimestamp */ - receiveTimestamp?: (google.protobuf.ITimestamp|null); - - /** LogEntry severity */ - severity?: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity|null); - - /** LogEntry insertId */ - insertId?: (string|null); - - /** LogEntry httpRequest */ - httpRequest?: (google.logging.type.IHttpRequest|null); - - /** LogEntry labels */ - labels?: ({ [k: string]: string }|null); - - /** LogEntry operation */ - operation?: (google.logging.v2.ILogEntryOperation|null); - - /** LogEntry trace */ - trace?: (string|null); - - /** LogEntry spanId */ - spanId?: (string|null); - - /** LogEntry traceSampled */ - traceSampled?: (boolean|null); + /** Properties of a DeleteExclusionRequest. */ + interface IDeleteExclusionRequest { - /** LogEntry sourceLocation */ - sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + /** DeleteExclusionRequest name */ + name?: (string|null); } - /** Represents a LogEntry. */ - class LogEntry implements ILogEntry { + /** Represents a DeleteExclusionRequest. */ + class DeleteExclusionRequest implements IDeleteExclusionRequest { /** - * Constructs a new LogEntry. + * Constructs a new DeleteExclusionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntry); - - /** LogEntry logName. */ - public logName: string; - - /** LogEntry resource. */ - public resource?: (google.api.IMonitoredResource|null); + constructor(properties?: google.logging.v2.IDeleteExclusionRequest); - /** LogEntry protoPayload. */ - public protoPayload?: (google.protobuf.IAny|null); + /** DeleteExclusionRequest name. */ + public name: string; - /** LogEntry textPayload. */ - public textPayload: string; + /** + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; - /** LogEntry jsonPayload. */ - public jsonPayload?: (google.protobuf.IStruct|null); + /** + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry receiveTimestamp. */ - public receiveTimestamp?: (google.protobuf.ITimestamp|null); + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; - /** LogEntry severity. */ - public severity: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity); + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; - /** LogEntry insertId. */ - public insertId: string; + /** + * Verifies a DeleteExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogEntry httpRequest. */ - public httpRequest?: (google.logging.type.IHttpRequest|null); + /** + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; - /** LogEntry labels. */ - public labels: { [k: string]: string }; + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @param message DeleteExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogEntry operation. */ - public operation?: (google.logging.v2.ILogEntryOperation|null); + /** + * Converts this DeleteExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogEntry trace. */ - public trace: string; + /** Properties of a GetCmekSettingsRequest. */ + interface IGetCmekSettingsRequest { - /** LogEntry spanId. */ - public spanId: string; + /** GetCmekSettingsRequest name */ + name?: (string|null); + } - /** LogEntry traceSampled. */ - public traceSampled: boolean; + /** Represents a GetCmekSettingsRequest. */ + class GetCmekSettingsRequest implements IGetCmekSettingsRequest { - /** LogEntry sourceLocation. */ - public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + /** + * Constructs a new GetCmekSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetCmekSettingsRequest); - /** LogEntry payload. */ - public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); + /** GetCmekSettingsRequest name. */ + public name: string; /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new GetCmekSettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntry instance + * @returns GetCmekSettingsRequest instance */ - public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; + public static create(properties?: google.logging.v2.IGetCmekSettingsRequest): google.logging.v2.GetCmekSettingsRequest; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @param message GetCmekSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @param message GetCmekSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntry + * @returns GetCmekSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetCmekSettingsRequest; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntry + * @returns GetCmekSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetCmekSettingsRequest; /** - * Verifies a LogEntry message. + * Verifies a GetCmekSettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntry + * @returns GetCmekSettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetCmekSettingsRequest; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @param message LogEntry + * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * @param message GetCmekSettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntry to JSON. + * Converts this GetCmekSettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntryOperation. */ - interface ILogEntryOperation { - - /** LogEntryOperation id */ - id?: (string|null); + /** Properties of an UpdateCmekSettingsRequest. */ + interface IUpdateCmekSettingsRequest { - /** LogEntryOperation producer */ - producer?: (string|null); + /** UpdateCmekSettingsRequest name */ + name?: (string|null); - /** LogEntryOperation first */ - first?: (boolean|null); + /** UpdateCmekSettingsRequest cmekSettings */ + cmekSettings?: (google.logging.v2.ICmekSettings|null); - /** LogEntryOperation last */ - last?: (boolean|null); + /** UpdateCmekSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a LogEntryOperation. */ - class LogEntryOperation implements ILogEntryOperation { + /** Represents an UpdateCmekSettingsRequest. */ + class UpdateCmekSettingsRequest implements IUpdateCmekSettingsRequest { /** - * Constructs a new LogEntryOperation. + * Constructs a new UpdateCmekSettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntryOperation); - - /** LogEntryOperation id. */ - public id: string; + constructor(properties?: google.logging.v2.IUpdateCmekSettingsRequest); - /** LogEntryOperation producer. */ - public producer: string; + /** UpdateCmekSettingsRequest name. */ + public name: string; - /** LogEntryOperation first. */ - public first: boolean; + /** UpdateCmekSettingsRequest cmekSettings. */ + public cmekSettings?: (google.logging.v2.ICmekSettings|null); - /** LogEntryOperation last. */ - public last: boolean; + /** UpdateCmekSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new LogEntryOperation instance using the specified properties. + * Creates a new UpdateCmekSettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntryOperation instance + * @returns UpdateCmekSettingsRequest instance */ - public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; + public static create(properties?: google.logging.v2.IUpdateCmekSettingsRequest): google.logging.v2.UpdateCmekSettingsRequest; /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode + * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @param message UpdateCmekSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode + * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @param message UpdateCmekSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntryOperation message from the specified reader or buffer. + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntryOperation + * @returns UpdateCmekSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateCmekSettingsRequest; /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntryOperation + * @returns UpdateCmekSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateCmekSettingsRequest; /** - * Verifies a LogEntryOperation message. + * Verifies an UpdateCmekSettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntryOperation + * @returns UpdateCmekSettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateCmekSettingsRequest; /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. - * @param message LogEntryOperation + * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateCmekSettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntryOperation to JSON. + * Converts this UpdateCmekSettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogEntrySourceLocation. */ - interface ILogEntrySourceLocation { + /** Properties of a CmekSettings. */ + interface ICmekSettings { - /** LogEntrySourceLocation file */ - file?: (string|null); + /** CmekSettings name */ + name?: (string|null); - /** LogEntrySourceLocation line */ - line?: (number|Long|string|null); + /** CmekSettings kmsKeyName */ + kmsKeyName?: (string|null); - /** LogEntrySourceLocation function */ - "function"?: (string|null); + /** CmekSettings serviceAccountId */ + serviceAccountId?: (string|null); } - /** Represents a LogEntrySourceLocation. */ - class LogEntrySourceLocation implements ILogEntrySourceLocation { + /** Represents a CmekSettings. */ + class CmekSettings implements ICmekSettings { /** - * Constructs a new LogEntrySourceLocation. + * Constructs a new CmekSettings. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntrySourceLocation); + constructor(properties?: google.logging.v2.ICmekSettings); - /** LogEntrySourceLocation file. */ - public file: string; + /** CmekSettings name. */ + public name: string; - /** LogEntrySourceLocation line. */ - public line: (number|Long|string); + /** CmekSettings kmsKeyName. */ + public kmsKeyName: string; - /** LogEntrySourceLocation function. */ - public function: string; + /** CmekSettings serviceAccountId. */ + public serviceAccountId: string; /** - * Creates a new LogEntrySourceLocation instance using the specified properties. + * Creates a new CmekSettings instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntrySourceLocation instance + * @returns CmekSettings instance */ - public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; + public static create(properties?: google.logging.v2.ICmekSettings): google.logging.v2.CmekSettings; /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode + * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @param message CmekSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode + * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @param message CmekSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * Decodes a CmekSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntrySourceLocation + * @returns CmekSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CmekSettings; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * Decodes a CmekSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntrySourceLocation + * @returns CmekSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CmekSettings; /** - * Verifies a LogEntrySourceLocation message. + * Verifies a CmekSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntrySourceLocation + * @returns CmekSettings */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CmekSettings; /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. - * @param message LogEntrySourceLocation + * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * @param message CmekSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CmekSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntrySourceLocation to JSON. + * Converts this CmekSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -5280,1005 +5280,1005 @@ export namespace google { IMMUTABLE = 5 } - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { + + /** MonitoredResourceDescriptor name */ + name?: (string|null); - /** ResourceDescriptor type */ + /** MonitoredResourceDescriptor type */ type?: (string|null); - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** MonitoredResourceDescriptor description */ + description?: (string|null); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** MonitoredResourceDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { /** - * Constructs a new ResourceDescriptor. + * Constructs a new MonitoredResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); + constructor(properties?: google.api.IMonitoredResourceDescriptor); - /** ResourceDescriptor type. */ - public type: string; + /** MonitoredResourceDescriptor name. */ + public name: string; - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** MonitoredResourceDescriptor type. */ + public type: string; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** MonitoredResourceDescriptor description. */ + public description: string; - /** ResourceDescriptor plural. */ - public plural: string; + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; - /** ResourceDescriptor singular. */ - public singular: string; + /** MonitoredResourceDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns MonitoredResourceDescriptor instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceDescriptor + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; /** - * Verifies a ResourceDescriptor message. + * Verifies a MonitoredResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns MonitoredResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { - /** ResourceReference type */ + /** MonitoredResource type */ type?: (string|null); - /** ResourceReference childType */ - childType?: (string|null); + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { /** - * Constructs a new ResourceReference. + * Constructs a new MonitoredResource. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.api.IMonitoredResource); - /** ResourceReference type. */ + /** MonitoredResource type. */ public type: string; - /** ResourceReference childType. */ - public childType: string; + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns MonitoredResource instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceReference + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; /** - * Verifies a ResourceReference message. + * Verifies a MonitoredResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns MonitoredResource */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this MonitoredResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Http. */ - interface IHttp { + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { /** - * Constructs a new Http. + * Constructs a new MonitoredResourceMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.api.IMonitoredResourceMetadata); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; /** - * Creates a new Http instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns MonitoredResourceMetadata instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; /** - * Verifies a Http message. + * Verifies a MonitoredResourceMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns MonitoredResourceMetadata */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { - /** HttpRule body */ - body?: (string|null); + /** LabelDescriptor key */ + key?: (string|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** LabelDescriptor description */ + description?: (string|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { /** - * Constructs a new HttpRule. + * Constructs a new LabelDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get: string; - - /** HttpRule put. */ - public put: string; - - /** HttpRule post. */ - public post: string; - - /** HttpRule delete. */ - public delete: string; - - /** HttpRule patch. */ - public patch: string; - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; + constructor(properties?: google.api.ILabelDescriptor); - /** HttpRule responseBody. */ - public responseBody: string; + /** LabelDescriptor key. */ + public key: string; - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** LabelDescriptor valueType. */ + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** LabelDescriptor description. */ + public description: string; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns LabelDescriptor instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; /** - * Verifies a HttpRule message. + * Verifies a LabelDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns LabelDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this LabelDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + namespace LabelDescriptor { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } - /** CustomHttpPattern path */ - path?: (string|null); + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new CustomHttpPattern. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.api.IResourceDescriptor); - /** CustomHttpPattern kind. */ - public kind: string; + /** ResourceDescriptor type. */ + public type: string; - /** CustomHttpPattern path. */ - public path: string; + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a CustomHttpPattern message. + * Verifies a ResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResourceDescriptor. */ - interface IMonitoredResourceDescriptor { - - /** MonitoredResourceDescriptor name */ - name?: (string|null); - - /** MonitoredResourceDescriptor type */ - type?: (string|null); + namespace ResourceDescriptor { - /** MonitoredResourceDescriptor displayName */ - displayName?: (string|null); + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } - /** MonitoredResourceDescriptor description */ - description?: (string|null); + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** MonitoredResourceDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); + /** ResourceReference type */ + type?: (string|null); - /** MonitoredResourceDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + /** ResourceReference childType */ + childType?: (string|null); } - /** Represents a MonitoredResourceDescriptor. */ - class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceDescriptor); - - /** MonitoredResourceDescriptor name. */ - public name: string; + constructor(properties?: google.api.IResourceReference); - /** MonitoredResourceDescriptor type. */ + /** ResourceReference type. */ public type: string; - /** MonitoredResourceDescriptor displayName. */ - public displayName: string; - - /** MonitoredResourceDescriptor description. */ - public description: string; - - /** MonitoredResourceDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** MonitoredResourceDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceDescriptor instance + * @returns ResourceReference instance */ - public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceDescriptor + * @returns ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceDescriptor + * @returns ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a ResourceReference message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceDescriptor + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @param message MonitoredResourceDescriptor + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResource. */ - interface IMonitoredResource { + /** Properties of a Http. */ + interface IHttp { - /** MonitoredResource type */ - type?: (string|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** MonitoredResource labels */ - labels?: ({ [k: string]: string }|null); + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Represents a MonitoredResource. */ - class MonitoredResource implements IMonitoredResource { + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new MonitoredResource. + * Constructs a new Http. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResource); + constructor(properties?: google.api.IHttp); - /** MonitoredResource type. */ - public type: string; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** MonitoredResource labels. */ - public labels: { [k: string]: string }; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResource instance + * @returns Http instance */ - public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResource + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResource + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a MonitoredResource message. + * Verifies a Http message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResource + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @param message MonitoredResource + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResource to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResourceMetadata. */ - interface IMonitoredResourceMetadata { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** MonitoredResourceMetadata systemLabels */ - systemLabels?: (google.protobuf.IStruct|null); + /** HttpRule selector */ + selector?: (string|null); - /** MonitoredResourceMetadata userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); } - /** Represents a MonitoredResourceMetadata. */ - class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new HttpRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceMetadata); + constructor(properties?: google.api.IHttpRule); - /** MonitoredResourceMetadata systemLabels. */ - public systemLabels?: (google.protobuf.IStruct|null); + /** HttpRule selector. */ + public selector: string; - /** MonitoredResourceMetadata userLabels. */ - public userLabels: { [k: string]: string }; + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceMetadata instance + * @returns HttpRule instance */ - public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceMetadata + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceMetadata + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a HttpRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceMetadata + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @param message MonitoredResourceMetadata + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { - - /** LabelDescriptor key */ - key?: (string|null); + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** LabelDescriptor description */ - description?: (string|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new LabelDescriptor. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.api.ILabelDescriptor); - - /** LabelDescriptor key. */ - public key: string; + constructor(properties?: google.api.ICustomHttpPattern); - /** LabelDescriptor valueType. */ - public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + /** CustomHttpPattern kind. */ + public kind: string; - /** LabelDescriptor description. */ - public description: string; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns LabelDescriptor instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LabelDescriptor + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LabelDescriptor + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a LabelDescriptor message. + * Verifies a CustomHttpPattern message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LabelDescriptor + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LabelDescriptor to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LabelDescriptor { - - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - /** Properties of a Distribution. */ interface IDistribution { @@ -9757,11 +9757,11 @@ export namespace google { /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - /** MethodOptions .google.api.http */ ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); } /** Represents a MethodOptions. */ @@ -10496,771 +10496,771 @@ export namespace google { } } - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** Properties of a Struct. */ + interface IStruct { - /** Duration nanos */ - nanos?: (number|null); + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new Duration. + * Constructs a new Struct. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); + constructor(properties?: google.protobuf.IStruct); - /** Duration nanos. */ - public nanos: number; + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Struct instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Duration + * @returns Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @returns Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; /** - * Verifies a Duration message. + * Verifies a Struct message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Empty. */ - interface IEmpty { + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue); + + /** Value numberValue. */ + public numberValue: number; + + /** Value stringValue. */ + public stringValue: string; + + /** Value boolValue. */ + public boolValue: boolean; + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); /** - * Creates a new Empty instance using the specified properties. + * Creates a new Value instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns Value instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; /** - * Verifies an Empty message. + * Verifies a Value message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldMask. */ - interface IFieldMask { + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } - /** FieldMask paths */ - paths?: (string[]|null); + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents a ListValue. */ + class ListValue implements IListValue { /** - * Constructs a new FieldMask. + * Constructs a new ListValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); + constructor(properties?: google.protobuf.IListValue); - /** FieldMask paths. */ - public paths: string[]; + /** ListValue values. */ + public values: google.protobuf.IValue[]; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns ListValue instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; /** - * Verifies a FieldMask message. + * Verifies a ListValue message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns ListValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this ListValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Timestamp. */ - interface ITimestamp { + /** Properties of a Duration. */ + interface IDuration { - /** Timestamp seconds */ + /** Duration seconds */ seconds?: (number|Long|string|null); - /** Timestamp nanos */ + /** Duration nanos */ nanos?: (number|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Timestamp. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(properties?: google.protobuf.IDuration); - /** Timestamp seconds. */ + /** Duration seconds. */ public seconds: (number|Long|string); - /** Timestamp nanos. */ + /** Duration nanos. */ public nanos: number; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Timestamp + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a Timestamp message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Struct. */ - interface IStruct { + /** Properties of an Any. */ + interface IAny { - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents a Struct. */ - class Struct implements IStruct { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new Struct. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStruct); + constructor(properties?: google.protobuf.IAny); - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new Struct instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns Struct instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Struct + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Struct + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a Struct message. + * Verifies an Any message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Struct + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Struct to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); + /** Properties of a Timestamp. */ + interface ITimestamp { - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents a Value. */ - class Value implements IValue { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new Value. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue); - - /** Value numberValue. */ - public numberValue: number; - - /** Value stringValue. */ - public stringValue: string; - - /** Value boolValue. */ - public boolValue: boolean; - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); + constructor(properties?: google.protobuf.ITimestamp); - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new Value instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns Value instance + * @returns Timestamp instance */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Value + * @returns Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Value + * @returns Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a Value message. + * Verifies a Timestamp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Value + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Value to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a ListValue. */ - class ListValue implements IListValue { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new ListValue. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new ListValue instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns ListValue instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListValue + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListValue + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a ListValue message. + * Verifies an Empty message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListValue + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListValue to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); + /** Properties of a FieldMask. */ + interface IFieldMask { - /** Any value */ - value?: (Uint8Array|string|null); + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents an Any. */ - class Any implements IAny { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new Any. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; + constructor(properties?: google.protobuf.IFieldMask); - /** Any value. */ - public value: (Uint8Array|string); + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new Any instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns FieldMask instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Any + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Any + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies an Any message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Any + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 8ac5349d844..029a51ba05c 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -57,559 +57,941 @@ */ var v2 = {}; - v2.ConfigServiceV2 = (function() { + v2.LogEntry = (function() { /** - * Constructs a new ConfigServiceV2 service. + * Properties of a LogEntry. * @memberof google.logging.v2 - * @classdesc Represents a ConfigServiceV2 - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @interface ILogEntry + * @property {string|null} [logName] LogEntry logName + * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource + * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload + * @property {string|null} [textPayload] LogEntry textPayload + * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload + * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp + * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp + * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity + * @property {string|null} [insertId] LogEntry insertId + * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest + * @property {Object.|null} [labels] LogEntry labels + * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation + * @property {string|null} [trace] LogEntry trace + * @property {string|null} [spanId] LogEntry spanId + * @property {boolean|null} [traceSampled] LogEntry traceSampled + * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation */ - function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.ConfigServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new LogEntry. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntry. + * @implements ILogEntry + * @constructor + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set */ - ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function LogEntry(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListBucketsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListBucketsResponse} [response] ListBucketsResponse + * LogEntry logName. + * @member {string} logName + * @memberof google.logging.v2.LogEntry + * @instance */ + LogEntry.prototype.logName = ""; /** - * Calls ListBuckets. - * @function listBuckets - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListBucketsCallback} callback Node-style callback called with the error, if any, and ListBucketsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.listBuckets = function listBuckets(request, callback) { - return this.rpcCall(listBuckets, $root.google.logging.v2.ListBucketsRequest, $root.google.logging.v2.ListBucketsResponse, request, callback); - }, "name", { value: "ListBuckets" }); + LogEntry.prototype.resource = null; /** - * Calls ListBuckets. - * @function listBuckets - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry protoPayload. + * @member {google.protobuf.IAny|null|undefined} protoPayload + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + LogEntry.prototype.protoPayload = null; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetBucketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogBucket} [response] LogBucket + * LogEntry textPayload. + * @member {string} textPayload + * @memberof google.logging.v2.LogEntry + * @instance */ + LogEntry.prototype.textPayload = ""; /** - * Calls GetBucket. - * @function getBucket - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry jsonPayload. + * @member {google.protobuf.IStruct|null|undefined} jsonPayload + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetBucketCallback} callback Node-style callback called with the error, if any, and LogBucket - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.getBucket = function getBucket(request, callback) { - return this.rpcCall(getBucket, $root.google.logging.v2.GetBucketRequest, $root.google.logging.v2.LogBucket, request, callback); - }, "name", { value: "GetBucket" }); + LogEntry.prototype.jsonPayload = null; /** - * Calls GetBucket. - * @function getBucket - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + LogEntry.prototype.timestamp = null; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateBucketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogBucket} [response] LogBucket + * LogEntry receiveTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp + * @memberof google.logging.v2.LogEntry + * @instance */ + LogEntry.prototype.receiveTimestamp = null; /** - * Calls UpdateBucket. - * @function updateBucket - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry severity. + * @member {google.logging.type.LogSeverity} severity + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateBucketCallback} callback Node-style callback called with the error, if any, and LogBucket - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.updateBucket = function updateBucket(request, callback) { - return this.rpcCall(updateBucket, $root.google.logging.v2.UpdateBucketRequest, $root.google.logging.v2.LogBucket, request, callback); - }, "name", { value: "UpdateBucket" }); + LogEntry.prototype.severity = 0; /** - * Calls UpdateBucket. - * @function updateBucket - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry insertId. + * @member {string} insertId + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + LogEntry.prototype.insertId = ""; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListSinksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse + * LogEntry httpRequest. + * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest + * @memberof google.logging.v2.LogEntry + * @instance */ + LogEntry.prototype.httpRequest = null; /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry labels. + * @member {Object.} labels + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { - return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); - }, "name", { value: "ListSinks" }); + LogEntry.prototype.labels = $util.emptyObject; /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry operation. + * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + LogEntry.prototype.operation = null; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * LogEntry trace. + * @member {string} trace + * @memberof google.logging.v2.LogEntry + * @instance */ + LogEntry.prototype.trace = ""; /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry spanId. + * @member {string} spanId + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { - return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "GetSink" }); + LogEntry.prototype.spanId = ""; /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry traceSampled. + * @member {boolean} traceSampled + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + LogEntry.prototype.traceSampled = false; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink + * LogEntry sourceLocation. + * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation + * @memberof google.logging.v2.LogEntry + * @instance */ + LogEntry.prototype.sourceLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntry payload. + * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { - return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "CreateSink" }); - - /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink - */ - - /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { - return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "UpdateSink" }); - - /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Object.defineProperty(LogEntry.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a new LogEntry instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + * @returns {google.logging.v2.LogEntry} LogEntry instance */ + LogEntry.create = function create(properties) { + return new LogEntry(properties); + }; /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { - return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSink" }); + LogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) + $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textPayload != null && message.hasOwnProperty("textPayload")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); + if (message.insertId != null && message.hasOwnProperty("insertId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) + $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.severity != null && message.hasOwnProperty("severity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); + if (message.operation != null && message.hasOwnProperty("operation")) + $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.trace != null && message.hasOwnProperty("trace")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.spanId != null && message.hasOwnProperty("spanId")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); + return writer; + }; /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListExclusionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse + * Decodes a LogEntry message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + LogEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 12: + message.logName = reader.string(); + break; + case 8: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 2: + message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.textPayload = reader.string(); + break; + case 6: + message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 9: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 24: + message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.severity = reader.int32(); + break; + case 4: + message.insertId = reader.string(); + break; + case 7: + message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); + break; + case 11: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 15: + message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); + break; + case 22: + message.trace = reader.string(); + break; + case 27: + message.spanId = reader.string(); + break; + case 30: + message.traceSampled = reader.bool(); + break; + case 23: + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse - * @returns {undefined} - * @variation 1 + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { - return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); - }, "name", { value: "ListExclusions" }); + LogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a LogEntry message. + * @function verify + * @memberof google.logging.v2.LogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + LogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + properties.payload = 1; + { + var error = $root.google.protobuf.Any.verify(message.protoPayload); + if (error) + return "protoPayload." + error; + } + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + if (!$util.isString(message.textPayload)) + return "textPayload: string expected"; + } + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.protobuf.Struct.verify(message.jsonPayload); + if (error) + return "jsonPayload." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); + if (error) + return "receiveTimestamp." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 100: + case 200: + case 300: + case 400: + case 500: + case 600: + case 700: + case 800: + break; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + if (!$util.isString(message.insertId)) + return "insertId: string expected"; + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { + var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); + if (error) + return "httpRequest." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.operation != null && message.hasOwnProperty("operation")) { + var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); + if (error) + return "operation." + error; + } + if (message.trace != null && message.hasOwnProperty("trace")) + if (!$util.isString(message.trace)) + return "trace: string expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!$util.isString(message.spanId)) + return "spanId: string expected"; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + if (typeof message.traceSampled !== "boolean") + return "traceSampled: boolean expected"; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { + var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); + if (error) + return "sourceLocation." + error; + } + return null; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntry + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntry} LogEntry */ + LogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntry) + return object; + var message = new $root.google.logging.v2.LogEntry(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.protoPayload != null) { + if (typeof object.protoPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); + message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); + } + if (object.textPayload != null) + message.textPayload = String(object.textPayload); + if (object.jsonPayload != null) { + if (typeof object.jsonPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); + message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.receiveTimestamp != null) { + if (typeof object.receiveTimestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); + message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); + } + switch (object.severity) { + case "DEFAULT": + case 0: + message.severity = 0; + break; + case "DEBUG": + case 100: + message.severity = 100; + break; + case "INFO": + case 200: + message.severity = 200; + break; + case "NOTICE": + case 300: + message.severity = 300; + break; + case "WARNING": + case 400: + message.severity = 400; + break; + case "ERROR": + case 500: + message.severity = 500; + break; + case "CRITICAL": + case 600: + message.severity = 600; + break; + case "ALERT": + case 700: + message.severity = 700; + break; + case "EMERGENCY": + case 800: + message.severity = 800; + break; + } + if (object.insertId != null) + message.insertId = String(object.insertId); + if (object.httpRequest != null) { + if (typeof object.httpRequest !== "object") + throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); + message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.operation != null) { + if (typeof object.operation !== "object") + throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); + message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); + } + if (object.trace != null) + message.trace = String(object.trace); + if (object.spanId != null) + message.spanId = String(object.spanId); + if (object.traceSampled != null) + message.traceSampled = Boolean(object.traceSampled); + if (object.sourceLocation != null) { + if (typeof object.sourceLocation !== "object") + throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); + } + return message; + }; /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntry + * @static + * @param {google.logging.v2.LogEntry} message LogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { - return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "GetExclusion" }); + LogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.insertId = ""; + object.httpRequest = null; + object.resource = null; + object.timestamp = null; + object.severity = options.enums === String ? "DEFAULT" : 0; + object.logName = ""; + object.operation = null; + object.trace = ""; + object.sourceLocation = null; + object.receiveTimestamp = null; + object.spanId = ""; + object.traceSampled = false; + } + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); + if (options.oneofs) + object.payload = "protoPayload"; + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + object.textPayload = message.textPayload; + if (options.oneofs) + object.payload = "textPayload"; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + object.insertId = message.insertId; + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); + if (options.oneofs) + object.payload = "jsonPayload"; + } + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); + if (message.trace != null && message.hasOwnProperty("trace")) + object.trace = message.trace; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = message.spanId; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + object.traceSampled = message.traceSampled; + return object; + }; /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this LogEntry to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntry * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + LogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogEntry; + })(); + + v2.LogEntryOperation = (function() { /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * Properties of a LogEntryOperation. + * @memberof google.logging.v2 + * @interface ILogEntryOperation + * @property {string|null} [id] LogEntryOperation id + * @property {string|null} [producer] LogEntryOperation producer + * @property {boolean|null} [first] LogEntryOperation first + * @property {boolean|null} [last] LogEntryOperation last */ /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 + * Constructs a new LogEntryOperation. + * @memberof google.logging.v2 + * @classdesc Represents a LogEntryOperation. + * @implements ILogEntryOperation + * @constructor + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set */ - Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { - return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "CreateExclusion" }); + function LogEntryOperation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * LogEntryOperation id. + * @member {string} id + * @memberof google.logging.v2.LogEntryOperation + * @instance */ + LogEntryOperation.prototype.id = ""; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion + * LogEntryOperation producer. + * @member {string} producer + * @memberof google.logging.v2.LogEntryOperation + * @instance */ + LogEntryOperation.prototype.producer = ""; /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntryOperation first. + * @member {boolean} first + * @memberof google.logging.v2.LogEntryOperation * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { - return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "UpdateExclusion" }); + LogEntryOperation.prototype.first = false; /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 + * LogEntryOperation last. + * @member {boolean} last + * @memberof google.logging.v2.LogEntryOperation * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + LogEntryOperation.prototype.last = false; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a new LogEntryOperation instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance */ + LogEntryOperation.create = function create(properties) { + return new LogEntryOperation(properties); + }; /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { - return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteExclusion" }); + LogEntryOperation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.producer != null && message.hasOwnProperty("producer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); + if (message.first != null && message.hasOwnProperty("first")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); + if (message.last != null && message.hasOwnProperty("last")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); + return writer; + }; /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetCmekSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.CmekSettings} [response] CmekSettings + * Decodes a LogEntryOperation message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + LogEntryOperation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.producer = reader.string(); + break; + case 3: + message.first = reader.bool(); + break; + case 4: + message.last = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetCmekSettings. - * @function getCmekSettings - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings - * @returns {undefined} - * @variation 1 + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ConfigServiceV2.prototype.getCmekSettings = function getCmekSettings(request, callback) { - return this.rpcCall(getCmekSettings, $root.google.logging.v2.GetCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); - }, "name", { value: "GetCmekSettings" }); + LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetCmekSettings. - * @function getCmekSettings - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a LogEntryOperation message. + * @function verify + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + LogEntryOperation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.producer != null && message.hasOwnProperty("producer")) + if (!$util.isString(message.producer)) + return "producer: string expected"; + if (message.first != null && message.hasOwnProperty("first")) + if (typeof message.first !== "boolean") + return "first: boolean expected"; + if (message.last != null && message.hasOwnProperty("last")) + if (typeof message.last !== "boolean") + return "last: boolean expected"; + return null; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateCmekSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.CmekSettings} [response] CmekSettings + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation */ + LogEntryOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntryOperation) + return object; + var message = new $root.google.logging.v2.LogEntryOperation(); + if (object.id != null) + message.id = String(object.id); + if (object.producer != null) + message.producer = String(object.producer); + if (object.first != null) + message.first = Boolean(object.first); + if (object.last != null) + message.last = Boolean(object.last); + return message; + }; /** - * Calls UpdateCmekSettings. - * @function updateCmekSettings - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings - * @returns {undefined} - * @variation 1 + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ConfigServiceV2.prototype.updateCmekSettings = function updateCmekSettings(request, callback) { - return this.rpcCall(updateCmekSettings, $root.google.logging.v2.UpdateCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); - }, "name", { value: "UpdateCmekSettings" }); + LogEntryOperation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.producer = ""; + object.first = false; + object.last = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.producer != null && message.hasOwnProperty("producer")) + object.producer = message.producer; + if (message.first != null && message.hasOwnProperty("first")) + object.first = message.first; + if (message.last != null && message.hasOwnProperty("last")) + object.last = message.last; + return object; + }; /** - * Calls UpdateCmekSettings. - * @function updateCmekSettings - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this LogEntryOperation to JSON. + * @function toJSON + * @memberof google.logging.v2.LogEntryOperation * @instance - * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + LogEntryOperation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ConfigServiceV2; + return LogEntryOperation; })(); - v2.LogBucket = (function() { + v2.LogEntrySourceLocation = (function() { /** - * Properties of a LogBucket. + * Properties of a LogEntrySourceLocation. * @memberof google.logging.v2 - * @interface ILogBucket - * @property {string|null} [name] LogBucket name - * @property {string|null} [description] LogBucket description - * @property {google.protobuf.ITimestamp|null} [createTime] LogBucket createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogBucket updateTime - * @property {number|null} [retentionDays] LogBucket retentionDays - * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState + * @interface ILogEntrySourceLocation + * @property {string|null} [file] LogEntrySourceLocation file + * @property {number|Long|null} [line] LogEntrySourceLocation line + * @property {string|null} ["function"] LogEntrySourceLocation function */ /** - * Constructs a new LogBucket. + * Constructs a new LogEntrySourceLocation. * @memberof google.logging.v2 - * @classdesc Represents a LogBucket. - * @implements ILogBucket + * @classdesc Represents a LogEntrySourceLocation. + * @implements ILogEntrySourceLocation * @constructor - * @param {google.logging.v2.ILogBucket=} [properties] Properties to set + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set */ - function LogBucket(properties) { + function LogEntrySourceLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -617,140 +999,101 @@ } /** - * LogBucket name. - * @member {string} name - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.name = ""; - - /** - * LogBucket description. - * @member {string} description - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.description = ""; - - /** - * LogBucket createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.createTime = null; - - /** - * LogBucket updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogBucket + * LogEntrySourceLocation file. + * @member {string} file + * @memberof google.logging.v2.LogEntrySourceLocation * @instance */ - LogBucket.prototype.updateTime = null; + LogEntrySourceLocation.prototype.file = ""; /** - * LogBucket retentionDays. - * @member {number} retentionDays - * @memberof google.logging.v2.LogBucket + * LogEntrySourceLocation line. + * @member {number|Long} line + * @memberof google.logging.v2.LogEntrySourceLocation * @instance */ - LogBucket.prototype.retentionDays = 0; + LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * LogBucket lifecycleState. - * @member {google.logging.v2.LifecycleState} lifecycleState - * @memberof google.logging.v2.LogBucket + * LogEntrySourceLocation function. + * @member {string} function + * @memberof google.logging.v2.LogEntrySourceLocation * @instance */ - LogBucket.prototype.lifecycleState = 0; + LogEntrySourceLocation.prototype["function"] = ""; /** - * Creates a new LogBucket instance using the specified properties. + * Creates a new LogEntrySourceLocation instance using the specified properties. * @function create - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.ILogBucket=} [properties] Properties to set - * @returns {google.logging.v2.LogBucket} LogBucket instance + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance */ - LogBucket.create = function create(properties) { - return new LogBucket(properties); + LogEntrySourceLocation.create = function create(properties) { + return new LogEntrySourceLocation(properties); }; /** - * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogBucket.encode = function encode(message, writer) { + LogEntrySourceLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); - if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.lifecycleState); + if (message.file != null && message.hasOwnProperty("file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.line != null && message.hasOwnProperty("line")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); + if (message["function"] != null && message.hasOwnProperty("function")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); return writer; }; /** - * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogBucket.encodeDelimited = function encodeDelimited(message, writer) { + LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogBucket message from the specified reader or buffer. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogBucket} LogBucket + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogBucket.decode = function decode(reader, length) { + LogEntrySourceLocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogBucket(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.file = reader.string(); break; - case 11: - message.retentionDays = reader.int32(); + case 2: + message.line = reader.int64(); break; - case 12: - message.lifecycleState = reader.int32(); + case 3: + message["function"] = reader.string(); break; default: reader.skipType(tag & 7); @@ -761,406 +1104,414 @@ }; /** - * Decodes a LogBucket message from the specified reader or buffer, length delimited. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogBucket} LogBucket + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogBucket.decodeDelimited = function decodeDelimited(reader) { + LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogBucket message. + * Verifies a LogEntrySourceLocation message. * @function verify - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogBucket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - if (!$util.isInteger(message.retentionDays)) - return "retentionDays: integer expected"; - if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) - switch (message.lifecycleState) { - default: - return "lifecycleState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogBucket - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogBucket} LogBucket - */ - LogBucket.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogBucket) - return object; - var message = new $root.google.logging.v2.LogBucket(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogBucket.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogBucket.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.retentionDays != null) - message.retentionDays = object.retentionDays | 0; - switch (object.lifecycleState) { - case "LIFECYCLE_STATE_UNSPECIFIED": - case 0: - message.lifecycleState = 0; - break; - case "ACTIVE": - case 1: - message.lifecycleState = 1; - break; - case "DELETE_REQUESTED": - case 2: - message.lifecycleState = 2; - break; - } + LogEntrySourceLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) + if (!$util.isString(message.file)) + return "file: string expected"; + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) + return "line: integer|Long expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + if (!$util.isString(message["function"])) + return "function: string expected"; + return null; + }; + + /** + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + */ + LogEntrySourceLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) + return object; + var message = new $root.google.logging.v2.LogEntrySourceLocation(); + if (object.file != null) + message.file = String(object.file); + if (object.line != null) + if ($util.Long) + (message.line = $util.Long.fromValue(object.line)).unsigned = false; + else if (typeof object.line === "string") + message.line = parseInt(object.line, 10); + else if (typeof object.line === "number") + message.line = object.line; + else if (typeof object.line === "object") + message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); + if (object["function"] != null) + message["function"] = String(object["function"]); return message; }; /** - * Creates a plain object from a LogBucket message. Also converts values to other types if specified. + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.LogBucket} message LogBucket + * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogBucket.toObject = function toObject(message, options) { + LogEntrySourceLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.retentionDays = 0; - object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; + object.file = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.line = options.longs === String ? "0" : 0; + object["function"] = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - object.retentionDays = message.retentionDays; - if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) - object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; + if (message.file != null && message.hasOwnProperty("file")) + object.file = message.file; + if (message.line != null && message.hasOwnProperty("line")) + if (typeof message.line === "number") + object.line = options.longs === String ? String(message.line) : message.line; + else + object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = message["function"]; return object; }; /** - * Converts this LogBucket to JSON. + * Converts this LogEntrySourceLocation to JSON. * @function toJSON - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.LogEntrySourceLocation * @instance * @returns {Object.} JSON object */ - LogBucket.prototype.toJSON = function toJSON() { + LogEntrySourceLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogBucket; + return LogEntrySourceLocation; })(); - v2.LogSink = (function() { + v2.LoggingServiceV2 = (function() { /** - * Properties of a LogSink. + * Constructs a new LoggingServiceV2 service. * @memberof google.logging.v2 - * @interface ILogSink - * @property {string|null} [name] LogSink name - * @property {string|null} [destination] LogSink destination - * @property {string|null} [filter] LogSink filter - * @property {string|null} [description] LogSink description - * @property {boolean|null} [disabled] LogSink disabled - * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat - * @property {string|null} [writerIdentity] LogSink writerIdentity - * @property {boolean|null} [includeChildren] LogSink includeChildren - * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + * @classdesc Represents a LoggingServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; /** - * Constructs a new LogSink. - * @memberof google.logging.v2 - * @classdesc Represents a LogSink. - * @implements ILogSink - * @constructor - * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.LoggingServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. */ - function LogSink(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * LogSink name. - * @member {string} name - * @memberof google.logging.v2.LogSink + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef DeleteLogCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - LogSink.prototype.name = ""; + Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { + return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLog" }); /** - * LogSink destination. - * @member {string} destination - * @memberof google.logging.v2.LogSink + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogSink.prototype.destination = ""; /** - * LogSink filter. - * @member {string} filter - * @memberof google.logging.v2.LogSink + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef WriteLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + */ + + /** + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + * @returns {undefined} + * @variation 1 */ - LogSink.prototype.filter = ""; + Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { + return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); + }, "name", { value: "WriteLogEntries" }); /** - * LogSink description. - * @member {string} description - * @memberof google.logging.v2.LogSink + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogSink.prototype.description = ""; /** - * LogSink disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogSink + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + */ + + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { + return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); + }, "name", { value: "ListLogEntries" }); + + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListMonitoredResourceDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + */ + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @returns {undefined} + * @variation 1 */ - LogSink.prototype.disabled = false; + Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); /** - * LogSink outputVersionFormat. - * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat - * @memberof google.logging.v2.LogSink + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogSink.prototype.outputVersionFormat = 0; /** - * LogSink writerIdentity. - * @member {string} writerIdentity - * @memberof google.logging.v2.LogSink - * @instance + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse */ - LogSink.prototype.writerIdentity = ""; /** - * LogSink includeChildren. - * @member {boolean} includeChildren - * @memberof google.logging.v2.LogSink + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse + * @returns {undefined} + * @variation 1 */ - LogSink.prototype.includeChildren = false; + Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { + return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); + }, "name", { value: "ListLogs" }); /** - * LogSink bigqueryOptions. - * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions - * @memberof google.logging.v2.LogSink + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogSink.prototype.bigqueryOptions = null; + + return LoggingServiceV2; + })(); + + v2.DeleteLogRequest = (function() { /** - * LogSink createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogSink - * @instance + * Properties of a DeleteLogRequest. + * @memberof google.logging.v2 + * @interface IDeleteLogRequest + * @property {string|null} [logName] DeleteLogRequest logName */ - LogSink.prototype.createTime = null; /** - * LogSink updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogSink - * @instance + * Constructs a new DeleteLogRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteLogRequest. + * @implements IDeleteLogRequest + * @constructor + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set */ - LogSink.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + function DeleteLogRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * LogSink options. - * @member {"bigqueryOptions"|undefined} options - * @memberof google.logging.v2.LogSink + * DeleteLogRequest logName. + * @member {string} logName + * @memberof google.logging.v2.DeleteLogRequest * @instance */ - Object.defineProperty(LogSink.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteLogRequest.prototype.logName = ""; /** - * Creates a new LogSink instance using the specified properties. + * Creates a new DeleteLogRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.ILogSink=} [properties] Properties to set - * @returns {google.logging.v2.LogSink} LogSink instance + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance */ - LogSink.create = function create(properties) { - return new LogSink(properties); + DeleteLogRequest.create = function create(properties) { + return new DeleteLogRequest(properties); }; /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogSink.encode = function encode(message, writer) { + DeleteLogRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.destination != null && message.hasOwnProperty("destination")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) - $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); - if (message.disabled != null && message.hasOwnProperty("disabled")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.disabled); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); return writer; }; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogSink.encodeDelimited = function encodeDelimited(message, writer) { + DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes a DeleteLogRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decode = function decode(reader, length) { + DeleteLogRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 3: - message.destination = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 18: - message.description = reader.string(); - break; - case 19: - message.disabled = reader.bool(); - break; - case 6: - message.outputVersionFormat = reader.int32(); - break; - case 8: - message.writerIdentity = reader.string(); - break; - case 9: - message.includeChildren = reader.bool(); - break; - case 12: - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); - break; - case 13: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.logName = reader.string(); break; default: reader.skipType(tag & 7); @@ -1171,244 +1522,114 @@ }; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decodeDelimited = function decodeDelimited(reader) { + DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogSink message. + * Verifies a DeleteLogRequest message. * @function verify - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogSink.verify = function verify(message) { + DeleteLogRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) - if (!$util.isString(message.destination)) - return "destination: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - switch (message.outputVersionFormat) { - default: - return "outputVersionFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - if (!$util.isString(message.writerIdentity)) - return "writerIdentity: string expected"; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - if (typeof message.includeChildren !== "boolean") - return "includeChildren: boolean expected"; - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - properties.options = 1; - { - var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); - if (error) - return "bigqueryOptions." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; return null; }; /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogSink} LogSink + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest */ - LogSink.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogSink) + DeleteLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogRequest) return object; - var message = new $root.google.logging.v2.LogSink(); - if (object.name != null) - message.name = String(object.name); - if (object.destination != null) - message.destination = String(object.destination); - if (object.filter != null) - message.filter = String(object.filter); - if (object.description != null) - message.description = String(object.description); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - switch (object.outputVersionFormat) { - case "VERSION_FORMAT_UNSPECIFIED": - case 0: - message.outputVersionFormat = 0; - break; - case "V2": - case 1: - message.outputVersionFormat = 1; - break; - case "V1": - case 2: - message.outputVersionFormat = 2; - break; - } - if (object.writerIdentity != null) - message.writerIdentity = String(object.writerIdentity); - if (object.includeChildren != null) - message.includeChildren = Boolean(object.includeChildren); - if (object.bigqueryOptions != null) { - if (typeof object.bigqueryOptions !== "object") - throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + var message = new $root.google.logging.v2.DeleteLogRequest(); + if (object.logName != null) + message.logName = String(object.logName); return message; }; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.LogSink} message LogSink + * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogSink.toObject = function toObject(message, options) { + DeleteLogRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.destination = ""; - object.filter = ""; - object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; - object.writerIdentity = ""; - object.includeChildren = false; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.disabled = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = message.destination; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - object.writerIdentity = message.writerIdentity; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - object.includeChildren = message.includeChildren; - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); - if (options.oneofs) - object.options = "bigqueryOptions"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; + if (options.defaults) + object.logName = ""; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; return object; }; /** - * Converts this LogSink to JSON. + * Converts this DeleteLogRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.DeleteLogRequest * @instance * @returns {Object.} JSON object */ - LogSink.prototype.toJSON = function toJSON() { + DeleteLogRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * VersionFormat enum. - * @name google.logging.v2.LogSink.VersionFormat - * @enum {string} - * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value - * @property {number} V2=1 V2 value - * @property {number} V1=2 V1 value - */ - LogSink.VersionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "V2"] = 1; - values[valuesById[2] = "V1"] = 2; - return values; - })(); - - return LogSink; + return DeleteLogRequest; })(); - v2.BigQueryOptions = (function() { + v2.WriteLogEntriesRequest = (function() { /** - * Properties of a BigQueryOptions. + * Properties of a WriteLogEntriesRequest. * @memberof google.logging.v2 - * @interface IBigQueryOptions - * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables - * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning + * @interface IWriteLogEntriesRequest + * @property {string|null} [logName] WriteLogEntriesRequest logName + * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource + * @property {Object.|null} [labels] WriteLogEntriesRequest labels + * @property {Array.|null} [entries] WriteLogEntriesRequest entries + * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess + * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun */ /** - * Constructs a new BigQueryOptions. + * Constructs a new WriteLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents a BigQueryOptions. - * @implements IBigQueryOptions + * @classdesc Represents a WriteLogEntriesRequest. + * @implements IWriteLogEntriesRequest * @constructor - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set */ - function BigQueryOptions(properties) { + function WriteLogEntriesRequest(properties) { + this.labels = {}; + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1416,88 +1637,149 @@ } /** - * BigQueryOptions usePartitionedTables. - * @member {boolean} usePartitionedTables - * @memberof google.logging.v2.BigQueryOptions + * WriteLogEntriesRequest logName. + * @member {string} logName + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - BigQueryOptions.prototype.usePartitionedTables = false; + WriteLogEntriesRequest.prototype.logName = ""; /** - * BigQueryOptions usesTimestampColumnPartitioning. - * @member {boolean} usesTimestampColumnPartitioning - * @memberof google.logging.v2.BigQueryOptions + * WriteLogEntriesRequest resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance */ - BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; + WriteLogEntriesRequest.prototype.resource = null; /** - * Creates a new BigQueryOptions instance using the specified properties. + * WriteLogEntriesRequest labels. + * @member {Object.} labels + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.labels = $util.emptyObject; + + /** + * WriteLogEntriesRequest entries. + * @member {Array.} entries + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.entries = $util.emptyArray; + + /** + * WriteLogEntriesRequest partialSuccess. + * @member {boolean} partialSuccess + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.partialSuccess = false; + + /** + * WriteLogEntriesRequest dryRun. + * @member {boolean} dryRun + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance + */ + WriteLogEntriesRequest.prototype.dryRun = false; + + /** + * Creates a new WriteLogEntriesRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance */ - BigQueryOptions.create = function create(properties) { - return new BigQueryOptions(properties); + WriteLogEntriesRequest.create = function create(properties) { + return new WriteLogEntriesRequest(properties); }; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encode = function encode(message, writer) { + WriteLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); + if (message.logName != null && message.hasOwnProperty("logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); return writer; }; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decode = function decode(reader, length) { + WriteLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.usePartitionedTables = reader.bool(); + message.logName = reader.string(); + break; + case 2: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); break; case 3: - message.usesTimestampColumnPartitioning = reader.bool(); + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 5: + message.partialSuccess = reader.bool(); + break; + case 6: + message.dryRun = reader.bool(); break; default: reader.skipType(tag & 7); @@ -1508,134 +1790,185 @@ }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryOptions message. + * Verifies a WriteLogEntriesRequest message. * @function verify - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryOptions.verify = function verify(message) { + WriteLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - if (typeof message.usePartitionedTables !== "boolean") - return "usePartitionedTables: boolean expected"; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - if (typeof message.usesTimestampColumnPartitioning !== "boolean") - return "usesTimestampColumnPartitioning: boolean expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + if (typeof message.partialSuccess !== "boolean") + return "partialSuccess: boolean expected"; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; return null; }; /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest */ - BigQueryOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.BigQueryOptions) + WriteLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) return object; - var message = new $root.google.logging.v2.BigQueryOptions(); - if (object.usePartitionedTables != null) - message.usePartitionedTables = Boolean(object.usePartitionedTables); - if (object.usesTimestampColumnPartitioning != null) - message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); + var message = new $root.google.logging.v2.WriteLogEntriesRequest(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.partialSuccess != null) + message.partialSuccess = Boolean(object.partialSuccess); + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); return message; }; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @static - * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryOptions.toObject = function toObject(message, options) { + WriteLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.usePartitionedTables = false; - object.usesTimestampColumnPartitioning = false; + object.logName = ""; + object.resource = null; + object.partialSuccess = false; + object.dryRun = false; } - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - object.usePartitionedTables = message.usePartitionedTables; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = message.partialSuccess; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; return object; }; /** - * Converts this BigQueryOptions to JSON. + * Converts this WriteLogEntriesRequest to JSON. * @function toJSON - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance * @returns {Object.} JSON object */ - BigQueryOptions.prototype.toJSON = function toJSON() { + WriteLogEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryOptions; - })(); - - /** - * LifecycleState enum. - * @name google.logging.v2.LifecycleState - * @enum {string} - * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value - */ - v2.LifecycleState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "DELETE_REQUESTED"] = 2; - return values; + return WriteLogEntriesRequest; })(); - v2.ListBucketsRequest = (function() { + v2.WriteLogEntriesResponse = (function() { /** - * Properties of a ListBucketsRequest. + * Properties of a WriteLogEntriesResponse. * @memberof google.logging.v2 - * @interface IListBucketsRequest - * @property {string|null} [parent] ListBucketsRequest parent - * @property {string|null} [pageToken] ListBucketsRequest pageToken - * @property {number|null} [pageSize] ListBucketsRequest pageSize + * @interface IWriteLogEntriesResponse */ /** - * Constructs a new ListBucketsRequest. + * Constructs a new WriteLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a ListBucketsRequest. - * @implements IListBucketsRequest + * @classdesc Represents a WriteLogEntriesResponse. + * @implements IWriteLogEntriesResponse * @constructor - * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set */ - function ListBucketsRequest(properties) { + function WriteLogEntriesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1643,102 +1976,63 @@ } /** - * ListBucketsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListBucketsRequest - * @instance - */ - ListBucketsRequest.prototype.parent = ""; - - /** - * ListBucketsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListBucketsRequest - * @instance - */ - ListBucketsRequest.prototype.pageToken = ""; - - /** - * ListBucketsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListBucketsRequest - * @instance - */ - ListBucketsRequest.prototype.pageSize = 0; - - /** - * Creates a new ListBucketsRequest instance using the specified properties. + * Creates a new WriteLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance */ - ListBucketsRequest.create = function create(properties) { - return new ListBucketsRequest(properties); + WriteLogEntriesResponse.create = function create(properties) { + return new WriteLogEntriesResponse(properties); }; /** - * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsRequest.encode = function encode(message, writer) { + WriteLogEntriesResponse.encode = function encode(message, writer) { if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + writer = $Writer.create(); return writer; }; /** - * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsRequest.decode = function decode(reader, length) { + WriteLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -1748,126 +2042,95 @@ }; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBucketsRequest message. + * Verifies a WriteLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBucketsRequest.verify = function verify(message) { + WriteLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; return null; }; /** - * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse */ - ListBucketsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListBucketsRequest) + WriteLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) return object; - var message = new $root.google.logging.v2.ListBucketsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; + return new $root.google.logging.v2.WriteLogEntriesResponse(); }; /** - * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @static - * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest + * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBucketsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - return object; + WriteLogEntriesResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ListBucketsRequest to JSON. + * Converts this WriteLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.WriteLogEntriesResponse * @instance * @returns {Object.} JSON object */ - ListBucketsRequest.prototype.toJSON = function toJSON() { + WriteLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBucketsRequest; + return WriteLogEntriesResponse; })(); - v2.ListBucketsResponse = (function() { + v2.WriteLogEntriesPartialErrors = (function() { /** - * Properties of a ListBucketsResponse. + * Properties of a WriteLogEntriesPartialErrors. * @memberof google.logging.v2 - * @interface IListBucketsResponse - * @property {Array.|null} [buckets] ListBucketsResponse buckets - * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken + * @interface IWriteLogEntriesPartialErrors + * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors */ /** - * Constructs a new ListBucketsResponse. + * Constructs a new WriteLogEntriesPartialErrors. * @memberof google.logging.v2 - * @classdesc Represents a ListBucketsResponse. - * @implements IListBucketsResponse + * @classdesc Represents a WriteLogEntriesPartialErrors. + * @implements IWriteLogEntriesPartialErrors * @constructor - * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set */ - function ListBucketsResponse(properties) { - this.buckets = []; + function WriteLogEntriesPartialErrors(properties) { + this.logEntryErrors = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1875,91 +2138,83 @@ } /** - * ListBucketsResponse buckets. - * @member {Array.} buckets - * @memberof google.logging.v2.ListBucketsResponse - * @instance - */ - ListBucketsResponse.prototype.buckets = $util.emptyArray; - - /** - * ListBucketsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListBucketsResponse + * WriteLogEntriesPartialErrors logEntryErrors. + * @member {Object.} logEntryErrors + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @instance */ - ListBucketsResponse.prototype.nextPageToken = ""; + WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; /** - * Creates a new ListBucketsResponse instance using the specified properties. + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. * @function create - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance */ - ListBucketsResponse.create = function create(properties) { - return new ListBucketsResponse(properties); + WriteLogEntriesPartialErrors.create = function create(properties) { + return new WriteLogEntriesPartialErrors(properties); }; /** - * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsResponse.encode = function encode(message, writer) { + WriteLogEntriesPartialErrors.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.buckets != null && message.buckets.length) - for (var i = 0; i < message.buckets.length; ++i) - $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) + for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBucketsResponse message from the specified reader or buffer. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsResponse.decode = function decode(reader, length) { + WriteLogEntriesPartialErrors.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.buckets && message.buckets.length)) - message.buckets = []; - message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + reader.skip().pos++; + if (message.logEntryErrors === $util.emptyObject) + message.logEntryErrors = {}; + key = reader.int32(); + reader.pos++; + message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1970,135 +2225,135 @@ }; /** - * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBucketsResponse message. + * Verifies a WriteLogEntriesPartialErrors message. * @function verify - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBucketsResponse.verify = function verify(message) { + WriteLogEntriesPartialErrors.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.buckets != null && message.hasOwnProperty("buckets")) { - if (!Array.isArray(message.buckets)) - return "buckets: array expected"; - for (var i = 0; i < message.buckets.length; ++i) { - var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); - if (error) - return "buckets." + error; + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { + if (!$util.isObject(message.logEntryErrors)) + return "logEntryErrors: object expected"; + var key = Object.keys(message.logEntryErrors); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "logEntryErrors: integer key{k:int32} expected"; + { + var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); + if (error) + return "logEntryErrors." + error; + } } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors */ - ListBucketsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListBucketsResponse) + WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) return object; - var message = new $root.google.logging.v2.ListBucketsResponse(); - if (object.buckets) { - if (!Array.isArray(object.buckets)) - throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); - message.buckets = []; - for (var i = 0; i < object.buckets.length; ++i) { - if (typeof object.buckets[i] !== "object") - throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); - message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); + var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); + if (object.logEntryErrors) { + if (typeof object.logEntryErrors !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors = {}; + for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { + if (typeof object.logEntryErrors[keys[i]] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse + * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBucketsResponse.toObject = function toObject(message, options) { + WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.buckets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.buckets && message.buckets.length) { - object.buckets = []; - for (var j = 0; j < message.buckets.length; ++j) - object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); + if (options.objects || options.defaults) + object.logEntryErrors = {}; + var keys2; + if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { + object.logEntryErrors = {}; + for (var j = 0; j < keys2.length; ++j) + object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListBucketsResponse to JSON. + * Converts this WriteLogEntriesPartialErrors to JSON. * @function toJSON - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @instance * @returns {Object.} JSON object */ - ListBucketsResponse.prototype.toJSON = function toJSON() { + WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBucketsResponse; + return WriteLogEntriesPartialErrors; })(); - v2.UpdateBucketRequest = (function() { + v2.ListLogEntriesRequest = (function() { /** - * Properties of an UpdateBucketRequest. + * Properties of a ListLogEntriesRequest. * @memberof google.logging.v2 - * @interface IUpdateBucketRequest - * @property {string|null} [name] UpdateBucketRequest name - * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask + * @interface IListLogEntriesRequest + * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames + * @property {string|null} [filter] ListLogEntriesRequest filter + * @property {string|null} [orderBy] ListLogEntriesRequest orderBy + * @property {number|null} [pageSize] ListLogEntriesRequest pageSize + * @property {string|null} [pageToken] ListLogEntriesRequest pageToken */ /** - * Constructs a new UpdateBucketRequest. + * Constructs a new ListLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents an UpdateBucketRequest. - * @implements IUpdateBucketRequest + * @classdesc Represents a ListLogEntriesRequest. + * @implements IListLogEntriesRequest * @constructor - * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set */ - function UpdateBucketRequest(properties) { + function ListLogEntriesRequest(properties) { + this.resourceNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2106,101 +2361,130 @@ } /** - * UpdateBucketRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateBucketRequest + * ListLogEntriesRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - UpdateBucketRequest.prototype.name = ""; + ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; /** - * UpdateBucketRequest bucket. - * @member {google.logging.v2.ILogBucket|null|undefined} bucket - * @memberof google.logging.v2.UpdateBucketRequest + * ListLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - UpdateBucketRequest.prototype.bucket = null; + ListLogEntriesRequest.prototype.filter = ""; /** - * UpdateBucketRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateBucketRequest + * ListLogEntriesRequest orderBy. + * @member {string} orderBy + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - UpdateBucketRequest.prototype.updateMask = null; + ListLogEntriesRequest.prototype.orderBy = ""; /** - * Creates a new UpdateBucketRequest instance using the specified properties. + * ListLogEntriesRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageSize = 0; + + /** + * ListLogEntriesRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance */ - UpdateBucketRequest.create = function create(properties) { - return new UpdateBucketRequest(properties); + ListLogEntriesRequest.create = function create(properties) { + return new ListLogEntriesRequest(properties); }; /** - * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBucketRequest.encode = function encode(message, writer) { + ListLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.bucket != null && message.hasOwnProperty("bucket")) - $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); return writer; }; /** - * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBucketRequest.decode = function decode(reader, length) { + ListLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); + case 8: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); break; case 2: - message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + message.filter = reader.string(); + break; + case 3: + message.orderBy = reader.string(); break; case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); + break; + case 5: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -2211,134 +2495,155 @@ }; /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateBucketRequest message. + * Verifies a ListLogEntriesRequest message. * @function verify - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateBucketRequest.verify = function verify(message) { + ListLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) { - var error = $root.google.logging.v2.LogBucket.verify(message.bucket); - if (error) - return "bucket." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest */ - UpdateBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateBucketRequest) + ListLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) return object; - var message = new $root.google.logging.v2.UpdateBucketRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.bucket != null) { - if (typeof object.bucket !== "object") - throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); - message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.logging.v2.ListLogEntriesRequest(); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); } + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest + * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateBucketRequest.toObject = function toObject(message, options) { + ListLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.resourceNames = []; if (options.defaults) { - object.name = ""; - object.bucket = null; - object.updateMask = null; + object.filter = ""; + object.orderBy = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateBucketRequest to JSON. + * Converts this ListLogEntriesRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @instance * @returns {Object.} JSON object */ - UpdateBucketRequest.prototype.toJSON = function toJSON() { + ListLogEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateBucketRequest; + return ListLogEntriesRequest; })(); - v2.GetBucketRequest = (function() { + v2.ListLogEntriesResponse = (function() { /** - * Properties of a GetBucketRequest. + * Properties of a ListLogEntriesResponse. * @memberof google.logging.v2 - * @interface IGetBucketRequest - * @property {string|null} [name] GetBucketRequest name + * @interface IListLogEntriesResponse + * @property {Array.|null} [entries] ListLogEntriesResponse entries + * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken */ /** - * Constructs a new GetBucketRequest. + * Constructs a new ListLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a GetBucketRequest. - * @implements IGetBucketRequest + * @classdesc Represents a ListLogEntriesResponse. + * @implements IListLogEntriesResponse * @constructor - * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set */ - function GetBucketRequest(properties) { + function ListLogEntriesResponse(properties) { + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2346,75 +2651,91 @@ } /** - * GetBucketRequest name. - * @member {string} name - * @memberof google.logging.v2.GetBucketRequest + * ListLogEntriesResponse entries. + * @member {Array.} entries + * @memberof google.logging.v2.ListLogEntriesResponse * @instance */ - GetBucketRequest.prototype.name = ""; + ListLogEntriesResponse.prototype.entries = $util.emptyArray; /** - * Creates a new GetBucketRequest instance using the specified properties. + * ListLogEntriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogEntriesResponse + * @instance + */ + ListLogEntriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance */ - GetBucketRequest.create = function create(properties) { - return new GetBucketRequest(properties); + ListLogEntriesResponse.create = function create(properties) { + return new ListLogEntriesResponse(properties); }; /** - * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBucketRequest.encode = function encode(message, writer) { + ListLogEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBucketRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBucketRequest.decode = function decode(reader, length) { + ListLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -2425,109 +2746,134 @@ }; /** - * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBucketRequest message. + * Verifies a ListLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBucketRequest.verify = function verify(message) { + ListLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse */ - GetBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetBucketRequest) + ListLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) return object; - var message = new $root.google.logging.v2.GetBucketRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.logging.v2.ListLogEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest + * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBucketRequest.toObject = function toObject(message, options) { + ListLogEntriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entries = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetBucketRequest to JSON. + * Converts this ListLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.ListLogEntriesResponse * @instance * @returns {Object.} JSON object */ - GetBucketRequest.prototype.toJSON = function toJSON() { + ListLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetBucketRequest; + return ListLogEntriesResponse; })(); - v2.ListSinksRequest = (function() { + v2.ListMonitoredResourceDescriptorsRequest = (function() { /** - * Properties of a ListSinksRequest. + * Properties of a ListMonitoredResourceDescriptorsRequest. * @memberof google.logging.v2 - * @interface IListSinksRequest - * @property {string|null} [parent] ListSinksRequest parent - * @property {string|null} [pageToken] ListSinksRequest pageToken - * @property {number|null} [pageSize] ListSinksRequest pageSize + * @interface IListMonitoredResourceDescriptorsRequest + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken */ /** - * Constructs a new ListSinksRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksRequest. - * @implements IListSinksRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest * @constructor - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set */ - function ListSinksRequest(properties) { + function ListMonitoredResourceDescriptorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2535,102 +2881,89 @@ } /** - * ListSinksRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListSinksRequest - * @instance - */ - ListSinksRequest.prototype.parent = ""; - - /** - * ListSinksRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListSinksRequest + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance */ - ListSinksRequest.prototype.pageToken = ""; + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; /** - * ListSinksRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListSinksRequest + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance */ - ListSinksRequest.prototype.pageSize = 0; + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance */ - ListSinksRequest.create = function create(properties) { - return new ListSinksRequest(properties); + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); }; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.pageSize = reader.int32(); break; case 2: message.pageToken = reader.string(); break; - case 3: - message.pageSize = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -2640,126 +2973,118 @@ }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @function verify - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksRequest.verify = function verify(message) { + ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest */ - ListSinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksRequest) + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) return object; - var message = new $root.google.logging.v2.ListSinksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); if (object.pageSize != null) message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; object.pageSize = 0; + object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this ListSinksRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance * @returns {Object.} JSON object */ - ListSinksRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksRequest; + return ListMonitoredResourceDescriptorsRequest; })(); - v2.ListSinksResponse = (function() { + v2.ListMonitoredResourceDescriptorsResponse = (function() { /** - * Properties of a ListSinksResponse. + * Properties of a ListMonitoredResourceDescriptorsResponse. * @memberof google.logging.v2 - * @interface IListSinksResponse - * @property {Array.|null} [sinks] ListSinksResponse sinks - * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken */ /** - * Constructs a new ListSinksResponse. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksResponse. - * @implements IListSinksResponse + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse * @constructor - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set */ - function ListSinksResponse(properties) { - this.sinks = []; + function ListMonitoredResourceDescriptorsResponse(properties) { + this.resourceDescriptors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2767,88 +3092,88 @@ } /** - * ListSinksResponse sinks. - * @member {Array.} sinks - * @memberof google.logging.v2.ListSinksResponse + * ListMonitoredResourceDescriptorsResponse resourceDescriptors. + * @member {Array.} resourceDescriptors + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance */ - ListSinksResponse.prototype.sinks = $util.emptyArray; + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; /** - * ListSinksResponse nextPageToken. + * ListMonitoredResourceDescriptorsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance */ - ListSinksResponse.prototype.nextPageToken = ""; + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance */ - ListSinksResponse.create = function create(properties) { - return new ListSinksResponse(properties); + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); }; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinks != null && message.sinks.length) - for (var i = 0; i < message.sinks.length; ++i) - $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resourceDescriptors != null && message.resourceDescriptors.length) + for (var i = 0; i < message.resourceDescriptors.length; ++i) + $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.sinks && message.sinks.length)) - message.sinks = []; - message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); + if (!(message.resourceDescriptors && message.resourceDescriptors.length)) + message.resourceDescriptors = []; + message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -2862,39 +3187,39 @@ }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksResponse message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @function verify - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksResponse.verify = function verify(message) { + ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinks != null && message.hasOwnProperty("sinks")) { - if (!Array.isArray(message.sinks)) - return "sinks: array expected"; - for (var i = 0; i < message.sinks.length; ++i) { - var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); + if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { + if (!Array.isArray(message.resourceDescriptors)) + return "resourceDescriptors: array expected"; + for (var i = 0; i < message.resourceDescriptors.length; ++i) { + var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); if (error) - return "sinks." + error; + return "resourceDescriptors." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -2904,25 +3229,25 @@ }; /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse */ - ListSinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksResponse) + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) return object; - var message = new $root.google.logging.v2.ListSinksResponse(); - if (object.sinks) { - if (!Array.isArray(object.sinks)) - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); - message.sinks = []; - for (var i = 0; i < object.sinks.length; ++i) { - if (typeof object.sinks[i] !== "object") - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); - message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); + message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); } } if (object.nextPageToken != null) @@ -2931,26 +3256,26 @@ }; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksResponse.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.sinks = []; + object.resourceDescriptors = []; if (options.defaults) object.nextPageToken = ""; - if (message.sinks && message.sinks.length) { - object.sinks = []; - for (var j = 0; j < message.sinks.length; ++j) - object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); + if (message.resourceDescriptors && message.resourceDescriptors.length) { + object.resourceDescriptors = []; + for (var j = 0; j < message.resourceDescriptors.length; ++j) + object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -2958,37 +3283,39 @@ }; /** - * Converts this ListSinksResponse to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance * @returns {Object.} JSON object */ - ListSinksResponse.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksResponse; + return ListMonitoredResourceDescriptorsResponse; })(); - v2.GetSinkRequest = (function() { + v2.ListLogsRequest = (function() { /** - * Properties of a GetSinkRequest. + * Properties of a ListLogsRequest. * @memberof google.logging.v2 - * @interface IGetSinkRequest - * @property {string|null} [sinkName] GetSinkRequest sinkName + * @interface IListLogsRequest + * @property {string|null} [parent] ListLogsRequest parent + * @property {number|null} [pageSize] ListLogsRequest pageSize + * @property {string|null} [pageToken] ListLogsRequest pageToken */ /** - * Constructs a new GetSinkRequest. + * Constructs a new ListLogsRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetSinkRequest. - * @implements IGetSinkRequest + * @classdesc Represents a ListLogsRequest. + * @implements IListLogsRequest * @constructor - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set */ - function GetSinkRequest(properties) { + function ListLogsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2996,75 +3323,101 @@ } /** - * GetSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.GetSinkRequest + * ListLogsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogsRequest * @instance */ - GetSinkRequest.prototype.sinkName = ""; + ListLogsRequest.prototype.parent = ""; /** - * Creates a new GetSinkRequest instance using the specified properties. + * ListLogsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.pageSize = 0; + + /** + * ListLogsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance */ - GetSinkRequest.create = function create(properties) { - return new GetSinkRequest(properties); + ListLogsRequest.create = function create(properties) { + return new ListLogsRequest(properties); }; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encode = function encode(message, writer) { + ListLogsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decode = function decode(reader, length) { + ListLogsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sinkName = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -3075,109 +3428,126 @@ }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSinkRequest message. + * Verifies a ListLogsRequest message. * @function verify - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSinkRequest.verify = function verify(message) { + ListLogsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest */ - GetSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetSinkRequest) + ListLogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsRequest) return object; - var message = new $root.google.logging.v2.GetSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); + var message = new $root.google.logging.v2.ListLogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSinkRequest.toObject = function toObject(message, options) { + ListLogsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this GetSinkRequest to JSON. + * Converts this ListLogsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListLogsRequest * @instance * @returns {Object.} JSON object */ - GetSinkRequest.prototype.toJSON = function toJSON() { + ListLogsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSinkRequest; + return ListLogsRequest; })(); - v2.CreateSinkRequest = (function() { + v2.ListLogsResponse = (function() { /** - * Properties of a CreateSinkRequest. + * Properties of a ListLogsResponse. * @memberof google.logging.v2 - * @interface ICreateSinkRequest - * @property {string|null} [parent] CreateSinkRequest parent - * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity + * @interface IListLogsResponse + * @property {Array.|null} [logNames] ListLogsResponse logNames + * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken */ /** - * Constructs a new CreateSinkRequest. + * Constructs a new ListLogsResponse. * @memberof google.logging.v2 - * @classdesc Represents a CreateSinkRequest. - * @implements ICreateSinkRequest + * @classdesc Represents a ListLogsResponse. + * @implements IListLogsResponse * @constructor - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set */ - function CreateSinkRequest(properties) { + function ListLogsResponse(properties) { + this.logNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3185,101 +3555,91 @@ } /** - * CreateSinkRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.parent = ""; - - /** - * CreateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.CreateSinkRequest + * ListLogsResponse logNames. + * @member {Array.} logNames + * @memberof google.logging.v2.ListLogsResponse * @instance */ - CreateSinkRequest.prototype.sink = null; + ListLogsResponse.prototype.logNames = $util.emptyArray; /** - * CreateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.CreateSinkRequest + * ListLogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogsResponse * @instance */ - CreateSinkRequest.prototype.uniqueWriterIdentity = false; + ListLogsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new ListLogsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance */ - CreateSinkRequest.create = function create(properties) { - return new CreateSinkRequest(properties); + ListLogsResponse.create = function create(properties) { + return new ListLogsResponse(properties); }; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSinkRequest.encode = function encode(message, writer) { + ListLogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sink != null && message.hasOwnProperty("sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.logNames != null && message.logNames.length) + for (var i = 0; i < message.logNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); return writer; }; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decode = function decode(reader, length) { + ListLogsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); + case 3: + if (!(message.logNames && message.logNames.length)) + message.logNames = []; + message.logNames.push(reader.string()); break; case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -3290,890 +3650,663 @@ }; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSinkRequest message. + * Verifies a ListLogsResponse message. * @function verify - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSinkRequest.verify = function verify(message) { + ListLogsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; + if (message.logNames != null && message.hasOwnProperty("logNames")) { + if (!Array.isArray(message.logNames)) + return "logNames: array expected"; + for (var i = 0; i < message.logNames.length; ++i) + if (!$util.isString(message.logNames[i])) + return "logNames: string[] expected"; } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse */ - CreateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateSinkRequest) + ListLogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsResponse) return object; - var message = new $root.google.logging.v2.CreateSinkRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + var message = new $root.google.logging.v2.ListLogsResponse(); + if (object.logNames) { + if (!Array.isArray(object.logNames)) + throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); + message.logNames = []; + for (var i = 0; i < object.logNames.length; ++i) + message.logNames[i] = String(object.logNames[i]); } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest + * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSinkRequest.toObject = function toObject(message, options) { + ListLogsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.sink = null; - object.uniqueWriterIdentity = false; + if (options.arrays || options.defaults) + object.logNames = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.logNames && message.logNames.length) { + object.logNames = []; + for (var j = 0; j < message.logNames.length; ++j) + object.logNames[j] = message.logNames[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; return object; }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this ListLogsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListLogsResponse * @instance * @returns {Object.} JSON object */ - CreateSinkRequest.prototype.toJSON = function toJSON() { + ListLogsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateSinkRequest; + return ListLogsResponse; })(); - v2.UpdateSinkRequest = (function() { + v2.ConfigServiceV2 = (function() { /** - * Properties of an UpdateSinkRequest. + * Constructs a new ConfigServiceV2 service. * @memberof google.logging.v2 - * @interface IUpdateSinkRequest - * @property {string|null} [sinkName] UpdateSinkRequest sinkName - * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask + * @classdesc Represents a ConfigServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; /** - * Constructs a new UpdateSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateSinkRequest. - * @implements IUpdateSinkRequest - * @constructor - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.ConfigServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. */ - function UpdateSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * UpdateSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.UpdateSinkRequest - * @instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListBucketsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListBucketsResponse} [response] ListBucketsResponse */ - UpdateSinkRequest.prototype.sinkName = ""; /** - * UpdateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.UpdateSinkRequest + * Calls ListBuckets. + * @function listBuckets + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListBucketsCallback} callback Node-style callback called with the error, if any, and ListBucketsResponse + * @returns {undefined} + * @variation 1 */ - UpdateSinkRequest.prototype.sink = null; + Object.defineProperty(ConfigServiceV2.prototype.listBuckets = function listBuckets(request, callback) { + return this.rpcCall(listBuckets, $root.google.logging.v2.ListBucketsRequest, $root.google.logging.v2.ListBucketsResponse, request, callback); + }, "name", { value: "ListBuckets" }); /** - * UpdateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.UpdateSinkRequest + * Calls ListBuckets. + * @function listBuckets + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateSinkRequest.prototype.uniqueWriterIdentity = false; /** - * UpdateSinkRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateSinkRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogBucket} [response] LogBucket + */ + + /** + * Calls GetBucket. + * @function getBucket + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetBucketCallback} callback Node-style callback called with the error, if any, and LogBucket + * @returns {undefined} + * @variation 1 */ - UpdateSinkRequest.prototype.updateMask = null; + Object.defineProperty(ConfigServiceV2.prototype.getBucket = function getBucket(request, callback) { + return this.rpcCall(getBucket, $root.google.logging.v2.GetBucketRequest, $root.google.logging.v2.LogBucket, request, callback); + }, "name", { value: "GetBucket" }); /** - * Creates a new UpdateSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance + * Calls GetBucket. + * @function getBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateSinkRequest.create = function create(properties) { - return new UpdateSinkRequest(properties); - }; /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogBucket} [response] LogBucket */ - UpdateSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - if (message.sink != null && message.hasOwnProperty("sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateBucket. + * @function updateBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateBucketCallback} callback Node-style callback called with the error, if any, and LogBucket + * @returns {undefined} + * @variation 1 */ - UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(ConfigServiceV2.prototype.updateBucket = function updateBucket(request, callback) { + return this.rpcCall(updateBucket, $root.google.logging.v2.UpdateBucketRequest, $root.google.logging.v2.LogBucket, request, callback); + }, "name", { value: "UpdateBucket" }); /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateBucket. + * @function updateBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; - case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListSinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse */ - UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an UpdateSinkRequest message. - * @function verify - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse + * @returns {undefined} + * @variation 1 */ - UpdateSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; - } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { + return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); + }, "name", { value: "ListSinks" }); /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateSinkRequest) - return object; - var message = new $root.google.logging.v2.UpdateSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); - } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink */ - UpdateSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sinkName = ""; - object.sink = null; - object.uniqueWriterIdentity = false; - object.updateMask = null; - } - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; /** - * Converts this UpdateSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateSinkRequest + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 */ - UpdateSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpdateSinkRequest; - })(); + Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { + return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "GetSink" }); - v2.DeleteSinkRequest = (function() { + /** + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a DeleteSinkRequest. - * @memberof google.logging.v2 - * @interface IDeleteSinkRequest - * @property {string|null} [sinkName] DeleteSinkRequest sinkName + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink */ /** - * Constructs a new DeleteSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteSinkRequest. - * @implements IDeleteSinkRequest - * @constructor - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 */ - function DeleteSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { + return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "CreateSink" }); /** - * DeleteSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.DeleteSinkRequest + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteSinkRequest.prototype.sinkName = ""; /** - * Creates a new DeleteSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink */ - DeleteSinkRequest.create = function create(properties) { - return new DeleteSinkRequest(properties); - }; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 */ - DeleteSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - return writer; - }; + Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { + return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "UpdateSink" }); /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - DeleteSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { + return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSink" }); /** - * Verifies a DeleteSinkRequest message. - * @function verify - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - return null; - }; /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListExclusionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse */ - DeleteSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteSinkRequest) - return object; - var message = new $root.google.logging.v2.DeleteSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - return message; - }; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse + * @returns {undefined} + * @variation 1 */ - DeleteSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - return object; - }; + Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { + return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); + }, "name", { value: "ListExclusions" }); /** - * Converts this DeleteSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteSinkRequest + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteSinkRequest; - })(); - - v2.LogExclusion = (function() { /** - * Properties of a LogExclusion. - * @memberof google.logging.v2 - * @interface ILogExclusion - * @property {string|null} [name] LogExclusion name - * @property {string|null} [description] LogExclusion description - * @property {string|null} [filter] LogExclusion filter - * @property {boolean|null} [disabled] LogExclusion disabled - * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion */ /** - * Constructs a new LogExclusion. - * @memberof google.logging.v2 - * @classdesc Represents a LogExclusion. - * @implements ILogExclusion - * @constructor - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - function LogExclusion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { + return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "GetExclusion" }); /** - * LogExclusion name. - * @member {string} name - * @memberof google.logging.v2.LogExclusion + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogExclusion.prototype.name = ""; /** - * LogExclusion description. - * @member {string} description - * @memberof google.logging.v2.LogExclusion - * @instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion */ - LogExclusion.prototype.description = ""; /** - * LogExclusion filter. - * @member {string} filter - * @memberof google.logging.v2.LogExclusion + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - LogExclusion.prototype.filter = ""; + Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { + return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "CreateExclusion" }); /** - * LogExclusion disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogExclusion + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogExclusion.prototype.disabled = false; /** - * LogExclusion createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogExclusion + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ + + /** + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 */ - LogExclusion.prototype.createTime = null; + Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { + return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "UpdateExclusion" }); /** - * LogExclusion updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogExclusion + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogExclusion.prototype.updateTime = null; /** - * Creates a new LogExclusion instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set - * @returns {google.logging.v2.LogExclusion} LogExclusion instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - LogExclusion.create = function create(properties) { - return new LogExclusion(properties); - }; /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - LogExclusion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.disabled != null && message.hasOwnProperty("disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { + return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExclusion" }); /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a LogExclusion message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogExclusion} LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetCmekSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.CmekSettings} [response] CmekSettings */ - LogExclusion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.disabled = reader.bool(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogExclusion} LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetCmekSettings. + * @function getCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings + * @returns {undefined} + * @variation 1 */ - LogExclusion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(ConfigServiceV2.prototype.getCmekSettings = function getCmekSettings(request, callback) { + return this.rpcCall(getCmekSettings, $root.google.logging.v2.GetCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); + }, "name", { value: "GetCmekSettings" }); /** - * Verifies a LogExclusion message. - * @function verify - * @memberof google.logging.v2.LogExclusion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetCmekSettings. + * @function getCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogExclusion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogExclusion - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogExclusion} LogExclusion + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateCmekSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.CmekSettings} [response] CmekSettings */ - LogExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogExclusion) - return object; - var message = new $root.google.logging.v2.LogExclusion(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.LogExclusion} message LogExclusion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateCmekSettings. + * @function updateCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings + * @returns {undefined} + * @variation 1 */ - LogExclusion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.disabled = false; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; + Object.defineProperty(ConfigServiceV2.prototype.updateCmekSettings = function updateCmekSettings(request, callback) { + return this.rpcCall(updateCmekSettings, $root.google.logging.v2.UpdateCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); + }, "name", { value: "UpdateCmekSettings" }); /** - * Converts this LogExclusion to JSON. - * @function toJSON - * @memberof google.logging.v2.LogExclusion + * Calls UpdateCmekSettings. + * @function updateCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LogExclusion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return LogExclusion; + return ConfigServiceV2; })(); - v2.ListExclusionsRequest = (function() { + v2.LogBucket = (function() { /** - * Properties of a ListExclusionsRequest. + * Properties of a LogBucket. * @memberof google.logging.v2 - * @interface IListExclusionsRequest - * @property {string|null} [parent] ListExclusionsRequest parent - * @property {string|null} [pageToken] ListExclusionsRequest pageToken - * @property {number|null} [pageSize] ListExclusionsRequest pageSize + * @interface ILogBucket + * @property {string|null} [name] LogBucket name + * @property {string|null} [description] LogBucket description + * @property {google.protobuf.ITimestamp|null} [createTime] LogBucket createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogBucket updateTime + * @property {number|null} [retentionDays] LogBucket retentionDays + * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState */ /** - * Constructs a new ListExclusionsRequest. + * Constructs a new LogBucket. * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsRequest. - * @implements IListExclusionsRequest + * @classdesc Represents a LogBucket. + * @implements ILogBucket * @constructor - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogBucket=} [properties] Properties to set */ - function ListExclusionsRequest(properties) { + function LogBucket(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4181,101 +4314,140 @@ } /** - * ListExclusionsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListExclusionsRequest + * LogBucket name. + * @member {string} name + * @memberof google.logging.v2.LogBucket * @instance */ - ListExclusionsRequest.prototype.parent = ""; + LogBucket.prototype.name = ""; /** - * ListExclusionsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListExclusionsRequest + * LogBucket description. + * @member {string} description + * @memberof google.logging.v2.LogBucket * @instance */ - ListExclusionsRequest.prototype.pageToken = ""; + LogBucket.prototype.description = ""; /** - * ListExclusionsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListExclusionsRequest + * LogBucket createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogBucket * @instance */ - ListExclusionsRequest.prototype.pageSize = 0; + LogBucket.prototype.createTime = null; /** - * Creates a new ListExclusionsRequest instance using the specified properties. + * LogBucket updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.updateTime = null; + + /** + * LogBucket retentionDays. + * @member {number} retentionDays + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.retentionDays = 0; + + /** + * LogBucket lifecycleState. + * @member {google.logging.v2.LifecycleState} lifecycleState + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.lifecycleState = 0; + + /** + * Creates a new LogBucket instance using the specified properties. * @function create - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @static - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance + * @param {google.logging.v2.ILogBucket=} [properties] Properties to set + * @returns {google.logging.v2.LogBucket} LogBucket instance */ - ListExclusionsRequest.create = function create(properties) { - return new ListExclusionsRequest(properties); + LogBucket.create = function create(properties) { + return new LogBucket(properties); }; /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsRequest.encode = function encode(message, writer) { + LogBucket.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.lifecycleState); return writer; }; /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogBucket.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * Decodes a LogBucket message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.LogBucket} LogBucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsRequest.decode = function decode(reader, length) { + LogBucket.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogBucket(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); + case 1: + message.name = reader.string(); break; case 3: - message.pageSize = reader.int32(); + message.description = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.retentionDays = reader.int32(); + break; + case 12: + message.lifecycleState = reader.int32(); break; default: reader.skipType(tag & 7); @@ -4286,218 +4458,406 @@ }; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * Decodes a LogBucket message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.LogBucket} LogBucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { + LogBucket.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListExclusionsRequest message. + * Verifies a LogBucket message. * @function verify - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListExclusionsRequest.verify = function verify(message) { + LogBucket.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + if (!$util.isInteger(message.retentionDays)) + return "retentionDays: integer expected"; + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + switch (message.lifecycleState) { + default: + return "lifecycleState: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.LogBucket} LogBucket */ - ListExclusionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsRequest) + LogBucket.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogBucket) return object; - var message = new $root.google.logging.v2.ListExclusionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.LogBucket(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogBucket.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogBucket.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.retentionDays != null) + message.retentionDays = object.retentionDays | 0; + switch (object.lifecycleState) { + case "LIFECYCLE_STATE_UNSPECIFIED": + case 0: + message.lifecycleState = 0; + break; + case "ACTIVE": + case 1: + message.lifecycleState = 1; + break; + case "DELETE_REQUESTED": + case 2: + message.lifecycleState = 2; + break; + } return message; }; /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogBucket message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @static - * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest + * @param {google.logging.v2.LogBucket} message LogBucket * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExclusionsRequest.toObject = function toObject(message, options) { + LogBucket.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.retentionDays = 0; + object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + object.retentionDays = message.retentionDays; + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; return object; }; /** - * Converts this ListExclusionsRequest to JSON. + * Converts this LogBucket to JSON. * @function toJSON - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.LogBucket * @instance * @returns {Object.} JSON object */ - ListExclusionsRequest.prototype.toJSON = function toJSON() { + LogBucket.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListExclusionsRequest; + return LogBucket; })(); - v2.ListExclusionsResponse = (function() { + v2.LogSink = (function() { + + /** + * Properties of a LogSink. + * @memberof google.logging.v2 + * @interface ILogSink + * @property {string|null} [name] LogSink name + * @property {string|null} [destination] LogSink destination + * @property {string|null} [filter] LogSink filter + * @property {string|null} [description] LogSink description + * @property {boolean|null} [disabled] LogSink disabled + * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat + * @property {string|null} [writerIdentity] LogSink writerIdentity + * @property {boolean|null} [includeChildren] LogSink includeChildren + * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + */ + + /** + * Constructs a new LogSink. + * @memberof google.logging.v2 + * @classdesc Represents a LogSink. + * @implements ILogSink + * @constructor + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + */ + function LogSink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogSink name. + * @member {string} name + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.name = ""; + + /** + * LogSink destination. + * @member {string} destination + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.destination = ""; + + /** + * LogSink filter. + * @member {string} filter + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.filter = ""; + + /** + * LogSink description. + * @member {string} description + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.description = ""; + + /** + * LogSink disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.disabled = false; + + /** + * LogSink outputVersionFormat. + * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.outputVersionFormat = 0; + + /** + * LogSink writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.writerIdentity = ""; + + /** + * LogSink includeChildren. + * @member {boolean} includeChildren + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.includeChildren = false; /** - * Properties of a ListExclusionsResponse. - * @memberof google.logging.v2 - * @interface IListExclusionsResponse - * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions - * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken + * LogSink bigqueryOptions. + * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions + * @memberof google.logging.v2.LogSink + * @instance */ + LogSink.prototype.bigqueryOptions = null; /** - * Constructs a new ListExclusionsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsResponse. - * @implements IListExclusionsResponse - * @constructor - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * LogSink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogSink + * @instance */ - function ListExclusionsResponse(properties) { - this.exclusions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LogSink.prototype.createTime = null; /** - * ListExclusionsResponse exclusions. - * @member {Array.} exclusions - * @memberof google.logging.v2.ListExclusionsResponse + * LogSink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogSink * @instance */ - ListExclusionsResponse.prototype.exclusions = $util.emptyArray; + LogSink.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListExclusionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListExclusionsResponse + * LogSink options. + * @member {"bigqueryOptions"|undefined} options + * @memberof google.logging.v2.LogSink * @instance */ - ListExclusionsResponse.prototype.nextPageToken = ""; + Object.defineProperty(LogSink.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListExclusionsResponse instance using the specified properties. + * Creates a new LogSink instance using the specified properties. * @function create - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @returns {google.logging.v2.LogSink} LogSink instance */ - ListExclusionsResponse.create = function create(properties) { - return new ListExclusionsResponse(properties); + LogSink.create = function create(properties) { + return new LogSink(properties); }; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsResponse.encode = function encode(message, writer) { + LogSink.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.exclusions != null && message.exclusions.length) - for (var i = 0; i < message.exclusions.length; ++i) - $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destination != null && message.hasOwnProperty("destination")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) + $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.disabled); return writer; }; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + LogSink.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * Decodes a LogSink message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.LogSink} LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsResponse.decode = function decode(reader, length) { + LogSink.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + message.name = reader.string(); break; - case 2: - message.nextPageToken = reader.string(); + case 3: + message.destination = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 18: + message.description = reader.string(); + break; + case 19: + message.disabled = reader.bool(); + break; + case 6: + message.outputVersionFormat = reader.int32(); + break; + case 8: + message.writerIdentity = reader.string(); + break; + case 9: + message.includeChildren = reader.bool(); + break; + case 12: + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); + break; + case 13: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4508,133 +4868,244 @@ }; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * Decodes a LogSink message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.LogSink} LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { + LogSink.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListExclusionsResponse message. + * Verifies a LogSink message. * @function verify - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListExclusionsResponse.verify = function verify(message) { + LogSink.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.exclusions != null && message.hasOwnProperty("exclusions")) { - if (!Array.isArray(message.exclusions)) - return "exclusions: array expected"; - for (var i = 0; i < message.exclusions.length; ++i) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + switch (message.outputVersionFormat) { + default: + return "outputVersionFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + if (typeof message.includeChildren !== "boolean") + return "includeChildren: boolean expected"; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + properties.options = 1; + { + var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); if (error) - return "exclusions." + error; + return "bigqueryOptions." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.LogSink} LogSink */ - ListExclusionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsResponse) + LogSink.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogSink) return object; - var message = new $root.google.logging.v2.ListExclusionsResponse(); - if (object.exclusions) { - if (!Array.isArray(object.exclusions)) - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); - message.exclusions = []; - for (var i = 0; i < object.exclusions.length; ++i) { - if (typeof object.exclusions[i] !== "object") - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); - message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); - } + var message = new $root.google.logging.v2.LogSink(); + if (object.name != null) + message.name = String(object.name); + if (object.destination != null) + message.destination = String(object.destination); + if (object.filter != null) + message.filter = String(object.filter); + if (object.description != null) + message.description = String(object.description); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + switch (object.outputVersionFormat) { + case "VERSION_FORMAT_UNSPECIFIED": + case 0: + message.outputVersionFormat = 0; + break; + case "V2": + case 1: + message.outputVersionFormat = 1; + break; + case "V1": + case 2: + message.outputVersionFormat = 2; + break; + } + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); + if (object.includeChildren != null) + message.includeChildren = Boolean(object.includeChildren); + if (object.bigqueryOptions != null) { + if (typeof object.bigqueryOptions !== "object") + throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a LogSink message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @static - * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse + * @param {google.logging.v2.LogSink} message LogSink * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExclusionsResponse.toObject = function toObject(message, options) { + LogSink.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.exclusions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.exclusions && message.exclusions.length) { - object.exclusions = []; - for (var j = 0; j < message.exclusions.length; ++j) - object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + if (options.defaults) { + object.name = ""; + object.destination = ""; + object.filter = ""; + object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; + object.writerIdentity = ""; + object.includeChildren = false; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.disabled = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + object.includeChildren = message.includeChildren; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); + if (options.oneofs) + object.options = "bigqueryOptions"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; return object; }; /** - * Converts this ListExclusionsResponse to JSON. + * Converts this LogSink to JSON. * @function toJSON - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.LogSink * @instance * @returns {Object.} JSON object */ - ListExclusionsResponse.prototype.toJSON = function toJSON() { + LogSink.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListExclusionsResponse; + /** + * VersionFormat enum. + * @name google.logging.v2.LogSink.VersionFormat + * @enum {string} + * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value + * @property {number} V2=1 V2 value + * @property {number} V1=2 V1 value + */ + LogSink.VersionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "V2"] = 1; + values[valuesById[2] = "V1"] = 2; + return values; + })(); + + return LogSink; })(); - v2.GetExclusionRequest = (function() { + v2.BigQueryOptions = (function() { /** - * Properties of a GetExclusionRequest. + * Properties of a BigQueryOptions. * @memberof google.logging.v2 - * @interface IGetExclusionRequest - * @property {string|null} [name] GetExclusionRequest name + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning */ /** - * Constructs a new GetExclusionRequest. + * Constructs a new BigQueryOptions. * @memberof google.logging.v2 - * @classdesc Represents a GetExclusionRequest. - * @implements IGetExclusionRequest + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions * @constructor - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set */ - function GetExclusionRequest(properties) { + function BigQueryOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4642,75 +5113,88 @@ } /** - * GetExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.GetExclusionRequest + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions * @instance */ - GetExclusionRequest.prototype.name = ""; + BigQueryOptions.prototype.usePartitionedTables = false; /** - * Creates a new GetExclusionRequest instance using the specified properties. + * BigQueryOptions usesTimestampColumnPartitioning. + * @member {boolean} usesTimestampColumnPartitioning + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; + + /** + * Creates a new BigQueryOptions instance using the specified properties. * @function create - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance */ - GetExclusionRequest.create = function create(properties) { - return new GetExclusionRequest(properties); + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); }; /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExclusionRequest.encode = function encode(message, writer) { + BigQueryOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); return writer; }; /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. + * Decodes a BigQueryOptions message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decode = function decode(reader, length) { + BigQueryOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.usePartitionedTables = reader.bool(); + break; + case 3: + message.usesTimestampColumnPartitioning = reader.bool(); break; default: reader.skipType(tag & 7); @@ -4721,108 +5205,134 @@ }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetExclusionRequest message. + * Verifies a BigQueryOptions message. * @function verify - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetExclusionRequest.verify = function verify(message) { + BigQueryOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + if (typeof message.usesTimestampColumnPartitioning !== "boolean") + return "usesTimestampColumnPartitioning: boolean expected"; return null; }; /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions */ - GetExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetExclusionRequest) + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) return object; - var message = new $root.google.logging.v2.GetExclusionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + if (object.usesTimestampColumnPartitioning != null) + message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); return message; }; /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetExclusionRequest.toObject = function toObject(message, options) { + BigQueryOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.usePartitionedTables = false; + object.usesTimestampColumnPartitioning = false; + } + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; return object; }; /** - * Converts this GetExclusionRequest to JSON. + * Converts this BigQueryOptions to JSON. * @function toJSON - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.BigQueryOptions * @instance * @returns {Object.} JSON object */ - GetExclusionRequest.prototype.toJSON = function toJSON() { + BigQueryOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetExclusionRequest; + return BigQueryOptions; })(); - v2.CreateExclusionRequest = (function() { + /** + * LifecycleState enum. + * @name google.logging.v2.LifecycleState + * @enum {string} + * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value + */ + v2.LifecycleState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "DELETE_REQUESTED"] = 2; + return values; + })(); + + v2.ListBucketsRequest = (function() { /** - * Properties of a CreateExclusionRequest. + * Properties of a ListBucketsRequest. * @memberof google.logging.v2 - * @interface ICreateExclusionRequest - * @property {string|null} [parent] CreateExclusionRequest parent - * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion + * @interface IListBucketsRequest + * @property {string|null} [parent] ListBucketsRequest parent + * @property {string|null} [pageToken] ListBucketsRequest pageToken + * @property {number|null} [pageSize] ListBucketsRequest pageSize */ /** - * Constructs a new CreateExclusionRequest. + * Constructs a new ListBucketsRequest. * @memberof google.logging.v2 - * @classdesc Represents a CreateExclusionRequest. - * @implements ICreateExclusionRequest + * @classdesc Represents a ListBucketsRequest. + * @implements IListBucketsRequest * @constructor - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set */ - function CreateExclusionRequest(properties) { + function ListBucketsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4830,80 +5340,90 @@ } /** - * CreateExclusionRequest parent. + * ListBucketsRequest parent. * @member {string} parent - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @instance */ - CreateExclusionRequest.prototype.parent = ""; + ListBucketsRequest.prototype.parent = ""; /** - * CreateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.CreateExclusionRequest + * ListBucketsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListBucketsRequest * @instance */ - CreateExclusionRequest.prototype.exclusion = null; + ListBucketsRequest.prototype.pageToken = ""; /** - * Creates a new CreateExclusionRequest instance using the specified properties. + * ListBucketsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListBucketsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @static - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance */ - CreateExclusionRequest.create = function create(properties) { - return new CreateExclusionRequest(properties); + ListBucketsRequest.create = function create(properties) { + return new ListBucketsRequest(properties); }; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExclusionRequest.encode = function encode(message, writer) { + ListBucketsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * Decodes a ListBucketsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExclusionRequest.decode = function decode(reader, length) { + ListBucketsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4911,7 +5431,10 @@ message.parent = reader.string(); break; case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -4922,123 +5445,126 @@ }; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateExclusionRequest message. + * Verifies a ListBucketsRequest message. * @function verify - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateExclusionRequest.verify = function verify(message) { + ListBucketsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest */ - CreateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateExclusionRequest) + ListBucketsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsRequest) return object; - var message = new $root.google.logging.v2.CreateExclusionRequest(); + var message = new $root.google.logging.v2.ListBucketsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @static - * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest + * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateExclusionRequest.toObject = function toObject(message, options) { + ListBucketsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.exclusion = null; + object.pageToken = ""; + object.pageSize = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this CreateExclusionRequest to JSON. + * Converts this ListBucketsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListBucketsRequest * @instance * @returns {Object.} JSON object */ - CreateExclusionRequest.prototype.toJSON = function toJSON() { + ListBucketsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateExclusionRequest; + return ListBucketsRequest; })(); - v2.UpdateExclusionRequest = (function() { + v2.ListBucketsResponse = (function() { /** - * Properties of an UpdateExclusionRequest. + * Properties of a ListBucketsResponse. * @memberof google.logging.v2 - * @interface IUpdateExclusionRequest - * @property {string|null} [name] UpdateExclusionRequest name - * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask + * @interface IListBucketsResponse + * @property {Array.|null} [buckets] ListBucketsResponse buckets + * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken */ /** - * Constructs a new UpdateExclusionRequest. + * Constructs a new ListBucketsResponse. * @memberof google.logging.v2 - * @classdesc Represents an UpdateExclusionRequest. - * @implements IUpdateExclusionRequest + * @classdesc Represents a ListBucketsResponse. + * @implements IListBucketsResponse * @constructor - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set */ - function UpdateExclusionRequest(properties) { + function ListBucketsResponse(properties) { + this.buckets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5046,101 +5572,91 @@ } /** - * UpdateExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateExclusionRequest - * @instance - */ - UpdateExclusionRequest.prototype.name = ""; - - /** - * UpdateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.UpdateExclusionRequest + * ListBucketsResponse buckets. + * @member {Array.} buckets + * @memberof google.logging.v2.ListBucketsResponse * @instance */ - UpdateExclusionRequest.prototype.exclusion = null; + ListBucketsResponse.prototype.buckets = $util.emptyArray; /** - * UpdateExclusionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateExclusionRequest + * ListBucketsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListBucketsResponse * @instance */ - UpdateExclusionRequest.prototype.updateMask = null; + ListBucketsResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateExclusionRequest instance using the specified properties. + * Creates a new ListBucketsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance */ - UpdateExclusionRequest.create = function create(properties) { - return new UpdateExclusionRequest(properties); + ListBucketsResponse.create = function create(properties) { + return new ListBucketsResponse(properties); }; /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer - */ - UpdateExclusionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + */ + ListBucketsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buckets != null && message.buckets.length) + for (var i = 0; i < message.buckets.length; ++i) + $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * Decodes a ListBucketsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decode = function decode(reader, length) { + ListBucketsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); break; case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -5151,134 +5667,135 @@ }; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateExclusionRequest message. + * Verifies a ListBucketsResponse message. * @function verify - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateExclusionRequest.verify = function verify(message) { + ListBucketsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!Array.isArray(message.buckets)) + return "buckets: array expected"; + for (var i = 0; i < message.buckets.length; ++i) { + var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); + if (error) + return "buckets." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse */ - UpdateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) + ListBucketsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsResponse) return object; - var message = new $root.google.logging.v2.UpdateExclusionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.logging.v2.ListBucketsResponse(); + if (object.buckets) { + if (!Array.isArray(object.buckets)) + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); + message.buckets = []; + for (var i = 0; i < object.buckets.length; ++i) { + if (typeof object.buckets[i] !== "object") + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); + message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest + * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateExclusionRequest.toObject = function toObject(message, options) { + ListBucketsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.exclusion = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.buckets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.buckets && message.buckets.length) { + object.buckets = []; + for (var j = 0; j < message.buckets.length; ++j) + object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateExclusionRequest to JSON. + * Converts this ListBucketsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListBucketsResponse * @instance * @returns {Object.} JSON object */ - UpdateExclusionRequest.prototype.toJSON = function toJSON() { + ListBucketsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateExclusionRequest; + return ListBucketsResponse; })(); - v2.DeleteExclusionRequest = (function() { + v2.UpdateBucketRequest = (function() { /** - * Properties of a DeleteExclusionRequest. + * Properties of an UpdateBucketRequest. * @memberof google.logging.v2 - * @interface IDeleteExclusionRequest - * @property {string|null} [name] DeleteExclusionRequest name + * @interface IUpdateBucketRequest + * @property {string|null} [name] UpdateBucketRequest name + * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask */ /** - * Constructs a new DeleteExclusionRequest. + * Constructs a new UpdateBucketRequest. * @memberof google.logging.v2 - * @classdesc Represents a DeleteExclusionRequest. - * @implements IDeleteExclusionRequest + * @classdesc Represents an UpdateBucketRequest. + * @implements IUpdateBucketRequest * @constructor - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set */ - function DeleteExclusionRequest(properties) { + function UpdateBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5286,76 +5803,102 @@ } /** - * DeleteExclusionRequest name. + * UpdateBucketRequest name. * @member {string} name - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @instance */ - DeleteExclusionRequest.prototype.name = ""; + UpdateBucketRequest.prototype.name = ""; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. + * UpdateBucketRequest bucket. + * @member {google.logging.v2.ILogBucket|null|undefined} bucket + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.bucket = null; + + /** + * UpdateBucketRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateBucketRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance */ - DeleteExclusionRequest.create = function create(properties) { - return new DeleteExclusionRequest(properties); + UpdateBucketRequest.create = function create(properties) { + return new UpdateBucketRequest(properties); }; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encode = function encode(message, writer) { + UpdateBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.bucket != null && message.hasOwnProperty("bucket")) + $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * Decodes an UpdateBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decode = function decode(reader, length) { + UpdateBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -5365,107 +5908,134 @@ }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteExclusionRequest message. + * Verifies an UpdateBucketRequest message. * @function verify - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteExclusionRequest.verify = function verify(message) { + UpdateBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + var error = $root.google.logging.v2.LogBucket.verify(message.bucket); + if (error) + return "bucket." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest */ - DeleteExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + UpdateBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateBucketRequest) return object; - var message = new $root.google.logging.v2.DeleteExclusionRequest(); + var message = new $root.google.logging.v2.UpdateBucketRequest(); if (object.name != null) message.name = String(object.name); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); + message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteExclusionRequest.toObject = function toObject(message, options) { + UpdateBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.bucket = null; + object.updateMask = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this DeleteExclusionRequest to JSON. + * Converts this UpdateBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.UpdateBucketRequest * @instance * @returns {Object.} JSON object */ - DeleteExclusionRequest.prototype.toJSON = function toJSON() { + UpdateBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteExclusionRequest; + return UpdateBucketRequest; })(); - v2.GetCmekSettingsRequest = (function() { + v2.GetBucketRequest = (function() { /** - * Properties of a GetCmekSettingsRequest. + * Properties of a GetBucketRequest. * @memberof google.logging.v2 - * @interface IGetCmekSettingsRequest - * @property {string|null} [name] GetCmekSettingsRequest name + * @interface IGetBucketRequest + * @property {string|null} [name] GetBucketRequest name */ /** - * Constructs a new GetCmekSettingsRequest. + * Constructs a new GetBucketRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetCmekSettingsRequest. - * @implements IGetCmekSettingsRequest + * @classdesc Represents a GetBucketRequest. + * @implements IGetBucketRequest * @constructor - * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set */ - function GetCmekSettingsRequest(properties) { + function GetBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5473,35 +6043,35 @@ } /** - * GetCmekSettingsRequest name. + * GetBucketRequest name. * @member {string} name - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @instance */ - GetCmekSettingsRequest.prototype.name = ""; + GetBucketRequest.prototype.name = ""; /** - * Creates a new GetCmekSettingsRequest instance using the specified properties. + * Creates a new GetBucketRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest instance + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance */ - GetCmekSettingsRequest.create = function create(properties) { - return new GetCmekSettingsRequest(properties); + GetBucketRequest.create = function create(properties) { + return new GetBucketRequest(properties); }; /** - * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCmekSettingsRequest.encode = function encode(message, writer) { + GetBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) @@ -5510,33 +6080,33 @@ }; /** - * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * Decodes a GetBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCmekSettingsRequest.decode = function decode(reader, length) { + GetBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetCmekSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5552,30 +6122,30 @@ }; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCmekSettingsRequest message. + * Verifies a GetBucketRequest message. * @function verify - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCmekSettingsRequest.verify = function verify(message) { + GetBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -5585,32 +6155,32 @@ }; /** - * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest */ - GetCmekSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetCmekSettingsRequest) + GetBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetBucketRequest) return object; - var message = new $root.google.logging.v2.GetCmekSettingsRequest(); + var message = new $root.google.logging.v2.GetBucketRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.GetCmekSettingsRequest} message GetCmekSettingsRequest + * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCmekSettingsRequest.toObject = function toObject(message, options) { + GetBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -5622,39 +6192,39 @@ }; /** - * Converts this GetCmekSettingsRequest to JSON. + * Converts this GetBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.GetBucketRequest * @instance * @returns {Object.} JSON object */ - GetCmekSettingsRequest.prototype.toJSON = function toJSON() { + GetBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetCmekSettingsRequest; + return GetBucketRequest; })(); - v2.UpdateCmekSettingsRequest = (function() { + v2.ListSinksRequest = (function() { /** - * Properties of an UpdateCmekSettingsRequest. + * Properties of a ListSinksRequest. * @memberof google.logging.v2 - * @interface IUpdateCmekSettingsRequest - * @property {string|null} [name] UpdateCmekSettingsRequest name - * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] UpdateCmekSettingsRequest cmekSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmekSettingsRequest updateMask + * @interface IListSinksRequest + * @property {string|null} [parent] ListSinksRequest parent + * @property {string|null} [pageToken] ListSinksRequest pageToken + * @property {number|null} [pageSize] ListSinksRequest pageSize */ /** - * Constructs a new UpdateCmekSettingsRequest. + * Constructs a new ListSinksRequest. * @memberof google.logging.v2 - * @classdesc Represents an UpdateCmekSettingsRequest. - * @implements IUpdateCmekSettingsRequest + * @classdesc Represents a ListSinksRequest. + * @implements IListSinksRequest * @constructor - * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set */ - function UpdateCmekSettingsRequest(properties) { + function ListSinksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5662,101 +6232,101 @@ } /** - * UpdateCmekSettingsRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * ListSinksRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListSinksRequest * @instance */ - UpdateCmekSettingsRequest.prototype.name = ""; + ListSinksRequest.prototype.parent = ""; /** - * UpdateCmekSettingsRequest cmekSettings. - * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * ListSinksRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListSinksRequest * @instance */ - UpdateCmekSettingsRequest.prototype.cmekSettings = null; + ListSinksRequest.prototype.pageToken = ""; /** - * UpdateCmekSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * ListSinksRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListSinksRequest * @instance */ - UpdateCmekSettingsRequest.prototype.updateMask = null; + ListSinksRequest.prototype.pageSize = 0; /** - * Creates a new UpdateCmekSettingsRequest instance using the specified properties. + * Creates a new ListSinksRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest instance + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance */ - UpdateCmekSettingsRequest.create = function create(properties) { - return new UpdateCmekSettingsRequest(properties); + ListSinksRequest.create = function create(properties) { + return new ListSinksRequest(properties); }; /** - * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCmekSettingsRequest.encode = function encode(message, writer) { + ListSinksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) - $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. + * Decodes a ListSinksRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCmekSettingsRequest.decode = function decode(reader, length) { + ListSinksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -5767,136 +6337,126 @@ }; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateCmekSettingsRequest message. + * Verifies a ListSinksRequest message. * @function verify - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateCmekSettingsRequest.verify = function verify(message) { + ListSinksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { - var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); - if (error) - return "cmekSettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest */ - UpdateCmekSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateCmekSettingsRequest) + ListSinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksRequest) return object; - var message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.cmekSettings != null) { - if (typeof object.cmekSettings !== "object") - throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.cmekSettings: object expected"); - message.cmekSettings = $root.google.logging.v2.CmekSettings.fromObject(object.cmekSettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.logging.v2.ListSinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.UpdateCmekSettingsRequest} message UpdateCmekSettingsRequest + * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCmekSettingsRequest.toObject = function toObject(message, options) { + ListSinksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.cmekSettings = null; - object.updateMask = null; + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) - object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this UpdateCmekSettingsRequest to JSON. + * Converts this ListSinksRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListSinksRequest * @instance * @returns {Object.} JSON object */ - UpdateCmekSettingsRequest.prototype.toJSON = function toJSON() { + ListSinksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateCmekSettingsRequest; + return ListSinksRequest; })(); - v2.CmekSettings = (function() { + v2.ListSinksResponse = (function() { /** - * Properties of a CmekSettings. + * Properties of a ListSinksResponse. * @memberof google.logging.v2 - * @interface ICmekSettings - * @property {string|null} [name] CmekSettings name - * @property {string|null} [kmsKeyName] CmekSettings kmsKeyName - * @property {string|null} [serviceAccountId] CmekSettings serviceAccountId + * @interface IListSinksResponse + * @property {Array.|null} [sinks] ListSinksResponse sinks + * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken */ /** - * Constructs a new CmekSettings. + * Constructs a new ListSinksResponse. * @memberof google.logging.v2 - * @classdesc Represents a CmekSettings. - * @implements ICmekSettings + * @classdesc Represents a ListSinksResponse. + * @implements IListSinksResponse * @constructor - * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set */ - function CmekSettings(properties) { + function ListSinksResponse(properties) { + this.sinks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5904,101 +6464,91 @@ } /** - * CmekSettings name. - * @member {string} name - * @memberof google.logging.v2.CmekSettings - * @instance - */ - CmekSettings.prototype.name = ""; - - /** - * CmekSettings kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.logging.v2.CmekSettings + * ListSinksResponse sinks. + * @member {Array.} sinks + * @memberof google.logging.v2.ListSinksResponse * @instance */ - CmekSettings.prototype.kmsKeyName = ""; + ListSinksResponse.prototype.sinks = $util.emptyArray; /** - * CmekSettings serviceAccountId. - * @member {string} serviceAccountId - * @memberof google.logging.v2.CmekSettings + * ListSinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListSinksResponse * @instance */ - CmekSettings.prototype.serviceAccountId = ""; + ListSinksResponse.prototype.nextPageToken = ""; /** - * Creates a new CmekSettings instance using the specified properties. + * Creates a new ListSinksResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set - * @returns {google.logging.v2.CmekSettings} CmekSettings instance + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance */ - CmekSettings.create = function create(properties) { - return new CmekSettings(properties); + ListSinksResponse.create = function create(properties) { + return new ListSinksResponse(properties); }; /** - * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CmekSettings.encode = function encode(message, writer) { + ListSinksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); - if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountId); + if (message.sinks != null && message.sinks.length) + for (var i = 0; i < message.sinks.length; ++i) + $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CmekSettings.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CmekSettings message from the specified reader or buffer. + * Decodes a ListSinksResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CmekSettings.decode = function decode(reader, length) { + ListSinksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CmekSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.sinks && message.sinks.length)) + message.sinks = []; + message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); break; case 2: - message.kmsKeyName = reader.string(); - break; - case 3: - message.serviceAccountId = reader.string(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -6009,324 +6559,322 @@ }; /** - * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CmekSettings.decodeDelimited = function decodeDelimited(reader) { + ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CmekSettings message. + * Verifies a ListSinksResponse message. * @function verify - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CmekSettings.verify = function verify(message) { + ListSinksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) - if (!$util.isString(message.serviceAccountId)) - return "serviceAccountId: string expected"; + if (message.sinks != null && message.hasOwnProperty("sinks")) { + if (!Array.isArray(message.sinks)) + return "sinks: array expected"; + for (var i = 0; i < message.sinks.length; ++i) { + var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); + if (error) + return "sinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse */ - CmekSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CmekSettings) + ListSinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksResponse) return object; - var message = new $root.google.logging.v2.CmekSettings(); - if (object.name != null) - message.name = String(object.name); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.serviceAccountId != null) - message.serviceAccountId = String(object.serviceAccountId); + var message = new $root.google.logging.v2.ListSinksResponse(); + if (object.sinks) { + if (!Array.isArray(object.sinks)) + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); + message.sinks = []; + for (var i = 0; i < object.sinks.length; ++i) { + if (typeof object.sinks[i] !== "object") + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); + message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.CmekSettings} message CmekSettings + * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CmekSettings.toObject = function toObject(message, options) { + ListSinksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.kmsKeyName = ""; - object.serviceAccountId = ""; + if (options.arrays || options.defaults) + object.sinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sinks && message.sinks.length) { + object.sinks = []; + for (var j = 0; j < message.sinks.length; ++j) + object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) - object.serviceAccountId = message.serviceAccountId; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CmekSettings to JSON. + * Converts this ListSinksResponse to JSON. * @function toJSON - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListSinksResponse * @instance * @returns {Object.} JSON object */ - CmekSettings.prototype.toJSON = function toJSON() { + ListSinksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CmekSettings; + return ListSinksResponse; })(); - v2.LoggingServiceV2 = (function() { + v2.GetSinkRequest = (function() { /** - * Constructs a new LoggingServiceV2 service. + * Properties of a GetSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a LoggingServiceV2 - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; - - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.LoggingServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. - */ - LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef DeleteLogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { - return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteLog" }); - - /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef WriteLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + * @interface IGetSinkRequest + * @property {string|null} [sinkName] GetSinkRequest sinkName */ /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - * @returns {undefined} - * @variation 1 + * Constructs a new GetSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetSinkRequest. + * @implements IGetSinkRequest + * @constructor + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set */ - Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { - return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); - }, "name", { value: "WriteLogEntries" }); + function GetSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 + * GetSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.GetSinkRequest * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetSinkRequest.prototype.sinkName = ""; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + * Creates a new GetSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance */ + GetSinkRequest.create = function create(properties) { + return new GetSinkRequest(properties); + }; /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { - return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); - }, "name", { value: "ListLogEntries" }); + GetSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + return writer; + }; /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListMonitoredResourceDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + * Decodes a GetSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - * @returns {undefined} - * @variation 1 + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { - return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); - }, "name", { value: "ListMonitoredResourceDescriptors" }); + GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GetSinkRequest message. + * @function verify + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GetSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + return null; + }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest */ + GetSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSinkRequest) + return object; + var message = new $root.google.logging.v2.GetSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + return message; + }; /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { - return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); - }, "name", { value: "ListLogs" }); + GetSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + return object; + }; /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 + * Converts this GetSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetSinkRequest * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GetSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return LoggingServiceV2; + return GetSinkRequest; })(); - v2.DeleteLogRequest = (function() { + v2.CreateSinkRequest = (function() { /** - * Properties of a DeleteLogRequest. + * Properties of a CreateSinkRequest. * @memberof google.logging.v2 - * @interface IDeleteLogRequest - * @property {string|null} [logName] DeleteLogRequest logName + * @interface ICreateSinkRequest + * @property {string|null} [parent] CreateSinkRequest parent + * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity */ /** - * Constructs a new DeleteLogRequest. + * Constructs a new CreateSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a DeleteLogRequest. - * @implements IDeleteLogRequest + * @classdesc Represents a CreateSinkRequest. + * @implements ICreateSinkRequest * @constructor - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set */ - function DeleteLogRequest(properties) { + function CreateSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6334,75 +6882,101 @@ } /** - * DeleteLogRequest logName. - * @member {string} logName - * @memberof google.logging.v2.DeleteLogRequest + * CreateSinkRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateSinkRequest * @instance */ - DeleteLogRequest.prototype.logName = ""; + CreateSinkRequest.prototype.parent = ""; /** - * Creates a new DeleteLogRequest instance using the specified properties. + * CreateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.sink = null; + + /** + * CreateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance */ - DeleteLogRequest.create = function create(properties) { - return new DeleteLogRequest(properties); + CreateSinkRequest.create = function create(properties) { + return new CreateSinkRequest(properties); }; /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogRequest.encode = function encode(message, writer) { + CreateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); return writer; }; /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. + * Decodes a CreateSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogRequest.decode = function decode(reader, length) { + CreateSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.logName = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); break; default: reader.skipType(tag & 7); @@ -6413,114 +6987,132 @@ }; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { + CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteLogRequest message. + * Verifies a CreateSinkRequest message. * @function verify - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteLogRequest.verify = function verify(message) { + CreateSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; + } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; return null; }; /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest */ - DeleteLogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteLogRequest) + CreateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateSinkRequest) return object; - var message = new $root.google.logging.v2.DeleteLogRequest(); - if (object.logName != null) - message.logName = String(object.logName); + var message = new $root.google.logging.v2.CreateSinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); return message; }; /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest + * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteLogRequest.toObject = function toObject(message, options) { + CreateSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; - var object = {}; - if (options.defaults) - object.logName = ""; - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; return object; }; /** - * Converts this DeleteLogRequest to JSON. + * Converts this CreateSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteLogRequest + * @memberof google.logging.v2.CreateSinkRequest * @instance * @returns {Object.} JSON object */ - DeleteLogRequest.prototype.toJSON = function toJSON() { + CreateSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteLogRequest; + return CreateSinkRequest; })(); - v2.WriteLogEntriesRequest = (function() { + v2.UpdateSinkRequest = (function() { /** - * Properties of a WriteLogEntriesRequest. + * Properties of an UpdateSinkRequest. * @memberof google.logging.v2 - * @interface IWriteLogEntriesRequest - * @property {string|null} [logName] WriteLogEntriesRequest logName - * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource - * @property {Object.|null} [labels] WriteLogEntriesRequest labels - * @property {Array.|null} [entries] WriteLogEntriesRequest entries - * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess - * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun + * @interface IUpdateSinkRequest + * @property {string|null} [sinkName] UpdateSinkRequest sinkName + * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask */ /** - * Constructs a new WriteLogEntriesRequest. + * Constructs a new UpdateSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesRequest. - * @implements IWriteLogEntriesRequest + * @classdesc Represents an UpdateSinkRequest. + * @implements IUpdateSinkRequest * @constructor - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set */ - function WriteLogEntriesRequest(properties) { - this.labels = {}; - this.entries = []; + function UpdateSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6528,149 +7120,114 @@ } /** - * WriteLogEntriesRequest logName. - * @member {string} logName - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.logName = ""; - - /** - * WriteLogEntriesRequest resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.resource = null; - - /** - * WriteLogEntriesRequest labels. - * @member {Object.} labels - * @memberof google.logging.v2.WriteLogEntriesRequest + * UpdateSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - WriteLogEntriesRequest.prototype.labels = $util.emptyObject; + UpdateSinkRequest.prototype.sinkName = ""; /** - * WriteLogEntriesRequest entries. - * @member {Array.} entries - * @memberof google.logging.v2.WriteLogEntriesRequest + * UpdateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - WriteLogEntriesRequest.prototype.entries = $util.emptyArray; + UpdateSinkRequest.prototype.sink = null; /** - * WriteLogEntriesRequest partialSuccess. - * @member {boolean} partialSuccess - * @memberof google.logging.v2.WriteLogEntriesRequest + * UpdateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - WriteLogEntriesRequest.prototype.partialSuccess = false; + UpdateSinkRequest.prototype.uniqueWriterIdentity = false; /** - * WriteLogEntriesRequest dryRun. - * @member {boolean} dryRun - * @memberof google.logging.v2.WriteLogEntriesRequest + * UpdateSinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - WriteLogEntriesRequest.prototype.dryRun = false; + UpdateSinkRequest.prototype.updateMask = null; /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. + * Creates a new UpdateSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance */ - WriteLogEntriesRequest.create = function create(properties) { - return new WriteLogEntriesRequest(properties); + UpdateSinkRequest.create = function create(properties) { + return new UpdateSinkRequest(properties); }; /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesRequest.encode = function encode(message, writer) { + UpdateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.sink != null && message.hasOwnProperty("sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * Decodes an UpdateSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesRequest.decode = function decode(reader, length) { + UpdateSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.logName = reader.string(); + message.sinkName = reader.string(); break; case 2: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); break; case 3: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + message.uniqueWriterIdentity = reader.bool(); break; case 4: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 5: - message.partialSuccess = reader.bool(); - break; - case 6: - message.dryRun = reader.bool(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -6681,185 +7238,142 @@ }; /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesRequest message. + * Verifies an UpdateSinkRequest message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesRequest.verify = function verify(message) { + UpdateSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); if (error) - return "resource." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + return "sink." + error; } - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - if (typeof message.partialSuccess !== "boolean") - return "partialSuccess: boolean expected"; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; return null; }; /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest - */ - WriteLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) - return object; - var message = new $root.google.logging.v2.WriteLogEntriesRequest(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + */ + UpdateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSinkRequest) + return object; + var message = new $root.google.logging.v2.UpdateSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); } - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); - } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.partialSuccess != null) - message.partialSuccess = Boolean(object.partialSuccess); - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); return message; }; /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest + * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesRequest.toObject = function toObject(message, options) { + UpdateSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.logName = ""; - object.resource = null; - object.partialSuccess = false; - object.dryRun = false; - } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + object.sinkName = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + object.updateMask = null; } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - object.partialSuccess = message.partialSuccess; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this WriteLogEntriesRequest to JSON. + * Converts this UpdateSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesRequest + * @memberof google.logging.v2.UpdateSinkRequest * @instance * @returns {Object.} JSON object */ - WriteLogEntriesRequest.prototype.toJSON = function toJSON() { + UpdateSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesRequest; + return UpdateSinkRequest; })(); - v2.WriteLogEntriesResponse = (function() { + v2.DeleteSinkRequest = (function() { /** - * Properties of a WriteLogEntriesResponse. + * Properties of a DeleteSinkRequest. * @memberof google.logging.v2 - * @interface IWriteLogEntriesResponse + * @interface IDeleteSinkRequest + * @property {string|null} [sinkName] DeleteSinkRequest sinkName */ /** - * Constructs a new WriteLogEntriesResponse. + * Constructs a new DeleteSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesResponse. - * @implements IWriteLogEntriesResponse + * @classdesc Represents a DeleteSinkRequest. + * @implements IDeleteSinkRequest * @constructor - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set */ - function WriteLogEntriesResponse(properties) { + function DeleteSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6867,63 +7381,76 @@ } /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. + * DeleteSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.DeleteSinkRequest + * @instance + */ + DeleteSinkRequest.prototype.sinkName = ""; + + /** + * Creates a new DeleteSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance */ - WriteLogEntriesResponse.create = function create(properties) { - return new WriteLogEntriesResponse(properties); + DeleteSinkRequest.create = function create(properties) { + return new DeleteSinkRequest(properties); }; /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesResponse.encode = function encode(message, writer) { + DeleteSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decode = function decode(reader, length) { + DeleteSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -6933,179 +7460,253 @@ }; /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesResponse message. + * Verifies a DeleteSinkRequest message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesResponse.verify = function verify(message) { + DeleteSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; return null; }; /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest */ - WriteLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) + DeleteSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteSinkRequest) return object; - return new $root.google.logging.v2.WriteLogEntriesResponse(); + var message = new $root.google.logging.v2.DeleteSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + return message; }; /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesResponse + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse + * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesResponse.toObject = function toObject() { - return {}; + DeleteSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + return object; + }; + + /** + * Converts this DeleteSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteSinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + return DeleteSinkRequest; + })(); + + v2.LogExclusion = (function() { + + /** + * Properties of a LogExclusion. + * @memberof google.logging.v2 + * @interface ILogExclusion + * @property {string|null} [name] LogExclusion name + * @property {string|null} [description] LogExclusion description + * @property {string|null} [filter] LogExclusion filter + * @property {boolean|null} [disabled] LogExclusion disabled + * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime + */ + + /** + * Constructs a new LogExclusion. + * @memberof google.logging.v2 + * @classdesc Represents a LogExclusion. + * @implements ILogExclusion + * @constructor + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + */ + function LogExclusion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogExclusion name. + * @member {string} name + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.name = ""; + /** - * Converts this WriteLogEntriesResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesResponse + * LogExclusion description. + * @member {string} description + * @memberof google.logging.v2.LogExclusion * @instance - * @returns {Object.} JSON object */ - WriteLogEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WriteLogEntriesResponse; - })(); + LogExclusion.prototype.description = ""; - v2.WriteLogEntriesPartialErrors = (function() { + /** + * LogExclusion filter. + * @member {string} filter + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.filter = ""; /** - * Properties of a WriteLogEntriesPartialErrors. - * @memberof google.logging.v2 - * @interface IWriteLogEntriesPartialErrors - * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors + * LogExclusion disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogExclusion + * @instance */ + LogExclusion.prototype.disabled = false; /** - * Constructs a new WriteLogEntriesPartialErrors. - * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesPartialErrors. - * @implements IWriteLogEntriesPartialErrors - * @constructor - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * LogExclusion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogExclusion + * @instance */ - function WriteLogEntriesPartialErrors(properties) { - this.logEntryErrors = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LogExclusion.prototype.createTime = null; /** - * WriteLogEntriesPartialErrors logEntryErrors. - * @member {Object.} logEntryErrors - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * LogExclusion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogExclusion * @instance */ - WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; + LogExclusion.prototype.updateTime = null; /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. + * Creates a new LogExclusion instance using the specified properties. * @function create - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @returns {google.logging.v2.LogExclusion} LogExclusion instance */ - WriteLogEntriesPartialErrors.create = function create(properties) { - return new WriteLogEntriesPartialErrors(properties); + LogExclusion.create = function create(properties) { + return new LogExclusion(properties); }; /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesPartialErrors.encode = function encode(message, writer) { + LogExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) - for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); - $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { + LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesPartialErrors.decode = function decode(reader, length) { + LogExclusion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.logEntryErrors === $util.emptyObject) - message.logEntryErrors = {}; - key = reader.int32(); - reader.pos++; - message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.disabled = reader.bool(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7116,135 +7717,160 @@ }; /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { + LogExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WriteLogEntriesPartialErrors message. + * Verifies a LogExclusion message. * @function verify - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WriteLogEntriesPartialErrors.verify = function verify(message) { + LogExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { - if (!$util.isObject(message.logEntryErrors)) - return "logEntryErrors: object expected"; - var key = Object.keys(message.logEntryErrors); - for (var i = 0; i < key.length; ++i) { - if (!$util.key32Re.test(key[i])) - return "logEntryErrors: integer key{k:int32} expected"; - { - var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); - if (error) - return "logEntryErrors." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } return null; }; /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors + * @returns {google.logging.v2.LogExclusion} LogExclusion */ - WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) + LogExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogExclusion) return object; - var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); - if (object.logEntryErrors) { - if (typeof object.logEntryErrors !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors = {}; - for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { - if (typeof object.logEntryErrors[keys[i]] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); - } + var message = new $root.google.logging.v2.LogExclusion(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors + * @param {google.logging.v2.LogExclusion} message LogExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { + LogExclusion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.logEntryErrors = {}; - var keys2; - if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { - object.logEntryErrors = {}; - for (var j = 0; j < keys2.length; ++j) - object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); + if (options.defaults) { + object.name = ""; + object.description = ""; + object.filter = ""; + object.disabled = false; + object.createTime = null; + object.updateTime = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this WriteLogEntriesPartialErrors to JSON. + * Converts this LogExclusion to JSON. * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @memberof google.logging.v2.LogExclusion * @instance * @returns {Object.} JSON object */ - WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { + LogExclusion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WriteLogEntriesPartialErrors; + return LogExclusion; })(); - v2.ListLogEntriesRequest = (function() { + v2.ListExclusionsRequest = (function() { /** - * Properties of a ListLogEntriesRequest. + * Properties of a ListExclusionsRequest. * @memberof google.logging.v2 - * @interface IListLogEntriesRequest - * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames - * @property {string|null} [filter] ListLogEntriesRequest filter - * @property {string|null} [orderBy] ListLogEntriesRequest orderBy - * @property {number|null} [pageSize] ListLogEntriesRequest pageSize - * @property {string|null} [pageToken] ListLogEntriesRequest pageToken + * @interface IListExclusionsRequest + * @property {string|null} [parent] ListExclusionsRequest parent + * @property {string|null} [pageToken] ListExclusionsRequest pageToken + * @property {number|null} [pageSize] ListExclusionsRequest pageSize */ /** - * Constructs a new ListLogEntriesRequest. + * Constructs a new ListExclusionsRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesRequest. - * @implements IListLogEntriesRequest + * @classdesc Represents a ListExclusionsRequest. + * @implements IListExclusionsRequest * @constructor - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set */ - function ListLogEntriesRequest(properties) { - this.resourceNames = []; + function ListExclusionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7252,131 +7878,102 @@ } /** - * ListLogEntriesRequest resourceNames. - * @member {Array.} resourceNames - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; - - /** - * ListLogEntriesRequest filter. - * @member {string} filter - * @memberof google.logging.v2.ListLogEntriesRequest + * ListExclusionsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - ListLogEntriesRequest.prototype.filter = ""; + ListExclusionsRequest.prototype.parent = ""; /** - * ListLogEntriesRequest orderBy. - * @member {string} orderBy - * @memberof google.logging.v2.ListLogEntriesRequest + * ListExclusionsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - ListLogEntriesRequest.prototype.orderBy = ""; + ListExclusionsRequest.prototype.pageToken = ""; /** - * ListLogEntriesRequest pageSize. + * ListExclusionsRequest pageSize. * @member {number} pageSize - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.pageSize = 0; - - /** - * ListLogEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - ListLogEntriesRequest.prototype.pageToken = ""; + ListExclusionsRequest.prototype.pageSize = 0; /** - * Creates a new ListLogEntriesRequest instance using the specified properties. + * Creates a new ListExclusionsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance */ - ListLogEntriesRequest.create = function create(properties) { - return new ListLogEntriesRequest(properties); + ListExclusionsRequest.create = function create(properties) { + return new ListExclusionsRequest(properties); }; /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesRequest.encode = function encode(message, writer) { + ListExclusionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. + * Decodes a ListExclusionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decode = function decode(reader, length) { + ListExclusionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); + case 1: + message.parent = reader.string(); break; case 2: - message.filter = reader.string(); + message.pageToken = reader.string(); break; case 3: - message.orderBy = reader.string(); - break; - case 4: message.pageSize = reader.int32(); break; - case 5: - message.pageToken = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -7386,155 +7983,126 @@ }; /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogEntriesRequest message. + * Verifies a ListExclusionsRequest message. * @function verify - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogEntriesRequest.verify = function verify(message) { + ListExclusionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) - if (!$util.isString(message.resourceNames[i])) - return "resourceNames: string[] expected"; - } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest */ - ListLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) + ListExclusionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsRequest) return object; - var message = new $root.google.logging.v2.ListLogEntriesRequest(); - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) - message.resourceNames[i] = String(object.resourceNames[i]); - } - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.ListExclusionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); if (object.pageToken != null) message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest + * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogEntriesRequest.toObject = function toObject(message, options) { + ListExclusionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.resourceNames = []; if (options.defaults) { - object.filter = ""; - object.orderBy = ""; - object.pageSize = 0; + object.parent = ""; object.pageToken = ""; + object.pageSize = 0; } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = message.resourceNames[j]; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this ListLogEntriesRequest to JSON. + * Converts this ListExclusionsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogEntriesRequest + * @memberof google.logging.v2.ListExclusionsRequest * @instance * @returns {Object.} JSON object */ - ListLogEntriesRequest.prototype.toJSON = function toJSON() { + ListExclusionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogEntriesRequest; + return ListExclusionsRequest; })(); - v2.ListLogEntriesResponse = (function() { + v2.ListExclusionsResponse = (function() { /** - * Properties of a ListLogEntriesResponse. + * Properties of a ListExclusionsResponse. * @memberof google.logging.v2 - * @interface IListLogEntriesResponse - * @property {Array.|null} [entries] ListLogEntriesResponse entries - * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken + * @interface IListExclusionsResponse + * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions + * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken */ /** - * Constructs a new ListLogEntriesResponse. + * Constructs a new ListExclusionsResponse. * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesResponse. - * @implements IListLogEntriesResponse + * @classdesc Represents a ListExclusionsResponse. + * @implements IListExclusionsResponse * @constructor - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set */ - function ListLogEntriesResponse(properties) { - this.entries = []; + function ListExclusionsResponse(properties) { + this.exclusions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7542,88 +8110,88 @@ } /** - * ListLogEntriesResponse entries. - * @member {Array.} entries - * @memberof google.logging.v2.ListLogEntriesResponse + * ListExclusionsResponse exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.ListExclusionsResponse * @instance */ - ListLogEntriesResponse.prototype.entries = $util.emptyArray; + ListExclusionsResponse.prototype.exclusions = $util.emptyArray; /** - * ListLogEntriesResponse nextPageToken. + * ListExclusionsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @instance */ - ListLogEntriesResponse.prototype.nextPageToken = ""; + ListExclusionsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListLogEntriesResponse instance using the specified properties. + * Creates a new ListExclusionsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance */ - ListLogEntriesResponse.create = function create(properties) { - return new ListLogEntriesResponse(properties); + ListExclusionsResponse.create = function create(properties) { + return new ListExclusionsResponse(properties); }; /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesResponse.encode = function encode(message, writer) { + ListExclusionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * Decodes a ListExclusionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesResponse.decode = function decode(reader, length) { + ListExclusionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -7637,39 +8205,39 @@ }; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogEntriesResponse message. + * Verifies a ListExclusionsResponse message. * @function verify - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogEntriesResponse.verify = function verify(message) { + ListExclusionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); if (error) - return "entries." + error; + return "exclusions." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -7679,25 +8247,25 @@ }; /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse */ - ListLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) + ListExclusionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsResponse) return object; - var message = new $root.google.logging.v2.ListLogEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + var message = new $root.google.logging.v2.ListExclusionsResponse(); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); } } if (object.nextPageToken != null) @@ -7706,26 +8274,26 @@ }; /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse + * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogEntriesResponse.toObject = function toObject(message, options) { + ListExclusionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.entries = []; + object.exclusions = []; if (options.defaults) object.nextPageToken = ""; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -7733,38 +8301,37 @@ }; /** - * Converts this ListLogEntriesResponse to JSON. + * Converts this ListExclusionsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogEntriesResponse + * @memberof google.logging.v2.ListExclusionsResponse * @instance * @returns {Object.} JSON object */ - ListLogEntriesResponse.prototype.toJSON = function toJSON() { + ListExclusionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogEntriesResponse; + return ListExclusionsResponse; })(); - v2.ListMonitoredResourceDescriptorsRequest = (function() { + v2.GetExclusionRequest = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsRequest. + * Properties of a GetExclusionRequest. * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsRequest - * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken + * @interface IGetExclusionRequest + * @property {string|null} [name] GetExclusionRequest name */ /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new GetExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. - * @implements IListMonitoredResourceDescriptorsRequest + * @classdesc Represents a GetExclusionRequest. + * @implements IGetExclusionRequest * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsRequest(properties) { + function GetExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7772,88 +8339,75 @@ } /** - * ListMonitoredResourceDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; - - /** - * ListMonitoredResourceDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * GetExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.GetExclusionRequest * @instance */ - ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + GetExclusionRequest.prototype.name = ""; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new GetExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance */ - ListMonitoredResourceDescriptorsRequest.create = function create(properties) { - return new ListMonitoredResourceDescriptorsRequest(properties); + GetExclusionRequest.create = function create(properties) { + return new GetExclusionRequest(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { + GetExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a GetExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { + GetExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.pageSize = reader.int32(); - break; - case 2: - message.pageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -7864,118 +8418,108 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a GetExclusionRequest message. * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + GetExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest */ - ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) + GetExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetExclusionRequest) return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.logging.v2.GetExclusionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest + * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { + GetExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this GetExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @memberof google.logging.v2.GetExclusionRequest * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { + GetExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsRequest; + return GetExclusionRequest; })(); - v2.ListMonitoredResourceDescriptorsResponse = (function() { + v2.CreateExclusionRequest = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsResponse. + * Properties of a CreateExclusionRequest. * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsResponse - * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors - * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken + * @interface ICreateExclusionRequest + * @property {string|null} [parent] CreateExclusionRequest parent + * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion */ /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new CreateExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. - * @implements IListMonitoredResourceDescriptorsResponse + * @classdesc Represents a CreateExclusionRequest. + * @implements ICreateExclusionRequest * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsResponse(properties) { - this.resourceDescriptors = []; + function CreateExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7983,91 +8527,88 @@ } /** - * ListMonitoredResourceDescriptorsResponse resourceDescriptors. - * @member {Array.} resourceDescriptors - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * CreateExclusionRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateExclusionRequest * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; + CreateExclusionRequest.prototype.parent = ""; /** - * ListMonitoredResourceDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * CreateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.CreateExclusionRequest * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; + CreateExclusionRequest.prototype.exclusion = null; /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * Creates a new CreateExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance */ - ListMonitoredResourceDescriptorsResponse.create = function create(properties) { - return new ListMonitoredResourceDescriptorsResponse(properties); + CreateExclusionRequest.create = function create(properties) { + return new CreateExclusionRequest(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { + CreateExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceDescriptors != null && message.resourceDescriptors.length) - for (var i = 0; i < message.resourceDescriptors.length; ++i) - $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a CreateExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { + CreateExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.resourceDescriptors && message.resourceDescriptors.length)) - message.resourceDescriptors = []; - message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8078,135 +8619,123 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a CreateExclusionRequest message. * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { + CreateExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { - if (!Array.isArray(message.resourceDescriptors)) - return "resourceDescriptors: array expected"; - for (var i = 0; i < message.resourceDescriptors.length; ++i) { - var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); - if (error) - return "resourceDescriptors." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest */ - ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) + CreateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateExclusionRequest) return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); - if (object.resourceDescriptors) { - if (!Array.isArray(object.resourceDescriptors)) - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); - message.resourceDescriptors = []; - for (var i = 0; i < object.resourceDescriptors.length; ++i) { - if (typeof object.resourceDescriptors[i] !== "object") - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); - message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); - } + var message = new $root.google.logging.v2.CreateExclusionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse + * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { + CreateExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.resourceDescriptors = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.resourceDescriptors && message.resourceDescriptors.length) { - object.resourceDescriptors = []; - for (var j = 0; j < message.resourceDescriptors.length; ++j) - object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); + if (options.defaults) { + object.parent = ""; + object.exclusion = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); return object; }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this CreateExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @memberof google.logging.v2.CreateExclusionRequest * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { + CreateExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsResponse; + return CreateExclusionRequest; })(); - v2.ListLogsRequest = (function() { + v2.UpdateExclusionRequest = (function() { /** - * Properties of a ListLogsRequest. + * Properties of an UpdateExclusionRequest. * @memberof google.logging.v2 - * @interface IListLogsRequest - * @property {string|null} [parent] ListLogsRequest parent - * @property {number|null} [pageSize] ListLogsRequest pageSize - * @property {string|null} [pageToken] ListLogsRequest pageToken + * @interface IUpdateExclusionRequest + * @property {string|null} [name] UpdateExclusionRequest name + * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask */ /** - * Constructs a new ListLogsRequest. + * Constructs a new UpdateExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogsRequest. - * @implements IListLogsRequest + * @classdesc Represents an UpdateExclusionRequest. + * @implements IUpdateExclusionRequest * @constructor - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set */ - function ListLogsRequest(properties) { + function UpdateExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8214,101 +8743,101 @@ } /** - * ListLogsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListLogsRequest + * UpdateExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - ListLogsRequest.prototype.parent = ""; + UpdateExclusionRequest.prototype.name = ""; /** - * ListLogsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogsRequest + * UpdateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - ListLogsRequest.prototype.pageSize = 0; + UpdateExclusionRequest.prototype.exclusion = null; /** - * ListLogsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogsRequest + * UpdateExclusionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - ListLogsRequest.prototype.pageToken = ""; + UpdateExclusionRequest.prototype.updateMask = null; /** - * Creates a new ListLogsRequest instance using the specified properties. + * Creates a new UpdateExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance */ - ListLogsRequest.create = function create(properties) { - return new ListLogsRequest(properties); + UpdateExclusionRequest.create = function create(properties) { + return new UpdateExclusionRequest(properties); }; /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsRequest.encode = function encode(message, writer) { + UpdateExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogsRequest message from the specified reader or buffer. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsRequest.decode = function decode(reader, length) { + UpdateExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); break; case 3: - message.pageToken = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8319,126 +8848,134 @@ }; /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogsRequest message. + * Verifies an UpdateExclusionRequest message. * @function verify - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogsRequest.verify = function verify(message) { + UpdateExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest */ - ListLogsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsRequest) + UpdateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) return object; - var message = new $root.google.logging.v2.ListLogsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.logging.v2.UpdateExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @static - * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest + * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogsRequest.toObject = function toObject(message, options) { + UpdateExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.exclusion = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListLogsRequest to JSON. + * Converts this UpdateExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogsRequest + * @memberof google.logging.v2.UpdateExclusionRequest * @instance * @returns {Object.} JSON object */ - ListLogsRequest.prototype.toJSON = function toJSON() { + UpdateExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogsRequest; + return UpdateExclusionRequest; })(); - v2.ListLogsResponse = (function() { + v2.DeleteExclusionRequest = (function() { /** - * Properties of a ListLogsResponse. + * Properties of a DeleteExclusionRequest. * @memberof google.logging.v2 - * @interface IListLogsResponse - * @property {Array.|null} [logNames] ListLogsResponse logNames - * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken + * @interface IDeleteExclusionRequest + * @property {string|null} [name] DeleteExclusionRequest name */ /** - * Constructs a new ListLogsResponse. + * Constructs a new DeleteExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogsResponse. - * @implements IListLogsResponse + * @classdesc Represents a DeleteExclusionRequest. + * @implements IDeleteExclusionRequest * @constructor - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set */ - function ListLogsResponse(properties) { - this.logNames = []; + function DeleteExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8446,91 +8983,75 @@ } /** - * ListLogsResponse logNames. - * @member {Array.} logNames - * @memberof google.logging.v2.ListLogsResponse - * @instance - */ - ListLogsResponse.prototype.logNames = $util.emptyArray; - - /** - * ListLogsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogsResponse + * DeleteExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteExclusionRequest * @instance */ - ListLogsResponse.prototype.nextPageToken = ""; + DeleteExclusionRequest.prototype.name = ""; /** - * Creates a new ListLogsResponse instance using the specified properties. + * Creates a new DeleteExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance */ - ListLogsResponse.create = function create(properties) { - return new ListLogsResponse(properties); + DeleteExclusionRequest.create = function create(properties) { + return new DeleteExclusionRequest(properties); }; /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsResponse.encode = function encode(message, writer) { + DeleteExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.logNames != null && message.logNames.length) - for (var i = 0; i < message.logNames.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogsResponse message from the specified reader or buffer. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsResponse.decode = function decode(reader, length) { + DeleteExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.logNames && message.logNames.length)) - message.logNames = []; - message.logNames.push(reader.string()); - break; - case 2: - message.nextPageToken = reader.string(); + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -8541,792 +9062,296 @@ }; /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogsResponse message. + * Verifies a DeleteExclusionRequest message. * @function verify - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogsResponse.verify = function verify(message) { + DeleteExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logNames != null && message.hasOwnProperty("logNames")) { - if (!Array.isArray(message.logNames)) - return "logNames: array expected"; - for (var i = 0; i < message.logNames.length; ++i) - if (!$util.isString(message.logNames[i])) - return "logNames: string[] expected"; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest */ - ListLogsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsResponse) + DeleteExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) return object; - var message = new $root.google.logging.v2.ListLogsResponse(); - if (object.logNames) { - if (!Array.isArray(object.logNames)) - throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); - message.logNames = []; - for (var i = 0; i < object.logNames.length; ++i) - message.logNames[i] = String(object.logNames[i]); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.DeleteExclusionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogsResponse + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse + * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogsResponse.toObject = function toObject(message, options) { + DeleteExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.logNames = []; if (options.defaults) - object.nextPageToken = ""; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.logNames && message.logNames.length) { - object.logNames = []; - for (var j = 0; j < message.logNames.length; ++j) - object.logNames[j] = message.logNames[j]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListLogsResponse to JSON. + * Converts this DeleteExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogsResponse - * @instance - * @returns {Object.} JSON object - */ - ListLogsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListLogsResponse; - })(); - - v2.LogEntry = (function() { - - /** - * Properties of a LogEntry. - * @memberof google.logging.v2 - * @interface ILogEntry - * @property {string|null} [logName] LogEntry logName - * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource - * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload - * @property {string|null} [textPayload] LogEntry textPayload - * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload - * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp - * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp - * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity - * @property {string|null} [insertId] LogEntry insertId - * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest - * @property {Object.|null} [labels] LogEntry labels - * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation - * @property {string|null} [trace] LogEntry trace - * @property {string|null} [spanId] LogEntry spanId - * @property {boolean|null} [traceSampled] LogEntry traceSampled - * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation - */ - - /** - * Constructs a new LogEntry. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntry. - * @implements ILogEntry - * @constructor - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set - */ - function LogEntry(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LogEntry logName. - * @member {string} logName - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.logName = ""; - - /** - * LogEntry resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.resource = null; - - /** - * LogEntry protoPayload. - * @member {google.protobuf.IAny|null|undefined} protoPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.protoPayload = null; - - /** - * LogEntry textPayload. - * @member {string} textPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.textPayload = ""; - - /** - * LogEntry jsonPayload. - * @member {google.protobuf.IStruct|null|undefined} jsonPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.jsonPayload = null; - - /** - * LogEntry timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.timestamp = null; - - /** - * LogEntry receiveTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.receiveTimestamp = null; - - /** - * LogEntry severity. - * @member {google.logging.type.LogSeverity} severity - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.severity = 0; - - /** - * LogEntry insertId. - * @member {string} insertId - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.insertId = ""; - - /** - * LogEntry httpRequest. - * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.httpRequest = null; - - /** - * LogEntry labels. - * @member {Object.} labels - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.labels = $util.emptyObject; - - /** - * LogEntry operation. - * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.operation = null; - - /** - * LogEntry trace. - * @member {string} trace - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.trace = ""; - - /** - * LogEntry spanId. - * @member {string} spanId - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.spanId = ""; - - /** - * LogEntry traceSampled. - * @member {boolean} traceSampled - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.DeleteExclusionRequest * @instance + * @returns {Object.} JSON object */ - LogEntry.prototype.traceSampled = false; + DeleteExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteExclusionRequest; + })(); + + v2.GetCmekSettingsRequest = (function() { /** - * LogEntry sourceLocation. - * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation - * @memberof google.logging.v2.LogEntry - * @instance + * Properties of a GetCmekSettingsRequest. + * @memberof google.logging.v2 + * @interface IGetCmekSettingsRequest + * @property {string|null} [name] GetCmekSettingsRequest name */ - LogEntry.prototype.sourceLocation = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new GetCmekSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetCmekSettingsRequest. + * @implements IGetCmekSettingsRequest + * @constructor + * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + */ + function GetCmekSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * LogEntry payload. - * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload - * @memberof google.logging.v2.LogEntry + * GetCmekSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.GetCmekSettingsRequest * @instance */ - Object.defineProperty(LogEntry.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetCmekSettingsRequest.prototype.name = ""; /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new GetCmekSettingsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.GetCmekSettingsRequest * @static - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set - * @returns {google.logging.v2.LogEntry} LogEntry instance + * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest instance */ - LogEntry.create = function create(properties) { - return new LogEntry(properties); + GetCmekSettingsRequest.create = function create(properties) { + return new GetCmekSettingsRequest(properties); }; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.GetCmekSettingsRequest * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encode = function encode(message, writer) { + GetCmekSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) - $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textPayload != null && message.hasOwnProperty("textPayload")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); - if (message.insertId != null && message.hasOwnProperty("insertId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) - $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.severity != null && message.hasOwnProperty("severity")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.logName != null && message.hasOwnProperty("logName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); - if (message.operation != null && message.hasOwnProperty("operation")) - $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.trace != null && message.hasOwnProperty("trace")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.spanId != null && message.hasOwnProperty("spanId")) - writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.GetCmekSettingsRequest * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + GetCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.GetCmekSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntry} LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 12: - message.logName = reader.string(); - break; - case 8: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 2: - message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.textPayload = reader.string(); - break; - case 6: - message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 9: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 24: - message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.severity = reader.int32(); - break; - case 4: - message.insertId = reader.string(); - break; - case 7: - message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); - break; - case 11: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); - break; - case 15: - message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); - break; - case 22: - message.trace = reader.string(); - break; - case 27: - message.spanId = reader.string(); - break; - case 30: - message.traceSampled = reader.bool(); - break; - case 23: - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntry} LogEntry + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decodeDelimited = function decodeDelimited(reader) { + GetCmekSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogEntry message. - * @function verify - * @memberof google.logging.v2.LogEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - properties.payload = 1; - { - var error = $root.google.protobuf.Any.verify(message.protoPayload); - if (error) - return "protoPayload." + error; - } - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - if (!$util.isString(message.textPayload)) - return "textPayload: string expected"; - } - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - { - var error = $root.google.protobuf.Struct.verify(message.jsonPayload); - if (error) - return "jsonPayload." + error; - } - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); - if (error) - return "receiveTimestamp." + error; - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetCmekSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; default: - return "severity: enum value expected"; - case 0: - case 100: - case 200: - case 300: - case 400: - case 500: - case 600: - case 700: - case 800: + reader.skipType(tag & 7); break; } - if (message.insertId != null && message.hasOwnProperty("insertId")) - if (!$util.isString(message.insertId)) - return "insertId: string expected"; - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { - var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); - if (error) - return "httpRequest." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.operation != null && message.hasOwnProperty("operation")) { - var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); - if (error) - return "operation." + error; - } - if (message.trace != null && message.hasOwnProperty("trace")) - if (!$util.isString(message.trace)) - return "trace: string expected"; - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!$util.isString(message.spanId)) - return "spanId: string expected"; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - if (typeof message.traceSampled !== "boolean") - return "traceSampled: boolean expected"; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { - var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); - if (error) - return "sourceLocation." + error; } - return null; + return message; }; /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogEntry + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetCmekSettingsRequest * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntry} LogEntry + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntry) - return object; - var message = new $root.google.logging.v2.LogEntry(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.protoPayload != null) { - if (typeof object.protoPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); - message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); - } - if (object.textPayload != null) - message.textPayload = String(object.textPayload); - if (object.jsonPayload != null) { - if (typeof object.jsonPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); - message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.receiveTimestamp != null) { - if (typeof object.receiveTimestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); - message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); - } - switch (object.severity) { - case "DEFAULT": - case 0: - message.severity = 0; - break; - case "DEBUG": - case 100: - message.severity = 100; - break; - case "INFO": - case 200: - message.severity = 200; - break; - case "NOTICE": - case 300: - message.severity = 300; - break; - case "WARNING": - case 400: - message.severity = 400; - break; - case "ERROR": - case 500: - message.severity = 500; - break; - case "CRITICAL": - case 600: - message.severity = 600; - break; - case "ALERT": - case 700: - message.severity = 700; - break; - case "EMERGENCY": - case 800: - message.severity = 800; - break; - } - if (object.insertId != null) - message.insertId = String(object.insertId); - if (object.httpRequest != null) { - if (typeof object.httpRequest !== "object") - throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); - message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.operation != null) { - if (typeof object.operation !== "object") - throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); - message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); - } - if (object.trace != null) - message.trace = String(object.trace); - if (object.spanId != null) - message.spanId = String(object.spanId); - if (object.traceSampled != null) - message.traceSampled = Boolean(object.traceSampled); - if (object.sourceLocation != null) { - if (typeof object.sourceLocation !== "object") - throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); - } - return message; + GetCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogEntry + * Verifies a GetCmekSettingsRequest message. + * @function verify + * @memberof google.logging.v2.GetCmekSettingsRequest * @static - * @param {google.logging.v2.LogEntry} message LogEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.insertId = ""; - object.httpRequest = null; - object.resource = null; - object.timestamp = null; - object.severity = options.enums === String ? "DEFAULT" : 0; - object.logName = ""; - object.operation = null; - object.trace = ""; - object.sourceLocation = null; - object.receiveTimestamp = null; - object.spanId = ""; - object.traceSampled = false; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); - if (options.oneofs) - object.payload = "protoPayload"; - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - object.textPayload = message.textPayload; - if (options.oneofs) - object.payload = "textPayload"; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - object.insertId = message.insertId; - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); - if (options.oneofs) - object.payload = "jsonPayload"; - } - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); - if (message.trace != null && message.hasOwnProperty("trace")) - object.trace = message.trace; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = message.spanId; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - object.traceSampled = message.traceSampled; + GetCmekSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + */ + GetCmekSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetCmekSettingsRequest) + return object; + var message = new $root.google.logging.v2.GetCmekSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.GetCmekSettingsRequest} message GetCmekSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCmekSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this LogEntry to JSON. + * Converts this GetCmekSettingsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogEntry + * @memberof google.logging.v2.GetCmekSettingsRequest * @instance * @returns {Object.} JSON object */ - LogEntry.prototype.toJSON = function toJSON() { + GetCmekSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogEntry; + return GetCmekSettingsRequest; })(); - v2.LogEntryOperation = (function() { + v2.UpdateCmekSettingsRequest = (function() { /** - * Properties of a LogEntryOperation. + * Properties of an UpdateCmekSettingsRequest. * @memberof google.logging.v2 - * @interface ILogEntryOperation - * @property {string|null} [id] LogEntryOperation id - * @property {string|null} [producer] LogEntryOperation producer - * @property {boolean|null} [first] LogEntryOperation first - * @property {boolean|null} [last] LogEntryOperation last + * @interface IUpdateCmekSettingsRequest + * @property {string|null} [name] UpdateCmekSettingsRequest name + * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] UpdateCmekSettingsRequest cmekSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmekSettingsRequest updateMask */ /** - * Constructs a new LogEntryOperation. + * Constructs a new UpdateCmekSettingsRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogEntryOperation. - * @implements ILogEntryOperation + * @classdesc Represents an UpdateCmekSettingsRequest. + * @implements IUpdateCmekSettingsRequest * @constructor - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set */ - function LogEntryOperation(properties) { + function UpdateCmekSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9334,114 +9359,101 @@ } /** - * LogEntryOperation id. - * @member {string} id - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.id = ""; - - /** - * LogEntryOperation producer. - * @member {string} producer - * @memberof google.logging.v2.LogEntryOperation + * UpdateCmekSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @instance */ - LogEntryOperation.prototype.producer = ""; + UpdateCmekSettingsRequest.prototype.name = ""; /** - * LogEntryOperation first. - * @member {boolean} first - * @memberof google.logging.v2.LogEntryOperation + * UpdateCmekSettingsRequest cmekSettings. + * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @instance */ - LogEntryOperation.prototype.first = false; + UpdateCmekSettingsRequest.prototype.cmekSettings = null; /** - * LogEntryOperation last. - * @member {boolean} last - * @memberof google.logging.v2.LogEntryOperation + * UpdateCmekSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @instance */ - LogEntryOperation.prototype.last = false; + UpdateCmekSettingsRequest.prototype.updateMask = null; /** - * Creates a new LogEntryOperation instance using the specified properties. + * Creates a new UpdateCmekSettingsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @static - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance + * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest instance */ - LogEntryOperation.create = function create(properties) { - return new LogEntryOperation(properties); + UpdateCmekSettingsRequest.create = function create(properties) { + return new UpdateCmekSettingsRequest(properties); }; /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntryOperation.encode = function encode(message, writer) { + UpdateCmekSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.producer != null && message.hasOwnProperty("producer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); - if (message.first != null && message.hasOwnProperty("first")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); - if (message.last != null && message.hasOwnProperty("last")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) + $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode + * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { + UpdateCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntryOperation message from the specified reader or buffer. + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntryOperation.decode = function decode(reader, length) { + UpdateCmekSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.name = reader.string(); break; case 2: - message.producer = reader.string(); + message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); break; case 3: - message.first = reader.bool(); - break; - case 4: - message.last = reader.bool(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9452,134 +9464,136 @@ }; /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { + UpdateCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogEntryOperation message. + * Verifies an UpdateCmekSettingsRequest message. * @function verify - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntryOperation.verify = function verify(message) { + UpdateCmekSettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.producer != null && message.hasOwnProperty("producer")) - if (!$util.isString(message.producer)) - return "producer: string expected"; - if (message.first != null && message.hasOwnProperty("first")) - if (typeof message.first !== "boolean") - return "first: boolean expected"; - if (message.last != null && message.hasOwnProperty("last")) - if (typeof message.last !== "boolean") - return "last: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { + var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); + if (error) + return "cmekSettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest */ - LogEntryOperation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntryOperation) + UpdateCmekSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateCmekSettingsRequest) return object; - var message = new $root.google.logging.v2.LogEntryOperation(); - if (object.id != null) - message.id = String(object.id); - if (object.producer != null) - message.producer = String(object.producer); - if (object.first != null) - message.first = Boolean(object.first); - if (object.last != null) - message.last = Boolean(object.last); + var message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cmekSettings != null) { + if (typeof object.cmekSettings !== "object") + throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.cmekSettings: object expected"); + message.cmekSettings = $root.google.logging.v2.CmekSettings.fromObject(object.cmekSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @static - * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation + * @param {google.logging.v2.UpdateCmekSettingsRequest} message UpdateCmekSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntryOperation.toObject = function toObject(message, options) { + UpdateCmekSettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.id = ""; - object.producer = ""; - object.first = false; - object.last = false; + object.name = ""; + object.cmekSettings = null; + object.updateMask = null; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.producer != null && message.hasOwnProperty("producer")) - object.producer = message.producer; - if (message.first != null && message.hasOwnProperty("first")) - object.first = message.first; - if (message.last != null && message.hasOwnProperty("last")) - object.last = message.last; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) + object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this LogEntryOperation to JSON. + * Converts this UpdateCmekSettingsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogEntryOperation + * @memberof google.logging.v2.UpdateCmekSettingsRequest * @instance * @returns {Object.} JSON object */ - LogEntryOperation.prototype.toJSON = function toJSON() { + UpdateCmekSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogEntryOperation; + return UpdateCmekSettingsRequest; })(); - v2.LogEntrySourceLocation = (function() { + v2.CmekSettings = (function() { /** - * Properties of a LogEntrySourceLocation. + * Properties of a CmekSettings. * @memberof google.logging.v2 - * @interface ILogEntrySourceLocation - * @property {string|null} [file] LogEntrySourceLocation file - * @property {number|Long|null} [line] LogEntrySourceLocation line - * @property {string|null} ["function"] LogEntrySourceLocation function + * @interface ICmekSettings + * @property {string|null} [name] CmekSettings name + * @property {string|null} [kmsKeyName] CmekSettings kmsKeyName + * @property {string|null} [serviceAccountId] CmekSettings serviceAccountId */ /** - * Constructs a new LogEntrySourceLocation. + * Constructs a new CmekSettings. * @memberof google.logging.v2 - * @classdesc Represents a LogEntrySourceLocation. - * @implements ILogEntrySourceLocation + * @classdesc Represents a CmekSettings. + * @implements ICmekSettings * @constructor - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set */ - function LogEntrySourceLocation(properties) { + function CmekSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9587,101 +9601,101 @@ } /** - * LogEntrySourceLocation file. - * @member {string} file - * @memberof google.logging.v2.LogEntrySourceLocation + * CmekSettings name. + * @member {string} name + * @memberof google.logging.v2.CmekSettings * @instance */ - LogEntrySourceLocation.prototype.file = ""; + CmekSettings.prototype.name = ""; /** - * LogEntrySourceLocation line. - * @member {number|Long} line - * @memberof google.logging.v2.LogEntrySourceLocation + * CmekSettings kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.logging.v2.CmekSettings * @instance */ - LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CmekSettings.prototype.kmsKeyName = ""; /** - * LogEntrySourceLocation function. - * @member {string} function - * @memberof google.logging.v2.LogEntrySourceLocation + * CmekSettings serviceAccountId. + * @member {string} serviceAccountId + * @memberof google.logging.v2.CmekSettings * @instance */ - LogEntrySourceLocation.prototype["function"] = ""; + CmekSettings.prototype.serviceAccountId = ""; /** - * Creates a new LogEntrySourceLocation instance using the specified properties. + * Creates a new CmekSettings instance using the specified properties. * @function create - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @static - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance + * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + * @returns {google.logging.v2.CmekSettings} CmekSettings instance */ - LogEntrySourceLocation.create = function create(properties) { - return new LogEntrySourceLocation(properties); + CmekSettings.create = function create(properties) { + return new CmekSettings(properties); }; /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntrySourceLocation.encode = function encode(message, writer) { + CmekSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.file != null && message.hasOwnProperty("file")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); - if (message.line != null && message.hasOwnProperty("line")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); - if (message["function"] != null && message.hasOwnProperty("function")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountId); return writer; }; /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode + * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { + CmekSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * Decodes a CmekSettings message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @returns {google.logging.v2.CmekSettings} CmekSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntrySourceLocation.decode = function decode(reader, length) { + CmekSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CmekSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.file = reader.string(); + message.name = reader.string(); break; case 2: - message.line = reader.int64(); + message.kmsKeyName = reader.string(); break; case 3: - message["function"] = reader.string(); + message.serviceAccountId = reader.string(); break; default: reader.skipType(tag & 7); @@ -9692,118 +9706,104 @@ }; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * Decodes a CmekSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @returns {google.logging.v2.CmekSettings} CmekSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { + CmekSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogEntrySourceLocation message. + * Verifies a CmekSettings message. * @function verify - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntrySourceLocation.verify = function verify(message) { + CmekSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) - if (!$util.isString(message.file)) - return "file: string expected"; - if (message.line != null && message.hasOwnProperty("line")) - if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) - return "line: integer|Long expected"; - if (message["function"] != null && message.hasOwnProperty("function")) - if (!$util.isString(message["function"])) - return "function: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + if (!$util.isString(message.serviceAccountId)) + return "serviceAccountId: string expected"; return null; }; /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation + * @returns {google.logging.v2.CmekSettings} CmekSettings */ - LogEntrySourceLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) + CmekSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CmekSettings) return object; - var message = new $root.google.logging.v2.LogEntrySourceLocation(); - if (object.file != null) - message.file = String(object.file); - if (object.line != null) - if ($util.Long) - (message.line = $util.Long.fromValue(object.line)).unsigned = false; - else if (typeof object.line === "string") - message.line = parseInt(object.line, 10); - else if (typeof object.line === "number") - message.line = object.line; - else if (typeof object.line === "object") - message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); - if (object["function"] != null) - message["function"] = String(object["function"]); + var message = new $root.google.logging.v2.CmekSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.serviceAccountId != null) + message.serviceAccountId = String(object.serviceAccountId); return message; }; /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @static - * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation + * @param {google.logging.v2.CmekSettings} message CmekSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntrySourceLocation.toObject = function toObject(message, options) { + CmekSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.file = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.line = options.longs === String ? "0" : 0; - object["function"] = ""; + object.name = ""; + object.kmsKeyName = ""; + object.serviceAccountId = ""; } - if (message.file != null && message.hasOwnProperty("file")) - object.file = message.file; - if (message.line != null && message.hasOwnProperty("line")) - if (typeof message.line === "number") - object.line = options.longs === String ? String(message.line) : message.line; - else - object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; - if (message["function"] != null && message.hasOwnProperty("function")) - object["function"] = message["function"]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + object.serviceAccountId = message.serviceAccountId; return object; }; /** - * Converts this LogEntrySourceLocation to JSON. + * Converts this CmekSettings to JSON. * @function toJSON - * @memberof google.logging.v2.LogEntrySourceLocation + * @memberof google.logging.v2.CmekSettings * @instance * @returns {Object.} JSON object */ - LogEntrySourceLocation.prototype.toJSON = function toJSON() { + CmekSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogEntrySourceLocation; + return CmekSettings; })(); v2.MetricsServiceV2 = (function() { @@ -12348,30 +12348,30 @@ return values; })(); - api.ResourceDescriptor = (function() { + api.MonitoredResourceDescriptor = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a MonitoredResourceDescriptor. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new MonitoredResourceDescriptor. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function MonitoredResourceDescriptor(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12379,143 +12379,143 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ResourceDescriptor.prototype.type = ""; + MonitoredResourceDescriptor.prototype.name = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + MonitoredResourceDescriptor.prototype.type = ""; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ResourceDescriptor.prototype.nameField = ""; + MonitoredResourceDescriptor.prototype.displayName = ""; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ResourceDescriptor.prototype.history = 0; + MonitoredResourceDescriptor.prototype.description = ""; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ResourceDescriptor.prototype.plural = ""; + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ResourceDescriptor.prototype.singular = ""; + MonitoredResourceDescriptor.prototype.launchStage = 0; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + MonitoredResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && message.hasOwnProperty("nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && message.hasOwnProperty("history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && message.hasOwnProperty("plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && message.hasOwnProperty("singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + MonitoredResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; case 1: message.type = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.displayName = reader.string(); break; case 3: - message.nameField = reader.string(); + message.description = reader.string(); break; case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); break; - case 6: - message.singular = reader.string(); + case 7: + message.launchStage = reader.int32(); break; default: reader.skipType(tag & 7); @@ -12526,196 +12526,201 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a MonitoredResourceDescriptor message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + MonitoredResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { default: - return "history: enum value expected"; + return "launchStage: enum value expected"; case 0: case 1: case 2: + case 3: + case 4: + case 5: break; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) return object; - var message = new $root.google.api.ResourceDescriptor(); + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); if (object.type != null) message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": case 0: - message.history = 0; + message.launchStage = 0; break; - case "ORIGINALLY_SINGLE_PATTERN": + case "EARLY_ACCESS": case 1: - message.history = 1; + message.launchStage = 1; break; - case "FUTURE_MULTI_PATTERN": + case "ALPHA": case 2: - message.history = 2; + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; break; } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + MonitoredResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; + object.labels = []; if (options.defaults) { object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.MonitoredResourceDescriptor * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {string} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - return ResourceDescriptor; + return MonitoredResourceDescriptor; })(); - api.ResourceReference = (function() { + api.MonitoredResource = (function() { /** - * Properties of a ResourceReference. + * Properties of a MonitoredResource. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels */ /** - * Constructs a new ResourceReference. + * Constructs a new MonitoredResource. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.IMonitoredResource=} [properties] Properties to set */ - function ResourceReference(properties) { + function MonitoredResource(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12723,80 +12728,81 @@ } /** - * ResourceReference type. + * MonitoredResource type. * @member {string} type - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @instance */ - ResourceReference.prototype.type = ""; + MonitoredResource.prototype.type = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource * @instance */ - ResourceReference.prototype.childType = ""; + MonitoredResource.prototype.labels = $util.emptyObject; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + MonitoredResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && message.hasOwnProperty("childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + MonitoredResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -12804,7 +12810,12 @@ message.type = reader.string(); break; case 2: - message.childType = reader.string(); + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -12815,118 +12826,132 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a MonitoredResource message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + MonitoredResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.MonitoredResource} MonitoredResource */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) return object; - var message = new $root.google.api.ResourceReference(); + var message = new $root.google.api.MonitoredResource(); if (object.type != null) message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.MonitoredResource} message MonitoredResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + MonitoredResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) object.type = ""; - object.childType = ""; - } if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this MonitoredResource to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.MonitoredResource * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + MonitoredResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return MonitoredResource; })(); - api.Http = (function() { + api.MonitoredResourceMetadata = (function() { /** - * Properties of a Http. + * Properties of a MonitoredResourceMetadata. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels */ /** - * Constructs a new Http. + * Constructs a new MonitoredResourceMetadata. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12934,91 +12959,94 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - Http.prototype.rules = $util.emptyArray; + MonitoredResourceMetadata.prototype.systemLabels = null; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; /** - * Creates a new Http instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance */ - Http.create = function create(properties) { - return new Http(properties); + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + MonitoredResourceMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + MonitoredResourceMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -13029,353 +13057,239 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a MonitoredResourceMetadata message. * @function verify - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + MonitoredResourceMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.Http} message Http + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + MonitoredResourceMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; + if (options.objects || options.defaults) + object.userLabels = {}; if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this Http to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceMetadata * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return MonitoredResourceMetadata; })(); - api.HttpRule = (function() { + api.LabelDescriptor = (function() { /** - * Properties of a HttpRule. + * Properties of a LabelDescriptor. * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description */ /** - * Constructs a new HttpRule. + * Constructs a new LabelDescriptor. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; - - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = ""; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance + * @param {google.api.ILabelDescriptor=} [properties] Properties to set */ - HttpRule.prototype.body = ""; + function LabelDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor * @instance */ - HttpRule.prototype.responseBody = ""; + LabelDescriptor.prototype.key = ""; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + LabelDescriptor.prototype.valueType = 0; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + LabelDescriptor.prototype.description = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + LabelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.key != null && message.hasOwnProperty("key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && message.hasOwnProperty("valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + LabelDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.key = reader.string(); break; case 2: - message.get = reader.string(); + message.valueType = reader.int32(); break; case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.description = reader.string(); break; default: reader.skipType(tag & 7); @@ -13386,240 +13300,186 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a LabelDescriptor message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.api.LabelDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + LabelDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.LabelDescriptor} LabelDescriptor + */ + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) + return object; + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; } + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.LabelDescriptor} message LabelDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + LabelDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this LabelDescriptor to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.LabelDescriptor * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + LabelDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; })(); - api.CustomHttpPattern = (function() { + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {string} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13627,88 +13487,143 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - CustomHttpPattern.prototype.kind = ""; + ResourceDescriptor.prototype.type = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - CustomHttpPattern.prototype.path = ""; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && message.hasOwnProperty("nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && message.hasOwnProperty("history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && message.hasOwnProperty("plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && message.hasOwnProperty("singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + message.type = reader.string(); break; case 2: - message.path = reader.string(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -13719,266 +13634,285 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.pattern = []; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + return ResourceDescriptor; })(); - api.MonitoredResourceDescriptor = (function() { + api.ResourceReference = (function() { /** - * Properties of a MonitoredResourceDescriptor. + * Properties of a ResourceReference. * @memberof google.api - * @interface IMonitoredResourceDescriptor - * @property {string|null} [name] MonitoredResourceDescriptor name - * @property {string|null} [type] MonitoredResourceDescriptor type - * @property {string|null} [displayName] MonitoredResourceDescriptor displayName - * @property {string|null} [description] MonitoredResourceDescriptor description - * @property {Array.|null} [labels] MonitoredResourceDescriptor labels - * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a MonitoredResourceDescriptor. - * @implements IMonitoredResourceDescriptor + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - */ - function MonitoredResourceDescriptor(properties) { - this.labels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MonitoredResourceDescriptor name. - * @member {string} name - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.name = ""; - - /** - * MonitoredResourceDescriptor type. - * @member {string} type - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.type = ""; - - /** - * MonitoredResourceDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.displayName = ""; - - /** - * MonitoredResourceDescriptor description. - * @member {string} description - * @memberof google.api.MonitoredResourceDescriptor - * @instance + * @param {google.api.IResourceReference=} [properties] Properties to set */ - MonitoredResourceDescriptor.prototype.description = ""; + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * MonitoredResourceDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MonitoredResourceDescriptor + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + ResourceReference.prototype.type = ""; /** - * MonitoredResourceDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MonitoredResourceDescriptor + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - MonitoredResourceDescriptor.prototype.launchStage = 0; + ResourceReference.prototype.childType = ""; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @static - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - MonitoredResourceDescriptor.create = function create(properties) { - return new MonitoredResourceDescriptor(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); + if (message.childType != null && message.hasOwnProperty("childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; case 1: message.type = reader.string(); break; case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 7: - message.launchStage = reader.int32(); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -13989,201 +13923,118 @@ }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceDescriptor.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.ResourceReference} ResourceReference */ - MonitoredResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceDescriptor) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.MonitoredResourceDescriptor(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.api.ResourceReference(); if (object.type != null) message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } - } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @static - * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceDescriptor.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.labels = []; if (options.defaults) { object.type = ""; - object.displayName = ""; - object.description = ""; - object.name = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.childType = ""; } if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResourceDescriptor; + return ResourceReference; })(); - api.MonitoredResource = (function() { + api.Http = (function() { /** - * Properties of a MonitoredResource. + * Properties of a Http. * @memberof google.api - * @interface IMonitoredResource - * @property {string|null} [type] MonitoredResource type - * @property {Object.|null} [labels] MonitoredResource labels + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new MonitoredResource. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a MonitoredResource. - * @implements IMonitoredResource + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function MonitoredResource(properties) { - this.labels = {}; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14191,94 +14042,91 @@ } /** - * MonitoredResource type. - * @member {string} type - * @memberof google.api.MonitoredResource + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - MonitoredResource.prototype.type = ""; + Http.prototype.rules = $util.emptyArray; /** - * MonitoredResource labels. - * @member {Object.} labels - * @memberof google.api.MonitoredResource + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - MonitoredResource.prototype.labels = $util.emptyObject; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResource=} [properties] Properties to set - * @returns {google.api.MonitoredResource} MonitoredResource instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - MonitoredResource.create = function create(properties) { - return new MonitoredResource(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -14289,227 +14137,353 @@ }; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResource message. + * Verifies a Http message. * @function verify - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResource.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http */ - MonitoredResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResource) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.MonitoredResource(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.MonitoredResource.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.MonitoredResource} message MonitoredResource + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResource.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; + if (options.arrays || options.defaults) + object.rules = []; if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this MonitoredResource to JSON. - * @function toJSON - * @memberof google.api.MonitoredResource + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule * @instance - * @returns {Object.} JSON object */ - MonitoredResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MonitoredResource; - })(); - - api.MonitoredResourceMetadata = (function() { + HttpRule.prototype.custom = null; /** - * Properties of a MonitoredResourceMetadata. - * @memberof google.api - * @interface IMonitoredResourceMetadata - * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels - * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance */ + HttpRule.prototype.body = ""; /** - * Constructs a new MonitoredResourceMetadata. - * @memberof google.api - * @classdesc Represents a MonitoredResourceMetadata. - * @implements IMonitoredResourceMetadata - * @constructor - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance */ - function MonitoredResourceMetadata(properties) { - this.userLabels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + HttpRule.prototype.responseBody = ""; /** - * MonitoredResourceMetadata systemLabels. - * @member {google.protobuf.IStruct|null|undefined} systemLabels - * @memberof google.api.MonitoredResourceMetadata + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - MonitoredResourceMetadata.prototype.systemLabels = null; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * MonitoredResourceMetadata userLabels. - * @member {Object.} userLabels - * @memberof google.api.MonitoredResourceMetadata + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - MonitoredResourceMetadata.create = function create(properties) { - return new MonitoredResourceMetadata(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && message.hasOwnProperty("userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.selector = reader.string(); break; case 2: - reader.skip().pos++; - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - key = reader.string(); - reader.pos++; - message.userLabels[key] = reader.string(); + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -14520,137 +14494,240 @@ }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceMetadata.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { - var error = $root.google.protobuf.Struct.verify(message.systemLabels); - if (error) - return "systemLabels." + error; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } } return null; }; /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.HttpRule} HttpRule */ - MonitoredResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceMetadata) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.MonitoredResourceMetadata(); - if (object.systemLabels != null) { - if (typeof object.systemLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); - message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @static - * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceMetadata.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) - object.systemLabels = null; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - MonitoredResourceMetadata.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResourceMetadata; + return HttpRule; })(); - api.LabelDescriptor = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a LabelDescriptor. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new LabelDescriptor. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function LabelDescriptor(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14658,101 +14735,88 @@ } /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.key = ""; - - /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - LabelDescriptor.prototype.valueType = 0; + CustomHttpPattern.prototype.kind = ""; /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - LabelDescriptor.prototype.description = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && message.hasOwnProperty("key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && message.hasOwnProperty("valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.key = reader.string(); + message.kind = reader.string(); break; case 2: - message.valueType = reader.int32(); - break; - case 3: - message.description = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -14763,160 +14827,96 @@ }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LabelDescriptor message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.LabelDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LabelDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - } - if (object.description != null) - message.description = String(object.description); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LabelDescriptor.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; - object.description = ""; + object.kind = ""; + object.path = ""; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this LabelDescriptor to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.LabelDescriptor + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - LabelDescriptor.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {string} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); - - return LabelDescriptor; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {string} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; + return CustomHttpPattern; })(); api.Distribution = (function() { @@ -24492,8 +24492,8 @@ * @property {boolean|null} [deprecated] MethodOptions deprecated * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature */ /** @@ -24538,20 +24538,20 @@ MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http * @memberof google.protobuf.MethodOptions * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + MethodOptions.prototype[".google.api.http"] = null; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature * @memberof google.protobuf.MethodOptions * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** * Creates a new MethodOptions instance using the specified properties. @@ -24634,14 +24634,14 @@ message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; case 1051: if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) message[".google.api.methodSignature"] = []; message[".google.api.methodSignature"].push(reader.string()); break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -24698,6 +24698,11 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { if (!Array.isArray(message[".google.api.methodSignature"])) return ".google.api.methodSignature: array expected"; @@ -24705,11 +24710,6 @@ if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } return null; }; @@ -24751,6 +24751,11 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } if (object[".google.api.methodSignature"]) { if (!Array.isArray(object[".google.api.methodSignature"])) throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); @@ -24758,11 +24763,6 @@ for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } return message; }; @@ -26463,25 +26463,25 @@ return GeneratedCodeInfo; })(); - protobuf.Duration = (function() { + protobuf.Struct = (function() { /** - * Properties of a Duration. + * Properties of a Struct. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new Duration. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function Duration(properties) { + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26489,88 +26489,83 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - Duration.prototype.nanos = 0; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length) { + Struct.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -26581,129 +26576,131 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Duration.verify = function verify(message) { + Struct.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Duration to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return Struct; })(); - protobuf.Empty = (function() { + protobuf.Value = (function() { /** - * Properties of an Empty. + * Properties of a Value. * @memberof google.protobuf - * @interface IEmpty + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new Empty. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function Empty(properties) { + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26711,63 +26708,155 @@ } /** - * Creates a new Empty instance using the specified properties. + * Value nullValue. + * @member {google.protobuf.NullValue} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = 0; + + /** + * Value numberValue. + * @member {number} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = 0; + + /** + * Value stringValue. + * @member {string} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = ""; + + /** + * Value boolValue. + * @member {boolean} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = false; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. * @function create - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - Empty.create = function create(properties) { - return new Empty(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.nullValue != null && message.hasOwnProperty("nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && message.hasOwnProperty("structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && message.hasOwnProperty("listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decode = function decode(reader, length) { + Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.nullValue = reader.int32(); + break; + case 2: + message.numberValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -26777,95 +26866,214 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies a Value message. * @function verify - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Empty.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } return null; }; /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Value} Value */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - return new $root.google.protobuf.Empty(); + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; }; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; }; /** - * Converts this Empty to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; + return Value; })(); - protobuf.FieldMask = (function() { + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {string} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { /** - * Properties of a FieldMask. + * Properties of a ListValue. * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new FieldMask. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26873,78 +27081,78 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + ListValue.prototype.values = $util.emptyArray; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + ListValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + ListValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -26955,120 +27163,125 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + ListValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + ListValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } } return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.ListValue} ListValue */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } } return message; }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + ListValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); } return object; }; /** - * Converts this FieldMask to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldMask; + return ListValue; })(); - protobuf.Timestamp = (function() { + protobuf.Duration = (function() { /** - * Properties of a Timestamp. + * Properties of a Duration. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new Timestamp. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function Timestamp(properties) { + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27076,43 +27289,43 @@ } /** - * Timestamp seconds. + * Duration seconds. * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Timestamp nanos. + * Duration nanos. * @member {number} nanos - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @instance */ - Timestamp.prototype.nanos = 0; + Duration.prototype.nanos = 0; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.seconds != null && message.hasOwnProperty("seconds")) @@ -27123,33 +27336,33 @@ }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -27168,30 +27381,30 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.seconds != null && message.hasOwnProperty("seconds")) @@ -27204,17 +27417,17 @@ }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Duration} Duration */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.protobuf.Timestamp(); + var message = new $root.google.protobuf.Duration(); if (object.seconds != null) if ($util.Long) (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; @@ -27230,15 +27443,15 @@ }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -27261,38 +27474,38 @@ }; /** - * Converts this Timestamp to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Timestamp; + return Duration; })(); - protobuf.Struct = (function() { + protobuf.Any = (function() { /** - * Properties of a Struct. + * Properties of an Any. * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Struct. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27300,83 +27513,88 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Struct.prototype.fields = $util.emptyObject; + Any.prototype.type_url = ""; /** - * Creates a new Struct instance using the specified properties. + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Struct.create = function create(properties) { - return new Struct(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && message.hasOwnProperty("fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; - if (message.fields === $util.emptyObject) - message.fields = {}; - key = reader.string(); - reader.pos++; - message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -27387,131 +27605,126 @@ }; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Struct message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Struct.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Any} Any */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; return message; }; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Struct to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Struct; + return Any; })(); - protobuf.Value = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a Value. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new Value. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function Value(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27519,154 +27732,88 @@ } /** - * Value nullValue. - * @member {google.protobuf.NullValue} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = 0; - - /** - * Value numberValue. - * @member {number} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = 0; - - /** - * Value stringValue. - * @member {string} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = ""; - - /** - * Value boolValue. - * @member {boolean} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = false; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp * @instance */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + Timestamp.prototype.nanos = 0; /** - * Creates a new Value instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - Value.create = function create(properties) { - return new Value(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nullValue != null && message.hasOwnProperty("nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && message.hasOwnProperty("numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && message.hasOwnProperty("structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && message.hasOwnProperty("listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.nullValue = reader.int32(); - break; - case 2: - message.numberValue = reader.double(); - break; - case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -27677,214 +27824,129 @@ }; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Value message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Value.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Timestamp} Timestamp */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.Value} message Value + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Value.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this Value to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.Value + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - Value.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {string} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; + return Timestamp; })(); - protobuf.ListValue = (function() { + protobuf.Empty = (function() { /** - * Properties of a ListValue. + * Properties of an Empty. * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * @interface IEmpty */ /** - * Constructs a new ListValue. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27892,79 +27954,63 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; - - /** - * Creates a new ListValue instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - ListValue.create = function create(properties) { - return new ListValue(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -27974,125 +28020,95 @@ }; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListValue message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListValue.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } return null; }; /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Empty} Empty */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this ListValue to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListValue; + return Empty; })(); - protobuf.Any = (function() { + protobuf.FieldMask = (function() { /** - * Properties of an Any. + * Properties of a FieldMask. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Any. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Any(properties) { + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28100,88 +28116,78 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - Any.prototype.value = $util.newBuffer([]); + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new Any instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - Any.create = function create(properties) { - return new Any(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -28192,105 +28198,99 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Any.verify = function verify(message) { + FieldMask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } return null; }; /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.FieldMask} FieldMask */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } return message; }; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + FieldMask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Any to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Any; + return FieldMask; })(); return protobuf; diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 49ef95cbf03..a20c65b4bec 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -12,414 +12,375 @@ "java_multiple_files": true, "java_outer_classname": "LoggingMetricsProto", "java_package": "com.google.logging.v2", - "php_namespace": "Google\\Cloud\\Logging\\V2" + "php_namespace": "Google\\Cloud\\Logging\\V2", + "(google.api.resource_definition).type": "logging.googleapis.com/BillingAccountLocation", + "(google.api.resource_definition).pattern": "billingAccounts/{billing_account}/locations/{location}" }, "nested": { - "ConfigServiceV2": { + "LogEntry": { "options": { - "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" + "(google.api.resource).type": "logging.googleapis.com/Log", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/logs/{log}", + "(google.api.resource).name_field": "log_name" }, - "methods": { - "ListBuckets": { - "requestType": "ListBucketsRequest", - "responseType": "ListBucketsResponse", + "oneofs": { + "payload": { + "oneof": [ + "protoPayload", + "textPayload", + "jsonPayload" + ] + } + }, + "fields": { + "logName": { + "type": "string", + "id": 12, "options": { - "(google.api.http).get": "/v2/{parent=*/*/locations/*}/buckets", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*}/buckets", - "(google.api.method_signature)": "parent" + "(google.api.field_behavior)": "REQUIRED" } }, - "GetBucket": { - "requestType": "GetBucketRequest", - "responseType": "LogBucket", + "resource": { + "type": "google.api.MonitoredResource", + "id": 8, "options": { - "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" + "(google.api.field_behavior)": "REQUIRED" } }, - "UpdateBucket": { - "requestType": "UpdateBucketRequest", - "responseType": "LogBucket", - "options": { - "(google.api.http).patch": "/v2/{name=*/*/locations/*/buckets/*}", - "(google.api.http).body": "bucket", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", - "(google.api.http).additional_bindings.body": "bucket" - } + "protoPayload": { + "type": "google.protobuf.Any", + "id": 2 }, - "ListSinks": { - "requestType": "ListSinksRequest", - "responseType": "ListSinksResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/sinks", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks", - "(google.api.method_signature)": "parent" - } + "textPayload": { + "type": "string", + "id": 3 }, - "GetSink": { - "requestType": "GetSinkRequest", - "responseType": "LogSink", + "jsonPayload": { + "type": "google.protobuf.Struct", + "id": 6 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 9, "options": { - "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.method_signature)": "sink_name" + "(google.api.field_behavior)": "OPTIONAL" } }, - "CreateSink": { - "requestType": "CreateSinkRequest", - "responseType": "LogSink", + "receiveTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 24, "options": { - "(google.api.http).post": "/v2/{parent=*/*}/sinks", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", - "(google.api.http).additional_bindings.body": "sink", - "(google.api.method_signature)": "parent,sink" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "UpdateSink": { - "requestType": "UpdateSinkRequest", - "responseType": "LogSink", + "severity": { + "type": "google.logging.type.LogSeverity", + "id": 10, "options": { - "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.http).additional_bindings.body": "sink", - "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.method_signature)": "sink_name,sink" + "(google.api.field_behavior)": "OPTIONAL" } }, - "DeleteSink": { - "requestType": "DeleteSinkRequest", - "responseType": "google.protobuf.Empty", + "insertId": { + "type": "string", + "id": 4, "options": { - "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.method_signature)": "sink_name" + "(google.api.field_behavior)": "OPTIONAL" } }, - "ListExclusions": { - "requestType": "ListExclusionsRequest", - "responseType": "ListExclusionsResponse", + "httpRequest": { + "type": "google.logging.type.HttpRequest", + "id": 7, "options": { - "(google.api.http).get": "/v2/{parent=*/*}/exclusions", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions", - "(google.api.method_signature)": "parent" + "(google.api.field_behavior)": "OPTIONAL" } }, - "GetExclusion": { - "requestType": "GetExclusionRequest", - "responseType": "LogExclusion", + "labels": { + "keyType": "string", + "type": "string", + "id": 11, "options": { - "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.method_signature)": "name" + "(google.api.field_behavior)": "OPTIONAL" } }, - "CreateExclusion": { - "requestType": "CreateExclusionRequest", - "responseType": "LogExclusion", + "operation": { + "type": "LogEntryOperation", + "id": 15, "options": { - "(google.api.http).post": "/v2/{parent=*/*}/exclusions", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", - "(google.api.http).additional_bindings.body": "exclusion", - "(google.api.method_signature)": "parent,exclusion" + "(google.api.field_behavior)": "OPTIONAL" } }, - "UpdateExclusion": { - "requestType": "UpdateExclusionRequest", - "responseType": "LogExclusion", + "trace": { + "type": "string", + "id": 22, "options": { - "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.http).additional_bindings.body": "exclusion", - "(google.api.method_signature)": "name,exclusion,update_mask" + "(google.api.field_behavior)": "OPTIONAL" } }, - "DeleteExclusion": { - "requestType": "DeleteExclusionRequest", - "responseType": "google.protobuf.Empty", + "spanId": { + "type": "string", + "id": 27, "options": { - "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.method_signature)": "name" + "(google.api.field_behavior)": "OPTIONAL" } }, - "GetCmekSettings": { - "requestType": "GetCmekSettingsRequest", - "responseType": "CmekSettings", + "traceSampled": { + "type": "bool", + "id": 30, "options": { - "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", - "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" + "(google.api.field_behavior)": "OPTIONAL" } }, - "UpdateCmekSettings": { - "requestType": "UpdateCmekSettingsRequest", - "responseType": "CmekSettings", + "sourceLocation": { + "type": "LogEntrySourceLocation", + "id": 23, "options": { - "(google.api.http).patch": "/v2/{name=*/*}/cmekSettings", - "(google.api.http).body": "cmek_settings", - "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*}/cmekSettings", - "(google.api.http).additional_bindings.body": "cmek_settings" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "LogBucket": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/LogBucket", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" - }, + "LogEntryOperation": { "fields": { - "name": { + "id": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "description": { + "producer": { "type": "string", - "id": 3 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, + "first": { + "type": "bool", + "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "retentionDays": { - "type": "int32", - "id": 11 - }, - "lifecycleState": { - "type": "LifecycleState", - "id": 12, + "last": { + "type": "bool", + "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "LogSink": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/LogSink", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/sinks/{sink}" - }, - "oneofs": { - "options": { - "oneof": [ - "bigqueryOptions" - ] - } - }, + "LogEntrySourceLocation": { "fields": { - "name": { + "file": { "type": "string", "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destination": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "filter": { - "type": "string", - "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "description": { - "type": "string", - "id": 18, + "line": { + "type": "int64", + "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "disabled": { - "type": "bool", - "id": 19, + "function": { + "type": "string", + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "outputVersionFormat": { - "type": "VersionFormat", - "id": 6, - "options": { - "deprecated": true - } - }, - "writerIdentity": { - "type": "string", - "id": 8, + } + } + }, + "LoggingServiceV2": { + "options": { + "(google.api.default_host)": "logging.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + }, + "methods": { + "DeleteLog": { + "requestType": "DeleteLogRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}", + "(google.api.method_signature)": "log_name" } }, - "includeChildren": { - "type": "bool", - "id": 9, + "WriteLogEntries": { + "requestType": "WriteLogEntriesRequest", + "responseType": "WriteLogEntriesResponse", "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.http).post": "/v2/entries:write", + "(google.api.http).body": "*", + "(google.api.method_signature)": "log_name,resource,labels,entries" } }, - "bigqueryOptions": { - "type": "BigQueryOptions", - "id": 12, + "ListLogEntries": { + "requestType": "ListLogEntriesRequest", + "responseType": "ListLogEntriesResponse", "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.http).post": "/v2/entries:list", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource_names,filter,order_by" } }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 13, + "ListMonitoredResourceDescriptors": { + "requestType": "ListMonitoredResourceDescriptorsRequest", + "responseType": "ListMonitoredResourceDescriptorsResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).get": "/v2/monitoredResourceDescriptors" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 14, + "ListLogs": { + "requestType": "ListLogsRequest", + "responseType": "ListLogsResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "VersionFormat": { - "values": { - "VERSION_FORMAT_UNSPECIFIED": 0, - "V2": 1, - "V1": 2 + "(google.api.http).get": "/v2/{parent=*/*}/logs", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", + "(google.api.method_signature)": "parent" } } } }, - "BigQueryOptions": { + "DeleteLogRequest": { "fields": { - "usePartitionedTables": { - "type": "bool", + "logName": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "usesTimestampColumnPartitioning": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Log" } } } }, - "LifecycleState": { - "values": { - "LIFECYCLE_STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DELETE_REQUESTED": 2 - } - }, - "ListBucketsRequest": { + "WriteLogEntriesRequest": { "fields": { - "parent": { + "logName": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogBucket" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "logging.googleapis.com/Log" } }, - "pageToken": { - "type": "string", + "resource": { + "type": "google.api.MonitoredResource", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "pageSize": { - "type": "int32", + "labels": { + "keyType": "string", + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "partialSuccess": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dryRun": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ListBucketsResponse": { + "WriteLogEntriesResponse": { + "fields": {} + }, + "WriteLogEntriesPartialErrors": { "fields": { - "buckets": { - "rule": "repeated", - "type": "LogBucket", + "logEntryErrors": { + "keyType": "int32", + "type": "google.rpc.Status", "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 } } }, - "UpdateBucketRequest": { + "ListLogEntriesRequest": { "fields": { - "name": { + "resourceNames": { + "rule": "repeated", "type": "string", - "id": 1, + "id": 8, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" } }, - "bucket": { - "type": "LogBucket", + "filter": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "orderBy": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "GetBucketRequest": { + "ListLogEntriesResponse": { "fields": { - "name": { + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 1 + }, + "nextPageToken": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" - } + "id": 2 } } }, - "ListSinksRequest": { + "ListMonitoredResourceDescriptorsRequest": { "fields": { - "parent": { - "type": "string", + "pageSize": { + "type": "int32", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" + "(google.api.field_behavior)": "OPTIONAL" } }, "pageToken": { @@ -428,21 +389,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } } } }, - "ListSinksResponse": { + "ListMonitoredResourceDescriptorsResponse": { "fields": { - "sinks": { + "resourceDescriptors": { "rule": "repeated", - "type": "LogSink", + "type": "google.api.MonitoredResourceDescriptor", "id": 1 }, "nextPageToken": { @@ -451,37 +405,25 @@ } } }, - "GetSinkRequest": { - "fields": { - "sinkName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" - } - } - } - }, - "CreateSinkRequest": { + "ListLogsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" } }, - "sink": { - "type": "LogSink", + "pageSize": { + "type": "int32", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "uniqueWriterIdentity": { - "type": "bool", + "pageToken": { + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" @@ -489,442 +431,447 @@ } } }, - "UpdateSinkRequest": { + "ListLogsResponse": { "fields": { - "sinkName": { + "logNames": { + "rule": "repeated", "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" - } + "id": 3 }, - "sink": { - "type": "LogSink", - "id": 2, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ConfigServiceV2": { + "options": { + "(google.api.default_host)": "logging.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" + }, + "methods": { + "ListBuckets": { + "requestType": "ListBucketsRequest", + "responseType": "ListBucketsResponse", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).get": "/v2/{parent=*/*/locations/*}/buckets", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*}/buckets", + "(google.api.method_signature)": "parent" } }, - "uniqueWriterIdentity": { - "type": "bool", - "id": 3, + "GetBucket": { + "requestType": "GetBucketRequest", + "responseType": "LogBucket", "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteSinkRequest": { - "fields": { - "sinkName": { - "type": "string", - "id": 1, + "UpdateBucket": { + "requestType": "UpdateBucketRequest", + "responseType": "LogBucket", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" + "(google.api.http).patch": "/v2/{name=*/*/locations/*/buckets/*}", + "(google.api.http).body": "bucket", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", + "(google.api.http).additional_bindings.body": "bucket" } - } - } - }, - "LogExclusion": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/LogExclusion", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/exclusions/{exclusion}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "ListSinks": { + "requestType": "ListSinksRequest", + "responseType": "ListSinksResponse", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).get": "/v2/{parent=*/*}/sinks", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.method_signature)": "parent" } }, - "description": { - "type": "string", - "id": 2, + "GetSink": { + "requestType": "GetSinkRequest", + "responseType": "LogSink", "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name" } }, - "filter": { - "type": "string", - "id": 3, + "CreateSink": { + "requestType": "CreateSinkRequest", + "responseType": "LogSink", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).post": "/v2/{parent=*/*}/sinks", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.method_signature)": "parent,sink" } }, - "disabled": { - "type": "bool", - "id": 4, + "UpdateSink": { + "requestType": "UpdateSinkRequest", + "responseType": "LogSink", "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name,sink" } }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, + "DeleteSink": { + "requestType": "DeleteSinkRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, + "ListExclusions": { + "requestType": "ListExclusionsRequest", + "responseType": "ListExclusionsResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).get": "/v2/{parent=*/*}/exclusions", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.method_signature)": "parent" } - } - } - }, - "ListExclusionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + }, + "GetExclusion": { + "requestType": "GetExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" + "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.method_signature)": "name" } }, - "pageToken": { - "type": "string", - "id": 2, + "CreateExclusion": { + "requestType": "CreateExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.http).post": "/v2/{parent=*/*}/exclusions", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.http).additional_bindings.body": "exclusion", + "(google.api.method_signature)": "parent,exclusion" } }, - "pageSize": { - "type": "int32", - "id": 3, + "UpdateExclusion": { + "requestType": "UpdateExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.http).additional_bindings.body": "exclusion", + "(google.api.method_signature)": "name,exclusion,update_mask" } - } - } - }, - "ListExclusionsResponse": { - "fields": { - "exclusions": { - "rule": "repeated", - "type": "LogExclusion", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetExclusionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + "DeleteExclusion": { + "requestType": "DeleteExclusionRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" + "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.method_signature)": "name" } - } - } - }, - "CreateExclusionRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + }, + "GetCmekSettings": { + "requestType": "GetCmekSettingsRequest", + "responseType": "CmekSettings", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" + "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" } }, - "exclusion": { - "type": "LogExclusion", - "id": 2, + "UpdateCmekSettings": { + "requestType": "UpdateCmekSettingsRequest", + "responseType": "CmekSettings", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).patch": "/v2/{name=*/*}/cmekSettings", + "(google.api.http).body": "cmek_settings", + "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*}/cmekSettings", + "(google.api.http).additional_bindings.body": "cmek_settings" } } } }, - "UpdateExclusionRequest": { + "LogBucket": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/LogBucket", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" + }, "fields": { "name": { "type": "string", - "id": 1, + "id": 1 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "exclusion": { - "type": "LogExclusion", - "id": 2, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, + "retentionDays": { + "type": "int32", + "id": 11 + }, + "lifecycleState": { + "type": "LifecycleState", + "id": 12, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "DeleteExclusionRequest": { + "LogSink": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/LogSink", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/sinks/{sink}" + }, + "oneofs": { + "options": { + "oneof": [ + "bigqueryOptions" + ] + } + }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" + "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "GetCmekSettingsRequest": { - "fields": { - "name": { + }, + "destination": { "type": "string", - "id": 1, + "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/CmekSettings" + "(google.api.resource_reference).type": "*" } - } - } - }, - "UpdateCmekSettingsRequest": { - "fields": { - "name": { + }, + "filter": { "type": "string", - "id": 1, + "id": 5, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "cmekSettings": { - "type": "CmekSettings", - "id": 2, + "description": { + "type": "string", + "id": 18, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, + "disabled": { + "type": "bool", + "id": 19, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "CmekSettings": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/CmekSettings", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/cmekSettings" - }, - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "outputVersionFormat": { + "type": "VersionFormat", + "id": 6, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "deprecated": true } }, - "kmsKeyName": { - "type": "string", - "id": 2 - }, - "serviceAccountId": { + "writerIdentity": { "type": "string", - "id": 3, + "id": 8, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - } - }, - "LoggingServiceV2": { - "options": { - "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - }, - "methods": { - "DeleteLog": { - "requestType": "DeleteLogRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", - "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}", - "(google.api.method_signature)": "log_name" - } }, - "WriteLogEntries": { - "requestType": "WriteLogEntriesRequest", - "responseType": "WriteLogEntriesResponse", + "includeChildren": { + "type": "bool", + "id": 9, "options": { - "(google.api.http).post": "/v2/entries:write", - "(google.api.http).body": "*", - "(google.api.method_signature)": "log_name,resource,labels,entries" + "(google.api.field_behavior)": "OPTIONAL" } }, - "ListLogEntries": { - "requestType": "ListLogEntriesRequest", - "responseType": "ListLogEntriesResponse", + "bigqueryOptions": { + "type": "BigQueryOptions", + "id": 12, "options": { - "(google.api.http).post": "/v2/entries:list", - "(google.api.http).body": "*", - "(google.api.method_signature)": "resource_names,filter,order_by" + "(google.api.field_behavior)": "OPTIONAL" } }, - "ListMonitoredResourceDescriptors": { - "requestType": "ListMonitoredResourceDescriptorsRequest", - "responseType": "ListMonitoredResourceDescriptorsResponse", + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 13, "options": { - "(google.api.http).get": "/v2/monitoredResourceDescriptors" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "ListLogs": { - "requestType": "ListLogsRequest", - "responseType": "ListLogsResponse", + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 14, "options": { - "(google.api.http).get": "/v2/{parent=*/*}/logs", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", - "(google.api.method_signature)": "parent" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "VersionFormat": { + "values": { + "VERSION_FORMAT_UNSPECIFIED": 0, + "V2": 1, + "V1": 2 } } } }, - "DeleteLogRequest": { + "BigQueryOptions": { "fields": { - "logName": { - "type": "string", + "usePartitionedTables": { + "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Log" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "usesTimestampColumnPartitioning": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "WriteLogEntriesRequest": { + "LifecycleState": { + "values": { + "LIFECYCLE_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "DELETE_REQUESTED": 2 + } + }, + "ListBucketsRequest": { "fields": { - "logName": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "logging.googleapis.com/Log" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogBucket" } }, - "resource": { - "type": "google.api.MonitoredResource", + "pageToken": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "labels": { - "keyType": "string", - "type": "string", + "pageSize": { + "type": "int32", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "entries": { + } + } + }, + "ListBucketsResponse": { + "fields": { + "buckets": { "rule": "repeated", - "type": "LogEntry", - "id": 4, + "type": "LogBucket", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateBucketRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" } }, - "partialSuccess": { - "type": "bool", - "id": 5, + "bucket": { + "type": "LogBucket", + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "dryRun": { - "type": "bool", - "id": 6, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } } } }, - "WriteLogEntriesResponse": { - "fields": {} - }, - "WriteLogEntriesPartialErrors": { + "GetBucketRequest": { "fields": { - "logEntryErrors": { - "keyType": "int32", - "type": "google.rpc.Status", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } } } }, - "ListLogEntriesRequest": { + "ListSinksRequest": { "fields": { - "resourceNames": { - "rule": "repeated", + "parent": { "type": "string", - "id": 8, + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" } }, - "filter": { + "pageToken": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "orderBy": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, "pageSize": { "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 5, + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListLogEntriesResponse": { + "ListSinksResponse": { "fields": { - "entries": { + "sinks": { "rule": "repeated", - "type": "LogEntry", + "type": "LogSink", "id": 1 }, "nextPageToken": { @@ -933,251 +880,306 @@ } } }, - "ListMonitoredResourceDescriptorsRequest": { + "GetSinkRequest": { "fields": { - "pageSize": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { + "sinkName": { "type": "string", - "id": 2, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" } } } }, - "ListMonitoredResourceDescriptorsResponse": { + "CreateSinkRequest": { "fields": { - "resourceDescriptors": { - "rule": "repeated", - "type": "google.api.MonitoredResourceDescriptor", - "id": 1 - }, - "nextPageToken": { + "parent": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" + } + }, + "sink": { + "type": "LogSink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ListLogsRequest": { + "UpdateSinkRequest": { "fields": { - "parent": { + "sinkName": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" } }, - "pageSize": { - "type": "int32", + "sink": { + "type": "LogSink", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "pageToken": { - "type": "string", + "uniqueWriterIdentity": { + "type": "bool", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ListLogsResponse": { + "DeleteSinkRequest": { "fields": { - "logNames": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "nextPageToken": { + "sinkName": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" + } } } }, - "LogEntry": { + "LogExclusion": { "options": { - "(google.api.resource).type": "logging.googleapis.com/Log", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/logs/{log}", - "(google.api.resource).name_field": "log_name" - }, - "oneofs": { - "payload": { - "oneof": [ - "protoPayload", - "textPayload", - "jsonPayload" - ] - } + "(google.api.resource).type": "logging.googleapis.com/LogExclusion", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/exclusions/{exclusion}" }, "fields": { - "logName": { + "name": { "type": "string", - "id": 12, + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 8, + "description": { + "type": "string", + "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "protoPayload": { - "type": "google.protobuf.Any", - "id": 2 - }, - "textPayload": { + "filter": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "jsonPayload": { - "type": "google.protobuf.Struct", - "id": 6 + "disabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "timestamp": { + "createTime": { "type": "google.protobuf.Timestamp", - "id": 9, + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "receiveTimestamp": { + "updateTime": { "type": "google.protobuf.Timestamp", - "id": 24, + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListExclusionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" } }, - "severity": { - "type": "google.logging.type.LogSeverity", - "id": 10, + "pageToken": { + "type": "string", + "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "insertId": { - "type": "string", - "id": 4, + "pageSize": { + "type": "int32", + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListExclusionsResponse": { + "fields": { + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", + "id": 1 }, - "httpRequest": { - "type": "google.logging.type.HttpRequest", - "id": 7, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" } - }, - "labels": { - "keyType": "string", + } + } + }, + "CreateExclusionRequest": { + "fields": { + "parent": { "type": "string", - "id": 11, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" } }, - "operation": { - "type": "LogEntryOperation", - "id": 15, + "exclusion": { + "type": "LogExclusion", + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } - }, - "trace": { + } + } + }, + "UpdateExclusionRequest": { + "fields": { + "name": { "type": "string", - "id": 22, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" } }, - "spanId": { - "type": "string", - "id": 27, + "exclusion": { + "type": "LogExclusion", + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "traceSampled": { - "type": "bool", - "id": 30, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } - }, - "sourceLocation": { - "type": "LogEntrySourceLocation", - "id": 23, + } + } + }, + "DeleteExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" } } } }, - "LogEntryOperation": { + "GetCmekSettingsRequest": { "fields": { - "id": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/CmekSettings" } - }, - "producer": { + } + } + }, + "UpdateCmekSettingsRequest": { + "fields": { + "name": { "type": "string", - "id": 2, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "first": { - "type": "bool", - "id": 3, + "cmekSettings": { + "type": "CmekSettings", + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "last": { - "type": "bool", - "id": 4, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "LogEntrySourceLocation": { + "CmekSettings": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/CmekSettings", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/cmekSettings" + }, "fields": { - "file": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "line": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "kmsKeyName": { + "type": "string", + "id": 2 }, - "function": { + "serviceAccountId": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } @@ -1496,63 +1498,137 @@ } } }, - "LogSeverity": { + "LogSeverity": { + "values": { + "DEFAULT": 0, + "DEBUG": 100, + "INFO": 200, + "NOTICE": 300, + "WARNING": 400, + "ERROR": 500, + "CRITICAL": 600, + "ALERT": 700, + "EMERGENCY": 800 + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", + "java_multiple_files": true, + "java_outer_classname": "MetricProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "MonitoredResourceDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "type": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 4 + }, + "launchStage": { + "type": "LaunchStage", + "id": 7 + } + } + }, + "MonitoredResource": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "MonitoredResourceMetadata": { + "fields": { + "systemLabels": { + "type": "google.protobuf.Struct", + "id": 1 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "ValueType", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { "values": { - "DEFAULT": 0, - "DEBUG": 100, - "INFO": 200, - "NOTICE": 300, - "WARNING": 400, - "ERROR": 500, - "CRITICAL": 600, - "ALERT": 700, - "EMERGENCY": 800 + "STRING": 0, + "BOOL": 1, + "INT64": 2 } } } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", - "java_multiple_files": true, - "java_outer_classname": "MetricProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { + "LaunchStage": { "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "LAUNCH_STAGE_UNSPECIFIED": 0, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 } }, "resourceReference": { @@ -1708,95 +1784,21 @@ } } }, - "MonitoredResourceDescriptor": { - "fields": { - "name": { - "type": "string", - "id": 5 - }, - "type": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", - "id": 4 - }, - "launchStage": { - "type": "LaunchStage", - "id": 7 - } - } - }, - "MonitoredResource": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "MonitoredResourceMetadata": { - "fields": { - "systemLabels": { - "type": "google.protobuf.Struct", - "id": 1 - }, - "userLabels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" }, - "LabelDescriptor": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "valueType": { - "type": "ValueType", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - }, - "nested": { - "ValueType": { - "values": { - "STRING": 0, - "BOOL": 1, - "INT64": 2 - } - } - } + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" }, "Distribution": { "fields": { @@ -2922,42 +2924,6 @@ } } }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, "Struct": { "fields": { "fields": { @@ -3021,6 +2987,18 @@ } } }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Any": { "fields": { "type_url": { @@ -3032,6 +3010,30 @@ "id": 2 } } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } } } }, diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 2a6654908c4..6d44e6ef39f 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -34,7 +34,7 @@ export {middleware}; export {HttpRequest}; export {detectServiceContext}; -const PKG = require('../../package.json'); +const version = require('../../package.json').version; const v2 = require('./v2'); import {Entry, LogEntry} from './entry'; @@ -288,7 +288,7 @@ class Logging { const options_ = extend( { libName: 'gccl', - libVersion: PKG.version, + libVersion: version, scopes, }, options diff --git a/handwritten/logging/src/service_proto_list.json b/handwritten/logging/src/service_proto_list.json deleted file mode 100644 index 51a794cb76c..00000000000 --- a/handwritten/logging/src/service_proto_list.json +++ /dev/null @@ -1 +0,0 @@ -["../protos/google/logging/v2/logging.proto", "../protos/google/logging/v2/logging_config.proto", "../protos/google/logging/v2/log_entry.proto", "../protos/google/logging/v2/logging_metrics.proto"] \ No newline at end of file diff --git a/handwritten/logging/src/v2/config_service_v2_client.js b/handwritten/logging/src/v2/config_service_v2_client.js deleted file mode 100644 index bd057e9db64..00000000000 --- a/handwritten/logging/src/v2/config_service_v2_client.js +++ /dev/null @@ -1,1782 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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'; - -const gapicConfig = require('./config_service_v2_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../../package.json').version; - -/** - * Service for configuring sinks used to route log entries. - * - * @class - * @memberof v2 - */ -class ConfigServiceV2Client { - /** - * Construct an instance of ConfigServiceV2Client. - * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {function} [options.promise] - Custom promise module to use instead - * of native Promises. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - */ - constructor(opts) { - opts = opts || {}; - this._descriptors = {}; - - if (global.isBrowser) { - // If we're in browser, we use gRPC fallback. - opts.fallback = true; - } - - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; - - const servicePath = - opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; - - // Ensure that options include the service address and port. - opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath, - }, - opts - ); - - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = this.constructor.scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); - - // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth; - - // Determine the client header string. - const clientHeader = []; - - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } - clientHeader.push(`gax/${gaxModule.version}`); - if (opts.fallback) { - clientHeader.push(`gl-web/${gaxModule.version}`); - } else { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); - } - clientHeader.push(`gapic/${VERSION}`); - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - - // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath - ); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this._pathTemplates = { - billingAccountPathTemplate: new gaxModule.PathTemplate( - 'billingAccounts/{billing_account}' - ), - folderPathTemplate: new gaxModule.PathTemplate('folders/{folder}'), - organizationPathTemplate: new gaxModule.PathTemplate( - 'organizations/{organization}' - ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this._descriptors.page = { - listBuckets: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'buckets' - ), - listSinks: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'sinks' - ), - listExclusions: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'exclusions' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.ConfigServiceV2', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this._innerApiCalls = {}; - - // Put together the "service stub" for - // google.logging.v2.ConfigServiceV2. - const configServiceV2Stub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.logging.v2.ConfigServiceV2') - : protos.google.logging.v2.ConfigServiceV2, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const configServiceV2StubMethods = [ - 'listBuckets', - 'getBucket', - 'updateBucket', - 'listSinks', - 'getSink', - 'createSink', - 'updateSink', - 'deleteSink', - 'listExclusions', - 'getExclusion', - 'createExclusion', - 'updateExclusion', - 'deleteExclusion', - 'getCmekSettings', - 'updateCmekSettings', - ]; - for (const methodName of configServiceV2StubMethods) { - const innerCallPromise = configServiceV2Stub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.page[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'logging.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'logging.googleapis.com'; - } - - /** - * The port for this API service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - } - - /** - * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. - */ - getProjectId(callback) { - return this.auth.getProjectId(callback); - } - - // ------------------- - // -- Service calls -- - // ------------------- - - /** - * Lists buckets (Beta). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [LogBucket]{@link google.logging.v2.LogBucket}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListBucketsResponse]{@link google.logging.v2.ListBucketsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogBucket]{@link google.logging.v2.LogBucket}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogBucket]{@link google.logging.v2.LogBucket} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListBucketsResponse]{@link google.logging.v2.ListBucketsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const parent = ''; - * - * client.listBuckets({parent: parent}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const parent = ''; - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listBuckets(nextRequest, options).then(callback); - * } - * } - * client.listBuckets({parent: parent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listBuckets(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - }); - - return this._innerApiCalls.listBuckets(request, options, callback); - } - - /** - * Equivalent to {@link listBuckets}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listBuckets} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @returns {Stream} - * An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const parent = ''; - * client.listBucketsStream({parent: parent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listBucketsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listBuckets.createStream( - this._innerApiCalls.listBuckets, - request, - options - ); - } - - /** - * Gets a bucket (Beta). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the bucket: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const name = ''; - * client.getBucket({name: name}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getBucket(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name, - }); - - return this._innerApiCalls.getBucket(request, options, callback); - } - - /** - * Updates a bucket. This method replaces the following fields in the - * existing bucket with values from the new bucket: `retention_period` - * - * If the retention period is decreased and the bucket is locked, - * FAILED_PRECONDITION will be returned. - * - * If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION - * will be returned. - * - * A buckets region may not be modified after it is created. - * This method is in Beta. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The full resource name of the bucket to update. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also - * requires permission "resourcemanager.projects.updateLiens" to set the - * locked property - * @param {Object} request.bucket - * Required. The updated bucket. - * - * This object should have the same structure as [LogBucket]{@link google.logging.v2.LogBucket} - * @param {Object} request.updateMask - * Required. Field mask that specifies the fields in `bucket` that need an update. A - * bucket field will be overwritten if, and only if, it is in the update - * mask. `name` and output only fields cannot be updated. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * Example: `updateMask=retention_days`. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const name = ''; - * const bucket = {}; - * const updateMask = {}; - * const request = { - * name: name, - * bucket: bucket, - * updateMask: updateMask, - * }; - * client.updateBucket(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateBucket(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name, - }); - - return this._innerApiCalls.updateBucket(request, options, callback); - } - - /** - * Lists sinks. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose sinks are to be listed: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [LogSink]{@link google.logging.v2.LogSink}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogSink]{@link google.logging.v2.LogSink}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogSink]{@link google.logging.v2.LogSink} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * client.listSinks({parent: formattedParent}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listSinks(nextRequest, options).then(callback); - * } - * } - * client.listSinks({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listSinks(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - }); - - return this._innerApiCalls.listSinks(request, options, callback); - } - - /** - * Equivalent to {@link listSinks}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listSinks} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose sinks are to be listed: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @returns {Stream} - * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * client.listSinksStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listSinksStream(request, options) { - options = options || {}; - - return this._descriptors.page.listSinks.createStream( - this._innerApiCalls.listSinks, - request, - options - ); - } - - /** - * Gets a sink. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.sinkName - * Required. The resource name of the sink: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const sinkName = ''; - * client.getSink({sinkName: sinkName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getSink(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - sink_name: request.sinkName, - }); - - return this._innerApiCalls.getSink(request, options, callback); - } - - /** - * Creates a sink that exports specified log entries to a destination. The - * export of newly-ingested log entries begins immediately, unless 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. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource in which to create the sink: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {Object} request.sink - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} - * @param {boolean} [request.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 - * the same group or service account used by Logging 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 {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * const sink = {}; - * const request = { - * parent: formattedParent, - * sink: sink, - * }; - * client.createSink(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createSink(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - }); - - return this._innerApiCalls.createSink(request, options, callback); - } - - /** - * Updates a sink. This method replaces the following fields in the existing - * sink with values from the new sink: `destination`, and `filter`. - * - * The updated sink might also have a new `writer_identity`; see the - * `unique_writer_identity` field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {Object} request.sink - * Required. The updated sink, whose name is the same identifier that appears as part - * of `sink_name`. - * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} - * @param {boolean} [request.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 is 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 is true and the new value is - * set to false or defaulted to false. - * @param {Object} [request.updateMask] - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * - * An empty updateMask is temporarily treated as using the following mask - * for backwards compatibility purposes: - * destination,filter,includeChildren - * At some point in the future, behavior will be removed and specifying an - * empty updateMask will be an error. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * Example: `updateMask=filter`. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const sinkName = ''; - * const sink = {}; - * const request = { - * sinkName: sinkName, - * sink: sink, - * }; - * client.updateSink(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateSink(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - sink_name: request.sinkName, - }); - - return this._innerApiCalls.updateSink(request, options, callback); - } - - /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that - * service account is also deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const sinkName = ''; - * client.deleteSink({sinkName: sinkName}).catch(err => { - * console.error(err); - * }); - */ - deleteSink(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - sink_name: request.sinkName, - }); - - return this._innerApiCalls.deleteSink(request, options, callback); - } - - /** - * Lists all the exclusions in a parent resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose exclusions are to be listed. - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogExclusion]{@link google.logging.v2.LogExclusion} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * client.listExclusions({parent: formattedParent}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listExclusions(nextRequest, options).then(callback); - * } - * } - * client.listExclusions({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listExclusions(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - }); - - return this._innerApiCalls.listExclusions(request, options, callback); - } - - /** - * Equivalent to {@link listExclusions}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listExclusions} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose exclusions are to be listed. - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @returns {Stream} - * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * client.listExclusionsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listExclusionsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listExclusions.createStream( - this._innerApiCalls.listExclusions, - request, - options - ); - } - - /** - * Gets the description of an exclusion. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of an existing exclusion: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const name = ''; - * client.getExclusion({name: name}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getExclusion(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name, - }); - - return this._innerApiCalls.getExclusion(request, options, callback); - } - - /** - * Creates a new exclusion in a specified parent resource. - * Only log entries belonging to that resource can be excluded. - * You can have up to 10 exclusions in a resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource in which to create the exclusion: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {Object} request.exclusion - * Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * const exclusion = {}; - * const request = { - * parent: formattedParent, - * exclusion: exclusion, - * }; - * client.createExclusion(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createExclusion(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - }); - - return this._innerApiCalls.createExclusion(request, options, callback); - } - - /** - * Changes one or more properties of an existing exclusion. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the exclusion to update: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @param {Object} request.exclusion - * Required. New values for the existing exclusion. Only the fields specified in - * `update_mask` are relevant. - * - * This object should have the same structure as [LogExclusion]{@link google.logging.v2.LogExclusion} - * @param {Object} request.updateMask - * Required. A non-empty list of fields to change in the existing exclusion. New values - * for the fields are taken from the corresponding fields in the - * LogExclusion included in this request. Fields not mentioned in - * `update_mask` are not changed and are ignored in the request. - * - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const name = ''; - * const exclusion = {}; - * const updateMask = {}; - * const request = { - * name: name, - * exclusion: exclusion, - * updateMask: updateMask, - * }; - * client.updateExclusion(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateExclusion(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name, - }); - - return this._innerApiCalls.updateExclusion(request, options, callback); - } - - /** - * Deletes an exclusion. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of an existing exclusion to delete: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const name = ''; - * client.deleteExclusion({name: name}).catch(err => { - * console.error(err); - * }); - */ - deleteExclusion(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name, - }); - - return this._innerApiCalls.deleteExclusion(request, options, callback); - } - - /** - * Gets the Logs Router CMEK settings for the given resource. - * - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. - * - * See [Enabling CMEK for Logs - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource for which to retrieve CMEK settings. - * - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * - * Example: `"organizations/12345/cmekSettings"`. - * - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const name = ''; - * client.getCmekSettings({name: name}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getCmekSettings(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name, - }); - - return this._innerApiCalls.getCmekSettings(request, options, callback); - } - - /** - * Updates the Logs Router CMEK settings for the given resource. - * - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. - * - * UpdateCmekSettings - * will fail if 1) `kms_key_name` is invalid, or 2) the associated service - * account does not have the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - * 3) access to the key is disabled. - * - * See [Enabling CMEK for Logs - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for the CMEK settings to update. - * - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * - * Example: `"organizations/12345/cmekSettings"`. - * - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. - * @param {Object} request.cmekSettings - * Required. The CMEK settings to update. - * - * See [Enabling CMEK for Logs - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. - * - * This object should have the same structure as [CmekSettings]{@link google.logging.v2.CmekSettings} - * @param {Object} [request.updateMask] - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * - * See FieldMask for more information. - * - * Example: `"updateMask=kmsKeyName"` - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.ConfigServiceV2Client({ - * // optional auth parameters. - * }); - * - * const name = ''; - * const cmekSettings = {}; - * const request = { - * name: name, - * cmekSettings: cmekSettings, - * }; - * client.updateCmekSettings(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateCmekSettings(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name, - }); - - return this._innerApiCalls.updateCmekSettings(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified billing_account resource name string. - * - * @param {String} billingAccount - * @returns {String} - */ - billingAccountPath(billingAccount) { - return this._pathTemplates.billingAccountPathTemplate.render({ - billing_account: billingAccount, - }); - } - - /** - * Return a fully-qualified folder resource name string. - * - * @param {String} folder - * @returns {String} - */ - folderPath(folder) { - return this._pathTemplates.folderPathTemplate.render({ - folder: folder, - }); - } - - /** - * Return a fully-qualified organization resource name string. - * - * @param {String} organization - * @returns {String} - */ - organizationPath(organization) { - return this._pathTemplates.organizationPathTemplate.render({ - organization: organization, - }); - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the billingAccountName from a billing_account resource. - * - * @param {String} billingAccountName - * A fully-qualified path representing a billing_account resources. - * @returns {String} - A string representing the billing_account. - */ - matchBillingAccountFromBillingAccountName(billingAccountName) { - return this._pathTemplates.billingAccountPathTemplate.match( - billingAccountName - ).billing_account; - } - - /** - * Parse the folderName from a folder resource. - * - * @param {String} folderName - * A fully-qualified path representing a folder resources. - * @returns {String} - A string representing the folder. - */ - matchFolderFromFolderName(folderName) { - return this._pathTemplates.folderPathTemplate.match(folderName).folder; - } - - /** - * Parse the organizationName from a organization resource. - * - * @param {String} organizationName - * A fully-qualified path representing a organization resources. - * @returns {String} - A string representing the organization. - */ - matchOrganizationFromOrganizationName(organizationName) { - return this._pathTemplates.organizationPathTemplate.match(organizationName) - .organization; - } - - /** - * Parse the projectName from a project resource. - * - * @param {String} projectName - * A fully-qualified path representing a project resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; - } -} - -module.exports = ConfigServiceV2Client; diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts new file mode 100644 index 00000000000..1ee3f6fe4ad --- /dev/null +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -0,0 +1,2905 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './config_service_v2_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Service for configuring sinks used to route log entries. + * @class + * @memberof v2 + */ +export class ConfigServiceV2Client { + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + configServiceV2Stub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ConfigServiceV2Client. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof ConfigServiceV2Client; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof ConfigServiceV2Client).scopes; + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/cmekSettings' + ), + billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/exclusions/{exclusion}' + ), + billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + ), + billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/logs/{log}' + ), + billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/sinks/{sink}' + ), + folderCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/cmekSettings' + ), + folderExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/exclusions/{exclusion}' + ), + folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}' + ), + folderLogPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/logs/{log}' + ), + folderSinkPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/sinks/{sink}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + logMetricPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/metrics/{metric}' + ), + organizationCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/cmekSettings' + ), + organizationExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/exclusions/{exclusion}' + ), + organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}' + ), + organizationLogPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/logs/{log}' + ), + organizationSinkPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/sinks/{sink}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/cmekSettings' + ), + projectExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/exclusions/{exclusion}' + ), + projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}' + ), + projectLogPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/logs/{log}' + ), + projectSinkPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/sinks/{sink}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this._descriptors.page = { + listBuckets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'buckets' + ), + listSinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'sinks' + ), + listExclusions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'exclusions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.logging.v2.ConfigServiceV2', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.configServiceV2Stub) { + return this.configServiceV2Stub; + } + + // Put together the "service stub" for + // google.logging.v2.ConfigServiceV2. + this.configServiceV2Stub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.logging.v2.ConfigServiceV2' + ) + : // tslint:disable-next-line no-any + (this._protos as any).google.logging.v2.ConfigServiceV2, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const configServiceV2StubMethods = [ + 'listBuckets', + 'getBucket', + 'updateBucket', + 'listSinks', + 'getSink', + 'createSink', + 'updateSink', + 'deleteSink', + 'listExclusions', + 'getExclusion', + 'createExclusion', + 'updateExclusion', + 'deleteExclusion', + 'getCmekSettings', + 'updateCmekSettings', + ]; + + for (const methodName of configServiceV2StubMethods) { + const innerCallPromise = this.configServiceV2Stub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = this._gaxModule.createApiCall( + innerCallPromise, + this._defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + return apiCall(argument, callOptions, callback); + }; + } + + return this.configServiceV2Stub; + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'logging.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'logging.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getBucket( + request: protosTypes.google.logging.v2.IGetBucketRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IGetBucketRequest | undefined, + {} | undefined + ] + >; + getBucket( + request: protosTypes.google.logging.v2.IGetBucketRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IGetBucketRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a bucket (Beta). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the bucket: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getBucket( + request: protosTypes.google.logging.v2.IGetBucketRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IGetBucketRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IGetBucketRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IGetBucketRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.getBucket(request, options, callback); + } + updateBucket( + request: protosTypes.google.logging.v2.IUpdateBucketRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, + {} | undefined + ] + >; + updateBucket( + request: protosTypes.google.logging.v2.IUpdateBucketRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates a bucket. This method replaces the following fields in the + * existing bucket with values from the new bucket: `retention_period` + * + * If the retention period is decreased and the bucket is locked, + * FAILED_PRECONDITION will be returned. + * + * If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + * will be returned. + * + * A buckets region may not be modified after it is created. + * This method is in Beta. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the bucket to update. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + * requires permission "resourcemanager.projects.updateLiens" to set the + * locked property + * @param {google.logging.v2.LogBucket} request.bucket + * Required. The updated bucket. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask that specifies the fields in `bucket` that need an update. A + * bucket field will be overwritten if, and only if, it is in the update + * mask. `name` and output only fields cannot be updated. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * + * Example: `updateMask=retention_days`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateBucket( + request: protosTypes.google.logging.v2.IUpdateBucketRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogBucket, + protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.updateBucket(request, options, callback); + } + getSink( + request: protosTypes.google.logging.v2.IGetSinkRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IGetSinkRequest | undefined, + {} | undefined + ] + >; + getSink( + request: protosTypes.google.logging.v2.IGetSinkRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IGetSinkRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a sink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.sinkName + * Required. The resource name of the sink: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getSink( + request: protosTypes.google.logging.v2.IGetSinkRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IGetSinkRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IGetSinkRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IGetSinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + sink_name: request.sinkName || '', + }); + this.initialize(); + return this._innerApiCalls.getSink(request, options, callback); + } + createSink( + request: protosTypes.google.logging.v2.ICreateSinkRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.ICreateSinkRequest | undefined, + {} | undefined + ] + >; + createSink( + request: protosTypes.google.logging.v2.ICreateSinkRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.ICreateSinkRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates a sink that exports specified log entries to a destination. The + * export of newly-ingested log entries begins immediately, unless 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. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource in which to create the sink: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {google.logging.v2.LogSink} request.sink + * Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. + * @param {boolean} [request.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 + * the same group or service account used by Logging 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 {@link google.logging.v2.LogSink|LogSink}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createSink( + request: protosTypes.google.logging.v2.ICreateSinkRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.ICreateSinkRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.ICreateSinkRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.ICreateSinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this._innerApiCalls.createSink(request, options, callback); + } + updateSink( + request: protosTypes.google.logging.v2.IUpdateSinkRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, + {} | undefined + ] + >; + updateSink( + request: protosTypes.google.logging.v2.IUpdateSinkRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates a sink. This method replaces the following fields in the existing + * sink with values from the new sink: `destination`, and `filter`. + * + * The updated sink might also have a new `writer_identity`; see the + * `unique_writer_identity` field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {google.logging.v2.LogSink} request.sink + * Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. + * @param {boolean} [request.uniqueWriterIdentity] + * Optional. See {@link google.logging.v2.ConfigServiceV2.CreateSink|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 is 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 is true and the new value is + * set to false or defaulted to false. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * + * An empty updateMask is temporarily treated as using the following mask + * for backwards compatibility purposes: + * destination,filter,includeChildren + * At some point in the future, behavior will be removed and specifying an + * empty updateMask will be an error. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * + * Example: `updateMask=filter`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateSink( + request: protosTypes.google.logging.v2.IUpdateSinkRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogSink, + protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + sink_name: request.sinkName || '', + }); + this.initialize(); + return this._innerApiCalls.updateSink(request, options, callback); + } + deleteSink( + request: protosTypes.google.logging.v2.IDeleteSinkRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, + {} | undefined + ] + >; + deleteSink( + request: protosTypes.google.logging.v2.IDeleteSinkRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, + {} | undefined + > + ): void; + /** + * Deletes a sink. If the sink has a unique `writer_identity`, then that + * service account is also deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteSink( + request: protosTypes.google.logging.v2.IDeleteSinkRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + sink_name: request.sinkName || '', + }); + this.initialize(); + return this._innerApiCalls.deleteSink(request, options, callback); + } + getExclusion( + request: protosTypes.google.logging.v2.IGetExclusionRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IGetExclusionRequest | undefined, + {} | undefined + ] + >; + getExclusion( + request: protosTypes.google.logging.v2.IGetExclusionRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IGetExclusionRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets the description of an exclusion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of an existing exclusion: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getExclusion( + request: protosTypes.google.logging.v2.IGetExclusionRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IGetExclusionRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IGetExclusionRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IGetExclusionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.getExclusion(request, options, callback); + } + createExclusion( + request: protosTypes.google.logging.v2.ICreateExclusionRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, + {} | undefined + ] + >; + createExclusion( + request: protosTypes.google.logging.v2.ICreateExclusionRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates a new exclusion in a specified parent resource. + * Only log entries belonging to that resource can be excluded. + * You can have up to 10 exclusions in a resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource in which to create the exclusion: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {google.logging.v2.LogExclusion} request.exclusion + * Required. The new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createExclusion( + request: protosTypes.google.logging.v2.ICreateExclusionRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this._innerApiCalls.createExclusion(request, options, callback); + } + updateExclusion( + request: protosTypes.google.logging.v2.IUpdateExclusionRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, + {} | undefined + ] + >; + updateExclusion( + request: protosTypes.google.logging.v2.IUpdateExclusionRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, + {} | undefined + > + ): void; + /** + * Changes one or more properties of an existing exclusion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the exclusion to update: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * @param {google.logging.v2.LogExclusion} request.exclusion + * Required. New values for the existing exclusion. Only the fields specified in + * `update_mask` are relevant. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A non-empty list of fields to change in the existing exclusion. New values + * for the fields are taken from the corresponding fields in the + * {@link google.logging.v2.LogExclusion|LogExclusion} included in this request. Fields not mentioned in + * `update_mask` are not changed and are ignored in the request. + * + * For example, to change the filter and description of an exclusion, + * specify an `update_mask` of `"filter,description"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateExclusion( + request: protosTypes.google.logging.v2.IUpdateExclusionRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogExclusion, + protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.updateExclusion(request, options, callback); + } + deleteExclusion( + request: protosTypes.google.logging.v2.IDeleteExclusionRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, + {} | undefined + ] + >; + deleteExclusion( + request: protosTypes.google.logging.v2.IDeleteExclusionRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, + {} | undefined + > + ): void; + /** + * Deletes an exclusion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of an existing exclusion to delete: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteExclusion( + request: protosTypes.google.logging.v2.IDeleteExclusionRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.deleteExclusion(request, options, callback); + } + getCmekSettings( + request: protosTypes.google.logging.v2.IGetCmekSettingsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, + {} | undefined + ] + >; + getCmekSettings( + request: protosTypes.google.logging.v2.IGetCmekSettingsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets the Logs Router CMEK settings for the given resource. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource for which to retrieve CMEK settings. + * + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * + * Example: `"organizations/12345/cmekSettings"`. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getCmekSettings( + request: protosTypes.google.logging.v2.IGetCmekSettingsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.getCmekSettings(request, options, callback); + } + updateCmekSettings( + request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, + {} | undefined + ] + >; + updateCmekSettings( + request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates the Logs Router CMEK settings for the given resource. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * + * {@link google.logging.v2.ConfigServiceV2.UpdateCmekSettings|UpdateCmekSettings} + * will fail if 1) `kms_key_name` is invalid, or 2) the associated service + * account does not have the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + * 3) access to the key is disabled. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for the CMEK settings to update. + * + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * + * Example: `"organizations/12345/cmekSettings"`. + * + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + * @param {google.logging.v2.CmekSettings} request.cmekSettings + * Required. The CMEK settings to update. + * + * See [Enabling CMEK for Logs + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask identifying which fields from `cmek_settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * + * See {@link google.protobuf.FieldMask|FieldMask} for more information. + * + * Example: `"updateMask=kmsKeyName"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateCmekSettings( + request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ICmekSettings, + protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.updateCmekSettings(request, options, callback); + } + + listBuckets( + request: protosTypes.google.logging.v2.IListBucketsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogBucket[], + protosTypes.google.logging.v2.IListBucketsRequest | null, + protosTypes.google.logging.v2.IListBucketsResponse + ] + >; + listBuckets( + request: protosTypes.google.logging.v2.IListBucketsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogBucket[], + protosTypes.google.logging.v2.IListBucketsRequest | null, + protosTypes.google.logging.v2.IListBucketsResponse + > + ): void; + /** + * Lists buckets (Beta). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogBucket]{@link google.logging.v2.LogBucket}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogBucket]{@link google.logging.v2.LogBucket} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListBucketsRequest]{@link google.logging.v2.ListBucketsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListBucketsResponse]{@link google.logging.v2.ListBucketsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listBuckets( + request: protosTypes.google.logging.v2.IListBucketsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogBucket[], + protosTypes.google.logging.v2.IListBucketsRequest | null, + protosTypes.google.logging.v2.IListBucketsResponse + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogBucket[], + protosTypes.google.logging.v2.IListBucketsRequest | null, + protosTypes.google.logging.v2.IListBucketsResponse + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogBucket[], + protosTypes.google.logging.v2.IListBucketsRequest | null, + protosTypes.google.logging.v2.IListBucketsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this._innerApiCalls.listBuckets(request, options, callback); + } + + /** + * Equivalent to {@link listBuckets}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listBuckets} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event. + */ + listBucketsStream( + request?: protosTypes.google.logging.v2.IListBucketsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this._descriptors.page.listBuckets.createStream( + this._innerApiCalls.listBuckets as gax.GaxCall, + request, + callSettings + ); + } + listSinks( + request: protosTypes.google.logging.v2.IListSinksRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogSink[], + protosTypes.google.logging.v2.IListSinksRequest | null, + protosTypes.google.logging.v2.IListSinksResponse + ] + >; + listSinks( + request: protosTypes.google.logging.v2.IListSinksRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogSink[], + protosTypes.google.logging.v2.IListSinksRequest | null, + protosTypes.google.logging.v2.IListSinksResponse + > + ): void; + /** + * Lists sinks. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogSink]{@link google.logging.v2.LogSink}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogSink]{@link google.logging.v2.LogSink} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListSinksRequest]{@link google.logging.v2.ListSinksRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listSinks( + request: protosTypes.google.logging.v2.IListSinksRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogSink[], + protosTypes.google.logging.v2.IListSinksRequest | null, + protosTypes.google.logging.v2.IListSinksResponse + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogSink[], + protosTypes.google.logging.v2.IListSinksRequest | null, + protosTypes.google.logging.v2.IListSinksResponse + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogSink[], + protosTypes.google.logging.v2.IListSinksRequest | null, + protosTypes.google.logging.v2.IListSinksResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this._innerApiCalls.listSinks(request, options, callback); + } + + /** + * Equivalent to {@link listSinks}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listSinks} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. + */ + listSinksStream( + request?: protosTypes.google.logging.v2.IListSinksRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this._descriptors.page.listSinks.createStream( + this._innerApiCalls.listSinks as gax.GaxCall, + request, + callSettings + ); + } + listExclusions( + request: protosTypes.google.logging.v2.IListExclusionsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogExclusion[], + protosTypes.google.logging.v2.IListExclusionsRequest | null, + protosTypes.google.logging.v2.IListExclusionsResponse + ] + >; + listExclusions( + request: protosTypes.google.logging.v2.IListExclusionsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogExclusion[], + protosTypes.google.logging.v2.IListExclusionsRequest | null, + protosTypes.google.logging.v2.IListExclusionsResponse + > + ): void; + /** + * Lists all the exclusions in a parent resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose exclusions are to be listed. + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogExclusion]{@link google.logging.v2.LogExclusion} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListExclusionsRequest]{@link google.logging.v2.ListExclusionsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listExclusions( + request: protosTypes.google.logging.v2.IListExclusionsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogExclusion[], + protosTypes.google.logging.v2.IListExclusionsRequest | null, + protosTypes.google.logging.v2.IListExclusionsResponse + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogExclusion[], + protosTypes.google.logging.v2.IListExclusionsRequest | null, + protosTypes.google.logging.v2.IListExclusionsResponse + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogExclusion[], + protosTypes.google.logging.v2.IListExclusionsRequest | null, + protosTypes.google.logging.v2.IListExclusionsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this._innerApiCalls.listExclusions(request, options, callback); + } + + /** + * Equivalent to {@link listExclusions}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listExclusions} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose exclusions are to be listed. + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. + */ + listExclusionsStream( + request?: protosTypes.google.logging.v2.IListExclusionsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this._descriptors.page.listExclusions.createStream( + this._innerApiCalls.listExclusions as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified billingAccountCmekSettings resource name string. + * + * @param {string} billing_account + * @returns {string} Resource name string. + */ + billingAccountCmekSettingsPath(billingAccount: string) { + return this._pathTemplates.billingAccountCmekSettingsPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Parse the billing_account from BillingAccountCmekSettings resource. + * + * @param {string} billingAccountCmekSettingsName + * A fully-qualified path representing billing_account_cmekSettings resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountCmekSettingsName( + billingAccountCmekSettingsName: string + ) { + return this._pathTemplates.billingAccountCmekSettingsPathTemplate.match( + billingAccountCmekSettingsName + ).billing_account; + } + + /** + * Return a fully-qualified billingAccountExclusion resource name string. + * + * @param {string} billing_account + * @param {string} exclusion + * @returns {string} Resource name string. + */ + billingAccountExclusionPath(billingAccount: string, exclusion: string) { + return this._pathTemplates.billingAccountExclusionPathTemplate.render({ + billing_account: billingAccount, + exclusion, + }); + } + + /** + * Parse the billing_account from BillingAccountExclusion resource. + * + * @param {string} billingAccountExclusionName + * A fully-qualified path representing billing_account_exclusion resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountExclusionName( + billingAccountExclusionName: string + ) { + return this._pathTemplates.billingAccountExclusionPathTemplate.match( + billingAccountExclusionName + ).billing_account; + } + + /** + * Parse the exclusion from BillingAccountExclusion resource. + * + * @param {string} billingAccountExclusionName + * A fully-qualified path representing billing_account_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromBillingAccountExclusionName( + billingAccountExclusionName: string + ) { + return this._pathTemplates.billingAccountExclusionPathTemplate.match( + billingAccountExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified billingAccountLocationBucket resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + billingAccountLocationBucketPath( + billingAccount: string, + location: string, + bucket: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.render({ + billing_account: billingAccount, + location, + bucket, + }); + } + + /** + * Parse the billing_account from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified billingAccountLog resource name string. + * + * @param {string} billing_account + * @param {string} log + * @returns {string} Resource name string. + */ + billingAccountLogPath(billingAccount: string, log: string) { + return this._pathTemplates.billingAccountLogPathTemplate.render({ + billing_account: billingAccount, + log, + }); + } + + /** + * Parse the billing_account from BillingAccountLog resource. + * + * @param {string} billingAccountLogName + * A fully-qualified path representing billing_account_log resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { + return this._pathTemplates.billingAccountLogPathTemplate.match( + billingAccountLogName + ).billing_account; + } + + /** + * Parse the log from BillingAccountLog resource. + * + * @param {string} billingAccountLogName + * A fully-qualified path representing billing_account_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromBillingAccountLogName(billingAccountLogName: string) { + return this._pathTemplates.billingAccountLogPathTemplate.match( + billingAccountLogName + ).log; + } + + /** + * Return a fully-qualified billingAccountSink resource name string. + * + * @param {string} billing_account + * @param {string} sink + * @returns {string} Resource name string. + */ + billingAccountSinkPath(billingAccount: string, sink: string) { + return this._pathTemplates.billingAccountSinkPathTemplate.render({ + billing_account: billingAccount, + sink, + }); + } + + /** + * Parse the billing_account from BillingAccountSink resource. + * + * @param {string} billingAccountSinkName + * A fully-qualified path representing billing_account_sink resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountSinkName( + billingAccountSinkName: string + ) { + return this._pathTemplates.billingAccountSinkPathTemplate.match( + billingAccountSinkName + ).billing_account; + } + + /** + * Parse the sink from BillingAccountSink resource. + * + * @param {string} billingAccountSinkName + * A fully-qualified path representing billing_account_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { + return this._pathTemplates.billingAccountSinkPathTemplate.match( + billingAccountSinkName + ).sink; + } + + /** + * Return a fully-qualified folderCmekSettings resource name string. + * + * @param {string} folder + * @returns {string} Resource name string. + */ + folderCmekSettingsPath(folder: string) { + return this._pathTemplates.folderCmekSettingsPathTemplate.render({ + folder, + }); + } + + /** + * Parse the folder from FolderCmekSettings resource. + * + * @param {string} folderCmekSettingsName + * A fully-qualified path representing folder_cmekSettings resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { + return this._pathTemplates.folderCmekSettingsPathTemplate.match( + folderCmekSettingsName + ).folder; + } + + /** + * Return a fully-qualified folderExclusion resource name string. + * + * @param {string} folder + * @param {string} exclusion + * @returns {string} Resource name string. + */ + folderExclusionPath(folder: string, exclusion: string) { + return this._pathTemplates.folderExclusionPathTemplate.render({ + folder, + exclusion, + }); + } + + /** + * Parse the folder from FolderExclusion resource. + * + * @param {string} folderExclusionName + * A fully-qualified path representing folder_exclusion resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderExclusionName(folderExclusionName: string) { + return this._pathTemplates.folderExclusionPathTemplate.match( + folderExclusionName + ).folder; + } + + /** + * Parse the exclusion from FolderExclusion resource. + * + * @param {string} folderExclusionName + * A fully-qualified path representing folder_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromFolderExclusionName(folderExclusionName: string) { + return this._pathTemplates.folderExclusionPathTemplate.match( + folderExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified folderLocationBucket resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + folderLocationBucketPath(folder: string, location: string, bucket: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.render({ + folder, + location, + bucket, + }); + } + + /** + * Parse the folder from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).folder; + } + + /** + * Parse the location from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified folderLog resource name string. + * + * @param {string} folder + * @param {string} log + * @returns {string} Resource name string. + */ + folderLogPath(folder: string, log: string) { + return this._pathTemplates.folderLogPathTemplate.render({ + folder, + log, + }); + } + + /** + * Parse the folder from FolderLog resource. + * + * @param {string} folderLogName + * A fully-qualified path representing folder_log resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLogName(folderLogName: string) { + return this._pathTemplates.folderLogPathTemplate.match(folderLogName) + .folder; + } + + /** + * Parse the log from FolderLog resource. + * + * @param {string} folderLogName + * A fully-qualified path representing folder_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromFolderLogName(folderLogName: string) { + return this._pathTemplates.folderLogPathTemplate.match(folderLogName).log; + } + + /** + * Return a fully-qualified folderSink resource name string. + * + * @param {string} folder + * @param {string} sink + * @returns {string} Resource name string. + */ + folderSinkPath(folder: string, sink: string) { + return this._pathTemplates.folderSinkPathTemplate.render({ + folder, + sink, + }); + } + + /** + * Parse the folder from FolderSink resource. + * + * @param {string} folderSinkName + * A fully-qualified path representing folder_sink resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderSinkName(folderSinkName: string) { + return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + .folder; + } + + /** + * Parse the sink from FolderSink resource. + * + * @param {string} folderSinkName + * A fully-qualified path representing folder_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromFolderSinkName(folderSinkName: string) { + return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + .sink; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this._pathTemplates.locationPathTemplate.render({ + project, + location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this._pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this._pathTemplates.locationPathTemplate.match(locationName) + .location; + } + + /** + * Return a fully-qualified logMetric resource name string. + * + * @param {string} project + * @param {string} metric + * @returns {string} Resource name string. + */ + logMetricPath(project: string, metric: string) { + return this._pathTemplates.logMetricPathTemplate.render({ + project, + metric, + }); + } + + /** + * Parse the project from LogMetric resource. + * + * @param {string} logMetricName + * A fully-qualified path representing LogMetric resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLogMetricName(logMetricName: string) { + return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + .project; + } + + /** + * Parse the metric from LogMetric resource. + * + * @param {string} logMetricName + * A fully-qualified path representing LogMetric resource. + * @returns {string} A string representing the metric. + */ + matchMetricFromLogMetricName(logMetricName: string) { + return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + .metric; + } + + /** + * Return a fully-qualified organizationCmekSettings resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationCmekSettingsPath(organization: string) { + return this._pathTemplates.organizationCmekSettingsPathTemplate.render({ + organization, + }); + } + + /** + * Parse the organization from OrganizationCmekSettings resource. + * + * @param {string} organizationCmekSettingsName + * A fully-qualified path representing organization_cmekSettings resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationCmekSettingsName( + organizationCmekSettingsName: string + ) { + return this._pathTemplates.organizationCmekSettingsPathTemplate.match( + organizationCmekSettingsName + ).organization; + } + + /** + * Return a fully-qualified organizationExclusion resource name string. + * + * @param {string} organization + * @param {string} exclusion + * @returns {string} Resource name string. + */ + organizationExclusionPath(organization: string, exclusion: string) { + return this._pathTemplates.organizationExclusionPathTemplate.render({ + organization, + exclusion, + }); + } + + /** + * Parse the organization from OrganizationExclusion resource. + * + * @param {string} organizationExclusionName + * A fully-qualified path representing organization_exclusion resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationExclusionName( + organizationExclusionName: string + ) { + return this._pathTemplates.organizationExclusionPathTemplate.match( + organizationExclusionName + ).organization; + } + + /** + * Parse the exclusion from OrganizationExclusion resource. + * + * @param {string} organizationExclusionName + * A fully-qualified path representing organization_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromOrganizationExclusionName( + organizationExclusionName: string + ) { + return this._pathTemplates.organizationExclusionPathTemplate.match( + organizationExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified organizationLocationBucket resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + organizationLocationBucketPath( + organization: string, + location: string, + bucket: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.render({ + organization, + location, + bucket, + }); + } + + /** + * Parse the organization from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified organizationLog resource name string. + * + * @param {string} organization + * @param {string} log + * @returns {string} Resource name string. + */ + organizationLogPath(organization: string, log: string) { + return this._pathTemplates.organizationLogPathTemplate.render({ + organization, + log, + }); + } + + /** + * Parse the organization from OrganizationLog resource. + * + * @param {string} organizationLogName + * A fully-qualified path representing organization_log resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLogName(organizationLogName: string) { + return this._pathTemplates.organizationLogPathTemplate.match( + organizationLogName + ).organization; + } + + /** + * Parse the log from OrganizationLog resource. + * + * @param {string} organizationLogName + * A fully-qualified path representing organization_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromOrganizationLogName(organizationLogName: string) { + return this._pathTemplates.organizationLogPathTemplate.match( + organizationLogName + ).log; + } + + /** + * Return a fully-qualified organizationSink resource name string. + * + * @param {string} organization + * @param {string} sink + * @returns {string} Resource name string. + */ + organizationSinkPath(organization: string, sink: string) { + return this._pathTemplates.organizationSinkPathTemplate.render({ + organization, + sink, + }); + } + + /** + * Parse the organization from OrganizationSink resource. + * + * @param {string} organizationSinkName + * A fully-qualified path representing organization_sink resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { + return this._pathTemplates.organizationSinkPathTemplate.match( + organizationSinkName + ).organization; + } + + /** + * Parse the sink from OrganizationSink resource. + * + * @param {string} organizationSinkName + * A fully-qualified path representing organization_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromOrganizationSinkName(organizationSinkName: string) { + return this._pathTemplates.organizationSinkPathTemplate.match( + organizationSinkName + ).sink; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this._pathTemplates.projectPathTemplate.render({ + project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this._pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectCmekSettings resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectCmekSettingsPath(project: string) { + return this._pathTemplates.projectCmekSettingsPathTemplate.render({ + project, + }); + } + + /** + * Parse the project from ProjectCmekSettings resource. + * + * @param {string} projectCmekSettingsName + * A fully-qualified path representing project_cmekSettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { + return this._pathTemplates.projectCmekSettingsPathTemplate.match( + projectCmekSettingsName + ).project; + } + + /** + * Return a fully-qualified projectExclusion resource name string. + * + * @param {string} project + * @param {string} exclusion + * @returns {string} Resource name string. + */ + projectExclusionPath(project: string, exclusion: string) { + return this._pathTemplates.projectExclusionPathTemplate.render({ + project, + exclusion, + }); + } + + /** + * Parse the project from ProjectExclusion resource. + * + * @param {string} projectExclusionName + * A fully-qualified path representing project_exclusion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectExclusionName(projectExclusionName: string) { + return this._pathTemplates.projectExclusionPathTemplate.match( + projectExclusionName + ).project; + } + + /** + * Parse the exclusion from ProjectExclusion resource. + * + * @param {string} projectExclusionName + * A fully-qualified path representing project_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromProjectExclusionName(projectExclusionName: string) { + return this._pathTemplates.projectExclusionPathTemplate.match( + projectExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified projectLocationBucket resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + projectLocationBucketPath(project: string, location: string, bucket: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.render({ + project, + location, + bucket, + }); + } + + /** + * Parse the project from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).project; + } + + /** + * Parse the location from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketName( + projectLocationBucketName: string + ) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified projectLog resource name string. + * + * @param {string} project + * @param {string} log + * @returns {string} Resource name string. + */ + projectLogPath(project: string, log: string) { + return this._pathTemplates.projectLogPathTemplate.render({ + project, + log, + }); + } + + /** + * Parse the project from ProjectLog resource. + * + * @param {string} projectLogName + * A fully-qualified path representing project_log resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLogName(projectLogName: string) { + return this._pathTemplates.projectLogPathTemplate.match(projectLogName) + .project; + } + + /** + * Parse the log from ProjectLog resource. + * + * @param {string} projectLogName + * A fully-qualified path representing project_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromProjectLogName(projectLogName: string) { + return this._pathTemplates.projectLogPathTemplate.match(projectLogName).log; + } + + /** + * Return a fully-qualified projectSink resource name string. + * + * @param {string} project + * @param {string} sink + * @returns {string} Resource name string. + */ + projectSinkPath(project: string, sink: string) { + return this._pathTemplates.projectSinkPathTemplate.render({ + project, + sink, + }); + } + + /** + * Parse the project from ProjectSink resource. + * + * @param {string} projectSinkName + * A fully-qualified path representing project_sink resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSinkName(projectSinkName: string) { + return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + .project; + } + + /** + * Parse the sink from ProjectSink resource. + * + * @param {string} projectSinkName + * A fully-qualified path representing project_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromProjectSinkName(projectSinkName: string) { + return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + .sink; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.configServiceV2Stub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index 1acb08853ca..eed1206a48d 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -2,36 +2,33 @@ "interfaces": { "google.logging.v2.ConfigServiceV2": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "retry_params": { "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "ListBuckets": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetBucket": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateBucket": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -46,18 +43,18 @@ "retry_params_name": "default" }, "CreateSink": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateSink": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteSink": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListExclusions": { @@ -71,27 +68,25 @@ "retry_params_name": "default" }, "CreateExclusion": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateExclusion": { - "timeout_millis": 60000, + "timeout_millis": 120000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteExclusion": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetCmekSettings": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateCmekSettings": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/handwritten/logging/src/v2/config_service_v2_proto_list.json b/handwritten/logging/src/v2/config_service_v2_proto_list.json index 880b32f9275..3103c1e58c0 100644 --- a/handwritten/logging/src/v2/config_service_v2_proto_list.json +++ b/handwritten/logging/src/v2/config_service_v2_proto_list.json @@ -1,3 +1,6 @@ [ - "../../protos/google/logging/v2/logging_config.proto" + "../../protos/google/logging/v2/log_entry.proto", + "../../protos/google/logging/v2/logging.proto", + "../../protos/google/logging/v2/logging_config.proto", + "../../protos/google/logging/v2/logging_metrics.proto" ] diff --git a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js b/handwritten/logging/src/v2/doc/google/api/doc_distribution.js deleted file mode 100644 index a2b267280e1..00000000000 --- a/handwritten/logging/src/v2/doc/google/api/doc_distribution.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `Distribution` contains summary statistics for a population of values. It - * optionally contains a histogram representing the distribution of those values - * across a set of buckets. - * - * The summary statistics are the count, mean, sum of the squared deviation from - * the mean, the minimum, and the maximum of the set of population of values. - * The histogram is based on a sequence of buckets and gives a count of values - * that fall into each bucket. The boundaries of the buckets are given either - * explicitly or by formulas for buckets of fixed or exponentially increasing - * widths. - * - * Although it is not forbidden, it is generally a bad idea to include - * non-finite values (infinities or NaNs) in the population of values, as this - * will render the `mean` and `sum_of_squared_deviation` fields meaningless. - * - * @property {number} count - * The number of values in the population. Must be non-negative. This value - * must equal the sum of the values in `bucket_counts` if a histogram is - * provided. - * - * @property {number} mean - * The arithmetic mean of the values in the population. If `count` is zero - * then this field must be zero. - * - * @property {number} sumOfSquaredDeviation - * The sum of squared deviations from the mean of the values in the - * population. For values x_i this is: - * - * Sum\[i=1..n](x_1 - mean)^2 - * - * Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition - * describes Welford's method for accumulating this sum in one pass. - * - * If `count` is zero then this field must be zero. - * - * @property {Object} range - * If specified, contains the range of the population values. The field - * must not be present if the `count` is zero. - * - * This object should have the same structure as [Range]{@link google.api.Range} - * - * @property {Object} bucketOptions - * Defines the histogram bucket boundaries. If the distribution does not - * contain a histogram, then omit this field. - * - * This object should have the same structure as [BucketOptions]{@link google.api.BucketOptions} - * - * @property {number[]} bucketCounts - * The number of values in each bucket of the histogram, as described in - * `bucket_options`. If the distribution does not have a histogram, then omit - * this field. If there is a histogram, then the sum of the values in - * `bucket_counts` must equal the value in the `count` field of the - * distribution. - * - * If present, `bucket_counts` should contain N values, where N is the number - * of buckets specified in `bucket_options`. If you supply fewer than N - * values, the remaining values are assumed to be 0. - * - * The order of the values in `bucket_counts` follows the bucket numbering - * schemes described for the three bucket types. The first value must be the - * count for the underflow bucket (number 0). The next N-2 values are the - * counts for the finite buckets (number 1 through N-2). The N'th value in - * `bucket_counts` is the count for the overflow bucket (number N-1). - * - * @property {Object[]} exemplars - * Must be in increasing order of `value` field. - * - * This object should have the same structure as [Exemplar]{@link google.api.Exemplar} - * - * @typedef Distribution - * @memberof google.api - * @see [google.api.Distribution definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} - */ -const Distribution = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * `BucketOptions` describes the bucket boundaries used to create a histogram - * for the distribution. The buckets can be in a linear sequence, an - * exponential sequence, or each bucket can be specified explicitly. - * `BucketOptions` does not include the number of values in each bucket. - * - * A bucket has an inclusive lower bound and exclusive upper bound for the - * values that are counted for that bucket. The upper bound of a bucket must - * be strictly greater than the lower bound. The sequence of N buckets for a - * distribution consists of an underflow bucket (number 0), zero or more - * finite buckets (number 1 through N - 2) and an overflow bucket (number N - - * 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the - * same as the upper bound of bucket i - 1. The buckets span the whole range - * of finite values: lower bound of the underflow bucket is -infinity and the - * upper bound of the overflow bucket is +infinity. The finite buckets are - * so-called because both bounds are finite. - * - * @property {Object} linearBuckets - * The linear bucket. - * - * This object should have the same structure as [Linear]{@link google.api.Linear} - * - * @property {Object} exponentialBuckets - * The exponential buckets. - * - * This object should have the same structure as [Exponential]{@link google.api.Exponential} - * - * @property {Object} explicitBuckets - * The explicit buckets. - * - * This object should have the same structure as [Explicit]{@link google.api.Explicit} - * - * @typedef BucketOptions - * @memberof google.api - * @see [google.api.Distribution.BucketOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} - */ - BucketOptions: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Specifies a linear sequence of buckets that all have the same width - * (except overflow and underflow). Each bucket represents a constant - * absolute uncertainty on the specific value in the bucket. - * - * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - * following boundaries: - * - * Upper bound (0 <= i < N-1): offset + (width * i). - * Lower bound (1 <= i < N): offset + (width * (i - 1)). - * - * @property {number} numFiniteBuckets - * Must be greater than 0. - * - * @property {number} width - * Must be greater than 0. - * - * @property {number} offset - * Lower bound of the first bucket. - * - * @typedef Linear - * @memberof google.api - * @see [google.api.Distribution.BucketOptions.Linear definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} - */ - Linear: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Specifies an exponential sequence of buckets that have a width that is - * proportional to the value of the lower bound. Each bucket represents a - * constant relative uncertainty on a specific value in the bucket. - * - * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - * following boundaries: - * - * Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). - * Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). - * - * @property {number} numFiniteBuckets - * Must be greater than 0. - * - * @property {number} growthFactor - * Must be greater than 1. - * - * @property {number} scale - * Must be greater than 0. - * - * @typedef Exponential - * @memberof google.api - * @see [google.api.Distribution.BucketOptions.Exponential definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} - */ - Exponential: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Specifies a set of buckets with arbitrary widths. - * - * There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following - * boundaries: - * - * Upper bound (0 <= i < N-1): bounds[i] - * Lower bound (1 <= i < N); bounds[i - 1] - * - * The `bounds` field must contain at least one element. If `bounds` has - * only one element, then there are no finite buckets, and that single - * element is the common boundary of the overflow and underflow buckets. - * - * @property {number[]} bounds - * The values must be monotonically increasing. - * - * @typedef Explicit - * @memberof google.api - * @see [google.api.Distribution.BucketOptions.Explicit definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} - */ - Explicit: { - // This is for documentation. Actual contents will be loaded by gRPC. - } - } -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_label.js b/handwritten/logging/src/v2/doc/google/api/doc_label.js deleted file mode 100644 index 24d32531adc..00000000000 --- a/handwritten/logging/src/v2/doc/google/api/doc_label.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A description of a label. - * - * @property {string} key - * The label key. - * - * @property {number} valueType - * The type of data that can be assigned to the label. - * - * The number should be among the values of [ValueType]{@link google.api.ValueType} - * - * @property {string} description - * A human-readable description for the label. - * - * @typedef LabelDescriptor - * @memberof google.api - * @see [google.api.LabelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/label.proto} - */ -const LabelDescriptor = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Value types that can be used as label values. - * - * @enum {number} - * @memberof google.api - */ - ValueType: { - - /** - * A variable-length string. This is the default. - */ - STRING: 0, - - /** - * Boolean; true or false. - */ - BOOL: 1, - - /** - * A 64-bit signed integer. - */ - INT64: 2 - } -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_metric.js b/handwritten/logging/src/v2/doc/google/api/doc_metric.js deleted file mode 100644 index 455d1b756cb..00000000000 --- a/handwritten/logging/src/v2/doc/google/api/doc_metric.js +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Defines a metric type and its schema. Once a metric descriptor is created, - * deleting or altering it stops data collection and makes the metric type's - * existing data unusable. - * - * @property {string} name - * The resource name of the metric descriptor. - * - * @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` or `external.googleapis.com`. Metric types should - * use a natural hierarchical grouping. For example: - * - * "custom.googleapis.com/invoice/paid/amount" - * "external.googleapis.com/prometheus/up" - * "appengine.googleapis.com/http/server/response_latencies" - * - * @property {Object[]} labels - * The set of labels that can be used to describe a specific - * instance of this metric type. For example, the - * `appengine.googleapis.com/http/server/response_latencies` metric - * type has a label for the HTTP response code, `response_code`, so - * you can look at latencies for successful responses or just - * for responses that failed. - * - * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} - * - * @property {number} metricKind - * Whether the metric records instantaneous values, changes to a value, etc. - * Some combinations of `metric_kind` and `value_type` might not be supported. - * - * The number should be among the values of [MetricKind]{@link google.api.MetricKind} - * - * @property {number} valueType - * Whether the measurement is an integer, a floating-point number, etc. - * Some combinations of `metric_kind` and `value_type` might not be supported. - * - * The number should be among the values of [ValueType]{@link google.api.ValueType} - * - * @property {string} unit - * The units in which the metric value is reported. It is only applicable - * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - * defines the representation of the stored metric values. - * - * Different systems may scale the values to be more easily displayed (so a - * value of `0.02KBy` _might_ be displayed as `20By`, and a value of - * `3523KBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is - * `KBy`, then the value of the metric is always in thousands of bytes, no - * matter how it may be displayed.. - * - * If you want a custom metric to record the exact number of CPU-seconds used - * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is - * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 - * CPU-seconds, then the value is written as `12005`. - * - * Alternatively, if you want a custome metric to record data in a more - * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is - * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), - * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). - * - * The supported units are a subset of [The Unified Code for Units of - * Measure](http://unitsofmeasure.org/ucum.html) standard: - * - * **Basic units (UNIT)** - * - * * `bit` bit - * * `By` byte - * * `s` second - * * `min` minute - * * `h` hour - * * `d` day - * - * **Prefixes (PREFIX)** - * - * * `k` kilo (10^3) - * * `M` mega (10^6) - * * `G` giga (10^9) - * * `T` tera (10^12) - * * `P` peta (10^15) - * * `E` exa (10^18) - * * `Z` zetta (10^21) - * * `Y` yotta (10^24) - * - * * `m` milli (10^-3) - * * `u` micro (10^-6) - * * `n` nano (10^-9) - * * `p` pico (10^-12) - * * `f` femto (10^-15) - * * `a` atto (10^-18) - * * `z` zepto (10^-21) - * * `y` yocto (10^-24) - * - * * `Ki` kibi (2^10) - * * `Mi` mebi (2^20) - * * `Gi` gibi (2^30) - * * `Ti` tebi (2^40) - * * `Pi` pebi (2^50) - * - * **Grammar** - * - * The grammar also includes these connectors: - * - * * `/` division or ratio (as an infix operator). For examples, - * `kBy/{email}` or `MiBy/10ms` (although you should almost never - * have `/s` in a metric `unit`; rates should always be computed at - * query time from the underlying cumulative or delta value). - * * `.` multiplication or composition (as an infix operator). For - * examples, `GBy.d` or `k{watt}.h`. - * - * The grammar for a unit is as follows: - * - * Expression = Component { "." Component } { "/" Component } ; - * - * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] - * | Annotation - * | "1" - * ; - * - * Annotation = "{" NAME "}" ; - * - * Notes: - * - * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation - * is used alone, then the unit is equivalent to `1`. For examples, - * `{request}/s == 1/s`, `By{transmitted}/s == By/s`. - * * `NAME` is a sequence of non-blank printable ASCII characters not - * containing `{` or `}`. - * * `1` represents a unitary [dimensionless - * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such - * as in `1/s`. It is typically used when none of the basic units are - * appropriate. For example, "new users per day" can be represented as - * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new - * users). Alternatively, "thousands of page views per day" would be - * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric - * value of `5.3` would mean "5300 page views per day"). - * * `%` represents dimensionless value of 1/100, and annotates values giving - * a percentage (so the metric values are typically in the range of 0..100, - * and a metric value `3` means "3 percent"). - * * `10^2.%` indicates a metric contains a ratio, typically in the range - * 0..1, that will be multiplied by 100 and displayed as a percentage - * (so a metric value `0.03` means "3 percent"). - * - * @property {string} description - * A detailed description of the metric, which can be used in documentation. - * - * @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". - * This field is optional but it is recommended to be set for any metrics - * associated with user-visible concepts, such as Quota. - * - * @property {Object} metadata - * Optional. Metadata which can be used to guide usage of the metric. - * - * This object should have the same structure as [MetricDescriptorMetadata]{@link google.api.MetricDescriptorMetadata} - * - * @property {number} launchStage - * Optional. The launch stage of the metric definition. - * - * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} - * - * @typedef MetricDescriptor - * @memberof google.api - * @see [google.api.MetricDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} - */ -const MetricDescriptor = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Additional annotations that can be used to guide the usage of a metric. - * - * @property {number} launchStage - * Deprecated. Please use the MetricDescriptor.launch_stage instead. - * The launch stage of the metric definition. - * - * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} - * - * @property {Object} samplePeriod - * The sampling period of metric data points. For metrics which are written - * periodically, consecutive data points are stored at this time interval, - * excluding data loss due to errors. Metrics with a higher granularity have - * a smaller sampling period. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} ingestDelay - * The delay of data points caused by ingestion. Data points older than this - * age are guaranteed to be ingested and available to be read, excluding - * data loss due to errors. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @typedef MetricDescriptorMetadata - * @memberof google.api - * @see [google.api.MetricDescriptor.MetricDescriptorMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} - */ - MetricDescriptorMetadata: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * The kind of measurement. It describes how the data is reported. - * - * @enum {number} - * @memberof google.api - */ - MetricKind: { - - /** - * Do not use this default value. - */ - METRIC_KIND_UNSPECIFIED: 0, - - /** - * An instantaneous measurement of a value. - */ - GAUGE: 1, - - /** - * The change in a value during a time interval. - */ - DELTA: 2, - - /** - * A value accumulated over a time interval. Cumulative - * measurements in a time series should have the same start time - * and increasing end times, until an event resets the cumulative - * value to zero and sets a new start time for the following - * points. - */ - CUMULATIVE: 3 - }, - - /** - * The value type of a metric. - * - * @enum {number} - * @memberof google.api - */ - ValueType: { - - /** - * Do not use this default value. - */ - VALUE_TYPE_UNSPECIFIED: 0, - - /** - * The value is a boolean. - * This value type can be used only if the metric kind is `GAUGE`. - */ - BOOL: 1, - - /** - * The value is a signed 64-bit integer. - */ - INT64: 2, - - /** - * The value is a double precision floating point number. - */ - DOUBLE: 3, - - /** - * The value is a text string. - * This value type can be used only if the metric kind is `GAUGE`. - */ - STRING: 4, - - /** - * The value is a `Distribution`. - */ - DISTRIBUTION: 5, - - /** - * The value is money. - */ - MONEY: 6 - } -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js b/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js deleted file mode 100644 index 8f6519290c0..00000000000 --- a/handwritten/logging/src/v2/doc/google/api/doc_monitored_resource.js +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * An object that describes the schema of a MonitoredResource object using a - * type name and a set of labels. For example, the monitored resource - * descriptor for Google Compute Engine VM instances has a type of - * `"gce_instance"` and specifies the use of the labels `"instance_id"` and - * `"zone"` to identify particular VM instances. - * - * Different APIs can support different monitored resource types. APIs generally - * provide a `list` method that returns the monitored resource descriptors used - * by the API. - * - * @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} 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} 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 {Object[]} 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"`. - * - * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} - * - * @property {number} launchStage - * Optional. The launch stage of the monitored resource definition. - * - * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} - * - * @typedef MonitoredResourceDescriptor - * @memberof google.api - * @see [google.api.MonitoredResourceDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} - */ -const MonitoredResourceDescriptor = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * An object representing a resource that can be used for monitoring, logging, - * billing, or other purposes. Examples include virtual machine instances, - * databases, and storage devices such as disks. The `type` field identifies a - * MonitoredResourceDescriptor object that describes the resource's - * schema. Information in the `labels` field identifies the actual resource and - * its attributes according to the schema. For example, a particular Compute - * Engine VM instance could be represented by the following object, because the - * MonitoredResourceDescriptor for `"gce_instance"` has labels - * `"instance_id"` and `"zone"`: - * - * { "type": "gce_instance", - * "labels": { "instance_id": "12345678901234", - * "zone": "us-central1-a" }} - * - * @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 Compute Engine VM instance is `gce_instance`. - * - * @property {Object.} labels - * Required. Values for all of the labels listed in the associated monitored - * resource descriptor. For example, Compute Engine VM instances use the - * labels `"project_id"`, `"instance_id"`, and `"zone"`. - * - * @typedef MonitoredResource - * @memberof google.api - * @see [google.api.MonitoredResource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/monitored_resource.proto} - */ -const MonitoredResource = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js b/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js deleted file mode 100644 index de897f53ab9..00000000000 --- a/handwritten/logging/src/v2/doc/google/logging/type/doc_http_request.js +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A common proto for logging HTTP requests. Only contains semantics - * defined by the HTTP specification. Product-specific logging - * information MUST be defined in a separate message. - * - * @property {string} requestMethod - * The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. - * - * @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 {number} requestSize - * The size of the HTTP request message in bytes, including the request - * headers and the request body. - * - * @property {number} status - * The response code indicating the status of response. - * Examples: 200, 404. - * - * @property {number} responseSize - * The size of the HTTP response message sent back to the client, in bytes, - * including the response headers and the response body. - * - * @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} 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} 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 {Object} latency - * The request processing latency on the server, from the time the request was - * received until the response was sent. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {boolean} cacheLookup - * Whether or not a cache lookup was attempted. - * - * @property {boolean} cacheHit - * Whether or not an entity was served from cache - * (with or without validation). - * - * @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 {number} cacheFillBytes - * The number of HTTP response bytes inserted into cache. Set only when a - * cache fill was attempted. - * - * @property {string} protocol - * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" - * - * @typedef HttpRequest - * @memberof google.logging.type - * @see [google.logging.type.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/type/http_request.proto} - */ -const HttpRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js deleted file mode 100644 index 3f0e80f3e1b..00000000000 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_log_entry.js +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * An individual entry in a log. - * - * @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]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * - * @property {Object} resource - * Required. The monitored resource that produced 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. - * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} - * - * @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. - * - * The following protocol buffer types are supported; user-defined types - * are not supported: - * - * "type.googleapis.com/google.cloud.audit.AuditLog" - * "type.googleapis.com/google.appengine.logging.v1.RequestLog" - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @property {string} textPayload - * The log entry payload, represented as a Unicode string (UTF-8). - * - * @property {Object} jsonPayload - * The log entry payload, represented as a structure that is - * expressed as a JSON object. - * - * This object should have the same structure as [Struct]{@link google.protobuf.Struct} - * - * @property {Object} timestamp - * Optional. The time the event described by the log entry occurred. This time is used - * to compute the log entry's age and to enforce the logs retention period. - * If this field is omitted in a new log entry, then Logging assigns it the - * current time. Timestamps have nanosecond accuracy, but trailing zeros in - * the fractional seconds might be omitted when the timestamp is displayed. - * - * Incoming log entries should have timestamps that are no more than the [logs - * retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours - * in the future. Log entries outside those time boundaries will not be - * available when calling `entries.list`, but those log entries can still be - * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} receiveTimestamp - * Output only. The time the log entry was received by Logging. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} severity - * Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. - * - * The number should be among the values of [LogSeverity]{@link google.logging.type.LogSeverity} - * - * @property {string} insertId - * Optional. A unique identifier for the log entry. If you provide a value, then - * Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * - * @property {Object} httpRequest - * Optional. Information about the HTTP request associated with this log entry, if - * applicable. - * - * This object should have the same structure as [HttpRequest]{@link google.logging.type.HttpRequest} - * - * @property {Object.} labels - * Optional. A set of user-defined (key, value) data that provides additional - * information about the log entry. - * - * @property {Object} operation - * Optional. Information about an operation associated with the log entry, if - * applicable. - * - * This object should have the same structure as [LogEntryOperation]{@link google.logging.v2.LogEntryOperation} - * - * @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} spanId - * Optional. The span ID within the trace associated with the log entry. - * - * For Trace spans, this is the same format that the Trace API v2 uses: a - * 16-character hexadecimal encoding of an 8-byte array, such as - * `000000000000004a`. - * - * @property {boolean} traceSampled - * Optional. The sampling decision of the trace associated with the log entry. - * - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * - * @property {Object} sourceLocation - * Optional. Source code location information associated with the log entry, if any. - * - * This object should have the same structure as [LogEntrySourceLocation]{@link google.logging.v2.LogEntrySourceLocation} - * - * @typedef LogEntry - * @memberof google.logging.v2 - * @see [google.logging.v2.LogEntry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} - */ -const LogEntry = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Additional information about a potentially long-running operation with which - * a log entry is associated. - * - * @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} first - * Optional. Set this to True if this is the first log entry in the operation. - * - * @property {boolean} last - * Optional. Set this to True if this is the last log entry in the operation. - * - * @typedef LogEntryOperation - * @memberof google.logging.v2 - * @see [google.logging.v2.LogEntryOperation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} - */ -const LogEntryOperation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Additional information about the source code location that produced the log - * entry. - * - * @property {string} file - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * - * @property {number} 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). - * - * @typedef LogEntrySourceLocation - * @memberof google.logging.v2 - * @see [google.logging.v2.LogEntrySourceLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/log_entry.proto} - */ -const LogEntrySourceLocation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js deleted file mode 100644 index 82725e7310d..00000000000 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging.js +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * The parameters to DeleteLog. - * - * @property {string} logName - * Required. The resource name of the log to delete: - * - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * For more information about log names, see - * LogEntry. - * - * @typedef DeleteLogRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.DeleteLogRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const DeleteLogRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to WriteLogEntries. - * - * @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]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * - * `[LOG_ID]` must be URL-encoded. For example: - * - * "projects/my-project-id/logs/syslog" - * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * - * @property {Object} 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. - * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} - * - * @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 {Object[]} entries - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * LogEntry type. - * - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than - * 24 hours in the future will not be available when calling `entries.list`. - * However, those log entries can still be - * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, - * you should try to include several log entries in this list, - * rather than calling this method for each individual log entry. - * - * This object should have the same structure as [LogEntry]{@link google.logging.v2.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, then the response status is the error associated - * with one of the failed entries and the response includes error details - * keyed by the entries' zero-based index in the `entries.write` method. - * - * @property {boolean} dryRun - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * - * @typedef WriteLogEntriesRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.WriteLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const WriteLogEntriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Result returned from WriteLogEntries. - * @typedef WriteLogEntriesResponse - * @memberof google.logging.v2 - * @see [google.logging.v2.WriteLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const WriteLogEntriesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `ListLogEntries`. - * - * @property {string[]} resourceNames - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * - * Projects listed in the `project_ids` field are added to this list. - * - * @property {string} filter - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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} 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 their `insert_id` values. - * - * @property {number} pageSize - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * - * @property {string} pageToken - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * @typedef ListLogEntriesRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.ListLogEntriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const ListLogEntriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Result returned from `ListLogEntries`. - * - * @property {Object[]} entries - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * - * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} - * - * @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 ListLogEntriesResponse - * @memberof google.logging.v2 - * @see [google.logging.v2.ListLogEntriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const ListLogEntriesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to ListMonitoredResourceDescriptors - * - * @property {number} 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} 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. - * - * @typedef ListMonitoredResourceDescriptorsRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const ListMonitoredResourceDescriptorsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Result returned from ListMonitoredResourceDescriptors. - * - * @property {Object[]} resourceDescriptors - * A list of resource descriptors. - * - * This object should have the same structure as [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} - * - * @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 ListMonitoredResourceDescriptorsResponse - * @memberof google.logging.v2 - * @see [google.logging.v2.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const ListMonitoredResourceDescriptorsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to ListLogs. - * - * @property {string} parent - * Required. The resource name that owns the logs: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * @property {number} 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} 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. - * - * @typedef ListLogsRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.ListLogsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const ListLogsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Result returned from ListLogs. - * - * @property {string[]} logNames - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/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 ListLogsResponse - * @memberof google.logging.v2 - * @see [google.logging.v2.ListLogsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging.proto} - */ -const ListLogsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js b/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js deleted file mode 100644 index 3872e8d977c..00000000000 --- a/handwritten/logging/src/v2/doc/google/logging/v2/doc_logging_config.js +++ /dev/null @@ -1,908 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Describes a repository of logs (Beta). - * - * @property {string} name - * The resource name of the bucket. - * For example: - * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The - * supported locations are: - * "global" - * "us-central1" - * - * For the location of `global` it is unspecified where logs are actually - * stored. - * Once a bucket has been created, the location can not be changed. - * - * @property {string} description - * Describes this bucket. - * - * @property {Object} createTime - * Output only. The creation timestamp of the bucket. This is not set for any of the - * default buckets. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} updateTime - * Output only. The last update timestamp of the bucket. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} retentionDays - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. - * If this value is set to zero at bucket creation time, the default time of - * 30 days will be used. - * - * @property {number} lifecycleState - * Output only. The bucket lifecycle state. - * - * The number should be among the values of [LifecycleState]{@link google.logging.v2.LifecycleState} - * - * @typedef LogBucket - * @memberof google.logging.v2 - * @see [google.logging.v2.LogBucket definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const LogBucket = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Describes a sink used to export log entries to one of the following - * destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a - * Cloud Pub/Sub topic. A logs filter controls which log entries are exported. - * The sink must be created within a project, organization, billing account, or - * folder. - * - * @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. - * First character has to be alphanumeric. - * - * @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](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * @property {string} filter - * Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only - * exported log entries are those that are in the resource owning the sink and - * that match the filter. For example: - * - * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - * - * @property {string} description - * Optional. A description of this sink. - * The maximum length of the description is 8000 characters. - * - * @property {boolean} disabled - * Optional. If set to True, then this sink is disabled and it does not - * export any log entries. - * - * @property {number} outputVersionFormat - * Deprecated. The log entry format to use for this sink's exported log - * entries. The v2 format is used by default and cannot be changed. - * - * The number should be among the values of [VersionFormat]{@link google.logging.v2.VersionFormat} - * - * @property {string} writerIdentity - * Output only. An IAM identity–a service account or group—under which Logging - * writes the exported log entries to the sink's destination. This field is - * set by sinks.create and - * sinks.update based on the - * value 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](https://cloud.google.com/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. - * - * @property {boolean} includeChildren - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * logs from all the projects, folders, and billing accounts contained in the - * sink's parent resource are also available for export. Whether a particular - * log entry from the children is exported depends on the sink's filter - * expression. For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. To only export entries - * from certain child projects, filter on the project part of the log name: - * - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * - * @property {Object} bigqueryOptions - * Optional. Options that affect sinks exporting data to BigQuery. - * - * This object should have the same structure as [BigQueryOptions]{@link google.logging.v2.BigQueryOptions} - * - * @property {Object} createTime - * Output only. The creation timestamp of the sink. - * - * This field may not be present for older sinks. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} updateTime - * Output only. The last update timestamp of the sink. - * - * This field may not be present for older sinks. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef LogSink - * @memberof google.logging.v2 - * @see [google.logging.v2.LogSink definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const LogSink = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Available log entry formats. Log entries can be written to - * Logging in either format and can be exported in either format. - * Version 2 is the preferred format. - * - * @enum {number} - * @memberof google.logging.v2 - */ - VersionFormat: { - - /** - * An unspecified format version that will default to V2. - */ - VERSION_FORMAT_UNSPECIFIED: 0, - - /** - * `LogEntry` version 2 format. - */ - V2: 1, - - /** - * `LogEntry` version 1 format. - */ - V1: 2 - } -}; - -/** - * Options that change functionality of a sink exporting data to BigQuery. - * - * @property {boolean} usePartitionedTables - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging - * creates dated tables based on the log entries' timestamps, e.g. - * syslog_20170523. With partitioned tables the date suffix is no longer - * present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. - * In both cases, tables are sharded based on UTC timezone. - * - * @property {boolean} usesTimestampColumnPartitioning - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * - * @typedef BigQueryOptions - * @memberof google.logging.v2 - * @see [google.logging.v2.BigQueryOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const BigQueryOptions = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `ListBuckets` (Beta). - * - * @property {string} parent - * Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * - * @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 {number} 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. - * - * @typedef ListBucketsRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.ListBucketsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const ListBucketsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The response from ListBuckets (Beta). - * - * @property {Object[]} buckets - * A list of buckets. - * - * This object should have the same structure as [LogBucket]{@link google.logging.v2.LogBucket} - * - * @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`. - * - * @typedef ListBucketsResponse - * @memberof google.logging.v2 - * @see [google.logging.v2.ListBucketsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const ListBucketsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `UpdateBucket` (Beta). - * - * @property {string} name - * Required. The full resource name of the bucket to update. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also - * requires permission "resourcemanager.projects.updateLiens" to set the - * locked property - * - * @property {Object} bucket - * Required. The updated bucket. - * - * This object should have the same structure as [LogBucket]{@link google.logging.v2.LogBucket} - * - * @property {Object} updateMask - * Required. Field mask that specifies the fields in `bucket` that need an update. A - * bucket field will be overwritten if, and only if, it is in the update - * mask. `name` and output only fields cannot be updated. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * Example: `updateMask=retention_days`. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateBucketRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.UpdateBucketRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const UpdateBucketRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `GetBucket` (Beta). - * - * @property {string} name - * Required. The resource name of the bucket: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. - * - * @typedef GetBucketRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.GetBucketRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const GetBucketRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `ListSinks`. - * - * @property {string} parent - * Required. The parent resource whose sinks are to be listed: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * @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 {number} 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. - * - * @typedef ListSinksRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.ListSinksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const ListSinksRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Result returned from `ListSinks`. - * - * @property {Object[]} sinks - * A list of sinks. - * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} - * - * @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`. - * - * @typedef ListSinksResponse - * @memberof google.logging.v2 - * @see [google.logging.v2.ListSinksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const ListSinksResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `GetSink`. - * - * @property {string} sinkName - * Required. The resource name of the sink: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * - * @typedef GetSinkRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.GetSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const GetSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `CreateSink`. - * - * @property {string} parent - * Required. The resource in which to create the sink: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * - * @property {Object} sink - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} - * - * @property {boolean} 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 - * the same group or service account used by Logging 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. - * - * @typedef CreateSinkRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.CreateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const CreateSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `UpdateSink`. - * - * @property {string} 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]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * - * @property {Object} sink - * Required. The updated sink, whose name is the same identifier that appears as part - * of `sink_name`. - * - * This object should have the same structure as [LogSink]{@link google.logging.v2.LogSink} - * - * @property {boolean} 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 is 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 is true and the new value is - * set to false or defaulted to false. - * - * @property {Object} updateMask - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * - * An empty updateMask is temporarily treated as using the following mask - * for backwards compatibility purposes: - * destination,filter,includeChildren - * At some point in the future, behavior will be removed and specifying an - * empty updateMask will be an error. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * Example: `updateMask=filter`. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateSinkRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.UpdateSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const UpdateSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to `DeleteSink`. - * - * @property {string} 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]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * - * @typedef DeleteSinkRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.DeleteSinkRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_config.proto} - */ -const DeleteSinkRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Specifies a set of log entries that are not to be stored in - * Logging. If your GCP resource receives a large volume of logs, you can - * use exclusions to reduce your chargeable logs. Exclusions are - * processed after log sinks, so you can export log entries before they are - * excluded. Note that organization-level and folder-level exclusions don't - * apply to child resources, and that you can't exclude audit log entries. - * - * @property {string} name - * Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. - * Identifiers are limited to 100 characters and can include only letters, - * digits, underscores, hyphens, and periods. First character has to be - * alphanumeric. - * - * @property {string} description - * Optional. A description of this exclusion. - * - * @property {string} filter - * Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries) - * that matches the log entries to be excluded. By using the - * [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log - * entries from Google Cloud Storage buckets: - * - * `"resource.type=gcs_bucket severity=ERROR" - * - * The maximum length of the filter is 20000 characters. - * - * @property {Object} metricDescriptor - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * - * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} - * - * @property {string} valueExtractor - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The argument are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * - * @property {Object.} labelExtractors - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * - * The extracted value is converted to the type defined in the label - * descriptor. If the either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * - * @property {Object} bucketOptions - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * - * This object should have the same structure as [BucketOptions]{@link google.api.BucketOptions} - * - * @property {Object} createTime - * Output only. The creation timestamp of the metric. - * - * This field may not be present for older metrics. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} updateTime - * Output only. The last update timestamp of the metric. - * - * This field may not be present for older metrics. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} version - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * - * The number should be among the values of [ApiVersion]{@link google.logging.v2.ApiVersion} - * - * @typedef LogMetric - * @memberof google.logging.v2 - * @see [google.logging.v2.LogMetric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} - */ -const LogMetric = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Logging API version. - * - * @enum {number} - * @memberof google.logging.v2 - */ - ApiVersion: { - - /** - * Logging API v2. - */ - V2: 0, - - /** - * Logging API v1. - */ - V1: 1 - } -}; - -/** - * The parameters to ListLogMetrics. - * - * @property {string} parent - * Required. The name of the project containing the metrics: - * - * "projects/[PROJECT_ID]" - * - * @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 {number} 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. - * - * @typedef ListLogMetricsRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.ListLogMetricsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} - */ -const ListLogMetricsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Result returned from ListLogMetrics. - * - * @property {Object[]} metrics - * A list of logs-based metrics. - * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} - * - * @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 ListLogMetricsResponse - * @memberof google.logging.v2 - * @see [google.logging.v2.ListLogMetricsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} - */ -const ListLogMetricsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to GetLogMetric. - * - * @property {string} metricName - * Required. The resource name of the desired metric: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * @typedef GetLogMetricRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.GetLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} - */ -const GetLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to CreateLogMetric. - * - * @property {string} parent - * Required. The resource name of the project in which to create the metric: - * - * "projects/[PROJECT_ID]" - * - * The new metric must be provided in the request. - * - * @property {Object} metric - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} - * - * @typedef CreateLogMetricRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.CreateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} - */ -const CreateLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to UpdateLogMetric. - * - * @property {string} metricName - * Required. The resource name of the metric to update: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * - * @property {Object} metric - * Required. The updated metric. - * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} - * - * @typedef UpdateLogMetricRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.UpdateLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} - */ -const UpdateLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The parameters to DeleteLogMetric. - * - * @property {string} metricName - * Required. The resource name of the metric to delete: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * @typedef DeleteLogMetricRequest - * @memberof google.logging.v2 - * @see [google.logging.v2.DeleteLogMetricRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/logging/v2/logging_metrics.proto} - */ -const DeleteLogMetricRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js deleted file mode 100644 index 813682aa336..00000000000 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_any.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * # JSON - * - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message google.protobuf.Duration): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - * - * @property {string} typeUrl - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a google.protobuf.Type - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - * - * @property {Buffer} value - * Must be a valid serialized protocol buffer of the above specified type. - * - * @typedef Any - * @memberof google.protobuf - * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} - */ -const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js deleted file mode 100644 index bd4b4ee6067..00000000000 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_duration.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - * - * @property {number} seconds - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - * - * @property {number} nanos - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * - * @typedef Duration - * @memberof google.protobuf - * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} - */ -const Duration = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 1e3961d6609..00000000000 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_empty.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - * @typedef Empty - * @memberof google.protobuf - * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} - */ -const Empty = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 59e745f36c2..00000000000 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_field_mask.js +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `FieldMask` represents a set of symbolic field paths, for example: - * - * paths: "f.a" - * paths: "f.b.d" - * - * Here `f` represents a field in some root message, `a` and `b` - * fields in the message found in `f`, and `d` a field found in the - * message in `f.b`. - * - * Field masks are used to specify a subset of fields that should be - * returned by a get operation or modified by an update operation. - * Field masks also have a custom JSON encoding (see below). - * - * # Field Masks in Projections - * - * When used in the context of a projection, a response message or - * sub-message is filtered by the API to only contain those fields as - * specified in the mask. For example, if the mask in the previous - * example is applied to a response message as follows: - * - * f { - * a : 22 - * b { - * d : 1 - * x : 2 - * } - * y : 13 - * } - * z: 8 - * - * The result will not contain specific values for fields x,y and z - * (their value will be set to the default, and omitted in proto text - * output): - * - * - * f { - * a : 22 - * b { - * d : 1 - * } - * } - * - * A repeated field is not allowed except at the last position of a - * paths string. - * - * If a FieldMask object is not present in a get operation, the - * operation applies to all fields (as if a FieldMask of all fields - * had been specified). - * - * Note that a field mask does not necessarily apply to the - * top-level response message. In case of a REST get operation, the - * field mask applies directly to the response, but in case of a REST - * list operation, the mask instead applies to each individual message - * in the returned resource list. In case of a REST custom method, - * other definitions may be used. Where the mask applies will be - * clearly documented together with its declaration in the API. In - * any case, the effect on the returned resource/resources is required - * behavior for APIs. - * - * # Field Masks in Update Operations - * - * A field mask in update operations specifies which fields of the - * targeted resource are going to be updated. The API is required - * to only change the values of the fields as specified in the mask - * and leave the others untouched. If a resource is passed in to - * describe the updated values, the API ignores the values of all - * fields not covered by the mask. - * - * If a repeated field is specified for an update operation, new values will - * be appended to the existing repeated field in the target resource. Note that - * a repeated field is only allowed in the last position of a `paths` string. - * - * If a sub-message is specified in the last position of the field mask for an - * update operation, then new value will be merged into the existing sub-message - * in the target resource. - * - * For example, given the target message: - * - * f { - * b { - * d: 1 - * x: 2 - * } - * c: [1] - * } - * - * And an update message: - * - * f { - * b { - * d: 10 - * } - * c: [2] - * } - * - * then if the field mask is: - * - * paths: ["f.b", "f.c"] - * - * then the result will be: - * - * f { - * b { - * d: 10 - * x: 2 - * } - * c: [1, 2] - * } - * - * An implementation may provide options to override this default behavior for - * repeated and message fields. - * - * In order to reset a field's value to the default, the field must - * be in the mask and set to the default value in the provided resource. - * Hence, in order to reset all fields of a resource, provide a default - * instance of the resource and set all fields in the mask, or do - * not provide a mask as described below. - * - * If a field mask is not present on update, the operation applies to - * all fields (as if a field mask of all fields has been specified). - * Note that in the presence of schema evolution, this may mean that - * fields the client does not know and has therefore not filled into - * the request will be reset to their default. If this is unwanted - * behavior, a specific service may require a client to always specify - * a field mask, producing an error if not. - * - * As with get operations, the location of the resource which - * describes the updated values in the request message depends on the - * operation kind. In any case, the effect of the field mask is - * required to be honored by the API. - * - * ## Considerations for HTTP REST - * - * The HTTP kind of an update operation which uses a field mask must - * be set to PATCH instead of PUT in order to satisfy HTTP semantics - * (PUT must only be used for full updates). - * - * # JSON Encoding of Field Masks - * - * In JSON, a field mask is encoded as a single string where paths are - * separated by a comma. Fields name in each path are converted - * to/from lower-camel naming conventions. - * - * As an example, consider the following message declarations: - * - * message Profile { - * User user = 1; - * Photo photo = 2; - * } - * message User { - * string display_name = 1; - * string address = 2; - * } - * - * In proto a field mask for `Profile` may look as such: - * - * mask { - * paths: "user.display_name" - * paths: "photo" - * } - * - * In JSON, the same mask is represented as below: - * - * { - * mask: "user.displayName,photo" - * } - * - * # Field Masks and Oneof Fields - * - * Field masks treat fields in oneofs just as regular fields. Consider the - * following message: - * - * message SampleMessage { - * oneof test_oneof { - * string name = 4; - * SubMessage sub_message = 9; - * } - * } - * - * The field mask can be: - * - * mask { - * paths: "name" - * } - * - * Or: - * - * mask { - * paths: "sub_message" - * } - * - * Note that oneof type names ("test_oneof" in this case) cannot be used in - * paths. - * - * ## Field Mask Verification - * - * The implementation of any API method which has a FieldMask type field in the - * request should verify the included field paths, and return an - * `INVALID_ARGUMENT` error if any path is duplicated or unmappable. - * - * @property {string[]} paths - * The set of field mask paths. - * - * @typedef FieldMask - * @memberof google.protobuf - * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} - */ -const FieldMask = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js deleted file mode 100644 index a143b9a6d2d..00000000000 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_struct.js +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `Struct` represents a structured data value, consisting of fields - * which map to dynamically typed values. In some languages, `Struct` - * might be supported by a native representation. For example, in - * scripting languages like JS a struct is represented as an - * object. The details of that representation are described together - * with the proto support for the language. - * - * The JSON representation for `Struct` is JSON object. - * - * @property {Object.} fields - * Unordered map of dynamically typed values. - * - * @typedef Struct - * @memberof google.protobuf - * @see [google.protobuf.Struct definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} - */ -const Struct = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * `Value` represents a dynamically typed value which can be either - * null, a number, a string, a boolean, a recursive struct value, or a - * list of values. A producer of value is expected to set one of that - * variants, absence of any variant indicates an error. - * - * The JSON representation for `Value` is JSON value. - * - * @property {number} nullValue - * Represents a null value. - * - * The number should be among the values of [NullValue]{@link google.protobuf.NullValue} - * - * @property {number} numberValue - * Represents a double value. - * - * @property {string} stringValue - * Represents a string value. - * - * @property {boolean} boolValue - * Represents a boolean value. - * - * @property {Object} structValue - * Represents a structured value. - * - * This object should have the same structure as [Struct]{@link google.protobuf.Struct} - * - * @property {Object} listValue - * Represents a repeated `Value`. - * - * This object should have the same structure as [ListValue]{@link google.protobuf.ListValue} - * - * @typedef Value - * @memberof google.protobuf - * @see [google.protobuf.Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} - */ -const Value = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * `ListValue` is a wrapper around a repeated field of values. - * - * The JSON representation for `ListValue` is JSON array. - * - * @property {Object[]} values - * Repeated field of dynamically typed values. - * - * This object should have the same structure as [Value]{@link google.protobuf.Value} - * - * @typedef ListValue - * @memberof google.protobuf - * @see [google.protobuf.ListValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} - */ -const ListValue = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * `NullValue` is a singleton enumeration to represent the null value for the - * `Value` type union. - * - * The JSON representation for `NullValue` is JSON `null`. - * - * @enum {number} - * @memberof google.protobuf - */ -const NullValue = { - - /** - * Null value. - */ - NULL_VALUE: 0 -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js b/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index ad801cc9a10..00000000000 --- a/handwritten/logging/src/v2/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format. - * - * @property {number} seconds - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * - * @property {number} nanos - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * - * @typedef Timestamp - * @memberof google.protobuf - * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} - */ -const Timestamp = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/handwritten/logging/src/v2/index.ts b/handwritten/logging/src/v2/index.ts new file mode 100644 index 00000000000..8b5a2c41d62 --- /dev/null +++ b/handwritten/logging/src/v2/index.ts @@ -0,0 +1,21 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {ConfigServiceV2Client} from './config_service_v2_client'; +export {LoggingServiceV2Client} from './logging_service_v2_client'; +export {MetricsServiceV2Client} from './metrics_service_v2_client'; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.js b/handwritten/logging/src/v2/logging_service_v2_client.js deleted file mode 100644 index de6296f5872..00000000000 --- a/handwritten/logging/src/v2/logging_service_v2_client.js +++ /dev/null @@ -1,1051 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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'; - -const gapicConfig = require('./logging_service_v2_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../../package.json').version; - -/** - * Service for ingesting and querying logs. - * - * @class - * @memberof v2 - */ -class LoggingServiceV2Client { - /** - * Construct an instance of LoggingServiceV2Client. - * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {function} [options.promise] - Custom promise module to use instead - * of native Promises. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - */ - constructor(opts) { - opts = opts || {}; - this._descriptors = {}; - - if (global.isBrowser) { - // If we're in browser, we use gRPC fallback. - opts.fallback = true; - } - - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; - - const servicePath = - opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; - - // Ensure that options include the service address and port. - opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath, - }, - opts - ); - - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = this.constructor.scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); - - // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth; - - // Determine the client header string. - const clientHeader = []; - - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } - clientHeader.push(`gax/${gaxModule.version}`); - if (opts.fallback) { - clientHeader.push(`gl-web/${gaxModule.version}`); - } else { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); - } - clientHeader.push(`gapic/${VERSION}`); - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - - // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath - ); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this._pathTemplates = { - billingAccountPathTemplate: new gaxModule.PathTemplate( - 'billingAccounts/{billing_account}' - ), - folderPathTemplate: new gaxModule.PathTemplate('folders/{folder}'), - organizationPathTemplate: new gaxModule.PathTemplate( - 'organizations/{organization}' - ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this._descriptors.page = { - listLogEntries: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'entries' - ), - listMonitoredResourceDescriptors: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'resourceDescriptors' - ), - listLogs: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'logNames' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.LoggingServiceV2', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this._innerApiCalls = {}; - - // Put together the "service stub" for - // google.logging.v2.LoggingServiceV2. - const loggingServiceV2Stub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.logging.v2.LoggingServiceV2') - : protos.google.logging.v2.LoggingServiceV2, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const loggingServiceV2StubMethods = [ - 'deleteLog', - 'writeLogEntries', - 'listLogEntries', - 'listMonitoredResourceDescriptors', - 'listLogs', - ]; - for (const methodName of loggingServiceV2StubMethods) { - const innerCallPromise = loggingServiceV2Stub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.page[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'logging.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'logging.googleapis.com'; - } - - /** - * The port for this API service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - } - - /** - * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. - */ - getProjectId(callback) { - return this.auth.getProjectId(callback); - } - - // ------------------- - // -- Service calls -- - // ------------------- - - /** - * Deletes all the log entries in a log. The log reappears if it receives new - * entries. Log entries written shortly before the delete operation might not - * be deleted. Entries received after the delete operation with a timestamp - * before the operation will be deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.logName - * Required. The resource name of the log to delete: - * - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * For more information about log names, see - * LogEntry. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.LoggingServiceV2Client({ - * // optional auth parameters. - * }); - * - * const logName = ''; - * client.deleteLog({logName: logName}).catch(err => { - * console.error(err); - * }); - */ - deleteLog(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - log_name: request.logName, - }); - - return this._innerApiCalls.deleteLog(request, options, callback); - } - - /** - * Writes log entries to Logging. This API method is the - * only way to send log entries to Logging. This method - * is used, directly or indirectly, by the Logging agent - * (fluentd) and all logging libraries configured to use Logging. - * A single request may contain log entries for a maximum of 1000 - * different resources (projects, organizations, billing accounts or - * folders) - * - * @param {Object} request - * The request object that will be sent. - * @param {Object[]} request.entries - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * LogEntry type. - * - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than - * 24 hours in the future will not be available when calling `entries.list`. - * However, those log entries can still be - * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, - * you should try to include several log entries in this list, - * rather than calling this method for each individual log entry. - * - * This object should have the same structure as [LogEntry]{@link google.logging.v2.LogEntry} - * @param {string} [request.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]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * - * `[LOG_ID]` must be URL-encoded. For example: - * - * "projects/my-project-id/logs/syslog" - * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - * - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * @param {Object} [request.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. - * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} - * @param {Object.} [request.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. - * @param {boolean} [request.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, then the response status is the error associated - * with one of the failed entries and the response includes error details - * keyed by the entries' zero-based index in the `entries.write` method. - * @param {boolean} [request.dryRun] - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.LoggingServiceV2Client({ - * // optional auth parameters. - * }); - * - * const entries = []; - * client.writeLogEntries({entries: entries}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - writeLogEntries(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.writeLogEntries(request, options, callback); - } - - /** - * Lists log entries. Use this method to retrieve log entries that originated - * from a project/folder/organization/billing account. For ways to export log - * entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). - * - * @param {Object} request - * The request object that will be sent. - * @param {string[]} request.resourceNames - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * - * Projects listed in the `project_ids` field are added to this list. - * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. - * @param {string} [request.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 their `insert_id` values. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [LogEntry]{@link google.logging.v2.LogEntry}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogEntry]{@link google.logging.v2.LogEntry}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogEntry]{@link google.logging.v2.LogEntry} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.LoggingServiceV2Client({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedResourceNames = []; - * - * client.listLogEntries({resourceNames: formattedResourceNames}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedResourceNames = []; - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listLogEntries(nextRequest, options).then(callback); - * } - * } - * client.listLogEntries({resourceNames: formattedResourceNames}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listLogEntries(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.listLogEntries(request, options, callback); - } - - /** - * Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogEntries} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string[]} request.resourceNames - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * - * Projects listed in the `project_ids` field are added to this list. - * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. - * @param {string} [request.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 their `insert_id` values. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @returns {Stream} - * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.LoggingServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedResourceNames = []; - * client.listLogEntriesStream({resourceNames: formattedResourceNames}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listLogEntriesStream(request, options) { - options = options || {}; - - return this._descriptors.page.listLogEntries.createStream( - this._innerApiCalls.listLogEntries, - request, - options - ); - } - - /** - * Lists the descriptors for monitored resource types used by Logging. - * - * @param {Object} request - * The request object that will be sent. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.LoggingServiceV2Client({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * client.listMonitoredResourceDescriptors({}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); - * } - * } - * client.listMonitoredResourceDescriptors({}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listMonitoredResourceDescriptors(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.listMonitoredResourceDescriptors( - request, - options, - callback - ); - } - - /** - * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @returns {Stream} - * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.LoggingServiceV2Client({ - * // optional auth parameters. - * }); - * - * - * client.listMonitoredResourceDescriptorsStream({}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listMonitoredResourceDescriptorsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listMonitoredResourceDescriptors.createStream( - this._innerApiCalls.listMonitoredResourceDescriptors, - request, - options - ); - } - - /** - * Lists the logs in projects, organizations, folders, or billing accounts. - * Only logs that have entries are listed. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name that owns the logs: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of string. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of string. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of string in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.LoggingServiceV2Client({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * client.listLogs({parent: formattedParent}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listLogs(nextRequest, options).then(callback); - * } - * } - * client.listLogs({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listLogs(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - }); - - return this._innerApiCalls.listLogs(request, options, callback); - } - - /** - * Equivalent to {@link listLogs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogs} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name that owns the logs: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @returns {Stream} - * An object stream which emits a string on 'data' event. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.LoggingServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * client.listLogsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listLogsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listLogs.createStream( - this._innerApiCalls.listLogs, - request, - options - ); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified billing_account resource name string. - * - * @param {String} billingAccount - * @returns {String} - */ - billingAccountPath(billingAccount) { - return this._pathTemplates.billingAccountPathTemplate.render({ - billing_account: billingAccount, - }); - } - - /** - * Return a fully-qualified folder resource name string. - * - * @param {String} folder - * @returns {String} - */ - folderPath(folder) { - return this._pathTemplates.folderPathTemplate.render({ - folder: folder, - }); - } - - /** - * Return a fully-qualified organization resource name string. - * - * @param {String} organization - * @returns {String} - */ - organizationPath(organization) { - return this._pathTemplates.organizationPathTemplate.render({ - organization: organization, - }); - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the billingAccountName from a billing_account resource. - * - * @param {String} billingAccountName - * A fully-qualified path representing a billing_account resources. - * @returns {String} - A string representing the billing_account. - */ - matchBillingAccountFromBillingAccountName(billingAccountName) { - return this._pathTemplates.billingAccountPathTemplate.match( - billingAccountName - ).billing_account; - } - - /** - * Parse the folderName from a folder resource. - * - * @param {String} folderName - * A fully-qualified path representing a folder resources. - * @returns {String} - A string representing the folder. - */ - matchFolderFromFolderName(folderName) { - return this._pathTemplates.folderPathTemplate.match(folderName).folder; - } - - /** - * Parse the organizationName from a organization resource. - * - * @param {String} organizationName - * A fully-qualified path representing a organization resources. - * @returns {String} - A string representing the organization. - */ - matchOrganizationFromOrganizationName(organizationName) { - return this._pathTemplates.organizationPathTemplate.match(organizationName) - .organization; - } - - /** - * Parse the projectName from a project resource. - * - * @param {String} projectName - * A fully-qualified path representing a project resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; - } -} - -module.exports = LoggingServiceV2Client; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts new file mode 100644 index 00000000000..c1ce2ab958e --- /dev/null +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -0,0 +1,2011 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './logging_service_v2_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Service for ingesting and querying logs. + * @class + * @memberof v2 + */ +export class LoggingServiceV2Client { + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + loggingServiceV2Stub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of LoggingServiceV2Client. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof LoggingServiceV2Client; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof LoggingServiceV2Client).scopes; + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/cmekSettings' + ), + billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/exclusions/{exclusion}' + ), + billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + ), + billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/logs/{log}' + ), + billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/sinks/{sink}' + ), + folderCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/cmekSettings' + ), + folderExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/exclusions/{exclusion}' + ), + folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}' + ), + folderLogPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/logs/{log}' + ), + folderSinkPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/sinks/{sink}' + ), + logMetricPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/metrics/{metric}' + ), + organizationCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/cmekSettings' + ), + organizationExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/exclusions/{exclusion}' + ), + organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}' + ), + organizationLogPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/logs/{log}' + ), + organizationSinkPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/sinks/{sink}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/cmekSettings' + ), + projectExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/exclusions/{exclusion}' + ), + projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}' + ), + projectLogPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/logs/{log}' + ), + projectSinkPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/sinks/{sink}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this._descriptors.page = { + listLogEntries: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'entries' + ), + listMonitoredResourceDescriptors: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'resourceDescriptors' + ), + listLogs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'logNames' + ), + }; + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const protoFilesRoot = opts.fallback + ? this._gaxModule.protobuf.Root.fromJSON( + require('../../protos/protos.json') + ) + : this._gaxModule.protobuf.loadSync(nodejsProtoPath); + + // Some methods on this API support automatically batching + // requests; denote this. + + this._descriptors.batching = { + WriteLogEntries: new this._gaxModule.BundleDescriptor( + 'entries', + ['log_name', 'resource', 'labels'], + null, + gax.createByteLengthFunction( + // tslint:disable-next-line no-any + protoFilesRoot.lookupType('google.logging.v2.LogEntry') as any + ) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.logging.v2.LoggingServiceV2', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.loggingServiceV2Stub) { + return this.loggingServiceV2Stub; + } + + // Put together the "service stub" for + // google.logging.v2.LoggingServiceV2. + this.loggingServiceV2Stub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.logging.v2.LoggingServiceV2' + ) + : // tslint:disable-next-line no-any + (this._protos as any).google.logging.v2.LoggingServiceV2, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const loggingServiceV2StubMethods = [ + 'deleteLog', + 'writeLogEntries', + 'listLogEntries', + 'listMonitoredResourceDescriptors', + 'listLogs', + ]; + + for (const methodName of loggingServiceV2StubMethods) { + const innerCallPromise = this.loggingServiceV2Stub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = this._gaxModule.createApiCall( + innerCallPromise, + this._defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + return apiCall(argument, callOptions, callback); + }; + } + + return this.loggingServiceV2Stub; + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'logging.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'logging.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + deleteLog( + request: protosTypes.google.logging.v2.IDeleteLogRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogRequest | undefined, + {} | undefined + ] + >; + deleteLog( + request: protosTypes.google.logging.v2.IDeleteLogRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogRequest | undefined, + {} | undefined + > + ): void; + /** + * Deletes all the log entries in a log. The log reappears if it receives new + * entries. Log entries written shortly before the delete operation might not + * be deleted. Entries received after the delete operation with a timestamp + * before the operation will be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.logName + * Required. The resource name of the log to delete: + * + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * For more information about log names, see + * {@link google.logging.v2.LogEntry|LogEntry}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteLog( + request: protosTypes.google.logging.v2.IDeleteLogRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + log_name: request.logName || '', + }); + this.initialize(); + return this._innerApiCalls.deleteLog(request, options, callback); + } + writeLogEntries( + request: protosTypes.google.logging.v2.IWriteLogEntriesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.IWriteLogEntriesResponse, + protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, + {} | undefined + ] + >; + writeLogEntries( + request: protosTypes.google.logging.v2.IWriteLogEntriesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.IWriteLogEntriesResponse, + protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, + {} | undefined + > + ): void; + /** + * Writes log entries to Logging. This API method is the + * only way to send log entries to Logging. This method + * is used, directly or indirectly, by the Logging agent + * (fluentd) and all logging libraries configured to use Logging. + * A single request may contain log entries for a maximum of 1000 + * different resources (projects, organizations, billing accounts or + * folders) + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * + * `[LOG_ID]` must be URL-encoded. For example: + * + * "projects/my-project-id/logs/syslog" + * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + * + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. + * @param {google.api.MonitoredResource} [request.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 {@link google.logging.v2.LogEntry|LogEntry}. + * @param {number[]} [request.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 {@link google.logging.v2.LogEntry|LogEntry}. + * @param {number[]} request.entries + * Required. The log entries to send to Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the + * {@link google.logging.v2.LogEntry|LogEntry} type. + * + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * + * Log entries with timestamps that are more than the + * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be + * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, + * you should try to include several log entries in this list, + * rather than calling this method for each individual log entry. + * @param {boolean} [request.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, then the response status is the error associated + * with one of the failed entries and the response includes error details + * keyed by the entries' zero-based index in the `entries.write` method. + * @param {boolean} [request.dryRun] + * Optional. If true, the request should expect normal response, but the + * entries won't be persisted nor exported. Useful for checking whether the + * logging API endpoints are working properly before sending valuable data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + writeLogEntries( + request: protosTypes.google.logging.v2.IWriteLogEntriesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.IWriteLogEntriesResponse, + protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.IWriteLogEntriesResponse, + protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.IWriteLogEntriesResponse, + protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + this.initialize(); + return this._innerApiCalls.writeLogEntries(request, options, callback); + } + + listLogEntries( + request: protosTypes.google.logging.v2.IListLogEntriesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogEntry[], + protosTypes.google.logging.v2.IListLogEntriesRequest | null, + protosTypes.google.logging.v2.IListLogEntriesResponse + ] + >; + listLogEntries( + request: protosTypes.google.logging.v2.IListLogEntriesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogEntry[], + protosTypes.google.logging.v2.IListLogEntriesRequest | null, + protosTypes.google.logging.v2.IListLogEntriesResponse + > + ): void; + /** + * Lists log entries. Use this method to retrieve log entries that originated + * from a project/folder/organization/billing account. For ways to export log + * entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). + * + * @param {Object} request + * The request object that will be sent. + * @param {string[]} request.resourceNames + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * + * Projects listed in the `project_ids` field are added to this list. + * @param {string} [request.filter] + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. + * @param {string} [request.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 their `insert_id` values. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * @param {string} [request.pageToken] + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogEntry]{@link google.logging.v2.LogEntry}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogEntry]{@link google.logging.v2.LogEntry} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListLogEntriesRequest]{@link google.logging.v2.ListLogEntriesRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listLogEntries( + request: protosTypes.google.logging.v2.IListLogEntriesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogEntry[], + protosTypes.google.logging.v2.IListLogEntriesRequest | null, + protosTypes.google.logging.v2.IListLogEntriesResponse + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogEntry[], + protosTypes.google.logging.v2.IListLogEntriesRequest | null, + protosTypes.google.logging.v2.IListLogEntriesResponse + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogEntry[], + protosTypes.google.logging.v2.IListLogEntriesRequest | null, + protosTypes.google.logging.v2.IListLogEntriesResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + this.initialize(); + return this._innerApiCalls.listLogEntries(request, options, callback); + } + + /** + * Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogEntries} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string[]} request.resourceNames + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * + * Projects listed in the `project_ids` field are added to this list. + * @param {string} [request.filter] + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. + * @param {string} [request.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 their `insert_id` values. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * @param {string} [request.pageToken] + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. + */ + listLogEntriesStream( + request?: protosTypes.google.logging.v2.IListLogEntriesRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this._descriptors.page.listLogEntries.createStream( + this._innerApiCalls.listLogEntries as gax.GaxCall, + request, + callSettings + ); + } + listMonitoredResourceDescriptors( + request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + ] + >; + listMonitoredResourceDescriptors( + request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + > + ): void; + /** + * Lists the descriptors for monitored resource types used by Logging. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} [request.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} [request.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] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListMonitoredResourceDescriptorsRequest]{@link google.logging.v2.ListMonitoredResourceDescriptorsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listMonitoredResourceDescriptors( + request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + >, + callback?: Callback< + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + > + ): Promise< + [ + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + this.initialize(); + return this._innerApiCalls.listMonitoredResourceDescriptors( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {number} [request.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} [request.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] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. + */ + listMonitoredResourceDescriptorsStream( + request?: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this._descriptors.page.listMonitoredResourceDescriptors.createStream( + this._innerApiCalls.listMonitoredResourceDescriptors as gax.GaxCall, + request, + callSettings + ); + } + listLogs( + request: protosTypes.google.logging.v2.IListLogsRequest, + options?: gax.CallOptions + ): Promise< + [ + string[], + protosTypes.google.logging.v2.IListLogsRequest | null, + protosTypes.google.logging.v2.IListLogsResponse + ] + >; + listLogs( + request: protosTypes.google.logging.v2.IListLogsRequest, + options: gax.CallOptions, + callback: Callback< + string[], + protosTypes.google.logging.v2.IListLogsRequest | null, + protosTypes.google.logging.v2.IListLogsResponse + > + ): void; + /** + * Lists the logs in projects, organizations, folders, or billing accounts. + * Only logs that have entries are listed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name that owns the logs: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number} [request.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} [request.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] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of string. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of string that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListLogsRequest]{@link google.logging.v2.ListLogsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listLogs( + request: protosTypes.google.logging.v2.IListLogsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + string[], + protosTypes.google.logging.v2.IListLogsRequest | null, + protosTypes.google.logging.v2.IListLogsResponse + >, + callback?: Callback< + string[], + protosTypes.google.logging.v2.IListLogsRequest | null, + protosTypes.google.logging.v2.IListLogsResponse + > + ): Promise< + [ + string[], + protosTypes.google.logging.v2.IListLogsRequest | null, + protosTypes.google.logging.v2.IListLogsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this._innerApiCalls.listLogs(request, options, callback); + } + + /** + * Equivalent to {@link listLogs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogs} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name that owns the logs: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number} [request.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} [request.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] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing string on 'data' event. + */ + listLogsStream( + request?: protosTypes.google.logging.v2.IListLogsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this._descriptors.page.listLogs.createStream( + this._innerApiCalls.listLogs as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified billingAccountCmekSettings resource name string. + * + * @param {string} billing_account + * @returns {string} Resource name string. + */ + billingAccountCmekSettingsPath(billingAccount: string) { + return this._pathTemplates.billingAccountCmekSettingsPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Parse the billing_account from BillingAccountCmekSettings resource. + * + * @param {string} billingAccountCmekSettingsName + * A fully-qualified path representing billing_account_cmekSettings resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountCmekSettingsName( + billingAccountCmekSettingsName: string + ) { + return this._pathTemplates.billingAccountCmekSettingsPathTemplate.match( + billingAccountCmekSettingsName + ).billing_account; + } + + /** + * Return a fully-qualified billingAccountExclusion resource name string. + * + * @param {string} billing_account + * @param {string} exclusion + * @returns {string} Resource name string. + */ + billingAccountExclusionPath(billingAccount: string, exclusion: string) { + return this._pathTemplates.billingAccountExclusionPathTemplate.render({ + billing_account: billingAccount, + exclusion, + }); + } + + /** + * Parse the billing_account from BillingAccountExclusion resource. + * + * @param {string} billingAccountExclusionName + * A fully-qualified path representing billing_account_exclusion resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountExclusionName( + billingAccountExclusionName: string + ) { + return this._pathTemplates.billingAccountExclusionPathTemplate.match( + billingAccountExclusionName + ).billing_account; + } + + /** + * Parse the exclusion from BillingAccountExclusion resource. + * + * @param {string} billingAccountExclusionName + * A fully-qualified path representing billing_account_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromBillingAccountExclusionName( + billingAccountExclusionName: string + ) { + return this._pathTemplates.billingAccountExclusionPathTemplate.match( + billingAccountExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified billingAccountLocationBucket resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + billingAccountLocationBucketPath( + billingAccount: string, + location: string, + bucket: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.render({ + billing_account: billingAccount, + location, + bucket, + }); + } + + /** + * Parse the billing_account from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified billingAccountLog resource name string. + * + * @param {string} billing_account + * @param {string} log + * @returns {string} Resource name string. + */ + billingAccountLogPath(billingAccount: string, log: string) { + return this._pathTemplates.billingAccountLogPathTemplate.render({ + billing_account: billingAccount, + log, + }); + } + + /** + * Parse the billing_account from BillingAccountLog resource. + * + * @param {string} billingAccountLogName + * A fully-qualified path representing billing_account_log resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { + return this._pathTemplates.billingAccountLogPathTemplate.match( + billingAccountLogName + ).billing_account; + } + + /** + * Parse the log from BillingAccountLog resource. + * + * @param {string} billingAccountLogName + * A fully-qualified path representing billing_account_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromBillingAccountLogName(billingAccountLogName: string) { + return this._pathTemplates.billingAccountLogPathTemplate.match( + billingAccountLogName + ).log; + } + + /** + * Return a fully-qualified billingAccountSink resource name string. + * + * @param {string} billing_account + * @param {string} sink + * @returns {string} Resource name string. + */ + billingAccountSinkPath(billingAccount: string, sink: string) { + return this._pathTemplates.billingAccountSinkPathTemplate.render({ + billing_account: billingAccount, + sink, + }); + } + + /** + * Parse the billing_account from BillingAccountSink resource. + * + * @param {string} billingAccountSinkName + * A fully-qualified path representing billing_account_sink resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountSinkName( + billingAccountSinkName: string + ) { + return this._pathTemplates.billingAccountSinkPathTemplate.match( + billingAccountSinkName + ).billing_account; + } + + /** + * Parse the sink from BillingAccountSink resource. + * + * @param {string} billingAccountSinkName + * A fully-qualified path representing billing_account_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { + return this._pathTemplates.billingAccountSinkPathTemplate.match( + billingAccountSinkName + ).sink; + } + + /** + * Return a fully-qualified folderCmekSettings resource name string. + * + * @param {string} folder + * @returns {string} Resource name string. + */ + folderCmekSettingsPath(folder: string) { + return this._pathTemplates.folderCmekSettingsPathTemplate.render({ + folder, + }); + } + + /** + * Parse the folder from FolderCmekSettings resource. + * + * @param {string} folderCmekSettingsName + * A fully-qualified path representing folder_cmekSettings resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { + return this._pathTemplates.folderCmekSettingsPathTemplate.match( + folderCmekSettingsName + ).folder; + } + + /** + * Return a fully-qualified folderExclusion resource name string. + * + * @param {string} folder + * @param {string} exclusion + * @returns {string} Resource name string. + */ + folderExclusionPath(folder: string, exclusion: string) { + return this._pathTemplates.folderExclusionPathTemplate.render({ + folder, + exclusion, + }); + } + + /** + * Parse the folder from FolderExclusion resource. + * + * @param {string} folderExclusionName + * A fully-qualified path representing folder_exclusion resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderExclusionName(folderExclusionName: string) { + return this._pathTemplates.folderExclusionPathTemplate.match( + folderExclusionName + ).folder; + } + + /** + * Parse the exclusion from FolderExclusion resource. + * + * @param {string} folderExclusionName + * A fully-qualified path representing folder_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromFolderExclusionName(folderExclusionName: string) { + return this._pathTemplates.folderExclusionPathTemplate.match( + folderExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified folderLocationBucket resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + folderLocationBucketPath(folder: string, location: string, bucket: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.render({ + folder, + location, + bucket, + }); + } + + /** + * Parse the folder from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).folder; + } + + /** + * Parse the location from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified folderLog resource name string. + * + * @param {string} folder + * @param {string} log + * @returns {string} Resource name string. + */ + folderLogPath(folder: string, log: string) { + return this._pathTemplates.folderLogPathTemplate.render({ + folder, + log, + }); + } + + /** + * Parse the folder from FolderLog resource. + * + * @param {string} folderLogName + * A fully-qualified path representing folder_log resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLogName(folderLogName: string) { + return this._pathTemplates.folderLogPathTemplate.match(folderLogName) + .folder; + } + + /** + * Parse the log from FolderLog resource. + * + * @param {string} folderLogName + * A fully-qualified path representing folder_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromFolderLogName(folderLogName: string) { + return this._pathTemplates.folderLogPathTemplate.match(folderLogName).log; + } + + /** + * Return a fully-qualified folderSink resource name string. + * + * @param {string} folder + * @param {string} sink + * @returns {string} Resource name string. + */ + folderSinkPath(folder: string, sink: string) { + return this._pathTemplates.folderSinkPathTemplate.render({ + folder, + sink, + }); + } + + /** + * Parse the folder from FolderSink resource. + * + * @param {string} folderSinkName + * A fully-qualified path representing folder_sink resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderSinkName(folderSinkName: string) { + return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + .folder; + } + + /** + * Parse the sink from FolderSink resource. + * + * @param {string} folderSinkName + * A fully-qualified path representing folder_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromFolderSinkName(folderSinkName: string) { + return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + .sink; + } + + /** + * Return a fully-qualified logMetric resource name string. + * + * @param {string} project + * @param {string} metric + * @returns {string} Resource name string. + */ + logMetricPath(project: string, metric: string) { + return this._pathTemplates.logMetricPathTemplate.render({ + project, + metric, + }); + } + + /** + * Parse the project from LogMetric resource. + * + * @param {string} logMetricName + * A fully-qualified path representing LogMetric resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLogMetricName(logMetricName: string) { + return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + .project; + } + + /** + * Parse the metric from LogMetric resource. + * + * @param {string} logMetricName + * A fully-qualified path representing LogMetric resource. + * @returns {string} A string representing the metric. + */ + matchMetricFromLogMetricName(logMetricName: string) { + return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + .metric; + } + + /** + * Return a fully-qualified organizationCmekSettings resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationCmekSettingsPath(organization: string) { + return this._pathTemplates.organizationCmekSettingsPathTemplate.render({ + organization, + }); + } + + /** + * Parse the organization from OrganizationCmekSettings resource. + * + * @param {string} organizationCmekSettingsName + * A fully-qualified path representing organization_cmekSettings resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationCmekSettingsName( + organizationCmekSettingsName: string + ) { + return this._pathTemplates.organizationCmekSettingsPathTemplate.match( + organizationCmekSettingsName + ).organization; + } + + /** + * Return a fully-qualified organizationExclusion resource name string. + * + * @param {string} organization + * @param {string} exclusion + * @returns {string} Resource name string. + */ + organizationExclusionPath(organization: string, exclusion: string) { + return this._pathTemplates.organizationExclusionPathTemplate.render({ + organization, + exclusion, + }); + } + + /** + * Parse the organization from OrganizationExclusion resource. + * + * @param {string} organizationExclusionName + * A fully-qualified path representing organization_exclusion resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationExclusionName( + organizationExclusionName: string + ) { + return this._pathTemplates.organizationExclusionPathTemplate.match( + organizationExclusionName + ).organization; + } + + /** + * Parse the exclusion from OrganizationExclusion resource. + * + * @param {string} organizationExclusionName + * A fully-qualified path representing organization_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromOrganizationExclusionName( + organizationExclusionName: string + ) { + return this._pathTemplates.organizationExclusionPathTemplate.match( + organizationExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified organizationLocationBucket resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + organizationLocationBucketPath( + organization: string, + location: string, + bucket: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.render({ + organization, + location, + bucket, + }); + } + + /** + * Parse the organization from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified organizationLog resource name string. + * + * @param {string} organization + * @param {string} log + * @returns {string} Resource name string. + */ + organizationLogPath(organization: string, log: string) { + return this._pathTemplates.organizationLogPathTemplate.render({ + organization, + log, + }); + } + + /** + * Parse the organization from OrganizationLog resource. + * + * @param {string} organizationLogName + * A fully-qualified path representing organization_log resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLogName(organizationLogName: string) { + return this._pathTemplates.organizationLogPathTemplate.match( + organizationLogName + ).organization; + } + + /** + * Parse the log from OrganizationLog resource. + * + * @param {string} organizationLogName + * A fully-qualified path representing organization_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromOrganizationLogName(organizationLogName: string) { + return this._pathTemplates.organizationLogPathTemplate.match( + organizationLogName + ).log; + } + + /** + * Return a fully-qualified organizationSink resource name string. + * + * @param {string} organization + * @param {string} sink + * @returns {string} Resource name string. + */ + organizationSinkPath(organization: string, sink: string) { + return this._pathTemplates.organizationSinkPathTemplate.render({ + organization, + sink, + }); + } + + /** + * Parse the organization from OrganizationSink resource. + * + * @param {string} organizationSinkName + * A fully-qualified path representing organization_sink resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { + return this._pathTemplates.organizationSinkPathTemplate.match( + organizationSinkName + ).organization; + } + + /** + * Parse the sink from OrganizationSink resource. + * + * @param {string} organizationSinkName + * A fully-qualified path representing organization_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromOrganizationSinkName(organizationSinkName: string) { + return this._pathTemplates.organizationSinkPathTemplate.match( + organizationSinkName + ).sink; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this._pathTemplates.projectPathTemplate.render({ + project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this._pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectCmekSettings resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectCmekSettingsPath(project: string) { + return this._pathTemplates.projectCmekSettingsPathTemplate.render({ + project, + }); + } + + /** + * Parse the project from ProjectCmekSettings resource. + * + * @param {string} projectCmekSettingsName + * A fully-qualified path representing project_cmekSettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { + return this._pathTemplates.projectCmekSettingsPathTemplate.match( + projectCmekSettingsName + ).project; + } + + /** + * Return a fully-qualified projectExclusion resource name string. + * + * @param {string} project + * @param {string} exclusion + * @returns {string} Resource name string. + */ + projectExclusionPath(project: string, exclusion: string) { + return this._pathTemplates.projectExclusionPathTemplate.render({ + project, + exclusion, + }); + } + + /** + * Parse the project from ProjectExclusion resource. + * + * @param {string} projectExclusionName + * A fully-qualified path representing project_exclusion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectExclusionName(projectExclusionName: string) { + return this._pathTemplates.projectExclusionPathTemplate.match( + projectExclusionName + ).project; + } + + /** + * Parse the exclusion from ProjectExclusion resource. + * + * @param {string} projectExclusionName + * A fully-qualified path representing project_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromProjectExclusionName(projectExclusionName: string) { + return this._pathTemplates.projectExclusionPathTemplate.match( + projectExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified projectLocationBucket resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + projectLocationBucketPath(project: string, location: string, bucket: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.render({ + project, + location, + bucket, + }); + } + + /** + * Parse the project from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).project; + } + + /** + * Parse the location from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketName( + projectLocationBucketName: string + ) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified projectLog resource name string. + * + * @param {string} project + * @param {string} log + * @returns {string} Resource name string. + */ + projectLogPath(project: string, log: string) { + return this._pathTemplates.projectLogPathTemplate.render({ + project, + log, + }); + } + + /** + * Parse the project from ProjectLog resource. + * + * @param {string} projectLogName + * A fully-qualified path representing project_log resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLogName(projectLogName: string) { + return this._pathTemplates.projectLogPathTemplate.match(projectLogName) + .project; + } + + /** + * Parse the log from ProjectLog resource. + * + * @param {string} projectLogName + * A fully-qualified path representing project_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromProjectLogName(projectLogName: string) { + return this._pathTemplates.projectLogPathTemplate.match(projectLogName).log; + } + + /** + * Return a fully-qualified projectSink resource name string. + * + * @param {string} project + * @param {string} sink + * @returns {string} Resource name string. + */ + projectSinkPath(project: string, sink: string) { + return this._pathTemplates.projectSinkPathTemplate.render({ + project, + sink, + }); + } + + /** + * Parse the project from ProjectSink resource. + * + * @param {string} projectSinkName + * A fully-qualified path representing project_sink resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSinkName(projectSinkName: string) { + return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + .project; + } + + /** + * Parse the sink from ProjectSink resource. + * + * @param {string} projectSinkName + * A fully-qualified path representing project_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromProjectSinkName(projectSinkName: string) { + return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + .sink; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.loggingServiceV2Stub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index 5d45d38cbbd..871c36dd240 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -2,37 +2,43 @@ "interfaces": { "google.logging.v2.LoggingServiceV2": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "retry_params": { "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "DeleteLog": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "idempotent", + "retry_params_name": "default", + "bundling": { + "element_count_threshold": 1000, + "request_byte_threshold": 1048576, + "delay_threshold_millis": 50, + "element_count_limit": 1000000 + } }, "ListLogEntries": { - "timeout_millis": 10000, - "retry_codes_name": "non_idempotent", + "timeout_millis": 60000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListMonitoredResourceDescriptors": { diff --git a/handwritten/logging/src/v2/logging_service_v2_proto_list.json b/handwritten/logging/src/v2/logging_service_v2_proto_list.json index bf2f385b75d..3103c1e58c0 100644 --- a/handwritten/logging/src/v2/logging_service_v2_proto_list.json +++ b/handwritten/logging/src/v2/logging_service_v2_proto_list.json @@ -1,3 +1,6 @@ [ - "../../protos/google/logging/v2/logging.proto" + "../../protos/google/logging/v2/log_entry.proto", + "../../protos/google/logging/v2/logging.proto", + "../../protos/google/logging/v2/logging_config.proto", + "../../protos/google/logging/v2/logging_metrics.proto" ] diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.js b/handwritten/logging/src/v2/metrics_service_v2_client.js deleted file mode 100644 index 8ac2c2606b1..00000000000 --- a/handwritten/logging/src/v2/metrics_service_v2_client.js +++ /dev/null @@ -1,710 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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'; - -const gapicConfig = require('./metrics_service_v2_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../../package.json').version; - -/** - * Service for configuring logs-based metrics. - * - * @class - * @memberof v2 - */ -class MetricsServiceV2Client { - /** - * Construct an instance of MetricsServiceV2Client. - * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {function} [options.promise] - Custom promise module to use instead - * of native Promises. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - */ - constructor(opts) { - opts = opts || {}; - this._descriptors = {}; - - if (global.isBrowser) { - // If we're in browser, we use gRPC fallback. - opts.fallback = true; - } - - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; - - const servicePath = - opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; - - // Ensure that options include the service address and port. - opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath, - }, - opts - ); - - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = this.constructor.scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); - - // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth; - - // Determine the client header string. - const clientHeader = []; - - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } - clientHeader.push(`gax/${gaxModule.version}`); - if (opts.fallback) { - clientHeader.push(`gl-web/${gaxModule.version}`); - } else { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); - } - clientHeader.push(`gapic/${VERSION}`); - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - - // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath - ); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this._pathTemplates = { - logMetricPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/metrics/{metric}' - ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this._descriptors.page = { - listLogMetrics: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'metrics' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.logging.v2.MetricsServiceV2', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this._innerApiCalls = {}; - - // Put together the "service stub" for - // google.logging.v2.MetricsServiceV2. - const metricsServiceV2Stub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.logging.v2.MetricsServiceV2') - : protos.google.logging.v2.MetricsServiceV2, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const metricsServiceV2StubMethods = [ - 'listLogMetrics', - 'getLogMetric', - 'createLogMetric', - 'updateLogMetric', - 'deleteLogMetric', - ]; - for (const methodName of metricsServiceV2StubMethods) { - const innerCallPromise = metricsServiceV2Stub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.page[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'logging.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'logging.googleapis.com'; - } - - /** - * The port for this API service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - } - - /** - * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. - */ - getProjectId(callback) { - return this.auth.getProjectId(callback); - } - - // ------------------- - // -- Service calls -- - // ------------------- - - /** - * Lists logs-based metrics. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project containing the metrics: - * - * "projects/[PROJECT_ID]" - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [LogMetric]{@link google.logging.v2.LogMetric}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogMetric]{@link google.logging.v2.LogMetric} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.MetricsServiceV2Client({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * client.listLogMetrics({parent: formattedParent}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listLogMetrics(nextRequest, options).then(callback); - * } - * } - * client.listLogMetrics({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listLogMetrics(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - }); - - return this._innerApiCalls.listLogMetrics(request, options, callback); - } - - /** - * Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogMetrics} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project containing the metrics: - * - * "projects/[PROJECT_ID]" - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @returns {Stream} - * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.MetricsServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * client.listLogMetricsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listLogMetricsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listLogMetrics.createStream( - this._innerApiCalls.listLogMetrics, - request, - options - ); - } - - /** - * Gets a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.metricName - * Required. The resource name of the desired metric: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.MetricsServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - * client.getLogMetric({metricName: formattedMetricName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getLogMetric(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - metric_name: request.metricName, - }); - - return this._innerApiCalls.getLogMetric(request, options, callback); - } - - /** - * Creates a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the project in which to create the metric: - * - * "projects/[PROJECT_ID]" - * - * The new metric must be provided in the request. - * @param {Object} request.metric - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.MetricsServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * const metric = {}; - * const request = { - * parent: formattedParent, - * metric: metric, - * }; - * client.createLogMetric(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createLogMetric(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent, - }); - - return this._innerApiCalls.createLogMetric(request, options, callback); - } - - /** - * Creates or updates a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.metricName - * Required. The resource name of the metric to update: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * @param {Object} request.metric - * Required. The updated metric. - * - * This object should have the same structure as [LogMetric]{@link google.logging.v2.LogMetric} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.MetricsServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - * const metric = {}; - * const request = { - * metricName: formattedMetricName, - * metric: metric, - * }; - * client.updateLogMetric(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateLogMetric(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - metric_name: request.metricName, - }); - - return this._innerApiCalls.updateLogMetric(request, options, callback); - } - - /** - * Deletes a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.metricName - * Required. The resource name of the metric to delete: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const logging = require('@google-cloud/logging'); - * - * const client = new logging.v2.MetricsServiceV2Client({ - * // optional auth parameters. - * }); - * - * const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - * client.deleteLogMetric({metricName: formattedMetricName}).catch(err => { - * console.error(err); - * }); - */ - deleteLogMetric(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - metric_name: request.metricName, - }); - - return this._innerApiCalls.deleteLogMetric(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified log_metric resource name string. - * - * @param {String} project - * @param {String} metric - * @returns {String} - */ - logMetricPath(project, metric) { - return this._pathTemplates.logMetricPathTemplate.render({ - project: project, - metric: metric, - }); - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the logMetricName from a log_metric resource. - * - * @param {String} logMetricName - * A fully-qualified path representing a log_metric resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromLogMetricName(logMetricName) { - return this._pathTemplates.logMetricPathTemplate.match(logMetricName) - .project; - } - - /** - * Parse the logMetricName from a log_metric resource. - * - * @param {String} logMetricName - * A fully-qualified path representing a log_metric resources. - * @returns {String} - A string representing the metric. - */ - matchMetricFromLogMetricName(logMetricName) { - return this._pathTemplates.logMetricPathTemplate.match(logMetricName) - .metric; - } - - /** - * Parse the projectName from a project resource. - * - * @param {String} projectName - * A fully-qualified path representing a project resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromProjectName(projectName) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; - } -} - -module.exports = MetricsServiceV2Client; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts new file mode 100644 index 00000000000..10e984fc85f --- /dev/null +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -0,0 +1,1742 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './metrics_service_v2_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Service for configuring logs-based metrics. + * @class + * @memberof v2 + */ +export class MetricsServiceV2Client { + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + metricsServiceV2Stub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MetricsServiceV2Client. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof MetricsServiceV2Client; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof MetricsServiceV2Client).scopes; + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/cmekSettings' + ), + billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/exclusions/{exclusion}' + ), + billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + ), + billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/logs/{log}' + ), + billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/sinks/{sink}' + ), + folderCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/cmekSettings' + ), + folderExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/exclusions/{exclusion}' + ), + folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}' + ), + folderLogPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/logs/{log}' + ), + folderSinkPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/sinks/{sink}' + ), + logMetricPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/metrics/{metric}' + ), + organizationCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/cmekSettings' + ), + organizationExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/exclusions/{exclusion}' + ), + organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}' + ), + organizationLogPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/logs/{log}' + ), + organizationSinkPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/sinks/{sink}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/cmekSettings' + ), + projectExclusionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/exclusions/{exclusion}' + ), + projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}' + ), + projectLogPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/logs/{log}' + ), + projectSinkPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/sinks/{sink}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this._descriptors.page = { + listLogMetrics: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'metrics' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.logging.v2.MetricsServiceV2', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.metricsServiceV2Stub) { + return this.metricsServiceV2Stub; + } + + // Put together the "service stub" for + // google.logging.v2.MetricsServiceV2. + this.metricsServiceV2Stub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.logging.v2.MetricsServiceV2' + ) + : // tslint:disable-next-line no-any + (this._protos as any).google.logging.v2.MetricsServiceV2, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const metricsServiceV2StubMethods = [ + 'listLogMetrics', + 'getLogMetric', + 'createLogMetric', + 'updateLogMetric', + 'deleteLogMetric', + ]; + + for (const methodName of metricsServiceV2StubMethods) { + const innerCallPromise = this.metricsServiceV2Stub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = this._gaxModule.createApiCall( + innerCallPromise, + this._defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + return apiCall(argument, callOptions, callback); + }; + } + + return this.metricsServiceV2Stub; + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'logging.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'logging.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getLogMetric( + request: protosTypes.google.logging.v2.IGetLogMetricRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, + {} | undefined + ] + >; + getLogMetric( + request: protosTypes.google.logging.v2.IGetLogMetricRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName + * Required. The resource name of the desired metric: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getLogMetric( + request: protosTypes.google.logging.v2.IGetLogMetricRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + metric_name: request.metricName || '', + }); + this.initialize(); + return this._innerApiCalls.getLogMetric(request, options, callback); + } + createLogMetric( + request: protosTypes.google.logging.v2.ICreateLogMetricRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, + {} | undefined + ] + >; + createLogMetric( + request: protosTypes.google.logging.v2.ICreateLogMetricRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the project in which to create the metric: + * + * "projects/[PROJECT_ID]" + * + * The new metric must be provided in the request. + * @param {google.logging.v2.LogMetric} request.metric + * Required. The new logs-based metric, which must not have an identifier that + * already exists. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createLogMetric( + request: protosTypes.google.logging.v2.ICreateLogMetricRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this._innerApiCalls.createLogMetric(request, options, callback); + } + updateLogMetric( + request: protosTypes.google.logging.v2.IUpdateLogMetricRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, + {} | undefined + ] + >; + updateLogMetric( + request: protosTypes.google.logging.v2.IUpdateLogMetricRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates or updates a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName + * Required. The resource name of the metric to update: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * The updated metric must be provided in the request and it's + * `name` field must be the same as `[METRIC_ID]` If the metric + * does not exist in `[PROJECT_ID]`, then a new metric is created. + * @param {google.logging.v2.LogMetric} request.metric + * Required. The updated metric. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateLogMetric( + request: protosTypes.google.logging.v2.IUpdateLogMetricRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogMetric, + protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + metric_name: request.metricName || '', + }); + this.initialize(); + return this._innerApiCalls.updateLogMetric(request, options, callback); + } + deleteLogMetric( + request: protosTypes.google.logging.v2.IDeleteLogMetricRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, + {} | undefined + ] + >; + deleteLogMetric( + request: protosTypes.google.logging.v2.IDeleteLogMetricRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, + {} | undefined + > + ): void; + /** + * Deletes a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName + * Required. The resource name of the metric to delete: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteLogMetric( + request: protosTypes.google.logging.v2.IDeleteLogMetricRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + metric_name: request.metricName || '', + }); + this.initialize(); + return this._innerApiCalls.deleteLogMetric(request, options, callback); + } + + listLogMetrics( + request: protosTypes.google.logging.v2.IListLogMetricsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.logging.v2.ILogMetric[], + protosTypes.google.logging.v2.IListLogMetricsRequest | null, + protosTypes.google.logging.v2.IListLogMetricsResponse + ] + >; + listLogMetrics( + request: protosTypes.google.logging.v2.IListLogMetricsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.logging.v2.ILogMetric[], + protosTypes.google.logging.v2.IListLogMetricsRequest | null, + protosTypes.google.logging.v2.IListLogMetricsResponse + > + ): void; + /** + * Lists logs-based metrics. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [LogMetric]{@link google.logging.v2.LogMetric} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListLogMetricsRequest]{@link google.logging.v2.ListLogMetricsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listLogMetrics( + request: protosTypes.google.logging.v2.IListLogMetricsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.logging.v2.ILogMetric[], + protosTypes.google.logging.v2.IListLogMetricsRequest | null, + protosTypes.google.logging.v2.IListLogMetricsResponse + >, + callback?: Callback< + protosTypes.google.logging.v2.ILogMetric[], + protosTypes.google.logging.v2.IListLogMetricsRequest | null, + protosTypes.google.logging.v2.IListLogMetricsResponse + > + ): Promise< + [ + protosTypes.google.logging.v2.ILogMetric[], + protosTypes.google.logging.v2.IListLogMetricsRequest | null, + protosTypes.google.logging.v2.IListLogMetricsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this._innerApiCalls.listLogMetrics(request, options, callback); + } + + /** + * Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listLogMetrics} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. + */ + listLogMetricsStream( + request?: protosTypes.google.logging.v2.IListLogMetricsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this._descriptors.page.listLogMetrics.createStream( + this._innerApiCalls.listLogMetrics as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified billingAccountCmekSettings resource name string. + * + * @param {string} billing_account + * @returns {string} Resource name string. + */ + billingAccountCmekSettingsPath(billingAccount: string) { + return this._pathTemplates.billingAccountCmekSettingsPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Parse the billing_account from BillingAccountCmekSettings resource. + * + * @param {string} billingAccountCmekSettingsName + * A fully-qualified path representing billing_account_cmekSettings resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountCmekSettingsName( + billingAccountCmekSettingsName: string + ) { + return this._pathTemplates.billingAccountCmekSettingsPathTemplate.match( + billingAccountCmekSettingsName + ).billing_account; + } + + /** + * Return a fully-qualified billingAccountExclusion resource name string. + * + * @param {string} billing_account + * @param {string} exclusion + * @returns {string} Resource name string. + */ + billingAccountExclusionPath(billingAccount: string, exclusion: string) { + return this._pathTemplates.billingAccountExclusionPathTemplate.render({ + billing_account: billingAccount, + exclusion, + }); + } + + /** + * Parse the billing_account from BillingAccountExclusion resource. + * + * @param {string} billingAccountExclusionName + * A fully-qualified path representing billing_account_exclusion resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountExclusionName( + billingAccountExclusionName: string + ) { + return this._pathTemplates.billingAccountExclusionPathTemplate.match( + billingAccountExclusionName + ).billing_account; + } + + /** + * Parse the exclusion from BillingAccountExclusion resource. + * + * @param {string} billingAccountExclusionName + * A fully-qualified path representing billing_account_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromBillingAccountExclusionName( + billingAccountExclusionName: string + ) { + return this._pathTemplates.billingAccountExclusionPathTemplate.match( + billingAccountExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified billingAccountLocationBucket resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + billingAccountLocationBucketPath( + billingAccount: string, + location: string, + bucket: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.render({ + billing_account: billingAccount, + location, + bucket, + }); + } + + /** + * Parse the billing_account from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucket resource. + * + * @param {string} billingAccountLocationBucketName + * A fully-qualified path representing billing_account_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketName( + billingAccountLocationBucketName: string + ) { + return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + billingAccountLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified billingAccountLog resource name string. + * + * @param {string} billing_account + * @param {string} log + * @returns {string} Resource name string. + */ + billingAccountLogPath(billingAccount: string, log: string) { + return this._pathTemplates.billingAccountLogPathTemplate.render({ + billing_account: billingAccount, + log, + }); + } + + /** + * Parse the billing_account from BillingAccountLog resource. + * + * @param {string} billingAccountLogName + * A fully-qualified path representing billing_account_log resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { + return this._pathTemplates.billingAccountLogPathTemplate.match( + billingAccountLogName + ).billing_account; + } + + /** + * Parse the log from BillingAccountLog resource. + * + * @param {string} billingAccountLogName + * A fully-qualified path representing billing_account_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromBillingAccountLogName(billingAccountLogName: string) { + return this._pathTemplates.billingAccountLogPathTemplate.match( + billingAccountLogName + ).log; + } + + /** + * Return a fully-qualified billingAccountSink resource name string. + * + * @param {string} billing_account + * @param {string} sink + * @returns {string} Resource name string. + */ + billingAccountSinkPath(billingAccount: string, sink: string) { + return this._pathTemplates.billingAccountSinkPathTemplate.render({ + billing_account: billingAccount, + sink, + }); + } + + /** + * Parse the billing_account from BillingAccountSink resource. + * + * @param {string} billingAccountSinkName + * A fully-qualified path representing billing_account_sink resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountSinkName( + billingAccountSinkName: string + ) { + return this._pathTemplates.billingAccountSinkPathTemplate.match( + billingAccountSinkName + ).billing_account; + } + + /** + * Parse the sink from BillingAccountSink resource. + * + * @param {string} billingAccountSinkName + * A fully-qualified path representing billing_account_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { + return this._pathTemplates.billingAccountSinkPathTemplate.match( + billingAccountSinkName + ).sink; + } + + /** + * Return a fully-qualified folderCmekSettings resource name string. + * + * @param {string} folder + * @returns {string} Resource name string. + */ + folderCmekSettingsPath(folder: string) { + return this._pathTemplates.folderCmekSettingsPathTemplate.render({ + folder, + }); + } + + /** + * Parse the folder from FolderCmekSettings resource. + * + * @param {string} folderCmekSettingsName + * A fully-qualified path representing folder_cmekSettings resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { + return this._pathTemplates.folderCmekSettingsPathTemplate.match( + folderCmekSettingsName + ).folder; + } + + /** + * Return a fully-qualified folderExclusion resource name string. + * + * @param {string} folder + * @param {string} exclusion + * @returns {string} Resource name string. + */ + folderExclusionPath(folder: string, exclusion: string) { + return this._pathTemplates.folderExclusionPathTemplate.render({ + folder, + exclusion, + }); + } + + /** + * Parse the folder from FolderExclusion resource. + * + * @param {string} folderExclusionName + * A fully-qualified path representing folder_exclusion resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderExclusionName(folderExclusionName: string) { + return this._pathTemplates.folderExclusionPathTemplate.match( + folderExclusionName + ).folder; + } + + /** + * Parse the exclusion from FolderExclusion resource. + * + * @param {string} folderExclusionName + * A fully-qualified path representing folder_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromFolderExclusionName(folderExclusionName: string) { + return this._pathTemplates.folderExclusionPathTemplate.match( + folderExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified folderLocationBucket resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + folderLocationBucketPath(folder: string, location: string, bucket: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.render({ + folder, + location, + bucket, + }); + } + + /** + * Parse the folder from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).folder; + } + + /** + * Parse the location from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucket resource. + * + * @param {string} folderLocationBucketName + * A fully-qualified path representing folder_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { + return this._pathTemplates.folderLocationBucketPathTemplate.match( + folderLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified folderLog resource name string. + * + * @param {string} folder + * @param {string} log + * @returns {string} Resource name string. + */ + folderLogPath(folder: string, log: string) { + return this._pathTemplates.folderLogPathTemplate.render({ + folder, + log, + }); + } + + /** + * Parse the folder from FolderLog resource. + * + * @param {string} folderLogName + * A fully-qualified path representing folder_log resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLogName(folderLogName: string) { + return this._pathTemplates.folderLogPathTemplate.match(folderLogName) + .folder; + } + + /** + * Parse the log from FolderLog resource. + * + * @param {string} folderLogName + * A fully-qualified path representing folder_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromFolderLogName(folderLogName: string) { + return this._pathTemplates.folderLogPathTemplate.match(folderLogName).log; + } + + /** + * Return a fully-qualified folderSink resource name string. + * + * @param {string} folder + * @param {string} sink + * @returns {string} Resource name string. + */ + folderSinkPath(folder: string, sink: string) { + return this._pathTemplates.folderSinkPathTemplate.render({ + folder, + sink, + }); + } + + /** + * Parse the folder from FolderSink resource. + * + * @param {string} folderSinkName + * A fully-qualified path representing folder_sink resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderSinkName(folderSinkName: string) { + return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + .folder; + } + + /** + * Parse the sink from FolderSink resource. + * + * @param {string} folderSinkName + * A fully-qualified path representing folder_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromFolderSinkName(folderSinkName: string) { + return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + .sink; + } + + /** + * Return a fully-qualified logMetric resource name string. + * + * @param {string} project + * @param {string} metric + * @returns {string} Resource name string. + */ + logMetricPath(project: string, metric: string) { + return this._pathTemplates.logMetricPathTemplate.render({ + project, + metric, + }); + } + + /** + * Parse the project from LogMetric resource. + * + * @param {string} logMetricName + * A fully-qualified path representing LogMetric resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLogMetricName(logMetricName: string) { + return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + .project; + } + + /** + * Parse the metric from LogMetric resource. + * + * @param {string} logMetricName + * A fully-qualified path representing LogMetric resource. + * @returns {string} A string representing the metric. + */ + matchMetricFromLogMetricName(logMetricName: string) { + return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + .metric; + } + + /** + * Return a fully-qualified organizationCmekSettings resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationCmekSettingsPath(organization: string) { + return this._pathTemplates.organizationCmekSettingsPathTemplate.render({ + organization, + }); + } + + /** + * Parse the organization from OrganizationCmekSettings resource. + * + * @param {string} organizationCmekSettingsName + * A fully-qualified path representing organization_cmekSettings resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationCmekSettingsName( + organizationCmekSettingsName: string + ) { + return this._pathTemplates.organizationCmekSettingsPathTemplate.match( + organizationCmekSettingsName + ).organization; + } + + /** + * Return a fully-qualified organizationExclusion resource name string. + * + * @param {string} organization + * @param {string} exclusion + * @returns {string} Resource name string. + */ + organizationExclusionPath(organization: string, exclusion: string) { + return this._pathTemplates.organizationExclusionPathTemplate.render({ + organization, + exclusion, + }); + } + + /** + * Parse the organization from OrganizationExclusion resource. + * + * @param {string} organizationExclusionName + * A fully-qualified path representing organization_exclusion resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationExclusionName( + organizationExclusionName: string + ) { + return this._pathTemplates.organizationExclusionPathTemplate.match( + organizationExclusionName + ).organization; + } + + /** + * Parse the exclusion from OrganizationExclusion resource. + * + * @param {string} organizationExclusionName + * A fully-qualified path representing organization_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromOrganizationExclusionName( + organizationExclusionName: string + ) { + return this._pathTemplates.organizationExclusionPathTemplate.match( + organizationExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified organizationLocationBucket resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + organizationLocationBucketPath( + organization: string, + location: string, + bucket: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.render({ + organization, + location, + bucket, + }); + } + + /** + * Parse the organization from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucket resource. + * + * @param {string} organizationLocationBucketName + * A fully-qualified path representing organization_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketName( + organizationLocationBucketName: string + ) { + return this._pathTemplates.organizationLocationBucketPathTemplate.match( + organizationLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified organizationLog resource name string. + * + * @param {string} organization + * @param {string} log + * @returns {string} Resource name string. + */ + organizationLogPath(organization: string, log: string) { + return this._pathTemplates.organizationLogPathTemplate.render({ + organization, + log, + }); + } + + /** + * Parse the organization from OrganizationLog resource. + * + * @param {string} organizationLogName + * A fully-qualified path representing organization_log resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLogName(organizationLogName: string) { + return this._pathTemplates.organizationLogPathTemplate.match( + organizationLogName + ).organization; + } + + /** + * Parse the log from OrganizationLog resource. + * + * @param {string} organizationLogName + * A fully-qualified path representing organization_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromOrganizationLogName(organizationLogName: string) { + return this._pathTemplates.organizationLogPathTemplate.match( + organizationLogName + ).log; + } + + /** + * Return a fully-qualified organizationSink resource name string. + * + * @param {string} organization + * @param {string} sink + * @returns {string} Resource name string. + */ + organizationSinkPath(organization: string, sink: string) { + return this._pathTemplates.organizationSinkPathTemplate.render({ + organization, + sink, + }); + } + + /** + * Parse the organization from OrganizationSink resource. + * + * @param {string} organizationSinkName + * A fully-qualified path representing organization_sink resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { + return this._pathTemplates.organizationSinkPathTemplate.match( + organizationSinkName + ).organization; + } + + /** + * Parse the sink from OrganizationSink resource. + * + * @param {string} organizationSinkName + * A fully-qualified path representing organization_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromOrganizationSinkName(organizationSinkName: string) { + return this._pathTemplates.organizationSinkPathTemplate.match( + organizationSinkName + ).sink; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this._pathTemplates.projectPathTemplate.render({ + project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this._pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectCmekSettings resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectCmekSettingsPath(project: string) { + return this._pathTemplates.projectCmekSettingsPathTemplate.render({ + project, + }); + } + + /** + * Parse the project from ProjectCmekSettings resource. + * + * @param {string} projectCmekSettingsName + * A fully-qualified path representing project_cmekSettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { + return this._pathTemplates.projectCmekSettingsPathTemplate.match( + projectCmekSettingsName + ).project; + } + + /** + * Return a fully-qualified projectExclusion resource name string. + * + * @param {string} project + * @param {string} exclusion + * @returns {string} Resource name string. + */ + projectExclusionPath(project: string, exclusion: string) { + return this._pathTemplates.projectExclusionPathTemplate.render({ + project, + exclusion, + }); + } + + /** + * Parse the project from ProjectExclusion resource. + * + * @param {string} projectExclusionName + * A fully-qualified path representing project_exclusion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectExclusionName(projectExclusionName: string) { + return this._pathTemplates.projectExclusionPathTemplate.match( + projectExclusionName + ).project; + } + + /** + * Parse the exclusion from ProjectExclusion resource. + * + * @param {string} projectExclusionName + * A fully-qualified path representing project_exclusion resource. + * @returns {string} A string representing the exclusion. + */ + matchExclusionFromProjectExclusionName(projectExclusionName: string) { + return this._pathTemplates.projectExclusionPathTemplate.match( + projectExclusionName + ).exclusion; + } + + /** + * Return a fully-qualified projectLocationBucket resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @returns {string} Resource name string. + */ + projectLocationBucketPath(project: string, location: string, bucket: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.render({ + project, + location, + bucket, + }); + } + + /** + * Parse the project from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).project; + } + + /** + * Parse the location from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketName( + projectLocationBucketName: string + ) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucket resource. + * + * @param {string} projectLocationBucketName + * A fully-qualified path representing project_location_bucket resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { + return this._pathTemplates.projectLocationBucketPathTemplate.match( + projectLocationBucketName + ).bucket; + } + + /** + * Return a fully-qualified projectLog resource name string. + * + * @param {string} project + * @param {string} log + * @returns {string} Resource name string. + */ + projectLogPath(project: string, log: string) { + return this._pathTemplates.projectLogPathTemplate.render({ + project, + log, + }); + } + + /** + * Parse the project from ProjectLog resource. + * + * @param {string} projectLogName + * A fully-qualified path representing project_log resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLogName(projectLogName: string) { + return this._pathTemplates.projectLogPathTemplate.match(projectLogName) + .project; + } + + /** + * Parse the log from ProjectLog resource. + * + * @param {string} projectLogName + * A fully-qualified path representing project_log resource. + * @returns {string} A string representing the log. + */ + matchLogFromProjectLogName(projectLogName: string) { + return this._pathTemplates.projectLogPathTemplate.match(projectLogName).log; + } + + /** + * Return a fully-qualified projectSink resource name string. + * + * @param {string} project + * @param {string} sink + * @returns {string} Resource name string. + */ + projectSinkPath(project: string, sink: string) { + return this._pathTemplates.projectSinkPathTemplate.render({ + project, + sink, + }); + } + + /** + * Parse the project from ProjectSink resource. + * + * @param {string} projectSinkName + * A fully-qualified path representing project_sink resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSinkName(projectSinkName: string) { + return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + .project; + } + + /** + * Parse the sink from ProjectSink resource. + * + * @param {string} projectSinkName + * A fully-qualified path representing project_sink resource. + * @returns {string} A string representing the sink. + */ + matchSinkFromProjectSinkName(projectSinkName: string) { + return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + .sink; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.metricsServiceV2Stub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json index e047e96c874..142e0e10fba 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client_config.json +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -2,20 +2,20 @@ "interfaces": { "google.logging.v2.MetricsServiceV2": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "retry_params": { "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, @@ -37,12 +37,12 @@ }, "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default" } } diff --git a/handwritten/logging/src/v2/metrics_service_v2_proto_list.json b/handwritten/logging/src/v2/metrics_service_v2_proto_list.json index 33a1febc856..3103c1e58c0 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_proto_list.json +++ b/handwritten/logging/src/v2/metrics_service_v2_proto_list.json @@ -1,3 +1,6 @@ [ + "../../protos/google/logging/v2/log_entry.proto", + "../../protos/google/logging/v2/logging.proto", + "../../protos/google/logging/v2/logging_config.proto", "../../protos/google/logging/v2/logging_metrics.proto" ] diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 9e5d3208e4c..86f080e99ae 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,27 +1,19 @@ { - "updateTime": "2020-03-08T11:30:18.289668Z", + "updateTime": "2020-03-23T19:52:03.983833Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "1.0.0", - "dockerImage": "googleapis/artman@sha256:f37f2464788cb551299209b4fcab4eb323533154488c2ef9ec0c75d7c2b4b482" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b6927fca808f38df32a642c560082f5bf6538ced", - "internalRef": "299503150", - "log": "b6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\nf0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n1e47e676cddbbd8d93f19ba0665af15b5532417e\nFix: Restore a method signature for UpdateCluster\n\nPiperOrigin-RevId: 296901854\n\n7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\nd9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n" + "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", + "internalRef": "302154871" } }, { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" } } ], @@ -31,9 +23,8 @@ "source": "googleapis", "apiName": "logging", "apiVersion": "v2", - "language": "nodejs", - "generator": "gapic", - "config": "google/logging/artman_logging.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } } ] diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 70a8355959d..047b405d463 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -23,48 +23,33 @@ logging.basicConfig(level=logging.DEBUG) s.metadata.set_track_obsolete_files(True) -gapic = gcp.GAPICGenerator() +gapic = gcp.GAPICMicrogenerator() +version='v2' # tasks has two product names, and a poorly named artman yaml -v2_library = gapic.node_library( +v2_library = gapic.typescript_library( "logging", - "v2", - config_path="/google/logging/artman_logging.yaml", - artman_output_name="logging-v2", -) -s.copy(v2_library, excludes=["src/index.js", "README.md", "package.json"]) -s.replace( - [ - "src/v2/config_service_v2_client.js", - "src/v2/logging_service_v2_client.js", - "src/v2/metrics_service_v2_client.js", - ], - "../../package.json", - "../../../package.json", + version, + generator_args={ + "grpc-service-config": f"google/logging/{version}/logging_grpc_service_config.json", + "package-name": f"@google-cloud/logging", + "main-service": f"logging", + "bundle-config": f"google/logging/{version}/logging_gapic.yaml" + }, + proto_path=f'/google/logging/{version}', + extra_proto_files=['google/cloud/common_resources.proto'], ) +s.copy(v2_library, excludes=["src/index.ts", "README.md", "package.json"]) +# fix incorrect docs link +s.replace('src/v2/config_service_v2_client.ts', '/logging/docs/routing/managed-encryption', 'https://cloud.google.com/logging/docs/routing/managed-encryption') +s.replace('src/v2/logging_service_v2_client.ts', '/logging/docs/', 'https://cloud.google.com/logging/docs/') +s.replace('src/v2/logging_service_v2_client.ts', '/logging/quota-policy', 'https://cloud.google.com/logging/quota-policy') # Copy in templated files common_templates = gcp.CommonTemplates() templates = common_templates.node_library(source_location='build/src') s.copy(templates) -# [START fix-dead-link] -s.replace('**/doc/google/protobuf/doc_timestamp.js', - 'https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)', - r"https://\1)") - -s.replace('**/doc/google/protobuf/doc_timestamp.js', - 'toISOString\]', - 'toISOString)') -# [END fix-dead-link] - -s.replace('src/v2/doc/google/api/doc_distribution.js', - r"Sum\[i=1\.\.n\]\(https:\/\/cloud\.google\.com\(x_i - mean\)\^2\)", - "Sum\[i=1..n](x_1 - mean)^2") - -# No browser support for TypeScript libraries yet -os.unlink("src/browser.js") -os.unlink("webpack.config.js") - # Node.js specific cleanup subprocess.run(["npm", "install"]) subprocess.run(["npm", "run", "fix"]) +subprocess.run(["npx", "compileProtos", "src"]) diff --git a/handwritten/logging/system-test/fixtures/sample/package.json b/handwritten/logging/system-test/fixtures/sample/package.json deleted file mode 100644 index a7b5a4eacbc..00000000000 --- a/handwritten/logging/system-test/fixtures/sample/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "logging-sample-fixture", - "description": "An app we're using to test the library.", - "scripts": { - "check": "gts check", - "clean": "gts clean", - "compile": "tsc -p .", - "fix": "gts fix", - "prepare": "npm run compile", - "pretest": "npm run compile", - "posttest": "npm run check", - "start": "node build/src/index.js" - }, - "license": "Apache-2.0", - "dependencies": { - "@google-cloud/logging": "file:./logging.tgz" - }, - "devDependencies": { - "@types/node": "^10.3.0", - "typescript": "^3.0.0", - "gts": "^1.0.0" - } -} diff --git a/handwritten/logging/src/v2/index.js b/handwritten/logging/system-test/fixtures/sample/src/index.js similarity index 58% rename from handwritten/logging/src/v2/index.js rename to handwritten/logging/system-test/fixtures/sample/src/index.js index 745d8f5f213..a48b7fafa07 100644 --- a/handwritten/logging/src/v2/index.js +++ b/handwritten/logging/system-test/fixtures/sample/src/index.js @@ -11,13 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; +/* eslint-disable node/no-missing-require, no-unused-vars */ +const logging = require('@google-cloud/logging'); -const ConfigServiceV2Client = require('./config_service_v2_client'); -const LoggingServiceV2Client = require('./logging_service_v2_client'); -const MetricsServiceV2Client = require('./metrics_service_v2_client'); +function main() { + const client = new logging.Logging(); +} -module.exports.ConfigServiceV2Client = ConfigServiceV2Client; -module.exports.LoggingServiceV2Client = LoggingServiceV2Client; -module.exports.MetricsServiceV2Client = MetricsServiceV2Client; +main(); diff --git a/handwritten/logging/system-test/fixtures/sample/src/index.ts b/handwritten/logging/system-test/fixtures/sample/src/index.ts index e006ba5962f..225d586b1d5 100644 --- a/handwritten/logging/system-test/fixtures/sample/src/index.ts +++ b/handwritten/logging/system-test/fixtures/sample/src/index.ts @@ -1,6 +1,25 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + import {Logging} from '@google-cloud/logging'; -async function main() { - const logging = new Logging(); - console.dir(logging); + +function main() { + const loggingServiceV2Client = new Logging(); } + main(); diff --git a/handwritten/logging/system-test/fixtures/sample/tsconfig.json b/handwritten/logging/system-test/fixtures/sample/tsconfig.json deleted file mode 100644 index f893d7afb9b..00000000000 --- a/handwritten/logging/system-test/fixtures/sample/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build" - }, - "include": [ - "src/*.ts" - ] -} diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index 26fb61498cf..c4d80e9c0c8 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -1,56 +1,51 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -import execa = require('execa'); -import * as mv from 'mv'; -import {ncp} from 'ncp'; -import * as tmp from 'tmp'; -import {promisify} from 'util'; - -const keep = false; -const mvp = (promisify(mv) as {}) as (...args: string[]) => Promise; -const ncpp = promisify(ncp); -const stagingDir = tmp.dirSync({keep, unsafeCleanup: true}); -const stagingPath = stagingDir.name; -const pkg = require('../../package.json'); +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; -describe('📦 pack and install', () => { - /** - * Create a staging directory with temp fixtures used to test on a fresh - * application. - */ - it('should be able to use the d.ts', async () => { - await execa('npm', ['pack', '--unsafe-perm']); - const tarball = `google-cloud-logging-${pkg.version}.tgz`; - await mvp(tarball, `${stagingPath}/logging.tgz`); - await ncpp('system-test/fixtures/sample', `${stagingPath}/`); - await execa('npm', ['install', '--unsafe-perm'], { - cwd: `${stagingPath}/`, - stdio: 'inherit', - }); - await execa('node', ['--throw-deprecation', 'build/src/index.js'], { - cwd: `${stagingPath}/`, - stdio: 'inherit', - }); +describe('typescript consumer tests', () => { + it('should have correct type signature for typescript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. }); - /** - * CLEAN UP - remove the staging directory when done. - */ - after('cleanup staging', () => { - if (!keep) { - stagingDir.removeCallback(); - } + it('should have correct type signature for javascript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. }); }); diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 8596013af6f..7ce7cb9ad8f 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -669,7 +669,7 @@ describe('Logging', async () => { const {log, logEntries} = getTestLog(new Logging()); await log.write(logEntries[0], options); assert.ok( - /gl-node\/[0-9]+\.[\w.-]+ gax\/[0-9]+\.[\w.-]+ grpc\/[0-9]+\.[\w.-]+ gapic\/[0-9]+\.[\w.-]+ gccl\/[0-9]+\.[\w.-]+/.test( + /gax\/[0-9]+\.[\w.-]+ gapic\/[0-9]+\.[\w.-]+ gl-node\/[0-9]+\.[\w.-]+ grpc\/[0-9]+\.[\w.-]+ gccl\/[0-9]+\.[\w.-]+/.test( http2spy.requests[0]['x-goog-api-client'][0] ) ); diff --git a/handwritten/logging/test/gapic-config_service_v2-v2.ts b/handwritten/logging/test/gapic-config_service_v2-v2.ts new file mode 100644 index 00000000000..f285c878210 --- /dev/null +++ b/handwritten/logging/test/gapic-config_service_v2-v2.ts @@ -0,0 +1,915 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protosTypes from '../protos/protos'; +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +const configservicev2Module = require('../src'); + +const FAKE_STATUS_CODE = 1; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} + +export class Operation { + constructor() {} + promise() {} +} +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +describe('v2.ConfigServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = + configservicev2Module.v2.ConfigServiceV2Client.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + configservicev2Module.v2.ConfigServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = configservicev2Module.v2.ConfigServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + fallback: true, + }); + assert(client); + }); + it('has initialize method and supports deferred initialization', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.configServiceV2Stub, undefined); + await client.initialize(); + assert(client.configServiceV2Stub); + }); + it('has close method', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + describe('getBucket', () => { + it('invokes getBucket without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetBucketRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getBucket = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getBucket(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getBucket with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetBucketRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getBucket = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getBucket(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateBucket', () => { + it('invokes updateBucket without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateBucketRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateBucket(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateBucket with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateBucketRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateBucket(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getSink', () => { + it('invokes getSink without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetSinkRequest = {}; + request.sinkName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getSink = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getSink(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getSink with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetSinkRequest = {}; + request.sinkName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getSink = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getSink(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createSink', () => { + it('invokes createSink without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.ICreateSinkRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createSink = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createSink(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createSink with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.ICreateSinkRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createSink = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createSink(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateSink', () => { + it('invokes updateSink without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateSinkRequest = {}; + request.sinkName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateSink(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateSink with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateSinkRequest = {}; + request.sinkName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateSink = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateSink(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteSink', () => { + it('invokes deleteSink without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IDeleteSinkRequest = {}; + request.sinkName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteSink(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteSink with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IDeleteSinkRequest = {}; + request.sinkName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteSink(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getExclusion', () => { + it('invokes getExclusion without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetExclusionRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getExclusion(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getExclusion with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetExclusionRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getExclusion(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createExclusion', () => { + it('invokes createExclusion without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.ICreateExclusionRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createExclusion(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createExclusion with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.ICreateExclusionRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createExclusion(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateExclusion', () => { + it('invokes updateExclusion without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateExclusionRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateExclusion(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateExclusion with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateExclusionRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateExclusion(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteExclusion', () => { + it('invokes deleteExclusion without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IDeleteExclusionRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteExclusion(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteExclusion with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IDeleteExclusionRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteExclusion(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getCmekSettings', () => { + it('invokes getCmekSettings without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetCmekSettingsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getCmekSettings(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getCmekSettings with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetCmekSettingsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getCmekSettings(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateCmekSettings', () => { + it('invokes updateCmekSettings without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateCmekSettings(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateCmekSettings with error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateCmekSettings(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listBuckets', () => { + it('invokes listBuckets without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListBucketsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listBuckets = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listBuckets(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listBucketsStream', () => { + it('invokes listBucketsStream without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListBucketsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listBuckets = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listBucketsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listSinks', () => { + it('invokes listSinks without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListSinksRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listSinks = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listSinks(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listSinksStream', () => { + it('invokes listSinksStream without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListSinksRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listSinks = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listSinksStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listExclusions', () => { + it('invokes listExclusions without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListExclusionsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listExclusions = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listExclusions(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listExclusionsStream', () => { + it('invokes listExclusionsStream without error', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListExclusionsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listExclusions = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listExclusionsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/handwritten/logging/test/gapic-logging_service_v2-v2.ts b/handwritten/logging/test/gapic-logging_service_v2-v2.ts new file mode 100644 index 00000000000..081b22b77ba --- /dev/null +++ b/handwritten/logging/test/gapic-logging_service_v2-v2.ts @@ -0,0 +1,392 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protosTypes from '../protos/protos'; +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +const loggingservicev2Module = require('../src'); + +const FAKE_STATUS_CODE = 1; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} + +export class Operation { + constructor() {} + promise() {} +} +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +describe('v2.LoggingServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = + loggingservicev2Module.v2.LoggingServiceV2Client.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + loggingservicev2Module.v2.LoggingServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = loggingservicev2Module.v2.LoggingServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + fallback: true, + }); + assert(client); + }); + it('has initialize method and supports deferred initialization', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.loggingServiceV2Stub, undefined); + await client.initialize(); + assert(client.loggingServiceV2Stub); + }); + it('has close method', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + describe('deleteLog', () => { + it('invokes deleteLog without error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IDeleteLogRequest = {}; + request.logName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteLog(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteLog with error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IDeleteLogRequest = {}; + request.logName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteLog(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('writeLogEntries', () => { + it('invokes writeLogEntries without error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IWriteLogEntriesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.writeLogEntries(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes writeLogEntries with error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IWriteLogEntriesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( + request, + null, + error + ); + client.writeLogEntries(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listLogEntries', () => { + it('invokes listLogEntries without error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListLogEntriesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listLogEntries = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listLogEntries(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listLogEntriesStream', () => { + it('invokes listLogEntriesStream without error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListLogEntriesRequest = {}; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listLogEntries = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listLogEntriesStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listMonitoredResourceDescriptors', () => { + it('invokes listMonitoredResourceDescriptors without error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listMonitoredResourceDescriptors = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listMonitoredResourceDescriptors( + request, + (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + }); + describe('listMonitoredResourceDescriptorsStream', () => { + it('invokes listMonitoredResourceDescriptorsStream without error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest = {}; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listMonitoredResourceDescriptors = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listMonitoredResourceDescriptorsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listLogs', () => { + it('invokes listLogs without error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListLogsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listLogs = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listLogs(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listLogsStream', () => { + it('invokes listLogsStream without error', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListLogsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listLogs = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listLogsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/handwritten/logging/test/gapic-metrics_service_v2-v2.ts b/handwritten/logging/test/gapic-metrics_service_v2-v2.ts new file mode 100644 index 00000000000..a24d8494545 --- /dev/null +++ b/handwritten/logging/test/gapic-metrics_service_v2-v2.ts @@ -0,0 +1,373 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protosTypes from '../protos/protos'; +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +const metricsservicev2Module = require('../src'); + +const FAKE_STATUS_CODE = 1; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} + +export class Operation { + constructor() {} + promise() {} +} +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +describe('v2.MetricsServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = + metricsservicev2Module.v2.MetricsServiceV2Client.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + metricsservicev2Module.v2.MetricsServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = metricsservicev2Module.v2.MetricsServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + fallback: true, + }); + assert(client); + }); + it('has initialize method and supports deferred initialization', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metricsServiceV2Stub, undefined); + await client.initialize(); + assert(client.metricsServiceV2Stub); + }); + it('has close method', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + describe('getLogMetric', () => { + it('invokes getLogMetric without error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetLogMetricRequest = {}; + request.metricName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getLogMetric(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getLogMetric with error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IGetLogMetricRequest = {}; + request.metricName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getLogMetric(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createLogMetric', () => { + it('invokes createLogMetric without error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.ICreateLogMetricRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createLogMetric(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createLogMetric with error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.ICreateLogMetricRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createLogMetric(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateLogMetric', () => { + it('invokes updateLogMetric without error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateLogMetricRequest = {}; + request.metricName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateLogMetric(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateLogMetric with error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IUpdateLogMetricRequest = {}; + request.metricName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateLogMetric(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteLogMetric', () => { + it('invokes deleteLogMetric without error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IDeleteLogMetricRequest = {}; + request.metricName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteLogMetric(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteLogMetric with error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IDeleteLogMetricRequest = {}; + request.metricName = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteLogMetric(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listLogMetrics', () => { + it('invokes listLogMetrics without error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListLogMetricsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listLogMetrics = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listLogMetrics(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listLogMetricsStream', () => { + it('invokes listLogMetricsStream without error', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.logging.v2.IListLogMetricsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listLogMetrics = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listLogMetricsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/handwritten/logging/test/gapic-v2.js b/handwritten/logging/test/gapic-v2.js deleted file mode 100644 index d9eac0ae387..00000000000 --- a/handwritten/logging/test/gapic-v2.js +++ /dev/null @@ -1,1739 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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'; - -const assert = require('assert'); -const {describe, it} = require('mocha'); - -const loggingModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; - -describe('ConfigServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = loggingModule.v2.ConfigServiceV2Client.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = loggingModule.v2.ConfigServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = loggingModule.v2.ConfigServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new loggingModule.v2.ConfigServiceV2Client(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new loggingModule.v2.ConfigServiceV2Client({fallback: true}); - assert(client); - }); - - describe('listBuckets', () => { - it('invokes listBuckets without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const parent = 'parent-995424086'; - const request = { - parent: parent, - }; - - // Mock response - const nextPageToken = ''; - const bucketsElement = {}; - const buckets = [bucketsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - buckets: buckets, - }; - - // Mock Grpc layer - client._innerApiCalls.listBuckets = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.buckets); - }; - - client.listBuckets(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.buckets); - done(); - }); - }); - - it('invokes listBuckets with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const parent = 'parent-995424086'; - const request = { - parent: parent, - }; - - // Mock Grpc layer - client._innerApiCalls.listBuckets = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listBuckets(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getBucket', () => { - it('invokes getBucket without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const request = { - name: name, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const description = 'description-1724546052'; - const retentionDays = 1544391896; - const expectedResponse = { - name: name2, - description: description, - retentionDays: retentionDays, - }; - - // Mock Grpc layer - client._innerApiCalls.getBucket = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getBucket(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getBucket with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const request = { - name: name, - }; - - // Mock Grpc layer - client._innerApiCalls.getBucket = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getBucket(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateBucket', () => { - it('invokes updateBucket without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const bucket = {}; - const updateMask = {}; - const request = { - name: name, - bucket: bucket, - updateMask: updateMask, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const description = 'description-1724546052'; - const retentionDays = 1544391896; - const expectedResponse = { - name: name2, - description: description, - retentionDays: retentionDays, - }; - - // Mock Grpc layer - client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateBucket(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateBucket with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const bucket = {}; - const updateMask = {}; - const request = { - name: name, - bucket: bucket, - updateMask: updateMask, - }; - - // Mock Grpc layer - client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateBucket(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listSinks', () => { - it('invokes listSinks without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const sinksElement = {}; - const sinks = [sinksElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - sinks: sinks, - }; - - // Mock Grpc layer - client._innerApiCalls.listSinks = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.sinks); - }; - - client.listSinks(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.sinks); - done(); - }); - }); - - it('invokes listSinks with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listSinks = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listSinks(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getSink', () => { - it('invokes getSink without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const sinkName = 'sinkName-1391757129'; - const request = { - sinkName: sinkName, - }; - - // Mock response - const name = 'name3373707'; - const destination = 'destination-1429847026'; - const filter = 'filter-1274492040'; - const description = 'description-1724546052'; - const disabled = true; - const writerIdentity = 'writerIdentity775638794'; - const includeChildren = true; - const expectedResponse = { - name: name, - destination: destination, - filter: filter, - description: description, - disabled: disabled, - writerIdentity: writerIdentity, - includeChildren: includeChildren, - }; - - // Mock Grpc layer - client._innerApiCalls.getSink = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getSink(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getSink with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const sinkName = 'sinkName-1391757129'; - const request = { - sinkName: sinkName, - }; - - // Mock Grpc layer - client._innerApiCalls.getSink = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getSink(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createSink', () => { - it('invokes createSink without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const sink = {}; - const request = { - parent: formattedParent, - sink: sink, - }; - - // Mock response - const name = 'name3373707'; - const destination = 'destination-1429847026'; - const filter = 'filter-1274492040'; - const description = 'description-1724546052'; - const disabled = true; - const writerIdentity = 'writerIdentity775638794'; - const includeChildren = true; - const expectedResponse = { - name: name, - destination: destination, - filter: filter, - description: description, - disabled: disabled, - writerIdentity: writerIdentity, - includeChildren: includeChildren, - }; - - // Mock Grpc layer - client._innerApiCalls.createSink = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createSink(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createSink with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const sink = {}; - const request = { - parent: formattedParent, - sink: sink, - }; - - // Mock Grpc layer - client._innerApiCalls.createSink = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createSink(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateSink', () => { - it('invokes updateSink without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const sinkName = 'sinkName-1391757129'; - const sink = {}; - const request = { - sinkName: sinkName, - sink: sink, - }; - - // Mock response - const name = 'name3373707'; - const destination = 'destination-1429847026'; - const filter = 'filter-1274492040'; - const description = 'description-1724546052'; - const disabled = true; - const writerIdentity = 'writerIdentity775638794'; - const includeChildren = true; - const expectedResponse = { - name: name, - destination: destination, - filter: filter, - description: description, - disabled: disabled, - writerIdentity: writerIdentity, - includeChildren: includeChildren, - }; - - // Mock Grpc layer - client._innerApiCalls.updateSink = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateSink(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateSink with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const sinkName = 'sinkName-1391757129'; - const sink = {}; - const request = { - sinkName: sinkName, - sink: sink, - }; - - // Mock Grpc layer - client._innerApiCalls.updateSink = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateSink(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteSink', () => { - it('invokes deleteSink without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const sinkName = 'sinkName-1391757129'; - const request = { - sinkName: sinkName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteSink = mockSimpleGrpcMethod(request); - - client.deleteSink(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteSink with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const sinkName = 'sinkName-1391757129'; - const request = { - sinkName: sinkName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteSink(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('listExclusions', () => { - it('invokes listExclusions without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const exclusionsElement = {}; - const exclusions = [exclusionsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - exclusions: exclusions, - }; - - // Mock Grpc layer - client._innerApiCalls.listExclusions = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.exclusions); - }; - - client.listExclusions(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.exclusions); - done(); - }); - }); - - it('invokes listExclusions with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listExclusions = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listExclusions(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getExclusion', () => { - it('invokes getExclusion without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const request = { - name: name, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const disabled = true; - const expectedResponse = { - name: name2, - description: description, - filter: filter, - disabled: disabled, - }; - - // Mock Grpc layer - client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getExclusion(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getExclusion with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const request = { - name: name, - }; - - // Mock Grpc layer - client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getExclusion(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createExclusion', () => { - it('invokes createExclusion without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const exclusion = {}; - const request = { - parent: formattedParent, - exclusion: exclusion, - }; - - // Mock response - const name = 'name3373707'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const disabled = true; - const expectedResponse = { - name: name, - description: description, - filter: filter, - disabled: disabled, - }; - - // Mock Grpc layer - client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createExclusion(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createExclusion with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const exclusion = {}; - const request = { - parent: formattedParent, - exclusion: exclusion, - }; - - // Mock Grpc layer - client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createExclusion(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateExclusion', () => { - it('invokes updateExclusion without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const exclusion = {}; - const updateMask = {}; - const request = { - name: name, - exclusion: exclusion, - updateMask: updateMask, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const disabled = true; - const expectedResponse = { - name: name2, - description: description, - filter: filter, - disabled: disabled, - }; - - // Mock Grpc layer - client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateExclusion(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateExclusion with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const exclusion = {}; - const updateMask = {}; - const request = { - name: name, - exclusion: exclusion, - updateMask: updateMask, - }; - - // Mock Grpc layer - client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateExclusion(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteExclusion', () => { - it('invokes deleteExclusion without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const request = { - name: name, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod(request); - - client.deleteExclusion(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteExclusion with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const request = { - name: name, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteExclusion(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('getCmekSettings', () => { - it('invokes getCmekSettings without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const request = { - name: name, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const kmsKeyName = 'kmsKeyName2094986649'; - const serviceAccountId = 'serviceAccountId-111486921'; - const expectedResponse = { - name: name2, - kmsKeyName: kmsKeyName, - serviceAccountId: serviceAccountId, - }; - - // Mock Grpc layer - client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getCmekSettings(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getCmekSettings with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const request = { - name: name, - }; - - // Mock Grpc layer - client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getCmekSettings(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateCmekSettings', () => { - it('invokes updateCmekSettings without error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const cmekSettings = {}; - const request = { - name: name, - cmekSettings: cmekSettings, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const kmsKeyName = 'kmsKeyName2094986649'; - const serviceAccountId = 'serviceAccountId-111486921'; - const expectedResponse = { - name: name2, - kmsKeyName: kmsKeyName, - serviceAccountId: serviceAccountId, - }; - - // Mock Grpc layer - client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateCmekSettings(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateCmekSettings with error', done => { - const client = new loggingModule.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const name = 'name3373707'; - const cmekSettings = {}; - const request = { - name: name, - cmekSettings: cmekSettings, - }; - - // Mock Grpc layer - client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateCmekSettings(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); -describe('LoggingServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = loggingModule.v2.LoggingServiceV2Client.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = loggingModule.v2.LoggingServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = loggingModule.v2.LoggingServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new loggingModule.v2.LoggingServiceV2Client(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - fallback: true, - }); - assert(client); - }); - - describe('deleteLog', () => { - it('invokes deleteLog without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const logName = 'logName2013526694'; - const request = { - logName: logName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteLog = mockSimpleGrpcMethod(request); - - client.deleteLog(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteLog with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const logName = 'logName2013526694'; - const request = { - logName: logName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteLog(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('writeLogEntries', () => { - it('invokes writeLogEntries without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const entries = []; - const request = { - entries: entries, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.writeLogEntries(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes writeLogEntries with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const entries = []; - const request = { - entries: entries, - }; - - // Mock Grpc layer - client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.writeLogEntries(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listLogEntries', () => { - it('invokes listLogEntries without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedResourceNames = []; - const request = { - resourceNames: formattedResourceNames, - }; - - // Mock response - const nextPageToken = ''; - const entriesElement = {}; - const entries = [entriesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - entries: entries, - }; - - // Mock Grpc layer - client._innerApiCalls.listLogEntries = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.entries); - }; - - client.listLogEntries(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.entries); - done(); - }); - }); - - it('invokes listLogEntries with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedResourceNames = []; - const request = { - resourceNames: formattedResourceNames, - }; - - // Mock Grpc layer - client._innerApiCalls.listLogEntries = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listLogEntries(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listMonitoredResourceDescriptors', () => { - it('invokes listMonitoredResourceDescriptors without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock response - const nextPageToken = ''; - const resourceDescriptorsElement = {}; - const resourceDescriptors = [resourceDescriptorsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - resourceDescriptors: resourceDescriptors, - }; - - // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.resourceDescriptors); - }; - - client.listMonitoredResourceDescriptors(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.resourceDescriptors); - done(); - }); - }); - - it('invokes listMonitoredResourceDescriptors with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listMonitoredResourceDescriptors(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listLogs', () => { - it('invokes listLogs without error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const logNamesElement = 'logNamesElement-1079688374'; - const logNames = [logNamesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - logNames: logNames, - }; - - // Mock Grpc layer - client._innerApiCalls.listLogs = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.logNames); - }; - - client.listLogs(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.logNames); - done(); - }); - }); - - it('invokes listLogs with error', done => { - const client = new loggingModule.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listLogs = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listLogs(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); -describe('MetricsServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = loggingModule.v2.MetricsServiceV2Client.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = loggingModule.v2.MetricsServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = loggingModule.v2.MetricsServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new loggingModule.v2.MetricsServiceV2Client(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - fallback: true, - }); - assert(client); - }); - - describe('listLogMetrics', () => { - it('invokes listLogMetrics without error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const metricsElement = {}; - const metrics = [metricsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - metrics: metrics, - }; - - // Mock Grpc layer - client._innerApiCalls.listLogMetrics = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.metrics); - }; - - client.listLogMetrics(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.metrics); - done(); - }); - }); - - it('invokes listLogMetrics with error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listLogMetrics = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listLogMetrics(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getLogMetric', () => { - it('invokes getLogMetric without error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - const request = { - metricName: formattedMetricName, - }; - - // Mock response - const name = 'name3373707'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const valueExtractor = 'valueExtractor2047672534'; - const expectedResponse = { - name: name, - description: description, - filter: filter, - valueExtractor: valueExtractor, - }; - - // Mock Grpc layer - client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getLogMetric(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getLogMetric with error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - const request = { - metricName: formattedMetricName, - }; - - // Mock Grpc layer - client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getLogMetric(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createLogMetric', () => { - it('invokes createLogMetric without error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const metric = {}; - const request = { - parent: formattedParent, - metric: metric, - }; - - // Mock response - const name = 'name3373707'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const valueExtractor = 'valueExtractor2047672534'; - const expectedResponse = { - name: name, - description: description, - filter: filter, - valueExtractor: valueExtractor, - }; - - // Mock Grpc layer - client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createLogMetric(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createLogMetric with error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const metric = {}; - const request = { - parent: formattedParent, - metric: metric, - }; - - // Mock Grpc layer - client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createLogMetric(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateLogMetric', () => { - it('invokes updateLogMetric without error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - const metric = {}; - const request = { - metricName: formattedMetricName, - metric: metric, - }; - - // Mock response - const name = 'name3373707'; - const description = 'description-1724546052'; - const filter = 'filter-1274492040'; - const valueExtractor = 'valueExtractor2047672534'; - const expectedResponse = { - name: name, - description: description, - filter: filter, - valueExtractor: valueExtractor, - }; - - // Mock Grpc layer - client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateLogMetric(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateLogMetric with error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - const metric = {}; - const request = { - metricName: formattedMetricName, - metric: metric, - }; - - // Mock Grpc layer - client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateLogMetric(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteLogMetric', () => { - it('invokes deleteLogMetric without error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - const request = { - metricName: formattedMetricName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod(request); - - client.deleteLogMetric(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteLogMetric with error', done => { - const client = new loggingModule.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedMetricName = client.logMetricPath('[PROJECT]', '[METRIC]'); - const request = { - metricName: formattedMetricName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteLogMetric(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); -}); - -function mockSimpleGrpcMethod(expectedRequest, response, error) { - return function(actualRequest, options, callback) { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 4160fdfb36d..d76114f5fda 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -36,7 +36,7 @@ import {Dataset} from '@google-cloud/bigquery'; import {Bucket} from '@google-cloud/storage'; const {v2} = require('../src'); -const PKG = require('../../package.json'); +const version = require('../../package.json').version; interface AbortableDuplex extends Duplex { cancel: Function; @@ -131,7 +131,7 @@ describe('Logging', () => { const PROJECT_ID = 'project-id'; before(() => { - Logging = proxyquire('../../', { + Logging = proxyquire('../src', { '@google-cloud/common': { util: fakeUtil, }, @@ -199,7 +199,7 @@ describe('Logging', () => { extend( { libName: 'gccl', - libVersion: PKG.version, + libVersion: version, scopes: EXPECTED_SCOPES, }, options @@ -216,10 +216,12 @@ describe('Logging', () => { const options = { a: 'b', c: 'd', + clientConfig: {}, + port: 443, + servicePath: 'logging.googleapis.com', } as LoggingOptions; const logging = new Logging(options); - assert.notStrictEqual(logging.options, options); assert.deepStrictEqual( @@ -227,7 +229,7 @@ describe('Logging', () => { extend( { libName: 'gccl', - libVersion: PKG.version, + libVersion: version, scopes: EXPECTED_SCOPES, }, options diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 85e1c5f7331..17a968a18a6 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -26,7 +26,7 @@ function makeFakeRequest() { } function makeFakeResponse() { - const ee = new EventEmitter(); + const ee = new EventEmitter.EventEmitter(); // tslint:disable-next-line:no-any (ee as any).getHeader = (name: string) => {}; return ee; diff --git a/handwritten/logging/tsconfig.json b/handwritten/logging/tsconfig.json index 0475722c55f..613d35597b5 100644 --- a/handwritten/logging/tsconfig.json +++ b/handwritten/logging/tsconfig.json @@ -2,7 +2,12 @@ "extends": "./node_modules/gts/tsconfig-google.json", "compilerOptions": { "rootDir": ".", - "outDir": "build" + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2016", + "dom" + ] }, "include": [ "src/*.ts", diff --git a/handwritten/logging/webpack.config.js b/handwritten/logging/webpack.config.js new file mode 100644 index 00000000000..e7dd38dfc2e --- /dev/null +++ b/handwritten/logging/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'logging', + filename: './logging.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; From 544d499f748ac0461e92c218414884366da4ca5f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 01:16:32 +0200 Subject: [PATCH 0582/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.21 (#771) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f4ca4c769c2..8933e6fb372 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -49,7 +49,7 @@ "@google-cloud/paginator": "^2.0.3", "@google-cloud/projectify": "^1.0.4", "@google-cloud/promisify": "^1.0.4", - "@opencensus/propagation-stackdriver": "0.0.20", + "@opencensus/propagation-stackdriver": "0.0.21", "arrify": "^2.0.1", "dot-prop": "^5.2.0", "eventid": "^1.0.0", From 40f8b9b0523482f3d7ee4c3c6d260f10eddb36de Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 01:32:20 +0200 Subject: [PATCH 0583/1029] fix(deps): update dependency @google-cloud/promisify to v2 (#763) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@google-cloud/promisify](https://togithub.com/googleapis/nodejs-promisify) | dependencies | major | [`^1.0.4` -> `^2.0.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fpromisify/1.0.4/2.0.0) | --- ### Release Notes
googleapis/nodejs-promisify ### [`v2.0.0`](https://togithub.com/googleapis/nodejs-promisify/blob/master/CHANGELOG.md#​200-httpswwwgithubcomgoogleapisnodejs-promisifycomparev104v200-2020-03-23) [Compare Source](https://togithub.com/googleapis/nodejs-promisify/compare/v1.0.4...v2.0.0) ##### ⚠ BREAKING CHANGES - update to latest version of gts/typescript ([#​183](https://togithub.com/googleapis/nodejs-promisify/issues/183)) - drop Node 8 from engines field ([#​184](https://togithub.com/googleapis/nodejs-promisify/issues/184)) ##### Features - drop Node 8 from engines field ([#​184](https://www.github.com/googleapis/nodejs-promisify/issues/184)) ([7e6d3c5](https://www.github.com/googleapis/nodejs-promisify/commit/7e6d3c54066d89530ed25c7f9722efd252f43fb8)) ##### Build System - update to latest version of gts/typescript ([#​183](https://www.github.com/googleapis/nodejs-promisify/issues/183)) ([9c3ed12](https://www.github.com/googleapis/nodejs-promisify/commit/9c3ed12c12f4bb1e17af7440c6371c4cefddcd59)) ##### [1.0.4](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.3...v1.0.4) (2019-12-05) ##### Bug Fixes - **deps:** pin TypeScript below 3.7.0 ([e48750e](https://www.github.com/googleapis/nodejs-promisify/commit/e48750ef96aa20eb3a2b73fe2f062d04430468a7)) ##### [1.0.3](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.2...v1.0.3) (2019-11-13) ##### Bug Fixes - **docs:** add jsdoc-region-tag plugin ([#​146](https://www.github.com/googleapis/nodejs-promisify/issues/146)) ([ff0ee74](https://www.github.com/googleapis/nodejs-promisify/commit/ff0ee7408f50e8f7147b8ccf7e10337aa5920076)) ##### [1.0.2](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.1...v1.0.2) (2019-06-26) ##### Bug Fixes - **docs:** link to reference docs section on googleapis.dev ([#​128](https://www.github.com/googleapis/nodejs-promisify/issues/128)) ([5a8bd90](https://www.github.com/googleapis/nodejs-promisify/commit/5a8bd90)) ##### [1.0.1](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.0...v1.0.1) (2019-06-14) ##### Bug Fixes - **docs:** move to new client docs URL ([#​124](https://www.github.com/googleapis/nodejs-promisify/issues/124)) ([34d18cd](https://www.github.com/googleapis/nodejs-promisify/commit/34d18cd))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8933e6fb372..bf29e5152dd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -48,7 +48,7 @@ "@google-cloud/common": "^2.4.0", "@google-cloud/paginator": "^2.0.3", "@google-cloud/projectify": "^1.0.4", - "@google-cloud/promisify": "^1.0.4", + "@google-cloud/promisify": "^2.0.0", "@opencensus/propagation-stackdriver": "0.0.21", "arrify": "^2.0.1", "dot-prop": "^5.2.0", From b02cdfe990f75bf967967df515b9afb168572fcd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 01:52:16 +0200 Subject: [PATCH 0584/1029] fix(deps): update dependency @google-cloud/paginator to v3 (#766) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@google-cloud/paginator](https://togithub.com/googleapis/nodejs-paginator) | dependencies | major | [`^2.0.3` -> `^3.0.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fpaginator/2.0.3/3.0.0) | --- ### Release Notes
googleapis/nodejs-paginator ### [`v3.0.0`](https://togithub.com/googleapis/nodejs-paginator/blob/master/CHANGELOG.md#​300-httpswwwgithubcomgoogleapisnodejs-paginatorcomparev203v300-2020-03-25) [Compare Source](https://togithub.com/googleapis/nodejs-paginator/compare/v2.0.3...v3.0.0) ##### ⚠ BREAKING CHANGES - **dep:** upgrade gts 2.0.0 ([#​194](https://togithub.com/googleapis/nodejs-paginator/issues/194)) - **deps:** deprecated node 8 to 10; upgrade typescript ##### Miscellaneous Chores - **dep:** upgrade gts 2.0.0 ([#​194](https://www.github.com/googleapis/nodejs-paginator/issues/194)) ([4eaf9be](https://www.github.com/googleapis/nodejs-paginator/commit/4eaf9bed1fcfd0f10e877ff15c1d0e968e3356c8)) - **deps:** deprecated node 8 to 10; upgrade typescript ([f6434ab](https://www.github.com/googleapis/nodejs-paginator/commit/f6434ab9cacb6ab804c070f19c38b6072ca326b5)) ##### [2.0.3](https://www.github.com/googleapis/nodejs-paginator/compare/v2.0.2...v2.0.3) (2019-12-05) ##### Bug Fixes - **deps:** pin TypeScript below 3.7.0 ([e06e1b0](https://www.github.com/googleapis/nodejs-paginator/commit/e06e1b0a2e2bb1cf56fc806c1703b8b5e468b954)) ##### [2.0.2](https://www.github.com/googleapis/nodejs-paginator/compare/v2.0.1...v2.0.2) (2019-11-13) ##### Bug Fixes - **docs:** add jsdoc-region-tag plugin ([#​155](https://www.github.com/googleapis/nodejs-paginator/issues/155)) ([b983799](https://www.github.com/googleapis/nodejs-paginator/commit/b98379905848fd179c6268aff3e1cfaf2bf76663)) ##### [2.0.1](https://www.github.com/googleapis/nodejs-paginator/compare/v2.0.0...v2.0.1) (2019-08-25) ##### Bug Fixes - **deps:** use the latest extend ([#​141](https://www.github.com/googleapis/nodejs-paginator/issues/141)) ([61b383e](https://www.github.com/googleapis/nodejs-paginator/commit/61b383e))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bf29e5152dd..8bf36a7fbd2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "@google-cloud/common": "^2.4.0", - "@google-cloud/paginator": "^2.0.3", + "@google-cloud/paginator": "^3.0.0", "@google-cloud/projectify": "^1.0.4", "@google-cloud/promisify": "^2.0.0", "@opencensus/propagation-stackdriver": "0.0.21", From ad0ae5c51952937a4096244a6f364a58223fb38a Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 31 Mar 2020 18:42:33 -0700 Subject: [PATCH 0585/1029] build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#775) --- handwritten/logging/synth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 047b405d463..04a1fe2df86 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -21,6 +21,9 @@ import os logging.basicConfig(level=logging.DEBUG) + +AUTOSYNTH_MULTIPLE_COMMITS = True + s.metadata.set_track_obsolete_files(True) gapic = gcp.GAPICMicrogenerator() From 24ea0402ec3f46d8eb6b4c3dbb7dd38a60ba3350 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 23:36:02 +0200 Subject: [PATCH 0586/1029] chore(deps): update dependency @types/sinon to v9 (#776) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.5.2` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/7.5.2/9.0.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8bf36a7fbd2..ef4de1b535e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -78,7 +78,7 @@ "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", - "@types/sinon": "^7.5.2", + "@types/sinon": "^9.0.0", "@types/through2": "^2.0.34", "@types/tmp": "^0.1.0", "@types/uuid": "^7.0.2", From fcb41d2ed2739d0d325c910672ca295ff2cb7ce7 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 2 Apr 2020 11:48:41 -0700 Subject: [PATCH 0587/1029] feat!: drop node8 support, support for async iterators (#778) * feat!: drop node8 support, support for async iterators BREAKING CHANGE: The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. New feature: methods with pagination now support async iteration. * fix logix * fix linter * work! * all green! * fix system-test * surgery in synth.py Co-authored-by: xiaozhenliugg --- handwritten/logging/.eslintrc.json | 3 + handwritten/logging/.eslintrc.yml | 15 - handwritten/logging/.prettierrc | 8 - handwritten/logging/.prettierrc.js | 17 + handwritten/logging/package.json | 8 +- handwritten/logging/src/common.ts | 13 +- handwritten/logging/src/entry.ts | 4 +- handwritten/logging/src/index.ts | 47 +- handwritten/logging/src/log.ts | 9 +- handwritten/logging/src/sink.ts | 2 +- .../src/v2/config_service_v2_client.ts | 1111 +++-- .../src/v2/logging_service_v2_client.ts | 681 +-- .../src/v2/metrics_service_v2_client.ts | 537 ++- handwritten/logging/synth.metadata | 8 +- handwritten/logging/synth.py | 10 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- handwritten/logging/system-test/logging.ts | 7 +- handwritten/logging/test/common.ts | 12 +- handwritten/logging/test/entry.ts | 16 +- .../test/gapic-config_service_v2-v2.ts | 915 ----- .../test/gapic-logging_service_v2-v2.ts | 392 -- .../test/gapic-metrics_service_v2-v2.ts | 373 -- .../test/gapic_config_service_v2_v2.ts | 3651 +++++++++++++++++ .../test/gapic_logging_service_v2_v2.ts | 2352 +++++++++++ .../test/gapic_metrics_service_v2_v2.ts | 2131 ++++++++++ handwritten/logging/test/index.ts | 92 +- handwritten/logging/test/log.ts | 7 +- handwritten/logging/test/metadata.ts | 9 +- .../express/test-make-middleware.ts | 8 +- .../logging/test/middleware/test-context.ts | 4 +- handwritten/logging/test/sink.ts | 22 +- 32 files changed, 9735 insertions(+), 2733 deletions(-) create mode 100644 handwritten/logging/.eslintrc.json delete mode 100644 handwritten/logging/.eslintrc.yml delete mode 100644 handwritten/logging/.prettierrc create mode 100644 handwritten/logging/.prettierrc.js delete mode 100644 handwritten/logging/test/gapic-config_service_v2-v2.ts delete mode 100644 handwritten/logging/test/gapic-logging_service_v2-v2.ts delete mode 100644 handwritten/logging/test/gapic-metrics_service_v2-v2.ts create mode 100644 handwritten/logging/test/gapic_config_service_v2_v2.ts create mode 100644 handwritten/logging/test/gapic_logging_service_v2_v2.ts create mode 100644 handwritten/logging/test/gapic_metrics_service_v2_v2.ts diff --git a/handwritten/logging/.eslintrc.json b/handwritten/logging/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/handwritten/logging/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/handwritten/logging/.eslintrc.yml b/handwritten/logging/.eslintrc.yml deleted file mode 100644 index 73eeec27612..00000000000 --- a/handwritten/logging/.eslintrc.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -extends: - - 'eslint:recommended' - - 'plugin:node/recommended' - - prettier -plugins: - - node - - prettier -rules: - prettier/prettier: error - block-scoped-var: error - eqeqeq: error - no-warning-comments: warn - no-var: error - prefer-const: error diff --git a/handwritten/logging/.prettierrc b/handwritten/logging/.prettierrc deleted file mode 100644 index df6eac07446..00000000000 --- a/handwritten/logging/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ ---- -bracketSpacing: false -printWidth: 80 -semi: true -singleQuote: true -tabWidth: 2 -trailingComma: es5 -useTabs: false diff --git a/handwritten/logging/.prettierrc.js b/handwritten/logging/.prettierrc.js new file mode 100644 index 00000000000..08cba3775be --- /dev/null +++ b/handwritten/logging/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ef4de1b535e..96052737fa3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "extend": "^3.0.2", "gcp-metadata": "^3.5.0", "google-auth-library": "^5.10.1", - "google-gax": "^1.15.1", + "google-gax": "^2.0.1", "is": "^3.3.0", "on-finished": "^2.3.0", "pumpify": "^2.0.1", @@ -91,7 +91,7 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "execa": "^4.0.0", - "gts": "^1.1.2", + "gts": "2.0.0-alpha.9", "http2spy": "^1.1.0", "jsdoc": "^3.6.3", "jsdoc-fresh": "^1.0.2", @@ -108,12 +108,12 @@ "proxyquire": "^2.1.3", "sinon": "^9.0.1", "ts-loader": "^6.2.1", - "typescript": "^3.7.0", + "typescript": "^3.8.3", "uuid": "^7.0.2", "webpack": "^4.42.0", "webpack-cli": "^3.3.11" }, "engines": { - "node": ">=8.10.0" + "node": ">=10" } } diff --git a/handwritten/logging/src/common.ts b/handwritten/logging/src/common.ts index 78f56ebbc00..5595b40a0ea 100644 --- a/handwritten/logging/src/common.ts +++ b/handwritten/logging/src/common.ts @@ -67,7 +67,7 @@ export class ObjectToStructConverter { * // } * // } */ - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any convert(obj: any) { const convertedObject = { fields: {}, @@ -79,7 +79,7 @@ export class ObjectToStructConverter { if (is.undefined(value)) { continue; } - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (convertedObject as any).fields[prop] = this.encodeValue_(value); } } @@ -101,7 +101,7 @@ export class ObjectToStructConverter { * // stringValue: 'Hello!' * // } */ - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any encodeValue_(value: {} | null): any { let convertedValue; @@ -183,11 +183,12 @@ export class ObjectToStructConverter { * // name: 'Stephen' * // } */ -// tslint:disable-next-line no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function structToObj(struct: any) { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const convertedObject = {} as any; for (const prop in struct.fields) { + // eslint-disable-next-line no-prototype-builtins if (struct.fields.hasOwnProperty(prop)) { const value = struct.fields[prop]; convertedObject[prop] = decodeValue(value); @@ -203,7 +204,7 @@ export function structToObj(struct: any) { * @param {object} value - A Struct's Field message. * @return {*} - The decoded value. */ -// tslint:disable-next-line no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function decodeValue(value: any) { switch (value.kind) { case 'structValue': { diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 764da8bc4d2..ccbaf06d8bb 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -15,7 +15,7 @@ */ import {Merge} from 'type-fest'; -// tslint:disable-next-line variable-name +// eslint-disable-next-line @typescript-eslint/no-var-requires const EventId = require('eventid'); import * as extend from 'extend'; import * as is from 'is'; @@ -33,7 +33,7 @@ export type LogEntry = Merge< severity?: LogSeverity | null; } >; -// tslint:disable-next-line no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type Data = any; export interface EntryJson { diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 6d44e6ef39f..594e3e39ef3 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -21,8 +21,10 @@ import {callbackifyAll} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as extend from 'extend'; import * as gax from 'google-gax'; +// eslint-disable-next-line node/no-extraneous-import import {ClientReadableStream} from '@grpc/grpc-js'; +// eslint-disable-next-line @typescript-eslint/no-var-requires const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; import * as through from 'through2'; @@ -35,6 +37,7 @@ export {HttpRequest}; export {detectServiceContext}; const version = require('../../package.json').version; +// eslint-disable-next-line @typescript-eslint/no-var-requires const v2 = require('./v2'); import {Entry, LogEntry} from './entry'; @@ -74,7 +77,7 @@ export interface AbortableDuplex extends Duplex { export interface CreateSinkRequest { // destination: Bucket|Dataset|Topic|string; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any destination: any; filter?: string; includeChildren?: boolean; @@ -185,24 +188,6 @@ export interface ServiceContext { version?: string; } -/** - * @namespace google - */ -/** - * @namespace google.api - */ -/** - * @namespace google.logging - */ -/** - * @namespace google.logging.type - */ -/** - * @namespace google.logging.v2 - */ -/** - * @namespace google.protobuf - */ /** * @typedef {object} ClientConfig * @property {string} [projectId] The project ID from the Google Developer's @@ -680,7 +665,7 @@ class Logging { gaxStream.cancel(); } }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if (!(global as any).GCLOUD_SANDBOX_ENV) { requestStream.once('reading', () => { try { @@ -700,7 +685,7 @@ class Logging { return; }); } - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (userStream as any).setPipeline(requestStream, toEntryStream); }); }); @@ -880,7 +865,7 @@ class Logging { .pipe(requestStream); return; }); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (userStream as any).setPipeline(requestStream, toLogStream); }); }); @@ -1004,6 +989,7 @@ class Logging { * }); */ getSinksStream(options: GetSinksRequest) { + // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; options = options || {}; let requestStream: Duplex; @@ -1039,7 +1025,7 @@ class Logging { gaxStream.cancel(); } }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if (!(global as any).GCLOUD_SANDBOX_ENV) { requestStream.once('reading', () => { try { @@ -1059,7 +1045,7 @@ class Logging { return; }); } - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (userStream as any).setPipeline(requestStream, toSinkStream); }); }); @@ -1113,11 +1099,12 @@ class Logging { * @param {object} config.reqOpts Request options. * @param {function} [callback] Callback function. */ - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any request( config: RequestConfig, callback?: RequestCallback ) { + // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; const isStreamMode = !callback; let gaxStream: ClientReadableStream; @@ -1157,7 +1144,7 @@ class Logging { }); } function makeRequestCallback() { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((global as any).GCLOUD_SANDBOX_ENV) { return; } @@ -1170,7 +1157,7 @@ class Logging { }); } function makeRequestStream() { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((global as any).GCLOUD_SANDBOX_ENV) { return through.obj(); } @@ -1202,7 +1189,7 @@ class Logging { */ async setAclForBucket_(config: CreateSinkRequest) { const bucket = config.destination as Bucket; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any await (bucket.acl.owners as any).addGroup('cloud-logs@google.com'); config.destination = 'storage.googleapis.com/' + bucket.name; } @@ -1219,7 +1206,7 @@ class Logging { async setAclForDataset_(config: CreateSinkRequest) { const dataset = config.destination as Dataset; const [metadata] = await dataset.getMetadata(); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const access = ([] as any[]).slice.call(arrify(metadata.access)); access.push({ role: 'WRITER', @@ -1257,6 +1244,7 @@ class Logging { config.destination = `${baseUrl}/${topicName}`; } + // eslint-disable-next-line @typescript-eslint/no-unused-vars async setProjectId(reqOpts: {}) { if (this.projectId === '{{projectId}}') { this.projectId = await this.auth.getProjectId(); @@ -1364,3 +1352,4 @@ export {Logging}; module.exports.v2 = v2; import * as protos from '../protos/protos'; export {protos}; +export {v2}; diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index f6271e3539f..541f98486e7 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -24,7 +24,9 @@ import {google} from '../protos/protos'; import {GetEntriesCallback, GetEntriesResponse, Logging} from '.'; import {Entry, EntryJson, LogEntry} from './entry'; import {getDefaultResource} from './metadata'; +import {GoogleAuth} from 'google-auth-library/build/src/auth/googleauth'; +// eslint-disable-next-line @typescript-eslint/no-var-requires const snakeCaseKeys = require('snakecase-keys'); export interface GetEntriesRequest { @@ -45,7 +47,7 @@ export interface LogOptions { maxEntrySize?: number; // see: https://cloud.google.com/logging/quotas } -// tslint:disable-next-line no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type Metadata = any; export type ApiResponse = [Metadata]; export interface ApiResponseCallback { @@ -828,6 +830,7 @@ class Log implements LogSeverityFunctions { opts?: WriteOptions | ApiResponseCallback ): Promise { const options = opts ? (opts as WriteOptions) : {}; + // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; if (options.resource) { if (options.resource.labels) { @@ -837,7 +840,9 @@ class Log implements LogSeverityFunctions { } else if (this.logging.detectedResource) { return writeWithResource(this.logging.detectedResource); } else { - const resource = await getDefaultResource(this.logging.auth); + const resource = await getDefaultResource( + (this.logging.auth as unknown) as GoogleAuth + ); this.logging.detectedResource = resource; return writeWithResource(resource); } diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 14ffaef90f5..18d8596c3f5 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import {callbackifyAll, promisifyAll} from '@google-cloud/promisify'; +import {callbackifyAll} from '@google-cloud/promisify'; import * as extend from 'extend'; import {CallOptions} from 'google-gax'; import { diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 1ee3f6fe4ad..a73e78c77b2 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -18,18 +18,18 @@ import * as gax from 'google-gax'; import { - APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, - PaginationResponse, + GaxCall, } from 'google-gax'; import * as path from 'path'; import {Transform} from 'stream'; -import * as protosTypes from '../../protos/protos'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; import * as gapicConfig from './config_service_v2_client_config.json'; const version = require('../../../package.json').version; @@ -40,14 +40,6 @@ const version = require('../../../package.json').version; * @memberof v2 */ export class ConfigServiceV2Client { - private _descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -55,6 +47,14 @@ export class ConfigServiceV2Client { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; configServiceV2Stub?: Promise<{[name: string]: Function}>; /** @@ -146,13 +146,16 @@ export class ConfigServiceV2Client { 'protos.json' ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. - this._pathTemplates = { + this.pathTemplates = { billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/cmekSettings' ), @@ -227,7 +230,7 @@ export class ConfigServiceV2Client { // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. - this._descriptors.page = { + this.descriptors.page = { listBuckets: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -256,7 +259,7 @@ export class ConfigServiceV2Client { // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. - this._innerApiCalls = {}; + this.innerApiCalls = {}; } /** @@ -283,7 +286,7 @@ export class ConfigServiceV2Client { ? (this._protos as protobuf.Root).lookupService( 'google.logging.v2.ConfigServiceV2' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.ConfigServiceV2, this._opts ) as Promise<{[method: string]: Function}>; @@ -307,9 +310,8 @@ export class ConfigServiceV2Client { 'getCmekSettings', 'updateCmekSettings', ]; - for (const methodName of configServiceV2StubMethods) { - const innerCallPromise = this.configServiceV2Stub.then( + const callPromise = this.configServiceV2Stub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); @@ -323,20 +325,14 @@ export class ConfigServiceV2Client { ); const apiCall = this._gaxModule.createApiCall( - innerCallPromise, + callPromise, this._defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName] + this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); - this._innerApiCalls[methodName] = ( - argument: {}, - callOptions?: CallOptions, - callback?: APICallback - ) => { - return apiCall(argument, callOptions, callback); - }; + this.innerApiCalls[methodName] = apiCall; } return this.configServiceV2Stub; @@ -398,22 +394,30 @@ export class ConfigServiceV2Client { // -- Service calls -- // ------------------- getBucket( - request: protosTypes.google.logging.v2.IGetBucketRequest, + request: protos.google.logging.v2.IGetBucketRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IGetBucketRequest | undefined, + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IGetBucketRequest | undefined, {} | undefined ] >; getBucket( - request: protosTypes.google.logging.v2.IGetBucketRequest, + request: protos.google.logging.v2.IGetBucketRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IGetBucketRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IGetBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + getBucket( + request: protos.google.logging.v2.IGetBucketRequest, + callback: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IGetBucketRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -438,23 +442,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ getBucket( - request: protosTypes.google.logging.v2.IGetBucketRequest, + request: protos.google.logging.v2.IGetBucketRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IGetBucketRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IGetBucketRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IGetBucketRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IGetBucketRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IGetBucketRequest | undefined, + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IGetBucketRequest | undefined, {} | undefined ] > | void { @@ -475,25 +479,33 @@ export class ConfigServiceV2Client { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getBucket(request, options, callback); + return this.innerApiCalls.getBucket(request, options, callback); } updateBucket( - request: protosTypes.google.logging.v2.IUpdateBucketRequest, + request: protos.google.logging.v2.IUpdateBucketRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | undefined, {} | undefined ] >; updateBucket( - request: protosTypes.google.logging.v2.IUpdateBucketRequest, + request: protos.google.logging.v2.IUpdateBucketRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + updateBucket( + request: protos.google.logging.v2.IUpdateBucketRequest, + callback: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -541,23 +553,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateBucket( - request: protosTypes.google.logging.v2.IUpdateBucketRequest, + request: protos.google.logging.v2.IUpdateBucketRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogBucket, - protosTypes.google.logging.v2.IUpdateBucketRequest | undefined, + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | undefined, {} | undefined ] > | void { @@ -578,25 +590,33 @@ export class ConfigServiceV2Client { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.updateBucket(request, options, callback); + return this.innerApiCalls.updateBucket(request, options, callback); } getSink( - request: protosTypes.google.logging.v2.IGetSinkRequest, + request: protos.google.logging.v2.IGetSinkRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IGetSinkRequest | undefined, + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IGetSinkRequest | undefined, {} | undefined ] >; getSink( - request: protosTypes.google.logging.v2.IGetSinkRequest, + request: protos.google.logging.v2.IGetSinkRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IGetSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IGetSinkRequest | null | undefined, + {} | null | undefined + > + ): void; + getSink( + request: protos.google.logging.v2.IGetSinkRequest, + callback: Callback< + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IGetSinkRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -620,23 +640,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ getSink( - request: protosTypes.google.logging.v2.IGetSinkRequest, + request: protos.google.logging.v2.IGetSinkRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IGetSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IGetSinkRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IGetSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IGetSinkRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IGetSinkRequest | undefined, + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IGetSinkRequest | undefined, {} | undefined ] > | void { @@ -657,25 +677,33 @@ export class ConfigServiceV2Client { sink_name: request.sinkName || '', }); this.initialize(); - return this._innerApiCalls.getSink(request, options, callback); + return this.innerApiCalls.getSink(request, options, callback); } createSink( - request: protosTypes.google.logging.v2.ICreateSinkRequest, + request: protos.google.logging.v2.ICreateSinkRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.ICreateSinkRequest | undefined, + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | undefined, {} | undefined ] >; createSink( - request: protosTypes.google.logging.v2.ICreateSinkRequest, + request: protos.google.logging.v2.ICreateSinkRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.ICreateSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | null | undefined, + {} | null | undefined + > + ): void; + createSink( + request: protos.google.logging.v2.ICreateSinkRequest, + callback: Callback< + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -717,23 +745,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ createSink( - request: protosTypes.google.logging.v2.ICreateSinkRequest, + request: protos.google.logging.v2.ICreateSinkRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.ICreateSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.ICreateSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.ICreateSinkRequest | undefined, + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | undefined, {} | undefined ] > | void { @@ -754,25 +782,33 @@ export class ConfigServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createSink(request, options, callback); + return this.innerApiCalls.createSink(request, options, callback); } updateSink( - request: protosTypes.google.logging.v2.IUpdateSinkRequest, + request: protos.google.logging.v2.IUpdateSinkRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | undefined, {} | undefined ] >; updateSink( - request: protosTypes.google.logging.v2.IUpdateSinkRequest, + request: protos.google.logging.v2.IUpdateSinkRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | null | undefined, + {} | null | undefined + > + ): void; + updateSink( + request: protos.google.logging.v2.IUpdateSinkRequest, + callback: Callback< + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -831,23 +867,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateSink( - request: protosTypes.google.logging.v2.IUpdateSinkRequest, + request: protos.google.logging.v2.IUpdateSinkRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogSink, - protosTypes.google.logging.v2.IUpdateSinkRequest | undefined, + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | undefined, {} | undefined ] > | void { @@ -868,25 +904,33 @@ export class ConfigServiceV2Client { sink_name: request.sinkName || '', }); this.initialize(); - return this._innerApiCalls.updateSink(request, options, callback); + return this.innerApiCalls.updateSink(request, options, callback); } deleteSink( - request: protosTypes.google.logging.v2.IDeleteSinkRequest, + request: protos.google.logging.v2.IDeleteSinkRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteSinkRequest | undefined, {} | undefined ] >; deleteSink( - request: protosTypes.google.logging.v2.IDeleteSinkRequest, + request: protos.google.logging.v2.IDeleteSinkRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteSinkRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteSink( + request: protos.google.logging.v2.IDeleteSinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteSinkRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -912,23 +956,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteSink( - request: protosTypes.google.logging.v2.IDeleteSinkRequest, + request: protos.google.logging.v2.IDeleteSinkRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteSinkRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteSinkRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteSinkRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteSinkRequest | undefined, {} | undefined ] > | void { @@ -949,25 +993,33 @@ export class ConfigServiceV2Client { sink_name: request.sinkName || '', }); this.initialize(); - return this._innerApiCalls.deleteSink(request, options, callback); + return this.innerApiCalls.deleteSink(request, options, callback); } getExclusion( - request: protosTypes.google.logging.v2.IGetExclusionRequest, + request: protos.google.logging.v2.IGetExclusionRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IGetExclusionRequest | undefined, + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IGetExclusionRequest | undefined, {} | undefined ] >; getExclusion( - request: protosTypes.google.logging.v2.IGetExclusionRequest, + request: protos.google.logging.v2.IGetExclusionRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IGetExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IGetExclusionRequest | null | undefined, + {} | null | undefined + > + ): void; + getExclusion( + request: protos.google.logging.v2.IGetExclusionRequest, + callback: Callback< + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IGetExclusionRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -991,23 +1043,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ getExclusion( - request: protosTypes.google.logging.v2.IGetExclusionRequest, + request: protos.google.logging.v2.IGetExclusionRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IGetExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IGetExclusionRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IGetExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IGetExclusionRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IGetExclusionRequest | undefined, + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IGetExclusionRequest | undefined, {} | undefined ] > | void { @@ -1028,25 +1080,33 @@ export class ConfigServiceV2Client { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getExclusion(request, options, callback); + return this.innerApiCalls.getExclusion(request, options, callback); } createExclusion( - request: protosTypes.google.logging.v2.ICreateExclusionRequest, + request: protos.google.logging.v2.ICreateExclusionRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.ICreateExclusionRequest | undefined, {} | undefined ] >; createExclusion( - request: protosTypes.google.logging.v2.ICreateExclusionRequest, + request: protos.google.logging.v2.ICreateExclusionRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.ICreateExclusionRequest | null | undefined, + {} | null | undefined + > + ): void; + createExclusion( + request: protos.google.logging.v2.ICreateExclusionRequest, + callback: Callback< + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.ICreateExclusionRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1075,23 +1135,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ createExclusion( - request: protosTypes.google.logging.v2.ICreateExclusionRequest, + request: protos.google.logging.v2.ICreateExclusionRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.ICreateExclusionRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.ICreateExclusionRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.ICreateExclusionRequest | undefined, + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.ICreateExclusionRequest | undefined, {} | undefined ] > | void { @@ -1112,25 +1172,33 @@ export class ConfigServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createExclusion(request, options, callback); + return this.innerApiCalls.createExclusion(request, options, callback); } updateExclusion( - request: protosTypes.google.logging.v2.IUpdateExclusionRequest, + request: protos.google.logging.v2.IUpdateExclusionRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | undefined, {} | undefined ] >; updateExclusion( - request: protosTypes.google.logging.v2.IUpdateExclusionRequest, + request: protos.google.logging.v2.IUpdateExclusionRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, + {} | null | undefined + > + ): void; + updateExclusion( + request: protos.google.logging.v2.IUpdateExclusionRequest, + callback: Callback< + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1165,23 +1233,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateExclusion( - request: protosTypes.google.logging.v2.IUpdateExclusionRequest, + request: protos.google.logging.v2.IUpdateExclusionRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogExclusion, - protosTypes.google.logging.v2.IUpdateExclusionRequest | undefined, + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | undefined, {} | undefined ] > | void { @@ -1202,25 +1270,33 @@ export class ConfigServiceV2Client { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.updateExclusion(request, options, callback); + return this.innerApiCalls.updateExclusion(request, options, callback); } deleteExclusion( - request: protosTypes.google.logging.v2.IDeleteExclusionRequest, + request: protos.google.logging.v2.IDeleteExclusionRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteExclusionRequest | undefined, {} | undefined ] >; deleteExclusion( - request: protosTypes.google.logging.v2.IDeleteExclusionRequest, + request: protos.google.logging.v2.IDeleteExclusionRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteExclusion( + request: protos.google.logging.v2.IDeleteExclusionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1244,23 +1320,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteExclusion( - request: protosTypes.google.logging.v2.IDeleteExclusionRequest, + request: protos.google.logging.v2.IDeleteExclusionRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteExclusionRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteExclusionRequest | undefined, {} | undefined ] > | void { @@ -1281,25 +1357,33 @@ export class ConfigServiceV2Client { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteExclusion(request, options, callback); + return this.innerApiCalls.deleteExclusion(request, options, callback); } getCmekSettings( - request: protosTypes.google.logging.v2.IGetCmekSettingsRequest, + request: protos.google.logging.v2.IGetCmekSettingsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | undefined, {} | undefined ] >; getCmekSettings( - request: protosTypes.google.logging.v2.IGetCmekSettingsRequest, + request: protos.google.logging.v2.IGetCmekSettingsRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, - {} | undefined + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; + getCmekSettings( + request: protos.google.logging.v2.IGetCmekSettingsRequest, + callback: Callback< + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1334,23 +1418,23 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ getCmekSettings( - request: protosTypes.google.logging.v2.IGetCmekSettingsRequest, + request: protos.google.logging.v2.IGetCmekSettingsRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, - {} | undefined + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, - {} | undefined + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IGetCmekSettingsRequest | undefined, + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | undefined, {} | undefined ] > | void { @@ -1371,25 +1455,33 @@ export class ConfigServiceV2Client { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getCmekSettings(request, options, callback); + return this.innerApiCalls.getCmekSettings(request, options, callback); } updateCmekSettings( - request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest, + request: protos.google.logging.v2.IUpdateCmekSettingsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IUpdateCmekSettingsRequest | undefined, {} | undefined ] >; updateCmekSettings( - request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest, + request: protos.google.logging.v2.IUpdateCmekSettingsRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, - {} | undefined + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; + updateCmekSettings( + request: protos.google.logging.v2.IUpdateCmekSettingsRequest, + callback: Callback< + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -1443,23 +1535,25 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateCmekSettings( - request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest, + request: protos.google.logging.v2.IUpdateCmekSettingsRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, - {} | undefined + protos.google.logging.v2.ICmekSettings, + | protos.google.logging.v2.IUpdateCmekSettingsRequest + | null + | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, - {} | undefined + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ICmekSettings, - protosTypes.google.logging.v2.IUpdateCmekSettingsRequest | undefined, + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IUpdateCmekSettingsRequest | undefined, {} | undefined ] > | void { @@ -1480,26 +1574,34 @@ export class ConfigServiceV2Client { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.updateCmekSettings(request, options, callback); + return this.innerApiCalls.updateCmekSettings(request, options, callback); } listBuckets( - request: protosTypes.google.logging.v2.IListBucketsRequest, + request: protos.google.logging.v2.IListBucketsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogBucket[], - protosTypes.google.logging.v2.IListBucketsRequest | null, - protosTypes.google.logging.v2.IListBucketsResponse + protos.google.logging.v2.ILogBucket[], + protos.google.logging.v2.IListBucketsRequest | null, + protos.google.logging.v2.IListBucketsResponse ] >; listBuckets( - request: protosTypes.google.logging.v2.IListBucketsRequest, + request: protos.google.logging.v2.IListBucketsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.logging.v2.ILogBucket[], - protosTypes.google.logging.v2.IListBucketsRequest | null, - protosTypes.google.logging.v2.IListBucketsResponse + callback: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): void; + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket > ): void; /** @@ -1546,24 +1648,24 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ listBuckets( - request: protosTypes.google.logging.v2.IListBucketsRequest, + request: protos.google.logging.v2.IListBucketsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.logging.v2.ILogBucket[], - protosTypes.google.logging.v2.IListBucketsRequest | null, - protosTypes.google.logging.v2.IListBucketsResponse + | PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket >, - callback?: Callback< - protosTypes.google.logging.v2.ILogBucket[], - protosTypes.google.logging.v2.IListBucketsRequest | null, - protosTypes.google.logging.v2.IListBucketsResponse + callback?: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket > ): Promise< [ - protosTypes.google.logging.v2.ILogBucket[], - protosTypes.google.logging.v2.IListBucketsRequest | null, - protosTypes.google.logging.v2.IListBucketsResponse + protos.google.logging.v2.ILogBucket[], + protos.google.logging.v2.IListBucketsRequest | null, + protos.google.logging.v2.IListBucketsResponse ] > | void { request = request || {}; @@ -1583,7 +1685,7 @@ export class ConfigServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listBuckets(request, options, callback); + return this.innerApiCalls.listBuckets(request, options, callback); } /** @@ -1627,7 +1729,7 @@ export class ConfigServiceV2Client { * An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event. */ listBucketsStream( - request?: protosTypes.google.logging.v2.IListBucketsRequest, + request?: protos.google.logging.v2.IListBucketsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1641,29 +1743,92 @@ export class ConfigServiceV2Client { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listBuckets.createStream( - this._innerApiCalls.listBuckets as gax.GaxCall, + return this.descriptors.page.listBuckets.createStream( + this.innerApiCalls.listBuckets as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listBuckets}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listBucketsAsync( + request?: protos.google.logging.v2.IListBucketsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listBuckets.asyncIterate( + this.innerApiCalls['listBuckets'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listSinks( - request: protosTypes.google.logging.v2.IListSinksRequest, + request: protos.google.logging.v2.IListSinksRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogSink[], - protosTypes.google.logging.v2.IListSinksRequest | null, - protosTypes.google.logging.v2.IListSinksResponse + protos.google.logging.v2.ILogSink[], + protos.google.logging.v2.IListSinksRequest | null, + protos.google.logging.v2.IListSinksResponse ] >; listSinks( - request: protosTypes.google.logging.v2.IListSinksRequest, + request: protos.google.logging.v2.IListSinksRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.logging.v2.ILogSink[], - protosTypes.google.logging.v2.IListSinksRequest | null, - protosTypes.google.logging.v2.IListSinksResponse + callback: PaginationCallback< + protos.google.logging.v2.IListSinksRequest, + protos.google.logging.v2.IListSinksResponse | null | undefined, + protos.google.logging.v2.ILogSink + > + ): void; + listSinks( + request: protos.google.logging.v2.IListSinksRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListSinksRequest, + protos.google.logging.v2.IListSinksResponse | null | undefined, + protos.google.logging.v2.ILogSink > ): void; /** @@ -1706,24 +1871,24 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ listSinks( - request: protosTypes.google.logging.v2.IListSinksRequest, + request: protos.google.logging.v2.IListSinksRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.logging.v2.ILogSink[], - protosTypes.google.logging.v2.IListSinksRequest | null, - protosTypes.google.logging.v2.IListSinksResponse + | PaginationCallback< + protos.google.logging.v2.IListSinksRequest, + protos.google.logging.v2.IListSinksResponse | null | undefined, + protos.google.logging.v2.ILogSink >, - callback?: Callback< - protosTypes.google.logging.v2.ILogSink[], - protosTypes.google.logging.v2.IListSinksRequest | null, - protosTypes.google.logging.v2.IListSinksResponse + callback?: PaginationCallback< + protos.google.logging.v2.IListSinksRequest, + protos.google.logging.v2.IListSinksResponse | null | undefined, + protos.google.logging.v2.ILogSink > ): Promise< [ - protosTypes.google.logging.v2.ILogSink[], - protosTypes.google.logging.v2.IListSinksRequest | null, - protosTypes.google.logging.v2.IListSinksResponse + protos.google.logging.v2.ILogSink[], + protos.google.logging.v2.IListSinksRequest | null, + protos.google.logging.v2.IListSinksResponse ] > | void { request = request || {}; @@ -1743,7 +1908,7 @@ export class ConfigServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listSinks(request, options, callback); + return this.innerApiCalls.listSinks(request, options, callback); } /** @@ -1783,7 +1948,7 @@ export class ConfigServiceV2Client { * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. */ listSinksStream( - request?: protosTypes.google.logging.v2.IListSinksRequest, + request?: protos.google.logging.v2.IListSinksRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1797,29 +1962,88 @@ export class ConfigServiceV2Client { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listSinks.createStream( - this._innerApiCalls.listSinks as gax.GaxCall, + return this.descriptors.page.listSinks.createStream( + this.innerApiCalls.listSinks as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listSinks}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listSinksAsync( + request?: protos.google.logging.v2.IListSinksRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listSinks.asyncIterate( + this.innerApiCalls['listSinks'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listExclusions( - request: protosTypes.google.logging.v2.IListExclusionsRequest, + request: protos.google.logging.v2.IListExclusionsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogExclusion[], - protosTypes.google.logging.v2.IListExclusionsRequest | null, - protosTypes.google.logging.v2.IListExclusionsResponse + protos.google.logging.v2.ILogExclusion[], + protos.google.logging.v2.IListExclusionsRequest | null, + protos.google.logging.v2.IListExclusionsResponse ] >; listExclusions( - request: protosTypes.google.logging.v2.IListExclusionsRequest, + request: protos.google.logging.v2.IListExclusionsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.logging.v2.ILogExclusion[], - protosTypes.google.logging.v2.IListExclusionsRequest | null, - protosTypes.google.logging.v2.IListExclusionsResponse + callback: PaginationCallback< + protos.google.logging.v2.IListExclusionsRequest, + protos.google.logging.v2.IListExclusionsResponse | null | undefined, + protos.google.logging.v2.ILogExclusion + > + ): void; + listExclusions( + request: protos.google.logging.v2.IListExclusionsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListExclusionsRequest, + protos.google.logging.v2.IListExclusionsResponse | null | undefined, + protos.google.logging.v2.ILogExclusion > ): void; /** @@ -1862,24 +2086,24 @@ export class ConfigServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ listExclusions( - request: protosTypes.google.logging.v2.IListExclusionsRequest, + request: protos.google.logging.v2.IListExclusionsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.logging.v2.ILogExclusion[], - protosTypes.google.logging.v2.IListExclusionsRequest | null, - protosTypes.google.logging.v2.IListExclusionsResponse + | PaginationCallback< + protos.google.logging.v2.IListExclusionsRequest, + protos.google.logging.v2.IListExclusionsResponse | null | undefined, + protos.google.logging.v2.ILogExclusion >, - callback?: Callback< - protosTypes.google.logging.v2.ILogExclusion[], - protosTypes.google.logging.v2.IListExclusionsRequest | null, - protosTypes.google.logging.v2.IListExclusionsResponse + callback?: PaginationCallback< + protos.google.logging.v2.IListExclusionsRequest, + protos.google.logging.v2.IListExclusionsResponse | null | undefined, + protos.google.logging.v2.ILogExclusion > ): Promise< [ - protosTypes.google.logging.v2.ILogExclusion[], - protosTypes.google.logging.v2.IListExclusionsRequest | null, - protosTypes.google.logging.v2.IListExclusionsResponse + protos.google.logging.v2.ILogExclusion[], + protos.google.logging.v2.IListExclusionsRequest | null, + protos.google.logging.v2.IListExclusionsResponse ] > | void { request = request || {}; @@ -1899,7 +2123,7 @@ export class ConfigServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listExclusions(request, options, callback); + return this.innerApiCalls.listExclusions(request, options, callback); } /** @@ -1939,7 +2163,7 @@ export class ConfigServiceV2Client { * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. */ listExclusionsStream( - request?: protosTypes.google.logging.v2.IListExclusionsRequest, + request?: protos.google.logging.v2.IListExclusionsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1953,12 +2177,63 @@ export class ConfigServiceV2Client { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listExclusions.createStream( - this._innerApiCalls.listExclusions as gax.GaxCall, + return this.descriptors.page.listExclusions.createStream( + this.innerApiCalls.listExclusions as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listExclusions}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose exclusions are to be listed. + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listExclusionsAsync( + request?: protos.google.logging.v2.IListExclusionsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listExclusions.asyncIterate( + this.innerApiCalls['listExclusions'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -1970,7 +2245,7 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ billingAccountCmekSettingsPath(billingAccount: string) { - return this._pathTemplates.billingAccountCmekSettingsPathTemplate.render({ + return this.pathTemplates.billingAccountCmekSettingsPathTemplate.render({ billing_account: billingAccount, }); } @@ -1985,7 +2260,7 @@ export class ConfigServiceV2Client { matchBillingAccountFromBillingAccountCmekSettingsName( billingAccountCmekSettingsName: string ) { - return this._pathTemplates.billingAccountCmekSettingsPathTemplate.match( + return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match( billingAccountCmekSettingsName ).billing_account; } @@ -1998,9 +2273,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ billingAccountExclusionPath(billingAccount: string, exclusion: string) { - return this._pathTemplates.billingAccountExclusionPathTemplate.render({ + return this.pathTemplates.billingAccountExclusionPathTemplate.render({ billing_account: billingAccount, - exclusion, + exclusion: exclusion, }); } @@ -2014,7 +2289,7 @@ export class ConfigServiceV2Client { matchBillingAccountFromBillingAccountExclusionName( billingAccountExclusionName: string ) { - return this._pathTemplates.billingAccountExclusionPathTemplate.match( + return this.pathTemplates.billingAccountExclusionPathTemplate.match( billingAccountExclusionName ).billing_account; } @@ -2029,7 +2304,7 @@ export class ConfigServiceV2Client { matchExclusionFromBillingAccountExclusionName( billingAccountExclusionName: string ) { - return this._pathTemplates.billingAccountExclusionPathTemplate.match( + return this.pathTemplates.billingAccountExclusionPathTemplate.match( billingAccountExclusionName ).exclusion; } @@ -2047,10 +2322,10 @@ export class ConfigServiceV2Client { location: string, bucket: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.render({ + return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({ billing_account: billingAccount, - location, - bucket, + location: location, + bucket: bucket, }); } @@ -2064,7 +2339,7 @@ export class ConfigServiceV2Client { matchBillingAccountFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).billing_account; } @@ -2079,7 +2354,7 @@ export class ConfigServiceV2Client { matchLocationFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).location; } @@ -2094,7 +2369,7 @@ export class ConfigServiceV2Client { matchBucketFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).bucket; } @@ -2107,9 +2382,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ billingAccountLogPath(billingAccount: string, log: string) { - return this._pathTemplates.billingAccountLogPathTemplate.render({ + return this.pathTemplates.billingAccountLogPathTemplate.render({ billing_account: billingAccount, - log, + log: log, }); } @@ -2121,7 +2396,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { - return this._pathTemplates.billingAccountLogPathTemplate.match( + return this.pathTemplates.billingAccountLogPathTemplate.match( billingAccountLogName ).billing_account; } @@ -2134,7 +2409,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromBillingAccountLogName(billingAccountLogName: string) { - return this._pathTemplates.billingAccountLogPathTemplate.match( + return this.pathTemplates.billingAccountLogPathTemplate.match( billingAccountLogName ).log; } @@ -2147,9 +2422,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ billingAccountSinkPath(billingAccount: string, sink: string) { - return this._pathTemplates.billingAccountSinkPathTemplate.render({ + return this.pathTemplates.billingAccountSinkPathTemplate.render({ billing_account: billingAccount, - sink, + sink: sink, }); } @@ -2163,7 +2438,7 @@ export class ConfigServiceV2Client { matchBillingAccountFromBillingAccountSinkName( billingAccountSinkName: string ) { - return this._pathTemplates.billingAccountSinkPathTemplate.match( + return this.pathTemplates.billingAccountSinkPathTemplate.match( billingAccountSinkName ).billing_account; } @@ -2176,7 +2451,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { - return this._pathTemplates.billingAccountSinkPathTemplate.match( + return this.pathTemplates.billingAccountSinkPathTemplate.match( billingAccountSinkName ).sink; } @@ -2188,8 +2463,8 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ folderCmekSettingsPath(folder: string) { - return this._pathTemplates.folderCmekSettingsPathTemplate.render({ - folder, + return this.pathTemplates.folderCmekSettingsPathTemplate.render({ + folder: folder, }); } @@ -2201,7 +2476,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { - return this._pathTemplates.folderCmekSettingsPathTemplate.match( + return this.pathTemplates.folderCmekSettingsPathTemplate.match( folderCmekSettingsName ).folder; } @@ -2214,9 +2489,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ folderExclusionPath(folder: string, exclusion: string) { - return this._pathTemplates.folderExclusionPathTemplate.render({ - folder, - exclusion, + return this.pathTemplates.folderExclusionPathTemplate.render({ + folder: folder, + exclusion: exclusion, }); } @@ -2228,7 +2503,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderExclusionName(folderExclusionName: string) { - return this._pathTemplates.folderExclusionPathTemplate.match( + return this.pathTemplates.folderExclusionPathTemplate.match( folderExclusionName ).folder; } @@ -2241,7 +2516,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromFolderExclusionName(folderExclusionName: string) { - return this._pathTemplates.folderExclusionPathTemplate.match( + return this.pathTemplates.folderExclusionPathTemplate.match( folderExclusionName ).exclusion; } @@ -2255,10 +2530,10 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ folderLocationBucketPath(folder: string, location: string, bucket: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.render({ - folder, - location, - bucket, + return this.pathTemplates.folderLocationBucketPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, }); } @@ -2270,7 +2545,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).folder; } @@ -2283,7 +2558,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).location; } @@ -2296,7 +2571,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).bucket; } @@ -2309,9 +2584,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ folderLogPath(folder: string, log: string) { - return this._pathTemplates.folderLogPathTemplate.render({ - folder, - log, + return this.pathTemplates.folderLogPathTemplate.render({ + folder: folder, + log: log, }); } @@ -2323,8 +2598,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLogName(folderLogName: string) { - return this._pathTemplates.folderLogPathTemplate.match(folderLogName) - .folder; + return this.pathTemplates.folderLogPathTemplate.match(folderLogName).folder; } /** @@ -2335,7 +2609,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromFolderLogName(folderLogName: string) { - return this._pathTemplates.folderLogPathTemplate.match(folderLogName).log; + return this.pathTemplates.folderLogPathTemplate.match(folderLogName).log; } /** @@ -2346,9 +2620,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ folderSinkPath(folder: string, sink: string) { - return this._pathTemplates.folderSinkPathTemplate.render({ - folder, - sink, + return this.pathTemplates.folderSinkPathTemplate.render({ + folder: folder, + sink: sink, }); } @@ -2360,7 +2634,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderSinkName(folderSinkName: string) { - return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName) .folder; } @@ -2372,8 +2646,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromFolderSinkName(folderSinkName: string) { - return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) - .sink; + return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName).sink; } /** @@ -2384,9 +2657,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ locationPath(project: string, location: string) { - return this._pathTemplates.locationPathTemplate.render({ - project, - location, + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, }); } @@ -2398,7 +2671,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromLocationName(locationName: string) { - return this._pathTemplates.locationPathTemplate.match(locationName).project; + return this.pathTemplates.locationPathTemplate.match(locationName).project; } /** @@ -2409,8 +2682,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromLocationName(locationName: string) { - return this._pathTemplates.locationPathTemplate.match(locationName) - .location; + return this.pathTemplates.locationPathTemplate.match(locationName).location; } /** @@ -2421,9 +2693,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ logMetricPath(project: string, metric: string) { - return this._pathTemplates.logMetricPathTemplate.render({ - project, - metric, + return this.pathTemplates.logMetricPathTemplate.render({ + project: project, + metric: metric, }); } @@ -2435,7 +2707,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromLogMetricName(logMetricName: string) { - return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + return this.pathTemplates.logMetricPathTemplate.match(logMetricName) .project; } @@ -2447,8 +2719,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the metric. */ matchMetricFromLogMetricName(logMetricName: string) { - return this._pathTemplates.logMetricPathTemplate.match(logMetricName) - .metric; + return this.pathTemplates.logMetricPathTemplate.match(logMetricName).metric; } /** @@ -2458,8 +2729,8 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ organizationCmekSettingsPath(organization: string) { - return this._pathTemplates.organizationCmekSettingsPathTemplate.render({ - organization, + return this.pathTemplates.organizationCmekSettingsPathTemplate.render({ + organization: organization, }); } @@ -2473,7 +2744,7 @@ export class ConfigServiceV2Client { matchOrganizationFromOrganizationCmekSettingsName( organizationCmekSettingsName: string ) { - return this._pathTemplates.organizationCmekSettingsPathTemplate.match( + return this.pathTemplates.organizationCmekSettingsPathTemplate.match( organizationCmekSettingsName ).organization; } @@ -2486,9 +2757,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ organizationExclusionPath(organization: string, exclusion: string) { - return this._pathTemplates.organizationExclusionPathTemplate.render({ - organization, - exclusion, + return this.pathTemplates.organizationExclusionPathTemplate.render({ + organization: organization, + exclusion: exclusion, }); } @@ -2502,7 +2773,7 @@ export class ConfigServiceV2Client { matchOrganizationFromOrganizationExclusionName( organizationExclusionName: string ) { - return this._pathTemplates.organizationExclusionPathTemplate.match( + return this.pathTemplates.organizationExclusionPathTemplate.match( organizationExclusionName ).organization; } @@ -2517,7 +2788,7 @@ export class ConfigServiceV2Client { matchExclusionFromOrganizationExclusionName( organizationExclusionName: string ) { - return this._pathTemplates.organizationExclusionPathTemplate.match( + return this.pathTemplates.organizationExclusionPathTemplate.match( organizationExclusionName ).exclusion; } @@ -2535,10 +2806,10 @@ export class ConfigServiceV2Client { location: string, bucket: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.render({ - organization, - location, - bucket, + return this.pathTemplates.organizationLocationBucketPathTemplate.render({ + organization: organization, + location: location, + bucket: bucket, }); } @@ -2552,7 +2823,7 @@ export class ConfigServiceV2Client { matchOrganizationFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).organization; } @@ -2567,7 +2838,7 @@ export class ConfigServiceV2Client { matchLocationFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).location; } @@ -2582,7 +2853,7 @@ export class ConfigServiceV2Client { matchBucketFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).bucket; } @@ -2595,9 +2866,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ organizationLogPath(organization: string, log: string) { - return this._pathTemplates.organizationLogPathTemplate.render({ - organization, - log, + return this.pathTemplates.organizationLogPathTemplate.render({ + organization: organization, + log: log, }); } @@ -2609,7 +2880,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLogName(organizationLogName: string) { - return this._pathTemplates.organizationLogPathTemplate.match( + return this.pathTemplates.organizationLogPathTemplate.match( organizationLogName ).organization; } @@ -2622,7 +2893,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromOrganizationLogName(organizationLogName: string) { - return this._pathTemplates.organizationLogPathTemplate.match( + return this.pathTemplates.organizationLogPathTemplate.match( organizationLogName ).log; } @@ -2635,9 +2906,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ organizationSinkPath(organization: string, sink: string) { - return this._pathTemplates.organizationSinkPathTemplate.render({ - organization, - sink, + return this.pathTemplates.organizationSinkPathTemplate.render({ + organization: organization, + sink: sink, }); } @@ -2649,7 +2920,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { - return this._pathTemplates.organizationSinkPathTemplate.match( + return this.pathTemplates.organizationSinkPathTemplate.match( organizationSinkName ).organization; } @@ -2662,7 +2933,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromOrganizationSinkName(organizationSinkName: string) { - return this._pathTemplates.organizationSinkPathTemplate.match( + return this.pathTemplates.organizationSinkPathTemplate.match( organizationSinkName ).sink; } @@ -2674,8 +2945,8 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -2687,7 +2958,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -2697,8 +2968,8 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ projectCmekSettingsPath(project: string) { - return this._pathTemplates.projectCmekSettingsPathTemplate.render({ - project, + return this.pathTemplates.projectCmekSettingsPathTemplate.render({ + project: project, }); } @@ -2710,7 +2981,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { - return this._pathTemplates.projectCmekSettingsPathTemplate.match( + return this.pathTemplates.projectCmekSettingsPathTemplate.match( projectCmekSettingsName ).project; } @@ -2723,9 +2994,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ projectExclusionPath(project: string, exclusion: string) { - return this._pathTemplates.projectExclusionPathTemplate.render({ - project, - exclusion, + return this.pathTemplates.projectExclusionPathTemplate.render({ + project: project, + exclusion: exclusion, }); } @@ -2737,7 +3008,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectExclusionName(projectExclusionName: string) { - return this._pathTemplates.projectExclusionPathTemplate.match( + return this.pathTemplates.projectExclusionPathTemplate.match( projectExclusionName ).project; } @@ -2750,7 +3021,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromProjectExclusionName(projectExclusionName: string) { - return this._pathTemplates.projectExclusionPathTemplate.match( + return this.pathTemplates.projectExclusionPathTemplate.match( projectExclusionName ).exclusion; } @@ -2764,10 +3035,10 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ projectLocationBucketPath(project: string, location: string, bucket: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.render({ - project, - location, - bucket, + return this.pathTemplates.projectLocationBucketPathTemplate.render({ + project: project, + location: location, + bucket: bucket, }); } @@ -2779,7 +3050,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).project; } @@ -2794,7 +3065,7 @@ export class ConfigServiceV2Client { matchLocationFromProjectLocationBucketName( projectLocationBucketName: string ) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).location; } @@ -2807,7 +3078,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).bucket; } @@ -2820,9 +3091,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ projectLogPath(project: string, log: string) { - return this._pathTemplates.projectLogPathTemplate.render({ - project, - log, + return this.pathTemplates.projectLogPathTemplate.render({ + project: project, + log: log, }); } @@ -2834,7 +3105,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLogName(projectLogName: string) { - return this._pathTemplates.projectLogPathTemplate.match(projectLogName) + return this.pathTemplates.projectLogPathTemplate.match(projectLogName) .project; } @@ -2846,7 +3117,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromProjectLogName(projectLogName: string) { - return this._pathTemplates.projectLogPathTemplate.match(projectLogName).log; + return this.pathTemplates.projectLogPathTemplate.match(projectLogName).log; } /** @@ -2857,9 +3128,9 @@ export class ConfigServiceV2Client { * @returns {string} Resource name string. */ projectSinkPath(project: string, sink: string) { - return this._pathTemplates.projectSinkPathTemplate.render({ - project, - sink, + return this.pathTemplates.projectSinkPathTemplate.render({ + project: project, + sink: sink, }); } @@ -2871,7 +3142,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectSinkName(projectSinkName: string) { - return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName) .project; } @@ -2883,7 +3154,7 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromProjectSinkName(projectSinkName: string) { - return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName) .sink; } diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index c1ce2ab958e..77d9d1ef1d2 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -18,18 +18,18 @@ import * as gax from 'google-gax'; import { - APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, - PaginationResponse, + GaxCall, } from 'google-gax'; import * as path from 'path'; import {Transform} from 'stream'; -import * as protosTypes from '../../protos/protos'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; import * as gapicConfig from './logging_service_v2_client_config.json'; const version = require('../../../package.json').version; @@ -40,14 +40,6 @@ const version = require('../../../package.json').version; * @memberof v2 */ export class LoggingServiceV2Client { - private _descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -55,6 +47,14 @@ export class LoggingServiceV2Client { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; loggingServiceV2Stub?: Promise<{[name: string]: Function}>; /** @@ -146,13 +146,16 @@ export class LoggingServiceV2Client { 'protos.json' ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. - this._pathTemplates = { + this.pathTemplates = { billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/cmekSettings' ), @@ -224,7 +227,7 @@ export class LoggingServiceV2Client { // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. - this._descriptors.page = { + this.descriptors.page = { listLogEntries: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -247,6 +250,7 @@ export class LoggingServiceV2Client { // rather than holding a request open. const protoFilesRoot = opts.fallback ? this._gaxModule.protobuf.Root.fromJSON( + // eslint-disable-next-line @typescript-eslint/no-var-requires require('../../protos/protos.json') ) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -254,13 +258,13 @@ export class LoggingServiceV2Client { // Some methods on this API support automatically batching // requests; denote this. - this._descriptors.batching = { + this.descriptors.batching = { WriteLogEntries: new this._gaxModule.BundleDescriptor( 'entries', ['log_name', 'resource', 'labels'], null, gax.createByteLengthFunction( - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protoFilesRoot.lookupType('google.logging.v2.LogEntry') as any ) ), @@ -277,7 +281,7 @@ export class LoggingServiceV2Client { // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. - this._innerApiCalls = {}; + this.innerApiCalls = {}; } /** @@ -304,7 +308,7 @@ export class LoggingServiceV2Client { ? (this._protos as protobuf.Root).lookupService( 'google.logging.v2.LoggingServiceV2' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.LoggingServiceV2, this._opts ) as Promise<{[method: string]: Function}>; @@ -318,9 +322,8 @@ export class LoggingServiceV2Client { 'listMonitoredResourceDescriptors', 'listLogs', ]; - for (const methodName of loggingServiceV2StubMethods) { - const innerCallPromise = this.loggingServiceV2Stub.then( + const callPromise = this.loggingServiceV2Stub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); @@ -334,20 +337,14 @@ export class LoggingServiceV2Client { ); const apiCall = this._gaxModule.createApiCall( - innerCallPromise, + callPromise, this._defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName] + this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); - this._innerApiCalls[methodName] = ( - argument: {}, - callOptions?: CallOptions, - callback?: APICallback - ) => { - return apiCall(argument, callOptions, callback); - }; + this.innerApiCalls[methodName] = apiCall; } return this.loggingServiceV2Stub; @@ -410,22 +407,30 @@ export class LoggingServiceV2Client { // -- Service calls -- // ------------------- deleteLog( - request: protosTypes.google.logging.v2.IDeleteLogRequest, + request: protos.google.logging.v2.IDeleteLogRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | undefined, {} | undefined ] >; deleteLog( - request: protosTypes.google.logging.v2.IDeleteLogRequest, + request: protos.google.logging.v2.IDeleteLogRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteLog( + request: protos.google.logging.v2.IDeleteLogRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -456,23 +461,23 @@ export class LoggingServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteLog( - request: protosTypes.google.logging.v2.IDeleteLogRequest, + request: protos.google.logging.v2.IDeleteLogRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | undefined, {} | undefined ] > | void { @@ -493,25 +498,33 @@ export class LoggingServiceV2Client { log_name: request.logName || '', }); this.initialize(); - return this._innerApiCalls.deleteLog(request, options, callback); + return this.innerApiCalls.deleteLog(request, options, callback); } writeLogEntries( - request: protosTypes.google.logging.v2.IWriteLogEntriesRequest, + request: protos.google.logging.v2.IWriteLogEntriesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.IWriteLogEntriesResponse, - protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | undefined, {} | undefined ] >; writeLogEntries( - request: protosTypes.google.logging.v2.IWriteLogEntriesRequest, + request: protos.google.logging.v2.IWriteLogEntriesRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.IWriteLogEntriesResponse, - protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, - {} | undefined + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, + {} | null | undefined + > + ): void; + writeLogEntries( + request: protos.google.logging.v2.IWriteLogEntriesRequest, + callback: Callback< + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -598,23 +611,23 @@ export class LoggingServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ writeLogEntries( - request: protosTypes.google.logging.v2.IWriteLogEntriesRequest, + request: protos.google.logging.v2.IWriteLogEntriesRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.IWriteLogEntriesResponse, - protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, - {} | undefined + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.IWriteLogEntriesResponse, - protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, - {} | undefined + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.IWriteLogEntriesResponse, - protosTypes.google.logging.v2.IWriteLogEntriesRequest | undefined, + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | undefined, {} | undefined ] > | void { @@ -628,26 +641,34 @@ export class LoggingServiceV2Client { } options = options || {}; this.initialize(); - return this._innerApiCalls.writeLogEntries(request, options, callback); + return this.innerApiCalls.writeLogEntries(request, options, callback); } listLogEntries( - request: protosTypes.google.logging.v2.IListLogEntriesRequest, + request: protos.google.logging.v2.IListLogEntriesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogEntry[], - protosTypes.google.logging.v2.IListLogEntriesRequest | null, - protosTypes.google.logging.v2.IListLogEntriesResponse + protos.google.logging.v2.ILogEntry[], + protos.google.logging.v2.IListLogEntriesRequest | null, + protos.google.logging.v2.IListLogEntriesResponse ] >; listLogEntries( - request: protosTypes.google.logging.v2.IListLogEntriesRequest, + request: protos.google.logging.v2.IListLogEntriesRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.logging.v2.ILogEntry[], - protosTypes.google.logging.v2.IListLogEntriesRequest | null, - protosTypes.google.logging.v2.IListLogEntriesResponse + callback: PaginationCallback< + protos.google.logging.v2.IListLogEntriesRequest, + protos.google.logging.v2.IListLogEntriesResponse | null | undefined, + protos.google.logging.v2.ILogEntry + > + ): void; + listLogEntries( + request: protos.google.logging.v2.IListLogEntriesRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListLogEntriesRequest, + protos.google.logging.v2.IListLogEntriesResponse | null | undefined, + protos.google.logging.v2.ILogEntry > ): void; /** @@ -711,24 +732,24 @@ export class LoggingServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ listLogEntries( - request: protosTypes.google.logging.v2.IListLogEntriesRequest, + request: protos.google.logging.v2.IListLogEntriesRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.logging.v2.ILogEntry[], - protosTypes.google.logging.v2.IListLogEntriesRequest | null, - protosTypes.google.logging.v2.IListLogEntriesResponse + | PaginationCallback< + protos.google.logging.v2.IListLogEntriesRequest, + protos.google.logging.v2.IListLogEntriesResponse | null | undefined, + protos.google.logging.v2.ILogEntry >, - callback?: Callback< - protosTypes.google.logging.v2.ILogEntry[], - protosTypes.google.logging.v2.IListLogEntriesRequest | null, - protosTypes.google.logging.v2.IListLogEntriesResponse + callback?: PaginationCallback< + protos.google.logging.v2.IListLogEntriesRequest, + protos.google.logging.v2.IListLogEntriesResponse | null | undefined, + protos.google.logging.v2.ILogEntry > ): Promise< [ - protosTypes.google.logging.v2.ILogEntry[], - protosTypes.google.logging.v2.IListLogEntriesRequest | null, - protosTypes.google.logging.v2.IListLogEntriesResponse + protos.google.logging.v2.ILogEntry[], + protos.google.logging.v2.IListLogEntriesRequest | null, + protos.google.logging.v2.IListLogEntriesResponse ] > | void { request = request || {}; @@ -741,7 +762,7 @@ export class LoggingServiceV2Client { } options = options || {}; this.initialize(); - return this._innerApiCalls.listLogEntries(request, options, callback); + return this.innerApiCalls.listLogEntries(request, options, callback); } /** @@ -800,36 +821,111 @@ export class LoggingServiceV2Client { * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. */ listLogEntriesStream( - request?: protosTypes.google.logging.v2.IListLogEntriesRequest, + request?: protos.google.logging.v2.IListLogEntriesRequest, options?: gax.CallOptions ): Transform { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listLogEntries.createStream( - this._innerApiCalls.listLogEntries as gax.GaxCall, + return this.descriptors.page.listLogEntries.createStream( + this.innerApiCalls.listLogEntries as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listLogEntries}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string[]} request.resourceNames + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * + * Projects listed in the `project_ids` field are added to this list. + * @param {string} [request.filter] + * Optional. A filter that chooses which log entries to return. See [Advanced + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. + * @param {string} [request.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 their `insert_id` values. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * @param {string} [request.pageToken] + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listLogEntriesAsync( + request?: protos.google.logging.v2.IListLogEntriesRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listLogEntries.asyncIterate( + this.innerApiCalls['listLogEntries'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listMonitoredResourceDescriptors( - request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + protos.google.api.IMonitoredResourceDescriptor[], + protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, + protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse ] >; listMonitoredResourceDescriptors( - request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + callback: PaginationCallback< + protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + | protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse + | null + | undefined, + protos.google.api.IMonitoredResourceDescriptor + > + ): void; + listMonitoredResourceDescriptors( + request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + | protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse + | null + | undefined, + protos.google.api.IMonitoredResourceDescriptor > ): void; /** @@ -865,24 +961,28 @@ export class LoggingServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ listMonitoredResourceDescriptors( - request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + | PaginationCallback< + protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + | protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse + | null + | undefined, + protos.google.api.IMonitoredResourceDescriptor >, - callback?: Callback< - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + callback?: PaginationCallback< + protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + | protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse + | null + | undefined, + protos.google.api.IMonitoredResourceDescriptor > ): Promise< [ - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsResponse + protos.google.api.IMonitoredResourceDescriptor[], + protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, + protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse ] > | void { request = request || {}; @@ -895,7 +995,7 @@ export class LoggingServiceV2Client { } options = options || {}; this.initialize(); - return this._innerApiCalls.listMonitoredResourceDescriptors( + return this.innerApiCalls.listMonitoredResourceDescriptors( request, options, callback @@ -932,36 +1032,81 @@ export class LoggingServiceV2Client { * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. */ listMonitoredResourceDescriptorsStream( - request?: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, options?: gax.CallOptions ): Transform { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listMonitoredResourceDescriptors.createStream( - this._innerApiCalls.listMonitoredResourceDescriptors as gax.GaxCall, + return this.descriptors.page.listMonitoredResourceDescriptors.createStream( + this.innerApiCalls.listMonitoredResourceDescriptors as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listMonitoredResourceDescriptors}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} [request.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} [request.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] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listMonitoredResourceDescriptorsAsync( + request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listMonitoredResourceDescriptors.asyncIterate( + this.innerApiCalls['listMonitoredResourceDescriptors'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listLogs( - request: protosTypes.google.logging.v2.IListLogsRequest, + request: protos.google.logging.v2.IListLogsRequest, options?: gax.CallOptions ): Promise< [ string[], - protosTypes.google.logging.v2.IListLogsRequest | null, - protosTypes.google.logging.v2.IListLogsResponse + protos.google.logging.v2.IListLogsRequest | null, + protos.google.logging.v2.IListLogsResponse ] >; listLogs( - request: protosTypes.google.logging.v2.IListLogsRequest, + request: protos.google.logging.v2.IListLogsRequest, options: gax.CallOptions, - callback: Callback< - string[], - protosTypes.google.logging.v2.IListLogsRequest | null, - protosTypes.google.logging.v2.IListLogsResponse + callback: PaginationCallback< + protos.google.logging.v2.IListLogsRequest, + protos.google.logging.v2.IListLogsResponse | null | undefined, + string + > + ): void; + listLogs( + request: protos.google.logging.v2.IListLogsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListLogsRequest, + protos.google.logging.v2.IListLogsResponse | null | undefined, + string > ): void; /** @@ -1005,24 +1150,24 @@ export class LoggingServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ listLogs( - request: protosTypes.google.logging.v2.IListLogsRequest, + request: protos.google.logging.v2.IListLogsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - string[], - protosTypes.google.logging.v2.IListLogsRequest | null, - protosTypes.google.logging.v2.IListLogsResponse + | PaginationCallback< + protos.google.logging.v2.IListLogsRequest, + protos.google.logging.v2.IListLogsResponse | null | undefined, + string >, - callback?: Callback< - string[], - protosTypes.google.logging.v2.IListLogsRequest | null, - protosTypes.google.logging.v2.IListLogsResponse + callback?: PaginationCallback< + protos.google.logging.v2.IListLogsRequest, + protos.google.logging.v2.IListLogsResponse | null | undefined, + string > ): Promise< [ string[], - protosTypes.google.logging.v2.IListLogsRequest | null, - protosTypes.google.logging.v2.IListLogsResponse + protos.google.logging.v2.IListLogsRequest | null, + protos.google.logging.v2.IListLogsResponse ] > | void { request = request || {}; @@ -1042,7 +1187,7 @@ export class LoggingServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listLogs(request, options, callback); + return this.innerApiCalls.listLogs(request, options, callback); } /** @@ -1082,7 +1227,7 @@ export class LoggingServiceV2Client { * An object stream which emits an object representing string on 'data' event. */ listLogsStream( - request?: protosTypes.google.logging.v2.IListLogsRequest, + request?: protos.google.logging.v2.IListLogsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1096,12 +1241,63 @@ export class LoggingServiceV2Client { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listLogs.createStream( - this._innerApiCalls.listLogs as gax.GaxCall, + return this.descriptors.page.listLogs.createStream( + this.innerApiCalls.listLogs as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listLogs}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name that owns the logs: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {number} [request.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} [request.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] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listLogsAsync( + request?: protos.google.logging.v2.IListLogsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listLogs.asyncIterate( + this.innerApiCalls['listLogs'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -1113,7 +1309,7 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ billingAccountCmekSettingsPath(billingAccount: string) { - return this._pathTemplates.billingAccountCmekSettingsPathTemplate.render({ + return this.pathTemplates.billingAccountCmekSettingsPathTemplate.render({ billing_account: billingAccount, }); } @@ -1128,7 +1324,7 @@ export class LoggingServiceV2Client { matchBillingAccountFromBillingAccountCmekSettingsName( billingAccountCmekSettingsName: string ) { - return this._pathTemplates.billingAccountCmekSettingsPathTemplate.match( + return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match( billingAccountCmekSettingsName ).billing_account; } @@ -1141,9 +1337,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ billingAccountExclusionPath(billingAccount: string, exclusion: string) { - return this._pathTemplates.billingAccountExclusionPathTemplate.render({ + return this.pathTemplates.billingAccountExclusionPathTemplate.render({ billing_account: billingAccount, - exclusion, + exclusion: exclusion, }); } @@ -1157,7 +1353,7 @@ export class LoggingServiceV2Client { matchBillingAccountFromBillingAccountExclusionName( billingAccountExclusionName: string ) { - return this._pathTemplates.billingAccountExclusionPathTemplate.match( + return this.pathTemplates.billingAccountExclusionPathTemplate.match( billingAccountExclusionName ).billing_account; } @@ -1172,7 +1368,7 @@ export class LoggingServiceV2Client { matchExclusionFromBillingAccountExclusionName( billingAccountExclusionName: string ) { - return this._pathTemplates.billingAccountExclusionPathTemplate.match( + return this.pathTemplates.billingAccountExclusionPathTemplate.match( billingAccountExclusionName ).exclusion; } @@ -1190,10 +1386,10 @@ export class LoggingServiceV2Client { location: string, bucket: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.render({ + return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({ billing_account: billingAccount, - location, - bucket, + location: location, + bucket: bucket, }); } @@ -1207,7 +1403,7 @@ export class LoggingServiceV2Client { matchBillingAccountFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).billing_account; } @@ -1222,7 +1418,7 @@ export class LoggingServiceV2Client { matchLocationFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).location; } @@ -1237,7 +1433,7 @@ export class LoggingServiceV2Client { matchBucketFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).bucket; } @@ -1250,9 +1446,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ billingAccountLogPath(billingAccount: string, log: string) { - return this._pathTemplates.billingAccountLogPathTemplate.render({ + return this.pathTemplates.billingAccountLogPathTemplate.render({ billing_account: billingAccount, - log, + log: log, }); } @@ -1264,7 +1460,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { - return this._pathTemplates.billingAccountLogPathTemplate.match( + return this.pathTemplates.billingAccountLogPathTemplate.match( billingAccountLogName ).billing_account; } @@ -1277,7 +1473,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromBillingAccountLogName(billingAccountLogName: string) { - return this._pathTemplates.billingAccountLogPathTemplate.match( + return this.pathTemplates.billingAccountLogPathTemplate.match( billingAccountLogName ).log; } @@ -1290,9 +1486,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ billingAccountSinkPath(billingAccount: string, sink: string) { - return this._pathTemplates.billingAccountSinkPathTemplate.render({ + return this.pathTemplates.billingAccountSinkPathTemplate.render({ billing_account: billingAccount, - sink, + sink: sink, }); } @@ -1306,7 +1502,7 @@ export class LoggingServiceV2Client { matchBillingAccountFromBillingAccountSinkName( billingAccountSinkName: string ) { - return this._pathTemplates.billingAccountSinkPathTemplate.match( + return this.pathTemplates.billingAccountSinkPathTemplate.match( billingAccountSinkName ).billing_account; } @@ -1319,7 +1515,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { - return this._pathTemplates.billingAccountSinkPathTemplate.match( + return this.pathTemplates.billingAccountSinkPathTemplate.match( billingAccountSinkName ).sink; } @@ -1331,8 +1527,8 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ folderCmekSettingsPath(folder: string) { - return this._pathTemplates.folderCmekSettingsPathTemplate.render({ - folder, + return this.pathTemplates.folderCmekSettingsPathTemplate.render({ + folder: folder, }); } @@ -1344,7 +1540,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { - return this._pathTemplates.folderCmekSettingsPathTemplate.match( + return this.pathTemplates.folderCmekSettingsPathTemplate.match( folderCmekSettingsName ).folder; } @@ -1357,9 +1553,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ folderExclusionPath(folder: string, exclusion: string) { - return this._pathTemplates.folderExclusionPathTemplate.render({ - folder, - exclusion, + return this.pathTemplates.folderExclusionPathTemplate.render({ + folder: folder, + exclusion: exclusion, }); } @@ -1371,7 +1567,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderExclusionName(folderExclusionName: string) { - return this._pathTemplates.folderExclusionPathTemplate.match( + return this.pathTemplates.folderExclusionPathTemplate.match( folderExclusionName ).folder; } @@ -1384,7 +1580,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromFolderExclusionName(folderExclusionName: string) { - return this._pathTemplates.folderExclusionPathTemplate.match( + return this.pathTemplates.folderExclusionPathTemplate.match( folderExclusionName ).exclusion; } @@ -1398,10 +1594,10 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ folderLocationBucketPath(folder: string, location: string, bucket: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.render({ - folder, - location, - bucket, + return this.pathTemplates.folderLocationBucketPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, }); } @@ -1413,7 +1609,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).folder; } @@ -1426,7 +1622,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).location; } @@ -1439,7 +1635,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).bucket; } @@ -1452,9 +1648,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ folderLogPath(folder: string, log: string) { - return this._pathTemplates.folderLogPathTemplate.render({ - folder, - log, + return this.pathTemplates.folderLogPathTemplate.render({ + folder: folder, + log: log, }); } @@ -1466,8 +1662,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLogName(folderLogName: string) { - return this._pathTemplates.folderLogPathTemplate.match(folderLogName) - .folder; + return this.pathTemplates.folderLogPathTemplate.match(folderLogName).folder; } /** @@ -1478,7 +1673,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromFolderLogName(folderLogName: string) { - return this._pathTemplates.folderLogPathTemplate.match(folderLogName).log; + return this.pathTemplates.folderLogPathTemplate.match(folderLogName).log; } /** @@ -1489,9 +1684,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ folderSinkPath(folder: string, sink: string) { - return this._pathTemplates.folderSinkPathTemplate.render({ - folder, - sink, + return this.pathTemplates.folderSinkPathTemplate.render({ + folder: folder, + sink: sink, }); } @@ -1503,7 +1698,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderSinkName(folderSinkName: string) { - return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName) .folder; } @@ -1515,8 +1710,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromFolderSinkName(folderSinkName: string) { - return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) - .sink; + return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName).sink; } /** @@ -1527,9 +1721,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ logMetricPath(project: string, metric: string) { - return this._pathTemplates.logMetricPathTemplate.render({ - project, - metric, + return this.pathTemplates.logMetricPathTemplate.render({ + project: project, + metric: metric, }); } @@ -1541,7 +1735,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromLogMetricName(logMetricName: string) { - return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + return this.pathTemplates.logMetricPathTemplate.match(logMetricName) .project; } @@ -1553,8 +1747,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the metric. */ matchMetricFromLogMetricName(logMetricName: string) { - return this._pathTemplates.logMetricPathTemplate.match(logMetricName) - .metric; + return this.pathTemplates.logMetricPathTemplate.match(logMetricName).metric; } /** @@ -1564,8 +1757,8 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ organizationCmekSettingsPath(organization: string) { - return this._pathTemplates.organizationCmekSettingsPathTemplate.render({ - organization, + return this.pathTemplates.organizationCmekSettingsPathTemplate.render({ + organization: organization, }); } @@ -1579,7 +1772,7 @@ export class LoggingServiceV2Client { matchOrganizationFromOrganizationCmekSettingsName( organizationCmekSettingsName: string ) { - return this._pathTemplates.organizationCmekSettingsPathTemplate.match( + return this.pathTemplates.organizationCmekSettingsPathTemplate.match( organizationCmekSettingsName ).organization; } @@ -1592,9 +1785,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ organizationExclusionPath(organization: string, exclusion: string) { - return this._pathTemplates.organizationExclusionPathTemplate.render({ - organization, - exclusion, + return this.pathTemplates.organizationExclusionPathTemplate.render({ + organization: organization, + exclusion: exclusion, }); } @@ -1608,7 +1801,7 @@ export class LoggingServiceV2Client { matchOrganizationFromOrganizationExclusionName( organizationExclusionName: string ) { - return this._pathTemplates.organizationExclusionPathTemplate.match( + return this.pathTemplates.organizationExclusionPathTemplate.match( organizationExclusionName ).organization; } @@ -1623,7 +1816,7 @@ export class LoggingServiceV2Client { matchExclusionFromOrganizationExclusionName( organizationExclusionName: string ) { - return this._pathTemplates.organizationExclusionPathTemplate.match( + return this.pathTemplates.organizationExclusionPathTemplate.match( organizationExclusionName ).exclusion; } @@ -1641,10 +1834,10 @@ export class LoggingServiceV2Client { location: string, bucket: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.render({ - organization, - location, - bucket, + return this.pathTemplates.organizationLocationBucketPathTemplate.render({ + organization: organization, + location: location, + bucket: bucket, }); } @@ -1658,7 +1851,7 @@ export class LoggingServiceV2Client { matchOrganizationFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).organization; } @@ -1673,7 +1866,7 @@ export class LoggingServiceV2Client { matchLocationFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).location; } @@ -1688,7 +1881,7 @@ export class LoggingServiceV2Client { matchBucketFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).bucket; } @@ -1701,9 +1894,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ organizationLogPath(organization: string, log: string) { - return this._pathTemplates.organizationLogPathTemplate.render({ - organization, - log, + return this.pathTemplates.organizationLogPathTemplate.render({ + organization: organization, + log: log, }); } @@ -1715,7 +1908,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLogName(organizationLogName: string) { - return this._pathTemplates.organizationLogPathTemplate.match( + return this.pathTemplates.organizationLogPathTemplate.match( organizationLogName ).organization; } @@ -1728,7 +1921,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromOrganizationLogName(organizationLogName: string) { - return this._pathTemplates.organizationLogPathTemplate.match( + return this.pathTemplates.organizationLogPathTemplate.match( organizationLogName ).log; } @@ -1741,9 +1934,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ organizationSinkPath(organization: string, sink: string) { - return this._pathTemplates.organizationSinkPathTemplate.render({ - organization, - sink, + return this.pathTemplates.organizationSinkPathTemplate.render({ + organization: organization, + sink: sink, }); } @@ -1755,7 +1948,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { - return this._pathTemplates.organizationSinkPathTemplate.match( + return this.pathTemplates.organizationSinkPathTemplate.match( organizationSinkName ).organization; } @@ -1768,7 +1961,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromOrganizationSinkName(organizationSinkName: string) { - return this._pathTemplates.organizationSinkPathTemplate.match( + return this.pathTemplates.organizationSinkPathTemplate.match( organizationSinkName ).sink; } @@ -1780,8 +1973,8 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -1793,7 +1986,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -1803,8 +1996,8 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ projectCmekSettingsPath(project: string) { - return this._pathTemplates.projectCmekSettingsPathTemplate.render({ - project, + return this.pathTemplates.projectCmekSettingsPathTemplate.render({ + project: project, }); } @@ -1816,7 +2009,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { - return this._pathTemplates.projectCmekSettingsPathTemplate.match( + return this.pathTemplates.projectCmekSettingsPathTemplate.match( projectCmekSettingsName ).project; } @@ -1829,9 +2022,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ projectExclusionPath(project: string, exclusion: string) { - return this._pathTemplates.projectExclusionPathTemplate.render({ - project, - exclusion, + return this.pathTemplates.projectExclusionPathTemplate.render({ + project: project, + exclusion: exclusion, }); } @@ -1843,7 +2036,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectExclusionName(projectExclusionName: string) { - return this._pathTemplates.projectExclusionPathTemplate.match( + return this.pathTemplates.projectExclusionPathTemplate.match( projectExclusionName ).project; } @@ -1856,7 +2049,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromProjectExclusionName(projectExclusionName: string) { - return this._pathTemplates.projectExclusionPathTemplate.match( + return this.pathTemplates.projectExclusionPathTemplate.match( projectExclusionName ).exclusion; } @@ -1870,10 +2063,10 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ projectLocationBucketPath(project: string, location: string, bucket: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.render({ - project, - location, - bucket, + return this.pathTemplates.projectLocationBucketPathTemplate.render({ + project: project, + location: location, + bucket: bucket, }); } @@ -1885,7 +2078,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).project; } @@ -1900,7 +2093,7 @@ export class LoggingServiceV2Client { matchLocationFromProjectLocationBucketName( projectLocationBucketName: string ) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).location; } @@ -1913,7 +2106,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).bucket; } @@ -1926,9 +2119,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ projectLogPath(project: string, log: string) { - return this._pathTemplates.projectLogPathTemplate.render({ - project, - log, + return this.pathTemplates.projectLogPathTemplate.render({ + project: project, + log: log, }); } @@ -1940,7 +2133,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLogName(projectLogName: string) { - return this._pathTemplates.projectLogPathTemplate.match(projectLogName) + return this.pathTemplates.projectLogPathTemplate.match(projectLogName) .project; } @@ -1952,7 +2145,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromProjectLogName(projectLogName: string) { - return this._pathTemplates.projectLogPathTemplate.match(projectLogName).log; + return this.pathTemplates.projectLogPathTemplate.match(projectLogName).log; } /** @@ -1963,9 +2156,9 @@ export class LoggingServiceV2Client { * @returns {string} Resource name string. */ projectSinkPath(project: string, sink: string) { - return this._pathTemplates.projectSinkPathTemplate.render({ - project, - sink, + return this.pathTemplates.projectSinkPathTemplate.render({ + project: project, + sink: sink, }); } @@ -1977,7 +2170,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectSinkName(projectSinkName: string) { - return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName) .project; } @@ -1989,7 +2182,7 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromProjectSinkName(projectSinkName: string) { - return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName) .sink; } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 10e984fc85f..30f5a440203 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -18,18 +18,18 @@ import * as gax from 'google-gax'; import { - APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, - PaginationResponse, + GaxCall, } from 'google-gax'; import * as path from 'path'; import {Transform} from 'stream'; -import * as protosTypes from '../../protos/protos'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; import * as gapicConfig from './metrics_service_v2_client_config.json'; const version = require('../../../package.json').version; @@ -40,14 +40,6 @@ const version = require('../../../package.json').version; * @memberof v2 */ export class MetricsServiceV2Client { - private _descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -55,6 +47,14 @@ export class MetricsServiceV2Client { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; metricsServiceV2Stub?: Promise<{[name: string]: Function}>; /** @@ -146,13 +146,16 @@ export class MetricsServiceV2Client { 'protos.json' ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. - this._pathTemplates = { + this.pathTemplates = { billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/cmekSettings' ), @@ -224,7 +227,7 @@ export class MetricsServiceV2Client { // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. - this._descriptors.page = { + this.descriptors.page = { listLogMetrics: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -243,7 +246,7 @@ export class MetricsServiceV2Client { // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. - this._innerApiCalls = {}; + this.innerApiCalls = {}; } /** @@ -270,7 +273,7 @@ export class MetricsServiceV2Client { ? (this._protos as protobuf.Root).lookupService( 'google.logging.v2.MetricsServiceV2' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.MetricsServiceV2, this._opts ) as Promise<{[method: string]: Function}>; @@ -284,9 +287,8 @@ export class MetricsServiceV2Client { 'updateLogMetric', 'deleteLogMetric', ]; - for (const methodName of metricsServiceV2StubMethods) { - const innerCallPromise = this.metricsServiceV2Stub.then( + const callPromise = this.metricsServiceV2Stub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); @@ -300,20 +302,14 @@ export class MetricsServiceV2Client { ); const apiCall = this._gaxModule.createApiCall( - innerCallPromise, + callPromise, this._defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName] + this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); - this._innerApiCalls[methodName] = ( - argument: {}, - callOptions?: CallOptions, - callback?: APICallback - ) => { - return apiCall(argument, callOptions, callback); - }; + this.innerApiCalls[methodName] = apiCall; } return this.metricsServiceV2Stub; @@ -376,22 +372,30 @@ export class MetricsServiceV2Client { // -- Service calls -- // ------------------- getLogMetric( - request: protosTypes.google.logging.v2.IGetLogMetricRequest, + request: protos.google.logging.v2.IGetLogMetricRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IGetLogMetricRequest | undefined, {} | undefined ] >; getLogMetric( - request: protosTypes.google.logging.v2.IGetLogMetricRequest, + request: protos.google.logging.v2.IGetLogMetricRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IGetLogMetricRequest | null | undefined, + {} | null | undefined + > + ): void; + getLogMetric( + request: protos.google.logging.v2.IGetLogMetricRequest, + callback: Callback< + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IGetLogMetricRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -410,23 +414,23 @@ export class MetricsServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ getLogMetric( - request: protosTypes.google.logging.v2.IGetLogMetricRequest, + request: protos.google.logging.v2.IGetLogMetricRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IGetLogMetricRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IGetLogMetricRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IGetLogMetricRequest | undefined, + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IGetLogMetricRequest | undefined, {} | undefined ] > | void { @@ -447,25 +451,33 @@ export class MetricsServiceV2Client { metric_name: request.metricName || '', }); this.initialize(); - return this._innerApiCalls.getLogMetric(request, options, callback); + return this.innerApiCalls.getLogMetric(request, options, callback); } createLogMetric( - request: protosTypes.google.logging.v2.ICreateLogMetricRequest, + request: protos.google.logging.v2.ICreateLogMetricRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.ICreateLogMetricRequest | undefined, {} | undefined ] >; createLogMetric( - request: protosTypes.google.logging.v2.ICreateLogMetricRequest, + request: protos.google.logging.v2.ICreateLogMetricRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, + {} | null | undefined + > + ): void; + createLogMetric( + request: protos.google.logging.v2.ICreateLogMetricRequest, + callback: Callback< + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -489,23 +501,23 @@ export class MetricsServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ createLogMetric( - request: protosTypes.google.logging.v2.ICreateLogMetricRequest, + request: protos.google.logging.v2.ICreateLogMetricRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.ICreateLogMetricRequest | undefined, + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.ICreateLogMetricRequest | undefined, {} | undefined ] > | void { @@ -526,25 +538,33 @@ export class MetricsServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createLogMetric(request, options, callback); + return this.innerApiCalls.createLogMetric(request, options, callback); } updateLogMetric( - request: protosTypes.google.logging.v2.IUpdateLogMetricRequest, + request: protos.google.logging.v2.IUpdateLogMetricRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IUpdateLogMetricRequest | undefined, {} | undefined ] >; updateLogMetric( - request: protosTypes.google.logging.v2.IUpdateLogMetricRequest, + request: protos.google.logging.v2.IUpdateLogMetricRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, + {} | null | undefined + > + ): void; + updateLogMetric( + request: protos.google.logging.v2.IUpdateLogMetricRequest, + callback: Callback< + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -569,23 +589,23 @@ export class MetricsServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateLogMetric( - request: protosTypes.google.logging.v2.IUpdateLogMetricRequest, + request: protos.google.logging.v2.IUpdateLogMetricRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, - {} | undefined + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.logging.v2.ILogMetric, - protosTypes.google.logging.v2.IUpdateLogMetricRequest | undefined, + protos.google.logging.v2.ILogMetric, + protos.google.logging.v2.IUpdateLogMetricRequest | undefined, {} | undefined ] > | void { @@ -606,25 +626,33 @@ export class MetricsServiceV2Client { metric_name: request.metricName || '', }); this.initialize(); - return this._innerApiCalls.updateLogMetric(request, options, callback); + return this.innerApiCalls.updateLogMetric(request, options, callback); } deleteLogMetric( - request: protosTypes.google.logging.v2.IDeleteLogMetricRequest, + request: protos.google.logging.v2.IDeleteLogMetricRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogMetricRequest | undefined, {} | undefined ] >; deleteLogMetric( - request: protosTypes.google.logging.v2.IDeleteLogMetricRequest, + request: protos.google.logging.v2.IDeleteLogMetricRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteLogMetric( + request: protos.google.logging.v2.IDeleteLogMetricRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -643,23 +671,23 @@ export class MetricsServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteLogMetric( - request: protosTypes.google.logging.v2.IDeleteLogMetricRequest, + request: protos.google.logging.v2.IDeleteLogMetricRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.logging.v2.IDeleteLogMetricRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogMetricRequest | undefined, {} | undefined ] > | void { @@ -680,26 +708,34 @@ export class MetricsServiceV2Client { metric_name: request.metricName || '', }); this.initialize(); - return this._innerApiCalls.deleteLogMetric(request, options, callback); + return this.innerApiCalls.deleteLogMetric(request, options, callback); } listLogMetrics( - request: protosTypes.google.logging.v2.IListLogMetricsRequest, + request: protos.google.logging.v2.IListLogMetricsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.logging.v2.ILogMetric[], - protosTypes.google.logging.v2.IListLogMetricsRequest | null, - protosTypes.google.logging.v2.IListLogMetricsResponse + protos.google.logging.v2.ILogMetric[], + protos.google.logging.v2.IListLogMetricsRequest | null, + protos.google.logging.v2.IListLogMetricsResponse ] >; listLogMetrics( - request: protosTypes.google.logging.v2.IListLogMetricsRequest, + request: protos.google.logging.v2.IListLogMetricsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.logging.v2.ILogMetric[], - protosTypes.google.logging.v2.IListLogMetricsRequest | null, - protosTypes.google.logging.v2.IListLogMetricsResponse + callback: PaginationCallback< + protos.google.logging.v2.IListLogMetricsRequest, + protos.google.logging.v2.IListLogMetricsResponse | null | undefined, + protos.google.logging.v2.ILogMetric + > + ): void; + listLogMetrics( + request: protos.google.logging.v2.IListLogMetricsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListLogMetricsRequest, + protos.google.logging.v2.IListLogMetricsResponse | null | undefined, + protos.google.logging.v2.ILogMetric > ): void; /** @@ -739,24 +775,24 @@ export class MetricsServiceV2Client { * The promise has a method named "cancel" which cancels the ongoing API call. */ listLogMetrics( - request: protosTypes.google.logging.v2.IListLogMetricsRequest, + request: protos.google.logging.v2.IListLogMetricsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.logging.v2.ILogMetric[], - protosTypes.google.logging.v2.IListLogMetricsRequest | null, - protosTypes.google.logging.v2.IListLogMetricsResponse + | PaginationCallback< + protos.google.logging.v2.IListLogMetricsRequest, + protos.google.logging.v2.IListLogMetricsResponse | null | undefined, + protos.google.logging.v2.ILogMetric >, - callback?: Callback< - protosTypes.google.logging.v2.ILogMetric[], - protosTypes.google.logging.v2.IListLogMetricsRequest | null, - protosTypes.google.logging.v2.IListLogMetricsResponse + callback?: PaginationCallback< + protos.google.logging.v2.IListLogMetricsRequest, + protos.google.logging.v2.IListLogMetricsResponse | null | undefined, + protos.google.logging.v2.ILogMetric > ): Promise< [ - protosTypes.google.logging.v2.ILogMetric[], - protosTypes.google.logging.v2.IListLogMetricsRequest | null, - protosTypes.google.logging.v2.IListLogMetricsResponse + protos.google.logging.v2.ILogMetric[], + protos.google.logging.v2.IListLogMetricsRequest | null, + protos.google.logging.v2.IListLogMetricsResponse ] > | void { request = request || {}; @@ -776,7 +812,7 @@ export class MetricsServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listLogMetrics(request, options, callback); + return this.innerApiCalls.listLogMetrics(request, options, callback); } /** @@ -813,7 +849,7 @@ export class MetricsServiceV2Client { * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. */ listLogMetricsStream( - request?: protosTypes.google.logging.v2.IListLogMetricsRequest, + request?: protos.google.logging.v2.IListLogMetricsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -827,12 +863,60 @@ export class MetricsServiceV2Client { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listLogMetrics.createStream( - this._innerApiCalls.listLogMetrics as gax.GaxCall, + return this.descriptors.page.listLogMetrics.createStream( + this.innerApiCalls.listLogMetrics as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listLogMetrics}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listLogMetricsAsync( + request?: protos.google.logging.v2.IListLogMetricsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listLogMetrics.asyncIterate( + this.innerApiCalls['listLogMetrics'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -844,7 +928,7 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ billingAccountCmekSettingsPath(billingAccount: string) { - return this._pathTemplates.billingAccountCmekSettingsPathTemplate.render({ + return this.pathTemplates.billingAccountCmekSettingsPathTemplate.render({ billing_account: billingAccount, }); } @@ -859,7 +943,7 @@ export class MetricsServiceV2Client { matchBillingAccountFromBillingAccountCmekSettingsName( billingAccountCmekSettingsName: string ) { - return this._pathTemplates.billingAccountCmekSettingsPathTemplate.match( + return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match( billingAccountCmekSettingsName ).billing_account; } @@ -872,9 +956,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ billingAccountExclusionPath(billingAccount: string, exclusion: string) { - return this._pathTemplates.billingAccountExclusionPathTemplate.render({ + return this.pathTemplates.billingAccountExclusionPathTemplate.render({ billing_account: billingAccount, - exclusion, + exclusion: exclusion, }); } @@ -888,7 +972,7 @@ export class MetricsServiceV2Client { matchBillingAccountFromBillingAccountExclusionName( billingAccountExclusionName: string ) { - return this._pathTemplates.billingAccountExclusionPathTemplate.match( + return this.pathTemplates.billingAccountExclusionPathTemplate.match( billingAccountExclusionName ).billing_account; } @@ -903,7 +987,7 @@ export class MetricsServiceV2Client { matchExclusionFromBillingAccountExclusionName( billingAccountExclusionName: string ) { - return this._pathTemplates.billingAccountExclusionPathTemplate.match( + return this.pathTemplates.billingAccountExclusionPathTemplate.match( billingAccountExclusionName ).exclusion; } @@ -921,10 +1005,10 @@ export class MetricsServiceV2Client { location: string, bucket: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.render({ + return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({ billing_account: billingAccount, - location, - bucket, + location: location, + bucket: bucket, }); } @@ -938,7 +1022,7 @@ export class MetricsServiceV2Client { matchBillingAccountFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).billing_account; } @@ -953,7 +1037,7 @@ export class MetricsServiceV2Client { matchLocationFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).location; } @@ -968,7 +1052,7 @@ export class MetricsServiceV2Client { matchBucketFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { - return this._pathTemplates.billingAccountLocationBucketPathTemplate.match( + return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).bucket; } @@ -981,9 +1065,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ billingAccountLogPath(billingAccount: string, log: string) { - return this._pathTemplates.billingAccountLogPathTemplate.render({ + return this.pathTemplates.billingAccountLogPathTemplate.render({ billing_account: billingAccount, - log, + log: log, }); } @@ -995,7 +1079,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { - return this._pathTemplates.billingAccountLogPathTemplate.match( + return this.pathTemplates.billingAccountLogPathTemplate.match( billingAccountLogName ).billing_account; } @@ -1008,7 +1092,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromBillingAccountLogName(billingAccountLogName: string) { - return this._pathTemplates.billingAccountLogPathTemplate.match( + return this.pathTemplates.billingAccountLogPathTemplate.match( billingAccountLogName ).log; } @@ -1021,9 +1105,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ billingAccountSinkPath(billingAccount: string, sink: string) { - return this._pathTemplates.billingAccountSinkPathTemplate.render({ + return this.pathTemplates.billingAccountSinkPathTemplate.render({ billing_account: billingAccount, - sink, + sink: sink, }); } @@ -1037,7 +1121,7 @@ export class MetricsServiceV2Client { matchBillingAccountFromBillingAccountSinkName( billingAccountSinkName: string ) { - return this._pathTemplates.billingAccountSinkPathTemplate.match( + return this.pathTemplates.billingAccountSinkPathTemplate.match( billingAccountSinkName ).billing_account; } @@ -1050,7 +1134,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { - return this._pathTemplates.billingAccountSinkPathTemplate.match( + return this.pathTemplates.billingAccountSinkPathTemplate.match( billingAccountSinkName ).sink; } @@ -1062,8 +1146,8 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ folderCmekSettingsPath(folder: string) { - return this._pathTemplates.folderCmekSettingsPathTemplate.render({ - folder, + return this.pathTemplates.folderCmekSettingsPathTemplate.render({ + folder: folder, }); } @@ -1075,7 +1159,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { - return this._pathTemplates.folderCmekSettingsPathTemplate.match( + return this.pathTemplates.folderCmekSettingsPathTemplate.match( folderCmekSettingsName ).folder; } @@ -1088,9 +1172,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ folderExclusionPath(folder: string, exclusion: string) { - return this._pathTemplates.folderExclusionPathTemplate.render({ - folder, - exclusion, + return this.pathTemplates.folderExclusionPathTemplate.render({ + folder: folder, + exclusion: exclusion, }); } @@ -1102,7 +1186,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderExclusionName(folderExclusionName: string) { - return this._pathTemplates.folderExclusionPathTemplate.match( + return this.pathTemplates.folderExclusionPathTemplate.match( folderExclusionName ).folder; } @@ -1115,7 +1199,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromFolderExclusionName(folderExclusionName: string) { - return this._pathTemplates.folderExclusionPathTemplate.match( + return this.pathTemplates.folderExclusionPathTemplate.match( folderExclusionName ).exclusion; } @@ -1129,10 +1213,10 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ folderLocationBucketPath(folder: string, location: string, bucket: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.render({ - folder, - location, - bucket, + return this.pathTemplates.folderLocationBucketPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, }); } @@ -1144,7 +1228,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).folder; } @@ -1157,7 +1241,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).location; } @@ -1170,7 +1254,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { - return this._pathTemplates.folderLocationBucketPathTemplate.match( + return this.pathTemplates.folderLocationBucketPathTemplate.match( folderLocationBucketName ).bucket; } @@ -1183,9 +1267,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ folderLogPath(folder: string, log: string) { - return this._pathTemplates.folderLogPathTemplate.render({ - folder, - log, + return this.pathTemplates.folderLogPathTemplate.render({ + folder: folder, + log: log, }); } @@ -1197,8 +1281,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLogName(folderLogName: string) { - return this._pathTemplates.folderLogPathTemplate.match(folderLogName) - .folder; + return this.pathTemplates.folderLogPathTemplate.match(folderLogName).folder; } /** @@ -1209,7 +1292,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromFolderLogName(folderLogName: string) { - return this._pathTemplates.folderLogPathTemplate.match(folderLogName).log; + return this.pathTemplates.folderLogPathTemplate.match(folderLogName).log; } /** @@ -1220,9 +1303,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ folderSinkPath(folder: string, sink: string) { - return this._pathTemplates.folderSinkPathTemplate.render({ - folder, - sink, + return this.pathTemplates.folderSinkPathTemplate.render({ + folder: folder, + sink: sink, }); } @@ -1234,7 +1317,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderSinkName(folderSinkName: string) { - return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) + return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName) .folder; } @@ -1246,8 +1329,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromFolderSinkName(folderSinkName: string) { - return this._pathTemplates.folderSinkPathTemplate.match(folderSinkName) - .sink; + return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName).sink; } /** @@ -1258,9 +1340,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ logMetricPath(project: string, metric: string) { - return this._pathTemplates.logMetricPathTemplate.render({ - project, - metric, + return this.pathTemplates.logMetricPathTemplate.render({ + project: project, + metric: metric, }); } @@ -1272,7 +1354,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromLogMetricName(logMetricName: string) { - return this._pathTemplates.logMetricPathTemplate.match(logMetricName) + return this.pathTemplates.logMetricPathTemplate.match(logMetricName) .project; } @@ -1284,8 +1366,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the metric. */ matchMetricFromLogMetricName(logMetricName: string) { - return this._pathTemplates.logMetricPathTemplate.match(logMetricName) - .metric; + return this.pathTemplates.logMetricPathTemplate.match(logMetricName).metric; } /** @@ -1295,8 +1376,8 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ organizationCmekSettingsPath(organization: string) { - return this._pathTemplates.organizationCmekSettingsPathTemplate.render({ - organization, + return this.pathTemplates.organizationCmekSettingsPathTemplate.render({ + organization: organization, }); } @@ -1310,7 +1391,7 @@ export class MetricsServiceV2Client { matchOrganizationFromOrganizationCmekSettingsName( organizationCmekSettingsName: string ) { - return this._pathTemplates.organizationCmekSettingsPathTemplate.match( + return this.pathTemplates.organizationCmekSettingsPathTemplate.match( organizationCmekSettingsName ).organization; } @@ -1323,9 +1404,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ organizationExclusionPath(organization: string, exclusion: string) { - return this._pathTemplates.organizationExclusionPathTemplate.render({ - organization, - exclusion, + return this.pathTemplates.organizationExclusionPathTemplate.render({ + organization: organization, + exclusion: exclusion, }); } @@ -1339,7 +1420,7 @@ export class MetricsServiceV2Client { matchOrganizationFromOrganizationExclusionName( organizationExclusionName: string ) { - return this._pathTemplates.organizationExclusionPathTemplate.match( + return this.pathTemplates.organizationExclusionPathTemplate.match( organizationExclusionName ).organization; } @@ -1354,7 +1435,7 @@ export class MetricsServiceV2Client { matchExclusionFromOrganizationExclusionName( organizationExclusionName: string ) { - return this._pathTemplates.organizationExclusionPathTemplate.match( + return this.pathTemplates.organizationExclusionPathTemplate.match( organizationExclusionName ).exclusion; } @@ -1372,10 +1453,10 @@ export class MetricsServiceV2Client { location: string, bucket: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.render({ - organization, - location, - bucket, + return this.pathTemplates.organizationLocationBucketPathTemplate.render({ + organization: organization, + location: location, + bucket: bucket, }); } @@ -1389,7 +1470,7 @@ export class MetricsServiceV2Client { matchOrganizationFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).organization; } @@ -1404,7 +1485,7 @@ export class MetricsServiceV2Client { matchLocationFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).location; } @@ -1419,7 +1500,7 @@ export class MetricsServiceV2Client { matchBucketFromOrganizationLocationBucketName( organizationLocationBucketName: string ) { - return this._pathTemplates.organizationLocationBucketPathTemplate.match( + return this.pathTemplates.organizationLocationBucketPathTemplate.match( organizationLocationBucketName ).bucket; } @@ -1432,9 +1513,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ organizationLogPath(organization: string, log: string) { - return this._pathTemplates.organizationLogPathTemplate.render({ - organization, - log, + return this.pathTemplates.organizationLogPathTemplate.render({ + organization: organization, + log: log, }); } @@ -1446,7 +1527,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLogName(organizationLogName: string) { - return this._pathTemplates.organizationLogPathTemplate.match( + return this.pathTemplates.organizationLogPathTemplate.match( organizationLogName ).organization; } @@ -1459,7 +1540,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromOrganizationLogName(organizationLogName: string) { - return this._pathTemplates.organizationLogPathTemplate.match( + return this.pathTemplates.organizationLogPathTemplate.match( organizationLogName ).log; } @@ -1472,9 +1553,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ organizationSinkPath(organization: string, sink: string) { - return this._pathTemplates.organizationSinkPathTemplate.render({ - organization, - sink, + return this.pathTemplates.organizationSinkPathTemplate.render({ + organization: organization, + sink: sink, }); } @@ -1486,7 +1567,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { - return this._pathTemplates.organizationSinkPathTemplate.match( + return this.pathTemplates.organizationSinkPathTemplate.match( organizationSinkName ).organization; } @@ -1499,7 +1580,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromOrganizationSinkName(organizationSinkName: string) { - return this._pathTemplates.organizationSinkPathTemplate.match( + return this.pathTemplates.organizationSinkPathTemplate.match( organizationSinkName ).sink; } @@ -1511,8 +1592,8 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -1524,7 +1605,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -1534,8 +1615,8 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ projectCmekSettingsPath(project: string) { - return this._pathTemplates.projectCmekSettingsPathTemplate.render({ - project, + return this.pathTemplates.projectCmekSettingsPathTemplate.render({ + project: project, }); } @@ -1547,7 +1628,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { - return this._pathTemplates.projectCmekSettingsPathTemplate.match( + return this.pathTemplates.projectCmekSettingsPathTemplate.match( projectCmekSettingsName ).project; } @@ -1560,9 +1641,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ projectExclusionPath(project: string, exclusion: string) { - return this._pathTemplates.projectExclusionPathTemplate.render({ - project, - exclusion, + return this.pathTemplates.projectExclusionPathTemplate.render({ + project: project, + exclusion: exclusion, }); } @@ -1574,7 +1655,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectExclusionName(projectExclusionName: string) { - return this._pathTemplates.projectExclusionPathTemplate.match( + return this.pathTemplates.projectExclusionPathTemplate.match( projectExclusionName ).project; } @@ -1587,7 +1668,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromProjectExclusionName(projectExclusionName: string) { - return this._pathTemplates.projectExclusionPathTemplate.match( + return this.pathTemplates.projectExclusionPathTemplate.match( projectExclusionName ).exclusion; } @@ -1601,10 +1682,10 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ projectLocationBucketPath(project: string, location: string, bucket: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.render({ - project, - location, - bucket, + return this.pathTemplates.projectLocationBucketPathTemplate.render({ + project: project, + location: location, + bucket: bucket, }); } @@ -1616,7 +1697,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).project; } @@ -1631,7 +1712,7 @@ export class MetricsServiceV2Client { matchLocationFromProjectLocationBucketName( projectLocationBucketName: string ) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).location; } @@ -1644,7 +1725,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { - return this._pathTemplates.projectLocationBucketPathTemplate.match( + return this.pathTemplates.projectLocationBucketPathTemplate.match( projectLocationBucketName ).bucket; } @@ -1657,9 +1738,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ projectLogPath(project: string, log: string) { - return this._pathTemplates.projectLogPathTemplate.render({ - project, - log, + return this.pathTemplates.projectLogPathTemplate.render({ + project: project, + log: log, }); } @@ -1671,7 +1752,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLogName(projectLogName: string) { - return this._pathTemplates.projectLogPathTemplate.match(projectLogName) + return this.pathTemplates.projectLogPathTemplate.match(projectLogName) .project; } @@ -1683,7 +1764,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the log. */ matchLogFromProjectLogName(projectLogName: string) { - return this._pathTemplates.projectLogPathTemplate.match(projectLogName).log; + return this.pathTemplates.projectLogPathTemplate.match(projectLogName).log; } /** @@ -1694,9 +1775,9 @@ export class MetricsServiceV2Client { * @returns {string} Resource name string. */ projectSinkPath(project: string, sink: string) { - return this._pathTemplates.projectSinkPathTemplate.render({ - project, - sink, + return this.pathTemplates.projectSinkPathTemplate.render({ + project: project, + sink: sink, }); } @@ -1708,7 +1789,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectSinkName(projectSinkName: string) { - return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName) .project; } @@ -1720,7 +1801,7 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the sink. */ matchSinkFromProjectSinkName(projectSinkName: string) { - return this._pathTemplates.projectSinkPathTemplate.match(projectSinkName) + return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName) .sink; } diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 86f080e99ae..c33849684a6 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2020-03-23T19:52:03.983833Z", + "updateTime": "2020-04-02T18:03:34.847544Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", - "internalRef": "302154871" + "sha": "01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0", + "internalRef": "304416658" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" + "sha": "99820243d348191bc9c634f2b48ddf65096285ed" } } ], diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 04a1fe2df86..da976ab00cf 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -41,11 +41,19 @@ proto_path=f'/google/logging/{version}', extra_proto_files=['google/cloud/common_resources.proto'], ) -s.copy(v2_library, excludes=["src/index.ts", "README.md", "package.json"]) +s.copy(v2_library, excludes=["src/index.ts", "README.md", "package.json", "system-test/fixtures/sample/src/index.js", "system-test/fixtures/sample/src/index.ts"]) # fix incorrect docs link s.replace('src/v2/config_service_v2_client.ts', '/logging/docs/routing/managed-encryption', 'https://cloud.google.com/logging/docs/routing/managed-encryption') s.replace('src/v2/logging_service_v2_client.ts', '/logging/docs/', 'https://cloud.google.com/logging/docs/') s.replace('src/v2/logging_service_v2_client.ts', '/logging/quota-policy', 'https://cloud.google.com/logging/quota-policy') +# fix improper sample message type in unit test +# this will be fixed in micro-gen +s.replace('test/gapic_logging_service_v2_v2.ts', +'generateSampleMessage\(new protosTYPE\_STRING\(\)\)', +'\'\'') +s.replace('test/gapic_logging_service_v2_v2.ts', +'protosTYPE\_STRING', +'protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING') # Copy in templated files common_templates = gcp.CommonTemplates() diff --git a/handwritten/logging/system-test/fixtures/sample/src/index.js b/handwritten/logging/system-test/fixtures/sample/src/index.js index a48b7fafa07..784ac159bc2 100644 --- a/handwritten/logging/system-test/fixtures/sample/src/index.js +++ b/handwritten/logging/system-test/fixtures/sample/src/index.js @@ -20,7 +20,7 @@ const logging = require('@google-cloud/logging'); function main() { - const client = new logging.Logging(); + new logging.Logging(); } main(); diff --git a/handwritten/logging/system-test/fixtures/sample/src/index.ts b/handwritten/logging/system-test/fixtures/sample/src/index.ts index 225d586b1d5..780514d4d1c 100644 --- a/handwritten/logging/system-test/fixtures/sample/src/index.ts +++ b/handwritten/logging/system-test/fixtures/sample/src/index.ts @@ -19,7 +19,7 @@ import {Logging} from '@google-cloud/logging'; function main() { - const loggingServiceV2Client = new Logging(); + new Logging(); } main(); diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 7ce7cb9ad8f..2c36430d896 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -23,6 +23,8 @@ import {HOST_ADDRESS} from 'gcp-metadata'; import * as nock from 'nock'; import {Duplex} from 'stream'; import {v4} from 'uuid'; +import {after, before} from 'mocha'; +// eslint-disable-next-line @typescript-eslint/no-var-requires const http2spy = require('http2spy'); import {Logging, Sink, Log, Entry} from '../src'; @@ -160,7 +162,7 @@ describe('Logging', async () => { async function getAndDelete(method: Function) { const [objects] = await method(); return Promise.all( - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (objects as any[]) .filter(o => { const name = o.name || o.id; @@ -177,6 +179,7 @@ describe('Logging', async () => { describe('sinks', () => { it('should create a sink with a Bucket destination', async () => { const sink = logging.sink(generateName()); + // eslint-disable-next-line @typescript-eslint/no-unused-vars const [_, apiResponse] = await sink.create({ destination: bucket, }); @@ -186,6 +189,7 @@ describe('Logging', async () => { it('should create a sink with a Dataset destination', async () => { const sink = logging.sink(generateName()); + // eslint-disable-next-line @typescript-eslint/no-unused-vars const [_, apiResponse] = await sink.create({destination: dataset}); const destination = `bigquery.googleapis.com/datasets/${dataset.id}`; @@ -201,6 +205,7 @@ describe('Logging', async () => { it('should create a sink with a Topic destination', async () => { const sink = logging.sink(generateName()); + // eslint-disable-next-line @typescript-eslint/no-unused-vars const [_, apiResponse] = await sink.create({destination: topic}); const destination = 'pubsub.googleapis.com/' + topic.name; diff --git a/handwritten/logging/test/common.ts b/handwritten/logging/test/common.ts index 82d3fde3356..e5bdaa2deb4 100644 --- a/handwritten/logging/test/common.ts +++ b/handwritten/logging/test/common.ts @@ -17,7 +17,7 @@ import { ObjectToStructConverterConfig, } from '../src/common'; import * as assert from 'assert'; -import {describe, it} from 'mocha'; +import {describe, it, beforeEach} from 'mocha'; const OPTIONS = { maxRetries: 3, } as ObjectToStructConverterConfig; @@ -32,7 +32,7 @@ describe('ObjectToStructConverter', () => { describe('instantiation', () => { it('should not require an options object', () => { assert.doesNotThrow(() => { - const x = new ObjectToStructConverter(); + new ObjectToStructConverter(); }); }); @@ -67,7 +67,7 @@ describe('ObjectToStructConverter', () => { return convertedValue; }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const struct: any = objectToStructConverter.convert({ a: inputValue, }); @@ -103,7 +103,7 @@ describe('ObjectToStructConverter', () => { const obj = {}; let objectAdded: {}; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (objectToStructConverter as any).seenObjects = { add(obj: {}) { objectAdded = obj; @@ -159,7 +159,7 @@ describe('ObjectToStructConverter', () => { it('should throw if a type is not recognized', () => { assert.throws(() => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (objectToStructConverter as any).encodeValue_(); }, /Value of type undefined not recognized./); }); @@ -172,7 +172,7 @@ describe('ObjectToStructConverter', () => { const convertedValue = {}; objectToStructConverter.convert = value => { assert.strictEqual(value, VALUE); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return convertedValue as any; }; diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 3036cbf5c8e..e98884956b7 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as assert from 'assert'; -import {describe, it} from 'mocha'; +import {describe, it, before, beforeEach, afterEach} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as entryTypes from '../src/entry'; @@ -23,7 +23,9 @@ let fakeEventIdNewOverride: Function | null; class FakeEventId { new() { - return (fakeEventIdNewOverride || (() => {})).apply(null, arguments); + const func = fakeEventIdNewOverride || (() => {}); + // eslint-disable-next-line prefer-rest-params + return func(null, arguments); } } @@ -37,7 +39,7 @@ const structToObj = (struct: {}) => { }; describe('Entry', () => { - // tslint:disable-next-line no-any variable-name + // eslint-disable-next-line @typescript-eslint/no-explicit-any let Entry: typeof entryTypes.Entry; let entry: entryTypes.Entry; @@ -121,7 +123,7 @@ describe('Entry', () => { seconds: secondsRounded, nanos: Math.floor((seconds - secondsRounded) * 1e9), }, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); }); @@ -129,7 +131,7 @@ describe('Entry', () => { assert(entry instanceof Entry); assert.strictEqual(entry.metadata.resource, RESOURCE); assert.strictEqual(entry.data, DATA); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.strictEqual((entry.metadata as any).extraProperty, true); assert.deepStrictEqual(entry.metadata.timestamp, date); }); @@ -140,7 +142,7 @@ describe('Entry', () => { payload: 'protoPayload', protoPayload: DATA, extraProperty: true, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); assert.strictEqual(entry.data, DATA); }); @@ -155,7 +157,7 @@ describe('Entry', () => { payload: 'textPayload', textPayload: DATA as string, extraProperty: true, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); assert.strictEqual(entry.data, DATA); diff --git a/handwritten/logging/test/gapic-config_service_v2-v2.ts b/handwritten/logging/test/gapic-config_service_v2-v2.ts deleted file mode 100644 index f285c878210..00000000000 --- a/handwritten/logging/test/gapic-config_service_v2-v2.ts +++ /dev/null @@ -1,915 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const configservicev2Module = require('../src'); - -const FAKE_STATUS_CODE = 1; -class FakeError { - name: string; - message: string; - code: number; - constructor(n: number) { - this.name = 'fakeName'; - this.message = 'fake message'; - this.code = n; - } -} -const error = new FakeError(FAKE_STATUS_CODE); -export interface Callback { - (err: FakeError | null, response?: {} | null): void; -} - -export class Operation { - constructor() {} - promise() {} -} -function mockSimpleGrpcMethod( - expectedRequest: {}, - response: {} | null, - error: FakeError | null -) { - return (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} -describe('v2.ConfigServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = - configservicev2Module.v2.ConfigServiceV2Client.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - configservicev2Module.v2.ConfigServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = configservicev2Module.v2.ConfigServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new configservicev2Module.v2.ConfigServiceV2Client(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.configServiceV2Stub, undefined); - await client.initialize(); - assert(client.configServiceV2Stub); - }); - it('has close method', () => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('getBucket', () => { - it('invokes getBucket without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetBucketRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getBucket = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getBucket(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getBucket with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetBucketRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getBucket = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getBucket(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateBucket', () => { - it('invokes updateBucket without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateBucketRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateBucket(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateBucket with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateBucketRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateBucket(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getSink', () => { - it('invokes getSink without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetSinkRequest = {}; - request.sinkName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getSink = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getSink(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getSink with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetSinkRequest = {}; - request.sinkName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getSink = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getSink(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createSink', () => { - it('invokes createSink without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.ICreateSinkRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createSink = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createSink(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createSink with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.ICreateSinkRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createSink = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createSink(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateSink', () => { - it('invokes updateSink without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateSinkRequest = {}; - request.sinkName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateSink = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateSink(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateSink with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateSinkRequest = {}; - request.sinkName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateSink = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateSink(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteSink', () => { - it('invokes deleteSink without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IDeleteSinkRequest = {}; - request.sinkName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteSink(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteSink with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IDeleteSinkRequest = {}; - request.sinkName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteSink(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getExclusion', () => { - it('invokes getExclusion without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetExclusionRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getExclusion(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getExclusion with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetExclusionRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getExclusion(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createExclusion', () => { - it('invokes createExclusion without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.ICreateExclusionRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createExclusion(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createExclusion with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.ICreateExclusionRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createExclusion(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateExclusion', () => { - it('invokes updateExclusion without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateExclusionRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateExclusion(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateExclusion with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateExclusionRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateExclusion(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteExclusion', () => { - it('invokes deleteExclusion without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IDeleteExclusionRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteExclusion(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteExclusion with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IDeleteExclusionRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteExclusion(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getCmekSettings', () => { - it('invokes getCmekSettings without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetCmekSettingsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getCmekSettings(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getCmekSettings with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetCmekSettingsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getCmekSettings(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateCmekSettings', () => { - it('invokes updateCmekSettings without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateCmekSettings(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateCmekSettings with error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateCmekSettings(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('listBuckets', () => { - it('invokes listBuckets without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListBucketsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listBuckets = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listBuckets(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listBucketsStream', () => { - it('invokes listBucketsStream without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListBucketsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listBuckets = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listBucketsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listSinks', () => { - it('invokes listSinks without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListSinksRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listSinks = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listSinks(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listSinksStream', () => { - it('invokes listSinksStream without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListSinksRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listSinks = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listSinksStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listExclusions', () => { - it('invokes listExclusions without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListExclusionsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listExclusions = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listExclusions(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listExclusionsStream', () => { - it('invokes listExclusionsStream without error', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListExclusionsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listExclusions = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listExclusionsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/handwritten/logging/test/gapic-logging_service_v2-v2.ts b/handwritten/logging/test/gapic-logging_service_v2-v2.ts deleted file mode 100644 index 081b22b77ba..00000000000 --- a/handwritten/logging/test/gapic-logging_service_v2-v2.ts +++ /dev/null @@ -1,392 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const loggingservicev2Module = require('../src'); - -const FAKE_STATUS_CODE = 1; -class FakeError { - name: string; - message: string; - code: number; - constructor(n: number) { - this.name = 'fakeName'; - this.message = 'fake message'; - this.code = n; - } -} -const error = new FakeError(FAKE_STATUS_CODE); -export interface Callback { - (err: FakeError | null, response?: {} | null): void; -} - -export class Operation { - constructor() {} - promise() {} -} -function mockSimpleGrpcMethod( - expectedRequest: {}, - response: {} | null, - error: FakeError | null -) { - return (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} -describe('v2.LoggingServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = - loggingservicev2Module.v2.LoggingServiceV2Client.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - loggingservicev2Module.v2.LoggingServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = loggingservicev2Module.v2.LoggingServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.loggingServiceV2Stub, undefined); - await client.initialize(); - assert(client.loggingServiceV2Stub); - }); - it('has close method', () => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('deleteLog', () => { - it('invokes deleteLog without error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IDeleteLogRequest = {}; - request.logName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteLog(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteLog with error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IDeleteLogRequest = {}; - request.logName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteLog(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('writeLogEntries', () => { - it('invokes writeLogEntries without error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IWriteLogEntriesRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.writeLogEntries(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes writeLogEntries with error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IWriteLogEntriesRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( - request, - null, - error - ); - client.writeLogEntries(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('listLogEntries', () => { - it('invokes listLogEntries without error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListLogEntriesRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listLogEntries = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listLogEntries(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listLogEntriesStream', () => { - it('invokes listLogEntriesStream without error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListLogEntriesRequest = {}; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listLogEntries = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listLogEntriesStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listMonitoredResourceDescriptors', () => { - it('invokes listMonitoredResourceDescriptors without error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listMonitoredResourceDescriptors( - request, - (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - }); - describe('listMonitoredResourceDescriptorsStream', () => { - it('invokes listMonitoredResourceDescriptorsStream without error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListMonitoredResourceDescriptorsRequest = {}; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listMonitoredResourceDescriptorsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listLogs', () => { - it('invokes listLogs without error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListLogsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listLogs = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listLogs(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listLogsStream', () => { - it('invokes listLogsStream without error', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListLogsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listLogs = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listLogsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/handwritten/logging/test/gapic-metrics_service_v2-v2.ts b/handwritten/logging/test/gapic-metrics_service_v2-v2.ts deleted file mode 100644 index a24d8494545..00000000000 --- a/handwritten/logging/test/gapic-metrics_service_v2-v2.ts +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const metricsservicev2Module = require('../src'); - -const FAKE_STATUS_CODE = 1; -class FakeError { - name: string; - message: string; - code: number; - constructor(n: number) { - this.name = 'fakeName'; - this.message = 'fake message'; - this.code = n; - } -} -const error = new FakeError(FAKE_STATUS_CODE); -export interface Callback { - (err: FakeError | null, response?: {} | null): void; -} - -export class Operation { - constructor() {} - promise() {} -} -function mockSimpleGrpcMethod( - expectedRequest: {}, - response: {} | null, - error: FakeError | null -) { - return (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} -describe('v2.MetricsServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = - metricsservicev2Module.v2.MetricsServiceV2Client.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - metricsservicev2Module.v2.MetricsServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = metricsservicev2Module.v2.MetricsServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.metricsServiceV2Stub, undefined); - await client.initialize(); - assert(client.metricsServiceV2Stub); - }); - it('has close method', () => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('getLogMetric', () => { - it('invokes getLogMetric without error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetLogMetricRequest = {}; - request.metricName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getLogMetric(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getLogMetric with error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IGetLogMetricRequest = {}; - request.metricName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getLogMetric(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createLogMetric', () => { - it('invokes createLogMetric without error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.ICreateLogMetricRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createLogMetric(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createLogMetric with error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.ICreateLogMetricRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createLogMetric(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateLogMetric', () => { - it('invokes updateLogMetric without error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateLogMetricRequest = {}; - request.metricName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateLogMetric(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateLogMetric with error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IUpdateLogMetricRequest = {}; - request.metricName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateLogMetric(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteLogMetric', () => { - it('invokes deleteLogMetric without error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IDeleteLogMetricRequest = {}; - request.metricName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteLogMetric(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteLogMetric with error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IDeleteLogMetricRequest = {}; - request.metricName = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteLogMetric(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('listLogMetrics', () => { - it('invokes listLogMetrics without error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListLogMetricsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listLogMetrics = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listLogMetrics(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listLogMetricsStream', () => { - it('invokes listLogMetricsStream without error', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.logging.v2.IListLogMetricsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listLogMetrics = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listLogMetricsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts new file mode 100644 index 00000000000..1548d1abce4 --- /dev/null +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -0,0 +1,3651 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as configservicev2Module from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2.ConfigServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = + configservicev2Module.v2.ConfigServiceV2Client.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + configservicev2Module.v2.ConfigServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = configservicev2Module.v2.ConfigServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.configServiceV2Stub, undefined); + await client.initialize(); + assert(client.configServiceV2Stub); + }); + + it('has close method', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getBucket', () => { + it('invokes getBucket without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogBucket() + ); + client.innerApiCalls.getBucket = stubSimpleCall(expectedResponse); + const [response] = await client.getBucket(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getBucket as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getBucket without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogBucket() + ); + client.innerApiCalls.getBucket = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getBucket( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogBucket | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getBucket as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getBucket with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getBucket = stubSimpleCall(undefined, expectedError); + assert.rejects(async () => { + await client.getBucket(request); + }, expectedError); + assert( + (client.innerApiCalls.getBucket as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateBucket', () => { + it('invokes updateBucket without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogBucket() + ); + client.innerApiCalls.updateBucket = stubSimpleCall(expectedResponse); + const [response] = await client.updateBucket(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateBucket as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateBucket without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogBucket() + ); + client.innerApiCalls.updateBucket = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateBucket( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogBucket | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateBucket as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateBucket with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBucket = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateBucket(request); + }, expectedError); + assert( + (client.innerApiCalls.updateBucket as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getSink', () => { + it('invokes getSink without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogSink() + ); + client.innerApiCalls.getSink = stubSimpleCall(expectedResponse); + const [response] = await client.getSink(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getSink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogSink() + ); + client.innerApiCalls.getSink = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getSink( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogSink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getSink with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getSink = stubSimpleCall(undefined, expectedError); + assert.rejects(async () => { + await client.getSink(request); + }, expectedError); + assert( + (client.innerApiCalls.getSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createSink', () => { + it('invokes createSink without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateSinkRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogSink() + ); + client.innerApiCalls.createSink = stubSimpleCall(expectedResponse); + const [response] = await client.createSink(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createSink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateSinkRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogSink() + ); + client.innerApiCalls.createSink = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createSink( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogSink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createSink with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateSinkRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createSink = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createSink(request); + }, expectedError); + assert( + (client.innerApiCalls.createSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateSink', () => { + it('invokes updateSink without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogSink() + ); + client.innerApiCalls.updateSink = stubSimpleCall(expectedResponse); + const [response] = await client.updateSink(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateSink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogSink() + ); + client.innerApiCalls.updateSink = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateSink( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogSink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateSink with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSink = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateSink(request); + }, expectedError); + assert( + (client.innerApiCalls.updateSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteSink', () => { + it('invokes deleteSink without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSink = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSink(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteSink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSink = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteSink( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteSink with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSink = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteSink(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getExclusion', () => { + it('invokes getExclusion without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.getExclusion = stubSimpleCall(expectedResponse); + const [response] = await client.getExclusion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getExclusion without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.getExclusion = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getExclusion( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogExclusion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getExclusion with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getExclusion = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getExclusion(request); + }, expectedError); + assert( + (client.innerApiCalls.getExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createExclusion', () => { + it('invokes createExclusion without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateExclusionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.createExclusion = stubSimpleCall(expectedResponse); + const [response] = await client.createExclusion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createExclusion without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateExclusionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.createExclusion = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createExclusion( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogExclusion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createExclusion with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateExclusionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createExclusion = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createExclusion(request); + }, expectedError); + assert( + (client.innerApiCalls.createExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateExclusion', () => { + it('invokes updateExclusion without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.updateExclusion = stubSimpleCall(expectedResponse); + const [response] = await client.updateExclusion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateExclusion without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.updateExclusion = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateExclusion( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogExclusion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateExclusion with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateExclusion = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateExclusion(request); + }, expectedError); + assert( + (client.innerApiCalls.updateExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteExclusion', () => { + it('invokes deleteExclusion without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExclusion = stubSimpleCall(expectedResponse); + const [response] = await client.deleteExclusion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteExclusion without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExclusion = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteExclusion( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteExclusion with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteExclusion = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteExclusion(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCmekSettings', () => { + it('invokes getCmekSettings without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.getCmekSettings = stubSimpleCall(expectedResponse); + const [response] = await client.getCmekSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCmekSettings without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.getCmekSettings = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCmekSettings( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ICmekSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCmekSettings with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCmekSettings = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getCmekSettings(request); + }, expectedError); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateCmekSettings', () => { + it('invokes updateCmekSettings without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.updateCmekSettings = stubSimpleCall( + expectedResponse + ); + const [response] = await client.updateCmekSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCmekSettings without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.updateCmekSettings = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCmekSettings( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ICmekSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCmekSettings with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCmekSettings = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateCmekSettings(request); + }, expectedError); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listBuckets', () => { + it('invokes listBuckets without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.innerApiCalls.listBuckets = stubSimpleCall(expectedResponse); + const [response] = await client.listBuckets(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuckets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBuckets without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.innerApiCalls.listBuckets = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listBuckets( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogBucket[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuckets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listBuckets with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listBuckets = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listBuckets(request); + }, expectedError); + assert( + (client.innerApiCalls.listBuckets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBucketsStream without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listBucketsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogBucket[] = []; + stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuckets, request) + ); + assert.strictEqual( + (client.descriptors.page.listBuckets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listBucketsStream with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listBucketsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogBucket[] = []; + stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuckets, request) + ); + assert.strictEqual( + (client.descriptors.page.listBuckets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listBuckets without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.logging.v2.ILogBucket[] = []; + const iterable = client.listBucketsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listBuckets with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listBucketsAsync(request); + assert.rejects(async () => { + const responses: protos.google.logging.v2.ILogBucket[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listSinks', () => { + it('invokes listSinks without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + ]; + client.innerApiCalls.listSinks = stubSimpleCall(expectedResponse); + const [response] = await client.listSinks(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listSinks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listSinks without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + ]; + client.innerApiCalls.listSinks = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listSinks( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogSink[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listSinks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listSinks with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listSinks = stubSimpleCall(undefined, expectedError); + assert.rejects(async () => { + await client.listSinks(request); + }, expectedError); + assert( + (client.innerApiCalls.listSinks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listSinksStream without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + ]; + client.descriptors.page.listSinks.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listSinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogSink[] = []; + stream.on('data', (response: protos.google.logging.v2.LogSink) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listSinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSinks, request) + ); + assert.strictEqual( + (client.descriptors.page.listSinks.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listSinksStream with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listSinks.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listSinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogSink[] = []; + stream.on('data', (response: protos.google.logging.v2.LogSink) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listSinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSinks, request) + ); + assert.strictEqual( + (client.descriptors.page.listSinks.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listSinks without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + ]; + client.descriptors.page.listSinks.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.logging.v2.ILogSink[] = []; + const iterable = client.listSinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listSinks with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listSinks.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listSinksAsync(request); + assert.rejects(async () => { + const responses: protos.google.logging.v2.ILogSink[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listExclusions', () => { + it('invokes listExclusions without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListExclusionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + ]; + client.innerApiCalls.listExclusions = stubSimpleCall(expectedResponse); + const [response] = await client.listExclusions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listExclusions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listExclusions without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListExclusionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + ]; + client.innerApiCalls.listExclusions = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listExclusions( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogExclusion[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listExclusions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listExclusions with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListExclusionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listExclusions = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listExclusions(request); + }, expectedError); + assert( + (client.innerApiCalls.listExclusions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listExclusionsStream without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListExclusionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + ]; + client.descriptors.page.listExclusions.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listExclusionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogExclusion[] = []; + stream.on('data', (response: protos.google.logging.v2.LogExclusion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listExclusions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listExclusions, request) + ); + assert.strictEqual( + (client.descriptors.page.listExclusions + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listExclusionsStream with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListExclusionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listExclusions.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listExclusionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogExclusion[] = []; + stream.on('data', (response: protos.google.logging.v2.LogExclusion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listExclusions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listExclusions, request) + ); + assert.strictEqual( + (client.descriptors.page.listExclusions + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listExclusions without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListExclusionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + ]; + client.descriptors.page.listExclusions.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.logging.v2.ILogExclusion[] = []; + const iterable = client.listExclusionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listExclusions + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listExclusions + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listExclusions with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListExclusionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listExclusions.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listExclusionsAsync(request); + assert.rejects(async () => { + const responses: protos.google.logging.v2.ILogExclusion[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listExclusions + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listExclusions + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('billingAccountCmekSettings', () => { + const fakePath = '/rendered/path/billingAccountCmekSettings'; + const expectedParameters = { + billing_account: 'billingAccountValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountCmekSettingsPath', () => { + const result = client.billingAccountCmekSettingsPath( + 'billingAccountValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { + const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountExclusion', () => { + const fakePath = '/rendered/path/billingAccountExclusion'; + const expectedParameters = { + billing_account: 'billingAccountValue', + exclusion: 'exclusionValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountExclusionPath', () => { + const result = client.billingAccountExclusionPath( + 'billingAccountValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountExclusionName', () => { + const result = client.matchBillingAccountFromBillingAccountExclusionName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromBillingAccountExclusionName', () => { + const result = client.matchExclusionFromBillingAccountExclusionName( + fakePath + ); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountLocationBucket', () => { + const fakePath = '/rendered/path/billingAccountLocationBucket'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLocationBucketPath', () => { + const result = client.billingAccountLocationBucketPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLocationBucketName', () => { + const result = client.matchBillingAccountFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBillingAccountLocationBucketName', () => { + const result = client.matchLocationFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketName', () => { + const result = client.matchBucketFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountLog', () => { + const fakePath = '/rendered/path/billingAccountLog'; + const expectedParameters = { + billing_account: 'billingAccountValue', + log: 'logValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLogPath', () => { + const result = client.billingAccountLogPath( + 'billingAccountValue', + 'logValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLogName', () => { + const result = client.matchBillingAccountFromBillingAccountLogName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromBillingAccountLogName', () => { + const result = client.matchLogFromBillingAccountLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountSink', () => { + const fakePath = '/rendered/path/billingAccountSink'; + const expectedParameters = { + billing_account: 'billingAccountValue', + sink: 'sinkValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountSinkPath', () => { + const result = client.billingAccountSinkPath( + 'billingAccountValue', + 'sinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountSinkName', () => { + const result = client.matchBillingAccountFromBillingAccountSinkName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromBillingAccountSinkName', () => { + const result = client.matchSinkFromBillingAccountSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderCmekSettings', () => { + const fakePath = '/rendered/path/folderCmekSettings'; + const expectedParameters = { + folder: 'folderValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderCmekSettingsPath', () => { + const result = client.folderCmekSettingsPath('folderValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderCmekSettingsName', () => { + const result = client.matchFolderFromFolderCmekSettingsName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderExclusion', () => { + const fakePath = '/rendered/path/folderExclusion'; + const expectedParameters = { + folder: 'folderValue', + exclusion: 'exclusionValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderExclusionPath', () => { + const result = client.folderExclusionPath( + 'folderValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderExclusionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderExclusionName', () => { + const result = client.matchFolderFromFolderExclusionName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromFolderExclusionName', () => { + const result = client.matchExclusionFromFolderExclusionName(fakePath); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderLocationBucket', () => { + const fakePath = '/rendered/path/folderLocationBucket'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketPath', () => { + const result = client.folderLocationBucketPath( + 'folderValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketName', () => { + const result = client.matchFolderFromFolderLocationBucketName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketName', () => { + const result = client.matchLocationFromFolderLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketName', () => { + const result = client.matchBucketFromFolderLocationBucketName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderLog', () => { + const fakePath = '/rendered/path/folderLog'; + const expectedParameters = { + folder: 'folderValue', + log: 'logValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLogPath', () => { + const result = client.folderLogPath('folderValue', 'logValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLogName', () => { + const result = client.matchFolderFromFolderLogName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromFolderLogName', () => { + const result = client.matchLogFromFolderLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.folderLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderSink', () => { + const fakePath = '/rendered/path/folderSink'; + const expectedParameters = { + folder: 'folderValue', + sink: 'sinkValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderSinkPath', () => { + const result = client.folderSinkPath('folderValue', 'sinkValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderSinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderSinkName', () => { + const result = client.matchFolderFromFolderSinkName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromFolderSinkName', () => { + const result = client.matchSinkFromFolderSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('logMetric', () => { + const fakePath = '/rendered/path/logMetric'; + const expectedParameters = { + project: 'projectValue', + metric: 'metricValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.logMetricPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.logMetricPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('logMetricPath', () => { + const result = client.logMetricPath('projectValue', 'metricValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.logMetricPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLogMetricName', () => { + const result = client.matchProjectFromLogMetricName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.logMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetricFromLogMetricName', () => { + const result = client.matchMetricFromLogMetricName(fakePath); + assert.strictEqual(result, 'metricValue'); + assert( + (client.pathTemplates.logMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationCmekSettings', () => { + const fakePath = '/rendered/path/organizationCmekSettings'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationCmekSettingsPath', () => { + const result = client.organizationCmekSettingsPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationCmekSettingsName', () => { + const result = client.matchOrganizationFromOrganizationCmekSettingsName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationExclusion', () => { + const fakePath = '/rendered/path/organizationExclusion'; + const expectedParameters = { + organization: 'organizationValue', + exclusion: 'exclusionValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationExclusionPath', () => { + const result = client.organizationExclusionPath( + 'organizationValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationExclusionName', () => { + const result = client.matchOrganizationFromOrganizationExclusionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromOrganizationExclusionName', () => { + const result = client.matchExclusionFromOrganizationExclusionName( + fakePath + ); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLocationBucket', () => { + const fakePath = '/rendered/path/organizationLocationBucket'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLocationBucketPath', () => { + const result = client.organizationLocationBucketPath( + 'organizationValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketName', () => { + const result = client.matchOrganizationFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketName', () => { + const result = client.matchLocationFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketName', () => { + const result = client.matchBucketFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLog', () => { + const fakePath = '/rendered/path/organizationLog'; + const expectedParameters = { + organization: 'organizationValue', + log: 'logValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLogPath', () => { + const result = client.organizationLogPath( + 'organizationValue', + 'logValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLogName', () => { + const result = client.matchOrganizationFromOrganizationLogName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromOrganizationLogName', () => { + const result = client.matchLogFromOrganizationLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationSink', () => { + const fakePath = '/rendered/path/organizationSink'; + const expectedParameters = { + organization: 'organizationValue', + sink: 'sinkValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationSinkPath', () => { + const result = client.organizationSinkPath( + 'organizationValue', + 'sinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationSinkPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationSinkName', () => { + const result = client.matchOrganizationFromOrganizationSinkName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromOrganizationSinkName', () => { + const result = client.matchSinkFromOrganizationSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectCmekSettings', () => { + const fakePath = '/rendered/path/projectCmekSettings'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectCmekSettingsPath', () => { + const result = client.projectCmekSettingsPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectCmekSettingsName', () => { + const result = client.matchProjectFromProjectCmekSettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectExclusion', () => { + const fakePath = '/rendered/path/projectExclusion'; + const expectedParameters = { + project: 'projectValue', + exclusion: 'exclusionValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectExclusionPath', () => { + const result = client.projectExclusionPath( + 'projectValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectExclusionName', () => { + const result = client.matchProjectFromProjectExclusionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromProjectExclusionName', () => { + const result = client.matchExclusionFromProjectExclusionName(fakePath); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationBucket', () => { + const fakePath = '/rendered/path/projectLocationBucket'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketPath', () => { + const result = client.projectLocationBucketPath( + 'projectValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketName', () => { + const result = client.matchProjectFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketName', () => { + const result = client.matchLocationFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketName', () => { + const result = client.matchBucketFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLog', () => { + const fakePath = '/rendered/path/projectLog'; + const expectedParameters = { + project: 'projectValue', + log: 'logValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLogPath', () => { + const result = client.projectLogPath('projectValue', 'logValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLogName', () => { + const result = client.matchProjectFromProjectLogName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromProjectLogName', () => { + const result = client.matchLogFromProjectLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.projectLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectSink', () => { + const fakePath = '/rendered/path/projectSink'; + const expectedParameters = { + project: 'projectValue', + sink: 'sinkValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectSinkPath', () => { + const result = client.projectSinkPath('projectValue', 'sinkValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectSinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectSinkName', () => { + const result = client.matchProjectFromProjectSinkName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromProjectSinkName', () => { + const result = client.matchSinkFromProjectSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts new file mode 100644 index 00000000000..f4e3230a23d --- /dev/null +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -0,0 +1,2352 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as loggingservicev2Module from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2.LoggingServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = + loggingservicev2Module.v2.LoggingServiceV2Client.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + loggingservicev2Module.v2.LoggingServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = loggingservicev2Module.v2.LoggingServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.loggingServiceV2Stub, undefined); + await client.initialize(); + assert(client.loggingServiceV2Stub); + }); + + it('has close method', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('deleteLog', () => { + it('invokes deleteLog without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLogRequest() + ); + request.logName = ''; + const expectedHeaderRequestParams = 'log_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteLog = stubSimpleCall(expectedResponse); + const [response] = await client.deleteLog(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteLog as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteLog without error using callback', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLogRequest() + ); + request.logName = ''; + const expectedHeaderRequestParams = 'log_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteLog = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteLog( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteLog as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteLog with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLogRequest() + ); + request.logName = ''; + const expectedHeaderRequestParams = 'log_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLog = stubSimpleCall(undefined, expectedError); + assert.rejects(async () => { + await client.deleteLog(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteLog as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('writeLogEntries', () => { + it('invokes writeLogEntries without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.WriteLogEntriesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.WriteLogEntriesResponse() + ); + client.innerApiCalls.writeLogEntries = stubSimpleCall(expectedResponse); + const [response] = await client.writeLogEntries(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.writeLogEntries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes writeLogEntries without error using callback', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.WriteLogEntriesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.WriteLogEntriesResponse() + ); + client.innerApiCalls.writeLogEntries = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.writeLogEntries( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.IWriteLogEntriesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.writeLogEntries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes writeLogEntries with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.WriteLogEntriesRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.writeLogEntries = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.writeLogEntries(request); + }, expectedError); + assert( + (client.innerApiCalls.writeLogEntries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listLogEntries', () => { + it('invokes listLogEntries without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogEntriesRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + ]; + client.innerApiCalls.listLogEntries = stubSimpleCall(expectedResponse); + const [response] = await client.listLogEntries(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLogEntries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLogEntries without error using callback', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogEntriesRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + ]; + client.innerApiCalls.listLogEntries = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listLogEntries( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogEntry[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLogEntries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLogEntries with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogEntriesRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.listLogEntries = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listLogEntries(request); + }, expectedError); + assert( + (client.innerApiCalls.listLogEntries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLogEntriesStream without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogEntriesRequest() + ); + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + ]; + client.descriptors.page.listLogEntries.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listLogEntriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogEntry[] = []; + stream.on('data', (response: protos.google.logging.v2.LogEntry) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLogEntries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLogEntries, request) + ); + }); + + it('invokes listLogEntriesStream with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogEntriesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listLogEntries.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listLogEntriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogEntry[] = []; + stream.on('data', (response: protos.google.logging.v2.LogEntry) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listLogEntries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLogEntries, request) + ); + }); + + it('uses async iteration with listLogEntries without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogEntriesRequest() + ); + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + generateSampleMessage(new protos.google.logging.v2.LogEntry()), + ]; + client.descriptors.page.listLogEntries.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.logging.v2.ILogEntry[] = []; + const iterable = client.listLogEntriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listLogEntries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listLogEntries with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogEntriesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listLogEntries.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listLogEntriesAsync(request); + assert.rejects(async () => { + const responses: protos.google.logging.v2.ILogEntry[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listLogEntries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + }); + + describe('listMonitoredResourceDescriptors', () => { + it('invokes listMonitoredResourceDescriptors without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + ]; + client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listMonitoredResourceDescriptors(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listMonitoredResourceDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listMonitoredResourceDescriptors without error using callback', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + ]; + client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listMonitoredResourceDescriptors( + request, + ( + err?: Error | null, + result?: protos.google.api.IMonitoredResourceDescriptor[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listMonitoredResourceDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listMonitoredResourceDescriptors with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listMonitoredResourceDescriptors(request); + }, expectedError); + assert( + (client.innerApiCalls.listMonitoredResourceDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listMonitoredResourceDescriptorsStream without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + ]; + client.descriptors.page.listMonitoredResourceDescriptors.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listMonitoredResourceDescriptorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.MonitoredResourceDescriptor[] = []; + stream.on( + 'data', + (response: protos.google.api.MonitoredResourceDescriptor) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listMonitoredResourceDescriptors + .createStream as SinonStub) + .getCall(0) + .calledWith( + client.innerApiCalls.listMonitoredResourceDescriptors, + request + ) + ); + }); + + it('invokes listMonitoredResourceDescriptorsStream with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listMonitoredResourceDescriptors.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listMonitoredResourceDescriptorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.MonitoredResourceDescriptor[] = []; + stream.on( + 'data', + (response: protos.google.api.MonitoredResourceDescriptor) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listMonitoredResourceDescriptors + .createStream as SinonStub) + .getCall(0) + .calledWith( + client.innerApiCalls.listMonitoredResourceDescriptors, + request + ) + ); + }); + + it('uses async iteration with listMonitoredResourceDescriptors without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ), + ]; + client.descriptors.page.listMonitoredResourceDescriptors.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.api.IMonitoredResourceDescriptor[] = []; + const iterable = client.listMonitoredResourceDescriptorsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMonitoredResourceDescriptors + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listMonitoredResourceDescriptors with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listMonitoredResourceDescriptors.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listMonitoredResourceDescriptorsAsync(request); + assert.rejects(async () => { + const responses: protos.google.api.IMonitoredResourceDescriptor[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMonitoredResourceDescriptors + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + }); + + describe('listLogs', () => { + it('invokes listLogs without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = ['', '', '']; + client.innerApiCalls.listLogs = stubSimpleCall(expectedResponse); + const [response] = await client.listLogs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLogs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLogs without error using callback', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = ['', '', '']; + client.innerApiCalls.listLogs = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listLogs( + request, + (err?: Error | null, result?: string[] | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLogs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLogs with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listLogs = stubSimpleCall(undefined, expectedError); + assert.rejects(async () => { + await client.listLogs(request); + }, expectedError); + assert( + (client.innerApiCalls.listLogs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLogsStream without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = ['', '', '']; + client.descriptors.page.listLogs.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listLogsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING[] = []; + stream.on( + 'data', + ( + response: protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLogs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLogs, request) + ); + assert.strictEqual( + (client.descriptors.page.listLogs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listLogsStream with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLogs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listLogsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING[] = []; + stream.on( + 'data', + ( + response: protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listLogs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLogs, request) + ); + assert.strictEqual( + (client.descriptors.page.listLogs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLogs without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = ['', '', '']; + client.descriptors.page.listLogs.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: string[] = []; + const iterable = client.listLogsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listLogs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLogs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLogs with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLogs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listLogsAsync(request); + assert.rejects(async () => { + const responses: string[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listLogs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLogs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('billingAccountCmekSettings', () => { + const fakePath = '/rendered/path/billingAccountCmekSettings'; + const expectedParameters = { + billing_account: 'billingAccountValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountCmekSettingsPath', () => { + const result = client.billingAccountCmekSettingsPath( + 'billingAccountValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { + const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountExclusion', () => { + const fakePath = '/rendered/path/billingAccountExclusion'; + const expectedParameters = { + billing_account: 'billingAccountValue', + exclusion: 'exclusionValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountExclusionPath', () => { + const result = client.billingAccountExclusionPath( + 'billingAccountValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountExclusionName', () => { + const result = client.matchBillingAccountFromBillingAccountExclusionName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromBillingAccountExclusionName', () => { + const result = client.matchExclusionFromBillingAccountExclusionName( + fakePath + ); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountLocationBucket', () => { + const fakePath = '/rendered/path/billingAccountLocationBucket'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLocationBucketPath', () => { + const result = client.billingAccountLocationBucketPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLocationBucketName', () => { + const result = client.matchBillingAccountFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBillingAccountLocationBucketName', () => { + const result = client.matchLocationFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketName', () => { + const result = client.matchBucketFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountLog', () => { + const fakePath = '/rendered/path/billingAccountLog'; + const expectedParameters = { + billing_account: 'billingAccountValue', + log: 'logValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLogPath', () => { + const result = client.billingAccountLogPath( + 'billingAccountValue', + 'logValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLogName', () => { + const result = client.matchBillingAccountFromBillingAccountLogName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromBillingAccountLogName', () => { + const result = client.matchLogFromBillingAccountLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountSink', () => { + const fakePath = '/rendered/path/billingAccountSink'; + const expectedParameters = { + billing_account: 'billingAccountValue', + sink: 'sinkValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountSinkPath', () => { + const result = client.billingAccountSinkPath( + 'billingAccountValue', + 'sinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountSinkName', () => { + const result = client.matchBillingAccountFromBillingAccountSinkName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromBillingAccountSinkName', () => { + const result = client.matchSinkFromBillingAccountSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderCmekSettings', () => { + const fakePath = '/rendered/path/folderCmekSettings'; + const expectedParameters = { + folder: 'folderValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderCmekSettingsPath', () => { + const result = client.folderCmekSettingsPath('folderValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderCmekSettingsName', () => { + const result = client.matchFolderFromFolderCmekSettingsName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderExclusion', () => { + const fakePath = '/rendered/path/folderExclusion'; + const expectedParameters = { + folder: 'folderValue', + exclusion: 'exclusionValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderExclusionPath', () => { + const result = client.folderExclusionPath( + 'folderValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderExclusionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderExclusionName', () => { + const result = client.matchFolderFromFolderExclusionName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromFolderExclusionName', () => { + const result = client.matchExclusionFromFolderExclusionName(fakePath); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderLocationBucket', () => { + const fakePath = '/rendered/path/folderLocationBucket'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketPath', () => { + const result = client.folderLocationBucketPath( + 'folderValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketName', () => { + const result = client.matchFolderFromFolderLocationBucketName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketName', () => { + const result = client.matchLocationFromFolderLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketName', () => { + const result = client.matchBucketFromFolderLocationBucketName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderLog', () => { + const fakePath = '/rendered/path/folderLog'; + const expectedParameters = { + folder: 'folderValue', + log: 'logValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLogPath', () => { + const result = client.folderLogPath('folderValue', 'logValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLogName', () => { + const result = client.matchFolderFromFolderLogName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromFolderLogName', () => { + const result = client.matchLogFromFolderLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.folderLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderSink', () => { + const fakePath = '/rendered/path/folderSink'; + const expectedParameters = { + folder: 'folderValue', + sink: 'sinkValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderSinkPath', () => { + const result = client.folderSinkPath('folderValue', 'sinkValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderSinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderSinkName', () => { + const result = client.matchFolderFromFolderSinkName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromFolderSinkName', () => { + const result = client.matchSinkFromFolderSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('logMetric', () => { + const fakePath = '/rendered/path/logMetric'; + const expectedParameters = { + project: 'projectValue', + metric: 'metricValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.logMetricPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.logMetricPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('logMetricPath', () => { + const result = client.logMetricPath('projectValue', 'metricValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.logMetricPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLogMetricName', () => { + const result = client.matchProjectFromLogMetricName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.logMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetricFromLogMetricName', () => { + const result = client.matchMetricFromLogMetricName(fakePath); + assert.strictEqual(result, 'metricValue'); + assert( + (client.pathTemplates.logMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationCmekSettings', () => { + const fakePath = '/rendered/path/organizationCmekSettings'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationCmekSettingsPath', () => { + const result = client.organizationCmekSettingsPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationCmekSettingsName', () => { + const result = client.matchOrganizationFromOrganizationCmekSettingsName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationExclusion', () => { + const fakePath = '/rendered/path/organizationExclusion'; + const expectedParameters = { + organization: 'organizationValue', + exclusion: 'exclusionValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationExclusionPath', () => { + const result = client.organizationExclusionPath( + 'organizationValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationExclusionName', () => { + const result = client.matchOrganizationFromOrganizationExclusionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromOrganizationExclusionName', () => { + const result = client.matchExclusionFromOrganizationExclusionName( + fakePath + ); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLocationBucket', () => { + const fakePath = '/rendered/path/organizationLocationBucket'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLocationBucketPath', () => { + const result = client.organizationLocationBucketPath( + 'organizationValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketName', () => { + const result = client.matchOrganizationFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketName', () => { + const result = client.matchLocationFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketName', () => { + const result = client.matchBucketFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLog', () => { + const fakePath = '/rendered/path/organizationLog'; + const expectedParameters = { + organization: 'organizationValue', + log: 'logValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLogPath', () => { + const result = client.organizationLogPath( + 'organizationValue', + 'logValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLogName', () => { + const result = client.matchOrganizationFromOrganizationLogName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromOrganizationLogName', () => { + const result = client.matchLogFromOrganizationLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationSink', () => { + const fakePath = '/rendered/path/organizationSink'; + const expectedParameters = { + organization: 'organizationValue', + sink: 'sinkValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationSinkPath', () => { + const result = client.organizationSinkPath( + 'organizationValue', + 'sinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationSinkPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationSinkName', () => { + const result = client.matchOrganizationFromOrganizationSinkName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromOrganizationSinkName', () => { + const result = client.matchSinkFromOrganizationSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectCmekSettings', () => { + const fakePath = '/rendered/path/projectCmekSettings'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectCmekSettingsPath', () => { + const result = client.projectCmekSettingsPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectCmekSettingsName', () => { + const result = client.matchProjectFromProjectCmekSettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectExclusion', () => { + const fakePath = '/rendered/path/projectExclusion'; + const expectedParameters = { + project: 'projectValue', + exclusion: 'exclusionValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectExclusionPath', () => { + const result = client.projectExclusionPath( + 'projectValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectExclusionName', () => { + const result = client.matchProjectFromProjectExclusionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromProjectExclusionName', () => { + const result = client.matchExclusionFromProjectExclusionName(fakePath); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationBucket', () => { + const fakePath = '/rendered/path/projectLocationBucket'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketPath', () => { + const result = client.projectLocationBucketPath( + 'projectValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketName', () => { + const result = client.matchProjectFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketName', () => { + const result = client.matchLocationFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketName', () => { + const result = client.matchBucketFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLog', () => { + const fakePath = '/rendered/path/projectLog'; + const expectedParameters = { + project: 'projectValue', + log: 'logValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLogPath', () => { + const result = client.projectLogPath('projectValue', 'logValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLogName', () => { + const result = client.matchProjectFromProjectLogName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromProjectLogName', () => { + const result = client.matchLogFromProjectLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.projectLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectSink', () => { + const fakePath = '/rendered/path/projectSink'; + const expectedParameters = { + project: 'projectValue', + sink: 'sinkValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectSinkPath', () => { + const result = client.projectSinkPath('projectValue', 'sinkValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectSinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectSinkName', () => { + const result = client.matchProjectFromProjectSinkName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromProjectSinkName', () => { + const result = client.matchSinkFromProjectSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts new file mode 100644 index 00000000000..ce38ec6f1f6 --- /dev/null +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -0,0 +1,2131 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as metricsservicev2Module from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2.MetricsServiceV2Client', () => { + it('has servicePath', () => { + const servicePath = + metricsservicev2Module.v2.MetricsServiceV2Client.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + metricsservicev2Module.v2.MetricsServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = metricsservicev2Module.v2.MetricsServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metricsServiceV2Stub, undefined); + await client.initialize(); + assert(client.metricsServiceV2Stub); + }); + + it('has close method', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getLogMetric', () => { + it('invokes getLogMetric without error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogMetric() + ); + client.innerApiCalls.getLogMetric = stubSimpleCall(expectedResponse); + const [response] = await client.getLogMetric(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getLogMetric without error using callback', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogMetric() + ); + client.innerApiCalls.getLogMetric = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getLogMetric( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getLogMetric with error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getLogMetric = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getLogMetric(request); + }, expectedError); + assert( + (client.innerApiCalls.getLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createLogMetric', () => { + it('invokes createLogMetric without error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateLogMetricRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogMetric() + ); + client.innerApiCalls.createLogMetric = stubSimpleCall(expectedResponse); + const [response] = await client.createLogMetric(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createLogMetric without error using callback', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateLogMetricRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogMetric() + ); + client.innerApiCalls.createLogMetric = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createLogMetric( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createLogMetric with error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateLogMetricRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createLogMetric = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createLogMetric(request); + }, expectedError); + assert( + (client.innerApiCalls.createLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateLogMetric', () => { + it('invokes updateLogMetric without error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogMetric() + ); + client.innerApiCalls.updateLogMetric = stubSimpleCall(expectedResponse); + const [response] = await client.updateLogMetric(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateLogMetric without error using callback', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogMetric() + ); + client.innerApiCalls.updateLogMetric = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateLogMetric( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateLogMetric with error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLogMetric = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateLogMetric(request); + }, expectedError); + assert( + (client.innerApiCalls.updateLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteLogMetric', () => { + it('invokes deleteLogMetric without error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteLogMetric = stubSimpleCall(expectedResponse); + const [response] = await client.deleteLogMetric(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteLogMetric without error using callback', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteLogMetric = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteLogMetric( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteLogMetric with error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLogMetric = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteLogMetric(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteLogMetric as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listLogMetrics', () => { + it('invokes listLogMetrics without error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogMetricsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + ]; + client.innerApiCalls.listLogMetrics = stubSimpleCall(expectedResponse); + const [response] = await client.listLogMetrics(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLogMetrics as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLogMetrics without error using callback', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogMetricsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + ]; + client.innerApiCalls.listLogMetrics = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listLogMetrics( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogMetric[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLogMetrics as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLogMetrics with error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogMetricsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listLogMetrics = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listLogMetrics(request); + }, expectedError); + assert( + (client.innerApiCalls.listLogMetrics as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLogMetricsStream without error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogMetricsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + ]; + client.descriptors.page.listLogMetrics.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listLogMetricsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogMetric[] = []; + stream.on('data', (response: protos.google.logging.v2.LogMetric) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLogMetrics.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLogMetrics, request) + ); + assert.strictEqual( + (client.descriptors.page.listLogMetrics + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listLogMetricsStream with error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogMetricsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLogMetrics.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listLogMetricsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogMetric[] = []; + stream.on('data', (response: protos.google.logging.v2.LogMetric) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listLogMetrics.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLogMetrics, request) + ); + assert.strictEqual( + (client.descriptors.page.listLogMetrics + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLogMetrics without error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogMetricsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + generateSampleMessage(new protos.google.logging.v2.LogMetric()), + ]; + client.descriptors.page.listLogMetrics.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.logging.v2.ILogMetric[] = []; + const iterable = client.listLogMetricsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listLogMetrics + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLogMetrics + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLogMetrics with error', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListLogMetricsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLogMetrics.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listLogMetricsAsync(request); + assert.rejects(async () => { + const responses: protos.google.logging.v2.ILogMetric[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listLogMetrics + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLogMetrics + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('billingAccountCmekSettings', () => { + const fakePath = '/rendered/path/billingAccountCmekSettings'; + const expectedParameters = { + billing_account: 'billingAccountValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountCmekSettingsPath', () => { + const result = client.billingAccountCmekSettingsPath( + 'billingAccountValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { + const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountExclusion', () => { + const fakePath = '/rendered/path/billingAccountExclusion'; + const expectedParameters = { + billing_account: 'billingAccountValue', + exclusion: 'exclusionValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountExclusionPath', () => { + const result = client.billingAccountExclusionPath( + 'billingAccountValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountExclusionName', () => { + const result = client.matchBillingAccountFromBillingAccountExclusionName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromBillingAccountExclusionName', () => { + const result = client.matchExclusionFromBillingAccountExclusionName( + fakePath + ); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountLocationBucket', () => { + const fakePath = '/rendered/path/billingAccountLocationBucket'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLocationBucketPath', () => { + const result = client.billingAccountLocationBucketPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLocationBucketName', () => { + const result = client.matchBillingAccountFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBillingAccountLocationBucketName', () => { + const result = client.matchLocationFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketName', () => { + const result = client.matchBucketFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountLog', () => { + const fakePath = '/rendered/path/billingAccountLog'; + const expectedParameters = { + billing_account: 'billingAccountValue', + log: 'logValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLogPath', () => { + const result = client.billingAccountLogPath( + 'billingAccountValue', + 'logValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLogName', () => { + const result = client.matchBillingAccountFromBillingAccountLogName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromBillingAccountLogName', () => { + const result = client.matchLogFromBillingAccountLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountSink', () => { + const fakePath = '/rendered/path/billingAccountSink'; + const expectedParameters = { + billing_account: 'billingAccountValue', + sink: 'sinkValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountSinkPath', () => { + const result = client.billingAccountSinkPath( + 'billingAccountValue', + 'sinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountSinkName', () => { + const result = client.matchBillingAccountFromBillingAccountSinkName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromBillingAccountSinkName', () => { + const result = client.matchSinkFromBillingAccountSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderCmekSettings', () => { + const fakePath = '/rendered/path/folderCmekSettings'; + const expectedParameters = { + folder: 'folderValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderCmekSettingsPath', () => { + const result = client.folderCmekSettingsPath('folderValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderCmekSettingsName', () => { + const result = client.matchFolderFromFolderCmekSettingsName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderExclusion', () => { + const fakePath = '/rendered/path/folderExclusion'; + const expectedParameters = { + folder: 'folderValue', + exclusion: 'exclusionValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderExclusionPath', () => { + const result = client.folderExclusionPath( + 'folderValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderExclusionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderExclusionName', () => { + const result = client.matchFolderFromFolderExclusionName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromFolderExclusionName', () => { + const result = client.matchExclusionFromFolderExclusionName(fakePath); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderLocationBucket', () => { + const fakePath = '/rendered/path/folderLocationBucket'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketPath', () => { + const result = client.folderLocationBucketPath( + 'folderValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketName', () => { + const result = client.matchFolderFromFolderLocationBucketName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketName', () => { + const result = client.matchLocationFromFolderLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketName', () => { + const result = client.matchBucketFromFolderLocationBucketName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderLog', () => { + const fakePath = '/rendered/path/folderLog'; + const expectedParameters = { + folder: 'folderValue', + log: 'logValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLogPath', () => { + const result = client.folderLogPath('folderValue', 'logValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLogName', () => { + const result = client.matchFolderFromFolderLogName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromFolderLogName', () => { + const result = client.matchLogFromFolderLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.folderLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderSink', () => { + const fakePath = '/rendered/path/folderSink'; + const expectedParameters = { + folder: 'folderValue', + sink: 'sinkValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderSinkPath', () => { + const result = client.folderSinkPath('folderValue', 'sinkValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderSinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderSinkName', () => { + const result = client.matchFolderFromFolderSinkName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromFolderSinkName', () => { + const result = client.matchSinkFromFolderSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('logMetric', () => { + const fakePath = '/rendered/path/logMetric'; + const expectedParameters = { + project: 'projectValue', + metric: 'metricValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.logMetricPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.logMetricPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('logMetricPath', () => { + const result = client.logMetricPath('projectValue', 'metricValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.logMetricPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLogMetricName', () => { + const result = client.matchProjectFromLogMetricName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.logMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetricFromLogMetricName', () => { + const result = client.matchMetricFromLogMetricName(fakePath); + assert.strictEqual(result, 'metricValue'); + assert( + (client.pathTemplates.logMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationCmekSettings', () => { + const fakePath = '/rendered/path/organizationCmekSettings'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationCmekSettingsPath', () => { + const result = client.organizationCmekSettingsPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationCmekSettingsName', () => { + const result = client.matchOrganizationFromOrganizationCmekSettingsName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationExclusion', () => { + const fakePath = '/rendered/path/organizationExclusion'; + const expectedParameters = { + organization: 'organizationValue', + exclusion: 'exclusionValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationExclusionPath', () => { + const result = client.organizationExclusionPath( + 'organizationValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationExclusionName', () => { + const result = client.matchOrganizationFromOrganizationExclusionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromOrganizationExclusionName', () => { + const result = client.matchExclusionFromOrganizationExclusionName( + fakePath + ); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLocationBucket', () => { + const fakePath = '/rendered/path/organizationLocationBucket'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLocationBucketPath', () => { + const result = client.organizationLocationBucketPath( + 'organizationValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketName', () => { + const result = client.matchOrganizationFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketName', () => { + const result = client.matchLocationFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketName', () => { + const result = client.matchBucketFromOrganizationLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLog', () => { + const fakePath = '/rendered/path/organizationLog'; + const expectedParameters = { + organization: 'organizationValue', + log: 'logValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLogPath', () => { + const result = client.organizationLogPath( + 'organizationValue', + 'logValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLogName', () => { + const result = client.matchOrganizationFromOrganizationLogName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromOrganizationLogName', () => { + const result = client.matchLogFromOrganizationLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationSink', () => { + const fakePath = '/rendered/path/organizationSink'; + const expectedParameters = { + organization: 'organizationValue', + sink: 'sinkValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationSinkPath', () => { + const result = client.organizationSinkPath( + 'organizationValue', + 'sinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationSinkPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationSinkName', () => { + const result = client.matchOrganizationFromOrganizationSinkName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromOrganizationSinkName', () => { + const result = client.matchSinkFromOrganizationSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectCmekSettings', () => { + const fakePath = '/rendered/path/projectCmekSettings'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectCmekSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectCmekSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectCmekSettingsPath', () => { + const result = client.projectCmekSettingsPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectCmekSettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectCmekSettingsName', () => { + const result = client.matchProjectFromProjectCmekSettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectCmekSettingsPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectExclusion', () => { + const fakePath = '/rendered/path/projectExclusion'; + const expectedParameters = { + project: 'projectValue', + exclusion: 'exclusionValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectExclusionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectExclusionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectExclusionPath', () => { + const result = client.projectExclusionPath( + 'projectValue', + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectExclusionName', () => { + const result = client.matchProjectFromProjectExclusionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromProjectExclusionName', () => { + const result = client.matchExclusionFromProjectExclusionName(fakePath); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationBucket', () => { + const fakePath = '/rendered/path/projectLocationBucket'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketPath', () => { + const result = client.projectLocationBucketPath( + 'projectValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketName', () => { + const result = client.matchProjectFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketName', () => { + const result = client.matchLocationFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketName', () => { + const result = client.matchBucketFromProjectLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLog', () => { + const fakePath = '/rendered/path/projectLog'; + const expectedParameters = { + project: 'projectValue', + log: 'logValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLogPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLogPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLogPath', () => { + const result = client.projectLogPath('projectValue', 'logValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLogPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLogName', () => { + const result = client.matchProjectFromProjectLogName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLogFromProjectLogName', () => { + const result = client.matchLogFromProjectLogName(fakePath); + assert.strictEqual(result, 'logValue'); + assert( + (client.pathTemplates.projectLogPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectSink', () => { + const fakePath = '/rendered/path/projectSink'; + const expectedParameters = { + project: 'projectValue', + sink: 'sinkValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectSinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectSinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectSinkPath', () => { + const result = client.projectSinkPath('projectValue', 'sinkValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectSinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectSinkName', () => { + const result = client.matchProjectFromProjectSinkName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSinkFromProjectSinkName', () => { + const result = client.matchSinkFromProjectSinkName(fakePath); + assert.strictEqual(result, 'sinkValue'); + assert( + (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index d76114f5fda..b748f490d4b 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -16,7 +16,7 @@ import {util} from '@google-cloud/common'; import {CallbackifyAllOptions} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as assert from 'assert'; -import {describe, it} from 'mocha'; +import {describe, it, beforeEach, before} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as through from 'through2'; @@ -35,6 +35,7 @@ import {GetEntriesRequest} from '../src/log'; import {Dataset} from '@google-cloud/bigquery'; import {Bucket} from '@google-cloud/storage'; +// eslint-disable-next-line @typescript-eslint/no-var-requires const {v2} = require('../src'); const version = require('../../package.json').version; @@ -63,6 +64,7 @@ const fakePaginator = { let googleAuthOverride: Function | null; function fakeGoogleAuth() { + // eslint-disable-next-line prefer-spread,prefer-rest-params return (googleAuthOverride || noop).apply(null, arguments); } @@ -72,6 +74,7 @@ let replaceProjectIdTokenOverride: Function | null; const fakeUtil = extend({}, util, { isCustomType() { if (isCustomTypeOverride) { + // eslint-disable-next-line prefer-spread,prefer-rest-params return isCustomTypeOverride.apply(null, arguments); } return false; @@ -89,6 +92,7 @@ const fakeCallbackify = { const fakeProjectify = { replaceProjectIdToken(reqOpts: {}) { if (replaceProjectIdTokenOverride) { + // eslint-disable-next-line prefer-spread,prefer-rest-params return replaceProjectIdTokenOverride.apply(null, arguments); } return reqOpts; @@ -102,9 +106,11 @@ function fakeV2() {} class FakeEntry { calledWith_: IArguments; constructor() { + // eslint-disable-next-line prefer-rest-params this.calledWith_ = arguments; } static fromApiResponse_() { + // eslint-disable-next-line prefer-rest-params return arguments; } } @@ -112,6 +118,7 @@ class FakeEntry { class FakeLog { calledWith_: IArguments; constructor() { + // eslint-disable-next-line prefer-rest-params this.calledWith_ = arguments; } } @@ -119,12 +126,12 @@ class FakeLog { class FakeSink { calledWith_: IArguments; constructor() { + // eslint-disable-next-line prefer-rest-params this.calledWith_ = arguments; } } describe('Logging', () => { - // tslint:disable-next-line variable-name let Logging: typeof LOGGING; let logging: LOGGING; @@ -256,7 +263,7 @@ describe('Logging', () => { it('should throw if a name is not provided', () => { const error = new Error('A sink name must be provided.'); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (logging as any).createSink().then(noop, (err: Error) => { assert.deepStrictEqual(err, error); }); @@ -264,7 +271,7 @@ describe('Logging', () => { it('should throw if a config object is not provided', () => { const error = new Error('A sink configuration object must be provided.'); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (logging as any).createSink(SINK_NAME).then(noop, (err: Error) => { assert.deepStrictEqual(err, error); }); @@ -339,7 +346,7 @@ describe('Logging', () => { }); logging.configService.createSink = async ( - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, gaxOpts: {} ) => { @@ -360,8 +367,9 @@ describe('Logging', () => { }; logging.configService.createSink = async ( - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, + // eslint-disable-next-line @typescript-eslint/no-unused-vars gaxOpts: {} ) => { assert.strictEqual( @@ -383,7 +391,7 @@ describe('Logging', () => { } as {}) as CreateSinkRequest; logging.configService.createSink = async ( - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, gaxOpts: {} ) => { @@ -456,7 +464,7 @@ describe('Logging', () => { const DATA = {}; it('should return an Entry object', () => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const entry = logging.entry(RESOURCE, DATA) as any; assert(entry instanceof FakeEntry); assert.strictEqual(entry.calledWith_[0], RESOURCE); @@ -517,7 +525,7 @@ describe('Logging', () => { resourceNames: ['projects/' + logging.projectId], }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any logging.loggingService.listLogEntries = async (reqOpts: any) => { assert.deepStrictEqual(reqOpts.resourceNames, [ 'projects/' + logging.projectId, @@ -533,7 +541,7 @@ describe('Logging', () => { orderBy: 'timestamp asc', }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any logging.loggingService.listLogEntries = async (reqOpts: any) => { assert.deepStrictEqual(reqOpts.orderBy, options.orderBy); return [[]]; @@ -552,7 +560,7 @@ describe('Logging', () => { }; logging.loggingService.listLogEntries = async ( - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, gaxOpts: {} ) => { @@ -761,11 +769,11 @@ describe('Logging', () => { logging.setProjectId = async () => { return done(new Error('Should not have gotten project ID')); }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).GCLOUD_SANDBOX_ENV = true; const stream = logging.getEntriesStream(OPTIONS); stream.emit('reading'); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete (global as any).GCLOUD_SANDBOX_ENV; assert(stream instanceof require('stream')); done(); @@ -1023,7 +1031,7 @@ describe('Logging', () => { }); describe('success', () => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const ARGS: any = [ [ { @@ -1127,11 +1135,11 @@ describe('Logging', () => { logging.setProjectId = async () => { return done(new Error('Should not have gotten project ID')); }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).GCLOUD_SANDBOX_ENV = true; const stream = logging.getSinksStream(OPTIONS); stream.emit('reading'); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete (global as any).GCLOUD_SANDBOX_ENV; assert(stream instanceof require('stream')); done(); @@ -1170,7 +1178,7 @@ describe('Logging', () => { const NAME = 'log-name'; it('should return a Log object', () => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const log = logging.log(NAME) as any; assert(log instanceof FakeLog); assert.strictEqual(log.calledWith_[0], logging); @@ -1198,7 +1206,7 @@ describe('Logging', () => { }, }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (logging.api as any)[CONFIG.client] = { [CONFIG.method]: noop, }; @@ -1238,7 +1246,7 @@ describe('Logging', () => { const fakeClient = { [CONFIG.method]: noop, }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (fakeV2 as any)[CONFIG.client] = class { constructor(options: {}) { assert.strictEqual(options, logging.options); @@ -1251,7 +1259,7 @@ describe('Logging', () => { }); it('should use the cached client', done => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (fakeV2 as any)[CONFIG.client] = () => { done(new Error('Should not re-instantiate a GAX client.')); }; @@ -1268,7 +1276,7 @@ describe('Logging', () => { return replacedReqOpts; }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (logging.api as any)[CONFIG.client][CONFIG.method] = { bind(gaxClient: {}, reqOpts: {}) { assert.strictEqual(reqOpts, replacedReqOpts); @@ -1286,10 +1294,10 @@ describe('Logging', () => { (logging.auth.getProjectId as Function) = () => { done(new Error('Should not have gotten project ID.')); }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).GCLOUD_SANDBOX_ENV = true; const returnValue = logging.request(CONFIG, assert.ifError); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete (global as any).GCLOUD_SANDBOX_ENV; assert.strictEqual(returnValue, undefined); @@ -1297,7 +1305,7 @@ describe('Logging', () => { }); it('should prepare the request', done => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (logging.api as any)[CONFIG.client][CONFIG.method] = { bind(gaxClient: {}, reqOpts: {}, gaxOpts: {}) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); @@ -1342,7 +1350,7 @@ describe('Logging', () => { beforeEach(() => { GAX_STREAM = (through() as {}) as AbortableDuplex; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (logging.api as any)[CONFIG.client][CONFIG.method] = { bind() { return () => GAX_STREAM; @@ -1355,11 +1363,11 @@ describe('Logging', () => { done(new Error('Should not have gotten project ID.')); }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).GCLOUD_SANDBOX_ENV = true; const returnValue = logging.request(CONFIG); returnValue.emit('reading'); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete (global as any).GCLOUD_SANDBOX_ENV; assert(returnValue instanceof require('stream')); @@ -1374,7 +1382,7 @@ describe('Logging', () => { }); it('should prepare the request once reading', done => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (logging.api as any)[CONFIG.client][CONFIG.method] = { bind(gaxClient: {}, reqOpts: {}, gaxOpts: {}) { assert.strictEqual(gaxClient, logging.api[CONFIG.client]); @@ -1425,7 +1433,7 @@ describe('Logging', () => { const NAME = 'sink-name'; it('should return a Log object', () => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const sink = logging.sink(NAME) as any; assert(sink instanceof FakeSink); assert.strictEqual(sink.calledWith_[0], logging); @@ -1434,7 +1442,6 @@ describe('Logging', () => { }); describe('setAclForBucket_', () => { - const SINK_NAME = 'name'; let CONFIG: CreateSinkRequest; let bucket: Bucket; @@ -1447,7 +1454,7 @@ describe('Logging', () => { addGroup: noop, }, }, - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; CONFIG = { @@ -1456,7 +1463,7 @@ describe('Logging', () => { }); it('should add cloud-logs as an owner', async () => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (bucket.acl.owners as any).addGroup = async (entity: {}) => { assert.strictEqual(entity, 'cloud-logs@google.com'); }; @@ -1468,7 +1475,7 @@ describe('Logging', () => { const error = new Error('Error.'); beforeEach(() => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (bucket.acl.owners as any).addGroup = async () => { throw error; }; @@ -1483,7 +1490,7 @@ describe('Logging', () => { describe('success', () => { beforeEach(() => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (bucket.acl.owners as any).addGroup = async () => {}; }); @@ -1497,7 +1504,6 @@ describe('Logging', () => { }); describe('setAclForDataset_', () => { - const SINK_NAME = 'name'; let CONFIG: CreateSinkRequest; let dataset: Dataset; @@ -1517,7 +1523,6 @@ describe('Logging', () => { describe('metadata refresh', () => { describe('error', () => { const error = new Error('Error.'); - const apiResponse = {}; beforeEach(() => { dataset.getMetadata = async () => { @@ -1552,10 +1557,10 @@ describe('Logging', () => { }; const expectedAccess = - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any ([] as any[]).slice.call(originalAccess).concat(access); - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (dataset.setMetadata as Function) = async (metadata: any) => { assert.deepStrictEqual(apiResponse.access, originalAccess); assert.deepStrictEqual(metadata.access, expectedAccess); @@ -1566,7 +1571,6 @@ describe('Logging', () => { describe('updating metadata error', () => { const error = new Error('Error.'); - const apiResponse = {}; beforeEach(() => { dataset.setMetadata = async () => { @@ -1590,7 +1594,7 @@ describe('Logging', () => { const expectedDestination = [ 'bigquery.googleapis.com', 'projects', - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (dataset.parent as any).projectId, 'datasets', dataset.id, @@ -1606,7 +1610,7 @@ describe('Logging', () => { describe('setAclForTopic_', () => { let CONFIG: CreateSinkRequest; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let topic: any; beforeEach(() => { @@ -1626,7 +1630,6 @@ describe('Logging', () => { describe('get policy', () => { describe('error', () => { const error = new Error('Error.'); - const apiResponse = {}; beforeEach(() => { topic.iam.getPolicy = async () => { @@ -1660,7 +1663,7 @@ describe('Logging', () => { members: ['serviceAccount:cloud-logs@system.gserviceaccount.com'], }; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const expectedBindings = ([] as any[]).slice.call(originalBindings); expectedBindings.push(binding); @@ -1674,7 +1677,6 @@ describe('Logging', () => { describe('updating policy error', () => { const error = new Error('Error.'); - const apiResponse = {}; beforeEach(() => { topic.iam.setPolicy = async () => { @@ -1690,8 +1692,6 @@ describe('Logging', () => { }); describe('updating policy success', () => { - const apiResponse = {}; - beforeEach(() => { (topic.iam.setPolicy as Function) = async () => {}; }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index a5a3a24819f..ca6536bfa5d 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as assert from 'assert'; -import {describe, it} from 'mocha'; +import {describe, it, before, beforeEach, afterEach} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as sinon from 'sinon'; @@ -22,9 +22,8 @@ import {Log as LOG, LogOptions, WriteOptions} from '../src/log'; import {Data, EntryJson, LogEntry} from '../src/entry'; describe('Log', () => { - // tslint:disable-next-line variable-name let Log: typeof LOG; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let log: any; const PROJECT_ID = 'project-id'; @@ -618,7 +617,7 @@ describe('Log', () => { }); describe('decorateEntries_', () => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let toJSONResponse: any; let logEntryStub: sinon.SinonStub; let toJSONStub: sinon.SinonStub; diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 9e0c9aaf4e4..5a212fac77e 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as assert from 'assert'; -import {describe, it} from 'mocha'; +import {describe, it, beforeEach, before, after, afterEach} from 'mocha'; import BigNumber from 'bignumber.js'; import * as extend from 'extend'; import {GCPEnv} from 'google-auth-library'; @@ -62,10 +62,11 @@ const fakeFS = { }; describe('metadata', () => { - // tslint:disable-next-line no-any variable-name + // eslint-disable-next-line @typescript-eslint/no-explicit-any let metadataCached: any; - // tslint:disable-next-line no-any variable-name + // eslint-disable-next-line @typescript-eslint/no-explicit-any let metadata: any; + // eslint-disable-next-line @typescript-eslint/no-unused-vars let AUTH; const ENV_CACHED = extend({}, process.env); @@ -335,7 +336,7 @@ describe('metadata', () => { }); it('should deal with instance id being a BigNumber', async () => { - const INSTANCE_ID_STRING = `3279739563200103600`; + const INSTANCE_ID_STRING = '3279739563200103600'; const INSTANCE_ID = new BigNumber(INSTANCE_ID_STRING); const ZONE_ID = 'cyrodiil-anvil-2'; const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 17a968a18a6..94130afc42c 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -15,7 +15,7 @@ */ import * as assert from 'assert'; -import {describe, it} from 'mocha'; +import {describe, it, beforeEach} from 'mocha'; import * as EventEmitter from 'events'; import * as proxyquire from 'proxyquire'; @@ -27,8 +27,8 @@ function makeFakeRequest() { function makeFakeResponse() { const ee = new EventEmitter.EventEmitter(); - // tslint:disable-next-line:no-any - (ee as any).getHeader = (name: string) => {}; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (ee as any).getHeader = () => {}; return ee; } @@ -93,7 +93,7 @@ describe('middleware/express/make-middleware', () => { middleware(fakeRequest, fakeResponse, () => {}); // Should annotate the request with the child logger. - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.strictEqual((fakeRequest as any).log, FAKE_CHILD_LOGGER); }); diff --git a/handwritten/logging/test/middleware/test-context.ts b/handwritten/logging/test/middleware/test-context.ts index 968ac3eb42c..17ceae99df0 100644 --- a/handwritten/logging/test/middleware/test-context.ts +++ b/handwritten/logging/test/middleware/test-context.ts @@ -15,14 +15,16 @@ */ import * as assert from 'assert'; -import {describe, it} from 'mocha'; +import {describe, it, beforeEach} from 'mocha'; import * as http from 'http'; import * as proxyquire from 'proxyquire'; import {makeHeaderWrapper} from '../../src/middleware/context'; const FAKE_CONTEXT = { + // eslint-disable-next-line @typescript-eslint/no-unused-vars extract: (headerWrapper: {}) => {}, generate: () => {}, + // eslint-disable-next-line @typescript-eslint/no-unused-vars inject: (headerWrapper: {}, spanContext: {}) => {}, }; diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index 8796b9699ff..d755f4ab438 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -14,11 +14,11 @@ import * as callbackify from '@google-cloud/promisify'; import * as assert from 'assert'; -import {describe, it} from 'mocha'; +import {describe, it, before, beforeEach, afterEach} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as sinon from 'sinon'; -import {Sink as SINK, SetSinkMetadata} from '../src/sink'; +import {Sink as SINK} from '../src/sink'; import {Logging, CreateSinkRequest, LogSink} from '../src/index'; let callbackified = false; @@ -156,7 +156,7 @@ describe('Sink', () => { it('should return original arguments', async () => { const ARGS = [{}, {}, {}]; - sink.logging.configService.getSink = async (reqOpts: {}, gaxOpts: {}) => { + sink.logging.configService.getSink = async () => { return [ARGS]; }; const [args] = await sink.getMetadata(); @@ -180,13 +180,13 @@ describe('Sink', () => { const METADATA = {a: 'b', c: 'd'} as LogSink; beforeEach(() => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sink.getMetadata = async () => [METADATA] as any; sink.logging.auth.getProjectId = async () => PROJECT_ID; }); it('should refresh the metadata', async () => { - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sink.getMetadata = () => [] as any; sink.logging.configService.updateSink = async () => { return [METADATA]; @@ -209,7 +209,7 @@ describe('Sink', () => { it('should execute gax method', async () => { const currentMetadata = {a: 'a', e: 'e'} as LogSink; - // tslint:disable-next-line no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sink.getMetadata = async () => [currentMetadata] as any; sink.logging.configService.updateSink = async ( reqOpts: {}, @@ -243,10 +243,7 @@ describe('Sink', () => { it('should update metadata', async () => { const metadata = {}; - sink.logging.configService.updateSink = async ( - reqOpts: {}, - gaxOpts: {} - ) => { + sink.logging.configService.updateSink = async () => { return [metadata]; }; await sink.setMetadata(metadata); @@ -255,10 +252,7 @@ describe('Sink', () => { it('should return callback with original arguments', async () => { const ARGS = [{}, {}, {}]; - sink.logging.configService.updateSink = async ( - reqOpts: {}, - gaxOpts: {} - ) => { + sink.logging.configService.updateSink = async () => { return [ARGS]; }; const [args] = await sink.setMetadata(METADATA); From b67d2e6ffaa48efada70e249909bd4ed5b30a36a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 5 Apr 2020 12:46:42 -0700 Subject: [PATCH 0588/1029] chore: remove duplicate mocha config (#783) --- handwritten/logging/.mocharc.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 handwritten/logging/.mocharc.json diff --git a/handwritten/logging/.mocharc.json b/handwritten/logging/.mocharc.json deleted file mode 100644 index 670c5e2c24b..00000000000 --- a/handwritten/logging/.mocharc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} From c5eecba1e037f3be53bb26a4f3a155b775c2041a Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Mon, 6 Apr 2020 15:20:38 -0700 Subject: [PATCH 0589/1029] minor linter fix (#784) --- handwritten/logging/system-test/logging.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 2c36430d896..c4e642e6eeb 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -179,8 +179,7 @@ describe('Logging', async () => { describe('sinks', () => { it('should create a sink with a Bucket destination', async () => { const sink = logging.sink(generateName()); - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [_, apiResponse] = await sink.create({ + const [, apiResponse] = await sink.create({ destination: bucket, }); const destination = 'storage.googleapis.com/' + bucket.name; From 0a61e9078d19f57ab4f804c8e6cbf4aa4caa71b1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Apr 2020 02:32:32 +0200 Subject: [PATCH 0590/1029] fix(deps): update dependency type-fest to ^0.13.0 (#782) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 96052737fa3..e6fb0cf89e7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,7 +63,7 @@ "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", "through2": "^3.0.1", - "type-fest": "^0.12.0" + "type-fest": "^0.13.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.7.0", From 24c05b4e6a9c2d403d1f6c5e794c7a004cf995b9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 6 Apr 2020 18:54:38 -0700 Subject: [PATCH 0591/1029] fix: explicit export of protobuf.roots (#781) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1630485f-7526-4afd-9c13-b5660664d6a2/targets --- handwritten/logging/protos/protos.js | 2 +- handwritten/logging/synth.metadata | 2 +- .../test/gapic_logging_service_v2_v2.ts | 34 +++++++------------ 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 029a51ba05c..c62420dc20b 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + var $root = $protobuf.roots._google_cloud_logging_7_3_0_protos || ($protobuf.roots._google_cloud_logging_7_3_0_protos = {}); $root.google = (function() { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index c33849684a6..f414fc6f31b 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-04-02T18:03:34.847544Z", + "updateTime": "2020-04-03T11:54:50.682865Z", "sources": [ { "git": { diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index f4e3230a23d..0ba7fb9b753 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -912,7 +912,7 @@ describe('v2.LoggingServiceV2Client', () => { }, }, }; - const expectedResponse = ['', '', '']; + const expectedResponse = [new String(), new String(), new String()]; client.innerApiCalls.listLogs = stubSimpleCall(expectedResponse); const [response] = await client.listLogs(request); assert.deepStrictEqual(response, expectedResponse); @@ -941,7 +941,7 @@ describe('v2.LoggingServiceV2Client', () => { }, }, }; - const expectedResponse = ['', '', '']; + const expectedResponse = [new String(), new String(), new String()]; client.innerApiCalls.listLogs = stubSimpleCallWithCallback( expectedResponse ); @@ -1007,21 +1007,16 @@ describe('v2.LoggingServiceV2Client', () => { ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; - const expectedResponse = ['', '', '']; + const expectedResponse = [new String(), new String(), new String()]; client.descriptors.page.listLogs.createStream = stubPageStreamingCall( expectedResponse ); const stream = client.listLogsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING[] = []; - stream.on( - 'data', - ( - response: protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING - ) => { - responses.push(response); - } - ); + const responses: string[] = []; + stream.on('data', (response: string) => { + responses.push(response); + }); stream.on('end', () => { resolve(responses); }); @@ -1061,15 +1056,10 @@ describe('v2.LoggingServiceV2Client', () => { ); const stream = client.listLogsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING[] = []; - stream.on( - 'data', - ( - response: protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING - ) => { - responses.push(response); - } - ); + const responses: string[] = []; + stream.on('data', (response: string) => { + responses.push(response); + }); stream.on('end', () => { resolve(responses); }); @@ -1103,7 +1093,7 @@ describe('v2.LoggingServiceV2Client', () => { ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; - const expectedResponse = ['', '', '']; + const expectedResponse = [new String(), new String(), new String()]; client.descriptors.page.listLogs.asyncIterate = stubAsyncIterationCall( expectedResponse ); From 4857cfbe6d498f1b36131f1a7ec2390c8f49efac Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Apr 2020 20:57:58 +0200 Subject: [PATCH 0592/1029] chore(deps): update dependency gts to v2.0.0 (#788) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [gts](https://togithub.com/google/gts) | devDependencies | patch | [`2.0.0-alpha.9` -> `2.0.0`](https://renovatebot.com/diffs/npm/gts/2.0.0-alpha.9/2.0.0) | --- ### Release Notes
google/gts ### [`v2.0.0`](https://togithub.com/google/gts/blob/master/CHANGELOG.md#​200-httpswwwgithubcomgooglegtscomparev112v200-2020-04-02) [Compare Source](https://togithub.com/google/gts/compare/39a2705e51b4b6329a70f91f8293a2d7a363bf5d...v2.0.0) ##### ⚠ BREAKING CHANGES ⚠ This is a major rewrite of the tool. Based on community guidance, we've switched from using [tslint](https://palantir.github.io/tslint/) to [eslint](https://eslint.org/). _Please read all of the steps below to upgrade_. ##### Configuring `eslint` With the shift to `eslint`, `gts` now will format and lint JavaScript _as well_ as TypeScript. Upgrading will require a number of manual steps. To format JavaScript and TypeScript, you can run: $ npx gts fix To specify only TypeScript: $ npx gts fix '**/*.ts' ##### Delete `tslint.json` This file is no longer used, and can lead to confusion. ##### Create a `.eslintrc.json` Now that we're using eslint, you need to extend the eslint configuration baked into the module. Create a new file named `.eslintrc.json`, and paste the following: ```js { "extends": "./node_modules/gts" } ``` ##### Create a `.eslintignore` The `.eslintignore` file lets you ignore specific directories. This tool now lints and formats JavaScript, so it's _really_ important to ignore your build directory! Here is an example of a `.eslintignore` file: **/node_modules build/ ##### Rule changes The underlying linter was changed, so naturally there are going to be a variety of rule changes along the way. To see the full list, check out [.eslintrc.json](https://togithub.com/google/gts/blob/master/.eslintrc.json). ##### Require Node.js 10.x and up Node.js 8.x is now end of life - this module now requires Ndoe.js 10.x and up. ##### Features - add the eol-last rule ([#​425](https://www.github.com/google/gts/issues/425)) ([50ebd4d](https://www.github.com/google/gts/commit/50ebd4dbaf063615f4c025f567ca28076a734223)) - allow eslintrc to run over tsx files ([#​469](https://www.github.com/google/gts/issues/469)) ([a21db94](https://www.github.com/google/gts/commit/a21db94601def563952d677cb0980a12b6730f4c)) - disable global rule for checking TODO comments ([#​459](https://www.github.com/google/gts/issues/459)) ([96aa84a](https://www.github.com/google/gts/commit/96aa84a0a42181046daa248750cc8fef0c320619)) - override require-atomic-updates ([#​468](https://www.github.com/google/gts/issues/468)) ([8105c93](https://www.github.com/google/gts/commit/8105c9334ee5104b05f6b1b2f150e51419637262)) - prefer single quotes if possible ([#​475](https://www.github.com/google/gts/issues/475)) ([39a2705](https://www.github.com/google/gts/commit/39a2705e51b4b6329a70f91f8293a2d7a363bf5d)) - use eslint instead of tslint ([#​400](https://www.github.com/google/gts/issues/400)) ([b3096fb](https://www.github.com/google/gts/commit/b3096fbd5076d302d93c2307bf627e12c423e726)) ##### Bug Fixes - use .prettierrc.js ([#​437](https://www.github.com/google/gts/issues/437)) ([06efa84](https://www.github.com/google/gts/commit/06efa8444cdf1064b64f3e8d61ebd04f45d90b4c)) - **deps:** update dependency chalk to v4 ([#​477](https://www.github.com/google/gts/issues/477)) ([061d64e](https://www.github.com/google/gts/commit/061d64e29d37b93ce55228937cc100e05ddef352)) - **deps:** update dependency eslint-plugin-node to v11 ([#​426](https://www.github.com/google/gts/issues/426)) ([a394b7c](https://www.github.com/google/gts/commit/a394b7c1f80437f25017ca5c500b968ebb789ece)) - **deps:** update dependency execa to v4 ([#​427](https://www.github.com/google/gts/issues/427)) ([f42ef36](https://www.github.com/google/gts/commit/f42ef36709251553342e655e287e889df72ee3e3)) - **deps:** update dependency prettier to v2 ([#​464](https://www.github.com/google/gts/issues/464)) ([20ef43d](https://www.github.com/google/gts/commit/20ef43d566df17d3c93949ef7db3b72ee9123ca3)) - disable no-use-before-define ([#​431](https://www.github.com/google/gts/issues/431)) ([dea2c22](https://www.github.com/google/gts/commit/dea2c223d1d3a60a1786aa820eebb93be27016a7)) - **deps:** update dependency update-notifier to v4 ([#​403](https://www.github.com/google/gts/issues/403)) ([57393b7](https://www.github.com/google/gts/commit/57393b74c6cf299e8ae09311f0382226b8baa3e3)) - **deps:** upgrade to meow 6.x ([#​423](https://www.github.com/google/gts/issues/423)) ([8f93d00](https://www.github.com/google/gts/commit/8f93d0049337a832d9a22b6ae4e86fd41140ec56)) - align back to the google style guide ([#​440](https://www.github.com/google/gts/issues/440)) ([8bd78c4](https://www.github.com/google/gts/commit/8bd78c4c78526a72400f618a95a987d2a7c1a8db)) - disable empty-function check ([#​467](https://www.github.com/google/gts/issues/467)) ([6455d7a](https://www.github.com/google/gts/commit/6455d7a9d227320d3ffe1b00c9c739b846f339a8)) - drop support for node 8 ([#​422](https://www.github.com/google/gts/issues/422)) ([888c686](https://www.github.com/google/gts/commit/888c68692079065f38ce66ec84472f1f3311a050)) - emit .prettierrc.js with init ([#​462](https://www.github.com/google/gts/issues/462)) ([b114614](https://www.github.com/google/gts/commit/b114614d22ab5560d2d1dd5cb6695968cc80027b)) - enable trailing comma ([#​470](https://www.github.com/google/gts/issues/470)) ([6518f58](https://www.github.com/google/gts/commit/6518f5843d3093e3beb7d3371b56d9aecedf3924)) - include _.tsx and _.jsx in default fix command ([#​473](https://www.github.com/google/gts/issues/473)) ([0509780](https://www.github.com/google/gts/commit/050978005ad089d9b3b5d8895b25ea1175d75db2)) ##### [1.1.2](https://www.github.com/google/gts/compare/v1.1.1...v1.1.2) (2019-11-20) ##### Bug Fixes - **deps:** update to newest prettier (with support for optional chain) ([#​396](https://www.github.com/google/gts/issues/396)) ([ce8ad06](https://www.github.com/google/gts/commit/ce8ad06c8489c44a9e2ed5292382637b3ebb7601)) ##### [1.1.1](https://www.github.com/google/gts/compare/v1.1.0...v1.1.1) (2019-11-11) ##### Bug Fixes - **deps:** update dependency chalk to v3 ([#​389](https://www.github.com/google/gts/issues/389)) ([1ce0f45](https://www.github.com/google/gts/commit/1ce0f450677e143a27efc39def617d13c66503e8)) - **deps:** update dependency inquirer to v7 ([#​377](https://www.github.com/google/gts/issues/377)) ([bf2c349](https://www.github.com/google/gts/commit/bf2c349b2208ac63e551542599ac9cd27b461338)) - **deps:** update dependency rimraf to v3 ([#​374](https://www.github.com/google/gts/issues/374)) ([2058eaa](https://www.github.com/google/gts/commit/2058eaa682f4baae978b469fd708d1f866e7da74)) - **deps:** update dependency write-file-atomic to v3 ([#​353](https://www.github.com/google/gts/issues/353)) ([59e6aa8](https://www.github.com/google/gts/commit/59e6aa8580a2f8e9457d2d2b6fa9e18e86347592))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e6fb0cf89e7..e8297f7ed48 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -91,7 +91,7 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "execa": "^4.0.0", - "gts": "2.0.0-alpha.9", + "gts": "2.0.0", "http2spy": "^1.1.0", "jsdoc": "^3.6.3", "jsdoc-fresh": "^1.0.2", From 9582134a5a9c04ec59bd39077d46647d4b45b73d Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 11 Apr 2020 19:19:48 -0700 Subject: [PATCH 0593/1029] build: remove unused codecov config (#790) --- handwritten/logging/codecov.yaml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 handwritten/logging/codecov.yaml diff --git a/handwritten/logging/codecov.yaml b/handwritten/logging/codecov.yaml deleted file mode 100644 index 5724ea9478d..00000000000 --- a/handwritten/logging/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com From 1381a14a770751a68d4ba406f4134d8ae6be4088 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Sat, 11 Apr 2020 20:23:33 -0700 Subject: [PATCH 0594/1029] fix: remove eslint, update gax, fix generated protos, run the generator (#789) * fix: remove eslint, update gax, fix generated protos, run the generator Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint. * chore: fix synth.py, update protos * fix: regen * docs: fix links --- handwritten/logging/.jsdoc.js | 2 +- handwritten/logging/.prettierrc.js | 2 +- handwritten/logging/package.json | 14 +++---- .../protos/google/logging/v2/log_entry.proto | 4 +- .../protos/google/logging/v2/logging.proto | 10 ++--- .../google/logging/v2/logging_config.proto | 30 ++++++------- .../google/logging/v2/logging_metrics.proto | 2 +- handwritten/logging/protos/protos.json | 1 + handwritten/logging/synth.metadata | 14 +++++-- handwritten/logging/synth.py | 14 +------ .../test/gapic_config_service_v2_v2.ts | 42 +++++++++---------- .../test/gapic_logging_service_v2_v2.ts | 22 +++++----- .../test/gapic_metrics_service_v2_v2.ts | 14 +++---- 13 files changed, 81 insertions(+), 90 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 884203d2bfb..8f22ec542ff 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2019 Google, LLC.', + copyright: 'Copyright 2020 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/logging', diff --git a/handwritten/logging/.prettierrc.js b/handwritten/logging/.prettierrc.js index 08cba3775be..d1b95106f4c 100644 --- a/handwritten/logging/.prettierrc.js +++ b/handwritten/logging/.prettierrc.js @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e8297f7ed48..2f45132836c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -33,9 +33,9 @@ "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "fix": "gts fix && eslint '**/*.js' --fix", - "prelint": "cd samples; npm link ../; npm i", - "lint": "gts fix && eslint samples/*.js", + "fix": "gts fix", + "prelint": "cd samples; npm link ../; npm install", + "lint": "gts fix", "prepare": "npm run compile", "samples-test": "cd samples/ && npm link ../ && rm -rf node_modules && npm install && npm test && cd ../", "presystem-test": "npm run compile", @@ -56,7 +56,7 @@ "extend": "^3.0.2", "gcp-metadata": "^3.5.0", "google-auth-library": "^5.10.1", - "google-gax": "^2.0.1", + "google-gax": "^2.1.0", "is": "^3.3.0", "on-finished": "^2.3.0", "pumpify": "^2.0.1", @@ -86,12 +86,8 @@ "bignumber.js": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.0", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.1.2", "execa": "^4.0.0", - "gts": "2.0.0", + "gts": "^2.0.0", "http2spy": "^1.1.0", "jsdoc": "^3.6.3", "jsdoc-fresh": "^1.0.2", diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index eb5b5d0c9a8..351f9e632b0 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -106,10 +106,10 @@ message LogEntry { // the fractional seconds might be omitted when the timestamp is displayed. // // Incoming log entries should have timestamps that are no more than the [logs - // retention period](/logging/quotas) in the past, and no more than 24 hours + // retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours // in the future. Log entries outside those time boundaries will not be // available when calling `entries.list`, but those log entries can still be - // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index 3abf79db4f0..36a81dcc259 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -86,7 +86,7 @@ service LoggingServiceV2 { // Lists log entries. Use this method to retrieve log entries that originated // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting Logs](/logging/docs/export). + // entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -202,13 +202,13 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](/logging/quota-policy) in the past or more than + // [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than // 24 hours in the future will not be available when calling `entries.list`. // However, those log entries can still be - // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](/logging/quota-policy) for calls to `entries.write`, + // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, // you should try to include several log entries in this list, // rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; @@ -260,7 +260,7 @@ message ListLogEntriesRequest { ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Queries](/logging/docs/view/advanced-queries). Only log entries that + // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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 diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 3981ccdb96a..b7cb9c94a7b 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -381,7 +381,7 @@ service ConfigServiceV2 { // the GCP organization. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" @@ -404,7 +404,7 @@ service ConfigServiceV2 { // 3) access to the key is disabled. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { patch: "/v2/{name=*/*}/cmekSettings" @@ -503,7 +503,7 @@ message LogSink { // 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). + // [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). string destination = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -511,7 +511,7 @@ message LogSink { } ]; - // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only + // Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only // exported log entries are those that are in the resource owning the sink and // that match the filter. For example: // @@ -539,7 +539,7 @@ message LogSink { // 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). + // Resource](https://cloud.google.com/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. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -579,11 +579,11 @@ message LogSink { // Options that change functionality of a sink exporting data to BigQuery. message BigQueryOptions { // Optional. Whether to use [BigQuery's partition - // tables](/bigquery/docs/partitioned-tables). By default, Logging + // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging // creates dated tables based on the log entries' timestamps, e.g. // syslog_20170523. With partitioned tables the date suffix is no longer // present and [special query - // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. + // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. // In both cases, tables are sharded based on UTC timezone. bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -889,9 +889,9 @@ message LogExclusion { // Optional. A description of this exclusion. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](/logging/docs/view/advanced-queries) + // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries) // that matches the log entries to be excluded. By using the - // [sample function](/logging/docs/view/advanced-queries#sample), + // [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. // For example, the following query matches 99% of low-severity log // entries from Google Cloud Storage buckets: @@ -1046,7 +1046,7 @@ message DeleteExclusionRequest { // The parameters to // [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. // -// See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) +// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) // for more information. message GetCmekSettingsRequest { // Required. The resource for which to retrieve CMEK settings. @@ -1072,7 +1072,7 @@ message GetCmekSettingsRequest { // The parameters to // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. // -// See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) +// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) // for more information. message UpdateCmekSettingsRequest { // Required. The resource name for the CMEK settings to update. @@ -1092,7 +1092,7 @@ message UpdateCmekSettingsRequest { // Required. The CMEK settings to update. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. CmekSettings cmek_settings = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Field mask identifying which fields from `cmek_settings` should @@ -1112,7 +1112,7 @@ message UpdateCmekSettingsRequest { // organizations. Once configured, it applies to all projects and folders in the // GCP organization. // -// See [Enabling CMEK for Logs Router](/logging/docs/routing/managed-encryption) +// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) // for more information. message CmekSettings { option (google.api.resource) = { @@ -1149,7 +1149,7 @@ message CmekSettings { // To disable CMEK for the Logs Router, set this field to an empty string. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. string kms_key_name = 2; // Output only. The service account that will be used by the Logs Router to access your @@ -1162,6 +1162,6 @@ message CmekSettings { // obtain the service account ID. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. string service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 15ab65bb954..518b6f69119 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -129,7 +129,7 @@ message LogMetric { // The maximum length of the description is 8000 characters. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](/logging/docs/view/advanced_filters) which is + // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is // used to match log entries. // Example: // diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index a20c65b4bec..5a1dfd8e607 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -3039,6 +3039,7 @@ }, "rpc": { "options": { + "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", "java_multiple_files": true, "java_outer_classname": "StatusProto", diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index f414fc6f31b..6fa11080a3d 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -1,19 +1,25 @@ { - "updateTime": "2020-04-03T11:54:50.682865Z", "sources": [ + { + "git": { + "name": ".", + "remote": "git@github.com:googleapis/nodejs-logging.git", + "sha": "198485ced9e3bf26440eb182f3eba1b82a10b560" + } + }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0", - "internalRef": "304416658" + "sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8", + "internalRef": "305974465" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" } } ], diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index da976ab00cf..bfb64c7ab96 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -42,18 +42,6 @@ extra_proto_files=['google/cloud/common_resources.proto'], ) s.copy(v2_library, excludes=["src/index.ts", "README.md", "package.json", "system-test/fixtures/sample/src/index.js", "system-test/fixtures/sample/src/index.ts"]) -# fix incorrect docs link -s.replace('src/v2/config_service_v2_client.ts', '/logging/docs/routing/managed-encryption', 'https://cloud.google.com/logging/docs/routing/managed-encryption') -s.replace('src/v2/logging_service_v2_client.ts', '/logging/docs/', 'https://cloud.google.com/logging/docs/') -s.replace('src/v2/logging_service_v2_client.ts', '/logging/quota-policy', 'https://cloud.google.com/logging/quota-policy') -# fix improper sample message type in unit test -# this will be fixed in micro-gen -s.replace('test/gapic_logging_service_v2_v2.ts', -'generateSampleMessage\(new protosTYPE\_STRING\(\)\)', -'\'\'') -s.replace('test/gapic_logging_service_v2_v2.ts', -'protosTYPE\_STRING', -'protos.google.protobuf.FieldDescriptorProto.Type.TYPE_STRING') # Copy in templated files common_templates = gcp.CommonTemplates() @@ -62,5 +50,5 @@ # Node.js specific cleanup subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "fix"]) +subprocess.run(["npm", "run", "lint"]) subprocess.run(["npx", "compileProtos", "src"]) diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 1548d1abce4..48fbc6eb144 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -296,7 +296,7 @@ describe('v2.ConfigServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getBucket = stubSimpleCall(undefined, expectedError); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getBucket(request); }, expectedError); assert( @@ -410,7 +410,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateBucket(request); }, expectedError); assert( @@ -521,7 +521,7 @@ describe('v2.ConfigServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getSink = stubSimpleCall(undefined, expectedError); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getSink(request); }, expectedError); assert( @@ -635,7 +635,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createSink(request); }, expectedError); assert( @@ -749,7 +749,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateSink(request); }, expectedError); assert( @@ -863,7 +863,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteSink(request); }, expectedError); assert( @@ -977,7 +977,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getExclusion(request); }, expectedError); assert( @@ -1091,7 +1091,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createExclusion(request); }, expectedError); assert( @@ -1205,7 +1205,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateExclusion(request); }, expectedError); assert( @@ -1319,7 +1319,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteExclusion(request); }, expectedError); assert( @@ -1433,7 +1433,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getCmekSettings(request); }, expectedError); assert( @@ -1549,7 +1549,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateCmekSettings(request); }, expectedError); assert( @@ -1667,7 +1667,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listBuckets(request); }, expectedError); assert( @@ -1753,7 +1753,7 @@ describe('v2.ConfigServiceV2Client', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1825,7 +1825,7 @@ describe('v2.ConfigServiceV2Client', () => { expectedError ); const iterable = client.listBucketsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.logging.v2.ILogBucket[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1950,7 +1950,7 @@ describe('v2.ConfigServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.listSinks = stubSimpleCall(undefined, expectedError); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listSinks(request); }, expectedError); assert( @@ -2035,7 +2035,7 @@ describe('v2.ConfigServiceV2Client', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -2104,7 +2104,7 @@ describe('v2.ConfigServiceV2Client', () => { expectedError ); const iterable = client.listSinksAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.logging.v2.ILogSink[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -2230,7 +2230,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listExclusions(request); }, expectedError); assert( @@ -2317,7 +2317,7 @@ describe('v2.ConfigServiceV2Client', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -2390,7 +2390,7 @@ describe('v2.ConfigServiceV2Client', () => { expectedError ); const iterable = client.listExclusionsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.logging.v2.ILogExclusion[] = []; for await (const resource of iterable) { responses.push(resource!); diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 0ba7fb9b753..b3dfb1141ba 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -296,7 +296,7 @@ describe('v2.LoggingServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.deleteLog = stubSimpleCall(undefined, expectedError); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteLog(request); }, expectedError); assert( @@ -386,7 +386,7 @@ describe('v2.LoggingServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.writeLogEntries(request); }, expectedError); assert( @@ -480,7 +480,7 @@ describe('v2.LoggingServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listLogEntries(request); }, expectedError); assert( @@ -556,7 +556,7 @@ describe('v2.LoggingServiceV2Client', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -611,7 +611,7 @@ describe('v2.LoggingServiceV2Client', () => { expectedError ); const iterable = client.listLogEntriesAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.logging.v2.ILogEntry[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -722,7 +722,7 @@ describe('v2.LoggingServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listMonitoredResourceDescriptors(request); }, expectedError); assert( @@ -814,7 +814,7 @@ describe('v2.LoggingServiceV2Client', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -879,7 +879,7 @@ describe('v2.LoggingServiceV2Client', () => { expectedError ); const iterable = client.listMonitoredResourceDescriptorsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.api.IMonitoredResourceDescriptor[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -986,7 +986,7 @@ describe('v2.LoggingServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.listLogs = stubSimpleCall(undefined, expectedError); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listLogs(request); }, expectedError); assert( @@ -1067,7 +1067,7 @@ describe('v2.LoggingServiceV2Client', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1132,7 +1132,7 @@ describe('v2.LoggingServiceV2Client', () => { expectedError ); const iterable = client.listLogsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: string[] = []; for await (const resource of iterable) { responses.push(resource!); diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index ce38ec6f1f6..79d4e147dfa 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -299,7 +299,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getLogMetric(request); }, expectedError); assert( @@ -413,7 +413,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createLogMetric(request); }, expectedError); assert( @@ -527,7 +527,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateLogMetric(request); }, expectedError); assert( @@ -641,7 +641,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteLogMetric(request); }, expectedError); assert( @@ -759,7 +759,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listLogMetrics(request); }, expectedError); assert( @@ -846,7 +846,7 @@ describe('v2.MetricsServiceV2Client', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -919,7 +919,7 @@ describe('v2.MetricsServiceV2Client', () => { expectedError ); const iterable = client.listLogMetricsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.logging.v2.ILogMetric[] = []; for await (const resource of iterable) { responses.push(resource!); From 1c7fd6f0759acf41c6e7d1e40c337900f4e3ec82 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 13 Apr 2020 12:18:21 -0700 Subject: [PATCH 0595/1029] build: synth.metadata had bad entry (#792) --- handwritten/logging/synth.metadata | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 6fa11080a3d..728c485652c 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,22 +4,15 @@ "git": { "name": ".", "remote": "git@github.com:googleapis/nodejs-logging.git", - "sha": "198485ced9e3bf26440eb182f3eba1b82a10b560" + "sha": "d1df1bdc1d536d3626dc1b85d357cf6ec18f80e8" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8", - "internalRef": "305974465" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" + "sha": "3824f547aa44df459580615c73cabb30a2a78ee0", + "internalRef": "306254195" } } ], From f2edc7b31b95902f6c628bceea4e41a0a6e68a87 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 14:56:53 -0700 Subject: [PATCH 0596/1029] chore: update lint ignore files (#793) --- handwritten/logging/.eslintignore | 3 ++- handwritten/logging/.prettierignore | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore index 09b31fe735a..9340ad9b86d 100644 --- a/handwritten/logging/.eslintignore +++ b/handwritten/logging/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/handwritten/logging/.prettierignore b/handwritten/logging/.prettierignore index f6fac98b0a8..9340ad9b86d 100644 --- a/handwritten/logging/.prettierignore +++ b/handwritten/logging/.prettierignore @@ -1,3 +1,6 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ From 107829062a3aa9d7f6812191da526f9dab5841c9 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 19:40:13 -0700 Subject: [PATCH 0597/1029] chore: remove tslint.json (#794) --- handwritten/logging/tslint.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 handwritten/logging/tslint.json diff --git a/handwritten/logging/tslint.json b/handwritten/logging/tslint.json deleted file mode 100644 index 617dc975bae..00000000000 --- a/handwritten/logging/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gts/tslint.json" -} From 745223575470a6a2aa5f1ff4ec109039adf4d04c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Apr 2020 11:39:39 -0700 Subject: [PATCH 0598/1029] chore: clean up lint rules (#796) --- handwritten/logging/package.json | 7 +-- handwritten/logging/smoke-test/.eslintrc.yml | 3 -- .../logging_service_v2_smoke_test.js | 50 ------------------- handwritten/logging/src/v2/.eslintrc.yml | 3 -- handwritten/logging/synth.py | 2 +- handwritten/logging/system-test/install.ts | 4 +- handwritten/logging/system-test/logging.ts | 4 +- handwritten/logging/test/.eslintrc.yml | 3 -- handwritten/logging/test/metadata.ts | 6 +-- 9 files changed, 7 insertions(+), 75 deletions(-) delete mode 100644 handwritten/logging/smoke-test/.eslintrc.yml delete mode 100644 handwritten/logging/smoke-test/logging_service_v2_smoke_test.js delete mode 100644 handwritten/logging/src/v2/.eslintrc.yml delete mode 100644 handwritten/logging/test/.eslintrc.yml diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2f45132836c..f985160e85c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -25,7 +25,6 @@ "build/protos" ], "scripts": { - "check": "gts check", "clean": "gts clean", "compile": "tsc -p . && cp -r proto* build/", "compile-protos": "compileProtos src", @@ -41,8 +40,7 @@ "presystem-test": "npm run compile", "system-test": "mocha build/system-test --timeout 600000", "pretest": "npm run compile", - "test": "c8 mocha build/test", - "posttest": "npm run check" + "test": "c8 mocha build/test" }, "dependencies": { "@google-cloud/common": "^2.4.0", @@ -82,7 +80,6 @@ "@types/through2": "^2.0.34", "@types/tmp": "^0.1.0", "@types/uuid": "^7.0.2", - "assert-rejects": "^1.0.0", "bignumber.js": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", @@ -99,8 +96,6 @@ "nock": "^12.0.3", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", - "power-assert": "^1.6.1", - "prettier": "^1.19.1", "proxyquire": "^2.1.3", "sinon": "^9.0.1", "ts-loader": "^6.2.1", diff --git a/handwritten/logging/smoke-test/.eslintrc.yml b/handwritten/logging/smoke-test/.eslintrc.yml deleted file mode 100644 index 46afd952546..00000000000 --- a/handwritten/logging/smoke-test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - node/no-missing-require: off diff --git a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js b/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js deleted file mode 100644 index 98ca41d9c17..00000000000 --- a/handwritten/logging/smoke-test/logging_service_v2_smoke_test.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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'; - -const {describe, it} = require('mocha'); - -describe('LoggingServiceV2SmokeTest', () => { - if (!process.env.GCLOUD_PROJECT) { - throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); - } - const projectId = process.env.GCLOUD_PROJECT; - - it('successfully makes a call to the service', done => { - const logging = require('../src'); - - const client = new logging.v2.LoggingServiceV2Client({ - // optional auth parameters. - }); - - const formattedLogName = client.logPath( - projectId, - 'test-' + Date.now().toString() - ); - const resource = {}; - const labels = {}; - const entries = []; - const request = { - logName: formattedLogName, - resource: resource, - labels: labels, - entries: entries, - }; - client - .writeLogEntries(request) - .then(done) - .catch(done); - }); -}); diff --git a/handwritten/logging/src/v2/.eslintrc.yml b/handwritten/logging/src/v2/.eslintrc.yml deleted file mode 100644 index 46afd952546..00000000000 --- a/handwritten/logging/src/v2/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - node/no-missing-require: off diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index bfb64c7ab96..b44dcea6a8e 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -50,5 +50,5 @@ # Node.js specific cleanup subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "lint"]) +subprocess.run(["npm", "run", "fix"]) subprocess.run(["npx", "compileProtos", "src"]) diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index c4d80e9c0c8..4c1ba3eb79a 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -21,7 +21,7 @@ import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function() { + it('should have correct type signature for typescript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. @@ -35,7 +35,7 @@ describe('typescript consumer tests', () => { await packNTest(options); // will throw upon error. }); - it('should have correct type signature for javascript users', async function() { + it('should have correct type signature for javascript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index c4e642e6eeb..3d7437835fd 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -681,9 +681,7 @@ describe('Logging', async () => { }); function generateName() { - return `${TESTS_PREFIX}-${Date.now()}-${v4() - .split('-') - .pop()}`; + return `${TESTS_PREFIX}-${Date.now()}-${v4().split('-').pop()}`; } // Parse the time the resource was created using the resource id diff --git a/handwritten/logging/test/.eslintrc.yml b/handwritten/logging/test/.eslintrc.yml deleted file mode 100644 index 46afd952546..00000000000 --- a/handwritten/logging/test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - node/no-missing-require: off diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 5a212fac77e..99dada671ca 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -19,8 +19,6 @@ import * as extend from 'extend'; import {GCPEnv} from 'google-auth-library'; import * as proxyquire from 'proxyquire'; -import assertRejects = require('assert-rejects'); - let instanceOverride: {} | null; const fakeGcpMetadata = { instance(path: string) { @@ -212,7 +210,7 @@ describe('metadata', () => { instanceOverride = { errorArg: FAKE_ERROR, }; - assertRejects( + await assert.rejects( metadata.getGKEDescriptor(), (err: Error) => err === FAKE_ERROR ); @@ -221,7 +219,7 @@ describe('metadata', () => { it('should throw error when read of namespace file fails', async () => { readFileShouldError = true; - assertRejects(metadata.getGKEDescriptor(), (err: Error) => + await assert.rejects(metadata.getGKEDescriptor(), (err: Error) => err.message.includes(FAKE_READFILE_ERROR_MESSAGE) ); }); From c900d74bcc1770f51dff51868cba8901a39fef40 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 17:30:34 +0200 Subject: [PATCH 0599/1029] chore(deps): update dependency ts-loader to v7 (#797) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | devDependencies | major | [`^6.2.1` -> `^7.0.0`](https://renovatebot.com/diffs/npm/ts-loader/6.2.2/7.0.0) | --- ### Release Notes
TypeStrong/ts-loader ### [`v7.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v700) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v6.2.2...v7.0.0) - [Project reference support enhancements](https://togithub.com/TypeStrong/ts-loader/pull/1076) - thanks [@​sheetalkamat](https://togithub.com/sheetalkamat)! - Following the end of life of Node 8, `ts-loader` no longer supports Node 8 **BREAKING CHANGE**
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f985160e85c..71423dbfed8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -98,7 +98,7 @@ "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", "sinon": "^9.0.1", - "ts-loader": "^6.2.1", + "ts-loader": "^7.0.0", "typescript": "^3.8.3", "uuid": "^7.0.2", "webpack": "^4.42.0", From e8ef0a6d9e6402585fc1af3ebd55feff5aa44f71 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 18:30:09 +0200 Subject: [PATCH 0600/1029] chore(deps): update dependency null-loader to v4 (#798) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [null-loader](https://togithub.com/webpack-contrib/null-loader) | devDependencies | major | [`^3.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/null-loader/3.0.0/4.0.0) | --- ### Release Notes
webpack-contrib/null-loader ### [`v4.0.0`](https://togithub.com/webpack-contrib/null-loader/blob/master/CHANGELOG.md#​400-httpsgithubcomwebpack-contribnull-loadercomparev300v400-2020-04-15) [Compare Source](https://togithub.com/webpack-contrib/null-loader/compare/v3.0.0...v4.0.0) ##### Bug Fixes - support `webpack@5` ##### ⚠ BREAKING CHANGES - minimum required Nodejs version is `10.13`
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 71423dbfed8..62fb1876c12 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -94,7 +94,7 @@ "mv": "^2.1.1", "ncp": "^2.0.0", "nock": "^12.0.3", - "null-loader": "^3.0.0", + "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", "sinon": "^9.0.1", From 71f747342b68231b42b79b6af3bb687d6a5165ab Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 15 Apr 2020 15:49:09 -0700 Subject: [PATCH 0601/1029] chore: clean up synth.py (#799) * minor linter fix * clean up --- handwritten/logging/synth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index b44dcea6a8e..3ed92ac15f5 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -34,8 +34,8 @@ version, generator_args={ "grpc-service-config": f"google/logging/{version}/logging_grpc_service_config.json", - "package-name": f"@google-cloud/logging", - "main-service": f"logging", + "package-name": "@google-cloud/logging", + "main-service": "logging", "bundle-config": f"google/logging/{version}/logging_gapic.yaml" }, proto_path=f'/google/logging/{version}', From 50c8b2d0fafe5d7b849bfd1e6dfdd779a58d8ef5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Apr 2020 20:25:54 -0700 Subject: [PATCH 0602/1029] build: adopt CI changes (#801) --- handwritten/logging/synth.metadata | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 728c485652c..436fc208646 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-logging.git", - "sha": "d1df1bdc1d536d3626dc1b85d357cf6ec18f80e8" + "remote": "https://github.com/googleapis/nodejs-logging.git", + "sha": "ca899de645e0269e01bc1ca5fc703bbb5e9ad2ef" } }, { @@ -14,6 +14,13 @@ "sha": "3824f547aa44df459580615c73cabb30a2a78ee0", "internalRef": "306254195" } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" + } } ], "destinations": [ From 0b9a2770a8bdcd8ea590086105a92d6e66c27a0e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 22 Apr 2020 08:10:28 -0700 Subject: [PATCH 0603/1029] build: address linting issues (#804) --- handwritten/logging/protos/protos.js | 654 +++++++++++++-------------- handwritten/logging/synth.metadata | 2 +- 2 files changed, 328 insertions(+), 328 deletions(-) diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index c62420dc20b..f3da74d87b1 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -263,38 +263,38 @@ LogEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) + if (message.protoPayload != null && Object.hasOwnProperty.call(message, "protoPayload")) $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textPayload != null && message.hasOwnProperty("textPayload")) + if (message.textPayload != null && Object.hasOwnProperty.call(message, "textPayload")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); - if (message.insertId != null && message.hasOwnProperty("insertId")) + if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) + if (message.jsonPayload != null && Object.hasOwnProperty.call(message, "jsonPayload")) $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + if (message.httpRequest != null && Object.hasOwnProperty.call(message, "httpRequest")) $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.severity != null && message.hasOwnProperty("severity")) + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); - if (message.labels != null && message.hasOwnProperty("labels")) + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.logName != null && message.hasOwnProperty("logName")) + if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); - if (message.operation != null && message.hasOwnProperty("operation")) + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.trace != null && message.hasOwnProperty("trace")) + if (message.trace != null && Object.hasOwnProperty.call(message, "trace")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + if (message.sourceLocation != null && Object.hasOwnProperty.call(message, "sourceLocation")) $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + if (message.receiveTimestamp != null && Object.hasOwnProperty.call(message, "receiveTimestamp")) $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.spanId != null && message.hasOwnProperty("spanId")) + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + if (message.traceSampled != null && Object.hasOwnProperty.call(message, "traceSampled")) writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); return writer; }; @@ -801,13 +801,13 @@ LogEntryOperation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.producer != null && message.hasOwnProperty("producer")) + if (message.producer != null && Object.hasOwnProperty.call(message, "producer")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); - if (message.first != null && message.hasOwnProperty("first")) + if (message.first != null && Object.hasOwnProperty.call(message, "first")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); - if (message.last != null && message.hasOwnProperty("last")) + if (message.last != null && Object.hasOwnProperty.call(message, "last")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); return writer; }; @@ -1046,11 +1046,11 @@ LogEntrySourceLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.file != null && message.hasOwnProperty("file")) + if (message.file != null && Object.hasOwnProperty.call(message, "file")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); - if (message.line != null && message.hasOwnProperty("line")) + if (message.line != null && Object.hasOwnProperty.call(message, "line")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); - if (message["function"] != null && message.hasOwnProperty("function")) + if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); return writer; }; @@ -1474,7 +1474,7 @@ DeleteLogRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) + if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); return writer; }; @@ -1708,19 +1708,19 @@ WriteLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logName != null && message.hasOwnProperty("logName")) + if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.labels != null && message.hasOwnProperty("labels")) + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); return writer; }; @@ -2169,7 +2169,7 @@ WriteLogEntriesPartialErrors.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) + if (message.logEntryErrors != null && Object.hasOwnProperty.call(message, "logEntryErrors")) for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); @@ -2424,13 +2424,13 @@ ListLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); if (message.resourceNames != null && message.resourceNames.length) for (var i = 0; i < message.resourceNames.length; ++i) @@ -2693,7 +2693,7 @@ if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -2920,9 +2920,9 @@ ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); return writer; }; @@ -3134,7 +3134,7 @@ if (message.resourceDescriptors != null && message.resourceDescriptors.length) for (var i = 0; i < message.resourceDescriptors.length; ++i) $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -3370,11 +3370,11 @@ ListLogsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; @@ -3594,7 +3594,7 @@ ListLogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); if (message.logNames != null && message.logNames.length) for (var i = 0; i < message.logNames.length; ++i) @@ -4385,17 +4385,17 @@ LogBucket.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.createTime != null && message.hasOwnProperty("createTime")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + if (message.retentionDays != null && Object.hasOwnProperty.call(message, "retentionDays")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); - if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + if (message.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.lifecycleState); return writer; }; @@ -4770,27 +4770,27 @@ LogSink.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.destination != null && message.hasOwnProperty("destination")) + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + if (message.outputVersionFormat != null && Object.hasOwnProperty.call(message, "outputVersionFormat")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (message.writerIdentity != null && Object.hasOwnProperty.call(message, "writerIdentity")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + if (message.includeChildren != null && Object.hasOwnProperty.call(message, "includeChildren")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) + if (message.bigqueryOptions != null && Object.hasOwnProperty.call(message, "bigqueryOptions")) $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.disabled); return writer; }; @@ -5071,7 +5071,7 @@ /** * VersionFormat enum. * @name google.logging.v2.LogSink.VersionFormat - * @enum {string} + * @enum {number} * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value * @property {number} V2=1 V2 value * @property {number} V1=2 V1 value @@ -5152,9 +5152,9 @@ BigQueryOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (message.usePartitionedTables != null && Object.hasOwnProperty.call(message, "usePartitionedTables")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + if (message.usesTimestampColumnPartitioning != null && Object.hasOwnProperty.call(message, "usesTimestampColumnPartitioning")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); return writer; }; @@ -5300,7 +5300,7 @@ /** * LifecycleState enum. * @name google.logging.v2.LifecycleState - * @enum {string} + * @enum {number} * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value * @property {number} ACTIVE=1 ACTIVE value * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value @@ -5387,11 +5387,11 @@ ListBucketsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; @@ -5614,7 +5614,7 @@ if (message.buckets != null && message.buckets.length) for (var i = 0; i < message.buckets.length; ++i) $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -5850,11 +5850,11 @@ UpdateBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.bucket != null && message.hasOwnProperty("bucket")) + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -6074,7 +6074,7 @@ GetBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -6279,11 +6279,11 @@ ListSinksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; @@ -6506,7 +6506,7 @@ if (message.sinks != null && message.sinks.length) for (var i = 0; i < message.sinks.length; ++i) $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -6724,7 +6724,7 @@ GetSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; @@ -6929,11 +6929,11 @@ CreateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sink != null && message.hasOwnProperty("sink")) + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); return writer; }; @@ -7175,13 +7175,13 @@ UpdateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - if (message.sink != null && message.hasOwnProperty("sink")) + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -7412,7 +7412,7 @@ DeleteSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; @@ -7644,17 +7644,17 @@ LogExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.createTime != null && message.hasOwnProperty("createTime")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -7925,11 +7925,11 @@ ListExclusionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; @@ -8152,7 +8152,7 @@ if (message.exclusions != null && message.exclusions.length) for (var i = 0; i < message.exclusions.length; ++i) $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -8370,7 +8370,7 @@ GetExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -8566,9 +8566,9 @@ CreateExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -8790,11 +8790,11 @@ UpdateExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -9014,7 +9014,7 @@ DeleteExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -9201,7 +9201,7 @@ GetCmekSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -9406,11 +9406,11 @@ UpdateCmekSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) + if (message.cmekSettings != null && Object.hasOwnProperty.call(message, "cmekSettings")) $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -9648,11 +9648,11 @@ CmekSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); - if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + if (message.serviceAccountId != null && Object.hasOwnProperty.call(message, "serviceAccountId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountId); return writer; }; @@ -10144,26 +10144,26 @@ LogMetric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + if (message.metricDescriptor != null && Object.hasOwnProperty.call(message, "metricDescriptor")) $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + if (message.valueExtractor != null && Object.hasOwnProperty.call(message, "valueExtractor")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueExtractor); - if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) + if (message.labelExtractors != null && Object.hasOwnProperty.call(message, "labelExtractors")) for (var keys = Object.keys(message.labelExtractors), i = 0; i < keys.length; ++i) writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labelExtractors[keys[i]]).ldelim(); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -10447,7 +10447,7 @@ /** * ApiVersion enum. * @name google.logging.v2.LogMetric.ApiVersion - * @enum {string} + * @enum {number} * @property {number} V2=0 V2 value * @property {number} V1=1 V1 value */ @@ -10535,11 +10535,11 @@ ListLogMetricsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; @@ -10762,7 +10762,7 @@ if (message.metrics != null && message.metrics.length) for (var i = 0; i < message.metrics.length; ++i) $root.google.logging.v2.LogMetric.encode(message.metrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -10980,7 +10980,7 @@ GetLogMetricRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricName != null && message.hasOwnProperty("metricName")) + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); return writer; }; @@ -11176,9 +11176,9 @@ CreateLogMetricRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.metric != null && message.hasOwnProperty("metric")) + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -11391,9 +11391,9 @@ UpdateLogMetricRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricName != null && message.hasOwnProperty("metricName")) + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - if (message.metric != null && message.hasOwnProperty("metric")) + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -11597,7 +11597,7 @@ DeleteLogMetricRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricName != null && message.hasOwnProperty("metricName")) + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); return writer; }; @@ -11922,35 +11922,35 @@ HttpRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + if (message.requestMethod != null && Object.hasOwnProperty.call(message, "requestMethod")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestMethod); - if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + if (message.requestUrl != null && Object.hasOwnProperty.call(message, "requestUrl")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestUrl); - if (message.requestSize != null && message.hasOwnProperty("requestSize")) + if (message.requestSize != null && Object.hasOwnProperty.call(message, "requestSize")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestSize); - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.responseSize != null && message.hasOwnProperty("responseSize")) + if (message.responseSize != null && Object.hasOwnProperty.call(message, "responseSize")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.responseSize); - if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.userAgent); - if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + if (message.remoteIp != null && Object.hasOwnProperty.call(message, "remoteIp")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.remoteIp); - if (message.referer != null && message.hasOwnProperty("referer")) + if (message.referer != null && Object.hasOwnProperty.call(message, "referer")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.referer); - if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + if (message.cacheHit != null && Object.hasOwnProperty.call(message, "cacheHit")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.cacheHit); - if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + if (message.cacheValidatedWithOriginServer != null && Object.hasOwnProperty.call(message, "cacheValidatedWithOriginServer")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.cacheValidatedWithOriginServer); - if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + if (message.cacheLookup != null && Object.hasOwnProperty.call(message, "cacheLookup")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.cacheLookup); - if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + if (message.cacheFillBytes != null && Object.hasOwnProperty.call(message, "cacheFillBytes")) writer.uint32(/* id 12, wireType 0 =*/96).int64(message.cacheFillBytes); - if (message.serverIp != null && message.hasOwnProperty("serverIp")) + if (message.serverIp != null && Object.hasOwnProperty.call(message, "serverIp")) writer.uint32(/* id 13, wireType 2 =*/106).string(message.serverIp); - if (message.latency != null && message.hasOwnProperty("latency")) + if (message.latency != null && Object.hasOwnProperty.call(message, "latency")) $root.google.protobuf.Duration.encode(message.latency, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.protocol != null && message.hasOwnProperty("protocol")) + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) writer.uint32(/* id 15, wireType 2 =*/122).string(message.protocol); return writer; }; @@ -12286,7 +12286,7 @@ /** * LogSeverity enum. * @name google.logging.type.LogSeverity - * @enum {string} + * @enum {number} * @property {number} DEFAULT=0 DEFAULT value * @property {number} DEBUG=100 DEBUG value * @property {number} INFO=200 INFO value @@ -12329,7 +12329,7 @@ /** * FieldBehavior enum. * @name google.api.FieldBehavior - * @enum {string} + * @enum {number} * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value * @property {number} OPTIONAL=1 OPTIONAL value * @property {number} REQUIRED=2 REQUIRED value @@ -12450,18 +12450,18 @@ MonitoredResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); if (message.labels != null && message.labels.length) for (var i = 0; i < message.labels.length; ++i) $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; @@ -12767,9 +12767,9 @@ MonitoredResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && message.hasOwnProperty("labels")) + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; @@ -12998,9 +12998,9 @@ MonitoredResourceMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && message.hasOwnProperty("userLabels")) + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); return writer; @@ -13242,11 +13242,11 @@ LabelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && message.hasOwnProperty("valueType")) + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; @@ -13418,7 +13418,7 @@ /** * ValueType enum. * @name google.api.LabelDescriptor.ValueType - * @enum {string} + * @enum {number} * @property {number} STRING=0 STRING value * @property {number} BOOL=1 BOOL value * @property {number} INT64=2 INT64 value @@ -13437,7 +13437,7 @@ /** * LaunchStage enum. * @name google.api.LaunchStage - * @enum {string} + * @enum {number} * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value * @property {number} ALPHA=2 ALPHA value @@ -13558,18 +13558,18 @@ ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); if (message.pattern != null && message.pattern.length) for (var i = 0; i < message.pattern.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && message.hasOwnProperty("nameField")) + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && message.hasOwnProperty("history")) + if (message.history != null && Object.hasOwnProperty.call(message, "history")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && message.hasOwnProperty("plural")) + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && message.hasOwnProperty("singular")) + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; @@ -13789,7 +13789,7 @@ /** * History enum. * @name google.api.ResourceDescriptor.History - * @enum {string} + * @enum {number} * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value @@ -13870,9 +13870,9 @@ ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && message.hasOwnProperty("childType")) + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; @@ -14084,7 +14084,7 @@ if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; @@ -14398,26 +14398,26 @@ HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) + if (message.get != null && Object.hasOwnProperty.call(message, "get")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) + if (message.put != null && Object.hasOwnProperty.call(message, "put")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) + if (message.post != null && Object.hasOwnProperty.call(message, "post")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.additionalBindings != null && message.additionalBindings.length) for (var i = 0; i < message.additionalBindings.length; ++i) $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; @@ -14774,9 +14774,9 @@ CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; @@ -15031,15 +15031,15 @@ Distribution.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && Object.hasOwnProperty.call(message, "count")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && message.hasOwnProperty("mean")) + if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && message.hasOwnProperty("range")) + if (message.range != null && Object.hasOwnProperty.call(message, "range")) $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.bucketCounts != null && message.bucketCounts.length) { writer.uint32(/* id 7, wireType 2 =*/58).fork(); @@ -15382,9 +15382,9 @@ Range.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.min != null && message.hasOwnProperty("min")) + if (message.min != null && Object.hasOwnProperty.call(message, "min")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && message.hasOwnProperty("max")) + if (message.max != null && Object.hasOwnProperty.call(message, "max")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); return writer; }; @@ -15615,11 +15615,11 @@ BucketOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) + if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) + if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) + if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -15877,11 +15877,11 @@ Linear.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.width != null && message.hasOwnProperty("width")) + if (message.width != null && Object.hasOwnProperty.call(message, "width")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); - if (message.offset != null && message.hasOwnProperty("offset")) + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); return writer; }; @@ -16109,11 +16109,11 @@ Exponential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); - if (message.scale != null && message.hasOwnProperty("scale")) + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); return writer; }; @@ -16556,9 +16556,9 @@ Exemplar.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.attachments != null && message.attachments.length) for (var i = 0; i < message.attachments.length; ++i) @@ -16881,26 +16881,26 @@ MetricDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.labels != null && message.labels.length) for (var i = 0; i < message.labels.length; ++i) $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricKind != null && message.hasOwnProperty("metricKind")) + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && message.hasOwnProperty("valueType")) + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); - if (message.unit != null && message.hasOwnProperty("unit")) + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.metadata != null && message.hasOwnProperty("metadata")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); return writer; }; @@ -17321,11 +17321,11 @@ MetricDescriptorMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -17525,7 +17525,7 @@ /** * MetricKind enum. * @name google.api.MetricDescriptor.MetricKind - * @enum {string} + * @enum {number} * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value * @property {number} GAUGE=1 GAUGE value * @property {number} DELTA=2 DELTA value @@ -17543,7 +17543,7 @@ /** * ValueType enum. * @name google.api.MetricDescriptor.ValueType - * @enum {string} + * @enum {number} * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value * @property {number} BOOL=1 BOOL value * @property {number} INT64=2 INT64 value @@ -17633,10 +17633,10 @@ Metric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.labels != null && message.hasOwnProperty("labels")) + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); return writer; }; @@ -18180,9 +18180,9 @@ FileDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) @@ -18199,9 +18199,9 @@ if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.publicDependency != null && message.publicDependency.length) for (var i = 0; i < message.publicDependency.length; ++i) @@ -18209,7 +18209,7 @@ if (message.weakDependency != null && message.weakDependency.length) for (var i = 0; i < message.weakDependency.length; ++i) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); return writer; }; @@ -18747,7 +18747,7 @@ DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) @@ -18764,7 +18764,7 @@ if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.oneofDecl != null && message.oneofDecl.length) for (var i = 0; i < message.oneofDecl.length; ++i) @@ -19229,11 +19229,11 @@ ExtensionRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -19457,9 +19457,9 @@ ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -19950,25 +19950,25 @@ FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); return writer; }; @@ -20315,7 +20315,7 @@ /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} + * @enum {number} * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value * @property {number} TYPE_INT64=3 TYPE_INT64 value @@ -20361,7 +20361,7 @@ /** * Label enum. * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} + * @enum {number} * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value @@ -20442,9 +20442,9 @@ OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -20687,12 +20687,12 @@ EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) @@ -20995,9 +20995,9 @@ EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -21217,11 +21217,11 @@ EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -21455,12 +21455,12 @@ ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -21740,17 +21740,17 @@ MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); return writer; }; @@ -22189,45 +22189,45 @@ FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -22654,7 +22654,7 @@ /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} + * @enum {number} * @property {number} SPEED=1 SPEED value * @property {number} CODE_SIZE=2 CODE_SIZE value * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value @@ -22772,18 +22772,18 @@ MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; @@ -23125,17 +23125,17 @@ FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -23146,7 +23146,7 @@ writer.int32(message[".google.api.fieldBehavior"][i]); writer.ldelim(); } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; }; @@ -23482,7 +23482,7 @@ /** * CType enum. * @name google.protobuf.FieldOptions.CType - * @enum {string} + * @enum {number} * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value @@ -23498,7 +23498,7 @@ /** * JSType enum. * @name google.protobuf.FieldOptions.JSType - * @enum {string} + * @enum {number} * @property {number} JS_NORMAL=0 JS_NORMAL value * @property {number} JS_STRING=1 JS_STRING value * @property {number} JS_NUMBER=2 JS_NUMBER value @@ -23797,9 +23797,9 @@ EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -24042,7 +24042,7 @@ EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -24291,14 +24291,14 @@ ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; @@ -24577,9 +24577,9 @@ MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -24587,7 +24587,7 @@ if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; @@ -24821,7 +24821,7 @@ /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {string} + * @enum {number} * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value * @property {number} IDEMPOTENT=2 IDEMPOTENT value @@ -24951,17 +24951,17 @@ if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; @@ -25738,9 +25738,9 @@ writer.int32(message.span[i]); writer.ldelim(); } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) for (var i = 0; i < message.leadingDetachedComments.length; ++i) @@ -26271,11 +26271,11 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; @@ -26520,7 +26520,7 @@ Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && message.hasOwnProperty("fields")) + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); @@ -26793,17 +26793,17 @@ Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nullValue != null && message.hasOwnProperty("nullValue")) + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && message.hasOwnProperty("numberValue")) + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && message.hasOwnProperty("structValue")) + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && message.hasOwnProperty("listValue")) + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -27046,7 +27046,7 @@ /** * NullValue enum. * @name google.protobuf.NullValue - * @enum {string} + * @enum {number} * @property {number} NULL_VALUE=0 NULL_VALUE value */ protobuf.NullValue = (function() { @@ -27328,9 +27328,9 @@ Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; @@ -27552,9 +27552,9 @@ Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; @@ -27771,9 +27771,9 @@ Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; @@ -28380,9 +28380,9 @@ Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); if (message.details != null && message.details.length) for (var i = 0; i < message.details.length; ++i) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 436fc208646..70d15145837 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "ca899de645e0269e01bc1ca5fc703bbb5e9ad2ef" + "sha": "ac99c46010517da43bc38974cb62c83f5d7c5398" } }, { From 22f3f7d9759a95d72261d06e7aebfd8cf52835ef Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 23 Apr 2020 19:34:47 -0700 Subject: [PATCH 0604/1029] chore: update npm scripts and synth.py (#805) Update npm scripts: add clean, prelint, prefix; make sure that lint and fix are set properly. Use post-process feature of synthtool. --- handwritten/logging/package.json | 5 +++-- handwritten/logging/synth.py | 7 ++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 62fb1876c12..b81df3d0c86 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -34,13 +34,14 @@ "docs-test": "linkinator docs", "fix": "gts fix", "prelint": "cd samples; npm link ../; npm install", - "lint": "gts fix", + "lint": "gts check", "prepare": "npm run compile", "samples-test": "cd samples/ && npm link ../ && rm -rf node_modules && npm install && npm test && cd ../", "presystem-test": "npm run compile", "system-test": "mocha build/system-test --timeout 600000", "pretest": "npm run compile", - "test": "c8 mocha build/test" + "test": "c8 mocha build/test", + "precompile": "gts clean" }, "dependencies": { "@google-cloud/common": "^2.4.0", diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 3ed92ac15f5..0e52a23f213 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -16,8 +16,8 @@ import synthtool as s import synthtool.gcp as gcp +import synthtool.languages.node as node import logging -import subprocess import os logging.basicConfig(level=logging.DEBUG) @@ -48,7 +48,4 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates) -# Node.js specific cleanup -subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "fix"]) -subprocess.run(["npx", "compileProtos", "src"]) +node.postprocess_gapic_library() From 6f13b74a8686c78cf87ed163031b4d974b298259 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 May 2020 06:54:50 +0200 Subject: [PATCH 0605/1029] chore(deps): update dependency uuid to v8 (#807) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [uuid](https://togithub.com/uuidjs/uuid) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/uuid/7.0.3/8.0.0) | --- ### Release Notes
uuidjs/uuid ### [`v8.0.0`](https://togithub.com/uuidjs/uuid/blob/master/CHANGELOG.md#​800-httpsgithubcomuuidjsuuidcomparev703v800-2020-04-29) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) ##### ⚠ BREAKING CHANGES - For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. ```diff -import uuid from 'uuid'; -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' ``` - Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. Instead use the named exports that this module exports. For ECMAScript Modules (ESM): ```diff -import uuidv4 from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; uuidv4(); ``` For CommonJS: ```diff -const uuidv4 = require('uuid/v4'); +const { v4: uuidv4 } = require('uuid'); uuidv4(); ``` ##### Features - native Node.js ES Modules (wrapper approach) ([#​423](https://togithub.com/uuidjs/uuid/issues/423)) ([2d9f590](https://togithub.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#​245](https://togithub.com/uuidjs/uuid/issues/245) [#​419](https://togithub.com/uuidjs/uuid/issues/419) [#​342](https://togithub.com/uuidjs/uuid/issues/342) - remove deep requires ([#​426](https://togithub.com/uuidjs/uuid/issues/426)) ([daf72b8](https://togithub.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) ##### Bug Fixes - add CommonJS syntax example to README quickstart section ([#​417](https://togithub.com/uuidjs/uuid/issues/417)) ([e0ec840](https://togithub.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) ##### [7.0.3](https://togithub.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) ##### Bug Fixes - make deep require deprecation warning work in browsers ([#​409](https://togithub.com/uuidjs/uuid/issues/409)) ([4b71107](https://togithub.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#​408](https://togithub.com/uuidjs/uuid/issues/408) ##### [7.0.2](https://togithub.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) ##### Bug Fixes - make access to msCrypto consistent ([#​393](https://togithub.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://togithub.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) - simplify link in deprecation warning ([#​391](https://togithub.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://togithub.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) - update links to match content in readme ([#​386](https://togithub.com/uuidjs/uuid/issues/386)) ([44f2f86](https://togithub.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) ##### [7.0.1](https://togithub.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) ##### Bug Fixes - clean up esm builds for node and browser ([#​383](https://togithub.com/uuidjs/uuid/issues/383)) ([59e6a49](https://togithub.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) - provide browser versions independent from module system ([#​380](https://togithub.com/uuidjs/uuid/issues/380)) ([4344a22](https://togithub.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#​378](https://togithub.com/uuidjs/uuid/issues/378)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b81df3d0c86..884126d706a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -101,7 +101,7 @@ "sinon": "^9.0.1", "ts-loader": "^7.0.0", "typescript": "^3.8.3", - "uuid": "^7.0.2", + "uuid": "^8.0.0", "webpack": "^4.42.0", "webpack-cli": "^3.3.11" }, From c896ffa5a383d6d50529ca2227b46c4d011be32a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 May 2020 20:12:28 +0200 Subject: [PATCH 0606/1029] chore(deps): update dependency @types/tmp to ^0.2.0 (#808) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/tmp](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | minor | [`^0.1.0` -> `^0.2.0`](https://renovatebot.com/diffs/npm/@types%2ftmp/0.1.0/0.2.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 884126d706a..861f29505a4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -79,7 +79,7 @@ "@types/pumpify": "^1.4.1", "@types/sinon": "^9.0.0", "@types/through2": "^2.0.34", - "@types/tmp": "^0.1.0", + "@types/tmp": "^0.2.0", "@types/uuid": "^7.0.2", "bignumber.js": "^9.0.0", "c8": "^7.1.0", From a21ddd18996b9ea2edde97332c783745de769454 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 5 May 2020 10:56:48 -0700 Subject: [PATCH 0607/1029] feat: add Blunderbuss config (#806) --- handwritten/logging/.github/blunderbuss.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 handwritten/logging/.github/blunderbuss.yml diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml new file mode 100644 index 00000000000..613fbf7750e --- /dev/null +++ b/handwritten/logging/.github/blunderbuss.yml @@ -0,0 +1,6 @@ +assign_issues: + - sofisl + - bcoe +assign_prs: + - sofisl + - bcoe From 40df637da4ae239f489d282b24ba142ffa61d68a Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 5 May 2020 19:35:10 -0700 Subject: [PATCH 0608/1029] fix: linting and formatting (#809) --- handwritten/logging/synth.metadata | 14 +--- .../test/gapic_config_service_v2_v2.ts | 72 +++++-------------- .../test/gapic_logging_service_v2_v2.ts | 35 +++------ .../test/gapic_metrics_service_v2_v2.ts | 24 ++----- handwritten/logging/test/index.ts | 3 +- 5 files changed, 40 insertions(+), 108 deletions(-) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 70d15145837..f8a1b273101 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "ac99c46010517da43bc38974cb62c83f5d7c5398" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3824f547aa44df459580615c73cabb30a2a78ee0", - "internalRef": "306254195" + "remote": "git@github.com:googleapis/nodejs-logging.git", + "sha": "7f1eb6731208f99b530d9553da751dad04ec92a9" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" + "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" } } ], diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 48fbc6eb144..867eb44c68e 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -296,9 +296,7 @@ describe('v2.ConfigServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getBucket = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.getBucket(request); - }, expectedError); + await assert.rejects(client.getBucket(request), expectedError); assert( (client.innerApiCalls.getBucket as SinonStub) .getCall(0) @@ -410,9 +408,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateBucket(request); - }, expectedError); + await assert.rejects(client.updateBucket(request), expectedError); assert( (client.innerApiCalls.updateBucket as SinonStub) .getCall(0) @@ -521,9 +517,7 @@ describe('v2.ConfigServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getSink = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.getSink(request); - }, expectedError); + await assert.rejects(client.getSink(request), expectedError); assert( (client.innerApiCalls.getSink as SinonStub) .getCall(0) @@ -635,9 +629,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createSink(request); - }, expectedError); + await assert.rejects(client.createSink(request), expectedError); assert( (client.innerApiCalls.createSink as SinonStub) .getCall(0) @@ -749,9 +741,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateSink(request); - }, expectedError); + await assert.rejects(client.updateSink(request), expectedError); assert( (client.innerApiCalls.updateSink as SinonStub) .getCall(0) @@ -863,9 +853,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteSink(request); - }, expectedError); + await assert.rejects(client.deleteSink(request), expectedError); assert( (client.innerApiCalls.deleteSink as SinonStub) .getCall(0) @@ -977,9 +965,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getExclusion(request); - }, expectedError); + await assert.rejects(client.getExclusion(request), expectedError); assert( (client.innerApiCalls.getExclusion as SinonStub) .getCall(0) @@ -1091,9 +1077,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createExclusion(request); - }, expectedError); + await assert.rejects(client.createExclusion(request), expectedError); assert( (client.innerApiCalls.createExclusion as SinonStub) .getCall(0) @@ -1205,9 +1189,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateExclusion(request); - }, expectedError); + await assert.rejects(client.updateExclusion(request), expectedError); assert( (client.innerApiCalls.updateExclusion as SinonStub) .getCall(0) @@ -1319,9 +1301,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteExclusion(request); - }, expectedError); + await assert.rejects(client.deleteExclusion(request), expectedError); assert( (client.innerApiCalls.deleteExclusion as SinonStub) .getCall(0) @@ -1433,9 +1413,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getCmekSettings(request); - }, expectedError); + await assert.rejects(client.getCmekSettings(request), expectedError); assert( (client.innerApiCalls.getCmekSettings as SinonStub) .getCall(0) @@ -1549,9 +1527,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateCmekSettings(request); - }, expectedError); + await assert.rejects(client.updateCmekSettings(request), expectedError); assert( (client.innerApiCalls.updateCmekSettings as SinonStub) .getCall(0) @@ -1667,9 +1643,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listBuckets(request); - }, expectedError); + await assert.rejects(client.listBuckets(request), expectedError); assert( (client.innerApiCalls.listBuckets as SinonStub) .getCall(0) @@ -1753,9 +1727,7 @@ describe('v2.ConfigServiceV2Client', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listBuckets.createStream as SinonStub) .getCall(0) @@ -1950,9 +1922,7 @@ describe('v2.ConfigServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.listSinks = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.listSinks(request); - }, expectedError); + await assert.rejects(client.listSinks(request), expectedError); assert( (client.innerApiCalls.listSinks as SinonStub) .getCall(0) @@ -2035,9 +2005,7 @@ describe('v2.ConfigServiceV2Client', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) @@ -2230,9 +2198,7 @@ describe('v2.ConfigServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listExclusions(request); - }, expectedError); + await assert.rejects(client.listExclusions(request), expectedError); assert( (client.innerApiCalls.listExclusions as SinonStub) .getCall(0) @@ -2317,9 +2283,7 @@ describe('v2.ConfigServiceV2Client', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index b3dfb1141ba..981543550aa 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -296,9 +296,7 @@ describe('v2.LoggingServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.deleteLog = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.deleteLog(request); - }, expectedError); + await assert.rejects(client.deleteLog(request), expectedError); assert( (client.innerApiCalls.deleteLog as SinonStub) .getCall(0) @@ -386,9 +384,7 @@ describe('v2.LoggingServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.writeLogEntries(request); - }, expectedError); + await assert.rejects(client.writeLogEntries(request), expectedError); assert( (client.innerApiCalls.writeLogEntries as SinonStub) .getCall(0) @@ -480,9 +476,7 @@ describe('v2.LoggingServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listLogEntries(request); - }, expectedError); + await assert.rejects(client.listLogEntries(request), expectedError); assert( (client.innerApiCalls.listLogEntries as SinonStub) .getCall(0) @@ -556,9 +550,7 @@ describe('v2.LoggingServiceV2Client', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listLogEntries.createStream as SinonStub) .getCall(0) @@ -722,9 +714,10 @@ describe('v2.LoggingServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listMonitoredResourceDescriptors(request); - }, expectedError); + await assert.rejects( + client.listMonitoredResourceDescriptors(request), + expectedError + ); assert( (client.innerApiCalls.listMonitoredResourceDescriptors as SinonStub) .getCall(0) @@ -814,9 +807,7 @@ describe('v2.LoggingServiceV2Client', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listMonitoredResourceDescriptors .createStream as SinonStub) @@ -986,9 +977,7 @@ describe('v2.LoggingServiceV2Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.listLogs = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.listLogs(request); - }, expectedError); + await assert.rejects(client.listLogs(request), expectedError); assert( (client.innerApiCalls.listLogs as SinonStub) .getCall(0) @@ -1067,9 +1056,7 @@ describe('v2.LoggingServiceV2Client', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listLogs.createStream as SinonStub) .getCall(0) diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 79d4e147dfa..334387ddeeb 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -299,9 +299,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getLogMetric(request); - }, expectedError); + await assert.rejects(client.getLogMetric(request), expectedError); assert( (client.innerApiCalls.getLogMetric as SinonStub) .getCall(0) @@ -413,9 +411,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createLogMetric(request); - }, expectedError); + await assert.rejects(client.createLogMetric(request), expectedError); assert( (client.innerApiCalls.createLogMetric as SinonStub) .getCall(0) @@ -527,9 +523,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateLogMetric(request); - }, expectedError); + await assert.rejects(client.updateLogMetric(request), expectedError); assert( (client.innerApiCalls.updateLogMetric as SinonStub) .getCall(0) @@ -641,9 +635,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteLogMetric(request); - }, expectedError); + await assert.rejects(client.deleteLogMetric(request), expectedError); assert( (client.innerApiCalls.deleteLogMetric as SinonStub) .getCall(0) @@ -759,9 +751,7 @@ describe('v2.MetricsServiceV2Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listLogMetrics(request); - }, expectedError); + await assert.rejects(client.listLogMetrics(request), expectedError); assert( (client.innerApiCalls.listLogMetrics as SinonStub) .getCall(0) @@ -846,9 +836,7 @@ describe('v2.MetricsServiceV2Client', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listLogMetrics.createStream as SinonStub) .getCall(0) diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index b748f490d4b..edd7bf436c7 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -570,7 +570,8 @@ describe('Logging', () => { orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], }); - assert.strictEqual(reqOpts.gaxOptions, undefined); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + assert.strictEqual((reqOpts as any).gaxOptions, undefined); assert.deepStrictEqual(gaxOpts, options.gaxOptions); return [[]]; }; From 4d719dc1a07004d1948f82ed97f373386a743d23 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 May 2020 11:27:47 -0700 Subject: [PATCH 0609/1029] build: do not fail builds on codecov errors (#528) (#810) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2f68300a-9812-4342-86c6-33ab267ece4f/targets Source-Link: https://github.com/googleapis/synthtool/commit/be74d3e532faa47eb59f1a0eaebde0860d1d8ab4 --- handwritten/logging/synth.metadata | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index f8a1b273101..c683a95b094 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-logging.git", - "sha": "7f1eb6731208f99b530d9553da751dad04ec92a9" + "remote": "https://github.com/googleapis/nodejs-logging.git", + "sha": "739cc3a05d1085142ec96ec51f61401d03943876" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "83816bb3093686a28af2891db5b7506614a820b1", + "internalRef": "310509915" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" + "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" } } ], From 154f41a48060d50efd2886258c7b35621fcf11db Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 21 May 2020 17:36:28 -0700 Subject: [PATCH 0610/1029] test: skip failing test until we can dig into the issue (#817) --- handwritten/logging/system-test/logging.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 3d7437835fd..027f57e43b8 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -446,7 +446,10 @@ describe('Logging', async () => { await log.write(logEntries[1], options); }); - it('should write multiple entries to a log', done => { + // TODO(bcoe): this appears to be an actual regression with the API that + // we need to dig into `nonValue` is either not being written, or not being + // read appropriately from the API: + it.skip('should write multiple entries to a log', done => { const {log, logEntries} = getTestLog(); log.write(logEntries, options, err => { From 427008efcdc20c7020dfdb84c6cc69a793ee2d36 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 22 May 2020 03:46:06 +0200 Subject: [PATCH 0611/1029] fix(deps): update dependency @google-cloud/storage to v5 (#812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@google-cloud/storage](https://togithub.com/googleapis/nodejs-storage) | dependencies | major | [`^4.0.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fstorage/4.7.0/5.0.1) | | [@google-cloud/storage](https://togithub.com/googleapis/nodejs-storage) | devDependencies | major | [`^4.6.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fstorage/4.7.0/5.0.1) | --- ### Release Notes
googleapis/nodejs-storage ### [`v5.0.1`](https://togithub.com/googleapis/nodejs-storage/blob/master/CHANGELOG.md#​501-httpswwwgithubcomgoogleapisnodejs-storagecomparev500v501-2020-05-20) [Compare Source](https://togithub.com/googleapis/nodejs-storage/compare/v5.0.0...v5.0.1) ### [`v5.0.0`](https://togithub.com/googleapis/nodejs-storage/blob/master/CHANGELOG.md#​500-httpswwwgithubcomgoogleapisnodejs-storagecomparev470v500-2020-05-13) [Compare Source](https://togithub.com/googleapis/nodejs-storage/compare/v4.7.0...v5.0.0) ##### ⚠ BREAKING CHANGES - automatically detect contentType if not provided ([#​1190](https://togithub.com/googleapis/nodejs-storage/issues/1190)) - drop keepAcl parameter in file copy ([#​1166](https://togithub.com/googleapis/nodejs-storage/issues/1166)) - drop support for node.js 8.x ##### Features - automatically detect contentType if not provided ([#​1190](https://www.github.com/googleapis/nodejs-storage/issues/1190)) ([b31ba4a](https://www.github.com/googleapis/nodejs-storage/commit/b31ba4a11399b57538ddf0d6ca2e10b2aa3fbc3a)) - enable bytes read tracking ([#​1074](https://www.github.com/googleapis/nodejs-storage/issues/1074)) ([0776a04](https://www.github.com/googleapis/nodejs-storage/commit/0776a044f3b2149b485e114369e952688df75645)) ##### Bug Fixes - **bucket:** Only disable resumable uploads for bucket.upload (fixes [#​1133](https://www.github.com/googleapis/nodejs-storage/issues/1133)) ([#​1135](https://www.github.com/googleapis/nodejs-storage/issues/1135)) ([2c20148](https://www.github.com/googleapis/nodejs-storage/commit/2c201486b7b2d3146846ac96c877a904c4a674b0)), closes [/github.com/googleapis/nodejs-storage/pull/1135#issuecomment-620070038](https://www.github.com/googleapis//github.com/googleapis/nodejs-storage/pull/1135/issues/issuecomment-620070038) - add whitespace to generateV4SignedPolicy ([#​1136](https://www.github.com/googleapis/nodejs-storage/issues/1136)) ([dcee78b](https://www.github.com/googleapis/nodejs-storage/commit/dcee78b98da23b02fe7d2f13a9270546bc07bba8)) - apache license URL ([#​468](https://www.github.com/googleapis/nodejs-storage/issues/468)) ([#​1151](https://www.github.com/googleapis/nodejs-storage/issues/1151)) ([e8116d3](https://www.github.com/googleapis/nodejs-storage/commit/e8116d3c6fa7412858692e67745b514eef78850e)) - Point to team in correct org ([#​1185](https://www.github.com/googleapis/nodejs-storage/issues/1185)) ([0bb1909](https://www.github.com/googleapis/nodejs-storage/commit/0bb19098013acf71cc3842f78ff333a8e356331a)) - **deps:** update dependency [@​google-cloud/common](https://togithub.com/google-cloud/common) to v3 ([#​1134](https://www.github.com/googleapis/nodejs-storage/issues/1134)) ([774ac5c](https://www.github.com/googleapis/nodejs-storage/commit/774ac5c75f02238418cc8ed7242297ea573ca9cb)) - **deps:** update dependency [@​google-cloud/paginator](https://togithub.com/google-cloud/paginator) to v3 ([#​1131](https://www.github.com/googleapis/nodejs-storage/issues/1131)) ([c1614d9](https://www.github.com/googleapis/nodejs-storage/commit/c1614d98e3047db379e09299b1014e80d73ed52f)) - **deps:** update dependency [@​google-cloud/promisify](https://togithub.com/google-cloud/promisify) to v2 ([#​1127](https://www.github.com/googleapis/nodejs-storage/issues/1127)) ([06624a5](https://www.github.com/googleapis/nodejs-storage/commit/06624a534cd1fdbc38455eee8d89f9f60ba75758)) - **deps:** update dependency uuid to v8 ([#​1170](https://www.github.com/googleapis/nodejs-storage/issues/1170)) ([6a98d64](https://www.github.com/googleapis/nodejs-storage/commit/6a98d64831baf1ca1ec2f03ecc4914745cba1c86)) - **deps:** update gcs-resumable-upload, remove gitnpm usage ([#​1186](https://www.github.com/googleapis/nodejs-storage/issues/1186)) ([c78c9cd](https://www.github.com/googleapis/nodejs-storage/commit/c78c9cde49dccb2fcd4ce10e4e9f8299d65f6838)) - **v4-policy:** encode special characters ([#​1169](https://www.github.com/googleapis/nodejs-storage/issues/1169)) ([6e48539](https://www.github.com/googleapis/nodejs-storage/commit/6e48539d76ca27e6f4c6cf2ac0872970f7391fed)) - sync to [googleapis/conformance-tests@`fa559a1`](https://togithub.com/googleapis/conformance-tests/commit/fa559a1) ([#​1167](https://www.github.com/googleapis/nodejs-storage/issues/1167)) ([5500446](https://www.github.com/googleapis/nodejs-storage/commit/550044619d2f17a1977c83bce5df915c6dc9578c)), closes [#​1168](https://www.github.com/googleapis/nodejs-storage/issues/1168) ##### Miscellaneous Chores - drop keepAcl parameter in file copy ([#​1166](https://www.github.com/googleapis/nodejs-storage/issues/1166)) ([5a4044a](https://www.github.com/googleapis/nodejs-storage/commit/5a4044a8ba13f248fc4f791248f797eb0f1f3c16)) ##### Build System - drop support for node.js 8.x ([b80c025](https://www.github.com/googleapis/nodejs-storage/commit/b80c025f106052fd25554c64314b3b3520e829b5))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 861f29505a4..15a539f7749 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -67,7 +67,7 @@ "devDependencies": { "@google-cloud/bigquery": "^4.7.0", "@google-cloud/pubsub": "^1.6.0", - "@google-cloud/storage": "^4.6.0", + "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", "@types/is": "0.0.21", "@types/mocha": "^7.0.2", From ae95e286a7fd844d54ba023523b5de5aa05a998b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Jun 2020 20:02:16 +0200 Subject: [PATCH 0612/1029] chore(deps): update dependency @google-cloud/pubsub to v2 (#815) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 15a539f7749..4ea1fffe7fd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -66,7 +66,7 @@ }, "devDependencies": { "@google-cloud/bigquery": "^4.7.0", - "@google-cloud/pubsub": "^1.6.0", + "@google-cloud/pubsub": "^2.0.0", "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", "@types/is": "0.0.21", From f08da679575c44996dc56157d6c58b9d4bb9d2f9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Jun 2020 20:22:07 +0200 Subject: [PATCH 0613/1029] chore(deps): update dependency @types/uuid to v8 (#813) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/uuid](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.0.2` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@types%2fuuid/7.0.4/8.0.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 4ea1fffe7fd..350c2926db3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -80,7 +80,7 @@ "@types/sinon": "^9.0.0", "@types/through2": "^2.0.34", "@types/tmp": "^0.2.0", - "@types/uuid": "^7.0.2", + "@types/uuid": "^8.0.0", "bignumber.js": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", From 00be268da80e7f94df4aea0c299d9d4115c624f3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Jun 2020 23:28:17 +0200 Subject: [PATCH 0614/1029] fix(deps): update dependency type-fest to ^0.15.0 (#814) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [type-fest](https://togithub.com/sindresorhus/type-fest) | dependencies | minor | [`^0.13.0` -> `^0.15.0`](https://renovatebot.com/diffs/npm/type-fest/0.13.1/0.15.0) | --- ### Release Notes
sindresorhus/type-fest ### [`v0.15.0`](https://togithub.com/sindresorhus/type-fest/releases/v0.15.0) [Compare Source](https://togithub.com/sindresorhus/type-fest/compare/v0.14.0...v0.15.0) - Add support for ESM exports in the `PackageJson` type ([#​109](https://togithub.com/sindresorhus/type-fest/issues/109)) [`a2e0058`](https://togithub.com/sindresorhus/type-fest/commit/a2e0058) ### [`v0.14.0`](https://togithub.com/sindresorhus/type-fest/releases/v0.14.0) [Compare Source](https://togithub.com/sindresorhus/type-fest/compare/v0.13.1...v0.14.0) - Add [`FixedLengthArray`](https://togithub.com/sindresorhus/type-fest/commit/d08f010d91a96020e23d58c86ffc769e6302658c) type ([#​106](https://togithub.com/sindresorhus/type-fest/issues/106)) [`d08f010`](https://togithub.com/sindresorhus/type-fest/commit/d08f010)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 350c2926db3..c7d71bb806a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", "through2": "^3.0.1", - "type-fest": "^0.13.0" + "type-fest": "^0.15.0" }, "devDependencies": { "@google-cloud/bigquery": "^4.7.0", From e8d6499a8828aac7e37e84fdd773d1cf5f300240 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Jun 2020 17:51:18 +0200 Subject: [PATCH 0615/1029] fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.22 (#822) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c7d71bb806a..c16495829b4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -48,7 +48,7 @@ "@google-cloud/paginator": "^3.0.0", "@google-cloud/projectify": "^1.0.4", "@google-cloud/promisify": "^2.0.0", - "@opencensus/propagation-stackdriver": "0.0.21", + "@opencensus/propagation-stackdriver": "0.0.22", "arrify": "^2.0.1", "dot-prop": "^5.2.0", "eventid": "^1.0.0", From 6afa327d0c00bd969b73070879b391389b67ddc1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 9 Jun 2020 17:40:57 -0700 Subject: [PATCH 0616/1029] feat: move ts target to es2018 from es2016 (#825) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9b55eba7-85ee-48d5-a737-8b677439db4d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/1c92077459db3dc50741e878f98b08c6261181e0 --- .../logging/.kokoro/populate-secrets.sh | 32 +++++++++++++++++++ handwritten/logging/.kokoro/publish.sh | 2 +- .../logging/.kokoro/release/publish.cfg | 10 ++---- handwritten/logging/.kokoro/trampoline.sh | 1 + handwritten/logging/protos/protos.d.ts | 6 ++++ handwritten/logging/protos/protos.js | 28 ++++++++++++++-- handwritten/logging/protos/protos.json | 6 +++- .../src/v2/config_service_v2_client.ts | 7 ++++ .../src/v2/logging_service_v2_client.ts | 7 ++++ .../src/v2/metrics_service_v2_client.ts | 7 ++++ handwritten/logging/synth.metadata | 4 +-- handwritten/logging/tsconfig.json | 2 +- 12 files changed, 97 insertions(+), 15 deletions(-) create mode 100755 handwritten/logging/.kokoro/populate-secrets.sh diff --git a/handwritten/logging/.kokoro/populate-secrets.sh b/handwritten/logging/.kokoro/populate-secrets.sh new file mode 100755 index 00000000000..85801f403e2 --- /dev/null +++ b/handwritten/logging/.kokoro/populate-secrets.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2020 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --credential-file-override=${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json \ + --project cloud-devrel-kokoro-resources \ + --secret $key > \ + "$SECRET_LOCATION/$key" +done diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh index 08c6dfd2a88..24957d71def 100755 --- a/handwritten/logging/.kokoro/publish.sh +++ b/handwritten/logging/.kokoro/publish.sh @@ -24,7 +24,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source / cd $(dirname $0)/.. -NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-logging-npm-token) +NPM_TOKEN=$(cat $KOKORO_GFILE_DIR/secret_manager/npm_publish_token echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc npm install diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index b8c0a54c94f..a8cb1d7d119 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -47,13 +47,9 @@ before_action { } } -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google-cloud-logging-npm-token" - } - } +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "npm_publish_token" } # Download trampoline resources. diff --git a/handwritten/logging/.kokoro/trampoline.sh b/handwritten/logging/.kokoro/trampoline.sh index 9bd4905c4b5..a4241db23f4 100755 --- a/handwritten/logging/.kokoro/trampoline.sh +++ b/handwritten/logging/.kokoro/trampoline.sh @@ -24,4 +24,5 @@ function cleanup() { } trap cleanup EXIT +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 9d16044f366..45ee7dced9e 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -8089,6 +8089,9 @@ export namespace google { /** FieldDescriptorProto options */ options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } /** Represents a FieldDescriptorProto. */ @@ -8130,6 +8133,9 @@ export namespace google { /** FieldDescriptorProto options. */ public options?: (google.protobuf.IFieldOptions|null); + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + /** * Creates a new FieldDescriptorProto instance using the specified properties. * @param [properties] Properties to set diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index f3da74d87b1..ea43e76cc13 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_logging_7_3_0_protos || ($protobuf.roots._google_cloud_logging_7_3_0_protos = {}); + var $root = $protobuf.roots._google_cloud_logging_protos || ($protobuf.roots._google_cloud_logging_protos = {}); $root.google = (function() { @@ -19829,6 +19829,7 @@ * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex * @property {string|null} [jsonName] FieldDescriptorProto jsonName * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional */ /** @@ -19926,6 +19927,14 @@ */ FieldDescriptorProto.prototype.options = null; + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + /** * Creates a new FieldDescriptorProto instance using the specified properties. * @function create @@ -19970,6 +19979,8 @@ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); return writer; }; @@ -20034,6 +20045,9 @@ case 8: message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); break; + case 17: + message.proto3Optional = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -20128,6 +20142,9 @@ if (error) return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; @@ -20250,6 +20267,8 @@ throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); return message; }; @@ -20277,6 +20296,7 @@ object.options = null; object.oneofIndex = 0; object.jsonName = ""; + object.proto3Optional = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -20298,6 +20318,8 @@ object.oneofIndex = message.oneofIndex; if (message.jsonName != null && message.hasOwnProperty("jsonName")) object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; return object; }; @@ -22091,7 +22113,7 @@ * @memberof google.protobuf.FileOptions * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileOptions.prototype.ccEnableArenas = true; /** * FileOptions objcClassPrefix. @@ -22577,7 +22599,7 @@ object.javaGenerateEqualsAndHash = false; object.deprecated = false; object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; + object.ccEnableArenas = true; object.objcClassPrefix = ""; object.csharpNamespace = ""; object.swiftPrefix = ""; diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 5a1dfd8e607..561b3665a5f 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -2256,6 +2256,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -2491,7 +2495,7 @@ "type": "bool", "id": 31, "options": { - "default": false + "default": true } }, "objcClassPrefix": { diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index a73e78c77b2..821ead50055 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -99,6 +99,13 @@ export class ConfigServiceV2Client { } opts.servicePath = opts.servicePath || servicePath; opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; const isBrowser = typeof window !== 'undefined'; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 77d9d1ef1d2..fcb9ef4be4e 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -99,6 +99,13 @@ export class LoggingServiceV2Client { } opts.servicePath = opts.servicePath || servicePath; opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; const isBrowser = typeof window !== 'undefined'; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 30f5a440203..296abab0723 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -99,6 +99,13 @@ export class MetricsServiceV2Client { } opts.servicePath = opts.servicePath || servicePath; opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; const isBrowser = typeof window !== 'undefined'; diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index c683a95b094..2047230692b 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "739cc3a05d1085142ec96ec51f61401d03943876" + "sha": "6f1d18ec05bbdc9666dfd350b4125761fa4a984e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" + "sha": "1c92077459db3dc50741e878f98b08c6261181e0" } } ], diff --git a/handwritten/logging/tsconfig.json b/handwritten/logging/tsconfig.json index 613d35597b5..c78f1c884ef 100644 --- a/handwritten/logging/tsconfig.json +++ b/handwritten/logging/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2016", + "es2018", "dom" ] }, From 89fd8965e48d7c93b0890dfc6dfac9a36e974fd3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2020 09:07:45 -0700 Subject: [PATCH 0617/1029] chore(nodejs_templates): add script logging to node_library populate-secrets.sh (#827) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e306327b-605f-4c07-9420-c106e40c47d5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/e7034945fbdc0e79d3c57f6e299e5c90b0f11469 --- handwritten/logging/.kokoro/populate-secrets.sh | 12 ++++++++++++ handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.kokoro/populate-secrets.sh b/handwritten/logging/.kokoro/populate-secrets.sh index 85801f403e2..e6ce8200d75 100755 --- a/handwritten/logging/.kokoro/populate-secrets.sh +++ b/handwritten/logging/.kokoro/populate-secrets.sh @@ -15,12 +15,19 @@ set -eo pipefail +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + # Populates requested secrets set in SECRET_MANAGER_KEYS from service account: # kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" mkdir -p ${SECRET_LOCATION} for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") do + msg "Retrieving secret ${key}" docker run --entrypoint=gcloud \ --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ gcr.io/google.com/cloudsdktool/cloud-sdk \ @@ -29,4 +36,9 @@ do --project cloud-devrel-kokoro-resources \ --secret $key > \ "$SECRET_LOCATION/$key" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi done diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 2047230692b..5854e3cb847 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "6f1d18ec05bbdc9666dfd350b4125761fa4a984e" + "sha": "8b73243bea64f6026718af9f567e3af1bd151061" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1c92077459db3dc50741e878f98b08c6261181e0" + "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" } } ], From 8e0e530ff6bd918817120da39255bb9222c7d100 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 11 Jun 2020 16:16:35 -0700 Subject: [PATCH 0618/1029] fix(sample-test): we shouldn't delete node_modules after link --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c16495829b4..c8e0985d778 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -36,7 +36,7 @@ "prelint": "cd samples; npm link ../; npm install", "lint": "gts check", "prepare": "npm run compile", - "samples-test": "cd samples/ && npm link ../ && rm -rf node_modules && npm install && npm test && cd ../", + "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "presystem-test": "npm run compile", "system-test": "mocha build/system-test --timeout 600000", "pretest": "npm run compile", From 9fc0aab7b8b8489b7c8c3f1f7258ad93f8b7e883 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 12 Jun 2020 10:41:49 -0700 Subject: [PATCH 0619/1029] fix: handle fallback option properly (#832) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * chore: set Ruby namespace in proto options PiperOrigin-RevId: 316038172 Source-Author: Google APIs Source-Date: Thu Jun 11 21:09:51 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: e0558da52e48b9f1a4bd5104e6b5e219a48f1dec Source-Link: https://github.com/googleapis/googleapis/commit/e0558da52e48b9f1a4bd5104e6b5e219a48f1dec --- .../protos/google/logging/v2/log_entry.proto | 1 + .../logging/protos/google/logging/v2/logging.proto | 1 + .../protos/google/logging/v2/logging_config.proto | 1 + .../protos/google/logging/v2/logging_metrics.proto | 1 + handwritten/logging/protos/protos.json | 1 + .../logging/src/v2/config_service_v2_client.ts | 13 +++++-------- .../logging/src/v2/logging_service_v2_client.ts | 13 +++++-------- .../logging/src/v2/metrics_service_v2_client.ts | 13 +++++-------- handwritten/logging/synth.metadata | 6 +++--- 9 files changed, 23 insertions(+), 27 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 351f9e632b0..d2a172ec266 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -34,6 +34,7 @@ option java_multiple_files = true; option java_outer_classname = "LogEntryProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // An individual entry in a log. // diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index 36a81dcc259..8a2a8a580de 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -35,6 +35,7 @@ option java_multiple_files = true; option java_outer_classname = "LoggingProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // Service for ingesting and querying logs. service LoggingServiceV2 { diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index b7cb9c94a7b..5fd8d496de8 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -32,6 +32,7 @@ option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; option (google.api.resource_definition) = { type: "logging.googleapis.com/OrganizationLocation" pattern: "organizations/{organization}/locations/{location}" diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 518b6f69119..e147578a7cb 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -34,6 +34,7 @@ option java_multiple_files = true; option java_outer_classname = "LoggingMetricsProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // Service for configuring logs-based metrics. service MetricsServiceV2 { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 561b3665a5f..42866c51573 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -13,6 +13,7 @@ "java_outer_classname": "LoggingMetricsProto", "java_package": "com.google.logging.v2", "php_namespace": "Google\\Cloud\\Logging\\V2", + "ruby_package": "Google::Cloud::Logging::V2", "(google.api.resource_definition).type": "logging.googleapis.com/BillingAccountLocation", "(google.api.resource_definition).pattern": "billingAccounts/{billing_account}/locations/{location}" }, diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 821ead50055..0985a6016c7 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -108,14 +108,11 @@ export class ConfigServiceV2Client { // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the ConfigServiceV2Client constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index fcb9ef4be4e..c2d380aba17 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -108,14 +108,11 @@ export class LoggingServiceV2Client { // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the LoggingServiceV2Client constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 296abab0723..39f60e5d086 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -108,14 +108,11 @@ export class MetricsServiceV2Client { // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the MetricsServiceV2Client constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 5854e3cb847..c79b8a09d86 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "8b73243bea64f6026718af9f567e3af1bd151061" + "sha": "aa4850b39411afd82977e0ecba7a7a4b821332bd" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "83816bb3093686a28af2891db5b7506614a820b1", - "internalRef": "310509915" + "sha": "e0558da52e48b9f1a4bd5104e6b5e219a48f1dec", + "internalRef": "316038172" } }, { From 356c22d66f4c089adbdb28202c85daea8347a67b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 12 Jun 2020 20:55:04 +0200 Subject: [PATCH 0620/1029] chore(deps): update dependency mocha to v8 (#831) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c8e0985d778..6643833ae8e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -91,7 +91,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", "linkinator": "^2.0.3", - "mocha": "^7.1.1", + "mocha": "^8.0.0", "mv": "^2.1.1", "ncp": "^2.0.0", "nock": "^12.0.3", From 559e1853d0c8c79d1b35bb24112f5938cfc7e85b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2020 23:07:11 -0700 Subject: [PATCH 0621/1029] chore: release 8.0.0 (#829) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Benjamin E. Coe --- handwritten/logging/CHANGELOG.md | 33 ++++++++++++++++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 0355bef48e5..ec377a767f5 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,39 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [8.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v7.3.0...v8.0.0) (2020-06-12) + + +### ⚠ BREAKING CHANGES + +* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. +* move API to Typescript generation (#758) +* proto annotations + +### Features + +* add Blunderbuss config ([#806](https://www.github.com/googleapis/nodejs-logging/issues/806)) ([7f1eb67](https://www.github.com/googleapis/nodejs-logging/commit/7f1eb6731208f99b530d9553da751dad04ec92a9)) +* drop node8 support, support for async iterators ([#778](https://www.github.com/googleapis/nodejs-logging/issues/778)) ([ce29b49](https://www.github.com/googleapis/nodejs-logging/commit/ce29b498ebb357403c093053d1b9989f1a56f5af)) +* move API to Typescript generation ([#758](https://www.github.com/googleapis/nodejs-logging/issues/758)) ([049ae83](https://www.github.com/googleapis/nodejs-logging/commit/049ae8367dcd2b63c951d7c730548c5e88f72fa7)) +* move ts target to es2018 from es2016 ([#825](https://www.github.com/googleapis/nodejs-logging/issues/825)) ([8b73243](https://www.github.com/googleapis/nodejs-logging/commit/8b73243bea64f6026718af9f567e3af1bd151061)) + + +### Bug Fixes + +* explicit export of protobuf.roots ([#781](https://www.github.com/googleapis/nodejs-logging/issues/781)) ([12808be](https://www.github.com/googleapis/nodejs-logging/commit/12808be22cfc9e5fc8a0c8b24203d2584e812204)) +* handle fallback option properly ([#832](https://www.github.com/googleapis/nodejs-logging/issues/832)) ([6355b20](https://www.github.com/googleapis/nodejs-logging/commit/6355b20a19d7224acf0e2cec103aa095fc62efce)) +* linting and formatting ([#809](https://www.github.com/googleapis/nodejs-logging/issues/809)) ([739cc3a](https://www.github.com/googleapis/nodejs-logging/commit/739cc3a05d1085142ec96ec51f61401d03943876)) +* proto annotations ([e31cc01](https://www.github.com/googleapis/nodejs-logging/commit/e31cc01d5be8a150b370cf5000eedb7cbf175d0c)) +* remove eslint, update gax, fix generated protos, run the generator ([#789](https://www.github.com/googleapis/nodejs-logging/issues/789)) ([d1df1bd](https://www.github.com/googleapis/nodejs-logging/commit/d1df1bdc1d536d3626dc1b85d357cf6ec18f80e8)) +* **deps:** update dependency @google-cloud/paginator to v3 ([#766](https://www.github.com/googleapis/nodejs-logging/issues/766)) ([58fe7b0](https://www.github.com/googleapis/nodejs-logging/commit/58fe7b02defa33e89ef980fc3234e47e72a08436)) +* **deps:** update dependency @google-cloud/promisify to v2 ([#763](https://www.github.com/googleapis/nodejs-logging/issues/763)) ([d3fd09d](https://www.github.com/googleapis/nodejs-logging/commit/d3fd09dae00df3787122b24f25f3347e3653eb52)) +* **deps:** update dependency @google-cloud/storage to v5 ([#812](https://www.github.com/googleapis/nodejs-logging/issues/812)) ([b1be6c4](https://www.github.com/googleapis/nodejs-logging/commit/b1be6c45e88d05204bfbbb05e31f16a3ef909e52)) +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.21 ([#771](https://www.github.com/googleapis/nodejs-logging/issues/771)) ([958d186](https://www.github.com/googleapis/nodejs-logging/commit/958d1868da318fd08b543350daca7d2d33f331a8)) +* **deps:** update dependency @opencensus/propagation-stackdriver to v0.0.22 ([#822](https://www.github.com/googleapis/nodejs-logging/issues/822)) ([6f1d18e](https://www.github.com/googleapis/nodejs-logging/commit/6f1d18ec05bbdc9666dfd350b4125761fa4a984e)) +* **deps:** update dependency type-fest to ^0.13.0 ([#782](https://www.github.com/googleapis/nodejs-logging/issues/782)) ([13dcb78](https://www.github.com/googleapis/nodejs-logging/commit/13dcb786dec3400afc8c7ef1753fe7c0840542e2)) +* **deps:** update dependency type-fest to ^0.15.0 ([#814](https://www.github.com/googleapis/nodejs-logging/issues/814)) ([2fc7eed](https://www.github.com/googleapis/nodejs-logging/commit/2fc7eed13c55320688b79513541ae9348bcd9ae0)) +* **sample-test:** we shouldn't delete node_modules after link ([aa4850b](https://www.github.com/googleapis/nodejs-logging/commit/aa4850b39411afd82977e0ecba7a7a4b821332bd)) + ## [7.3.0](https://www.github.com/googleapis/nodejs-logging/compare/v7.2.3...v7.3.0) (2020-03-11) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6643833ae8e..ac6f63b5f85 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "7.3.0", + "version": "8.0.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From eac495b65d2e8433c4dd60c9e91c396d81318bc8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Jun 2020 01:38:50 +0200 Subject: [PATCH 0622/1029] chore(deps): update dependency http2spy to v2 (#830) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ac6f63b5f85..3b26935a8ee 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -86,7 +86,7 @@ "codecov": "^3.6.5", "execa": "^4.0.0", "gts": "^2.0.0", - "http2spy": "^1.1.0", + "http2spy": "^2.0.0", "jsdoc": "^3.6.3", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", From e5e4370fed29e841dc5d983dc74f2079a39f1120 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 18 Jun 2020 07:48:50 -0700 Subject: [PATCH 0623/1029] chore: update node issue template (#834) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/37f383f8-7560-459e-b66c-def10ff830cb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/b10590a4a1568548dd13cfcea9aa11d40898144b --- .../logging/.github/ISSUE_TEMPLATE/bug_report.md | 11 ++++++++--- handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md b/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md index b5badf84eb3..b262497bf53 100644 --- a/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md +++ b/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,13 +8,18 @@ Thanks for stopping by to let us know something could be better! **PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. -Please run down the following list and make sure you've tried the usual "quick fixes": +1) Is this a client library issue or a product issue? +This is the client library for . We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the [ Support page]() to reach the most relevant engineers. +2) Did someone already solve this? - Search the issues already opened: https://github.com/googleapis/nodejs-logging/issues - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node - - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js + - Search or ask on StackOverflow (engineers monitor these tags): http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js -If you are still having issues, please be sure to include as much information as possible: +3) Do you have a support contract? +Please create an issue in the [support console](https://cloud.google.com/support/) to ensure a timely response. + +If the support paths suggested above still do not result in a resolution, please provide the following details. #### Environment details diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index c79b8a09d86..42f94c74b9b 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "aa4850b39411afd82977e0ecba7a7a4b821332bd" + "sha": "caaba33b1ba8e094757ca2c1cc7957fc55dad62c" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" + "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" } } ], From 3318c1b87988f483bef4a8112eb1dd5f641363ab Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Jun 2020 19:00:00 +0200 Subject: [PATCH 0624/1029] chore(deps): update dependency @google-cloud/bigquery to v5 (#837) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3b26935a8ee..e2a3e00b944 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -65,7 +65,7 @@ "type-fest": "^0.15.0" }, "devDependencies": { - "@google-cloud/bigquery": "^4.7.0", + "@google-cloud/bigquery": "^5.0.0", "@google-cloud/pubsub": "^2.0.0", "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", From 319b9650c77098015bad6d4a94e36a13b630c7e6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 27 Jun 2020 17:47:09 -0700 Subject: [PATCH 0625/1029] build: add config .gitattributes (#839) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2a81bca4-7abd-4108-ac1f-21340f858709/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/dc9caca650c77b7039e2bbc3339ffb34ae78e5b7 --- handwritten/logging/.gitattributes | 3 +++ handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 handwritten/logging/.gitattributes diff --git a/handwritten/logging/.gitattributes b/handwritten/logging/.gitattributes new file mode 100644 index 00000000000..2e63216ae9c --- /dev/null +++ b/handwritten/logging/.gitattributes @@ -0,0 +1,3 @@ +*.ts text eol=lf +*.js test eol=lf +protos/* linguist-generated diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 42f94c74b9b..da7494e9604 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "caaba33b1ba8e094757ca2c1cc7957fc55dad62c" + "sha": "237fa098347bebda8358f9894bf10480dfebc6fd" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" + "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" } } ], From 3e240b2dcec18540fc75787c322d17dff600193c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 29 Jun 2020 18:43:13 +0200 Subject: [PATCH 0626/1029] chore(deps): update dependency nock to v13 (#842) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [nock](https://togithub.com/nock/nock) | devDependencies | major | [`^12.0.3` -> `^13.0.0`](https://renovatebot.com/diffs/npm/nock/12.0.3/13.0.0) | --- ### Release Notes
nock/nock ### [`v13.0.0`](https://togithub.com/nock/nock/releases/v13.0.0) [Compare Source](https://togithub.com/nock/nock/compare/v12.0.3...v13.0.0) See the [Migration Guide](https://togithub.com/nock/nock/blob/75507727cf09a0b7bf0aa7ebdf3621952921b82e/migration_guides/migrating_to_13.md) ##### Breaking changes 1. `Scope.log` has been removed. Use the `debug` library when [debugging](https://togithub.com/nock/nock#debugging) failed matches. 2. `socketDelay` has been removed. Use [`delayConnection`](https://togithub.com/nock/nock#delay-the-connection) instead. 3. `delay`, `delayConnection`, and `delayBody` are now setters instead of additive. 4. [When recording](https://togithub.com/nock/nock#recording), skipping body matching using `*` is no longer supported by `nock.define`. Set the definition body to `undefined` instead. 5. `ClientRequest.abort()` has been updated to align with Node's native behavior. This could be considered a feature, however, it created some subtle differences that are not backwards compatible. Refer to the migration guide for details. 6. Playback of a mocked responses will now never happen until the 'socket' event is emitted.
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e2a3e00b944..c4a1f93e1f1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -94,7 +94,7 @@ "mocha": "^8.0.0", "mv": "^2.1.1", "ncp": "^2.0.0", - "nock": "^12.0.3", + "nock": "^13.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", From 26d8ecd4b46ab5695672e3c906dc4001f0a3fec7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 29 Jun 2020 19:25:33 +0200 Subject: [PATCH 0627/1029] fix(deps): update dependency through2 to v4 (#838) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c4a1f93e1f1..67630da3081 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,7 +61,7 @@ "pumpify": "^2.0.1", "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", - "through2": "^3.0.1", + "through2": "^4.0.0", "type-fest": "^0.15.0" }, "devDependencies": { From cc59ad11605ee64a6ac682202aae21923dc45583 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 29 Jun 2020 22:29:12 +0200 Subject: [PATCH 0628/1029] fix(deps): update dependency type-fest to ^0.16.0 (#840) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 67630da3081..1d1a7e3a684 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", "through2": "^4.0.0", - "type-fest": "^0.15.0" + "type-fest": "^0.16.0" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", From beb1666e1fd93e69aedef5dff133ab2a3307c0b4 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 6 Jul 2020 10:16:36 -0700 Subject: [PATCH 0629/1029] build: use bazel build (#844) --- handwritten/logging/synth.metadata | 18 +++++------------- handwritten/logging/synth.py | 15 ++------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index da7494e9604..c31dc1afa6a 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "237fa098347bebda8358f9894bf10480dfebc6fd" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e0558da52e48b9f1a4bd5104e6b5e219a48f1dec", - "internalRef": "316038172" + "remote": "git@github.com:googleapis/nodejs-logging.git", + "sha": "1db672d746b1e02e667213b32c45d0f0e1aab781" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], @@ -29,8 +21,8 @@ "source": "googleapis", "apiName": "logging", "apiVersion": "v2", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 0e52a23f213..e5ea27edc7b 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -26,21 +26,10 @@ s.metadata.set_track_obsolete_files(True) -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() version='v2' # tasks has two product names, and a poorly named artman yaml -v2_library = gapic.typescript_library( - "logging", - version, - generator_args={ - "grpc-service-config": f"google/logging/{version}/logging_grpc_service_config.json", - "package-name": "@google-cloud/logging", - "main-service": "logging", - "bundle-config": f"google/logging/{version}/logging_gapic.yaml" - }, - proto_path=f'/google/logging/{version}', - extra_proto_files=['google/cloud/common_resources.proto'], -) +v2_library = gapic.node_library("logging", version, proto_path=f'google/logging/{version}') s.copy(v2_library, excludes=["src/index.ts", "README.md", "package.json", "system-test/fixtures/sample/src/index.js", "system-test/fixtures/sample/src/index.ts"]) # Copy in templated files From 36a6248c97ca292b224361910e74cb54cf9ef3e7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 6 Jul 2020 11:42:10 -0700 Subject: [PATCH 0630/1029] chore: update CODEOWNERS (#845) --- handwritten/logging/.github/CODEOWNERS | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 handwritten/logging/.github/CODEOWNERS diff --git a/handwritten/logging/.github/CODEOWNERS b/handwritten/logging/.github/CODEOWNERS new file mode 100644 index 00000000000..d904d1e2bde --- /dev/null +++ b/handwritten/logging/.github/CODEOWNERS @@ -0,0 +1,9 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. +# +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + + +# The yoshi-nodejs team is the default owner for nodejs repositories. +* @googleapis/yoshi-nodejs From 7e1dcb01338016b2266d6be60478109c12811307 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2020 21:40:52 -0700 Subject: [PATCH 0631/1029] chore: release 8.0.1 (#843) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ec377a767f5..61181b19864 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.1](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.0...v8.0.1) (2020-07-06) + + +### Bug Fixes + +* **deps:** update dependency through2 to v4 ([#838](https://www.github.com/googleapis/nodejs-logging/issues/838)) ([9c9c302](https://www.github.com/googleapis/nodejs-logging/commit/9c9c3020a7fb3f11896b4024d1e7e6e62df68a46)) +* **deps:** update dependency type-fest to ^0.16.0 ([#840](https://www.github.com/googleapis/nodejs-logging/issues/840)) ([1db672d](https://www.github.com/googleapis/nodejs-logging/commit/1db672d746b1e02e667213b32c45d0f0e1aab781)) + ## [8.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v7.3.0...v8.0.0) (2020-06-12) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1d1a7e3a684..2fa63995e45 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.0", + "version": "8.0.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 664f44ea1753d5eaf1611f73ed66ff46a9263cfe Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 10 Jul 2020 19:04:35 -0700 Subject: [PATCH 0632/1029] changes without context (#846) --- .../protos/google/logging/v2/log_entry.proto | 10 +-- .../protos/google/logging/v2/logging.proto | 34 ++++++---- .../google/logging/v2/logging_config.proto | 68 +++++++++++-------- .../google/logging/v2/logging_metrics.proto | 6 +- .../src/v2/config_service_v2_client.ts | 9 ++- .../v2/config_service_v2_client_config.json | 19 ++++-- .../src/v2/logging_service_v2_client.ts | 63 +++++++++-------- .../v2/logging_service_v2_client_config.json | 15 ++-- .../v2/metrics_service_v2_client_config.json | 13 ++-- handwritten/logging/synth.metadata | 12 +++- 10 files changed, 147 insertions(+), 102 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index d2a172ec266..3ad2cfbb583 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -106,11 +106,11 @@ message LogEntry { // current time. Timestamps have nanosecond accuracy, but trailing zeros in // the fractional seconds might be omitted when the timestamp is displayed. // - // Incoming log entries should have timestamps that are no more than the [logs - // retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours - // in the future. Log entries outside those time boundaries will not be - // available when calling `entries.list`, but those log entries can still be - // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + // Incoming log entries must have timestamps that don't exceed the + // [logs retention + // period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + // the past, and that don't exceed 24 hours in the future. Log entries outside + // those time boundaries aren't ingested by Logging. google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index 8a2a8a580de..58647b92ff0 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -24,6 +24,7 @@ import "google/logging/v2/log_entry.proto"; import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "google/api/annotations.proto"; @@ -87,7 +88,8 @@ service LoggingServiceV2 { // Lists log entries. Use this method to retrieve log entries that originated // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). + // entries, see [Exporting + // Logs](https://cloud.google.com/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -203,15 +205,16 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than - // 24 hours in the future will not be available when calling `entries.list`. - // However, those log entries can still be - // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + // [logs retention period](https://cloud.google.com/logging/quota-policy) in + // the past or more than 24 hours in the future will not be available when + // calling `entries.list`. However, those log entries can still be [exported + // with + // LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, - // you should try to include several log entries in this list, - // rather than calling this method for each individual log entry. + // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + // `entries.write`, you should try to include several log entries in this + // list, rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. Whether valid entries should be written even if some other @@ -261,12 +264,12 @@ message ListLogEntriesRequest { ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. + // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). + // 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. string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. How the results should be sorted. Presently, the only permitted @@ -278,7 +281,8 @@ message ListLogEntriesRequest { string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `next_page_token` in the + // Default is 50. If the value is negative or exceeds 1000, + // the request is rejected. The presence of `next_page_token` in the // response indicates that more results might be available. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 5fd8d496de8..9486f4a9a4f 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -382,7 +382,8 @@ service ConfigServiceV2 { // the GCP organization. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" @@ -405,7 +406,8 @@ service ConfigServiceV2 { // 3) access to the key is disabled. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { patch: "/v2/{name=*/*}/cmekSettings" @@ -474,9 +476,7 @@ message LogSink { pattern: "billingAccounts/{billing_account}/sinks/{sink}" }; - // Available log entry formats. Log entries can be written to - // Logging in either format and can be exported in either format. - // Version 2 is the preferred format. + // Deprecated. This is unused. enum VersionFormat { // An unspecified format version that will default to V2. VERSION_FORMAT_UNSPECIFIED = 0; @@ -504,7 +504,8 @@ message LogSink { // 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](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + // [Exporting Logs with + // Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). string destination = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -512,9 +513,10 @@ message LogSink { } ]; - // Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only - // exported log entries are those that are in the resource owning the sink and - // that match the filter. For example: + // Optional. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced-queries). The + // only exported log entries are those that are in the resource owning the + // sink and that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR string filter = 5 [(google.api.field_behavior) = OPTIONAL]; @@ -527,8 +529,7 @@ message LogSink { // export any log entries. bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; - // Deprecated. The log entry format to use for this sink's exported log - // entries. The v2 format is used by default and cannot be changed. + // Deprecated. This field is unused. VersionFormat output_version_format = 6 [deprecated = true]; // Output only. An IAM identity–a service account or group—under which Logging @@ -580,12 +581,13 @@ message LogSink { // Options that change functionality of a sink exporting data to BigQuery. message BigQueryOptions { // Optional. Whether to use [BigQuery's partition - // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging - // creates dated tables based on the log entries' timestamps, e.g. - // syslog_20170523. With partitioned tables the date suffix is no longer + // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By + // default, Logging creates dated tables based on the log entries' timestamps, + // e.g. syslog_20170523. With partitioned tables the date suffix is no longer // present and [special query - // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. - // In both cases, tables are sharded based on UTC timezone. + // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + // has to be used instead. In both cases, tables are sharded based on UTC + // timezone. bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. True if new timestamp column based partitioning is in use, @@ -626,7 +628,8 @@ message ListBucketsRequest { (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { child_type: "logging.googleapis.com/LogBucket" - }]; + } + ]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of @@ -890,9 +893,10 @@ message LogExclusion { // Optional. A description of this exclusion. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries) - // that matches the log entries to be excluded. By using the - // [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), + // Required. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced-queries) that + // matches the log entries to be excluded. By using the [sample + // function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. // For example, the following query matches 99% of low-severity log // entries from Google Cloud Storage buckets: @@ -1047,8 +1051,9 @@ message DeleteExclusionRequest { // The parameters to // [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. // -// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) -// for more information. +// See [Enabling CMEK for Logs +// Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for +// more information. message GetCmekSettingsRequest { // Required. The resource for which to retrieve CMEK settings. // @@ -1073,8 +1078,9 @@ message GetCmekSettingsRequest { // The parameters to // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. // -// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) -// for more information. +// See [Enabling CMEK for Logs +// Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for +// more information. message UpdateCmekSettingsRequest { // Required. The resource name for the CMEK settings to update. // @@ -1093,7 +1099,8 @@ message UpdateCmekSettingsRequest { // Required. The CMEK settings to update. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. CmekSettings cmek_settings = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Field mask identifying which fields from `cmek_settings` should @@ -1113,8 +1120,9 @@ message UpdateCmekSettingsRequest { // organizations. Once configured, it applies to all projects and folders in the // GCP organization. // -// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) -// for more information. +// See [Enabling CMEK for Logs +// Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for +// more information. message CmekSettings { option (google.api.resource) = { type: "logging.googleapis.com/CmekSettings" @@ -1150,7 +1158,8 @@ message CmekSettings { // To disable CMEK for the Logs Router, set this field to an empty string. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. string kms_key_name = 2; // Output only. The service account that will be used by the Logs Router to access your @@ -1163,6 +1172,7 @@ message CmekSettings { // obtain the service account ID. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. string service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index e147578a7cb..eb9f73ffabc 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -130,9 +130,9 @@ message LogMetric { // The maximum length of the description is 8000 characters. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is - // used to match log entries. - // Example: + // Required. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced_filters) which + // is used to match log entries. Example: // // "resource.type=gae_app AND severity>=ERROR" // diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 0985a6016c7..b61e4146777 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -1398,7 +1398,8 @@ export class ConfigServiceV2Client { * the GCP organization. * * See [Enabling CMEK for Logs - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. * * @param {Object} request * The request object that will be sent. @@ -1502,7 +1503,8 @@ export class ConfigServiceV2Client { * 3) access to the key is disabled. * * See [Enabling CMEK for Logs - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. * * @param {Object} request * The request object that will be sent. @@ -1523,7 +1525,8 @@ export class ConfigServiceV2Client { * Required. The CMEK settings to update. * * See [Enabling CMEK for Logs - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. * @param {google.protobuf.FieldMask} [request.updateMask] * Optional. Field mask identifying which fields from `cmek_settings` should * be updated. A field will be overwritten if and only if it is in the update diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index eed1206a48d..e0c2ddb9dd8 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -6,6 +6,11 @@ "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" + ], + "deadline_exceeded_internal_unavailable": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" ] }, "retry_params": { @@ -34,12 +39,12 @@ }, "ListSinks": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "GetSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "CreateSink": { @@ -49,22 +54,22 @@ }, "UpdateSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "DeleteSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "ListExclusions": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "GetExclusion": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "CreateExclusion": { @@ -79,7 +84,7 @@ }, "DeleteExclusion": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "GetCmekSettings": { diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index c2d380aba17..f121b63467b 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -589,15 +589,16 @@ export class LoggingServiceV2Client { * the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than - * 24 hours in the future will not be available when calling `entries.list`. - * However, those log entries can still be - * [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * [logs retention period](https://cloud.google.com/logging/quota-policy) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be [exported + * with + * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, - * you should try to include several log entries in this list, - * rather than calling this method for each individual log entry. + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + * `entries.write`, you should try to include several log entries in this + * list, rather than calling this method for each individual log entry. * @param {boolean} [request.partialSuccess] * Optional. Whether valid entries should be written even if some other * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any @@ -678,7 +679,8 @@ export class LoggingServiceV2Client { /** * Lists log entries. Use this method to retrieve log entries that originated * from a project/folder/organization/billing account. For ways to export log - * entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). + * entries, see [Exporting + * Logs](https://cloud.google.com/logging/docs/export). * * @param {Object} request * The request object that will be sent. @@ -695,12 +697,12 @@ export class LoggingServiceV2Client { * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). + * 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. * @param {string} [request.orderBy] * Optional. How the results should be sorted. Presently, the only permitted * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -710,7 +712,8 @@ export class LoggingServiceV2Client { * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the + * Default is 50. If the value is negative or exceeds 1000, + * the request is rejected. The presence of `next_page_token` in the * response indicates that more results might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the @@ -797,12 +800,12 @@ export class LoggingServiceV2Client { * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). + * 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. * @param {string} [request.orderBy] * Optional. How the results should be sorted. Presently, the only permitted * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -812,7 +815,8 @@ export class LoggingServiceV2Client { * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the + * Default is 50. If the value is negative or exceeds 1000, + * the request is rejected. The presence of `next_page_token` in the * response indicates that more results might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the @@ -859,12 +863,12 @@ export class LoggingServiceV2Client { * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). 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. + * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). + * 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. * @param {string} [request.orderBy] * Optional. How the results should be sorted. Presently, the only permitted * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -874,7 +878,8 @@ export class LoggingServiceV2Client { * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the + * Default is 50. If the value is negative or exceeds 1000, + * the request is rejected. The presence of `next_page_token` in the * response indicates that more results might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index 871c36dd240..6ba163db851 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -6,6 +6,11 @@ "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" + ], + "deadline_exceeded_internal_unavailable": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" ] }, "retry_params": { @@ -22,12 +27,12 @@ "methods": { "DeleteLog": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default", "bundling": { "element_count_threshold": 1000, @@ -38,17 +43,17 @@ }, "ListLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "ListMonitoredResourceDescriptors": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "ListLogs": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" } } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client_config.json b/handwritten/logging/src/v2/metrics_service_v2_client_config.json index 142e0e10fba..014688ab775 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client_config.json +++ b/handwritten/logging/src/v2/metrics_service_v2_client_config.json @@ -6,6 +6,11 @@ "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" + ], + "deadline_exceeded_internal_unavailable": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" ] }, "retry_params": { @@ -22,12 +27,12 @@ "methods": { "ListLogMetrics": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "GetLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "CreateLogMetric": { @@ -37,12 +42,12 @@ }, "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "DeleteLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" } } diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index c31dc1afa6a..e76126ae0fa 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,8 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-logging.git", - "sha": "1db672d746b1e02e667213b32c45d0f0e1aab781" + "remote": "https://github.com/googleapis/nodejs-logging.git", + "sha": "866592a6e5733296781b24c80a022666ba65216a" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "07460951fc07dd2b3f172d01b04e2a5fefd13ccc", + "internalRef": "320124233" } }, { From 57b768c103b1afe4fa9ffe73295e657a841755ec Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jul 2020 20:14:57 +0200 Subject: [PATCH 0633/1029] chore(deps): update dependency @types/mocha to v8 (#849) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2fa63995e45..f9f9d2438be 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -70,7 +70,7 @@ "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", "@types/is": "0.0.21", - "@types/mocha": "^7.0.2", + "@types/mocha": "^8.0.0", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.3", "@types/node": "^13.9.2", From 8496e1deca5932494a8fc4380dfdb6cddcdaf892 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jul 2020 20:28:54 +0200 Subject: [PATCH 0634/1029] chore(deps): update dependency ts-loader to v8 (#847) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f9f9d2438be..af9d85e6e9d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -99,7 +99,7 @@ "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", "sinon": "^9.0.1", - "ts-loader": "^7.0.0", + "ts-loader": "^8.0.0", "typescript": "^3.8.3", "uuid": "^8.0.0", "webpack": "^4.42.0", From 251bf02e9323d0d39ed3027724e65a96bd749837 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 14 Jul 2020 14:40:24 -0400 Subject: [PATCH 0635/1029] chore: delete Node 8 presubmit tests (#850) --- .../.kokoro/presubmit/node8/common.cfg | 24 ------------------- .../logging/.kokoro/presubmit/node8/test.cfg | 0 2 files changed, 24 deletions(-) delete mode 100644 handwritten/logging/.kokoro/presubmit/node8/common.cfg delete mode 100644 handwritten/logging/.kokoro/presubmit/node8/test.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node8/common.cfg b/handwritten/logging/.kokoro/presubmit/node8/common.cfg deleted file mode 100644 index 120da9af7a3..00000000000 --- a/handwritten/logging/.kokoro/presubmit/node8/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" -} diff --git a/handwritten/logging/.kokoro/presubmit/node8/test.cfg b/handwritten/logging/.kokoro/presubmit/node8/test.cfg deleted file mode 100644 index e69de29bb2d..00000000000 From 13831b368a9ef277b48b75a143f5e87ad769fa8e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 13:51:05 -0700 Subject: [PATCH 0636/1029] build: address typo in gitattributes (#848) --- handwritten/logging/.gitattributes | 2 +- handwritten/logging/synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.gitattributes b/handwritten/logging/.gitattributes index 2e63216ae9c..d4f4169b28b 100644 --- a/handwritten/logging/.gitattributes +++ b/handwritten/logging/.gitattributes @@ -1,3 +1,3 @@ *.ts text eol=lf -*.js test eol=lf +*.js text eol=lf protos/* linguist-generated diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index e76126ae0fa..7f20064ec5d 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "07460951fc07dd2b3f172d01b04e2a5fefd13ccc", - "internalRef": "320124233" + "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", + "internalRef": "320300472" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "303271797a360f8a439203413f13a160f2f5b3b4" + "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" } } ], From 624c6cbc1f076b90d962d397ca7f36aebb16ea68 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 18:05:26 -0700 Subject: [PATCH 0637/1029] chore: update generated protos.js (#851) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9c6207e5-a7a6-4e44-ab6b-91751e0230b1/targets - [ ] To automatically regenerate this PR, check this box. --- handwritten/logging/protos/protos.js | 192 +++++++++++++++++++++------ handwritten/logging/synth.metadata | 2 +- 2 files changed, 153 insertions(+), 41 deletions(-) diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index ea43e76cc13..94c6f81d376 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -326,7 +326,7 @@ LogEntry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -361,12 +361,26 @@ message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); break; case 11: - reader.skip().pos++; if (message.labels === $util.emptyObject) message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; case 15: message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); @@ -1752,7 +1766,7 @@ WriteLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1763,12 +1777,26 @@ message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); break; case 3: - reader.skip().pos++; if (message.labels === $util.emptyObject) message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; case 4: if (!(message.entries && message.entries.length)) @@ -2204,17 +2232,31 @@ WriteLogEntriesPartialErrors.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; if (message.logEntryErrors === $util.emptyObject) message.logEntryErrors = {}; - key = reader.int32(); - reader.pos++; - message.logEntryErrors[key] = $root.google.rpc.Status.decode(reader, reader.uint32()); + var end2 = reader.uint32() + reader.pos; + key = 0; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.int32(); + break; + case 2: + value = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.logEntryErrors[key] = value; break; default: reader.skipType(tag & 7); @@ -10195,7 +10237,7 @@ LogMetric.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -10215,12 +10257,26 @@ message.valueExtractor = reader.string(); break; case 7: - reader.skip().pos++; if (message.labelExtractors === $util.emptyObject) message.labelExtractors = {}; - key = reader.string(); - reader.pos++; - message.labelExtractors[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labelExtractors[key] = value; break; case 8: message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); @@ -12802,7 +12858,7 @@ MonitoredResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -12810,12 +12866,26 @@ message.type = reader.string(); break; case 2: - reader.skip().pos++; if (message.labels === $util.emptyObject) message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; default: reader.skipType(tag & 7); @@ -13033,7 +13103,7 @@ MonitoredResourceMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -13041,12 +13111,26 @@ message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; case 2: - reader.skip().pos++; if (message.userLabels === $util.emptyObject) message.userLabels = {}; - key = reader.string(); - reader.pos++; - message.userLabels[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.userLabels[key] = value; break; default: reader.skipType(tag & 7); @@ -17668,7 +17752,7 @@ Metric.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17676,12 +17760,26 @@ message.type = reader.string(); break; case 2: - reader.skip().pos++; if (message.labels === $util.emptyObject) message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; default: reader.skipType(tag & 7); @@ -26577,17 +26675,31 @@ Struct.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; if (message.fields === $util.emptyObject) message.fields = {}; - key = reader.string(); - reader.pos++; - message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; break; default: reader.skipType(tag & 7); diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 7f20064ec5d..c860e14fecd 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "866592a6e5733296781b24c80a022666ba65216a" + "sha": "e04738f233041a689e34e86ad4627ba7f82b12a1" } }, { From f68d1b3f28a51c4714ca282ee25c390cdea8c088 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 16 Jul 2020 09:14:25 -0700 Subject: [PATCH 0638/1029] build: fix typo in publish (#855) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5b03461e-47c0-40e8-a8ad-c465ee146cc5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/388e10f5ae302d3e8de1fac99f3a95d1ab8f824a Source-Link: https://github.com/googleapis/synthtool/commit/d82deccf657a66e31bd5da9efdb96c6fa322fc7e --- handwritten/logging/.kokoro/publish.sh | 2 +- handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh index 24957d71def..f056d861729 100755 --- a/handwritten/logging/.kokoro/publish.sh +++ b/handwritten/logging/.kokoro/publish.sh @@ -24,7 +24,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source / cd $(dirname $0)/.. -NPM_TOKEN=$(cat $KOKORO_GFILE_DIR/secret_manager/npm_publish_token +NPM_TOKEN=$(cat $KOKORO_GFILE_DIR/secret_manager/npm_publish_token) echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc npm install diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index c860e14fecd..c0a9d9b6ab3 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "e04738f233041a689e34e86ad4627ba7f82b12a1" + "sha": "342906b80f220844d1ca15c95ca23f0bedbd82a7" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" + "sha": "388e10f5ae302d3e8de1fac99f3a95d1ab8f824a" } } ], From 464b9dc2632e682701cb17915f75f4b95e7914f6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 15:19:02 -0700 Subject: [PATCH 0639/1029] chore: add config files for cloud-rad for node.js (#856) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5e903fff-57bb-4395-bb94-8b4d1909dbf6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/21f1470ecd01424dc91c70f1a7c798e4e87d1eec --- .../logging/.kokoro/release/docs-devsite.cfg | 26 ++ .../logging/.kokoro/release/docs-devsite.sh | 62 +++ handwritten/logging/api-extractor.json | 369 ++++++++++++++++++ handwritten/logging/synth.metadata | 4 +- 4 files changed, 459 insertions(+), 2 deletions(-) create mode 100644 handwritten/logging/.kokoro/release/docs-devsite.cfg create mode 100755 handwritten/logging/.kokoro/release/docs-devsite.sh create mode 100644 handwritten/logging/api-extractor.json diff --git a/handwritten/logging/.kokoro/release/docs-devsite.cfg b/handwritten/logging/.kokoro/release/docs-devsite.cfg new file mode 100644 index 00000000000..77a501f8f20 --- /dev/null +++ b/handwritten/logging/.kokoro/release/docs-devsite.cfg @@ -0,0 +1,26 @@ +# service account used to publish up-to-date docs. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# doc publications use a Python image. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-scheduler/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-scheduler/.kokoro/release/docs-devsite.sh" +} diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh new file mode 100755 index 00000000000..b679c48c044 --- /dev/null +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -eo pipefail + +# build jsdocs (Python is installed on the Node 10 docker image). +if [[ -z "$CREDENTIALS" ]]; then + # if CREDENTIALS are explicitly set, assume we're testing locally + # and don't set NPM_CONFIG_PREFIX. + export NPM_CONFIG_PREFIX=/home/node/.npm-global + export PATH="$PATH:/home/node/.npm-global/bin" + cd $(dirname $0)/../.. +fi + +mkdir ./etc + +npm install +npm run api-extractor +npm run api-documenter + +npm i json@9.0.6 -g +NAME=$(cat .repo-metadata.json | json name) + +mkdir ./_devsite +cp ./yaml/$NAME/* ./_devsite +cp ./yaml/toc.yml ./_devsite/_toc.yaml + +# create docs.metadata, based on package.json and .repo-metadata.json. +pip install -U pip +python3 -m pip install --user gcp-docuploader +python3 -m docuploader create-metadata \ + --name=$NAME \ + --version=$(cat package.json | json version) \ + --language=$(cat .repo-metadata.json | json language) \ + --distribution-name=$(cat .repo-metadata.json | json distribution_name) \ + --product-page=$(cat .repo-metadata.json | json product_documentation) \ + --github-repository=$(cat .repo-metadata.json | json repo) \ + --issue-tracker=$(cat .repo-metadata.json | json issue_tracker) +cp docs.metadata ./_devsite/docs.metadata + +# deploy the docs. +if [[ -z "$CREDENTIALS" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi +if [[ -z "$BUCKET" ]]; then + BUCKET=docs-staging-v2-staging +fi + +python3 -m docuploader upload ./_devsite --destination-prefix docfx --credentials $CREDENTIALS --staging-bucket $BUCKET diff --git a/handwritten/logging/api-extractor.json b/handwritten/logging/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/handwritten/logging/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index c0a9d9b6ab3..70e17382dc8 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "342906b80f220844d1ca15c95ca23f0bedbd82a7" + "sha": "40b22342bfa23530ea9f1161236680af70bfa5c8" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "388e10f5ae302d3e8de1fac99f3a95d1ab8f824a" + "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" } } ], From aeb07877e6066ea91887b0be5f372a1b4e7e90a0 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 21 Jul 2020 14:42:10 -0400 Subject: [PATCH 0640/1029] chore: add dev dependencies for cloud-rad ref docs (#857) --- handwritten/logging/package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index af9d85e6e9d..c156bb7228a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -41,7 +41,9 @@ "system-test": "mocha build/system-test --timeout 600000", "pretest": "npm run compile", "test": "c8 mocha build/test", - "precompile": "gts clean" + "precompile": "gts clean", + "api-extractor": "api-extractor run --local", + "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { "@google-cloud/common": "^2.4.0", @@ -103,7 +105,9 @@ "typescript": "^3.8.3", "uuid": "^8.0.0", "webpack": "^4.42.0", - "webpack-cli": "^3.3.11" + "webpack-cli": "^3.3.11", + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10" }, "engines": { "node": ">=10" From d15eacf57107bd7742e24a87a9d2c67c642bcaee Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Jul 2020 22:20:14 -0700 Subject: [PATCH 0641/1029] build: rename _toc to toc (#858) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/940354f9-15cd-4361-bbf4-dc9af1426979/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/99c93fe09f8c1dca09dfc0301c8668e3a70dd796 --- .../logging/.kokoro/release/docs-devsite.sh | 2 +- handwritten/logging/synth.metadata | 83 ++++++++++++++++++- 2 files changed, 82 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh index b679c48c044..3b93137d4db 100755 --- a/handwritten/logging/.kokoro/release/docs-devsite.sh +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -36,7 +36,7 @@ NAME=$(cat .repo-metadata.json | json name) mkdir ./_devsite cp ./yaml/$NAME/* ./_devsite -cp ./yaml/toc.yml ./_devsite/_toc.yaml +cp ./yaml/toc.yml ./_devsite/toc.yml # create docs.metadata, based on package.json and .repo-metadata.json. pip install -U pip diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 70e17382dc8..53dfd211ffd 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "40b22342bfa23530ea9f1161236680af70bfa5c8" + "sha": "12d2444bf3b481a250dd5d5349933d0cad8a1c35" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" + "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" } } ], @@ -33,5 +33,84 @@ "generator": "bazel" } } + ], + "generatedFiles": [ + ".eslintignore", + ".eslintrc.json", + ".gitattributes", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/publish.yml", + ".github/release-please.yml", + ".github/workflows/ci.yaml", + ".gitignore", + ".jsdoc.js", + ".kokoro/.gitattributes", + ".kokoro/common.cfg", + ".kokoro/continuous/node10/common.cfg", + ".kokoro/continuous/node10/docs.cfg", + ".kokoro/continuous/node10/lint.cfg", + ".kokoro/continuous/node10/samples-test.cfg", + ".kokoro/continuous/node10/system-test.cfg", + ".kokoro/continuous/node10/test.cfg", + ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/test.cfg", + ".kokoro/continuous/node8/common.cfg", + ".kokoro/continuous/node8/test.cfg", + ".kokoro/docs.sh", + ".kokoro/lint.sh", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/samples-test.cfg", + ".kokoro/presubmit/node10/system-test.cfg", + ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/test.cfg", + ".kokoro/publish.sh", + ".kokoro/release/docs-devsite.cfg", + ".kokoro/release/docs-devsite.sh", + ".kokoro/release/docs.cfg", + ".kokoro/release/docs.sh", + ".kokoro/release/publish.cfg", + ".kokoro/samples-test.sh", + ".kokoro/system-test.sh", + ".kokoro/test.bat", + ".kokoro/test.sh", + ".kokoro/trampoline.sh", + ".mocharc.js", + ".nycrc", + ".prettierignore", + ".prettierrc.js", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "api-extractor.json", + "linkinator.config.json", + "protos/google/logging/v2/log_entry.proto", + "protos/google/logging/v2/logging.proto", + "protos/google/logging/v2/logging_config.proto", + "protos/google/logging/v2/logging_metrics.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "src/v2/config_service_v2_client.ts", + "src/v2/config_service_v2_client_config.json", + "src/v2/config_service_v2_proto_list.json", + "src/v2/index.ts", + "src/v2/logging_service_v2_client.ts", + "src/v2/logging_service_v2_client_config.json", + "src/v2/logging_service_v2_proto_list.json", + "src/v2/metrics_service_v2_client.ts", + "src/v2/metrics_service_v2_client_config.json", + "src/v2/metrics_service_v2_proto_list.json", + "system-test/install.ts", + "test/gapic_config_service_v2_v2.ts", + "test/gapic_logging_service_v2_v2.ts", + "test/gapic_metrics_service_v2_v2.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file From 56632a694295c4dcd0c9b188cbec41dcbeb96862 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 24 Jul 2020 10:14:53 -0700 Subject: [PATCH 0642/1029] chore: delete Node 8 templates, move gitattribute files to node templates (#860) * fix: move gitattributes files to node templates Source-Author: F. Hinkelmann Source-Date: Thu Jul 23 01:45:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 Source-Link: https://github.com/googleapis/synthtool/commit/3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 * chore: delete Node8/continuous templates Co-authored-by: Benjamin E. Coe Source-Author: F. Hinkelmann Source-Date: Thu Jul 23 11:36:45 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: a23e435abce97533dc5e7a352833f56852e12ffd Source-Link: https://github.com/googleapis/synthtool/commit/a23e435abce97533dc5e7a352833f56852e12ffd --- handwritten/logging/.gitattributes | 1 + .../.kokoro/continuous/node8/common.cfg | 24 ------------------- .../logging/.kokoro/continuous/node8/test.cfg | 0 handwritten/logging/synth.metadata | 7 +++--- 4 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 handwritten/logging/.kokoro/continuous/node8/common.cfg delete mode 100644 handwritten/logging/.kokoro/continuous/node8/test.cfg diff --git a/handwritten/logging/.gitattributes b/handwritten/logging/.gitattributes index d4f4169b28b..33739cb74e4 100644 --- a/handwritten/logging/.gitattributes +++ b/handwritten/logging/.gitattributes @@ -1,3 +1,4 @@ *.ts text eol=lf *.js text eol=lf protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/handwritten/logging/.kokoro/continuous/node8/common.cfg b/handwritten/logging/.kokoro/continuous/node8/common.cfg deleted file mode 100644 index 120da9af7a3..00000000000 --- a/handwritten/logging/.kokoro/continuous/node8/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" -} diff --git a/handwritten/logging/.kokoro/continuous/node8/test.cfg b/handwritten/logging/.kokoro/continuous/node8/test.cfg deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 53dfd211ffd..fd68440a9ed 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "12d2444bf3b481a250dd5d5349933d0cad8a1c35" + "sha": "c4f767ee4b8e4fb28e785cedad3e354589561e3e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" + "sha": "a23e435abce97533dc5e7a352833f56852e12ffd" } } ], @@ -57,11 +57,10 @@ ".kokoro/continuous/node10/test.cfg", ".kokoro/continuous/node12/common.cfg", ".kokoro/continuous/node12/test.cfg", - ".kokoro/continuous/node8/common.cfg", - ".kokoro/continuous/node8/test.cfg", ".kokoro/docs.sh", ".kokoro/lint.sh", ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/common.cfg", ".kokoro/presubmit/node10/samples-test.cfg", ".kokoro/presubmit/node10/system-test.cfg", ".kokoro/presubmit/node12/common.cfg", From 68646601370a4c77023ce4ab17238aa62ef04683 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jul 2020 12:28:04 -0700 Subject: [PATCH 0643/1029] chore(node): fix kokoro build path for cloud-rad (#861) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4bdc1826-2f69-49f1-a63b-94f99cceb5ee/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa --- handwritten/logging/.kokoro/release/docs-devsite.cfg | 4 ++-- handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.kokoro/release/docs-devsite.cfg b/handwritten/logging/.kokoro/release/docs-devsite.cfg index 77a501f8f20..38212df4f57 100644 --- a/handwritten/logging/.kokoro/release/docs-devsite.cfg +++ b/handwritten/logging/.kokoro/release/docs-devsite.cfg @@ -18,9 +18,9 @@ env_vars: { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-scheduler/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline.sh" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-scheduler/.kokoro/release/docs-devsite.sh" + value: "github/nodejs-logging/.kokoro/release/docs-devsite.sh" } diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index fd68440a9ed..e3d25370fe0 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "c4f767ee4b8e4fb28e785cedad3e354589561e3e" + "sha": "4a5c85416e19630656191af9b1d8f52dd84c054a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "a23e435abce97533dc5e7a352833f56852e12ffd" + "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" } } ], From 338d0c3d44cb426b4e231e0e805676fc36b47509 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 30 Jul 2020 19:43:49 -0700 Subject: [PATCH 0644/1029] build: protos update --- handwritten/logging/protos/protos.d.ts | 10 +++- handwritten/logging/protos/protos.js | 77 +++++++++++++++++++++++++- handwritten/logging/protos/protos.json | 10 +++- handwritten/logging/synth.metadata | 2 +- 4 files changed, 94 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 45ee7dced9e..6a5e154aa67 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as Long from "long"; -import * as $protobuf from "protobufjs"; +import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -5707,6 +5707,8 @@ export namespace google { /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, EARLY_ACCESS = 1, ALPHA = 2, BETA = 3, @@ -7040,6 +7042,9 @@ export namespace google { /** MetricDescriptor launchStage */ launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptor monitoredResourceTypes */ + monitoredResourceTypes?: (string[]|null); } /** Represents a MetricDescriptor. */ @@ -7081,6 +7086,9 @@ export namespace google { /** MetricDescriptor launchStage. */ public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** MetricDescriptor monitoredResourceTypes. */ + public monitoredResourceTypes: string[]; + /** * Creates a new MetricDescriptor instance using the specified properties. * @param [properties] Properties to set diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 94c6f81d376..0d8676bf673 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); + module.exports = factory(require("google-gax").protobufMinimal); })(this, function($protobuf) { "use strict"; @@ -12634,6 +12634,8 @@ default: return "launchStage: enum value expected"; case 0: + case 6: + case 7: case 1: case 2: case 3: @@ -12679,6 +12681,14 @@ case 0: message.launchStage = 0; break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; case "EARLY_ACCESS": case 1: message.launchStage = 1; @@ -13523,6 +13533,8 @@ * @name google.api.LaunchStage * @enum {number} * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value * @property {number} ALPHA=2 ALPHA value * @property {number} BETA=3 BETA value @@ -13532,6 +13544,8 @@ api.LaunchStage = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; values[valuesById[1] = "EARLY_ACCESS"] = 1; values[valuesById[2] = "ALPHA"] = 2; values[valuesById[3] = "BETA"] = 3; @@ -16843,6 +16857,7 @@ * @property {string|null} [displayName] MetricDescriptor displayName * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes */ /** @@ -16855,6 +16870,7 @@ */ function MetricDescriptor(properties) { this.labels = []; + this.monitoredResourceTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16941,6 +16957,14 @@ */ MetricDescriptor.prototype.launchStage = 0; + /** + * MetricDescriptor monitoredResourceTypes. + * @member {Array.} monitoredResourceTypes + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + /** * Creates a new MetricDescriptor instance using the specified properties. * @function create @@ -16986,6 +17010,9 @@ $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); return writer; }; @@ -17052,6 +17079,11 @@ case 12: message.launchStage = reader.int32(); break; + case 13: + if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) + message.monitoredResourceTypes = []; + message.monitoredResourceTypes.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -17144,6 +17176,8 @@ default: return "launchStage: enum value expected"; case 0: + case 6: + case 7: case 1: case 2: case 3: @@ -17151,6 +17185,13 @@ case 5: break; } + if (message.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { + if (!Array.isArray(message.monitoredResourceTypes)) + return "monitoredResourceTypes: array expected"; + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + if (!$util.isString(message.monitoredResourceTypes[i])) + return "monitoredResourceTypes: string[] expected"; + } return null; }; @@ -17244,6 +17285,14 @@ case 0: message.launchStage = 0; break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; case "EARLY_ACCESS": case 1: message.launchStage = 1; @@ -17265,6 +17314,13 @@ message.launchStage = 5; break; } + if (object.monitoredResourceTypes) { + if (!Array.isArray(object.monitoredResourceTypes)) + throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); + message.monitoredResourceTypes = []; + for (var i = 0; i < object.monitoredResourceTypes.length; ++i) + message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); + } return message; }; @@ -17281,8 +17337,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.labels = []; + object.monitoredResourceTypes = []; + } if (options.defaults) { object.name = ""; object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; @@ -17317,6 +17375,11 @@ object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); if (message.launchStage != null && message.hasOwnProperty("launchStage")) object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { + object.monitoredResourceTypes = []; + for (var j = 0; j < message.monitoredResourceTypes.length; ++j) + object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; + } return object; }; @@ -17494,6 +17557,8 @@ default: return "launchStage: enum value expected"; case 0: + case 6: + case 7: case 1: case 2: case 3: @@ -17531,6 +17596,14 @@ case 0: message.launchStage = 0; break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; case "EARLY_ACCESS": case 1: message.launchStage = 1; diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 42866c51573..fb60a882eda 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -1432,7 +1432,8 @@ "java_multiple_files": true, "java_outer_classname": "LogSeverityProto", "java_package": "com.google.logging.type", - "php_namespace": "Google\\Cloud\\Logging\\Type" + "php_namespace": "Google\\Cloud\\Logging\\Type", + "ruby_package": "Google::Cloud::Logging::Type" }, "nested": { "HttpRequest": { @@ -1625,6 +1626,8 @@ "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, "EARLY_ACCESS": 1, "ALPHA": 2, "BETA": 3, @@ -1976,6 +1979,11 @@ "launchStage": { "type": "LaunchStage", "id": 12 + }, + "monitoredResourceTypes": { + "rule": "repeated", + "type": "string", + "id": 13 } }, "nested": { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index e3d25370fe0..9c6636c1ec9 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "4a5c85416e19630656191af9b1d8f52dd84c054a" + "sha": "81b7e9b2fa6b54cff95a6b7fb79177dd7e03e118" } }, { From ca97206d747ffcc25c15d1062bba4177cb1ceea5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 2 Aug 2020 21:46:03 -0700 Subject: [PATCH 0645/1029] docs: add links to the CHANGELOG from the README.md for Java and Node (#863) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7b446397-88f3-4463-9e7d-d2ce7069989d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5936421202fb53ed4641bcb824017dd393a3dbcc --- handwritten/logging/README.md | 3 +++ handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 389076da20a..71cc30a5214 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -15,6 +15,9 @@ monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/master/CHANGELOG.md). + * [Stackdriver Logging Node.js Client API Reference][client-docs] * [Stackdriver Logging Documentation][product-docs] * [github.com/googleapis/nodejs-logging](https://github.com/googleapis/nodejs-logging) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 9c6636c1ec9..217b87643ad 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "81b7e9b2fa6b54cff95a6b7fb79177dd7e03e118" + "sha": "cf880a6864d08762f68fbcd85585089ff8c59bc1" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" + "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" } } ], From 1f67e0c56ae054595bc56ccee11bc648276d73ce Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 5 Aug 2020 21:28:49 -0700 Subject: [PATCH 0646/1029] fix(docs): jsdoc strings were malformed (#864) --- handwritten/logging/src/index.ts | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 594e3e39ef3..b41c9f82ba7 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -231,14 +231,12 @@ export interface ServiceContext { * @example Import the client library * const {Logging} = require('@google-cloud/logging'); * - * @example Create a client that uses Application - * Default Credentials (ADC): const logging = new Logging(); + * @example Create a client that uses Application Default Credentials (ADC): + * const logging = new Logging(); * - * @example Create a client with explicit - * credentials: const logging = new Logging({ projectId: - * 'your-project-id', keyFilename: '/path/to/keyfile.json' + * @example Create a client with explicitcredentials: + * const logging = new Logging({ projectId: + * 'your-project-id', keyFilename: '/path/to/keyfile.json' * }); * * @example include:samples/quickstart.js @@ -1315,22 +1313,17 @@ export {MonitoredResource}; * @module {Constructor} @google-cloud/logging * @alias nodejs-logging * - * @example Install the client library with npm: npm install --save - * @google-cloud/logging + * @example Install the client library with npm: + * npm install --save @google-cloud/logging * * @example Import the client library * const {Logging} = require('@google-cloud/logging'); * - * @example Create a client that uses Application - * Default Credentials (ADC): const logging = new Logging(); + * @example Create a client that uses Application Default Credentials (ADC): + * const logging = new Logging(); * - * @example Create a client with explicit - * credentials: const logging = new Logging({ projectId: - * 'your-project-id', keyFilename: '/path/to/keyfile.json' - * }); + * @example Create a client with explicit credentials: + * const logging = new Logging({ projectId: 'your-project-id', keyFilename: '/path/to/keyfile.json'}); * * @example include:samples/quickstart.js * region_tag:logging_quickstart From 5993bd63fa18e90ad03662af1cf25035b90f2333 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 6 Aug 2020 10:19:50 -0700 Subject: [PATCH 0647/1029] chore: release 8.0.2 (#865) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 61181b19864..e6440b9a82e 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.2](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.1...v8.0.2) (2020-08-06) + + +### Bug Fixes + +* **docs:** jsdoc strings were malformed ([#864](https://www.github.com/googleapis/nodejs-logging/issues/864)) ([75cd541](https://www.github.com/googleapis/nodejs-logging/commit/75cd54196917a30edc922adcbac1e84bf019f720)) + ### [8.0.1](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.0...v8.0.1) (2020-07-06) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c156bb7228a..de07cdd5997 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.1", + "version": "8.0.2", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From b1019f2a10c3aa610cfbc6a928d8e894a1e051d1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 10 Aug 2020 10:56:33 -0700 Subject: [PATCH 0648/1029] build: --credential-file-override is no longer required (#869) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4de22315-84b1-493d-8da2-dfa7688128f5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/94421c47802f56a44c320257b2b4c190dc7d6b68 --- handwritten/logging/.kokoro/populate-secrets.sh | 1 - handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.kokoro/populate-secrets.sh b/handwritten/logging/.kokoro/populate-secrets.sh index e6ce8200d75..6f9d228859d 100755 --- a/handwritten/logging/.kokoro/populate-secrets.sh +++ b/handwritten/logging/.kokoro/populate-secrets.sh @@ -32,7 +32,6 @@ do --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ gcr.io/google.com/cloudsdktool/cloud-sdk \ secrets versions access latest \ - --credential-file-override=${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json \ --project cloud-devrel-kokoro-resources \ --secret $key > \ "$SECRET_LOCATION/$key" diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 217b87643ad..a231c0397ea 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "cf880a6864d08762f68fbcd85585089ff8c59bc1" + "sha": "3bd950a3bbb3a1bb24165d1b2cb96fc35c06292d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" + "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" } } ], From a65229e063d7189d16fb1ff3140abf61a61405dc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2020 22:00:09 -0700 Subject: [PATCH 0649/1029] chore: release 8.0.3 (#868) * chore: updated samples/package.json [ci skip] * chore: updated CHANGELOG.md [ci skip] * chore: updated package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index e6440b9a82e..c28021fcc33 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.3](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.2...v8.0.3) (2020-08-10) + + +### Bug Fixes + +* **deps:** roll back dependency @google-cloud/logging to ^8.0.1 ([#867](https://www.github.com/googleapis/nodejs-logging/issues/867)) ([3bd950a](https://www.github.com/googleapis/nodejs-logging/commit/3bd950a3bbb3a1bb24165d1b2cb96fc35c06292d)) + ### [8.0.2](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.1...v8.0.2) (2020-08-06) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index de07cdd5997..17cd21b0d10 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.2", + "version": "8.0.3", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From cfc93531471b89d5b495fc9e1f4a5a9769630f86 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 12 Aug 2020 13:47:02 -0700 Subject: [PATCH 0650/1029] fix: make request batching work again (#872) --- .../logging/.kokoro/release/docs-devsite.sh | 5 ++ .../logging/.kokoro/release/publish.cfg | 2 +- .../src/v2/config_service_v2_client.ts | 5 +- .../src/v2/logging_service_v2_client.ts | 10 ++- .../src/v2/metrics_service_v2_client.ts | 5 +- handwritten/logging/synth.metadata | 90 ++----------------- 6 files changed, 22 insertions(+), 95 deletions(-) diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh index 3b93137d4db..fa089cf290e 100755 --- a/handwritten/logging/.kokoro/release/docs-devsite.sh +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -36,6 +36,11 @@ NAME=$(cat .repo-metadata.json | json name) mkdir ./_devsite cp ./yaml/$NAME/* ./_devsite + +# Delete SharePoint item, see https://github.com/microsoft/rushstack/issues/1229 +sed -i -e '1,3d' ./yaml/toc.yml +sed -i -e 's/^ //' ./yaml/toc.yml + cp ./yaml/toc.yml ./_devsite/toc.yml # create docs.metadata, based on package.json and .repo-metadata.json. diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index a8cb1d7d119..019758a0efa 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -61,7 +61,7 @@ build_file: "nodejs-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" } env_vars: { diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index b61e4146777..49b65e4f12d 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -328,12 +328,11 @@ export class ConfigServiceV2Client { } ); + const descriptor = this.descriptors.page[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + descriptor ); this.innerApiCalls[methodName] = apiCall; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index f121b63467b..e25a51426cb 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -263,7 +263,7 @@ export class LoggingServiceV2Client { // requests; denote this. this.descriptors.batching = { - WriteLogEntries: new this._gaxModule.BundleDescriptor( + writeLogEntries: new this._gaxModule.BundleDescriptor( 'entries', ['log_name', 'resource', 'labels'], null, @@ -340,12 +340,14 @@ export class LoggingServiceV2Client { } ); + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.batching?.[methodName] || + undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + descriptor ); this.innerApiCalls[methodName] = apiCall; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 39f60e5d086..bf83179427c 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -305,12 +305,11 @@ export class MetricsServiceV2Client { } ); + const descriptor = this.descriptors.page[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + descriptor ); this.innerApiCalls[methodName] = apiCall; diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index a231c0397ea..94e2c6ce158 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "3bd950a3bbb3a1bb24165d1b2cb96fc35c06292d" + "remote": "git@github.com:googleapis/nodejs-logging", + "sha": "7c90bbe93daa32c265e5867f7962aad32407fe6e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", - "internalRef": "320300472" + "sha": "874846a1917ee5c3fe271449f3cb9a06e75407be", + "internalRef": "326288259" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" + "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" } } ], @@ -33,83 +33,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/publish.yml", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/lint.cfg", - ".kokoro/continuous/node10/samples-test.cfg", - ".kokoro/continuous/node10/system-test.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node10/samples-test.cfg", - ".kokoro/presubmit/node10/system-test.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "protos/google/logging/v2/log_entry.proto", - "protos/google/logging/v2/logging.proto", - "protos/google/logging/v2/logging_config.proto", - "protos/google/logging/v2/logging_metrics.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/v2/config_service_v2_client.ts", - "src/v2/config_service_v2_client_config.json", - "src/v2/config_service_v2_proto_list.json", - "src/v2/index.ts", - "src/v2/logging_service_v2_client.ts", - "src/v2/logging_service_v2_client_config.json", - "src/v2/logging_service_v2_proto_list.json", - "src/v2/metrics_service_v2_client.ts", - "src/v2/metrics_service_v2_client_config.json", - "src/v2/metrics_service_v2_proto_list.json", - "system-test/install.ts", - "test/gapic_config_service_v2_v2.ts", - "test/gapic_logging_service_v2_v2.ts", - "test/gapic_metrics_service_v2_v2.ts", - "tsconfig.json", - "webpack.config.js" ] -} \ No newline at end of file +} From b4e331c594c5fda095d0893a07798f05fae6634f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 14 Aug 2020 09:13:28 -0700 Subject: [PATCH 0651/1029] chore: start tracking obsolete files (#874) --- handwritten/logging/synth.metadata | 92 ++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 94e2c6ce158..4012cb47c3d 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-logging", - "sha": "7c90bbe93daa32c265e5867f7962aad32407fe6e" + "remote": "https://github.com/googleapis/nodejs-logging.git", + "sha": "a9a9567acc94dbef66830c96ecc363f23b076667" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "874846a1917ee5c3fe271449f3cb9a06e75407be", - "internalRef": "326288259" + "sha": "3a54e988edcbdef1e47c6ac19d3074a87214f667", + "internalRef": "326582222" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" + "sha": "d3049e66447b44dc10579e461d5e08e0e3838edd" } } ], @@ -33,5 +33,85 @@ "generator": "bazel" } } + ], + "generatedFiles": [ + ".eslintignore", + ".eslintrc.json", + ".gitattributes", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/publish.yml", + ".github/release-please.yml", + ".github/workflows/ci.yaml", + ".gitignore", + ".jsdoc.js", + ".kokoro/.gitattributes", + ".kokoro/common.cfg", + ".kokoro/continuous/node10/common.cfg", + ".kokoro/continuous/node10/docs.cfg", + ".kokoro/continuous/node10/lint.cfg", + ".kokoro/continuous/node10/samples-test.cfg", + ".kokoro/continuous/node10/system-test.cfg", + ".kokoro/continuous/node10/test.cfg", + ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/test.cfg", + ".kokoro/docs.sh", + ".kokoro/lint.sh", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/common.cfg", + ".kokoro/presubmit/node10/samples-test.cfg", + ".kokoro/presubmit/node10/system-test.cfg", + ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/test.cfg", + ".kokoro/publish.sh", + ".kokoro/release/docs-devsite.cfg", + ".kokoro/release/docs-devsite.sh", + ".kokoro/release/docs.cfg", + ".kokoro/release/docs.sh", + ".kokoro/release/publish.cfg", + ".kokoro/samples-test.sh", + ".kokoro/system-test.sh", + ".kokoro/test.bat", + ".kokoro/test.sh", + ".kokoro/trampoline.sh", + ".mocharc.js", + ".nycrc", + ".prettierignore", + ".prettierrc.js", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "api-extractor.json", + "linkinator.config.json", + "package-lock.json.668747317", + "protos/google/logging/v2/log_entry.proto", + "protos/google/logging/v2/logging.proto", + "protos/google/logging/v2/logging_config.proto", + "protos/google/logging/v2/logging_metrics.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "samples/package-lock.json.3850284017", + "src/v2/config_service_v2_client.ts", + "src/v2/config_service_v2_client_config.json", + "src/v2/config_service_v2_proto_list.json", + "src/v2/index.ts", + "src/v2/logging_service_v2_client.ts", + "src/v2/logging_service_v2_client_config.json", + "src/v2/logging_service_v2_proto_list.json", + "src/v2/metrics_service_v2_client.ts", + "src/v2/metrics_service_v2_client_config.json", + "src/v2/metrics_service_v2_proto_list.json", + "system-test/install.ts", + "test/gapic_config_service_v2_v2.ts", + "test/gapic_logging_service_v2_v2.ts", + "test/gapic_metrics_service_v2_v2.ts", + "tsconfig.json", + "webpack.config.js" ] -} +} \ No newline at end of file From e13aec97fb2d7891ac7d0a27379e89e6c1c2514e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2020 13:03:14 -0700 Subject: [PATCH 0652/1029] chore: release 8.0.4 (#873) --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index c28021fcc33..eb6b9041422 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.4](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.3...v8.0.4) (2020-08-14) + + +### Bug Fixes + +* make request batching work again ([#872](https://www.github.com/googleapis/nodejs-logging/issues/872)) ([a9a9567](https://www.github.com/googleapis/nodejs-logging/commit/a9a9567acc94dbef66830c96ecc363f23b076667)) + ### [8.0.3](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.2...v8.0.3) (2020-08-10) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 17cd21b0d10..a57b8a1d8ed 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.3", + "version": "8.0.4", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From a6667af494d7a01af47cd02afffcbe499b90f1ab Mon Sep 17 00:00:00 2001 From: Simon Zeltser Date: Mon, 17 Aug 2020 17:23:26 -0700 Subject: [PATCH 0653/1029] Add Observability DevX team to logging lib owners (#878) --- handwritten/logging/.github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handwritten/logging/.github/CODEOWNERS b/handwritten/logging/.github/CODEOWNERS index d904d1e2bde..0d1747727e3 100644 --- a/handwritten/logging/.github/CODEOWNERS +++ b/handwritten/logging/.github/CODEOWNERS @@ -7,3 +7,6 @@ # The yoshi-nodejs team is the default owner for nodejs repositories. * @googleapis/yoshi-nodejs + +# Cloud Observability DevX team +@googleapis/api-logging From cb3727d5c4e02d9e5697d5d1ff80d82128d31fba Mon Sep 17 00:00:00 2001 From: Simon Zeltser Date: Tue, 18 Aug 2020 12:12:16 -0700 Subject: [PATCH 0654/1029] fix(deps): require google-gax 2.7.0 (#879) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a57b8a1d8ed..bce80b98b2e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "extend": "^3.0.2", "gcp-metadata": "^3.5.0", "google-auth-library": "^5.10.1", - "google-gax": "^2.1.0", + "google-gax": "^2.7.0", "is": "^3.3.0", "on-finished": "^2.3.0", "pumpify": "^2.0.1", From 8f33fb60eb165ec83392c47103f84240cdc0dc8a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2020 13:21:45 -0700 Subject: [PATCH 0655/1029] chore: release 8.0.5 (#880) * chore: updated samples/package.json [ci skip] * chore: updated CHANGELOG.md [ci skip] * chore: updated package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index eb6b9041422..c8b9ceca627 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.5](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.4...v8.0.5) (2020-08-18) + + +### Bug Fixes + +* **deps:** require google-gax 2.7.0 ([#879](https://www.github.com/googleapis/nodejs-logging/issues/879)) ([50b4be0](https://www.github.com/googleapis/nodejs-logging/commit/50b4be07c971295d933c3f5833fa40b1c8fc8eaf)) + ### [8.0.4](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.3...v8.0.4) (2020-08-14) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bce80b98b2e..3f38cfd21ae 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.4", + "version": "8.0.5", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 8e168743015397ece84a6e18fca7696b91e510ff Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 21 Aug 2020 11:12:22 -0700 Subject: [PATCH 0656/1029] build: move system and samples test from Node 10 to Node 12 (#881) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ba2d388f-b3b2-4ad7-a163-0c6b4d86894f/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/05de3e1e14a0b07eab8b474e669164dbd31f81fb --- .../continuous/{node10 => node12}/lint.cfg | 0 .../{node10 => node12}/samples-test.cfg | 0 .../{node10 => node12}/system-test.cfg | 0 .../{node10 => node12}/samples-test.cfg | 0 .../presubmit/{node10 => node12}/system-test.cfg | 0 handwritten/logging/synth.metadata | 16 +++++++--------- 6 files changed, 7 insertions(+), 9 deletions(-) rename handwritten/logging/.kokoro/continuous/{node10 => node12}/lint.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node10 => node12}/samples-test.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node10 => node12}/system-test.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node10 => node12}/samples-test.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node10 => node12}/system-test.cfg (100%) diff --git a/handwritten/logging/.kokoro/continuous/node10/lint.cfg b/handwritten/logging/.kokoro/continuous/node12/lint.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node10/lint.cfg rename to handwritten/logging/.kokoro/continuous/node12/lint.cfg diff --git a/handwritten/logging/.kokoro/continuous/node10/samples-test.cfg b/handwritten/logging/.kokoro/continuous/node12/samples-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node10/samples-test.cfg rename to handwritten/logging/.kokoro/continuous/node12/samples-test.cfg diff --git a/handwritten/logging/.kokoro/continuous/node10/system-test.cfg b/handwritten/logging/.kokoro/continuous/node12/system-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node10/system-test.cfg rename to handwritten/logging/.kokoro/continuous/node12/system-test.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node10/samples-test.cfg b/handwritten/logging/.kokoro/presubmit/node12/samples-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node10/samples-test.cfg rename to handwritten/logging/.kokoro/presubmit/node12/samples-test.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node10/system-test.cfg b/handwritten/logging/.kokoro/presubmit/node12/system-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node10/system-test.cfg rename to handwritten/logging/.kokoro/presubmit/node12/system-test.cfg diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 4012cb47c3d..0816cf649f5 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "a9a9567acc94dbef66830c96ecc363f23b076667" + "sha": "f250ca37497a47ea7ebd802783a11ad0e443b364" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d3049e66447b44dc10579e461d5e08e0e3838edd" + "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" } } ], @@ -51,19 +51,19 @@ ".kokoro/common.cfg", ".kokoro/continuous/node10/common.cfg", ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/lint.cfg", - ".kokoro/continuous/node10/samples-test.cfg", - ".kokoro/continuous/node10/system-test.cfg", ".kokoro/continuous/node10/test.cfg", ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/lint.cfg", + ".kokoro/continuous/node12/samples-test.cfg", + ".kokoro/continuous/node12/system-test.cfg", ".kokoro/continuous/node12/test.cfg", ".kokoro/docs.sh", ".kokoro/lint.sh", ".kokoro/populate-secrets.sh", ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node10/samples-test.cfg", - ".kokoro/presubmit/node10/system-test.cfg", ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/samples-test.cfg", + ".kokoro/presubmit/node12/system-test.cfg", ".kokoro/presubmit/node12/test.cfg", ".kokoro/publish.sh", ".kokoro/release/docs-devsite.cfg", @@ -86,7 +86,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.668747317", "protos/google/logging/v2/log_entry.proto", "protos/google/logging/v2/logging.proto", "protos/google/logging/v2/logging_config.proto", @@ -96,7 +95,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.3850284017", "src/v2/config_service_v2_client.ts", "src/v2/config_service_v2_client_config.json", "src/v2/config_service_v2_proto_list.json", From c782075b3fdf8e824de2e8fd13038890a47ea562 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 28 Aug 2020 13:42:16 -0700 Subject: [PATCH 0657/1029] build: track flaky tests for "nightly", add new secrets for tagging (#884) Source-Author: Benjamin E. Coe Source-Date: Wed Aug 26 14:28:22 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 8cf6d2834ad14318e64429c3b94f6443ae83daf9 Source-Link: https://github.com/googleapis/synthtool/commit/8cf6d2834ad14318e64429c3b94f6443ae83daf9 --- handwritten/logging/.github/publish.yml | 0 handwritten/logging/.kokoro/release/publish.cfg | 2 +- handwritten/logging/.kokoro/samples-test.sh | 2 +- handwritten/logging/.kokoro/system-test.sh | 2 +- handwritten/logging/.kokoro/test.sh | 2 +- handwritten/logging/synth.metadata | 5 ++--- 6 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 handwritten/logging/.github/publish.yml diff --git a/handwritten/logging/.github/publish.yml b/handwritten/logging/.github/publish.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 019758a0efa..086378c5762 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -49,7 +49,7 @@ before_action { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "npm_publish_token" + value: "npm_publish_token,releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } # Download trampoline resources. diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index 86e83c9d3da..c0c40139cb7 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -41,7 +41,7 @@ if [ -f samples/package.json ]; then cd .. # If tests are running against master, configure Build Cop # to open issues on failures: - if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then + if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index dfae142a231..283f1700fef 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -35,7 +35,7 @@ npm install # If tests are running against master, configure Build Cop # to open issues on failures: -if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 8d9c2954579..47be59b987c 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -23,7 +23,7 @@ cd $(dirname $0)/.. npm install # If tests are running against master, configure Build Cop # to open issues on failures: -if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 0816cf649f5..5d55db54adb 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "f250ca37497a47ea7ebd802783a11ad0e443b364" + "sha": "422f5d2e5edd6df53cf68e8d8b501cdf77155524" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" + "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" } } ], @@ -42,7 +42,6 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", - ".github/publish.yml", ".github/release-please.yml", ".github/workflows/ci.yaml", ".gitignore", From 9b139d27a3511e0f342919e1f98b5163226d0176 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 1 Sep 2020 08:56:02 -0700 Subject: [PATCH 0658/1029] build: delete Blunderbuss (#886) --- handwritten/logging/.github/blunderbuss.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 handwritten/logging/.github/blunderbuss.yml diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml deleted file mode 100644 index 613fbf7750e..00000000000 --- a/handwritten/logging/.github/blunderbuss.yml +++ /dev/null @@ -1,6 +0,0 @@ -assign_issues: - - sofisl - - bcoe -assign_prs: - - sofisl - - bcoe From 3f0d7ca3e1f45b44828c5e09f6a7c7d2064bbfe1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 12 Sep 2020 14:06:28 -0700 Subject: [PATCH 0659/1029] build(test): recursively find test files; fail on unsupported dependency versions (#891) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/396d1a63-c8ed-42ae-811f-d2b08d6e2089/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/fdd03c161003ab97657cc0218f25c82c89ddf4b6 --- handwritten/logging/.mocharc.js | 3 ++- handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.mocharc.js b/handwritten/logging/.mocharc.js index ff7b34fa5d1..0b600509bed 100644 --- a/handwritten/logging/.mocharc.js +++ b/handwritten/logging/.mocharc.js @@ -14,7 +14,8 @@ const config = { "enable-source-maps": true, "throw-deprecation": true, - "timeout": 10000 + "timeout": 10000, + "recursive": true } if (process.env.MOCHA_THROW_DEPRECATION === 'false') { delete config['throw-deprecation']; diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 5d55db54adb..f686ef6504e 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "422f5d2e5edd6df53cf68e8d8b501cdf77155524" + "sha": "34a71aa89bc328d0015442b0978a95aa08664bc9" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" + "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" } } ], From 5035ca623e5e491bac0f4713886618f5f6f010d5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2020 09:15:32 -0700 Subject: [PATCH 0660/1029] chore: release 8.0.6 (#890) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index c8b9ceca627..61852c350fe 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.6](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.5...v8.0.6) (2020-09-12) + + +### Bug Fixes + +* **deps:** update dependency yargs to v16 ([#889](https://www.github.com/googleapis/nodejs-logging/issues/889)) ([08ee746](https://www.github.com/googleapis/nodejs-logging/commit/08ee746ddf08f38528d350cd394e903d41d1d621)) + ### [8.0.5](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.4...v8.0.5) (2020-08-18) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3f38cfd21ae..3641c9e2f8e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.5", + "version": "8.0.6", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 368aa54ffa98ea9b697f3f237d73ee7647ac5a8f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 22 Sep 2020 19:19:28 +0200 Subject: [PATCH 0661/1029] fix(deps): update dependency @google-cloud/projectify to v2 (#895) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3641c9e2f8e..bf00c71cf42 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -48,7 +48,7 @@ "dependencies": { "@google-cloud/common": "^2.4.0", "@google-cloud/paginator": "^3.0.0", - "@google-cloud/projectify": "^1.0.4", + "@google-cloud/projectify": "^2.0.0", "@google-cloud/promisify": "^2.0.0", "@opencensus/propagation-stackdriver": "0.0.22", "arrify": "^2.0.1", From 063a35a4645e8f6f6bb53a4dbe7f795c4eb5438d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 22 Sep 2020 19:42:04 +0200 Subject: [PATCH 0662/1029] fix(deps): update dependency gcp-metadata to v4 (#893) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [gcp-metadata](https://togithub.com/googleapis/gcp-metadata) | dependencies | major | [`^3.5.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/gcp-metadata/3.5.0/4.2.0) | --- ### Release Notes
googleapis/gcp-metadata ### [`v4.2.0`](https://togithub.com/googleapis/gcp-metadata/blob/master/CHANGELOG.md#​420-httpswwwgithubcomgoogleapisgcp-metadatacomparev414v420-2020-09-15) [Compare Source](https://togithub.com/googleapis/gcp-metadata/compare/v4.1.4...v4.2.0) ##### Features - add support for GCE_METADATA_HOST environment variable ([#​406](https://www.github.com/googleapis/gcp-metadata/issues/406)) ([eaf128a](https://www.github.com/googleapis/gcp-metadata/commit/eaf128ad5afc4357cde72d19b017b9474c070fea)) ##### [4.1.4](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.3...v4.1.4) (2020-07-15) ##### Bug Fixes - **deps:** update dependency json-bigint to v1 ([#​382](https://www.github.com/googleapis/gcp-metadata/issues/382)) ([ab4d8c3](https://www.github.com/googleapis/gcp-metadata/commit/ab4d8c3022903206d433bafc47c27815c6f85e36)) ##### [4.1.3](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.2...v4.1.3) (2020-07-13) ##### Bug Fixes - **deps:** update dependency json-bigint to ^0.4.0 ([#​378](https://www.github.com/googleapis/gcp-metadata/issues/378)) ([b214280](https://www.github.com/googleapis/gcp-metadata/commit/b2142807928c8c032509277900d35fccd1023f0f)) ##### [4.1.2](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.1...v4.1.2) (2020-07-10) ##### Bug Fixes - **deps:** roll back dependency gcp-metadata to ^4.1.0 ([#​373](https://www.github.com/googleapis/gcp-metadata/issues/373)) ([a45adef](https://www.github.com/googleapis/gcp-metadata/commit/a45adefd92418faa08c8a5014cedb844d1eb3ae6)) ##### [4.1.1](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.0...v4.1.1) (2020-07-09) ##### Bug Fixes - typeo in nodejs .gitattribute ([#​371](https://www.github.com/googleapis/gcp-metadata/issues/371)) ([5b4bb1c](https://www.github.com/googleapis/gcp-metadata/commit/5b4bb1c85e67e3ef0a6d1ec2ea316d560e03092f)) ### [`v4.1.4`](https://togithub.com/googleapis/gcp-metadata/blob/master/CHANGELOG.md#​414-httpswwwgithubcomgoogleapisgcp-metadatacomparev413v414-2020-07-15) [Compare Source](https://togithub.com/googleapis/gcp-metadata/compare/v4.1.0...v4.1.4) ### [`v4.1.0`](https://togithub.com/googleapis/gcp-metadata/blob/master/CHANGELOG.md#​410-httpswwwgithubcomgoogleapisgcp-metadatacomparev401v410-2020-05-05) [Compare Source](https://togithub.com/googleapis/gcp-metadata/compare/v4.0.1...v4.1.0) ##### Features - Introduces the GCE_METADATA_IP to allow using a different IP address for the GCE metadata server. ([#​346](https://www.github.com/googleapis/gcp-metadata/issues/346)) ([ec0f82d](https://www.github.com/googleapis/gcp-metadata/commit/ec0f82d022b4b3aac95e94ee1d8e53cfac3b14a4)) ##### Bug Fixes - do not check secondary host if GCE_METADATA_IP set ([#​352](https://www.github.com/googleapis/gcp-metadata/issues/352)) ([64fa7d6](https://www.github.com/googleapis/gcp-metadata/commit/64fa7d68cbb76f455a3bfdcb27d58e7775eb789a)) - warn rather than throwing when we fail to connect to metadata server ([#​351](https://www.github.com/googleapis/gcp-metadata/issues/351)) ([754a6c0](https://www.github.com/googleapis/gcp-metadata/commit/754a6c07d1a72615cbb5ebf9ee04475a9a12f1c0)) ##### [4.0.1](https://www.github.com/googleapis/gcp-metadata/compare/v4.0.0...v4.0.1) (2020-04-14) ##### Bug Fixes - **deps:** update dependency gaxios to v3 ([#​326](https://www.github.com/googleapis/gcp-metadata/issues/326)) ([5667178](https://www.github.com/googleapis/gcp-metadata/commit/5667178429baff71ad5dab2a96f97f27b2106d57)) - apache license URL ([#​468](https://www.github.com/googleapis/gcp-metadata/issues/468)) ([#​336](https://www.github.com/googleapis/gcp-metadata/issues/336)) ([195dcd2](https://www.github.com/googleapis/gcp-metadata/commit/195dcd2d227ba496949e7ec0dcd77e5b9269066c)) ### [`v4.0.1`](https://togithub.com/googleapis/gcp-metadata/blob/master/CHANGELOG.md#​401-httpswwwgithubcomgoogleapisgcp-metadatacomparev400v401-2020-04-14) [Compare Source](https://togithub.com/googleapis/gcp-metadata/compare/v4.0.0...v4.0.1) ### [`v4.0.0`](https://togithub.com/googleapis/gcp-metadata/blob/master/CHANGELOG.md#​400-httpswwwgithubcomgoogleapisgcp-metadatacomparev350v400-2020-03-19) [Compare Source](https://togithub.com/googleapis/gcp-metadata/compare/v3.5.0...v4.0.0) ##### ⚠ BREAKING CHANGES - typescript@3.7.x has breaking changes; compiler now targets es2015 - drops Node 8 from engines field ([#​315](https://togithub.com/googleapis/gcp-metadata/issues/315)) ##### Features - drops Node 8 from engines field ([#​315](https://www.github.com/googleapis/gcp-metadata/issues/315)) ([acb6233](https://www.github.com/googleapis/gcp-metadata/commit/acb62337e8ba7f0b259ae4e553f19c5786207d84)) ##### Build System - switch to latest typescirpt/gts ([#​317](https://www.github.com/googleapis/gcp-metadata/issues/317)) ([fbb7158](https://www.github.com/googleapis/gcp-metadata/commit/fbb7158be62c9f1949b69079e35113be1e10495c))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bf00c71cf42..3e7f9539890 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "dot-prop": "^5.2.0", "eventid": "^1.0.0", "extend": "^3.0.2", - "gcp-metadata": "^3.5.0", + "gcp-metadata": "^4.0.0", "google-auth-library": "^5.10.1", "google-gax": "^2.7.0", "is": "^3.3.0", From 4a198772087104726486cd2a62502e75f02f26b8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 26 Sep 2020 07:06:49 +0200 Subject: [PATCH 0663/1029] fix(deps): update dependency google-auth-library to v6 (#894) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3e7f9539890..553f41393b1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "eventid": "^1.0.0", "extend": "^3.0.2", "gcp-metadata": "^4.0.0", - "google-auth-library": "^5.10.1", + "google-auth-library": "^6.0.0", "google-gax": "^2.7.0", "is": "^3.3.0", "on-finished": "^2.3.0", From 00819d25bd88ce3a53a624afc97cf16cefcb141f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 30 Sep 2020 17:56:40 +0200 Subject: [PATCH 0664/1029] fix(deps): update dependency type-fest to ^0.17.0 (#901) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 553f41393b1..eba012467b4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -64,7 +64,7 @@ "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", "through2": "^4.0.0", - "type-fest": "^0.16.0" + "type-fest": "^0.17.0" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", From 5248656cff4a4f767c6be8c92907466d55dbd4d3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 1 Oct 2020 00:14:59 +0200 Subject: [PATCH 0665/1029] fix(deps): update dependency @google-cloud/common to v3 (#892) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index eba012467b4..a734e778d72 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -46,7 +46,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "@google-cloud/common": "^2.4.0", + "@google-cloud/common": "^3.0.0", "@google-cloud/paginator": "^3.0.0", "@google-cloud/projectify": "^2.0.0", "@google-cloud/promisify": "^2.0.0", From 64d610153307c04ab864dedc0ff52941f84e49e8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 1 Oct 2020 13:03:34 -0700 Subject: [PATCH 0666/1029] chore: update bucket for cloud-rad (#902) Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Source-Author: F. Hinkelmann Source-Date: Wed Sep 30 14:13:57 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 079dcce498117f9570cebe6e6cff254b38ba3860 Source-Link: https://github.com/googleapis/synthtool/commit/079dcce498117f9570cebe6e6cff254b38ba3860 --- handwritten/logging/.kokoro/release/docs-devsite.sh | 2 +- handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh index fa089cf290e..458fe4f9062 100755 --- a/handwritten/logging/.kokoro/release/docs-devsite.sh +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -61,7 +61,7 @@ if [[ -z "$CREDENTIALS" ]]; then CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account fi if [[ -z "$BUCKET" ]]; then - BUCKET=docs-staging-v2-staging + BUCKET=docs-staging-v2 fi python3 -m docuploader upload ./_devsite --destination-prefix docfx --credentials $CREDENTIALS --staging-bucket $BUCKET diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index f686ef6504e..ea2dfdd5e62 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "34a71aa89bc328d0015442b0978a95aa08664bc9" + "sha": "b7c0f9676fd1bacfd336a42ffac53f8765d99e3e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" + "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" } } ], From b6a459c0fa9c26b3d03fe705dced3d4411e8f776 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 5 Oct 2020 10:42:39 -0700 Subject: [PATCH 0667/1029] build(node_library): migrate to Trampoline V2 (#903) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/64297643-e4cc-4998-b450-b4826d54d10b/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 --- handwritten/logging/.kokoro/common.cfg | 2 +- .../.kokoro/continuous/node10/common.cfg | 2 +- .../.kokoro/continuous/node12/common.cfg | 2 +- handwritten/logging/.kokoro/docs.sh | 2 +- handwritten/logging/.kokoro/lint.sh | 2 +- .../logging/.kokoro/populate-secrets.sh | 65 ++- .../.kokoro/presubmit/node10/common.cfg | 2 +- .../.kokoro/presubmit/node12/common.cfg | 2 +- handwritten/logging/.kokoro/publish.sh | 2 +- .../logging/.kokoro/release/docs-devsite.cfg | 2 +- .../logging/.kokoro/release/docs-devsite.sh | 4 +- handwritten/logging/.kokoro/release/docs.cfg | 2 +- handwritten/logging/.kokoro/release/docs.sh | 4 +- .../logging/.kokoro/release/publish.cfg | 6 +- handwritten/logging/.kokoro/samples-test.sh | 2 +- handwritten/logging/.kokoro/system-test.sh | 2 +- handwritten/logging/.kokoro/test.sh | 2 +- handwritten/logging/.kokoro/trampoline.sh | 4 + handwritten/logging/.kokoro/trampoline_v2.sh | 488 ++++++++++++++++++ handwritten/logging/.trampolinerc | 51 ++ handwritten/logging/synth.metadata | 6 +- 21 files changed, 616 insertions(+), 38 deletions(-) create mode 100755 handwritten/logging/.kokoro/trampoline_v2.sh create mode 100644 handwritten/logging/.trampolinerc diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 8d06c907f37..c87725f3b79 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { diff --git a/handwritten/logging/.kokoro/continuous/node10/common.cfg b/handwritten/logging/.kokoro/continuous/node10/common.cfg index f8c8afae40c..d70d7b900bb 100644 --- a/handwritten/logging/.kokoro/continuous/node10/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/common.cfg @@ -21,7 +21,7 @@ before_action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { diff --git a/handwritten/logging/.kokoro/continuous/node12/common.cfg b/handwritten/logging/.kokoro/continuous/node12/common.cfg index 40e5c76100c..0d3d29bcccd 100644 --- a/handwritten/logging/.kokoro/continuous/node12/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node12/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { diff --git a/handwritten/logging/.kokoro/docs.sh b/handwritten/logging/.kokoro/docs.sh index 952403faede..85901242b5e 100755 --- a/handwritten/logging/.kokoro/docs.sh +++ b/handwritten/logging/.kokoro/docs.sh @@ -16,7 +16,7 @@ set -eo pipefail -export NPM_CONFIG_PREFIX=/home/node/.npm-global +export NPM_CONFIG_PREFIX=${HOME}/.npm-global cd $(dirname $0)/.. diff --git a/handwritten/logging/.kokoro/lint.sh b/handwritten/logging/.kokoro/lint.sh index b03cb0439a6..aef4866e4c4 100755 --- a/handwritten/logging/.kokoro/lint.sh +++ b/handwritten/logging/.kokoro/lint.sh @@ -16,7 +16,7 @@ set -eo pipefail -export NPM_CONFIG_PREFIX=/home/node/.npm-global +export NPM_CONFIG_PREFIX=${HOME}/.npm-global cd $(dirname $0)/.. diff --git a/handwritten/logging/.kokoro/populate-secrets.sh b/handwritten/logging/.kokoro/populate-secrets.sh index 6f9d228859d..deb2b199eb4 100755 --- a/handwritten/logging/.kokoro/populate-secrets.sh +++ b/handwritten/logging/.kokoro/populate-secrets.sh @@ -13,31 +13,64 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This file is called in the early stage of `trampoline_v2.sh` to +# populate secrets needed for the CI builds. + set -eo pipefail function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} function msg { println "$*" >&2 ;} function println { printf '%s\n' "$(now) $*" ;} +# Populates requested secrets set in SECRET_MANAGER_KEYS + +# In Kokoro CI builds, we use the service account attached to the +# Kokoro VM. This means we need to setup auth on other CI systems. +# For local run, we just use the gcloud command for retrieving the +# secrets. + +if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then + GCLOUD_COMMANDS=( + "docker" + "run" + "--entrypoint=gcloud" + "--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR}" + "gcr.io/google.com/cloudsdktool/cloud-sdk" + ) + if [[ "${TRAMPOLINE_CI:-}" == "kokoro" ]]; then + SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" + else + echo "Authentication for this CI system is not implemented yet." + exit 2 + # TODO: Determine appropriate SECRET_LOCATION and the GCLOUD_COMMANDS. + fi +else + # For local run, use /dev/shm or temporary directory for + # KOKORO_GFILE_DIR. + if [[ -d "/dev/shm" ]]; then + export KOKORO_GFILE_DIR=/dev/shm + else + export KOKORO_GFILE_DIR=$(mktemp -d -t ci-XXXXXXXX) + fi + SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" + GCLOUD_COMMANDS=("gcloud") +fi -# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: -# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com -SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" mkdir -p ${SECRET_LOCATION} + for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") do - msg "Retrieving secret ${key}" - docker run --entrypoint=gcloud \ - --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ - gcr.io/google.com/cloudsdktool/cloud-sdk \ - secrets versions access latest \ - --project cloud-devrel-kokoro-resources \ - --secret $key > \ - "$SECRET_LOCATION/$key" - if [[ $? == 0 ]]; then - msg "Secret written to ${SECRET_LOCATION}/${key}" - else - msg "Error retrieving secret ${key}" - fi + msg "Retrieving secret ${key}" + "${GCLOUD_COMMANDS[@]}" \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret $key > \ + "$SECRET_LOCATION/$key" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + exit 2 + fi done diff --git a/handwritten/logging/.kokoro/presubmit/node10/common.cfg b/handwritten/logging/.kokoro/presubmit/node10/common.cfg index f8c8afae40c..d70d7b900bb 100644 --- a/handwritten/logging/.kokoro/presubmit/node10/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node10/common.cfg @@ -21,7 +21,7 @@ before_action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { diff --git a/handwritten/logging/.kokoro/presubmit/node12/common.cfg b/handwritten/logging/.kokoro/presubmit/node12/common.cfg index 40e5c76100c..0d3d29bcccd 100644 --- a/handwritten/logging/.kokoro/presubmit/node12/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node12/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh index f056d861729..4db6bf1c7f5 100755 --- a/handwritten/logging/.kokoro/publish.sh +++ b/handwritten/logging/.kokoro/publish.sh @@ -16,7 +16,7 @@ set -eo pipefail -export NPM_CONFIG_PREFIX=/home/node/.npm-global +export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Start the releasetool reporter python3 -m pip install gcp-releasetool diff --git a/handwritten/logging/.kokoro/release/docs-devsite.cfg b/handwritten/logging/.kokoro/release/docs-devsite.cfg index 38212df4f57..cd65d1c2609 100644 --- a/handwritten/logging/.kokoro/release/docs-devsite.cfg +++ b/handwritten/logging/.kokoro/release/docs-devsite.cfg @@ -18,7 +18,7 @@ env_vars: { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh index 458fe4f9062..0d11b7ae951 100755 --- a/handwritten/logging/.kokoro/release/docs-devsite.sh +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -20,8 +20,8 @@ set -eo pipefail if [[ -z "$CREDENTIALS" ]]; then # if CREDENTIALS are explicitly set, assume we're testing locally # and don't set NPM_CONFIG_PREFIX. - export NPM_CONFIG_PREFIX=/home/node/.npm-global - export PATH="$PATH:/home/node/.npm-global/bin" + export NPM_CONFIG_PREFIX=${HOME}/.npm-global + export PATH="$PATH:${NPM_CONFIG_PREFIX}/bin" cd $(dirname $0)/../.. fi diff --git a/handwritten/logging/.kokoro/release/docs.cfg b/handwritten/logging/.kokoro/release/docs.cfg index 5f695482c47..4b7e691eddb 100644 --- a/handwritten/logging/.kokoro/release/docs.cfg +++ b/handwritten/logging/.kokoro/release/docs.cfg @@ -18,7 +18,7 @@ env_vars: { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/release/docs.sh b/handwritten/logging/.kokoro/release/docs.sh index 4d3a0868531..4c866c86000 100755 --- a/handwritten/logging/.kokoro/release/docs.sh +++ b/handwritten/logging/.kokoro/release/docs.sh @@ -20,8 +20,8 @@ set -eo pipefail if [[ -z "$CREDENTIALS" ]]; then # if CREDENTIALS are explicitly set, assume we're testing locally # and don't set NPM_CONFIG_PREFIX. - export NPM_CONFIG_PREFIX=/home/node/.npm-global - export PATH="$PATH:/home/node/.npm-global/bin" + export NPM_CONFIG_PREFIX=${HOME}/.npm-global + export PATH="$PATH:${NPM_CONFIG_PREFIX}/bin" cd $(dirname $0)/../.. fi npm install diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 086378c5762..78e3c040fa3 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -27,7 +27,7 @@ before_action { } } -# Fetch magictoken to use with Magic Github Proxy +# Fetch magictoken to use with Magic Github Proxy before_action { fetch_keystore { keystore_resource { @@ -37,7 +37,7 @@ before_action { } } -# Fetch api key to use with Magic Github Proxy +# Fetch api key to use with Magic Github Proxy before_action { fetch_keystore { keystore_resource { @@ -56,7 +56,7 @@ env_vars: { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline.sh" +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index c0c40139cb7..bab7ba4e967 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -16,7 +16,7 @@ set -eo pipefail -export NPM_CONFIG_PREFIX=/home/node/.npm-global +export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Setup service account credentials. export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index 283f1700fef..8a08400484a 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -16,7 +16,7 @@ set -eo pipefail -export NPM_CONFIG_PREFIX=/home/node/.npm-global +export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Setup service account credentials. export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 47be59b987c..5be385fef64 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -16,7 +16,7 @@ set -eo pipefail -export NPM_CONFIG_PREFIX=/home/node/.npm-global +export NPM_CONFIG_PREFIX=${HOME}/.npm-global cd $(dirname $0)/.. diff --git a/handwritten/logging/.kokoro/trampoline.sh b/handwritten/logging/.kokoro/trampoline.sh index a4241db23f4..f693a1ce7aa 100755 --- a/handwritten/logging/.kokoro/trampoline.sh +++ b/handwritten/logging/.kokoro/trampoline.sh @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This file is not used any more, but we keep this file for making it +# easy to roll back. +# TODO: Remove this file from the template. + set -eo pipefail # Always run the cleanup script, regardless of the success of bouncing into diff --git a/handwritten/logging/.kokoro/trampoline_v2.sh b/handwritten/logging/.kokoro/trampoline_v2.sh new file mode 100755 index 00000000000..5ae75f977d7 --- /dev/null +++ b/handwritten/logging/.kokoro/trampoline_v2.sh @@ -0,0 +1,488 @@ +#!/usr/bin/env bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# trampoline_v2.sh +# +# If you want to make a change to this file, consider doing so at: +# https://github.com/googlecloudplatform/docker-ci-helper +# +# This script is for running CI builds. For Kokoro builds, we +# set this script to `build_file` field in the Kokoro configuration. + +# This script does 3 things. +# +# 1. Prepare the Docker image for the test +# 2. Run the Docker with appropriate flags to run the test +# 3. Upload the newly built Docker image +# +# in a way that is somewhat compatible with trampoline_v1. +# +# These environment variables are required: +# TRAMPOLINE_IMAGE: The docker image to use. +# TRAMPOLINE_DOCKERFILE: The location of the Dockerfile. +# +# You can optionally change these environment variables: +# TRAMPOLINE_IMAGE_UPLOAD: +# (true|false): Whether to upload the Docker image after the +# successful builds. +# TRAMPOLINE_BUILD_FILE: The script to run in the docker container. +# TRAMPOLINE_WORKSPACE: The workspace path in the docker container. +# Defaults to /workspace. +# Potentially there are some repo specific envvars in .trampolinerc in +# the project root. +# +# Here is an example for running this script. +# TRAMPOLINE_IMAGE=gcr.io/cloud-devrel-kokoro-resources/node:10-user \ +# TRAMPOLINE_BUILD_FILE=.kokoro/system-test.sh \ +# .kokoro/trampoline_v2.sh + +set -euo pipefail + +TRAMPOLINE_VERSION="2.0.7" + +if command -v tput >/dev/null && [[ -n "${TERM:-}" ]]; then + readonly IO_COLOR_RED="$(tput setaf 1)" + readonly IO_COLOR_GREEN="$(tput setaf 2)" + readonly IO_COLOR_YELLOW="$(tput setaf 3)" + readonly IO_COLOR_RESET="$(tput sgr0)" +else + readonly IO_COLOR_RED="" + readonly IO_COLOR_GREEN="" + readonly IO_COLOR_YELLOW="" + readonly IO_COLOR_RESET="" +fi + +function function_exists { + [ $(LC_ALL=C type -t $1)"" == "function" ] +} + +# Logs a message using the given color. The first argument must be one +# of the IO_COLOR_* variables defined above, such as +# "${IO_COLOR_YELLOW}". The remaining arguments will be logged in the +# given color. The log message will also have an RFC-3339 timestamp +# prepended (in UTC). You can disable the color output by setting +# TERM=vt100. +function log_impl() { + local color="$1" + shift + local timestamp="$(date -u "+%Y-%m-%dT%H:%M:%SZ")" + echo "================================================================" + echo "${color}${timestamp}:" "$@" "${IO_COLOR_RESET}" + echo "================================================================" +} + +# Logs the given message with normal coloring and a timestamp. +function log() { + log_impl "${IO_COLOR_RESET}" "$@" +} + +# Logs the given message in green with a timestamp. +function log_green() { + log_impl "${IO_COLOR_GREEN}" "$@" +} + +# Logs the given message in yellow with a timestamp. +function log_yellow() { + log_impl "${IO_COLOR_YELLOW}" "$@" +} + +# Logs the given message in red with a timestamp. +function log_red() { + log_impl "${IO_COLOR_RED}" "$@" +} + +readonly tmpdir=$(mktemp -d -t ci-XXXXXXXX) +readonly tmphome="${tmpdir}/h" +mkdir -p "${tmphome}" + +function cleanup() { + rm -rf "${tmpdir}" +} +trap cleanup EXIT + +RUNNING_IN_CI="${RUNNING_IN_CI:-false}" + +# The workspace in the container, defaults to /workspace. +TRAMPOLINE_WORKSPACE="${TRAMPOLINE_WORKSPACE:-/workspace}" + +pass_down_envvars=( + # TRAMPOLINE_V2 variables. + # Tells scripts whether they are running as part of CI or not. + "RUNNING_IN_CI" + # Indicates which CI system we're in. + "TRAMPOLINE_CI" + # Indicates the version of the script. + "TRAMPOLINE_VERSION" +) + +log_yellow "Building with Trampoline ${TRAMPOLINE_VERSION}" + +# Detect which CI systems we're in. If we're in any of the CI systems +# we support, `RUNNING_IN_CI` will be true and `TRAMPOLINE_CI` will be +# the name of the CI system. Both envvars will be passing down to the +# container for telling which CI system we're in. +if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then + # descriptive env var for indicating it's on CI. + RUNNING_IN_CI="true" + TRAMPOLINE_CI="kokoro" + if [[ "${TRAMPOLINE_USE_LEGACY_SERVICE_ACCOUNT:-}" == "true" ]]; then + if [[ ! -f "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json" ]]; then + log_red "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json does not exist. Did you forget to mount cloud-devrel-kokoro-resources/trampoline? Aborting." + exit 1 + fi + # This service account will be activated later. + TRAMPOLINE_SERVICE_ACCOUNT="${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json" + else + if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then + gcloud auth list + fi + log_yellow "Configuring Container Registry access" + gcloud auth configure-docker --quiet + fi + pass_down_envvars+=( + # KOKORO dynamic variables. + "KOKORO_BUILD_NUMBER" + "KOKORO_BUILD_ID" + "KOKORO_JOB_NAME" + "KOKORO_GIT_COMMIT" + "KOKORO_GITHUB_COMMIT" + "KOKORO_GITHUB_PULL_REQUEST_NUMBER" + "KOKORO_GITHUB_PULL_REQUEST_COMMIT" + # For Build Cop Bot + "KOKORO_GITHUB_COMMIT_URL" + "KOKORO_GITHUB_PULL_REQUEST_URL" + ) +elif [[ "${TRAVIS:-}" == "true" ]]; then + RUNNING_IN_CI="true" + TRAMPOLINE_CI="travis" + pass_down_envvars+=( + "TRAVIS_BRANCH" + "TRAVIS_BUILD_ID" + "TRAVIS_BUILD_NUMBER" + "TRAVIS_BUILD_WEB_URL" + "TRAVIS_COMMIT" + "TRAVIS_COMMIT_MESSAGE" + "TRAVIS_COMMIT_RANGE" + "TRAVIS_JOB_NAME" + "TRAVIS_JOB_NUMBER" + "TRAVIS_JOB_WEB_URL" + "TRAVIS_PULL_REQUEST" + "TRAVIS_PULL_REQUEST_BRANCH" + "TRAVIS_PULL_REQUEST_SHA" + "TRAVIS_PULL_REQUEST_SLUG" + "TRAVIS_REPO_SLUG" + "TRAVIS_SECURE_ENV_VARS" + "TRAVIS_TAG" + ) +elif [[ -n "${GITHUB_RUN_ID:-}" ]]; then + RUNNING_IN_CI="true" + TRAMPOLINE_CI="github-workflow" + pass_down_envvars+=( + "GITHUB_WORKFLOW" + "GITHUB_RUN_ID" + "GITHUB_RUN_NUMBER" + "GITHUB_ACTION" + "GITHUB_ACTIONS" + "GITHUB_ACTOR" + "GITHUB_REPOSITORY" + "GITHUB_EVENT_NAME" + "GITHUB_EVENT_PATH" + "GITHUB_SHA" + "GITHUB_REF" + "GITHUB_HEAD_REF" + "GITHUB_BASE_REF" + ) +elif [[ "${CIRCLECI:-}" == "true" ]]; then + RUNNING_IN_CI="true" + TRAMPOLINE_CI="circleci" + pass_down_envvars+=( + "CIRCLE_BRANCH" + "CIRCLE_BUILD_NUM" + "CIRCLE_BUILD_URL" + "CIRCLE_COMPARE_URL" + "CIRCLE_JOB" + "CIRCLE_NODE_INDEX" + "CIRCLE_NODE_TOTAL" + "CIRCLE_PREVIOUS_BUILD_NUM" + "CIRCLE_PROJECT_REPONAME" + "CIRCLE_PROJECT_USERNAME" + "CIRCLE_REPOSITORY_URL" + "CIRCLE_SHA1" + "CIRCLE_STAGE" + "CIRCLE_USERNAME" + "CIRCLE_WORKFLOW_ID" + "CIRCLE_WORKFLOW_JOB_ID" + "CIRCLE_WORKFLOW_UPSTREAM_JOB_IDS" + "CIRCLE_WORKFLOW_WORKSPACE_ID" + ) +fi + +# Configure the service account for pulling the docker image. +function repo_root() { + local dir="$1" + while [[ ! -d "${dir}/.git" ]]; do + dir="$(dirname "$dir")" + done + echo "${dir}" +} + +# Detect the project root. In CI builds, we assume the script is in +# the git tree and traverse from there, otherwise, traverse from `pwd` +# to find `.git` directory. +if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then + PROGRAM_PATH="$(realpath "$0")" + PROGRAM_DIR="$(dirname "${PROGRAM_PATH}")" + PROJECT_ROOT="$(repo_root "${PROGRAM_DIR}")" +else + PROJECT_ROOT="$(repo_root $(pwd))" +fi + +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + +# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need +# to use this environment variable in `PROJECT_ROOT`. +if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then + + mkdir -p "${tmpdir}/gcloud" + gcloud_config_dir="${tmpdir}/gcloud" + + log_yellow "Using isolated gcloud config: ${gcloud_config_dir}." + export CLOUDSDK_CONFIG="${gcloud_config_dir}" + + log_yellow "Using ${TRAMPOLINE_SERVICE_ACCOUNT} for authentication." + gcloud auth activate-service-account \ + --key-file "${TRAMPOLINE_SERVICE_ACCOUNT}" + log_yellow "Configuring Container Registry access" + gcloud auth configure-docker --quiet +fi + +required_envvars=( + # The basic trampoline configurations. + "TRAMPOLINE_IMAGE" + "TRAMPOLINE_BUILD_FILE" +) + +if [[ -f "${PROJECT_ROOT}/.trampolinerc" ]]; then + source "${PROJECT_ROOT}/.trampolinerc" +fi + +log_yellow "Checking environment variables." +for e in "${required_envvars[@]}" +do + if [[ -z "${!e:-}" ]]; then + log "Missing ${e} env var. Aborting." + exit 1 + fi +done + +# We want to support legacy style TRAMPOLINE_BUILD_FILE used with V1 +# script: e.g. "github/repo-name/.kokoro/run_tests.sh" +TRAMPOLINE_BUILD_FILE="${TRAMPOLINE_BUILD_FILE#github/*/}" +log_yellow "Using TRAMPOLINE_BUILD_FILE: ${TRAMPOLINE_BUILD_FILE}" + +# ignore error on docker operations and test execution +set +e + +log_yellow "Preparing Docker image." +# We only download the docker image in CI builds. +if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then + # Download the docker image specified by `TRAMPOLINE_IMAGE` + + # We may want to add --max-concurrent-downloads flag. + + log_yellow "Start pulling the Docker image: ${TRAMPOLINE_IMAGE}." + if docker pull "${TRAMPOLINE_IMAGE}"; then + log_green "Finished pulling the Docker image: ${TRAMPOLINE_IMAGE}." + has_image="true" + else + log_red "Failed pulling the Docker image: ${TRAMPOLINE_IMAGE}." + has_image="false" + fi +else + # For local run, check if we have the image. + if docker images "${TRAMPOLINE_IMAGE}" | grep "${TRAMPOLINE_IMAGE%:*}"; then + has_image="true" + else + has_image="false" + fi +fi + + +# The default user for a Docker container has uid 0 (root). To avoid +# creating root-owned files in the build directory we tell docker to +# use the current user ID. +user_uid="$(id -u)" +user_gid="$(id -g)" +user_name="$(id -un)" + +# To allow docker in docker, we add the user to the docker group in +# the host os. +docker_gid=$(cut -d: -f3 < <(getent group docker)) + +update_cache="false" +if [[ "${TRAMPOLINE_DOCKERFILE:-none}" != "none" ]]; then + # Build the Docker image from the source. + context_dir=$(dirname "${TRAMPOLINE_DOCKERFILE}") + docker_build_flags=( + "-f" "${TRAMPOLINE_DOCKERFILE}" + "-t" "${TRAMPOLINE_IMAGE}" + "--build-arg" "UID=${user_uid}" + "--build-arg" "USERNAME=${user_name}" + ) + if [[ "${has_image}" == "true" ]]; then + docker_build_flags+=("--cache-from" "${TRAMPOLINE_IMAGE}") + fi + + log_yellow "Start building the docker image." + if [[ "${TRAMPOLINE_VERBOSE:-false}" == "true" ]]; then + echo "docker build" "${docker_build_flags[@]}" "${context_dir}" + fi + + # ON CI systems, we want to suppress docker build logs, only + # output the logs when it fails. + if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then + if docker build "${docker_build_flags[@]}" "${context_dir}" \ + > "${tmpdir}/docker_build.log" 2>&1; then + if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then + cat "${tmpdir}/docker_build.log" + fi + + log_green "Finished building the docker image." + update_cache="true" + else + log_red "Failed to build the Docker image, aborting." + log_yellow "Dumping the build logs:" + cat "${tmpdir}/docker_build.log" + exit 1 + fi + else + if docker build "${docker_build_flags[@]}" "${context_dir}"; then + log_green "Finished building the docker image." + update_cache="true" + else + log_red "Failed to build the Docker image, aborting." + exit 1 + fi + fi +else + if [[ "${has_image}" != "true" ]]; then + log_red "We do not have ${TRAMPOLINE_IMAGE} locally, aborting." + exit 1 + fi +fi + +# We use an array for the flags so they are easier to document. +docker_flags=( + # Remove the container after it exists. + "--rm" + + # Use the host network. + "--network=host" + + # Run in priviledged mode. We are not using docker for sandboxing or + # isolation, just for packaging our dev tools. + "--privileged" + + # Run the docker script with the user id. Because the docker image gets to + # write in ${PWD} you typically want this to be your user id. + # To allow docker in docker, we need to use docker gid on the host. + "--user" "${user_uid}:${docker_gid}" + + # Pass down the USER. + "--env" "USER=${user_name}" + + # Mount the project directory inside the Docker container. + "--volume" "${PROJECT_ROOT}:${TRAMPOLINE_WORKSPACE}" + "--workdir" "${TRAMPOLINE_WORKSPACE}" + "--env" "PROJECT_ROOT=${TRAMPOLINE_WORKSPACE}" + + # Mount the temporary home directory. + "--volume" "${tmphome}:/h" + "--env" "HOME=/h" + + # Allow docker in docker. + "--volume" "/var/run/docker.sock:/var/run/docker.sock" + + # Mount the /tmp so that docker in docker can mount the files + # there correctly. + "--volume" "/tmp:/tmp" + # Pass down the KOKORO_GFILE_DIR and KOKORO_KEYSTORE_DIR + # TODO(tmatsuo): This part is not portable. + "--env" "TRAMPOLINE_SECRET_DIR=/secrets" + "--volume" "${KOKORO_GFILE_DIR:-/dev/shm}:/secrets/gfile" + "--env" "KOKORO_GFILE_DIR=/secrets/gfile" + "--volume" "${KOKORO_KEYSTORE_DIR:-/dev/shm}:/secrets/keystore" + "--env" "KOKORO_KEYSTORE_DIR=/secrets/keystore" +) + +# Add an option for nicer output if the build gets a tty. +if [[ -t 0 ]]; then + docker_flags+=("-it") +fi + +# Passing down env vars +for e in "${pass_down_envvars[@]}" +do + if [[ -n "${!e:-}" ]]; then + docker_flags+=("--env" "${e}=${!e}") + fi +done + +# If arguments are given, all arguments will become the commands run +# in the container, otherwise run TRAMPOLINE_BUILD_FILE. +if [[ $# -ge 1 ]]; then + log_yellow "Running the given commands '" "${@:1}" "' in the container." + readonly commands=("${@:1}") + if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then + echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}" + fi + docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}" +else + log_yellow "Running the tests in a Docker container." + docker_flags+=("--entrypoint=${TRAMPOLINE_BUILD_FILE}") + if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then + echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" + fi + docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" +fi + + +test_retval=$? + +if [[ ${test_retval} -eq 0 ]]; then + log_green "Build finished with ${test_retval}" +else + log_red "Build finished with ${test_retval}" +fi + +# Only upload it when the test passes. +if [[ "${update_cache}" == "true" ]] && \ + [[ $test_retval == 0 ]] && \ + [[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]]; then + log_yellow "Uploading the Docker image." + if docker push "${TRAMPOLINE_IMAGE}"; then + log_green "Finished uploading the Docker image." + else + log_red "Failed uploading the Docker image." + fi + # Call trampoline_after_upload_hook if it's defined. + if function_exists trampoline_after_upload_hook; then + trampoline_after_upload_hook + fi + +fi + +exit "${test_retval}" diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc new file mode 100644 index 00000000000..164613b9e6a --- /dev/null +++ b/handwritten/logging/.trampolinerc @@ -0,0 +1,51 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Template for .trampolinerc + +# Add required env vars here. +required_envvars+=( +) + +# Add env vars which are passed down into the container here. +pass_down_envvars+=( + "AUTORELEASE_PR" +) + +# Prevent unintentional override on the default image. +if [[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]] && \ + [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then + echo "Please set TRAMPOLINE_IMAGE if you want to upload the Docker image." + exit 1 +fi + +# Define the default value if it makes sense. +if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then + TRAMPOLINE_IMAGE_UPLOAD="" +fi + +if [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then + TRAMPOLINE_IMAGE="" +fi + +if [[ -z "${TRAMPOLINE_DOCKERFILE:-}" ]]; then + TRAMPOLINE_DOCKERFILE="" +fi + +if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then + TRAMPOLINE_BUILD_FILE="" +fi + +# Secret Manager secrets. +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index ea2dfdd5e62..63a3d9b9541 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "b7c0f9676fd1bacfd336a42ffac53f8765d99e3e" + "sha": "0116b1b499448ee5f632dd8bc45807d6ddf12c12" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" + "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" } } ], @@ -75,10 +75,12 @@ ".kokoro/test.bat", ".kokoro/test.sh", ".kokoro/trampoline.sh", + ".kokoro/trampoline_v2.sh", ".mocharc.js", ".nycrc", ".prettierignore", ".prettierrc.js", + ".trampolinerc", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", From 42497ee26b785915185837579b0db8af15cc246a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2020 09:50:26 -0700 Subject: [PATCH 0668/1029] chore: release 8.0.7 (#896) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 11 +++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 61852c350fe..2956c92df3c 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,17 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.7](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.6...v8.0.7) (2020-10-05) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/common to v3 ([#892](https://www.github.com/googleapis/nodejs-logging/issues/892)) ([b7c0f96](https://www.github.com/googleapis/nodejs-logging/commit/b7c0f9676fd1bacfd336a42ffac53f8765d99e3e)) +* **deps:** update dependency @google-cloud/projectify to v2 ([#895](https://www.github.com/googleapis/nodejs-logging/issues/895)) ([884e905](https://www.github.com/googleapis/nodejs-logging/commit/884e905f7f8cc1670174f507a80dfc011a962a3b)) +* **deps:** update dependency gcp-metadata to v4 ([#893](https://www.github.com/googleapis/nodejs-logging/issues/893)) ([ce79a7c](https://www.github.com/googleapis/nodejs-logging/commit/ce79a7cdb345f0fa8bd87c82df400427c1a984ea)) +* **deps:** update dependency google-auth-library to v6 ([#894](https://www.github.com/googleapis/nodejs-logging/issues/894)) ([d2bbe3c](https://www.github.com/googleapis/nodejs-logging/commit/d2bbe3c69595177f90eb19702534b77fc390e8aa)) +* **deps:** update dependency type-fest to ^0.17.0 ([#901](https://www.github.com/googleapis/nodejs-logging/issues/901)) ([860b795](https://www.github.com/googleapis/nodejs-logging/commit/860b795331885da38d5f91d1af9b1b313d3a59a3)) + ### [8.0.6](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.5...v8.0.6) (2020-09-12) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a734e778d72..12e80cf9d3f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.6", + "version": "8.0.7", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From de662d4a119e6b17b3f7085c11927509c0907e06 Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 6 Oct 2020 14:48:02 -0400 Subject: [PATCH 0669/1029] fix(deps): upgrade @google-cloud/common (#905) Addresses a potential prototype pollution leak: https://github.com/googleapis/google-p12-pem/issues/297, https://github.com/digitalbazaar/forge/blob/588c41062d9a13f8dc91be3723b159c6cc434b15/CHANGELOG.md --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 12e80cf9d3f..c51da30eaca 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -46,7 +46,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "@google-cloud/common": "^3.0.0", + "@google-cloud/common": "^3.4.1", "@google-cloud/paginator": "^3.0.0", "@google-cloud/projectify": "^2.0.0", "@google-cloud/promisify": "^2.0.0", From 8810d3a562e9548a0cf1eedee9c6ed6446474f72 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2020 15:08:31 -0400 Subject: [PATCH 0670/1029] chore: release 8.0.8 (#906) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 2956c92df3c..952c0af38ba 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.8](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.7...v8.0.8) (2020-10-06) + + +### Bug Fixes + +* **deps:** upgrade @google-cloud/common ([#905](https://www.github.com/googleapis/nodejs-logging/issues/905)) ([228864b](https://www.github.com/googleapis/nodejs-logging/commit/228864b7c59c80f126c3dbd2d8c8cb4a20adcdf6)) + ### [8.0.7](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.6...v8.0.7) (2020-10-05) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c51da30eaca..77697a2fa9f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.7", + "version": "8.0.8", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 8a170429d9ee70e9cc89a958ac121519d4b27420 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 21:54:29 +0200 Subject: [PATCH 0671/1029] chore(deps): update dependency webpack-cli to v4 (#911) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli) | devDependencies | major | [`^3.3.11` -> `^4.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/3.3.12/4.0.0) | --- ### Release Notes
webpack/webpack-cli ### [`v4.0.0`](https://togithub.com/webpack/webpack-cli/blob/master/CHANGELOG.md#​400-httpsgithubcomwebpackwebpack-clicomparewebpack-cli400-rc1webpack-cli400-2020-10-10) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/v3.3.12...webpack-cli@4.0.0) ##### Bug Fixes - add compilation lifecycle in watch instance ([#​1903](https://togithub.com/webpack/webpack-cli/issues/1903)) ([02b6d21](https://togithub.com/webpack/webpack-cli/commit/02b6d21eaa20166a7ed37816de716b8fc22b756a)) - cleanup `package-utils` package ([#​1822](https://togithub.com/webpack/webpack-cli/issues/1822)) ([fd5b92b](https://togithub.com/webpack/webpack-cli/commit/fd5b92b3cd40361daec5bf4486e455a41f4c9738)) - cli-executer supplies args further up ([#​1904](https://togithub.com/webpack/webpack-cli/issues/1904)) ([097564a](https://togithub.com/webpack/webpack-cli/commit/097564a851b36b63e0a6bf88144997ef65aa057a)) - exit code for validation errors ([59f6303](https://togithub.com/webpack/webpack-cli/commit/59f63037fcbdbb8934b578b9adf5725bc4ae1235)) - exit process in case of schema errors ([71e89b4](https://togithub.com/webpack/webpack-cli/commit/71e89b4092d953ea587cc4f606451ab78cbcdb93)) ##### Features - assign config paths in build dependencies in cache config ([#​1900](https://togithub.com/webpack/webpack-cli/issues/1900)) ([7e90f11](https://togithub.com/webpack/webpack-cli/commit/7e90f110b119f36ef9def4f66cf4e17ccf1438cd))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 77697a2fa9f..32f06551833 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -105,7 +105,7 @@ "typescript": "^3.8.3", "uuid": "^8.0.0", "webpack": "^4.42.0", - "webpack-cli": "^3.3.11", + "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" }, From 12150b308bf59353633b99af6da109454e454770 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 23:02:15 +0200 Subject: [PATCH 0672/1029] chore(deps): update dependency webpack to v5 (#910) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack](https://togithub.com/webpack/webpack) | devDependencies | major | [`^4.42.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/webpack/4.44.2/5.1.0) | --- ### Release Notes
webpack/webpack ### [`v5.1.0`](https://togithub.com/webpack/webpack/releases/v5.1.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.0.0...v5.1.0) ### Features - expose `webpack` property from `Compiler` - expose `cleverMerge`, `EntryOptionPlugin`, `DynamicEntryPlugin` ### Bugfixes - missing `require("..").xxx` in try-catch produces a warning instead of an error now - handle reexports in concatenated modules correctly when they are side-effect-free - fix incorrect deprecation message for ModuleTemplate.hooks.hash ### [`v5.0.0`](https://togithub.com/webpack/webpack/releases/v5.0.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v4.44.2...v5.0.0) [Announcement and changelog](https://webpack.js.org/blog/2020-10-10-webpack-5-release/)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 32f06551833..26e85e456bd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -104,7 +104,7 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "uuid": "^8.0.0", - "webpack": "^4.42.0", + "webpack": "^5.0.0", "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" From 9058256fa34cc2b07bc1f9a731219028c182246b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 15 Oct 2020 01:28:10 +0200 Subject: [PATCH 0673/1029] fix(deps): update dependency dot-prop to v6 (#908) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 26e85e456bd..b4a229a1ddd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -52,7 +52,7 @@ "@google-cloud/promisify": "^2.0.0", "@opencensus/propagation-stackdriver": "0.0.22", "arrify": "^2.0.1", - "dot-prop": "^5.2.0", + "dot-prop": "^6.0.0", "eventid": "^1.0.0", "extend": "^3.0.2", "gcp-metadata": "^4.0.0", From 029497adae308086e23df126dd9a8b475cdaaf01 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 16 Oct 2020 04:48:17 +0200 Subject: [PATCH 0674/1029] fix(deps): update dependency type-fest to ^0.18.0 (#912) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [type-fest](https://togithub.com/sindresorhus/type-fest) | dependencies | minor | [`^0.17.0` -> `^0.18.0`](https://renovatebot.com/diffs/npm/type-fest/0.17.0/0.18.0) | --- ### Release Notes
sindresorhus/type-fest ### [`v0.18.0`](https://togithub.com/sindresorhus/type-fest/releases/v0.18.0) [Compare Source](https://togithub.com/sindresorhus/type-fest/compare/v0.17.0...v0.18.0) - Add [`SetReturnType`](https://togithub.com/sindresorhus/type-fest/blob/master/source/set-return-type.d.ts) and [`Asyncify`](https://togithub.com/sindresorhus/type-fest/blob/master/source/asyncify.d.ts) types ([#​127](https://togithub.com/sindresorhus/type-fest/issues/127)) [`94a665f`](https://togithub.com/sindresorhus/type-fest/commit/94a665f)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b4a229a1ddd..3cafcbe14e3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -64,7 +64,7 @@ "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", "through2": "^4.0.0", - "type-fest": "^0.17.0" + "type-fest": "^0.18.0" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", From 2b486b7e5253f6b9cdd9ca48fb5554a3428cd389 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 16 Oct 2020 09:06:05 -0700 Subject: [PATCH 0675/1029] build: only check --engine-strict for production deps (#914) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1c7a19e0-0642-4da9-a86e-676ae8965b89/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5451633881133e5573cc271a18e73b18caca8b1b --- handwritten/logging/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 63a3d9b9541..7e92cf77b01 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "0116b1b499448ee5f632dd8bc45807d6ddf12c12" + "sha": "dafdf8eedc213c25f23ba5cc5cfa8eea4b2e9727" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" + "sha": "5451633881133e5573cc271a18e73b18caca8b1b" } } ], From 32ee4bff7b4eb9dcb0e89c01093c04232b3ebeb0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Oct 2020 16:14:20 -0700 Subject: [PATCH 0676/1029] chore: clean up Node.js TOC for cloud-rad (#917) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/bea77be5-6371-49cb-b1fc-88500cc4fade/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/901ddd44e9ef7887ee681b9183bbdea99437fdcc Source-Link: https://github.com/googleapis/synthtool/commit/f96d3b455fe27c3dc7bc37c3c9cd27b1c6d269c8 --- handwritten/logging/.kokoro/release/docs-devsite.sh | 4 ++++ handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh index 0d11b7ae951..7657be3377a 100755 --- a/handwritten/logging/.kokoro/release/docs-devsite.sh +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -37,9 +37,13 @@ NAME=$(cat .repo-metadata.json | json name) mkdir ./_devsite cp ./yaml/$NAME/* ./_devsite +# Clean up TOC # Delete SharePoint item, see https://github.com/microsoft/rushstack/issues/1229 sed -i -e '1,3d' ./yaml/toc.yml sed -i -e 's/^ //' ./yaml/toc.yml +# Delete interfaces from TOC (name and uid) +sed -i -e '/name: I[A-Z]/{N;d;}' ./yaml/toc.yml +sed -i -e '/^ *\@google-cloud.*:interface/d' ./yaml/toc.yml cp ./yaml/toc.yml ./_devsite/toc.yml diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 7e92cf77b01..4522b866c1b 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "dafdf8eedc213c25f23ba5cc5cfa8eea4b2e9727" + "sha": "55bdb1ddfae9530c299ef70d837595fe78ab9a3d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5451633881133e5573cc271a18e73b18caca8b1b" + "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" } } ], From d042097517c8c0077a99bac886ec27adaf6144f9 Mon Sep 17 00:00:00 2001 From: Simon Zeltser Date: Mon, 26 Oct 2020 22:19:14 -0700 Subject: [PATCH 0677/1029] chore: api logs codeowners (#916) * chore: add api-logging to codeowners --- handwritten/logging/.github/CODEOWNERS | 5 +--- handwritten/logging/.repo-metadata.json | 5 ++-- handwritten/logging/README.md | 36 ++++++++----------------- 3 files changed, 15 insertions(+), 31 deletions(-) diff --git a/handwritten/logging/.github/CODEOWNERS b/handwritten/logging/.github/CODEOWNERS index 0d1747727e3..08e308f9239 100644 --- a/handwritten/logging/.github/CODEOWNERS +++ b/handwritten/logging/.github/CODEOWNERS @@ -6,7 +6,4 @@ # The yoshi-nodejs team is the default owner for nodejs repositories. -* @googleapis/yoshi-nodejs - -# Cloud Observability DevX team -@googleapis/api-logging +* @googleapis/api-logging @googleapis/yoshi-nodejs diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json index 4b19132479c..592799c5219 100644 --- a/handwritten/logging/.repo-metadata.json +++ b/handwritten/logging/.repo-metadata.json @@ -1,6 +1,6 @@ { "name": "logging", - "name_pretty": "Stackdriver Logging", + "name_pretty": "Cloud Logging", "product_documentation": "https://cloud.google.com/logging/docs", "client_documentation": "https://googleapis.dev/nodejs/logging/latest", "issue_tracker": "https://issuetracker.google.com/savedsearches/559764", @@ -8,5 +8,6 @@ "language": "nodejs", "repo": "googleapis/nodejs-logging", "distribution_name": "@google-cloud/logging", - "api_id": "logging.googleapis.com" + "api_id": "logging.googleapis.com", + "codeowner_team": "@googleapis/api-logging" } diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 71cc30a5214..9cf13ce5b6e 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -2,24 +2,20 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Stackdriver Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) +# [Cloud Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) - - - -[Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, +[Cloud Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. - A comprehensive list of changes in each version may be found in [the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/master/CHANGELOG.md). -* [Stackdriver Logging Node.js Client API Reference][client-docs] -* [Stackdriver Logging Documentation][product-docs] +* [Cloud Logging Node.js Client API Reference][client-docs] +* [Cloud Logging Documentation][product-docs] * [github.com/googleapis/nodejs-logging](https://github.com/googleapis/nodejs-logging) Read more about the client libraries for Cloud APIs, including the older @@ -29,7 +25,6 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. **Table of contents:** - * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) @@ -43,9 +38,9 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Before you begin -1. [Select or create a Cloud Platform project][projects]. -1. [Enable the Stackdriver Logging API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Select or create a Cloud Platform project][projects]. +1. [Enable the Cloud Logging API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. ### Installing the client library @@ -54,7 +49,6 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. npm install @google-cloud/logging ``` - ### Using the client library ```javascript @@ -91,8 +85,8 @@ async function quickstart( } writeLog(); } - ``` + ## Batching Writes High throughput applications should avoid awaiting calls to the logger: @@ -112,7 +106,6 @@ log.write(logEntry2); The `@google-cloud/logging` library will handle batching and dispatching these log lines to the API. - ## Samples Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/master/samples) directory. The samples' `README.md` @@ -126,9 +119,7 @@ has instructions for running the samples. | Quickstart | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | - - -The [Stackdriver Logging Node.js Client API Reference][client-docs] documentation +The [Cloud Logging Node.js Client API Reference][client-docs] documentation also contains samples. ## Supported Node.js Versions @@ -137,7 +128,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. @@ -147,7 +138,7 @@ _Legacy Node.js versions are supported as a best effort:_ * Some security patches may not be able to be backported. * Dependencies will not be kept up-to-date, and features will not be backported. -#### Legacy tags available +### Legacy tags available * `legacy-8`: install client libraries from this dist-tag for versions compatible with Node.js 8. @@ -156,17 +147,12 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). - This library is considered to be **General Availability (GA)**. This means it is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against **GA** libraries are addressed with the highest priority. - - - - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 03f8a8ea08a51ba5f7cd95d790a727285741bab1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Oct 2020 08:38:17 -0700 Subject: [PATCH 0678/1029] docs: updated code of conduct (includes update to actions) (#921) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/87546435-a6be-41b1-b439-16b7d6c5df65/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89c849ba5013e45e8fb688b138f33c2ec6083dc5 Source-Link: https://github.com/googleapis/synthtool/commit/a783321fd55f010709294455584a553f4b24b944 Source-Link: https://github.com/googleapis/synthtool/commit/b7413d38b763827c72c0360f0a3d286c84656eeb Source-Link: https://github.com/googleapis/synthtool/commit/5f6ef0ec5501d33c4667885b37a7685a30d41a76 --- handwritten/logging/CODE_OF_CONDUCT.md | 123 +++++++++++++++++-------- handwritten/logging/README.md | 28 ++++-- handwritten/logging/synth.metadata | 4 +- 3 files changed, 110 insertions(+), 45 deletions(-) diff --git a/handwritten/logging/CODE_OF_CONDUCT.md b/handwritten/logging/CODE_OF_CONDUCT.md index 46b2a08ea6d..2add2547a81 100644 --- a/handwritten/logging/CODE_OF_CONDUCT.md +++ b/handwritten/logging/CODE_OF_CONDUCT.md @@ -1,43 +1,94 @@ -# Contributor Code of Conduct + +# Code of Conduct -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 9cf13ce5b6e..fb315e9ddef 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -8,9 +8,13 @@ [![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) -[Cloud Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, + + + +[Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. + A comprehensive list of changes in each version may be found in [the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/master/CHANGELOG.md). @@ -25,6 +29,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. **Table of contents:** + * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) @@ -38,9 +43,9 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Before you begin -1. [Select or create a Cloud Platform project][projects]. -1. [Enable the Cloud Logging API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Select or create a Cloud Platform project][projects]. +1. [Enable the Cloud Logging API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. ### Installing the client library @@ -49,6 +54,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. npm install @google-cloud/logging ``` + ### Using the client library ```javascript @@ -85,8 +91,8 @@ async function quickstart( } writeLog(); } -``` +``` ## Batching Writes High throughput applications should avoid awaiting calls to the logger: @@ -106,6 +112,7 @@ log.write(logEntry2); The `@google-cloud/logging` library will handle batching and dispatching these log lines to the API. + ## Samples Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/master/samples) directory. The samples' `README.md` @@ -119,6 +126,8 @@ has instructions for running the samples. | Quickstart | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | + + The [Cloud Logging Node.js Client API Reference][client-docs] documentation also contains samples. @@ -128,7 +137,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targeting some end-of-life versions of Node.js are available, and +Client libraries targetting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. @@ -138,7 +147,7 @@ _Legacy Node.js versions are supported as a best effort:_ * Some security patches may not be able to be backported. * Dependencies will not be kept up-to-date, and features will not be backported. -### Legacy tags available +#### Legacy tags available * `legacy-8`: install client libraries from this dist-tag for versions compatible with Node.js 8. @@ -147,12 +156,17 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). + This library is considered to be **General Availability (GA)**. This means it is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against **GA** libraries are addressed with the highest priority. + + + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 4522b866c1b..df7c5747289 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "55bdb1ddfae9530c299ef70d837595fe78ab9a3d" + "sha": "dcf94e01d188979f85772774221eed2e83cec3a3" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" + "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" } } ], From 59abcccf607e908fc828d98c85aa286ceb8d3145 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 15:58:07 -0800 Subject: [PATCH 0679/1029] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#925) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/325cd597-d8fe-40d6-aad1-01bd299fa976/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- handwritten/logging/.kokoro/trampoline_v2.sh | 2 ++ handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.kokoro/trampoline_v2.sh b/handwritten/logging/.kokoro/trampoline_v2.sh index 5ae75f977d7..606d4321458 100755 --- a/handwritten/logging/.kokoro/trampoline_v2.sh +++ b/handwritten/logging/.kokoro/trampoline_v2.sh @@ -125,6 +125,8 @@ pass_down_envvars=( "TRAMPOLINE_CI" # Indicates the version of the script. "TRAMPOLINE_VERSION" + # Contains path to build artifacts being executed. + "KOKORO_BUILD_ARTIFACTS_SUBDIR" ) log_yellow "Building with Trampoline ${TRAMPOLINE_VERSION}" diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index df7c5747289..dfa380c3c71 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "dcf94e01d188979f85772774221eed2e83cec3a3" + "sha": "fd8110f1a05ca097fa34986e9ed951cfbda5fb2c" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From f76b9a3a6a3e854e3d5fc4cd5f529ddf04ae1768 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2020 09:48:19 -0800 Subject: [PATCH 0680/1029] chore: release 8.0.9 (#913) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 952c0af38ba..43a411e606c 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.9](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.8...v8.0.9) (2020-11-03) + + +### Bug Fixes + +* **deps:** update dependency dot-prop to v6 ([#908](https://www.github.com/googleapis/nodejs-logging/issues/908)) ([e696466](https://www.github.com/googleapis/nodejs-logging/commit/e6964662276239b86ccdfcd3e448df65d2013522)) +* **deps:** update dependency type-fest to ^0.18.0 ([#912](https://www.github.com/googleapis/nodejs-logging/issues/912)) ([dafdf8e](https://www.github.com/googleapis/nodejs-logging/commit/dafdf8eedc213c25f23ba5cc5cfa8eea4b2e9727)) + ### [8.0.8](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.7...v8.0.8) (2020-10-06) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3cafcbe14e3..1ee78adf815 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.8", + "version": "8.0.9", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 28eb0a1983d3334d069d8206273ddf159a166efb Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 3 Nov 2020 14:43:23 -0800 Subject: [PATCH 0681/1029] chore: add generated files bot to repo (#928) * chore: add generated files bot to repo * chore: add template source location to bot config Co-authored-by: Benjamin E. Coe --- handwritten/logging/.github/generated-files-bot.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 handwritten/logging/.github/generated-files-bot.yml diff --git a/handwritten/logging/.github/generated-files-bot.yml b/handwritten/logging/.github/generated-files-bot.yml new file mode 100644 index 00000000000..8bb592438b0 --- /dev/null +++ b/handwritten/logging/.github/generated-files-bot.yml @@ -0,0 +1,5 @@ +# Source template: https://github.com/googleapis/synthtool/blob/master/synthtool/gcp/templates/node_library/CONTRIBUTING.md +externalManifests: +- type: json + file: 'synth.metadata' + jsonpath: '$.generatedFiles[*]' From 27b485cdb532a43b3f096e7314fe04c4ba372ec4 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 4 Nov 2020 12:43:30 -0800 Subject: [PATCH 0682/1029] test: make system tests fail accurately locally --- handwritten/logging/system-test/logging.ts | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 027f57e43b8..bb7765603de 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -34,13 +34,12 @@ nock(HOST_ADDRESS) .replyWithError({code: 'ENOTFOUND'}) .persist(); -describe('Logging', async () => { +describe('Logging', () => { const bigQuery = new BigQuery(); const pubsub = new PubSub(); const storage = new Storage(); const logging = new Logging(); - const PROJECT_ID = await logging.auth.getProjectId(); const TESTS_PREFIX = 'nodejs-logging-system-test'; const WRITE_CONSISTENCY_DELAY_MS = 5000; @@ -49,19 +48,22 @@ describe('Logging', async () => { const dataset = bigQuery.dataset(generateName().replace(/-/g, '_')); const topic = pubsub.topic(generateName()); - const serviceAccount = (await logging.auth.getCredentials()).client_email; - - await bucket.create(); - await bucket.iam.setPolicy({ - bindings: [ - { - role: 'roles/storage.admin', - members: [`serviceAccount:${serviceAccount}`], - }, - ], + let PROJECT_ID: string; + before(async () => { + const serviceAccount = (await logging.auth.getCredentials()).client_email; + PROJECT_ID = await logging.auth.getProjectId(); + await bucket.create(); + await bucket.iam.setPolicy({ + bindings: [ + { + role: 'roles/storage.admin', + members: [`serviceAccount:${serviceAccount}`], + }, + ], + }); + await dataset.create(); + await topic.create(); }); - await dataset.create(); - await topic.create(); after(async () => { const oneHourAgo = new Date(); @@ -598,7 +600,6 @@ describe('Logging', async () => { getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { assert.ifError(err); - const entry = entries![0]; assert.strictEqual(entry.data, text); From bc873de327f6d5d3699e9106b45baf001de20fa8 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Thu, 5 Nov 2020 09:46:16 -0800 Subject: [PATCH 0683/1029] test: deflake and speed up system and sample tests (#931) * test: deflake and speed up * test: removed DeleteLog call from samples test --- handwritten/logging/system-test/logging.ts | 89 +++++----------------- 1 file changed, 17 insertions(+), 72 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index bb7765603de..6dd5d9d1484 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -74,7 +74,6 @@ describe('Logging', () => { deleteDatasets(), deleteTopics(), deleteSinks(), - deleteLogs(), ]); async function deleteBuckets() { @@ -101,66 +100,6 @@ describe('Logging', () => { await getAndDelete(logging.getSinks.bind(logging)); } - async function deleteLogs() { - const maxPatienceMs = 300000; // 5 minutes. - let logs; - - try { - [logs] = await logging.getLogs({ - pageSize: 10000, - }); - } catch (e) { - console.warn('Error retrieving logs:'); - console.warn(` ${e.message}`); - console.warn('No test logs were deleted'); - return; - } - - const logsToDelete = logs.filter(log => { - return ( - log.name.startsWith(TESTS_PREFIX) && - getDateFromGeneratedName(log.name) < oneHourAgo - ); - }); - - if (logsToDelete.length > 0) { - console.log('Deleting', logsToDelete.length, 'test logs...'); - } - - let numLogsDeleted = 0; - for (const log of logsToDelete) { - try { - await log.delete(); - numLogsDeleted++; - - // A one second gap is preferred between delete calls to avoid rate - // limiting. - let timeoutMs = 1000; - if (numLogsDeleted * 1000 > maxPatienceMs) { - // This is taking too long. If we hit the rate limit, we'll - // hopefully scoop up the stragglers on a future test run. - timeoutMs = 10; - } - await new Promise(res => setTimeout(res, timeoutMs)); - } catch (e) { - if (e.code === 8) { - console.warn( - 'Rate limit reached. The next test run will attempt to delete the rest' - ); - break; - } - if (e.code !== 5) { - // Log exists, but couldn't be deleted. - console.warn(`Deleting ${log.name} failed:`, e.message); - } - } - } - - if (logsToDelete.length > 0) { - console.log(`${numLogsDeleted}/${logsToDelete.length} logs deleted`); - } - } - async function getAndDelete(method: Function) { const [objects] = await method(); return Promise.all( @@ -318,19 +257,25 @@ describe('Logging', () => { function pollForMessages() { numAttempts++; - log.getEntries({autoPaginate: false}, (err, entries) => { - if (err) { - callback(err); - return; - } + const time = new Date(); + time.setHours(time.getHours() - 1); - if (entries!.length < numExpectedMessages && numAttempts < 8) { - setTimeout(pollForMessages, WRITE_CONSISTENCY_DELAY_MS); - return; - } + log.getEntries( + {autoPaginate: false, filter: `timestamp > "${time.toISOString()}"`}, + (err, entries) => { + if (err) { + callback(err); + return; + } - callback(null, entries); - }); + if (entries!.length < numExpectedMessages && numAttempts < 8) { + setTimeout(pollForMessages, WRITE_CONSISTENCY_DELAY_MS); + return; + } + + callback(null, entries); + } + ); } } From 632f0633f6609d73c775e5a853e70146747eb6e6 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Thu, 5 Nov 2020 20:02:53 -0800 Subject: [PATCH 0684/1029] chore: add blunderbuss (#932) --- handwritten/logging/.github/blunderbuss.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 handwritten/logging/.github/blunderbuss.yml diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml new file mode 100644 index 00000000000..45e412794bd --- /dev/null +++ b/handwritten/logging/.github/blunderbuss.yml @@ -0,0 +1,4 @@ +assign_issues: + - googleapis/api-logging +assign_prs: + - googleapis/api-logging From 148bd7ff09b8c9af29702256fbae2829307f3b1b Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 15:42:08 -0800 Subject: [PATCH 0685/1029] fix: do not modify options object, use defaultScopes (#935) Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1. --- handwritten/logging/package.json | 2 +- .../src/v2/config_service_v2_client.ts | 313 ++++++++++-------- .../src/v2/logging_service_v2_client.ts | 253 +++++++------- .../src/v2/metrics_service_v2_client.ts | 151 +++++---- handwritten/logging/synth.metadata | 16 +- handwritten/logging/system-test/install.ts | 18 +- 6 files changed, 416 insertions(+), 337 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1ee78adf815..c2f16e7e919 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^6.0.0", - "google-gax": "^2.7.0", + "google-gax": "^2.9.2", "is": "^3.3.0", "on-finished": "^2.3.0", "pumpify": "^2.0.1", diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 49b65e4f12d..d6a62da46d6 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -60,8 +60,10 @@ export class ConfigServiceV2Client { /** * Construct an instance of ConfigServiceV2Client. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] @@ -81,42 +83,33 @@ export class ConfigServiceV2Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} fallback - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. */ - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof ConfigServiceV2Client; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; - - if (!opts) { - opts = {servicePath, port}; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the ConfigServiceV2Client constructor. + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. this._gaxModule = opts.fallback ? gax.fallback : gax; - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof ConfigServiceV2Client).scopes; + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); // Save options to use in initialize() method. @@ -125,6 +118,11 @@ export class ConfigServiceV2Client { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { @@ -343,6 +341,7 @@ export class ConfigServiceV2Client { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'logging.googleapis.com'; @@ -351,6 +350,7 @@ export class ConfigServiceV2Client { /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. + * @returns {string} The DNS address for this service. */ static get apiEndpoint() { return 'logging.googleapis.com'; @@ -358,6 +358,7 @@ export class ConfigServiceV2Client { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -366,6 +367,7 @@ export class ConfigServiceV2Client { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -380,8 +382,7 @@ export class ConfigServiceV2Client { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -442,7 +443,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getBucket(request); */ getBucket( request: protos.google.logging.v2.IGetBucketRequest, @@ -553,7 +558,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateBucket(request); */ updateBucket( request: protos.google.logging.v2.IUpdateBucketRequest, @@ -640,7 +649,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getSink(request); */ getSink( request: protos.google.logging.v2.IGetSinkRequest, @@ -745,7 +758,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createSink(request); */ createSink( request: protos.google.logging.v2.ICreateSinkRequest, @@ -867,7 +884,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateSink(request); */ updateSink( request: protos.google.logging.v2.IUpdateSinkRequest, @@ -956,7 +977,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteSink(request); */ deleteSink( request: protos.google.logging.v2.IDeleteSinkRequest, @@ -1043,7 +1068,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getExclusion(request); */ getExclusion( request: protos.google.logging.v2.IGetExclusionRequest, @@ -1135,7 +1164,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createExclusion(request); */ createExclusion( request: protos.google.logging.v2.ICreateExclusionRequest, @@ -1233,7 +1266,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateExclusion(request); */ updateExclusion( request: protos.google.logging.v2.IUpdateExclusionRequest, @@ -1320,7 +1357,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteExclusion(request); */ deleteExclusion( request: protos.google.logging.v2.IDeleteExclusionRequest, @@ -1419,7 +1460,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getCmekSettings(request); */ getCmekSettings( request: protos.google.logging.v2.IGetCmekSettingsRequest, @@ -1538,7 +1583,11 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateCmekSettings(request); */ updateCmekSettings( request: protos.google.logging.v2.IUpdateCmekSettingsRequest, @@ -1639,19 +1688,14 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogBucket]{@link google.logging.v2.LogBucket}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogBucket]{@link google.logging.v2.LogBucket} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListBucketsRequest]{@link google.logging.v2.ListBucketsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListBucketsResponse]{@link google.logging.v2.ListBucketsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listBucketsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listBuckets( request: protos.google.logging.v2.IListBucketsRequest, @@ -1695,18 +1739,7 @@ export class ConfigServiceV2Client { } /** - * Equivalent to {@link listBuckets}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listBuckets} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1733,6 +1766,13 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBucketsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listBucketsStream( request?: protos.google.logging.v2.IListBucketsRequest, @@ -1757,10 +1797,9 @@ export class ConfigServiceV2Client { } /** - * Equivalent to {@link listBuckets}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listBuckets`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1786,7 +1825,18 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [LogBucket]{@link google.logging.v2.LogBucket}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listBucketsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listBucketsAsync( request?: protos.google.logging.v2.IListBucketsRequest, @@ -1862,19 +1912,14 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogSink]{@link google.logging.v2.LogSink}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogSink]{@link google.logging.v2.LogSink} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListSinksRequest]{@link google.logging.v2.ListSinksRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListSinksResponse]{@link google.logging.v2.ListSinksResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listSinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listSinks( request: protos.google.logging.v2.IListSinksRequest, @@ -1918,18 +1963,7 @@ export class ConfigServiceV2Client { } /** - * Equivalent to {@link listSinks}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listSinks} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1952,6 +1986,13 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listSinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listSinksStream( request?: protos.google.logging.v2.IListSinksRequest, @@ -1976,10 +2017,9 @@ export class ConfigServiceV2Client { } /** - * Equivalent to {@link listSinks}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listSinks`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -2001,7 +2041,18 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [LogSink]{@link google.logging.v2.LogSink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listSinksAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listSinksAsync( request?: protos.google.logging.v2.IListSinksRequest, @@ -2077,19 +2128,14 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogExclusion]{@link google.logging.v2.LogExclusion} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListExclusionsRequest]{@link google.logging.v2.ListExclusionsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListExclusionsResponse]{@link google.logging.v2.ListExclusionsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listExclusionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listExclusions( request: protos.google.logging.v2.IListExclusionsRequest, @@ -2133,18 +2179,7 @@ export class ConfigServiceV2Client { } /** - * Equivalent to {@link listExclusions}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listExclusions} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -2167,6 +2202,13 @@ export class ConfigServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listExclusionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listExclusionsStream( request?: protos.google.logging.v2.IListExclusionsRequest, @@ -2191,10 +2233,9 @@ export class ConfigServiceV2Client { } /** - * Equivalent to {@link listExclusions}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listExclusions`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -2216,7 +2257,18 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [LogExclusion]{@link google.logging.v2.LogExclusion}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listExclusionsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listExclusionsAsync( request?: protos.google.logging.v2.IListExclusionsRequest, @@ -3165,9 +3217,10 @@ export class ConfigServiceV2Client { } /** - * Terminate the GRPC channel and close the client. + * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { this.initialize(); diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index e25a51426cb..bdfc2b8f129 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -60,8 +60,10 @@ export class LoggingServiceV2Client { /** * Construct an instance of LoggingServiceV2Client. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] @@ -81,42 +83,33 @@ export class LoggingServiceV2Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} fallback - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. */ - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LoggingServiceV2Client; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; - - if (!opts) { - opts = {servicePath, port}; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the LoggingServiceV2Client constructor. + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. this._gaxModule = opts.fallback ? gax.fallback : gax; - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof LoggingServiceV2Client).scopes; + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); // Save options to use in initialize() method. @@ -125,6 +118,11 @@ export class LoggingServiceV2Client { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { @@ -358,6 +356,7 @@ export class LoggingServiceV2Client { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'logging.googleapis.com'; @@ -366,6 +365,7 @@ export class LoggingServiceV2Client { /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. + * @returns {string} The DNS address for this service. */ static get apiEndpoint() { return 'logging.googleapis.com'; @@ -373,6 +373,7 @@ export class LoggingServiceV2Client { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -381,6 +382,7 @@ export class LoggingServiceV2Client { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -396,8 +398,7 @@ export class LoggingServiceV2Client { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -464,7 +465,11 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteLog(request); */ deleteLog( request: protos.google.logging.v2.IDeleteLogRequest, @@ -615,7 +620,11 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.writeLogEntries(request); */ writeLogEntries( request: protos.google.logging.v2.IWriteLogEntriesRequest, @@ -726,19 +735,14 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogEntry]{@link google.logging.v2.LogEntry}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogEntry]{@link google.logging.v2.LogEntry} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListLogEntriesRequest]{@link google.logging.v2.ListLogEntriesRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListLogEntriesResponse]{@link google.logging.v2.ListLogEntriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listLogEntriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listLogEntries( request: protos.google.logging.v2.IListLogEntriesRequest, @@ -775,18 +779,7 @@ export class LoggingServiceV2Client { } /** - * Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogEntries} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string[]} request.resourceNames @@ -829,6 +822,13 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLogEntriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listLogEntriesStream( request?: protos.google.logging.v2.IListLogEntriesRequest, @@ -846,10 +846,9 @@ export class LoggingServiceV2Client { } /** - * Equivalent to {@link listLogEntries}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listLogEntries`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string[]} request.resourceNames @@ -891,7 +890,18 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [LogEntry]{@link google.logging.v2.LogEntry}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listLogEntriesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listLogEntriesAsync( request?: protos.google.logging.v2.IListLogEntriesRequest, @@ -957,19 +967,14 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListMonitoredResourceDescriptorsRequest]{@link google.logging.v2.ListMonitoredResourceDescriptorsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListMonitoredResourceDescriptorsResponse]{@link google.logging.v2.ListMonitoredResourceDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listMonitoredResourceDescriptorsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listMonitoredResourceDescriptors( request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, @@ -1014,18 +1019,7 @@ export class LoggingServiceV2Client { } /** - * Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {number} [request.pageSize] @@ -1041,6 +1035,13 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMonitoredResourceDescriptorsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listMonitoredResourceDescriptorsStream( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, @@ -1058,10 +1059,9 @@ export class LoggingServiceV2Client { } /** - * Equivalent to {@link listMonitoredResourceDescriptors}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listMonitoredResourceDescriptors`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {number} [request.pageSize] @@ -1076,7 +1076,18 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listMonitoredResourceDescriptorsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listMonitoredResourceDescriptorsAsync( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, @@ -1146,19 +1157,14 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of string. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of string that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListLogsRequest]{@link google.logging.v2.ListLogsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListLogsResponse]{@link google.logging.v2.ListLogsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listLogsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listLogs( request: protos.google.logging.v2.IListLogsRequest, @@ -1202,18 +1208,7 @@ export class LoggingServiceV2Client { } /** - * Equivalent to {@link listLogs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogs} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1236,6 +1231,13 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing string on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLogsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listLogsStream( request?: protos.google.logging.v2.IListLogsRequest, @@ -1260,10 +1262,9 @@ export class LoggingServiceV2Client { } /** - * Equivalent to {@link listLogs}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listLogs`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1285,7 +1286,18 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * string. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listLogsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listLogsAsync( request?: protos.google.logging.v2.IListLogsRequest, @@ -2198,9 +2210,10 @@ export class LoggingServiceV2Client { } /** - * Terminate the GRPC channel and close the client. + * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { this.initialize(); diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index bf83179427c..791fe9c484e 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -60,8 +60,10 @@ export class MetricsServiceV2Client { /** * Construct an instance of MetricsServiceV2Client. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] @@ -81,42 +83,33 @@ export class MetricsServiceV2Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} fallback - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. */ - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof MetricsServiceV2Client; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; - - if (!opts) { - opts = {servicePath, port}; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the MetricsServiceV2Client constructor. + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. this._gaxModule = opts.fallback ? gax.fallback : gax; - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof MetricsServiceV2Client).scopes; + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); // Save options to use in initialize() method. @@ -125,6 +118,11 @@ export class MetricsServiceV2Client { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { @@ -320,6 +318,7 @@ export class MetricsServiceV2Client { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'logging.googleapis.com'; @@ -328,6 +327,7 @@ export class MetricsServiceV2Client { /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. + * @returns {string} The DNS address for this service. */ static get apiEndpoint() { return 'logging.googleapis.com'; @@ -335,6 +335,7 @@ export class MetricsServiceV2Client { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -343,6 +344,7 @@ export class MetricsServiceV2Client { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -358,8 +360,7 @@ export class MetricsServiceV2Client { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -414,7 +415,11 @@ export class MetricsServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getLogMetric(request); */ getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, @@ -501,7 +506,11 @@ export class MetricsServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createLogMetric(request); */ createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, @@ -589,7 +598,11 @@ export class MetricsServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateLogMetric(request); */ updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, @@ -671,7 +684,11 @@ export class MetricsServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteLogMetric(request); */ deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, @@ -763,19 +780,14 @@ export class MetricsServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [LogMetric]{@link google.logging.v2.LogMetric} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListLogMetricsRequest]{@link google.logging.v2.ListLogMetricsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listLogMetricsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, @@ -819,18 +831,7 @@ export class MetricsServiceV2Client { } /** - * Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listLogMetrics} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -850,6 +851,13 @@ export class MetricsServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLogMetricsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listLogMetricsStream( request?: protos.google.logging.v2.IListLogMetricsRequest, @@ -874,10 +882,9 @@ export class MetricsServiceV2Client { } /** - * Equivalent to {@link listLogMetrics}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listLogMetrics`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -896,7 +903,18 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [LogMetric]{@link google.logging.v2.LogMetric}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listLogMetricsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listLogMetricsAsync( request?: protos.google.logging.v2.IListLogMetricsRequest, @@ -1809,9 +1827,10 @@ export class MetricsServiceV2Client { } /** - * Terminate the GRPC channel and close the client. + * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { this.initialize(); diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index dfa380c3c71..f6efa4a9b4c 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "fd8110f1a05ca097fa34986e9ed951cfbda5fb2c" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a54e988edcbdef1e47c6ac19d3074a87214f667", - "internalRef": "326582222" + "remote": "git@github.com:googleapis/nodejs-logging.git", + "sha": "e594c9bbd4966ede5ba0872ea715b11c1f3ca967" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ba9918cd22874245b55734f57470c719b577e591" + "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" } } ], @@ -87,6 +79,7 @@ "README.md", "api-extractor.json", "linkinator.config.json", + "package-lock.json.1634671361", "protos/google/logging/v2/log_entry.proto", "protos/google/logging/v2/logging.proto", "protos/google/logging/v2/logging_config.proto", @@ -96,6 +89,7 @@ "protos/protos.json", "renovate.json", "samples/README.md", + "samples/package-lock.json.2353518511", "src/v2/config_service_v2_client.ts", "src/v2/config_service_v2_client_config.json", "src/v2/config_service_v2_proto_list.json", diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index 4c1ba3eb79a..39d90f771de 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -20,32 +20,32 @@ import {packNTest} from 'pack-n-play'; import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; -describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function () { +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'TypeScript user can use the type definitions', ts: readFileSync( './system-test/fixtures/sample/src/index.ts' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); - it('should have correct type signature for javascript users', async function () { + it('JavaScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'JavaScript user can use the library', ts: readFileSync( './system-test/fixtures/sample/src/index.js' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); }); From fda1cbce3ce1e7eeffac90fd4910d755fa938dfa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2020 16:01:25 -0800 Subject: [PATCH 0686/1029] chore: release 8.0.10 (#936) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 43a411e606c..af363bc958e 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.0.10](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.9...v8.0.10) (2020-11-06) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#935](https://www.github.com/googleapis/nodejs-logging/issues/935)) ([fd1e63a](https://www.github.com/googleapis/nodejs-logging/commit/fd1e63a56f19b5af48fbba40d136a4ce640ca2f3)) + ### [8.0.9](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.8...v8.0.9) (2020-11-03) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c2f16e7e919..24d4a1c14d7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.9", + "version": "8.0.10", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 74ff21a9aa8a8da67b40bb955d70f1c0de848d55 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 9 Nov 2020 09:10:51 -0800 Subject: [PATCH 0687/1029] feat: accept entry.timestamp string input in RFC3339 format (#937) * feat: accept entry.timestamp string input in RFC3339 format * style: use Number instead of parseInt --- handwritten/logging/src/entry.ts | 14 +++++++++++- handwritten/logging/test/entry.ts | 36 ++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index ccbaf06d8bb..c993e291c37 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -24,7 +24,7 @@ import {objToStruct, structToObj} from './common'; const eventId = new EventId(); -export type Timestamp = google.protobuf.ITimestamp | Date; +export type Timestamp = google.protobuf.ITimestamp | Date | string; export type LogSeverity = google.logging.type.LogSeverity | string; export type LogEntry = Merge< google.logging.v2.ILogEntry, @@ -152,6 +152,7 @@ class Entry { */ toJSON(options: ToJsonOptions = {}) { const entry = (extend(true, {}, this.metadata) as {}) as EntryJson; + // Format log message if (is.object(this.data)) { entry.jsonPayload = objToStruct(this.data, { removeCircular: !!options.removeCircular, @@ -160,6 +161,7 @@ class Entry { } else if (is.string(this.data)) { entry.textPayload = this.data; } + // Format log timestamp if (is.date(entry.timestamp)) { const seconds = (entry.timestamp as Date).getTime() / 1000; const secondsRounded = Math.floor(seconds); @@ -167,6 +169,16 @@ class Entry { seconds: secondsRounded, nanos: Math.floor((seconds - secondsRounded) * 1e9), }; + } else if (is.string(entry.timestamp)) { + // Convert RFC3339 "Zulu" timestamp into a format that can be parsed to Date + const zuluTime = entry.timestamp as string; + const ms = Date.parse(zuluTime.split(/[.,Z]/)[0] + 'Z'); + const reNano = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.(\d{0,9})Z$/; + const nanoSecs = zuluTime.match(reNano)?.[1]; + entry.timestamp = { + seconds: ms ? Math.floor(ms / 1000) : 0, + nanos: nanoSecs ? Number(nanoSecs.padEnd(9, '0')) : 0, + }; } return entry; } diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index e98884956b7..1d7ebcb9c67 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -212,7 +212,7 @@ describe('Entry', () => { assert.strictEqual(json.textPayload, entry.data); }); - it('should convert a date', () => { + it('should convert a date timestamp', () => { const date = new Date(); entry.metadata.timestamp = date as entryTypes.Timestamp; const json = entry.toJSON(); @@ -223,5 +223,39 @@ describe('Entry', () => { nanos: Math.floor((seconds - secondsRounded) * 1e9), }); }); + + it('should convert a string timestamp', () => { + const tests = [ + { + inputTime: '2020-01-01T00:00:00.11Z', + expectedSeconds: 1577836800, + expectedNanos: 110000000, + }, + { + inputTime: '2020-01-01T00:00:00Z', + expectedSeconds: 1577836800, + expectedNanos: 0, + }, + { + inputTime: '2020-01-01T00:00:00.999999999Z', + expectedSeconds: 1577836800, + expectedNanos: 999999999, + }, + { + inputTime: 'invalid timestamp string', + expectedSeconds: 0, + expectedNanos: 0, + }, + ]; + + for (const test of tests) { + entry.metadata.timestamp = test.inputTime; + const json = entry.toJSON(); + assert.deepStrictEqual(json.timestamp, { + seconds: test.expectedSeconds, + nanos: test.expectedNanos, + }); + } + }); }); }); From 24409459f9842519b66ca3c50af275d6e59e8963 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 10:40:08 -0800 Subject: [PATCH 0688/1029] chore: release 8.1.0 (#941) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 12 ++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index af363bc958e..a01b816e225 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [8.1.0](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.10...v8.1.0) (2020-11-09) + + +### Features + +* accept entry.timestamp string input in RFC3339 format ([#937](https://www.github.com/googleapis/nodejs-logging/issues/937)) ([869bbaf](https://www.github.com/googleapis/nodejs-logging/commit/869bbafe3790d6d6f21a1f538549a1f336d6f918)) + + +### Bug Fixes + +* **deps:** roll back dependency @google-cloud/logging to ^8.0.9 ([#940](https://www.github.com/googleapis/nodejs-logging/issues/940)) ([2a3ad40](https://www.github.com/googleapis/nodejs-logging/commit/2a3ad405683421f5d2099da1b658fe111dc336d2)) + ### [8.0.10](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.9...v8.0.10) (2020-11-06) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 24d4a1c14d7..eb6b9d92339 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.0.10", + "version": "8.1.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 0291bd9df89e11b0cdadc66f9abdb17720050ecc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 Nov 2020 16:54:38 +0100 Subject: [PATCH 0689/1029] fix(deps): update dependency type-fest to ^0.19.0 (#945) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index eb6b9d92339..d5a06c7b500 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -64,7 +64,7 @@ "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", "through2": "^4.0.0", - "type-fest": "^0.18.0" + "type-fest": "^0.19.0" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", From 1f2a11734a5c968fcda208430867aa587fd5ba44 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2020 08:38:27 -0800 Subject: [PATCH 0690/1029] chore: release 8.1.1 (#946) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index a01b816e225..9cd532edad4 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [8.1.1](https://www.github.com/googleapis/nodejs-logging/compare/v8.1.0...v8.1.1) (2020-11-16) + + +### Bug Fixes + +* **deps:** update dependency type-fest to ^0.19.0 ([#945](https://www.github.com/googleapis/nodejs-logging/issues/945)) ([bd5f001](https://www.github.com/googleapis/nodejs-logging/commit/bd5f00173b92a56e2524c8222f74db1216924ec3)) + ## [8.1.0](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.10...v8.1.0) (2020-11-09) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d5a06c7b500..3eeba8d4bc4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.1.0", + "version": "8.1.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From e4e4cac0d4d52e2135bc29806c93aba3395ade83 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 16 Nov 2020 14:32:51 -0800 Subject: [PATCH 0691/1029] build: compile protos before run compile; fixes synthtool failure (#948) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3eeba8d4bc4..41c372d6eac 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -35,7 +35,7 @@ "fix": "gts fix", "prelint": "cd samples; npm link ../; npm install", "lint": "gts check", - "prepare": "npm run compile", + "prepare": "npm run compile-protos && npm run compile", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "presystem-test": "npm run compile", "system-test": "mocha build/system-test --timeout 600000", From 896a89b546233c4ef83783c4a0ed10535a694edb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 20 Nov 2020 09:56:27 -0800 Subject: [PATCH 0692/1029] feat: Makes remaining LogBucket and LogViews methods public feat: Makes remaining LogBucket and LogViews methods public --- .../google/logging/v2/logging_config.proto | 435 +- .../google/logging/v2/logging_metrics.proto | 4 +- handwritten/logging/protos/protos.d.ts | 1172 +++++- handwritten/logging/protos/protos.js | 3547 ++++++++++++++--- handwritten/logging/protos/protos.json | 1037 ++++- .../src/v2/config_service_v2_client.ts | 1613 +++++++- .../v2/config_service_v2_client_config.json | 32 + .../src/v2/logging_service_v2_client.ts | 426 +- .../src/v2/metrics_service_v2_client.ts | 418 +- handwritten/logging/synth.metadata | 14 +- .../test/gapic_config_service_v2_v2.ts | 2232 +++++++++-- .../test/gapic_logging_service_v2_v2.ts | 356 ++ .../test/gapic_metrics_service_v2_v2.ts | 356 ++ 13 files changed, 10405 insertions(+), 1237 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 9486f4a9a4f..9b10932d637 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -55,7 +55,7 @@ service ConfigServiceV2 { "https://www.googleapis.com/auth/logging.admin," "https://www.googleapis.com/auth/logging.read"; - // Lists buckets (Beta). + // Lists buckets. rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*/locations/*}/buckets" @@ -75,7 +75,7 @@ service ConfigServiceV2 { option (google.api.method_signature) = "parent"; } - // Gets a bucket (Beta). + // Gets a bucket. rpc GetBucket(GetBucketRequest) returns (LogBucket) { option (google.api.http) = { get: "/v2/{name=*/*/locations/*/buckets/*}" @@ -94,6 +94,31 @@ service ConfigServiceV2 { }; } + // Creates a bucket that can be used to store log entries. Once a bucket has + // been created, the region cannot be changed. + rpc CreateBucket(CreateBucketRequest) returns (LogBucket) { + option (google.api.http) = { + post: "/v2/{parent=*/*/locations/*}/buckets" + body: "bucket" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/buckets" + body: "bucket" + } + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/buckets" + body: "bucket" + } + additional_bindings { + post: "/v2/{parent=folders/*/locations/*}/buckets" + body: "bucket" + } + additional_bindings { + post: "/v2/{parent=billingAccounts/*/locations/*}/buckets" + body: "bucket" + } + }; + } + // Updates a bucket. This method replaces the following fields in the // existing bucket with values from the new bucket: `retention_period` // @@ -104,7 +129,6 @@ service ConfigServiceV2 { // will be returned. // // A buckets region may not be modified after it is created. - // This method is in Beta. rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) { option (google.api.http) = { patch: "/v2/{name=*/*/locations/*/buckets/*}" @@ -128,6 +152,161 @@ service ConfigServiceV2 { }; } + // Deletes a bucket. + // Moves the bucket to the DELETE_REQUESTED state. After 7 days, the + // bucket will be purged and all logs in the bucket will be permanently + // deleted. + rpc DeleteBucket(DeleteBucketRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=*/*/locations/*/buckets/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/buckets/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/buckets/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/locations/*/buckets/*}" + } + additional_bindings { + delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + } + }; + } + + // Undeletes a bucket. A bucket that has been deleted may be undeleted within + // the grace period of 7 days. + rpc UndeleteBucket(UndeleteBucketRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=*/*/locations/*/buckets/*}:undelete" + body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/buckets/*}:undelete" + body: "*" + } + additional_bindings { + post: "/v2/{name=organizations/*/locations/*/buckets/*}:undelete" + body: "*" + } + additional_bindings { + post: "/v2/{name=folders/*/locations/*/buckets/*}:undelete" + body: "*" + } + additional_bindings { + post: "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete" + body: "*" + } + }; + } + + // Lists views on a bucket. + rpc ListViews(ListViewsRequest) returns (ListViewsResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*/locations/*/buckets/*}/views" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*/buckets/*}/views" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*/buckets/*}/views" + } + additional_bindings { + get: "/v2/{parent=folders/*/locations/*/buckets/*}/views" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a view. + rpc GetView(GetViewRequest) returns (LogView) { + option (google.api.http) = { + get: "/v2/{name=*/*/locations/*/buckets/*/views/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/buckets/*/views/*}" + } + }; + } + + // Creates a view over logs in a bucket. A bucket may contain a maximum of + // 50 views. + rpc CreateView(CreateViewRequest) returns (LogView) { + option (google.api.http) = { + post: "/v2/{parent=*/*/locations/*/buckets/*}/views" + body: "view" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*/buckets/*}/views" + body: "view" + } + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*/buckets/*}/views" + body: "view" + } + additional_bindings { + post: "/v2/{parent=folders/*/locations/*/buckets/*}/views" + body: "view" + } + additional_bindings { + post: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" + body: "view" + } + }; + } + + // Updates a view. This method replaces the following fields in the existing + // view with values from the new view: `filter`. + rpc UpdateView(UpdateViewRequest) returns (LogView) { + option (google.api.http) = { + patch: "/v2/{name=*/*/locations/*/buckets/*/views/*}" + body: "view" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + body: "view" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + body: "view" + } + additional_bindings { + patch: "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + body: "view" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + body: "view" + } + }; + } + + // Deletes a view from a bucket. + rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=*/*/locations/*/buckets/*/views/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + } + additional_bindings { + delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + } + }; + } + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { @@ -420,7 +599,7 @@ service ConfigServiceV2 { } } -// Describes a repository of logs (Beta). +// Describes a repository of logs. message LogBucket { option (google.api.resource) = { type: "logging.googleapis.com/LogBucket" @@ -435,7 +614,6 @@ message LogBucket { // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The // supported locations are: // "global" - // "us-central1" // // For the location of `global` it is unspecified where logs are actually // stored. @@ -458,10 +636,63 @@ message LogBucket { // 30 days will be used. int32 retention_days = 11; + // Whether the bucket has been locked. + // The retention period on a locked bucket may not be changed. + // Locked buckets may only be deleted if they are empty. + bool locked = 9; + // Output only. The bucket lifecycle state. LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// LogBucket lifecycle states. +enum LifecycleState { + // Unspecified state. This is only used/useful for distinguishing + // unset values. + LIFECYCLE_STATE_UNSPECIFIED = 0; + + // The normal and active state. + ACTIVE = 1; + + // The bucket has been marked for deletion by the user. + DELETE_REQUESTED = 2; +} + +// Describes a view over logs in a bucket. +message LogView { + option (google.api.resource) = { + type: "logging.googleapis.com/LogView" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}/views/{view}" + pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}" + pattern: "folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}" + pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}" + }; + + // The resource name of the view. + // For example + // "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view + string name = 1; + + // Describes this view. + string description = 3; + + // Output only. The creation timestamp of the view. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the view. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Filter that restricts which log entries in a bucket are visible in this + // view. Filters are restricted to be a logical AND of ==/!= of any of the + // following: + // originating project/folder/organization/billing account. + // resource type + // log id + // Example: SOURCE("projects/myproject") AND resource.type = "gce_instance" + // AND LOG_ID("stdout") + string filter = 7; +} + // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a // Cloud Pub/Sub topic. A logs filter controls which log entries are exported. @@ -529,10 +760,15 @@ message LogSink { // export any log entries. bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Log entries that match any of the exclusion filters will not be exported. + // If a log entry is matched by both `filter` and one of `exclusion_filters` + // it will not be exported. + repeated LogExclusion exclusions = 16 [(google.api.field_behavior) = OPTIONAL]; + // Deprecated. This field is unused. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity–a service account or group—under which Logging + // Output only. An IAM identity—a service account or group—under which Logging // writes the exported log entries to the sink's destination. This field is // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the @@ -599,20 +835,7 @@ message BigQueryOptions { bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// LogBucket lifecycle states (Beta). -enum LifecycleState { - // Unspecified state. This is only used/useful for distinguishing - // unset values. - LIFECYCLE_STATE_UNSPECIFIED = 0; - - // The normal and active state. - ACTIVE = 1; - - // The bucket has been marked for deletion by the user. - DELETE_REQUESTED = 2; -} - -// The parameters to `ListBuckets` (Beta). +// The parameters to `ListBuckets`. message ListBucketsRequest { // Required. The parent resource whose buckets are to be listed: // @@ -643,7 +866,7 @@ message ListBucketsRequest { int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } -// The response from ListBuckets (Beta). +// The response from ListBuckets. message ListBucketsResponse { // A list of buckets. repeated LogBucket buckets = 1; @@ -654,7 +877,32 @@ message ListBucketsResponse { string next_page_token = 2; } -// The parameters to `UpdateBucket` (Beta). +// The parameters to `CreateBucket`. +message CreateBucketRequest { + // Required. The resource in which to create the bucket: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + // + // Example: `"projects/my-logging-project/locations/global"` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogBucket" + } + ]; + + // Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are + // limited to 100 characters and can include only letters, digits, + // underscores, hyphens, and periods. + string bucket_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new bucket. The region specified in the new bucket must be compliant + // with any Location Restriction Org Policy. The name field in the bucket is + // ignored. + LogBucket bucket = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `UpdateBucket`. message UpdateBucketRequest { // Required. The full resource name of the bucket to update. // @@ -688,7 +936,7 @@ message UpdateBucketRequest { google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; } -// The parameters to `GetBucket` (Beta). +// The parameters to `GetBucket`. message GetBucketRequest { // Required. The resource name of the bucket: // @@ -707,6 +955,147 @@ message GetBucketRequest { ]; } +// The parameters to `DeleteBucket`. +message DeleteBucketRequest { + // Required. The full resource name of the bucket to delete. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; +} + +// The parameters to `UndeleteBucket`. +message UndeleteBucketRequest { + // Required. The full resource name of the bucket to undelete. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; +} + +// The parameters to `ListViews`. +message ListViewsRequest { + // Required. The bucket whose views are to be listed: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from ListViews. +message ListViewsResponse { + // A list of views. + repeated LogView views = 1; + + // 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`. + string next_page_token = 2; +} + +// The parameters to `CreateView`. +message CreateViewRequest { + // Required. The bucket in which to create the view + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id to use for this view. + string view_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new view. + LogView view = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `UpdateView`. +message UpdateViewRequest { + // Required. The full resource name of the view to update + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The updated view. + LogView view = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field mask that specifies the fields in `view` that need + // an update. A field will be overwritten if, and only if, it is + // in the update mask. `name` and output only fields cannot be updated. + // + // For a detailed `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + // + // Example: `updateMask=filter`. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The parameters to `GetView`. +message GetViewRequest { + // Required. The resource name of the policy: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogView" + } + ]; +} + +// The parameters to `DeleteView`. +message DeleteViewRequest { + // Required. The full resource name of the view to delete: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogView" + } + ]; +} + // The parameters to `ListSinks`. message ListSinksRequest { // Required. The parent resource whose sinks are to be listed: diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index eb9f73ffabc..09d62964811 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -92,8 +92,8 @@ service MetricsServiceV2 { // Describes a logs-based metric. The value of the metric is the number of log // entries that match a logs filter in a given time interval. // -// Logs-based metric can also be used to extract values from logs and create a -// a distribution of the values. The distribution records the statistics of the +// Logs-based metrics can also be used to extract values from logs and create a +// distribution of the values. The distribution records the statistics of the // extracted values along with an optional histogram of the values as specified // by the bucket options. message LogMetric { diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 6a5e154aa67..8f48ec83861 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1577,6 +1577,20 @@ export namespace google { */ public getBucket(request: google.logging.v2.IGetBucketRequest): Promise; + /** + * Calls CreateBucket. + * @param request CreateBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogBucket + */ + public createBucket(request: google.logging.v2.ICreateBucketRequest, callback: google.logging.v2.ConfigServiceV2.CreateBucketCallback): void; + + /** + * Calls CreateBucket. + * @param request CreateBucketRequest message or plain object + * @returns Promise + */ + public createBucket(request: google.logging.v2.ICreateBucketRequest): Promise; + /** * Calls UpdateBucket. * @param request UpdateBucketRequest message or plain object @@ -1591,6 +1605,104 @@ export namespace google { */ public updateBucket(request: google.logging.v2.IUpdateBucketRequest): Promise; + /** + * Calls DeleteBucket. + * @param request DeleteBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteBucket(request: google.logging.v2.IDeleteBucketRequest, callback: google.logging.v2.ConfigServiceV2.DeleteBucketCallback): void; + + /** + * Calls DeleteBucket. + * @param request DeleteBucketRequest message or plain object + * @returns Promise + */ + public deleteBucket(request: google.logging.v2.IDeleteBucketRequest): Promise; + + /** + * Calls UndeleteBucket. + * @param request UndeleteBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public undeleteBucket(request: google.logging.v2.IUndeleteBucketRequest, callback: google.logging.v2.ConfigServiceV2.UndeleteBucketCallback): void; + + /** + * Calls UndeleteBucket. + * @param request UndeleteBucketRequest message or plain object + * @returns Promise + */ + public undeleteBucket(request: google.logging.v2.IUndeleteBucketRequest): Promise; + + /** + * Calls ListViews. + * @param request ListViewsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListViewsResponse + */ + public listViews(request: google.logging.v2.IListViewsRequest, callback: google.logging.v2.ConfigServiceV2.ListViewsCallback): void; + + /** + * Calls ListViews. + * @param request ListViewsRequest message or plain object + * @returns Promise + */ + public listViews(request: google.logging.v2.IListViewsRequest): Promise; + + /** + * Calls GetView. + * @param request GetViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogView + */ + public getView(request: google.logging.v2.IGetViewRequest, callback: google.logging.v2.ConfigServiceV2.GetViewCallback): void; + + /** + * Calls GetView. + * @param request GetViewRequest message or plain object + * @returns Promise + */ + public getView(request: google.logging.v2.IGetViewRequest): Promise; + + /** + * Calls CreateView. + * @param request CreateViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogView + */ + public createView(request: google.logging.v2.ICreateViewRequest, callback: google.logging.v2.ConfigServiceV2.CreateViewCallback): void; + + /** + * Calls CreateView. + * @param request CreateViewRequest message or plain object + * @returns Promise + */ + public createView(request: google.logging.v2.ICreateViewRequest): Promise; + + /** + * Calls UpdateView. + * @param request UpdateViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogView + */ + public updateView(request: google.logging.v2.IUpdateViewRequest, callback: google.logging.v2.ConfigServiceV2.UpdateViewCallback): void; + + /** + * Calls UpdateView. + * @param request UpdateViewRequest message or plain object + * @returns Promise + */ + public updateView(request: google.logging.v2.IUpdateViewRequest): Promise; + + /** + * Calls DeleteView. + * @param request DeleteViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteView(request: google.logging.v2.IDeleteViewRequest, callback: google.logging.v2.ConfigServiceV2.DeleteViewCallback): void; + + /** + * Calls DeleteView. + * @param request DeleteViewRequest message or plain object + * @returns Promise + */ + public deleteView(request: google.logging.v2.IDeleteViewRequest): Promise; + /** * Calls ListSinks. * @param request ListSinksRequest message or plain object @@ -1776,6 +1888,13 @@ export namespace google { */ type GetBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createBucket}. + * @param error Error, if any + * @param [response] LogBucket + */ + type CreateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. * @param error Error, if any @@ -1783,6 +1902,55 @@ export namespace google { */ type UpdateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteBucket}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteBucketCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#undeleteBucket}. + * @param error Error, if any + * @param [response] Empty + */ + type UndeleteBucketCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listViews}. + * @param error Error, if any + * @param [response] ListViewsResponse + */ + type ListViewsCallback = (error: (Error|null), response?: google.logging.v2.ListViewsResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getView}. + * @param error Error, if any + * @param [response] LogView + */ + type GetViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createView}. + * @param error Error, if any + * @param [response] LogView + */ + type CreateViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateView}. + * @param error Error, if any + * @param [response] LogView + */ + type UpdateViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteView}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. * @param error Error, if any @@ -1886,6 +2054,9 @@ export namespace google { /** LogBucket retentionDays */ retentionDays?: (number|null); + /** LogBucket locked */ + locked?: (boolean|null); + /** LogBucket lifecycleState */ lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); } @@ -1914,6 +2085,9 @@ export namespace google { /** LogBucket retentionDays. */ public retentionDays: number; + /** LogBucket locked. */ + public locked: boolean; + /** LogBucket lifecycleState. */ public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); @@ -1988,6 +2162,127 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** LifecycleState enum. */ + enum LifecycleState { + LIFECYCLE_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + DELETE_REQUESTED = 2 + } + + /** Properties of a LogView. */ + interface ILogView { + + /** LogView name */ + name?: (string|null); + + /** LogView description */ + description?: (string|null); + + /** LogView createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogView updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogView filter */ + filter?: (string|null); + } + + /** Represents a LogView. */ + class LogView implements ILogView { + + /** + * Constructs a new LogView. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogView); + + /** LogView name. */ + public name: string; + + /** LogView description. */ + public description: string; + + /** LogView createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogView updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogView filter. */ + public filter: string; + + /** + * Creates a new LogView instance using the specified properties. + * @param [properties] Properties to set + * @returns LogView instance + */ + public static create(properties?: google.logging.v2.ILogView): google.logging.v2.LogView; + + /** + * Encodes the specified LogView message. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * @param message LogView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogView message, length delimited. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * @param message LogView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogView; + + /** + * Decodes a LogView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogView; + + /** + * Verifies a LogView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogView + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogView; + + /** + * Creates a plain object from a LogView message. Also converts values to other types if specified. + * @param message LogView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a LogSink. */ interface ILogSink { @@ -2006,6 +2301,9 @@ export namespace google { /** LogSink disabled */ disabled?: (boolean|null); + /** LogSink exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); + /** LogSink outputVersionFormat */ outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat|null); @@ -2049,6 +2347,9 @@ export namespace google { /** LogSink disabled. */ public disabled: boolean; + /** LogSink exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; + /** LogSink outputVersionFormat. */ public outputVersionFormat: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat); @@ -2247,13 +2548,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** LifecycleState enum. */ - enum LifecycleState { - LIFECYCLE_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - DELETE_REQUESTED = 2 - } - /** Properties of a ListBucketsRequest. */ interface IListBucketsRequest { @@ -2452,6 +2746,108 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a CreateBucketRequest. */ + interface ICreateBucketRequest { + + /** CreateBucketRequest parent */ + parent?: (string|null); + + /** CreateBucketRequest bucketId */ + bucketId?: (string|null); + + /** CreateBucketRequest bucket */ + bucket?: (google.logging.v2.ILogBucket|null); + } + + /** Represents a CreateBucketRequest. */ + class CreateBucketRequest implements ICreateBucketRequest { + + /** + * Constructs a new CreateBucketRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateBucketRequest); + + /** CreateBucketRequest parent. */ + public parent: string; + + /** CreateBucketRequest bucketId. */ + public bucketId: string; + + /** CreateBucketRequest bucket. */ + public bucket?: (google.logging.v2.ILogBucket|null); + + /** + * Creates a new CreateBucketRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBucketRequest instance + */ + public static create(properties?: google.logging.v2.ICreateBucketRequest): google.logging.v2.CreateBucketRequest; + + /** + * Encodes the specified CreateBucketRequest message. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. + * @param message CreateBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. + * @param message CreateBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBucketRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateBucketRequest; + + /** + * Decodes a CreateBucketRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateBucketRequest; + + /** + * Verifies a CreateBucketRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBucketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBucketRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateBucketRequest; + + /** + * Creates a plain object from a CreateBucketRequest message. Also converts values to other types if specified. + * @param message CreateBucketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBucketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an UpdateBucketRequest. */ interface IUpdateBucketRequest { @@ -2644,6 +3040,768 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a DeleteBucketRequest. */ + interface IDeleteBucketRequest { + + /** DeleteBucketRequest name */ + name?: (string|null); + } + + /** Represents a DeleteBucketRequest. */ + class DeleteBucketRequest implements IDeleteBucketRequest { + + /** + * Constructs a new DeleteBucketRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteBucketRequest); + + /** DeleteBucketRequest name. */ + public name: string; + + /** + * Creates a new DeleteBucketRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBucketRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteBucketRequest): google.logging.v2.DeleteBucketRequest; + + /** + * Encodes the specified DeleteBucketRequest message. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * @param message DeleteBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * @param message DeleteBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBucketRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteBucketRequest; + + /** + * Decodes a DeleteBucketRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteBucketRequest; + + /** + * Verifies a DeleteBucketRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBucketRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteBucketRequest; + + /** + * Creates a plain object from a DeleteBucketRequest message. Also converts values to other types if specified. + * @param message DeleteBucketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBucketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UndeleteBucketRequest. */ + interface IUndeleteBucketRequest { + + /** UndeleteBucketRequest name */ + name?: (string|null); + } + + /** Represents an UndeleteBucketRequest. */ + class UndeleteBucketRequest implements IUndeleteBucketRequest { + + /** + * Constructs a new UndeleteBucketRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUndeleteBucketRequest); + + /** UndeleteBucketRequest name. */ + public name: string; + + /** + * Creates a new UndeleteBucketRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeleteBucketRequest instance + */ + public static create(properties?: google.logging.v2.IUndeleteBucketRequest): google.logging.v2.UndeleteBucketRequest; + + /** + * Encodes the specified UndeleteBucketRequest message. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. + * @param message UndeleteBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUndeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. + * @param message UndeleteBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUndeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeleteBucketRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UndeleteBucketRequest; + + /** + * Decodes an UndeleteBucketRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UndeleteBucketRequest; + + /** + * Verifies an UndeleteBucketRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UndeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeleteBucketRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UndeleteBucketRequest; + + /** + * Creates a plain object from an UndeleteBucketRequest message. Also converts values to other types if specified. + * @param message UndeleteBucketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UndeleteBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeleteBucketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListViewsRequest. */ + interface IListViewsRequest { + + /** ListViewsRequest parent */ + parent?: (string|null); + + /** ListViewsRequest pageToken */ + pageToken?: (string|null); + + /** ListViewsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListViewsRequest. */ + class ListViewsRequest implements IListViewsRequest { + + /** + * Constructs a new ListViewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListViewsRequest); + + /** ListViewsRequest parent. */ + public parent: string; + + /** ListViewsRequest pageToken. */ + public pageToken: string; + + /** ListViewsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsRequest instance + */ + public static create(properties?: google.logging.v2.IListViewsRequest): google.logging.v2.ListViewsRequest; + + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListViewsRequest; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListViewsRequest; + + /** + * Verifies a ListViewsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListViewsRequest; + + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @param message ListViewsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListViewsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListViewsResponse. */ + interface IListViewsResponse { + + /** ListViewsResponse views */ + views?: (google.logging.v2.ILogView[]|null); + + /** ListViewsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListViewsResponse. */ + class ListViewsResponse implements IListViewsResponse { + + /** + * Constructs a new ListViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListViewsResponse); + + /** ListViewsResponse views. */ + public views: google.logging.v2.ILogView[]; + + /** ListViewsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsResponse instance + */ + public static create(properties?: google.logging.v2.IListViewsResponse): google.logging.v2.ListViewsResponse; + + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListViewsResponse; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListViewsResponse; + + /** + * Verifies a ListViewsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListViewsResponse; + + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @param message ListViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListViewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateViewRequest. */ + interface ICreateViewRequest { + + /** CreateViewRequest parent */ + parent?: (string|null); + + /** CreateViewRequest viewId */ + viewId?: (string|null); + + /** CreateViewRequest view */ + view?: (google.logging.v2.ILogView|null); + } + + /** Represents a CreateViewRequest. */ + class CreateViewRequest implements ICreateViewRequest { + + /** + * Constructs a new CreateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateViewRequest); + + /** CreateViewRequest parent. */ + public parent: string; + + /** CreateViewRequest viewId. */ + public viewId: string; + + /** CreateViewRequest view. */ + public view?: (google.logging.v2.ILogView|null); + + /** + * Creates a new CreateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateViewRequest instance + */ + public static create(properties?: google.logging.v2.ICreateViewRequest): google.logging.v2.CreateViewRequest; + + /** + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateViewRequest; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateViewRequest; + + /** + * Verifies a CreateViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateViewRequest; + + /** + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @param message CreateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateViewRequest. */ + interface IUpdateViewRequest { + + /** UpdateViewRequest name */ + name?: (string|null); + + /** UpdateViewRequest view */ + view?: (google.logging.v2.ILogView|null); + + /** UpdateViewRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateViewRequest. */ + class UpdateViewRequest implements IUpdateViewRequest { + + /** + * Constructs a new UpdateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateViewRequest); + + /** UpdateViewRequest name. */ + public name: string; + + /** UpdateViewRequest view. */ + public view?: (google.logging.v2.ILogView|null); + + /** UpdateViewRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateViewRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateViewRequest): google.logging.v2.UpdateViewRequest; + + /** + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. + * @param message UpdateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. + * @param message UpdateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateViewRequest; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateViewRequest; + + /** + * Verifies an UpdateViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateViewRequest; + + /** + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * @param message UpdateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetViewRequest. */ + interface IGetViewRequest { + + /** GetViewRequest name */ + name?: (string|null); + } + + /** Represents a GetViewRequest. */ + class GetViewRequest implements IGetViewRequest { + + /** + * Constructs a new GetViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetViewRequest); + + /** GetViewRequest name. */ + public name: string; + + /** + * Creates a new GetViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetViewRequest instance + */ + public static create(properties?: google.logging.v2.IGetViewRequest): google.logging.v2.GetViewRequest; + + /** + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. + * @param message GetViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. + * @param message GetViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetViewRequest; + + /** + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetViewRequest; + + /** + * Verifies a GetViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetViewRequest; + + /** + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. + * @param message GetViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteViewRequest. */ + interface IDeleteViewRequest { + + /** DeleteViewRequest name */ + name?: (string|null); + } + + /** Represents a DeleteViewRequest. */ + class DeleteViewRequest implements IDeleteViewRequest { + + /** + * Constructs a new DeleteViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteViewRequest); + + /** DeleteViewRequest name. */ + public name: string; + + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteViewRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteViewRequest): google.logging.v2.DeleteViewRequest; + + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteViewRequest; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteViewRequest; + + /** + * Verifies a DeleteViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteViewRequest; + + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @param message DeleteViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ListSinksRequest. */ interface IListSinksRequest { diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 0d8676bf673..1152314c2e9 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -3894,6 +3894,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogBucket} [response] LogBucket + */ + + /** + * Calls CreateBucket. + * @function createBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateBucketRequest} request CreateBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateBucketCallback} callback Node-style callback called with the error, if any, and LogBucket + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createBucket = function createBucket(request, callback) { + return this.rpcCall(createBucket, $root.google.logging.v2.CreateBucketRequest, $root.google.logging.v2.LogBucket, request, callback); + }, "name", { value: "CreateBucket" }); + + /** + * Calls CreateBucket. + * @function createBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateBucketRequest} request CreateBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. * @memberof google.logging.v2.ConfigServiceV2 @@ -3927,6 +3960,237 @@ * @variation 2 */ + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteBucket. + * @function deleteBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteBucketRequest} request DeleteBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteBucketCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteBucket = function deleteBucket(request, callback) { + return this.rpcCall(deleteBucket, $root.google.logging.v2.DeleteBucketRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteBucket" }); + + /** + * Calls DeleteBucket. + * @function deleteBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteBucketRequest} request DeleteBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#undeleteBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UndeleteBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls UndeleteBucket. + * @function undeleteBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUndeleteBucketRequest} request UndeleteBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UndeleteBucketCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.undeleteBucket = function undeleteBucket(request, callback) { + return this.rpcCall(undeleteBucket, $root.google.logging.v2.UndeleteBucketRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "UndeleteBucket" }); + + /** + * Calls UndeleteBucket. + * @function undeleteBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUndeleteBucketRequest} request UndeleteBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listViews}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListViewsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListViewsResponse} [response] ListViewsResponse + */ + + /** + * Calls ListViews. + * @function listViews + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListViewsRequest} request ListViewsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListViewsCallback} callback Node-style callback called with the error, if any, and ListViewsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listViews = function listViews(request, callback) { + return this.rpcCall(listViews, $root.google.logging.v2.ListViewsRequest, $root.google.logging.v2.ListViewsResponse, request, callback); + }, "name", { value: "ListViews" }); + + /** + * Calls ListViews. + * @function listViews + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListViewsRequest} request ListViewsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getView}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogView} [response] LogView + */ + + /** + * Calls GetView. + * @function getView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetViewRequest} request GetViewRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetViewCallback} callback Node-style callback called with the error, if any, and LogView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getView = function getView(request, callback) { + return this.rpcCall(getView, $root.google.logging.v2.GetViewRequest, $root.google.logging.v2.LogView, request, callback); + }, "name", { value: "GetView" }); + + /** + * Calls GetView. + * @function getView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetViewRequest} request GetViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createView}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogView} [response] LogView + */ + + /** + * Calls CreateView. + * @function createView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateViewRequest} request CreateViewRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateViewCallback} callback Node-style callback called with the error, if any, and LogView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createView = function createView(request, callback) { + return this.rpcCall(createView, $root.google.logging.v2.CreateViewRequest, $root.google.logging.v2.LogView, request, callback); + }, "name", { value: "CreateView" }); + + /** + * Calls CreateView. + * @function createView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateViewRequest} request CreateViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateView}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogView} [response] LogView + */ + + /** + * Calls UpdateView. + * @function updateView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateViewRequest} request UpdateViewRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateViewCallback} callback Node-style callback called with the error, if any, and LogView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateView = function updateView(request, callback) { + return this.rpcCall(updateView, $root.google.logging.v2.UpdateViewRequest, $root.google.logging.v2.LogView, request, callback); + }, "name", { value: "UpdateView" }); + + /** + * Calls UpdateView. + * @function updateView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateViewRequest} request UpdateViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteView}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteView. + * @function deleteView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteViewRequest} request DeleteViewRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteViewCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteView = function deleteView(request, callback) { + return this.rpcCall(deleteView, $root.google.logging.v2.DeleteViewRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteView" }); + + /** + * Calls DeleteView. + * @function deleteView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteViewRequest} request DeleteViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. * @memberof google.logging.v2.ConfigServiceV2 @@ -4337,6 +4601,7 @@ * @property {google.protobuf.ITimestamp|null} [createTime] LogBucket createTime * @property {google.protobuf.ITimestamp|null} [updateTime] LogBucket updateTime * @property {number|null} [retentionDays] LogBucket retentionDays + * @property {boolean|null} [locked] LogBucket locked * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState */ @@ -4395,6 +4660,14 @@ */ LogBucket.prototype.retentionDays = 0; + /** + * LogBucket locked. + * @member {boolean} locked + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.locked = false; + /** * LogBucket lifecycleState. * @member {google.logging.v2.LifecycleState} lifecycleState @@ -4435,6 +4708,8 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.locked); if (message.retentionDays != null && Object.hasOwnProperty.call(message, "retentionDays")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); if (message.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) @@ -4488,6 +4763,9 @@ case 11: message.retentionDays = reader.int32(); break; + case 9: + message.locked = reader.bool(); + break; case 12: message.lifecycleState = reader.int32(); break; @@ -4545,6 +4823,9 @@ if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) if (!$util.isInteger(message.retentionDays)) return "retentionDays: integer expected"; + if (message.locked != null && message.hasOwnProperty("locked")) + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) switch (message.lifecycleState) { default: @@ -4585,6 +4866,8 @@ } if (object.retentionDays != null) message.retentionDays = object.retentionDays | 0; + if (object.locked != null) + message.locked = Boolean(object.locked); switch (object.lifecycleState) { case "LIFECYCLE_STATE_UNSPECIFIED": case 0: @@ -4620,6 +4903,7 @@ object.description = ""; object.createTime = null; object.updateTime = null; + object.locked = false; object.retentionDays = 0; object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; } @@ -4631,6 +4915,8 @@ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) object.retentionDays = message.retentionDays; if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) @@ -4652,34 +4938,44 @@ return LogBucket; })(); - v2.LogSink = (function() { + /** + * LifecycleState enum. + * @name google.logging.v2.LifecycleState + * @enum {number} + * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value + */ + v2.LifecycleState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "DELETE_REQUESTED"] = 2; + return values; + })(); + + v2.LogView = (function() { /** - * Properties of a LogSink. + * Properties of a LogView. * @memberof google.logging.v2 - * @interface ILogSink - * @property {string|null} [name] LogSink name - * @property {string|null} [destination] LogSink destination - * @property {string|null} [filter] LogSink filter - * @property {string|null} [description] LogSink description - * @property {boolean|null} [disabled] LogSink disabled - * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat - * @property {string|null} [writerIdentity] LogSink writerIdentity - * @property {boolean|null} [includeChildren] LogSink includeChildren - * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + * @interface ILogView + * @property {string|null} [name] LogView name + * @property {string|null} [description] LogView description + * @property {google.protobuf.ITimestamp|null} [createTime] LogView createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogView updateTime + * @property {string|null} [filter] LogView filter */ /** - * Constructs a new LogSink. + * Constructs a new LogView. * @memberof google.logging.v2 - * @classdesc Represents a LogSink. - * @implements ILogSink + * @classdesc Represents a LogView. + * @implements ILogView * @constructor - * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @param {google.logging.v2.ILogView=} [properties] Properties to set */ - function LogSink(properties) { + function LogView(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4687,63 +4983,365 @@ } /** - * LogSink name. + * LogView name. * @member {string} name - * @memberof google.logging.v2.LogSink + * @memberof google.logging.v2.LogView * @instance */ - LogSink.prototype.name = ""; + LogView.prototype.name = ""; /** - * LogSink destination. - * @member {string} destination - * @memberof google.logging.v2.LogSink + * LogView description. + * @member {string} description + * @memberof google.logging.v2.LogView * @instance */ - LogSink.prototype.destination = ""; + LogView.prototype.description = ""; /** - * LogSink filter. - * @member {string} filter - * @memberof google.logging.v2.LogSink + * LogView createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogView * @instance */ - LogSink.prototype.filter = ""; + LogView.prototype.createTime = null; /** - * LogSink description. - * @member {string} description - * @memberof google.logging.v2.LogSink + * LogView updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogView * @instance */ - LogSink.prototype.description = ""; + LogView.prototype.updateTime = null; /** - * LogSink disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogSink + * LogView filter. + * @member {string} filter + * @memberof google.logging.v2.LogView * @instance */ - LogSink.prototype.disabled = false; + LogView.prototype.filter = ""; /** - * LogSink outputVersionFormat. - * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat - * @memberof google.logging.v2.LogSink - * @instance + * Creates a new LogView instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogView + * @static + * @param {google.logging.v2.ILogView=} [properties] Properties to set + * @returns {google.logging.v2.LogView} LogView instance */ - LogSink.prototype.outputVersionFormat = 0; + LogView.create = function create(properties) { + return new LogView(properties); + }; /** - * LogSink writerIdentity. - * @member {string} writerIdentity - * @memberof google.logging.v2.LogSink - * @instance + * Encodes the specified LogView message. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogView + * @static + * @param {google.logging.v2.ILogView} message LogView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogSink.prototype.writerIdentity = ""; + LogView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.filter); + return writer; + }; /** - * LogSink includeChildren. + * Encodes the specified LogView message, length delimited. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogView + * @static + * @param {google.logging.v2.ILogView} message LogView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogView message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogView} LogView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogView} LogView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogView message. + * @function verify + * @memberof google.logging.v2.LogView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a LogView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogView + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogView} LogView + */ + LogView.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogView) + return object; + var message = new $root.google.logging.v2.LogView(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogView.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogView.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a LogView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogView + * @static + * @param {google.logging.v2.LogView} message LogView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this LogView to JSON. + * @function toJSON + * @memberof google.logging.v2.LogView + * @instance + * @returns {Object.} JSON object + */ + LogView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogView; + })(); + + v2.LogSink = (function() { + + /** + * Properties of a LogSink. + * @memberof google.logging.v2 + * @interface ILogSink + * @property {string|null} [name] LogSink name + * @property {string|null} [destination] LogSink destination + * @property {string|null} [filter] LogSink filter + * @property {string|null} [description] LogSink description + * @property {boolean|null} [disabled] LogSink disabled + * @property {Array.|null} [exclusions] LogSink exclusions + * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat + * @property {string|null} [writerIdentity] LogSink writerIdentity + * @property {boolean|null} [includeChildren] LogSink includeChildren + * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + */ + + /** + * Constructs a new LogSink. + * @memberof google.logging.v2 + * @classdesc Represents a LogSink. + * @implements ILogSink + * @constructor + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + */ + function LogSink(properties) { + this.exclusions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogSink name. + * @member {string} name + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.name = ""; + + /** + * LogSink destination. + * @member {string} destination + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.destination = ""; + + /** + * LogSink filter. + * @member {string} filter + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.filter = ""; + + /** + * LogSink description. + * @member {string} description + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.description = ""; + + /** + * LogSink disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.disabled = false; + + /** + * LogSink exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.exclusions = $util.emptyArray; + + /** + * LogSink outputVersionFormat. + * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.outputVersionFormat = 0; + + /** + * LogSink writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.writerIdentity = ""; + + /** + * LogSink includeChildren. * @member {boolean} includeChildren * @memberof google.logging.v2.LogSink * @instance @@ -4830,6 +5428,9 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) @@ -4883,6 +5484,11 @@ case 19: message.disabled = reader.bool(); break; + case 16: + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + break; case 6: message.outputVersionFormat = reader.int32(); break; @@ -4952,9 +5558,18 @@ if (message.disabled != null && message.hasOwnProperty("disabled")) if (typeof message.disabled !== "boolean") return "disabled: boolean expected"; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - switch (message.outputVersionFormat) { - default: + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + if (error) + return "exclusions." + error; + } + } + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + switch (message.outputVersionFormat) { + default: return "outputVersionFormat: enum value expected"; case 0: case 1: @@ -5010,6 +5625,16 @@ message.description = String(object.description); if (object.disabled != null) message.disabled = Boolean(object.disabled); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.LogSink.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.LogSink.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); + } + } switch (object.outputVersionFormat) { case "VERSION_FORMAT_UNSPECIFIED": case 0: @@ -5059,6 +5684,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.exclusions = []; if (options.defaults) { object.name = ""; object.destination = ""; @@ -5092,6 +5719,11 @@ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + } if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.disabled != null && message.hasOwnProperty("disabled")) @@ -5118,36 +5750,1982 @@ * @property {number} V2=1 V2 value * @property {number} V1=2 V1 value */ - LogSink.VersionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "V2"] = 1; - values[valuesById[2] = "V1"] = 2; - return values; - })(); + LogSink.VersionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "V2"] = 1; + values[valuesById[2] = "V1"] = 2; + return values; + })(); + + return LogSink; + })(); + + v2.BigQueryOptions = (function() { + + /** + * Properties of a BigQueryOptions. + * @memberof google.logging.v2 + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning + */ + + /** + * Constructs a new BigQueryOptions. + * @memberof google.logging.v2 + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions + * @constructor + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + */ + function BigQueryOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usePartitionedTables = false; + + /** + * BigQueryOptions usesTimestampColumnPartitioning. + * @member {boolean} usesTimestampColumnPartitioning + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; + + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @function create + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + */ + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); + }; + + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usePartitionedTables != null && Object.hasOwnProperty.call(message, "usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + if (message.usesTimestampColumnPartitioning != null && Object.hasOwnProperty.call(message, "usesTimestampColumnPartitioning")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); + return writer; + }; + + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.usePartitionedTables = reader.bool(); + break; + case 3: + message.usesTimestampColumnPartitioning = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryOptions message. + * @function verify + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + if (typeof message.usesTimestampColumnPartitioning !== "boolean") + return "usesTimestampColumnPartitioning: boolean expected"; + return null; + }; + + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + */ + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) + return object; + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + if (object.usesTimestampColumnPartitioning != null) + message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); + return message; + }; + + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.usePartitionedTables = false; + object.usesTimestampColumnPartitioning = false; + } + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; + return object; + }; + + /** + * Converts this BigQueryOptions to JSON. + * @function toJSON + * @memberof google.logging.v2.BigQueryOptions + * @instance + * @returns {Object.} JSON object + */ + BigQueryOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BigQueryOptions; + })(); + + v2.ListBucketsRequest = (function() { + + /** + * Properties of a ListBucketsRequest. + * @memberof google.logging.v2 + * @interface IListBucketsRequest + * @property {string|null} [parent] ListBucketsRequest parent + * @property {string|null} [pageToken] ListBucketsRequest pageToken + * @property {number|null} [pageSize] ListBucketsRequest pageSize + */ + + /** + * Constructs a new ListBucketsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListBucketsRequest. + * @implements IListBucketsRequest + * @constructor + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + */ + function ListBucketsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBucketsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.parent = ""; + + /** + * ListBucketsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.pageToken = ""; + + /** + * ListBucketsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListBucketsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance + */ + ListBucketsRequest.create = function create(properties) { + return new ListBucketsRequest(properties); + }; + + /** + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBucketsRequest message. + * @function verify + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBucketsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + */ + ListBucketsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsRequest) + return object; + var message = new $root.google.logging.v2.ListBucketsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBucketsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListBucketsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListBucketsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBucketsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBucketsRequest; + })(); + + v2.ListBucketsResponse = (function() { + + /** + * Properties of a ListBucketsResponse. + * @memberof google.logging.v2 + * @interface IListBucketsResponse + * @property {Array.|null} [buckets] ListBucketsResponse buckets + * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken + */ + + /** + * Constructs a new ListBucketsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListBucketsResponse. + * @implements IListBucketsResponse + * @constructor + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + */ + function ListBucketsResponse(properties) { + this.buckets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBucketsResponse buckets. + * @member {Array.} buckets + * @memberof google.logging.v2.ListBucketsResponse + * @instance + */ + ListBucketsResponse.prototype.buckets = $util.emptyArray; + + /** + * ListBucketsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListBucketsResponse + * @instance + */ + ListBucketsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListBucketsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance + */ + ListBucketsResponse.create = function create(properties) { + return new ListBucketsResponse(properties); + }; + + /** + * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buckets != null && message.buckets.length) + for (var i = 0; i < message.buckets.length; ++i) + $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBucketsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBucketsResponse message. + * @function verify + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBucketsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!Array.isArray(message.buckets)) + return "buckets: array expected"; + for (var i = 0; i < message.buckets.length; ++i) { + var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); + if (error) + return "buckets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + */ + ListBucketsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsResponse) + return object; + var message = new $root.google.logging.v2.ListBucketsResponse(); + if (object.buckets) { + if (!Array.isArray(object.buckets)) + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); + message.buckets = []; + for (var i = 0; i < object.buckets.length; ++i) { + if (typeof object.buckets[i] !== "object") + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); + message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBucketsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buckets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.buckets && message.buckets.length) { + object.buckets = []; + for (var j = 0; j < message.buckets.length; ++j) + object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListBucketsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListBucketsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBucketsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBucketsResponse; + })(); + + v2.CreateBucketRequest = (function() { + + /** + * Properties of a CreateBucketRequest. + * @memberof google.logging.v2 + * @interface ICreateBucketRequest + * @property {string|null} [parent] CreateBucketRequest parent + * @property {string|null} [bucketId] CreateBucketRequest bucketId + * @property {google.logging.v2.ILogBucket|null} [bucket] CreateBucketRequest bucket + */ + + /** + * Constructs a new CreateBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateBucketRequest. + * @implements ICreateBucketRequest + * @constructor + * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set + */ + function CreateBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBucketRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateBucketRequest + * @instance + */ + CreateBucketRequest.prototype.parent = ""; + + /** + * CreateBucketRequest bucketId. + * @member {string} bucketId + * @memberof google.logging.v2.CreateBucketRequest + * @instance + */ + CreateBucketRequest.prototype.bucketId = ""; + + /** + * CreateBucketRequest bucket. + * @member {google.logging.v2.ILogBucket|null|undefined} bucket + * @memberof google.logging.v2.CreateBucketRequest + * @instance + */ + CreateBucketRequest.prototype.bucket = null; + + /** + * Creates a new CreateBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest instance + */ + CreateBucketRequest.create = function create(properties) { + return new CreateBucketRequest(properties); + }; + + /** + * Encodes the specified CreateBucketRequest message. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.bucketId != null && Object.hasOwnProperty.call(message, "bucketId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketId); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.bucketId = reader.string(); + break; + case 3: + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBucketRequest message. + * @function verify + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.bucketId != null && message.hasOwnProperty("bucketId")) + if (!$util.isString(message.bucketId)) + return "bucketId: string expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + var error = $root.google.logging.v2.LogBucket.verify(message.bucket); + if (error) + return "bucket." + error; + } + return null; + }; + + /** + * Creates a CreateBucketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest + */ + CreateBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateBucketRequest) + return object; + var message = new $root.google.logging.v2.CreateBucketRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.bucketId != null) + message.bucketId = String(object.bucketId); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.logging.v2.CreateBucketRequest.bucket: object expected"); + message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); + } + return message; + }; + + /** + * Creates a plain object from a CreateBucketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {google.logging.v2.CreateBucketRequest} message CreateBucketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBucketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.bucketId = ""; + object.bucket = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.bucketId != null && message.hasOwnProperty("bucketId")) + object.bucketId = message.bucketId; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); + return object; + }; + + /** + * Converts this CreateBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateBucketRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateBucketRequest; + })(); + + v2.UpdateBucketRequest = (function() { + + /** + * Properties of an UpdateBucketRequest. + * @memberof google.logging.v2 + * @interface IUpdateBucketRequest + * @property {string|null} [name] UpdateBucketRequest name + * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask + */ + + /** + * Constructs a new UpdateBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateBucketRequest. + * @implements IUpdateBucketRequest + * @constructor + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + */ + function UpdateBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.name = ""; + + /** + * UpdateBucketRequest bucket. + * @member {google.logging.v2.ILogBucket|null|undefined} bucket + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.bucket = null; + + /** + * UpdateBucketRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance + */ + UpdateBucketRequest.create = function create(properties) { + return new UpdateBucketRequest(properties); + }; + + /** + * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBucketRequest message. + * @function verify + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + var error = $root.google.logging.v2.LogBucket.verify(message.bucket); + if (error) + return "bucket." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + */ + UpdateBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateBucketRequest) + return object; + var message = new $root.google.logging.v2.UpdateBucketRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); + message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBucketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.bucket = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateBucketRequest; + })(); + + v2.GetBucketRequest = (function() { + + /** + * Properties of a GetBucketRequest. + * @memberof google.logging.v2 + * @interface IGetBucketRequest + * @property {string|null} [name] GetBucketRequest name + */ + + /** + * Constructs a new GetBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetBucketRequest. + * @implements IGetBucketRequest + * @constructor + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + */ + function GetBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.GetBucketRequest + * @instance + */ + GetBucketRequest.prototype.name = ""; + + /** + * Creates a new GetBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance + */ + GetBucketRequest.create = function create(properties) { + return new GetBucketRequest(properties); + }; + + /** + * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBucketRequest message. + * @function verify + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + */ + GetBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetBucketRequest) + return object; + var message = new $root.google.logging.v2.GetBucketRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBucketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetBucketRequest + * @instance + * @returns {Object.} JSON object + */ + GetBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetBucketRequest; + })(); + + v2.DeleteBucketRequest = (function() { + + /** + * Properties of a DeleteBucketRequest. + * @memberof google.logging.v2 + * @interface IDeleteBucketRequest + * @property {string|null} [name] DeleteBucketRequest name + */ + + /** + * Constructs a new DeleteBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteBucketRequest. + * @implements IDeleteBucketRequest + * @constructor + * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set + */ + function DeleteBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteBucketRequest + * @instance + */ + DeleteBucketRequest.prototype.name = ""; + + /** + * Creates a new DeleteBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest instance + */ + DeleteBucketRequest.create = function create(properties) { + return new DeleteBucketRequest(properties); + }; + + /** + * Encodes the specified DeleteBucketRequest message. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBucketRequest message. + * @function verify + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + */ + DeleteBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteBucketRequest) + return object; + var message = new $root.google.logging.v2.DeleteBucketRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteBucketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {google.logging.v2.DeleteBucketRequest} message DeleteBucketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBucketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteBucketRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteBucketRequest; + })(); + + v2.UndeleteBucketRequest = (function() { + + /** + * Properties of an UndeleteBucketRequest. + * @memberof google.logging.v2 + * @interface IUndeleteBucketRequest + * @property {string|null} [name] UndeleteBucketRequest name + */ + + /** + * Constructs a new UndeleteBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UndeleteBucketRequest. + * @implements IUndeleteBucketRequest + * @constructor + * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set + */ + function UndeleteBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeleteBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.UndeleteBucketRequest + * @instance + */ + UndeleteBucketRequest.prototype.name = ""; + + /** + * Creates a new UndeleteBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest instance + */ + UndeleteBucketRequest.create = function create(properties) { + return new UndeleteBucketRequest(properties); + }; + + /** + * Encodes the specified UndeleteBucketRequest message. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified UndeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UndeleteBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UndeleteBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UndeleteBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeleteBucketRequest message. + * @function verify + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeleteBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an UndeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest + */ + UndeleteBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UndeleteBucketRequest) + return object; + var message = new $root.google.logging.v2.UndeleteBucketRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an UndeleteBucketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {google.logging.v2.UndeleteBucketRequest} message UndeleteBucketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeleteBucketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this UndeleteBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UndeleteBucketRequest + * @instance + * @returns {Object.} JSON object + */ + UndeleteBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UndeleteBucketRequest; + })(); + + v2.ListViewsRequest = (function() { + + /** + * Properties of a ListViewsRequest. + * @memberof google.logging.v2 + * @interface IListViewsRequest + * @property {string|null} [parent] ListViewsRequest parent + * @property {string|null} [pageToken] ListViewsRequest pageToken + * @property {number|null} [pageSize] ListViewsRequest pageSize + */ + + /** + * Constructs a new ListViewsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListViewsRequest. + * @implements IListViewsRequest + * @constructor + * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set + */ + function ListViewsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListViewsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.parent = ""; + + /** + * ListViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.pageToken = ""; + + /** + * ListViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest instance + */ + ListViewsRequest.create = function create(properties) { + return new ListViewsRequest(properties); + }; + + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListViewsRequest message. + * @function verify + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + */ + ListViewsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListViewsRequest) + return object; + var message = new $root.google.logging.v2.ListViewsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {google.logging.v2.ListViewsRequest} message ListViewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListViewsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListViewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListViewsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return LogSink; + return ListViewsRequest; })(); - v2.BigQueryOptions = (function() { + v2.ListViewsResponse = (function() { /** - * Properties of a BigQueryOptions. + * Properties of a ListViewsResponse. * @memberof google.logging.v2 - * @interface IBigQueryOptions - * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables - * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning + * @interface IListViewsResponse + * @property {Array.|null} [views] ListViewsResponse views + * @property {string|null} [nextPageToken] ListViewsResponse nextPageToken */ /** - * Constructs a new BigQueryOptions. + * Constructs a new ListViewsResponse. * @memberof google.logging.v2 - * @classdesc Represents a BigQueryOptions. - * @implements IBigQueryOptions + * @classdesc Represents a ListViewsResponse. + * @implements IListViewsResponse * @constructor - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set */ - function BigQueryOptions(properties) { + function ListViewsResponse(properties) { + this.views = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5155,88 +7733,91 @@ } /** - * BigQueryOptions usePartitionedTables. - * @member {boolean} usePartitionedTables - * @memberof google.logging.v2.BigQueryOptions + * ListViewsResponse views. + * @member {Array.} views + * @memberof google.logging.v2.ListViewsResponse * @instance */ - BigQueryOptions.prototype.usePartitionedTables = false; + ListViewsResponse.prototype.views = $util.emptyArray; /** - * BigQueryOptions usesTimestampColumnPartitioning. - * @member {boolean} usesTimestampColumnPartitioning - * @memberof google.logging.v2.BigQueryOptions + * ListViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListViewsResponse * @instance */ - BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; + ListViewsResponse.prototype.nextPageToken = ""; /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new ListViewsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @static - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse instance */ - BigQueryOptions.create = function create(properties) { - return new BigQueryOptions(properties); + ListViewsResponse.create = function create(properties) { + return new ListViewsResponse(properties); }; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encode = function encode(message, writer) { + ListViewsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usePartitionedTables != null && Object.hasOwnProperty.call(message, "usePartitionedTables")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); - if (message.usesTimestampColumnPartitioning != null && Object.hasOwnProperty.call(message, "usesTimestampColumnPartitioning")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); + if (message.views != null && message.views.length) + for (var i = 0; i < message.views.length; ++i) + $root.google.logging.v2.LogView.encode(message.views[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + ListViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a ListViewsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decode = function decode(reader, length) { + ListViewsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.usePartitionedTables = reader.bool(); + if (!(message.views && message.views.length)) + message.views = []; + message.views.push($root.google.logging.v2.LogView.decode(reader, reader.uint32())); break; - case 3: - message.usesTimestampColumnPartitioning = reader.bool(); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -5247,134 +7828,135 @@ }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + ListViewsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryOptions message. + * Verifies a ListViewsResponse message. * @function verify - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryOptions.verify = function verify(message) { + ListViewsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - if (typeof message.usePartitionedTables !== "boolean") - return "usePartitionedTables: boolean expected"; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - if (typeof message.usesTimestampColumnPartitioning !== "boolean") - return "usesTimestampColumnPartitioning: boolean expected"; + if (message.views != null && message.hasOwnProperty("views")) { + if (!Array.isArray(message.views)) + return "views: array expected"; + for (var i = 0; i < message.views.length; ++i) { + var error = $root.google.logging.v2.LogView.verify(message.views[i]); + if (error) + return "views." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse */ - BigQueryOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.BigQueryOptions) + ListViewsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListViewsResponse) return object; - var message = new $root.google.logging.v2.BigQueryOptions(); - if (object.usePartitionedTables != null) - message.usePartitionedTables = Boolean(object.usePartitionedTables); - if (object.usesTimestampColumnPartitioning != null) - message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); + var message = new $root.google.logging.v2.ListViewsResponse(); + if (object.views) { + if (!Array.isArray(object.views)) + throw TypeError(".google.logging.v2.ListViewsResponse.views: array expected"); + message.views = []; + for (var i = 0; i < object.views.length; ++i) { + if (typeof object.views[i] !== "object") + throw TypeError(".google.logging.v2.ListViewsResponse.views: object expected"); + message.views[i] = $root.google.logging.v2.LogView.fromObject(object.views[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @static - * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {google.logging.v2.ListViewsResponse} message ListViewsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryOptions.toObject = function toObject(message, options) { + ListViewsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.usePartitionedTables = false; - object.usesTimestampColumnPartitioning = false; + if (options.arrays || options.defaults) + object.views = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.views && message.views.length) { + object.views = []; + for (var j = 0; j < message.views.length; ++j) + object.views[j] = $root.google.logging.v2.LogView.toObject(message.views[j], options); } - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - object.usePartitionedTables = message.usePartitionedTables; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this BigQueryOptions to JSON. + * Converts this ListViewsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.ListViewsResponse * @instance * @returns {Object.} JSON object */ - BigQueryOptions.prototype.toJSON = function toJSON() { + ListViewsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryOptions; - })(); - - /** - * LifecycleState enum. - * @name google.logging.v2.LifecycleState - * @enum {number} - * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value - */ - v2.LifecycleState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "DELETE_REQUESTED"] = 2; - return values; + return ListViewsResponse; })(); - v2.ListBucketsRequest = (function() { + v2.CreateViewRequest = (function() { /** - * Properties of a ListBucketsRequest. + * Properties of a CreateViewRequest. * @memberof google.logging.v2 - * @interface IListBucketsRequest - * @property {string|null} [parent] ListBucketsRequest parent - * @property {string|null} [pageToken] ListBucketsRequest pageToken - * @property {number|null} [pageSize] ListBucketsRequest pageSize + * @interface ICreateViewRequest + * @property {string|null} [parent] CreateViewRequest parent + * @property {string|null} [viewId] CreateViewRequest viewId + * @property {google.logging.v2.ILogView|null} [view] CreateViewRequest view */ /** - * Constructs a new ListBucketsRequest. + * Constructs a new CreateViewRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListBucketsRequest. - * @implements IListBucketsRequest + * @classdesc Represents a CreateViewRequest. + * @implements ICreateViewRequest * @constructor - * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set */ - function ListBucketsRequest(properties) { + function CreateViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5382,90 +7964,90 @@ } /** - * ListBucketsRequest parent. + * CreateViewRequest parent. * @member {string} parent - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @instance */ - ListBucketsRequest.prototype.parent = ""; + CreateViewRequest.prototype.parent = ""; /** - * ListBucketsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListBucketsRequest + * CreateViewRequest viewId. + * @member {string} viewId + * @memberof google.logging.v2.CreateViewRequest * @instance */ - ListBucketsRequest.prototype.pageToken = ""; + CreateViewRequest.prototype.viewId = ""; /** - * ListBucketsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListBucketsRequest + * CreateViewRequest view. + * @member {google.logging.v2.ILogView|null|undefined} view + * @memberof google.logging.v2.CreateViewRequest * @instance */ - ListBucketsRequest.prototype.pageSize = 0; + CreateViewRequest.prototype.view = null; /** - * Creates a new ListBucketsRequest instance using the specified properties. + * Creates a new CreateViewRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance + * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest instance */ - ListBucketsRequest.create = function create(properties) { - return new ListBucketsRequest(properties); + CreateViewRequest.create = function create(properties) { + return new CreateViewRequest(properties); }; /** - * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsRequest.encode = function encode(message, writer) { + CreateViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.viewId != null && Object.hasOwnProperty.call(message, "viewId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.viewId); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer. + * Decodes a CreateViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsRequest.decode = function decode(reader, length) { + CreateViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5473,10 +8055,10 @@ message.parent = reader.string(); break; case 2: - message.pageToken = reader.string(); + message.viewId = reader.string(); break; case 3: - message.pageSize = reader.int32(); + message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5487,126 +8069,131 @@ }; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBucketsRequest message. + * Verifies a CreateViewRequest message. * @function verify - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBucketsRequest.verify = function verify(message) { + CreateViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.viewId != null && message.hasOwnProperty("viewId")) + if (!$util.isString(message.viewId)) + return "viewId: string expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.logging.v2.LogView.verify(message.view); + if (error) + return "view." + error; + } return null; }; /** - * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest */ - ListBucketsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListBucketsRequest) + CreateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateViewRequest) return object; - var message = new $root.google.logging.v2.ListBucketsRequest(); + var message = new $root.google.logging.v2.CreateViewRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + if (object.viewId != null) + message.viewId = String(object.viewId); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.logging.v2.CreateViewRequest.view: object expected"); + message.view = $root.google.logging.v2.LogView.fromObject(object.view); + } return message; }; /** - * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest + * @param {google.logging.v2.CreateViewRequest} message CreateViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBucketsRequest.toObject = function toObject(message, options) { + CreateViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.viewId = ""; + object.view = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.viewId != null && message.hasOwnProperty("viewId")) + object.viewId = message.viewId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.logging.v2.LogView.toObject(message.view, options); return object; }; /** - * Converts this ListBucketsRequest to JSON. + * Converts this CreateViewRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.CreateViewRequest * @instance * @returns {Object.} JSON object */ - ListBucketsRequest.prototype.toJSON = function toJSON() { + CreateViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBucketsRequest; + return CreateViewRequest; })(); - v2.ListBucketsResponse = (function() { + v2.UpdateViewRequest = (function() { /** - * Properties of a ListBucketsResponse. + * Properties of an UpdateViewRequest. * @memberof google.logging.v2 - * @interface IListBucketsResponse - * @property {Array.|null} [buckets] ListBucketsResponse buckets - * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken + * @interface IUpdateViewRequest + * @property {string|null} [name] UpdateViewRequest name + * @property {google.logging.v2.ILogView|null} [view] UpdateViewRequest view + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateViewRequest updateMask */ /** - * Constructs a new ListBucketsResponse. + * Constructs a new UpdateViewRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListBucketsResponse. - * @implements IListBucketsResponse + * @classdesc Represents an UpdateViewRequest. + * @implements IUpdateViewRequest * @constructor - * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set */ - function ListBucketsResponse(properties) { - this.buckets = []; + function UpdateViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5614,91 +8201,101 @@ } /** - * ListBucketsResponse buckets. - * @member {Array.} buckets - * @memberof google.logging.v2.ListBucketsResponse + * UpdateViewRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateViewRequest * @instance */ - ListBucketsResponse.prototype.buckets = $util.emptyArray; + UpdateViewRequest.prototype.name = ""; /** - * ListBucketsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListBucketsResponse + * UpdateViewRequest view. + * @member {google.logging.v2.ILogView|null|undefined} view + * @memberof google.logging.v2.UpdateViewRequest * @instance */ - ListBucketsResponse.prototype.nextPageToken = ""; + UpdateViewRequest.prototype.view = null; /** - * Creates a new ListBucketsResponse instance using the specified properties. + * UpdateViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateViewRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @static - * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance + * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest instance */ - ListBucketsResponse.create = function create(properties) { - return new ListBucketsResponse(properties); + UpdateViewRequest.create = function create(properties) { + return new UpdateViewRequest(properties); }; /** - * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @static - * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsResponse.encode = function encode(message, writer) { + UpdateViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.buckets != null && message.buckets.length) - for (var i = 0; i < message.buckets.length; ++i) - $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @static - * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBucketsResponse message from the specified reader or buffer. + * Decodes an UpdateViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsResponse.decode = function decode(reader, length) { + UpdateViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.buckets && message.buckets.length)) - message.buckets = []; - message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); + message.name = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5709,135 +8306,134 @@ }; /** - * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBucketsResponse message. + * Verifies an UpdateViewRequest message. * @function verify - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBucketsResponse.verify = function verify(message) { + UpdateViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.buckets != null && message.hasOwnProperty("buckets")) { - if (!Array.isArray(message.buckets)) - return "buckets: array expected"; - for (var i = 0; i < message.buckets.length; ++i) { - var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); - if (error) - return "buckets." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.logging.v2.LogView.verify(message.view); + if (error) + return "view." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest */ - ListBucketsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListBucketsResponse) + UpdateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateViewRequest) return object; - var message = new $root.google.logging.v2.ListBucketsResponse(); - if (object.buckets) { - if (!Array.isArray(object.buckets)) - throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); - message.buckets = []; - for (var i = 0; i < object.buckets.length; ++i) { - if (typeof object.buckets[i] !== "object") - throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); - message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); - } + var message = new $root.google.logging.v2.UpdateViewRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.logging.v2.UpdateViewRequest.view: object expected"); + message.view = $root.google.logging.v2.LogView.fromObject(object.view); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @static - * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse + * @param {google.logging.v2.UpdateViewRequest} message UpdateViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBucketsResponse.toObject = function toObject(message, options) { + UpdateViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.buckets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.buckets && message.buckets.length) { - object.buckets = []; - for (var j = 0; j < message.buckets.length; ++j) - object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); + if (options.defaults) { + object.name = ""; + object.view = null; + object.updateMask = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.logging.v2.LogView.toObject(message.view, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListBucketsResponse to JSON. + * Converts this UpdateViewRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.UpdateViewRequest * @instance * @returns {Object.} JSON object */ - ListBucketsResponse.prototype.toJSON = function toJSON() { + UpdateViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBucketsResponse; + return UpdateViewRequest; })(); - v2.UpdateBucketRequest = (function() { + v2.GetViewRequest = (function() { /** - * Properties of an UpdateBucketRequest. + * Properties of a GetViewRequest. * @memberof google.logging.v2 - * @interface IUpdateBucketRequest - * @property {string|null} [name] UpdateBucketRequest name - * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask + * @interface IGetViewRequest + * @property {string|null} [name] GetViewRequest name */ /** - * Constructs a new UpdateBucketRequest. + * Constructs a new GetViewRequest. * @memberof google.logging.v2 - * @classdesc Represents an UpdateBucketRequest. - * @implements IUpdateBucketRequest + * @classdesc Represents a GetViewRequest. + * @implements IGetViewRequest * @constructor - * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set */ - function UpdateBucketRequest(properties) { + function GetViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5845,102 +8441,76 @@ } /** - * UpdateBucketRequest name. + * GetViewRequest name. * @member {string} name - * @memberof google.logging.v2.UpdateBucketRequest - * @instance - */ - UpdateBucketRequest.prototype.name = ""; - - /** - * UpdateBucketRequest bucket. - * @member {google.logging.v2.ILogBucket|null|undefined} bucket - * @memberof google.logging.v2.UpdateBucketRequest - * @instance - */ - UpdateBucketRequest.prototype.bucket = null; - - /** - * UpdateBucketRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @instance */ - UpdateBucketRequest.prototype.updateMask = null; + GetViewRequest.prototype.name = ""; /** - * Creates a new UpdateBucketRequest instance using the specified properties. + * Creates a new GetViewRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @static - * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance + * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetViewRequest} GetViewRequest instance */ - UpdateBucketRequest.create = function create(properties) { - return new UpdateBucketRequest(properties); + GetViewRequest.create = function create(properties) { + return new GetViewRequest(properties); }; /** - * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @static - * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBucketRequest.encode = function encode(message, writer) { + GetViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @static - * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer. + * Decodes a GetViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.GetViewRequest} GetViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBucketRequest.decode = function decode(reader, length) { + GetViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -5950,134 +8520,107 @@ }; /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.GetViewRequest} GetViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { + GetViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateBucketRequest message. + * Verifies a GetViewRequest message. * @function verify - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateBucketRequest.verify = function verify(message) { + GetViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) { - var error = $root.google.logging.v2.LogBucket.verify(message.bucket); - if (error) - return "bucket." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } return null; }; /** - * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.GetViewRequest} GetViewRequest */ - UpdateBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateBucketRequest) + GetViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetViewRequest) return object; - var message = new $root.google.logging.v2.UpdateBucketRequest(); + var message = new $root.google.logging.v2.GetViewRequest(); if (object.name != null) message.name = String(object.name); - if (object.bucket != null) { - if (typeof object.bucket !== "object") - throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); - message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } return message; }; /** - * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @static - * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest + * @param {google.logging.v2.GetViewRequest} message GetViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateBucketRequest.toObject = function toObject(message, options) { + GetViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.bucket = null; - object.updateMask = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateBucketRequest to JSON. + * Converts this GetViewRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.GetViewRequest * @instance * @returns {Object.} JSON object */ - UpdateBucketRequest.prototype.toJSON = function toJSON() { + GetViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateBucketRequest; + return GetViewRequest; })(); - v2.GetBucketRequest = (function() { + v2.DeleteViewRequest = (function() { /** - * Properties of a GetBucketRequest. + * Properties of a DeleteViewRequest. * @memberof google.logging.v2 - * @interface IGetBucketRequest - * @property {string|null} [name] GetBucketRequest name + * @interface IDeleteViewRequest + * @property {string|null} [name] DeleteViewRequest name */ /** - * Constructs a new GetBucketRequest. + * Constructs a new DeleteViewRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetBucketRequest. - * @implements IGetBucketRequest + * @classdesc Represents a DeleteViewRequest. + * @implements IDeleteViewRequest * @constructor - * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set */ - function GetBucketRequest(properties) { + function DeleteViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6085,35 +8628,35 @@ } /** - * GetBucketRequest name. + * DeleteViewRequest name. * @member {string} name - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @instance */ - GetBucketRequest.prototype.name = ""; + DeleteViewRequest.prototype.name = ""; /** - * Creates a new GetBucketRequest instance using the specified properties. + * Creates a new DeleteViewRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @static - * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance + * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest instance */ - GetBucketRequest.create = function create(properties) { - return new GetBucketRequest(properties); + DeleteViewRequest.create = function create(properties) { + return new DeleteViewRequest(properties); }; /** - * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @static - * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBucketRequest.encode = function encode(message, writer) { + DeleteViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -6122,33 +8665,33 @@ }; /** - * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @static - * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBucketRequest message from the specified reader or buffer. + * Decodes a DeleteViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBucketRequest.decode = function decode(reader, length) { + DeleteViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6164,30 +8707,30 @@ }; /** - * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBucketRequest message. + * Verifies a DeleteViewRequest message. * @function verify - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBucketRequest.verify = function verify(message) { + DeleteViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -6197,32 +8740,32 @@ }; /** - * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest */ - GetBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetBucketRequest) + DeleteViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteViewRequest) return object; - var message = new $root.google.logging.v2.GetBucketRequest(); + var message = new $root.google.logging.v2.DeleteViewRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @static - * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest + * @param {google.logging.v2.DeleteViewRequest} message DeleteViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBucketRequest.toObject = function toObject(message, options) { + DeleteViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -6234,17 +8777,17 @@ }; /** - * Converts this GetBucketRequest to JSON. + * Converts this DeleteViewRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.DeleteViewRequest * @instance * @returns {Object.} JSON object */ - GetBucketRequest.prototype.toJSON = function toJSON() { + DeleteViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetBucketRequest; + return DeleteViewRequest; })(); v2.ListSinksRequest = (function() { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index fb60a882eda..e81cee95c1e 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -210,7 +210,31 @@ "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}", "(google.api.method_signature)": "log_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{log_name=projects/*/logs/*}", + "additional_bindings": [ + { + "delete": "/v2/{log_name=*/*/logs/*}" + }, + { + "delete": "/v2/{log_name=organizations/*/logs/*}" + }, + { + "delete": "/v2/{log_name=folders/*/logs/*}" + }, + { + "delete": "/v2/{log_name=billingAccounts/*/logs/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "log_name" + } + ] }, "WriteLogEntries": { "requestType": "WriteLogEntriesRequest", @@ -219,7 +243,18 @@ "(google.api.http).post": "/v2/entries:write", "(google.api.http).body": "*", "(google.api.method_signature)": "log_name,resource,labels,entries" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:write", + "body": "*" + } + }, + { + "(google.api.method_signature)": "log_name,resource,labels,entries" + } + ] }, "ListLogEntries": { "requestType": "ListLogEntriesRequest", @@ -228,14 +263,32 @@ "(google.api.http).post": "/v2/entries:list", "(google.api.http).body": "*", "(google.api.method_signature)": "resource_names,filter,order_by" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:list", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource_names,filter,order_by" + } + ] }, "ListMonitoredResourceDescriptors": { "requestType": "ListMonitoredResourceDescriptorsRequest", "responseType": "ListMonitoredResourceDescriptorsResponse", "options": { "(google.api.http).get": "/v2/monitoredResourceDescriptors" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/monitoredResourceDescriptors" + } + } + ] }, "ListLogs": { "requestType": "ListLogsRequest", @@ -244,7 +297,31 @@ "(google.api.http).get": "/v2/{parent=*/*}/logs", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*}/logs", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/logs" + }, + { + "get": "/v2/{parent=organizations/*}/logs" + }, + { + "get": "/v2/{parent=folders/*}/logs" + }, + { + "get": "/v2/{parent=billingAccounts/*}/logs" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, @@ -458,7 +535,31 @@ "(google.api.http).get": "/v2/{parent=*/*/locations/*}/buckets", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*}/buckets", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*/locations/*}/buckets", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=organizations/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=folders/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=billingAccounts/*/locations/*}/buckets" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetBucket": { "requestType": "GetBucketRequest", @@ -466,7 +567,64 @@ "options": { "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/locations/*/buckets/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=organizations/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=folders/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/buckets/*}" + } + ] + } + } + ] + }, + "CreateBucket": { + "requestType": "CreateBucketRequest", + "responseType": "LogBucket", + "options": { + "(google.api.http).post": "/v2/{parent=*/*/locations/*}/buckets", + "(google.api.http).body": "bucket", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", + "(google.api.http).additional_bindings.body": "bucket" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*/locations/*}/buckets", + "body": "bucket", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=organizations/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=folders/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", + "body": "bucket" + } + ] + } + } + ] }, "UpdateBucket": { "requestType": "UpdateBucketRequest", @@ -476,7 +634,261 @@ "(google.api.http).body": "bucket", "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", "(google.api.http).additional_bindings.body": "bucket" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/locations/*/buckets/*}", + "body": "bucket", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=organizations/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=folders/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", + "body": "bucket" + } + ] + } + } + ] + }, + "DeleteBucket": { + "requestType": "DeleteBucketRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/locations/*/buckets/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=organizations/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=folders/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + } + ] + } + } + ] + }, + "UndeleteBucket": { + "requestType": "UndeleteBucketRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v2/{name=*/*/locations/*/buckets/*}:undelete", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=*/*/locations/*/buckets/*}:undelete", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{name=projects/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=organizations/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=folders/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", + "body": "*" + } + ] + } + } + ] + }, + "ListViews": { + "requestType": "ListViewsRequest", + "responseType": "ListViewsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=organizations/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=folders/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetView": { + "requestType": "GetViewRequest", + "responseType": "LogView", + "options": { + "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" + } + ] + } + } + ] + }, + "CreateView": { + "requestType": "CreateViewRequest", + "responseType": "LogView", + "options": { + "(google.api.http).post": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "(google.api.http).body": "view", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", + "(google.api.http).additional_bindings.body": "view" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "body": "view", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=organizations/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=folders/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", + "body": "view" + } + ] + } + } + ] + }, + "UpdateView": { + "requestType": "UpdateViewRequest", + "responseType": "LogView", + "options": { + "(google.api.http).patch": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "(google.api.http).body": "view", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", + "(google.api.http).additional_bindings.body": "view" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "body": "view", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=folders/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", + "body": "view" + } + ] + } + } + ] + }, + "DeleteView": { + "requestType": "DeleteViewRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + } + ] + } + } + ] }, "ListSinks": { "requestType": "ListSinksRequest", @@ -485,7 +897,31 @@ "(google.api.http).get": "/v2/{parent=*/*}/sinks", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*}/sinks", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/sinks" + }, + { + "get": "/v2/{parent=organizations/*}/sinks" + }, + { + "get": "/v2/{parent=folders/*}/sinks" + }, + { + "get": "/v2/{parent=billingAccounts/*}/sinks" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetSink": { "requestType": "GetSinkRequest", @@ -494,7 +930,31 @@ "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{sink_name=*/*/sinks/*}", + "additional_bindings": [ + { + "get": "/v2/{sink_name=projects/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=organizations/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=folders/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "sink_name" + } + ] }, "CreateSink": { "requestType": "CreateSinkRequest", @@ -505,7 +965,36 @@ "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", "(google.api.http).additional_bindings.body": "sink", "(google.api.method_signature)": "parent,sink" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*}/sinks", + "body": "sink", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=organizations/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=folders/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=billingAccounts/*}/sinks", + "body": "sink" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,sink" + } + ] }, "UpdateSink": { "requestType": "UpdateSinkRequest", @@ -517,7 +1006,55 @@ "(google.api.http).additional_bindings.body": "sink", "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name,sink" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{sink_name=*/*/sinks/*}", + "body": "sink", + "additional_bindings": [ + { + "put": "/v2/{sink_name=projects/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=organizations/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=folders/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=projects/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=organizations/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=folders/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "body": "sink" + } + ] + } + }, + { + "(google.api.method_signature)": "sink_name,sink,update_mask" + }, + { + "(google.api.method_signature)": "sink_name,sink" + } + ] }, "DeleteSink": { "requestType": "DeleteSinkRequest", @@ -526,7 +1063,31 @@ "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{sink_name=*/*/sinks/*}", + "additional_bindings": [ + { + "delete": "/v2/{sink_name=projects/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=organizations/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=folders/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "sink_name" + } + ] }, "ListExclusions": { "requestType": "ListExclusionsRequest", @@ -535,7 +1096,31 @@ "(google.api.http).get": "/v2/{parent=*/*}/exclusions", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*}/exclusions", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/exclusions" + }, + { + "get": "/v2/{parent=organizations/*}/exclusions" + }, + { + "get": "/v2/{parent=folders/*}/exclusions" + }, + { + "get": "/v2/{parent=billingAccounts/*}/exclusions" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetExclusion": { "requestType": "GetExclusionRequest", @@ -544,7 +1129,31 @@ "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/exclusions/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/exclusions/*}" + }, + { + "get": "/v2/{name=organizations/*/exclusions/*}" + }, + { + "get": "/v2/{name=folders/*/exclusions/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/exclusions/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateExclusion": { "requestType": "CreateExclusionRequest", @@ -555,7 +1164,36 @@ "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", "(google.api.http).additional_bindings.body": "exclusion", "(google.api.method_signature)": "parent,exclusion" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*}/exclusions", + "body": "exclusion", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=organizations/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=folders/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=billingAccounts/*}/exclusions", + "body": "exclusion" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,exclusion" + } + ] }, "UpdateExclusion": { "requestType": "UpdateExclusionRequest", @@ -566,7 +1204,36 @@ "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.http).additional_bindings.body": "exclusion", "(google.api.method_signature)": "name,exclusion,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/exclusions/*}", + "body": "exclusion", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=organizations/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=folders/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "body": "exclusion" + } + ] + } + }, + { + "(google.api.method_signature)": "name,exclusion,update_mask" + } + ] }, "DeleteExclusion": { "requestType": "DeleteExclusionRequest", @@ -575,7 +1242,31 @@ "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/exclusions/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/exclusions/*}" + }, + { + "delete": "/v2/{name=organizations/*/exclusions/*}" + }, + { + "delete": "/v2/{name=folders/*/exclusions/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/exclusions/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetCmekSettings": { "requestType": "GetCmekSettingsRequest", @@ -583,7 +1274,17 @@ "options": { "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*}/cmekSettings", + "additional_bindings": { + "get": "/v2/{name=organizations/*}/cmekSettings" + } + } + } + ] }, "UpdateCmekSettings": { "requestType": "UpdateCmekSettingsRequest", @@ -593,7 +1294,19 @@ "(google.api.http).body": "cmek_settings", "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*}/cmekSettings", "(google.api.http).additional_bindings.body": "cmek_settings" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*}/cmekSettings", + "body": "cmek_settings", + "additional_bindings": { + "patch": "/v2/{name=organizations/*}/cmekSettings", + "body": "cmek_settings" + } + } + } + ] } } }, @@ -629,6 +1342,10 @@ "type": "int32", "id": 11 }, + "locked": { + "type": "bool", + "id": 9 + }, "lifecycleState": { "type": "LifecycleState", "id": 12, @@ -638,6 +1355,47 @@ } } }, + "LifecycleState": { + "values": { + "LIFECYCLE_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "DELETE_REQUESTED": 2 + } + }, + "LogView": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/LogView", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "filter": { + "type": "string", + "id": 7 + } + } + }, "LogSink": { "options": { "(google.api.resource).type": "logging.googleapis.com/LogSink", @@ -687,6 +1445,14 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "outputVersionFormat": { "type": "VersionFormat", "id": 6, @@ -758,13 +1524,6 @@ } } }, - "LifecycleState": { - "values": { - "LIFECYCLE_STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DELETE_REQUESTED": 2 - } - }, "ListBucketsRequest": { "fields": { "parent": { @@ -804,6 +1563,32 @@ } } }, + "CreateBucketRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogBucket" + } + }, + "bucketId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "bucket": { + "type": "LogBucket", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "UpdateBucketRequest": { "fields": { "name": { @@ -842,6 +1627,142 @@ } } }, + "DeleteBucketRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } + } + } + }, + "UndeleteBucketRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } + } + } + }, + "ListViewsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListViewsResponse": { + "fields": { + "views": { + "rule": "repeated", + "type": "LogView", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateViewRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "viewId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "view": { + "type": "LogView", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "view": { + "type": "LogView", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogView" + } + } + } + }, + "DeleteViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogView" + } + } + } + }, "ListSinksRequest": { "fields": { "parent": { @@ -1197,7 +2118,17 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*}/metrics", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*}/metrics" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetLogMetric": { "requestType": "GetLogMetricRequest", @@ -1205,7 +2136,17 @@ "options": { "(google.api.http).get": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.method_signature)": "metric_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{metric_name=projects/*/metrics/*}" + } + }, + { + "(google.api.method_signature)": "metric_name" + } + ] }, "CreateLogMetric": { "requestType": "CreateLogMetricRequest", @@ -1214,7 +2155,18 @@ "(google.api.http).post": "/v2/{parent=projects/*}/metrics", "(google.api.http).body": "metric", "(google.api.method_signature)": "parent,metric" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/metrics", + "body": "metric" + } + }, + { + "(google.api.method_signature)": "parent,metric" + } + ] }, "UpdateLogMetric": { "requestType": "UpdateLogMetricRequest", @@ -1223,7 +2175,18 @@ "(google.api.http).put": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.http).body": "metric", "(google.api.method_signature)": "metric_name,metric" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{metric_name=projects/*/metrics/*}", + "body": "metric" + } + }, + { + "(google.api.method_signature)": "metric_name,metric" + } + ] }, "DeleteLogMetric": { "requestType": "DeleteLogMetricRequest", @@ -1231,7 +2194,17 @@ "options": { "(google.api.http).delete": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.method_signature)": "metric_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{metric_name=projects/*/metrics/*}" + } + }, + { + "(google.api.method_signature)": "metric_name" + } + ] } } }, diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index d6a62da46d6..0819bf78eff 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v2/config_service_v2_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './config_service_v2_client_config.json'; const version = require('../../../package.json').version; @@ -83,9 +89,9 @@ export class ConfigServiceV2Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -98,7 +104,9 @@ export class ConfigServiceV2Client { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -167,6 +175,9 @@ export class ConfigServiceV2Client { billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' ), + billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), @@ -182,6 +193,9 @@ export class ConfigServiceV2Client { folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}' ), + folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' + ), folderLogPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/logs/{log}' ), @@ -203,6 +217,9 @@ export class ConfigServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), + organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), @@ -221,6 +238,9 @@ export class ConfigServiceV2Client { projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}' ), + projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' + ), projectLogPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/logs/{log}' ), @@ -238,6 +258,11 @@ export class ConfigServiceV2Client { 'nextPageToken', 'buckets' ), + listViews: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'views' + ), listSinks: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -298,7 +323,15 @@ export class ConfigServiceV2Client { const configServiceV2StubMethods = [ 'listBuckets', 'getBucket', + 'createBucket', 'updateBucket', + 'deleteBucket', + 'undeleteBucket', + 'listViews', + 'getView', + 'createView', + 'updateView', + 'deleteView', 'listSinks', 'getSink', 'createSink', @@ -399,7 +432,7 @@ export class ConfigServiceV2Client { // ------------------- getBucket( request: protos.google.logging.v2.IGetBucketRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogBucket, @@ -409,7 +442,7 @@ export class ConfigServiceV2Client { >; getBucket( request: protos.google.logging.v2.IGetBucketRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IGetBucketRequest | null | undefined, @@ -425,7 +458,7 @@ export class ConfigServiceV2Client { > ): void; /** - * Gets a bucket (Beta). + * Gets a bucket. * * @param {Object} request * The request object that will be sent. @@ -452,7 +485,7 @@ export class ConfigServiceV2Client { getBucket( request: protos.google.logging.v2.IGetBucketRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IGetBucketRequest | null | undefined, @@ -471,12 +504,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -489,9 +522,106 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.getBucket(request, options, callback); } + createBucket( + request: protos.google.logging.v2.ICreateBucketRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | undefined, + {} | undefined + ] + >; + createBucket( + request: protos.google.logging.v2.ICreateBucketRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + createBucket( + request: protos.google.logging.v2.ICreateBucketRequest, + callback: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a bucket that can be used to store log entries. Once a bucket has + * been created, the region cannot be changed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource in which to create the bucket: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * + * Example: `"projects/my-logging-project/locations/global"` + * @param {string} request.bucketId + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are + * limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * @param {google.logging.v2.LogBucket} request.bucket + * Required. The new bucket. The region specified in the new bucket must be compliant + * with any Location Restriction Org Policy. The name field in the bucket is + * ignored. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createBucket(request); + */ + createBucket( + request: protos.google.logging.v2.ICreateBucketRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createBucket(request, options, callback); + } updateBucket( request: protos.google.logging.v2.IUpdateBucketRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogBucket, @@ -501,7 +631,7 @@ export class ConfigServiceV2Client { >; updateBucket( request: protos.google.logging.v2.IUpdateBucketRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IUpdateBucketRequest | null | undefined, @@ -527,71 +657,631 @@ export class ConfigServiceV2Client { * will be returned. * * A buckets region may not be modified after it is created. - * This method is in Beta. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The full resource name of the bucket to update. + * Required. The full resource name of the bucket to update. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + * requires permission "resourcemanager.projects.updateLiens" to set the + * locked property + * @param {google.logging.v2.LogBucket} request.bucket + * Required. The updated bucket. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask that specifies the fields in `bucket` that need an update. A + * bucket field will be overwritten if, and only if, it is in the update + * mask. `name` and output only fields cannot be updated. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * + * Example: `updateMask=retention_days`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateBucket(request); + */ + updateBucket( + request: protos.google.logging.v2.IUpdateBucketRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateBucket(request, options, callback); + } + deleteBucket( + request: protos.google.logging.v2.IDeleteBucketRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteBucketRequest | undefined, + {} | undefined + ] + >; + deleteBucket( + request: protos.google.logging.v2.IDeleteBucketRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteBucket( + request: protos.google.logging.v2.IDeleteBucketRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a bucket. + * Moves the bucket to the DELETE_REQUESTED state. After 7 days, the + * bucket will be purged and all logs in the bucket will be permanently + * deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the bucket to delete. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteBucket(request); + */ + deleteBucket( + request: protos.google.logging.v2.IDeleteBucketRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteBucketRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteBucketRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteBucketRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteBucket(request, options, callback); + } + undeleteBucket( + request: protos.google.logging.v2.IUndeleteBucketRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IUndeleteBucketRequest | undefined, + {} | undefined + ] + >; + undeleteBucket( + request: protos.google.logging.v2.IUndeleteBucketRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IUndeleteBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + undeleteBucket( + request: protos.google.logging.v2.IUndeleteBucketRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IUndeleteBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Undeletes a bucket. A bucket that has been deleted may be undeleted within + * the grace period of 7 days. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the bucket to undelete. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.undeleteBucket(request); + */ + undeleteBucket( + request: protos.google.logging.v2.IUndeleteBucketRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IUndeleteBucketRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IUndeleteBucketRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IUndeleteBucketRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.undeleteBucket(request, options, callback); + } + getView( + request: protos.google.logging.v2.IGetViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | undefined, + {} | undefined + ] + >; + getView( + request: protos.google.logging.v2.IGetViewRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | null | undefined, + {} | null | undefined + > + ): void; + getView( + request: protos.google.logging.v2.IGetViewRequest, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets a view. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the policy: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getView(request); + */ + getView( + request: protos.google.logging.v2.IGetViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getView(request, options, callback); + } + createView( + request: protos.google.logging.v2.ICreateViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogView, + protos.google.logging.v2.ICreateViewRequest | undefined, + {} | undefined + ] + >; + createView( + request: protos.google.logging.v2.ICreateViewRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.ICreateViewRequest | null | undefined, + {} | null | undefined + > + ): void; + createView( + request: protos.google.logging.v2.ICreateViewRequest, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.ICreateViewRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a view over logs in a bucket. A bucket may contain a maximum of + * 50 views. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The bucket in which to create the view + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` + * @param {string} request.viewId + * Required. The id to use for this view. + * @param {google.logging.v2.LogView} request.view + * Required. The new view. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createView(request); + */ + createView( + request: protos.google.logging.v2.ICreateViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.ICreateViewRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.ICreateViewRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.logging.v2.ILogView, + protos.google.logging.v2.ICreateViewRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createView(request, options, callback); + } + updateView( + request: protos.google.logging.v2.IUpdateViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | undefined, + {} | undefined + ] + >; + updateView( + request: protos.google.logging.v2.IUpdateViewRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | null | undefined, + {} | null | undefined + > + ): void; + updateView( + request: protos.google.logging.v2.IUpdateViewRequest, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Updates a view. This method replaces the following fields in the existing + * view with values from the new view: `filter`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the view to update + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * @param {google.logging.v2.LogView} request.view + * Required. The updated view. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask that specifies the fields in `view` that need + * an update. A field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * + * Example: `updateMask=filter`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateView(request); + */ + updateView( + request: protos.google.logging.v2.IUpdateViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateView(request, options, callback); + } + deleteView( + request: protos.google.logging.v2.IDeleteViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteViewRequest | undefined, + {} | undefined + ] + >; + deleteView( + request: protos.google.logging.v2.IDeleteViewRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteViewRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteView( + request: protos.google.logging.v2.IDeleteViewRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteViewRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a view from a bucket. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the view to delete: * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" * * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also - * requires permission "resourcemanager.projects.updateLiens" to set the - * locked property - * @param {google.logging.v2.LogBucket} request.bucket - * Required. The updated bucket. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask that specifies the fields in `bucket` that need an update. A - * bucket field will be overwritten if, and only if, it is in the update - * mask. `name` and output only fields cannot be updated. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * Example: `updateMask=retention_days`. + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example - * const [response] = await client.updateBucket(request); + * const [response] = await client.deleteView(request); */ - updateBucket( - request: protos.google.logging.v2.IUpdateBucketRequest, + deleteView( + request: protos.google.logging.v2.IDeleteViewRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteViewRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteViewRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.IUpdateBucketRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteViewRequest | undefined, {} | undefined ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -602,11 +1292,11 @@ export class ConfigServiceV2Client { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.updateBucket(request, options, callback); + return this.innerApiCalls.deleteView(request, options, callback); } getSink( request: protos.google.logging.v2.IGetSinkRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogSink, @@ -616,7 +1306,7 @@ export class ConfigServiceV2Client { >; getSink( request: protos.google.logging.v2.IGetSinkRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogSink, protos.google.logging.v2.IGetSinkRequest | null | undefined, @@ -658,7 +1348,7 @@ export class ConfigServiceV2Client { getSink( request: protos.google.logging.v2.IGetSinkRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogSink, protos.google.logging.v2.IGetSinkRequest | null | undefined, @@ -677,12 +1367,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -697,7 +1387,7 @@ export class ConfigServiceV2Client { } createSink( request: protos.google.logging.v2.ICreateSinkRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogSink, @@ -707,7 +1397,7 @@ export class ConfigServiceV2Client { >; createSink( request: protos.google.logging.v2.ICreateSinkRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogSink, protos.google.logging.v2.ICreateSinkRequest | null | undefined, @@ -767,7 +1457,7 @@ export class ConfigServiceV2Client { createSink( request: protos.google.logging.v2.ICreateSinkRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogSink, protos.google.logging.v2.ICreateSinkRequest | null | undefined, @@ -786,12 +1476,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -806,7 +1496,7 @@ export class ConfigServiceV2Client { } updateSink( request: protos.google.logging.v2.IUpdateSinkRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogSink, @@ -816,7 +1506,7 @@ export class ConfigServiceV2Client { >; updateSink( request: protos.google.logging.v2.IUpdateSinkRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogSink, protos.google.logging.v2.IUpdateSinkRequest | null | undefined, @@ -893,7 +1583,7 @@ export class ConfigServiceV2Client { updateSink( request: protos.google.logging.v2.IUpdateSinkRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogSink, protos.google.logging.v2.IUpdateSinkRequest | null | undefined, @@ -912,12 +1602,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -932,7 +1622,7 @@ export class ConfigServiceV2Client { } deleteSink( request: protos.google.logging.v2.IDeleteSinkRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -942,7 +1632,7 @@ export class ConfigServiceV2Client { >; deleteSink( request: protos.google.logging.v2.IDeleteSinkRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteSinkRequest | null | undefined, @@ -986,7 +1676,7 @@ export class ConfigServiceV2Client { deleteSink( request: protos.google.logging.v2.IDeleteSinkRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteSinkRequest | null | undefined, @@ -1005,12 +1695,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1025,7 +1715,7 @@ export class ConfigServiceV2Client { } getExclusion( request: protos.google.logging.v2.IGetExclusionRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -1035,7 +1725,7 @@ export class ConfigServiceV2Client { >; getExclusion( request: protos.google.logging.v2.IGetExclusionRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IGetExclusionRequest | null | undefined, @@ -1077,7 +1767,7 @@ export class ConfigServiceV2Client { getExclusion( request: protos.google.logging.v2.IGetExclusionRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IGetExclusionRequest | null | undefined, @@ -1096,12 +1786,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1116,7 +1806,7 @@ export class ConfigServiceV2Client { } createExclusion( request: protos.google.logging.v2.ICreateExclusionRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -1126,7 +1816,7 @@ export class ConfigServiceV2Client { >; createExclusion( request: protos.google.logging.v2.ICreateExclusionRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.ICreateExclusionRequest | null | undefined, @@ -1173,7 +1863,7 @@ export class ConfigServiceV2Client { createExclusion( request: protos.google.logging.v2.ICreateExclusionRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.ICreateExclusionRequest | null | undefined, @@ -1192,12 +1882,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1212,7 +1902,7 @@ export class ConfigServiceV2Client { } updateExclusion( request: protos.google.logging.v2.IUpdateExclusionRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -1222,7 +1912,7 @@ export class ConfigServiceV2Client { >; updateExclusion( request: protos.google.logging.v2.IUpdateExclusionRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, @@ -1275,7 +1965,7 @@ export class ConfigServiceV2Client { updateExclusion( request: protos.google.logging.v2.IUpdateExclusionRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, @@ -1294,12 +1984,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1314,7 +2004,7 @@ export class ConfigServiceV2Client { } deleteExclusion( request: protos.google.logging.v2.IDeleteExclusionRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -1324,7 +2014,7 @@ export class ConfigServiceV2Client { >; deleteExclusion( request: protos.google.logging.v2.IDeleteExclusionRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, @@ -1366,7 +2056,7 @@ export class ConfigServiceV2Client { deleteExclusion( request: protos.google.logging.v2.IDeleteExclusionRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, @@ -1385,12 +2075,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1405,7 +2095,7 @@ export class ConfigServiceV2Client { } getCmekSettings( request: protos.google.logging.v2.IGetCmekSettingsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ICmekSettings, @@ -1415,7 +2105,7 @@ export class ConfigServiceV2Client { >; getCmekSettings( request: protos.google.logging.v2.IGetCmekSettingsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, @@ -1469,7 +2159,7 @@ export class ConfigServiceV2Client { getCmekSettings( request: protos.google.logging.v2.IGetCmekSettingsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, @@ -1488,12 +2178,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1508,7 +2198,7 @@ export class ConfigServiceV2Client { } updateCmekSettings( request: protos.google.logging.v2.IUpdateCmekSettingsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ICmekSettings, @@ -1518,7 +2208,7 @@ export class ConfigServiceV2Client { >; updateCmekSettings( request: protos.google.logging.v2.IUpdateCmekSettingsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, @@ -1592,7 +2282,7 @@ export class ConfigServiceV2Client { updateCmekSettings( request: protos.google.logging.v2.IUpdateCmekSettingsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ICmekSettings, | protos.google.logging.v2.IUpdateCmekSettingsRequest @@ -1613,12 +2303,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1631,50 +2321,271 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.updateCmekSettings(request, options, callback); } - - listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, - options?: gax.CallOptions + + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogBucket[], + protos.google.logging.v2.IListBucketsRequest | null, + protos.google.logging.v2.IListBucketsResponse + ] + >; + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): void; + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): void; + /** + * Lists buckets. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LogBucket]{@link google.logging.v2.LogBucket}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBucketsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + >, + callback?: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): Promise< + [ + protos.google.logging.v2.ILogBucket[], + protos.google.logging.v2.IListBucketsRequest | null, + protos.google.logging.v2.IListBucketsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listBuckets(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBucketsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listBucketsStream( + request?: protos.google.logging.v2.IListBucketsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listBuckets.createStream( + this.innerApiCalls.listBuckets as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listBuckets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [LogBucket]{@link google.logging.v2.LogBucket}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listBucketsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listBucketsAsync( + request?: protos.google.logging.v2.IListBucketsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listBuckets.asyncIterate( + this.innerApiCalls['listBuckets'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listViews( + request: protos.google.logging.v2.IListViewsRequest, + options?: CallOptions ): Promise< [ - protos.google.logging.v2.ILogBucket[], - protos.google.logging.v2.IListBucketsRequest | null, - protos.google.logging.v2.IListBucketsResponse + protos.google.logging.v2.ILogView[], + protos.google.logging.v2.IListViewsRequest | null, + protos.google.logging.v2.IListViewsResponse ] >; - listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, - options: gax.CallOptions, + listViews( + request: protos.google.logging.v2.IListViewsRequest, + options: CallOptions, callback: PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket + protos.google.logging.v2.IListViewsRequest, + protos.google.logging.v2.IListViewsResponse | null | undefined, + protos.google.logging.v2.ILogView > ): void; - listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, + listViews( + request: protos.google.logging.v2.IListViewsRequest, callback: PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket + protos.google.logging.v2.IListViewsRequest, + protos.google.logging.v2.IListViewsResponse | null | undefined, + protos.google.logging.v2.ILogView > ): void; /** - * Lists buckets (Beta). + * Lists views on a bucket. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * Required. The bucket whose views are to be listed: * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `pageToken` must be the value of @@ -1687,44 +2598,44 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogBucket]{@link google.logging.v2.LogBucket}. + * The first element of the array is Array of [LogView]{@link google.logging.v2.LogView}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listBucketsAsync()` + * We recommend using `listViewsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, + listViews( + request: protos.google.logging.v2.IListViewsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket + protos.google.logging.v2.IListViewsRequest, + protos.google.logging.v2.IListViewsResponse | null | undefined, + protos.google.logging.v2.ILogView >, callback?: PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket + protos.google.logging.v2.IListViewsRequest, + protos.google.logging.v2.IListViewsResponse | null | undefined, + protos.google.logging.v2.ILogView > ): Promise< [ - protos.google.logging.v2.ILogBucket[], - protos.google.logging.v2.IListBucketsRequest | null, - protos.google.logging.v2.IListBucketsResponse + protos.google.logging.v2.ILogView[], + protos.google.logging.v2.IListViewsRequest | null, + protos.google.logging.v2.IListViewsResponse ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1735,7 +2646,7 @@ export class ConfigServiceV2Client { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listBuckets(request, options, callback); + return this.innerApiCalls.listViews(request, options, callback); } /** @@ -1743,16 +2654,9 @@ export class ConfigServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * Required. The bucket whose views are to be listed: * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `pageToken` must be the value of @@ -1765,18 +2669,18 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event. + * An object stream which emits an object representing [LogView]{@link google.logging.v2.LogView} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listBucketsAsync()` + * We recommend using `listViewsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listBucketsStream( - request?: protos.google.logging.v2.IListBucketsRequest, - options?: gax.CallOptions + listViewsStream( + request?: protos.google.logging.v2.IListViewsRequest, + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1789,30 +2693,23 @@ export class ConfigServiceV2Client { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this.descriptors.page.listBuckets.createStream( - this.innerApiCalls.listBuckets as gax.GaxCall, + return this.descriptors.page.listViews.createStream( + this.innerApiCalls.listViews as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listBuckets`, but returns an iterable object. + * Equivalent to `listViews`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * Required. The bucket whose views are to be listed: * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `pageToken` must be the value of @@ -1827,21 +2724,21 @@ export class ConfigServiceV2Client { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [LogBucket]{@link google.logging.v2.LogBucket}. The API will be called under the hood as needed, once per the page, + * [LogView]{@link google.logging.v2.LogView}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example - * const iterable = client.listBucketsAsync(request); + * const iterable = client.listViewsAsync(request); * for await (const response of iterable) { * // process response * } */ - listBucketsAsync( - request?: protos.google.logging.v2.IListBucketsRequest, - options?: gax.CallOptions - ): AsyncIterable { + listViewsAsync( + request?: protos.google.logging.v2.IListViewsRequest, + options?: CallOptions + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1854,15 +2751,15 @@ export class ConfigServiceV2Client { options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); - return this.descriptors.page.listBuckets.asyncIterate( - this.innerApiCalls['listBuckets'] as GaxCall, + return this.descriptors.page.listViews.asyncIterate( + this.innerApiCalls['listViews'] as GaxCall, (request as unknown) as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } listSinks( request: protos.google.logging.v2.IListSinksRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogSink[], @@ -1872,7 +2769,7 @@ export class ConfigServiceV2Client { >; listSinks( request: protos.google.logging.v2.IListSinksRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.logging.v2.IListSinksRequest, protos.google.logging.v2.IListSinksResponse | null | undefined, @@ -1924,7 +2821,7 @@ export class ConfigServiceV2Client { listSinks( request: protos.google.logging.v2.IListSinksRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.logging.v2.IListSinksRequest, protos.google.logging.v2.IListSinksResponse | null | undefined, @@ -1943,12 +2840,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1996,7 +2893,7 @@ export class ConfigServiceV2Client { */ listSinksStream( request?: protos.google.logging.v2.IListSinksRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2056,7 +2953,7 @@ export class ConfigServiceV2Client { */ listSinksAsync( request?: protos.google.logging.v2.IListSinksRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -2078,7 +2975,7 @@ export class ConfigServiceV2Client { } listExclusions( request: protos.google.logging.v2.IListExclusionsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogExclusion[], @@ -2088,7 +2985,7 @@ export class ConfigServiceV2Client { >; listExclusions( request: protos.google.logging.v2.IListExclusionsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.logging.v2.IListExclusionsRequest, protos.google.logging.v2.IListExclusionsResponse | null | undefined, @@ -2140,7 +3037,7 @@ export class ConfigServiceV2Client { listExclusions( request: protos.google.logging.v2.IListExclusionsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.logging.v2.IListExclusionsRequest, protos.google.logging.v2.IListExclusionsResponse | null | undefined, @@ -2159,12 +3056,12 @@ export class ConfigServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2212,7 +3109,7 @@ export class ConfigServiceV2Client { */ listExclusionsStream( request?: protos.google.logging.v2.IListExclusionsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2272,7 +3169,7 @@ export class ConfigServiceV2Client { */ listExclusionsAsync( request?: protos.google.logging.v2.IListExclusionsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -2432,6 +3329,91 @@ export class ConfigServiceV2Client { ).bucket; } + /** + * Return a fully-qualified billingAccountLocationBucketView resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + billingAccountLocationBucketViewPath( + billingAccount: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.render( + { + billing_account: billingAccount, + location: location, + bucket: bucket, + view: view, + } + ); + } + + /** + * Parse the billing_account from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).view; + } + /** * Return a fully-qualified billingAccountLog resource name string. * @@ -2634,6 +3616,89 @@ export class ConfigServiceV2Client { ).bucket; } + /** + * Return a fully-qualified folderLocationBucketView resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + folderLocationBucketViewPath( + folder: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, + view: view, + }); + } + + /** + * Parse the folder from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).folder; + } + + /** + * Parse the location from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).view; + } + /** * Return a fully-qualified folderLog resource name string. * @@ -2916,6 +3981,91 @@ export class ConfigServiceV2Client { ).bucket; } + /** + * Return a fully-qualified organizationLocationBucketView resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + organizationLocationBucketViewPath( + organization: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.render( + { + organization: organization, + location: location, + bucket: bucket, + view: view, + } + ); + } + + /** + * Parse the organization from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).view; + } + /** * Return a fully-qualified organizationLog resource name string. * @@ -3141,6 +4291,89 @@ export class ConfigServiceV2Client { ).bucket; } + /** + * Return a fully-qualified projectLocationBucketView resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + projectLocationBucketViewPath( + project: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.render({ + project: project, + location: location, + bucket: bucket, + view: view, + }); + } + + /** + * Parse the project from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).project; + } + + /** + * Parse the location from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).view; + } + /** * Return a fully-qualified projectLog resource name string. * diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index e0c2ddb9dd8..ca024e51035 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -33,10 +33,42 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "CreateBucket": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "UpdateBucket": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "DeleteBucket": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UndeleteBucket": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListViews": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ListSinks": { "timeout_millis": 60000, "retry_codes_name": "deadline_exceeded_internal_unavailable", diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index bdfc2b8f129..8f6919ca6fe 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v2/logging_service_v2_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './logging_service_v2_client_config.json'; const version = require('../../../package.json').version; @@ -83,9 +89,9 @@ export class LoggingServiceV2Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -98,7 +104,9 @@ export class LoggingServiceV2Client { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -167,6 +175,9 @@ export class LoggingServiceV2Client { billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' ), + billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), @@ -182,6 +193,9 @@ export class LoggingServiceV2Client { folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}' ), + folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' + ), folderLogPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/logs/{log}' ), @@ -200,6 +214,9 @@ export class LoggingServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), + organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), @@ -218,6 +235,9 @@ export class LoggingServiceV2Client { projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}' ), + projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' + ), projectLogPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/logs/{log}' ), @@ -415,7 +435,7 @@ export class LoggingServiceV2Client { // ------------------- deleteLog( request: protos.google.logging.v2.IDeleteLogRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -425,7 +445,7 @@ export class LoggingServiceV2Client { >; deleteLog( request: protos.google.logging.v2.IDeleteLogRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogRequest | null | undefined, @@ -474,7 +494,7 @@ export class LoggingServiceV2Client { deleteLog( request: protos.google.logging.v2.IDeleteLogRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogRequest | null | undefined, @@ -493,12 +513,12 @@ export class LoggingServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -513,7 +533,7 @@ export class LoggingServiceV2Client { } writeLogEntries( request: protos.google.logging.v2.IWriteLogEntriesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.IWriteLogEntriesResponse, @@ -523,7 +543,7 @@ export class LoggingServiceV2Client { >; writeLogEntries( request: protos.google.logging.v2.IWriteLogEntriesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.IWriteLogEntriesResponse, protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, @@ -629,7 +649,7 @@ export class LoggingServiceV2Client { writeLogEntries( request: protos.google.logging.v2.IWriteLogEntriesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.IWriteLogEntriesResponse, protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, @@ -648,12 +668,12 @@ export class LoggingServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -662,7 +682,7 @@ export class LoggingServiceV2Client { listLogEntries( request: protos.google.logging.v2.IListLogEntriesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogEntry[], @@ -672,7 +692,7 @@ export class LoggingServiceV2Client { >; listLogEntries( request: protos.google.logging.v2.IListLogEntriesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.logging.v2.IListLogEntriesRequest, protos.google.logging.v2.IListLogEntriesResponse | null | undefined, @@ -747,7 +767,7 @@ export class LoggingServiceV2Client { listLogEntries( request: protos.google.logging.v2.IListLogEntriesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.logging.v2.IListLogEntriesRequest, protos.google.logging.v2.IListLogEntriesResponse | null | undefined, @@ -766,12 +786,12 @@ export class LoggingServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -832,7 +852,7 @@ export class LoggingServiceV2Client { */ listLogEntriesStream( request?: protos.google.logging.v2.IListLogEntriesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -905,7 +925,7 @@ export class LoggingServiceV2Client { */ listLogEntriesAsync( request?: protos.google.logging.v2.IListLogEntriesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -920,7 +940,7 @@ export class LoggingServiceV2Client { } listMonitoredResourceDescriptors( request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.api.IMonitoredResourceDescriptor[], @@ -930,7 +950,7 @@ export class LoggingServiceV2Client { >; listMonitoredResourceDescriptors( request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, | protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse @@ -979,7 +999,7 @@ export class LoggingServiceV2Client { listMonitoredResourceDescriptors( request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, | protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse @@ -1002,12 +1022,12 @@ export class LoggingServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -1045,7 +1065,7 @@ export class LoggingServiceV2Client { */ listMonitoredResourceDescriptorsStream( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1091,7 +1111,7 @@ export class LoggingServiceV2Client { */ listMonitoredResourceDescriptorsAsync( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1106,7 +1126,7 @@ export class LoggingServiceV2Client { } listLogs( request: protos.google.logging.v2.IListLogsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ string[], @@ -1116,7 +1136,7 @@ export class LoggingServiceV2Client { >; listLogs( request: protos.google.logging.v2.IListLogsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.logging.v2.IListLogsRequest, protos.google.logging.v2.IListLogsResponse | null | undefined, @@ -1169,7 +1189,7 @@ export class LoggingServiceV2Client { listLogs( request: protos.google.logging.v2.IListLogsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.logging.v2.IListLogsRequest, protos.google.logging.v2.IListLogsResponse | null | undefined, @@ -1188,12 +1208,12 @@ export class LoggingServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1241,7 +1261,7 @@ export class LoggingServiceV2Client { */ listLogsStream( request?: protos.google.logging.v2.IListLogsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1301,7 +1321,7 @@ export class LoggingServiceV2Client { */ listLogsAsync( request?: protos.google.logging.v2.IListLogsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1461,6 +1481,91 @@ export class LoggingServiceV2Client { ).bucket; } + /** + * Return a fully-qualified billingAccountLocationBucketView resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + billingAccountLocationBucketViewPath( + billingAccount: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.render( + { + billing_account: billingAccount, + location: location, + bucket: bucket, + view: view, + } + ); + } + + /** + * Parse the billing_account from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).view; + } + /** * Return a fully-qualified billingAccountLog resource name string. * @@ -1663,6 +1768,89 @@ export class LoggingServiceV2Client { ).bucket; } + /** + * Return a fully-qualified folderLocationBucketView resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + folderLocationBucketViewPath( + folder: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, + view: view, + }); + } + + /** + * Parse the folder from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).folder; + } + + /** + * Parse the location from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).view; + } + /** * Return a fully-qualified folderLog resource name string. * @@ -1909,6 +2097,91 @@ export class LoggingServiceV2Client { ).bucket; } + /** + * Return a fully-qualified organizationLocationBucketView resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + organizationLocationBucketViewPath( + organization: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.render( + { + organization: organization, + location: location, + bucket: bucket, + view: view, + } + ); + } + + /** + * Parse the organization from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).view; + } + /** * Return a fully-qualified organizationLog resource name string. * @@ -2134,6 +2407,89 @@ export class LoggingServiceV2Client { ).bucket; } + /** + * Return a fully-qualified projectLocationBucketView resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + projectLocationBucketViewPath( + project: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.render({ + project: project, + location: location, + bucket: bucket, + view: view, + }); + } + + /** + * Parse the project from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).project; + } + + /** + * Parse the location from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).view; + } + /** * Return a fully-qualified projectLog resource name string. * diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 791fe9c484e..617a3358aaa 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v2/metrics_service_v2_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './metrics_service_v2_client_config.json'; const version = require('../../../package.json').version; @@ -83,9 +89,9 @@ export class MetricsServiceV2Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -98,7 +104,9 @@ export class MetricsServiceV2Client { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -167,6 +175,9 @@ export class MetricsServiceV2Client { billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' ), + billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), @@ -182,6 +193,9 @@ export class MetricsServiceV2Client { folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}' ), + folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' + ), folderLogPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/logs/{log}' ), @@ -200,6 +214,9 @@ export class MetricsServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), + organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), @@ -218,6 +235,9 @@ export class MetricsServiceV2Client { projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}' ), + projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' + ), projectLogPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/logs/{log}' ), @@ -377,7 +397,7 @@ export class MetricsServiceV2Client { // ------------------- getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -387,7 +407,7 @@ export class MetricsServiceV2Client { >; getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, @@ -424,7 +444,7 @@ export class MetricsServiceV2Client { getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, @@ -443,12 +463,12 @@ export class MetricsServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -463,7 +483,7 @@ export class MetricsServiceV2Client { } createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -473,7 +493,7 @@ export class MetricsServiceV2Client { >; createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, @@ -515,7 +535,7 @@ export class MetricsServiceV2Client { createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, @@ -534,12 +554,12 @@ export class MetricsServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -554,7 +574,7 @@ export class MetricsServiceV2Client { } updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -564,7 +584,7 @@ export class MetricsServiceV2Client { >; updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, @@ -607,7 +627,7 @@ export class MetricsServiceV2Client { updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, @@ -626,12 +646,12 @@ export class MetricsServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -646,7 +666,7 @@ export class MetricsServiceV2Client { } deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -656,7 +676,7 @@ export class MetricsServiceV2Client { >; deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, @@ -693,7 +713,7 @@ export class MetricsServiceV2Client { deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, @@ -712,12 +732,12 @@ export class MetricsServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -733,7 +753,7 @@ export class MetricsServiceV2Client { listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.logging.v2.ILogMetric[], @@ -743,7 +763,7 @@ export class MetricsServiceV2Client { >; listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, @@ -792,7 +812,7 @@ export class MetricsServiceV2Client { listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, @@ -811,12 +831,12 @@ export class MetricsServiceV2Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -861,7 +881,7 @@ export class MetricsServiceV2Client { */ listLogMetricsStream( request?: protos.google.logging.v2.IListLogMetricsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -918,7 +938,7 @@ export class MetricsServiceV2Client { */ listLogMetricsAsync( request?: protos.google.logging.v2.IListLogMetricsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1078,6 +1098,91 @@ export class MetricsServiceV2Client { ).bucket; } + /** + * Return a fully-qualified billingAccountLocationBucketView resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + billingAccountLocationBucketViewPath( + billingAccount: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.render( + { + billing_account: billingAccount, + location: location, + bucket: bucket, + view: view, + } + ); + } + + /** + * Parse the billing_account from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from BillingAccountLocationBucketView resource. + * + * @param {string} billingAccountLocationBucketViewName + * A fully-qualified path representing billing_account_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromBillingAccountLocationBucketViewName( + billingAccountLocationBucketViewName: string + ) { + return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( + billingAccountLocationBucketViewName + ).view; + } + /** * Return a fully-qualified billingAccountLog resource name string. * @@ -1280,6 +1385,89 @@ export class MetricsServiceV2Client { ).bucket; } + /** + * Return a fully-qualified folderLocationBucketView resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + folderLocationBucketViewPath( + folder: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, + view: view, + }); + } + + /** + * Parse the folder from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).folder; + } + + /** + * Parse the location from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from FolderLocationBucketView resource. + * + * @param {string} folderLocationBucketViewName + * A fully-qualified path representing folder_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromFolderLocationBucketViewName( + folderLocationBucketViewName: string + ) { + return this.pathTemplates.folderLocationBucketViewPathTemplate.match( + folderLocationBucketViewName + ).view; + } + /** * Return a fully-qualified folderLog resource name string. * @@ -1526,6 +1714,91 @@ export class MetricsServiceV2Client { ).bucket; } + /** + * Return a fully-qualified organizationLocationBucketView resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + organizationLocationBucketViewPath( + organization: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.render( + { + organization: organization, + location: location, + bucket: bucket, + view: view, + } + ); + } + + /** + * Parse the organization from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from OrganizationLocationBucketView resource. + * + * @param {string} organizationLocationBucketViewName + * A fully-qualified path representing organization_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromOrganizationLocationBucketViewName( + organizationLocationBucketViewName: string + ) { + return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( + organizationLocationBucketViewName + ).view; + } + /** * Return a fully-qualified organizationLog resource name string. * @@ -1751,6 +2024,89 @@ export class MetricsServiceV2Client { ).bucket; } + /** + * Return a fully-qualified projectLocationBucketView resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @param {string} view + * @returns {string} Resource name string. + */ + projectLocationBucketViewPath( + project: string, + location: string, + bucket: string, + view: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.render({ + project: project, + location: location, + bucket: bucket, + view: view, + }); + } + + /** + * Parse the project from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).project; + } + + /** + * Parse the location from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).bucket; + } + + /** + * Parse the view from ProjectLocationBucketView resource. + * + * @param {string} projectLocationBucketViewName + * A fully-qualified path representing project_location_bucket_view resource. + * @returns {string} A string representing the view. + */ + matchViewFromProjectLocationBucketViewName( + projectLocationBucketViewName: string + ) { + return this.pathTemplates.projectLocationBucketViewPathTemplate.match( + projectLocationBucketViewName + ).view; + } + /** * Return a fully-qualified projectLog resource name string. * diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index f6efa4a9b4c..b205a74be3f 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -3,8 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-logging.git", - "sha": "e594c9bbd4966ede5ba0872ea715b11c1f3ca967" + "remote": "https://github.com/googleapis/nodejs-logging.git", + "sha": "375f3634052a0a42fdd671a43c4fb0430b7be594" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", + "internalRef": "343202295" } }, { @@ -79,7 +87,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.1634671361", "protos/google/logging/v2/log_entry.proto", "protos/google/logging/v2/logging.proto", "protos/google/logging/v2/logging_config.proto", @@ -89,7 +96,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.2353518511", "src/v2/config_service_v2_client.ts", "src/v2/config_service_v2_client_config.json", "src/v2/config_service_v2_proto_list.json", diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 867eb44c68e..1c140015338 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -305,18 +305,18 @@ describe('v2.ConfigServiceV2Client', () => { }); }); - describe('updateBucket', () => { - it('invokes updateBucket without error', async () => { + describe('createBucket', () => { + it('invokes createBucket without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -327,27 +327,27 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); - client.innerApiCalls.updateBucket = stubSimpleCall(expectedResponse); - const [response] = await client.updateBucket(request); + client.innerApiCalls.createBucket = stubSimpleCall(expectedResponse); + const [response] = await client.createBucket(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateBucket as SinonStub) + (client.innerApiCalls.createBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes updateBucket without error using callback', async () => { + it('invokes createBucket without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -358,11 +358,11 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); - client.innerApiCalls.updateBucket = stubSimpleCallWithCallback( + client.innerApiCalls.createBucket = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.updateBucket( + client.createBucket( request, ( err?: Error | null, @@ -379,23 +379,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateBucket as SinonStub) + (client.innerApiCalls.createBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes updateBucket with error', async () => { + it('invokes createBucket with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -404,31 +404,31 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateBucket = stubSimpleCall( + client.innerApiCalls.createBucket = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.updateBucket(request), expectedError); + await assert.rejects(client.createBucket(request), expectedError); assert( - (client.innerApiCalls.updateBucket as SinonStub) + (client.innerApiCalls.createBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('getSink', () => { - it('invokes getSink without error', async () => { + describe('updateBucket', () => { + it('invokes updateBucket without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSinkRequest() + new protos.google.logging.v2.UpdateBucketRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -437,29 +437,29 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.logging.v2.LogBucket() ); - client.innerApiCalls.getSink = stubSimpleCall(expectedResponse); - const [response] = await client.getSink(request); + client.innerApiCalls.updateBucket = stubSimpleCall(expectedResponse); + const [response] = await client.updateBucket(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getSink as SinonStub) + (client.innerApiCalls.updateBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes getSink without error using callback', async () => { + it('invokes updateBucket without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSinkRequest() + new protos.google.logging.v2.UpdateBucketRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -468,17 +468,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.logging.v2.LogBucket() ); - client.innerApiCalls.getSink = stubSimpleCallWithCallback( + client.innerApiCalls.updateBucket = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.getSink( + client.updateBucket( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogSink | null + result?: protos.google.logging.v2.ILogBucket | null ) => { if (err) { reject(err); @@ -491,23 +491,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getSink as SinonStub) + (client.innerApiCalls.updateBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes getSink with error', async () => { + it('invokes updateBucket with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSinkRequest() + new protos.google.logging.v2.UpdateBucketRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -516,28 +516,31 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getSink = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getSink(request), expectedError); + client.innerApiCalls.updateBucket = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateBucket(request), expectedError); assert( - (client.innerApiCalls.getSink as SinonStub) + (client.innerApiCalls.updateBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('createSink', () => { - it('invokes createSink without error', async () => { + describe('deleteBucket', () => { + it('invokes deleteBucket without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateSinkRequest() + new protos.google.logging.v2.DeleteBucketRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -546,29 +549,29 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.createSink = stubSimpleCall(expectedResponse); - const [response] = await client.createSink(request); + client.innerApiCalls.deleteBucket = stubSimpleCall(expectedResponse); + const [response] = await client.deleteBucket(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createSink as SinonStub) + (client.innerApiCalls.deleteBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes createSink without error using callback', async () => { + it('invokes deleteBucket without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateSinkRequest() + new protos.google.logging.v2.DeleteBucketRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -577,17 +580,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.createSink = stubSimpleCallWithCallback( + client.innerApiCalls.deleteBucket = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.createSink( + client.deleteBucket( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogSink | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -600,23 +603,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createSink as SinonStub) + (client.innerApiCalls.deleteBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes createSink with error', async () => { + it('invokes deleteBucket with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateSinkRequest() + new protos.google.logging.v2.DeleteBucketRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -625,31 +628,31 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.createSink = stubSimpleCall( + client.innerApiCalls.deleteBucket = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createSink(request), expectedError); + await assert.rejects(client.deleteBucket(request), expectedError); assert( - (client.innerApiCalls.createSink as SinonStub) + (client.innerApiCalls.deleteBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('updateSink', () => { - it('invokes updateSink without error', async () => { + describe('undeleteBucket', () => { + it('invokes undeleteBucket without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSinkRequest() + new protos.google.logging.v2.UndeleteBucketRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -658,29 +661,29 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.updateSink = stubSimpleCall(expectedResponse); - const [response] = await client.updateSink(request); + client.innerApiCalls.undeleteBucket = stubSimpleCall(expectedResponse); + const [response] = await client.undeleteBucket(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateSink as SinonStub) + (client.innerApiCalls.undeleteBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes updateSink without error using callback', async () => { + it('invokes undeleteBucket without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSinkRequest() + new protos.google.logging.v2.UndeleteBucketRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -689,17 +692,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.updateSink = stubSimpleCallWithCallback( + client.innerApiCalls.undeleteBucket = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.updateSink( + client.undeleteBucket( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogSink | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -712,23 +715,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateSink as SinonStub) + (client.innerApiCalls.undeleteBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes updateSink with error', async () => { + it('invokes undeleteBucket with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSinkRequest() + new protos.google.logging.v2.UndeleteBucketRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -737,31 +740,31 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateSink = stubSimpleCall( + client.innerApiCalls.undeleteBucket = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.updateSink(request), expectedError); + await assert.rejects(client.undeleteBucket(request), expectedError); assert( - (client.innerApiCalls.updateSink as SinonStub) + (client.innerApiCalls.undeleteBucket as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('deleteSink', () => { - it('invokes deleteSink without error', async () => { + describe('getView', () => { + it('invokes getView without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteSinkRequest() + new protos.google.logging.v2.GetViewRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -770,29 +773,29 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.logging.v2.LogView() ); - client.innerApiCalls.deleteSink = stubSimpleCall(expectedResponse); - const [response] = await client.deleteSink(request); + client.innerApiCalls.getView = stubSimpleCall(expectedResponse); + const [response] = await client.getView(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.deleteSink as SinonStub) + (client.innerApiCalls.getView as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes deleteSink without error using callback', async () => { + it('invokes getView without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteSinkRequest() + new protos.google.logging.v2.GetViewRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -801,17 +804,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.logging.v2.LogView() ); - client.innerApiCalls.deleteSink = stubSimpleCallWithCallback( + client.innerApiCalls.getView = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.deleteSink( + client.getView( request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.logging.v2.ILogView | null ) => { if (err) { reject(err); @@ -824,23 +827,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.deleteSink as SinonStub) + (client.innerApiCalls.getView as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes deleteSink with error', async () => { + it('invokes getView with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteSinkRequest() + new protos.google.logging.v2.GetViewRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -849,31 +852,28 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.deleteSink = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteSink(request), expectedError); + client.innerApiCalls.getView = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getView(request), expectedError); assert( - (client.innerApiCalls.deleteSink as SinonStub) + (client.innerApiCalls.getView as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('getExclusion', () => { - it('invokes getExclusion without error', async () => { + describe('createView', () => { + it('invokes createView without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetExclusionRequest() + new protos.google.logging.v2.CreateViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -882,29 +882,29 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogView() ); - client.innerApiCalls.getExclusion = stubSimpleCall(expectedResponse); - const [response] = await client.getExclusion(request); + client.innerApiCalls.createView = stubSimpleCall(expectedResponse); + const [response] = await client.createView(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getExclusion as SinonStub) + (client.innerApiCalls.createView as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes getExclusion without error using callback', async () => { + it('invokes createView without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetExclusionRequest() + new protos.google.logging.v2.CreateViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -913,17 +913,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogView() ); - client.innerApiCalls.getExclusion = stubSimpleCallWithCallback( + client.innerApiCalls.createView = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.getExclusion( + client.createView( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogExclusion | null + result?: protos.google.logging.v2.ILogView | null ) => { if (err) { reject(err); @@ -936,23 +936,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getExclusion as SinonStub) + (client.innerApiCalls.createView as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes getExclusion with error', async () => { + it('invokes createView with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetExclusionRequest() + new protos.google.logging.v2.CreateViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -961,31 +961,31 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getExclusion = stubSimpleCall( + client.innerApiCalls.createView = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getExclusion(request), expectedError); + await assert.rejects(client.createView(request), expectedError); assert( - (client.innerApiCalls.getExclusion as SinonStub) + (client.innerApiCalls.createView as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('createExclusion', () => { - it('invokes createExclusion without error', async () => { + describe('updateView', () => { + it('invokes updateView without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateExclusionRequest() + new protos.google.logging.v2.UpdateViewRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -994,29 +994,29 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogView() ); - client.innerApiCalls.createExclusion = stubSimpleCall(expectedResponse); - const [response] = await client.createExclusion(request); + client.innerApiCalls.updateView = stubSimpleCall(expectedResponse); + const [response] = await client.updateView(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createExclusion as SinonStub) + (client.innerApiCalls.updateView as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes createExclusion without error using callback', async () => { + it('invokes updateView without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateExclusionRequest() + new protos.google.logging.v2.UpdateViewRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -1025,17 +1025,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogView() ); - client.innerApiCalls.createExclusion = stubSimpleCallWithCallback( + client.innerApiCalls.updateView = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.createExclusion( + client.updateView( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogExclusion | null + result?: protos.google.logging.v2.ILogView | null ) => { if (err) { reject(err); @@ -1048,23 +1048,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createExclusion as SinonStub) + (client.innerApiCalls.updateView as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes createExclusion with error', async () => { + it('invokes updateView with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateExclusionRequest() + new protos.google.logging.v2.UpdateViewRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -1073,28 +1073,28 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.createExclusion = stubSimpleCall( + client.innerApiCalls.updateView = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createExclusion(request), expectedError); + await assert.rejects(client.updateView(request), expectedError); assert( - (client.innerApiCalls.createExclusion as SinonStub) + (client.innerApiCalls.updateView as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('updateExclusion', () => { - it('invokes updateExclusion without error', async () => { + describe('deleteView', () => { + it('invokes deleteView without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateExclusionRequest() + new protos.google.logging.v2.DeleteViewRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -1106,26 +1106,26 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.updateExclusion = stubSimpleCall(expectedResponse); - const [response] = await client.updateExclusion(request); + client.innerApiCalls.deleteView = stubSimpleCall(expectedResponse); + const [response] = await client.deleteView(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateExclusion as SinonStub) + (client.innerApiCalls.deleteView as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes updateExclusion without error using callback', async () => { + it('invokes deleteView without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateExclusionRequest() + new protos.google.logging.v2.DeleteViewRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -1137,17 +1137,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.updateExclusion = stubSimpleCallWithCallback( + client.innerApiCalls.deleteView = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.updateExclusion( + client.deleteView( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogExclusion | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -1160,20 +1160,20 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateExclusion as SinonStub) + (client.innerApiCalls.deleteView as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes updateExclusion with error', async () => { + it('invokes deleteView with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateExclusionRequest() + new protos.google.logging.v2.DeleteViewRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -1185,31 +1185,31 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateExclusion = stubSimpleCall( + client.innerApiCalls.deleteView = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.updateExclusion(request), expectedError); + await assert.rejects(client.deleteView(request), expectedError); assert( - (client.innerApiCalls.updateExclusion as SinonStub) + (client.innerApiCalls.deleteView as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('deleteExclusion', () => { - it('invokes deleteExclusion without error', async () => { + describe('getSink', () => { + it('invokes getSink without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteExclusionRequest() + new protos.google.logging.v2.GetSinkRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; const expectedOptions = { otherArgs: { headers: { @@ -1218,29 +1218,29 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.logging.v2.LogSink() ); - client.innerApiCalls.deleteExclusion = stubSimpleCall(expectedResponse); - const [response] = await client.deleteExclusion(request); + client.innerApiCalls.getSink = stubSimpleCall(expectedResponse); + const [response] = await client.getSink(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.deleteExclusion as SinonStub) + (client.innerApiCalls.getSink as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes deleteExclusion without error using callback', async () => { + it('invokes getSink without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteExclusionRequest() + new protos.google.logging.v2.GetSinkRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; const expectedOptions = { otherArgs: { headers: { @@ -1249,17 +1249,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.logging.v2.LogSink() ); - client.innerApiCalls.deleteExclusion = stubSimpleCallWithCallback( + client.innerApiCalls.getSink = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.deleteExclusion( + client.getSink( request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.logging.v2.ILogSink | null ) => { if (err) { reject(err); @@ -1272,23 +1272,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.deleteExclusion as SinonStub) + (client.innerApiCalls.getSink as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes deleteExclusion with error', async () => { + it('invokes getSink with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteExclusionRequest() + new protos.google.logging.v2.GetSinkRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; const expectedOptions = { otherArgs: { headers: { @@ -1297,31 +1297,140 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.deleteExclusion = stubSimpleCall( + client.innerApiCalls.getSink = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSink(request), expectedError); + assert( + (client.innerApiCalls.getSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createSink', () => { + it('invokes createSink without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateSinkRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogSink() + ); + client.innerApiCalls.createSink = stubSimpleCall(expectedResponse); + const [response] = await client.createSink(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createSink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateSinkRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogSink() + ); + client.innerApiCalls.createSink = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createSink( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogSink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createSink with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateSinkRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createSink = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.deleteExclusion(request), expectedError); + await assert.rejects(client.createSink(request), expectedError); assert( - (client.innerApiCalls.deleteExclusion as SinonStub) + (client.innerApiCalls.createSink as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('getCmekSettings', () => { - it('invokes getCmekSettings without error', async () => { + describe('updateSink', () => { + it('invokes updateSink without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.UpdateSinkRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; const expectedOptions = { otherArgs: { headers: { @@ -1330,29 +1439,29 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.LogSink() ); - client.innerApiCalls.getCmekSettings = stubSimpleCall(expectedResponse); - const [response] = await client.getCmekSettings(request); + client.innerApiCalls.updateSink = stubSimpleCall(expectedResponse); + const [response] = await client.updateSink(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getCmekSettings as SinonStub) + (client.innerApiCalls.updateSink as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes getCmekSettings without error using callback', async () => { + it('invokes updateSink without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.UpdateSinkRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; const expectedOptions = { otherArgs: { headers: { @@ -1361,17 +1470,17 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.LogSink() ); - client.innerApiCalls.getCmekSettings = stubSimpleCallWithCallback( + client.innerApiCalls.updateSink = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.getCmekSettings( + client.updateSink( request, ( err?: Error | null, - result?: protos.google.logging.v2.ICmekSettings | null + result?: protos.google.logging.v2.ILogSink | null ) => { if (err) { reject(err); @@ -1384,23 +1493,23 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getCmekSettings as SinonStub) + (client.innerApiCalls.updateSink as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes getCmekSettings with error', async () => { + it('invokes updateSink with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.UpdateSinkRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; const expectedOptions = { otherArgs: { headers: { @@ -1409,31 +1518,31 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getCmekSettings = stubSimpleCall( + client.innerApiCalls.updateSink = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getCmekSettings(request), expectedError); + await assert.rejects(client.updateSink(request), expectedError); assert( - (client.innerApiCalls.getCmekSettings as SinonStub) + (client.innerApiCalls.updateSink as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('updateCmekSettings', () => { - it('invokes updateCmekSettings without error', async () => { + describe('deleteSink', () => { + it('invokes deleteSink without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.DeleteSinkRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; const expectedOptions = { otherArgs: { headers: { @@ -1442,109 +1551,1063 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() - ); - client.innerApiCalls.updateCmekSettings = stubSimpleCall( - expectedResponse + new protos.google.protobuf.Empty() ); - const [response] = await client.updateCmekSettings(request); + client.innerApiCalls.deleteSink = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSink(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) + (client.innerApiCalls.deleteSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteSink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSink = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteSink( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteSink with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteSink(request), expectedError); + assert( + (client.innerApiCalls.deleteSink as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getExclusion', () => { + it('invokes getExclusion without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.getExclusion = stubSimpleCall(expectedResponse); + const [response] = await client.getExclusion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getExclusion without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.getExclusion = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getExclusion( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogExclusion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getExclusion with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getExclusion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getExclusion(request), expectedError); + assert( + (client.innerApiCalls.getExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createExclusion', () => { + it('invokes createExclusion without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateExclusionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.createExclusion = stubSimpleCall(expectedResponse); + const [response] = await client.createExclusion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createExclusion without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateExclusionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.createExclusion = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createExclusion( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogExclusion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createExclusion with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateExclusionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createExclusion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createExclusion(request), expectedError); + assert( + (client.innerApiCalls.createExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateExclusion', () => { + it('invokes updateExclusion without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.updateExclusion = stubSimpleCall(expectedResponse); + const [response] = await client.updateExclusion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateExclusion without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.LogExclusion() + ); + client.innerApiCalls.updateExclusion = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateExclusion( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogExclusion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateExclusion with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateExclusion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateExclusion(request), expectedError); + assert( + (client.innerApiCalls.updateExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteExclusion', () => { + it('invokes deleteExclusion without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExclusion = stubSimpleCall(expectedResponse); + const [response] = await client.deleteExclusion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteExclusion without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExclusion = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteExclusion( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteExclusion with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteExclusion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteExclusion(request), expectedError); + assert( + (client.innerApiCalls.deleteExclusion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCmekSettings', () => { + it('invokes getCmekSettings without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.getCmekSettings = stubSimpleCall(expectedResponse); + const [response] = await client.getCmekSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCmekSettings without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.getCmekSettings = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCmekSettings( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ICmekSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCmekSettings with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCmekSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCmekSettings(request), expectedError); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateCmekSettings', () => { + it('invokes updateCmekSettings without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.updateCmekSettings = stubSimpleCall( + expectedResponse + ); + const [response] = await client.updateCmekSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCmekSettings without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.updateCmekSettings = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCmekSettings( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ICmekSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCmekSettings with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCmekSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateCmekSettings(request), expectedError); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listBuckets', () => { + it('invokes listBuckets without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.innerApiCalls.listBuckets = stubSimpleCall(expectedResponse); + const [response] = await client.listBuckets(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuckets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBuckets without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.innerApiCalls.listBuckets = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listBuckets( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogBucket[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuckets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listBuckets with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listBuckets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listBuckets(request), expectedError); + assert( + (client.innerApiCalls.listBuckets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBucketsStream without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listBucketsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogBucket[] = []; + stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuckets, request) + ); + assert.strictEqual( + (client.descriptors.page.listBuckets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listBucketsStream with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listBucketsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogBucket[] = []; + stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) .getCall(0) - .calledWith(request, expectedOptions, undefined) + .calledWith(client.innerApiCalls.listBuckets, request) + ); + assert.strictEqual( + (client.descriptors.page.listBuckets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams ); }); - it('invokes updateCmekSettings without error using callback', async () => { + it('uses async iteration with listBuckets without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.ListBucketsRequest() ); - client.innerApiCalls.updateCmekSettings = stubSimpleCallWithCallback( + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( expectedResponse ); - const promise = new Promise((resolve, reject) => { - client.updateCmekSettings( - request, - ( - err?: Error | null, - result?: protos.google.logging.v2.ICmekSettings | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) + const responses: protos.google.logging.v2.ILogBucket[] = []; + const iterable = client.listBucketsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams ); }); - it('invokes updateCmekSettings with error', async () => { + it('uses async iteration with listBuckets with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.ListBucketsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.innerApiCalls.updateCmekSettings = stubSimpleCall( + client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - await assert.rejects(client.updateCmekSettings(request), expectedError); - assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) + const iterable = client.listBucketsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.logging.v2.ILogBucket[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams ); }); }); - describe('listBuckets', () => { - it('invokes listBuckets without error', async () => { + describe('listViews', () => { + it('invokes listViews without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListViewsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -1556,28 +2619,28 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), ]; - client.innerApiCalls.listBuckets = stubSimpleCall(expectedResponse); - const [response] = await client.listBuckets(request); + client.innerApiCalls.listViews = stubSimpleCall(expectedResponse); + const [response] = await client.listViews(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listBuckets as SinonStub) + (client.innerApiCalls.listViews as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listBuckets without error using callback', async () => { + it('invokes listViews without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListViewsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -1589,19 +2652,19 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), ]; - client.innerApiCalls.listBuckets = stubSimpleCallWithCallback( + client.innerApiCalls.listViews = stubSimpleCallWithCallback( expectedResponse ); const promise = new Promise((resolve, reject) => { - client.listBuckets( + client.listViews( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogBucket[] | null + result?: protos.google.logging.v2.ILogView[] | null ) => { if (err) { reject(err); @@ -1614,20 +2677,20 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listBuckets as SinonStub) + (client.innerApiCalls.listViews as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listBuckets with error', async () => { + it('invokes listViews with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListViewsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -1639,41 +2702,38 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listBuckets = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listBuckets(request), expectedError); + client.innerApiCalls.listViews = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listViews(request), expectedError); assert( - (client.innerApiCalls.listBuckets as SinonStub) + (client.innerApiCalls.listViews as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listBucketsStream without error', async () => { + it('invokes listViewsStream without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListViewsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), ]; - client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( + client.descriptors.page.listViews.createStream = stubPageStreamingCall( expectedResponse ); - const stream = client.listBucketsStream(request); + const stream = client.listViewsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogBucket[] = []; - stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + const responses: protos.google.logging.v2.LogView[] = []; + stream.on('data', (response: protos.google.logging.v2.LogView) => { responses.push(response); }); stream.on('end', () => { @@ -1686,38 +2746,37 @@ describe('v2.ConfigServiceV2Client', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listBuckets.createStream as SinonStub) + (client.descriptors.page.listViews.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuckets, request) + .calledWith(client.innerApiCalls.listViews, request) ); assert.strictEqual( - (client.descriptors.page.listBuckets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listViews.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listBucketsStream with error', async () => { + it('invokes listViewsStream with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListViewsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( + client.descriptors.page.listViews.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listBucketsStream(request); + const stream = client.listViewsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogBucket[] = []; - stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + const responses: protos.google.logging.v2.LogView[] = []; + stream.on('data', (response: protos.google.logging.v2.LogView) => { responses.push(response); }); stream.on('end', () => { @@ -1729,90 +2788,85 @@ describe('v2.ConfigServiceV2Client', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listBuckets.createStream as SinonStub) + (client.descriptors.page.listViews.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuckets, request) + .calledWith(client.innerApiCalls.listViews, request) ); assert.strictEqual( - (client.descriptors.page.listBuckets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listViews.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listBuckets without error', async () => { + it('uses async iteration with listViews without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListViewsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), ]; - client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( expectedResponse ); - const responses: protos.google.logging.v2.ILogBucket[] = []; - const iterable = client.listBucketsAsync(request); + const responses: protos.google.logging.v2.ILogView[] = []; + const iterable = client.listViewsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listBuckets with error', async () => { + it('uses async iteration with listViews with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListViewsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const iterable = client.listBucketsAsync(request); + const iterable = client.listViewsAsync(request); await assert.rejects(async () => { - const responses: protos.google.logging.v2.ILogBucket[] = []; + const responses: protos.google.logging.v2.ILogView[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2441,37 +3495,111 @@ describe('v2.ConfigServiceV2Client', () => { it('billingAccountExclusionPath', () => { const result = client.billingAccountExclusionPath( 'billingAccountValue', - 'exclusionValue' + 'exclusionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountExclusionName', () => { + const result = client.matchBillingAccountFromBillingAccountExclusionName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExclusionFromBillingAccountExclusionName', () => { + const result = client.matchExclusionFromBillingAccountExclusionName( + fakePath + ); + assert.strictEqual(result, 'exclusionValue'); + assert( + (client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountLocationBucket', () => { + const fakePath = '/rendered/path/billingAccountLocationBucket'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLocationBucketPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLocationBucketPath', () => { + const result = client.billingAccountLocationBucketPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue' ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate + (client.pathTemplates.billingAccountLocationBucketPathTemplate .render as SinonStub) .getCall(-1) .calledWith(expectedParameters) ); }); - it('matchBillingAccountFromBillingAccountExclusionName', () => { - const result = client.matchBillingAccountFromBillingAccountExclusionName( + it('matchBillingAccountFromBillingAccountLocationBucketName', () => { + const result = client.matchBillingAccountFromBillingAccountLocationBucketName( fakePath ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate + (client.pathTemplates.billingAccountLocationBucketPathTemplate .match as SinonStub) .getCall(-1) .calledWith(fakePath) ); }); - it('matchExclusionFromBillingAccountExclusionName', () => { - const result = client.matchExclusionFromBillingAccountExclusionName( + it('matchLocationFromBillingAccountLocationBucketName', () => { + const result = client.matchLocationFromBillingAccountLocationBucketName( fakePath ); - assert.strictEqual(result, 'exclusionValue'); + assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate + (client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketName', () => { + const result = client.matchBucketFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketPathTemplate .match as SinonStub) .getCall(-1) .calledWith(fakePath) @@ -2479,73 +3607,88 @@ describe('v2.ConfigServiceV2Client', () => { }); }); - describe('billingAccountLocationBucket', () => { - const fakePath = '/rendered/path/billingAccountLocationBucket'; + describe('billingAccountLocationBucketView', () => { + const fakePath = '/rendered/path/billingAccountLocationBucketView'; const expectedParameters = { billing_account: 'billingAccountValue', location: 'locationValue', bucket: 'bucketValue', + view: 'viewValue', }; const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - client.pathTemplates.billingAccountLocationBucketPathTemplate.render = sinon + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = sinon .stub() .returns(fakePath); - client.pathTemplates.billingAccountLocationBucketPathTemplate.match = sinon + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = sinon .stub() .returns(expectedParameters); - it('billingAccountLocationBucketPath', () => { - const result = client.billingAccountLocationBucketPath( + it('billingAccountLocationBucketViewPath', () => { + const result = client.billingAccountLocationBucketViewPath( 'billingAccountValue', 'locationValue', - 'bucketValue' + 'bucketValue', + 'viewValue' ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate .render as SinonStub) .getCall(-1) .calledWith(expectedParameters) ); }); - it('matchBillingAccountFromBillingAccountLocationBucketName', () => { - const result = client.matchBillingAccountFromBillingAccountLocationBucketName( + it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { + const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( fakePath ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate .match as SinonStub) .getCall(-1) .calledWith(fakePath) ); }); - it('matchLocationFromBillingAccountLocationBucketName', () => { - const result = client.matchLocationFromBillingAccountLocationBucketName( + it('matchLocationFromBillingAccountLocationBucketViewName', () => { + const result = client.matchLocationFromBillingAccountLocationBucketViewName( fakePath ); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate .match as SinonStub) .getCall(-1) .calledWith(fakePath) ); }); - it('matchBucketFromBillingAccountLocationBucketName', () => { - const result = client.matchBucketFromBillingAccountLocationBucketName( + it('matchBucketFromBillingAccountLocationBucketViewName', () => { + const result = client.matchBucketFromBillingAccountLocationBucketViewName( fakePath ); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromBillingAccountLocationBucketViewName', () => { + const result = client.matchViewFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate .match as SinonStub) .getCall(-1) .calledWith(fakePath) @@ -2829,6 +3972,95 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('folderLocationBucketView', () => { + const fakePath = '/rendered/path/folderLocationBucketView'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketViewPath', () => { + const result = client.folderLocationBucketViewPath( + 'folderValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketViewName', () => { + const result = client.matchFolderFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketViewName', () => { + const result = client.matchLocationFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketViewName', () => { + const result = client.matchBucketFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromFolderLocationBucketViewName', () => { + const result = client.matchViewFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderLog', () => { const fakePath = '/rendered/path/folderLog'; const expectedParameters = { @@ -3200,6 +4432,95 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('organizationLocationBucketView', () => { + const fakePath = '/rendered/path/organizationLocationBucketView'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLocationBucketViewPath', () => { + const result = client.organizationLocationBucketViewPath( + 'organizationValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketViewName', () => { + const result = client.matchOrganizationFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketViewName', () => { + const result = client.matchLocationFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketViewName', () => { + const result = client.matchBucketFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromOrganizationLocationBucketViewName', () => { + const result = client.matchViewFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationLog', () => { const fakePath = '/rendered/path/organizationLog'; const expectedParameters = { @@ -3514,6 +4835,95 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('projectLocationBucketView', () => { + const fakePath = '/rendered/path/projectLocationBucketView'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketViewPath', () => { + const result = client.projectLocationBucketViewPath( + 'projectValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketViewName', () => { + const result = client.matchProjectFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketViewName', () => { + const result = client.matchLocationFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketViewName', () => { + const result = client.matchBucketFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromProjectLocationBucketViewName', () => { + const result = client.matchViewFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLog', () => { const fakePath = '/rendered/path/projectLog'; const expectedParameters = { diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 981543550aa..9ef4357c01f 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -1316,6 +1316,95 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('billingAccountLocationBucketView', () => { + const fakePath = '/rendered/path/billingAccountLocationBucketView'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLocationBucketViewPath', () => { + const result = client.billingAccountLocationBucketViewPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { + const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBillingAccountLocationBucketViewName', () => { + const result = client.matchLocationFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketViewName', () => { + const result = client.matchBucketFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromBillingAccountLocationBucketViewName', () => { + const result = client.matchViewFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('billingAccountLog', () => { const fakePath = '/rendered/path/billingAccountLog'; const expectedParameters = { @@ -1592,6 +1681,95 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('folderLocationBucketView', () => { + const fakePath = '/rendered/path/folderLocationBucketView'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketViewPath', () => { + const result = client.folderLocationBucketViewPath( + 'folderValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketViewName', () => { + const result = client.matchFolderFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketViewName', () => { + const result = client.matchLocationFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketViewName', () => { + const result = client.matchBucketFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromFolderLocationBucketViewName', () => { + const result = client.matchViewFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderLog', () => { const fakePath = '/rendered/path/folderLog'; const expectedParameters = { @@ -1914,6 +2092,95 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('organizationLocationBucketView', () => { + const fakePath = '/rendered/path/organizationLocationBucketView'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLocationBucketViewPath', () => { + const result = client.organizationLocationBucketViewPath( + 'organizationValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketViewName', () => { + const result = client.matchOrganizationFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketViewName', () => { + const result = client.matchLocationFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketViewName', () => { + const result = client.matchBucketFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromOrganizationLocationBucketViewName', () => { + const result = client.matchViewFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationLog', () => { const fakePath = '/rendered/path/organizationLog'; const expectedParameters = { @@ -2228,6 +2495,95 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('projectLocationBucketView', () => { + const fakePath = '/rendered/path/projectLocationBucketView'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketViewPath', () => { + const result = client.projectLocationBucketViewPath( + 'projectValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketViewName', () => { + const result = client.matchProjectFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketViewName', () => { + const result = client.matchLocationFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketViewName', () => { + const result = client.matchBucketFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromProjectLocationBucketViewName', () => { + const result = client.matchViewFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLog', () => { const fakePath = '/rendered/path/projectLog'; const expectedParameters = { diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 334387ddeeb..f373c45cb0e 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -1106,6 +1106,95 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('billingAccountLocationBucketView', () => { + const fakePath = '/rendered/path/billingAccountLocationBucketView'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountLocationBucketViewPath', () => { + const result = client.billingAccountLocationBucketViewPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { + const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBillingAccountLocationBucketViewName', () => { + const result = client.matchLocationFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketViewName', () => { + const result = client.matchBucketFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromBillingAccountLocationBucketViewName', () => { + const result = client.matchViewFromBillingAccountLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('billingAccountLog', () => { const fakePath = '/rendered/path/billingAccountLog'; const expectedParameters = { @@ -1382,6 +1471,95 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('folderLocationBucketView', () => { + const fakePath = '/rendered/path/folderLocationBucketView'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketViewPath', () => { + const result = client.folderLocationBucketViewPath( + 'folderValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketViewName', () => { + const result = client.matchFolderFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketViewName', () => { + const result = client.matchLocationFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketViewName', () => { + const result = client.matchBucketFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromFolderLocationBucketViewName', () => { + const result = client.matchViewFromFolderLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderLog', () => { const fakePath = '/rendered/path/folderLog'; const expectedParameters = { @@ -1704,6 +1882,95 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('organizationLocationBucketView', () => { + const fakePath = '/rendered/path/organizationLocationBucketView'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLocationBucketViewPath', () => { + const result = client.organizationLocationBucketViewPath( + 'organizationValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketViewName', () => { + const result = client.matchOrganizationFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketViewName', () => { + const result = client.matchLocationFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketViewName', () => { + const result = client.matchBucketFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromOrganizationLocationBucketViewName', () => { + const result = client.matchViewFromOrganizationLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationLog', () => { const fakePath = '/rendered/path/organizationLog'; const expectedParameters = { @@ -2018,6 +2285,95 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('projectLocationBucketView', () => { + const fakePath = '/rendered/path/projectLocationBucketView'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + view: 'viewValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketViewPath', () => { + const result = client.projectLocationBucketViewPath( + 'projectValue', + 'locationValue', + 'bucketValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketViewName', () => { + const result = client.matchProjectFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketViewName', () => { + const result = client.matchLocationFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketViewName', () => { + const result = client.matchBucketFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'bucketValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromProjectLocationBucketViewName', () => { + const result = client.matchViewFromProjectLocationBucketViewName( + fakePath + ); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLog', () => { const fakePath = '/rendered/path/projectLog'; const expectedParameters = { From 52a95f51d7ec1b000befdd3aa353049342c15479 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 23 Nov 2020 21:50:38 -0800 Subject: [PATCH 0693/1029] ci: fix bucket_not_found race condition in log sink tests (#954) --- handwritten/logging/system-test/logging.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 6dd5d9d1484..e3daafa7936 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -69,17 +69,22 @@ describe('Logging', () => { const oneHourAgo = new Date(); oneHourAgo.setHours(oneHourAgo.getHours() - 1); + const twoDaysAgo = new Date(); + twoDaysAgo.setDate(twoDaysAgo.getDate() - 2); + await Promise.all([ + deleteSinks(), deleteBuckets(), deleteDatasets(), deleteTopics(), - deleteSinks(), ]); + // Only delete log buckets that are at least 2 days old + // Fixes: https://github.com/googleapis/nodejs-logging/issues/953 async function deleteBuckets() { const [buckets] = await storage.getBuckets({prefix: TESTS_PREFIX}); const bucketsToDelete = buckets.filter(bucket => { - return new Date(bucket.metadata.timeCreated) < oneHourAgo; + return new Date(bucket.metadata.timeCreated) < twoDaysAgo; }); for (const bucket of bucketsToDelete) { From 1ee7debbfd6fa2798f8c7286e4c68c7644306dc7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:34:23 -0800 Subject: [PATCH 0694/1029] docs: spelling correction for "targetting" (#957) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4ae6b577-4a5f-4ba7-885b-7384aaed05b5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- handwritten/logging/README.md | 2 +- handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index fb315e9ddef..21f708ef690 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -137,7 +137,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index b205a74be3f..6fe898d5b31 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "375f3634052a0a42fdd671a43c4fb0430b7be594" + "sha": "763b51c72e0fbfed28b44e77947140460ad7c3ee" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], From 9db881e353e37ddf2de5b920d20025e330bb367c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 25 Nov 2020 22:43:34 +0100 Subject: [PATCH 0695/1029] fix(deps): update dependency type-fest to ^0.20.0 (#956) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 41c372d6eac..b5e3b265332 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -64,7 +64,7 @@ "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", "through2": "^4.0.0", - "type-fest": "^0.19.0" + "type-fest": "^0.20.0" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", From fb2b6f1e2a6e4f89eae4c20ac5d3923e87bd63d0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 30 Nov 2020 09:07:21 -0800 Subject: [PATCH 0696/1029] feat: add the Tailing API to get a live stream of the tail end of filtered logs (#958) PiperOrigin-RevId: 344435830 Source-Author: Google APIs Source-Date: Thu Nov 26 09:56:05 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: e8857c4c36948e7e0500377cd7fcecbf2459afc8 Source-Link: https://github.com/googleapis/googleapis/commit/e8857c4c36948e7e0500377cd7fcecbf2459afc8 --- .../protos/google/logging/v2/logging.proto | 99 +++ handwritten/logging/protos/protos.d.ts | 334 +++++++ handwritten/logging/protos/protos.js | 822 ++++++++++++++++++ handwritten/logging/protos/protos.json | 89 ++ .../src/v2/logging_service_v2_client.ts | 86 ++ .../v2/logging_service_v2_client_config.json | 5 + handwritten/logging/synth.metadata | 6 +- .../test/gapic_logging_service_v2_v2.ts | 102 +++ 8 files changed, 1540 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index 58647b92ff0..f8b01a71e6b 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -125,6 +125,15 @@ service LoggingServiceV2 { }; option (google.api.method_signature) = "parent"; } + + // Streaming read of log entries as they are ingested. Until the stream is + // terminated, it will continue reading logs. + rpc TailLogEntries(stream TailLogEntriesRequest) returns (stream TailLogEntriesResponse) { + option (google.api.http) = { + post: "/v2/entries:tail" + body: "*" + }; + } } // The parameters to DeleteLog. @@ -254,6 +263,11 @@ message ListLogEntriesRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" // + // May alternatively be one or more views + // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] // // Projects listed in the `project_ids` field are added to this list. repeated string resource_names = 8 [ @@ -363,6 +377,19 @@ message ListLogsRequest { // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource name that owns the logs: + // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // + // To support legacy queries, it could also be: + // "projects/[PROJECT_ID]" + // "organizations/[ORGANIZATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]" + // "folders/[FOLDER_ID]" + repeated string resource_names = 8 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogs. @@ -377,3 +404,75 @@ message ListLogsResponse { // method again using the value of `nextPageToken` as `pageToken`. string next_page_token = 2; } + +// The parameters to `TailLogEntries`. +message TailLogEntriesRequest { + // Required. Name of a parent resource from which to retrieve log entries: + // + // "projects/[PROJECT_ID]" + // "organizations/[ORGANIZATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]" + // "folders/[FOLDER_ID]" + // + // May alternatively be one or more views: + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // "organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + repeated string resource_names = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A filter that chooses which log entries to return. See [Advanced + // Logs Filters](https://cloud.google.com/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 in `resource_names` will cause + // the filter to return no results. The maximum length of the filter is 20000 + // characters. + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The amount of time to buffer log entries at the server before + // being returned to prevent out of order results due to late arriving log + // entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 + // milliseconds. + google.protobuf.Duration buffer_window = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Result returned from `TailLogEntries`. +message TailLogEntriesResponse { + // Information about entries that were omitted from the session. + message SuppressionInfo { + // An indicator of why entries were omitted. + enum Reason { + // Unexpected default. + REASON_UNSPECIFIED = 0; + + // Indicates suppression occurred due to relevant entries being + // received in excess of rate limits. For quotas and limits, see + // [Logging API quotas and + // limits](https://cloud.google.com/logging/quotas#api-limits). + RATE_LIMIT = 1; + + // Indicates suppression occurred due to the client not consuming + // responses quickly enough. + NOT_CONSUMED = 2; + } + + // The reason that entries were omitted from the session. + Reason reason = 1; + + // A lower bound on the count of entries omitted due to `reason`. + int32 suppressed_count = 2; + } + + // A list of log entries. Each response in the stream will order entries with + // increasing values of `LogEntry.timestamp`. Ordering is not guaranteed + // between separate responses. + repeated LogEntry entries = 1; + + // If entries that otherwise would have been included in the session were not + // sent back to the client, counts of relevant entries omitted from the + // session with the reason that they were not included. There will be at most + // one of each reason per response. The counts represent the number of + // suppressed entries since the last streamed response. + repeated SuppressionInfo suppression_info = 2; +} diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 8f48ec83861..e759458e38d 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -505,6 +505,20 @@ export namespace google { * @returns Promise */ public listLogs(request: google.logging.v2.IListLogsRequest): Promise; + + /** + * Calls TailLogEntries. + * @param request TailLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TailLogEntriesResponse + */ + public tailLogEntries(request: google.logging.v2.ITailLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.TailLogEntriesCallback): void; + + /** + * Calls TailLogEntries. + * @param request TailLogEntriesRequest message or plain object + * @returns Promise + */ + public tailLogEntries(request: google.logging.v2.ITailLogEntriesRequest): Promise; } namespace LoggingServiceV2 { @@ -543,6 +557,13 @@ export namespace google { * @param [response] ListLogsResponse */ type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#tailLogEntries}. + * @param error Error, if any + * @param [response] TailLogEntriesResponse + */ + type TailLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.TailLogEntriesResponse) => void; } /** Properties of a DeleteLogRequest. */ @@ -1342,6 +1363,9 @@ export namespace google { /** ListLogsRequest pageToken */ pageToken?: (string|null); + + /** ListLogsRequest resourceNames */ + resourceNames?: (string[]|null); } /** Represents a ListLogsRequest. */ @@ -1362,6 +1386,9 @@ export namespace google { /** ListLogsRequest pageToken. */ public pageToken: string; + /** ListLogsRequest resourceNames. */ + public resourceNames: string[]; + /** * Creates a new ListLogsRequest instance using the specified properties. * @param [properties] Properties to set @@ -1529,6 +1556,313 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a TailLogEntriesRequest. */ + interface ITailLogEntriesRequest { + + /** TailLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); + + /** TailLogEntriesRequest filter */ + filter?: (string|null); + + /** TailLogEntriesRequest bufferWindow */ + bufferWindow?: (google.protobuf.IDuration|null); + } + + /** Represents a TailLogEntriesRequest. */ + class TailLogEntriesRequest implements ITailLogEntriesRequest { + + /** + * Constructs a new TailLogEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ITailLogEntriesRequest); + + /** TailLogEntriesRequest resourceNames. */ + public resourceNames: string[]; + + /** TailLogEntriesRequest filter. */ + public filter: string; + + /** TailLogEntriesRequest bufferWindow. */ + public bufferWindow?: (google.protobuf.IDuration|null); + + /** + * Creates a new TailLogEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TailLogEntriesRequest instance + */ + public static create(properties?: google.logging.v2.ITailLogEntriesRequest): google.logging.v2.TailLogEntriesRequest; + + /** + * Encodes the specified TailLogEntriesRequest message. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. + * @param message TailLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ITailLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TailLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. + * @param message TailLogEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ITailLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TailLogEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TailLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesRequest; + + /** + * Decodes a TailLogEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TailLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesRequest; + + /** + * Verifies a TailLogEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TailLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TailLogEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesRequest; + + /** + * Creates a plain object from a TailLogEntriesRequest message. Also converts values to other types if specified. + * @param message TailLogEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.TailLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TailLogEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TailLogEntriesResponse. */ + interface ITailLogEntriesResponse { + + /** TailLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** TailLogEntriesResponse suppressionInfo */ + suppressionInfo?: (google.logging.v2.TailLogEntriesResponse.ISuppressionInfo[]|null); + } + + /** Represents a TailLogEntriesResponse. */ + class TailLogEntriesResponse implements ITailLogEntriesResponse { + + /** + * Constructs a new TailLogEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ITailLogEntriesResponse); + + /** TailLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** TailLogEntriesResponse suppressionInfo. */ + public suppressionInfo: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo[]; + + /** + * Creates a new TailLogEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TailLogEntriesResponse instance + */ + public static create(properties?: google.logging.v2.ITailLogEntriesResponse): google.logging.v2.TailLogEntriesResponse; + + /** + * Encodes the specified TailLogEntriesResponse message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. + * @param message TailLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ITailLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TailLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. + * @param message TailLogEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ITailLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TailLogEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TailLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesResponse; + + /** + * Decodes a TailLogEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TailLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesResponse; + + /** + * Verifies a TailLogEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TailLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TailLogEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesResponse; + + /** + * Creates a plain object from a TailLogEntriesResponse message. Also converts values to other types if specified. + * @param message TailLogEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.TailLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TailLogEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TailLogEntriesResponse { + + /** Properties of a SuppressionInfo. */ + interface ISuppressionInfo { + + /** SuppressionInfo reason */ + reason?: (google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|keyof typeof google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|null); + + /** SuppressionInfo suppressedCount */ + suppressedCount?: (number|null); + } + + /** Represents a SuppressionInfo. */ + class SuppressionInfo implements ISuppressionInfo { + + /** + * Constructs a new SuppressionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo); + + /** SuppressionInfo reason. */ + public reason: (google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|keyof typeof google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason); + + /** SuppressionInfo suppressedCount. */ + public suppressedCount: number; + + /** + * Creates a new SuppressionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SuppressionInfo instance + */ + public static create(properties?: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + + /** + * Encodes the specified SuppressionInfo message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. + * @param message SuppressionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuppressionInfo message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. + * @param message SuppressionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuppressionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuppressionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + + /** + * Decodes a SuppressionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuppressionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + + /** + * Verifies a SuppressionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SuppressionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuppressionInfo + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + + /** + * Creates a plain object from a SuppressionInfo message. Also converts values to other types if specified. + * @param message SuppressionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.TailLogEntriesResponse.SuppressionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuppressionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SuppressionInfo { + + /** Reason enum. */ + enum Reason { + REASON_UNSPECIFIED = 0, + RATE_LIMIT = 1, + NOT_CONSUMED = 2 + } + } + } + /** Represents a ConfigServiceV2 */ class ConfigServiceV2 extends $protobuf.rpc.Service { diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 1152314c2e9..0cdfa1404fe 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1429,6 +1429,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#tailLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef TailLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.TailLogEntriesResponse} [response] TailLogEntriesResponse + */ + + /** + * Calls TailLogEntries. + * @function tailLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.ITailLogEntriesRequest} request TailLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.TailLogEntriesCallback} callback Node-style callback called with the error, if any, and TailLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.tailLogEntries = function tailLogEntries(request, callback) { + return this.rpcCall(tailLogEntries, $root.google.logging.v2.TailLogEntriesRequest, $root.google.logging.v2.TailLogEntriesResponse, request, callback); + }, "name", { value: "TailLogEntries" }); + + /** + * Calls TailLogEntries. + * @function tailLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.ITailLogEntriesRequest} request TailLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return LoggingServiceV2; })(); @@ -3347,6 +3380,7 @@ * @property {string|null} [parent] ListLogsRequest parent * @property {number|null} [pageSize] ListLogsRequest pageSize * @property {string|null} [pageToken] ListLogsRequest pageToken + * @property {Array.|null} [resourceNames] ListLogsRequest resourceNames */ /** @@ -3358,6 +3392,7 @@ * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set */ function ListLogsRequest(properties) { + this.resourceNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3388,6 +3423,14 @@ */ ListLogsRequest.prototype.pageToken = ""; + /** + * ListLogsRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.resourceNames = $util.emptyArray; + /** * Creates a new ListLogsRequest instance using the specified properties. * @function create @@ -3418,6 +3461,9 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); return writer; }; @@ -3461,6 +3507,11 @@ case 3: message.pageToken = reader.string(); break; + case 8: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -3505,6 +3556,13 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } return null; }; @@ -3526,6 +3584,13 @@ message.pageSize = object.pageSize | 0; if (object.pageToken != null) message.pageToken = String(object.pageToken); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.ListLogsRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } return message; }; @@ -3542,6 +3607,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.resourceNames = []; if (options.defaults) { object.parent = ""; object.pageSize = 0; @@ -3553,6 +3620,11 @@ object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } return object; }; @@ -3796,6 +3868,756 @@ return ListLogsResponse; })(); + v2.TailLogEntriesRequest = (function() { + + /** + * Properties of a TailLogEntriesRequest. + * @memberof google.logging.v2 + * @interface ITailLogEntriesRequest + * @property {Array.|null} [resourceNames] TailLogEntriesRequest resourceNames + * @property {string|null} [filter] TailLogEntriesRequest filter + * @property {google.protobuf.IDuration|null} [bufferWindow] TailLogEntriesRequest bufferWindow + */ + + /** + * Constructs a new TailLogEntriesRequest. + * @memberof google.logging.v2 + * @classdesc Represents a TailLogEntriesRequest. + * @implements ITailLogEntriesRequest + * @constructor + * @param {google.logging.v2.ITailLogEntriesRequest=} [properties] Properties to set + */ + function TailLogEntriesRequest(properties) { + this.resourceNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TailLogEntriesRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.TailLogEntriesRequest + * @instance + */ + TailLogEntriesRequest.prototype.resourceNames = $util.emptyArray; + + /** + * TailLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.TailLogEntriesRequest + * @instance + */ + TailLogEntriesRequest.prototype.filter = ""; + + /** + * TailLogEntriesRequest bufferWindow. + * @member {google.protobuf.IDuration|null|undefined} bufferWindow + * @memberof google.logging.v2.TailLogEntriesRequest + * @instance + */ + TailLogEntriesRequest.prototype.bufferWindow = null; + + /** + * Creates a new TailLogEntriesRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {google.logging.v2.ITailLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest instance + */ + TailLogEntriesRequest.create = function create(properties) { + return new TailLogEntriesRequest(properties); + }; + + /** + * Encodes the specified TailLogEntriesRequest message. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {google.logging.v2.ITailLogEntriesRequest} message TailLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TailLogEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceNames[i]); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.bufferWindow != null && Object.hasOwnProperty.call(message, "bufferWindow")) + $root.google.protobuf.Duration.encode(message.bufferWindow, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TailLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {google.logging.v2.ITailLogEntriesRequest} message TailLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TailLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TailLogEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TailLogEntriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.bufferWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TailLogEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TailLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TailLogEntriesRequest message. + * @function verify + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TailLogEntriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.bufferWindow != null && message.hasOwnProperty("bufferWindow")) { + var error = $root.google.protobuf.Duration.verify(message.bufferWindow); + if (error) + return "bufferWindow." + error; + } + return null; + }; + + /** + * Creates a TailLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest + */ + TailLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.TailLogEntriesRequest) + return object; + var message = new $root.google.logging.v2.TailLogEntriesRequest(); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.TailLogEntriesRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + if (object.filter != null) + message.filter = String(object.filter); + if (object.bufferWindow != null) { + if (typeof object.bufferWindow !== "object") + throw TypeError(".google.logging.v2.TailLogEntriesRequest.bufferWindow: object expected"); + message.bufferWindow = $root.google.protobuf.Duration.fromObject(object.bufferWindow); + } + return message; + }; + + /** + * Creates a plain object from a TailLogEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {google.logging.v2.TailLogEntriesRequest} message TailLogEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TailLogEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceNames = []; + if (options.defaults) { + object.filter = ""; + object.bufferWindow = null; + } + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.bufferWindow != null && message.hasOwnProperty("bufferWindow")) + object.bufferWindow = $root.google.protobuf.Duration.toObject(message.bufferWindow, options); + return object; + }; + + /** + * Converts this TailLogEntriesRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.TailLogEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + TailLogEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TailLogEntriesRequest; + })(); + + v2.TailLogEntriesResponse = (function() { + + /** + * Properties of a TailLogEntriesResponse. + * @memberof google.logging.v2 + * @interface ITailLogEntriesResponse + * @property {Array.|null} [entries] TailLogEntriesResponse entries + * @property {Array.|null} [suppressionInfo] TailLogEntriesResponse suppressionInfo + */ + + /** + * Constructs a new TailLogEntriesResponse. + * @memberof google.logging.v2 + * @classdesc Represents a TailLogEntriesResponse. + * @implements ITailLogEntriesResponse + * @constructor + * @param {google.logging.v2.ITailLogEntriesResponse=} [properties] Properties to set + */ + function TailLogEntriesResponse(properties) { + this.entries = []; + this.suppressionInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TailLogEntriesResponse entries. + * @member {Array.} entries + * @memberof google.logging.v2.TailLogEntriesResponse + * @instance + */ + TailLogEntriesResponse.prototype.entries = $util.emptyArray; + + /** + * TailLogEntriesResponse suppressionInfo. + * @member {Array.} suppressionInfo + * @memberof google.logging.v2.TailLogEntriesResponse + * @instance + */ + TailLogEntriesResponse.prototype.suppressionInfo = $util.emptyArray; + + /** + * Creates a new TailLogEntriesResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {google.logging.v2.ITailLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse instance + */ + TailLogEntriesResponse.create = function create(properties) { + return new TailLogEntriesResponse(properties); + }; + + /** + * Encodes the specified TailLogEntriesResponse message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {google.logging.v2.ITailLogEntriesResponse} message TailLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TailLogEntriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.suppressionInfo != null && message.suppressionInfo.length) + for (var i = 0; i < message.suppressionInfo.length; ++i) + $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.encode(message.suppressionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TailLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {google.logging.v2.ITailLogEntriesResponse} message TailLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TailLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TailLogEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TailLogEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.suppressionInfo && message.suppressionInfo.length)) + message.suppressionInfo = []; + message.suppressionInfo.push($root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TailLogEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TailLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TailLogEntriesResponse message. + * @function verify + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TailLogEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.suppressionInfo != null && message.hasOwnProperty("suppressionInfo")) { + if (!Array.isArray(message.suppressionInfo)) + return "suppressionInfo: array expected"; + for (var i = 0; i < message.suppressionInfo.length; ++i) { + var error = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify(message.suppressionInfo[i]); + if (error) + return "suppressionInfo." + error; + } + } + return null; + }; + + /** + * Creates a TailLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse + */ + TailLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.TailLogEntriesResponse) + return object; + var message = new $root.google.logging.v2.TailLogEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.TailLogEntriesResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.TailLogEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.suppressionInfo) { + if (!Array.isArray(object.suppressionInfo)) + throw TypeError(".google.logging.v2.TailLogEntriesResponse.suppressionInfo: array expected"); + message.suppressionInfo = []; + for (var i = 0; i < object.suppressionInfo.length; ++i) { + if (typeof object.suppressionInfo[i] !== "object") + throw TypeError(".google.logging.v2.TailLogEntriesResponse.suppressionInfo: object expected"); + message.suppressionInfo[i] = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.fromObject(object.suppressionInfo[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TailLogEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {google.logging.v2.TailLogEntriesResponse} message TailLogEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TailLogEntriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.entries = []; + object.suppressionInfo = []; + } + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.suppressionInfo && message.suppressionInfo.length) { + object.suppressionInfo = []; + for (var j = 0; j < message.suppressionInfo.length; ++j) + object.suppressionInfo[j] = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.toObject(message.suppressionInfo[j], options); + } + return object; + }; + + /** + * Converts this TailLogEntriesResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.TailLogEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + TailLogEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TailLogEntriesResponse.SuppressionInfo = (function() { + + /** + * Properties of a SuppressionInfo. + * @memberof google.logging.v2.TailLogEntriesResponse + * @interface ISuppressionInfo + * @property {google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|null} [reason] SuppressionInfo reason + * @property {number|null} [suppressedCount] SuppressionInfo suppressedCount + */ + + /** + * Constructs a new SuppressionInfo. + * @memberof google.logging.v2.TailLogEntriesResponse + * @classdesc Represents a SuppressionInfo. + * @implements ISuppressionInfo + * @constructor + * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo=} [properties] Properties to set + */ + function SuppressionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SuppressionInfo reason. + * @member {google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason} reason + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @instance + */ + SuppressionInfo.prototype.reason = 0; + + /** + * SuppressionInfo suppressedCount. + * @member {number} suppressedCount + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @instance + */ + SuppressionInfo.prototype.suppressedCount = 0; + + /** + * Creates a new SuppressionInfo instance using the specified properties. + * @function create + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo=} [properties] Properties to set + * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo instance + */ + SuppressionInfo.create = function create(properties) { + return new SuppressionInfo(properties); + }; + + /** + * Encodes the specified SuppressionInfo message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo} message SuppressionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuppressionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); + if (message.suppressedCount != null && Object.hasOwnProperty.call(message, "suppressedCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.suppressedCount); + return writer; + }; + + /** + * Encodes the specified SuppressionInfo message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo} message SuppressionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuppressionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SuppressionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuppressionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.reason = reader.int32(); + break; + case 2: + message.suppressedCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SuppressionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuppressionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SuppressionInfo message. + * @function verify + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuppressionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + switch (message.reason) { + default: + return "reason: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.suppressedCount != null && message.hasOwnProperty("suppressedCount")) + if (!$util.isInteger(message.suppressedCount)) + return "suppressedCount: integer expected"; + return null; + }; + + /** + * Creates a SuppressionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo + */ + SuppressionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo) + return object; + var message = new $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo(); + switch (object.reason) { + case "REASON_UNSPECIFIED": + case 0: + message.reason = 0; + break; + case "RATE_LIMIT": + case 1: + message.reason = 1; + break; + case "NOT_CONSUMED": + case 2: + message.reason = 2; + break; + } + if (object.suppressedCount != null) + message.suppressedCount = object.suppressedCount | 0; + return message; + }; + + /** + * Creates a plain object from a SuppressionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} message SuppressionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuppressionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.reason = options.enums === String ? "REASON_UNSPECIFIED" : 0; + object.suppressedCount = 0; + } + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = options.enums === String ? $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason[message.reason] : message.reason; + if (message.suppressedCount != null && message.hasOwnProperty("suppressedCount")) + object.suppressedCount = message.suppressedCount; + return object; + }; + + /** + * Converts this SuppressionInfo to JSON. + * @function toJSON + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @instance + * @returns {Object.} JSON object + */ + SuppressionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Reason enum. + * @name google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason + * @enum {number} + * @property {number} REASON_UNSPECIFIED=0 REASON_UNSPECIFIED value + * @property {number} RATE_LIMIT=1 RATE_LIMIT value + * @property {number} NOT_CONSUMED=2 NOT_CONSUMED value + */ + SuppressionInfo.Reason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "RATE_LIMIT"] = 1; + values[valuesById[2] = "NOT_CONSUMED"] = 2; + return values; + })(); + + return SuppressionInfo; + })(); + + return TailLogEntriesResponse; + })(); + v2.ConfigServiceV2 = (function() { /** diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index e81cee95c1e..1bc64efb28e 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -322,6 +322,24 @@ "(google.api.method_signature)": "parent" } ] + }, + "TailLogEntries": { + "requestType": "TailLogEntriesRequest", + "requestStream": true, + "responseType": "TailLogEntriesResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v2/entries:tail", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:tail", + "body": "*" + } + } + ] } } }, @@ -506,6 +524,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -522,6 +548,69 @@ } } }, + "TailLogEntriesRequest": { + "fields": { + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "bufferWindow": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TailLogEntriesResponse": { + "fields": { + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 1 + }, + "suppressionInfo": { + "rule": "repeated", + "type": "SuppressionInfo", + "id": 2 + } + }, + "nested": { + "SuppressionInfo": { + "fields": { + "reason": { + "type": "Reason", + "id": 1 + }, + "suppressedCount": { + "type": "int32", + "id": 2 + } + }, + "nested": { + "Reason": { + "values": { + "REASON_UNSPECIFIED": 0, + "RATE_LIMIT": 1, + "NOT_CONSUMED": 2 + } + } + } + } + } + }, "ConfigServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 8f6919ca6fe..f7c7170873c 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -267,6 +267,14 @@ export class LoggingServiceV2Client { ), }; + // Some of the methods on this service provide streaming responses. + // Provide descriptors for these. + this.descriptors.stream = { + tailLogEntries: new this._gaxModule.StreamDescriptor( + gax.StreamType.BIDI_STREAMING + ), + }; + // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. @@ -343,6 +351,7 @@ export class LoggingServiceV2Client { 'listLogEntries', 'listMonitoredResourceDescriptors', 'listLogs', + 'tailLogEntries', ]; for (const methodName of loggingServiceV2StubMethods) { const callPromise = this.loggingServiceV2Stub.then( @@ -360,6 +369,7 @@ export class LoggingServiceV2Client { const descriptor = this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || this.descriptors.batching?.[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( @@ -680,6 +690,31 @@ export class LoggingServiceV2Client { return this.innerApiCalls.writeLogEntries(request, options, callback); } + /** + * Streaming read of log entries as they are ingested. Until the stream is + * terminated, it will continue reading logs. + * + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which is both readable and writable. It accepts objects + * representing [TailLogEntriesRequest]{@link google.logging.v2.TailLogEntriesRequest} for write() method, and + * will emit objects representing [TailLogEntriesResponse]{@link google.logging.v2.TailLogEntriesResponse} on 'data' event asynchronously. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) + * for more details and examples. + * @example + * const stream = client.tailLogEntries(); + * stream.on('data', (response) => { ... }); + * stream.on('end', () => { ... }); + * stream.write(request); + * stream.end(); + */ + tailLogEntries(options?: CallOptions): gax.CancellableStream { + this.initialize(); + return this.innerApiCalls.tailLogEntries(options); + } + listLogEntries( request: protos.google.logging.v2.IListLogEntriesRequest, options?: CallOptions @@ -724,6 +759,11 @@ export class LoggingServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" * + * May alternatively be one or more views + * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] * * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] @@ -811,6 +851,11 @@ export class LoggingServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" * + * May alternatively be one or more views + * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] * * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] @@ -880,6 +925,11 @@ export class LoggingServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" * + * May alternatively be one or more views + * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] * * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] @@ -1173,6 +1223,18 @@ export class LoggingServiceV2Client { * preceding call to this method. `pageToken` must be the value of * `nextPageToken` from the previous response. The values of other method * parameters should be identical to those in the previous call. + * @param {string[]} [request.resourceNames] + * Optional. The resource name that owns the logs: + * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * + * To support legacy queries, it could also be: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1247,6 +1309,18 @@ export class LoggingServiceV2Client { * preceding call to this method. `pageToken` must be the value of * `nextPageToken` from the previous response. The values of other method * parameters should be identical to those in the previous call. + * @param {string[]} [request.resourceNames] + * Optional. The resource name that owns the logs: + * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * + * To support legacy queries, it could also be: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1303,6 +1377,18 @@ export class LoggingServiceV2Client { * preceding call to this method. `pageToken` must be the value of * `nextPageToken` from the previous response. The values of other method * parameters should be identical to those in the previous call. + * @param {string[]} [request.resourceNames] + * Optional. The resource name that owns the logs: + * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * + * To support legacy queries, it could also be: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} diff --git a/handwritten/logging/src/v2/logging_service_v2_client_config.json b/handwritten/logging/src/v2/logging_service_v2_client_config.json index 6ba163db851..342e96e9b3e 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client_config.json +++ b/handwritten/logging/src/v2/logging_service_v2_client_config.json @@ -55,6 +55,11 @@ "timeout_millis": 60000, "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" + }, + "TailLogEntries": { + "timeout_millis": 3600000, + "retry_codes_name": "deadline_exceeded_internal_unavailable", + "retry_params_name": "default" } } } diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 6fe898d5b31..ff5737be51c 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "763b51c72e0fbfed28b44e77947140460ad7c3ee" + "sha": "ed9dcf8785a5abe72cbe407c38dbb900ffa80bc1" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", - "internalRef": "343202295" + "sha": "e8857c4c36948e7e0500377cd7fcecbf2459afc8", + "internalRef": "344435830" } }, { diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 9ef4357c01f..5e421126977 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -52,6 +52,20 @@ function stubSimpleCallWithCallback( : sinon.stub().callsArgWith(2, null, response); } +function stubBidiStreamingCall( + response?: ResponseType, + error?: Error +) { + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + return sinon.stub().returns(mockStream); +} + function stubPageStreamingCall( responses?: ResponseType[], error?: Error @@ -393,6 +407,94 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('tailLogEntries', () => { + it('invokes tailLogEntries without error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.TailLogEntriesRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.TailLogEntriesResponse() + ); + client.innerApiCalls.tailLogEntries = stubBidiStreamingCall( + expectedResponse + ); + const stream = client.tailLogEntries(); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.logging.v2.TailLogEntriesResponse) => { + resolve(response); + } + ); + stream.on('error', (err: Error) => { + reject(err); + }); + stream.write(request); + stream.end(); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.tailLogEntries as SinonStub) + .getCall(0) + .calledWithExactly(undefined) + ); + assert.deepStrictEqual( + (((stream as unknown) as PassThrough)._transform as SinonStub).getCall( + 0 + ).args[0], + request + ); + }); + + it('invokes tailLogEntries with error', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.TailLogEntriesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.tailLogEntries = stubBidiStreamingCall( + undefined, + expectedError + ); + const stream = client.tailLogEntries(); + const promise = new Promise((resolve, reject) => { + stream.on( + 'data', + (response: protos.google.logging.v2.TailLogEntriesResponse) => { + resolve(response); + } + ); + stream.on('error', (err: Error) => { + reject(err); + }); + stream.write(request); + stream.end(); + }); + await assert.rejects(promise, expectedError); + assert( + (client.innerApiCalls.tailLogEntries as SinonStub) + .getCall(0) + .calledWithExactly(undefined) + ); + assert.deepStrictEqual( + (((stream as unknown) as PassThrough)._transform as SinonStub).getCall( + 0 + ).args[0], + request + ); + }); + }); + describe('listLogEntries', () => { it('invokes listLogEntries without error', async () => { const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ From 4f8a123530ee0974777bb279dfc5557bbdcb35e8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2020 15:47:41 -0800 Subject: [PATCH 0697/1029] chore: release 8.2.0 (#952) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 13 +++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 9cd532edad4..3fe562072b0 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [8.2.0](https://www.github.com/googleapis/nodejs-logging/compare/v8.1.1...v8.2.0) (2020-11-30) + + +### Features + +* add the Tailing API to get a live stream of the tail end of filtered logs ([#958](https://www.github.com/googleapis/nodejs-logging/issues/958)) ([c7b2801](https://www.github.com/googleapis/nodejs-logging/commit/c7b280105d79c69ea01a3e490a712c940a851a32)) +* Makes remaining LogBucket and LogViews methods public ([c9a69da](https://www.github.com/googleapis/nodejs-logging/commit/c9a69da3cf4ec3e87f30afc22344191a3e43e26a)) + + +### Bug Fixes + +* **deps:** update dependency type-fest to ^0.20.0 ([#956](https://www.github.com/googleapis/nodejs-logging/issues/956)) ([ed9dcf8](https://www.github.com/googleapis/nodejs-logging/commit/ed9dcf8785a5abe72cbe407c38dbb900ffa80bc1)) + ### [8.1.1](https://www.github.com/googleapis/nodejs-logging/compare/v8.1.0...v8.1.1) (2020-11-16) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b5e3b265332..5f624bcead7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.1.1", + "version": "8.2.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From b1ca793b08a790ed7ae8e1477e6b2e596a693d50 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 30 Nov 2020 16:04:56 -0800 Subject: [PATCH 0698/1029] fix!: users can log httprequest logs without providing a log message (#942) * feat: can log httpRequest entries without log message * test: added system test * style: lint changes Co-authored-by: Simon Zeltser --- handwritten/logging/src/log.ts | 8 +++++++- handwritten/logging/system-test/logging.ts | 24 ++++++++++++++++++++++ handwritten/logging/test/log.ts | 10 ++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 541f98486e7..2992c3ffd45 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -425,10 +425,16 @@ class Log implements LogSeverityFunctions { */ entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; - if (!data) { + if (!data && metadataOrData?.hasOwnProperty('httpRequest')) { + // If user logs entry(httpRequest) + metadata = metadataOrData as LogEntry; + data = {}; + } else if (!data) { + // If user logs entry(message) data = metadataOrData as string | {}; metadata = {}; } else { + // If user logs entry(metadata, message) metadata = metadataOrData as LogEntry; } return this.logging.entry(metadata, data); diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index e3daafa7936..749c3f874a7 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -539,6 +539,30 @@ describe('Logging', () => { }); }); + it('should write a httpRequest log with no message', done => { + const {log} = getTestLog(); + const metadata = { + httpRequest: {status: 200}, + }; + const logEntry = log.entry(metadata); + + log.write(logEntry, err => { + assert.ifError(err); + + getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { + assert.ifError(err); + const entry = entries![0]; + + assert.strictEqual( + entry.metadata.httpRequest?.status, + metadata.httpRequest.status + ); + assert.deepStrictEqual(entry.data, {}); + done(); + }); + }); + }); + it('should set the default resource', done => { const {log} = getTestLog(); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index ca6536bfa5d..28f42a63c99 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -243,11 +243,19 @@ describe('Log', () => { assert(log.logging.entry.calledWithExactly(metadata, data)); }); - it('should assume one argument means data', () => { + it('should assume one regular argument means data', () => { const data = {}; log.entry(data); assert(log.logging.entry.calledWith(sinon.match.any, data)); }); + + it('should assume one httpRequest argument means metadata', () => { + const metadata = { + httpRequest: {}, + }; + log.entry(metadata); + assert(log.logging.entry.calledWith(metadata, {})); + }); }); describe('getEntries', () => { From b0cc3c07c1423687b1a337f9d7aae7b57e0a1d94 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 1 Dec 2020 12:56:05 -0800 Subject: [PATCH 0699/1029] perf!: getEntries filters 24 hour timestamp by default (#955) * feat!: getEntries filters 24 hour timestamp by default * chore: clean up comments * test: fix tests breaking on millisecond difference --- handwritten/logging/src/index.ts | 20 ++++++++++----- handwritten/logging/test/index.ts | 41 +++++++++++++++++++++++++++---- 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index b41c9f82ba7..3d08bc1f23d 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -552,12 +552,20 @@ class Logging { opts?: GetEntriesRequest | GetEntriesCallback ): Promise { const options = opts ? (opts as GetEntriesRequest) : {}; - const reqOpts = extend( - { - orderBy: 'timestamp desc', - }, - options - ); + + // By default, sort entries by descending timestamp + let reqOpts = extend({orderBy: 'timestamp desc'}, options); + + // By default, filter entries to last 24 hours only + const time = new Date(); + time.setDate(time.getDate() - 1); + const timeFilter = `timestamp >= "${time.toISOString()}"`; + if (!options.filter) { + reqOpts = extend({filter: timeFilter}, reqOpts); + } else if (!options.filter.includes('timestamp')) { + reqOpts.filter += ` AND ${timeFilter}`; + } + reqOpts.resourceNames = arrify(reqOpts.resourceNames!); this.projectId = await this.auth.getProjectId(); const resourceName = 'projects/' + this.projectId; diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index edd7bf436c7..fce53c1289f 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -477,26 +477,29 @@ describe('Logging', () => { logging.auth.getProjectId = async () => PROJECT_ID; }); - it('should exec without options', async () => { + it('should exec without options (with defaults)', async () => { logging.loggingService.listLogEntries = async ( - reqOpts: {}, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + reqOpts: any, gaxOpts: {} ) => { assert.deepStrictEqual(reqOpts, { + filter: reqOpts?.filter, orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], }); assert.deepStrictEqual(gaxOpts, { autoPaginate: undefined, }); + assert.ok(reqOpts?.filter.includes('timestamp')); return [[]]; }; await logging.getEntries(); }); - it('should accept options', async () => { - const options = {filter: 'test'}; + it('should accept options (and not overwrite timestamp)', async () => { + const options = {filter: 'timestamp > "2020-11-11T15:01:23.045123456Z"'}; logging.loggingService.listLogEntries = async ( reqOpts: {}, @@ -505,7 +508,7 @@ describe('Logging', () => { assert.deepStrictEqual( reqOpts, extend(options, { - filter: 'test', + filter: 'timestamp > "2020-11-11T15:01:23.045123456Z"', orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], }) @@ -520,6 +523,32 @@ describe('Logging', () => { await logging.getEntries(options); }); + it('should append default timestamp to existing filters', async () => { + const options = {filter: 'test'}; + + logging.loggingService.listLogEntries = async ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + reqOpts: any, + gaxOpts: {} + ) => { + assert.deepStrictEqual( + reqOpts, + extend(options, { + filter: reqOpts?.filter, + orderBy: 'timestamp desc', + resourceNames: ['projects/' + logging.projectId], + }) + ); + assert.deepStrictEqual(gaxOpts, { + autoPaginate: undefined, + }); + assert.ok(reqOpts?.filter.includes('test AND timestamp')); + return [[]]; + }; + + await logging.getEntries(options); + }); + it('should not push the same resourceName again', async () => { const options = { resourceNames: ['projects/' + logging.projectId], @@ -567,12 +596,14 @@ describe('Logging', () => { assert.deepStrictEqual(reqOpts, { a: 'b', c: 'd', + filter: reqOpts?.filter, orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], }); // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.strictEqual((reqOpts as any).gaxOptions, undefined); assert.deepStrictEqual(gaxOpts, options.gaxOptions); + assert.ok(reqOpts?.filter.includes('timestamp')); return [[]]; }; From 96910ab9dcada7b57625d89939810481a4df891c Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 2 Dec 2020 18:27:06 -0500 Subject: [PATCH 0700/1029] fix: only apply logName to filter when not already present (#962) --- handwritten/logging/src/log.ts | 4 ++-- handwritten/logging/test/log.ts | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 2992c3ffd45..4279e8baec9 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -536,9 +536,9 @@ class Log implements LogSeverityFunctions { const options = extend({}, opts as GetEntriesRequest); const projectId = await this.logging.auth.getProjectId(); this.formattedName_ = Log.formatName_(projectId, this.name); - if (options.filter) { + if (options.filter && !options.filter.includes('logName=')) { options.filter = `(${options.filter}) AND logName="${this.formattedName_}"`; - } else { + } else if (!options.filter) { options.filter = `logName="${this.formattedName_}"`; } return this.logging.getEntries(options); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 28f42a63c99..cc12c652540 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -279,6 +279,14 @@ describe('Log', () => { await log.getEntries(options); assert(log.logging.getEntries.calledWithExactly(expectedOptions)); }); + + it('should not add logName filter if already present', async () => { + const filter = `logName="${LOG_NAME_FORMATTED}" AND custom filter`; + const options = {filter}; + + await log.getEntries(options); + assert(log.logging.getEntries.calledWithExactly({filter})); + }); }); describe('getEntriesStream', () => { From 7bdb446ded3d4bab52a1ca269448f7aff38072fe Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Dec 2020 10:54:07 +0100 Subject: [PATCH 0701/1029] chore(deps): update dependency execa to v5 (#964) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5f624bcead7..d12affc4e23 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -86,7 +86,7 @@ "bignumber.js": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", - "execa": "^4.0.0", + "execa": "^5.0.0", "gts": "^2.0.0", "http2spy": "^2.0.0", "jsdoc": "^3.6.3", From cb101db1f7423a3ef1c1b74fbccedfcd1edcdcea Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:56:21 -0800 Subject: [PATCH 0702/1029] chore: generate GAPIC metadata JSON file (#966) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4e7abbc6-c648-4473-9499-aa96f63c63a8/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: https://github.com/googleapis/googleapis/commit/d189e871205fea665a9648f7c4676f027495ccaf --- .../logging/src/v2/gapic_metadata.json | 418 ++++++++++++++++++ handwritten/logging/synth.metadata | 7 +- 2 files changed, 422 insertions(+), 3 deletions(-) create mode 100644 handwritten/logging/src/v2/gapic_metadata.json diff --git a/handwritten/logging/src/v2/gapic_metadata.json b/handwritten/logging/src/v2/gapic_metadata.json new file mode 100644 index 00000000000..cc8c175afdc --- /dev/null +++ b/handwritten/logging/src/v2/gapic_metadata.json @@ -0,0 +1,418 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.logging.v2", + "libraryPackage": "@google-cloud/logging", + "services": { + "ConfigServiceV2": { + "clients": { + "grpc": { + "libraryClient": "ConfigServiceV2Client", + "rpcs": { + "GetBucket": { + "methods": [ + "getBucket" + ] + }, + "CreateBucket": { + "methods": [ + "createBucket" + ] + }, + "UpdateBucket": { + "methods": [ + "updateBucket" + ] + }, + "DeleteBucket": { + "methods": [ + "deleteBucket" + ] + }, + "UndeleteBucket": { + "methods": [ + "undeleteBucket" + ] + }, + "GetView": { + "methods": [ + "getView" + ] + }, + "CreateView": { + "methods": [ + "createView" + ] + }, + "UpdateView": { + "methods": [ + "updateView" + ] + }, + "DeleteView": { + "methods": [ + "deleteView" + ] + }, + "GetSink": { + "methods": [ + "getSink" + ] + }, + "CreateSink": { + "methods": [ + "createSink" + ] + }, + "UpdateSink": { + "methods": [ + "updateSink" + ] + }, + "DeleteSink": { + "methods": [ + "deleteSink" + ] + }, + "GetExclusion": { + "methods": [ + "getExclusion" + ] + }, + "CreateExclusion": { + "methods": [ + "createExclusion" + ] + }, + "UpdateExclusion": { + "methods": [ + "updateExclusion" + ] + }, + "DeleteExclusion": { + "methods": [ + "deleteExclusion" + ] + }, + "GetCmekSettings": { + "methods": [ + "getCmekSettings" + ] + }, + "UpdateCmekSettings": { + "methods": [ + "updateCmekSettings" + ] + }, + "ListBuckets": { + "methods": [ + "listBuckets", + "listBucketsStream", + "listBucketsAsync" + ] + }, + "ListViews": { + "methods": [ + "listViews", + "listViewsStream", + "listViewsAsync" + ] + }, + "ListSinks": { + "methods": [ + "listSinks", + "listSinksStream", + "listSinksAsync" + ] + }, + "ListExclusions": { + "methods": [ + "listExclusions", + "listExclusionsStream", + "listExclusionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ConfigServiceV2Client", + "rpcs": { + "GetBucket": { + "methods": [ + "getBucket" + ] + }, + "CreateBucket": { + "methods": [ + "createBucket" + ] + }, + "UpdateBucket": { + "methods": [ + "updateBucket" + ] + }, + "DeleteBucket": { + "methods": [ + "deleteBucket" + ] + }, + "UndeleteBucket": { + "methods": [ + "undeleteBucket" + ] + }, + "GetView": { + "methods": [ + "getView" + ] + }, + "CreateView": { + "methods": [ + "createView" + ] + }, + "UpdateView": { + "methods": [ + "updateView" + ] + }, + "DeleteView": { + "methods": [ + "deleteView" + ] + }, + "GetSink": { + "methods": [ + "getSink" + ] + }, + "CreateSink": { + "methods": [ + "createSink" + ] + }, + "UpdateSink": { + "methods": [ + "updateSink" + ] + }, + "DeleteSink": { + "methods": [ + "deleteSink" + ] + }, + "GetExclusion": { + "methods": [ + "getExclusion" + ] + }, + "CreateExclusion": { + "methods": [ + "createExclusion" + ] + }, + "UpdateExclusion": { + "methods": [ + "updateExclusion" + ] + }, + "DeleteExclusion": { + "methods": [ + "deleteExclusion" + ] + }, + "GetCmekSettings": { + "methods": [ + "getCmekSettings" + ] + }, + "UpdateCmekSettings": { + "methods": [ + "updateCmekSettings" + ] + }, + "ListBuckets": { + "methods": [ + "listBuckets", + "listBucketsStream", + "listBucketsAsync" + ] + }, + "ListViews": { + "methods": [ + "listViews", + "listViewsStream", + "listViewsAsync" + ] + }, + "ListSinks": { + "methods": [ + "listSinks", + "listSinksStream", + "listSinksAsync" + ] + }, + "ListExclusions": { + "methods": [ + "listExclusions", + "listExclusionsStream", + "listExclusionsAsync" + ] + } + } + } + } + }, + "LoggingServiceV2": { + "clients": { + "grpc": { + "libraryClient": "LoggingServiceV2Client", + "rpcs": { + "DeleteLog": { + "methods": [ + "deleteLog" + ] + }, + "WriteLogEntries": { + "methods": [ + "writeLogEntries" + ] + }, + "TailLogEntries": { + "methods": [ + "tailLogEntries" + ] + }, + "ListLogEntries": { + "methods": [ + "listLogEntries", + "listLogEntriesStream", + "listLogEntriesAsync" + ] + }, + "ListMonitoredResourceDescriptors": { + "methods": [ + "listMonitoredResourceDescriptors", + "listMonitoredResourceDescriptorsStream", + "listMonitoredResourceDescriptorsAsync" + ] + }, + "ListLogs": { + "methods": [ + "listLogs", + "listLogsStream", + "listLogsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "LoggingServiceV2Client", + "rpcs": { + "DeleteLog": { + "methods": [ + "deleteLog" + ] + }, + "WriteLogEntries": { + "methods": [ + "writeLogEntries" + ] + }, + "ListLogEntries": { + "methods": [ + "listLogEntries", + "listLogEntriesStream", + "listLogEntriesAsync" + ] + }, + "ListMonitoredResourceDescriptors": { + "methods": [ + "listMonitoredResourceDescriptors", + "listMonitoredResourceDescriptorsStream", + "listMonitoredResourceDescriptorsAsync" + ] + }, + "ListLogs": { + "methods": [ + "listLogs", + "listLogsStream", + "listLogsAsync" + ] + } + } + } + } + }, + "MetricsServiceV2": { + "clients": { + "grpc": { + "libraryClient": "MetricsServiceV2Client", + "rpcs": { + "GetLogMetric": { + "methods": [ + "getLogMetric" + ] + }, + "CreateLogMetric": { + "methods": [ + "createLogMetric" + ] + }, + "UpdateLogMetric": { + "methods": [ + "updateLogMetric" + ] + }, + "DeleteLogMetric": { + "methods": [ + "deleteLogMetric" + ] + }, + "ListLogMetrics": { + "methods": [ + "listLogMetrics", + "listLogMetricsStream", + "listLogMetricsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MetricsServiceV2Client", + "rpcs": { + "GetLogMetric": { + "methods": [ + "getLogMetric" + ] + }, + "CreateLogMetric": { + "methods": [ + "createLogMetric" + ] + }, + "UpdateLogMetric": { + "methods": [ + "updateLogMetric" + ] + }, + "DeleteLogMetric": { + "methods": [ + "deleteLogMetric" + ] + }, + "ListLogMetrics": { + "methods": [ + "listLogMetrics", + "listLogMetricsStream", + "listLogMetricsAsync" + ] + } + } + } + } + } + } +} diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index ff5737be51c..a91cfcfcf88 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "ed9dcf8785a5abe72cbe407c38dbb900ffa80bc1" + "sha": "ff3a9116db704d8c3e0261fd31154dcc6cb9f1ff" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e8857c4c36948e7e0500377cd7fcecbf2459afc8", - "internalRef": "344435830" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { @@ -99,6 +99,7 @@ "src/v2/config_service_v2_client.ts", "src/v2/config_service_v2_client_config.json", "src/v2/config_service_v2_proto_list.json", + "src/v2/gapic_metadata.json", "src/v2/index.ts", "src/v2/logging_service_v2_client.ts", "src/v2/logging_service_v2_client_config.json", From a605ee35f7a72a060de98dafcec42fc9ede085e2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 7 Dec 2020 09:16:16 -0500 Subject: [PATCH 0703/1029] chore: release 9.0.0 (#963) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 19 +++++++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 3fe562072b0..e4415f22209 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,25 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v8.2.0...v9.0.0) (2020-12-04) + + +### ⚠ BREAKING CHANGES + +* getEntries filters 24 hour timestamp by default (#955) +* users can log httprequest logs without providing a log message (#942) + +### Bug Fixes + +* only apply logName to filter when not already present ([#962](https://www.github.com/googleapis/nodejs-logging/issues/962)) ([f1fbbc4](https://www.github.com/googleapis/nodejs-logging/commit/f1fbbc4dde50c6285ab0ee44a7ebb5dd9298aaeb)) +* **deps:** roll back dependency @google-cloud/logging to ^8.1.1 ([#961](https://www.github.com/googleapis/nodejs-logging/issues/961)) ([1fa8cd3](https://www.github.com/googleapis/nodejs-logging/commit/1fa8cd3bfc0eda6f1811ab44418d6355763ef16e)) +* users can log httprequest logs without providing a log message ([#942](https://www.github.com/googleapis/nodejs-logging/issues/942)) ([d72a296](https://www.github.com/googleapis/nodejs-logging/commit/d72a29665ddd777cfc14234f1458f0a2ffc2e3b5)) + + +### Performance Improvements + +* getEntries filters 24 hour timestamp by default ([#955](https://www.github.com/googleapis/nodejs-logging/issues/955)) ([3d63d5f](https://www.github.com/googleapis/nodejs-logging/commit/3d63d5f8b79c082db37284d84c28311cb107343e)) + ## [8.2.0](https://www.github.com/googleapis/nodejs-logging/compare/v8.1.1...v8.2.0) (2020-11-30) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d12affc4e23..8f0aeeebd30 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "8.2.0", + "version": "9.0.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From d5e12faac8f670376cf3bb2a48e3fd7b5bdb1aab Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 7 Dec 2020 10:51:59 -0800 Subject: [PATCH 0704/1029] test: reenable multiple entry test with null payload value (#968) --- handwritten/logging/system-test/logging.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 749c3f874a7..a0023ab8c44 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -398,10 +398,7 @@ describe('Logging', () => { await log.write(logEntries[1], options); }); - // TODO(bcoe): this appears to be an actual regression with the API that - // we need to dig into `nonValue` is either not being written, or not being - // read appropriately from the API: - it.skip('should write multiple entries to a log', done => { + it('should write multiple entries to a log', done => { const {log, logEntries} = getTestLog(); log.write(logEntries, options, err => { From 9f99a5e55c4b4a81256f936bc02b38914f0037bc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:42:28 -0800 Subject: [PATCH 0705/1029] docs: add instructions for authenticating for system tests (#974) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/910b6b4c-44a8-42e1-939c-9018f9008df4/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- handwritten/logging/CONTRIBUTING.md | 14 ++++++++++++-- handwritten/logging/README.md | 3 +-- handwritten/logging/synth.metadata | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/CONTRIBUTING.md b/handwritten/logging/CONTRIBUTING.md index f6c4cf010e3..b6f4bfd87ee 100644 --- a/handwritten/logging/CONTRIBUTING.md +++ b/handwritten/logging/CONTRIBUTING.md @@ -37,6 +37,14 @@ accept your pull requests. 1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable the Cloud Logging API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + ## Running the tests 1. [Prepare your environment for Node.js setup][setup]. @@ -51,11 +59,9 @@ accept your pull requests. npm test # Run sample integration tests. - gcloud auth application-default login npm run samples-test # Run all system tests. - gcloud auth application-default login npm run system-test 1. Lint (and maybe fix) any changes: @@ -63,3 +69,7 @@ accept your pull requests. npm run fix [setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 21f708ef690..dc1201c0c48 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -115,8 +115,7 @@ these log lines to the API. ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index a91cfcfcf88..04c9414450c 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "ff3a9116db704d8c3e0261fd31154dcc6cb9f1ff" + "sha": "7cab3c5990c51a7026056030f21f4cf69f892c5a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From 1d6ca63cfa1d215017e3bd08cab815fe887026ba Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 7 Jan 2021 09:44:38 -0800 Subject: [PATCH 0706/1029] fix: synth.py pipeline (#979) * fix: removed set_track_obsolete_files line --- handwritten/logging/synth.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index e5ea27edc7b..87c9816b3b6 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -24,8 +24,6 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -s.metadata.set_track_obsolete_files(True) - gapic = gcp.GAPICBazel() version='v2' # tasks has two product names, and a poorly named artman yaml From 54eb01dede6dae6d4923e96767041944c16e2977 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Jan 2021 10:04:41 -0800 Subject: [PATCH 0707/1029] chore: release 9.0.1 (#980) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index e4415f22209..0f8974c33e8 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.0.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.0.0...v9.0.1) (2021-01-07) + + +### Bug Fixes + +* synth.py pipeline ([#979](https://www.github.com/googleapis/nodejs-logging/issues/979)) ([f987b2d](https://www.github.com/googleapis/nodejs-logging/commit/f987b2d11f569f332a0f1fcf7c7c9975c9a92d51)) + ## [9.0.0](https://www.github.com/googleapis/nodejs-logging/compare/v8.2.0...v9.0.0) (2020-12-04) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8f0aeeebd30..bf09a060f93 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.0.0", + "version": "9.0.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From ba8ecfa9b3926d89641abf655471b4c23a616748 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 19:30:16 -0800 Subject: [PATCH 0708/1029] chore: update dates (#981) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/6097b27f-11d0-4351-8f36-1ff5504fc384/targets - [ ] To automatically regenerate this PR, check this box. --- handwritten/logging/.jsdoc.js | 4 +- handwritten/logging/protos/protos.d.ts | 14 +++- handwritten/logging/protos/protos.js | 80 +++++++++++++++++- handwritten/logging/protos/protos.json | 13 ++- .../src/v2/config_service_v2_client.ts | 2 +- handwritten/logging/src/v2/index.ts | 2 +- .../src/v2/logging_service_v2_client.ts | 2 +- .../src/v2/metrics_service_v2_client.ts | 2 +- handwritten/logging/synth.metadata | 82 +------------------ handwritten/logging/system-test/install.ts | 2 +- .../test/gapic_config_service_v2_v2.ts | 2 +- .../test/gapic_logging_service_v2_v2.ts | 2 +- .../test/gapic_metrics_service_v2_v2.ts | 2 +- 13 files changed, 114 insertions(+), 95 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 8f22ec542ff..24e747ed4ea 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/logging', diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index e759458e38d..799826bb85f 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -7228,6 +7228,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -7257,6 +7260,9 @@ export namespace google { /** ResourceDescriptor singular. */ public singular: string; + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set @@ -7336,6 +7342,12 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } /** Properties of a ResourceReference. */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 0cdfa1404fe..34957fe3ccb 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16931,6 +16931,7 @@ * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history * @property {string|null} [plural] ResourceDescriptor plural * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** @@ -16943,6 +16944,7 @@ */ function ResourceDescriptor(properties) { this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16997,6 +16999,14 @@ */ ResourceDescriptor.prototype.singular = ""; + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @function create @@ -17034,6 +17044,12 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; @@ -17088,6 +17104,16 @@ case 6: message.singular = reader.string(); break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; default: reader.skipType(tag & 7); break; @@ -17151,6 +17177,18 @@ if (message.singular != null && message.hasOwnProperty("singular")) if (!$util.isString(message.singular)) return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } return null; }; @@ -17195,6 +17233,23 @@ message.plural = String(object.plural); if (object.singular != null) message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; @@ -17211,8 +17266,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.pattern = []; + object.style = []; + } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -17235,6 +17292,11 @@ object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } return object; }; @@ -17265,6 +17327,20 @@ return values; })(); + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + return ResourceDescriptor; })(); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 1bc64efb28e..e4d4c327697 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -2739,6 +2739,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -2748,6 +2753,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -3106,7 +3117,7 @@ }, "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 0819bf78eff..3937cefa8bb 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/index.ts b/handwritten/logging/src/v2/index.ts index 8b5a2c41d62..de15e10c276 100644 --- a/handwritten/logging/src/v2/index.ts +++ b/handwritten/logging/src/v2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index f7c7170873c..5868c923d15 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 617a3358aaa..e46977d957c 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 04c9414450c..181364aec89 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "7cab3c5990c51a7026056030f21f4cf69f892c5a" + "sha": "cd7d8138afc848bc5b0358e319e5b088a790ed86" } }, { @@ -33,85 +33,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "protos/google/logging/v2/log_entry.proto", - "protos/google/logging/v2/logging.proto", - "protos/google/logging/v2/logging_config.proto", - "protos/google/logging/v2/logging_metrics.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/v2/config_service_v2_client.ts", - "src/v2/config_service_v2_client_config.json", - "src/v2/config_service_v2_proto_list.json", - "src/v2/gapic_metadata.json", - "src/v2/index.ts", - "src/v2/logging_service_v2_client.ts", - "src/v2/logging_service_v2_client_config.json", - "src/v2/logging_service_v2_proto_list.json", - "src/v2/metrics_service_v2_client.ts", - "src/v2/metrics_service_v2_client_config.json", - "src/v2/metrics_service_v2_proto_list.json", - "system-test/install.ts", - "test/gapic_config_service_v2_v2.ts", - "test/gapic_logging_service_v2_v2.ts", - "test/gapic_metrics_service_v2_v2.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 1c140015338..9b2d20f8304 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 5e421126977..c2b8e344527 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index f373c45cb0e..e81a7977d8b 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From b5b37512d5a86fdfbd6b68ffc85540f428e1c831 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:40:22 -0800 Subject: [PATCH 0709/1029] refactor(nodejs): move build cop to flakybot (#983) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/79c017af-4fff-4b22-8cb4-5c2208642be6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- handwritten/logging/.kokoro/samples-test.sh | 6 +++--- handwritten/logging/.kokoro/system-test.sh | 6 +++--- handwritten/logging/.kokoro/test.sh | 6 +++--- handwritten/logging/.kokoro/trampoline_v2.sh | 2 +- handwritten/logging/synth.metadata | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index bab7ba4e967..950f8483428 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -39,14 +39,14 @@ if [ -f samples/package.json ]; then npm link ../ npm install cd .. - # If tests are running against master, configure Build Cop + # If tests are running against master, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop - $KOKORO_GFILE_DIR/linux_amd64/buildcop + chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot + $KOKORO_GFILE_DIR/linux_amd64/flakybot } trap cleanup EXIT HUP fi diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index 8a08400484a..319d1e0eda8 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -33,14 +33,14 @@ fi npm install -# If tests are running against master, configure Build Cop +# If tests are running against master, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop - $KOKORO_GFILE_DIR/linux_amd64/buildcop + chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot + $KOKORO_GFILE_DIR/linux_amd64/flakybot } trap cleanup EXIT HUP fi diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 5be385fef64..5d6383fcb78 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -21,14 +21,14 @@ export NPM_CONFIG_PREFIX=${HOME}/.npm-global cd $(dirname $0)/.. npm install -# If tests are running against master, configure Build Cop +# If tests are running against master, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop - $KOKORO_GFILE_DIR/linux_amd64/buildcop + chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot + $KOKORO_GFILE_DIR/linux_amd64/flakybot } trap cleanup EXIT HUP fi diff --git a/handwritten/logging/.kokoro/trampoline_v2.sh b/handwritten/logging/.kokoro/trampoline_v2.sh index 606d4321458..4d03112128a 100755 --- a/handwritten/logging/.kokoro/trampoline_v2.sh +++ b/handwritten/logging/.kokoro/trampoline_v2.sh @@ -162,7 +162,7 @@ if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then "KOKORO_GITHUB_COMMIT" "KOKORO_GITHUB_PULL_REQUEST_NUMBER" "KOKORO_GITHUB_PULL_REQUEST_COMMIT" - # For Build Cop Bot + # For flakybot "KOKORO_GITHUB_COMMIT_URL" "KOKORO_GITHUB_PULL_REQUEST_URL" ) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 181364aec89..a592b82c104 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "cd7d8138afc848bc5b0358e319e5b088a790ed86" + "sha": "b57ba8152962168c84faa1ab217e92dab14ffaee" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From 52bf27a958979f42d445f2938e701ee71ef6b71d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 2 Feb 2021 14:34:50 -0800 Subject: [PATCH 0710/1029] chore: update common proto files --- handwritten/logging/protos/protos.d.ts | 3 ++- handwritten/logging/protos/protos.js | 7 +++++++ handwritten/logging/protos/protos.json | 3 ++- handwritten/logging/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 799826bb85f..4bb55075f11 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -6769,7 +6769,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } /** Properties of a MonitoredResourceDescriptor. */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 34957fe3ccb..14cb3342a9c 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -15757,6 +15757,7 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -15766,6 +15767,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); @@ -26939,6 +26941,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -27039,6 +27042,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index e4d4c327697..9d5ab8c974c 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -2602,7 +2602,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "MonitoredResourceDescriptor": { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index a592b82c104..f11726e2ff3 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "b57ba8152962168c84faa1ab217e92dab14ffaee" + "sha": "0a9d874fd076219612a67dc8e7e2426ba23247a4" } }, { From f8d1435a1199dc7542ecc4da4611542895ea536a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 4 Feb 2021 08:46:07 -0800 Subject: [PATCH 0711/1029] chore: use repo metadata to populate nodejs CODEOWNERS (#987) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4df45cb9-66e5-4aca-9dbd-68127c02ae5d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/318e351e26ba65b2b3cfa3f61b3b64e3540c3525 --- handwritten/logging/.github/CODEOWNERS | 2 +- handwritten/logging/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/CODEOWNERS b/handwritten/logging/.github/CODEOWNERS index 08e308f9239..89a1c2bf4ce 100644 --- a/handwritten/logging/.github/CODEOWNERS +++ b/handwritten/logging/.github/CODEOWNERS @@ -6,4 +6,4 @@ # The yoshi-nodejs team is the default owner for nodejs repositories. -* @googleapis/api-logging @googleapis/yoshi-nodejs +* @googleapis/yoshi-nodejs @googleapis/api-logging diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index f11726e2ff3..a2af880636d 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "0a9d874fd076219612a67dc8e7e2426ba23247a4" + "sha": "a49a0b74f59e56fe1e06d638118ca307959ec6af" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" + "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" } } ], From 8e1eac1fcd9faaca1366b9f734b27bdfb08d596f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Feb 2021 18:27:46 +0100 Subject: [PATCH 0712/1029] fix(deps): update dependency google-auth-library to v7 (#993) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bf09a060f93..09fecb853ef 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -56,7 +56,7 @@ "eventid": "^1.0.0", "extend": "^3.0.2", "gcp-metadata": "^4.0.0", - "google-auth-library": "^6.0.0", + "google-auth-library": "^7.0.0", "google-gax": "^2.9.2", "is": "^3.3.0", "on-finished": "^2.3.0", From a1bef85aa9bfafbd4b640bb05080bcd083cc0f20 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 9 Feb 2021 09:36:54 -0800 Subject: [PATCH 0713/1029] chore: release 9.0.2 (#994) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 0f8974c33e8..fe9dc3e8c44 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.0.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.0.1...v9.0.2) (2021-02-09) + + +### Bug Fixes + +* **deps:** update dependency google-auth-library to v7 ([#993](https://www.github.com/googleapis/nodejs-logging/issues/993)) ([9edeaf7](https://www.github.com/googleapis/nodejs-logging/commit/9edeaf74b7cbdc55215d5a40db7d3043937c598e)) + ### [9.0.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.0.0...v9.0.1) (2021-01-07) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 09fecb853ef..cb5028ab5fa 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.0.1", + "version": "9.0.2", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 1e77bb0405e0e19a2c86a5d568517220c6c99848 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 3 Mar 2021 09:19:32 -0800 Subject: [PATCH 0714/1029] feat: tail entries wrapper (#998) * feat: should tail log entries as a stream --- handwritten/logging/src/index.ts | 106 ++++++++++++++++++++- handwritten/logging/src/log.ts | 52 ++++++++++ handwritten/logging/system-test/logging.ts | 45 ++++++++- handwritten/logging/test/log.ts | 41 ++++++++ 4 files changed, 242 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 3d08bc1f23d..176d2818f8c 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -22,7 +22,7 @@ import arrify = require('arrify'); import * as extend from 'extend'; import * as gax from 'google-gax'; // eslint-disable-next-line node/no-extraneous-import -import {ClientReadableStream} from '@grpc/grpc-js'; +import {ClientReadableStream, ClientDuplexStream} from '@grpc/grpc-js'; // eslint-disable-next-line @typescript-eslint/no-var-requires const pumpify = require('pumpify'); @@ -44,6 +44,7 @@ import {Entry, LogEntry} from './entry'; import { Log, GetEntriesRequest, + TailEntriesRequest, LogOptions, MonitoredResource, Severity, @@ -106,6 +107,11 @@ export interface GetEntriesCallback { ): void; } +export interface TailEntriesResponse { + entries: Entry[]; + suppressionInfo: google.logging.v2.TailLogEntriesResponse.SuppressionInfo; +} + export interface GetLogsRequest { autoPaginate?: boolean; gaxOptions?: gax.CallOptions; @@ -698,6 +704,104 @@ class Logging { return userStream; } + /** + * Streaming read of live logs as log entries are ingested. Until the stream + * is terminated, it will continue reading logs. + * + * @method Logging#tailEntries + * @param {TailEntriesRequest} [query] Query object for tailing entries. + * @returns {DuplexStream} A duplex stream that emits TailEntriesResponses + * containing an array of {@link Entry} instances. + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * logging.tailEntries() + * .on('error', console.error) + * .on('data', resp => { + * console.log(resp.entries); + * console.log(resp.suppressionInfo); + * }) + * .on('end', function() { + * // All entries retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * logging.getEntriesStream() + * .on('data', function(entry) { + * this.end(); + * }); + */ + tailEntries(options: TailEntriesRequest = {}) { + const userStream = streamEvents(pumpify.obj()); + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let gaxStream: ClientDuplexStream; + + (userStream as AbortableDuplex).abort = () => { + if (gaxStream && gaxStream.cancel) { + gaxStream.cancel(); + } + }; + + const transformStream = through.obj((data, _, next) => { + next( + null, + (() => { + const formattedEntries: Entry[] = []; + data.entries.forEach((entry: google.logging.v2.LogEntry) => { + formattedEntries.push(Entry.fromApiResponse_(entry)); + }); + const resp: TailEntriesResponse = { + entries: formattedEntries, + suppressionInfo: data.suppressionInfo, + }; + return resp; + })() + ); + }); + + this.auth.getProjectId().then(projectId => { + this.projectId = projectId; + + if (options.log) { + if (options.filter) { + options.filter = `(${options.filter}) AND logName="${Log.formatName_( + this.projectId, + options.log + )}"`; + } else { + options.filter = `logName="${Log.formatName_( + this.projectId, + options.log + )}"`; + } + } + options.resourceNames = arrify(options.resourceNames); + options.resourceNames.push(`projects/${this.projectId}`); + const writeOptions = { + resourceNames: options.resourceNames, + ...(options.filter && {filter: options.filter}), + ...(options.bufferWindow && {bufferwindow: options.bufferWindow}), + }; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (!(global as any).GCLOUD_SANDBOX_ENV) { + gaxStream = this.loggingService.tailLogEntries(options.gaxOptions); + // Write can only be called once in a single tail streaming session. + gaxStream.write(writeOptions); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (userStream as any).setPipeline(gaxStream, transformStream); + } + }); + + return userStream; + } + getLogs(options?: GetLogsRequest): Promise; getLogs(callback: GetLogsCallback): void; getLogs(options: GetLogsRequest, callback: GetLogsCallback): void; diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 4279e8baec9..d0152c706b6 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -42,6 +42,14 @@ export interface GetEntriesRequest { resourceNames?: string[] | string; } +export interface TailEntriesRequest { + resourceNames?: string[] | string; + filter?: string; + bufferWindow?: number; + log?: string; + gaxOptions?: CallOptions; +} + export interface LogOptions { removeCircular?: boolean; maxEntrySize?: number; // see: https://cloud.google.com/logging/quotas @@ -588,6 +596,50 @@ class Log implements LogSeverityFunctions { return this.logging.getEntriesStream(options); } + /** + * This method is a wrapper around {module:logging#tailEntries}, but with + * a filter specified to only return {module:logging/entry} objects from this + * log. + * + * @method Log#tailEntries + * @param {TailEntriesRequest} [query] Query object for tailing entries. + * @returns {DuplexStream} A duplex stream that emits TailEntriesResponses + * containing an array of {@link Entry} instances. + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.log('my-log'); + * + * log.tailEntries() + * .on('error', console.error) + * .on('data', resp => { + * console.log(resp.entries); + * console.log(resp.suppressionInfo); + * }) + * .on('end', function() { + * // All entries retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * log.tailEntries() + * .on('data', function(entry) { + * this.end(); + * }); + */ + tailEntries(options?: TailEntriesRequest) { + options = extend( + { + log: this.name, + }, + options + ); + return this.logging.tailEntries(options); + } + info(entry: Entry | Entry[], options?: WriteOptions): Promise; info( entry: Entry | Entry[], diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index a0023ab8c44..4745d68ebc3 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -26,7 +26,7 @@ import {v4} from 'uuid'; import {after, before} from 'mocha'; // eslint-disable-next-line @typescript-eslint/no-var-requires const http2spy = require('http2spy'); -import {Logging, Sink, Log, Entry} from '../src'; +import {Logging, Sink, Log, Entry, TailEntriesResponse} from '../src'; // block all attempts to chat with the metadata server (kokoro runs on GCE) nock(HOST_ADDRESS) @@ -351,6 +351,32 @@ describe('Logging', () => { }); }); + it('should tail log entries as a stream', done => { + const {log, logEntries} = getTestLog(); + + const logInterval = setInterval(() => { + log.write(logEntries, options, err => { + assert.ifError(err); + }); + }, 10000); + + const stream = logging + .tailEntries({ + filter: 'textPayload:"log entry 1"', + }) + .on('error', done) + .once('data', (resp: TailEntriesResponse) => { + assert.strictEqual( + resp.entries.length, + 1, + `Expected 1 tailed entry; Got ${resp.entries.length}.` + ); + clearInterval(logInterval); + stream.end(); + }) + .on('end', done); + }); + describe('log-specific entries', () => { let logExpected: Log; let logEntriesExpected: Entry[]; @@ -386,6 +412,23 @@ describe('Logging', () => { done(); }); }); + + it('should tail log entries as a stream', done => { + const logInterval = setInterval(() => { + logExpected.write(logEntriesExpected, options, err => { + assert.ifError(err); + }); + }, 10000); + + const stream = logExpected + .tailEntries() + .on('error', done) + .once('data', () => { + clearInterval(logInterval); + stream.end(); + }) + .on('end', done); + }); }); it('should write a single entry to a log', done => { diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index cc12c652540..bd27bc653cb 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -62,6 +62,7 @@ describe('Log', () => { log.logging.entry.reset(); log.logging.getEntries.reset(); log.logging.getEntriesStream.reset(); + log.logging.tailEntries.reset(); log.logging.request.reset(); log.logging.loggingService.deleteLog.reset(); log.logging.loggingService.writeLogEntries.reset(); @@ -78,6 +79,7 @@ describe('Log', () => { entry: sinon.stub(), getEntries: sinon.stub(), getEntriesStream: sinon.stub(), + tailEntries: sinon.stub(), request: sinon.stub(), loggingService: { deleteLog: sinon.stub(), @@ -328,6 +330,45 @@ describe('Log', () => { }); }); + describe('tailEntries', () => { + const FAKE_STREAM = {}; + + beforeEach(() => { + log.logging.tailEntries.returns(FAKE_STREAM); + }); + + it('should call Logging tailEntries with defaults', () => { + const stream = log.tailEntries(); + assert.strictEqual(stream, FAKE_STREAM); + assert( + log.logging.tailEntries.calledWithExactly({ + log: LOG_NAME_ENCODED, + }) + ); + }); + + it('should allow overriding the options', () => { + const options = { + custom: true, + filter: 'custom filter', + }; + + const stream = log.tailEntries(options); + assert.strictEqual(stream, FAKE_STREAM); + assert( + log.logging.tailEntries.calledWithExactly( + extend( + {}, + { + log: LOG_NAME_ENCODED, + }, + options + ) + ) + ); + }); + }); + describe('write', () => { let ENTRY: Entry; let ENTRIES: Entry[]; From 66c0c41378326374acb4ca7eaaf8b99c5d0e21f1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Mar 2021 19:27:29 +0100 Subject: [PATCH 0715/1029] fix(deps): update dependency type-fest to ^0.21.0 (#997) Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cb5028ab5fa..3370b227a91 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -64,7 +64,7 @@ "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", "through2": "^4.0.0", - "type-fest": "^0.20.0" + "type-fest": "^0.21.0" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", From c6a9c7d7910e38bcaf17f81ee58a25701bff8352 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:46:45 -0800 Subject: [PATCH 0716/1029] chore: release 9.1.0 (#999) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 12 ++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index fe9dc3e8c44..9fb833c1c00 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.1.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.0.2...v9.1.0) (2021-03-03) + + +### Features + +* tail entries wrapper ([#998](https://www.github.com/googleapis/nodejs-logging/issues/998)) ([bfe8b76](https://www.github.com/googleapis/nodejs-logging/commit/bfe8b765d1c690e81c96f0c71e4e431622f67104)) + + +### Bug Fixes + +* **deps:** update dependency type-fest to ^0.21.0 ([#997](https://www.github.com/googleapis/nodejs-logging/issues/997)) ([47a4c72](https://www.github.com/googleapis/nodejs-logging/commit/47a4c724f4f359f9c3d05360881724cbb14894d7)) + ### [9.0.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.0.1...v9.0.2) (2021-02-09) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3370b227a91..c8adcb59d58 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.0.2", + "version": "9.1.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 459d9b4eafe30baaa15b1492aae40d9181cfac61 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:15 -0800 Subject: [PATCH 0717/1029] build: update gapic-generator-typescript to v1.2.10. (#1001) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7d84eafd-4925-434f-9ffd-6407671972cb/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- handwritten/logging/synth.metadata | 6 +++--- handwritten/logging/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index a2af880636d..10f0411bfe3 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "a49a0b74f59e56fe1e06d638118ca307959ec6af" + "sha": "eea897eb2a89750e486427e5e37503991f2fa570" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/handwritten/logging/webpack.config.js b/handwritten/logging/webpack.config.js index e7dd38dfc2e..1cc3b570dfd 100644 --- a/handwritten/logging/webpack.config.js +++ b/handwritten/logging/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From d337d846dcf45408c6d485688bed99e34f6705e2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 12 Mar 2021 09:56:14 -0800 Subject: [PATCH 0718/1029] build: updates to generated protos --- handwritten/logging/protos/protos.json | 3 +-- handwritten/logging/synth.metadata | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 9d5ab8c974c..b630cd311f5 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -2494,8 +2494,7 @@ "java_multiple_files": true, "java_outer_classname": "LogSeverityProto", "java_package": "com.google.logging.type", - "php_namespace": "Google\\Cloud\\Logging\\Type", - "ruby_package": "Google::Cloud::Logging::Type" + "php_namespace": "Google\\Cloud\\Logging\\Type" }, "nested": { "HttpRequest": { diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 10f0411bfe3..46a3689b64d 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "eea897eb2a89750e486427e5e37503991f2fa570" + "sha": "eec75ec4679e1d4feffb7ff9b29a86bc3b52a315" } }, { From ff4a4fd75daf59c7913b5483405336d52915beae Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 23 Mar 2021 14:42:04 -0700 Subject: [PATCH 0719/1029] test: environment test for Cloud Functions (#1005) * test: add e2e environment tests for Google Cloud Functions --- handwritten/logging/.kokoro/environment.sh | 85 +++++++++++++++++++ .../logging/.kokoro/environment/common.cfg | 20 +++++ .../logging/.kokoro/environment/functions.cfg | 19 +++++ handwritten/logging/.trampolinerc | 2 + handwritten/logging/synth.py | 12 +++ 5 files changed, 138 insertions(+) create mode 100755 handwritten/logging/.kokoro/environment.sh create mode 100644 handwritten/logging/.kokoro/environment/common.cfg create mode 100644 handwritten/logging/.kokoro/environment/functions.cfg diff --git a/handwritten/logging/.kokoro/environment.sh b/handwritten/logging/.kokoro/environment.sh new file mode 100755 index 00000000000..9e45874a1ab --- /dev/null +++ b/handwritten/logging/.kokoro/environment.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +set -eo pipefail + +printenv + +if [[ -z "${ENVIRONMENT:-}" ]]; then + echo "ENVIRONMENT not set. Exiting" + exit 1 +fi + +# Setup service account credentials. +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GCLOUD_PROJECT=long-door-651 +gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS + +set -x + +if [[ -z "${PROJECT_ROOT:-}" ]]; then + PROJECT_ROOT="github/nodejs-logging" +fi + +# Set up local library, generates /build uploaded as a local dependency +npm install +npm run compile + +# Add the test module as a submodule to the repo root +git submodule add https://github.com/googleapis/env-tests-logging +cd "env-tests-logging/" + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Debug: show build environment +env | grep KOKORO + +# Setup project id. +gcloud config set project $GCLOUD_PROJECT + +# set a default zone. +gcloud config set compute/zone us-central1-b + +# authenticate docker +gcloud auth configure-docker -q + +# This block is executed only with Trampoline V2+. +if [[ -n "${TRAMPOLINE_VERSION:-}" ]]; then + # Remove old nox + python3 -m pip uninstall --yes --quiet nox-automation + + # Install nox as a user and add it to the PATH. + python3 -m pip install --user nox + export PATH="${PATH}:${HOME}/.local/bin" +fi + +# create a unique id for this run +UUID=$(python -c 'import uuid; print(uuid.uuid1())' | head -c 7) +export ENVCTL_ID=ci-$UUID +echo $ENVCTL_ID + +# Run the specified environment test +set +e +nox --python 3.7 --session "tests(language='nodejs', platform='$ENVIRONMENT')" +TEST_STATUS_CODE=$? + +# destroy resources +echo "cleaning up..." +./envctl/envctl nodejs $ENVIRONMENT destroy + +# exit with proper status code +exit $TEST_STATUS_CODE diff --git a/handwritten/logging/.kokoro/environment/common.cfg b/handwritten/logging/.kokoro/environment/common.cfg new file mode 100644 index 00000000000..2555f85cd45 --- /dev/null +++ b/handwritten/logging/.kokoro/environment/common.cfg @@ -0,0 +1,20 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" +} diff --git a/handwritten/logging/.kokoro/environment/functions.cfg b/handwritten/logging/.kokoro/environment/functions.cfg new file mode 100644 index 00000000000..d048bde7f63 --- /dev/null +++ b/handwritten/logging/.kokoro/environment/functions.cfg @@ -0,0 +1,19 @@ +# Download resources for environment tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/environment.sh" +} + +# Specify which tests to run +env_vars: { + key: "ENVIRONMENT" + value: "functions" +} + +# TODO: actually use this variable somewhere +env_vars: { + key: "RUNTIME" + value: "nodejs12" +} diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 164613b9e6a..a130284edfe 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -21,6 +21,8 @@ required_envvars+=( # Add env vars which are passed down into the container here. pass_down_envvars+=( "AUTORELEASE_PR" + "ENVIRONMENT" + "RUNTIME" ) # Prevent unintentional override on the default image. diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 87c9816b3b6..28b6700edc3 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -35,4 +35,16 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates) +# adjust .trampolinerc for environment tests +s.replace( + ".trampolinerc", + "required_envvars[^\)]*\)", + "required_envvars+=()" +) +s.replace( + ".trampolinerc", + "pass_down_envvars\+\=\(", + 'pass_down_envvars+=(\n "ENVIRONMENT"\n "RUNTIME"' +) + node.postprocess_gapic_library() From e998c7970208dd23691abe66dc17f3d5edfd8e38 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 25 Mar 2021 13:04:41 -0700 Subject: [PATCH 0720/1029] chore: synth tool formats trampolinerc --- handwritten/logging/.trampolinerc | 5 ++--- handwritten/logging/synth.metadata | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index a130284edfe..0171fdf756b 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -15,14 +15,13 @@ # Template for .trampolinerc # Add required env vars here. -required_envvars+=( -) +required_envvars+=() # Add env vars which are passed down into the container here. pass_down_envvars+=( - "AUTORELEASE_PR" "ENVIRONMENT" "RUNTIME" + "AUTORELEASE_PR" ) # Prevent unintentional override on the default image. diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata index 46a3689b64d..b98302289f6 100644 --- a/handwritten/logging/synth.metadata +++ b/handwritten/logging/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "eec75ec4679e1d4feffb7ff9b29a86bc3b52a315" + "sha": "c61561e050c3e3b4ec9102e4c60f433eeb3b829c" } }, { From 3c7d2d9ce5bdcb75be736f666a5cc49e85775690 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 29 Mar 2021 13:27:42 -0700 Subject: [PATCH 0721/1029] docs: add tailEntries sample and docs (#1009) * docs: add TailEntriesRequest info * docs: added log.tailentries sample * chore: exclude files from synthtool templates --- handwritten/logging/.eslintignore | 1 + handwritten/logging/src/index.ts | 18 ++++++++++++++++++ handwritten/logging/synth.py | 5 ++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore index 9340ad9b86d..5aa2babaa76 100644 --- a/handwritten/logging/.eslintignore +++ b/handwritten/logging/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +env-tests-logging/ diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 176d2818f8c..522cd2914a1 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -704,6 +704,24 @@ class Logging { return userStream; } + /** + * Query object for streaming entries. + * + * @typedef {object} TailEntriesRequest + * @property {Array.|string} [resourceNames] Names of project + * resources to stream logs out of. + * @property {string} [filter] An + * [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced_filters). An + * empty filter matches all log entries. + * @property {number} [bufferWindow=2] A setting to balance the tradeoff + * between viewing the log entries as they are being written and viewing + * them in ascending order. + * @property {string} [log] A name of the log specifying to only return + * entries from this log. + * @property {object} [gaxOptions] Request configuration options, outlined + * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. + */ /** * Streaming read of live logs as log entries are ingested. Until the stream * is terminated, it will continue reading logs. diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 28b6700edc3..5d0f1f9d78b 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -33,7 +33,10 @@ # Copy in templated files common_templates = gcp.CommonTemplates() templates = common_templates.node_library(source_location='build/src') -s.copy(templates) +s.copy(templates, excludes=[ + ".eslintignore", + "CONTRIBUTING.md" +]) # adjust .trampolinerc for environment tests s.replace( From 17c17527ef2ce2566bc2a54611a6bfb43462aa72 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 29 Mar 2021 17:08:05 -0700 Subject: [PATCH 0722/1029] chore: add env-test-logging submodule directly to repo (#1008) Adding submodule directly to repo s.t. external contributors can optionally use it --- env-tests-logging | 1 + handwritten/logging/.gitmodules | 4 ++++ handwritten/logging/CONTRIBUTING.md | 16 +++++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 160000 env-tests-logging create mode 100644 handwritten/logging/.gitmodules diff --git a/env-tests-logging b/env-tests-logging new file mode 160000 index 00000000000..1962721db8a --- /dev/null +++ b/env-tests-logging @@ -0,0 +1 @@ +Subproject commit 1962721db8aa382bb1f658921979a1c183bf2d1a diff --git a/handwritten/logging/.gitmodules b/handwritten/logging/.gitmodules new file mode 100644 index 00000000000..191f3df5be6 --- /dev/null +++ b/handwritten/logging/.gitmodules @@ -0,0 +1,4 @@ +[submodule "env-tests-logging"] + path = env-tests-logging + url = https://github.com/googleapis/env-tests-logging + ignore = dirty diff --git a/handwritten/logging/CONTRIBUTING.md b/handwritten/logging/CONTRIBUTING.md index b6f4bfd87ee..fd50e66e85e 100644 --- a/handwritten/logging/CONTRIBUTING.md +++ b/handwritten/logging/CONTRIBUTING.md @@ -68,8 +68,22 @@ accept your pull requests. npm run fix +## Running the tests in GCP services + +It is possible to end-to-end test this library within specific Google Cloud +Platform environments. The [env-tests-logging](https://github.com/googleapis/env-tests-logging) +submodule contains common tests to ensure correct logging behavior across Google +Cloud Platforms. + +Currently, the following environments are supported: + +| Platform | Runtime | Try it | +| --------------- | -------------- | ------------------------------ | +| Cloud Functions | Nodejs12 | `nox --session "tests(language='nodejs', platform='functions')"` | +| Cloud Run | COMING SOON | `nox --session "tests(language='nodejs', platform='cloudrun')"` | + [setup]: https://cloud.google.com/nodejs/docs/setup [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file +[auth]: https://cloud.google.com/docs/authentication/getting-started From 7811937d06fca8ee7e3f58aff5b2438709a958e5 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 29 Mar 2021 17:22:05 -0700 Subject: [PATCH 0723/1029] chore: add in updated compiled protos (#1012) Adding the updated protos from the `compile-protos` step during compilation --- handwritten/logging/protos/protos.d.ts | 15 +- handwritten/logging/protos/protos.js | 85 +-- handwritten/logging/protos/protos.json | 787 ++----------------------- 3 files changed, 40 insertions(+), 847 deletions(-) diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 4bb55075f11..783c0e42703 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -6769,8 +6769,7 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6 + IMMUTABLE = 5 } /** Properties of a MonitoredResourceDescriptor. */ @@ -7229,9 +7228,6 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -7261,9 +7257,6 @@ export namespace google { /** ResourceDescriptor singular. */ public singular: string; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - /** * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set @@ -7343,12 +7336,6 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } } /** Properties of a ResourceReference. */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 14cb3342a9c..0ad07bc38e9 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -15757,7 +15757,6 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -15767,7 +15766,6 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); @@ -16933,7 +16931,6 @@ * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history * @property {string|null} [plural] ResourceDescriptor plural * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style */ /** @@ -16946,7 +16943,6 @@ */ function ResourceDescriptor(properties) { this.pattern = []; - this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17001,14 +16997,6 @@ */ ResourceDescriptor.prototype.singular = ""; - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - /** * Creates a new ResourceDescriptor instance using the specified properties. * @function create @@ -17046,12 +17034,6 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } return writer; }; @@ -17106,16 +17088,6 @@ case 6: message.singular = reader.string(); break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; default: reader.skipType(tag & 7); break; @@ -17179,18 +17151,6 @@ if (message.singular != null && message.hasOwnProperty("singular")) if (!$util.isString(message.singular)) return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } return null; }; @@ -17235,23 +17195,6 @@ message.plural = String(object.plural); if (object.singular != null) message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } return message; }; @@ -17268,10 +17211,8 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { + if (options.arrays || options.defaults) object.pattern = []; - object.style = []; - } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -17294,11 +17235,6 @@ object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } return object; }; @@ -17329,20 +17265,6 @@ return values; })(); - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - return ResourceDescriptor; })(); @@ -26941,7 +26863,6 @@ case 3: case 4: case 5: - case 6: break; } } @@ -27042,10 +26963,6 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index b630cd311f5..377cc0cbe92 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -210,31 +210,7 @@ "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}", "(google.api.method_signature)": "log_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{log_name=projects/*/logs/*}", - "additional_bindings": [ - { - "delete": "/v2/{log_name=*/*/logs/*}" - }, - { - "delete": "/v2/{log_name=organizations/*/logs/*}" - }, - { - "delete": "/v2/{log_name=folders/*/logs/*}" - }, - { - "delete": "/v2/{log_name=billingAccounts/*/logs/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "log_name" - } - ] + } }, "WriteLogEntries": { "requestType": "WriteLogEntriesRequest", @@ -243,18 +219,7 @@ "(google.api.http).post": "/v2/entries:write", "(google.api.http).body": "*", "(google.api.method_signature)": "log_name,resource,labels,entries" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/entries:write", - "body": "*" - } - }, - { - "(google.api.method_signature)": "log_name,resource,labels,entries" - } - ] + } }, "ListLogEntries": { "requestType": "ListLogEntriesRequest", @@ -263,32 +228,14 @@ "(google.api.http).post": "/v2/entries:list", "(google.api.http).body": "*", "(google.api.method_signature)": "resource_names,filter,order_by" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/entries:list", - "body": "*" - } - }, - { - "(google.api.method_signature)": "resource_names,filter,order_by" - } - ] + } }, "ListMonitoredResourceDescriptors": { "requestType": "ListMonitoredResourceDescriptorsRequest", "responseType": "ListMonitoredResourceDescriptorsResponse", "options": { "(google.api.http).get": "/v2/monitoredResourceDescriptors" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/monitoredResourceDescriptors" - } - } - ] + } }, "ListLogs": { "requestType": "ListLogsRequest", @@ -297,31 +244,7 @@ "(google.api.http).get": "/v2/{parent=*/*}/logs", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*}/logs", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*}/logs" - }, - { - "get": "/v2/{parent=organizations/*}/logs" - }, - { - "get": "/v2/{parent=folders/*}/logs" - }, - { - "get": "/v2/{parent=billingAccounts/*}/logs" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + } }, "TailLogEntries": { "requestType": "TailLogEntriesRequest", @@ -331,15 +254,7 @@ "options": { "(google.api.http).post": "/v2/entries:tail", "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/entries:tail", - "body": "*" - } - } - ] + } } } }, @@ -624,31 +539,7 @@ "(google.api.http).get": "/v2/{parent=*/*/locations/*}/buckets", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*}/buckets", "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*/locations/*}/buckets", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*/locations/*}/buckets" - }, - { - "get": "/v2/{parent=organizations/*/locations/*}/buckets" - }, - { - "get": "/v2/{parent=folders/*/locations/*}/buckets" - }, - { - "get": "/v2/{parent=billingAccounts/*/locations/*}/buckets" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + } }, "GetBucket": { "requestType": "GetBucketRequest", @@ -656,28 +547,7 @@ "options": { "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=*/*/locations/*/buckets/*}", - "additional_bindings": [ - { - "get": "/v2/{name=projects/*/locations/*/buckets/*}" - }, - { - "get": "/v2/{name=organizations/*/locations/*/buckets/*}" - }, - { - "get": "/v2/{name=folders/*/locations/*/buckets/*}" - }, - { - "get": "/v2/{name=billingAccounts/*/buckets/*}" - } - ] - } - } - ] + } }, "CreateBucket": { "requestType": "CreateBucketRequest", @@ -687,33 +557,7 @@ "(google.api.http).body": "bucket", "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", "(google.api.http).additional_bindings.body": "bucket" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=*/*/locations/*}/buckets", - "body": "bucket", - "additional_bindings": [ - { - "post": "/v2/{parent=projects/*/locations/*}/buckets", - "body": "bucket" - }, - { - "post": "/v2/{parent=organizations/*/locations/*}/buckets", - "body": "bucket" - }, - { - "post": "/v2/{parent=folders/*/locations/*}/buckets", - "body": "bucket" - }, - { - "post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", - "body": "bucket" - } - ] - } - } - ] + } }, "UpdateBucket": { "requestType": "UpdateBucketRequest", @@ -723,33 +567,7 @@ "(google.api.http).body": "bucket", "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", "(google.api.http).additional_bindings.body": "bucket" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{name=*/*/locations/*/buckets/*}", - "body": "bucket", - "additional_bindings": [ - { - "patch": "/v2/{name=projects/*/locations/*/buckets/*}", - "body": "bucket" - }, - { - "patch": "/v2/{name=organizations/*/locations/*/buckets/*}", - "body": "bucket" - }, - { - "patch": "/v2/{name=folders/*/locations/*/buckets/*}", - "body": "bucket" - }, - { - "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", - "body": "bucket" - } - ] - } - } - ] + } }, "DeleteBucket": { "requestType": "DeleteBucketRequest", @@ -757,28 +575,7 @@ "options": { "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*}", "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=*/*/locations/*/buckets/*}", - "additional_bindings": [ - { - "delete": "/v2/{name=projects/*/locations/*/buckets/*}" - }, - { - "delete": "/v2/{name=organizations/*/locations/*/buckets/*}" - }, - { - "delete": "/v2/{name=folders/*/locations/*/buckets/*}" - }, - { - "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" - } - ] - } - } - ] + } }, "UndeleteBucket": { "requestType": "UndeleteBucketRequest", @@ -788,33 +585,7 @@ "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{name=*/*/locations/*/buckets/*}:undelete", - "body": "*", - "additional_bindings": [ - { - "post": "/v2/{name=projects/*/locations/*/buckets/*}:undelete", - "body": "*" - }, - { - "post": "/v2/{name=organizations/*/locations/*/buckets/*}:undelete", - "body": "*" - }, - { - "post": "/v2/{name=folders/*/locations/*/buckets/*}:undelete", - "body": "*" - }, - { - "post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", - "body": "*" - } - ] - } - } - ] + } }, "ListViews": { "requestType": "ListViewsRequest", @@ -823,31 +594,7 @@ "(google.api.http).get": "/v2/{parent=*/*/locations/*/buckets/*}/views", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*/locations/*/buckets/*}/views", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*/locations/*/buckets/*}/views" - }, - { - "get": "/v2/{parent=organizations/*/locations/*/buckets/*}/views" - }, - { - "get": "/v2/{parent=folders/*/locations/*/buckets/*}/views" - }, - { - "get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + } }, "GetView": { "requestType": "GetViewRequest", @@ -855,28 +602,7 @@ "options": { "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "additional_bindings": [ - { - "get": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" - }, - { - "get": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" - }, - { - "get": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" - }, - { - "get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" - } - ] - } - } - ] + } }, "CreateView": { "requestType": "CreateViewRequest", @@ -886,33 +612,7 @@ "(google.api.http).body": "view", "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", "(google.api.http).additional_bindings.body": "view" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=*/*/locations/*/buckets/*}/views", - "body": "view", - "additional_bindings": [ - { - "post": "/v2/{parent=projects/*/locations/*/buckets/*}/views", - "body": "view" - }, - { - "post": "/v2/{parent=organizations/*/locations/*/buckets/*}/views", - "body": "view" - }, - { - "post": "/v2/{parent=folders/*/locations/*/buckets/*}/views", - "body": "view" - }, - { - "post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", - "body": "view" - } - ] - } - } - ] + } }, "UpdateView": { "requestType": "UpdateViewRequest", @@ -922,33 +622,7 @@ "(google.api.http).body": "view", "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", "(google.api.http).additional_bindings.body": "view" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "body": "view", - "additional_bindings": [ - { - "patch": "/v2/{name=projects/*/locations/*/buckets/*/views/*}", - "body": "view" - }, - { - "patch": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}", - "body": "view" - }, - { - "patch": "/v2/{name=folders/*/locations/*/buckets/*/views/*}", - "body": "view" - }, - { - "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", - "body": "view" - } - ] - } - } - ] + } }, "DeleteView": { "requestType": "DeleteViewRequest", @@ -956,28 +630,7 @@ "options": { "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "additional_bindings": [ - { - "delete": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" - }, - { - "delete": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" - }, - { - "delete": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" - }, - { - "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" - } - ] - } - } - ] + } }, "ListSinks": { "requestType": "ListSinksRequest", @@ -986,31 +639,7 @@ "(google.api.http).get": "/v2/{parent=*/*}/sinks", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks", "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*}/sinks", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*}/sinks" - }, - { - "get": "/v2/{parent=organizations/*}/sinks" - }, - { - "get": "/v2/{parent=folders/*}/sinks" - }, - { - "get": "/v2/{parent=billingAccounts/*}/sinks" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + } }, "GetSink": { "requestType": "GetSinkRequest", @@ -1019,31 +648,7 @@ "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{sink_name=*/*/sinks/*}", - "additional_bindings": [ - { - "get": "/v2/{sink_name=projects/*/sinks/*}" - }, - { - "get": "/v2/{sink_name=organizations/*/sinks/*}" - }, - { - "get": "/v2/{sink_name=folders/*/sinks/*}" - }, - { - "get": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "sink_name" - } - ] + } }, "CreateSink": { "requestType": "CreateSinkRequest", @@ -1054,36 +659,7 @@ "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", "(google.api.http).additional_bindings.body": "sink", "(google.api.method_signature)": "parent,sink" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=*/*}/sinks", - "body": "sink", - "additional_bindings": [ - { - "post": "/v2/{parent=projects/*}/sinks", - "body": "sink" - }, - { - "post": "/v2/{parent=organizations/*}/sinks", - "body": "sink" - }, - { - "post": "/v2/{parent=folders/*}/sinks", - "body": "sink" - }, - { - "post": "/v2/{parent=billingAccounts/*}/sinks", - "body": "sink" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,sink" - } - ] + } }, "UpdateSink": { "requestType": "UpdateSinkRequest", @@ -1095,55 +671,7 @@ "(google.api.http).additional_bindings.body": "sink", "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name,sink" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v2/{sink_name=*/*/sinks/*}", - "body": "sink", - "additional_bindings": [ - { - "put": "/v2/{sink_name=projects/*/sinks/*}", - "body": "sink" - }, - { - "put": "/v2/{sink_name=organizations/*/sinks/*}", - "body": "sink" - }, - { - "put": "/v2/{sink_name=folders/*/sinks/*}", - "body": "sink" - }, - { - "put": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "body": "sink" - }, - { - "patch": "/v2/{sink_name=projects/*/sinks/*}", - "body": "sink" - }, - { - "patch": "/v2/{sink_name=organizations/*/sinks/*}", - "body": "sink" - }, - { - "patch": "/v2/{sink_name=folders/*/sinks/*}", - "body": "sink" - }, - { - "patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "body": "sink" - } - ] - } - }, - { - "(google.api.method_signature)": "sink_name,sink,update_mask" - }, - { - "(google.api.method_signature)": "sink_name,sink" - } - ] + } }, "DeleteSink": { "requestType": "DeleteSinkRequest", @@ -1152,31 +680,7 @@ "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{sink_name=*/*/sinks/*}", - "additional_bindings": [ - { - "delete": "/v2/{sink_name=projects/*/sinks/*}" - }, - { - "delete": "/v2/{sink_name=organizations/*/sinks/*}" - }, - { - "delete": "/v2/{sink_name=folders/*/sinks/*}" - }, - { - "delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "sink_name" - } - ] + } }, "ListExclusions": { "requestType": "ListExclusionsRequest", @@ -1185,31 +689,7 @@ "(google.api.http).get": "/v2/{parent=*/*}/exclusions", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions", "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*}/exclusions", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*}/exclusions" - }, - { - "get": "/v2/{parent=organizations/*}/exclusions" - }, - { - "get": "/v2/{parent=folders/*}/exclusions" - }, - { - "get": "/v2/{parent=billingAccounts/*}/exclusions" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + } }, "GetExclusion": { "requestType": "GetExclusionRequest", @@ -1218,31 +698,7 @@ "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=*/*/exclusions/*}", - "additional_bindings": [ - { - "get": "/v2/{name=projects/*/exclusions/*}" - }, - { - "get": "/v2/{name=organizations/*/exclusions/*}" - }, - { - "get": "/v2/{name=folders/*/exclusions/*}" - }, - { - "get": "/v2/{name=billingAccounts/*/exclusions/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] + } }, "CreateExclusion": { "requestType": "CreateExclusionRequest", @@ -1253,36 +709,7 @@ "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", "(google.api.http).additional_bindings.body": "exclusion", "(google.api.method_signature)": "parent,exclusion" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=*/*}/exclusions", - "body": "exclusion", - "additional_bindings": [ - { - "post": "/v2/{parent=projects/*}/exclusions", - "body": "exclusion" - }, - { - "post": "/v2/{parent=organizations/*}/exclusions", - "body": "exclusion" - }, - { - "post": "/v2/{parent=folders/*}/exclusions", - "body": "exclusion" - }, - { - "post": "/v2/{parent=billingAccounts/*}/exclusions", - "body": "exclusion" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,exclusion" - } - ] + } }, "UpdateExclusion": { "requestType": "UpdateExclusionRequest", @@ -1293,36 +720,7 @@ "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.http).additional_bindings.body": "exclusion", "(google.api.method_signature)": "name,exclusion,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{name=*/*/exclusions/*}", - "body": "exclusion", - "additional_bindings": [ - { - "patch": "/v2/{name=projects/*/exclusions/*}", - "body": "exclusion" - }, - { - "patch": "/v2/{name=organizations/*/exclusions/*}", - "body": "exclusion" - }, - { - "patch": "/v2/{name=folders/*/exclusions/*}", - "body": "exclusion" - }, - { - "patch": "/v2/{name=billingAccounts/*/exclusions/*}", - "body": "exclusion" - } - ] - } - }, - { - "(google.api.method_signature)": "name,exclusion,update_mask" - } - ] + } }, "DeleteExclusion": { "requestType": "DeleteExclusionRequest", @@ -1331,31 +729,7 @@ "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=*/*/exclusions/*}", - "additional_bindings": [ - { - "delete": "/v2/{name=projects/*/exclusions/*}" - }, - { - "delete": "/v2/{name=organizations/*/exclusions/*}" - }, - { - "delete": "/v2/{name=folders/*/exclusions/*}" - }, - { - "delete": "/v2/{name=billingAccounts/*/exclusions/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] + } }, "GetCmekSettings": { "requestType": "GetCmekSettingsRequest", @@ -1363,17 +737,7 @@ "options": { "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=*/*}/cmekSettings", - "additional_bindings": { - "get": "/v2/{name=organizations/*}/cmekSettings" - } - } - } - ] + } }, "UpdateCmekSettings": { "requestType": "UpdateCmekSettingsRequest", @@ -1383,19 +747,7 @@ "(google.api.http).body": "cmek_settings", "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*}/cmekSettings", "(google.api.http).additional_bindings.body": "cmek_settings" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{name=*/*}/cmekSettings", - "body": "cmek_settings", - "additional_bindings": { - "patch": "/v2/{name=organizations/*}/cmekSettings", - "body": "cmek_settings" - } - } - } - ] + } } } }, @@ -2207,17 +1559,7 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*}/metrics", "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=projects/*}/metrics" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + } }, "GetLogMetric": { "requestType": "GetLogMetricRequest", @@ -2225,17 +1567,7 @@ "options": { "(google.api.http).get": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.method_signature)": "metric_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{metric_name=projects/*/metrics/*}" - } - }, - { - "(google.api.method_signature)": "metric_name" - } - ] + } }, "CreateLogMetric": { "requestType": "CreateLogMetricRequest", @@ -2244,18 +1576,7 @@ "(google.api.http).post": "/v2/{parent=projects/*}/metrics", "(google.api.http).body": "metric", "(google.api.method_signature)": "parent,metric" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=projects/*}/metrics", - "body": "metric" - } - }, - { - "(google.api.method_signature)": "parent,metric" - } - ] + } }, "UpdateLogMetric": { "requestType": "UpdateLogMetricRequest", @@ -2264,18 +1585,7 @@ "(google.api.http).put": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.http).body": "metric", "(google.api.method_signature)": "metric_name,metric" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v2/{metric_name=projects/*/metrics/*}", - "body": "metric" - } - }, - { - "(google.api.method_signature)": "metric_name,metric" - } - ] + } }, "DeleteLogMetric": { "requestType": "DeleteLogMetricRequest", @@ -2283,17 +1593,7 @@ "options": { "(google.api.http).delete": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.method_signature)": "metric_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{metric_name=projects/*/metrics/*}" - } - }, - { - "(google.api.method_signature)": "metric_name" - } - ] + } } } }, @@ -2494,7 +1794,8 @@ "java_multiple_files": true, "java_outer_classname": "LogSeverityProto", "java_package": "com.google.logging.type", - "php_namespace": "Google\\Cloud\\Logging\\Type" + "php_namespace": "Google\\Cloud\\Logging\\Type", + "ruby_package": "Google::Cloud::Logging::Type" }, "nested": { "HttpRequest": { @@ -2601,8 +1902,7 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "IMMUTABLE": 5 } }, "MonitoredResourceDescriptor": { @@ -2739,11 +2039,6 @@ "singular": { "type": "string", "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 } }, "nested": { @@ -2753,12 +2048,6 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } } } }, @@ -3117,7 +2406,7 @@ }, "protobuf": { "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", From 29dc1c7ac8f9f575ea3b8c11e0c8775a8afaf77b Mon Sep 17 00:00:00 2001 From: 0Delta <0deltast@gmail.com> Date: Wed, 31 Mar 2021 07:27:34 +0900 Subject: [PATCH 0724/1029] fix: Insufficient return values for `GetEntriesResponse` and `GetLogsResponse` (#1011) fix #1010 Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 522cd2914a1..f6f37c18d5a 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -498,7 +498,8 @@ class Logging { /** * @typedef {array} GetEntriesResponse * @property {Entry[]} 0 Array of {@link Entry} instances. - * @property {object} 1 The full API response. + * @property {object} 1 The full API request. + * @property {object} 2 The full API response. */ /** * @callback GetEntriesCallback @@ -841,7 +842,8 @@ class Logging { /** * @typedef {array} GetLogsResponse * @property {Log[]} 0 Array of {@link Log} instances. - * @property {object} 1 The full API response. + * @property {object} 1 The full API request. + * @property {object} 2 The full API response. */ /** * @callback GetLogsCallback From 3f87aead1e498c00f490badb1b69c1914ff06d79 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 31 Mar 2021 12:29:14 -0700 Subject: [PATCH 0725/1029] test: fix environment test script (#1014) * test: update submodule now that its included by default * chore: ignore submodule in prettier linter * chore: synthtool to ignore submodule --- handwritten/logging/.eslintignore | 2 +- handwritten/logging/.kokoro/environment.sh | 4 ++-- handwritten/logging/.prettierignore | 1 + handwritten/logging/synth.py | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.eslintignore b/handwritten/logging/.eslintignore index 5aa2babaa76..971b25656bb 100644 --- a/handwritten/logging/.eslintignore +++ b/handwritten/logging/.eslintignore @@ -4,4 +4,4 @@ test/fixtures build/ docs/ protos/ -env-tests-logging/ +**/env-tests-logging diff --git a/handwritten/logging/.kokoro/environment.sh b/handwritten/logging/.kokoro/environment.sh index 9e45874a1ab..a9de2517ce5 100755 --- a/handwritten/logging/.kokoro/environment.sh +++ b/handwritten/logging/.kokoro/environment.sh @@ -38,8 +38,8 @@ fi npm install npm run compile -# Add the test module as a submodule to the repo root -git submodule add https://github.com/googleapis/env-tests-logging +# make sure submodule is up to date +git submodule update --init --recursive cd "env-tests-logging/" # Disable buffering, so that the logs stream through. diff --git a/handwritten/logging/.prettierignore b/handwritten/logging/.prettierignore index 9340ad9b86d..971b25656bb 100644 --- a/handwritten/logging/.prettierignore +++ b/handwritten/logging/.prettierignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +**/env-tests-logging diff --git a/handwritten/logging/synth.py b/handwritten/logging/synth.py index 5d0f1f9d78b..545849a6943 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/synth.py @@ -28,13 +28,14 @@ version='v2' # tasks has two product names, and a poorly named artman yaml v2_library = gapic.node_library("logging", version, proto_path=f'google/logging/{version}') -s.copy(v2_library, excludes=["src/index.ts", "README.md", "package.json", "system-test/fixtures/sample/src/index.js", "system-test/fixtures/sample/src/index.ts"]) +s.copy(v2_library, excludes=[".eslintignore", ".prettierignore", "src/index.ts", "README.md", "package.json", "system-test/fixtures/sample/src/index.js", "system-test/fixtures/sample/src/index.ts"]) # Copy in templated files common_templates = gcp.CommonTemplates() templates = common_templates.node_library(source_location='build/src') s.copy(templates, excludes=[ ".eslintignore", + ".prettierignore", "CONTRIBUTING.md" ]) From 5b32d6319187fc99494246db90f8930d092a3e63 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 31 Mar 2021 12:37:54 -0700 Subject: [PATCH 0726/1029] test: add environment tests on Cloud Run (#1016) * test: add cloud run environment test build config * chore: pin env-tests-logging submodule f0e272 --- env-tests-logging | 2 +- handwritten/logging/.kokoro/environment/cloudrun.cfg | 11 +++++++++++ handwritten/logging/.kokoro/environment/common.cfg | 8 ++++++++ handwritten/logging/.kokoro/environment/functions.cfg | 8 -------- 4 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 handwritten/logging/.kokoro/environment/cloudrun.cfg diff --git a/env-tests-logging b/env-tests-logging index 1962721db8a..f0e2726579e 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit 1962721db8aa382bb1f658921979a1c183bf2d1a +Subproject commit f0e2726579ef96f8e6b3ceaed8145d2bfbfa32bc diff --git a/handwritten/logging/.kokoro/environment/cloudrun.cfg b/handwritten/logging/.kokoro/environment/cloudrun.cfg new file mode 100644 index 00000000000..3b81172b0d5 --- /dev/null +++ b/handwritten/logging/.kokoro/environment/cloudrun.cfg @@ -0,0 +1,11 @@ +# Specify which tests to run +env_vars: { + key: "ENVIRONMENT" + value: "cloudrun" +} + +# TODO: actually use this variable somewhere +env_vars: { + key: "RUNTIME" + value: "nodejs12" +} diff --git a/handwritten/logging/.kokoro/environment/common.cfg b/handwritten/logging/.kokoro/environment/common.cfg index 2555f85cd45..24d85d51dc5 100644 --- a/handwritten/logging/.kokoro/environment/common.cfg +++ b/handwritten/logging/.kokoro/environment/common.cfg @@ -18,3 +18,11 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" } + +# Download resources for environment tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-logging/.kokoro/environment.sh" +} diff --git a/handwritten/logging/.kokoro/environment/functions.cfg b/handwritten/logging/.kokoro/environment/functions.cfg index d048bde7f63..e2e5c9d0168 100644 --- a/handwritten/logging/.kokoro/environment/functions.cfg +++ b/handwritten/logging/.kokoro/environment/functions.cfg @@ -1,11 +1,3 @@ -# Download resources for environment tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/environment.sh" -} - # Specify which tests to run env_vars: { key: "ENVIRONMENT" From 2998464cace289dc11fd9d0ee0f287ef51d9813e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 12:46:27 -0700 Subject: [PATCH 0727/1029] chore: release 9.1.1 (#1015) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 9fb833c1c00..ce00bbcd4cf 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.1.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.1.0...v9.1.1) (2021-03-31) + + +### Bug Fixes + +* Insufficient return values for `GetEntriesResponse` and `GetLogsResponse` ([#1011](https://www.github.com/googleapis/nodejs-logging/issues/1011)) ([0157ae1](https://www.github.com/googleapis/nodejs-logging/commit/0157ae14899cc885d584a9fe9f7f3bbe24188eb2)), closes [#1010](https://www.github.com/googleapis/nodejs-logging/issues/1010) + ## [9.1.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.0.2...v9.1.0) (2021-03-03) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c8adcb59d58..0ca3c731cbd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.1.0", + "version": "9.1.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 8838ac8022922b5a1bac04d2b3d0bf48ce2564f6 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 1 Apr 2021 09:19:44 -0700 Subject: [PATCH 0728/1029] fix(deps): drop dependency on type-fest (#1020) * fix(deps): drop dependency on type-fest * even easier --- handwritten/logging/package.json | 3 +-- handwritten/logging/src/entry.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0ca3c731cbd..1b0d27c4ff8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,8 +63,7 @@ "pumpify": "^2.0.1", "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5", - "through2": "^4.0.0", - "type-fest": "^0.21.0" + "through2": "^4.0.0" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index c993e291c37..5fd9d151657 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import {Merge} from 'type-fest'; // eslint-disable-next-line @typescript-eslint/no-var-requires const EventId = require('eventid'); import * as extend from 'extend'; @@ -26,13 +25,14 @@ const eventId = new EventId(); export type Timestamp = google.protobuf.ITimestamp | Date | string; export type LogSeverity = google.logging.type.LogSeverity | string; -export type LogEntry = Merge< +export type LogEntry = Omit< google.logging.v2.ILogEntry, - { - timestamp?: Timestamp | null; - severity?: LogSeverity | null; - } ->; + 'timestamp' | 'severity' +> & { + timestamp?: Timestamp | null; + severity?: LogSeverity | null; +}; + // eslint-disable-next-line @typescript-eslint/no-explicit-any export type Data = any; From 01703efc82d3112ef7e03ac4a5e618b03c31107b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 1 Apr 2021 13:52:38 -0700 Subject: [PATCH 0729/1029] fix(deps): drop dependency on is (#1021) --- handwritten/logging/.gitignore | 1 + handwritten/logging/package.json | 2 -- handwritten/logging/src/common.ts | 28 ++++++++++++++-------------- handwritten/logging/src/entry.ts | 13 ++++++------- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index 5d32b23782f..783162def96 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -12,3 +12,4 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ +.vscode diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1b0d27c4ff8..265d5dbe56c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,7 +58,6 @@ "gcp-metadata": "^4.0.0", "google-auth-library": "^7.0.0", "google-gax": "^2.9.2", - "is": "^3.3.0", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "snakecase-keys": "^3.1.2", @@ -70,7 +69,6 @@ "@google-cloud/pubsub": "^2.0.0", "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", - "@types/is": "0.0.21", "@types/mocha": "^8.0.0", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.3", diff --git a/handwritten/logging/src/common.ts b/handwritten/logging/src/common.ts index 5595b40a0ea..b03f6e604a8 100644 --- a/handwritten/logging/src/common.ts +++ b/handwritten/logging/src/common.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -import * as is from 'is'; - export interface ObjectToStructConverterConfig { removeCircular?: boolean; stringify?: boolean; @@ -76,7 +74,7 @@ export class ObjectToStructConverter { for (const prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { const value = obj[prop]; - if (is.undefined(value)) { + if (value === undefined) { continue; } // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -105,19 +103,19 @@ export class ObjectToStructConverter { encodeValue_(value: {} | null): any { let convertedValue; - if (is.null(value)) { + if (value === null) { convertedValue = { nullValue: 0, }; - } else if (is.number(value)) { + } else if (typeof value === 'number') { convertedValue = { numberValue: value, }; - } else if (is.string(value)) { + } else if (typeof value === 'string') { convertedValue = { stringValue: value, }; - } else if (is.boolean(value)) { + } else if (typeof value === 'boolean') { convertedValue = { boolValue: value, }; @@ -125,7 +123,15 @@ export class ObjectToStructConverter { convertedValue = { blobValue: value, }; - } else if (is.object(value)) { + } else if (Array.isArray(value)) { + convertedValue = { + listValue: { + values: (value as Array<{}>).map(this.encodeValue_.bind(this)), + }, + }; + } else if (value?.toString() === '[object Object]') { + // Using `typeof value === 'object'` is discouraged here, because it + // return true for dates, nulls, arrays, etc. if (this.seenObjects.has(value!)) { // Circular reference. if (!this.removeCircular) { @@ -144,12 +150,6 @@ export class ObjectToStructConverter { structValue: this.convert(value!), }; } - } else if (is.array(value)) { - convertedValue = { - listValue: { - values: (value as Array<{}>).map(this.encodeValue_.bind(this)), - }, - }; } else { if (!this.stringify) { throw new Error('Value of type ' + typeof value + ' not recognized.'); diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 5fd9d151657..772550541bc 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -17,7 +17,6 @@ // eslint-disable-next-line @typescript-eslint/no-var-requires const EventId = require('eventid'); import * as extend from 'extend'; -import * as is from 'is'; import {google} from '../protos/protos'; import {objToStruct, structToObj} from './common'; @@ -153,25 +152,25 @@ class Entry { toJSON(options: ToJsonOptions = {}) { const entry = (extend(true, {}, this.metadata) as {}) as EntryJson; // Format log message - if (is.object(this.data)) { + if (this.data?.toString() === '[object Object]') { entry.jsonPayload = objToStruct(this.data, { removeCircular: !!options.removeCircular, stringify: true, }); - } else if (is.string(this.data)) { + } else if (typeof this.data === 'string') { entry.textPayload = this.data; } // Format log timestamp - if (is.date(entry.timestamp)) { - const seconds = (entry.timestamp as Date).getTime() / 1000; + if (entry.timestamp instanceof Date) { + const seconds = entry.timestamp.getTime() / 1000; const secondsRounded = Math.floor(seconds); entry.timestamp = { seconds: secondsRounded, nanos: Math.floor((seconds - secondsRounded) * 1e9), }; - } else if (is.string(entry.timestamp)) { + } else if (typeof entry.timestamp === 'string') { // Convert RFC3339 "Zulu" timestamp into a format that can be parsed to Date - const zuluTime = entry.timestamp as string; + const zuluTime = entry.timestamp; const ms = Date.parse(zuluTime.split(/[.,Z]/)[0] + 'Z'); const reNano = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.(\d{0,9})Z$/; const nanoSecs = zuluTime.match(reNano)?.[1]; From d4f44d33cc36afc11b6005d94bafa68e861b2f52 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 5 Apr 2021 15:48:05 -0700 Subject: [PATCH 0730/1029] feat: resource autodetection for cloud run (#1024) * feat: resource autodetection for cloud run * fix: add location to cloud run resource label * test: add unit test for getCloudRunDescriptor * test: fix environments.cloudrun unit test * feat: add cloud run to detectServiceContext * chore: update env-tests-logging submodule to latest --- env-tests-logging | 2 +- handwritten/logging/src/metadata.ts | 38 ++++++++- handwritten/logging/test/metadata.ts | 111 ++++++++++++++++++++++++++- 3 files changed, 145 insertions(+), 6 deletions(-) diff --git a/env-tests-logging b/env-tests-logging index f0e2726579e..e8b6455b653 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit f0e2726579ef96f8e6b3ceaed8145d2bfbfa32bc +Subproject commit e8b6455b653ff017b4ac410b867c47c7e21a2e03 diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index 55d2bb63bb6..ebebd6ad660 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -51,6 +51,25 @@ export function getCloudFunctionDescriptor() { }; } +/** + * Create a descriptor for Cloud Run. + * + * @returns {object} + */ +export async function getCloudRunDescriptor() { + const qualifiedZone = await gcpMetadata.instance('zone'); + const location = zoneFromQualifiedZone(qualifiedZone); + return { + type: 'cloud_run_revision', + labels: { + location, + service_name: process.env.K_SERVICE, + revision_name: process.env.K_REVISION, + configuration_name: process.env.K_CONFIGURATION, + }, + }; +} + /** * Create a descriptor for Google App Engine. * @@ -146,7 +165,6 @@ export function getGlobalDescriptor() { */ export async function getDefaultResource(auth: GoogleAuth) { const env = await auth.getEnv(); - switch (env) { case GCPEnv.KUBERNETES_ENGINE: return getGKEDescriptor().catch(() => getGlobalDescriptor()); @@ -155,9 +173,14 @@ export async function getDefaultResource(auth: GoogleAuth) { case GCPEnv.CLOUD_FUNCTIONS: return getCloudFunctionDescriptor(); case GCPEnv.COMPUTE_ENGINE: - // Test for compute engine should be done after all the rest - - // everything runs on top of compute engine. - return getGCEDescriptor().catch(() => getGlobalDescriptor()); + // Google Cloud Run + if (process.env.K_CONFIGURATION) { + return getCloudRunDescriptor().catch(() => getGlobalDescriptor()); + } else { + // Test for compute engine should be done after all the rest - + // everything runs on top of compute engine. + return getGCEDescriptor().catch(() => getGlobalDescriptor()); + } default: return getGlobalDescriptor(); } @@ -190,6 +213,13 @@ export async function detectServiceContext( // name from within the pod. case GCPEnv.KUBERNETES_ENGINE: case GCPEnv.COMPUTE_ENGINE: + // Google Cloud Run + if (process.env.K_CONFIGURATION) { + return { + service: process.env.K_SERVICE, + }; + } + return null; default: return null; } diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 99dada671ca..e6979a20081 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -68,6 +68,8 @@ describe('metadata', () => { let AUTH; const ENV_CACHED = extend({}, process.env); + const INITIAL_ENV: {[key: string]: string | undefined} = {}; + before(() => { metadata = proxyquire('../src/metadata', { 'gcp-metadata': fakeGcpMetadata, @@ -101,7 +103,6 @@ describe('metadata', () => { 'K_SERVICE', 'GOOGLE_CLOUD_REGION', ]; - const INITIAL_ENV: {[key: string]: string | undefined} = {}; before(() => { for (const key of TARGET_KEYS) { @@ -152,6 +153,56 @@ describe('metadata', () => { }); }); + describe('getCloudRunDescriptor', () => { + const K_SERVICE = 'hello-world'; + const K_REVISION = 'hello-world.1'; + const K_CONFIGURATION = 'hello-world'; + + const TARGET_KEYS = ['K_SERVICE', 'K_REVISION', 'K_CONFIGURATION']; + + before(() => { + for (const key of TARGET_KEYS) { + INITIAL_ENV[key] = process.env[key]; + } + }); + + after(() => { + for (const key of TARGET_KEYS) { + const val = INITIAL_ENV[key]; + if (val === undefined) { + delete process.env[key]; + } else { + process.env[key] = val; + } + } + }); + + beforeEach(() => { + for (const key of TARGET_KEYS) { + delete process.env[key]; + } + process.env.K_SERVICE = K_SERVICE; + process.env.K_REVISION = K_REVISION; + process.env.K_CONFIGURATION = K_CONFIGURATION; + }); + + it('should return the correct descriptor', async () => { + const ZONE_ID = 'cyrodiil-anvil-2'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + instanceOverride = {path: 'zone', successArg: ZONE_FULL}; + const descriptor = await metadata.getCloudRunDescriptor(); + assert.deepStrictEqual(descriptor, { + type: 'cloud_run_revision', + labels: { + service_name: K_SERVICE, + revision_name: K_REVISION, + configuration_name: K_CONFIGURATION, + location: ZONE_ID, + }, + }); + }); + }); + describe('getGAEDescriptor', () => { const GAE_MODULE_NAME = 'gae-module-name'; const GAE_SERVICE = 'gae-service'; @@ -302,6 +353,47 @@ describe('metadata', () => { }); }); + describe('cloud run', () => { + after(() => { + delete process.env['K_CONFIGURATION']; + delete process.env['K_REVISION']; + delete process.env['K_SERVICE']; + }); + + it('should return correct descriptor', async () => { + const K_SERVICE = 'hello-world'; + const K_CONFIGURATION = 'hello-world'; + const K_REVISION = 'hello-world.1'; + const ZONE_ID = 'cyrodiil-anvil-2'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + process.env.K_SERVICE = K_SERVICE; + process.env.K_REVISION = K_REVISION; + process.env.K_CONFIGURATION = K_CONFIGURATION; + instanceOverride = [ + { + path: 'zone', + successArg: ZONE_FULL, + }, + ]; + const fakeAuth = { + async getEnv() { + return GCPEnv.COMPUTE_ENGINE; + }, + }; + + const defaultResource = await metadata.getDefaultResource(fakeAuth); + assert.deepStrictEqual(defaultResource, { + type: 'cloud_run_revision', + labels: { + service_name: K_SERVICE, + revision_name: K_REVISION, + configuration_name: K_CONFIGURATION, + location: ZONE_ID, + }, + }); + }); + }); + describe('compute engine', () => { it('should return correct descriptor', async () => { const INSTANCE_ID = 1234567; @@ -458,6 +550,23 @@ describe('metadata', () => { assert.deepStrictEqual(sc1, {service: FUNCTION_NAME}); }); + it('should return the correct descriptor for Cloud Run', async () => { + process.env.K_CONFIGURATION = 'hello-world'; + const SERVICE_NAME = (process.env.K_SERVICE = 'hello-world'); + + const fakeAuth = { + async getEnv() { + return GCPEnv.COMPUTE_ENGINE; + }, + }; + + const sc1 = await metadata.detectServiceContext(fakeAuth); + assert.deepStrictEqual(sc1, {service: SERVICE_NAME}); + + delete process.env['K_CONFIGURATION']; + delete process.env['K_SERVICE']; + }); + it('should return null on GKE', async () => { const fakeAuth = { async getEnv() { From 08271b2e96bac43f8e95b2106350f55247f96056 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Apr 2021 01:54:02 +0200 Subject: [PATCH 0731/1029] chore(deps): update dependency sinon to v10 (#1017) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^9.0.1` -> `^10.0.0`](https://renovatebot.com/diffs/npm/sinon/9.2.4/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/compatibility-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/confidence-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v10.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1000--2021-03-22) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v9.2.4...v10.0.0) ================== - Upgrade nise to 4.1.0 - Use [@​sinonjs/eslint-config](https://togithub.com/sinonjs/eslint-config)[@​4](https://togithub.com/4) => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 265d5dbe56c..da4553a193f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -97,7 +97,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", - "sinon": "^9.0.1", + "sinon": "^10.0.0", "ts-loader": "^8.0.0", "typescript": "^3.8.3", "uuid": "^8.0.0", From c1e330d8c2eed6cb2d1cb57e03fcf8ecb5d5106f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 6 Apr 2021 09:46:47 -0700 Subject: [PATCH 0732/1029] chore: release 9.2.0 (#1025) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 13 +++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ce00bbcd4cf..6c37ff610c6 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.2.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.1.1...v9.2.0) (2021-04-05) + + +### Features + +* resource autodetection for cloud run ([#1024](https://www.github.com/googleapis/nodejs-logging/issues/1024)) ([08c4404](https://www.github.com/googleapis/nodejs-logging/commit/08c4404fa401f0d90a8ee24a5b0477777e6b5e70)) + + +### Bug Fixes + +* **deps:** drop dependency on is ([#1021](https://www.github.com/googleapis/nodejs-logging/issues/1021)) ([f32da13](https://www.github.com/googleapis/nodejs-logging/commit/f32da13ac6744de68a6d8e2d615df2bb80438643)) +* **deps:** drop dependency on type-fest ([#1020](https://www.github.com/googleapis/nodejs-logging/issues/1020)) ([f1e35e4](https://www.github.com/googleapis/nodejs-logging/commit/f1e35e443e04d832677eca8663fb3ae2567919fa)) + ### [9.1.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.1.0...v9.1.1) (2021-03-31) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index da4553a193f..5d08a64cc40 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.1.1", + "version": "9.2.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 03385a0b07ec3da619a2beeab5fa12c3972f77eb Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 6 Apr 2021 10:31:25 -0700 Subject: [PATCH 0733/1029] test: fix test on functions resource autodetection (#1027) --- env-tests-logging | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-tests-logging b/env-tests-logging index e8b6455b653..174582a9fe0 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit e8b6455b653ff017b4ac410b867c47c7e21a2e03 +Subproject commit 174582a9fe0381d526cec1b908c1a90a1cdc5413 From 0b7be3dc25eaa8be9ec69d4fda399187b3500afd Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 6 Apr 2021 15:58:09 -0700 Subject: [PATCH 0734/1029] chore: update blunderbuss to auto assign nicole (#1030) --- handwritten/logging/.github/blunderbuss.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml index 45e412794bd..bf5769c42a0 100644 --- a/handwritten/logging/.github/blunderbuss.yml +++ b/handwritten/logging/.github/blunderbuss.yml @@ -1,4 +1,4 @@ assign_issues: - - googleapis/api-logging + - nicoleczhu assign_prs: - - googleapis/api-logging + - nicoleczhu From a8efe0cf9045c9f1a5bbd942489d332445178ff3 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 7 Apr 2021 09:45:58 -0700 Subject: [PATCH 0735/1029] fix: cloud functions resource.labels.region undefined (#1028) --- handwritten/logging/src/metadata.ts | 29 ++++++++++++++++++----- handwritten/logging/test/metadata.ts | 35 +++++++++++++++++++++------- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index ebebd6ad660..e330fe2feaf 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -31,22 +31,39 @@ function zoneFromQualifiedZone(qualified: string): string | undefined { return qualified.split('/').pop(); } +function regionFromQualifiedZone(qualified: string): string | undefined { + // Parses the region from the zone. Used for GCF and GCR which dynamically + // allocate zones. + const zone = zoneFromQualifiedZone(qualified); + const region = + zone === undefined ? undefined : zone.slice(0, zone.lastIndexOf('-')); + return region; +} + /** * Create a descriptor for Cloud Functions. * * @returns {object} */ -export function getCloudFunctionDescriptor() { +export async function getCloudFunctionDescriptor() { + // If the region is already available via an environment variable, don't delay the function by pinging metaserver. + let region = undefined; + if (!(process.env.GOOGLE_CLOUD_REGION || process.env.FUNCTION_REGION)) { + const qualifiedZone = await gcpMetadata.instance('zone'); + region = regionFromQualifiedZone(qualifiedZone); + } /** * In GCF versions after Node 8, K_SERVICE is the preferred way to - * get the function name and GOOGLE_CLOUD_REGION is the preferred way - * to get the region. + * get the function name. We still check for GOOGLE_CLOUD_REGION and FUNCTION_REGION for backwards Node runtime compatibility. */ return { type: 'cloud_function', labels: { function_name: process.env.K_SERVICE || process.env.FUNCTION_NAME, - region: process.env.GOOGLE_CLOUD_REGION || process.env.FUNCTION_REGION, + region: + process.env.GOOGLE_CLOUD_REGION || + process.env.FUNCTION_REGION || + region, }, }; } @@ -58,7 +75,7 @@ export function getCloudFunctionDescriptor() { */ export async function getCloudRunDescriptor() { const qualifiedZone = await gcpMetadata.instance('zone'); - const location = zoneFromQualifiedZone(qualifiedZone); + const location = regionFromQualifiedZone(qualifiedZone); return { type: 'cloud_run_revision', labels: { @@ -171,7 +188,7 @@ export async function getDefaultResource(auth: GoogleAuth) { case GCPEnv.APP_ENGINE: return getGAEDescriptor().catch(() => getGlobalDescriptor()); case GCPEnv.CLOUD_FUNCTIONS: - return getCloudFunctionDescriptor(); + return getCloudFunctionDescriptor().catch(() => getGlobalDescriptor()); case GCPEnv.COMPUTE_ENGINE: // Google Cloud Run if (process.env.K_CONFIGURATION) { diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index e6979a20081..abcbd69a0a1 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -126,14 +126,14 @@ describe('metadata', () => { delete process.env[key]; } process.env.FUNCTION_NAME = FUNCTION_NAME; - process.env.FUNCTION_REGION = FUNCTION_REGION; + process.env.K_SERVICE = K_SERVICE; }); - it('should return the correct primary descriptor', () => { - process.env.K_SERVICE = K_SERVICE; + it('should return the correct primary descriptor', async () => { process.env.GOOGLE_CLOUD_REGION = GOOGLE_CLOUD_REGION; - - assert.deepStrictEqual(metadata.getCloudFunctionDescriptor(), { + process.env.FUNCTION_REGION = FUNCTION_REGION; + const descriptor = await metadata.getCloudFunctionDescriptor(); + assert.deepStrictEqual(descriptor, { type: 'cloud_function', labels: { function_name: K_SERVICE, @@ -142,8 +142,11 @@ describe('metadata', () => { }); }); - it('should return the correct fallback descriptor', () => { - assert.deepStrictEqual(metadata.getCloudFunctionDescriptor(), { + it('should return the correct secondary descriptor', async () => { + process.env.FUNCTION_REGION = FUNCTION_REGION; + delete process.env['K_SERVICE']; + const descriptor = await metadata.getCloudFunctionDescriptor(); + assert.deepStrictEqual(descriptor, { type: 'cloud_function', labels: { function_name: FUNCTION_NAME, @@ -151,6 +154,20 @@ describe('metadata', () => { }, }); }); + + it('should return the correct fallback descriptor', async () => { + const ZONE_ID = 'us-west2-1'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + instanceOverride = {path: 'zone', successArg: ZONE_FULL}; + const descriptor = await metadata.getCloudFunctionDescriptor(); + assert.deepStrictEqual(descriptor, { + type: 'cloud_function', + labels: { + function_name: K_SERVICE, + region: 'us-west2', + }, + }); + }); }); describe('getCloudRunDescriptor', () => { @@ -197,7 +214,7 @@ describe('metadata', () => { service_name: K_SERVICE, revision_name: K_REVISION, configuration_name: K_CONFIGURATION, - location: ZONE_ID, + location: 'cyrodiil-anvil', }, }); }); @@ -388,7 +405,7 @@ describe('metadata', () => { service_name: K_SERVICE, revision_name: K_REVISION, configuration_name: K_CONFIGURATION, - location: ZONE_ID, + location: 'cyrodiil-anvil', }, }); }); From 4f07e88da780e232d744de5ba32f0fab3a7e9edc Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 12 Apr 2021 23:55:31 -0700 Subject: [PATCH 0736/1029] fix(deps): remove dependency on through2 (#1023) * fix(deps): remove dependency on through2 * nothru! Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/package.json | 4 +- handwritten/logging/src/index.ts | 77 +++++++++++++++++++------------ handwritten/logging/test/index.ts | 14 +++--- 3 files changed, 56 insertions(+), 39 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5d08a64cc40..3c976deb8a4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -61,8 +61,7 @@ "on-finished": "^2.3.0", "pumpify": "^2.0.1", "snakecase-keys": "^3.1.2", - "stream-events": "^1.0.5", - "through2": "^4.0.0" + "stream-events": "^1.0.5" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", @@ -77,7 +76,6 @@ "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", "@types/sinon": "^9.0.0", - "@types/through2": "^2.0.34", "@types/tmp": "^0.2.0", "@types/uuid": "^8.0.0", "bignumber.js": "^9.0.0", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index f6f37c18d5a..b812c6710a4 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -27,7 +27,6 @@ import {ClientReadableStream, ClientDuplexStream} from '@grpc/grpc-js'; // eslint-disable-next-line @typescript-eslint/no-var-requires const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; -import * as through from 'through2'; import * as middleware from './middleware'; import {detectServiceContext} from './metadata'; import {StackdriverHttpRequest as HttpRequest} from './http-request'; @@ -51,7 +50,7 @@ import { SeverityNames, } from './log'; import {Sink} from './sink'; -import {Duplex} from 'stream'; +import {Duplex, PassThrough, Transform} from 'stream'; import {google} from '../protos/protos'; import {Bucket} from '@google-cloud/storage'; // types only @@ -635,8 +634,11 @@ class Logging { (requestStream as AbortableDuplex).abort(); } }; - const toEntryStream = through.obj((entry, _, next) => { - next(null, Entry.fromApiResponse_(entry)); + const toEntryStream = new Transform({ + objectMode: true, + transform: (chunk, encoding, callback) => { + callback(null, Entry.fromApiResponse_(chunk)); + }, }); userStream.once('reading', () => { this.auth.getProjectId().then(projectId => { @@ -672,7 +674,9 @@ class Logging { ); let gaxStream: ClientReadableStream; - requestStream = streamEvents(through.obj()); + requestStream = streamEvents( + new PassThrough({objectMode: true}) + ); (requestStream as AbortableDuplex).abort = () => { if (gaxStream && gaxStream.cancel) { gaxStream.cancel(); @@ -767,21 +771,24 @@ class Logging { } }; - const transformStream = through.obj((data, _, next) => { - next( - null, - (() => { - const formattedEntries: Entry[] = []; - data.entries.forEach((entry: google.logging.v2.LogEntry) => { - formattedEntries.push(Entry.fromApiResponse_(entry)); - }); - const resp: TailEntriesResponse = { - entries: formattedEntries, - suppressionInfo: data.suppressionInfo, - }; - return resp; - })() - ); + const transformStream = new Transform({ + objectMode: true, + transform: (chunk, encoding, callback) => { + callback( + null, + (() => { + const formattedEntries: Entry[] = []; + chunk.entries.forEach((entry: google.logging.v2.LogEntry) => { + formattedEntries.push(Entry.fromApiResponse_(entry)); + }); + const resp: TailEntriesResponse = { + entries: formattedEntries, + suppressionInfo: chunk.suppressionInfo, + }; + return resp; + })() + ); + }, }); this.auth.getProjectId().then(projectId => { @@ -957,8 +964,11 @@ class Logging { (requestStream as AbortableDuplex).abort(); } }; - const toLogStream = through.obj((logName, _, next) => { - next(null, this.log(logName)); + const toLogStream = new Transform({ + objectMode: true, + transform: (chunk, encoding, callback) => { + callback(null, this.log(chunk)); + }, }); userStream.once('reading', () => { this.auth.getProjectId().then(projectId => { @@ -975,7 +985,9 @@ class Logging { ); let gaxStream: ClientReadableStream; - requestStream = streamEvents(through.obj()); + requestStream = streamEvents( + new PassThrough({objectMode: true}) + ); (requestStream as AbortableDuplex).abort = () => { if (gaxStream && gaxStream.cancel) { gaxStream.cancel(); @@ -1129,10 +1141,13 @@ class Logging { (requestStream as AbortableDuplex).abort(); } }; - const toSinkStream = through.obj((sink, _, next) => { - const sinkInstance = self.sink(sink.name); - sinkInstance.metadata = sink; - next(null, sinkInstance); + const toSinkStream = new Transform({ + objectMode: true, + transform: (chunk, encoding, callback) => { + const sinkInstance = self.sink(chunk.name); + sinkInstance.metadata = chunk; + callback(null, sinkInstance); + }, }); userStream.once('reading', () => { this.auth.getProjectId().then(projectId => { @@ -1149,7 +1164,9 @@ class Logging { ); let gaxStream: ClientReadableStream; - requestStream = streamEvents(through.obj()); + requestStream = streamEvents( + new PassThrough({objectMode: true}) + ); (requestStream as AbortableDuplex).abort = () => { if (gaxStream && gaxStream.cancel) { gaxStream.cancel(); @@ -1240,7 +1257,7 @@ class Logging { let gaxStream: ClientReadableStream; let stream: Duplex; if (isStreamMode) { - stream = streamEvents(through.obj()); + stream = streamEvents(new PassThrough({objectMode: true})); (stream as AbortableDuplex).abort = () => { if (gaxStream && gaxStream.cancel) { gaxStream.cancel(); @@ -1289,7 +1306,7 @@ class Logging { function makeRequestStream() { // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((global as any).GCLOUD_SANDBOX_ENV) { - return through.obj(); + return new PassThrough({objectMode: true}); } prepareGaxRequest((err, requestFn) => { if (err) { diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index fce53c1289f..bb8db22ce14 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -19,7 +19,6 @@ import * as assert from 'assert'; import {describe, it, beforeEach, before} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; -import * as through from 'through2'; import { Logging as LOGGING, LoggingOptions, @@ -29,7 +28,7 @@ import { GetSinksRequest, Sink, } from '../src/index'; -import {Duplex} from 'stream'; +import {Duplex, PassThrough} from 'stream'; import {Policy} from '@google-cloud/pubsub'; import {GetEntriesRequest} from '../src/log'; import {Dataset} from '@google-cloud/bigquery'; @@ -44,6 +43,9 @@ interface AbortableDuplex extends Duplex { abort: Function; } +const through = () => + (new PassThrough({objectMode: true}) as {}) as AbortableDuplex; + const noop = () => {}; let extended = false; const fakePaginator = { @@ -660,7 +662,7 @@ describe('Logging', () => { const RESULT = {}; beforeEach(() => { - GAX_STREAM = (through.obj() as {}) as AbortableDuplex; + GAX_STREAM = through(); GAX_STREAM.push(RESULT); logging.loggingService.listLogEntriesStream = () => GAX_STREAM; logging.auth.getProjectId = async () => PROJECT_ID; @@ -926,7 +928,7 @@ describe('Logging', () => { const RESPONSE = ['log1']; beforeEach(() => { - GAX_STREAM = (through.obj() as {}) as AbortableDuplex; + GAX_STREAM = through(); GAX_STREAM.push(RESPONSE[0]); logging.loggingService.listLogsStream = () => GAX_STREAM; (logging.auth.getProjectId as Function) = async () => {}; @@ -1108,7 +1110,7 @@ describe('Logging', () => { }; beforeEach(() => { - GAX_STREAM = (through.obj() as {}) as AbortableDuplex; + GAX_STREAM = through(); GAX_STREAM.push(RESULT); logging.configService.listSinksStream = () => GAX_STREAM; (logging.auth.getProjectId as Function) = async () => {}; @@ -1381,7 +1383,7 @@ describe('Logging', () => { let GAX_STREAM: AbortableDuplex; beforeEach(() => { - GAX_STREAM = (through() as {}) as AbortableDuplex; + GAX_STREAM = through(); // eslint-disable-next-line @typescript-eslint/no-explicit-any (logging.api as any)[CONFIG.client][CONFIG.method] = { bind() { From 4430db34228be5cf94cec2b75da249f43d03eeaa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:08:07 +0200 Subject: [PATCH 0737/1029] chore(deps): update dependency @types/sinon to v10 (#1039) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^9.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/9.0.11/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/compatibility-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/confidence-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3c976deb8a4..04d06cbf7c9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -75,7 +75,7 @@ "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", - "@types/sinon": "^9.0.0", + "@types/sinon": "^10.0.0", "@types/tmp": "^0.2.0", "@types/uuid": "^8.0.0", "bignumber.js": "^9.0.0", From 15081ec69062e9e9c928334177254f13f02161a0 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 14 Apr 2021 17:51:04 -0700 Subject: [PATCH 0738/1029] fix: accept uniqueWriterIdentity in setMetadata (#1034) * fix: accept uniqueWriterIdentity in setMetadata * docs: explain unique writer id flag better * chore: explain uniqueWriterIdentity field * fix: prevent topic_permission_denied errors in tests --- handwritten/logging/src/index.ts | 4 +-- handwritten/logging/src/sink.ts | 17 +++++++++- handwritten/logging/system-test/logging.ts | 37 ++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index b812c6710a4..09cfaa04294 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -83,7 +83,7 @@ export interface CreateSinkRequest { includeChildren?: boolean; name?: string; outputVersionFormat?: google.logging.v2.LogSink.VersionFormat; - uniqueWriterIdentity?: string; + uniqueWriterIdentity?: string | boolean; gaxOptions?: gax.CallOptions; } @@ -315,7 +315,7 @@ class Logging { * https://cloud.google.com/nodejs/docs/reference/pubsub/latest/Topic Topic} * @property {string} [filter] An advanced logs filter. Only log entries * matching the filter are written. - * @property {string} [uniqueWriterIdentity] Determines the kind of IAM + * @property {string|boolean} [uniqueWriterIdentity] Determines the kind of IAM * identity returned as `writerIdentity` in the new sink. See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create#query-parameters}. */ /** diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 18d8596c3f5..35f95cd98c4 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -34,6 +34,9 @@ export type SinkMetadataResponse = [LogSink]; export interface SetSinkMetadata extends LogSink { gaxOptions?: CallOptions; + // A unique service account just for the sink + // https://cloud.google.com/logging/docs/api/tasks/exporting-logs#using_a_unique_writer_identity + uniqueWriterIdentity?: boolean | string; } /** @@ -289,6 +292,11 @@ class Sink { /** * Set the sink's metadata. * + * Note: If the sink was previously created or updated with + * uniqueWriterIdentity = true, then you must update the sink by setting + * uniqueWriterIdentity = true. Read more about using a unique writer identity + * here: https://cloud.google.com/logging/docs/api/tasks/exporting-logs#using_a_unique_writer_identity + * * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} * @see [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update} * @@ -325,11 +333,18 @@ class Sink { */ async setMetadata(metadata: SetSinkMetadata): Promise { const [currentMetadata] = await this.getMetadata(); - const reqOpts = { + const uniqueWriterIdentity = metadata.uniqueWriterIdentity; + delete metadata.uniqueWriterIdentity; + let reqOpts = { sinkName: this.formattedName_, sink: extend({}, currentMetadata, metadata), }; delete reqOpts.sink.gaxOptions; + // Add user specified uniqueWriterIdentity boolean, if any. + reqOpts = { + ...reqOpts, + ...(uniqueWriterIdentity && {uniqueWriterIdentity}), + }; [this.metadata] = await this.logging.configService.updateSink( reqOpts, metadata.gaxOptions diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 4745d68ebc3..231110134b7 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -182,6 +182,43 @@ describe('Logging', () => { }); }); + describe('metadata with uniqueWriterIdentity', () => { + it('should set metadata if uniqueWriterIdentity was true', async () => { + const sink = logging.sink(generateName()); + const FILTER = 'severity = ALERT'; + await sink.create({ + destination: topic, + uniqueWriterIdentity: true, + }); + const metadata = { + filter: FILTER, + uniqueWriterIdentity: true, + }; + const [apiResponse] = await sink.setMetadata(metadata); + assert.strictEqual(apiResponse.filter, FILTER); + // Sink must be deleted within this test before any logs are generated + // to avoid topic_permission_denied emails. + await sink.delete(); + }); + + it('should set uniqueWriterIdentity from false to true', async () => { + const sink = logging.sink(generateName()); + const FILTER = 'severity = ALERT'; + await sink.create({ + destination: topic, + }); + const metadata = { + filter: FILTER, + uniqueWriterIdentity: true, + }; + const [apiResponse] = await sink.setMetadata(metadata); + assert.strictEqual(apiResponse.filter, FILTER); + // Sink must be deleted within this test before any logs are generated + // to avoid topic_permission_denied emails. + await sink.delete(); + }); + }); + describe('listing sinks', () => { const sink = logging.sink(generateName()); From b1db500f6456f38ff58d1389f8f9f33a80c13ff1 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 14 Apr 2021 18:10:06 -0700 Subject: [PATCH 0739/1029] chore(deps): remove snakecase-keys dependency (#1038) Before: **Total dependencies size: 22.49M** After: **Total dependencies size: 22.46M** improvement: ~30kB Part of #1037 --- handwritten/logging/package.json | 1 - handwritten/logging/src/log.ts | 18 ++++++++++++------ handwritten/logging/test/log.ts | 16 ++++++++++++++-- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 04d06cbf7c9..f9e15bb2eb3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -60,7 +60,6 @@ "google-gax": "^2.9.2", "on-finished": "^2.3.0", "pumpify": "^2.0.1", - "snakecase-keys": "^3.1.2", "stream-events": "^1.0.5" }, "devDependencies": { diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index d0152c706b6..696f1d69520 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -26,9 +26,6 @@ import {Entry, EntryJson, LogEntry} from './entry'; import {getDefaultResource} from './metadata'; import {GoogleAuth} from 'google-auth-library/build/src/auth/googleauth'; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const snakeCaseKeys = require('snakecase-keys'); - export interface GetEntriesRequest { autoPaginate?: boolean; filter?: string; @@ -891,9 +888,7 @@ class Log implements LogSeverityFunctions { // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; if (options.resource) { - if (options.resource.labels) { - options.resource.labels = snakeCaseKeys(options.resource.labels); - } + if (options.resource.labels) snakecaseKeys(options.resource.labels); return writeWithResource(options.resource); } else if (this.logging.detectedResource) { return writeWithResource(this.logging.detectedResource); @@ -928,6 +923,17 @@ class Log implements LogSeverityFunctions { options.gaxOptions ); } + // snakecaseKeys turns label keys from camel case to snake case. + function snakecaseKeys(labels: {[p: string]: string} | null | undefined) { + for (const key in labels) { + Object.defineProperty( + labels, + key.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`), + Object.getOwnPropertyDescriptor(labels, key) as PropertyDescriptor + ); + delete labels[key]; + } + } } // TODO proper signature of `private decorateEntries` (sans underscore suffix) diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index bd27bc653cb..465ea20c129 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -395,7 +395,14 @@ describe('Log', () => { }); it('should forward options.resource to request', async () => { - const CUSTOM_RESOURCE = 'custom-resource'; + // Also check it should snakecase resource labels, as many sources & docs + // wrongly instruct users to use camelcase. + const CUSTOM_RESOURCE = { + labels: { + projectId: 'fake-project', + regionZone: 'us-west-1', + }, + }; const optionsWithResource = extend({}, OPTIONS, { resource: CUSTOM_RESOURCE, }) as WriteOptions; @@ -406,7 +413,12 @@ describe('Log', () => { { logName: log.formattedName_, entries: ENTRIES, - resource: CUSTOM_RESOURCE, + resource: { + labels: { + project_id: 'fake-project', + region_zone: 'us-west-1', + }, + }, }, undefined ) From 214b62c6f66da6b2e13c6f8e94de14fc6257a61a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 14 Apr 2021 19:01:54 -0700 Subject: [PATCH 0740/1029] chore: release 9.2.1 (#1031) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 9 +++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 6c37ff610c6..57842f07949 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.2.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.2.0...v9.2.1) (2021-04-15) + + +### Bug Fixes + +* accept uniqueWriterIdentity in setMetadata ([#1034](https://www.github.com/googleapis/nodejs-logging/issues/1034)) ([02e8bb4](https://www.github.com/googleapis/nodejs-logging/commit/02e8bb4b5983c48bf7bd5e16ba4ab9c226d3f28e)) +* cloud functions resource.labels.region undefined ([#1028](https://www.github.com/googleapis/nodejs-logging/issues/1028)) ([3808656](https://www.github.com/googleapis/nodejs-logging/commit/38086569ad2915785e161542d7056ae3944948c8)) +* **deps:** remove dependency on through2 ([#1023](https://www.github.com/googleapis/nodejs-logging/issues/1023)) ([485347f](https://www.github.com/googleapis/nodejs-logging/commit/485347fd3712565ae90e307a314bcdfeeb581379)) + ## [9.2.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.1.1...v9.2.0) (2021-04-05) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f9e15bb2eb3..cc71c4a06a4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.2.0", + "version": "9.2.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 131a690b711926b783343744f0db78569ae1b3b8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:56:47 +0200 Subject: [PATCH 0741/1029] chore(deps): update dependency ts-loader to v9 (#1047) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/ts-loader/8.1.0/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/compatibility-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/confidence-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
TypeStrong/ts-loader ### [`v9.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v900) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v8.1.0...v9.0.0) Breaking changes: - minimum webpack version: 5 - minimum node version: 12 Changes: - [webpack 5 migration](https://togithub.com/TypeStrong/ts-loader/pull/1251) - thanks [@​johnnyreilly](https://togithub.com/johnnyreilly), [@​jonwallsten](https://togithub.com/jonwallsten), [@​sokra](https://togithub.com/sokra), [@​appzuka](https://togithub.com/appzuka), [@​alexander-akait](https://togithub.com/alexander-akait)
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cc71c4a06a4..cdc47067011 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -95,7 +95,7 @@ "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", "sinon": "^10.0.0", - "ts-loader": "^8.0.0", + "ts-loader": "^9.0.0", "typescript": "^3.8.3", "uuid": "^8.0.0", "webpack": "^5.0.0", From b6a12f5e7c17021fe9e3488ada4193a2399beff7 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Mon, 19 Apr 2021 18:04:07 -0700 Subject: [PATCH 0742/1029] chore: migrate to owl bot (#1032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: migrate to owl bot * chore: copy files from googleapis-gen fb91803ccef5d7c695139b22788b309e2197856b * chore: run the post processor * 🦉 Updates from OwlBot Co-authored-by: Owl Bot Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 + handwritten/logging/.github/.OwlBot.yaml | 26 + .../logging/.kokoro/release/publish.cfg | 40 - handwritten/logging/.repo-metadata.json | 15 +- handwritten/logging/{synth.py => owlbot.py} | 37 +- handwritten/logging/protos/protos.d.ts | 15 +- handwritten/logging/protos/protos.js | 85 +- handwritten/logging/protos/protos.json | 784 +++++++++++++++++- handwritten/logging/synth.metadata | 37 - 9 files changed, 897 insertions(+), 146 deletions(-) create mode 100644 handwritten/logging/.github/.OwlBot.lock.yaml create mode 100644 handwritten/logging/.github/.OwlBot.yaml rename handwritten/logging/{synth.py => owlbot.py} (55%) delete mode 100644 handwritten/logging/synth.metadata diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml new file mode 100644 index 00000000000..278e98ced87 --- /dev/null +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -0,0 +1,4 @@ +docker: + digest: sha256:c3eae37a355402067b97cbeb6f5a7d2dd87aecfd064aeb2d2ea0bde40778cf68 + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + diff --git a/handwritten/logging/.github/.OwlBot.yaml b/handwritten/logging/.github/.OwlBot.yaml new file mode 100644 index 00000000000..7db771f340d --- /dev/null +++ b/handwritten/logging/.github/.OwlBot.yaml @@ -0,0 +1,26 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/logging/(v.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b + diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 78e3c040fa3..55af02b1a9b 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -1,23 +1,3 @@ -# Get npm token from Keystore -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google_cloud_npm_token" - backend_type: FASTCONFIGPUSH - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - } - } -} - before_action { fetch_keystore { keystore_resource { @@ -27,26 +7,6 @@ before_action { } } -# Fetch magictoken to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "releasetool-magictoken" - } - } -} - -# Fetch api key to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "magic-github-proxy-api-key" - } - } -} - env_vars: { key: "SECRET_MANAGER_KEYS" value: "npm_publish_token,releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json index 592799c5219..fe333b9afd1 100644 --- a/handwritten/logging/.repo-metadata.json +++ b/handwritten/logging/.repo-metadata.json @@ -1,13 +1,14 @@ { - "name": "logging", - "name_pretty": "Cloud Logging", - "product_documentation": "https://cloud.google.com/logging/docs", "client_documentation": "https://googleapis.dev/nodejs/logging/latest", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559764", + "product_documentation": "https://cloud.google.com/logging/docs", + "name": "logging", + "codeowner_team": "@googleapis/api-logging", "release_level": "ga", "language": "nodejs", - "repo": "googleapis/nodejs-logging", - "distribution_name": "@google-cloud/logging", "api_id": "logging.googleapis.com", - "codeowner_team": "@googleapis/api-logging" + "distribution_name": "@google-cloud/logging", + "repo": "googleapis/nodejs-logging", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559764", + "name_pretty": "Cloud Logging", + "default_version": "v2" } diff --git a/handwritten/logging/synth.py b/handwritten/logging/owlbot.py similarity index 55% rename from handwritten/logging/synth.py rename to handwritten/logging/owlbot.py index 545849a6943..8d58c1f6837 100644 --- a/handwritten/logging/synth.py +++ b/handwritten/logging/owlbot.py @@ -15,29 +15,20 @@ """This script is used to synthesize generated parts of this library.""" import synthtool as s -import synthtool.gcp as gcp import synthtool.languages.node as node -import logging -import os -logging.basicConfig(level=logging.DEBUG) - -AUTOSYNTH_MULTIPLE_COMMITS = True - -gapic = gcp.GAPICBazel() -version='v2' -# tasks has two product names, and a poorly named artman yaml -v2_library = gapic.node_library("logging", version, proto_path=f'google/logging/{version}') -s.copy(v2_library, excludes=[".eslintignore", ".prettierignore", "src/index.ts", "README.md", "package.json", "system-test/fixtures/sample/src/index.js", "system-test/fixtures/sample/src/index.ts"]) - -# Copy in templated files -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library(source_location='build/src') -s.copy(templates, excludes=[ - ".eslintignore", - ".prettierignore", - "CONTRIBUTING.md" -]) +node.owlbot_main( + staging_excludes=[ + ".eslintignore", ".prettierignore", "src/index.ts", "README.md", "package.json", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts"], + templates_excludes=[ + "src/index.ts", + ".eslintignore", + ".prettierignore", + "CONTRIBUTING.md" + ] +) # adjust .trampolinerc for environment tests s.replace( @@ -49,6 +40,4 @@ ".trampolinerc", "pass_down_envvars\+\=\(", 'pass_down_envvars+=(\n "ENVIRONMENT"\n "RUNTIME"' -) - -node.postprocess_gapic_library() +) \ No newline at end of file diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 783c0e42703..4bb55075f11 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -6769,7 +6769,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } /** Properties of a MonitoredResourceDescriptor. */ @@ -7228,6 +7229,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -7257,6 +7261,9 @@ export namespace google { /** ResourceDescriptor singular. */ public singular: string; + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set @@ -7336,6 +7343,12 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } /** Properties of a ResourceReference. */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 0ad07bc38e9..14cb3342a9c 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -15757,6 +15757,7 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -15766,6 +15767,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); @@ -16931,6 +16933,7 @@ * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history * @property {string|null} [plural] ResourceDescriptor plural * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** @@ -16943,6 +16946,7 @@ */ function ResourceDescriptor(properties) { this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16997,6 +17001,14 @@ */ ResourceDescriptor.prototype.singular = ""; + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @function create @@ -17034,6 +17046,12 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; @@ -17088,6 +17106,16 @@ case 6: message.singular = reader.string(); break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; default: reader.skipType(tag & 7); break; @@ -17151,6 +17179,18 @@ if (message.singular != null && message.hasOwnProperty("singular")) if (!$util.isString(message.singular)) return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } return null; }; @@ -17195,6 +17235,23 @@ message.plural = String(object.plural); if (object.singular != null) message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; @@ -17211,8 +17268,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.pattern = []; + object.style = []; + } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -17235,6 +17294,11 @@ object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } return object; }; @@ -17265,6 +17329,20 @@ return values; })(); + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + return ResourceDescriptor; })(); @@ -26863,6 +26941,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -26963,6 +27042,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 377cc0cbe92..9d5ab8c974c 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -210,7 +210,31 @@ "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}", "(google.api.method_signature)": "log_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{log_name=projects/*/logs/*}", + "additional_bindings": [ + { + "delete": "/v2/{log_name=*/*/logs/*}" + }, + { + "delete": "/v2/{log_name=organizations/*/logs/*}" + }, + { + "delete": "/v2/{log_name=folders/*/logs/*}" + }, + { + "delete": "/v2/{log_name=billingAccounts/*/logs/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "log_name" + } + ] }, "WriteLogEntries": { "requestType": "WriteLogEntriesRequest", @@ -219,7 +243,18 @@ "(google.api.http).post": "/v2/entries:write", "(google.api.http).body": "*", "(google.api.method_signature)": "log_name,resource,labels,entries" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:write", + "body": "*" + } + }, + { + "(google.api.method_signature)": "log_name,resource,labels,entries" + } + ] }, "ListLogEntries": { "requestType": "ListLogEntriesRequest", @@ -228,14 +263,32 @@ "(google.api.http).post": "/v2/entries:list", "(google.api.http).body": "*", "(google.api.method_signature)": "resource_names,filter,order_by" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:list", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource_names,filter,order_by" + } + ] }, "ListMonitoredResourceDescriptors": { "requestType": "ListMonitoredResourceDescriptorsRequest", "responseType": "ListMonitoredResourceDescriptorsResponse", "options": { "(google.api.http).get": "/v2/monitoredResourceDescriptors" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/monitoredResourceDescriptors" + } + } + ] }, "ListLogs": { "requestType": "ListLogsRequest", @@ -244,7 +297,31 @@ "(google.api.http).get": "/v2/{parent=*/*}/logs", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*}/logs", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/logs" + }, + { + "get": "/v2/{parent=organizations/*}/logs" + }, + { + "get": "/v2/{parent=folders/*}/logs" + }, + { + "get": "/v2/{parent=billingAccounts/*}/logs" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "TailLogEntries": { "requestType": "TailLogEntriesRequest", @@ -254,7 +331,15 @@ "options": { "(google.api.http).post": "/v2/entries:tail", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:tail", + "body": "*" + } + } + ] } } }, @@ -539,7 +624,31 @@ "(google.api.http).get": "/v2/{parent=*/*/locations/*}/buckets", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*}/buckets", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*/locations/*}/buckets", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=organizations/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=folders/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=billingAccounts/*/locations/*}/buckets" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetBucket": { "requestType": "GetBucketRequest", @@ -547,7 +656,28 @@ "options": { "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/locations/*/buckets/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=organizations/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=folders/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/buckets/*}" + } + ] + } + } + ] }, "CreateBucket": { "requestType": "CreateBucketRequest", @@ -557,7 +687,33 @@ "(google.api.http).body": "bucket", "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", "(google.api.http).additional_bindings.body": "bucket" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*/locations/*}/buckets", + "body": "bucket", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=organizations/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=folders/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", + "body": "bucket" + } + ] + } + } + ] }, "UpdateBucket": { "requestType": "UpdateBucketRequest", @@ -567,7 +723,33 @@ "(google.api.http).body": "bucket", "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", "(google.api.http).additional_bindings.body": "bucket" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/locations/*/buckets/*}", + "body": "bucket", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=organizations/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=folders/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", + "body": "bucket" + } + ] + } + } + ] }, "DeleteBucket": { "requestType": "DeleteBucketRequest", @@ -575,7 +757,28 @@ "options": { "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*}", "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/locations/*/buckets/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=organizations/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=folders/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + } + ] + } + } + ] }, "UndeleteBucket": { "requestType": "UndeleteBucketRequest", @@ -585,7 +788,33 @@ "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", "(google.api.http).additional_bindings.body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=*/*/locations/*/buckets/*}:undelete", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{name=projects/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=organizations/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=folders/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", + "body": "*" + } + ] + } + } + ] }, "ListViews": { "requestType": "ListViewsRequest", @@ -594,7 +823,31 @@ "(google.api.http).get": "/v2/{parent=*/*/locations/*/buckets/*}/views", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=organizations/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=folders/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetView": { "requestType": "GetViewRequest", @@ -602,7 +855,28 @@ "options": { "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" + } + ] + } + } + ] }, "CreateView": { "requestType": "CreateViewRequest", @@ -612,7 +886,33 @@ "(google.api.http).body": "view", "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", "(google.api.http).additional_bindings.body": "view" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "body": "view", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=organizations/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=folders/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", + "body": "view" + } + ] + } + } + ] }, "UpdateView": { "requestType": "UpdateViewRequest", @@ -622,7 +922,33 @@ "(google.api.http).body": "view", "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", "(google.api.http).additional_bindings.body": "view" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "body": "view", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=folders/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", + "body": "view" + } + ] + } + } + ] }, "DeleteView": { "requestType": "DeleteViewRequest", @@ -630,7 +956,28 @@ "options": { "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + } + ] + } + } + ] }, "ListSinks": { "requestType": "ListSinksRequest", @@ -639,7 +986,31 @@ "(google.api.http).get": "/v2/{parent=*/*}/sinks", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*}/sinks", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/sinks" + }, + { + "get": "/v2/{parent=organizations/*}/sinks" + }, + { + "get": "/v2/{parent=folders/*}/sinks" + }, + { + "get": "/v2/{parent=billingAccounts/*}/sinks" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetSink": { "requestType": "GetSinkRequest", @@ -648,7 +1019,31 @@ "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{sink_name=*/*/sinks/*}", + "additional_bindings": [ + { + "get": "/v2/{sink_name=projects/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=organizations/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=folders/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "sink_name" + } + ] }, "CreateSink": { "requestType": "CreateSinkRequest", @@ -659,7 +1054,36 @@ "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", "(google.api.http).additional_bindings.body": "sink", "(google.api.method_signature)": "parent,sink" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*}/sinks", + "body": "sink", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=organizations/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=folders/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=billingAccounts/*}/sinks", + "body": "sink" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,sink" + } + ] }, "UpdateSink": { "requestType": "UpdateSinkRequest", @@ -671,7 +1095,55 @@ "(google.api.http).additional_bindings.body": "sink", "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name,sink" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{sink_name=*/*/sinks/*}", + "body": "sink", + "additional_bindings": [ + { + "put": "/v2/{sink_name=projects/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=organizations/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=folders/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=projects/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=organizations/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=folders/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "body": "sink" + } + ] + } + }, + { + "(google.api.method_signature)": "sink_name,sink,update_mask" + }, + { + "(google.api.method_signature)": "sink_name,sink" + } + ] }, "DeleteSink": { "requestType": "DeleteSinkRequest", @@ -680,7 +1152,31 @@ "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}", "(google.api.method_signature)": "sink_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{sink_name=*/*/sinks/*}", + "additional_bindings": [ + { + "delete": "/v2/{sink_name=projects/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=organizations/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=folders/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "sink_name" + } + ] }, "ListExclusions": { "requestType": "ListExclusionsRequest", @@ -689,7 +1185,31 @@ "(google.api.http).get": "/v2/{parent=*/*}/exclusions", "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*}/exclusions", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/exclusions" + }, + { + "get": "/v2/{parent=organizations/*}/exclusions" + }, + { + "get": "/v2/{parent=folders/*}/exclusions" + }, + { + "get": "/v2/{parent=billingAccounts/*}/exclusions" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetExclusion": { "requestType": "GetExclusionRequest", @@ -698,7 +1218,31 @@ "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/exclusions/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/exclusions/*}" + }, + { + "get": "/v2/{name=organizations/*/exclusions/*}" + }, + { + "get": "/v2/{name=folders/*/exclusions/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/exclusions/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateExclusion": { "requestType": "CreateExclusionRequest", @@ -709,7 +1253,36 @@ "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", "(google.api.http).additional_bindings.body": "exclusion", "(google.api.method_signature)": "parent,exclusion" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*}/exclusions", + "body": "exclusion", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=organizations/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=folders/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=billingAccounts/*}/exclusions", + "body": "exclusion" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,exclusion" + } + ] }, "UpdateExclusion": { "requestType": "UpdateExclusionRequest", @@ -720,7 +1293,36 @@ "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.http).additional_bindings.body": "exclusion", "(google.api.method_signature)": "name,exclusion,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/exclusions/*}", + "body": "exclusion", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=organizations/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=folders/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "body": "exclusion" + } + ] + } + }, + { + "(google.api.method_signature)": "name,exclusion,update_mask" + } + ] }, "DeleteExclusion": { "requestType": "DeleteExclusionRequest", @@ -729,7 +1331,31 @@ "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/exclusions/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/exclusions/*}" + }, + { + "delete": "/v2/{name=organizations/*/exclusions/*}" + }, + { + "delete": "/v2/{name=folders/*/exclusions/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/exclusions/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetCmekSettings": { "requestType": "GetCmekSettingsRequest", @@ -737,7 +1363,17 @@ "options": { "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*}/cmekSettings", + "additional_bindings": { + "get": "/v2/{name=organizations/*}/cmekSettings" + } + } + } + ] }, "UpdateCmekSettings": { "requestType": "UpdateCmekSettingsRequest", @@ -747,7 +1383,19 @@ "(google.api.http).body": "cmek_settings", "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*}/cmekSettings", "(google.api.http).additional_bindings.body": "cmek_settings" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*}/cmekSettings", + "body": "cmek_settings", + "additional_bindings": { + "patch": "/v2/{name=organizations/*}/cmekSettings", + "body": "cmek_settings" + } + } + } + ] } } }, @@ -1559,7 +2207,17 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*}/metrics", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*}/metrics" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetLogMetric": { "requestType": "GetLogMetricRequest", @@ -1567,7 +2225,17 @@ "options": { "(google.api.http).get": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.method_signature)": "metric_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{metric_name=projects/*/metrics/*}" + } + }, + { + "(google.api.method_signature)": "metric_name" + } + ] }, "CreateLogMetric": { "requestType": "CreateLogMetricRequest", @@ -1576,7 +2244,18 @@ "(google.api.http).post": "/v2/{parent=projects/*}/metrics", "(google.api.http).body": "metric", "(google.api.method_signature)": "parent,metric" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/metrics", + "body": "metric" + } + }, + { + "(google.api.method_signature)": "parent,metric" + } + ] }, "UpdateLogMetric": { "requestType": "UpdateLogMetricRequest", @@ -1585,7 +2264,18 @@ "(google.api.http).put": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.http).body": "metric", "(google.api.method_signature)": "metric_name,metric" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{metric_name=projects/*/metrics/*}", + "body": "metric" + } + }, + { + "(google.api.method_signature)": "metric_name,metric" + } + ] }, "DeleteLogMetric": { "requestType": "DeleteLogMetricRequest", @@ -1593,7 +2283,17 @@ "options": { "(google.api.http).delete": "/v2/{metric_name=projects/*/metrics/*}", "(google.api.method_signature)": "metric_name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{metric_name=projects/*/metrics/*}" + } + }, + { + "(google.api.method_signature)": "metric_name" + } + ] } } }, @@ -1902,7 +2602,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "MonitoredResourceDescriptor": { @@ -2039,6 +2740,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -2048,6 +2754,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -2406,7 +3118,7 @@ }, "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", diff --git a/handwritten/logging/synth.metadata b/handwritten/logging/synth.metadata deleted file mode 100644 index b98302289f6..00000000000 --- a/handwritten/logging/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-logging.git", - "sha": "c61561e050c3e3b4ec9102e4c60f433eeb3b829c" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "logging", - "apiVersion": "v2", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file From 6e699a071a51b2bebfd46f051830c412ca1ce31d Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 20 Apr 2021 16:45:38 -0700 Subject: [PATCH 0743/1029] chore(deps): remove dependency @types/tmp (#1048) --- handwritten/logging/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cdc47067011..d8d51769205 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -75,7 +75,6 @@ "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", "@types/sinon": "^10.0.0", - "@types/tmp": "^0.2.0", "@types/uuid": "^8.0.0", "bignumber.js": "^9.0.0", "c8": "^7.1.0", From f22c3df5788425d5803f83b31f32aa8c0a56691f Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 20 Apr 2021 18:52:50 -0700 Subject: [PATCH 0744/1029] chore(deps): remove explicit dependency execa (#1049) --- handwritten/logging/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d8d51769205..ba28949f9d9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -79,7 +79,6 @@ "bignumber.js": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", - "execa": "^5.0.0", "gts": "^2.0.0", "http2spy": "^2.0.0", "jsdoc": "^3.6.3", From efb4a3c748e333372b4d145fd58620c4271ff189 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 20 Apr 2021 20:13:26 -0700 Subject: [PATCH 0745/1029] chore(deps): remove dependencies mv and ncp (#1050) --- handwritten/logging/package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ba28949f9d9..7997e1d865d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -68,8 +68,6 @@ "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", "@types/mocha": "^8.0.0", - "@types/mv": "^2.1.0", - "@types/ncp": "^2.0.3", "@types/node": "^13.9.2", "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", @@ -86,8 +84,6 @@ "jsdoc-region-tag": "^1.0.4", "linkinator": "^2.0.3", "mocha": "^8.0.0", - "mv": "^2.1.1", - "ncp": "^2.0.0", "nock": "^13.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", From cb213670a61c35d6a53fe59f083b8b5578e4ba1e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 4 May 2021 20:19:49 -0700 Subject: [PATCH 0746/1029] chore: release 9.2.2 (#1059) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 57842f07949..893d5d8d4a3 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.2.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.2.1...v9.2.2) (2021-05-04) + + +### Bug Fixes + +* **deps:** update dependency yargs to v17 ([#1058](https://www.github.com/googleapis/nodejs-logging/issues/1058)) ([8d96368](https://www.github.com/googleapis/nodejs-logging/commit/8d963684c60c98fecf48fc4075bcd9c67537dc5c)) + ### [9.2.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.2.0...v9.2.1) (2021-04-15) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7997e1d865d..7e16a33a6ad 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.2.1", + "version": "9.2.2", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From b42b20058a855e67cb16239c6d8026d32b111c8b Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:54:10 -0700 Subject: [PATCH 0747/1029] fix(deps): require google-gax v2.12.0 (#1061) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7e16a33a6ad..2a629137ed3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -57,7 +57,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^7.0.0", - "google-gax": "^2.9.2", + "google-gax": "^2.12.0", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5" From 4e58342a8d1b6ed8ce772a53c7bb2af98f9d426d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sun, 9 May 2021 22:13:41 -0700 Subject: [PATCH 0748/1029] chore: release 9.2.3 (#1062) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 893d5d8d4a3..ca947f3f1a2 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.2.3](https://www.github.com/googleapis/nodejs-logging/compare/v9.2.2...v9.2.3) (2021-05-07) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#1061](https://www.github.com/googleapis/nodejs-logging/issues/1061)) ([8866b55](https://www.github.com/googleapis/nodejs-logging/commit/8866b55ad0624d15c4aa2a616678ad3718325826)) + ### [9.2.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.2.1...v9.2.2) (2021-05-04) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2a629137ed3..b9f5ede91a7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.2.2", + "version": "9.2.3", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From b76e5df863479e64b9f55c83d6d98fa7a50438db Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 19:50:08 -0700 Subject: [PATCH 0749/1029] chore: new owl bot post processor docker image (#1064) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 5 +- .../logging/.github/generated-files-bot.yml | 18 +- handwritten/logging/protos/protos.d.ts | 20 +- handwritten/logging/protos/protos.js | 40 +- handwritten/logging/src/entry.ts | 2 +- handwritten/logging/src/log.ts | 2 +- .../src/v2/config_service_v2_client.ts | 323 ++++--- .../src/v2/logging_service_v2_client.ts | 78 +- .../src/v2/metrics_service_v2_client.ts | 101 ++- .../test/gapic_config_service_v2_v2.ts | 785 +++++++++--------- .../test/gapic_logging_service_v2_v2.ts | 708 +++++++++------- .../test/gapic_metrics_service_v2_v2.ts | 660 ++++++++------- handwritten/logging/test/index.ts | 14 +- handwritten/logging/test/log.ts | 15 +- .../logging/test/middleware/test-context.ts | 8 +- handwritten/logging/test/sink.ts | 4 +- 16 files changed, 1471 insertions(+), 1312 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 278e98ced87..a3a3420de72 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,4 +1,3 @@ docker: - digest: sha256:c3eae37a355402067b97cbeb6f5a7d2dd87aecfd064aeb2d2ea0bde40778cf68 - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + digest: sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f diff --git a/handwritten/logging/.github/generated-files-bot.yml b/handwritten/logging/.github/generated-files-bot.yml index 8bb592438b0..1b3ef1c7837 100644 --- a/handwritten/logging/.github/generated-files-bot.yml +++ b/handwritten/logging/.github/generated-files-bot.yml @@ -1,5 +1,13 @@ -# Source template: https://github.com/googleapis/synthtool/blob/master/synthtool/gcp/templates/node_library/CONTRIBUTING.md -externalManifests: -- type: json - file: 'synth.metadata' - jsonpath: '$.generatedFiles[*]' +generatedFiles: +- path: '.kokoro/**' + message: '`.kokoro` files are templated and should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' +- path: '.github/CODEOWNERS' + message: 'CODEOWNERS should instead be modified via the `codeowner_team` property in .repo-metadata.json' +- path: '.github/workflows/**' + message: '`.github/workflows` (GitHub Actions) should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' +- path: '.github/generated-files-bot.+(yml|yaml)' + message: '`.github/generated-files-bot.(yml|yaml)` should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' +- path: 'README.md' + message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml' +- path: 'samples/README.md' + message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml' diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 4bb55075f11..49247c807aa 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -94,7 +94,7 @@ export namespace google { public protoPayload?: (google.protobuf.IAny|null); /** LogEntry textPayload. */ - public textPayload: string; + public textPayload?: (string|null); /** LogEntry jsonPayload. */ public jsonPayload?: (google.protobuf.IStruct|null); @@ -7590,19 +7590,19 @@ export namespace google { public selector: string; /** HttpRule get. */ - public get: string; + public get?: (string|null); /** HttpRule put. */ - public put: string; + public put?: (string|null); /** HttpRule post. */ - public post: string; + public post?: (string|null); /** HttpRule delete. */ - public delete: string; + public delete?: (string|null); /** HttpRule patch. */ - public patch: string; + public patch?: (string|null); /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); @@ -12137,16 +12137,16 @@ export namespace google { constructor(properties?: google.protobuf.IValue); /** Value nullValue. */ - public nullValue: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue); + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); /** Value numberValue. */ - public numberValue: number; + public numberValue?: (number|null); /** Value stringValue. */ - public stringValue: string; + public stringValue?: (string|null); /** Value boolValue. */ - public boolValue: boolean; + public boolValue?: (boolean|null); /** Value structValue. */ public structValue?: (google.protobuf.IStruct|null); diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 14cb3342a9c..d976c4990fb 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -123,11 +123,11 @@ /** * LogEntry textPayload. - * @member {string} textPayload + * @member {string|null|undefined} textPayload * @memberof google.logging.v2.LogEntry * @instance */ - LogEntry.prototype.textPayload = ""; + LogEntry.prototype.textPayload = null; /** * LogEntry jsonPayload. @@ -17831,43 +17831,43 @@ /** * HttpRule get. - * @member {string} get + * @member {string|null|undefined} get * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.get = ""; + HttpRule.prototype.get = null; /** * HttpRule put. - * @member {string} put + * @member {string|null|undefined} put * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.put = ""; + HttpRule.prototype.put = null; /** * HttpRule post. - * @member {string} post + * @member {string|null|undefined} post * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.post = ""; + HttpRule.prototype.post = null; /** * HttpRule delete. - * @member {string} delete + * @member {string|null|undefined} delete * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype["delete"] = ""; + HttpRule.prototype["delete"] = null; /** * HttpRule patch. - * @member {string} patch + * @member {string|null|undefined} patch * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.patch = ""; + HttpRule.prototype.patch = null; /** * HttpRule custom. @@ -30364,35 +30364,35 @@ /** * Value nullValue. - * @member {google.protobuf.NullValue} nullValue + * @member {google.protobuf.NullValue|null|undefined} nullValue * @memberof google.protobuf.Value * @instance */ - Value.prototype.nullValue = 0; + Value.prototype.nullValue = null; /** * Value numberValue. - * @member {number} numberValue + * @member {number|null|undefined} numberValue * @memberof google.protobuf.Value * @instance */ - Value.prototype.numberValue = 0; + Value.prototype.numberValue = null; /** * Value stringValue. - * @member {string} stringValue + * @member {string|null|undefined} stringValue * @memberof google.protobuf.Value * @instance */ - Value.prototype.stringValue = ""; + Value.prototype.stringValue = null; /** * Value boolValue. - * @member {boolean} boolValue + * @member {boolean|null|undefined} boolValue * @memberof google.protobuf.Value * @instance */ - Value.prototype.boolValue = false; + Value.prototype.boolValue = null; /** * Value structValue. diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 772550541bc..277ca02b60a 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -150,7 +150,7 @@ class Entry { * object with a string value, `[Circular]`. */ toJSON(options: ToJsonOptions = {}) { - const entry = (extend(true, {}, this.metadata) as {}) as EntryJson; + const entry = extend(true, {}, this.metadata) as {} as EntryJson; // Format log message if (this.data?.toString() === '[object Object]') { entry.jsonPayload = objToStruct(this.data, { diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 696f1d69520..893a4156838 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -894,7 +894,7 @@ class Log implements LogSeverityFunctions { return writeWithResource(this.logging.detectedResource); } else { const resource = await getDefaultResource( - (this.logging.auth as unknown) as GoogleAuth + this.logging.auth as unknown as GoogleAuth ); this.logging.detectedResource = resource; return writeWithResource(resource); diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 3937cefa8bb..00896195b6f 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -172,12 +172,14 @@ export class ConfigServiceV2Client { billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/exclusions/{exclusion}' ), - billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' - ), - billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' - ), + billingAccountLocationBucketPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + ), + billingAccountLocationBucketViewPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), @@ -217,9 +219,10 @@ export class ConfigServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), - organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' - ), + organizationLocationBucketViewPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), @@ -347,13 +350,14 @@ export class ConfigServiceV2Client { ]; for (const methodName of configServiceV2StubMethods) { const callPromise = this.configServiceV2Stub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, (err: Error | null | undefined) => () => { throw err; } @@ -514,11 +518,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getBucket(request, options, callback); } @@ -611,11 +614,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createBucket(request, options, callback); } @@ -725,11 +727,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.updateBucket(request, options, callback); } @@ -820,11 +821,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.deleteBucket(request, options, callback); } @@ -913,11 +913,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.undeleteBucket(request, options, callback); } @@ -1002,11 +1001,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getView(request, options, callback); } @@ -1096,11 +1094,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createView(request, options, callback); } @@ -1197,11 +1194,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.updateView(request, options, callback); } @@ -1286,11 +1282,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.deleteView(request, options, callback); } @@ -1377,11 +1372,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - sink_name: request.sinkName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + sink_name: request.sinkName || '', + }); this.initialize(); return this.innerApiCalls.getSink(request, options, callback); } @@ -1486,11 +1480,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createSink(request, options, callback); } @@ -1612,11 +1605,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - sink_name: request.sinkName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + sink_name: request.sinkName || '', + }); this.initialize(); return this.innerApiCalls.updateSink(request, options, callback); } @@ -1705,11 +1697,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - sink_name: request.sinkName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + sink_name: request.sinkName || '', + }); this.initialize(); return this.innerApiCalls.deleteSink(request, options, callback); } @@ -1796,11 +1787,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getExclusion(request, options, callback); } @@ -1892,11 +1882,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createExclusion(request, options, callback); } @@ -1994,11 +1983,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.updateExclusion(request, options, callback); } @@ -2085,11 +2073,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.deleteExclusion(request, options, callback); } @@ -2188,11 +2175,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getCmekSettings(request, options, callback); } @@ -2313,11 +2299,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.updateCmekSettings(request, options, callback); } @@ -2419,11 +2404,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listBuckets(request, options, callback); } @@ -2472,11 +2456,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listBuckets.createStream( @@ -2536,17 +2519,16 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listBuckets.asyncIterate( this.innerApiCalls['listBuckets'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -2640,11 +2622,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listViews(request, options, callback); } @@ -2686,11 +2667,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listViews.createStream( @@ -2743,17 +2723,16 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listViews.asyncIterate( this.innerApiCalls['listViews'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -2850,11 +2829,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listSinks(request, options, callback); } @@ -2899,11 +2877,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listSinks.createStream( @@ -2959,17 +2936,16 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listSinks.asyncIterate( this.innerApiCalls['listSinks'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -3066,11 +3042,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listExclusions(request, options, callback); } @@ -3115,11 +3090,10 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listExclusions.createStream( @@ -3175,17 +3149,16 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listExclusions.asyncIterate( this.innerApiCalls['listExclusions'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 5868c923d15..65f8b278b4a 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -172,12 +172,14 @@ export class LoggingServiceV2Client { billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/exclusions/{exclusion}' ), - billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' - ), - billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' - ), + billingAccountLocationBucketPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + ), + billingAccountLocationBucketViewPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), @@ -214,9 +216,10 @@ export class LoggingServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), - organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' - ), + organizationLocationBucketViewPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), @@ -355,13 +358,14 @@ export class LoggingServiceV2Client { ]; for (const methodName of loggingServiceV2StubMethods) { const callPromise = this.loggingServiceV2Stub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, (err: Error | null | undefined) => () => { throw err; } @@ -533,11 +537,10 @@ export class LoggingServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - log_name: request.logName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + log_name: request.logName || '', + }); this.initialize(); return this.innerApiCalls.deleteLog(request, options, callback); } @@ -984,7 +987,7 @@ export class LoggingServiceV2Client { this.initialize(); return this.descriptors.page.listLogEntries.asyncIterate( this.innerApiCalls['listLogEntries'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1170,7 +1173,7 @@ export class LoggingServiceV2Client { this.initialize(); return this.descriptors.page.listMonitoredResourceDescriptors.asyncIterate( this.innerApiCalls['listMonitoredResourceDescriptors'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1280,11 +1283,10 @@ export class LoggingServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listLogs(request, options, callback); } @@ -1341,11 +1343,10 @@ export class LoggingServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listLogs.createStream( @@ -1413,17 +1414,16 @@ export class LoggingServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listLogs.asyncIterate( this.innerApiCalls['listLogs'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index e46977d957c..855b6ee1a20 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -172,12 +172,14 @@ export class MetricsServiceV2Client { billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/exclusions/{exclusion}' ), - billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' - ), - billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' - ), + billingAccountLocationBucketPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + ), + billingAccountLocationBucketViewPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), @@ -214,9 +216,10 @@ export class MetricsServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), - organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' - ), + organizationLocationBucketViewPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), @@ -311,13 +314,14 @@ export class MetricsServiceV2Client { ]; for (const methodName of metricsServiceV2StubMethods) { const callPromise = this.metricsServiceV2Stub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, (err: Error | null | undefined) => () => { throw err; } @@ -473,11 +477,10 @@ export class MetricsServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - metric_name: request.metricName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + metric_name: request.metricName || '', + }); this.initialize(); return this.innerApiCalls.getLogMetric(request, options, callback); } @@ -564,11 +567,10 @@ export class MetricsServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createLogMetric(request, options, callback); } @@ -656,11 +658,10 @@ export class MetricsServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - metric_name: request.metricName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + metric_name: request.metricName || '', + }); this.initialize(); return this.innerApiCalls.updateLogMetric(request, options, callback); } @@ -742,11 +743,10 @@ export class MetricsServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - metric_name: request.metricName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + metric_name: request.metricName || '', + }); this.initialize(); return this.innerApiCalls.deleteLogMetric(request, options, callback); } @@ -841,11 +841,10 @@ export class MetricsServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listLogMetrics(request, options, callback); } @@ -887,11 +886,10 @@ export class MetricsServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listLogMetrics.createStream( @@ -944,17 +942,16 @@ export class MetricsServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listLogMetrics.asyncIterate( this.innerApiCalls['listLogMetrics'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 9b2d20f8304..fa631857603 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( filledObject ) as T; @@ -249,9 +248,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); - client.innerApiCalls.getBucket = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getBucket = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getBucket( request, @@ -358,9 +356,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); - client.innerApiCalls.createBucket = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createBucket = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createBucket( request, @@ -470,9 +467,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); - client.innerApiCalls.updateBucket = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateBucket = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateBucket( request, @@ -582,9 +578,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteBucket = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteBucket = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteBucket( request, @@ -694,9 +689,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.undeleteBucket = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.undeleteBucket = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.undeleteBucket( request, @@ -806,9 +800,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); - client.innerApiCalls.getView = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getView = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getView( request, @@ -915,9 +908,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); - client.innerApiCalls.createView = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createView = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createView( request, @@ -1027,9 +1019,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); - client.innerApiCalls.updateView = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateView = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateView( request, @@ -1139,9 +1130,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteView = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteView = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteView( request, @@ -1251,9 +1241,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); - client.innerApiCalls.getSink = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getSink = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getSink( request, @@ -1360,9 +1349,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); - client.innerApiCalls.createSink = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createSink = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createSink( request, @@ -1472,9 +1460,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); - client.innerApiCalls.updateSink = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateSink = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateSink( request, @@ -1584,9 +1571,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteSink = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteSink = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteSink( request, @@ -1696,9 +1682,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); - client.innerApiCalls.getExclusion = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getExclusion = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getExclusion( request, @@ -1808,9 +1793,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); - client.innerApiCalls.createExclusion = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createExclusion = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createExclusion( request, @@ -1920,9 +1904,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); - client.innerApiCalls.updateExclusion = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateExclusion = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateExclusion( request, @@ -2032,9 +2015,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteExclusion = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteExclusion = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteExclusion( request, @@ -2144,9 +2126,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.CmekSettings() ); - client.innerApiCalls.getCmekSettings = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCmekSettings = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCmekSettings( request, @@ -2225,9 +2206,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.CmekSettings() ); - client.innerApiCalls.updateCmekSettings = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.updateCmekSettings = + stubSimpleCall(expectedResponse); const [response] = await client.updateCmekSettings(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -2258,9 +2238,8 @@ describe('v2.ConfigServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.CmekSettings() ); - client.innerApiCalls.updateCmekSettings = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCmekSettings = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCmekSettings( request, @@ -2374,9 +2353,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogBucket()), generateSampleMessage(new protos.google.logging.v2.LogBucket()), ]; - client.innerApiCalls.listBuckets = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listBuckets = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listBuckets( request, @@ -2448,9 +2426,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogBucket()), generateSampleMessage(new protos.google.logging.v2.LogBucket()), ]; - client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listBuckets.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listBucketsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogBucket[] = []; @@ -2538,9 +2515,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogBucket()), generateSampleMessage(new protos.google.logging.v2.LogBucket()), ]; - client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listBuckets.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.logging.v2.ILogBucket[] = []; const iterable = client.listBucketsAsync(request); for await (const resource of iterable) { @@ -2656,9 +2632,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogView()), generateSampleMessage(new protos.google.logging.v2.LogView()), ]; - client.innerApiCalls.listViews = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listViews = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listViews( request, @@ -2727,9 +2702,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogView()), generateSampleMessage(new protos.google.logging.v2.LogView()), ]; - client.descriptors.page.listViews.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listViews.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listViewsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogView[] = []; @@ -2815,9 +2789,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogView()), generateSampleMessage(new protos.google.logging.v2.LogView()), ]; - client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listViews.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.logging.v2.ILogView[] = []; const iterable = client.listViewsAsync(request); for await (const resource of iterable) { @@ -2929,9 +2902,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogSink()), generateSampleMessage(new protos.google.logging.v2.LogSink()), ]; - client.innerApiCalls.listSinks = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listSinks = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listSinks( request, @@ -3000,9 +2972,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogSink()), generateSampleMessage(new protos.google.logging.v2.LogSink()), ]; - client.descriptors.page.listSinks.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listSinks.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listSinksStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogSink[] = []; @@ -3088,9 +3059,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogSink()), generateSampleMessage(new protos.google.logging.v2.LogSink()), ]; - client.descriptors.page.listSinks.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listSinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.logging.v2.ILogSink[] = []; const iterable = client.listSinksAsync(request); for await (const resource of iterable) { @@ -3202,9 +3172,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogExclusion()), generateSampleMessage(new protos.google.logging.v2.LogExclusion()), ]; - client.innerApiCalls.listExclusions = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listExclusions = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listExclusions( request, @@ -3276,9 +3245,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogExclusion()), generateSampleMessage(new protos.google.logging.v2.LogExclusion()), ]; - client.descriptors.page.listExclusions.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listExclusions.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listExclusionsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogExclusion[] = []; @@ -3300,10 +3268,9 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(client.innerApiCalls.listExclusions, request) ); assert.strictEqual( - (client.descriptors.page.listExclusions - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listExclusions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -3320,10 +3287,8 @@ describe('v2.ConfigServiceV2Client', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listExclusions.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listExclusions.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listExclusionsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogExclusion[] = []; @@ -3344,10 +3309,9 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(client.innerApiCalls.listExclusions, request) ); assert.strictEqual( - (client.descriptors.page.listExclusions - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listExclusions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -3368,9 +3332,8 @@ describe('v2.ConfigServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogExclusion()), generateSampleMessage(new protos.google.logging.v2.LogExclusion()), ]; - client.descriptors.page.listExclusions.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listExclusions.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.logging.v2.ILogExclusion[] = []; const iterable = client.listExclusionsAsync(request); for await (const resource of iterable) { @@ -3378,15 +3341,15 @@ describe('v2.ConfigServiceV2Client', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listExclusions - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listExclusions.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listExclusions - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listExclusions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -3403,10 +3366,8 @@ describe('v2.ConfigServiceV2Client', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listExclusions.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listExclusions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listExclusionsAsync(request); await assert.rejects(async () => { const responses: protos.google.logging.v2.ILogExclusion[] = []; @@ -3415,15 +3376,15 @@ describe('v2.ConfigServiceV2Client', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listExclusions - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listExclusions.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listExclusions - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listExclusions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -3453,21 +3414,26 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { - const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountCmekSettingsName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3499,34 +3465,38 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountExclusionName', () => { - const result = client.matchBillingAccountFromBillingAccountExclusionName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountExclusionName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchExclusionFromBillingAccountExclusionName', () => { - const result = client.matchExclusionFromBillingAccountExclusionName( - fakePath - ); + const result = + client.matchExclusionFromBillingAccountExclusionName(fakePath); assert.strictEqual(result, 'exclusionValue'); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3545,12 +3515,10 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.billingAccountLocationBucketPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.billingAccountLocationBucketPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.billingAccountLocationBucketPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketPathTemplate.match = + sinon.stub().returns(expectedParameters); it('billingAccountLocationBucketPath', () => { const result = client.billingAccountLocationBucketPath( @@ -3560,47 +3528,54 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLocationBucketName', () => { - const result = client.matchBillingAccountFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLocationBucketName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromBillingAccountLocationBucketName', () => { - const result = client.matchLocationFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromBillingAccountLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromBillingAccountLocationBucketName', () => { - const result = client.matchBucketFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromBillingAccountLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3620,12 +3595,10 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = + sinon.stub().returns(expectedParameters); it('billingAccountLocationBucketViewPath', () => { const result = client.billingAccountLocationBucketViewPath( @@ -3636,60 +3609,70 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { - const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromBillingAccountLocationBucketViewName', () => { - const result = client.matchLocationFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromBillingAccountLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromBillingAccountLocationBucketViewName', () => { - const result = client.matchBucketFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromBillingAccountLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromBillingAccountLocationBucketViewName', () => { - const result = client.matchViewFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromBillingAccountLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3721,21 +3704,24 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLogName', () => { - const result = client.matchBillingAccountFromBillingAccountLogName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLogName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3745,8 +3731,10 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.matchLogFromBillingAccountLogName(fakePath); assert.strictEqual(result, 'logValue'); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3778,21 +3766,24 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountSinkName', () => { - const result = client.matchBillingAccountFromBillingAccountSinkName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountSinkName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3802,8 +3793,10 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.matchSinkFromBillingAccountSinkName(fakePath); assert.strictEqual(result, 'sinkValue'); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3831,8 +3824,10 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.folderCmekSettingsPath('folderValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -3842,8 +3837,10 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.matchFolderFromFolderCmekSettingsName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3929,8 +3926,10 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -3940,21 +3939,24 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.matchFolderFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromFolderLocationBucketName', () => { - const result = client.matchLocationFromFolderLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3964,8 +3966,10 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.matchBucketFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4001,60 +4005,66 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderLocationBucketViewName', () => { - const result = client.matchFolderFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchFolderFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromFolderLocationBucketViewName', () => { - const result = client.matchLocationFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromFolderLocationBucketViewName', () => { - const result = client.matchBucketFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromFolderLocationBucketViewName', () => { - const result = client.matchViewFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4278,21 +4288,24 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.organizationCmekSettingsPath('organizationValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationCmekSettingsName', () => { - const result = client.matchOrganizationFromOrganizationCmekSettingsName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationCmekSettingsName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4324,34 +4337,38 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationExclusionName', () => { - const result = client.matchOrganizationFromOrganizationExclusionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationExclusionName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchExclusionFromOrganizationExclusionName', () => { - const result = client.matchExclusionFromOrganizationExclusionName( - fakePath - ); + const result = + client.matchExclusionFromOrganizationExclusionName(fakePath); assert.strictEqual(result, 'exclusionValue'); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4385,47 +4402,52 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationLocationBucketName', () => { - const result = client.matchOrganizationFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromOrganizationLocationBucketName', () => { - const result = client.matchLocationFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromOrganizationLocationBucketName', () => { - const result = client.matchBucketFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4445,12 +4467,10 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationLocationBucketViewPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationLocationBucketViewPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationLocationBucketViewPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationBucketViewPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationLocationBucketViewPath', () => { const result = client.organizationLocationBucketViewPath( @@ -4461,60 +4481,68 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationLocationBucketViewName', () => { - const result = client.matchOrganizationFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromOrganizationLocationBucketViewName', () => { - const result = client.matchLocationFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromOrganizationLocationBucketViewName', () => { - const result = client.matchBucketFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromOrganizationLocationBucketViewName', () => { - const result = client.matchViewFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4553,9 +4581,8 @@ describe('v2.ConfigServiceV2Client', () => { }); it('matchOrganizationFromOrganizationLogName', () => { - const result = client.matchOrganizationFromOrganizationLogName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLogName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) @@ -4600,17 +4627,18 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationSinkPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationSinkPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationSinkName', () => { - const result = client.matchOrganizationFromOrganizationSinkName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationSinkName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) @@ -4689,8 +4717,10 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.projectCmekSettingsPath('projectValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -4700,8 +4730,10 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.matchProjectFromProjectCmekSettingsName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4733,8 +4765,10 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -4788,47 +4822,52 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectLocationBucketName', () => { - const result = client.matchProjectFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchProjectFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromProjectLocationBucketName', () => { - const result = client.matchLocationFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromProjectLocationBucketName', () => { - const result = client.matchBucketFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4864,60 +4903,66 @@ describe('v2.ConfigServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectLocationBucketViewName', () => { - const result = client.matchProjectFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchProjectFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromProjectLocationBucketViewName', () => { - const result = client.matchLocationFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromProjectLocationBucketViewName', () => { - const result = client.matchBucketFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromProjectLocationBucketViewName', () => { - const result = client.matchViewFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index c2b8e344527..0d6ee55f807 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( filledObject ) as T; @@ -263,9 +262,8 @@ describe('v2.LoggingServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteLog = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteLog = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteLog( request, @@ -356,9 +354,8 @@ describe('v2.LoggingServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesResponse() ); - client.innerApiCalls.writeLogEntries = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.writeLogEntries = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.writeLogEntries( request, @@ -420,9 +417,8 @@ describe('v2.LoggingServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.TailLogEntriesResponse() ); - client.innerApiCalls.tailLogEntries = stubBidiStreamingCall( - expectedResponse - ); + client.innerApiCalls.tailLogEntries = + stubBidiStreamingCall(expectedResponse); const stream = client.tailLogEntries(); const promise = new Promise((resolve, reject) => { stream.on( @@ -445,9 +441,8 @@ describe('v2.LoggingServiceV2Client', () => { .calledWithExactly(undefined) ); assert.deepStrictEqual( - (((stream as unknown) as PassThrough)._transform as SinonStub).getCall( - 0 - ).args[0], + ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) + .args[0], request ); }); @@ -487,9 +482,8 @@ describe('v2.LoggingServiceV2Client', () => { .calledWithExactly(undefined) ); assert.deepStrictEqual( - (((stream as unknown) as PassThrough)._transform as SinonStub).getCall( - 0 - ).args[0], + ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) + .args[0], request ); }); @@ -536,9 +530,8 @@ describe('v2.LoggingServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogEntry()), generateSampleMessage(new protos.google.logging.v2.LogEntry()), ]; - client.innerApiCalls.listLogEntries = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listLogEntries = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listLogEntries( request, @@ -600,9 +593,8 @@ describe('v2.LoggingServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogEntry()), generateSampleMessage(new protos.google.logging.v2.LogEntry()), ]; - client.descriptors.page.listLogEntries.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listLogEntries.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listLogEntriesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogEntry[] = []; @@ -635,10 +627,8 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.logging.v2.ListLogEntriesRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listLogEntries.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listLogEntries.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listLogEntriesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogEntry[] = []; @@ -674,9 +664,8 @@ describe('v2.LoggingServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogEntry()), generateSampleMessage(new protos.google.logging.v2.LogEntry()), ]; - client.descriptors.page.listLogEntries.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listLogEntries.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.logging.v2.ILogEntry[] = []; const iterable = client.listLogEntriesAsync(request); for await (const resource of iterable) { @@ -684,8 +673,9 @@ describe('v2.LoggingServiceV2Client', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listLogEntries - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listLogEntries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); }); @@ -700,10 +690,8 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.logging.v2.ListLogEntriesRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listLogEntries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listLogEntries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listLogEntriesAsync(request); await assert.rejects(async () => { const responses: protos.google.logging.v2.ILogEntry[] = []; @@ -712,8 +700,9 @@ describe('v2.LoggingServiceV2Client', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listLogEntries - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listLogEntries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); }); @@ -741,9 +730,8 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.api.MonitoredResourceDescriptor() ), ]; - client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listMonitoredResourceDescriptors = + stubSimpleCall(expectedResponse); const [response] = await client.listMonitoredResourceDescriptors(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -774,9 +762,8 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.api.MonitoredResourceDescriptor() ), ]; - client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listMonitoredResourceDescriptors = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listMonitoredResourceDescriptors( request, @@ -847,9 +834,8 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.api.MonitoredResourceDescriptor() ), ]; - client.descriptors.page.listMonitoredResourceDescriptors.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listMonitoredResourceDescriptors.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listMonitoredResourceDescriptorsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.MonitoredResourceDescriptor[] = []; @@ -869,8 +855,10 @@ describe('v2.LoggingServiceV2Client', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listMonitoredResourceDescriptors - .createStream as SinonStub) + ( + client.descriptors.page.listMonitoredResourceDescriptors + .createStream as SinonStub + ) .getCall(0) .calledWith( client.innerApiCalls.listMonitoredResourceDescriptors, @@ -889,10 +877,8 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listMonitoredResourceDescriptors.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listMonitoredResourceDescriptors.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listMonitoredResourceDescriptorsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.MonitoredResourceDescriptor[] = []; @@ -911,8 +897,10 @@ describe('v2.LoggingServiceV2Client', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listMonitoredResourceDescriptors - .createStream as SinonStub) + ( + client.descriptors.page.listMonitoredResourceDescriptors + .createStream as SinonStub + ) .getCall(0) .calledWith( client.innerApiCalls.listMonitoredResourceDescriptors, @@ -941,9 +929,8 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.api.MonitoredResourceDescriptor() ), ]; - client.descriptors.page.listMonitoredResourceDescriptors.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listMonitoredResourceDescriptors.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.api.IMonitoredResourceDescriptor[] = []; const iterable = client.listMonitoredResourceDescriptorsAsync(request); for await (const resource of iterable) { @@ -951,8 +938,10 @@ describe('v2.LoggingServiceV2Client', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listMonitoredResourceDescriptors - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listMonitoredResourceDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); }); @@ -967,10 +956,8 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listMonitoredResourceDescriptors.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listMonitoredResourceDescriptors.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listMonitoredResourceDescriptorsAsync(request); await assert.rejects(async () => { const responses: protos.google.api.IMonitoredResourceDescriptor[] = []; @@ -979,8 +966,10 @@ describe('v2.LoggingServiceV2Client', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listMonitoredResourceDescriptors - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listMonitoredResourceDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); }); @@ -1035,9 +1024,8 @@ describe('v2.LoggingServiceV2Client', () => { }, }; const expectedResponse = [new String(), new String(), new String()]; - client.innerApiCalls.listLogs = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listLogs = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listLogs( request, @@ -1099,9 +1087,8 @@ describe('v2.LoggingServiceV2Client', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [new String(), new String(), new String()]; - client.descriptors.page.listLogs.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listLogs.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listLogsStream(request); const promise = new Promise((resolve, reject) => { const responses: string[] = []; @@ -1183,9 +1170,8 @@ describe('v2.LoggingServiceV2Client', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [new String(), new String(), new String()]; - client.descriptors.page.listLogs.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listLogs.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: string[] = []; const iterable = client.listLogsAsync(request); for await (const resource of iterable) { @@ -1264,21 +1250,26 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { - const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountCmekSettingsName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1310,34 +1301,38 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountExclusionName', () => { - const result = client.matchBillingAccountFromBillingAccountExclusionName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountExclusionName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchExclusionFromBillingAccountExclusionName', () => { - const result = client.matchExclusionFromBillingAccountExclusionName( - fakePath - ); + const result = + client.matchExclusionFromBillingAccountExclusionName(fakePath); assert.strictEqual(result, 'exclusionValue'); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1356,12 +1351,10 @@ describe('v2.LoggingServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.billingAccountLocationBucketPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.billingAccountLocationBucketPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.billingAccountLocationBucketPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketPathTemplate.match = + sinon.stub().returns(expectedParameters); it('billingAccountLocationBucketPath', () => { const result = client.billingAccountLocationBucketPath( @@ -1371,47 +1364,54 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLocationBucketName', () => { - const result = client.matchBillingAccountFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLocationBucketName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromBillingAccountLocationBucketName', () => { - const result = client.matchLocationFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromBillingAccountLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromBillingAccountLocationBucketName', () => { - const result = client.matchBucketFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromBillingAccountLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1431,12 +1431,10 @@ describe('v2.LoggingServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = + sinon.stub().returns(expectedParameters); it('billingAccountLocationBucketViewPath', () => { const result = client.billingAccountLocationBucketViewPath( @@ -1447,60 +1445,70 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { - const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromBillingAccountLocationBucketViewName', () => { - const result = client.matchLocationFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromBillingAccountLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromBillingAccountLocationBucketViewName', () => { - const result = client.matchBucketFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromBillingAccountLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromBillingAccountLocationBucketViewName', () => { - const result = client.matchViewFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromBillingAccountLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1532,21 +1540,24 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLogName', () => { - const result = client.matchBillingAccountFromBillingAccountLogName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLogName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1556,8 +1567,10 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.matchLogFromBillingAccountLogName(fakePath); assert.strictEqual(result, 'logValue'); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1589,21 +1602,24 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountSinkName', () => { - const result = client.matchBillingAccountFromBillingAccountSinkName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountSinkName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1613,8 +1629,10 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.matchSinkFromBillingAccountSinkName(fakePath); assert.strictEqual(result, 'sinkValue'); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1642,8 +1660,10 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.folderCmekSettingsPath('folderValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1653,8 +1673,10 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.matchFolderFromFolderCmekSettingsName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1740,8 +1762,10 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1751,21 +1775,24 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.matchFolderFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromFolderLocationBucketName', () => { - const result = client.matchLocationFromFolderLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1775,8 +1802,10 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.matchBucketFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1812,60 +1841,66 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderLocationBucketViewName', () => { - const result = client.matchFolderFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchFolderFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromFolderLocationBucketViewName', () => { - const result = client.matchLocationFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromFolderLocationBucketViewName', () => { - const result = client.matchBucketFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromFolderLocationBucketViewName', () => { - const result = client.matchViewFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2040,21 +2075,24 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.organizationCmekSettingsPath('organizationValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationCmekSettingsName', () => { - const result = client.matchOrganizationFromOrganizationCmekSettingsName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationCmekSettingsName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2086,34 +2124,38 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationExclusionName', () => { - const result = client.matchOrganizationFromOrganizationExclusionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationExclusionName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchExclusionFromOrganizationExclusionName', () => { - const result = client.matchExclusionFromOrganizationExclusionName( - fakePath - ); + const result = + client.matchExclusionFromOrganizationExclusionName(fakePath); assert.strictEqual(result, 'exclusionValue'); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2147,47 +2189,52 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationLocationBucketName', () => { - const result = client.matchOrganizationFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromOrganizationLocationBucketName', () => { - const result = client.matchLocationFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromOrganizationLocationBucketName', () => { - const result = client.matchBucketFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2207,12 +2254,10 @@ describe('v2.LoggingServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationLocationBucketViewPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationLocationBucketViewPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationLocationBucketViewPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationBucketViewPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationLocationBucketViewPath', () => { const result = client.organizationLocationBucketViewPath( @@ -2223,60 +2268,68 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationLocationBucketViewName', () => { - const result = client.matchOrganizationFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromOrganizationLocationBucketViewName', () => { - const result = client.matchLocationFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromOrganizationLocationBucketViewName', () => { - const result = client.matchBucketFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromOrganizationLocationBucketViewName', () => { - const result = client.matchViewFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2315,9 +2368,8 @@ describe('v2.LoggingServiceV2Client', () => { }); it('matchOrganizationFromOrganizationLogName', () => { - const result = client.matchOrganizationFromOrganizationLogName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLogName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) @@ -2362,17 +2414,18 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationSinkPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationSinkPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationSinkName', () => { - const result = client.matchOrganizationFromOrganizationSinkName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationSinkName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) @@ -2451,8 +2504,10 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.projectCmekSettingsPath('projectValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2462,8 +2517,10 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.matchProjectFromProjectCmekSettingsName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2495,8 +2552,10 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2550,47 +2609,52 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectLocationBucketName', () => { - const result = client.matchProjectFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchProjectFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromProjectLocationBucketName', () => { - const result = client.matchLocationFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromProjectLocationBucketName', () => { - const result = client.matchBucketFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2626,60 +2690,66 @@ describe('v2.LoggingServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectLocationBucketViewName', () => { - const result = client.matchProjectFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchProjectFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromProjectLocationBucketViewName', () => { - const result = client.matchLocationFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromProjectLocationBucketViewName', () => { - const result = client.matchBucketFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromProjectLocationBucketViewName', () => { - const result = client.matchViewFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index e81a7977d8b..935fc61d00c 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( filledObject ) as T; @@ -249,9 +248,8 @@ describe('v2.MetricsServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); - client.innerApiCalls.getLogMetric = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getLogMetric = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getLogMetric( request, @@ -361,9 +359,8 @@ describe('v2.MetricsServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); - client.innerApiCalls.createLogMetric = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createLogMetric = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createLogMetric( request, @@ -473,9 +470,8 @@ describe('v2.MetricsServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); - client.innerApiCalls.updateLogMetric = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateLogMetric = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateLogMetric( request, @@ -585,9 +581,8 @@ describe('v2.MetricsServiceV2Client', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteLogMetric = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteLogMetric = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteLogMetric( request, @@ -701,9 +696,8 @@ describe('v2.MetricsServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogMetric()), generateSampleMessage(new protos.google.logging.v2.LogMetric()), ]; - client.innerApiCalls.listLogMetrics = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listLogMetrics = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listLogMetrics( request, @@ -775,9 +769,8 @@ describe('v2.MetricsServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogMetric()), generateSampleMessage(new protos.google.logging.v2.LogMetric()), ]; - client.descriptors.page.listLogMetrics.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listLogMetrics.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listLogMetricsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogMetric[] = []; @@ -799,10 +792,9 @@ describe('v2.MetricsServiceV2Client', () => { .calledWith(client.innerApiCalls.listLogMetrics, request) ); assert.strictEqual( - (client.descriptors.page.listLogMetrics - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listLogMetrics.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -819,10 +811,8 @@ describe('v2.MetricsServiceV2Client', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listLogMetrics.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listLogMetrics.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listLogMetricsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.logging.v2.LogMetric[] = []; @@ -843,10 +833,9 @@ describe('v2.MetricsServiceV2Client', () => { .calledWith(client.innerApiCalls.listLogMetrics, request) ); assert.strictEqual( - (client.descriptors.page.listLogMetrics - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listLogMetrics.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -867,9 +856,8 @@ describe('v2.MetricsServiceV2Client', () => { generateSampleMessage(new protos.google.logging.v2.LogMetric()), generateSampleMessage(new protos.google.logging.v2.LogMetric()), ]; - client.descriptors.page.listLogMetrics.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listLogMetrics.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.logging.v2.ILogMetric[] = []; const iterable = client.listLogMetricsAsync(request); for await (const resource of iterable) { @@ -877,15 +865,15 @@ describe('v2.MetricsServiceV2Client', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listLogMetrics - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listLogMetrics.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listLogMetrics - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listLogMetrics.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -902,10 +890,8 @@ describe('v2.MetricsServiceV2Client', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listLogMetrics.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listLogMetrics.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listLogMetricsAsync(request); await assert.rejects(async () => { const responses: protos.google.logging.v2.ILogMetric[] = []; @@ -914,15 +900,15 @@ describe('v2.MetricsServiceV2Client', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listLogMetrics - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listLogMetrics.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listLogMetrics - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listLogMetrics.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -952,21 +938,26 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { - const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountCmekSettingsName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -998,34 +989,38 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountExclusionName', () => { - const result = client.matchBillingAccountFromBillingAccountExclusionName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountExclusionName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchExclusionFromBillingAccountExclusionName', () => { - const result = client.matchExclusionFromBillingAccountExclusionName( - fakePath - ); + const result = + client.matchExclusionFromBillingAccountExclusionName(fakePath); assert.strictEqual(result, 'exclusionValue'); assert( - (client.pathTemplates.billingAccountExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1044,12 +1039,10 @@ describe('v2.MetricsServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.billingAccountLocationBucketPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.billingAccountLocationBucketPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.billingAccountLocationBucketPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketPathTemplate.match = + sinon.stub().returns(expectedParameters); it('billingAccountLocationBucketPath', () => { const result = client.billingAccountLocationBucketPath( @@ -1059,47 +1052,54 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLocationBucketName', () => { - const result = client.matchBillingAccountFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLocationBucketName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromBillingAccountLocationBucketName', () => { - const result = client.matchLocationFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromBillingAccountLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromBillingAccountLocationBucketName', () => { - const result = client.matchBucketFromBillingAccountLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromBillingAccountLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.billingAccountLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1119,12 +1119,10 @@ describe('v2.MetricsServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketViewPathTemplate.match = + sinon.stub().returns(expectedParameters); it('billingAccountLocationBucketViewPath', () => { const result = client.billingAccountLocationBucketViewPath( @@ -1135,60 +1133,70 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { - const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromBillingAccountLocationBucketViewName', () => { - const result = client.matchLocationFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromBillingAccountLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromBillingAccountLocationBucketViewName', () => { - const result = client.matchBucketFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromBillingAccountLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromBillingAccountLocationBucketViewName', () => { - const result = client.matchViewFromBillingAccountLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromBillingAccountLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.billingAccountLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1220,21 +1228,24 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountLogName', () => { - const result = client.matchBillingAccountFromBillingAccountLogName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountLogName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1244,8 +1255,10 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.matchLogFromBillingAccountLogName(fakePath); assert.strictEqual(result, 'logValue'); assert( - (client.pathTemplates.billingAccountLogPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountLogPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1277,21 +1290,24 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .render as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchBillingAccountFromBillingAccountSinkName', () => { - const result = client.matchBillingAccountFromBillingAccountSinkName( - fakePath - ); + const result = + client.matchBillingAccountFromBillingAccountSinkName(fakePath); assert.strictEqual(result, 'billingAccountValue'); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1301,8 +1317,10 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.matchSinkFromBillingAccountSinkName(fakePath); assert.strictEqual(result, 'sinkValue'); assert( - (client.pathTemplates.billingAccountSinkPathTemplate - .match as SinonStub) + ( + client.pathTemplates.billingAccountSinkPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1330,8 +1348,10 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.folderCmekSettingsPath('folderValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1341,8 +1361,10 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.matchFolderFromFolderCmekSettingsName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1428,8 +1450,10 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1439,21 +1463,24 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.matchFolderFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromFolderLocationBucketName', () => { - const result = client.matchLocationFromFolderLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1463,8 +1490,10 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.matchBucketFromFolderLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.folderLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1500,60 +1529,66 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderLocationBucketViewName', () => { - const result = client.matchFolderFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchFolderFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromFolderLocationBucketViewName', () => { - const result = client.matchLocationFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromFolderLocationBucketViewName', () => { - const result = client.matchBucketFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromFolderLocationBucketViewName', () => { - const result = client.matchViewFromFolderLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromFolderLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.folderLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1728,21 +1763,24 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.organizationCmekSettingsPath('organizationValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationCmekSettingsName', () => { - const result = client.matchOrganizationFromOrganizationCmekSettingsName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationCmekSettingsName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1774,34 +1812,38 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationExclusionName', () => { - const result = client.matchOrganizationFromOrganizationExclusionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationExclusionName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchExclusionFromOrganizationExclusionName', () => { - const result = client.matchExclusionFromOrganizationExclusionName( - fakePath - ); + const result = + client.matchExclusionFromOrganizationExclusionName(fakePath); assert.strictEqual(result, 'exclusionValue'); assert( - (client.pathTemplates.organizationExclusionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationExclusionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1835,47 +1877,52 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationLocationBucketName', () => { - const result = client.matchOrganizationFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromOrganizationLocationBucketName', () => { - const result = client.matchLocationFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromOrganizationLocationBucketName', () => { - const result = client.matchBucketFromOrganizationLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromOrganizationLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.organizationLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1895,12 +1942,10 @@ describe('v2.MetricsServiceV2Client', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationLocationBucketViewPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationLocationBucketViewPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationLocationBucketViewPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationBucketViewPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationLocationBucketViewPath', () => { const result = client.organizationLocationBucketViewPath( @@ -1911,60 +1956,68 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationLocationBucketViewName', () => { - const result = client.matchOrganizationFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLocationBucketViewName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromOrganizationLocationBucketViewName', () => { - const result = client.matchLocationFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromOrganizationLocationBucketViewName', () => { - const result = client.matchBucketFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromOrganizationLocationBucketViewName', () => { - const result = client.matchViewFromOrganizationLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromOrganizationLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.organizationLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2003,9 +2056,8 @@ describe('v2.MetricsServiceV2Client', () => { }); it('matchOrganizationFromOrganizationLogName', () => { - const result = client.matchOrganizationFromOrganizationLogName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationLogName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) @@ -2050,17 +2102,18 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationSinkPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationSinkPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationSinkName', () => { - const result = client.matchOrganizationFromOrganizationSinkName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationSinkName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) @@ -2139,8 +2192,10 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.projectCmekSettingsPath('projectValue'); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectCmekSettingsPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectCmekSettingsPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2150,8 +2205,10 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.matchProjectFromProjectCmekSettingsName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectCmekSettingsPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectCmekSettingsPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2183,8 +2240,10 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectExclusionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectExclusionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2238,47 +2297,52 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectLocationBucketName', () => { - const result = client.matchProjectFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchProjectFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromProjectLocationBucketName', () => { - const result = client.matchLocationFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchLocationFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromProjectLocationBucketName', () => { - const result = client.matchBucketFromProjectLocationBucketName( - fakePath - ); + const result = + client.matchBucketFromProjectLocationBucketName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.projectLocationBucketPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2314,60 +2378,66 @@ describe('v2.MetricsServiceV2Client', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectLocationBucketViewName', () => { - const result = client.matchProjectFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchProjectFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromProjectLocationBucketViewName', () => { - const result = client.matchLocationFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchLocationFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchBucketFromProjectLocationBucketViewName', () => { - const result = client.matchBucketFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchBucketFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchViewFromProjectLocationBucketViewName', () => { - const result = client.matchViewFromProjectLocationBucketViewName( - fakePath - ); + const result = + client.matchViewFromProjectLocationBucketViewName(fakePath); assert.strictEqual(result, 'viewValue'); assert( - (client.pathTemplates.projectLocationBucketViewPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBucketViewPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index bb8db22ce14..32c48b21f77 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -44,7 +44,7 @@ interface AbortableDuplex extends Duplex { } const through = () => - (new PassThrough({objectMode: true}) as {}) as AbortableDuplex; + new PassThrough({objectMode: true}) as {} as AbortableDuplex; const noop = () => {}; let extended = false; @@ -338,10 +338,10 @@ describe('Logging', () => { describe('API request', () => { it('should call GAX method', async () => { - const config = ({ + const config = { a: 'b', c: 'd', - } as {}) as CreateSinkRequest; + } as {} as CreateSinkRequest; const expectedConfig = extend({}, config, { name: SINK_NAME, @@ -386,11 +386,11 @@ describe('Logging', () => { }); it('should accept GAX options', async () => { - const config = ({ + const config = { a: 'b', c: 'd', gaxOptions: {}, - } as {}) as CreateSinkRequest; + } as {} as CreateSinkRequest; logging.configService.createSink = async ( // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -1542,12 +1542,12 @@ describe('Logging', () => { let dataset: Dataset; beforeEach(() => { - dataset = ({ + dataset = { id: 'dataset-id', parent: { projectId: PROJECT_ID, }, - } as {}) as Dataset; + } as {} as Dataset; CONFIG = { destination: dataset, diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 465ea20c129..a1d3007917c 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -74,7 +74,7 @@ describe('Log', () => { }); function createLogger(maxEntrySize?: number) { - LOGGING = ({ + LOGGING = { projectId: '{{project-id}}', entry: sinon.stub(), getEntries: sinon.stub(), @@ -89,7 +89,7 @@ describe('Log', () => { getEnv: sinon.stub(), getProjectId: sinon.stub(), }, - } as {}) as Logging; + } as {} as Logging; const options: LogOptions = {}; if (maxEntrySize) { @@ -624,10 +624,11 @@ describe('Log', () => { log.maxEntrySize = maxSize; log.truncateEntries(entries); - const message: string = entries[0].jsonPayload!.fields!.message - .stringValue!; - const stack: string = entries[0].jsonPayload!.fields!.metadata - .structValue!.fields!.stack.stringValue!; + const message: string = + entries[0].jsonPayload!.fields!.message.stringValue!; + const stack: string = + entries[0].jsonPayload!.fields!.metadata.structValue!.fields!.stack + .stringValue!; assert.strictEqual(stack, ''); assert.ok(message.startsWith('hello world')); assert.ok(message.length < maxSize + entryMetaMaxLength); @@ -712,7 +713,7 @@ describe('Log', () => { it('should get JSON format from Entry object', () => { const entry = new Entry(); - entry.toJSON = () => (toJSONResponse as {}) as EntryJson; + entry.toJSON = () => toJSONResponse as {} as EntryJson; const decoratedEntries = log.decorateEntries_([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); assert(log.entry.notCalled); diff --git a/handwritten/logging/test/middleware/test-context.ts b/handwritten/logging/test/middleware/test-context.ts index 17ceae99df0..0d4638b8769 100644 --- a/handwritten/logging/test/middleware/test-context.ts +++ b/handwritten/logging/test/middleware/test-context.ts @@ -41,17 +41,13 @@ describe('middleware/context', () => { it('should correctly get request headers', () => { const req = {headers: {[HEADER_NAME]: HEADER_VALUE}}; - const wrapper = makeHeaderWrapper( - (req as unknown) as http.IncomingMessage - ); + const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); assert.strictEqual(wrapper.getHeader(HEADER_NAME), HEADER_VALUE); }); it('should correctly set request headers', () => { const req = {headers: {} as http.IncomingHttpHeaders}; - const wrapper = makeHeaderWrapper( - (req as unknown) as http.IncomingMessage - ); + const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); wrapper.setHeader(HEADER_NAME, HEADER_VALUE); assert.strictEqual(req.headers[HEADER_NAME], HEADER_VALUE); }); diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index d755f4ab438..50a86a6299a 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -39,12 +39,12 @@ describe('Sink', () => { const PROJECT_ID = 'project-id'; - const LOGGING = ({ + const LOGGING = { createSink: () => {}, projectId: '{{projectId}}', auth: () => {}, configService: () => {}, - } as {}) as Logging; + } as {} as Logging; const SINK_NAME = 'sink-name'; before(() => { From 2f2b4d9b491670b80e62a5c29c72648dee736393 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 20:02:59 -0700 Subject: [PATCH 0750/1029] fix: use require() to load JSON protos (#1065) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: use require() to load JSON protos The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis-gen/commit/77b18044813d4c8c415ff9ea68e76e307eb8e904 * 🦉 Updates from OwlBot Co-authored-by: Owl Bot Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- .../src/v2/config_service_v2_client.ts | 18 ++---------- .../src/v2/logging_service_v2_client.ts | 28 ++----------------- .../src/v2/metrics_service_v2_client.ts | 18 ++---------- 3 files changed, 7 insertions(+), 57 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 00896195b6f..42a874d077c 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -31,6 +31,7 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v2/config_service_v2_client_config.json`. @@ -145,22 +146,7 @@ export class ConfigServiceV2Client { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 65f8b278b4a..2f52ab38f17 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -31,6 +31,7 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v2/logging_service_v2_client_config.json`. @@ -145,22 +146,7 @@ export class LoggingServiceV2Client { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. @@ -278,15 +264,7 @@ export class LoggingServiceV2Client { ), }; - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const protoFilesRoot = opts.fallback - ? this._gaxModule.protobuf.Root.fromJSON( - // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - ) - : this._gaxModule.protobuf.loadSync(nodejsProtoPath); + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); // Some methods on this API support automatically batching // requests; denote this. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 855b6ee1a20..3dcabb7e33d 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -31,6 +31,7 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v2/metrics_service_v2_client_config.json`. @@ -145,22 +146,7 @@ export class MetricsServiceV2Client { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. From 6b600c03360bd459deed53f52cb580c41804708a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 20:12:21 -0700 Subject: [PATCH 0751/1029] chore: update gapic-generator-typescript to v1.3.2 (#1066) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update gapic-generator-typescript to v1.3.2 Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d7c95df3ab1ea1b4c22a4542bad4924cc46d1388 * 🦉 Updates from OwlBot Co-authored-by: Owl Bot Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/src/v2/config_service_v2_client.ts | 1 - handwritten/logging/src/v2/logging_service_v2_client.ts | 1 - handwritten/logging/src/v2/metrics_service_v2_client.ts | 1 - 3 files changed, 3 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 42a874d077c..ec3623e9343 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 2f52ab38f17..aba6bbbf028 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 3dcabb7e33d..17f45d00611 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; From f2d38f417c9a01bbf680ae717a6ca6217108b311 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 01:42:31 +0000 Subject: [PATCH 0752/1029] chore: new owl bot post processor docker image (#1068) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:b94b09fb24bf804090b8cc60ee726ca161d5e5915151e417f8ef5d8bcfe73cbc --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/protos/protos.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index a3a3420de72..e26fd96dec1 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f + digest: sha256:b94b09fb24bf804090b8cc60ee726ca161d5e5915151e417f8ef5d8bcfe73cbc diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 9d5ab8c974c..b630cd311f5 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -2494,8 +2494,7 @@ "java_multiple_files": true, "java_outer_classname": "LogSeverityProto", "java_package": "com.google.logging.type", - "php_namespace": "Google\\Cloud\\Logging\\Type", - "ruby_package": "Google::Cloud::Logging::Type" + "php_namespace": "Google\\Cloud\\Logging\\Type" }, "nested": { "HttpRequest": { From 3cfc72d19722019095b280f08c95ebb1c11c2c03 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 12 May 2021 00:39:31 -0700 Subject: [PATCH 0753/1029] build: release minified package under new name (#1063) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: release minified package under new name * 🦉 Updates from OwlBot * chore: owlbot to ignore custom publish script * fix: add publish script again * 🦉 Updates from OwlBot * fix: owlbot override * docs: mention minified library in README * 🦉 Updates from OwlBot * style: rephrase * fix: move publish min to postpublish npm script * 🦉 Updates from OwlBot Co-authored-by: Owl Bot --- handwritten/logging/.kokoro/publish-min.sh | 45 ++++++++++++++++++++++ handwritten/logging/.readme-partials.yml | 9 ++++- handwritten/logging/README.md | 7 +++- handwritten/logging/owlbot.py | 2 +- handwritten/logging/package.json | 6 ++- 5 files changed, 63 insertions(+), 6 deletions(-) create mode 100755 handwritten/logging/.kokoro/publish-min.sh diff --git a/handwritten/logging/.kokoro/publish-min.sh b/handwritten/logging/.kokoro/publish-min.sh new file mode 100755 index 00000000000..66d82ef62a3 --- /dev/null +++ b/handwritten/logging/.kokoro/publish-min.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://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. + +# `npm postpublish` script that ships an minified version of this library +# Todo(nicolezhu): Eventually deprecate this script for go/nodejs-logging-lite + +set -eo pipefail + +# Uglify /build to publish a smaller package +for d in $(find ./build/ -maxdepth 8 -type d) +do + pushd $d + for f in *.js; do + [ -f "$f" ] || break + + if [ -f "$f.map" ]; then + # Keep original .ts source mappings + uglifyjs --source-map "content='$f.map', url='$f.map'" "$f" --output "$f" + else + uglifyjs "$f" --output "$f" + fi + done + popd +done + +# Change and publish under package name `@google-cloud/logging-min` +sed -i -e 's/"name": "@google-cloud\/logging"/"name": "@google-cloud\/logging-min"/' package.json +if [ -f "package.json-e" ]; then + rm package.json-e +fi + +npm publish --access=public --registry=https://wombat-dressing-room.appspot.com diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index 6e4a0738cdf..6d4d96abdd5 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -1,6 +1,11 @@ introduction: |- - [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, + [Google Cloud Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. + + If you require lightweight dependencies, an experimental, minified version of + this library is available at [@google-cloud/logging-min](https://www.npmjs.com/package/@google-cloud/logging-min). + Note: `logging-min` is experimental, and its feature surface is subject to + change. body: |- ## Batching Writes @@ -19,4 +24,4 @@ body: |- ``` The `@google-cloud/logging` library will handle batching and dispatching - these log lines to the API. \ No newline at end of file + these log lines to the API. diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index dc1201c0c48..8977d422d57 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -11,9 +11,14 @@ -[Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, +[Google Cloud Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. +If you require lightweight dependencies, an experimental, minified version of +this library is available at [@google-cloud/logging-min](https://www.npmjs.com/package/@google-cloud/logging-min). +Note: `logging-min` is experimental, and its feature surface is subject to +change. + A comprehensive list of changes in each version may be found in [the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/master/CHANGELOG.md). diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index 8d58c1f6837..86b7a5bfb65 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -40,4 +40,4 @@ ".trampolinerc", "pass_down_envvars\+\=\(", 'pass_down_envvars+=(\n "ENVIRONMENT"\n "RUNTIME"' -) \ No newline at end of file +) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b9f5ede91a7..d057502955c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -43,7 +43,8 @@ "test": "c8 mocha build/test", "precompile": "gts clean", "api-extractor": "api-extractor run --local", - "api-documenter": "api-documenter yaml --input-folder=temp" + "api-documenter": "api-documenter yaml --input-folder=temp", + "postpublish": "./.kokoro/publish-min.sh" }, "dependencies": { "@google-cloud/common": "^3.4.1", @@ -95,7 +96,8 @@ "webpack": "^5.0.0", "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10" + "@microsoft/api-extractor": "^7.8.10", + "uglify-js": "^3.13.5" }, "engines": { "node": ">=10" From d7773b90508abde0f0f142c0194933559768f0d0 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 17 May 2021 21:43:12 -0700 Subject: [PATCH 0754/1029] chore: fix endless publishing loop (#1071) --- handwritten/logging/.kokoro/publish-min.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.kokoro/publish-min.sh b/handwritten/logging/.kokoro/publish-min.sh index 66d82ef62a3..96a1635898a 100755 --- a/handwritten/logging/.kokoro/publish-min.sh +++ b/handwritten/logging/.kokoro/publish-min.sh @@ -42,4 +42,5 @@ if [ -f "package.json-e" ]; then rm package.json-e fi -npm publish --access=public --registry=https://wombat-dressing-room.appspot.com +# Note: ignore the postpublish script here to avoid an endless publish loop. +npm publish --ignore-scripts --access=public --registry=https://wombat-dressing-room.appspot.com From 7628c68e5399593a6705db87e5cdeb030a34548c Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 18 May 2021 16:24:09 -0700 Subject: [PATCH 0755/1029] feat: fix resource autodetection for GKE, GAE, and GCE (#1070) * test: add environment test build configs for gae, gce, gke * chore: update to latest commit of env-tests-logging * fix: add resource.location and resource.pod_name for GKE envs * test: unit tests passing for gke resource detection * feat: add container_name label if user inputs * test: run latest environment tests containing gke labels * test: use latest environment test suite --- env-tests-logging | 2 +- .../environment/appengine_standard.cfg | 11 ++++ .../logging/.kokoro/environment/compute.cfg | 11 ++++ .../.kokoro/environment/kubernetes.cfg | 11 ++++ handwritten/logging/src/metadata.ts | 18 ++++-- handwritten/logging/test/metadata.ts | 61 +++++++++++++++---- 6 files changed, 96 insertions(+), 18 deletions(-) create mode 100644 handwritten/logging/.kokoro/environment/appengine_standard.cfg create mode 100644 handwritten/logging/.kokoro/environment/compute.cfg create mode 100644 handwritten/logging/.kokoro/environment/kubernetes.cfg diff --git a/env-tests-logging b/env-tests-logging index 174582a9fe0..7cf6ae515f9 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit 174582a9fe0381d526cec1b908c1a90a1cdc5413 +Subproject commit 7cf6ae515f976a55b81c380f80a94aff83ee88c8 diff --git a/handwritten/logging/.kokoro/environment/appengine_standard.cfg b/handwritten/logging/.kokoro/environment/appengine_standard.cfg new file mode 100644 index 00000000000..ca4804d4925 --- /dev/null +++ b/handwritten/logging/.kokoro/environment/appengine_standard.cfg @@ -0,0 +1,11 @@ +# Specify which tests to run +env_vars: { + key: "ENVIRONMENT" + value: "appengine_standard" +} + +# TODO: actually use this variable somewhere +env_vars: { + key: "RUNTIME" + value: "nodejs12" +} diff --git a/handwritten/logging/.kokoro/environment/compute.cfg b/handwritten/logging/.kokoro/environment/compute.cfg new file mode 100644 index 00000000000..78270d95e25 --- /dev/null +++ b/handwritten/logging/.kokoro/environment/compute.cfg @@ -0,0 +1,11 @@ +# Specify which tests to run +env_vars: { + key: "ENVIRONMENT" + value: "compute" +} + +# TODO: actually use this variable somewhere +env_vars: { + key: "RUNTIME" + value: "nodejs12" +} diff --git a/handwritten/logging/.kokoro/environment/kubernetes.cfg b/handwritten/logging/.kokoro/environment/kubernetes.cfg new file mode 100644 index 00000000000..db50a8b72d2 --- /dev/null +++ b/handwritten/logging/.kokoro/environment/kubernetes.cfg @@ -0,0 +1,11 @@ +# Specify which tests to run +env_vars: { + key: "ENVIRONMENT" + value: "kubernetes" +} + +# TODO: actually use this variable somewhere +env_vars: { + key: "RUNTIME" + value: "nodejs12" +} diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index e330fe2feaf..e7a5a99dfe9 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -145,7 +145,8 @@ export async function getGKEDescriptor() { // with metrics may not necessarily work however. // const resp = await gcpMetadata.instance('attributes/cluster-name'); - + const qualifiedZone = await gcpMetadata.instance('zone'); + const location = zoneFromQualifiedZone(qualifiedZone); let namespace; try { namespace = await readFile(KUBERNETES_NAMESPACE_ID_PATH, 'utf8'); @@ -158,8 +159,13 @@ export async function getGKEDescriptor() { return { type: 'k8s_container', labels: { + location, cluster_name: resp, namespace_name: namespace, + pod_name: process.env.HOSTNAME, + // Users must manually supply container name for now. + // This may be autodetected in the future, pending b/145137070. + container_name: process.env.CONTAINER_NAME, }, }; } @@ -190,7 +196,7 @@ export async function getDefaultResource(auth: GoogleAuth) { case GCPEnv.CLOUD_FUNCTIONS: return getCloudFunctionDescriptor().catch(() => getGlobalDescriptor()); case GCPEnv.COMPUTE_ENGINE: - // Google Cloud Run + // Note: GCPEnv.COMPUTE_ENGINE returns `true` for Google Cloud Run if (process.env.K_CONFIGURATION) { return getCloudRunDescriptor().catch(() => getGlobalDescriptor()); } else { @@ -225,10 +231,12 @@ export async function detectServiceContext( return { service: process.env.FUNCTION_NAME, }; - // One Kubernetes we probably need to use the pod-name to describe the - // service. Currently there isn't a universal way to acquire the pod - // name from within the pod. + // On Kubernetes we use the pod-name to describe the service. Currently, + // we acquire the pod-name from within the pod through env var `HOSTNAME`. case GCPEnv.KUBERNETES_ENGINE: + return { + service: process.env.HOSTNAME, + }; case GCPEnv.COMPUTE_ENGINE: // Google Cloud Run if (process.env.K_CONFIGURATION) { diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index abcbd69a0a1..5e6985a93fb 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -257,18 +257,38 @@ describe('metadata', () => { describe('getGKEDescriptor', () => { const CLUSTER_NAME = 'gke-cluster-name'; - it('should return the correct descriptor', async () => { - instanceOverride = { - path: 'attributes/cluster-name', - successArg: CLUSTER_NAME, - }; + beforeEach(() => { + process.env.HOSTNAME = 'node-gke-123'; + process.env.CONTAINER_NAME = 'my-container'; + }); + + afterEach(() => { + delete process.env.HOSTNAME; + delete process.env.CONTAINER_NAME; + }); + it('should return the correct descriptor', async () => { + const ZONE_ID = 'cyrodiil-anvil-2'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + instanceOverride = [ + { + path: 'attributes/cluster-name', + successArg: CLUSTER_NAME, + }, + { + path: 'zone', + successArg: ZONE_FULL, + }, + ]; const descriptor = await metadata.getGKEDescriptor(); assert.deepStrictEqual(descriptor, { type: 'k8s_container', labels: { cluster_name: CLUSTER_NAME, namespace_name: FAKE_READFILE_CONTENTS, + location: ZONE_ID, + pod_name: 'node-gke-123', + container_name: 'my-container', }, }); }); @@ -478,25 +498,38 @@ describe('metadata', () => { describe('container engine', () => { it('should return correct descriptor', async () => { const CLUSTER_NAME = 'overridden-value'; - instanceOverride = { - path: 'attributes/cluster-name', - successArg: CLUSTER_NAME, - }; + const ZONE_ID = 'cyrodiil-anvil-2'; + const ZONE_FULL = `projects/fake-project/zones/${ZONE_ID}`; + instanceOverride = [ + { + path: 'attributes/cluster-name', + successArg: CLUSTER_NAME, + }, + { + path: 'zone', + successArg: ZONE_FULL, + }, + ]; const fakeAuth = { async getEnv() { return GCPEnv.KUBERNETES_ENGINE; }, }; - + process.env.HOSTNAME = 'node-gke-123'; + process.env.CONTAINER_NAME = 'my-container'; const defaultResource = await metadata.getDefaultResource(fakeAuth); assert.deepStrictEqual(defaultResource, { type: 'k8s_container', labels: { + location: ZONE_ID, + pod_name: 'node-gke-123', cluster_name: CLUSTER_NAME, namespace_name: FAKE_READFILE_CONTENTS, + container_name: 'my-container', }, }); + delete process.env.CONTAINER_NAME; }); }); @@ -584,14 +617,18 @@ describe('metadata', () => { delete process.env['K_SERVICE']; }); - it('should return null on GKE', async () => { + it('should return the correct descriptor for GKE', async () => { const fakeAuth = { async getEnv() { return GCPEnv.KUBERNETES_ENGINE; }, }; + process.env.HOSTNAME = 'node-gke-123'; const serviceContext = await metadata.detectServiceContext(fakeAuth); - assert.strictEqual(serviceContext, null); + assert.deepStrictEqual(serviceContext, { + service: 'node-gke-123', + }); + delete process.env.HOSTNAME; }); it('should return null on GCE', async () => { From 909873296a54014d17522321ec950df7c8af08ca Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 May 2021 20:30:28 +0000 Subject: [PATCH 0756/1029] chore: new owl bot post processor docker image (#1075) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f4734af778c3d0eb58a6db0078907a87f2e53f3c7a6422363fc37ee52e02b25a --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.github/generated-files-bot.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index e26fd96dec1..043a606639e 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:b94b09fb24bf804090b8cc60ee726ca161d5e5915151e417f8ef5d8bcfe73cbc + digest: sha256:f4734af778c3d0eb58a6db0078907a87f2e53f3c7a6422363fc37ee52e02b25a diff --git a/handwritten/logging/.github/generated-files-bot.yml b/handwritten/logging/.github/generated-files-bot.yml index 1b3ef1c7837..6b04910c0fb 100644 --- a/handwritten/logging/.github/generated-files-bot.yml +++ b/handwritten/logging/.github/generated-files-bot.yml @@ -11,3 +11,6 @@ generatedFiles: message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml' - path: 'samples/README.md' message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml' +ignoreAuthors: +- 'gcf-owl-bot[bot]' +- 'yoshi-automation' From 1d4f3a2e1f0447517d0f25576e79841b824d5b26 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 19 May 2021 16:22:47 -0700 Subject: [PATCH 0757/1029] test: add required gcloud components (#1074) --- handwritten/logging/.kokoro/environment.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/handwritten/logging/.kokoro/environment.sh b/handwritten/logging/.kokoro/environment.sh index a9de2517ce5..5158d0d36e4 100755 --- a/handwritten/logging/.kokoro/environment.sh +++ b/handwritten/logging/.kokoro/environment.sh @@ -72,6 +72,16 @@ UUID=$(python -c 'import uuid; print(uuid.uuid1())' | head -c 7) export ENVCTL_ID=ci-$UUID echo $ENVCTL_ID +# If App Engine, install app-engine-go component +if [[ $ENVIRONMENT == *"appengine"* ]]; then + gcloud components install app-engine-go -q +fi + +# If Kubernetes, install kubectl component +if [[ $ENVIRONMENT == *"kubernetes"* ]]; then + gcloud components install kubectl -q +fi + # Run the specified environment test set +e nox --python 3.7 --session "tests(language='nodejs', platform='$ENVIRONMENT')" From 1b8c4b14b3ae75d8825103a6275a5c8c75d2fc65 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Thu, 20 May 2021 21:31:59 -0700 Subject: [PATCH 0758/1029] fix: debrand Stackdriver & do not throw errors (#1073) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: namespace label defaults to empty string * 🦉 Updates from OwlBot * chore: rebrand stackdriver to cloud logging * chore: debrand stackdriver and fix test * test: update to latest env test suite Co-authored-by: Owl Bot --- env-tests-logging | 2 +- handwritten/logging/src/http-request.ts | 2 +- handwritten/logging/src/index.ts | 30 +++++++++---------- handwritten/logging/src/log.ts | 6 ++-- handwritten/logging/src/metadata.ts | 10 +++---- .../middleware/express/make-http-request.ts | 4 +-- .../src/middleware/express/make-middleware.ts | 6 ++-- handwritten/logging/src/sink.ts | 2 +- handwritten/logging/test/metadata.ts | 4 +-- 9 files changed, 32 insertions(+), 34 deletions(-) diff --git a/env-tests-logging b/env-tests-logging index 7cf6ae515f9..06f6c921949 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit 7cf6ae515f976a55b81c380f80a94aff83ee88c8 +Subproject commit 06f6c921949621a878f3a47ec294b7ce25a39ddf diff --git a/handwritten/logging/src/http-request.ts b/handwritten/logging/src/http-request.ts index 039d0aef79e..4c1cd24ca60 100644 --- a/handwritten/logging/src/http-request.ts +++ b/handwritten/logging/src/http-request.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -export interface StackdriverHttpRequest { +export interface CloudLoggingHttpRequest { requestMethod?: string; requestUrl?: string; requestSize?: number; diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 09cfaa04294..145e6ab01cd 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -29,7 +29,7 @@ const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; import * as middleware from './middleware'; import {detectServiceContext} from './metadata'; -import {StackdriverHttpRequest as HttpRequest} from './http-request'; +import {CloudLoggingHttpRequest as HttpRequest} from './http-request'; export {middleware}; export {HttpRequest}; @@ -220,16 +220,16 @@ export interface ServiceContext { * native Promises. */ /** - * [Stackdriver Logging](https://cloud.google.com/logging/docs) allows you to + * [Cloud Logging](https://cloud.google.com/logging/docs) allows you to * store, search, analyze, monitor, and alert on log data and events from Google * Cloud Platform and Amazon Web Services (AWS). * * @class * - * @see [What is Stackdriver Logging?](https://cloud.google.com/logging/docs) - * @see [Introduction to the Stackdriver Logging API](https://cloud.google.com/logging/docs/api) - * @see [Logging to Stackdriver from Bunyan](https://www.npmjs.com/package/@google-cloud/logging-bunyan) - * @see [Logging to Stackdriver from Winston](https://www.npmjs.com/package/@google-cloud/logging-winston) + * @see [What is Cloud Logging?](https://cloud.google.com/logging/docs) + * @see [Introduction to the Cloud Logging API](https://cloud.google.com/logging/docs/api) + * @see [Logging to Google Cloud from Bunyan](https://www.npmjs.com/package/@google-cloud/logging-bunyan) + * @see [Logging to Google Cloud from Winston](https://www.npmjs.com/package/@google-cloud/logging-winston) * * @param {ClientConfig} [options] Configuration options. * @@ -520,7 +520,7 @@ class Logging { * const logging = new Logging(); * * logging.getEntries((err, entries) => { - * // `entries` is an array of Stackdriver Logging entry objects. + * // `entries` is an array of Cloud Logging entry objects. * // See the `data` property to read the data from the entry. * }); * @@ -610,7 +610,7 @@ class Logging { * logging.getEntriesStream() * .on('error', console.error) * .on('data', entry => { - * // `entry` is a Stackdriver Logging entry object. + * // `entry` is a Cloud Logging entry object. * // See the `data` property to read the data from the entry. * }) * .on('end', function() { @@ -872,7 +872,7 @@ class Logging { * const logging = new Logging(); * * logging.getLogs((err, logs) => { - * // `logs` is an array of Stackdriver Logging log objects. + * // `logs` is an array of Cloud Logging log objects. * }); * * //- @@ -940,7 +940,7 @@ class Logging { * logging.getLogsStream() * .on('error', console.error) * .on('data', log => { - * // `log` is a Stackdriver Logging log object. + * // `log` is a Cloud Logging log object. * }) * .on('end', function() { * // All logs retrieved. @@ -1200,7 +1200,7 @@ class Logging { } /** - * Get a reference to a Stackdriver Logging log. + * Get a reference to a Cloud Logging log. * * @see [Log Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs} * @@ -1220,7 +1220,7 @@ class Logging { } /** - * Get a reference to a Stackdriver Logging sink. + * Get a reference to a Cloud Logging sink. * * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} * @@ -1327,7 +1327,7 @@ class Logging { /** * This method is called when creating a sink with a Bucket destination. The - * bucket must first grant proper ACL access to the Stackdriver Logging + * bucket must first grant proper ACL access to the Cloud Logging * account. * * The parameters are the same as what {@link Logging#createSink} accepts. @@ -1343,7 +1343,7 @@ class Logging { /** * This method is called when creating a sink with a Dataset destination. The - * dataset must first grant proper ACL access to the Stackdriver Logging + * dataset must first grant proper ACL access to the Cloud Logging * account. * * The parameters are the same as what {@link Logging#createSink} accepts. @@ -1370,7 +1370,7 @@ class Logging { /** * This method is called when creating a sink with a Topic destination. The - * topic must first grant proper ACL access to the Stackdriver Logging + * topic must first grant proper ACL access to the Cloud Logging * account. * * The parameters are the same as what {@link Logging#createSink} accepts. diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 893a4156838..72d43a4fd09 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -509,7 +509,7 @@ class Log implements LogSeverityFunctions { * const log = logging.log('my-log'); * * log.getEntries((err, entries) => { - * // `entries` is an array of Stackdriver Logging entry objects. + * // `entries` is an array of Cloud Logging entry objects. * // See the `data` property to read the data from the entry. * }); * @@ -567,7 +567,7 @@ class Log implements LogSeverityFunctions { * log.getEntriesStream() * .on('error', console.error) * .on('data', entry => { - * // `entry` is a Stackdriver Logging entry object. + * // `entry` is a Cloud Logging entry object. * // See the `data` property to read the data from the entry. * }) * .on('end', function() { @@ -804,7 +804,7 @@ class Log implements LogSeverityFunctions { * one isn't specified. */ /** - * Write log entries to Stackdriver Logging. + * Write log entries to Cloud Logging. * * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} * dictates that the maximum cumulative size of all entries per write, diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/metadata.ts index e7a5a99dfe9..7ba052f9103 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/metadata.ts @@ -137,7 +137,7 @@ export const KUBERNETES_NAMESPACE_ID_PATH = * @return {object} */ export async function getGKEDescriptor() { - // Stackdriver Logging Monitored Resource for 'container' requires + // Cloud Logging Monitored Resource for 'container' requires // cluster_name and namespace_id fields. Note that these *need* to be // snake_case. The namespace_id is not easily available from inside the // container, but we can get the namespace_name. Logging has been using the @@ -147,13 +147,11 @@ export async function getGKEDescriptor() { const resp = await gcpMetadata.instance('attributes/cluster-name'); const qualifiedZone = await gcpMetadata.instance('zone'); const location = zoneFromQualifiedZone(qualifiedZone); - let namespace; + let namespace = ''; try { namespace = await readFile(KUBERNETES_NAMESPACE_ID_PATH, 'utf8'); } catch (err) { - throw new Error( - `Error reading ${KUBERNETES_NAMESPACE_ID_PATH}: ${err.message}` - ); + // Ignore errors (leave namespace as a nil string). } return { @@ -211,7 +209,7 @@ export async function getDefaultResource(auth: GoogleAuth) { /** * For logged errors, users can provide a service context. This enables errors - * to be picked up Stackdriver Error Reporting. For more information see + * to be picked up Cloud Error Reporting. For more information see * [this guide]{@link * https://cloud.google.com/error-reporting/docs/formatting-error-messages} and * the [official documentation]{@link diff --git a/handwritten/logging/src/middleware/express/make-http-request.ts b/handwritten/logging/src/middleware/express/make-http-request.ts index 4933b8d076b..30dc51317c0 100644 --- a/handwritten/logging/src/middleware/express/make-http-request.ts +++ b/handwritten/logging/src/middleware/express/make-http-request.ts @@ -16,7 +16,7 @@ import * as http from 'http'; -import {StackdriverHttpRequest} from '../../http-request'; +import {CloudLoggingHttpRequest} from '../../http-request'; export interface ServerRequest extends http.IncomingMessage { originalUrl: string; @@ -26,7 +26,7 @@ export function makeHttpRequestData( req: ServerRequest, res: http.ServerResponse, latencyMilliseconds: number -): StackdriverHttpRequest { +): CloudLoggingHttpRequest { return { status: res.statusCode, requestUrl: req.originalUrl, diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index 50b5b873c79..e4ca3e7b92e 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -19,7 +19,7 @@ import onFinished = require('on-finished'); import {getOrInjectContext, makeHeaderWrapper} from '../context'; import {makeHttpRequestData, ServerRequest} from './make-http-request'; -import {StackdriverHttpRequest} from '../../http-request'; +import {CloudLoggingHttpRequest} from '../../http-request'; interface AnnotatedRequestType extends ServerRequest { log: LoggerType; @@ -38,13 +38,13 @@ interface AnnotatedRequestType extends ServerRequest { * @param emitRequestLog Optional. A function that will emit a parent request * log. While some environments like GAE and GCF emit parent request logs * automatically, other environments do not. When provided this function will be - * called with a populated `StackdriverHttpRequest` which can be emitted as + * called with a populated `CloudLoggingHttpRequest` which can be emitted as * request log. */ export function makeMiddleware( projectId: string, makeChildLogger: (trace: string) => LoggerType, - emitRequestLog?: (httpRequest: StackdriverHttpRequest, trace: string) => void + emitRequestLog?: (httpRequest: CloudLoggingHttpRequest, trace: string) => void ) { return (req: ServerRequest, res: http.ServerResponse, next: Function) => { // TODO(ofrobots): use high-resolution timer. diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 35f95cd98c4..fb769458098 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -41,7 +41,7 @@ export interface SetSinkMetadata extends LogSink { /** * A sink is an object that lets you to specify a set of log entries to export - * to a particular destination. Stackdriver Logging lets you export log entries + * to a particular destination. Cloud Logging lets you export log entries * to destinations including Cloud Storage buckets (for long term log * storage), Google BigQuery datasets (for log analysis), Google Pub/Sub (for * streaming to other applications). diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/metadata.ts index 5e6985a93fb..13089c13abb 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/metadata.ts @@ -304,10 +304,10 @@ describe('metadata', () => { ); }); - it('should throw error when read of namespace file fails', async () => { + it('should not error if reading namespace file fails', async () => { readFileShouldError = true; - await assert.rejects(metadata.getGKEDescriptor(), (err: Error) => + await assert.doesNotReject(metadata.getGKEDescriptor(), (err: Error) => err.message.includes(FAKE_READFILE_ERROR_MESSAGE) ); }); From e89cb7a07298a3114973346570db25bd180bd0a7 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Fri, 21 May 2021 09:34:41 -0700 Subject: [PATCH 0759/1029] fix: Object implementing toString not logged as Object (#1077) * fix: Object implementing toString not logged as Object * fix: override custom toString methods when when checking value * fix: also fix in entry.tojson --- handwritten/logging/src/common.ts | 4 +--- handwritten/logging/src/entry.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/src/common.ts b/handwritten/logging/src/common.ts index b03f6e604a8..61d7c504b26 100644 --- a/handwritten/logging/src/common.ts +++ b/handwritten/logging/src/common.ts @@ -129,9 +129,7 @@ export class ObjectToStructConverter { values: (value as Array<{}>).map(this.encodeValue_.bind(this)), }, }; - } else if (value?.toString() === '[object Object]') { - // Using `typeof value === 'object'` is discouraged here, because it - // return true for dates, nulls, arrays, etc. + } else if (Object.prototype.toString.call(value) === '[object Object]') { if (this.seenObjects.has(value!)) { // Circular reference. if (!this.removeCircular) { diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 277ca02b60a..6b9de61826c 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -152,7 +152,7 @@ class Entry { toJSON(options: ToJsonOptions = {}) { const entry = extend(true, {}, this.metadata) as {} as EntryJson; // Format log message - if (this.data?.toString() === '[object Object]') { + if (Object.prototype.toString.call(this.data) === '[object Object]') { entry.jsonPayload = objToStruct(this.data, { removeCircular: !!options.removeCircular, stringify: true, From 98bd2b87940dc7f6cbb5a9e043583a832d82ba95 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 May 2021 05:25:08 +0200 Subject: [PATCH 0760/1029] chore(deps): update dependency @types/node to v14 (#1079) Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d057502955c..ae8766f06e8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -69,7 +69,7 @@ "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", "@types/mocha": "^8.0.0", - "@types/node": "^13.9.2", + "@types/node": "^14.0.0", "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", From 97cc01c99f6799c0a05778edc4e2d9b90a1928e6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sun, 23 May 2021 20:41:56 -0700 Subject: [PATCH 0761/1029] chore: release 9.3.0 (#1072) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 14 ++++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ca947f3f1a2..489ce0cddf5 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,20 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.3.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.2.3...v9.3.0) (2021-05-24) + + +### Features + +* fix resource autodetection for GKE, GAE, and GCE ([#1070](https://www.github.com/googleapis/nodejs-logging/issues/1070)) ([1820f5d](https://www.github.com/googleapis/nodejs-logging/commit/1820f5de0a7f7f9e87cc94219c3fd1cee82b2a64)) + + +### Bug Fixes + +* debrand Stackdriver & do not throw errors ([#1073](https://www.github.com/googleapis/nodejs-logging/issues/1073)) ([5cd8c17](https://www.github.com/googleapis/nodejs-logging/commit/5cd8c172a671a11a708c140f63ed0f589aa01fa5)) +* Object implementing toString not logged as Object ([#1077](https://www.github.com/googleapis/nodejs-logging/issues/1077)) ([a060957](https://www.github.com/googleapis/nodejs-logging/commit/a0609574cf5012d89863f23c4c94a79fb605c7ae)) +* use require() to load JSON protos ([#1065](https://www.github.com/googleapis/nodejs-logging/issues/1065)) ([9718d9a](https://www.github.com/googleapis/nodejs-logging/commit/9718d9a3f7f672947de674343fc0527f39d4a0aa)) + ### [9.2.3](https://www.github.com/googleapis/nodejs-logging/compare/v9.2.2...v9.2.3) (2021-05-07) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ae8766f06e8..e3db2ac922f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.2.3", + "version": "9.3.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 574717924b1d13d88e389f8d81f7fb7b10d35ae7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 17:54:14 +0200 Subject: [PATCH 0762/1029] chore(deps): update dependency sinon to v11 (#1080) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/sinon/10.0.0/11.1.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/compatibility-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/confidence-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v11.1.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1110--2021-05-25) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.0.0...31be9a5d5a4762ef01cb195f29024616dfee9ce8) \================== - Add sinon.promise() implementation ([#​2369](https://togithub.com/sinonjs/sinon/issues/2369)) - Set wrappedMethod on getters/setters ([#​2378](https://togithub.com/sinonjs/sinon/issues/2378)) - \[Docs] Update fake-server usage & descriptions ([#​2365](https://togithub.com/sinonjs/sinon/issues/2365)) - Fake docs improvement ([#​2360](https://togithub.com/sinonjs/sinon/issues/2360)) - Update nise to 5.1.0 (fixed [#​2318](https://togithub.com/sinonjs/sinon/issues/2318)) ### [`v11.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1100--2021-05-24) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.1...v11.0.0) \================== - Explicitly use samsam 6.0.2 with fix for [#​2345](https://togithub.com/sinonjs/sinon/issues/2345) - Update most packages ([#​2371](https://togithub.com/sinonjs/sinon/issues/2371)) - Update compatibility docs ([#​2366](https://togithub.com/sinonjs/sinon/issues/2366)) - Update packages (includes breaking fake-timers change, see [#​2352](https://togithub.com/sinonjs/sinon/issues/2352)) - Warn of potential memory leaks ([#​2357](https://togithub.com/sinonjs/sinon/issues/2357)) - Fix clock test errors ### [`v10.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1001--2021-04-08) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.0...v10.0.1) \================== - Upgrade sinon components (bumps y18n to 4.0.1) - Bump y18n from 4.0.0 to 4.0.1
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e3db2ac922f..a4d5f71b5a1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -89,7 +89,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "uuid": "^8.0.0", From 03c1fb02556d1ba2c8cb0b3ff7ed9f6fdce0d1ee Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 20:48:29 +0000 Subject: [PATCH 0763/1029] fix: GoogleAdsError missing using generator version after 1.3.0 (#1081) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- handwritten/logging/protos/protos.d.ts | 17020 ++--- handwritten/logging/protos/protos.js | 52062 ++++++++-------- handwritten/logging/protos/protos.json | 7040 +-- .../src/v2/config_service_v2_client.ts | 2 + .../src/v2/config_service_v2_proto_list.json | 2 + .../src/v2/logging_service_v2_client.ts | 2 + .../src/v2/logging_service_v2_proto_list.json | 2 + .../src/v2/metrics_service_v2_client.ts | 2 + .../src/v2/metrics_service_v2_proto_list.json | 2 + 9 files changed, 38073 insertions(+), 38061 deletions(-) diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 49247c807aa..1be2e018a1a 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -17,12769 +17,12769 @@ import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { - /** Namespace logging. */ - namespace logging { + /** Namespace protobuf. */ + namespace protobuf { - /** Namespace v2. */ - namespace v2 { + /** Properties of a Duration. */ + interface IDuration { - /** Properties of a LogEntry. */ - interface ILogEntry { + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** LogEntry logName */ - logName?: (string|null); + /** Duration nanos */ + nanos?: (number|null); + } - /** LogEntry resource */ - resource?: (google.api.IMonitoredResource|null); + /** Represents a Duration. */ + class Duration implements IDuration { - /** LogEntry protoPayload */ - protoPayload?: (google.protobuf.IAny|null); + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); - /** LogEntry textPayload */ - textPayload?: (string|null); + /** Duration seconds. */ + public seconds: (number|Long|string); - /** LogEntry jsonPayload */ - jsonPayload?: (google.protobuf.IStruct|null); + /** Duration nanos. */ + public nanos: number; - /** LogEntry timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - /** LogEntry receiveTimestamp */ - receiveTimestamp?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry severity */ - severity?: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity|null); + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry insertId */ - insertId?: (string|null); + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - /** LogEntry httpRequest */ - httpRequest?: (google.logging.type.IHttpRequest|null); + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - /** LogEntry labels */ - labels?: ({ [k: string]: string }|null); + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogEntry operation */ - operation?: (google.logging.v2.ILogEntryOperation|null); + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - /** LogEntry trace */ - trace?: (string|null); + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogEntry spanId */ - spanId?: (string|null); + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogEntry traceSampled */ - traceSampled?: (boolean|null); + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** LogEntry sourceLocation */ - sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); - } + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } - /** Represents a LogEntry. */ - class LogEntry implements ILogEntry { + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { - /** - * Constructs a new LogEntry. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogEntry); + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** LogEntry logName. */ - public logName: string; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; - /** LogEntry resource. */ - public resource?: (google.api.IMonitoredResource|null); + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - /** LogEntry protoPayload. */ - public protoPayload?: (google.protobuf.IAny|null); + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry textPayload. */ - public textPayload?: (string|null); + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogEntry jsonPayload. */ - public jsonPayload?: (google.protobuf.IStruct|null); + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - /** LogEntry timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - /** LogEntry receiveTimestamp. */ - public receiveTimestamp?: (google.protobuf.ITimestamp|null); + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogEntry severity. */ - public severity: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity); + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - /** LogEntry insertId. */ - public insertId: string; + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogEntry httpRequest. */ - public httpRequest?: (google.logging.type.IHttpRequest|null); + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogEntry labels. */ - public labels: { [k: string]: string }; + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** LogEntry operation. */ - public operation?: (google.logging.v2.ILogEntryOperation|null); + /** FileDescriptorProto name */ + name?: (string|null); - /** LogEntry trace. */ - public trace: string; + /** FileDescriptorProto package */ + "package"?: (string|null); - /** LogEntry spanId. */ - public spanId: string; + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** LogEntry traceSampled. */ - public traceSampled: boolean; + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** LogEntry sourceLocation. */ - public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** LogEntry payload. */ - public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** - * Creates a new LogEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns LogEntry instance - */ - public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Decodes a LogEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); - /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Verifies a LogEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } - /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogEntry - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { - /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @param message LogEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** - * Converts this LogEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileDescriptorProto name. */ + public name: string; - /** Properties of a LogEntryOperation. */ - interface ILogEntryOperation { + /** FileDescriptorProto package. */ + public package: string; - /** LogEntryOperation id */ - id?: (string|null); + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** LogEntryOperation producer */ - producer?: (string|null); + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** LogEntryOperation first */ - first?: (boolean|null); + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** LogEntryOperation last */ - last?: (boolean|null); - } + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** Represents a LogEntryOperation. */ - class LogEntryOperation implements ILogEntryOperation { + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** - * Constructs a new LogEntryOperation. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogEntryOperation); + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** LogEntryOperation id. */ - public id: string; + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** LogEntryOperation producer. */ - public producer: string; + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** LogEntryOperation first. */ - public first: boolean; + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** LogEntryOperation last. */ - public last: boolean; + /** FileDescriptorProto syntax. */ + public syntax: string; - /** - * Creates a new LogEntryOperation instance using the specified properties. - * @param [properties] Properties to set - * @returns LogEntryOperation instance - */ - public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @param message LogEntryOperation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a LogEntryOperation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogEntryOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogEntryOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - /** - * Verifies a LogEntryOperation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogEntryOperation - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. - * @param message LogEntryOperation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this LogEntryOperation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a LogEntrySourceLocation. */ - interface ILogEntrySourceLocation { + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** LogEntrySourceLocation file */ - file?: (string|null); + /** DescriptorProto name */ + name?: (string|null); - /** LogEntrySourceLocation line */ - line?: (number|Long|string|null); + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** LogEntrySourceLocation function */ - "function"?: (string|null); + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); } - /** Represents a LogEntrySourceLocation. */ - class LogEntrySourceLocation implements ILogEntrySourceLocation { + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { /** - * Constructs a new LogEntrySourceLocation. + * Constructs a new ExtensionRange. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogEntrySourceLocation); + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** LogEntrySourceLocation file. */ - public file: string; + /** ExtensionRange start. */ + public start: number; - /** LogEntrySourceLocation line. */ - public line: (number|Long|string); + /** ExtensionRange end. */ + public end: number; - /** LogEntrySourceLocation function. */ - public function: string; + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); /** - * Creates a new LogEntrySourceLocation instance using the specified properties. + * Creates a new ExtensionRange instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntrySourceLocation instance + * @returns ExtensionRange instance */ - public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @param message LogEntrySourceLocation message or plain object to encode + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. + * Decodes an ExtensionRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntrySourceLocation + * @returns ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntrySourceLocation + * @returns ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; /** - * Verifies a LogEntrySourceLocation message. + * Verifies an ExtensionRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntrySourceLocation + * @returns ExtensionRange */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. - * @param message LogEntrySourceLocation + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntrySourceLocation to JSON. + * Converts this ExtensionRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a LoggingServiceV2 */ - class LoggingServiceV2 extends $protobuf.rpc.Service { + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** - * Constructs a new LoggingServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** ReservedRange start */ + start?: (number|null); - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; + /** ReservedRange end */ + end?: (number|null); + } - /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { /** - * Calls DeleteLog. - * @param request DeleteLogRequest message or plain object - * @returns Promise - */ - public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; - - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; - - /** - * Calls WriteLogEntries. - * @param request WriteLogEntriesRequest message or plain object - * @returns Promise - */ - public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; - - /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse - */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; - - /** - * Calls ListLogEntries. - * @param request ListLogEntriesRequest message or plain object - * @returns Promise - */ - public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; - - /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; - - /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns Promise - */ - public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; - - /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogsResponse - */ - public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; - - /** - * Calls ListLogs. - * @param request ListLogsRequest message or plain object - * @returns Promise - */ - public listLogs(request: google.logging.v2.IListLogsRequest): Promise; - - /** - * Calls TailLogEntries. - * @param request TailLogEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TailLogEntriesResponse - */ - public tailLogEntries(request: google.logging.v2.ITailLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.TailLogEntriesCallback): void; - - /** - * Calls TailLogEntries. - * @param request TailLogEntriesRequest message or plain object - * @returns Promise - */ - public tailLogEntries(request: google.logging.v2.ITailLogEntriesRequest): Promise; - } - - namespace LoggingServiceV2 { - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @param error Error, if any - * @param [response] WriteLogEntriesResponse - */ - type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @param error Error, if any - * @param [response] ListLogEntriesResponse - */ - type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @param error Error, if any - * @param [response] ListMonitoredResourceDescriptorsResponse - */ - type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @param error Error, if any - * @param [response] ListLogsResponse - */ - type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#tailLogEntries}. - * @param error Error, if any - * @param [response] TailLogEntriesResponse - */ - type TailLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.TailLogEntriesResponse) => void; - } - - /** Properties of a DeleteLogRequest. */ - interface IDeleteLogRequest { - - /** DeleteLogRequest logName */ - logName?: (string|null); - } - - /** Represents a DeleteLogRequest. */ - class DeleteLogRequest implements IDeleteLogRequest { - - /** - * Constructs a new DeleteLogRequest. + * Constructs a new ReservedRange. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteLogRequest); + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** DeleteLogRequest logName. */ - public logName: string; + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; /** - * Creates a new DeleteLogRequest instance using the specified properties. + * Creates a new ReservedRange instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteLogRequest instance + * @returns ReservedRange instance */ - public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @param message DeleteLogRequest message or plain object to encode + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. + * Decodes a ReservedRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteLogRequest + * @returns ReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteLogRequest + * @returns ReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; /** - * Verifies a DeleteLogRequest message. + * Verifies a ReservedRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteLogRequest + * @returns ReservedRange */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @param message DeleteLogRequest + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteLogRequest to JSON. + * Converts this ReservedRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a WriteLogEntriesRequest. */ - interface IWriteLogEntriesRequest { + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** WriteLogEntriesRequest logName */ - logName?: (string|null); + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** WriteLogEntriesRequest resource */ - resource?: (google.api.IMonitoredResource|null); + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { - /** WriteLogEntriesRequest labels */ - labels?: ({ [k: string]: string }|null); + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** WriteLogEntriesRequest entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** WriteLogEntriesRequest partialSuccess */ - partialSuccess?: (boolean|null); + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - /** WriteLogEntriesRequest dryRun */ - dryRun?: (boolean|null); - } + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a WriteLogEntriesRequest. */ - class WriteLogEntriesRequest implements IWriteLogEntriesRequest { + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new WriteLogEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - /** WriteLogEntriesRequest logName. */ - public logName: string; - - /** WriteLogEntriesRequest resource. */ - public resource?: (google.api.IMonitoredResource|null); + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - /** WriteLogEntriesRequest labels. */ - public labels: { [k: string]: string }; + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** WriteLogEntriesRequest entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - /** WriteLogEntriesRequest partialSuccess. */ - public partialSuccess: boolean; + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** WriteLogEntriesRequest dryRun. */ - public dryRun: boolean; + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WriteLogEntriesRequest instance - */ - public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto name */ + name?: (string|null); - /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @param message WriteLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto number */ + number?: (number|null); - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - /** - * Verifies a WriteLogEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WriteLogEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. - * @param message WriteLogEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); - /** - * Converts this WriteLogEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); - /** Properties of a WriteLogEntriesResponse. */ - interface IWriteLogEntriesResponse { - } + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); - /** Represents a WriteLogEntriesResponse. */ - class WriteLogEntriesResponse implements IWriteLogEntriesResponse { + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); - /** - * Constructs a new WriteLogEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } - /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns WriteLogEntriesResponse instance - */ - public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { - /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @param message WriteLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto name. */ + public name: string; - /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WriteLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; + /** FieldDescriptorProto number. */ + public number: number; - /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - /** - * Verifies a WriteLogEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WriteLogEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. - * @param message WriteLogEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** - * Converts this WriteLogEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** Properties of a WriteLogEntriesPartialErrors. */ - interface IWriteLogEntriesPartialErrors { + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; - /** WriteLogEntriesPartialErrors logEntryErrors */ - logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); - } + /** FieldDescriptorProto jsonName. */ + public jsonName: string; - /** Represents a WriteLogEntriesPartialErrors. */ - class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); - /** - * Constructs a new WriteLogEntriesPartialErrors. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; - /** WriteLogEntriesPartialErrors logEntryErrors. */ - public logEntryErrors: { [k: string]: google.rpc.IStatus }; + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. - * @param [properties] Properties to set - * @returns WriteLogEntriesPartialErrors instance - */ - public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @param message WriteLogEntriesPartialErrors message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WriteLogEntriesPartialErrors - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WriteLogEntriesPartialErrors - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a WriteLogEntriesPartialErrors message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WriteLogEntriesPartialErrors - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. - * @param message WriteLogEntriesPartialErrors - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this WriteLogEntriesPartialErrors to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 } - /** Properties of a ListLogEntriesRequest. */ - interface IListLogEntriesRequest { + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } - /** ListLogEntriesRequest resourceNames */ - resourceNames?: (string[]|null); + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** ListLogEntriesRequest filter */ - filter?: (string|null); + /** OneofDescriptorProto name */ + name?: (string|null); - /** ListLogEntriesRequest orderBy */ - orderBy?: (string|null); + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } - /** ListLogEntriesRequest pageSize */ - pageSize?: (number|null); + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { - /** ListLogEntriesRequest pageToken */ - pageToken?: (string|null); - } + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** Represents a ListLogEntriesRequest. */ - class ListLogEntriesRequest implements IListLogEntriesRequest { + /** OneofDescriptorProto name. */ + public name: string; - /** - * Constructs a new ListLogEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogEntriesRequest); + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); - /** ListLogEntriesRequest resourceNames. */ - public resourceNames: string[]; + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - /** ListLogEntriesRequest filter. */ - public filter: string; + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListLogEntriesRequest orderBy. */ - public orderBy: string; + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListLogEntriesRequest pageSize. */ - public pageSize: number; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - /** ListLogEntriesRequest pageToken. */ - public pageToken: string; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - /** - * Creates a new ListLogEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogEntriesRequest instance - */ - public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @param message ListLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** - * Verifies a ListLogEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** EnumDescriptorProto name */ + name?: (string|null); - /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. - * @param message ListLogEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** - * Converts this ListLogEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** Properties of a ListLogEntriesResponse. */ - interface IListLogEntriesResponse { + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** ListLogEntriesResponse entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { - /** ListLogEntriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); } - /** Represents a ListLogEntriesResponse. */ - class ListLogEntriesResponse implements IListLogEntriesResponse { + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { /** - * Constructs a new ListLogEntriesResponse. + * Constructs a new EnumReservedRange. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogEntriesResponse); + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** ListLogEntriesResponse entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** EnumReservedRange start. */ + public start: number; - /** ListLogEntriesResponse nextPageToken. */ - public nextPageToken: string; + /** EnumReservedRange end. */ + public end: number; /** - * Creates a new ListLogEntriesResponse instance using the specified properties. + * Creates a new EnumReservedRange instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogEntriesResponse instance + * @returns EnumReservedRange instance */ - public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @param message ListLogEntriesResponse message or plain object to encode + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. + * Decodes an EnumReservedRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogEntriesResponse + * @returns EnumReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogEntriesResponse + * @returns EnumReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Verifies a ListLogEntriesResponse message. + * Verifies an EnumReservedRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogEntriesResponse + * @returns EnumReservedRange */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. - * @param message ListLogEntriesResponse + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogEntriesResponse to JSON. + * Converts this EnumReservedRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a ListMonitoredResourceDescriptorsRequest. */ - interface IListMonitoredResourceDescriptorsRequest { + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** ListMonitoredResourceDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** ListMonitoredResourceDescriptorsRequest pageToken */ - pageToken?: (string|null); - } + /** EnumValueDescriptorProto number */ + number?: (number|null); - /** Represents a ListMonitoredResourceDescriptorsRequest. */ - class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } - /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - /** ListMonitoredResourceDescriptorsRequest pageSize. */ - public pageSize: number; + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** ListMonitoredResourceDescriptorsRequest pageToken. */ - public pageToken: string; + /** EnumValueDescriptorProto name. */ + public name: string; - /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsRequest instance - */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + /** EnumValueDescriptorProto number. */ + public number: number; - /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); - /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMonitoredResourceDescriptorsRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - /** Properties of a ListMonitoredResourceDescriptorsResponse. */ - interface IListMonitoredResourceDescriptorsResponse { + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ - resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListMonitoredResourceDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** Represents a ListMonitoredResourceDescriptorsResponse. */ - class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + /** ServiceDescriptorProto name */ + name?: (string|null); - /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ - public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } - /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { - /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsResponse instance - */ - public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** ServiceDescriptorProto name. */ + public name: string; - /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMonitoredResourceDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); - /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMonitoredResourceDescriptorsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; - - /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListMonitoredResourceDescriptorsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - /** Properties of a ListLogsRequest. */ - interface IListLogsRequest { + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - /** ListLogsRequest parent */ - parent?: (string|null); + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ListLogsRequest pageSize */ - pageSize?: (number|null); + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - /** ListLogsRequest pageToken */ - pageToken?: (string|null); + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListLogsRequest resourceNames */ - resourceNames?: (string[]|null); - } + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a ListLogsRequest. */ - class ListLogsRequest implements IListLogsRequest { + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** - * Constructs a new ListLogsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogsRequest); + /** MethodDescriptorProto name */ + name?: (string|null); - /** ListLogsRequest parent. */ - public parent: string; + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** ListLogsRequest pageSize. */ - public pageSize: number; + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** ListLogsRequest pageToken. */ - public pageToken: string; + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** ListLogsRequest resourceNames. */ - public resourceNames: string[]; + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** - * Creates a new ListLogsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogsRequest instance - */ - public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } - /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { - /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @param message ListLogsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** - * Decodes a ListLogsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; + /** MethodDescriptorProto name. */ + public name: string; - /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** - * Verifies a ListLogsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogsRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. - * @param message ListLogsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** - * Converts this ListLogsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; - /** Properties of a ListLogsResponse. */ - interface IListLogsResponse { + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - /** ListLogsResponse logNames */ - logNames?: (string[]|null); + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListLogsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ListLogsResponse. */ - class ListLogsResponse implements IListLogsResponse { + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - /** - * Constructs a new ListLogsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListLogsResponse); + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - /** ListLogsResponse logNames. */ - public logNames: string[]; + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ListLogsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - /** - * Creates a new ListLogsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLogsResponse instance - */ - public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @param message ListLogsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a FileOptions. */ + interface IFileOptions { - /** - * Decodes a ListLogsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** - * Verifies a ListLogsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLogsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. - * @param message ListLogsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** - * Converts this ListLogsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - /** Properties of a TailLogEntriesRequest. */ - interface ITailLogEntriesRequest { + /** FileOptions goPackage */ + goPackage?: (string|null); - /** TailLogEntriesRequest resourceNames */ - resourceNames?: (string[]|null); + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** TailLogEntriesRequest filter */ - filter?: (string|null); + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** TailLogEntriesRequest bufferWindow */ - bufferWindow?: (google.protobuf.IDuration|null); - } + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** Represents a TailLogEntriesRequest. */ - class TailLogEntriesRequest implements ITailLogEntriesRequest { + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); - /** - * Constructs a new TailLogEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ITailLogEntriesRequest); + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** TailLogEntriesRequest resourceNames. */ - public resourceNames: string[]; + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** TailLogEntriesRequest filter. */ - public filter: string; + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** TailLogEntriesRequest bufferWindow. */ - public bufferWindow?: (google.protobuf.IDuration|null); + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** - * Creates a new TailLogEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TailLogEntriesRequest instance - */ - public static create(properties?: google.logging.v2.ITailLogEntriesRequest): google.logging.v2.TailLogEntriesRequest; + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** - * Encodes the specified TailLogEntriesRequest message. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. - * @param message TailLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ITailLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** - * Encodes the specified TailLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. - * @param message TailLogEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ITailLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - /** - * Decodes a TailLogEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TailLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesRequest; + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** - * Decodes a TailLogEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TailLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesRequest; + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); - /** - * Verifies a TailLogEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Creates a TailLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TailLogEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesRequest; + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** - * Creates a plain object from a TailLogEntriesRequest message. Also converts values to other types if specified. - * @param message TailLogEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.TailLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - /** - * Converts this TailLogEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** Properties of a TailLogEntriesResponse. */ - interface ITailLogEntriesResponse { + /** FileOptions javaPackage. */ + public javaPackage: string; - /** TailLogEntriesResponse entries */ - entries?: (google.logging.v2.ILogEntry[]|null); + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** TailLogEntriesResponse suppressionInfo */ - suppressionInfo?: (google.logging.v2.TailLogEntriesResponse.ISuppressionInfo[]|null); - } + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** Represents a TailLogEntriesResponse. */ - class TailLogEntriesResponse implements ITailLogEntriesResponse { + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** - * Constructs a new TailLogEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ITailLogEntriesResponse); + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** TailLogEntriesResponse entries. */ - public entries: google.logging.v2.ILogEntry[]; + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - /** TailLogEntriesResponse suppressionInfo. */ - public suppressionInfo: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo[]; + /** FileOptions goPackage. */ + public goPackage: string; - /** - * Creates a new TailLogEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TailLogEntriesResponse instance - */ - public static create(properties?: google.logging.v2.ITailLogEntriesResponse): google.logging.v2.TailLogEntriesResponse; + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** - * Encodes the specified TailLogEntriesResponse message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. - * @param message TailLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ITailLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** - * Encodes the specified TailLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. - * @param message TailLogEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ITailLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * Decodes a TailLogEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TailLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesResponse; + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** - * Decodes a TailLogEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TailLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesResponse; + /** FileOptions deprecated. */ + public deprecated: boolean; - /** - * Verifies a TailLogEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** - * Creates a TailLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TailLogEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesResponse; + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** - * Creates a plain object from a TailLogEntriesResponse message. Also converts values to other types if specified. - * @param message TailLogEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.TailLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** - * Converts this TailLogEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - namespace TailLogEntriesResponse { + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** Properties of a SuppressionInfo. */ - interface ISuppressionInfo { + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** SuppressionInfo reason */ - reason?: (google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|keyof typeof google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|null); + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** SuppressionInfo suppressedCount */ - suppressedCount?: (number|null); - } + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** Represents a SuppressionInfo. */ - class SuppressionInfo implements ISuppressionInfo { + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Constructs a new SuppressionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo); + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - /** SuppressionInfo reason. */ - public reason: (google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|keyof typeof google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason); + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** SuppressionInfo suppressedCount. */ - public suppressedCount: number; + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new SuppressionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SuppressionInfo instance - */ - public static create(properties?: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - /** - * Encodes the specified SuppressionInfo message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. - * @param message SuppressionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - /** - * Encodes the specified SuppressionInfo message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. - * @param message SuppressionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a SuppressionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuppressionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - /** - * Decodes a SuppressionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuppressionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a SuppressionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a SuppressionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuppressionInfo - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + namespace FileOptions { - /** - * Creates a plain object from a SuppressionInfo message. Also converts values to other types if specified. - * @param message SuppressionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.TailLogEntriesResponse.SuppressionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } - /** - * Converts this SuppressionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a MessageOptions. */ + interface IMessageOptions { - namespace SuppressionInfo { + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** Reason enum. */ - enum Reason { - REASON_UNSPECIFIED = 0, - RATE_LIMIT = 1, - NOT_CONSUMED = 2 - } - } - } + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** Represents a ConfigServiceV2 */ - class ConfigServiceV2 extends $protobuf.rpc.Service { + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** - * Constructs a new ConfigServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Calls ListBuckets. - * @param request ListBucketsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBucketsResponse - */ - public listBuckets(request: google.logging.v2.IListBucketsRequest, callback: google.logging.v2.ConfigServiceV2.ListBucketsCallback): void; + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } - /** - * Calls ListBuckets. - * @param request ListBucketsRequest message or plain object - * @returns Promise - */ - public listBuckets(request: google.logging.v2.IListBucketsRequest): Promise; + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { - /** - * Calls GetBucket. - * @param request GetBucketRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogBucket - */ - public getBucket(request: google.logging.v2.IGetBucketRequest, callback: google.logging.v2.ConfigServiceV2.GetBucketCallback): void; + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); - /** - * Calls GetBucket. - * @param request GetBucketRequest message or plain object - * @returns Promise - */ - public getBucket(request: google.logging.v2.IGetBucketRequest): Promise; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** - * Calls CreateBucket. - * @param request CreateBucketRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogBucket - */ - public createBucket(request: google.logging.v2.ICreateBucketRequest, callback: google.logging.v2.ConfigServiceV2.CreateBucketCallback): void; + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; - /** - * Calls CreateBucket. - * @param request CreateBucketRequest message or plain object - * @returns Promise - */ - public createBucket(request: google.logging.v2.ICreateBucketRequest): Promise; + /** MessageOptions deprecated. */ + public deprecated: boolean; - /** - * Calls UpdateBucket. - * @param request UpdateBucketRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogBucket - */ - public updateBucket(request: google.logging.v2.IUpdateBucketRequest, callback: google.logging.v2.ConfigServiceV2.UpdateBucketCallback): void; + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** - * Calls UpdateBucket. - * @param request UpdateBucketRequest message or plain object - * @returns Promise - */ - public updateBucket(request: google.logging.v2.IUpdateBucketRequest): Promise; + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Calls DeleteBucket. - * @param request DeleteBucketRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteBucket(request: google.logging.v2.IDeleteBucketRequest, callback: google.logging.v2.ConfigServiceV2.DeleteBucketCallback): void; + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - /** - * Calls DeleteBucket. - * @param request DeleteBucketRequest message or plain object - * @returns Promise - */ - public deleteBucket(request: google.logging.v2.IDeleteBucketRequest): Promise; + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls UndeleteBucket. - * @param request UndeleteBucketRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public undeleteBucket(request: google.logging.v2.IUndeleteBucketRequest, callback: google.logging.v2.ConfigServiceV2.UndeleteBucketCallback): void; + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls UndeleteBucket. - * @param request UndeleteBucketRequest message or plain object - * @returns Promise - */ - public undeleteBucket(request: google.logging.v2.IUndeleteBucketRequest): Promise; + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - /** - * Calls ListViews. - * @param request ListViewsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListViewsResponse - */ - public listViews(request: google.logging.v2.IListViewsRequest, callback: google.logging.v2.ConfigServiceV2.ListViewsCallback): void; + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - /** - * Calls ListViews. - * @param request ListViewsRequest message or plain object - * @returns Promise - */ - public listViews(request: google.logging.v2.IListViewsRequest): Promise; + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Calls GetView. - * @param request GetViewRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogView - */ - public getView(request: google.logging.v2.IGetViewRequest, callback: google.logging.v2.ConfigServiceV2.GetViewCallback): void; + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - /** - * Calls GetView. - * @param request GetViewRequest message or plain object - * @returns Promise - */ - public getView(request: google.logging.v2.IGetViewRequest): Promise; + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls CreateView. - * @param request CreateViewRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogView - */ - public createView(request: google.logging.v2.ICreateViewRequest, callback: google.logging.v2.ConfigServiceV2.CreateViewCallback): void; + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Calls CreateView. - * @param request CreateViewRequest message or plain object - * @returns Promise - */ - public createView(request: google.logging.v2.ICreateViewRequest): Promise; + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** - * Calls UpdateView. - * @param request UpdateViewRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogView - */ - public updateView(request: google.logging.v2.IUpdateViewRequest, callback: google.logging.v2.ConfigServiceV2.UpdateViewCallback): void; + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** - * Calls UpdateView. - * @param request UpdateViewRequest message or plain object - * @returns Promise - */ - public updateView(request: google.logging.v2.IUpdateViewRequest): Promise; + /** FieldOptions packed */ + packed?: (boolean|null); - /** - * Calls DeleteView. - * @param request DeleteViewRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteView(request: google.logging.v2.IDeleteViewRequest, callback: google.logging.v2.ConfigServiceV2.DeleteViewCallback): void; + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** - * Calls DeleteView. - * @param request DeleteViewRequest message or plain object - * @returns Promise - */ - public deleteView(request: google.logging.v2.IDeleteViewRequest): Promise; + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSinksResponse - */ - public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** - * Calls ListSinks. - * @param request ListSinksRequest message or plain object - * @returns Promise - */ - public listSinks(request: google.logging.v2.IListSinksRequest): Promise; + /** FieldOptions weak */ + weak?: (boolean|null); - /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Calls GetSink. - * @param request GetSinkRequest message or plain object - * @returns Promise - */ - public getSink(request: google.logging.v2.IGetSinkRequest): Promise; + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } - /** - * Calls CreateSink. - * @param request CreateSinkRequest message or plain object - * @returns Promise - */ - public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { - /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogSink - */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); - /** - * Calls UpdateSink. - * @param request UpdateSinkRequest message or plain object - * @returns Promise - */ - public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; + /** FieldOptions packed. */ + public packed: boolean; - /** - * Calls DeleteSink. - * @param request DeleteSinkRequest message or plain object - * @returns Promise - */ - public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse - */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; + /** FieldOptions lazy. */ + public lazy: boolean; - /** - * Calls ListExclusions. - * @param request ListExclusionsRequest message or plain object - * @returns Promise - */ - public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; + /** FieldOptions weak. */ + public weak: boolean; - /** - * Calls GetExclusion. - * @param request GetExclusionRequest message or plain object - * @returns Promise - */ - public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - /** - * Calls CreateExclusion. - * @param request CreateExclusionRequest message or plain object - * @returns Promise - */ - public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogExclusion - */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls UpdateExclusion. - * @param request UpdateExclusionRequest message or plain object - * @returns Promise - */ - public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - /** - * Calls DeleteExclusion. - * @param request DeleteExclusionRequest message or plain object - * @returns Promise - */ - public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Calls GetCmekSettings. - * @param request GetCmekSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CmekSettings - */ - public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback): void; + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - /** - * Calls GetCmekSettings. - * @param request GetCmekSettingsRequest message or plain object - * @returns Promise - */ - public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest): Promise; + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls UpdateCmekSettings. - * @param request UpdateCmekSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CmekSettings - */ - public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback): void; + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Calls UpdateCmekSettings. - * @param request UpdateCmekSettingsRequest message or plain object - * @returns Promise - */ - public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest): Promise; + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 } - namespace ConfigServiceV2 { + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. - * @param error Error, if any - * @param [response] ListBucketsResponse - */ - type ListBucketsCallback = (error: (Error|null), response?: google.logging.v2.ListBucketsResponse) => void; + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. - * @param error Error, if any - * @param [response] LogBucket - */ - type GetBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createBucket}. - * @param error Error, if any - * @param [response] LogBucket - */ - type CreateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. - * @param error Error, if any - * @param [response] LogBucket - */ - type UpdateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteBucket}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteBucketCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#undeleteBucket}. - * @param error Error, if any - * @param [response] Empty - */ - type UndeleteBucketCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listViews}. - * @param error Error, if any - * @param [response] ListViewsResponse - */ - type ListViewsCallback = (error: (Error|null), response?: google.logging.v2.ListViewsResponse) => void; + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getView}. - * @param error Error, if any - * @param [response] LogView - */ - type GetViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createView}. - * @param error Error, if any - * @param [response] LogView - */ - type CreateViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateView}. - * @param error Error, if any - * @param [response] LogView - */ - type UpdateViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteView}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @param error Error, if any - * @param [response] ListSinksResponse - */ - type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @param error Error, if any - * @param [response] LogSink - */ - type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @param error Error, if any - * @param [response] LogSink - */ - type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @param error Error, if any - * @param [response] LogSink - */ - type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @param error Error, if any - * @param [response] ListExclusionsResponse - */ - type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @param error Error, if any - * @param [response] LogExclusion - */ - type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @param error Error, if any - * @param [response] LogExclusion - */ - type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @param error Error, if any - * @param [response] LogExclusion - */ - type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. - * @param error Error, if any - * @param [response] CmekSettings - */ - type GetCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. - * @param error Error, if any - * @param [response] CmekSettings - */ - type UpdateCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; - } + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); - /** Properties of a LogBucket. */ - interface ILogBucket { + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** LogBucket name */ - name?: (string|null); + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** LogBucket description */ - description?: (string|null); + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** LogBucket createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - /** LogBucket updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogBucket retentionDays */ - retentionDays?: (number|null); + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogBucket locked */ - locked?: (boolean|null); + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - /** LogBucket lifecycleState */ - lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); - } - - /** Represents a LogBucket. */ - class LogBucket implements ILogBucket { + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - /** - * Constructs a new LogBucket. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogBucket); + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogBucket name. */ - public name: string; + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - /** LogBucket description. */ - public description: string; + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogBucket createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogBucket updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** LogBucket retentionDays. */ - public retentionDays: number; + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** LogBucket locked. */ - public locked: boolean; + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** LogBucket lifecycleState. */ - public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { - /** - * Creates a new LogBucket instance using the specified properties. - * @param [properties] Properties to set - * @returns LogBucket instance - */ - public static create(properties?: google.logging.v2.ILogBucket): google.logging.v2.LogBucket; + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); - /** - * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. - * @param message LogBucket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** - * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. - * @param message LogBucket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Decodes a LogBucket message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogBucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogBucket; + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - /** - * Decodes a LogBucket message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogBucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogBucket; + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a LogBucket message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogBucket - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogBucket; + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - /** - * Creates a plain object from a LogBucket message. Also converts values to other types if specified. - * @param message LogBucket - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - /** - * Converts this LogBucket to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LifecycleState enum. */ - enum LifecycleState { - LIFECYCLE_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - DELETE_REQUESTED = 2 - } + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - /** Properties of a LogView. */ - interface ILogView { + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogView name */ - name?: (string|null); + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogView description */ - description?: (string|null); + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** LogView createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** LogView updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** LogView filter */ - filter?: (string|null); - } + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); - /** Represents a LogView. */ - class LogView implements ILogView { + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } - /** - * Constructs a new LogView. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogView); + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { - /** LogView name. */ - public name: string; + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); - /** LogView description. */ - public description: string; + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** LogView createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** LogView updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - /** LogView filter. */ - public filter: string; + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new LogView instance using the specified properties. - * @param [properties] Properties to set - * @returns LogView instance - */ - public static create(properties?: google.logging.v2.ILogView): google.logging.v2.LogView; + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified LogView message. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. - * @param message LogView message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.ILogView, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - /** - * Encodes the specified LogView message, length delimited. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. - * @param message LogView message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.ILogView, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - /** - * Decodes a LogView message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogView; + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a LogView message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogView; + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - /** - * Verifies a LogView message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a LogView message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogView - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogView; + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a LogView message. Also converts values to other types if specified. - * @param message LogView - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.LogView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** - * Converts this LogView to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** Properties of a LogSink. */ - interface ILogSink { + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** LogSink name */ - name?: (string|null); + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** LogSink destination */ - destination?: (string|null); + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); - /** LogSink filter */ - filter?: (string|null); + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } - /** LogSink description */ - description?: (string|null); + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { - /** LogSink disabled */ - disabled?: (boolean|null); + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); - /** LogSink exclusions */ - exclusions?: (google.logging.v2.ILogExclusion[]|null); + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** LogSink outputVersionFormat */ - outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat|null); + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** LogSink writerIdentity */ - writerIdentity?: (string|null); + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** LogSink includeChildren */ - includeChildren?: (boolean|null); + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - /** LogSink bigqueryOptions */ - bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogSink createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** LogSink updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - /** Represents a LogSink. */ - class LogSink implements ILogSink { + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - /** - * Constructs a new LogSink. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.ILogSink); + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LogSink name. */ - public name: string; + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - /** LogSink destination. */ - public destination: string; + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogSink filter. */ - public filter: string; + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogSink description. */ - public description: string; + namespace MethodOptions { - /** LogSink disabled. */ - public disabled: boolean; + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } - /** LogSink exclusions. */ - public exclusions: google.logging.v2.ILogExclusion[]; + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** LogSink outputVersionFormat. */ - public outputVersionFormat: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** LogSink writerIdentity. */ - public writerIdentity: string; + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** LogSink includeChildren. */ - public includeChildren: boolean; + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); - /** LogSink bigqueryOptions. */ - public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); - /** LogSink createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); - /** LogSink updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); - /** LogSink options. */ - public options?: "bigqueryOptions"; + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { /** - * Creates a new LogSink instance using the specified properties. + * Constructs a new NamePart. * @param [properties] Properties to set - * @returns LogSink instance */ - public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @param message LogSink message or plain object to encode + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogSink message from the specified reader or buffer. + * Decodes a NamePart message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogSink + * @returns NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogSink + * @returns NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; /** - * Verifies a LogSink message. + * Verifies a NamePart message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogSink + * @returns NamePart */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. - * @param message LogSink + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogSink to JSON. + * Converts this NamePart to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - namespace LogSink { + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** VersionFormat enum. */ - enum VersionFormat { - VERSION_FORMAT_UNSPECIFIED = 0, - V2 = 1, - V1 = 2 - } - } + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } - /** Properties of a BigQueryOptions. */ - interface IBigQueryOptions { + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { - /** BigQueryOptions usePartitionedTables */ - usePartitionedTables?: (boolean|null); + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** BigQueryOptions usesTimestampColumnPartitioning */ - usesTimestampColumnPartitioning?: (boolean|null); - } + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; - /** Represents a BigQueryOptions. */ - class BigQueryOptions implements IBigQueryOptions { + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - /** - * Constructs a new BigQueryOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IBigQueryOptions); - - /** BigQueryOptions usePartitionedTables. */ - public usePartitionedTables: boolean; + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** BigQueryOptions usesTimestampColumnPartitioning. */ - public usesTimestampColumnPartitioning: boolean; + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new BigQueryOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryOptions instance - */ - public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a BigQueryOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a BigQueryOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryOptions - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; + namespace SourceCodeInfo { - /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. - * @param message BigQueryOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a Location. */ + interface ILocation { - /** - * Converts this BigQueryOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Location path */ + path?: (number[]|null); - /** Properties of a ListBucketsRequest. */ - interface IListBucketsRequest { + /** Location span */ + span?: (number[]|null); - /** ListBucketsRequest parent */ - parent?: (string|null); + /** Location leadingComments */ + leadingComments?: (string|null); - /** ListBucketsRequest pageToken */ - pageToken?: (string|null); + /** Location trailingComments */ + trailingComments?: (string|null); - /** ListBucketsRequest pageSize */ - pageSize?: (number|null); + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); } - /** Represents a ListBucketsRequest. */ - class ListBucketsRequest implements IListBucketsRequest { + /** Represents a Location. */ + class Location implements ILocation { /** - * Constructs a new ListBucketsRequest. + * Constructs a new Location. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListBucketsRequest); + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** ListBucketsRequest parent. */ - public parent: string; + /** Location path. */ + public path: number[]; - /** ListBucketsRequest pageToken. */ - public pageToken: string; + /** Location span. */ + public span: number[]; - /** ListBucketsRequest pageSize. */ - public pageSize: number; + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; /** - * Creates a new ListBucketsRequest instance using the specified properties. + * Creates a new Location instance using the specified properties. * @param [properties] Properties to set - * @returns ListBucketsRequest instance + * @returns Location instance */ - public static create(properties?: google.logging.v2.IListBucketsRequest): google.logging.v2.ListBucketsRequest; + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; /** - * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. - * @param message ListBucketsRequest message or plain object to encode + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. - * @param message ListBucketsRequest message or plain object to encode + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBucketsRequest + * @returns Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBucketsRequest + * @returns Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; /** - * Verifies a ListBucketsRequest message. + * Verifies a Location message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Location message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBucketsRequest + * @returns Location */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsRequest; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; /** - * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. - * @param message ListBucketsRequest + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListBucketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBucketsRequest to JSON. + * Converts this Location to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a ListBucketsResponse. */ - interface IListBucketsResponse { - - /** ListBucketsResponse buckets */ - buckets?: (google.logging.v2.ILogBucket[]|null); - - /** ListBucketsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { - /** Represents a ListBucketsResponse. */ - class ListBucketsResponse implements IListBucketsResponse { + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } - /** - * Constructs a new ListBucketsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IListBucketsResponse); + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { - /** ListBucketsResponse buckets. */ - public buckets: google.logging.v2.ILogBucket[]; + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** ListBucketsResponse nextPageToken. */ - public nextPageToken: string; + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - /** - * Creates a new ListBucketsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBucketsResponse instance - */ - public static create(properties?: google.logging.v2.IListBucketsResponse): google.logging.v2.ListBucketsResponse; + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - /** - * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. - * @param message ListBucketsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. - * @param message ListBucketsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListBucketsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBucketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsResponse; + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - /** - * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBucketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsResponse; + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - /** - * Verifies a ListBucketsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBucketsResponse - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsResponse; + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - /** - * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. - * @param message ListBucketsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.ListBucketsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ListBucketsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a CreateBucketRequest. */ - interface ICreateBucketRequest { + namespace GeneratedCodeInfo { - /** CreateBucketRequest parent */ - parent?: (string|null); + /** Properties of an Annotation. */ + interface IAnnotation { - /** CreateBucketRequest bucketId */ - bucketId?: (string|null); + /** Annotation path */ + path?: (number[]|null); - /** CreateBucketRequest bucket */ - bucket?: (google.logging.v2.ILogBucket|null); + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); } - /** Represents a CreateBucketRequest. */ - class CreateBucketRequest implements ICreateBucketRequest { + /** Represents an Annotation. */ + class Annotation implements IAnnotation { /** - * Constructs a new CreateBucketRequest. + * Constructs a new Annotation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICreateBucketRequest); + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** CreateBucketRequest parent. */ - public parent: string; + /** Annotation path. */ + public path: number[]; - /** CreateBucketRequest bucketId. */ - public bucketId: string; + /** Annotation sourceFile. */ + public sourceFile: string; - /** CreateBucketRequest bucket. */ - public bucket?: (google.logging.v2.ILogBucket|null); + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; /** - * Creates a new CreateBucketRequest instance using the specified properties. + * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set - * @returns CreateBucketRequest instance + * @returns Annotation instance */ - public static create(properties?: google.logging.v2.ICreateBucketRequest): google.logging.v2.CreateBucketRequest; + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Encodes the specified CreateBucketRequest message. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. - * @param message CreateBucketRequest message or plain object to encode + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. - * @param message CreateBucketRequest message or plain object to encode + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateBucketRequest message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateBucketRequest + * @returns Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateBucketRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Decodes a CreateBucketRequest message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateBucketRequest + * @returns Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateBucketRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Verifies a CreateBucketRequest message. + * Verifies an Annotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateBucketRequest + * @returns Annotation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateBucketRequest; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Creates a plain object from a CreateBucketRequest message. Also converts values to other types if specified. - * @param message CreateBucketRequest + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateBucketRequest to JSON. + * Converts this Annotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of an UpdateBucketRequest. */ - interface IUpdateBucketRequest { - - /** UpdateBucketRequest name */ - name?: (string|null); - - /** UpdateBucketRequest bucket */ - bucket?: (google.logging.v2.ILogBucket|null); + /** Properties of a Struct. */ + interface IStruct { - /** UpdateBucketRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } - /** Represents an UpdateBucketRequest. */ - class UpdateBucketRequest implements IUpdateBucketRequest { + /** Represents a Struct. */ + class Struct implements IStruct { - /** - * Constructs a new UpdateBucketRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IUpdateBucketRequest); + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); - /** UpdateBucketRequest name. */ - public name: string; + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; - /** UpdateBucketRequest bucket. */ - public bucket?: (google.logging.v2.ILogBucket|null); + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - /** UpdateBucketRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateBucketRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBucketRequest instance - */ - public static create(properties?: google.logging.v2.IUpdateBucketRequest): google.logging.v2.UpdateBucketRequest; + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. - * @param message UpdateBucketRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. - * @param message UpdateBucketRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; - /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateBucketRequest; + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; - /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateBucketRequest; + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies an UpdateBucketRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - /** - * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateBucketRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateBucketRequest; + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. - * @param message UpdateBucketRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.UpdateBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this UpdateBucketRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a Value. */ + interface IValue { - /** Properties of a GetBucketRequest. */ - interface IGetBucketRequest { + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - /** GetBucketRequest name */ - name?: (string|null); - } + /** Value numberValue */ + numberValue?: (number|null); - /** Represents a GetBucketRequest. */ - class GetBucketRequest implements IGetBucketRequest { + /** Value stringValue */ + stringValue?: (string|null); - /** - * Constructs a new GetBucketRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.logging.v2.IGetBucketRequest); + /** Value boolValue */ + boolValue?: (boolean|null); - /** GetBucketRequest name. */ - public name: string; + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); - /** - * Creates a new GetBucketRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBucketRequest instance - */ - public static create(properties?: google.logging.v2.IGetBucketRequest): google.logging.v2.GetBucketRequest; + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } - /** - * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. - * @param message GetBucketRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a Value. */ + class Value implements IValue { - /** - * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. - * @param message GetBucketRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); - /** - * Decodes a GetBucketRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetBucketRequest; + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - /** - * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetBucketRequest; + /** Value numberValue. */ + public numberValue?: (number|null); - /** - * Verifies a GetBucketRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Value stringValue. */ + public stringValue?: (string|null); - /** - * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBucketRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetBucketRequest; + /** Value boolValue. */ + public boolValue?: (boolean|null); - /** - * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. - * @param message GetBucketRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.v2.GetBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); - /** - * Converts this GetBucketRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); - /** Properties of a DeleteBucketRequest. */ - interface IDeleteBucketRequest { + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - /** DeleteBucketRequest name */ - name?: (string|null); - } + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - /** Represents a DeleteBucketRequest. */ - class DeleteBucketRequest implements IDeleteBucketRequest { + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new DeleteBucketRequest. - * @param [properties] Properties to set + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace logging. */ + namespace logging { + + /** Namespace type. */ + namespace type { + + /** Properties of a HttpRequest. */ + interface IHttpRequest { + + /** HttpRequest requestMethod */ + requestMethod?: (string|null); + + /** HttpRequest requestUrl */ + requestUrl?: (string|null); + + /** HttpRequest requestSize */ + requestSize?: (number|Long|string|null); + + /** HttpRequest status */ + status?: (number|null); + + /** HttpRequest responseSize */ + responseSize?: (number|Long|string|null); + + /** HttpRequest userAgent */ + userAgent?: (string|null); + + /** HttpRequest remoteIp */ + remoteIp?: (string|null); + + /** HttpRequest serverIp */ + serverIp?: (string|null); + + /** HttpRequest referer */ + referer?: (string|null); + + /** HttpRequest latency */ + latency?: (google.protobuf.IDuration|null); + + /** HttpRequest cacheLookup */ + cacheLookup?: (boolean|null); + + /** HttpRequest cacheHit */ + cacheHit?: (boolean|null); + + /** HttpRequest cacheValidatedWithOriginServer */ + cacheValidatedWithOriginServer?: (boolean|null); + + /** HttpRequest cacheFillBytes */ + cacheFillBytes?: (number|Long|string|null); + + /** HttpRequest protocol */ + protocol?: (string|null); + } + + /** Represents a HttpRequest. */ + class HttpRequest implements IHttpRequest { + + /** + * Constructs a new HttpRequest. + * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteBucketRequest); + constructor(properties?: google.logging.type.IHttpRequest); - /** DeleteBucketRequest name. */ - public name: string; + /** HttpRequest requestMethod. */ + public requestMethod: string; + + /** HttpRequest requestUrl. */ + public requestUrl: string; + + /** HttpRequest requestSize. */ + public requestSize: (number|Long|string); + + /** HttpRequest status. */ + public status: number; + + /** HttpRequest responseSize. */ + public responseSize: (number|Long|string); + + /** HttpRequest userAgent. */ + public userAgent: string; + + /** HttpRequest remoteIp. */ + public remoteIp: string; + + /** HttpRequest serverIp. */ + public serverIp: string; + + /** HttpRequest referer. */ + public referer: string; + + /** HttpRequest latency. */ + public latency?: (google.protobuf.IDuration|null); + + /** HttpRequest cacheLookup. */ + public cacheLookup: boolean; + + /** HttpRequest cacheHit. */ + public cacheHit: boolean; + + /** HttpRequest cacheValidatedWithOriginServer. */ + public cacheValidatedWithOriginServer: boolean; + + /** HttpRequest cacheFillBytes. */ + public cacheFillBytes: (number|Long|string); + + /** HttpRequest protocol. */ + public protocol: string; /** - * Creates a new DeleteBucketRequest instance using the specified properties. + * Creates a new HttpRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteBucketRequest instance + * @returns HttpRequest instance */ - public static create(properties?: google.logging.v2.IDeleteBucketRequest): google.logging.v2.DeleteBucketRequest; + public static create(properties?: google.logging.type.IHttpRequest): google.logging.type.HttpRequest; /** - * Encodes the specified DeleteBucketRequest message. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. - * @param message DeleteBucketRequest message or plain object to encode + * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @param message HttpRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. - * @param message DeleteBucketRequest message or plain object to encode + * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * @param message HttpRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteBucketRequest message from the specified reader or buffer. + * Decodes a HttpRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteBucketRequest + * @returns HttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteBucketRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.type.HttpRequest; /** - * Decodes a DeleteBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a HttpRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteBucketRequest + * @returns HttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteBucketRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.type.HttpRequest; /** - * Verifies a DeleteBucketRequest message. + * Verifies a HttpRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteBucketRequest + * @returns HttpRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteBucketRequest; + public static fromObject(object: { [k: string]: any }): google.logging.type.HttpRequest; /** - * Creates a plain object from a DeleteBucketRequest message. Also converts values to other types if specified. - * @param message DeleteBucketRequest + * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. + * @param message HttpRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.type.HttpRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteBucketRequest to JSON. + * Converts this HttpRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UndeleteBucketRequest. */ - interface IUndeleteBucketRequest { + /** LogSeverity enum. */ + enum LogSeverity { + DEFAULT = 0, + DEBUG = 100, + INFO = 200, + NOTICE = 300, + WARNING = 400, + ERROR = 500, + CRITICAL = 600, + ALERT = 700, + EMERGENCY = 800 + } + } - /** UndeleteBucketRequest name */ - name?: (string|null); + /** Namespace v2. */ + namespace v2 { + + /** Properties of a LogEntry. */ + interface ILogEntry { + + /** LogEntry logName */ + logName?: (string|null); + + /** LogEntry resource */ + resource?: (google.api.IMonitoredResource|null); + + /** LogEntry protoPayload */ + protoPayload?: (google.protobuf.IAny|null); + + /** LogEntry textPayload */ + textPayload?: (string|null); + + /** LogEntry jsonPayload */ + jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp */ + receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity */ + severity?: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity|null); + + /** LogEntry insertId */ + insertId?: (string|null); + + /** LogEntry httpRequest */ + httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels */ + labels?: ({ [k: string]: string }|null); + + /** LogEntry operation */ + operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace */ + trace?: (string|null); + + /** LogEntry spanId */ + spanId?: (string|null); + + /** LogEntry traceSampled */ + traceSampled?: (boolean|null); + + /** LogEntry sourceLocation */ + sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); } - /** Represents an UndeleteBucketRequest. */ - class UndeleteBucketRequest implements IUndeleteBucketRequest { + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { /** - * Constructs a new UndeleteBucketRequest. + * Constructs a new LogEntry. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUndeleteBucketRequest); + constructor(properties?: google.logging.v2.ILogEntry); - /** UndeleteBucketRequest name. */ - public name: string; + /** LogEntry logName. */ + public logName: string; + + /** LogEntry resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** LogEntry protoPayload. */ + public protoPayload?: (google.protobuf.IAny|null); + + /** LogEntry textPayload. */ + public textPayload?: (string|null); + + /** LogEntry jsonPayload. */ + public jsonPayload?: (google.protobuf.IStruct|null); + + /** LogEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry receiveTimestamp. */ + public receiveTimestamp?: (google.protobuf.ITimestamp|null); + + /** LogEntry severity. */ + public severity: (google.logging.type.LogSeverity|keyof typeof google.logging.type.LogSeverity); + + /** LogEntry insertId. */ + public insertId: string; + + /** LogEntry httpRequest. */ + public httpRequest?: (google.logging.type.IHttpRequest|null); + + /** LogEntry labels. */ + public labels: { [k: string]: string }; + + /** LogEntry operation. */ + public operation?: (google.logging.v2.ILogEntryOperation|null); + + /** LogEntry trace. */ + public trace: string; + + /** LogEntry spanId. */ + public spanId: string; + + /** LogEntry traceSampled. */ + public traceSampled: boolean; + + /** LogEntry sourceLocation. */ + public sourceLocation?: (google.logging.v2.ILogEntrySourceLocation|null); + + /** LogEntry payload. */ + public payload?: ("protoPayload"|"textPayload"|"jsonPayload"); /** - * Creates a new UndeleteBucketRequest instance using the specified properties. + * Creates a new LogEntry instance using the specified properties. * @param [properties] Properties to set - * @returns UndeleteBucketRequest instance + * @returns LogEntry instance */ - public static create(properties?: google.logging.v2.IUndeleteBucketRequest): google.logging.v2.UndeleteBucketRequest; + public static create(properties?: google.logging.v2.ILogEntry): google.logging.v2.LogEntry; /** - * Encodes the specified UndeleteBucketRequest message. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. - * @param message UndeleteBucketRequest message or plain object to encode + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUndeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UndeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. - * @param message UndeleteBucketRequest message or plain object to encode + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUndeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UndeleteBucketRequest message from the specified reader or buffer. + * Decodes a LogEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UndeleteBucketRequest + * @returns LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UndeleteBucketRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntry; /** - * Decodes an UndeleteBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UndeleteBucketRequest + * @returns LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UndeleteBucketRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntry; /** - * Verifies an UndeleteBucketRequest message. + * Verifies a LogEntry message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UndeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UndeleteBucketRequest + * @returns LogEntry */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UndeleteBucketRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntry; /** - * Creates a plain object from an UndeleteBucketRequest message. Also converts values to other types if specified. - * @param message UndeleteBucketRequest + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UndeleteBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UndeleteBucketRequest to JSON. + * Converts this LogEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListViewsRequest. */ - interface IListViewsRequest { + /** Properties of a LogEntryOperation. */ + interface ILogEntryOperation { - /** ListViewsRequest parent */ - parent?: (string|null); + /** LogEntryOperation id */ + id?: (string|null); - /** ListViewsRequest pageToken */ - pageToken?: (string|null); + /** LogEntryOperation producer */ + producer?: (string|null); - /** ListViewsRequest pageSize */ - pageSize?: (number|null); + /** LogEntryOperation first */ + first?: (boolean|null); + + /** LogEntryOperation last */ + last?: (boolean|null); } - /** Represents a ListViewsRequest. */ - class ListViewsRequest implements IListViewsRequest { + /** Represents a LogEntryOperation. */ + class LogEntryOperation implements ILogEntryOperation { /** - * Constructs a new ListViewsRequest. + * Constructs a new LogEntryOperation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListViewsRequest); + constructor(properties?: google.logging.v2.ILogEntryOperation); - /** ListViewsRequest parent. */ - public parent: string; + /** LogEntryOperation id. */ + public id: string; - /** ListViewsRequest pageToken. */ - public pageToken: string; + /** LogEntryOperation producer. */ + public producer: string; - /** ListViewsRequest pageSize. */ - public pageSize: number; + /** LogEntryOperation first. */ + public first: boolean; + + /** LogEntryOperation last. */ + public last: boolean; /** - * Creates a new ListViewsRequest instance using the specified properties. + * Creates a new LogEntryOperation instance using the specified properties. * @param [properties] Properties to set - * @returns ListViewsRequest instance + * @returns LogEntryOperation instance */ - public static create(properties?: google.logging.v2.IListViewsRequest): google.logging.v2.ListViewsRequest; + public static create(properties?: google.logging.v2.ILogEntryOperation): google.logging.v2.LogEntryOperation; /** - * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. - * @param message ListViewsRequest message or plain object to encode + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. - * @param message ListViewsRequest message or plain object to encode + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. + * @param message LogEntryOperation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntryOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListViewsRequest message from the specified reader or buffer. + * Decodes a LogEntryOperation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListViewsRequest + * @returns LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListViewsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntryOperation; /** - * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListViewsRequest + * @returns LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListViewsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntryOperation; /** - * Verifies a ListViewsRequest message. + * Verifies a LogEntryOperation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListViewsRequest + * @returns LogEntryOperation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListViewsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntryOperation; /** - * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. - * @param message ListViewsRequest + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. + * @param message LogEntryOperation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntryOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListViewsRequest to JSON. + * Converts this LogEntryOperation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListViewsResponse. */ - interface IListViewsResponse { + /** Properties of a LogEntrySourceLocation. */ + interface ILogEntrySourceLocation { - /** ListViewsResponse views */ - views?: (google.logging.v2.ILogView[]|null); + /** LogEntrySourceLocation file */ + file?: (string|null); - /** ListViewsResponse nextPageToken */ - nextPageToken?: (string|null); + /** LogEntrySourceLocation line */ + line?: (number|Long|string|null); + + /** LogEntrySourceLocation function */ + "function"?: (string|null); } - /** Represents a ListViewsResponse. */ - class ListViewsResponse implements IListViewsResponse { + /** Represents a LogEntrySourceLocation. */ + class LogEntrySourceLocation implements ILogEntrySourceLocation { /** - * Constructs a new ListViewsResponse. + * Constructs a new LogEntrySourceLocation. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListViewsResponse); + constructor(properties?: google.logging.v2.ILogEntrySourceLocation); - /** ListViewsResponse views. */ - public views: google.logging.v2.ILogView[]; + /** LogEntrySourceLocation file. */ + public file: string; - /** ListViewsResponse nextPageToken. */ - public nextPageToken: string; + /** LogEntrySourceLocation line. */ + public line: (number|Long|string); + + /** LogEntrySourceLocation function. */ + public function: string; /** - * Creates a new ListViewsResponse instance using the specified properties. + * Creates a new LogEntrySourceLocation instance using the specified properties. * @param [properties] Properties to set - * @returns ListViewsResponse instance + * @returns LogEntrySourceLocation instance */ - public static create(properties?: google.logging.v2.IListViewsResponse): google.logging.v2.ListViewsResponse; + public static create(properties?: google.logging.v2.ILogEntrySourceLocation): google.logging.v2.LogEntrySourceLocation; /** - * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. - * @param message ListViewsResponse message or plain object to encode + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. - * @param message ListViewsResponse message or plain object to encode + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. + * @param message LogEntrySourceLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogEntrySourceLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListViewsResponse message from the specified reader or buffer. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListViewsResponse + * @returns LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListViewsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogEntrySourceLocation; /** - * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListViewsResponse + * @returns LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListViewsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogEntrySourceLocation; /** - * Verifies a ListViewsResponse message. + * Verifies a LogEntrySourceLocation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListViewsResponse + * @returns LogEntrySourceLocation */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListViewsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogEntrySourceLocation; /** - * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. - * @param message ListViewsResponse + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. + * @param message LogEntrySourceLocation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogEntrySourceLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListViewsResponse to JSON. + * Converts this LogEntrySourceLocation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateViewRequest. */ - interface ICreateViewRequest { - - /** CreateViewRequest parent */ - parent?: (string|null); - - /** CreateViewRequest viewId */ - viewId?: (string|null); - - /** CreateViewRequest view */ - view?: (google.logging.v2.ILogView|null); - } - - /** Represents a CreateViewRequest. */ - class CreateViewRequest implements ICreateViewRequest { + /** Represents a LoggingServiceV2 */ + class LoggingServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new CreateViewRequest. - * @param [properties] Properties to set + * Constructs a new LoggingServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.logging.v2.ICreateViewRequest); - - /** CreateViewRequest parent. */ - public parent: string; - - /** CreateViewRequest viewId. */ - public viewId: string; - - /** CreateViewRequest view. */ - public view?: (google.logging.v2.ILogView|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new CreateViewRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateViewRequest instance + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(properties?: google.logging.v2.ICreateViewRequest): google.logging.v2.CreateViewRequest; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LoggingServiceV2; /** - * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. - * @param message CreateViewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static encode(message: google.logging.v2.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteLog(request: google.logging.v2.IDeleteLogRequest, callback: google.logging.v2.LoggingServiceV2.DeleteLogCallback): void; /** - * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. - * @param message CreateViewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteLog. + * @param request DeleteLogRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.logging.v2.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteLog(request: google.logging.v2.IDeleteLogRequest): Promise; /** - * Decodes a CreateViewRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteLogEntriesResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateViewRequest; + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback): void; /** - * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls WriteLogEntries. + * @param request WriteLogEntriesRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateViewRequest; + public writeLogEntries(request: google.logging.v2.IWriteLogEntriesRequest): Promise; /** - * Verifies a CreateViewRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogEntriesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.ListLogEntriesCallback): void; /** - * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateViewRequest + * Calls ListLogEntries. + * @param request ListLogEntriesRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateViewRequest; + public listLogEntries(request: google.logging.v2.IListLogEntriesRequest): Promise; /** - * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. - * @param message CreateViewRequest - * @param [options] Conversion options - * @returns Plain object + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse */ - public static toObject(message: google.logging.v2.CreateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest, callback: google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback): void; /** - * Converts this CreateViewRequest to JSON. - * @returns JSON object + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpdateViewRequest. */ - interface IUpdateViewRequest { - - /** UpdateViewRequest name */ - name?: (string|null); - - /** UpdateViewRequest view */ - view?: (google.logging.v2.ILogView|null); - - /** UpdateViewRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateViewRequest. */ - class UpdateViewRequest implements IUpdateViewRequest { + public listMonitoredResourceDescriptors(request: google.logging.v2.IListMonitoredResourceDescriptorsRequest): Promise; /** - * Constructs a new UpdateViewRequest. - * @param [properties] Properties to set + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogsResponse */ - constructor(properties?: google.logging.v2.IUpdateViewRequest); - - /** UpdateViewRequest name. */ - public name: string; - - /** UpdateViewRequest view. */ - public view?: (google.logging.v2.ILogView|null); - - /** UpdateViewRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + public listLogs(request: google.logging.v2.IListLogsRequest, callback: google.logging.v2.LoggingServiceV2.ListLogsCallback): void; /** - * Creates a new UpdateViewRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateViewRequest instance + * Calls ListLogs. + * @param request ListLogsRequest message or plain object + * @returns Promise */ - public static create(properties?: google.logging.v2.IUpdateViewRequest): google.logging.v2.UpdateViewRequest; + public listLogs(request: google.logging.v2.IListLogsRequest): Promise; /** - * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. - * @param message UpdateViewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TailLogEntries. + * @param request TailLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TailLogEntriesResponse */ - public static encode(message: google.logging.v2.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public tailLogEntries(request: google.logging.v2.ITailLogEntriesRequest, callback: google.logging.v2.LoggingServiceV2.TailLogEntriesCallback): void; /** - * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. - * @param message UpdateViewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TailLogEntries. + * @param request TailLogEntriesRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.logging.v2.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public tailLogEntries(request: google.logging.v2.ITailLogEntriesRequest): Promise; + } + + namespace LoggingServiceV2 { /** - * Decodes an UpdateViewRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @param error Error, if any + * @param [response] Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateViewRequest; + type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @param error Error, if any + * @param [response] WriteLogEntriesResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateViewRequest; + type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; /** - * Verifies an UpdateViewRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @param error Error, if any + * @param [response] ListLogEntriesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; /** - * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateViewRequest + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateViewRequest; + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; /** - * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. - * @param message UpdateViewRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @param error Error, if any + * @param [response] ListLogsResponse */ - public static toObject(message: google.logging.v2.UpdateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; /** - * Converts this UpdateViewRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.logging.v2.LoggingServiceV2#tailLogEntries}. + * @param error Error, if any + * @param [response] TailLogEntriesResponse */ - public toJSON(): { [k: string]: any }; + type TailLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.TailLogEntriesResponse) => void; } - /** Properties of a GetViewRequest. */ - interface IGetViewRequest { + /** Properties of a DeleteLogRequest. */ + interface IDeleteLogRequest { - /** GetViewRequest name */ - name?: (string|null); + /** DeleteLogRequest logName */ + logName?: (string|null); } - /** Represents a GetViewRequest. */ - class GetViewRequest implements IGetViewRequest { + /** Represents a DeleteLogRequest. */ + class DeleteLogRequest implements IDeleteLogRequest { /** - * Constructs a new GetViewRequest. + * Constructs a new DeleteLogRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetViewRequest); + constructor(properties?: google.logging.v2.IDeleteLogRequest); - /** GetViewRequest name. */ - public name: string; + /** DeleteLogRequest logName. */ + public logName: string; /** - * Creates a new GetViewRequest instance using the specified properties. + * Creates a new DeleteLogRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetViewRequest instance + * @returns DeleteLogRequest instance */ - public static create(properties?: google.logging.v2.IGetViewRequest): google.logging.v2.GetViewRequest; + public static create(properties?: google.logging.v2.IDeleteLogRequest): google.logging.v2.DeleteLogRequest; /** - * Encodes the specified GetViewRequest message. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. - * @param message GetViewRequest message or plain object to encode + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. - * @param message GetViewRequest message or plain object to encode + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. + * @param message DeleteLogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteLogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetViewRequest message from the specified reader or buffer. + * Decodes a DeleteLogRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetViewRequest + * @returns DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetViewRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogRequest; /** - * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetViewRequest + * @returns DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetViewRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogRequest; /** - * Verifies a GetViewRequest message. + * Verifies a DeleteLogRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetViewRequest + * @returns DeleteLogRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetViewRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogRequest; /** - * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. - * @param message GetViewRequest + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. + * @param message DeleteLogRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteLogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetViewRequest to JSON. + * Converts this DeleteLogRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteViewRequest. */ - interface IDeleteViewRequest { + /** Properties of a WriteLogEntriesRequest. */ + interface IWriteLogEntriesRequest { - /** DeleteViewRequest name */ - name?: (string|null); + /** WriteLogEntriesRequest logName */ + logName?: (string|null); + + /** WriteLogEntriesRequest resource */ + resource?: (google.api.IMonitoredResource|null); + + /** WriteLogEntriesRequest labels */ + labels?: ({ [k: string]: string }|null); + + /** WriteLogEntriesRequest entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** WriteLogEntriesRequest partialSuccess */ + partialSuccess?: (boolean|null); + + /** WriteLogEntriesRequest dryRun */ + dryRun?: (boolean|null); } - /** Represents a DeleteViewRequest. */ - class DeleteViewRequest implements IDeleteViewRequest { + /** Represents a WriteLogEntriesRequest. */ + class WriteLogEntriesRequest implements IWriteLogEntriesRequest { /** - * Constructs a new DeleteViewRequest. + * Constructs a new WriteLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteViewRequest); + constructor(properties?: google.logging.v2.IWriteLogEntriesRequest); - /** DeleteViewRequest name. */ - public name: string; + /** WriteLogEntriesRequest logName. */ + public logName: string; + + /** WriteLogEntriesRequest resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** WriteLogEntriesRequest labels. */ + public labels: { [k: string]: string }; + + /** WriteLogEntriesRequest entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** WriteLogEntriesRequest partialSuccess. */ + public partialSuccess: boolean; + + /** WriteLogEntriesRequest dryRun. */ + public dryRun: boolean; /** - * Creates a new DeleteViewRequest instance using the specified properties. + * Creates a new WriteLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteViewRequest instance + * @returns WriteLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.IDeleteViewRequest): google.logging.v2.DeleteViewRequest; + public static create(properties?: google.logging.v2.IWriteLogEntriesRequest): google.logging.v2.WriteLogEntriesRequest; /** - * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. - * @param message DeleteViewRequest message or plain object to encode + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. - * @param message DeleteViewRequest message or plain object to encode + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @param message WriteLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteViewRequest + * @returns WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteViewRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesRequest; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteViewRequest + * @returns WriteLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteViewRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesRequest; /** - * Verifies a DeleteViewRequest message. + * Verifies a WriteLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteViewRequest + * @returns WriteLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteViewRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesRequest; /** - * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. - * @param message DeleteViewRequest + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @param message WriteLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteViewRequest to JSON. + * Converts this WriteLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksRequest. */ - interface IListSinksRequest { - - /** ListSinksRequest parent */ - parent?: (string|null); - - /** ListSinksRequest pageToken */ - pageToken?: (string|null); - - /** ListSinksRequest pageSize */ - pageSize?: (number|null); + /** Properties of a WriteLogEntriesResponse. */ + interface IWriteLogEntriesResponse { } - /** Represents a ListSinksRequest. */ - class ListSinksRequest implements IListSinksRequest { + /** Represents a WriteLogEntriesResponse. */ + class WriteLogEntriesResponse implements IWriteLogEntriesResponse { /** - * Constructs a new ListSinksRequest. + * Constructs a new WriteLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksRequest); - - /** ListSinksRequest parent. */ - public parent: string; - - /** ListSinksRequest pageToken. */ - public pageToken: string; - - /** ListSinksRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.logging.v2.IWriteLogEntriesResponse); /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new WriteLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksRequest instance + * @returns WriteLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; + public static create(properties?: google.logging.v2.IWriteLogEntriesResponse): google.logging.v2.WriteLogEntriesResponse; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. - * @param message ListSinksRequest message or plain object to encode + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @param message WriteLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksRequest + * @returns WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesResponse; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksRequest + * @returns WriteLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesResponse; /** - * Verifies a ListSinksRequest message. + * Verifies a WriteLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksRequest + * @returns WriteLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesResponse; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. - * @param message ListSinksRequest + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @param message WriteLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksRequest to JSON. + * Converts this WriteLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSinksResponse. */ - interface IListSinksResponse { - - /** ListSinksResponse sinks */ - sinks?: (google.logging.v2.ILogSink[]|null); + /** Properties of a WriteLogEntriesPartialErrors. */ + interface IWriteLogEntriesPartialErrors { - /** ListSinksResponse nextPageToken */ - nextPageToken?: (string|null); + /** WriteLogEntriesPartialErrors logEntryErrors */ + logEntryErrors?: ({ [k: string]: google.rpc.IStatus }|null); } - /** Represents a ListSinksResponse. */ - class ListSinksResponse implements IListSinksResponse { + /** Represents a WriteLogEntriesPartialErrors. */ + class WriteLogEntriesPartialErrors implements IWriteLogEntriesPartialErrors { /** - * Constructs a new ListSinksResponse. + * Constructs a new WriteLogEntriesPartialErrors. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListSinksResponse); - - /** ListSinksResponse sinks. */ - public sinks: google.logging.v2.ILogSink[]; + constructor(properties?: google.logging.v2.IWriteLogEntriesPartialErrors); - /** ListSinksResponse nextPageToken. */ - public nextPageToken: string; + /** WriteLogEntriesPartialErrors logEntryErrors. */ + public logEntryErrors: { [k: string]: google.rpc.IStatus }; /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. * @param [properties] Properties to set - * @returns ListSinksResponse instance + * @returns WriteLogEntriesPartialErrors instance */ - public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; + public static create(properties?: google.logging.v2.IWriteLogEntriesPartialErrors): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. - * @param message ListSinksResponse message or plain object to encode + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. + * @param message WriteLogEntriesPartialErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IWriteLogEntriesPartialErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSinksResponse + * @returns WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSinksResponse + * @returns WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Verifies a ListSinksResponse message. + * Verifies a WriteLogEntriesPartialErrors message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSinksResponse + * @returns WriteLogEntriesPartialErrors */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.WriteLogEntriesPartialErrors; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. - * @param message ListSinksResponse + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. + * @param message WriteLogEntriesPartialErrors * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.WriteLogEntriesPartialErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSinksResponse to JSON. + * Converts this WriteLogEntriesPartialErrors to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSinkRequest. */ - interface IGetSinkRequest { + /** Properties of a ListLogEntriesRequest. */ + interface IListLogEntriesRequest { - /** GetSinkRequest sinkName */ - sinkName?: (string|null); + /** ListLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); + + /** ListLogEntriesRequest filter */ + filter?: (string|null); + + /** ListLogEntriesRequest orderBy */ + orderBy?: (string|null); + + /** ListLogEntriesRequest pageSize */ + pageSize?: (number|null); + + /** ListLogEntriesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetSinkRequest. */ - class GetSinkRequest implements IGetSinkRequest { + /** Represents a ListLogEntriesRequest. */ + class ListLogEntriesRequest implements IListLogEntriesRequest { /** - * Constructs a new GetSinkRequest. + * Constructs a new ListLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetSinkRequest); + constructor(properties?: google.logging.v2.IListLogEntriesRequest); - /** GetSinkRequest sinkName. */ - public sinkName: string; + /** ListLogEntriesRequest resourceNames. */ + public resourceNames: string[]; + + /** ListLogEntriesRequest filter. */ + public filter: string; + + /** ListLogEntriesRequest orderBy. */ + public orderBy: string; + + /** ListLogEntriesRequest pageSize. */ + public pageSize: number; + + /** ListLogEntriesRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetSinkRequest instance using the specified properties. + * Creates a new ListLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSinkRequest instance + * @returns ListLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; + public static create(properties?: google.logging.v2.IListLogEntriesRequest): google.logging.v2.ListLogEntriesRequest; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @param message GetSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. + * @param message ListLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSinkRequest + * @returns ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesRequest; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSinkRequest + * @returns ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesRequest; /** - * Verifies a GetSinkRequest message. + * Verifies a ListLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSinkRequest + * @returns ListLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesRequest; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. - * @param message GetSinkRequest + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. + * @param message ListLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSinkRequest to JSON. + * Converts this ListLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateSinkRequest. */ - interface ICreateSinkRequest { - - /** CreateSinkRequest parent */ - parent?: (string|null); + /** Properties of a ListLogEntriesResponse. */ + interface IListLogEntriesResponse { - /** CreateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** ListLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); - /** CreateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** ListLogEntriesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateSinkRequest. */ - class CreateSinkRequest implements ICreateSinkRequest { + /** Represents a ListLogEntriesResponse. */ + class ListLogEntriesResponse implements IListLogEntriesResponse { /** - * Constructs a new CreateSinkRequest. + * Constructs a new ListLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICreateSinkRequest); - - /** CreateSinkRequest parent. */ - public parent: string; + constructor(properties?: google.logging.v2.IListLogEntriesResponse); - /** CreateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + /** ListLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; - /** CreateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ListLogEntriesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new ListLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSinkRequest instance + * @returns ListLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; + public static create(properties?: google.logging.v2.IListLogEntriesResponse): google.logging.v2.ListLogEntriesResponse; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @param message CreateSinkRequest message or plain object to encode + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. + * @param message ListLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSinkRequest + * @returns ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogEntriesResponse; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSinkRequest + * @returns ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogEntriesResponse; /** - * Verifies a CreateSinkRequest message. + * Verifies a ListLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSinkRequest + * @returns ListLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogEntriesResponse; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. - * @param message CreateSinkRequest + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. + * @param message ListLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this ListLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSinkRequest. */ - interface IUpdateSinkRequest { - - /** UpdateSinkRequest sinkName */ - sinkName?: (string|null); - - /** UpdateSinkRequest sink */ - sink?: (google.logging.v2.ILogSink|null); + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { - /** UpdateSinkRequest uniqueWriterIdentity */ - uniqueWriterIdentity?: (boolean|null); + /** ListMonitoredResourceDescriptorsRequest pageSize */ + pageSize?: (number|null); - /** UpdateSinkRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListMonitoredResourceDescriptorsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an UpdateSinkRequest. */ - class UpdateSinkRequest implements IUpdateSinkRequest { + /** Represents a ListMonitoredResourceDescriptorsRequest. */ + class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { /** - * Constructs a new UpdateSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateSinkRequest); - - /** UpdateSinkRequest sinkName. */ - public sinkName: string; - - /** UpdateSinkRequest sink. */ - public sink?: (google.logging.v2.ILogSink|null); + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest); - /** UpdateSinkRequest uniqueWriterIdentity. */ - public uniqueWriterIdentity: boolean; + /** ListMonitoredResourceDescriptorsRequest pageSize. */ + public pageSize: number; - /** UpdateSinkRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListMonitoredResourceDescriptorsRequest pageToken. */ + public pageToken: string; /** - * Creates a new UpdateSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSinkRequest instance + * @returns ListMonitoredResourceDescriptorsRequest instance */ - public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsRequest): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @param message UpdateSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Verifies an UpdateSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSinkRequest + * @returns ListMonitoredResourceDescriptorsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsRequest; /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @param message UpdateSinkRequest + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteSinkRequest. */ - interface IDeleteSinkRequest { + /** Properties of a ListMonitoredResourceDescriptorsResponse. */ + interface IListMonitoredResourceDescriptorsResponse { - /** DeleteSinkRequest sinkName */ - sinkName?: (string|null); + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ + resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + + /** ListMonitoredResourceDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteSinkRequest. */ - class DeleteSinkRequest implements IDeleteSinkRequest { + /** Represents a ListMonitoredResourceDescriptorsResponse. */ + class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { /** - * Constructs a new DeleteSinkRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteSinkRequest); + constructor(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse); - /** DeleteSinkRequest sinkName. */ - public sinkName: string; + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ + public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + + /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteSinkRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSinkRequest instance + * @returns ListMonitoredResourceDescriptorsResponse instance */ - public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + public static create(properties?: google.logging.v2.IListMonitoredResourceDescriptorsResponse): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Verifies a DeleteSinkRequest message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSinkRequest + * @returns ListMonitoredResourceDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListMonitoredResourceDescriptorsResponse; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @param message DeleteSinkRequest + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMonitoredResourceDescriptorsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSinkRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LogExclusion. */ - interface ILogExclusion { - - /** LogExclusion name */ - name?: (string|null); - - /** LogExclusion description */ - description?: (string|null); + /** Properties of a ListLogsRequest. */ + interface IListLogsRequest { - /** LogExclusion filter */ - filter?: (string|null); + /** ListLogsRequest parent */ + parent?: (string|null); - /** LogExclusion disabled */ - disabled?: (boolean|null); + /** ListLogsRequest pageSize */ + pageSize?: (number|null); - /** LogExclusion createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListLogsRequest pageToken */ + pageToken?: (string|null); - /** LogExclusion updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListLogsRequest resourceNames */ + resourceNames?: (string[]|null); } - /** Represents a LogExclusion. */ - class LogExclusion implements ILogExclusion { + /** Represents a ListLogsRequest. */ + class ListLogsRequest implements IListLogsRequest { /** - * Constructs a new LogExclusion. + * Constructs a new ListLogsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogExclusion); - - /** LogExclusion name. */ - public name: string; - - /** LogExclusion description. */ - public description: string; + constructor(properties?: google.logging.v2.IListLogsRequest); - /** LogExclusion filter. */ - public filter: string; + /** ListLogsRequest parent. */ + public parent: string; - /** LogExclusion disabled. */ - public disabled: boolean; + /** ListLogsRequest pageSize. */ + public pageSize: number; - /** LogExclusion createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListLogsRequest pageToken. */ + public pageToken: string; - /** LogExclusion updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListLogsRequest resourceNames. */ + public resourceNames: string[]; /** - * Creates a new LogExclusion instance using the specified properties. + * Creates a new ListLogsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LogExclusion instance + * @returns ListLogsRequest instance */ - public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; + public static create(properties?: google.logging.v2.IListLogsRequest): google.logging.v2.ListLogsRequest; /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @param message LogExclusion message or plain object to encode + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. + * @param message ListLogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogExclusion message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogExclusion + * @returns ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsRequest; /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogExclusion + * @returns ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsRequest; /** - * Verifies a LogExclusion message. + * Verifies a ListLogsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogExclusion + * @returns ListLogsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsRequest; /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @param message LogExclusion + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. + * @param message ListLogsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogExclusion to JSON. + * Converts this ListLogsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListExclusionsRequest. */ - interface IListExclusionsRequest { - - /** ListExclusionsRequest parent */ - parent?: (string|null); + /** Properties of a ListLogsResponse. */ + interface IListLogsResponse { - /** ListExclusionsRequest pageToken */ - pageToken?: (string|null); + /** ListLogsResponse logNames */ + logNames?: (string[]|null); - /** ListExclusionsRequest pageSize */ - pageSize?: (number|null); + /** ListLogsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListExclusionsRequest. */ - class ListExclusionsRequest implements IListExclusionsRequest { + /** Represents a ListLogsResponse. */ + class ListLogsResponse implements IListLogsResponse { /** - * Constructs a new ListExclusionsRequest. + * Constructs a new ListLogsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListExclusionsRequest); - - /** ListExclusionsRequest parent. */ - public parent: string; + constructor(properties?: google.logging.v2.IListLogsResponse); - /** ListExclusionsRequest pageToken. */ - public pageToken: string; + /** ListLogsResponse logNames. */ + public logNames: string[]; - /** ListExclusionsRequest pageSize. */ - public pageSize: number; + /** ListLogsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListExclusionsRequest instance using the specified properties. + * Creates a new ListLogsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListExclusionsRequest instance + * @returns ListLogsResponse instance */ - public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; + public static create(properties?: google.logging.v2.IListLogsResponse): google.logging.v2.ListLogsResponse; /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @param message ListExclusionsRequest message or plain object to encode + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. + * @param message ListLogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExclusionsRequest + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogsResponse; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExclusionsRequest + * @returns ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogsResponse; /** - * Verifies a ListExclusionsRequest message. + * Verifies a ListLogsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExclusionsRequest + * @returns ListLogsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogsResponse; /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @param message ListExclusionsRequest + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @param message ListLogsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExclusionsRequest to JSON. + * Converts this ListLogsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListExclusionsResponse. */ - interface IListExclusionsResponse { + /** Properties of a TailLogEntriesRequest. */ + interface ITailLogEntriesRequest { - /** ListExclusionsResponse exclusions */ - exclusions?: (google.logging.v2.ILogExclusion[]|null); + /** TailLogEntriesRequest resourceNames */ + resourceNames?: (string[]|null); - /** ListExclusionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** TailLogEntriesRequest filter */ + filter?: (string|null); + + /** TailLogEntriesRequest bufferWindow */ + bufferWindow?: (google.protobuf.IDuration|null); } - /** Represents a ListExclusionsResponse. */ - class ListExclusionsResponse implements IListExclusionsResponse { + /** Represents a TailLogEntriesRequest. */ + class TailLogEntriesRequest implements ITailLogEntriesRequest { /** - * Constructs a new ListExclusionsResponse. + * Constructs a new TailLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListExclusionsResponse); + constructor(properties?: google.logging.v2.ITailLogEntriesRequest); - /** ListExclusionsResponse exclusions. */ - public exclusions: google.logging.v2.ILogExclusion[]; + /** TailLogEntriesRequest resourceNames. */ + public resourceNames: string[]; - /** ListExclusionsResponse nextPageToken. */ - public nextPageToken: string; + /** TailLogEntriesRequest filter. */ + public filter: string; + + /** TailLogEntriesRequest bufferWindow. */ + public bufferWindow?: (google.protobuf.IDuration|null); /** - * Creates a new ListExclusionsResponse instance using the specified properties. + * Creates a new TailLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListExclusionsResponse instance + * @returns TailLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; + public static create(properties?: google.logging.v2.ITailLogEntriesRequest): google.logging.v2.TailLogEntriesRequest; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode + * Encodes the specified TailLogEntriesRequest message. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. + * @param message TailLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ITailLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @param message ListExclusionsResponse message or plain object to encode + * Encodes the specified TailLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. + * @param message TailLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ITailLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * Decodes a TailLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExclusionsResponse + * @returns TailLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesRequest; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * Decodes a TailLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExclusionsResponse + * @returns TailLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesRequest; /** - * Verifies a ListExclusionsResponse message. + * Verifies a TailLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TailLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExclusionsResponse + * @returns TailLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesRequest; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. - * @param message ListExclusionsResponse + * Creates a plain object from a TailLogEntriesRequest message. Also converts values to other types if specified. + * @param message TailLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.TailLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExclusionsResponse to JSON. + * Converts this TailLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetExclusionRequest. */ - interface IGetExclusionRequest { + /** Properties of a TailLogEntriesResponse. */ + interface ITailLogEntriesResponse { - /** GetExclusionRequest name */ - name?: (string|null); + /** TailLogEntriesResponse entries */ + entries?: (google.logging.v2.ILogEntry[]|null); + + /** TailLogEntriesResponse suppressionInfo */ + suppressionInfo?: (google.logging.v2.TailLogEntriesResponse.ISuppressionInfo[]|null); } - /** Represents a GetExclusionRequest. */ - class GetExclusionRequest implements IGetExclusionRequest { + /** Represents a TailLogEntriesResponse. */ + class TailLogEntriesResponse implements ITailLogEntriesResponse { /** - * Constructs a new GetExclusionRequest. + * Constructs a new TailLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetExclusionRequest); + constructor(properties?: google.logging.v2.ITailLogEntriesResponse); - /** GetExclusionRequest name. */ - public name: string; + /** TailLogEntriesResponse entries. */ + public entries: google.logging.v2.ILogEntry[]; + + /** TailLogEntriesResponse suppressionInfo. */ + public suppressionInfo: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo[]; /** - * Creates a new GetExclusionRequest instance using the specified properties. + * Creates a new TailLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetExclusionRequest instance + * @returns TailLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; + public static create(properties?: google.logging.v2.ITailLogEntriesResponse): google.logging.v2.TailLogEntriesResponse; /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode + * Encodes the specified TailLogEntriesResponse message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. + * @param message TailLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ITailLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. - * @param message GetExclusionRequest message or plain object to encode + * Encodes the specified TailLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. + * @param message TailLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ITailLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. + * Decodes a TailLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetExclusionRequest + * @returns TailLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesResponse; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a TailLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetExclusionRequest + * @returns TailLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesResponse; /** - * Verifies a GetExclusionRequest message. + * Verifies a TailLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TailLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetExclusionRequest + * @returns TailLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesResponse; /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. - * @param message GetExclusionRequest + * Creates a plain object from a TailLogEntriesResponse message. Also converts values to other types if specified. + * @param message TailLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.TailLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetExclusionRequest to JSON. + * Converts this TailLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateExclusionRequest. */ - interface ICreateExclusionRequest { + namespace TailLogEntriesResponse { - /** CreateExclusionRequest parent */ - parent?: (string|null); + /** Properties of a SuppressionInfo. */ + interface ISuppressionInfo { - /** CreateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); + /** SuppressionInfo reason */ + reason?: (google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|keyof typeof google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|null); + + /** SuppressionInfo suppressedCount */ + suppressedCount?: (number|null); + } + + /** Represents a SuppressionInfo. */ + class SuppressionInfo implements ISuppressionInfo { + + /** + * Constructs a new SuppressionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo); + + /** SuppressionInfo reason. */ + public reason: (google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|keyof typeof google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason); + + /** SuppressionInfo suppressedCount. */ + public suppressedCount: number; + + /** + * Creates a new SuppressionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SuppressionInfo instance + */ + public static create(properties?: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + + /** + * Encodes the specified SuppressionInfo message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. + * @param message SuppressionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuppressionInfo message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. + * @param message SuppressionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.TailLogEntriesResponse.ISuppressionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuppressionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuppressionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + + /** + * Decodes a SuppressionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuppressionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + + /** + * Verifies a SuppressionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SuppressionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuppressionInfo + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.TailLogEntriesResponse.SuppressionInfo; + + /** + * Creates a plain object from a SuppressionInfo message. Also converts values to other types if specified. + * @param message SuppressionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.TailLogEntriesResponse.SuppressionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuppressionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SuppressionInfo { + + /** Reason enum. */ + enum Reason { + REASON_UNSPECIFIED = 0, + RATE_LIMIT = 1, + NOT_CONSUMED = 2 + } + } } - /** Represents a CreateExclusionRequest. */ - class CreateExclusionRequest implements ICreateExclusionRequest { + /** Represents a ConfigServiceV2 */ + class ConfigServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new CreateExclusionRequest. - * @param [properties] Properties to set + * Constructs a new ConfigServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.logging.v2.ICreateExclusionRequest); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** CreateExclusionRequest parent. */ - public parent: string; + /** + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConfigServiceV2; - /** CreateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + /** + * Calls ListBuckets. + * @param request ListBucketsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBucketsResponse + */ + public listBuckets(request: google.logging.v2.IListBucketsRequest, callback: google.logging.v2.ConfigServiceV2.ListBucketsCallback): void; + + /** + * Calls ListBuckets. + * @param request ListBucketsRequest message or plain object + * @returns Promise + */ + public listBuckets(request: google.logging.v2.IListBucketsRequest): Promise; + + /** + * Calls GetBucket. + * @param request GetBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogBucket + */ + public getBucket(request: google.logging.v2.IGetBucketRequest, callback: google.logging.v2.ConfigServiceV2.GetBucketCallback): void; + + /** + * Calls GetBucket. + * @param request GetBucketRequest message or plain object + * @returns Promise + */ + public getBucket(request: google.logging.v2.IGetBucketRequest): Promise; + + /** + * Calls CreateBucket. + * @param request CreateBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogBucket + */ + public createBucket(request: google.logging.v2.ICreateBucketRequest, callback: google.logging.v2.ConfigServiceV2.CreateBucketCallback): void; + + /** + * Calls CreateBucket. + * @param request CreateBucketRequest message or plain object + * @returns Promise + */ + public createBucket(request: google.logging.v2.ICreateBucketRequest): Promise; + + /** + * Calls UpdateBucket. + * @param request UpdateBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogBucket + */ + public updateBucket(request: google.logging.v2.IUpdateBucketRequest, callback: google.logging.v2.ConfigServiceV2.UpdateBucketCallback): void; + + /** + * Calls UpdateBucket. + * @param request UpdateBucketRequest message or plain object + * @returns Promise + */ + public updateBucket(request: google.logging.v2.IUpdateBucketRequest): Promise; + + /** + * Calls DeleteBucket. + * @param request DeleteBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteBucket(request: google.logging.v2.IDeleteBucketRequest, callback: google.logging.v2.ConfigServiceV2.DeleteBucketCallback): void; + + /** + * Calls DeleteBucket. + * @param request DeleteBucketRequest message or plain object + * @returns Promise + */ + public deleteBucket(request: google.logging.v2.IDeleteBucketRequest): Promise; + + /** + * Calls UndeleteBucket. + * @param request UndeleteBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public undeleteBucket(request: google.logging.v2.IUndeleteBucketRequest, callback: google.logging.v2.ConfigServiceV2.UndeleteBucketCallback): void; /** - * Creates a new CreateExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateExclusionRequest instance + * Calls UndeleteBucket. + * @param request UndeleteBucketRequest message or plain object + * @returns Promise */ - public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; + public undeleteBucket(request: google.logging.v2.IUndeleteBucketRequest): Promise; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListViews. + * @param request ListViewsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListViewsResponse */ - public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listViews(request: google.logging.v2.IListViewsRequest, callback: google.logging.v2.ConfigServiceV2.ListViewsCallback): void; /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @param message CreateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListViews. + * @param request ListViewsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listViews(request: google.logging.v2.IListViewsRequest): Promise; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetView. + * @param request GetViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogView */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; + public getView(request: google.logging.v2.IGetViewRequest, callback: google.logging.v2.ConfigServiceV2.GetViewCallback): void; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetView. + * @param request GetViewRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; + public getView(request: google.logging.v2.IGetViewRequest): Promise; /** - * Verifies a CreateExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateView. + * @param request CreateViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogView */ - public static verify(message: { [k: string]: any }): (string|null); + public createView(request: google.logging.v2.ICreateViewRequest, callback: google.logging.v2.ConfigServiceV2.CreateViewCallback): void; /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateExclusionRequest + * Calls CreateView. + * @param request CreateViewRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; + public createView(request: google.logging.v2.ICreateViewRequest): Promise; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @param message CreateExclusionRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateView. + * @param request UpdateViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogView */ - public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateView(request: google.logging.v2.IUpdateViewRequest, callback: google.logging.v2.ConfigServiceV2.UpdateViewCallback): void; /** - * Converts this CreateExclusionRequest to JSON. - * @returns JSON object + * Calls UpdateView. + * @param request UpdateViewRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpdateExclusionRequest. */ - interface IUpdateExclusionRequest { - - /** UpdateExclusionRequest name */ - name?: (string|null); - - /** UpdateExclusionRequest exclusion */ - exclusion?: (google.logging.v2.ILogExclusion|null); - - /** UpdateExclusionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateExclusionRequest. */ - class UpdateExclusionRequest implements IUpdateExclusionRequest { + public updateView(request: google.logging.v2.IUpdateViewRequest): Promise; /** - * Constructs a new UpdateExclusionRequest. - * @param [properties] Properties to set + * Calls DeleteView. + * @param request DeleteViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - constructor(properties?: google.logging.v2.IUpdateExclusionRequest); - - /** UpdateExclusionRequest name. */ - public name: string; - - /** UpdateExclusionRequest exclusion. */ - public exclusion?: (google.logging.v2.ILogExclusion|null); + public deleteView(request: google.logging.v2.IDeleteViewRequest, callback: google.logging.v2.ConfigServiceV2.DeleteViewCallback): void; - /** UpdateExclusionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Calls DeleteView. + * @param request DeleteViewRequest message or plain object + * @returns Promise + */ + public deleteView(request: google.logging.v2.IDeleteViewRequest): Promise; /** - * Creates a new UpdateExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateExclusionRequest instance + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSinksResponse */ - public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; + public listSinks(request: google.logging.v2.IListSinksRequest, callback: google.logging.v2.ConfigServiceV2.ListSinksCallback): void; /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListSinks. + * @param request ListSinksRequest message or plain object + * @returns Promise */ - public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listSinks(request: google.logging.v2.IListSinksRequest): Promise; /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. - * @param message UpdateExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getSink(request: google.logging.v2.IGetSinkRequest, callback: google.logging.v2.ConfigServiceV2.GetSinkCallback): void; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetSink. + * @param request GetSinkRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; + public getSink(request: google.logging.v2.IGetSinkRequest): Promise; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; + public createSink(request: google.logging.v2.ICreateSinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateSinkCallback): void; /** - * Verifies an UpdateExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateSink. + * @param request CreateSinkRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public createSink(request: google.logging.v2.ICreateSinkRequest): Promise; /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateExclusionRequest + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogSink */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; + public updateSink(request: google.logging.v2.IUpdateSinkRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSinkCallback): void; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. - * @param message UpdateExclusionRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateSink. + * @param request UpdateSinkRequest message or plain object + * @returns Promise */ - public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateSink(request: google.logging.v2.IUpdateSinkRequest): Promise; /** - * Converts this UpdateExclusionRequest to JSON. - * @returns JSON object + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public toJSON(): { [k: string]: any }; - } + public deleteSink(request: google.logging.v2.IDeleteSinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteSinkCallback): void; - /** Properties of a DeleteExclusionRequest. */ - interface IDeleteExclusionRequest { + /** + * Calls DeleteSink. + * @param request DeleteSinkRequest message or plain object + * @returns Promise + */ + public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; - /** DeleteExclusionRequest name */ - name?: (string|null); - } + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExclusionsResponse + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest, callback: google.logging.v2.ConfigServiceV2.ListExclusionsCallback): void; - /** Represents a DeleteExclusionRequest. */ - class DeleteExclusionRequest implements IDeleteExclusionRequest { + /** + * Calls ListExclusions. + * @param request ListExclusionsRequest message or plain object + * @returns Promise + */ + public listExclusions(request: google.logging.v2.IListExclusionsRequest): Promise; /** - * Constructs a new DeleteExclusionRequest. - * @param [properties] Properties to set + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + public getExclusion(request: google.logging.v2.IGetExclusionRequest, callback: google.logging.v2.ConfigServiceV2.GetExclusionCallback): void; - /** DeleteExclusionRequest name. */ - public name: string; + /** + * Calls GetExclusion. + * @param request GetExclusionRequest message or plain object + * @returns Promise + */ + public getExclusion(request: google.logging.v2.IGetExclusionRequest): Promise; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteExclusionRequest instance + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; + public createExclusion(request: google.logging.v2.ICreateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.CreateExclusionCallback): void; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateExclusion. + * @param request CreateExclusionRequest message or plain object + * @returns Promise */ - public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createExclusion(request: google.logging.v2.ICreateExclusionRequest): Promise; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. - * @param message DeleteExclusionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogExclusion */ - public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest, callback: google.logging.v2.ConfigServiceV2.UpdateExclusionCallback): void; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateExclusion. + * @param request UpdateExclusionRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; + public updateExclusion(request: google.logging.v2.IUpdateExclusionRequest): Promise; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest, callback: google.logging.v2.ConfigServiceV2.DeleteExclusionCallback): void; /** - * Verifies a DeleteExclusionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteExclusion. + * @param request DeleteExclusionRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteExclusion(request: google.logging.v2.IDeleteExclusionRequest): Promise; /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteExclusionRequest + * Calls GetCmekSettings. + * @param request GetCmekSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmekSettings */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; + public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback): void; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. - * @param message DeleteExclusionRequest - * @param [options] Conversion options - * @returns Plain object + * Calls GetCmekSettings. + * @param request GetCmekSettingsRequest message or plain object + * @returns Promise */ - public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getCmekSettings(request: google.logging.v2.IGetCmekSettingsRequest): Promise; /** - * Converts this DeleteExclusionRequest to JSON. - * @returns JSON object + * Calls UpdateCmekSettings. + * @param request UpdateCmekSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmekSettings */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetCmekSettingsRequest. */ - interface IGetCmekSettingsRequest { + public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest, callback: google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback): void; - /** GetCmekSettingsRequest name */ - name?: (string|null); + /** + * Calls UpdateCmekSettings. + * @param request UpdateCmekSettingsRequest message or plain object + * @returns Promise + */ + public updateCmekSettings(request: google.logging.v2.IUpdateCmekSettingsRequest): Promise; } - /** Represents a GetCmekSettingsRequest. */ - class GetCmekSettingsRequest implements IGetCmekSettingsRequest { + namespace ConfigServiceV2 { /** - * Constructs a new GetCmekSettingsRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. + * @param error Error, if any + * @param [response] ListBucketsResponse */ - constructor(properties?: google.logging.v2.IGetCmekSettingsRequest); - - /** GetCmekSettingsRequest name. */ - public name: string; + type ListBucketsCallback = (error: (Error|null), response?: google.logging.v2.ListBucketsResponse) => void; /** - * Creates a new GetCmekSettingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCmekSettingsRequest instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. + * @param error Error, if any + * @param [response] LogBucket */ - public static create(properties?: google.logging.v2.IGetCmekSettingsRequest): google.logging.v2.GetCmekSettingsRequest; + type GetBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; /** - * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. - * @param message GetCmekSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createBucket}. + * @param error Error, if any + * @param [response] LogBucket */ - public static encode(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; /** - * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. - * @param message GetCmekSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. + * @param error Error, if any + * @param [response] LogBucket */ - public static encodeDelimited(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCmekSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteBucket}. + * @param error Error, if any + * @param [response] Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetCmekSettingsRequest; + type DeleteBucketCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCmekSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#undeleteBucket}. + * @param error Error, if any + * @param [response] Empty */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetCmekSettingsRequest; + type UndeleteBucketCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Verifies a GetCmekSettingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listViews}. + * @param error Error, if any + * @param [response] ListViewsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListViewsCallback = (error: (Error|null), response?: google.logging.v2.ListViewsResponse) => void; /** - * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCmekSettingsRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getView}. + * @param error Error, if any + * @param [response] LogView */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetCmekSettingsRequest; + type GetViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; /** - * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. - * @param message GetCmekSettingsRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createView}. + * @param error Error, if any + * @param [response] LogView */ - public static toObject(message: google.logging.v2.GetCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type CreateViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; /** - * Converts this GetCmekSettingsRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateView}. + * @param error Error, if any + * @param [response] LogView */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpdateCmekSettingsRequest. */ - interface IUpdateCmekSettingsRequest { - - /** UpdateCmekSettingsRequest name */ - name?: (string|null); - - /** UpdateCmekSettingsRequest cmekSettings */ - cmekSettings?: (google.logging.v2.ICmekSettings|null); - - /** UpdateCmekSettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateCmekSettingsRequest. */ - class UpdateCmekSettingsRequest implements IUpdateCmekSettingsRequest { + type UpdateViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; /** - * Constructs a new UpdateCmekSettingsRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteView}. + * @param error Error, if any + * @param [response] Empty */ - constructor(properties?: google.logging.v2.IUpdateCmekSettingsRequest); - - /** UpdateCmekSettingsRequest name. */ - public name: string; + type DeleteViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** UpdateCmekSettingsRequest cmekSettings. */ - public cmekSettings?: (google.logging.v2.ICmekSettings|null); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @param error Error, if any + * @param [response] ListSinksResponse + */ + type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; - /** UpdateCmekSettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @param error Error, if any + * @param [response] LogSink + */ + type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Creates a new UpdateCmekSettingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateCmekSettingsRequest instance + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static create(properties?: google.logging.v2.IUpdateCmekSettingsRequest): google.logging.v2.UpdateCmekSettingsRequest; + type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. - * @param message UpdateCmekSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @param error Error, if any + * @param [response] LogSink */ - public static encode(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. - * @param message UpdateCmekSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @param error Error, if any + * @param [response] Empty */ - public static encodeDelimited(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateCmekSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @param error Error, if any + * @param [response] ListExclusionsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateCmekSettingsRequest; + type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateCmekSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @param error Error, if any + * @param [response] LogExclusion + */ + type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateCmekSettingsRequest; + type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Verifies an UpdateCmekSettingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @param error Error, if any + * @param [response] LogExclusion */ - public static verify(message: { [k: string]: any }): (string|null); + type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateCmekSettingsRequest + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @param error Error, if any + * @param [response] Empty */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateCmekSettingsRequest; + type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateCmekSettingsRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. + * @param error Error, if any + * @param [response] CmekSettings */ - public static toObject(message: google.logging.v2.UpdateCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; /** - * Converts this UpdateCmekSettingsRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. + * @param error Error, if any + * @param [response] CmekSettings */ - public toJSON(): { [k: string]: any }; + type UpdateCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; } - /** Properties of a CmekSettings. */ - interface ICmekSettings { + /** Properties of a LogBucket. */ + interface ILogBucket { - /** CmekSettings name */ + /** LogBucket name */ name?: (string|null); - /** CmekSettings kmsKeyName */ - kmsKeyName?: (string|null); + /** LogBucket description */ + description?: (string|null); - /** CmekSettings serviceAccountId */ - serviceAccountId?: (string|null); + /** LogBucket createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket retentionDays */ + retentionDays?: (number|null); + + /** LogBucket locked */ + locked?: (boolean|null); + + /** LogBucket lifecycleState */ + lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); } - /** Represents a CmekSettings. */ - class CmekSettings implements ICmekSettings { + /** Represents a LogBucket. */ + class LogBucket implements ILogBucket { /** - * Constructs a new CmekSettings. + * Constructs a new LogBucket. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICmekSettings); + constructor(properties?: google.logging.v2.ILogBucket); - /** CmekSettings name. */ + /** LogBucket name. */ public name: string; - /** CmekSettings kmsKeyName. */ - public kmsKeyName: string; + /** LogBucket description. */ + public description: string; - /** CmekSettings serviceAccountId. */ - public serviceAccountId: string; + /** LogBucket createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogBucket retentionDays. */ + public retentionDays: number; + + /** LogBucket locked. */ + public locked: boolean; + + /** LogBucket lifecycleState. */ + public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); /** - * Creates a new CmekSettings instance using the specified properties. + * Creates a new LogBucket instance using the specified properties. * @param [properties] Properties to set - * @returns CmekSettings instance + * @returns LogBucket instance */ - public static create(properties?: google.logging.v2.ICmekSettings): google.logging.v2.CmekSettings; + public static create(properties?: google.logging.v2.ILogBucket): google.logging.v2.LogBucket; /** - * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. - * @param message CmekSettings message or plain object to encode + * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * @param message LogBucket message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. - * @param message CmekSettings message or plain object to encode + * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * @param message LogBucket message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogBucket, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CmekSettings message from the specified reader or buffer. + * Decodes a LogBucket message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CmekSettings + * @returns LogBucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CmekSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogBucket; /** - * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * Decodes a LogBucket message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CmekSettings + * @returns LogBucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CmekSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogBucket; /** - * Verifies a CmekSettings message. + * Verifies a LogBucket message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CmekSettings + * @returns LogBucket */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CmekSettings; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogBucket; /** - * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. - * @param message CmekSettings + * Creates a plain object from a LogBucket message. Also converts values to other types if specified. + * @param message LogBucket * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CmekSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CmekSettings to JSON. + * Converts this LogBucket to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a MetricsServiceV2 */ - class MetricsServiceV2 extends $protobuf.rpc.Service { + /** LifecycleState enum. */ + enum LifecycleState { + LIFECYCLE_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + DELETE_REQUESTED = 2 + } - /** - * Constructs a new MetricsServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** Properties of a LogView. */ + interface ILogView { - /** - * Creates new MetricsServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetricsServiceV2; + /** LogView name */ + name?: (string|null); - /** - * Calls ListLogMetrics. - * @param request ListLogMetricsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogMetricsResponse - */ - public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest, callback: google.logging.v2.MetricsServiceV2.ListLogMetricsCallback): void; + /** LogView description */ + description?: (string|null); - /** - * Calls ListLogMetrics. - * @param request ListLogMetricsRequest message or plain object - * @returns Promise - */ - public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest): Promise; + /** LogView createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Calls GetLogMetric. - * @param request GetLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric - */ - public getLogMetric(request: google.logging.v2.IGetLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.GetLogMetricCallback): void; + /** LogView updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Calls GetLogMetric. - * @param request GetLogMetricRequest message or plain object - * @returns Promise - */ - public getLogMetric(request: google.logging.v2.IGetLogMetricRequest): Promise; + /** LogView filter */ + filter?: (string|null); + } - /** - * Calls CreateLogMetric. - * @param request CreateLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric - */ - public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.CreateLogMetricCallback): void; + /** Represents a LogView. */ + class LogView implements ILogView { /** - * Calls CreateLogMetric. - * @param request CreateLogMetricRequest message or plain object - * @returns Promise + * Constructs a new LogView. + * @param [properties] Properties to set */ - public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest): Promise; + constructor(properties?: google.logging.v2.ILogView); + + /** LogView name. */ + public name: string; + + /** LogView description. */ + public description: string; + + /** LogView createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogView updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogView filter. */ + public filter: string; /** - * Calls UpdateLogMetric. - * @param request UpdateLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric + * Creates a new LogView instance using the specified properties. + * @param [properties] Properties to set + * @returns LogView instance */ - public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback): void; + public static create(properties?: google.logging.v2.ILogView): google.logging.v2.LogView; /** - * Calls UpdateLogMetric. - * @param request UpdateLogMetricRequest message or plain object - * @returns Promise + * Encodes the specified LogView message. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * @param message LogView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest): Promise; + public static encode(message: google.logging.v2.ILogView, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteLogMetric. - * @param request DeleteLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified LogView message, length delimited. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * @param message LogView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback): void; + public static encodeDelimited(message: google.logging.v2.ILogView, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteLogMetric. - * @param request DeleteLogMetricRequest message or plain object - * @returns Promise + * Decodes a LogView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest): Promise; - } - - namespace MetricsServiceV2 { + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogView; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. - * @param error Error, if any - * @param [response] ListLogMetricsResponse + * Decodes a LogView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListLogMetricsCallback = (error: (Error|null), response?: google.logging.v2.ListLogMetricsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogView; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. - * @param error Error, if any - * @param [response] LogMetric + * Verifies a LogView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. - * @param error Error, if any - * @param [response] LogMetric + * Creates a LogView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogView */ - type CreateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogView; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. - * @param error Error, if any - * @param [response] LogMetric + * Creates a plain object from a LogView message. Also converts values to other types if specified. + * @param message LogView + * @param [options] Conversion options + * @returns Plain object */ - type UpdateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + public static toObject(message: google.logging.v2.LogView, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. - * @param error Error, if any - * @param [response] Empty + * Converts this LogView to JSON. + * @returns JSON object */ - type DeleteLogMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a LogMetric. */ - interface ILogMetric { + /** Properties of a LogSink. */ + interface ILogSink { - /** LogMetric name */ + /** LogSink name */ name?: (string|null); - /** LogMetric description */ - description?: (string|null); + /** LogSink destination */ + destination?: (string|null); - /** LogMetric filter */ + /** LogSink filter */ filter?: (string|null); - /** LogMetric metricDescriptor */ - metricDescriptor?: (google.api.IMetricDescriptor|null); + /** LogSink description */ + description?: (string|null); - /** LogMetric valueExtractor */ - valueExtractor?: (string|null); + /** LogSink disabled */ + disabled?: (boolean|null); - /** LogMetric labelExtractors */ - labelExtractors?: ({ [k: string]: string }|null); + /** LogSink exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); - /** LogMetric bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** LogSink outputVersionFormat */ + outputVersionFormat?: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat|null); - /** LogMetric createTime */ + /** LogSink writerIdentity */ + writerIdentity?: (string|null); + + /** LogSink includeChildren */ + includeChildren?: (boolean|null); + + /** LogSink bigqueryOptions */ + bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** LogMetric updateTime */ + /** LogSink updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - - /** LogMetric version */ - version?: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion|null); } - /** Represents a LogMetric. */ - class LogMetric implements ILogMetric { + /** Represents a LogSink. */ + class LogSink implements ILogSink { /** - * Constructs a new LogMetric. + * Constructs a new LogSink. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogMetric); + constructor(properties?: google.logging.v2.ILogSink); - /** LogMetric name. */ + /** LogSink name. */ public name: string; - /** LogMetric description. */ - public description: string; + /** LogSink destination. */ + public destination: string; - /** LogMetric filter. */ + /** LogSink filter. */ public filter: string; - /** LogMetric metricDescriptor. */ - public metricDescriptor?: (google.api.IMetricDescriptor|null); + /** LogSink description. */ + public description: string; - /** LogMetric valueExtractor. */ - public valueExtractor: string; + /** LogSink disabled. */ + public disabled: boolean; - /** LogMetric labelExtractors. */ - public labelExtractors: { [k: string]: string }; + /** LogSink exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; - /** LogMetric bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** LogSink outputVersionFormat. */ + public outputVersionFormat: (google.logging.v2.LogSink.VersionFormat|keyof typeof google.logging.v2.LogSink.VersionFormat); - /** LogMetric createTime. */ + /** LogSink writerIdentity. */ + public writerIdentity: string; + + /** LogSink includeChildren. */ + public includeChildren: boolean; + + /** LogSink bigqueryOptions. */ + public bigqueryOptions?: (google.logging.v2.IBigQueryOptions|null); + + /** LogSink createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** LogMetric updateTime. */ + /** LogSink updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** LogMetric version. */ - public version: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion); + /** LogSink options. */ + public options?: "bigqueryOptions"; /** - * Creates a new LogMetric instance using the specified properties. + * Creates a new LogSink instance using the specified properties. * @param [properties] Properties to set - * @returns LogMetric instance + * @returns LogSink instance */ - public static create(properties?: google.logging.v2.ILogMetric): google.logging.v2.LogMetric; + public static create(properties?: google.logging.v2.ILogSink): google.logging.v2.LogSink; /** - * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. - * @param message LogMetric message or plain object to encode + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. - * @param message LogMetric message or plain object to encode + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @param message LogSink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogSink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogMetric message from the specified reader or buffer. + * Decodes a LogSink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogMetric + * @returns LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogMetric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogSink; /** - * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * Decodes a LogSink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogMetric + * @returns LogSink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogMetric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogSink; /** - * Verifies a LogMetric message. + * Verifies a LogSink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogMetric + * @returns LogSink */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogMetric; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogSink; /** - * Creates a plain object from a LogMetric message. Also converts values to other types if specified. - * @param message LogMetric + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @param message LogSink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogSink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogMetric to JSON. + * Converts this LogSink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LogMetric { + namespace LogSink { - /** ApiVersion enum. */ - enum ApiVersion { - V2 = 0, - V1 = 1 + /** VersionFormat enum. */ + enum VersionFormat { + VERSION_FORMAT_UNSPECIFIED = 0, + V2 = 1, + V1 = 2 } } - /** Properties of a ListLogMetricsRequest. */ - interface IListLogMetricsRequest { - - /** ListLogMetricsRequest parent */ - parent?: (string|null); + /** Properties of a BigQueryOptions. */ + interface IBigQueryOptions { - /** ListLogMetricsRequest pageToken */ - pageToken?: (string|null); + /** BigQueryOptions usePartitionedTables */ + usePartitionedTables?: (boolean|null); - /** ListLogMetricsRequest pageSize */ - pageSize?: (number|null); + /** BigQueryOptions usesTimestampColumnPartitioning */ + usesTimestampColumnPartitioning?: (boolean|null); } - /** Represents a ListLogMetricsRequest. */ - class ListLogMetricsRequest implements IListLogMetricsRequest { + /** Represents a BigQueryOptions. */ + class BigQueryOptions implements IBigQueryOptions { /** - * Constructs a new ListLogMetricsRequest. + * Constructs a new BigQueryOptions. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogMetricsRequest); - - /** ListLogMetricsRequest parent. */ - public parent: string; + constructor(properties?: google.logging.v2.IBigQueryOptions); - /** ListLogMetricsRequest pageToken. */ - public pageToken: string; + /** BigQueryOptions usePartitionedTables. */ + public usePartitionedTables: boolean; - /** ListLogMetricsRequest pageSize. */ - public pageSize: number; + /** BigQueryOptions usesTimestampColumnPartitioning. */ + public usesTimestampColumnPartitioning: boolean; /** - * Creates a new ListLogMetricsRequest instance using the specified properties. + * Creates a new BigQueryOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogMetricsRequest instance + * @returns BigQueryOptions instance */ - public static create(properties?: google.logging.v2.IListLogMetricsRequest): google.logging.v2.ListLogMetricsRequest; + public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; /** - * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. - * @param message ListLogMetricsRequest message or plain object to encode + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. - * @param message ListLogMetricsRequest message or plain object to encode + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * Decodes a BigQueryOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogMetricsRequest + * @returns BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogMetricsRequest + * @returns BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; /** - * Verifies a ListLogMetricsRequest message. + * Verifies a BigQueryOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogMetricsRequest + * @returns BigQueryOptions */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; /** - * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. - * @param message ListLogMetricsRequest + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @param message BigQueryOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogMetricsRequest to JSON. + * Converts this BigQueryOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogMetricsResponse. */ - interface IListLogMetricsResponse { + /** Properties of a ListBucketsRequest. */ + interface IListBucketsRequest { - /** ListLogMetricsResponse metrics */ - metrics?: (google.logging.v2.ILogMetric[]|null); + /** ListBucketsRequest parent */ + parent?: (string|null); - /** ListLogMetricsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListBucketsRequest pageToken */ + pageToken?: (string|null); + + /** ListBucketsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a ListLogMetricsResponse. */ - class ListLogMetricsResponse implements IListLogMetricsResponse { + /** Represents a ListBucketsRequest. */ + class ListBucketsRequest implements IListBucketsRequest { /** - * Constructs a new ListLogMetricsResponse. + * Constructs a new ListBucketsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogMetricsResponse); + constructor(properties?: google.logging.v2.IListBucketsRequest); - /** ListLogMetricsResponse metrics. */ - public metrics: google.logging.v2.ILogMetric[]; + /** ListBucketsRequest parent. */ + public parent: string; - /** ListLogMetricsResponse nextPageToken. */ - public nextPageToken: string; + /** ListBucketsRequest pageToken. */ + public pageToken: string; + + /** ListBucketsRequest pageSize. */ + public pageSize: number; /** - * Creates a new ListLogMetricsResponse instance using the specified properties. + * Creates a new ListBucketsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogMetricsResponse instance + * @returns ListBucketsRequest instance */ - public static create(properties?: google.logging.v2.IListLogMetricsResponse): google.logging.v2.ListLogMetricsResponse; + public static create(properties?: google.logging.v2.IListBucketsRequest): google.logging.v2.ListBucketsRequest; /** - * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. - * @param message ListLogMetricsResponse message or plain object to encode + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @param message ListBucketsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. - * @param message ListLogMetricsResponse message or plain object to encode + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @param message ListBucketsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * Decodes a ListBucketsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogMetricsResponse + * @returns ListBucketsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsRequest; /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogMetricsResponse + * @returns ListBucketsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsRequest; /** - * Verifies a ListLogMetricsResponse message. + * Verifies a ListBucketsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogMetricsResponse + * @returns ListBucketsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsRequest; /** - * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. - * @param message ListLogMetricsResponse + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * @param message ListBucketsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListBucketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogMetricsResponse to JSON. + * Converts this ListBucketsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetLogMetricRequest. */ - interface IGetLogMetricRequest { + /** Properties of a ListBucketsResponse. */ + interface IListBucketsResponse { - /** GetLogMetricRequest metricName */ - metricName?: (string|null); + /** ListBucketsResponse buckets */ + buckets?: (google.logging.v2.ILogBucket[]|null); + + /** ListBucketsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetLogMetricRequest. */ - class GetLogMetricRequest implements IGetLogMetricRequest { + /** Represents a ListBucketsResponse. */ + class ListBucketsResponse implements IListBucketsResponse { /** - * Constructs a new GetLogMetricRequest. + * Constructs a new ListBucketsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetLogMetricRequest); + constructor(properties?: google.logging.v2.IListBucketsResponse); - /** GetLogMetricRequest metricName. */ - public metricName: string; + /** ListBucketsResponse buckets. */ + public buckets: google.logging.v2.ILogBucket[]; + + /** ListBucketsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetLogMetricRequest instance using the specified properties. + * Creates a new ListBucketsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetLogMetricRequest instance + * @returns ListBucketsResponse instance */ - public static create(properties?: google.logging.v2.IGetLogMetricRequest): google.logging.v2.GetLogMetricRequest; + public static create(properties?: google.logging.v2.IListBucketsResponse): google.logging.v2.ListBucketsResponse; /** - * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. - * @param message GetLogMetricRequest message or plain object to encode + * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @param message ListBucketsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. - * @param message GetLogMetricRequest message or plain object to encode + * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * @param message ListBucketsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListBucketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * Decodes a ListBucketsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetLogMetricRequest + * @returns ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetLogMetricRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsResponse; /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetLogMetricRequest + * @returns ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetLogMetricRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsResponse; /** - * Verifies a GetLogMetricRequest message. + * Verifies a ListBucketsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetLogMetricRequest + * @returns ListBucketsResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetLogMetricRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsResponse; /** - * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. - * @param message GetLogMetricRequest + * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. + * @param message ListBucketsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListBucketsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetLogMetricRequest to JSON. + * Converts this ListBucketsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateLogMetricRequest. */ - interface ICreateLogMetricRequest { + /** Properties of a CreateBucketRequest. */ + interface ICreateBucketRequest { - /** CreateLogMetricRequest parent */ + /** CreateBucketRequest parent */ parent?: (string|null); - /** CreateLogMetricRequest metric */ - metric?: (google.logging.v2.ILogMetric|null); + /** CreateBucketRequest bucketId */ + bucketId?: (string|null); + + /** CreateBucketRequest bucket */ + bucket?: (google.logging.v2.ILogBucket|null); } - /** Represents a CreateLogMetricRequest. */ - class CreateLogMetricRequest implements ICreateLogMetricRequest { + /** Represents a CreateBucketRequest. */ + class CreateBucketRequest implements ICreateBucketRequest { /** - * Constructs a new CreateLogMetricRequest. + * Constructs a new CreateBucketRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ICreateLogMetricRequest); + constructor(properties?: google.logging.v2.ICreateBucketRequest); - /** CreateLogMetricRequest parent. */ + /** CreateBucketRequest parent. */ public parent: string; - /** CreateLogMetricRequest metric. */ - public metric?: (google.logging.v2.ILogMetric|null); + /** CreateBucketRequest bucketId. */ + public bucketId: string; + + /** CreateBucketRequest bucket. */ + public bucket?: (google.logging.v2.ILogBucket|null); /** - * Creates a new CreateLogMetricRequest instance using the specified properties. + * Creates a new CreateBucketRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateLogMetricRequest instance + * @returns CreateBucketRequest instance */ - public static create(properties?: google.logging.v2.ICreateLogMetricRequest): google.logging.v2.CreateLogMetricRequest; + public static create(properties?: google.logging.v2.ICreateBucketRequest): google.logging.v2.CreateBucketRequest; /** - * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @param message CreateLogMetricRequest message or plain object to encode + * Encodes the specified CreateBucketRequest message. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. + * @param message CreateBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICreateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @param message CreateLogMetricRequest message or plain object to encode + * Encodes the specified CreateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. + * @param message CreateBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICreateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer. + * Decodes a CreateBucketRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateLogMetricRequest + * @returns CreateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateLogMetricRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateBucketRequest; /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateBucketRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateLogMetricRequest + * @returns CreateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateLogMetricRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateBucketRequest; /** - * Verifies a CreateLogMetricRequest message. + * Verifies a CreateBucketRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBucketRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateLogMetricRequest + * @returns CreateBucketRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateLogMetricRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateBucketRequest; /** - * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. - * @param message CreateLogMetricRequest + * Creates a plain object from a CreateBucketRequest message. Also converts values to other types if specified. + * @param message CreateBucketRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.CreateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CreateBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateLogMetricRequest to JSON. + * Converts this CreateBucketRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateLogMetricRequest. */ - interface IUpdateLogMetricRequest { + /** Properties of an UpdateBucketRequest. */ + interface IUpdateBucketRequest { - /** UpdateLogMetricRequest metricName */ - metricName?: (string|null); + /** UpdateBucketRequest name */ + name?: (string|null); - /** UpdateLogMetricRequest metric */ - metric?: (google.logging.v2.ILogMetric|null); + /** UpdateBucketRequest bucket */ + bucket?: (google.logging.v2.ILogBucket|null); + + /** UpdateBucketRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an UpdateLogMetricRequest. */ - class UpdateLogMetricRequest implements IUpdateLogMetricRequest { + /** Represents an UpdateBucketRequest. */ + class UpdateBucketRequest implements IUpdateBucketRequest { /** - * Constructs a new UpdateLogMetricRequest. + * Constructs a new UpdateBucketRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateLogMetricRequest); + constructor(properties?: google.logging.v2.IUpdateBucketRequest); - /** UpdateLogMetricRequest metricName. */ - public metricName: string; + /** UpdateBucketRequest name. */ + public name: string; - /** UpdateLogMetricRequest metric. */ - public metric?: (google.logging.v2.ILogMetric|null); + /** UpdateBucketRequest bucket. */ + public bucket?: (google.logging.v2.ILogBucket|null); + + /** UpdateBucketRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new UpdateLogMetricRequest instance using the specified properties. + * Creates a new UpdateBucketRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateLogMetricRequest instance + * @returns UpdateBucketRequest instance */ - public static create(properties?: google.logging.v2.IUpdateLogMetricRequest): google.logging.v2.UpdateLogMetricRequest; + public static create(properties?: google.logging.v2.IUpdateBucketRequest): google.logging.v2.UpdateBucketRequest; /** - * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @param message UpdateLogMetricRequest message or plain object to encode + * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @param message UpdateBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @param message UpdateLogMetricRequest message or plain object to encode + * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @param message UpdateBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * Decodes an UpdateBucketRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateLogMetricRequest + * @returns UpdateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateLogMetricRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateBucketRequest; /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateLogMetricRequest + * @returns UpdateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateLogMetricRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateBucketRequest; /** - * Verifies an UpdateLogMetricRequest message. + * Verifies an UpdateBucketRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateLogMetricRequest + * @returns UpdateBucketRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateLogMetricRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateBucketRequest; /** - * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. - * @param message UpdateLogMetricRequest + * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. + * @param message UpdateBucketRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateLogMetricRequest to JSON. + * Converts this UpdateBucketRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteLogMetricRequest. */ - interface IDeleteLogMetricRequest { + /** Properties of a GetBucketRequest. */ + interface IGetBucketRequest { - /** DeleteLogMetricRequest metricName */ - metricName?: (string|null); + /** GetBucketRequest name */ + name?: (string|null); } - /** Represents a DeleteLogMetricRequest. */ - class DeleteLogMetricRequest implements IDeleteLogMetricRequest { + /** Represents a GetBucketRequest. */ + class GetBucketRequest implements IGetBucketRequest { /** - * Constructs a new DeleteLogMetricRequest. + * Constructs a new GetBucketRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteLogMetricRequest); + constructor(properties?: google.logging.v2.IGetBucketRequest); - /** DeleteLogMetricRequest metricName. */ - public metricName: string; + /** GetBucketRequest name. */ + public name: string; /** - * Creates a new DeleteLogMetricRequest instance using the specified properties. + * Creates a new GetBucketRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteLogMetricRequest instance + * @returns GetBucketRequest instance */ - public static create(properties?: google.logging.v2.IDeleteLogMetricRequest): google.logging.v2.DeleteLogMetricRequest; + public static create(properties?: google.logging.v2.IGetBucketRequest): google.logging.v2.GetBucketRequest; /** - * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. - * @param message DeleteLogMetricRequest message or plain object to encode + * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @param message GetBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. - * @param message DeleteLogMetricRequest message or plain object to encode + * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @param message GetBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * Decodes a GetBucketRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteLogMetricRequest + * @returns GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogMetricRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetBucketRequest; /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteLogMetricRequest + * @returns GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogMetricRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetBucketRequest; /** - * Verifies a DeleteLogMetricRequest message. + * Verifies a GetBucketRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteLogMetricRequest + * @returns GetBucketRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogMetricRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetBucketRequest; /** - * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. - * @param message DeleteLogMetricRequest + * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. + * @param message GetBucketRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteLogMetricRequest to JSON. + * Converts this GetBucketRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a HttpRequest. */ - interface IHttpRequest { - - /** HttpRequest requestMethod */ - requestMethod?: (string|null); - - /** HttpRequest requestUrl */ - requestUrl?: (string|null); - - /** HttpRequest requestSize */ - requestSize?: (number|Long|string|null); - - /** HttpRequest status */ - status?: (number|null); - - /** HttpRequest responseSize */ - responseSize?: (number|Long|string|null); - - /** HttpRequest userAgent */ - userAgent?: (string|null); - - /** HttpRequest remoteIp */ - remoteIp?: (string|null); - - /** HttpRequest serverIp */ - serverIp?: (string|null); - - /** HttpRequest referer */ - referer?: (string|null); - - /** HttpRequest latency */ - latency?: (google.protobuf.IDuration|null); - - /** HttpRequest cacheLookup */ - cacheLookup?: (boolean|null); - - /** HttpRequest cacheHit */ - cacheHit?: (boolean|null); - /** HttpRequest cacheValidatedWithOriginServer */ - cacheValidatedWithOriginServer?: (boolean|null); - - /** HttpRequest cacheFillBytes */ - cacheFillBytes?: (number|Long|string|null); + /** Properties of a DeleteBucketRequest. */ + interface IDeleteBucketRequest { - /** HttpRequest protocol */ - protocol?: (string|null); + /** DeleteBucketRequest name */ + name?: (string|null); } - /** Represents a HttpRequest. */ - class HttpRequest implements IHttpRequest { + /** Represents a DeleteBucketRequest. */ + class DeleteBucketRequest implements IDeleteBucketRequest { /** - * Constructs a new HttpRequest. + * Constructs a new DeleteBucketRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.type.IHttpRequest); - - /** HttpRequest requestMethod. */ - public requestMethod: string; - - /** HttpRequest requestUrl. */ - public requestUrl: string; - - /** HttpRequest requestSize. */ - public requestSize: (number|Long|string); - - /** HttpRequest status. */ - public status: number; - - /** HttpRequest responseSize. */ - public responseSize: (number|Long|string); - - /** HttpRequest userAgent. */ - public userAgent: string; - - /** HttpRequest remoteIp. */ - public remoteIp: string; - - /** HttpRequest serverIp. */ - public serverIp: string; - - /** HttpRequest referer. */ - public referer: string; - - /** HttpRequest latency. */ - public latency?: (google.protobuf.IDuration|null); - - /** HttpRequest cacheLookup. */ - public cacheLookup: boolean; - - /** HttpRequest cacheHit. */ - public cacheHit: boolean; - - /** HttpRequest cacheValidatedWithOriginServer. */ - public cacheValidatedWithOriginServer: boolean; - - /** HttpRequest cacheFillBytes. */ - public cacheFillBytes: (number|Long|string); - - /** HttpRequest protocol. */ - public protocol: string; + constructor(properties?: google.logging.v2.IDeleteBucketRequest); + + /** DeleteBucketRequest name. */ + public name: string; /** - * Creates a new HttpRequest instance using the specified properties. + * Creates a new DeleteBucketRequest instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRequest instance + * @returns DeleteBucketRequest instance */ - public static create(properties?: google.logging.type.IHttpRequest): google.logging.type.HttpRequest; + public static create(properties?: google.logging.v2.IDeleteBucketRequest): google.logging.v2.DeleteBucketRequest; /** - * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. - * @param message HttpRequest message or plain object to encode + * Encodes the specified DeleteBucketRequest message. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * @param message DeleteBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. - * @param message HttpRequest message or plain object to encode + * Encodes the specified DeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * @param message DeleteBucketRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.type.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRequest message from the specified reader or buffer. + * Decodes a DeleteBucketRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRequest + * @returns DeleteBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.type.HttpRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteBucketRequest; /** - * Decodes a HttpRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteBucketRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRequest + * @returns DeleteBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.type.HttpRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteBucketRequest; /** - * Verifies a HttpRequest message. + * Verifies a DeleteBucketRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRequest - */ - public static fromObject(object: { [k: string]: any }): google.logging.type.HttpRequest; - - /** - * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. - * @param message HttpRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.logging.type.HttpRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** LogSeverity enum. */ - enum LogSeverity { - DEFAULT = 0, - DEBUG = 100, - INFO = 200, - NOTICE = 300, - WARNING = 400, - ERROR = 500, - CRITICAL = 600, - ALERT = 700, - EMERGENCY = 800 - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6 - } - - /** Properties of a MonitoredResourceDescriptor. */ - interface IMonitoredResourceDescriptor { - - /** MonitoredResourceDescriptor name */ - name?: (string|null); - - /** MonitoredResourceDescriptor type */ - type?: (string|null); - - /** MonitoredResourceDescriptor displayName */ - displayName?: (string|null); - - /** MonitoredResourceDescriptor description */ - description?: (string|null); - - /** MonitoredResourceDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - - /** MonitoredResourceDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - } - - /** Represents a MonitoredResourceDescriptor. */ - class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { - - /** - * Constructs a new MonitoredResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMonitoredResourceDescriptor); - - /** MonitoredResourceDescriptor name. */ - public name: string; - - /** MonitoredResourceDescriptor type. */ - public type: string; - - /** MonitoredResourceDescriptor displayName. */ - public displayName: string; - - /** MonitoredResourceDescriptor description. */ - public description: string; - - /** MonitoredResourceDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** MonitoredResourceDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoredResourceDescriptor instance - */ - public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; - - /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoredResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; - - /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoredResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; - - /** - * Verifies a MonitoredResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoredResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; - - /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @param message MonitoredResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MonitoredResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MonitoredResource. */ - interface IMonitoredResource { - - /** MonitoredResource type */ - type?: (string|null); - - /** MonitoredResource labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a MonitoredResource. */ - class MonitoredResource implements IMonitoredResource { - - /** - * Constructs a new MonitoredResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMonitoredResource); - - /** MonitoredResource type. */ - public type: string; - - /** MonitoredResource labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new MonitoredResource instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoredResource instance - */ - public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; - - /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a MonitoredResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoredResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; + /** + * Creates a DeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBucketRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteBucketRequest; - /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoredResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; + /** + * Creates a plain object from a DeleteBucketRequest message. Also converts values to other types if specified. + * @param message DeleteBucketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a MonitoredResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this DeleteBucketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoredResource - */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + /** Properties of an UndeleteBucketRequest. */ + interface IUndeleteBucketRequest { - /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @param message MonitoredResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** UndeleteBucketRequest name */ + name?: (string|null); + } - /** - * Converts this MonitoredResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents an UndeleteBucketRequest. */ + class UndeleteBucketRequest implements IUndeleteBucketRequest { - /** Properties of a MonitoredResourceMetadata. */ - interface IMonitoredResourceMetadata { + /** + * Constructs a new UndeleteBucketRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUndeleteBucketRequest); - /** MonitoredResourceMetadata systemLabels */ - systemLabels?: (google.protobuf.IStruct|null); + /** UndeleteBucketRequest name. */ + public name: string; - /** MonitoredResourceMetadata userLabels */ - userLabels?: ({ [k: string]: string }|null); - } + /** + * Creates a new UndeleteBucketRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeleteBucketRequest instance + */ + public static create(properties?: google.logging.v2.IUndeleteBucketRequest): google.logging.v2.UndeleteBucketRequest; - /** Represents a MonitoredResourceMetadata. */ - class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + /** + * Encodes the specified UndeleteBucketRequest message. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. + * @param message UndeleteBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUndeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new MonitoredResourceMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMonitoredResourceMetadata); + /** + * Encodes the specified UndeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. + * @param message UndeleteBucketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUndeleteBucketRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MonitoredResourceMetadata systemLabels. */ - public systemLabels?: (google.protobuf.IStruct|null); + /** + * Decodes an UndeleteBucketRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UndeleteBucketRequest; - /** MonitoredResourceMetadata userLabels. */ - public userLabels: { [k: string]: string }; + /** + * Decodes an UndeleteBucketRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UndeleteBucketRequest; - /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoredResourceMetadata instance - */ - public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + /** + * Verifies an UndeleteBucketRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an UndeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeleteBucketRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UndeleteBucketRequest; - /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an UndeleteBucketRequest message. Also converts values to other types if specified. + * @param message UndeleteBucketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UndeleteBucketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoredResourceMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; + /** + * Converts this UndeleteBucketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoredResourceMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; + /** Properties of a ListViewsRequest. */ + interface IListViewsRequest { - /** - * Verifies a MonitoredResourceMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListViewsRequest parent */ + parent?: (string|null); - /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoredResourceMetadata - */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + /** ListViewsRequest pageToken */ + pageToken?: (string|null); - /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @param message MonitoredResourceMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListViewsRequest pageSize */ + pageSize?: (number|null); + } - /** - * Converts this MonitoredResourceMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a ListViewsRequest. */ + class ListViewsRequest implements IListViewsRequest { - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { + /** + * Constructs a new ListViewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListViewsRequest); - /** LabelDescriptor key */ - key?: (string|null); + /** ListViewsRequest parent. */ + public parent: string; - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); + /** ListViewsRequest pageToken. */ + public pageToken: string; - /** LabelDescriptor description */ - description?: (string|null); - } + /** ListViewsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsRequest instance + */ + public static create(properties?: google.logging.v2.IListViewsRequest): google.logging.v2.ListViewsRequest; - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new LabelDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ILabelDescriptor); + /** + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** LabelDescriptor key. */ - public key: string; + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListViewsRequest; - /** LabelDescriptor valueType. */ - public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListViewsRequest; - /** LabelDescriptor description. */ - public description: string; + /** + * Verifies a ListViewsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new LabelDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns LabelDescriptor instance - */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListViewsRequest; - /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @param message ListViewsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ListViewsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a LabelDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; + /** Properties of a ListViewsResponse. */ + interface IListViewsResponse { - /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; + /** ListViewsResponse views */ + views?: (google.logging.v2.ILogView[]|null); - /** - * Verifies a LabelDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListViewsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LabelDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + /** Represents a ListViewsResponse. */ + class ListViewsResponse implements IListViewsResponse { - /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ListViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListViewsResponse); - /** - * Converts this LabelDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListViewsResponse views. */ + public views: google.logging.v2.ILogView[]; - namespace LabelDescriptor { + /** ListViewsResponse nextPageToken. */ + public nextPageToken: string; - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsResponse instance + */ + public static create(properties?: google.logging.v2.IListViewsResponse): google.logging.v2.ListViewsResponse; - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceDescriptor type */ - type?: (string|null); + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListViewsResponse; - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListViewsResponse; - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** + * Verifies a ListViewsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListViewsResponse; - /** ResourceDescriptor plural */ - plural?: (string|null); + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @param message ListViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ResourceDescriptor singular */ - singular?: (string|null); + /** + * Converts this ListViewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } + /** Properties of a CreateViewRequest. */ + interface ICreateViewRequest { - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** CreateViewRequest parent */ + parent?: (string|null); + + /** CreateViewRequest viewId */ + viewId?: (string|null); - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); + /** CreateViewRequest view */ + view?: (google.logging.v2.ILogView|null); + } - /** ResourceDescriptor type. */ - public type: string; + /** Represents a CreateViewRequest. */ + class CreateViewRequest implements ICreateViewRequest { - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** + * Constructs a new CreateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateViewRequest); - /** ResourceDescriptor nameField. */ - public nameField: string; + /** CreateViewRequest parent. */ + public parent: string; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** CreateViewRequest viewId. */ + public viewId: string; - /** ResourceDescriptor plural. */ - public plural: string; + /** CreateViewRequest view. */ + public view?: (google.logging.v2.ILogView|null); - /** ResourceDescriptor singular. */ - public singular: string; + /** + * Creates a new CreateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateViewRequest instance + */ + public static create(properties?: google.logging.v2.ICreateViewRequest): google.logging.v2.CreateViewRequest; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + /** + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a CreateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateViewRequest; - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateViewRequest; - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + /** + * Verifies a CreateViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + /** + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateViewRequest; - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @param message CreateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + /** + * Converts this CreateViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of an UpdateViewRequest. */ + interface IUpdateViewRequest { - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** UpdateViewRequest name */ + name?: (string|null); - namespace ResourceDescriptor { + /** UpdateViewRequest view */ + view?: (google.logging.v2.ILogView|null); - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 + /** UpdateViewRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** Represents an UpdateViewRequest. */ + class UpdateViewRequest implements IUpdateViewRequest { - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** + * Constructs a new UpdateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateViewRequest); - /** ResourceReference type */ - type?: (string|null); + /** UpdateViewRequest name. */ + public name: string; - /** ResourceReference childType */ - childType?: (string|null); - } + /** UpdateViewRequest view. */ + public view?: (google.logging.v2.ILogView|null); - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** UpdateViewRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** + * Creates a new UpdateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateViewRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateViewRequest): google.logging.v2.UpdateViewRequest; - /** ResourceReference type. */ - public type: string; + /** + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. + * @param message UpdateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceReference childType. */ - public childType: string; + /** + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. + * @param message UpdateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateViewRequest; - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateViewRequest; - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an UpdateViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + /** + * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateViewRequest; - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + /** + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * @param message UpdateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this UpdateViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + /** Properties of a GetViewRequest. */ + interface IGetViewRequest { - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GetViewRequest name */ + name?: (string|null); + } - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a GetViewRequest. */ + class GetViewRequest implements IGetViewRequest { - /** Properties of a Http. */ - interface IHttp { + /** + * Constructs a new GetViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetViewRequest); - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** GetViewRequest name. */ + public name: string; - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** + * Creates a new GetViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetViewRequest instance + */ + public static create(properties?: google.logging.v2.IGetViewRequest): google.logging.v2.GetViewRequest; - /** Represents a Http. */ - class Http implements IHttp { + /** + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. + * @param message GetViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** + * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. + * @param message GetViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** + * Decodes a GetViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetViewRequest; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetViewRequest; - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; + /** + * Verifies a GetViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetViewRequest; - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. + * @param message GetViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + /** + * Converts this GetViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + /** Properties of a DeleteViewRequest. */ + interface IDeleteViewRequest { - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DeleteViewRequest name */ + name?: (string|null); + } - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + /** Represents a DeleteViewRequest. */ + class DeleteViewRequest implements IDeleteViewRequest { - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new DeleteViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteViewRequest); - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** DeleteViewRequest name. */ + public name: string; - /** Properties of a HttpRule. */ - interface IHttpRule { + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteViewRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteViewRequest): google.logging.v2.DeleteViewRequest; - /** HttpRule selector */ - selector?: (string|null); + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule get */ - get?: (string|null); + /** + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule put */ - put?: (string|null); + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteViewRequest; - /** HttpRule post */ - post?: (string|null); + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteViewRequest; - /** HttpRule delete */ - "delete"?: (string|null); + /** + * Verifies a DeleteViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** HttpRule patch */ - patch?: (string|null); + /** + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteViewRequest; - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @param message DeleteViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HttpRule body */ - body?: (string|null); + /** + * Converts this DeleteViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** HttpRule responseBody */ - responseBody?: (string|null); + /** Properties of a ListSinksRequest. */ + interface IListSinksRequest { - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } + /** ListSinksRequest parent */ + parent?: (string|null); - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** ListSinksRequest pageToken */ + pageToken?: (string|null); - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); + /** ListSinksRequest pageSize */ + pageSize?: (number|null); + } - /** HttpRule selector. */ - public selector: string; + /** Represents a ListSinksRequest. */ + class ListSinksRequest implements IListSinksRequest { - /** HttpRule get. */ - public get?: (string|null); + /** + * Constructs a new ListSinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListSinksRequest); - /** HttpRule put. */ - public put?: (string|null); + /** ListSinksRequest parent. */ + public parent: string; - /** HttpRule post. */ - public post?: (string|null); + /** ListSinksRequest pageToken. */ + public pageToken: string; - /** HttpRule delete. */ - public delete?: (string|null); + /** ListSinksRequest pageSize. */ + public pageSize: number; - /** HttpRule patch. */ - public patch?: (string|null); + /** + * Creates a new ListSinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSinksRequest instance + */ + public static create(properties?: google.logging.v2.IListSinksRequest): google.logging.v2.ListSinksRequest; - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule body. */ - public body: string; + /** + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @param message ListSinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListSinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule responseBody. */ - public responseBody: string; + /** + * Decodes a ListSinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksRequest; - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksRequest; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** + * Verifies a ListSinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + /** + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksRequest; - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @param message ListSinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListSinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ListSinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + /** Properties of a ListSinksResponse. */ + interface IListSinksResponse { - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + /** ListSinksResponse sinks */ + sinks?: (google.logging.v2.ILogSink[]|null); - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListSinksResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + /** Represents a ListSinksResponse. */ + class ListSinksResponse implements IListSinksResponse { - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ListSinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListSinksResponse); - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListSinksResponse sinks. */ + public sinks: google.logging.v2.ILogSink[]; - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** ListSinksResponse nextPageToken. */ + public nextPageToken: string; - /** CustomHttpPattern kind */ - kind?: (string|null); + /** + * Creates a new ListSinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSinksResponse instance + */ + public static create(properties?: google.logging.v2.IListSinksResponse): google.logging.v2.ListSinksResponse; - /** CustomHttpPattern path */ - path?: (string|null); - } + /** + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @param message ListSinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListSinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); + /** + * Decodes a ListSinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListSinksResponse; - /** CustomHttpPattern kind. */ - public kind: string; + /** + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListSinksResponse; - /** CustomHttpPattern path. */ - public path: string; + /** + * Verifies a ListSinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + /** + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListSinksResponse; - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @param message ListSinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListSinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ListSinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + /** Properties of a GetSinkRequest. */ + interface IGetSinkRequest { - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + /** GetSinkRequest sinkName */ + sinkName?: (string|null); + } - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a GetSinkRequest. */ + class GetSinkRequest implements IGetSinkRequest { - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + /** + * Constructs a new GetSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetSinkRequest); - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GetSinkRequest sinkName. */ + public sinkName: string; - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new GetSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSinkRequest instance + */ + public static create(properties?: google.logging.v2.IGetSinkRequest): google.logging.v2.GetSinkRequest; - /** Properties of a Distribution. */ - interface IDistribution { + /** + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Distribution count */ - count?: (number|Long|string|null); + /** + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @param message GetSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Distribution mean */ - mean?: (number|null); + /** + * Decodes a GetSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSinkRequest; - /** Distribution sumOfSquaredDeviation */ - sumOfSquaredDeviation?: (number|null); + /** + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSinkRequest; - /** Distribution range */ - range?: (google.api.Distribution.IRange|null); + /** + * Verifies a GetSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Distribution bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSinkRequest; - /** Distribution bucketCounts */ - bucketCounts?: ((number|Long|string)[]|null); + /** + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @param message GetSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Distribution exemplars */ - exemplars?: (google.api.Distribution.IExemplar[]|null); - } + /** + * Converts this GetSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a Distribution. */ - class Distribution implements IDistribution { + /** Properties of a CreateSinkRequest. */ + interface ICreateSinkRequest { + + /** CreateSinkRequest parent */ + parent?: (string|null); - /** - * Constructs a new Distribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDistribution); + /** CreateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); - /** Distribution count. */ - public count: (number|Long|string); + /** CreateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); + } - /** Distribution mean. */ - public mean: number; + /** Represents a CreateSinkRequest. */ + class CreateSinkRequest implements ICreateSinkRequest { - /** Distribution sumOfSquaredDeviation. */ - public sumOfSquaredDeviation: number; + /** + * Constructs a new CreateSinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateSinkRequest); - /** Distribution range. */ - public range?: (google.api.Distribution.IRange|null); + /** CreateSinkRequest parent. */ + public parent: string; - /** Distribution bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** CreateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); - /** Distribution bucketCounts. */ - public bucketCounts: (number|Long|string)[]; + /** CreateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; - /** Distribution exemplars. */ - public exemplars: google.api.Distribution.IExemplar[]; + /** + * Creates a new CreateSinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSinkRequest instance + */ + public static create(properties?: google.logging.v2.ICreateSinkRequest): google.logging.v2.CreateSinkRequest; - /** - * Creates a new Distribution instance using the specified properties. - * @param [properties] Properties to set - * @returns Distribution instance - */ - public static create(properties?: google.api.IDistribution): google.api.Distribution; + /** + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @param message CreateSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateSinkRequest; - /** - * Decodes a Distribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Distribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateSinkRequest; - /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Distribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; + /** + * Verifies a CreateSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a Distribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateSinkRequest; - /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Distribution - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution; + /** + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @param message CreateSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @param message Distribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this CreateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this Distribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an UpdateSinkRequest. */ + interface IUpdateSinkRequest { - namespace Distribution { + /** UpdateSinkRequest sinkName */ + sinkName?: (string|null); - /** Properties of a Range. */ - interface IRange { + /** UpdateSinkRequest sink */ + sink?: (google.logging.v2.ILogSink|null); - /** Range min */ - min?: (number|null); + /** UpdateSinkRequest uniqueWriterIdentity */ + uniqueWriterIdentity?: (boolean|null); - /** Range max */ - max?: (number|null); + /** UpdateSinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a Range. */ - class Range implements IRange { + /** Represents an UpdateSinkRequest. */ + class UpdateSinkRequest implements IUpdateSinkRequest { /** - * Constructs a new Range. + * Constructs a new UpdateSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IRange); + constructor(properties?: google.logging.v2.IUpdateSinkRequest); - /** Range min. */ - public min: number; + /** UpdateSinkRequest sinkName. */ + public sinkName: string; - /** Range max. */ - public max: number; + /** UpdateSinkRequest sink. */ + public sink?: (google.logging.v2.ILogSink|null); + + /** UpdateSinkRequest uniqueWriterIdentity. */ + public uniqueWriterIdentity: boolean; + + /** UpdateSinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Range instance using the specified properties. + * Creates a new UpdateSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Range instance + * @returns UpdateSinkRequest instance */ - public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + public static create(properties?: google.logging.v2.IUpdateSinkRequest): google.logging.v2.UpdateSinkRequest; /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @param message UpdateSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IUpdateSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Range message from the specified reader or buffer. + * Decodes an UpdateSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Range + * @returns UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSinkRequest; /** - * Decodes a Range message from the specified reader or buffer, length delimited. + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Range + * @returns UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSinkRequest; /** - * Verifies a Range message. + * Verifies an UpdateSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Range + * @returns UpdateSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSinkRequest; /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @param message Range + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @param message UpdateSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.UpdateSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Range to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BucketOptions. */ - interface IBucketOptions { - - /** BucketOptions linearBuckets */ - linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + * Converts this UpdateSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** BucketOptions exponentialBuckets */ - exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** Properties of a DeleteSinkRequest. */ + interface IDeleteSinkRequest { - /** BucketOptions explicitBuckets */ - explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** DeleteSinkRequest sinkName */ + sinkName?: (string|null); } - /** Represents a BucketOptions. */ - class BucketOptions implements IBucketOptions { + /** Represents a DeleteSinkRequest. */ + class DeleteSinkRequest implements IDeleteSinkRequest { /** - * Constructs a new BucketOptions. + * Constructs a new DeleteSinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IBucketOptions); - - /** BucketOptions linearBuckets. */ - public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - - /** BucketOptions exponentialBuckets. */ - public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - - /** BucketOptions explicitBuckets. */ - public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + constructor(properties?: google.logging.v2.IDeleteSinkRequest); - /** BucketOptions options. */ - public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + /** DeleteSinkRequest sinkName. */ + public sinkName: string; /** - * Creates a new BucketOptions instance using the specified properties. + * Creates a new DeleteSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BucketOptions instance + * @returns DeleteSinkRequest instance */ - public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BucketOptions message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BucketOptions + * @returns DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BucketOptions + * @returns DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; /** - * Verifies a BucketOptions message. + * Verifies a DeleteSinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BucketOptions + * @returns DeleteSinkRequest */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @param message BucketOptions + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @param message DeleteSinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BucketOptions to JSON. + * Converts this DeleteSinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BucketOptions { - - /** Properties of a Linear. */ - interface ILinear { - - /** Linear numFiniteBuckets */ - numFiniteBuckets?: (number|null); - - /** Linear width */ - width?: (number|null); - - /** Linear offset */ - offset?: (number|null); - } - - /** Represents a Linear. */ - class Linear implements ILinear { - - /** - * Constructs a new Linear. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.ILinear); - - /** Linear numFiniteBuckets. */ - public numFiniteBuckets: number; - - /** Linear width. */ - public width: number; - - /** Linear offset. */ - public offset: number; - - /** - * Creates a new Linear instance using the specified properties. - * @param [properties] Properties to set - * @returns Linear instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; - - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a LogExclusion. */ + interface ILogExclusion { - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogExclusion name */ + name?: (string|null); - /** - * Decodes a Linear message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Linear; + /** LogExclusion description */ + description?: (string|null); - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Linear; + /** LogExclusion filter */ + filter?: (string|null); - /** - * Verifies a Linear message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LogExclusion disabled */ + disabled?: (boolean|null); - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Linear - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; + /** LogExclusion createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @param message Linear - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** LogExclusion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** - * Converts this Linear to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a LogExclusion. */ + class LogExclusion implements ILogExclusion { - /** Properties of an Exponential. */ - interface IExponential { + /** + * Constructs a new LogExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogExclusion); - /** Exponential numFiniteBuckets */ - numFiniteBuckets?: (number|null); + /** LogExclusion name. */ + public name: string; - /** Exponential growthFactor */ - growthFactor?: (number|null); + /** LogExclusion description. */ + public description: string; - /** Exponential scale */ - scale?: (number|null); - } + /** LogExclusion filter. */ + public filter: string; - /** Represents an Exponential. */ - class Exponential implements IExponential { + /** LogExclusion disabled. */ + public disabled: boolean; - /** - * Constructs a new Exponential. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + /** LogExclusion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Exponential numFiniteBuckets. */ - public numFiniteBuckets: number; + /** LogExclusion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Exponential growthFactor. */ - public growthFactor: number; + /** + * Creates a new LogExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns LogExclusion instance + */ + public static create(properties?: google.logging.v2.ILogExclusion): google.logging.v2.LogExclusion; - /** Exponential scale. */ - public scale: number; + /** + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Exponential instance using the specified properties. - * @param [properties] Properties to set - * @returns Exponential instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; + /** + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * @param message LogExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a LogExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogExclusion; - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogExclusion; - /** - * Decodes an Exponential message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Exponential; + /** + * Verifies a LogExclusion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Exponential; + /** + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogExclusion + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogExclusion; - /** - * Verifies an Exponential message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * @param message LogExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exponential - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; + /** + * Converts this LogExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @param message Exponential - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a ListExclusionsRequest. */ + interface IListExclusionsRequest { - /** - * Converts this Exponential to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListExclusionsRequest parent */ + parent?: (string|null); - /** Properties of an Explicit. */ - interface IExplicit { + /** ListExclusionsRequest pageToken */ + pageToken?: (string|null); - /** Explicit bounds */ - bounds?: (number[]|null); - } + /** ListExclusionsRequest pageSize */ + pageSize?: (number|null); + } - /** Represents an Explicit. */ - class Explicit implements IExplicit { + /** Represents a ListExclusionsRequest. */ + class ListExclusionsRequest implements IListExclusionsRequest { - /** - * Constructs a new Explicit. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + /** + * Constructs a new ListExclusionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListExclusionsRequest); - /** Explicit bounds. */ - public bounds: number[]; + /** ListExclusionsRequest parent. */ + public parent: string; - /** - * Creates a new Explicit instance using the specified properties. - * @param [properties] Properties to set - * @returns Explicit instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; + /** ListExclusionsRequest pageToken. */ + public pageToken: string; - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListExclusionsRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ListExclusionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExclusionsRequest instance + */ + public static create(properties?: google.logging.v2.IListExclusionsRequest): google.logging.v2.ListExclusionsRequest; - /** - * Decodes an Explicit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Explicit; + /** + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Explicit; + /** + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @param message ListExclusionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListExclusionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an Explicit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsRequest; - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Explicit - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsRequest; - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @param message Explicit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ListExclusionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this Explicit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExclusionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsRequest; + + /** + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @param message ListExclusionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListExclusionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an Exemplar. */ - interface IExemplar { + /** + * Converts this ListExclusionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Exemplar value */ - value?: (number|null); + /** Properties of a ListExclusionsResponse. */ + interface IListExclusionsResponse { - /** Exemplar timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); + /** ListExclusionsResponse exclusions */ + exclusions?: (google.logging.v2.ILogExclusion[]|null); - /** Exemplar attachments */ - attachments?: (google.protobuf.IAny[]|null); + /** ListExclusionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an Exemplar. */ - class Exemplar implements IExemplar { + /** Represents a ListExclusionsResponse. */ + class ListExclusionsResponse implements IListExclusionsResponse { /** - * Constructs a new Exemplar. + * Constructs a new ListExclusionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IExemplar); - - /** Exemplar value. */ - public value: number; + constructor(properties?: google.logging.v2.IListExclusionsResponse); - /** Exemplar timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** ListExclusionsResponse exclusions. */ + public exclusions: google.logging.v2.ILogExclusion[]; - /** Exemplar attachments. */ - public attachments: google.protobuf.IAny[]; + /** ListExclusionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Exemplar instance using the specified properties. + * Creates a new ListExclusionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Exemplar instance + * @returns ListExclusionsResponse instance */ - public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + public static create(properties?: google.logging.v2.IListExclusionsResponse): google.logging.v2.ListExclusionsResponse; /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @param message ListExclusionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListExclusionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Exemplar message from the specified reader or buffer. + * Decodes a ListExclusionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Exemplar + * @returns ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Exemplar; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListExclusionsResponse; /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Exemplar + * @returns ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Exemplar; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListExclusionsResponse; /** - * Verifies an Exemplar message. + * Verifies a ListExclusionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Exemplar + * @returns ListExclusionsResponse */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListExclusionsResponse; /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @param message Exemplar + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @param message ListExclusionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListExclusionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Exemplar to JSON. + * Converts this ListExclusionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Properties of a MetricDescriptor. */ - interface IMetricDescriptor { - - /** MetricDescriptor name */ - name?: (string|null); - - /** MetricDescriptor type */ - type?: (string|null); - - /** MetricDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - - /** MetricDescriptor metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); - - /** MetricDescriptor valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); - - /** MetricDescriptor unit */ - unit?: (string|null); - - /** MetricDescriptor description */ - description?: (string|null); - - /** MetricDescriptor displayName */ - displayName?: (string|null); - - /** MetricDescriptor metadata */ - metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - - /** MetricDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** MetricDescriptor monitoredResourceTypes */ - monitoredResourceTypes?: (string[]|null); - } - - /** Represents a MetricDescriptor. */ - class MetricDescriptor implements IMetricDescriptor { - - /** - * Constructs a new MetricDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMetricDescriptor); - - /** MetricDescriptor name. */ - public name: string; - - /** MetricDescriptor type. */ - public type: string; - - /** MetricDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** MetricDescriptor metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); - - /** MetricDescriptor valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); - - /** MetricDescriptor unit. */ - public unit: string; - - /** MetricDescriptor description. */ - public description: string; - - /** MetricDescriptor displayName. */ - public displayName: string; - - /** MetricDescriptor metadata. */ - public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - - /** MetricDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** MetricDescriptor monitoredResourceTypes. */ - public monitoredResourceTypes: string[]; - - /** - * Creates a new MetricDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricDescriptor instance - */ - public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; - - /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; - - /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; - - /** - * Verifies a MetricDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; - - /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. - * @param message MetricDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace MetricDescriptor { - - /** Properties of a MetricDescriptorMetadata. */ - interface IMetricDescriptorMetadata { - - /** MetricDescriptorMetadata launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** MetricDescriptorMetadata samplePeriod */ - samplePeriod?: (google.protobuf.IDuration|null); + /** Properties of a GetExclusionRequest. */ + interface IGetExclusionRequest { - /** MetricDescriptorMetadata ingestDelay */ - ingestDelay?: (google.protobuf.IDuration|null); + /** GetExclusionRequest name */ + name?: (string|null); } - /** Represents a MetricDescriptorMetadata. */ - class MetricDescriptorMetadata implements IMetricDescriptorMetadata { + /** Represents a GetExclusionRequest. */ + class GetExclusionRequest implements IGetExclusionRequest { /** - * Constructs a new MetricDescriptorMetadata. + * Constructs a new GetExclusionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - - /** MetricDescriptorMetadata launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** MetricDescriptorMetadata samplePeriod. */ - public samplePeriod?: (google.protobuf.IDuration|null); + constructor(properties?: google.logging.v2.IGetExclusionRequest); - /** MetricDescriptorMetadata ingestDelay. */ - public ingestDelay?: (google.protobuf.IDuration|null); + /** GetExclusionRequest name. */ + public name: string; /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. + * Creates a new GetExclusionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MetricDescriptorMetadata instance + * @returns GetExclusionRequest instance */ - public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; + public static create(properties?: google.logging.v2.IGetExclusionRequest): google.logging.v2.GetExclusionRequest; /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @param message GetExclusionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * Decodes a GetExclusionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetricDescriptorMetadata + * @returns GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor.MetricDescriptorMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetExclusionRequest; /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetricDescriptorMetadata + * @returns GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor.MetricDescriptorMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetExclusionRequest; /** - * Verifies a MetricDescriptorMetadata message. + * Verifies a GetExclusionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetricDescriptorMetadata + * @returns GetExclusionRequest */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetExclusionRequest; /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @param message MetricDescriptorMetadata + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @param message GetExclusionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetricDescriptorMetadata to JSON. + * Converts this GetExclusionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** MetricKind enum. */ - enum MetricKind { - METRIC_KIND_UNSPECIFIED = 0, - GAUGE = 1, - DELTA = 2, - CUMULATIVE = 3 - } - - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - BOOL = 1, - INT64 = 2, - DOUBLE = 3, - STRING = 4, - DISTRIBUTION = 5, - MONEY = 6 - } - } - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric type */ - type?: (string|null); - - /** Metric labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { - - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMetric); - - /** Metric type. */ - public type: string; - - /** Metric labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new Metric instance using the specified properties. - * @param [properties] Properties to set - * @returns Metric instance - */ - public static create(properties?: google.api.IMetric): google.api.Metric; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Metric; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Metric; - - /** - * Verifies a Metric message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metric - */ - public static fromObject(object: { [k: string]: any }): google.api.Metric; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metric to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a CreateExclusionRequest. */ + interface ICreateExclusionRequest { - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateExclusionRequest parent */ + parent?: (string|null); - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + /** CreateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); + } - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + /** Represents a CreateExclusionRequest. */ + class CreateExclusionRequest implements ICreateExclusionRequest { - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new CreateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateExclusionRequest); - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + /** CreateExclusionRequest parent. */ + public parent: string; - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CreateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new CreateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateExclusionRequest instance + */ + public static create(properties?: google.logging.v2.ICreateExclusionRequest): google.logging.v2.CreateExclusionRequest; - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { + /** + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto name */ - name?: (string|null); + /** + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @param message CreateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto package */ - "package"?: (string|null); + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateExclusionRequest; - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateExclusionRequest; - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); + /** + * Verifies a CreateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); + /** + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateExclusionRequest; - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @param message CreateExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** + * Converts this CreateExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + /** Properties of an UpdateExclusionRequest. */ + interface IUpdateExclusionRequest { - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** UpdateExclusionRequest name */ + name?: (string|null); - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** UpdateExclusionRequest exclusion */ + exclusion?: (google.logging.v2.ILogExclusion|null); - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** UpdateExclusionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** FileDescriptorProto syntax */ - syntax?: (string|null); - } + /** Represents an UpdateExclusionRequest. */ + class UpdateExclusionRequest implements IUpdateExclusionRequest { - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** + * Constructs a new UpdateExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateExclusionRequest); - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); + /** UpdateExclusionRequest name. */ + public name: string; - /** FileDescriptorProto name. */ - public name: string; + /** UpdateExclusionRequest exclusion. */ + public exclusion?: (google.logging.v2.ILogExclusion|null); - /** FileDescriptorProto package. */ - public package: string; + /** UpdateExclusionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** FileDescriptorProto dependency. */ - public dependency: string[]; + /** + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateExclusionRequest): google.logging.v2.UpdateExclusionRequest; - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; + /** + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; + /** + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @param message UpdateExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateExclusionRequest; - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateExclusionRequest; - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** + * Verifies an UpdateExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateExclusionRequest; - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @param message UpdateExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** + * Converts this UpdateExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileDescriptorProto syntax. */ - public syntax: string; + /** Properties of a DeleteExclusionRequest. */ + interface IDeleteExclusionRequest { - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + /** DeleteExclusionRequest name */ + name?: (string|null); + } - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a DeleteExclusionRequest. */ + class DeleteExclusionRequest implements IDeleteExclusionRequest { + + /** + * Constructs a new DeleteExclusionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteExclusionRequest); + + /** DeleteExclusionRequest name. */ + public name: string; - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteExclusionRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteExclusionRequest): google.logging.v2.DeleteExclusionRequest; - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + /** + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + /** + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @param message DeleteExclusionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteExclusionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteExclusionRequest; - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteExclusionRequest; - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a DeleteExclusionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteExclusionRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteExclusionRequest; - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @param message DeleteExclusionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteExclusionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DescriptorProto name */ - name?: (string|null); + /** + * Converts this DeleteExclusionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** Properties of a GetCmekSettingsRequest. */ + interface IGetCmekSettingsRequest { - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** GetCmekSettingsRequest name */ + name?: (string|null); + } - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** Represents a GetCmekSettingsRequest. */ + class GetCmekSettingsRequest implements IGetCmekSettingsRequest { - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** + * Constructs a new GetCmekSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetCmekSettingsRequest); - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** GetCmekSettingsRequest name. */ + public name: string; - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** + * Creates a new GetCmekSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCmekSettingsRequest instance + */ + public static create(properties?: google.logging.v2.IGetCmekSettingsRequest): google.logging.v2.GetCmekSettingsRequest; - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** + * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @param message GetCmekSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** + * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @param message GetCmekSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetCmekSettingsRequest; - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetCmekSettingsRequest; - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); + /** + * Verifies a GetCmekSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** DescriptorProto name. */ - public name: string; + /** + * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCmekSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetCmekSettingsRequest; - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; + /** + * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * @param message GetCmekSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** + * Converts this GetCmekSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; + /** Properties of an UpdateCmekSettingsRequest. */ + interface IUpdateCmekSettingsRequest { - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** UpdateCmekSettingsRequest name */ + name?: (string|null); - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** UpdateCmekSettingsRequest cmekSettings */ + cmekSettings?: (google.logging.v2.ICmekSettings|null); - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** UpdateCmekSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** Represents an UpdateCmekSettingsRequest. */ + class UpdateCmekSettingsRequest implements IUpdateCmekSettingsRequest { - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** + * Constructs a new UpdateCmekSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateCmekSettingsRequest); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** UpdateCmekSettingsRequest name. */ + public name: string; - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + /** UpdateCmekSettingsRequest cmekSettings. */ + public cmekSettings?: (google.logging.v2.ICmekSettings|null); - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateCmekSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new UpdateCmekSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCmekSettingsRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateCmekSettingsRequest): google.logging.v2.UpdateCmekSettingsRequest; - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + /** + * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @param message UpdateCmekSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + /** + * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @param message UpdateCmekSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateCmekSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateCmekSettingsRequest; - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateCmekSettingsRequest; - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an UpdateCmekSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCmekSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateCmekSettingsRequest; - namespace DescriptorProto { + /** + * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateCmekSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateCmekSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** + * Converts this UpdateCmekSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ExtensionRange start */ - start?: (number|null); + /** Properties of a CmekSettings. */ + interface ICmekSettings { - /** ExtensionRange end */ - end?: (number|null); + /** CmekSettings name */ + name?: (string|null); - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); + /** CmekSettings kmsKeyName */ + kmsKeyName?: (string|null); + + /** CmekSettings serviceAccountId */ + serviceAccountId?: (string|null); } - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** Represents a CmekSettings. */ + class CmekSettings implements ICmekSettings { /** - * Constructs a new ExtensionRange. + * Constructs a new CmekSettings. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + constructor(properties?: google.logging.v2.ICmekSettings); - /** ExtensionRange start. */ - public start: number; + /** CmekSettings name. */ + public name: string; - /** ExtensionRange end. */ - public end: number; + /** CmekSettings kmsKeyName. */ + public kmsKeyName: string; - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** CmekSettings serviceAccountId. */ + public serviceAccountId: string; /** - * Creates a new ExtensionRange instance using the specified properties. + * Creates a new CmekSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRange instance + * @returns CmekSettings instance */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + public static create(properties?: google.logging.v2.ICmekSettings): google.logging.v2.CmekSettings; /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode + * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @param message CmekSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode + * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @param message CmekSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICmekSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRange message from the specified reader or buffer. + * Decodes a CmekSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExtensionRange + * @returns CmekSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CmekSettings; /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * Decodes a CmekSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRange + * @returns CmekSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CmekSettings; /** - * Verifies an ExtensionRange message. + * Verifies a CmekSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRange + * @returns CmekSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CmekSettings; /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange + * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * @param message CmekSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CmekSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRange to JSON. + * Converts this CmekSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** Represents a MetricsServiceV2 */ + class MetricsServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set + * Constructs a new MetricsServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** ReservedRange start. */ - public start: number; + /** + * Creates new MetricsServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetricsServiceV2; - /** ReservedRange end. */ - public end: number; + /** + * Calls ListLogMetrics. + * @param request ListLogMetricsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogMetricsResponse + */ + public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest, callback: google.logging.v2.MetricsServiceV2.ListLogMetricsCallback): void; /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance + * Calls ListLogMetrics. + * @param request ListLogMetricsRequest message or plain object + * @returns Promise */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest): Promise; /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetLogMetric. + * @param request GetLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public getLogMetric(request: google.logging.v2.IGetLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.GetLogMetricCallback): void; /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetLogMetric. + * @param request GetLogMetricRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public getLogMetric(request: google.logging.v2.IGetLogMetricRequest): Promise; /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateLogMetric. + * @param request CreateLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.CreateLogMetricCallback): void; /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateLogMetric. + * @param request CreateLogMetricRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest): Promise; /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateLogMetric. + * @param request UpdateLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public static verify(message: { [k: string]: any }): (string|null); + public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback): void; /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange + * Calls UpdateLogMetric. + * @param request UpdateLogMetricRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest): Promise; /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteLogMetric. + * @param request DeleteLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback): void; /** - * Converts this ReservedRange to JSON. - * @returns JSON object + * Calls DeleteLogMetric. + * @param request DeleteLogMetricRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest): Promise; } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; + namespace MetricsServiceV2 { - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * @param error Error, if any + * @param [response] ListLogMetricsResponse + */ + type ListLogMetricsCallback = (error: (Error|null), response?: google.logging.v2.ListLogMetricsResponse) => void; - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type GetLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type CreateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type UpdateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteLogMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + /** Properties of a LogMetric. */ + interface ILogMetric { - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogMetric name */ + name?: (string|null); - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogMetric description */ + description?: (string|null); - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + /** LogMetric filter */ + filter?: (string|null); - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + /** LogMetric metricDescriptor */ + metricDescriptor?: (google.api.IMetricDescriptor|null); - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LogMetric valueExtractor */ + valueExtractor?: (string|null); - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + /** LogMetric labelExtractors */ + labelExtractors?: ({ [k: string]: string }|null); - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** LogMetric bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** LogMetric createTime */ + createTime?: (google.protobuf.ITimestamp|null); - namespace FieldDescriptorProto { + /** LogMetric updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 + /** LogMetric version */ + version?: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion|null); } - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } + /** Represents a LogMetric. */ + class LogMetric implements ILogMetric { - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { + /** + * Constructs a new LogMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILogMetric); - /** OneofDescriptorProto name */ - name?: (string|null); + /** LogMetric name. */ + public name: string; - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } + /** LogMetric description. */ + public description: string; - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** LogMetric filter. */ + public filter: string; - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); + /** LogMetric metricDescriptor. */ + public metricDescriptor?: (google.api.IMetricDescriptor|null); - /** OneofDescriptorProto name. */ - public name: string; + /** LogMetric valueExtractor. */ + public valueExtractor: string; - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** LogMetric labelExtractors. */ + public labelExtractors: { [k: string]: string }; - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + /** LogMetric bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogMetric createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** LogMetric updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + /** LogMetric version. */ + public version: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion); - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + /** + * Creates a new LogMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns LogMetric instance + */ + public static create(properties?: google.logging.v2.ILogMetric): google.logging.v2.LogMetric; - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @param message LogMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + /** + * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @param message LogMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a LogMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogMetric; - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogMetric; - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { + /** + * Verifies a LogMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** EnumDescriptorProto name */ - name?: (string|null); + /** + * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogMetric + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogMetric; - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** + * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * @param message LogMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LogMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** + * Converts this LogMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + namespace LogMetric { - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** ApiVersion enum. */ + enum ApiVersion { + V2 = 0, + V1 = 1 + } + } - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Properties of a ListLogMetricsRequest. */ + interface IListLogMetricsRequest { - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); + /** ListLogMetricsRequest parent */ + parent?: (string|null); - /** EnumDescriptorProto name. */ - public name: string; + /** ListLogMetricsRequest pageToken */ + pageToken?: (string|null); - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + /** ListLogMetricsRequest pageSize */ + pageSize?: (number|null); + } - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** Represents a ListLogMetricsRequest. */ + class ListLogMetricsRequest implements IListLogMetricsRequest { - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** + * Constructs a new ListLogMetricsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogMetricsRequest); - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** ListLogMetricsRequest parent. */ + public parent: string; - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + /** ListLogMetricsRequest pageToken. */ + public pageToken: string; - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListLogMetricsRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ListLogMetricsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogMetricsRequest instance + */ + public static create(properties?: google.logging.v2.IListLogMetricsRequest): google.logging.v2.ListLogMetricsRequest; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + /** + * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @param message ListLogMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + /** + * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @param message ListLogMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsRequest; - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsRequest; - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ListLogMetricsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogMetricsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsRequest; - namespace EnumDescriptorProto { + /** + * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * @param message ListLogMetricsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** + * Converts this ListLogMetricsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** EnumReservedRange start */ - start?: (number|null); + /** Properties of a ListLogMetricsResponse. */ + interface IListLogMetricsResponse { - /** EnumReservedRange end */ - end?: (number|null); + /** ListLogMetricsResponse metrics */ + metrics?: (google.logging.v2.ILogMetric[]|null); + + /** ListLogMetricsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** Represents a ListLogMetricsResponse. */ + class ListLogMetricsResponse implements IListLogMetricsResponse { /** - * Constructs a new EnumReservedRange. + * Constructs a new ListLogMetricsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + constructor(properties?: google.logging.v2.IListLogMetricsResponse); - /** EnumReservedRange start. */ - public start: number; + /** ListLogMetricsResponse metrics. */ + public metrics: google.logging.v2.ILogMetric[]; - /** EnumReservedRange end. */ - public end: number; + /** ListLogMetricsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new EnumReservedRange instance using the specified properties. + * Creates a new ListLogMetricsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns EnumReservedRange instance + * @returns ListLogMetricsResponse instance */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static create(properties?: google.logging.v2.IListLogMetricsResponse): google.logging.v2.ListLogMetricsResponse; /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode + * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @param message ListLogMetricsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode + * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @param message ListLogMetricsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * Decodes a ListLogMetricsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumReservedRange + * @returns ListLogMetricsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsResponse; /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumReservedRange + * @returns ListLogMetricsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsResponse; /** - * Verifies an EnumReservedRange message. + * Verifies a ListLogMetricsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumReservedRange + * @returns ListLogMetricsResponse */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsResponse; /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange + * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * @param message ListLogMetricsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumReservedRange to JSON. + * Converts this ListLogMetricsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** Properties of a GetLogMetricRequest. */ + interface IGetLogMetricRequest { - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** GetLogMetricRequest metricName */ + metricName?: (string|null); + } - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** Represents a GetLogMetricRequest. */ + class GetLogMetricRequest implements IGetLogMetricRequest { - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** + * Constructs a new GetLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetLogMetricRequest); - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } + /** GetLogMetricRequest metricName. */ + public metricName: string; - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** + * Creates a new GetLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IGetLogMetricRequest): google.logging.v2.GetLogMetricRequest; - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + /** + * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @param message GetLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MethodDescriptorProto name. */ - public name: string; + /** + * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @param message GetLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetLogMetricRequest; - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetLogMetricRequest; - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** + * Verifies a GetLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** + * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetLogMetricRequest; - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** + * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * @param message GetLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + /** + * Converts this GetLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a CreateLogMetricRequest. */ + interface ICreateLogMetricRequest { - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateLogMetricRequest parent */ + parent?: (string|null); - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + /** CreateLogMetricRequest metric */ + metric?: (google.logging.v2.ILogMetric|null); + } - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + /** Represents a CreateLogMetricRequest. */ + class CreateLogMetricRequest implements ICreateLogMetricRequest { - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new CreateLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateLogMetricRequest); - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + /** CreateLogMetricRequest parent. */ + public parent: string; - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CreateLogMetricRequest metric. */ + public metric?: (google.logging.v2.ILogMetric|null); - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new CreateLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.ICreateLogMetricRequest): google.logging.v2.CreateLogMetricRequest; - /** Properties of a FileOptions. */ - interface IFileOptions { + /** + * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @param message CreateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions javaPackage */ - javaPackage?: (string|null); + /** + * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @param message CreateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateLogMetricRequest; - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateLogMetricRequest; - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); + /** + * Verifies a CreateLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** + * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateLogMetricRequest; - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + /** + * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. + * @param message CreateLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions goPackage */ - goPackage?: (string|null); + /** + * Converts this CreateLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** Properties of an UpdateLogMetricRequest. */ + interface IUpdateLogMetricRequest { - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** UpdateLogMetricRequest metricName */ + metricName?: (string|null); - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** UpdateLogMetricRequest metric */ + metric?: (google.logging.v2.ILogMetric|null); + } - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); + /** Represents an UpdateLogMetricRequest. */ + class UpdateLogMetricRequest implements IUpdateLogMetricRequest { - /** FileOptions deprecated */ - deprecated?: (boolean|null); + /** + * Constructs a new UpdateLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateLogMetricRequest); - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** UpdateLogMetricRequest metricName. */ + public metricName: string; - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** UpdateLogMetricRequest metric. */ + public metric?: (google.logging.v2.ILogMetric|null); - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** + * Creates a new UpdateLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateLogMetricRequest): google.logging.v2.UpdateLogMetricRequest; - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); + /** + * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @param message UpdateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); + /** + * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @param message UpdateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateLogMetricRequest; - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateLogMetricRequest; - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); + /** + * Verifies an UpdateLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateLogMetricRequest; - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } + /** + * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. + * @param message UpdateLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { + /** + * Converts this UpdateLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** Properties of a DeleteLogMetricRequest. */ + interface IDeleteLogMetricRequest { - /** FileOptions javaPackage. */ - public javaPackage: string; + /** DeleteLogMetricRequest metricName */ + metricName?: (string|null); + } - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** Represents a DeleteLogMetricRequest. */ + class DeleteLogMetricRequest implements IDeleteLogMetricRequest { - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** + * Constructs a new DeleteLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteLogMetricRequest); - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** DeleteLogMetricRequest metricName. */ + public metricName: string; - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** + * Creates a new DeleteLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteLogMetricRequest): google.logging.v2.DeleteLogMetricRequest; - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** + * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @param message DeleteLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions goPackage. */ - public goPackage: string; + /** + * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @param message DeleteLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogMetricRequest; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogMetricRequest; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** + * Verifies a DeleteLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; + /** + * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogMetricRequest; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. + * @param message DeleteLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * Converts this DeleteLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** Namespace api. */ + namespace api { - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** Properties of a Http. */ + interface IHttp { - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** Represents a Http. */ + class Http implements IHttp { - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns FileOptions instance + * @returns Http instance */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileOptions + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileOptions + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a FileOptions message. + * Verifies a Http message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileOptions + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileOptions to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace FileOptions { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } + /** HttpRule selector */ + selector?: (string|null); - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** HttpRule get */ + get?: (string|null); - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** HttpRule put */ + put?: (string|null); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** HttpRule post */ + post?: (string|null); - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** HttpRule delete */ + "delete"?: (string|null); - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** HttpRule patch */ + patch?: (string|null); - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); } - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Constructs a new MessageOptions. + * Constructs a new HttpRule. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMessageOptions); + constructor(properties?: google.api.IHttpRule); - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** HttpRule selector. */ + public selector: string; - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** HttpRule get. */ + public get?: (string|null); - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** HttpRule put. */ + public put?: (string|null); - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** HttpRule post. */ + public post?: (string|null); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @param [properties] Properties to set - * @returns MessageOptions instance + * @returns HttpRule instance */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MessageOptions + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageOptions + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; /** - * Verifies a MessageOptions message. + * Verifies a HttpRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageOptions + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageOptions to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new FieldOptions. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; + constructor(properties?: google.api.ICustomHttpPattern); - /** FieldOptions weak. */ - public weak: boolean; + /** CustomHttpPattern kind. */ + public kind: string; - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new FieldOptions instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns FieldOptions instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldOptions + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldOptions + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a FieldOptions message. + * Verifies a CustomHttpPattern message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldOptions + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldOptions to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace FieldOptions { + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6 + } - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } + /** MonitoredResourceDescriptor name */ + name?: (string|null); - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** MonitoredResourceDescriptor type */ + type?: (string|null); - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); + + /** MonitoredResourceDescriptor description */ + description?: (string|null); + + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MonitoredResourceDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { /** - * Constructs a new OneofOptions. + * Constructs a new MonitoredResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofOptions); + constructor(properties?: google.api.IMonitoredResourceDescriptor); - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** MonitoredResourceDescriptor name. */ + public name: string; + + /** MonitoredResourceDescriptor type. */ + public type: string; + + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; + + /** MonitoredResourceDescriptor description. */ + public description: string; + + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MonitoredResourceDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns OneofOptions instance + * @returns MonitoredResourceDescriptor instance */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OneofOptions + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofOptions + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; /** - * Verifies an OneofOptions message. + * Verifies a MonitoredResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofOptions + * @returns MonitoredResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofOptions to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** MonitoredResource type */ + type?: (string|null); - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { /** - * Constructs a new EnumOptions. + * Constructs a new MonitoredResource. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + constructor(properties?: google.api.IMonitoredResource); - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** MonitoredResource type. */ + public type: string; - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @param [properties] Properties to set - * @returns EnumOptions instance + * @returns MonitoredResource instance */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumOptions + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumOptions + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; /** - * Verifies an EnumOptions message. + * Verifies a MonitoredResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumOptions + * @returns MonitoredResource */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumOptions to JSON. + * Converts this MonitoredResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); } - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { /** - * Constructs a new EnumValueOptions. + * Constructs a new MonitoredResourceMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueOptions); + constructor(properties?: google.api.IMonitoredResourceMetadata); - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueOptions instance + * @returns MonitoredResourceMetadata instance */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumValueOptions + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueOptions + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; /** - * Verifies an EnumValueOptions message. + * Verifies a MonitoredResourceMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueOptions + * @returns MonitoredResourceMetadata */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueOptions to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** LabelDescriptor key */ + key?: (string|null); - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); + /** LabelDescriptor description */ + description?: (string|null); } - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { /** - * Constructs a new ServiceOptions. + * Constructs a new LabelDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceOptions); + constructor(properties?: google.api.ILabelDescriptor); - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** LabelDescriptor key. */ + public key: string; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** LabelDescriptor valueType. */ + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + + /** LabelDescriptor description. */ + public description: string; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceOptions instance + * @returns LabelDescriptor instance */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ServiceOptions + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceOptions + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; /** - * Verifies a ServiceOptions message. + * Verifies a LabelDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceOptions + * @returns LabelDescriptor */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceOptions to JSON. + * Converts this LabelDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MethodOptions. */ - interface IMethodOptions { + namespace LabelDescriptor { - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new MethodOptions. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodOptions); + constructor(properties?: google.api.IResourceDescriptor); - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** ResourceDescriptor type. */ + public type: string; - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** ResourceDescriptor pattern. */ + public pattern: string[]; - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns MethodOptions instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodOptions + * @returns ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodOptions + * @returns ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a MethodOptions message. + * Verifies a ResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodOptions + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodOptions to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace MethodOptions { + namespace ResourceDescriptor { - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** ResourceReference type */ + type?: (string|null); - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** ResourceReference childType */ + childType?: (string|null); } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new UninterpretedOption. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + constructor(properties?: google.api.IResourceReference); - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); + /** ResourceReference type. */ + public type: string; - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns UninterpretedOption instance + * @returns ResourceReference instance */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UninterpretedOption + * @returns ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UninterpretedOption + * @returns ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies an UninterpretedOption message. + * Verifies a ResourceReference message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** Properties of a Distribution. */ + interface IDistribution { - /** NamePart namePart. */ - public namePart: string; + /** Distribution count */ + count?: (number|Long|string|null); - /** NamePart isExtension. */ - public isExtension: boolean; + /** Distribution mean */ + mean?: (number|null); - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + /** Distribution sumOfSquaredDeviation */ + sumOfSquaredDeviation?: (number|null); - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + /** Distribution range */ + range?: (google.api.Distribution.IRange|null); - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + /** Distribution bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + /** Distribution bucketCounts */ + bucketCounts?: ((number|Long|string)[]|null); - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + /** Distribution exemplars */ + exemplars?: (google.api.Distribution.IExemplar[]|null); + } - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a Distribution. */ + class Distribution implements IDistribution { - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + /** + * Constructs a new Distribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDistribution); - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Distribution count. */ + public count: (number|Long|string); - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Distribution mean. */ + public mean: number; - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Distribution sumOfSquaredDeviation. */ + public sumOfSquaredDeviation: number; - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } + /** Distribution range. */ + public range?: (google.api.Distribution.IRange|null); - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** Distribution bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + /** Distribution bucketCounts. */ + public bucketCounts: (number|Long|string)[]; - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** Distribution exemplars. */ + public exemplars: google.api.Distribution.IExemplar[]; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new Distribution instance using the specified properties. * @param [properties] Properties to set - * @returns SourceCodeInfo instance + * @returns Distribution instance */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + public static create(properties?: google.api.IDistribution): google.api.Distribution; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a Distribution message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceCodeInfo + * @returns Distribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Distribution message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo + * @returns Distribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; /** - * Verifies a SourceCodeInfo message. + * Verifies a Distribution message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns Distribution */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.api.Distribution; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this Distribution to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); + namespace Distribution { - /** Location leadingComments */ - leadingComments?: (string|null); + /** Properties of a Range. */ + interface IRange { - /** Location trailingComments */ - trailingComments?: (string|null); + /** Range min */ + min?: (number|null); - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); + /** Range max */ + max?: (number|null); } - /** Represents a Location. */ - class Location implements ILocation { + /** Represents a Range. */ + class Range implements IRange { /** - * Constructs a new Location. + * Constructs a new Range. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; + constructor(properties?: google.api.Distribution.IRange); - /** Location trailingComments. */ - public trailingComments: string; + /** Range min. */ + public min: number; - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** Range max. */ + public max: number; /** - * Creates a new Location instance using the specified properties. + * Creates a new Range instance using the specified properties. * @param [properties] Properties to set - * @returns Location instance + * @returns Range instance */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Location message from the specified reader or buffer. + * Decodes a Range message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location + * @returns Range * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a Range message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - namespace GeneratedCodeInfo { + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; - /** Properties of an Annotation. */ - interface IAnnotation { + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Annotation path */ - path?: (number[]|null); + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** Properties of a BucketOptions. */ + interface IBucketOptions { - /** Annotation begin */ - begin?: (number|null); + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - /** Annotation end */ - end?: (number|null); + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); } - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { /** - * Constructs a new Annotation. + * Constructs a new BucketOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + constructor(properties?: google.api.Distribution.IBucketOptions); - /** Annotation path. */ - public path: number[]; + /** BucketOptions linearBuckets. */ + public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - /** Annotation sourceFile. */ - public sourceFile: string; + /** BucketOptions exponentialBuckets. */ + public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - /** Annotation begin. */ - public begin: number; + /** BucketOptions explicitBuckets. */ + public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); - /** Annotation end. */ - public end: number; + /** BucketOptions options. */ + public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); /** - * Creates a new Annotation instance using the specified properties. + * Creates a new BucketOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Annotation instance + * @returns BucketOptions instance */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a BucketOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Annotation + * @returns BucketOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Annotation + * @returns BucketOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions; /** - * Verifies an Annotation message. + * Verifies a BucketOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Annotation + * @returns BucketOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @param message BucketOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Annotation to JSON. + * Converts this BucketOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Properties of a Struct. */ - interface IStruct { - - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } - - /** Represents a Struct. */ - class Struct implements IStruct { - - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); - - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; - - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; - - /** - * Verifies a Struct message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + namespace BucketOptions { - /** Properties of a Value. */ - interface IValue { + /** Properties of a Linear. */ + interface ILinear { - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + /** Linear numFiniteBuckets */ + numFiniteBuckets?: (number|null); - /** Value numberValue */ - numberValue?: (number|null); + /** Linear width */ + width?: (number|null); - /** Value stringValue */ - stringValue?: (string|null); + /** Linear offset */ + offset?: (number|null); + } - /** Value boolValue */ - boolValue?: (boolean|null); + /** Represents a Linear. */ + class Linear implements ILinear { - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); + /** + * Constructs a new Linear. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.ILinear); - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } + /** Linear numFiniteBuckets. */ + public numFiniteBuckets: number; - /** Represents a Value. */ - class Value implements IValue { + /** Linear width. */ + public width: number; - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); + /** Linear offset. */ + public offset: number; - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + /** + * Creates a new Linear instance using the specified properties. + * @param [properties] Properties to set + * @returns Linear instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; - /** Value numberValue. */ - public numberValue?: (number|null); + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - /** Value stringValue. */ - public stringValue?: (string|null); + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - /** Value boolValue. */ - public boolValue?: (boolean|null); + /** + * Decodes a Linear message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Linear; - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Linear; - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); + /** + * Verifies a Linear message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Linear + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @param message Linear + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Linear to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an Exponential. */ + interface IExponential { - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + /** Exponential numFiniteBuckets */ + numFiniteBuckets?: (number|null); - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + /** Exponential growthFactor */ + growthFactor?: (number|null); - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Exponential scale */ + scale?: (number|null); + } - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + /** Represents an Exponential. */ + class Exponential implements IExponential { - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new Exponential. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExponential); - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Exponential numFiniteBuckets. */ + public numFiniteBuckets: number; - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } + /** Exponential growthFactor. */ + public growthFactor: number; - /** Properties of a ListValue. */ - interface IListValue { + /** Exponential scale. */ + public scale: number; - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } + /** + * Creates a new Exponential instance using the specified properties. + * @param [properties] Properties to set + * @returns Exponential instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; - /** Represents a ListValue. */ - class ListValue implements IListValue { + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListValue values. */ - public values: google.protobuf.IValue[]; + /** + * Decodes an Exponential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Exponential; - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Exponential; - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an Exponential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exponential + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @param message Exponential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + /** + * Converts this Exponential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + /** Properties of an Explicit. */ + interface IExplicit { - /** - * Verifies a ListValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Explicit bounds */ + bounds?: (number[]|null); + } - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + /** Represents an Explicit. */ + class Explicit implements IExplicit { - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new Explicit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Explicit bounds. */ + public bounds: number[]; - /** Properties of a Duration. */ - interface IDuration { + /** + * Creates a new Explicit instance using the specified properties. + * @param [properties] Properties to set + * @returns Explicit instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; - /** Duration nanos */ - nanos?: (number|null); - } + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a Duration. */ - class Duration implements IDuration { + /** + * Decodes an Explicit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Explicit; - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Explicit; - /** Duration seconds. */ - public seconds: (number|Long|string); + /** + * Verifies an Explicit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Duration nanos. */ - public nanos: number; + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Explicit + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @param message Explicit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Explicit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an Exemplar. */ + interface IExemplar { - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + /** Exemplar value */ + value?: (number|null); - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + /** Exemplar timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Exemplar attachments */ + attachments?: (google.protobuf.IAny[]|null); + } - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + /** Represents an Exemplar. */ + class Exemplar implements IExemplar { - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new Exemplar. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IExemplar); - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Exemplar value. */ + public value: number; - /** Properties of an Any. */ - interface IAny { + /** Exemplar timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); - /** Any type_url */ - type_url?: (string|null); + /** Exemplar attachments. */ + public attachments: google.protobuf.IAny[]; - /** Any value */ - value?: (Uint8Array|string|null); - } + /** + * Creates a new Exemplar instance using the specified properties. + * @param [properties] Properties to set + * @returns Exemplar instance + */ + public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an Any. */ - class Any implements IAny { + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Exemplar; - /** Any type_url. */ - public type_url: string; + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Exemplar; - /** Any value. */ - public value: (Uint8Array|string); + /** + * Verifies an Exemplar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exemplar + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @param message Exemplar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Exemplar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + /** Properties of a MetricDescriptor. */ + interface IMetricDescriptor { - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + /** MetricDescriptor name */ + name?: (string|null); - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MetricDescriptor type */ + type?: (string|null); - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + /** MetricDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MetricDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MetricDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); - /** Properties of a Timestamp. */ - interface ITimestamp { + /** MetricDescriptor unit */ + unit?: (string|null); - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** MetricDescriptor description */ + description?: (string|null); - /** Timestamp nanos */ - nanos?: (number|null); - } + /** MetricDescriptor displayName */ + displayName?: (string|null); - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** MetricDescriptor metadata */ + metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); + /** MetricDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** MetricDescriptor monitoredResourceTypes */ + monitoredResourceTypes?: (string[]|null); + } - /** Timestamp nanos. */ - public nanos: number; + /** Represents a MetricDescriptor. */ + class MetricDescriptor implements IMetricDescriptor { /** - * Creates a new Timestamp instance using the specified properties. + * Constructs a new MetricDescriptor. * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + constructor(properties?: google.api.IMetricDescriptor); - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + /** MetricDescriptor name. */ + public name: string; - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + /** MetricDescriptor type. */ + public type: string; - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + /** MetricDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MetricDescriptor metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + /** MetricDescriptor valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MetricDescriptor unit. */ + public unit: string; - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MetricDescriptor description. */ + public description: string; - /** Properties of an Empty. */ - interface IEmpty { - } + /** MetricDescriptor displayName. */ + public displayName: string; - /** Represents an Empty. */ - class Empty implements IEmpty { + /** MetricDescriptor metadata. */ + public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); + /** MetricDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** MetricDescriptor monitoredResourceTypes. */ + public monitoredResourceTypes: string[]; /** - * Creates a new Empty instance using the specified properties. + * Creates a new MetricDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns MetricDescriptor instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a MetricDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @returns MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @returns MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; /** - * Verifies an Empty message. + * Verifies a MetricDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns MetricDescriptor */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @param message MetricDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this MetricDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldMask. */ - interface IFieldMask { + namespace MetricDescriptor { - /** FieldMask paths */ - paths?: (string[]|null); + /** Properties of a MetricDescriptorMetadata. */ + interface IMetricDescriptorMetadata { + + /** MetricDescriptorMetadata launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptorMetadata samplePeriod */ + samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay */ + ingestDelay?: (google.protobuf.IDuration|null); + } + + /** Represents a MetricDescriptorMetadata. */ + class MetricDescriptorMetadata implements IMetricDescriptorMetadata { + + /** + * Constructs a new MetricDescriptorMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); + + /** MetricDescriptorMetadata launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** MetricDescriptorMetadata samplePeriod. */ + public samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay. */ + public ingestDelay?: (google.protobuf.IDuration|null); + + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptorMetadata instance + */ + public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Verifies a MetricDescriptorMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptorMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @param message MetricDescriptorMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Properties of a Metric. */ + interface IMetric { + + /** Metric type */ + type?: (string|null); + + /** Metric labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { /** - * Constructs a new FieldMask. + * Constructs a new Metric. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); + constructor(properties?: google.api.IMetric); - /** FieldMask paths. */ - public paths: string[]; + /** Metric type. */ + public type: string; + + /** Metric labels. */ + public labels: { [k: string]: string }; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Metric instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns Metric instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.api.IMetric): google.api.Metric; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a Metric message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Metric; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a Metric message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Metric; /** - * Verifies a FieldMask message. + * Verifies a Metric message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a Metric message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns Metric */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.api.Metric; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this Metric to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index d976c4990fb..4bf3360bde6 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -39,5765 +39,3400 @@ */ var google = {}; - google.logging = (function() { + google.protobuf = (function() { /** - * Namespace logging. + * Namespace protobuf. * @memberof google * @namespace */ - var logging = {}; + var protobuf = {}; - logging.v2 = (function() { + protobuf.Duration = (function() { /** - * Namespace v2. - * @memberof google.logging - * @namespace + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ - var v2 = {}; - - v2.LogEntry = (function() { - - /** - * Properties of a LogEntry. - * @memberof google.logging.v2 - * @interface ILogEntry - * @property {string|null} [logName] LogEntry logName - * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource - * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload - * @property {string|null} [textPayload] LogEntry textPayload - * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload - * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp - * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp - * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity - * @property {string|null} [insertId] LogEntry insertId - * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest - * @property {Object.|null} [labels] LogEntry labels - * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation - * @property {string|null} [trace] LogEntry trace - * @property {string|null} [spanId] LogEntry spanId - * @property {boolean|null} [traceSampled] LogEntry traceSampled - * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation - */ - - /** - * Constructs a new LogEntry. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntry. - * @implements ILogEntry - * @constructor - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set - */ - function LogEntry(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * LogEntry logName. - * @member {string} logName - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.logName = ""; + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LogEntry resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.resource = null; + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * LogEntry protoPayload. - * @member {google.protobuf.IAny|null|undefined} protoPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.protoPayload = null; + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; - /** - * LogEntry textPayload. - * @member {string|null|undefined} textPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.textPayload = null; + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; - /** - * LogEntry jsonPayload. - * @member {google.protobuf.IStruct|null|undefined} jsonPayload - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.jsonPayload = null; + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; - /** - * LogEntry timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.timestamp = null; + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * LogEntry receiveTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.receiveTimestamp = null; + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * LogEntry severity. - * @member {google.logging.type.LogSeverity} severity - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.severity = 0; + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * LogEntry insertId. - * @member {string} insertId - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.insertId = ""; + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; - /** - * LogEntry httpRequest. - * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.httpRequest = null; + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; - /** - * LogEntry labels. - * @member {Object.} labels - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.labels = $util.emptyObject; + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; - /** - * LogEntry operation. - * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.operation = null; + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LogEntry trace. - * @member {string} trace - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.trace = ""; + return Duration; + })(); - /** - * LogEntry spanId. - * @member {string} spanId - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.spanId = ""; + protobuf.FileDescriptorSet = (function() { - /** - * LogEntry traceSampled. - * @member {boolean} traceSampled - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.traceSampled = false; + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ - /** - * LogEntry sourceLocation. - * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation - * @memberof google.logging.v2.LogEntry - * @instance - */ - LogEntry.prototype.sourceLocation = null; + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; - /** - * LogEntry payload. - * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload - * @memberof google.logging.v2.LogEntry - * @instance - */ - Object.defineProperty(LogEntry.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; - /** - * Creates a new LogEntry instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogEntry - * @static - * @param {google.logging.v2.ILogEntry=} [properties] Properties to set - * @returns {google.logging.v2.LogEntry} LogEntry instance - */ - LogEntry.create = function create(properties) { - return new LogEntry(properties); - }; + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogEntry - * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protoPayload != null && Object.hasOwnProperty.call(message, "protoPayload")) - $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textPayload != null && Object.hasOwnProperty.call(message, "textPayload")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); - if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); - if (message.jsonPayload != null && Object.hasOwnProperty.call(message, "jsonPayload")) - $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.httpRequest != null && Object.hasOwnProperty.call(message, "httpRequest")) - $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.trace != null && Object.hasOwnProperty.call(message, "trace")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); - if (message.sourceLocation != null && Object.hasOwnProperty.call(message, "sourceLocation")) - $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.receiveTimestamp != null && Object.hasOwnProperty.call(message, "receiveTimestamp")) - $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) - writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); - if (message.traceSampled != null && Object.hasOwnProperty.call(message, "traceSampled")) - writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); - return writer; - }; + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogEntry - * @static - * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LogEntry message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntry} LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 12: - message.logName = reader.string(); - break; - case 8: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 2: - message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.textPayload = reader.string(); - break; - case 6: - message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 9: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 24: - message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.severity = reader.int32(); - break; - case 4: - message.insertId = reader.string(); - break; - case 7: - message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); - break; - case 11: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - case 15: - message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); - break; - case 22: - message.trace = reader.string(); - break; - case 27: - message.spanId = reader.string(); - break; - case 30: - message.traceSampled = reader.bool(); - break; - case 23: - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntry} LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a LogEntry message. - * @function verify - * @memberof google.logging.v2.LogEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - properties.payload = 1; - { - var error = $root.google.protobuf.Any.verify(message.protoPayload); - if (error) - return "protoPayload." + error; - } - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - if (!$util.isString(message.textPayload)) - return "textPayload: string expected"; - } - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - if (properties.payload === 1) - return "payload: multiple values"; - properties.payload = 1; - { - var error = $root.google.protobuf.Struct.verify(message.jsonPayload); - if (error) - return "jsonPayload." + error; - } - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); if (error) - return "timestamp." + error; + return "file." + error; } - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); - if (error) - return "receiveTimestamp." + error; + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 100: - case 200: - case 300: - case 400: - case 500: - case 600: - case 700: - case 800: - break; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - if (!$util.isString(message.insertId)) - return "insertId: string expected"; - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { - var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); - if (error) - return "httpRequest." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.operation != null && message.hasOwnProperty("operation")) { - var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); - if (error) - return "operation." + error; - } - if (message.trace != null && message.hasOwnProperty("trace")) - if (!$util.isString(message.trace)) - return "trace: string expected"; - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!$util.isString(message.spanId)) - return "spanId: string expected"; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - if (typeof message.traceSampled !== "boolean") - return "traceSampled: boolean expected"; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { - var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); - if (error) - return "sourceLocation." + error; - } - return null; - }; - - /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogEntry - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntry} LogEntry - */ - LogEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntry) - return object; - var message = new $root.google.logging.v2.LogEntry(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.protoPayload != null) { - if (typeof object.protoPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); - message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); - } - if (object.textPayload != null) - message.textPayload = String(object.textPayload); - if (object.jsonPayload != null) { - if (typeof object.jsonPayload !== "object") - throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); - message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.receiveTimestamp != null) { - if (typeof object.receiveTimestamp !== "object") - throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); - message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); - } - switch (object.severity) { - case "DEFAULT": - case 0: - message.severity = 0; - break; - case "DEBUG": - case 100: - message.severity = 100; - break; - case "INFO": - case 200: - message.severity = 200; - break; - case "NOTICE": - case 300: - message.severity = 300; - break; - case "WARNING": - case 400: - message.severity = 400; - break; - case "ERROR": - case 500: - message.severity = 500; - break; - case "CRITICAL": - case 600: - message.severity = 600; - break; - case "ALERT": - case 700: - message.severity = 700; - break; - case "EMERGENCY": - case 800: - message.severity = 800; - break; - } - if (object.insertId != null) - message.insertId = String(object.insertId); - if (object.httpRequest != null) { - if (typeof object.httpRequest !== "object") - throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); - message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.operation != null) { - if (typeof object.operation !== "object") - throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); - message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); - } - if (object.trace != null) - message.trace = String(object.trace); - if (object.spanId != null) - message.spanId = String(object.spanId); - if (object.traceSampled != null) - message.traceSampled = Boolean(object.traceSampled); - if (object.sourceLocation != null) { - if (typeof object.sourceLocation !== "object") - throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); - } - return message; - }; - - /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogEntry - * @static - * @param {google.logging.v2.LogEntry} message LogEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.insertId = ""; - object.httpRequest = null; - object.resource = null; - object.timestamp = null; - object.severity = options.enums === String ? "DEFAULT" : 0; - object.logName = ""; - object.operation = null; - object.trace = ""; - object.sourceLocation = null; - object.receiveTimestamp = null; - object.spanId = ""; - object.traceSampled = false; - } - if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { - object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); - if (options.oneofs) - object.payload = "protoPayload"; - } - if (message.textPayload != null && message.hasOwnProperty("textPayload")) { - object.textPayload = message.textPayload; - if (options.oneofs) - object.payload = "textPayload"; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - object.insertId = message.insertId; - if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { - object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); - if (options.oneofs) - object.payload = "jsonPayload"; - } - if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) - object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); - if (message.trace != null && message.hasOwnProperty("trace")) - object.trace = message.trace; - if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) - object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); - if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) - object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = message.spanId; - if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) - object.traceSampled = message.traceSampled; - return object; - }; - - /** - * Converts this LogEntry to JSON. - * @function toJSON - * @memberof google.logging.v2.LogEntry - * @instance - * @returns {Object.} JSON object - */ - LogEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LogEntry; - })(); - - v2.LogEntryOperation = (function() { - - /** - * Properties of a LogEntryOperation. - * @memberof google.logging.v2 - * @interface ILogEntryOperation - * @property {string|null} [id] LogEntryOperation id - * @property {string|null} [producer] LogEntryOperation producer - * @property {boolean|null} [first] LogEntryOperation first - * @property {boolean|null} [last] LogEntryOperation last - */ - - /** - * Constructs a new LogEntryOperation. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntryOperation. - * @implements ILogEntryOperation - * @constructor - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set - */ - function LogEntryOperation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LogEntryOperation id. - * @member {string} id - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.id = ""; - - /** - * LogEntryOperation producer. - * @member {string} producer - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.producer = ""; - - /** - * LogEntryOperation first. - * @member {boolean} first - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.first = false; - - /** - * LogEntryOperation last. - * @member {boolean} last - * @memberof google.logging.v2.LogEntryOperation - * @instance - */ - LogEntryOperation.prototype.last = false; - - /** - * Creates a new LogEntryOperation instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance - */ - LogEntryOperation.create = function create(properties) { - return new LogEntryOperation(properties); - }; - - /** - * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntryOperation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.producer != null && Object.hasOwnProperty.call(message, "producer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); - if (message.first != null && Object.hasOwnProperty.call(message, "first")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); - if (message.last != null && Object.hasOwnProperty.call(message, "last")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); - return writer; - }; - - /** - * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LogEntryOperation message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntryOperation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.producer = reader.string(); - break; - case 3: - message.first = reader.bool(); - break; - case 4: - message.last = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogEntryOperation message. - * @function verify - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogEntryOperation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.producer != null && message.hasOwnProperty("producer")) - if (!$util.isString(message.producer)) - return "producer: string expected"; - if (message.first != null && message.hasOwnProperty("first")) - if (typeof message.first !== "boolean") - return "first: boolean expected"; - if (message.last != null && message.hasOwnProperty("last")) - if (typeof message.last !== "boolean") - return "last: boolean expected"; - return null; - }; - - /** - * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation - */ - LogEntryOperation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntryOperation) - return object; - var message = new $root.google.logging.v2.LogEntryOperation(); - if (object.id != null) - message.id = String(object.id); - if (object.producer != null) - message.producer = String(object.producer); - if (object.first != null) - message.first = Boolean(object.first); - if (object.last != null) - message.last = Boolean(object.last); - return message; - }; - - /** - * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogEntryOperation - * @static - * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogEntryOperation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.producer = ""; - object.first = false; - object.last = false; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.producer != null && message.hasOwnProperty("producer")) - object.producer = message.producer; - if (message.first != null && message.hasOwnProperty("first")) - object.first = message.first; - if (message.last != null && message.hasOwnProperty("last")) - object.last = message.last; - return object; - }; - - /** - * Converts this LogEntryOperation to JSON. - * @function toJSON - * @memberof google.logging.v2.LogEntryOperation - * @instance - * @returns {Object.} JSON object - */ - LogEntryOperation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LogEntryOperation; - })(); - - v2.LogEntrySourceLocation = (function() { - - /** - * Properties of a LogEntrySourceLocation. - * @memberof google.logging.v2 - * @interface ILogEntrySourceLocation - * @property {string|null} [file] LogEntrySourceLocation file - * @property {number|Long|null} [line] LogEntrySourceLocation line - * @property {string|null} ["function"] LogEntrySourceLocation function - */ - - /** - * Constructs a new LogEntrySourceLocation. - * @memberof google.logging.v2 - * @classdesc Represents a LogEntrySourceLocation. - * @implements ILogEntrySourceLocation - * @constructor - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set - */ - function LogEntrySourceLocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LogEntrySourceLocation file. - * @member {string} file - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype.file = ""; - - /** - * LogEntrySourceLocation line. - * @member {number|Long} line - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * LogEntrySourceLocation function. - * @member {string} function - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - */ - LogEntrySourceLocation.prototype["function"] = ""; - - /** - * Creates a new LogEntrySourceLocation instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance - */ - LogEntrySourceLocation.create = function create(properties) { - return new LogEntrySourceLocation(properties); - }; - - /** - * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntrySourceLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && Object.hasOwnProperty.call(message, "file")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); - if (message.line != null && Object.hasOwnProperty.call(message, "line")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); - if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); - return writer; - }; - - /** - * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntrySourceLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file = reader.string(); - break; - case 2: - message.line = reader.int64(); - break; - case 3: - message["function"] = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogEntrySourceLocation message. - * @function verify - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogEntrySourceLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) - if (!$util.isString(message.file)) - return "file: string expected"; - if (message.line != null && message.hasOwnProperty("line")) - if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) - return "line: integer|Long expected"; - if (message["function"] != null && message.hasOwnProperty("function")) - if (!$util.isString(message["function"])) - return "function: string expected"; - return null; - }; - - /** - * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation - */ - LogEntrySourceLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) - return object; - var message = new $root.google.logging.v2.LogEntrySourceLocation(); - if (object.file != null) - message.file = String(object.file); - if (object.line != null) - if ($util.Long) - (message.line = $util.Long.fromValue(object.line)).unsigned = false; - else if (typeof object.line === "string") - message.line = parseInt(object.line, 10); - else if (typeof object.line === "number") - message.line = object.line; - else if (typeof object.line === "object") - message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); - if (object["function"] != null) - message["function"] = String(object["function"]); - return message; - }; - - /** - * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogEntrySourceLocation - * @static - * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogEntrySourceLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.file = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.line = options.longs === String ? "0" : 0; - object["function"] = ""; - } - if (message.file != null && message.hasOwnProperty("file")) - object.file = message.file; - if (message.line != null && message.hasOwnProperty("line")) - if (typeof message.line === "number") - object.line = options.longs === String ? String(message.line) : message.line; - else - object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; - if (message["function"] != null && message.hasOwnProperty("function")) - object["function"] = message["function"]; - return object; - }; - - /** - * Converts this LogEntrySourceLocation to JSON. - * @function toJSON - * @memberof google.logging.v2.LogEntrySourceLocation - * @instance - * @returns {Object.} JSON object - */ - LogEntrySourceLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LogEntrySourceLocation; - })(); - - v2.LoggingServiceV2 = (function() { - - /** - * Constructs a new LoggingServiceV2 service. - * @memberof google.logging.v2 - * @classdesc Represents a LoggingServiceV2 - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; - - /** - * Creates new LoggingServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.LoggingServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. - */ - LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef DeleteLogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { - return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteLog" }); - - /** - * Calls DeleteLog. - * @function deleteLog - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef WriteLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse - */ - - /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { - return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); - }, "name", { value: "WriteLogEntries" }); - - /** - * Calls WriteLogEntries. - * @function writeLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse - */ - - /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { - return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); - }, "name", { value: "ListLogEntries" }); - - /** - * Calls ListLogEntries. - * @function listLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListMonitoredResourceDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse - */ - - /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { - return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); - }, "name", { value: "ListMonitoredResourceDescriptors" }); - - /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef ListLogsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse - */ - - /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { - return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); - }, "name", { value: "ListLogs" }); - - /** - * Calls ListLogs. - * @function listLogs - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#tailLogEntries}. - * @memberof google.logging.v2.LoggingServiceV2 - * @typedef TailLogEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.TailLogEntriesResponse} [response] TailLogEntriesResponse - */ - - /** - * Calls TailLogEntries. - * @function tailLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.ITailLogEntriesRequest} request TailLogEntriesRequest message or plain object - * @param {google.logging.v2.LoggingServiceV2.TailLogEntriesCallback} callback Node-style callback called with the error, if any, and TailLogEntriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LoggingServiceV2.prototype.tailLogEntries = function tailLogEntries(request, callback) { - return this.rpcCall(tailLogEntries, $root.google.logging.v2.TailLogEntriesRequest, $root.google.logging.v2.TailLogEntriesResponse, request, callback); - }, "name", { value: "TailLogEntries" }); - - /** - * Calls TailLogEntries. - * @function tailLogEntries - * @memberof google.logging.v2.LoggingServiceV2 - * @instance - * @param {google.logging.v2.ITailLogEntriesRequest} request TailLogEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return LoggingServiceV2; - })(); - - v2.DeleteLogRequest = (function() { - - /** - * Properties of a DeleteLogRequest. - * @memberof google.logging.v2 - * @interface IDeleteLogRequest - * @property {string|null} [logName] DeleteLogRequest logName - */ - - /** - * Constructs a new DeleteLogRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteLogRequest. - * @implements IDeleteLogRequest - * @constructor - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set - */ - function DeleteLogRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteLogRequest logName. - * @member {string} logName - * @memberof google.logging.v2.DeleteLogRequest - * @instance - */ - DeleteLogRequest.prototype.logName = ""; - - /** - * Creates a new DeleteLogRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance - */ - DeleteLogRequest.create = function create(properties) { - return new DeleteLogRequest(properties); - }; - - /** - * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLogRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - return writer; - }; - - /** - * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteLogRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLogRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.logName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteLogRequest message. - * @function verify - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteLogRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - return null; - }; - - /** - * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest - */ - DeleteLogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteLogRequest) - return object; - var message = new $root.google.logging.v2.DeleteLogRequest(); - if (object.logName != null) - message.logName = String(object.logName); - return message; - }; - - /** - * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteLogRequest - * @static - * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteLogRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.logName = ""; - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - return object; - }; - - /** - * Converts this DeleteLogRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteLogRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteLogRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteLogRequest; - })(); - - v2.WriteLogEntriesRequest = (function() { - - /** - * Properties of a WriteLogEntriesRequest. - * @memberof google.logging.v2 - * @interface IWriteLogEntriesRequest - * @property {string|null} [logName] WriteLogEntriesRequest logName - * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource - * @property {Object.|null} [labels] WriteLogEntriesRequest labels - * @property {Array.|null} [entries] WriteLogEntriesRequest entries - * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess - * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun - */ - - /** - * Constructs a new WriteLogEntriesRequest. - * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesRequest. - * @implements IWriteLogEntriesRequest - * @constructor - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set - */ - function WriteLogEntriesRequest(properties) { - this.labels = {}; - this.entries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WriteLogEntriesRequest logName. - * @member {string} logName - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.logName = ""; - - /** - * WriteLogEntriesRequest resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.resource = null; - - /** - * WriteLogEntriesRequest labels. - * @member {Object.} labels - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.labels = $util.emptyObject; - - /** - * WriteLogEntriesRequest entries. - * @member {Array.} entries - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.entries = $util.emptyArray; - - /** - * WriteLogEntriesRequest partialSuccess. - * @member {boolean} partialSuccess - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.partialSuccess = false; - - /** - * WriteLogEntriesRequest dryRun. - * @member {boolean} dryRun - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - */ - WriteLogEntriesRequest.prototype.dryRun = false; - - /** - * Creates a new WriteLogEntriesRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance - */ - WriteLogEntriesRequest.create = function create(properties) { - return new WriteLogEntriesRequest(properties); - }; - - /** - * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); - if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); - return writer; - }; - - /** - * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.logName = reader.string(); - break; - case 2: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 3: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - case 4: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 5: - message.partialSuccess = reader.bool(); - break; - case 6: - message.dryRun = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WriteLogEntriesRequest message. - * @function verify - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WriteLogEntriesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logName != null && message.hasOwnProperty("logName")) - if (!$util.isString(message.logName)) - return "logName: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - if (typeof message.partialSuccess !== "boolean") - return "partialSuccess: boolean expected"; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; - return null; - }; - - /** - * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest - */ - WriteLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) - return object; - var message = new $root.google.logging.v2.WriteLogEntriesRequest(); - if (object.logName != null) - message.logName = String(object.logName); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); - } - } - if (object.partialSuccess != null) - message.partialSuccess = Boolean(object.partialSuccess); - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); - return message; - }; - - /** - * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.WriteLogEntriesRequest - * @static - * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WriteLogEntriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.logName = ""; - object.resource = null; - object.partialSuccess = false; - object.dryRun = false; - } - if (message.logName != null && message.hasOwnProperty("logName")) - object.logName = message.logName; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); - } - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - object.partialSuccess = message.partialSuccess; - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; - return object; - }; - - /** - * Converts this WriteLogEntriesRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesRequest - * @instance - * @returns {Object.} JSON object - */ - WriteLogEntriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WriteLogEntriesRequest; - })(); - - v2.WriteLogEntriesResponse = (function() { - - /** - * Properties of a WriteLogEntriesResponse. - * @memberof google.logging.v2 - * @interface IWriteLogEntriesResponse - */ - - /** - * Constructs a new WriteLogEntriesResponse. - * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesResponse. - * @implements IWriteLogEntriesResponse - * @constructor - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set - */ - function WriteLogEntriesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new WriteLogEntriesResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.WriteLogEntriesResponse - * @static - * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance - */ - WriteLogEntriesResponse.create = function create(properties) { - return new WriteLogEntriesResponse(properties); - }; - - /** - * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.WriteLogEntriesResponse - * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse - * @static - * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.WriteLogEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WriteLogEntriesResponse message. - * @function verify - * @memberof google.logging.v2.WriteLogEntriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WriteLogEntriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse - */ - WriteLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) - return object; - return new $root.google.logging.v2.WriteLogEntriesResponse(); - }; - - /** - * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.WriteLogEntriesResponse - * @static - * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WriteLogEntriesResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this WriteLogEntriesResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesResponse - * @instance - * @returns {Object.} JSON object - */ - WriteLogEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WriteLogEntriesResponse; - })(); - - v2.WriteLogEntriesPartialErrors = (function() { - - /** - * Properties of a WriteLogEntriesPartialErrors. - * @memberof google.logging.v2 - * @interface IWriteLogEntriesPartialErrors - * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors - */ - - /** - * Constructs a new WriteLogEntriesPartialErrors. - * @memberof google.logging.v2 - * @classdesc Represents a WriteLogEntriesPartialErrors. - * @implements IWriteLogEntriesPartialErrors - * @constructor - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set - */ - function WriteLogEntriesPartialErrors(properties) { - this.logEntryErrors = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WriteLogEntriesPartialErrors logEntryErrors. - * @member {Object.} logEntryErrors - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @instance - */ - WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; - - /** - * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. - * @function create - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance - */ - WriteLogEntriesPartialErrors.create = function create(properties) { - return new WriteLogEntriesPartialErrors(properties); - }; - - /** - * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesPartialErrors.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logEntryErrors != null && Object.hasOwnProperty.call(message, "logEntryErrors")) - for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); - $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesPartialErrors.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.logEntryErrors === $util.emptyObject) - message.logEntryErrors = {}; - var end2 = reader.uint32() + reader.pos; - key = 0; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.int32(); - break; - case 2: - value = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.logEntryErrors[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WriteLogEntriesPartialErrors message. - * @function verify - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WriteLogEntriesPartialErrors.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { - if (!$util.isObject(message.logEntryErrors)) - return "logEntryErrors: object expected"; - var key = Object.keys(message.logEntryErrors); - for (var i = 0; i < key.length; ++i) { - if (!$util.key32Re.test(key[i])) - return "logEntryErrors: integer key{k:int32} expected"; - { - var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); - if (error) - return "logEntryErrors." + error; - } - } - } - return null; - }; - - /** - * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors - */ - WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) - return object; - var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); - if (object.logEntryErrors) { - if (typeof object.logEntryErrors !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors = {}; - for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { - if (typeof object.logEntryErrors[keys[i]] !== "object") - throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); - message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @static - * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.logEntryErrors = {}; - var keys2; - if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { - object.logEntryErrors = {}; - for (var j = 0; j < keys2.length; ++j) - object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); - } - return object; - }; - - /** - * Converts this WriteLogEntriesPartialErrors to JSON. - * @function toJSON - * @memberof google.logging.v2.WriteLogEntriesPartialErrors - * @instance - * @returns {Object.} JSON object - */ - WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WriteLogEntriesPartialErrors; - })(); - - v2.ListLogEntriesRequest = (function() { - - /** - * Properties of a ListLogEntriesRequest. - * @memberof google.logging.v2 - * @interface IListLogEntriesRequest - * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames - * @property {string|null} [filter] ListLogEntriesRequest filter - * @property {string|null} [orderBy] ListLogEntriesRequest orderBy - * @property {number|null} [pageSize] ListLogEntriesRequest pageSize - * @property {string|null} [pageToken] ListLogEntriesRequest pageToken - */ - - /** - * Constructs a new ListLogEntriesRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesRequest. - * @implements IListLogEntriesRequest - * @constructor - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set - */ - function ListLogEntriesRequest(properties) { - this.resourceNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLogEntriesRequest resourceNames. - * @member {Array.} resourceNames - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; - - /** - * ListLogEntriesRequest filter. - * @member {string} filter - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.filter = ""; - - /** - * ListLogEntriesRequest orderBy. - * @member {string} orderBy - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.orderBy = ""; - - /** - * ListLogEntriesRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.pageSize = 0; - - /** - * ListLogEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - */ - ListLogEntriesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListLogEntriesRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListLogEntriesRequest - * @static - * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance - */ - ListLogEntriesRequest.create = function create(properties) { - return new ListLogEntriesRequest(properties); - }; - - /** - * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListLogEntriesRequest - * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogEntriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); - return writer; - }; - - /** - * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest - * @static - * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListLogEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogEntriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 8: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.orderBy = reader.string(); - break; - case 4: - message.pageSize = reader.int32(); - break; - case 5: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLogEntriesRequest message. - * @function verify - * @memberof google.logging.v2.ListLogEntriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLogEntriesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) - if (!$util.isString(message.resourceNames[i])) - return "resourceNames: string[] expected"; - } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListLogEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest - */ - ListLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) - return object; - var message = new $root.google.logging.v2.ListLogEntriesRequest(); - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) - message.resourceNames[i] = String(object.resourceNames[i]); - } - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListLogEntriesRequest - * @static - * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLogEntriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceNames = []; - if (options.defaults) { - object.filter = ""; - object.orderBy = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = message.resourceNames[j]; - } - return object; - }; - - /** - * Converts this ListLogEntriesRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListLogEntriesRequest - * @instance - * @returns {Object.} JSON object - */ - ListLogEntriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListLogEntriesRequest; - })(); - - v2.ListLogEntriesResponse = (function() { - - /** - * Properties of a ListLogEntriesResponse. - * @memberof google.logging.v2 - * @interface IListLogEntriesResponse - * @property {Array.|null} [entries] ListLogEntriesResponse entries - * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken - */ - - /** - * Constructs a new ListLogEntriesResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogEntriesResponse. - * @implements IListLogEntriesResponse - * @constructor - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set - */ - function ListLogEntriesResponse(properties) { - this.entries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLogEntriesResponse entries. - * @member {Array.} entries - * @memberof google.logging.v2.ListLogEntriesResponse - * @instance - */ - ListLogEntriesResponse.prototype.entries = $util.emptyArray; - - /** - * ListLogEntriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogEntriesResponse - * @instance - */ - ListLogEntriesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListLogEntriesResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance - */ - ListLogEntriesResponse.create = function create(properties) { - return new ListLogEntriesResponse(properties); - }; - - /** - * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogEntriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogEntriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLogEntriesResponse message. - * @function verify - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLogEntriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse - */ - ListLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) - return object; - var message = new $root.google.logging.v2.ListLogEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListLogEntriesResponse - * @static - * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLogEntriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListLogEntriesResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListLogEntriesResponse - * @instance - * @returns {Object.} JSON object - */ - ListLogEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListLogEntriesResponse; - })(); - - v2.ListMonitoredResourceDescriptorsRequest = (function() { - - /** - * Properties of a ListMonitoredResourceDescriptorsRequest. - * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsRequest - * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken - */ - - /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. - * @implements IListMonitoredResourceDescriptorsRequest - * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - */ - function ListMonitoredResourceDescriptorsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListMonitoredResourceDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; - - /** - * ListMonitoredResourceDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance - */ - ListMonitoredResourceDescriptorsRequest.create = function create(properties) { - return new ListMonitoredResourceDescriptorsRequest(properties); - }; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pageSize = reader.int32(); - break; - case 2: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. - * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest - */ - ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) - return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest - * @instance - * @returns {Object.} JSON object - */ - ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListMonitoredResourceDescriptorsRequest; - })(); - - v2.ListMonitoredResourceDescriptorsResponse = (function() { - - /** - * Properties of a ListMonitoredResourceDescriptorsResponse. - * @memberof google.logging.v2 - * @interface IListMonitoredResourceDescriptorsResponse - * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors - * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken - */ - - /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. - * @implements IListMonitoredResourceDescriptorsResponse - * @constructor - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - */ - function ListMonitoredResourceDescriptorsResponse(properties) { - this.resourceDescriptors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListMonitoredResourceDescriptorsResponse resourceDescriptors. - * @member {Array.} resourceDescriptors - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @instance - */ - ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; - - /** - * ListMonitoredResourceDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @instance - */ - ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance - */ - ListMonitoredResourceDescriptorsResponse.create = function create(properties) { - return new ListMonitoredResourceDescriptorsResponse(properties); - }; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceDescriptors != null && message.resourceDescriptors.length) - for (var i = 0; i < message.resourceDescriptors.length; ++i) - $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.resourceDescriptors && message.resourceDescriptors.length)) - message.resourceDescriptors = []; - message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. - * @function verify - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { - if (!Array.isArray(message.resourceDescriptors)) - return "resourceDescriptors: array expected"; - for (var i = 0; i < message.resourceDescriptors.length; ++i) { - var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); - if (error) - return "resourceDescriptors." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse - */ - ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) - return object; - var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); - if (object.resourceDescriptors) { - if (!Array.isArray(object.resourceDescriptors)) - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); - message.resourceDescriptors = []; - for (var i = 0; i < object.resourceDescriptors.length; ++i) { - if (typeof object.resourceDescriptors[i] !== "object") - throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); - message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @static - * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceDescriptors = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.resourceDescriptors && message.resourceDescriptors.length) { - object.resourceDescriptors = []; - for (var j = 0; j < message.resourceDescriptors.length; ++j) - object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse - * @instance - * @returns {Object.} JSON object - */ - ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListMonitoredResourceDescriptorsResponse; - })(); - - v2.ListLogsRequest = (function() { - - /** - * Properties of a ListLogsRequest. - * @memberof google.logging.v2 - * @interface IListLogsRequest - * @property {string|null} [parent] ListLogsRequest parent - * @property {number|null} [pageSize] ListLogsRequest pageSize - * @property {string|null} [pageToken] ListLogsRequest pageToken - * @property {Array.|null} [resourceNames] ListLogsRequest resourceNames - */ - - /** - * Constructs a new ListLogsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogsRequest. - * @implements IListLogsRequest - * @constructor - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set - */ - function ListLogsRequest(properties) { - this.resourceNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLogsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.parent = ""; - - /** - * ListLogsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.pageSize = 0; - - /** - * ListLogsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.pageToken = ""; - - /** - * ListLogsRequest resourceNames. - * @member {Array.} resourceNames - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.resourceNames = $util.emptyArray; - - /** - * Creates a new ListLogsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance - */ - ListLogsRequest.create = function create(properties) { - return new ListLogsRequest(properties); - }; - - /** - * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); - return writer; - }; - - /** - * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLogsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 8: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLogsRequest message. - * @function verify - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLogsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) - if (!$util.isString(message.resourceNames[i])) - return "resourceNames: string[] expected"; - } - return null; - }; - - /** - * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest - */ - ListLogsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsRequest) - return object; - var message = new $root.google.logging.v2.ListLogsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.logging.v2.ListLogsRequest.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) - message.resourceNames[i] = String(object.resourceNames[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListLogsRequest - * @static - * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLogsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceNames = []; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = message.resourceNames[j]; - } - return object; - }; - - /** - * Converts this ListLogsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListLogsRequest - * @instance - * @returns {Object.} JSON object - */ - ListLogsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListLogsRequest; - })(); - - v2.ListLogsResponse = (function() { - - /** - * Properties of a ListLogsResponse. - * @memberof google.logging.v2 - * @interface IListLogsResponse - * @property {Array.|null} [logNames] ListLogsResponse logNames - * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken - */ - - /** - * Constructs a new ListLogsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListLogsResponse. - * @implements IListLogsResponse - * @constructor - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set - */ - function ListLogsResponse(properties) { - this.logNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLogsResponse logNames. - * @member {Array.} logNames - * @memberof google.logging.v2.ListLogsResponse - * @instance - */ - ListLogsResponse.prototype.logNames = $util.emptyArray; - - /** - * ListLogsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogsResponse - * @instance - */ - ListLogsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListLogsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance - */ - ListLogsResponse.create = function create(properties) { - return new ListLogsResponse(properties); - }; - - /** - * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.logNames != null && message.logNames.length) - for (var i = 0; i < message.logNames.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); - return writer; - }; - - /** - * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLogsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - if (!(message.logNames && message.logNames.length)) - message.logNames = []; - message.logNames.push(reader.string()); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLogsResponse message. - * @function verify - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLogsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logNames != null && message.hasOwnProperty("logNames")) { - if (!Array.isArray(message.logNames)) - return "logNames: array expected"; - for (var i = 0; i < message.logNames.length; ++i) - if (!$util.isString(message.logNames[i])) - return "logNames: string[] expected"; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse - */ - ListLogsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogsResponse) - return object; - var message = new $root.google.logging.v2.ListLogsResponse(); - if (object.logNames) { - if (!Array.isArray(object.logNames)) - throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); - message.logNames = []; - for (var i = 0; i < object.logNames.length; ++i) - message.logNames[i] = String(object.logNames[i]); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListLogsResponse - * @static - * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLogsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.logNames = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.logNames && message.logNames.length) { - object.logNames = []; - for (var j = 0; j < message.logNames.length; ++j) - object.logNames[j] = message.logNames[j]; - } - return object; - }; - - /** - * Converts this ListLogsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListLogsResponse - * @instance - * @returns {Object.} JSON object - */ - ListLogsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListLogsResponse; - })(); - - v2.TailLogEntriesRequest = (function() { - - /** - * Properties of a TailLogEntriesRequest. - * @memberof google.logging.v2 - * @interface ITailLogEntriesRequest - * @property {Array.|null} [resourceNames] TailLogEntriesRequest resourceNames - * @property {string|null} [filter] TailLogEntriesRequest filter - * @property {google.protobuf.IDuration|null} [bufferWindow] TailLogEntriesRequest bufferWindow - */ - - /** - * Constructs a new TailLogEntriesRequest. - * @memberof google.logging.v2 - * @classdesc Represents a TailLogEntriesRequest. - * @implements ITailLogEntriesRequest - * @constructor - * @param {google.logging.v2.ITailLogEntriesRequest=} [properties] Properties to set - */ - function TailLogEntriesRequest(properties) { - this.resourceNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TailLogEntriesRequest resourceNames. - * @member {Array.} resourceNames - * @memberof google.logging.v2.TailLogEntriesRequest - * @instance - */ - TailLogEntriesRequest.prototype.resourceNames = $util.emptyArray; + } + return message; + }; - /** - * TailLogEntriesRequest filter. - * @member {string} filter - * @memberof google.logging.v2.TailLogEntriesRequest - * @instance - */ - TailLogEntriesRequest.prototype.filter = ""; + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; - /** - * TailLogEntriesRequest bufferWindow. - * @member {google.protobuf.IDuration|null|undefined} bufferWindow - * @memberof google.logging.v2.TailLogEntriesRequest - * @instance - */ - TailLogEntriesRequest.prototype.bufferWindow = null; + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new TailLogEntriesRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.TailLogEntriesRequest - * @static - * @param {google.logging.v2.ITailLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest instance - */ - TailLogEntriesRequest.create = function create(properties) { - return new TailLogEntriesRequest(properties); - }; + return FileDescriptorSet; + })(); - /** - * Encodes the specified TailLogEntriesRequest message. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.TailLogEntriesRequest - * @static - * @param {google.logging.v2.ITailLogEntriesRequest} message TailLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TailLogEntriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceNames[i]); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.bufferWindow != null && Object.hasOwnProperty.call(message, "bufferWindow")) - $root.google.protobuf.Duration.encode(message.bufferWindow, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + protobuf.FileDescriptorProto = (function() { - /** - * Encodes the specified TailLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.TailLogEntriesRequest - * @static - * @param {google.logging.v2.ITailLogEntriesRequest} message TailLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TailLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ - /** - * Decodes a TailLogEntriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.TailLogEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TailLogEntriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.bufferWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a TailLogEntriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.TailLogEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TailLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; - /** - * Verifies a TailLogEntriesRequest message. - * @function verify - * @memberof google.logging.v2.TailLogEntriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TailLogEntriesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) - if (!$util.isString(message.resourceNames[i])) - return "resourceNames: string[] expected"; - } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.bufferWindow != null && message.hasOwnProperty("bufferWindow")) { - var error = $root.google.protobuf.Duration.verify(message.bufferWindow); - if (error) - return "bufferWindow." + error; - } - return null; - }; + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; - /** - * Creates a TailLogEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.TailLogEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest - */ - TailLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.TailLogEntriesRequest) - return object; - var message = new $root.google.logging.v2.TailLogEntriesRequest(); - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.logging.v2.TailLogEntriesRequest.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) - message.resourceNames[i] = String(object.resourceNames[i]); - } - if (object.filter != null) - message.filter = String(object.filter); - if (object.bufferWindow != null) { - if (typeof object.bufferWindow !== "object") - throw TypeError(".google.logging.v2.TailLogEntriesRequest.bufferWindow: object expected"); - message.bufferWindow = $root.google.protobuf.Duration.fromObject(object.bufferWindow); - } - return message; - }; + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; - /** - * Creates a plain object from a TailLogEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.TailLogEntriesRequest - * @static - * @param {google.logging.v2.TailLogEntriesRequest} message TailLogEntriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TailLogEntriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceNames = []; - if (options.defaults) { - object.filter = ""; - object.bufferWindow = null; - } - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = message.resourceNames[j]; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.bufferWindow != null && message.hasOwnProperty("bufferWindow")) - object.bufferWindow = $root.google.protobuf.Duration.toObject(message.bufferWindow, options); - return object; - }; + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - /** - * Converts this TailLogEntriesRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.TailLogEntriesRequest - * @instance - * @returns {Object.} JSON object - */ - TailLogEntriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - return TailLogEntriesRequest; - })(); + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; - v2.TailLogEntriesResponse = (function() { + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; - /** - * Properties of a TailLogEntriesResponse. - * @memberof google.logging.v2 - * @interface ITailLogEntriesResponse - * @property {Array.|null} [entries] TailLogEntriesResponse entries - * @property {Array.|null} [suppressionInfo] TailLogEntriesResponse suppressionInfo - */ + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; - /** - * Constructs a new TailLogEntriesResponse. - * @memberof google.logging.v2 - * @classdesc Represents a TailLogEntriesResponse. - * @implements ITailLogEntriesResponse - * @constructor - * @param {google.logging.v2.ITailLogEntriesResponse=} [properties] Properties to set - */ - function TailLogEntriesResponse(properties) { - this.entries = []; - this.suppressionInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; - /** - * TailLogEntriesResponse entries. - * @member {Array.} entries - * @memberof google.logging.v2.TailLogEntriesResponse - * @instance - */ - TailLogEntriesResponse.prototype.entries = $util.emptyArray; + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; - /** - * TailLogEntriesResponse suppressionInfo. - * @member {Array.} suppressionInfo - * @memberof google.logging.v2.TailLogEntriesResponse - * @instance - */ - TailLogEntriesResponse.prototype.suppressionInfo = $util.emptyArray; + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; - /** - * Creates a new TailLogEntriesResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.TailLogEntriesResponse - * @static - * @param {google.logging.v2.ITailLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse instance - */ - TailLogEntriesResponse.create = function create(properties) { - return new TailLogEntriesResponse(properties); - }; + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; - /** - * Encodes the specified TailLogEntriesResponse message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.TailLogEntriesResponse - * @static - * @param {google.logging.v2.ITailLogEntriesResponse} message TailLogEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TailLogEntriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.suppressionInfo != null && message.suppressionInfo.length) - for (var i = 0; i < message.suppressionInfo.length; ++i) - $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.encode(message.suppressionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; - /** - * Encodes the specified TailLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.TailLogEntriesResponse - * @static - * @param {google.logging.v2.ITailLogEntriesResponse} message TailLogEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TailLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a TailLogEntriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.TailLogEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TailLogEntriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.suppressionInfo && message.suppressionInfo.length)) - message.suppressionInfo = []; - message.suppressionInfo.push($root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a TailLogEntriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.TailLogEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TailLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a TailLogEntriesResponse message. - * @function verify - * @memberof google.logging.v2.TailLogEntriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TailLogEntriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.suppressionInfo != null && message.hasOwnProperty("suppressionInfo")) { - if (!Array.isArray(message.suppressionInfo)) - return "suppressionInfo: array expected"; - for (var i = 0; i < message.suppressionInfo.length; ++i) { - var error = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify(message.suppressionInfo[i]); - if (error) - return "suppressionInfo." + error; - } + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; } - return null; - }; - - /** - * Creates a TailLogEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.TailLogEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse - */ - TailLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.TailLogEntriesResponse) - return object; - var message = new $root.google.logging.v2.TailLogEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.logging.v2.TailLogEntriesResponse.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.logging.v2.TailLogEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); - } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; } - if (object.suppressionInfo) { - if (!Array.isArray(object.suppressionInfo)) - throw TypeError(".google.logging.v2.TailLogEntriesResponse.suppressionInfo: array expected"); - message.suppressionInfo = []; - for (var i = 0; i < object.suppressionInfo.length; ++i) { - if (typeof object.suppressionInfo[i] !== "object") - throw TypeError(".google.logging.v2.TailLogEntriesResponse.suppressionInfo: object expected"); - message.suppressionInfo[i] = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.fromObject(object.suppressionInfo[i]); - } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; } - return message; - }; + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; - /** - * Creates a plain object from a TailLogEntriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.TailLogEntriesResponse - * @static - * @param {google.logging.v2.TailLogEntriesResponse} message TailLogEntriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TailLogEntriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.entries = []; - object.suppressionInfo = []; + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); } - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); } - if (message.suppressionInfo && message.suppressionInfo.length) { - object.suppressionInfo = []; - for (var j = 0; j < message.suppressionInfo.length; ++j) - object.suppressionInfo[j] = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.toObject(message.suppressionInfo[j], options); + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); } - return object; - }; + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; - /** - * Converts this TailLogEntriesResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.TailLogEntriesResponse - * @instance - * @returns {Object.} JSON object - */ - TailLogEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - TailLogEntriesResponse.SuppressionInfo = (function() { + return FileDescriptorProto; + })(); - /** - * Properties of a SuppressionInfo. - * @memberof google.logging.v2.TailLogEntriesResponse - * @interface ISuppressionInfo - * @property {google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|null} [reason] SuppressionInfo reason - * @property {number|null} [suppressedCount] SuppressionInfo suppressedCount - */ + protobuf.DescriptorProto = (function() { - /** - * Constructs a new SuppressionInfo. - * @memberof google.logging.v2.TailLogEntriesResponse - * @classdesc Represents a SuppressionInfo. - * @implements ISuppressionInfo - * @constructor - * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo=} [properties] Properties to set - */ - function SuppressionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ - /** - * SuppressionInfo reason. - * @member {google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason} reason - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @instance - */ - SuppressionInfo.prototype.reason = 0; + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SuppressionInfo suppressedCount. - * @member {number} suppressedCount - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @instance - */ - SuppressionInfo.prototype.suppressedCount = 0; + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; - /** - * Creates a new SuppressionInfo instance using the specified properties. - * @function create - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @static - * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo=} [properties] Properties to set - * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo instance - */ - SuppressionInfo.create = function create(properties) { - return new SuppressionInfo(properties); - }; + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; - /** - * Encodes the specified SuppressionInfo message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @static - * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo} message SuppressionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuppressionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); - if (message.suppressedCount != null && Object.hasOwnProperty.call(message, "suppressedCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.suppressedCount); - return writer; - }; + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; - /** - * Encodes the specified SuppressionInfo message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @static - * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo} message SuppressionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuppressionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; - /** - * Decodes a SuppressionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuppressionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reason = reader.int32(); - break; - case 2: - message.suppressedCount = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; - /** - * Decodes a SuppressionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuppressionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; - /** - * Verifies a SuppressionInfo message. - * @function verify - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuppressionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reason != null && message.hasOwnProperty("reason")) - switch (message.reason) { - default: - return "reason: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.suppressedCount != null && message.hasOwnProperty("suppressedCount")) - if (!$util.isInteger(message.suppressedCount)) - return "suppressedCount: integer expected"; - return null; - }; + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Creates a SuppressionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo - */ - SuppressionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo) - return object; - var message = new $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo(); - switch (object.reason) { - case "REASON_UNSPECIFIED": - case 0: - message.reason = 0; - break; - case "RATE_LIMIT": - case 1: - message.reason = 1; - break; - case "NOT_CONSUMED": - case 2: - message.reason = 2; - break; - } - if (object.suppressedCount != null) - message.suppressedCount = object.suppressedCount | 0; - return message; - }; + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; - /** - * Creates a plain object from a SuppressionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @static - * @param {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} message SuppressionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuppressionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.reason = options.enums === String ? "REASON_UNSPECIFIED" : 0; - object.suppressedCount = 0; - } - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason[message.reason] : message.reason; - if (message.suppressedCount != null && message.hasOwnProperty("suppressedCount")) - object.suppressedCount = message.suppressedCount; - return object; - }; + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; - /** - * Converts this SuppressionInfo to JSON. - * @function toJSON - * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo - * @instance - * @returns {Object.} JSON object - */ - SuppressionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Reason enum. - * @name google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason - * @enum {number} - * @property {number} REASON_UNSPECIFIED=0 REASON_UNSPECIFIED value - * @property {number} RATE_LIMIT=1 RATE_LIMIT value - * @property {number} NOT_CONSUMED=2 NOT_CONSUMED value - */ - SuppressionInfo.Reason = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REASON_UNSPECIFIED"] = 0; - values[valuesById[1] = "RATE_LIMIT"] = 1; - values[valuesById[2] = "NOT_CONSUMED"] = 2; - return values; - })(); + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return SuppressionInfo; - })(); + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return TailLogEntriesResponse; - })(); + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; - v2.ConfigServiceV2 = (function() { + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; - /** - * Constructs a new ConfigServiceV2 service. - * @memberof google.logging.v2 - * @classdesc Represents a ConfigServiceV2 - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; } + return object; + }; - (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates new ConfigServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.ConfigServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. - */ - ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + DescriptorProto.ExtensionRange = (function() { /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListBucketsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListBucketsResponse} [response] ListBucketsResponse + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options */ /** - * Calls ListBuckets. - * @function listBuckets - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListBucketsCallback} callback Node-style callback called with the error, if any, and ListBucketsResponse - * @returns {undefined} - * @variation 1 + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set */ - Object.defineProperty(ConfigServiceV2.prototype.listBuckets = function listBuckets(request, callback) { - return this.rpcCall(listBuckets, $root.google.logging.v2.ListBucketsRequest, $root.google.logging.v2.ListBucketsResponse, request, callback); - }, "name", { value: "ListBuckets" }); + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListBuckets. - * @function listBuckets - * @memberof google.logging.v2.ConfigServiceV2 + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @instance - * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetBucketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogBucket} [response] LogBucket */ + ExtensionRange.prototype.start = 0; /** - * Calls GetBucket. - * @function getBucket - * @memberof google.logging.v2.ConfigServiceV2 + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @instance - * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetBucketCallback} callback Node-style callback called with the error, if any, and LogBucket - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.getBucket = function getBucket(request, callback) { - return this.rpcCall(getBucket, $root.google.logging.v2.GetBucketRequest, $root.google.logging.v2.LogBucket, request, callback); - }, "name", { value: "GetBucket" }); + ExtensionRange.prototype.end = 0; /** - * Calls GetBucket. - * @function getBucket - * @memberof google.logging.v2.ConfigServiceV2 + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @instance - * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ExtensionRange.prototype.options = null; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createBucket}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateBucketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogBucket} [response] LogBucket + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; /** - * Calls CreateBucket. - * @function createBucket - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateBucketRequest} request CreateBucketRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateBucketCallback} callback Node-style callback called with the error, if any, and LogBucket - * @returns {undefined} - * @variation 1 + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConfigServiceV2.prototype.createBucket = function createBucket(request, callback) { - return this.rpcCall(createBucket, $root.google.logging.v2.CreateBucketRequest, $root.google.logging.v2.LogBucket, request, callback); - }, "name", { value: "CreateBucket" }); + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls CreateBucket. - * @function createBucket - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateBucketRequest} request CreateBucketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateBucketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogBucket} [response] LogBucket + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateBucket. - * @function updateBucket - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateBucketCallback} callback Node-style callback called with the error, if any, and LogBucket - * @returns {undefined} - * @variation 1 + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ConfigServiceV2.prototype.updateBucket = function updateBucket(request, callback) { - return this.rpcCall(updateBucket, $root.google.logging.v2.UpdateBucketRequest, $root.google.logging.v2.LogBucket, request, callback); - }, "name", { value: "UpdateBucket" }); + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateBucket. - * @function updateBucket - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteBucket}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteBucketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; /** - * Calls DeleteBucket. - * @function deleteBucket - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteBucketRequest} request DeleteBucketRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteBucketCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ConfigServiceV2.prototype.deleteBucket = function deleteBucket(request, callback) { - return this.rpcCall(deleteBucket, $root.google.logging.v2.DeleteBucketRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteBucket" }); + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; /** - * Calls DeleteBucket. - * @function deleteBucket - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange * @instance - * @param {google.logging.v2.IDeleteBucketRequest} request DeleteBucketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#undeleteBucket}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UndeleteBucketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { /** - * Calls UndeleteBucket. - * @function undeleteBucket - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUndeleteBucketRequest} request UndeleteBucketRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UndeleteBucketCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end */ - Object.defineProperty(ConfigServiceV2.prototype.undeleteBucket = function undeleteBucket(request, callback) { - return this.rpcCall(undeleteBucket, $root.google.logging.v2.UndeleteBucketRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "UndeleteBucket" }); /** - * Calls UndeleteBucket. - * @function undeleteBucket - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUndeleteBucketRequest} request UndeleteBucketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listViews}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListViewsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListViewsResponse} [response] ListViewsResponse + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance */ + ReservedRange.prototype.start = 0; /** - * Calls ListViews. - * @function listViews - * @memberof google.logging.v2.ConfigServiceV2 + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance - * @param {google.logging.v2.IListViewsRequest} request ListViewsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListViewsCallback} callback Node-style callback called with the error, if any, and ListViewsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConfigServiceV2.prototype.listViews = function listViews(request, callback) { - return this.rpcCall(listViews, $root.google.logging.v2.ListViewsRequest, $root.google.logging.v2.ListViewsResponse, request, callback); - }, "name", { value: "ListViews" }); + ReservedRange.prototype.end = 0; /** - * Calls ListViews. - * @function listViews - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListViewsRequest} request ListViewsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getView}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetViewCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogView} [response] LogView + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; /** - * Calls GetView. - * @function getView - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetViewRequest} request GetViewRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetViewCallback} callback Node-style callback called with the error, if any, and LogView - * @returns {undefined} - * @variation 1 + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConfigServiceV2.prototype.getView = function getView(request, callback) { - return this.rpcCall(getView, $root.google.logging.v2.GetViewRequest, $root.google.logging.v2.LogView, request, callback); - }, "name", { value: "GetView" }); + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetView. - * @function getView - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetViewRequest} request GetViewRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createView}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateViewCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogView} [response] LogView + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateView. - * @function createView - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateViewRequest} request CreateViewRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateViewCallback} callback Node-style callback called with the error, if any, and LogView - * @returns {undefined} - * @variation 1 + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(ConfigServiceV2.prototype.createView = function createView(request, callback) { - return this.rpcCall(createView, $root.google.logging.v2.CreateViewRequest, $root.google.logging.v2.LogView, request, callback); - }, "name", { value: "CreateView" }); + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; /** - * Calls CreateView. - * @function createView - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateViewRequest} request CreateViewRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateView}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateViewCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogView} [response] LogView + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; /** - * Calls UpdateView. - * @function updateView - * @memberof google.logging.v2.ConfigServiceV2 + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance - * @param {google.logging.v2.IUpdateViewRequest} request UpdateViewRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateViewCallback} callback Node-style callback called with the error, if any, and LogView - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(ConfigServiceV2.prototype.updateView = function updateView(request, callback) { - return this.rpcCall(updateView, $root.google.logging.v2.UpdateViewRequest, $root.google.logging.v2.LogView, request, callback); - }, "name", { value: "UpdateView" }); + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls UpdateView. - * @function updateView - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateViewRequest} request UpdateViewRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteView}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteViewCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * Calls DeleteView. - * @function deleteView - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteViewRequest} request DeleteViewRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteViewCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.deleteView = function deleteView(request, callback) { - return this.rpcCall(deleteView, $root.google.logging.v2.DeleteViewRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteView" }); + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * Calls DeleteView. - * @function deleteView - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteViewRequest} request DeleteViewRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListSinksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse - */ + return ExtensionRangeOptions; + })(); - /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { - return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); - }, "name", { value: "ListSinks" }); + protobuf.FieldDescriptorProto = (function() { - /** - * Calls ListSinks. - * @function listSinks - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink - */ + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { - return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "GetSink" }); + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; - /** - * Calls GetSink. - * @function getSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink - */ + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; - /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { - return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "CreateSink" }); + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; - /** - * Calls CreateSink. - * @function createSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogSink} [response] LogSink - */ + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; - /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { - return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); - }, "name", { value: "UpdateSink" }); + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; - /** - * Calls UpdateSink. - * @function updateSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteSinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; - /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { - return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSink" }); + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; - /** - * Calls DeleteSink. - * @function deleteSink - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef ListExclusionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse - */ + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; - /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { - return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); - }, "name", { value: "ListExclusions" }); + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls ListExclusions. - * @function listExclusions - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion - */ + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; - /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { - return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "GetExclusion" }); + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; - /** - * Calls GetExclusion. - * @function getExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef CreateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion - */ + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); - /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { - return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "CreateExclusion" }); + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); - /** - * Calls CreateExclusion. - * @function createExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return FieldDescriptorProto; + })(); - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogExclusion} [response] LogExclusion - */ + protobuf.OneofDescriptorProto = (function() { - /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { - return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); - }, "name", { value: "UpdateExclusion" }); + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ - /** - * Calls UpdateExclusion. - * @function updateExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef DeleteExclusionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; - /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { - return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteExclusion" }); + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; - /** - * Calls DeleteExclusion. - * @function deleteExclusion - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef GetCmekSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.CmekSettings} [response] CmekSettings - */ + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Calls GetCmekSettings. - * @function getCmekSettings - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.getCmekSettings = function getCmekSettings(request, callback) { - return this.rpcCall(getCmekSettings, $root.google.logging.v2.GetCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); - }, "name", { value: "GetCmekSettings" }); + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls GetCmekSettings. - * @function getCmekSettings - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. - * @memberof google.logging.v2.ConfigServiceV2 - * @typedef UpdateCmekSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.CmekSettings} [response] CmekSettings - */ + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls UpdateCmekSettings. - * @function updateCmekSettings - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object - * @param {google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConfigServiceV2.prototype.updateCmekSettings = function updateCmekSettings(request, callback) { - return this.rpcCall(updateCmekSettings, $root.google.logging.v2.UpdateCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); - }, "name", { value: "UpdateCmekSettings" }); + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Calls UpdateCmekSettings. - * @function updateCmekSettings - * @memberof google.logging.v2.ConfigServiceV2 - * @instance - * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; - return ConfigServiceV2; - })(); + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; - v2.LogBucket = (function() { + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a LogBucket. - * @memberof google.logging.v2 - * @interface ILogBucket - * @property {string|null} [name] LogBucket name - * @property {string|null} [description] LogBucket description - * @property {google.protobuf.ITimestamp|null} [createTime] LogBucket createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogBucket updateTime - * @property {number|null} [retentionDays] LogBucket retentionDays - * @property {boolean|null} [locked] LogBucket locked - * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState - */ + return OneofDescriptorProto; + })(); - /** - * Constructs a new LogBucket. - * @memberof google.logging.v2 - * @classdesc Represents a LogBucket. - * @implements ILogBucket - * @constructor - * @param {google.logging.v2.ILogBucket=} [properties] Properties to set - */ - function LogBucket(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.EnumDescriptorProto = (function() { - /** - * LogBucket name. - * @member {string} name - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.name = ""; + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ - /** - * LogBucket description. - * @member {string} description - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.description = ""; + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LogBucket createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.createTime = null; + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; - /** - * LogBucket updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.updateTime = null; + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; - /** - * LogBucket retentionDays. - * @member {number} retentionDays - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.retentionDays = 0; + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; - /** - * LogBucket locked. - * @member {boolean} locked - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.locked = false; + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * LogBucket lifecycleState. - * @member {google.logging.v2.LifecycleState} lifecycleState - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.lifecycleState = 0; + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Creates a new LogBucket instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogBucket - * @static - * @param {google.logging.v2.ILogBucket=} [properties] Properties to set - * @returns {google.logging.v2.LogBucket} LogBucket instance - */ - LogBucket.create = function create(properties) { - return new LogBucket(properties); - }; + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; - /** - * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogBucket - * @static - * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogBucket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.locked); - if (message.retentionDays != null && Object.hasOwnProperty.call(message, "retentionDays")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); - if (message.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.lifecycleState); - return writer; - }; + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; - /** - * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogBucket - * @static - * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogBucket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a LogBucket message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogBucket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogBucket} LogBucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogBucket.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogBucket(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.retentionDays = reader.int32(); - break; - case 9: - message.locked = reader.bool(); - break; - case 12: - message.lifecycleState = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a LogBucket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogBucket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogBucket} LogBucket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogBucket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a LogBucket message. - * @function verify - * @memberof google.logging.v2.LogBucket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogBucket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); if (error) - return "createTime." + error; + return "value." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); if (error) - return "updateTime." + error; + return "reservedRange." + error; } - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - if (!$util.isInteger(message.retentionDays)) - return "retentionDays: integer expected"; - if (message.locked != null && message.hasOwnProperty("locked")) - if (typeof message.locked !== "boolean") - return "locked: boolean expected"; - if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) - switch (message.lifecycleState) { - default: - return "lifecycleState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; - /** - * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogBucket - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogBucket} LogBucket - */ - LogBucket.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogBucket) - return object; - var message = new $root.google.logging.v2.LogBucket(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogBucket.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogBucket.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.retentionDays != null) - message.retentionDays = object.retentionDays | 0; - if (object.locked != null) - message.locked = Boolean(object.locked); - switch (object.lifecycleState) { - case "LIFECYCLE_STATE_UNSPECIFIED": - case 0: - message.lifecycleState = 0; - break; - case "ACTIVE": - case 1: - message.lifecycleState = 1; - break; - case "DELETE_REQUESTED": - case 2: - message.lifecycleState = 2; - break; + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); } - return message; - }; - - /** - * Creates a plain object from a LogBucket message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogBucket - * @static - * @param {google.logging.v2.LogBucket} message LogBucket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogBucket.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.locked = false; - object.retentionDays = 0; - object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.locked != null && message.hasOwnProperty("locked")) - object.locked = message.locked; - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - object.retentionDays = message.retentionDays; - if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) - object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; - return object; - }; - - /** - * Converts this LogBucket to JSON. - * @function toJSON - * @memberof google.logging.v2.LogBucket - * @instance - * @returns {Object.} JSON object - */ - LogBucket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; - return LogBucket; - })(); + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; /** - * LifecycleState enum. - * @name google.logging.v2.LifecycleState - * @enum {number} - * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object */ - v2.LifecycleState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "DELETE_REQUESTED"] = 2; - return values; - })(); + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.LogView = (function() { + EnumDescriptorProto.EnumReservedRange = (function() { /** - * Properties of a LogView. - * @memberof google.logging.v2 - * @interface ILogView - * @property {string|null} [name] LogView name - * @property {string|null} [description] LogView description - * @property {google.protobuf.ITimestamp|null} [createTime] LogView createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogView updateTime - * @property {string|null} [filter] LogView filter + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end */ /** - * Constructs a new LogView. - * @memberof google.logging.v2 - * @classdesc Represents a LogView. - * @implements ILogView + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange * @constructor - * @param {google.logging.v2.ILogView=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set */ - function LogView(properties) { + function EnumReservedRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5805,127 +3440,88 @@ } /** - * LogView name. - * @member {string} name - * @memberof google.logging.v2.LogView - * @instance - */ - LogView.prototype.name = ""; - - /** - * LogView description. - * @member {string} description - * @memberof google.logging.v2.LogView - * @instance - */ - LogView.prototype.description = ""; - - /** - * LogView createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogView - * @instance - */ - LogView.prototype.createTime = null; - - /** - * LogView updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogView + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance */ - LogView.prototype.updateTime = null; + EnumReservedRange.prototype.start = 0; /** - * LogView filter. - * @member {string} filter - * @memberof google.logging.v2.LogView + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance */ - LogView.prototype.filter = ""; + EnumReservedRange.prototype.end = 0; /** - * Creates a new LogView instance using the specified properties. + * Creates a new EnumReservedRange instance using the specified properties. * @function create - * @memberof google.logging.v2.LogView + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.logging.v2.ILogView=} [properties] Properties to set - * @returns {google.logging.v2.LogView} LogView instance + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance */ - LogView.create = function create(properties) { - return new LogView(properties); + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); }; /** - * Encodes the specified LogView message. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogView + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.logging.v2.ILogView} message LogView message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogView.encode = function encode(message, writer) { + EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.filter); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; /** - * Encodes the specified LogView message, length delimited. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogView + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.logging.v2.ILogView} message LogView message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogView.encodeDelimited = function encodeDelimited(message, writer) { + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogView message from the specified reader or buffer. + * Decodes an EnumReservedRange message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogView + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogView} LogView + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogView.decode = function decode(reader, length) { + EnumReservedRange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogView(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.start = reader.int32(); break; - case 7: - message.filter = reader.string(); + case 2: + message.end = reader.int32(); break; default: reader.skipType(tag & 7); @@ -5936,3513 +3532,4195 @@ }; /** - * Decodes a LogView message from the specified reader or buffer, length delimited. + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogView + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogView} LogView + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogView.decodeDelimited = function decodeDelimited(reader) { + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogView message. + * Verifies an EnumReservedRange message. * @function verify - * @memberof google.logging.v2.LogView + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogView.verify = function verify(message) { + EnumReservedRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; return null; }; /** - * Creates a LogView message from a plain object. Also converts values to their respective internal types. + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogView + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogView} LogView - */ - LogView.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogView) + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) return object; - var message = new $root.google.logging.v2.LogView(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogView.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogView.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; return message; }; /** - * Creates a plain object from a LogView message. Also converts values to other types if specified. + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogView + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.logging.v2.LogView} message LogView + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogView.toObject = function toObject(message, options) { + EnumReservedRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.filter = ""; + object.start = 0; + object.end = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; - }; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; - /** - * Converts this LogView to JSON. - * @function toJSON - * @memberof google.logging.v2.LogView - * @instance - * @returns {Object.} JSON object - */ - LogView.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; - return LogView; - })(); + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.LogSink = (function() { + return EnumValueDescriptorProto; + })(); - /** - * Properties of a LogSink. - * @memberof google.logging.v2 - * @interface ILogSink - * @property {string|null} [name] LogSink name - * @property {string|null} [destination] LogSink destination - * @property {string|null} [filter] LogSink filter - * @property {string|null} [description] LogSink description - * @property {boolean|null} [disabled] LogSink disabled - * @property {Array.|null} [exclusions] LogSink exclusions - * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat - * @property {string|null} [writerIdentity] LogSink writerIdentity - * @property {boolean|null} [includeChildren] LogSink includeChildren - * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime - */ + protobuf.ServiceDescriptorProto = (function() { - /** - * Constructs a new LogSink. - * @memberof google.logging.v2 - * @classdesc Represents a LogSink. - * @implements ILogSink - * @constructor - * @param {google.logging.v2.ILogSink=} [properties] Properties to set - */ - function LogSink(properties) { - this.exclusions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ - /** - * LogSink name. - * @member {string} name - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.name = ""; + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LogSink destination. - * @member {string} destination - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.destination = ""; + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; - /** - * LogSink filter. - * @member {string} filter - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.filter = ""; + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; - /** - * LogSink description. - * @member {string} description - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.description = ""; + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; - /** - * LogSink disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.disabled = false; + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; - /** - * LogSink exclusions. - * @member {Array.} exclusions - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.exclusions = $util.emptyArray; + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * LogSink outputVersionFormat. - * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.outputVersionFormat = 0; + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * LogSink writerIdentity. - * @member {string} writerIdentity - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.writerIdentity = ""; + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * LogSink includeChildren. - * @member {boolean} includeChildren - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.includeChildren = false; + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * LogSink bigqueryOptions. - * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.bigqueryOptions = null; + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; - /** - * LogSink createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.createTime = null; + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; - /** - * LogSink updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogSink - * @instance - */ - LogSink.prototype.updateTime = null; + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return ServiceDescriptorProto; + })(); - /** - * LogSink options. - * @member {"bigqueryOptions"|undefined} options - * @memberof google.logging.v2.LogSink - * @instance - */ - Object.defineProperty(LogSink.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); + protobuf.MethodDescriptorProto = (function() { - /** - * Creates a new LogSink instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.ILogSink=} [properties] Properties to set - * @returns {google.logging.v2.LogSink} LogSink instance - */ - LogSink.create = function create(properties) { - return new LogSink(properties); - }; + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ - /** - * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogSink.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.outputVersionFormat != null && Object.hasOwnProperty.call(message, "outputVersionFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); - if (message.writerIdentity != null && Object.hasOwnProperty.call(message, "writerIdentity")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); - if (message.includeChildren != null && Object.hasOwnProperty.call(message, "includeChildren")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); - if (message.bigqueryOptions != null && Object.hasOwnProperty.call(message, "bigqueryOptions")) - $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.exclusions != null && message.exclusions.length) - for (var i = 0; i < message.exclusions.length; ++i) - $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.disabled); - return writer; - }; + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogSink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; - /** - * Decodes a LogSink message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogSink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogSink} LogSink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogSink.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.destination = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 18: - message.description = reader.string(); - break; - case 19: - message.disabled = reader.bool(); - break; - case 16: - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); - break; - case 6: - message.outputVersionFormat = reader.int32(); - break; - case 8: - message.writerIdentity = reader.string(); - break; - case 9: - message.includeChildren = reader.bool(); - break; - case 12: - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); - break; - case 13: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; - /** - * Decodes a LogSink message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogSink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogSink} LogSink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogSink.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; - /** - * Verifies a LogSink message. - * @function verify - * @memberof google.logging.v2.LogSink - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogSink.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) - if (!$util.isString(message.destination)) - return "destination: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.exclusions != null && message.hasOwnProperty("exclusions")) { - if (!Array.isArray(message.exclusions)) - return "exclusions: array expected"; - for (var i = 0; i < message.exclusions.length; ++i) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); - if (error) - return "exclusions." + error; - } - } - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - switch (message.outputVersionFormat) { - default: - return "outputVersionFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - if (!$util.isString(message.writerIdentity)) - return "writerIdentity: string expected"; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - if (typeof message.includeChildren !== "boolean") - return "includeChildren: boolean expected"; - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - properties.options = 1; - { - var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); - if (error) - return "bigqueryOptions." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a LogSink message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogSink - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogSink} LogSink - */ - LogSink.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogSink) - return object; - var message = new $root.google.logging.v2.LogSink(); - if (object.name != null) - message.name = String(object.name); - if (object.destination != null) - message.destination = String(object.destination); - if (object.filter != null) - message.filter = String(object.filter); - if (object.description != null) - message.description = String(object.description); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.exclusions) { - if (!Array.isArray(object.exclusions)) - throw TypeError(".google.logging.v2.LogSink.exclusions: array expected"); - message.exclusions = []; - for (var i = 0; i < object.exclusions.length; ++i) { - if (typeof object.exclusions[i] !== "object") - throw TypeError(".google.logging.v2.LogSink.exclusions: object expected"); - message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); - } - } - switch (object.outputVersionFormat) { - case "VERSION_FORMAT_UNSPECIFIED": - case 0: - message.outputVersionFormat = 0; - break; - case "V2": + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.outputVersionFormat = 1; + message.name = reader.string(); break; - case "V1": case 2: - message.outputVersionFormat = 2; + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); break; } - if (object.writerIdentity != null) - message.writerIdentity = String(object.writerIdentity); - if (object.includeChildren != null) - message.includeChildren = Boolean(object.includeChildren); - if (object.bigqueryOptions != null) { - if (typeof object.bigqueryOptions !== "object") - throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a LogSink message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogSink - * @static - * @param {google.logging.v2.LogSink} message LogSink - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogSink.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exclusions = []; - if (options.defaults) { - object.name = ""; - object.destination = ""; - object.filter = ""; - object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; - object.writerIdentity = ""; - object.includeChildren = false; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.disabled = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = message.destination; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - object.writerIdentity = message.writerIdentity; - if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) - object.includeChildren = message.includeChildren; - if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { - object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); - if (options.oneofs) - object.options = "bigqueryOptions"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.exclusions && message.exclusions.length) { - object.exclusions = []; - for (var j = 0; j < message.exclusions.length; ++j) - object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this LogSink to JSON. - * @function toJSON - * @memberof google.logging.v2.LogSink - * @instance - * @returns {Object.} JSON object - */ - LogSink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; - /** - * VersionFormat enum. - * @name google.logging.v2.LogSink.VersionFormat - * @enum {number} - * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value - * @property {number} V2=1 V2 value - * @property {number} V1=2 V1 value - */ - LogSink.VersionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "V2"] = 1; - values[valuesById[2] = "V1"] = 2; - return values; - })(); + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; - return LogSink; - })(); + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; - v2.BigQueryOptions = (function() { + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a BigQueryOptions. - * @memberof google.logging.v2 - * @interface IBigQueryOptions - * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables - * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning - */ + return MethodDescriptorProto; + })(); - /** - * Constructs a new BigQueryOptions. - * @memberof google.logging.v2 - * @classdesc Represents a BigQueryOptions. - * @implements IBigQueryOptions - * @constructor - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - */ - function BigQueryOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.FileOptions = (function() { - /** - * BigQueryOptions usePartitionedTables. - * @member {boolean} usePartitionedTables - * @memberof google.logging.v2.BigQueryOptions - * @instance - */ - BigQueryOptions.prototype.usePartitionedTables = false; + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ - /** - * BigQueryOptions usesTimestampColumnPartitioning. - * @member {boolean} usesTimestampColumnPartitioning - * @memberof google.logging.v2.BigQueryOptions - * @instance - */ - BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new BigQueryOptions instance using the specified properties. - * @function create - * @memberof google.logging.v2.BigQueryOptions - * @static - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance - */ - BigQueryOptions.create = function create(properties) { - return new BigQueryOptions(properties); - }; + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; - /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.BigQueryOptions - * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.usePartitionedTables != null && Object.hasOwnProperty.call(message, "usePartitionedTables")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); - if (message.usesTimestampColumnPartitioning != null && Object.hasOwnProperty.call(message, "usesTimestampColumnPartitioning")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); - return writer; - }; + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; - /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.BigQueryOptions - * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; - /** - * Decodes a BigQueryOptions message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.BigQueryOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.usePartitionedTables = reader.bool(); - break; - case 3: - message.usesTimestampColumnPartitioning = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; - /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.BigQueryOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; - /** - * Verifies a BigQueryOptions message. - * @function verify - * @memberof google.logging.v2.BigQueryOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - if (typeof message.usePartitionedTables !== "boolean") - return "usePartitionedTables: boolean expected"; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - if (typeof message.usesTimestampColumnPartitioning !== "boolean") - return "usesTimestampColumnPartitioning: boolean expected"; - return null; - }; + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; - /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.BigQueryOptions - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions - */ - BigQueryOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.BigQueryOptions) - return object; - var message = new $root.google.logging.v2.BigQueryOptions(); - if (object.usePartitionedTables != null) - message.usePartitionedTables = Boolean(object.usePartitionedTables); - if (object.usesTimestampColumnPartitioning != null) - message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); - return message; - }; + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; - /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.BigQueryOptions - * @static - * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.usePartitionedTables = false; - object.usesTimestampColumnPartitioning = false; - } - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - object.usePartitionedTables = message.usePartitionedTables; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; - return object; - }; + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; - /** - * Converts this BigQueryOptions to JSON. - * @function toJSON - * @memberof google.logging.v2.BigQueryOptions - * @instance - * @returns {Object.} JSON object - */ - BigQueryOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; - return BigQueryOptions; - })(); + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; - v2.ListBucketsRequest = (function() { + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; - /** - * Properties of a ListBucketsRequest. - * @memberof google.logging.v2 - * @interface IListBucketsRequest - * @property {string|null} [parent] ListBucketsRequest parent - * @property {string|null} [pageToken] ListBucketsRequest pageToken - * @property {number|null} [pageSize] ListBucketsRequest pageSize - */ + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; - /** - * Constructs a new ListBucketsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListBucketsRequest. - * @implements IListBucketsRequest - * @constructor - * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set - */ - function ListBucketsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; - /** - * ListBucketsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListBucketsRequest - * @instance - */ - ListBucketsRequest.prototype.parent = ""; + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; - /** - * ListBucketsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListBucketsRequest - * @instance - */ - ListBucketsRequest.prototype.pageToken = ""; + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; - /** - * ListBucketsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListBucketsRequest - * @instance - */ - ListBucketsRequest.prototype.pageSize = 0; + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; - /** - * Creates a new ListBucketsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListBucketsRequest - * @static - * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance - */ - ListBucketsRequest.create = function create(properties) { - return new ListBucketsRequest(properties); - }; + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; - /** - * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListBucketsRequest - * @static - * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBucketsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - return writer; - }; + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; - /** - * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListBucketsRequest - * @static - * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; - /** - * Decodes a ListBucketsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListBucketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBucketsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; - /** - * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListBucketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Verifies a ListBucketsRequest message. - * @function verify - * @memberof google.logging.v2.ListBucketsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBucketsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - return null; - }; + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - /** - * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListBucketsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest - */ - ListBucketsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListBucketsRequest) - return object; - var message = new $root.google.logging.v2.ListBucketsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; - }; + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; - /** - * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListBucketsRequest - * @static - * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBucketsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - return object; - }; - - /** - * Converts this ListBucketsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListBucketsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBucketsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListBucketsRequest; - })(); + } + return message; + }; - v2.ListBucketsResponse = (function() { + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a ListBucketsResponse. - * @memberof google.logging.v2 - * @interface IListBucketsResponse - * @property {Array.|null} [buckets] ListBucketsResponse buckets - * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken - */ + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; - /** - * Constructs a new ListBucketsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListBucketsResponse. - * @implements IListBucketsResponse - * @constructor - * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set - */ - function ListBucketsResponse(properties) { - this.buckets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; - /** - * ListBucketsResponse buckets. - * @member {Array.} buckets - * @memberof google.logging.v2.ListBucketsResponse - * @instance - */ - ListBucketsResponse.prototype.buckets = $util.emptyArray; - - /** - * ListBucketsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListBucketsResponse - * @instance - */ - ListBucketsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListBucketsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListBucketsResponse - * @static - * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance - */ - ListBucketsResponse.create = function create(properties) { - return new ListBucketsResponse(properties); - }; - - /** - * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListBucketsResponse - * @static - * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBucketsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.buckets != null && message.buckets.length) - for (var i = 0; i < message.buckets.length; ++i) - $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListBucketsResponse - * @static - * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; - /** - * Decodes a ListBucketsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListBucketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBucketsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.buckets && message.buckets.length)) - message.buckets = []; - message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListBucketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); - /** - * Verifies a ListBucketsResponse message. - * @function verify - * @memberof google.logging.v2.ListBucketsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBucketsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.buckets != null && message.hasOwnProperty("buckets")) { - if (!Array.isArray(message.buckets)) - return "buckets: array expected"; - for (var i = 0; i < message.buckets.length; ++i) { - var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); - if (error) - return "buckets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + return FileOptions; + })(); - /** - * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListBucketsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse - */ - ListBucketsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListBucketsResponse) - return object; - var message = new $root.google.logging.v2.ListBucketsResponse(); - if (object.buckets) { - if (!Array.isArray(object.buckets)) - throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); - message.buckets = []; - for (var i = 0; i < object.buckets.length; ++i) { - if (typeof object.buckets[i] !== "object") - throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); - message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + protobuf.MessageOptions = (function() { - /** - * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListBucketsResponse - * @static - * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBucketsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.buckets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.buckets && message.buckets.length) { - object.buckets = []; - for (var j = 0; j < message.buckets.length; ++j) - object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ - /** - * Converts this ListBucketsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListBucketsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBucketsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return ListBucketsResponse; - })(); + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; - v2.CreateBucketRequest = (function() { + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; - /** - * Properties of a CreateBucketRequest. - * @memberof google.logging.v2 - * @interface ICreateBucketRequest - * @property {string|null} [parent] CreateBucketRequest parent - * @property {string|null} [bucketId] CreateBucketRequest bucketId - * @property {google.logging.v2.ILogBucket|null} [bucket] CreateBucketRequest bucket - */ + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; - /** - * Constructs a new CreateBucketRequest. - * @memberof google.logging.v2 - * @classdesc Represents a CreateBucketRequest. - * @implements ICreateBucketRequest - * @constructor - * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set - */ - function CreateBucketRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; - /** - * CreateBucketRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateBucketRequest - * @instance - */ - CreateBucketRequest.prototype.parent = ""; + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * CreateBucketRequest bucketId. - * @member {string} bucketId - * @memberof google.logging.v2.CreateBucketRequest - * @instance - */ - CreateBucketRequest.prototype.bucketId = ""; + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; - /** - * CreateBucketRequest bucket. - * @member {google.logging.v2.ILogBucket|null|undefined} bucket - * @memberof google.logging.v2.CreateBucketRequest - * @instance - */ - CreateBucketRequest.prototype.bucket = null; + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new CreateBucketRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateBucketRequest - * @static - * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest instance - */ - CreateBucketRequest.create = function create(properties) { - return new CreateBucketRequest(properties); - }; + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified CreateBucketRequest message. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateBucketRequest - * @static - * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBucketRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.bucketId != null && Object.hasOwnProperty.call(message, "bucketId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketId); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified CreateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateBucketRequest - * @static - * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; - /** - * Decodes a CreateBucketRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBucketRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateBucketRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.bucketId = reader.string(); - break; - case 3: - message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } - return message; - }; + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; - /** - * Decodes a CreateBucketRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBucketRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a CreateBucketRequest message. - * @function verify - * @memberof google.logging.v2.CreateBucketRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBucketRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.bucketId != null && message.hasOwnProperty("bucketId")) - if (!$util.isString(message.bucketId)) - return "bucketId: string expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) { - var error = $root.google.logging.v2.LogBucket.verify(message.bucket); - if (error) - return "bucket." + error; - } - return null; - }; + return MessageOptions; + })(); - /** - * Creates a CreateBucketRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateBucketRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest - */ - CreateBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateBucketRequest) - return object; - var message = new $root.google.logging.v2.CreateBucketRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.bucketId != null) - message.bucketId = String(object.bucketId); - if (object.bucket != null) { - if (typeof object.bucket !== "object") - throw TypeError(".google.logging.v2.CreateBucketRequest.bucket: object expected"); - message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); - } - return message; - }; + protobuf.FieldOptions = (function() { - /** - * Creates a plain object from a CreateBucketRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateBucketRequest - * @static - * @param {google.logging.v2.CreateBucketRequest} message CreateBucketRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBucketRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.bucketId = ""; - object.bucket = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.bucketId != null && message.hasOwnProperty("bucketId")) - object.bucketId = message.bucketId; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); - return object; - }; + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ - /** - * Converts this CreateBucketRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateBucketRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBucketRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return CreateBucketRequest; - })(); + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; - v2.UpdateBucketRequest = (function() { + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; - /** - * Properties of an UpdateBucketRequest. - * @memberof google.logging.v2 - * @interface IUpdateBucketRequest - * @property {string|null} [name] UpdateBucketRequest name - * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask - */ + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; - /** - * Constructs a new UpdateBucketRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateBucketRequest. - * @implements IUpdateBucketRequest - * @constructor - * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set - */ - function UpdateBucketRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; - /** - * UpdateBucketRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateBucketRequest - * @instance - */ - UpdateBucketRequest.prototype.name = ""; + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; - /** - * UpdateBucketRequest bucket. - * @member {google.logging.v2.ILogBucket|null|undefined} bucket - * @memberof google.logging.v2.UpdateBucketRequest - * @instance - */ - UpdateBucketRequest.prototype.bucket = null; + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; - /** - * UpdateBucketRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateBucketRequest - * @instance - */ - UpdateBucketRequest.prototype.updateMask = null; + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Creates a new UpdateBucketRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateBucketRequest - * @static - * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance - */ - UpdateBucketRequest.create = function create(properties) { - return new UpdateBucketRequest(properties); - }; + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - /** - * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateBucketRequest - * @static - * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBucketRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; - /** - * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateBucketRequest - * @static - * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; - /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBucketRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; - /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an UpdateBucketRequest message. - * @function verify - * @memberof google.logging.v2.UpdateBucketRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBucketRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) { - var error = $root.google.logging.v2.LogBucket.verify(message.bucket); - if (error) - return "bucket." + error; + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; } - return null; - }; - - /** - * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateBucketRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest - */ - UpdateBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateBucketRequest) - return object; - var message = new $root.google.logging.v2.UpdateBucketRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.bucket != null) { - if (typeof object.bucket !== "object") - throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); - message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; } - return message; - }; + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; - /** - * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateBucketRequest - * @static - * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBucketRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.bucket = null; - object.updateMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) return object; - }; - - /** - * Converts this UpdateBucketRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateBucketRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBucketRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpdateBucketRequest; - })(); - - v2.GetBucketRequest = (function() { - - /** - * Properties of a GetBucketRequest. - * @memberof google.logging.v2 - * @interface IGetBucketRequest - * @property {string|null} [name] GetBucketRequest name - */ - - /** - * Constructs a new GetBucketRequest. - * @memberof google.logging.v2 - * @classdesc Represents a GetBucketRequest. - * @implements IGetBucketRequest - * @constructor - * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set - */ - function GetBucketRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; } - - /** - * GetBucketRequest name. - * @member {string} name - * @memberof google.logging.v2.GetBucketRequest - * @instance - */ - GetBucketRequest.prototype.name = ""; - - /** - * Creates a new GetBucketRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.GetBucketRequest - * @static - * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance - */ - GetBucketRequest.create = function create(properties) { - return new GetBucketRequest(properties); - }; - - /** - * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.GetBucketRequest - * @static - * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBucketRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.GetBucketRequest - * @static - * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBucketRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.GetBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBucketRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": case 1: - message.name = reader.string(); + message[".google.api.fieldBehavior"][i] = 1; break; - default: - reader.skipType(tag & 7); + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; break; } - } - return message; - }; - - /** - * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.GetBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBucketRequest message. - * @function verify - * @memberof google.logging.v2.GetBucketRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBucketRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.GetBucketRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest - */ - GetBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetBucketRequest) - return object; - var message = new $root.google.logging.v2.GetBucketRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; - /** - * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.GetBucketRequest - * @static - * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBucketRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; - /** - * Converts this GetBucketRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.GetBucketRequest - * @instance - * @returns {Object.} JSON object - */ - GetBucketRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GetBucketRequest; + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; })(); - v2.DeleteBucketRequest = (function() { - - /** - * Properties of a DeleteBucketRequest. - * @memberof google.logging.v2 - * @interface IDeleteBucketRequest - * @property {string|null} [name] DeleteBucketRequest name - */ - - /** - * Constructs a new DeleteBucketRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteBucketRequest. - * @implements IDeleteBucketRequest - * @constructor - * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set - */ - function DeleteBucketRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBucketRequest name. - * @member {string} name - * @memberof google.logging.v2.DeleteBucketRequest - * @instance - */ - DeleteBucketRequest.prototype.name = ""; + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); - /** - * Creates a new DeleteBucketRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.DeleteBucketRequest - * @static - * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest instance - */ - DeleteBucketRequest.create = function create(properties) { - return new DeleteBucketRequest(properties); - }; + return FieldOptions; + })(); - /** - * Encodes the specified DeleteBucketRequest message. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.DeleteBucketRequest - * @static - * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBucketRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + protobuf.OneofOptions = (function() { - /** - * Encodes the specified DeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.DeleteBucketRequest - * @static - * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ - /** - * Decodes a DeleteBucketRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.DeleteBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBucketRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteBucketRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a DeleteBucketRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.DeleteBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Verifies a DeleteBucketRequest message. - * @function verify - * @memberof google.logging.v2.DeleteBucketRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBucketRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; - /** - * Creates a DeleteBucketRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteBucketRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest - */ - DeleteBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteBucketRequest) - return object; - var message = new $root.google.logging.v2.DeleteBucketRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from a DeleteBucketRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteBucketRequest - * @static - * @param {google.logging.v2.DeleteBucketRequest} message DeleteBucketRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBucketRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this DeleteBucketRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteBucketRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBucketRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return DeleteBucketRequest; - })(); + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - v2.UndeleteBucketRequest = (function() { + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - /** - * Properties of an UndeleteBucketRequest. - * @memberof google.logging.v2 - * @interface IUndeleteBucketRequest - * @property {string|null} [name] UndeleteBucketRequest name - */ + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * Constructs a new UndeleteBucketRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UndeleteBucketRequest. - * @implements IUndeleteBucketRequest - * @constructor - * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set - */ - function UndeleteBucketRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + return object; + }; - /** - * UndeleteBucketRequest name. - * @member {string} name - * @memberof google.logging.v2.UndeleteBucketRequest - * @instance - */ - UndeleteBucketRequest.prototype.name = ""; + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new UndeleteBucketRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UndeleteBucketRequest - * @static - * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest instance - */ - UndeleteBucketRequest.create = function create(properties) { - return new UndeleteBucketRequest(properties); - }; + return OneofOptions; + })(); - /** - * Encodes the specified UndeleteBucketRequest message. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UndeleteBucketRequest - * @static - * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UndeleteBucketRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + protobuf.EnumOptions = (function() { - /** - * Encodes the specified UndeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UndeleteBucketRequest - * @static - * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UndeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ - /** - * Decodes an UndeleteBucketRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UndeleteBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UndeleteBucketRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UndeleteBucketRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an UndeleteBucketRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UndeleteBucketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UndeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; - /** - * Verifies an UndeleteBucketRequest message. - * @function verify - * @memberof google.logging.v2.UndeleteBucketRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UndeleteBucketRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; - /** - * Creates an UndeleteBucketRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UndeleteBucketRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest - */ - UndeleteBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UndeleteBucketRequest) - return object; - var message = new $root.google.logging.v2.UndeleteBucketRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Creates a plain object from an UndeleteBucketRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UndeleteBucketRequest - * @static - * @param {google.logging.v2.UndeleteBucketRequest} message UndeleteBucketRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UndeleteBucketRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; - /** - * Converts this UndeleteBucketRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UndeleteBucketRequest - * @instance - * @returns {Object.} JSON object - */ - UndeleteBucketRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - return UndeleteBucketRequest; - })(); + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - v2.ListViewsRequest = (function() { + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a ListViewsRequest. - * @memberof google.logging.v2 - * @interface IListViewsRequest - * @property {string|null} [parent] ListViewsRequest parent - * @property {string|null} [pageToken] ListViewsRequest pageToken - * @property {number|null} [pageSize] ListViewsRequest pageSize - */ + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new ListViewsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListViewsRequest. - * @implements IListViewsRequest - * @constructor - * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set - */ - function ListViewsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } + return null; + }; - /** - * ListViewsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListViewsRequest - * @instance - */ - ListViewsRequest.prototype.parent = ""; + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * ListViewsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListViewsRequest - * @instance - */ - ListViewsRequest.prototype.pageToken = ""; + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * ListViewsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListViewsRequest - * @instance - */ - ListViewsRequest.prototype.pageSize = 0; + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new ListViewsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListViewsRequest - * @static - * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest instance - */ - ListViewsRequest.create = function create(properties) { - return new ListViewsRequest(properties); - }; + return EnumOptions; + })(); - /** - * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListViewsRequest - * @static - * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListViewsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - return writer; - }; + protobuf.EnumValueOptions = (function() { - /** - * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListViewsRequest - * @static - * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ - /** - * Decodes a ListViewsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListViewsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListViewsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListViewsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListViewsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; - /** - * Verifies a ListViewsRequest message. - * @function verify - * @memberof google.logging.v2.ListViewsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListViewsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - return null; - }; + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListViewsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest - */ - ListViewsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListViewsRequest) - return object; - var message = new $root.google.logging.v2.ListViewsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; - }; + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; - /** - * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListViewsRequest - * @static - * @param {google.logging.v2.ListViewsRequest} message ListViewsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListViewsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - return object; - }; + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - /** - * Converts this ListViewsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListViewsRequest - * @instance - * @returns {Object.} JSON object - */ - ListViewsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return ListViewsRequest; - })(); + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - v2.ListViewsResponse = (function() { + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a ListViewsResponse. - * @memberof google.logging.v2 - * @interface IListViewsResponse - * @property {Array.|null} [views] ListViewsResponse views - * @property {string|null} [nextPageToken] ListViewsResponse nextPageToken - */ + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - /** - * Constructs a new ListViewsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListViewsResponse. - * @implements IListViewsResponse - * @constructor - * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set - */ - function ListViewsResponse(properties) { - this.views = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } + return message; + }; - /** - * ListViewsResponse views. - * @member {Array.} views - * @memberof google.logging.v2.ListViewsResponse - * @instance - */ - ListViewsResponse.prototype.views = $util.emptyArray; + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * ListViewsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListViewsResponse - * @instance - */ - ListViewsResponse.prototype.nextPageToken = ""; + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new ListViewsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListViewsResponse - * @static - * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse instance - */ - ListViewsResponse.create = function create(properties) { - return new ListViewsResponse(properties); - }; + return EnumValueOptions; + })(); - /** - * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListViewsResponse - * @static - * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListViewsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.views != null && message.views.length) - for (var i = 0; i < message.views.length; ++i) - $root.google.logging.v2.LogView.encode(message.views[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + protobuf.ServiceOptions = (function() { - /** - * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListViewsResponse - * @static - * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a ListViewsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListViewsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListViewsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.views && message.views.length)) - message.views = []; - message.views.push($root.google.logging.v2.LogView.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; - /** - * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListViewsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListViewsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Verifies a ListViewsResponse message. - * @function verify - * @memberof google.logging.v2.ListViewsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListViewsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.views != null && message.hasOwnProperty("views")) { - if (!Array.isArray(message.views)) - return "views: array expected"; - for (var i = 0; i < message.views.length; ++i) { - var error = $root.google.logging.v2.LogView.verify(message.views[i]); - if (error) - return "views." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; - /** - * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListViewsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse - */ - ListViewsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListViewsResponse) - return object; - var message = new $root.google.logging.v2.ListViewsResponse(); - if (object.views) { - if (!Array.isArray(object.views)) - throw TypeError(".google.logging.v2.ListViewsResponse.views: array expected"); - message.views = []; - for (var i = 0; i < object.views.length; ++i) { - if (typeof object.views[i] !== "object") - throw TypeError(".google.logging.v2.ListViewsResponse.views: object expected"); - message.views[i] = $root.google.logging.v2.LogView.fromObject(object.views[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - /** - * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListViewsResponse - * @static - * @param {google.logging.v2.ListViewsResponse} message ListViewsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListViewsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.views = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.views && message.views.length) { - object.views = []; - for (var j = 0; j < message.views.length; ++j) - object.views[j] = $root.google.logging.v2.LogView.toObject(message.views[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; - /** - * Converts this ListViewsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListViewsResponse - * @instance - * @returns {Object.} JSON object - */ - ListViewsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; - return ListViewsResponse; - })(); + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - v2.CreateViewRequest = (function() { + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a CreateViewRequest. - * @memberof google.logging.v2 - * @interface ICreateViewRequest - * @property {string|null} [parent] CreateViewRequest parent - * @property {string|null} [viewId] CreateViewRequest viewId - * @property {google.logging.v2.ILogView|null} [view] CreateViewRequest view - */ + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new CreateViewRequest. - * @memberof google.logging.v2 - * @classdesc Represents a CreateViewRequest. - * @implements ICreateViewRequest - * @constructor - * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set - */ - function CreateViewRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; - /** - * CreateViewRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateViewRequest - * @instance - */ - CreateViewRequest.prototype.parent = ""; - - /** - * CreateViewRequest viewId. - * @member {string} viewId - * @memberof google.logging.v2.CreateViewRequest - * @instance - */ - CreateViewRequest.prototype.viewId = ""; + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; - /** - * CreateViewRequest view. - * @member {google.logging.v2.ILogView|null|undefined} view - * @memberof google.logging.v2.CreateViewRequest - * @instance - */ - CreateViewRequest.prototype.view = null; + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; - /** - * Creates a new CreateViewRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateViewRequest - * @static - * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest instance - */ - CreateViewRequest.create = function create(properties) { - return new CreateViewRequest(properties); - }; + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateViewRequest - * @static - * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateViewRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.viewId != null && Object.hasOwnProperty.call(message, "viewId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.viewId); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + return ServiceOptions; + })(); - /** - * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateViewRequest - * @static - * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + protobuf.MethodOptions = (function() { - /** - * Decodes a CreateViewRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateViewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateViewRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateViewRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.viewId = reader.string(); - break; - case 3: - message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ - /** - * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateViewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateViewRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies a CreateViewRequest message. - * @function verify - * @memberof google.logging.v2.CreateViewRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateViewRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.viewId != null && message.hasOwnProperty("viewId")) - if (!$util.isString(message.viewId)) - return "viewId: string expected"; - if (message.view != null && message.hasOwnProperty("view")) { - var error = $root.google.logging.v2.LogView.verify(message.view); - if (error) - return "view." + error; - } - return null; - }; + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; - /** - * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateViewRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest - */ - CreateViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateViewRequest) - return object; - var message = new $root.google.logging.v2.CreateViewRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.viewId != null) - message.viewId = String(object.viewId); - if (object.view != null) { - if (typeof object.view !== "object") - throw TypeError(".google.logging.v2.CreateViewRequest.view: object expected"); - message.view = $root.google.logging.v2.LogView.fromObject(object.view); - } - return message; - }; + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; - /** - * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateViewRequest - * @static - * @param {google.logging.v2.CreateViewRequest} message CreateViewRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateViewRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.viewId = ""; - object.view = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.viewId != null && message.hasOwnProperty("viewId")) - object.viewId = message.viewId; - if (message.view != null && message.hasOwnProperty("view")) - object.view = $root.google.logging.v2.LogView.toObject(message.view, options); - return object; - }; + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Converts this CreateViewRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateViewRequest - * @instance - * @returns {Object.} JSON object - */ - CreateViewRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; - return CreateViewRequest; - })(); + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - v2.UpdateViewRequest = (function() { + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; - /** - * Properties of an UpdateViewRequest. - * @memberof google.logging.v2 - * @interface IUpdateViewRequest - * @property {string|null} [name] UpdateViewRequest name - * @property {google.logging.v2.ILogView|null} [view] UpdateViewRequest view - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateViewRequest updateMask - */ + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; - /** - * Constructs a new UpdateViewRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateViewRequest. - * @implements IUpdateViewRequest - * @constructor - * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set - */ - function UpdateViewRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * UpdateViewRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateViewRequest - * @instance - */ - UpdateViewRequest.prototype.name = ""; - - /** - * UpdateViewRequest view. - * @member {google.logging.v2.ILogView|null|undefined} view - * @memberof google.logging.v2.UpdateViewRequest - * @instance - */ - UpdateViewRequest.prototype.view = null; - - /** - * UpdateViewRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateViewRequest - * @instance - */ - UpdateViewRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateViewRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateViewRequest - * @static - * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest instance - */ - UpdateViewRequest.create = function create(properties) { - return new UpdateViewRequest(properties); - }; - - /** - * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateViewRequest - * @static - * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateViewRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateViewRequest - * @static - * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; - /** - * Decodes an UpdateViewRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateViewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateViewRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateViewRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } - return message; - }; + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; - /** - * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateViewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateViewRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies an UpdateViewRequest message. - * @function verify - * @memberof google.logging.v2.UpdateViewRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateViewRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) { - var error = $root.google.logging.v2.LogView.verify(message.view); - if (error) - return "view." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); - /** - * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateViewRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest - */ - UpdateViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateViewRequest) - return object; - var message = new $root.google.logging.v2.UpdateViewRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.view != null) { - if (typeof object.view !== "object") - throw TypeError(".google.logging.v2.UpdateViewRequest.view: object expected"); - message.view = $root.google.logging.v2.LogView.fromObject(object.view); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateViewRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + return MethodOptions; + })(); - /** - * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateViewRequest - * @static - * @param {google.logging.v2.UpdateViewRequest} message UpdateViewRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateViewRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = null; - object.updateMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = $root.google.logging.v2.LogView.toObject(message.view, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + protobuf.UninterpretedOption = (function() { - /** - * Converts this UpdateViewRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateViewRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateViewRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ - return UpdateViewRequest; - })(); + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - v2.GetViewRequest = (function() { + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; - /** - * Properties of a GetViewRequest. - * @memberof google.logging.v2 - * @interface IGetViewRequest - * @property {string|null} [name] GetViewRequest name - */ + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; - /** - * Constructs a new GetViewRequest. - * @memberof google.logging.v2 - * @classdesc Represents a GetViewRequest. - * @implements IGetViewRequest - * @constructor - * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set - */ - function GetViewRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * GetViewRequest name. - * @member {string} name - * @memberof google.logging.v2.GetViewRequest - * @instance - */ - GetViewRequest.prototype.name = ""; + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a new GetViewRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.GetViewRequest - * @static - * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetViewRequest} GetViewRequest instance - */ - GetViewRequest.create = function create(properties) { - return new GetViewRequest(properties); - }; + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; - /** - * Encodes the specified GetViewRequest message. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.GetViewRequest - * @static - * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetViewRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; - /** - * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.GetViewRequest - * @static - * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetViewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; - /** - * Decodes a GetViewRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.GetViewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetViewRequest} GetViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetViewRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetViewRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.GetViewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetViewRequest} GetViewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetViewRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a GetViewRequest message. - * @function verify - * @memberof google.logging.v2.GetViewRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetViewRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.GetViewRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.GetViewRequest} GetViewRequest - */ - GetViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetViewRequest) - return object; - var message = new $root.google.logging.v2.GetViewRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; - /** - * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.GetViewRequest - * @static - * @param {google.logging.v2.GetViewRequest} message GetViewRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetViewRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - }; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; - /** - * Converts this GetViewRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.GetViewRequest - * @instance - * @returns {Object.} JSON object - */ - GetViewRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; - return GetViewRequest; - })(); + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.DeleteViewRequest = (function() { + UninterpretedOption.NamePart = (function() { /** - * Properties of a DeleteViewRequest. - * @memberof google.logging.v2 - * @interface IDeleteViewRequest - * @property {string|null} [name] DeleteViewRequest name + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension */ /** - * Constructs a new DeleteViewRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteViewRequest. - * @implements IDeleteViewRequest + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart * @constructor - * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set */ - function DeleteViewRequest(properties) { + function NamePart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9450,188 +7728,423 @@ } /** - * DeleteViewRequest name. - * @member {string} name - * @memberof google.logging.v2.DeleteViewRequest + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - DeleteViewRequest.prototype.name = ""; + NamePart.prototype.namePart = ""; /** - * Creates a new DeleteViewRequest instance using the specified properties. + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest instance + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance */ - DeleteViewRequest.create = function create(properties) { - return new DeleteViewRequest(properties); + NamePart.create = function create(properties) { + return new NamePart(properties); }; /** - * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteViewRequest.encode = function encode(message, writer) { + NamePart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); return writer; }; /** - * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + NamePart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer. + * Decodes a NamePart message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteViewRequest.decode = function decode(reader, length) { + NamePart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); break; default: reader.skipType(tag & 7); break; } } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteViewRequest.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteViewRequest message. + * Verifies a NamePart message. * @function verify - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteViewRequest.verify = function verify(message) { + NamePart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; return null; }; /** - * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - DeleteViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteViewRequest) + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; - var message = new $root.google.logging.v2.DeleteViewRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); return message; }; /** - * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * Creates a plain object from a NamePart message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.logging.v2.DeleteViewRequest} message DeleteViewRequest + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteViewRequest.toObject = function toObject(message, options) { + NamePart.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; return object; }; /** - * Converts this DeleteViewRequest to JSON. + * Converts this NamePart to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance * @returns {Object.} JSON object */ - DeleteViewRequest.prototype.toJSON = function toJSON() { + NamePart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteViewRequest; - })(); + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.ListSinksRequest = (function() { + SourceCodeInfo.Location = (function() { /** - * Properties of a ListSinksRequest. - * @memberof google.logging.v2 - * @interface IListSinksRequest - * @property {string|null} [parent] ListSinksRequest parent - * @property {string|null} [pageToken] ListSinksRequest pageToken - * @property {number|null} [pageSize] ListSinksRequest pageSize + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments */ /** - * Constructs a new ListSinksRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListSinksRequest. - * @implements IListSinksRequest + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation * @constructor - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set */ - function ListSinksRequest(properties) { + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9639,101 +8152,152 @@ } /** - * ListSinksRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListSinksRequest + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - ListSinksRequest.prototype.parent = ""; + Location.prototype.path = $util.emptyArray; /** - * ListSinksRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListSinksRequest + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - ListSinksRequest.prototype.pageToken = ""; + Location.prototype.span = $util.emptyArray; /** - * ListSinksRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListSinksRequest + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - ListSinksRequest.prototype.pageSize = 0; + Location.prototype.leadingComments = ""; /** - * Creates a new ListSinksRequest instance using the specified properties. + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance */ - ListSinksRequest.create = function create(properties) { - return new ListSinksRequest(properties); + Location.create = function create(properties) { + return new Location(properties); }; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encode = function encode(message, writer) { + Location.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); return writer; }; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + Location.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decode = function decode(reader, length) { + Location.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); break; case 2: - message.pageToken = reader.string(); + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); break; case 3: - message.pageSize = reader.int32(); + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -9744,126 +8308,390 @@ }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksRequest message. + * Verifies a Location message. * @function verify - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksRequest.verify = function verify(message) { + Location.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } return null; }; /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Location message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - ListSinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksRequest) + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; - var message = new $root.google.logging.v2.ListSinksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } return message; }; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * Creates a plain object from a Location message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {google.protobuf.SourceCodeInfo.Location} message Location * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksRequest.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; return object; }; /** - * Converts this ListSinksRequest to JSON. + * Converts this Location to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.protobuf.SourceCodeInfo.Location * @instance * @returns {Object.} JSON object */ - ListSinksRequest.prototype.toJSON = function toJSON() { + Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksRequest; - })(); + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2.ListSinksResponse = (function() { + GeneratedCodeInfo.Annotation = (function() { /** - * Properties of a ListSinksResponse. - * @memberof google.logging.v2 - * @interface IListSinksResponse - * @property {Array.|null} [sinks] ListSinksResponse sinks - * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end */ /** - * Constructs a new ListSinksResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListSinksResponse. - * @implements IListSinksResponse + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation * @constructor - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set */ - function ListSinksResponse(properties) { - this.sinks = []; + function Annotation(properties) { + this.path = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9871,91 +8699,125 @@ } /** - * ListSinksResponse sinks. - * @member {Array.} sinks - * @memberof google.logging.v2.ListSinksResponse + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - ListSinksResponse.prototype.sinks = $util.emptyArray; + Annotation.prototype.path = $util.emptyArray; /** - * ListSinksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListSinksResponse + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - ListSinksResponse.prototype.nextPageToken = ""; + Annotation.prototype.sourceFile = ""; /** - * Creates a new ListSinksResponse instance using the specified properties. + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance */ - ListSinksResponse.create = function create(properties) { - return new ListSinksResponse(properties); + Annotation.create = function create(properties) { + return new Annotation(properties); }; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encode = function encode(message, writer) { + Annotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinks != null && message.sinks.length) - for (var i = 0; i < message.sinks.length; ++i) - $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + Annotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decode = function decode(reader, length) { + Annotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.sinks && message.sinks.length)) - message.sinks = []; - message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); break; case 2: - message.nextPageToken = reader.string(); + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); break; default: reader.skipType(tag & 7); @@ -9966,1550 +8828,1803 @@ }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + Annotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksResponse message. + * Verifies an Annotation message. * @function verify - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksResponse.verify = function verify(message) { + Annotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinks != null && message.hasOwnProperty("sinks")) { - if (!Array.isArray(message.sinks)) - return "sinks: array expected"; - for (var i = 0; i < message.sinks.length; ++i) { - var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); - if (error) - return "sinks." + error; - } + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; return null; }; /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation */ - ListSinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksResponse) + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; - var message = new $root.google.logging.v2.ListSinksResponse(); - if (object.sinks) { - if (!Array.isArray(object.sinks)) - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); - message.sinks = []; - for (var i = 0; i < object.sinks.length; ++i) { - if (typeof object.sinks[i] !== "object") - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); - message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); - } + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; return message; }; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksResponse.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.sinks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.sinks && message.sinks.length) { - object.sinks = []; - for (var j = 0; j < message.sinks.length; ++j) - object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; return object; }; /** - * Converts this ListSinksResponse to JSON. + * Converts this Annotation to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance * @returns {Object.} JSON object */ - ListSinksResponse.prototype.toJSON = function toJSON() { + Annotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSinksResponse; + return Annotation; })(); - v2.GetSinkRequest = (function() { + return GeneratedCodeInfo; + })(); - /** - * Properties of a GetSinkRequest. - * @memberof google.logging.v2 - * @interface IGetSinkRequest - * @property {string|null} [sinkName] GetSinkRequest sinkName - */ + protobuf.Struct = (function() { - /** - * Constructs a new GetSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents a GetSinkRequest. - * @implements IGetSinkRequest - * @constructor - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set - */ - function GetSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ - /** - * GetSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.GetSinkRequest - * @instance - */ - GetSinkRequest.prototype.sinkName = ""; + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new GetSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.GetSinkRequest - * @static - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance - */ - GetSinkRequest.create = function create(properties) { - return new GetSinkRequest(properties); - }; + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; - /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.GetSinkRequest - * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - return writer; - }; + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; - /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.GetSinkRequest - * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; - /** - * Decodes a GetSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.GetSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.fields[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; } - return message; - }; + } + return null; + }; - /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.GetSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; - /** - * Verifies a GetSinkRequest message. - * @function verify - * @memberof google.logging.v2.GetSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - return null; - }; + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; - /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.GetSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest - */ - GetSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetSinkRequest) - return object; - var message = new $root.google.logging.v2.GetSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - return message; - }; + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.GetSinkRequest - * @static - * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - return object; - }; + return Struct; + })(); - /** - * Converts this GetSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.GetSinkRequest - * @instance - * @returns {Object.} JSON object - */ - GetSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + protobuf.Value = (function() { - return GetSinkRequest; - })(); + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ - v2.CreateSinkRequest = (function() { + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a CreateSinkRequest. - * @memberof google.logging.v2 - * @interface ICreateSinkRequest - * @property {string|null} [parent] CreateSinkRequest parent - * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity - */ + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; - /** - * Constructs a new CreateSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents a CreateSinkRequest. - * @implements ICreateSinkRequest - * @constructor - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set - */ - function CreateSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; - /** - * CreateSinkRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.parent = ""; + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; - /** - * CreateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.sink = null; + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; - /** - * CreateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.uniqueWriterIdentity = false; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new CreateSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance - */ - CreateSinkRequest.create = function create(properties) { - return new CreateSinkRequest(properties); - }; + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - return writer; - }; + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; - /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nullValue = reader.int32(); + break; + case 2: + message.numberValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a CreateSinkRequest message. - * @function verify - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); if (error) - return "sink." + error; + return "structValue." + error; } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; - return null; - }; - - /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest - */ - CreateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateSinkRequest) - return object; - var message = new $root.google.logging.v2.CreateSinkRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); - return message; - }; + } + return null; + }; - /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateSinkRequest - * @static - * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.sink = null; - object.uniqueWriterIdentity = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - }; - - /** - * Converts this CreateSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateSinkRequest - * @instance - * @returns {Object.} JSON object - */ - CreateSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateSinkRequest; - })(); + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; - v2.UpdateSinkRequest = (function() { + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; - /** - * Properties of an UpdateSinkRequest. - * @memberof google.logging.v2 - * @interface IUpdateSinkRequest - * @property {string|null} [sinkName] UpdateSinkRequest sinkName - * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask - */ + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new UpdateSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateSinkRequest. - * @implements IUpdateSinkRequest - * @constructor - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set - */ - function UpdateSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return Value; + })(); - /** - * UpdateSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.sinkName = ""; + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); - /** - * UpdateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.sink = null; + protobuf.ListValue = (function() { - /** - * UpdateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.uniqueWriterIdentity = false; + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ - /** - * UpdateSinkRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.updateMask = null; + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new UpdateSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance - */ - UpdateSinkRequest.create = function create(properties) { - return new UpdateSinkRequest(properties); - }; + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; - /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; - /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; - case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an UpdateSinkRequest message. - * @function verify - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; - } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); if (error) - return "updateMask." + error; + return "values." + error; } - return null; - }; + } + return null; + }; - /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest - */ - UpdateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateSinkRequest) - return object; - var message = new $root.google.logging.v2.UpdateSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); - } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sinkName = ""; - object.sink = null; - object.uniqueWriterIdentity = false; - object.updateMask = null; - } - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; - /** - * Converts this UpdateSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return UpdateSinkRequest; - })(); + return ListValue; + })(); - v2.DeleteSinkRequest = (function() { + protobuf.Any = (function() { - /** - * Properties of a DeleteSinkRequest. - * @memberof google.logging.v2 - * @interface IDeleteSinkRequest - * @property {string|null} [sinkName] DeleteSinkRequest sinkName - */ + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ - /** - * Constructs a new DeleteSinkRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteSinkRequest. - * @implements IDeleteSinkRequest - * @constructor - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set - */ - function DeleteSinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * DeleteSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.DeleteSinkRequest - * @instance - */ - DeleteSinkRequest.prototype.sinkName = ""; - - /** - * Creates a new DeleteSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance - */ - DeleteSinkRequest.create = function create(properties) { - return new DeleteSinkRequest(properties); - }; + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSinkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - return writer; - }; + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; - /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; - /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSinkRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); } - return message; - }; + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; - /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a DeleteSinkRequest message. - * @function verify - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSinkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; - return null; - }; + return Any; + })(); - /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest - */ - DeleteSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteSinkRequest) - return object; - var message = new $root.google.logging.v2.DeleteSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); - return message; - }; + protobuf.Timestamp = (function() { - /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteSinkRequest - * @static - * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; - return object; - }; + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this DeleteSinkRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteSinkRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - return DeleteSinkRequest; - })(); + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; - v2.LogExclusion = (function() { + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; - /** - * Properties of a LogExclusion. - * @memberof google.logging.v2 - * @interface ILogExclusion - * @property {string|null} [name] LogExclusion name - * @property {string|null} [description] LogExclusion description - * @property {string|null} [filter] LogExclusion filter - * @property {boolean|null} [disabled] LogExclusion disabled - * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime - */ + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; - /** - * Constructs a new LogExclusion. - * @memberof google.logging.v2 - * @classdesc Represents a LogExclusion. - * @implements ILogExclusion - * @constructor - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set - */ - function LogExclusion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * LogExclusion name. - * @member {string} name - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.name = ""; + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * LogExclusion description. - * @member {string} description - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.description = ""; + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * LogExclusion filter. - * @member {string} filter - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.filter = ""; + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; - /** - * LogExclusion disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.disabled = false; + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; - /** - * LogExclusion createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.createTime = null; + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; - /** - * LogExclusion updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.updateTime = null; + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new LogExclusion instance using the specified properties. - * @function create - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set - * @returns {google.logging.v2.LogExclusion} LogExclusion instance - */ - LogExclusion.create = function create(properties) { - return new LogExclusion(properties); - }; + return Timestamp; + })(); - /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogExclusion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + protobuf.Empty = (function() { - /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ - /** - * Decodes a LogExclusion message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.LogExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogExclusion} LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogExclusion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.disabled = reader.bool(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.LogExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogExclusion} LogExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogExclusion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; - /** - * Verifies a LogExclusion message. - * @function verify - * @memberof google.logging.v2.LogExclusion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogExclusion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.LogExclusion - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.LogExclusion} LogExclusion - */ - LogExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogExclusion) - return object; - var message = new $root.google.logging.v2.LogExclusion(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.LogExclusion - * @static - * @param {google.logging.v2.LogExclusion} message LogExclusion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogExclusion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.disabled = false; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this LogExclusion to JSON. - * @function toJSON - * @memberof google.logging.v2.LogExclusion - * @instance - * @returns {Object.} JSON object - */ - LogExclusion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - return LogExclusion; - })(); + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; - v2.ListExclusionsRequest = (function() { + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; - /** - * Properties of a ListExclusionsRequest. - * @memberof google.logging.v2 - * @interface IListExclusionsRequest - * @property {string|null} [parent] ListExclusionsRequest parent - * @property {string|null} [pageToken] ListExclusionsRequest pageToken - * @property {number|null} [pageSize] ListExclusionsRequest pageSize - */ + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ListExclusionsRequest. - * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsRequest. - * @implements IListExclusionsRequest - * @constructor - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set - */ - function ListExclusionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return Empty; + })(); - /** - * ListExclusionsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.parent = ""; + protobuf.FieldMask = (function() { - /** - * ListExclusionsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.pageToken = ""; + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ - /** - * ListExclusionsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.pageSize = 0; + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ListExclusionsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance - */ - ListExclusionsRequest.create = function create(properties) { - return new ListExclusionsRequest(properties); - }; + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; - /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListExclusionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - return writer; - }; + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; - /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListExclusionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ListExclusionsRequest message. - * @function verify - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListExclusionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - return null; - }; + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest - */ - ListExclusionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsRequest) - return object; - var message = new $root.google.logging.v2.ListExclusionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; - }; + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; - /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListExclusionsRequest - * @static - * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListExclusionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) return object; - }; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; - /** - * Converts this ListExclusionsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListExclusionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListExclusionsRequest; - })(); + return FieldMask; + })(); - v2.ListExclusionsResponse = (function() { + return protobuf; + })(); + + google.logging = (function() { + + /** + * Namespace logging. + * @memberof google + * @namespace + */ + var logging = {}; + + logging.type = (function() { + + /** + * Namespace type. + * @memberof google.logging + * @namespace + */ + var type = {}; + + type.HttpRequest = (function() { /** - * Properties of a ListExclusionsResponse. - * @memberof google.logging.v2 - * @interface IListExclusionsResponse - * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions - * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken + * Properties of a HttpRequest. + * @memberof google.logging.type + * @interface IHttpRequest + * @property {string|null} [requestMethod] HttpRequest requestMethod + * @property {string|null} [requestUrl] HttpRequest requestUrl + * @property {number|Long|null} [requestSize] HttpRequest requestSize + * @property {number|null} [status] HttpRequest status + * @property {number|Long|null} [responseSize] HttpRequest responseSize + * @property {string|null} [userAgent] HttpRequest userAgent + * @property {string|null} [remoteIp] HttpRequest remoteIp + * @property {string|null} [serverIp] HttpRequest serverIp + * @property {string|null} [referer] HttpRequest referer + * @property {google.protobuf.IDuration|null} [latency] HttpRequest latency + * @property {boolean|null} [cacheLookup] HttpRequest cacheLookup + * @property {boolean|null} [cacheHit] HttpRequest cacheHit + * @property {boolean|null} [cacheValidatedWithOriginServer] HttpRequest cacheValidatedWithOriginServer + * @property {number|Long|null} [cacheFillBytes] HttpRequest cacheFillBytes + * @property {string|null} [protocol] HttpRequest protocol */ /** - * Constructs a new ListExclusionsResponse. - * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsResponse. - * @implements IListExclusionsResponse + * Constructs a new HttpRequest. + * @memberof google.logging.type + * @classdesc Represents a HttpRequest. + * @implements IHttpRequest * @constructor - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @param {google.logging.type.IHttpRequest=} [properties] Properties to set */ - function ListExclusionsResponse(properties) { - this.exclusions = []; + function HttpRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11517,304 +10632,257 @@ } /** - * ListExclusionsResponse exclusions. - * @member {Array.} exclusions - * @memberof google.logging.v2.ListExclusionsResponse + * HttpRequest requestMethod. + * @member {string} requestMethod + * @memberof google.logging.type.HttpRequest * @instance */ - ListExclusionsResponse.prototype.exclusions = $util.emptyArray; + HttpRequest.prototype.requestMethod = ""; /** - * ListExclusionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListExclusionsResponse + * HttpRequest requestUrl. + * @member {string} requestUrl + * @memberof google.logging.type.HttpRequest * @instance */ - ListExclusionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListExclusionsResponse instance using the specified properties. - * @function create - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance - */ - ListExclusionsResponse.create = function create(properties) { - return new ListExclusionsResponse(properties); - }; + HttpRequest.prototype.requestUrl = ""; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * HttpRequest requestSize. + * @member {number|Long} requestSize + * @memberof google.logging.type.HttpRequest + * @instance */ - ListExclusionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exclusions != null && message.exclusions.length) - for (var i = 0; i < message.exclusions.length; ++i) - $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + HttpRequest.prototype.requestSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * HttpRequest status. + * @member {number} status + * @memberof google.logging.type.HttpRequest + * @instance */ - ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + HttpRequest.prototype.status = 0; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * HttpRequest responseSize. + * @member {number|Long} responseSize + * @memberof google.logging.type.HttpRequest + * @instance */ - ListExclusionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + HttpRequest.prototype.responseSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * HttpRequest userAgent. + * @member {string} userAgent + * @memberof google.logging.type.HttpRequest + * @instance */ - ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + HttpRequest.prototype.userAgent = ""; /** - * Verifies a ListExclusionsResponse message. - * @function verify - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * HttpRequest remoteIp. + * @member {string} remoteIp + * @memberof google.logging.type.HttpRequest + * @instance */ - ListExclusionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exclusions != null && message.hasOwnProperty("exclusions")) { - if (!Array.isArray(message.exclusions)) - return "exclusions: array expected"; - for (var i = 0; i < message.exclusions.length; ++i) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); - if (error) - return "exclusions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + HttpRequest.prototype.remoteIp = ""; /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse - */ - ListExclusionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsResponse) - return object; - var message = new $root.google.logging.v2.ListExclusionsResponse(); - if (object.exclusions) { - if (!Array.isArray(object.exclusions)) - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); - message.exclusions = []; - for (var i = 0; i < object.exclusions.length; ++i) { - if (typeof object.exclusions[i] !== "object") - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); - message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + * HttpRequest serverIp. + * @member {string} serverIp + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.serverIp = ""; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.ListExclusionsResponse - * @static - * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * HttpRequest referer. + * @member {string} referer + * @memberof google.logging.type.HttpRequest + * @instance */ - ListExclusionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exclusions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.exclusions && message.exclusions.length) { - object.exclusions = []; - for (var j = 0; j < message.exclusions.length; ++j) - object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + HttpRequest.prototype.referer = ""; /** - * Converts this ListExclusionsResponse to JSON. - * @function toJSON - * @memberof google.logging.v2.ListExclusionsResponse + * HttpRequest latency. + * @member {google.protobuf.IDuration|null|undefined} latency + * @memberof google.logging.type.HttpRequest * @instance - * @returns {Object.} JSON object */ - ListExclusionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + HttpRequest.prototype.latency = null; - return ListExclusionsResponse; - })(); + /** + * HttpRequest cacheLookup. + * @member {boolean} cacheLookup + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheLookup = false; - v2.GetExclusionRequest = (function() { + /** + * HttpRequest cacheHit. + * @member {boolean} cacheHit + * @memberof google.logging.type.HttpRequest + * @instance + */ + HttpRequest.prototype.cacheHit = false; /** - * Properties of a GetExclusionRequest. - * @memberof google.logging.v2 - * @interface IGetExclusionRequest - * @property {string|null} [name] GetExclusionRequest name + * HttpRequest cacheValidatedWithOriginServer. + * @member {boolean} cacheValidatedWithOriginServer + * @memberof google.logging.type.HttpRequest + * @instance */ + HttpRequest.prototype.cacheValidatedWithOriginServer = false; /** - * Constructs a new GetExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents a GetExclusionRequest. - * @implements IGetExclusionRequest - * @constructor - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * HttpRequest cacheFillBytes. + * @member {number|Long} cacheFillBytes + * @memberof google.logging.type.HttpRequest + * @instance */ - function GetExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + HttpRequest.prototype.cacheFillBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * GetExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.GetExclusionRequest + * HttpRequest protocol. + * @member {string} protocol + * @memberof google.logging.type.HttpRequest * @instance */ - GetExclusionRequest.prototype.name = ""; + HttpRequest.prototype.protocol = ""; /** - * Creates a new GetExclusionRequest instance using the specified properties. + * Creates a new HttpRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @static - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance + * @param {google.logging.type.IHttpRequest=} [properties] Properties to set + * @returns {google.logging.type.HttpRequest} HttpRequest instance */ - GetExclusionRequest.create = function create(properties) { - return new GetExclusionRequest(properties); + HttpRequest.create = function create(properties) { + return new HttpRequest(properties); }; /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExclusionRequest.encode = function encode(message, writer) { + HttpRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestMethod != null && Object.hasOwnProperty.call(message, "requestMethod")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestMethod); + if (message.requestUrl != null && Object.hasOwnProperty.call(message, "requestUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestUrl); + if (message.requestSize != null && Object.hasOwnProperty.call(message, "requestSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestSize); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.responseSize != null && Object.hasOwnProperty.call(message, "responseSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.responseSize); + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.userAgent); + if (message.remoteIp != null && Object.hasOwnProperty.call(message, "remoteIp")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.remoteIp); + if (message.referer != null && Object.hasOwnProperty.call(message, "referer")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.referer); + if (message.cacheHit != null && Object.hasOwnProperty.call(message, "cacheHit")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.cacheHit); + if (message.cacheValidatedWithOriginServer != null && Object.hasOwnProperty.call(message, "cacheValidatedWithOriginServer")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.cacheValidatedWithOriginServer); + if (message.cacheLookup != null && Object.hasOwnProperty.call(message, "cacheLookup")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.cacheLookup); + if (message.cacheFillBytes != null && Object.hasOwnProperty.call(message, "cacheFillBytes")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.cacheFillBytes); + if (message.serverIp != null && Object.hasOwnProperty.call(message, "serverIp")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.serverIp); + if (message.latency != null && Object.hasOwnProperty.call(message, "latency")) + $root.google.protobuf.Duration.encode(message.latency, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.protocol); return writer; }; /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + HttpRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. + * Decodes a HttpRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.type.HttpRequest} HttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decode = function decode(reader, length) { + HttpRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.type.HttpRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.requestMethod = reader.string(); + break; + case 2: + message.requestUrl = reader.string(); + break; + case 3: + message.requestSize = reader.int64(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.responseSize = reader.int64(); + break; + case 6: + message.userAgent = reader.string(); + break; + case 7: + message.remoteIp = reader.string(); + break; + case 13: + message.serverIp = reader.string(); + break; + case 8: + message.referer = reader.string(); + break; + case 14: + message.latency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 11: + message.cacheLookup = reader.bool(); + break; + case 9: + message.cacheHit = reader.bool(); + break; + case 10: + message.cacheValidatedWithOriginServer = reader.bool(); + break; + case 12: + message.cacheFillBytes = reader.int64(); + break; + case 15: + message.protocol = reader.string(); break; default: reader.skipType(tag & 7); @@ -11825,108 +10893,323 @@ }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a HttpRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.type.HttpRequest} HttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + HttpRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetExclusionRequest message. + * Verifies a HttpRequest message. * @function verify - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetExclusionRequest.verify = function verify(message) { + HttpRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + if (!$util.isString(message.requestMethod)) + return "requestMethod: string expected"; + if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + if (!$util.isString(message.requestUrl)) + return "requestUrl: string expected"; + if (message.requestSize != null && message.hasOwnProperty("requestSize")) + if (!$util.isInteger(message.requestSize) && !(message.requestSize && $util.isInteger(message.requestSize.low) && $util.isInteger(message.requestSize.high))) + return "requestSize: integer|Long expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status)) + return "status: integer expected"; + if (message.responseSize != null && message.hasOwnProperty("responseSize")) + if (!$util.isInteger(message.responseSize) && !(message.responseSize && $util.isInteger(message.responseSize.low) && $util.isInteger(message.responseSize.high))) + return "responseSize: integer|Long expected"; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (!$util.isString(message.userAgent)) + return "userAgent: string expected"; + if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + if (!$util.isString(message.remoteIp)) + return "remoteIp: string expected"; + if (message.serverIp != null && message.hasOwnProperty("serverIp")) + if (!$util.isString(message.serverIp)) + return "serverIp: string expected"; + if (message.referer != null && message.hasOwnProperty("referer")) + if (!$util.isString(message.referer)) + return "referer: string expected"; + if (message.latency != null && message.hasOwnProperty("latency")) { + var error = $root.google.protobuf.Duration.verify(message.latency); + if (error) + return "latency." + error; + } + if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + if (typeof message.cacheLookup !== "boolean") + return "cacheLookup: boolean expected"; + if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + if (typeof message.cacheHit !== "boolean") + return "cacheHit: boolean expected"; + if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + if (typeof message.cacheValidatedWithOriginServer !== "boolean") + return "cacheValidatedWithOriginServer: boolean expected"; + if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + if (!$util.isInteger(message.cacheFillBytes) && !(message.cacheFillBytes && $util.isInteger(message.cacheFillBytes.low) && $util.isInteger(message.cacheFillBytes.high))) + return "cacheFillBytes: integer|Long expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; return null; }; /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.type.HttpRequest} HttpRequest */ - GetExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetExclusionRequest) + HttpRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.type.HttpRequest) return object; - var message = new $root.google.logging.v2.GetExclusionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.logging.type.HttpRequest(); + if (object.requestMethod != null) + message.requestMethod = String(object.requestMethod); + if (object.requestUrl != null) + message.requestUrl = String(object.requestUrl); + if (object.requestSize != null) + if ($util.Long) + (message.requestSize = $util.Long.fromValue(object.requestSize)).unsigned = false; + else if (typeof object.requestSize === "string") + message.requestSize = parseInt(object.requestSize, 10); + else if (typeof object.requestSize === "number") + message.requestSize = object.requestSize; + else if (typeof object.requestSize === "object") + message.requestSize = new $util.LongBits(object.requestSize.low >>> 0, object.requestSize.high >>> 0).toNumber(); + if (object.status != null) + message.status = object.status | 0; + if (object.responseSize != null) + if ($util.Long) + (message.responseSize = $util.Long.fromValue(object.responseSize)).unsigned = false; + else if (typeof object.responseSize === "string") + message.responseSize = parseInt(object.responseSize, 10); + else if (typeof object.responseSize === "number") + message.responseSize = object.responseSize; + else if (typeof object.responseSize === "object") + message.responseSize = new $util.LongBits(object.responseSize.low >>> 0, object.responseSize.high >>> 0).toNumber(); + if (object.userAgent != null) + message.userAgent = String(object.userAgent); + if (object.remoteIp != null) + message.remoteIp = String(object.remoteIp); + if (object.serverIp != null) + message.serverIp = String(object.serverIp); + if (object.referer != null) + message.referer = String(object.referer); + if (object.latency != null) { + if (typeof object.latency !== "object") + throw TypeError(".google.logging.type.HttpRequest.latency: object expected"); + message.latency = $root.google.protobuf.Duration.fromObject(object.latency); + } + if (object.cacheLookup != null) + message.cacheLookup = Boolean(object.cacheLookup); + if (object.cacheHit != null) + message.cacheHit = Boolean(object.cacheHit); + if (object.cacheValidatedWithOriginServer != null) + message.cacheValidatedWithOriginServer = Boolean(object.cacheValidatedWithOriginServer); + if (object.cacheFillBytes != null) + if ($util.Long) + (message.cacheFillBytes = $util.Long.fromValue(object.cacheFillBytes)).unsigned = false; + else if (typeof object.cacheFillBytes === "string") + message.cacheFillBytes = parseInt(object.cacheFillBytes, 10); + else if (typeof object.cacheFillBytes === "number") + message.cacheFillBytes = object.cacheFillBytes; + else if (typeof object.cacheFillBytes === "object") + message.cacheFillBytes = new $util.LongBits(object.cacheFillBytes.low >>> 0, object.cacheFillBytes.high >>> 0).toNumber(); + if (object.protocol != null) + message.protocol = String(object.protocol); return message; }; /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @static - * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest + * @param {google.logging.type.HttpRequest} message HttpRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetExclusionRequest.toObject = function toObject(message, options) { + HttpRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.requestMethod = ""; + object.requestUrl = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.requestSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.requestSize = options.longs === String ? "0" : 0; + object.status = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.responseSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.responseSize = options.longs === String ? "0" : 0; + object.userAgent = ""; + object.remoteIp = ""; + object.referer = ""; + object.cacheHit = false; + object.cacheValidatedWithOriginServer = false; + object.cacheLookup = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.cacheFillBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.cacheFillBytes = options.longs === String ? "0" : 0; + object.serverIp = ""; + object.latency = null; + object.protocol = ""; + } + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + object.requestMethod = message.requestMethod; + if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) + object.requestUrl = message.requestUrl; + if (message.requestSize != null && message.hasOwnProperty("requestSize")) + if (typeof message.requestSize === "number") + object.requestSize = options.longs === String ? String(message.requestSize) : message.requestSize; + else + object.requestSize = options.longs === String ? $util.Long.prototype.toString.call(message.requestSize) : options.longs === Number ? new $util.LongBits(message.requestSize.low >>> 0, message.requestSize.high >>> 0).toNumber() : message.requestSize; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.responseSize != null && message.hasOwnProperty("responseSize")) + if (typeof message.responseSize === "number") + object.responseSize = options.longs === String ? String(message.responseSize) : message.responseSize; + else + object.responseSize = options.longs === String ? $util.Long.prototype.toString.call(message.responseSize) : options.longs === Number ? new $util.LongBits(message.responseSize.low >>> 0, message.responseSize.high >>> 0).toNumber() : message.responseSize; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = message.userAgent; + if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) + object.remoteIp = message.remoteIp; + if (message.referer != null && message.hasOwnProperty("referer")) + object.referer = message.referer; + if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) + object.cacheHit = message.cacheHit; + if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) + object.cacheValidatedWithOriginServer = message.cacheValidatedWithOriginServer; + if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) + object.cacheLookup = message.cacheLookup; + if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) + if (typeof message.cacheFillBytes === "number") + object.cacheFillBytes = options.longs === String ? String(message.cacheFillBytes) : message.cacheFillBytes; + else + object.cacheFillBytes = options.longs === String ? $util.Long.prototype.toString.call(message.cacheFillBytes) : options.longs === Number ? new $util.LongBits(message.cacheFillBytes.low >>> 0, message.cacheFillBytes.high >>> 0).toNumber() : message.cacheFillBytes; + if (message.serverIp != null && message.hasOwnProperty("serverIp")) + object.serverIp = message.serverIp; + if (message.latency != null && message.hasOwnProperty("latency")) + object.latency = $root.google.protobuf.Duration.toObject(message.latency, options); + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; return object; }; /** - * Converts this GetExclusionRequest to JSON. + * Converts this HttpRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.type.HttpRequest * @instance * @returns {Object.} JSON object */ - GetExclusionRequest.prototype.toJSON = function toJSON() { + HttpRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetExclusionRequest; + return HttpRequest; })(); - v2.CreateExclusionRequest = (function() { + /** + * LogSeverity enum. + * @name google.logging.type.LogSeverity + * @enum {number} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} DEBUG=100 DEBUG value + * @property {number} INFO=200 INFO value + * @property {number} NOTICE=300 NOTICE value + * @property {number} WARNING=400 WARNING value + * @property {number} ERROR=500 ERROR value + * @property {number} CRITICAL=600 CRITICAL value + * @property {number} ALERT=700 ALERT value + * @property {number} EMERGENCY=800 EMERGENCY value + */ + type.LogSeverity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[100] = "DEBUG"] = 100; + values[valuesById[200] = "INFO"] = 200; + values[valuesById[300] = "NOTICE"] = 300; + values[valuesById[400] = "WARNING"] = 400; + values[valuesById[500] = "ERROR"] = 500; + values[valuesById[600] = "CRITICAL"] = 600; + values[valuesById[700] = "ALERT"] = 700; + values[valuesById[800] = "EMERGENCY"] = 800; + return values; + })(); + + return type; + })(); + + logging.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.logging + * @namespace + */ + var v2 = {}; + + v2.LogEntry = (function() { /** - * Properties of a CreateExclusionRequest. + * Properties of a LogEntry. * @memberof google.logging.v2 - * @interface ICreateExclusionRequest - * @property {string|null} [parent] CreateExclusionRequest parent - * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion + * @interface ILogEntry + * @property {string|null} [logName] LogEntry logName + * @property {google.api.IMonitoredResource|null} [resource] LogEntry resource + * @property {google.protobuf.IAny|null} [protoPayload] LogEntry protoPayload + * @property {string|null} [textPayload] LogEntry textPayload + * @property {google.protobuf.IStruct|null} [jsonPayload] LogEntry jsonPayload + * @property {google.protobuf.ITimestamp|null} [timestamp] LogEntry timestamp + * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] LogEntry receiveTimestamp + * @property {google.logging.type.LogSeverity|null} [severity] LogEntry severity + * @property {string|null} [insertId] LogEntry insertId + * @property {google.logging.type.IHttpRequest|null} [httpRequest] LogEntry httpRequest + * @property {Object.|null} [labels] LogEntry labels + * @property {google.logging.v2.ILogEntryOperation|null} [operation] LogEntry operation + * @property {string|null} [trace] LogEntry trace + * @property {string|null} [spanId] LogEntry spanId + * @property {boolean|null} [traceSampled] LogEntry traceSampled + * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation */ /** - * Constructs a new CreateExclusionRequest. + * Constructs a new LogEntry. * @memberof google.logging.v2 - * @classdesc Represents a CreateExclusionRequest. - * @implements ICreateExclusionRequest + * @classdesc Represents a LogEntry. + * @implements ILogEntry * @constructor - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set */ - function CreateExclusionRequest(properties) { + function LogEntry(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11934,317 +11217,304 @@ } /** - * CreateExclusionRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateExclusionRequest + * LogEntry logName. + * @member {string} logName + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.logName = ""; + + /** + * LogEntry resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.LogEntry * @instance */ - CreateExclusionRequest.prototype.parent = ""; + LogEntry.prototype.resource = null; /** - * CreateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.CreateExclusionRequest + * LogEntry protoPayload. + * @member {google.protobuf.IAny|null|undefined} protoPayload + * @memberof google.logging.v2.LogEntry * @instance */ - CreateExclusionRequest.prototype.exclusion = null; + LogEntry.prototype.protoPayload = null; /** - * Creates a new CreateExclusionRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance + * LogEntry textPayload. + * @member {string|null|undefined} textPayload + * @memberof google.logging.v2.LogEntry + * @instance */ - CreateExclusionRequest.create = function create(properties) { - return new CreateExclusionRequest(properties); - }; + LogEntry.prototype.textPayload = null; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * LogEntry jsonPayload. + * @member {google.protobuf.IStruct|null|undefined} jsonPayload + * @memberof google.logging.v2.LogEntry + * @instance */ - CreateExclusionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + LogEntry.prototype.jsonPayload = null; /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * LogEntry timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.logging.v2.LogEntry + * @instance */ - CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + LogEntry.prototype.timestamp = null; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * LogEntry receiveTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp + * @memberof google.logging.v2.LogEntry + * @instance */ - CreateExclusionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + LogEntry.prototype.receiveTimestamp = null; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * LogEntry severity. + * @member {google.logging.type.LogSeverity} severity + * @memberof google.logging.v2.LogEntry + * @instance */ - CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + LogEntry.prototype.severity = 0; /** - * Verifies a CreateExclusionRequest message. - * @function verify - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * LogEntry insertId. + * @member {string} insertId + * @memberof google.logging.v2.LogEntry + * @instance */ - CreateExclusionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - return null; - }; + LogEntry.prototype.insertId = ""; /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * LogEntry httpRequest. + * @member {google.logging.type.IHttpRequest|null|undefined} httpRequest + * @memberof google.logging.v2.LogEntry + * @instance */ - CreateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateExclusionRequest) - return object; - var message = new $root.google.logging.v2.CreateExclusionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } - return message; - }; + LogEntry.prototype.httpRequest = null; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateExclusionRequest - * @static - * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * LogEntry labels. + * @member {Object.} labels + * @memberof google.logging.v2.LogEntry + * @instance */ - CreateExclusionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.exclusion = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); - return object; - }; + LogEntry.prototype.labels = $util.emptyObject; /** - * Converts this CreateExclusionRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateExclusionRequest + * LogEntry operation. + * @member {google.logging.v2.ILogEntryOperation|null|undefined} operation + * @memberof google.logging.v2.LogEntry * @instance - * @returns {Object.} JSON object */ - CreateExclusionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateExclusionRequest; - })(); - - v2.UpdateExclusionRequest = (function() { + LogEntry.prototype.operation = null; /** - * Properties of an UpdateExclusionRequest. - * @memberof google.logging.v2 - * @interface IUpdateExclusionRequest - * @property {string|null} [name] UpdateExclusionRequest name - * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask + * LogEntry trace. + * @member {string} trace + * @memberof google.logging.v2.LogEntry + * @instance */ + LogEntry.prototype.trace = ""; /** - * Constructs a new UpdateExclusionRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateExclusionRequest. - * @implements IUpdateExclusionRequest - * @constructor - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * LogEntry spanId. + * @member {string} spanId + * @memberof google.logging.v2.LogEntry + * @instance */ - function UpdateExclusionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LogEntry.prototype.spanId = ""; /** - * UpdateExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateExclusionRequest + * LogEntry traceSampled. + * @member {boolean} traceSampled + * @memberof google.logging.v2.LogEntry * @instance */ - UpdateExclusionRequest.prototype.name = ""; + LogEntry.prototype.traceSampled = false; /** - * UpdateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.UpdateExclusionRequest + * LogEntry sourceLocation. + * @member {google.logging.v2.ILogEntrySourceLocation|null|undefined} sourceLocation + * @memberof google.logging.v2.LogEntry * @instance */ - UpdateExclusionRequest.prototype.exclusion = null; + LogEntry.prototype.sourceLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * UpdateExclusionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateExclusionRequest + * LogEntry payload. + * @member {"protoPayload"|"textPayload"|"jsonPayload"|undefined} payload + * @memberof google.logging.v2.LogEntry * @instance */ - UpdateExclusionRequest.prototype.updateMask = null; + Object.defineProperty(LogEntry.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["protoPayload", "textPayload", "jsonPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new UpdateExclusionRequest instance using the specified properties. + * Creates a new LogEntry instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance + * @param {google.logging.v2.ILogEntry=} [properties] Properties to set + * @returns {google.logging.v2.LogEntry} LogEntry instance */ - UpdateExclusionRequest.create = function create(properties) { - return new UpdateExclusionRequest(properties); + LogEntry.create = function create(properties) { + return new LogEntry(properties); }; /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntry message. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExclusionRequest.encode = function encode(message, writer) { + LogEntry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.protoPayload != null && Object.hasOwnProperty.call(message, "protoPayload")) + $root.google.protobuf.Any.encode(message.protoPayload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textPayload != null && Object.hasOwnProperty.call(message, "textPayload")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.textPayload); + if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.insertId); + if (message.jsonPayload != null && Object.hasOwnProperty.call(message, "jsonPayload")) + $root.google.protobuf.Struct.encode(message.jsonPayload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.httpRequest != null && Object.hasOwnProperty.call(message, "httpRequest")) + $root.google.logging.type.HttpRequest.encode(message.httpRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.severity); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.logName); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + $root.google.logging.v2.LogEntryOperation.encode(message.operation, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.trace != null && Object.hasOwnProperty.call(message, "trace")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.trace); + if (message.sourceLocation != null && Object.hasOwnProperty.call(message, "sourceLocation")) + $root.google.logging.v2.LogEntrySourceLocation.encode(message.sourceLocation, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.receiveTimestamp != null && Object.hasOwnProperty.call(message, "receiveTimestamp")) + $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); + if (message.traceSampled != null && Object.hasOwnProperty.call(message, "traceSampled")) + writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); return writer; }; /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.logging.v2.LogEntry.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntry} message LogEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogEntry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntry message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.LogEntry} LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decode = function decode(reader, length) { + LogEntry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); + case 12: + message.logName = reader.string(); + break; + case 8: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); break; case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.textPayload = reader.string(); + break; + case 6: + message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 9: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 24: + message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.severity = reader.int32(); + break; + case 4: + message.insertId = reader.string(); + break; + case 7: + message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); + break; + case 11: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 15: + message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); + break; + case 22: + message.trace = reader.string(); + break; + case 27: + message.spanId = reader.string(); + break; + case 30: + message.traceSampled = reader.bool(); + break; + case 23: + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12255,134 +11525,353 @@ }; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.LogEntry} LogEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + LogEntry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateExclusionRequest message. + * Verifies a LogEntry message. * @function verify - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateExclusionRequest.verify = function verify(message) { + LogEntry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + var properties = {}; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); if (error) - return "exclusion." + error; + return "resource." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + properties.payload = 1; + { + var error = $root.google.protobuf.Any.verify(message.protoPayload); + if (error) + return "protoPayload." + error; + } + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + if (!$util.isString(message.textPayload)) + return "textPayload: string expected"; + } + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + if (properties.payload === 1) + return "payload: multiple values"; + properties.payload = 1; + { + var error = $root.google.protobuf.Struct.verify(message.jsonPayload); + if (error) + return "jsonPayload." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp); + if (error) + return "receiveTimestamp." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 100: + case 200: + case 300: + case 400: + case 500: + case 600: + case 700: + case 800: + break; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + if (!$util.isString(message.insertId)) + return "insertId: string expected"; + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) { + var error = $root.google.logging.type.HttpRequest.verify(message.httpRequest); + if (error) + return "httpRequest." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.operation != null && message.hasOwnProperty("operation")) { + var error = $root.google.logging.v2.LogEntryOperation.verify(message.operation); + if (error) + return "operation." + error; + } + if (message.trace != null && message.hasOwnProperty("trace")) + if (!$util.isString(message.trace)) + return "trace: string expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!$util.isString(message.spanId)) + return "spanId: string expected"; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + if (typeof message.traceSampled !== "boolean") + return "traceSampled: boolean expected"; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) { + var error = $root.google.logging.v2.LogEntrySourceLocation.verify(message.sourceLocation); if (error) - return "updateMask." + error; + return "sourceLocation." + error; } return null; }; /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.LogEntry} LogEntry */ - UpdateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) + LogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntry) return object; - var message = new $root.google.logging.v2.UpdateExclusionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + var message = new $root.google.logging.v2.LogEntry(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.LogEntry.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.protoPayload != null) { + if (typeof object.protoPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.protoPayload: object expected"); + message.protoPayload = $root.google.protobuf.Any.fromObject(object.protoPayload); + } + if (object.textPayload != null) + message.textPayload = String(object.textPayload); + if (object.jsonPayload != null) { + if (typeof object.jsonPayload !== "object") + throw TypeError(".google.logging.v2.LogEntry.jsonPayload: object expected"); + message.jsonPayload = $root.google.protobuf.Struct.fromObject(object.jsonPayload); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.receiveTimestamp != null) { + if (typeof object.receiveTimestamp !== "object") + throw TypeError(".google.logging.v2.LogEntry.receiveTimestamp: object expected"); + message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); + } + switch (object.severity) { + case "DEFAULT": + case 0: + message.severity = 0; + break; + case "DEBUG": + case 100: + message.severity = 100; + break; + case "INFO": + case 200: + message.severity = 200; + break; + case "NOTICE": + case 300: + message.severity = 300; + break; + case "WARNING": + case 400: + message.severity = 400; + break; + case "ERROR": + case 500: + message.severity = 500; + break; + case "CRITICAL": + case 600: + message.severity = 600; + break; + case "ALERT": + case 700: + message.severity = 700; + break; + case "EMERGENCY": + case 800: + message.severity = 800; + break; + } + if (object.insertId != null) + message.insertId = String(object.insertId); + if (object.httpRequest != null) { + if (typeof object.httpRequest !== "object") + throw TypeError(".google.logging.v2.LogEntry.httpRequest: object expected"); + message.httpRequest = $root.google.logging.type.HttpRequest.fromObject(object.httpRequest); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.LogEntry.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.operation != null) { + if (typeof object.operation !== "object") + throw TypeError(".google.logging.v2.LogEntry.operation: object expected"); + message.operation = $root.google.logging.v2.LogEntryOperation.fromObject(object.operation); + } + if (object.trace != null) + message.trace = String(object.trace); + if (object.spanId != null) + message.spanId = String(object.spanId); + if (object.traceSampled != null) + message.traceSampled = Boolean(object.traceSampled); + if (object.sourceLocation != null) { + if (typeof object.sourceLocation !== "object") + throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); } return message; }; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @static - * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest + * @param {google.logging.v2.LogEntry} message LogEntry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateExclusionRequest.toObject = function toObject(message, options) { + LogEntry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.name = ""; - object.exclusion = null; - object.updateMask = null; + object.insertId = ""; + object.httpRequest = null; + object.resource = null; + object.timestamp = null; + object.severity = options.enums === String ? "DEFAULT" : 0; + object.logName = ""; + object.operation = null; + object.trace = ""; + object.sourceLocation = null; + object.receiveTimestamp = null; + object.spanId = ""; + object.traceSampled = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { + object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); + if (options.oneofs) + object.payload = "protoPayload"; + } + if (message.textPayload != null && message.hasOwnProperty("textPayload")) { + object.textPayload = message.textPayload; + if (options.oneofs) + object.payload = "textPayload"; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + object.insertId = message.insertId; + if (message.jsonPayload != null && message.hasOwnProperty("jsonPayload")) { + object.jsonPayload = $root.google.protobuf.Struct.toObject(message.jsonPayload, options); + if (options.oneofs) + object.payload = "jsonPayload"; + } + if (message.httpRequest != null && message.hasOwnProperty("httpRequest")) + object.httpRequest = $root.google.logging.type.HttpRequest.toObject(message.httpRequest, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = $root.google.logging.v2.LogEntryOperation.toObject(message.operation, options); + if (message.trace != null && message.hasOwnProperty("trace")) + object.trace = message.trace; + if (message.sourceLocation != null && message.hasOwnProperty("sourceLocation")) + object.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.toObject(message.sourceLocation, options); + if (message.receiveTimestamp != null && message.hasOwnProperty("receiveTimestamp")) + object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options); + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = message.spanId; + if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) + object.traceSampled = message.traceSampled; return object; }; /** - * Converts this UpdateExclusionRequest to JSON. + * Converts this LogEntry to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.LogEntry * @instance * @returns {Object.} JSON object */ - UpdateExclusionRequest.prototype.toJSON = function toJSON() { + LogEntry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateExclusionRequest; + return LogEntry; })(); - v2.DeleteExclusionRequest = (function() { + v2.LogEntryOperation = (function() { /** - * Properties of a DeleteExclusionRequest. + * Properties of a LogEntryOperation. * @memberof google.logging.v2 - * @interface IDeleteExclusionRequest - * @property {string|null} [name] DeleteExclusionRequest name + * @interface ILogEntryOperation + * @property {string|null} [id] LogEntryOperation id + * @property {string|null} [producer] LogEntryOperation producer + * @property {boolean|null} [first] LogEntryOperation first + * @property {boolean|null} [last] LogEntryOperation last */ /** - * Constructs a new DeleteExclusionRequest. + * Constructs a new LogEntryOperation. * @memberof google.logging.v2 - * @classdesc Represents a DeleteExclusionRequest. - * @implements IDeleteExclusionRequest + * @classdesc Represents a LogEntryOperation. + * @implements ILogEntryOperation * @constructor - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set */ - function DeleteExclusionRequest(properties) { + function LogEntryOperation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12390,75 +11879,114 @@ } /** - * DeleteExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.DeleteExclusionRequest + * LogEntryOperation id. + * @member {string} id + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.id = ""; + + /** + * LogEntryOperation producer. + * @member {string} producer + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.producer = ""; + + /** + * LogEntryOperation first. + * @member {boolean} first + * @memberof google.logging.v2.LogEntryOperation + * @instance + */ + LogEntryOperation.prototype.first = false; + + /** + * LogEntryOperation last. + * @member {boolean} last + * @memberof google.logging.v2.LogEntryOperation * @instance */ - DeleteExclusionRequest.prototype.name = ""; + LogEntryOperation.prototype.last = false; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. + * Creates a new LogEntryOperation instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + * @param {google.logging.v2.ILogEntryOperation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation instance */ - DeleteExclusionRequest.create = function create(properties) { - return new DeleteExclusionRequest(properties); + LogEntryOperation.create = function create(properties) { + return new LogEntryOperation(properties); }; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntryOperation message. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encode = function encode(message, writer) { + LogEntryOperation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.producer != null && Object.hasOwnProperty.call(message, "producer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.producer); + if (message.first != null && Object.hasOwnProperty.call(message, "first")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.first); + if (message.last != null && Object.hasOwnProperty.call(message, "last")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.last); return writer; }; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified LogEntryOperation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntryOperation.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.ILogEntryOperation} message LogEntryOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogEntryOperation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * Decodes a LogEntryOperation message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decode = function decode(reader, length) { + LogEntryOperation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.id = reader.string(); + break; + case 2: + message.producer = reader.string(); + break; + case 3: + message.first = reader.bool(); + break; + case 4: + message.last = reader.bool(); break; default: reader.skipType(tag & 7); @@ -12469,107 +11997,134 @@ }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntryOperation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + LogEntryOperation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteExclusionRequest message. + * Verifies a LogEntryOperation message. * @function verify - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteExclusionRequest.verify = function verify(message) { + LogEntryOperation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.producer != null && message.hasOwnProperty("producer")) + if (!$util.isString(message.producer)) + return "producer: string expected"; + if (message.first != null && message.hasOwnProperty("first")) + if (typeof message.first !== "boolean") + return "first: boolean expected"; + if (message.last != null && message.hasOwnProperty("last")) + if (typeof message.last !== "boolean") + return "last: boolean expected"; return null; }; /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntryOperation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.LogEntryOperation} LogEntryOperation */ - DeleteExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + LogEntryOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntryOperation) return object; - var message = new $root.google.logging.v2.DeleteExclusionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.logging.v2.LogEntryOperation(); + if (object.id != null) + message.id = String(object.id); + if (object.producer != null) + message.producer = String(object.producer); + if (object.first != null) + message.first = Boolean(object.first); + if (object.last != null) + message.last = Boolean(object.last); return message; }; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogEntryOperation message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @static - * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {google.logging.v2.LogEntryOperation} message LogEntryOperation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteExclusionRequest.toObject = function toObject(message, options) { + LogEntryOperation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.id = ""; + object.producer = ""; + object.first = false; + object.last = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.producer != null && message.hasOwnProperty("producer")) + object.producer = message.producer; + if (message.first != null && message.hasOwnProperty("first")) + object.first = message.first; + if (message.last != null && message.hasOwnProperty("last")) + object.last = message.last; return object; }; /** - * Converts this DeleteExclusionRequest to JSON. + * Converts this LogEntryOperation to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.LogEntryOperation * @instance * @returns {Object.} JSON object */ - DeleteExclusionRequest.prototype.toJSON = function toJSON() { + LogEntryOperation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteExclusionRequest; + return LogEntryOperation; })(); - v2.GetCmekSettingsRequest = (function() { + v2.LogEntrySourceLocation = (function() { /** - * Properties of a GetCmekSettingsRequest. + * Properties of a LogEntrySourceLocation. * @memberof google.logging.v2 - * @interface IGetCmekSettingsRequest - * @property {string|null} [name] GetCmekSettingsRequest name + * @interface ILogEntrySourceLocation + * @property {string|null} [file] LogEntrySourceLocation file + * @property {number|Long|null} [line] LogEntrySourceLocation line + * @property {string|null} ["function"] LogEntrySourceLocation function */ /** - * Constructs a new GetCmekSettingsRequest. + * Constructs a new LogEntrySourceLocation. * @memberof google.logging.v2 - * @classdesc Represents a GetCmekSettingsRequest. - * @implements IGetCmekSettingsRequest + * @classdesc Represents a LogEntrySourceLocation. + * @implements ILogEntrySourceLocation * @constructor - * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set */ - function GetCmekSettingsRequest(properties) { + function LogEntrySourceLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12577,75 +12132,101 @@ } /** - * GetCmekSettingsRequest name. - * @member {string} name - * @memberof google.logging.v2.GetCmekSettingsRequest + * LogEntrySourceLocation file. + * @member {string} file + * @memberof google.logging.v2.LogEntrySourceLocation * @instance */ - GetCmekSettingsRequest.prototype.name = ""; + LogEntrySourceLocation.prototype.file = ""; /** - * Creates a new GetCmekSettingsRequest instance using the specified properties. + * LogEntrySourceLocation line. + * @member {number|Long} line + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LogEntrySourceLocation function. + * @member {string} function + * @memberof google.logging.v2.LogEntrySourceLocation + * @instance + */ + LogEntrySourceLocation.prototype["function"] = ""; + + /** + * Creates a new LogEntrySourceLocation instance using the specified properties. * @function create - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest instance + * @param {google.logging.v2.ILogEntrySourceLocation=} [properties] Properties to set + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation instance */ - GetCmekSettingsRequest.create = function create(properties) { - return new GetCmekSettingsRequest(properties); + LogEntrySourceLocation.create = function create(properties) { + return new LogEntrySourceLocation(properties); }; /** - * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * Encodes the specified LogEntrySourceLocation message. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCmekSettingsRequest.encode = function encode(message, writer) { + LogEntrySourceLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.line != null && Object.hasOwnProperty.call(message, "line")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.line); + if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["function"]); return writer; }; /** - * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * Encodes the specified LogEntrySourceLocation message, length delimited. Does not implicitly {@link google.logging.v2.LogEntrySourceLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.ILogEntrySourceLocation} message LogEntrySourceLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogEntrySourceLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCmekSettingsRequest.decode = function decode(reader, length) { + LogEntrySourceLocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetCmekSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.file = reader.string(); + break; + case 2: + message.line = reader.int64(); + break; + case 3: + message["function"] = reader.string(); break; default: reader.skipType(tag & 7); @@ -12656,351 +12237,371 @@ }; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a LogEntrySourceLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + LogEntrySourceLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCmekSettingsRequest message. + * Verifies a LogEntrySourceLocation message. * @function verify - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCmekSettingsRequest.verify = function verify(message) { + LogEntrySourceLocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.file != null && message.hasOwnProperty("file")) + if (!$util.isString(message.file)) + return "file: string expected"; + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) + return "line: integer|Long expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + if (!$util.isString(message["function"])) + return "function: string expected"; return null; }; /** - * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogEntrySourceLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.LogEntrySourceLocation} LogEntrySourceLocation */ - GetCmekSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetCmekSettingsRequest) + LogEntrySourceLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogEntrySourceLocation) return object; - var message = new $root.google.logging.v2.GetCmekSettingsRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.logging.v2.LogEntrySourceLocation(); + if (object.file != null) + message.file = String(object.file); + if (object.line != null) + if ($util.Long) + (message.line = $util.Long.fromValue(object.line)).unsigned = false; + else if (typeof object.line === "string") + message.line = parseInt(object.line, 10); + else if (typeof object.line === "number") + message.line = object.line; + else if (typeof object.line === "object") + message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); + if (object["function"] != null) + message["function"] = String(object["function"]); return message; }; /** - * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogEntrySourceLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @static - * @param {google.logging.v2.GetCmekSettingsRequest} message GetCmekSettingsRequest + * @param {google.logging.v2.LogEntrySourceLocation} message LogEntrySourceLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCmekSettingsRequest.toObject = function toObject(message, options) { + LogEntrySourceLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.file = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.line = options.longs === String ? "0" : 0; + object["function"] = ""; + } + if (message.file != null && message.hasOwnProperty("file")) + object.file = message.file; + if (message.line != null && message.hasOwnProperty("line")) + if (typeof message.line === "number") + object.line = options.longs === String ? String(message.line) : message.line; + else + object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = message["function"]; return object; }; /** - * Converts this GetCmekSettingsRequest to JSON. + * Converts this LogEntrySourceLocation to JSON. * @function toJSON - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogEntrySourceLocation * @instance * @returns {Object.} JSON object */ - GetCmekSettingsRequest.prototype.toJSON = function toJSON() { + LogEntrySourceLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetCmekSettingsRequest; + return LogEntrySourceLocation; })(); - v2.UpdateCmekSettingsRequest = (function() { + v2.LoggingServiceV2 = (function() { /** - * Properties of an UpdateCmekSettingsRequest. + * Constructs a new LoggingServiceV2 service. * @memberof google.logging.v2 - * @interface IUpdateCmekSettingsRequest - * @property {string|null} [name] UpdateCmekSettingsRequest name - * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] UpdateCmekSettingsRequest cmekSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmekSettingsRequest updateMask + * @classdesc Represents a LoggingServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function LoggingServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (LoggingServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LoggingServiceV2; /** - * Constructs a new UpdateCmekSettingsRequest. - * @memberof google.logging.v2 - * @classdesc Represents an UpdateCmekSettingsRequest. - * @implements IUpdateCmekSettingsRequest - * @constructor - * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + * Creates new LoggingServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.LoggingServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LoggingServiceV2} RPC service. Useful where requests and/or responses are streamed. */ - function UpdateCmekSettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LoggingServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * UpdateCmekSettingsRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef DeleteLogCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.DeleteLogCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - UpdateCmekSettingsRequest.prototype.name = ""; + Object.defineProperty(LoggingServiceV2.prototype.deleteLog = function deleteLog(request, callback) { + return this.rpcCall(deleteLog, $root.google.logging.v2.DeleteLogRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLog" }); /** - * UpdateCmekSettingsRequest cmekSettings. - * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * Calls DeleteLog. + * @function deleteLog + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IDeleteLogRequest} request DeleteLogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateCmekSettingsRequest.prototype.cmekSettings = null; /** - * UpdateCmekSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef WriteLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.WriteLogEntriesResponse} [response] WriteLogEntriesResponse + */ + + /** + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.WriteLogEntriesCallback} callback Node-style callback called with the error, if any, and WriteLogEntriesResponse + * @returns {undefined} + * @variation 1 */ - UpdateCmekSettingsRequest.prototype.updateMask = null; + Object.defineProperty(LoggingServiceV2.prototype.writeLogEntries = function writeLogEntries(request, callback) { + return this.rpcCall(writeLogEntries, $root.google.logging.v2.WriteLogEntriesRequest, $root.google.logging.v2.WriteLogEntriesResponse, request, callback); + }, "name", { value: "WriteLogEntries" }); /** - * Creates a new UpdateCmekSettingsRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateCmekSettingsRequest - * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest instance + * Calls WriteLogEntries. + * @function writeLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IWriteLogEntriesRequest} request WriteLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateCmekSettingsRequest.create = function create(properties) { - return new UpdateCmekSettingsRequest(properties); - }; /** - * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateCmekSettingsRequest - * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogEntriesResponse} [response] ListLogEntriesResponse + */ + + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogEntriesCallback} callback Node-style callback called with the error, if any, and ListLogEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LoggingServiceV2.prototype.listLogEntries = function listLogEntries(request, callback) { + return this.rpcCall(listLogEntries, $root.google.logging.v2.ListLogEntriesRequest, $root.google.logging.v2.ListLogEntriesResponse, request, callback); + }, "name", { value: "ListLogEntries" }); + + /** + * Calls ListLogEntries. + * @function listLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogEntriesRequest} request ListLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListMonitoredResourceDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + */ + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @returns {undefined} + * @variation 1 */ - UpdateCmekSettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cmekSettings != null && Object.hasOwnProperty.call(message, "cmekSettings")) - $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + Object.defineProperty(LoggingServiceV2.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest, $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); /** - * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateCmekSettingsRequest - * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateCmekSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef ListLogsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogsResponse} [response] ListLogsResponse */ - UpdateCmekSettingsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateCmekSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.ListLogsCallback} callback Node-style callback called with the error, if any, and ListLogsResponse + * @returns {undefined} + * @variation 1 */ - UpdateCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(LoggingServiceV2.prototype.listLogs = function listLogs(request, callback) { + return this.rpcCall(listLogs, $root.google.logging.v2.ListLogsRequest, $root.google.logging.v2.ListLogsResponse, request, callback); + }, "name", { value: "ListLogs" }); /** - * Verifies an UpdateCmekSettingsRequest message. - * @function verify - * @memberof google.logging.v2.UpdateCmekSettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListLogs. + * @function listLogs + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.IListLogsRequest} request ListLogsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateCmekSettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { - var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); - if (error) - return "cmekSettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; /** - * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateCmekSettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * Callback as used by {@link google.logging.v2.LoggingServiceV2#tailLogEntries}. + * @memberof google.logging.v2.LoggingServiceV2 + * @typedef TailLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.TailLogEntriesResponse} [response] TailLogEntriesResponse */ - UpdateCmekSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateCmekSettingsRequest) - return object; - var message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.cmekSettings != null) { - if (typeof object.cmekSettings !== "object") - throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.cmekSettings: object expected"); - message.cmekSettings = $root.google.logging.v2.CmekSettings.fromObject(object.cmekSettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; /** - * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateCmekSettingsRequest - * @static - * @param {google.logging.v2.UpdateCmekSettingsRequest} message UpdateCmekSettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls TailLogEntries. + * @function tailLogEntries + * @memberof google.logging.v2.LoggingServiceV2 + * @instance + * @param {google.logging.v2.ITailLogEntriesRequest} request TailLogEntriesRequest message or plain object + * @param {google.logging.v2.LoggingServiceV2.TailLogEntriesCallback} callback Node-style callback called with the error, if any, and TailLogEntriesResponse + * @returns {undefined} + * @variation 1 */ - UpdateCmekSettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.cmekSettings = null; - object.updateMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) - object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + Object.defineProperty(LoggingServiceV2.prototype.tailLogEntries = function tailLogEntries(request, callback) { + return this.rpcCall(tailLogEntries, $root.google.logging.v2.TailLogEntriesRequest, $root.google.logging.v2.TailLogEntriesResponse, request, callback); + }, "name", { value: "TailLogEntries" }); /** - * Converts this UpdateCmekSettingsRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * Calls TailLogEntries. + * @function tailLogEntries + * @memberof google.logging.v2.LoggingServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.ITailLogEntriesRequest} request TailLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateCmekSettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return UpdateCmekSettingsRequest; + return LoggingServiceV2; })(); - v2.CmekSettings = (function() { + v2.DeleteLogRequest = (function() { /** - * Properties of a CmekSettings. + * Properties of a DeleteLogRequest. * @memberof google.logging.v2 - * @interface ICmekSettings - * @property {string|null} [name] CmekSettings name - * @property {string|null} [kmsKeyName] CmekSettings kmsKeyName - * @property {string|null} [serviceAccountId] CmekSettings serviceAccountId + * @interface IDeleteLogRequest + * @property {string|null} [logName] DeleteLogRequest logName */ /** - * Constructs a new CmekSettings. + * Constructs a new DeleteLogRequest. * @memberof google.logging.v2 - * @classdesc Represents a CmekSettings. - * @implements ICmekSettings + * @classdesc Represents a DeleteLogRequest. + * @implements IDeleteLogRequest * @constructor - * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set */ - function CmekSettings(properties) { + function DeleteLogRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13008,101 +12609,75 @@ } /** - * CmekSettings name. - * @member {string} name - * @memberof google.logging.v2.CmekSettings - * @instance - */ - CmekSettings.prototype.name = ""; - - /** - * CmekSettings kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.logging.v2.CmekSettings - * @instance - */ - CmekSettings.prototype.kmsKeyName = ""; - - /** - * CmekSettings serviceAccountId. - * @member {string} serviceAccountId - * @memberof google.logging.v2.CmekSettings + * DeleteLogRequest logName. + * @member {string} logName + * @memberof google.logging.v2.DeleteLogRequest * @instance */ - CmekSettings.prototype.serviceAccountId = ""; + DeleteLogRequest.prototype.logName = ""; /** - * Creates a new CmekSettings instance using the specified properties. + * Creates a new DeleteLogRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.CmekSettings - * @static - * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set - * @returns {google.logging.v2.CmekSettings} CmekSettings instance + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {google.logging.v2.IDeleteLogRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest instance */ - CmekSettings.create = function create(properties) { - return new CmekSettings(properties); + DeleteLogRequest.create = function create(properties) { + return new DeleteLogRequest(properties); }; /** - * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * Encodes the specified DeleteLogRequest message. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CmekSettings.encode = function encode(message, writer) { + DeleteLogRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); - if (message.serviceAccountId != null && Object.hasOwnProperty.call(message, "serviceAccountId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountId); + if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); return writer; }; /** - * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * Encodes the specified DeleteLogRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {google.logging.v2.IDeleteLogRequest} message DeleteLogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CmekSettings.encodeDelimited = function encodeDelimited(message, writer) { + DeleteLogRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CmekSettings message from the specified reader or buffer. + * Decodes a DeleteLogRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CmekSettings.decode = function decode(reader, length) { + DeleteLogRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CmekSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.kmsKeyName = reader.string(); - break; - case 3: - message.serviceAccountId = reader.string(); + message.logName = reader.string(); break; default: reader.skipType(tag & 7); @@ -13113,334 +12688,467 @@ }; /** - * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * Decodes a DeleteLogRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CmekSettings.decodeDelimited = function decodeDelimited(reader) { + DeleteLogRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CmekSettings message. + * Verifies a DeleteLogRequest message. * @function verify - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CmekSettings.verify = function verify(message) { + DeleteLogRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) - if (!$util.isString(message.serviceAccountId)) - return "serviceAccountId: string expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; return null; }; /** - * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLogRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.DeleteLogRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.DeleteLogRequest} DeleteLogRequest */ - CmekSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CmekSettings) + DeleteLogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogRequest) return object; - var message = new $root.google.logging.v2.CmekSettings(); - if (object.name != null) - message.name = String(object.name); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.serviceAccountId != null) - message.serviceAccountId = String(object.serviceAccountId); + var message = new $root.google.logging.v2.DeleteLogRequest(); + if (object.logName != null) + message.logName = String(object.logName); return message; }; /** - * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * Creates a plain object from a DeleteLogRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.DeleteLogRequest * @static - * @param {google.logging.v2.CmekSettings} message CmekSettings + * @param {google.logging.v2.DeleteLogRequest} message DeleteLogRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CmekSettings.toObject = function toObject(message, options) { + DeleteLogRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.kmsKeyName = ""; - object.serviceAccountId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) - object.serviceAccountId = message.serviceAccountId; + if (options.defaults) + object.logName = ""; + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; return object; }; /** - * Converts this CmekSettings to JSON. + * Converts this DeleteLogRequest to JSON. * @function toJSON - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.DeleteLogRequest * @instance * @returns {Object.} JSON object */ - CmekSettings.prototype.toJSON = function toJSON() { + DeleteLogRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CmekSettings; + return DeleteLogRequest; })(); - v2.MetricsServiceV2 = (function() { + v2.WriteLogEntriesRequest = (function() { /** - * Constructs a new MetricsServiceV2 service. + * Properties of a WriteLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents a MetricsServiceV2 - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @interface IWriteLogEntriesRequest + * @property {string|null} [logName] WriteLogEntriesRequest logName + * @property {google.api.IMonitoredResource|null} [resource] WriteLogEntriesRequest resource + * @property {Object.|null} [labels] WriteLogEntriesRequest labels + * @property {Array.|null} [entries] WriteLogEntriesRequest entries + * @property {boolean|null} [partialSuccess] WriteLogEntriesRequest partialSuccess + * @property {boolean|null} [dryRun] WriteLogEntriesRequest dryRun */ - function MetricsServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MetricsServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsServiceV2; /** - * Creates new MetricsServiceV2 service using the specified rpc implementation. - * @function create - * @memberof google.logging.v2.MetricsServiceV2 - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {MetricsServiceV2} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new WriteLogEntriesRequest. + * @memberof google.logging.v2 + * @classdesc Represents a WriteLogEntriesRequest. + * @implements IWriteLogEntriesRequest + * @constructor + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set */ - MetricsServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function WriteLogEntriesRequest(properties) { + this.labels = {}; + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef ListLogMetricsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogMetricsResponse} [response] ListLogMetricsResponse + * WriteLogEntriesRequest logName. + * @member {string} logName + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance */ + WriteLogEntriesRequest.prototype.logName = ""; /** - * Calls ListLogMetrics. - * @function listLogMetrics - * @memberof google.logging.v2.MetricsServiceV2 + * WriteLogEntriesRequest resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance - * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.ListLogMetricsCallback} callback Node-style callback called with the error, if any, and ListLogMetricsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(MetricsServiceV2.prototype.listLogMetrics = function listLogMetrics(request, callback) { - return this.rpcCall(listLogMetrics, $root.google.logging.v2.ListLogMetricsRequest, $root.google.logging.v2.ListLogMetricsResponse, request, callback); - }, "name", { value: "ListLogMetrics" }); + WriteLogEntriesRequest.prototype.resource = null; /** - * Calls ListLogMetrics. - * @function listLogMetrics - * @memberof google.logging.v2.MetricsServiceV2 + * WriteLogEntriesRequest labels. + * @member {Object.} labels + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance - * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + WriteLogEntriesRequest.prototype.labels = $util.emptyObject; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef GetLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric + * WriteLogEntriesRequest entries. + * @member {Array.} entries + * @memberof google.logging.v2.WriteLogEntriesRequest + * @instance */ + WriteLogEntriesRequest.prototype.entries = $util.emptyArray; /** - * Calls GetLogMetric. - * @function getLogMetric - * @memberof google.logging.v2.MetricsServiceV2 + * WriteLogEntriesRequest partialSuccess. + * @member {boolean} partialSuccess + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance - * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.GetLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(MetricsServiceV2.prototype.getLogMetric = function getLogMetric(request, callback) { - return this.rpcCall(getLogMetric, $root.google.logging.v2.GetLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "GetLogMetric" }); + WriteLogEntriesRequest.prototype.partialSuccess = false; /** - * Calls GetLogMetric. - * @function getLogMetric - * @memberof google.logging.v2.MetricsServiceV2 + * WriteLogEntriesRequest dryRun. + * @member {boolean} dryRun + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance - * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + WriteLogEntriesRequest.prototype.dryRun = false; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef CreateLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric + * Creates a new WriteLogEntriesRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest instance */ + WriteLogEntriesRequest.create = function create(properties) { + return new WriteLogEntriesRequest(properties); + }; /** - * Calls CreateLogMetric. - * @function createLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.CreateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 + * Encodes the specified WriteLogEntriesRequest message. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(MetricsServiceV2.prototype.createLogMetric = function createLogMetric(request, callback) { - return this.rpcCall(createLogMetric, $root.google.logging.v2.CreateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "CreateLogMetric" }); + WriteLogEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logName != null && Object.hasOwnProperty.call(message, "logName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logName); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.api.MonitoredResource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partialSuccess); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + return writer; + }; /** - * Calls CreateLogMetric. - * @function createLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified WriteLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.IWriteLogEntriesRequest} message WriteLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + WriteLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef UpdateLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + WriteLogEntriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.logName = reader.string(); + break; + case 2: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 3: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 5: + message.partialSuccess = reader.bool(); + break; + case 6: + message.dryRun = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateLogMetric. - * @function updateLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 + * Decodes a WriteLogEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(MetricsServiceV2.prototype.updateLogMetric = function updateLogMetric(request, callback) { - return this.rpcCall(updateLogMetric, $root.google.logging.v2.UpdateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "UpdateLogMetric" }); + WriteLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateLogMetric. - * @function updateLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a WriteLogEntriesRequest message. + * @function verify + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + WriteLogEntriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logName != null && message.hasOwnProperty("logName")) + if (!$util.isString(message.logName)) + return "logName: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + if (typeof message.partialSuccess !== "boolean") + return "partialSuccess: boolean expected"; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + return null; + }; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef DeleteLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a WriteLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.WriteLogEntriesRequest} WriteLogEntriesRequest */ + WriteLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesRequest) + return object; + var message = new $root.google.logging.v2.WriteLogEntriesRequest(); + if (object.logName != null) + message.logName = String(object.logName); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesRequest.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.partialSuccess != null) + message.partialSuccess = Boolean(object.partialSuccess); + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + return message; + }; /** - * Calls DeleteLogMetric. - * @function deleteLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a WriteLogEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {google.logging.v2.WriteLogEntriesRequest} message WriteLogEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(MetricsServiceV2.prototype.deleteLogMetric = function deleteLogMetric(request, callback) { - return this.rpcCall(deleteLogMetric, $root.google.logging.v2.DeleteLogMetricRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteLogMetric" }); + WriteLogEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.logName = ""; + object.resource = null; + object.partialSuccess = false; + object.dryRun = false; + } + if (message.logName != null && message.hasOwnProperty("logName")) + object.logName = message.logName; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = message.partialSuccess; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + return object; + }; /** - * Calls DeleteLogMetric. - * @function deleteLogMetric - * @memberof google.logging.v2.MetricsServiceV2 + * Converts this WriteLogEntriesRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.WriteLogEntriesRequest * @instance - * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + WriteLogEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MetricsServiceV2; + return WriteLogEntriesRequest; })(); - v2.LogMetric = (function() { + v2.WriteLogEntriesResponse = (function() { /** - * Properties of a LogMetric. + * Properties of a WriteLogEntriesResponse. * @memberof google.logging.v2 - * @interface ILogMetric - * @property {string|null} [name] LogMetric name - * @property {string|null} [description] LogMetric description - * @property {string|null} [filter] LogMetric filter - * @property {google.api.IMetricDescriptor|null} [metricDescriptor] LogMetric metricDescriptor - * @property {string|null} [valueExtractor] LogMetric valueExtractor - * @property {Object.|null} [labelExtractors] LogMetric labelExtractors - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] LogMetric bucketOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogMetric createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogMetric updateTime - * @property {google.logging.v2.LogMetric.ApiVersion|null} [version] LogMetric version + * @interface IWriteLogEntriesResponse */ /** - * Constructs a new LogMetric. + * Constructs a new WriteLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a LogMetric. - * @implements ILogMetric + * @classdesc Represents a WriteLogEntriesResponse. + * @implements IWriteLogEntriesResponse * @constructor - * @param {google.logging.v2.ILogMetric=} [properties] Properties to set + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set */ - function LogMetric(properties) { - this.labelExtractors = {}; + function WriteLogEntriesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13448,212 +13156,259 @@ } /** - * LogMetric name. - * @member {string} name - * @memberof google.logging.v2.LogMetric - * @instance + * Creates a new WriteLogEntriesResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse instance */ - LogMetric.prototype.name = ""; + WriteLogEntriesResponse.create = function create(properties) { + return new WriteLogEntriesResponse(properties); + }; /** - * LogMetric description. - * @member {string} description - * @memberof google.logging.v2.LogMetric - * @instance + * Encodes the specified WriteLogEntriesResponse message. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogMetric.prototype.description = ""; + WriteLogEntriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * LogMetric filter. - * @member {string} filter - * @memberof google.logging.v2.LogMetric - * @instance + * Encodes the specified WriteLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.IWriteLogEntriesResponse} message WriteLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogMetric.prototype.filter = ""; + WriteLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * LogMetric metricDescriptor. - * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor - * @memberof google.logging.v2.LogMetric - * @instance + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.prototype.metricDescriptor = null; + WriteLogEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * LogMetric valueExtractor. - * @member {string} valueExtractor - * @memberof google.logging.v2.LogMetric - * @instance + * Decodes a WriteLogEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.prototype.valueExtractor = ""; + WriteLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * LogMetric labelExtractors. - * @member {Object.} labelExtractors - * @memberof google.logging.v2.LogMetric - * @instance + * Verifies a WriteLogEntriesResponse message. + * @function verify + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogMetric.prototype.labelExtractors = $util.emptyObject; + WriteLogEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * LogMetric bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.logging.v2.LogMetric - * @instance + * Creates a WriteLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.WriteLogEntriesResponse} WriteLogEntriesResponse */ - LogMetric.prototype.bucketOptions = null; + WriteLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesResponse) + return object; + return new $root.google.logging.v2.WriteLogEntriesResponse(); + }; /** - * LogMetric createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogMetric - * @instance + * Creates a plain object from a WriteLogEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {google.logging.v2.WriteLogEntriesResponse} message WriteLogEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - LogMetric.prototype.createTime = null; + WriteLogEntriesResponse.toObject = function toObject() { + return {}; + }; /** - * LogMetric updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogMetric + * Converts this WriteLogEntriesResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.WriteLogEntriesResponse * @instance + * @returns {Object.} JSON object */ - LogMetric.prototype.updateTime = null; + WriteLogEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteLogEntriesResponse; + })(); + + v2.WriteLogEntriesPartialErrors = (function() { + + /** + * Properties of a WriteLogEntriesPartialErrors. + * @memberof google.logging.v2 + * @interface IWriteLogEntriesPartialErrors + * @property {Object.|null} [logEntryErrors] WriteLogEntriesPartialErrors logEntryErrors + */ + + /** + * Constructs a new WriteLogEntriesPartialErrors. + * @memberof google.logging.v2 + * @classdesc Represents a WriteLogEntriesPartialErrors. + * @implements IWriteLogEntriesPartialErrors + * @constructor + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + */ + function WriteLogEntriesPartialErrors(properties) { + this.logEntryErrors = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * LogMetric version. - * @member {google.logging.v2.LogMetric.ApiVersion} version - * @memberof google.logging.v2.LogMetric + * WriteLogEntriesPartialErrors logEntryErrors. + * @member {Object.} logEntryErrors + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @instance */ - LogMetric.prototype.version = 0; + WriteLogEntriesPartialErrors.prototype.logEntryErrors = $util.emptyObject; /** - * Creates a new LogMetric instance using the specified properties. + * Creates a new WriteLogEntriesPartialErrors instance using the specified properties. * @function create - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.ILogMetric=} [properties] Properties to set - * @returns {google.logging.v2.LogMetric} LogMetric instance + * @param {google.logging.v2.IWriteLogEntriesPartialErrors=} [properties] Properties to set + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors instance */ - LogMetric.create = function create(properties) { - return new LogMetric(properties); + WriteLogEntriesPartialErrors.create = function create(properties) { + return new WriteLogEntriesPartialErrors(properties); }; /** - * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * Encodes the specified WriteLogEntriesPartialErrors message. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogMetric.encode = function encode(message, writer) { + WriteLogEntriesPartialErrors.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); - if (message.metricDescriptor != null && Object.hasOwnProperty.call(message, "metricDescriptor")) - $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.valueExtractor != null && Object.hasOwnProperty.call(message, "valueExtractor")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueExtractor); - if (message.labelExtractors != null && Object.hasOwnProperty.call(message, "labelExtractors")) - for (var keys = Object.keys(message.labelExtractors), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labelExtractors[keys[i]]).ldelim(); - if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.logEntryErrors != null && Object.hasOwnProperty.call(message, "logEntryErrors")) + for (var keys = Object.keys(message.logEntryErrors), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.rpc.Status.encode(message.logEntryErrors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * Encodes the specified WriteLogEntriesPartialErrors message, length delimited. Does not implicitly {@link google.logging.v2.WriteLogEntriesPartialErrors.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {google.logging.v2.IWriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogMetric.encodeDelimited = function encodeDelimited(message, writer) { + WriteLogEntriesPartialErrors.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogMetric message from the specified reader or buffer. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogMetric} LogMetric + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.decode = function decode(reader, length) { + WriteLogEntriesPartialErrors.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 5: - message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); - break; - case 6: - message.valueExtractor = reader.string(); - break; - case 7: - if (message.labelExtractors === $util.emptyObject) - message.labelExtractors = {}; + if (message.logEntryErrors === $util.emptyObject) + message.logEntryErrors = {}; var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; + key = 0; + value = null; while (reader.pos < end2) { var tag2 = reader.uint32(); switch (tag2 >>> 3) { case 1: - key = reader.string(); + key = reader.int32(); break; case 2: - value = reader.string(); + value = $root.google.rpc.Status.decode(reader, reader.uint32()); break; default: reader.skipType(tag2 & 7); break; } } - message.labelExtractors[key] = value; - break; - case 8: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - case 9: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.version = reader.int32(); + message.logEntryErrors[key] = value; break; default: reader.skipType(tag & 7); @@ -13664,244 +13419,135 @@ }; /** - * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * Decodes a WriteLogEntriesPartialErrors message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogMetric} LogMetric + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.decodeDelimited = function decodeDelimited(reader) { + WriteLogEntriesPartialErrors.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogMetric message. + * Verifies a WriteLogEntriesPartialErrors message. * @function verify - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogMetric.verify = function verify(message) { + WriteLogEntriesPartialErrors.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { - var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); - if (error) - return "metricDescriptor." + error; - } - if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) - if (!$util.isString(message.valueExtractor)) - return "valueExtractor: string expected"; - if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) { - if (!$util.isObject(message.labelExtractors)) - return "labelExtractors: object expected"; - var key = Object.keys(message.labelExtractors); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labelExtractors[key[i]])) - return "labelExtractors: string{k:string} expected"; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); - if (error) - return "bucketOptions." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.version != null && message.hasOwnProperty("version")) - switch (message.version) { - default: - return "version: enum value expected"; - case 0: - case 1: - break; + if (message.logEntryErrors != null && message.hasOwnProperty("logEntryErrors")) { + if (!$util.isObject(message.logEntryErrors)) + return "logEntryErrors: object expected"; + var key = Object.keys(message.logEntryErrors); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "logEntryErrors: integer key{k:int32} expected"; + { + var error = $root.google.rpc.Status.verify(message.logEntryErrors[key[i]]); + if (error) + return "logEntryErrors." + error; + } } + } return null; }; /** - * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * Creates a WriteLogEntriesPartialErrors message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogMetric} LogMetric + * @returns {google.logging.v2.WriteLogEntriesPartialErrors} WriteLogEntriesPartialErrors */ - LogMetric.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogMetric) + WriteLogEntriesPartialErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.WriteLogEntriesPartialErrors) return object; - var message = new $root.google.logging.v2.LogMetric(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.metricDescriptor != null) { - if (typeof object.metricDescriptor !== "object") - throw TypeError(".google.logging.v2.LogMetric.metricDescriptor: object expected"); - message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); - } - if (object.valueExtractor != null) - message.valueExtractor = String(object.valueExtractor); - if (object.labelExtractors) { - if (typeof object.labelExtractors !== "object") - throw TypeError(".google.logging.v2.LogMetric.labelExtractors: object expected"); - message.labelExtractors = {}; - for (var keys = Object.keys(object.labelExtractors), i = 0; i < keys.length; ++i) - message.labelExtractors[keys[i]] = String(object.labelExtractors[keys[i]]); - } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.logging.v2.LogMetric.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogMetric.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogMetric.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.version) { - case "V2": - case 0: - message.version = 0; - break; - case "V1": - case 1: - message.version = 1; - break; + var message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(); + if (object.logEntryErrors) { + if (typeof object.logEntryErrors !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors = {}; + for (var keys = Object.keys(object.logEntryErrors), i = 0; i < keys.length; ++i) { + if (typeof object.logEntryErrors[keys[i]] !== "object") + throw TypeError(".google.logging.v2.WriteLogEntriesPartialErrors.logEntryErrors: object expected"); + message.logEntryErrors[keys[i]] = $root.google.rpc.Status.fromObject(object.logEntryErrors[keys[i]]); + } } return message; }; /** - * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * Creates a plain object from a WriteLogEntriesPartialErrors message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @static - * @param {google.logging.v2.LogMetric} message LogMetric + * @param {google.logging.v2.WriteLogEntriesPartialErrors} message WriteLogEntriesPartialErrors * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogMetric.toObject = function toObject(message, options) { + WriteLogEntriesPartialErrors.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.objects || options.defaults) - object.labelExtractors = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.version = options.enums === String ? "V2" : 0; - object.metricDescriptor = null; - object.valueExtractor = ""; - object.bucketOptions = null; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.version != null && message.hasOwnProperty("version")) - object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) - object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); - if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) - object.valueExtractor = message.valueExtractor; + object.logEntryErrors = {}; var keys2; - if (message.labelExtractors && (keys2 = Object.keys(message.labelExtractors)).length) { - object.labelExtractors = {}; + if (message.logEntryErrors && (keys2 = Object.keys(message.logEntryErrors)).length) { + object.logEntryErrors = {}; for (var j = 0; j < keys2.length; ++j) - object.labelExtractors[keys2[j]] = message.labelExtractors[keys2[j]]; + object.logEntryErrors[keys2[j]] = $root.google.rpc.Status.toObject(message.logEntryErrors[keys2[j]], options); } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this LogMetric to JSON. + * Converts this WriteLogEntriesPartialErrors to JSON. * @function toJSON - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.WriteLogEntriesPartialErrors * @instance * @returns {Object.} JSON object */ - LogMetric.prototype.toJSON = function toJSON() { + WriteLogEntriesPartialErrors.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ApiVersion enum. - * @name google.logging.v2.LogMetric.ApiVersion - * @enum {number} - * @property {number} V2=0 V2 value - * @property {number} V1=1 V1 value - */ - LogMetric.ApiVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "V2"] = 0; - values[valuesById[1] = "V1"] = 1; - return values; - })(); - - return LogMetric; + return WriteLogEntriesPartialErrors; })(); - v2.ListLogMetricsRequest = (function() { + v2.ListLogEntriesRequest = (function() { /** - * Properties of a ListLogMetricsRequest. + * Properties of a ListLogEntriesRequest. * @memberof google.logging.v2 - * @interface IListLogMetricsRequest - * @property {string|null} [parent] ListLogMetricsRequest parent - * @property {string|null} [pageToken] ListLogMetricsRequest pageToken - * @property {number|null} [pageSize] ListLogMetricsRequest pageSize + * @interface IListLogEntriesRequest + * @property {Array.|null} [resourceNames] ListLogEntriesRequest resourceNames + * @property {string|null} [filter] ListLogEntriesRequest filter + * @property {string|null} [orderBy] ListLogEntriesRequest orderBy + * @property {number|null} [pageSize] ListLogEntriesRequest pageSize + * @property {string|null} [pageToken] ListLogEntriesRequest pageToken */ /** - * Constructs a new ListLogMetricsRequest. + * Constructs a new ListLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogMetricsRequest. - * @implements IListLogMetricsRequest + * @classdesc Represents a ListLogEntriesRequest. + * @implements IListLogEntriesRequest * @constructor - * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set */ - function ListLogMetricsRequest(properties) { + function ListLogEntriesRequest(properties) { + this.resourceNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13909,102 +13555,131 @@ } /** - * ListLogMetricsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListLogMetricsRequest + * ListLogEntriesRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - ListLogMetricsRequest.prototype.parent = ""; + ListLogEntriesRequest.prototype.resourceNames = $util.emptyArray; /** - * ListLogMetricsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogMetricsRequest + * ListLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - ListLogMetricsRequest.prototype.pageToken = ""; + ListLogEntriesRequest.prototype.filter = ""; /** - * ListLogMetricsRequest pageSize. + * ListLogEntriesRequest orderBy. + * @member {string} orderBy + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.orderBy = ""; + + /** + * ListLogEntriesRequest pageSize. * @member {number} pageSize - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @instance */ - ListLogMetricsRequest.prototype.pageSize = 0; + ListLogEntriesRequest.prototype.pageSize = 0; /** - * Creates a new ListLogMetricsRequest instance using the specified properties. + * ListLogEntriesRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogEntriesRequest + * @instance + */ + ListLogEntriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLogEntriesRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest instance + * @param {google.logging.v2.IListLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest instance */ - ListLogMetricsRequest.create = function create(properties) { - return new ListLogMetricsRequest(properties); + ListLogEntriesRequest.create = function create(properties) { + return new ListLogEntriesRequest(properties); }; /** - * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesRequest message. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsRequest.encode = function encode(message, writer) { + ListLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); return writer; }; /** - * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * Encodes the specified ListLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {google.logging.v2.IListLogEntriesRequest} message ListLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsRequest.decode = function decode(reader, length) { + ListLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); + case 8: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); break; case 2: - message.pageToken = reader.string(); + message.filter = reader.string(); break; case 3: + message.orderBy = reader.string(); + break; + case 4: message.pageSize = reader.int32(); break; + case 5: + message.pageToken = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -14014,126 +13689,155 @@ }; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogMetricsRequest message. + * Verifies a ListLogEntriesRequest message. * @function verify - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogMetricsRequest.verify = function verify(message) { + ListLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.logging.v2.ListLogEntriesRequest} ListLogEntriesRequest */ - ListLogMetricsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogMetricsRequest) + ListLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesRequest) return object; - var message = new $root.google.logging.v2.ListLogMetricsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.logging.v2.ListLogEntriesRequest(); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.ListLogEntriesRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); if (object.pageSize != null) message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @static - * @param {google.logging.v2.ListLogMetricsRequest} message ListLogMetricsRequest + * @param {google.logging.v2.ListLogEntriesRequest} message ListLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogMetricsRequest.toObject = function toObject(message, options) { + ListLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.resourceNames = []; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; object.pageSize = 0; + object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } return object; }; /** - * Converts this ListLogMetricsRequest to JSON. + * Converts this ListLogEntriesRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.ListLogEntriesRequest * @instance * @returns {Object.} JSON object */ - ListLogMetricsRequest.prototype.toJSON = function toJSON() { + ListLogEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogMetricsRequest; + return ListLogEntriesRequest; })(); - v2.ListLogMetricsResponse = (function() { + v2.ListLogEntriesResponse = (function() { /** - * Properties of a ListLogMetricsResponse. + * Properties of a ListLogEntriesResponse. * @memberof google.logging.v2 - * @interface IListLogMetricsResponse - * @property {Array.|null} [metrics] ListLogMetricsResponse metrics - * @property {string|null} [nextPageToken] ListLogMetricsResponse nextPageToken + * @interface IListLogEntriesResponse + * @property {Array.|null} [entries] ListLogEntriesResponse entries + * @property {string|null} [nextPageToken] ListLogEntriesResponse nextPageToken */ /** - * Constructs a new ListLogMetricsResponse. + * Constructs a new ListLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a ListLogMetricsResponse. - * @implements IListLogMetricsResponse + * @classdesc Represents a ListLogEntriesResponse. + * @implements IListLogEntriesResponse * @constructor - * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set */ - function ListLogMetricsResponse(properties) { - this.metrics = []; + function ListLogEntriesResponse(properties) { + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14141,88 +13845,88 @@ } /** - * ListLogMetricsResponse metrics. - * @member {Array.} metrics - * @memberof google.logging.v2.ListLogMetricsResponse + * ListLogEntriesResponse entries. + * @member {Array.} entries + * @memberof google.logging.v2.ListLogEntriesResponse * @instance */ - ListLogMetricsResponse.prototype.metrics = $util.emptyArray; + ListLogEntriesResponse.prototype.entries = $util.emptyArray; /** - * ListLogMetricsResponse nextPageToken. + * ListLogEntriesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @instance */ - ListLogMetricsResponse.prototype.nextPageToken = ""; + ListLogEntriesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListLogMetricsResponse instance using the specified properties. + * Creates a new ListLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse instance + * @param {google.logging.v2.IListLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse instance */ - ListLogMetricsResponse.create = function create(properties) { - return new ListLogMetricsResponse(properties); + ListLogEntriesResponse.create = function create(properties) { + return new ListLogEntriesResponse(properties); }; /** - * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * Encodes the specified ListLogEntriesResponse message. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsResponse.encode = function encode(message, writer) { + ListLogEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.logging.v2.LogMetric.encode(message.metrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * Encodes the specified ListLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {google.logging.v2.IListLogEntriesResponse} message ListLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsResponse.decode = function decode(reader, length) { + ListLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -14236,39 +13940,39 @@ }; /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + ListLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogMetricsResponse message. + * Verifies a ListLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogMetricsResponse.verify = function verify(message) { + ListLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.logging.v2.LogMetric.verify(message.metrics[i]); + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); if (error) - return "metrics." + error; + return "entries." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -14278,25 +13982,25 @@ }; /** - * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @returns {google.logging.v2.ListLogEntriesResponse} ListLogEntriesResponse */ - ListLogMetricsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogMetricsResponse) + ListLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogEntriesResponse) return object; - var message = new $root.google.logging.v2.ListLogMetricsResponse(); - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: object expected"); - message.metrics[i] = $root.google.logging.v2.LogMetric.fromObject(object.metrics[i]); + var message = new $root.google.logging.v2.ListLogEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.ListLogEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); } } if (object.nextPageToken != null) @@ -14305,26 +14009,26 @@ }; /** - * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @static - * @param {google.logging.v2.ListLogMetricsResponse} message ListLogMetricsResponse + * @param {google.logging.v2.ListLogEntriesResponse} message ListLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogMetricsResponse.toObject = function toObject(message, options) { + ListLogEntriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.metrics = []; + object.entries = []; if (options.defaults) object.nextPageToken = ""; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.logging.v2.LogMetric.toObject(message.metrics[j], options); + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -14332,37 +14036,38 @@ }; /** - * Converts this ListLogMetricsResponse to JSON. + * Converts this ListLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.ListLogEntriesResponse * @instance * @returns {Object.} JSON object */ - ListLogMetricsResponse.prototype.toJSON = function toJSON() { + ListLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogMetricsResponse; + return ListLogEntriesResponse; })(); - v2.GetLogMetricRequest = (function() { + v2.ListMonitoredResourceDescriptorsRequest = (function() { /** - * Properties of a GetLogMetricRequest. + * Properties of a ListMonitoredResourceDescriptorsRequest. * @memberof google.logging.v2 - * @interface IGetLogMetricRequest - * @property {string|null} [metricName] GetLogMetricRequest metricName + * @interface IListMonitoredResourceDescriptorsRequest + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken */ /** - * Constructs a new GetLogMetricRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetLogMetricRequest. - * @implements IGetLogMetricRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest * @constructor - * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set */ - function GetLogMetricRequest(properties) { + function ListMonitoredResourceDescriptorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14370,75 +14075,88 @@ } /** - * GetLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.GetLogMetricRequest + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance */ - GetLogMetricRequest.prototype.metricName = ""; + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; /** - * Creates a new GetLogMetricRequest instance using the specified properties. + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance */ - GetLogMetricRequest.create = function create(properties) { - return new GetLogMetricRequest(properties); + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); }; /** - * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLogMetricRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); return writer; }; /** - * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLogMetricRequest.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLogMetricRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.metricName = reader.string(); + message.pageSize = reader.int32(); + break; + case 2: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14449,108 +14167,118 @@ }; /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + ListMonitoredResourceDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetLogMetricRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @function verify - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetLogMetricRequest.verify = function verify(message) { + ListMonitoredResourceDescriptorsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest */ - GetLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetLogMetricRequest) + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest) return object; - var message = new $root.google.logging.v2.GetLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.logging.v2.GetLogMetricRequest} message GetLogMetricRequest + * @param {google.logging.v2.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetLogMetricRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this GetLogMetricRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest * @instance * @returns {Object.} JSON object */ - GetLogMetricRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetLogMetricRequest; + return ListMonitoredResourceDescriptorsRequest; })(); - v2.CreateLogMetricRequest = (function() { + v2.ListMonitoredResourceDescriptorsResponse = (function() { /** - * Properties of a CreateLogMetricRequest. + * Properties of a ListMonitoredResourceDescriptorsResponse. * @memberof google.logging.v2 - * @interface ICreateLogMetricRequest - * @property {string|null} [parent] CreateLogMetricRequest parent - * @property {google.logging.v2.ILogMetric|null} [metric] CreateLogMetricRequest metric + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken */ /** - * Constructs a new CreateLogMetricRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @memberof google.logging.v2 - * @classdesc Represents a CreateLogMetricRequest. - * @implements ICreateLogMetricRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse * @constructor - * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set */ - function CreateLogMetricRequest(properties) { + function ListMonitoredResourceDescriptorsResponse(properties) { + this.resourceDescriptors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14558,88 +14286,91 @@ } /** - * CreateLogMetricRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateLogMetricRequest + * ListMonitoredResourceDescriptorsResponse resourceDescriptors. + * @member {Array.} resourceDescriptors + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance */ - CreateLogMetricRequest.prototype.parent = ""; + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; /** - * CreateLogMetricRequest metric. - * @member {google.logging.v2.ILogMetric|null|undefined} metric - * @memberof google.logging.v2.CreateLogMetricRequest + * ListMonitoredResourceDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance */ - CreateLogMetricRequest.prototype.metric = null; + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateLogMetricRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest instance + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance */ - CreateLogMetricRequest.create = function create(properties) { - return new CreateLogMetricRequest(properties); + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); }; /** - * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLogMetricRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceDescriptors != null && message.resourceDescriptors.length) + for (var i = 0; i < message.resourceDescriptors.length; ++i) + $root.google.api.MonitoredResourceDescriptor.encode(message.resourceDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode + * @param {google.logging.v2.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLogMetricRequest.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLogMetricRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.resourceDescriptors && message.resourceDescriptors.length)) + message.resourceDescriptors = []; + message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); break; case 2: - message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14650,122 +14381,137 @@ }; /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + ListMonitoredResourceDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateLogMetricRequest message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @function verify - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateLogMetricRequest.verify = function verify(message) { + ListMonitoredResourceDescriptorsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.metric != null && message.hasOwnProperty("metric")) { - var error = $root.google.logging.v2.LogMetric.verify(message.metric); - if (error) - return "metric." + error; + if (message.resourceDescriptors != null && message.hasOwnProperty("resourceDescriptors")) { + if (!Array.isArray(message.resourceDescriptors)) + return "resourceDescriptors: array expected"; + for (var i = 0; i < message.resourceDescriptors.length; ++i) { + var error = $root.google.api.MonitoredResourceDescriptor.verify(message.resourceDescriptors[i]); + if (error) + return "resourceDescriptors." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @returns {google.logging.v2.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse */ - CreateLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateLogMetricRequest) + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse) return object; - var message = new $root.google.logging.v2.CreateLogMetricRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.logging.v2.CreateLogMetricRequest.metric: object expected"); - message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); + var message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.logging.v2.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); + message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.logging.v2.CreateLogMetricRequest} message CreateLogMetricRequest + * @param {google.logging.v2.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateLogMetricRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.metric = null; + if (options.arrays || options.defaults) + object.resourceDescriptors = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceDescriptors && message.resourceDescriptors.length) { + object.resourceDescriptors = []; + for (var j = 0; j < message.resourceDescriptors.length; ++j) + object.resourceDescriptors[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.resourceDescriptors[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateLogMetricRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.CreateLogMetricRequest + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse * @instance * @returns {Object.} JSON object */ - CreateLogMetricRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateLogMetricRequest; + return ListMonitoredResourceDescriptorsResponse; })(); - v2.UpdateLogMetricRequest = (function() { + v2.ListLogsRequest = (function() { /** - * Properties of an UpdateLogMetricRequest. + * Properties of a ListLogsRequest. * @memberof google.logging.v2 - * @interface IUpdateLogMetricRequest - * @property {string|null} [metricName] UpdateLogMetricRequest metricName - * @property {google.logging.v2.ILogMetric|null} [metric] UpdateLogMetricRequest metric + * @interface IListLogsRequest + * @property {string|null} [parent] ListLogsRequest parent + * @property {number|null} [pageSize] ListLogsRequest pageSize + * @property {string|null} [pageToken] ListLogsRequest pageToken + * @property {Array.|null} [resourceNames] ListLogsRequest resourceNames */ /** - * Constructs a new UpdateLogMetricRequest. + * Constructs a new ListLogsRequest. * @memberof google.logging.v2 - * @classdesc Represents an UpdateLogMetricRequest. - * @implements IUpdateLogMetricRequest + * @classdesc Represents a ListLogsRequest. + * @implements IListLogsRequest * @constructor - * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set */ - function UpdateLogMetricRequest(properties) { + function ListLogsRequest(properties) { + this.resourceNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14773,88 +14519,117 @@ } /** - * UpdateLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.UpdateLogMetricRequest + * ListLogsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogsRequest * @instance */ - UpdateLogMetricRequest.prototype.metricName = ""; + ListLogsRequest.prototype.parent = ""; /** - * UpdateLogMetricRequest metric. - * @member {google.logging.v2.ILogMetric|null|undefined} metric - * @memberof google.logging.v2.UpdateLogMetricRequest + * ListLogsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogsRequest * @instance */ - UpdateLogMetricRequest.prototype.metric = null; + ListLogsRequest.prototype.pageSize = 0; /** - * Creates a new UpdateLogMetricRequest instance using the specified properties. + * ListLogsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.pageToken = ""; + + /** + * ListLogsRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.resourceNames = $util.emptyArray; + + /** + * Creates a new ListLogsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest instance + * @param {google.logging.v2.IListLogsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest instance */ - UpdateLogMetricRequest.create = function create(properties) { - return new UpdateLogMetricRequest(properties); + ListLogsRequest.create = function create(properties) { + return new ListLogsRequest(properties); }; /** - * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * Encodes the specified ListLogsRequest message. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateLogMetricRequest.encode = function encode(message, writer) { + ListLogsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceNames[i]); return writer; }; /** - * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * Encodes the specified ListLogsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode + * @param {google.logging.v2.IListLogsRequest} message ListLogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * Decodes a ListLogsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateLogMetricRequest.decode = function decode(reader, length) { + ListLogsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateLogMetricRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.metricName = reader.string(); + message.parent = reader.string(); break; case 2: - message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 8: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -14865,121 +14640,147 @@ }; /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateLogMetricRequest message. + * Verifies a ListLogsRequest message. * @function verify - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateLogMetricRequest.verify = function verify(message) { + ListLogsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - if (message.metric != null && message.hasOwnProperty("metric")) { - var error = $root.google.logging.v2.LogMetric.verify(message.metric); - if (error) - return "metric." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; } return null; }; /** - * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @returns {google.logging.v2.ListLogsRequest} ListLogsRequest */ - UpdateLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateLogMetricRequest) + ListLogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsRequest) return object; - var message = new $root.google.logging.v2.UpdateLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.logging.v2.UpdateLogMetricRequest.metric: object expected"); - message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); + var message = new $root.google.logging.v2.ListLogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.ListLogsRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); } return message; }; /** - * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLogsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @static - * @param {google.logging.v2.UpdateLogMetricRequest} message UpdateLogMetricRequest + * @param {google.logging.v2.ListLogsRequest} message ListLogsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateLogMetricRequest.toObject = function toObject(message, options) { + ListLogsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.resourceNames = []; if (options.defaults) { - object.metricName = ""; - object.metric = null; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; } - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); return object; }; /** - * Converts this UpdateLogMetricRequest to JSON. + * Converts this ListLogsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateLogMetricRequest + * @memberof google.logging.v2.ListLogsRequest * @instance * @returns {Object.} JSON object */ - UpdateLogMetricRequest.prototype.toJSON = function toJSON() { + ListLogsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateLogMetricRequest; + return ListLogsRequest; })(); - v2.DeleteLogMetricRequest = (function() { + v2.ListLogsResponse = (function() { /** - * Properties of a DeleteLogMetricRequest. + * Properties of a ListLogsResponse. * @memberof google.logging.v2 - * @interface IDeleteLogMetricRequest - * @property {string|null} [metricName] DeleteLogMetricRequest metricName + * @interface IListLogsResponse + * @property {Array.|null} [logNames] ListLogsResponse logNames + * @property {string|null} [nextPageToken] ListLogsResponse nextPageToken */ /** - * Constructs a new DeleteLogMetricRequest. + * Constructs a new ListLogsResponse. * @memberof google.logging.v2 - * @classdesc Represents a DeleteLogMetricRequest. - * @implements IDeleteLogMetricRequest + * @classdesc Represents a ListLogsResponse. + * @implements IListLogsResponse * @constructor - * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set */ - function DeleteLogMetricRequest(properties) { + function ListLogsResponse(properties) { + this.logNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14987,75 +14788,91 @@ } /** - * DeleteLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.DeleteLogMetricRequest + * ListLogsResponse logNames. + * @member {Array.} logNames + * @memberof google.logging.v2.ListLogsResponse * @instance */ - DeleteLogMetricRequest.prototype.metricName = ""; + ListLogsResponse.prototype.logNames = $util.emptyArray; /** - * Creates a new DeleteLogMetricRequest instance using the specified properties. + * ListLogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogsResponse + * @instance + */ + ListLogsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLogsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest instance + * @param {google.logging.v2.IListLogsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse instance */ - DeleteLogMetricRequest.create = function create(properties) { - return new DeleteLogMetricRequest(properties); + ListLogsResponse.create = function create(properties) { + return new ListLogsResponse(properties); }; /** - * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * Encodes the specified ListLogsResponse message. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogMetricRequest.encode = function encode(message, writer) { + ListLogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.logNames != null && message.logNames.length) + for (var i = 0; i < message.logNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.logNames[i]); return writer; }; /** - * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * Encodes the specified ListLogsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.ListLogsResponse * @static - * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {google.logging.v2.IListLogsResponse} message ListLogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * Decodes a ListLogsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogMetricRequest.decode = function decode(reader, length) { + ListLogsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogMetricRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metricName = reader.string(); + case 3: + if (!(message.logNames && message.logNames.length)) + message.logNames = []; + message.logNames.push(reader.string()); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -15066,391 +14883,236 @@ }; /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + ListLogsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteLogMetricRequest message. + * Verifies a ListLogsResponse message. * @function verify - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.ListLogsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteLogMetricRequest.verify = function verify(message) { + ListLogsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - return null; - }; - - /** - * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest - */ - DeleteLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteLogMetricRequest) - return object; - var message = new $root.google.logging.v2.DeleteLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); - return message; - }; - - /** - * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.DeleteLogMetricRequest - * @static - * @param {google.logging.v2.DeleteLogMetricRequest} message DeleteLogMetricRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteLogMetricRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - return object; - }; - - /** - * Converts this DeleteLogMetricRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.DeleteLogMetricRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteLogMetricRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteLogMetricRequest; - })(); - - return v2; - })(); - - logging.type = (function() { - - /** - * Namespace type. - * @memberof google.logging - * @namespace - */ - var type = {}; - - type.HttpRequest = (function() { - - /** - * Properties of a HttpRequest. - * @memberof google.logging.type - * @interface IHttpRequest - * @property {string|null} [requestMethod] HttpRequest requestMethod - * @property {string|null} [requestUrl] HttpRequest requestUrl - * @property {number|Long|null} [requestSize] HttpRequest requestSize - * @property {number|null} [status] HttpRequest status - * @property {number|Long|null} [responseSize] HttpRequest responseSize - * @property {string|null} [userAgent] HttpRequest userAgent - * @property {string|null} [remoteIp] HttpRequest remoteIp - * @property {string|null} [serverIp] HttpRequest serverIp - * @property {string|null} [referer] HttpRequest referer - * @property {google.protobuf.IDuration|null} [latency] HttpRequest latency - * @property {boolean|null} [cacheLookup] HttpRequest cacheLookup - * @property {boolean|null} [cacheHit] HttpRequest cacheHit - * @property {boolean|null} [cacheValidatedWithOriginServer] HttpRequest cacheValidatedWithOriginServer - * @property {number|Long|null} [cacheFillBytes] HttpRequest cacheFillBytes - * @property {string|null} [protocol] HttpRequest protocol - */ - - /** - * Constructs a new HttpRequest. - * @memberof google.logging.type - * @classdesc Represents a HttpRequest. - * @implements IHttpRequest - * @constructor - * @param {google.logging.type.IHttpRequest=} [properties] Properties to set - */ - function HttpRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRequest requestMethod. - * @member {string} requestMethod - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.requestMethod = ""; - - /** - * HttpRequest requestUrl. - * @member {string} requestUrl - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.requestUrl = ""; - - /** - * HttpRequest requestSize. - * @member {number|Long} requestSize - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.requestSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * HttpRequest status. - * @member {number} status - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.status = 0; - - /** - * HttpRequest responseSize. - * @member {number|Long} responseSize - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.responseSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + if (message.logNames != null && message.hasOwnProperty("logNames")) { + if (!Array.isArray(message.logNames)) + return "logNames: array expected"; + for (var i = 0; i < message.logNames.length; ++i) + if (!$util.isString(message.logNames[i])) + return "logNames: string[] expected"; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * HttpRequest userAgent. - * @member {string} userAgent - * @memberof google.logging.type.HttpRequest - * @instance + * Creates a ListLogsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogsResponse} ListLogsResponse */ - HttpRequest.prototype.userAgent = ""; + ListLogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogsResponse) + return object; + var message = new $root.google.logging.v2.ListLogsResponse(); + if (object.logNames) { + if (!Array.isArray(object.logNames)) + throw TypeError(".google.logging.v2.ListLogsResponse.logNames: array expected"); + message.logNames = []; + for (var i = 0; i < object.logNames.length; ++i) + message.logNames[i] = String(object.logNames[i]); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * HttpRequest remoteIp. - * @member {string} remoteIp - * @memberof google.logging.type.HttpRequest - * @instance + * Creates a plain object from a ListLogsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {google.logging.v2.ListLogsResponse} message ListLogsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - HttpRequest.prototype.remoteIp = ""; + ListLogsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.logNames = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.logNames && message.logNames.length) { + object.logNames = []; + for (var j = 0; j < message.logNames.length; ++j) + object.logNames[j] = message.logNames[j]; + } + return object; + }; /** - * HttpRequest serverIp. - * @member {string} serverIp - * @memberof google.logging.type.HttpRequest + * Converts this ListLogsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogsResponse * @instance + * @returns {Object.} JSON object */ - HttpRequest.prototype.serverIp = ""; + ListLogsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * HttpRequest referer. - * @member {string} referer - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.referer = ""; + return ListLogsResponse; + })(); - /** - * HttpRequest latency. - * @member {google.protobuf.IDuration|null|undefined} latency - * @memberof google.logging.type.HttpRequest - * @instance - */ - HttpRequest.prototype.latency = null; + v2.TailLogEntriesRequest = (function() { /** - * HttpRequest cacheLookup. - * @member {boolean} cacheLookup - * @memberof google.logging.type.HttpRequest - * @instance + * Properties of a TailLogEntriesRequest. + * @memberof google.logging.v2 + * @interface ITailLogEntriesRequest + * @property {Array.|null} [resourceNames] TailLogEntriesRequest resourceNames + * @property {string|null} [filter] TailLogEntriesRequest filter + * @property {google.protobuf.IDuration|null} [bufferWindow] TailLogEntriesRequest bufferWindow */ - HttpRequest.prototype.cacheLookup = false; /** - * HttpRequest cacheHit. - * @member {boolean} cacheHit - * @memberof google.logging.type.HttpRequest - * @instance + * Constructs a new TailLogEntriesRequest. + * @memberof google.logging.v2 + * @classdesc Represents a TailLogEntriesRequest. + * @implements ITailLogEntriesRequest + * @constructor + * @param {google.logging.v2.ITailLogEntriesRequest=} [properties] Properties to set */ - HttpRequest.prototype.cacheHit = false; + function TailLogEntriesRequest(properties) { + this.resourceNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * HttpRequest cacheValidatedWithOriginServer. - * @member {boolean} cacheValidatedWithOriginServer - * @memberof google.logging.type.HttpRequest + * TailLogEntriesRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.TailLogEntriesRequest * @instance */ - HttpRequest.prototype.cacheValidatedWithOriginServer = false; + TailLogEntriesRequest.prototype.resourceNames = $util.emptyArray; /** - * HttpRequest cacheFillBytes. - * @member {number|Long} cacheFillBytes - * @memberof google.logging.type.HttpRequest + * TailLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.TailLogEntriesRequest * @instance */ - HttpRequest.prototype.cacheFillBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TailLogEntriesRequest.prototype.filter = ""; /** - * HttpRequest protocol. - * @member {string} protocol - * @memberof google.logging.type.HttpRequest + * TailLogEntriesRequest bufferWindow. + * @member {google.protobuf.IDuration|null|undefined} bufferWindow + * @memberof google.logging.v2.TailLogEntriesRequest * @instance */ - HttpRequest.prototype.protocol = ""; + TailLogEntriesRequest.prototype.bufferWindow = null; /** - * Creates a new HttpRequest instance using the specified properties. + * Creates a new TailLogEntriesRequest instance using the specified properties. * @function create - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @static - * @param {google.logging.type.IHttpRequest=} [properties] Properties to set - * @returns {google.logging.type.HttpRequest} HttpRequest instance + * @param {google.logging.v2.ITailLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest instance */ - HttpRequest.create = function create(properties) { - return new HttpRequest(properties); + TailLogEntriesRequest.create = function create(properties) { + return new TailLogEntriesRequest(properties); }; /** - * Encodes the specified HttpRequest message. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * Encodes the specified TailLogEntriesRequest message. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @static - * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode + * @param {google.logging.v2.ITailLogEntriesRequest} message TailLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRequest.encode = function encode(message, writer) { + TailLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestMethod != null && Object.hasOwnProperty.call(message, "requestMethod")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestMethod); - if (message.requestUrl != null && Object.hasOwnProperty.call(message, "requestUrl")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestUrl); - if (message.requestSize != null && Object.hasOwnProperty.call(message, "requestSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestSize); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.responseSize != null && Object.hasOwnProperty.call(message, "responseSize")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.responseSize); - if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.userAgent); - if (message.remoteIp != null && Object.hasOwnProperty.call(message, "remoteIp")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.remoteIp); - if (message.referer != null && Object.hasOwnProperty.call(message, "referer")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.referer); - if (message.cacheHit != null && Object.hasOwnProperty.call(message, "cacheHit")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.cacheHit); - if (message.cacheValidatedWithOriginServer != null && Object.hasOwnProperty.call(message, "cacheValidatedWithOriginServer")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.cacheValidatedWithOriginServer); - if (message.cacheLookup != null && Object.hasOwnProperty.call(message, "cacheLookup")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.cacheLookup); - if (message.cacheFillBytes != null && Object.hasOwnProperty.call(message, "cacheFillBytes")) - writer.uint32(/* id 12, wireType 0 =*/96).int64(message.cacheFillBytes); - if (message.serverIp != null && Object.hasOwnProperty.call(message, "serverIp")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.serverIp); - if (message.latency != null && Object.hasOwnProperty.call(message, "latency")) - $root.google.protobuf.Duration.encode(message.latency, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.protocol); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceNames[i]); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.bufferWindow != null && Object.hasOwnProperty.call(message, "bufferWindow")) + $root.google.protobuf.Duration.encode(message.bufferWindow, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link google.logging.type.HttpRequest.verify|verify} messages. + * Encodes the specified TailLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @static - * @param {google.logging.type.IHttpRequest} message HttpRequest message or plain object to encode + * @param {google.logging.v2.ITailLogEntriesRequest} message TailLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRequest.encodeDelimited = function encodeDelimited(message, writer) { + TailLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRequest message from the specified reader or buffer. + * Decodes a TailLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.type.HttpRequest} HttpRequest + * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRequest.decode = function decode(reader, length) { + TailLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.type.HttpRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.requestMethod = reader.string(); - break; - case 2: - message.requestUrl = reader.string(); - break; - case 3: - message.requestSize = reader.int64(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.responseSize = reader.int64(); - break; - case 6: - message.userAgent = reader.string(); - break; - case 7: - message.remoteIp = reader.string(); - break; - case 13: - message.serverIp = reader.string(); - break; - case 8: - message.referer = reader.string(); - break; - case 14: - message.latency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 11: - message.cacheLookup = reader.bool(); - break; - case 9: - message.cacheHit = reader.bool(); - break; - case 10: - message.cacheValidatedWithOriginServer = reader.bool(); + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); break; - case 12: - message.cacheFillBytes = reader.int64(); + case 2: + message.filter = reader.string(); break; - case 15: - message.protocol = reader.string(); + case 3: + message.bufferWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15461,3422 +15123,3047 @@ }; /** - * Decodes a HttpRequest message from the specified reader or buffer, length delimited. + * Decodes a TailLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.type.HttpRequest} HttpRequest + * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRequest.decodeDelimited = function decodeDelimited(reader) { + TailLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRequest message. + * Verifies a TailLogEntriesRequest message. * @function verify - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRequest.verify = function verify(message) { + TailLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) - if (!$util.isString(message.requestMethod)) - return "requestMethod: string expected"; - if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) - if (!$util.isString(message.requestUrl)) - return "requestUrl: string expected"; - if (message.requestSize != null && message.hasOwnProperty("requestSize")) - if (!$util.isInteger(message.requestSize) && !(message.requestSize && $util.isInteger(message.requestSize.low) && $util.isInteger(message.requestSize.high))) - return "requestSize: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isInteger(message.status)) - return "status: integer expected"; - if (message.responseSize != null && message.hasOwnProperty("responseSize")) - if (!$util.isInteger(message.responseSize) && !(message.responseSize && $util.isInteger(message.responseSize.low) && $util.isInteger(message.responseSize.high))) - return "responseSize: integer|Long expected"; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - if (!$util.isString(message.userAgent)) - return "userAgent: string expected"; - if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) - if (!$util.isString(message.remoteIp)) - return "remoteIp: string expected"; - if (message.serverIp != null && message.hasOwnProperty("serverIp")) - if (!$util.isString(message.serverIp)) - return "serverIp: string expected"; - if (message.referer != null && message.hasOwnProperty("referer")) - if (!$util.isString(message.referer)) - return "referer: string expected"; - if (message.latency != null && message.hasOwnProperty("latency")) { - var error = $root.google.protobuf.Duration.verify(message.latency); + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.bufferWindow != null && message.hasOwnProperty("bufferWindow")) { + var error = $root.google.protobuf.Duration.verify(message.bufferWindow); if (error) - return "latency." + error; + return "bufferWindow." + error; } - if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) - if (typeof message.cacheLookup !== "boolean") - return "cacheLookup: boolean expected"; - if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) - if (typeof message.cacheHit !== "boolean") - return "cacheHit: boolean expected"; - if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) - if (typeof message.cacheValidatedWithOriginServer !== "boolean") - return "cacheValidatedWithOriginServer: boolean expected"; - if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) - if (!$util.isInteger(message.cacheFillBytes) && !(message.cacheFillBytes && $util.isInteger(message.cacheFillBytes.low) && $util.isInteger(message.cacheFillBytes.high))) - return "cacheFillBytes: integer|Long expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; return null; }; /** - * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TailLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.type.HttpRequest} HttpRequest + * @returns {google.logging.v2.TailLogEntriesRequest} TailLogEntriesRequest */ - HttpRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.type.HttpRequest) + TailLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.TailLogEntriesRequest) return object; - var message = new $root.google.logging.type.HttpRequest(); - if (object.requestMethod != null) - message.requestMethod = String(object.requestMethod); - if (object.requestUrl != null) - message.requestUrl = String(object.requestUrl); - if (object.requestSize != null) - if ($util.Long) - (message.requestSize = $util.Long.fromValue(object.requestSize)).unsigned = false; - else if (typeof object.requestSize === "string") - message.requestSize = parseInt(object.requestSize, 10); - else if (typeof object.requestSize === "number") - message.requestSize = object.requestSize; - else if (typeof object.requestSize === "object") - message.requestSize = new $util.LongBits(object.requestSize.low >>> 0, object.requestSize.high >>> 0).toNumber(); - if (object.status != null) - message.status = object.status | 0; - if (object.responseSize != null) - if ($util.Long) - (message.responseSize = $util.Long.fromValue(object.responseSize)).unsigned = false; - else if (typeof object.responseSize === "string") - message.responseSize = parseInt(object.responseSize, 10); - else if (typeof object.responseSize === "number") - message.responseSize = object.responseSize; - else if (typeof object.responseSize === "object") - message.responseSize = new $util.LongBits(object.responseSize.low >>> 0, object.responseSize.high >>> 0).toNumber(); - if (object.userAgent != null) - message.userAgent = String(object.userAgent); - if (object.remoteIp != null) - message.remoteIp = String(object.remoteIp); - if (object.serverIp != null) - message.serverIp = String(object.serverIp); - if (object.referer != null) - message.referer = String(object.referer); - if (object.latency != null) { - if (typeof object.latency !== "object") - throw TypeError(".google.logging.type.HttpRequest.latency: object expected"); - message.latency = $root.google.protobuf.Duration.fromObject(object.latency); + var message = new $root.google.logging.v2.TailLogEntriesRequest(); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.logging.v2.TailLogEntriesRequest.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + if (object.filter != null) + message.filter = String(object.filter); + if (object.bufferWindow != null) { + if (typeof object.bufferWindow !== "object") + throw TypeError(".google.logging.v2.TailLogEntriesRequest.bufferWindow: object expected"); + message.bufferWindow = $root.google.protobuf.Duration.fromObject(object.bufferWindow); } - if (object.cacheLookup != null) - message.cacheLookup = Boolean(object.cacheLookup); - if (object.cacheHit != null) - message.cacheHit = Boolean(object.cacheHit); - if (object.cacheValidatedWithOriginServer != null) - message.cacheValidatedWithOriginServer = Boolean(object.cacheValidatedWithOriginServer); - if (object.cacheFillBytes != null) - if ($util.Long) - (message.cacheFillBytes = $util.Long.fromValue(object.cacheFillBytes)).unsigned = false; - else if (typeof object.cacheFillBytes === "string") - message.cacheFillBytes = parseInt(object.cacheFillBytes, 10); - else if (typeof object.cacheFillBytes === "number") - message.cacheFillBytes = object.cacheFillBytes; - else if (typeof object.cacheFillBytes === "object") - message.cacheFillBytes = new $util.LongBits(object.cacheFillBytes.low >>> 0, object.cacheFillBytes.high >>> 0).toNumber(); - if (object.protocol != null) - message.protocol = String(object.protocol); return message; }; /** - * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. + * Creates a plain object from a TailLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @static - * @param {google.logging.type.HttpRequest} message HttpRequest + * @param {google.logging.v2.TailLogEntriesRequest} message TailLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRequest.toObject = function toObject(message, options) { + TailLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.resourceNames = []; if (options.defaults) { - object.requestMethod = ""; - object.requestUrl = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.requestSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.requestSize = options.longs === String ? "0" : 0; - object.status = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.responseSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.responseSize = options.longs === String ? "0" : 0; - object.userAgent = ""; - object.remoteIp = ""; - object.referer = ""; - object.cacheHit = false; - object.cacheValidatedWithOriginServer = false; - object.cacheLookup = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.cacheFillBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.cacheFillBytes = options.longs === String ? "0" : 0; - object.serverIp = ""; - object.latency = null; - object.protocol = ""; + object.filter = ""; + object.bufferWindow = null; } - if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) - object.requestMethod = message.requestMethod; - if (message.requestUrl != null && message.hasOwnProperty("requestUrl")) - object.requestUrl = message.requestUrl; - if (message.requestSize != null && message.hasOwnProperty("requestSize")) - if (typeof message.requestSize === "number") - object.requestSize = options.longs === String ? String(message.requestSize) : message.requestSize; - else - object.requestSize = options.longs === String ? $util.Long.prototype.toString.call(message.requestSize) : options.longs === Number ? new $util.LongBits(message.requestSize.low >>> 0, message.requestSize.high >>> 0).toNumber() : message.requestSize; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.responseSize != null && message.hasOwnProperty("responseSize")) - if (typeof message.responseSize === "number") - object.responseSize = options.longs === String ? String(message.responseSize) : message.responseSize; - else - object.responseSize = options.longs === String ? $util.Long.prototype.toString.call(message.responseSize) : options.longs === Number ? new $util.LongBits(message.responseSize.low >>> 0, message.responseSize.high >>> 0).toNumber() : message.responseSize; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - object.userAgent = message.userAgent; - if (message.remoteIp != null && message.hasOwnProperty("remoteIp")) - object.remoteIp = message.remoteIp; - if (message.referer != null && message.hasOwnProperty("referer")) - object.referer = message.referer; - if (message.cacheHit != null && message.hasOwnProperty("cacheHit")) - object.cacheHit = message.cacheHit; - if (message.cacheValidatedWithOriginServer != null && message.hasOwnProperty("cacheValidatedWithOriginServer")) - object.cacheValidatedWithOriginServer = message.cacheValidatedWithOriginServer; - if (message.cacheLookup != null && message.hasOwnProperty("cacheLookup")) - object.cacheLookup = message.cacheLookup; - if (message.cacheFillBytes != null && message.hasOwnProperty("cacheFillBytes")) - if (typeof message.cacheFillBytes === "number") - object.cacheFillBytes = options.longs === String ? String(message.cacheFillBytes) : message.cacheFillBytes; - else - object.cacheFillBytes = options.longs === String ? $util.Long.prototype.toString.call(message.cacheFillBytes) : options.longs === Number ? new $util.LongBits(message.cacheFillBytes.low >>> 0, message.cacheFillBytes.high >>> 0).toNumber() : message.cacheFillBytes; - if (message.serverIp != null && message.hasOwnProperty("serverIp")) - object.serverIp = message.serverIp; - if (message.latency != null && message.hasOwnProperty("latency")) - object.latency = $root.google.protobuf.Duration.toObject(message.latency, options); - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.bufferWindow != null && message.hasOwnProperty("bufferWindow")) + object.bufferWindow = $root.google.protobuf.Duration.toObject(message.bufferWindow, options); return object; }; /** - * Converts this HttpRequest to JSON. + * Converts this TailLogEntriesRequest to JSON. * @function toJSON - * @memberof google.logging.type.HttpRequest + * @memberof google.logging.v2.TailLogEntriesRequest * @instance * @returns {Object.} JSON object */ - HttpRequest.prototype.toJSON = function toJSON() { + TailLogEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRequest; - })(); - - /** - * LogSeverity enum. - * @name google.logging.type.LogSeverity - * @enum {number} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} DEBUG=100 DEBUG value - * @property {number} INFO=200 INFO value - * @property {number} NOTICE=300 NOTICE value - * @property {number} WARNING=400 WARNING value - * @property {number} ERROR=500 ERROR value - * @property {number} CRITICAL=600 CRITICAL value - * @property {number} ALERT=700 ALERT value - * @property {number} EMERGENCY=800 EMERGENCY value - */ - type.LogSeverity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[100] = "DEBUG"] = 100; - values[valuesById[200] = "INFO"] = 200; - values[valuesById[300] = "NOTICE"] = 300; - values[valuesById[400] = "WARNING"] = 400; - values[valuesById[500] = "ERROR"] = 500; - values[valuesById[600] = "CRITICAL"] = 600; - values[valuesById[700] = "ALERT"] = 700; - values[valuesById[800] = "EMERGENCY"] = 800; - return values; + return TailLogEntriesRequest; })(); - return type; - })(); + v2.TailLogEntriesResponse = (function() { - return logging; - })(); + /** + * Properties of a TailLogEntriesResponse. + * @memberof google.logging.v2 + * @interface ITailLogEntriesResponse + * @property {Array.|null} [entries] TailLogEntriesResponse entries + * @property {Array.|null} [suppressionInfo] TailLogEntriesResponse suppressionInfo + */ - google.api = (function() { + /** + * Constructs a new TailLogEntriesResponse. + * @memberof google.logging.v2 + * @classdesc Represents a TailLogEntriesResponse. + * @implements ITailLogEntriesResponse + * @constructor + * @param {google.logging.v2.ITailLogEntriesResponse=} [properties] Properties to set + */ + function TailLogEntriesResponse(properties) { + this.entries = []; + this.suppressionInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * TailLogEntriesResponse entries. + * @member {Array.} entries + * @memberof google.logging.v2.TailLogEntriesResponse + * @instance + */ + TailLogEntriesResponse.prototype.entries = $util.emptyArray; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - return values; - })(); + /** + * TailLogEntriesResponse suppressionInfo. + * @member {Array.} suppressionInfo + * @memberof google.logging.v2.TailLogEntriesResponse + * @instance + */ + TailLogEntriesResponse.prototype.suppressionInfo = $util.emptyArray; - api.MonitoredResourceDescriptor = (function() { + /** + * Creates a new TailLogEntriesResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {google.logging.v2.ITailLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse instance + */ + TailLogEntriesResponse.create = function create(properties) { + return new TailLogEntriesResponse(properties); + }; - /** - * Properties of a MonitoredResourceDescriptor. - * @memberof google.api - * @interface IMonitoredResourceDescriptor - * @property {string|null} [name] MonitoredResourceDescriptor name - * @property {string|null} [type] MonitoredResourceDescriptor type - * @property {string|null} [displayName] MonitoredResourceDescriptor displayName - * @property {string|null} [description] MonitoredResourceDescriptor description - * @property {Array.|null} [labels] MonitoredResourceDescriptor labels - * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage - */ + /** + * Encodes the specified TailLogEntriesResponse message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {google.logging.v2.ITailLogEntriesResponse} message TailLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TailLogEntriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.logging.v2.LogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.suppressionInfo != null && message.suppressionInfo.length) + for (var i = 0; i < message.suppressionInfo.length; ++i) + $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.encode(message.suppressionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Constructs a new MonitoredResourceDescriptor. - * @memberof google.api - * @classdesc Represents a MonitoredResourceDescriptor. - * @implements IMonitoredResourceDescriptor - * @constructor - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - */ - function MonitoredResourceDescriptor(properties) { - this.labels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified TailLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {google.logging.v2.ITailLogEntriesResponse} message TailLogEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TailLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MonitoredResourceDescriptor name. - * @member {string} name - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.name = ""; + /** + * Decodes a TailLogEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TailLogEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.suppressionInfo && message.suppressionInfo.length)) + message.suppressionInfo = []; + message.suppressionInfo.push($root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TailLogEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TailLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TailLogEntriesResponse message. + * @function verify + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TailLogEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.logging.v2.LogEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.suppressionInfo != null && message.hasOwnProperty("suppressionInfo")) { + if (!Array.isArray(message.suppressionInfo)) + return "suppressionInfo: array expected"; + for (var i = 0; i < message.suppressionInfo.length; ++i) { + var error = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify(message.suppressionInfo[i]); + if (error) + return "suppressionInfo." + error; + } + } + return null; + }; - /** - * MonitoredResourceDescriptor type. - * @member {string} type - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.type = ""; + /** + * Creates a TailLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.TailLogEntriesResponse} TailLogEntriesResponse + */ + TailLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.TailLogEntriesResponse) + return object; + var message = new $root.google.logging.v2.TailLogEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.logging.v2.TailLogEntriesResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.logging.v2.TailLogEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.logging.v2.LogEntry.fromObject(object.entries[i]); + } + } + if (object.suppressionInfo) { + if (!Array.isArray(object.suppressionInfo)) + throw TypeError(".google.logging.v2.TailLogEntriesResponse.suppressionInfo: array expected"); + message.suppressionInfo = []; + for (var i = 0; i < object.suppressionInfo.length; ++i) { + if (typeof object.suppressionInfo[i] !== "object") + throw TypeError(".google.logging.v2.TailLogEntriesResponse.suppressionInfo: object expected"); + message.suppressionInfo[i] = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.fromObject(object.suppressionInfo[i]); + } + } + return message; + }; - /** - * MonitoredResourceDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.displayName = ""; + /** + * Creates a plain object from a TailLogEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {google.logging.v2.TailLogEntriesResponse} message TailLogEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TailLogEntriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.entries = []; + object.suppressionInfo = []; + } + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.logging.v2.LogEntry.toObject(message.entries[j], options); + } + if (message.suppressionInfo && message.suppressionInfo.length) { + object.suppressionInfo = []; + for (var j = 0; j < message.suppressionInfo.length; ++j) + object.suppressionInfo[j] = $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.toObject(message.suppressionInfo[j], options); + } + return object; + }; - /** - * MonitoredResourceDescriptor description. - * @member {string} description - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.description = ""; + /** + * Converts this TailLogEntriesResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.TailLogEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + TailLogEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MonitoredResourceDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + TailLogEntriesResponse.SuppressionInfo = (function() { - /** - * MonitoredResourceDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.launchStage = 0; + /** + * Properties of a SuppressionInfo. + * @memberof google.logging.v2.TailLogEntriesResponse + * @interface ISuppressionInfo + * @property {google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason|null} [reason] SuppressionInfo reason + * @property {number|null} [suppressedCount] SuppressionInfo suppressedCount + */ - /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance - */ - MonitoredResourceDescriptor.create = function create(properties) { - return new MonitoredResourceDescriptor(properties); - }; + /** + * Constructs a new SuppressionInfo. + * @memberof google.logging.v2.TailLogEntriesResponse + * @classdesc Represents a SuppressionInfo. + * @implements ISuppressionInfo + * @constructor + * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo=} [properties] Properties to set + */ + function SuppressionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); - return writer; - }; + /** + * SuppressionInfo reason. + * @member {google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason} reason + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @instance + */ + SuppressionInfo.prototype.reason = 0; - /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * SuppressionInfo suppressedCount. + * @member {number} suppressedCount + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @instance + */ + SuppressionInfo.prototype.suppressedCount = 0; - /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 1: - message.type = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 7: - message.launchStage = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new SuppressionInfo instance using the specified properties. + * @function create + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo=} [properties] Properties to set + * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo instance + */ + SuppressionInfo.create = function create(properties) { + return new SuppressionInfo(properties); + }; + + /** + * Encodes the specified SuppressionInfo message. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo} message SuppressionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuppressionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); + if (message.suppressedCount != null && Object.hasOwnProperty.call(message, "suppressedCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.suppressedCount); + return writer; + }; - /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified SuppressionInfo message, length delimited. Does not implicitly {@link google.logging.v2.TailLogEntriesResponse.SuppressionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {google.logging.v2.TailLogEntriesResponse.ISuppressionInfo} message SuppressionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuppressionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a MonitoredResourceDescriptor message. - * @function verify - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoredResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - return null; - }; + /** + * Decodes a SuppressionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuppressionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.reason = reader.int32(); + break; + case 2: + message.suppressedCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor - */ - MonitoredResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceDescriptor) - return object; - var message = new $root.google.api.MonitoredResourceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } - } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - return message; - }; + /** + * Decodes a SuppressionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuppressionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SuppressionInfo message. + * @function verify + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuppressionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + switch (message.reason) { + default: + return "reason: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.suppressedCount != null && message.hasOwnProperty("suppressedCount")) + if (!$util.isInteger(message.suppressedCount)) + return "suppressedCount: integer expected"; + return null; + }; + + /** + * Creates a SuppressionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} SuppressionInfo + */ + SuppressionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo) + return object; + var message = new $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo(); + switch (object.reason) { + case "REASON_UNSPECIFIED": + case 0: + message.reason = 0; + break; + case "RATE_LIMIT": + case 1: + message.reason = 1; + break; + case "NOT_CONSUMED": + case 2: + message.reason = 2; + break; + } + if (object.suppressedCount != null) + message.suppressedCount = object.suppressedCount | 0; + return message; + }; - /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoredResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.labels = []; - if (options.defaults) { - object.type = ""; - object.displayName = ""; - object.description = ""; - object.name = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + /** + * Creates a plain object from a SuppressionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {google.logging.v2.TailLogEntriesResponse.SuppressionInfo} message SuppressionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuppressionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.reason = options.enums === String ? "REASON_UNSPECIFIED" : 0; + object.suppressedCount = 0; + } + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = options.enums === String ? $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason[message.reason] : message.reason; + if (message.suppressedCount != null && message.hasOwnProperty("suppressedCount")) + object.suppressedCount = message.suppressedCount; + return object; + }; + + /** + * Converts this SuppressionInfo to JSON. + * @function toJSON + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @instance + * @returns {Object.} JSON object + */ + SuppressionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Reason enum. + * @name google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason + * @enum {number} + * @property {number} REASON_UNSPECIFIED=0 REASON_UNSPECIFIED value + * @property {number} RATE_LIMIT=1 RATE_LIMIT value + * @property {number} NOT_CONSUMED=2 NOT_CONSUMED value + */ + SuppressionInfo.Reason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "RATE_LIMIT"] = 1; + values[valuesById[2] = "NOT_CONSUMED"] = 2; + return values; + })(); + + return SuppressionInfo; + })(); + + return TailLogEntriesResponse; + })(); + + v2.ConfigServiceV2 = (function() { + + /** + * Constructs a new ConfigServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a ConfigServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ConfigServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - return object; - }; - /** - * Converts this MonitoredResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.MonitoredResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + (ConfigServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfigServiceV2; - return MonitoredResourceDescriptor; - })(); + /** + * Creates new ConfigServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.ConfigServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ConfigServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + ConfigServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - api.MonitoredResource = (function() { + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListBucketsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListBucketsResponse} [response] ListBucketsResponse + */ - /** - * Properties of a MonitoredResource. - * @memberof google.api - * @interface IMonitoredResource - * @property {string|null} [type] MonitoredResource type - * @property {Object.|null} [labels] MonitoredResource labels - */ + /** + * Calls ListBuckets. + * @function listBuckets + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListBucketsCallback} callback Node-style callback called with the error, if any, and ListBucketsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listBuckets = function listBuckets(request, callback) { + return this.rpcCall(listBuckets, $root.google.logging.v2.ListBucketsRequest, $root.google.logging.v2.ListBucketsResponse, request, callback); + }, "name", { value: "ListBuckets" }); - /** - * Constructs a new MonitoredResource. - * @memberof google.api - * @classdesc Represents a MonitoredResource. - * @implements IMonitoredResource - * @constructor - * @param {google.api.IMonitoredResource=} [properties] Properties to set - */ - function MonitoredResource(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls ListBuckets. + * @function listBuckets + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListBucketsRequest} request ListBucketsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * MonitoredResource type. - * @member {string} type - * @memberof google.api.MonitoredResource - * @instance - */ - MonitoredResource.prototype.type = ""; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogBucket} [response] LogBucket + */ - /** - * MonitoredResource labels. - * @member {Object.} labels - * @memberof google.api.MonitoredResource - * @instance - */ - MonitoredResource.prototype.labels = $util.emptyObject; + /** + * Calls GetBucket. + * @function getBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetBucketCallback} callback Node-style callback called with the error, if any, and LogBucket + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getBucket = function getBucket(request, callback) { + return this.rpcCall(getBucket, $root.google.logging.v2.GetBucketRequest, $root.google.logging.v2.LogBucket, request, callback); + }, "name", { value: "GetBucket" }); - /** - * Creates a new MonitoredResource instance using the specified properties. - * @function create - * @memberof google.api.MonitoredResource - * @static - * @param {google.api.IMonitoredResource=} [properties] Properties to set - * @returns {google.api.MonitoredResource} MonitoredResource instance - */ - MonitoredResource.create = function create(properties) { - return new MonitoredResource(properties); - }; + /** + * Calls GetBucket. + * @function getBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetBucketRequest} request GetBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogBucket} [response] LogBucket + */ - /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @function encode - * @memberof google.api.MonitoredResource - * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; + /** + * Calls CreateBucket. + * @function createBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateBucketRequest} request CreateBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateBucketCallback} callback Node-style callback called with the error, if any, and LogBucket + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createBucket = function createBucket(request, callback) { + return this.rpcCall(createBucket, $root.google.logging.v2.CreateBucketRequest, $root.google.logging.v2.LogBucket, request, callback); + }, "name", { value: "CreateBucket" }); - /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MonitoredResource - * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls CreateBucket. + * @function createBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateBucketRequest} request CreateBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a MonitoredResource message from the specified reader or buffer. - * @function decode - * @memberof google.api.MonitoredResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResource} MonitoredResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoredResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogBucket} [response] LogBucket + */ - /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MonitoredResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResource} MonitoredResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoredResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls UpdateBucket. + * @function updateBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateBucketCallback} callback Node-style callback called with the error, if any, and LogBucket + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateBucket = function updateBucket(request, callback) { + return this.rpcCall(updateBucket, $root.google.logging.v2.UpdateBucketRequest, $root.google.logging.v2.LogBucket, request, callback); + }, "name", { value: "UpdateBucket" }); - /** - * Verifies a MonitoredResource message. - * @function verify - * @memberof google.api.MonitoredResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoredResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; + /** + * Calls UpdateBucket. + * @function updateBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MonitoredResource - * @static - * @param {Object.} object Plain object - * @returns {google.api.MonitoredResource} MonitoredResource - */ - MonitoredResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResource) - return object; - var message = new $root.google.api.MonitoredResource(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.MonitoredResource.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MonitoredResource - * @static - * @param {google.api.MonitoredResource} message MonitoredResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoredResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - return object; - }; + /** + * Calls DeleteBucket. + * @function deleteBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteBucketRequest} request DeleteBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteBucketCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteBucket = function deleteBucket(request, callback) { + return this.rpcCall(deleteBucket, $root.google.logging.v2.DeleteBucketRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteBucket" }); - /** - * Converts this MonitoredResource to JSON. - * @function toJSON - * @memberof google.api.MonitoredResource - * @instance - * @returns {Object.} JSON object - */ - MonitoredResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls DeleteBucket. + * @function deleteBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteBucketRequest} request DeleteBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return MonitoredResource; - })(); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#undeleteBucket}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UndeleteBucketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - api.MonitoredResourceMetadata = (function() { + /** + * Calls UndeleteBucket. + * @function undeleteBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUndeleteBucketRequest} request UndeleteBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UndeleteBucketCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.undeleteBucket = function undeleteBucket(request, callback) { + return this.rpcCall(undeleteBucket, $root.google.logging.v2.UndeleteBucketRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "UndeleteBucket" }); - /** - * Properties of a MonitoredResourceMetadata. - * @memberof google.api - * @interface IMonitoredResourceMetadata - * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels - * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels - */ + /** + * Calls UndeleteBucket. + * @function undeleteBucket + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUndeleteBucketRequest} request UndeleteBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new MonitoredResourceMetadata. - * @memberof google.api - * @classdesc Represents a MonitoredResourceMetadata. - * @implements IMonitoredResourceMetadata - * @constructor - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - */ - function MonitoredResourceMetadata(properties) { - this.userLabels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listViews}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListViewsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListViewsResponse} [response] ListViewsResponse + */ - /** - * MonitoredResourceMetadata systemLabels. - * @member {google.protobuf.IStruct|null|undefined} systemLabels - * @memberof google.api.MonitoredResourceMetadata - * @instance - */ - MonitoredResourceMetadata.prototype.systemLabels = null; + /** + * Calls ListViews. + * @function listViews + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListViewsRequest} request ListViewsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListViewsCallback} callback Node-style callback called with the error, if any, and ListViewsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listViews = function listViews(request, callback) { + return this.rpcCall(listViews, $root.google.logging.v2.ListViewsRequest, $root.google.logging.v2.ListViewsResponse, request, callback); + }, "name", { value: "ListViews" }); - /** - * MonitoredResourceMetadata userLabels. - * @member {Object.} userLabels - * @memberof google.api.MonitoredResourceMetadata - * @instance - */ - MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + /** + * Calls ListViews. + * @function listViews + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListViewsRequest} request ListViewsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. - * @function create - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance - */ - MonitoredResourceMetadata.create = function create(properties) { - return new MonitoredResourceMetadata(properties); - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getView}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogView} [response] LogView + */ - /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @function encode - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResourceMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) - $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - return writer; - }; + /** + * Calls GetView. + * @function getView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetViewRequest} request GetViewRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetViewCallback} callback Node-style callback called with the error, if any, and LogView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getView = function getView(request, callback) { + return this.rpcCall(getView, $root.google.logging.v2.GetViewRequest, $root.google.logging.v2.LogView, request, callback); + }, "name", { value: "GetView" }); - /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls GetView. + * @function getView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetViewRequest} request GetViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoredResourceMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 2: - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.userLabels[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createView}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogView} [response] LogView + */ - /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls CreateView. + * @function createView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateViewRequest} request CreateViewRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateViewCallback} callback Node-style callback called with the error, if any, and LogView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createView = function createView(request, callback) { + return this.rpcCall(createView, $root.google.logging.v2.CreateViewRequest, $root.google.logging.v2.LogView, request, callback); + }, "name", { value: "CreateView" }); - /** - * Verifies a MonitoredResourceMetadata message. - * @function verify - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoredResourceMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { - var error = $root.google.protobuf.Struct.verify(message.systemLabels); - if (error) - return "systemLabels." + error; - } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; - } - return null; - }; + /** + * Calls CreateView. + * @function createView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateViewRequest} request CreateViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata - */ - MonitoredResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceMetadata) - return object; - var message = new $root.google.api.MonitoredResourceMetadata(); - if (object.systemLabels != null) { - if (typeof object.systemLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); - message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); - } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); - } - return message; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateView}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogView} [response] LogView + */ - /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoredResourceMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) - object.systemLabels = null; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; - } - return object; - }; + /** + * Calls UpdateView. + * @function updateView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateViewRequest} request UpdateViewRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateViewCallback} callback Node-style callback called with the error, if any, and LogView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateView = function updateView(request, callback) { + return this.rpcCall(updateView, $root.google.logging.v2.UpdateViewRequest, $root.google.logging.v2.LogView, request, callback); + }, "name", { value: "UpdateView" }); - /** - * Converts this MonitoredResourceMetadata to JSON. - * @function toJSON - * @memberof google.api.MonitoredResourceMetadata - * @instance - * @returns {Object.} JSON object - */ - MonitoredResourceMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls UpdateView. + * @function updateView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateViewRequest} request UpdateViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return MonitoredResourceMetadata; - })(); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteView}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - api.LabelDescriptor = (function() { + /** + * Calls DeleteView. + * @function deleteView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteViewRequest} request DeleteViewRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteViewCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteView = function deleteView(request, callback) { + return this.rpcCall(deleteView, $root.google.logging.v2.DeleteViewRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteView" }); - /** - * Properties of a LabelDescriptor. - * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description - */ + /** + * Calls DeleteView. + * @function deleteView + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteViewRequest} request DeleteViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new LabelDescriptor. - * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor - * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - */ - function LabelDescriptor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListSinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListSinksResponse} [response] ListSinksResponse + */ - /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.key = ""; + /** + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListSinksCallback} callback Node-style callback called with the error, if any, and ListSinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listSinks = function listSinks(request, callback) { + return this.rpcCall(listSinks, $root.google.logging.v2.ListSinksRequest, $root.google.logging.v2.ListSinksResponse, request, callback); + }, "name", { value: "ListSinks" }); - /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.valueType = 0; + /** + * Calls ListSinks. + * @function listSinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListSinksRequest} request ListSinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.description = ""; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ + + /** + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getSink = function getSink(request, callback) { + return this.rpcCall(getSink, $root.google.logging.v2.GetSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "GetSink" }); - /** - * Creates a new LabelDescriptor instance using the specified properties. - * @function create - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance - */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); - }; + /** + * Calls GetSink. + * @function getSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSinkRequest} request GetSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - return writer; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ - /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createSink = function createSink(request, callback) { + return this.rpcCall(createSink, $root.google.logging.v2.CreateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "CreateSink" }); - /** - * Decodes a LabelDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.LabelDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.valueType = reader.int32(); - break; - case 3: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls CreateSink. + * @function createSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateSinkRequest} request CreateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.LabelDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogSink} [response] LogSink + */ - /** - * Verifies a LabelDescriptor message. - * @function verify - * @memberof google.api.LabelDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LabelDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; + /** + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateSinkCallback} callback Node-style callback called with the error, if any, and LogSink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateSink = function updateSink(request, callback) { + return this.rpcCall(updateSink, $root.google.logging.v2.UpdateSinkRequest, $root.google.logging.v2.LogSink, request, callback); + }, "name", { value: "UpdateSink" }); - /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.LabelDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor - */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) - return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - } - if (object.description != null) - message.description = String(object.description); - return message; - }; + /** + * Calls UpdateSink. + * @function updateSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSinkRequest} request UpdateSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LabelDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; - object.description = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteSinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Converts this LabelDescriptor to JSON. - * @function toJSON - * @memberof google.api.LabelDescriptor - * @instance - * @returns {Object.} JSON object - */ - LabelDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteSinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteSink = function deleteSink(request, callback) { + return this.rpcCall(deleteSink, $root.google.logging.v2.DeleteSinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSink" }); - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); + /** + * Calls DeleteSink. + * @function deleteSink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteSinkRequest} request DeleteSinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return LabelDescriptor; - })(); + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListExclusionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListExclusionsResponse} [response] ListExclusionsResponse + */ - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); + /** + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListExclusionsCallback} callback Node-style callback called with the error, if any, and ListExclusionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listExclusions = function listExclusions(request, callback) { + return this.rpcCall(listExclusions, $root.google.logging.v2.ListExclusionsRequest, $root.google.logging.v2.ListExclusionsResponse, request, callback); + }, "name", { value: "ListExclusions" }); - api.ResourceDescriptor = (function() { + /** + * Calls ListExclusions. + * @function listExclusions + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListExclusionsRequest} request ListExclusionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getExclusion = function getExclusion(request, callback) { + return this.rpcCall(getExclusion, $root.google.logging.v2.GetExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "GetExclusion" }); - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; + /** + * Calls GetExclusion. + * @function getExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetExclusionRequest} request GetExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; + /** + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createExclusion = function createExclusion(request, callback) { + return this.rpcCall(createExclusion, $root.google.logging.v2.CreateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "CreateExclusion" }); - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; + /** + * Calls CreateExclusion. + * @function createExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateExclusionRequest} request CreateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogExclusion} [response] LogExclusion + */ - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; + /** + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateExclusionCallback} callback Node-style callback called with the error, if any, and LogExclusion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateExclusion = function updateExclusion(request, callback) { + return this.rpcCall(updateExclusion, $root.google.logging.v2.UpdateExclusionRequest, $root.google.logging.v2.LogExclusion, request, callback); + }, "name", { value: "UpdateExclusion" }); - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; + /** + * Calls UpdateExclusion. + * @function updateExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateExclusionRequest} request UpdateExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteExclusionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; + /** + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteExclusionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteExclusion = function deleteExclusion(request, callback) { + return this.rpcCall(deleteExclusion, $root.google.logging.v2.DeleteExclusionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExclusion" }); - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls DeleteExclusion. + * @function deleteExclusion + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteExclusionRequest} request DeleteExclusionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetCmekSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.CmekSettings} [response] CmekSettings + */ - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls GetCmekSettings. + * @function getCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getCmekSettings = function getCmekSettings(request, callback) { + return this.rpcCall(getCmekSettings, $root.google.logging.v2.GetCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); + }, "name", { value: "GetCmekSettings" }); - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; + /** + * Calls GetCmekSettings. + * @function getCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetCmekSettingsRequest} request GetCmekSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateCmekSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.CmekSettings} [response] CmekSettings + */ - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; + /** + * Calls UpdateCmekSettings. + * @function updateCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateCmekSettingsCallback} callback Node-style callback called with the error, if any, and CmekSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateCmekSettings = function updateCmekSettings(request, callback) { + return this.rpcCall(updateCmekSettings, $root.google.logging.v2.UpdateCmekSettingsRequest, $root.google.logging.v2.CmekSettings, request, callback); + }, "name", { value: "UpdateCmekSettings" }); - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls UpdateCmekSettings. + * @function updateCmekSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateCmekSettingsRequest} request UpdateCmekSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; + return ConfigServiceV2; })(); - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); + v2.LogBucket = (function() { - return ResourceDescriptor; - })(); + /** + * Properties of a LogBucket. + * @memberof google.logging.v2 + * @interface ILogBucket + * @property {string|null} [name] LogBucket name + * @property {string|null} [description] LogBucket description + * @property {google.protobuf.ITimestamp|null} [createTime] LogBucket createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogBucket updateTime + * @property {number|null} [retentionDays] LogBucket retentionDays + * @property {boolean|null} [locked] LogBucket locked + * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState + */ - api.ResourceReference = (function() { + /** + * Constructs a new LogBucket. + * @memberof google.logging.v2 + * @classdesc Represents a LogBucket. + * @implements ILogBucket + * @constructor + * @param {google.logging.v2.ILogBucket=} [properties] Properties to set + */ + function LogBucket(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ + /** + * LogBucket name. + * @member {string} name + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.name = ""; + + /** + * LogBucket description. + * @member {string} description + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.description = ""; + + /** + * LogBucket createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.createTime = null; + + /** + * LogBucket updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.updateTime = null; + + /** + * LogBucket retentionDays. + * @member {number} retentionDays + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.retentionDays = 0; + + /** + * LogBucket locked. + * @member {boolean} locked + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.locked = false; - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * LogBucket lifecycleState. + * @member {google.logging.v2.LifecycleState} lifecycleState + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.lifecycleState = 0; - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; + /** + * Creates a new LogBucket instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogBucket + * @static + * @param {google.logging.v2.ILogBucket=} [properties] Properties to set + * @returns {google.logging.v2.LogBucket} LogBucket instance + */ + LogBucket.create = function create(properties) { + return new LogBucket(properties); + }; - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; + /** + * Encodes the specified LogBucket message. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogBucket + * @static + * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogBucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.locked); + if (message.retentionDays != null && Object.hasOwnProperty.call(message, "retentionDays")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); + if (message.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.lifecycleState); + return writer; + }; - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; + /** + * Encodes the specified LogBucket message, length delimited. Does not implicitly {@link google.logging.v2.LogBucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogBucket + * @static + * @param {google.logging.v2.ILogBucket} message LogBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogBucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; + /** + * Decodes a LogBucket message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogBucket} LogBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogBucket.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogBucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.retentionDays = reader.int32(); + break; + case 9: + message.locked = reader.bool(); + break; + case 12: + message.lifecycleState = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a LogBucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogBucket} LogBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogBucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Verifies a LogBucket message. + * @function verify + * @memberof google.logging.v2.LogBucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogBucket.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + if (!$util.isInteger(message.retentionDays)) + return "retentionDays: integer expected"; + if (message.locked != null && message.hasOwnProperty("locked")) + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + switch (message.lifecycleState) { + default: + return "lifecycleState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a LogBucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogBucket + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogBucket} LogBucket + */ + LogBucket.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogBucket) + return object; + var message = new $root.google.logging.v2.LogBucket(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogBucket.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogBucket.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.retentionDays != null) + message.retentionDays = object.retentionDays | 0; + if (object.locked != null) + message.locked = Boolean(object.locked); + switch (object.lifecycleState) { + case "LIFECYCLE_STATE_UNSPECIFIED": + case 0: + message.lifecycleState = 0; + break; + case "ACTIVE": case 1: - message.type = reader.string(); + message.lifecycleState = 1; break; + case "DELETE_REQUESTED": case 2: - message.childType = reader.string(); - break; - default: - reader.skipType(tag & 7); + message.lifecycleState = 2; break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a LogBucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogBucket + * @static + * @param {google.logging.v2.LogBucket} message LogBucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogBucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.locked = false; + object.retentionDays = 0; + object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + object.retentionDays = message.retentionDays; + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; + return object; + }; - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; + /** + * Converts this LogBucket to JSON. + * @function toJSON + * @memberof google.logging.v2.LogBucket + * @instance + * @returns {Object.} JSON object + */ + LogBucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; + return LogBucket; + })(); /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * LifecycleState enum. + * @name google.logging.v2.LifecycleState + * @enum {number} + * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; + v2.LifecycleState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "DELETE_REQUESTED"] = 2; + return values; + })(); - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + v2.LogView = (function() { - return ResourceReference; - })(); + /** + * Properties of a LogView. + * @memberof google.logging.v2 + * @interface ILogView + * @property {string|null} [name] LogView name + * @property {string|null} [description] LogView description + * @property {google.protobuf.ITimestamp|null} [createTime] LogView createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogView updateTime + * @property {string|null} [filter] LogView filter + */ - api.Http = (function() { + /** + * Constructs a new LogView. + * @memberof google.logging.v2 + * @classdesc Represents a LogView. + * @implements ILogView + * @constructor + * @param {google.logging.v2.ILogView=} [properties] Properties to set + */ + function LogView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ + /** + * LogView name. + * @member {string} name + * @memberof google.logging.v2.LogView + * @instance + */ + LogView.prototype.name = ""; - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * LogView description. + * @member {string} description + * @memberof google.logging.v2.LogView + * @instance + */ + LogView.prototype.description = ""; - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; + /** + * LogView createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogView + * @instance + */ + LogView.prototype.createTime = null; - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; + /** + * LogView updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogView + * @instance + */ + LogView.prototype.updateTime = null; - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; + /** + * LogView filter. + * @member {string} filter + * @memberof google.logging.v2.LogView + * @instance + */ + LogView.prototype.filter = ""; - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; + /** + * Creates a new LogView instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogView + * @static + * @param {google.logging.v2.ILogView=} [properties] Properties to set + * @returns {google.logging.v2.LogView} LogView instance + */ + LogView.create = function create(properties) { + return new LogView(properties); + }; - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified LogView message. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogView + * @static + * @param {google.logging.v2.ILogView} message LogView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.filter); + return writer; + }; - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified LogView message, length delimited. Does not implicitly {@link google.logging.v2.LogView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogView + * @static + * @param {google.logging.v2.ILogView} message LogView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogView message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogView} LogView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LogView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogView} LogView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); + /** + * Verifies a LogView message. + * @function verify + * @memberof google.logging.v2.LogView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "rules." + error; + return "createTime." + error; } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + /** + * Creates a LogView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogView + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogView} LogView + */ + LogView.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogView) + return object; + var message = new $root.google.logging.v2.LogView(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogView.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogView.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; + /** + * Creates a plain object from a LogView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogView + * @static + * @param {google.logging.v2.LogView} message LogView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this LogView to JSON. + * @function toJSON + * @memberof google.logging.v2.LogView + * @instance + * @returns {Object.} JSON object + */ + LogView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Http; - })(); + return LogView; + })(); - api.HttpRule = (function() { + v2.LogSink = (function() { - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ + /** + * Properties of a LogSink. + * @memberof google.logging.v2 + * @interface ILogSink + * @property {string|null} [name] LogSink name + * @property {string|null} [destination] LogSink destination + * @property {string|null} [filter] LogSink filter + * @property {string|null} [description] LogSink description + * @property {boolean|null} [disabled] LogSink disabled + * @property {Array.|null} [exclusions] LogSink exclusions + * @property {google.logging.v2.LogSink.VersionFormat|null} [outputVersionFormat] LogSink outputVersionFormat + * @property {string|null} [writerIdentity] LogSink writerIdentity + * @property {boolean|null} [includeChildren] LogSink includeChildren + * @property {google.logging.v2.IBigQueryOptions|null} [bigqueryOptions] LogSink bigqueryOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogSink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogSink updateTime + */ - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new LogSink. + * @memberof google.logging.v2 + * @classdesc Represents a LogSink. + * @implements ILogSink + * @constructor + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + */ + function LogSink(properties) { + this.exclusions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + /** + * LogSink name. + * @member {string} name + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.name = ""; - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; + /** + * LogSink destination. + * @member {string} destination + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.destination = ""; - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; + /** + * LogSink filter. + * @member {string} filter + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.filter = ""; - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; + /** + * LogSink description. + * @member {string} description + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.description = ""; - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; + /** + * LogSink disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.disabled = false; - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; + /** + * LogSink exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.exclusions = $util.emptyArray; - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + /** + * LogSink outputVersionFormat. + * @member {google.logging.v2.LogSink.VersionFormat} outputVersionFormat + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.outputVersionFormat = 0; - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + /** + * LogSink writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.writerIdentity = ""; - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; + /** + * LogSink includeChildren. + * @member {boolean} includeChildren + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.includeChildren = false; - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + /** + * LogSink bigqueryOptions. + * @member {google.logging.v2.IBigQueryOptions|null|undefined} bigqueryOptions + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.bigqueryOptions = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * LogSink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.createTime = null; - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * LogSink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogSink + * @instance + */ + LogSink.prototype.updateTime = null; - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; + /** + * LogSink options. + * @member {"bigqueryOptions"|undefined} options + * @memberof google.logging.v2.LogSink + * @instance + */ + Object.defineProperty(LogSink.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new LogSink instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink=} [properties] Properties to set + * @returns {google.logging.v2.LogSink} LogSink instance + */ + LogSink.create = function create(properties) { + return new LogSink(properties); + }; + + /** + * Encodes the specified LogSink message. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.outputVersionFormat != null && Object.hasOwnProperty.call(message, "outputVersionFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputVersionFormat); + if (message.writerIdentity != null && Object.hasOwnProperty.call(message, "writerIdentity")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.writerIdentity); + if (message.includeChildren != null && Object.hasOwnProperty.call(message, "includeChildren")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.includeChildren); + if (message.bigqueryOptions != null && Object.hasOwnProperty.call(message, "bigqueryOptions")) + $root.google.logging.v2.BigQueryOptions.encode(message.bigqueryOptions, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.description); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.disabled); + return writer; + }; - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified LogSink message, length delimited. Does not implicitly {@link google.logging.v2.LogSink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.ILogSink} message LogSink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogSink message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogSink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogSink} LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.destination = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 18: + message.description = reader.string(); + break; + case 19: + message.disabled = reader.bool(); + break; + case 16: + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + break; + case 6: + message.outputVersionFormat = reader.int32(); + break; + case 8: + message.writerIdentity = reader.string(); + break; + case 9: + message.includeChildren = reader.bool(); + break; + case 12: + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); + break; + case 13: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LogSink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogSink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogSink} LogSink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); + /** + * Verifies a LogSink message. + * @function verify + * @memberof google.logging.v2.LogSink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogSink.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + if (error) + return "exclusions." + error; + } + } + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + switch (message.outputVersionFormat) { + default: + return "outputVersionFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + if (typeof message.includeChildren !== "boolean") + return "includeChildren: boolean expected"; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + properties.options = 1; + { + var error = $root.google.logging.v2.BigQueryOptions.verify(message.bigqueryOptions); + if (error) + return "bigqueryOptions." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "custom." + error; + return "createTime." + error; } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "additionalBindings." + error; + return "updateTime." + error; } - } - return null; - }; + return null; + }; - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + /** + * Creates a LogSink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogSink + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogSink} LogSink + */ + LogSink.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogSink) + return object; + var message = new $root.google.logging.v2.LogSink(); + if (object.name != null) + message.name = String(object.name); + if (object.destination != null) + message.destination = String(object.destination); + if (object.filter != null) + message.filter = String(object.filter); + if (object.description != null) + message.description = String(object.description); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.LogSink.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.LogSink.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); + } } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRule; - })(); + switch (object.outputVersionFormat) { + case "VERSION_FORMAT_UNSPECIFIED": + case 0: + message.outputVersionFormat = 0; + break; + case "V2": + case 1: + message.outputVersionFormat = 1; + break; + case "V1": + case 2: + message.outputVersionFormat = 2; + break; + } + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); + if (object.includeChildren != null) + message.includeChildren = Boolean(object.includeChildren); + if (object.bigqueryOptions != null) { + if (typeof object.bigqueryOptions !== "object") + throw TypeError(".google.logging.v2.LogSink.bigqueryOptions: object expected"); + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.fromObject(object.bigqueryOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogSink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogSink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; - api.CustomHttpPattern = (function() { + /** + * Creates a plain object from a LogSink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogSink + * @static + * @param {google.logging.v2.LogSink} message LogSink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogSink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exclusions = []; + if (options.defaults) { + object.name = ""; + object.destination = ""; + object.filter = ""; + object.outputVersionFormat = options.enums === String ? "VERSION_FORMAT_UNSPECIFIED" : 0; + object.writerIdentity = ""; + object.includeChildren = false; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.disabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) + object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; + if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) + object.includeChildren = message.includeChildren; + if (message.bigqueryOptions != null && message.hasOwnProperty("bigqueryOptions")) { + object.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.toObject(message.bigqueryOptions, options); + if (options.oneofs) + object.options = "bigqueryOptions"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ + /** + * Converts this LogSink to JSON. + * @function toJSON + * @memberof google.logging.v2.LogSink + * @instance + * @returns {Object.} JSON object + */ + LogSink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * VersionFormat enum. + * @name google.logging.v2.LogSink.VersionFormat + * @enum {number} + * @property {number} VERSION_FORMAT_UNSPECIFIED=0 VERSION_FORMAT_UNSPECIFIED value + * @property {number} V2=1 V2 value + * @property {number} V1=2 V1 value + */ + LogSink.VersionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "V2"] = 1; + values[valuesById[2] = "V1"] = 2; + return values; + })(); - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; + return LogSink; + })(); - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; + v2.BigQueryOptions = (function() { - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; + /** + * Properties of a BigQueryOptions. + * @memberof google.logging.v2 + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning + */ - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; + /** + * Constructs a new BigQueryOptions. + * @memberof google.logging.v2 + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions + * @constructor + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + */ + function BigQueryOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usePartitionedTables = false; - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * BigQueryOptions usesTimestampColumnPartitioning. + * @member {boolean} usesTimestampColumnPartitioning + * @memberof google.logging.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @function create + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + */ + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); + }; - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usePartitionedTables != null && Object.hasOwnProperty.call(message, "usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + if (message.usesTimestampColumnPartitioning != null && Object.hasOwnProperty.call(message, "usesTimestampColumnPartitioning")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); + return writer; + }; - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.usePartitionedTables = reader.bool(); + break; + case 3: + message.usesTimestampColumnPartitioning = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return CustomHttpPattern; - })(); + /** + * Verifies a BigQueryOptions message. + * @function verify + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + if (typeof message.usesTimestampColumnPartitioning !== "boolean") + return "usesTimestampColumnPartitioning: boolean expected"; + return null; + }; - api.Distribution = (function() { + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + */ + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) + return object; + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + if (object.usesTimestampColumnPartitioning != null) + message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); + return message; + }; - /** - * Properties of a Distribution. - * @memberof google.api - * @interface IDistribution - * @property {number|Long|null} [count] Distribution count - * @property {number|null} [mean] Distribution mean - * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation - * @property {google.api.Distribution.IRange|null} [range] Distribution range - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions - * @property {Array.|null} [bucketCounts] Distribution bucketCounts - * @property {Array.|null} [exemplars] Distribution exemplars - */ + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.usePartitionedTables = false; + object.usesTimestampColumnPartitioning = false; + } + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; + return object; + }; - /** - * Constructs a new Distribution. - * @memberof google.api - * @classdesc Represents a Distribution. - * @implements IDistribution - * @constructor - * @param {google.api.IDistribution=} [properties] Properties to set - */ - function Distribution(properties) { - this.bucketCounts = []; - this.exemplars = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this BigQueryOptions to JSON. + * @function toJSON + * @memberof google.logging.v2.BigQueryOptions + * @instance + * @returns {Object.} JSON object + */ + BigQueryOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Distribution count. - * @member {number|Long} count - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return BigQueryOptions; + })(); - /** - * Distribution mean. - * @member {number} mean - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.mean = 0; + v2.ListBucketsRequest = (function() { - /** - * Distribution sumOfSquaredDeviation. - * @member {number} sumOfSquaredDeviation - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.sumOfSquaredDeviation = 0; + /** + * Properties of a ListBucketsRequest. + * @memberof google.logging.v2 + * @interface IListBucketsRequest + * @property {string|null} [parent] ListBucketsRequest parent + * @property {string|null} [pageToken] ListBucketsRequest pageToken + * @property {number|null} [pageSize] ListBucketsRequest pageSize + */ - /** - * Distribution range. - * @member {google.api.Distribution.IRange|null|undefined} range - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.range = null; + /** + * Constructs a new ListBucketsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListBucketsRequest. + * @implements IListBucketsRequest + * @constructor + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + */ + function ListBucketsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Distribution bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.bucketOptions = null; + /** + * ListBucketsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.parent = ""; - /** - * Distribution bucketCounts. - * @member {Array.} bucketCounts - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.bucketCounts = $util.emptyArray; + /** + * ListBucketsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.pageToken = ""; - /** - * Distribution exemplars. - * @member {Array.} exemplars - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.exemplars = $util.emptyArray; + /** + * ListBucketsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListBucketsRequest + * @instance + */ + ListBucketsRequest.prototype.pageSize = 0; - /** - * Creates a new Distribution instance using the specified properties. - * @function create - * @memberof google.api.Distribution - * @static - * @param {google.api.IDistribution=} [properties] Properties to set - * @returns {google.api.Distribution} Distribution instance - */ - Distribution.create = function create(properties) { - return new Distribution(properties); - }; + /** + * Creates a new ListBucketsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance + */ + ListBucketsRequest.create = function create(properties) { + return new ListBucketsRequest(properties); + }; - /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution - * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Distribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) - $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.int64(message.bucketCounts[i]); - writer.ldelim(); - } - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; - /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution - * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Distribution message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution} Distribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Distribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.count = reader.int64(); - break; - case 2: - message.mean = reader.double(); - break; - case 3: - message.sumOfSquaredDeviation = reader.double(); - break; - case 4: - message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); - break; - case 6: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bucketCounts.push(reader.int64()); - } else - message.bucketCounts.push(reader.int64()); - break; - case 10: - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution} Distribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Distribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Verifies a ListBucketsRequest message. + * @function verify + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBucketsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; - /** - * Verifies a Distribution message. - * @function verify - * @memberof google.api.Distribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Distribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.mean != null && message.hasOwnProperty("mean")) - if (typeof message.mean !== "number") - return "mean: number expected"; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - if (typeof message.sumOfSquaredDeviation !== "number") - return "sumOfSquaredDeviation: number expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.api.Distribution.Range.verify(message.range); - if (error) - return "range." + error; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); - if (error) - return "bucketOptions." + error; - } - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; - } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); - if (error) - return "exemplars." + error; - } - } - return null; - }; + /** + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + */ + ListBucketsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsRequest) + return object; + var message = new $root.google.logging.v2.ListBucketsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; - /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution} Distribution - */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution) - return object; - var message = new $root.google.api.Distribution(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.mean != null) - message.mean = Number(object.mean); - if (object.sumOfSquaredDeviation != null) - message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.api.Distribution.range: object expected"); - message.range = $root.google.api.Distribution.Range.fromObject(object.range); - } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.api.Distribution.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); - } - if (object.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".google.api.Distribution.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); - } - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".google.api.Distribution.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".google.api.Distribution.exemplars: object expected"); - message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + /** + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBucketsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - } - return message; - }; - - /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution - * @static - * @param {google.api.Distribution} message Distribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Distribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bucketCounts = []; - object.exemplars = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - object.mean = 0; - object.sumOfSquaredDeviation = 0; - object.range = null; - object.bucketOptions = null; - } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.mean != null && message.hasOwnProperty("mean")) - object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.api.Distribution.Range.toObject(message.range, options); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; - } - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); - } - return object; - }; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; - /** - * Converts this Distribution to JSON. - * @function toJSON - * @memberof google.api.Distribution - * @instance - * @returns {Object.} JSON object - */ - Distribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListBucketsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListBucketsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBucketsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Distribution.Range = (function() { + return ListBucketsRequest; + })(); + + v2.ListBucketsResponse = (function() { /** - * Properties of a Range. - * @memberof google.api.Distribution - * @interface IRange - * @property {number|null} [min] Range min - * @property {number|null} [max] Range max + * Properties of a ListBucketsResponse. + * @memberof google.logging.v2 + * @interface IListBucketsResponse + * @property {Array.|null} [buckets] ListBucketsResponse buckets + * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken */ /** - * Constructs a new Range. - * @memberof google.api.Distribution - * @classdesc Represents a Range. - * @implements IRange + * Constructs a new ListBucketsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListBucketsResponse. + * @implements IListBucketsResponse * @constructor - * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set */ - function Range(properties) { + function ListBucketsResponse(properties) { + this.buckets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18884,88 +18171,91 @@ } /** - * Range min. - * @member {number} min - * @memberof google.api.Distribution.Range + * ListBucketsResponse buckets. + * @member {Array.} buckets + * @memberof google.logging.v2.ListBucketsResponse * @instance */ - Range.prototype.min = 0; + ListBucketsResponse.prototype.buckets = $util.emptyArray; /** - * Range max. - * @member {number} max - * @memberof google.api.Distribution.Range + * ListBucketsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListBucketsResponse * @instance */ - Range.prototype.max = 0; + ListBucketsResponse.prototype.nextPageToken = ""; /** - * Creates a new Range instance using the specified properties. + * Creates a new ListBucketsResponse instance using the specified properties. * @function create - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.api.Distribution.IRange=} [properties] Properties to set - * @returns {google.api.Distribution.Range} Range instance + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance */ - Range.create = function create(properties) { - return new Range(properties); + ListBucketsResponse.create = function create(properties) { + return new ListBucketsResponse(properties); }; /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Range.encode = function encode(message, writer) { + ListBucketsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + if (message.buckets != null && message.buckets.length) + for (var i = 0; i < message.buckets.length; ++i) + $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Range.encodeDelimited = function encodeDelimited(message, writer) { + ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Range message from the specified reader or buffer. + * Decodes a ListBucketsResponse message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Range} Range + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Range.decode = function decode(reader, length) { + ListBucketsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.min = reader.double(); + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); break; case 2: - message.max = reader.double(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -18976,118 +18266,135 @@ }; /** - * Decodes a Range message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Range} Range + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Range.decodeDelimited = function decodeDelimited(reader) { + ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Range message. + * Verifies a ListBucketsResponse message. * @function verify - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Range.verify = function verify(message) { + ListBucketsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min !== "number") - return "min: number expected"; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max !== "number") - return "max: number expected"; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!Array.isArray(message.buckets)) + return "buckets: array expected"; + for (var i = 0; i < message.buckets.length; ++i) { + var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); + if (error) + return "buckets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.Range} Range + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse */ - Range.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Range) + ListBucketsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsResponse) return object; - var message = new $root.google.api.Distribution.Range(); - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); + var message = new $root.google.logging.v2.ListBucketsResponse(); + if (object.buckets) { + if (!Array.isArray(object.buckets)) + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); + message.buckets = []; + for (var i = 0; i < object.buckets.length; ++i) { + if (typeof object.buckets[i] !== "object") + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); + message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a Range message. Also converts values to other types if specified. + * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.api.Distribution.Range} message Range + * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Range.toObject = function toObject(message, options) { + ListBucketsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.min = 0; - object.max = 0; + if (options.arrays || options.defaults) + object.buckets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.buckets && message.buckets.length) { + object.buckets = []; + for (var j = 0; j < message.buckets.length; ++j) + object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); } - if (message.min != null && message.hasOwnProperty("min")) - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (message.max != null && message.hasOwnProperty("max")) - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this Range to JSON. + * Converts this ListBucketsResponse to JSON. * @function toJSON - * @memberof google.api.Distribution.Range + * @memberof google.logging.v2.ListBucketsResponse * @instance * @returns {Object.} JSON object */ - Range.prototype.toJSON = function toJSON() { + ListBucketsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Range; + return ListBucketsResponse; })(); - Distribution.BucketOptions = (function() { + v2.CreateBucketRequest = (function() { /** - * Properties of a BucketOptions. - * @memberof google.api.Distribution - * @interface IBucketOptions - * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets - * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets - * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + * Properties of a CreateBucketRequest. + * @memberof google.logging.v2 + * @interface ICreateBucketRequest + * @property {string|null} [parent] CreateBucketRequest parent + * @property {string|null} [bucketId] CreateBucketRequest bucketId + * @property {google.logging.v2.ILogBucket|null} [bucket] CreateBucketRequest bucket */ /** - * Constructs a new BucketOptions. - * @memberof google.api.Distribution - * @classdesc Represents a BucketOptions. - * @implements IBucketOptions + * Constructs a new CreateBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateBucketRequest. + * @implements ICreateBucketRequest * @constructor - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set */ - function BucketOptions(properties) { + function CreateBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19095,115 +18402,101 @@ } /** - * BucketOptions linearBuckets. - * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.linearBuckets = null; - - /** - * BucketOptions exponentialBuckets. - * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets - * @memberof google.api.Distribution.BucketOptions + * CreateBucketRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateBucketRequest * @instance */ - BucketOptions.prototype.exponentialBuckets = null; + CreateBucketRequest.prototype.parent = ""; /** - * BucketOptions explicitBuckets. - * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets - * @memberof google.api.Distribution.BucketOptions + * CreateBucketRequest bucketId. + * @member {string} bucketId + * @memberof google.logging.v2.CreateBucketRequest * @instance */ - BucketOptions.prototype.explicitBuckets = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CreateBucketRequest.prototype.bucketId = ""; /** - * BucketOptions options. - * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options - * @memberof google.api.Distribution.BucketOptions + * CreateBucketRequest bucket. + * @member {google.logging.v2.ILogBucket|null|undefined} bucket + * @memberof google.logging.v2.CreateBucketRequest * @instance */ - Object.defineProperty(BucketOptions.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateBucketRequest.prototype.bucket = null; /** - * Creates a new BucketOptions instance using the specified properties. + * Creates a new CreateBucketRequest instance using the specified properties. * @function create - * @memberof google.api.Distribution.BucketOptions + * @memberof google.logging.v2.CreateBucketRequest * @static - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest instance */ - BucketOptions.create = function create(properties) { - return new BucketOptions(properties); + CreateBucketRequest.create = function create(properties) { + return new CreateBucketRequest(properties); }; /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * Encodes the specified CreateBucketRequest message. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.BucketOptions + * @memberof google.logging.v2.CreateBucketRequest * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BucketOptions.encode = function encode(message, writer) { + CreateBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) - $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) - $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) - $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.bucketId != null && Object.hasOwnProperty.call(message, "bucketId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketId); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * Encodes the specified CreateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions + * @memberof google.logging.v2.CreateBucketRequest * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + CreateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BucketOptions message from the specified reader or buffer. + * Decodes a CreateBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.BucketOptions + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BucketOptions.decode = function decode(reader, length) { + CreateBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + message.bucketId = reader.string(); break; case 3: - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -19214,835 +18507,745 @@ }; /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * Decodes a CreateBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BucketOptions.decodeDelimited = function decodeDelimited(reader) { + CreateBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BucketOptions message. + * Verifies a CreateBucketRequest message. * @function verify - * @memberof google.api.Distribution.BucketOptions + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BucketOptions.verify = function verify(message) { + CreateBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); - if (error) - return "linearBuckets." + error; - } - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); - if (error) - return "exponentialBuckets." + error; - } - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); - if (error) - return "explicitBuckets." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.bucketId != null && message.hasOwnProperty("bucketId")) + if (!$util.isString(message.bucketId)) + return "bucketId: string expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + var error = $root.google.logging.v2.LogBucket.verify(message.bucket); + if (error) + return "bucket." + error; } return null; }; /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.BucketOptions + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest */ - BucketOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions) + CreateBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateBucketRequest) return object; - var message = new $root.google.api.Distribution.BucketOptions(); - if (object.linearBuckets != null) { - if (typeof object.linearBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); - } - if (object.exponentialBuckets != null) { - if (typeof object.exponentialBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); - } - if (object.explicitBuckets != null) { - if (typeof object.explicitBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + var message = new $root.google.logging.v2.CreateBucketRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.bucketId != null) + message.bucketId = String(object.bucketId); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.logging.v2.CreateBucketRequest.bucket: object expected"); + message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); } return message; }; /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * Creates a plain object from a CreateBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.BucketOptions + * @memberof google.logging.v2.CreateBucketRequest * @static - * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {google.logging.v2.CreateBucketRequest} message CreateBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BucketOptions.toObject = function toObject(message, options) { + CreateBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); - if (options.oneofs) - object.options = "linearBuckets"; - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); - if (options.oneofs) - object.options = "exponentialBuckets"; - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); - if (options.oneofs) - object.options = "explicitBuckets"; - } - return object; - }; - - /** - * Converts this BucketOptions to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions - * @instance - * @returns {Object.} JSON object - */ - BucketOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - BucketOptions.Linear = (function() { - - /** - * Properties of a Linear. - * @memberof google.api.Distribution.BucketOptions - * @interface ILinear - * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets - * @property {number|null} [width] Linear width - * @property {number|null} [offset] Linear offset - */ - - /** - * Constructs a new Linear. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents a Linear. - * @implements ILinear - * @constructor - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - */ - function Linear(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + if (options.defaults) { + object.parent = ""; + object.bucketId = ""; + object.bucket = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.bucketId != null && message.hasOwnProperty("bucketId")) + object.bucketId = message.bucketId; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); + return object; + }; - /** - * Linear numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.numFiniteBuckets = 0; - - /** - * Linear width. - * @member {number} width - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.width = 0; - - /** - * Linear offset. - * @member {number} offset - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.offset = 0; - - /** - * Creates a new Linear instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance - */ - Linear.create = function create(properties) { - return new Linear(properties); - }; + /** + * Converts this CreateBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateBucketRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); - return writer; - }; + return CreateBucketRequest; + })(); - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2.UpdateBucketRequest = (function() { - /** - * Decodes a Linear message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.width = reader.double(); - break; - case 3: - message.offset = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of an UpdateBucketRequest. + * @memberof google.logging.v2 + * @interface IUpdateBucketRequest + * @property {string|null} [name] UpdateBucketRequest name + * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask + */ - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new UpdateBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateBucketRequest. + * @implements IUpdateBucketRequest + * @constructor + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + */ + function UpdateBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies a Linear message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Linear.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (typeof message.width !== "number") - return "width: number expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset !== "number") - return "offset: number expected"; - return null; - }; + /** + * UpdateBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.name = ""; - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - */ - Linear.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Linear(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.width != null) - message.width = Number(object.width); - if (object.offset != null) - message.offset = Number(object.offset); - return message; - }; + /** + * UpdateBucketRequest bucket. + * @member {google.logging.v2.ILogBucket|null|undefined} bucket + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.bucket = null; - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.Linear} message Linear - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Linear.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.width = 0; - object.offset = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.width != null && message.hasOwnProperty("width")) - object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; - return object; - }; + /** + * UpdateBucketRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.updateMask = null; - /** - * Converts this Linear to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - * @returns {Object.} JSON object - */ - Linear.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new UpdateBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance + */ + UpdateBucketRequest.create = function create(properties) { + return new UpdateBucketRequest(properties); + }; + + /** + * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - return Linear; - })(); + /** + * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - BucketOptions.Exponential = (function() { + /** + * Decodes an UpdateBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of an Exponential. - * @memberof google.api.Distribution.BucketOptions - * @interface IExponential - * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets - * @property {number|null} [growthFactor] Exponential growthFactor - * @property {number|null} [scale] Exponential scale - */ + /** + * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new Exponential. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Exponential. - * @implements IExponential - * @constructor - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - */ - function Exponential(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies an UpdateBucketRequest message. + * @function verify + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + var error = $root.google.logging.v2.LogBucket.verify(message.bucket); + if (error) + return "bucket." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } + return null; + }; - /** - * Exponential numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.numFiniteBuckets = 0; + /** + * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + */ + UpdateBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateBucketRequest) + return object; + var message = new $root.google.logging.v2.UpdateBucketRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); + message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Exponential growthFactor. - * @member {number} growthFactor - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.growthFactor = 0; + /** + * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBucketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.bucket = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Exponential scale. - * @member {number} scale - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.scale = 0; + /** + * Converts this UpdateBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new Exponential instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance - */ - Exponential.create = function create(properties) { - return new Exponential(properties); - }; + return UpdateBucketRequest; + })(); - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); - return writer; - }; + v2.GetBucketRequest = (function() { - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a GetBucketRequest. + * @memberof google.logging.v2 + * @interface IGetBucketRequest + * @property {string|null} [name] GetBucketRequest name + */ + + /** + * Constructs a new GetBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetBucketRequest. + * @implements IGetBucketRequest + * @constructor + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + */ + function GetBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an Exponential message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.growthFactor = reader.double(); - break; - case 3: - message.scale = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * GetBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.GetBucketRequest + * @instance + */ + GetBucketRequest.prototype.name = ""; - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new GetBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance + */ + GetBucketRequest.create = function create(properties) { + return new GetBucketRequest(properties); + }; - /** - * Verifies an Exponential message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exponential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - if (typeof message.growthFactor !== "number") - return "growthFactor: number expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (typeof message.scale !== "number") - return "scale: number expected"; - return null; - }; + /** + * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - */ - Exponential.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Exponential(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.growthFactor != null) - message.growthFactor = Number(object.growthFactor); - if (object.scale != null) - message.scale = Number(object.scale); - return message; - }; + /** + * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exponential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.growthFactor = 0; - object.scale = 0; + /** + * Decodes a GetBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; - return object; - }; + } + return message; + }; - /** - * Converts this Exponential to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - * @returns {Object.} JSON object - */ - Exponential.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBucketRequest message. + * @function verify + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + */ + GetBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetBucketRequest) + return object; + var message = new $root.google.logging.v2.GetBucketRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - return Exponential; - })(); + /** + * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBucketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - BucketOptions.Explicit = (function() { + /** + * Converts this GetBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetBucketRequest + * @instance + * @returns {Object.} JSON object + */ + GetBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of an Explicit. - * @memberof google.api.Distribution.BucketOptions - * @interface IExplicit - * @property {Array.|null} [bounds] Explicit bounds - */ + return GetBucketRequest; + })(); - /** - * Constructs a new Explicit. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Explicit. - * @implements IExplicit - * @constructor - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - */ - function Explicit(properties) { - this.bounds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v2.DeleteBucketRequest = (function() { - /** - * Explicit bounds. - * @member {Array.} bounds - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - */ - Explicit.prototype.bounds = $util.emptyArray; + /** + * Properties of a DeleteBucketRequest. + * @memberof google.logging.v2 + * @interface IDeleteBucketRequest + * @property {string|null} [name] DeleteBucketRequest name + */ - /** - * Creates a new Explicit instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance - */ - Explicit.create = function create(properties) { - return new Explicit(properties); - }; + /** + * Constructs a new DeleteBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteBucketRequest. + * @implements IDeleteBucketRequest + * @constructor + * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set + */ + function DeleteBucketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bounds != null && message.bounds.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.bounds.length; ++i) - writer.double(message.bounds[i]); - writer.ldelim(); - } - return writer; - }; + /** + * DeleteBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteBucketRequest + * @instance + */ + DeleteBucketRequest.prototype.name = ""; - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new DeleteBucketRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest instance + */ + DeleteBucketRequest.create = function create(properties) { + return new DeleteBucketRequest(properties); + }; - /** - * Decodes an Explicit message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.bounds && message.bounds.length)) - message.bounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bounds.push(reader.double()); - } else - message.bounds.push(reader.double()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DeleteBucketRequest message. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBucketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an Explicit message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Explicit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bounds != null && message.hasOwnProperty("bounds")) { - if (!Array.isArray(message.bounds)) - return "bounds: array expected"; - for (var i = 0; i < message.bounds.length; ++i) - if (typeof message.bounds[i] !== "number") - return "bounds: number[] expected"; + /** + * Decodes a DeleteBucketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBucketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteBucketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - */ - Explicit.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Explicit(); - if (object.bounds) { - if (!Array.isArray(object.bounds)) - throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); - message.bounds = []; - for (var i = 0; i < object.bounds.length; ++i) - message.bounds[i] = Number(object.bounds[i]); - } - return message; - }; + /** + * Decodes a DeleteBucketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Explicit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bounds = []; - if (message.bounds && message.bounds.length) { - object.bounds = []; - for (var j = 0; j < message.bounds.length; ++j) - object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; - } + /** + * Verifies a DeleteBucketRequest message. + * @function verify + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBucketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + */ + DeleteBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteBucketRequest) return object; - }; + var message = new $root.google.logging.v2.DeleteBucketRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this Explicit to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - * @returns {Object.} JSON object - */ - Explicit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DeleteBucketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {google.logging.v2.DeleteBucketRequest} message DeleteBucketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBucketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - return Explicit; - })(); + /** + * Converts this DeleteBucketRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteBucketRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBucketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return BucketOptions; + return DeleteBucketRequest; })(); - Distribution.Exemplar = (function() { + v2.UndeleteBucketRequest = (function() { /** - * Properties of an Exemplar. - * @memberof google.api.Distribution - * @interface IExemplar - * @property {number|null} [value] Exemplar value - * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp - * @property {Array.|null} [attachments] Exemplar attachments + * Properties of an UndeleteBucketRequest. + * @memberof google.logging.v2 + * @interface IUndeleteBucketRequest + * @property {string|null} [name] UndeleteBucketRequest name */ /** - * Constructs a new Exemplar. - * @memberof google.api.Distribution - * @classdesc Represents an Exemplar. - * @implements IExemplar + * Constructs a new UndeleteBucketRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UndeleteBucketRequest. + * @implements IUndeleteBucketRequest * @constructor - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set */ - function Exemplar(properties) { - this.attachments = []; + function UndeleteBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20050,104 +19253,75 @@ } /** - * Exemplar value. - * @member {number} value - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.value = 0; - - /** - * Exemplar timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.timestamp = null; - - /** - * Exemplar attachments. - * @member {Array.} attachments - * @memberof google.api.Distribution.Exemplar + * UndeleteBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.UndeleteBucketRequest * @instance */ - Exemplar.prototype.attachments = $util.emptyArray; + UndeleteBucketRequest.prototype.name = ""; /** - * Creates a new Exemplar instance using the specified properties. + * Creates a new UndeleteBucketRequest instance using the specified properties. * @function create - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @static - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - * @returns {google.api.Distribution.Exemplar} Exemplar instance + * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest instance */ - Exemplar.create = function create(properties) { - return new Exemplar(properties); + UndeleteBucketRequest.create = function create(properties) { + return new UndeleteBucketRequest(properties); }; /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * Encodes the specified UndeleteBucketRequest message. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Exemplar.encode = function encode(message, writer) { + UndeleteBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.attachments != null && message.attachments.length) - for (var i = 0; i < message.attachments.length; ++i) - $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * Encodes the specified UndeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + UndeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Exemplar message from the specified reader or buffer. + * Decodes an UndeleteBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Exemplar} Exemplar + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Exemplar.decode = function decode(reader, length) { + UndeleteBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UndeleteBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.value = reader.double(); - break; - case 2: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.attachments && message.attachments.length)) - message.attachments = []; - message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -20158,705 +19332,572 @@ }; /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * Decodes an UndeleteBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Exemplar} Exemplar + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Exemplar.decodeDelimited = function decodeDelimited(reader) { + UndeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Exemplar message. + * Verifies an UndeleteBucketRequest message. * @function verify - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Exemplar.verify = function verify(message) { + UndeleteBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.attachments != null && message.hasOwnProperty("attachments")) { - if (!Array.isArray(message.attachments)) - return "attachments: array expected"; - for (var i = 0; i < message.attachments.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.attachments[i]); - if (error) - return "attachments." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * Creates an UndeleteBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.Exemplar} Exemplar + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest */ - Exemplar.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Exemplar) + UndeleteBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UndeleteBucketRequest) return object; - var message = new $root.google.api.Distribution.Exemplar(); - if (object.value != null) - message.value = Number(object.value); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.attachments) { - if (!Array.isArray(object.attachments)) - throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); - message.attachments = []; - for (var i = 0; i < object.attachments.length; ++i) { - if (typeof object.attachments[i] !== "object") - throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); - message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); - } - } + var message = new $root.google.logging.v2.UndeleteBucketRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * Creates a plain object from an UndeleteBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @static - * @param {google.api.Distribution.Exemplar} message Exemplar + * @param {google.logging.v2.UndeleteBucketRequest} message UndeleteBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Exemplar.toObject = function toObject(message, options) { + UndeleteBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.attachments = []; - if (options.defaults) { - object.value = 0; - object.timestamp = null; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.attachments && message.attachments.length) { - object.attachments = []; - for (var j = 0; j < message.attachments.length; ++j) - object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Exemplar to JSON. + * Converts this UndeleteBucketRequest to JSON. * @function toJSON - * @memberof google.api.Distribution.Exemplar + * @memberof google.logging.v2.UndeleteBucketRequest * @instance * @returns {Object.} JSON object */ - Exemplar.prototype.toJSON = function toJSON() { + UndeleteBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Exemplar; + return UndeleteBucketRequest; })(); - return Distribution; - })(); - - api.MetricDescriptor = (function() { - - /** - * Properties of a MetricDescriptor. - * @memberof google.api - * @interface IMetricDescriptor - * @property {string|null} [name] MetricDescriptor name - * @property {string|null} [type] MetricDescriptor type - * @property {Array.|null} [labels] MetricDescriptor labels - * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind - * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType - * @property {string|null} [unit] MetricDescriptor unit - * @property {string|null} [description] MetricDescriptor description - * @property {string|null} [displayName] MetricDescriptor displayName - * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage - * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes - */ - - /** - * Constructs a new MetricDescriptor. - * @memberof google.api - * @classdesc Represents a MetricDescriptor. - * @implements IMetricDescriptor - * @constructor - * @param {google.api.IMetricDescriptor=} [properties] Properties to set - */ - function MetricDescriptor(properties) { - this.labels = []; - this.monitoredResourceTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricDescriptor name. - * @member {string} name - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.name = ""; - - /** - * MetricDescriptor type. - * @member {string} type - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.type = ""; + v2.ListViewsRequest = (function() { - /** - * MetricDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.labels = $util.emptyArray; + /** + * Properties of a ListViewsRequest. + * @memberof google.logging.v2 + * @interface IListViewsRequest + * @property {string|null} [parent] ListViewsRequest parent + * @property {string|null} [pageToken] ListViewsRequest pageToken + * @property {number|null} [pageSize] ListViewsRequest pageSize + */ - /** - * MetricDescriptor metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.metricKind = 0; + /** + * Constructs a new ListViewsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListViewsRequest. + * @implements IListViewsRequest + * @constructor + * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set + */ + function ListViewsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MetricDescriptor valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.valueType = 0; + /** + * ListViewsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.parent = ""; - /** - * MetricDescriptor unit. - * @member {string} unit - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.unit = ""; + /** + * ListViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.pageToken = ""; - /** - * MetricDescriptor description. - * @member {string} description - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.description = ""; + /** + * ListViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.pageSize = 0; - /** - * MetricDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.displayName = ""; + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest instance + */ + ListViewsRequest.create = function create(properties) { + return new ListViewsRequest(properties); + }; - /** - * MetricDescriptor metadata. - * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.metadata = null; + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; - /** - * MetricDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.launchStage = 0; + /** + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MetricDescriptor monitoredResourceTypes. - * @member {Array.} monitoredResourceTypes - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new MetricDescriptor instance using the specified properties. - * @function create - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.IMetricDescriptor=} [properties] Properties to set - * @returns {google.api.MetricDescriptor} MetricDescriptor instance - */ - MetricDescriptor.create = function create(properties) { - return new MetricDescriptor(properties); - }; + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); - if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); - if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); - return writer; - }; + /** + * Verifies a ListViewsRequest message. + * @function verify + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; - /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + */ + ListViewsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListViewsRequest) + return object; + var message = new $root.google.logging.v2.ListViewsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; - /** - * Decodes a MetricDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.MetricDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor} MetricDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 8: - message.type = reader.string(); - break; - case 2: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 3: - message.metricKind = reader.int32(); - break; - case 4: - message.valueType = reader.int32(); - break; - case 5: - message.unit = reader.string(); - break; - case 6: - message.description = reader.string(); - break; - case 7: - message.displayName = reader.string(); - break; - case 10: - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); - break; - case 12: - message.launchStage = reader.int32(); - break; - case 13: - if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) - message.monitoredResourceTypes = []; - message.monitoredResourceTypes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {google.logging.v2.ListViewsRequest} message ListViewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - } - return message; - }; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; - /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MetricDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor} MetricDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this ListViewsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListViewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListViewsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a MetricDescriptor message. - * @function verify - * @memberof google.api.MetricDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } + return ListViewsRequest; + })(); + + v2.ListViewsResponse = (function() { + + /** + * Properties of a ListViewsResponse. + * @memberof google.logging.v2 + * @interface IListViewsResponse + * @property {Array.|null} [views] ListViewsResponse views + * @property {string|null} [nextPageToken] ListViewsResponse nextPageToken + */ + + /** + * Constructs a new ListViewsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListViewsResponse. + * @implements IListViewsResponse + * @constructor + * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set + */ + function ListViewsResponse(properties) { + this.views = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - switch (message.metricKind) { - default: - return "metricKind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; + + /** + * ListViewsResponse views. + * @member {Array.} views + * @memberof google.logging.v2.ListViewsResponse + * @instance + */ + ListViewsResponse.prototype.views = $util.emptyArray; + + /** + * ListViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListViewsResponse + * @instance + */ + ListViewsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse instance + */ + ListViewsResponse.create = function create(properties) { + return new ListViewsResponse(properties); + }; + + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.views != null && message.views.length) + for (var i = 0; i < message.views.length; ++i) + $root.google.logging.v2.LogView.encode(message.views[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.views && message.views.length)) + message.views = []; + message.views.push($root.google.logging.v2.LogView.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.unit != null && message.hasOwnProperty("unit")) - if (!$util.isString(message.unit)) - return "unit: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; + return message; + }; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListViewsResponse message. + * @function verify + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.views != null && message.hasOwnProperty("views")) { + if (!Array.isArray(message.views)) + return "views: array expected"; + for (var i = 0; i < message.views.length; ++i) { + var error = $root.google.logging.v2.LogView.verify(message.views[i]); + if (error) + return "views." + error; + } } - if (message.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { - if (!Array.isArray(message.monitoredResourceTypes)) - return "monitoredResourceTypes: array expected"; - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - if (!$util.isString(message.monitoredResourceTypes[i])) - return "monitoredResourceTypes: string[] expected"; - } - return null; - }; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MetricDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor} MetricDescriptor - */ - MetricDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor) - return object; - var message = new $root.google.api.MetricDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MetricDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MetricDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + /** + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse + */ + ListViewsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListViewsResponse) + return object; + var message = new $root.google.logging.v2.ListViewsResponse(); + if (object.views) { + if (!Array.isArray(object.views)) + throw TypeError(".google.logging.v2.ListViewsResponse.views: array expected"); + message.views = []; + for (var i = 0; i < object.views.length; ++i) { + if (typeof object.views[i] !== "object") + throw TypeError(".google.logging.v2.ListViewsResponse.views: object expected"); + message.views[i] = $root.google.logging.v2.LogView.fromObject(object.views[i]); + } } - } - switch (object.metricKind) { - case "METRIC_KIND_UNSPECIFIED": - case 0: - message.metricKind = 0; - break; - case "GAUGE": - case 1: - message.metricKind = 1; - break; - case "DELTA": - case 2: - message.metricKind = 2; - break; - case "CUMULATIVE": - case 3: - message.metricKind = 3; - break; - } - switch (object.valueType) { - case "VALUE_TYPE_UNSPECIFIED": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - case "DOUBLE": - case 3: - message.valueType = 3; - break; - case "STRING": - case 4: - message.valueType = 4; - break; - case "DISTRIBUTION": - case 5: - message.valueType = 5; - break; - case "MONEY": - case 6: - message.valueType = 6; - break; - } - if (object.unit != null) - message.unit = String(object.unit); - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); - } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.monitoredResourceTypes) { - if (!Array.isArray(object.monitoredResourceTypes)) - throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); - message.monitoredResourceTypes = []; - for (var i = 0; i < object.monitoredResourceTypes.length; ++i) - message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); - } - return message; - }; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.MetricDescriptor} message MetricDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.labels = []; - object.monitoredResourceTypes = []; - } - if (options.defaults) { - object.name = ""; - object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.unit = ""; - object.description = ""; - object.displayName = ""; - object.type = ""; - object.metadata = null; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = message.unit; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { - object.monitoredResourceTypes = []; - for (var j = 0; j < message.monitoredResourceTypes.length; ++j) - object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; - } - return object; - }; + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {google.logging.v2.ListViewsResponse} message ListViewsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.views = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.views && message.views.length) { + object.views = []; + for (var j = 0; j < message.views.length; ++j) + object.views[j] = $root.google.logging.v2.LogView.toObject(message.views[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Converts this MetricDescriptor to JSON. - * @function toJSON - * @memberof google.api.MetricDescriptor - * @instance - * @returns {Object.} JSON object - */ - MetricDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListViewsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListViewsResponse + * @instance + * @returns {Object.} JSON object + */ + ListViewsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - MetricDescriptor.MetricDescriptorMetadata = (function() { + return ListViewsResponse; + })(); + + v2.CreateViewRequest = (function() { /** - * Properties of a MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @interface IMetricDescriptorMetadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage - * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod - * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay + * Properties of a CreateViewRequest. + * @memberof google.logging.v2 + * @interface ICreateViewRequest + * @property {string|null} [parent] CreateViewRequest parent + * @property {string|null} [viewId] CreateViewRequest viewId + * @property {google.logging.v2.ILogView|null} [view] CreateViewRequest view */ /** - * Constructs a new MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @classdesc Represents a MetricDescriptorMetadata. - * @implements IMetricDescriptorMetadata + * Constructs a new CreateViewRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateViewRequest. + * @implements ICreateViewRequest * @constructor - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set */ - function MetricDescriptorMetadata(properties) { + function CreateViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20864,101 +19905,101 @@ } /** - * MetricDescriptorMetadata launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * CreateViewRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateViewRequest * @instance */ - MetricDescriptorMetadata.prototype.launchStage = 0; + CreateViewRequest.prototype.parent = ""; /** - * MetricDescriptorMetadata samplePeriod. - * @member {google.protobuf.IDuration|null|undefined} samplePeriod - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * CreateViewRequest viewId. + * @member {string} viewId + * @memberof google.logging.v2.CreateViewRequest * @instance */ - MetricDescriptorMetadata.prototype.samplePeriod = null; + CreateViewRequest.prototype.viewId = ""; /** - * MetricDescriptorMetadata ingestDelay. - * @member {google.protobuf.IDuration|null|undefined} ingestDelay - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * CreateViewRequest view. + * @member {google.logging.v2.ILogView|null|undefined} view + * @memberof google.logging.v2.CreateViewRequest * @instance */ - MetricDescriptorMetadata.prototype.ingestDelay = null; + CreateViewRequest.prototype.view = null; /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. + * Creates a new CreateViewRequest instance using the specified properties. * @function create - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance + * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest instance */ - MetricDescriptorMetadata.create = function create(properties) { - return new MetricDescriptorMetadata(properties); + CreateViewRequest.create = function create(properties) { + return new CreateViewRequest(properties); }; /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. * @function encode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptorMetadata.encode = function encode(message, writer) { + CreateViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); - if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) - $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) - $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.viewId != null && Object.hasOwnProperty.call(message, "viewId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.viewId); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * Decodes a CreateViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @memberof google.logging.v2.CreateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptorMetadata.decode = function decode(reader, length) { + CreateViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.launchStage = reader.int32(); + message.parent = reader.string(); break; case 2: - message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.viewId = reader.string(); break; case 3: - message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -20969,1826 +20010,1896 @@ }; /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @memberof google.logging.v2.CreateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricDescriptorMetadata message. - * @function verify - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricDescriptorMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { - var error = $root.google.protobuf.Duration.verify(message.samplePeriod); - if (error) - return "samplePeriod." + error; - } - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { - var error = $root.google.protobuf.Duration.verify(message.ingestDelay); - if (error) - return "ingestDelay." + error; - } - return null; - }; - - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - */ - MetricDescriptorMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) - return object; - var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.samplePeriod != null) { - if (typeof object.samplePeriod !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); - message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); - } - if (object.ingestDelay != null) { - if (typeof object.ingestDelay !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); - message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); - } - return message; + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * Verifies a CreateViewRequest message. + * @function verify + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricDescriptorMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.samplePeriod = null; - object.ingestDelay = null; + CreateViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.viewId != null && message.hasOwnProperty("viewId")) + if (!$util.isString(message.viewId)) + return "viewId: string expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.logging.v2.LogView.verify(message.view); + if (error) + return "view." + error; } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) - object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) - object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); - return object; + return null; }; /** - * Converts this MetricDescriptorMetadata to JSON. - * @function toJSON - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - * @returns {Object.} JSON object + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest */ - MetricDescriptorMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CreateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateViewRequest) + return object; + var message = new $root.google.logging.v2.CreateViewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.viewId != null) + message.viewId = String(object.viewId); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.logging.v2.CreateViewRequest.view: object expected"); + message.view = $root.google.logging.v2.LogView.fromObject(object.view); + } + return message; }; - return MetricDescriptorMetadata; - })(); - - /** - * MetricKind enum. - * @name google.api.MetricDescriptor.MetricKind - * @enum {number} - * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value - * @property {number} GAUGE=1 GAUGE value - * @property {number} DELTA=2 DELTA value - * @property {number} CUMULATIVE=3 CUMULATIVE value - */ - MetricDescriptor.MetricKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "GAUGE"] = 1; - values[valuesById[2] = "DELTA"] = 2; - values[valuesById[3] = "CUMULATIVE"] = 3; - return values; - })(); - - /** - * ValueType enum. - * @name google.api.MetricDescriptor.ValueType - * @enum {number} - * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - * @property {number} DOUBLE=3 DOUBLE value - * @property {number} STRING=4 STRING value - * @property {number} DISTRIBUTION=5 DISTRIBUTION value - * @property {number} MONEY=6 MONEY value - */ - MetricDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - values[valuesById[3] = "DOUBLE"] = 3; - values[valuesById[4] = "STRING"] = 4; - values[valuesById[5] = "DISTRIBUTION"] = 5; - values[valuesById[6] = "MONEY"] = 6; - return values; - })(); - - return MetricDescriptor; - })(); - - api.Metric = (function() { - - /** - * Properties of a Metric. - * @memberof google.api - * @interface IMetric - * @property {string|null} [type] Metric type - * @property {Object.|null} [labels] Metric labels - */ - - /** - * Constructs a new Metric. - * @memberof google.api - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {google.api.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metric type. - * @member {string} type - * @memberof google.api.Metric - * @instance - */ - Metric.prototype.type = ""; - - /** - * Metric labels. - * @member {Object.} labels - * @memberof google.api.Metric - * @instance - */ - Metric.prototype.labels = $util.emptyObject; - - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof google.api.Metric - * @static - * @param {google.api.IMetric=} [properties] Properties to set - * @returns {google.api.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @function encode - * @memberof google.api.Metric - * @static - * @param {google.api.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - return writer; - }; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Metric - * @static - * @param {google.api.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof google.api.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.type = reader.string(); - break; - case 2: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateViewRequest + * @static + * @param {google.logging.v2.CreateViewRequest} message CreateViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.viewId = ""; + object.view = null; } - } - return message; - }; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.viewId != null && message.hasOwnProperty("viewId")) + object.viewId = message.viewId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.logging.v2.LogView.toObject(message.view, options); + return object; + }; - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this CreateViewRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateViewRequest + * @instance + * @returns {Object.} JSON object + */ + CreateViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a Metric message. - * @function verify - * @memberof google.api.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; + return CreateViewRequest; + })(); - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Metric - * @static - * @param {Object.} object Plain object - * @returns {google.api.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Metric) - return object; - var message = new $root.google.api.Metric(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.Metric.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; + v2.UpdateViewRequest = (function() { - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Metric - * @static - * @param {google.api.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + /** + * Properties of an UpdateViewRequest. + * @memberof google.logging.v2 + * @interface IUpdateViewRequest + * @property {string|null} [name] UpdateViewRequest name + * @property {google.logging.v2.ILogView|null} [view] UpdateViewRequest view + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateViewRequest updateMask + */ + + /** + * Constructs a new UpdateViewRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateViewRequest. + * @implements IUpdateViewRequest + * @constructor + * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set + */ + function UpdateViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof google.api.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * UpdateViewRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.name = ""; + + /** + * UpdateViewRequest view. + * @member {google.logging.v2.ILogView|null|undefined} view + * @memberof google.logging.v2.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.view = null; + + /** + * UpdateViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateViewRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest instance + */ + UpdateViewRequest.create = function create(properties) { + return new UpdateViewRequest(properties); + }; + + /** + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateViewRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateViewRequest message. + * @function verify + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.logging.v2.LogView.verify(message.view); + if (error) + return "view." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - return Metric; - })(); + /** + * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest + */ + UpdateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateViewRequest) + return object; + var message = new $root.google.logging.v2.UpdateViewRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.logging.v2.UpdateViewRequest.view: object expected"); + message.view = $root.google.logging.v2.LogView.fromObject(object.view); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - return api; - })(); + /** + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {google.logging.v2.UpdateViewRequest} message UpdateViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.logging.v2.LogView.toObject(message.view, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - google.protobuf = (function() { + /** + * Converts this UpdateViewRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateViewRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; + return UpdateViewRequest; + })(); - protobuf.FileDescriptorSet = (function() { + v2.GetViewRequest = (function() { - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ + /** + * Properties of a GetViewRequest. + * @memberof google.logging.v2 + * @interface IGetViewRequest + * @property {string|null} [name] GetViewRequest name + */ - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new GetViewRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetViewRequest. + * @implements IGetViewRequest + * @constructor + * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set + */ + function GetViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; + /** + * GetViewRequest name. + * @member {string} name + * @memberof google.logging.v2.GetViewRequest + * @instance + */ + GetViewRequest.prototype.name = ""; - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; + /** + * Creates a new GetViewRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetViewRequest} GetViewRequest instance + */ + GetViewRequest.create = function create(properties) { + return new GetViewRequest(properties); + }; - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetViewRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a GetViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetViewRequest} GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetViewRequest} GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; + /** + * Verifies a GetViewRequest message. + * @function verify + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + /** + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetViewRequest} GetViewRequest + */ + GetViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetViewRequest) + return object; + var message = new $root.google.logging.v2.GetViewRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {google.logging.v2.GetViewRequest} message GetViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; + }; - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; + /** + * Converts this GetViewRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetViewRequest + * @instance + * @returns {Object.} JSON object + */ + GetViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return GetViewRequest; + })(); - return FileDescriptorSet; - })(); + v2.DeleteViewRequest = (function() { + + /** + * Properties of a DeleteViewRequest. + * @memberof google.logging.v2 + * @interface IDeleteViewRequest + * @property {string|null} [name] DeleteViewRequest name + */ + + /** + * Constructs a new DeleteViewRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteViewRequest. + * @implements IDeleteViewRequest + * @constructor + * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set + */ + function DeleteViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.FileDescriptorProto = (function() { + /** + * DeleteViewRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteViewRequest + * @instance + */ + DeleteViewRequest.prototype.name = ""; - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - */ + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest instance + */ + DeleteViewRequest.create = function create(properties) { + return new DeleteViewRequest(properties); + }; - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; + /** + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + /** + * Verifies a DeleteViewRequest message. + * @function verify + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + */ + DeleteViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteViewRequest) + return object; + var message = new $root.google.logging.v2.DeleteViewRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {google.logging.v2.DeleteViewRequest} message DeleteViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + /** + * Converts this DeleteViewRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteViewRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; + return DeleteViewRequest; + })(); - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + v2.ListSinksRequest = (function() { + + /** + * Properties of a ListSinksRequest. + * @memberof google.logging.v2 + * @interface IListSinksRequest + * @property {string|null} [parent] ListSinksRequest parent + * @property {string|null} [pageToken] ListSinksRequest pageToken + * @property {number|null} [pageSize] ListSinksRequest pageSize + */ - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; + /** + * Constructs a new ListSinksRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListSinksRequest. + * @implements IListSinksRequest + * @constructor + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + */ + function ListSinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + /** + * ListSinksRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.parent = ""; - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; + /** + * ListSinksRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageToken = ""; - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; + /** + * ListSinksRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageSize = 0; - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - return writer; - }; + /** + * Creates a new ListSinksRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance + */ + ListSinksRequest.create = function create(properties) { + return new ListSinksRequest(properties); + }; - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; + /** + * Verifies a ListSinksRequest message. + * @function verify + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + */ + ListSinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksRequest) + return object; + var message = new $root.google.logging.v2.ListSinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListSinksRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListSinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListSinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListSinksRequest; + })(); + + v2.ListSinksResponse = (function() { + + /** + * Properties of a ListSinksResponse. + * @memberof google.logging.v2 + * @interface IListSinksResponse + * @property {Array.|null} [sinks] ListSinksResponse sinks + * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + */ + + /** + * Constructs a new ListSinksResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListSinksResponse. + * @implements IListSinksResponse + * @constructor + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + */ + function ListSinksResponse(properties) { + this.sinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - return null; - }; - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + /** + * ListSinksResponse sinks. + * @member {Array.} sinks + * @memberof google.logging.v2.ListSinksResponse + * @instance + */ + ListSinksResponse.prototype.sinks = $util.emptyArray; + + /** + * ListSinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListSinksResponse + * @instance + */ + ListSinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSinksResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + */ + ListSinksResponse.create = function create(properties) { + return new ListSinksResponse(properties); + }; + + /** + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinks != null && message.sinks.length) + for (var i = 0; i < message.sinks.length; ++i) + $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sinks && message.sinks.length)) + message.sinks = []; + message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + return message; + }; + + /** + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSinksResponse message. + * @function verify + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinks != null && message.hasOwnProperty("sinks")) { + if (!Array.isArray(message.sinks)) + return "sinks: array expected"; + for (var i = 0; i < message.sinks.length; ++i) { + var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); + if (error) + return "sinks." + error; + } } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + */ + ListSinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksResponse) + return object; + var message = new $root.google.logging.v2.ListSinksResponse(); + if (object.sinks) { + if (!Array.isArray(object.sinks)) + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); + message.sinks = []; + for (var i = 0; i < object.sinks.length; ++i) { + if (typeof object.sinks[i] !== "object") + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); + message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); + } } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sinks && message.sinks.length) { + object.sinks = []; + for (var j = 0; j < message.sinks.length; ++j) + object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - return message; - }; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; + /** + * Converts this ListSinksResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListSinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListSinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListSinksResponse; + })(); + + v2.GetSinkRequest = (function() { + + /** + * Properties of a GetSinkRequest. + * @memberof google.logging.v2 + * @interface IGetSinkRequest + * @property {string|null} [sinkName] GetSinkRequest sinkName + */ + + /** + * Constructs a new GetSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetSinkRequest. + * @implements IGetSinkRequest + * @constructor + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + */ + function GetSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - return object; - }; - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * GetSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.GetSinkRequest + * @instance + */ + GetSinkRequest.prototype.sinkName = ""; - return FileDescriptorProto; - })(); + /** + * Creates a new GetSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance + */ + GetSinkRequest.create = function create(properties) { + return new GetSinkRequest(properties); + }; - protobuf.DescriptorProto = (function() { + /** + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + return writer; + }; - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ + /** + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a GetSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; + /** + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; + /** + * Verifies a GetSinkRequest message. + * @function verify + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + return null; + }; - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; + /** + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + */ + GetSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSinkRequest) + return object; + var message = new $root.google.logging.v2.GetSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + return message; + }; - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + /** + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + return object; + }; - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; + /** + * Converts this GetSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetSinkRequest + * @instance + * @returns {Object.} JSON object + */ + GetSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; + return GetSinkRequest; + })(); - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + v2.CreateSinkRequest = (function() { - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; + /** + * Properties of a CreateSinkRequest. + * @memberof google.logging.v2 + * @interface ICreateSinkRequest + * @property {string|null} [parent] CreateSinkRequest parent + * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity + */ - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * Constructs a new CreateSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateSinkRequest. + * @implements ICreateSinkRequest + * @constructor + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + */ + function CreateSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * CreateSinkRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.parent = ""; - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; + /** + * CreateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.sink = null; - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; + /** + * CreateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance + */ + CreateSinkRequest.create = function create(properties) { + return new CreateSinkRequest(properties); + }; - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + return writer; + }; - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + /** + * Verifies a CreateSinkRequest message. + * @function verify + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); if (error) - return "oneofDecl." + error; + return "sink." + error; } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + return null; + }; + + /** + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + */ + CreateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateSinkRequest) + return object; + var message = new $root.google.logging.v2.CreateSinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + return message; + }; - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + /** + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.sink = null; + object.uniqueWriterIdentity = false; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + return object; + }; + + /** + * Converts this CreateSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateSinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateSinkRequest; + })(); + + v2.UpdateSinkRequest = (function() { + + /** + * Properties of an UpdateSinkRequest. + * @memberof google.logging.v2 + * @interface IUpdateSinkRequest + * @property {string|null} [sinkName] UpdateSinkRequest sinkName + * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask + */ + + /** + * Constructs a new UpdateSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateSinkRequest. + * @implements IUpdateSinkRequest + * @constructor + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + */ + function UpdateSinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + + /** + * UpdateSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.sinkName = ""; + + /** + * UpdateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.sink = null; + + /** + * UpdateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * UpdateSinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + */ + UpdateSinkRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance + */ + UpdateSinkRequest.create = function create(properties) { + return new UpdateSinkRequest(properties); + }; + + /** + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sinkName = reader.string(); + break; + case 2: + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + case 3: + message.uniqueWriterIdentity = reader.bool(); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + return message; + }; + + /** + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSinkRequest message. + * @function verify + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + return null; + }; + + /** + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + */ + UpdateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSinkRequest) + return object; + var message = new $root.google.logging.v2.UpdateSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + return message; + }; + + /** + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sinkName = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + object.updateMask = null; } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; + /** + * Converts this UpdateSinkRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateSinkRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return UpdateSinkRequest; + })(); - DescriptorProto.ExtensionRange = (function() { + v2.DeleteSinkRequest = (function() { /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + * Properties of a DeleteSinkRequest. + * @memberof google.logging.v2 + * @interface IDeleteSinkRequest + * @property {string|null} [sinkName] DeleteSinkRequest sinkName */ /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange + * Constructs a new DeleteSinkRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteSinkRequest. + * @implements IDeleteSinkRequest * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set */ - function ExtensionRange(properties) { + function DeleteSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22796,101 +21907,75 @@ } /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * DeleteSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.DeleteSinkRequest * @instance */ - ExtensionRange.prototype.options = null; + DeleteSinkRequest.prototype.sinkName = ""; /** - * Creates a new ExtensionRange instance using the specified properties. + * Creates a new DeleteSinkRequest instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); + DeleteSinkRequest.create = function create(properties) { + return new DeleteSinkRequest(properties); }; /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + DeleteSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtensionRange message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length) { + DeleteSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + message.sinkName = reader.string(); break; default: reader.skipType(tag & 7); @@ -22901,219 +21986,253 @@ }; /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtensionRange message. + * Verifies a DeleteSinkRequest message. * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRange.verify = function verify(message) { + DeleteSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; return null; }; /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + DeleteSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteSinkRequest) return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } + var message = new $root.google.logging.v2.DeleteSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); return message; }; /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + DeleteSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; return object; }; /** - * Converts this ExtensionRange to JSON. + * Converts this DeleteSinkRequest to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.logging.v2.DeleteSinkRequest * @instance * @returns {Object.} JSON object */ - ExtensionRange.prototype.toJSON = function toJSON() { + DeleteSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExtensionRange; + return DeleteSinkRequest; })(); - DescriptorProto.ReservedRange = (function() { + v2.LogExclusion = (function() { /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end + * Properties of a LogExclusion. + * @memberof google.logging.v2 + * @interface ILogExclusion + * @property {string|null} [name] LogExclusion name + * @property {string|null} [description] LogExclusion description + * @property {string|null} [filter] LogExclusion filter + * @property {boolean|null} [disabled] LogExclusion disabled + * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime */ /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange + * Constructs a new LogExclusion. + * @memberof google.logging.v2 + * @classdesc Represents a LogExclusion. + * @implements ILogExclusion * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + */ + function LogExclusion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogExclusion name. + * @member {string} name + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.name = ""; + + /** + * LogExclusion description. + * @member {string} description + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.description = ""; + + /** + * LogExclusion filter. + * @member {string} filter + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.filter = ""; + + /** + * LogExclusion disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogExclusion + * @instance */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LogExclusion.prototype.disabled = false; /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange + * LogExclusion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogExclusion * @instance */ - ReservedRange.prototype.start = 0; + LogExclusion.prototype.createTime = null; /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange + * LogExclusion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogExclusion * @instance */ - ReservedRange.prototype.end = 0; + LogExclusion.prototype.updateTime = null; /** - * Creates a new ReservedRange instance using the specified properties. + * Creates a new LogExclusion instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @returns {google.logging.v2.LogExclusion} LogExclusion instance */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); + LogExclusion.create = function create(properties) { + return new LogExclusion(properties); }; /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encode = function encode(message, writer) { + LogExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReservedRange message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReservedRange.decode = function decode(reader, length) { + LogExclusion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.start = reader.int32(); + message.name = reader.string(); break; case 2: - message.end = reader.int32(); + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.disabled = reader.bool(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -23124,1467 +22243,1265 @@ }; /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { + LogExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReservedRange message. + * Verifies a LogExclusion message. * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReservedRange.verify = function verify(message) { + LogExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.logging.v2.LogExclusion} LogExclusion */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + LogExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogExclusion) return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; + var message = new $root.google.logging.v2.LogExclusion(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {google.logging.v2.LogExclusion} message LogExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; + */ + LogExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.filter = ""; + object.disabled = false; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Converts this LogExclusion to JSON. + * @function toJSON + * @memberof google.logging.v2.LogExclusion + * @instance + * @returns {Object.} JSON object + */ + LogExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return LogExclusion; + })(); - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v2.ListExclusionsRequest = (function() { - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a ListExclusionsRequest. + * @memberof google.logging.v2 + * @interface IListExclusionsRequest + * @property {string|null} [parent] ListExclusionsRequest parent + * @property {string|null} [pageToken] ListExclusionsRequest pageToken + * @property {number|null} [pageSize] ListExclusionsRequest pageSize + */ - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } + /** + * Constructs a new ListExclusionsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListExclusionsRequest. + * @implements IListExclusionsRequest + * @constructor + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + */ + function ListExclusionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return null; - }; - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * ListExclusionsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.parent = ""; - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * ListExclusionsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.pageToken = ""; - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListExclusionsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + */ + ListExclusionsRequest.prototype.pageSize = 0; - return ExtensionRangeOptions; - })(); + /** + * Creates a new ListExclusionsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance + */ + ListExclusionsRequest.create = function create(properties) { + return new ListExclusionsRequest(properties); + }; - protobuf.FieldDescriptorProto = (function() { + /** + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ + /** + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; + /** + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; + /** + * Verifies a ListExclusionsRequest message. + * @function verify + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExclusionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; + /** + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + */ + ListExclusionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsRequest) + return object; + var message = new $root.google.logging.v2.ListExclusionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; + /** + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExclusionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; + /** + * Converts this ListExclusionsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListExclusionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListExclusionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; + return ListExclusionsRequest; + })(); - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; + v2.ListExclusionsResponse = (function() { - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; + /** + * Properties of a ListExclusionsResponse. + * @memberof google.logging.v2 + * @interface IListExclusionsResponse + * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions + * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken + */ - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; + /** + * Constructs a new ListExclusionsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListExclusionsResponse. + * @implements IListExclusionsResponse + * @constructor + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + */ + function ListExclusionsResponse(properties) { + this.exclusions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; + /** + * ListExclusionsResponse exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + */ + ListExclusionsResponse.prototype.exclusions = $util.emptyArray; - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; + /** + * ListExclusionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + */ + ListExclusionsResponse.prototype.nextPageToken = ""; - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; + /** + * Creates a new ListExclusionsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance + */ + ListExclusionsResponse.create = function create(properties) { + return new ListExclusionsResponse(properties); + }; - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; + /** + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 2: - case 3: - break; + /** + * Verifies a ListExclusionsResponse message. + * @function verify + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExclusionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + if (error) + return "exclusions." + error; + } } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + */ + ListExclusionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsResponse) + return object; + var message = new $root.google.logging.v2.ListExclusionsResponse(); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); + } } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; + /** + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExclusionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exclusions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; + /** + * Converts this ListExclusionsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListExclusionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListExclusionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListExclusionsResponse; + })(); + + v2.GetExclusionRequest = (function() { + + /** + * Properties of a GetExclusionRequest. + * @memberof google.logging.v2 + * @interface IGetExclusionRequest + * @property {string|null} [name] GetExclusionRequest name + */ + + /** + * Constructs a new GetExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetExclusionRequest. + * @implements IGetExclusionRequest + * @constructor + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + */ + function GetExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * GetExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.GetExclusionRequest + * @instance + */ + GetExclusionRequest.prototype.name = ""; - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); + /** + * Creates a new GetExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance + */ + GetExclusionRequest.create = function create(properties) { + return new GetExclusionRequest(properties); + }; - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - return values; - })(); + /** + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return FieldDescriptorProto; - })(); + /** + * Verifies a GetExclusionRequest message. + * @function verify + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - protobuf.OneofDescriptorProto = (function() { + /** + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + */ + GetExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetExclusionRequest) + return object; + var message = new $root.google.logging.v2.GetExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ + /** + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this GetExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + GetExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; + return GetExclusionRequest; + })(); - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; + v2.CreateExclusionRequest = (function() { - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; + /** + * Properties of a CreateExclusionRequest. + * @memberof google.logging.v2 + * @interface ICreateExclusionRequest + * @property {string|null} [parent] CreateExclusionRequest parent + * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion + */ - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new CreateExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateExclusionRequest. + * @implements ICreateExclusionRequest + * @constructor + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + */ + function CreateExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * CreateExclusionRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + */ + CreateExclusionRequest.prototype.parent = ""; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * CreateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + */ + CreateExclusionRequest.prototype.exclusion = null; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new CreateExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance + */ + CreateExclusionRequest.create = function create(properties) { + return new CreateExclusionRequest(properties); + }; + + /** + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; + /** + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; + /** + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a CreateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; - return OneofDescriptorProto; - })(); + /** + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + */ + CreateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateExclusionRequest) + return object; + var message = new $root.google.logging.v2.CreateExclusionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + return message; + }; - protobuf.EnumDescriptorProto = (function() { + /** + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.exclusion = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + return object; + }; - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ + /** + * Converts this CreateExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return CreateExclusionRequest; + })(); - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; + v2.UpdateExclusionRequest = (function() { - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + /** + * Properties of an UpdateExclusionRequest. + * @memberof google.logging.v2 + * @interface IUpdateExclusionRequest + * @property {string|null} [name] UpdateExclusionRequest name + * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask + */ - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; + /** + * Constructs a new UpdateExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateExclusionRequest. + * @implements IUpdateExclusionRequest + * @constructor + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + */ + function UpdateExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * UpdateExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.name = ""; - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * UpdateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.exclusion = null; - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; + /** + * UpdateExclusionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.updateMask = null; - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; + /** + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance + */ + UpdateExclusionRequest.create = function create(properties) { + return new UpdateExclusionRequest(properties); + }; - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); if (error) - return "value." + error; + return "exclusion." + error; } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "reservedRange." + error; + return "updateMask." + error; } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; + return null; + }; - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + /** + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + */ + UpdateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) + return object; + var message = new $root.google.logging.v2.UpdateExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; + return message; + }; - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; + /** + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.exclusion = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this UpdateExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - EnumDescriptorProto.EnumReservedRange = (function() { + return UpdateExclusionRequest; + })(); + + v2.DeleteExclusionRequest = (function() { /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end + * Properties of a DeleteExclusionRequest. + * @memberof google.logging.v2 + * @interface IDeleteExclusionRequest + * @property {string|null} [name] DeleteExclusionRequest name */ /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange + * Constructs a new DeleteExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteExclusionRequest. + * @implements IDeleteExclusionRequest * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set */ - function EnumReservedRange(properties) { + function DeleteExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24592,88 +23509,75 @@ } /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * DeleteExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteExclusionRequest * @instance */ - EnumReservedRange.prototype.end = 0; + DeleteExclusionRequest.prototype.name = ""; /** - * Creates a new EnumReservedRange instance using the specified properties. + * Creates a new DeleteExclusionRequest instance using the specified properties. * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); + DeleteExclusionRequest.create = function create(properties) { + return new DeleteExclusionRequest(properties); }; /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumReservedRange.encode = function encode(message, writer) { + DeleteExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.DeleteExclusionRequest * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumReservedRange.decode = function decode(reader, length) { + DeleteExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -24684,2496 +23588,2721 @@ }; /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumReservedRange message. + * Verifies a DeleteExclusionRequest message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumReservedRange.verify = function verify(message) { + DeleteExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.logging.v2.DeleteExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + DeleteExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; + var message = new $root.google.logging.v2.DeleteExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteExclusionRequest; + })(); + + v2.GetCmekSettingsRequest = (function() { + + /** + * Properties of a GetCmekSettingsRequest. + * @memberof google.logging.v2 + * @interface IGetCmekSettingsRequest + * @property {string|null} [name] GetCmekSettingsRequest name + */ + + /** + * Constructs a new GetCmekSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetCmekSettingsRequest. + * @implements IGetCmekSettingsRequest + * @constructor + * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + */ + function GetCmekSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCmekSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.GetCmekSettingsRequest + * @instance + */ + GetCmekSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetCmekSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest instance + */ + GetCmekSettingsRequest.create = function create(properties) { + return new GetCmekSettingsRequest(properties); + }; + + /** + * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCmekSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCmekSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetCmekSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } return message; }; /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetCmekSettingsRequest * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; + GetCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object + * Verifies a GetCmekSettingsRequest message. + * @function verify + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + GetCmekSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; }; - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; + /** + * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + */ + GetCmekSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetCmekSettingsRequest) + return object; + var message = new $root.google.logging.v2.GetCmekSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; + /** + * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.GetCmekSettingsRequest} message GetCmekSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCmekSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this GetCmekSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetCmekSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetCmekSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return EnumValueDescriptorProto; - })(); + return GetCmekSettingsRequest; + })(); - protobuf.ServiceDescriptorProto = (function() { + v2.UpdateCmekSettingsRequest = (function() { - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ + /** + * Properties of an UpdateCmekSettingsRequest. + * @memberof google.logging.v2 + * @interface IUpdateCmekSettingsRequest + * @property {string|null} [name] UpdateCmekSettingsRequest name + * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] UpdateCmekSettingsRequest cmekSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmekSettingsRequest updateMask + */ - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new UpdateCmekSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateCmekSettingsRequest. + * @implements IUpdateCmekSettingsRequest + * @constructor + * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + */ + function UpdateCmekSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; + /** + * UpdateCmekSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.name = ""; - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + /** + * UpdateCmekSettingsRequest cmekSettings. + * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.cmekSettings = null; - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; + /** + * UpdateCmekSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.updateMask = null; - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; + /** + * Creates a new UpdateCmekSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest instance + */ + UpdateCmekSettingsRequest.create = function create(properties) { + return new UpdateCmekSettingsRequest(properties); + }; - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCmekSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cmekSettings != null && Object.hasOwnProperty.call(message, "cmekSettings")) + $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCmekSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + /** + * Verifies an UpdateCmekSettingsRequest message. + * @function verify + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCmekSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { + var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); if (error) - return "method." + error; + return "cmekSettings." + error; } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + /** + * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + */ + UpdateCmekSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateCmekSettingsRequest) + return object; + var message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cmekSettings != null) { + if (typeof object.cmekSettings !== "object") + throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.cmekSettings: object expected"); + message.cmekSettings = $root.google.logging.v2.CmekSettings.fromObject(object.cmekSettings); } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; + /** + * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.UpdateCmekSettingsRequest} message UpdateCmekSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCmekSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.cmekSettings = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) + object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this UpdateCmekSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCmekSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ServiceDescriptorProto; - })(); + return UpdateCmekSettingsRequest; + })(); - protobuf.MethodDescriptorProto = (function() { + v2.CmekSettings = (function() { - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ + /** + * Properties of a CmekSettings. + * @memberof google.logging.v2 + * @interface ICmekSettings + * @property {string|null} [name] CmekSettings name + * @property {string|null} [kmsKeyName] CmekSettings kmsKeyName + * @property {string|null} [serviceAccountId] CmekSettings serviceAccountId + */ - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new CmekSettings. + * @memberof google.logging.v2 + * @classdesc Represents a CmekSettings. + * @implements ICmekSettings + * @constructor + * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + */ + function CmekSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; + /** + * CmekSettings name. + * @member {string} name + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.name = ""; - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; + /** + * CmekSettings kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.kmsKeyName = ""; - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; + /** + * CmekSettings serviceAccountId. + * @member {string} serviceAccountId + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.serviceAccountId = ""; - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; + /** + * Creates a new CmekSettings instance using the specified properties. + * @function create + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + * @returns {google.logging.v2.CmekSettings} CmekSettings instance + */ + CmekSettings.create = function create(properties) { + return new CmekSettings(properties); + }; - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; + /** + * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmekSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.serviceAccountId != null && Object.hasOwnProperty.call(message, "serviceAccountId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountId); + return writer; + }; - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; + /** + * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmekSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; + /** + * Decodes a CmekSettings message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CmekSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CmekSettings} CmekSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmekSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CmekSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.kmsKeyName = reader.string(); + break; + case 3: + message.serviceAccountId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; + /** + * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CmekSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CmekSettings} CmekSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmekSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a CmekSettings message. + * @function verify + * @memberof google.logging.v2.CmekSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CmekSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + if (!$util.isString(message.serviceAccountId)) + return "serviceAccountId: string expected"; + return null; + }; - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CmekSettings + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CmekSettings} CmekSettings + */ + CmekSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CmekSettings) + return object; + var message = new $root.google.logging.v2.CmekSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.serviceAccountId != null) + message.serviceAccountId = String(object.serviceAccountId); + return message; + }; + + /** + * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.CmekSettings} message CmekSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CmekSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.kmsKeyName = ""; + object.serviceAccountId = ""; } - } - return message; - }; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + object.serviceAccountId = message.serviceAccountId; + return object; + }; - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this CmekSettings to JSON. + * @function toJSON + * @memberof google.logging.v2.CmekSettings + * @instance + * @returns {Object.} JSON object + */ + CmekSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; + return CmekSettings; + })(); - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; + v2.MetricsServiceV2 = (function() { - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + /** + * Constructs a new MetricsServiceV2 service. + * @memberof google.logging.v2 + * @classdesc Represents a MetricsServiceV2 + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MetricsServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + (MetricsServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsServiceV2; - return MethodDescriptorProto; - })(); + /** + * Creates new MetricsServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.MetricsServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MetricsServiceV2} RPC service. Useful where requests and/or responses are streamed. + */ + MetricsServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - protobuf.FileOptions = (function() { + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef ListLogMetricsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogMetricsResponse} [response] ListLogMetricsResponse + */ - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ + /** + * Calls ListLogMetrics. + * @function listLogMetrics + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.ListLogMetricsCallback} callback Node-style callback called with the error, if any, and ListLogMetricsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.listLogMetrics = function listLogMetrics(request, callback) { + return this.rpcCall(listLogMetrics, $root.google.logging.v2.ListLogMetricsRequest, $root.google.logging.v2.ListLogMetricsResponse, request, callback); + }, "name", { value: "ListLogMetrics" }); - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls ListLogMetrics. + * @function listLogMetrics + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef GetLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; + /** + * Calls GetLogMetric. + * @function getLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.GetLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.getLogMetric = function getLogMetric(request, callback) { + return this.rpcCall(getLogMetric, $root.google.logging.v2.GetLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "GetLogMetric" }); - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; + /** + * Calls GetLogMetric. + * @function getLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef CreateLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * Calls CreateLogMetric. + * @function createLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.CreateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.createLogMetric = function createLogMetric(request, callback) { + return this.rpcCall(createLogMetric, $root.google.logging.v2.CreateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "CreateLogMetric" }); - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * Calls CreateLogMetric. + * @function createLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef UpdateLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric + */ + + /** + * Calls UpdateLogMetric. + * @function updateLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.updateLogMetric = function updateLogMetric(request, callback) { + return this.rpcCall(updateLogMetric, $root.google.logging.v2.UpdateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "UpdateLogMetric" }); + + /** + * Calls UpdateLogMetric. + * @function updateLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef DeleteLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + /** + * Calls DeleteLogMetric. + * @function deleteLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.deleteLogMetric = function deleteLogMetric(request, callback) { + return this.rpcCall(deleteLogMetric, $root.google.logging.v2.DeleteLogMetricRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLogMetric" }); - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + /** + * Calls DeleteLogMetric. + * @function deleteLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; + return MetricsServiceV2; + })(); - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + v2.LogMetric = (function() { - /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = false; + /** + * Properties of a LogMetric. + * @memberof google.logging.v2 + * @interface ILogMetric + * @property {string|null} [name] LogMetric name + * @property {string|null} [description] LogMetric description + * @property {string|null} [filter] LogMetric filter + * @property {google.api.IMetricDescriptor|null} [metricDescriptor] LogMetric metricDescriptor + * @property {string|null} [valueExtractor] LogMetric valueExtractor + * @property {Object.|null} [labelExtractors] LogMetric labelExtractors + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] LogMetric bucketOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogMetric createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogMetric updateTime + * @property {google.logging.v2.LogMetric.ApiVersion|null} [version] LogMetric version + */ - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * Constructs a new LogMetric. + * @memberof google.logging.v2 + * @classdesc Represents a LogMetric. + * @implements ILogMetric + * @constructor + * @param {google.logging.v2.ILogMetric=} [properties] Properties to set + */ + function LogMetric(properties) { + this.labelExtractors = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; + /** + * LogMetric name. + * @member {string} name + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.name = ""; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + /** + * LogMetric description. + * @member {string} description + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.description = ""; - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + /** + * LogMetric filter. + * @member {string} filter + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.filter = ""; - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + /** + * LogMetric metricDescriptor. + * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.metricDescriptor = null; - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; + /** + * LogMetric valueExtractor. + * @member {string} valueExtractor + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.valueExtractor = ""; - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; + /** + * LogMetric labelExtractors. + * @member {Object.} labelExtractors + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.labelExtractors = $util.emptyObject; - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; + /** + * LogMetric bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.bucketOptions = null; - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; + /** + * LogMetric createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.createTime = null; - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * LogMetric updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.updateTime = null; - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + /** + * LogMetric version. + * @member {google.logging.v2.LogMetric.ApiVersion} version + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.version = 0; - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; + /** + * Creates a new LogMetric instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric=} [properties] Properties to set + * @returns {google.logging.v2.LogMetric} LogMetric instance + */ + LogMetric.create = function create(properties) { + return new LogMetric(properties); + }; - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogMetric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); + if (message.metricDescriptor != null && Object.hasOwnProperty.call(message, "metricDescriptor")) + $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.valueExtractor != null && Object.hasOwnProperty.call(message, "valueExtractor")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueExtractor); + if (message.labelExtractors != null && Object.hasOwnProperty.call(message, "labelExtractors")) + for (var keys = Object.keys(message.labelExtractors), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labelExtractors[keys[i]]).ldelim(); + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a LogMetric message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogMetric} LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 5: + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + break; + case 6: + message.valueExtractor = reader.string(); + break; + case 7: + if (message.labelExtractors === $util.emptyObject) + message.labelExtractors = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labelExtractors[key] = value; + break; + case 8: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 9: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.version = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogMetric} LogMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; + /** + * Verifies a LogMetric message. + * @function verify + * @memberof google.logging.v2.LogMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogMetric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); + if (error) + return "metricDescriptor." + error; } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - if (typeof message.phpGenericServices !== "boolean") - return "phpGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + if (!$util.isString(message.valueExtractor)) + return "valueExtractor: string expected"; + if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) { + if (!$util.isObject(message.labelExtractors)) + return "labelExtractors: object expected"; + var key = Object.keys(message.labelExtractors); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labelExtractors[key[i]])) + return "labelExtractors: string{k:string} expected"; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); if (error) - return "uninterpretedOption." + error; + return "bucketOptions." + error; } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return ".google.api.resourceDefinition." + error; + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.version != null && message.hasOwnProperty("version")) + switch (message.version) { + default: + return "version: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogMetric + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogMetric} LogMetric + */ + LogMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogMetric) + return object; + var message = new $root.google.logging.v2.LogMetric(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.metricDescriptor != null) { + if (typeof object.metricDescriptor !== "object") + throw TypeError(".google.logging.v2.LogMetric.metricDescriptor: object expected"); + message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); + } + if (object.valueExtractor != null) + message.valueExtractor = String(object.valueExtractor); + if (object.labelExtractors) { + if (typeof object.labelExtractors !== "object") + throw TypeError(".google.logging.v2.LogMetric.labelExtractors: object expected"); + message.labelExtractors = {}; + for (var keys = Object.keys(object.labelExtractors), i = 0; i < keys.length; ++i) + message.labelExtractors[keys[i]] = String(object.labelExtractors[keys[i]]); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.logging.v2.LogMetric.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogMetric.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogMetric.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - } - return null; - }; + switch (object.version) { + case "V2": + case 0: + message.version = 0; + break; + case "V1": + case 1: + message.version = 1; + break; + } + return message; + }; - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.phpGenericServices != null) - message.phpGenericServices = Boolean(object.phpGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogMetric + * @static + * @param {google.logging.v2.LogMetric} message LogMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labelExtractors = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.filter = ""; + object.version = options.enums === String ? "V2" : 0; + object.metricDescriptor = null; + object.valueExtractor = ""; + object.bucketOptions = null; + object.createTime = null; + object.updateTime = null; } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.version != null && message.hasOwnProperty("version")) + object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + object.valueExtractor = message.valueExtractor; + var keys2; + if (message.labelExtractors && (keys2 = Object.keys(message.labelExtractors)).length) { + object.labelExtractors = {}; + for (var j = 0; j < keys2.length; ++j) + object.labelExtractors[keys2[j]] = message.labelExtractors[keys2[j]]; } - } - return message; - }; + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpGenericServices = false; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + /** + * Converts this LogMetric to JSON. + * @function toJSON + * @memberof google.logging.v2.LogMetric + * @instance + * @returns {Object.} JSON object + */ + LogMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ApiVersion enum. + * @name google.logging.v2.LogMetric.ApiVersion + * @enum {number} + * @property {number} V2=0 V2 value + * @property {number} V1=1 V1 value + */ + LogMetric.ApiVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "V2"] = 0; + values[valuesById[1] = "V1"] = 1; + return values; + })(); + + return LogMetric; + })(); + + v2.ListLogMetricsRequest = (function() { + + /** + * Properties of a ListLogMetricsRequest. + * @memberof google.logging.v2 + * @interface IListLogMetricsRequest + * @property {string|null} [parent] ListLogMetricsRequest parent + * @property {string|null} [pageToken] ListLogMetricsRequest pageToken + * @property {number|null} [pageSize] ListLogMetricsRequest pageSize + */ + + /** + * Constructs a new ListLogMetricsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogMetricsRequest. + * @implements IListLogMetricsRequest + * @constructor + * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + */ + function ListLogMetricsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return object; - }; - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListLogMetricsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.parent = ""; - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); + /** + * ListLogMetricsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.pageToken = ""; - return FileOptions; - })(); + /** + * ListLogMetricsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.pageSize = 0; - protobuf.MessageOptions = (function() { + /** + * Creates a new ListLogMetricsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest instance + */ + ListLogMetricsRequest.create = function create(properties) { + return new ListLogMetricsRequest(properties); + }; - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ + /** + * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLogMetricsRequest message. + * @function verify + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogMetricsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + */ + ListLogMetricsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogMetricsRequest) + return object; + var message = new $root.google.logging.v2.ListLogMetricsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.ListLogMetricsRequest} message ListLogMetricsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogMetricsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this ListLogMetricsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLogMetricsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + return ListLogMetricsRequest; + })(); - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + v2.ListLogMetricsResponse = (function() { - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * Properties of a ListLogMetricsResponse. + * @memberof google.logging.v2 + * @interface IListLogMetricsResponse + * @property {Array.|null} [metrics] ListLogMetricsResponse metrics + * @property {string|null} [nextPageToken] ListLogMetricsResponse nextPageToken + */ - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + /** + * Constructs a new ListLogMetricsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogMetricsResponse. + * @implements IListLogMetricsResponse + * @constructor + * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + */ + function ListLogMetricsResponse(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * ListLogMetricsResponse metrics. + * @member {Array.} metrics + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + */ + ListLogMetricsResponse.prototype.metrics = $util.emptyArray; - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; + /** + * ListLogMetricsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + */ + ListLogMetricsResponse.prototype.nextPageToken = ""; - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; + /** + * Creates a new ListLogMetricsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse instance + */ + ListLogMetricsResponse.create = function create(properties) { + return new ListLogMetricsResponse(properties); + }; - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.logging.v2.LogMetric.encode(message.metrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + /** + * Verifies a ListLogMetricsResponse message. + * @function verify + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogMetricsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.logging.v2.LogMetric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + */ + ListLogMetricsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogMetricsResponse) + return object; + var message = new $root.google.logging.v2.ListLogMetricsResponse(); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: object expected"); + message.metrics[i] = $root.google.logging.v2.LogMetric.fromObject(object.metrics[i]); + } } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + /** + * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.ListLogMetricsResponse} message ListLogMetricsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogMetricsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.logging.v2.LogMetric.toObject(message.metrics[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListLogMetricsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLogMetricsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLogMetricsResponse; + })(); + + v2.GetLogMetricRequest = (function() { + + /** + * Properties of a GetLogMetricRequest. + * @memberof google.logging.v2 + * @interface IGetLogMetricRequest + * @property {string|null} [metricName] GetLogMetricRequest metricName + */ + + /** + * Constructs a new GetLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetLogMetricRequest. + * @implements IGetLogMetricRequest + * @constructor + * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + */ + function GetLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * GetLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.GetLogMetricRequest + * @instance + */ + GetLogMetricRequest.prototype.metricName = ""; - return MessageOptions; - })(); + /** + * Creates a new GetLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest instance + */ + GetLogMetricRequest.create = function create(properties) { + return new GetLogMetricRequest(properties); + }; - protobuf.FieldOptions = (function() { + /** + * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ + /** + * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metricName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; + /** + * Verifies a GetLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + /** + * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + */ + GetLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetLogMetricRequest) + return object; + var message = new $root.google.logging.v2.GetLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + /** + * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.GetLogMetricRequest} message GetLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Converts this GetLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + GetLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetLogMetricRequest; + })(); - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + v2.CreateLogMetricRequest = (function() { - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Properties of a CreateLogMetricRequest. + * @memberof google.logging.v2 + * @interface ICreateLogMetricRequest + * @property {string|null} [parent] CreateLogMetricRequest parent + * @property {google.logging.v2.ILogMetric|null} [metric] CreateLogMetricRequest metric + */ - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + /** + * Constructs a new CreateLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateLogMetricRequest. + * @implements ICreateLogMetricRequest + * @constructor + * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + */ + function CreateLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * CreateLogMetricRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + */ + CreateLogMetricRequest.prototype.parent = ""; - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; + /** + * CreateLogMetricRequest metric. + * @member {google.logging.v2.ILogMetric|null|undefined} metric + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + */ + CreateLogMetricRequest.prototype.metric = null; - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; + /** + * Creates a new CreateLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest instance + */ + CreateLogMetricRequest.create = function create(properties) { + return new CreateLogMetricRequest(properties); + }; - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; + /** + * Verifies a CreateLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.logging.v2.LogMetric.verify(message.metric); + if (error) + return "metric." + error; } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; + return null; + }; + + /** + * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + */ + CreateLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateLogMetricRequest) + return object; + var message = new $root.google.logging.v2.CreateLogMetricRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.logging.v2.CreateLogMetricRequest.metric: object expected"); + message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + return message; + }; + + /** + * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.CreateLogMetricRequest} message CreateLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.metric = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); + return object; + }; + + /** + * Converts this CreateLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateLogMetricRequest; + })(); + + v2.UpdateLogMetricRequest = (function() { + + /** + * Properties of an UpdateLogMetricRequest. + * @memberof google.logging.v2 + * @interface IUpdateLogMetricRequest + * @property {string|null} [metricName] UpdateLogMetricRequest metricName + * @property {google.logging.v2.ILogMetric|null} [metric] UpdateLogMetricRequest metric + */ + + /** + * Constructs a new UpdateLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateLogMetricRequest. + * @implements IUpdateLogMetricRequest + * @constructor + * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + */ + function UpdateLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: + + /** + * UpdateLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + */ + UpdateLogMetricRequest.prototype.metricName = ""; + + /** + * UpdateLogMetricRequest metric. + * @member {google.logging.v2.ILogMetric|null|undefined} metric + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + */ + UpdateLogMetricRequest.prototype.metric = null; + + /** + * Creates a new UpdateLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest instance + */ + UpdateLogMetricRequest.create = function create(properties) { + return new UpdateLogMetricRequest(properties); + }; + + /** + * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: + message.metricName = reader.string(); + break; case 2: - case 3: - case 4: - case 5: - case 6: + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); break; } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; + } + return message; + }; - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.logging.v2.LogMetric.verify(message.metric); + if (error) + return "metric." + error; + } + return null; + }; + + /** + * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + */ + UpdateLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateLogMetricRequest) + return object; + var message = new $root.google.logging.v2.UpdateLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.logging.v2.UpdateLogMetricRequest.metric: object expected"); + message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); + } + return message; + }; + + /** + * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.UpdateLogMetricRequest} message UpdateLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricName = ""; + object.metric = null; } + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); + return object; + }; + + /** + * Converts this UpdateLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateLogMetricRequest; + })(); + + v2.DeleteLogMetricRequest = (function() { + + /** + * Properties of a DeleteLogMetricRequest. + * @memberof google.logging.v2 + * @interface IDeleteLogMetricRequest + * @property {string|null} [metricName] DeleteLogMetricRequest metricName + */ + + /** + * Constructs a new DeleteLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteLogMetricRequest. + * @implements IDeleteLogMetricRequest + * @constructor + * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + */ + function DeleteLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": + + /** + * DeleteLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.DeleteLogMetricRequest + * @instance + */ + DeleteLogMetricRequest.prototype.metricName = ""; + + /** + * Creates a new DeleteLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest instance + */ + DeleteLogMetricRequest.create = function create(properties) { + return new DeleteLogMetricRequest(properties); + }; + + /** + * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; + message.metricName = reader.string(); break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; + default: + reader.skipType(tag & 7); break; } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a DeleteLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); + /** + * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + */ + DeleteLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogMetricRequest) + return object; + var message = new $root.google.logging.v2.DeleteLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; + /** + * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.DeleteLogMetricRequest} message DeleteLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this DeleteLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteLogMetricRequest; })(); - return FieldOptions; + return v2; })(); - protobuf.OneofOptions = (function() { + return logging; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function OneofOptions(properties) { - this.uninterpretedOption = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27181,78 +26310,91 @@ } /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + Http.prototype.rules = $util.emptyArray; /** - * Creates a new OneofOptions instance using the specified properties. + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.protobuf.OneofOptions + * @memberof google.api.Http * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofOptions + * @memberof google.api.Http * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.api.Http * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofOptions + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofOptions.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -27263,232 +26405,353 @@ }; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofOptions message. + * Verifies a Http message. * @function verify - * @memberof google.protobuf.OneofOptions + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OneofOptions.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); if (error) - return "uninterpretedOption." + error; + return "rules." + error; } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofOptions + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.api.Http} Http */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); } } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofOptions + * @memberof google.api.Http * @static - * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule * @instance - * @returns {Object.} JSON object */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { + HttpRule.prototype.patch = null; /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance */ + HttpRule.prototype.custom = null; /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + HttpRule.prototype.body = ""; /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule * @instance */ - EnumOptions.prototype.allowAlias = false; + HttpRule.prototype.responseBody = ""; /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - EnumOptions.prototype.deprecated = false; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; case 2: - message.allowAlias = reader.bool(); + message.get = reader.string(); break; case 3: - message.deprecated = reader.bool(); + message.put = reader.string(); break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -27499,144 +26762,240 @@ }; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumOptions message. + * Verifies a HttpRule message. * @function verify - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); if (error) - return "uninterpretedOption." + error; + return "additionalBindings." + error; } } return null; }; /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.api.HttpRule} HttpRule */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); } } return message; }; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.uninterpretedOption = []; + object.additionalBindings = []; if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this EnumOptions to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumOptions; + return HttpRule; })(); - protobuf.EnumValueOptions = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27644,91 +27003,88 @@ } /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - EnumValueOptions.prototype.deprecated = false; + CustomHttpPattern.prototype.kind = ""; /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deprecated = reader.bool(); + message.kind = reader.string(); break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -27739,137 +27095,146 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (options.defaults) { + object.kind = ""; + object.path = ""; } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumValueOptions; + return CustomHttpPattern; })(); - protobuf.ServiceOptions = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + api.MonitoredResourceDescriptor = (function() { /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * Properties of a MonitoredResourceDescriptor. + * @memberof google.api + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage */ /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * Constructs a new MonitoredResourceDescriptor. + * @memberof google.api + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; + function MonitoredResourceDescriptor(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27877,117 +27242,143 @@ } /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ServiceOptions.prototype.deprecated = false; + MonitoredResourceDescriptor.prototype.name = ""; /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + MonitoredResourceDescriptor.prototype.type = ""; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + MonitoredResourceDescriptor.prototype.displayName = ""; /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + MonitoredResourceDescriptor.prototype.description = ""; /** - * Creates a new ServiceOptions instance using the specified properties. + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + MonitoredResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + MonitoredResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); + case 5: + message.name = reader.string(); break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 1: + message.type = reader.string(); break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); + case 4: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 7: + message.launchStage = reader.int32(); break; default: reader.skipType(tag & 7); @@ -27998,156 +27389,211 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies a MonitoredResourceDescriptor message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + MonitoredResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); if (error) - return "uninterpretedOption." + error; + return "labels." + error; } } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); } } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } return message; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + MonitoredResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.uninterpretedOption = []; + object.labels = []; if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.api.MonitoredResourceDescriptor * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceOptions; + return MonitoredResourceDescriptor; })(); - protobuf.MethodOptions = (function() { + api.MonitoredResource = (function() { /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * Properties of a MonitoredResource. + * @memberof google.api + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels */ /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * Constructs a new MonitoredResource. + * @memberof google.api + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.api.IMonitoredResource=} [properties] Properties to set */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; + function MonitoredResource(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28155,133 +27601,108 @@ } /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + MonitoredResource.prototype.type = ""; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + MonitoredResource.prototype.labels = $util.emptyObject; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.api.MonitoredResource * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.api.MonitoredResource * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MonitoredResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.api.MonitoredResource * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + MonitoredResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + case 1: + message.type = reader.string(); break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); + case 2: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; default: reader.skipType(tag & 7); @@ -28292,217 +27713,132 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies a MonitoredResource message. * @function verify - * @memberof google.protobuf.MethodOptions + * @memberof google.api.MonitoredResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + MonitoredResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.api.MonitoredResource * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.api.MonitoredResource} MonitoredResource */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.MonitoredResource} message MonitoredResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this MethodOptions to JSON. + * Converts this MonitoredResource to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.api.MonitoredResource * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + MonitoredResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; + return MonitoredResource; })(); - protobuf.UninterpretedOption = (function() { + api.MonitoredResourceMetadata = (function() { /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + * Properties of a MonitoredResourceMetadata. + * @memberof google.api + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels */ /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * Constructs a new MonitoredResourceMetadata. + * @memberof google.api + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28510,156 +27846,108 @@ } /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + MonitoredResourceMetadata.prototype.systemLabels = null; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + MonitoredResourceMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + MonitoredResourceMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); + case 1: + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; - case 8: - message.aggregateValue = reader.string(); + case 2: + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.userLabels[key] = value; break; default: reader.skipType(tag & 7); @@ -28670,422 +27958,435 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies a MonitoredResourceMetadata message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + MonitoredResourceMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + MonitoredResourceMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.api.MonitoredResourceMetadata * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - UninterpretedOption.NamePart = (function() { + return MonitoredResourceMetadata; + })(); - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ + api.LabelDescriptor = (function() { - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a LabelDescriptor. + * @memberof google.api + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description + */ - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; + /** + * Constructs a new LabelDescriptor. + * @memberof google.api + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor + * @constructor + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + */ + function LabelDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; + /** + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.key = ""; - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; + /** + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.valueType = 0; - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; + /** + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.description = ""; - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @function create + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance + */ + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); + }; - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.valueType = reader.int32(); + break; + case 3: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; + /** + * Verifies a LabelDescriptor message. + * @function verify + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.LabelDescriptor} LabelDescriptor + */ + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) return object; - }; + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; - return NamePart; + /** + * Converts this LabelDescriptor to JSON. + * @function toJSON + * @memberof google.api.LabelDescriptor + * @instance + * @returns {Object.} JSON object + */ + LabelDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; })(); - return UninterpretedOption; + return LabelDescriptor; })(); - protobuf.SourceCodeInfo = (function() { + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29093,78 +28394,167 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); break; default: reader.skipType(tag & 7); @@ -29175,467 +28565,463 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } } return null; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } } return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } + return object; + }; - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; + return ResourceDescriptor; + })(); - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + api.ResourceReference = (function() { - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - }; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; - return Location; - })(); + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SourceCodeInfo; + return ResourceReference; })(); - protobuf.GeneratedCodeInfo = (function() { + api.Distribution = (function() { /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * Properties of a Distribution. + * @memberof google.api + * @interface IDistribution + * @property {number|Long|null} [count] Distribution count + * @property {number|null} [mean] Distribution mean + * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation + * @property {google.api.Distribution.IRange|null} [range] Distribution range + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions + * @property {Array.|null} [bucketCounts] Distribution bucketCounts + * @property {Array.|null} [exemplars] Distribution exemplars */ /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * Constructs a new Distribution. + * @memberof google.api + * @classdesc Represents a Distribution. + * @implements IDistribution * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.api.IDistribution=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function Distribution(properties) { + this.bucketCounts = []; + this.exemplars = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29643,78 +29029,167 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * Distribution count. + * @member {number|Long} count + * @memberof google.api.Distribution * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Distribution mean. + * @member {number} mean + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.mean = 0; + + /** + * Distribution sumOfSquaredDeviation. + * @member {number} sumOfSquaredDeviation + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.sumOfSquaredDeviation = 0; + + /** + * Distribution range. + * @member {google.api.Distribution.IRange|null|undefined} range + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.range = null; + + /** + * Distribution bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketOptions = null; + + /** + * Distribution bucketCounts. + * @member {Array.} bucketCounts + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketCounts = $util.emptyArray; + + /** + * Distribution exemplars. + * @member {Array.} exemplars + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.exemplars = $util.emptyArray; + + /** + * Creates a new Distribution instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.api.IDistribution=} [properties] Properties to set + * @returns {google.api.Distribution} Distribution instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + Distribution.create = function create(properties) { + return new Distribution(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.api.IDistribution} message Distribution message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + Distribution.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); + if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.int64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.api.IDistribution} message Distribution message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + Distribution.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a Distribution message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.api.Distribution} Distribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decode = function decode(reader, length) { + Distribution.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + message.count = reader.int64(); + break; + case 2: + message.mean = reader.double(); + break; + case 3: + message.sumOfSquaredDeviation = reader.double(); + break; + case 4: + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + case 6: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else + message.bucketCounts.push(reader.int64()); + break; + case 10: + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -29725,125 +29200,219 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Distribution message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.api.Distribution} Distribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + Distribution.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a Distribution message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GeneratedCodeInfo.verify = function verify(message) { + Distribution.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (typeof message.sumOfSquaredDeviation !== "number") + return "sumOfSquaredDeviation: number expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.api.Distribution.Range.verify(message.range); + if (error) + return "range." + error; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); if (error) - return "annotation." + error; + return "exemplars." + error; } } return null; }; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.api.Distribution} Distribution */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + var message = new $root.google.api.Distribution(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.sumOfSquaredDeviation != null) + message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.api.Distribution.range: object expected"); + message.range = $root.google.api.Distribution.Range.fromObject(object.range); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.api.Distribution.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".google.api.Distribution.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".google.api.Distribution.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".google.api.Distribution.exemplars: object expected"); + message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); } } return message; }; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a Distribution message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.api.Distribution} message Distribution * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + Distribution.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.mean = 0; + object.sumOfSquaredDeviation = 0; + object.range = null; + object.bucketOptions = null; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.api.Distribution.Range.toObject(message.range, options); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); } return object; }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this Distribution to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Distribution * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + Distribution.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - GeneratedCodeInfo.Annotation = (function() { + Distribution.Range = (function() { /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end + * Properties of a Range. + * @memberof google.api.Distribution + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max */ /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation + * Constructs a new Range. + * @memberof google.api.Distribution + * @classdesc Represents a Range. + * @implements IRange * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @param {google.api.Distribution.IRange=} [properties] Properties to set */ - function Annotation(properties) { - this.path = []; + function Range(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29851,125 +29420,88 @@ } /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * Range min. + * @member {number} min + * @memberof google.api.Distribution.Range * @instance */ - Annotation.prototype.begin = 0; + Range.prototype.min = 0; /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * Range max. + * @member {number} max + * @memberof google.api.Distribution.Range * @instance */ - Annotation.prototype.end = 0; + Range.prototype.max = 0; /** - * Creates a new Annotation instance using the specified properties. + * Creates a new Range instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @returns {google.api.Distribution.Range} Range instance */ - Annotation.create = function create(properties) { - return new Annotation(properties); + Range.create = function create(properties) { + return new Range(properties); }; /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {google.api.Distribution.IRange} message Range message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encode = function encode(message, writer) { + Range.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); return writer; }; /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {google.api.Distribution.IRange} message Range message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { + Range.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a Range message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @returns {google.api.Distribution.Range} Range * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Annotation.decode = function decode(reader, length) { + Range.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); + message.min = reader.double(); break; case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); + message.max = reader.double(); break; default: reader.skipType(tag & 7); @@ -29980,1495 +29512,1556 @@ }; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a Range message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @returns {google.api.Distribution.Range} Range * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Annotation.decodeDelimited = function decodeDelimited(reader) { + Range.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Annotation message. + * Verifies a Range message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Annotation.verify = function verify(message) { + Range.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; return null; }; /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * Creates a Range message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @returns {google.api.Distribution.Range} Range */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Range) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; + var message = new $root.google.api.Distribution.Range(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); return message; }; /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * Creates a plain object from a Range message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {google.api.Distribution.Range} message Range * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Annotation.toObject = function toObject(message, options) { + Range.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.path = []; if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; + object.min = 0; + object.max = 0; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; return object; }; /** - * Converts this Annotation to JSON. + * Converts this Range to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.api.Distribution.Range * @instance * @returns {Object.} JSON object */ - Annotation.prototype.toJSON = function toJSON() { + Range.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Annotation; + return Range; })(); - return GeneratedCodeInfo; - })(); - - protobuf.Struct = (function() { - - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ - - /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct - * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set - */ - function Struct(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. - * @function create - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance - */ - Struct.create = function create(properties) { - return new Struct(properties); - }; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; + Distribution.BucketOptions = (function() { - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a BucketOptions. + * @memberof google.api.Distribution + * @interface IBucketOptions + * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets + * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets + * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + */ - /** - * Decodes a Struct message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new BucketOptions. + * @memberof google.api.Distribution + * @classdesc Represents a BucketOptions. + * @implements IBucketOptions + * @constructor + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + */ + function BucketOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * BucketOptions linearBuckets. + * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.linearBuckets = null; + + /** + * BucketOptions exponentialBuckets. + * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.exponentialBuckets = null; - /** - * Verifies a Struct message. - * @function verify - * @memberof google.protobuf.Struct - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Struct.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; + /** + * BucketOptions explicitBuckets. + * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.explicitBuckets = null; - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Struct - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct - */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) - return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.Struct} message Struct - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Struct.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } - return object; - }; + /** + * BucketOptions options. + * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + Object.defineProperty(BucketOptions.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Converts this Struct to JSON. - * @function toJSON - * @memberof google.protobuf.Struct - * @instance - * @returns {Object.} JSON object - */ - Struct.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new BucketOptions instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + */ + BucketOptions.create = function create(properties) { + return new BucketOptions(properties); + }; - return Struct; - })(); + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) + $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) + $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) + $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - protobuf.Value = (function() { + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue - */ + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + break; + case 2: + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + break; + case 3: + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BucketOptions message. + * @function verify + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BucketOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); + if (error) + return "linearBuckets." + error; + } + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); + if (error) + return "exponentialBuckets." + error; + } + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); + if (error) + return "explicitBuckets." + error; + } + } + return null; + }; - /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions} BucketOptions + */ + BucketOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions) + return object; + var message = new $root.google.api.Distribution.BucketOptions(); + if (object.linearBuckets != null) { + if (typeof object.linearBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); + } + if (object.exponentialBuckets != null) { + if (typeof object.exponentialBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); + } + if (object.explicitBuckets != null) { + if (typeof object.explicitBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + } + return message; + }; - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BucketOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); + if (options.oneofs) + object.options = "linearBuckets"; + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); + if (options.oneofs) + object.options = "exponentialBuckets"; + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); + if (options.oneofs) + object.options = "explicitBuckets"; + } + return object; + }; - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; + /** + * Converts this BucketOptions to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions + * @instance + * @returns {Object.} JSON object + */ + BucketOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; + BucketOptions.Linear = (function() { - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; + /** + * Properties of a Linear. + * @memberof google.api.Distribution.BucketOptions + * @interface ILinear + * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets + * @property {number|null} [width] Linear width + * @property {number|null} [offset] Linear offset + */ - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; + /** + * Constructs a new Linear. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents a Linear. + * @implements ILinear + * @constructor + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + */ + function Linear(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; + /** + * Linear numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.numFiniteBuckets = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Linear width. + * @member {number} width + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.width = 0; - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Linear offset. + * @member {number} offset + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.offset = 0; - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; + /** + * Creates a new Linear instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance + */ + Linear.create = function create(properties) { + return new Linear(properties); + }; - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); + return writer; + }; - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nullValue = reader.int32(); - break; - case 2: - message.numberValue = reader.double(); - break; - case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a Linear message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.width = reader.double(); + break; + case 3: + message.offset = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Value message. - * @function verify - * @memberof google.protobuf.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } - return null; - }; + /** + * Verifies a Linear message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Linear.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset !== "number") + return "offset: number expected"; + return null; + }; + + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + */ + Linear.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Linear(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.width != null) + message.width = Number(object.width); + if (object.offset != null) + message.offset = Number(object.offset); + return message; + }; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.Linear} message Linear + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Linear.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.width = 0; + object.offset = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; + return object; + }; - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) - return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } - return message; - }; + /** + * Converts this Linear to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + * @returns {Object.} JSON object + */ + Linear.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; + return Linear; + })(); - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.protobuf.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + BucketOptions.Exponential = (function() { - return Value; - })(); + /** + * Properties of an Exponential. + * @memberof google.api.Distribution.BucketOptions + * @interface IExponential + * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets + * @property {number|null} [growthFactor] Exponential growthFactor + * @property {number|null} [scale] Exponential scale + */ - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); + /** + * Constructs a new Exponential. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Exponential. + * @implements IExponential + * @constructor + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + */ + function Exponential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.ListValue = (function() { + /** + * Exponential numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.numFiniteBuckets = 0; - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ + /** + * Exponential growthFactor. + * @member {number} growthFactor + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.growthFactor = 0; - /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue - * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set - */ - function ListValue(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Exponential scale. + * @member {number} scale + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.scale = 0; + + /** + * Creates a new Exponential instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance + */ + Exponential.create = function create(properties) { + return new Exponential(properties); + }; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); + return writer; + }; + + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exponential message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.growthFactor = reader.double(); + break; + case 3: + message.scale = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new ListValue instance using the specified properties. - * @function create - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance - */ - ListValue.create = function create(properties) { - return new ListValue(properties); - }; + /** + * Verifies an Exponential message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exponential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + if (typeof message.growthFactor !== "number") + return "growthFactor: number expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (typeof message.scale !== "number") + return "scale: number expected"; + return null; + }; - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + */ + Exponential.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Exponential(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.growthFactor != null) + message.growthFactor = Number(object.growthFactor); + if (object.scale != null) + message.scale = Number(object.scale); + return message; + }; - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exponential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.growthFactor = 0; + object.scale = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; + return object; + }; - /** - * Decodes a ListValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this Exponential to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + * @returns {Object.} JSON object + */ + Exponential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return Exponential; + })(); - /** - * Verifies a ListValue message. - * @function verify - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; + BucketOptions.Explicit = (function() { - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue - */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + /** + * Properties of an Explicit. + * @memberof google.api.Distribution.BucketOptions + * @interface IExplicit + * @property {Array.|null} [bounds] Explicit bounds + */ + + /** + * Constructs a new Explicit. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Explicit. + * @implements IExplicit + * @constructor + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + */ + function Explicit(properties) { + this.bounds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.ListValue} message ListValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } - return object; - }; + /** + * Explicit bounds. + * @member {Array.} bounds + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + */ + Explicit.prototype.bounds = $util.emptyArray; - /** - * Converts this ListValue to JSON. - * @function toJSON - * @memberof google.protobuf.ListValue - * @instance - * @returns {Object.} JSON object - */ - ListValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new Explicit instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance + */ + Explicit.create = function create(properties) { + return new Explicit(properties); + }; - return ListValue; - })(); + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bounds != null && message.bounds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bounds.length; ++i) + writer.double(message.bounds[i]); + writer.ldelim(); + } + return writer; + }; - protobuf.Duration = (function() { + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ + /** + * Decodes an Explicit message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.bounds && message.bounds.length)) + message.bounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bounds.push(reader.double()); + } else + message.bounds.push(reader.double()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Verifies an Explicit message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Explicit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bounds != null && message.hasOwnProperty("bounds")) { + if (!Array.isArray(message.bounds)) + return "bounds: array expected"; + for (var i = 0; i < message.bounds.length; ++i) + if (typeof message.bounds[i] !== "number") + return "bounds: number[] expected"; + } + return null; + }; + + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + */ + Explicit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Explicit(); + if (object.bounds) { + if (!Array.isArray(object.bounds)) + throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); + message.bounds = []; + for (var i = 0; i < object.bounds.length; ++i) + message.bounds[i] = Number(object.bounds[i]); + } + return message; + }; + + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Explicit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bounds = []; + if (message.bounds && message.bounds.length) { + object.bounds = []; + for (var j = 0; j < message.bounds.length; ++j) + object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; + } + return object; + }; + + /** + * Converts this Explicit to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + * @returns {Object.} JSON object + */ + Explicit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; + return Explicit; + })(); - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; + return BucketOptions; + })(); - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; + Distribution.Exemplar = (function() { - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an Exemplar. + * @memberof google.api.Distribution + * @interface IExemplar + * @property {number|null} [value] Exemplar value + * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp + * @property {Array.|null} [attachments] Exemplar attachments + */ - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new Exemplar. + * @memberof google.api.Distribution + * @classdesc Represents an Exemplar. + * @implements IExemplar + * @constructor + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + */ + function Exemplar(properties) { + this.attachments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Exemplar value. + * @member {number} value + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.value = 0; - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; + /** + * Exemplar timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.timestamp = null; - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; + /** + * Exemplar attachments. + * @member {Array.} attachments + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.attachments = $util.emptyArray; - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; + /** + * Creates a new Exemplar instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @returns {google.api.Distribution.Exemplar} Exemplar instance + */ + Exemplar.create = function create(properties) { + return new Exemplar(properties); + }; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + case 2: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return Duration; - })(); + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - protobuf.Any = (function() { + /** + * Verifies an Exemplar message. + * @function verify + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exemplar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } + return null; + }; - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Exemplar} Exemplar + */ + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Exemplar) + return object; + var message = new $root.google.api.Distribution.Exemplar(); + if (object.value != null) + message.value = Number(object.value); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); + message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); + } + } + return message; + }; - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.Exemplar} message Exemplar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attachments = []; + if (options.defaults) { + object.value = 0; + object.timestamp = null; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + } + return object; + }; - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; + /** + * Converts this Exemplar to JSON. + * @function toJSON + * @memberof google.api.Distribution.Exemplar + * @instance + * @returns {Object.} JSON object + */ + Exemplar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); + return Exemplar; + })(); - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; + return Distribution; + })(); + + api.MetricDescriptor = (function() { /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; + * Properties of a MetricDescriptor. + * @memberof google.api + * @interface IMetricDescriptor + * @property {string|null} [name] MetricDescriptor name + * @property {string|null} [type] MetricDescriptor type + * @property {Array.|null} [labels] MetricDescriptor labels + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType + * @property {string|null} [unit] MetricDescriptor unit + * @property {string|null} [description] MetricDescriptor description + * @property {string|null} [displayName] MetricDescriptor displayName + * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes + */ /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Constructs a new MetricDescriptor. + * @memberof google.api + * @classdesc Represents a MetricDescriptor. + * @implements IMetricDescriptor + * @constructor + * @param {google.api.IMetricDescriptor=} [properties] Properties to set */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + function MetricDescriptor(properties) { + this.labels = []; + this.monitoredResourceTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * MetricDescriptor name. + * @member {string} name + * @memberof google.api.MetricDescriptor + * @instance */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + MetricDescriptor.prototype.name = ""; /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * MetricDescriptor type. + * @member {string} type + * @memberof google.api.MetricDescriptor + * @instance */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + MetricDescriptor.prototype.type = ""; /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * MetricDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MetricDescriptor + * @instance */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; + MetricDescriptor.prototype.labels = $util.emptyArray; /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * MetricDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.api.MetricDescriptor + * @instance */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; + MetricDescriptor.prototype.metricKind = 0; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * MetricDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.api.MetricDescriptor + * @instance */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; + MetricDescriptor.prototype.valueType = 0; /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any + * MetricDescriptor unit. + * @member {string} unit + * @memberof google.api.MetricDescriptor * @instance - * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Any; - })(); + MetricDescriptor.prototype.unit = ""; - protobuf.Timestamp = (function() { + /** + * MetricDescriptor description. + * @member {string} description + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.description = ""; /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * MetricDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MetricDescriptor + * @instance */ + MetricDescriptor.prototype.displayName = ""; /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * MetricDescriptor metadata. + * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata + * @memberof google.api.MetricDescriptor + * @instance */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + MetricDescriptor.prototype.metadata = null; /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * MetricDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MetricDescriptor.prototype.launchStage = 0; /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * MetricDescriptor monitoredResourceTypes. + * @member {Array.} monitoredResourceTypes + * @memberof google.api.MetricDescriptor * @instance */ - Timestamp.prototype.nanos = 0; + MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new MetricDescriptor instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @returns {google.api.MetricDescriptor} MetricDescriptor instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + MetricDescriptor.create = function create(properties) { + return new MetricDescriptor(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + MetricDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a MetricDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.api.MetricDescriptor} MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + MetricDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); + message.name = reader.string(); + break; + case 8: + message.type = reader.string(); break; case 2: - message.nanos = reader.int32(); + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 3: + message.metricKind = reader.int32(); + break; + case 4: + message.valueType = reader.int32(); + break; + case 5: + message.unit = reader.string(); + break; + case 6: + message.description = reader.string(); + break; + case 7: + message.displayName = reader.string(); + break; + case 10: + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + case 12: + message.launchStage = reader.int32(); + break; + case 13: + if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) + message.monitoredResourceTypes = []; + message.monitoredResourceTypes.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -31479,291 +31072,657 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.api.MetricDescriptor} MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a MetricDescriptor message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + MetricDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + switch (message.metricKind) { + default: + return "metricKind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { + if (!Array.isArray(message.monitoredResourceTypes)) + return "monitoredResourceTypes: array expected"; + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + if (!$util.isString(message.monitoredResourceTypes[i])) + return "monitoredResourceTypes: string[] expected"; + } return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.api.MetricDescriptor} MetricDescriptor */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + MetricDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.api.MetricDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MetricDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MetricDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.metricKind) { + case "METRIC_KIND_UNSPECIFIED": + case 0: + message.metricKind = 0; + break; + case "GAUGE": + case 1: + message.metricKind = 1; + break; + case "DELTA": + case 2: + message.metricKind = 2; + break; + case "CUMULATIVE": + case 3: + message.metricKind = 3; + break; + } + switch (object.valueType) { + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + case "DOUBLE": + case 3: + message.valueType = 3; + break; + case "STRING": + case 4: + message.valueType = 4; + break; + case "DISTRIBUTION": + case 5: + message.valueType = 5; + break; + case "MONEY": + case 6: + message.valueType = 6; + break; + } + if (object.unit != null) + message.unit = String(object.unit); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + } + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.monitoredResourceTypes) { + if (!Array.isArray(object.monitoredResourceTypes)) + throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); + message.monitoredResourceTypes = []; + for (var i = 0; i < object.monitoredResourceTypes.length; ++i) + message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); + } return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.api.MetricDescriptor} message MetricDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + MetricDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.labels = []; + object.monitoredResourceTypes = []; + } if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + object.name = ""; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.unit = ""; + object.description = ""; + object.displayName = ""; + object.type = ""; + object.metadata = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { + object.monitoredResourceTypes = []; + for (var j = 0; j < message.monitoredResourceTypes.length; ++j) + object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Timestamp to JSON. + * Converts this MetricDescriptor to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.api.MetricDescriptor * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + MetricDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Timestamp; - })(); + MetricDescriptor.MetricDescriptorMetadata = (function() { - protobuf.Empty = (function() { + /** + * Properties of a MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @interface IMetricDescriptorMetadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage + * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod + * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay + */ - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ + /** + * Constructs a new MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @classdesc Represents a MetricDescriptorMetadata. + * @implements IMetricDescriptorMetadata + * @constructor + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + */ + function MetricDescriptorMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * MetricDescriptorMetadata launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.launchStage = 0; - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; + /** + * MetricDescriptorMetadata samplePeriod. + * @member {google.protobuf.IDuration|null|undefined} samplePeriod + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.samplePeriod = null; + + /** + * MetricDescriptorMetadata ingestDelay. + * @member {google.protobuf.IDuration|null|undefined} ingestDelay + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.ingestDelay = null; + + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance + */ + MetricDescriptorMetadata.create = function create(properties) { + return new MetricDescriptorMetadata(properties); + }; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); + if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) + $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) + $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.launchStage = reader.int32(); + break; + case 2: + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a MetricDescriptorMetadata message. + * @function verify + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptorMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { + var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + if (error) + return "samplePeriod." + error; + } + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { + var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + if (error) + return "ingestDelay." + error; + } + return null; + }; - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + */ + MetricDescriptorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) + return object; + var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; break; } - } - return message; - }; + if (object.samplePeriod != null) { + if (typeof object.samplePeriod !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); + message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); + } + if (object.ingestDelay != null) { + if (typeof object.ingestDelay !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); + message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); + } + return message; + }; - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptorMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.samplePeriod = null; + object.ingestDelay = null; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); + return object; + }; - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Converts this MetricDescriptorMetadata to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptorMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; + return MetricDescriptorMetadata; + })(); - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + /** + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {number} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value */ - Empty.toObject = function toObject() { - return {}; - }; + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {number} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); - return Empty; + return MetricDescriptor; })(); - protobuf.FieldMask = (function() { + api.Metric = (function() { /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * Properties of a Metric. + * @memberof google.api + * @interface IMetric + * @property {string|null} [type] Metric type + * @property {Object.|null} [labels] Metric labels */ /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * Constructs a new Metric. + * @memberof google.api + * @classdesc Represents a Metric. + * @implements IMetric * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.api.IMetric=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function Metric(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31771,78 +31730,108 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * Metric type. + * @member {string} type + * @memberof google.api.Metric * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + Metric.prototype.type = ""; /** - * Creates a new FieldMask instance using the specified properties. + * Metric labels. + * @member {Object.} labels + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.labels = $util.emptyObject; + + /** + * Creates a new Metric instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.api.IMetric=} [properties] Properties to set + * @returns {google.api.Metric} Metric instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + Metric.create = function create(properties) { + return new Metric(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.api.IMetric} message Metric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + Metric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.api.IMetric} message Metric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + Metric.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a Metric message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.api.Metric} Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + Metric.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + case 3: + message.type = reader.string(); + break; + case 2: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; default: reader.skipType(tag & 7); @@ -31853,102 +31842,113 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a Metric message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.api.Metric} Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + Metric.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies a Metric message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + Metric.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a Metric message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.api.Metric} Metric */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Metric) return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); + var message = new $root.google.api.Metric(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.Metric.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from a Metric message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.api.Metric} message Metric * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + Metric.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; return object; }; /** - * Converts this FieldMask to JSON. + * Converts this Metric to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.api.Metric * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + Metric.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldMask; + return Metric; })(); - return protobuf; + return api; })(); google.rpc = (function() { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index b630cd311f5..29c61659d64 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -2,1762 +2,1291 @@ "nested": { "google": { "nested": { - "logging": { + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, "nested": { - "v2": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Logging.V2", - "go_package": "google.golang.org/genproto/googleapis/logging/v2;logging", - "java_multiple_files": true, - "java_outer_classname": "LoggingMetricsProto", - "java_package": "com.google.logging.v2", - "php_namespace": "Google\\Cloud\\Logging\\V2", - "ruby_package": "Google::Cloud::Logging::V2", - "(google.api.resource_definition).type": "logging.googleapis.com/BillingAccountLocation", - "(google.api.resource_definition).pattern": "billingAccounts/{billing_account}/locations/{location}" + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } }, "nested": { - "LogEntry": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/Log", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/logs/{log}", - "(google.api.resource).name_field": "log_name" - }, - "oneofs": { - "payload": { - "oneof": [ - "protoPayload", - "textPayload", - "jsonPayload" - ] - } - }, + "ExtensionRange": { "fields": { - "logName": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "start": { + "type": "int32", + "id": 1 }, - "protoPayload": { - "type": "google.protobuf.Any", + "end": { + "type": "int32", "id": 2 }, - "textPayload": { - "type": "string", + "options": { + "type": "ExtensionRangeOptions", "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "jsonPayload": { - "type": "google.protobuf.Struct", - "id": 6 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "receiveTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 24, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "severity": { - "type": "google.logging.type.LogSeverity", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "insertId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "httpRequest": { - "type": "google.logging.type.HttpRequest", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "operation": { - "type": "LogEntryOperation", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "trace": { - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "spanId": { - "type": "string", - "id": 27, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "traceSampled": { - "type": "bool", - "id": 30, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sourceLocation": { - "type": "LogEntrySourceLocation", - "id": 23, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "end": { + "type": "int32", + "id": 2 } } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "LogEntryOperation": { - "fields": { - "id": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "producer": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "first": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "last": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 } }, - "LogEntrySourceLocation": { + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { "fields": { - "file": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "line": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "start": { + "type": "int32", + "id": 1 }, - "function": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "end": { + "type": "int32", + "id": 2 } } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "LoggingServiceV2": { - "options": { - "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - }, - "methods": { - "DeleteLog": { - "requestType": "DeleteLogRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", - "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}", - "(google.api.method_signature)": "log_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{log_name=projects/*/logs/*}", - "additional_bindings": [ - { - "delete": "/v2/{log_name=*/*/logs/*}" - }, - { - "delete": "/v2/{log_name=organizations/*/logs/*}" - }, - { - "delete": "/v2/{log_name=folders/*/logs/*}" - }, - { - "delete": "/v2/{log_name=billingAccounts/*/logs/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "log_name" - } - ] - }, - "WriteLogEntries": { - "requestType": "WriteLogEntriesRequest", - "responseType": "WriteLogEntriesResponse", - "options": { - "(google.api.http).post": "/v2/entries:write", - "(google.api.http).body": "*", - "(google.api.method_signature)": "log_name,resource,labels,entries" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/entries:write", - "body": "*" - } - }, - { - "(google.api.method_signature)": "log_name,resource,labels,entries" - } - ] - }, - "ListLogEntries": { - "requestType": "ListLogEntriesRequest", - "responseType": "ListLogEntriesResponse", - "options": { - "(google.api.http).post": "/v2/entries:list", - "(google.api.http).body": "*", - "(google.api.method_signature)": "resource_names,filter,order_by" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/entries:list", - "body": "*" - } - }, - { - "(google.api.method_signature)": "resource_names,filter,order_by" - } - ] - }, - "ListMonitoredResourceDescriptors": { - "requestType": "ListMonitoredResourceDescriptorsRequest", - "responseType": "ListMonitoredResourceDescriptorsResponse", - "options": { - "(google.api.http).get": "/v2/monitoredResourceDescriptors" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/monitoredResourceDescriptors" - } - } - ] - }, - "ListLogs": { - "requestType": "ListLogsRequest", - "responseType": "ListLogsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/logs", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*}/logs", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*}/logs" - }, - { - "get": "/v2/{parent=organizations/*}/logs" - }, - { - "get": "/v2/{parent=folders/*}/logs" - }, - { - "get": "/v2/{parent=billingAccounts/*}/logs" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "TailLogEntries": { - "requestType": "TailLogEntriesRequest", - "requestStream": true, - "responseType": "TailLogEntriesResponse", - "responseStream": true, - "options": { - "(google.api.http).post": "/v2/entries:tail", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/entries:tail", - "body": "*" - } - } - ] - } - } + "number": { + "type": "int32", + "id": 2 }, - "DeleteLogRequest": { - "fields": { - "logName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/Log" - } - } - } + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "WriteLogEntriesRequest": { - "fields": { - "logName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "logging.googleapis.com/Log" - } - }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "entries": { - "rule": "repeated", - "type": "LogEntry", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "partialSuccess": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dryRun": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 }, - "WriteLogEntriesResponse": { - "fields": {} + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "WriteLogEntriesPartialErrors": { - "fields": { - "logEntryErrors": { - "keyType": "int32", - "type": "google.rpc.Status", - "id": 1 - } + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false } }, - "ListLogEntriesRequest": { - "fields": { - "resourceNames": { - "rule": "repeated", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" - } - }, - "filter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 }, - "ListLogEntriesResponse": { - "fields": { - "entries": { - "rule": "repeated", - "type": "LogEntry", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false } }, - "ListMonitoredResourceDescriptorsRequest": { - "fields": { - "pageSize": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true } }, - "ListMonitoredResourceDescriptorsResponse": { - "fields": { - "resourceDescriptors": { - "rule": "repeated", - "type": "google.api.MonitoredResourceDescriptor", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false } }, - "ListLogsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resourceNames": { - "rule": "repeated", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" } }, - "ListLogsResponse": { - "fields": { - "logNames": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false } }, - "TailLogEntriesRequest": { - "fields": { - "resourceNames": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "filter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "bufferWindow": { - "type": "google.protobuf.Duration", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false } }, - "TailLogEntriesResponse": { - "fields": { - "entries": { - "rule": "repeated", - "type": "LogEntry", - "id": 1 - }, - "suppressionInfo": { - "rule": "repeated", - "type": "SuppressionInfo", - "id": 2 - } - }, - "nested": { - "SuppressionInfo": { - "fields": { - "reason": { - "type": "Reason", - "id": 1 - }, - "suppressedCount": { - "type": "int32", - "id": 2 - } - }, - "nested": { - "Reason": { - "values": { - "REASON_UNSPECIFIED": 0, - "RATE_LIMIT": 1, - "NOT_CONSUMED": 2 - } - } - } - } + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false } }, - "ConfigServiceV2": { + "phpGenericServices": { + "type": "bool", + "id": 42, "options": { - "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" - }, - "methods": { - "ListBuckets": { - "requestType": "ListBucketsRequest", - "responseType": "ListBucketsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*/locations/*}/buckets", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*}/buckets", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*/locations/*}/buckets", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*/locations/*}/buckets" - }, - { - "get": "/v2/{parent=organizations/*/locations/*}/buckets" - }, - { - "get": "/v2/{parent=folders/*/locations/*}/buckets" - }, - { - "get": "/v2/{parent=billingAccounts/*/locations/*}/buckets" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetBucket": { - "requestType": "GetBucketRequest", - "responseType": "LogBucket", - "options": { - "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=*/*/locations/*/buckets/*}", - "additional_bindings": [ - { - "get": "/v2/{name=projects/*/locations/*/buckets/*}" - }, - { - "get": "/v2/{name=organizations/*/locations/*/buckets/*}" - }, - { - "get": "/v2/{name=folders/*/locations/*/buckets/*}" - }, - { - "get": "/v2/{name=billingAccounts/*/buckets/*}" - } - ] - } - } - ] - }, - "CreateBucket": { - "requestType": "CreateBucketRequest", - "responseType": "LogBucket", - "options": { - "(google.api.http).post": "/v2/{parent=*/*/locations/*}/buckets", - "(google.api.http).body": "bucket", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", - "(google.api.http).additional_bindings.body": "bucket" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=*/*/locations/*}/buckets", - "body": "bucket", - "additional_bindings": [ - { - "post": "/v2/{parent=projects/*/locations/*}/buckets", - "body": "bucket" - }, - { - "post": "/v2/{parent=organizations/*/locations/*}/buckets", - "body": "bucket" - }, - { - "post": "/v2/{parent=folders/*/locations/*}/buckets", - "body": "bucket" - }, - { - "post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", - "body": "bucket" - } - ] - } - } - ] - }, - "UpdateBucket": { - "requestType": "UpdateBucketRequest", - "responseType": "LogBucket", - "options": { - "(google.api.http).patch": "/v2/{name=*/*/locations/*/buckets/*}", - "(google.api.http).body": "bucket", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", - "(google.api.http).additional_bindings.body": "bucket" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{name=*/*/locations/*/buckets/*}", - "body": "bucket", - "additional_bindings": [ - { - "patch": "/v2/{name=projects/*/locations/*/buckets/*}", - "body": "bucket" - }, - { - "patch": "/v2/{name=organizations/*/locations/*/buckets/*}", - "body": "bucket" - }, - { - "patch": "/v2/{name=folders/*/locations/*/buckets/*}", - "body": "bucket" - }, - { - "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", - "body": "bucket" - } - ] - } - } - ] - }, - "DeleteBucket": { - "requestType": "DeleteBucketRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=*/*/locations/*/buckets/*}", - "additional_bindings": [ - { - "delete": "/v2/{name=projects/*/locations/*/buckets/*}" - }, - { - "delete": "/v2/{name=organizations/*/locations/*/buckets/*}" - }, - { - "delete": "/v2/{name=folders/*/locations/*/buckets/*}" - }, - { - "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" - } - ] - } - } - ] - }, - "UndeleteBucket": { - "requestType": "UndeleteBucketRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v2/{name=*/*/locations/*/buckets/*}:undelete", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{name=*/*/locations/*/buckets/*}:undelete", - "body": "*", - "additional_bindings": [ - { - "post": "/v2/{name=projects/*/locations/*/buckets/*}:undelete", - "body": "*" - }, - { - "post": "/v2/{name=organizations/*/locations/*/buckets/*}:undelete", - "body": "*" - }, - { - "post": "/v2/{name=folders/*/locations/*/buckets/*}:undelete", - "body": "*" - }, - { - "post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", - "body": "*" - } - ] - } - } - ] - }, - "ListViews": { - "requestType": "ListViewsRequest", - "responseType": "ListViewsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*/locations/*/buckets/*}/views", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*/locations/*/buckets/*}/views", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*/locations/*/buckets/*}/views" - }, - { - "get": "/v2/{parent=organizations/*/locations/*/buckets/*}/views" - }, - { - "get": "/v2/{parent=folders/*/locations/*/buckets/*}/views" - }, - { - "get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetView": { - "requestType": "GetViewRequest", - "responseType": "LogView", - "options": { - "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "additional_bindings": [ - { - "get": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" - }, - { - "get": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" - }, - { - "get": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" - }, - { - "get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" - } - ] - } - } - ] - }, - "CreateView": { - "requestType": "CreateViewRequest", - "responseType": "LogView", - "options": { - "(google.api.http).post": "/v2/{parent=*/*/locations/*/buckets/*}/views", - "(google.api.http).body": "view", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", - "(google.api.http).additional_bindings.body": "view" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=*/*/locations/*/buckets/*}/views", - "body": "view", - "additional_bindings": [ - { - "post": "/v2/{parent=projects/*/locations/*/buckets/*}/views", - "body": "view" - }, - { - "post": "/v2/{parent=organizations/*/locations/*/buckets/*}/views", - "body": "view" - }, - { - "post": "/v2/{parent=folders/*/locations/*/buckets/*}/views", - "body": "view" - }, - { - "post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", - "body": "view" - } - ] - } - } - ] - }, - "UpdateView": { - "requestType": "UpdateViewRequest", - "responseType": "LogView", - "options": { - "(google.api.http).patch": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "(google.api.http).body": "view", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", - "(google.api.http).additional_bindings.body": "view" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "body": "view", - "additional_bindings": [ - { - "patch": "/v2/{name=projects/*/locations/*/buckets/*/views/*}", - "body": "view" - }, - { - "patch": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}", - "body": "view" - }, - { - "patch": "/v2/{name=folders/*/locations/*/buckets/*/views/*}", - "body": "view" - }, - { - "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", - "body": "view" - } - ] - } - } - ] - }, - "DeleteView": { - "requestType": "DeleteViewRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "additional_bindings": [ - { - "delete": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" - }, - { - "delete": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" - }, - { - "delete": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" - }, - { - "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" - } - ] - } - } - ] - }, - "ListSinks": { - "requestType": "ListSinksRequest", - "responseType": "ListSinksResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/sinks", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*}/sinks", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*}/sinks" - }, - { - "get": "/v2/{parent=organizations/*}/sinks" - }, - { - "get": "/v2/{parent=folders/*}/sinks" - }, - { - "get": "/v2/{parent=billingAccounts/*}/sinks" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetSink": { - "requestType": "GetSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.method_signature)": "sink_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{sink_name=*/*/sinks/*}", - "additional_bindings": [ - { - "get": "/v2/{sink_name=projects/*/sinks/*}" - }, - { - "get": "/v2/{sink_name=organizations/*/sinks/*}" - }, - { - "get": "/v2/{sink_name=folders/*/sinks/*}" - }, - { - "get": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "sink_name" - } - ] - }, - "CreateSink": { - "requestType": "CreateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).post": "/v2/{parent=*/*}/sinks", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", - "(google.api.http).additional_bindings.body": "sink", - "(google.api.method_signature)": "parent,sink" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=*/*}/sinks", - "body": "sink", - "additional_bindings": [ - { - "post": "/v2/{parent=projects/*}/sinks", - "body": "sink" - }, - { - "post": "/v2/{parent=organizations/*}/sinks", - "body": "sink" - }, - { - "post": "/v2/{parent=folders/*}/sinks", - "body": "sink" - }, - { - "post": "/v2/{parent=billingAccounts/*}/sinks", - "body": "sink" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,sink" - } - ] - }, - "UpdateSink": { - "requestType": "UpdateSinkRequest", - "responseType": "LogSink", - "options": { - "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).body": "sink", - "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.http).additional_bindings.body": "sink", - "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.method_signature)": "sink_name,sink" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v2/{sink_name=*/*/sinks/*}", - "body": "sink", - "additional_bindings": [ - { - "put": "/v2/{sink_name=projects/*/sinks/*}", - "body": "sink" - }, - { - "put": "/v2/{sink_name=organizations/*/sinks/*}", - "body": "sink" - }, - { - "put": "/v2/{sink_name=folders/*/sinks/*}", - "body": "sink" - }, - { - "put": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "body": "sink" - }, - { - "patch": "/v2/{sink_name=projects/*/sinks/*}", - "body": "sink" - }, - { - "patch": "/v2/{sink_name=organizations/*/sinks/*}", - "body": "sink" - }, - { - "patch": "/v2/{sink_name=folders/*/sinks/*}", - "body": "sink" - }, - { - "patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "body": "sink" - } - ] - } - }, - { - "(google.api.method_signature)": "sink_name,sink,update_mask" - }, - { - "(google.api.method_signature)": "sink_name,sink" - } - ] - }, - "DeleteSink": { - "requestType": "DeleteSinkRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", - "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}", - "(google.api.method_signature)": "sink_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{sink_name=*/*/sinks/*}", - "additional_bindings": [ - { - "delete": "/v2/{sink_name=projects/*/sinks/*}" - }, - { - "delete": "/v2/{sink_name=organizations/*/sinks/*}" - }, - { - "delete": "/v2/{sink_name=folders/*/sinks/*}" - }, - { - "delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "sink_name" - } - ] - }, - "ListExclusions": { - "requestType": "ListExclusionsRequest", - "responseType": "ListExclusionsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=*/*}/exclusions", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=*/*}/exclusions", - "additional_bindings": [ - { - "get": "/v2/{parent=projects/*}/exclusions" - }, - { - "get": "/v2/{parent=organizations/*}/exclusions" - }, - { - "get": "/v2/{parent=folders/*}/exclusions" - }, - { - "get": "/v2/{parent=billingAccounts/*}/exclusions" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetExclusion": { - "requestType": "GetExclusionRequest", - "responseType": "LogExclusion", - "options": { - "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=*/*/exclusions/*}", - "additional_bindings": [ - { - "get": "/v2/{name=projects/*/exclusions/*}" - }, - { - "get": "/v2/{name=organizations/*/exclusions/*}" - }, - { - "get": "/v2/{name=folders/*/exclusions/*}" - }, - { - "get": "/v2/{name=billingAccounts/*/exclusions/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 }, - "CreateExclusion": { - "requestType": "CreateExclusionRequest", - "responseType": "LogExclusion", - "options": { - "(google.api.http).post": "/v2/{parent=*/*}/exclusions", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", - "(google.api.http).additional_bindings.body": "exclusion", - "(google.api.method_signature)": "parent,exclusion" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=*/*}/exclusions", - "body": "exclusion", - "additional_bindings": [ - { - "post": "/v2/{parent=projects/*}/exclusions", - "body": "exclusion" - }, - { - "post": "/v2/{parent=organizations/*}/exclusions", - "body": "exclusion" - }, - { - "post": "/v2/{parent=folders/*}/exclusions", - "body": "exclusion" - }, - { - "post": "/v2/{parent=billingAccounts/*}/exclusions", - "body": "exclusion" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,exclusion" - } - ] + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 }, - "UpdateExclusion": { - "requestType": "UpdateExclusionRequest", - "responseType": "LogExclusion", - "options": { - "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).body": "exclusion", - "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.http).additional_bindings.body": "exclusion", - "(google.api.method_signature)": "name,exclusion,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{name=*/*/exclusions/*}", - "body": "exclusion", - "additional_bindings": [ - { - "patch": "/v2/{name=projects/*/exclusions/*}", - "body": "exclusion" - }, - { - "patch": "/v2/{name=organizations/*/exclusions/*}", - "body": "exclusion" - }, - { - "patch": "/v2/{name=folders/*/exclusions/*}", - "body": "exclusion" - }, - { - "patch": "/v2/{name=billingAccounts/*/exclusions/*}", - "body": "exclusion" - } - ] - } - }, - { - "(google.api.method_signature)": "name,exclusion,update_mask" - } - ] + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 }, - "DeleteExclusion": { - "requestType": "DeleteExclusionRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=*/*/exclusions/*}", - "additional_bindings": [ - { - "delete": "/v2/{name=projects/*/exclusions/*}" - }, - { - "delete": "/v2/{name=organizations/*/exclusions/*}" - }, - { - "delete": "/v2/{name=folders/*/exclusions/*}" - }, - { - "delete": "/v2/{name=billingAccounts/*/exclusions/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "leadingComments": { + "type": "string", + "id": 3 }, - "GetCmekSettings": { - "requestType": "GetCmekSettingsRequest", - "responseType": "CmekSettings", - "options": { - "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", - "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=*/*}/cmekSettings", - "additional_bindings": { - "get": "/v2/{name=organizations/*}/cmekSettings" - } - } - } - ] + "trailingComments": { + "type": "string", + "id": 4 }, - "UpdateCmekSettings": { - "requestType": "UpdateCmekSettingsRequest", - "responseType": "CmekSettings", - "options": { - "(google.api.http).patch": "/v2/{name=*/*}/cmekSettings", - "(google.api.http).body": "cmek_settings", - "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*}/cmekSettings", - "(google.api.http).additional_bindings.body": "cmek_settings" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{name=*/*}/cmekSettings", - "body": "cmek_settings", - "additional_bindings": { - "patch": "/v2/{name=organizations/*}/cmekSettings", - "body": "cmek_settings" - } - } - } - ] + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 } } - }, - "LogBucket": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/LogBucket", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" - }, + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { "fields": { - "name": { - "type": "string", + "path": { + "rule": "repeated", + "type": "int32", "id": 1 }, - "description": { + "sourceFile": { "type": "string", - "id": 3 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 2 }, - "retentionDays": { + "begin": { "type": "int32", - "id": 11 - }, - "locked": { - "type": "bool", - "id": 9 + "id": 3 }, - "lifecycleState": { - "type": "LifecycleState", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "end": { + "type": "int32", + "id": 4 } } + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 }, - "LifecycleState": { - "values": { - "LIFECYCLE_STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DELETE_REQUESTED": 2 - } + "numberValue": { + "type": "double", + "id": 2 }, - "LogView": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/LogView", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}" - }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "logging": { + "nested": { + "type": { + "options": { + "csharp_namespace": "Google.Cloud.Logging.Type", + "go_package": "google.golang.org/genproto/googleapis/logging/type;ltype", + "java_multiple_files": true, + "java_outer_classname": "LogSeverityProto", + "java_package": "com.google.logging.type", + "php_namespace": "Google\\Cloud\\Logging\\Type" + }, + "nested": { + "HttpRequest": { "fields": { - "name": { + "requestMethod": { "type": "string", "id": 1 }, - "description": { + "requestUrl": { "type": "string", + "id": 2 + }, + "requestSize": { + "type": "int64", "id": 3 }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "status": { + "type": "int32", + "id": 4 }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "responseSize": { + "type": "int64", + "id": 5 }, - "filter": { + "userAgent": { + "type": "string", + "id": 6 + }, + "remoteIp": { "type": "string", "id": 7 + }, + "serverIp": { + "type": "string", + "id": 13 + }, + "referer": { + "type": "string", + "id": 8 + }, + "latency": { + "type": "google.protobuf.Duration", + "id": 14 + }, + "cacheLookup": { + "type": "bool", + "id": 11 + }, + "cacheHit": { + "type": "bool", + "id": 9 + }, + "cacheValidatedWithOriginServer": { + "type": "bool", + "id": 10 + }, + "cacheFillBytes": { + "type": "int64", + "id": 12 + }, + "protocol": { + "type": "string", + "id": 15 } } }, - "LogSink": { + "LogSeverity": { + "values": { + "DEFAULT": 0, + "DEBUG": 100, + "INFO": 200, + "NOTICE": 300, + "WARNING": 400, + "ERROR": 500, + "CRITICAL": 600, + "ALERT": 700, + "EMERGENCY": 800 + } + } + } + }, + "v2": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Logging.V2", + "go_package": "google.golang.org/genproto/googleapis/logging/v2;logging", + "java_multiple_files": true, + "java_outer_classname": "LoggingMetricsProto", + "java_package": "com.google.logging.v2", + "php_namespace": "Google\\Cloud\\Logging\\V2", + "ruby_package": "Google::Cloud::Logging::V2", + "(google.api.resource_definition).type": "logging.googleapis.com/BillingAccountLocation", + "(google.api.resource_definition).pattern": "billingAccounts/{billing_account}/locations/{location}" + }, + "nested": { + "LogEntry": { "options": { - "(google.api.resource).type": "logging.googleapis.com/LogSink", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/sinks/{sink}" + "(google.api.resource).type": "logging.googleapis.com/Log", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/logs/{log}", + "(google.api.resource).name_field": "log_name" }, "oneofs": { - "options": { + "payload": { "oneof": [ - "bigqueryOptions" + "protoPayload", + "textPayload", + "jsonPayload" ] } }, "fields": { - "name": { + "logName": { "type": "string", - "id": 1, + "id": 12, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "destination": { - "type": "string", - "id": 3, + "resource": { + "type": "google.api.MonitoredResource", + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" + "(google.api.field_behavior)": "REQUIRED" } }, - "filter": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "protoPayload": { + "type": "google.protobuf.Any", + "id": 2 }, - "description": { + "textPayload": { "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 3 }, - "disabled": { - "type": "bool", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "jsonPayload": { + "type": "google.protobuf.Struct", + "id": 6 }, - "exclusions": { - "rule": "repeated", - "type": "LogExclusion", - "id": 16, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 9, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "outputVersionFormat": { - "type": "VersionFormat", - "id": 6, - "options": { - "deprecated": true - } - }, - "writerIdentity": { - "type": "string", - "id": 8, + "receiveTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 24, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "includeChildren": { - "type": "bool", - "id": 9, + "severity": { + "type": "google.logging.type.LogSeverity", + "id": 10, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "bigqueryOptions": { - "type": "BigQueryOptions", - "id": 12, + "insertId": { + "type": "string", + "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "VersionFormat": { - "values": { - "VERSION_FORMAT_UNSPECIFIED": 0, - "V2": 1, - "V1": 2 - } - } - } - }, - "BigQueryOptions": { - "fields": { - "usePartitionedTables": { - "type": "bool", - "id": 1, + "httpRequest": { + "type": "google.logging.type.HttpRequest", + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "usesTimestampColumnPartitioning": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListBucketsRequest": { - "fields": { - "parent": { + "labels": { + "keyType": "string", "type": "string", - "id": 1, + "id": 11, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogBucket" + "(google.api.field_behavior)": "OPTIONAL" } }, - "pageToken": { - "type": "string", - "id": 2, + "operation": { + "type": "LogEntryOperation", + "id": 15, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "pageSize": { - "type": "int32", - "id": 3, + "trace": { + "type": "string", + "id": 22, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "ListBucketsResponse": { - "fields": { - "buckets": { - "rule": "repeated", - "type": "LogBucket", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CreateBucketRequest": { - "fields": { - "parent": { + "spanId": { "type": "string", - "id": 1, + "id": 27, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogBucket" + "(google.api.field_behavior)": "OPTIONAL" } }, - "bucketId": { - "type": "string", - "id": 2, + "traceSampled": { + "type": "bool", + "id": 30, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "bucket": { - "type": "LogBucket", - "id": 3, + "sourceLocation": { + "type": "LogEntrySourceLocation", + "id": 23, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "UpdateBucketRequest": { + "LogEntryOperation": { "fields": { - "name": { + "id": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + "(google.api.field_behavior)": "OPTIONAL" } }, - "bucket": { - "type": "LogBucket", + "producer": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetBucketRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" - } - } - } - }, - "DeleteBucketRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" - } - } - } - }, - "UndeleteBucketRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + "first": { + "type": "bool", + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "last": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListViewsRequest": { + "LogEntrySourceLocation": { "fields": { - "parent": { + "file": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "pageToken": { - "type": "string", + "line": { + "type": "int64", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "pageSize": { - "type": "int32", + "function": { + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" @@ -1765,124 +1294,271 @@ } } }, - "ListViewsResponse": { - "fields": { - "views": { - "rule": "repeated", - "type": "LogView", - "id": 1 + "LoggingServiceV2": { + "options": { + "(google.api.default_host)": "logging.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + }, + "methods": { + "DeleteLog": { + "requestType": "DeleteLogRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{log_name=projects/*/logs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{log_name=billingAccounts/*/logs/*}", + "(google.api.method_signature)": "log_name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{log_name=projects/*/logs/*}", + "additional_bindings": [ + { + "delete": "/v2/{log_name=*/*/logs/*}" + }, + { + "delete": "/v2/{log_name=organizations/*/logs/*}" + }, + { + "delete": "/v2/{log_name=folders/*/logs/*}" + }, + { + "delete": "/v2/{log_name=billingAccounts/*/logs/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "log_name" + } + ] }, - "nextPageToken": { + "WriteLogEntries": { + "requestType": "WriteLogEntriesRequest", + "responseType": "WriteLogEntriesResponse", + "options": { + "(google.api.http).post": "/v2/entries:write", + "(google.api.http).body": "*", + "(google.api.method_signature)": "log_name,resource,labels,entries" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:write", + "body": "*" + } + }, + { + "(google.api.method_signature)": "log_name,resource,labels,entries" + } + ] + }, + "ListLogEntries": { + "requestType": "ListLogEntriesRequest", + "responseType": "ListLogEntriesResponse", + "options": { + "(google.api.http).post": "/v2/entries:list", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource_names,filter,order_by" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:list", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource_names,filter,order_by" + } + ] + }, + "ListMonitoredResourceDescriptors": { + "requestType": "ListMonitoredResourceDescriptorsRequest", + "responseType": "ListMonitoredResourceDescriptorsResponse", + "options": { + "(google.api.http).get": "/v2/monitoredResourceDescriptors" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/monitoredResourceDescriptors" + } + } + ] + }, + "ListLogs": { + "requestType": "ListLogsRequest", + "responseType": "ListLogsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*}/logs", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*}/logs", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/logs" + }, + { + "get": "/v2/{parent=organizations/*}/logs" + }, + { + "get": "/v2/{parent=folders/*}/logs" + }, + { + "get": "/v2/{parent=billingAccounts/*}/logs" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "TailLogEntries": { + "requestType": "TailLogEntriesRequest", + "requestStream": true, + "responseType": "TailLogEntriesResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v2/entries:tail", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:tail", + "body": "*" + } + } + ] + } + } + }, + "DeleteLogRequest": { + "fields": { + "logName": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Log" + } } } }, - "CreateViewRequest": { + "WriteLogEntriesRequest": { "fields": { - "parent": { + "logName": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "logging.googleapis.com/Log" } }, - "viewId": { - "type": "string", + "resource": { + "type": "google.api.MonitoredResource", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "view": { - "type": "LogView", + "labels": { + "keyType": "string", + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "UpdateViewRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 4, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "view": { - "type": "LogView", - "id": 2, + "partialSuccess": { + "type": "bool", + "id": 5, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 4, + "dryRun": { + "type": "bool", + "id": 6, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "GetViewRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogView" - } - } - } + "WriteLogEntriesResponse": { + "fields": {} }, - "DeleteViewRequest": { + "WriteLogEntriesPartialErrors": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogView" - } + "logEntryErrors": { + "keyType": "int32", + "type": "google.rpc.Status", + "id": 1 } } }, - "ListSinksRequest": { + "ListLogEntriesRequest": { "fields": { - "parent": { + "resourceNames": { + "rule": "repeated", "type": "string", - "id": 1, + "id": 8, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" } }, - "pageToken": { + "filter": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, + "orderBy": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "pageSize": { "type": "int32", - "id": 3, + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListSinksResponse": { + "ListLogEntriesResponse": { "fields": { - "sinks": { + "entries": { "rule": "repeated", - "type": "LogSink", + "type": "LogEntry", "id": 1 }, "nextPageToken": { @@ -1891,327 +1567,541 @@ } } }, - "GetSinkRequest": { - "fields": { - "sinkName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" - } - } - } - }, - "CreateSinkRequest": { + "ListMonitoredResourceDescriptorsRequest": { "fields": { - "parent": { - "type": "string", + "pageSize": { + "type": "int32", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" + "(google.api.field_behavior)": "OPTIONAL" } }, - "sink": { - "type": "LogSink", + "pageToken": { + "type": "string", "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "uniqueWriterIdentity": { - "type": "bool", - "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "UpdateSinkRequest": { + "ListMonitoredResourceDescriptorsResponse": { "fields": { - "sinkName": { + "resourceDescriptors": { + "rule": "repeated", + "type": "google.api.MonitoredResourceDescriptor", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListLogsRequest": { + "fields": { + "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" } }, - "sink": { - "type": "LogSink", + "pageSize": { + "type": "int32", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "uniqueWriterIdentity": { - "type": "bool", + "pageToken": { + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 4, + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 8, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "DeleteSinkRequest": { + "ListLogsResponse": { "fields": { - "sinkName": { + "logNames": { + "rule": "repeated", "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" - } + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "LogExclusion": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/LogExclusion", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/exclusions/{exclusion}" - }, + "TailLogEntriesRequest": { "fields": { - "name": { + "resourceNames": { + "rule": "repeated", "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "description": { + "filter": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "filter": { - "type": "string", + "bufferWindow": { + "type": "google.protobuf.Duration", "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "disabled": { - "type": "bool", - "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "TailLogEntriesResponse": { + "fields": { + "entries": { + "rule": "repeated", + "type": "LogEntry", + "id": 1 }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "suppressionInfo": { + "rule": "repeated", + "type": "SuppressionInfo", + "id": 2 + } + }, + "nested": { + "SuppressionInfo": { + "fields": { + "reason": { + "type": "Reason", + "id": 1 + }, + "suppressedCount": { + "type": "int32", + "id": 2 + } + }, + "nested": { + "Reason": { + "values": { + "REASON_UNSPECIFIED": 0, + "RATE_LIMIT": 1, + "NOT_CONSUMED": 2 + } + } } } } }, - "ListExclusionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + "ConfigServiceV2": { + "options": { + "(google.api.default_host)": "logging.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" + }, + "methods": { + "ListBuckets": { + "requestType": "ListBucketsRequest", + "responseType": "ListBucketsResponse", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" - } + "(google.api.http).get": "/v2/{parent=*/*/locations/*}/buckets", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*}/buckets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*/locations/*}/buckets", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=organizations/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=folders/*/locations/*}/buckets" + }, + { + "get": "/v2/{parent=billingAccounts/*/locations/*}/buckets" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "pageToken": { - "type": "string", - "id": 2, + "GetBucket": { + "requestType": "GetBucketRequest", + "responseType": "LogBucket", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/locations/*/buckets/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=organizations/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=folders/*/locations/*/buckets/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/buckets/*}" + } + ] + } + } + ] }, - "pageSize": { - "type": "int32", - "id": 3, + "CreateBucket": { + "requestType": "CreateBucketRequest", + "responseType": "LogBucket", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListExclusionsResponse": { - "fields": { - "exclusions": { - "rule": "repeated", - "type": "LogExclusion", - "id": 1 + "(google.api.http).post": "/v2/{parent=*/*/locations/*}/buckets", + "(google.api.http).body": "bucket", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", + "(google.api.http).additional_bindings.body": "bucket" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*/locations/*}/buckets", + "body": "bucket", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=organizations/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=folders/*/locations/*}/buckets", + "body": "bucket" + }, + { + "post": "/v2/{parent=billingAccounts/*/locations/*}/buckets", + "body": "bucket" + } + ] + } + } + ] }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetExclusionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" - } - } - } - }, - "CreateExclusionRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + "UpdateBucket": { + "requestType": "UpdateBucketRequest", + "responseType": "LogBucket", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" - } + "(google.api.http).patch": "/v2/{name=*/*/locations/*/buckets/*}", + "(google.api.http).body": "bucket", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", + "(google.api.http).additional_bindings.body": "bucket" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/locations/*/buckets/*}", + "body": "bucket", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=organizations/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=folders/*/locations/*/buckets/*}", + "body": "bucket" + }, + { + "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*}", + "body": "bucket" + } + ] + } + } + ] }, - "exclusion": { - "type": "LogExclusion", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateExclusionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + "DeleteBucket": { + "requestType": "DeleteBucketRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" - } + "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/locations/*/buckets/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=organizations/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=folders/*/locations/*/buckets/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + } + ] + } + } + ] }, - "exclusion": { - "type": "LogExclusion", - "id": 2, + "UndeleteBucket": { + "requestType": "UndeleteBucketRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "(google.api.http).post": "/v2/{name=*/*/locations/*/buckets/*}:undelete", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=*/*/locations/*/buckets/*}:undelete", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{name=projects/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=organizations/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=folders/*/locations/*/buckets/*}:undelete", + "body": "*" + }, + { + "post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete", + "body": "*" + } + ] + } + } + ] }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteExclusionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" - } - } - } - }, - "GetCmekSettingsRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/CmekSettings" - } - } - } - }, - "UpdateCmekSettingsRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + "ListViews": { + "requestType": "ListViewsRequest", + "responseType": "ListViewsResponse", "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "(google.api.http).get": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=organizations/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=folders/*/locations/*/buckets/*}/views" + }, + { + "get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "cmekSettings": { - "type": "CmekSettings", - "id": 2, + "GetView": { + "requestType": "GetViewRequest", + "responseType": "LogView", "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" + } + ] + } + } + ] }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CmekSettings": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/CmekSettings", - "(google.api.resource).pattern": "billingAccounts/{billing_account}/cmekSettings" - }, - "fields": { - "name": { - "type": "string", - "id": 1, + "CreateView": { + "requestType": "CreateViewRequest", + "responseType": "LogView", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).post": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "(google.api.http).body": "view", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", + "(google.api.http).additional_bindings.body": "view" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*/locations/*/buckets/*}/views", + "body": "view", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=organizations/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=folders/*/locations/*/buckets/*}/views", + "body": "view" + }, + { + "post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views", + "body": "view" + } + ] + } + } + ] }, - "kmsKeyName": { - "type": "string", - "id": 2 + "UpdateView": { + "requestType": "UpdateViewRequest", + "responseType": "LogView", + "options": { + "(google.api.http).patch": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "(google.api.http).body": "view", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", + "(google.api.http).additional_bindings.body": "view" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "body": "view", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=folders/*/locations/*/buckets/*/views/*}", + "body": "view" + }, + { + "patch": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}", + "body": "view" + } + ] + } + } + ] }, - "serviceAccountId": { - "type": "string", - "id": 3, + "DeleteView": { + "requestType": "DeleteViewRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "MetricsServiceV2": { - "options": { - "(google.api.default_host)": "logging.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - }, - "methods": { - "ListLogMetrics": { - "requestType": "ListLogMetricsRequest", - "responseType": "ListLogMetricsResponse", + "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/locations/*/buckets/*/views/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=organizations/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" + } + ] + } + } + ] + }, + "ListSinks": { + "requestType": "ListSinksRequest", + "responseType": "ListSinksResponse", "options": { - "(google.api.http).get": "/v2/{parent=projects/*}/metrics", + "(google.api.http).get": "/v2/{parent=*/*}/sinks", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/sinks", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{parent=projects/*}/metrics" + "get": "/v2/{parent=*/*}/sinks", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/sinks" + }, + { + "get": "/v2/{parent=organizations/*}/sinks" + }, + { + "get": "/v2/{parent=folders/*}/sinks" + }, + { + "get": "/v2/{parent=billingAccounts/*}/sinks" + } + ] } }, { @@ -2219,1905 +2109,2015 @@ } ] }, - "GetLogMetric": { - "requestType": "GetLogMetricRequest", - "responseType": "LogMetric", + "GetSink": { + "requestType": "GetSinkRequest", + "responseType": "LogSink", "options": { - "(google.api.http).get": "/v2/{metric_name=projects/*/metrics/*}", - "(google.api.method_signature)": "metric_name" + "(google.api.http).get": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.get": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{metric_name=projects/*/metrics/*}" + "get": "/v2/{sink_name=*/*/sinks/*}", + "additional_bindings": [ + { + "get": "/v2/{sink_name=projects/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=organizations/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=folders/*/sinks/*}" + }, + { + "get": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + ] } }, { - "(google.api.method_signature)": "metric_name" + "(google.api.method_signature)": "sink_name" } ] }, - "CreateLogMetric": { - "requestType": "CreateLogMetricRequest", - "responseType": "LogMetric", + "CreateSink": { + "requestType": "CreateSinkRequest", + "responseType": "LogSink", "options": { - "(google.api.http).post": "/v2/{parent=projects/*}/metrics", - "(google.api.http).body": "metric", - "(google.api.method_signature)": "parent,metric" + "(google.api.http).post": "/v2/{parent=*/*}/sinks", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/sinks", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.method_signature)": "parent,sink" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2/{parent=projects/*}/metrics", - "body": "metric" + "post": "/v2/{parent=*/*}/sinks", + "body": "sink", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=organizations/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=folders/*}/sinks", + "body": "sink" + }, + { + "post": "/v2/{parent=billingAccounts/*}/sinks", + "body": "sink" + } + ] } }, { - "(google.api.method_signature)": "parent,metric" + "(google.api.method_signature)": "parent,sink" } ] }, - "UpdateLogMetric": { - "requestType": "UpdateLogMetricRequest", - "responseType": "LogMetric", + "UpdateSink": { + "requestType": "UpdateSinkRequest", + "responseType": "LogSink", "options": { - "(google.api.http).put": "/v2/{metric_name=projects/*/metrics/*}", - "(google.api.http).body": "metric", - "(google.api.method_signature)": "metric_name,metric" + "(google.api.http).put": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).body": "sink", + "(google.api.http).additional_bindings.put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.http).additional_bindings.body": "sink", + "(google.api.http).additional_bindings.patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name,sink" }, "parsedOptions": [ { "(google.api.http)": { - "put": "/v2/{metric_name=projects/*/metrics/*}", - "body": "metric" + "put": "/v2/{sink_name=*/*/sinks/*}", + "body": "sink", + "additional_bindings": [ + { + "put": "/v2/{sink_name=projects/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=organizations/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=folders/*/sinks/*}", + "body": "sink" + }, + { + "put": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=projects/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=organizations/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=folders/*/sinks/*}", + "body": "sink" + }, + { + "patch": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "body": "sink" + } + ] } }, { - "(google.api.method_signature)": "metric_name,metric" + "(google.api.method_signature)": "sink_name,sink,update_mask" + }, + { + "(google.api.method_signature)": "sink_name,sink" } ] }, - "DeleteLogMetric": { - "requestType": "DeleteLogMetricRequest", + "DeleteSink": { + "requestType": "DeleteSinkRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v2/{metric_name=projects/*/metrics/*}", - "(google.api.method_signature)": "metric_name" + "(google.api.http).delete": "/v2/{sink_name=*/*/sinks/*}", + "(google.api.http).additional_bindings.delete": "/v2/{sink_name=billingAccounts/*/sinks/*}", + "(google.api.method_signature)": "sink_name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v2/{metric_name=projects/*/metrics/*}" - } - }, - { - "(google.api.method_signature)": "metric_name" - } - ] - } - } - }, - "LogMetric": { - "options": { - "(google.api.resource).type": "logging.googleapis.com/LogMetric", - "(google.api.resource).pattern": "projects/{project}/metrics/{metric}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "metricDescriptor": { - "type": "google.api.MetricDescriptor", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "valueExtractor": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labelExtractors": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "bucketOptions": { - "type": "google.api.Distribution.BucketOptions", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "version": { - "type": "ApiVersion", - "id": 4, - "options": { - "deprecated": true - } - } - }, - "nested": { - "ApiVersion": { - "values": { - "V2": 0, - "V1": 1 - } - } - } - }, - "ListLogMetricsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "pageToken": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListLogMetricsResponse": { - "fields": { - "metrics": { - "rule": "repeated", - "type": "LogMetric", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetLogMetricRequest": { - "fields": { - "metricName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" - } - } - } - }, - "CreateLogMetricRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "logging.googleapis.com/LogMetric" - } + "delete": "/v2/{sink_name=*/*/sinks/*}", + "additional_bindings": [ + { + "delete": "/v2/{sink_name=projects/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=organizations/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=folders/*/sinks/*}" + }, + { + "delete": "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "sink_name" + } + ] }, - "metric": { - "type": "LogMetric", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateLogMetricRequest": { - "fields": { - "metricName": { - "type": "string", - "id": 1, + "ListExclusions": { + "requestType": "ListExclusionsRequest", + "responseType": "ListExclusionsResponse", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" - } + "(google.api.http).get": "/v2/{parent=*/*}/exclusions", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*}/exclusions", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*}/exclusions" + }, + { + "get": "/v2/{parent=organizations/*}/exclusions" + }, + { + "get": "/v2/{parent=folders/*}/exclusions" + }, + { + "get": "/v2/{parent=billingAccounts/*}/exclusions" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "metric": { - "type": "LogMetric", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteLogMetricRequest": { - "fields": { - "metricName": { - "type": "string", - "id": 1, + "GetExclusion": { + "requestType": "GetExclusionRequest", + "responseType": "LogExclusion", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" - } - } - } - } - } - }, - "type": { - "options": { - "csharp_namespace": "Google.Cloud.Logging.Type", - "go_package": "google.golang.org/genproto/googleapis/logging/type;ltype", - "java_multiple_files": true, - "java_outer_classname": "LogSeverityProto", - "java_package": "com.google.logging.type", - "php_namespace": "Google\\Cloud\\Logging\\Type" - }, - "nested": { - "HttpRequest": { - "fields": { - "requestMethod": { - "type": "string", - "id": 1 - }, - "requestUrl": { - "type": "string", - "id": 2 - }, - "requestSize": { - "type": "int64", - "id": 3 - }, - "status": { - "type": "int32", - "id": 4 - }, - "responseSize": { - "type": "int64", - "id": 5 - }, - "userAgent": { - "type": "string", - "id": 6 - }, - "remoteIp": { - "type": "string", - "id": 7 - }, - "serverIp": { - "type": "string", - "id": 13 - }, - "referer": { - "type": "string", - "id": 8 - }, - "latency": { - "type": "google.protobuf.Duration", - "id": 14 + "(google.api.http).get": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/exclusions/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/exclusions/*}" + }, + { + "get": "/v2/{name=organizations/*/exclusions/*}" + }, + { + "get": "/v2/{name=folders/*/exclusions/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/exclusions/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "cacheLookup": { - "type": "bool", - "id": 11 + "CreateExclusion": { + "requestType": "CreateExclusionRequest", + "responseType": "LogExclusion", + "options": { + "(google.api.http).post": "/v2/{parent=*/*}/exclusions", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*}/exclusions", + "(google.api.http).additional_bindings.body": "exclusion", + "(google.api.method_signature)": "parent,exclusion" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*}/exclusions", + "body": "exclusion", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=organizations/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=folders/*}/exclusions", + "body": "exclusion" + }, + { + "post": "/v2/{parent=billingAccounts/*}/exclusions", + "body": "exclusion" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,exclusion" + } + ] }, - "cacheHit": { - "type": "bool", - "id": 9 + "UpdateExclusion": { + "requestType": "UpdateExclusionRequest", + "responseType": "LogExclusion", + "options": { + "(google.api.http).patch": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).body": "exclusion", + "(google.api.http).additional_bindings.patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.http).additional_bindings.body": "exclusion", + "(google.api.method_signature)": "name,exclusion,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*/exclusions/*}", + "body": "exclusion", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=organizations/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=folders/*/exclusions/*}", + "body": "exclusion" + }, + { + "patch": "/v2/{name=billingAccounts/*/exclusions/*}", + "body": "exclusion" + } + ] + } + }, + { + "(google.api.method_signature)": "name,exclusion,update_mask" + } + ] }, - "cacheValidatedWithOriginServer": { - "type": "bool", - "id": 10 + "DeleteExclusion": { + "requestType": "DeleteExclusionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/exclusions/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/exclusions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/exclusions/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/exclusions/*}" + }, + { + "delete": "/v2/{name=organizations/*/exclusions/*}" + }, + { + "delete": "/v2/{name=folders/*/exclusions/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/exclusions/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "cacheFillBytes": { - "type": "int64", - "id": 12 + "GetCmekSettings": { + "requestType": "GetCmekSettingsRequest", + "responseType": "CmekSettings", + "options": { + "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*}/cmekSettings", + "additional_bindings": { + "get": "/v2/{name=organizations/*}/cmekSettings" + } + } + } + ] }, - "protocol": { - "type": "string", - "id": 15 - } - } - }, - "LogSeverity": { - "values": { - "DEFAULT": 0, - "DEBUG": 100, - "INFO": 200, - "NOTICE": 300, - "WARNING": 400, - "ERROR": 500, - "CRITICAL": 600, - "ALERT": 700, - "EMERGENCY": 800 - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", - "java_multiple_files": true, - "java_outer_classname": "MetricProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6 - } - }, - "MonitoredResourceDescriptor": { - "fields": { - "name": { - "type": "string", - "id": 5 - }, - "type": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", - "id": 4 - }, - "launchStage": { - "type": "LaunchStage", - "id": 7 - } - } - }, - "MonitoredResource": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "MonitoredResourceMetadata": { - "fields": { - "systemLabels": { - "type": "google.protobuf.Struct", - "id": 1 - }, - "userLabels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "LabelDescriptor": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "valueType": { - "type": "ValueType", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - }, - "nested": { - "ValueType": { - "values": { - "STRING": 0, - "BOOL": 1, - "INT64": 2 - } - } - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 + "UpdateCmekSettings": { + "requestType": "UpdateCmekSettingsRequest", + "responseType": "CmekSettings", + "options": { + "(google.api.http).patch": "/v2/{name=*/*}/cmekSettings", + "(google.api.http).body": "cmek_settings", + "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*}/cmekSettings", + "(google.api.http).additional_bindings.body": "cmek_settings" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*}/cmekSettings", + "body": "cmek_settings", + "additional_bindings": { + "patch": "/v2/{name=organizations/*}/cmekSettings", + "body": "cmek_settings" + } + } + } + ] + } } }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 + "LogBucket": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/LogBucket", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "retentionDays": { + "type": "int32", + "id": 11 + }, + "locked": { + "type": "bool", + "id": 9 + }, + "lifecycleState": { + "type": "LifecycleState", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 + "LifecycleState": { + "values": { + "LIFECYCLE_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "DELETE_REQUESTED": 2 + } }, - "body": { - "type": "string", - "id": 7 + "LogView": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/LogView", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "filter": { + "type": "string", + "id": 7 + } + } }, - "responseBody": { - "type": "string", - "id": 12 + "LogSink": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/LogSink", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/sinks/{sink}" + }, + "oneofs": { + "options": { + "oneof": [ + "bigqueryOptions" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "destination": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disabled": { + "type": "bool", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "outputVersionFormat": { + "type": "VersionFormat", + "id": 6, + "options": { + "deprecated": true + } + }, + "writerIdentity": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "includeChildren": { + "type": "bool", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "bigqueryOptions": { + "type": "BigQueryOptions", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "VersionFormat": { + "values": { + "VERSION_FORMAT_UNSPECIFIED": 0, + "V2": 1, + "V1": 2 + } + } + } }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 + "BigQueryOptions": { + "fields": { + "usePartitionedTables": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "usesTimestampColumnPartitioning": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "Distribution": { - "fields": { - "count": { - "type": "int64", - "id": 1 + "ListBucketsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogBucket" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } }, - "mean": { - "type": "double", - "id": 2 + "ListBucketsResponse": { + "fields": { + "buckets": { + "rule": "repeated", + "type": "LogBucket", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } }, - "sumOfSquaredDeviation": { - "type": "double", - "id": 3 + "CreateBucketRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogBucket" + } + }, + "bucketId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "bucket": { + "type": "LogBucket", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } }, - "range": { - "type": "Range", - "id": 4 + "UpdateBucketRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } + }, + "bucket": { + "type": "LogBucket", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } }, - "bucketOptions": { - "type": "BucketOptions", - "id": 6 + "GetBucketRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } + } + } }, - "bucketCounts": { - "rule": "repeated", - "type": "int64", - "id": 7 + "DeleteBucketRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } + } + } }, - "exemplars": { - "rule": "repeated", - "type": "Exemplar", - "id": 10 - } - }, - "nested": { - "Range": { + "UndeleteBucketRequest": { "fields": { - "min": { - "type": "double", - "id": 1 - }, - "max": { - "type": "double", - "id": 2 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogBucket" + } } } }, - "BucketOptions": { - "oneofs": { - "options": { - "oneof": [ - "linearBuckets", - "exponentialBuckets", - "explicitBuckets" - ] + "ListViewsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } - }, + } + }, + "ListViewsResponse": { "fields": { - "linearBuckets": { - "type": "Linear", + "views": { + "rule": "repeated", + "type": "LogView", "id": 1 }, - "exponentialBuckets": { - "type": "Exponential", + "nextPageToken": { + "type": "string", "id": 2 - }, - "explicitBuckets": { - "type": "Explicit", - "id": 3 } - }, - "nested": { - "Linear": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "width": { - "type": "double", - "id": 2 - }, - "offset": { - "type": "double", - "id": 3 - } + } + }, + "CreateViewRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "Exponential": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "growthFactor": { - "type": "double", - "id": 2 - }, - "scale": { - "type": "double", - "id": 3 - } + "viewId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "Explicit": { - "fields": { - "bounds": { - "rule": "repeated", - "type": "double", - "id": 1 - } + "view": { + "type": "LogView", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "Exemplar": { + "UpdateViewRequest": { "fields": { - "value": { - "type": "double", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 2 + "view": { + "type": "LogView", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "attachments": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } - } - } - }, - "MetricDescriptor": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "type": { - "type": "string", - "id": 8 - }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", - "id": 2 }, - "metricKind": { - "type": "MetricKind", - "id": 3 - }, - "valueType": { - "type": "ValueType", - "id": 4 + "GetViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogView" + } + } + } }, - "unit": { - "type": "string", - "id": 5 + "DeleteViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogView" + } + } + } }, - "description": { - "type": "string", - "id": 6 + "ListSinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } }, - "displayName": { - "type": "string", - "id": 7 + "ListSinksResponse": { + "fields": { + "sinks": { + "rule": "repeated", + "type": "LogSink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } }, - "metadata": { - "type": "MetricDescriptorMetadata", - "id": 10 + "GetSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" + } + } + } }, - "launchStage": { - "type": "LaunchStage", - "id": 12 + "CreateSinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogSink" + } + }, + "sink": { + "type": "LogSink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "uniqueWriterIdentity": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } }, - "monitoredResourceTypes": { - "rule": "repeated", - "type": "string", - "id": 13 - } - }, - "nested": { - "MetricDescriptorMetadata": { + "UpdateSinkRequest": { "fields": { - "launchStage": { - "type": "LaunchStage", + "sinkName": { + "type": "string", "id": 1, "options": { - "deprecated": true + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" + } + }, + "sink": { + "type": "LogSink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "samplePeriod": { - "type": "google.protobuf.Duration", - "id": 2 + "uniqueWriterIdentity": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "ingestDelay": { - "type": "google.protobuf.Duration", - "id": 3 + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "MetricKind": { - "values": { - "METRIC_KIND_UNSPECIFIED": 0, - "GAUGE": 1, - "DELTA": 2, - "CUMULATIVE": 3 - } - }, - "ValueType": { - "values": { - "VALUE_TYPE_UNSPECIFIED": 0, - "BOOL": 1, - "INT64": 2, - "DOUBLE": 3, - "STRING": 4, - "DISTRIBUTION": 5, - "MONEY": 6 - } - } - } - }, - "Metric": { - "fields": { - "type": { - "type": "string", - "id": 3 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false + "DeleteSinkRequest": { + "fields": { + "sinkName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogSink" + } + } } }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, + "LogExclusion": { "options": { - "packed": false + "(google.api.resource).type": "logging.googleapis.com/LogExclusion", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/exclusions/{exclusion}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "disabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } } }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { + "ListExclusionsRequest": { "fields": { - "start": { - "type": "int32", - "id": 1 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" + } }, - "end": { - "type": "int32", - "id": 2 + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ReservedRange": { + "ListExclusionsResponse": { "fields": { - "start": { - "type": "int32", + "exclusions": { + "rule": "repeated", + "type": "LogExclusion", "id": 1 }, - "end": { - "type": "int32", + "nextPageToken": { + "type": "string", "id": 2 } } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3 + "GetExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" + } + } } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { + "CreateExclusionRequest": { "fields": { - "start": { - "type": "int32", - "id": 1 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogExclusion" + } }, - "end": { - "type": "int32", - "id": 2 + "exclusion": { + "type": "LogExclusion", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false + "UpdateExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" + } + }, + "exclusion": { + "type": "LogExclusion", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 }, - "javaOuterClassname": { - "type": "string", - "id": 8 + "DeleteExclusionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogExclusion" + } + } + } }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false + "GetCmekSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/CmekSettings" + } + } } }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, + "UpdateCmekSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "cmekSettings": { + "type": "CmekSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CmekSettings": { "options": { - "deprecated": true + "(google.api.resource).type": "logging.googleapis.com/CmekSettings", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/cmekSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "kmsKeyName": { + "type": "string", + "id": 2 + }, + "serviceAccountId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } } }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, + "MetricsServiceV2": { "options": { - "default": false + "(google.api.default_host)": "logging.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + }, + "methods": { + "ListLogMetrics": { + "requestType": "ListLogMetricsRequest", + "responseType": "ListLogMetricsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*}/metrics", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*}/metrics" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetLogMetric": { + "requestType": "GetLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).get": "/v2/{metric_name=projects/*/metrics/*}", + "(google.api.method_signature)": "metric_name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{metric_name=projects/*/metrics/*}" + } + }, + { + "(google.api.method_signature)": "metric_name" + } + ] + }, + "CreateLogMetric": { + "requestType": "CreateLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/metrics", + "(google.api.http).body": "metric", + "(google.api.method_signature)": "parent,metric" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/metrics", + "body": "metric" + } + }, + { + "(google.api.method_signature)": "parent,metric" + } + ] + }, + "UpdateLogMetric": { + "requestType": "UpdateLogMetricRequest", + "responseType": "LogMetric", + "options": { + "(google.api.http).put": "/v2/{metric_name=projects/*/metrics/*}", + "(google.api.http).body": "metric", + "(google.api.method_signature)": "metric_name,metric" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{metric_name=projects/*/metrics/*}", + "body": "metric" + } + }, + { + "(google.api.method_signature)": "metric_name,metric" + } + ] + }, + "DeleteLogMetric": { + "requestType": "DeleteLogMetricRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{metric_name=projects/*/metrics/*}", + "(google.api.method_signature)": "metric_name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{metric_name=projects/*/metrics/*}" + } + }, + { + "(google.api.method_signature)": "metric_name" + } + ] + } } }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, + "LogMetric": { "options": { - "default": "SPEED" + "(google.api.resource).type": "logging.googleapis.com/LogMetric", + "(google.api.resource).pattern": "projects/{project}/metrics/{metric}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "metricDescriptor": { + "type": "google.api.MetricDescriptor", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "valueExtractor": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labelExtractors": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "bucketOptions": { + "type": "google.api.Distribution.BucketOptions", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "version": { + "type": "ApiVersion", + "id": 4, + "options": { + "deprecated": true + } + } + }, + "nested": { + "ApiVersion": { + "values": { + "V2": 0, + "V1": 1 + } + } } }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false + "ListLogMetricsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false + "ListLogMetricsResponse": { + "fields": { + "metrics": { + "rule": "repeated", + "type": "LogMetric", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } } }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false + "GetLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" + } + } } }, - "phpGenericServices": { - "type": "bool", - "id": 42, - "options": { - "default": false + "CreateLogMetricRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/LogMetric" + } + }, + "metric": { + "type": "LogMetric", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } } }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false + "UpdateLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" + } + }, + "metric": { + "type": "LogMetric", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } } }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true + "DeleteLogMetricRequest": { + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/LogMetric" + } + } } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/metric;metric", + "java_multiple_files": true, + "java_outer_classname": "MetricProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 } } }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] } }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } + "selector": { + "type": "string", + "id": 1 }, - "packed": { - "type": "bool", + "get": { + "type": "string", "id": 2 }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } + "put": { + "type": "string", + "id": 3 }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } + "post": { + "type": "string", + "id": 4 }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } + "delete": { + "type": "string", + "id": 5 }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } + "patch": { + "type": "string", + "id": 6 }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } + "custom": { + "type": "CustomHttpPattern", + "id": 8 }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 } } }, - "OneofOptions": { + "CustomHttpPattern": { "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] + } }, - "EnumOptions": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 + } + }, + "MonitoredResourceDescriptor": { "fields": { - "allowAlias": { - "type": "bool", + "name": { + "type": "string", + "id": 5 + }, + "type": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", "id": 2 }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } + "description": { + "type": "string", + "id": 3 }, - "uninterpretedOption": { + "labels": { "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 + "type": "LabelDescriptor", + "id": 4 + }, + "launchStage": { + "type": "LaunchStage", + "id": 7 } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] + } }, - "EnumValueOptions": { + "MonitoredResource": { "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 + "type": { + "type": "string", + "id": 1 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] + } }, - "ServiceOptions": { + "MonitoredResourceMetadata": { "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } + "systemLabels": { + "type": "google.protobuf.Struct", + "id": 1 }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 + "userLabels": { + "keyType": "string", + "type": "string", + "id": 2 } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] + } }, - "MethodOptions": { + "LabelDescriptor": { "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } + "key": { + "type": "string", + "id": 1 }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } + "valueType": { + "type": "ValueType", + "id": 2 }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 + "description": { + "type": "string", + "id": 3 } }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], "nested": { - "IdempotencyLevel": { + "ValueType": { "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 + "STRING": 0, + "BOOL": 1, + "INT64": 2 } } } }, - "UninterpretedOption": { + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { "fields": { - "name": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { "rule": "repeated", - "type": "NamePart", + "type": "string", "id": 2 }, - "identifierValue": { + "nameField": { "type": "string", "id": 3 }, - "positiveIntValue": { - "type": "uint64", + "history": { + "type": "History", "id": 4 }, - "negativeIntValue": { - "type": "int64", + "plural": { + "type": "string", "id": 5 }, - "doubleValue": { - "type": "double", + "singular": { + "type": "string", "id": 6 }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 } } } }, - "SourceCodeInfo": { + "ResourceReference": { "fields": { - "location": { - "rule": "repeated", - "type": "Location", + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "Distribution": { + "fields": { + "count": { + "type": "int64", "id": 1 + }, + "mean": { + "type": "double", + "id": 2 + }, + "sumOfSquaredDeviation": { + "type": "double", + "id": 3 + }, + "range": { + "type": "Range", + "id": 4 + }, + "bucketOptions": { + "type": "BucketOptions", + "id": 6 + }, + "bucketCounts": { + "rule": "repeated", + "type": "int64", + "id": 7 + }, + "exemplars": { + "rule": "repeated", + "type": "Exemplar", + "id": 10 } }, "nested": { - "Location": { + "Range": { "fields": { - "path": { - "rule": "repeated", - "type": "int32", + "min": { + "type": "double", + "id": 1 + }, + "max": { + "type": "double", + "id": 2 + } + } + }, + "BucketOptions": { + "oneofs": { + "options": { + "oneof": [ + "linearBuckets", + "exponentialBuckets", + "explicitBuckets" + ] + } + }, + "fields": { + "linearBuckets": { + "type": "Linear", "id": 1 }, - "span": { - "rule": "repeated", - "type": "int32", + "exponentialBuckets": { + "type": "Exponential", "id": 2 }, - "leadingComments": { - "type": "string", + "explicitBuckets": { + "type": "Explicit", "id": 3 + } + }, + "nested": { + "Linear": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "width": { + "type": "double", + "id": 2 + }, + "offset": { + "type": "double", + "id": 3 + } + } }, - "trailingComments": { - "type": "string", - "id": 4 + "Exponential": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "growthFactor": { + "type": "double", + "id": 2 + }, + "scale": { + "type": "double", + "id": 3 + } + } }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 + "Explicit": { + "fields": { + "bounds": { + "rule": "repeated", + "type": "double", + "id": 1 + } + } } } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { + }, + "Exemplar": { "fields": { - "path": { - "rule": "repeated", - "type": "int32", + "value": { + "type": "double", "id": 1 }, - "sourceFile": { - "type": "string", + "timestamp": { + "type": "google.protobuf.Timestamp", "id": 2 }, - "begin": { - "type": "int32", + "attachments": { + "rule": "repeated", + "type": "google.protobuf.Any", "id": 3 - }, - "end": { - "type": "int32", - "id": 4 } } } } }, - "Struct": { - "fields": { - "fields": { - "keyType": "string", - "type": "Value", - "id": 1 - } - } - }, - "Value": { - "oneofs": { - "kind": { - "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, + "MetricDescriptor": { "fields": { - "nullValue": { - "type": "NullValue", + "name": { + "type": "string", "id": 1 }, - "numberValue": { - "type": "double", + "type": { + "type": "string", + "id": 8 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", "id": 2 }, - "stringValue": { - "type": "string", + "metricKind": { + "type": "MetricKind", "id": 3 }, - "boolValue": { - "type": "bool", + "valueType": { + "type": "ValueType", "id": 4 }, - "structValue": { - "type": "Struct", + "unit": { + "type": "string", "id": 5 }, - "listValue": { - "type": "ListValue", + "description": { + "type": "string", "id": 6 - } - } - }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { - "fields": { - "values": { - "rule": "repeated", - "type": "Value", - "id": 1 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Any": { - "fields": { - "type_url": { + "displayName": { "type": "string", - "id": 1 + "id": 7 }, - "value": { - "type": "bytes", - "id": 2 + "metadata": { + "type": "MetricDescriptorMetadata", + "id": 10 + }, + "launchStage": { + "type": "LaunchStage", + "id": 12 + }, + "monitoredResourceTypes": { + "rule": "repeated", + "type": "string", + "id": 13 } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 + }, + "nested": { + "MetricDescriptorMetadata": { + "fields": { + "launchStage": { + "type": "LaunchStage", + "id": 1, + "options": { + "deprecated": true + } + }, + "samplePeriod": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "ingestDelay": { + "type": "google.protobuf.Duration", + "id": 3 + } + } }, - "nanos": { - "type": "int32", - "id": 2 + "MetricKind": { + "values": { + "METRIC_KIND_UNSPECIFIED": 0, + "GAUGE": 1, + "DELTA": 2, + "CUMULATIVE": 3 + } + }, + "ValueType": { + "values": { + "VALUE_TYPE_UNSPECIFIED": 0, + "BOOL": 1, + "INT64": 2, + "DOUBLE": 3, + "STRING": 4, + "DISTRIBUTION": 5, + "MONEY": 6 + } } } }, - "Empty": { - "fields": {} - }, - "FieldMask": { + "Metric": { "fields": { - "paths": { - "rule": "repeated", + "type": { "type": "string", - "id": 1 + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 } } } diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index ec3623e9343..dcf3f148233 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -140,6 +140,8 @@ export class ConfigServiceV2Client { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); diff --git a/handwritten/logging/src/v2/config_service_v2_proto_list.json b/handwritten/logging/src/v2/config_service_v2_proto_list.json index 3103c1e58c0..fd41d3bfa05 100644 --- a/handwritten/logging/src/v2/config_service_v2_proto_list.json +++ b/handwritten/logging/src/v2/config_service_v2_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/logging/type/http_request.proto", + "../../protos/google/logging/type/log_severity.proto", "../../protos/google/logging/v2/log_entry.proto", "../../protos/google/logging/v2/logging.proto", "../../protos/google/logging/v2/logging_config.proto", diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index aba6bbbf028..8400141234e 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -140,6 +140,8 @@ export class LoggingServiceV2Client { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); diff --git a/handwritten/logging/src/v2/logging_service_v2_proto_list.json b/handwritten/logging/src/v2/logging_service_v2_proto_list.json index 3103c1e58c0..fd41d3bfa05 100644 --- a/handwritten/logging/src/v2/logging_service_v2_proto_list.json +++ b/handwritten/logging/src/v2/logging_service_v2_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/logging/type/http_request.proto", + "../../protos/google/logging/type/log_severity.proto", "../../protos/google/logging/v2/log_entry.proto", "../../protos/google/logging/v2/logging.proto", "../../protos/google/logging/v2/logging_config.proto", diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 17f45d00611..c0927e270b1 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -140,6 +140,8 @@ export class MetricsServiceV2Client { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); diff --git a/handwritten/logging/src/v2/metrics_service_v2_proto_list.json b/handwritten/logging/src/v2/metrics_service_v2_proto_list.json index 3103c1e58c0..fd41d3bfa05 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_proto_list.json +++ b/handwritten/logging/src/v2/metrics_service_v2_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/logging/type/http_request.proto", + "../../protos/google/logging/type/log_severity.proto", "../../protos/google/logging/v2/log_entry.proto", "../../protos/google/logging/v2/logging.proto", "../../protos/google/logging/v2/logging_config.proto", From d7e215c66a9a27f1c3d9256ad9419c6cce16e901 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sun, 6 Jun 2021 20:14:27 -0700 Subject: [PATCH 0764/1029] chore: release 9.3.1 (#1082) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 489ce0cddf5..a6a53b323e7 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.3.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.3.0...v9.3.1) (2021-05-25) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#1081](https://www.github.com/googleapis/nodejs-logging/issues/1081)) ([bf0113d](https://www.github.com/googleapis/nodejs-logging/commit/bf0113d24a5d4e2aacb704e47207d81f98ad0d86)) + ## [9.3.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.2.3...v9.3.0) (2021-05-24) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a4d5f71b5a1..ac1924d9a25 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.3.0", + "version": "9.3.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From f0f6fe7ffc4dec843945cca6c5976d3aaae5d061 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Mon, 7 Jun 2021 10:40:00 +0700 Subject: [PATCH 0765/1029] feat: users can log raw http request objects with trace (#1086) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * style: change function_ to private function * docs: write clearer docs on write function * refactor: moved make-httprequest out of middleware into shared * style: lint * style: edit comments * feat: users can write raw httprequest objects to metadata.httprequest * 🦉 Updates from OwlBot * refactor: improved makeHttpRquestDAta readability * test: unit tests for new detected httprequest fields * fix: all unit tests passing * 🦉 Updates from OwlBot * test: remove test only setting * feat: can lift trace and span from x-cloud-trace-context header * chore: update license year * test: unit tests for entrry passing * test: unit tests in makehttprequests passing * 🦉 Updates from OwlBot * refactor: made tests more robust * 🦉 Updates from OwlBot * test: added a system test * refactor: improve entry.ts readability * test: check trace header in system test Co-authored-by: Owl Bot --- handwritten/logging/src/entry.ts | 61 +++++++++- handwritten/logging/src/log.ts | 15 ++- handwritten/logging/src/make-http-request.ts | 92 +++++++++++++++ .../middleware/express/make-http-request.ts | 42 ------- .../src/middleware/express/make-middleware.ts | 2 +- handwritten/logging/system-test/logging.ts | 33 +++++- handwritten/logging/test/entry.ts | 109 ++++++++++++++++++ handwritten/logging/test/log.ts | 12 +- .../express/test-make-http-request.ts | 52 --------- .../logging/test/test-make-http-request.ts | 97 ++++++++++++++++ 10 files changed, 404 insertions(+), 111 deletions(-) create mode 100644 handwritten/logging/src/make-http-request.ts delete mode 100644 handwritten/logging/src/middleware/express/make-http-request.ts delete mode 100644 handwritten/logging/test/middleware/express/test-make-http-request.ts create mode 100644 handwritten/logging/test/test-make-http-request.ts diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 6b9de61826c..e34dabcb62c 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -19,27 +19,42 @@ const EventId = require('eventid'); import * as extend from 'extend'; import {google} from '../protos/protos'; import {objToStruct, structToObj} from './common'; +import {CloudLoggingHttpRequest} from './http-request'; +import {makeHttpRequestData} from './make-http-request'; +import * as http from 'http'; const eventId = new EventId(); +// Accepted field types from user supported by this client library. export type Timestamp = google.protobuf.ITimestamp | Date | string; export type LogSeverity = google.logging.type.LogSeverity | string; +export type RawHttpRequest = http.IncomingMessage & CloudLoggingHttpRequest; +export type HttpRequest = + | google.logging.type.IHttpRequest + | CloudLoggingHttpRequest + | RawHttpRequest; export type LogEntry = Omit< google.logging.v2.ILogEntry, - 'timestamp' | 'severity' + 'timestamp' | 'severity' | 'httpRequest' > & { timestamp?: Timestamp | null; severity?: LogSeverity | null; + httpRequest?: HttpRequest | null; }; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type Data = any; +// Final Entry format submitted to the LoggingService API. export interface EntryJson { timestamp: Timestamp; insertId: number; jsonPayload?: google.protobuf.IStruct; textPayload?: string; + httpRequest?: google.logging.type.IHttpRequest; + trace?: string; + spanId?: string; + traceSampled?: boolean; } export interface ToJsonOptions { @@ -143,13 +158,16 @@ class Entry { } /** - * Serialize an entry to the format the API expects. + * Serialize an entry to the format the API expects. Read more: + * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry * * @param {object} [options] Configuration object. * @param {boolean} [options.removeCircular] Replace circular references in an * object with a string value, `[Circular]`. */ toJSON(options: ToJsonOptions = {}) { + // Format raw httpRequest and trace/span if available. + this.formatHttpRequest(); const entry = extend(true, {}, this.metadata) as {} as EntryJson; // Format log message if (Object.prototype.toString.call(this.data) === '[object Object]') { @@ -182,6 +200,45 @@ class Entry { return entry; } + /** + * Formats raw incoming request objects into a GCP structured HTTPRequest. + * Formats trace & span if users provided X-Cloud-Trace-Context in header. + * See more: https://cloud.google.com/trace/docs/setup#force-trace + * "X-Cloud-Trace-Context: TRACE_ID/SPAN_ID;o=TRACE_TRUE" + * for example: + * "X-Cloud-Trace-Context: 105445aa7843bc8bf206b120001000/1;o=1" + * Note: logs from middleware are already formatted. + * + * @private + */ + private formatHttpRequest() { + const rawReq = this.metadata.httpRequest; + if (rawReq) { + // Handle raw http requests. + if ( + 'statusCode' in rawReq || + 'headers' in rawReq || + 'method' in rawReq || + 'url' in rawReq + ) + this.metadata.httpRequest = makeHttpRequestData(rawReq); + // Infer trace & span if not user specified already. + if ('headers' in rawReq && rawReq.headers['x-cloud-trace-context']) { + const regex = /([a-f\d]+)?(\/?([a-f\d]+))?(;?o=(\d))?/; + const match = rawReq.headers['x-cloud-trace-context'] + .toString() + .match(regex); + if (match) { + if (!this.metadata.trace && match[1]) this.metadata.trace = match[1]; + if (!this.metadata.spanId && match[3]) + this.metadata.spanId = match[3]; + if (this.metadata.traceSampled === undefined && match[5]) + this.metadata.traceSampled = match[5] === '1'; + } + } + } + } + /** * Create an Entry object from an API response, such as `entries:list`. * diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 72d43a4fd09..d2af60aa5d0 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -431,7 +431,7 @@ class Log implements LogSeverityFunctions { entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; if (!data && metadataOrData?.hasOwnProperty('httpRequest')) { - // If user logs entry(httpRequest) + // If user logs entry(metadata.httpRequest) metadata = metadataOrData as LogEntry; data = {}; } else if (!data) { @@ -887,6 +887,7 @@ class Log implements LogSeverityFunctions { const options = opts ? (opts as WriteOptions) : {}; // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; + // Autodetect monitored resource if not specified by user in WriteOptions. if (options.resource) { if (options.resource.labels) snakecaseKeys(options.resource.labels); return writeWithResource(options.resource); @@ -899,10 +900,12 @@ class Log implements LogSeverityFunctions { this.logging.detectedResource = resource; return writeWithResource(resource); } + // writeWithResource formats entries and writes them to loggingService API. + // Service expects props: logName, resource, labels, partialSuccess, dryRun. async function writeWithResource(resource: {} | null) { let decoratedEntries: EntryJson[]; try { - decoratedEntries = self.decorateEntries_(arrify(entry) as Entry[]); + decoratedEntries = self.decorateEntries(arrify(entry) as Entry[]); } catch (err) { // Ignore errors (the API will speak up if it has an issue). } @@ -936,9 +939,11 @@ class Log implements LogSeverityFunctions { } } - // TODO proper signature of `private decorateEntries` (sans underscore suffix) /** - * All entries are passed through here in order to get them serialized. + * All entries are passed through here in order be formatted and serialized. + * User provided Entry values are formatted per LogEntry specifications. + * Read more about the LogEntry format: + * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry * * @private * @@ -946,7 +951,7 @@ class Log implements LogSeverityFunctions { * @returns {object[]} Serialized entries. * @throws if there is an error during serialization. */ - decorateEntries_(entries: Entry[]): EntryJson[] { + private decorateEntries(entries: Entry[]): EntryJson[] { return entries.map(entry => { if (!(entry instanceof Entry)) { entry = this.entry(entry); diff --git a/handwritten/logging/src/make-http-request.ts b/handwritten/logging/src/make-http-request.ts new file mode 100644 index 00000000000..507f0539eb9 --- /dev/null +++ b/handwritten/logging/src/make-http-request.ts @@ -0,0 +1,92 @@ +/*! + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as http from 'http'; + +import {CloudLoggingHttpRequest} from './http-request'; + +/** + * Abstraction of http.IncomingMessage used by middleware implementation. + */ +export interface ServerRequest extends http.IncomingMessage { + originalUrl: string; +} + +/** + * makeHttpRequestData turns raw incoming HTTPRequests into structured + * HTTPRequest objects interpreted by Cloud Logging. See more: + * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#httprequest + * + * @param req + * @param res + * @param latencyMilliseconds + */ +export function makeHttpRequestData( + req: ServerRequest | http.IncomingMessage, + res?: http.ServerResponse, + latencyMilliseconds?: number +): CloudLoggingHttpRequest { + let requestUrl, + protocol, + requestMethod, + userAgent, + referer, + status, + responseSize, + latency; + // Format request properties + if (req.url) { + requestUrl = req.url; + const url = new URL(requestUrl); + protocol = url.protocol; + } + // OriginalURL overwrites inferred url + if ('originalUrl' in req && req.originalUrl) { + requestUrl = req.originalUrl; + const url = new URL(requestUrl); + protocol = url.protocol; + } + req.method ? (requestMethod = req.method) : null; + if (req.headers && req.headers['user-agent']) { + req.headers['user-agent'] ? (userAgent = req.headers['user-agent']) : null; + req.headers['referer'] ? (referer = req.headers['referer']) : null; + } + // Format response properties + if (res) { + res.statusCode ? (status = res.statusCode) : null; + responseSize = + (res.getHeader && Number(res.getHeader('Content-Length'))) || 0; + } + // Format latency + if (latencyMilliseconds) { + latency = { + seconds: Math.floor(latencyMilliseconds / 1e3), + nanos: Math.floor((latencyMilliseconds % 1e3) * 1e6), + }; + } + // Only include the property if its value exists + return Object.assign( + {}, + requestUrl ? {requestUrl} : null, + protocol ? {protocol} : null, + requestMethod ? {requestMethod} : null, + userAgent ? {userAgent} : null, + referer ? {referer} : null, + responseSize ? {responseSize} : null, + status ? {status} : null, + latency ? {latency} : null + ); +} diff --git a/handwritten/logging/src/middleware/express/make-http-request.ts b/handwritten/logging/src/middleware/express/make-http-request.ts deleted file mode 100644 index 30dc51317c0..00000000000 --- a/handwritten/logging/src/middleware/express/make-http-request.ts +++ /dev/null @@ -1,42 +0,0 @@ -/*! - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as http from 'http'; - -import {CloudLoggingHttpRequest} from '../../http-request'; - -export interface ServerRequest extends http.IncomingMessage { - originalUrl: string; -} - -export function makeHttpRequestData( - req: ServerRequest, - res: http.ServerResponse, - latencyMilliseconds: number -): CloudLoggingHttpRequest { - return { - status: res.statusCode, - requestUrl: req.originalUrl, - requestMethod: req.method, - userAgent: req.headers['user-agent'], - responseSize: - (res.getHeader && Number(res.getHeader('Content-Length'))) || 0, - latency: { - seconds: Math.floor(latencyMilliseconds / 1e3), - nanos: Math.floor((latencyMilliseconds % 1e3) * 1e6), - }, - }; -} diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index e4ca3e7b92e..c9c592bb23b 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -18,7 +18,7 @@ import * as http from 'http'; import onFinished = require('on-finished'); import {getOrInjectContext, makeHeaderWrapper} from '../context'; -import {makeHttpRequestData, ServerRequest} from './make-http-request'; +import {makeHttpRequestData, ServerRequest} from '../../make-http-request'; import {CloudLoggingHttpRequest} from '../../http-request'; interface AnnotatedRequestType extends ServerRequest { diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 231110134b7..8643f29598d 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -27,6 +27,7 @@ import {after, before} from 'mocha'; // eslint-disable-next-line @typescript-eslint/no-var-requires const http2spy = require('http2spy'); import {Logging, Sink, Log, Entry, TailEntriesResponse} from '../src'; +import * as http from 'http'; // block all attempts to chat with the metadata server (kokoro runs on GCE) nock(HOST_ADDRESS) @@ -616,7 +617,7 @@ describe('Logging', () => { }); }); - it('should write a httpRequest log with no message', done => { + it('should write a structured httpRequest log with no message', done => { const {log} = getTestLog(); const metadata = { httpRequest: {status: 200}, @@ -625,11 +626,9 @@ describe('Logging', () => { log.write(logEntry, err => { assert.ifError(err); - getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { assert.ifError(err); const entry = entries![0]; - assert.strictEqual( entry.metadata.httpRequest?.status, metadata.httpRequest.status @@ -640,6 +639,34 @@ describe('Logging', () => { }); }); + it('should write a raw http request log with message', done => { + const {log} = getTestLog(); + const URL = 'http://www.google.com'; + // Use the response of a http request as the incomingmessage request obj. + http.get(URL, res => { + res.url = URL; + res.headers = { + 'x-cloud-trace-context': '1/2;o=1', + }; + const metadata = {httpRequest: res}; + const logEntry = log.entry(metadata, 'some log message'); + log.write(logEntry, err => { + assert.ifError(err); + getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { + assert.ifError(err); + const entry = entries![0]; + assert.strictEqual(entry.data, 'some log message'); + assert.strictEqual(entry.metadata.httpRequest?.requestUrl, URL); + assert.strictEqual(entry.metadata.httpRequest?.protocol, 'http:'); + assert.strictEqual(entry.metadata.trace, '1'); + assert.strictEqual(entry.metadata.spanId, '2'); + assert.strictEqual(entry.metadata.traceSampled, true); + done(); + }); + }); + }); + }); + it('should set the default resource', done => { const {log} = getTestLog(); diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 1d7ebcb9c67..d24c450c9a2 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -18,6 +18,7 @@ import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as entryTypes from '../src/entry'; import * as common from '../src/common'; +import * as http from 'http'; let fakeEventIdNewOverride: Function | null; @@ -257,5 +258,113 @@ describe('Entry', () => { }); } }); + + it('should convert a raw incoming HTTP request', () => { + const req = { + method: 'GET', + } as http.IncomingMessage; + req.headers = {}; + entry.metadata.httpRequest = req; + const json = entry.toJSON(); + assert.strictEqual(json.httpRequest?.requestMethod, 'GET'); + }); + + it('should extract trace & span from X-Cloud-Trace-Context', () => { + const tests = [ + { + header: '105445aa7843bc8bf206b120001000/000000001;o=1', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '000000001', + traceSampled: true, + }, + }, + // TraceSampled is false + { + header: '105445aa7843bc8bf206b120001000/000000001;o=0', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '000000001', + traceSampled: false, + }, + }, + { + // No span + header: '105445aa7843bc8bf206b120001000;o=1', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: undefined, + traceSampled: true, + }, + }, + { + // No trace + header: '/105445aa7843bc8bf206b120001000;o=0', + expected: { + trace: undefined, + spanId: '105445aa7843bc8bf206b120001000', + traceSampled: false, + }, + }, + { + // No traceSampled + header: '105445aa7843bc8bf206b120001000/0', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '0', + traceSampled: undefined, + }, + }, + { + // No input + header: '', + expected: { + trace: undefined, + spanId: undefined, + traceSampled: undefined, + }, + }, + ]; + for (const test of tests) { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + // Mock raw http headers with lowercased keys. + req.headers = { + 'x-cloud-trace-context': test.header, + }; + delete entry.metadata.trace; + delete entry.metadata.spanId; + delete entry.metadata.traceSampled; + entry.metadata.httpRequest = req; + const json = entry.toJSON(); + assert.strictEqual(json.trace, test.expected.trace); + assert.strictEqual(json.spanId, test.expected.spanId); + assert.strictEqual(json.traceSampled, test.expected.traceSampled); + } + }); + + it('should not overwrite user defined trace and span', () => { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + // Mock raw http headers with lowercased keys. + req.headers = { + 'x-cloud-trace-context': '105445aa7843bc8bf206b120001000/000000001;o=1', + }; + entry.metadata.spanId = '1'; + entry.metadata.trace = '1'; + entry.metadata.traceSampled = false; + const expected = { + trace: '1', + spanId: '1', + traceSampled: false, + }; + entry.metadata.httpRequest = req; + const json = entry.toJSON(); + assert.strictEqual(json.trace, expected.trace); + assert.strictEqual(json.spanId, expected.spanId); + assert.strictEqual(json.traceSampled, expected.traceSampled); + }); }); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index a1d3007917c..1c31b5dfe63 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -385,7 +385,7 @@ describe('Log', () => { ENTRY = {} as Entry; ENTRIES = [ENTRY] as Entry[]; OPTIONS = {} as WriteOptions; - decorateEntriesStub = sinon.stub(log, 'decorateEntries_').returnsArg(0); + decorateEntriesStub = sinon.stub(log, 'decorateEntries').returnsArg(0); truncateEntriesStub = sinon.stub(log, 'truncateEntries').returnsArg(0); }); afterEach(() => { @@ -686,7 +686,7 @@ describe('Log', () => { }); }); - describe('decorateEntries_', () => { + describe('decorateEntries', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any let toJSONResponse: any; let logEntryStub: sinon.SinonStub; @@ -706,7 +706,7 @@ describe('Log', () => { it('should create an Entry object if one is not provided', () => { const entry = {}; - const decoratedEntries = log.decorateEntries_([entry]); + const decoratedEntries = log.decorateEntries([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); assert(log.entry.calledWithExactly(entry)); }); @@ -714,7 +714,7 @@ describe('Log', () => { it('should get JSON format from Entry object', () => { const entry = new Entry(); entry.toJSON = () => toJSONResponse as {} as EntryJson; - const decoratedEntries = log.decorateEntries_([entry]); + const decoratedEntries = log.decorateEntries([entry]); assert.strictEqual(decoratedEntries[0], toJSONResponse); assert(log.entry.notCalled); }); @@ -726,7 +726,7 @@ describe('Log', () => { .stub(entry, 'toJSON') .returns({} as EntryJson); - log.decorateEntries_([entry]); + log.decorateEntries([entry]); assert(localJSONStub.calledWithExactly({removeCircular: true})); }); @@ -734,7 +734,7 @@ describe('Log', () => { const entry = new Entry(); sinon.stub(entry, 'toJSON').throws('Error.'); assert.throws(() => { - log.decorateEntries_([entry]); + log.decorateEntries([entry]); }, 'Error.'); }); }); diff --git a/handwritten/logging/test/middleware/express/test-make-http-request.ts b/handwritten/logging/test/middleware/express/test-make-http-request.ts deleted file mode 100644 index 559e8abd36d..00000000000 --- a/handwritten/logging/test/middleware/express/test-make-http-request.ts +++ /dev/null @@ -1,52 +0,0 @@ -/*! - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -import {ServerResponse} from 'http'; -import { - makeHttpRequestData, - ServerRequest, -} from '../../../src/middleware/express/make-http-request'; - -describe('middleware/express/make-http-request', () => { - it('should convert latency to proto Duration', () => { - const fakeRequest = {headers: {}}; - const fakeResponse = {}; - - const h1 = makeHttpRequestData( - fakeRequest as ServerRequest, - fakeResponse as ServerResponse, - 1003 - ); - assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); - - const h2 = makeHttpRequestData( - fakeRequest as ServerRequest, - fakeResponse as ServerResponse, - 9003.1 - ); - assert.deepStrictEqual(h2.latency, {seconds: 9, nanos: 3.1e6}); - - // Make sure we nanos is uint32. - const h3 = makeHttpRequestData( - fakeRequest as ServerRequest, - fakeResponse as ServerResponse, - 1.0000000001 - ); - assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); - }); -}); diff --git a/handwritten/logging/test/test-make-http-request.ts b/handwritten/logging/test/test-make-http-request.ts new file mode 100644 index 00000000000..8e423a5d35e --- /dev/null +++ b/handwritten/logging/test/test-make-http-request.ts @@ -0,0 +1,97 @@ +/*! + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +import {ServerResponse} from 'http'; +import {makeHttpRequestData, ServerRequest} from '../src/make-http-request'; +import * as http from 'http'; + +describe('make-http-request', () => { + it('should prioritize originalUrl if provided', () => { + const req = { + method: 'GET', + url: 'http://wrongemail.com/', + originalUrl: 'http://google.com/', + } as ServerRequest; + const cloudReq = makeHttpRequestData(req); + assert.strictEqual(cloudReq.protocol, 'http:'); + assert.strictEqual(cloudReq.requestUrl, 'http://google.com/'); + assert.strictEqual(cloudReq.requestMethod, 'GET'); + }); + + it('should infer as many request values as possible', () => { + const req = { + method: 'GET', + url: 'http://google.com/', + headers: { + 'user-agent': 'some-agent', + referer: 'some-referer', + }, + } as http.IncomingMessage; + const cloudReq = makeHttpRequestData(req); + assert.strictEqual(cloudReq.protocol, 'http:'); + assert.strictEqual(cloudReq.requestUrl, 'http://google.com/'); + assert.strictEqual(cloudReq.requestMethod, 'GET'); + assert.strictEqual(cloudReq.userAgent, 'some-agent'); + assert.strictEqual(cloudReq.referer, 'some-referer'); + assert.strictEqual(cloudReq.status, undefined); + }); + + it('should infer as many response values as possible', () => { + const RESPONSE_SIZE = 2048; + const req = {} as ServerRequest; + const res = { + statusCode: 200, + headers: { + 'Content-Length': RESPONSE_SIZE, + }, + } as unknown as http.ServerResponse; + res.getHeader = function () { + return 2048; + }; + const cloudReq = makeHttpRequestData(req, res); + assert.strictEqual(cloudReq.status, 200); + assert.strictEqual(cloudReq.responseSize, RESPONSE_SIZE); + }); + + it('should convert latency to proto Duration', () => { + const fakeRequest = {headers: {}}; + const fakeResponse = {}; + + const h1 = makeHttpRequestData( + fakeRequest as ServerRequest, + fakeResponse as ServerResponse, + 1003 + ); + assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); + + const h2 = makeHttpRequestData( + fakeRequest as ServerRequest, + fakeResponse as ServerResponse, + 9003.1 + ); + assert.deepStrictEqual(h2.latency, {seconds: 9, nanos: 3.1e6}); + + // Make sure we nanos is uint32. + const h3 = makeHttpRequestData( + fakeRequest as ServerRequest, + fakeResponse as ServerResponse, + 1.0000000001 + ); + assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); + }); +}); From 5e61e5beb010b6ee7b8290d1403822a1efb8daec Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Jun 2021 03:14:40 -0700 Subject: [PATCH 0766/1029] fix: Report warning on `.github/workflows/ci.yaml` (#1110) (#1089) * fix: Report warning on `.github/workflows/ci.yaml` Not all files in `.github/workflows` are managed, only `ci.yaml`. Related false-positive: https://github.com/googleapis/repo-automation-bots/pull/1952#issuecomment-856142886 * fix: Report warning on `.github/workflows/ci.yaml` Not all files in `.github/workflows` are managed, only `ci.yaml`. Source-Link: https://github.com/googleapis/synthtool/commit/2430f8d90ed8a508e8422a3a7191e656d5a6bf53 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:14aaee566d6fc07716bb92da416195156e47a4777e7d1cd2bb3e28c46fe30fe2 Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.github/generated-files-bot.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 043a606639e..3a93af921f1 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:f4734af778c3d0eb58a6db0078907a87f2e53f3c7a6422363fc37ee52e02b25a + digest: sha256:14aaee566d6fc07716bb92da416195156e47a4777e7d1cd2bb3e28c46fe30fe2 diff --git a/handwritten/logging/.github/generated-files-bot.yml b/handwritten/logging/.github/generated-files-bot.yml index 6b04910c0fb..7bb7ce54c58 100644 --- a/handwritten/logging/.github/generated-files-bot.yml +++ b/handwritten/logging/.github/generated-files-bot.yml @@ -3,8 +3,8 @@ generatedFiles: message: '`.kokoro` files are templated and should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' - path: '.github/CODEOWNERS' message: 'CODEOWNERS should instead be modified via the `codeowner_team` property in .repo-metadata.json' -- path: '.github/workflows/**' - message: '`.github/workflows` (GitHub Actions) should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' +- path: '.github/workflows/ci.yaml' + message: '`.github/workflows/ci.yaml` (GitHub Actions) should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' - path: '.github/generated-files-bot.+(yml|yaml)' message: '`.github/generated-files-bot.(yml|yaml)` should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' - path: 'README.md' From ede6767047f650001bcd3c014fe9eff9385a2538 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Jun 2021 19:24:22 +0000 Subject: [PATCH 0767/1029] chore(nodejs): use cloud-rad publication process (#1112) (#1093) VERSION is used in @google-cloud/cloud-rad to publish ref docs for a particular version. Pass VERSION in via Stubby or Fusion. Source-Link: https://github.com/googleapis/synthtool/commit/740366bbb9a7e0f4b77fc75dc26be1d3a376c3e0 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:bbdd52de226c00df3356cdf25460397b429ab49552becca645adbc412f6a4ed5 --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- .../logging/.kokoro/release/docs-devsite.cfg | 2 +- .../logging/.kokoro/release/docs-devsite.sh | 48 ++----------------- handwritten/logging/.trampolinerc | 3 +- 4 files changed, 7 insertions(+), 48 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 3a93af921f1..f6467c3a493 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:14aaee566d6fc07716bb92da416195156e47a4777e7d1cd2bb3e28c46fe30fe2 + digest: sha256:bbdd52de226c00df3356cdf25460397b429ab49552becca645adbc412f6a4ed5 diff --git a/handwritten/logging/.kokoro/release/docs-devsite.cfg b/handwritten/logging/.kokoro/release/docs-devsite.cfg index cd65d1c2609..08598059678 100644 --- a/handwritten/logging/.kokoro/release/docs-devsite.cfg +++ b/handwritten/logging/.kokoro/release/docs-devsite.cfg @@ -11,7 +11,7 @@ before_action { # doc publications use a Python image. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } # Download trampoline resources. diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh index 7657be3377a..2198e67fe92 100755 --- a/handwritten/logging/.kokoro/release/docs-devsite.sh +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2019 Google LLC +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ set -eo pipefail -# build jsdocs (Python is installed on the Node 10 docker image). if [[ -z "$CREDENTIALS" ]]; then # if CREDENTIALS are explicitly set, assume we're testing locally # and don't set NPM_CONFIG_PREFIX. @@ -25,47 +24,6 @@ if [[ -z "$CREDENTIALS" ]]; then cd $(dirname $0)/../.. fi -mkdir ./etc - npm install -npm run api-extractor -npm run api-documenter - -npm i json@9.0.6 -g -NAME=$(cat .repo-metadata.json | json name) - -mkdir ./_devsite -cp ./yaml/$NAME/* ./_devsite - -# Clean up TOC -# Delete SharePoint item, see https://github.com/microsoft/rushstack/issues/1229 -sed -i -e '1,3d' ./yaml/toc.yml -sed -i -e 's/^ //' ./yaml/toc.yml -# Delete interfaces from TOC (name and uid) -sed -i -e '/name: I[A-Z]/{N;d;}' ./yaml/toc.yml -sed -i -e '/^ *\@google-cloud.*:interface/d' ./yaml/toc.yml - -cp ./yaml/toc.yml ./_devsite/toc.yml - -# create docs.metadata, based on package.json and .repo-metadata.json. -pip install -U pip -python3 -m pip install --user gcp-docuploader -python3 -m docuploader create-metadata \ - --name=$NAME \ - --version=$(cat package.json | json version) \ - --language=$(cat .repo-metadata.json | json language) \ - --distribution-name=$(cat .repo-metadata.json | json distribution_name) \ - --product-page=$(cat .repo-metadata.json | json product_documentation) \ - --github-repository=$(cat .repo-metadata.json | json repo) \ - --issue-tracker=$(cat .repo-metadata.json | json issue_tracker) -cp docs.metadata ./_devsite/docs.metadata - -# deploy the docs. -if [[ -z "$CREDENTIALS" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi -if [[ -z "$BUCKET" ]]; then - BUCKET=docs-staging-v2 -fi - -python3 -m docuploader upload ./_devsite --destination-prefix docfx --credentials $CREDENTIALS --staging-bucket $BUCKET +npm install --no-save @google-cloud/cloud-rad@^0.2.5 +npx @google-cloud/cloud-rad \ No newline at end of file diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 0171fdf756b..18b3089b5f5 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -21,7 +21,8 @@ required_envvars+=() pass_down_envvars+=( "ENVIRONMENT" "RUNTIME" - "AUTORELEASE_PR" + "AUTORELEASE_PR", + "VERSION" ) # Prevent unintentional override on the default image. From 70dd6ac850789e470be5ad2ed547ae430b4e25b9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Jun 2021 21:09:59 -0700 Subject: [PATCH 0768/1029] build: add auto-approve to Node libraries (#1100) (#1095) * build: add auto-approve to Node libraries Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/5cae043787729a908ed0cab28ca27baf9acee3c4 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:65aa68f2242c172345d7c1e780bced839bfdc344955d6aa460aa63b4481d93e5 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.github/CODEOWNERS | 3 +++ handwritten/logging/.github/auto-approve.yml | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 handwritten/logging/.github/auto-approve.yml diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index f6467c3a493..1b520297430 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:bbdd52de226c00df3356cdf25460397b429ab49552becca645adbc412f6a4ed5 + digest: sha256:65aa68f2242c172345d7c1e780bced839bfdc344955d6aa460aa63b4481d93e5 diff --git a/handwritten/logging/.github/CODEOWNERS b/handwritten/logging/.github/CODEOWNERS index 89a1c2bf4ce..cba4ffcf939 100644 --- a/handwritten/logging/.github/CODEOWNERS +++ b/handwritten/logging/.github/CODEOWNERS @@ -7,3 +7,6 @@ # The yoshi-nodejs team is the default owner for nodejs repositories. * @googleapis/yoshi-nodejs @googleapis/api-logging + +# The github automation team is the default owner for the auto-approve file. +.github/auto-approve.yml @googleapis/github-automation diff --git a/handwritten/logging/.github/auto-approve.yml b/handwritten/logging/.github/auto-approve.yml new file mode 100644 index 00000000000..903697974b0 --- /dev/null +++ b/handwritten/logging/.github/auto-approve.yml @@ -0,0 +1,7 @@ +rules: +- author: "release-please[bot]" + title: "^chore: release" + changedFiles: + - "package\\.json$" + - "CHANGELOG\\.md$" + maxFiles: 3 \ No newline at end of file From 8ee3560eccc70ac9490efd93fd3f6cf237da15a2 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 10 Jun 2021 23:02:31 +0200 Subject: [PATCH 0769/1029] chore(nodejs): remove api-extractor dependencies (#1096) --- handwritten/logging/package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ac1924d9a25..a5ca29ec5fd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -42,8 +42,6 @@ "pretest": "npm run compile", "test": "c8 mocha build/test", "precompile": "gts clean", - "api-extractor": "api-extractor run --local", - "api-documenter": "api-documenter yaml --input-folder=temp", "postpublish": "./.kokoro/publish-min.sh" }, "dependencies": { @@ -95,8 +93,6 @@ "uuid": "^8.0.0", "webpack": "^5.0.0", "webpack-cli": "^4.0.0", - "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10", "uglify-js": "^3.13.5" }, "engines": { From 352ffa51039f9f43bfdf74f86acdb6dafd02566f Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Fri, 11 Jun 2021 08:33:16 +0700 Subject: [PATCH 0770/1029] feat: detect Google and W3C trace context (including in middleware) (#1088) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: middleware propagates spanId * style: better comments explaining scenarios with middleware * test: makemiddleware propagates spanId * refactor: middleware and nonmiddleware share the same module * feat: non-middleware, w3c users can get trace & span * test: getOrInjectTraceParent unit tests * test: http-request unit tests passing * test: added entry unit tests * fix: do not mutate user provided entry * refactor * test: log tests passing * 🦉 Updates from OwlBot * fix: allow span and tracesampled to be optional for middleware * fix: getCloudContext should always return 3 properties * 🦉 Updates from OwlBot * remove random comment * test: fix e2e test * 🦉 Updates from OwlBot * refactor: move context out of http-request module * 🦉 Updates from OwlBot * refactor: move toCloudTrace logic out of getTraceContext * feat: added custom header extract and inject logic * tests passing * 🦉 Updates from OwlBot * lint * test: all context unit tests passing * 🦉 Updates from OwlBot * test: e2e test for traceparent * 🦉 Updates from OwlBot * test: e2e test added for traceparent detection * lint * docs: more detail * style: last nits * fix: traceSampled defaults to false * 🦉 Updates from OwlBot Co-authored-by: Owl Bot --- handwritten/logging/package.json | 1 - handwritten/logging/src/context.ts | 236 ++++++++++++++++ handwritten/logging/src/entry.ts | 69 +++-- handwritten/logging/src/http-request.ts | 83 +++++- handwritten/logging/src/log.ts | 19 +- handwritten/logging/src/make-http-request.ts | 92 ------- handwritten/logging/src/middleware/context.ts | 46 ---- .../src/middleware/express/make-middleware.ts | 49 +++- handwritten/logging/system-test/logging.ts | 39 ++- handwritten/logging/test/context.ts | 253 ++++++++++++++++++ handwritten/logging/test/entry.ts | 88 +----- handwritten/logging/test/http-request.ts | 113 ++++++++ handwritten/logging/test/log.ts | 18 +- .../express/test-make-middleware.ts | 46 +++- .../logging/test/middleware/test-context.ts | 88 ------ .../logging/test/test-make-http-request.ts | 97 ------- 16 files changed, 858 insertions(+), 479 deletions(-) create mode 100644 handwritten/logging/src/context.ts delete mode 100644 handwritten/logging/src/make-http-request.ts delete mode 100644 handwritten/logging/src/middleware/context.ts create mode 100644 handwritten/logging/test/context.ts create mode 100644 handwritten/logging/test/http-request.ts delete mode 100644 handwritten/logging/test/middleware/test-context.ts delete mode 100644 handwritten/logging/test/test-make-http-request.ts diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a5ca29ec5fd..2f54604f697 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -49,7 +49,6 @@ "@google-cloud/paginator": "^3.0.0", "@google-cloud/projectify": "^2.0.0", "@google-cloud/promisify": "^2.0.0", - "@opencensus/propagation-stackdriver": "0.0.22", "arrify": "^2.0.1", "dot-prop": "^6.0.0", "eventid": "^1.0.0", diff --git a/handwritten/logging/src/context.ts b/handwritten/logging/src/context.ts new file mode 100644 index 00000000000..9823ccebbe2 --- /dev/null +++ b/handwritten/logging/src/context.ts @@ -0,0 +1,236 @@ +/*! + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file contains helper functions, used in both middleware and + * non-middleware scenarios, to extract trace, span and traceSampled properties + * from available HTTP header context. + * + * Specifically: + * - We extract trace context if `traceparent` is available via W3 protocol + * - We extract trace context if `X-Cloud-Trace-Context` is available from the + * user or Google Cloud Trace. + * - In the middleware scenario, we auto-inject a Google trace context if one + * is not available. + */ + +import * as http from 'http'; +import * as uuid from 'uuid'; +import * as crypto from 'crypto'; + +/** Header that carries span context across Google infrastructure. */ +export const X_CLOUD_TRACE_HEADER = 'x-cloud-trace-context'; +const SPAN_ID_RANDOM_BYTES = 8; +const spanIdBuffer = Buffer.alloc(SPAN_ID_RANDOM_BYTES); +const randomFillSync = crypto.randomFillSync; +const randomBytes = crypto.randomBytes; +const spanRandomBuffer = randomFillSync + ? () => randomFillSync(spanIdBuffer) + : () => randomBytes(SPAN_ID_RANDOM_BYTES); + +/** Header that carries span context across W3C compliant infrastructure. */ +export const W3C_TRACE_PARENT_HEADER = 'traceparent'; + +/** + * An transport and environment neutral API for getting request headers. + */ +export interface HeaderWrapper { + getHeader(name: string): string | string[] | undefined; + setHeader(name: string, value: string): void; +} + +/** + * makeHeaderWrapper returns a wrapper with set and get header functionality, + * returning null if the incoming request object doesn't contain the 'header' + * propery. + * @param req + */ +export function makeHeaderWrapper( + req: http.IncomingMessage +): HeaderWrapper | null { + if (!req.headers) return null; + const wrapper = { + setHeader(name: string, value: string) { + req.headers[name] = value; + }, + getHeader(name: string) { + return req.headers[name]; + }, + }; + return wrapper; +} + +/** + * CloudTraceContext: Cloud Logging compliant trace context. + */ +export interface CloudTraceContext { + trace: string; + spanId?: string; + traceSampled?: boolean; +} + +/** + * getOrInjectContext returns a CloudTraceContext with as many available trace + * and span properties as possible. It examines HTTP headers for trace context. + * Optionally, it can inject a Google compliant trace context when no context is + * available from headers. + * + * @param req + * @param projectId + * @param inject + */ +export function getOrInjectContext( + req: http.IncomingMessage, + projectId: string, + inject?: boolean +): CloudTraceContext { + const defaultContext = toCloudTraceContext({}, projectId); + const wrapper = makeHeaderWrapper(req); + if (wrapper) { + // Detect 'traceparent' header. + const traceContext = getContextFromTraceParent(wrapper, projectId); + if (traceContext) return traceContext; + // Detect 'X-Cloud-Trace-Context' header. + const cloudContext = getContextFromXCloudTrace(wrapper, projectId); + if (cloudContext) return cloudContext; + // Optional: Generate and inject a context for the user as last resort. + if (inject) { + wrapper.setHeader(X_CLOUD_TRACE_HEADER, makeCloudTraceHeader()); + return getContextFromXCloudTrace(wrapper, projectId)!; + } + } + return defaultContext; +} + +/** + * toCloudTraceContext converts any context format to cloudTraceContext format. + * @param context + * @param projectId + */ +function toCloudTraceContext( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + anyContext: any, + projectId: string +): CloudTraceContext { + const context: CloudTraceContext = { + trace: '', + }; + if (anyContext?.trace) { + context.trace = `projects/${projectId}/traces/${anyContext.trace}`; + } + if (anyContext?.spanId) { + context.spanId = anyContext.spanId; + } + if ('traceSampled' in anyContext) { + context.traceSampled = anyContext.traceSampled; + } + return context; +} + +/** + * makeCloudTraceHeader generates valid X-Cloud-Trace-Context trace and spanId. + */ +function makeCloudTraceHeader(): string { + const trace = uuid.v4().replace(/-/g, ''); + const spanId = spanRandomBuffer().toString('hex'); + return `${trace}/${spanId}`; +} + +/** + * getContextFromXCloudTrace looks for the HTTP header 'x-cloud-trace-context' + * per Google Cloud specifications for Cloud Tracing. + * + * @param headerWrapper + * @param projectId + */ +export function getContextFromXCloudTrace( + headerWrapper: HeaderWrapper, + projectId: string +): CloudTraceContext | null { + const context = parseXCloudTraceHeader(headerWrapper); + if (!context) return null; + return toCloudTraceContext(context, projectId); +} + +/** + * getOrInjectTraceParent looks for the HTTP header 'traceparent' + * per W3C specifications for OpenTelemetry and OpenCensus + * Read more about W3C protocol: https://www.w3.org/TR/trace-context/ + * + * @param headerWrapper + * @param projectId + */ +export function getContextFromTraceParent( + headerWrapper: HeaderWrapper, + projectId: string +): CloudTraceContext | null { + const context = parseTraceParentHeader(headerWrapper); + if (!context) return null; + return toCloudTraceContext(context, projectId); +} + +/** + * parseXCloudTraceHeader looks for trace context in `X-Cloud-Trace-Context` + * header + * @param headerWrapper + */ +export function parseXCloudTraceHeader( + headerWrapper: HeaderWrapper +): CloudTraceContext | null { + const regex = /([a-f\d]+)?(\/?([a-f\d]+))?(;?o=(\d))?/; + const match = headerWrapper + .getHeader(X_CLOUD_TRACE_HEADER) + ?.toString() + .match(regex); + if (!match) return null; + return { + trace: match[1], + spanId: match[3], + traceSampled: match[5] === '1', + }; +} + +/** + * parseTraceParentHeader is a custom implementation of the `parseTraceParent` + * function in @opentelemetry-core/trace. + * For more information see {@link https://www.w3.org/TR/trace-context/} + * @param headerWrapper + */ +export function parseTraceParentHeader( + headerWrapper: HeaderWrapper +): CloudTraceContext | null { + const VERSION_PART = '(?!ff)[\\da-f]{2}'; + const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; + const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; + const FLAGS_PART = '[\\da-f]{2}'; + const TRACE_PARENT_REGEX = new RegExp( + `^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$` + ); + const match = headerWrapper + .getHeader(W3C_TRACE_PARENT_HEADER) + ?.toString() + .match(TRACE_PARENT_REGEX); + if (!match) return null; + // According to the specification the implementation should be compatible + // with future versions. If there are more parts, we only reject it if it's using version 00 + // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent + if (match[1] === '00' && match[5]) return null; + return { + trace: match[2], + spanId: match[3], + traceSampled: parseInt(match[4], 16) === 1, + }; +} diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index e34dabcb62c..3043b1fe2c6 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -19,8 +19,8 @@ const EventId = require('eventid'); import * as extend from 'extend'; import {google} from '../protos/protos'; import {objToStruct, structToObj} from './common'; -import {CloudLoggingHttpRequest} from './http-request'; -import {makeHttpRequestData} from './make-http-request'; +import {makeHttpRequestData, CloudLoggingHttpRequest} from './http-request'; +import {CloudTraceContext, getOrInjectContext} from './context'; import * as http from 'http'; const eventId = new EventId(); @@ -162,12 +162,11 @@ class Entry { * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry * * @param {object} [options] Configuration object. + * @param projectId * @param {boolean} [options.removeCircular] Replace circular references in an * object with a string value, `[Circular]`. */ - toJSON(options: ToJsonOptions = {}) { - // Format raw httpRequest and trace/span if available. - this.formatHttpRequest(); + toJSON(options: ToJsonOptions = {}, projectId = '') { const entry = extend(true, {}, this.metadata) as {} as EntryJson; // Format log message if (Object.prototype.toString.call(this.data) === '[object Object]') { @@ -197,46 +196,42 @@ class Entry { nanos: nanoSecs ? Number(nanoSecs.padEnd(9, '0')) : 0, }; } + // Format httpRequest + const req = this.metadata.httpRequest; + if ( + req && + ('statusCode' in req || + 'headers' in req || + 'method' in req || + 'url' in req) + ) { + entry.httpRequest = makeHttpRequestData(req); + } + // Format trace and span + const traceContext = this.extractTraceFromHeaders(projectId); + if (traceContext) { + if (!this.metadata.trace && traceContext.trace) + entry.trace = traceContext.trace; + if (!this.metadata.spanId && traceContext.spanId) + entry.spanId = traceContext.spanId; + if (this.metadata.traceSampled === undefined) + entry.traceSampled = traceContext.traceSampled; + } return entry; } /** - * Formats raw incoming request objects into a GCP structured HTTPRequest. - * Formats trace & span if users provided X-Cloud-Trace-Context in header. - * See more: https://cloud.google.com/trace/docs/setup#force-trace - * "X-Cloud-Trace-Context: TRACE_ID/SPAN_ID;o=TRACE_TRUE" - * for example: - * "X-Cloud-Trace-Context: 105445aa7843bc8bf206b120001000/1;o=1" - * Note: logs from middleware are already formatted. - * + * extractTraceFromHeaders extracts trace and span information from raw HTTP + * request headers only. * @private */ - private formatHttpRequest() { + private extractTraceFromHeaders(projectId: string): CloudTraceContext | null { const rawReq = this.metadata.httpRequest; - if (rawReq) { - // Handle raw http requests. - if ( - 'statusCode' in rawReq || - 'headers' in rawReq || - 'method' in rawReq || - 'url' in rawReq - ) - this.metadata.httpRequest = makeHttpRequestData(rawReq); - // Infer trace & span if not user specified already. - if ('headers' in rawReq && rawReq.headers['x-cloud-trace-context']) { - const regex = /([a-f\d]+)?(\/?([a-f\d]+))?(;?o=(\d))?/; - const match = rawReq.headers['x-cloud-trace-context'] - .toString() - .match(regex); - if (match) { - if (!this.metadata.trace && match[1]) this.metadata.trace = match[1]; - if (!this.metadata.spanId && match[3]) - this.metadata.spanId = match[3]; - if (this.metadata.traceSampled === undefined && match[5]) - this.metadata.traceSampled = match[5] === '1'; - } - } + if (rawReq && 'headers' in rawReq) { + // TODO: later we may want to switch this to true. + return getOrInjectContext(rawReq, projectId, false); } + return null; } /** diff --git a/handwritten/logging/src/http-request.ts b/handwritten/logging/src/http-request.ts index 4c1cd24ca60..774d28b4bc7 100644 --- a/handwritten/logging/src/http-request.ts +++ b/handwritten/logging/src/http-request.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2018 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,15 @@ * limitations under the License. */ +/* + * This file contains helpers, used in both middleware and non-middleware + * scenarios, to format http.incomingMessage into structured HTTPRequests. + * + * See more: + * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#httprequest + */ + +import * as http from 'http'; export interface CloudLoggingHttpRequest { requestMethod?: string; requestUrl?: string; @@ -31,3 +40,75 @@ export interface CloudLoggingHttpRequest { cacheFillBytes?: number; protocol?: string; } + +/** + * Abstraction of http.IncomingMessage used by middleware implementation. + */ +export interface ServerRequest extends http.IncomingMessage { + originalUrl: string; +} + +/** + * makeHttpRequestData turns raw incoming HTTPRequests into structured + * HTTPRequest objects interpreted by Cloud Logging. + * + * @param req + * @param res + * @param latencyMilliseconds + */ +export function makeHttpRequestData( + req: ServerRequest | http.IncomingMessage, + res?: http.ServerResponse, + latencyMilliseconds?: number +): CloudLoggingHttpRequest { + let requestUrl, + protocol, + requestMethod, + userAgent, + referer, + status, + responseSize, + latency; + // Format request properties + if (req.url) { + requestUrl = req.url; + const url = new URL(requestUrl); + protocol = url.protocol; + } + // OriginalURL overwrites inferred url + if ('originalUrl' in req && req.originalUrl) { + requestUrl = req.originalUrl; + const url = new URL(requestUrl); + protocol = url.protocol; + } + req.method ? (requestMethod = req.method) : null; + if (req.headers && req.headers['user-agent']) { + req.headers['user-agent'] ? (userAgent = req.headers['user-agent']) : null; + req.headers['referer'] ? (referer = req.headers['referer']) : null; + } + // Format response properties + if (res) { + res.statusCode ? (status = res.statusCode) : null; + responseSize = + (res.getHeader && Number(res.getHeader('Content-Length'))) || 0; + } + // Format latency + if (latencyMilliseconds) { + latency = { + seconds: Math.floor(latencyMilliseconds / 1e3), + nanos: Math.floor((latencyMilliseconds % 1e3) * 1e6), + }; + } + // Only include the property if its value exists + return Object.assign( + {}, + requestUrl ? {requestUrl} : null, + protocol ? {protocol} : null, + requestMethod ? {requestMethod} : null, + userAgent ? {userAgent} : null, + referer ? {referer} : null, + responseSize ? {responseSize} : null, + status ? {status} : null, + latency ? {latency} : null + ); +} diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index d2af60aa5d0..1faf263c17b 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -903,14 +903,17 @@ class Log implements LogSeverityFunctions { // writeWithResource formats entries and writes them to loggingService API. // Service expects props: logName, resource, labels, partialSuccess, dryRun. async function writeWithResource(resource: {} | null) { + const projectId = await self.logging.auth.getProjectId(); let decoratedEntries: EntryJson[]; try { - decoratedEntries = self.decorateEntries(arrify(entry) as Entry[]); + decoratedEntries = self.decorateEntries( + arrify(entry) as Entry[], + projectId + ); } catch (err) { // Ignore errors (the API will speak up if it has an issue). } self.truncateEntries(decoratedEntries!); - const projectId = await self.logging.auth.getProjectId(); self.formattedName_ = Log.formatName_(projectId, self.name); const reqOpts = extend( { @@ -947,18 +950,22 @@ class Log implements LogSeverityFunctions { * * @private * + * @param {string} projectId - Google project ID. * @param {object[]} entries - Entry objects. * @returns {object[]} Serialized entries. * @throws if there is an error during serialization. */ - private decorateEntries(entries: Entry[]): EntryJson[] { + private decorateEntries(entries: Entry[], projectId: string): EntryJson[] { return entries.map(entry => { if (!(entry instanceof Entry)) { entry = this.entry(entry); } - return entry.toJSON({ - removeCircular: this.removeCircular_, - }); + return entry.toJSON( + { + removeCircular: this.removeCircular_, + }, + projectId + ); }); } diff --git a/handwritten/logging/src/make-http-request.ts b/handwritten/logging/src/make-http-request.ts deleted file mode 100644 index 507f0539eb9..00000000000 --- a/handwritten/logging/src/make-http-request.ts +++ /dev/null @@ -1,92 +0,0 @@ -/*! - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as http from 'http'; - -import {CloudLoggingHttpRequest} from './http-request'; - -/** - * Abstraction of http.IncomingMessage used by middleware implementation. - */ -export interface ServerRequest extends http.IncomingMessage { - originalUrl: string; -} - -/** - * makeHttpRequestData turns raw incoming HTTPRequests into structured - * HTTPRequest objects interpreted by Cloud Logging. See more: - * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#httprequest - * - * @param req - * @param res - * @param latencyMilliseconds - */ -export function makeHttpRequestData( - req: ServerRequest | http.IncomingMessage, - res?: http.ServerResponse, - latencyMilliseconds?: number -): CloudLoggingHttpRequest { - let requestUrl, - protocol, - requestMethod, - userAgent, - referer, - status, - responseSize, - latency; - // Format request properties - if (req.url) { - requestUrl = req.url; - const url = new URL(requestUrl); - protocol = url.protocol; - } - // OriginalURL overwrites inferred url - if ('originalUrl' in req && req.originalUrl) { - requestUrl = req.originalUrl; - const url = new URL(requestUrl); - protocol = url.protocol; - } - req.method ? (requestMethod = req.method) : null; - if (req.headers && req.headers['user-agent']) { - req.headers['user-agent'] ? (userAgent = req.headers['user-agent']) : null; - req.headers['referer'] ? (referer = req.headers['referer']) : null; - } - // Format response properties - if (res) { - res.statusCode ? (status = res.statusCode) : null; - responseSize = - (res.getHeader && Number(res.getHeader('Content-Length'))) || 0; - } - // Format latency - if (latencyMilliseconds) { - latency = { - seconds: Math.floor(latencyMilliseconds / 1e3), - nanos: Math.floor((latencyMilliseconds % 1e3) * 1e6), - }; - } - // Only include the property if its value exists - return Object.assign( - {}, - requestUrl ? {requestUrl} : null, - protocol ? {protocol} : null, - requestMethod ? {requestMethod} : null, - userAgent ? {userAgent} : null, - referer ? {referer} : null, - responseSize ? {responseSize} : null, - status ? {status} : null, - latency ? {latency} : null - ); -} diff --git a/handwritten/logging/src/middleware/context.ts b/handwritten/logging/src/middleware/context.ts deleted file mode 100644 index 9eb3e461f41..00000000000 --- a/handwritten/logging/src/middleware/context.ts +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as context from '@opencensus/propagation-stackdriver'; -import * as http from 'http'; - -export type HeaderWrapper = context.HeaderGetter & context.HeaderSetter; - -export function makeHeaderWrapper(req: http.IncomingMessage): HeaderWrapper { - const wrapper = { - setHeader(name: string, value: string) { - req.headers[name] = value; - }, - getHeader(name: string) { - return req.headers[name]; - }, - }; - return wrapper; -} - -export function getOrInjectContext( - headerWrapper: HeaderWrapper -): context.SpanContext { - let spanContext = context.extract(headerWrapper); - if (spanContext) { - return spanContext; - } - - // We were the first actor to detect lack of context. Establish context. - spanContext = context.generate(); - context.inject(headerWrapper, spanContext); - return spanContext; -} diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index c9c592bb23b..c5c852a68d9 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -16,10 +16,12 @@ import * as http from 'http'; import onFinished = require('on-finished'); -import {getOrInjectContext, makeHeaderWrapper} from '../context'; - -import {makeHttpRequestData, ServerRequest} from '../../make-http-request'; -import {CloudLoggingHttpRequest} from '../../http-request'; +import {getOrInjectContext} from '../../context'; +import { + makeHttpRequestData, + ServerRequest, + CloudLoggingHttpRequest, +} from '../../http-request'; interface AnnotatedRequestType extends ServerRequest { log: LoggerType; @@ -43,27 +45,46 @@ interface AnnotatedRequestType extends ServerRequest { */ export function makeMiddleware( projectId: string, - makeChildLogger: (trace: string) => LoggerType, - emitRequestLog?: (httpRequest: CloudLoggingHttpRequest, trace: string) => void + makeChildLogger: ( + trace: string, + span?: string, + traceSampled?: boolean + ) => LoggerType, + emitRequestLog?: ( + httpRequest: CloudLoggingHttpRequest, + trace: string, + span?: string, + traceSampled?: boolean + ) => void ) { return (req: ServerRequest, res: http.ServerResponse, next: Function) => { // TODO(ofrobots): use high-resolution timer. const requestStartMs = Date.now(); - const wrapper = makeHeaderWrapper(req); - - const spanContext = getOrInjectContext(wrapper); - const trace = `projects/${projectId}/traces/${spanContext.traceId}`; + // Detect & establish context if we were the first actor to detect lack of + // context so traceContext is always available when using middleware. + const traceContext = getOrInjectContext(req, projectId, true); - // Install a child logger on the request object. - (req as AnnotatedRequestType).log = makeChildLogger(trace); + // Install a child logger on the request object, with detected trace and + // span. + (req as AnnotatedRequestType).log = makeChildLogger( + traceContext.trace, + traceContext.spanId, + traceContext.traceSampled + ); + // Emit a 'Request Log' on the parent logger, with detected trace and + // span. if (emitRequestLog) { - // Emit a 'Request Log' on the parent logger. onFinished(res, () => { const latencyMs = Date.now() - requestStartMs; const httpRequest = makeHttpRequestData(req, res, latencyMs); - emitRequestLog(httpRequest, trace); + emitRequestLog( + httpRequest, + traceContext.trace, + traceContext.spanId, + traceContext.traceSampled + ); }); } diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 8643f29598d..68be589b6a4 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -639,7 +639,7 @@ describe('Logging', () => { }); }); - it('should write a raw http request log with message', done => { + it('should write a request log with x-cloud-trace-context header', done => { const {log} = getTestLog(); const URL = 'http://www.google.com'; // Use the response of a http request as the incomingmessage request obj. @@ -658,7 +658,10 @@ describe('Logging', () => { assert.strictEqual(entry.data, 'some log message'); assert.strictEqual(entry.metadata.httpRequest?.requestUrl, URL); assert.strictEqual(entry.metadata.httpRequest?.protocol, 'http:'); - assert.strictEqual(entry.metadata.trace, '1'); + assert.strictEqual( + entry.metadata.trace, + `projects/${PROJECT_ID}/traces/1` + ); assert.strictEqual(entry.metadata.spanId, '2'); assert.strictEqual(entry.metadata.traceSampled, true); done(); @@ -667,6 +670,38 @@ describe('Logging', () => { }); }); + it('should write a http request log with traceparent header', done => { + const {log} = getTestLog(); + const URL = 'http://www.google.com'; + // Use the response of a http request as the incomingmessage request obj. + http.get(URL, res => { + res.url = URL; + res.headers = { + traceparent: + '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', + }; + const metadata = {httpRequest: res}; + const logEntry = log.entry(metadata, 'some log message'); + log.write(logEntry, err => { + assert.ifError(err); + getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { + assert.ifError(err); + const entry = entries![0]; + assert.strictEqual(entry.data, 'some log message'); + assert.strictEqual(entry.metadata.httpRequest?.requestUrl, URL); + assert.strictEqual(entry.metadata.httpRequest?.protocol, 'http:'); + assert.strictEqual( + entry.metadata.trace, + `projects/${PROJECT_ID}/traces/0af7651916cd43dd8448eb211c80319c` + ); + assert.strictEqual(entry.metadata.spanId, 'b7ad6b7169203331'); + assert.strictEqual(entry.metadata.traceSampled, true); + done(); + }); + }); + }); + }); + it('should set the default resource', done => { const {log} = getTestLog(); diff --git a/handwritten/logging/test/context.ts b/handwritten/logging/test/context.ts new file mode 100644 index 00000000000..102b6ae8e1e --- /dev/null +++ b/handwritten/logging/test/context.ts @@ -0,0 +1,253 @@ +/*! + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +import * as http from 'http'; +import { + getOrInjectContext, + makeHeaderWrapper, + parseXCloudTraceHeader, + parseTraceParentHeader, +} from '../src/context'; + +describe('context', () => { + describe('makeHeaderWrapper', () => { + const HEADER_NAME = 'Content-Type'; + const HEADER_VALUE = 'application/🎂'; + + it('should correctly get request headers', () => { + const req = {headers: {[HEADER_NAME]: HEADER_VALUE}}; + const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); + assert.strictEqual(wrapper!.getHeader(HEADER_NAME), HEADER_VALUE); + }); + + it('should correctly set request headers', () => { + const req = {headers: {} as http.IncomingHttpHeaders}; + const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); + wrapper!.setHeader(HEADER_NAME, HEADER_VALUE); + assert.strictEqual(req.headers[HEADER_NAME], HEADER_VALUE); + }); + + it('should return null if header property is not in http request', () => { + const req = { + method: 'GET', + } as http.IncomingMessage; + const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); + assert.strictEqual(wrapper, null); + }); + }); + + describe('getOrInjectContext', () => { + it('should return a default trace context when all detection fails', () => { + const req = { + method: 'GET', + } as http.IncomingMessage; + const context = getOrInjectContext(req, 'myProj'); + assert.strictEqual(context.trace, ''); + assert.strictEqual(context.spanId, undefined); + assert.strictEqual(context.traceSampled, undefined); + }); + + it('should return a formatted W3C trace context first', () => { + const req = { + headers: { + ['traceparent']: + '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', + }, + } as unknown as http.IncomingMessage; + const context = getOrInjectContext(req, 'myProj'); + assert(context.trace, '0af7651916cd43dd8448eb211c80319c'); + assert(context.spanId, 'b7ad6b7169203331'); + assert.strictEqual(context.traceSampled, true); + }); + + it('should return a formatted Google trace context next', () => { + const req = { + headers: {['x-cloud-trace-context']: '1/2;o=1'}, + } as unknown as http.IncomingMessage; + const projectId = 'myProj'; + const context = getOrInjectContext(req, projectId); + assert.strictEqual(context.trace, `projects/${projectId}/traces/1`); + assert.strictEqual(context.spanId, '2'); + assert.strictEqual(context.traceSampled, true); + }); + + it('should intentionally inject a Google trace context', () => { + const req = {headers: {}} as http.IncomingMessage; + const projectId = 'myProj'; + // This should generate a span and trace if not available. + const context = getOrInjectContext(req, projectId, true); + assert(context.trace.includes(`projects/${projectId}/traces/`)); + assert(context.spanId!.length > 0); + assert.strictEqual(context.traceSampled, false); + }); + }); + + describe('parseXCloudTraceHeader', () => { + it('should extract trace properties from X-Cloud-Trace-Context', () => { + const tests = [ + { + header: '105445aa7843bc8bf206b120001000/000000001;o=1', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '000000001', + traceSampled: true, + }, + }, + // TraceSampled is false + { + header: '105445aa7843bc8bf206b120001000/000000001;o=0', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '000000001', + traceSampled: false, + }, + }, + { + // No span + header: '105445aa7843bc8bf206b120001000;o=1', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: undefined, + traceSampled: true, + }, + }, + { + // No trace + header: '/105445aa7843bc8bf206b120001000;o=0', + expected: { + trace: undefined, + spanId: '105445aa7843bc8bf206b120001000', + traceSampled: false, + }, + }, + { + // No traceSampled + header: '105445aa7843bc8bf206b120001000/0', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '0', + traceSampled: false, + }, + }, + { + // No input + header: '', + expected: { + trace: undefined, + spanId: undefined, + traceSampled: false, + }, + }, + ]; + for (const test of tests) { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + req.headers = { + 'x-cloud-trace-context': test.header, + }; + + const wrapper = makeHeaderWrapper(req); + const context = parseXCloudTraceHeader(wrapper!); + if (context) { + assert.strictEqual( + context.trace, + test.expected.trace, + `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}` + ); + assert.strictEqual( + context.spanId, + test.expected.spanId, + `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}` + ); + assert.strictEqual( + context.traceSampled, + test.expected.traceSampled, + `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}` + ); + } else { + assert.fail(); + } + } + }); + }); + + describe('parseTraceParentHeader', () => { + it('should extract trace properties from traceparent', () => { + const tests = [ + { + header: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', + expected: { + trace: '0af7651916cd43dd8448eb211c80319c', + spanId: 'b7ad6b7169203331', + traceSampled: true, + }, + }, + // TraceSampled is false + { + header: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-00', + expected: { + trace: '0af7651916cd43dd8448eb211c80319c', + spanId: 'b7ad6b7169203331', + traceSampled: false, + }, + }, + { + // No input + header: '', + expected: { + trace: undefined, + spanId: undefined, + traceSampled: false, + }, + }, + ]; + for (const test of tests) { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + req.headers = { + traceparent: test.header, + }; + + const wrapper = makeHeaderWrapper(req); + const context = parseTraceParentHeader(wrapper!); + if (context) { + assert.strictEqual( + context.trace, + test.expected.trace, + `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}` + ); + assert.strictEqual( + context.spanId, + test.expected.spanId, + `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}` + ); + assert.strictEqual( + context.traceSampled, + test.expected.traceSampled, + `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}` + ); + } else { + // This is the header: '' test case; + assert.strictEqual(test.header, ''); + } + } + }); + }); +}); diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index d24c450c9a2..4e3ce05cf82 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -269,82 +269,22 @@ describe('Entry', () => { assert.strictEqual(json.httpRequest?.requestMethod, 'GET'); }); - it('should extract trace & span from X-Cloud-Trace-Context', () => { - const tests = [ - { - header: '105445aa7843bc8bf206b120001000/000000001;o=1', - expected: { - trace: '105445aa7843bc8bf206b120001000', - spanId: '000000001', - traceSampled: true, - }, - }, - // TraceSampled is false - { - header: '105445aa7843bc8bf206b120001000/000000001;o=0', - expected: { - trace: '105445aa7843bc8bf206b120001000', - spanId: '000000001', - traceSampled: false, - }, - }, - { - // No span - header: '105445aa7843bc8bf206b120001000;o=1', - expected: { - trace: '105445aa7843bc8bf206b120001000', - spanId: undefined, - traceSampled: true, - }, - }, - { - // No trace - header: '/105445aa7843bc8bf206b120001000;o=0', - expected: { - trace: undefined, - spanId: '105445aa7843bc8bf206b120001000', - traceSampled: false, - }, - }, - { - // No traceSampled - header: '105445aa7843bc8bf206b120001000/0', - expected: { - trace: '105445aa7843bc8bf206b120001000', - spanId: '0', - traceSampled: undefined, - }, - }, - { - // No input - header: '', - expected: { - trace: undefined, - spanId: undefined, - traceSampled: undefined, - }, - }, - ]; - for (const test of tests) { - const req = { - method: 'GET', - } as unknown as http.IncomingMessage; - // Mock raw http headers with lowercased keys. - req.headers = { - 'x-cloud-trace-context': test.header, - }; - delete entry.metadata.trace; - delete entry.metadata.spanId; - delete entry.metadata.traceSampled; - entry.metadata.httpRequest = req; - const json = entry.toJSON(); - assert.strictEqual(json.trace, test.expected.trace); - assert.strictEqual(json.spanId, test.expected.spanId); - assert.strictEqual(json.traceSampled, test.expected.traceSampled); - } + it('should detect trace and span if headers present', () => { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + // To mock http message.headers, we must use lowercased keys. + req.headers = { + 'x-cloud-trace-context': '0000/1111;o=1', + }; + entry.metadata.httpRequest = req; + const json = entry.toJSON(); + assert.strictEqual(json.trace, 'projects//traces/0000'); + assert.strictEqual(json.spanId, '1111'); + assert.strictEqual(json.traceSampled, true); }); - it('should not overwrite user defined trace and span', () => { + it('should not overwrite user defined trace and span with detected', () => { const req = { method: 'GET', } as unknown as http.IncomingMessage; diff --git a/handwritten/logging/test/http-request.ts b/handwritten/logging/test/http-request.ts new file mode 100644 index 00000000000..f4e72672a11 --- /dev/null +++ b/handwritten/logging/test/http-request.ts @@ -0,0 +1,113 @@ +/*! + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +import {ServerResponse} from 'http'; +import * as http from 'http'; +import {ServerRequest, makeHttpRequestData} from '../src/http-request'; + +describe('http-request', () => { + describe('makeHttpRequestData', () => { + it('should prioritize originalUrl if provided', () => { + const req = { + method: 'GET', + url: 'http://wrongemail.com/', + originalUrl: 'http://google.com/', + } as ServerRequest; + const cloudReq = makeHttpRequestData(req); + assert.strictEqual(cloudReq.protocol, 'http:'); + assert.strictEqual(cloudReq.requestUrl, 'http://google.com/'); + assert.strictEqual(cloudReq.requestMethod, 'GET'); + }); + it('should infer as many request values as possible', () => { + const req = { + method: 'GET', + url: 'http://google.com/', + headers: { + 'user-agent': 'some-agent', + referer: 'some-referer', + }, + } as http.IncomingMessage; + const cloudReq = makeHttpRequestData(req); + assert.strictEqual(cloudReq.protocol, 'http:'); + assert.strictEqual(cloudReq.requestUrl, 'http://google.com/'); + assert.strictEqual(cloudReq.requestMethod, 'GET'); + assert.strictEqual(cloudReq.userAgent, 'some-agent'); + assert.strictEqual(cloudReq.referer, 'some-referer'); + assert.strictEqual(cloudReq.status, undefined); + }); + it('should infer header values with caution', () => { + const req = { + method: 'GET', + url: 'http://google.com/', + headers: { + 'user-agent': '', + referer: undefined, + }, + } as http.IncomingMessage; + const cloudReq = makeHttpRequestData(req); + assert.strictEqual(cloudReq.protocol, 'http:'); + assert.strictEqual(cloudReq.requestUrl, 'http://google.com/'); + assert.strictEqual(cloudReq.requestMethod, 'GET'); + assert.strictEqual(cloudReq.userAgent, undefined); + assert.strictEqual(cloudReq.referer, undefined); + assert.strictEqual(cloudReq.status, undefined); + }); + it('should infer as many response values as possible', () => { + const RESPONSE_SIZE = 2048; + const req = {} as ServerRequest; + const res = { + statusCode: 200, + headers: { + 'Content-Length': RESPONSE_SIZE, + }, + } as unknown as http.ServerResponse; + res.getHeader = function () { + return 2048; + }; + const cloudReq = makeHttpRequestData(req, res); + assert.strictEqual(cloudReq.status, 200); + assert.strictEqual(cloudReq.responseSize, RESPONSE_SIZE); + }); + it('should convert latency to proto Duration', () => { + const fakeRequest = {headers: {}}; + const fakeResponse = {}; + + const h1 = makeHttpRequestData( + fakeRequest as ServerRequest, + fakeResponse as ServerResponse, + 1003 + ); + assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); + + const h2 = makeHttpRequestData( + fakeRequest as ServerRequest, + fakeResponse as ServerResponse, + 9003.1 + ); + assert.deepStrictEqual(h2.latency, {seconds: 9, nanos: 3.1e6}); + + // Make sure we nanos is uint32. + const h3 = makeHttpRequestData( + fakeRequest as ServerRequest, + fakeResponse as ServerResponse, + 1.0000000001 + ); + assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); + }); + }); +}); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 1c31b5dfe63..6c93205a10b 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -498,7 +498,7 @@ describe('Log', () => { decorateEntriesStub.returns('decorated entries'); await log.write(ENTRIES, OPTIONS); - assert(decorateEntriesStub.calledOnceWithExactly(ENTRIES)); + assert(decorateEntriesStub.calledOnceWithExactly(ENTRIES, PROJECT_ID)); assert( log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ @@ -512,7 +512,9 @@ describe('Log', () => { const arrifiedEntries: Entry[] = [ENTRY]; await log.write(ENTRY, OPTIONS); - assert(decorateEntriesStub.calledOnceWithExactly(arrifiedEntries)); + assert( + decorateEntriesStub.calledOnceWithExactly(arrifiedEntries, PROJECT_ID) + ); assert( log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ @@ -706,7 +708,7 @@ describe('Log', () => { it('should create an Entry object if one is not provided', () => { const entry = {}; - const decoratedEntries = log.decorateEntries([entry]); + const decoratedEntries = log.decorateEntries([entry], PROJECT_ID); assert.strictEqual(decoratedEntries[0], toJSONResponse); assert(log.entry.calledWithExactly(entry)); }); @@ -714,7 +716,7 @@ describe('Log', () => { it('should get JSON format from Entry object', () => { const entry = new Entry(); entry.toJSON = () => toJSONResponse as {} as EntryJson; - const decoratedEntries = log.decorateEntries([entry]); + const decoratedEntries = log.decorateEntries([entry], PROJECT_ID); assert.strictEqual(decoratedEntries[0], toJSONResponse); assert(log.entry.notCalled); }); @@ -726,15 +728,17 @@ describe('Log', () => { .stub(entry, 'toJSON') .returns({} as EntryJson); - log.decorateEntries([entry]); - assert(localJSONStub.calledWithExactly({removeCircular: true})); + log.decorateEntries([entry], PROJECT_ID); + assert( + localJSONStub.calledWithExactly({removeCircular: true}, PROJECT_ID) + ); }); it('should throw error from serialization', () => { const entry = new Entry(); sinon.stub(entry, 'toJSON').throws('Error.'); assert.throws(() => { - log.decorateEntries([entry]); + log.decorateEntries([entry], PROJECT_ID); }, 'Error.'); }); }); diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index 94130afc42c..cab0559bc59 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -44,7 +44,7 @@ describe('middleware/express/make-middleware', () => { const {makeMiddleware} = proxyquire( '../../../src/middleware/express/make-middleware', { - '../context': FAKE_CONTEXT, + '../../../src/context': FAKE_CONTEXT, } ); @@ -55,14 +55,18 @@ describe('middleware/express/make-middleware', () => { }); describe('middleware', () => { - const FAKE_SPAN_CONTEXT = {traceId: 'traceId-🥑'}; + const FAKE_TRACE_CONTEXT = {trace: 'traceId-🥑'}; + const FAKE_TRACE_AND_SPAN_CONTEXT = { + trace: 'traceId-🥑', + spanId: 'spanId-🥑', + }; beforeEach(() => { getOrInjectContextValue = undefined; }); it('should call the next middleware synchronously', () => { - getOrInjectContextValue = FAKE_SPAN_CONTEXT; + getOrInjectContextValue = FAKE_TRACE_CONTEXT; const fakeRequest = makeFakeRequest(); const fakeResponse = makeFakeResponse(); let called = false; @@ -75,17 +79,34 @@ describe('middleware/express/make-middleware', () => { assert.ok(called); }); - it('should call makeChildLogger with correct trace context', () => { + it('should call makeChildLogger with trace context only', () => { const FAKE_CHILD_LOGGER = {log: '🍌'}; - getOrInjectContextValue = FAKE_SPAN_CONTEXT; + getOrInjectContextValue = FAKE_TRACE_CONTEXT; const fakeRequest = makeFakeRequest(); const fakeResponse = makeFakeResponse(); function makeChild(trace: {}) { - assert.strictEqual( - trace, - `projects/${FAKE_PROJECT_ID}/traces/${FAKE_SPAN_CONTEXT.traceId}` - ); + assert.strictEqual(trace, `${FAKE_TRACE_CONTEXT.trace}`); + return FAKE_CHILD_LOGGER; + } + + const middleware = makeMiddleware(FAKE_PROJECT_ID, makeChild); + middleware(fakeRequest, fakeResponse, () => {}); + + // Should annotate the request with the child logger. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + assert.strictEqual((fakeRequest as any).log, FAKE_CHILD_LOGGER); + }); + + it('should call makeChildLogger with correct span context', () => { + const FAKE_CHILD_LOGGER = {log: '🍌'}; + getOrInjectContextValue = FAKE_TRACE_AND_SPAN_CONTEXT; + const fakeRequest = makeFakeRequest(); + const fakeResponse = makeFakeResponse(); + + function makeChild(trace: {}, span: {}) { + assert.strictEqual(trace, `${FAKE_TRACE_CONTEXT.trace}`); + assert.strictEqual(span, FAKE_TRACE_AND_SPAN_CONTEXT.spanId); return FAKE_CHILD_LOGGER; } @@ -98,16 +119,13 @@ describe('middleware/express/make-middleware', () => { }); it('should emit a request log when response is finished', done => { - getOrInjectContextValue = FAKE_SPAN_CONTEXT; + getOrInjectContextValue = FAKE_TRACE_CONTEXT; const fakeRequest = makeFakeRequest(); const fakeResponse = makeFakeResponse(); let emitRequestLogCalled = false; function emitRequestLog(httpRequest: {}, trace: {}) { - assert.strictEqual( - trace, - `projects/${FAKE_PROJECT_ID}/traces/${FAKE_SPAN_CONTEXT.traceId}` - ); + assert.strictEqual(trace, `${FAKE_TRACE_CONTEXT.trace}`); // TODO: check httpRequest properties. emitRequestLogCalled = true; } diff --git a/handwritten/logging/test/middleware/test-context.ts b/handwritten/logging/test/middleware/test-context.ts deleted file mode 100644 index 0d4638b8769..00000000000 --- a/handwritten/logging/test/middleware/test-context.ts +++ /dev/null @@ -1,88 +0,0 @@ -/*! - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as assert from 'assert'; -import {describe, it, beforeEach} from 'mocha'; -import * as http from 'http'; -import * as proxyquire from 'proxyquire'; -import {makeHeaderWrapper} from '../../src/middleware/context'; - -const FAKE_CONTEXT = { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - extract: (headerWrapper: {}) => {}, - generate: () => {}, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - inject: (headerWrapper: {}, spanContext: {}) => {}, -}; - -const fakeContext = Object.assign({}, FAKE_CONTEXT); - -const {getOrInjectContext} = proxyquire('../../src/middleware/context', { - '@opencensus/propagation-stackdriver': fakeContext, -}); - -describe('middleware/context', () => { - describe('makeHeaderWrapper', () => { - const HEADER_NAME = 'Content-Type'; - const HEADER_VALUE = 'application/🎂'; - - it('should correctly get request headers', () => { - const req = {headers: {[HEADER_NAME]: HEADER_VALUE}}; - const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); - assert.strictEqual(wrapper.getHeader(HEADER_NAME), HEADER_VALUE); - }); - - it('should correctly set request headers', () => { - const req = {headers: {} as http.IncomingHttpHeaders}; - const wrapper = makeHeaderWrapper(req as unknown as http.IncomingMessage); - wrapper.setHeader(HEADER_NAME, HEADER_VALUE); - assert.strictEqual(req.headers[HEADER_NAME], HEADER_VALUE); - }); - }); - - describe('getOrInjectContext', () => { - beforeEach(() => { - fakeContext.extract = FAKE_CONTEXT.extract; - fakeContext.generate = FAKE_CONTEXT.generate; - fakeContext.inject = FAKE_CONTEXT.inject; - }); - - it('should return extracted context identically', () => { - const FAKE_SPAN_CONTEXT = '👾'; - fakeContext.extract = () => FAKE_SPAN_CONTEXT; - fakeContext.generate = () => assert.fail('should not be called'); - fakeContext.inject = () => assert.fail('should not be called'); - - const ret = getOrInjectContext({}); - assert.strictEqual(ret, FAKE_SPAN_CONTEXT); - }); - - it('should generate a new context if extract returns falsy', () => { - let injectWasCalled = false; - const FAKE_SPAN_CONTEXT = '👾'; - fakeContext.extract = () => false; - fakeContext.generate = () => FAKE_SPAN_CONTEXT; - fakeContext.inject = (_, spanContext) => { - injectWasCalled = true; - assert.strictEqual(spanContext, FAKE_SPAN_CONTEXT); - }; - - const ret = getOrInjectContext({}); - assert.strictEqual(ret, FAKE_SPAN_CONTEXT); - assert.ok(injectWasCalled); - }); - }); -}); diff --git a/handwritten/logging/test/test-make-http-request.ts b/handwritten/logging/test/test-make-http-request.ts deleted file mode 100644 index 8e423a5d35e..00000000000 --- a/handwritten/logging/test/test-make-http-request.ts +++ /dev/null @@ -1,97 +0,0 @@ -/*! - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -import {ServerResponse} from 'http'; -import {makeHttpRequestData, ServerRequest} from '../src/make-http-request'; -import * as http from 'http'; - -describe('make-http-request', () => { - it('should prioritize originalUrl if provided', () => { - const req = { - method: 'GET', - url: 'http://wrongemail.com/', - originalUrl: 'http://google.com/', - } as ServerRequest; - const cloudReq = makeHttpRequestData(req); - assert.strictEqual(cloudReq.protocol, 'http:'); - assert.strictEqual(cloudReq.requestUrl, 'http://google.com/'); - assert.strictEqual(cloudReq.requestMethod, 'GET'); - }); - - it('should infer as many request values as possible', () => { - const req = { - method: 'GET', - url: 'http://google.com/', - headers: { - 'user-agent': 'some-agent', - referer: 'some-referer', - }, - } as http.IncomingMessage; - const cloudReq = makeHttpRequestData(req); - assert.strictEqual(cloudReq.protocol, 'http:'); - assert.strictEqual(cloudReq.requestUrl, 'http://google.com/'); - assert.strictEqual(cloudReq.requestMethod, 'GET'); - assert.strictEqual(cloudReq.userAgent, 'some-agent'); - assert.strictEqual(cloudReq.referer, 'some-referer'); - assert.strictEqual(cloudReq.status, undefined); - }); - - it('should infer as many response values as possible', () => { - const RESPONSE_SIZE = 2048; - const req = {} as ServerRequest; - const res = { - statusCode: 200, - headers: { - 'Content-Length': RESPONSE_SIZE, - }, - } as unknown as http.ServerResponse; - res.getHeader = function () { - return 2048; - }; - const cloudReq = makeHttpRequestData(req, res); - assert.strictEqual(cloudReq.status, 200); - assert.strictEqual(cloudReq.responseSize, RESPONSE_SIZE); - }); - - it('should convert latency to proto Duration', () => { - const fakeRequest = {headers: {}}; - const fakeResponse = {}; - - const h1 = makeHttpRequestData( - fakeRequest as ServerRequest, - fakeResponse as ServerResponse, - 1003 - ); - assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); - - const h2 = makeHttpRequestData( - fakeRequest as ServerRequest, - fakeResponse as ServerResponse, - 9003.1 - ); - assert.deepStrictEqual(h2.latency, {seconds: 9, nanos: 3.1e6}); - - // Make sure we nanos is uint32. - const h3 = makeHttpRequestData( - fakeRequest as ServerRequest, - fakeResponse as ServerResponse, - 1.0000000001 - ); - assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); - }); -}); From 9044dc642ed6370b0af5612f042b1cefd2b5b5f3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Jun 2021 19:10:21 +0000 Subject: [PATCH 0771/1029] build: remove errant comma (#1113) (#1098) Source-Link: https://github.com/googleapis/synthtool/commit/41ccd8cd13ec31f4fb839cf8182aea3c7156e19d Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:c9c7828c165b1985579098978877935ee52dda2b1b538087514fd24fa2443e7a --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.trampolinerc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 1b520297430..e7c45fd36bc 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:65aa68f2242c172345d7c1e780bced839bfdc344955d6aa460aa63b4481d93e5 + digest: sha256:c9c7828c165b1985579098978877935ee52dda2b1b538087514fd24fa2443e7a diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 18b3089b5f5..e7bdc633423 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -21,7 +21,7 @@ required_envvars+=() pass_down_envvars+=( "ENVIRONMENT" "RUNTIME" - "AUTORELEASE_PR", + "AUTORELEASE_PR" "VERSION" ) From 7754521ab78abf7e9ce1df72a79461dced485acb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sun, 13 Jun 2021 19:59:30 -0700 Subject: [PATCH 0772/1029] chore: release 9.4.0 (#1092) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 13 +++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index a6a53b323e7..1a16a04160d 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.4.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.3.1...v9.4.0) (2021-06-11) + + +### Features + +* detect Google and W3C trace context (including in middleware) ([#1088](https://www.github.com/googleapis/nodejs-logging/issues/1088)) ([864f188](https://www.github.com/googleapis/nodejs-logging/commit/864f18848c87a22c335b48e60a1d4505d3c9bd94)) +* users can log raw http request objects with trace ([#1086](https://www.github.com/googleapis/nodejs-logging/issues/1086)) ([19b943e](https://www.github.com/googleapis/nodejs-logging/commit/19b943eb44b2c046ab4f2b4886a79f9c42536c2a)) + + +### Bug Fixes + +* Report warning on `.github/workflows/ci.yaml` ([#1110](https://www.github.com/googleapis/nodejs-logging/issues/1110)) ([#1089](https://www.github.com/googleapis/nodejs-logging/issues/1089)) ([0d8b8d0](https://www.github.com/googleapis/nodejs-logging/commit/0d8b8d0d3129db9f3cbd2eed7c1234b14705dd9e)) + ### [9.3.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.3.0...v9.3.1) (2021-05-25) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2f54604f697..95780084739 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.3.1", + "version": "9.4.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 1083984ee727e9e79059390c8b8c52b9b2f3e1dc Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 15 Jun 2021 03:04:06 +0700 Subject: [PATCH 0773/1029] fix: allow unformatted originalURL input (#1100) Fixes: https://github.com/googleapis/nodejs-logging-winston/issues/607 Allows users to input invalid or badly formatted `originalUrl` values. As it did previously. --- handwritten/logging/src/http-request.ts | 19 ++++++++++--------- handwritten/logging/test/http-request.ts | 10 ++++++++++ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/handwritten/logging/src/http-request.ts b/handwritten/logging/src/http-request.ts index 774d28b4bc7..799de60fe53 100644 --- a/handwritten/logging/src/http-request.ts +++ b/handwritten/logging/src/http-request.ts @@ -70,16 +70,17 @@ export function makeHttpRequestData( responseSize, latency; // Format request properties - if (req.url) { - requestUrl = req.url; - const url = new URL(requestUrl); - protocol = url.protocol; - } + if (req.url) requestUrl = req.url; // OriginalURL overwrites inferred url - if ('originalUrl' in req && req.originalUrl) { - requestUrl = req.originalUrl; - const url = new URL(requestUrl); - protocol = url.protocol; + if ('originalUrl' in req && req.originalUrl) requestUrl = req.originalUrl; + // Format protocol from valid URL + if (requestUrl) { + try { + const url = new URL(requestUrl); + protocol = url.protocol; + } catch (e) { + // Library should not panic + } } req.method ? (requestMethod = req.method) : null; if (req.headers && req.headers['user-agent']) { diff --git a/handwritten/logging/test/http-request.ts b/handwritten/logging/test/http-request.ts index f4e72672a11..648029410d2 100644 --- a/handwritten/logging/test/http-request.ts +++ b/handwritten/logging/test/http-request.ts @@ -33,6 +33,16 @@ describe('http-request', () => { assert.strictEqual(cloudReq.requestUrl, 'http://google.com/'); assert.strictEqual(cloudReq.requestMethod, 'GET'); }); + it('should not panic on invalid URL', () => { + const req = { + method: 'GET', + originalUrl: 'invalid/url/', + } as ServerRequest; + const cloudReq = makeHttpRequestData(req); + assert.strictEqual(cloudReq.protocol, undefined); + assert.strictEqual(cloudReq.requestUrl, 'invalid/url/'); + assert.strictEqual(cloudReq.requestMethod, 'GET'); + }); it('should infer as many request values as possible', () => { const req = { method: 'GET', From 1c5dd94a3eb284dcb29bd50b1e36dc05639e2e74 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 20:14:10 +0000 Subject: [PATCH 0774/1029] chore: release 9.4.1 (#1101) :robot: I have created a release \*beep\* \*boop\* --- ### [9.4.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.4.0...v9.4.1) (2021-06-14) ### Bug Fixes * allow unformatted originalURL input ([#1100](https://www.github.com/googleapis/nodejs-logging/issues/1100)) ([136f90b](https://www.github.com/googleapis/nodejs-logging/commit/136f90b0926c1a04521fddd7c82d0efbf7572521)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 1a16a04160d..2650401ce80 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.4.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.4.0...v9.4.1) (2021-06-14) + + +### Bug Fixes + +* allow unformatted originalURL input ([#1100](https://www.github.com/googleapis/nodejs-logging/issues/1100)) ([136f90b](https://www.github.com/googleapis/nodejs-logging/commit/136f90b0926c1a04521fddd7c82d0efbf7572521)) + ## [9.4.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.3.1...v9.4.0) (2021-06-11) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 95780084739..67ceb02d7e5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.4.0", + "version": "9.4.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 764c863acdecc5ed6dd93626260ee7cc01683811 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Wed, 23 Jun 2021 11:35:15 +0700 Subject: [PATCH 0775/1029] feat: users can write structured logEntries to STDOUT (#1102) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: users can write structured logs to stdout * refactor: simply and get severity * refactor: write function for better readability * feat: toStructuredJson converts basic properties for stdout * feat: add logSync as a separate class * refactor: major refactor, compiles * test: it formats timestamp to structured json * 🦉 Updates from OwlBot * docs: update licenses * test: Log unit tests ts passing after refactor * refactor * refactor: toStructuredJSON * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md * test: http-request isRawhttp * feat: memoize projectId iin log.write * refactor: pulled out log common logic into shared file * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md * chore: organize files * refactor: move log-common in utils * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md * test: unit tests for logSync done * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md * test: toStructuredLog all unit tests passsing * test: all unit tests done * test: remove logsync tests from e2e * docs: added docs * style: fix lint flag * refactor: nits and comments * style: lint * fix: re export static Log functions * fix: issues and syntax * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md * chore: pin env test version Co-authored-by: Owl Bot --- env-tests-logging | 2 +- handwritten/logging/src/entry.ts | 145 ++++-- handwritten/logging/src/index.ts | 119 +++-- handwritten/logging/src/log-sync.ts | 415 ++++++++++++++++++ handwritten/logging/src/log.ts | 187 +++----- .../src/middleware/express/make-middleware.ts | 4 +- handwritten/logging/src/{ => utils}/common.ts | 15 + .../logging/src/{ => utils}/context.ts | 0 .../logging/src/{ => utils}/http-request.ts | 23 + handwritten/logging/src/utils/log-common.ts | 107 +++++ .../logging/src/{ => utils}/metadata.ts | 2 +- handwritten/logging/test/entry.ts | 141 ++++-- handwritten/logging/test/index.ts | 28 +- handwritten/logging/test/log-sync.ts | 237 ++++++++++ handwritten/logging/test/log.ts | 239 ++++------ .../express/test-make-middleware.ts | 2 +- .../logging/test/{ => utils}/common.ts | 39 +- .../logging/test/{ => utils}/context.ts | 2 +- .../logging/test/{ => utils}/http-request.ts | 25 +- handwritten/logging/test/utils/log-common.ts | 110 +++++ .../logging/test/{ => utils}/metadata.ts | 2 +- 21 files changed, 1463 insertions(+), 381 deletions(-) create mode 100644 handwritten/logging/src/log-sync.ts rename handwritten/logging/src/{ => utils}/common.ts (92%) rename handwritten/logging/src/{ => utils}/context.ts (100%) rename handwritten/logging/src/{ => utils}/http-request.ts (85%) create mode 100644 handwritten/logging/src/utils/log-common.ts rename handwritten/logging/src/{ => utils}/metadata.ts (99%) create mode 100644 handwritten/logging/test/log-sync.ts rename handwritten/logging/test/{ => utils}/common.ts (88%) rename handwritten/logging/test/{ => utils}/context.ts (99%) rename handwritten/logging/test/{ => utils}/http-request.ts (87%) create mode 100644 handwritten/logging/test/utils/log-common.ts rename handwritten/logging/test/{ => utils}/metadata.ts (99%) diff --git a/env-tests-logging b/env-tests-logging index 06f6c921949..a4bee83fa26 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit 06f6c921949621a878f3a47ec294b7ce25a39ddf +Subproject commit a4bee83fa2648b140bc928e2098ab67d82c6296c diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 3043b1fe2c6..7275e2063ad 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -18,17 +18,28 @@ const EventId = require('eventid'); import * as extend from 'extend'; import {google} from '../protos/protos'; -import {objToStruct, structToObj} from './common'; -import {makeHttpRequestData, CloudLoggingHttpRequest} from './http-request'; -import {CloudTraceContext, getOrInjectContext} from './context'; -import * as http from 'http'; +import {objToStruct, structToObj, zuluToDateObj} from './utils/common'; +import { + makeHttpRequestData, + CloudLoggingHttpRequest, + RawHttpRequest, + isRawHttpRequest, +} from './utils/http-request'; +import {CloudTraceContext, getOrInjectContext} from './utils/context'; const eventId = new EventId(); +export const INSERT_ID_KEY = 'logging.googleapis.com/insertId'; +export const LABELS_KEY = 'logging.googleapis.com/labels'; +export const OPERATION_KEY = 'logging.googleapis.com/operation'; +export const SOURCE_LOCATION_KEY = 'logging.googleapis.com/sourceLocation'; +export const SPAN_ID_KEY = 'logging.googleapis.com/spanId'; +export const TRACE_KEY = 'logging.googleapis.com/trace'; +export const TRACE_SAMPLED_KEY = 'logging.googleapis.com/trace_sampled'; + // Accepted field types from user supported by this client library. export type Timestamp = google.protobuf.ITimestamp | Date | string; export type LogSeverity = google.logging.type.LogSeverity | string; -export type RawHttpRequest = http.IncomingMessage & CloudLoggingHttpRequest; export type HttpRequest = | google.logging.type.IHttpRequest | CloudLoggingHttpRequest @@ -45,7 +56,8 @@ export type LogEntry = Omit< // eslint-disable-next-line @typescript-eslint/no-explicit-any export type Data = any; -// Final Entry format submitted to the LoggingService API. +// The expected format of a subset of Entry properties before submission to the +// LoggingService API. export interface EntryJson { timestamp: Timestamp; insertId: number; @@ -57,12 +69,31 @@ export interface EntryJson { traceSampled?: boolean; } +// The expected format of a subset of Entry properties before submission to a +// custom transport, most likely to process.stdout. +export interface StructuredJson { + // Universally supported properties + message?: string | object; + httpRequest?: object; + timestamp?: string; + [INSERT_ID_KEY]?: string; + [OPERATION_KEY]?: object; + [SOURCE_LOCATION_KEY]?: object; + [LABELS_KEY]?: object; + [SPAN_ID_KEY]?: string; + [TRACE_KEY]?: string; + [TRACE_SAMPLED_KEY]?: boolean; + // Properties not supported by all agents (e.g. Cloud Run, Functions) + logName?: string; + resource?: object; +} + export interface ToJsonOptions { removeCircular?: boolean; } /** - * Create an entry object to define new data to insert into a log. + * Create an entry object to define new data to insert into a meta. * * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} * dictates that the maximum log entry size, including all @@ -162,12 +193,12 @@ class Entry { * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry * * @param {object} [options] Configuration object. - * @param projectId * @param {boolean} [options.removeCircular] Replace circular references in an * object with a string value, `[Circular]`. + * @param {string} [projectId] GCP Project ID. */ toJSON(options: ToJsonOptions = {}, projectId = '') { - const entry = extend(true, {}, this.metadata) as {} as EntryJson; + const entry: EntryJson = extend(true, {}, this.metadata) as {} as EntryJson; // Format log message if (Object.prototype.toString.call(this.data) === '[object Object]') { entry.jsonPayload = objToStruct(this.data, { @@ -186,36 +217,81 @@ class Entry { nanos: Math.floor((seconds - secondsRounded) * 1e9), }; } else if (typeof entry.timestamp === 'string') { - // Convert RFC3339 "Zulu" timestamp into a format that can be parsed to Date - const zuluTime = entry.timestamp; - const ms = Date.parse(zuluTime.split(/[.,Z]/)[0] + 'Z'); - const reNano = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.(\d{0,9})Z$/; - const nanoSecs = zuluTime.match(reNano)?.[1]; - entry.timestamp = { - seconds: ms ? Math.floor(ms / 1000) : 0, - nanos: nanoSecs ? Number(nanoSecs.padEnd(9, '0')) : 0, - }; + entry.timestamp = zuluToDateObj(entry.timestamp); } // Format httpRequest const req = this.metadata.httpRequest; - if ( - req && - ('statusCode' in req || - 'headers' in req || - 'method' in req || - 'url' in req) - ) { + if (isRawHttpRequest(req)) { entry.httpRequest = makeHttpRequestData(req); + // Format trace and span + const traceContext = this.extractTraceFromHeaders(projectId); + if (traceContext) { + if (!this.metadata.trace && traceContext.trace) + entry.trace = traceContext.trace; + if (!this.metadata.spanId && traceContext.spanId) + entry.spanId = traceContext.spanId; + if (this.metadata.traceSampled === undefined) + entry.traceSampled = traceContext.traceSampled; + } + } + return entry; + } + + /** + * Serialize an entry to a standard format for any transports, e.g. agents. + * Read more: https://cloud.google.com/logging/docs/structured-logging + */ + toStructuredJSON(projectId = '') { + const meta = this.metadata; + // Mask out the keys that need to be renamed. + // eslint-disable @typescript-eslint/no-unused-vars + const { + textPayload, + jsonPayload, + insertId, + trace, + spanId, + traceSampled, + operation, + sourceLocation, + labels, + ...validKeys + } = meta; + // eslint-enable @typescript-eslint/no-unused-vars + const entry: StructuredJson = extend(true, {}, validKeys) as {}; + // Re-map keys names. + entry[LABELS_KEY] = meta.labels + ? Object.assign({}, meta.labels) + : undefined; + entry[INSERT_ID_KEY] = meta.insertId || undefined; + entry[TRACE_KEY] = meta.trace || undefined; + entry[SPAN_ID_KEY] = meta.spanId || undefined; + entry[TRACE_SAMPLED_KEY] = + 'traceSampled' in meta && meta.traceSampled !== null + ? meta.traceSampled + : undefined; + // Format log payload. + entry.message = + meta.textPayload || meta.jsonPayload || meta.protoPayload || undefined; + entry.message = this.data || entry.message; + // Format timestamp + if (meta.timestamp instanceof Date) { + entry.timestamp = meta.timestamp.toISOString(); } - // Format trace and span - const traceContext = this.extractTraceFromHeaders(projectId); - if (traceContext) { - if (!this.metadata.trace && traceContext.trace) - entry.trace = traceContext.trace; - if (!this.metadata.spanId && traceContext.spanId) - entry.spanId = traceContext.spanId; - if (this.metadata.traceSampled === undefined) - entry.traceSampled = traceContext.traceSampled; + // Format httprequest + const req = meta.httpRequest; + if (isRawHttpRequest(req)) { + entry.httpRequest = makeHttpRequestData(req); + // Detected trace context from headers if applicable. + const traceContext = this.extractTraceFromHeaders(projectId); + if (traceContext) { + if (!entry[TRACE_KEY] && traceContext.trace) + entry[TRACE_KEY] = traceContext.trace; + if (!entry[SPAN_ID_KEY] && traceContext.spanId) + entry[SPAN_ID_KEY] = traceContext.spanId; + if (entry[TRACE_SAMPLED_KEY] === undefined) + entry[TRACE_SAMPLED_KEY] = traceContext.traceSampled; + } } return entry; } @@ -228,7 +304,6 @@ class Entry { private extractTraceFromHeaders(projectId: string): CloudTraceContext | null { const rawReq = this.metadata.httpRequest; if (rawReq && 'headers' in rawReq) { - // TODO: later we may want to switch this to true. return getOrInjectContext(rawReq, projectId, false); } return null; diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 145e6ab01cd..f117bddcfcd 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -23,13 +23,14 @@ import * as extend from 'extend'; import * as gax from 'google-gax'; // eslint-disable-next-line node/no-extraneous-import import {ClientReadableStream, ClientDuplexStream} from '@grpc/grpc-js'; - // eslint-disable-next-line @typescript-eslint/no-var-requires const pumpify = require('pumpify'); import * as streamEvents from 'stream-events'; import * as middleware from './middleware'; -import {detectServiceContext} from './metadata'; -import {CloudLoggingHttpRequest as HttpRequest} from './http-request'; +import {detectServiceContext, getDefaultResource} from './utils/metadata'; +import {CloudLoggingHttpRequest as HttpRequest} from './utils/http-request'; + +import {GoogleAuth} from 'google-auth-library'; export {middleware}; export {HttpRequest}; @@ -41,16 +42,16 @@ const v2 = require('./v2'); import {Entry, LogEntry} from './entry'; import { - Log, - GetEntriesRequest, - TailEntriesRequest, - LogOptions, MonitoredResource, Severity, SeverityNames, -} from './log'; + formatLogName, + assignSeverityToEntries, +} from './utils/log-common'; +import {Log, GetEntriesRequest, TailEntriesRequest, LogOptions} from './log'; +import {LogSync} from './log-sync'; import {Sink} from './sink'; -import {Duplex, PassThrough, Transform} from 'stream'; +import {Duplex, PassThrough, Transform, Writable} from 'stream'; import {google} from '../protos/protos'; import {Bucket} from '@google-cloud/storage'; // types only @@ -306,13 +307,9 @@ class Logging { * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. * @property {Bucket|Dataset|Topic} [destination] The destination. The proper ACL * scopes will be granted to the provided destination. Can be one of: - * {@link - * https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket - * Bucket}, - * {@link - * https://cloud.google.com/nodejs/docs/reference/bigquery/latest/Dataset - * Dataset}, or {@link - * https://cloud.google.com/nodejs/docs/reference/pubsub/latest/Topic Topic} + * {@link https://googleapis.dev/nodejs/storage/latest/ Bucket}, + * {@link https://googleapis.dev/nodejs/bigquery/latest/ Dataset}, or + * {@link https://googleapis.dev/nodejs/pubsub/latest/ Topic} * @property {string} [filter] An advanced logs filter. Only log entries * matching the filter are written. * @property {string|boolean} [uniqueWriterIdentity] Determines the kind of IAM @@ -645,11 +642,12 @@ class Logging { this.projectId = projectId; if (options.log) { if (options.filter) { - options.filter = `(${ - options.filter - }) AND logName="${Log.formatName_(this.projectId, options.log)}"`; + options.filter = `(${options.filter}) AND logName="${formatLogName( + this.projectId, + options.log + )}"`; } else { - options.filter = `logName="${Log.formatName_( + options.filter = `logName="${formatLogName( this.projectId, options.log )}"`; @@ -796,12 +794,12 @@ class Logging { if (options.log) { if (options.filter) { - options.filter = `(${options.filter}) AND logName="${Log.formatName_( + options.filter = `(${options.filter}) AND logName="${formatLogName( this.projectId, options.log )}"`; } else { - options.filter = `logName="${Log.formatName_( + options.filter = `logName="${formatLogName( this.projectId, options.log )}"`; @@ -1219,6 +1217,28 @@ class Logging { return new Log(this, name, options); } + /** + * Get a reference to a Cloud Logging logSync. + * + * @param {string} name Name of the existing log. + * @param {object} transport An optional write stream. + * @returns {LogSync} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * + * // Optional: enrich logs with additional context + * await logging.setProjectId(); + * await logging.setDetectedResource(); + * + * // Default transport writes to process.stdout + * const log = logging.logSync('my-log'); + */ + logSync(name: string, transport?: Writable) { + return new LogSync(this, name, transport); + } + /** * Get a reference to a Cloud Logging sink. * @@ -1391,12 +1411,29 @@ class Logging { config.destination = `${baseUrl}/${topicName}`; } + /** + * setProjectId detects and sets a projectId string on the Logging instance. + * It can be invoked once to ensure ensuing LogSync entries have a projectID. + * @param reqOpts + */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - async setProjectId(reqOpts: {}) { - if (this.projectId === '{{projectId}}') { + async setProjectId(reqOpts?: {}) { + if (this.projectId === '{{projectId}}') this.projectId = await this.auth.getProjectId(); + if (reqOpts) reqOpts = replaceProjectIdToken(reqOpts, this.projectId); + } + + /** + * setResource detects and sets a detectedresource object on the Logging + * instance. It can be invoked once to ensure ensuing LogSync entries contain + * resource context. + */ + async setDetectedResource() { + if (!this.detectedResource) { + this.detectedResource = await getDefaultResource( + this.auth as unknown as GoogleAuth + ); } - reqOpts = replaceProjectIdToken(reqOpts, this.projectId); } } @@ -1431,17 +1468,15 @@ export {Entry}; * @type {Constructor} */ export {Log}; -export {Severity}; -export {SeverityNames}; /** - * {@link Sink} class. - * - * @name Logging.Sink - * @see Sink - * @type {Constructor} + * {@link Severity} enum. */ -export {Sink}; +export {Severity}; +export {SeverityNames}; + +export {assignSeverityToEntries}; +export {formatLogName}; /** * {@link MonitoredResource} class. @@ -1452,6 +1487,24 @@ export {Sink}; */ export {MonitoredResource}; +/** + * {@link LogSync} class. + * + * @name Logging.LogSync + * @see LogSync + * @type {Constructor} + */ +export {LogSync}; + +/** + * {@link Sink} class. + * + * @name Logging.Sink + * @see Sink + * @type {Constructor} + */ +export {Sink}; + /** * The default export of the `@google-cloud/logging` package is the * {@link Logging} class. diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts new file mode 100644 index 00000000000..abd3f2f60a5 --- /dev/null +++ b/handwritten/logging/src/log-sync.ts @@ -0,0 +1,415 @@ +/*! + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This is a helper library for synchronously writing logs to any transport. + */ + +import arrify = require('arrify'); +import {Logging} from '.'; +import {Entry, LABELS_KEY, LogEntry, StructuredJson} from './entry'; +import {Writable} from 'stream'; +import { + LogSeverityFunctions, + assignSeverityToEntries, + snakecaseKeys, + formatLogName, + WriteOptions, +} from './utils/log-common'; + +/** + * A logSync is a named collection of entries in structured log format. In Cloud + * Logging, structured logs refer to log entries that use the jsonPayload field + * to add structure to their payloads. In most GCP environments, like GKE and + * Cloud Functions, structured logs written to process.stdout are automatically + * picked up and formatted by logging agents. + * + * Recommended for Serverless environment logging, especially where async log + * calls made by the `Log` class can be dropped by the CPU. + * + * @see [Structured Logging]{@link https://cloud.google.com/logging/docs/structured-logging} + * + * @class + * + * @param {Logging} logging {@link Logging} instance. + * @param {string} name Name of the logSync. + * @param {Writable} [transport] transport A custom writable transport stream. + * Default: process.stdout. + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('mylog'); + */ +class LogSync implements LogSeverityFunctions { + formattedName_: string; + logging: Logging; + name: string; + transport: Writable; + + // not projectId, formattedname is expected + constructor(logging: Logging, name: string, transport?: Writable) { + this.formattedName_ = formatLogName(logging.projectId, name); + this.logging = logging; + /** + * @name Log#name + * @type {string} + */ + this.name = this.formattedName_.split('/').pop()!; + // Default to writing to stdout + this.transport = transport || process.stdout; + } + + /** + * Write a log entry with a severity of "ALERT". + * + * This is a simple wrapper around {@link LogSync#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.alert(entry); + */ + alert(entry: Entry | Entry[], options?: WriteOptions) { + this.write( + assignSeverityToEntries(entry, 'ALERT'), + options! as WriteOptions + ); + } + + /** + * Write a log entry with a severity of "CRITICAL". + * + * This is a simple wrapper around {@link LogSync#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.critical(entry); + */ + critical(entry: Entry | Entry[], options?: WriteOptions) { + this.write( + assignSeverityToEntries(entry, 'CRITICAL'), + options! as WriteOptions + ); + } + + /** + * Write a log entry with a severity of "DEBUG". + * + * This is a simple wrapper around {@link LogSync#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.debug(entry); + */ + debug(entry: Entry | Entry[], options?: WriteOptions) { + this.write( + assignSeverityToEntries(entry, 'DEBUG'), + options! as WriteOptions + ); + } + + /** + * Write a log entry with a severity of "EMERGENCY". + * + * This is a simple wrapper around {@link LogSync#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.emergency(entry); + */ + emergency(entry: Entry | Entry[], options?: WriteOptions) { + this.write( + assignSeverityToEntries(entry, 'EMERGENCY'), + options as WriteOptions + ); + } + + // TODO(future): dedupe entry code across LogSync & Log classes. + entry(metadata?: LogEntry): Entry; + entry(data?: string | {}): Entry; + entry(metadata?: LogEntry, data?: string | {}): Entry; + /** + * Create an entry object for this log. + * + * Using this method will not itself do any logging. + * + * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * + * @param {?object} metadata See a + * [LogEntry + * Resource](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). + * @param {object|string} data The data to use as the value for this log + * entry. + * @returns {Entry} + * + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const metadata = { + * resource: { + * type: 'gce_instance', + * labels: { + * zone: 'global', + * instance_id: '3' + * } + * } + * }; + * + * const entry = log.entry(metadata, { + * delegate: 'my_username' + * }); + */ + entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { + let metadata: LogEntry; + if (!data && metadataOrData?.hasOwnProperty('httpRequest')) { + // If user logs entry(metadata.httpRequest) + metadata = metadataOrData as LogEntry; + data = {}; + } else if (!data) { + // If user logs entry(message) + data = metadataOrData as string | {}; + metadata = {}; + } else { + // If user logs entry(metadata, message) + metadata = metadataOrData as LogEntry; + } + return this.logging.entry(metadata, data); + } + + /** + * Write a log entry with a severity of "ERROR". + * + * This is a simple wrapper around {@link LogSync#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.error(entry); + */ + error(entry: Entry | Entry[], options?: WriteOptions) { + this.write( + assignSeverityToEntries(entry, 'ERROR'), + options! as WriteOptions + ); + } + + /** + * Write a log entry with a severity of "INFO". + * + * This is a simple wrapper around {@link LogSync#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.info(entry); + */ + info(entry: Entry | Entry[], options?: WriteOptions) { + this.write( + assignSeverityToEntries(entry, 'INFO'), + options! as WriteOptions + ); + } + + /** + * Write a log entry with a severity of "NOTICE". + * + * This is a simple wrapper around {@link LogSync#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.notice(entry); + */ + notice(entry: Entry | Entry[], options?: WriteOptions) { + this.write( + assignSeverityToEntries(entry, 'NOTICE'), + options! as WriteOptions + ); + } + + /** + * Write a log entry with a severity of "WARNING". + * + * This is a simple wrapper around {@link LogSync#write}. All arguments are + * the same as documented there. + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * @example + * const {Logging} = require('@google-cloud/logging'); + * const logging = new Logging(); + * const log = logging.logSync('my-log'); + * + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.warning(entry); + */ + warning(entry: Entry | Entry[], options?: WriteOptions) { + this.write( + assignSeverityToEntries(entry, 'WARNING'), + options as WriteOptions + ); + } + + /** + * Write log entries to a custom transport (default: process.stdout). + * + * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. + * @param {?WriteOptions} [options] Write options + * + * @example + * const entry = log.entry('gce_instance', { + * instance: 'my_instance' + * }); + * + * log.write(entry); + * + * //- + * // You may also pass multiple log entries to write. + * //- + * const secondEntry = log.entry('compute.googleapis.com', { + * user: 'my_username' + * }); + * + * log.write([entry, secondEntry]); + * + * //- + * // To save some steps, you can also pass in plain values as your entries. + * // Note, however, that you must provide a configuration object to specify + * // the resource. + * //- + * const entries = [ + * { + * user: 'my_username' + * }, + * { + * home: process.env.HOME + * } + * ]; + * + * const options = { + * resource: 'compute.googleapis.com' + * }; + * + * log.write(entries, options); + * + * log.write(entries); + * }); + */ + write(entry: Entry | Entry[], opts?: WriteOptions) { + const options = opts ? (opts as WriteOptions) : {}; + // We expect projectId and resource to be set before this fn is called... + let structuredEntries: StructuredJson[]; + this.formattedName_ = formatLogName(this.logging.projectId, this.name); + try { + structuredEntries = (arrify(entry) as Entry[]).map(entry => { + if (!(entry instanceof Entry)) { + entry = this.entry(entry); + } + return entry.toStructuredJSON(this.logging.projectId); + }); + for (const entry of structuredEntries) { + entry.logName = this.formattedName_; + entry.resource = + snakecaseKeys(options.resource?.labels) || + entry.resource || + this.logging.detectedResource; + entry[LABELS_KEY] = options.labels || entry[LABELS_KEY]; + this.transport.write(JSON.stringify(entry) + '\n'); + } + } catch (err) { + // Ignore errors (client libraries do not panic). + } + } +} + +/** + * Reference to the {@link LogSync} class. + * @name module:@google-cloud/logging.LogSync + * @see LogSync + */ +export {LogSync}; diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 1faf263c17b..63af54b1e98 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -19,12 +19,21 @@ import {callbackifyAll} from '@google-cloud/promisify'; import * as dotProp from 'dot-prop'; import * as extend from 'extend'; import {CallOptions} from 'google-gax'; -import {google} from '../protos/protos'; - import {GetEntriesCallback, GetEntriesResponse, Logging} from '.'; import {Entry, EntryJson, LogEntry} from './entry'; -import {getDefaultResource} from './metadata'; -import {GoogleAuth} from 'google-auth-library/build/src/auth/googleauth'; +import { + LogSeverityFunctions, + assignSeverityToEntries, + snakecaseKeys, + formatLogName, + WriteOptions as CommonOptions, +} from './utils/log-common'; + +export interface WriteOptions extends CommonOptions { + dryRun?: boolean; + gaxOptions?: CallOptions; + partialSuccess?: boolean; +} export interface GetEntriesRequest { autoPaginate?: boolean; @@ -60,35 +69,6 @@ export interface ApiResponseCallback { } export type DeleteCallback = ApiResponseCallback; -export type MonitoredResource = google.api.IMonitoredResource; -export interface WriteOptions { - dryRun?: boolean; - gaxOptions?: CallOptions; - labels?: {[index: string]: string}; - partialSuccess?: boolean; - resource?: MonitoredResource; -} - -export enum Severity { - emergency, - alert, - critical, - error, - warning, - notice, - info, - debug, -} - -export type SeverityNames = keyof typeof Severity; - -// Mapped types are only supported in type aliases and not in interfaces and -// classes. -type LogSeverityFunctions = { - // FIXME: the following can be made more precise. - [P in SeverityNames]: Function; -}; - /** * A log is a named collection of entries, each entry representing a timestamped * event. Logs can be produced by Google Cloud Platform services, by third-party @@ -105,6 +85,7 @@ type LogSeverityFunctions = { * @param {object} [options] Configuration object. * @param {boolean} [options.removeCircular] Replace circular references in * logged objects with a string value, `[Circular]`. (Default: false) + * @param {number} [options.maxEntrySize] A max entry size * * @example * const {Logging} = require('@google-cloud/logging'); @@ -117,9 +98,10 @@ class Log implements LogSeverityFunctions { maxEntrySize?: number; logging: Logging; name: string; + constructor(logging: Logging, name: string, options?: LogOptions) { options = options || {}; - this.formattedName_ = Log.formatName_(logging.projectId, name); + this.formattedName_ = formatLogName(logging.projectId, name); this.removeCircular_ = options.removeCircular === true; this.maxEntrySize = options.maxEntrySize; this.logging = logging; @@ -170,7 +152,7 @@ class Log implements LogSeverityFunctions { options?: WriteOptions | ApiResponseCallback ): Promise { return this.write( - Log.assignSeverityToEntries_(entry, 'ALERT'), + assignSeverityToEntries(entry, 'ALERT'), options! as WriteOptions ); } @@ -218,7 +200,7 @@ class Log implements LogSeverityFunctions { options?: WriteOptions | ApiResponseCallback ): Promise { return this.write( - Log.assignSeverityToEntries_(entry, 'CRITICAL'), + assignSeverityToEntries(entry, 'CRITICAL'), options! as WriteOptions ); } @@ -263,7 +245,7 @@ class Log implements LogSeverityFunctions { options?: WriteOptions | ApiResponseCallback ): Promise { return this.write( - Log.assignSeverityToEntries_(entry, 'DEBUG'), + assignSeverityToEntries(entry, 'DEBUG'), options! as WriteOptions ); } @@ -316,7 +298,7 @@ class Log implements LogSeverityFunctions { gaxOptions?: CallOptions | DeleteCallback ): Promise { const projectId = await this.logging.auth.getProjectId(); - this.formattedName_ = Log.formatName_(projectId, this.name); + this.formattedName_ = formatLogName(projectId, this.name); const reqOpts = { logName: this.formattedName_, }; @@ -365,7 +347,7 @@ class Log implements LogSeverityFunctions { options?: WriteOptions | ApiResponseCallback ): Promise { return this.write( - Log.assignSeverityToEntries_(entry, 'EMERGENCY'), + assignSeverityToEntries(entry, 'EMERGENCY'), options as WriteOptions ); } @@ -485,7 +467,7 @@ class Log implements LogSeverityFunctions { options?: WriteOptions | ApiResponseCallback ): Promise { return this.write( - Log.assignSeverityToEntries_(entry, 'ERROR'), + assignSeverityToEntries(entry, 'ERROR'), options! as WriteOptions ); } @@ -540,7 +522,7 @@ class Log implements LogSeverityFunctions { ): Promise { const options = extend({}, opts as GetEntriesRequest); const projectId = await this.logging.auth.getProjectId(); - this.formattedName_ = Log.formatName_(projectId, this.name); + this.formattedName_ = formatLogName(projectId, this.name); if (options.filter && !options.filter.includes('logName=')) { options.filter = `(${options.filter}) AND logName="${this.formattedName_}"`; } else if (!options.filter) { @@ -677,7 +659,7 @@ class Log implements LogSeverityFunctions { options?: WriteOptions | ApiResponseCallback ): Promise { return this.write( - Log.assignSeverityToEntries_(entry, 'INFO'), + assignSeverityToEntries(entry, 'INFO'), options! as WriteOptions ); } @@ -722,7 +704,7 @@ class Log implements LogSeverityFunctions { options?: WriteOptions | ApiResponseCallback ): Promise { return this.write( - Log.assignSeverityToEntries_(entry, 'NOTICE'), + assignSeverityToEntries(entry, 'NOTICE'), options! as WriteOptions ); } @@ -767,7 +749,7 @@ class Log implements LogSeverityFunctions { options?: WriteOptions | ApiResponseCallback ): Promise { return this.write( - Log.assignSeverityToEntries_(entry, 'WARNING'), + assignSeverityToEntries(entry, 'WARNING'), options as WriteOptions ); } @@ -885,61 +867,50 @@ class Log implements LogSeverityFunctions { opts?: WriteOptions | ApiResponseCallback ): Promise { const options = opts ? (opts as WriteOptions) : {}; - // eslint-disable-next-line @typescript-eslint/no-this-alias - const self = this; - // Autodetect monitored resource if not specified by user in WriteOptions. + let decoratedEntries: EntryJson[]; + // Extract projectId & resource from Logging - inject & memoize if not. + await this.logging.setProjectId(); + this.formattedName_ = formatLogName(this.logging.projectId, this.name); + const resource = await this.getOrSetResource(options); + // Extract & format additional context from individual entries. + try { + decoratedEntries = this.decorateEntries(arrify(entry) as Entry[]); + } catch (err) { + // Ignore errors (the API will speak up if it has an issue). + } + this.truncateEntries(decoratedEntries!); + // Clobber `labels` and `resource` fields with WriteOptions from the user. + const reqOpts = extend( + { + logName: this.formattedName_, + entries: decoratedEntries!, + resource, + }, + options + ); + delete reqOpts.gaxOptions; + return this.logging.loggingService.writeLogEntries( + reqOpts, + options.gaxOptions + ); + } + + /** + * getOrSetResource looks for GCP service context first at the user + * declaration level (snakecasing keys), then in the Logging instance, + * before finally detecting a resource from the environment. + * The resource is then memoized at the Logging instance level for future use. + * + * @param options + * @private + */ + private async getOrSetResource(options: WriteOptions) { if (options.resource) { if (options.resource.labels) snakecaseKeys(options.resource.labels); - return writeWithResource(options.resource); - } else if (this.logging.detectedResource) { - return writeWithResource(this.logging.detectedResource); - } else { - const resource = await getDefaultResource( - this.logging.auth as unknown as GoogleAuth - ); - this.logging.detectedResource = resource; - return writeWithResource(resource); - } - // writeWithResource formats entries and writes them to loggingService API. - // Service expects props: logName, resource, labels, partialSuccess, dryRun. - async function writeWithResource(resource: {} | null) { - const projectId = await self.logging.auth.getProjectId(); - let decoratedEntries: EntryJson[]; - try { - decoratedEntries = self.decorateEntries( - arrify(entry) as Entry[], - projectId - ); - } catch (err) { - // Ignore errors (the API will speak up if it has an issue). - } - self.truncateEntries(decoratedEntries!); - self.formattedName_ = Log.formatName_(projectId, self.name); - const reqOpts = extend( - { - logName: self.formattedName_, - entries: decoratedEntries!, - resource, - }, - options - ); - delete reqOpts.gaxOptions; - return self.logging.loggingService.writeLogEntries( - reqOpts, - options.gaxOptions - ); - } - // snakecaseKeys turns label keys from camel case to snake case. - function snakecaseKeys(labels: {[p: string]: string} | null | undefined) { - for (const key in labels) { - Object.defineProperty( - labels, - key.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`), - Object.getOwnPropertyDescriptor(labels, key) as PropertyDescriptor - ); - delete labels[key]; - } + return options.resource; } + await this.logging.setDetectedResource(); + return this.logging.detectedResource; } /** @@ -950,12 +921,11 @@ class Log implements LogSeverityFunctions { * * @private * - * @param {string} projectId - Google project ID. * @param {object[]} entries - Entry objects. * @returns {object[]} Serialized entries. * @throws if there is an error during serialization. */ - private decorateEntries(entries: Entry[], projectId: string): EntryJson[] { + private decorateEntries(entries: Entry[]): EntryJson[] { return entries.map(entry => { if (!(entry instanceof Entry)) { entry = this.entry(entry); @@ -964,7 +934,7 @@ class Log implements LogSeverityFunctions { { removeCircular: this.removeCircular_, }, - projectId + this.logging.projectId ); }); } @@ -1018,6 +988,7 @@ class Log implements LogSeverityFunctions { }); } + // TODO: in a future breaking release, delete this extranenous function. /** * Return an array of log entries with the desired severity assigned. * @@ -1030,16 +1001,10 @@ class Log implements LogSeverityFunctions { entries: Entry | Entry[], severity: string ): Entry[] { - return (arrify(entries) as Entry[]).map(entry => { - const metadata = extend(true, {}, entry.metadata, { - severity, - }); - return extend(new Entry(), entry, { - metadata, - }); - }); + return assignSeverityToEntries(entries, severity); } + // TODO: in a future breaking release, delete this extranenous function. /** * Format the name of a log. A log's full name is in the format of * 'projects/{projectId}/logs/{logName}'. @@ -1049,13 +1014,7 @@ class Log implements LogSeverityFunctions { * @returns {string} */ static formatName_(projectId: string, name: string) { - const path = 'projects/' + projectId + '/logs/'; - name = name.replace(path, ''); - if (decodeURIComponent(name) === name) { - // The name has not been encoded yet. - name = encodeURIComponent(name); - } - return path + name; + return formatLogName(projectId, name); } } diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index c5c852a68d9..0a228f45733 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -16,12 +16,12 @@ import * as http from 'http'; import onFinished = require('on-finished'); -import {getOrInjectContext} from '../../context'; +import {getOrInjectContext} from '../../utils/context'; import { makeHttpRequestData, ServerRequest, CloudLoggingHttpRequest, -} from '../../http-request'; +} from '../../utils/http-request'; interface AnnotatedRequestType extends ServerRequest { log: LoggerType; diff --git a/handwritten/logging/src/common.ts b/handwritten/logging/src/utils/common.ts similarity index 92% rename from handwritten/logging/src/common.ts rename to handwritten/logging/src/utils/common.ts index 61d7c504b26..6fea401571e 100644 --- a/handwritten/logging/src/common.ts +++ b/handwritten/logging/src/utils/common.ts @@ -222,3 +222,18 @@ export function decodeValue(value: any) { } } } + +/** + * zuluToDateObj RFC3339 "Zulu" timestamp into a format that can be parsed to + * a JS Date Object. + * @param zuluTime + */ +export function zuluToDateObj(zuluTime: string) { + const ms = Date.parse(zuluTime.split(/[.,Z]/)[0] + 'Z'); + const reNano = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.(\d{0,9})Z$/; + const nanoSecs = zuluTime.match(reNano)?.[1]; + return { + seconds: ms ? Math.floor(ms / 1000) : 0, + nanos: nanoSecs ? Number(nanoSecs.padEnd(9, '0')) : 0, + }; +} diff --git a/handwritten/logging/src/context.ts b/handwritten/logging/src/utils/context.ts similarity index 100% rename from handwritten/logging/src/context.ts rename to handwritten/logging/src/utils/context.ts diff --git a/handwritten/logging/src/http-request.ts b/handwritten/logging/src/utils/http-request.ts similarity index 85% rename from handwritten/logging/src/http-request.ts rename to handwritten/logging/src/utils/http-request.ts index 799de60fe53..7c48a162bf7 100644 --- a/handwritten/logging/src/http-request.ts +++ b/handwritten/logging/src/utils/http-request.ts @@ -23,6 +23,8 @@ */ import * as http from 'http'; +export type RawHttpRequest = http.IncomingMessage & CloudLoggingHttpRequest; + export interface CloudLoggingHttpRequest { requestMethod?: string; requestUrl?: string; @@ -113,3 +115,24 @@ export function makeHttpRequestData( latency ? {latency} : null ); } + +/** + * isRawHttpRequest detects whether a request object extends the + * http.IncomingMessage class. It should return true on HTTP compliant requests + * and all requests created by an http.Server. + * + * @param req + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export function isRawHttpRequest(req?: any): req is RawHttpRequest { + if ( + req && + ('originalUrl' in req || + 'headers' in req || + 'method' in req || + 'url' in req) + ) { + return true; + } + return false; +} diff --git a/handwritten/logging/src/utils/log-common.ts b/handwritten/logging/src/utils/log-common.ts new file mode 100644 index 00000000000..a85fe33c6ae --- /dev/null +++ b/handwritten/logging/src/utils/log-common.ts @@ -0,0 +1,107 @@ +/*! + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Common construct and functions used by both Log and LogSync + */ + +import {Entry} from '../entry'; +import * as extend from 'extend'; +import arrify = require('arrify'); +import {google} from '../../protos/protos'; + +export interface WriteOptions { + labels?: {[index: string]: string}; + resource?: MonitoredResource; +} + +export type MonitoredResource = google.api.IMonitoredResource; + +export enum Severity { + emergency, + alert, + critical, + error, + warning, + notice, + info, + debug, +} +export type SeverityNames = keyof typeof Severity; + +// Mapped types are only supported in type aliases and not in interfaces and +// classes. +export type LogSeverityFunctions = { + // FIXME: the following can be made more precise. + [P in SeverityNames]: Function; +}; + +/** + * snakecaseKeys turns label keys from camel case to snake case. + * @param labels + */ +export function snakecaseKeys( + labels: {[p: string]: string} | null | undefined +) { + for (const key in labels) { + Object.defineProperty( + labels, + key.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`), + Object.getOwnPropertyDescriptor(labels, key) as PropertyDescriptor + ); + delete labels[key]; + } + return labels; +} + +/** + * Return an array of log entries with the desired severity assigned. + * + * @private + * + * @param {object|object[]} entries - Log entries. + * @param {string} severity - The desired severity level. + */ +export function assignSeverityToEntries( + entries: Entry | Entry[], + severity: string +): Entry[] { + return (arrify(entries) as Entry[]).map(entry => { + const metadata = extend(true, {}, entry.metadata, { + severity, + }); + return extend(new Entry(), entry, { + metadata, + }); + }); +} + +/** + * Format the name of a log. A log's full name is in the format of + * 'projects/{projectId}/logs/{logName}'. + * + * @param projectId + * @param name + */ +export function formatLogName(projectId: string, name: string) { + const path = 'projects/' + projectId + '/logs/'; + name = name.replace(path, ''); + if (decodeURIComponent(name) === name) { + // The name has not been encoded yet. + name = encodeURIComponent(name); + } + return path + name; +} diff --git a/handwritten/logging/src/metadata.ts b/handwritten/logging/src/utils/metadata.ts similarity index 99% rename from handwritten/logging/src/metadata.ts rename to handwritten/logging/src/utils/metadata.ts index 7ba052f9103..bb6d20d61f9 100644 --- a/handwritten/logging/src/metadata.ts +++ b/handwritten/logging/src/utils/metadata.ts @@ -19,7 +19,7 @@ import * as gcpMetadata from 'gcp-metadata'; import {GCPEnv, GoogleAuth} from 'google-auth-library'; import {promisify} from 'util'; -import {ServiceContext} from './index'; +import {ServiceContext} from '../index'; const readFile = promisify(fs.readFile); diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 4e3ce05cf82..7c08b1d97cf 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -17,7 +17,7 @@ import {describe, it, before, beforeEach, afterEach} from 'mocha'; import * as extend from 'extend'; import * as proxyquire from 'proxyquire'; import * as entryTypes from '../src/entry'; -import * as common from '../src/common'; +import * as common from '../src/utils/common'; import * as http from 'http'; let fakeEventIdNewOverride: Function | null; @@ -39,6 +39,23 @@ const structToObj = (struct: {}) => { return (fakeStructToObj || common.structToObj)(struct); }; +// Allows for a 1000ms margin of error when comparing timestamps +function withinExpectedTimeBoundaries(result?: Date): boolean { + if (result) { + const now = Date.now(); + const expectedTimestampBoundaries = { + start: new Date(now - 1000), + end: new Date(now + 1000), + }; + if ( + result >= expectedTimestampBoundaries.start && + result <= expectedTimestampBoundaries.end + ) + return true; + } + return false; +} + describe('Entry', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any let Entry: typeof entryTypes.Entry; @@ -49,7 +66,7 @@ describe('Entry', () => { before(() => { Entry = proxyquire('../src/entry.js', { - './common': { + './utils/common': { objToStruct, structToObj, }, @@ -69,13 +86,7 @@ describe('Entry', () => { describe('instantiation', () => { it('should assign timestamp to metadata', () => { - const now = Date.now(); - const expectedTimestampBoundaries = { - start: new Date(now - 1000), - end: new Date(now + 1000), - }; - assert(entry.metadata.timestamp! >= expectedTimestampBoundaries.start); - assert(entry.metadata.timestamp! <= expectedTimestampBoundaries.end); + assert(withinExpectedTimeBoundaries(entry.metadata.timestamp! as Date)); }); it('should not assign timestamp if one is already set', () => { @@ -226,37 +237,17 @@ describe('Entry', () => { }); it('should convert a string timestamp', () => { - const tests = [ - { - inputTime: '2020-01-01T00:00:00.11Z', - expectedSeconds: 1577836800, - expectedNanos: 110000000, - }, - { - inputTime: '2020-01-01T00:00:00Z', - expectedSeconds: 1577836800, - expectedNanos: 0, - }, - { - inputTime: '2020-01-01T00:00:00.999999999Z', - expectedSeconds: 1577836800, - expectedNanos: 999999999, - }, - { - inputTime: 'invalid timestamp string', - expectedSeconds: 0, - expectedNanos: 0, - }, - ]; - - for (const test of tests) { - entry.metadata.timestamp = test.inputTime; - const json = entry.toJSON(); - assert.deepStrictEqual(json.timestamp, { - seconds: test.expectedSeconds, - nanos: test.expectedNanos, - }); - } + const test = { + inputTime: '2020-01-01T00:00:00.999999999Z', + expectedSeconds: 1577836800, + expectedNanos: 999999999, + }; + entry.metadata.timestamp = test.inputTime; + const json = entry.toJSON(); + assert.deepStrictEqual(json.timestamp, { + seconds: test.expectedSeconds, + nanos: test.expectedNanos, + }); }); it('should convert a raw incoming HTTP request', () => { @@ -307,4 +298,74 @@ describe('Entry', () => { assert.strictEqual(json.traceSampled, expected.traceSampled); }); }); + + describe('toStructuredJSON', () => { + it('should not modify the original instance', () => { + const entryBefore = extend(true, {}, entry); + entry.toStructuredJSON(); + const entryAfter = extend(true, {}, entry); + assert.deepStrictEqual(entryBefore, entryAfter); + }); + + it('should include properties not in StructuredJson', () => { + entry.metadata.severity = 'CRITICAL'; + }); + + it('should re-map new keys and delete old keys', () => { + entry.metadata.insertId = '👀'; + entry.metadata.labels = {foo: '⌛️'}; + entry.metadata.spanId = '🍓'; + entry.metadata.trace = '🍝'; + entry.metadata.traceSampled = false; + entry.data = 'this is a log'; + const json = entry.toStructuredJSON(); + assert(withinExpectedTimeBoundaries(new Date(json.timestamp!))); + delete json.timestamp; + const expectedJSON = { + [entryTypes.INSERT_ID_KEY]: '👀', + [entryTypes.TRACE_KEY]: '🍝', + [entryTypes.SPAN_ID_KEY]: '🍓', + [entryTypes.TRACE_SAMPLED_KEY]: false, + [entryTypes.LABELS_KEY]: {foo: '⌛️'}, + message: 'this is a log', + }; + assert.deepStrictEqual(json, expectedJSON); + }); + + it('should assign payloads to message in priority', () => { + entry = new Entry(METADATA); + entry.metadata.textPayload = 'test log'; + let json = entry.toStructuredJSON(); + assert.strictEqual(json.message, 'test log'); + entry.data = 'new test log'; + json = entry.toStructuredJSON(); + assert.strictEqual(json.message, 'new test log'); + }); + + it('should convert a string timestamp', () => { + entry.metadata.timestamp = new Date(); + const json = entry.toStructuredJSON(); + assert(withinExpectedTimeBoundaries(new Date(json.timestamp!))); + }); + + it('should convert a raw http to httprequest', () => { + entry.metadata.httpRequest = { + method: 'POST', + } as http.IncomingMessage; + const json = entry.toStructuredJSON(); + assert.strictEqual((json.httpRequest as any).requestMethod, 'POST'); + }); + + it('should extract trace and span from headers', () => { + entry.metadata.httpRequest = { + headers: { + ['x-cloud-trace-context']: '1/1', + }, + } as any as http.IncomingMessage; + const json = entry.toStructuredJSON(); + assert.strictEqual(json[entryTypes.TRACE_KEY], 'projects//traces/1'); + assert.strictEqual(json[entryTypes.SPAN_ID_KEY], '1'); + assert.strictEqual(json[entryTypes.TRACE_SAMPLED_KEY], false); + }); + }); }); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 32c48b21f77..3e17eec432b 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -33,6 +33,9 @@ import {Policy} from '@google-cloud/pubsub'; import {GetEntriesRequest} from '../src/log'; import {Dataset} from '@google-cloud/bigquery'; import {Bucket} from '@google-cloud/storage'; +import * as metadata from '../src/utils/metadata'; + +import * as sinon from 'sinon'; // eslint-disable-next-line @typescript-eslint/no-var-requires const {v2} = require('../src'); @@ -151,6 +154,7 @@ describe('Logging', () => { GoogleAuth: fakeGoogleAuth, }, './log': {Log: FakeLog}, + './log-sync': {LogSync: FakeLog}, './entry': {Entry: FakeEntry}, './sink': {Sink: FakeSink}, './v2': fakeV2, @@ -1220,6 +1224,18 @@ describe('Logging', () => { }); }); + describe('logSync', () => { + const NAME = 'log-name'; + + it('should return a LogSync object', () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const log = logging.logSync(NAME) as any; + assert(log instanceof FakeLog); + assert.strictEqual(log.calledWith_[0], logging); + assert.strictEqual(log.calledWith_[1], NAME); + }); + }); + describe('request', () => { const CONFIG = { client: 'client', @@ -1740,7 +1756,7 @@ describe('Logging', () => { }); }); - describe('updating project ID', () => { + describe('setProjectId', () => { it('should update project id in case of default placeholder', async () => { logging = new Logging({projectId: '{{projectId}}'}); logging.auth.getProjectId = async () => { @@ -1750,4 +1766,14 @@ describe('Logging', () => { assert.strictEqual(logging.projectId, PROJECT_ID); }); }); + + describe('setDetectedResource', () => { + it('should update detected resource if none', async () => { + logging = new Logging(); + sinon.stub(metadata, 'getDefaultResource').resolves({type: 'bar'}); + await logging.setDetectedResource(); + assert.strictEqual((logging.detectedResource as any).type, 'bar'); + sinon.restore(); + }); + }); }); diff --git a/handwritten/logging/test/log-sync.ts b/handwritten/logging/test/log-sync.ts new file mode 100644 index 00000000000..778208a854b --- /dev/null +++ b/handwritten/logging/test/log-sync.ts @@ -0,0 +1,237 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as assert from 'assert'; +import {describe, it, before, beforeEach, afterEach} from 'mocha'; +import * as sinon from 'sinon'; +import {Entry, Logging} from '../src'; +import {LogSync} from '../src/log-sync'; +import {LABELS_KEY} from '../src/entry'; +import {WriteOptions} from '../src/utils/log-common'; +import * as logCommon from '../src/utils/log-common'; +import * as stream from 'stream'; +import * as extend from 'extend'; +import * as fs from 'fs'; + +describe('LogSync', () => { + const PROJECT_ID = 'project-id'; + const LOG_NAME = 'escaping/required/for/this/log-name'; + const LOG_NAME_ENCODED = encodeURIComponent(LOG_NAME); + const LOG_NAME_FORMATTED = [ + 'projects', + PROJECT_ID, + 'logs', + LOG_NAME_ENCODED, + ].join('/'); + + let LOGGING: Logging; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let log: any; + + describe('instantiation', () => { + before(() => { + log = createLogger(); + }); + + function createLogger() { + LOGGING = { + projectId: '{{project-id}}', + entry: sinon.stub(), + } as {} as Logging; + + return new LogSync(LOGGING, LOG_NAME); + } + + it('should localize the escaped name', () => { + assert.strictEqual(log.name, LOG_NAME_ENCODED); + }); + + it('should localize the formatted name', () => { + const log = new LogSync(LOGGING, LOG_NAME); + assert.strictEqual( + log.formattedName_, + logCommon.formatLogName('{{project-id}}', LOG_NAME) + ); + }); + + it('should localize the Logging instance', () => { + assert.strictEqual(log.logging, LOGGING); + }); + + it('should localize the name', () => { + assert.strictEqual(log.name, LOG_NAME_FORMATTED.split('/').pop()); + }); + + it('should localize a custom transport', () => { + const fakeStream = new stream.Writable(); + const log = new LogSync(LOGGING, LOG_NAME, fakeStream); + assert(log.transport instanceof stream.Writable); + assert.notStrictEqual(log.transport, process.stdout); + }); + + it('should default to process.stdout transport', () => { + assert.strictEqual(log.transport, process.stdout); + }); + }); + + describe('write', () => { + let ENTRY: Entry; + let ENTRIES: Entry[]; + let OPTIONS: WriteOptions; + const TEST_FILE = './output'; + + // For ease of testing, we write to a filestream instead of stdout. + let buffer: stream.Writable; + + beforeEach(() => { + ENTRY = new Entry(undefined, 'testlog'); + ENTRIES = [ENTRY] as Entry[]; + OPTIONS = {} as WriteOptions; + log = createLogger(); + }); + + afterEach(() => { + fs.unlink(TEST_FILE, e => { + console.log(e); + }); + }); + + function createLogger() { + LOGGING = { + projectId: '{{project-id}}', + entry: sinon.stub(), + } as {} as Logging; + buffer = fs.createWriteStream(TEST_FILE); + return new LogSync(LOGGING, LOG_NAME, buffer); + } + + it('should use projectId from Logging for log name', done => { + log.write(ENTRIES); + buffer.end(() => { + const result = JSON.parse(fs.readFileSync(TEST_FILE, 'utf8')); + assert.strictEqual( + result.logName, + 'projects/{{project-id}}/logs/escaping%2Frequired%2Ffor%2Fthis%2Flog-name' + ); + done(); + }); + }); + + it('should detect and transform resource from WriteOptions', done => { + const VALUE = 'camel-case-key-val'; + const CUSTOM_RESOURCE = { + labels: { + camelCaseKey: 'camel-case-key-val', + }, + }; + const optionsWithResource = extend({}, OPTIONS, { + resource: CUSTOM_RESOURCE, + }); + log.write(ENTRIES, optionsWithResource); + buffer.end(() => { + const result = JSON.parse(fs.readFileSync(TEST_FILE, 'utf8')); + assert.strictEqual(result.resource.camel_case_key, VALUE); + done(); + }); + }); + + it('should detect resource from LogEntry next', done => { + log.write(new Entry({resource: {type: 'sometype'}})); + buffer.end(() => { + const result = JSON.parse(fs.readFileSync(TEST_FILE, 'utf8')); + assert.strictEqual(result.resource.type, 'sometype'); + done(); + }); + }); + + it('should detect resource from Logging last', done => { + LOGGING.detectedResource = {type: 'fake resource'}; + log.write(ENTRIES); + buffer.end(() => { + const result = JSON.parse(fs.readFileSync(TEST_FILE, 'utf8')); + assert.strictEqual(result.resource.type, 'fake resource'); + done(); + }); + }); + + it('should not require options', done => { + log.write(ENTRY); + buffer.end(() => { + const result = fs.readFileSync(TEST_FILE, 'utf8'); + assert.ok(result.length > 0); + done(); + }); + }); + + it('should clobber with labels from WriteOptions', done => { + log.write(ENTRY, {labels: {foo: 'bar'}}); + buffer.end(() => { + const result = JSON.parse(fs.readFileSync(TEST_FILE, 'utf8')); + assert.strictEqual(result[LABELS_KEY].foo, 'bar'); + done(); + }); + }); + }); + + describe('severity shortcuts', () => { + let ENTRY: Entry; + let LABELS: WriteOptions; + let assignSeverityStub: sinon.SinonStub; + let writeStub: sinon.SinonStub; + + beforeEach(() => { + ENTRY = {} as Entry; + LABELS = [] as WriteOptions; + assignSeverityStub = sinon.stub(logCommon, 'assignSeverityToEntries'); + writeStub = sinon.stub(log, 'write'); + }); + + afterEach(() => { + assignSeverityStub.restore(); + writeStub.restore(); + }); + + [ + 'alert', + 'critical', + 'debug', + 'emergency', + 'error', + 'info', + 'notice', + 'warning', + ].forEach(severityMethodName => { + describe(severityMethodName, () => { + let severityMethod: Function; + + beforeEach(() => { + severityMethod = log[severityMethodName].bind(log); + }); + + it('should format the entries', async () => { + const severity = severityMethodName.toUpperCase(); + severityMethod(ENTRY, LABELS); + assert(assignSeverityStub.calledOnceWith(ENTRY, severity)); + }); + + it('should pass correct arguments to write', async () => { + const assignedEntries: Entry[] = []; + assignSeverityStub.returns(assignedEntries); + severityMethod(ENTRY, LABELS); + assert(writeStub.calledOnceWith(assignedEntries)); + }); + }); + }); + }); +}); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 6c93205a10b..8da1c9c2f11 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -21,6 +21,8 @@ import {Entry, Logging} from '../src'; import {Log as LOG, LogOptions, WriteOptions} from '../src/log'; import {Data, EntryJson, LogEntry} from '../src/entry'; +import * as logCommon from '../src/utils/log-common'; + describe('Log', () => { let Log: typeof LOG; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -43,22 +45,16 @@ describe('Log', () => { callbackifyAll: sinon.stub(), }; - const metadataFake = { - getDefaultResource: sinon.stub(), - }; - before(() => { Log = proxyquire('../src/log', { '@google-cloud/promisify': callbackifyFake, './entry': {Entry}, - './metadata': metadataFake, }).Log; log = createLogger(); }); beforeEach(() => { - metadataFake.getDefaultResource.reset(); log.logging.entry.reset(); log.logging.getEntries.reset(); log.logging.getEntriesStream.reset(); @@ -68,15 +64,23 @@ describe('Log', () => { log.logging.loggingService.writeLogEntries.reset(); log.logging.auth.getEnv.reset(); log.logging.auth.getProjectId.reset(); - - metadataFake.getDefaultResource.returns(FAKE_RESOURCE); log.logging.auth.getProjectId.resolves(PROJECT_ID); + // Required setup for Write(): + log.logging.setProjectId = () => { + log.logging.projectId = PROJECT_ID; + }; + log.logging.setDetectedResource = () => { + log.logging.detectedResource = FAKE_RESOURCE; + }; }); + // Create a mock Logging instance function createLogger(maxEntrySize?: number) { LOGGING = { projectId: '{{project-id}}', entry: sinon.stub(), + setProjectId: sinon.stub(), + setDetectedResource: sinon.stub(), getEntries: sinon.stub(), getEntriesStream: sinon.stub(), tailEntries: sinon.stub(), @@ -118,17 +122,11 @@ describe('Log', () => { }); it('should localize the formatted name', () => { - const formattedName = 'formatted-name'; - - const formatName_ = Log.formatName_; - Log.formatName_ = () => { - Log.formatName_ = formatName_; - return formattedName; - }; - const log = new Log(LOGGING, LOG_NAME); - - assert.strictEqual(log.formattedName_, formattedName); + assert.strictEqual( + log.formattedName_, + logCommon.formatLogName('{{project-id}}', LOG_NAME) + ); }); it('should accept and localize options.removeCircular', () => { @@ -150,66 +148,6 @@ describe('Log', () => { }); }); - describe('assignSeverityToEntries_', () => { - const circular = {} as {circular: {}}; - circular.circular = circular; - const ENTRIES = [ - {data: {a: 'b'}}, - {data: {c: 'd'}}, - {data: {e: circular}}, - ] as Entry[]; - const SEVERITY = 'severity'; - - it('should assign severity to a single entry', () => { - assert.deepStrictEqual( - Log.assignSeverityToEntries_(ENTRIES[0], SEVERITY) - .map(x => x.metadata) - .map(x => x.severity), - [SEVERITY] - ); - }); - - it('should assign severity property to multiple entries', () => { - assert.deepStrictEqual( - Log.assignSeverityToEntries_(ENTRIES, SEVERITY) - .map(x => x.metadata) - .map(x => x.severity), - [SEVERITY, SEVERITY, SEVERITY] - ); - }); - - it('should not affect original array', () => { - const originalEntries = ENTRIES.map(x => extend({}, x)); - Log.assignSeverityToEntries_(originalEntries, SEVERITY); - assert.deepStrictEqual(originalEntries, ENTRIES); - }); - }); - - describe('formatName_', () => { - const PROJECT_ID = 'project-id'; - const NAME = 'log-name'; - - const EXPECTED = 'projects/' + PROJECT_ID + '/logs/' + NAME; - - it('should properly format the name', () => { - assert.strictEqual(Log.formatName_(PROJECT_ID, NAME), EXPECTED); - }); - - it('should encode a name that requires it', () => { - const name = 'appengine/logs'; - const expectedName = 'projects/' + PROJECT_ID + '/logs/appengine%2Flogs'; - - assert.strictEqual(Log.formatName_(PROJECT_ID, name), expectedName); - }); - - it('should not encode a name that does not require it', () => { - const name = 'appengine%2Flogs'; - const expectedName = 'projects/' + PROJECT_ID + '/logs/' + name; - - assert.strictEqual(Log.formatName_(PROJECT_ID, name), expectedName); - }); - }); - describe('delete', () => { it('should execute gax method', async () => { await log.delete(); @@ -380,7 +318,6 @@ describe('Log', () => { before(() => { origDetectedResource = log.logging.detectedResource; }); - beforeEach(() => { ENTRY = {} as Entry; ENTRIES = [ENTRY] as Entry[]; @@ -395,8 +332,6 @@ describe('Log', () => { }); it('should forward options.resource to request', async () => { - // Also check it should snakecase resource labels, as many sources & docs - // wrongly instruct users to use camelcase. const CUSTOM_RESOURCE = { labels: { projectId: 'fake-project', @@ -425,11 +360,21 @@ describe('Log', () => { ); }); - it('should cache a detected resource', async () => { - const fakeResource = 'test-level-fake-resource'; - metadataFake.getDefaultResource.resetBehavior(); - metadataFake.getDefaultResource.resolves(fakeResource); + it('should cache a projectId in Logging', async () => { + const fakeProject = 'test-level-fake-projectId'; + log.logging.setProjectId = () => { + log.logging.projectId = fakeProject; + }; + await log.write(ENTRIES); + assert(log.logging.loggingService.writeLogEntries.calledOnce); + assert.strictEqual(log.logging.projectId, fakeProject); + }); + it('should cache a detected resource in Logging', async () => { + const fakeResource = 'test-level-fake-resource'; + log.logging.setDetectedResource = () => { + log.logging.detectedResource = fakeResource; + }; await log.write(ENTRIES); assert(log.logging.loggingService.writeLogEntries.calledOnce); assert.strictEqual(log.logging.detectedResource, fakeResource); @@ -438,9 +383,9 @@ describe('Log', () => { it('should re-use detected resource', async () => { const reusableDetectedResource = 'environment-default-resource'; log.logging.detectedResource = reusableDetectedResource; - metadataFake.getDefaultResource.resetBehavior(); - metadataFake.getDefaultResource.throws('Cached resource was not used.'); - + log.logging.setDetectedResource = () => { + assert.fail; + }; await log.write(ENTRIES); assert( log.logging.loggingService.writeLogEntries.calledOnceWith( @@ -498,7 +443,7 @@ describe('Log', () => { decorateEntriesStub.returns('decorated entries'); await log.write(ENTRIES, OPTIONS); - assert(decorateEntriesStub.calledOnceWithExactly(ENTRIES, PROJECT_ID)); + assert(decorateEntriesStub.calledOnceWithExactly(ENTRIES)); assert( log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ @@ -512,9 +457,7 @@ describe('Log', () => { const arrifiedEntries: Entry[] = [ENTRY]; await log.write(ENTRY, OPTIONS); - assert( - decorateEntriesStub.calledOnceWithExactly(arrifiedEntries, PROJECT_ID) - ); + assert(decorateEntriesStub.calledOnceWithExactly(arrifiedEntries)); assert( log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ @@ -560,6 +503,61 @@ describe('Log', () => { }); }); + describe('decorateEntries', () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let toJSONResponse: any; + let logEntryStub: sinon.SinonStub; + let toJSONStub: sinon.SinonStub; + + beforeEach(() => { + toJSONResponse = {}; + toJSONStub = sinon.stub().returns(toJSONResponse); + logEntryStub = sinon.stub(log, 'entry').returns({ + toJSON: toJSONStub, + }); + }); + + afterEach(() => { + logEntryStub.restore(); + }); + + it('should create an Entry object if one is not provided', () => { + const entry = {}; + const decoratedEntries = log.decorateEntries([entry]); + assert.strictEqual(decoratedEntries[0], toJSONResponse); + assert(log.entry.calledWithExactly(entry), PROJECT_ID); + }); + + it('should get JSON format from Entry object', () => { + const entry = new Entry(); + entry.toJSON = () => toJSONResponse as {} as EntryJson; + const decoratedEntries = log.decorateEntries([entry]); + assert.strictEqual(decoratedEntries[0], toJSONResponse); + assert(log.entry.notCalled); + }); + + it('should pass log.removeCircular to toJSON', () => { + log.removeCircular_ = true; + log.logging.projectId = PROJECT_ID; + const entry = new Entry(); + const localJSONStub = sinon + .stub(entry, 'toJSON') + .returns({} as EntryJson); + log.decorateEntries([entry]); + assert( + localJSONStub.calledWithExactly({removeCircular: true}, PROJECT_ID) + ); + }); + + it('should throw error from serialization', () => { + const entry = new Entry(); + sinon.stub(entry, 'toJSON').throws('Error.'); + assert.throws(() => { + log.decorateEntries([entry]); + }, 'Error.'); + }); + }); + describe('truncateEntries', () => { const entryMetaMaxLength = 100; @@ -646,7 +644,7 @@ describe('Log', () => { beforeEach(() => { ENTRY = {} as Entry; LABELS = [] as WriteOptions; - assignSeverityStub = sinon.stub(Log, 'assignSeverityToEntries_'); + assignSeverityStub = sinon.stub(logCommon, 'assignSeverityToEntries'); writeStub = sinon.stub(log, 'write'); }); @@ -687,59 +685,4 @@ describe('Log', () => { }); }); }); - - describe('decorateEntries', () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let toJSONResponse: any; - let logEntryStub: sinon.SinonStub; - let toJSONStub: sinon.SinonStub; - - beforeEach(() => { - toJSONResponse = {}; - toJSONStub = sinon.stub().returns(toJSONResponse); - logEntryStub = sinon.stub(log, 'entry').returns({ - toJSON: toJSONStub, - }); - }); - - afterEach(() => { - logEntryStub.restore(); - }); - - it('should create an Entry object if one is not provided', () => { - const entry = {}; - const decoratedEntries = log.decorateEntries([entry], PROJECT_ID); - assert.strictEqual(decoratedEntries[0], toJSONResponse); - assert(log.entry.calledWithExactly(entry)); - }); - - it('should get JSON format from Entry object', () => { - const entry = new Entry(); - entry.toJSON = () => toJSONResponse as {} as EntryJson; - const decoratedEntries = log.decorateEntries([entry], PROJECT_ID); - assert.strictEqual(decoratedEntries[0], toJSONResponse); - assert(log.entry.notCalled); - }); - - it('should pass log.removeCircular to toJSON', () => { - log.removeCircular_ = true; - const entry = new Entry(); - const localJSONStub = sinon - .stub(entry, 'toJSON') - .returns({} as EntryJson); - - log.decorateEntries([entry], PROJECT_ID); - assert( - localJSONStub.calledWithExactly({removeCircular: true}, PROJECT_ID) - ); - }); - - it('should throw error from serialization', () => { - const entry = new Entry(); - sinon.stub(entry, 'toJSON').throws('Error.'); - assert.throws(() => { - log.decorateEntries([entry], PROJECT_ID); - }, 'Error.'); - }); - }); }); diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index cab0559bc59..fc1fec50ce8 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -44,7 +44,7 @@ describe('middleware/express/make-middleware', () => { const {makeMiddleware} = proxyquire( '../../../src/middleware/express/make-middleware', { - '../../../src/context': FAKE_CONTEXT, + '../../../src/utils/context': FAKE_CONTEXT, } ); diff --git a/handwritten/logging/test/common.ts b/handwritten/logging/test/utils/common.ts similarity index 88% rename from handwritten/logging/test/common.ts rename to handwritten/logging/test/utils/common.ts index e5bdaa2deb4..53e94af442a 100644 --- a/handwritten/logging/test/common.ts +++ b/handwritten/logging/test/utils/common.ts @@ -15,7 +15,8 @@ import { ObjectToStructConverter, ObjectToStructConverterConfig, -} from '../src/common'; + zuluToDateObj, +} from '../../src/utils/common'; import * as assert from 'assert'; import {describe, it, beforeEach} from 'mocha'; const OPTIONS = { @@ -234,3 +235,39 @@ describe('ObjectToStructConverter', () => { }); }); }); + +describe('zuluToDateObj', () => { + it('should convert a string timestamp', () => { + const tests = [ + { + inputTime: '2020-01-01T00:00:00.11Z', + expectedSeconds: 1577836800, + expectedNanos: 110000000, + }, + { + inputTime: '2020-01-01T00:00:00Z', + expectedSeconds: 1577836800, + expectedNanos: 0, + }, + { + inputTime: '2020-01-01T00:00:00.999999999Z', + expectedSeconds: 1577836800, + expectedNanos: 999999999, + }, + { + inputTime: 'invalid timestamp string', + expectedSeconds: 0, + expectedNanos: 0, + }, + ]; + + for (const test of tests) { + const dateString = test.inputTime; + const dateObj = zuluToDateObj(dateString); + assert.deepStrictEqual(dateObj, { + seconds: test.expectedSeconds, + nanos: test.expectedNanos, + }); + } + }); +}); diff --git a/handwritten/logging/test/context.ts b/handwritten/logging/test/utils/context.ts similarity index 99% rename from handwritten/logging/test/context.ts rename to handwritten/logging/test/utils/context.ts index 102b6ae8e1e..cb2353ab10e 100644 --- a/handwritten/logging/test/context.ts +++ b/handwritten/logging/test/utils/context.ts @@ -22,7 +22,7 @@ import { makeHeaderWrapper, parseXCloudTraceHeader, parseTraceParentHeader, -} from '../src/context'; +} from '../../src/utils/context'; describe('context', () => { describe('makeHeaderWrapper', () => { diff --git a/handwritten/logging/test/http-request.ts b/handwritten/logging/test/utils/http-request.ts similarity index 87% rename from handwritten/logging/test/http-request.ts rename to handwritten/logging/test/utils/http-request.ts index 648029410d2..7da2dffe616 100644 --- a/handwritten/logging/test/http-request.ts +++ b/handwritten/logging/test/utils/http-request.ts @@ -16,9 +16,14 @@ import * as assert from 'assert'; import {describe, it} from 'mocha'; -import {ServerResponse} from 'http'; import * as http from 'http'; -import {ServerRequest, makeHttpRequestData} from '../src/http-request'; +type ServerResponse = http.ServerResponse; +import { + ServerRequest, + CloudLoggingHttpRequest, + makeHttpRequestData, + isRawHttpRequest, +} from '../../src/utils/http-request'; describe('http-request', () => { describe('makeHttpRequestData', () => { @@ -120,4 +125,20 @@ describe('http-request', () => { assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); }); }); + + describe('isRawHttp', () => { + it('should be true on valid objects', () => { + const svRequest = {} as ServerRequest; + svRequest.method = 'GET'; + assert(isRawHttpRequest(svRequest)); + }); + + it('should be false on invalid objects', () => { + assert( + !isRawHttpRequest({requestMethod: 'POST'} as CloudLoggingHttpRequest) + ); + assert(!isRawHttpRequest({})); + assert(!isRawHttpRequest(null)); + }); + }); }); diff --git a/handwritten/logging/test/utils/log-common.ts b/handwritten/logging/test/utils/log-common.ts new file mode 100644 index 00000000000..7ee8b073711 --- /dev/null +++ b/handwritten/logging/test/utils/log-common.ts @@ -0,0 +1,110 @@ +/*! + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + formatLogName, + assignSeverityToEntries, + snakecaseKeys, +} from '../../src/utils/log-common'; +import {describe, it} from 'mocha'; +import {Entry} from '../../src'; +import * as assert from 'assert'; +import * as extend from 'extend'; + +describe('Log Common', () => { + describe('assignSeverityToEntries', () => { + const circular = {} as {circular: {}}; + circular.circular = circular; + const ENTRIES = [ + {data: {a: 'b'}}, + {data: {c: 'd'}}, + {data: {e: circular}}, + ] as Entry[]; + const SEVERITY = 'severity'; + + it('should assign severity to a single entry', () => { + assert.deepStrictEqual( + assignSeverityToEntries(ENTRIES[0], SEVERITY) + .map(x => x.metadata) + .map(x => x.severity), + [SEVERITY] + ); + }); + + it('should assign severity property to multiple entries', () => { + assert.deepStrictEqual( + assignSeverityToEntries(ENTRIES, SEVERITY) + .map(x => x.metadata) + .map(x => x.severity), + [SEVERITY, SEVERITY, SEVERITY] + ); + }); + + it('should not affect original array', () => { + const originalEntries = ENTRIES.map(x => extend({}, x)); + assignSeverityToEntries(originalEntries, SEVERITY); + assert.deepStrictEqual(originalEntries, ENTRIES); + }); + }); + + describe('formatLogName', () => { + const PROJECT_ID = 'project-id'; + const NAME = 'log-name'; + + const EXPECTED = 'projects/' + PROJECT_ID + '/logs/' + NAME; + + it('should properly format the name', () => { + assert.strictEqual(formatLogName(PROJECT_ID, NAME), EXPECTED); + }); + + it('should encode a name that requires it', () => { + const name = 'appengine/logs'; + const expectedName = 'projects/' + PROJECT_ID + '/logs/appengine%2Flogs'; + + assert.strictEqual(formatLogName(PROJECT_ID, name), expectedName); + }); + + it('should not encode a name that does not require it', () => { + const name = 'appengine%2Flogs'; + const expectedName = 'projects/' + PROJECT_ID + '/logs/' + name; + + assert.strictEqual(formatLogName(PROJECT_ID, name), expectedName); + }); + + it('should format a name with empty PROJECT_ID', () => { + const name = 'appengine%2Flogs'; + const expectedName = 'projects//logs/' + name; + + assert.strictEqual(formatLogName('', name), expectedName); + }); + }); + + describe('snakecaseKeys', () => { + it('should snakecase keys that are in camelcase', () => { + // Check it should snakecase resource labels, as many sources & docs + // wrongly instruct users to use camelcase. + const labels = { + projectId: 'id', + fooBarBaz: 'foobar', + }; + const result = snakecaseKeys(labels); + assert.deepStrictEqual(result, { + project_id: 'id', + foo_bar_baz: 'foobar', + }); + }); + }); +}); diff --git a/handwritten/logging/test/metadata.ts b/handwritten/logging/test/utils/metadata.ts similarity index 99% rename from handwritten/logging/test/metadata.ts rename to handwritten/logging/test/utils/metadata.ts index 13089c13abb..19dd82cde75 100644 --- a/handwritten/logging/test/metadata.ts +++ b/handwritten/logging/test/utils/metadata.ts @@ -71,7 +71,7 @@ describe('metadata', () => { const INITIAL_ENV: {[key: string]: string | undefined} = {}; before(() => { - metadata = proxyquire('../src/metadata', { + metadata = proxyquire('../../src/utils/metadata', { 'gcp-metadata': fakeGcpMetadata, fs: fakeFS, }); From 66a5d7debcd98467b9968999edc3a7853523c09b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 23 Jun 2021 04:44:23 +0000 Subject: [PATCH 0776/1029] chore: release 9.5.0 (#1104) :robot: I have created a release \*beep\* \*boop\* --- ## [9.5.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.4.1...v9.5.0) (2021-06-23) ### Features * users can write structured logEntries to STDOUT ([#1102](https://www.github.com/googleapis/nodejs-logging/issues/1102)) ([f4e892e](https://www.github.com/googleapis/nodejs-logging/commit/f4e892ed1342f3aacb8056212d75792959ab43b5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 2650401ce80..8a6d49f1e6f 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.5.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.4.1...v9.5.0) (2021-06-23) + + +### Features + +* users can write structured logEntries to STDOUT ([#1102](https://www.github.com/googleapis/nodejs-logging/issues/1102)) ([f4e892e](https://www.github.com/googleapis/nodejs-logging/commit/f4e892ed1342f3aacb8056212d75792959ab43b5)) + ### [9.4.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.4.0...v9.4.1) (2021-06-14) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 67ceb02d7e5..fa01a0c9734 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.4.1", + "version": "9.5.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 19a025336fe2e7b1da2da32279a7438f8ee23d9b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 23 Jun 2021 04:54:23 +0000 Subject: [PATCH 0777/1029] fix: make request optional in all cases (#1103) ... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 Source-Link: https://github.com/googleapis/googleapis/commit/076f7e9f0b258bdb54338895d7251b202e8f0de3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892 --- handwritten/logging/.gitignore | 1 - .../src/v2/config_service_v2_client.ts | 92 +++++++++---------- .../src/v2/logging_service_v2_client.ts | 20 ++-- .../src/v2/metrics_service_v2_client.ts | 20 ++-- 4 files changed, 66 insertions(+), 67 deletions(-) diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index 783162def96..5d32b23782f 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -12,4 +12,3 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ -.vscode diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index dcf3f148233..0771fce7859 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -422,7 +422,7 @@ export class ConfigServiceV2Client { // -- Service calls -- // ------------------- getBucket( - request: protos.google.logging.v2.IGetBucketRequest, + request?: protos.google.logging.v2.IGetBucketRequest, options?: CallOptions ): Promise< [ @@ -474,7 +474,7 @@ export class ConfigServiceV2Client { * const [response] = await client.getBucket(request); */ getBucket( - request: protos.google.logging.v2.IGetBucketRequest, + request?: protos.google.logging.v2.IGetBucketRequest, optionsOrCallback?: | CallOptions | Callback< @@ -513,7 +513,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getBucket(request, options, callback); } createBucket( - request: protos.google.logging.v2.ICreateBucketRequest, + request?: protos.google.logging.v2.ICreateBucketRequest, options?: CallOptions ): Promise< [ @@ -570,7 +570,7 @@ export class ConfigServiceV2Client { * const [response] = await client.createBucket(request); */ createBucket( - request: protos.google.logging.v2.ICreateBucketRequest, + request?: protos.google.logging.v2.ICreateBucketRequest, optionsOrCallback?: | CallOptions | Callback< @@ -609,7 +609,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.createBucket(request, options, callback); } updateBucket( - request: protos.google.logging.v2.IUpdateBucketRequest, + request?: protos.google.logging.v2.IUpdateBucketRequest, options?: CallOptions ): Promise< [ @@ -683,7 +683,7 @@ export class ConfigServiceV2Client { * const [response] = await client.updateBucket(request); */ updateBucket( - request: protos.google.logging.v2.IUpdateBucketRequest, + request?: protos.google.logging.v2.IUpdateBucketRequest, optionsOrCallback?: | CallOptions | Callback< @@ -722,7 +722,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.updateBucket(request, options, callback); } deleteBucket( - request: protos.google.logging.v2.IDeleteBucketRequest, + request?: protos.google.logging.v2.IDeleteBucketRequest, options?: CallOptions ): Promise< [ @@ -777,7 +777,7 @@ export class ConfigServiceV2Client { * const [response] = await client.deleteBucket(request); */ deleteBucket( - request: protos.google.logging.v2.IDeleteBucketRequest, + request?: protos.google.logging.v2.IDeleteBucketRequest, optionsOrCallback?: | CallOptions | Callback< @@ -816,7 +816,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.deleteBucket(request, options, callback); } undeleteBucket( - request: protos.google.logging.v2.IUndeleteBucketRequest, + request?: protos.google.logging.v2.IUndeleteBucketRequest, options?: CallOptions ): Promise< [ @@ -869,7 +869,7 @@ export class ConfigServiceV2Client { * const [response] = await client.undeleteBucket(request); */ undeleteBucket( - request: protos.google.logging.v2.IUndeleteBucketRequest, + request?: protos.google.logging.v2.IUndeleteBucketRequest, optionsOrCallback?: | CallOptions | Callback< @@ -908,7 +908,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.undeleteBucket(request, options, callback); } getView( - request: protos.google.logging.v2.IGetViewRequest, + request?: protos.google.logging.v2.IGetViewRequest, options?: CallOptions ): Promise< [ @@ -957,7 +957,7 @@ export class ConfigServiceV2Client { * const [response] = await client.getView(request); */ getView( - request: protos.google.logging.v2.IGetViewRequest, + request?: protos.google.logging.v2.IGetViewRequest, optionsOrCallback?: | CallOptions | Callback< @@ -996,7 +996,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getView(request, options, callback); } createView( - request: protos.google.logging.v2.ICreateViewRequest, + request?: protos.google.logging.v2.ICreateViewRequest, options?: CallOptions ): Promise< [ @@ -1050,7 +1050,7 @@ export class ConfigServiceV2Client { * const [response] = await client.createView(request); */ createView( - request: protos.google.logging.v2.ICreateViewRequest, + request?: protos.google.logging.v2.ICreateViewRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1089,7 +1089,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.createView(request, options, callback); } updateView( - request: protos.google.logging.v2.IUpdateViewRequest, + request?: protos.google.logging.v2.IUpdateViewRequest, options?: CallOptions ): Promise< [ @@ -1150,7 +1150,7 @@ export class ConfigServiceV2Client { * const [response] = await client.updateView(request); */ updateView( - request: protos.google.logging.v2.IUpdateViewRequest, + request?: protos.google.logging.v2.IUpdateViewRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1189,7 +1189,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.updateView(request, options, callback); } deleteView( - request: protos.google.logging.v2.IDeleteViewRequest, + request?: protos.google.logging.v2.IDeleteViewRequest, options?: CallOptions ): Promise< [ @@ -1238,7 +1238,7 @@ export class ConfigServiceV2Client { * const [response] = await client.deleteView(request); */ deleteView( - request: protos.google.logging.v2.IDeleteViewRequest, + request?: protos.google.logging.v2.IDeleteViewRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1277,7 +1277,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.deleteView(request, options, callback); } getSink( - request: protos.google.logging.v2.IGetSinkRequest, + request?: protos.google.logging.v2.IGetSinkRequest, options?: CallOptions ): Promise< [ @@ -1328,7 +1328,7 @@ export class ConfigServiceV2Client { * const [response] = await client.getSink(request); */ getSink( - request: protos.google.logging.v2.IGetSinkRequest, + request?: protos.google.logging.v2.IGetSinkRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1367,7 +1367,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getSink(request, options, callback); } createSink( - request: protos.google.logging.v2.ICreateSinkRequest, + request?: protos.google.logging.v2.ICreateSinkRequest, options?: CallOptions ): Promise< [ @@ -1436,7 +1436,7 @@ export class ConfigServiceV2Client { * const [response] = await client.createSink(request); */ createSink( - request: protos.google.logging.v2.ICreateSinkRequest, + request?: protos.google.logging.v2.ICreateSinkRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1475,7 +1475,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.createSink(request, options, callback); } updateSink( - request: protos.google.logging.v2.IUpdateSinkRequest, + request?: protos.google.logging.v2.IUpdateSinkRequest, options?: CallOptions ): Promise< [ @@ -1561,7 +1561,7 @@ export class ConfigServiceV2Client { * const [response] = await client.updateSink(request); */ updateSink( - request: protos.google.logging.v2.IUpdateSinkRequest, + request?: protos.google.logging.v2.IUpdateSinkRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1600,7 +1600,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.updateSink(request, options, callback); } deleteSink( - request: protos.google.logging.v2.IDeleteSinkRequest, + request?: protos.google.logging.v2.IDeleteSinkRequest, options?: CallOptions ): Promise< [ @@ -1653,7 +1653,7 @@ export class ConfigServiceV2Client { * const [response] = await client.deleteSink(request); */ deleteSink( - request: protos.google.logging.v2.IDeleteSinkRequest, + request?: protos.google.logging.v2.IDeleteSinkRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1692,7 +1692,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.deleteSink(request, options, callback); } getExclusion( - request: protos.google.logging.v2.IGetExclusionRequest, + request?: protos.google.logging.v2.IGetExclusionRequest, options?: CallOptions ): Promise< [ @@ -1743,7 +1743,7 @@ export class ConfigServiceV2Client { * const [response] = await client.getExclusion(request); */ getExclusion( - request: protos.google.logging.v2.IGetExclusionRequest, + request?: protos.google.logging.v2.IGetExclusionRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1782,7 +1782,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getExclusion(request, options, callback); } createExclusion( - request: protos.google.logging.v2.ICreateExclusionRequest, + request?: protos.google.logging.v2.ICreateExclusionRequest, options?: CallOptions ): Promise< [ @@ -1838,7 +1838,7 @@ export class ConfigServiceV2Client { * const [response] = await client.createExclusion(request); */ createExclusion( - request: protos.google.logging.v2.ICreateExclusionRequest, + request?: protos.google.logging.v2.ICreateExclusionRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1877,7 +1877,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.createExclusion(request, options, callback); } updateExclusion( - request: protos.google.logging.v2.IUpdateExclusionRequest, + request?: protos.google.logging.v2.IUpdateExclusionRequest, options?: CallOptions ): Promise< [ @@ -1939,7 +1939,7 @@ export class ConfigServiceV2Client { * const [response] = await client.updateExclusion(request); */ updateExclusion( - request: protos.google.logging.v2.IUpdateExclusionRequest, + request?: protos.google.logging.v2.IUpdateExclusionRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1978,7 +1978,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.updateExclusion(request, options, callback); } deleteExclusion( - request: protos.google.logging.v2.IDeleteExclusionRequest, + request?: protos.google.logging.v2.IDeleteExclusionRequest, options?: CallOptions ): Promise< [ @@ -2029,7 +2029,7 @@ export class ConfigServiceV2Client { * const [response] = await client.deleteExclusion(request); */ deleteExclusion( - request: protos.google.logging.v2.IDeleteExclusionRequest, + request?: protos.google.logging.v2.IDeleteExclusionRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2068,7 +2068,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.deleteExclusion(request, options, callback); } getCmekSettings( - request: protos.google.logging.v2.IGetCmekSettingsRequest, + request?: protos.google.logging.v2.IGetCmekSettingsRequest, options?: CallOptions ): Promise< [ @@ -2131,7 +2131,7 @@ export class ConfigServiceV2Client { * const [response] = await client.getCmekSettings(request); */ getCmekSettings( - request: protos.google.logging.v2.IGetCmekSettingsRequest, + request?: protos.google.logging.v2.IGetCmekSettingsRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2170,7 +2170,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getCmekSettings(request, options, callback); } updateCmekSettings( - request: protos.google.logging.v2.IUpdateCmekSettingsRequest, + request?: protos.google.logging.v2.IUpdateCmekSettingsRequest, options?: CallOptions ): Promise< [ @@ -2253,7 +2253,7 @@ export class ConfigServiceV2Client { * const [response] = await client.updateCmekSettings(request); */ updateCmekSettings( - request: protos.google.logging.v2.IUpdateCmekSettingsRequest, + request?: protos.google.logging.v2.IUpdateCmekSettingsRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2295,7 +2295,7 @@ export class ConfigServiceV2Client { } listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, + request?: protos.google.logging.v2.IListBucketsRequest, options?: CallOptions ): Promise< [ @@ -2360,7 +2360,7 @@ export class ConfigServiceV2Client { * for more details and examples. */ listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, + request?: protos.google.logging.v2.IListBucketsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2520,7 +2520,7 @@ export class ConfigServiceV2Client { ) as AsyncIterable; } listViews( - request: protos.google.logging.v2.IListViewsRequest, + request?: protos.google.logging.v2.IListViewsRequest, options?: CallOptions ): Promise< [ @@ -2578,7 +2578,7 @@ export class ConfigServiceV2Client { * for more details and examples. */ listViews( - request: protos.google.logging.v2.IListViewsRequest, + request?: protos.google.logging.v2.IListViewsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2724,7 +2724,7 @@ export class ConfigServiceV2Client { ) as AsyncIterable; } listSinks( - request: protos.google.logging.v2.IListSinksRequest, + request?: protos.google.logging.v2.IListSinksRequest, options?: CallOptions ): Promise< [ @@ -2785,7 +2785,7 @@ export class ConfigServiceV2Client { * for more details and examples. */ listSinks( - request: protos.google.logging.v2.IListSinksRequest, + request?: protos.google.logging.v2.IListSinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2937,7 +2937,7 @@ export class ConfigServiceV2Client { ) as AsyncIterable; } listExclusions( - request: protos.google.logging.v2.IListExclusionsRequest, + request?: protos.google.logging.v2.IListExclusionsRequest, options?: CallOptions ): Promise< [ @@ -2998,7 +2998,7 @@ export class ConfigServiceV2Client { * for more details and examples. */ listExclusions( - request: protos.google.logging.v2.IListExclusionsRequest, + request?: protos.google.logging.v2.IListExclusionsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 8400141234e..b7ffd7417e2 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -427,7 +427,7 @@ export class LoggingServiceV2Client { // -- Service calls -- // ------------------- deleteLog( - request: protos.google.logging.v2.IDeleteLogRequest, + request?: protos.google.logging.v2.IDeleteLogRequest, options?: CallOptions ): Promise< [ @@ -485,7 +485,7 @@ export class LoggingServiceV2Client { * const [response] = await client.deleteLog(request); */ deleteLog( - request: protos.google.logging.v2.IDeleteLogRequest, + request?: protos.google.logging.v2.IDeleteLogRequest, optionsOrCallback?: | CallOptions | Callback< @@ -524,7 +524,7 @@ export class LoggingServiceV2Client { return this.innerApiCalls.deleteLog(request, options, callback); } writeLogEntries( - request: protos.google.logging.v2.IWriteLogEntriesRequest, + request?: protos.google.logging.v2.IWriteLogEntriesRequest, options?: CallOptions ): Promise< [ @@ -639,7 +639,7 @@ export class LoggingServiceV2Client { * const [response] = await client.writeLogEntries(request); */ writeLogEntries( - request: protos.google.logging.v2.IWriteLogEntriesRequest, + request?: protos.google.logging.v2.IWriteLogEntriesRequest, optionsOrCallback?: | CallOptions | Callback< @@ -698,7 +698,7 @@ export class LoggingServiceV2Client { } listLogEntries( - request: protos.google.logging.v2.IListLogEntriesRequest, + request?: protos.google.logging.v2.IListLogEntriesRequest, options?: CallOptions ): Promise< [ @@ -787,7 +787,7 @@ export class LoggingServiceV2Client { * for more details and examples. */ listLogEntries( - request: protos.google.logging.v2.IListLogEntriesRequest, + request?: protos.google.logging.v2.IListLogEntriesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -971,7 +971,7 @@ export class LoggingServiceV2Client { ) as AsyncIterable; } listMonitoredResourceDescriptors( - request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, options?: CallOptions ): Promise< [ @@ -1029,7 +1029,7 @@ export class LoggingServiceV2Client { * for more details and examples. */ listMonitoredResourceDescriptors( - request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, + request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -1157,7 +1157,7 @@ export class LoggingServiceV2Client { ) as AsyncIterable; } listLogs( - request: protos.google.logging.v2.IListLogsRequest, + request?: protos.google.logging.v2.IListLogsRequest, options?: CallOptions ): Promise< [ @@ -1231,7 +1231,7 @@ export class LoggingServiceV2Client { * for more details and examples. */ listLogs( - request: protos.google.logging.v2.IListLogsRequest, + request?: protos.google.logging.v2.IListLogsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index c0927e270b1..df893130406 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -387,7 +387,7 @@ export class MetricsServiceV2Client { // -- Service calls -- // ------------------- getLogMetric( - request: protos.google.logging.v2.IGetLogMetricRequest, + request?: protos.google.logging.v2.IGetLogMetricRequest, options?: CallOptions ): Promise< [ @@ -433,7 +433,7 @@ export class MetricsServiceV2Client { * const [response] = await client.getLogMetric(request); */ getLogMetric( - request: protos.google.logging.v2.IGetLogMetricRequest, + request?: protos.google.logging.v2.IGetLogMetricRequest, optionsOrCallback?: | CallOptions | Callback< @@ -472,7 +472,7 @@ export class MetricsServiceV2Client { return this.innerApiCalls.getLogMetric(request, options, callback); } createLogMetric( - request: protos.google.logging.v2.ICreateLogMetricRequest, + request?: protos.google.logging.v2.ICreateLogMetricRequest, options?: CallOptions ): Promise< [ @@ -523,7 +523,7 @@ export class MetricsServiceV2Client { * const [response] = await client.createLogMetric(request); */ createLogMetric( - request: protos.google.logging.v2.ICreateLogMetricRequest, + request?: protos.google.logging.v2.ICreateLogMetricRequest, optionsOrCallback?: | CallOptions | Callback< @@ -562,7 +562,7 @@ export class MetricsServiceV2Client { return this.innerApiCalls.createLogMetric(request, options, callback); } updateLogMetric( - request: protos.google.logging.v2.IUpdateLogMetricRequest, + request?: protos.google.logging.v2.IUpdateLogMetricRequest, options?: CallOptions ): Promise< [ @@ -614,7 +614,7 @@ export class MetricsServiceV2Client { * const [response] = await client.updateLogMetric(request); */ updateLogMetric( - request: protos.google.logging.v2.IUpdateLogMetricRequest, + request?: protos.google.logging.v2.IUpdateLogMetricRequest, optionsOrCallback?: | CallOptions | Callback< @@ -653,7 +653,7 @@ export class MetricsServiceV2Client { return this.innerApiCalls.updateLogMetric(request, options, callback); } deleteLogMetric( - request: protos.google.logging.v2.IDeleteLogMetricRequest, + request?: protos.google.logging.v2.IDeleteLogMetricRequest, options?: CallOptions ): Promise< [ @@ -699,7 +699,7 @@ export class MetricsServiceV2Client { * const [response] = await client.deleteLogMetric(request); */ deleteLogMetric( - request: protos.google.logging.v2.IDeleteLogMetricRequest, + request?: protos.google.logging.v2.IDeleteLogMetricRequest, optionsOrCallback?: | CallOptions | Callback< @@ -739,7 +739,7 @@ export class MetricsServiceV2Client { } listLogMetrics( - request: protos.google.logging.v2.IListLogMetricsRequest, + request?: protos.google.logging.v2.IListLogMetricsRequest, options?: CallOptions ): Promise< [ @@ -797,7 +797,7 @@ export class MetricsServiceV2Client { * for more details and examples. */ listLogMetrics( - request: protos.google.logging.v2.IListLogMetricsRequest, + request?: protos.google.logging.v2.IListLogMetricsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< From 6f750259f8dade59816e86fe26f9f6de30ef7bb3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 23 Jun 2021 05:04:24 +0000 Subject: [PATCH 0778/1029] chore: release 9.5.1 (#1105) :robot: I have created a release \*beep\* \*boop\* --- ### [9.5.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.0...v9.5.1) (2021-06-23) ### Bug Fixes * make request optional in all cases ([#1103](https://www.github.com/googleapis/nodejs-logging/issues/1103)) ([4f5e5e3](https://www.github.com/googleapis/nodejs-logging/commit/4f5e5e3a1e0d79f5bc172687a95cd0839c1a124e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 8a6d49f1e6f..233442a690d 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.5.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.0...v9.5.1) (2021-06-23) + + +### Bug Fixes + +* make request optional in all cases ([#1103](https://www.github.com/googleapis/nodejs-logging/issues/1103)) ([4f5e5e3](https://www.github.com/googleapis/nodejs-logging/commit/4f5e5e3a1e0d79f5bc172687a95cd0839c1a124e)) + ## [9.5.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.4.1...v9.5.0) (2021-06-23) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index fa01a0c9734..9d87ae64393 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.5.0", + "version": "9.5.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 11b0642ff993ea8849a54b3c9c6e707572250d3d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 24 Jun 2021 17:52:50 +0000 Subject: [PATCH 0779/1029] build(node): don't throw on deprecation in unit tests (#1107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1134 🦕 Removes the commit body and relative PR# from the commit message. For example, for this commit: https://github.com/googleapis/synthtool/commit/9763f20e4b7bb1091082462b2f7970e965d0d414 `post-processor-changes.txt` would contain ``` build: enable npm for php/python builds Source-Link: https://github.com/googleapis/synthtool/commit/9763f20e4b7bb1091082462b2f7970e965d0d414 ``` instead of ``` build: enable npm for php/python builds (#1133) * build: enable npm for php/python builds * update comment Source-Link: https://github.com/googleapis/synthtool/commit/9763f20e4b7bb1091082462b2f7970e965d0d414 ``` Source-Link: https://github.com/googleapis/synthtool/commit/e934b93402284f834b510ebbf421864e881dce02 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:805e2e389eafefa5ed484c30b83a7a875e6b1c7ee125d812e8b01ecc531c3fac --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index e7c45fd36bc..7b83ac87d91 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:c9c7828c165b1985579098978877935ee52dda2b1b538087514fd24fa2443e7a + digest: sha256:805e2e389eafefa5ed484c30b83a7a875e6b1c7ee125d812e8b01ecc531c3fac From e4f3fd8a64eb007b40677885fa06f475287e6027 Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Fri, 25 Jun 2021 13:28:23 +0700 Subject: [PATCH 0780/1029] docs: mention LogSync in readme (#1106) --- env-tests-logging | 2 +- handwritten/logging/.readme-partials.yml | 36 ++++++++++++++++++++++++ handwritten/logging/README.md | 36 ++++++++++++++++++++++++ handwritten/logging/src/entry.ts | 4 +-- handwritten/logging/test/entry.ts | 1 + 5 files changed, 76 insertions(+), 3 deletions(-) diff --git a/env-tests-logging b/env-tests-logging index a4bee83fa26..3b8a2817dd6 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit a4bee83fa2648b140bc928e2098ab67d82c6296c +Subproject commit 3b8a2817dd6fe1650498cbc4af0af1058bb788ae diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index 6d4d96abdd5..dbaf4e1106e 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -25,3 +25,39 @@ body: |- The `@google-cloud/logging` library will handle batching and dispatching these log lines to the API. + + ## Writing to Stdout + + The `LogSync` class helps users easily write context-rich structured logs to + `stdout` or any custom transport. It extracts additional log properties like + trace context from HTTP headers and can be used as an on/off toggle between + writing to the API or to `stdout` during local development. + + Logs written to `stdout` are then picked up, out-of-process, by a Logging + agent in the respective GCP environment. Logging agents can add more + properties to each entry before streaming it to the Logging API. + + Read more about [Logging agents](https://cloud.google.com/logging/docs/agent/logging). + + Serverless applications like Cloud Functions, Cloud Run, and App Engine + are highly recommended to use the `LogSync` class as async logs may be dropped + due to lack of CPU. + + Read more about [structured logging](https://cloud.google.com/logging/docs/structured-logging). + + ```js + // Optional: Create and configure a client + const logging = new Logging(); + await logging.setProjectId() + await logging.setDetectedResource() + + // Create a LogSync transport, defaulting to `process.stdout` + const log = logging.logSync(logname); + const meta = { // optional field overrides here }; + const entry = log.entry(meta, 'Your log message'); + log.write(entry); + + // Syntax sugar for logging at a specific severity + log.alert(entry); + log.warning(entry); + ``` diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 8977d422d57..4adad1a7303 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -117,6 +117,42 @@ log.write(logEntry2); The `@google-cloud/logging` library will handle batching and dispatching these log lines to the API. +## Writing to Stdout + +The `LogSync` class helps users easily write context-rich structured logs to +`stdout` or any custom transport. It extracts additional log properties like +trace context from HTTP headers and can be used as an on/off toggle between +writing to the API or to `stdout` during local development. + +Logs written to `stdout` are then picked up, out-of-process, by a Logging +agent in the respective GCP environment. Logging agents can add more +properties to each entry before streaming it to the Logging API. + +Read more about [Logging agents](https://cloud.google.com/logging/docs/agent/logging). + +Serverless applications like Cloud Functions, Cloud Run, and App Engine +are highly recommended to use the `LogSync` class as async logs may be dropped +due to lack of CPU. + +Read more about [structured logging](https://cloud.google.com/logging/docs/structured-logging). + +```js +// Optional: Create and configure a client +const logging = new Logging(); +await logging.setProjectId() +await logging.setDetectedResource() + +// Create a LogSync transport, defaulting to `process.stdout` +const log = logging.logSync(logname); +const meta = { // optional field overrides here }; +const entry = log.entry(meta, 'Your log message'); +log.write(entry); + +// Syntax sugar for logging at a specific severity +log.alert(entry); +log.warning(entry); +``` + ## Samples diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 7275e2063ad..9ee17784937 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -244,7 +244,7 @@ class Entry { toStructuredJSON(projectId = '') { const meta = this.metadata; // Mask out the keys that need to be renamed. - // eslint-disable @typescript-eslint/no-unused-vars + /* eslint-disable @typescript-eslint/no-unused-vars */ const { textPayload, jsonPayload, @@ -257,7 +257,7 @@ class Entry { labels, ...validKeys } = meta; - // eslint-enable @typescript-eslint/no-unused-vars + /* eslint-enable @typescript-eslint/no-unused-vars */ const entry: StructuredJson = extend(true, {}, validKeys) as {}; // Re-map keys names. entry[LABELS_KEY] = meta.labels diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 7c08b1d97cf..9df00acfa89 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -353,6 +353,7 @@ describe('Entry', () => { method: 'POST', } as http.IncomingMessage; const json = entry.toStructuredJSON(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.strictEqual((json.httpRequest as any).requestMethod, 'POST'); }); From 07ef7044bdcd81a04b32afd82385bcf69f58d9bf Mon Sep 17 00:00:00 2001 From: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> Date: Tue, 29 Jun 2021 02:50:45 +0700 Subject: [PATCH 0781/1029] Update blunderbuss.yml (#1108) --- handwritten/logging/.github/blunderbuss.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml index bf5769c42a0..45e412794bd 100644 --- a/handwritten/logging/.github/blunderbuss.yml +++ b/handwritten/logging/.github/blunderbuss.yml @@ -1,4 +1,4 @@ assign_issues: - - nicoleczhu + - googleapis/api-logging assign_prs: - - nicoleczhu + - googleapis/api-logging From f512a94b08081ac565526746150a3b1b6f702b6d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 29 Jun 2021 07:34:59 -0700 Subject: [PATCH 0782/1029] build(node): do not throw on deprecation (#1140) (#1109) Refs https://github.com/googleapis/nodejs-service-usage/issues/22 Source-Link: https://github.com/googleapis/synthtool/commit/6d26b13debbfe3c6a6a9f9f1914c5bccf1e6fadc Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:e59b73e911585903ee6b8a1c5246e93d9e9463420f597b6eb2e4b616ee8a0fee Co-authored-by: Owl Bot Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com> --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.kokoro/test.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 7b83ac87d91..26e91bb2900 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:805e2e389eafefa5ed484c30b83a7a875e6b1c7ee125d812e8b01ecc531c3fac + digest: sha256:e59b73e911585903ee6b8a1c5246e93d9e9463420f597b6eb2e4b616ee8a0fee diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index 5d6383fcb78..b5646aeb628 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -32,6 +32,9 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ART } trap cleanup EXIT HUP fi +# Unit tests exercise the entire API surface, which may include +# deprecation warnings: +export MOCHA_THROW_DEPRECATION=false npm test # codecov combines coverage across integration and unit tests. Include From 4c4e66f336c22f1ba4985f435d972e1d65b6c899 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 29 Jun 2021 10:49:17 -0400 Subject: [PATCH 0783/1029] fix(deps): require google-gax v2.17.0 (#1111) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9d87ae64393..b4315f94fb8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^7.0.0", - "google-gax": "^2.12.0", + "google-gax": "^2.17.0", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5" From 533ce11f409911e516be6e7f8bd88754cdc288fc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 15:42:27 +0000 Subject: [PATCH 0784/1029] build: auto-approve renovate-bot PRs for minor updates (#1145) (#1114) Source-Link: https://github.com/googleapis/synthtool/commit/39652e3948f455fd0b77535a0145eeec561a3706 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:41d5457ff79c3945782ab7e23bf4d617fd7bf3f2b03b6d84808010f7d2e10ca2 --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.github/auto-approve.yml | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 26e91bb2900..9d507eeeb02 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:e59b73e911585903ee6b8a1c5246e93d9e9463420f597b6eb2e4b616ee8a0fee + digest: sha256:41d5457ff79c3945782ab7e23bf4d617fd7bf3f2b03b6d84808010f7d2e10ca2 diff --git a/handwritten/logging/.github/auto-approve.yml b/handwritten/logging/.github/auto-approve.yml index 903697974b0..a79ba66c2c0 100644 --- a/handwritten/logging/.github/auto-approve.yml +++ b/handwritten/logging/.github/auto-approve.yml @@ -4,4 +4,9 @@ rules: changedFiles: - "package\\.json$" - "CHANGELOG\\.md$" - maxFiles: 3 \ No newline at end of file + maxFiles: 3 +- author: "renovate-bot" + title: "^(fix\\(deps\\)|chore\\(deps\\)):" + changedFiles: + - "/package\\.json$" + maxFiles: 2 From 6cb17efdf5b3d5208a32d5534009561d24b782fd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:14:41 +0000 Subject: [PATCH 0785/1029] chore: release 9.5.2 (#1112) :robot: I have created a release \*beep\* \*boop\* --- ### [9.5.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.1...v9.5.2) (2021-06-30) ### Bug Fixes * **deps:** require google-gax v2.17.0 ([#1111](https://www.github.com/googleapis/nodejs-logging/issues/1111)) ([d64d671](https://www.github.com/googleapis/nodejs-logging/commit/d64d67190dddf0318ca47eb8528e4b9052e3a9c0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 233442a690d..024623cc665 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.5.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.1...v9.5.2) (2021-06-30) + + +### Bug Fixes + +* **deps:** require google-gax v2.17.0 ([#1111](https://www.github.com/googleapis/nodejs-logging/issues/1111)) ([d64d671](https://www.github.com/googleapis/nodejs-logging/commit/d64d67190dddf0318ca47eb8528e4b9052e3a9c0)) + ### [9.5.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.0...v9.5.1) (2021-06-23) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b4315f94fb8..468136e29d3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.5.1", + "version": "9.5.2", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 433667450e0b5d4529f12b1296861bb3004c821f Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:44:18 -0400 Subject: [PATCH 0786/1029] fix(deps): google-gax v2.17.1 (#1117) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 468136e29d3..a2afecf110f 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^7.0.0", - "google-gax": "^2.17.0", + "google-gax": "^2.17.1", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5" From 9608ccf11abb934118c7b0921da9dddb26af68ce Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 22:04:17 +0000 Subject: [PATCH 0787/1029] chore: release 9.5.3 (#1118) :robot: I have created a release \*beep\* \*boop\* --- ### [9.5.3](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.2...v9.5.3) (2021-07-12) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#1117](https://www.github.com/googleapis/nodejs-logging/issues/1117)) ([cbf3af9](https://www.github.com/googleapis/nodejs-logging/commit/cbf3af964225dfdf1bb23406ffbfd71202c7b6ca)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 024623cc665..b625f6c82b5 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.5.3](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.2...v9.5.3) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#1117](https://www.github.com/googleapis/nodejs-logging/issues/1117)) ([cbf3af9](https://www.github.com/googleapis/nodejs-logging/commit/cbf3af964225dfdf1bb23406ffbfd71202c7b6ca)) + ### [9.5.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.1...v9.5.2) (2021-06-30) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a2afecf110f..40ee0e2eed9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.5.2", + "version": "9.5.3", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 6153fde1d9c2fd1a56ef210f68ca90a711ae729c Mon Sep 17 00:00:00 2001 From: Konstantin Tarkus Date: Wed, 14 Jul 2021 22:52:50 +0300 Subject: [PATCH 0788/1029] fix: missing "uuid" dependency (#1119) --- handwritten/logging/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 40ee0e2eed9..7b2b07d946c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -58,7 +58,8 @@ "google-gax": "^2.17.1", "on-finished": "^2.3.0", "pumpify": "^2.0.1", - "stream-events": "^1.0.5" + "stream-events": "^1.0.5", + "uuid": "^8.0.0" }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", @@ -89,7 +90,6 @@ "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", - "uuid": "^8.0.0", "webpack": "^5.0.0", "webpack-cli": "^4.0.0", "uglify-js": "^3.13.5" From 4e7b0de5b1b0b6fa8f41502e87ea801536887b25 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 14 Jul 2021 20:02:22 +0000 Subject: [PATCH 0789/1029] chore: release 9.5.4 (#1120) :robot: I have created a release \*beep\* \*boop\* --- ### [9.5.4](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.3...v9.5.4) (2021-07-14) ### Bug Fixes * missing "uuid" dependency ([#1119](https://www.github.com/googleapis/nodejs-logging/issues/1119)) ([168389c](https://www.github.com/googleapis/nodejs-logging/commit/168389ce885e6e00c7f8d87fbda2564077ff5356)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index b625f6c82b5..d460211d837 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.5.4](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.3...v9.5.4) (2021-07-14) + + +### Bug Fixes + +* missing "uuid" dependency ([#1119](https://www.github.com/googleapis/nodejs-logging/issues/1119)) ([168389c](https://www.github.com/googleapis/nodejs-logging/commit/168389ce885e6e00c7f8d87fbda2564077ff5356)) + ### [9.5.3](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.2...v9.5.3) (2021-07-12) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7b2b07d946c..39fe5529232 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.5.3", + "version": "9.5.4", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 6f3e8bd56a0833dd10f69e757ce5eca6e2bdefe9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:08:15 +0000 Subject: [PATCH 0790/1029] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#1121) Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 --- .../logging/src/v2/config_service_v2_client.ts | 11 ++++++++++- .../logging/src/v2/logging_service_v2_client.ts | 11 ++++++++++- .../logging/src/v2/metrics_service_v2_client.ts | 11 ++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 0771fce7859..052c12120f9 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -48,6 +48,7 @@ const version = require('../../../package.json').version; export class ConfigServiceV2Client { private _terminated = false; private _opts: ClientOptions; + private _providedCustomServicePath: boolean; private _gaxModule: typeof gax | typeof gax.fallback; private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; @@ -59,6 +60,7 @@ export class ConfigServiceV2Client { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; configServiceV2Stub?: Promise<{[name: string]: Function}>; @@ -102,6 +104,9 @@ export class ConfigServiceV2Client { const staticMembers = this.constructor as typeof ConfigServiceV2Client; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -277,6 +282,9 @@ export class ConfigServiceV2Client { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -305,7 +313,8 @@ export class ConfigServiceV2Client { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.ConfigServiceV2, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index b7ffd7417e2..f73b381f955 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -48,6 +48,7 @@ const version = require('../../../package.json').version; export class LoggingServiceV2Client { private _terminated = false; private _opts: ClientOptions; + private _providedCustomServicePath: boolean; private _gaxModule: typeof gax | typeof gax.fallback; private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; @@ -59,6 +60,7 @@ export class LoggingServiceV2Client { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; loggingServiceV2Stub?: Promise<{[name: string]: Function}>; @@ -102,6 +104,9 @@ export class LoggingServiceV2Client { const staticMembers = this.constructor as typeof LoggingServiceV2Client; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -294,6 +299,9 @@ export class LoggingServiceV2Client { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -322,7 +330,8 @@ export class LoggingServiceV2Client { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.LoggingServiceV2, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index df893130406..819ec4076b2 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -48,6 +48,7 @@ const version = require('../../../package.json').version; export class MetricsServiceV2Client { private _terminated = false; private _opts: ClientOptions; + private _providedCustomServicePath: boolean; private _gaxModule: typeof gax | typeof gax.fallback; private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; @@ -59,6 +60,7 @@ export class MetricsServiceV2Client { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; metricsServiceV2Stub?: Promise<{[name: string]: Function}>; @@ -102,6 +104,9 @@ export class MetricsServiceV2Client { const staticMembers = this.constructor as typeof MetricsServiceV2Client; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -259,6 +264,9 @@ export class MetricsServiceV2Client { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -287,7 +295,8 @@ export class MetricsServiceV2Client { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.MetricsServiceV2, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From 049a1b107dbbfc9357c36ff0e1d46ec2ad9a73fa Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:12:12 +0000 Subject: [PATCH 0791/1029] build: switch to release-please release tagging (#1129) (#1124) Requires https://github.com/googleapis/releasetool/pull/338 Source-Link: https://github.com/googleapis/synthtool/commit/1563597d28eca099d6411bbc29ecd09314a80746 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:06c970a44680229c1e8cefa701dbc93b80468ec4a34e6968475084e4ec1e2d7d --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.github/release-please.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 9d507eeeb02..b1434427024 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:41d5457ff79c3945782ab7e23bf4d617fd7bf3f2b03b6d84808010f7d2e10ca2 + digest: sha256:06c970a44680229c1e8cefa701dbc93b80468ec4a34e6968475084e4ec1e2d7d diff --git a/handwritten/logging/.github/release-please.yml b/handwritten/logging/.github/release-please.yml index 85344b92c7f..a1b41da3cb3 100644 --- a/handwritten/logging/.github/release-please.yml +++ b/handwritten/logging/.github/release-please.yml @@ -1 +1,2 @@ +handleGHRelease: true releaseType: node From bb23e6f26390e22da9375cc98edee44eaf4959b1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 30 Jul 2021 17:08:22 +0000 Subject: [PATCH 0792/1029] build: update auto-approve config for new validation (#1169) (#1131) Co-authored-by: Anthonios Partheniou Source-Link: https://github.com/googleapis/synthtool/commit/df7fc1e3a6df4316920ab221431945cdf9aa7217 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:6245a5be4c0406d9b2f04f380d8b88ffe4655df3cdbb57626f8913e8d620f4dd --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.github/auto-approve.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index b1434427024..9b2b9550d5e 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:06c970a44680229c1e8cefa701dbc93b80468ec4a34e6968475084e4ec1e2d7d + digest: sha256:6245a5be4c0406d9b2f04f380d8b88ffe4655df3cdbb57626f8913e8d620f4dd diff --git a/handwritten/logging/.github/auto-approve.yml b/handwritten/logging/.github/auto-approve.yml index a79ba66c2c0..49cf942280a 100644 --- a/handwritten/logging/.github/auto-approve.yml +++ b/handwritten/logging/.github/auto-approve.yml @@ -6,7 +6,7 @@ rules: - "CHANGELOG\\.md$" maxFiles: 3 - author: "renovate-bot" - title: "^(fix\\(deps\\)|chore\\(deps\\)):" + title: "^(fix|chore)\\(deps\\):" changedFiles: - - "/package\\.json$" + - "package\\.json$" maxFiles: 2 From 9bec27f58d38e724668e27f01e925da770c1e642 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:04:35 -0400 Subject: [PATCH 0793/1029] chore(nodejs): update client ref docs link in metadata (#1133) --- handwritten/logging/.repo-metadata.json | 2 +- handwritten/logging/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json index fe333b9afd1..19be8cc7eba 100644 --- a/handwritten/logging/.repo-metadata.json +++ b/handwritten/logging/.repo-metadata.json @@ -1,5 +1,5 @@ { - "client_documentation": "https://googleapis.dev/nodejs/logging/latest", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/logging/latest", "product_documentation": "https://cloud.google.com/logging/docs", "name": "logging", "codeowner_team": "@googleapis/api-logging", diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 4adad1a7303..b809ff5d92f 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -227,7 +227,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/logging/latest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest [product-docs]: https://cloud.google.com/logging/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 6098023ac8422a192469497c3619c8c2ed1bf5d5 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 6 Aug 2021 17:02:15 -0700 Subject: [PATCH 0794/1029] chore(tests): updated env tests submodule (#1134) * updated environment test submodule * updated commit --- env-tests-logging | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-tests-logging b/env-tests-logging index 3b8a2817dd6..3b5b391d6af 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit 3b8a2817dd6fe1650498cbc4af0af1058bb788ae +Subproject commit 3b5b391d6afc746c59cdd3100ccc5e8d60793489 From e32a6064e265dac57f9e8e030a107cca3561926a Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Mon, 9 Aug 2021 16:44:22 -0700 Subject: [PATCH 0795/1029] update submodule (#1137) --- env-tests-logging | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-tests-logging b/env-tests-logging index 3b5b391d6af..a8ff1773bce 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit 3b5b391d6afc746c59cdd3100ccc5e8d60793489 +Subproject commit a8ff1773bce6515885263bc1563e9dff8ca532ac From 2a60d1383f126b694684c3dfbc892b18376346bc Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 17:03:40 -0400 Subject: [PATCH 0796/1029] fix(deps): require google-gax v2.24.1 (#1139) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 39fe5529232..d61e894ba35 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^7.0.0", - "google-gax": "^2.17.1", + "google-gax": "^2.24.1", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", From 3fdd193d31aaad7a2d3ca20ee060c7fd1bc40e92 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 16:40:02 -0700 Subject: [PATCH 0797/1029] chore: release 9.5.5 (#1122) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index d460211d837..0417b53797c 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.5.5](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.4...v9.5.5) (2021-08-16) + + +### Bug Fixes + +* **deps:** require google-gax v2.24.1 ([#1139](https://www.github.com/googleapis/nodejs-logging/issues/1139)) ([4c9fc48](https://www.github.com/googleapis/nodejs-logging/commit/4c9fc486cab8aac21b50cebb0e25990f7cffeccf)) +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#1121](https://www.github.com/googleapis/nodejs-logging/issues/1121)) ([8ac1348](https://www.github.com/googleapis/nodejs-logging/commit/8ac1348b18fc07ad79e5d06ea945eb92d9f24bc9)) + ### [9.5.4](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.3...v9.5.4) (2021-07-14) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d61e894ba35..58eba0ed48c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.5.4", + "version": "9.5.5", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From c09ace6c08c006d041381af9cc6ed8fb3fbf464e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Sep 2021 21:35:48 +0200 Subject: [PATCH 0798/1029] fix(deps): update dependency eventid to v2 (#1144) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 58eba0ed48c..654e0d1d7aa 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -51,7 +51,7 @@ "@google-cloud/promisify": "^2.0.0", "arrify": "^2.0.1", "dot-prop": "^6.0.0", - "eventid": "^1.0.0", + "eventid": "^2.0.0", "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^7.0.0", From eec75c66faffdff4631aa54538b5e4da56684ec9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 19:44:20 +0000 Subject: [PATCH 0799/1029] chore: release 9.5.6 (#1146) :robot: I have created a release \*beep\* \*boop\* --- ### [9.5.6](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.5...v9.5.6) (2021-09-01) ### Bug Fixes * **deps:** update dependency eventid to v2 ([#1144](https://www.github.com/googleapis/nodejs-logging/issues/1144)) ([2c4b4c1](https://www.github.com/googleapis/nodejs-logging/commit/2c4b4c1bca7859cd15fd611653d8b35983fe5915)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 0417b53797c..09433103c71 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.5.6](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.5...v9.5.6) (2021-09-01) + + +### Bug Fixes + +* **deps:** update dependency eventid to v2 ([#1144](https://www.github.com/googleapis/nodejs-logging/issues/1144)) ([2c4b4c1](https://www.github.com/googleapis/nodejs-logging/commit/2c4b4c1bca7859cd15fd611653d8b35983fe5915)) + ### [9.5.5](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.4...v9.5.5) (2021-08-16) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 654e0d1d7aa..ffcd794bec2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.5.5", + "version": "9.5.6", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 92290c9a010f01db38602c93c9c34680a40ceaf0 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 2 Sep 2021 16:02:35 -0700 Subject: [PATCH 0800/1029] chore(tests): remove logs from environment tests (#1148) --- env-tests-logging | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-tests-logging b/env-tests-logging index a8ff1773bce..40c4579dec3 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit a8ff1773bce6515885263bc1563e9dff8ca532ac +Subproject commit 40c4579dec3316cf3d934da4460d51e1604d2259 From 435bbee2e8b5ff4d2b7cedcf54348681eb1ba337 Mon Sep 17 00:00:00 2001 From: minherz Date: Fri, 3 Sep 2021 02:29:05 +0300 Subject: [PATCH 0801/1029] fix: Fix detecting Cloud Run logic (#1145) Uses dedicated GCPEnv enumerator (CLOUD_RUN). Removes code that used COMPUTE_ENGINE enum with extra tests. Updates relevant unit tests. Fixes #1127 --- handwritten/logging/src/utils/metadata.ts | 21 +++++++-------------- handwritten/logging/test/utils/metadata.ts | 4 ++-- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/handwritten/logging/src/utils/metadata.ts b/handwritten/logging/src/utils/metadata.ts index bb6d20d61f9..bdfac4213cd 100644 --- a/handwritten/logging/src/utils/metadata.ts +++ b/handwritten/logging/src/utils/metadata.ts @@ -193,15 +193,10 @@ export async function getDefaultResource(auth: GoogleAuth) { return getGAEDescriptor().catch(() => getGlobalDescriptor()); case GCPEnv.CLOUD_FUNCTIONS: return getCloudFunctionDescriptor().catch(() => getGlobalDescriptor()); + case GCPEnv.CLOUD_RUN: + return getCloudRunDescriptor().catch(() => getGlobalDescriptor()); case GCPEnv.COMPUTE_ENGINE: - // Note: GCPEnv.COMPUTE_ENGINE returns `true` for Google Cloud Run - if (process.env.K_CONFIGURATION) { - return getCloudRunDescriptor().catch(() => getGlobalDescriptor()); - } else { - // Test for compute engine should be done after all the rest - - // everything runs on top of compute engine. - return getGCEDescriptor().catch(() => getGlobalDescriptor()); - } + return getGCEDescriptor().catch(() => getGlobalDescriptor()); default: return getGlobalDescriptor(); } @@ -235,13 +230,11 @@ export async function detectServiceContext( return { service: process.env.HOSTNAME, }; + case GCPEnv.CLOUD_RUN: + return { + service: process.env.K_SERVICE, + }; case GCPEnv.COMPUTE_ENGINE: - // Google Cloud Run - if (process.env.K_CONFIGURATION) { - return { - service: process.env.K_SERVICE, - }; - } return null; default: return null; diff --git a/handwritten/logging/test/utils/metadata.ts b/handwritten/logging/test/utils/metadata.ts index 19dd82cde75..7e1a685f4c8 100644 --- a/handwritten/logging/test/utils/metadata.ts +++ b/handwritten/logging/test/utils/metadata.ts @@ -414,7 +414,7 @@ describe('metadata', () => { ]; const fakeAuth = { async getEnv() { - return GCPEnv.COMPUTE_ENGINE; + return GCPEnv.CLOUD_RUN; }, }; @@ -606,7 +606,7 @@ describe('metadata', () => { const fakeAuth = { async getEnv() { - return GCPEnv.COMPUTE_ENGINE; + return GCPEnv.CLOUD_RUN; }, }; From e8ab57f410342db0d0371ce01cc7f51ec96e81db Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 2 Sep 2021 23:38:28 +0000 Subject: [PATCH 0802/1029] chore: release 9.5.7 (#1150) :robot: I have created a release \*beep\* \*boop\* --- ### [9.5.7](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.6...v9.5.7) (2021-09-02) ### Bug Fixes * Fix detecting Cloud Run logic ([#1145](https://www.github.com/googleapis/nodejs-logging/issues/1145)) ([99c276c](https://www.github.com/googleapis/nodejs-logging/commit/99c276cf0c394200836f3289ff21a4880523a7b5)), closes [#1127](https://www.github.com/googleapis/nodejs-logging/issues/1127) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 09433103c71..4d2719d8eb3 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.5.7](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.6...v9.5.7) (2021-09-02) + + +### Bug Fixes + +* Fix detecting Cloud Run logic ([#1145](https://www.github.com/googleapis/nodejs-logging/issues/1145)) ([99c276c](https://www.github.com/googleapis/nodejs-logging/commit/99c276cf0c394200836f3289ff21a4880523a7b5)), closes [#1127](https://www.github.com/googleapis/nodejs-logging/issues/1127) + ### [9.5.6](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.5...v9.5.6) (2021-09-01) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ffcd794bec2..0541a2d32f4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.5.6", + "version": "9.5.7", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From ca6654c20ee794e1885dfaad285d481cdef6e731 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 7 Sep 2021 13:45:11 -0700 Subject: [PATCH 0803/1029] chore(tests): simplify nodejs environment tests (#1149) --- env-tests-logging | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-tests-logging b/env-tests-logging index 40c4579dec3..fca19185862 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit 40c4579dec3316cf3d934da4460d51e1604d2259 +Subproject commit fca191858621afcce6542351462860f9c576d650 From 885daab771cae457c73eaedadff80a8711d83af7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 7 Sep 2021 16:00:45 -0700 Subject: [PATCH 0804/1029] chore: disable renovate dependency dashboard (#1194) (#1142) Source-Link: https://github.com/googleapis/synthtool/commit/31728d872f50e439ded2f67fa8d67955b26a4e35 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:667a9e46a9aa5b80240ad164d55ac33bc9d6780b5ef42f125a41f0ad95bc1950 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.kokoro/continuous/node10/common.cfg | 2 +- handwritten/logging/.kokoro/continuous/node10/test.cfg | 2 +- handwritten/logging/.kokoro/presubmit/node10/common.cfg | 2 +- handwritten/logging/.kokoro/samples-test.sh | 2 +- handwritten/logging/.kokoro/system-test.sh | 2 +- handwritten/logging/.kokoro/test.sh | 2 +- handwritten/logging/README.md | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 9b2b9550d5e..c45b239314f 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:6245a5be4c0406d9b2f04f380d8b88ffe4655df3cdbb57626f8913e8d620f4dd + digest: sha256:667a9e46a9aa5b80240ad164d55ac33bc9d6780b5ef42f125a41f0ad95bc1950 diff --git a/handwritten/logging/.kokoro/continuous/node10/common.cfg b/handwritten/logging/.kokoro/continuous/node10/common.cfg index d70d7b900bb..8008525a351 100644 --- a/handwritten/logging/.kokoro/continuous/node10/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/common.cfg @@ -7,7 +7,7 @@ action { } } -# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +# Bring in codecov.io token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token before_action { fetch_keystore { keystore_resource { diff --git a/handwritten/logging/.kokoro/continuous/node10/test.cfg b/handwritten/logging/.kokoro/continuous/node10/test.cfg index 468b8c7197a..609c0cf0a27 100644 --- a/handwritten/logging/.kokoro/continuous/node10/test.cfg +++ b/handwritten/logging/.kokoro/continuous/node10/test.cfg @@ -1,4 +1,4 @@ -# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +# Bring in codecov.io token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token before_action { fetch_keystore { keystore_resource { diff --git a/handwritten/logging/.kokoro/presubmit/node10/common.cfg b/handwritten/logging/.kokoro/presubmit/node10/common.cfg index d70d7b900bb..8008525a351 100644 --- a/handwritten/logging/.kokoro/presubmit/node10/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node10/common.cfg @@ -7,7 +7,7 @@ action { } } -# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +# Bring in codecov.io token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token before_action { fetch_keystore { keystore_resource { diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index 950f8483428..f249d3e4a2e 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -39,7 +39,7 @@ if [ -f samples/package.json ]; then npm link ../ npm install cd .. - # If tests are running against master, configure flakybot + # If tests are running against main branch, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index 319d1e0eda8..0a840452084 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -33,7 +33,7 @@ fi npm install -# If tests are running against master, configure flakybot +# If tests are running against main branch, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index b5646aeb628..af1ce7e33ca 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -21,7 +21,7 @@ export NPM_CONFIG_PREFIX=${HOME}/.npm-global cd $(dirname $0)/.. npm install -# If tests are running against master, configure flakybot +# If tests are running against main branch, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index b809ff5d92f..df9a892df74 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -218,8 +218,8 @@ Contributions welcome! See the [Contributing Guide](https://github.com/googleapi Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) are generated from a central template. To edit one of these files, make an edit -to its template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License From 9a50f6442eeac9300788329ab4750e01efa0abe8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 07:48:33 -0700 Subject: [PATCH 0805/1029] feat: turns on self-signed JWT feature flag (#1140) PiperOrigin-RevId: 392067151 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- handwritten/logging/src/v2/config_service_v2_client.ts | 6 ++++++ handwritten/logging/src/v2/logging_service_v2_client.ts | 6 ++++++ handwritten/logging/src/v2/metrics_service_v2_client.ts | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 052c12120f9..507691eca37 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -131,6 +131,12 @@ export class ConfigServiceV2Client { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index f73b381f955..5097e86443f 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -131,6 +131,12 @@ export class LoggingServiceV2Client { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 819ec4076b2..1965b13682c 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -131,6 +131,12 @@ export class MetricsServiceV2Client { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; From 6cd3d1cbd910b5aa79b90c0dea35998204998db0 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 8 Sep 2021 11:08:20 -0400 Subject: [PATCH 0806/1029] fix(build): update branch to main (#1152) --- .../logging/.github/generated-files-bot.yml | 4 ++-- handwritten/logging/README.md | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/handwritten/logging/.github/generated-files-bot.yml b/handwritten/logging/.github/generated-files-bot.yml index 7bb7ce54c58..992ccef4a13 100644 --- a/handwritten/logging/.github/generated-files-bot.yml +++ b/handwritten/logging/.github/generated-files-bot.yml @@ -8,9 +8,9 @@ generatedFiles: - path: '.github/generated-files-bot.+(yml|yaml)' message: '`.github/generated-files-bot.(yml|yaml)` should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' - path: 'README.md' - message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml' + message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/main/.readme-partials.yaml' - path: 'samples/README.md' - message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml' + message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/main/.readme-partials.yaml' ignoreAuthors: - 'gcf-owl-bot[bot]' - 'yoshi-automation' diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index df9a892df74..90305357412 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) @@ -21,7 +21,7 @@ change. A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/main/CHANGELOG.md). * [Cloud Logging Node.js Client API Reference][client-docs] * [Cloud Logging Documentation][product-docs] @@ -156,15 +156,15 @@ log.warning(entry); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Fluent | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/fluent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/fluent.js,samples/README.md) | -| Log HTTP Request | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/http-request.js,samples/README.md) | -| Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/logs.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/master/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | +| Fluent | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/fluent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/fluent.js,samples/README.md) | +| Log HTTP Request | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/http-request.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/http-request.js,samples/README.md) | +| Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/logs.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | @@ -213,7 +213,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-logging/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-logging/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -225,7 +225,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest [product-docs]: https://cloud.google.com/logging/docs From 0405f6bfce0f75312f44bc67fb175ec6b703fbfb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 15:18:56 +0000 Subject: [PATCH 0807/1029] chore: release 9.6.0 (#1153) :robot: I have created a release \*beep\* \*boop\* --- ## [9.6.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.7...v9.6.0) (2021-09-08) ### Features * turns on self-signed JWT feature flag ([#1140](https://www.github.com/googleapis/nodejs-logging/issues/1140)) ([dc15213](https://www.github.com/googleapis/nodejs-logging/commit/dc15213d0fa2c56c74bb1c22f38f105c7358dd38)) ### Bug Fixes * **build:** update branch to main ([#1152](https://www.github.com/googleapis/nodejs-logging/issues/1152)) ([9a2e91e](https://www.github.com/googleapis/nodejs-logging/commit/9a2e91ea5f78160c02949a8f2729219f8da7afcd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 12 ++++++++++++ handwritten/logging/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 4d2719d8eb3..7c2bd61771e 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.6.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.7...v9.6.0) (2021-09-08) + + +### Features + +* turns on self-signed JWT feature flag ([#1140](https://www.github.com/googleapis/nodejs-logging/issues/1140)) ([dc15213](https://www.github.com/googleapis/nodejs-logging/commit/dc15213d0fa2c56c74bb1c22f38f105c7358dd38)) + + +### Bug Fixes + +* **build:** update branch to main ([#1152](https://www.github.com/googleapis/nodejs-logging/issues/1152)) ([9a2e91e](https://www.github.com/googleapis/nodejs-logging/commit/9a2e91ea5f78160c02949a8f2729219f8da7afcd)) + ### [9.5.7](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.6...v9.5.7) (2021-09-02) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0541a2d32f4..6c285341f77 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.5.7", + "version": "9.6.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From ac21bc721e7630eaeb01be963d492000209f86f7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 22:12:49 +0000 Subject: [PATCH 0808/1029] build: enable release-trigger bot (#1212) (#1154) --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.github/release-trigger.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 handwritten/logging/.github/release-trigger.yml diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index c45b239314f..73bbf7d3210 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - digest: sha256:667a9e46a9aa5b80240ad164d55ac33bc9d6780b5ef42f125a41f0ad95bc1950 + digest: sha256:111973c0da7608bf1e60d070e5449d48826c385a6b92a56cb9203f1725d33c3d diff --git a/handwritten/logging/.github/release-trigger.yml b/handwritten/logging/.github/release-trigger.yml new file mode 100644 index 00000000000..d4ca94189e1 --- /dev/null +++ b/handwritten/logging/.github/release-trigger.yml @@ -0,0 +1 @@ +enabled: true From 6e25ab52a25a94f514337ef16fb8898f505488de Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 21 Sep 2021 14:42:28 -0700 Subject: [PATCH 0809/1029] chore: relocate owl bot post processor (#1159) chore: relocate owl bot post processor --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.github/.OwlBot.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 73bbf7d3210..7d4006e71e0 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest digest: sha256:111973c0da7608bf1e60d070e5449d48826c385a6b92a56cb9203f1725d33c3d diff --git a/handwritten/logging/.github/.OwlBot.yaml b/handwritten/logging/.github/.OwlBot.yaml index 7db771f340d..97567a97e60 100644 --- a/handwritten/logging/.github/.OwlBot.yaml +++ b/handwritten/logging/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: From 899f89c52665a35fb3a55019251fb75699c9246b Mon Sep 17 00:00:00 2001 From: minherz Date: Fri, 24 Sep 2021 10:53:21 +0300 Subject: [PATCH 0810/1029] fix: log a warning instead of failing test (#1161) --- handwritten/logging/system-test/logging.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 68be589b6a4..fada14c6a26 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -118,7 +118,14 @@ describe('Logging', () => { } return getDateFromGeneratedName(name) < oneHourAgo; }) - .map(o => o.delete()) + .map(o => { + const name = o.name || o.id; + try { + o.delete(); + } catch (err) { + console.warn(`failed to delete "${name}": ${err}`); + } + }) ); } }); From 064dc0240be7e697bcf955b251c7cec13e9f7c07 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Sep 2021 19:52:17 +0000 Subject: [PATCH 0811/1029] build(node): run linkinator against index.html (#1227) (#1165) --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 7d4006e71e0..86e7063f886 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:111973c0da7608bf1e60d070e5449d48826c385a6b92a56cb9203f1725d33c3d + digest: sha256:c0ad7c54b9210f1d10678955bc37b377e538e15cb07ecc3bac93cc7219ec2bc5 From 0ea042533aeacd069c75e5d844075ceaf5876774 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Sep 2021 20:04:32 +0000 Subject: [PATCH 0812/1029] chore: release 9.6.1 (#1163) :robot: I have created a release \*beep\* \*boop\* --- ### [9.6.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.0...v9.6.1) (2021-09-30) ### Bug Fixes * log a warning instead of failing test ([#1161](https://www.github.com/googleapis/nodejs-logging/issues/1161)) ([689ffb8](https://www.github.com/googleapis/nodejs-logging/commit/689ffb8a7ab76104ddd4739cba484db0f3471222)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 7c2bd61771e..6cd2afc6e94 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.0...v9.6.1) (2021-09-30) + + +### Bug Fixes + +* log a warning instead of failing test ([#1161](https://www.github.com/googleapis/nodejs-logging/issues/1161)) ([689ffb8](https://www.github.com/googleapis/nodejs-logging/commit/689ffb8a7ab76104ddd4739cba484db0f3471222)) + ## [9.6.0](https://www.github.com/googleapis/nodejs-logging/compare/v9.5.7...v9.6.0) (2021-09-08) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6c285341f77..ad172d1b461 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.0", + "version": "9.6.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From e52674868506b8f6aa1532894dd3bbccc235b2d5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:46:32 +0000 Subject: [PATCH 0813/1029] build(node): update deps used during postprocessing (#1243) (#1170) --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/protos/protos.d.ts | 3 ++- handwritten/logging/protos/protos.js | 7 +++++++ handwritten/logging/protos/protos.json | 15 ++++++++++++++- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 86e7063f886..8d0a479d477 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:c0ad7c54b9210f1d10678955bc37b377e538e15cb07ecc3bac93cc7219ec2bc5 + digest: sha256:bbb8dd6576ac58830a07fc17e9511ae898be44f2219d3344449b125df9854441 diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 1be2e018a1a..768c579c9a1 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -11009,7 +11009,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a MonitoredResourceDescriptor. */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 4bf3360bde6..04d5a3b788e 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -5790,6 +5790,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -5894,6 +5895,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { @@ -27198,6 +27203,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -27208,6 +27214,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 29c61659d64..5c2673a8054 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -575,6 +575,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 @@ -3697,7 +3709,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "MonitoredResourceDescriptor": { From 02b34b4690d359a6fe504b89107312eb64102d01 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Oct 2021 23:18:37 +0200 Subject: [PATCH 0814/1029] chore(deps): update dependency @types/node to v16 (#1172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.0.0` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.32/16.11.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/compatibility-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/confidence-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ad172d1b461..6b9159c7fb8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -67,7 +67,7 @@ "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", "@types/mocha": "^8.0.0", - "@types/node": "^14.0.0", + "@types/node": "^16.0.0", "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", From e0448c0a868bfaf18f3ee799eafd57fea2b2d72d Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Fri, 29 Oct 2021 15:31:20 -0700 Subject: [PATCH 0815/1029] fix: Cannot read property 'forEach' of undefined (#1173) * fix: Cannot read property 'forEach' of undefined * Fix lint error * Trigger Build --- handwritten/logging/src/log.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 63af54b1e98..f4855812ea0 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -867,23 +867,18 @@ class Log implements LogSeverityFunctions { opts?: WriteOptions | ApiResponseCallback ): Promise { const options = opts ? (opts as WriteOptions) : {}; - let decoratedEntries: EntryJson[]; // Extract projectId & resource from Logging - inject & memoize if not. await this.logging.setProjectId(); this.formattedName_ = formatLogName(this.logging.projectId, this.name); const resource = await this.getOrSetResource(options); // Extract & format additional context from individual entries. - try { - decoratedEntries = this.decorateEntries(arrify(entry) as Entry[]); - } catch (err) { - // Ignore errors (the API will speak up if it has an issue). - } - this.truncateEntries(decoratedEntries!); + const decoratedEntries = this.decorateEntries(arrify(entry) as Entry[]); + this.truncateEntries(decoratedEntries); // Clobber `labels` and `resource` fields with WriteOptions from the user. const reqOpts = extend( { logName: this.formattedName_, - entries: decoratedEntries!, + entries: decoratedEntries, resource, }, options From 177c4de06cc1acc68738cf14c48ca7a62ec8b320 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Mon, 1 Nov 2021 17:00:35 -0400 Subject: [PATCH 0816/1029] chore(cloud-rad): Add code fencing (#1175) --- handwritten/logging/src/entry.ts | 2 + handwritten/logging/src/index.ts | 52 ++++++++++++++++--- handwritten/logging/src/log-sync.ts | 22 ++++++++ handwritten/logging/src/log.ts | 30 +++++++++++ handwritten/logging/src/sink.ts | 12 +++++ handwritten/logging/src/utils/common.ts | 6 +++ .../src/v2/config_service_v2_client.ts | 46 ++++++++++++++++ .../src/v2/logging_service_v2_client.ts | 12 +++++ .../src/v2/metrics_service_v2_client.ts | 10 ++++ 9 files changed, 185 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 9ee17784937..c469e74dac5 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -121,6 +121,7 @@ export interface ToJsonOptions { * Any other types are stringified with `String(value)`. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const syslog = logging.log('syslog'); @@ -154,6 +155,7 @@ export interface ToJsonOptions { * // entries[0].data = The data value from the log entry. * } * }); + * ``` */ class Entry { metadata: LogEntry; diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index f117bddcfcd..1838be88d8b 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -234,17 +234,23 @@ export interface ServiceContext { * * @param {ClientConfig} [options] Configuration options. * - * @example Import the client library + * @example Import the client library + * ``` * const {Logging} = require('@google-cloud/logging'); * - * @example Create a client that uses Application Default Credentials (ADC): + * ``` + * @example Create a client that uses Application Default Credentials (ADC): + * ``` * const logging = new Logging(); * - * @example Create a client with explicitcredentials: + * ``` + * @example Create a client with explicitcredentials: + * ``` * const logging = new Logging({ projectId: * 'your-project-id', keyFilename: '/path/to/keyfile.json' * }); * + * ``` * @example include:samples/quickstart.js * region_tag:logging_quickstart * Full quickstart example: @@ -343,6 +349,7 @@ class Logging { * @see Sink#create * * @example + * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage({ * projectId: 'grape-spaceship-123' @@ -369,6 +376,7 @@ class Logging { * const apiResponse = data[1]; * }); * + * ``` * @example include:samples/sinks.js * region_tag:logging_create_sink * Another example: @@ -431,6 +439,7 @@ class Logging { * @returns {Entry} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -459,6 +468,7 @@ class Logging { * // delegate: 'my_username' * // } * // } + * ``` */ entry(resource?: LogEntry, data?: {} | string) { return new Entry(resource, data); @@ -513,6 +523,7 @@ class Logging { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -543,6 +554,7 @@ class Logging { * const entries = data[0]; * }); * + * ``` * @example include:samples/logs.js * region_tag:logging_list_log_entries * Another example: @@ -601,6 +613,7 @@ class Logging { * instances. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -622,6 +635,7 @@ class Logging { * .on('data', function(entry) { * this.end(); * }); + * ``` */ getEntriesStream(options: GetEntriesRequest = {}) { let requestStream: Duplex; @@ -735,6 +749,7 @@ class Logging { * containing an array of {@link Entry} instances. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -756,6 +771,7 @@ class Logging { * .on('data', function(entry) { * this.end(); * }); + * ``` */ tailEntries(options: TailEntriesRequest = {}) { const userStream = streamEvents(pumpify.obj()); @@ -866,6 +882,7 @@ class Logging { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -895,6 +912,7 @@ class Logging { * const entries = data[0]; * }); * + * ``` * @example include:samples/logs.js * region_tag:logging_list_logs * Another example: @@ -932,6 +950,7 @@ class Logging { * instances. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -952,6 +971,7 @@ class Logging { * .on('data', log => { * this.end(); * }); + * ``` */ getLogsStream(options: GetLogsRequest = {}) { options = options || {}; @@ -1051,6 +1071,7 @@ class Logging { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -1065,6 +1086,7 @@ class Logging { * const sinks = data[0]; * }); * + * ``` * @example include:samples/sinks.js * region_tag:logging_list_sinks * Another example: @@ -1107,6 +1129,7 @@ class Logging { * instances. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -1127,6 +1150,7 @@ class Logging { * .on('data', function(sink) { * this.end(); * }); + * ``` */ getSinksStream(options: GetSinksRequest) { // eslint-disable-next-line @typescript-eslint/no-this-alias @@ -1209,9 +1233,11 @@ class Logging { * @returns {Log} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); + * ``` */ log(name: string, options?: LogOptions) { return new Log(this, name, options); @@ -1225,6 +1251,7 @@ class Logging { * @returns {LogSync} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * @@ -1234,6 +1261,7 @@ class Logging { * * // Default transport writes to process.stdout * const log = logging.logSync('my-log'); + * ``` */ logSync(name: string, transport?: Writable) { return new LogSync(this, name, transport); @@ -1248,9 +1276,11 @@ class Logging { * @returns {Sink} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const sink = logging.sink('my-sink'); + * ``` */ sink(name: string) { return new Sink(this, name); @@ -1515,18 +1545,26 @@ export {Sink}; * @module {Constructor} @google-cloud/logging * @alias nodejs-logging * - * @example Install the client library with npm: + * @example Install the client library with npm: + * ``` * npm install --save @google-cloud/logging * - * @example Import the client library + * ``` + * @example Import the client library + * ``` * const {Logging} = require('@google-cloud/logging'); * - * @example Create a client that uses Application Default Credentials (ADC): + * ``` + * @example Create a client that uses Application Default Credentials (ADC): + * ``` * const logging = new Logging(); * - * @example Create a client with explicit credentials: + * ``` + * @example Create a client with explicit credentials: + * ``` * const logging = new Logging({ projectId: 'your-project-id', keyFilename: '/path/to/keyfile.json'}); * + * ``` * @example include:samples/quickstart.js * region_tag:logging_quickstart * Full quickstart example: diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts index abd3f2f60a5..10f99b6e549 100644 --- a/handwritten/logging/src/log-sync.ts +++ b/handwritten/logging/src/log-sync.ts @@ -50,9 +50,11 @@ import { * Default: process.stdout. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('mylog'); + * ``` */ class LogSync implements LogSeverityFunctions { formattedName_: string; @@ -82,6 +84,7 @@ class LogSync implements LogSeverityFunctions { * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -91,6 +94,7 @@ class LogSync implements LogSeverityFunctions { * }); * * log.alert(entry); + * ``` */ alert(entry: Entry | Entry[], options?: WriteOptions) { this.write( @@ -108,6 +112,7 @@ class LogSync implements LogSeverityFunctions { * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -117,6 +122,7 @@ class LogSync implements LogSeverityFunctions { * }); * * log.critical(entry); + * ``` */ critical(entry: Entry | Entry[], options?: WriteOptions) { this.write( @@ -134,6 +140,7 @@ class LogSync implements LogSeverityFunctions { * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -143,6 +150,7 @@ class LogSync implements LogSeverityFunctions { * }); * * log.debug(entry); + * ``` */ debug(entry: Entry | Entry[], options?: WriteOptions) { this.write( @@ -160,6 +168,7 @@ class LogSync implements LogSeverityFunctions { * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -169,6 +178,7 @@ class LogSync implements LogSeverityFunctions { * }); * * log.emergency(entry); + * ``` */ emergency(entry: Entry | Entry[], options?: WriteOptions) { this.write( @@ -196,6 +206,7 @@ class LogSync implements LogSeverityFunctions { * @returns {Entry} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -213,6 +224,7 @@ class LogSync implements LogSeverityFunctions { * const entry = log.entry(metadata, { * delegate: 'my_username' * }); + * ``` */ entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; @@ -240,6 +252,7 @@ class LogSync implements LogSeverityFunctions { * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -249,6 +262,7 @@ class LogSync implements LogSeverityFunctions { * }); * * log.error(entry); + * ``` */ error(entry: Entry | Entry[], options?: WriteOptions) { this.write( @@ -266,6 +280,7 @@ class LogSync implements LogSeverityFunctions { * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -275,6 +290,7 @@ class LogSync implements LogSeverityFunctions { * }); * * log.info(entry); + * ``` */ info(entry: Entry | Entry[], options?: WriteOptions) { this.write( @@ -292,6 +308,7 @@ class LogSync implements LogSeverityFunctions { * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -301,6 +318,7 @@ class LogSync implements LogSeverityFunctions { * }); * * log.notice(entry); + * ``` */ notice(entry: Entry | Entry[], options?: WriteOptions) { this.write( @@ -318,6 +336,7 @@ class LogSync implements LogSeverityFunctions { * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.logSync('my-log'); @@ -327,6 +346,7 @@ class LogSync implements LogSeverityFunctions { * }); * * log.warning(entry); + * ``` */ warning(entry: Entry | Entry[], options?: WriteOptions) { this.write( @@ -342,6 +362,7 @@ class LogSync implements LogSeverityFunctions { * @param {?WriteOptions} [options] Write options * * @example + * ``` * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -379,6 +400,7 @@ class LogSync implements LogSeverityFunctions { * * log.write(entries); * }); + * ``` */ write(entry: Entry | Entry[], opts?: WriteOptions) { const options = opts ? (opts as WriteOptions) : {}; diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index f4855812ea0..1edaedd1739 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -88,9 +88,11 @@ export type DeleteCallback = ApiResponseCallback; * @param {number} [options.maxEntrySize] A max entry size * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('syslog'); + * ``` */ class Log implements LogSeverityFunctions { formattedName_: string; @@ -130,6 +132,7 @@ class Log implements LogSeverityFunctions { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -146,6 +149,7 @@ class Log implements LogSeverityFunctions { * log.alert(entry).then(data => { * const apiResponse = data[0]; * }); + * ``` */ alert( entry: Entry | Entry[], @@ -178,6 +182,7 @@ class Log implements LogSeverityFunctions { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -194,6 +199,7 @@ class Log implements LogSeverityFunctions { * log.critical(entry).then(data => { * const apiResponse = data[0]; * }); + * ``` */ critical( entry: Entry | Entry[], @@ -223,6 +229,7 @@ class Log implements LogSeverityFunctions { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -239,6 +246,7 @@ class Log implements LogSeverityFunctions { * log.debug(entry).then(data => { * const apiResponse = data[0]; * }); + * ``` */ debug( entry: Entry | Entry[], @@ -273,6 +281,7 @@ class Log implements LogSeverityFunctions { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -290,6 +299,7 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); * + * ``` * @example include:samples/logs.js * region_tag:logging_delete_log * Another example: @@ -325,6 +335,7 @@ class Log implements LogSeverityFunctions { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -341,6 +352,7 @@ class Log implements LogSeverityFunctions { * log.emergency(entry).then(data => { * const apiResponse = data[0]; * }); + * ``` */ emergency( entry: Entry | Entry[], @@ -377,6 +389,7 @@ class Log implements LogSeverityFunctions { * @returns {Entry} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -409,6 +422,7 @@ class Log implements LogSeverityFunctions { * // delegate: 'my_username' * // } * // } + * ``` */ entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; @@ -445,6 +459,7 @@ class Log implements LogSeverityFunctions { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -461,6 +476,7 @@ class Log implements LogSeverityFunctions { * log.error(entry).then(data => { * const apiResponse = data[0]; * }); + * ``` */ error( entry: Entry | Entry[], @@ -486,6 +502,7 @@ class Log implements LogSeverityFunctions { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -516,6 +533,7 @@ class Log implements LogSeverityFunctions { * log.getEntries().then(data => { * const entries = data[0]; * }); + * ``` */ async getEntries( opts?: GetEntriesRequest | GetEntriesCallback @@ -542,6 +560,7 @@ class Log implements LogSeverityFunctions { * instances. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -564,6 +583,7 @@ class Log implements LogSeverityFunctions { * .on('data', function(entry) { * this.end(); * }); + * ``` */ getEntriesStream(options: GetEntriesRequest) { options = extend( @@ -586,6 +606,7 @@ class Log implements LogSeverityFunctions { * containing an array of {@link Entry} instances. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -608,6 +629,7 @@ class Log implements LogSeverityFunctions { * .on('data', function(entry) { * this.end(); * }); + * ``` */ tailEntries(options?: TailEntriesRequest) { options = extend( @@ -637,6 +659,7 @@ class Log implements LogSeverityFunctions { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -653,6 +676,7 @@ class Log implements LogSeverityFunctions { * log.info(entry).then(data => { * const apiResponse = data[0]; * }); + * ``` */ info( entry: Entry | Entry[], @@ -682,6 +706,7 @@ class Log implements LogSeverityFunctions { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -698,6 +723,7 @@ class Log implements LogSeverityFunctions { * log.notice(entry).then(data => { * const apiResponse = data[0]; * }); + * ``` */ notice( entry: Entry | Entry[], @@ -727,6 +753,7 @@ class Log implements LogSeverityFunctions { * @param {LogWriteCallback} [callback] Callback function. * @returns {Promise} * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const log = logging.log('my-log'); @@ -743,6 +770,7 @@ class Log implements LogSeverityFunctions { * log.warning(entry).then(data => { * const apiResponse = data[0]; * }); + * ``` */ warning( entry: Entry | Entry[], @@ -801,6 +829,7 @@ class Log implements LogSeverityFunctions { * @returns {Promise} * * @example + * ``` * const entry = log.entry('gce_instance', { * instance: 'my_instance' * }); @@ -854,6 +883,7 @@ class Log implements LogSeverityFunctions { * const apiResponse = data[0]; * }); * + * ``` * @example include:samples/logs.js * region_tag:logging_write_log_entry * Another example: diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index fb769458098..4868ba33993 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -54,9 +54,11 @@ export interface SetSinkMetadata extends LogSink { * @param {string} name Name of the sink. * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const sink = logging.sink('my-sink'); + * ``` */ class Sink { logging: Logging; @@ -85,6 +87,7 @@ class Sink { * @see Logging#createSink * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const sink = logging.sink('my-sink'); @@ -109,6 +112,7 @@ class Sink { * const apiResponse = data[1]; * }); * + * ``` * @example include:samples/sinks.js * region_tag:logging_create_sink * Another example: @@ -140,6 +144,7 @@ class Sink { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const sink = logging.sink('my-sink'); @@ -157,6 +162,7 @@ class Sink { * const apiResponse = data[0]; * }); * + * ``` * @example include:samples/sinks.js * region_tag:logging_delete_sink * Another example: @@ -201,6 +207,7 @@ class Sink { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const sink = logging.sink('my-sink'); @@ -214,6 +221,7 @@ class Sink { * const metadata = data[0]; * }); * + * ``` * @example include:samples/sinks.js * region_tag:logging_get_sink * Another example: @@ -257,6 +265,7 @@ class Sink { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const sink = logging.sink('my-sink'); @@ -271,6 +280,7 @@ class Sink { * sink.setFilter(filter).then(data => { * const apiResponse = data[0]; * }); + * ``` */ setFilter(filter: string): Promise { return this.setMetadata({ @@ -310,6 +320,7 @@ class Sink { * @returns {Promise} * * @example + * ``` * const {Logging} = require('@google-cloud/logging'); * const logging = new Logging(); * const sink = logging.sink('my-sink'); @@ -327,6 +338,7 @@ class Sink { * const apiResponse = data[0]; * }); * + * ``` * @example include:samples/sinks.js * region_tag:logging_update_sink * Another example: diff --git a/handwritten/logging/src/utils/common.ts b/handwritten/logging/src/utils/common.ts index 6fea401571e..ee05d3ff7a1 100644 --- a/handwritten/logging/src/utils/common.ts +++ b/handwritten/logging/src/utils/common.ts @@ -54,6 +54,7 @@ export class ObjectToStructConverter { * @return {object} - The encoded value. * * @example + * ``` * ObjectToStructConverter.convert({ * aString: 'Hi' * }); @@ -64,6 +65,7 @@ export class ObjectToStructConverter { * // } * // } * // } + * ``` */ // eslint-disable-next-line @typescript-eslint/no-explicit-any convert(obj: any) { @@ -94,10 +96,12 @@ export class ObjectToStructConverter { * @return {*} - The encoded value. * * @example + * ``` * ObjectToStructConverter.encodeValue('Hi'); * // { * // stringValue: 'Hello!' * // } + * ``` */ // eslint-disable-next-line @typescript-eslint/no-explicit-any encodeValue_(value: {} | null): any { @@ -169,6 +173,7 @@ export class ObjectToStructConverter { * @return {object} - The simplified object. * * @example + * ``` * GrpcService.structToObj_({ * fields: { * name: { @@ -180,6 +185,7 @@ export class ObjectToStructConverter { * // { * // name: 'Stephen' * // } + * ``` */ // eslint-disable-next-line @typescript-eslint/no-explicit-any export function structToObj(struct: any) { diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 507691eca37..be09705ecdb 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -486,7 +486,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.getBucket(request); + * ``` */ getBucket( request?: protos.google.logging.v2.IGetBucketRequest, @@ -582,7 +584,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.createBucket(request); + * ``` */ createBucket( request?: protos.google.logging.v2.ICreateBucketRequest, @@ -695,7 +699,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.updateBucket(request); + * ``` */ updateBucket( request?: protos.google.logging.v2.IUpdateBucketRequest, @@ -789,7 +795,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.deleteBucket(request); + * ``` */ deleteBucket( request?: protos.google.logging.v2.IDeleteBucketRequest, @@ -881,7 +889,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.undeleteBucket(request); + * ``` */ undeleteBucket( request?: protos.google.logging.v2.IUndeleteBucketRequest, @@ -969,7 +979,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.getView(request); + * ``` */ getView( request?: protos.google.logging.v2.IGetViewRequest, @@ -1062,7 +1074,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.createView(request); + * ``` */ createView( request?: protos.google.logging.v2.ICreateViewRequest, @@ -1162,7 +1176,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.updateView(request); + * ``` */ updateView( request?: protos.google.logging.v2.IUpdateViewRequest, @@ -1250,7 +1266,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.deleteView(request); + * ``` */ deleteView( request?: protos.google.logging.v2.IDeleteViewRequest, @@ -1340,7 +1358,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.getSink(request); + * ``` */ getSink( request?: protos.google.logging.v2.IGetSinkRequest, @@ -1448,7 +1468,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.createSink(request); + * ``` */ createSink( request?: protos.google.logging.v2.ICreateSinkRequest, @@ -1573,7 +1595,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.updateSink(request); + * ``` */ updateSink( request?: protos.google.logging.v2.IUpdateSinkRequest, @@ -1665,7 +1689,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.deleteSink(request); + * ``` */ deleteSink( request?: protos.google.logging.v2.IDeleteSinkRequest, @@ -1755,7 +1781,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.getExclusion(request); + * ``` */ getExclusion( request?: protos.google.logging.v2.IGetExclusionRequest, @@ -1850,7 +1878,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.createExclusion(request); + * ``` */ createExclusion( request?: protos.google.logging.v2.ICreateExclusionRequest, @@ -1951,7 +1981,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.updateExclusion(request); + * ``` */ updateExclusion( request?: protos.google.logging.v2.IUpdateExclusionRequest, @@ -2041,7 +2073,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.deleteExclusion(request); + * ``` */ deleteExclusion( request?: protos.google.logging.v2.IDeleteExclusionRequest, @@ -2143,7 +2177,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.getCmekSettings(request); + * ``` */ getCmekSettings( request?: protos.google.logging.v2.IGetCmekSettingsRequest, @@ -2265,7 +2301,9 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.updateCmekSettings(request); + * ``` */ updateCmekSettings( request?: protos.google.logging.v2.IUpdateCmekSettingsRequest, @@ -2508,10 +2546,12 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listBucketsAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listBucketsAsync( request?: protos.google.logging.v2.IListBucketsRequest, @@ -2712,10 +2752,12 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listViewsAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listViewsAsync( request?: protos.google.logging.v2.IListViewsRequest, @@ -2925,10 +2967,12 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listSinksAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listSinksAsync( request?: protos.google.logging.v2.IListSinksRequest, @@ -3138,10 +3182,12 @@ export class ConfigServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listExclusionsAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listExclusionsAsync( request?: protos.google.logging.v2.IListExclusionsRequest, diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 5097e86443f..9bdbe4672ed 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -497,7 +497,9 @@ export class LoggingServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.deleteLog(request); + * ``` */ deleteLog( request?: protos.google.logging.v2.IDeleteLogRequest, @@ -651,7 +653,9 @@ export class LoggingServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.writeLogEntries(request); + * ``` */ writeLogEntries( request?: protos.google.logging.v2.IWriteLogEntriesRequest, @@ -701,11 +705,13 @@ export class LoggingServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) * for more details and examples. * @example + * ``` * const stream = client.tailLogEntries(); * stream.on('data', (response) => { ... }); * stream.on('end', () => { ... }); * stream.write(request); * stream.end(); + * ``` */ tailLogEntries(options?: CallOptions): gax.CancellableStream { this.initialize(); @@ -965,10 +971,12 @@ export class LoggingServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listLogEntriesAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listLogEntriesAsync( request?: protos.google.logging.v2.IListLogEntriesRequest, @@ -1151,10 +1159,12 @@ export class LoggingServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listMonitoredResourceDescriptorsAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listMonitoredResourceDescriptorsAsync( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, @@ -1395,10 +1405,12 @@ export class LoggingServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listLogsAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listLogsAsync( request?: protos.google.logging.v2.IListLogsRequest, diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 1965b13682c..166288404bb 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -445,7 +445,9 @@ export class MetricsServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.getLogMetric(request); + * ``` */ getLogMetric( request?: protos.google.logging.v2.IGetLogMetricRequest, @@ -535,7 +537,9 @@ export class MetricsServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.createLogMetric(request); + * ``` */ createLogMetric( request?: protos.google.logging.v2.ICreateLogMetricRequest, @@ -626,7 +630,9 @@ export class MetricsServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.updateLogMetric(request); + * ``` */ updateLogMetric( request?: protos.google.logging.v2.IUpdateLogMetricRequest, @@ -711,7 +717,9 @@ export class MetricsServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.deleteLogMetric(request); + * ``` */ deleteLogMetric( request?: protos.google.logging.v2.IDeleteLogMetricRequest, @@ -931,10 +939,12 @@ export class MetricsServiceV2Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listLogMetricsAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listLogMetricsAsync( request?: protos.google.logging.v2.IListLogMetricsRequest, From f480472ec542a5b55b9d8a0c1bc12907bf3b6a73 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 1 Nov 2021 21:08:35 +0000 Subject: [PATCH 0817/1029] chore: release 9.6.2 (#1174) :robot: I have created a release \*beep\* \*boop\* --- ### [9.6.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.1...v9.6.2) (2021-11-01) ### Bug Fixes * Cannot read property 'forEach' of undefined ([#1173](https://www.github.com/googleapis/nodejs-logging/issues/1173)) ([abf1ab0](https://www.github.com/googleapis/nodejs-logging/commit/abf1ab03483db8bf0c018524c348260a06193a4c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 6cd2afc6e94..8b4148a88a0 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.1...v9.6.2) (2021-11-01) + + +### Bug Fixes + +* Cannot read property 'forEach' of undefined ([#1173](https://www.github.com/googleapis/nodejs-logging/issues/1173)) ([abf1ab0](https://www.github.com/googleapis/nodejs-logging/commit/abf1ab03483db8bf0c018524c348260a06193a4c)) + ### [9.6.1](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.0...v9.6.1) (2021-09-30) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6b9159c7fb8..2f04a8b7f41 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.1", + "version": "9.6.2", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 55dfa064830e86d5b0ee01f2209686f7887f1681 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 4 Nov 2021 11:52:20 -0400 Subject: [PATCH 0818/1029] chore(cloud-rad): delete api-extractor config (#1179) --- handwritten/logging/api-extractor.json | 369 ------------------------- 1 file changed, 369 deletions(-) delete mode 100644 handwritten/logging/api-extractor.json diff --git a/handwritten/logging/api-extractor.json b/handwritten/logging/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/handwritten/logging/api-extractor.json +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/protos/protos.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [ ], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true, - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true, - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true, - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning", - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - }, - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - }, - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } - -} From 1f7c44f89fd98a9d9be3445bad7f3bd3363ee4e3 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Mon, 8 Nov 2021 11:40:20 -0500 Subject: [PATCH 0819/1029] chore(cloud-rad): fix links for TSDocs (#1176) internally: b/179484422 Scripts used: ``` sed -i -e 's/@see \[\(.*\)\](\(.*\))$/See {@link \2| \1}/' src/* sed -i -e 's/\[\(.*\)\](\(.*\))/{@link \2| \1}/' src/* ``` --- handwritten/logging/src/entry.ts | 2 +- handwritten/logging/src/index.ts | 10 +-- .../src/v2/config_service_v2_client.ts | 72 +++++++++---------- .../src/v2/logging_service_v2_client.ts | 36 +++++----- .../src/v2/metrics_service_v2_client.ts | 18 ++--- 5 files changed, 69 insertions(+), 69 deletions(-) diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index c469e74dac5..f103f60b8c9 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -317,7 +317,7 @@ class Entry { * @private * * @param {object} entry An API representation of an entry. See a - * [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). + * {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry| LogEntry}. * @returns {Entry} */ static fromApiResponse_(entry: google.logging.v2.LogEntry) { diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 1838be88d8b..2d8c2258c7c 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -221,16 +221,16 @@ export interface ServiceContext { * native Promises. */ /** - * [Cloud Logging](https://cloud.google.com/logging/docs) allows you to + * {@link https://cloud.google.com/logging/docs| Cloud Logging} allows you to * store, search, analyze, monitor, and alert on log data and events from Google * Cloud Platform and Amazon Web Services (AWS). * * @class * - * @see [What is Cloud Logging?](https://cloud.google.com/logging/docs) - * @see [Introduction to the Cloud Logging API](https://cloud.google.com/logging/docs/api) - * @see [Logging to Google Cloud from Bunyan](https://www.npmjs.com/package/@google-cloud/logging-bunyan) - * @see [Logging to Google Cloud from Winston](https://www.npmjs.com/package/@google-cloud/logging-winston) + * See {@link https://cloud.google.com/logging/docs| What is Cloud Logging?} + * See {@link https://cloud.google.com/logging/docs/api| Introduction to the Cloud Logging API} + * See {@link https://www.npmjs.com/package/@google-cloud/logging-bunyan| Logging to Google Cloud from Bunyan} + * See {@link https://www.npmjs.com/package/@google-cloud/logging-winston| Logging to Google Cloud from Winston} * * @param {ClientConfig} [options] Configuration options. * diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index be09705ecdb..08b77a8bd7a 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -70,7 +70,7 @@ export class ConfigServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance| this document}. * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -483,7 +483,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -581,7 +581,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -696,7 +696,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -792,7 +792,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -886,7 +886,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -976,7 +976,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1071,7 +1071,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1173,7 +1173,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1263,7 +1263,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1355,7 +1355,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1465,7 +1465,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1592,7 +1592,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1686,7 +1686,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1778,7 +1778,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1875,7 +1875,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -1978,7 +1978,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -2070,7 +2070,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -2174,7 +2174,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -2298,7 +2298,7 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -2409,7 +2409,7 @@ export class ConfigServiceV2Client { * We recommend using `listBucketsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listBuckets( @@ -2485,7 +2485,7 @@ export class ConfigServiceV2Client { * We recommend using `listBucketsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listBucketsStream( @@ -2538,12 +2538,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. * When you iterate the returned iterable, each element will be an object representing * [LogBucket]{@link google.logging.v2.LogBucket}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. * @example * ``` @@ -2629,7 +2629,7 @@ export class ConfigServiceV2Client { * We recommend using `listViewsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listViews( @@ -2698,7 +2698,7 @@ export class ConfigServiceV2Client { * We recommend using `listViewsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listViewsStream( @@ -2744,12 +2744,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. * When you iterate the returned iterable, each element will be an object representing * [LogView]{@link google.logging.v2.LogView}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. * @example * ``` @@ -2838,7 +2838,7 @@ export class ConfigServiceV2Client { * We recommend using `listSinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listSinks( @@ -2910,7 +2910,7 @@ export class ConfigServiceV2Client { * We recommend using `listSinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listSinksStream( @@ -2959,12 +2959,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. * When you iterate the returned iterable, each element will be an object representing * [LogSink]{@link google.logging.v2.LogSink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. * @example * ``` @@ -3053,7 +3053,7 @@ export class ConfigServiceV2Client { * We recommend using `listExclusionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listExclusions( @@ -3125,7 +3125,7 @@ export class ConfigServiceV2Client { * We recommend using `listExclusionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listExclusionsStream( @@ -3174,12 +3174,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. * When you iterate the returned iterable, each element will be an object representing * [LogExclusion]{@link google.logging.v2.LogExclusion}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. * @example * ``` diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 9bdbe4672ed..1b8f03d559d 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -70,7 +70,7 @@ export class LoggingServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance| this document}. * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -494,7 +494,7 @@ export class LoggingServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -625,14 +625,14 @@ export class LoggingServiceV2Client { * the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in + * {@link https://cloud.google.com/logging/quota-policy| logs retention period} in * the past or more than 24 hours in the future will not be available when * calling `entries.list`. However, those log entries can still be [exported * with * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + * {@link https://cloud.google.com/logging/quota-policy| quota limit} for calls to * `entries.write`, you should try to include several log entries in this * list, rather than calling this method for each individual log entry. * @param {boolean} [request.partialSuccess] @@ -650,7 +650,7 @@ export class LoggingServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -702,7 +702,7 @@ export class LoggingServiceV2Client { * representing [TailLogEntriesRequest]{@link google.logging.v2.TailLogEntriesRequest} for write() method, and * will emit objects representing [TailLogEntriesResponse]{@link google.logging.v2.TailLogEntriesResponse} on 'data' event asynchronously. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming| documentation} * for more details and examples. * @example * ``` @@ -804,7 +804,7 @@ export class LoggingServiceV2Client { * We recommend using `listLogEntriesAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listLogEntries( @@ -895,7 +895,7 @@ export class LoggingServiceV2Client { * We recommend using `listLogEntriesAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listLogEntriesStream( @@ -963,12 +963,12 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. * When you iterate the returned iterable, each element will be an object representing * [LogEntry]{@link google.logging.v2.LogEntry}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. * @example * ``` @@ -1048,7 +1048,7 @@ export class LoggingServiceV2Client { * We recommend using `listMonitoredResourceDescriptorsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listMonitoredResourceDescriptors( @@ -1115,7 +1115,7 @@ export class LoggingServiceV2Client { * We recommend using `listMonitoredResourceDescriptorsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listMonitoredResourceDescriptorsStream( @@ -1151,12 +1151,12 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. * When you iterate the returned iterable, each element will be an object representing * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. * @example * ``` @@ -1252,7 +1252,7 @@ export class LoggingServiceV2Client { * We recommend using `listLogsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listLogs( @@ -1336,7 +1336,7 @@ export class LoggingServiceV2Client { * We recommend using `listLogsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listLogsStream( @@ -1397,12 +1397,12 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. * When you iterate the returned iterable, each element will be an object representing * string. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. * @example * ``` diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 166288404bb..94b28f79e10 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -70,7 +70,7 @@ export class MetricsServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance| this document}. * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -442,7 +442,7 @@ export class MetricsServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -534,7 +534,7 @@ export class MetricsServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -627,7 +627,7 @@ export class MetricsServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -714,7 +714,7 @@ export class MetricsServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} * for more details and examples. * @example * ``` @@ -816,7 +816,7 @@ export class MetricsServiceV2Client { * We recommend using `listLogMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listLogMetrics( @@ -885,7 +885,7 @@ export class MetricsServiceV2Client { * We recommend using `listLogMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. */ listLogMetricsStream( @@ -931,12 +931,12 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. * When you iterate the returned iterable, each element will be an object representing * [LogMetric]{@link google.logging.v2.LogMetric}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} * for more details and examples. * @example * ``` From 1be56fe8589a8120a0ee6d57b806e67de2d227c5 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Mon, 8 Nov 2021 15:02:58 -0500 Subject: [PATCH 0820/1029] fix(cloud-rad): move comments for TSDoc (#1181) As we move our ref docs to cloud.google.com, we rely on TSDoc rather JSDoc. TSDoc expects comments before the first overloaded function, we currently have those on the last function. Those comments don't make it into the d.ts files. We need to move comments to the first overloaded function rather than the last one. Internally b/190631834 Script used: https://github.com/fhinkel/cloud-rad-script/blob/main/moveComments.js --- handwritten/logging/src/index.ts | 30 +++--- handwritten/logging/src/log-sync.ts | 6 +- handwritten/logging/src/log.ts | 148 ++++++++++++++-------------- handwritten/logging/src/sink.ts | 24 ++--- 4 files changed, 104 insertions(+), 104 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 2d8c2258c7c..8126962b3e9 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -296,12 +296,6 @@ class Logging { this.loggingService = new v2.LoggingServiceV2Client(this.options); } - createSink(name: string, config: CreateSinkRequest): Promise<[Sink, LogSink]>; - createSink( - name: string, - config: CreateSinkRequest, - callback: CreateSinkCallback - ): void; /** * Config to set for the sink. Not all available options are listed here, see * the [Sink @@ -332,6 +326,12 @@ class Logging { * @param {Sink} sink The new {@link Sink}. * @param {object} apiResponse The full API response. */ + createSink(name: string, config: CreateSinkRequest): Promise<[Sink, LogSink]>; + createSink( + name: string, + config: CreateSinkRequest, + callback: CreateSinkCallback + ): void; // jscs:disable maximumLineLength /** * Create a sink. @@ -474,9 +474,6 @@ class Logging { return new Entry(resource, data); } - getEntries(options?: GetEntriesRequest): Promise; - getEntries(callback: GetEntriesCallback): void; - getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; /** * Query object for listing entries. * @@ -563,6 +560,9 @@ class Logging { * region_tag:logging_list_log_entries_advanced * Another example: */ + getEntries(options?: GetEntriesRequest): Promise; + getEntries(callback: GetEntriesCallback): void; + getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; async getEntries( opts?: GetEntriesRequest | GetEntriesCallback ): Promise { @@ -842,9 +842,6 @@ class Logging { return userStream; } - getLogs(options?: GetLogsRequest): Promise; - getLogs(callback: GetLogsCallback): void; - getLogs(options: GetLogsRequest, callback: GetLogsCallback): void; /** * Query object for listing entries. * @@ -917,6 +914,9 @@ class Logging { * region_tag:logging_list_logs * Another example: */ + getLogs(options?: GetLogsRequest): Promise; + getLogs(callback: GetLogsCallback): void; + getLogs(options: GetLogsRequest, callback: GetLogsCallback): void; async getLogs( opts?: GetLogsRequest | GetLogsCallback ): Promise { @@ -1032,9 +1032,6 @@ class Logging { return userStream; } - getSinks(options?: GetSinksRequest): Promise; - getSinks(callback: GetSinksCallback): void; - getSinks(options: GetSinksRequest, callback: GetSinksCallback): void; /** * Query object for listing sinks. * @@ -1091,6 +1088,9 @@ class Logging { * region_tag:logging_list_sinks * Another example: */ + getSinks(options?: GetSinksRequest): Promise; + getSinks(callback: GetSinksCallback): void; + getSinks(options: GetSinksRequest, callback: GetSinksCallback): void; async getSinks( opts?: GetSinksRequest | GetSinksCallback ): Promise { diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts index 10f99b6e549..abff8a8ed19 100644 --- a/handwritten/logging/src/log-sync.ts +++ b/handwritten/logging/src/log-sync.ts @@ -188,9 +188,6 @@ class LogSync implements LogSeverityFunctions { } // TODO(future): dedupe entry code across LogSync & Log classes. - entry(metadata?: LogEntry): Entry; - entry(data?: string | {}): Entry; - entry(metadata?: LogEntry, data?: string | {}): Entry; /** * Create an entry object for this log. * @@ -226,6 +223,9 @@ class LogSync implements LogSeverityFunctions { * }); * ``` */ + entry(metadata?: LogEntry): Entry; + entry(data?: string | {}): Entry; + entry(metadata?: LogEntry, data?: string | {}): Entry; entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; if (!data && metadataOrData?.hasOwnProperty('httpRequest')) { diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 1edaedd1739..796dc7554c9 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -114,13 +114,6 @@ class Log implements LogSeverityFunctions { this.name = this.formattedName_.split('/').pop()!; } - alert(entry: Entry | Entry[], options?: WriteOptions): Promise; - alert( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - alert(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "ALERT". * @@ -151,6 +144,13 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + alert(entry: Entry | Entry[], options?: WriteOptions): Promise; + alert( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + alert(entry: Entry | Entry[], callback: ApiResponseCallback): void; alert( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -161,16 +161,6 @@ class Log implements LogSeverityFunctions { ); } - critical( - entry: Entry | Entry[], - options?: WriteOptions - ): Promise; - critical( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - critical(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "CRITICAL". * @@ -201,6 +191,16 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + critical( + entry: Entry | Entry[], + options?: WriteOptions + ): Promise; + critical( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + critical(entry: Entry | Entry[], callback: ApiResponseCallback): void; critical( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -211,13 +211,6 @@ class Log implements LogSeverityFunctions { ); } - debug(entry: Entry | Entry[], options?: WriteOptions): Promise; - debug( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - debug(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "DEBUG". * @@ -248,6 +241,13 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + debug(entry: Entry | Entry[], options?: WriteOptions): Promise; + debug( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + debug(entry: Entry | Entry[], callback: ApiResponseCallback): void; debug( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -258,9 +258,6 @@ class Log implements LogSeverityFunctions { ); } - delete(gaxOptions?: CallOptions): Promise; - delete(gaxOptions: CallOptions, callback: DeleteCallback): void; - delete(callback: DeleteCallback): void; /** * @typedef {array} DeleteLogResponse * @property {object} 0 The full API response. @@ -304,6 +301,9 @@ class Log implements LogSeverityFunctions { * region_tag:logging_delete_log * Another example: */ + delete(gaxOptions?: CallOptions): Promise; + delete(gaxOptions: CallOptions, callback: DeleteCallback): void; + delete(callback: DeleteCallback): void; async delete( gaxOptions?: CallOptions | DeleteCallback ): Promise { @@ -318,12 +318,6 @@ class Log implements LogSeverityFunctions { ); } - emergency( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - emergency(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "EMERGENCY". * @@ -354,6 +348,12 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + emergency( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + emergency(entry: Entry | Entry[], callback: ApiResponseCallback): void; emergency( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -364,9 +364,6 @@ class Log implements LogSeverityFunctions { ); } - entry(metadata?: LogEntry): Entry; - entry(data?: string | {}): Entry; - entry(metadata?: LogEntry, data?: string | {}): Entry; /** * Create an entry object for this log. * @@ -424,6 +421,9 @@ class Log implements LogSeverityFunctions { * // } * ``` */ + entry(metadata?: LogEntry): Entry; + entry(data?: string | {}): Entry; + entry(metadata?: LogEntry, data?: string | {}): Entry; entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; if (!data && metadataOrData?.hasOwnProperty('httpRequest')) { @@ -441,13 +441,6 @@ class Log implements LogSeverityFunctions { return this.logging.entry(metadata, data); } - error(entry: Entry | Entry[], options?: WriteOptions): Promise; - error( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - error(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "ERROR". * @@ -478,6 +471,13 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + error(entry: Entry | Entry[], options?: WriteOptions): Promise; + error( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + error(entry: Entry | Entry[], callback: ApiResponseCallback): void; error( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -488,9 +488,6 @@ class Log implements LogSeverityFunctions { ); } - getEntries(options?: GetEntriesRequest): Promise; - getEntries(callback: GetEntriesCallback): void; - getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; /** * This method is a wrapper around {module:logging#getEntries}, but with a * filter specified to only return entries from this log. @@ -535,6 +532,9 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + getEntries(options?: GetEntriesRequest): Promise; + getEntries(callback: GetEntriesCallback): void; + getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; async getEntries( opts?: GetEntriesRequest | GetEntriesCallback ): Promise { @@ -641,13 +641,6 @@ class Log implements LogSeverityFunctions { return this.logging.tailEntries(options); } - info(entry: Entry | Entry[], options?: WriteOptions): Promise; - info( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - info(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "INFO". * @@ -678,6 +671,13 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + info(entry: Entry | Entry[], options?: WriteOptions): Promise; + info( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + info(entry: Entry | Entry[], callback: ApiResponseCallback): void; info( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -688,13 +688,6 @@ class Log implements LogSeverityFunctions { ); } - notice(entry: Entry | Entry[], options?: WriteOptions): Promise; - notice( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - notice(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "NOTICE". * @@ -725,6 +718,13 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + notice(entry: Entry | Entry[], options?: WriteOptions): Promise; + notice( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + notice(entry: Entry | Entry[], callback: ApiResponseCallback): void; notice( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -735,13 +735,6 @@ class Log implements LogSeverityFunctions { ); } - warning(entry: Entry | Entry[], options?: WriteOptions): Promise; - warning( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - warning(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * Write a log entry with a severity of "WARNING". * @@ -772,6 +765,13 @@ class Log implements LogSeverityFunctions { * }); * ``` */ + warning(entry: Entry | Entry[], options?: WriteOptions): Promise; + warning( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + warning(entry: Entry | Entry[], callback: ApiResponseCallback): void; warning( entry: Entry | Entry[], options?: WriteOptions | ApiResponseCallback @@ -782,13 +782,6 @@ class Log implements LogSeverityFunctions { ); } - write(entry: Entry | Entry[], options?: WriteOptions): Promise; - write( - entry: Entry | Entry[], - options: WriteOptions, - callback: ApiResponseCallback - ): void; - write(entry: Entry | Entry[], callback: ApiResponseCallback): void; /** * @typedef {array} LogWriteResponse * @property {object} 0 The full API response. @@ -892,6 +885,13 @@ class Log implements LogSeverityFunctions { * region_tag:logging_write_log_entry_advanced * Another example: */ + write(entry: Entry | Entry[], options?: WriteOptions): Promise; + write( + entry: Entry | Entry[], + options: WriteOptions, + callback: ApiResponseCallback + ): void; + write(entry: Entry | Entry[], callback: ApiResponseCallback): void; async write( entry: Entry | Entry[], opts?: WriteOptions | ApiResponseCallback diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 4868ba33993..338c8e6abbc 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -75,8 +75,6 @@ class Sink { this.formattedName_ = 'projects/' + logging.projectId + '/sinks/' + name; } - create(config: CreateSinkRequest): Promise<[Sink, LogSink]>; - create(config: CreateSinkRequest, callback: CreateSinkCallback): void; /** * Create a sink. * @@ -117,13 +115,12 @@ class Sink { * region_tag:logging_create_sink * Another example: */ + create(config: CreateSinkRequest): Promise<[Sink, LogSink]>; + create(config: CreateSinkRequest, callback: CreateSinkCallback): void; create(config: CreateSinkRequest): Promise<[Sink, LogSink]> { return this.logging.createSink(this.name, config); } - delete(gaxOptions?: CallOptions): Promise; - delete(callback: DeleteCallback): void; - delete(gaxOptions: CallOptions, callback: DeleteCallback): void; /** * @typedef {array} DeleteSinkResponse * @property {object} 0 The full API response. @@ -167,6 +164,9 @@ class Sink { * region_tag:logging_delete_sink * Another example: */ + delete(gaxOptions?: CallOptions): Promise; + delete(callback: DeleteCallback): void; + delete(gaxOptions: CallOptions, callback: DeleteCallback): void; async delete( gaxOptions?: CallOptions | DeleteCallback ): Promise { @@ -181,9 +181,6 @@ class Sink { ); } - getMetadata(gaxOptions?: CallOptions): Promise; - getMetadata(callback: SinkMetadataCallback): void; - getMetadata(gaxOptions: CallOptions, callback: SinkMetadataCallback): void; /** * @typedef {array} GetSinkMetadataResponse * @property {object} 0 The {@link Sink} metadata. @@ -226,6 +223,9 @@ class Sink { * region_tag:logging_get_sink * Another example: */ + getMetadata(gaxOptions?: CallOptions): Promise; + getMetadata(callback: SinkMetadataCallback): void; + getMetadata(gaxOptions: CallOptions, callback: SinkMetadataCallback): void; async getMetadata( gaxOptions?: CallOptions | SinkMetadataCallback ): Promise { @@ -242,8 +242,6 @@ class Sink { return [this.metadata!]; } - setFilter(filter: string): Promise; - setFilter(filter: string, callback: SinkMetadataCallback): void; /** * @typedef {array} SetSinkFilterResponse * @property {object} 0 The full API response. @@ -282,14 +280,14 @@ class Sink { * }); * ``` */ + setFilter(filter: string): Promise; + setFilter(filter: string, callback: SinkMetadataCallback): void; setFilter(filter: string): Promise { return this.setMetadata({ filter, }); } - setMetadata(metadata: SetSinkMetadata): Promise; - setMetadata(metadata: SetSinkMetadata, callback: SinkMetadataCallback): void; /** * @typedef {array} SetSinkMetadataResponse * @property {object} 0 The full API response. @@ -343,6 +341,8 @@ class Sink { * region_tag:logging_update_sink * Another example: */ + setMetadata(metadata: SetSinkMetadata): Promise; + setMetadata(metadata: SetSinkMetadata, callback: SinkMetadataCallback): void; async setMetadata(metadata: SetSinkMetadata): Promise { const [currentMetadata] = await this.getMetadata(); const uniqueWriterIdentity = metadata.uniqueWriterIdentity; From 5e5f78fb66cd37af526fb72e68d0d789484630a1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 8 Nov 2021 20:12:35 +0000 Subject: [PATCH 0821/1029] chore: release 9.6.3 (#1182) :robot: I have created a release \*beep\* \*boop\* --- ### [9.6.3](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.2...v9.6.3) (2021-11-08) ### Bug Fixes * **cloud-rad:** move comments for TSDoc ([#1181](https://www.github.com/googleapis/nodejs-logging/issues/1181)) ([51d6efd](https://www.github.com/googleapis/nodejs-logging/commit/51d6efd3341e6a02ffd130e36eb1491f410e1dc1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 8b4148a88a0..bcffcde1324 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.3](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.2...v9.6.3) (2021-11-08) + + +### Bug Fixes + +* **cloud-rad:** move comments for TSDoc ([#1181](https://www.github.com/googleapis/nodejs-logging/issues/1181)) ([51d6efd](https://www.github.com/googleapis/nodejs-logging/commit/51d6efd3341e6a02ffd130e36eb1491f410e1dc1)) + ### [9.6.2](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.1...v9.6.2) (2021-11-01) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2f04a8b7f41..aa4b7cac8da 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.2", + "version": "9.6.3", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From f9a9381a26b6ddbbc5234d4a7884eed944e389fe Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Nov 2021 18:42:17 +0100 Subject: [PATCH 0822/1029] chore(deps): update dependency sinon to v12 (#1178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1200) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) - [`b20ef9e4`](https://togithub.com/sinonjs/sinon/commit/b20ef9e4940e9384a6d0707b917a38e7bbfcd816) Upgrade to fake-timers@8 (Carl-Erik Kopseng). This is potentially breaking, but should not be, as the breaking change deals with the Node timer object created by fake timers. - [`eba42cc3`](https://togithub.com/sinonjs/sinon/commit/eba42cc38dbaf5417178a12cec11e35014e335ea) Enable esm named exports ([#​2382](https://togithub.com/sinonjs/sinon/issues/2382)) (Julian Grinblat) - [`b0cf5448`](https://togithub.com/sinonjs/sinon/commit/b0cf5448993c2ace607cdf430b7e389d02c2f296) Spelling ([#​2398](https://togithub.com/sinonjs/sinon/issues/2398)) (Josh Soref) - [`e78a6706`](https://togithub.com/sinonjs/sinon/commit/e78a670611682c7e35cf7d27887b409d6397d27c) Make calledWith() assertions idempotent ([#​2407](https://togithub.com/sinonjs/sinon/issues/2407)) (Joel Bradshaw) - [`2814c0a2`](https://togithub.com/sinonjs/sinon/commit/2814c0a212ab6b79c7251e4b0a1bebc9918257d4) Generate CHANGES.md using [@​studio/changes](https://togithub.com/studio/changes) (Morgan Roderick) > This will bring us closer to having the same release process as the > other `@sinonjs` packages. - [`2d5d6ad4`](https://togithub.com/sinonjs/sinon/commit/2d5d6ad4cd89c2063834991da5073f7640d0d722) Run tests in Node 16 in GitHub Actions (Morgan Roderick) *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-03.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index aa4b7cac8da..3c5397066c6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -87,7 +87,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 73215d6140a753541b0deb85a5465cabc8534968 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 22:50:27 +0000 Subject: [PATCH 0823/1029] docs(samples): add example tags to generated samples (#1183) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 --- handwritten/logging/linkinator.config.json | 2 +- .../v2/config_service_v2.create_bucket.js | 68 + .../v2/config_service_v2.create_exclusion.js | 63 + .../v2/config_service_v2.create_sink.js | 76 + .../v2/config_service_v2.create_view.js | 65 + .../v2/config_service_v2.delete_bucket.js | 58 + .../v2/config_service_v2.delete_exclusion.js | 57 + .../v2/config_service_v2.delete_sink.js | 58 + .../v2/config_service_v2.delete_view.js | 55 + .../v2/config_service_v2.get_bucket.js | 58 + .../v2/config_service_v2.get_cmek_settings.js | 60 + .../v2/config_service_v2.get_exclusion.js | 57 + .../v2/config_service_v2.get_sink.js | 57 + .../v2/config_service_v2.get_view.js | 55 + .../v2/config_service_v2.list_buckets.js | 74 + .../v2/config_service_v2.list_exclusions.js | 71 + .../v2/config_service_v2.list_sinks.js | 71 + .../v2/config_service_v2.list_views.js | 68 + .../v2/config_service_v2.undelete_bucket.js | 58 + .../v2/config_service_v2.update_bucket.js | 75 + .../config_service_v2.update_cmek_settings.js | 76 + .../v2/config_service_v2.update_exclusion.js | 73 + .../v2/config_service_v2.update_sink.js | 91 ++ .../v2/config_service_v2.update_view.js | 69 + .../v2/logging_service_v2.delete_log.js | 61 + .../v2/logging_service_v2.list_log_entries.js | 98 ++ .../v2/logging_service_v2.list_logs.js | 84 + ..._v2.list_monitored_resource_descriptors.js | 63 + .../v2/logging_service_v2.tail_log_entries.js | 88 + .../logging_service_v2.write_log_entries.js | 118 ++ .../metrics_service_v2.create_log_metric.js | 60 + .../metrics_service_v2.delete_log_metric.js | 53 + .../v2/metrics_service_v2.get_log_metric.js | 53 + .../v2/metrics_service_v2.list_log_metrics.js | 68 + .../metrics_service_v2.update_log_metric.js | 61 + .../src/v2/config_service_v2_client.ts | 1422 ++++++++--------- .../src/v2/logging_service_v2_client.ts | 390 +++-- .../src/v2/metrics_service_v2_client.ts | 262 ++- .../test/gapic_logging_service_v2_v2.ts | 18 +- 39 files changed, 3331 insertions(+), 1083 deletions(-) create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.create_view.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.get_view.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.list_views.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.update_view.js create mode 100644 handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js create mode 100644 handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js create mode 100644 handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js create mode 100644 handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js create mode 100644 handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js create mode 100644 handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js create mode 100644 handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js create mode 100644 handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js create mode 100644 handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js create mode 100644 handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js create mode 100644 handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js diff --git a/handwritten/logging/linkinator.config.json b/handwritten/logging/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/handwritten/logging/linkinator.config.json +++ b/handwritten/logging/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js new file mode 100644 index 00000000000..d3e20591ad3 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js @@ -0,0 +1,68 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, bucketId, bucket) { + // [START logging_v2_generated_ConfigServiceV2_CreateBucket_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource in which to create the bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * Example: `"projects/my-logging-project/locations/global"` + */ + // const parent = 'abc123' + /** + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are + * limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + */ + // const bucketId = 'abc123' + /** + * Required. The new bucket. The region specified in the new bucket must be compliant + * with any Location Restriction Org Policy. The name field in the bucket is + * ignored. + */ + // const bucket = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callCreateBucket() { + // Construct request + const request = { + parent, + bucketId, + bucket, + }; + + // Run request + const response = await loggingClient.createBucket(request); + console.log(response); + } + + callCreateBucket(); + // [END logging_v2_generated_ConfigServiceV2_CreateBucket_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js new file mode 100644 index 00000000000..d7e5f718087 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js @@ -0,0 +1,63 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, exclusion) { + // [START logging_v2_generated_ConfigServiceV2_CreateExclusion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource in which to create the exclusion: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + */ + // const parent = 'abc123' + /** + * Required. The new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + */ + // const exclusion = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callCreateExclusion() { + // Construct request + const request = { + parent, + exclusion, + }; + + // Run request + const response = await loggingClient.createExclusion(request); + console.log(response); + } + + callCreateExclusion(); + // [END logging_v2_generated_ConfigServiceV2_CreateExclusion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js new file mode 100644 index 00000000000..ac1501a00d7 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, sink) { + // [START logging_v2_generated_ConfigServiceV2_CreateSink_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource in which to create the sink: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + */ + // const parent = 'abc123' + /** + * Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. + */ + // const sink = {} + /** + * 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 + * the same group or service account used by Logging 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 google.logging.v2.LogSink. + */ + // const uniqueWriterIdentity = true + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callCreateSink() { + // Construct request + const request = { + parent, + sink, + }; + + // Run request + const response = await loggingClient.createSink(request); + console.log(response); + } + + callCreateSink(); + // [END logging_v2_generated_ConfigServiceV2_CreateSink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js new file mode 100644 index 00000000000..035db83afae --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, viewId, view) { + // [START logging_v2_generated_ConfigServiceV2_CreateView_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The bucket in which to create the view + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * Example: + * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` + */ + // const parent = 'abc123' + /** + * Required. The id to use for this view. + */ + // const viewId = 'abc123' + /** + * Required. The new view. + */ + // const view = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callCreateView() { + // Construct request + const request = { + parent, + viewId, + view, + }; + + // Run request + const response = await loggingClient.createView(request); + console.log(response); + } + + callCreateView(); + // [END logging_v2_generated_ConfigServiceV2_CreateView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js new file mode 100644 index 00000000000..d98c67e47b4 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_DeleteBucket_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The full resource name of the bucket to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callDeleteBucket() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.deleteBucket(request); + console.log(response); + } + + callDeleteBucket(); + // [END logging_v2_generated_ConfigServiceV2_DeleteBucket_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js new file mode 100644 index 00000000000..c1a93601b28 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js @@ -0,0 +1,57 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_DeleteExclusion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of an existing exclusion to delete: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callDeleteExclusion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.deleteExclusion(request); + console.log(response); + } + + callDeleteExclusion(); + // [END logging_v2_generated_ConfigServiceV2_DeleteExclusion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js new file mode 100644 index 00000000000..6aa54f7bf92 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(sinkName) { + // [START logging_v2_generated_ConfigServiceV2_DeleteSink_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * 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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + */ + // const sinkName = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callDeleteSink() { + // Construct request + const request = { + sinkName, + }; + + // Run request + const response = await loggingClient.deleteSink(request); + console.log(response); + } + + callDeleteSink(); + // [END logging_v2_generated_ConfigServiceV2_DeleteSink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js new file mode 100644 index 00000000000..8c3c62ee3ea --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_DeleteView_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The full resource name of the view to delete: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callDeleteView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.deleteView(request); + console.log(response); + } + + callDeleteView(); + // [END logging_v2_generated_ConfigServiceV2_DeleteView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js new file mode 100644 index 00000000000..756fbc9ad84 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_GetBucket_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callGetBucket() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.getBucket(request); + console.log(response); + } + + callGetBucket(); + // [END logging_v2_generated_ConfigServiceV2_GetBucket_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js new file mode 100644 index 00000000000..9294716e230 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_GetCmekSettings_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource for which to retrieve CMEK settings. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * Example: `"organizations/12345/cmekSettings"`. + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callGetCmekSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.getCmekSettings(request); + console.log(response); + } + + callGetCmekSettings(); + // [END logging_v2_generated_ConfigServiceV2_GetCmekSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js new file mode 100644 index 00000000000..b64d55d1774 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js @@ -0,0 +1,57 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_GetExclusion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of an existing exclusion: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callGetExclusion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.getExclusion(request); + console.log(response); + } + + callGetExclusion(); + // [END logging_v2_generated_ConfigServiceV2_GetExclusion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js new file mode 100644 index 00000000000..6505a60be62 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js @@ -0,0 +1,57 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(sinkName) { + // [START logging_v2_generated_ConfigServiceV2_GetSink_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the sink: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + */ + // const sinkName = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callGetSink() { + // Construct request + const request = { + sinkName, + }; + + // Run request + const response = await loggingClient.getSink(request); + console.log(response); + } + + callGetSink(); + // [END logging_v2_generated_ConfigServiceV2_GetSink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js new file mode 100644 index 00000000000..adc3a741c46 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_GetView_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the policy: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callGetView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.getView(request); + console.log(response); + } + + callGetView(); + // [END logging_v2_generated_ConfigServiceV2_GetView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js new file mode 100644 index 00000000000..6252d2d348a --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js @@ -0,0 +1,74 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START logging_v2_generated_ConfigServiceV2_ListBuckets_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource whose buckets are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of LOCATION_ID will return all + * buckets. + */ + // const parent = 'abc123' + /** + * 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. + */ + // const pageToken = 'abc123' + /** + * 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. + */ + // const pageSize = 1234 + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callListBuckets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await loggingClient.listBucketsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBuckets(); + // [END logging_v2_generated_ConfigServiceV2_ListBuckets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js new file mode 100644 index 00000000000..2d1ad40cdee --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js @@ -0,0 +1,71 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START logging_v2_generated_ConfigServiceV2_ListExclusions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource whose exclusions are to be listed. + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + */ + // const parent = 'abc123' + /** + * 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. + */ + // const pageToken = 'abc123' + /** + * 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. + */ + // const pageSize = 1234 + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callListExclusions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await loggingClient.listExclusionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListExclusions(); + // [END logging_v2_generated_ConfigServiceV2_ListExclusions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js new file mode 100644 index 00000000000..96d319fbd67 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js @@ -0,0 +1,71 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START logging_v2_generated_ConfigServiceV2_ListSinks_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource whose sinks are to be listed: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + */ + // const parent = 'abc123' + /** + * 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. + */ + // const pageToken = 'abc123' + /** + * 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. + */ + // const pageSize = 1234 + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callListSinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await loggingClient.listSinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSinks(); + // [END logging_v2_generated_ConfigServiceV2_ListSinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js new file mode 100644 index 00000000000..38da9c64b0e --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js @@ -0,0 +1,68 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START logging_v2_generated_ConfigServiceV2_ListViews_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The bucket whose views are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + */ + // const parent = 'abc123' + /** + * 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. + */ + // const pageToken = 'abc123' + /** + * 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. + */ + // const pageSize = 1234 + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callListViews() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await loggingClient.listViewsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListViews(); + // [END logging_v2_generated_ConfigServiceV2_ListViews_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js new file mode 100644 index 00000000000..52caf7adcd5 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_UndeleteBucket_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The full resource name of the bucket to undelete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callUndeleteBucket() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.undeleteBucket(request); + console.log(response); + } + + callUndeleteBucket(); + // [END logging_v2_generated_ConfigServiceV2_UndeleteBucket_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js new file mode 100644 index 00000000000..73d6f79b272 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js @@ -0,0 +1,75 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name, bucket, updateMask) { + // [START logging_v2_generated_ConfigServiceV2_UpdateBucket_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The full resource name of the bucket to update. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + * requires permission "resourcemanager.projects.updateLiens" to set the + * locked property + */ + // const name = 'abc123' + /** + * Required. The updated bucket. + */ + // const bucket = {} + /** + * Required. Field mask that specifies the fields in `bucket` that need an update. A + * bucket field will be overwritten if, and only if, it is in the update + * mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * Example: `updateMask=retention_days`. + */ + // const updateMask = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callUpdateBucket() { + // Construct request + const request = { + name, + bucket, + updateMask, + }; + + // Run request + const response = await loggingClient.updateBucket(request); + console.log(response); + } + + callUpdateBucket(); + // [END logging_v2_generated_ConfigServiceV2_UpdateBucket_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js new file mode 100644 index 00000000000..2580cd32d61 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name, cmekSettings) { + // [START logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for the CMEK settings to update. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * Example: `"organizations/12345/cmekSettings"`. + * Note: CMEK for the Logs Router can currently only be configured for GCP + * organizations. Once configured, it applies to all projects and folders in + * the GCP organization. + */ + // const name = 'abc123' + /** + * Required. The CMEK settings to update. + * See Enabling CMEK for Logs + * Router (https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + */ + // const cmekSettings = {} + /** + * Optional. Field mask identifying which fields from `cmek_settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See FieldMask google.protobuf.FieldMask for more information. + * Example: `"updateMask=kmsKeyName"` + */ + // const updateMask = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callUpdateCmekSettings() { + // Construct request + const request = { + name, + cmekSettings, + }; + + // Run request + const response = await loggingClient.updateCmekSettings(request); + console.log(response); + } + + callUpdateCmekSettings(); + // [END logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js new file mode 100644 index 00000000000..33866c4287e --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js @@ -0,0 +1,73 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name, exclusion, updateMask) { + // [START logging_v2_generated_ConfigServiceV2_UpdateExclusion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the exclusion to update: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + */ + // const name = 'abc123' + /** + * Required. New values for the existing exclusion. Only the fields specified in + * `update_mask` are relevant. + */ + // const exclusion = {} + /** + * Required. A non-empty list of fields to change in the existing exclusion. New values + * for the fields are taken from the corresponding fields in the + * LogExclusion google.logging.v2.LogExclusion included in this request. Fields not mentioned in + * `update_mask` are not changed and are ignored in the request. + * For example, to change the filter and description of an exclusion, + * specify an `update_mask` of `"filter,description"`. + */ + // const updateMask = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callUpdateExclusion() { + // Construct request + const request = { + name, + exclusion, + updateMask, + }; + + // Run request + const response = await loggingClient.updateExclusion(request); + console.log(response); + } + + callUpdateExclusion(); + // [END logging_v2_generated_ConfigServiceV2_UpdateExclusion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js new file mode 100644 index 00000000000..5e6403f9284 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js @@ -0,0 +1,91 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(sinkName, sink) { + // [START logging_v2_generated_ConfigServiceV2_UpdateSink_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * 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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + */ + // const sinkName = 'abc123' + /** + * Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. + */ + // const sink = {} + /** + * Optional. See sinks.create google.logging.v2.ConfigServiceV2.CreateSink + * 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 is 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 is true and the new value is + * set to false or defaulted to false. + */ + // const uniqueWriterIdentity = true + /** + * Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * An empty updateMask is temporarily treated as using the following mask + * for backwards compatibility purposes: + * destination,filter,includeChildren + * At some point in the future, behavior will be removed and specifying an + * empty updateMask will be an error. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * Example: `updateMask=filter`. + */ + // const updateMask = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callUpdateSink() { + // Construct request + const request = { + sinkName, + sink, + }; + + // Run request + const response = await loggingClient.updateSink(request); + console.log(response); + } + + callUpdateSink(); + // [END logging_v2_generated_ConfigServiceV2_UpdateSink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js new file mode 100644 index 00000000000..ecab90c51a2 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name, view) { + // [START logging_v2_generated_ConfigServiceV2_UpdateView_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The full resource name of the view to update + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + */ + // const name = 'abc123' + /** + * Required. The updated view. + */ + // const view = {} + /** + * Optional. Field mask that specifies the fields in `view` that need + * an update. A field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * Example: `updateMask=filter`. + */ + // const updateMask = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callUpdateView() { + // Construct request + const request = { + name, + view, + }; + + // Run request + const response = await loggingClient.updateView(request); + console.log(response); + } + + callUpdateView(); + // [END logging_v2_generated_ConfigServiceV2_UpdateView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js new file mode 100644 index 00000000000..855310502ec --- /dev/null +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(logName) { + // [START logging_v2_generated_LoggingServiceV2_DeleteLog_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the log to delete: + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * For more information about log names, see + * LogEntry google.logging.v2.LogEntry. + */ + // const logName = 'abc123' + + // Imports the Logging library + const {LoggingServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new LoggingServiceV2Client(); + + async function callDeleteLog() { + // Construct request + const request = { + logName, + }; + + // Run request + const response = await loggingClient.deleteLog(request); + console.log(response); + } + + callDeleteLog(); + // [END logging_v2_generated_LoggingServiceV2_DeleteLog_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js new file mode 100644 index 00000000000..1ac1cb7a78e --- /dev/null +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js @@ -0,0 +1,98 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(resourceNames) { + // [START logging_v2_generated_LoggingServiceV2_ListLogEntries_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * May alternatively be one or more views + * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * Projects listed in the `project_ids` field are added to this list. + */ + // const resourceNames = 'abc123' + /** + * Optional. A filter that chooses which log entries to return. See Advanced + * Logs Queries (https://cloud.google.com/logging/docs/view/advanced-queries). + * 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. + */ + // const filter = 'abc123' + /** + * 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 their `insert_id` values. + */ + // const orderBy = 'abc123' + /** + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, + * the request is rejected. The presence of `next_page_token` in the + * response indicates that more results might be available. + */ + // const pageSize = 1234 + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + */ + // const pageToken = 'abc123' + + // Imports the Logging library + const {LoggingServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new LoggingServiceV2Client(); + + async function callListLogEntries() { + // Construct request + const request = { + resourceNames, + }; + + // Run request + const iterable = await loggingClient.listLogEntriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLogEntries(); + // [END logging_v2_generated_LoggingServiceV2_ListLogEntries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js new file mode 100644 index 00000000000..a9ee584ed84 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js @@ -0,0 +1,84 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START logging_v2_generated_LoggingServiceV2_ListLogs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name that owns the logs: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + */ + // const parent = 'abc123' + /** + * 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. + */ + // const pageSize = 1234 + /** + * 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. + */ + // const pageToken = 'abc123' + /** + * Optional. The resource name that owns the logs: + * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * To support legacy queries, it could also be: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + */ + // const resourceNames = 'abc123' + + // Imports the Logging library + const {LoggingServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new LoggingServiceV2Client(); + + async function callListLogs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await loggingClient.listLogsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLogs(); + // [END logging_v2_generated_LoggingServiceV2_ListLogs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js new file mode 100644 index 00000000000..21599320c13 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -0,0 +1,63 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * 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. + */ + // const pageSize = 1234 + /** + * 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. + */ + // const pageToken = 'abc123' + + // Imports the Logging library + const {LoggingServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new LoggingServiceV2Client(); + + async function callListMonitoredResourceDescriptors() { + // Construct request + const request = {}; + + // Run request + const iterable = await loggingClient.listMonitoredResourceDescriptorsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + callListMonitoredResourceDescriptors(); + // [END logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js new file mode 100644 index 00000000000..ceebfc21e0a --- /dev/null +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js @@ -0,0 +1,88 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(resourceNames) { + // [START logging_v2_generated_LoggingServiceV2_TailLogEntries_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of a parent resource from which to retrieve log entries: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * May alternatively be one or more views: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * "organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + */ + // const resourceNames = 'abc123' + /** + * Optional. A filter that chooses which log entries to return. See Advanced + * Logs Filters (https://cloud.google.com/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 in `resource_names` will cause + * the filter to return no results. The maximum length of the filter is 20000 + * characters. + */ + // const filter = 'abc123' + /** + * Optional. The amount of time to buffer log entries at the server before + * being returned to prevent out of order results due to late arriving log + * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 + * milliseconds. + */ + // const bufferWindow = {} + + // Imports the Logging library + const {LoggingServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new LoggingServiceV2Client(); + + async function callTailLogEntries() { + // Construct request + const request = { + resourceNames, + }; + + // Run request + const stream = await loggingClient.tailLogEntries(); + stream.on('data', response => { + console.log(response); + }); + stream.on('error', err => { + throw err; + }); + stream.on('end', () => { + /* API call completed */ + }); + stream.write(request); + stream.end(); + } + + callTailLogEntries(); + // [END logging_v2_generated_LoggingServiceV2_TailLogEntries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js new file mode 100644 index 00000000000..c55d5dec042 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js @@ -0,0 +1,118 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(entries) { + // [START logging_v2_generated_LoggingServiceV2_WriteLogEntries_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. A default log resource name that is assigned to all log entries + * in `entries` that do not specify a value for `log_name`: + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * `[LOG_ID]` must be URL-encoded. For example: + * "projects/my-project-id/logs/syslog" + * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. + */ + // const logName = 'abc123' + /** + * 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 google.logging.v2.LogEntry. + */ + // const resource = {} + /** + * 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 google.logging.v2.LogEntry. + */ + // const labels = 1234 + /** + * Required. The log entries to send to Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the + * LogEntry google.logging.v2.LogEntry type. + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * Log entries with timestamps that are more than the + * logs retention period (https://cloud.google.com/logging/quota-policy) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be exported + * with + * LogSinks (https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * To improve throughput and to avoid exceeding the + * quota limit (https://cloud.google.com/logging/quota-policy) for calls to + * `entries.write`, you should try to include several log entries in this + * list, rather than calling this method for each individual log entry. + */ + // const entries = 1234 + /** + * 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, then the response status is the error associated + * with one of the failed entries and the response includes error details + * keyed by the entries' zero-based index in the `entries.write` method. + */ + // const partialSuccess = true + /** + * Optional. If true, the request should expect normal response, but the + * entries won't be persisted nor exported. Useful for checking whether the + * logging API endpoints are working properly before sending valuable data. + */ + // const dryRun = true + + // Imports the Logging library + const {LoggingServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new LoggingServiceV2Client(); + + async function callWriteLogEntries() { + // Construct request + const request = { + entries, + }; + + // Run request + const response = await loggingClient.writeLogEntries(request); + console.log(response); + } + + callWriteLogEntries(); + // [END logging_v2_generated_LoggingServiceV2_WriteLogEntries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js new file mode 100644 index 00000000000..71c3e9cb92c --- /dev/null +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, metric) { + // [START logging_v2_generated_MetricsServiceV2_CreateLogMetric_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the project in which to create the metric: + * "projects/[PROJECT_ID]" + * The new metric must be provided in the request. + */ + // const parent = 'abc123' + /** + * Required. The new logs-based metric, which must not have an identifier that + * already exists. + */ + // const metric = {} + + // Imports the Logging library + const {MetricsServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new MetricsServiceV2Client(); + + async function callCreateLogMetric() { + // Construct request + const request = { + parent, + metric, + }; + + // Run request + const response = await loggingClient.createLogMetric(request); + console.log(response); + } + + callCreateLogMetric(); + // [END logging_v2_generated_MetricsServiceV2_CreateLogMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js new file mode 100644 index 00000000000..91255f11647 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(metricName) { + // [START logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the metric to delete: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + */ + // const metricName = 'abc123' + + // Imports the Logging library + const {MetricsServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new MetricsServiceV2Client(); + + async function callDeleteLogMetric() { + // Construct request + const request = { + metricName, + }; + + // Run request + const response = await loggingClient.deleteLogMetric(request); + console.log(response); + } + + callDeleteLogMetric(); + // [END logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js new file mode 100644 index 00000000000..4111c918cc4 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(metricName) { + // [START logging_v2_generated_MetricsServiceV2_GetLogMetric_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the desired metric: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + */ + // const metricName = 'abc123' + + // Imports the Logging library + const {MetricsServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new MetricsServiceV2Client(); + + async function callGetLogMetric() { + // Construct request + const request = { + metricName, + }; + + // Run request + const response = await loggingClient.getLogMetric(request); + console.log(response); + } + + callGetLogMetric(); + // [END logging_v2_generated_MetricsServiceV2_GetLogMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js new file mode 100644 index 00000000000..3b1893f6432 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js @@ -0,0 +1,68 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START logging_v2_generated_MetricsServiceV2_ListLogMetrics_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the project containing the metrics: + * "projects/[PROJECT_ID]" + */ + // const parent = 'abc123' + /** + * 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. + */ + // const pageToken = 'abc123' + /** + * 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. + */ + // const pageSize = 1234 + + // Imports the Logging library + const {MetricsServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new MetricsServiceV2Client(); + + async function callListLogMetrics() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await loggingClient.listLogMetricsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLogMetrics(); + // [END logging_v2_generated_MetricsServiceV2_ListLogMetrics_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js new file mode 100644 index 00000000000..0a930deb633 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(metricName, metric) { + // [START logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the metric to update: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * The updated metric must be provided in the request and it's + * `name` field must be the same as `[METRIC_ID]` If the metric + * does not exist in `[PROJECT_ID]`, then a new metric is created. + */ + // const metricName = 'abc123' + /** + * Required. The updated metric. + */ + // const metric = {} + + // Imports the Logging library + const {MetricsServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new MetricsServiceV2Client(); + + async function callUpdateLogMetric() { + // Construct request + const request = { + metricName, + metric, + }; + + // Run request + const response = await loggingClient.updateLogMetric(request); + console.log(response); + } + + callUpdateLogMetric(); + // [END logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 08b77a8bd7a..4d42b37a406 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -70,7 +70,7 @@ export class ConfigServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance| this document}. + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -436,6 +436,31 @@ export class ConfigServiceV2Client { // ------------------- // -- Service calls -- // ------------------- + /** + * Gets a bucket. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the bucket: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.get_bucket.js + * region_tag:logging_v2_generated_ConfigServiceV2_GetBucket_async + */ getBucket( request?: protos.google.logging.v2.IGetBucketRequest, options?: CallOptions @@ -463,33 +488,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Gets a bucket. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the bucket: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.getBucket(request); - * ``` - */ getBucket( request?: protos.google.logging.v2.IGetBucketRequest, optionsOrCallback?: @@ -529,33 +527,6 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.getBucket(request, options, callback); } - createBucket( - request?: protos.google.logging.v2.ICreateBucketRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.ICreateBucketRequest | undefined, - {} | undefined - ] - >; - createBucket( - request: protos.google.logging.v2.ICreateBucketRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.ICreateBucketRequest | null | undefined, - {} | null | undefined - > - ): void; - createBucket( - request: protos.google.logging.v2.ICreateBucketRequest, - callback: Callback< - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.ICreateBucketRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a bucket that can be used to store log entries. Once a bucket has * been created, the region cannot be changed. @@ -581,13 +552,38 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.createBucket(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.create_bucket.js + * region_tag:logging_v2_generated_ConfigServiceV2_CreateBucket_async */ + createBucket( + request?: protos.google.logging.v2.ICreateBucketRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | undefined, + {} | undefined + ] + >; + createBucket( + request: protos.google.logging.v2.ICreateBucketRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + createBucket( + request: protos.google.logging.v2.ICreateBucketRequest, + callback: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.ICreateBucketRequest | null | undefined, + {} | null | undefined + > + ): void; createBucket( request?: protos.google.logging.v2.ICreateBucketRequest, optionsOrCallback?: @@ -627,33 +623,6 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.createBucket(request, options, callback); } - updateBucket( - request?: protos.google.logging.v2.IUpdateBucketRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.IUpdateBucketRequest | undefined, - {} | undefined - ] - >; - updateBucket( - request: protos.google.logging.v2.IUpdateBucketRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.IUpdateBucketRequest | null | undefined, - {} | null | undefined - > - ): void; - updateBucket( - request: protos.google.logging.v2.IUpdateBucketRequest, - callback: Callback< - protos.google.logging.v2.ILogBucket, - protos.google.logging.v2.IUpdateBucketRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Updates a bucket. This method replaces the following fields in the * existing bucket with values from the new bucket: `retention_period` @@ -696,13 +665,38 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.updateBucket(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.update_bucket.js + * region_tag:logging_v2_generated_ConfigServiceV2_UpdateBucket_async */ + updateBucket( + request?: protos.google.logging.v2.IUpdateBucketRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | undefined, + {} | undefined + ] + >; + updateBucket( + request: protos.google.logging.v2.IUpdateBucketRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + {} | null | undefined + > + ): void; + updateBucket( + request: protos.google.logging.v2.IUpdateBucketRequest, + callback: Callback< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IUpdateBucketRequest | null | undefined, + {} | null | undefined + > + ): void; updateBucket( request?: protos.google.logging.v2.IUpdateBucketRequest, optionsOrCallback?: @@ -742,6 +736,34 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.updateBucket(request, options, callback); } + /** + * Deletes a bucket. + * Moves the bucket to the DELETE_REQUESTED state. After 7 days, the + * bucket will be purged and all logs in the bucket will be permanently + * deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the bucket to delete. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.delete_bucket.js + * region_tag:logging_v2_generated_ConfigServiceV2_DeleteBucket_async + */ deleteBucket( request?: protos.google.logging.v2.IDeleteBucketRequest, options?: CallOptions @@ -769,36 +791,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Deletes a bucket. - * Moves the bucket to the DELETE_REQUESTED state. After 7 days, the - * bucket will be purged and all logs in the bucket will be permanently - * deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The full resource name of the bucket to delete. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.deleteBucket(request); - * ``` - */ deleteBucket( request?: protos.google.logging.v2.IDeleteBucketRequest, optionsOrCallback?: @@ -838,6 +830,32 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.deleteBucket(request, options, callback); } + /** + * Undeletes a bucket. A bucket that has been deleted may be undeleted within + * the grace period of 7 days. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the bucket to undelete. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.undelete_bucket.js + * region_tag:logging_v2_generated_ConfigServiceV2_UndeleteBucket_async + */ undeleteBucket( request?: protos.google.logging.v2.IUndeleteBucketRequest, options?: CallOptions @@ -865,34 +883,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Undeletes a bucket. A bucket that has been deleted may be undeleted within - * the grace period of 7 days. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The full resource name of the bucket to undelete. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.undeleteBucket(request); - * ``` - */ undeleteBucket( request?: protos.google.logging.v2.IUndeleteBucketRequest, optionsOrCallback?: @@ -932,33 +922,6 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.undeleteBucket(request, options, callback); } - getView( - request?: protos.google.logging.v2.IGetViewRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogView, - protos.google.logging.v2.IGetViewRequest | undefined, - {} | undefined - ] - >; - getView( - request: protos.google.logging.v2.IGetViewRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ILogView, - protos.google.logging.v2.IGetViewRequest | null | undefined, - {} | null | undefined - > - ): void; - getView( - request: protos.google.logging.v2.IGetViewRequest, - callback: Callback< - protos.google.logging.v2.ILogView, - protos.google.logging.v2.IGetViewRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Gets a view. * @@ -976,13 +939,38 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.getView(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.get_view.js + * region_tag:logging_v2_generated_ConfigServiceV2_GetView_async */ + getView( + request?: protos.google.logging.v2.IGetViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | undefined, + {} | undefined + ] + >; + getView( + request: protos.google.logging.v2.IGetViewRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | null | undefined, + {} | null | undefined + > + ): void; + getView( + request: protos.google.logging.v2.IGetViewRequest, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IGetViewRequest | null | undefined, + {} | null | undefined + > + ): void; getView( request?: protos.google.logging.v2.IGetViewRequest, optionsOrCallback?: @@ -1022,6 +1010,33 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.getView(request, options, callback); } + /** + * Creates a view over logs in a bucket. A bucket may contain a maximum of + * 50 views. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The bucket in which to create the view + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Example: + * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` + * @param {string} request.viewId + * Required. The id to use for this view. + * @param {google.logging.v2.LogView} request.view + * Required. The new view. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.create_view.js + * region_tag:logging_v2_generated_ConfigServiceV2_CreateView_async + */ createView( request?: protos.google.logging.v2.ICreateViewRequest, options?: CallOptions @@ -1049,35 +1064,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Creates a view over logs in a bucket. A bucket may contain a maximum of - * 50 views. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The bucket in which to create the view - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Example: - * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` - * @param {string} request.viewId - * Required. The id to use for this view. - * @param {google.logging.v2.LogView} request.view - * Required. The new view. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.createView(request); - * ``` - */ createView( request?: protos.google.logging.v2.ICreateViewRequest, optionsOrCallback?: @@ -1117,33 +1103,6 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.createView(request, options, callback); } - updateView( - request?: protos.google.logging.v2.IUpdateViewRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogView, - protos.google.logging.v2.IUpdateViewRequest | undefined, - {} | undefined - ] - >; - updateView( - request: protos.google.logging.v2.IUpdateViewRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ILogView, - protos.google.logging.v2.IUpdateViewRequest | null | undefined, - {} | null | undefined - > - ): void; - updateView( - request: protos.google.logging.v2.IUpdateViewRequest, - callback: Callback< - protos.google.logging.v2.ILogView, - protos.google.logging.v2.IUpdateViewRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Updates a view. This method replaces the following fields in the existing * view with values from the new view: `filter`. @@ -1173,13 +1132,38 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.updateView(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.update_view.js + * region_tag:logging_v2_generated_ConfigServiceV2_UpdateView_async */ + updateView( + request?: protos.google.logging.v2.IUpdateViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | undefined, + {} | undefined + ] + >; + updateView( + request: protos.google.logging.v2.IUpdateViewRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | null | undefined, + {} | null | undefined + > + ): void; + updateView( + request: protos.google.logging.v2.IUpdateViewRequest, + callback: Callback< + protos.google.logging.v2.ILogView, + protos.google.logging.v2.IUpdateViewRequest | null | undefined, + {} | null | undefined + > + ): void; updateView( request?: protos.google.logging.v2.IUpdateViewRequest, optionsOrCallback?: @@ -1219,6 +1203,28 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.updateView(request, options, callback); } + /** + * Deletes a view from a bucket. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the view to delete: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * + * Example: + * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.delete_view.js + * region_tag:logging_v2_generated_ConfigServiceV2_DeleteView_async + */ deleteView( request?: protos.google.logging.v2.IDeleteViewRequest, options?: CallOptions @@ -1246,30 +1252,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Deletes a view from a bucket. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The full resource name of the view to delete: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.deleteView(request); - * ``` - */ deleteView( request?: protos.google.logging.v2.IDeleteViewRequest, optionsOrCallback?: @@ -1309,6 +1291,30 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.deleteView(request, options, callback); } + /** + * Gets a sink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.sinkName + * Required. The resource name of the sink: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.get_sink.js + * region_tag:logging_v2_generated_ConfigServiceV2_GetSink_async + */ getSink( request?: protos.google.logging.v2.IGetSinkRequest, options?: CallOptions @@ -1336,32 +1342,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Gets a sink. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.sinkName - * Required. The resource name of the sink: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.getSink(request); - * ``` - */ getSink( request?: protos.google.logging.v2.IGetSinkRequest, optionsOrCallback?: @@ -1401,33 +1381,6 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.getSink(request, options, callback); } - createSink( - request?: protos.google.logging.v2.ICreateSinkRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogSink, - protos.google.logging.v2.ICreateSinkRequest | undefined, - {} | undefined - ] - >; - createSink( - request: protos.google.logging.v2.ICreateSinkRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ILogSink, - protos.google.logging.v2.ICreateSinkRequest | null | undefined, - {} | null | undefined - > - ): void; - createSink( - request: protos.google.logging.v2.ICreateSinkRequest, - callback: Callback< - protos.google.logging.v2.ILogSink, - protos.google.logging.v2.ICreateSinkRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a sink that exports specified log entries to a destination. The * export of newly-ingested log entries begins immediately, unless the sink's @@ -1465,16 +1418,41 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.createSink(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.create_sink.js + * region_tag:logging_v2_generated_ConfigServiceV2_CreateSink_async */ createSink( request?: protos.google.logging.v2.ICreateSinkRequest, - optionsOrCallback?: + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | undefined, + {} | undefined + ] + >; + createSink( + request: protos.google.logging.v2.ICreateSinkRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | null | undefined, + {} | null | undefined + > + ): void; + createSink( + request: protos.google.logging.v2.ICreateSinkRequest, + callback: Callback< + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.ICreateSinkRequest | null | undefined, + {} | null | undefined + > + ): void; + createSink( + request?: protos.google.logging.v2.ICreateSinkRequest, + optionsOrCallback?: | CallOptions | Callback< protos.google.logging.v2.ILogSink, @@ -1511,33 +1489,6 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.createSink(request, options, callback); } - updateSink( - request?: protos.google.logging.v2.IUpdateSinkRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogSink, - protos.google.logging.v2.IUpdateSinkRequest | undefined, - {} | undefined - ] - >; - updateSink( - request: protos.google.logging.v2.IUpdateSinkRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ILogSink, - protos.google.logging.v2.IUpdateSinkRequest | null | undefined, - {} | null | undefined - > - ): void; - updateSink( - request: protos.google.logging.v2.IUpdateSinkRequest, - callback: Callback< - protos.google.logging.v2.ILogSink, - protos.google.logging.v2.IUpdateSinkRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Updates a sink. This method replaces the following fields in the existing * sink with values from the new sink: `destination`, and `filter`. @@ -1592,13 +1543,38 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.updateSink(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.update_sink.js + * region_tag:logging_v2_generated_ConfigServiceV2_UpdateSink_async */ + updateSink( + request?: protos.google.logging.v2.IUpdateSinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | undefined, + {} | undefined + ] + >; + updateSink( + request: protos.google.logging.v2.IUpdateSinkRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | null | undefined, + {} | null | undefined + > + ): void; + updateSink( + request: protos.google.logging.v2.IUpdateSinkRequest, + callback: Callback< + protos.google.logging.v2.ILogSink, + protos.google.logging.v2.IUpdateSinkRequest | null | undefined, + {} | null | undefined + > + ): void; updateSink( request?: protos.google.logging.v2.IUpdateSinkRequest, optionsOrCallback?: @@ -1638,6 +1614,32 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.updateSink(request, options, callback); } + /** + * Deletes a sink. If the sink has a unique `writer_identity`, then that + * service account is also deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.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]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.delete_sink.js + * region_tag:logging_v2_generated_ConfigServiceV2_DeleteSink_async + */ deleteSink( request?: protos.google.logging.v2.IDeleteSinkRequest, options?: CallOptions @@ -1665,34 +1667,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that - * service account is also deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.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]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.deleteSink(request); - * ``` - */ deleteSink( request?: protos.google.logging.v2.IDeleteSinkRequest, optionsOrCallback?: @@ -1732,6 +1706,30 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.deleteSink(request, options, callback); } + /** + * Gets the description of an exclusion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of an existing exclusion: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.get_exclusion.js + * region_tag:logging_v2_generated_ConfigServiceV2_GetExclusion_async + */ getExclusion( request?: protos.google.logging.v2.IGetExclusionRequest, options?: CallOptions @@ -1759,32 +1757,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Gets the description of an exclusion. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of an existing exclusion: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.getExclusion(request); - * ``` - */ getExclusion( request?: protos.google.logging.v2.IGetExclusionRequest, optionsOrCallback?: @@ -1824,6 +1796,35 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.getExclusion(request, options, callback); } + /** + * Creates a new exclusion in a specified parent resource. + * Only log entries belonging to that resource can be excluded. + * You can have up to 10 exclusions in a resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource in which to create the exclusion: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {google.logging.v2.LogExclusion} request.exclusion + * Required. The new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.create_exclusion.js + * region_tag:logging_v2_generated_ConfigServiceV2_CreateExclusion_async + */ createExclusion( request?: protos.google.logging.v2.ICreateExclusionRequest, options?: CallOptions @@ -1851,37 +1852,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Creates a new exclusion in a specified parent resource. - * Only log entries belonging to that resource can be excluded. - * You can have up to 10 exclusions in a resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource in which to create the exclusion: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {google.logging.v2.LogExclusion} request.exclusion - * Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.createExclusion(request); - * ``` - */ createExclusion( request?: protos.google.logging.v2.ICreateExclusionRequest, optionsOrCallback?: @@ -1921,33 +1891,6 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.createExclusion(request, options, callback); } - updateExclusion( - request?: protos.google.logging.v2.IUpdateExclusionRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogExclusion, - protos.google.logging.v2.IUpdateExclusionRequest | undefined, - {} | undefined - ] - >; - updateExclusion( - request: protos.google.logging.v2.IUpdateExclusionRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ILogExclusion, - protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, - {} | null | undefined - > - ): void; - updateExclusion( - request: protos.google.logging.v2.IUpdateExclusionRequest, - callback: Callback< - protos.google.logging.v2.ILogExclusion, - protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Changes one or more properties of an existing exclusion. * @@ -1978,13 +1921,38 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.updateExclusion(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.update_exclusion.js + * region_tag:logging_v2_generated_ConfigServiceV2_UpdateExclusion_async */ + updateExclusion( + request?: protos.google.logging.v2.IUpdateExclusionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | undefined, + {} | undefined + ] + >; + updateExclusion( + request: protos.google.logging.v2.IUpdateExclusionRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, + {} | null | undefined + > + ): void; + updateExclusion( + request: protos.google.logging.v2.IUpdateExclusionRequest, + callback: Callback< + protos.google.logging.v2.ILogExclusion, + protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, + {} | null | undefined + > + ): void; updateExclusion( request?: protos.google.logging.v2.IUpdateExclusionRequest, optionsOrCallback?: @@ -2024,6 +1992,30 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.updateExclusion(request, options, callback); } + /** + * Deletes an exclusion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of an existing exclusion to delete: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.delete_exclusion.js + * region_tag:logging_v2_generated_ConfigServiceV2_DeleteExclusion_async + */ deleteExclusion( request?: protos.google.logging.v2.IDeleteExclusionRequest, options?: CallOptions @@ -2051,32 +2043,6 @@ export class ConfigServiceV2Client { {} | null | undefined > ): void; - /** - * Deletes an exclusion. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of an existing exclusion to delete: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.deleteExclusion(request); - * ``` - */ deleteExclusion( request?: protos.google.logging.v2.IDeleteExclusionRequest, optionsOrCallback?: @@ -2116,33 +2082,6 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.deleteExclusion(request, options, callback); } - getCmekSettings( - request?: protos.google.logging.v2.IGetCmekSettingsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ICmekSettings, - protos.google.logging.v2.IGetCmekSettingsRequest | undefined, - {} | undefined - ] - >; - getCmekSettings( - request: protos.google.logging.v2.IGetCmekSettingsRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ICmekSettings, - protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, - {} | null | undefined - > - ): void; - getCmekSettings( - request: protos.google.logging.v2.IGetCmekSettingsRequest, - callback: Callback< - protos.google.logging.v2.ICmekSettings, - protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Gets the Logs Router CMEK settings for the given resource. * @@ -2174,13 +2113,38 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.getCmekSettings(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.get_cmek_settings.js + * region_tag:logging_v2_generated_ConfigServiceV2_GetCmekSettings_async */ + getCmekSettings( + request?: protos.google.logging.v2.IGetCmekSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | undefined, + {} | undefined + ] + >; + getCmekSettings( + request: protos.google.logging.v2.IGetCmekSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; + getCmekSettings( + request: protos.google.logging.v2.IGetCmekSettingsRequest, + callback: Callback< + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; getCmekSettings( request?: protos.google.logging.v2.IGetCmekSettingsRequest, optionsOrCallback?: @@ -2211,42 +2175,15 @@ export class ConfigServiceV2Client { options = optionsOrCallback as CallOptions; } options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', - }); - this.initialize(); - return this.innerApiCalls.getCmekSettings(request, options, callback); - } - updateCmekSettings( - request?: protos.google.logging.v2.IUpdateCmekSettingsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ICmekSettings, - protos.google.logging.v2.IUpdateCmekSettingsRequest | undefined, - {} | undefined - ] - >; - updateCmekSettings( - request: protos.google.logging.v2.IUpdateCmekSettingsRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.ICmekSettings, - protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, - {} | null | undefined - > - ): void; - updateCmekSettings( - request: protos.google.logging.v2.IUpdateCmekSettingsRequest, - callback: Callback< - protos.google.logging.v2.ICmekSettings, - protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, - {} | null | undefined - > - ): void; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getCmekSettings(request, options, callback); + } /** * Updates the Logs Router CMEK settings for the given resource. * @@ -2298,13 +2235,38 @@ export class ConfigServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.updateCmekSettings(request); - * ``` + * @example include:samples/generated/v2/config_service_v2.update_cmek_settings.js + * region_tag:logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async */ + updateCmekSettings( + request?: protos.google.logging.v2.IUpdateCmekSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IUpdateCmekSettingsRequest | undefined, + {} | undefined + ] + >; + updateCmekSettings( + request: protos.google.logging.v2.IUpdateCmekSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; + updateCmekSettings( + request: protos.google.logging.v2.IUpdateCmekSettingsRequest, + callback: Callback< + protos.google.logging.v2.ICmekSettings, + protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; updateCmekSettings( request?: protos.google.logging.v2.IUpdateCmekSettingsRequest, optionsOrCallback?: @@ -2347,33 +2309,6 @@ export class ConfigServiceV2Client { return this.innerApiCalls.updateCmekSettings(request, options, callback); } - listBuckets( - request?: protos.google.logging.v2.IListBucketsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogBucket[], - protos.google.logging.v2.IListBucketsRequest | null, - protos.google.logging.v2.IListBucketsResponse - ] - >; - listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket - > - ): void; - listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, - callback: PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket - > - ): void; /** * Lists buckets. * @@ -2409,9 +2344,36 @@ export class ConfigServiceV2Client { * We recommend using `listBucketsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listBuckets( + request?: protos.google.logging.v2.IListBucketsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogBucket[], + protos.google.logging.v2.IListBucketsRequest | null, + protos.google.logging.v2.IListBucketsResponse + ] + >; + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): void; + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): void; listBuckets( request?: protos.google.logging.v2.IListBucketsRequest, optionsOrCallback?: @@ -2485,7 +2447,7 @@ export class ConfigServiceV2Client { * We recommend using `listBucketsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listBucketsStream( @@ -2500,7 +2462,8 @@ export class ConfigServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listBuckets']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuckets.createStream( this.innerApiCalls.listBuckets as gax.GaxCall, @@ -2538,20 +2501,15 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * [LogBucket]{@link google.logging.v2.LogBucket}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * ``` - * const iterable = client.listBucketsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` + * @example include:samples/generated/v2/config_service_v2.list_buckets.js + * region_tag:logging_v2_generated_ConfigServiceV2_ListBuckets_async */ listBucketsAsync( request?: protos.google.logging.v2.IListBucketsRequest, @@ -2565,8 +2523,8 @@ export class ConfigServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listBuckets']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuckets.asyncIterate( this.innerApiCalls['listBuckets'] as GaxCall, @@ -2574,33 +2532,6 @@ export class ConfigServiceV2Client { callSettings ) as AsyncIterable; } - listViews( - request?: protos.google.logging.v2.IListViewsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogView[], - protos.google.logging.v2.IListViewsRequest | null, - protos.google.logging.v2.IListViewsResponse - ] - >; - listViews( - request: protos.google.logging.v2.IListViewsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.logging.v2.IListViewsRequest, - protos.google.logging.v2.IListViewsResponse | null | undefined, - protos.google.logging.v2.ILogView - > - ): void; - listViews( - request: protos.google.logging.v2.IListViewsRequest, - callback: PaginationCallback< - protos.google.logging.v2.IListViewsRequest, - protos.google.logging.v2.IListViewsResponse | null | undefined, - protos.google.logging.v2.ILogView - > - ): void; /** * Lists views on a bucket. * @@ -2629,9 +2560,36 @@ export class ConfigServiceV2Client { * We recommend using `listViewsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listViews( + request?: protos.google.logging.v2.IListViewsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogView[], + protos.google.logging.v2.IListViewsRequest | null, + protos.google.logging.v2.IListViewsResponse + ] + >; + listViews( + request: protos.google.logging.v2.IListViewsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListViewsRequest, + protos.google.logging.v2.IListViewsResponse | null | undefined, + protos.google.logging.v2.ILogView + > + ): void; + listViews( + request: protos.google.logging.v2.IListViewsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListViewsRequest, + protos.google.logging.v2.IListViewsResponse | null | undefined, + protos.google.logging.v2.ILogView + > + ): void; listViews( request?: protos.google.logging.v2.IListViewsRequest, optionsOrCallback?: @@ -2698,7 +2656,7 @@ export class ConfigServiceV2Client { * We recommend using `listViewsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listViewsStream( @@ -2713,7 +2671,8 @@ export class ConfigServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listViews']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listViews.createStream( this.innerApiCalls.listViews as gax.GaxCall, @@ -2744,20 +2703,15 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * [LogView]{@link google.logging.v2.LogView}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * ``` - * const iterable = client.listViewsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` + * @example include:samples/generated/v2/config_service_v2.list_views.js + * region_tag:logging_v2_generated_ConfigServiceV2_ListViews_async */ listViewsAsync( request?: protos.google.logging.v2.IListViewsRequest, @@ -2771,8 +2725,8 @@ export class ConfigServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listViews']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listViews.asyncIterate( this.innerApiCalls['listViews'] as GaxCall, @@ -2780,33 +2734,6 @@ export class ConfigServiceV2Client { callSettings ) as AsyncIterable; } - listSinks( - request?: protos.google.logging.v2.IListSinksRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogSink[], - protos.google.logging.v2.IListSinksRequest | null, - protos.google.logging.v2.IListSinksResponse - ] - >; - listSinks( - request: protos.google.logging.v2.IListSinksRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.logging.v2.IListSinksRequest, - protos.google.logging.v2.IListSinksResponse | null | undefined, - protos.google.logging.v2.ILogSink - > - ): void; - listSinks( - request: protos.google.logging.v2.IListSinksRequest, - callback: PaginationCallback< - protos.google.logging.v2.IListSinksRequest, - protos.google.logging.v2.IListSinksResponse | null | undefined, - protos.google.logging.v2.ILogSink - > - ): void; /** * Lists sinks. * @@ -2838,9 +2765,36 @@ export class ConfigServiceV2Client { * We recommend using `listSinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listSinks( + request?: protos.google.logging.v2.IListSinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogSink[], + protos.google.logging.v2.IListSinksRequest | null, + protos.google.logging.v2.IListSinksResponse + ] + >; + listSinks( + request: protos.google.logging.v2.IListSinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListSinksRequest, + protos.google.logging.v2.IListSinksResponse | null | undefined, + protos.google.logging.v2.ILogSink + > + ): void; + listSinks( + request: protos.google.logging.v2.IListSinksRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListSinksRequest, + protos.google.logging.v2.IListSinksResponse | null | undefined, + protos.google.logging.v2.ILogSink + > + ): void; listSinks( request?: protos.google.logging.v2.IListSinksRequest, optionsOrCallback?: @@ -2910,7 +2864,7 @@ export class ConfigServiceV2Client { * We recommend using `listSinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listSinksStream( @@ -2925,7 +2879,8 @@ export class ConfigServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listSinks']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSinks.createStream( this.innerApiCalls.listSinks as gax.GaxCall, @@ -2959,20 +2914,15 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * [LogSink]{@link google.logging.v2.LogSink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * ``` - * const iterable = client.listSinksAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` + * @example include:samples/generated/v2/config_service_v2.list_sinks.js + * region_tag:logging_v2_generated_ConfigServiceV2_ListSinks_async */ listSinksAsync( request?: protos.google.logging.v2.IListSinksRequest, @@ -2986,8 +2936,8 @@ export class ConfigServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listSinks']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSinks.asyncIterate( this.innerApiCalls['listSinks'] as GaxCall, @@ -2995,33 +2945,6 @@ export class ConfigServiceV2Client { callSettings ) as AsyncIterable; } - listExclusions( - request?: protos.google.logging.v2.IListExclusionsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogExclusion[], - protos.google.logging.v2.IListExclusionsRequest | null, - protos.google.logging.v2.IListExclusionsResponse - ] - >; - listExclusions( - request: protos.google.logging.v2.IListExclusionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.logging.v2.IListExclusionsRequest, - protos.google.logging.v2.IListExclusionsResponse | null | undefined, - protos.google.logging.v2.ILogExclusion - > - ): void; - listExclusions( - request: protos.google.logging.v2.IListExclusionsRequest, - callback: PaginationCallback< - protos.google.logging.v2.IListExclusionsRequest, - protos.google.logging.v2.IListExclusionsResponse | null | undefined, - protos.google.logging.v2.ILogExclusion - > - ): void; /** * Lists all the exclusions in a parent resource. * @@ -3053,9 +2976,36 @@ export class ConfigServiceV2Client { * We recommend using `listExclusionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listExclusions( + request?: protos.google.logging.v2.IListExclusionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogExclusion[], + protos.google.logging.v2.IListExclusionsRequest | null, + protos.google.logging.v2.IListExclusionsResponse + ] + >; + listExclusions( + request: protos.google.logging.v2.IListExclusionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListExclusionsRequest, + protos.google.logging.v2.IListExclusionsResponse | null | undefined, + protos.google.logging.v2.ILogExclusion + > + ): void; + listExclusions( + request: protos.google.logging.v2.IListExclusionsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListExclusionsRequest, + protos.google.logging.v2.IListExclusionsResponse | null | undefined, + protos.google.logging.v2.ILogExclusion + > + ): void; listExclusions( request?: protos.google.logging.v2.IListExclusionsRequest, optionsOrCallback?: @@ -3125,7 +3075,7 @@ export class ConfigServiceV2Client { * We recommend using `listExclusionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listExclusionsStream( @@ -3140,7 +3090,8 @@ export class ConfigServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listExclusions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listExclusions.createStream( this.innerApiCalls.listExclusions as gax.GaxCall, @@ -3174,20 +3125,15 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * [LogExclusion]{@link google.logging.v2.LogExclusion}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * ``` - * const iterable = client.listExclusionsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` + * @example include:samples/generated/v2/config_service_v2.list_exclusions.js + * region_tag:logging_v2_generated_ConfigServiceV2_ListExclusions_async */ listExclusionsAsync( request?: protos.google.logging.v2.IListExclusionsRequest, @@ -3201,8 +3147,8 @@ export class ConfigServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listExclusions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listExclusions.asyncIterate( this.innerApiCalls['listExclusions'] as GaxCall, diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 1b8f03d559d..4b4a3516db5 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -70,7 +70,7 @@ export class LoggingServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance| this document}. + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -441,33 +441,6 @@ export class LoggingServiceV2Client { // ------------------- // -- Service calls -- // ------------------- - deleteLog( - request?: protos.google.logging.v2.IDeleteLogRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.logging.v2.IDeleteLogRequest | undefined, - {} | undefined - ] - >; - deleteLog( - request: protos.google.logging.v2.IDeleteLogRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.logging.v2.IDeleteLogRequest | null | undefined, - {} | null | undefined - > - ): void; - deleteLog( - request: protos.google.logging.v2.IDeleteLogRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.logging.v2.IDeleteLogRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Deletes all the log entries in a log. The log reappears if it receives new * entries. Log entries written shortly before the delete operation might not @@ -494,13 +467,38 @@ export class LoggingServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.deleteLog(request); - * ``` + * @example include:samples/generated/v2/logging_service_v2.delete_log.js + * region_tag:logging_v2_generated_LoggingServiceV2_DeleteLog_async */ + deleteLog( + request?: protos.google.logging.v2.IDeleteLogRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | undefined, + {} | undefined + ] + >; + deleteLog( + request: protos.google.logging.v2.IDeleteLogRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteLog( + request: protos.google.logging.v2.IDeleteLogRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.IDeleteLogRequest | null | undefined, + {} | null | undefined + > + ): void; deleteLog( request?: protos.google.logging.v2.IDeleteLogRequest, optionsOrCallback?: @@ -540,33 +538,6 @@ export class LoggingServiceV2Client { this.initialize(); return this.innerApiCalls.deleteLog(request, options, callback); } - writeLogEntries( - request?: protos.google.logging.v2.IWriteLogEntriesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.IWriteLogEntriesResponse, - protos.google.logging.v2.IWriteLogEntriesRequest | undefined, - {} | undefined - ] - >; - writeLogEntries( - request: protos.google.logging.v2.IWriteLogEntriesRequest, - options: CallOptions, - callback: Callback< - protos.google.logging.v2.IWriteLogEntriesResponse, - protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, - {} | null | undefined - > - ): void; - writeLogEntries( - request: protos.google.logging.v2.IWriteLogEntriesRequest, - callback: Callback< - protos.google.logging.v2.IWriteLogEntriesResponse, - protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Writes log entries to Logging. This API method is the * only way to send log entries to Logging. This method @@ -625,14 +596,14 @@ export class LoggingServiceV2Client { * the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the - * {@link https://cloud.google.com/logging/quota-policy| logs retention period} in + * [logs retention period](https://cloud.google.com/logging/quota-policy) in * the past or more than 24 hours in the future will not be available when * calling `entries.list`. However, those log entries can still be [exported * with * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the - * {@link https://cloud.google.com/logging/quota-policy| quota limit} for calls to + * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to * `entries.write`, you should try to include several log entries in this * list, rather than calling this method for each individual log entry. * @param {boolean} [request.partialSuccess] @@ -650,13 +621,38 @@ export class LoggingServiceV2Client { * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * ``` - * const [response] = await client.writeLogEntries(request); - * ``` + * @example include:samples/generated/v2/logging_service_v2.write_log_entries.js + * region_tag:logging_v2_generated_LoggingServiceV2_WriteLogEntries_async */ + writeLogEntries( + request?: protos.google.logging.v2.IWriteLogEntriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | undefined, + {} | undefined + ] + >; + writeLogEntries( + request: protos.google.logging.v2.IWriteLogEntriesRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, + {} | null | undefined + > + ): void; + writeLogEntries( + request: protos.google.logging.v2.IWriteLogEntriesRequest, + callback: Callback< + protos.google.logging.v2.IWriteLogEntriesResponse, + protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, + {} | null | undefined + > + ): void; writeLogEntries( request?: protos.google.logging.v2.IWriteLogEntriesRequest, optionsOrCallback?: @@ -687,6 +683,8 @@ export class LoggingServiceV2Client { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.writeLogEntries(request, options, callback); } @@ -702,49 +700,16 @@ export class LoggingServiceV2Client { * representing [TailLogEntriesRequest]{@link google.logging.v2.TailLogEntriesRequest} for write() method, and * will emit objects representing [TailLogEntriesResponse]{@link google.logging.v2.TailLogEntriesResponse} on 'data' event asynchronously. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) * for more details and examples. - * @example - * ``` - * const stream = client.tailLogEntries(); - * stream.on('data', (response) => { ... }); - * stream.on('end', () => { ... }); - * stream.write(request); - * stream.end(); - * ``` + * @example include:samples/generated/v2/logging_service_v2.tail_log_entries.js + * region_tag:logging_v2_generated_LoggingServiceV2_TailLogEntries_async */ tailLogEntries(options?: CallOptions): gax.CancellableStream { this.initialize(); return this.innerApiCalls.tailLogEntries(options); } - listLogEntries( - request?: protos.google.logging.v2.IListLogEntriesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogEntry[], - protos.google.logging.v2.IListLogEntriesRequest | null, - protos.google.logging.v2.IListLogEntriesResponse - ] - >; - listLogEntries( - request: protos.google.logging.v2.IListLogEntriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.logging.v2.IListLogEntriesRequest, - protos.google.logging.v2.IListLogEntriesResponse | null | undefined, - protos.google.logging.v2.ILogEntry - > - ): void; - listLogEntries( - request: protos.google.logging.v2.IListLogEntriesRequest, - callback: PaginationCallback< - protos.google.logging.v2.IListLogEntriesRequest, - protos.google.logging.v2.IListLogEntriesResponse | null | undefined, - protos.google.logging.v2.ILogEntry - > - ): void; /** * Lists log entries. Use this method to retrieve log entries that originated * from a project/folder/organization/billing account. For ways to export log @@ -804,9 +769,36 @@ export class LoggingServiceV2Client { * We recommend using `listLogEntriesAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listLogEntries( + request?: protos.google.logging.v2.IListLogEntriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogEntry[], + protos.google.logging.v2.IListLogEntriesRequest | null, + protos.google.logging.v2.IListLogEntriesResponse + ] + >; + listLogEntries( + request: protos.google.logging.v2.IListLogEntriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListLogEntriesRequest, + protos.google.logging.v2.IListLogEntriesResponse | null | undefined, + protos.google.logging.v2.ILogEntry + > + ): void; + listLogEntries( + request: protos.google.logging.v2.IListLogEntriesRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListLogEntriesRequest, + protos.google.logging.v2.IListLogEntriesResponse | null | undefined, + protos.google.logging.v2.ILogEntry + > + ): void; listLogEntries( request?: protos.google.logging.v2.IListLogEntriesRequest, optionsOrCallback?: @@ -837,6 +829,8 @@ export class LoggingServiceV2Client { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.listLogEntries(request, options, callback); } @@ -895,7 +889,7 @@ export class LoggingServiceV2Client { * We recommend using `listLogEntriesAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listLogEntriesStream( @@ -904,7 +898,10 @@ export class LoggingServiceV2Client { ): Transform { request = request || {}; options = options || {}; - const callSettings = new gax.CallSettings(options); + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listLogEntries']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogEntries.createStream( this.innerApiCalls.listLogEntries as gax.GaxCall, @@ -963,20 +960,15 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * [LogEntry]{@link google.logging.v2.LogEntry}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * ``` - * const iterable = client.listLogEntriesAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` + * @example include:samples/generated/v2/logging_service_v2.list_log_entries.js + * region_tag:logging_v2_generated_LoggingServiceV2_ListLogEntries_async */ listLogEntriesAsync( request?: protos.google.logging.v2.IListLogEntriesRequest, @@ -984,8 +976,10 @@ export class LoggingServiceV2Client { ): AsyncIterable { request = request || {}; options = options || {}; - options = options || {}; - const callSettings = new gax.CallSettings(options); + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listLogEntries']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogEntries.asyncIterate( this.innerApiCalls['listLogEntries'] as GaxCall, @@ -993,6 +987,33 @@ export class LoggingServiceV2Client { callSettings ) as AsyncIterable; } + /** + * Lists the descriptors for monitored resource types used by Logging. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} [request.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} [request.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] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMonitoredResourceDescriptorsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listMonitoredResourceDescriptors( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, options?: CallOptions @@ -1024,33 +1045,6 @@ export class LoggingServiceV2Client { protos.google.api.IMonitoredResourceDescriptor > ): void; - /** - * Lists the descriptors for monitored resource types used by Logging. - * - * @param {Object} request - * The request object that will be sent. - * @param {number} [request.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} [request.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] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listMonitoredResourceDescriptorsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} - * for more details and examples. - */ listMonitoredResourceDescriptors( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, optionsOrCallback?: @@ -1085,6 +1079,8 @@ export class LoggingServiceV2Client { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.listMonitoredResourceDescriptors( request, @@ -1115,7 +1111,7 @@ export class LoggingServiceV2Client { * We recommend using `listMonitoredResourceDescriptorsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listMonitoredResourceDescriptorsStream( @@ -1124,7 +1120,11 @@ export class LoggingServiceV2Client { ): Transform { request = request || {}; options = options || {}; - const callSettings = new gax.CallSettings(options); + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = + this._defaults['listMonitoredResourceDescriptors']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listMonitoredResourceDescriptors.createStream( this.innerApiCalls.listMonitoredResourceDescriptors as gax.GaxCall, @@ -1151,20 +1151,15 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * ``` - * const iterable = client.listMonitoredResourceDescriptorsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` + * @example include:samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js + * region_tag:logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async */ listMonitoredResourceDescriptorsAsync( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, @@ -1172,8 +1167,11 @@ export class LoggingServiceV2Client { ): AsyncIterable { request = request || {}; options = options || {}; - options = options || {}; - const callSettings = new gax.CallSettings(options); + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = + this._defaults['listMonitoredResourceDescriptors']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listMonitoredResourceDescriptors.asyncIterate( this.innerApiCalls['listMonitoredResourceDescriptors'] as GaxCall, @@ -1181,33 +1179,6 @@ export class LoggingServiceV2Client { callSettings ) as AsyncIterable; } - listLogs( - request?: protos.google.logging.v2.IListLogsRequest, - options?: CallOptions - ): Promise< - [ - string[], - protos.google.logging.v2.IListLogsRequest | null, - protos.google.logging.v2.IListLogsResponse - ] - >; - listLogs( - request: protos.google.logging.v2.IListLogsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.logging.v2.IListLogsRequest, - protos.google.logging.v2.IListLogsResponse | null | undefined, - string - > - ): void; - listLogs( - request: protos.google.logging.v2.IListLogsRequest, - callback: PaginationCallback< - protos.google.logging.v2.IListLogsRequest, - protos.google.logging.v2.IListLogsResponse | null | undefined, - string - > - ): void; /** * Lists the logs in projects, organizations, folders, or billing accounts. * Only logs that have entries are listed. @@ -1252,9 +1223,36 @@ export class LoggingServiceV2Client { * We recommend using `listLogsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listLogs( + request?: protos.google.logging.v2.IListLogsRequest, + options?: CallOptions + ): Promise< + [ + string[], + protos.google.logging.v2.IListLogsRequest | null, + protos.google.logging.v2.IListLogsResponse + ] + >; + listLogs( + request: protos.google.logging.v2.IListLogsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListLogsRequest, + protos.google.logging.v2.IListLogsResponse | null | undefined, + string + > + ): void; + listLogs( + request: protos.google.logging.v2.IListLogsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListLogsRequest, + protos.google.logging.v2.IListLogsResponse | null | undefined, + string + > + ): void; listLogs( request?: protos.google.logging.v2.IListLogsRequest, optionsOrCallback?: @@ -1336,7 +1334,7 @@ export class LoggingServiceV2Client { * We recommend using `listLogsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listLogsStream( @@ -1351,7 +1349,8 @@ export class LoggingServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listLogs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogs.createStream( this.innerApiCalls.listLogs as gax.GaxCall, @@ -1397,20 +1396,15 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * string. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * ``` - * const iterable = client.listLogsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` + * @example include:samples/generated/v2/logging_service_v2.list_logs.js + * region_tag:logging_v2_generated_LoggingServiceV2_ListLogs_async */ listLogsAsync( request?: protos.google.logging.v2.IListLogsRequest, @@ -1424,8 +1418,8 @@ export class LoggingServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listLogs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogs.asyncIterate( this.innerApiCalls['listLogs'] as GaxCall, diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 94b28f79e10..ac5978ef0e7 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -70,7 +70,7 @@ export class MetricsServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance| this document}. + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -401,6 +401,25 @@ export class MetricsServiceV2Client { // ------------------- // -- Service calls -- // ------------------- + /** + * Gets a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName + * Required. The resource name of the desired metric: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/metrics_service_v2.get_log_metric.js + * region_tag:logging_v2_generated_MetricsServiceV2_GetLogMetric_async + */ getLogMetric( request?: protos.google.logging.v2.IGetLogMetricRequest, options?: CallOptions @@ -428,27 +447,6 @@ export class MetricsServiceV2Client { {} | null | undefined > ): void; - /** - * Gets a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.metricName - * Required. The resource name of the desired metric: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLogMetric(request); - * ``` - */ getLogMetric( request?: protos.google.logging.v2.IGetLogMetricRequest, optionsOrCallback?: @@ -488,6 +486,30 @@ export class MetricsServiceV2Client { this.initialize(); return this.innerApiCalls.getLogMetric(request, options, callback); } + /** + * Creates a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the project in which to create the metric: + * + * "projects/[PROJECT_ID]" + * + * The new metric must be provided in the request. + * @param {google.logging.v2.LogMetric} request.metric + * Required. The new logs-based metric, which must not have an identifier that + * already exists. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/metrics_service_v2.create_log_metric.js + * region_tag:logging_v2_generated_MetricsServiceV2_CreateLogMetric_async + */ createLogMetric( request?: protos.google.logging.v2.ICreateLogMetricRequest, options?: CallOptions @@ -515,32 +537,6 @@ export class MetricsServiceV2Client { {} | null | undefined > ): void; - /** - * Creates a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the project in which to create the metric: - * - * "projects/[PROJECT_ID]" - * - * The new metric must be provided in the request. - * @param {google.logging.v2.LogMetric} request.metric - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.createLogMetric(request); - * ``` - */ createLogMetric( request?: protos.google.logging.v2.ICreateLogMetricRequest, optionsOrCallback?: @@ -580,6 +576,31 @@ export class MetricsServiceV2Client { this.initialize(); return this.innerApiCalls.createLogMetric(request, options, callback); } + /** + * Creates or updates a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName + * Required. The resource name of the metric to update: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * The updated metric must be provided in the request and it's + * `name` field must be the same as `[METRIC_ID]` If the metric + * does not exist in `[PROJECT_ID]`, then a new metric is created. + * @param {google.logging.v2.LogMetric} request.metric + * Required. The updated metric. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/metrics_service_v2.update_log_metric.js + * region_tag:logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async + */ updateLogMetric( request?: protos.google.logging.v2.IUpdateLogMetricRequest, options?: CallOptions @@ -607,33 +628,6 @@ export class MetricsServiceV2Client { {} | null | undefined > ): void; - /** - * Creates or updates a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.metricName - * Required. The resource name of the metric to update: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * @param {google.logging.v2.LogMetric} request.metric - * Required. The updated metric. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.updateLogMetric(request); - * ``` - */ updateLogMetric( request?: protos.google.logging.v2.IUpdateLogMetricRequest, optionsOrCallback?: @@ -673,6 +667,25 @@ export class MetricsServiceV2Client { this.initialize(); return this.innerApiCalls.updateLogMetric(request, options, callback); } + /** + * Deletes a logs-based metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.metricName + * Required. The resource name of the metric to delete: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/metrics_service_v2.delete_log_metric.js + * region_tag:logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async + */ deleteLogMetric( request?: protos.google.logging.v2.IDeleteLogMetricRequest, options?: CallOptions @@ -700,27 +713,6 @@ export class MetricsServiceV2Client { {} | null | undefined > ): void; - /** - * Deletes a logs-based metric. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.metricName - * Required. The resource name of the metric to delete: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods| documentation} - * for more details and examples. - * @example - * ``` - * const [response] = await client.deleteLogMetric(request); - * ``` - */ deleteLogMetric( request?: protos.google.logging.v2.IDeleteLogMetricRequest, optionsOrCallback?: @@ -761,33 +753,6 @@ export class MetricsServiceV2Client { return this.innerApiCalls.deleteLogMetric(request, options, callback); } - listLogMetrics( - request?: protos.google.logging.v2.IListLogMetricsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.logging.v2.ILogMetric[], - protos.google.logging.v2.IListLogMetricsRequest | null, - protos.google.logging.v2.IListLogMetricsResponse - ] - >; - listLogMetrics( - request: protos.google.logging.v2.IListLogMetricsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.logging.v2.IListLogMetricsRequest, - protos.google.logging.v2.IListLogMetricsResponse | null | undefined, - protos.google.logging.v2.ILogMetric - > - ): void; - listLogMetrics( - request: protos.google.logging.v2.IListLogMetricsRequest, - callback: PaginationCallback< - protos.google.logging.v2.IListLogMetricsRequest, - protos.google.logging.v2.IListLogMetricsResponse | null | undefined, - protos.google.logging.v2.ILogMetric - > - ): void; /** * Lists logs-based metrics. * @@ -816,9 +781,36 @@ export class MetricsServiceV2Client { * We recommend using `listLogMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listLogMetrics( + request?: protos.google.logging.v2.IListLogMetricsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogMetric[], + protos.google.logging.v2.IListLogMetricsRequest | null, + protos.google.logging.v2.IListLogMetricsResponse + ] + >; + listLogMetrics( + request: protos.google.logging.v2.IListLogMetricsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListLogMetricsRequest, + protos.google.logging.v2.IListLogMetricsResponse | null | undefined, + protos.google.logging.v2.ILogMetric + > + ): void; + listLogMetrics( + request: protos.google.logging.v2.IListLogMetricsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListLogMetricsRequest, + protos.google.logging.v2.IListLogMetricsResponse | null | undefined, + protos.google.logging.v2.ILogMetric + > + ): void; listLogMetrics( request?: protos.google.logging.v2.IListLogMetricsRequest, optionsOrCallback?: @@ -885,7 +877,7 @@ export class MetricsServiceV2Client { * We recommend using `listLogMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listLogMetricsStream( @@ -900,7 +892,8 @@ export class MetricsServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listLogMetrics']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogMetrics.createStream( this.innerApiCalls.listLogMetrics as gax.GaxCall, @@ -931,20 +924,15 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols| async iteration}. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * [LogMetric]{@link google.logging.v2.LogMetric}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the - * {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination| documentation} + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * ``` - * const iterable = client.listLogMetricsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` + * @example include:samples/generated/v2/metrics_service_v2.list_log_metrics.js + * region_tag:logging_v2_generated_MetricsServiceV2_ListLogMetrics_async */ listLogMetricsAsync( request?: protos.google.logging.v2.IListLogMetricsRequest, @@ -958,8 +946,8 @@ export class MetricsServiceV2Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listLogMetrics']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogMetrics.asyncIterate( this.innerApiCalls['listLogMetrics'] as GaxCall, diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 0d6ee55f807..329be1ec031 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -327,7 +327,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesResponse() ); @@ -350,7 +350,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesResponse() ); @@ -389,7 +389,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.writeLogEntries = stubSimpleCall( undefined, @@ -499,7 +499,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogEntriesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogEntry()), generateSampleMessage(new protos.google.logging.v2.LogEntry()), @@ -524,7 +524,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogEntriesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogEntry()), generateSampleMessage(new protos.google.logging.v2.LogEntry()), @@ -565,7 +565,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogEntriesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.listLogEntries = stubSimpleCall( undefined, @@ -718,7 +718,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage( new protos.google.api.MonitoredResourceDescriptor() @@ -750,7 +750,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage( new protos.google.api.MonitoredResourceDescriptor() @@ -797,7 +797,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCall( undefined, From 147e486e9895118f5ddcef3fcc8faadb27885396 Mon Sep 17 00:00:00 2001 From: minherz Date: Mon, 13 Dec 2021 20:26:34 +0200 Subject: [PATCH 0824/1029] chore: add additional option to populate http request metadata (#1191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: add additional option to populate http request metadata Fixes #1129 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- handwritten/logging/.readme-partials.yml | 10 ++++++++++ handwritten/logging/README.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index dbaf4e1106e..de3ecd64ab8 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -61,3 +61,13 @@ body: |- log.alert(entry); log.warning(entry); ``` + + ## Populating Http request metadata + + Metadata about Http request is a part of the [structured log info](https://cloud.google.com/logging/docs/structured-logging) + that can be captured within each log entry. It can provide a context for the application logs and + is used to group multiple log entries under the load balancer request logs. See the [sample](https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js) + how to populate the Http request metadata for log entries. + + If you already have a "raw" Http `request` object you can assign it to `entry.metadata.httpRequest` directly. More information about + how the `request` is interpreted as raw can be found in the [code](https://github.com/googleapis/nodejs-logging/blob/15849160116a814ab71113138cb211c2e0c2d4b4/src/entry.ts#L224-L238). diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 90305357412..88f8d5b1598 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -153,6 +153,16 @@ log.alert(entry); log.warning(entry); ``` +## Populating Http request metadata + +Metadata about Http request is a part of the [structured log info](https://cloud.google.com/logging/docs/structured-logging) +that can be captured within each log entry. It can provide a context for the application logs and +is used to group multiple log entries under the load balancer request logs. See the [sample](https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js) +how to populate the Http request metadata for log entries. + +If you already have a "raw" Http `request` object you can assign it to `entry.metadata.httpRequest` directly. More information about +how the `request` is interpreted as raw can be found in the [code](https://github.com/googleapis/nodejs-logging/blob/15849160116a814ab71113138cb211c2e0c2d4b4/src/entry.ts#L224-L238). + ## Samples From 24b4129a1ab1b679c439c5153f6bda4541618c3c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 13 Dec 2021 18:36:13 +0000 Subject: [PATCH 0825/1029] chore: release 9.6.4 (#1190) :robot: I have created a release \*beep\* \*boop\* --- ### [9.6.4](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.3...v9.6.4) (2021-12-13) ### Bug Fixes * Correct a comment in sample regarding asynchronous log writing ([#1189](https://www.github.com/googleapis/nodejs-logging/issues/1189)) ([c4abb7e](https://www.github.com/googleapis/nodejs-logging/commit/c4abb7eb1012e5a95d3b68a647a3c2d63d85610f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index bcffcde1324..4432f110d9d 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.4](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.3...v9.6.4) (2021-12-13) + + +### Bug Fixes + +* Correct a comment in sample regarding asynchronous log writing ([#1189](https://www.github.com/googleapis/nodejs-logging/issues/1189)) ([c4abb7e](https://www.github.com/googleapis/nodejs-logging/commit/c4abb7eb1012e5a95d3b68a647a3c2d63d85610f)) + ### [9.6.3](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.2...v9.6.3) (2021-11-08) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3c5397066c6..634527e855e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.3", + "version": "9.6.4", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 72e0b90f9bad8de7413b745548838d6ec2cb16fb Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Mon, 20 Dec 2021 22:13:20 -0500 Subject: [PATCH 0826/1029] fix: update links for TSDoc (#1194) * fix: update links for TSDoc * chore: fix log.write links --- handwritten/logging/src/entry.ts | 6 +++--- handwritten/logging/src/index.ts | 23 ++++++++++++---------- handwritten/logging/src/log-sync.ts | 4 ++-- handwritten/logging/src/log.ts | 30 ++++++++++++++--------------- handwritten/logging/src/sink.ts | 14 +++++++------- 5 files changed, 40 insertions(+), 37 deletions(-) diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index f103f60b8c9..432edbe2c11 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -95,12 +95,12 @@ export interface ToJsonOptions { /** * Create an entry object to define new data to insert into a meta. * - * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} + * Note, {@link https://cloud.google.com/logging/quotas|Cloud Logging Quotas and limits} * dictates that the maximum log entry size, including all * [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, - * cannot exceed _approximately_ 256 KB. + * cannot exceed approximately 256 KB. * - * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry|LogEntry JSON representation} * * @class * diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 8126962b3e9..81f545dfbc4 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -228,8 +228,11 @@ export interface ServiceContext { * @class * * See {@link https://cloud.google.com/logging/docs| What is Cloud Logging?} + * * See {@link https://cloud.google.com/logging/docs/api| Introduction to the Cloud Logging API} + * * See {@link https://www.npmjs.com/package/@google-cloud/logging-bunyan| Logging to Google Cloud from Bunyan} + * * See {@link https://www.npmjs.com/package/@google-cloud/logging-winston| Logging to Google Cloud from Winston} * * @param {ClientConfig} [options] Configuration options. @@ -336,9 +339,9 @@ class Logging { /** * Create a sink. * - * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} - * @see [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} - * @see [projects.sinks.create API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks|Sink Overview} + * See {@link https://cloud.google.com/logging/docs/view/advanced_filters|Advanced Logs Filters} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create|projects.sinks.create API Documentation} * * @param {string} name Name of the sink. * @param {CreateSinkRequest} config Config to set for the sink. @@ -424,12 +427,12 @@ class Logging { * the object returned in other API calls, such as * {@link Log#write}. * - * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} + * Note, {@link https://cloud.google.com/logging/quotas|Cloud Logging Quotas and limits} * dictates that the maximum log entry size, including all * [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, * cannot exceed _approximately_ 256 KB. * - * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry|LogEntry JSON representation} * * @param {?object|?string} [resource] See a * [Monitored @@ -513,7 +516,7 @@ class Logging { /** * List the entries in your logs. * - * @see [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list|entries.list API Documentation} * * @param {GetEntriesRequest} [query] Query object for listing entries. * @param {GetEntriesCallback} [callback] Callback function. @@ -872,7 +875,7 @@ class Logging { /** * List the entries in your logs. * - * @see [logs.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/logs/list} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/logs/list|logs.list API Documentation} * * @param {GetLogsRequest} [query] Query object for listing entries. * @param {GetLogsCallback} [callback] Callback function. @@ -1061,7 +1064,7 @@ class Logging { /** * Get the sinks associated with this project. * - * @see [projects.sinks.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list|projects.sinks.list API Documentation} * * @param {GetSinksRequest} [query] Query object for listing sinks. * @param {GetSinksCallback} [callback] Callback function. @@ -1224,7 +1227,7 @@ class Logging { /** * Get a reference to a Cloud Logging log. * - * @see [Log Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs|Log Overview} * * @param {string} name Name of the existing log. * @param {object} [options] Configuration object. @@ -1270,7 +1273,7 @@ class Logging { /** * Get a reference to a Cloud Logging sink. * - * @see [Sink Overview]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks|Sink Overview} * * @param {string} name Name of the existing sink. * @returns {Sink} diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts index abff8a8ed19..31b9b0802eb 100644 --- a/handwritten/logging/src/log-sync.ts +++ b/handwritten/logging/src/log-sync.ts @@ -40,7 +40,7 @@ import { * Recommended for Serverless environment logging, especially where async log * calls made by the `Log` class can be dropped by the CPU. * - * @see [Structured Logging]{@link https://cloud.google.com/logging/docs/structured-logging} + * See {@link https://cloud.google.com/logging/docs/structured-logging|Structured Logging} * * @class * @@ -193,7 +193,7 @@ class LogSync implements LogSeverityFunctions { * * Using this method will not itself do any logging. * - * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry|LogEntry JSON representation} * * @param {?object} metadata See a * [LogEntry diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 796dc7554c9..d10efd373bc 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -76,7 +76,7 @@ export type DeleteCallback = ApiResponseCallback; * produced by the Apache Web Server, but the log * `compute.googleapis.com/activity_log` is produced by Google Compute Engine. * - * @see [Introduction to Logs]{@link https://cloud.google.com/logging/docs/basic-concepts#logs} + * See {@link https://cloud.google.com/logging/docs/basic-concepts#logs|Introduction to Logs} * * @class * @@ -117,7 +117,7 @@ class Log implements LogSeverityFunctions { /** * Write a log entry with a severity of "ALERT". * - * This is a simple wrapper around {@link Log#write}. All arguments are + * This is a simple wrapper around {@link Log.write|Log.write}. All arguments are * the same as documented there. * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. @@ -164,7 +164,7 @@ class Log implements LogSeverityFunctions { /** * Write a log entry with a severity of "CRITICAL". * - * This is a simple wrapper around {@link Log#write}. All arguments are + * This is a simple wrapper around {@link Log.write|Log.write}. All arguments are * the same as documented there. * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. @@ -214,7 +214,7 @@ class Log implements LogSeverityFunctions { /** * Write a log entry with a severity of "DEBUG". * - * This is a simple wrapper around {@link Log#write}. All arguments are + * This is a simple wrapper around {@link Log.write|Log.write}. All arguments are * the same as documented there. * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. @@ -270,7 +270,7 @@ class Log implements LogSeverityFunctions { /** * Delete the log. * - * @see [projects.logs.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete|projects.logs.delete API Documentation} * * @param {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. @@ -321,7 +321,7 @@ class Log implements LogSeverityFunctions { /** * Write a log entry with a severity of "EMERGENCY". * - * This is a simple wrapper around {@link Log#write}. All arguments are + * This is a simple wrapper around {@link Log.write|Log.write}. All arguments are * the same as documented there. * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. @@ -371,12 +371,12 @@ class Log implements LogSeverityFunctions { * the object returned in other API calls, such as * {@link Log#write}. * - * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} + * Note, {@link https://cloud.google.com/logging/quotas|Cloud Logging Quotas and limits} * dictates that the maximum log entry size, including all * [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, * cannot exceed _approximately_ 256 KB. * - * @see [LogEntry JSON representation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry|LogEntry JSON representation} * * @param {?object} metadata See a * [LogEntry @@ -444,7 +444,7 @@ class Log implements LogSeverityFunctions { /** * Write a log entry with a severity of "ERROR". * - * This is a simple wrapper around {@link Log#write}. All arguments are + * This is a simple wrapper around {@link Log.write|Log.write}. All arguments are * the same as documented there. * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. @@ -492,7 +492,7 @@ class Log implements LogSeverityFunctions { * This method is a wrapper around {module:logging#getEntries}, but with a * filter specified to only return entries from this log. * - * @see [entries.list API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list|entries.list API Documentation} * * @param {GetEntriesRequest} [query] Query object for listing entries. * @param {GetEntriesCallback} [callback] Callback function. @@ -644,7 +644,7 @@ class Log implements LogSeverityFunctions { /** * Write a log entry with a severity of "INFO". * - * This is a simple wrapper around {@link Log#write}. All arguments are + * This is a simple wrapper around {@link Log.write|Log.write}. All arguments are * the same as documented there. * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. @@ -691,7 +691,7 @@ class Log implements LogSeverityFunctions { /** * Write a log entry with a severity of "NOTICE". * - * This is a simple wrapper around {@link Log#write}. All arguments are + * This is a simple wrapper around {@link Log.write|Log.write}. All arguments are * the same as documented there. * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. @@ -738,7 +738,7 @@ class Log implements LogSeverityFunctions { /** * Write a log entry with a severity of "WARNING". * - * This is a simple wrapper around {@link Log#write}. All arguments are + * This is a simple wrapper around {@link Log.write|Log.write}. All arguments are * the same as documented there. * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. @@ -809,12 +809,12 @@ class Log implements LogSeverityFunctions { /** * Write log entries to Cloud Logging. * - * Note, [Cloud Logging Quotas and limits]{@link https://cloud.google.com/logging/quotas} + * Note, {@link https://cloud.google.com/logging/quotas|Cloud Logging Quotas and limits} * dictates that the maximum cumulative size of all entries per write, * including all [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, * cannot exceed _approximately_ 10 MB. * - * @see [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write|entries.write API Documentation} * * @param {Entry|Entry[]} entry A log entry, or array of entries, to write. * @param {?WriteOptions} [options] Write options diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 338c8e6abbc..2fd5bbcc398 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -46,7 +46,7 @@ export interface SetSinkMetadata extends LogSink { * storage), Google BigQuery datasets (for log analysis), Google Pub/Sub (for * streaming to other applications). * - * @see [Introduction to Sinks]{@link https://cloud.google.com/logging/docs/basic-concepts#sinks} + * See {@link https://cloud.google.com/logging/docs/basic-concepts#sinks|Introduction to Sinks} * * @class * @@ -133,7 +133,7 @@ class Sink { /** * Delete the sink. * - * @see [projects.sink.delete API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete|projects.sink.delete API Documentation} * * @param {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. @@ -195,8 +195,8 @@ class Sink { /** * Get the sink's metadata. * - * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} - * @see [projects.sink.get API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink|Sink Resource} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get|projects.sink.get API Documentation} * * @param {object} [gaxOptions] Request configuration options, outlined * here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions. @@ -256,7 +256,7 @@ class Sink { * * This will override any filter that was previously set. * - * @see [Advanced Logs Filters]{@link https://cloud.google.com/logging/docs/view/advanced_filters} + * See {@link https://cloud.google.com/logging/docs/view/advanced_filters|Advanced Logs Filters} * * @param {string} filter The new filter. * @param {SetSinkFilterCallback} [callback] Callback function. @@ -305,8 +305,8 @@ class Sink { * uniqueWriterIdentity = true. Read more about using a unique writer identity * here: https://cloud.google.com/logging/docs/api/tasks/exporting-logs#using_a_unique_writer_identity * - * @see [Sink Resource]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink} - * @see [projects.sink.update API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks#LogSink|Sink Resource} + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update|projects.sink.update API Documentation} * * @param {object} metadata See a * [Sink From 897fb6e6685deff16206fd6f2ddc7c81aa5bb507 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 03:24:14 +0000 Subject: [PATCH 0827/1029] chore: release 9.6.5 (#1195) :robot: I have created a release \*beep\* \*boop\* --- ### [9.6.5](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.4...v9.6.5) (2021-12-21) ### Bug Fixes * update links for TSDoc ([#1194](https://www.github.com/googleapis/nodejs-logging/issues/1194)) ([b66e158](https://www.github.com/googleapis/nodejs-logging/commit/b66e1580f958e4213e3eecbbceaae2c5ded7e14d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 4432f110d9d..ea93bb8b6f3 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.5](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.4...v9.6.5) (2021-12-21) + + +### Bug Fixes + +* update links for TSDoc ([#1194](https://www.github.com/googleapis/nodejs-logging/issues/1194)) ([b66e158](https://www.github.com/googleapis/nodejs-logging/commit/b66e1580f958e4213e3eecbbceaae2c5ded7e14d)) + ### [9.6.4](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.3...v9.6.4) (2021-12-13) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 634527e855e..95cd24d77a9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.4", + "version": "9.6.5", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 468163f1d2bfcd02c78bb5f9f01d14e8681e4c0a Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 22 Dec 2021 15:01:25 -0500 Subject: [PATCH 0828/1029] fix: update links for TSDoc (#1197) --- handwritten/logging/src/entry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 432edbe2c11..081d74b1611 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -97,7 +97,7 @@ export interface ToJsonOptions { * * Note, {@link https://cloud.google.com/logging/quotas|Cloud Logging Quotas and limits} * dictates that the maximum log entry size, including all - * [LogEntry Resource properties]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry}, + * {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry|LogEntry Resource properties}, * cannot exceed approximately 256 KB. * * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry|LogEntry JSON representation} From 712ac46f3cef3a83d29b3cb568ad92007dcb9203 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 22 Dec 2021 20:12:11 +0000 Subject: [PATCH 0829/1029] chore: release 9.6.6 (#1198) :robot: I have created a release \*beep\* \*boop\* --- ### [9.6.6](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.5...v9.6.6) (2021-12-22) ### Bug Fixes * update links for TSDoc ([#1197](https://www.github.com/googleapis/nodejs-logging/issues/1197)) ([154dffc](https://www.github.com/googleapis/nodejs-logging/commit/154dffc6197d6be711b8186ed81efa3f7512714d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ea93bb8b6f3..8d2315d3432 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.6](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.5...v9.6.6) (2021-12-22) + + +### Bug Fixes + +* update links for TSDoc ([#1197](https://www.github.com/googleapis/nodejs-logging/issues/1197)) ([154dffc](https://www.github.com/googleapis/nodejs-logging/commit/154dffc6197d6be711b8186ed81efa3f7512714d)) + ### [9.6.5](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.4...v9.6.5) (2021-12-21) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 95cd24d77a9..0d78b7efd77 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.5", + "version": "9.6.6", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From a07ad5ff0ea6714d78cfa0534c746cbd21735d10 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Fri, 24 Dec 2021 15:33:07 -0800 Subject: [PATCH 0830/1029] fix: Setting maxEntrySize does not truncate big json payloads correctly (#1177) * fix: Setting maxEntrySize does not truncate big json payloads correctly * Change variable names * Add more validations and adjust test * Address PR comments * Fix msg check to validate null and undefined --- handwritten/logging/src/log.ts | 50 +++++++++++++++++++++++-------- handwritten/logging/test/entry.ts | 2 +- handwritten/logging/test/index.ts | 1 + handwritten/logging/test/log.ts | 50 ++++++++++++++++++++++++++++++- 4 files changed, 89 insertions(+), 14 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index d10efd373bc..8db5cd8d038 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -59,6 +59,7 @@ export interface TailEntriesRequest { export interface LogOptions { removeCircular?: boolean; maxEntrySize?: number; // see: https://cloud.google.com/logging/quotas + jsonFieldsToTruncate?: string[]; } // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -86,6 +87,8 @@ export type DeleteCallback = ApiResponseCallback; * @param {boolean} [options.removeCircular] Replace circular references in * logged objects with a string value, `[Circular]`. (Default: false) * @param {number} [options.maxEntrySize] A max entry size + * @param {string[]} [options.jsonFieldsToTruncate] A list of JSON properties at the given full path to be truncated. + * Received values will be prepended to predefined list in the order received and duplicates discarded. * * @example * ``` @@ -100,6 +103,7 @@ class Log implements LogSeverityFunctions { maxEntrySize?: number; logging: Logging; name: string; + jsonFieldsToTruncate: string[]; constructor(logging: Logging, name: string, options?: LogOptions) { options = options || {}; @@ -112,6 +116,35 @@ class Log implements LogSeverityFunctions { * @type {string} */ this.name = this.formattedName_.split('/').pop()!; + this.jsonFieldsToTruncate = [ + // Winston: + 'jsonPayload.fields.metadata.structValue.fields.stack.stringValue', + // Bunyan: + 'jsonPayload.fields.msg.stringValue', + 'jsonPayload.fields.err.structValue.fields.stack.stringValue', + 'jsonPayload.fields.err.structValue.fields.message.stringValue', + // All: + 'jsonPayload.fields.message.stringValue', + ]; + + // Prepend all custom fields to be truncated to a list with defaults, thus + // custom fields will be truncated first. Make sure to filter out fields + // which are not in EntryJson.jsonPayload + if ( + options.jsonFieldsToTruncate !== null && + options.jsonFieldsToTruncate !== undefined + ) { + const filteredList = options.jsonFieldsToTruncate.filter( + str => + str !== null && + !this.jsonFieldsToTruncate.includes(str) && + str.startsWith('jsonPayload') + ); + const uniqueSet = new Set(filteredList); + this.jsonFieldsToTruncate = Array.from(uniqueSet).concat( + this.jsonFieldsToTruncate + ); + } } /** @@ -988,25 +1021,18 @@ class Log implements LogSeverityFunctions { Math.max(entry.textPayload.length - delta, 0) ); } else { - const fieldsToTruncate = [ - // Winston: - 'jsonPayload.fields.metadata.structValue.fields.stack.stringValue', - // Bunyan: - 'jsonPayload.fields.msg.stringValue', - 'jsonPayload.fields.err.structValue.fields.stack.stringValue', - 'jsonPayload.fields.err.structValue.fields.message.stringValue', - // All: - 'jsonPayload.fields.message.stringValue', - ]; - for (const field of fieldsToTruncate) { + for (const field of this.jsonFieldsToTruncate) { const msg: string = dotProp.get(entry, field, ''); - if (msg !== '') { + if (msg !== null && msg !== undefined && msg !== '') { dotProp.set( entry, field, msg.slice(0, Math.max(msg.length - delta, 0)) ); delta -= Math.min(msg.length, delta); + if (delta <= 0) { + break; + } } } } diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 9df00acfa89..f1c5da9228c 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -362,7 +362,7 @@ describe('Entry', () => { headers: { ['x-cloud-trace-context']: '1/1', }, - } as any as http.IncomingMessage; + } as unknown as http.IncomingMessage; const json = entry.toStructuredJSON(); assert.strictEqual(json[entryTypes.TRACE_KEY], 'projects//traces/1'); assert.strictEqual(json[entryTypes.SPAN_ID_KEY], '1'); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 3e17eec432b..f28553bcd86 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -1772,6 +1772,7 @@ describe('Logging', () => { logging = new Logging(); sinon.stub(metadata, 'getDefaultResource').resolves({type: 'bar'}); await logging.setDetectedResource(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.strictEqual((logging.detectedResource as any).type, 'bar'); sinon.restore(); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 8da1c9c2f11..863f05f79db 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -31,6 +31,9 @@ describe('Log', () => { const PROJECT_ID = 'project-id'; const FAKE_RESOURCE = 'fake-resource'; const LOG_NAME = 'escaping/required/for/this/log-name'; + const TRUNCATE_FIELD = + 'jsonPayload.fields.metadata.structValue.fields.custom.stringValue'; + const INVALID_TRUNCATE_FIELD = 'insertId'; const LOG_NAME_ENCODED = encodeURIComponent(LOG_NAME); const LOG_NAME_FORMATTED = [ 'projects', @@ -95,7 +98,17 @@ describe('Log', () => { }, } as {} as Logging; - const options: LogOptions = {}; + // Add some custom defined field to truncate which can be tested later - the idea is to + // see that constructor works properly and provides correct order of fields to be truncated. + // Also append same value twice to make sure that duplicates should be discarded. + // Adding illegal field to be truncated should be discared as well + const options: LogOptions = { + jsonFieldsToTruncate: [ + INVALID_TRUNCATE_FIELD, + TRUNCATE_FIELD, + TRUNCATE_FIELD, + ], + }; if (maxEntrySize) { options.maxEntrySize = maxEntrySize; } @@ -633,6 +646,41 @@ describe('Log', () => { assert.ok(message.startsWith('hello world')); assert.ok(message.length < maxSize + entryMetaMaxLength); }); + + it('should not contin duplicate or illegal fields to be truncated and defaults should present', async () => { + assert.ok(log.jsonFieldsToTruncate.length > 1); + assert.ok(log.jsonFieldsToTruncate[0] === TRUNCATE_FIELD); + const notExists = log.jsonFieldsToTruncate.filter( + (str: string) => str === INVALID_TRUNCATE_FIELD + ); + assert.strictEqual(notExists.length, 0); + const existOnce = log.jsonFieldsToTruncate.filter( + (str: string) => str === TRUNCATE_FIELD + ); + assert.strictEqual(existOnce.length, 1); + }); + + it('should truncate custom defined field', async () => { + const maxSize = 300; + const entries = entriesFactory({ + message: 'hello world'.padEnd(2000, '.'), + metadata: { + custom: 'custom world'.padEnd(2000, '.'), + }, + }); + + log.maxEntrySize = maxSize; + log.truncateEntries(entries); + + const message: string = + entries[0].jsonPayload!.fields!.message.stringValue!; + const custom: string = + entries[0].jsonPayload!.fields!.metadata.structValue!.fields!.custom + .stringValue!; + assert.ok(message.startsWith('hello world')); + assert.strictEqual(custom, ''); + assert.ok(message.length < maxSize + entryMetaMaxLength); + }); }); describe('severity shortcuts', () => { From a2a0416bd8324a0e7ca95f1eeed9382f559274c0 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Wed, 29 Dec 2021 10:52:35 -0800 Subject: [PATCH 0831/1029] Enable staleness and pull request size bots on repository (#1202) --- handwritten/logging/.github/auto-label.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 handwritten/logging/.github/auto-label.yaml diff --git a/handwritten/logging/.github/auto-label.yaml b/handwritten/logging/.github/auto-label.yaml new file mode 100644 index 00000000000..1e4706499b3 --- /dev/null +++ b/handwritten/logging/.github/auto-label.yaml @@ -0,0 +1,7 @@ +product: true +requestsize: + enabled: true +staleness: + pullrequest: true + old: 30 + extraold: 60 From 534df1abf4e4ab4524211aff041ea8e0c114d3e0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 20:14:19 +0000 Subject: [PATCH 0832/1029] docs(node): support "stable"/"preview" release level (#1312) (#1203) --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/README.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 8d0a479d477..1b6a76cc483 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:bbb8dd6576ac58830a07fc17e9511ae898be44f2219d3344449b125df9854441 + digest: sha256:5ed10ba99cd1ea8c3a0f29b4c53e8a2723a101952705baed6b61783111c64c1c diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 88f8d5b1598..e1258cf23b8 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -217,6 +217,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 503c631569e3849d34ece91a3938d67c797b4425 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:14:19 +0000 Subject: [PATCH 0833/1029] docs(badges): tweak badge to use new preview/stable language (#1314) (#1204) --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/README.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 1b6a76cc483..497345b83de 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:5ed10ba99cd1ea8c3a0f29b4c53e8a2723a101952705baed6b61783111c64c1c + digest: sha256:f092066de33d4a2a13ab13c8fa9dcb4f6b96fa1fb7d391bf19cd0c4921d997c0 diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index e1258cf23b8..cdcc5be218f 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -6,7 +6,6 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-logging/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-logging) From 658e9865300eb59ada14616908c24c348da8eee1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:02:22 +0000 Subject: [PATCH 0834/1029] test(nodejs): remove 15 add 16 (#1322) (#1206) --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/protos/protos.d.ts | 2 +- handwritten/logging/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 497345b83de..6831fd8e18c 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:f092066de33d4a2a13ab13c8fa9dcb4f6b96fa1fb7d391bf19cd0c4921d997c0 + digest: sha256:3563b6b264989c4f5aa31a3682e4df36c95756cfef275d3201508947cbfc511e diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 768c579c9a1..bc6c56770bd 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 04d5a3b788e..efe610dbb34 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 9a1b5b25069206062d76bb0f0a5acd87ceb78a72 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 12:17:57 -0800 Subject: [PATCH 0835/1029] chore(main): release 9.6.7 (#1210) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 8d2315d3432..53b3bdf7e94 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.7](https://github.com/googleapis/nodejs-logging/compare/v9.6.6...v9.6.7) (2022-01-11) + + +### Bug Fixes + +* Setting maxEntrySize does not truncate big json payloads correctly ([#1177](https://github.com/googleapis/nodejs-logging/issues/1177)) ([ec66e4d](https://github.com/googleapis/nodejs-logging/commit/ec66e4dc96a89259852688d395e647e9a019089d)) + ### [9.6.6](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.5...v9.6.6) (2021-12-22) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0d78b7efd77..b71891ab340 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.6", + "version": "9.6.7", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 7af0e0ea6d263cbe5539f130c99df4d0a0f2da45 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 13 Jan 2022 11:44:12 -0500 Subject: [PATCH 0836/1029] chore: add api_shortname and library_type to repo metadata (#1201) Update .repo-metadata.json as required by go/library-data-integrity --- handwritten/logging/.repo-metadata.json | 6 ++++-- handwritten/logging/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json index 19be8cc7eba..4439cef8e66 100644 --- a/handwritten/logging/.repo-metadata.json +++ b/handwritten/logging/.repo-metadata.json @@ -3,12 +3,14 @@ "product_documentation": "https://cloud.google.com/logging/docs", "name": "logging", "codeowner_team": "@googleapis/api-logging", - "release_level": "ga", + "release_level": "stable", "language": "nodejs", "api_id": "logging.googleapis.com", "distribution_name": "@google-cloud/logging", "repo": "googleapis/nodejs-logging", "issue_tracker": "https://issuetracker.google.com/savedsearches/559764", "name_pretty": "Cloud Logging", - "default_version": "v2" + "default_version": "v2", + "api_shortname": "logging", + "library_type": "GAPIC_COMBO" } diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index cdcc5be218f..a9963286ebc 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -4,7 +4,7 @@ # [Cloud Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) @@ -206,10 +206,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -217,7 +217,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From a694c7a387aaa22d8c62af6c6f979afaa80fc8d1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 13 Jan 2022 19:24:10 +0000 Subject: [PATCH 0837/1029] chore: update github issue templates (#1085) (#1213) --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- .../logging/.github/ISSUE_TEMPLATE/bug_report.md | 2 +- .../logging/.github/ISSUE_TEMPLATE/config.yml | 4 ++++ .../.github/ISSUE_TEMPLATE/feature_request.md | 2 +- .../logging/.github/ISSUE_TEMPLATE/question.md | 12 ++++++++++++ 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/config.yml create mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/question.md diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 6831fd8e18c..cbbb175848c 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:3563b6b264989c4f5aa31a3682e4df36c95756cfef275d3201508947cbfc511e + digest: sha256:2d850512335d7adca3a4b08e02f8e63192978aea88c042dacb3e382aa996ae7c diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md b/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md index b262497bf53..7f65b7b5b69 100644 --- a/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md +++ b/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,7 @@ --- name: Bug report about: Create a report to help us improve - +labels: 'type: bug, priority: p2' --- Thanks for stopping by to let us know something could be better! diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/config.yml b/handwritten/logging/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..603b90133b6 --- /dev/null +++ b/handwritten/logging/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,4 @@ +contact_links: + - name: Google Cloud Support + url: https://cloud.google.com/support/ + about: If you have a support contract with Google, please use the Google Cloud Support portal. diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md b/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md index 6365857f33c..b0327dfa02e 100644 --- a/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md +++ b/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,7 @@ --- name: Feature request about: Suggest an idea for this library - +labels: 'type: feature request, priority: p3' --- Thanks for stopping by to let us know something could be better! diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/question.md b/handwritten/logging/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000000..97323113911 --- /dev/null +++ b/handwritten/logging/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,12 @@ +--- +name: Question +about: Ask a question +labels: 'type: question, priority: p3' +--- + +Thanks for stopping by to ask us a question! Please make sure to include: +- What you're trying to do +- What code you've already tried +- Any error messages you're getting + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. From b18a46cdce2df9c87af88341768b8242eb67f48a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 18 Jan 2022 11:00:02 -0800 Subject: [PATCH 0838/1029] chore: release 9.6.7 (#1200) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 53b3bdf7e94..ed97b1ef3fa 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -4,12 +4,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions + ### [9.6.7](https://github.com/googleapis/nodejs-logging/compare/v9.6.6...v9.6.7) (2022-01-11) ### Bug Fixes -* Setting maxEntrySize does not truncate big json payloads correctly ([#1177](https://github.com/googleapis/nodejs-logging/issues/1177)) ([ec66e4d](https://github.com/googleapis/nodejs-logging/commit/ec66e4dc96a89259852688d395e647e9a019089d)) +* Setting maxEntrySize does not truncate big json payloads correctly ([#1177](https://www.github.com/googleapis/nodejs-logging/issues/1177)) ([ec66e4d](https://www.github.com/googleapis/nodejs-logging/commit/ec66e4dc96a89259852688d395e647e9a019089d)) + ### [9.6.6](https://www.github.com/googleapis/nodejs-logging/compare/v9.6.5...v9.6.6) (2021-12-22) From b8453d84b860b59a71fb66ecd853d11dba6c18dd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:46:51 -0800 Subject: [PATCH 0839/1029] chore(deps): upgrade gapic-generator-java to 2.4.1 (#1215) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): upgrade gapic-generator-java to 2.4.1 PiperOrigin-RevId: 422607515 Source-Link: https://github.com/googleapis/googleapis/commit/ba2ffd6fe6642e28b4fed2ffae217b4c5f084034 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73ba4add239a619da567ffbd4e5730fdd6de04d3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- handwritten/logging/.jsdoc.js | 4 ++-- handwritten/logging/src/v2/config_service_v2_client.ts | 2 +- handwritten/logging/src/v2/index.ts | 2 +- handwritten/logging/src/v2/logging_service_v2_client.ts | 2 +- handwritten/logging/src/v2/metrics_service_v2_client.ts | 2 +- handwritten/logging/system-test/install.ts | 2 +- handwritten/logging/test/gapic_config_service_v2_v2.ts | 2 +- handwritten/logging/test/gapic_logging_service_v2_v2.ts | 2 +- handwritten/logging/test/gapic_metrics_service_v2_v2.ts | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 24e747ed4ea..4f21ce13da9 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/logging', diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 4d42b37a406..d7fdc2a4fad 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/index.ts b/handwritten/logging/src/v2/index.ts index de15e10c276..18cb03a6178 100644 --- a/handwritten/logging/src/v2/index.ts +++ b/handwritten/logging/src/v2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 4b4a3516db5..78927ee64b3 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index ac5978ef0e7..49d9eaf734f 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index fa631857603..5c29dd671ae 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 329be1ec031..5d285f7de4a 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 935fc61d00c..3bf3b917769 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 93bf964f00a0cecc46c3598239ac826befe74d34 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Jan 2022 17:45:46 +0200 Subject: [PATCH 0840/1029] build(node): switch back to keystore for publication (#1328) (#1216) Source-Link: https://github.com/googleapis/synthtool/commit/89dd35d6f194f0ab2b5a26b5834a3c91392a2e08 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:89c5b2f3decec8ad64febbebea671076c119d1ab43700da380846a315600de8a Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- handwritten/logging/.kokoro/publish.sh | 2 +- handwritten/logging/.kokoro/release/publish.cfg | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index cbbb175848c..2c37ca7a7b2 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:2d850512335d7adca3a4b08e02f8e63192978aea88c042dacb3e382aa996ae7c + digest: sha256:89c5b2f3decec8ad64febbebea671076c119d1ab43700da380846a315600de8a diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh index 4db6bf1c7f5..77a5defb2b5 100755 --- a/handwritten/logging/.kokoro/publish.sh +++ b/handwritten/logging/.kokoro/publish.sh @@ -24,7 +24,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source / cd $(dirname $0)/.. -NPM_TOKEN=$(cat $KOKORO_GFILE_DIR/secret_manager/npm_publish_token) +NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-npm-token-1) echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc npm install diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 55af02b1a9b..49297cc099d 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -7,9 +7,18 @@ before_action { } } +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google-cloud-npm-token-1" + } + } +} + env_vars: { key: "SECRET_MANAGER_KEYS" - value: "npm_publish_token,releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } # Download trampoline resources. From 3f4652efb8d4ab00f6d01a73ed3cd1198dca9bfb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 20 Jan 2022 01:04:24 +0100 Subject: [PATCH 0841/1029] chore(deps): update dependency gts to v3 (#1208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency gts to v3 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Fix hasOwnProperty related lint error * Fix hasOwnProperty lint error Co-authored-by: Owl Bot Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- handwritten/logging/src/log-sync.ts | 6 +++++- handwritten/logging/src/log.ts | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b71891ab340..58b36b08e44 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "bignumber.js": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", - "gts": "^2.0.0", + "gts": "^3.0.0", "http2spy": "^2.0.0", "jsdoc": "^3.6.3", "jsdoc-fresh": "^1.0.2", diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts index 31b9b0802eb..05f2b3f6e31 100644 --- a/handwritten/logging/src/log-sync.ts +++ b/handwritten/logging/src/log-sync.ts @@ -228,7 +228,11 @@ class LogSync implements LogSeverityFunctions { entry(metadata?: LogEntry, data?: string | {}): Entry; entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; - if (!data && metadataOrData?.hasOwnProperty('httpRequest')) { + if ( + !data && + metadataOrData !== null && + Object.prototype.hasOwnProperty.call(metadataOrData, 'httpRequest') + ) { // If user logs entry(metadata.httpRequest) metadata = metadataOrData as LogEntry; data = {}; diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 8db5cd8d038..2074f93c41d 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -459,7 +459,11 @@ class Log implements LogSeverityFunctions { entry(metadata?: LogEntry, data?: string | {}): Entry; entry(metadataOrData?: LogEntry | string | {}, data?: string | {}) { let metadata: LogEntry; - if (!data && metadataOrData?.hasOwnProperty('httpRequest')) { + if ( + !data && + metadataOrData !== null && + Object.prototype.hasOwnProperty.call(metadataOrData, 'httpRequest') + ) { // If user logs entry(metadata.httpRequest) metadata = metadataOrData as LogEntry; data = {}; From 23fd19d7bafcdc09a9c55ca74eb73e54562bdb82 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Fri, 21 Jan 2022 13:11:56 -0800 Subject: [PATCH 0842/1029] fix: log.write removed option.resource.labels (#1219) * fix: log.write removed option.resource.labels * Add test for capital upper case letter --- handwritten/logging/src/utils/log-common.ts | 10 ++++++++-- handwritten/logging/test/utils/log-common.ts | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/utils/log-common.ts b/handwritten/logging/src/utils/log-common.ts index a85fe33c6ae..ab4798609ef 100644 --- a/handwritten/logging/src/utils/log-common.ts +++ b/handwritten/logging/src/utils/log-common.ts @@ -57,12 +57,18 @@ export function snakecaseKeys( labels: {[p: string]: string} | null | undefined ) { for (const key in labels) { + const replaced = key.replace( + /[A-Z]/g, + letter => `_${letter.toLowerCase()}` + ); Object.defineProperty( labels, - key.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`), + replaced, Object.getOwnPropertyDescriptor(labels, key) as PropertyDescriptor ); - delete labels[key]; + if (replaced !== key) { + delete labels[key]; + } } return labels; } diff --git a/handwritten/logging/test/utils/log-common.ts b/handwritten/logging/test/utils/log-common.ts index 7ee8b073711..53cf5b87997 100644 --- a/handwritten/logging/test/utils/log-common.ts +++ b/handwritten/logging/test/utils/log-common.ts @@ -99,11 +99,15 @@ describe('Log Common', () => { const labels = { projectId: 'id', fooBarBaz: 'foobar', + some_other: 'value', + AnotherOne: 'another', }; const result = snakecaseKeys(labels); assert.deepStrictEqual(result, { project_id: 'id', foo_bar_baz: 'foobar', + some_other: 'value', + _another_one: 'another', }); }); }); From 8ad4f1423d521af37f2fdb633c4ac91ac8dbcc9d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 21 Jan 2022 14:12:37 -0800 Subject: [PATCH 0843/1029] chore(main): release 9.6.8 (#1220) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ed97b1ef3fa..ad804c9d042 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.8](https://github.com/googleapis/nodejs-logging/compare/v9.6.7...v9.6.8) (2022-01-21) + + +### Bug Fixes + +* log.write removed option.resource.labels ([#1219](https://github.com/googleapis/nodejs-logging/issues/1219)) ([6d7e9ed](https://github.com/googleapis/nodejs-logging/commit/6d7e9ed9cd8b607009b0000aad92041a88107e4c)) + ### [9.6.7](https://github.com/googleapis/nodejs-logging/compare/v9.6.6...v9.6.7) (2022-01-11) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 58b36b08e44..d7f97e9d8af 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.7", + "version": "9.6.8", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 4991e70ba01b129b5a71d50a055aa8b79f5322c6 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Mon, 24 Jan 2022 09:18:51 -0800 Subject: [PATCH 0844/1029] chore: Update blunderbuss with issues/pr reviewer (#1218) * Update blunderbuss with issues/pr reviewer * Update reviewers with googleapis/api-logging-reviewers --- handwritten/logging/.github/blunderbuss.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml index 45e412794bd..a9d3f44e396 100644 --- a/handwritten/logging/.github/blunderbuss.yml +++ b/handwritten/logging/.github/blunderbuss.yml @@ -1,4 +1,4 @@ assign_issues: - - googleapis/api-logging + - googleapis/api-logging-reviewers assign_prs: - - googleapis/api-logging + - googleapis/api-logging-reviewers From a1b178005556c959ecb0cac55df2aaa62430c750 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 26 Jan 2022 19:54:15 +0000 Subject: [PATCH 0845/1029] chore: update v2.12.0 gapic-generator-typescript (#1221) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- handwritten/logging/linkinator.config.json | 10 ++++++++-- .../logging/src/v2/logging_service_v2_client.ts | 2 +- .../logging/test/gapic_logging_service_v2_v2.ts | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/linkinator.config.json b/handwritten/logging/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/handwritten/logging/linkinator.config.json +++ b/handwritten/logging/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 78927ee64b3..2d4f9314aa6 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -707,7 +707,7 @@ export class LoggingServiceV2Client { */ tailLogEntries(options?: CallOptions): gax.CancellableStream { this.initialize(); - return this.innerApiCalls.tailLogEntries(options); + return this.innerApiCalls.tailLogEntries(null, options); } /** diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 5d285f7de4a..dd1b37cb287 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -438,7 +438,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.innerApiCalls.tailLogEntries as SinonStub) .getCall(0) - .calledWithExactly(undefined) + .calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) @@ -479,7 +479,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.innerApiCalls.tailLogEntries as SinonStub) .getCall(0) - .calledWithExactly(undefined) + .calledWith(null) ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) From 070400a02003db591856fabe41ad9ea78c3f05c6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 30 Jan 2022 15:57:32 +0100 Subject: [PATCH 0846/1029] chore(deps): update dependency sinon to v13 (#1224) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d7f97e9d8af..076f3b0e87a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -87,7 +87,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 4129207aa18c10d416ee4cc3e36ed54f6e02b979 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:10:39 +0000 Subject: [PATCH 0847/1029] docs(nodejs): version support policy edits (#1346) (#1227) --- handwritten/logging/.github/.OwlBot.lock.yaml | 15 +++++++++++- handwritten/logging/README.md | 24 +++++++++---------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 2c37ca7a7b2..84059c19485 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,3 +1,16 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:89c5b2f3decec8ad64febbebea671076c119d1ab43700da380846a315600de8a + digest: sha256:a9d166a74752226923d159cb723df53429e226c9c076dad3ca52ffd073ff3bb4 diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index a9963286ebc..f5e03aa7a00 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -185,21 +185,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/logging@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 2e604cff43c0822b24dd7b9c90f6a21843ca9b1d Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Wed, 9 Feb 2022 12:20:33 -0800 Subject: [PATCH 0848/1029] fix: Regular error showing Total timeout of API google.logging.v2.LoggingServiceV2 exceeded 600000 milliseconds (#1225) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Regular error showing Total timeout of API google.logging.v2.LoggingServiceV2 exceeded 600000 milliseconds * Fix and add usage comments * Ammended a comment * Add a sample for callback usage * Add a sample to README for error handling * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add a sample to readme-partials for error handling * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Fix a readme explanation * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add sample link to README * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Comments fixes * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- handwritten/logging/.readme-partials.yml | 55 ++++++++++++++++++++++++ handwritten/logging/README.md | 55 ++++++++++++++++++++++++ handwritten/logging/src/log.ts | 37 +++++++++++++--- handwritten/logging/test/log.ts | 37 ++++++++++++++++ 4 files changed, 179 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index de3ecd64ab8..75ff9822bf3 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -71,3 +71,58 @@ body: |- If you already have a "raw" Http `request` object you can assign it to `entry.metadata.httpRequest` directly. More information about how the `request` is interpreted as raw can be found in the [code](https://github.com/googleapis/nodejs-logging/blob/15849160116a814ab71113138cb211c2e0c2d4b4/src/entry.ts#L224-L238). + + ## Error handling with logs written or deleted asynchronously + + The `Log` class provide users the ability to write and delete logs asynchronously. However, there are cases when log entries + cannot be written or deleted and error is thrown - if error is not handled properly, it could crash the application. + One possible way to catch the error is to `await` the log write/delete calls and wrap it with `try/catch` like in example below: + + ```js + // Write log entry and and catch any errors + try { + await log.write(entry); + } catch (err) { + console.log('Error is: ' + err); + } + ``` + + However, awaiting for every `log.write` or `log.delete` calls may introduce delays which could be avoided by + simply adding a callback like in the example below. This way the log entry can be queued for processing and code + execution will continue without further delays. The callback will be called once the operation is complete: + + ```js + // Asynchronously write the log entry and handle respone or any errors in provided callback + log.write(entry, err => { + if (err) { + // The log entry was not written. + console.log(err.message); + } else { + console.log('No error in write callback!'); + } + }); + ``` + + Adding a callback to every `log.write` or `log.delete` calls could be a burden, especially if code + handling the error is always the same. For this purpose we introduced an ability to provide a default callback + for `Log` class which could be set through `LogOptions` passed to `Log` constructor as in example below - this + way you can define a global callback once for all `log.write` and `log.delete` calls and be able to handle errors: + + ```js + const {Logging} = require('@google-cloud/logging'); + const logging = new Logging(); + + // Create options with default callback to be called on every write/delete response or error + const options = { + defaultWriteDeleteCallback: function (err) { + if (err) { + console.log('Error is: ' + err); + } else { + console.log('No error, all is good!'); + } + }, + }; + + const log = logging.log('my-log', options); + ``` + See the full sample in `writeLogWithCallback` function [here](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js). \ No newline at end of file diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index f5e03aa7a00..69c51099eca 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -162,6 +162,61 @@ how to populate the Http request metadata for log entries. If you already have a "raw" Http `request` object you can assign it to `entry.metadata.httpRequest` directly. More information about how the `request` is interpreted as raw can be found in the [code](https://github.com/googleapis/nodejs-logging/blob/15849160116a814ab71113138cb211c2e0c2d4b4/src/entry.ts#L224-L238). +## Error handling with logs written or deleted asynchronously + +The `Log` class provide users the ability to write and delete logs asynchronously. However, there are cases when log entries +cannot be written or deleted and error is thrown - if error is not handled properly, it could crash the application. +One possible way to catch the error is to `await` the log write/delete calls and wrap it with `try/catch` like in example below: + +```js + // Write log entry and and catch any errors + try { + await log.write(entry); + } catch (err) { + console.log('Error is: ' + err); + } +``` + +However, awaiting for every `log.write` or `log.delete` calls may introduce delays which could be avoided by +simply adding a callback like in the example below. This way the log entry can be queued for processing and code +execution will continue without further delays. The callback will be called once the operation is complete: + +```js + // Asynchronously write the log entry and handle respone or any errors in provided callback + log.write(entry, err => { + if (err) { + // The log entry was not written. + console.log(err.message); + } else { + console.log('No error in write callback!'); + } + }); +``` + +Adding a callback to every `log.write` or `log.delete` calls could be a burden, especially if code +handling the error is always the same. For this purpose we introduced an ability to provide a default callback +for `Log` class which could be set through `LogOptions` passed to `Log` constructor as in example below - this +way you can define a global callback once for all `log.write` and `log.delete` calls and be able to handle errors: + +```js + const {Logging} = require('@google-cloud/logging'); + const logging = new Logging(); + + // Create options with default callback to be called on every write/delete response or error + const options = { + defaultWriteDeleteCallback: function (err) { + if (err) { + console.log('Error is: ' + err); + } else { + console.log('No error, all is good!'); + } + }, + }; + + const log = logging.log('my-log', options); +``` +See the full sample in `writeLogWithCallback` function [here](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js). + ## Samples diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 2074f93c41d..d4ff5917ae0 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -60,6 +60,7 @@ export interface LogOptions { removeCircular?: boolean; maxEntrySize?: number; // see: https://cloud.google.com/logging/quotas jsonFieldsToTruncate?: string[]; + defaultWriteDeleteCallback?: ApiResponseCallback; } // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -89,12 +90,28 @@ export type DeleteCallback = ApiResponseCallback; * @param {number} [options.maxEntrySize] A max entry size * @param {string[]} [options.jsonFieldsToTruncate] A list of JSON properties at the given full path to be truncated. * Received values will be prepended to predefined list in the order received and duplicates discarded. - * + * @param {ApiResponseCallback} [options.defaultWriteDeleteCallback] A default global callback to be used for {@link Log#write} + * and {@link Log#delete} APIs when {@link ApiResponseCallback} callback was not supplied by caller in function parameters. + * Note that {@link LogOptions#defaultWriteDeleteCallback} is useful when {@link Log#write} and {@link Log#delete} APIs are called + * without `await` and without callback added explicitly to every call - this way {@link LogOptions#defaultWriteDeleteCallback} + * can serve as global callback handler, which for example could be used to catch all errors and eliminate crashes. * @example * ``` - * const {Logging} = require('@google-cloud/logging'); + * import {Logging} from '@google-cloud/logging'; + * import {LogOptions} from '@google-cloud/logging/build/src/log'; + * const options: LogOptions = { + * maxEntrySize: 256, + * jsonFieldsToTruncate: [ + * 'jsonPayload.fields.metadata.structValue.fields.custom.stringValue', + * ], + * defaultWriteDeleteCallback: (err: any) => { + * if (err) { + * console.log('Error: ' + err); + * } + * }, + * }; * const logging = new Logging(); - * const log = logging.log('syslog'); + * const log = logging.log('syslog', options); * ``` */ class Log implements LogSeverityFunctions { @@ -104,6 +121,7 @@ class Log implements LogSeverityFunctions { logging: Logging; name: string; jsonFieldsToTruncate: string[]; + defaultWriteDeleteCallback?: ApiResponseCallback; constructor(logging: Logging, name: string, options?: LogOptions) { options = options || {}; @@ -145,6 +163,13 @@ class Log implements LogSeverityFunctions { this.jsonFieldsToTruncate ); } + + /** + * The default callback for {@link Log#write} and {@link Log#delete} APIs + * is going to be used only when {@link LogOptions#defaultWriteDeleteCallback} + * was set by user and only for APIs which does not accept a callback as parameter + */ + this.defaultWriteDeleteCallback = options.defaultWriteDeleteCallback; } /** @@ -347,7 +372,8 @@ class Log implements LogSeverityFunctions { }; return this.logging.loggingService.deleteLog( reqOpts, - gaxOptions! as CallOptions + gaxOptions! as CallOptions, + this.defaultWriteDeleteCallback ); } @@ -953,7 +979,8 @@ class Log implements LogSeverityFunctions { delete reqOpts.gaxOptions; return this.logging.loggingService.writeLogEntries( reqOpts, - options.gaxOptions + options.gaxOptions, + this.defaultWriteDeleteCallback ); } diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 863f05f79db..9c15b1c5ea3 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -169,11 +169,27 @@ describe('Log', () => { { logName: log.formattedName_, }, + undefined, undefined ) ); }); + it('should execute global callback for delete', async () => { + log.defaultWriteDeleteCallback = () => {}; + await log.delete(); + assert( + log.logging.loggingService.deleteLog.calledWithExactly( + { + logName: log.formattedName_, + }, + undefined, + log.defaultWriteDeleteCallback + ) + ); + log.defaultWriteDeleteCallback = undefined; + }); + it('should accept gaxOptions', async () => { await log.delete({}); assert( @@ -368,6 +384,7 @@ describe('Log', () => { }, }, }, + undefined, undefined ) ); @@ -432,6 +449,7 @@ describe('Log', () => { entries: ENTRIES, resource: EXPECTED_RESOURCE, }, + undefined, undefined ) ); @@ -446,11 +464,29 @@ describe('Log', () => { entries: ENTRIES, resource: FAKE_RESOURCE, }, + undefined, undefined ) ); }); + it('should call gax write method with global callback', async () => { + log.defaultWriteDeleteCallback = () => {}; + await log.write(ENTRIES, OPTIONS); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWithExactly( + { + logName: log.formattedName_, + entries: ENTRIES, + resource: FAKE_RESOURCE, + }, + undefined, + log.defaultWriteDeleteCallback + ) + ); + log.defaultWriteDeleteCallback = undefined; + }); + it('should decorate the entries', async () => { decorateEntriesStub.resetBehavior(); decorateEntriesStub.returns('decorated entries'); @@ -498,6 +534,7 @@ describe('Log', () => { assert( log.logging.loggingService.writeLogEntries.calledOnceWithExactly( sinon.match.object, + undefined, undefined ) ); From 7272ef72a89febdd341381050ea5abc29ce8870e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 13:32:13 -0800 Subject: [PATCH 0849/1029] chore(main): release 9.6.9 (#1228) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ad804c9d042..b63111d66c0 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.6.9](https://github.com/googleapis/nodejs-logging/compare/v9.6.8...v9.6.9) (2022-02-09) + + +### Bug Fixes + +* Regular error showing Total timeout of API google.logging.v2.LoggingServiceV2 exceeded 600000 milliseconds ([#1225](https://github.com/googleapis/nodejs-logging/issues/1225)) ([7f584bc](https://github.com/googleapis/nodejs-logging/commit/7f584bc307ed18e333002177436046b3c30f4aa0)) + ### [9.6.8](https://github.com/googleapis/nodejs-logging/compare/v9.6.7...v9.6.8) (2022-01-21) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 076f3b0e87a..3a97cd4ded2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.8", + "version": "9.6.9", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From dfead01ace443bf6f2fb278f496d1ed71bf0f2f7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 00:56:46 +0000 Subject: [PATCH 0850/1029] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#1229) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 feat: Update Logging API with latest changes PiperOrigin-RevId: 429289471 Source-Link: https://github.com/googleapis/googleapis/commit/acd5f89b8addd2ff54f41a7d43ff9b122bb43337 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8a12622536ae2e9a8978198a151e89234b839b20 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGExMjYyMjUzNmFlMmU5YTg5NzgxOThhMTUxZTg5MjM0YjgzOWIyMCJ9 --- .../protos/google/logging/v2/log_entry.proto | 50 +- .../protos/google/logging/v2/logging.proto | 114 +- .../google/logging/v2/logging_config.proto | 758 +- .../google/logging/v2/logging_metrics.proto | 18 +- handwritten/logging/protos/protos.d.ts | 4757 +++-- handwritten/logging/protos/protos.js | 15359 ++++++++++------ handwritten/logging/protos/protos.json | 527 +- .../v2/config_service_v2.copy_log_entries.js | 69 + .../v2/config_service_v2.create_bucket.js | 19 +- .../v2/config_service_v2.create_exclusion.js | 12 +- .../v2/config_service_v2.create_sink.js | 18 +- .../v2/config_service_v2.create_view.js | 14 +- .../v2/config_service_v2.delete_bucket.js | 12 +- .../v2/config_service_v2.delete_exclusion.js | 11 +- .../v2/config_service_v2.delete_sink.js | 11 +- .../v2/config_service_v2.delete_view.js | 12 +- .../v2/config_service_v2.get_bucket.js | 12 +- .../v2/config_service_v2.get_cmek_settings.js | 18 +- .../v2/config_service_v2.get_exclusion.js | 11 +- .../v2/config_service_v2.get_settings.js | 66 + .../v2/config_service_v2.get_sink.js | 11 +- .../v2/config_service_v2.get_view.js | 12 +- .../v2/config_service_v2.list_buckets.js | 22 +- .../v2/config_service_v2.list_exclusions.js | 8 +- .../v2/config_service_v2.list_sinks.js | 8 +- .../v2/config_service_v2.list_views.js | 16 +- .../v2/config_service_v2.undelete_bucket.js | 12 +- .../v2/config_service_v2.update_bucket.js | 22 +- .../config_service_v2.update_cmek_settings.js | 21 +- .../v2/config_service_v2.update_exclusion.js | 11 +- .../v2/config_service_v2.update_settings.js | 78 + .../v2/config_service_v2.update_sink.js | 19 +- .../v2/config_service_v2.update_view.js | 14 +- .../v2/logging_service_v2.delete_log.js | 18 +- .../v2/logging_service_v2.list_log_entries.js | 34 +- .../v2/logging_service_v2.list_logs.js | 32 +- ..._v2.list_monitored_resource_descriptors.js | 8 +- .../v2/logging_service_v2.tail_log_entries.js | 24 +- .../logging_service_v2.write_log_entries.js | 22 +- .../metrics_service_v2.create_log_metric.js | 8 +- .../metrics_service_v2.delete_log_metric.js | 8 +- .../v2/metrics_service_v2.get_log_metric.js | 8 +- .../v2/metrics_service_v2.list_log_metrics.js | 8 +- .../metrics_service_v2.update_log_metric.js | 8 +- .../snippet_metadata.google.logging.v2.json | 1691 ++ .../src/v2/config_service_v2_client.ts | 828 +- .../v2/config_service_v2_client_config.json | 12 + .../logging/src/v2/gapic_metadata.json | 30 + .../src/v2/logging_service_v2_client.ts | 325 +- .../src/v2/metrics_service_v2_client.ts | 121 +- .../test/gapic_config_service_v2_v2.ts | 1073 +- .../test/gapic_logging_service_v2_v2.ts | 215 +- .../test/gapic_metrics_service_v2_v2.ts | 249 +- 53 files changed, 18868 insertions(+), 7976 deletions(-) create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js create mode 100644 handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 3ad2cfbb583..23c9e3c525d 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ syntax = "proto3"; package google.logging.v2; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; @@ -24,8 +25,6 @@ import "google/logging/type/log_severity.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -37,8 +36,6 @@ option php_namespace = "Google\\Cloud\\Logging\\V2"; option ruby_package = "Google::Cloud::Logging::V2"; // An individual entry in a log. -// -// message LogEntry { option (google.api.resource) = { type: "logging.googleapis.com/Log" @@ -62,12 +59,13 @@ message LogEntry { // // `[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 + // 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. @@ -126,7 +124,7 @@ message LogEntry { // de-duplication in the export of logs. // // If the `insert_id` is omitted when writing a log entry, the Logging API - // assigns its own unique identifier in this field. + // assigns its own unique identifier in this field. // // In queries, the `insert_id` is also used to order log entries that have // the same `log_name` and `timestamp` values. @@ -136,8 +134,20 @@ message LogEntry { // applicable. google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A set of user-defined (key, value) data that provides additional - // information about the log entry. + // Optional. A map of key, value pairs that provides additional information about the + // log entry. The labels can be user-defined or system-defined. + // + // User-defined labels are arbitrary key, value pairs that you can use to + // classify logs. + // + // System-defined labels are defined by GCP services for platform logs. + // They have two components - a service namespace component and the + // attribute name. For example: `compute.googleapis.com/resource_name`. + // + // Cloud Logging truncates label keys that exceed 512 B and label + // values that exceed 64 KB upon their associated log entry being + // written. The truncation is indicated by an ellipsis at the + // end of the character string. map labels = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Information about an operation associated with the log entry, if @@ -168,6 +178,10 @@ message LogEntry { // Optional. Source code location information associated with the log entry, if any. LogEntrySourceLocation source_location = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information indicating this LogEntry is part of a sequence of multiple log + // entries split from a single LogEntry. + LogSplit split = 35 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about a potentially long-running operation with which @@ -208,3 +222,21 @@ message LogEntrySourceLocation { // (Python). string function = 3 [(google.api.field_behavior) = OPTIONAL]; } + +// Additional information used to correlate multiple log entries. Used when a +// single LogEntry would exceed the Google Cloud Logging size limit and is +// split across multiple log entries. +message LogSplit { + // A globally unique identifier for all log entries in a sequence of split log + // entries. All log entries with the same |LogSplit.uid| are assumed to be + // part of the same sequence of split log entries. + string uid = 1; + + // The index of this LogEntry in the sequence of split log entries. Log + // entries are given |index| values 0, 1, ..., n-1 for a sequence of n log + // entries. + int32 index = 2; + + // The total number of log entries that the original LogEntry was split into. + int32 total_splits = 3; +} diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index f8b01a71e6b..bacc5d081ef 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ syntax = "proto3"; package google.logging.v2; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; @@ -27,7 +28,6 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -48,10 +48,10 @@ service LoggingServiceV2 { "https://www.googleapis.com/auth/logging.read," "https://www.googleapis.com/auth/logging.write"; - // Deletes all the log entries in a log. The log reappears if it receives new - // entries. Log entries written shortly before the delete operation might not - // be deleted. Entries received after the delete operation with a timestamp - // before the operation will be deleted. + // Deletes all the log entries in a log for the _Default Log Bucket. The log + // reappears if it receives new entries. Log entries written shortly before + // the delete operation might not be deleted. Entries received after the + // delete operation with a timestamp before the operation will be deleted. rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{log_name=projects/*/logs/*}" @@ -140,14 +140,15 @@ service LoggingServiceV2 { message DeleteLogRequest { // Required. The resource name of the log to delete: // - // "projects/[PROJECT_ID]/logs/[LOG_ID]" - // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - // "folders/[FOLDER_ID]/logs/[LOG_ID]" + // * `projects/[PROJECT_ID]/logs/[LOG_ID]` + // * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + // * `folders/[FOLDER_ID]/logs/[LOG_ID]` // // `[LOG_ID]` must be URL-encoded. For example, // `"projects/my-project-id/logs/syslog"`, - // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + // `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + // // For more information about log names, see // [LogEntry][google.logging.v2.LogEntry]. string log_name = 1 [ @@ -163,15 +164,15 @@ message WriteLogEntriesRequest { // Optional. A default log resource name that is assigned to all log entries // in `entries` that do not specify a value for `log_name`: // - // "projects/[PROJECT_ID]/logs/[LOG_ID]" - // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - // "folders/[FOLDER_ID]/logs/[LOG_ID]" + // * `projects/[PROJECT_ID]/logs/[LOG_ID]` + // * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + // * `folders/[FOLDER_ID]/logs/[LOG_ID]` // // `[LOG_ID]` must be URL-encoded. For example: // // "projects/my-project-id/logs/syslog" - // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + // "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" // // The permission `logging.logEntries.create` is needed on each project, // organization, billing account, or folder that is receiving new log @@ -214,14 +215,14 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](https://cloud.google.com/logging/quota-policy) in + // [logs retention period](https://cloud.google.com/logging/quotas) in // the past or more than 24 hours in the future will not be available when // calling `entries.list`. However, those log entries can still be [exported // with // LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + // [quota limit](https://cloud.google.com/logging/quotas) for calls to // `entries.write`, you should try to include several log entries in this // list, rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; @@ -258,16 +259,17 @@ message ListLogEntriesRequest { // Required. Names of one or more parent resources from which to // retrieve log entries: // - // "projects/[PROJECT_ID]" - // "organizations/[ORGANIZATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]" - // "folders/[FOLDER_ID]" + // * `projects/[PROJECT_ID]` + // * `organizations/[ORGANIZATION_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]` + // * `folders/[FOLDER_ID]` + // + // May alternatively be one or more views: // - // May alternatively be one or more views - // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - // organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` // // Projects listed in the `project_ids` field are added to this list. repeated string resource_names = 8 [ @@ -294,10 +296,10 @@ message ListLogEntriesRequest { // timestamps are returned in order of their `insert_id` values. string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The maximum number of results to return from this request. - // Default is 50. If the value is negative or exceeds 1000, - // the request is rejected. The presence of `next_page_token` in the - // response indicates that more results might be available. + // Optional. The maximum number of results to return from this request. Default is 50. + // If the value is negative or exceeds 1000, the request is rejected. The + // presence of `next_page_token` in the response indicates that more results + // might be available. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the @@ -356,10 +358,10 @@ message ListMonitoredResourceDescriptorsResponse { message ListLogsRequest { // Required. The resource name that owns the logs: // - // "projects/[PROJECT_ID]" - // "organizations/[ORGANIZATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]" - // "folders/[FOLDER_ID]" + // * `projects/[PROJECT_ID]` + // * `organizations/[ORGANIZATION_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]` + // * `folders/[FOLDER_ID]` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -379,17 +381,24 @@ message ListLogsRequest { string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource name that owns the logs: - // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - // organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + // + // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` // // To support legacy queries, it could also be: - // "projects/[PROJECT_ID]" - // "organizations/[ORGANIZATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]" - // "folders/[FOLDER_ID]" - repeated string resource_names = 8 [(google.api.field_behavior) = OPTIONAL]; + // + // * `projects/[PROJECT_ID]` + // * `organizations/[ORGANIZATION_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]` + // * `folders/[FOLDER_ID]` + repeated string resource_names = 8 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; } // Result returned from ListLogs. @@ -409,16 +418,17 @@ message ListLogsResponse { message TailLogEntriesRequest { // Required. Name of a parent resource from which to retrieve log entries: // - // "projects/[PROJECT_ID]" - // "organizations/[ORGANIZATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]" - // "folders/[FOLDER_ID]" + // * `projects/[PROJECT_ID]` + // * `organizations/[ORGANIZATION_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]` + // * `folders/[FOLDER_ID]` // // May alternatively be one or more views: - // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - // "organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + // + // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` repeated string resource_names = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A filter that chooses which log entries to return. See [Advanced diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 9b10932d637..63d604ab85a 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,14 +16,15 @@ syntax = "proto3"; package google.logging.v2; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -33,6 +34,7 @@ option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; option ruby_package = "Google::Cloud::Logging::V2"; + option (google.api.resource_definition) = { type: "logging.googleapis.com/OrganizationLocation" pattern: "organizations/{organization}/locations/{location}" @@ -45,7 +47,6 @@ option (google.api.resource_definition) = { type: "logging.googleapis.com/BillingAccountLocation" pattern: "billingAccounts/{billing_account}/locations/{location}" }; - // Service for configuring sinks used to route log entries. service ConfigServiceV2 { option (google.api.default_host) = "logging.googleapis.com"; @@ -55,7 +56,7 @@ service ConfigServiceV2 { "https://www.googleapis.com/auth/logging.admin," "https://www.googleapis.com/auth/logging.read"; - // Lists buckets. + // Lists log buckets. rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*/locations/*}/buckets" @@ -75,7 +76,7 @@ service ConfigServiceV2 { option (google.api.method_signature) = "parent"; } - // Gets a bucket. + // Gets a log bucket. rpc GetBucket(GetBucketRequest) returns (LogBucket) { option (google.api.http) = { get: "/v2/{name=*/*/locations/*/buckets/*}" @@ -94,8 +95,8 @@ service ConfigServiceV2 { }; } - // Creates a bucket that can be used to store log entries. Once a bucket has - // been created, the region cannot be changed. + // Creates a log bucket that can be used to store log entries. After a bucket + // has been created, the bucket's location cannot be changed. rpc CreateBucket(CreateBucketRequest) returns (LogBucket) { option (google.api.http) = { post: "/v2/{parent=*/*/locations/*}/buckets" @@ -119,16 +120,16 @@ service ConfigServiceV2 { }; } - // Updates a bucket. This method replaces the following fields in the + // Updates a log bucket. This method replaces the following fields in the // existing bucket with values from the new bucket: `retention_period` // // If the retention period is decreased and the bucket is locked, - // FAILED_PRECONDITION will be returned. + // `FAILED_PRECONDITION` will be returned. // - // If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION - // will be returned. + // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + // `FAILED_PRECONDITION` will be returned. // - // A buckets region may not be modified after it is created. + // After a bucket has been created, the bucket's location cannot be changed. rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) { option (google.api.http) = { patch: "/v2/{name=*/*/locations/*/buckets/*}" @@ -152,10 +153,11 @@ service ConfigServiceV2 { }; } - // Deletes a bucket. - // Moves the bucket to the DELETE_REQUESTED state. After 7 days, the - // bucket will be purged and all logs in the bucket will be permanently - // deleted. + // Deletes a log bucket. + // + // Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. + // After 7 days, the bucket will be purged and all log entries in the bucket + // will be permanently deleted. rpc DeleteBucket(DeleteBucketRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=*/*/locations/*/buckets/*}" @@ -174,8 +176,8 @@ service ConfigServiceV2 { }; } - // Undeletes a bucket. A bucket that has been deleted may be undeleted within - // the grace period of 7 days. + // Undeletes a log bucket. A bucket that has been deleted can be undeleted + // within the grace period of 7 days. rpc UndeleteBucket(UndeleteBucketRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v2/{name=*/*/locations/*/buckets/*}:undelete" @@ -199,7 +201,7 @@ service ConfigServiceV2 { }; } - // Lists views on a bucket. + // Lists views on a log bucket. rpc ListViews(ListViewsRequest) returns (ListViewsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*/locations/*/buckets/*}/views" @@ -219,7 +221,7 @@ service ConfigServiceV2 { option (google.api.method_signature) = "parent"; } - // Gets a view. + // Gets a view on a log bucket.. rpc GetView(GetViewRequest) returns (LogView) { option (google.api.http) = { get: "/v2/{name=*/*/locations/*/buckets/*/views/*}" @@ -238,8 +240,8 @@ service ConfigServiceV2 { }; } - // Creates a view over logs in a bucket. A bucket may contain a maximum of - // 50 views. + // Creates a view over log entries in a log bucket. A bucket may contain a + // maximum of 30 views. rpc CreateView(CreateViewRequest) returns (LogView) { option (google.api.http) = { post: "/v2/{parent=*/*/locations/*/buckets/*}/views" @@ -263,8 +265,11 @@ service ConfigServiceV2 { }; } - // Updates a view. This method replaces the following fields in the existing - // view with values from the new view: `filter`. + // Updates a view on a log bucket. This method replaces the following fields + // in the existing view with values from the new view: `filter`. + // If an `UNAVAILABLE` error is returned, this indicates that system is not in + // a state where it can update the view. If this occurs, please try again in a + // few minutes. rpc UpdateView(UpdateViewRequest) returns (LogView) { option (google.api.http) = { patch: "/v2/{name=*/*/locations/*/buckets/*/views/*}" @@ -288,7 +293,10 @@ service ConfigServiceV2 { }; } - // Deletes a view from a bucket. + // Deletes a view on a log bucket. + // If an `UNAVAILABLE` error is returned, this indicates that system is not in + // a state where it can delete the view. If this occurs, please try again in a + // few minutes. rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=*/*/locations/*/buckets/*/views/*}" @@ -442,7 +450,7 @@ service ConfigServiceV2 { option (google.api.method_signature) = "sink_name"; } - // Lists all the exclusions in a parent resource. + // Lists all the exclusions on the _Default sink in a parent resource. rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/exclusions" @@ -462,7 +470,7 @@ service ConfigServiceV2 { option (google.api.method_signature) = "parent"; } - // Gets the description of an exclusion. + // Gets the description of an exclusion in the _Default sink. rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { option (google.api.http) = { get: "/v2/{name=*/*/exclusions/*}" @@ -482,9 +490,9 @@ service ConfigServiceV2 { option (google.api.method_signature) = "name"; } - // Creates a new exclusion in a specified parent resource. - // Only log entries belonging to that resource can be excluded. - // You can have up to 10 exclusions in a resource. + // Creates a new exclusion in the _Default sink in a specified parent + // resource. Only log entries belonging to that resource can be excluded. You + // can have up to 10 exclusions in a resource. rpc CreateExclusion(CreateExclusionRequest) returns (LogExclusion) { option (google.api.http) = { post: "/v2/{parent=*/*}/exclusions" @@ -509,7 +517,8 @@ service ConfigServiceV2 { option (google.api.method_signature) = "parent,exclusion"; } - // Changes one or more properties of an existing exclusion. + // Changes one or more properties of an existing exclusion in the _Default + // sink. rpc UpdateExclusion(UpdateExclusionRequest) returns (LogExclusion) { option (google.api.http) = { patch: "/v2/{name=*/*/exclusions/*}" @@ -534,7 +543,7 @@ service ConfigServiceV2 { option (google.api.method_signature) = "name,exclusion,update_mask"; } - // Deletes an exclusion. + // Deletes an exclusion in the _Default sink. rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" @@ -554,29 +563,39 @@ service ConfigServiceV2 { option (google.api.method_signature) = "name"; } - // Gets the Logs Router CMEK settings for the given resource. + // Gets the Logging CMEK settings for the given resource. // - // Note: CMEK for the Logs Router can currently only be configured for GCP - // organizations. Once configured, it applies to all projects and folders in - // the GCP organization. + // Note: CMEK for the Log Router can be configured for Google Cloud projects, + // folders, organizations and billing accounts. Once configured for an + // organization, it applies to all projects and folders in the Google Cloud + // organization. // - // See [Enabling CMEK for Logs + // See [Enabling CMEK for Log // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) // for more information. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" + additional_bindings { + get: "/v2/{name=projects/*}/cmekSettings" + } additional_bindings { get: "/v2/{name=organizations/*}/cmekSettings" } + additional_bindings { + get: "/v2/{name=folders/*}/cmekSettings" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*}/cmekSettings" + } }; } - // Updates the Logs Router CMEK settings for the given resource. + // Updates the Log Router CMEK settings for the given resource. // - // Note: CMEK for the Logs Router can currently only be configured for GCP - // organizations. Once configured, it applies to all projects and folders in - // the GCP organization. + // Note: CMEK for the Log Router can currently only be configured for Google + // Cloud organizations. Once configured, it applies to all projects and + // folders in the Google Cloud organization. // // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] // will fail if 1) `kms_key_name` is invalid, or 2) the associated service @@ -584,7 +603,7 @@ service ConfigServiceV2 { // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or // 3) access to the key is disabled. // - // See [Enabling CMEK for Logs + // See [Enabling CMEK for Log // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) // for more information. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { @@ -597,9 +616,82 @@ service ConfigServiceV2 { } }; } + + // Gets the Log Router settings for the given resource. + // + // Note: Settings for the Log Router can be get for Google Cloud projects, + // folders, organizations and billing accounts. Currently it can only be + // configured for organizations. Once configured for an organization, it + // applies to all projects and folders in the Google Cloud organization. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + rpc GetSettings(GetSettingsRequest) returns (Settings) { + option (google.api.http) = { + get: "/v2/{name=*/*}/settings" + additional_bindings { + get: "/v2/{name=projects/*}/settings" + } + additional_bindings { + get: "/v2/{name=organizations/*}/settings" + } + additional_bindings { + get: "/v2/{name=folders/*}/settings" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*}/settings" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Log Router settings for the given resource. + // + // Note: Settings for the Log Router can currently only be configured for + // Google Cloud organizations. Once configured, it applies to all projects and + // folders in the Google Cloud organization. + // + // [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] + // will fail if 1) `kms_key_name` is invalid, or 2) the associated service + // account does not have the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + // 3) access to the key is disabled. 4) `location_id` is not supported by + // Logging. 5) `location_id` violate OrgPolicy. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + rpc UpdateSettings(UpdateSettingsRequest) returns (Settings) { + option (google.api.http) = { + patch: "/v2/{name=*/*}/settings" + body: "settings" + additional_bindings { + patch: "/v2/{name=organizations/*}/settings" + body: "settings" + } + additional_bindings { + patch: "/v2/{name=folders/*}/settings" + body: "settings" + } + }; + option (google.api.method_signature) = "settings,update_mask"; + } + + // Copies a set of log entries from a log bucket to a Cloud Storage bucket. + rpc CopyLogEntries(CopyLogEntriesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/entries:copy" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "CopyLogEntriesResponse" + metadata_type: "CopyLogEntriesMetadata" + }; + } } -// Describes a repository of logs. +// Describes a repository in which log entries are stored. message LogBucket { option (google.api.resource) = { type: "logging.googleapis.com/LogBucket" @@ -609,16 +701,20 @@ message LogBucket { pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" }; - // The resource name of the bucket. + // Output only. The resource name of the bucket. + // // For example: - // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The - // supported locations are: - // "global" // - // For the location of `global` it is unspecified where logs are actually - // stored. - // Once a bucket has been created, the location can not be changed. - string name = 1; + // `projects/my-project/locations/global/buckets/my-bucket` + // + // For a list of supported locations, see [Supported + // Regions](https://cloud.google.com/logging/docs/region-support) + // + // For the location of `global` it is unspecified where log entries are + // actually stored. + // + // After a bucket has been created, the location cannot be changed. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Describes this bucket. string description = 3; @@ -631,34 +727,38 @@ message LogBucket { google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Logs will be retained by default for this amount of time, after which they - // will automatically be deleted. The minimum retention period is 1 day. - // If this value is set to zero at bucket creation time, the default time of - // 30 days will be used. + // will automatically be deleted. The minimum retention period is 1 day. If + // this value is set to zero at bucket creation time, the default time of 30 + // days will be used. int32 retention_days = 11; - // Whether the bucket has been locked. - // The retention period on a locked bucket may not be changed. - // Locked buckets may only be deleted if they are empty. + // Whether the bucket is locked. + // + // The retention period on a locked bucket cannot be changed. Locked buckets + // may only be deleted if they are empty. bool locked = 9; // Output only. The bucket lifecycle state. LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; -} -// LogBucket lifecycle states. -enum LifecycleState { - // Unspecified state. This is only used/useful for distinguishing - // unset values. - LIFECYCLE_STATE_UNSPECIFIED = 0; - - // The normal and active state. - ACTIVE = 1; + // Log entry field paths that are denied access in this bucket. + // + // The following fields and their children are eligible: `textPayload`, + // `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. + // + // Restricting a repeated field will restrict all values. Adding a parent will + // block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) + repeated string restricted_fields = 15; - // The bucket has been marked for deletion by the user. - DELETE_REQUESTED = 2; + // The CMEK settings of the log bucket. If present, new log entries written to + // this log bucket are encrypted using the CMEK key provided in this + // configuration. If a log bucket has CMEK settings, the CMEK settings cannot + // be disabled later by updating the log bucket. Changing the KMS key is + // allowed. + CmekSettings cmek_settings = 19; } -// Describes a view over logs in a bucket. +// Describes a view over log entries in a bucket. message LogView { option (google.api.resource) = { type: "logging.googleapis.com/LogView" @@ -669,8 +769,10 @@ message LogView { }; // The resource name of the view. - // For example - // "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view + // + // For example: + // + // `projects/my-project/locations/global/buckets/my-bucket/views/my-view` string name = 1; // Describes this view. @@ -683,21 +785,27 @@ message LogView { google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Filter that restricts which log entries in a bucket are visible in this - // view. Filters are restricted to be a logical AND of ==/!= of any of the + // view. + // + // Filters are restricted to be a logical AND of ==/!= of any of the // following: - // originating project/folder/organization/billing account. - // resource type - // log id - // Example: SOURCE("projects/myproject") AND resource.type = "gce_instance" - // AND LOG_ID("stdout") + // + // - originating project/folder/organization/billing account. + // - resource type + // - log id + // + // For example: + // + // SOURCE("projects/myproject") AND resource.type = "gce_instance" + // AND LOG_ID("stdout") string filter = 7; } // Describes a sink used to export log entries to one of the following -// destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a -// Cloud Pub/Sub topic. A logs filter controls which log entries are exported. -// The sink must be created within a project, organization, billing account, or -// folder. +// destinations in any project: a Cloud Storage bucket, a BigQuery dataset, a +// Pub/Sub topic or a Cloud Logging log bucket. A logs filter controls which log +// entries are exported. The sink must be created within a project, +// organization, billing account, or folder. message LogSink { option (google.api.resource) = { type: "logging.googleapis.com/LogSink" @@ -719,9 +827,10 @@ message LogSink { V1 = 2; } - // 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 + // Required. The client-assigned sink identifier, unique within the project. + // + // For 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. // First character has to be alphanumeric. string name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -732,9 +841,9 @@ message LogSink { // "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 + // 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](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). string destination = 3 [ @@ -747,20 +856,24 @@ message LogSink { // Optional. An [advanced logs // filter](https://cloud.google.com/logging/docs/view/advanced-queries). The // only exported log entries are those that are in the resource owning the - // sink and that match the filter. For example: + // sink and that match the filter. + // + // For example: // - // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + // `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A description of this sink. + // // The maximum length of the description is 8000 characters. string description = 18 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If set to True, then this sink is disabled and it does not - // export any log entries. + // Optional. If set to true, then this sink is disabled and it does not export any log + // entries. bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Log entries that match any of the exclusion filters will not be exported. + // Optional. Log entries that match any of these exclusion filters will not be exported. + // // If a log entry is matched by both `filter` and one of `exclusion_filters` // it will not be exported. repeated LogExclusion exclusions = 16 [(google.api.field_behavior) = OPTIONAL]; @@ -768,33 +881,42 @@ message LogSink { // Deprecated. This field is unused. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity—a service account or group—under which Logging - // writes the exported log entries to the sink's destination. This field is - // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + // Output only. An IAM identity—a service account or group—under which Cloud + // Logging writes the exported log entries to the sink's destination. This + // field is set by + // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the // value 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 + // exports from this sink will fail. For more information, see [Granting + // Access for a // Resource](https://cloud.google.com/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. + // + // Sinks that have a destination that is a log bucket in the same project as + // the sink do not have a writer_identity and no additional permissions are + // required. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. This field applies only to sinks owned by organizations and - // folders. If the field is false, the default, only the logs owned by the - // sink's parent resource are available for export. If the field is true, then - // logs from all the projects, folders, and billing accounts contained in the + // Optional. This field applies only to sinks owned by organizations and folders. If the + // field is false, the default, only the logs owned by the sink's parent + // resource are available for export. If the field is true, then log entries + // from all the projects, folders, and billing accounts contained in the // sink's parent resource are also available for export. Whether a particular // log entry from the children is exported depends on the sink's filter - // expression. For example, if this field is true, then the filter + // expression. + // + // For example, if this field is true, then the filter // `resource.type=gce_instance` would export all Compute Engine VM instance - // log entries from all projects in the sink's parent. To only export entries - // from certain child projects, filter on the project part of the log name: + // log entries from all projects in the sink's parent. + // + // To only export entries from certain child projects, filter on the project + // part of the log name: // - // logName:("projects/test-project1/" OR "projects/test-project2/") AND - // resource.type=gce_instance + // logName:("projects/test-project1/" OR "projects/test-project2/") AND + // resource.type=gce_instance bool include_children = 9 [(google.api.field_behavior) = OPTIONAL]; // Destination dependent options. @@ -818,16 +940,17 @@ message LogSink { message BigQueryOptions { // Optional. Whether to use [BigQuery's partition // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - // default, Logging creates dated tables based on the log entries' timestamps, - // e.g. syslog_20170523. With partitioned tables the date suffix is no longer - // present and [special query + // default, Cloud Logging creates dated tables based on the log entries' + // timestamps, e.g. syslog_20170523. With partitioned tables the date suffix + // is no longer present and [special query // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) // has to be used instead. In both cases, tables are sharded based on UTC // timezone. bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; - // Output only. True if new timestamp column based partitioning is in use, - // false if legacy ingestion-time partitioning is in use. + // Output only. True if new timestamp column based partitioning is in use, false if legacy + // ingestion-time partitioning is in use. + // // All new sinks will have this field set true and will use timestamp column // based partitioning. If use_partitioned_tables is false, this value has no // meaning and will be false. Legacy sinks using partitioned tables will have @@ -854,15 +977,15 @@ message ListBucketsRequest { } ]; - // 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. + // 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. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - // 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. + // 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. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -879,11 +1002,13 @@ message ListBucketsResponse { // The parameters to `CreateBucket`. message CreateBucketRequest { - // Required. The resource in which to create the bucket: + // Required. The resource in which to create the log bucket: // // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" // - // Example: `"projects/my-logging-project/locations/global"` + // For example: + // + // `"projects/my-project/locations/global"` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -891,9 +1016,9 @@ message CreateBucketRequest { } ]; - // Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are - // limited to 100 characters and can include only letters, digits, - // underscores, hyphens, and periods. + // Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited + // to 100 characters and can include only letters, digits, underscores, + // hyphens, and periods. string bucket_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The new bucket. The region specified in the new bucket must be compliant @@ -911,10 +1036,9 @@ message UpdateBucketRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also - // requires permission "resourcemanager.projects.updateLiens" to set the - // locked property + // For example: + // + // `"projects/my-project/locations/global/buckets/my-bucket"` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -926,13 +1050,13 @@ message UpdateBucketRequest { LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Field mask that specifies the fields in `bucket` that need an update. A - // bucket field will be overwritten if, and only if, it is in the update - // mask. `name` and output only fields cannot be updated. + // bucket field will be overwritten if, and only if, it is in the update mask. + // `name` and output only fields cannot be updated. // - // For a detailed `FieldMask` definition, see + // For a detailed `FieldMask` definition, see: // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // - // Example: `updateMask=retention_days`. + // For example: `updateMask=retention_days` google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; } @@ -945,8 +1069,9 @@ message GetBucketRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + // For example: + // + // `"projects/my-project/locations/global/buckets/my-bucket"` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -964,8 +1089,9 @@ message DeleteBucketRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + // For example: + // + // `"projects/my-project/locations/global/buckets/my-bucket"` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -983,8 +1109,9 @@ message UndeleteBucketRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + // For example: + // + // `"projects/my-project/locations/global/buckets/my-bucket"` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1000,13 +1127,14 @@ message ListViewsRequest { // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // 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. + // 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. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // 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. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; @@ -1027,10 +1155,11 @@ message ListViewsResponse { message CreateViewRequest { // Required. The bucket in which to create the view // - // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` // - // Example: - // `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` + // For example: + // + // `"projects/my-project/locations/global/buckets/my-bucket"` string parent = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The id to use for this view. @@ -1046,8 +1175,9 @@ message UpdateViewRequest { // // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + // For example: + // + // `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The updated view. @@ -1060,7 +1190,7 @@ message UpdateViewRequest { // For a detailed `FieldMask` definition, see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // - // Example: `updateMask=filter`. + // For example: `updateMask=filter` google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -1070,8 +1200,9 @@ message GetViewRequest { // // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + // For example: + // + // `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1086,8 +1217,9 @@ message DeleteViewRequest { // // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + // For example: + // + // `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1143,7 +1275,9 @@ message GetSinkRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // - // Example: `"projects/my-project-id/sinks/my-sink-id"`. + // For example: + // + // `"projects/my-project/sinks/my-sink"` string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1161,7 +1295,10 @@ message CreateSinkRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" // - // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + // For examples: + // + // `"projects/my-project"` + // `"organizations/123456789"` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1176,9 +1313,9 @@ message CreateSinkRequest { // 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 - // the same group or service account used by Logging before the addition of - // writer identities to this API. The sink's destination must be in the same - // project as the sink itself. + // the same group or service account used by Cloud Logging 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 @@ -1197,7 +1334,9 @@ message UpdateSinkRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // - // Example: `"projects/my-project-id/sinks/my-sink-id"`. + // For example: + // + // `"projects/my-project/sinks/my-sink"` string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1226,16 +1365,18 @@ message UpdateSinkRequest { // an update. A sink field will be overwritten if, and only if, it is // in the update mask. `name` and output only fields cannot be updated. // - // An empty updateMask is temporarily treated as using the following mask + // An empty `updateMask` is temporarily treated as using the following mask // for backwards compatibility purposes: - // destination,filter,includeChildren + // + // `destination,filter,includeChildren` + // // At some point in the future, behavior will be removed and specifying an - // empty updateMask will be an error. + // empty `updateMask` will be an error. // // For a detailed `FieldMask` definition, see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // - // Example: `updateMask=filter`. + // For example: `updateMask=filter` google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -1249,7 +1390,9 @@ message DeleteSinkRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" // "folders/[FOLDER_ID]/sinks/[SINK_ID]" // - // Example: `"projects/my-project-id/sinks/my-sink-id"`. + // For example: + // + // `"projects/my-project/sinks/my-sink"` string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1258,12 +1401,11 @@ message DeleteSinkRequest { ]; } -// Specifies a set of log entries that are not to be stored in -// Logging. If your GCP resource receives a large volume of logs, you can -// use exclusions to reduce your chargeable logs. Exclusions are -// processed after log sinks, so you can export log entries before they are -// excluded. Note that organization-level and folder-level exclusions don't -// apply to child resources, and that you can't exclude audit log entries. +// Specifies a set of log entries that are filtered out by a sink. If +// your Google Cloud resource receives a large volume of log entries, you can +// use exclusions to reduce your chargeable logs. Note that exclusions on +// organization-level and folder-level sinks don't apply to child resources. +// Note also that you cannot modify the _Required sink or exclude logs from it. message LogExclusion { option (google.api.resource) = { type: "logging.googleapis.com/LogExclusion" @@ -1287,10 +1429,11 @@ message LogExclusion { // matches the log entries to be excluded. By using the [sample // function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. - // For example, the following query matches 99% of low-severity log - // entries from Google Cloud Storage buckets: // - // `"resource.type=gcs_bucket severity; + + /** + * Calls GetSettings. + * @param request GetSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Settings + */ + public getSettings(request: google.logging.v2.IGetSettingsRequest, callback: google.logging.v2.ConfigServiceV2.GetSettingsCallback): void; + + /** + * Calls GetSettings. + * @param request GetSettingsRequest message or plain object + * @returns Promise + */ + public getSettings(request: google.logging.v2.IGetSettingsRequest): Promise; + + /** + * Calls UpdateSettings. + * @param request UpdateSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Settings + */ + public updateSettings(request: google.logging.v2.IUpdateSettingsRequest, callback: google.logging.v2.ConfigServiceV2.UpdateSettingsCallback): void; + + /** + * Calls UpdateSettings. + * @param request UpdateSettingsRequest message or plain object + * @returns Promise + */ + public updateSettings(request: google.logging.v2.IUpdateSettingsRequest): Promise; + + /** + * Calls CopyLogEntries. + * @param request CopyLogEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public copyLogEntries(request: google.logging.v2.ICopyLogEntriesRequest, callback: google.logging.v2.ConfigServiceV2.CopyLogEntriesCallback): void; + + /** + * Calls CopyLogEntries. + * @param request CopyLogEntriesRequest message or plain object + * @returns Promise + */ + public copyLogEntries(request: google.logging.v2.ICopyLogEntriesRequest): Promise; } namespace ConfigServiceV2 { @@ -6459,6 +6612,27 @@ export namespace google { * @param [response] CmekSettings */ type UpdateCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSettings}. + * @param error Error, if any + * @param [response] Settings + */ + type GetSettingsCallback = (error: (Error|null), response?: google.logging.v2.Settings) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSettings}. + * @param error Error, if any + * @param [response] Settings + */ + type UpdateSettingsCallback = (error: (Error|null), response?: google.logging.v2.Settings) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#copyLogEntries}. + * @param error Error, if any + * @param [response] Operation + */ + type CopyLogEntriesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a LogBucket. */ @@ -6484,6 +6658,12 @@ export namespace google { /** LogBucket lifecycleState */ lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); + + /** LogBucket restrictedFields */ + restrictedFields?: (string[]|null); + + /** LogBucket cmekSettings */ + cmekSettings?: (google.logging.v2.ICmekSettings|null); } /** Represents a LogBucket. */ @@ -6516,6 +6696,12 @@ export namespace google { /** LogBucket lifecycleState. */ public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); + /** LogBucket restrictedFields. */ + public restrictedFields: string[]; + + /** LogBucket cmekSettings. */ + public cmekSettings?: (google.logging.v2.ICmekSettings|null); + /** * Creates a new LogBucket instance using the specified properties. * @param [properties] Properties to set @@ -6587,13 +6773,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** LifecycleState enum. */ - enum LifecycleState { - LIFECYCLE_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - DELETE_REQUESTED = 2 - } - /** Properties of a LogView. */ interface ILogView { @@ -9805,1186 +9984,1822 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Represents a MetricsServiceV2 */ - class MetricsServiceV2 extends $protobuf.rpc.Service { + /** Properties of a GetSettingsRequest. */ + interface IGetSettingsRequest { + + /** GetSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetSettingsRequest. */ + class GetSettingsRequest implements IGetSettingsRequest { /** - * Constructs a new MetricsServiceV2 service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new GetSettingsRequest. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.logging.v2.IGetSettingsRequest); + + /** GetSettingsRequest name. */ + public name: string; /** - * Creates new MetricsServiceV2 service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new GetSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSettingsRequest instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetricsServiceV2; + public static create(properties?: google.logging.v2.IGetSettingsRequest): google.logging.v2.GetSettingsRequest; /** - * Calls ListLogMetrics. - * @param request ListLogMetricsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLogMetricsResponse + * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.logging.v2.GetSettingsRequest.verify|verify} messages. + * @param message GetSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest, callback: google.logging.v2.MetricsServiceV2.ListLogMetricsCallback): void; + public static encode(message: google.logging.v2.IGetSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListLogMetrics. - * @param request ListLogMetricsRequest message or plain object - * @returns Promise + * Encodes the specified GetSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSettingsRequest.verify|verify} messages. + * @param message GetSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest): Promise; + public static encodeDelimited(message: google.logging.v2.IGetSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetLogMetric. - * @param request GetLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric + * Decodes a GetSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getLogMetric(request: google.logging.v2.IGetLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.GetLogMetricCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetSettingsRequest; /** - * Calls GetLogMetric. - * @param request GetLogMetricRequest message or plain object - * @returns Promise + * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getLogMetric(request: google.logging.v2.IGetLogMetricRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetSettingsRequest; /** - * Calls CreateLogMetric. - * @param request CreateLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric + * Verifies a GetSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.CreateLogMetricCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateLogMetric. - * @param request CreateLogMetricRequest message or plain object - * @returns Promise + * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSettingsRequest */ - public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetSettingsRequest; /** - * Calls UpdateLogMetric. - * @param request UpdateLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LogMetric + * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. + * @param message GetSettingsRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback): void; + public static toObject(message: google.logging.v2.GetSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateLogMetric. - * @param request UpdateLogMetricRequest message or plain object - * @returns Promise + * Converts this GetSettingsRequest to JSON. + * @returns JSON object */ - public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSettingsRequest. */ + interface IUpdateSettingsRequest { + + /** UpdateSettingsRequest name */ + name?: (string|null); + + /** UpdateSettingsRequest settings */ + settings?: (google.logging.v2.ISettings|null); + + /** UpdateSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSettingsRequest. */ + class UpdateSettingsRequest implements IUpdateSettingsRequest { /** - * Calls DeleteLogMetric. - * @param request DeleteLogMetricRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Constructs a new UpdateSettingsRequest. + * @param [properties] Properties to set */ - public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback): void; + constructor(properties?: google.logging.v2.IUpdateSettingsRequest); + + /** UpdateSettingsRequest name. */ + public name: string; + + /** UpdateSettingsRequest settings. */ + public settings?: (google.logging.v2.ISettings|null); + + /** UpdateSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls DeleteLogMetric. - * @param request DeleteLogMetricRequest message or plain object - * @returns Promise + * Creates a new UpdateSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSettingsRequest instance */ - public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest): Promise; - } - - namespace MetricsServiceV2 { + public static create(properties?: google.logging.v2.IUpdateSettingsRequest): google.logging.v2.UpdateSettingsRequest; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. - * @param error Error, if any - * @param [response] ListLogMetricsResponse + * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateSettingsRequest.verify|verify} messages. + * @param message UpdateSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListLogMetricsCallback = (error: (Error|null), response?: google.logging.v2.ListLogMetricsResponse) => void; + public static encode(message: google.logging.v2.IUpdateSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. - * @param error Error, if any - * @param [response] LogMetric + * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSettingsRequest.verify|verify} messages. + * @param message UpdateSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + public static encodeDelimited(message: google.logging.v2.IUpdateSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. - * @param error Error, if any - * @param [response] LogMetric + * Decodes an UpdateSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateSettingsRequest; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. - * @param error Error, if any - * @param [response] LogMetric + * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateSettingsRequest; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. - * @param error Error, if any - * @param [response] Empty + * Verifies an UpdateSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeleteLogMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a LogMetric. */ - interface ILogMetric { + /** + * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateSettingsRequest; - /** LogMetric name */ - name?: (string|null); + /** + * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LogMetric description */ - description?: (string|null); - - /** LogMetric filter */ - filter?: (string|null); - - /** LogMetric metricDescriptor */ - metricDescriptor?: (google.api.IMetricDescriptor|null); - - /** LogMetric valueExtractor */ - valueExtractor?: (string|null); - - /** LogMetric labelExtractors */ - labelExtractors?: ({ [k: string]: string }|null); + /** + * Converts this UpdateSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** LogMetric bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** Properties of a Settings. */ + interface ISettings { - /** LogMetric createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Settings name */ + name?: (string|null); - /** LogMetric updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Settings storageLocation */ + storageLocation?: (string|null); - /** LogMetric version */ - version?: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion|null); + /** Settings disableDefaultSink */ + disableDefaultSink?: (boolean|null); } - /** Represents a LogMetric. */ - class LogMetric implements ILogMetric { + /** Represents a Settings. */ + class Settings implements ISettings { /** - * Constructs a new LogMetric. + * Constructs a new Settings. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.ILogMetric); + constructor(properties?: google.logging.v2.ISettings); - /** LogMetric name. */ + /** Settings name. */ public name: string; - /** LogMetric description. */ - public description: string; - - /** LogMetric filter. */ - public filter: string; - - /** LogMetric metricDescriptor. */ - public metricDescriptor?: (google.api.IMetricDescriptor|null); - - /** LogMetric valueExtractor. */ - public valueExtractor: string; - - /** LogMetric labelExtractors. */ - public labelExtractors: { [k: string]: string }; - - /** LogMetric bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); - - /** LogMetric createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Settings storageLocation. */ + public storageLocation: string; - /** LogMetric updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** LogMetric version. */ - public version: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion); + /** Settings disableDefaultSink. */ + public disableDefaultSink: boolean; /** - * Creates a new LogMetric instance using the specified properties. + * Creates a new Settings instance using the specified properties. * @param [properties] Properties to set - * @returns LogMetric instance + * @returns Settings instance */ - public static create(properties?: google.logging.v2.ILogMetric): google.logging.v2.LogMetric; + public static create(properties?: google.logging.v2.ISettings): google.logging.v2.Settings; /** - * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. - * @param message LogMetric message or plain object to encode + * Encodes the specified Settings message. Does not implicitly {@link google.logging.v2.Settings.verify|verify} messages. + * @param message Settings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ISettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. - * @param message LogMetric message or plain object to encode + * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.logging.v2.Settings.verify|verify} messages. + * @param message Settings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ISettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogMetric message from the specified reader or buffer. + * Decodes a Settings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogMetric + * @returns Settings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogMetric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.Settings; /** - * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * Decodes a Settings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogMetric + * @returns Settings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogMetric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.Settings; /** - * Verifies a LogMetric message. + * Verifies a Settings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * Creates a Settings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogMetric + * @returns Settings */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.LogMetric; + public static fromObject(object: { [k: string]: any }): google.logging.v2.Settings; /** - * Creates a plain object from a LogMetric message. Also converts values to other types if specified. - * @param message LogMetric + * Creates a plain object from a Settings message. Also converts values to other types if specified. + * @param message Settings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.LogMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.Settings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogMetric to JSON. + * Converts this Settings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LogMetric { - - /** ApiVersion enum. */ - enum ApiVersion { - V2 = 0, - V1 = 1 - } - } + /** Properties of a CopyLogEntriesRequest. */ + interface ICopyLogEntriesRequest { - /** Properties of a ListLogMetricsRequest. */ - interface IListLogMetricsRequest { - - /** ListLogMetricsRequest parent */ - parent?: (string|null); + /** CopyLogEntriesRequest name */ + name?: (string|null); - /** ListLogMetricsRequest pageToken */ - pageToken?: (string|null); + /** CopyLogEntriesRequest filter */ + filter?: (string|null); - /** ListLogMetricsRequest pageSize */ - pageSize?: (number|null); + /** CopyLogEntriesRequest destination */ + destination?: (string|null); } - /** Represents a ListLogMetricsRequest. */ - class ListLogMetricsRequest implements IListLogMetricsRequest { + /** Represents a CopyLogEntriesRequest. */ + class CopyLogEntriesRequest implements ICopyLogEntriesRequest { /** - * Constructs a new ListLogMetricsRequest. + * Constructs a new CopyLogEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogMetricsRequest); + constructor(properties?: google.logging.v2.ICopyLogEntriesRequest); - /** ListLogMetricsRequest parent. */ - public parent: string; + /** CopyLogEntriesRequest name. */ + public name: string; - /** ListLogMetricsRequest pageToken. */ - public pageToken: string; + /** CopyLogEntriesRequest filter. */ + public filter: string; - /** ListLogMetricsRequest pageSize. */ - public pageSize: number; + /** CopyLogEntriesRequest destination. */ + public destination: string; /** - * Creates a new ListLogMetricsRequest instance using the specified properties. + * Creates a new CopyLogEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogMetricsRequest instance + * @returns CopyLogEntriesRequest instance */ - public static create(properties?: google.logging.v2.IListLogMetricsRequest): google.logging.v2.ListLogMetricsRequest; + public static create(properties?: google.logging.v2.ICopyLogEntriesRequest): google.logging.v2.CopyLogEntriesRequest; /** - * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. - * @param message ListLogMetricsRequest message or plain object to encode + * Encodes the specified CopyLogEntriesRequest message. Does not implicitly {@link google.logging.v2.CopyLogEntriesRequest.verify|verify} messages. + * @param message CopyLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICopyLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. - * @param message ListLogMetricsRequest message or plain object to encode + * Encodes the specified CopyLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesRequest.verify|verify} messages. + * @param message CopyLogEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICopyLogEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * Decodes a CopyLogEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogMetricsRequest + * @returns CopyLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CopyLogEntriesRequest; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * Decodes a CopyLogEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogMetricsRequest + * @returns CopyLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CopyLogEntriesRequest; /** - * Verifies a ListLogMetricsRequest message. + * Verifies a CopyLogEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CopyLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogMetricsRequest + * @returns CopyLogEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CopyLogEntriesRequest; /** - * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. - * @param message ListLogMetricsRequest + * Creates a plain object from a CopyLogEntriesRequest message. Also converts values to other types if specified. + * @param message CopyLogEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CopyLogEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogMetricsRequest to JSON. + * Converts this CopyLogEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLogMetricsResponse. */ - interface IListLogMetricsResponse { + /** Properties of a CopyLogEntriesMetadata. */ + interface ICopyLogEntriesMetadata { - /** ListLogMetricsResponse metrics */ - metrics?: (google.logging.v2.ILogMetric[]|null); + /** CopyLogEntriesMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** ListLogMetricsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CopyLogEntriesMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** CopyLogEntriesMetadata state */ + state?: (google.logging.v2.OperationState|keyof typeof google.logging.v2.OperationState|null); + + /** CopyLogEntriesMetadata cancellationRequested */ + cancellationRequested?: (boolean|null); + + /** CopyLogEntriesMetadata request */ + request?: (google.logging.v2.ICopyLogEntriesRequest|null); + + /** CopyLogEntriesMetadata progress */ + progress?: (number|null); + + /** CopyLogEntriesMetadata writerIdentity */ + writerIdentity?: (string|null); } - /** Represents a ListLogMetricsResponse. */ - class ListLogMetricsResponse implements IListLogMetricsResponse { + /** Represents a CopyLogEntriesMetadata. */ + class CopyLogEntriesMetadata implements ICopyLogEntriesMetadata { /** - * Constructs a new ListLogMetricsResponse. + * Constructs a new CopyLogEntriesMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListLogMetricsResponse); + constructor(properties?: google.logging.v2.ICopyLogEntriesMetadata); - /** ListLogMetricsResponse metrics. */ - public metrics: google.logging.v2.ILogMetric[]; + /** CopyLogEntriesMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** ListLogMetricsResponse nextPageToken. */ - public nextPageToken: string; + /** CopyLogEntriesMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** CopyLogEntriesMetadata state. */ + public state: (google.logging.v2.OperationState|keyof typeof google.logging.v2.OperationState); + + /** CopyLogEntriesMetadata cancellationRequested. */ + public cancellationRequested: boolean; + + /** CopyLogEntriesMetadata request. */ + public request?: (google.logging.v2.ICopyLogEntriesRequest|null); + + /** CopyLogEntriesMetadata progress. */ + public progress: number; + + /** CopyLogEntriesMetadata writerIdentity. */ + public writerIdentity: string; /** - * Creates a new ListLogMetricsResponse instance using the specified properties. + * Creates a new CopyLogEntriesMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListLogMetricsResponse instance + * @returns CopyLogEntriesMetadata instance */ - public static create(properties?: google.logging.v2.IListLogMetricsResponse): google.logging.v2.ListLogMetricsResponse; + public static create(properties?: google.logging.v2.ICopyLogEntriesMetadata): google.logging.v2.CopyLogEntriesMetadata; /** - * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. - * @param message ListLogMetricsResponse message or plain object to encode + * Encodes the specified CopyLogEntriesMetadata message. Does not implicitly {@link google.logging.v2.CopyLogEntriesMetadata.verify|verify} messages. + * @param message CopyLogEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICopyLogEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. - * @param message ListLogMetricsResponse message or plain object to encode + * Encodes the specified CopyLogEntriesMetadata message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesMetadata.verify|verify} messages. + * @param message CopyLogEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICopyLogEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * Decodes a CopyLogEntriesMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLogMetricsResponse + * @returns CopyLogEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CopyLogEntriesMetadata; /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * Decodes a CopyLogEntriesMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLogMetricsResponse + * @returns CopyLogEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CopyLogEntriesMetadata; /** - * Verifies a ListLogMetricsResponse message. + * Verifies a CopyLogEntriesMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CopyLogEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLogMetricsResponse + * @returns CopyLogEntriesMetadata */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsResponse; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CopyLogEntriesMetadata; /** - * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. - * @param message ListLogMetricsResponse + * Creates a plain object from a CopyLogEntriesMetadata message. Also converts values to other types if specified. + * @param message CopyLogEntriesMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListLogMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CopyLogEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLogMetricsResponse to JSON. + * Converts this CopyLogEntriesMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetLogMetricRequest. */ - interface IGetLogMetricRequest { + /** Properties of a CopyLogEntriesResponse. */ + interface ICopyLogEntriesResponse { - /** GetLogMetricRequest metricName */ - metricName?: (string|null); + /** CopyLogEntriesResponse logEntriesCopiedCount */ + logEntriesCopiedCount?: (number|Long|string|null); } - /** Represents a GetLogMetricRequest. */ - class GetLogMetricRequest implements IGetLogMetricRequest { + /** Represents a CopyLogEntriesResponse. */ + class CopyLogEntriesResponse implements ICopyLogEntriesResponse { /** - * Constructs a new GetLogMetricRequest. + * Constructs a new CopyLogEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IGetLogMetricRequest); + constructor(properties?: google.logging.v2.ICopyLogEntriesResponse); - /** GetLogMetricRequest metricName. */ - public metricName: string; + /** CopyLogEntriesResponse logEntriesCopiedCount. */ + public logEntriesCopiedCount: (number|Long|string); /** - * Creates a new GetLogMetricRequest instance using the specified properties. + * Creates a new CopyLogEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetLogMetricRequest instance + * @returns CopyLogEntriesResponse instance */ - public static create(properties?: google.logging.v2.IGetLogMetricRequest): google.logging.v2.GetLogMetricRequest; + public static create(properties?: google.logging.v2.ICopyLogEntriesResponse): google.logging.v2.CopyLogEntriesResponse; /** - * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. - * @param message GetLogMetricRequest message or plain object to encode + * Encodes the specified CopyLogEntriesResponse message. Does not implicitly {@link google.logging.v2.CopyLogEntriesResponse.verify|verify} messages. + * @param message CopyLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ICopyLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. - * @param message GetLogMetricRequest message or plain object to encode + * Encodes the specified CopyLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesResponse.verify|verify} messages. + * @param message CopyLogEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ICopyLogEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * Decodes a CopyLogEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetLogMetricRequest + * @returns CopyLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetLogMetricRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CopyLogEntriesResponse; /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a CopyLogEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetLogMetricRequest + * @returns CopyLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetLogMetricRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CopyLogEntriesResponse; /** - * Verifies a GetLogMetricRequest message. + * Verifies a CopyLogEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CopyLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetLogMetricRequest + * @returns CopyLogEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.GetLogMetricRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.CopyLogEntriesResponse; /** - * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. - * @param message GetLogMetricRequest + * Creates a plain object from a CopyLogEntriesResponse message. Also converts values to other types if specified. + * @param message CopyLogEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.GetLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.CopyLogEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetLogMetricRequest to JSON. + * Converts this CopyLogEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateLogMetricRequest. */ - interface ICreateLogMetricRequest { - - /** CreateLogMetricRequest parent */ - parent?: (string|null); + /** LifecycleState enum. */ + enum LifecycleState { + LIFECYCLE_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + DELETE_REQUESTED = 2 + } - /** CreateLogMetricRequest metric */ - metric?: (google.logging.v2.ILogMetric|null); + /** OperationState enum. */ + enum OperationState { + OPERATION_STATE_UNSPECIFIED = 0, + OPERATION_STATE_SCHEDULED = 1, + OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2, + OPERATION_STATE_RUNNING = 3, + OPERATION_STATE_SUCCEEDED = 4, + OPERATION_STATE_FAILED = 5, + OPERATION_STATE_CANCELLED = 6 } - /** Represents a CreateLogMetricRequest. */ - class CreateLogMetricRequest implements ICreateLogMetricRequest { + /** Represents a MetricsServiceV2 */ + class MetricsServiceV2 extends $protobuf.rpc.Service { /** - * Constructs a new CreateLogMetricRequest. - * @param [properties] Properties to set + * Constructs a new MetricsServiceV2 service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.logging.v2.ICreateLogMetricRequest); - - /** CreateLogMetricRequest parent. */ - public parent: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** CreateLogMetricRequest metric. */ - public metric?: (google.logging.v2.ILogMetric|null); + /** + * Creates new MetricsServiceV2 service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetricsServiceV2; /** - * Creates a new CreateLogMetricRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateLogMetricRequest instance + * Calls ListLogMetrics. + * @param request ListLogMetricsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLogMetricsResponse */ - public static create(properties?: google.logging.v2.ICreateLogMetricRequest): google.logging.v2.CreateLogMetricRequest; + public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest, callback: google.logging.v2.MetricsServiceV2.ListLogMetricsCallback): void; /** - * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @param message CreateLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListLogMetrics. + * @param request ListLogMetricsRequest message or plain object + * @returns Promise */ - public static encode(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listLogMetrics(request: google.logging.v2.IListLogMetricsRequest): Promise; /** - * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @param message CreateLogMetricRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetLogMetric. + * @param request GetLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public static encodeDelimited(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getLogMetric(request: google.logging.v2.IGetLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.GetLogMetricCallback): void; /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetLogMetric. + * @param request GetLogMetricRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateLogMetricRequest; + public getLogMetric(request: google.logging.v2.IGetLogMetricRequest): Promise; /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateLogMetric. + * @param request CreateLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateLogMetricRequest; + public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.CreateLogMetricCallback): void; /** - * Verifies a CreateLogMetricRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateLogMetric. + * @param request CreateLogMetricRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public createLogMetric(request: google.logging.v2.ICreateLogMetricRequest): Promise; /** - * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateLogMetricRequest + * Calls UpdateLogMetric. + * @param request UpdateLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LogMetric */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateLogMetricRequest; + public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback): void; /** - * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. - * @param message CreateLogMetricRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateLogMetric. + * @param request UpdateLogMetricRequest message or plain object + * @returns Promise */ - public static toObject(message: google.logging.v2.CreateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateLogMetric(request: google.logging.v2.IUpdateLogMetricRequest): Promise; /** - * Converts this CreateLogMetricRequest to JSON. - * @returns JSON object + * Calls DeleteLogMetric. + * @param request DeleteLogMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public toJSON(): { [k: string]: any }; + public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest, callback: google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback): void; + + /** + * Calls DeleteLogMetric. + * @param request DeleteLogMetricRequest message or plain object + * @returns Promise + */ + public deleteLogMetric(request: google.logging.v2.IDeleteLogMetricRequest): Promise; } - /** Properties of an UpdateLogMetricRequest. */ - interface IUpdateLogMetricRequest { + namespace MetricsServiceV2 { - /** UpdateLogMetricRequest metricName */ - metricName?: (string|null); + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * @param error Error, if any + * @param [response] ListLogMetricsResponse + */ + type ListLogMetricsCallback = (error: (Error|null), response?: google.logging.v2.ListLogMetricsResponse) => void; - /** UpdateLogMetricRequest metric */ - metric?: (google.logging.v2.ILogMetric|null); + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type GetLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type CreateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * @param error Error, if any + * @param [response] LogMetric + */ + type UpdateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteLogMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Represents an UpdateLogMetricRequest. */ - class UpdateLogMetricRequest implements IUpdateLogMetricRequest { + /** Properties of a LogMetric. */ + interface ILogMetric { + + /** LogMetric name */ + name?: (string|null); + + /** LogMetric description */ + description?: (string|null); + + /** LogMetric filter */ + filter?: (string|null); + + /** LogMetric disabled */ + disabled?: (boolean|null); + + /** LogMetric metricDescriptor */ + metricDescriptor?: (google.api.IMetricDescriptor|null); + + /** LogMetric valueExtractor */ + valueExtractor?: (string|null); + + /** LogMetric labelExtractors */ + labelExtractors?: ({ [k: string]: string }|null); + + /** LogMetric bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** LogMetric createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric version */ + version?: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion|null); + } + + /** Represents a LogMetric. */ + class LogMetric implements ILogMetric { /** - * Constructs a new UpdateLogMetricRequest. + * Constructs a new LogMetric. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IUpdateLogMetricRequest); + constructor(properties?: google.logging.v2.ILogMetric); - /** UpdateLogMetricRequest metricName. */ - public metricName: string; + /** LogMetric name. */ + public name: string; - /** UpdateLogMetricRequest metric. */ - public metric?: (google.logging.v2.ILogMetric|null); + /** LogMetric description. */ + public description: string; + + /** LogMetric filter. */ + public filter: string; + + /** LogMetric disabled. */ + public disabled: boolean; + + /** LogMetric metricDescriptor. */ + public metricDescriptor?: (google.api.IMetricDescriptor|null); + + /** LogMetric valueExtractor. */ + public valueExtractor: string; + + /** LogMetric labelExtractors. */ + public labelExtractors: { [k: string]: string }; + + /** LogMetric bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** LogMetric createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** LogMetric version. */ + public version: (google.logging.v2.LogMetric.ApiVersion|keyof typeof google.logging.v2.LogMetric.ApiVersion); /** - * Creates a new UpdateLogMetricRequest instance using the specified properties. + * Creates a new LogMetric instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateLogMetricRequest instance + * @returns LogMetric instance */ - public static create(properties?: google.logging.v2.IUpdateLogMetricRequest): google.logging.v2.UpdateLogMetricRequest; + public static create(properties?: google.logging.v2.ILogMetric): google.logging.v2.LogMetric; /** - * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @param message UpdateLogMetricRequest message or plain object to encode + * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @param message LogMetric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @param message UpdateLogMetricRequest message or plain object to encode + * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * @param message LogMetric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILogMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * Decodes a LogMetric message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateLogMetricRequest + * @returns LogMetric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateLogMetricRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LogMetric; /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a LogMetric message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateLogMetricRequest + * @returns LogMetric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateLogMetricRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LogMetric; /** - * Verifies an UpdateLogMetricRequest message. + * Verifies a LogMetric message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateLogMetricRequest + * @returns LogMetric */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateLogMetricRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.LogMetric; /** - * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. - * @param message UpdateLogMetricRequest + * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * @param message LogMetric * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.UpdateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.LogMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateLogMetricRequest to JSON. + * Converts this LogMetric to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteLogMetricRequest. */ - interface IDeleteLogMetricRequest { + namespace LogMetric { - /** DeleteLogMetricRequest metricName */ - metricName?: (string|null); - } + /** ApiVersion enum. */ + enum ApiVersion { + V2 = 0, + V1 = 1 + } + } - /** Represents a DeleteLogMetricRequest. */ - class DeleteLogMetricRequest implements IDeleteLogMetricRequest { + /** Properties of a ListLogMetricsRequest. */ + interface IListLogMetricsRequest { + + /** ListLogMetricsRequest parent */ + parent?: (string|null); + + /** ListLogMetricsRequest pageToken */ + pageToken?: (string|null); + + /** ListLogMetricsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListLogMetricsRequest. */ + class ListLogMetricsRequest implements IListLogMetricsRequest { /** - * Constructs a new DeleteLogMetricRequest. + * Constructs a new ListLogMetricsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IDeleteLogMetricRequest); + constructor(properties?: google.logging.v2.IListLogMetricsRequest); - /** DeleteLogMetricRequest metricName. */ - public metricName: string; + /** ListLogMetricsRequest parent. */ + public parent: string; + + /** ListLogMetricsRequest pageToken. */ + public pageToken: string; + + /** ListLogMetricsRequest pageSize. */ + public pageSize: number; /** - * Creates a new DeleteLogMetricRequest instance using the specified properties. + * Creates a new ListLogMetricsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteLogMetricRequest instance + * @returns ListLogMetricsRequest instance */ - public static create(properties?: google.logging.v2.IDeleteLogMetricRequest): google.logging.v2.DeleteLogMetricRequest; + public static create(properties?: google.logging.v2.IListLogMetricsRequest): google.logging.v2.ListLogMetricsRequest; /** - * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. - * @param message DeleteLogMetricRequest message or plain object to encode + * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @param message ListLogMetricsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. - * @param message DeleteLogMetricRequest message or plain object to encode + * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @param message ListLogMetricsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IListLogMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * Decodes a ListLogMetricsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteLogMetricRequest + * @returns ListLogMetricsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogMetricRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsRequest; /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteLogMetricRequest + * @returns ListLogMetricsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogMetricRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsRequest; /** - * Verifies a DeleteLogMetricRequest message. + * Verifies a ListLogMetricsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteLogMetricRequest + * @returns ListLogMetricsRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogMetricRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsRequest; /** - * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. - * @param message DeleteLogMetricRequest + * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * @param message ListLogMetricsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.ListLogMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteLogMetricRequest to JSON. + * Converts this ListLogMetricsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - } - /** Namespace api. */ - namespace api { + /** Properties of a ListLogMetricsResponse. */ + interface IListLogMetricsResponse { - /** Properties of a Http. */ - interface IHttp { + /** ListLogMetricsResponse metrics */ + metrics?: (google.logging.v2.ILogMetric[]|null); - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** ListLogMetricsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** Represents a ListLogMetricsResponse. */ + class ListLogMetricsResponse implements IListLogMetricsResponse { - /** Represents a Http. */ - class Http implements IHttp { + /** + * Constructs a new ListLogMetricsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLogMetricsResponse); - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** ListLogMetricsResponse metrics. */ + public metrics: google.logging.v2.ILogMetric[]; - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** ListLogMetricsResponse nextPageToken. */ + public nextPageToken: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** + * Creates a new ListLogMetricsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLogMetricsResponse instance + */ + public static create(properties?: google.logging.v2.IListLogMetricsResponse): google.logging.v2.ListLogMetricsResponse; - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; + /** + * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @param message ListLogMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @param message ListLogMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLogMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLogMetricsResponse; - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLogMetricsResponse; - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + /** + * Verifies a ListLogMetricsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLogMetricsResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLogMetricsResponse; - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + /** + * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * @param message ListLogMetricsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLogMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this ListLogMetricsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a GetLogMetricRequest. */ + interface IGetLogMetricRequest { - /** Properties of a HttpRule. */ - interface IHttpRule { + /** GetLogMetricRequest metricName */ + metricName?: (string|null); + } - /** HttpRule selector */ - selector?: (string|null); + /** Represents a GetLogMetricRequest. */ + class GetLogMetricRequest implements IGetLogMetricRequest { - /** HttpRule get */ - get?: (string|null); + /** + * Constructs a new GetLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetLogMetricRequest); - /** HttpRule put */ - put?: (string|null); + /** GetLogMetricRequest metricName. */ + public metricName: string; - /** HttpRule post */ - post?: (string|null); + /** + * Creates a new GetLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IGetLogMetricRequest): google.logging.v2.GetLogMetricRequest; - /** HttpRule delete */ - "delete"?: (string|null); + /** + * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @param message GetLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule patch */ - patch?: (string|null); + /** + * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @param message GetLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IGetLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetLogMetricRequest; - /** HttpRule body */ - body?: (string|null); + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetLogMetricRequest; - /** HttpRule responseBody */ - responseBody?: (string|null); + /** + * Verifies a GetLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } + /** + * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetLogMetricRequest; - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** + * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * @param message GetLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.GetLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); + /** + * Converts this GetLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** HttpRule selector. */ - public selector: string; + /** Properties of a CreateLogMetricRequest. */ + interface ICreateLogMetricRequest { - /** HttpRule get. */ - public get?: (string|null); + /** CreateLogMetricRequest parent */ + parent?: (string|null); - /** HttpRule put. */ - public put?: (string|null); + /** CreateLogMetricRequest metric */ + metric?: (google.logging.v2.ILogMetric|null); + } - /** HttpRule post. */ - public post?: (string|null); + /** Represents a CreateLogMetricRequest. */ + class CreateLogMetricRequest implements ICreateLogMetricRequest { - /** HttpRule delete. */ - public delete?: (string|null); + /** + * Constructs a new CreateLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateLogMetricRequest); - /** HttpRule patch. */ - public patch?: (string|null); + /** CreateLogMetricRequest parent. */ + public parent: string; - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** CreateLogMetricRequest metric. */ + public metric?: (google.logging.v2.ILogMetric|null); - /** HttpRule body. */ - public body: string; + /** + * Creates a new CreateLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.ICreateLogMetricRequest): google.logging.v2.CreateLogMetricRequest; - /** HttpRule responseBody. */ - public responseBody: string; + /** + * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @param message CreateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** + * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @param message CreateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateLogMetricRequest; - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateLogMetricRequest; - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a CreateLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateLogMetricRequest; - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + /** + * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. + * @param message CreateLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + /** + * Converts this CreateLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of an UpdateLogMetricRequest. */ + interface IUpdateLogMetricRequest { - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + /** UpdateLogMetricRequest metricName */ + metricName?: (string|null); - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** UpdateLogMetricRequest metric */ + metric?: (google.logging.v2.ILogMetric|null); + } - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents an UpdateLogMetricRequest. */ + class UpdateLogMetricRequest implements IUpdateLogMetricRequest { + + /** + * Constructs a new UpdateLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IUpdateLogMetricRequest); + + /** UpdateLogMetricRequest metricName. */ + public metricName: string; + + /** UpdateLogMetricRequest metric. */ + public metric?: (google.logging.v2.ILogMetric|null); + + /** + * Creates a new UpdateLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IUpdateLogMetricRequest): google.logging.v2.UpdateLogMetricRequest; + + /** + * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @param message UpdateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @param message UpdateLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IUpdateLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.UpdateLogMetricRequest; + + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.UpdateLogMetricRequest; + + /** + * Verifies an UpdateLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.UpdateLogMetricRequest; + + /** + * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. + * @param message UpdateLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.UpdateLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteLogMetricRequest. */ + interface IDeleteLogMetricRequest { + + /** DeleteLogMetricRequest metricName */ + metricName?: (string|null); + } + + /** Represents a DeleteLogMetricRequest. */ + class DeleteLogMetricRequest implements IDeleteLogMetricRequest { + + /** + * Constructs a new DeleteLogMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteLogMetricRequest); + + /** DeleteLogMetricRequest metricName. */ + public metricName: string; + + /** + * Creates a new DeleteLogMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLogMetricRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteLogMetricRequest): google.logging.v2.DeleteLogMetricRequest; + + /** + * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @param message DeleteLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @param message DeleteLogMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteLogMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLogMetricRequest; + + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLogMetricRequest; + + /** + * Verifies a DeleteLogMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLogMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLogMetricRequest; + + /** + * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. + * @param message DeleteLogMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteLogMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLogMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } + } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Namespace api. */ + namespace api { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** Properties of a Http. */ + interface IHttp { - /** CustomHttpPattern path */ - path?: (string|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.api.IHttp); - /** CustomHttpPattern kind. */ - public kind: string; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** CustomHttpPattern path. */ - public path: string; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns Http instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. @@ -11546,1241 +12361,2157 @@ export namespace google { */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Distribution. */ + interface IDistribution { + + /** Distribution count */ + count?: (number|Long|string|null); + + /** Distribution mean */ + mean?: (number|null); + + /** Distribution sumOfSquaredDeviation */ + sumOfSquaredDeviation?: (number|null); + + /** Distribution range */ + range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts */ + bucketCounts?: ((number|Long|string)[]|null); + + /** Distribution exemplars */ + exemplars?: (google.api.Distribution.IExemplar[]|null); + } + + /** Represents a Distribution. */ + class Distribution implements IDistribution { + + /** + * Constructs a new Distribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDistribution); + + /** Distribution count. */ + public count: (number|Long|string); + + /** Distribution mean. */ + public mean: number; + + /** Distribution sumOfSquaredDeviation. */ + public sumOfSquaredDeviation: number; + + /** Distribution range. */ + public range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts. */ + public bucketCounts: (number|Long|string)[]; + + /** Distribution exemplars. */ + public exemplars: google.api.Distribution.IExemplar[]; + + /** + * Creates a new Distribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Distribution instance + */ + public static create(properties?: google.api.IDistribution): google.api.Distribution; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; + + /** + * Verifies a Distribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Distribution + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Distribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Distribution { + + /** Properties of a Range. */ + interface IRange { + + /** Range min */ + min?: (number|null); + + /** Range max */ + max?: (number|null); + } + + /** Represents a Range. */ + class Range implements IRange { + + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IRange); + + /** Range min. */ + public min: number; + + /** Range max. */ + public max: number; + + /** + * Creates a new Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Range instance + */ + public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; + + /** + * Verifies a Range message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BucketOptions. */ + interface IBucketOptions { + + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + } + + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { + + /** + * Constructs a new BucketOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IBucketOptions); + + /** BucketOptions linearBuckets. */ + public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets. */ + public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets. */ + public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + + /** BucketOptions options. */ + public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + + /** + * Creates a new BucketOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BucketOptions instance + */ + public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions; + + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions; + + /** + * Verifies a BucketOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BucketOptions + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; + + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @param message BucketOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BucketOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BucketOptions { + + /** Properties of a Linear. */ + interface ILinear { + + /** Linear numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Linear width */ + width?: (number|null); + + /** Linear offset */ + offset?: (number|null); + } + + /** Represents a Linear. */ + class Linear implements ILinear { + + /** + * Constructs a new Linear. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.ILinear); + + /** Linear numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Linear width. */ + public width: number; + + /** Linear offset. */ + public offset: number; + + /** + * Creates a new Linear instance using the specified properties. + * @param [properties] Properties to set + * @returns Linear instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; + + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Linear message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Linear; + + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Linear; + + /** + * Verifies a Linear message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Linear + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @param message Linear + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Linear to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Exponential. */ + interface IExponential { + + /** Exponential numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Exponential growthFactor */ + growthFactor?: (number|null); + + /** Exponential scale */ + scale?: (number|null); + } + + /** Represents an Exponential. */ + class Exponential implements IExponential { + + /** + * Constructs a new Exponential. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + + /** Exponential numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Exponential growthFactor. */ + public growthFactor: number; + + /** Exponential scale. */ + public scale: number; + + /** + * Creates a new Exponential instance using the specified properties. + * @param [properties] Properties to set + * @returns Exponential instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exponential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Exponential; + + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Exponential; + + /** + * Verifies an Exponential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exponential + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; + + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @param message Exponential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exponential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Explicit. */ + interface IExplicit { + + /** Explicit bounds */ + bounds?: (number[]|null); + } + + /** Represents an Explicit. */ + class Explicit implements IExplicit { + + /** + * Constructs a new Explicit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + + /** Explicit bounds. */ + public bounds: number[]; + + /** + * Creates a new Explicit instance using the specified properties. + * @param [properties] Properties to set + * @returns Explicit instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; + + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Explicit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Explicit; + + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Explicit; + + /** + * Verifies an Explicit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Explicit + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; + + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @param message Explicit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + /** + * Converts this Explicit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of an Exemplar. */ + interface IExemplar { - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Exemplar value */ + value?: (number|null); - namespace ResourceDescriptor { + /** Exemplar timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 + /** Exemplar attachments */ + attachments?: (google.protobuf.IAny[]|null); } - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** Represents an Exemplar. */ + class Exemplar implements IExemplar { - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** + * Constructs a new Exemplar. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IExemplar); - /** ResourceReference type */ - type?: (string|null); + /** Exemplar value. */ + public value: number; - /** ResourceReference childType */ - childType?: (string|null); - } + /** Exemplar timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Exemplar attachments. */ + public attachments: google.protobuf.IAny[]; - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** + * Creates a new Exemplar instance using the specified properties. + * @param [properties] Properties to set + * @returns Exemplar instance + */ + public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; - /** ResourceReference type. */ - public type: string; + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceReference childType. */ - public childType: string; + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Exemplar; - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Exemplar; - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an Exemplar message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exemplar + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @param message Exemplar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this Exemplar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + /** Properties of a MetricDescriptor. */ + interface IMetricDescriptor { - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MetricDescriptor name */ + name?: (string|null); - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MetricDescriptor type */ + type?: (string|null); - /** Properties of a Distribution. */ - interface IDistribution { + /** MetricDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); - /** Distribution count */ - count?: (number|Long|string|null); + /** MetricDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); - /** Distribution mean */ - mean?: (number|null); + /** MetricDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); - /** Distribution sumOfSquaredDeviation */ - sumOfSquaredDeviation?: (number|null); + /** MetricDescriptor unit */ + unit?: (string|null); - /** Distribution range */ - range?: (google.api.Distribution.IRange|null); + /** MetricDescriptor description */ + description?: (string|null); - /** Distribution bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** MetricDescriptor displayName */ + displayName?: (string|null); - /** Distribution bucketCounts */ - bucketCounts?: ((number|Long|string)[]|null); + /** MetricDescriptor metadata */ + metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - /** Distribution exemplars */ - exemplars?: (google.api.Distribution.IExemplar[]|null); + /** MetricDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptor monitoredResourceTypes */ + monitoredResourceTypes?: (string[]|null); } - /** Represents a Distribution. */ - class Distribution implements IDistribution { + /** Represents a MetricDescriptor. */ + class MetricDescriptor implements IMetricDescriptor { /** - * Constructs a new Distribution. + * Constructs a new MetricDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IDistribution); + constructor(properties?: google.api.IMetricDescriptor); - /** Distribution count. */ - public count: (number|Long|string); + /** MetricDescriptor name. */ + public name: string; - /** Distribution mean. */ - public mean: number; + /** MetricDescriptor type. */ + public type: string; - /** Distribution sumOfSquaredDeviation. */ - public sumOfSquaredDeviation: number; + /** MetricDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; - /** Distribution range. */ - public range?: (google.api.Distribution.IRange|null); + /** MetricDescriptor metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); - /** Distribution bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** MetricDescriptor valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); - /** Distribution bucketCounts. */ - public bucketCounts: (number|Long|string)[]; + /** MetricDescriptor unit. */ + public unit: string; - /** Distribution exemplars. */ - public exemplars: google.api.Distribution.IExemplar[]; + /** MetricDescriptor description. */ + public description: string; + + /** MetricDescriptor displayName. */ + public displayName: string; + + /** MetricDescriptor metadata. */ + public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** MetricDescriptor monitoredResourceTypes. */ + public monitoredResourceTypes: string[]; /** - * Creates a new Distribution instance using the specified properties. + * Creates a new MetricDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Distribution instance + * @returns MetricDescriptor instance */ - public static create(properties?: google.api.IDistribution): google.api.Distribution; + public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a MetricDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Distribution + * @returns MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Distribution + * @returns MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; /** - * Verifies a Distribution message. + * Verifies a MetricDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Distribution + * @returns MetricDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution; + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @param message Distribution + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @param message MetricDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Distribution to JSON. + * Converts this MetricDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Distribution { - - /** Properties of a Range. */ - interface IRange { - - /** Range min */ - min?: (number|null); - - /** Range max */ - max?: (number|null); - } - - /** Represents a Range. */ - class Range implements IRange { - - /** - * Constructs a new Range. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IRange); - - /** Range min. */ - public min: number; - - /** Range max. */ - public max: number; - - /** - * Creates a new Range instance using the specified properties. - * @param [properties] Properties to set - * @returns Range instance - */ - public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; - - /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Range message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; - - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; - - /** - * Verifies a Range message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Range - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; - - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @param message Range - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Range to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + namespace MetricDescriptor { - /** Properties of a BucketOptions. */ - interface IBucketOptions { + /** Properties of a MetricDescriptorMetadata. */ + interface IMetricDescriptorMetadata { - /** BucketOptions linearBuckets */ - linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + /** MetricDescriptorMetadata launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** BucketOptions exponentialBuckets */ - exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** MetricDescriptorMetadata samplePeriod */ + samplePeriod?: (google.protobuf.IDuration|null); - /** BucketOptions explicitBuckets */ - explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** MetricDescriptorMetadata ingestDelay */ + ingestDelay?: (google.protobuf.IDuration|null); } - /** Represents a BucketOptions. */ - class BucketOptions implements IBucketOptions { + /** Represents a MetricDescriptorMetadata. */ + class MetricDescriptorMetadata implements IMetricDescriptorMetadata { /** - * Constructs a new BucketOptions. + * Constructs a new MetricDescriptorMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IBucketOptions); - - /** BucketOptions linearBuckets. */ - public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - /** BucketOptions exponentialBuckets. */ - public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** MetricDescriptorMetadata launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** BucketOptions explicitBuckets. */ - public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** MetricDescriptorMetadata samplePeriod. */ + public samplePeriod?: (google.protobuf.IDuration|null); - /** BucketOptions options. */ - public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + /** MetricDescriptorMetadata ingestDelay. */ + public ingestDelay?: (google.protobuf.IDuration|null); /** - * Creates a new BucketOptions instance using the specified properties. + * Creates a new MetricDescriptorMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns BucketOptions instance + * @returns MetricDescriptorMetadata instance */ - public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BucketOptions message from the specified reader or buffer. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BucketOptions + * @returns MetricDescriptorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BucketOptions + * @returns MetricDescriptorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Verifies a BucketOptions message. + * Verifies a MetricDescriptorMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BucketOptions + * @returns MetricDescriptorMetadata */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @param message BucketOptions + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @param message MetricDescriptorMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BucketOptions to JSON. + * Converts this MetricDescriptorMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BucketOptions { + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } - /** Properties of a Linear. */ - interface ILinear { + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } + } - /** Linear numFiniteBuckets */ - numFiniteBuckets?: (number|null); + /** Properties of a Metric. */ + interface IMetric { - /** Linear width */ - width?: (number|null); + /** Metric type */ + type?: (string|null); - /** Linear offset */ - offset?: (number|null); - } + /** Metric labels */ + labels?: ({ [k: string]: string }|null); + } - /** Represents a Linear. */ - class Linear implements ILinear { + /** Represents a Metric. */ + class Metric implements IMetric { - /** - * Constructs a new Linear. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.ILinear); + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetric); - /** Linear numFiniteBuckets. */ - public numFiniteBuckets: number; + /** Metric type. */ + public type: string; - /** Linear width. */ - public width: number; + /** Metric labels. */ + public labels: { [k: string]: string }; - /** Linear offset. */ - public offset: number; + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.api.IMetric): google.api.Metric; - /** - * Creates a new Linear instance using the specified properties. - * @param [properties] Properties to set - * @returns Linear instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.api.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Linear message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Linear; + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Linear; + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; - /** - * Verifies a Linear message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Linear - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @param message Linear - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - /** - * Converts this Linear to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an Exponential. */ - interface IExponential { + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Exponential numFiniteBuckets */ - numFiniteBuckets?: (number|null); + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { - /** Exponential growthFactor */ - growthFactor?: (number|null); + /** GetOperationRequest name */ + name?: (string|null); + } - /** Exponential scale */ - scale?: (number|null); - } + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { - /** Represents an Exponential. */ - class Exponential implements IExponential { + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); - /** - * Constructs a new Exponential. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + /** GetOperationRequest name. */ + public name: string; - /** Exponential numFiniteBuckets. */ - public numFiniteBuckets: number; + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - /** Exponential growthFactor. */ - public growthFactor: number; + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Exponential scale. */ - public scale: number; + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Exponential instance using the specified properties. - * @param [properties] Properties to set - * @returns Exponential instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an Exponential message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Exponential; + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Exponential; + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies an Exponential message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exponential - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @param message Exponential - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListOperationsRequest name */ + name?: (string|null); - /** - * Converts this Exponential to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListOperationsRequest filter */ + filter?: (string|null); - /** Properties of an Explicit. */ - interface IExplicit { + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); - /** Explicit bounds */ - bounds?: (number[]|null); - } + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } - /** Represents an Explicit. */ - class Explicit implements IExplicit { + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { - /** - * Constructs a new Explicit. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); - /** Explicit bounds. */ - public bounds: number[]; + /** ListOperationsRequest name. */ + public name: string; - /** - * Creates a new Explicit instance using the specified properties. - * @param [properties] Properties to set - * @returns Explicit instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; + /** ListOperationsRequest filter. */ + public filter: string; - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListOperationsRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListOperationsRequest pageToken. */ + public pageToken: string; - /** - * Decodes an Explicit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Explicit; + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Explicit; + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an Explicit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Explicit - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @param message Explicit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this Explicit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - /** Properties of an Exemplar. */ - interface IExemplar { + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Exemplar value */ - value?: (number|null); + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Exemplar timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { - /** Exemplar attachments */ - attachments?: (google.protobuf.IAny[]|null); - } + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); - /** Represents an Exemplar. */ - class Exemplar implements IExemplar { + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Constructs a new Exemplar. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IExemplar); + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { - /** Exemplar value. */ - public value: number; + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); - /** Exemplar timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; - /** Exemplar attachments. */ - public attachments: google.protobuf.IAny[]; + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; - /** - * Creates a new Exemplar instance using the specified properties. - * @param [properties] Properties to set - * @returns Exemplar instance - */ - public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Exemplar; + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Exemplar; + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; - /** - * Verifies an Exemplar message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exemplar - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @param message Exemplar - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Exemplar to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a MetricDescriptor. */ - interface IMetricDescriptor { + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { - /** MetricDescriptor name */ + /** CancelOperationRequest name */ name?: (string|null); + } - /** MetricDescriptor type */ - type?: (string|null); - - /** MetricDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - - /** MetricDescriptor metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { - /** MetricDescriptor valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); - /** MetricDescriptor unit */ - unit?: (string|null); + /** CancelOperationRequest name. */ + public name: string; - /** MetricDescriptor description */ - description?: (string|null); + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - /** MetricDescriptor displayName */ - displayName?: (string|null); + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetricDescriptor metadata */ - metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetricDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; - /** MetricDescriptor monitoredResourceTypes */ - monitoredResourceTypes?: (string[]|null); - } + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; - /** Represents a MetricDescriptor. */ - class MetricDescriptor implements IMetricDescriptor { + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); /** - * Constructs a new MetricDescriptor. - * @param [properties] Properties to set + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest */ - constructor(properties?: google.api.IMetricDescriptor); - - /** MetricDescriptor name. */ - public name: string; - - /** MetricDescriptor type. */ - public type: string; - - /** MetricDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** MetricDescriptor metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - /** MetricDescriptor valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MetricDescriptor unit. */ - public unit: string; + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MetricDescriptor description. */ - public description: string; + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { - /** MetricDescriptor displayName. */ - public displayName: string; + /** DeleteOperationRequest name */ + name?: (string|null); + } - /** MetricDescriptor metadata. */ - public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { - /** MetricDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); - /** MetricDescriptor monitoredResourceTypes. */ - public monitoredResourceTypes: string[]; + /** DeleteOperationRequest name. */ + public name: string; /** - * Creates a new MetricDescriptor instance using the specified properties. + * Creates a new DeleteOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MetricDescriptor instance + * @returns DeleteOperationRequest instance */ - public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetricDescriptor message from the specified reader or buffer. + * Decodes a DeleteOperationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetricDescriptor + * @returns DeleteOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetricDescriptor + * @returns DeleteOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; /** - * Verifies a MetricDescriptor message. + * Verifies a DeleteOperationRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetricDescriptor + * @returns DeleteOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. - * @param message MetricDescriptor + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetricDescriptor to JSON. + * Converts this DeleteOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace MetricDescriptor { - - /** Properties of a MetricDescriptorMetadata. */ - interface IMetricDescriptorMetadata { - - /** MetricDescriptorMetadata launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** MetricDescriptorMetadata samplePeriod */ - samplePeriod?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata ingestDelay */ - ingestDelay?: (google.protobuf.IDuration|null); - } - - /** Represents a MetricDescriptorMetadata. */ - class MetricDescriptorMetadata implements IMetricDescriptorMetadata { + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { - /** - * Constructs a new MetricDescriptorMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); + /** WaitOperationRequest name */ + name?: (string|null); - /** MetricDescriptorMetadata launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } - /** MetricDescriptorMetadata samplePeriod. */ - public samplePeriod?: (google.protobuf.IDuration|null); + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { - /** MetricDescriptorMetadata ingestDelay. */ - public ingestDelay?: (google.protobuf.IDuration|null); + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricDescriptorMetadata instance - */ - public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; + /** WaitOperationRequest name. */ + public name: string; - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor.MetricDescriptorMetadata; + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor.MetricDescriptorMetadata; + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a MetricDescriptorMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricDescriptorMetadata - */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @param message MetricDescriptorMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this MetricDescriptorMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - /** MetricKind enum. */ - enum MetricKind { - METRIC_KIND_UNSPECIFIED = 0, - GAUGE = 1, - DELTA = 2, - CUMULATIVE = 3 - } + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - BOOL = 1, - INT64 = 2, - DOUBLE = 3, - STRING = 4, - DISTRIBUTION = 5, - MONEY = 6 - } + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a Metric. */ - interface IMetric { + /** Properties of an OperationInfo. */ + interface IOperationInfo { - /** Metric type */ - type?: (string|null); + /** OperationInfo responseType */ + responseType?: (string|null); - /** Metric labels */ - labels?: ({ [k: string]: string }|null); + /** OperationInfo metadataType */ + metadataType?: (string|null); } - /** Represents a Metric. */ - class Metric implements IMetric { + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { /** - * Constructs a new Metric. + * Constructs a new OperationInfo. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMetric); + constructor(properties?: google.longrunning.IOperationInfo); - /** Metric type. */ - public type: string; + /** OperationInfo responseType. */ + public responseType: string; - /** Metric labels. */ - public labels: { [k: string]: string }; + /** OperationInfo metadataType. */ + public metadataType: string; /** - * Creates a new Metric instance using the specified properties. + * Creates a new OperationInfo instance using the specified properties. * @param [properties] Properties to set - * @returns Metric instance + * @returns OperationInfo instance */ - public static create(properties?: google.api.IMetric): google.api.Metric; + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes an OperationInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Metric + * @returns OperationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Metric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Metric + * @returns OperationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Metric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; /** - * Verifies a Metric message. + * Verifies an OperationInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Metric + * @returns OperationInfo */ - public static fromObject(object: { [k: string]: any }): google.api.Metric; + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metric to JSON. + * Converts this OperationInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index efe610dbb34..28cb13e9901 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -6988,6 +6988,7 @@ * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** @@ -7047,6 +7048,14 @@ */ MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + /** * Creates a new MethodOptions instance using the specified properties. * @function create @@ -7078,6 +7087,8 @@ if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); @@ -7136,6 +7147,9 @@ message[".google.api.methodSignature"] = []; message[".google.api.methodSignature"].push(reader.string()); break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -7204,6 +7218,11 @@ if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } return null; }; @@ -7257,6 +7276,11 @@ for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } return message; }; @@ -7280,6 +7304,7 @@ if (options.defaults) { object.deprecated = false; object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; object[".google.api.http"] = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -7291,6 +7316,8 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { object[".google.api.methodSignature"] = []; for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) @@ -11203,6 +11230,7 @@ * @property {string|null} [spanId] LogEntry spanId * @property {boolean|null} [traceSampled] LogEntry traceSampled * @property {google.logging.v2.ILogEntrySourceLocation|null} [sourceLocation] LogEntry sourceLocation + * @property {google.logging.v2.ILogSplit|null} [split] LogEntry split */ /** @@ -11349,6 +11377,14 @@ */ LogEntry.prototype.sourceLocation = null; + /** + * LogEntry split. + * @member {google.logging.v2.ILogSplit|null|undefined} split + * @memberof google.logging.v2.LogEntry + * @instance + */ + LogEntry.prototype.split = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -11420,6 +11456,8 @@ writer.uint32(/* id 27, wireType 2 =*/218).string(message.spanId); if (message.traceSampled != null && Object.hasOwnProperty.call(message, "traceSampled")) writer.uint32(/* id 30, wireType 0 =*/240).bool(message.traceSampled); + if (message.split != null && Object.hasOwnProperty.call(message, "split")) + $root.google.logging.v2.LogSplit.encode(message.split, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); return writer; }; @@ -11521,6 +11559,9 @@ case 23: message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); break; + case 35: + message.split = $root.google.logging.v2.LogSplit.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -11650,6 +11691,11 @@ if (error) return "sourceLocation." + error; } + if (message.split != null && message.hasOwnProperty("split")) { + var error = $root.google.logging.v2.LogSplit.verify(message.split); + if (error) + return "split." + error; + } return null; }; @@ -11762,6 +11808,11 @@ throw TypeError(".google.logging.v2.LogEntry.sourceLocation: object expected"); message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.fromObject(object.sourceLocation); } + if (object.split != null) { + if (typeof object.split !== "object") + throw TypeError(".google.logging.v2.LogEntry.split: object expected"); + message.split = $root.google.logging.v2.LogSplit.fromObject(object.split); + } return message; }; @@ -11793,6 +11844,7 @@ object.receiveTimestamp = null; object.spanId = ""; object.traceSampled = false; + object.split = null; } if (message.protoPayload != null && message.hasOwnProperty("protoPayload")) { object.protoPayload = $root.google.protobuf.Any.toObject(message.protoPayload, options); @@ -11839,6 +11891,8 @@ object.spanId = message.spanId; if (message.traceSampled != null && message.hasOwnProperty("traceSampled")) object.traceSampled = message.traceSampled; + if (message.split != null && message.hasOwnProperty("split")) + object.split = $root.google.logging.v2.LogSplit.toObject(message.split, options); return object; }; @@ -12356,6 +12410,238 @@ return LogEntrySourceLocation; })(); + v2.LogSplit = (function() { + + /** + * Properties of a LogSplit. + * @memberof google.logging.v2 + * @interface ILogSplit + * @property {string|null} [uid] LogSplit uid + * @property {number|null} [index] LogSplit index + * @property {number|null} [totalSplits] LogSplit totalSplits + */ + + /** + * Constructs a new LogSplit. + * @memberof google.logging.v2 + * @classdesc Represents a LogSplit. + * @implements ILogSplit + * @constructor + * @param {google.logging.v2.ILogSplit=} [properties] Properties to set + */ + function LogSplit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogSplit uid. + * @member {string} uid + * @memberof google.logging.v2.LogSplit + * @instance + */ + LogSplit.prototype.uid = ""; + + /** + * LogSplit index. + * @member {number} index + * @memberof google.logging.v2.LogSplit + * @instance + */ + LogSplit.prototype.index = 0; + + /** + * LogSplit totalSplits. + * @member {number} totalSplits + * @memberof google.logging.v2.LogSplit + * @instance + */ + LogSplit.prototype.totalSplits = 0; + + /** + * Creates a new LogSplit instance using the specified properties. + * @function create + * @memberof google.logging.v2.LogSplit + * @static + * @param {google.logging.v2.ILogSplit=} [properties] Properties to set + * @returns {google.logging.v2.LogSplit} LogSplit instance + */ + LogSplit.create = function create(properties) { + return new LogSplit(properties); + }; + + /** + * Encodes the specified LogSplit message. Does not implicitly {@link google.logging.v2.LogSplit.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.LogSplit + * @static + * @param {google.logging.v2.ILogSplit} message LogSplit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSplit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uid); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.index); + if (message.totalSplits != null && Object.hasOwnProperty.call(message, "totalSplits")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSplits); + return writer; + }; + + /** + * Encodes the specified LogSplit message, length delimited. Does not implicitly {@link google.logging.v2.LogSplit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.LogSplit + * @static + * @param {google.logging.v2.ILogSplit} message LogSplit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogSplit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogSplit message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.LogSplit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.LogSplit} LogSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSplit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSplit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uid = reader.string(); + break; + case 2: + message.index = reader.int32(); + break; + case 3: + message.totalSplits = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogSplit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.LogSplit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.LogSplit} LogSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogSplit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogSplit message. + * @function verify + * @memberof google.logging.v2.LogSplit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogSplit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.totalSplits != null && message.hasOwnProperty("totalSplits")) + if (!$util.isInteger(message.totalSplits)) + return "totalSplits: integer expected"; + return null; + }; + + /** + * Creates a LogSplit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.LogSplit + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.LogSplit} LogSplit + */ + LogSplit.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogSplit) + return object; + var message = new $root.google.logging.v2.LogSplit(); + if (object.uid != null) + message.uid = String(object.uid); + if (object.index != null) + message.index = object.index | 0; + if (object.totalSplits != null) + message.totalSplits = object.totalSplits | 0; + return message; + }; + + /** + * Creates a plain object from a LogSplit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.LogSplit + * @static + * @param {google.logging.v2.LogSplit} message LogSplit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogSplit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uid = ""; + object.index = 0; + object.totalSplits = 0; + } + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.totalSplits != null && message.hasOwnProperty("totalSplits")) + object.totalSplits = message.totalSplits; + return object; + }; + + /** + * Converts this LogSplit to JSON. + * @function toJSON + * @memberof google.logging.v2.LogSplit + * @instance + * @returns {Object.} JSON object + */ + LogSplit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogSplit; + })(); + v2.LoggingServiceV2 = (function() { /** @@ -16533,6 +16819,105 @@ * @variation 2 */ + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSettings}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.Settings} [response] Settings + */ + + /** + * Calls GetSettings. + * @function getSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSettingsRequest} request GetSettingsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetSettingsCallback} callback Node-style callback called with the error, if any, and Settings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getSettings = function getSettings(request, callback) { + return this.rpcCall(getSettings, $root.google.logging.v2.GetSettingsRequest, $root.google.logging.v2.Settings, request, callback); + }, "name", { value: "GetSettings" }); + + /** + * Calls GetSettings. + * @function getSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetSettingsRequest} request GetSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSettings}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.Settings} [response] Settings + */ + + /** + * Calls UpdateSettings. + * @function updateSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSettingsRequest} request UpdateSettingsRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateSettingsCallback} callback Node-style callback called with the error, if any, and Settings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateSettings = function updateSettings(request, callback) { + return this.rpcCall(updateSettings, $root.google.logging.v2.UpdateSettingsRequest, $root.google.logging.v2.Settings, request, callback); + }, "name", { value: "UpdateSettings" }); + + /** + * Calls UpdateSettings. + * @function updateSettings + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateSettingsRequest} request UpdateSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2#copyLogEntries}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CopyLogEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CopyLogEntries. + * @function copyLogEntries + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICopyLogEntriesRequest} request CopyLogEntriesRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CopyLogEntriesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.copyLogEntries = function copyLogEntries(request, callback) { + return this.rpcCall(copyLogEntries, $root.google.logging.v2.CopyLogEntriesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CopyLogEntries" }); + + /** + * Calls CopyLogEntries. + * @function copyLogEntries + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICopyLogEntriesRequest} request CopyLogEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return ConfigServiceV2; })(); @@ -16549,6 +16934,8 @@ * @property {number|null} [retentionDays] LogBucket retentionDays * @property {boolean|null} [locked] LogBucket locked * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState + * @property {Array.|null} [restrictedFields] LogBucket restrictedFields + * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] LogBucket cmekSettings */ /** @@ -16560,6 +16947,7 @@ * @param {google.logging.v2.ILogBucket=} [properties] Properties to set */ function LogBucket(properties) { + this.restrictedFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16622,6 +17010,22 @@ */ LogBucket.prototype.lifecycleState = 0; + /** + * LogBucket restrictedFields. + * @member {Array.} restrictedFields + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.restrictedFields = $util.emptyArray; + + /** + * LogBucket cmekSettings. + * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.cmekSettings = null; + /** * Creates a new LogBucket instance using the specified properties. * @function create @@ -16660,6 +17064,11 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); if (message.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.lifecycleState); + if (message.restrictedFields != null && message.restrictedFields.length) + for (var i = 0; i < message.restrictedFields.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.restrictedFields[i]); + if (message.cmekSettings != null && Object.hasOwnProperty.call(message, "cmekSettings")) + $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; @@ -16715,6 +17124,14 @@ case 12: message.lifecycleState = reader.int32(); break; + case 15: + if (!(message.restrictedFields && message.restrictedFields.length)) + message.restrictedFields = []; + message.restrictedFields.push(reader.string()); + break; + case 19: + message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -16781,6 +17198,18 @@ case 2: break; } + if (message.restrictedFields != null && message.hasOwnProperty("restrictedFields")) { + if (!Array.isArray(message.restrictedFields)) + return "restrictedFields: array expected"; + for (var i = 0; i < message.restrictedFields.length; ++i) + if (!$util.isString(message.restrictedFields[i])) + return "restrictedFields: string[] expected"; + } + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { + var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); + if (error) + return "cmekSettings." + error; + } return null; }; @@ -16828,6 +17257,18 @@ message.lifecycleState = 2; break; } + if (object.restrictedFields) { + if (!Array.isArray(object.restrictedFields)) + throw TypeError(".google.logging.v2.LogBucket.restrictedFields: array expected"); + message.restrictedFields = []; + for (var i = 0; i < object.restrictedFields.length; ++i) + message.restrictedFields[i] = String(object.restrictedFields[i]); + } + if (object.cmekSettings != null) { + if (typeof object.cmekSettings !== "object") + throw TypeError(".google.logging.v2.LogBucket.cmekSettings: object expected"); + message.cmekSettings = $root.google.logging.v2.CmekSettings.fromObject(object.cmekSettings); + } return message; }; @@ -16844,6 +17285,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.restrictedFields = []; if (options.defaults) { object.name = ""; object.description = ""; @@ -16852,6 +17295,7 @@ object.locked = false; object.retentionDays = 0; object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; + object.cmekSettings = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -16867,6 +17311,13 @@ object.retentionDays = message.retentionDays; if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; + if (message.restrictedFields && message.restrictedFields.length) { + object.restrictedFields = []; + for (var j = 0; j < message.restrictedFields.length; ++j) + object.restrictedFields[j] = message.restrictedFields[j]; + } + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) + object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); return object; }; @@ -16884,22 +17335,6 @@ return LogBucket; })(); - /** - * LifecycleState enum. - * @name google.logging.v2.LifecycleState - * @enum {number} - * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value - */ - v2.LifecycleState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "DELETE_REQUESTED"] = 2; - return values; - })(); - v2.LogView = (function() { /** @@ -24337,450 +24772,560 @@ return CmekSettings; })(); - v2.MetricsServiceV2 = (function() { + v2.GetSettingsRequest = (function() { /** - * Constructs a new MetricsServiceV2 service. + * Properties of a GetSettingsRequest. * @memberof google.logging.v2 - * @classdesc Represents a MetricsServiceV2 - * @extends $protobuf.rpc.Service + * @interface IGetSettingsRequest + * @property {string|null} [name] GetSettingsRequest name + */ + + /** + * Constructs a new GetSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetSettingsRequest. + * @implements IGetSettingsRequest * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.logging.v2.IGetSettingsRequest=} [properties] Properties to set */ - function MetricsServiceV2(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function GetSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (MetricsServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsServiceV2; + /** + * GetSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.GetSettingsRequest + * @instance + */ + GetSettingsRequest.prototype.name = ""; /** - * Creates new MetricsServiceV2 service using the specified rpc implementation. + * Creates a new GetSettingsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.MetricsServiceV2 + * @memberof google.logging.v2.GetSettingsRequest * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {MetricsServiceV2} RPC service. Useful where requests and/or responses are streamed. + * @param {google.logging.v2.IGetSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest instance */ - MetricsServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + GetSettingsRequest.create = function create(properties) { + return new GetSettingsRequest(properties); }; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef ListLogMetricsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.ListLogMetricsResponse} [response] ListLogMetricsResponse + * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.logging.v2.GetSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {google.logging.v2.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls ListLogMetrics. - * @function listLogMetrics - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.ListLogMetricsCallback} callback Node-style callback called with the error, if any, and ListLogMetricsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {google.logging.v2.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(MetricsServiceV2.prototype.listLogMetrics = function listLogMetrics(request, callback) { - return this.rpcCall(listLogMetrics, $root.google.logging.v2.ListLogMetricsRequest, $root.google.logging.v2.ListLogMetricsResponse, request, callback); - }, "name", { value: "ListLogMetrics" }); + GetSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListLogMetrics. - * @function listLogMetrics - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef GetLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric + * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetLogMetric. - * @function getLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.GetLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 + * Verifies a GetSettingsRequest message. + * @function verify + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(MetricsServiceV2.prototype.getLogMetric = function getLogMetric(request, callback) { - return this.rpcCall(getLogMetric, $root.google.logging.v2.GetLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "GetLogMetric" }); + GetSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls GetLogMetric. - * @function getLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest */ + GetSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSettingsRequest) + return object; + var message = new $root.google.logging.v2.GetSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef CreateLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric + * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {google.logging.v2.GetSettingsRequest} message GetSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls CreateLogMetric. - * @function createLogMetric - * @memberof google.logging.v2.MetricsServiceV2 + * Converts this GetSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetSettingsRequest * @instance - * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.CreateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(MetricsServiceV2.prototype.createLogMetric = function createLogMetric(request, callback) { - return this.rpcCall(createLogMetric, $root.google.logging.v2.CreateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "CreateLogMetric" }); + GetSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls CreateLogMetric. - * @function createLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return GetSettingsRequest; + })(); + + v2.UpdateSettingsRequest = (function() { /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef UpdateLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.logging.v2.LogMetric} [response] LogMetric + * Properties of an UpdateSettingsRequest. + * @memberof google.logging.v2 + * @interface IUpdateSettingsRequest + * @property {string|null} [name] UpdateSettingsRequest name + * @property {google.logging.v2.ISettings|null} [settings] UpdateSettingsRequest settings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSettingsRequest updateMask */ /** - * Calls UpdateLogMetric. - * @function updateLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric - * @returns {undefined} - * @variation 1 + * Constructs a new UpdateSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateSettingsRequest. + * @implements IUpdateSettingsRequest + * @constructor + * @param {google.logging.v2.IUpdateSettingsRequest=} [properties] Properties to set */ - Object.defineProperty(MetricsServiceV2.prototype.updateLogMetric = function updateLogMetric(request, callback) { - return this.rpcCall(updateLogMetric, $root.google.logging.v2.UpdateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); - }, "name", { value: "UpdateLogMetric" }); + function UpdateSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls UpdateLogMetric. - * @function updateLogMetric - * @memberof google.logging.v2.MetricsServiceV2 + * UpdateSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateSettingsRequest * @instance - * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + UpdateSettingsRequest.prototype.name = ""; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. - * @memberof google.logging.v2.MetricsServiceV2 - * @typedef DeleteLogMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * UpdateSettingsRequest settings. + * @member {google.logging.v2.ISettings|null|undefined} settings + * @memberof google.logging.v2.UpdateSettingsRequest + * @instance */ + UpdateSettingsRequest.prototype.settings = null; /** - * Calls DeleteLogMetric. - * @function deleteLogMetric - * @memberof google.logging.v2.MetricsServiceV2 + * UpdateSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSettingsRequest * @instance - * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object - * @param {google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(MetricsServiceV2.prototype.deleteLogMetric = function deleteLogMetric(request, callback) { - return this.rpcCall(deleteLogMetric, $root.google.logging.v2.DeleteLogMetricRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteLogMetric" }); + UpdateSettingsRequest.prototype.updateMask = null; /** - * Calls DeleteLogMetric. - * @function deleteLogMetric - * @memberof google.logging.v2.MetricsServiceV2 - * @instance - * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new UpdateSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {google.logging.v2.IUpdateSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest instance */ - - return MetricsServiceV2; - })(); - - v2.LogMetric = (function() { + UpdateSettingsRequest.create = function create(properties) { + return new UpdateSettingsRequest(properties); + }; /** - * Properties of a LogMetric. - * @memberof google.logging.v2 - * @interface ILogMetric - * @property {string|null} [name] LogMetric name - * @property {string|null} [description] LogMetric description - * @property {string|null} [filter] LogMetric filter - * @property {google.api.IMetricDescriptor|null} [metricDescriptor] LogMetric metricDescriptor - * @property {string|null} [valueExtractor] LogMetric valueExtractor - * @property {Object.|null} [labelExtractors] LogMetric labelExtractors - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] LogMetric bucketOptions - * @property {google.protobuf.ITimestamp|null} [createTime] LogMetric createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogMetric updateTime - * @property {google.logging.v2.LogMetric.ApiVersion|null} [version] LogMetric version + * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {google.logging.v2.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) + $root.google.logging.v2.Settings.encode(message.settings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Constructs a new LogMetric. - * @memberof google.logging.v2 - * @classdesc Represents a LogMetric. - * @implements ILogMetric - * @constructor - * @param {google.logging.v2.ILogMetric=} [properties] Properties to set + * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {google.logging.v2.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - function LogMetric(properties) { - this.labelExtractors = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + UpdateSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * LogMetric name. - * @member {string} name - * @memberof google.logging.v2.LogMetric - * @instance + * Decodes an UpdateSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.prototype.name = ""; + UpdateSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.settings = $root.google.logging.v2.Settings.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * LogMetric description. - * @member {string} description - * @memberof google.logging.v2.LogMetric - * @instance + * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.prototype.description = ""; + UpdateSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * LogMetric filter. - * @member {string} filter - * @memberof google.logging.v2.LogMetric - * @instance + * Verifies an UpdateSettingsRequest message. + * @function verify + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogMetric.prototype.filter = ""; + UpdateSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.settings != null && message.hasOwnProperty("settings")) { + var error = $root.google.logging.v2.Settings.verify(message.settings); + if (error) + return "settings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; /** - * LogMetric metricDescriptor. - * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor - * @memberof google.logging.v2.LogMetric - * @instance + * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest */ - LogMetric.prototype.metricDescriptor = null; + UpdateSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSettingsRequest) + return object; + var message = new $root.google.logging.v2.UpdateSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.settings != null) { + if (typeof object.settings !== "object") + throw TypeError(".google.logging.v2.UpdateSettingsRequest.settings: object expected"); + message.settings = $root.google.logging.v2.Settings.fromObject(object.settings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * LogMetric valueExtractor. - * @member {string} valueExtractor - * @memberof google.logging.v2.LogMetric - * @instance + * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {google.logging.v2.UpdateSettingsRequest} message UpdateSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - LogMetric.prototype.valueExtractor = ""; + UpdateSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.settings = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.settings != null && message.hasOwnProperty("settings")) + object.settings = $root.google.logging.v2.Settings.toObject(message.settings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; /** - * LogMetric labelExtractors. - * @member {Object.} labelExtractors - * @memberof google.logging.v2.LogMetric + * Converts this UpdateSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateSettingsRequest * @instance + * @returns {Object.} JSON object */ - LogMetric.prototype.labelExtractors = $util.emptyObject; + UpdateSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateSettingsRequest; + })(); + + v2.Settings = (function() { /** - * LogMetric bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.logging.v2.LogMetric - * @instance + * Properties of a Settings. + * @memberof google.logging.v2 + * @interface ISettings + * @property {string|null} [name] Settings name + * @property {string|null} [storageLocation] Settings storageLocation + * @property {boolean|null} [disableDefaultSink] Settings disableDefaultSink */ - LogMetric.prototype.bucketOptions = null; /** - * LogMetric createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogMetric + * Constructs a new Settings. + * @memberof google.logging.v2 + * @classdesc Represents a Settings. + * @implements ISettings + * @constructor + * @param {google.logging.v2.ISettings=} [properties] Properties to set + */ + function Settings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Settings name. + * @member {string} name + * @memberof google.logging.v2.Settings * @instance */ - LogMetric.prototype.createTime = null; + Settings.prototype.name = ""; /** - * LogMetric updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogMetric + * Settings storageLocation. + * @member {string} storageLocation + * @memberof google.logging.v2.Settings * @instance */ - LogMetric.prototype.updateTime = null; + Settings.prototype.storageLocation = ""; /** - * LogMetric version. - * @member {google.logging.v2.LogMetric.ApiVersion} version - * @memberof google.logging.v2.LogMetric + * Settings disableDefaultSink. + * @member {boolean} disableDefaultSink + * @memberof google.logging.v2.Settings * @instance */ - LogMetric.prototype.version = 0; + Settings.prototype.disableDefaultSink = false; /** - * Creates a new LogMetric instance using the specified properties. + * Creates a new Settings instance using the specified properties. * @function create - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @static - * @param {google.logging.v2.ILogMetric=} [properties] Properties to set - * @returns {google.logging.v2.LogMetric} LogMetric instance + * @param {google.logging.v2.ISettings=} [properties] Properties to set + * @returns {google.logging.v2.Settings} Settings instance */ - LogMetric.create = function create(properties) { - return new LogMetric(properties); + Settings.create = function create(properties) { + return new Settings(properties); }; /** - * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * Encodes the specified Settings message. Does not implicitly {@link google.logging.v2.Settings.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @static - * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {google.logging.v2.ISettings} message Settings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogMetric.encode = function encode(message, writer) { + Settings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); - if (message.metricDescriptor != null && Object.hasOwnProperty.call(message, "metricDescriptor")) - $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.valueExtractor != null && Object.hasOwnProperty.call(message, "valueExtractor")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueExtractor); - if (message.labelExtractors != null && Object.hasOwnProperty.call(message, "labelExtractors")) - for (var keys = Object.keys(message.labelExtractors), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labelExtractors[keys[i]]).ldelim(); - if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.storageLocation != null && Object.hasOwnProperty.call(message, "storageLocation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageLocation); + if (message.disableDefaultSink != null && Object.hasOwnProperty.call(message, "disableDefaultSink")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disableDefaultSink); return writer; }; /** - * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. + * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.logging.v2.Settings.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @static - * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode + * @param {google.logging.v2.ISettings} message Settings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogMetric.encodeDelimited = function encodeDelimited(message, writer) { + Settings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogMetric message from the specified reader or buffer. + * Decodes a Settings message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogMetric} LogMetric + * @returns {google.logging.v2.Settings} Settings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.decode = function decode(reader, length) { + Settings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.Settings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); + case 4: + message.storageLocation = reader.string(); break; case 5: - message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + message.disableDefaultSink = reader.bool(); break; - case 6: - message.valueExtractor = reader.string(); - break; - case 7: - if (message.labelExtractors === $util.emptyObject) - message.labelExtractors = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labelExtractors[key] = value; - break; - case 8: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - case 9: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.version = reader.int32(); - break; - default: - reader.skipType(tag & 7); + default: + reader.skipType(tag & 7); break; } } @@ -24788,244 +25333,126 @@ }; /** - * Decodes a LogMetric message from the specified reader or buffer, length delimited. + * Decodes a Settings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogMetric} LogMetric + * @returns {google.logging.v2.Settings} Settings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.decodeDelimited = function decodeDelimited(reader) { + Settings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogMetric message. + * Verifies a Settings message. * @function verify - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogMetric.verify = function verify(message) { + Settings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { - var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); - if (error) - return "metricDescriptor." + error; - } - if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) - if (!$util.isString(message.valueExtractor)) - return "valueExtractor: string expected"; - if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) { - if (!$util.isObject(message.labelExtractors)) - return "labelExtractors: object expected"; - var key = Object.keys(message.labelExtractors); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labelExtractors[key[i]])) - return "labelExtractors: string{k:string} expected"; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); - if (error) - return "bucketOptions." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.version != null && message.hasOwnProperty("version")) - switch (message.version) { - default: - return "version: enum value expected"; - case 0: - case 1: - break; - } + if (message.storageLocation != null && message.hasOwnProperty("storageLocation")) + if (!$util.isString(message.storageLocation)) + return "storageLocation: string expected"; + if (message.disableDefaultSink != null && message.hasOwnProperty("disableDefaultSink")) + if (typeof message.disableDefaultSink !== "boolean") + return "disableDefaultSink: boolean expected"; return null; }; /** - * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. + * Creates a Settings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogMetric} LogMetric + * @returns {google.logging.v2.Settings} Settings */ - LogMetric.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogMetric) + Settings.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.Settings) return object; - var message = new $root.google.logging.v2.LogMetric(); + var message = new $root.google.logging.v2.Settings(); if (object.name != null) message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.metricDescriptor != null) { - if (typeof object.metricDescriptor !== "object") - throw TypeError(".google.logging.v2.LogMetric.metricDescriptor: object expected"); - message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); - } - if (object.valueExtractor != null) - message.valueExtractor = String(object.valueExtractor); - if (object.labelExtractors) { - if (typeof object.labelExtractors !== "object") - throw TypeError(".google.logging.v2.LogMetric.labelExtractors: object expected"); - message.labelExtractors = {}; - for (var keys = Object.keys(object.labelExtractors), i = 0; i < keys.length; ++i) - message.labelExtractors[keys[i]] = String(object.labelExtractors[keys[i]]); - } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.logging.v2.LogMetric.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogMetric.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogMetric.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.version) { - case "V2": - case 0: - message.version = 0; - break; - case "V1": - case 1: - message.version = 1; - break; - } + if (object.storageLocation != null) + message.storageLocation = String(object.storageLocation); + if (object.disableDefaultSink != null) + message.disableDefaultSink = Boolean(object.disableDefaultSink); return message; }; /** - * Creates a plain object from a LogMetric message. Also converts values to other types if specified. + * Creates a plain object from a Settings message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @static - * @param {google.logging.v2.LogMetric} message LogMetric + * @param {google.logging.v2.Settings} message Settings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogMetric.toObject = function toObject(message, options) { + Settings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labelExtractors = {}; if (options.defaults) { object.name = ""; - object.description = ""; - object.filter = ""; - object.version = options.enums === String ? "V2" : 0; - object.metricDescriptor = null; - object.valueExtractor = ""; - object.bucketOptions = null; - object.createTime = null; - object.updateTime = null; + object.storageLocation = ""; + object.disableDefaultSink = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.version != null && message.hasOwnProperty("version")) - object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) - object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); - if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) - object.valueExtractor = message.valueExtractor; - var keys2; - if (message.labelExtractors && (keys2 = Object.keys(message.labelExtractors)).length) { - object.labelExtractors = {}; - for (var j = 0; j < keys2.length; ++j) - object.labelExtractors[keys2[j]] = message.labelExtractors[keys2[j]]; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.storageLocation != null && message.hasOwnProperty("storageLocation")) + object.storageLocation = message.storageLocation; + if (message.disableDefaultSink != null && message.hasOwnProperty("disableDefaultSink")) + object.disableDefaultSink = message.disableDefaultSink; return object; }; /** - * Converts this LogMetric to JSON. + * Converts this Settings to JSON. * @function toJSON - * @memberof google.logging.v2.LogMetric + * @memberof google.logging.v2.Settings * @instance * @returns {Object.} JSON object */ - LogMetric.prototype.toJSON = function toJSON() { + Settings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ApiVersion enum. - * @name google.logging.v2.LogMetric.ApiVersion - * @enum {number} - * @property {number} V2=0 V2 value - * @property {number} V1=1 V1 value - */ - LogMetric.ApiVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "V2"] = 0; - values[valuesById[1] = "V1"] = 1; - return values; - })(); - - return LogMetric; + return Settings; })(); - v2.ListLogMetricsRequest = (function() { + v2.CopyLogEntriesRequest = (function() { /** - * Properties of a ListLogMetricsRequest. + * Properties of a CopyLogEntriesRequest. * @memberof google.logging.v2 - * @interface IListLogMetricsRequest - * @property {string|null} [parent] ListLogMetricsRequest parent - * @property {string|null} [pageToken] ListLogMetricsRequest pageToken - * @property {number|null} [pageSize] ListLogMetricsRequest pageSize + * @interface ICopyLogEntriesRequest + * @property {string|null} [name] CopyLogEntriesRequest name + * @property {string|null} [filter] CopyLogEntriesRequest filter + * @property {string|null} [destination] CopyLogEntriesRequest destination */ /** - * Constructs a new ListLogMetricsRequest. + * Constructs a new CopyLogEntriesRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListLogMetricsRequest. - * @implements IListLogMetricsRequest + * @classdesc Represents a CopyLogEntriesRequest. + * @implements ICopyLogEntriesRequest * @constructor - * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + * @param {google.logging.v2.ICopyLogEntriesRequest=} [properties] Properties to set */ - function ListLogMetricsRequest(properties) { + function CopyLogEntriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25033,101 +25460,101 @@ } /** - * ListLogMetricsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListLogMetricsRequest + * CopyLogEntriesRequest name. + * @member {string} name + * @memberof google.logging.v2.CopyLogEntriesRequest * @instance */ - ListLogMetricsRequest.prototype.parent = ""; + CopyLogEntriesRequest.prototype.name = ""; /** - * ListLogMetricsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListLogMetricsRequest + * CopyLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.CopyLogEntriesRequest * @instance */ - ListLogMetricsRequest.prototype.pageToken = ""; + CopyLogEntriesRequest.prototype.filter = ""; /** - * ListLogMetricsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListLogMetricsRequest + * CopyLogEntriesRequest destination. + * @member {string} destination + * @memberof google.logging.v2.CopyLogEntriesRequest * @instance */ - ListLogMetricsRequest.prototype.pageSize = 0; + CopyLogEntriesRequest.prototype.destination = ""; /** - * Creates a new ListLogMetricsRequest instance using the specified properties. + * Creates a new CopyLogEntriesRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @static - * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest instance + * @param {google.logging.v2.ICopyLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest instance */ - ListLogMetricsRequest.create = function create(properties) { - return new ListLogMetricsRequest(properties); + CopyLogEntriesRequest.create = function create(properties) { + return new CopyLogEntriesRequest(properties); }; /** - * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * Encodes the specified CopyLogEntriesRequest message. Does not implicitly {@link google.logging.v2.CopyLogEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @static - * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {google.logging.v2.ICopyLogEntriesRequest} message CopyLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsRequest.encode = function encode(message, writer) { + CopyLogEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destination); return writer; }; /** - * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * Encodes the specified CopyLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @static - * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {google.logging.v2.ICopyLogEntriesRequest} message CopyLogEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CopyLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * Decodes a CopyLogEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsRequest.decode = function decode(reader, length) { + CopyLogEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); + message.name = reader.string(); break; case 3: - message.pageSize = reader.int32(); + message.filter = reader.string(); + break; + case 4: + message.destination = reader.string(); break; default: reader.skipType(tag & 7); @@ -25138,126 +25565,130 @@ }; /** - * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * Decodes a CopyLogEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + CopyLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogMetricsRequest message. + * Verifies a CopyLogEntriesRequest message. * @function verify - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogMetricsRequest.verify = function verify(message) { + CopyLogEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; return null; }; /** - * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CopyLogEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest */ - ListLogMetricsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogMetricsRequest) + CopyLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CopyLogEntriesRequest) return object; - var message = new $root.google.logging.v2.ListLogMetricsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.CopyLogEntriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.destination != null) + message.destination = String(object.destination); return message; }; /** - * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CopyLogEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @static - * @param {google.logging.v2.ListLogMetricsRequest} message ListLogMetricsRequest + * @param {google.logging.v2.CopyLogEntriesRequest} message CopyLogEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogMetricsRequest.toObject = function toObject(message, options) { + CopyLogEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.name = ""; + object.filter = ""; + object.destination = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; return object; }; /** - * Converts this ListLogMetricsRequest to JSON. + * Converts this CopyLogEntriesRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogMetricsRequest + * @memberof google.logging.v2.CopyLogEntriesRequest * @instance * @returns {Object.} JSON object */ - ListLogMetricsRequest.prototype.toJSON = function toJSON() { + CopyLogEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogMetricsRequest; + return CopyLogEntriesRequest; })(); - v2.ListLogMetricsResponse = (function() { + v2.CopyLogEntriesMetadata = (function() { /** - * Properties of a ListLogMetricsResponse. + * Properties of a CopyLogEntriesMetadata. * @memberof google.logging.v2 - * @interface IListLogMetricsResponse - * @property {Array.|null} [metrics] ListLogMetricsResponse metrics - * @property {string|null} [nextPageToken] ListLogMetricsResponse nextPageToken + * @interface ICopyLogEntriesMetadata + * @property {google.protobuf.ITimestamp|null} [startTime] CopyLogEntriesMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] CopyLogEntriesMetadata endTime + * @property {google.logging.v2.OperationState|null} [state] CopyLogEntriesMetadata state + * @property {boolean|null} [cancellationRequested] CopyLogEntriesMetadata cancellationRequested + * @property {google.logging.v2.ICopyLogEntriesRequest|null} [request] CopyLogEntriesMetadata request + * @property {number|null} [progress] CopyLogEntriesMetadata progress + * @property {string|null} [writerIdentity] CopyLogEntriesMetadata writerIdentity */ /** - * Constructs a new ListLogMetricsResponse. + * Constructs a new CopyLogEntriesMetadata. * @memberof google.logging.v2 - * @classdesc Represents a ListLogMetricsResponse. - * @implements IListLogMetricsResponse + * @classdesc Represents a CopyLogEntriesMetadata. + * @implements ICopyLogEntriesMetadata * @constructor - * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + * @param {google.logging.v2.ICopyLogEntriesMetadata=} [properties] Properties to set */ - function ListLogMetricsResponse(properties) { - this.metrics = []; + function CopyLogEntriesMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25265,91 +25696,153 @@ } /** - * ListLogMetricsResponse metrics. - * @member {Array.} metrics - * @memberof google.logging.v2.ListLogMetricsResponse + * CopyLogEntriesMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.logging.v2.CopyLogEntriesMetadata * @instance */ - ListLogMetricsResponse.prototype.metrics = $util.emptyArray; + CopyLogEntriesMetadata.prototype.startTime = null; /** - * ListLogMetricsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListLogMetricsResponse + * CopyLogEntriesMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.logging.v2.CopyLogEntriesMetadata * @instance */ - ListLogMetricsResponse.prototype.nextPageToken = ""; + CopyLogEntriesMetadata.prototype.endTime = null; /** - * Creates a new ListLogMetricsResponse instance using the specified properties. + * CopyLogEntriesMetadata state. + * @member {google.logging.v2.OperationState} state + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.state = 0; + + /** + * CopyLogEntriesMetadata cancellationRequested. + * @member {boolean} cancellationRequested + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.cancellationRequested = false; + + /** + * CopyLogEntriesMetadata request. + * @member {google.logging.v2.ICopyLogEntriesRequest|null|undefined} request + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.request = null; + + /** + * CopyLogEntriesMetadata progress. + * @member {number} progress + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.progress = 0; + + /** + * CopyLogEntriesMetadata writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.writerIdentity = ""; + + /** + * Creates a new CopyLogEntriesMetadata instance using the specified properties. * @function create - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @static - * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse instance + * @param {google.logging.v2.ICopyLogEntriesMetadata=} [properties] Properties to set + * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata instance */ - ListLogMetricsResponse.create = function create(properties) { - return new ListLogMetricsResponse(properties); + CopyLogEntriesMetadata.create = function create(properties) { + return new CopyLogEntriesMetadata(properties); }; /** - * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * Encodes the specified CopyLogEntriesMetadata message. Does not implicitly {@link google.logging.v2.CopyLogEntriesMetadata.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @static - * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {google.logging.v2.ICopyLogEntriesMetadata} message CopyLogEntriesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsResponse.encode = function encode(message, writer) { + CopyLogEntriesMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.logging.v2.LogMetric.encode(message.metrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.cancellationRequested != null && Object.hasOwnProperty.call(message, "cancellationRequested")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.cancellationRequested); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.logging.v2.CopyLogEntriesRequest.encode(message.request, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.progress); + if (message.writerIdentity != null && Object.hasOwnProperty.call(message, "writerIdentity")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.writerIdentity); return writer; }; /** - * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * Encodes the specified CopyLogEntriesMetadata message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @static - * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {google.logging.v2.ICopyLogEntriesMetadata} message CopyLogEntriesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLogMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CopyLogEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * Decodes a CopyLogEntriesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsResponse.decode = function decode(reader, length) { + CopyLogEntriesMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.cancellationRequested = reader.bool(); + break; + case 5: + message.request = $root.google.logging.v2.CopyLogEntriesRequest.decode(reader, reader.uint32()); + break; + case 6: + message.progress = reader.int32(); + break; + case 7: + message.writerIdentity = reader.string(); break; default: reader.skipType(tag & 7); @@ -25360,133 +25853,209 @@ }; /** - * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * Decodes a CopyLogEntriesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + CopyLogEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLogMetricsResponse message. + * Verifies a CopyLogEntriesMetadata message. * @function verify - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLogMetricsResponse.verify = function verify(message) { + CopyLogEntriesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.logging.v2.LogMetric.verify(message.metrics[i]); - if (error) - return "metrics." + error; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; } + if (message.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) + if (typeof message.cancellationRequested !== "boolean") + return "cancellationRequested: boolean expected"; + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.logging.v2.CopyLogEntriesRequest.verify(message.request); + if (error) + return "request." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.progress != null && message.hasOwnProperty("progress")) + if (!$util.isInteger(message.progress)) + return "progress: integer expected"; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; return null; }; /** - * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CopyLogEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata */ - ListLogMetricsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListLogMetricsResponse) + CopyLogEntriesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CopyLogEntriesMetadata) return object; - var message = new $root.google.logging.v2.ListLogMetricsResponse(); - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: object expected"); - message.metrics[i] = $root.google.logging.v2.LogMetric.fromObject(object.metrics[i]); - } + var message = new $root.google.logging.v2.CopyLogEntriesMetadata(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + case "OPERATION_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "OPERATION_STATE_SCHEDULED": + case 1: + message.state = 1; + break; + case "OPERATION_STATE_WAITING_FOR_PERMISSIONS": + case 2: + message.state = 2; + break; + case "OPERATION_STATE_RUNNING": + case 3: + message.state = 3; + break; + case "OPERATION_STATE_SUCCEEDED": + case 4: + message.state = 4; + break; + case "OPERATION_STATE_FAILED": + case 5: + message.state = 5; + break; + case "OPERATION_STATE_CANCELLED": + case 6: + message.state = 6; + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.cancellationRequested != null) + message.cancellationRequested = Boolean(object.cancellationRequested); + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.request: object expected"); + message.request = $root.google.logging.v2.CopyLogEntriesRequest.fromObject(object.request); + } + if (object.progress != null) + message.progress = object.progress | 0; + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); return message; }; /** - * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CopyLogEntriesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @static - * @param {google.logging.v2.ListLogMetricsResponse} message ListLogMetricsResponse + * @param {google.logging.v2.CopyLogEntriesMetadata} message CopyLogEntriesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLogMetricsResponse.toObject = function toObject(message, options) { + CopyLogEntriesMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.metrics = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.logging.v2.LogMetric.toObject(message.metrics[j], options); + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; + object.cancellationRequested = false; + object.request = null; + object.progress = 0; + object.writerIdentity = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.logging.v2.OperationState[message.state] : message.state; + if (message.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) + object.cancellationRequested = message.cancellationRequested; + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.logging.v2.CopyLogEntriesRequest.toObject(message.request, options); + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = message.progress; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; return object; }; /** - * Converts this ListLogMetricsResponse to JSON. + * Converts this CopyLogEntriesMetadata to JSON. * @function toJSON - * @memberof google.logging.v2.ListLogMetricsResponse + * @memberof google.logging.v2.CopyLogEntriesMetadata * @instance * @returns {Object.} JSON object */ - ListLogMetricsResponse.prototype.toJSON = function toJSON() { + CopyLogEntriesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLogMetricsResponse; + return CopyLogEntriesMetadata; })(); - v2.GetLogMetricRequest = (function() { + v2.CopyLogEntriesResponse = (function() { /** - * Properties of a GetLogMetricRequest. + * Properties of a CopyLogEntriesResponse. * @memberof google.logging.v2 - * @interface IGetLogMetricRequest - * @property {string|null} [metricName] GetLogMetricRequest metricName + * @interface ICopyLogEntriesResponse + * @property {number|Long|null} [logEntriesCopiedCount] CopyLogEntriesResponse logEntriesCopiedCount */ /** - * Constructs a new GetLogMetricRequest. + * Constructs a new CopyLogEntriesResponse. * @memberof google.logging.v2 - * @classdesc Represents a GetLogMetricRequest. - * @implements IGetLogMetricRequest + * @classdesc Represents a CopyLogEntriesResponse. + * @implements ICopyLogEntriesResponse * @constructor - * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + * @param {google.logging.v2.ICopyLogEntriesResponse=} [properties] Properties to set */ - function GetLogMetricRequest(properties) { + function CopyLogEntriesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25494,75 +26063,75 @@ } /** - * GetLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.GetLogMetricRequest + * CopyLogEntriesResponse logEntriesCopiedCount. + * @member {number|Long} logEntriesCopiedCount + * @memberof google.logging.v2.CopyLogEntriesResponse * @instance */ - GetLogMetricRequest.prototype.metricName = ""; + CopyLogEntriesResponse.prototype.logEntriesCopiedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GetLogMetricRequest instance using the specified properties. + * Creates a new CopyLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @static - * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest instance + * @param {google.logging.v2.ICopyLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse instance */ - GetLogMetricRequest.create = function create(properties) { - return new GetLogMetricRequest(properties); + CopyLogEntriesResponse.create = function create(properties) { + return new CopyLogEntriesResponse(properties); }; /** - * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * Encodes the specified CopyLogEntriesResponse message. Does not implicitly {@link google.logging.v2.CopyLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @static - * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {google.logging.v2.ICopyLogEntriesResponse} message CopyLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLogMetricRequest.encode = function encode(message, writer) { + CopyLogEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.logEntriesCopiedCount != null && Object.hasOwnProperty.call(message, "logEntriesCopiedCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.logEntriesCopiedCount); return writer; }; /** - * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * Encodes the specified CopyLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @static - * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {google.logging.v2.ICopyLogEntriesResponse} message CopyLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + CopyLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * Decodes a CopyLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLogMetricRequest.decode = function decode(reader, length) { + CopyLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLogMetricRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.metricName = reader.string(); + message.logEntriesCopiedCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -25573,323 +26142,372 @@ }; /** - * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a CopyLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + CopyLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetLogMetricRequest message. + * Verifies a CopyLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetLogMetricRequest.verify = function verify(message) { + CopyLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; + if (message.logEntriesCopiedCount != null && message.hasOwnProperty("logEntriesCopiedCount")) + if (!$util.isInteger(message.logEntriesCopiedCount) && !(message.logEntriesCopiedCount && $util.isInteger(message.logEntriesCopiedCount.low) && $util.isInteger(message.logEntriesCopiedCount.high))) + return "logEntriesCopiedCount: integer|Long expected"; return null; }; /** - * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CopyLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse */ - GetLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetLogMetricRequest) + CopyLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CopyLogEntriesResponse) return object; - var message = new $root.google.logging.v2.GetLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); + var message = new $root.google.logging.v2.CopyLogEntriesResponse(); + if (object.logEntriesCopiedCount != null) + if ($util.Long) + (message.logEntriesCopiedCount = $util.Long.fromValue(object.logEntriesCopiedCount)).unsigned = false; + else if (typeof object.logEntriesCopiedCount === "string") + message.logEntriesCopiedCount = parseInt(object.logEntriesCopiedCount, 10); + else if (typeof object.logEntriesCopiedCount === "number") + message.logEntriesCopiedCount = object.logEntriesCopiedCount; + else if (typeof object.logEntriesCopiedCount === "object") + message.logEntriesCopiedCount = new $util.LongBits(object.logEntriesCopiedCount.low >>> 0, object.logEntriesCopiedCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * Creates a plain object from a CopyLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @static - * @param {google.logging.v2.GetLogMetricRequest} message GetLogMetricRequest + * @param {google.logging.v2.CopyLogEntriesResponse} message CopyLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetLogMetricRequest.toObject = function toObject(message, options) { + CopyLogEntriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.logEntriesCopiedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.logEntriesCopiedCount = options.longs === String ? "0" : 0; + if (message.logEntriesCopiedCount != null && message.hasOwnProperty("logEntriesCopiedCount")) + if (typeof message.logEntriesCopiedCount === "number") + object.logEntriesCopiedCount = options.longs === String ? String(message.logEntriesCopiedCount) : message.logEntriesCopiedCount; + else + object.logEntriesCopiedCount = options.longs === String ? $util.Long.prototype.toString.call(message.logEntriesCopiedCount) : options.longs === Number ? new $util.LongBits(message.logEntriesCopiedCount.low >>> 0, message.logEntriesCopiedCount.high >>> 0).toNumber() : message.logEntriesCopiedCount; return object; }; /** - * Converts this GetLogMetricRequest to JSON. + * Converts this CopyLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.GetLogMetricRequest + * @memberof google.logging.v2.CopyLogEntriesResponse * @instance * @returns {Object.} JSON object */ - GetLogMetricRequest.prototype.toJSON = function toJSON() { + CopyLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetLogMetricRequest; + return CopyLogEntriesResponse; })(); - v2.CreateLogMetricRequest = (function() { + /** + * LifecycleState enum. + * @name google.logging.v2.LifecycleState + * @enum {number} + * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value + */ + v2.LifecycleState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "DELETE_REQUESTED"] = 2; + return values; + })(); - /** - * Properties of a CreateLogMetricRequest. - * @memberof google.logging.v2 - * @interface ICreateLogMetricRequest - * @property {string|null} [parent] CreateLogMetricRequest parent - * @property {google.logging.v2.ILogMetric|null} [metric] CreateLogMetricRequest metric - */ + /** + * OperationState enum. + * @name google.logging.v2.OperationState + * @enum {number} + * @property {number} OPERATION_STATE_UNSPECIFIED=0 OPERATION_STATE_UNSPECIFIED value + * @property {number} OPERATION_STATE_SCHEDULED=1 OPERATION_STATE_SCHEDULED value + * @property {number} OPERATION_STATE_WAITING_FOR_PERMISSIONS=2 OPERATION_STATE_WAITING_FOR_PERMISSIONS value + * @property {number} OPERATION_STATE_RUNNING=3 OPERATION_STATE_RUNNING value + * @property {number} OPERATION_STATE_SUCCEEDED=4 OPERATION_STATE_SUCCEEDED value + * @property {number} OPERATION_STATE_FAILED=5 OPERATION_STATE_FAILED value + * @property {number} OPERATION_STATE_CANCELLED=6 OPERATION_STATE_CANCELLED value + */ + v2.OperationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPERATION_STATE_SCHEDULED"] = 1; + values[valuesById[2] = "OPERATION_STATE_WAITING_FOR_PERMISSIONS"] = 2; + values[valuesById[3] = "OPERATION_STATE_RUNNING"] = 3; + values[valuesById[4] = "OPERATION_STATE_SUCCEEDED"] = 4; + values[valuesById[5] = "OPERATION_STATE_FAILED"] = 5; + values[valuesById[6] = "OPERATION_STATE_CANCELLED"] = 6; + return values; + })(); + + v2.MetricsServiceV2 = (function() { /** - * Constructs a new CreateLogMetricRequest. + * Constructs a new MetricsServiceV2 service. * @memberof google.logging.v2 - * @classdesc Represents a CreateLogMetricRequest. - * @implements ICreateLogMetricRequest + * @classdesc Represents a MetricsServiceV2 + * @extends $protobuf.rpc.Service * @constructor - * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function CreateLogMetricRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MetricsServiceV2(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (MetricsServiceV2.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsServiceV2; + /** - * CreateLogMetricRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateLogMetricRequest - * @instance + * Creates new MetricsServiceV2 service using the specified rpc implementation. + * @function create + * @memberof google.logging.v2.MetricsServiceV2 + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MetricsServiceV2} RPC service. Useful where requests and/or responses are streamed. */ - CreateLogMetricRequest.prototype.parent = ""; + MetricsServiceV2.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * CreateLogMetricRequest metric. - * @member {google.logging.v2.ILogMetric|null|undefined} metric - * @memberof google.logging.v2.CreateLogMetricRequest + * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef ListLogMetricsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLogMetricsResponse} [response] ListLogMetricsResponse + */ + + /** + * Calls ListLogMetrics. + * @function listLogMetrics + * @memberof google.logging.v2.MetricsServiceV2 * @instance + * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.ListLogMetricsCallback} callback Node-style callback called with the error, if any, and ListLogMetricsResponse + * @returns {undefined} + * @variation 1 */ - CreateLogMetricRequest.prototype.metric = null; + Object.defineProperty(MetricsServiceV2.prototype.listLogMetrics = function listLogMetrics(request, callback) { + return this.rpcCall(listLogMetrics, $root.google.logging.v2.ListLogMetricsRequest, $root.google.logging.v2.ListLogMetricsResponse, request, callback); + }, "name", { value: "ListLogMetrics" }); /** - * Creates a new CreateLogMetricRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest instance + * Calls ListLogMetrics. + * @function listLogMetrics + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IListLogMetricsRequest} request ListLogMetricsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateLogMetricRequest.create = function create(properties) { - return new CreateLogMetricRequest(properties); - }; /** - * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef GetLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric */ - CreateLogMetricRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetLogMetric. + * @function getLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.GetLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 */ - CreateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(MetricsServiceV2.prototype.getLogMetric = function getLogMetric(request, callback) { + return this.rpcCall(getLogMetric, $root.google.logging.v2.GetLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "GetLogMetric" }); /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetLogMetric. + * @function getLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IGetLogMetricRequest} request GetLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateLogMetricRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLogMetricRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef CreateLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric */ - CreateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a CreateLogMetricRequest message. - * @function verify - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateLogMetric. + * @function createLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.CreateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 */ - CreateLogMetricRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.metric != null && message.hasOwnProperty("metric")) { - var error = $root.google.logging.v2.LogMetric.verify(message.metric); - if (error) - return "metric." + error; - } - return null; - }; + Object.defineProperty(MetricsServiceV2.prototype.createLogMetric = function createLogMetric(request, callback) { + return this.rpcCall(createLogMetric, $root.google.logging.v2.CreateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "CreateLogMetric" }); /** - * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * Calls CreateLogMetric. + * @function createLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.ICreateLogMetricRequest} request CreateLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateLogMetricRequest) - return object; - var message = new $root.google.logging.v2.CreateLogMetricRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.logging.v2.CreateLogMetricRequest.metric: object expected"); - message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); - } - return message; - }; /** - * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.CreateLogMetricRequest - * @static - * @param {google.logging.v2.CreateLogMetricRequest} message CreateLogMetricRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef UpdateLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.LogMetric} [response] LogMetric */ - CreateLogMetricRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.metric = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); - return object; - }; /** - * Converts this CreateLogMetricRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.CreateLogMetricRequest + * Calls UpdateLogMetric. + * @function updateLogMetric + * @memberof google.logging.v2.MetricsServiceV2 * @instance - * @returns {Object.} JSON object + * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback} callback Node-style callback called with the error, if any, and LogMetric + * @returns {undefined} + * @variation 1 */ - CreateLogMetricRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(MetricsServiceV2.prototype.updateLogMetric = function updateLogMetric(request, callback) { + return this.rpcCall(updateLogMetric, $root.google.logging.v2.UpdateLogMetricRequest, $root.google.logging.v2.LogMetric, request, callback); + }, "name", { value: "UpdateLogMetric" }); - return CreateLogMetricRequest; + /** + * Calls UpdateLogMetric. + * @function updateLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IUpdateLogMetricRequest} request UpdateLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * @memberof google.logging.v2.MetricsServiceV2 + * @typedef DeleteLogMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteLogMetric. + * @function deleteLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object + * @param {google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsServiceV2.prototype.deleteLogMetric = function deleteLogMetric(request, callback) { + return this.rpcCall(deleteLogMetric, $root.google.logging.v2.DeleteLogMetricRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteLogMetric" }); + + /** + * Calls DeleteLogMetric. + * @function deleteLogMetric + * @memberof google.logging.v2.MetricsServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLogMetricRequest} request DeleteLogMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetricsServiceV2; })(); - v2.UpdateLogMetricRequest = (function() { + v2.LogMetric = (function() { /** - * Properties of an UpdateLogMetricRequest. + * Properties of a LogMetric. * @memberof google.logging.v2 - * @interface IUpdateLogMetricRequest - * @property {string|null} [metricName] UpdateLogMetricRequest metricName - * @property {google.logging.v2.ILogMetric|null} [metric] UpdateLogMetricRequest metric + * @interface ILogMetric + * @property {string|null} [name] LogMetric name + * @property {string|null} [description] LogMetric description + * @property {string|null} [filter] LogMetric filter + * @property {boolean|null} [disabled] LogMetric disabled + * @property {google.api.IMetricDescriptor|null} [metricDescriptor] LogMetric metricDescriptor + * @property {string|null} [valueExtractor] LogMetric valueExtractor + * @property {Object.|null} [labelExtractors] LogMetric labelExtractors + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] LogMetric bucketOptions + * @property {google.protobuf.ITimestamp|null} [createTime] LogMetric createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogMetric updateTime + * @property {google.logging.v2.LogMetric.ApiVersion|null} [version] LogMetric version */ /** - * Constructs a new UpdateLogMetricRequest. + * Constructs a new LogMetric. * @memberof google.logging.v2 - * @classdesc Represents an UpdateLogMetricRequest. - * @implements IUpdateLogMetricRequest + * @classdesc Represents a LogMetric. + * @implements ILogMetric * @constructor - * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogMetric=} [properties] Properties to set */ - function UpdateLogMetricRequest(properties) { + function LogMetric(properties) { + this.labelExtractors = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25897,289 +26515,225 @@ } /** - * UpdateLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.UpdateLogMetricRequest + * LogMetric name. + * @member {string} name + * @memberof google.logging.v2.LogMetric * @instance */ - UpdateLogMetricRequest.prototype.metricName = ""; + LogMetric.prototype.name = ""; /** - * UpdateLogMetricRequest metric. - * @member {google.logging.v2.ILogMetric|null|undefined} metric - * @memberof google.logging.v2.UpdateLogMetricRequest + * LogMetric description. + * @member {string} description + * @memberof google.logging.v2.LogMetric * @instance */ - UpdateLogMetricRequest.prototype.metric = null; + LogMetric.prototype.description = ""; /** - * Creates a new UpdateLogMetricRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest instance + * LogMetric filter. + * @member {string} filter + * @memberof google.logging.v2.LogMetric + * @instance */ - UpdateLogMetricRequest.create = function create(properties) { - return new UpdateLogMetricRequest(properties); - }; + LogMetric.prototype.filter = ""; /** - * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * LogMetric disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogMetric + * @instance */ - UpdateLogMetricRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + LogMetric.prototype.disabled = false; /** - * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * LogMetric metricDescriptor. + * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor + * @memberof google.logging.v2.LogMetric + * @instance */ - UpdateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + LogMetric.prototype.metricDescriptor = null; /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. - * @function decode - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * LogMetric valueExtractor. + * @member {string} valueExtractor + * @memberof google.logging.v2.LogMetric + * @instance */ - UpdateLogMetricRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateLogMetricRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metricName = reader.string(); - break; - case 2: - message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateLogMetricRequest message. - * @function verify - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateLogMetricRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - if (message.metric != null && message.hasOwnProperty("metric")) { - var error = $root.google.logging.v2.LogMetric.verify(message.metric); - if (error) - return "metric." + error; - } - return null; - }; - - /** - * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest - */ - UpdateLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateLogMetricRequest) - return object; - var message = new $root.google.logging.v2.UpdateLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.logging.v2.UpdateLogMetricRequest.metric: object expected"); - message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); - } - return message; - }; + LogMetric.prototype.valueExtractor = ""; /** - * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.logging.v2.UpdateLogMetricRequest - * @static - * @param {google.logging.v2.UpdateLogMetricRequest} message UpdateLogMetricRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * LogMetric labelExtractors. + * @member {Object.} labelExtractors + * @memberof google.logging.v2.LogMetric + * @instance */ - UpdateLogMetricRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.metricName = ""; - object.metric = null; - } - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); - return object; - }; + LogMetric.prototype.labelExtractors = $util.emptyObject; /** - * Converts this UpdateLogMetricRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.UpdateLogMetricRequest + * LogMetric bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.logging.v2.LogMetric * @instance - * @returns {Object.} JSON object */ - UpdateLogMetricRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpdateLogMetricRequest; - })(); - - v2.DeleteLogMetricRequest = (function() { + LogMetric.prototype.bucketOptions = null; /** - * Properties of a DeleteLogMetricRequest. - * @memberof google.logging.v2 - * @interface IDeleteLogMetricRequest - * @property {string|null} [metricName] DeleteLogMetricRequest metricName + * LogMetric createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogMetric + * @instance */ + LogMetric.prototype.createTime = null; /** - * Constructs a new DeleteLogMetricRequest. - * @memberof google.logging.v2 - * @classdesc Represents a DeleteLogMetricRequest. - * @implements IDeleteLogMetricRequest - * @constructor - * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + * LogMetric updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogMetric + * @instance */ - function DeleteLogMetricRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LogMetric.prototype.updateTime = null; /** - * DeleteLogMetricRequest metricName. - * @member {string} metricName - * @memberof google.logging.v2.DeleteLogMetricRequest + * LogMetric version. + * @member {google.logging.v2.LogMetric.ApiVersion} version + * @memberof google.logging.v2.LogMetric * @instance */ - DeleteLogMetricRequest.prototype.metricName = ""; + LogMetric.prototype.version = 0; /** - * Creates a new DeleteLogMetricRequest instance using the specified properties. + * Creates a new LogMetric instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @static - * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest instance + * @param {google.logging.v2.ILogMetric=} [properties] Properties to set + * @returns {google.logging.v2.LogMetric} LogMetric instance */ - DeleteLogMetricRequest.create = function create(properties) { - return new DeleteLogMetricRequest(properties); + LogMetric.create = function create(properties) { + return new LogMetric(properties); }; /** - * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * Encodes the specified LogMetric message. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @static - * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogMetricRequest.encode = function encode(message, writer) { + LogMetric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); + if (message.metricDescriptor != null && Object.hasOwnProperty.call(message, "metricDescriptor")) + $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.valueExtractor != null && Object.hasOwnProperty.call(message, "valueExtractor")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueExtractor); + if (message.labelExtractors != null && Object.hasOwnProperty.call(message, "labelExtractors")) + for (var keys = Object.keys(message.labelExtractors), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labelExtractors[keys[i]]).ldelim(); + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.disabled); return writer; }; /** - * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * Encodes the specified LogMetric message, length delimited. Does not implicitly {@link google.logging.v2.LogMetric.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @static - * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {google.logging.v2.ILogMetric} message LogMetric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogMetric.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * Decodes a LogMetric message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @returns {google.logging.v2.LogMetric} LogMetric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogMetricRequest.decode = function decode(reader, length) { + LogMetric.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogMetricRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.metricName = reader.string(); + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.filter = reader.string(); + break; + case 12: + message.disabled = reader.bool(); + break; + case 5: + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + break; + case 6: + message.valueExtractor = reader.string(); + break; + case 7: + if (message.labelExtractors === $util.emptyObject) + message.labelExtractors = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labelExtractors[key] = value; + break; + case 8: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 9: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.version = reader.int32(); break; default: reader.skipType(tag & 7); @@ -26190,1526 +26744,1626 @@ }; /** - * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * Decodes a LogMetric message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @returns {google.logging.v2.LogMetric} LogMetric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + LogMetric.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteLogMetricRequest message. + * Verifies a LogMetric message. * @function verify - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteLogMetricRequest.verify = function verify(message) { + LogMetric.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); + if (error) + return "metricDescriptor." + error; + } + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + if (!$util.isString(message.valueExtractor)) + return "valueExtractor: string expected"; + if (message.labelExtractors != null && message.hasOwnProperty("labelExtractors")) { + if (!$util.isObject(message.labelExtractors)) + return "labelExtractors: object expected"; + var key = Object.keys(message.labelExtractors); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labelExtractors[key[i]])) + return "labelExtractors: string{k:string} expected"; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.version != null && message.hasOwnProperty("version")) + switch (message.version) { + default: + return "version: enum value expected"; + case 0: + case 1: + break; + } return null; }; /** - * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogMetric message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @returns {google.logging.v2.LogMetric} LogMetric */ - DeleteLogMetricRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteLogMetricRequest) + LogMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogMetric) return object; - var message = new $root.google.logging.v2.DeleteLogMetricRequest(); - if (object.metricName != null) - message.metricName = String(object.metricName); + var message = new $root.google.logging.v2.LogMetric(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.metricDescriptor != null) { + if (typeof object.metricDescriptor !== "object") + throw TypeError(".google.logging.v2.LogMetric.metricDescriptor: object expected"); + message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); + } + if (object.valueExtractor != null) + message.valueExtractor = String(object.valueExtractor); + if (object.labelExtractors) { + if (typeof object.labelExtractors !== "object") + throw TypeError(".google.logging.v2.LogMetric.labelExtractors: object expected"); + message.labelExtractors = {}; + for (var keys = Object.keys(object.labelExtractors), i = 0; i < keys.length; ++i) + message.labelExtractors[keys[i]] = String(object.labelExtractors[keys[i]]); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.logging.v2.LogMetric.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogMetric.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogMetric.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.version) { + case "V2": + case 0: + message.version = 0; + break; + case "V1": + case 1: + message.version = 1; + break; + } return message; }; /** - * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogMetric message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @static - * @param {google.logging.v2.DeleteLogMetricRequest} message DeleteLogMetricRequest + * @param {google.logging.v2.LogMetric} message LogMetric * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteLogMetricRequest.toObject = function toObject(message, options) { + LogMetric.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; + if (options.objects || options.defaults) + object.labelExtractors = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.filter = ""; + object.version = options.enums === String ? "V2" : 0; + object.metricDescriptor = null; + object.valueExtractor = ""; + object.bucketOptions = null; + object.createTime = null; + object.updateTime = null; + object.disabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.version != null && message.hasOwnProperty("version")) + object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); + if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) + object.valueExtractor = message.valueExtractor; + var keys2; + if (message.labelExtractors && (keys2 = Object.keys(message.labelExtractors)).length) { + object.labelExtractors = {}; + for (var j = 0; j < keys2.length; ++j) + object.labelExtractors[keys2[j]] = message.labelExtractors[keys2[j]]; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; return object; }; /** - * Converts this DeleteLogMetricRequest to JSON. + * Converts this LogMetric to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteLogMetricRequest + * @memberof google.logging.v2.LogMetric * @instance * @returns {Object.} JSON object */ - DeleteLogMetricRequest.prototype.toJSON = function toJSON() { + LogMetric.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteLogMetricRequest; - })(); + /** + * ApiVersion enum. + * @name google.logging.v2.LogMetric.ApiVersion + * @enum {number} + * @property {number} V2=0 V2 value + * @property {number} V1=1 V1 value + */ + LogMetric.ApiVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "V2"] = 0; + values[valuesById[1] = "V1"] = 1; + return values; + })(); - return v2; - })(); + return LogMetric; + })(); - return logging; - })(); + v2.ListLogMetricsRequest = (function() { - google.api = (function() { + /** + * Properties of a ListLogMetricsRequest. + * @memberof google.logging.v2 + * @interface IListLogMetricsRequest + * @property {string|null} [parent] ListLogMetricsRequest parent + * @property {string|null} [pageToken] ListLogMetricsRequest pageToken + * @property {number|null} [pageSize] ListLogMetricsRequest pageSize + */ - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * Constructs a new ListLogMetricsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogMetricsRequest. + * @implements IListLogMetricsRequest + * @constructor + * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + */ + function ListLogMetricsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - api.Http = (function() { + /** + * ListLogMetricsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.parent = ""; - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ + /** + * ListLogMetricsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.pageToken = ""; - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; + /** + * ListLogMetricsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + */ + ListLogMetricsRequest.prototype.pageSize = 0; - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; + /** + * Creates a new ListLogMetricsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest instance + */ + ListLogMetricsRequest.create = function create(properties) { + return new ListLogMetricsRequest(properties); + }; - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; + /** + * Encodes the specified ListLogMetricsRequest message. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListLogMetricsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.IListLogMetricsRequest} message ListLogMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; + /** + * Decodes a ListLogMetricsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a ListLogMetricsRequest message. + * @function verify + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogMetricsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; - return Http; - })(); + /** + * Creates a ListLogMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogMetricsRequest} ListLogMetricsRequest + */ + ListLogMetricsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogMetricsRequest) + return object; + var message = new $root.google.logging.v2.ListLogMetricsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; - api.HttpRule = (function() { + /** + * Creates a plain object from a ListLogMetricsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {google.logging.v2.ListLogMetricsRequest} message ListLogMetricsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogMetricsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ + /** + * Converts this ListLogMetricsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogMetricsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLogMetricsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return ListLogMetricsRequest; + })(); - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + v2.ListLogMetricsResponse = (function() { - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; + /** + * Properties of a ListLogMetricsResponse. + * @memberof google.logging.v2 + * @interface IListLogMetricsResponse + * @property {Array.|null} [metrics] ListLogMetricsResponse metrics + * @property {string|null} [nextPageToken] ListLogMetricsResponse nextPageToken + */ - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; + /** + * Constructs a new ListLogMetricsResponse. + * @memberof google.logging.v2 + * @classdesc Represents a ListLogMetricsResponse. + * @implements IListLogMetricsResponse + * @constructor + * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + */ + function ListLogMetricsResponse(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; + /** + * ListLogMetricsResponse metrics. + * @member {Array.} metrics + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + */ + ListLogMetricsResponse.prototype.metrics = $util.emptyArray; - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; + /** + * ListLogMetricsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + */ + ListLogMetricsResponse.prototype.nextPageToken = ""; - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; + /** + * Creates a new ListLogMetricsResponse instance using the specified properties. + * @function create + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse instance + */ + ListLogMetricsResponse.create = function create(properties) { + return new ListLogMetricsResponse(properties); + }; - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + /** + * Encodes the specified ListLogMetricsResponse message. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.logging.v2.LogMetric.encode(message.metrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + /** + * Encodes the specified ListLogMetricsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLogMetricsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.IListLogMetricsResponse} message ListLogMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLogMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + /** + * Decodes a ListLogMetricsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLogMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Verifies a ListLogMetricsResponse message. + * @function verify + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLogMetricsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.logging.v2.LogMetric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a ListLogMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.ListLogMetricsResponse} ListLogMetricsResponse + */ + ListLogMetricsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLogMetricsResponse) + return object; + var message = new $root.google.logging.v2.ListLogMetricsResponse(); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.logging.v2.ListLogMetricsResponse.metrics: object expected"); + message.metrics[i] = $root.google.logging.v2.LogMetric.fromObject(object.metrics[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; + /** + * Creates a plain object from a ListLogMetricsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {google.logging.v2.ListLogMetricsResponse} message ListLogMetricsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLogMetricsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.logging.v2.LogMetric.toObject(message.metrics[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; + /** + * Converts this ListLogMetricsResponse to JSON. + * @function toJSON + * @memberof google.logging.v2.ListLogMetricsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLogMetricsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return ListLogMetricsResponse; + })(); - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v2.GetLogMetricRequest = (function() { - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a GetLogMetricRequest. + * @memberof google.logging.v2 + * @interface IGetLogMetricRequest + * @property {string|null} [metricName] GetLogMetricRequest metricName + */ - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } + /** + * Constructs a new GetLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetLogMetricRequest. + * @implements IGetLogMetricRequest + * @constructor + * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + */ + function GetLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return null; - }; - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; + /** + * GetLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.GetLogMetricRequest + * @instance + */ + GetLogMetricRequest.prototype.metricName = ""; - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; + /** + * Creates a new GetLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest instance + */ + GetLogMetricRequest.create = function create(properties) { + return new GetLogMetricRequest(properties); + }; - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified GetLogMetricRequest message. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; - return HttpRule; - })(); + /** + * Encodes the specified GetLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.IGetLogMetricRequest} message GetLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - api.CustomHttpPattern = (function() { + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metricName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ + /** + * Decodes a GetLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a GetLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; + /** + * Creates a GetLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetLogMetricRequest} GetLogMetricRequest + */ + GetLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetLogMetricRequest) + return object; + var message = new $root.google.logging.v2.GetLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; + /** + * Creates a plain object from a GetLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {google.logging.v2.GetLogMetricRequest} message GetLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; + /** + * Converts this GetLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + GetLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; + return GetLogMetricRequest; + })(); - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; + v2.CreateLogMetricRequest = (function() { - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; + /** + * Properties of a CreateLogMetricRequest. + * @memberof google.logging.v2 + * @interface ICreateLogMetricRequest + * @property {string|null} [parent] CreateLogMetricRequest parent + * @property {google.logging.v2.ILogMetric|null} [metric] CreateLogMetricRequest metric + */ - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + /** + * Constructs a new CreateLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CreateLogMetricRequest. + * @implements ICreateLogMetricRequest + * @constructor + * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + */ + function CreateLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CreateLogMetricRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + */ + CreateLogMetricRequest.prototype.parent = ""; - return CustomHttpPattern; - })(); + /** + * CreateLogMetricRequest metric. + * @member {google.logging.v2.ILogMetric|null|undefined} metric + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + */ + CreateLogMetricRequest.prototype.metric = null; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; - })(); + /** + * Creates a new CreateLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest instance + */ + CreateLogMetricRequest.create = function create(properties) { + return new CreateLogMetricRequest(properties); + }; - api.MonitoredResourceDescriptor = (function() { + /** + * Encodes the specified CreateLogMetricRequest message. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Properties of a MonitoredResourceDescriptor. - * @memberof google.api - * @interface IMonitoredResourceDescriptor - * @property {string|null} [name] MonitoredResourceDescriptor name - * @property {string|null} [type] MonitoredResourceDescriptor type - * @property {string|null} [displayName] MonitoredResourceDescriptor displayName - * @property {string|null} [description] MonitoredResourceDescriptor description - * @property {Array.|null} [labels] MonitoredResourceDescriptor labels - * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage - */ + /** + * Encodes the specified CreateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.ICreateLogMetricRequest} message CreateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new MonitoredResourceDescriptor. - * @memberof google.api - * @classdesc Represents a MonitoredResourceDescriptor. - * @implements IMonitoredResourceDescriptor - * @constructor - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - */ - function MonitoredResourceDescriptor(properties) { - this.labels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MonitoredResourceDescriptor name. - * @member {string} name - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.name = ""; + /** + * Decodes a CreateLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MonitoredResourceDescriptor type. - * @member {string} type - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.type = ""; + /** + * Verifies a CreateLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.logging.v2.LogMetric.verify(message.metric); + if (error) + return "metric." + error; + } + return null; + }; - /** - * MonitoredResourceDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.displayName = ""; + /** + * Creates a CreateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CreateLogMetricRequest} CreateLogMetricRequest + */ + CreateLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateLogMetricRequest) + return object; + var message = new $root.google.logging.v2.CreateLogMetricRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.logging.v2.CreateLogMetricRequest.metric: object expected"); + message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); + } + return message; + }; - /** - * MonitoredResourceDescriptor description. - * @member {string} description - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.description = ""; + /** + * Creates a plain object from a CreateLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {google.logging.v2.CreateLogMetricRequest} message CreateLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.metric = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); + return object; + }; - /** - * MonitoredResourceDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + /** + * Converts this CreateLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MonitoredResourceDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.launchStage = 0; + return CreateLogMetricRequest; + })(); - /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance - */ - MonitoredResourceDescriptor.create = function create(properties) { - return new MonitoredResourceDescriptor(properties); - }; + v2.UpdateLogMetricRequest = (function() { - /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); - return writer; - }; + /** + * Properties of an UpdateLogMetricRequest. + * @memberof google.logging.v2 + * @interface IUpdateLogMetricRequest + * @property {string|null} [metricName] UpdateLogMetricRequest metricName + * @property {google.logging.v2.ILogMetric|null} [metric] UpdateLogMetricRequest metric + */ - /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new UpdateLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateLogMetricRequest. + * @implements IUpdateLogMetricRequest + * @constructor + * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + */ + function UpdateLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 1: - message.type = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 7: - message.launchStage = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * UpdateLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + */ + UpdateLogMetricRequest.prototype.metricName = ""; + + /** + * UpdateLogMetricRequest metric. + * @member {google.logging.v2.ILogMetric|null|undefined} metric + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + */ + UpdateLogMetricRequest.prototype.metric = null; + + /** + * Creates a new UpdateLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest instance + */ + UpdateLogMetricRequest.create = function create(properties) { + return new UpdateLogMetricRequest(properties); + }; + + /** + * Encodes the specified UpdateLogMetricRequest message. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.logging.v2.LogMetric.encode(message.metric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.IUpdateLogMetricRequest} message UpdateLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metricName = reader.string(); + break; + case 2: + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an UpdateLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MonitoredResourceDescriptor message. - * @function verify - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoredResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + /** + * Verifies an UpdateLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.logging.v2.LogMetric.verify(message.metric); if (error) - return "labels." + error; + return "metric." + error; } - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; + return null; + }; + + /** + * Creates an UpdateLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateLogMetricRequest} UpdateLogMetricRequest + */ + UpdateLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateLogMetricRequest) + return object; + var message = new $root.google.logging.v2.UpdateLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.logging.v2.UpdateLogMetricRequest.metric: object expected"); + message.metric = $root.google.logging.v2.LogMetric.fromObject(object.metric); } - return null; - }; + return message; + }; - /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor - */ - MonitoredResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceDescriptor) - return object; - var message = new $root.google.api.MonitoredResourceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + /** + * Creates a plain object from an UpdateLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {google.logging.v2.UpdateLogMetricRequest} message UpdateLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricName = ""; + object.metric = null; } - } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - return message; - }; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.logging.v2.LogMetric.toObject(message.metric, options); + return object; + }; - /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MonitoredResourceDescriptor - * @static - * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoredResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.labels = []; - if (options.defaults) { - object.type = ""; - object.displayName = ""; - object.description = ""; - object.name = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - return object; - }; + /** + * Converts this UpdateLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this MonitoredResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.MonitoredResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return UpdateLogMetricRequest; + })(); - return MonitoredResourceDescriptor; - })(); + v2.DeleteLogMetricRequest = (function() { - api.MonitoredResource = (function() { + /** + * Properties of a DeleteLogMetricRequest. + * @memberof google.logging.v2 + * @interface IDeleteLogMetricRequest + * @property {string|null} [metricName] DeleteLogMetricRequest metricName + */ - /** - * Properties of a MonitoredResource. - * @memberof google.api - * @interface IMonitoredResource - * @property {string|null} [type] MonitoredResource type - * @property {Object.|null} [labels] MonitoredResource labels - */ + /** + * Constructs a new DeleteLogMetricRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteLogMetricRequest. + * @implements IDeleteLogMetricRequest + * @constructor + * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + */ + function DeleteLogMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new MonitoredResource. - * @memberof google.api - * @classdesc Represents a MonitoredResource. - * @implements IMonitoredResource - * @constructor - * @param {google.api.IMonitoredResource=} [properties] Properties to set - */ - function MonitoredResource(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DeleteLogMetricRequest metricName. + * @member {string} metricName + * @memberof google.logging.v2.DeleteLogMetricRequest + * @instance + */ + DeleteLogMetricRequest.prototype.metricName = ""; - /** - * MonitoredResource type. - * @member {string} type - * @memberof google.api.MonitoredResource - * @instance - */ - MonitoredResource.prototype.type = ""; + /** + * Creates a new DeleteLogMetricRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest instance + */ + DeleteLogMetricRequest.create = function create(properties) { + return new DeleteLogMetricRequest(properties); + }; - /** - * MonitoredResource labels. - * @member {Object.} labels - * @memberof google.api.MonitoredResource - * @instance - */ - MonitoredResource.prototype.labels = $util.emptyObject; + /** + * Encodes the specified DeleteLogMetricRequest message. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; - /** - * Creates a new MonitoredResource instance using the specified properties. - * @function create - * @memberof google.api.MonitoredResource - * @static - * @param {google.api.IMonitoredResource=} [properties] Properties to set - * @returns {google.api.MonitoredResource} MonitoredResource instance - */ - MonitoredResource.create = function create(properties) { - return new MonitoredResource(properties); - }; + /** + * Encodes the specified DeleteLogMetricRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLogMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.IDeleteLogMetricRequest} message DeleteLogMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLogMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @function encode - * @memberof google.api.MonitoredResource - * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metricName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteLogMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLogMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLogMetricRequest message. + * @function verify + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLogMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a DeleteLogMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteLogMetricRequest} DeleteLogMetricRequest + */ + DeleteLogMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLogMetricRequest) + return object; + var message = new $root.google.logging.v2.DeleteLogMetricRequest(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a DeleteLogMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {google.logging.v2.DeleteLogMetricRequest} message DeleteLogMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLogMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this DeleteLogMetricRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteLogMetricRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLogMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteLogMetricRequest; + })(); + + return v2; + })(); + + return logging; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -27720,132 +28374,143 @@ }; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResource message. + * Verifies a Http message. * @function verify - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResource.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.Http} Http */ - MonitoredResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResource) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.MonitoredResource(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.MonitoredResource.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @static - * @param {google.api.MonitoredResource} message MonitoredResource + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResource.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; + if (options.arrays || options.defaults) + object.rules = []; if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this MonitoredResource to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.MonitoredResource + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - MonitoredResource.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResource; + return Http; })(); - api.MonitoredResourceMetadata = (function() { + api.HttpRule = (function() { /** - * Properties of a MonitoredResourceMetadata. + * Properties of a HttpRule. * @memberof google.api - * @interface IMonitoredResourceMetadata - * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels - * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a MonitoredResourceMetadata. - * @implements IMonitoredResourceMetadata + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function MonitoredResourceMetadata(properties) { - this.userLabels = {}; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27853,351 +28518,209 @@ } /** - * MonitoredResourceMetadata systemLabels. - * @member {google.protobuf.IStruct|null|undefined} systemLabels - * @memberof google.api.MonitoredResourceMetadata + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - MonitoredResourceMetadata.prototype.systemLabels = null; + HttpRule.prototype.selector = ""; /** - * MonitoredResourceMetadata userLabels. - * @member {Object.} userLabels - * @memberof google.api.MonitoredResourceMetadata + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + HttpRule.prototype.get = null; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. - * @function create - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance */ - MonitoredResourceMetadata.create = function create(properties) { - return new MonitoredResourceMetadata(properties); - }; + HttpRule.prototype.put = null; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @function encode - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance */ - MonitoredResourceMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) - $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - return writer; - }; + HttpRule.prototype.post = null; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance */ - MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + HttpRule.prototype["delete"] = null; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance */ - MonitoredResourceMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 2: - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.userLabels[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + HttpRule.prototype.patch = null; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance */ - MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MonitoredResourceMetadata message. - * @function verify - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoredResourceMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { - var error = $root.google.protobuf.Struct.verify(message.systemLabels); - if (error) - return "systemLabels." + error; - } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata - */ - MonitoredResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceMetadata) - return object; - var message = new $root.google.api.MonitoredResourceMetadata(); - if (object.systemLabels != null) { - if (typeof object.systemLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); - message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); - } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoredResourceMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) - object.systemLabels = null; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; - } - return object; - }; + HttpRule.prototype.custom = null; /** - * Converts this MonitoredResourceMetadata to JSON. - * @function toJSON - * @memberof google.api.MonitoredResourceMetadata + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule * @instance - * @returns {Object.} JSON object - */ - MonitoredResourceMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MonitoredResourceMetadata; - })(); - - api.LabelDescriptor = (function() { - - /** - * Properties of a LabelDescriptor. - * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description - */ - - /** - * Constructs a new LabelDescriptor. - * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor - * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set */ - function LabelDescriptor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + HttpRule.prototype.body = ""; /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule * @instance */ - LabelDescriptor.prototype.key = ""; + HttpRule.prototype.responseBody = ""; /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - LabelDescriptor.prototype.valueType = 0; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - LabelDescriptor.prototype.description = ""; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.key = reader.string(); + message.selector = reader.string(); break; case 2: - message.valueType = reader.int32(); + message.get = reader.string(); break; case 3: - message.description = reader.string(); + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -28208,192 +28731,240 @@ }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LabelDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LabelDescriptor.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } return null; }; /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.HttpRule} HttpRule */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } - if (object.description != null) - message.description = String(object.description); return message; }; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LabelDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; - object.description = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this LabelDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.LabelDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - LabelDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); - - return LabelDescriptor; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; + return HttpRule; })(); - api.ResourceDescriptor = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28401,167 +28972,88 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceDescriptor.prototype.singular = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.kind = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -28572,463 +29064,3763 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.MonitoredResourceDescriptor = (function() { + + /** + * Properties of a MonitoredResourceDescriptor. + * @memberof google.api + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + */ + + /** + * Constructs a new MonitoredResourceDescriptor. + * @memberof google.api + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor + * @constructor + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + */ + function MonitoredResourceDescriptor(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.name = ""; + + /** + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.type = ""; + + /** + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.displayName = ""; + + /** + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.description = ""; + + /** + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + */ + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); + }; + + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); + return writer; + }; + + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; + case 1: + message.type = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 7: + message.launchStage = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResourceDescriptor message. + * @function verify + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + */ + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) + return object; + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + return object; + }; + + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResourceDescriptor; + })(); + + api.MonitoredResource = (function() { + + /** + * Properties of a MonitoredResource. + * @memberof google.api + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels + */ + + /** + * Constructs a new MonitoredResource. + * @memberof google.api + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource + * @constructor + * @param {google.api.IMonitoredResource=} [properties] Properties to set + */ + function MonitoredResource(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource + * @instance + */ + MonitoredResource.prototype.type = ""; + + /** + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource + * @instance + */ + MonitoredResource.prototype.labels = $util.emptyObject; + + /** + * Creates a new MonitoredResource instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance + */ + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); + }; + + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResource message. + * @function verify + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResource} MonitoredResource + */ + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) + return object; + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.MonitoredResource} message MonitoredResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this MonitoredResource to JSON. + * @function toJSON + * @memberof google.api.MonitoredResource + * @instance + * @returns {Object.} JSON object + */ + MonitoredResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResource; + })(); + + api.MonitoredResourceMetadata = (function() { + + /** + * Properties of a MonitoredResourceMetadata. + * @memberof google.api + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + */ + + /** + * Constructs a new MonitoredResourceMetadata. + * @memberof google.api + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata + * @constructor + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + */ + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata + * @instance + */ + MonitoredResourceMetadata.prototype.systemLabels = null; + + /** + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata + * @instance + */ + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + */ + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); + }; + + /** + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 2: + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.userLabels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResourceMetadata message. + * @function verify + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResourceMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + */ + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) + return object; + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResourceMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this MonitoredResourceMetadata to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceMetadata + * @instance + * @returns {Object.} JSON object + */ + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResourceMetadata; + })(); + + api.LabelDescriptor = (function() { + + /** + * Properties of a LabelDescriptor. + * @memberof google.api + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description + */ + + /** + * Constructs a new LabelDescriptor. + * @memberof google.api + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor + * @constructor + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + */ + function LabelDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.key = ""; + + /** + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.valueType = 0; + + /** + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.description = ""; + + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @function create + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance + */ + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); + }; + + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.valueType = reader.int32(); + break; + case 3: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelDescriptor message. + * @function verify + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.LabelDescriptor} LabelDescriptor + */ + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) + return object; + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this LabelDescriptor to JSON. + * @function toJSON + * @memberof google.api.LabelDescriptor + * @instance + * @returns {Object.} JSON object + */ + LabelDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; for (var i = 0; i < message.style.length; ++i) switch (message.style[i]) { default: - return "style: enum value[] expected"; - case 0: - case 1: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + api.Distribution = (function() { + + /** + * Properties of a Distribution. + * @memberof google.api + * @interface IDistribution + * @property {number|Long|null} [count] Distribution count + * @property {number|null} [mean] Distribution mean + * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation + * @property {google.api.Distribution.IRange|null} [range] Distribution range + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions + * @property {Array.|null} [bucketCounts] Distribution bucketCounts + * @property {Array.|null} [exemplars] Distribution exemplars + */ + + /** + * Constructs a new Distribution. + * @memberof google.api + * @classdesc Represents a Distribution. + * @implements IDistribution + * @constructor + * @param {google.api.IDistribution=} [properties] Properties to set + */ + function Distribution(properties) { + this.bucketCounts = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Distribution count. + * @member {number|Long} count + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Distribution mean. + * @member {number} mean + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.mean = 0; + + /** + * Distribution sumOfSquaredDeviation. + * @member {number} sumOfSquaredDeviation + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.sumOfSquaredDeviation = 0; + + /** + * Distribution range. + * @member {google.api.Distribution.IRange|null|undefined} range + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.range = null; + + /** + * Distribution bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketOptions = null; + + /** + * Distribution bucketCounts. + * @member {Array.} bucketCounts + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketCounts = $util.emptyArray; + + /** + * Distribution exemplars. + * @member {Array.} exemplars + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.exemplars = $util.emptyArray; + + /** + * Creates a new Distribution instance using the specified properties. + * @function create + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution=} [properties] Properties to set + * @returns {google.api.Distribution} Distribution instance + */ + Distribution.create = function create(properties) { + return new Distribution(properties); + }; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); + if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.int64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.int64(); + break; + case 2: + message.mean = reader.double(); + break; + case 3: + message.sumOfSquaredDeviation = reader.double(); + break; + case 4: + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + case 6: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else + message.bucketCounts.push(reader.int64()); + break; + case 10: + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Distribution message. + * @function verify + * @memberof google.api.Distribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Distribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (typeof message.sumOfSquaredDeviation !== "number") + return "sumOfSquaredDeviation: number expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.api.Distribution.Range.verify(message.range); + if (error) + return "range." + error; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + return null; + }; + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution} Distribution + */ + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution) + return object; + var message = new $root.google.api.Distribution(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.sumOfSquaredDeviation != null) + message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.api.Distribution.range: object expected"); + message.range = $root.google.api.Distribution.Range.fromObject(object.range); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.api.Distribution.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".google.api.Distribution.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".google.api.Distribution.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".google.api.Distribution.exemplars: object expected"); + message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution + * @static + * @param {google.api.Distribution} message Distribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Distribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.mean = 0; + object.sumOfSquaredDeviation = 0; + object.range = null; + object.bucketOptions = null; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.api.Distribution.Range.toObject(message.range, options); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + } + return object; + }; + + /** + * Converts this Distribution to JSON. + * @function toJSON + * @memberof google.api.Distribution + * @instance + * @returns {Object.} JSON object + */ + Distribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Distribution.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.api.Distribution + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max + */ + + /** + * Constructs a new Range. + * @memberof google.api.Distribution + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.api.Distribution.IRange=} [properties] Properties to set + */ + function Range(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Range min. + * @member {number} min + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.min = 0; + + /** + * Range max. + * @member {number} max + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.max = 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @returns {google.api.Distribution.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + return writer; + }; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.min = reader.double(); + break; + case 2: + message.max = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Range message. + * @function verify + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Range) + return object; + var message = new $root.google.api.Distribution.Range(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + return message; + }; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.min = 0; + object.max = 0; + } + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + return object; + }; + + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.api.Distribution.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Range; + })(); + + Distribution.BucketOptions = (function() { + + /** + * Properties of a BucketOptions. + * @memberof google.api.Distribution + * @interface IBucketOptions + * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets + * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets + * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + */ + + /** + * Constructs a new BucketOptions. + * @memberof google.api.Distribution + * @classdesc Represents a BucketOptions. + * @implements IBucketOptions + * @constructor + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + */ + function BucketOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BucketOptions linearBuckets. + * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.linearBuckets = null; + + /** + * BucketOptions exponentialBuckets. + * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.exponentialBuckets = null; + + /** + * BucketOptions explicitBuckets. + * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.explicitBuckets = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BucketOptions options. + * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + Object.defineProperty(BucketOptions.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BucketOptions instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + */ + BucketOptions.create = function create(properties) { + return new BucketOptions(properties); + }; + + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) + $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) + $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) + $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + break; + case 2: + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + break; + case 3: + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); break; } - } - return null; - }; + } + return message; + }; + + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BucketOptions message. + * @function verify + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BucketOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); + if (error) + return "linearBuckets." + error; + } + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); + if (error) + return "exponentialBuckets." + error; + } + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); + if (error) + return "explicitBuckets." + error; + } + } + return null; + }; + + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions} BucketOptions + */ + BucketOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions) + return object; + var message = new $root.google.api.Distribution.BucketOptions(); + if (object.linearBuckets != null) { + if (typeof object.linearBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); + } + if (object.exponentialBuckets != null) { + if (typeof object.exponentialBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); + } + if (object.explicitBuckets != null) { + if (typeof object.explicitBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + } + return message; + }; + + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BucketOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); + if (options.oneofs) + object.options = "linearBuckets"; + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); + if (options.oneofs) + object.options = "exponentialBuckets"; + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); + if (options.oneofs) + object.options = "explicitBuckets"; + } + return object; + }; + + /** + * Converts this BucketOptions to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions + * @instance + * @returns {Object.} JSON object + */ + BucketOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + BucketOptions.Linear = (function() { + + /** + * Properties of a Linear. + * @memberof google.api.Distribution.BucketOptions + * @interface ILinear + * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets + * @property {number|null} [width] Linear width + * @property {number|null} [offset] Linear offset + */ + + /** + * Constructs a new Linear. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents a Linear. + * @implements ILinear + * @constructor + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + */ + function Linear(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Linear numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.numFiniteBuckets = 0; + + /** + * Linear width. + * @member {number} width + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.width = 0; + + /** + * Linear offset. + * @member {number} offset + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.offset = 0; + + /** + * Creates a new Linear instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance + */ + Linear.create = function create(properties) { + return new Linear(properties); + }; + + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); + return writer; + }; + + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Linear message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.width = reader.double(); + break; + case 3: + message.offset = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Linear message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Linear.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset !== "number") + return "offset: number expected"; + return null; + }; + + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + */ + Linear.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Linear(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.width != null) + message.width = Number(object.width); + if (object.offset != null) + message.offset = Number(object.offset); + return message; + }; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.Linear} message Linear + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Linear.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.width = 0; + object.offset = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; + return object; + }; + + /** + * Converts this Linear to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + * @returns {Object.} JSON object + */ + Linear.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Linear; + })(); + + BucketOptions.Exponential = (function() { + + /** + * Properties of an Exponential. + * @memberof google.api.Distribution.BucketOptions + * @interface IExponential + * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets + * @property {number|null} [growthFactor] Exponential growthFactor + * @property {number|null} [scale] Exponential scale + */ + + /** + * Constructs a new Exponential. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Exponential. + * @implements IExponential + * @constructor + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + */ + function Exponential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Exponential numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.numFiniteBuckets = 0; + + /** + * Exponential growthFactor. + * @member {number} growthFactor + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.growthFactor = 0; + + /** + * Exponential scale. + * @member {number} scale + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.scale = 0; + + /** + * Creates a new Exponential instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance + */ + Exponential.create = function create(properties) { + return new Exponential(properties); + }; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); + return writer; + }; + + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exponential message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.growthFactor = reader.double(); + break; + case 3: + message.scale = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Exponential message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exponential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + if (typeof message.growthFactor !== "number") + return "growthFactor: number expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (typeof message.scale !== "number") + return "scale: number expected"; + return null; + }; + + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + */ + Exponential.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Exponential(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.growthFactor != null) + message.growthFactor = Number(object.growthFactor); + if (object.scale != null) + message.scale = Number(object.scale); + return message; + }; + + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exponential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.growthFactor = 0; + object.scale = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; + return object; + }; + + /** + * Converts this Exponential to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + * @returns {Object.} JSON object + */ + Exponential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Exponential; + })(); + + BucketOptions.Explicit = (function() { + + /** + * Properties of an Explicit. + * @memberof google.api.Distribution.BucketOptions + * @interface IExplicit + * @property {Array.|null} [bounds] Explicit bounds + */ + + /** + * Constructs a new Explicit. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Explicit. + * @implements IExplicit + * @constructor + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + */ + function Explicit(properties) { + this.bounds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Explicit bounds. + * @member {Array.} bounds + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + */ + Explicit.prototype.bounds = $util.emptyArray; + + /** + * Creates a new Explicit instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance + */ + Explicit.create = function create(properties) { + return new Explicit(properties); + }; + + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bounds != null && message.bounds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bounds.length; ++i) + writer.double(message.bounds[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Explicit message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.bounds && message.bounds.length)) + message.bounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bounds.push(reader.double()); + } else + message.bounds.push(reader.double()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Explicit message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Explicit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bounds != null && message.hasOwnProperty("bounds")) { + if (!Array.isArray(message.bounds)) + return "bounds: array expected"; + for (var i = 0; i < message.bounds.length; ++i) + if (typeof message.bounds[i] !== "number") + return "bounds: number[] expected"; + } + return null; + }; + + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + */ + Explicit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Explicit(); + if (object.bounds) { + if (!Array.isArray(object.bounds)) + throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); + message.bounds = []; + for (var i = 0; i < object.bounds.length; ++i) + message.bounds[i] = Number(object.bounds[i]); + } + return message; + }; - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Explicit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bounds = []; + if (message.bounds && message.bounds.length) { + object.bounds = []; + for (var j = 0; j < message.bounds.length; ++j) + object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; + return object; + }; - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Explicit to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + * @returns {Object.} JSON object + */ + Explicit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); + return Explicit; + })(); - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; + return BucketOptions; })(); - return ResourceDescriptor; - })(); + Distribution.Exemplar = (function() { - api.ResourceReference = (function() { + /** + * Properties of an Exemplar. + * @memberof google.api.Distribution + * @interface IExemplar + * @property {number|null} [value] Exemplar value + * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp + * @property {Array.|null} [attachments] Exemplar attachments + */ - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ + /** + * Constructs a new Exemplar. + * @memberof google.api.Distribution + * @classdesc Represents an Exemplar. + * @implements IExemplar + * @constructor + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + */ + function Exemplar(properties) { + this.attachments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Exemplar value. + * @member {number} value + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.value = 0; - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; + /** + * Exemplar timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.timestamp = null; - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; + /** + * Exemplar attachments. + * @member {Array.} attachments + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.attachments = $util.emptyArray; - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; + /** + * Creates a new Exemplar instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @returns {google.api.Distribution.Exemplar} Exemplar instance + */ + Exemplar.create = function create(properties) { + return new Exemplar(properties); + }; - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + case 2: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; + /** + * Verifies an Exemplar message. + * @function verify + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exemplar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } + return null; + }; + + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Exemplar} Exemplar + */ + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Exemplar) + return object; + var message = new $root.google.api.Distribution.Exemplar(); + if (object.value != null) + message.value = Number(object.value); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); + message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); + } + } + return message; + }; - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.Exemplar} message Exemplar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attachments = []; + if (options.defaults) { + object.value = 0; + object.timestamp = null; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + } return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; + }; - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; + /** + * Converts this Exemplar to JSON. + * @function toJSON + * @memberof google.api.Distribution.Exemplar + * @instance + * @returns {Object.} JSON object + */ + Exemplar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Exemplar; + })(); - return ResourceReference; + return Distribution; })(); - api.Distribution = (function() { + api.MetricDescriptor = (function() { /** - * Properties of a Distribution. + * Properties of a MetricDescriptor. * @memberof google.api - * @interface IDistribution - * @property {number|Long|null} [count] Distribution count - * @property {number|null} [mean] Distribution mean - * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation - * @property {google.api.Distribution.IRange|null} [range] Distribution range - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions - * @property {Array.|null} [bucketCounts] Distribution bucketCounts - * @property {Array.|null} [exemplars] Distribution exemplars + * @interface IMetricDescriptor + * @property {string|null} [name] MetricDescriptor name + * @property {string|null} [type] MetricDescriptor type + * @property {Array.|null} [labels] MetricDescriptor labels + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType + * @property {string|null} [unit] MetricDescriptor unit + * @property {string|null} [description] MetricDescriptor description + * @property {string|null} [displayName] MetricDescriptor displayName + * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes */ /** - * Constructs a new Distribution. + * Constructs a new MetricDescriptor. * @memberof google.api - * @classdesc Represents a Distribution. - * @implements IDistribution + * @classdesc Represents a MetricDescriptor. + * @implements IMetricDescriptor * @constructor - * @param {google.api.IDistribution=} [properties] Properties to set + * @param {google.api.IMetricDescriptor=} [properties] Properties to set */ - function Distribution(properties) { - this.bucketCounts = []; - this.exemplars = []; + function MetricDescriptor(properties) { + this.labels = []; + this.monitoredResourceTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29036,167 +32828,211 @@ } /** - * Distribution count. - * @member {number|Long} count - * @memberof google.api.Distribution + * MetricDescriptor name. + * @member {string} name + * @memberof google.api.MetricDescriptor * @instance */ - Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MetricDescriptor.prototype.name = ""; /** - * Distribution mean. - * @member {number} mean - * @memberof google.api.Distribution + * MetricDescriptor type. + * @member {string} type + * @memberof google.api.MetricDescriptor * @instance */ - Distribution.prototype.mean = 0; + MetricDescriptor.prototype.type = ""; /** - * Distribution sumOfSquaredDeviation. - * @member {number} sumOfSquaredDeviation - * @memberof google.api.Distribution + * MetricDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MetricDescriptor * @instance */ - Distribution.prototype.sumOfSquaredDeviation = 0; + MetricDescriptor.prototype.labels = $util.emptyArray; /** - * Distribution range. - * @member {google.api.Distribution.IRange|null|undefined} range - * @memberof google.api.Distribution + * MetricDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.api.MetricDescriptor * @instance */ - Distribution.prototype.range = null; + MetricDescriptor.prototype.metricKind = 0; /** - * Distribution bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.api.Distribution + * MetricDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.api.MetricDescriptor * @instance */ - Distribution.prototype.bucketOptions = null; + MetricDescriptor.prototype.valueType = 0; /** - * Distribution bucketCounts. - * @member {Array.} bucketCounts - * @memberof google.api.Distribution + * MetricDescriptor unit. + * @member {string} unit + * @memberof google.api.MetricDescriptor * @instance */ - Distribution.prototype.bucketCounts = $util.emptyArray; + MetricDescriptor.prototype.unit = ""; /** - * Distribution exemplars. - * @member {Array.} exemplars - * @memberof google.api.Distribution + * MetricDescriptor description. + * @member {string} description + * @memberof google.api.MetricDescriptor * @instance */ - Distribution.prototype.exemplars = $util.emptyArray; + MetricDescriptor.prototype.description = ""; /** - * Creates a new Distribution instance using the specified properties. + * MetricDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.displayName = ""; + + /** + * MetricDescriptor metadata. + * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metadata = null; + + /** + * MetricDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.launchStage = 0; + + /** + * MetricDescriptor monitoredResourceTypes. + * @member {Array.} monitoredResourceTypes + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + + /** + * Creates a new MetricDescriptor instance using the specified properties. * @function create - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.IDistribution=} [properties] Properties to set - * @returns {google.api.Distribution} Distribution instance + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @returns {google.api.MetricDescriptor} MetricDescriptor instance */ - Distribution.create = function create(properties) { - return new Distribution(properties); + MetricDescriptor.create = function create(properties) { + return new MetricDescriptor(properties); }; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encode = function encode(message, writer) { + MetricDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) - $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.int64(message.bucketCounts[i]); - writer.ldelim(); - } - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); return writer; }; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { + MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a MetricDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution} Distribution + * @returns {google.api.MetricDescriptor} MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decode = function decode(reader, length) { + MetricDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.count = reader.int64(); + message.name = reader.string(); + break; + case 8: + message.type = reader.string(); break; case 2: - message.mean = reader.double(); + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); break; case 3: - message.sumOfSquaredDeviation = reader.double(); + message.metricKind = reader.int32(); break; case 4: - message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + message.valueType = reader.int32(); + break; + case 5: + message.unit = reader.string(); break; case 6: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + message.description = reader.string(); break; case 7: - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bucketCounts.push(reader.int64()); - } else - message.bucketCounts.push(reader.int64()); + message.displayName = reader.string(); break; case 10: - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + case 12: + message.launchStage = reader.int32(); + break; + case 13: + if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) + message.monitoredResourceTypes = []; + message.monitoredResourceTypes.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -29207,219 +33043,327 @@ }; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution} Distribution + * @returns {google.api.MetricDescriptor} MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decodeDelimited = function decodeDelimited(reader) { + MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Distribution message. + * Verifies a MetricDescriptor message. * @function verify - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Distribution.verify = function verify(message) { + MetricDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.mean != null && message.hasOwnProperty("mean")) - if (typeof message.mean !== "number") - return "mean: number expected"; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - if (typeof message.sumOfSquaredDeviation !== "number") - return "sumOfSquaredDeviation: number expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.api.Distribution.Range.verify(message.range); - if (error) - return "range." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + switch (message.metricKind) { + default: + return "metricKind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); if (error) - return "bucketOptions." + error; - } - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; + return "metadata." + error; } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); - if (error) - return "exemplars." + error; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; } + if (message.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { + if (!Array.isArray(message.monitoredResourceTypes)) + return "monitoredResourceTypes: array expected"; + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + if (!$util.isString(message.monitoredResourceTypes[i])) + return "monitoredResourceTypes: string[] expected"; } return null; }; /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution} Distribution + * @returns {google.api.MetricDescriptor} MetricDescriptor */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution) + MetricDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor) return object; - var message = new $root.google.api.Distribution(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.mean != null) - message.mean = Number(object.mean); - if (object.sumOfSquaredDeviation != null) - message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.api.Distribution.range: object expected"); - message.range = $root.google.api.Distribution.Range.fromObject(object.range); + var message = new $root.google.api.MetricDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MetricDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MetricDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.api.Distribution.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + switch (object.metricKind) { + case "METRIC_KIND_UNSPECIFIED": + case 0: + message.metricKind = 0; + break; + case "GAUGE": + case 1: + message.metricKind = 1; + break; + case "DELTA": + case 2: + message.metricKind = 2; + break; + case "CUMULATIVE": + case 3: + message.metricKind = 3; + break; } - if (object.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".google.api.Distribution.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + switch (object.valueType) { + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + case "DOUBLE": + case 3: + message.valueType = 3; + break; + case "STRING": + case 4: + message.valueType = 4; + break; + case "DISTRIBUTION": + case 5: + message.valueType = 5; + break; + case "MONEY": + case 6: + message.valueType = 6; + break; } - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".google.api.Distribution.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".google.api.Distribution.exemplars: object expected"); - message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); - } + if (object.unit != null) + message.unit = String(object.unit); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + } + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.monitoredResourceTypes) { + if (!Array.isArray(object.monitoredResourceTypes)) + throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); + message.monitoredResourceTypes = []; + for (var i = 0; i < object.monitoredResourceTypes.length; ++i) + message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); } return message; }; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.Distribution} message Distribution + * @param {google.api.MetricDescriptor} message MetricDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Distribution.toObject = function toObject(message, options) { + MetricDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.bucketCounts = []; - object.exemplars = []; + object.labels = []; + object.monitoredResourceTypes = []; } if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - object.mean = 0; - object.sumOfSquaredDeviation = 0; - object.range = null; - object.bucketOptions = null; + object.name = ""; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.unit = ""; + object.description = ""; + object.displayName = ""; + object.type = ""; + object.metadata = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.mean != null && message.hasOwnProperty("mean")) - object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.api.Distribution.Range.toObject(message.range, options); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); } - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { + object.monitoredResourceTypes = []; + for (var j = 0; j < message.monitoredResourceTypes.length; ++j) + object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; } return object; }; /** - * Converts this Distribution to JSON. + * Converts this MetricDescriptor to JSON. * @function toJSON - * @memberof google.api.Distribution + * @memberof google.api.MetricDescriptor * @instance * @returns {Object.} JSON object */ - Distribution.prototype.toJSON = function toJSON() { + MetricDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Distribution.Range = (function() { + MetricDescriptor.MetricDescriptorMetadata = (function() { /** - * Properties of a Range. - * @memberof google.api.Distribution - * @interface IRange - * @property {number|null} [min] Range min - * @property {number|null} [max] Range max + * Properties of a MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @interface IMetricDescriptorMetadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage + * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod + * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay */ /** - * Constructs a new Range. - * @memberof google.api.Distribution - * @classdesc Represents a Range. - * @implements IRange + * Constructs a new MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @classdesc Represents a MetricDescriptorMetadata. + * @implements IMetricDescriptorMetadata * @constructor - * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set */ - function Range(properties) { + function MetricDescriptorMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29427,88 +33371,101 @@ } /** - * Range min. - * @member {number} min - * @memberof google.api.Distribution.Range + * MetricDescriptorMetadata launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @instance */ - Range.prototype.min = 0; + MetricDescriptorMetadata.prototype.launchStage = 0; /** - * Range max. - * @member {number} max - * @memberof google.api.Distribution.Range + * MetricDescriptorMetadata samplePeriod. + * @member {google.protobuf.IDuration|null|undefined} samplePeriod + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.samplePeriod = null; + + /** + * MetricDescriptorMetadata ingestDelay. + * @member {google.protobuf.IDuration|null|undefined} ingestDelay + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @instance */ - Range.prototype.max = 0; + MetricDescriptorMetadata.prototype.ingestDelay = null; /** - * Creates a new Range instance using the specified properties. + * Creates a new MetricDescriptorMetadata instance using the specified properties. * @function create - * @memberof google.api.Distribution.Range + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {google.api.Distribution.IRange=} [properties] Properties to set - * @returns {google.api.Distribution.Range} Range instance + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance */ - Range.create = function create(properties) { - return new Range(properties); + MetricDescriptorMetadata.create = function create(properties) { + return new MetricDescriptorMetadata(properties); }; /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.Range + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Range.encode = function encode(message, writer) { + MetricDescriptorMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); + if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) + $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) + $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.Range + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Range.encodeDelimited = function encodeDelimited(message, writer) { + MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Range message from the specified reader or buffer. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.Range + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Range} Range + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Range.decode = function decode(reader, length) { + MetricDescriptorMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.min = reader.double(); + message.launchStage = reader.int32(); break; case 2: - message.max = reader.double(); + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -29519,1344 +33476,1440 @@ }; /** - * Decodes a Range message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.Range + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Range} Range + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Range.decodeDelimited = function decodeDelimited(reader) { + MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Range message. + * Verifies a MetricDescriptorMetadata message. * @function verify - * @memberof google.api.Distribution.Range + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Range.verify = function verify(message) { + MetricDescriptorMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min !== "number") - return "min: number expected"; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max !== "number") - return "max: number expected"; - return null; - }; - - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.Range - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.Range} Range - */ - Range.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Range) - return object; - var message = new $root.google.api.Distribution.Range(); - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); - return message; - }; - - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.Range} message Range - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Range.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.min = 0; - object.max = 0; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { + var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + if (error) + return "samplePeriod." + error; } - if (message.min != null && message.hasOwnProperty("min")) - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (message.max != null && message.hasOwnProperty("max")) - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; - return object; - }; - - /** - * Converts this Range to JSON. - * @function toJSON - * @memberof google.api.Distribution.Range - * @instance - * @returns {Object.} JSON object - */ - Range.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Range; - })(); - - Distribution.BucketOptions = (function() { - - /** - * Properties of a BucketOptions. - * @memberof google.api.Distribution - * @interface IBucketOptions - * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets - * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets - * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets - */ - - /** - * Constructs a new BucketOptions. - * @memberof google.api.Distribution - * @classdesc Represents a BucketOptions. - * @implements IBucketOptions - * @constructor - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - */ - function BucketOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BucketOptions linearBuckets. - * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.linearBuckets = null; - - /** - * BucketOptions exponentialBuckets. - * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.exponentialBuckets = null; - - /** - * BucketOptions explicitBuckets. - * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.explicitBuckets = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BucketOptions options. - * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - Object.defineProperty(BucketOptions.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BucketOptions instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions} BucketOptions instance - */ - BucketOptions.create = function create(properties) { - return new BucketOptions(properties); - }; - - /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BucketOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) - $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) - $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) - $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { + var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + if (error) + return "ingestDelay." + error; + } + return null; }; /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata */ - BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MetricDescriptorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) + return object; + var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + switch (object.launchStage) { + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.samplePeriod != null) { + if (typeof object.samplePeriod !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); + message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); + } + if (object.ingestDelay != null) { + if (typeof object.ingestDelay !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); + message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); + } + return message; }; /** - * Decodes a BucketOptions message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions} BucketOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - BucketOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); - break; - case 2: - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); - break; - case 3: - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + MetricDescriptorMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.samplePeriod = null; + object.ingestDelay = null; } - return message; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); + return object; }; /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions} BucketOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Converts this MetricDescriptorMetadata to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + * @returns {Object.} JSON object */ - BucketOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + MetricDescriptorMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Verifies a BucketOptions message. - * @function verify - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BucketOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); - if (error) - return "linearBuckets." + error; - } - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); - if (error) - return "exponentialBuckets." + error; - } - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); - if (error) - return "explicitBuckets." + error; + return MetricDescriptorMetadata; + })(); + + /** + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {number} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value + */ + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); + + /** + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {number} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value + */ + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); + + return MetricDescriptor; + })(); + + api.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.api + * @interface IMetric + * @property {string|null} [type] Metric type + * @property {Object.|null} [labels] Metric labels + */ + + /** + * Constructs a new Metric. + * @memberof google.api + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.api.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric type. + * @member {string} type + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.type = ""; + + /** + * Metric labels. + * @member {Object.} labels + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.labels = $util.emptyObject; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric=} [properties] Properties to set + * @returns {google.api.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encode + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.type = reader.string(); + break; + case 2: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions} BucketOptions - */ - BucketOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions) - return object; - var message = new $root.google.api.Distribution.BucketOptions(); - if (object.linearBuckets != null) { - if (typeof object.linearBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); - } - if (object.exponentialBuckets != null) { - if (typeof object.exponentialBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); - } - if (object.explicitBuckets != null) { - if (typeof object.explicitBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); - } - return message; - }; + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.BucketOptions} message BucketOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BucketOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); - if (options.oneofs) - object.options = "linearBuckets"; - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); - if (options.oneofs) - object.options = "exponentialBuckets"; - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); - if (options.oneofs) - object.options = "explicitBuckets"; - } - return object; - }; + /** + * Verifies a Metric message. + * @function verify + * @memberof google.api.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; - /** - * Converts this BucketOptions to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions - * @instance - * @returns {Object.} JSON object - */ - BucketOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.api.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Metric) + return object; + var message = new $root.google.api.Metric(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.Metric.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; - BucketOptions.Linear = (function() { + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Metric + * @static + * @param {google.api.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; - /** - * Properties of a Linear. - * @memberof google.api.Distribution.BucketOptions - * @interface ILinear - * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets - * @property {number|null} [width] Linear width - * @property {number|null} [offset] Linear offset - */ + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.api.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Linear. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents a Linear. - * @implements ILinear - * @constructor - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - */ - function Linear(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return Metric; + })(); - /** - * Linear numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.numFiniteBuckets = 0; + return api; + })(); - /** - * Linear width. - * @member {number} width - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.width = 0; + google.longrunning = (function() { - /** - * Linear offset. - * @member {number} offset - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.offset = 0; + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; - /** - * Creates a new Linear instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance - */ - Linear.create = function create(properties) { - return new Linear(properties); - }; + longrunning.Operations = (function() { - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); - return writer; - }; + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - /** - * Decodes a Linear message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.width = reader.double(); - break; - case 3: - message.offset = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ - /** - * Verifies a Linear message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Linear.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (typeof message.width !== "number") - return "width: number expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset !== "number") - return "offset: number expected"; - return null; - }; + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - */ - Linear.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Linear(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.width != null) - message.width = Number(object.width); - if (object.offset != null) - message.offset = Number(object.offset); - return message; - }; + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.Linear} message Linear - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Linear.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.width = 0; - object.offset = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.width != null && message.hasOwnProperty("width")) - object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; - return object; - }; + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Converts this Linear to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - * @returns {Object.} JSON object - */ - Linear.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); - return Linear; - })(); + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - BucketOptions.Exponential = (function() { + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Properties of an Exponential. - * @memberof google.api.Distribution.BucketOptions - * @interface IExponential - * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets - * @property {number|null} [growthFactor] Exponential growthFactor - * @property {number|null} [scale] Exponential scale - */ + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); - /** - * Constructs a new Exponential. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Exponential. - * @implements IExponential - * @constructor - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - */ - function Exponential(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Exponential numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.numFiniteBuckets = 0; + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Exponential growthFactor. - * @member {number} growthFactor - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.growthFactor = 0; + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); - /** - * Exponential scale. - * @member {number} scale - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.scale = 0; + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new Exponential instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance - */ - Exponential.create = function create(properties) { - return new Exponential(properties); - }; + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); - return writer; - }; + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes an Exponential message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.growthFactor = reader.double(); - break; - case 3: - message.scale = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return Operations; + })(); - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + longrunning.Operation = (function() { - /** - * Verifies an Exponential message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exponential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - if (typeof message.growthFactor !== "number") - return "growthFactor: number expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (typeof message.scale !== "number") - return "scale: number expected"; - return null; - }; + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - */ - Exponential.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Exponential(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.growthFactor != null) - message.growthFactor = Number(object.growthFactor); - if (object.scale != null) - message.scale = Number(object.scale); - return message; - }; + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exponential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.growthFactor = 0; - object.scale = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; - return object; - }; + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; - /** - * Converts this Exponential to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - * @returns {Object.} JSON object - */ - Exponential.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; - return Exponential; - })(); + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; - BucketOptions.Explicit = (function() { + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Properties of an Explicit. - * @memberof google.api.Distribution.BucketOptions - * @interface IExplicit - * @property {Array.|null} [bounds] Explicit bounds - */ + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Constructs a new Explicit. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Explicit. - * @implements IExplicit - * @constructor - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - */ - function Explicit(properties) { - this.bounds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; - /** - * Explicit bounds. - * @member {Array.} bounds - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - */ - Explicit.prototype.bounds = $util.emptyArray; + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Creates a new Explicit instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance - */ - Explicit.create = function create(properties) { - return new Explicit(properties); - }; + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bounds != null && message.bounds.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.bounds.length; ++i) - writer.double(message.bounds[i]); - writer.ldelim(); - } - return writer; - }; + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an Explicit message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.bounds && message.bounds.length)) - message.bounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bounds.push(reader.double()); - } else - message.bounds.push(reader.double()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies an Explicit message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Explicit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bounds != null && message.hasOwnProperty("bounds")) { - if (!Array.isArray(message.bounds)) - return "bounds: array expected"; - for (var i = 0; i < message.bounds.length; ++i) - if (typeof message.bounds[i] !== "number") - return "bounds: number[] expected"; - } - return null; - }; + return Operation; + })(); - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - */ - Explicit.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Explicit(); - if (object.bounds) { - if (!Array.isArray(object.bounds)) - throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); - message.bounds = []; - for (var i = 0; i < object.bounds.length; ++i) - message.bounds[i] = Number(object.bounds[i]); - } - return message; - }; + longrunning.GetOperationRequest = (function() { - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Explicit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bounds = []; - if (message.bounds && message.bounds.length) { - object.bounds = []; - for (var j = 0; j < message.bounds.length; ++j) - object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; - } - return object; - }; + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ - /** - * Converts this Explicit to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - * @returns {Object.} JSON object - */ - Explicit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return Explicit; - })(); + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; - return BucketOptions; - })(); + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; - Distribution.Exemplar = (function() { + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Properties of an Exemplar. - * @memberof google.api.Distribution - * @interface IExemplar - * @property {number|null} [value] Exemplar value - * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp - * @property {Array.|null} [attachments] Exemplar attachments - */ + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new Exemplar. - * @memberof google.api.Distribution - * @classdesc Represents an Exemplar. - * @implements IExemplar - * @constructor - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - */ - function Exemplar(properties) { - this.attachments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); - /** - * Exemplar value. - * @member {number} value - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.value = 0; + longrunning.ListOperationsRequest = (function() { - /** - * Exemplar timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.timestamp = null; + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ - /** - * Exemplar attachments. - * @member {Array.} attachments - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.attachments = $util.emptyArray; + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new Exemplar instance using the specified properties. - * @function create - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - * @returns {google.api.Distribution.Exemplar} Exemplar instance - */ - Exemplar.create = function create(properties) { - return new Exemplar(properties); - }; + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; - /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.attachments != null && message.attachments.length) - for (var i = 0; i < message.attachments.length; ++i) - $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.double(); - break; - case 2: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.attachments && message.attachments.length)) - message.attachments = []; - message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; - /** - * Verifies an Exemplar message. - * @function verify - * @memberof google.api.Distribution.Exemplar - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exemplar.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.attachments != null && message.hasOwnProperty("attachments")) { - if (!Array.isArray(message.attachments)) - return "attachments: array expected"; - for (var i = 0; i < message.attachments.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.attachments[i]); - if (error) - return "attachments." + error; - } - } - return null; - }; + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; - /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.Exemplar - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.Exemplar} Exemplar - */ - Exemplar.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Exemplar) - return object; - var message = new $root.google.api.Distribution.Exemplar(); - if (object.value != null) - message.value = Number(object.value); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.attachments) { - if (!Array.isArray(object.attachments)) - throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); - message.attachments = []; - for (var i = 0; i < object.attachments.length; ++i) { - if (typeof object.attachments[i] !== "object") - throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); - message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); - } - } - return message; - }; + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.Exemplar} message Exemplar - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exemplar.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attachments = []; - if (options.defaults) { - object.value = 0; - object.timestamp = null; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.attachments && message.attachments.length) { - object.attachments = []; - for (var j = 0; j < message.attachments.length; ++j) - object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) return object; - }; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Converts this Exemplar to JSON. - * @function toJSON - * @memberof google.api.Distribution.Exemplar - * @instance - * @returns {Object.} JSON object - */ - Exemplar.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - return Exemplar; - })(); + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Distribution; + return ListOperationsRequest; })(); - api.MetricDescriptor = (function() { + longrunning.ListOperationsResponse = (function() { /** - * Properties of a MetricDescriptor. - * @memberof google.api - * @interface IMetricDescriptor - * @property {string|null} [name] MetricDescriptor name - * @property {string|null} [type] MetricDescriptor type - * @property {Array.|null} [labels] MetricDescriptor labels - * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind - * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType - * @property {string|null} [unit] MetricDescriptor unit - * @property {string|null} [description] MetricDescriptor description - * @property {string|null} [displayName] MetricDescriptor displayName - * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage - * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken */ /** - * Constructs a new MetricDescriptor. - * @memberof google.api - * @classdesc Represents a MetricDescriptor. - * @implements IMetricDescriptor + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse * @constructor - * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set */ - function MetricDescriptor(properties) { - this.labels = []; - this.monitoredResourceTypes = []; + function ListOperationsResponse(properties) { + this.operations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30864,212 +34917,305 @@ } /** - * MetricDescriptor name. - * @member {string} name - * @memberof google.api.MetricDescriptor + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse * @instance */ - MetricDescriptor.prototype.name = ""; + ListOperationsResponse.prototype.operations = $util.emptyArray; /** - * MetricDescriptor type. - * @member {string} type - * @memberof google.api.MetricDescriptor + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse * @instance */ - MetricDescriptor.prototype.type = ""; + ListOperationsResponse.prototype.nextPageToken = ""; /** - * MetricDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MetricDescriptor - * @instance + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance */ - MetricDescriptor.prototype.labels = $util.emptyArray; + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; /** - * MetricDescriptor metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.api.MetricDescriptor - * @instance + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.prototype.metricKind = 0; + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; /** - * MetricDescriptor valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.api.MetricDescriptor - * @instance + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.prototype.valueType = 0; + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * MetricDescriptor unit. - * @member {string} unit - * @memberof google.api.MetricDescriptor - * @instance + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.prototype.unit = ""; + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * MetricDescriptor description. - * @member {string} description - * @memberof google.api.MetricDescriptor - * @instance + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.prototype.description = ""; + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * MetricDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MetricDescriptor - * @instance + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricDescriptor.prototype.displayName = ""; + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * MetricDescriptor metadata. - * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata - * @memberof google.api.MetricDescriptor - * @instance + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse */ - MetricDescriptor.prototype.metadata = null; + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * MetricDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set */ - MetricDescriptor.prototype.launchStage = 0; + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * MetricDescriptor monitoredResourceTypes. - * @member {Array.} monitoredResourceTypes - * @memberof google.api.MetricDescriptor + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest * @instance */ - MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + CancelOperationRequest.prototype.name = ""; /** - * Creates a new MetricDescriptor instance using the specified properties. + * Creates a new CancelOperationRequest instance using the specified properties. * @function create - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.api.IMetricDescriptor=} [properties] Properties to set - * @returns {google.api.MetricDescriptor} MetricDescriptor instance + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance */ - MetricDescriptor.create = function create(properties) { - return new MetricDescriptor(properties); + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); }; /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encode - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.encode = function encode(message, writer) { + CancelOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); - if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); - if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); return writer; }; /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetricDescriptor message from the specified reader or buffer. + * Decodes a CancelOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.CancelOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decode = function decode(reader, length) { + CancelOperationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 8: - message.type = reader.string(); - break; - case 2: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 3: - message.metricKind = reader.int32(); - break; - case 4: - message.valueType = reader.int32(); - break; - case 5: - message.unit = reader.string(); - break; - case 6: - message.description = reader.string(); - break; - case 7: - message.displayName = reader.string(); - break; - case 10: - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); - break; - case 12: - message.launchStage = reader.int32(); - break; - case 13: - if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) - message.monitoredResourceTypes = []; - message.monitoredResourceTypes.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -31079,657 +35225,510 @@ }; /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.CancelOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetricDescriptor message. + * Verifies a CancelOperationRequest message. * @function verify - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.CancelOperationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricDescriptor.verify = function verify(message) { + CancelOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - switch (message.metricKind) { - default: - return "metricKind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.unit != null && message.hasOwnProperty("unit")) - if (!$util.isString(message.unit)) - return "unit: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); break; } - if (message.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { - if (!Array.isArray(message.monitoredResourceTypes)) - return "monitoredResourceTypes: array expected"; - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - if (!$util.isString(message.monitoredResourceTypes[i])) - return "monitoredResourceTypes: string[] expected"; } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest */ - MetricDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor) + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) return object; - var message = new $root.google.api.MetricDescriptor(); + var message = new $root.google.longrunning.DeleteOperationRequest(); if (object.name != null) message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MetricDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MetricDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } - } - switch (object.metricKind) { - case "METRIC_KIND_UNSPECIFIED": - case 0: - message.metricKind = 0; - break; - case "GAUGE": - case 1: - message.metricKind = 1; - break; - case "DELTA": - case 2: - message.metricKind = 2; - break; - case "CUMULATIVE": - case 3: - message.metricKind = 3; - break; - } - switch (object.valueType) { - case "VALUE_TYPE_UNSPECIFIED": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - case "DOUBLE": - case 3: - message.valueType = 3; - break; - case "STRING": - case 4: - message.valueType = 4; - break; - case "DISTRIBUTION": - case 5: - message.valueType = 5; - break; - case "MONEY": - case 6: - message.valueType = 6; - break; - } - if (object.unit != null) - message.unit = String(object.unit); - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); - } - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.monitoredResourceTypes) { - if (!Array.isArray(object.monitoredResourceTypes)) - throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); - message.monitoredResourceTypes = []; - for (var i = 0; i < object.monitoredResourceTypes.length; ++i) - message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); - } return message; }; /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.api.MetricDescriptor} message MetricDescriptor + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetricDescriptor.toObject = function toObject(message, options) { + DeleteOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.labels = []; - object.monitoredResourceTypes = []; - } - if (options.defaults) { + if (options.defaults) object.name = ""; - object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.unit = ""; - object.description = ""; - object.displayName = ""; - object.type = ""; - object.metadata = null; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = message.unit; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { - object.monitoredResourceTypes = []; - for (var j = 0; j < message.monitoredResourceTypes.length; ++j) - object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; - } return object; }; /** - * Converts this MetricDescriptor to JSON. + * Converts this DeleteOperationRequest to JSON. * @function toJSON - * @memberof google.api.MetricDescriptor + * @memberof google.longrunning.DeleteOperationRequest * @instance * @returns {Object.} JSON object - */ - MetricDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - MetricDescriptor.MetricDescriptorMetadata = (function() { - - /** - * Properties of a MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @interface IMetricDescriptorMetadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage - * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod - * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay - */ - - /** - * Constructs a new MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @classdesc Represents a MetricDescriptorMetadata. - * @implements IMetricDescriptorMetadata - * @constructor - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - */ - function MetricDescriptorMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricDescriptorMetadata launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.launchStage = 0; - - /** - * MetricDescriptorMetadata samplePeriod. - * @member {google.protobuf.IDuration|null|undefined} samplePeriod - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.samplePeriod = null; - - /** - * MetricDescriptorMetadata ingestDelay. - * @member {google.protobuf.IDuration|null|undefined} ingestDelay - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.ingestDelay = null; + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @function create - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance - */ - MetricDescriptorMetadata.create = function create(properties) { - return new MetricDescriptorMetadata(properties); - }; + return DeleteOperationRequest; + })(); - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); - if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) - $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) - $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + longrunning.WaitOperationRequest = (function() { - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.launchStage = reader.int32(); - break; - case 2: - message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; - /** - * Verifies a MetricDescriptorMetadata message. - * @function verify - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricDescriptorMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { - var error = $root.google.protobuf.Duration.verify(message.samplePeriod); - if (error) - return "samplePeriod." + error; - } - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { - var error = $root.google.protobuf.Duration.verify(message.ingestDelay); - if (error) - return "ingestDelay." + error; - } - return null; - }; + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - */ - MetricDescriptorMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) - return object; - var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - switch (object.launchStage) { - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.samplePeriod != null) { - if (typeof object.samplePeriod !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); - message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); - } - if (object.ingestDelay != null) { - if (typeof object.ingestDelay !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); - message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); - } - return message; - }; + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricDescriptorMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.samplePeriod = null; - object.ingestDelay = null; + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) - object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) - object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); - return object; - }; + } + return message; + }; - /** - * Converts this MetricDescriptorMetadata to JSON. - * @function toJSON - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - * @returns {Object.} JSON object - */ - MetricDescriptorMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return MetricDescriptorMetadata; - })(); + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; /** - * MetricKind enum. - * @name google.api.MetricDescriptor.MetricKind - * @enum {number} - * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value - * @property {number} GAUGE=1 GAUGE value - * @property {number} DELTA=2 DELTA value - * @property {number} CUMULATIVE=3 CUMULATIVE value + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest */ - MetricDescriptor.MetricKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "GAUGE"] = 1; - values[valuesById[2] = "DELTA"] = 2; - values[valuesById[3] = "CUMULATIVE"] = 3; - return values; - })(); + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; /** - * ValueType enum. - * @name google.api.MetricDescriptor.ValueType - * @enum {number} - * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - * @property {number} DOUBLE=3 DOUBLE value - * @property {number} STRING=4 STRING value - * @property {number} DISTRIBUTION=5 DISTRIBUTION value - * @property {number} MONEY=6 MONEY value + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - MetricDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - values[valuesById[3] = "DOUBLE"] = 3; - values[valuesById[4] = "STRING"] = 4; - values[valuesById[5] = "DISTRIBUTION"] = 5; - values[valuesById[6] = "MONEY"] = 6; - return values; - })(); + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; - return MetricDescriptor; + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; })(); - api.Metric = (function() { + longrunning.OperationInfo = (function() { /** - * Properties of a Metric. - * @memberof google.api - * @interface IMetric - * @property {string|null} [type] Metric type - * @property {Object.|null} [labels] Metric labels + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType */ /** - * Constructs a new Metric. - * @memberof google.api - * @classdesc Represents a Metric. - * @implements IMetric + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo * @constructor - * @param {google.api.IMetric=} [properties] Properties to set + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set */ - function Metric(properties) { - this.labels = {}; + function OperationInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31737,108 +35736,88 @@ } /** - * Metric type. - * @member {string} type - * @memberof google.api.Metric + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo * @instance */ - Metric.prototype.type = ""; + OperationInfo.prototype.responseType = ""; /** - * Metric labels. - * @member {Object.} labels - * @memberof google.api.Metric + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo * @instance */ - Metric.prototype.labels = $util.emptyObject; + OperationInfo.prototype.metadataType = ""; /** - * Creates a new Metric instance using the specified properties. + * Creates a new OperationInfo instance using the specified properties. * @function create - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @static - * @param {google.api.IMetric=} [properties] Properties to set - * @returns {google.api.Metric} Metric instance + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance */ - Metric.create = function create(properties) { - return new Metric(properties); + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); }; /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. * @function encode - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @static - * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encode = function encode(message, writer) { + OperationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); return writer; }; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @static - * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes an OperationInfo message from the specified reader or buffer. * @function decode - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Metric} Metric + * @returns {google.longrunning.OperationInfo} OperationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decode = function decode(reader, length) { + OperationInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.type = reader.string(); + case 1: + message.responseType = reader.string(); break; case 2: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; + message.metadataType = reader.string(); break; default: reader.skipType(tag & 7); @@ -31849,113 +35828,99 @@ }; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Metric} Metric + * @returns {google.longrunning.OperationInfo} OperationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decodeDelimited = function decodeDelimited(reader) { + OperationInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metric message. + * Verifies an OperationInfo message. * @function verify - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metric.verify = function verify(message) { + OperationInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; return null; }; /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @static * @param {Object.} object Plain object - * @returns {google.api.Metric} Metric + * @returns {google.longrunning.OperationInfo} OperationInfo */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Metric) + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) return object; - var message = new $root.google.api.Metric(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.Metric.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); return message; }; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @static - * @param {google.api.Metric} message Metric + * @param {google.longrunning.OperationInfo} message OperationInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Metric.toObject = function toObject(message, options) { + OperationInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; return object; }; /** - * Converts this Metric to JSON. + * Converts this OperationInfo to JSON. * @function toJSON - * @memberof google.api.Metric + * @memberof google.longrunning.OperationInfo * @instance * @returns {Object.} JSON object */ - Metric.prototype.toJSON = function toJSON() { + OperationInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Metric; + return OperationInfo; })(); - return api; + return longrunning; })(); google.rpc = (function() { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 5c2673a8054..f014786f9d6 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -1246,6 +1246,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "split": { + "type": "LogSplit", + "id": 35, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1306,6 +1313,22 @@ } } }, + "LogSplit": { + "fields": { + "uid": { + "type": "string", + "id": 1 + }, + "index": { + "type": "int32", + "id": 2 + }, + "totalSplits": { + "type": "int32", + "id": 3 + } + } + }, "LoggingServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", @@ -1639,7 +1662,8 @@ "type": "string", "id": 8, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" } } } @@ -2471,15 +2495,26 @@ "responseType": "CmekSettings", "options": { "(google.api.http).get": "/v2/{name=*/*}/cmekSettings", - "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*}/cmekSettings" + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*}/cmekSettings" }, "parsedOptions": [ { "(google.api.http)": { "get": "/v2/{name=*/*}/cmekSettings", - "additional_bindings": { - "get": "/v2/{name=organizations/*}/cmekSettings" - } + "additional_bindings": [ + { + "get": "/v2/{name=projects/*}/cmekSettings" + }, + { + "get": "/v2/{name=organizations/*}/cmekSettings" + }, + { + "get": "/v2/{name=folders/*}/cmekSettings" + }, + { + "get": "/v2/{name=billingAccounts/*}/cmekSettings" + } + ] } } ] @@ -2505,6 +2540,95 @@ } } ] + }, + "GetSettings": { + "requestType": "GetSettingsRequest", + "responseType": "Settings", + "options": { + "(google.api.http).get": "/v2/{name=*/*}/settings", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*}/settings", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*}/settings", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*}/settings" + }, + { + "get": "/v2/{name=organizations/*}/settings" + }, + { + "get": "/v2/{name=folders/*}/settings" + }, + { + "get": "/v2/{name=billingAccounts/*}/settings" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateSettings": { + "requestType": "UpdateSettingsRequest", + "responseType": "Settings", + "options": { + "(google.api.http).patch": "/v2/{name=*/*}/settings", + "(google.api.http).body": "settings", + "(google.api.http).additional_bindings.patch": "/v2/{name=folders/*}/settings", + "(google.api.http).additional_bindings.body": "settings", + "(google.api.method_signature)": "settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=*/*}/settings", + "body": "settings", + "additional_bindings": [ + { + "patch": "/v2/{name=organizations/*}/settings", + "body": "settings" + }, + { + "patch": "/v2/{name=folders/*}/settings", + "body": "settings" + } + ] + } + }, + { + "(google.api.method_signature)": "settings,update_mask" + } + ] + }, + "CopyLogEntries": { + "requestType": "CopyLogEntriesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/entries:copy", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "CopyLogEntriesResponse", + "(google.longrunning.operation_info).metadata_type": "CopyLogEntriesMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/entries:copy", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CopyLogEntriesResponse", + "metadata_type": "CopyLogEntriesMetadata" + } + } + ] } } }, @@ -2516,7 +2640,10 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "description": { "type": "string", @@ -2550,16 +2677,18 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "restrictedFields": { + "rule": "repeated", + "type": "string", + "id": 15 + }, + "cmekSettings": { + "type": "CmekSettings", + "id": 19 } } }, - "LifecycleState": { - "values": { - "LIFECYCLE_STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DELETE_REQUESTED": 2 - } - }, "LogView": { "options": { "(google.api.resource).type": "logging.googleapis.com/LogView", @@ -3304,6 +3433,155 @@ } } }, + "GetSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Settings" + } + } + } + }, + "UpdateSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "settings": { + "type": "Settings", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Settings": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/Settings", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/settings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "storageLocation": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableDefaultSink": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CopyLogEntriesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "filter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "destination": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CopyLogEntriesMetadata": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "state": { + "type": "OperationState", + "id": 3 + }, + "cancellationRequested": { + "type": "bool", + "id": 4 + }, + "request": { + "type": "CopyLogEntriesRequest", + "id": 5 + }, + "progress": { + "type": "int32", + "id": 6 + }, + "writerIdentity": { + "type": "string", + "id": 7 + } + } + }, + "CopyLogEntriesResponse": { + "fields": { + "logEntriesCopiedCount": { + "type": "int64", + "id": 1 + } + } + }, + "LifecycleState": { + "values": { + "LIFECYCLE_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "DELETE_REQUESTED": 2 + } + }, + "OperationState": { + "values": { + "OPERATION_STATE_UNSPECIFIED": 0, + "OPERATION_STATE_SCHEDULED": 1, + "OPERATION_STATE_WAITING_FOR_PERMISSIONS": 2, + "OPERATION_STATE_RUNNING": 3, + "OPERATION_STATE_SUCCEEDED": 4, + "OPERATION_STATE_FAILED": 5, + "OPERATION_STATE_CANCELLED": 6 + } + }, "MetricsServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", @@ -3433,6 +3711,13 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "disabled": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "metricDescriptor": { "type": "google.api.MetricDescriptor", "id": 5, @@ -4136,6 +4421,222 @@ } } }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, "rpc": { "options": { "cc_enable_arenas": true, diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js new file mode 100644 index 00000000000..b942f56e3cb --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(name, destination) { + // [START logging_v2_generated_ConfigServiceV2_CopyLogEntries_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Log bucket from which to copy log entries. + * For example: + * `"projects/my-project/locations/global/buckets/my-source-bucket"` + */ + // const name = 'abc123' + /** + * Optional. A filter specifying which log entries to copy. The filter must be no more + * than 20k characters. An empty filter matches all log entries. + */ + // const filter = 'abc123' + /** + * Required. Destination to which to copy log entries. + */ + // const destination = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callCopyLogEntries() { + // Construct request + const request = { + name, + destination, + }; + + // Run request + const [operation] = await loggingClient.copyLogEntries(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCopyLogEntries(); + // [END logging_v2_generated_ConfigServiceV2_CopyLogEntries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js index d3e20591ad3..329b6140286 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -20,15 +24,16 @@ function main(parent, bucketId, bucket) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource in which to create the bucket: + * Required. The resource in which to create the log bucket: * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * Example: `"projects/my-logging-project/locations/global"` + * For example: + * `"projects/my-project/locations/global"` */ // const parent = 'abc123' /** - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited + * to 100 characters and can include only letters, digits, underscores, + * hyphens, and periods. */ // const bucketId = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js index d7e5f718087..45d26b63f55 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,7 +29,9 @@ function main(parent, exclusion) { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * For examples: + * `"projects/my-logging-project"` + * `"organizations/123456789"` */ // const parent = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js index ac1501a00d7..34ddc52c074 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,7 +29,9 @@ function main(parent, sink) { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * For examples: + * `"projects/my-project"` + * `"organizations/123456789"` */ // const parent = 'abc123' /** @@ -37,9 +43,9 @@ function main(parent, sink) { * 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 - * the same group or service account used by Logging before the addition of - * writer identities to this API. The sink's destination must be in the same - * project as the sink itself. + * the same group or service account used by Cloud Logging 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 diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js index 035db83afae..3cbb9e67351 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -21,9 +25,9 @@ function main(parent, viewId, view) { */ /** * Required. The bucket in which to create the view - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * Example: - * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` + * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` */ // const parent = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js index d98c67e47b4..1fbb46545a4 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,8 +29,8 @@ function main(name) { * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` */ // const name = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js index c1a93601b28..ccfcfb2ff7c 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,7 +29,8 @@ function main(name) { * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * For example: + * `"projects/my-project/exclusions/my-exclusion"` */ // const name = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js index 6aa54f7bf92..553c9f6f343 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -26,7 +30,8 @@ function main(sinkName) { * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * For example: + * `"projects/my-project/sinks/my-sink"` */ // const sinkName = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js index 8c3c62ee3ea..ccd8288baca 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -22,8 +26,8 @@ function main(name) { /** * Required. The full resource name of the view to delete: * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` */ // const name = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js index 756fbc9ad84..8c72bce89ed 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,8 +29,8 @@ function main(name) { * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` */ // const name = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js index 9294716e230..adc9542b61b 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,10 +29,12 @@ function main(name) { * "organizations/[ORGANIZATION_ID]/cmekSettings" * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" * "folders/[FOLDER_ID]/cmekSettings" - * Example: `"organizations/12345/cmekSettings"`. - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. */ // const name = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js index b64d55d1774..180245ca918 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,7 +29,8 @@ function main(name) { * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * For example: + * `"projects/my-project/exclusions/my-exclusion"` */ // const name = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js new file mode 100644 index 00000000000..184aeb49c72 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_GetSettings_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource for which to retrieve settings. + * "projects/[PROJECT_ID]/settings" + * "organizations/[ORGANIZATION_ID]/settings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + * "folders/[FOLDER_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callGetSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.getSettings(request); + console.log(response); + } + + callGetSettings(); + // [END logging_v2_generated_ConfigServiceV2_GetSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js index 6505a60be62..9f9a0d3dc5e 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,7 +29,8 @@ function main(sinkName) { * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * For example: + * `"projects/my-project/sinks/my-sink"` */ // const sinkName = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js index adc3a741c46..4ad0fc4a2c0 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -22,8 +26,8 @@ function main(name) { /** * Required. The resource name of the policy: * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` */ // const name = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js index 6252d2d348a..8a7a73908cf 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -31,16 +35,16 @@ function main(parent) { */ // const parent = 'abc123' /** - * 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. + * 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. */ // const pageToken = 'abc123' /** - * 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. + * 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. */ // const pageSize = 1234 diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js index 2d1ad40cdee..939385d74b1 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js index 96d319fbd67..25424f3e228 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js index 38da9c64b0e..3fa4f9ce532 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,10 +29,10 @@ function main(parent) { */ // const parent = 'abc123' /** - * 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. + * 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. */ // const pageToken = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js index 52caf7adcd5..30a6935c54a 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,8 +29,8 @@ function main(name) { * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` */ // const name = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js index 73d6f79b272..31222974b38 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,10 +29,8 @@ function main(name, bucket, updateMask) { * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also - * requires permission "resourcemanager.projects.updateLiens" to set the - * locked property + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` */ // const name = 'abc123' /** @@ -37,11 +39,11 @@ function main(name, bucket, updateMask) { // const bucket = {} /** * Required. Field mask that specifies the fields in `bucket` that need an update. A - * bucket field will be overwritten if, and only if, it is in the update - * mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see + * bucket field will be overwritten if, and only if, it is in the update mask. + * `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see: * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * Example: `updateMask=retention_days`. + * For example: `updateMask=retention_days` */ // const updateMask = {} diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js index 2580cd32d61..a2fb3356dce 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,15 +29,16 @@ function main(name, cmekSettings) { * "organizations/[ORGANIZATION_ID]/cmekSettings" * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" * "folders/[FOLDER_ID]/cmekSettings" - * Example: `"organizations/12345/cmekSettings"`. - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. */ // const name = 'abc123' /** * Required. The CMEK settings to update. - * See Enabling CMEK for Logs + * See Enabling CMEK for Log * Router (https://cloud.google.com/logging/docs/routing/managed-encryption) * for more information. */ @@ -43,7 +48,7 @@ function main(name, cmekSettings) { * be updated. A field will be overwritten if and only if it is in the update * mask. Output only fields cannot be updated. * See FieldMask google.protobuf.FieldMask for more information. - * Example: `"updateMask=kmsKeyName"` + * For example: `"updateMask=kmsKeyName"` */ // const updateMask = {} diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js index 33866c4287e..0bef0516026 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -25,7 +29,8 @@ function main(name, exclusion, updateMask) { * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * For example: + * `"projects/my-project/exclusions/my-exclusion"` */ // const name = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js new file mode 100644 index 00000000000..cfbdb18e92a --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(name, settings) { + // [START logging_v2_generated_ConfigServiceV2_UpdateSettings_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for the settings to update. + * "organizations/[ORGANIZATION_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + */ + // const name = 'abc123' + /** + * Required. The settings to update. + * See Enabling CMEK for Log + * Router (https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + */ + // const settings = {} + /** + * Optional. Field mask identifying which fields from `settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See FieldMask google.protobuf.FieldMask for more information. + * For example: `"updateMask=kmsKeyName"` + */ + // const updateMask = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callUpdateSettings() { + // Construct request + const request = { + name, + settings, + }; + + // Run request + const response = await loggingClient.updateSettings(request); + console.log(response); + } + + callUpdateSettings(); + // [END logging_v2_generated_ConfigServiceV2_UpdateSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js index 5e6403f9284..9132584dc84 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -26,7 +30,8 @@ function main(sinkName, sink) { * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * For example: + * `"projects/my-project/sinks/my-sink"` */ // const sinkName = 'abc123' /** @@ -51,14 +56,14 @@ function main(sinkName, sink) { * Optional. Field mask that specifies the fields in `sink` that need * an update. A sink field will be overwritten if, and only if, it is * in the update mask. `name` and output only fields cannot be updated. - * An empty updateMask is temporarily treated as using the following mask + * An empty `updateMask` is temporarily treated as using the following mask * for backwards compatibility purposes: - * destination,filter,includeChildren + * `destination,filter,includeChildren` * At some point in the future, behavior will be removed and specifying an - * empty updateMask will be an error. + * empty `updateMask` will be an error. * For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * Example: `updateMask=filter`. + * For example: `updateMask=filter` */ // const updateMask = {} diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js index ecab90c51a2..2f98c824d88 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -22,8 +26,8 @@ function main(name, view) { /** * Required. The full resource name of the view to update * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` */ // const name = 'abc123' /** @@ -36,7 +40,7 @@ function main(name, view) { * in the update mask. `name` and output only fields cannot be updated. * For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * Example: `updateMask=filter`. + * For example: `updateMask=filter` */ // const updateMask = {} diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js index 855310502ec..99bc7875487 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -21,13 +25,13 @@ function main(logName) { */ /** * Required. The resource name of the log to delete: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` * `[LOG_ID]` must be URL-encoded. For example, * `"projects/my-project-id/logs/syslog"`, - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. * For more information about log names, see * LogEntry google.logging.v2.LogEntry. */ diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js index 1ac1cb7a78e..f0992952989 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -22,15 +26,15 @@ function main(resourceNames) { /** * Required. Names of one or more parent resources from which to * retrieve log entries: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * May alternatively be one or more views - * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * Projects listed in the `project_ids` field are added to this list. */ // const resourceNames = 'abc123' @@ -54,10 +58,10 @@ function main(resourceNames) { */ // const orderBy = 'abc123' /** - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, - * the request is rejected. The presence of `next_page_token` in the - * response indicates that more results might be available. + * Optional. The maximum number of results to return from this request. Default is 50. + * If the value is negative or exceeds 1000, the request is rejected. The + * presence of `next_page_token` in the response indicates that more results + * might be available. */ // const pageSize = 1234 /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js index a9ee584ed84..ed0d28a1ac2 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -21,10 +25,10 @@ function main(parent) { */ /** * Required. The resource name that owns the logs: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` */ // const parent = 'abc123' /** @@ -42,15 +46,15 @@ function main(parent) { // const pageToken = 'abc123' /** * Optional. The resource name that owns the logs: - * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * To support legacy queries, it could also be: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` */ // const resourceNames = 'abc123' diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js index 21599320c13..71e2931bb15 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js index ceebfc21e0a..6f0146e44d4 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -21,15 +25,15 @@ function main(resourceNames) { */ /** * Required. Name of a parent resource from which to retrieve log entries: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` * May alternatively be one or more views: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * "organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` */ // const resourceNames = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js index c55d5dec042..b3e7e59cdc4 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; @@ -22,13 +26,13 @@ function main(entries) { /** * Optional. A default log resource name that is assigned to all log entries * in `entries` that do not specify a value for `log_name`: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` * `[LOG_ID]` must be URL-encoded. For example: * "projects/my-project-id/logs/syslog" - * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" * The permission `logging.logEntries.create` is needed on each project, * organization, billing account, or folder that is receiving new log * entries, whether the resource is specified in `logName` or in an @@ -64,13 +68,13 @@ function main(entries) { * supply their own values, the entries earlier in the list will sort before * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the - * logs retention period (https://cloud.google.com/logging/quota-policy) in + * logs retention period (https://cloud.google.com/logging/quotas) in * the past or more than 24 hours in the future will not be available when * calling `entries.list`. However, those log entries can still be exported * with * LogSinks (https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the - * quota limit (https://cloud.google.com/logging/quota-policy) for calls to + * quota limit (https://cloud.google.com/logging/quotas) for calls to * `entries.write`, you should try to include several log entries in this * list, rather than calling this method for each individual log entry. */ diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js index 71c3e9cb92c..32a4f35ffd3 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js index 91255f11647..db0c2667eab 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js index 4111c918cc4..fddd84930e9 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js index 3b1893f6432..cab64828598 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js index 0a930deb633..89362b9ffbe 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js @@ -1,16 +1,20 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json new file mode 100644 index 00000000000..b22f80d2a1f --- /dev/null +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -0,0 +1,1691 @@ +{ + "clientLibrary": { + "name": "nodejs-logging", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.logging.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListBuckets_async", + "title": "logging listBuckets Sample", + "origin": "API_DEFINITION", + "description": " Lists log buckets.", + "canonical": true, + "file": "config_service_v2.list_buckets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBuckets", + "fullName": "google.logging.v2.ConfigServiceV2.ListBuckets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListBucketsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListBuckets", + "fullName": "google.logging.v2.ConfigServiceV2.ListBuckets", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetBucket_async", + "title": "logging getBucket Sample", + "origin": "API_DEFINITION", + "description": " Gets a log bucket.", + "canonical": true, + "file": "config_service_v2.get_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBucket", + "fullName": "google.logging.v2.ConfigServiceV2.GetBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetBucket", + "fullName": "google.logging.v2.ConfigServiceV2.GetBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateBucket_async", + "title": "logging createBucket Sample", + "origin": "API_DEFINITION", + "description": " Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.create_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucket", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "bucket_id", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateBucket_async", + "title": "logging updateBucket Sample", + "origin": "API_DEFINITION", + "description": " Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: `retention_period` If the retention period is decreased and the bucket is locked, `FAILED_PRECONDITION` will be returned. If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be returned. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.update_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteBucket_async", + "title": "logging deleteBucket Sample", + "origin": "API_DEFINITION", + "description": " Deletes a log bucket. Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.", + "canonical": true, + "file": "config_service_v2.delete_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UndeleteBucket_async", + "title": "logging undeleteBucket Sample", + "origin": "API_DEFINITION", + "description": " Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.", + "canonical": true, + "file": "config_service_v2.undelete_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UndeleteBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UndeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UndeleteBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListViews_async", + "title": "logging listViews Sample", + "origin": "API_DEFINITION", + "description": " Lists views on a log bucket.", + "canonical": true, + "file": "config_service_v2.list_views.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListViews", + "fullName": "google.logging.v2.ConfigServiceV2.ListViews", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListViewsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListViews", + "fullName": "google.logging.v2.ConfigServiceV2.ListViews", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetView_async", + "title": "logging getView Sample", + "origin": "API_DEFINITION", + "description": " Gets a view on a log bucket..", + "canonical": true, + "file": "config_service_v2.get_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetView", + "fullName": "google.logging.v2.ConfigServiceV2.GetView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetView", + "fullName": "google.logging.v2.ConfigServiceV2.GetView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateView_async", + "title": "logging createView Sample", + "origin": "API_DEFINITION", + "description": " Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.", + "canonical": true, + "file": "config_service_v2.create_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateView", + "fullName": "google.logging.v2.ConfigServiceV2.CreateView", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view_id", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.logging.v2.LogView" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateView", + "fullName": "google.logging.v2.ConfigServiceV2.CreateView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateView_async", + "title": "logging updateView Sample", + "origin": "API_DEFINITION", + "description": " Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: `filter`. If an `UNAVAILABLE` error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.", + "canonical": true, + "file": "config_service_v2.update_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateView", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.logging.v2.LogView" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateView", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteView_async", + "title": "logging deleteView Sample", + "origin": "API_DEFINITION", + "description": " Deletes a view on a log bucket. If an `UNAVAILABLE` error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes.", + "canonical": true, + "file": "config_service_v2.delete_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteView", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteView", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListSinks_async", + "title": "logging listSinks Sample", + "origin": "API_DEFINITION", + "description": " Lists sinks.", + "canonical": true, + "file": "config_service_v2.list_sinks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListSinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListSinksResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListSinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListSinks", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetSink_async", + "title": "logging getSink Sample", + "origin": "API_DEFINITION", + "description": " Gets a sink.", + "canonical": true, + "file": "config_service_v2.get_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSink", + "fullName": "google.logging.v2.ConfigServiceV2.GetSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetSink", + "fullName": "google.logging.v2.ConfigServiceV2.GetSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateSink_async", + "title": "logging createSink Sample", + "origin": "API_DEFINITION", + "description": " Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless 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.", + "canonical": true, + "file": "config_service_v2.create_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateSink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "sink", + "type": ".google.logging.v2.LogSink" + }, + { + "name": "unique_writer_identity", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateSink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateSink_async", + "title": "logging updateSink Sample", + "origin": "API_DEFINITION", + "description": " Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: `destination`, and `filter`. The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` field.", + "canonical": true, + "file": "config_service_v2.update_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSink", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + }, + { + "name": "sink", + "type": ".google.logging.v2.LogSink" + }, + { + "name": "unique_writer_identity", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateSink", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteSink_async", + "title": "logging deleteSink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted.", + "canonical": true, + "file": "config_service_v2.delete_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteSink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListExclusions_async", + "title": "logging listExclusions Sample", + "origin": "API_DEFINITION", + "description": " Lists all the exclusions on the _Default sink in a parent resource.", + "canonical": true, + "file": "config_service_v2.list_exclusions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListExclusions", + "fullName": "google.logging.v2.ConfigServiceV2.ListExclusions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListExclusionsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListExclusions", + "fullName": "google.logging.v2.ConfigServiceV2.ListExclusions", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetExclusion_async", + "title": "logging getExclusion Sample", + "origin": "API_DEFINITION", + "description": " Gets the description of an exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.get_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.GetExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.GetExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateExclusion_async", + "title": "logging createExclusion Sample", + "origin": "API_DEFINITION", + "description": " Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + "canonical": true, + "file": "config_service_v2.create_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.CreateExclusion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "exclusion", + "type": ".google.logging.v2.LogExclusion" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.CreateExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateExclusion_async", + "title": "logging updateExclusion Sample", + "origin": "API_DEFINITION", + "description": " Changes one or more properties of an existing exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.update_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "exclusion", + "type": ".google.logging.v2.LogExclusion" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteExclusion_async", + "title": "logging deleteExclusion Sample", + "origin": "API_DEFINITION", + "description": " Deletes an exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.delete_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetCmekSettings_async", + "title": "logging getCmekSettings Sample", + "origin": "API_DEFINITION", + "description": " Gets the Logging CMEK settings for the given resource. Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.get_cmek_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetCmekSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.CmekSettings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetCmekSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async", + "title": "logging updateCmekSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the Log Router CMEK settings for the given resource. Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key is disabled. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.update_cmek_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateCmekSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "cmek_settings", + "type": ".google.logging.v2.CmekSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.CmekSettings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateCmekSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetSettings_async", + "title": "logging getSettings Sample", + "origin": "API_DEFINITION", + "description": " Gets the Log Router settings for the given resource. Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.get_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.Settings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateSettings_async", + "title": "logging updateSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the Log Router settings for the given resource. Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key is disabled. 4) `location_id` is not supported by Logging. 5) `location_id` violate OrgPolicy. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.update_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "settings", + "type": ".google.logging.v2.Settings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.Settings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CopyLogEntries_async", + "title": "logging copyLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Copies a set of log entries from a log bucket to a Cloud Storage bucket.", + "canonical": true, + "file": "config_service_v2.copy_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CopyLogEntries", + "fullName": "google.logging.v2.ConfigServiceV2.CopyLogEntries", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "destination", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CopyLogEntries", + "fullName": "google.logging.v2.ConfigServiceV2.CopyLogEntries", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_DeleteLog_async", + "title": "logging deleteLog Sample", + "origin": "API_DEFINITION", + "description": " Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.", + "canonical": true, + "file": "logging_service_v2.delete_log.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLog", + "fullName": "google.logging.v2.LoggingServiceV2.DeleteLog", + "async": true, + "parameters": [ + { + "name": "log_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "DeleteLog", + "fullName": "google.logging.v2.LoggingServiceV2.DeleteLog", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_WriteLogEntries_async", + "title": "logging writeLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)", + "canonical": true, + "file": "logging_service_v2.write_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 116, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "WriteLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.WriteLogEntries", + "async": true, + "parameters": [ + { + "name": "log_name", + "type": "TYPE_STRING" + }, + { + "name": "resource", + "type": ".google.api.MonitoredResource" + }, + { + "name": "labels", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "entries", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "partial_success", + "type": "TYPE_BOOL" + }, + { + "name": "dry_run", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.logging.v2.WriteLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "WriteLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.WriteLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_ListLogEntries_async", + "title": "logging listLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export).", + "canonical": true, + "file": "logging_service_v2.list_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 96, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogEntries", + "async": true, + "parameters": [ + { + "name": "resource_names", + "type": "TYPE_STRING[]" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.ListLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async", + "title": "logging listMonitoredResourceDescriptors Sample", + "origin": "API_DEFINITION", + "description": " Lists the descriptors for monitored resource types used by Logging.", + "canonical": true, + "file": "logging_service_v2.list_monitored_resource_descriptors.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMonitoredResourceDescriptors", + "fullName": "google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", + "async": true, + "parameters": [ + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.ListMonitoredResourceDescriptorsResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListMonitoredResourceDescriptors", + "fullName": "google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_ListLogs_async", + "title": "logging listLogs Sample", + "origin": "API_DEFINITION", + "description": " Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "canonical": true, + "file": "logging_service_v2.list_logs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogs", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "resource_names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.logging.v2.ListLogsResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListLogs", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogs", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_TailLogEntries_async", + "title": "logging tailLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.", + "canonical": true, + "file": "logging_service_v2.tail_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TailLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.TailLogEntries", + "async": true, + "parameters": [ + { + "name": "resource_names", + "type": "TYPE_STRING[]" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "buffer_window", + "type": ".google.protobuf.Duration" + } + ], + "resultType": ".google.logging.v2.TailLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "TailLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.TailLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_ListLogMetrics_async", + "title": "logging listLogMetrics Sample", + "origin": "API_DEFINITION", + "description": " Lists logs-based metrics.", + "canonical": true, + "file": "metrics_service_v2.list_log_metrics.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogMetrics", + "fullName": "google.logging.v2.MetricsServiceV2.ListLogMetrics", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListLogMetricsResponse", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "ListLogMetrics", + "fullName": "google.logging.v2.MetricsServiceV2.ListLogMetrics", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_GetLogMetric_async", + "title": "logging getLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Gets a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.get_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.GetLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "GetLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.GetLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_CreateLogMetric_async", + "title": "logging createLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Creates a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.create_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.CreateLogMetric", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "metric", + "type": ".google.logging.v2.LogMetric" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "CreateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.CreateLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async", + "title": "logging updateLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Creates or updates a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.update_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.UpdateLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + }, + { + "name": "metric", + "type": ".google.logging.v2.LogMetric" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "UpdateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.UpdateLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async", + "title": "logging deleteLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Deletes a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.delete_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.DeleteLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "DeleteLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.DeleteLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + } + ] +} diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index d7fdc2a4fad..a9a55db3dfe 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + LROperation, PaginationCallback, GaxCall, } from 'google-gax'; @@ -37,7 +38,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './config_service_v2_client_config.json'; - +import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -63,6 +64,7 @@ export class ConfigServiceV2Client { warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; configServiceV2Stub?: Promise<{[name: string]: Function}>; /** @@ -181,6 +183,9 @@ export class ConfigServiceV2Client { billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), + billingAccountSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/settings' + ), billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/sinks/{sink}' ), @@ -199,6 +204,9 @@ export class ConfigServiceV2Client { folderLogPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/logs/{log}' ), + folderSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/settings' + ), folderSinkPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/sinks/{sink}' ), @@ -224,6 +232,9 @@ export class ConfigServiceV2Client { organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), + organizationSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/settings' + ), organizationSinkPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/sinks/{sink}' ), @@ -245,6 +256,9 @@ export class ConfigServiceV2Client { projectLogPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/logs/{log}' ), + projectSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/settings' + ), projectSinkPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/sinks/{sink}' ), @@ -276,6 +290,33 @@ export class ConfigServiceV2Client { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const copyLogEntriesResponse = protoFilesRoot.lookup( + '.google.logging.v2.CopyLogEntriesResponse' + ) as gax.protobuf.Type; + const copyLogEntriesMetadata = protoFilesRoot.lookup( + '.google.logging.v2.CopyLogEntriesMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + copyLogEntries: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + copyLogEntriesResponse.decode.bind(copyLogEntriesResponse), + copyLogEntriesMetadata.decode.bind(copyLogEntriesMetadata) + ), + }; + // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( 'google.logging.v2.ConfigServiceV2', @@ -349,6 +390,9 @@ export class ConfigServiceV2Client { 'deleteExclusion', 'getCmekSettings', 'updateCmekSettings', + 'getSettings', + 'updateSettings', + 'copyLogEntries', ]; for (const methodName of configServiceV2StubMethods) { const callPromise = this.configServiceV2Stub.then( @@ -365,7 +409,10 @@ export class ConfigServiceV2Client { } ); - const descriptor = this.descriptors.page[methodName] || undefined; + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], @@ -437,7 +484,7 @@ export class ConfigServiceV2Client { // -- Service calls -- // ------------------- /** - * Gets a bucket. + * Gets a log bucket. * * @param {Object} request * The request object that will be sent. @@ -449,8 +496,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -528,21 +576,23 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getBucket(request, options, callback); } /** - * Creates a bucket that can be used to store log entries. Once a bucket has - * been created, the region cannot be changed. + * Creates a log bucket that can be used to store log entries. After a bucket + * has been created, the bucket's location cannot be changed. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource in which to create the bucket: + * Required. The resource in which to create the log bucket: * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" * - * Example: `"projects/my-logging-project/locations/global"` + * For example: + * + * `"projects/my-project/locations/global"` * @param {string} request.bucketId - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited + * to 100 characters and can include only letters, digits, underscores, + * hyphens, and periods. * @param {google.logging.v2.LogBucket} request.bucket * Required. The new bucket. The region specified in the new bucket must be compliant * with any Location Restriction Org Policy. The name field in the bucket is @@ -624,16 +674,16 @@ export class ConfigServiceV2Client { return this.innerApiCalls.createBucket(request, options, callback); } /** - * Updates a bucket. This method replaces the following fields in the + * Updates a log bucket. This method replaces the following fields in the * existing bucket with values from the new bucket: `retention_period` * * If the retention period is decreased and the bucket is locked, - * FAILED_PRECONDITION will be returned. + * `FAILED_PRECONDITION` will be returned. * - * If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION - * will be returned. + * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + * `FAILED_PRECONDITION` will be returned. * - * A buckets region may not be modified after it is created. + * After a bucket has been created, the bucket's location cannot be changed. * * @param {Object} request * The request object that will be sent. @@ -645,21 +695,20 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also - * requires permission "resourcemanager.projects.updateLiens" to set the - * locked property + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket"` * @param {google.logging.v2.LogBucket} request.bucket * Required. The updated bucket. * @param {google.protobuf.FieldMask} request.updateMask * Required. Field mask that specifies the fields in `bucket` that need an update. A - * bucket field will be overwritten if, and only if, it is in the update - * mask. `name` and output only fields cannot be updated. + * bucket field will be overwritten if, and only if, it is in the update mask. + * `name` and output only fields cannot be updated. * - * For a detailed `FieldMask` definition, see + * For a detailed `FieldMask` definition, see: * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask * - * Example: `updateMask=retention_days`. + * For example: `updateMask=retention_days` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -737,10 +786,11 @@ export class ConfigServiceV2Client { return this.innerApiCalls.updateBucket(request, options, callback); } /** - * Deletes a bucket. - * Moves the bucket to the DELETE_REQUESTED state. After 7 days, the - * bucket will be purged and all logs in the bucket will be permanently - * deleted. + * Deletes a log bucket. + * + * Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. + * After 7 days, the bucket will be purged and all log entries in the bucket + * will be permanently deleted. * * @param {Object} request * The request object that will be sent. @@ -752,8 +802,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -831,8 +882,8 @@ export class ConfigServiceV2Client { return this.innerApiCalls.deleteBucket(request, options, callback); } /** - * Undeletes a bucket. A bucket that has been deleted may be undeleted within - * the grace period of 7 days. + * Undeletes a log bucket. A bucket that has been deleted can be undeleted + * within the grace period of 7 days. * * @param {Object} request * The request object that will be sent. @@ -844,8 +895,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -923,7 +975,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.undeleteBucket(request, options, callback); } /** - * Gets a view. + * Gets a view on a log bucket.. * * @param {Object} request * The request object that will be sent. @@ -932,8 +984,9 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1011,18 +1064,19 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getView(request, options, callback); } /** - * Creates a view over logs in a bucket. A bucket may contain a maximum of - * 50 views. + * Creates a view over log entries in a log bucket. A bucket may contain a + * maximum of 30 views. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The bucket in which to create the view * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` * - * Example: - * `"projects/my-logging-project/locations/my-location/buckets/my-bucket"` + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket"` * @param {string} request.viewId * Required. The id to use for this view. * @param {google.logging.v2.LogView} request.view @@ -1104,8 +1158,11 @@ export class ConfigServiceV2Client { return this.innerApiCalls.createView(request, options, callback); } /** - * Updates a view. This method replaces the following fields in the existing - * view with values from the new view: `filter`. + * Updates a view on a log bucket. This method replaces the following fields + * in the existing view with values from the new view: `filter`. + * If an `UNAVAILABLE` error is returned, this indicates that system is not in + * a state where it can update the view. If this occurs, please try again in a + * few minutes. * * @param {Object} request * The request object that will be sent. @@ -1114,8 +1171,9 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` * @param {google.logging.v2.LogView} request.view * Required. The updated view. * @param {google.protobuf.FieldMask} [request.updateMask] @@ -1126,7 +1184,7 @@ export class ConfigServiceV2Client { * For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask * - * Example: `updateMask=filter`. + * For example: `updateMask=filter` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1204,7 +1262,10 @@ export class ConfigServiceV2Client { return this.innerApiCalls.updateView(request, options, callback); } /** - * Deletes a view from a bucket. + * Deletes a view on a log bucket. + * If an `UNAVAILABLE` error is returned, this indicates that system is not in + * a state where it can delete the view. If this occurs, please try again in a + * few minutes. * * @param {Object} request * The request object that will be sent. @@ -1213,8 +1274,9 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" * - * Example: - * `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`. + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1304,7 +1366,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" * "folders/[FOLDER_ID]/sinks/[SINK_ID]" * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * For example: + * + * `"projects/my-project/sinks/my-sink"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1397,7 +1461,10 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" * - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * For examples: + * + * `"projects/my-project"` + * `"organizations/123456789"` * @param {google.logging.v2.LogSink} request.sink * Required. The new sink, whose `name` parameter is a sink identifier that * is not already in use. @@ -1405,9 +1472,9 @@ export class ConfigServiceV2Client { * 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 - * the same group or service account used by Logging before the addition of - * writer identities to this API. The sink's destination must be in the same - * project as the sink itself. + * the same group or service account used by Cloud Logging 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 @@ -1507,7 +1574,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" * "folders/[FOLDER_ID]/sinks/[SINK_ID]" * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * For example: + * + * `"projects/my-project/sinks/my-sink"` * @param {google.logging.v2.LogSink} request.sink * Required. The updated sink, whose name is the same identifier that appears as part * of `sink_name`. @@ -1528,16 +1597,18 @@ export class ConfigServiceV2Client { * an update. A sink field will be overwritten if, and only if, it is * in the update mask. `name` and output only fields cannot be updated. * - * An empty updateMask is temporarily treated as using the following mask + * An empty `updateMask` is temporarily treated as using the following mask * for backwards compatibility purposes: - * destination,filter,includeChildren + * + * `destination,filter,includeChildren` + * * At some point in the future, behavior will be removed and specifying an - * empty updateMask will be an error. + * empty `updateMask` will be an error. * * For a detailed `FieldMask` definition, see * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask * - * Example: `updateMask=filter`. + * For example: `updateMask=filter` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1629,7 +1700,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" * "folders/[FOLDER_ID]/sinks/[SINK_ID]" * - * Example: `"projects/my-project-id/sinks/my-sink-id"`. + * For example: + * + * `"projects/my-project/sinks/my-sink"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1707,7 +1780,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.deleteSink(request, options, callback); } /** - * Gets the description of an exclusion. + * Gets the description of an exclusion in the _Default sink. * * @param {Object} request * The request object that will be sent. @@ -1719,7 +1792,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * For example: + * + * `"projects/my-project/exclusions/my-exclusion"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1797,9 +1872,9 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getExclusion(request, options, callback); } /** - * Creates a new exclusion in a specified parent resource. - * Only log entries belonging to that resource can be excluded. - * You can have up to 10 exclusions in a resource. + * Creates a new exclusion in the _Default sink in a specified parent + * resource. Only log entries belonging to that resource can be excluded. You + * can have up to 10 exclusions in a resource. * * @param {Object} request * The request object that will be sent. @@ -1811,7 +1886,10 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" * - * Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * For examples: + * + * `"projects/my-logging-project"` + * `"organizations/123456789"` * @param {google.logging.v2.LogExclusion} request.exclusion * Required. The new exclusion, whose `name` parameter is an exclusion name * that is not already used in the parent resource. @@ -1892,7 +1970,8 @@ export class ConfigServiceV2Client { return this.innerApiCalls.createExclusion(request, options, callback); } /** - * Changes one or more properties of an existing exclusion. + * Changes one or more properties of an existing exclusion in the _Default + * sink. * * @param {Object} request * The request object that will be sent. @@ -1904,7 +1983,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * For example: + * + * `"projects/my-project/exclusions/my-exclusion"` * @param {google.logging.v2.LogExclusion} request.exclusion * Required. New values for the existing exclusion. Only the fields specified in * `update_mask` are relevant. @@ -1993,7 +2074,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.updateExclusion(request, options, callback); } /** - * Deletes an exclusion. + * Deletes an exclusion in the _Default sink. * * @param {Object} request * The request object that will be sent. @@ -2005,7 +2086,9 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" * - * Example: `"projects/my-project-id/exclusions/my-exclusion-id"`. + * For example: + * + * `"projects/my-project/exclusions/my-exclusion"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2083,13 +2166,14 @@ export class ConfigServiceV2Client { return this.innerApiCalls.deleteExclusion(request, options, callback); } /** - * Gets the Logs Router CMEK settings for the given resource. + * Gets the Logging CMEK settings for the given resource. * - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. * - * See [Enabling CMEK for Logs + * See [Enabling CMEK for Log * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) * for more information. * @@ -2103,11 +2187,14 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" * "folders/[FOLDER_ID]/cmekSettings" * - * Example: `"organizations/12345/cmekSettings"`. + * For example: + * + * `"organizations/12345/cmekSettings"` * - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2185,11 +2272,11 @@ export class ConfigServiceV2Client { return this.innerApiCalls.getCmekSettings(request, options, callback); } /** - * Updates the Logs Router CMEK settings for the given resource. + * Updates the Log Router CMEK settings for the given resource. * - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. * * {@link google.logging.v2.ConfigServiceV2.UpdateCmekSettings|UpdateCmekSettings} * will fail if 1) `kms_key_name` is invalid, or 2) the associated service @@ -2197,7 +2284,7 @@ export class ConfigServiceV2Client { * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or * 3) access to the key is disabled. * - * See [Enabling CMEK for Logs + * See [Enabling CMEK for Log * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) * for more information. * @@ -2211,15 +2298,17 @@ export class ConfigServiceV2Client { * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" * "folders/[FOLDER_ID]/cmekSettings" * - * Example: `"organizations/12345/cmekSettings"`. + * For example: * - * Note: CMEK for the Logs Router can currently only be configured for GCP - * organizations. Once configured, it applies to all projects and folders in - * the GCP organization. + * `"organizations/12345/cmekSettings"` + * + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. * @param {google.logging.v2.CmekSettings} request.cmekSettings * Required. The CMEK settings to update. * - * See [Enabling CMEK for Logs + * See [Enabling CMEK for Log * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) * for more information. * @param {google.protobuf.FieldMask} [request.updateMask] @@ -2229,7 +2318,7 @@ export class ConfigServiceV2Client { * * See {@link google.protobuf.FieldMask|FieldMask} for more information. * - * Example: `"updateMask=kmsKeyName"` + * For example: `"updateMask=kmsKeyName"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2308,9 +2397,379 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.updateCmekSettings(request, options, callback); } + /** + * Gets the Log Router settings for the given resource. + * + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource for which to retrieve settings. + * + * "projects/[PROJECT_ID]/settings" + * "organizations/[ORGANIZATION_ID]/settings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + * "folders/[FOLDER_ID]/settings" + * + * For example: + * + * `"organizations/12345/settings"` + * + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Settings]{@link google.logging.v2.Settings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.get_settings.js + * region_tag:logging_v2_generated_ConfigServiceV2_GetSettings_async + */ + getSettings( + request?: protos.google.logging.v2.IGetSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IGetSettingsRequest | undefined, + {} | undefined + ] + >; + getSettings( + request: protos.google.logging.v2.IGetSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IGetSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; + getSettings( + request: protos.google.logging.v2.IGetSettingsRequest, + callback: Callback< + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IGetSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; + getSettings( + request?: protos.google.logging.v2.IGetSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IGetSettingsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IGetSettingsRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IGetSettingsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getSettings(request, options, callback); + } + /** + * Updates the Log Router settings for the given resource. + * + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * {@link google.logging.v2.ConfigServiceV2.UpdateSettings|UpdateSettings} + * will fail if 1) `kms_key_name` is invalid, or 2) the associated service + * account does not have the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + * 3) access to the key is disabled. 4) `location_id` is not supported by + * Logging. 5) `location_id` violate OrgPolicy. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for the settings to update. + * + * "organizations/[ORGANIZATION_ID]/settings" + * + * For example: + * + * `"organizations/12345/settings"` + * + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * @param {google.logging.v2.Settings} request.settings + * Required. The settings to update. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask identifying which fields from `settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * + * See {@link google.protobuf.FieldMask|FieldMask} for more information. + * + * For example: `"updateMask=kmsKeyName"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Settings]{@link google.logging.v2.Settings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.update_settings.js + * region_tag:logging_v2_generated_ConfigServiceV2_UpdateSettings_async + */ + updateSettings( + request?: protos.google.logging.v2.IUpdateSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IUpdateSettingsRequest | undefined, + {} | undefined + ] + >; + updateSettings( + request: protos.google.logging.v2.IUpdateSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IUpdateSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; + updateSettings( + request: protos.google.logging.v2.IUpdateSettingsRequest, + callback: Callback< + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IUpdateSettingsRequest | null | undefined, + {} | null | undefined + > + ): void; + updateSettings( + request?: protos.google.logging.v2.IUpdateSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IUpdateSettingsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IUpdateSettingsRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.logging.v2.ISettings, + protos.google.logging.v2.IUpdateSettingsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateSettings(request, options, callback); + } /** - * Lists buckets. + * Copies a set of log entries from a log bucket to a Cloud Storage bucket. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Log bucket from which to copy log entries. + * + * For example: + * + * `"projects/my-project/locations/global/buckets/my-source-bucket"` + * @param {string} [request.filter] + * Optional. A filter specifying which log entries to copy. The filter must be no more + * than 20k characters. An empty filter matches all log entries. + * @param {string} request.destination + * Required. Destination to which to copy log entries. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.copy_log_entries.js + * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async + */ + copyLogEntries( + request?: protos.google.logging.v2.ICopyLogEntriesRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + copyLogEntries( + request: protos.google.logging.v2.ICopyLogEntriesRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + copyLogEntries( + request: protos.google.logging.v2.ICopyLogEntriesRequest, + callback: Callback< + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + copyLogEntries( + request?: protos.google.logging.v2.ICopyLogEntriesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + this.initialize(); + return this.innerApiCalls.copyLogEntries(request, options, callback); + } + /** + * Check the status of the long running operation returned by `copyLogEntries()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.copy_log_entries.js + * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async + */ + async checkCopyLogEntriesProgress( + name: string + ): Promise< + LROperation< + protos.google.logging.v2.CopyLogEntriesResponse, + protos.google.logging.v2.CopyLogEntriesMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.copyLogEntries, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.logging.v2.CopyLogEntriesResponse, + protos.google.logging.v2.CopyLogEntriesMetadata + >; + } + /** + * Lists log buckets. * * @param {Object} request * The request object that will be sent. @@ -2326,14 +2785,14 @@ export class ConfigServiceV2Client { * supplying the character `-` in place of [LOCATION_ID] will return all * buckets. * @param {string} [request.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. + * 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 {number} [request.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. + * 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 {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2430,14 +2889,14 @@ export class ConfigServiceV2Client { * supplying the character `-` in place of [LOCATION_ID] will return all * buckets. * @param {string} [request.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. + * 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 {number} [request.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. + * 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 {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2490,14 +2949,14 @@ export class ConfigServiceV2Client { * supplying the character `-` in place of [LOCATION_ID] will return all * buckets. * @param {string} [request.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. + * 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 {number} [request.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. + * 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 {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2533,7 +2992,7 @@ export class ConfigServiceV2Client { ) as AsyncIterable; } /** - * Lists views on a bucket. + * Lists views on a log bucket. * * @param {Object} request * The request object that will be sent. @@ -2542,12 +3001,13 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.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. + * 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 {number} [request.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 {object} [options] @@ -2639,12 +3099,13 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.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. + * 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 {number} [request.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 {object} [options] @@ -2692,12 +3153,13 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.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. + * 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 {number} [request.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 {object} [options] @@ -2946,7 +3408,7 @@ export class ConfigServiceV2Client { ) as AsyncIterable; } /** - * Lists all the exclusions in a parent resource. + * Lists all the exclusions on the _Default sink in a parent resource. * * @param {Object} request * The request object that will be sent. @@ -3421,6 +3883,33 @@ export class ConfigServiceV2Client { ).log; } + /** + * Return a fully-qualified billingAccountSettings resource name string. + * + * @param {string} billing_account + * @returns {string} Resource name string. + */ + billingAccountSettingsPath(billingAccount: string) { + return this.pathTemplates.billingAccountSettingsPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Parse the billing_account from BillingAccountSettings resource. + * + * @param {string} billingAccountSettingsName + * A fully-qualified path representing billing_account_settings resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountSettingsName( + billingAccountSettingsName: string + ) { + return this.pathTemplates.billingAccountSettingsPathTemplate.match( + billingAccountSettingsName + ).billing_account; + } + /** * Return a fully-qualified billingAccountSink resource name string. * @@ -3702,6 +4191,31 @@ export class ConfigServiceV2Client { return this.pathTemplates.folderLogPathTemplate.match(folderLogName).log; } + /** + * Return a fully-qualified folderSettings resource name string. + * + * @param {string} folder + * @returns {string} Resource name string. + */ + folderSettingsPath(folder: string) { + return this.pathTemplates.folderSettingsPathTemplate.render({ + folder: folder, + }); + } + + /** + * Parse the folder from FolderSettings resource. + * + * @param {string} folderSettingsName + * A fully-qualified path representing folder_settings resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderSettingsName(folderSettingsName: string) { + return this.pathTemplates.folderSettingsPathTemplate.match( + folderSettingsName + ).folder; + } + /** * Return a fully-qualified folderSink resource name string. * @@ -4073,6 +4587,33 @@ export class ConfigServiceV2Client { ).log; } + /** + * Return a fully-qualified organizationSettings resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationSettingsPath(organization: string) { + return this.pathTemplates.organizationSettingsPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from OrganizationSettings resource. + * + * @param {string} organizationSettingsName + * A fully-qualified path representing organization_settings resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSettingsName( + organizationSettingsName: string + ) { + return this.pathTemplates.organizationSettingsPathTemplate.match( + organizationSettingsName + ).organization; + } + /** * Return a fully-qualified organizationSink resource name string. * @@ -4378,6 +4919,31 @@ export class ConfigServiceV2Client { return this.pathTemplates.projectLogPathTemplate.match(projectLogName).log; } + /** + * Return a fully-qualified projectSettings resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectSettingsPath(project: string) { + return this.pathTemplates.projectSettingsPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from ProjectSettings resource. + * + * @param {string} projectSettingsName + * A fully-qualified path representing project_settings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSettingsName(projectSettingsName: string) { + return this.pathTemplates.projectSettingsPathTemplate.match( + projectSettingsName + ).project; + } + /** * Return a fully-qualified projectSink resource name string. * @@ -4423,11 +4989,11 @@ export class ConfigServiceV2Client { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.configServiceV2Stub!.then(stub => { + if (this.configServiceV2Stub && !this._terminated) { + return this.configServiceV2Stub.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index ca024e51035..5ae5608c2c4 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -126,6 +126,18 @@ "UpdateCmekSettings": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "GetSettings": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSettings": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CopyLogEntries": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/handwritten/logging/src/v2/gapic_metadata.json b/handwritten/logging/src/v2/gapic_metadata.json index cc8c175afdc..6a98ee8be70 100644 --- a/handwritten/logging/src/v2/gapic_metadata.json +++ b/handwritten/logging/src/v2/gapic_metadata.json @@ -105,6 +105,21 @@ "updateCmekSettings" ] }, + "GetSettings": { + "methods": [ + "getSettings" + ] + }, + "UpdateSettings": { + "methods": [ + "updateSettings" + ] + }, + "CopyLogEntries": { + "methods": [ + "copyLogEntries" + ] + }, "ListBuckets": { "methods": [ "listBuckets", @@ -233,6 +248,21 @@ "updateCmekSettings" ] }, + "GetSettings": { + "methods": [ + "getSettings" + ] + }, + "UpdateSettings": { + "methods": [ + "updateSettings" + ] + }, + "CopyLogEntries": { + "methods": [ + "copyLogEntries" + ] + }, "ListBuckets": { "methods": [ "listBuckets", diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 2d4f9314aa6..c3d839d7785 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -25,10 +25,12 @@ import { ClientOptions, PaginationCallback, GaxCall, + GoogleError, } from 'google-gax'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; +import {PassThrough} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -181,6 +183,9 @@ export class LoggingServiceV2Client { billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), + billingAccountSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/settings' + ), billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/sinks/{sink}' ), @@ -199,6 +204,9 @@ export class LoggingServiceV2Client { folderLogPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/logs/{log}' ), + folderSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/settings' + ), folderSinkPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/sinks/{sink}' ), @@ -221,6 +229,9 @@ export class LoggingServiceV2Client { organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), + organizationSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/settings' + ), organizationSinkPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/sinks/{sink}' ), @@ -242,6 +253,9 @@ export class LoggingServiceV2Client { projectLogPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/logs/{log}' ), + projectSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/settings' + ), projectSinkPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/sinks/{sink}' ), @@ -355,6 +369,16 @@ export class LoggingServiceV2Client { stub => (...args: Array<{}>) => { if (this._terminated) { + if (methodName in this.descriptors.stream) { + const stream = new PassThrough(); + setImmediate(() => { + stream.emit( + 'error', + new GoogleError('The client has already been closed.') + ); + }); + return stream; + } return Promise.reject('The client has already been closed.'); } const func = stub[methodName]; @@ -442,24 +466,25 @@ export class LoggingServiceV2Client { // -- Service calls -- // ------------------- /** - * Deletes all the log entries in a log. The log reappears if it receives new - * entries. Log entries written shortly before the delete operation might not - * be deleted. Entries received after the delete operation with a timestamp - * before the operation will be deleted. + * Deletes all the log entries in a log for the _Default Log Bucket. The log + * reappears if it receives new entries. Log entries written shortly before + * the delete operation might not be deleted. Entries received after the + * delete operation with a timestamp before the operation will be deleted. * * @param {Object} request * The request object that will be sent. * @param {string} request.logName * Required. The resource name of the log to delete: * - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` * * `[LOG_ID]` must be URL-encoded. For example, * `"projects/my-project-id/logs/syslog"`, - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + * * For more information about log names, see * {@link google.logging.v2.LogEntry|LogEntry}. * @param {object} [options] @@ -553,15 +578,15 @@ export class LoggingServiceV2Client { * Optional. A default log resource name that is assigned to all log entries * in `entries` that do not specify a value for `log_name`: * - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` * * `[LOG_ID]` must be URL-encoded. For example: * * "projects/my-project-id/logs/syslog" - * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" * * The permission `logging.logEntries.create` is needed on each project, * organization, billing account, or folder that is receiving new log @@ -596,14 +621,14 @@ export class LoggingServiceV2Client { * the entries later in the list. See the `entries.list` method. * * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quota-policy) in + * [logs retention period](https://cloud.google.com/logging/quotas) in * the past or more than 24 hours in the future will not be available when * calling `entries.list`. However, those log entries can still be [exported * with * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). * * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + * [quota limit](https://cloud.google.com/logging/quotas) for calls to * `entries.write`, you should try to include several log entries in this * list, rather than calling this method for each individual log entry. * @param {boolean} [request.partialSuccess] @@ -722,16 +747,17 @@ export class LoggingServiceV2Client { * Required. Names of one or more parent resources from which to * retrieve log entries: * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * + * May alternatively be one or more views: * - * May alternatively be one or more views - * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] @@ -750,10 +776,10 @@ export class LoggingServiceV2Client { * in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, - * the request is rejected. The presence of `next_page_token` in the - * response indicates that more results might be available. + * Optional. The maximum number of results to return from this request. Default is 50. + * If the value is negative or exceeds 1000, the request is rejected. The + * presence of `next_page_token` in the response indicates that more results + * might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `page_token` must be the value of @@ -843,16 +869,17 @@ export class LoggingServiceV2Client { * Required. Names of one or more parent resources from which to * retrieve log entries: * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * + * May alternatively be one or more views: * - * May alternatively be one or more views - * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] @@ -871,10 +898,10 @@ export class LoggingServiceV2Client { * in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, - * the request is rejected. The presence of `next_page_token` in the - * response indicates that more results might be available. + * Optional. The maximum number of results to return from this request. Default is 50. + * If the value is negative or exceeds 1000, the request is rejected. The + * presence of `next_page_token` in the response indicates that more results + * might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `page_token` must be the value of @@ -920,16 +947,17 @@ export class LoggingServiceV2Client { * Required. Names of one or more parent resources from which to * retrieve log entries: * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` * - * May alternatively be one or more views - * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * May alternatively be one or more views: + * + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * Projects listed in the `project_ids` field are added to this list. * @param {string} [request.filter] @@ -948,10 +976,10 @@ export class LoggingServiceV2Client { * in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, - * the request is rejected. The presence of `next_page_token` in the - * response indicates that more results might be available. + * Optional. The maximum number of results to return from this request. Default is 50. + * If the value is negative or exceeds 1000, the request is rejected. The + * presence of `next_page_token` in the response indicates that more results + * might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `page_token` must be the value of @@ -1188,10 +1216,10 @@ export class LoggingServiceV2Client { * @param {string} request.parent * Required. The resource name that owns the logs: * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * Non-positive values are ignored. The presence of `nextPageToken` in the @@ -1203,16 +1231,18 @@ export class LoggingServiceV2Client { * parameters should be identical to those in the previous call. * @param {string[]} [request.resourceNames] * Optional. The resource name that owns the logs: - * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * To support legacy queries, it could also be: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1300,10 +1330,10 @@ export class LoggingServiceV2Client { * @param {string} request.parent * Required. The resource name that owns the logs: * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * Non-positive values are ignored. The presence of `nextPageToken` in the @@ -1315,16 +1345,18 @@ export class LoggingServiceV2Client { * parameters should be identical to those in the previous call. * @param {string[]} [request.resourceNames] * Optional. The resource name that owns the logs: - * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * To support legacy queries, it could also be: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1368,10 +1400,10 @@ export class LoggingServiceV2Client { * @param {string} request.parent * Required. The resource name that owns the logs: * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * Non-positive values are ignored. The presence of `nextPageToken` in the @@ -1383,16 +1415,18 @@ export class LoggingServiceV2Client { * parameters should be identical to those in the previous call. * @param {string[]} [request.resourceNames] * Optional. The resource name that owns the logs: - * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] - * folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] + * + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * To support legacy queries, it could also be: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1692,6 +1726,33 @@ export class LoggingServiceV2Client { ).log; } + /** + * Return a fully-qualified billingAccountSettings resource name string. + * + * @param {string} billing_account + * @returns {string} Resource name string. + */ + billingAccountSettingsPath(billingAccount: string) { + return this.pathTemplates.billingAccountSettingsPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Parse the billing_account from BillingAccountSettings resource. + * + * @param {string} billingAccountSettingsName + * A fully-qualified path representing billing_account_settings resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountSettingsName( + billingAccountSettingsName: string + ) { + return this.pathTemplates.billingAccountSettingsPathTemplate.match( + billingAccountSettingsName + ).billing_account; + } + /** * Return a fully-qualified billingAccountSink resource name string. * @@ -1973,6 +2034,31 @@ export class LoggingServiceV2Client { return this.pathTemplates.folderLogPathTemplate.match(folderLogName).log; } + /** + * Return a fully-qualified folderSettings resource name string. + * + * @param {string} folder + * @returns {string} Resource name string. + */ + folderSettingsPath(folder: string) { + return this.pathTemplates.folderSettingsPathTemplate.render({ + folder: folder, + }); + } + + /** + * Parse the folder from FolderSettings resource. + * + * @param {string} folderSettingsName + * A fully-qualified path representing folder_settings resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderSettingsName(folderSettingsName: string) { + return this.pathTemplates.folderSettingsPathTemplate.match( + folderSettingsName + ).folder; + } + /** * Return a fully-qualified folderSink resource name string. * @@ -2308,6 +2394,33 @@ export class LoggingServiceV2Client { ).log; } + /** + * Return a fully-qualified organizationSettings resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationSettingsPath(organization: string) { + return this.pathTemplates.organizationSettingsPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from OrganizationSettings resource. + * + * @param {string} organizationSettingsName + * A fully-qualified path representing organization_settings resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSettingsName( + organizationSettingsName: string + ) { + return this.pathTemplates.organizationSettingsPathTemplate.match( + organizationSettingsName + ).organization; + } + /** * Return a fully-qualified organizationSink resource name string. * @@ -2613,6 +2726,31 @@ export class LoggingServiceV2Client { return this.pathTemplates.projectLogPathTemplate.match(projectLogName).log; } + /** + * Return a fully-qualified projectSettings resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectSettingsPath(project: string) { + return this.pathTemplates.projectSettingsPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from ProjectSettings resource. + * + * @param {string} projectSettingsName + * A fully-qualified path representing project_settings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSettingsName(projectSettingsName: string) { + return this.pathTemplates.projectSettingsPathTemplate.match( + projectSettingsName + ).project; + } + /** * Return a fully-qualified projectSink resource name string. * @@ -2658,9 +2796,8 @@ export class LoggingServiceV2Client { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.loggingServiceV2Stub!.then(stub => { + if (this.loggingServiceV2Stub && !this._terminated) { + return this.loggingServiceV2Stub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 49d9eaf734f..53055f9a0af 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -181,6 +181,9 @@ export class MetricsServiceV2Client { billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/logs/{log}' ), + billingAccountSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/settings' + ), billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/sinks/{sink}' ), @@ -199,6 +202,9 @@ export class MetricsServiceV2Client { folderLogPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/logs/{log}' ), + folderSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/settings' + ), folderSinkPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/sinks/{sink}' ), @@ -221,6 +227,9 @@ export class MetricsServiceV2Client { organizationLogPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/logs/{log}' ), + organizationSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/settings' + ), organizationSinkPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/sinks/{sink}' ), @@ -242,6 +251,9 @@ export class MetricsServiceV2Client { projectLogPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/logs/{log}' ), + projectSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/settings' + ), projectSinkPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/sinks/{sink}' ), @@ -1220,6 +1232,33 @@ export class MetricsServiceV2Client { ).log; } + /** + * Return a fully-qualified billingAccountSettings resource name string. + * + * @param {string} billing_account + * @returns {string} Resource name string. + */ + billingAccountSettingsPath(billingAccount: string) { + return this.pathTemplates.billingAccountSettingsPathTemplate.render({ + billing_account: billingAccount, + }); + } + + /** + * Parse the billing_account from BillingAccountSettings resource. + * + * @param {string} billingAccountSettingsName + * A fully-qualified path representing billing_account_settings resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountSettingsName( + billingAccountSettingsName: string + ) { + return this.pathTemplates.billingAccountSettingsPathTemplate.match( + billingAccountSettingsName + ).billing_account; + } + /** * Return a fully-qualified billingAccountSink resource name string. * @@ -1501,6 +1540,31 @@ export class MetricsServiceV2Client { return this.pathTemplates.folderLogPathTemplate.match(folderLogName).log; } + /** + * Return a fully-qualified folderSettings resource name string. + * + * @param {string} folder + * @returns {string} Resource name string. + */ + folderSettingsPath(folder: string) { + return this.pathTemplates.folderSettingsPathTemplate.render({ + folder: folder, + }); + } + + /** + * Parse the folder from FolderSettings resource. + * + * @param {string} folderSettingsName + * A fully-qualified path representing folder_settings resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderSettingsName(folderSettingsName: string) { + return this.pathTemplates.folderSettingsPathTemplate.match( + folderSettingsName + ).folder; + } + /** * Return a fully-qualified folderSink resource name string. * @@ -1836,6 +1900,33 @@ export class MetricsServiceV2Client { ).log; } + /** + * Return a fully-qualified organizationSettings resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationSettingsPath(organization: string) { + return this.pathTemplates.organizationSettingsPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from OrganizationSettings resource. + * + * @param {string} organizationSettingsName + * A fully-qualified path representing organization_settings resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSettingsName( + organizationSettingsName: string + ) { + return this.pathTemplates.organizationSettingsPathTemplate.match( + organizationSettingsName + ).organization; + } + /** * Return a fully-qualified organizationSink resource name string. * @@ -2141,6 +2232,31 @@ export class MetricsServiceV2Client { return this.pathTemplates.projectLogPathTemplate.match(projectLogName).log; } + /** + * Return a fully-qualified projectSettings resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectSettingsPath(project: string) { + return this.pathTemplates.projectSettingsPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from ProjectSettings resource. + * + * @param {string} projectSettingsName + * A fully-qualified path representing project_settings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSettingsName(projectSettingsName: string) { + return this.pathTemplates.projectSettingsPathTemplate.match( + projectSettingsName + ).project; + } + /** * Return a fully-qualified projectSink resource name string. * @@ -2186,9 +2302,8 @@ export class MetricsServiceV2Client { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.metricsServiceV2Stub!.then(stub => { + if (this.metricsServiceV2Stub && !this._terminated) { + return this.metricsServiceV2Stub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 5c29dd671ae..46fada9933e 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -25,7 +25,7 @@ import * as configservicev2Module from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -51,6 +51,38 @@ function stubSimpleCallWithCallback( : sinon.stub().callsArgWith(2, null, response); } +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + function stubPageStreamingCall( responses?: ResponseType[], error?: Error @@ -153,12 +185,27 @@ describe('v2.ConfigServiceV2Client', () => { assert(client.configServiceV2Stub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.configServiceV2Stub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + assert.strictEqual(client.configServiceV2Stub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -301,6 +348,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getBucket with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBucket(request), expectedError); + }); }); describe('createBucket', () => { @@ -412,6 +475,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createBucket with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateBucketRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createBucket(request), expectedError); + }); }); describe('updateBucket', () => { @@ -523,6 +602,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateBucket with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateBucket(request), expectedError); + }); }); describe('deleteBucket', () => { @@ -634,6 +729,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteBucket with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteBucket(request), expectedError); + }); }); describe('undeleteBucket', () => { @@ -745,6 +856,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes undeleteBucket with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UndeleteBucketRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.undeleteBucket(request), expectedError); + }); }); describe('getView', () => { @@ -853,6 +980,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getView with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetViewRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getView(request), expectedError); + }); }); describe('createView', () => { @@ -964,6 +1107,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createView with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateViewRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createView(request), expectedError); + }); }); describe('updateView', () => { @@ -1075,6 +1234,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateView with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateViewRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateView(request), expectedError); + }); }); describe('deleteView', () => { @@ -1186,6 +1361,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteView with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteViewRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteView(request), expectedError); + }); }); describe('getSink', () => { @@ -1294,6 +1485,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getSink with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSink(request), expectedError); + }); }); describe('createSink', () => { @@ -1405,6 +1612,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createSink with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateSinkRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createSink(request), expectedError); + }); }); describe('updateSink', () => { @@ -1516,6 +1739,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateSink with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateSink(request), expectedError); + }); }); describe('deleteSink', () => { @@ -1627,6 +1866,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteSink with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteSinkRequest() + ); + request.sinkName = ''; + const expectedHeaderRequestParams = 'sink_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteSink(request), expectedError); + }); }); describe('getExclusion', () => { @@ -1738,6 +1993,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getExclusion with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getExclusion(request), expectedError); + }); }); describe('createExclusion', () => { @@ -1849,6 +2120,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createExclusion with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateExclusionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createExclusion(request), expectedError); + }); }); describe('updateExclusion', () => { @@ -1960,6 +2247,22 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateExclusion with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateExclusion(request), expectedError); + }); }); describe('deleteExclusion', () => { @@ -2071,17 +2374,415 @@ describe('v2.ConfigServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteExclusion with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteExclusionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteExclusion(request), expectedError); + }); + }); + + describe('getCmekSettings', () => { + it('invokes getCmekSettings without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.getCmekSettings = stubSimpleCall(expectedResponse); + const [response] = await client.getCmekSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCmekSettings without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.getCmekSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCmekSettings( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ICmekSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCmekSettings with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCmekSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCmekSettings(request), expectedError); + assert( + (client.innerApiCalls.getCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCmekSettings with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCmekSettings(request), expectedError); + }); + }); + + describe('updateCmekSettings', () => { + it('invokes updateCmekSettings without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.updateCmekSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.updateCmekSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCmekSettings without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.CmekSettings() + ); + client.innerApiCalls.updateCmekSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCmekSettings( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ICmekSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCmekSettings with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCmekSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateCmekSettings(request), expectedError); + assert( + (client.innerApiCalls.updateCmekSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCmekSettings with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateCmekSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateCmekSettings(request), expectedError); + }); + }); + + describe('getSettings', () => { + it('invokes getSettings without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.Settings() + ); + client.innerApiCalls.getSettings = stubSimpleCall(expectedResponse); + const [response] = await client.getSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getSettings without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.Settings() + ); + client.innerApiCalls.getSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSettings( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ISettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getSettings with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getSettings(request), expectedError); + assert( + (client.innerApiCalls.getSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getSettings with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSettings(request), expectedError); + }); }); - describe('getCmekSettings', () => { - it('invokes getCmekSettings without error', async () => { + describe('updateSettings', () => { + it('invokes updateSettings without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.UpdateSettingsRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -2093,26 +2794,26 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.Settings() ); - client.innerApiCalls.getCmekSettings = stubSimpleCall(expectedResponse); - const [response] = await client.getCmekSettings(request); + client.innerApiCalls.updateSettings = stubSimpleCall(expectedResponse); + const [response] = await client.updateSettings(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getCmekSettings as SinonStub) + (client.innerApiCalls.updateSettings as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes getCmekSettings without error using callback', async () => { + it('invokes updateSettings without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.UpdateSettingsRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -2124,16 +2825,16 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.Settings() ); - client.innerApiCalls.getCmekSettings = + client.innerApiCalls.updateSettings = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getCmekSettings( + client.updateSettings( request, ( err?: Error | null, - result?: protos.google.logging.v2.ICmekSettings | null + result?: protos.google.logging.v2.ISettings | null ) => { if (err) { reject(err); @@ -2146,20 +2847,20 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getCmekSettings as SinonStub) + (client.innerApiCalls.updateSettings as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes getCmekSettings with error', async () => { + it('invokes updateSettings with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.UpdateSettingsRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -2171,81 +2872,85 @@ describe('v2.ConfigServiceV2Client', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getCmekSettings = stubSimpleCall( + client.innerApiCalls.updateSettings = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getCmekSettings(request), expectedError); + await assert.rejects(client.updateSettings(request), expectedError); assert( - (client.innerApiCalls.getCmekSettings as SinonStub) + (client.innerApiCalls.updateSettings as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - }); - describe('updateCmekSettings', () => { - it('invokes updateCmekSettings without error', async () => { + it('invokes updateSettings with closed client', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.UpdateSettingsRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateSettings(request), expectedError); + }); + }); + + describe('copyLogEntries', () => { + it('invokes copyLogEntries without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CopyLogEntriesRequest() + ); + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCmekSettings = - stubSimpleCall(expectedResponse); - const [response] = await client.updateCmekSettings(request); + client.innerApiCalls.copyLogEntries = + stubLongRunningCall(expectedResponse); + const [operation] = await client.copyLogEntries(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) + (client.innerApiCalls.copyLogEntries as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes updateCmekSettings without error using callback', async () => { + it('invokes copyLogEntries without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.CopyLogEntriesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCmekSettings = - stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.copyLogEntries = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateCmekSettings( + client.copyLogEntries( request, ( err?: Error | null, - result?: protos.google.logging.v2.ICmekSettings | null + result?: LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + > | null ) => { if (err) { reject(err); @@ -2255,45 +2960,107 @@ describe('v2.ConfigServiceV2Client', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) + (client.innerApiCalls.copyLogEntries as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes updateCmekSettings with error', async () => { + it('invokes copyLogEntries with call error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.CopyLogEntriesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); - client.innerApiCalls.updateCmekSettings = stubSimpleCall( + client.innerApiCalls.copyLogEntries = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.updateCmekSettings(request), expectedError); + await assert.rejects(client.copyLogEntries(request), expectedError); assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) + (client.innerApiCalls.copyLogEntries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes copyLogEntries with LRO error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CopyLogEntriesRequest() + ); + const expectedOptions = {otherArgs: {headers: {}}}; + const expectedError = new Error('expected'); + client.innerApiCalls.copyLogEntries = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.copyLogEntries(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.copyLogEntries as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes checkCopyLogEntriesProgress without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCopyLogEntriesProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCopyLogEntriesProgress with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCopyLogEntriesProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); }); describe('listBuckets', () => { @@ -3741,6 +4508,51 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('billingAccountSettings', () => { + const fakePath = '/rendered/path/billingAccountSettings'; + const expectedParameters = { + billing_account: 'billingAccountValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountSettingsPath', () => { + const result = client.billingAccountSettingsPath('billingAccountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.billingAccountSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountSettingsName', () => { + const result = + client.matchBillingAccountFromBillingAccountSettingsName(fakePath); + assert.strictEqual(result, 'billingAccountValue'); + assert( + ( + client.pathTemplates.billingAccountSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('billingAccountSink', () => { const fakePath = '/rendered/path/billingAccountSink'; const expectedParameters = { @@ -4120,6 +4932,44 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('folderSettings', () => { + const fakePath = '/rendered/path/folderSettings'; + const expectedParameters = { + folder: 'folderValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderSettingsPath', () => { + const result = client.folderSettingsPath('folderValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderSettingsPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderSettingsName', () => { + const result = client.matchFolderFromFolderSettingsName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderSink', () => { const fakePath = '/rendered/path/folderSink'; const expectedParameters = { @@ -4602,6 +5452,51 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('organizationSettings', () => { + const fakePath = '/rendered/path/organizationSettings'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationSettingsPath', () => { + const result = client.organizationSettingsPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationSettingsName', () => { + const result = + client.matchOrganizationFromOrganizationSettingsName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationSink', () => { const fakePath = '/rendered/path/organizationSink'; const expectedParameters = { @@ -5018,6 +5913,44 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('projectSettings', () => { + const fakePath = '/rendered/path/projectSettings'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectSettingsPath', () => { + const result = client.projectSettingsPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectSettingsPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectSettingsName', () => { + const result = client.matchProjectFromProjectSettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectSink', () => { const fakePath = '/rendered/path/projectSink'; const expectedParameters = { diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index dd1b37cb287..3d1025fd949 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -167,12 +167,27 @@ describe('v2.LoggingServiceV2Client', () => { assert(client.loggingServiceV2Stub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.loggingServiceV2Stub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.loggingServiceV2Stub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -315,6 +330,22 @@ describe('v2.LoggingServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteLog with closed client', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLogRequest() + ); + request.logName = ''; + const expectedHeaderRequestParams = 'log_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteLog(request), expectedError); + }); }); describe('writeLogEntries', () => { @@ -402,6 +433,20 @@ describe('v2.LoggingServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes writeLogEntries with closed client', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.WriteLogEntriesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.writeLogEntries(request), expectedError); + }); }); describe('tailLogEntries', () => { @@ -1577,6 +1622,51 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('billingAccountSettings', () => { + const fakePath = '/rendered/path/billingAccountSettings'; + const expectedParameters = { + billing_account: 'billingAccountValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountSettingsPath', () => { + const result = client.billingAccountSettingsPath('billingAccountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.billingAccountSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountSettingsName', () => { + const result = + client.matchBillingAccountFromBillingAccountSettingsName(fakePath); + assert.strictEqual(result, 'billingAccountValue'); + assert( + ( + client.pathTemplates.billingAccountSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('billingAccountSink', () => { const fakePath = '/rendered/path/billingAccountSink'; const expectedParameters = { @@ -1956,6 +2046,44 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('folderSettings', () => { + const fakePath = '/rendered/path/folderSettings'; + const expectedParameters = { + folder: 'folderValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderSettingsPath', () => { + const result = client.folderSettingsPath('folderValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderSettingsPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderSettingsName', () => { + const result = client.matchFolderFromFolderSettingsName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderSink', () => { const fakePath = '/rendered/path/folderSink'; const expectedParameters = { @@ -2389,6 +2517,51 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('organizationSettings', () => { + const fakePath = '/rendered/path/organizationSettings'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationSettingsPath', () => { + const result = client.organizationSettingsPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationSettingsName', () => { + const result = + client.matchOrganizationFromOrganizationSettingsName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationSink', () => { const fakePath = '/rendered/path/organizationSink'; const expectedParameters = { @@ -2805,6 +2978,44 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('projectSettings', () => { + const fakePath = '/rendered/path/projectSettings'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectSettingsPath', () => { + const result = client.projectSettingsPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectSettingsPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectSettingsName', () => { + const result = client.matchProjectFromProjectSettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectSink', () => { const fakePath = '/rendered/path/projectSink'; const expectedParameters = { diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 3bf3b917769..b7b0c027e3f 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -153,12 +153,27 @@ describe('v2.MetricsServiceV2Client', () => { assert(client.metricsServiceV2Stub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.metricsServiceV2Stub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metricsServiceV2Stub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -304,6 +319,22 @@ describe('v2.MetricsServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getLogMetric with closed client', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getLogMetric(request), expectedError); + }); }); describe('createLogMetric', () => { @@ -415,6 +446,22 @@ describe('v2.MetricsServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createLogMetric with closed client', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateLogMetricRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createLogMetric(request), expectedError); + }); }); describe('updateLogMetric', () => { @@ -526,6 +573,22 @@ describe('v2.MetricsServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateLogMetric with closed client', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.UpdateLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateLogMetric(request), expectedError); + }); }); describe('deleteLogMetric', () => { @@ -637,6 +700,22 @@ describe('v2.MetricsServiceV2Client', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteLogMetric with closed client', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLogMetricRequest() + ); + request.metricName = ''; + const expectedHeaderRequestParams = 'metric_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteLogMetric(request), expectedError); + }); }); describe('listLogMetrics', () => { @@ -1265,6 +1344,51 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('billingAccountSettings', () => { + const fakePath = '/rendered/path/billingAccountSettings'; + const expectedParameters = { + billing_account: 'billingAccountValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.billingAccountSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('billingAccountSettingsPath', () => { + const result = client.billingAccountSettingsPath('billingAccountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.billingAccountSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountSettingsName', () => { + const result = + client.matchBillingAccountFromBillingAccountSettingsName(fakePath); + assert.strictEqual(result, 'billingAccountValue'); + assert( + ( + client.pathTemplates.billingAccountSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('billingAccountSink', () => { const fakePath = '/rendered/path/billingAccountSink'; const expectedParameters = { @@ -1644,6 +1768,44 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('folderSettings', () => { + const fakePath = '/rendered/path/folderSettings'; + const expectedParameters = { + folder: 'folderValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderSettingsPath', () => { + const result = client.folderSettingsPath('folderValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderSettingsPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderSettingsName', () => { + const result = client.matchFolderFromFolderSettingsName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderSink', () => { const fakePath = '/rendered/path/folderSink'; const expectedParameters = { @@ -2077,6 +2239,51 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('organizationSettings', () => { + const fakePath = '/rendered/path/organizationSettings'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationSettingsPath', () => { + const result = client.organizationSettingsPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationSettingsName', () => { + const result = + client.matchOrganizationFromOrganizationSettingsName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationSink', () => { const fakePath = '/rendered/path/organizationSink'; const expectedParameters = { @@ -2493,6 +2700,44 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('projectSettings', () => { + const fakePath = '/rendered/path/projectSettings'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectSettingsPath', () => { + const result = client.projectSettingsPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectSettingsPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectSettingsName', () => { + const result = client.matchProjectFromProjectSettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectSink', () => { const fakePath = '/rendered/path/projectSink'; const expectedParameters = { From 7171aa70cdb01bdd71e7560056de87fdcf50076b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sun, 20 Feb 2022 11:27:44 -0800 Subject: [PATCH 0851/1029] chore(main): release 9.7.0 (#1230) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index b63111d66c0..2400d00f344 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.7.0](https://github.com/googleapis/nodejs-logging/compare/v9.6.9...v9.7.0) (2022-02-18) + + +### Features + +* Update Logging API with latest changes ([5eddc7d](https://github.com/googleapis/nodejs-logging/commit/5eddc7d6efeb19bdd01eeba13505b8290763a790)) + ### [9.6.9](https://github.com/googleapis/nodejs-logging/compare/v9.6.8...v9.6.9) (2022-02-09) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3a97cd4ded2..3314c2951df 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.6.9", + "version": "9.7.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From bf7074ff1483eaad998b7af2b8a3766c0db34ba5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 15:21:49 -0800 Subject: [PATCH 0852/1029] feat: KMS configuration in settings (#1231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: KMS configuration in settings chore: formatting changes PiperOrigin-RevId: 430243637 Source-Link: https://github.com/googleapis/googleapis/commit/95da686e8840cf3edf872ce3d095967e24e41bf6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a1f056b7689ccbe5aebc0bfdd318e9945ee7602a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTFmMDU2Yjc2ODljY2JlNWFlYmMwYmZkZDMxOGU5OTQ1ZWU3NjAyYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../protos/google/logging/v2/log_entry.proto | 1 - .../protos/google/logging/v2/logging.proto | 7 +- .../google/logging/v2/logging_config.proto | 46 +- .../google/logging/v2/logging_metrics.proto | 2 - handwritten/logging/protos/protos.d.ts | 224 ++--- handwritten/logging/protos/protos.js | 796 +++++++++--------- handwritten/logging/protos/protos.json | 72 +- 7 files changed, 628 insertions(+), 520 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 23c9e3c525d..99712936989 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index bacc5d081ef..b7f4f189d2e 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -22,11 +22,8 @@ import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; import "google/logging/v2/log_entry.proto"; -import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option cc_enable_arenas = true; @@ -241,7 +238,9 @@ message WriteLogEntriesRequest { } // Result returned from WriteLogEntries. -message WriteLogEntriesResponse {} +message WriteLogEntriesResponse { + +} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index 63d604ab85a..ef0024063d7 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -21,7 +21,6 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -34,7 +33,6 @@ option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; option ruby_package = "Google::Cloud::Logging::V2"; - option (google.api.resource_definition) = { type: "logging.googleapis.com/OrganizationLocation" pattern: "organizations/{organization}/locations/{location}" @@ -47,6 +45,7 @@ option (google.api.resource_definition) = { type: "logging.googleapis.com/BillingAccountLocation" pattern: "billingAccounts/{billing_account}/locations/{location}" }; + // Service for configuring sinks used to route log entries. service ConfigServiceV2 { option (google.api.default_host) = "logging.googleapis.com"; @@ -1807,6 +1806,49 @@ message Settings { // Output only. The resource name of the settings. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. The resource name for the configured Cloud KMS key. + // + // KMS key name format: + // + // "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + // + // For example: + // + // `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + // + // + // + // To enable CMEK for the Log Router, set this field to a valid + // `kms_key_name` for which the associated service account has the required + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. + // + // The Cloud KMS key used by the Log Router can be updated by changing the + // `kms_key_name` to a new valid key name. Encryption operations that are in + // progress will be completed with the key that was in use when they started. + // Decryption operations will be completed using the key that was used at the + // time of encryption unless access to that key has been revoked. + // + // To disable CMEK for the Log Router, set this field to an empty string. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + string kms_key_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The service account that will be used by the Log Router to access your + // Cloud KMS key. + // + // Before enabling CMEK for Log Router, you must first assign the role + // `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that + // the Log Router will use to access your Cloud KMS key. Use + // [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to + // obtain the service account ID. + // + // See [Enabling CMEK for Log + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. + string kms_service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. The Cloud region that will be used for _Default and _Required log buckets // for newly created projects and folders. For example `europe-west1`. // This setting does not affect the location of custom log buckets. diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index db42aad92cf..9bbbc42bc9e 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -22,9 +22,7 @@ import "google/api/distribution.proto"; import "google/api/field_behavior.proto"; import "google/api/metric.proto"; import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index d62b60dc67b..7e8759f0799 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -10182,6 +10182,12 @@ export namespace google { /** Settings name */ name?: (string|null); + /** Settings kmsKeyName */ + kmsKeyName?: (string|null); + + /** Settings kmsServiceAccountId */ + kmsServiceAccountId?: (string|null); + /** Settings storageLocation */ storageLocation?: (string|null); @@ -10201,6 +10207,12 @@ export namespace google { /** Settings name. */ public name: string; + /** Settings kmsKeyName. */ + public kmsKeyName: string; + + /** Settings kmsServiceAccountId. */ + public kmsServiceAccountId: string; + /** Settings storageLocation. */ public storageLocation: string; @@ -13602,6 +13614,112 @@ export namespace google { } } + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** Namespace longrunning. */ namespace longrunning { @@ -14517,110 +14635,4 @@ export namespace google { public toJSON(): { [k: string]: any }; } } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } } diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 28cb13e9901..36135c3345d 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -25208,6 +25208,8 @@ * @memberof google.logging.v2 * @interface ISettings * @property {string|null} [name] Settings name + * @property {string|null} [kmsKeyName] Settings kmsKeyName + * @property {string|null} [kmsServiceAccountId] Settings kmsServiceAccountId * @property {string|null} [storageLocation] Settings storageLocation * @property {boolean|null} [disableDefaultSink] Settings disableDefaultSink */ @@ -25235,6 +25237,22 @@ */ Settings.prototype.name = ""; + /** + * Settings kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.logging.v2.Settings + * @instance + */ + Settings.prototype.kmsKeyName = ""; + + /** + * Settings kmsServiceAccountId. + * @member {string} kmsServiceAccountId + * @memberof google.logging.v2.Settings + * @instance + */ + Settings.prototype.kmsServiceAccountId = ""; + /** * Settings storageLocation. * @member {string} storageLocation @@ -25277,6 +25295,10 @@ writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.kmsServiceAccountId != null && Object.hasOwnProperty.call(message, "kmsServiceAccountId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsServiceAccountId); if (message.storageLocation != null && Object.hasOwnProperty.call(message, "storageLocation")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageLocation); if (message.disableDefaultSink != null && Object.hasOwnProperty.call(message, "disableDefaultSink")) @@ -25318,6 +25340,12 @@ case 1: message.name = reader.string(); break; + case 2: + message.kmsKeyName = reader.string(); + break; + case 3: + message.kmsServiceAccountId = reader.string(); + break; case 4: message.storageLocation = reader.string(); break; @@ -25362,6 +25390,12 @@ if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.kmsServiceAccountId != null && message.hasOwnProperty("kmsServiceAccountId")) + if (!$util.isString(message.kmsServiceAccountId)) + return "kmsServiceAccountId: string expected"; if (message.storageLocation != null && message.hasOwnProperty("storageLocation")) if (!$util.isString(message.storageLocation)) return "storageLocation: string expected"; @@ -25385,6 +25419,10 @@ var message = new $root.google.logging.v2.Settings(); if (object.name != null) message.name = String(object.name); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsServiceAccountId != null) + message.kmsServiceAccountId = String(object.kmsServiceAccountId); if (object.storageLocation != null) message.storageLocation = String(object.storageLocation); if (object.disableDefaultSink != null) @@ -25407,11 +25445,17 @@ var object = {}; if (options.defaults) { object.name = ""; + object.kmsKeyName = ""; + object.kmsServiceAccountId = ""; object.storageLocation = ""; object.disableDefaultSink = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.kmsServiceAccountId != null && message.hasOwnProperty("kmsServiceAccountId")) + object.kmsServiceAccountId = message.kmsServiceAccountId; if (message.storageLocation != null && message.hasOwnProperty("storageLocation")) object.storageLocation = message.storageLocation; if (message.disableDefaultSink != null && message.hasOwnProperty("disableDefaultSink")) @@ -33922,157 +33966,423 @@ return api; })(); - google.longrunning = (function() { + google.rpc = (function() { /** - * Namespace longrunning. + * Namespace rpc. * @memberof google * @namespace */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + var rpc = {}; - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + rpc.Status = (function() { /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); + Status.prototype.code = 0; /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations + * Status message. + * @member {string} message + * @memberof google.rpc.Status * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation */ + Status.prototype.message = ""; /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); + Status.prototype.details = $util.emptyArray; /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance */ + Status.create = function create(properties) { + return new Status(properties); + }; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CancelOperation. + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. * @function cancelOperation * @memberof google.longrunning.Operations * @instance @@ -35923,272 +36233,6 @@ return longrunning; })(); - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Status; - })(); - - return rpc; - })(); - return google; })(); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index f014786f9d6..a5530ace125 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -3483,6 +3483,20 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "kmsKeyName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsServiceAccountId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "storageLocation": { "type": "string", "id": 4, @@ -4421,6 +4435,35 @@ } } }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, "longrunning": { "options": { "cc_enable_arenas": true, @@ -4636,35 +4679,6 @@ } } } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } } } } From b97f723d2307740b7250f3060e122c7c8d0e4286 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:29:30 -0800 Subject: [PATCH 0853/1029] chore(main): release 9.8.0 (#1233) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 2400d00f344..7c57b479e5f 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.8.0](https://github.com/googleapis/nodejs-logging/compare/v9.7.0...v9.8.0) (2022-02-26) + + +### Features + +* KMS configuration in settings ([#1231](https://github.com/googleapis/nodejs-logging/issues/1231)) ([cf3b56f](https://github.com/googleapis/nodejs-logging/commit/cf3b56f5753e1a94b9e89d4714c6da657b875e42)) + ## [9.7.0](https://github.com/googleapis/nodejs-logging/compare/v9.6.9...v9.7.0) (2022-02-18) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3314c2951df..5e752ca9b60 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.7.0", + "version": "9.8.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 6ee93647239ab43cc1cfa0cff109745293cc3317 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 09:01:20 -0700 Subject: [PATCH 0854/1029] chore: update v2.14.2 gapic-generator-typescript (#1236) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update v2.14.2 gapic-generator-typescript Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test/gapic_config_service_v2_v2.ts | 21 ------------------- .../test/gapic_logging_service_v2_v2.ts | 1 - .../test/gapic_metrics_service_v2_v2.ts | 4 ---- 3 files changed, 26 deletions(-) diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 46fada9933e..53dbd2445e7 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -359,7 +359,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.GetBucketRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getBucket(request), expectedError); @@ -486,7 +485,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.CreateBucketRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createBucket(request), expectedError); @@ -613,7 +611,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.UpdateBucketRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateBucket(request), expectedError); @@ -740,7 +737,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.DeleteBucketRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteBucket(request), expectedError); @@ -867,7 +863,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.UndeleteBucketRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.undeleteBucket(request), expectedError); @@ -991,7 +986,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.GetViewRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getView(request), expectedError); @@ -1118,7 +1112,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.CreateViewRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createView(request), expectedError); @@ -1245,7 +1238,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.UpdateViewRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateView(request), expectedError); @@ -1372,7 +1364,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.DeleteViewRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteView(request), expectedError); @@ -1496,7 +1487,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.GetSinkRequest() ); request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getSink(request), expectedError); @@ -1623,7 +1613,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.CreateSinkRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createSink(request), expectedError); @@ -1750,7 +1739,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.UpdateSinkRequest() ); request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateSink(request), expectedError); @@ -1877,7 +1865,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.DeleteSinkRequest() ); request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteSink(request), expectedError); @@ -2004,7 +1991,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.GetExclusionRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getExclusion(request), expectedError); @@ -2131,7 +2117,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.CreateExclusionRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createExclusion(request), expectedError); @@ -2258,7 +2243,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.UpdateExclusionRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateExclusion(request), expectedError); @@ -2385,7 +2369,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.DeleteExclusionRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteExclusion(request), expectedError); @@ -2512,7 +2495,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.GetCmekSettingsRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCmekSettings(request), expectedError); @@ -2640,7 +2622,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.UpdateCmekSettingsRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateCmekSettings(request), expectedError); @@ -2767,7 +2748,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.GetSettingsRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getSettings(request), expectedError); @@ -2894,7 +2874,6 @@ describe('v2.ConfigServiceV2Client', () => { new protos.google.logging.v2.UpdateSettingsRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateSettings(request), expectedError); diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 3d1025fd949..99142c85db7 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -341,7 +341,6 @@ describe('v2.LoggingServiceV2Client', () => { new protos.google.logging.v2.DeleteLogRequest() ); request.logName = ''; - const expectedHeaderRequestParams = 'log_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteLog(request), expectedError); diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index b7b0c027e3f..874df85a57b 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -330,7 +330,6 @@ describe('v2.MetricsServiceV2Client', () => { new protos.google.logging.v2.GetLogMetricRequest() ); request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getLogMetric(request), expectedError); @@ -457,7 +456,6 @@ describe('v2.MetricsServiceV2Client', () => { new protos.google.logging.v2.CreateLogMetricRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createLogMetric(request), expectedError); @@ -584,7 +582,6 @@ describe('v2.MetricsServiceV2Client', () => { new protos.google.logging.v2.UpdateLogMetricRequest() ); request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateLogMetric(request), expectedError); @@ -711,7 +708,6 @@ describe('v2.MetricsServiceV2Client', () => { new protos.google.logging.v2.DeleteLogMetricRequest() ); request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteLogMetric(request), expectedError); From e792c40e4f809431fa75a2c3b0b3d2c76a0a4f36 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Tue, 29 Mar 2022 10:40:48 -0700 Subject: [PATCH 0855/1029] fix: Add installation step for @google-cloud/logging-min NPM package in README (#1239) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Add installation step for @google-cloud/logging-min NPM package in README The NPM page for `@google-cloud/logging-min` is the same as `@google-cloud/logging`. This can cause some confusion on what the difference are and how to install the correct package: `npm install @google-cloud/logging` vs `npm install @google-cloud/logging-min`. Fixes #[1126](https://github.com/googleapis/nodejs-logging/issues/1126). * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update .readme-partials.yml Add @google-cloud/logging-min installation instructions * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- handwritten/logging/.readme-partials.yml | 10 +++++++--- handwritten/logging/README.md | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index 75ff9822bf3..319708e8655 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -4,8 +4,12 @@ introduction: |- If you require lightweight dependencies, an experimental, minified version of this library is available at [@google-cloud/logging-min](https://www.npmjs.com/package/@google-cloud/logging-min). - Note: `logging-min` is experimental, and its feature surface is subject to - change. + Note: `logging-min` is experimental, and its feature surface is subject to change. + To install `@google-cloud/logging-min` library run the following command: + + ```bash + npm install @google-cloud/logging-min + ``` body: |- ## Batching Writes @@ -125,4 +129,4 @@ body: |- const log = logging.log('my-log', options); ``` - See the full sample in `writeLogWithCallback` function [here](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js). \ No newline at end of file + See the full sample in `writeLogWithCallback` function [here](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js). diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 69c51099eca..809aa3dc933 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -15,8 +15,12 @@ monitor, and alert on log data and events from Google Cloud Platform and Amazon If you require lightweight dependencies, an experimental, minified version of this library is available at [@google-cloud/logging-min](https://www.npmjs.com/package/@google-cloud/logging-min). -Note: `logging-min` is experimental, and its feature surface is subject to -change. +Note: `logging-min` is experimental, and its feature surface is subject to change. +To install `@google-cloud/logging-min` library run the following command: + +```bash +npm install @google-cloud/logging-min +``` A comprehensive list of changes in each version may be found in From abf82498cbcccca6f232b878bc97054144e3e209 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 09:11:40 -0700 Subject: [PATCH 0856/1029] chore(main): release 9.8.1 (#1240) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 7c57b479e5f..2acc045fe17 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.8.1](https://github.com/googleapis/nodejs-logging/compare/v9.8.0...v9.8.1) (2022-03-29) + + +### Bug Fixes + +* Add installation step for @google-cloud/logging-min NPM package in README ([#1239](https://github.com/googleapis/nodejs-logging/issues/1239)) ([f31e3ed](https://github.com/googleapis/nodejs-logging/commit/f31e3ede4d5765fea21e776e27236a2a349b0235)) + ## [9.8.0](https://github.com/googleapis/nodejs-logging/compare/v9.7.0...v9.8.0) (2022-02-26) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5e752ca9b60..a9a8ab25fb6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.8.0", + "version": "9.8.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From f94e01468dfda21630ba5b217c45de76d2a6843c Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Wed, 30 Mar 2022 15:34:09 -0700 Subject: [PATCH 0857/1029] fix: traceparent traceSampled parsing issue (#1241) --- handwritten/logging/src/utils/context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/src/utils/context.ts b/handwritten/logging/src/utils/context.ts index 9823ccebbe2..02352c0365c 100644 --- a/handwritten/logging/src/utils/context.ts +++ b/handwritten/logging/src/utils/context.ts @@ -231,6 +231,6 @@ export function parseTraceParentHeader( return { trace: match[2], spanId: match[3], - traceSampled: parseInt(match[4], 16) === 1, + traceSampled: (parseInt(match[4], 16) & 1) === 1, }; } From 804ef04cc1dd3dde8bf7f6ecfea199e35984a7b1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 19:49:19 -0700 Subject: [PATCH 0858/1029] chore(main): release 9.8.2 (#1242) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 2acc045fe17..7c3cf2d008c 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.8.2](https://github.com/googleapis/nodejs-logging/compare/v9.8.1...v9.8.2) (2022-03-30) + + +### Bug Fixes + +* traceparent traceSampled parsing issue ([#1241](https://github.com/googleapis/nodejs-logging/issues/1241)) ([0e0d86f](https://github.com/googleapis/nodejs-logging/commit/0e0d86f97b0cdab84aa0a5afaa7be148fa7f0403)) + ### [9.8.1](https://github.com/googleapis/nodejs-logging/compare/v9.8.0...v9.8.1) (2022-03-29) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a9a8ab25fb6..3d1d267f690 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.8.1", + "version": "9.8.2", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 186c3d5de22ec9bd97b899b4bc57a8364b991b15 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 18:16:33 +0000 Subject: [PATCH 0859/1029] chore: Enable Size-Label bot in all googleapis NodeJs repositories (#1382) (#1243) * chore: Enable Size-Label bot in all googleapis NodeJs repositories Auto-label T-shirt size indicator should be assigned on every new pull request in all googleapis NodeJs repositories * Remove product Remove product since it is by default true Source-Link: https://github.com/googleapis/synthtool/commit/f1562fa1c219d7176f79e3eea611b268c361e93d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:bb4d47d0e770abad62699a4664ce6b9ff1629d50c276a6c75860a6a1853dd19b --- handwritten/logging/.github/.OwlBot.lock.yaml | 3 ++- handwritten/logging/.github/auto-label.yaml | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 84059c19485..c6ddf44fb1c 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:a9d166a74752226923d159cb723df53429e226c9c076dad3ca52ffd073ff3bb4 + digest: sha256:bb4d47d0e770abad62699a4664ce6b9ff1629d50c276a6c75860a6a1853dd19b +# created: 2022-04-01T19:19:56.587347289Z diff --git a/handwritten/logging/.github/auto-label.yaml b/handwritten/logging/.github/auto-label.yaml index 1e4706499b3..09c8d735b45 100644 --- a/handwritten/logging/.github/auto-label.yaml +++ b/handwritten/logging/.github/auto-label.yaml @@ -1,7 +1,2 @@ -product: true requestsize: enabled: true -staleness: - pullrequest: true - old: 30 - extraold: 60 From 56de0130a18fd5bd9e6bf86a6c78e824bbb2b4d2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 15:38:29 +0000 Subject: [PATCH 0860/1029] chore(deps): update actions/setup-node action to v3 (#1393) (#1244) Co-authored-by: Jeffrey Rennie Source-Link: https://github.com/googleapis/synthtool/commit/6593fb2234deff0444032cb2a91100bde4985caf Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:1d25dfefd805b689a2a2356d35a25b13f2f67bcce55400246432c43a42e96214 --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index c6ddf44fb1c..ba38c131eba 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:bb4d47d0e770abad62699a4664ce6b9ff1629d50c276a6c75860a6a1853dd19b -# created: 2022-04-01T19:19:56.587347289Z + digest: sha256:1d25dfefd805b689a2a2356d35a25b13f2f67bcce55400246432c43a42e96214 +# created: 2022-04-05T22:42:50.409517925Z From 85bfc341f9f0eac8bafff47a3a92bf8311673367 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 13:12:34 -0700 Subject: [PATCH 0861/1029] Revert "fix: clarify the gax-nodejs usage in README (#1352)" (#1409) (#1248) This reverts commit e1557e468fd986c952ba718d9ff90e1d87390209. Source-Link: https://github.com/googleapis/synthtool/commit/8a475dc2f35b6ee6789d7f98f6ae96bb6f5e286e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ba0957cb15a1b8ca7ec2795c7783cd09cb68be2de9f4a7c69aa15b759c622735 Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index ba38c131eba..ffe9fbc7fc9 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:1d25dfefd805b689a2a2356d35a25b13f2f67bcce55400246432c43a42e96214 -# created: 2022-04-05T22:42:50.409517925Z + digest: sha256:ba0957cb15a1b8ca7ec2795c7783cd09cb68be2de9f4a7c69aa15b759c622735 +# created: 2022-04-07T18:11:58.093823589Z From 251af9a005cef8dfc53518c1f31a947d65f32ba5 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Thu, 14 Apr 2022 18:22:36 -0500 Subject: [PATCH 0862/1029] fix: Reenable staleness bot (#1249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Reenable staleness bot Reenable staleness bot on the repo * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update owlbot.py * Update auto-label.yaml Co-authored-by: Owl Bot --- handwritten/logging/.github/auto-label.yaml | 17 +++++++++++++++++ handwritten/logging/owlbot.py | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.github/auto-label.yaml b/handwritten/logging/.github/auto-label.yaml index 09c8d735b45..ccad49b4ebf 100644 --- a/handwritten/logging/.github/auto-label.yaml +++ b/handwritten/logging/.github/auto-label.yaml @@ -1,2 +1,19 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. requestsize: enabled: true +staleness: + pullrequest: true + old: 30 + extraold: 60 diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index 86b7a5bfb65..5d06615bcb8 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -26,7 +26,8 @@ "src/index.ts", ".eslintignore", ".prettierignore", - "CONTRIBUTING.md" + "CONTRIBUTING.md", + ".github/auto-label.yaml" ] ) From 888586e0716ff2069073c8f2f042bdaf55794afe Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 16:40:35 -0700 Subject: [PATCH 0863/1029] chore(main): release 9.8.3 (#1252) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 7c3cf2d008c..77db29990e2 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [9.8.3](https://github.com/googleapis/nodejs-logging/compare/v9.8.2...v9.8.3) (2022-04-14) + + +### Bug Fixes + +* Reenable staleness bot ([#1249](https://github.com/googleapis/nodejs-logging/issues/1249)) ([3d29fc8](https://github.com/googleapis/nodejs-logging/commit/3d29fc8ba8106614ac372d86add10e068a67e426)) + ### [9.8.2](https://github.com/googleapis/nodejs-logging/compare/v9.8.1...v9.8.2) (2022-03-30) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3d1d267f690..6068274c0e9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.8.2", + "version": "9.8.3", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", From 65820202544b44978210e6ac306a7e42db6f1c84 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 02:36:16 +0000 Subject: [PATCH 0864/1029] build(node): update client library version in samples metadata (#1356) (#1256) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 +- .../logging/.github/sync-repo-settings.yaml | 17 + handwritten/logging/.kokoro/common.cfg | 2 +- handwritten/logging/.kokoro/release/docs.cfg | 2 +- handwritten/logging/.kokoro/samples-test.sh | 2 +- handwritten/logging/.kokoro/system-test.sh | 2 +- handwritten/logging/.kokoro/test.sh | 2 +- .../snippet_metadata.google.logging.v2.json | 3232 ++++++++--------- 8 files changed, 1640 insertions(+), 1623 deletions(-) create mode 100644 handwritten/logging/.github/sync-repo-settings.yaml diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index ffe9fbc7fc9..9017db80d17 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:ba0957cb15a1b8ca7ec2795c7783cd09cb68be2de9f4a7c69aa15b759c622735 -# created: 2022-04-07T18:11:58.093823589Z + digest: sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 +# created: 2022-04-20T16:59:29.058398639Z diff --git a/handwritten/logging/.github/sync-repo-settings.yaml b/handwritten/logging/.github/sync-repo-settings.yaml new file mode 100644 index 00000000000..1b36268333a --- /dev/null +++ b/handwritten/logging/.github/sync-repo-settings.yaml @@ -0,0 +1,17 @@ +branchProtectionRules: + - pattern: main + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - "ci/kokoro: Samples test" + - "ci/kokoro: System test" + - docs + - lint + - test (10) + - test (12) + - test (14) + - cla/google + - windows + - OwlBot Post Processor diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index c87725f3b79..0d3d29bcccd 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/release/docs.cfg b/handwritten/logging/.kokoro/release/docs.cfg index 4b7e691eddb..64f051aa19c 100644 --- a/handwritten/logging/.kokoro/release/docs.cfg +++ b/handwritten/logging/.kokoro/release/docs.cfg @@ -11,7 +11,7 @@ before_action { # doc publications use a Python image. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" } # Download trampoline resources. diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index f249d3e4a2e..fbc058a4ec4 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -56,7 +56,7 @@ fi # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=10 +COVERAGE_NODE=12 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index 0a840452084..87fa0653d76 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -49,7 +49,7 @@ npm run system-test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=10 +COVERAGE_NODE=12 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index af1ce7e33ca..a5c7ac04cd3 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -39,7 +39,7 @@ npm test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=10 +COVERAGE_NODE=12 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index b22f80d2a1f..a7bf6ba8881 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,1691 +1,1691 @@ { - "clientLibrary": { - "name": "nodejs-logging", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.logging.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "logging_v2_generated_ConfigServiceV2_ListBuckets_async", - "title": "logging listBuckets Sample", - "origin": "API_DEFINITION", - "description": " Lists log buckets.", - "canonical": true, - "file": "config_service_v2.list_buckets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBuckets", - "fullName": "google.logging.v2.ConfigServiceV2.ListBuckets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.logging.v2.ListBucketsResponse", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" - }, - "method": { - "shortName": "ListBuckets", - "fullName": "google.logging.v2.ConfigServiceV2.ListBuckets", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } + "clientLibrary": { + "name": "nodejs-logging", + "version": "9.8.3", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.logging.v2", + "version": "v2" + } + ] }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_GetBucket_async", - "title": "logging getBucket Sample", - "origin": "API_DEFINITION", - "description": " Gets a log bucket.", - "canonical": true, - "file": "config_service_v2.get_bucket.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBucket", - "fullName": "google.logging.v2.ConfigServiceV2.GetBucket", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.LogBucket", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_ListBuckets_async", + "title": "logging listBuckets Sample", + "origin": "API_DEFINITION", + "description": " Lists log buckets.", + "canonical": true, + "file": "config_service_v2.list_buckets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBuckets", + "fullName": "google.logging.v2.ConfigServiceV2.ListBuckets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListBucketsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListBuckets", + "fullName": "google.logging.v2.ConfigServiceV2.ListBuckets", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "GetBucket", - "fullName": "google.logging.v2.ConfigServiceV2.GetBucket", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_CreateBucket_async", - "title": "logging createBucket Sample", - "origin": "API_DEFINITION", - "description": " Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.", - "canonical": true, - "file": "config_service_v2.create_bucket.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBucket", - "fullName": "google.logging.v2.ConfigServiceV2.CreateBucket", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "bucket_id", - "type": "TYPE_STRING" - }, - { - "name": "bucket", - "type": ".google.logging.v2.LogBucket" - } - ], - "resultType": ".google.logging.v2.LogBucket", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_GetBucket_async", + "title": "logging getBucket Sample", + "origin": "API_DEFINITION", + "description": " Gets a log bucket.", + "canonical": true, + "file": "config_service_v2.get_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBucket", + "fullName": "google.logging.v2.ConfigServiceV2.GetBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetBucket", + "fullName": "google.logging.v2.ConfigServiceV2.GetBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "CreateBucket", - "fullName": "google.logging.v2.ConfigServiceV2.CreateBucket", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateBucket_async", - "title": "logging updateBucket Sample", - "origin": "API_DEFINITION", - "description": " Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: `retention_period` If the retention period is decreased and the bucket is locked, `FAILED_PRECONDITION` will be returned. If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be returned. After a bucket has been created, the bucket's location cannot be changed.", - "canonical": true, - "file": "config_service_v2.update_bucket.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBucket", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucket", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "bucket", - "type": ".google.logging.v2.LogBucket" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.logging.v2.LogBucket", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateBucket_async", + "title": "logging createBucket Sample", + "origin": "API_DEFINITION", + "description": " Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.create_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucket", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "bucket_id", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "UpdateBucket", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucket", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteBucket_async", - "title": "logging deleteBucket Sample", - "origin": "API_DEFINITION", - "description": " Deletes a log bucket. Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.", - "canonical": true, - "file": "config_service_v2.delete_bucket.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBucket", - "fullName": "google.logging.v2.ConfigServiceV2.DeleteBucket", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateBucket_async", + "title": "logging updateBucket Sample", + "origin": "API_DEFINITION", + "description": " Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: `retention_period` If the retention period is decreased and the bucket is locked, `FAILED_PRECONDITION` will be returned. If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be returned. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.update_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "DeleteBucket", - "fullName": "google.logging.v2.ConfigServiceV2.DeleteBucket", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_UndeleteBucket_async", - "title": "logging undeleteBucket Sample", - "origin": "API_DEFINITION", - "description": " Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.", - "canonical": true, - "file": "config_service_v2.undelete_bucket.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeleteBucket", - "fullName": "google.logging.v2.ConfigServiceV2.UndeleteBucket", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteBucket_async", + "title": "logging deleteBucket Sample", + "origin": "API_DEFINITION", + "description": " Deletes a log bucket. Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.", + "canonical": true, + "file": "config_service_v2.delete_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "UndeleteBucket", - "fullName": "google.logging.v2.ConfigServiceV2.UndeleteBucket", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_ListViews_async", - "title": "logging listViews Sample", - "origin": "API_DEFINITION", - "description": " Lists views on a log bucket.", - "canonical": true, - "file": "config_service_v2.list_views.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListViews", - "fullName": "google.logging.v2.ConfigServiceV2.ListViews", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.logging.v2.ListViewsResponse", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_UndeleteBucket_async", + "title": "logging undeleteBucket Sample", + "origin": "API_DEFINITION", + "description": " Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.", + "canonical": true, + "file": "config_service_v2.undelete_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UndeleteBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UndeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UndeleteBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "ListViews", - "fullName": "google.logging.v2.ConfigServiceV2.ListViews", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_GetView_async", - "title": "logging getView Sample", - "origin": "API_DEFINITION", - "description": " Gets a view on a log bucket..", - "canonical": true, - "file": "config_service_v2.get_view.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetView", - "fullName": "google.logging.v2.ConfigServiceV2.GetView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.LogView", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_ListViews_async", + "title": "logging listViews Sample", + "origin": "API_DEFINITION", + "description": " Lists views on a log bucket.", + "canonical": true, + "file": "config_service_v2.list_views.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListViews", + "fullName": "google.logging.v2.ConfigServiceV2.ListViews", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListViewsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListViews", + "fullName": "google.logging.v2.ConfigServiceV2.ListViews", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "GetView", - "fullName": "google.logging.v2.ConfigServiceV2.GetView", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_CreateView_async", - "title": "logging createView Sample", - "origin": "API_DEFINITION", - "description": " Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.", - "canonical": true, - "file": "config_service_v2.create_view.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateView", - "fullName": "google.logging.v2.ConfigServiceV2.CreateView", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "view_id", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.logging.v2.LogView" - } - ], - "resultType": ".google.logging.v2.LogView", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_GetView_async", + "title": "logging getView Sample", + "origin": "API_DEFINITION", + "description": " Gets a view on a log bucket..", + "canonical": true, + "file": "config_service_v2.get_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetView", + "fullName": "google.logging.v2.ConfigServiceV2.GetView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetView", + "fullName": "google.logging.v2.ConfigServiceV2.GetView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "CreateView", - "fullName": "google.logging.v2.ConfigServiceV2.CreateView", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateView_async", - "title": "logging updateView Sample", - "origin": "API_DEFINITION", - "description": " Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: `filter`. If an `UNAVAILABLE` error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.", - "canonical": true, - "file": "config_service_v2.update_view.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateView", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.logging.v2.LogView" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.logging.v2.LogView", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateView_async", + "title": "logging createView Sample", + "origin": "API_DEFINITION", + "description": " Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.", + "canonical": true, + "file": "config_service_v2.create_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateView", + "fullName": "google.logging.v2.ConfigServiceV2.CreateView", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view_id", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.logging.v2.LogView" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateView", + "fullName": "google.logging.v2.ConfigServiceV2.CreateView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "UpdateView", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateView", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteView_async", - "title": "logging deleteView Sample", - "origin": "API_DEFINITION", - "description": " Deletes a view on a log bucket. If an `UNAVAILABLE` error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes.", - "canonical": true, - "file": "config_service_v2.delete_view.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteView", - "fullName": "google.logging.v2.ConfigServiceV2.DeleteView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateView_async", + "title": "logging updateView Sample", + "origin": "API_DEFINITION", + "description": " Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: `filter`. If an `UNAVAILABLE` error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.", + "canonical": true, + "file": "config_service_v2.update_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateView", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.logging.v2.LogView" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateView", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "DeleteView", - "fullName": "google.logging.v2.ConfigServiceV2.DeleteView", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_ListSinks_async", - "title": "logging listSinks Sample", - "origin": "API_DEFINITION", - "description": " Lists sinks.", - "canonical": true, - "file": "config_service_v2.list_sinks.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSinks", - "fullName": "google.logging.v2.ConfigServiceV2.ListSinks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.logging.v2.ListSinksResponse", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteView_async", + "title": "logging deleteView Sample", + "origin": "API_DEFINITION", + "description": " Deletes a view on a log bucket. If an `UNAVAILABLE` error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes.", + "canonical": true, + "file": "config_service_v2.delete_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteView", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteView", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "ListSinks", - "fullName": "google.logging.v2.ConfigServiceV2.ListSinks", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_GetSink_async", - "title": "logging getSink Sample", - "origin": "API_DEFINITION", - "description": " Gets a sink.", - "canonical": true, - "file": "config_service_v2.get_sink.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSink", - "fullName": "google.logging.v2.ConfigServiceV2.GetSink", - "async": true, - "parameters": [ - { - "name": "sink_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.LogSink", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_ListSinks_async", + "title": "logging listSinks Sample", + "origin": "API_DEFINITION", + "description": " Lists sinks.", + "canonical": true, + "file": "config_service_v2.list_sinks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListSinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListSinksResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListSinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListSinks", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "GetSink", - "fullName": "google.logging.v2.ConfigServiceV2.GetSink", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_CreateSink_async", - "title": "logging createSink Sample", - "origin": "API_DEFINITION", - "description": " Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless 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.", - "canonical": true, - "file": "config_service_v2.create_sink.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateSink", - "fullName": "google.logging.v2.ConfigServiceV2.CreateSink", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "sink", - "type": ".google.logging.v2.LogSink" - }, - { - "name": "unique_writer_identity", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.logging.v2.LogSink", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_GetSink_async", + "title": "logging getSink Sample", + "origin": "API_DEFINITION", + "description": " Gets a sink.", + "canonical": true, + "file": "config_service_v2.get_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSink", + "fullName": "google.logging.v2.ConfigServiceV2.GetSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetSink", + "fullName": "google.logging.v2.ConfigServiceV2.GetSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "CreateSink", - "fullName": "google.logging.v2.ConfigServiceV2.CreateSink", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateSink_async", - "title": "logging updateSink Sample", - "origin": "API_DEFINITION", - "description": " Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: `destination`, and `filter`. The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` field.", - "canonical": true, - "file": "config_service_v2.update_sink.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateSink", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateSink", - "async": true, - "parameters": [ - { - "name": "sink_name", - "type": "TYPE_STRING" - }, - { - "name": "sink", - "type": ".google.logging.v2.LogSink" - }, - { - "name": "unique_writer_identity", - "type": "TYPE_BOOL" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.logging.v2.LogSink", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateSink_async", + "title": "logging createSink Sample", + "origin": "API_DEFINITION", + "description": " Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless 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.", + "canonical": true, + "file": "config_service_v2.create_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateSink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "sink", + "type": ".google.logging.v2.LogSink" + }, + { + "name": "unique_writer_identity", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateSink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "UpdateSink", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateSink", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteSink_async", - "title": "logging deleteSink Sample", - "origin": "API_DEFINITION", - "description": " Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted.", - "canonical": true, - "file": "config_service_v2.delete_sink.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteSink", - "fullName": "google.logging.v2.ConfigServiceV2.DeleteSink", - "async": true, - "parameters": [ - { - "name": "sink_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateSink_async", + "title": "logging updateSink Sample", + "origin": "API_DEFINITION", + "description": " Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: `destination`, and `filter`. The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` field.", + "canonical": true, + "file": "config_service_v2.update_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSink", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + }, + { + "name": "sink", + "type": ".google.logging.v2.LogSink" + }, + { + "name": "unique_writer_identity", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateSink", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "DeleteSink", - "fullName": "google.logging.v2.ConfigServiceV2.DeleteSink", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_ListExclusions_async", - "title": "logging listExclusions Sample", - "origin": "API_DEFINITION", - "description": " Lists all the exclusions on the _Default sink in a parent resource.", - "canonical": true, - "file": "config_service_v2.list_exclusions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListExclusions", - "fullName": "google.logging.v2.ConfigServiceV2.ListExclusions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.logging.v2.ListExclusionsResponse", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteSink_async", + "title": "logging deleteSink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted.", + "canonical": true, + "file": "config_service_v2.delete_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteSink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "ListExclusions", - "fullName": "google.logging.v2.ConfigServiceV2.ListExclusions", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_GetExclusion_async", - "title": "logging getExclusion Sample", - "origin": "API_DEFINITION", - "description": " Gets the description of an exclusion in the _Default sink.", - "canonical": true, - "file": "config_service_v2.get_exclusion.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetExclusion", - "fullName": "google.logging.v2.ConfigServiceV2.GetExclusion", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.LogExclusion", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_ListExclusions_async", + "title": "logging listExclusions Sample", + "origin": "API_DEFINITION", + "description": " Lists all the exclusions on the _Default sink in a parent resource.", + "canonical": true, + "file": "config_service_v2.list_exclusions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListExclusions", + "fullName": "google.logging.v2.ConfigServiceV2.ListExclusions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListExclusionsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListExclusions", + "fullName": "google.logging.v2.ConfigServiceV2.ListExclusions", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "GetExclusion", - "fullName": "google.logging.v2.ConfigServiceV2.GetExclusion", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_CreateExclusion_async", - "title": "logging createExclusion Sample", - "origin": "API_DEFINITION", - "description": " Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", - "canonical": true, - "file": "config_service_v2.create_exclusion.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateExclusion", - "fullName": "google.logging.v2.ConfigServiceV2.CreateExclusion", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "exclusion", - "type": ".google.logging.v2.LogExclusion" - } - ], - "resultType": ".google.logging.v2.LogExclusion", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_GetExclusion_async", + "title": "logging getExclusion Sample", + "origin": "API_DEFINITION", + "description": " Gets the description of an exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.get_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.GetExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.GetExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "CreateExclusion", - "fullName": "google.logging.v2.ConfigServiceV2.CreateExclusion", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateExclusion_async", - "title": "logging updateExclusion Sample", - "origin": "API_DEFINITION", - "description": " Changes one or more properties of an existing exclusion in the _Default sink.", - "canonical": true, - "file": "config_service_v2.update_exclusion.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateExclusion", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateExclusion", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "exclusion", - "type": ".google.logging.v2.LogExclusion" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.logging.v2.LogExclusion", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateExclusion_async", + "title": "logging createExclusion Sample", + "origin": "API_DEFINITION", + "description": " Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + "canonical": true, + "file": "config_service_v2.create_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.CreateExclusion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "exclusion", + "type": ".google.logging.v2.LogExclusion" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.CreateExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "UpdateExclusion", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateExclusion", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteExclusion_async", - "title": "logging deleteExclusion Sample", - "origin": "API_DEFINITION", - "description": " Deletes an exclusion in the _Default sink.", - "canonical": true, - "file": "config_service_v2.delete_exclusion.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteExclusion", - "fullName": "google.logging.v2.ConfigServiceV2.DeleteExclusion", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateExclusion_async", + "title": "logging updateExclusion Sample", + "origin": "API_DEFINITION", + "description": " Changes one or more properties of an existing exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.update_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "exclusion", + "type": ".google.logging.v2.LogExclusion" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "DeleteExclusion", - "fullName": "google.logging.v2.ConfigServiceV2.DeleteExclusion", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_GetCmekSettings_async", - "title": "logging getCmekSettings Sample", - "origin": "API_DEFINITION", - "description": " Gets the Logging CMEK settings for the given resource. Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", - "canonical": true, - "file": "config_service_v2.get_cmek_settings.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCmekSettings", - "fullName": "google.logging.v2.ConfigServiceV2.GetCmekSettings", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.CmekSettings", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteExclusion_async", + "title": "logging deleteExclusion Sample", + "origin": "API_DEFINITION", + "description": " Deletes an exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.delete_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "GetCmekSettings", - "fullName": "google.logging.v2.ConfigServiceV2.GetCmekSettings", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async", - "title": "logging updateCmekSettings Sample", - "origin": "API_DEFINITION", - "description": " Updates the Log Router CMEK settings for the given resource. Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key is disabled. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", - "canonical": true, - "file": "config_service_v2.update_cmek_settings.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCmekSettings", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateCmekSettings", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "cmek_settings", - "type": ".google.logging.v2.CmekSettings" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.logging.v2.CmekSettings", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_GetCmekSettings_async", + "title": "logging getCmekSettings Sample", + "origin": "API_DEFINITION", + "description": " Gets the Logging CMEK settings for the given resource. Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.get_cmek_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetCmekSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.CmekSettings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetCmekSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "UpdateCmekSettings", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateCmekSettings", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_GetSettings_async", - "title": "logging getSettings Sample", - "origin": "API_DEFINITION", - "description": " Gets the Log Router settings for the given resource. Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", - "canonical": true, - "file": "config_service_v2.get_settings.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSettings", - "fullName": "google.logging.v2.ConfigServiceV2.GetSettings", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.Settings", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async", + "title": "logging updateCmekSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the Log Router CMEK settings for the given resource. Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key is disabled. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.update_cmek_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateCmekSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "cmek_settings", + "type": ".google.logging.v2.CmekSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.CmekSettings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateCmekSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "GetSettings", - "fullName": "google.logging.v2.ConfigServiceV2.GetSettings", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateSettings_async", - "title": "logging updateSettings Sample", - "origin": "API_DEFINITION", - "description": " Updates the Log Router settings for the given resource. Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key is disabled. 4) `location_id` is not supported by Logging. 5) `location_id` violate OrgPolicy. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", - "canonical": true, - "file": "config_service_v2.update_settings.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateSettings", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateSettings", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "settings", - "type": ".google.logging.v2.Settings" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.logging.v2.Settings", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_GetSettings_async", + "title": "logging getSettings Sample", + "origin": "API_DEFINITION", + "description": " Gets the Log Router settings for the given resource. Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.get_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.Settings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "UpdateSettings", - "fullName": "google.logging.v2.ConfigServiceV2.UpdateSettings", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_ConfigServiceV2_CopyLogEntries_async", - "title": "logging copyLogEntries Sample", - "origin": "API_DEFINITION", - "description": " Copies a set of log entries from a log bucket to a Cloud Storage bucket.", - "canonical": true, - "file": "config_service_v2.copy_log_entries.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CopyLogEntries", - "fullName": "google.logging.v2.ConfigServiceV2.CopyLogEntries", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "destination", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigServiceV2Client", - "fullName": "google.logging.v2.ConfigServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateSettings_async", + "title": "logging updateSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the Log Router settings for the given resource. Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key is disabled. 4) `location_id` is not supported by Logging. 5) `location_id` violate OrgPolicy. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.update_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "settings", + "type": ".google.logging.v2.Settings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.Settings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "CopyLogEntries", - "fullName": "google.logging.v2.ConfigServiceV2.CopyLogEntries", - "service": { - "shortName": "ConfigServiceV2", - "fullName": "google.logging.v2.ConfigServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_LoggingServiceV2_DeleteLog_async", - "title": "logging deleteLog Sample", - "origin": "API_DEFINITION", - "description": " Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.", - "canonical": true, - "file": "logging_service_v2.delete_log.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteLog", - "fullName": "google.logging.v2.LoggingServiceV2.DeleteLog", - "async": true, - "parameters": [ - { - "name": "log_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "LoggingServiceV2Client", - "fullName": "google.logging.v2.LoggingServiceV2Client" + "regionTag": "logging_v2_generated_ConfigServiceV2_CopyLogEntries_async", + "title": "logging copyLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Copies a set of log entries from a log bucket to a Cloud Storage bucket.", + "canonical": true, + "file": "config_service_v2.copy_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CopyLogEntries", + "fullName": "google.logging.v2.ConfigServiceV2.CopyLogEntries", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "destination", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CopyLogEntries", + "fullName": "google.logging.v2.ConfigServiceV2.CopyLogEntries", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } }, - "method": { - "shortName": "DeleteLog", - "fullName": "google.logging.v2.LoggingServiceV2.DeleteLog", - "service": { - "shortName": "LoggingServiceV2", - "fullName": "google.logging.v2.LoggingServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_LoggingServiceV2_WriteLogEntries_async", - "title": "logging writeLogEntries Sample", - "origin": "API_DEFINITION", - "description": " Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)", - "canonical": true, - "file": "logging_service_v2.write_log_entries.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 116, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "WriteLogEntries", - "fullName": "google.logging.v2.LoggingServiceV2.WriteLogEntries", - "async": true, - "parameters": [ - { - "name": "log_name", - "type": "TYPE_STRING" - }, - { - "name": "resource", - "type": ".google.api.MonitoredResource" - }, - { - "name": "labels", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "entries", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "partial_success", - "type": "TYPE_BOOL" - }, - { - "name": "dry_run", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.logging.v2.WriteLogEntriesResponse", - "client": { - "shortName": "LoggingServiceV2Client", - "fullName": "google.logging.v2.LoggingServiceV2Client" + "regionTag": "logging_v2_generated_LoggingServiceV2_DeleteLog_async", + "title": "logging deleteLog Sample", + "origin": "API_DEFINITION", + "description": " Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.", + "canonical": true, + "file": "logging_service_v2.delete_log.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLog", + "fullName": "google.logging.v2.LoggingServiceV2.DeleteLog", + "async": true, + "parameters": [ + { + "name": "log_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "DeleteLog", + "fullName": "google.logging.v2.LoggingServiceV2.DeleteLog", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } }, - "method": { - "shortName": "WriteLogEntries", - "fullName": "google.logging.v2.LoggingServiceV2.WriteLogEntries", - "service": { - "shortName": "LoggingServiceV2", - "fullName": "google.logging.v2.LoggingServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_LoggingServiceV2_ListLogEntries_async", - "title": "logging listLogEntries Sample", - "origin": "API_DEFINITION", - "description": " Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export).", - "canonical": true, - "file": "logging_service_v2.list_log_entries.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 96, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLogEntries", - "fullName": "google.logging.v2.LoggingServiceV2.ListLogEntries", - "async": true, - "parameters": [ - { - "name": "resource_names", - "type": "TYPE_STRING[]" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.ListLogEntriesResponse", - "client": { - "shortName": "LoggingServiceV2Client", - "fullName": "google.logging.v2.LoggingServiceV2Client" + "regionTag": "logging_v2_generated_LoggingServiceV2_WriteLogEntries_async", + "title": "logging writeLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)", + "canonical": true, + "file": "logging_service_v2.write_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 116, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "WriteLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.WriteLogEntries", + "async": true, + "parameters": [ + { + "name": "log_name", + "type": "TYPE_STRING" + }, + { + "name": "resource", + "type": ".google.api.MonitoredResource" + }, + { + "name": "labels", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "entries", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "partial_success", + "type": "TYPE_BOOL" + }, + { + "name": "dry_run", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.logging.v2.WriteLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "WriteLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.WriteLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } }, - "method": { - "shortName": "ListLogEntries", - "fullName": "google.logging.v2.LoggingServiceV2.ListLogEntries", - "service": { - "shortName": "LoggingServiceV2", - "fullName": "google.logging.v2.LoggingServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async", - "title": "logging listMonitoredResourceDescriptors Sample", - "origin": "API_DEFINITION", - "description": " Lists the descriptors for monitored resource types used by Logging.", - "canonical": true, - "file": "logging_service_v2.list_monitored_resource_descriptors.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMonitoredResourceDescriptors", - "fullName": "google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", - "async": true, - "parameters": [ - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.ListMonitoredResourceDescriptorsResponse", - "client": { - "shortName": "LoggingServiceV2Client", - "fullName": "google.logging.v2.LoggingServiceV2Client" + "regionTag": "logging_v2_generated_LoggingServiceV2_ListLogEntries_async", + "title": "logging listLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export).", + "canonical": true, + "file": "logging_service_v2.list_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 96, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogEntries", + "async": true, + "parameters": [ + { + "name": "resource_names", + "type": "TYPE_STRING[]" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.ListLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } }, - "method": { - "shortName": "ListMonitoredResourceDescriptors", - "fullName": "google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", - "service": { - "shortName": "LoggingServiceV2", - "fullName": "google.logging.v2.LoggingServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_LoggingServiceV2_ListLogs_async", - "title": "logging listLogs Sample", - "origin": "API_DEFINITION", - "description": " Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", - "canonical": true, - "file": "logging_service_v2.list_logs.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLogs", - "fullName": "google.logging.v2.LoggingServiceV2.ListLogs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "resource_names", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.logging.v2.ListLogsResponse", - "client": { - "shortName": "LoggingServiceV2Client", - "fullName": "google.logging.v2.LoggingServiceV2Client" + "regionTag": "logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async", + "title": "logging listMonitoredResourceDescriptors Sample", + "origin": "API_DEFINITION", + "description": " Lists the descriptors for monitored resource types used by Logging.", + "canonical": true, + "file": "logging_service_v2.list_monitored_resource_descriptors.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMonitoredResourceDescriptors", + "fullName": "google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", + "async": true, + "parameters": [ + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.ListMonitoredResourceDescriptorsResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListMonitoredResourceDescriptors", + "fullName": "google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } }, - "method": { - "shortName": "ListLogs", - "fullName": "google.logging.v2.LoggingServiceV2.ListLogs", - "service": { - "shortName": "LoggingServiceV2", - "fullName": "google.logging.v2.LoggingServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_LoggingServiceV2_TailLogEntries_async", - "title": "logging tailLogEntries Sample", - "origin": "API_DEFINITION", - "description": " Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.", - "canonical": true, - "file": "logging_service_v2.tail_log_entries.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TailLogEntries", - "fullName": "google.logging.v2.LoggingServiceV2.TailLogEntries", - "async": true, - "parameters": [ - { - "name": "resource_names", - "type": "TYPE_STRING[]" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "buffer_window", - "type": ".google.protobuf.Duration" - } - ], - "resultType": ".google.logging.v2.TailLogEntriesResponse", - "client": { - "shortName": "LoggingServiceV2Client", - "fullName": "google.logging.v2.LoggingServiceV2Client" + "regionTag": "logging_v2_generated_LoggingServiceV2_ListLogs_async", + "title": "logging listLogs Sample", + "origin": "API_DEFINITION", + "description": " Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "canonical": true, + "file": "logging_service_v2.list_logs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogs", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "resource_names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.logging.v2.ListLogsResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListLogs", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogs", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } }, - "method": { - "shortName": "TailLogEntries", - "fullName": "google.logging.v2.LoggingServiceV2.TailLogEntries", - "service": { - "shortName": "LoggingServiceV2", - "fullName": "google.logging.v2.LoggingServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_MetricsServiceV2_ListLogMetrics_async", - "title": "logging listLogMetrics Sample", - "origin": "API_DEFINITION", - "description": " Lists logs-based metrics.", - "canonical": true, - "file": "metrics_service_v2.list_log_metrics.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLogMetrics", - "fullName": "google.logging.v2.MetricsServiceV2.ListLogMetrics", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.logging.v2.ListLogMetricsResponse", - "client": { - "shortName": "MetricsServiceV2Client", - "fullName": "google.logging.v2.MetricsServiceV2Client" + "regionTag": "logging_v2_generated_LoggingServiceV2_TailLogEntries_async", + "title": "logging tailLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.", + "canonical": true, + "file": "logging_service_v2.tail_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TailLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.TailLogEntries", + "async": true, + "parameters": [ + { + "name": "resource_names", + "type": "TYPE_STRING[]" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "buffer_window", + "type": ".google.protobuf.Duration" + } + ], + "resultType": ".google.logging.v2.TailLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "TailLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.TailLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } }, - "method": { - "shortName": "ListLogMetrics", - "fullName": "google.logging.v2.MetricsServiceV2.ListLogMetrics", - "service": { - "shortName": "MetricsServiceV2", - "fullName": "google.logging.v2.MetricsServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_MetricsServiceV2_GetLogMetric_async", - "title": "logging getLogMetric Sample", - "origin": "API_DEFINITION", - "description": " Gets a logs-based metric.", - "canonical": true, - "file": "metrics_service_v2.get_log_metric.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetLogMetric", - "fullName": "google.logging.v2.MetricsServiceV2.GetLogMetric", - "async": true, - "parameters": [ - { - "name": "metric_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.logging.v2.LogMetric", - "client": { - "shortName": "MetricsServiceV2Client", - "fullName": "google.logging.v2.MetricsServiceV2Client" + "regionTag": "logging_v2_generated_MetricsServiceV2_ListLogMetrics_async", + "title": "logging listLogMetrics Sample", + "origin": "API_DEFINITION", + "description": " Lists logs-based metrics.", + "canonical": true, + "file": "metrics_service_v2.list_log_metrics.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogMetrics", + "fullName": "google.logging.v2.MetricsServiceV2.ListLogMetrics", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListLogMetricsResponse", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "ListLogMetrics", + "fullName": "google.logging.v2.MetricsServiceV2.ListLogMetrics", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } }, - "method": { - "shortName": "GetLogMetric", - "fullName": "google.logging.v2.MetricsServiceV2.GetLogMetric", - "service": { - "shortName": "MetricsServiceV2", - "fullName": "google.logging.v2.MetricsServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_MetricsServiceV2_CreateLogMetric_async", - "title": "logging createLogMetric Sample", - "origin": "API_DEFINITION", - "description": " Creates a logs-based metric.", - "canonical": true, - "file": "metrics_service_v2.create_log_metric.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateLogMetric", - "fullName": "google.logging.v2.MetricsServiceV2.CreateLogMetric", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "metric", - "type": ".google.logging.v2.LogMetric" - } - ], - "resultType": ".google.logging.v2.LogMetric", - "client": { - "shortName": "MetricsServiceV2Client", - "fullName": "google.logging.v2.MetricsServiceV2Client" + "regionTag": "logging_v2_generated_MetricsServiceV2_GetLogMetric_async", + "title": "logging getLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Gets a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.get_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.GetLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "GetLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.GetLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } }, - "method": { - "shortName": "CreateLogMetric", - "fullName": "google.logging.v2.MetricsServiceV2.CreateLogMetric", - "service": { - "shortName": "MetricsServiceV2", - "fullName": "google.logging.v2.MetricsServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async", - "title": "logging updateLogMetric Sample", - "origin": "API_DEFINITION", - "description": " Creates or updates a logs-based metric.", - "canonical": true, - "file": "metrics_service_v2.update_log_metric.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateLogMetric", - "fullName": "google.logging.v2.MetricsServiceV2.UpdateLogMetric", - "async": true, - "parameters": [ - { - "name": "metric_name", - "type": "TYPE_STRING" - }, - { - "name": "metric", - "type": ".google.logging.v2.LogMetric" - } - ], - "resultType": ".google.logging.v2.LogMetric", - "client": { - "shortName": "MetricsServiceV2Client", - "fullName": "google.logging.v2.MetricsServiceV2Client" + "regionTag": "logging_v2_generated_MetricsServiceV2_CreateLogMetric_async", + "title": "logging createLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Creates a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.create_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.CreateLogMetric", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "metric", + "type": ".google.logging.v2.LogMetric" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "CreateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.CreateLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } }, - "method": { - "shortName": "UpdateLogMetric", - "fullName": "google.logging.v2.MetricsServiceV2.UpdateLogMetric", - "service": { - "shortName": "MetricsServiceV2", - "fullName": "google.logging.v2.MetricsServiceV2" - } - } - } - }, - { - "regionTag": "logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async", - "title": "logging deleteLogMetric Sample", - "origin": "API_DEFINITION", - "description": " Deletes a logs-based metric.", - "canonical": true, - "file": "metrics_service_v2.delete_log_metric.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteLogMetric", - "fullName": "google.logging.v2.MetricsServiceV2.DeleteLogMetric", - "async": true, - "parameters": [ - { - "name": "metric_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MetricsServiceV2Client", - "fullName": "google.logging.v2.MetricsServiceV2Client" + "regionTag": "logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async", + "title": "logging updateLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Creates or updates a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.update_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.UpdateLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + }, + { + "name": "metric", + "type": ".google.logging.v2.LogMetric" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "UpdateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.UpdateLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } }, - "method": { - "shortName": "DeleteLogMetric", - "fullName": "google.logging.v2.MetricsServiceV2.DeleteLogMetric", - "service": { - "shortName": "MetricsServiceV2", - "fullName": "google.logging.v2.MetricsServiceV2" - } + { + "regionTag": "logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async", + "title": "logging deleteLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Deletes a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.delete_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.DeleteLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "DeleteLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.DeleteLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From e967aa75bf63b882ad8ff9a13c8eba630e7e92a1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 10:56:44 -0700 Subject: [PATCH 0865/1029] build: make ci testing conditional on engines field in package.json, move configs to Node 12 (#1418) (#1250) * build: make ci testing conditional on engines field in package.json, move configs to Node 12 Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/2800f5a85af0e0399c71a63169a53ade3e0d42f6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:dc7bfb4c4bf50496abbdd24bd9e4aaa833dc75248c0a9e3a7f807feda5258873 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/.github/.OwlBot.lock.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 9017db80d17..716a7268d3a 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -15,3 +15,4 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest digest: sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 # created: 2022-04-20T16:59:29.058398639Z + From e6c9c94d3a4ee1c6e4f0a44ef29ffde98bc96225 Mon Sep 17 00:00:00 2001 From: Drew Brown Date: Fri, 29 Apr 2022 13:51:08 -0600 Subject: [PATCH 0866/1029] docs: Add link to interactive tutorial (#1262) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Add link to interactive tutorial * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: Force jsdoc to copy image to _static directory This solution is not ideal, but using documented features of the default jsdoc did not achienve the correct result. * chore: Remove manual edits from generated files * fix: Add comment warning of duplicate svg files Due to a bug in jsdoc's staticFiles option in its default template adding a second copy was necessary in order to preserve directory structure. * chore: Fix whitespace in generated file * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- handwritten/logging/.jsdoc.js | 7 ++- handwritten/logging/.readme-partials.yml | 4 ++ handwritten/logging/README.md | 4 ++ .../logging/_static/_static/guide-me.svg | 47 +++++++++++++++++++ handwritten/logging/_static/guide-me.svg | 47 +++++++++++++++++++ 5 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 handwritten/logging/_static/_static/guide-me.svg create mode 100644 handwritten/logging/_static/guide-me.svg diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 4f21ce13da9..6f0d1a05123 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -46,7 +46,12 @@ module.exports = { systemName: '@google-cloud/logging', theme: 'lumen', default: { - outputSourceFiles: false + outputSourceFiles: false, + staticFiles: { + include: [ + '_static' + ] + } } }, markdown: { diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index 319708e8655..c267c7f3a71 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -10,6 +10,10 @@ introduction: |- ```bash npm install @google-cloud/logging-min ``` + + For an interactive tutorial on using the client library in a Node.js application, click Guide Me: + + [![Guide Me](_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-nodejs) body: |- ## Batching Writes diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 809aa3dc933..634f09cd2f8 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -22,6 +22,10 @@ To install `@google-cloud/logging-min` library run the following command: npm install @google-cloud/logging-min ``` +For an interactive tutorial on using the client library in a Node.js application, click Guide Me: + +[![Guide Me](_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-nodejs) + A comprehensive list of changes in each version may be found in [the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/main/CHANGELOG.md). diff --git a/handwritten/logging/_static/_static/guide-me.svg b/handwritten/logging/_static/_static/guide-me.svg new file mode 100644 index 00000000000..729d4523d52 --- /dev/null +++ b/handwritten/logging/_static/_static/guide-me.svg @@ -0,0 +1,47 @@ + + + + + + + GUIDE ME + + + + + + + diff --git a/handwritten/logging/_static/guide-me.svg b/handwritten/logging/_static/guide-me.svg new file mode 100644 index 00000000000..a85b455f003 --- /dev/null +++ b/handwritten/logging/_static/guide-me.svg @@ -0,0 +1,47 @@ + + + + + + + GUIDE ME + + + + + + + From a676d96a2db177404438974e0b0beb625c611af3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 2 May 2022 17:52:22 +0200 Subject: [PATCH 0867/1029] chore(deps): update dependency @types/mocha to v9 (#1263) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 6068274c0e9..23bbf9257a2 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -66,7 +66,7 @@ "@google-cloud/pubsub": "^2.0.0", "@google-cloud/storage": "^5.0.0", "@types/extend": "^3.0.1", - "@types/mocha": "^8.0.0", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", From 0fc6bd4b443d79e7ae853d48181dce70fa6a60b9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 16:18:27 -0700 Subject: [PATCH 0868/1029] build: update auto approve to v2, remove release autoapproving (#1432) (#1265) * build: update auto-approve file to v2 Source-Link: https://github.com/googleapis/synthtool/commit/19eb6fc07dc178a682da6d186dc874017a166438 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b9e4584a1fe3c749e3c37c92497b13dce653b2e694f0261f0610eb0e15941357 Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 5 ++--- handwritten/logging/.github/auto-approve.yml | 15 +++------------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 716a7268d3a..9acbabb1b4c 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,6 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 -# created: 2022-04-20T16:59:29.058398639Z - + digest: sha256:b9e4584a1fe3c749e3c37c92497b13dce653b2e694f0261f0610eb0e15941357 +# created: 2022-05-05T21:08:42.530332893Z diff --git a/handwritten/logging/.github/auto-approve.yml b/handwritten/logging/.github/auto-approve.yml index 49cf942280a..4cd91cc16ae 100644 --- a/handwritten/logging/.github/auto-approve.yml +++ b/handwritten/logging/.github/auto-approve.yml @@ -1,12 +1,3 @@ -rules: -- author: "release-please[bot]" - title: "^chore: release" - changedFiles: - - "package\\.json$" - - "CHANGELOG\\.md$" - maxFiles: 3 -- author: "renovate-bot" - title: "^(fix|chore)\\(deps\\):" - changedFiles: - - "package\\.json$" - maxFiles: 2 +processes: + - "NodeDependency" + - "OwlBotTemplateChanges" From d26b13fa33ca95e2bbe292b56923b16d643365b5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:44:11 +0200 Subject: [PATCH 0869/1029] chore(deps): update dependency sinon to v14 (#1268) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 23bbf9257a2..63b499ffb30 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -87,7 +87,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 268f7fffeef3569b02594740821f672af7a4fa1e Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Mon, 9 May 2022 15:17:14 -0500 Subject: [PATCH 0870/1029] feat: Add support for library instrumentation (#1261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for library instrumentation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Fix lint and test failures * Fix timeout * Fix failing tests and move instrumentation into data * Add support for partialSuccess * Add version fix for filing installation tests * Fix the version retrieval logic * Address PR comments * Fix a comment * Fix comments Co-authored-by: Owl Bot --- handwritten/logging/src/log-sync.ts | 5 +- handwritten/logging/src/log.ts | 19 +- .../logging/src/utils/instrumentation.ts | 205 ++++++++++++++++++ handwritten/logging/system-test/logging.ts | 22 +- handwritten/logging/test/instrumentation.ts | 172 +++++++++++++++ handwritten/logging/test/utils/metadata.ts | 2 - 6 files changed, 417 insertions(+), 8 deletions(-) create mode 100644 handwritten/logging/src/utils/instrumentation.ts create mode 100644 handwritten/logging/test/instrumentation.ts diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts index 05f2b3f6e31..cc3f6479e0a 100644 --- a/handwritten/logging/src/log-sync.ts +++ b/handwritten/logging/src/log-sync.ts @@ -18,10 +18,10 @@ * This is a helper library for synchronously writing logs to any transport. */ -import arrify = require('arrify'); import {Logging} from '.'; import {Entry, LABELS_KEY, LogEntry, StructuredJson} from './entry'; import {Writable} from 'stream'; +import {populateInstrumentationInfo} from './utils/instrumentation'; import { LogSeverityFunctions, assignSeverityToEntries, @@ -412,7 +412,8 @@ class LogSync implements LogSeverityFunctions { let structuredEntries: StructuredJson[]; this.formattedName_ = formatLogName(this.logging.projectId, this.name); try { - structuredEntries = (arrify(entry) as Entry[]).map(entry => { + // Make sure to add instrumentation info + structuredEntries = populateInstrumentationInfo(entry).map(entry => { if (!(entry instanceof Entry)) { entry = this.entry(entry); } diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index d4ff5917ae0..a01c8a10087 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -14,13 +14,16 @@ * limitations under the License. */ -import arrify = require('arrify'); import {callbackifyAll} from '@google-cloud/promisify'; import * as dotProp from 'dot-prop'; import * as extend from 'extend'; import {CallOptions} from 'google-gax'; import {GetEntriesCallback, GetEntriesResponse, Logging} from '.'; import {Entry, EntryJson, LogEntry} from './entry'; +import { + populateInstrumentationInfo, + getInstrumentationInfoStatus, +} from './utils/instrumentation'; import { LogSeverityFunctions, assignSeverityToEntries, @@ -959,13 +962,23 @@ class Log implements LogSeverityFunctions { entry: Entry | Entry[], opts?: WriteOptions | ApiResponseCallback ): Promise { + const isInfoAdded = getInstrumentationInfoStatus(); const options = opts ? (opts as WriteOptions) : {}; + // If instrumentation info was not added, means that this is first time + // log entry is written and that the instrumentation log entry could be + // generated for this request. If yes, then make sure we set partialSuccess, so entire + // request will make it through and only oversized entries will be dropped + if (!isInfoAdded) { + options.partialSuccess = true; + } // Extract projectId & resource from Logging - inject & memoize if not. await this.logging.setProjectId(); this.formattedName_ = formatLogName(this.logging.projectId, this.name); const resource = await this.getOrSetResource(options); - // Extract & format additional context from individual entries. - const decoratedEntries = this.decorateEntries(arrify(entry) as Entry[]); + // Extract & format additional context from individual entries. Make sure to add instrumentation info + const decoratedEntries = this.decorateEntries( + populateInstrumentationInfo(entry) + ); this.truncateEntries(decoratedEntries); // Clobber `labels` and `resource` fields with WriteOptions from the user. const reqOpts = extend( diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts new file mode 100644 index 00000000000..7d6e71bce97 --- /dev/null +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -0,0 +1,205 @@ +/*! + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import arrify = require('arrify'); +import path = require('path'); +import {google} from '../../protos/protos'; +import {Entry} from '../entry'; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +declare const global: {[index: string]: any}; + +// The global variable keeping track if instrumentation record was already written or not. +// The instrumentation record should be generated only once per process and contain logging +// libraries related info. +global.instrumentationAdded = false; + +// The variable to hold cached library version +let libraryVersion: string; + +// Max length for instrumentation library name and version values +const maxDiagnosticValueLen = 14; + +export const DIAGNOSTIC_INFO_KEY = 'logging.googleapis.com/diagnostic'; +export const INSTRUMENTATION_SOURCE_KEY = 'instrumentation_source'; +export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; +export type InstrumentationInfo = {name: string; version: string}; + +/** + * This method returns the status if instrumentation info was already added or not. + * @returns true if the log record with instrumentation info was already added, false otherwise. + */ +export function getInstrumentationInfoStatus() { + return global.instrumentationAdded; +} + +/** + * This method helps to populate entries with instrumentation data + * @param entry {Entry} The entry or array of entries to be populated with instrumentation info + * @returns {Entry} Array of entries which contains an entry with current library instrumentation info + */ +export function populateInstrumentationInfo(entry: Entry | Entry[]): Entry[] { + // Update the flag indicating that instrumentation entry was already added once, + // so any subsequent calls to this method will not add a separate instrumentation log entry + let isWritten = global.instrumentationAdded; + global.instrumentationAdded = true; + const entries: Entry[] = []; + if (entry) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + for (const entryItem of arrify(entry) as any[]) { + if (entryItem) { + const info = + entryItem.data?.[DIAGNOSTIC_INFO_KEY]?.[INSTRUMENTATION_SOURCE_KEY]; + if (info) { + // Validate and update the instrumentation info with current library info + entryItem.data[DIAGNOSTIC_INFO_KEY][INSTRUMENTATION_SOURCE_KEY] = + validateAndUpdateInstrumentation(info); + // Indicate that instrumentation info log entry already exists + // and that current library info was added to existing log entry + isWritten = true; + } + entries.push(entryItem); + } + } + } + // If no instrumentation info was added before, append a separate log entry with + // instrumentation data for this library + if (!isWritten) { + entries.push(createDiagnosticEntry(undefined, undefined)); + } + return entries; +} + +/** + * The helper method to generate a log entry with diagnostic instrumentation data. + * @param libraryName {string} The name of the logging library to be reported. Should be prefixed with 'nodejs'. + * Will be truncated if longer than 14 characters. + * @param libraryVersion {string} The version of the logging library to be reported. Will be truncated if longer than 14 characters. + * @returns {Entry} The entry with diagnostic instrumentation data. + */ +export function createDiagnosticEntry( + libraryName: string | undefined, + libraryVersion: string | undefined +): Entry { + // Validate the libraryName first and make sure it starts with 'nodejs' prefix. + if (!libraryName || !libraryName.startsWith(NODEJS_LIBRARY_NAME_PREFIX)) { + libraryName = NODEJS_LIBRARY_NAME_PREFIX; + } + const entry = new Entry( + { + severity: google.logging.type.LogSeverity.INFO, + }, + { + [DIAGNOSTIC_INFO_KEY]: { + [INSTRUMENTATION_SOURCE_KEY]: [ + { + // Truncate libraryName and libraryVersion if more than 14 characters length + name: truncateValue(libraryName, maxDiagnosticValueLen), + version: truncateValue( + libraryVersion ?? getNodejsLibraryVersion(), + maxDiagnosticValueLen + ), + }, + ], + }, + } + ); + return entry; +} + +/** + * This method validates that provided instrumentation info list is valid and also adds current library info to a list. + * @param infoList {InstrumentationInfo} The array of InstrumentationInfo to be validated and updated. + * @returns {InstrumentationInfo} The updated list of InstrumentationInfo. + */ +function validateAndUpdateInstrumentation( + infoList: InstrumentationInfo[] +): InstrumentationInfo[] { + const finalInfo: InstrumentationInfo[] = []; + // First, add current library information + finalInfo.push({ + name: NODEJS_LIBRARY_NAME_PREFIX, + version: getNodejsLibraryVersion(), + }); + // Iterate through given list of libraries and for each entry perform validations and transformations + // Limit amount of entries to be up to 3 + let count = 1; + for (const info of infoList) { + if (isValidInfo(info)) { + finalInfo.push({ + name: truncateValue(info.name, maxDiagnosticValueLen), + version: truncateValue(info.version, maxDiagnosticValueLen), + }); + } + if (++count === 3) break; + } + return finalInfo; +} + +/** + * A helper function to truncate a value (library name or version for example). The value is truncated + * when it is longer than {maxLen} chars and '*' is added instead of truncated suffix. + * @param value {string} The value to be truncated. + * @param maxLen {number} The max length to be used for truncation. + * @returns {string} The truncated value. + */ +function truncateValue(value: string, maxLen: number) { + if (value && value.length > maxLen) { + return value.substring(0, maxLen).concat('*'); + } + return value; +} + +/** + * The helper function to retrieve current library version from 'package.json' file. Note that + * since we use {path.resolve}, the search for 'package.json' could be impacted by current working directory. + * @returns {string} A current library version. + */ +export function getNodejsLibraryVersion() { + if (libraryVersion) { + return libraryVersion; + } + libraryVersion = require(path.resolve( + __dirname, + '../../../', + 'package.json' + )).version; + return libraryVersion; +} + +/** + * The helper function which checks if given InstrumentationInfo is valid. + * @param info {InstrumentationInfo} The info to be validated. + * @returns true if given info is valid, false otherwise + */ +function isValidInfo(info: InstrumentationInfo) { + if ( + !info || + !info.name || + !info.version || + !info.name.startsWith(NODEJS_LIBRARY_NAME_PREFIX) + ) { + return false; + } + return true; +} + +/** + * The helper method used to reset a status of a flag which indicates if instrumentation info already written or not. + */ +export function resetInstrumentationStatus() { + global.instrumentationAdded = false; +} diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index fada14c6a26..cd63ced97ea 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -28,6 +28,7 @@ import {after, before} from 'mocha'; const http2spy = require('http2spy'); import {Logging, Sink, Log, Entry, TailEntriesResponse} from '../src'; import * as http from 'http'; +import * as instrumentation from '../src/utils/instrumentation'; // block all attempts to chat with the metadata server (kokoro runs on GCE) nock(HOST_ADDRESS) @@ -372,7 +373,26 @@ describe('Logging', () => { {numExpectedMessages: logEntries.length}, (err, entries) => { assert.ifError(err); - assert.strictEqual(entries!.length, logEntries.length); + // Instrumentation log entry is added automatically, so we should discount it + assert.strictEqual(entries!.length - 1, logEntries.length); + let entry: Entry | undefined; + entries!.forEach(ent => { + if ( + ent && + ent.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ] + ) { + entry = ent; + } + }); + assert.ok(entry); + assert.equal( + entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.['name'], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + ); done(); } ); diff --git a/handwritten/logging/test/instrumentation.ts b/handwritten/logging/test/instrumentation.ts new file mode 100644 index 00000000000..34e39861dac --- /dev/null +++ b/handwritten/logging/test/instrumentation.ts @@ -0,0 +1,172 @@ +/*! + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as assert from 'assert'; +import {Entry} from '../src'; +import * as instrumentation from '../src/utils/instrumentation'; +import {google} from '../protos/protos'; + +const NAME = 'name'; +const VERSION = 'version'; +const NODEJS_TEST = instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-test'; +const LONG_NODEJS_TEST = + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-test-ooooooooooooooo'; +const VERSION_TEST = '1.0.0'; +const LONG_VERSION_TEST = VERSION_TEST + '.0.0.0.0.0.0.0.0.11.1.1-ALPHA'; + +describe('instrumentation_info', () => { + beforeEach(() => { + instrumentation.resetInstrumentationStatus(); + }); + + it('should generate library info properly by default', () => { + const entry = instrumentation.createDiagnosticEntry( + undefined, + undefined + ) as Entry; + assert.equal( + entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + ); + assert.equal( + entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[VERSION], + instrumentation.getNodejsLibraryVersion() + ); + }); + + it('should add instrumentation log entry to the list', () => { + const dummyEntry = createEntry(undefined, undefined); + const entries = instrumentation.populateInstrumentationInfo(dummyEntry); + assert.equal(entries.length, 2); + assert.deepEqual(dummyEntry, entries[0]); + assert.equal( + entries[1].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + ); + }); + + it('should add instrumentation info to existing list', () => { + const dummyEntry = createEntry(NODEJS_TEST, VERSION_TEST); + const entries = instrumentation.populateInstrumentationInfo(dummyEntry); + assert.equal(entries.length, 1); + assert.equal( + entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.length, + 2 + ); + assert.equal( + entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + ); + assert.equal( + entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[1]?.[NAME], + NODEJS_TEST + ); + assert.equal( + entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[1]?.[VERSION], + VERSION_TEST + ); + }); + + it('should replace instrumentation log entry in the list', () => { + const dummyEntry = createEntry('nodejs-test', undefined); + const entries = instrumentation.populateInstrumentationInfo(dummyEntry); + assert.equal(entries.length, 1); + assert.equal( + entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.length, + 1 + ); + assert.equal( + entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + ); + }); + + it('should truncate instrumentation info in log entry', () => { + const entries = instrumentation.populateInstrumentationInfo( + createEntry(LONG_NODEJS_TEST, LONG_VERSION_TEST) + ); + assert.equal(entries.length, 1); + assert.equal( + entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[1]?.[NAME], + NODEJS_TEST + '-oo*' + ); + assert.equal( + entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[1]?.[VERSION], + VERSION_TEST + '.0.0.0.0.*' + ); + }); + + it('should add instrumentation log entry only once', () => { + const dummyEntry = createEntry(undefined, undefined); + let entries = instrumentation.populateInstrumentationInfo(dummyEntry); + assert.equal(entries.length, 2); + assert.deepEqual(dummyEntry, entries[0]); + assert.equal( + entries[1].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + ); + entries = instrumentation.populateInstrumentationInfo(dummyEntry); + assert.equal(entries.length, 1); + assert.deepEqual(dummyEntry, entries[0]); + }); +}); + +function createEntry(name: string | undefined, version: string | undefined) { + const entry = new Entry( + { + severity: google.logging.type.LogSeverity.DEBUG, + }, + undefined + ); + if (name || version) { + entry.data = { + [instrumentation.DIAGNOSTIC_INFO_KEY]: { + [instrumentation.INSTRUMENTATION_SOURCE_KEY]: [ + { + name: name, + version: version, + }, + ], + }, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any; + } + return entry; +} diff --git a/handwritten/logging/test/utils/metadata.ts b/handwritten/logging/test/utils/metadata.ts index 7e1a685f4c8..7f967ed2c1e 100644 --- a/handwritten/logging/test/utils/metadata.ts +++ b/handwritten/logging/test/utils/metadata.ts @@ -65,7 +65,6 @@ describe('metadata', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any let metadata: any; // eslint-disable-next-line @typescript-eslint/no-unused-vars - let AUTH; const ENV_CACHED = extend({}, process.env); const INITIAL_ENV: {[key: string]: string | undefined} = {}; @@ -80,7 +79,6 @@ describe('metadata', () => { }); beforeEach(() => { - AUTH = {}; extend(metadata, metadataCached); instanceOverride = null; readFileShouldError = false; From 8b85e0303b861d3ebdfc4a625c61c5a36df518f2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 14:01:42 -0700 Subject: [PATCH 0871/1029] chore(main): release 9.9.0 (#1269) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 9.9.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 77db29990e2..8c66ce94b92 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [9.9.0](https://github.com/googleapis/nodejs-logging/compare/v9.8.3...v9.9.0) (2022-05-09) + + +### Features + +* Add support for library instrumentation ([#1261](https://github.com/googleapis/nodejs-logging/issues/1261)) ([bb864c8](https://github.com/googleapis/nodejs-logging/commit/bb864c8ff6a57fb70f350d4a15d97e85fdafab29)) + ### [9.8.3](https://github.com/googleapis/nodejs-logging/compare/v9.8.2...v9.8.3) (2022-04-14) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 63b499ffb30..59cd0307306 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.8.3", + "version": "9.9.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index a7bf6ba8881..237fedc5033 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "9.8.3", + "version": "9.9.0", "language": "TYPESCRIPT", "apis": [ { From 6ab1613c2690037ec66dbb709d68394661e44b84 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 18 May 2022 10:39:15 -0700 Subject: [PATCH 0872/1029] build!: update library to use Node 12 (#1272) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- .../logging/.github/sync-repo-settings.yaml | 2 +- .../.kokoro/continuous/node10/common.cfg | 34 ------------------- .../.kokoro/continuous/node10/docs.cfg | 4 --- .../.kokoro/continuous/node10/test.cfg | 9 ----- .../.kokoro/presubmit/node10/common.cfg | 34 ------------------- .../logging/.kokoro/presubmit/node10/docs.cfg | 4 --- .../logging/.kokoro/presubmit/node10/lint.cfg | 4 --- .../logging/.kokoro/presubmit/node10/test.cfg | 0 handwritten/logging/package.json | 18 +++++----- handwritten/logging/src/index.ts | 6 ++-- 10 files changed, 13 insertions(+), 102 deletions(-) delete mode 100644 handwritten/logging/.kokoro/continuous/node10/common.cfg delete mode 100644 handwritten/logging/.kokoro/continuous/node10/docs.cfg delete mode 100644 handwritten/logging/.kokoro/continuous/node10/test.cfg delete mode 100644 handwritten/logging/.kokoro/presubmit/node10/common.cfg delete mode 100644 handwritten/logging/.kokoro/presubmit/node10/docs.cfg delete mode 100644 handwritten/logging/.kokoro/presubmit/node10/lint.cfg delete mode 100644 handwritten/logging/.kokoro/presubmit/node10/test.cfg diff --git a/handwritten/logging/.github/sync-repo-settings.yaml b/handwritten/logging/.github/sync-repo-settings.yaml index 1b36268333a..d1e8b5e6e1a 100644 --- a/handwritten/logging/.github/sync-repo-settings.yaml +++ b/handwritten/logging/.github/sync-repo-settings.yaml @@ -9,9 +9,9 @@ branchProtectionRules: - "ci/kokoro: System test" - docs - lint - - test (10) - test (12) - test (14) + - test (16) - cla/google - windows - OwlBot Post Processor diff --git a/handwritten/logging/.kokoro/continuous/node10/common.cfg b/handwritten/logging/.kokoro/continuous/node10/common.cfg deleted file mode 100644 index 8008525a351..00000000000 --- a/handwritten/logging/.kokoro/continuous/node10/common.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Bring in codecov.io token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" -} diff --git a/handwritten/logging/.kokoro/continuous/node10/docs.cfg b/handwritten/logging/.kokoro/continuous/node10/docs.cfg deleted file mode 100644 index a0f47103691..00000000000 --- a/handwritten/logging/.kokoro/continuous/node10/docs.cfg +++ /dev/null @@ -1,4 +0,0 @@ -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/docs.sh" -} diff --git a/handwritten/logging/.kokoro/continuous/node10/test.cfg b/handwritten/logging/.kokoro/continuous/node10/test.cfg deleted file mode 100644 index 609c0cf0a27..00000000000 --- a/handwritten/logging/.kokoro/continuous/node10/test.cfg +++ /dev/null @@ -1,9 +0,0 @@ -# Bring in codecov.io token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} diff --git a/handwritten/logging/.kokoro/presubmit/node10/common.cfg b/handwritten/logging/.kokoro/presubmit/node10/common.cfg deleted file mode 100644 index 8008525a351..00000000000 --- a/handwritten/logging/.kokoro/presubmit/node10/common.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Bring in codecov.io token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" -} diff --git a/handwritten/logging/.kokoro/presubmit/node10/docs.cfg b/handwritten/logging/.kokoro/presubmit/node10/docs.cfg deleted file mode 100644 index a0f47103691..00000000000 --- a/handwritten/logging/.kokoro/presubmit/node10/docs.cfg +++ /dev/null @@ -1,4 +0,0 @@ -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/docs.sh" -} diff --git a/handwritten/logging/.kokoro/presubmit/node10/lint.cfg b/handwritten/logging/.kokoro/presubmit/node10/lint.cfg deleted file mode 100644 index 403216c3eaa..00000000000 --- a/handwritten/logging/.kokoro/presubmit/node10/lint.cfg +++ /dev/null @@ -1,4 +0,0 @@ -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/lint.sh" -} diff --git a/handwritten/logging/.kokoro/presubmit/node10/test.cfg b/handwritten/logging/.kokoro/presubmit/node10/test.cfg deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 59cd0307306..ba153028783 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -48,14 +48,14 @@ "@google-cloud/common": "^3.4.1", "@google-cloud/paginator": "^3.0.0", "@google-cloud/projectify": "^2.0.0", - "@google-cloud/promisify": "^2.0.0", + "@google-cloud/promisify": "^3.0.0", "arrify": "^2.0.1", "dot-prop": "^6.0.0", "eventid": "^2.0.0", "extend": "^3.0.2", "gcp-metadata": "^4.0.0", - "google-auth-library": "^7.0.0", - "google-gax": "^2.24.1", + "google-auth-library": "^8.0.2", + "google-gax": "^3.0.1", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", @@ -76,25 +76,25 @@ "bignumber.js": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", - "gts": "^3.0.0", + "gts": "^3.1.0", "http2spy": "^2.0.0", "jsdoc": "^3.6.3", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", "linkinator": "^2.0.3", - "mocha": "^8.0.0", + "mocha": "^9.2.2", "nock": "^13.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", "sinon": "^14.0.0", "ts-loader": "^9.0.0", - "typescript": "^3.8.3", + "typescript": "^4.6.4", + "uglify-js": "^3.13.5", "webpack": "^5.0.0", - "webpack-cli": "^4.0.0", - "uglify-js": "^3.13.5" + "webpack-cli": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12.0.0" } } diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 81f545dfbc4..0cf026a6227 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -706,7 +706,7 @@ class Logging { gaxOptions ); } catch (error) { - requestStream.destroy(error); + requestStream.destroy(error as Error); return; } gaxStream @@ -1018,7 +1018,7 @@ class Logging { try { gaxStream = this.loggingService.listLogsStream(reqOpts, gaxOptions); } catch (error) { - requestStream.destroy(error); + requestStream.destroy(error as Error); return; } gaxStream @@ -1206,7 +1206,7 @@ class Logging { gaxOptions ); } catch (error) { - requestStream.destroy(error); + requestStream.destroy(error as Error); return; } gaxStream From 9410c9e588344e5f4abe5cf3cf8aa4b07ba6f1a1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 18 May 2022 11:15:54 -0700 Subject: [PATCH 0873/1029] chore(main): release 10.0.0 (#1278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.0.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 11 +++++++++++ handwritten/logging/package.json | 2 +- .../v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 8c66ce94b92..e682cf07c11 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,17 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.0.0](https://github.com/googleapis/nodejs-logging/compare/v9.9.0...v10.0.0) (2022-05-18) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#1272) + +### Build System + +* update library to use Node 12 ([#1272](https://github.com/googleapis/nodejs-logging/issues/1272)) ([13f909f](https://github.com/googleapis/nodejs-logging/commit/13f909ff1e26fe783599867c3b7992020a76e934)) + ## [9.9.0](https://github.com/googleapis/nodejs-logging/compare/v9.8.3...v9.9.0) (2022-05-09) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ba153028783..5cf9a0bdb03 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "9.9.0", + "version": "10.0.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 237fedc5033..3b80c65dc55 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "9.9.0", + "version": "10.0.0", "language": "TYPESCRIPT", "apis": [ { From 2f5d502dc07267ba0f0b2018e50678dddf84d86c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 May 2022 20:35:39 +0200 Subject: [PATCH 0874/1029] fix(deps): update dependency @google-cloud/paginator to v4 (#1276) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5cf9a0bdb03..8c848181ef3 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "@google-cloud/common": "^3.4.1", - "@google-cloud/paginator": "^3.0.0", + "@google-cloud/paginator": "^4.0.0", "@google-cloud/projectify": "^2.0.0", "@google-cloud/promisify": "^3.0.0", "arrify": "^2.0.1", From 52db3e709bdac2911eda1f5d4702b9b9281d086d Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Fri, 20 May 2022 07:25:05 -0700 Subject: [PATCH 0875/1029] fix: Add support to set an instrumentation flag (#1279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Add support to set an instrumentation flag * Fix a comment * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix lint errors * Add a fix for partialSuccess to work properly. Refactor tests to adopt a change Co-authored-by: Owl Bot --- handwritten/logging/src/log-sync.ts | 2 +- handwritten/logging/src/log.ts | 23 ++++------ .../logging/src/utils/instrumentation.ts | 35 ++++++++------- handwritten/logging/test/instrumentation.ts | 45 ++++++++++--------- handwritten/logging/test/log.ts | 27 +++++++++++ 5 files changed, 79 insertions(+), 53 deletions(-) diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts index cc3f6479e0a..807a8eb120d 100644 --- a/handwritten/logging/src/log-sync.ts +++ b/handwritten/logging/src/log-sync.ts @@ -413,7 +413,7 @@ class LogSync implements LogSeverityFunctions { this.formattedName_ = formatLogName(this.logging.projectId, this.name); try { // Make sure to add instrumentation info - structuredEntries = populateInstrumentationInfo(entry).map(entry => { + structuredEntries = populateInstrumentationInfo(entry)[0].map(entry => { if (!(entry instanceof Entry)) { entry = this.entry(entry); } diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index a01c8a10087..e48c85aae33 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -20,10 +20,7 @@ import * as extend from 'extend'; import {CallOptions} from 'google-gax'; import {GetEntriesCallback, GetEntriesResponse, Logging} from '.'; import {Entry, EntryJson, LogEntry} from './entry'; -import { - populateInstrumentationInfo, - getInstrumentationInfoStatus, -} from './utils/instrumentation'; +import {populateInstrumentationInfo} from './utils/instrumentation'; import { LogSeverityFunctions, assignSeverityToEntries, @@ -962,23 +959,19 @@ class Log implements LogSeverityFunctions { entry: Entry | Entry[], opts?: WriteOptions | ApiResponseCallback ): Promise { - const isInfoAdded = getInstrumentationInfoStatus(); const options = opts ? (opts as WriteOptions) : {}; - // If instrumentation info was not added, means that this is first time - // log entry is written and that the instrumentation log entry could be - // generated for this request. If yes, then make sure we set partialSuccess, so entire - // request will make it through and only oversized entries will be dropped - if (!isInfoAdded) { - options.partialSuccess = true; - } // Extract projectId & resource from Logging - inject & memoize if not. await this.logging.setProjectId(); this.formattedName_ = formatLogName(this.logging.projectId, this.name); const resource = await this.getOrSetResource(options); // Extract & format additional context from individual entries. Make sure to add instrumentation info - const decoratedEntries = this.decorateEntries( - populateInstrumentationInfo(entry) - ); + const info = populateInstrumentationInfo(entry); + const decoratedEntries = this.decorateEntries(info[0]); + // If instrumentation info was added make sure we set partialSuccess, so entire + // request will make it through and only oversized entries will be dropped if any + if (info[1]) { + options.partialSuccess = true; + } this.truncateEntries(decoratedEntries); // Clobber `labels` and `resource` fields with WriteOptions from the user. const reqOpts = extend( diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 7d6e71bce97..2169c7e7cce 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -38,24 +38,20 @@ export const INSTRUMENTATION_SOURCE_KEY = 'instrumentation_source'; export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; export type InstrumentationInfo = {name: string; version: string}; -/** - * This method returns the status if instrumentation info was already added or not. - * @returns true if the log record with instrumentation info was already added, false otherwise. - */ -export function getInstrumentationInfoStatus() { - return global.instrumentationAdded; -} - /** * This method helps to populate entries with instrumentation data * @param entry {Entry} The entry or array of entries to be populated with instrumentation info - * @returns {Entry} Array of entries which contains an entry with current library instrumentation info + * @returns [Entry[], boolean] Array of entries which contains an entry with current library + * instrumentation info and boolean flag indicating if instrumentation was added or not in this call */ -export function populateInstrumentationInfo(entry: Entry | Entry[]): Entry[] { +export function populateInstrumentationInfo( + entry: Entry | Entry[] +): [Entry[], boolean] { // Update the flag indicating that instrumentation entry was already added once, // so any subsequent calls to this method will not add a separate instrumentation log entry - let isWritten = global.instrumentationAdded; - global.instrumentationAdded = true; + let isWritten = setInstrumentationStatus(true); + // Flag keeping track if this specific call added any instrumentation info + let isInfoAdded = false; const entries: Entry[] = []; if (entry) { // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -69,7 +65,7 @@ export function populateInstrumentationInfo(entry: Entry | Entry[]): Entry[] { validateAndUpdateInstrumentation(info); // Indicate that instrumentation info log entry already exists // and that current library info was added to existing log entry - isWritten = true; + isInfoAdded = isWritten = true; } entries.push(entryItem); } @@ -79,8 +75,9 @@ export function populateInstrumentationInfo(entry: Entry | Entry[]): Entry[] { // instrumentation data for this library if (!isWritten) { entries.push(createDiagnosticEntry(undefined, undefined)); + isInfoAdded = true; } - return entries; + return [entries, isInfoAdded]; } /** @@ -198,8 +195,12 @@ function isValidInfo(info: InstrumentationInfo) { } /** - * The helper method used to reset a status of a flag which indicates if instrumentation info already written or not. + * The helper method used to set a status of a flag which indicates if instrumentation info already written or not. + * @param value {boolean} The value to be set. + * @returns The value of the flag before it is set. */ -export function resetInstrumentationStatus() { - global.instrumentationAdded = false; +export function setInstrumentationStatus(value: boolean) { + const status = global.instrumentationAdded; + global.instrumentationAdded = value; + return status; } diff --git a/handwritten/logging/test/instrumentation.ts b/handwritten/logging/test/instrumentation.ts index 34e39861dac..b5bd972b623 100644 --- a/handwritten/logging/test/instrumentation.ts +++ b/handwritten/logging/test/instrumentation.ts @@ -29,7 +29,7 @@ const LONG_VERSION_TEST = VERSION_TEST + '.0.0.0.0.0.0.0.0.11.1.1-ALPHA'; describe('instrumentation_info', () => { beforeEach(() => { - instrumentation.resetInstrumentationStatus(); + instrumentation.setInstrumentationStatus(false); }); it('should generate library info properly by default', () => { @@ -54,10 +54,11 @@ describe('instrumentation_info', () => { it('should add instrumentation log entry to the list', () => { const dummyEntry = createEntry(undefined, undefined); const entries = instrumentation.populateInstrumentationInfo(dummyEntry); - assert.equal(entries.length, 2); - assert.deepEqual(dummyEntry, entries[0]); + assert.equal(entries[0].length, 2); + assert.deepEqual(dummyEntry, entries[0][0]); + assert.equal(true, entries[1]); assert.equal( - entries[1].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][1].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], instrumentation.NODEJS_LIBRARY_NAME_PREFIX @@ -67,27 +68,28 @@ describe('instrumentation_info', () => { it('should add instrumentation info to existing list', () => { const dummyEntry = createEntry(NODEJS_TEST, VERSION_TEST); const entries = instrumentation.populateInstrumentationInfo(dummyEntry); - assert.equal(entries.length, 1); + assert.equal(entries[0].length, 1); + assert.equal(true, entries[1]); assert.equal( - entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.length, 2 ); assert.equal( - entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], instrumentation.NODEJS_LIBRARY_NAME_PREFIX ); assert.equal( - entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[1]?.[NAME], NODEJS_TEST ); assert.equal( - entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[1]?.[VERSION], VERSION_TEST @@ -97,15 +99,16 @@ describe('instrumentation_info', () => { it('should replace instrumentation log entry in the list', () => { const dummyEntry = createEntry('nodejs-test', undefined); const entries = instrumentation.populateInstrumentationInfo(dummyEntry); - assert.equal(entries.length, 1); + assert.equal(entries[0].length, 1); + assert.equal(true, entries[1]); assert.equal( - entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.length, 1 ); assert.equal( - entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], instrumentation.NODEJS_LIBRARY_NAME_PREFIX @@ -116,15 +119,16 @@ describe('instrumentation_info', () => { const entries = instrumentation.populateInstrumentationInfo( createEntry(LONG_NODEJS_TEST, LONG_VERSION_TEST) ); - assert.equal(entries.length, 1); + assert.equal(entries[0].length, 1); + assert.equal(true, entries[1]); assert.equal( - entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[1]?.[NAME], NODEJS_TEST + '-oo*' ); assert.equal( - entries[0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[1]?.[VERSION], VERSION_TEST + '.0.0.0.0.*' @@ -134,17 +138,18 @@ describe('instrumentation_info', () => { it('should add instrumentation log entry only once', () => { const dummyEntry = createEntry(undefined, undefined); let entries = instrumentation.populateInstrumentationInfo(dummyEntry); - assert.equal(entries.length, 2); - assert.deepEqual(dummyEntry, entries[0]); + assert.equal(entries[0].length, 2); + assert.deepEqual(dummyEntry, entries[0][0]); + assert.equal(true, entries[1]); assert.equal( - entries[1].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + entries[0][1].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], instrumentation.NODEJS_LIBRARY_NAME_PREFIX ); entries = instrumentation.populateInstrumentationInfo(dummyEntry); - assert.equal(entries.length, 1); - assert.deepEqual(dummyEntry, entries[0]); + assert.equal(entries[0].length, 1); + assert.deepEqual(dummyEntry, entries[0][0]); }); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index 9c15b1c5ea3..f8b2a24db75 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -22,6 +22,7 @@ import {Log as LOG, LogOptions, WriteOptions} from '../src/log'; import {Data, EntryJson, LogEntry} from '../src/entry'; import * as logCommon from '../src/utils/log-common'; +import * as instrumentation from '../src/utils/instrumentation'; describe('Log', () => { let Log: typeof LOG; @@ -75,6 +76,7 @@ describe('Log', () => { log.logging.setDetectedResource = () => { log.logging.detectedResource = FAKE_RESOURCE; }; + instrumentation.setInstrumentationStatus(true); }); // Create a mock Logging instance @@ -551,6 +553,31 @@ describe('Log', () => { ) ); }); + + it('should set the partialSuccess properly for instrumentation record', async () => { + instrumentation.setInstrumentationStatus(false); + await log.write(ENTRIES, OPTIONS); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWith( + sinon.match({ + partialSuccess: true, + }) + ) + ); + instrumentation.setInstrumentationStatus(true); + }); + + it('should set the partialSuccess properly for existing instrumentation record', async () => { + ENTRIES.push(instrumentation.createDiagnosticEntry(undefined, undefined)); + await log.write(ENTRIES, OPTIONS); + assert( + log.logging.loggingService.writeLogEntries.calledOnceWith( + sinon.match({ + partialSuccess: true, + }) + ) + ); + }); }); describe('decorateEntries', () => { From b3739466d0ff2907b7be56eb74a9fb5b18a911d0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 20 May 2022 08:57:16 -0700 Subject: [PATCH 0876/1029] chore(main): release 10.0.1 (#1280) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.0.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index e682cf07c11..fc1769cd3b3 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [10.0.1](https://github.com/googleapis/nodejs-logging/compare/v10.0.0...v10.0.1) (2022-05-20) + + +### Bug Fixes + +* Add support to set an instrumentation flag ([#1279](https://github.com/googleapis/nodejs-logging/issues/1279)) ([6d470fc](https://github.com/googleapis/nodejs-logging/commit/6d470fc26ffb0411ace184d062b0e603e7cf6259)) +* **deps:** update dependency @google-cloud/paginator to v4 ([#1276](https://github.com/googleapis/nodejs-logging/issues/1276)) ([0bfe813](https://github.com/googleapis/nodejs-logging/commit/0bfe813c54a0d63a0b73a2dfe8cd702da5a6c91b)) + ## [10.0.0](https://github.com/googleapis/nodejs-logging/compare/v9.9.0...v10.0.0) (2022-05-18) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8c848181ef3..5875ff4d4fd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.0.0", + "version": "10.0.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 3b80c65dc55..9bc1c535040 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.0.0", + "version": "10.0.1", "language": "TYPESCRIPT", "apis": [ { From 320fd954ab5350dba2631333dbd6d2b1d4f8c57c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 25 May 2022 18:53:24 +0200 Subject: [PATCH 0877/1029] fix(deps): update dependency @google-cloud/storage to v6 (#1283) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5875ff4d4fd..0c2cf672159 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -64,7 +64,7 @@ "devDependencies": { "@google-cloud/bigquery": "^5.0.0", "@google-cloud/pubsub": "^2.0.0", - "@google-cloud/storage": "^5.0.0", + "@google-cloud/storage": "^6.0.0", "@types/extend": "^3.0.1", "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", From cb79b2cd79ae73748e0cdabbcdde3f677a64d434 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 09:42:57 -0700 Subject: [PATCH 0878/1029] chore(main): release 10.0.2 (#1284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.0.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index fc1769cd3b3..161e0ba30e2 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +### [10.0.2](https://github.com/googleapis/nodejs-logging/compare/v10.0.1...v10.0.2) (2022-05-25) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/storage to v6 ([#1283](https://github.com/googleapis/nodejs-logging/issues/1283)) ([090a9fb](https://github.com/googleapis/nodejs-logging/commit/090a9fbeff6253634335225c434731d4fff1d073)) + ### [10.0.1](https://github.com/googleapis/nodejs-logging/compare/v10.0.0...v10.0.1) (2022-05-20) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0c2cf672159..818ac4c816c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.0.1", + "version": "10.0.2", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 9bc1c535040..59f20e92a32 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.0.1", + "version": "10.0.2", "language": "TYPESCRIPT", "apis": [ { From d9b96efc3e8e1027e9dc9d19af224909ee7fac82 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 27 May 2022 18:24:10 +0200 Subject: [PATCH 0879/1029] chore(deps): update dependency @google-cloud/pubsub to v3 (#1285) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 818ac4c816c..731f39a9f53 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -63,7 +63,7 @@ }, "devDependencies": { "@google-cloud/bigquery": "^5.0.0", - "@google-cloud/pubsub": "^2.0.0", + "@google-cloud/pubsub": "^3.0.0", "@google-cloud/storage": "^6.0.0", "@types/extend": "^3.0.1", "@types/mocha": "^9.0.0", From 7f8c660327a575b94a70474be485af23cedf20e8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 31 May 2022 23:12:15 +0200 Subject: [PATCH 0880/1029] chore(deps): update dependency @google-cloud/bigquery to v6 (#1288) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 731f39a9f53..b752bb4282d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -62,7 +62,7 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@google-cloud/bigquery": "^5.0.0", + "@google-cloud/bigquery": "^6.0.0", "@google-cloud/pubsub": "^3.0.0", "@google-cloud/storage": "^6.0.0", "@types/extend": "^3.0.1", From 826d95ea87019b85331af0addfb8224988d3faa1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 10:27:33 -0700 Subject: [PATCH 0881/1029] fix: fixes for dynamic routing and streaming descriptors (#1282) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: fixes for dynamic routing and streaming descriptors Use gapic-generator-typescript v2.14.5. PiperOrigin-RevId: 450616838 Source-Link: https://github.com/googleapis/googleapis/commit/7a47b72791e0b84d78beca4c2b26bec42ce31572 Source-Link: https://github.com/googleapis/googleapis-gen/commit/42cc6331bae0b99f61b8e01ae15b05211716c4f9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDJjYzYzMzFiYWUwYjk5ZjYxYjhlMDFhZTE1YjA1MjExNzE2YzRmOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Failure due to broken link There is a failure related to missing docs/_static/guide-me.svg Co-authored-by: Owl Bot Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/src/v2/logging_service_v2_client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index c3d839d7785..b7e16e50fae 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -286,7 +286,8 @@ export class LoggingServiceV2Client { // Provide descriptors for these. this.descriptors.stream = { tailLogEntries: new this._gaxModule.StreamDescriptor( - gax.StreamType.BIDI_STREAMING + gax.StreamType.BIDI_STREAMING, + opts.fallback === 'rest' ), }; From 66c6d2676e7b54d94f2c80e935de7e68e75497e2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 14:47:42 -0700 Subject: [PATCH 0882/1029] chore(main): release 10.0.3 (#1289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.0.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 161e0ba30e2..6beb9530e17 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.0.3](https://github.com/googleapis/nodejs-logging/compare/v10.0.2...v10.0.3) (2022-06-01) + + +### Bug Fixes + +* fixes for dynamic routing and streaming descriptors ([#1282](https://github.com/googleapis/nodejs-logging/issues/1282)) ([fd0acfc](https://github.com/googleapis/nodejs-logging/commit/fd0acfc7bf41296237af3ec9deca1c0725ebc0dc)) + ### [10.0.2](https://github.com/googleapis/nodejs-logging/compare/v10.0.1...v10.0.2) (2022-05-25) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b752bb4282d..0be64e35ef9 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.0.2", + "version": "10.0.3", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 59f20e92a32..9368dbb2a3f 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.0.2", + "version": "10.0.3", "language": "TYPESCRIPT", "apis": [ { From 96ee6c495e9fa2a0f9993c29d2bf74365b393238 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 22:08:18 +0000 Subject: [PATCH 0883/1029] build(node): add new jsteam + enforce branches up-to-date (#1451) (#1291) Source-Link: https://github.com/googleapis/synthtool/commit/cd785291d51d97003d1263056cd2b9de1849a0ab Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ddb19a6df6c1fa081bc99fb29658f306dd64668bc26f75d1353b28296f3a78e6 --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- handwritten/logging/.github/sync-repo-settings.yaml | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 9acbabb1b4c..f3ca5561cb5 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:b9e4584a1fe3c749e3c37c92497b13dce653b2e694f0261f0610eb0e15941357 -# created: 2022-05-05T21:08:42.530332893Z + digest: sha256:ddb19a6df6c1fa081bc99fb29658f306dd64668bc26f75d1353b28296f3a78e6 +# created: 2022-06-07T21:18:30.024751809Z diff --git a/handwritten/logging/.github/sync-repo-settings.yaml b/handwritten/logging/.github/sync-repo-settings.yaml index d1e8b5e6e1a..4a30a08e54c 100644 --- a/handwritten/logging/.github/sync-repo-settings.yaml +++ b/handwritten/logging/.github/sync-repo-settings.yaml @@ -3,7 +3,7 @@ branchProtectionRules: isAdminEnforced: true requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true - requiresStrictStatusChecks: false + requiresStrictStatusChecks: true requiredStatusCheckContexts: - "ci/kokoro: Samples test" - "ci/kokoro: System test" @@ -15,3 +15,10 @@ branchProtectionRules: - cla/google - windows - OwlBot Post Processor +permissionRules: + - team: yoshi-admins + permission: admin + - team: jsteam-admins + permission: admin + - team: jsteam + permission: push From 9674b55d4d7ebbd1cc893151b5e478b837d3e8c7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 16:54:23 +0200 Subject: [PATCH 0884/1029] chore(deps): update dependency jsdoc-fresh to v2 (#1293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0be64e35ef9..5535cfd392c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -79,7 +79,7 @@ "gts": "^3.1.0", "http2spy": "^2.0.0", "jsdoc": "^3.6.3", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^1.0.4", "linkinator": "^2.0.3", "mocha": "^9.2.2", From 00ca282ad677fd44784518f6bac2db7a39285332 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 17:30:17 +0200 Subject: [PATCH 0885/1029] chore(deps): update dependency jsdoc-region-tag to v2 (#1294) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.4` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 5535cfd392c..0f66f6d6a27 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -80,7 +80,7 @@ "http2spy": "^2.0.0", "jsdoc": "^3.6.3", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^1.0.4", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.0.3", "mocha": "^9.2.2", "nock": "^13.0.0", From 4e9432454da509ac1262891952b8cdb049787e59 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 11 Jun 2022 01:56:37 +0200 Subject: [PATCH 0886/1029] fix(deps): update dependency @google-cloud/common to v4 (#1295) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0f66f6d6a27..cc697da4033 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -45,7 +45,7 @@ "postpublish": "./.kokoro/publish-min.sh" }, "dependencies": { - "@google-cloud/common": "^3.4.1", + "@google-cloud/common": "^4.0.0", "@google-cloud/paginator": "^4.0.0", "@google-cloud/projectify": "^2.0.0", "@google-cloud/promisify": "^3.0.0", From 9b331b4ac3174413fda37f2417bb940fd813c765 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 12 Jun 2022 19:26:53 +0200 Subject: [PATCH 0887/1029] fix(deps): update dependency @google-cloud/projectify to v3 (#1296) Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index cc697da4033..0f7046a216a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -47,7 +47,7 @@ "dependencies": { "@google-cloud/common": "^4.0.0", "@google-cloud/paginator": "^4.0.0", - "@google-cloud/projectify": "^2.0.0", + "@google-cloud/projectify": "^3.0.0", "@google-cloud/promisify": "^3.0.0", "arrify": "^2.0.1", "dot-prop": "^6.0.0", From b031dc248301316ac2f02862a55b2bc3762659ba Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sun, 12 Jun 2022 12:28:28 -0700 Subject: [PATCH 0888/1029] chore(main): release 10.0.4 (#1297) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.0.4 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 6beb9530e17..7da0a907e30 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.0.4](https://github.com/googleapis/nodejs-logging/compare/v10.0.3...v10.0.4) (2022-06-12) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/common to v4 ([#1295](https://github.com/googleapis/nodejs-logging/issues/1295)) ([15fb8b8](https://github.com/googleapis/nodejs-logging/commit/15fb8b8e424f89a702a5e3cf5d48e63ee40010db)) +* **deps:** update dependency @google-cloud/projectify to v3 ([#1296](https://github.com/googleapis/nodejs-logging/issues/1296)) ([5e99ce1](https://github.com/googleapis/nodejs-logging/commit/5e99ce1ac6db05fd07dc7bd1447fe28a88073227)) + ## [10.0.3](https://github.com/googleapis/nodejs-logging/compare/v10.0.2...v10.0.3) (2022-06-01) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0f7046a216a..3b3e157e228 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.0.3", + "version": "10.0.4", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 9368dbb2a3f..ff558875fb6 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.0.3", + "version": "10.0.4", "language": "TYPESCRIPT", "apis": [ { From c7535ad442183efac1b3f97ae5dd03a5b3e68907 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 14:32:22 -0400 Subject: [PATCH 0889/1029] feat: support regapic LRO PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 Source-Link: https://github.com/googleapis/googleapis/commit/ae65014049c6eb195741d7efbd0b10bee3f83d4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/b09ede435cce110446d4ab9f62a081b571d37e3f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjA5ZWRlNDM1Y2NlMTEwNDQ2ZDRhYjlmNjJhMDgxYjU3MWQzN2UzZiJ9 Co-authored-by: Owl Bot --- handwritten/logging/.jsdoc.js | 7 +- .../src/v2/config_service_v2_client.ts | 71 +++++++++++++++---- .../src/v2/logging_service_v2_client.ts | 12 ++-- .../src/v2/metrics_service_v2_client.ts | 11 ++- 4 files changed, 70 insertions(+), 31 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 6f0d1a05123..4f21ce13da9 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -46,12 +46,7 @@ module.exports = { systemName: '@google-cloud/logging', theme: 'lumen', default: { - outputSourceFiles: false, - staticFiles: { - include: [ - '_static' - ] - } + outputSourceFiles: false } }, markdown: { diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index a9a55db3dfe..532547045d7 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -72,7 +73,7 @@ export class ConfigServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -95,11 +96,10 @@ export class ConfigServiceV2Client { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -291,16 +291,63 @@ export class ConfigServiceV2Client { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v2/{name=*/*/locations/*/operations/*}:cancel', + body: '*', + additional_bindings: [ + { + post: '/v2/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + post: '/v2/{name=organizations/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + post: '/v2/{name=folders/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + post: '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v2/{name=*/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/v2/{name=projects/*/locations/*/operations/*}'}, + {get: '/v2/{name=organizations/*/locations/*/operations/*}'}, + {get: '/v2/{name=folders/*/locations/*/operations/*}'}, + {get: '/v2/{name=billingAccounts/*/operations/*}'}, + ], + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v2/{name=*/*/locations/*}/operations', + additional_bindings: [ + {get: '/v2/{name=projects/*/locations/*}/operations'}, + {get: '/v2/{name=organizations/*/locations/*}/operations'}, + {get: '/v2/{name=folders/*/locations/*}/operations'}, + {get: '/v2/{name=billingAccounts/*/locations/*}/operations'}, + ], + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const copyLogEntriesResponse = protoFilesRoot.lookup( '.google.logging.v2.CopyLogEntriesResponse' diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index b7e16e50fae..4c2c774a80c 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -72,7 +72,7 @@ export class LoggingServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -95,11 +95,10 @@ export class LoggingServiceV2Client { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -292,7 +291,6 @@ export class LoggingServiceV2Client { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // Some methods on this API support automatically batching // requests; denote this. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 53055f9a0af..9a8155df748 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -70,7 +70,7 @@ export class MetricsServiceV2Client { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -93,11 +93,10 @@ export class MetricsServiceV2Client { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From c1d2292dd0194545f59acb7ffd8d2408651b2e49 Mon Sep 17 00:00:00 2001 From: Drew Brown Date: Mon, 11 Jul 2022 11:00:17 -0700 Subject: [PATCH 0890/1029] fix: Change image in readme to a static link (#1306) Fixes #1303 --- handwritten/logging/.readme-partials.yml | 2 +- handwritten/logging/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index c267c7f3a71..6586b5f9134 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -13,7 +13,7 @@ introduction: |- For an interactive tutorial on using the client library in a Node.js application, click Guide Me: - [![Guide Me](_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-nodejs) + [![Guide Me](https://raw.githubusercontent.com/googleapis/nodejs-logging/main/_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-nodejs) body: |- ## Batching Writes diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 634f09cd2f8..37f8b1336b7 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -24,7 +24,7 @@ npm install @google-cloud/logging-min For an interactive tutorial on using the client library in a Node.js application, click Guide Me: -[![Guide Me](_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-nodejs) +[![Guide Me](https://raw.githubusercontent.com/googleapis/nodejs-logging/main/_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-nodejs) A comprehensive list of changes in each version may be found in From ee52ea63f185ddadfab120883459d30cf40dc3f6 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Mon, 11 Jul 2022 13:04:53 -0700 Subject: [PATCH 0891/1029] fix: Logging to stdout in Cloud Run creates a JSON object as "message" (#1305) * fix: Logging to stdout in Cloud Run creates a JSON object as "message" * Add test * Add comments to code * Add more tests to cover different data types --- handwritten/logging/src/entry.ts | 43 +++++++++++++++++++++++++---- handwritten/logging/src/log-sync.ts | 21 ++++++++++++-- handwritten/logging/test/entry.ts | 23 +++++++++++++++ 3 files changed, 79 insertions(+), 8 deletions(-) diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 081d74b1611..c3abae5f5cf 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -86,6 +86,8 @@ export interface StructuredJson { // Properties not supported by all agents (e.g. Cloud Run, Functions) logName?: string; resource?: object; + // Properties to be stored in jsonPayload when running in serverless (e.g. Cloud Run , Functions) + [key: string]: unknown; } export interface ToJsonOptions { @@ -202,7 +204,7 @@ class Entry { toJSON(options: ToJsonOptions = {}, projectId = '') { const entry: EntryJson = extend(true, {}, this.metadata) as {} as EntryJson; // Format log message - if (Object.prototype.toString.call(this.data) === '[object Object]') { + if (this.isObject(this.data)) { entry.jsonPayload = objToStruct(this.data, { removeCircular: !!options.removeCircular, stringify: true, @@ -243,7 +245,7 @@ class Entry { * Serialize an entry to a standard format for any transports, e.g. agents. * Read more: https://cloud.google.com/logging/docs/structured-logging */ - toStructuredJSON(projectId = '') { + toStructuredJSON(projectId = '', useMessageField = true) { const meta = this.metadata; // Mask out the keys that need to be renamed. /* eslint-disable @typescript-eslint/no-unused-vars */ @@ -260,7 +262,7 @@ class Entry { ...validKeys } = meta; /* eslint-enable @typescript-eslint/no-unused-vars */ - const entry: StructuredJson = extend(true, {}, validKeys) as {}; + let entry: StructuredJson = extend(true, {}, validKeys) as {}; // Re-map keys names. entry[LABELS_KEY] = meta.labels ? Object.assign({}, meta.labels) @@ -273,9 +275,29 @@ class Entry { ? meta.traceSampled : undefined; // Format log payload. - entry.message = - meta.textPayload || meta.jsonPayload || meta.protoPayload || undefined; - entry.message = this.data || entry.message; + const data = + this.data || + meta.textPayload || + meta.jsonPayload || + meta.protoPayload || + undefined; + if (useMessageField) { + /** If useMessageField is set, we add the payload to {@link StructuredJson#message} field.*/ + entry.message = data; + } else { + /** useMessageField is false, we add the structured payload to {@link StructuredJson} key-value map. + * It could be especially useful for serverless environments like Cloud Run/Functions when stdout transport is used. + * Note that text still added to {@link StructuredJson#message} field for text payload since it does not have fields within. */ + if (data !== undefined && data !== null) { + if (this.isObject(data)) { + entry = extend(true, {}, entry, data); + } else if (typeof data === 'string') { + entry.message = data; + } else { + entry.message = JSON.stringify(data); + } + } + } // Format timestamp if (meta.timestamp instanceof Date) { entry.timestamp = meta.timestamp.toISOString(); @@ -333,6 +355,15 @@ class Entry { } return serializedEntry; } + + /** + * Determines whether `value` is a JavaScript object. + * @param value The value to be checked + * @returns true if `value` is a JavaScript object, false otherwise + */ + private isObject(value: unknown): value is object { + return Object.prototype.toString.call(value) === '[object Object]'; + } } /** diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts index 807a8eb120d..65cba7fbd4b 100644 --- a/handwritten/logging/src/log-sync.ts +++ b/handwritten/logging/src/log-sync.ts @@ -30,6 +30,12 @@ import { WriteOptions, } from './utils/log-common'; +export interface LogSyncOptions { + // The flag indicating if "message" field should be used to store structured, + // non-text data inside jsonPayload field. By default this value is true + useMessageField?: boolean; +} + /** * A logSync is a named collection of entries in structured log format. In Cloud * Logging, structured logs refer to log entries that use the jsonPayload field @@ -61,9 +67,16 @@ class LogSync implements LogSeverityFunctions { logging: Logging; name: string; transport: Writable; + useMessageField_: boolean; // not projectId, formattedname is expected - constructor(logging: Logging, name: string, transport?: Writable) { + constructor( + logging: Logging, + name: string, + transport?: Writable, + options?: LogSyncOptions + ) { + options = options || {}; this.formattedName_ = formatLogName(logging.projectId, name); this.logging = logging; /** @@ -73,6 +86,7 @@ class LogSync implements LogSeverityFunctions { this.name = this.formattedName_.split('/').pop()!; // Default to writing to stdout this.transport = transport || process.stdout; + this.useMessageField_ = options.useMessageField ?? true; } /** @@ -417,7 +431,10 @@ class LogSync implements LogSeverityFunctions { if (!(entry instanceof Entry)) { entry = this.entry(entry); } - return entry.toStructuredJSON(this.logging.projectId); + return entry.toStructuredJSON( + this.logging.projectId, + this.useMessageField_ + ); }); for (const entry of structuredEntries) { entry.logName = this.formattedName_; diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index f1c5da9228c..af458dd0eec 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -368,5 +368,28 @@ describe('Entry', () => { assert.strictEqual(json[entryTypes.SPAN_ID_KEY], '1'); assert.strictEqual(json[entryTypes.TRACE_SAMPLED_KEY], false); }); + + it('should add message field for structured data', () => { + entry.data = {message: 'message', test: 'test'}; + let json = entry.toStructuredJSON(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + assert(((json.message as any).message = 'message')); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + assert(((json.message as any).test = 'test')); + json = entry.toStructuredJSON(undefined, false); + assert((json.message = 'message')); + assert((json.test = 'test')); + }); + + it('should add message field only when needed', () => { + entry.data = 1; + let json = entry.toStructuredJSON(); + assert((json.message = '1')); + json = entry.toStructuredJSON(undefined, false); + assert((json.message = '1')); + entry.data = 'test'; + json = entry.toStructuredJSON(undefined, false); + assert((json.message = 'test')); + }); }); }); From 0a2891c81c86d38d292a4146af29cc48d74f56b8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Jul 2022 13:34:34 -0700 Subject: [PATCH 0892/1029] chore(main): release 10.1.0 (#1302) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 13 +++++++++++++ handwritten/logging/package.json | 2 +- .../v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 7da0a907e30..bb4c8ed799e 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,19 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.0](https://github.com/googleapis/nodejs-logging/compare/v10.0.4...v10.1.0) (2022-07-11) + + +### Features + +* support regapic LRO ([e702831](https://github.com/googleapis/nodejs-logging/commit/e7028312c5762e1e75abe9972d1c9bc07ed540fe)) + + +### Bug Fixes + +* Change image in readme to a static link ([#1306](https://github.com/googleapis/nodejs-logging/issues/1306)) ([7f778db](https://github.com/googleapis/nodejs-logging/commit/7f778db8d024831f395d2537aeb62807257e3f53)), closes [#1303](https://github.com/googleapis/nodejs-logging/issues/1303) +* Logging to stdout in Cloud Run creates a JSON object as "message" ([#1305](https://github.com/googleapis/nodejs-logging/issues/1305)) ([cb5f424](https://github.com/googleapis/nodejs-logging/commit/cb5f424d1d5a1876927a79f284646814f9c0ad9d)) + ## [10.0.4](https://github.com/googleapis/nodejs-logging/compare/v10.0.3...v10.0.4) (2022-06-12) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3b3e157e228..3a97ceea877 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.0.4", + "version": "10.1.0", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index ff558875fb6..836e83b903c 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.0.4", + "version": "10.1.0", "language": "TYPESCRIPT", "apis": [ { From 9f821d63fe600ee5717943fad3311e68c1ed850c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 11 Jul 2022 22:58:43 +0200 Subject: [PATCH 0893/1029] chore(deps): update dependency linkinator to v4 (#1304) Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3a97ceea877..c5eba4ac2ad 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -81,7 +81,7 @@ "jsdoc": "^3.6.3", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.0.3", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "nock": "^13.0.0", "null-loader": "^4.0.0", From 889eafe910c57c9c4b83b358d700269acd7484a9 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Thu, 14 Jul 2022 14:43:50 -0700 Subject: [PATCH 0894/1029] fix: Add LogSyncOptions parameter to Logging.logSync() API (#1307) --- handwritten/logging/src/index.ts | 7 ++++--- handwritten/logging/test/index.ts | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 0cf026a6227..e229e1b37a3 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -49,7 +49,7 @@ import { assignSeverityToEntries, } from './utils/log-common'; import {Log, GetEntriesRequest, TailEntriesRequest, LogOptions} from './log'; -import {LogSync} from './log-sync'; +import {LogSync, LogSyncOptions} from './log-sync'; import {Sink} from './sink'; import {Duplex, PassThrough, Transform, Writable} from 'stream'; import {google} from '../protos/protos'; @@ -1251,6 +1251,7 @@ class Logging { * * @param {string} name Name of the existing log. * @param {object} transport An optional write stream. + * @param {LogSyncOptions} options An optional configuration object. * @returns {LogSync} * * @example @@ -1266,8 +1267,8 @@ class Logging { * const log = logging.logSync('my-log'); * ``` */ - logSync(name: string, transport?: Writable) { - return new LogSync(this, name, transport); + logSync(name: string, transport?: Writable, options?: LogSyncOptions) { + return new LogSync(this, name, transport, options); } /** diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index f28553bcd86..3127db6bbf0 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -1234,6 +1234,18 @@ describe('Logging', () => { assert.strictEqual(log.calledWith_[0], logging); assert.strictEqual(log.calledWith_[1], NAME); }); + + it('should pass useMessageField properly', () => { + const log = logging.logSync(NAME, undefined, { + useMessageField: false, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + }) as any; + assert(log instanceof FakeLog); + assert.strictEqual(log.calledWith_[0], logging); + assert.strictEqual(log.calledWith_[1], NAME); + assert.strictEqual(log.calledWith_[2], undefined); + assert.strictEqual(log.calledWith_[3].useMessageField, false); + }); }); describe('request', () => { From 2f5b6e29e8338e5990fc7fa88b2cc0962922d427 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Jul 2022 15:21:22 -0700 Subject: [PATCH 0895/1029] chore(main): release 10.1.1 (#1308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index bb4c8ed799e..f6e24ba6e35 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.1](https://github.com/googleapis/nodejs-logging/compare/v10.1.0...v10.1.1) (2022-07-14) + + +### Bug Fixes + +* Add LogSyncOptions parameter to Logging.logSync() API ([#1307](https://github.com/googleapis/nodejs-logging/issues/1307)) ([89408b0](https://github.com/googleapis/nodejs-logging/commit/89408b0c18a6947ee68da77424e23ac06708b54e)) + ## [10.1.0](https://github.com/googleapis/nodejs-logging/compare/v10.0.4...v10.1.0) (2022-07-11) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c5eba4ac2ad..f22719bc371 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.0", + "version": "10.1.1", "description": "Stackdriver Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 836e83b903c..6d2b82033d9 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.0", + "version": "10.1.1", "language": "TYPESCRIPT", "apis": [ { From 663f18320866084ff847f3e8f8ccee1e31f352de Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 17:44:59 -0700 Subject: [PATCH 0896/1029] fix: better support for fallback mode (#1312) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: better support for fallback mode PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../v2/config_service_v2.copy_log_entries.js | 3 + .../v2/config_service_v2.create_bucket.js | 3 + .../v2/config_service_v2.create_exclusion.js | 3 + .../v2/config_service_v2.create_sink.js | 3 + .../v2/config_service_v2.create_view.js | 3 + .../v2/config_service_v2.delete_bucket.js | 3 + .../v2/config_service_v2.delete_exclusion.js | 3 + .../v2/config_service_v2.delete_sink.js | 3 + .../v2/config_service_v2.delete_view.js | 3 + .../v2/config_service_v2.get_bucket.js | 3 + .../v2/config_service_v2.get_cmek_settings.js | 3 + .../v2/config_service_v2.get_exclusion.js | 3 + .../v2/config_service_v2.get_settings.js | 3 + .../v2/config_service_v2.get_sink.js | 3 + .../v2/config_service_v2.get_view.js | 3 + .../v2/config_service_v2.list_buckets.js | 3 + .../v2/config_service_v2.list_exclusions.js | 3 + .../v2/config_service_v2.list_sinks.js | 3 + .../v2/config_service_v2.list_views.js | 3 + .../v2/config_service_v2.undelete_bucket.js | 3 + .../v2/config_service_v2.update_bucket.js | 3 + .../config_service_v2.update_cmek_settings.js | 3 + .../v2/config_service_v2.update_exclusion.js | 3 + .../v2/config_service_v2.update_settings.js | 3 + .../v2/config_service_v2.update_sink.js | 3 + .../v2/config_service_v2.update_view.js | 3 + .../v2/logging_service_v2.delete_log.js | 3 + .../v2/logging_service_v2.list_log_entries.js | 3 + .../v2/logging_service_v2.list_logs.js | 3 + ..._v2.list_monitored_resource_descriptors.js | 3 + .../v2/logging_service_v2.tail_log_entries.js | 3 + .../logging_service_v2.write_log_entries.js | 3 + .../metrics_service_v2.create_log_metric.js | 3 + .../metrics_service_v2.delete_log_metric.js | 3 + .../v2/metrics_service_v2.get_log_metric.js | 3 + .../v2/metrics_service_v2.list_log_metrics.js | 3 + .../metrics_service_v2.update_log_metric.js | 3 + .../snippet_metadata.google.logging.v2.json | 74 ++++---- .../src/v2/config_service_v2_client.ts | 22 +-- .../src/v2/logging_service_v2_client.ts | 16 +- .../src/v2/metrics_service_v2_client.ts | 8 +- .../test/gapic_config_service_v2_v2.ts | 160 +++++++++--------- .../test/gapic_logging_service_v2_v2.ts | 160 +++++++++--------- .../test/gapic_metrics_service_v2_v2.ts | 160 +++++++++--------- 44 files changed, 414 insertions(+), 297 deletions(-) diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js index b942f56e3cb..80fb4788f68 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js @@ -21,6 +21,9 @@ function main(name, destination) { // [START logging_v2_generated_ConfigServiceV2_CopyLogEntries_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js index 329b6140286..83ef09edd4f 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js @@ -21,6 +21,9 @@ function main(parent, bucketId, bucket) { // [START logging_v2_generated_ConfigServiceV2_CreateBucket_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js index 45d26b63f55..a78f3cd1efa 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js @@ -21,6 +21,9 @@ function main(parent, exclusion) { // [START logging_v2_generated_ConfigServiceV2_CreateExclusion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js index 34ddc52c074..f9c38b6bc05 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js @@ -21,6 +21,9 @@ function main(parent, sink) { // [START logging_v2_generated_ConfigServiceV2_CreateSink_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js index 3cbb9e67351..b1a65978c42 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js @@ -21,6 +21,9 @@ function main(parent, viewId, view) { // [START logging_v2_generated_ConfigServiceV2_CreateView_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js index 1fbb46545a4..99a667a087f 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_DeleteBucket_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js index ccfcfb2ff7c..8a3aa7d94e9 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_DeleteExclusion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js index 553c9f6f343..c4f92bfb1d6 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js @@ -21,6 +21,9 @@ function main(sinkName) { // [START logging_v2_generated_ConfigServiceV2_DeleteSink_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js index ccd8288baca..3a82d5f94d6 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_DeleteView_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js index 8c72bce89ed..da62aa90301 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_GetBucket_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js index adc9542b61b..c42efa7931e 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_GetCmekSettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js index 180245ca918..bd036636fbb 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_GetExclusion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js index 184aeb49c72..ee772fe100e 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_GetSettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js index 9f9a0d3dc5e..d4e31e95a13 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js @@ -21,6 +21,9 @@ function main(sinkName) { // [START logging_v2_generated_ConfigServiceV2_GetSink_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js index 4ad0fc4a2c0..7a736f6c720 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_GetView_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js index 8a7a73908cf..d882c8ef991 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js @@ -21,6 +21,9 @@ function main(parent) { // [START logging_v2_generated_ConfigServiceV2_ListBuckets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js index 939385d74b1..13af69cb873 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js @@ -21,6 +21,9 @@ function main(parent) { // [START logging_v2_generated_ConfigServiceV2_ListExclusions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js index 25424f3e228..529cc02c968 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js @@ -21,6 +21,9 @@ function main(parent) { // [START logging_v2_generated_ConfigServiceV2_ListSinks_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js index 3fa4f9ce532..5a3290819ea 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js @@ -21,6 +21,9 @@ function main(parent) { // [START logging_v2_generated_ConfigServiceV2_ListViews_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js index 30a6935c54a..f49964da8e8 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js @@ -21,6 +21,9 @@ function main(name) { // [START logging_v2_generated_ConfigServiceV2_UndeleteBucket_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js index 31222974b38..a768e2948b2 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js @@ -21,6 +21,9 @@ function main(name, bucket, updateMask) { // [START logging_v2_generated_ConfigServiceV2_UpdateBucket_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js index a2fb3356dce..afc430314e5 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js @@ -21,6 +21,9 @@ function main(name, cmekSettings) { // [START logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js index 0bef0516026..70c07f2b056 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js @@ -21,6 +21,9 @@ function main(name, exclusion, updateMask) { // [START logging_v2_generated_ConfigServiceV2_UpdateExclusion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js index cfbdb18e92a..b5f9a9dcd4f 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js @@ -21,6 +21,9 @@ function main(name, settings) { // [START logging_v2_generated_ConfigServiceV2_UpdateSettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js index 9132584dc84..dbb4b8eb8b9 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js @@ -21,6 +21,9 @@ function main(sinkName, sink) { // [START logging_v2_generated_ConfigServiceV2_UpdateSink_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js index 2f98c824d88..efcf7cd24e3 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js @@ -21,6 +21,9 @@ function main(name, view) { // [START logging_v2_generated_ConfigServiceV2_UpdateView_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js index 99bc7875487..94e351fd2e0 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js @@ -21,6 +21,9 @@ function main(logName) { // [START logging_v2_generated_LoggingServiceV2_DeleteLog_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js index f0992952989..d958d6f9758 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js @@ -21,6 +21,9 @@ function main(resourceNames) { // [START logging_v2_generated_LoggingServiceV2_ListLogEntries_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js index ed0d28a1ac2..aafc050a8bb 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js @@ -21,6 +21,9 @@ function main(parent) { // [START logging_v2_generated_LoggingServiceV2_ListLogs_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js index 71e2931bb15..026e736e8aa 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -21,6 +21,9 @@ function main() { // [START logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js index 6f0146e44d4..4b115b06f98 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js @@ -21,6 +21,9 @@ function main(resourceNames) { // [START logging_v2_generated_LoggingServiceV2_TailLogEntries_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js index b3e7e59cdc4..cfa5d2aa89d 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js @@ -21,6 +21,9 @@ function main(entries) { // [START logging_v2_generated_LoggingServiceV2_WriteLogEntries_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js index 32a4f35ffd3..7b38bfc84aa 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js @@ -21,6 +21,9 @@ function main(parent, metric) { // [START logging_v2_generated_MetricsServiceV2_CreateLogMetric_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js index db0c2667eab..f1093021f47 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js @@ -21,6 +21,9 @@ function main(metricName) { // [START logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js index fddd84930e9..6711f4bae2c 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js @@ -21,6 +21,9 @@ function main(metricName) { // [START logging_v2_generated_MetricsServiceV2_GetLogMetric_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js index cab64828598..fffc1b8807c 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js @@ -21,6 +21,9 @@ function main(parent) { // [START logging_v2_generated_MetricsServiceV2_ListLogMetrics_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js index 89362b9ffbe..c8f895171f0 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js @@ -21,6 +21,9 @@ function main(metricName, metric) { // [START logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 6d2b82033d9..90563ae69eb 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -158,7 +158,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -206,7 +206,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -246,7 +246,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -286,7 +286,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -334,7 +334,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -374,7 +374,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -422,7 +422,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -470,7 +470,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -510,7 +510,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -558,7 +558,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -598,7 +598,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -646,7 +646,7 @@ "segments": [ { "start": 25, - "end": 90, + "end": 93, "type": "FULL" } ], @@ -698,7 +698,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -738,7 +738,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -786,7 +786,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -826,7 +826,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -870,7 +870,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -918,7 +918,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -958,7 +958,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -998,7 +998,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -1046,7 +1046,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1086,7 +1086,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -1134,7 +1134,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -1182,7 +1182,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -1222,7 +1222,7 @@ "segments": [ { "start": 25, - "end": 116, + "end": 119, "type": "FULL" } ], @@ -1282,7 +1282,7 @@ "segments": [ { "start": 25, - "end": 96, + "end": 99, "type": "FULL" } ], @@ -1338,7 +1338,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1382,7 +1382,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 85, "type": "FULL" } ], @@ -1434,7 +1434,7 @@ "segments": [ { "start": 25, - "end": 80, + "end": 83, "type": "FULL" } ], @@ -1482,7 +1482,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1530,7 +1530,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1570,7 +1570,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -1614,7 +1614,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -1658,7 +1658,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 532547045d7..eafea13f164 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -463,7 +462,8 @@ export class ConfigServiceV2Client { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -2808,7 +2808,7 @@ export class ConfigServiceV2Client { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.copyLogEntries, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.logging.v2.CopyLogEntriesResponse, @@ -2972,7 +2972,7 @@ export class ConfigServiceV2Client { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuckets.createStream( - this.innerApiCalls.listBuckets as gax.GaxCall, + this.innerApiCalls.listBuckets as GaxCall, request, callSettings ); @@ -3034,7 +3034,7 @@ export class ConfigServiceV2Client { this.initialize(); return this.descriptors.page.listBuckets.asyncIterate( this.innerApiCalls['listBuckets'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3183,7 +3183,7 @@ export class ConfigServiceV2Client { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listViews.createStream( - this.innerApiCalls.listViews as gax.GaxCall, + this.innerApiCalls.listViews as GaxCall, request, callSettings ); @@ -3239,7 +3239,7 @@ export class ConfigServiceV2Client { this.initialize(); return this.descriptors.page.listViews.asyncIterate( this.innerApiCalls['listViews'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3392,7 +3392,7 @@ export class ConfigServiceV2Client { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSinks.createStream( - this.innerApiCalls.listSinks as gax.GaxCall, + this.innerApiCalls.listSinks as GaxCall, request, callSettings ); @@ -3450,7 +3450,7 @@ export class ConfigServiceV2Client { this.initialize(); return this.descriptors.page.listSinks.asyncIterate( this.innerApiCalls['listSinks'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3603,7 +3603,7 @@ export class ConfigServiceV2Client { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listExclusions.createStream( - this.innerApiCalls.listExclusions as gax.GaxCall, + this.innerApiCalls.listExclusions as GaxCall, request, callSettings ); @@ -3661,7 +3661,7 @@ export class ConfigServiceV2Client { this.initialize(); return this.descriptors.page.listExclusions.asyncIterate( this.innerApiCalls['listExclusions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 4c2c774a80c..36795d2efa6 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -29,7 +29,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import {PassThrough} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -396,7 +395,8 @@ export class LoggingServiceV2Client { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -930,7 +930,7 @@ export class LoggingServiceV2Client { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogEntries.createStream( - this.innerApiCalls.listLogEntries as gax.GaxCall, + this.innerApiCalls.listLogEntries as GaxCall, request, callSettings ); @@ -1010,7 +1010,7 @@ export class LoggingServiceV2Client { this.initialize(); return this.descriptors.page.listLogEntries.asyncIterate( this.innerApiCalls['listLogEntries'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1154,7 +1154,7 @@ export class LoggingServiceV2Client { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listMonitoredResourceDescriptors.createStream( - this.innerApiCalls.listMonitoredResourceDescriptors as gax.GaxCall, + this.innerApiCalls.listMonitoredResourceDescriptors as GaxCall, request, callSettings ); @@ -1202,7 +1202,7 @@ export class LoggingServiceV2Client { this.initialize(); return this.descriptors.page.listMonitoredResourceDescriptors.asyncIterate( this.innerApiCalls['listMonitoredResourceDescriptors'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1384,7 +1384,7 @@ export class LoggingServiceV2Client { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogs.createStream( - this.innerApiCalls.listLogs as gax.GaxCall, + this.innerApiCalls.listLogs as GaxCall, request, callSettings ); @@ -1456,7 +1456,7 @@ export class LoggingServiceV2Client { this.initialize(); return this.descriptors.page.listLogs.asyncIterate( this.innerApiCalls['listLogs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 9a8155df748..56d33898843 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -28,7 +28,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -344,7 +343,8 @@ export class MetricsServiceV2Client { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -907,7 +907,7 @@ export class MetricsServiceV2Client { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLogMetrics.createStream( - this.innerApiCalls.listLogMetrics as gax.GaxCall, + this.innerApiCalls.listLogMetrics as GaxCall, request, callSettings ); @@ -962,7 +962,7 @@ export class MetricsServiceV2Client { this.initialize(); return this.descriptors.page.listLogMetrics.asyncIterate( this.innerApiCalls['listLogMetrics'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 53dbd2445e7..901770cdba0 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -145,101 +145,103 @@ function stubAsyncIterationCall( } describe('v2.ConfigServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = - configservicev2Module.v2.ConfigServiceV2Client.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - configservicev2Module.v2.ConfigServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = configservicev2Module.v2.ConfigServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + configservicev2Module.v2.ConfigServiceV2Client.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new configservicev2Module.v2.ConfigServiceV2Client(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + configservicev2Module.v2.ConfigServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - fallback: true, + it('has port', () => { + const port = configservicev2Module.v2.ConfigServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client(); + assert(client); }); - assert.strictEqual(client.configServiceV2Stub, undefined); - await client.initialize(); - assert(client.configServiceV2Stub); - }); - it('has close method for the initialized client', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.configServiceV2Stub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.configServiceV2Stub, undefined); + await client.initialize(); + assert(client.configServiceV2Stub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.configServiceV2Stub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.configServiceV2Stub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.configServiceV2Stub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new configservicev2Module.v2.ConfigServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getBucket', () => { diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 99142c85db7..b1111a0e9bd 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -127,101 +127,103 @@ function stubAsyncIterationCall( } describe('v2.LoggingServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = - loggingservicev2Module.v2.LoggingServiceV2Client.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - loggingservicev2Module.v2.LoggingServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = loggingservicev2Module.v2.LoggingServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + loggingservicev2Module.v2.LoggingServiceV2Client.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + loggingservicev2Module.v2.LoggingServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - fallback: true, + it('has port', () => { + const port = loggingservicev2Module.v2.LoggingServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client(); + assert(client); }); - assert.strictEqual(client.loggingServiceV2Stub, undefined); - await client.initialize(); - assert(client.loggingServiceV2Stub); - }); - it('has close method for the initialized client', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.loggingServiceV2Stub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.loggingServiceV2Stub, undefined); + await client.initialize(); + assert(client.loggingServiceV2Stub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.loggingServiceV2Stub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.loggingServiceV2Stub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.loggingServiceV2Stub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('deleteLog', () => { diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 874df85a57b..4c3cb8fa5f7 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -113,101 +113,103 @@ function stubAsyncIterationCall( } describe('v2.MetricsServiceV2Client', () => { - it('has servicePath', () => { - const servicePath = - metricsservicev2Module.v2.MetricsServiceV2Client.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - metricsservicev2Module.v2.MetricsServiceV2Client.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = metricsservicev2Module.v2.MetricsServiceV2Client.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + metricsservicev2Module.v2.MetricsServiceV2Client.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + metricsservicev2Module.v2.MetricsServiceV2Client.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - fallback: true, + it('has port', () => { + const port = metricsservicev2Module.v2.MetricsServiceV2Client.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client(); + assert(client); }); - assert.strictEqual(client.metricsServiceV2Stub, undefined); - await client.initialize(); - assert(client.metricsServiceV2Stub); - }); - it('has close method for the initialized client', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.metricsServiceV2Stub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metricsServiceV2Stub, undefined); + await client.initialize(); + assert(client.metricsServiceV2Stub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.metricsServiceV2Stub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.metricsServiceV2Stub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metricsServiceV2Stub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getLogMetric', () => { From 69b46c5ae2a2e56ab1801bc083c8c3b64e0fe490 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Sat, 20 Aug 2022 03:58:03 +0300 Subject: [PATCH 0897/1029] fix: Instrumentation version contains package.json content (#1310) * fix: Instrumentation version contains package.json content * Fix parameter type * Another type fix --- handwritten/logging/package.json | 2 +- .../logging/src/utils/instrumentation.ts | 20 ++++++++++++++++-- handwritten/logging/test/instrumentation.ts | 21 +++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f22719bc371..b0bb04fc32b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/logging", "version": "10.1.1", - "description": "Stackdriver Logging Client Library for Node.js", + "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", "google api client", diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 2169c7e7cce..c99b08e7340 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -149,11 +149,27 @@ function validateAndUpdateInstrumentation( /** * A helper function to truncate a value (library name or version for example). The value is truncated * when it is longer than {maxLen} chars and '*' is added instead of truncated suffix. - * @param value {string} The value to be truncated. + * @param value {object|string} The value to be truncated. * @param maxLen {number} The max length to be used for truncation. * @returns {string} The truncated value. */ -function truncateValue(value: string, maxLen: number) { +function truncateValue(value: object | string, maxLen: number) { + // Currently there are cases when we get here JSON object instead of string + // Adding here additional validation to see if version still can be retrieved + if (typeof value !== 'string') { + try { + if (Object.prototype.hasOwnProperty.call(value, 'version')) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value = (value as any).version; + } + } catch (err) { + // Ignore error since flow should continue + } + } + // Return 'unknown' if version cannot be retrieved + if (typeof value !== 'string') { + return 'unknown'; + } if (value && value.length > maxLen) { return value.substring(0, maxLen).concat('*'); } diff --git a/handwritten/logging/test/instrumentation.ts b/handwritten/logging/test/instrumentation.ts index b5bd972b623..5ba5700c73c 100644 --- a/handwritten/logging/test/instrumentation.ts +++ b/handwritten/logging/test/instrumentation.ts @@ -51,6 +51,27 @@ describe('instrumentation_info', () => { ); }); + it('should set library version to unknown', () => { + const data = {some: 'value'}; + const entry = instrumentation.createDiagnosticEntry( + undefined, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + data as any + ) as Entry; + assert.equal( + entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + ); + assert.equal( + entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[VERSION], + 'unknown' + ); + }); + it('should add instrumentation log entry to the list', () => { const dummyEntry = createEntry(undefined, undefined); const entries = instrumentation.populateInstrumentationInfo(dummyEntry); From a94682fc5b36cb6e396d544e865de45377996e19 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Sat, 20 Aug 2022 18:44:57 +0300 Subject: [PATCH 0898/1029] fix: maxResults in getEntries looks broken (#1311) --- handwritten/logging/src/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index e229e1b37a3..656e0a6491a 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -592,12 +592,20 @@ class Logging { } delete reqOpts.autoPaginate; delete reqOpts.gaxOptions; - const gaxOptions = extend( + let gaxOptions = extend( { autoPaginate: options!.autoPaginate, }, options!.gaxOptions ); + if (options?.maxResults) { + gaxOptions = extend( + { + maxResults: options.maxResults, + }, + gaxOptions + ); + } const resp = await this.loggingService.listLogEntries(reqOpts, gaxOptions); const [entries] = resp; if (entries) { From d6907208fc486a18e3f76fe545a94a5dfd484722 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 20 Aug 2022 10:28:43 -0700 Subject: [PATCH 0899/1029] chore(main): release 10.1.2 (#1313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 9 +++++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index f6e24ba6e35..845b93dc361 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,15 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.2](https://github.com/googleapis/nodejs-logging/compare/v10.1.1...v10.1.2) (2022-08-20) + + +### Bug Fixes + +* better support for fallback mode ([#1312](https://github.com/googleapis/nodejs-logging/issues/1312)) ([91c1222](https://github.com/googleapis/nodejs-logging/commit/91c1222c0a4183776a20e2f5266f577bc4614a6d)) +* Instrumentation version contains package.json content ([#1310](https://github.com/googleapis/nodejs-logging/issues/1310)) ([01e1286](https://github.com/googleapis/nodejs-logging/commit/01e12860556ba74749bebd73b5ee143c1f922e0d)) +* maxResults in getEntries looks broken ([#1311](https://github.com/googleapis/nodejs-logging/issues/1311)) ([208d994](https://github.com/googleapis/nodejs-logging/commit/208d994ecba2a78e667a63c442bf832abc750cc1)) + ## [10.1.1](https://github.com/googleapis/nodejs-logging/compare/v10.1.0...v10.1.1) (2022-07-14) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b0bb04fc32b..bb575d4e0e7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.1", + "version": "10.1.2", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 90563ae69eb..7120b1b1f58 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.1", + "version": "10.1.2", "language": "TYPESCRIPT", "apis": [ { From 2eb4f0dad96626a355ede743e125ea7ffe7e7b42 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:32:13 +0000 Subject: [PATCH 0900/1029] fix: change import long to require (#1315) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 +- handwritten/logging/protos/protos.d.ts | 1003 ++- handwritten/logging/protos/protos.js | 5898 ++++++++++++----- handwritten/logging/protos/protos.json | 24 + 4 files changed, 5166 insertions(+), 1763 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index f3ca5561cb5..f7c796c60cd 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:ddb19a6df6c1fa081bc99fb29658f306dd64668bc26f75d1353b28296f3a78e6 -# created: 2022-06-07T21:18:30.024751809Z + digest: sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e +# created: 2022-08-22T22:07:00.791732705Z diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 7e8759f0799..477f5bfc528 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -114,6 +114,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorSet. */ @@ -204,6 +211,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -244,6 +258,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -291,6 +308,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -360,6 +380,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -504,6 +531,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -608,6 +642,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -704,6 +745,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -795,6 +843,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -945,6 +1000,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -1073,6 +1135,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -1187,6 +1256,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -1285,6 +1361,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1388,6 +1471,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -1490,6 +1580,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -1610,6 +1707,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -1823,6 +1927,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -1950,6 +2061,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -1967,6 +2085,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -2004,6 +2125,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -2082,6 +2206,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -2189,6 +2320,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -2291,6 +2429,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -2387,6 +2532,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -2489,6 +2641,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -2600,6 +2759,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -2736,6 +2902,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -2834,6 +3007,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2925,6 +3105,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -3041,6 +3228,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3132,6 +3326,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -3150,6 +3351,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -3173,6 +3377,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -3242,6 +3449,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } @@ -3333,6 +3557,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Value. */ @@ -3456,6 +3687,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** NullValue enum. */ @@ -3551,6 +3789,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Any. */ @@ -3647,6 +3892,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Timestamp. */ @@ -3743,6 +3995,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -3827,6 +4086,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldMask. */ @@ -3917,6 +4183,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4098,6 +4371,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** LogSeverity enum. */ @@ -4304,6 +4584,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LogEntryOperation. */ @@ -4412,6 +4699,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogEntryOperation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LogEntrySourceLocation. */ @@ -4514,6 +4808,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogEntrySourceLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LogSplit. */ @@ -4616,6 +4917,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogSplit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents a LoggingServiceV2 */ @@ -4726,42 +5034,42 @@ export namespace google { namespace LoggingServiceV2 { /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|deleteLog}. * @param error Error, if any * @param [response] Empty */ type DeleteLogCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|writeLogEntries}. * @param error Error, if any * @param [response] WriteLogEntriesResponse */ type WriteLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.WriteLogEntriesResponse) => void; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|listLogEntries}. * @param error Error, if any * @param [response] ListLogEntriesResponse */ type ListLogEntriesCallback = (error: (Error|null), response?: google.logging.v2.ListLogEntriesResponse) => void; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|listMonitoredResourceDescriptors}. * @param error Error, if any * @param [response] ListMonitoredResourceDescriptorsResponse */ type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.logging.v2.ListMonitoredResourceDescriptorsResponse) => void; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|listLogs}. * @param error Error, if any * @param [response] ListLogsResponse */ type ListLogsCallback = (error: (Error|null), response?: google.logging.v2.ListLogsResponse) => void; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#tailLogEntries}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|tailLogEntries}. * @param error Error, if any * @param [response] TailLogEntriesResponse */ @@ -4856,6 +5164,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteLogRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteLogEntriesRequest. */ @@ -4976,6 +5291,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteLogEntriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteLogEntriesResponse. */ @@ -5060,6 +5382,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteLogEntriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteLogEntriesPartialErrors. */ @@ -5150,6 +5479,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteLogEntriesPartialErrors + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListLogEntriesRequest. */ @@ -5264,6 +5600,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLogEntriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListLogEntriesResponse. */ @@ -5360,6 +5703,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLogEntriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListMonitoredResourceDescriptorsRequest. */ @@ -5456,6 +5806,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMonitoredResourceDescriptorsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListMonitoredResourceDescriptorsResponse. */ @@ -5552,6 +5909,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMonitoredResourceDescriptorsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListLogsRequest. */ @@ -5660,6 +6024,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLogsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListLogsResponse. */ @@ -5756,6 +6127,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLogsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TailLogEntriesRequest. */ @@ -5858,6 +6236,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TailLogEntriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TailLogEntriesResponse. */ @@ -5954,6 +6339,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TailLogEntriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TailLogEntriesResponse { @@ -6052,6 +6444,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SuppressionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SuppressionInfo { @@ -6453,182 +6852,182 @@ export namespace google { namespace ConfigServiceV2 { /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listBuckets}. * @param error Error, if any * @param [response] ListBucketsResponse */ type ListBucketsCallback = (error: (Error|null), response?: google.logging.v2.ListBucketsResponse) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getBucket}. * @param error Error, if any * @param [response] LogBucket */ type GetBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createBucket}. * @param error Error, if any * @param [response] LogBucket */ type CreateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateBucket}. * @param error Error, if any * @param [response] LogBucket */ type UpdateBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteBucket}. * @param error Error, if any * @param [response] Empty */ type DeleteBucketCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#undeleteBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|undeleteBucket}. * @param error Error, if any * @param [response] Empty */ type UndeleteBucketCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listViews}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listViews}. * @param error Error, if any * @param [response] ListViewsResponse */ type ListViewsCallback = (error: (Error|null), response?: google.logging.v2.ListViewsResponse) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getView}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getView}. * @param error Error, if any * @param [response] LogView */ type GetViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createView}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createView}. * @param error Error, if any * @param [response] LogView */ type CreateViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateView}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateView}. * @param error Error, if any * @param [response] LogView */ type UpdateViewCallback = (error: (Error|null), response?: google.logging.v2.LogView) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteView}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteView}. * @param error Error, if any * @param [response] Empty */ type DeleteViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listSinks}. * @param error Error, if any * @param [response] ListSinksResponse */ type ListSinksCallback = (error: (Error|null), response?: google.logging.v2.ListSinksResponse) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getSink}. * @param error Error, if any * @param [response] LogSink */ type GetSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createSink}. * @param error Error, if any * @param [response] LogSink */ type CreateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateSink}. * @param error Error, if any * @param [response] LogSink */ type UpdateSinkCallback = (error: (Error|null), response?: google.logging.v2.LogSink) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteSink}. * @param error Error, if any * @param [response] Empty */ type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listExclusions}. * @param error Error, if any * @param [response] ListExclusionsResponse */ type ListExclusionsCallback = (error: (Error|null), response?: google.logging.v2.ListExclusionsResponse) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getExclusion}. * @param error Error, if any * @param [response] LogExclusion */ type GetExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createExclusion}. * @param error Error, if any * @param [response] LogExclusion */ type CreateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateExclusion}. * @param error Error, if any * @param [response] LogExclusion */ type UpdateExclusionCallback = (error: (Error|null), response?: google.logging.v2.LogExclusion) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteExclusion}. * @param error Error, if any * @param [response] Empty */ type DeleteExclusionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getCmekSettings}. * @param error Error, if any * @param [response] CmekSettings */ type GetCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateCmekSettings}. * @param error Error, if any * @param [response] CmekSettings */ type UpdateCmekSettingsCallback = (error: (Error|null), response?: google.logging.v2.CmekSettings) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSettings}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getSettings}. * @param error Error, if any * @param [response] Settings */ type GetSettingsCallback = (error: (Error|null), response?: google.logging.v2.Settings) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSettings}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateSettings}. * @param error Error, if any * @param [response] Settings */ type UpdateSettingsCallback = (error: (Error|null), response?: google.logging.v2.Settings) => void; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#copyLogEntries}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|copyLogEntries}. * @param error Error, if any * @param [response] Operation */ @@ -6771,6 +7170,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogBucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LogView. */ @@ -6885,6 +7291,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LogSink. */ @@ -7044,6 +7457,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogSink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace LogSink { @@ -7150,6 +7570,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListBucketsRequest. */ @@ -7252,6 +7679,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBucketsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListBucketsResponse. */ @@ -7348,6 +7782,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBucketsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateBucketRequest. */ @@ -7450,6 +7891,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBucketRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateBucketRequest. */ @@ -7552,6 +8000,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBucketRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetBucketRequest. */ @@ -7642,6 +8097,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBucketRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteBucketRequest. */ @@ -7732,6 +8194,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBucketRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UndeleteBucketRequest. */ @@ -7822,6 +8291,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeleteBucketRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListViewsRequest. */ @@ -7924,6 +8400,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListViewsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListViewsResponse. */ @@ -8020,6 +8503,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListViewsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateViewRequest. */ @@ -8122,6 +8612,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateViewRequest. */ @@ -8224,6 +8721,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetViewRequest. */ @@ -8314,6 +8818,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteViewRequest. */ @@ -8404,6 +8915,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListSinksRequest. */ @@ -8506,6 +9024,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListSinksResponse. */ @@ -8602,6 +9127,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetSinkRequest. */ @@ -8692,6 +9224,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateSinkRequest. */ @@ -8794,6 +9333,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateSinkRequest. */ @@ -8902,6 +9448,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteSinkRequest. */ @@ -8992,6 +9545,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LogExclusion. */ @@ -9112,6 +9672,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListExclusionsRequest. */ @@ -9214,6 +9781,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListExclusionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListExclusionsResponse. */ @@ -9310,6 +9884,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListExclusionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetExclusionRequest. */ @@ -9400,6 +9981,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetExclusionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateExclusionRequest. */ @@ -9496,6 +10084,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateExclusionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateExclusionRequest. */ @@ -9598,6 +10193,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateExclusionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteExclusionRequest. */ @@ -9688,6 +10290,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteExclusionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCmekSettingsRequest. */ @@ -9778,6 +10387,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCmekSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCmekSettingsRequest. */ @@ -9880,6 +10496,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCmekSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CmekSettings. */ @@ -9982,6 +10605,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CmekSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetSettingsRequest. */ @@ -10072,6 +10702,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateSettingsRequest. */ @@ -10174,6 +10811,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Settings. */ @@ -10288,6 +10932,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Settings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CopyLogEntriesRequest. */ @@ -10390,6 +11041,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopyLogEntriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CopyLogEntriesMetadata. */ @@ -10516,6 +11174,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopyLogEntriesMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CopyLogEntriesResponse. */ @@ -10606,6 +11271,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CopyLogEntriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** LifecycleState enum. */ @@ -10720,35 +11392,35 @@ export namespace google { namespace MetricsServiceV2 { /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|listLogMetrics}. * @param error Error, if any * @param [response] ListLogMetricsResponse */ type ListLogMetricsCallback = (error: (Error|null), response?: google.logging.v2.ListLogMetricsResponse) => void; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|getLogMetric}. * @param error Error, if any * @param [response] LogMetric */ type GetLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|createLogMetric}. * @param error Error, if any * @param [response] LogMetric */ type CreateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|updateLogMetric}. * @param error Error, if any * @param [response] LogMetric */ type UpdateLogMetricCallback = (error: (Error|null), response?: google.logging.v2.LogMetric) => void; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|deleteLogMetric}. * @param error Error, if any * @param [response] Empty */ @@ -10903,6 +11575,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogMetric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace LogMetric { @@ -11014,6 +11693,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLogMetricsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListLogMetricsResponse. */ @@ -11110,6 +11796,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLogMetricsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetLogMetricRequest. */ @@ -11200,6 +11893,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetLogMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateLogMetricRequest. */ @@ -11296,6 +11996,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateLogMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateLogMetricRequest. */ @@ -11392,6 +12099,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateLogMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteLogMetricRequest. */ @@ -11482,6 +12196,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteLogMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -11583,6 +12304,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -11730,6 +12458,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -11826,6 +12561,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** FieldBehavior enum. */ @@ -11958,6 +12700,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoredResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MonitoredResource. */ @@ -12054,6 +12803,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoredResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MonitoredResourceMetadata. */ @@ -12150,6 +12906,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoredResourceMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LabelDescriptor. */ @@ -12252,6 +13015,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace LabelDescriptor { @@ -12400,6 +13170,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -12512,6 +13289,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Distribution. */ @@ -12638,6 +13422,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Distribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Distribution { @@ -12736,6 +13527,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Range + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BucketOptions. */ @@ -12841,6 +13639,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BucketOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BucketOptions { @@ -12945,6 +13750,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Linear + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Exponential. */ @@ -13047,6 +13859,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Exponential + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Explicit. */ @@ -13137,6 +13956,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Explicit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -13240,6 +14066,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Exemplar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -13391,6 +14224,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MetricDescriptor { @@ -13495,6 +14335,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricDescriptorMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** MetricKind enum. */ @@ -13611,6 +14458,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -13717,6 +14571,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -13817,35 +14678,35 @@ export namespace google { namespace Operations { /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @param error Error, if any * @param [response] ListOperationsResponse */ type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @param error Error, if any * @param [response] Operation */ type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @param error Error, if any * @param [response] Empty */ type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @param error Error, if any * @param [response] Empty */ type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @param error Error, if any * @param [response] Operation */ @@ -13967,6 +14828,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -14057,6 +14925,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -14165,6 +15040,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -14261,6 +15143,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -14351,6 +15240,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -14441,6 +15337,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -14537,6 +15440,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -14633,6 +15543,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 36135c3345d..1b480c905bf 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -151,12 +151,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -269,6 +271,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -366,11 +383,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -477,6 +495,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -498,6 +531,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -618,6 +652,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -673,6 +715,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -707,66 +751,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -878,6 +938,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -970,6 +1033,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -1001,6 +1066,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1047,6 +1113,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -1061,6 +1129,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -1271,52 +1354,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -1617,6 +1710,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -1731,15 +1839,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1851,6 +1962,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -1957,12 +2083,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2061,6 +2189,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -2161,11 +2304,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -2272,6 +2416,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -2477,39 +2636,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -2796,6 +2966,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -2964,12 +3149,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3073,6 +3260,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -3218,27 +3420,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -3414,6 +3621,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -3517,12 +3739,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3621,6 +3845,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -3741,15 +3980,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3861,6 +4103,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -3980,17 +4237,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4120,6 +4380,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -4270,24 +4545,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -4423,6 +4704,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -4753,76 +5049,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -5135,6 +5453,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -5303,26 +5636,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5476,6 +5815,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -5489,6 +5843,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -5545,6 +5900,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -5621,6 +5984,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -5666,42 +6031,55 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5761,6 +6139,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -5846,6 +6227,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -5933,6 +6316,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -5947,6 +6331,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -5973,6 +6359,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -6102,11 +6503,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6213,6 +6615,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -6332,17 +6749,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6467,6 +6887,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -6575,14 +7010,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6698,6 +7135,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -6828,20 +7280,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6974,6 +7430,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -7128,28 +7599,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7339,6 +7816,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -7518,29 +8010,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7653,7 +8152,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -7734,6 +8233,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -7835,12 +8349,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7941,6 +8457,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -8041,11 +8572,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8152,6 +8684,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -8300,37 +8847,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -8491,6 +9043,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -8591,11 +9158,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8702,6 +9270,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -8712,6 +9295,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -8762,6 +9346,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -8798,6 +9390,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -8832,25 +9426,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -8902,6 +9504,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -8930,6 +9541,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -8952,6 +9577,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -8964,6 +9590,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -8978,6 +9606,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -9080,28 +9739,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.fields[key] = value; + break; } - message.fields[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -9210,6 +9870,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + return Struct; })(); @@ -9374,24 +10049,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.nullValue = reader.int32(); - break; - case 2: - message.numberValue = reader.double(); - break; - case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9575,6 +10256,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + return Value; })(); @@ -9684,11 +10380,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -9795,6 +10492,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + return ListValue; })(); @@ -9901,12 +10613,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -9968,7 +10682,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -10014,6 +10728,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); @@ -10120,12 +10849,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -10238,6 +10969,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -10398,6 +11144,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + return Empty; })(); @@ -10495,11 +11256,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -10601,6 +11363,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -10871,51 +11648,66 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.requestMethod = reader.string(); - break; - case 2: - message.requestUrl = reader.string(); - break; - case 3: - message.requestSize = reader.int64(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.responseSize = reader.int64(); - break; - case 6: - message.userAgent = reader.string(); - break; - case 7: - message.remoteIp = reader.string(); - break; - case 13: - message.serverIp = reader.string(); - break; - case 8: - message.referer = reader.string(); - break; - case 14: - message.latency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 11: - message.cacheLookup = reader.bool(); - break; - case 9: - message.cacheHit = reader.bool(); - break; - case 10: - message.cacheValidatedWithOriginServer = reader.bool(); - break; - case 12: - message.cacheFillBytes = reader.int64(); - break; - case 15: - message.protocol = reader.string(); - break; + case 1: { + message.requestMethod = reader.string(); + break; + } + case 2: { + message.requestUrl = reader.string(); + break; + } + case 3: { + message.requestSize = reader.int64(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 5: { + message.responseSize = reader.int64(); + break; + } + case 6: { + message.userAgent = reader.string(); + break; + } + case 7: { + message.remoteIp = reader.string(); + break; + } + case 13: { + message.serverIp = reader.string(); + break; + } + case 8: { + message.referer = reader.string(); + break; + } + case 14: { + message.latency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.cacheLookup = reader.bool(); + break; + } + case 9: { + message.cacheHit = reader.bool(); + break; + } + case 10: { + message.cacheValidatedWithOriginServer = reader.bool(); + break; + } + case 12: { + message.cacheFillBytes = reader.int64(); + break; + } + case 15: { + message.protocol = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11165,6 +11957,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRequest + * @function getTypeUrl + * @memberof google.logging.type.HttpRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.type.HttpRequest"; + }; + return HttpRequest; })(); @@ -11492,76 +12299,93 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 12: - message.logName = reader.string(); - break; - case 8: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 2: - message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.textPayload = reader.string(); - break; - case 6: - message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 9: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 24: - message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.severity = reader.int32(); - break; - case 4: - message.insertId = reader.string(); - break; - case 7: - message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); - break; - case 11: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 12: { + message.logName = reader.string(); + break; + } + case 8: { + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.protoPayload = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.textPayload = reader.string(); + break; + } + case 6: { + message.jsonPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 9: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 24: { + message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.severity = reader.int32(); + break; + } + case 4: { + message.insertId = reader.string(); + break; + } + case 7: { + message.httpRequest = $root.google.logging.type.HttpRequest.decode(reader, reader.uint32()); + break; + } + case 11: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 15: { + message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); + break; + } + case 22: { + message.trace = reader.string(); + break; + } + case 27: { + message.spanId = reader.string(); + break; + } + case 30: { + message.traceSampled = reader.bool(); + break; + } + case 23: { + message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); + break; + } + case 35: { + message.split = $root.google.logging.v2.LogSplit.decode(reader, reader.uint32()); + break; } - message.labels[key] = value; - break; - case 15: - message.operation = $root.google.logging.v2.LogEntryOperation.decode(reader, reader.uint32()); - break; - case 22: - message.trace = reader.string(); - break; - case 27: - message.spanId = reader.string(); - break; - case 30: - message.traceSampled = reader.bool(); - break; - case 23: - message.sourceLocation = $root.google.logging.v2.LogEntrySourceLocation.decode(reader, reader.uint32()); - break; - case 35: - message.split = $root.google.logging.v2.LogSplit.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -11907,6 +12731,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogEntry + * @function getTypeUrl + * @memberof google.logging.v2.LogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogEntry"; + }; + return LogEntry; })(); @@ -12035,18 +12874,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.producer = reader.string(); - break; - case 3: - message.first = reader.bool(); - break; - case 4: - message.last = reader.bool(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.producer = reader.string(); + break; + } + case 3: { + message.first = reader.bool(); + break; + } + case 4: { + message.last = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -12161,6 +13004,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogEntryOperation + * @function getTypeUrl + * @memberof google.logging.v2.LogEntryOperation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogEntryOperation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogEntryOperation"; + }; + return LogEntryOperation; })(); @@ -12278,15 +13136,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.file = reader.string(); - break; - case 2: - message.line = reader.int64(); - break; - case 3: - message["function"] = reader.string(); - break; + case 1: { + message.file = reader.string(); + break; + } + case 2: { + message.line = reader.int64(); + break; + } + case 3: { + message["function"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12407,6 +13268,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogEntrySourceLocation + * @function getTypeUrl + * @memberof google.logging.v2.LogEntrySourceLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogEntrySourceLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogEntrySourceLocation"; + }; + return LogEntrySourceLocation; })(); @@ -12524,15 +13400,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.uid = reader.string(); - break; - case 2: - message.index = reader.int32(); - break; - case 3: - message.totalSplits = reader.int32(); - break; + case 1: { + message.uid = reader.string(); + break; + } + case 2: { + message.index = reader.int32(); + break; + } + case 3: { + message.totalSplits = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12639,6 +13518,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogSplit + * @function getTypeUrl + * @memberof google.logging.v2.LogSplit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogSplit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogSplit"; + }; + return LogSplit; })(); @@ -12675,7 +13569,7 @@ }; /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#deleteLog}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|deleteLog}. * @memberof google.logging.v2.LoggingServiceV2 * @typedef DeleteLogCallback * @type {function} @@ -12708,7 +13602,7 @@ */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#writeLogEntries}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|writeLogEntries}. * @memberof google.logging.v2.LoggingServiceV2 * @typedef WriteLogEntriesCallback * @type {function} @@ -12741,7 +13635,7 @@ */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogEntries}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|listLogEntries}. * @memberof google.logging.v2.LoggingServiceV2 * @typedef ListLogEntriesCallback * @type {function} @@ -12774,7 +13668,7 @@ */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listMonitoredResourceDescriptors}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|listMonitoredResourceDescriptors}. * @memberof google.logging.v2.LoggingServiceV2 * @typedef ListMonitoredResourceDescriptorsCallback * @type {function} @@ -12807,7 +13701,7 @@ */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#listLogs}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|listLogs}. * @memberof google.logging.v2.LoggingServiceV2 * @typedef ListLogsCallback * @type {function} @@ -12840,7 +13734,7 @@ */ /** - * Callback as used by {@link google.logging.v2.LoggingServiceV2#tailLogEntries}. + * Callback as used by {@link google.logging.v2.LoggingServiceV2|tailLogEntries}. * @memberof google.logging.v2.LoggingServiceV2 * @typedef TailLogEntriesCallback * @type {function} @@ -12967,9 +13861,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.logName = reader.string(); - break; + case 1: { + message.logName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13059,6 +13954,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteLogRequest + * @function getTypeUrl + * @memberof google.logging.v2.DeleteLogRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteLogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.DeleteLogRequest"; + }; + return DeleteLogRequest; })(); @@ -13213,45 +14123,51 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.logName = reader.string(); - break; - case 2: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 3: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.logName = reader.string(); + break; + } + case 2: { + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + } + case 3: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 4: { + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + } + case 5: { + message.partialSuccess = reader.bool(); + break; + } + case 6: { + message.dryRun = reader.bool(); + break; } - message.labels[key] = value; - break; - case 4: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 5: - message.partialSuccess = reader.bool(); - break; - case 6: - message.dryRun = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -13420,6 +14336,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteLogEntriesRequest + * @function getTypeUrl + * @memberof google.logging.v2.WriteLogEntriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteLogEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.WriteLogEntriesRequest"; + }; + return WriteLogEntriesRequest; })(); @@ -13580,6 +14511,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteLogEntriesResponse + * @function getTypeUrl + * @memberof google.logging.v2.WriteLogEntriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteLogEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.WriteLogEntriesResponse"; + }; + return WriteLogEntriesResponse; })(); @@ -13679,28 +14625,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.logEntryErrors === $util.emptyObject) - message.logEntryErrors = {}; - var end2 = reader.uint32() + reader.pos; - key = 0; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.int32(); - break; - case 2: - value = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (message.logEntryErrors === $util.emptyObject) + message.logEntryErrors = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.int32(); + break; + case 2: + value = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.logEntryErrors[key] = value; + break; } - message.logEntryErrors[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -13813,6 +14760,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteLogEntriesPartialErrors + * @function getTypeUrl + * @memberof google.logging.v2.WriteLogEntriesPartialErrors + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteLogEntriesPartialErrors.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.WriteLogEntriesPartialErrors"; + }; + return WriteLogEntriesPartialErrors; })(); @@ -13954,23 +14916,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.orderBy = reader.string(); - break; - case 4: - message.pageSize = reader.int32(); - break; - case 5: - message.pageToken = reader.string(); - break; + case 8: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.orderBy = reader.string(); + break; + } + case 4: { + message.pageSize = reader.int32(); + break; + } + case 5: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14106,6 +15073,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLogEntriesRequest + * @function getTypeUrl + * @memberof google.logging.v2.ListLogEntriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLogEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListLogEntriesRequest"; + }; + return ListLogEntriesRequest; })(); @@ -14214,14 +15196,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14337,6 +15321,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLogEntriesResponse + * @function getTypeUrl + * @memberof google.logging.v2.ListLogEntriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLogEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListLogEntriesResponse"; + }; + return ListLogEntriesResponse; })(); @@ -14443,12 +15442,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pageSize = reader.int32(); - break; - case 2: - message.pageToken = reader.string(); - break; + case 1: { + message.pageSize = reader.int32(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14547,6 +15548,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListMonitoredResourceDescriptorsRequest + * @function getTypeUrl + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMonitoredResourceDescriptorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListMonitoredResourceDescriptorsRequest"; + }; + return ListMonitoredResourceDescriptorsRequest; })(); @@ -14655,14 +15671,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.resourceDescriptors && message.resourceDescriptors.length)) - message.resourceDescriptors = []; - message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.resourceDescriptors && message.resourceDescriptors.length)) + message.resourceDescriptors = []; + message.resourceDescriptors.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14778,6 +15796,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListMonitoredResourceDescriptorsResponse + * @function getTypeUrl + * @memberof google.logging.v2.ListMonitoredResourceDescriptorsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMonitoredResourceDescriptorsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListMonitoredResourceDescriptorsResponse"; + }; + return ListMonitoredResourceDescriptorsResponse; })(); @@ -14908,20 +15941,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 8: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 8: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -15049,6 +16086,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLogsRequest + * @function getTypeUrl + * @memberof google.logging.v2.ListLogsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLogsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListLogsRequest"; + }; + return ListLogsRequest; })(); @@ -15157,14 +16209,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.logNames && message.logNames.length)) - message.logNames = []; - message.logNames.push(reader.string()); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 3: { + if (!(message.logNames && message.logNames.length)) + message.logNames = []; + message.logNames.push(reader.string()); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15275,6 +16329,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLogsResponse + * @function getTypeUrl + * @memberof google.logging.v2.ListLogsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLogsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListLogsResponse"; + }; + return ListLogsResponse; })(); @@ -15394,17 +16463,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.bufferWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.bufferWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15529,6 +16601,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TailLogEntriesRequest + * @function getTypeUrl + * @memberof google.logging.v2.TailLogEntriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TailLogEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.TailLogEntriesRequest"; + }; + return TailLogEntriesRequest; })(); @@ -15639,16 +16726,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.suppressionInfo && message.suppressionInfo.length)) - message.suppressionInfo = []; - message.suppressionInfo.push($root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.logging.v2.LogEntry.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.suppressionInfo && message.suppressionInfo.length)) + message.suppressionInfo = []; + message.suppressionInfo.push($root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -15781,6 +16870,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TailLogEntriesResponse + * @function getTypeUrl + * @memberof google.logging.v2.TailLogEntriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TailLogEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.TailLogEntriesResponse"; + }; + TailLogEntriesResponse.SuppressionInfo = (function() { /** @@ -15884,12 +16988,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.reason = reader.int32(); - break; - case 2: - message.suppressedCount = reader.int32(); - break; + case 1: { + message.reason = reader.int32(); + break; + } + case 2: { + message.suppressedCount = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -16006,6 +17112,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SuppressionInfo + * @function getTypeUrl + * @memberof google.logging.v2.TailLogEntriesResponse.SuppressionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuppressionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.TailLogEntriesResponse.SuppressionInfo"; + }; + /** * Reason enum. * @name google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason @@ -16061,7 +17182,7 @@ }; /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listBuckets}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listBuckets}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef ListBucketsCallback * @type {function} @@ -16094,7 +17215,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getBucket}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef GetBucketCallback * @type {function} @@ -16127,7 +17248,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createBucket}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef CreateBucketCallback * @type {function} @@ -16160,7 +17281,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateBucket}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef UpdateBucketCallback * @type {function} @@ -16193,7 +17314,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteBucket}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef DeleteBucketCallback * @type {function} @@ -16226,7 +17347,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#undeleteBucket}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|undeleteBucket}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef UndeleteBucketCallback * @type {function} @@ -16259,7 +17380,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listViews}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listViews}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef ListViewsCallback * @type {function} @@ -16292,7 +17413,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getView}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getView}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef GetViewCallback * @type {function} @@ -16325,7 +17446,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createView}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createView}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef CreateViewCallback * @type {function} @@ -16358,7 +17479,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateView}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateView}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef UpdateViewCallback * @type {function} @@ -16391,7 +17512,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteView}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteView}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef DeleteViewCallback * @type {function} @@ -16424,7 +17545,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listSinks}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listSinks}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef ListSinksCallback * @type {function} @@ -16457,7 +17578,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSink}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getSink}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef GetSinkCallback * @type {function} @@ -16490,7 +17611,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createSink}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createSink}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef CreateSinkCallback * @type {function} @@ -16523,7 +17644,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSink}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateSink}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef UpdateSinkCallback * @type {function} @@ -16556,7 +17677,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteSink}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteSink}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef DeleteSinkCallback * @type {function} @@ -16589,7 +17710,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#listExclusions}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listExclusions}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef ListExclusionsCallback * @type {function} @@ -16622,7 +17743,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getExclusion}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getExclusion}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef GetExclusionCallback * @type {function} @@ -16655,7 +17776,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#createExclusion}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createExclusion}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef CreateExclusionCallback * @type {function} @@ -16688,7 +17809,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateExclusion}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateExclusion}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef UpdateExclusionCallback * @type {function} @@ -16721,7 +17842,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#deleteExclusion}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteExclusion}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef DeleteExclusionCallback * @type {function} @@ -16754,7 +17875,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getCmekSettings}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getCmekSettings}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef GetCmekSettingsCallback * @type {function} @@ -16787,7 +17908,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateCmekSettings}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateCmekSettings}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef UpdateCmekSettingsCallback * @type {function} @@ -16820,7 +17941,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#getSettings}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getSettings}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef GetSettingsCallback * @type {function} @@ -16853,7 +17974,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#updateSettings}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateSettings}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef UpdateSettingsCallback * @type {function} @@ -16886,7 +18007,7 @@ */ /** - * Callback as used by {@link google.logging.v2.ConfigServiceV2#copyLogEntries}. + * Callback as used by {@link google.logging.v2.ConfigServiceV2|copyLogEntries}. * @memberof google.logging.v2.ConfigServiceV2 * @typedef CopyLogEntriesCallback * @type {function} @@ -17103,35 +18224,44 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.retentionDays = reader.int32(); - break; - case 9: - message.locked = reader.bool(); - break; - case 12: - message.lifecycleState = reader.int32(); - break; - case 15: - if (!(message.restrictedFields && message.restrictedFields.length)) - message.restrictedFields = []; - message.restrictedFields.push(reader.string()); - break; - case 19: - message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.retentionDays = reader.int32(); + break; + } + case 9: { + message.locked = reader.bool(); + break; + } + case 12: { + message.lifecycleState = reader.int32(); + break; + } + case 15: { + if (!(message.restrictedFields && message.restrictedFields.length)) + message.restrictedFields = []; + message.restrictedFields.push(reader.string()); + break; + } + case 19: { + message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17332,6 +18462,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogBucket + * @function getTypeUrl + * @memberof google.logging.v2.LogBucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogBucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogBucket"; + }; + return LogBucket; })(); @@ -17471,21 +18616,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.filter = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17618,6 +18768,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogView + * @function getTypeUrl + * @memberof google.logging.v2.LogView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogView"; + }; + return LogView; })(); @@ -17850,44 +19015,56 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.destination = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 18: - message.description = reader.string(); - break; - case 19: - message.disabled = reader.bool(); - break; - case 16: - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); - break; - case 6: - message.outputVersionFormat = reader.int32(); - break; - case 8: - message.writerIdentity = reader.string(); - break; - case 9: - message.includeChildren = reader.bool(); - break; - case 12: - message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); - break; - case 13: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.destination = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + case 18: { + message.description = reader.string(); + break; + } + case 19: { + message.disabled = reader.bool(); + break; + } + case 16: { + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + break; + } + case 6: { + message.outputVersionFormat = reader.int32(); + break; + } + case 8: { + message.writerIdentity = reader.string(); + break; + } + case 9: { + message.includeChildren = reader.bool(); + break; + } + case 12: { + message.bigqueryOptions = $root.google.logging.v2.BigQueryOptions.decode(reader, reader.uint32()); + break; + } + case 13: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18123,6 +19300,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogSink + * @function getTypeUrl + * @memberof google.logging.v2.LogSink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogSink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogSink"; + }; + /** * VersionFormat enum. * @name google.logging.v2.LogSink.VersionFormat @@ -18245,12 +19437,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.usePartitionedTables = reader.bool(); - break; - case 3: - message.usesTimestampColumnPartitioning = reader.bool(); - break; + case 1: { + message.usePartitionedTables = reader.bool(); + break; + } + case 3: { + message.usesTimestampColumnPartitioning = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -18349,6 +19543,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BigQueryOptions + * @function getTypeUrl + * @memberof google.logging.v2.BigQueryOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.BigQueryOptions"; + }; + return BigQueryOptions; })(); @@ -18466,15 +19675,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -18581,6 +19793,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListBucketsRequest + * @function getTypeUrl + * @memberof google.logging.v2.ListBucketsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBucketsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListBucketsRequest"; + }; + return ListBucketsRequest; })(); @@ -18689,14 +19916,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.buckets && message.buckets.length)) - message.buckets = []; - message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18812,6 +20041,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListBucketsResponse + * @function getTypeUrl + * @memberof google.logging.v2.ListBucketsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBucketsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListBucketsResponse"; + }; + return ListBucketsResponse; })(); @@ -18929,15 +20173,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.bucketId = reader.string(); - break; - case 3: - message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.bucketId = reader.string(); + break; + } + case 3: { + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19049,6 +20296,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateBucketRequest + * @function getTypeUrl + * @memberof google.logging.v2.CreateBucketRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CreateBucketRequest"; + }; + return CreateBucketRequest; })(); @@ -19166,15 +20428,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19291,6 +20556,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateBucketRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateBucketRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateBucketRequest"; + }; + return UpdateBucketRequest; })(); @@ -19386,9 +20666,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19478,6 +20759,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetBucketRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetBucketRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetBucketRequest"; + }; + return GetBucketRequest; })(); @@ -19573,9 +20869,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19665,6 +20962,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteBucketRequest + * @function getTypeUrl + * @memberof google.logging.v2.DeleteBucketRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.DeleteBucketRequest"; + }; + return DeleteBucketRequest; })(); @@ -19760,9 +21072,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19852,6 +21165,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UndeleteBucketRequest + * @function getTypeUrl + * @memberof google.logging.v2.UndeleteBucketRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeleteBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UndeleteBucketRequest"; + }; + return UndeleteBucketRequest; })(); @@ -19969,15 +21297,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -20084,6 +21415,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListViewsRequest + * @function getTypeUrl + * @memberof google.logging.v2.ListViewsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListViewsRequest"; + }; + return ListViewsRequest; })(); @@ -20192,14 +21538,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.views && message.views.length)) - message.views = []; - message.views.push($root.google.logging.v2.LogView.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.views && message.views.length)) + message.views = []; + message.views.push($root.google.logging.v2.LogView.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20315,6 +21663,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListViewsResponse + * @function getTypeUrl + * @memberof google.logging.v2.ListViewsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListViewsResponse"; + }; + return ListViewsResponse; })(); @@ -20432,15 +21795,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.viewId = reader.string(); - break; - case 3: - message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.viewId = reader.string(); + break; + } + case 3: { + message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20552,6 +21918,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateViewRequest + * @function getTypeUrl + * @memberof google.logging.v2.CreateViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CreateViewRequest"; + }; + return CreateViewRequest; })(); @@ -20669,15 +22050,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20794,6 +22178,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateViewRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateViewRequest"; + }; + return UpdateViewRequest; })(); @@ -20889,9 +22288,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20981,6 +22381,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetViewRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetViewRequest"; + }; + return GetViewRequest; })(); @@ -21076,9 +22491,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21168,6 +22584,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteViewRequest + * @function getTypeUrl + * @memberof google.logging.v2.DeleteViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.DeleteViewRequest"; + }; + return DeleteViewRequest; })(); @@ -21285,15 +22716,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -21400,6 +22834,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListSinksRequest + * @function getTypeUrl + * @memberof google.logging.v2.ListSinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListSinksRequest"; + }; + return ListSinksRequest; })(); @@ -21508,14 +22957,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sinks && message.sinks.length)) - message.sinks = []; - message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.sinks && message.sinks.length)) + message.sinks = []; + message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21631,6 +23082,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListSinksResponse + * @function getTypeUrl + * @memberof google.logging.v2.ListSinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListSinksResponse"; + }; + return ListSinksResponse; })(); @@ -21726,9 +23192,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; + case 1: { + message.sinkName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21818,6 +23285,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetSinkRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetSinkRequest"; + }; + return GetSinkRequest; })(); @@ -21935,15 +23417,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + } + case 3: { + message.uniqueWriterIdentity = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -22055,6 +23540,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateSinkRequest + * @function getTypeUrl + * @memberof google.logging.v2.CreateSinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CreateSinkRequest"; + }; + return CreateSinkRequest; })(); @@ -22183,18 +23683,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; - case 2: - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - case 3: - message.uniqueWriterIdentity = reader.bool(); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.sinkName = reader.string(); + break; + } + case 2: { + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + } + case 3: { + message.uniqueWriterIdentity = reader.bool(); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22319,6 +23823,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateSinkRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateSinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateSinkRequest"; + }; + return UpdateSinkRequest; })(); @@ -22414,9 +23933,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sinkName = reader.string(); - break; + case 1: { + message.sinkName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22506,6 +24026,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteSinkRequest + * @function getTypeUrl + * @memberof google.logging.v2.DeleteSinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.DeleteSinkRequest"; + }; + return DeleteSinkRequest; })(); @@ -22656,24 +24191,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.disabled = reader.bool(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 4: { + message.disabled = reader.bool(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22814,6 +24355,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogExclusion + * @function getTypeUrl + * @memberof google.logging.v2.LogExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogExclusion"; + }; + return LogExclusion; })(); @@ -22931,15 +24487,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -23046,6 +24605,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListExclusionsRequest + * @function getTypeUrl + * @memberof google.logging.v2.ListExclusionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListExclusionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListExclusionsRequest"; + }; + return ListExclusionsRequest; })(); @@ -23154,14 +24728,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23277,6 +24853,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListExclusionsResponse + * @function getTypeUrl + * @memberof google.logging.v2.ListExclusionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListExclusionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListExclusionsResponse"; + }; + return ListExclusionsResponse; })(); @@ -23372,9 +24963,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23464,6 +25056,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetExclusionRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetExclusionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetExclusionRequest"; + }; + return GetExclusionRequest; })(); @@ -23570,12 +25177,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23679,6 +25288,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateExclusionRequest + * @function getTypeUrl + * @memberof google.logging.v2.CreateExclusionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CreateExclusionRequest"; + }; + return CreateExclusionRequest; })(); @@ -23796,15 +25420,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23921,6 +25548,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateExclusionRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateExclusionRequest"; + }; + return UpdateExclusionRequest; })(); @@ -24016,9 +25658,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24108,6 +25751,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteExclusionRequest + * @function getTypeUrl + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.DeleteExclusionRequest"; + }; + return DeleteExclusionRequest; })(); @@ -24203,9 +25861,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24295,6 +25954,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCmekSettingsRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCmekSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetCmekSettingsRequest"; + }; + return GetCmekSettingsRequest; })(); @@ -24412,15 +26086,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24537,6 +26214,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCmekSettingsRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCmekSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateCmekSettingsRequest"; + }; + return UpdateCmekSettingsRequest; })(); @@ -24654,15 +26346,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.kmsKeyName = reader.string(); - break; - case 3: - message.serviceAccountId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.kmsKeyName = reader.string(); + break; + } + case 3: { + message.serviceAccountId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24769,6 +26464,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CmekSettings + * @function getTypeUrl + * @memberof google.logging.v2.CmekSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CmekSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CmekSettings"; + }; + return CmekSettings; })(); @@ -24864,9 +26574,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24956,6 +26667,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetSettingsRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetSettingsRequest"; + }; + return GetSettingsRequest; })(); @@ -25073,15 +26799,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.settings = $root.google.logging.v2.Settings.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.settings = $root.google.logging.v2.Settings.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25198,6 +26927,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateSettingsRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateSettingsRequest"; + }; + return UpdateSettingsRequest; })(); @@ -25337,21 +27081,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.kmsKeyName = reader.string(); - break; - case 3: - message.kmsServiceAccountId = reader.string(); - break; - case 4: - message.storageLocation = reader.string(); - break; - case 5: - message.disableDefaultSink = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.kmsKeyName = reader.string(); + break; + } + case 3: { + message.kmsServiceAccountId = reader.string(); + break; + } + case 4: { + message.storageLocation = reader.string(); + break; + } + case 5: { + message.disableDefaultSink = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -25474,6 +27223,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Settings + * @function getTypeUrl + * @memberof google.logging.v2.Settings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Settings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.Settings"; + }; + return Settings; })(); @@ -25591,15 +27355,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.destination = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 4: { + message.destination = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25706,6 +27473,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CopyLogEntriesRequest + * @function getTypeUrl + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopyLogEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesRequest"; + }; + return CopyLogEntriesRequest; })(); @@ -25867,27 +27649,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.cancellationRequested = reader.bool(); - break; - case 5: - message.request = $root.google.logging.v2.CopyLogEntriesRequest.decode(reader, reader.uint32()); - break; - case 6: - message.progress = reader.int32(); - break; - case 7: - message.writerIdentity = reader.string(); - break; + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.cancellationRequested = reader.bool(); + break; + } + case 5: { + message.request = $root.google.logging.v2.CopyLogEntriesRequest.decode(reader, reader.uint32()); + break; + } + case 6: { + message.progress = reader.int32(); + break; + } + case 7: { + message.writerIdentity = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26079,6 +27868,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CopyLogEntriesMetadata + * @function getTypeUrl + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopyLogEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesMetadata"; + }; + return CopyLogEntriesMetadata; })(); @@ -26174,9 +27978,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.logEntriesCopiedCount = reader.int64(); - break; + case 1: { + message.logEntriesCopiedCount = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -26280,6 +28085,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CopyLogEntriesResponse + * @function getTypeUrl + * @memberof google.logging.v2.CopyLogEntriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopyLogEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesResponse"; + }; + return CopyLogEntriesResponse; })(); @@ -26356,7 +28176,7 @@ }; /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#listLogMetrics}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|listLogMetrics}. * @memberof google.logging.v2.MetricsServiceV2 * @typedef ListLogMetricsCallback * @type {function} @@ -26389,7 +28209,7 @@ */ /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#getLogMetric}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|getLogMetric}. * @memberof google.logging.v2.MetricsServiceV2 * @typedef GetLogMetricCallback * @type {function} @@ -26422,7 +28242,7 @@ */ /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#createLogMetric}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|createLogMetric}. * @memberof google.logging.v2.MetricsServiceV2 * @typedef CreateLogMetricCallback * @type {function} @@ -26455,7 +28275,7 @@ */ /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#updateLogMetric}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|updateLogMetric}. * @memberof google.logging.v2.MetricsServiceV2 * @typedef UpdateLogMetricCallback * @type {function} @@ -26488,7 +28308,7 @@ */ /** - * Callback as used by {@link google.logging.v2.MetricsServiceV2#deleteLogMetric}. + * Callback as used by {@link google.logging.v2.MetricsServiceV2|deleteLogMetric}. * @memberof google.logging.v2.MetricsServiceV2 * @typedef DeleteLogMetricCallback * @type {function} @@ -26727,58 +28547,69 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.filter = reader.string(); - break; - case 12: - message.disabled = reader.bool(); - break; - case 5: - message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); - break; - case 6: - message.valueExtractor = reader.string(); - break; - case 7: - if (message.labelExtractors === $util.emptyObject) - message.labelExtractors = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 12: { + message.disabled = reader.bool(); + break; + } + case 5: { + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + break; + } + case 6: { + message.valueExtractor = reader.string(); + break; + } + case 7: { + if (message.labelExtractors === $util.emptyObject) + message.labelExtractors = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labelExtractors[key] = value; + break; + } + case 8: { + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.version = reader.int32(); + break; } - message.labelExtractors[key] = value; - break; - case 8: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - case 9: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.version = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -26997,6 +28828,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogMetric + * @function getTypeUrl + * @memberof google.logging.v2.LogMetric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.LogMetric"; + }; + /** * ApiVersion enum. * @name google.logging.v2.LogMetric.ApiVersion @@ -27128,15 +28974,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -27243,6 +29092,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLogMetricsRequest + * @function getTypeUrl + * @memberof google.logging.v2.ListLogMetricsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLogMetricsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListLogMetricsRequest"; + }; + return ListLogMetricsRequest; })(); @@ -27351,14 +29215,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.logging.v2.LogMetric.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27474,6 +29340,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLogMetricsResponse + * @function getTypeUrl + * @memberof google.logging.v2.ListLogMetricsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLogMetricsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.ListLogMetricsResponse"; + }; + return ListLogMetricsResponse; })(); @@ -27569,9 +29450,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metricName = reader.string(); - break; + case 1: { + message.metricName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27661,6 +29543,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetLogMetricRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetLogMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetLogMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetLogMetricRequest"; + }; + return GetLogMetricRequest; })(); @@ -27767,12 +29664,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27876,6 +29775,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateLogMetricRequest + * @function getTypeUrl + * @memberof google.logging.v2.CreateLogMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateLogMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CreateLogMetricRequest"; + }; + return CreateLogMetricRequest; })(); @@ -27982,12 +29896,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metricName = reader.string(); - break; - case 2: - message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); - break; + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + message.metric = $root.google.logging.v2.LogMetric.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -28091,6 +30007,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateLogMetricRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateLogMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateLogMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateLogMetricRequest"; + }; + return UpdateLogMetricRequest; })(); @@ -28186,9 +30117,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metricName = reader.string(); - break; + case 1: { + message.metricName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28278,6 +30210,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteLogMetricRequest + * @function getTypeUrl + * @memberof google.logging.v2.DeleteLogMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteLogMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.DeleteLogMetricRequest"; + }; + return DeleteLogMetricRequest; })(); @@ -28401,14 +30348,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -28524,6 +30473,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -28734,38 +30698,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -28987,6 +30961,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -29093,12 +31082,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29197,6 +31188,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -29375,26 +31381,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 1: - message.type = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 7: - message.launchStage = reader.int32(); - break; + case 5: { + message.name = reader.string(); + break; + } + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + } + case 7: { + message.launchStage = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -29586,6 +31598,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonitoredResourceDescriptor + * @function getTypeUrl + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoredResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MonitoredResourceDescriptor"; + }; + return MonitoredResourceDescriptor; })(); @@ -29694,31 +31721,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -29831,6 +31860,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonitoredResource + * @function getTypeUrl + * @memberof google.api.MonitoredResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoredResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MonitoredResource"; + }; + return MonitoredResource; })(); @@ -29939,31 +31983,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 2: - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.userLabels[key] = value; + break; } - message.userLabels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -30081,6 +32127,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonitoredResourceMetadata + * @function getTypeUrl + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoredResourceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MonitoredResourceMetadata"; + }; + return MonitoredResourceMetadata; })(); @@ -30198,15 +32259,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.valueType = reader.int32(); - break; - case 3: - message.description = reader.string(); - break; + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.valueType = reader.int32(); + break; + } + case 3: { + message.description = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30331,6 +32395,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LabelDescriptor + * @function getTypeUrl + * @memberof google.api.LabelDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.LabelDescriptor"; + }; + /** * ValueType enum. * @name google.api.LabelDescriptor.ValueType @@ -30541,36 +32620,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -30768,6 +32854,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -30904,12 +33005,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31008,6 +33111,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + return ResourceReference; })(); @@ -31176,36 +33294,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.count = reader.int64(); - break; - case 2: - message.mean = reader.double(); - break; - case 3: - message.sumOfSquaredDeviation = reader.double(); - break; - case 4: - message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); - break; - case 6: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.count = reader.int64(); + break; + } + case 2: { + message.mean = reader.double(); + break; + } + case 3: { + message.sumOfSquaredDeviation = reader.double(); + break; + } + case 4: { + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + } + case 6: { + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else message.bucketCounts.push(reader.int64()); - } else - message.bucketCounts.push(reader.int64()); - break; - case 10: - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); - break; + break; + } + case 10: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -31409,6 +33534,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Distribution + * @function getTypeUrl + * @memberof google.api.Distribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Distribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution"; + }; + Distribution.Range = (function() { /** @@ -31512,12 +33652,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.min = reader.double(); - break; - case 2: - message.max = reader.double(); - break; + case 1: { + message.min = reader.double(); + break; + } + case 2: { + message.max = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -31616,6 +33758,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Range + * @function getTypeUrl + * @memberof google.api.Distribution.Range + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.Range"; + }; + return Range; })(); @@ -31747,15 +33904,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); - break; - case 2: - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); - break; - case 3: - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); - break; + case 1: { + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + break; + } + case 3: { + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -31895,6 +34055,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BucketOptions + * @function getTypeUrl + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BucketOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.BucketOptions"; + }; + BucketOptions.Linear = (function() { /** @@ -32009,15 +34184,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.width = reader.double(); - break; - case 3: - message.offset = reader.double(); - break; + case 1: { + message.numFiniteBuckets = reader.int32(); + break; + } + case 2: { + message.width = reader.double(); + break; + } + case 3: { + message.offset = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -32124,6 +34302,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Linear + * @function getTypeUrl + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Linear.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Linear"; + }; + return Linear; })(); @@ -32241,15 +34434,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.growthFactor = reader.double(); - break; - case 3: - message.scale = reader.double(); - break; + case 1: { + message.numFiniteBuckets = reader.int32(); + break; + } + case 2: { + message.growthFactor = reader.double(); + break; + } + case 3: { + message.scale = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -32356,6 +34552,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Exponential + * @function getTypeUrl + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Exponential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Exponential"; + }; + return Exponential; })(); @@ -32456,16 +34667,17 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.bounds && message.bounds.length)) - message.bounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.bounds && message.bounds.length)) + message.bounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bounds.push(reader.double()); + } else message.bounds.push(reader.double()); - } else - message.bounds.push(reader.double()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -32567,6 +34779,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Explicit + * @function getTypeUrl + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Explicit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Explicit"; + }; + return Explicit; })(); @@ -32689,17 +34916,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.double(); - break; - case 2: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.attachments && message.attachments.length)) - message.attachments = []; - message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.value = reader.double(); + break; + } + case 2: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -32829,6 +35059,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Exemplar + * @function getTypeUrl + * @memberof google.api.Distribution.Exemplar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Exemplar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.Exemplar"; + }; + return Exemplar; })(); @@ -33041,43 +35286,54 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 8: - message.type = reader.string(); - break; - case 2: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 3: - message.metricKind = reader.int32(); - break; - case 4: - message.valueType = reader.int32(); - break; - case 5: - message.unit = reader.string(); - break; - case 6: - message.description = reader.string(); - break; - case 7: - message.displayName = reader.string(); - break; - case 10: - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); - break; - case 12: - message.launchStage = reader.int32(); - break; - case 13: - if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) - message.monitoredResourceTypes = []; - message.monitoredResourceTypes.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 8: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + } + case 3: { + message.metricKind = reader.int32(); + break; + } + case 4: { + message.valueType = reader.int32(); + break; + } + case 5: { + message.unit = reader.string(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 10: { + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + } + case 12: { + message.launchStage = reader.int32(); + break; + } + case 13: { + if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) + message.monitoredResourceTypes = []; + message.monitoredResourceTypes.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -33388,6 +35644,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MetricDescriptor + * @function getTypeUrl + * @memberof google.api.MetricDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MetricDescriptor"; + }; + MetricDescriptor.MetricDescriptorMetadata = (function() { /** @@ -33502,15 +35773,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.launchStage = reader.int32(); - break; - case 2: - message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.launchStage = reader.int32(); + break; + } + case 2: { + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -33670,6 +35944,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MetricDescriptorMetadata + * @function getTypeUrl + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricDescriptorMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MetricDescriptor.MetricDescriptorMetadata"; + }; + return MetricDescriptorMetadata; })(); @@ -33823,31 +36112,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.type = reader.string(); - break; - case 2: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 3: { + message.type = reader.string(); + break; + } + case 2: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -33960,6 +36251,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.api.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Metric"; + }; + return Metric; })(); @@ -34091,17 +36397,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -34226,6 +36535,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + return Status; })(); @@ -34274,7 +36598,7 @@ }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @memberof google.longrunning.Operations * @typedef ListOperationsCallback * @type {function} @@ -34307,7 +36631,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @memberof google.longrunning.Operations * @typedef GetOperationCallback * @type {function} @@ -34340,7 +36664,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @memberof google.longrunning.Operations * @typedef DeleteOperationCallback * @type {function} @@ -34373,7 +36697,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @memberof google.longrunning.Operations * @typedef CancelOperationCallback * @type {function} @@ -34406,7 +36730,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @memberof google.longrunning.Operations * @typedef WaitOperationCallback * @type {function} @@ -34591,21 +36915,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -34756,6 +37085,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -34851,9 +37195,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -34943,6 +37288,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -35071,18 +37431,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35197,6 +37561,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -35305,14 +37684,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35428,6 +37809,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -35523,9 +37919,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35615,6 +38012,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -35710,9 +38122,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35802,6 +38215,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -35908,12 +38336,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -36017,6 +38447,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -36123,12 +38568,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -36227,6 +38674,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index a5530ace125..115ac64ff33 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -96,6 +96,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -624,6 +628,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -916,6 +927,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 4429538db91e19ce1174a5369d1bed0e0e26ef41 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 23 Aug 2022 15:12:22 -0500 Subject: [PATCH 0901/1029] chore: added extra variables owlbot kokoro configs (#1309) --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++ .../logging/.kokoro/common_env_vars.cfg | 19 ++++++++++++++++ .../.kokoro/continuous/node12/common.cfg | 20 +++++++++++++++++ .../logging/.kokoro/environment/common.cfg | 13 +++++++++++ .../logging/.kokoro/release/common.cfg | 13 +++++++++++ handwritten/logging/owlbot.py | 22 +++++++++++++++++++ 6 files changed, 107 insertions(+) create mode 100644 handwritten/logging/.kokoro/common_env_vars.cfg diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 0d3d29bcccd..35e1f26c15f 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -22,3 +22,23 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-logging/.kokoro/test.sh" } + + +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + diff --git a/handwritten/logging/.kokoro/common_env_vars.cfg b/handwritten/logging/.kokoro/common_env_vars.cfg new file mode 100644 index 00000000000..803b02447c5 --- /dev/null +++ b/handwritten/logging/.kokoro/common_env_vars.cfg @@ -0,0 +1,19 @@ + +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + diff --git a/handwritten/logging/.kokoro/continuous/node12/common.cfg b/handwritten/logging/.kokoro/continuous/node12/common.cfg index 0d3d29bcccd..35e1f26c15f 100644 --- a/handwritten/logging/.kokoro/continuous/node12/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node12/common.cfg @@ -22,3 +22,23 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-logging/.kokoro/test.sh" } + + +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + diff --git a/handwritten/logging/.kokoro/environment/common.cfg b/handwritten/logging/.kokoro/environment/common.cfg index 24d85d51dc5..6fbe6c30df3 100644 --- a/handwritten/logging/.kokoro/environment/common.cfg +++ b/handwritten/logging/.kokoro/environment/common.cfg @@ -26,3 +26,16 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-logging/.kokoro/environment.sh" } + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} diff --git a/handwritten/logging/.kokoro/release/common.cfg b/handwritten/logging/.kokoro/release/common.cfg index 3ba2eb095fe..02604bf1a33 100644 --- a/handwritten/logging/.kokoro/release/common.cfg +++ b/handwritten/logging/.kokoro/release/common.cfg @@ -6,3 +6,16 @@ before_action { } } } + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index 5d06615bcb8..c7b30f53789 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -14,6 +14,7 @@ """This script is used to synthesize generated parts of this library.""" +import os import synthtool as s import synthtool.languages.node as node @@ -42,3 +43,24 @@ "pass_down_envvars\+\=\(", 'pass_down_envvars+=(\n "ENVIRONMENT"\n "RUNTIME"' ) + +# -------------------------------------------------------------------------- +# Modify test configs +# -------------------------------------------------------------------------- + +# add shared environment variables to test configs +s.move( + ".kokoro/common_env_vars.cfg", + ".kokoro/common.cfg", + merge=lambda src, dst, _, : f"{dst}\n{src}", +) + +for path, subdirs, files in os.walk(f".kokoro/continuous"): + for name in files: + if name == "common.cfg": + file_path = os.path.join(path, name) + s.move( + ".kokoro/common_env_vars.cfg", + file_path, + merge=lambda src, dst, _, : f"{dst}\n{src}", + ) From 6d7e83c943681f4c4441c8080342699c6d863d86 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 23:00:21 +0000 Subject: [PATCH 0902/1029] fix: remove pip install statements (#1546) (#1317) because the tools are already installed in the docker image as of https://github.com/googleapis/testing-infra-docker/pull/227 Source-Link: https://github.com/googleapis/synthtool/commit/ab7384ea1c30df8ec2e175566ef2508e6c3a2acb Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:bb493bf01d28519e82ab61c490c20122c85a7119c03a978ad0c34b4239fbad15 --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- handwritten/logging/.kokoro/publish.sh | 1 - handwritten/logging/.kokoro/release/docs.sh | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index f7c796c60cd..748836981e2 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e -# created: 2022-08-22T22:07:00.791732705Z + digest: sha256:bb493bf01d28519e82ab61c490c20122c85a7119c03a978ad0c34b4239fbad15 +# created: 2022-08-23T18:40:55.597313991Z diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh index 77a5defb2b5..949e3e1d0c2 100755 --- a/handwritten/logging/.kokoro/publish.sh +++ b/handwritten/logging/.kokoro/publish.sh @@ -19,7 +19,6 @@ set -eo pipefail export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Start the releasetool reporter -python3 -m pip install gcp-releasetool python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script cd $(dirname $0)/.. diff --git a/handwritten/logging/.kokoro/release/docs.sh b/handwritten/logging/.kokoro/release/docs.sh index 4c866c86000..1d8f3f490a5 100755 --- a/handwritten/logging/.kokoro/release/docs.sh +++ b/handwritten/logging/.kokoro/release/docs.sh @@ -29,7 +29,6 @@ npm run docs # create docs.metadata, based on package.json and .repo-metadata.json. npm i json@9.0.6 -g -python3 -m pip install --user gcp-docuploader python3 -m docuploader create-metadata \ --name=$(cat .repo-metadata.json | json name) \ --version=$(cat package.json | json version) \ From 876b38c7c1811abfab9c10a083ac6cc80f1d6066 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:20:29 -0700 Subject: [PATCH 0903/1029] chore(main): release 10.1.3 (#1316) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 845b93dc361..aab916d8c03 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.3](https://github.com/googleapis/nodejs-logging/compare/v10.1.2...v10.1.3) (2022-08-23) + + +### Bug Fixes + +* change import long to require ([#1315](https://github.com/googleapis/nodejs-logging/issues/1315)) ([3cca57a](https://github.com/googleapis/nodejs-logging/commit/3cca57adefcd001e71dc3b28a871efaae879d186)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-logging/issues/1546)) ([#1317](https://github.com/googleapis/nodejs-logging/issues/1317)) ([d85c9a0](https://github.com/googleapis/nodejs-logging/commit/d85c9a0caad56670978413da5ddcf12226478505)) + ## [10.1.2](https://github.com/googleapis/nodejs-logging/compare/v10.1.1...v10.1.2) (2022-08-20) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bb575d4e0e7..7cba8a9ca5e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.2", + "version": "10.1.3", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 7120b1b1f58..9b5a5eb8890 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.2", + "version": "10.1.3", "language": "TYPESCRIPT", "apis": [ { From aa4bb65d2d2631e6e3901bbe480231fa3272b3d3 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Thu, 25 Aug 2022 21:56:04 +0300 Subject: [PATCH 0904/1029] fix: npm audit failing (#1319) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7cba8a9ca5e..ad1216a65b0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^8.0.2", - "google-gax": "^3.0.1", + "google-gax": "^3.2.2", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", From ba6cca4ee411a4ad3230ef1e1f433ce2e8f80423 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 12:35:17 -0700 Subject: [PATCH 0905/1029] chore(main): release 10.1.4 (#1320) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.4 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index aab916d8c03..d7ac0ee0882 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.4](https://github.com/googleapis/nodejs-logging/compare/v10.1.3...v10.1.4) (2022-08-25) + + +### Bug Fixes + +* npm audit failing ([#1319](https://github.com/googleapis/nodejs-logging/issues/1319)) ([2675622](https://github.com/googleapis/nodejs-logging/commit/267562276b5ff727cb74bbe1c31699f396cca111)) + ## [10.1.3](https://github.com/googleapis/nodejs-logging/compare/v10.1.2...v10.1.3) (2022-08-23) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ad1216a65b0..f0950e9f226 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.3", + "version": "10.1.4", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 9b5a5eb8890..65b179d38ae 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.3", + "version": "10.1.4", "language": "TYPESCRIPT", "apis": [ { From 9aaea3e1a85a3036080bd6447373274c15cdbe77 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 25 Aug 2022 17:40:33 -0500 Subject: [PATCH 0906/1029] chore(tests): install auth plugin for k8s tests (#1318) * chore(tests): install auth plugin for k8s tests * set env var for auth plugin Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/.kokoro/environment.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.kokoro/environment.sh b/handwritten/logging/.kokoro/environment.sh index 5158d0d36e4..943759cfc0e 100755 --- a/handwritten/logging/.kokoro/environment.sh +++ b/handwritten/logging/.kokoro/environment.sh @@ -80,6 +80,8 @@ fi # If Kubernetes, install kubectl component if [[ $ENVIRONMENT == *"kubernetes"* ]]; then gcloud components install kubectl -q + gcloud components install gke-gcloud-auth-plugin -q + export USE_GKE_GCLOUD_AUTH_PLUGIN=True fi # Run the specified environment test From b5abed3e673def683755564603c35d29187d61f2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 19:14:23 -0700 Subject: [PATCH 0907/1029] fix: do not import the whole google-gax from proto JS (#1553) (#1321) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- handwritten/logging/protos/protos.d.ts | 2 +- handwritten/logging/protos/protos.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 748836981e2..4d586c42063 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:bb493bf01d28519e82ab61c490c20122c85a7119c03a978ad0c34b4239fbad15 -# created: 2022-08-23T18:40:55.597313991Z + digest: sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e +# created: 2022-08-26T22:34:55.905845397Z diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 477f5bfc528..a65eb6fa607 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 1b480c905bf..152e5fa81e9 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From de0f1506258c441d973d7664522c6c67658c0b92 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sun, 28 Aug 2022 12:24:13 -0700 Subject: [PATCH 0908/1029] chore(main): release 10.1.5 (#1323) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.5 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 8 ++++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index d7ac0ee0882..11c0fa6d538 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,14 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.5](https://github.com/googleapis/nodejs-logging/compare/v10.1.4...v10.1.5) (2022-08-27) + + +### Bug Fixes + +* do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-logging/issues/1553)) ([#1321](https://github.com/googleapis/nodejs-logging/issues/1321)) ([f8fb563](https://github.com/googleapis/nodejs-logging/commit/f8fb563b8486d6b6adf966ae35147be5ba640f03)) +* use google-gax v3.3.0 ([f8fb563](https://github.com/googleapis/nodejs-logging/commit/f8fb563b8486d6b6adf966ae35147be5ba640f03)) + ## [10.1.4](https://github.com/googleapis/nodejs-logging/compare/v10.1.3...v10.1.4) (2022-08-25) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f0950e9f226..a6c13bc4522 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.4", + "version": "10.1.5", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 65b179d38ae..abec96dbc91 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.4", + "version": "10.1.5", "language": "TYPESCRIPT", "apis": [ { From 90621493484b704d71045113fe88fccd400784b7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 Aug 2022 19:54:49 -0700 Subject: [PATCH 0909/1029] fix: use _gaxModule when accessing gax for bundling (#1322) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: use _gaxModule when accessing gax for bundling PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: accept gax instance in Logging * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Alexander Fenster --- handwritten/logging/src/index.ts | 14 ++- .../src/v2/config_service_v2_client.ts | 104 ++++++++++-------- .../src/v2/logging_service_v2_client.ts | 49 ++++++--- .../src/v2/metrics_service_v2_client.ts | 43 +++++--- handwritten/logging/system-test/logging.ts | 5 +- 5 files changed, 131 insertions(+), 84 deletions(-) diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 656e0a6491a..c37e1d2d760 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -267,7 +267,7 @@ class Logging { configService?: typeof v2.ConfigServiceV2Client; loggingService?: typeof v2.LoggingServiceV2Client; - constructor(options?: LoggingOptions) { + constructor(options?: LoggingOptions, gaxInstance?: typeof gax) { // Determine what scopes are needed. // It is the union of the scopes on all three clients. const scopes: Array<{}> = []; @@ -292,11 +292,17 @@ class Logging { options ); this.api = {}; - this.auth = new gax.GoogleAuth(options_); + this.auth = new (gaxInstance ?? gax).GoogleAuth(options_); this.options = options_; this.projectId = this.options.projectId || '{{projectId}}'; - this.configService = new v2.ConfigServiceV2Client(this.options); - this.loggingService = new v2.LoggingServiceV2Client(this.options); + this.configService = new v2.ConfigServiceV2Client( + this.options, + gaxInstance + ); + this.loggingService = new v2.LoggingServiceV2Client( + this.options, + gaxInstance + ); } /** diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index eafea13f164..06fc08ab72c 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './config_service_v2_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -99,8 +97,18 @@ export class ConfigServiceV2Client { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - */ - constructor(opts?: ClientOptions) { + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ConfigServiceV2Client({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof ConfigServiceV2Client; const servicePath = @@ -120,8 +128,13 @@ export class ConfigServiceV2Client { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -377,7 +390,7 @@ export class ConfigServiceV2Client { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -616,7 +629,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -714,7 +727,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -826,7 +839,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -922,7 +935,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1015,7 +1028,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1104,7 +1117,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1198,7 +1211,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1302,7 +1315,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1394,7 +1407,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1486,7 +1499,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ sink_name: request.sinkName || '', }); this.initialize(); @@ -1597,7 +1610,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1726,7 +1739,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ sink_name: request.sinkName || '', }); this.initialize(); @@ -1820,7 +1833,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ sink_name: request.sinkName || '', }); this.initialize(); @@ -1912,7 +1925,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2010,7 +2023,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2114,7 +2127,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2206,7 +2219,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2312,7 +2325,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2438,7 +2451,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2544,7 +2557,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2666,7 +2679,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2801,11 +2814,12 @@ export class ConfigServiceV2Client { protos.google.logging.v2.CopyLogEntriesMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.copyLogEntries, this._gaxModule.createDefaultBackoffSettings() @@ -2913,7 +2927,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2965,7 +2979,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listBuckets']; @@ -3026,7 +3040,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listBuckets']; @@ -3130,7 +3144,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3176,7 +3190,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listViews']; @@ -3231,7 +3245,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listViews']; @@ -3337,7 +3351,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3385,7 +3399,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listSinks']; @@ -3442,7 +3456,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listSinks']; @@ -3548,7 +3562,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3596,7 +3610,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listExclusions']; @@ -3653,7 +3667,7 @@ export class ConfigServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listExclusions']; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 36795d2efa6..30298349200 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -17,19 +17,16 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, - GoogleError, } from 'google-gax'; - -import {Transform} from 'stream'; -import {PassThrough} from 'stream'; +import {Transform, PassThrough} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -38,7 +35,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './logging_service_v2_client_config.json'; - const version = require('../../../package.json').version; /** @@ -98,8 +94,18 @@ export class LoggingServiceV2Client { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - */ - constructor(opts?: ClientOptions) { + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new LoggingServiceV2Client({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LoggingServiceV2Client; const servicePath = @@ -119,8 +125,13 @@ export class LoggingServiceV2Client { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -284,7 +295,7 @@ export class LoggingServiceV2Client { // Provide descriptors for these. this.descriptors.stream = { tailLogEntries: new this._gaxModule.StreamDescriptor( - gax.StreamType.BIDI_STREAMING, + this._gaxModule.StreamType.BIDI_STREAMING, opts.fallback === 'rest' ), }; @@ -298,7 +309,7 @@ export class LoggingServiceV2Client { 'entries', ['log_name', 'resource', 'labels'], null, - gax.createByteLengthFunction( + this._gaxModule.GrpcClient.createByteLengthFunction( // eslint-disable-next-line @typescript-eslint/no-explicit-any protoFilesRoot.lookupType('google.logging.v2.LogEntry') as any ) @@ -319,7 +330,7 @@ export class LoggingServiceV2Client { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -372,7 +383,9 @@ export class LoggingServiceV2Client { setImmediate(() => { stream.emit( 'error', - new GoogleError('The client has already been closed.') + new this._gaxModule.GoogleError( + 'The client has already been closed.' + ) ); }); return stream; @@ -556,7 +569,7 @@ export class LoggingServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ log_name: request.logName || '', }); this.initialize(); @@ -1315,7 +1328,7 @@ export class LoggingServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1377,7 +1390,7 @@ export class LoggingServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listLogs']; @@ -1448,7 +1461,7 @@ export class LoggingServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listLogs']; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 56d33898843..a4dca23e36c 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -36,7 +35,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './metrics_service_v2_client_config.json'; - const version = require('../../../package.json').version; /** @@ -96,8 +94,18 @@ export class MetricsServiceV2Client { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - */ - constructor(opts?: ClientOptions) { + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new MetricsServiceV2Client({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof MetricsServiceV2Client; const servicePath = @@ -117,8 +125,13 @@ export class MetricsServiceV2Client { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -282,7 +295,7 @@ export class MetricsServiceV2Client { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -491,7 +504,7 @@ export class MetricsServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ metric_name: request.metricName || '', }); this.initialize(); @@ -581,7 +594,7 @@ export class MetricsServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -672,7 +685,7 @@ export class MetricsServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ metric_name: request.metricName || '', }); this.initialize(); @@ -757,7 +770,7 @@ export class MetricsServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ metric_name: request.metricName || '', }); this.initialize(); @@ -855,7 +868,7 @@ export class MetricsServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -900,7 +913,7 @@ export class MetricsServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listLogMetrics']; @@ -954,7 +967,7 @@ export class MetricsServiceV2Client { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listLogMetrics']; diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index cd63ced97ea..fb61bd0cf5e 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -813,8 +813,9 @@ describe('Logging', () => { }); it('should populate x-goog-api-client header', async () => { - const {Logging} = http2spy.require(require.resolve('../src')); - const {log, logEntries} = getTestLog(new Logging()); + const gax = http2spy.require(require.resolve('google-gax')); + const {Logging} = require('../src'); + const {log, logEntries} = getTestLog(new Logging({}, gax)); await log.write(logEntries[0], options); assert.ok( /gax\/[0-9]+\.[\w.-]+ gapic\/[0-9]+\.[\w.-]+ gl-node\/[0-9]+\.[\w.-]+ grpc\/[0-9]+\.[\w.-]+ gccl\/[0-9]+\.[\w.-]+/.test( From a0bc6cdd624ba2459a43f9069005528640edc7f1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 21:30:44 -0700 Subject: [PATCH 0910/1029] chore(main): release 10.1.6 (#1324) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.6 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 11c0fa6d538..8b5978ef38d 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.6](https://github.com/googleapis/nodejs-logging/compare/v10.1.5...v10.1.6) (2022-08-31) + + +### Bug Fixes + +* use _gaxModule when accessing gax for bundling ([#1322](https://github.com/googleapis/nodejs-logging/issues/1322)) ([9cd207d](https://github.com/googleapis/nodejs-logging/commit/9cd207dffe32f20472ab2e0037dbca07d62786d1)) + ## [10.1.5](https://github.com/googleapis/nodejs-logging/compare/v10.1.4...v10.1.5) (2022-08-27) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a6c13bc4522..eab89f6d760 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.5", + "version": "10.1.6", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index abec96dbc91..e51d8c771cb 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.5", + "version": "10.1.6", "language": "TYPESCRIPT", "apis": [ { From e134197a75eb136d9b2938fd69abc28a0c64a6c1 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Fri, 2 Sep 2022 20:05:44 +0300 Subject: [PATCH 0911/1029] fix: maxRetries parameter is ignored (#1326) * fix: maxRetries parameter is ignored * Fix accessing maxResults * Add tests --- handwritten/logging/src/log.ts | 9 +++++++++ handwritten/logging/test/log.ts | 30 ++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index e48c85aae33..caef889b6ae 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -983,6 +983,15 @@ class Log implements LogSeverityFunctions { options ); delete reqOpts.gaxOptions; + // Propagate maxRetries properly into writeLogEntries call + if (!options.gaxOptions?.maxRetries && this.logging.options?.maxRetries) { + options.gaxOptions = extend( + { + maxRetries: this.logging.options.maxRetries, + }, + options.gaxOptions + ); + } return this.logging.loggingService.writeLogEntries( reqOpts, options.gaxOptions, diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index f8b2a24db75..b3e5dcdf072 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -80,8 +80,9 @@ describe('Log', () => { }); // Create a mock Logging instance - function createLogger(maxEntrySize?: number) { + function createLogger(maxEntrySize?: number, maxRetries?: number) { LOGGING = { + options: maxRetries !== undefined ? {maxRetries: maxRetries} : undefined, projectId: '{{project-id}}', entry: sinon.stub(), setProjectId: sinon.stub(), @@ -114,7 +115,6 @@ describe('Log', () => { if (maxEntrySize) { options.maxEntrySize = maxEntrySize; } - return new Log(LOGGING, LOG_NAME, options); } @@ -578,6 +578,32 @@ describe('Log', () => { ) ); }); + + it('should pass through global options', async () => { + log = createLogger(undefined, 1); + decorateEntriesStub = sinon.stub(log, 'decorateEntries').returnsArg(0); + await log.write(ENTRIES, OPTIONS); + assert( + log.logging.loggingService.writeLogEntries.calledWith( + sinon.match.any, + { + maxRetries: 1, + }, + sinon.match.any + ) + ); + log.logging.loggingService.writeLogEntries.reset(); + await log.write(ENTRIES, {gaxOptions: {maxRetries: 10}}); + assert( + log.logging.loggingService.writeLogEntries.calledWith( + sinon.match.any, + { + maxRetries: 10, + }, + sinon.match.any + ) + ); + }); }); describe('decorateEntries', () => { From b32de8ee056ce9a1213c9de2fd69a2539020e454 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 2 Sep 2022 11:03:23 -0700 Subject: [PATCH 0912/1029] chore(main): release 10.1.7 (#1327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.7 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 8b5978ef38d..ff72e5f26b2 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.7](https://github.com/googleapis/nodejs-logging/compare/v10.1.6...v10.1.7) (2022-09-02) + + +### Bug Fixes + +* MaxRetries parameter is ignored ([#1326](https://github.com/googleapis/nodejs-logging/issues/1326)) ([caed0af](https://github.com/googleapis/nodejs-logging/commit/caed0afc8dc365024ae4c37d92dd929c9626f36e)) + ## [10.1.6](https://github.com/googleapis/nodejs-logging/compare/v10.1.5...v10.1.6) (2022-08-31) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index eab89f6d760..1cabb742e04 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.6", + "version": "10.1.7", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index e51d8c771cb..4f20165468d 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.6", + "version": "10.1.7", "language": "TYPESCRIPT", "apis": [ { From 61bb238a711ac5197a7ea84f5667b591d06e67c3 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Sat, 3 Sep 2022 04:20:02 +0300 Subject: [PATCH 0913/1029] fix: Correction for timestamp and instrumentation record severity fields format (#1328) * fix: Correction for timestamp and instrumentation record severity fields formats * Address PR comments * Fix comment --- handwritten/logging/src/entry.ts | 20 ++++++------ handwritten/logging/src/utils/common.ts | 14 ++++++++ .../logging/src/utils/instrumentation.ts | 32 ++++++++----------- handwritten/logging/test/entry.ts | 16 ++++++++-- 4 files changed, 52 insertions(+), 30 deletions(-) diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index c3abae5f5cf..d374842504f 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -18,7 +18,12 @@ const EventId = require('eventid'); import * as extend from 'extend'; import {google} from '../protos/protos'; -import {objToStruct, structToObj, zuluToDateObj} from './utils/common'; +import { + objToStruct, + structToObj, + zuluToDateObj, + toNanosAndSecondsObj, +} from './utils/common'; import { makeHttpRequestData, CloudLoggingHttpRequest, @@ -75,7 +80,9 @@ export interface StructuredJson { // Universally supported properties message?: string | object; httpRequest?: object; - timestamp?: string; + // Based on https://cloud.google.com/logging/docs/agent/logging/configuration#timestamp-processing, the + // timestamp should be in nanos and seconds format. + timestamp?: Timestamp; [INSERT_ID_KEY]?: string; [OPERATION_KEY]?: object; [SOURCE_LOCATION_KEY]?: object; @@ -214,12 +221,7 @@ class Entry { } // Format log timestamp if (entry.timestamp instanceof Date) { - const seconds = entry.timestamp.getTime() / 1000; - const secondsRounded = Math.floor(seconds); - entry.timestamp = { - seconds: secondsRounded, - nanos: Math.floor((seconds - secondsRounded) * 1e9), - }; + entry.timestamp = toNanosAndSecondsObj(entry.timestamp); } else if (typeof entry.timestamp === 'string') { entry.timestamp = zuluToDateObj(entry.timestamp); } @@ -300,7 +302,7 @@ class Entry { } // Format timestamp if (meta.timestamp instanceof Date) { - entry.timestamp = meta.timestamp.toISOString(); + entry.timestamp = toNanosAndSecondsObj(meta.timestamp); } // Format httprequest const req = meta.httpRequest; diff --git a/handwritten/logging/src/utils/common.ts b/handwritten/logging/src/utils/common.ts index ee05d3ff7a1..9e3f8470aa7 100644 --- a/handwritten/logging/src/utils/common.ts +++ b/handwritten/logging/src/utils/common.ts @@ -243,3 +243,17 @@ export function zuluToDateObj(zuluTime: string) { nanos: nanoSecs ? Number(nanoSecs.padEnd(9, '0')) : 0, }; } + +/** + * Converts Date to nanoseconds format suported by Logging. + * See https://cloud.google.com/logging/docs/agent/logging/configuration#timestamp-processing for more details + * @param date The date to be converted to Logging nanos and seconds format + */ +export function toNanosAndSecondsObj(date: Date) { + const seconds = date.getTime() / 1000; + const secondsRounded = Math.floor(seconds); + return { + seconds: secondsRounded, + nanos: Math.floor((seconds - secondsRounded) * 1e9), + }; +} diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index c99b08e7340..6a6809de8b3 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -16,7 +16,6 @@ import arrify = require('arrify'); import path = require('path'); -import {google} from '../../protos/protos'; import {Entry} from '../entry'; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -95,25 +94,20 @@ export function createDiagnosticEntry( if (!libraryName || !libraryName.startsWith(NODEJS_LIBRARY_NAME_PREFIX)) { libraryName = NODEJS_LIBRARY_NAME_PREFIX; } - const entry = new Entry( - { - severity: google.logging.type.LogSeverity.INFO, + const entry = new Entry(undefined, { + [DIAGNOSTIC_INFO_KEY]: { + [INSTRUMENTATION_SOURCE_KEY]: [ + { + // Truncate libraryName and libraryVersion if more than 14 characters length + name: truncateValue(libraryName, maxDiagnosticValueLen), + version: truncateValue( + libraryVersion ?? getNodejsLibraryVersion(), + maxDiagnosticValueLen + ), + }, + ], }, - { - [DIAGNOSTIC_INFO_KEY]: { - [INSTRUMENTATION_SOURCE_KEY]: [ - { - // Truncate libraryName and libraryVersion if more than 14 characters length - name: truncateValue(libraryName, maxDiagnosticValueLen), - version: truncateValue( - libraryVersion ?? getNodejsLibraryVersion(), - maxDiagnosticValueLen - ), - }, - ], - }, - } - ); + }); return entry; } diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index af458dd0eec..0fd86e58849 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -56,6 +56,14 @@ function withinExpectedTimeBoundaries(result?: Date): boolean { return false; } +function nanosAndSecondsToDate(timestamp: entryTypes.Timestamp) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const seconds = (timestamp as any).seconds; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const nanos = (timestamp as any).nanos; + return new Date(seconds * 1000 + nanos / 1e9); +} + describe('Entry', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any let Entry: typeof entryTypes.Entry; @@ -319,7 +327,9 @@ describe('Entry', () => { entry.metadata.traceSampled = false; entry.data = 'this is a log'; const json = entry.toStructuredJSON(); - assert(withinExpectedTimeBoundaries(new Date(json.timestamp!))); + assert( + withinExpectedTimeBoundaries(nanosAndSecondsToDate(json.timestamp!)) + ); delete json.timestamp; const expectedJSON = { [entryTypes.INSERT_ID_KEY]: '👀', @@ -345,7 +355,9 @@ describe('Entry', () => { it('should convert a string timestamp', () => { entry.metadata.timestamp = new Date(); const json = entry.toStructuredJSON(); - assert(withinExpectedTimeBoundaries(new Date(json.timestamp!))); + assert( + withinExpectedTimeBoundaries(nanosAndSecondsToDate(json.timestamp!)) + ); }); it('should convert a raw http to httprequest', () => { From 786e1ec06d51d25d6460459cc0b553c682bd1d3f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 2 Sep 2022 18:36:50 -0700 Subject: [PATCH 0914/1029] chore(main): release 10.1.8 (#1330) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.8 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ff72e5f26b2..aa8526a5390 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.8](https://github.com/googleapis/nodejs-logging/compare/v10.1.7...v10.1.8) (2022-09-03) + + +### Bug Fixes + +* Correction for timestamp and instrumentation record severity fields format ([#1328](https://github.com/googleapis/nodejs-logging/issues/1328)) ([057431b](https://github.com/googleapis/nodejs-logging/commit/057431bf7e0157eb6c448973248004b441c6cddb)) + ## [10.1.7](https://github.com/googleapis/nodejs-logging/compare/v10.1.6...v10.1.7) (2022-09-02) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1cabb742e04..603f5ceee06 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.7", + "version": "10.1.8", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 4f20165468d..27a8e0e2868 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.7", + "version": "10.1.8", "language": "TYPESCRIPT", "apis": [ { From 1b07c8974472faaf45e9d36a3478ba82844e6cf1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Sep 2022 04:06:28 +0200 Subject: [PATCH 0915/1029] chore(deps): update dependency uuid to v9 (#1331) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [uuid](https://togithub.com/uuidjs/uuid) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/uuid/8.3.2/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/compatibility-slim/8.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/confidence-slim/8.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
uuidjs/uuid ### [`v9.0.0`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#​900-httpsgithubcomuuidjsuuidcomparev832v900-2022-09-05) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) ##### ⚠ BREAKING CHANGES - Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022. - Remove the minified UMD build from the package. Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays. For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished. - Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015. This also removes the fallback on msCrypto instead of the crypto API. Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack. ##### Features - optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#​597](https://togithub.com/uuidjs/uuid/issues/597)) ([3a033f6](https://togithub.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc)) - remove UMD build ([#​645](https://togithub.com/uuidjs/uuid/issues/645)) ([e948a0f](https://togithub.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#​620](https://togithub.com/uuidjs/uuid/issues/620) - use native crypto.randomUUID when available ([#​600](https://togithub.com/uuidjs/uuid/issues/600)) ([c9e076c](https://togithub.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4)) ##### Bug Fixes - add Jest/jsdom compatibility ([#​642](https://togithub.com/uuidjs/uuid/issues/642)) ([16f9c46](https://togithub.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd)) - change default export to named function ([#​545](https://togithub.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://togithub.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a)) - handle error when parameter is not set in v3 and v5 ([#​622](https://togithub.com/uuidjs/uuid/issues/622)) ([fcd7388](https://togithub.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091)) - run npm audit fix ([#​644](https://togithub.com/uuidjs/uuid/issues/644)) ([04686f5](https://togithub.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353)) - upgrading from uuid3 broken link ([#​568](https://togithub.com/uuidjs/uuid/issues/568)) ([1c849da](https://togithub.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6)) ##### build - drop Node.js 8.x from babel transpile target ([#​603](https://togithub.com/uuidjs/uuid/issues/603)) ([aa11485](https://togithub.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5)) - drop support for legacy browsers (IE11, Safari 10) ([#​604](https://togithub.com/uuidjs/uuid/issues/604)) ([0f433e5](https://togithub.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148)) - drop node 10.x to upgrade dev dependencies ([#​653](https://togithub.com/uuidjs/uuid/issues/653)) ([28a5712](https://togithub.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#​643](https://togithub.com/uuidjs/uuid/issues/643) ##### [8.3.2](https://togithub.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) ##### Bug Fixes - lazy load getRandomValues ([#​537](https://togithub.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://togithub.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#​536](https://togithub.com/uuidjs/uuid/issues/536) ##### [8.3.1](https://togithub.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) ##### Bug Fixes - support expo>=39.0.0 ([#​515](https://togithub.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://togithub.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#​375](https://togithub.com/uuidjs/uuid/issues/375)
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 603f5ceee06..9a2f5eaf026 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -59,7 +59,7 @@ "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", - "uuid": "^8.0.0" + "uuid": "^9.0.0" }, "devDependencies": { "@google-cloud/bigquery": "^6.0.0", From eaa8aac6451f7a49eb598ccf1ff45d0b444ec5b9 Mon Sep 17 00:00:00 2001 From: "Corentin.Andre" Date: Fri, 9 Sep 2022 20:11:21 +0200 Subject: [PATCH 0916/1029] fix: google-gax resolution (#1333) * fix: google-gax resolution * fix: add missing newline Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9a2f5eaf026..0630f19bcdf 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^8.0.2", - "google-gax": "^3.2.2", + "google-gax": "^3.3.0", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", From c936cd38ce2291049752519e3fe5e35e822e4d64 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 12:58:48 -0700 Subject: [PATCH 0917/1029] chore(main): release 10.1.9 (#1335) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index aa8526a5390..a27a06e72a9 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.9](https://github.com/googleapis/nodejs-logging/compare/v10.1.8...v10.1.9) (2022-09-09) + + +### Bug Fixes + +* Google-gax resolution ([#1333](https://github.com/googleapis/nodejs-logging/issues/1333)) ([4491646](https://github.com/googleapis/nodejs-logging/commit/449164633b407770ca791b1e5cdbdf57df7e32ee)) + ## [10.1.8](https://github.com/googleapis/nodejs-logging/compare/v10.1.7...v10.1.8) (2022-09-03) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 0630f19bcdf..c02b7fad950 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.8", + "version": "10.1.9", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 27a8e0e2868..cb6b39e10d9 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.8", + "version": "10.1.9", "language": "TYPESCRIPT", "apis": [ { From 4025bee128c604ea60807d0eaa640d2cddd3d7d5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:30:37 +0000 Subject: [PATCH 0918/1029] fix: preserve default values in x-goog-request-params header (#1337) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v2/config_service_v2_client.ts | 66 +- .../src/v2/logging_service_v2_client.ts | 8 +- .../src/v2/metrics_service_v2_client.ts | 14 +- .../test/gapic_config_service_v2_v2.ts | 2373 ++++++++--------- .../test/gapic_logging_service_v2_v2.ts | 291 +- .../test/gapic_metrics_service_v2_v2.ts | 512 ++-- 6 files changed, 1616 insertions(+), 1648 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 06fc08ab72c..06dc9b8d170 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -630,7 +630,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getBucket(request, options, callback); @@ -728,7 +728,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createBucket(request, options, callback); @@ -840,7 +840,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.updateBucket(request, options, callback); @@ -936,7 +936,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteBucket(request, options, callback); @@ -1029,7 +1029,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.undeleteBucket(request, options, callback); @@ -1118,7 +1118,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getView(request, options, callback); @@ -1212,7 +1212,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createView(request, options, callback); @@ -1316,7 +1316,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.updateView(request, options, callback); @@ -1408,7 +1408,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteView(request, options, callback); @@ -1500,7 +1500,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - sink_name: request.sinkName || '', + sink_name: request.sinkName ?? '', }); this.initialize(); return this.innerApiCalls.getSink(request, options, callback); @@ -1611,7 +1611,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createSink(request, options, callback); @@ -1740,7 +1740,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - sink_name: request.sinkName || '', + sink_name: request.sinkName ?? '', }); this.initialize(); return this.innerApiCalls.updateSink(request, options, callback); @@ -1834,7 +1834,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - sink_name: request.sinkName || '', + sink_name: request.sinkName ?? '', }); this.initialize(); return this.innerApiCalls.deleteSink(request, options, callback); @@ -1926,7 +1926,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getExclusion(request, options, callback); @@ -2024,7 +2024,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createExclusion(request, options, callback); @@ -2128,7 +2128,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.updateExclusion(request, options, callback); @@ -2220,7 +2220,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteExclusion(request, options, callback); @@ -2326,7 +2326,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getCmekSettings(request, options, callback); @@ -2452,7 +2452,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCmekSettings(request, options, callback); @@ -2558,7 +2558,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getSettings(request, options, callback); @@ -2680,7 +2680,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.updateSettings(request, options, callback); @@ -2928,7 +2928,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listBuckets(request, options, callback); @@ -2980,7 +2980,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listBuckets']; const callSettings = defaultCallSettings.merge(options); @@ -3041,7 +3041,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listBuckets']; const callSettings = defaultCallSettings.merge(options); @@ -3145,7 +3145,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listViews(request, options, callback); @@ -3191,7 +3191,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listViews']; const callSettings = defaultCallSettings.merge(options); @@ -3246,7 +3246,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listViews']; const callSettings = defaultCallSettings.merge(options); @@ -3352,7 +3352,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listSinks(request, options, callback); @@ -3400,7 +3400,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listSinks']; const callSettings = defaultCallSettings.merge(options); @@ -3457,7 +3457,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listSinks']; const callSettings = defaultCallSettings.merge(options); @@ -3563,7 +3563,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listExclusions(request, options, callback); @@ -3611,7 +3611,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listExclusions']; const callSettings = defaultCallSettings.merge(options); @@ -3668,7 +3668,7 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listExclusions']; const callSettings = defaultCallSettings.merge(options); diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 30298349200..ca37a21e377 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -570,7 +570,7 @@ export class LoggingServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - log_name: request.logName || '', + log_name: request.logName ?? '', }); this.initialize(); return this.innerApiCalls.deleteLog(request, options, callback); @@ -1329,7 +1329,7 @@ export class LoggingServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listLogs(request, options, callback); @@ -1391,7 +1391,7 @@ export class LoggingServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listLogs']; const callSettings = defaultCallSettings.merge(options); @@ -1462,7 +1462,7 @@ export class LoggingServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listLogs']; const callSettings = defaultCallSettings.merge(options); diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index a4dca23e36c..5ff2e92bcd9 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -505,7 +505,7 @@ export class MetricsServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - metric_name: request.metricName || '', + metric_name: request.metricName ?? '', }); this.initialize(); return this.innerApiCalls.getLogMetric(request, options, callback); @@ -595,7 +595,7 @@ export class MetricsServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createLogMetric(request, options, callback); @@ -686,7 +686,7 @@ export class MetricsServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - metric_name: request.metricName || '', + metric_name: request.metricName ?? '', }); this.initialize(); return this.innerApiCalls.updateLogMetric(request, options, callback); @@ -771,7 +771,7 @@ export class MetricsServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - metric_name: request.metricName || '', + metric_name: request.metricName ?? '', }); this.initialize(); return this.innerApiCalls.deleteLogMetric(request, options, callback); @@ -869,7 +869,7 @@ export class MetricsServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listLogMetrics(request, options, callback); @@ -914,7 +914,7 @@ export class MetricsServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listLogMetrics']; const callSettings = defaultCallSettings.merge(options); @@ -968,7 +968,7 @@ export class MetricsServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listLogMetrics']; const callSettings = defaultCallSettings.merge(options); diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 901770cdba0..ae57b2d163e 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -254,26 +269,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBucketRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); client.innerApiCalls.getBucket = stubSimpleCall(expectedResponse); const [response] = await client.getBucket(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBucket without error using callback', async () => { @@ -285,15 +297,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBucketRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); @@ -316,11 +322,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBucket with error', async () => { @@ -332,23 +341,20 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBucketRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getBucket = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getBucket(request), expectedError); - assert( - (client.innerApiCalls.getBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBucket with closed client', async () => { @@ -360,7 +366,8 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetBucketRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetBucketRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getBucket(request), expectedError); @@ -377,26 +384,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateBucketRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBucketRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); client.innerApiCalls.createBucket = stubSimpleCall(expectedResponse); const [response] = await client.createBucket(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBucket without error using callback', async () => { @@ -408,15 +414,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateBucketRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBucketRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); @@ -439,11 +441,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBucket with error', async () => { @@ -455,26 +460,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateBucketRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBucketRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createBucket = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createBucket(request), expectedError); - assert( - (client.innerApiCalls.createBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBucket with closed client', async () => { @@ -486,7 +490,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateBucketRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateBucketRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createBucket(request), expectedError); @@ -503,26 +510,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); client.innerApiCalls.updateBucket = stubSimpleCall(expectedResponse); const [response] = await client.updateBucket(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateBucket without error using callback', async () => { @@ -534,15 +540,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogBucket() ); @@ -565,11 +567,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateBucket with error', async () => { @@ -581,26 +586,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateBucket = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateBucket(request), expectedError); - assert( - (client.innerApiCalls.updateBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateBucket with closed client', async () => { @@ -612,7 +616,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateBucketRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('UpdateBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateBucket(request), expectedError); @@ -629,26 +636,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteBucket = stubSimpleCall(expectedResponse); const [response] = await client.deleteBucket(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteBucket without error using callback', async () => { @@ -660,15 +666,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -691,11 +693,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteBucket with error', async () => { @@ -707,26 +712,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteBucket = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteBucket(request), expectedError); - assert( - (client.innerApiCalls.deleteBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteBucket with closed client', async () => { @@ -738,7 +742,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteBucketRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteBucket(request), expectedError); @@ -755,26 +762,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UndeleteBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UndeleteBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.undeleteBucket = stubSimpleCall(expectedResponse); const [response] = await client.undeleteBucket(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.undeleteBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.undeleteBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteBucket without error using callback', async () => { @@ -786,15 +792,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UndeleteBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UndeleteBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -817,11 +819,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.undeleteBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.undeleteBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteBucket with error', async () => { @@ -833,26 +838,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UndeleteBucketRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UndeleteBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.undeleteBucket = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.undeleteBucket(request), expectedError); - assert( - (client.innerApiCalls.undeleteBucket as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.undeleteBucket as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteBucket as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteBucket with closed client', async () => { @@ -864,7 +868,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UndeleteBucketRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('UndeleteBucketRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.undeleteBucket(request), expectedError); @@ -881,26 +888,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); client.innerApiCalls.getView = stubSimpleCall(expectedResponse); const [response] = await client.getView(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getView without error using callback', async () => { @@ -912,15 +916,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); @@ -943,11 +941,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getView with error', async () => { @@ -959,23 +960,20 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getView = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getView(request), expectedError); - assert( - (client.innerApiCalls.getView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getView with closed client', async () => { @@ -987,7 +985,8 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetViewRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetViewRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getView(request), expectedError); @@ -1004,26 +1003,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateViewRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateViewRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); client.innerApiCalls.createView = stubSimpleCall(expectedResponse); const [response] = await client.createView(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createView without error using callback', async () => { @@ -1035,15 +1033,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateViewRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateViewRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); @@ -1066,11 +1060,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createView with error', async () => { @@ -1082,26 +1079,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateViewRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateViewRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createView = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createView(request), expectedError); - assert( - (client.innerApiCalls.createView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createView with closed client', async () => { @@ -1113,7 +1109,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateViewRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateViewRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createView(request), expectedError); @@ -1130,26 +1129,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); client.innerApiCalls.updateView = stubSimpleCall(expectedResponse); const [response] = await client.updateView(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateView without error using callback', async () => { @@ -1161,15 +1157,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogView() ); @@ -1192,11 +1182,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateView with error', async () => { @@ -1208,26 +1201,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateView = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateView(request), expectedError); - assert( - (client.innerApiCalls.updateView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateView with closed client', async () => { @@ -1239,7 +1229,8 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateViewRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('UpdateViewRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateView(request), expectedError); @@ -1256,26 +1247,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteView = stubSimpleCall(expectedResponse); const [response] = await client.deleteView(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteView without error using callback', async () => { @@ -1287,15 +1275,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1318,11 +1300,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteView with error', async () => { @@ -1334,26 +1319,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteViewRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteViewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteView = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteView(request), expectedError); - assert( - (client.innerApiCalls.deleteView as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteView with closed client', async () => { @@ -1365,7 +1347,8 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteViewRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteViewRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteView(request), expectedError); @@ -1382,26 +1365,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetSinkRequest', ['sinkName']); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); client.innerApiCalls.getSink = stubSimpleCall(expectedResponse); const [response] = await client.getSink(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getSink as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getSink without error using callback', async () => { @@ -1413,15 +1393,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetSinkRequest', ['sinkName']); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); @@ -1444,11 +1418,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = (client.innerApiCalls.getSink as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getSink with error', async () => { @@ -1460,23 +1437,20 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetSinkRequest', ['sinkName']); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getSink = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getSink(request), expectedError); - assert( - (client.innerApiCalls.getSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getSink as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getSink with closed client', async () => { @@ -1488,7 +1462,8 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSinkRequest() ); - request.sinkName = ''; + const defaultValue1 = getTypeDefaultValue('GetSinkRequest', ['sinkName']); + request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getSink(request), expectedError); @@ -1505,26 +1480,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateSinkRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateSinkRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); client.innerApiCalls.createSink = stubSimpleCall(expectedResponse); const [response] = await client.createSink(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createSink without error using callback', async () => { @@ -1536,15 +1510,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateSinkRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateSinkRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); @@ -1567,11 +1537,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createSink with error', async () => { @@ -1583,26 +1556,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateSinkRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateSinkRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createSink = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createSink(request), expectedError); - assert( - (client.innerApiCalls.createSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createSink with closed client', async () => { @@ -1614,7 +1586,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateSinkRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateSinkRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createSink(request), expectedError); @@ -1631,26 +1606,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateSinkRequest', [ + 'sinkName', + ]); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); client.innerApiCalls.updateSink = stubSimpleCall(expectedResponse); const [response] = await client.updateSink(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateSink without error using callback', async () => { @@ -1662,15 +1636,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateSinkRequest', [ + 'sinkName', + ]); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogSink() ); @@ -1693,11 +1663,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateSink with error', async () => { @@ -1709,26 +1682,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateSinkRequest', [ + 'sinkName', + ]); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateSink = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateSink(request), expectedError); - assert( - (client.innerApiCalls.updateSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateSink with closed client', async () => { @@ -1740,7 +1712,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSinkRequest() ); - request.sinkName = ''; + const defaultValue1 = getTypeDefaultValue('UpdateSinkRequest', [ + 'sinkName', + ]); + request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateSink(request), expectedError); @@ -1757,26 +1732,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteSinkRequest', [ + 'sinkName', + ]); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteSink = stubSimpleCall(expectedResponse); const [response] = await client.deleteSink(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteSink without error using callback', async () => { @@ -1788,15 +1762,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteSinkRequest', [ + 'sinkName', + ]); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1819,11 +1789,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteSink with error', async () => { @@ -1835,26 +1808,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteSinkRequest() ); - request.sinkName = ''; - const expectedHeaderRequestParams = 'sink_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteSinkRequest', [ + 'sinkName', + ]); + request.sinkName = defaultValue1; + const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteSink = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteSink(request), expectedError); - assert( - (client.innerApiCalls.deleteSink as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteSink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteSink with closed client', async () => { @@ -1866,7 +1838,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteSinkRequest() ); - request.sinkName = ''; + const defaultValue1 = getTypeDefaultValue('DeleteSinkRequest', [ + 'sinkName', + ]); + request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteSink(request), expectedError); @@ -1883,26 +1858,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); client.innerApiCalls.getExclusion = stubSimpleCall(expectedResponse); const [response] = await client.getExclusion(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getExclusion without error using callback', async () => { @@ -1914,15 +1888,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); @@ -1945,11 +1915,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getExclusion with error', async () => { @@ -1961,26 +1934,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getExclusion = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getExclusion(request), expectedError); - assert( - (client.innerApiCalls.getExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getExclusion with closed client', async () => { @@ -1992,7 +1964,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetExclusionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getExclusion(request), expectedError); @@ -2009,26 +1984,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateExclusionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateExclusionRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); client.innerApiCalls.createExclusion = stubSimpleCall(expectedResponse); const [response] = await client.createExclusion(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createExclusion without error using callback', async () => { @@ -2040,15 +2014,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateExclusionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateExclusionRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); @@ -2071,11 +2041,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createExclusion with error', async () => { @@ -2087,26 +2060,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateExclusionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateExclusionRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createExclusion = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createExclusion(request), expectedError); - assert( - (client.innerApiCalls.createExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createExclusion with closed client', async () => { @@ -2118,7 +2090,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateExclusionRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateExclusionRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createExclusion(request), expectedError); @@ -2135,26 +2110,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); client.innerApiCalls.updateExclusion = stubSimpleCall(expectedResponse); const [response] = await client.updateExclusion(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateExclusion without error using callback', async () => { @@ -2166,15 +2140,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogExclusion() ); @@ -2197,11 +2167,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateExclusion with error', async () => { @@ -2213,26 +2186,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateExclusion = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateExclusion(request), expectedError); - assert( - (client.innerApiCalls.updateExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateExclusion with closed client', async () => { @@ -2244,7 +2216,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateExclusionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('UpdateExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateExclusion(request), expectedError); @@ -2261,26 +2236,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteExclusion = stubSimpleCall(expectedResponse); const [response] = await client.deleteExclusion(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteExclusion without error using callback', async () => { @@ -2292,15 +2266,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2323,11 +2293,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteExclusion with error', async () => { @@ -2339,26 +2312,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteExclusionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteExclusion = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteExclusion(request), expectedError); - assert( - (client.innerApiCalls.deleteExclusion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteExclusion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteExclusion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteExclusion with closed client', async () => { @@ -2370,7 +2342,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteExclusionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteExclusionRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteExclusion(request), expectedError); @@ -2387,26 +2362,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetCmekSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCmekSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.CmekSettings() ); client.innerApiCalls.getCmekSettings = stubSimpleCall(expectedResponse); const [response] = await client.getCmekSettings(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCmekSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCmekSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCmekSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCmekSettings without error using callback', async () => { @@ -2418,15 +2392,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetCmekSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCmekSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.CmekSettings() ); @@ -2449,11 +2419,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCmekSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCmekSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCmekSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCmekSettings with error', async () => { @@ -2465,26 +2438,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetCmekSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCmekSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCmekSettings = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getCmekSettings(request), expectedError); - assert( - (client.innerApiCalls.getCmekSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCmekSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCmekSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCmekSettings with closed client', async () => { @@ -2496,7 +2468,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetCmekSettingsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetCmekSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCmekSettings(request), expectedError); @@ -2513,15 +2488,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateCmekSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateCmekSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.CmekSettings() ); @@ -2529,11 +2500,14 @@ describe('v2.ConfigServiceV2Client', () => { stubSimpleCall(expectedResponse); const [response] = await client.updateCmekSettings(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCmekSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCmekSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCmekSettings without error using callback', async () => { @@ -2545,15 +2519,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateCmekSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateCmekSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.CmekSettings() ); @@ -2576,11 +2546,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCmekSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCmekSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCmekSettings with error', async () => { @@ -2592,26 +2565,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateCmekSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateCmekSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCmekSettings = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateCmekSettings(request), expectedError); - assert( - (client.innerApiCalls.updateCmekSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCmekSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCmekSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCmekSettings with closed client', async () => { @@ -2623,7 +2595,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateCmekSettingsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('UpdateCmekSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateCmekSettings(request), expectedError); @@ -2640,26 +2615,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.Settings() ); client.innerApiCalls.getSettings = stubSimpleCall(expectedResponse); const [response] = await client.getSettings(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getSettings without error using callback', async () => { @@ -2671,15 +2643,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.Settings() ); @@ -2702,11 +2668,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getSettings with error', async () => { @@ -2718,26 +2687,23 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getSettings = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getSettings(request), expectedError); - assert( - (client.innerApiCalls.getSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getSettings with closed client', async () => { @@ -2749,7 +2715,8 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSettingsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetSettingsRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getSettings(request), expectedError); @@ -2766,26 +2733,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.Settings() ); client.innerApiCalls.updateSettings = stubSimpleCall(expectedResponse); const [response] = await client.updateSettings(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateSettings without error using callback', async () => { @@ -2797,15 +2763,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.Settings() ); @@ -2828,11 +2790,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateSettings with error', async () => { @@ -2844,26 +2809,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSettingsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateSettings = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateSettings(request), expectedError); - assert( - (client.innerApiCalls.updateSettings as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateSettings with closed client', async () => { @@ -2875,7 +2839,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSettingsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('UpdateSettingsRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateSettings(request), expectedError); @@ -2892,7 +2859,6 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CopyLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2901,11 +2867,6 @@ describe('v2.ConfigServiceV2Client', () => { const [operation] = await client.copyLogEntries(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.copyLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes copyLogEntries without error using callback', async () => { @@ -2917,7 +2878,6 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CopyLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2947,11 +2907,6 @@ describe('v2.ConfigServiceV2Client', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.copyLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes copyLogEntries with call error', async () => { @@ -2963,18 +2918,12 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CopyLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.copyLogEntries = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.copyLogEntries(request), expectedError); - assert( - (client.innerApiCalls.copyLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes copyLogEntries with LRO error', async () => { @@ -2986,7 +2935,6 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CopyLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.copyLogEntries = stubLongRunningCall( undefined, @@ -2995,11 +2943,6 @@ describe('v2.ConfigServiceV2Client', () => { ); const [operation] = await client.copyLogEntries(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.copyLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes checkCopyLogEntriesProgress without error', async () => { @@ -3054,15 +2997,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogBucket()), generateSampleMessage(new protos.google.logging.v2.LogBucket()), @@ -3071,11 +3010,14 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.listBuckets = stubSimpleCall(expectedResponse); const [response] = await client.listBuckets(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listBuckets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBuckets without error using callback', async () => { @@ -3087,15 +3029,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogBucket()), generateSampleMessage(new protos.google.logging.v2.LogBucket()), @@ -3120,11 +3058,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listBuckets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBuckets with error', async () => { @@ -3136,26 +3077,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listBuckets = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listBuckets(request), expectedError); - assert( - (client.innerApiCalls.listBuckets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBucketsStream without error', async () => { @@ -3167,8 +3107,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogBucket()), generateSampleMessage(new protos.google.logging.v2.LogBucket()), @@ -3196,11 +3139,12 @@ describe('v2.ConfigServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuckets, request) ); - assert.strictEqual( - (client.descriptors.page.listBuckets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3213,8 +3157,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( undefined, @@ -3239,11 +3186,12 @@ describe('v2.ConfigServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuckets, request) ); - assert.strictEqual( - (client.descriptors.page.listBuckets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3256,8 +3204,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogBucket()), generateSampleMessage(new protos.google.logging.v2.LogBucket()), @@ -3277,11 +3228,12 @@ describe('v2.ConfigServiceV2Client', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3294,8 +3246,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( undefined, @@ -3314,11 +3269,12 @@ describe('v2.ConfigServiceV2Client', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3333,15 +3289,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogView()), generateSampleMessage(new protos.google.logging.v2.LogView()), @@ -3350,11 +3300,14 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.listViews = stubSimpleCall(expectedResponse); const [response] = await client.listViews(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listViews as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listViews without error using callback', async () => { @@ -3366,15 +3319,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogView()), generateSampleMessage(new protos.google.logging.v2.LogView()), @@ -3399,11 +3346,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listViews as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listViews with error', async () => { @@ -3415,23 +3365,20 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listViews = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listViews(request), expectedError); - assert( - (client.innerApiCalls.listViews as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listViewsStream without error', async () => { @@ -3443,8 +3390,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogView()), generateSampleMessage(new protos.google.logging.v2.LogView()), @@ -3472,10 +3420,12 @@ describe('v2.ConfigServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listViews, request) ); - assert.strictEqual( - (client.descriptors.page.listViews.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3488,8 +3438,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listViews.createStream = stubPageStreamingCall( undefined, @@ -3514,10 +3465,12 @@ describe('v2.ConfigServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listViews, request) ); - assert.strictEqual( - (client.descriptors.page.listViews.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3530,8 +3483,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogView()), generateSampleMessage(new protos.google.logging.v2.LogView()), @@ -3550,10 +3504,12 @@ describe('v2.ConfigServiceV2Client', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3566,8 +3522,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( undefined, @@ -3585,10 +3542,12 @@ describe('v2.ConfigServiceV2Client', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3603,15 +3562,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogSink()), generateSampleMessage(new protos.google.logging.v2.LogSink()), @@ -3620,11 +3573,14 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.listSinks = stubSimpleCall(expectedResponse); const [response] = await client.listSinks(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listSinks as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listSinks without error using callback', async () => { @@ -3636,15 +3592,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogSink()), generateSampleMessage(new protos.google.logging.v2.LogSink()), @@ -3669,11 +3619,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listSinks as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listSinks with error', async () => { @@ -3685,23 +3638,20 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listSinks = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listSinks(request), expectedError); - assert( - (client.innerApiCalls.listSinks as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listSinksStream without error', async () => { @@ -3713,8 +3663,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogSink()), generateSampleMessage(new protos.google.logging.v2.LogSink()), @@ -3742,10 +3693,12 @@ describe('v2.ConfigServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listSinks, request) ); - assert.strictEqual( - (client.descriptors.page.listSinks.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listSinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3758,8 +3711,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listSinks.createStream = stubPageStreamingCall( undefined, @@ -3784,10 +3738,12 @@ describe('v2.ConfigServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listSinks, request) ); - assert.strictEqual( - (client.descriptors.page.listSinks.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listSinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3800,8 +3756,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogSink()), generateSampleMessage(new protos.google.logging.v2.LogSink()), @@ -3820,10 +3777,12 @@ describe('v2.ConfigServiceV2Client', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listSinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3836,8 +3795,9 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listSinks.asyncIterate = stubAsyncIterationCall( undefined, @@ -3855,10 +3815,12 @@ describe('v2.ConfigServiceV2Client', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listSinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3873,15 +3835,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogExclusion()), generateSampleMessage(new protos.google.logging.v2.LogExclusion()), @@ -3890,11 +3848,14 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.listExclusions = stubSimpleCall(expectedResponse); const [response] = await client.listExclusions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listExclusions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listExclusions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listExclusions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listExclusions without error using callback', async () => { @@ -3906,15 +3867,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogExclusion()), generateSampleMessage(new protos.google.logging.v2.LogExclusion()), @@ -3939,11 +3896,14 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listExclusions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listExclusions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listExclusions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listExclusions with error', async () => { @@ -3955,26 +3915,25 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listExclusions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listExclusions(request), expectedError); - assert( - (client.innerApiCalls.listExclusions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listExclusions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listExclusions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listExclusionsStream without error', async () => { @@ -3986,8 +3945,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogExclusion()), generateSampleMessage(new protos.google.logging.v2.LogExclusion()), @@ -4015,11 +3977,12 @@ describe('v2.ConfigServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listExclusions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listExclusions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listExclusions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4032,8 +3995,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listExclusions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4056,11 +4022,12 @@ describe('v2.ConfigServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listExclusions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listExclusions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listExclusions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4073,8 +4040,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogExclusion()), generateSampleMessage(new protos.google.logging.v2.LogExclusion()), @@ -4094,11 +4064,12 @@ describe('v2.ConfigServiceV2Client', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listExclusions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listExclusions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4111,8 +4082,11 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listExclusions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4129,11 +4103,12 @@ describe('v2.ConfigServiceV2Client', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listExclusions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listExclusions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index b1111a0e9bd..d9b27817f28 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -236,26 +251,25 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogRequest() ); - request.logName = ''; - const expectedHeaderRequestParams = 'log_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteLogRequest', [ + 'logName', + ]); + request.logName = defaultValue1; + const expectedHeaderRequestParams = `log_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteLog = stubSimpleCall(expectedResponse); const [response] = await client.deleteLog(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteLog as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteLog as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLog as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLog without error using callback', async () => { @@ -267,15 +281,11 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogRequest() ); - request.logName = ''; - const expectedHeaderRequestParams = 'log_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteLogRequest', [ + 'logName', + ]); + request.logName = defaultValue1; + const expectedHeaderRequestParams = `log_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -298,11 +308,14 @@ describe('v2.LoggingServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteLog as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteLog as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLog as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLog with error', async () => { @@ -314,23 +327,22 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogRequest() ); - request.logName = ''; - const expectedHeaderRequestParams = 'log_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteLogRequest', [ + 'logName', + ]); + request.logName = defaultValue1; + const expectedHeaderRequestParams = `log_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteLog = stubSimpleCall(undefined, expectedError); await assert.rejects(client.deleteLog(request), expectedError); - assert( - (client.innerApiCalls.deleteLog as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteLog as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLog as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLog with closed client', async () => { @@ -342,7 +354,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogRequest() ); - request.logName = ''; + const defaultValue1 = getTypeDefaultValue('DeleteLogRequest', [ + 'logName', + ]); + request.logName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteLog(request), expectedError); @@ -359,18 +374,12 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesResponse() ); client.innerApiCalls.writeLogEntries = stubSimpleCall(expectedResponse); const [response] = await client.writeLogEntries(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.writeLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes writeLogEntries without error using callback', async () => { @@ -382,7 +391,6 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesResponse() ); @@ -405,11 +413,6 @@ describe('v2.LoggingServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.writeLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes writeLogEntries with error', async () => { @@ -421,18 +424,12 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.WriteLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.writeLogEntries = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.writeLogEntries(request), expectedError); - assert( - (client.innerApiCalls.writeLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes writeLogEntries with closed client', async () => { @@ -460,6 +457,7 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.TailLogEntriesRequest() ); + const expectedResponse = generateSampleMessage( new protos.google.logging.v2.TailLogEntriesResponse() ); @@ -545,7 +543,6 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogEntry()), generateSampleMessage(new protos.google.logging.v2.LogEntry()), @@ -554,11 +551,6 @@ describe('v2.LoggingServiceV2Client', () => { client.innerApiCalls.listLogEntries = stubSimpleCall(expectedResponse); const [response] = await client.listLogEntries(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes listLogEntries without error using callback', async () => { @@ -570,7 +562,6 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogEntry()), generateSampleMessage(new protos.google.logging.v2.LogEntry()), @@ -595,11 +586,6 @@ describe('v2.LoggingServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes listLogEntries with error', async () => { @@ -611,18 +597,12 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogEntriesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.listLogEntries = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listLogEntries(request), expectedError); - assert( - (client.innerApiCalls.listLogEntries as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes listLogEntriesStream without error', async () => { @@ -764,7 +744,6 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage( new protos.google.api.MonitoredResourceDescriptor() @@ -780,11 +759,6 @@ describe('v2.LoggingServiceV2Client', () => { stubSimpleCall(expectedResponse); const [response] = await client.listMonitoredResourceDescriptors(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listMonitoredResourceDescriptors as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes listMonitoredResourceDescriptors without error using callback', async () => { @@ -796,7 +770,6 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage( new protos.google.api.MonitoredResourceDescriptor() @@ -827,11 +800,6 @@ describe('v2.LoggingServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listMonitoredResourceDescriptors as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes listMonitoredResourceDescriptors with error', async () => { @@ -843,7 +811,6 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCall( undefined, @@ -853,11 +820,6 @@ describe('v2.LoggingServiceV2Client', () => { client.listMonitoredResourceDescriptors(request), expectedError ); - assert( - (client.innerApiCalls.listMonitoredResourceDescriptors as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes listMonitoredResourceDescriptorsStream without error', async () => { @@ -1031,24 +993,21 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [new String(), new String(), new String()]; client.innerApiCalls.listLogs = stubSimpleCall(expectedResponse); const [response] = await client.listLogs(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLogs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listLogs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLogs without error using callback', async () => { @@ -1060,15 +1019,9 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [new String(), new String(), new String()]; client.innerApiCalls.listLogs = stubSimpleCallWithCallback(expectedResponse); @@ -1086,11 +1039,14 @@ describe('v2.LoggingServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLogs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listLogs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLogs with error', async () => { @@ -1102,23 +1058,20 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listLogs = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listLogs(request), expectedError); - assert( - (client.innerApiCalls.listLogs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listLogs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLogsStream without error', async () => { @@ -1130,8 +1083,9 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [new String(), new String(), new String()]; client.descriptors.page.listLogs.createStream = stubPageStreamingCall(expectedResponse); @@ -1155,10 +1109,12 @@ describe('v2.LoggingServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listLogs, request) ); - assert.strictEqual( - (client.descriptors.page.listLogs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLogs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1171,8 +1127,9 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLogs.createStream = stubPageStreamingCall( undefined, @@ -1197,10 +1154,12 @@ describe('v2.LoggingServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listLogs, request) ); - assert.strictEqual( - (client.descriptors.page.listLogs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLogs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1213,8 +1172,9 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [new String(), new String(), new String()]; client.descriptors.page.listLogs.asyncIterate = stubAsyncIterationCall(expectedResponse); @@ -1229,10 +1189,12 @@ describe('v2.LoggingServiceV2Client', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listLogs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLogs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1245,8 +1207,9 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLogs.asyncIterate = stubAsyncIterationCall( undefined, @@ -1264,10 +1227,12 @@ describe('v2.LoggingServiceV2Client', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listLogs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLogs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 4c3cb8fa5f7..5fe4f21d8a2 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -222,26 +237,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); client.innerApiCalls.getLogMetric = stubSimpleCall(expectedResponse); const [response] = await client.getLogMetric(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getLogMetric without error using callback', async () => { @@ -253,15 +267,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); @@ -284,11 +294,14 @@ describe('v2.MetricsServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getLogMetric with error', async () => { @@ -300,26 +313,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getLogMetric = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getLogMetric(request), expectedError); - assert( - (client.innerApiCalls.getLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getLogMetric with closed client', async () => { @@ -331,7 +343,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetLogMetricRequest() ); - request.metricName = ''; + const defaultValue1 = getTypeDefaultValue('GetLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getLogMetric(request), expectedError); @@ -348,26 +363,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateLogMetricRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateLogMetricRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); client.innerApiCalls.createLogMetric = stubSimpleCall(expectedResponse); const [response] = await client.createLogMetric(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createLogMetric without error using callback', async () => { @@ -379,15 +393,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateLogMetricRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateLogMetricRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); @@ -410,11 +420,14 @@ describe('v2.MetricsServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createLogMetric with error', async () => { @@ -426,26 +439,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateLogMetricRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateLogMetricRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createLogMetric = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createLogMetric(request), expectedError); - assert( - (client.innerApiCalls.createLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createLogMetric with closed client', async () => { @@ -457,7 +469,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateLogMetricRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateLogMetricRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createLogMetric(request), expectedError); @@ -474,26 +489,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); client.innerApiCalls.updateLogMetric = stubSimpleCall(expectedResponse); const [response] = await client.updateLogMetric(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateLogMetric without error using callback', async () => { @@ -505,15 +519,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.logging.v2.LogMetric() ); @@ -536,11 +546,14 @@ describe('v2.MetricsServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateLogMetric with error', async () => { @@ -552,26 +565,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateLogMetric = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateLogMetric(request), expectedError); - assert( - (client.innerApiCalls.updateLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateLogMetric with closed client', async () => { @@ -583,7 +595,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateLogMetricRequest() ); - request.metricName = ''; + const defaultValue1 = getTypeDefaultValue('UpdateLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateLogMetric(request), expectedError); @@ -600,26 +615,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteLogMetric = stubSimpleCall(expectedResponse); const [response] = await client.deleteLogMetric(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLogMetric without error using callback', async () => { @@ -631,15 +645,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -662,11 +672,14 @@ describe('v2.MetricsServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLogMetric with error', async () => { @@ -678,26 +691,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogMetricRequest() ); - request.metricName = ''; - const expectedHeaderRequestParams = 'metric_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; + const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteLogMetric = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteLogMetric(request), expectedError); - assert( - (client.innerApiCalls.deleteLogMetric as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteLogMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLogMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLogMetric with closed client', async () => { @@ -709,7 +721,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogMetricRequest() ); - request.metricName = ''; + const defaultValue1 = getTypeDefaultValue('DeleteLogMetricRequest', [ + 'metricName', + ]); + request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteLogMetric(request), expectedError); @@ -726,15 +741,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogMetric()), generateSampleMessage(new protos.google.logging.v2.LogMetric()), @@ -743,11 +754,14 @@ describe('v2.MetricsServiceV2Client', () => { client.innerApiCalls.listLogMetrics = stubSimpleCall(expectedResponse); const [response] = await client.listLogMetrics(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLogMetrics as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listLogMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLogMetrics without error using callback', async () => { @@ -759,15 +773,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogMetric()), generateSampleMessage(new protos.google.logging.v2.LogMetric()), @@ -792,11 +802,14 @@ describe('v2.MetricsServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLogMetrics as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listLogMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLogMetrics with error', async () => { @@ -808,26 +821,25 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listLogMetrics = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listLogMetrics(request), expectedError); - assert( - (client.innerApiCalls.listLogMetrics as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listLogMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLogMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLogMetricsStream without error', async () => { @@ -839,8 +851,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogMetric()), generateSampleMessage(new protos.google.logging.v2.LogMetric()), @@ -868,11 +883,12 @@ describe('v2.MetricsServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listLogMetrics, request) ); - assert.strictEqual( - ( - client.descriptors.page.listLogMetrics.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLogMetrics.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -885,8 +901,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLogMetrics.createStream = stubPageStreamingCall(undefined, expectedError); @@ -909,11 +928,12 @@ describe('v2.MetricsServiceV2Client', () => { .getCall(0) .calledWith(client.innerApiCalls.listLogMetrics, request) ); - assert.strictEqual( - ( - client.descriptors.page.listLogMetrics.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLogMetrics.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -926,8 +946,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogMetric()), generateSampleMessage(new protos.google.logging.v2.LogMetric()), @@ -947,11 +970,12 @@ describe('v2.MetricsServiceV2Client', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listLogMetrics.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLogMetrics.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -964,8 +988,11 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLogMetrics.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -982,11 +1009,12 @@ describe('v2.MetricsServiceV2Client', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listLogMetrics.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLogMetrics.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 6de41cbc6e15f2fb6dbf1089e2ece67a60fdbfc8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 21:01:13 -0700 Subject: [PATCH 0919/1029] chore(main): release 10.1.10 (#1338) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.10 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index a27a06e72a9..0e00ea9bad3 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.10](https://github.com/googleapis/nodejs-logging/compare/v10.1.9...v10.1.10) (2022-09-14) + + +### Bug Fixes + +* Preserve default values in x-goog-request-params header ([#1337](https://github.com/googleapis/nodejs-logging/issues/1337)) ([87c8d1f](https://github.com/googleapis/nodejs-logging/commit/87c8d1f034d6318d4b0841099f844a9474aae165)) + ## [10.1.9](https://github.com/googleapis/nodejs-logging/compare/v10.1.8...v10.1.9) (2022-09-09) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c02b7fad950..306ad8c7c77 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.9", + "version": "10.1.10", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index cb6b39e10d9..a6335a85d14 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.9", + "version": "10.1.10", "language": "TYPESCRIPT", "apis": [ { From 6e5ef4d49c2e250d39149790d26b1cf3c415a9c5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 12:20:29 -0700 Subject: [PATCH 0920/1029] test: use fully qualified request type name in tests (#1345) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test/gapic_config_service_v2_v2.ts | 708 +++++++++++------- .../test/gapic_logging_service_v2_v2.ts | 63 +- .../test/gapic_metrics_service_v2_v2.ts | 161 ++-- 3 files changed, 584 insertions(+), 348 deletions(-) diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index ae57b2d163e..4102088ea28 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -269,7 +269,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBucketRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -297,7 +300,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBucketRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -341,7 +347,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBucketRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -366,7 +375,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBucketRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -384,9 +396,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBucketRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateBucketRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -414,9 +427,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBucketRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateBucketRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -460,9 +474,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBucketRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateBucketRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -490,9 +505,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBucketRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateBucketRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -510,9 +526,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -540,9 +557,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -586,9 +604,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -616,9 +635,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -636,9 +656,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -666,9 +687,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -712,9 +734,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -742,9 +765,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -762,9 +786,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UndeleteBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('UndeleteBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UndeleteBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -792,9 +817,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UndeleteBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('UndeleteBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UndeleteBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -838,9 +864,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UndeleteBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('UndeleteBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UndeleteBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -868,9 +895,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UndeleteBucketRequest() ); - const defaultValue1 = getTypeDefaultValue('UndeleteBucketRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UndeleteBucketRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -888,7 +916,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetViewRequest() ); - const defaultValue1 = getTypeDefaultValue('GetViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -916,7 +947,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetViewRequest() ); - const defaultValue1 = getTypeDefaultValue('GetViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -960,7 +994,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetViewRequest() ); - const defaultValue1 = getTypeDefaultValue('GetViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -985,7 +1022,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetViewRequest() ); - const defaultValue1 = getTypeDefaultValue('GetViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1003,9 +1043,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateViewRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateViewRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateViewRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1033,9 +1074,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateViewRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateViewRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateViewRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1079,9 +1121,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateViewRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateViewRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateViewRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1109,9 +1152,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateViewRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateViewRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateViewRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1129,7 +1173,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateViewRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1157,7 +1204,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateViewRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1201,7 +1251,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateViewRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1229,7 +1282,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateViewRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1247,7 +1303,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteViewRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1275,7 +1334,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteViewRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1319,7 +1381,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteViewRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1347,7 +1412,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteViewRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteViewRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteViewRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1365,7 +1433,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('GetSinkRequest', ['sinkName']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1393,7 +1464,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('GetSinkRequest', ['sinkName']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1437,7 +1511,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('GetSinkRequest', ['sinkName']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1462,7 +1539,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('GetSinkRequest', ['sinkName']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1480,9 +1560,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateSinkRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateSinkRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1510,9 +1591,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateSinkRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateSinkRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1556,9 +1638,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateSinkRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateSinkRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1586,9 +1669,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateSinkRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateSinkRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1606,9 +1690,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateSinkRequest', [ - 'sinkName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1636,9 +1721,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateSinkRequest', [ - 'sinkName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1682,9 +1768,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateSinkRequest', [ - 'sinkName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1712,9 +1799,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateSinkRequest', [ - 'sinkName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1732,9 +1820,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteSinkRequest', [ - 'sinkName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1762,9 +1851,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteSinkRequest', [ - 'sinkName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1808,9 +1898,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteSinkRequest', [ - 'sinkName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1838,9 +1929,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteSinkRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteSinkRequest', [ - 'sinkName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteSinkRequest', + ['sinkName'] + ); request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1858,9 +1950,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('GetExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1888,9 +1981,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('GetExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1934,9 +2028,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('GetExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1964,9 +2059,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('GetExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1984,9 +2080,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateExclusionRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateExclusionRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2014,9 +2111,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateExclusionRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateExclusionRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2060,9 +2158,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateExclusionRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateExclusionRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2090,9 +2189,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateExclusionRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateExclusionRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2110,9 +2210,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2140,9 +2241,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2186,9 +2288,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2216,9 +2319,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2236,9 +2340,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2266,9 +2371,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2312,9 +2418,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2342,9 +2449,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteExclusionRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteExclusionRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteExclusionRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2362,9 +2470,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetCmekSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCmekSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetCmekSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2392,9 +2501,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetCmekSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCmekSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetCmekSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2438,9 +2548,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetCmekSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCmekSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetCmekSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2468,9 +2579,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetCmekSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCmekSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetCmekSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2488,9 +2600,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateCmekSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateCmekSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateCmekSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2519,9 +2632,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateCmekSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateCmekSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateCmekSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2565,9 +2679,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateCmekSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateCmekSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateCmekSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2595,9 +2710,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateCmekSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateCmekSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateCmekSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2615,7 +2731,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('GetSettingsRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2643,7 +2762,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('GetSettingsRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2687,7 +2809,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('GetSettingsRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2715,7 +2840,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('GetSettingsRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2733,9 +2861,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2763,9 +2892,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2809,9 +2939,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2839,9 +2970,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateSettingsRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateSettingsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateSettingsRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2997,9 +3129,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3029,9 +3162,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3077,9 +3211,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3107,9 +3242,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3157,9 +3293,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3204,9 +3341,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3246,9 +3384,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListBucketsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBucketsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3289,7 +3428,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3319,7 +3461,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3365,7 +3510,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3390,7 +3538,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3438,7 +3589,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3483,7 +3637,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3522,7 +3679,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListViewsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListViewsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3562,7 +3722,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3592,7 +3755,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3638,7 +3804,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3663,7 +3832,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3711,7 +3883,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3756,7 +3931,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3795,7 +3973,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListSinksRequest() ); - const defaultValue1 = getTypeDefaultValue('ListSinksRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3835,9 +4016,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListExclusionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3867,9 +4049,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListExclusionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3915,9 +4098,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListExclusionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3945,9 +4129,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListExclusionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3995,9 +4180,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListExclusionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4040,9 +4226,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListExclusionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4082,9 +4269,10 @@ describe('v2.ConfigServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListExclusionsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListExclusionsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListExclusionsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index d9b27817f28..d368185968a 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -251,9 +251,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteLogRequest', [ - 'logName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLogRequest', + ['logName'] + ); request.logName = defaultValue1; const expectedHeaderRequestParams = `log_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -281,9 +282,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteLogRequest', [ - 'logName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLogRequest', + ['logName'] + ); request.logName = defaultValue1; const expectedHeaderRequestParams = `log_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -327,9 +329,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteLogRequest', [ - 'logName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLogRequest', + ['logName'] + ); request.logName = defaultValue1; const expectedHeaderRequestParams = `log_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -354,9 +357,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteLogRequest', [ - 'logName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLogRequest', + ['logName'] + ); request.logName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -993,7 +997,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [new String(), new String(), new String()]; @@ -1019,7 +1026,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [new String(), new String(), new String()]; @@ -1058,7 +1068,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1083,7 +1096,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [new String(), new String(), new String()]; @@ -1127,7 +1143,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1172,7 +1191,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [new String(), new String(), new String()]; @@ -1207,7 +1229,10 @@ describe('v2.LoggingServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 5fe4f21d8a2..20b74af2c86 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -237,9 +237,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('GetLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -267,9 +268,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('GetLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -313,9 +315,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('GetLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -343,9 +346,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.GetLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('GetLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -363,9 +367,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateLogMetricRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateLogMetricRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -393,9 +398,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateLogMetricRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateLogMetricRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -439,9 +445,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateLogMetricRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateLogMetricRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -469,9 +476,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.CreateLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateLogMetricRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateLogMetricRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -489,9 +497,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -519,9 +528,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -565,9 +575,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -595,9 +606,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.UpdateLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.UpdateLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -615,9 +627,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -645,9 +658,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -691,9 +705,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -721,9 +736,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.DeleteLogMetricRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteLogMetricRequest', [ - 'metricName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLogMetricRequest', + ['metricName'] + ); request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -741,9 +757,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogMetricsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -773,9 +790,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogMetricsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -821,9 +839,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogMetricsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -851,9 +870,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogMetricsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -901,9 +921,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogMetricsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -946,9 +967,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogMetricsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -988,9 +1010,10 @@ describe('v2.MetricsServiceV2Client', () => { const request = generateSampleMessage( new protos.google.logging.v2.ListLogMetricsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListLogMetricsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListLogMetricsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); From bf20f3bde96d599789fdaa71b1510f9222bd0b80 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Tue, 11 Oct 2022 23:27:55 +0300 Subject: [PATCH 0921/1029] fix: Instrumentation performance (#1354) * fix: Instrumentation performance * Rename instrumentationWritten --- handwritten/logging/src/utils/instrumentation.ts | 15 +++++++++++++-- handwritten/logging/test/instrumentation.ts | 2 ++ handwritten/logging/test/log.ts | 4 ++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 6a6809de8b3..60ffe6a305c 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -26,6 +26,9 @@ declare const global: {[index: string]: any}; // libraries related info. global.instrumentationAdded = false; +// The global variable to avoid records inspection once instrumentation already written to prevent perf impact +global.shouldSkipInstrumentationCheck = false; + // The variable to hold cached library version let libraryVersion: string; @@ -46,6 +49,11 @@ export type InstrumentationInfo = {name: string; version: string}; export function populateInstrumentationInfo( entry: Entry | Entry[] ): [Entry[], boolean] { + // Check if instrumentation data was already written once. This prevents also inspection of + // the entries for instrumentation data to prevent perf degradation + if (global.shouldSkipInstrumentationCheck) { + return [arrify(entry), false]; + } // Update the flag indicating that instrumentation entry was already added once, // so any subsequent calls to this method will not add a separate instrumentation log entry let isWritten = setInstrumentationStatus(true); @@ -64,7 +72,10 @@ export function populateInstrumentationInfo( validateAndUpdateInstrumentation(info); // Indicate that instrumentation info log entry already exists // and that current library info was added to existing log entry - isInfoAdded = isWritten = true; + global.shouldSkipInstrumentationCheck = + isInfoAdded = + isWritten = + true; } entries.push(entryItem); } @@ -74,7 +85,7 @@ export function populateInstrumentationInfo( // instrumentation data for this library if (!isWritten) { entries.push(createDiagnosticEntry(undefined, undefined)); - isInfoAdded = true; + global.shouldSkipInstrumentationCheck = isInfoAdded = true; } return [entries, isInfoAdded]; } diff --git a/handwritten/logging/test/instrumentation.ts b/handwritten/logging/test/instrumentation.ts index 5ba5700c73c..3482c29a934 100644 --- a/handwritten/logging/test/instrumentation.ts +++ b/handwritten/logging/test/instrumentation.ts @@ -30,6 +30,8 @@ const LONG_VERSION_TEST = VERSION_TEST + '.0.0.0.0.0.0.0.0.11.1.1-ALPHA'; describe('instrumentation_info', () => { beforeEach(() => { instrumentation.setInstrumentationStatus(false); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (global as any).shouldSkipInstrumentationCheck = false; }); it('should generate library info properly by default', () => { diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index b3e5dcdf072..e8446091936 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -556,6 +556,8 @@ describe('Log', () => { it('should set the partialSuccess properly for instrumentation record', async () => { instrumentation.setInstrumentationStatus(false); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (global as any).shouldSkipInstrumentationCheck = false; await log.write(ENTRIES, OPTIONS); assert( log.logging.loggingService.writeLogEntries.calledOnceWith( @@ -569,6 +571,8 @@ describe('Log', () => { it('should set the partialSuccess properly for existing instrumentation record', async () => { ENTRIES.push(instrumentation.createDiagnosticEntry(undefined, undefined)); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (global as any).shouldSkipInstrumentationCheck = false; await log.write(ENTRIES, OPTIONS); assert( log.logging.loggingService.writeLogEntries.calledOnceWith( From 343e464c775c66eee03cea52bc224a017faf0354 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 13:48:15 -0700 Subject: [PATCH 0922/1029] chore(main): release 10.1.11 (#1355) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.1.11 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 0e00ea9bad3..d71b192c54a 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.1.11](https://github.com/googleapis/nodejs-logging/compare/v10.1.10...v10.1.11) (2022-10-11) + + +### Bug Fixes + +* Instrumentation performance ([#1354](https://github.com/googleapis/nodejs-logging/issues/1354)) ([9f14ea1](https://github.com/googleapis/nodejs-logging/commit/9f14ea11aed043b635518e7a43dd7ba128a7f8c4)) + ## [10.1.10](https://github.com/googleapis/nodejs-logging/compare/v10.1.9...v10.1.10) (2022-09-14) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 306ad8c7c77..8ee0526efb7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.10", + "version": "10.1.11", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index a6335a85d14..774cfbea3a0 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.10", + "version": "10.1.11", "language": "TYPESCRIPT", "apis": [ { From beda6cbc90bcf7ea5d240deccda3bee6675f8988 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Thu, 27 Oct 2022 19:58:03 +0300 Subject: [PATCH 0923/1029] feat: Add support for partialSuccess global configuration (#1359) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for partialSuccess global configuration * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- handwritten/logging/src/log.ts | 19 ++++++++++++++++--- handwritten/logging/test/log.ts | 12 ++++++++---- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index caef889b6ae..97326414895 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -61,6 +61,7 @@ export interface LogOptions { maxEntrySize?: number; // see: https://cloud.google.com/logging/quotas jsonFieldsToTruncate?: string[]; defaultWriteDeleteCallback?: ApiResponseCallback; + partialSuccess?: boolean; } // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -95,6 +96,9 @@ export type DeleteCallback = ApiResponseCallback; * Note that {@link LogOptions#defaultWriteDeleteCallback} is useful when {@link Log#write} and {@link Log#delete} APIs are called * without `await` and without callback added explicitly to every call - this way {@link LogOptions#defaultWriteDeleteCallback} * can serve as global callback handler, which for example could be used to catch all errors and eliminate crashes. + * @param {boolean} [options.partialSuccess] Global flag indicating Whether a batch's valid entries should be written even if + * some other entry failed due to errors. Default is true. + * See {@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write#body.request_body.FIELDS.partial_success|partialSuccess} for more info. * @example * ``` * import {Logging} from '@google-cloud/logging'; @@ -122,6 +126,7 @@ class Log implements LogSeverityFunctions { name: string; jsonFieldsToTruncate: string[]; defaultWriteDeleteCallback?: ApiResponseCallback; + partialSuccess: boolean; constructor(logging: Logging, name: string, options?: LogOptions) { options = options || {}; @@ -170,6 +175,13 @@ class Log implements LogSeverityFunctions { * was set by user and only for APIs which does not accept a callback as parameter */ this.defaultWriteDeleteCallback = options.defaultWriteDeleteCallback; + + /** + Turning partialSuccess by default to be true if not provided in options. This should improve + overall logging reliability since only oversized entries will be dropped + from request. See {@link https://cloud.google.com/logging/quotas#log-limits} for more info + */ + this.partialSuccess = options.partialSuccess ?? true; } /** @@ -967,9 +979,10 @@ class Log implements LogSeverityFunctions { // Extract & format additional context from individual entries. Make sure to add instrumentation info const info = populateInstrumentationInfo(entry); const decoratedEntries = this.decorateEntries(info[0]); - // If instrumentation info was added make sure we set partialSuccess, so entire - // request will make it through and only oversized entries will be dropped if any - if (info[1]) { + // If instrumentation info was added or this.partialSuccess was set, make sure we set + // partialSuccess in outgoing write request, so entire request will make it through and + // only oversized entries will be dropped if any + if (info[1] || (options.partialSuccess ?? this.partialSuccess)) { options.partialSuccess = true; } this.truncateEntries(decoratedEntries); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index e8446091936..af438f35c83 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -379,6 +379,7 @@ describe('Log', () => { { logName: log.formattedName_, entries: ENTRIES, + partialSuccess: true, resource: { labels: { project_id: 'fake-project', @@ -449,6 +450,7 @@ describe('Log', () => { { logName: log.formattedName_, entries: ENTRIES, + partialSuccess: true, resource: EXPECTED_RESOURCE, }, undefined, @@ -464,6 +466,7 @@ describe('Log', () => { { logName: log.formattedName_, entries: ENTRIES, + partialSuccess: true, resource: FAKE_RESOURCE, }, undefined, @@ -480,6 +483,7 @@ describe('Log', () => { { logName: log.formattedName_, entries: ENTRIES, + partialSuccess: true, resource: FAKE_RESOURCE, }, undefined, @@ -534,10 +538,10 @@ describe('Log', () => { it('should not require options', async () => { await log.write(ENTRY); assert( - log.logging.loggingService.writeLogEntries.calledOnceWithExactly( - sinon.match.object, - undefined, - undefined + log.logging.loggingService.writeLogEntries.calledOnceWith( + sinon.match({ + partialSuccess: true, + }) ) ); }); From 6fd4c78717c3d25b3c67574e5ac94c1672bad532 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 27 Oct 2022 20:06:05 +0200 Subject: [PATCH 0924/1029] chore(deps): update dependency @types/node to v18 (#1356) Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 8ee0526efb7..1abe69433e7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -67,7 +67,7 @@ "@google-cloud/storage": "^6.0.0", "@types/extend": "^3.0.1", "@types/mocha": "^9.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", From f3b6e91bc17d56a330234b0730f41814678d7e68 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 27 Oct 2022 14:59:15 -0700 Subject: [PATCH 0925/1029] chore(main): release 10.2.0 (#1360) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index d71b192c54a..24155abda54 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.2.0](https://github.com/googleapis/nodejs-logging/compare/v10.1.11...v10.2.0) (2022-10-27) + + +### Features + +* Add support for partialSuccess global configuration ([#1359](https://github.com/googleapis/nodejs-logging/issues/1359)) ([178b19f](https://github.com/googleapis/nodejs-logging/commit/178b19f55e8d50415aee62cc770b2244c590ff67)) + ## [10.1.11](https://github.com/googleapis/nodejs-logging/compare/v10.1.10...v10.1.11) (2022-10-11) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1abe69433e7..277aec52f39 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.1.11", + "version": "10.2.0", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 774cfbea3a0..d886cedc689 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.1.11", + "version": "10.2.0", "language": "TYPESCRIPT", "apis": [ { From 7dd4b47fbe697a7d9ca461e2b00b49530f88d04d Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Sat, 29 Oct 2022 02:54:32 +0300 Subject: [PATCH 0926/1029] fix: Correct an order of instrumentation entries (#1362) * fix: Correct an order of instrumentation entries * Add MAX_INSTRUMENTATION_COUNT constant --- .../logging/src/utils/instrumentation.ts | 17 ++--- handwritten/logging/test/instrumentation.ts | 66 +++++++++++++++++-- 2 files changed, 69 insertions(+), 14 deletions(-) diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 60ffe6a305c..e028aba50d9 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -38,6 +38,7 @@ const maxDiagnosticValueLen = 14; export const DIAGNOSTIC_INFO_KEY = 'logging.googleapis.com/diagnostic'; export const INSTRUMENTATION_SOURCE_KEY = 'instrumentation_source'; export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; +export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; /** @@ -131,13 +132,8 @@ function validateAndUpdateInstrumentation( infoList: InstrumentationInfo[] ): InstrumentationInfo[] { const finalInfo: InstrumentationInfo[] = []; - // First, add current library information - finalInfo.push({ - name: NODEJS_LIBRARY_NAME_PREFIX, - version: getNodejsLibraryVersion(), - }); - // Iterate through given list of libraries and for each entry perform validations and transformations - // Limit amount of entries to be up to 3 + // First, iterate through given list of libraries and for each entry perform validations and transformations. + // Limit amount of entries to be up to MAX_INSTRUMENTATION_COUNT let count = 1; for (const info of infoList) { if (isValidInfo(info)) { @@ -145,9 +141,14 @@ function validateAndUpdateInstrumentation( name: truncateValue(info.name, maxDiagnosticValueLen), version: truncateValue(info.version, maxDiagnosticValueLen), }); + if (++count === MAX_INSTRUMENTATION_COUNT) break; } - if (++count === 3) break; } + // Finally, add current library information to be the last entry added + finalInfo.push({ + name: NODEJS_LIBRARY_NAME_PREFIX, + version: getNodejsLibraryVersion(), + }); return finalInfo; } diff --git a/handwritten/logging/test/instrumentation.ts b/handwritten/logging/test/instrumentation.ts index 3482c29a934..a3f0126266a 100644 --- a/handwritten/logging/test/instrumentation.ts +++ b/handwritten/logging/test/instrumentation.ts @@ -88,7 +88,7 @@ describe('instrumentation_info', () => { ); }); - it('should add instrumentation info to existing list', () => { + it('should add instrumentation info to existing list in right order', () => { const dummyEntry = createEntry(NODEJS_TEST, VERSION_TEST); const entries = instrumentation.populateInstrumentationInfo(dummyEntry); assert.equal(entries[0].length, 1); @@ -102,19 +102,19 @@ describe('instrumentation_info', () => { assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY - ]?.[0]?.[NAME], + ]?.[1]?.[NAME], instrumentation.NODEJS_LIBRARY_NAME_PREFIX ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY - ]?.[1]?.[NAME], + ]?.[0]?.[NAME], NODEJS_TEST ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY - ]?.[1]?.[VERSION], + ]?.[0]?.[VERSION], VERSION_TEST ); }); @@ -147,13 +147,13 @@ describe('instrumentation_info', () => { assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY - ]?.[1]?.[NAME], + ]?.[0]?.[NAME], NODEJS_TEST + '-oo*' ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY - ]?.[1]?.[VERSION], + ]?.[0]?.[VERSION], VERSION_TEST + '.0.0.0.0.*' ); }); @@ -174,6 +174,60 @@ describe('instrumentation_info', () => { assert.equal(entries[0].length, 1); assert.deepEqual(dummyEntry, entries[0][0]); }); + + it('should discard extra instrumentation records', () => { + // Add 4 library versions and make sure that last 2 are discarded and the "nodejs" base + // library version is always added as a third one + const dummy = createEntry( + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-one', + 'v1' + ); + dummy.data?.[instrumentation.DIAGNOSTIC_INFO_KEY][ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ].push({ + name: instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-two', + version: 'v2', + }); + dummy.data?.[instrumentation.DIAGNOSTIC_INFO_KEY][ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ].push({ + name: NODEJS_TEST, + version: VERSION_TEST, + }); + dummy.data?.[instrumentation.DIAGNOSTIC_INFO_KEY][ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ].push({ + name: LONG_NODEJS_TEST, + version: LONG_VERSION_TEST, + }); + const entries = instrumentation.populateInstrumentationInfo(dummy); + assert.equal(entries[0].length, 1); + assert.equal( + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.length, + 3 + ); + assert.equal(true, entries[1]); + assert.equal( + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[0]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-one' + ); + assert.equal( + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[1]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-two' + ); + assert.equal( + entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ + instrumentation.INSTRUMENTATION_SOURCE_KEY + ]?.[2]?.[NAME], + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + ); + }); }); function createEntry(name: string | undefined, version: string | undefined) { From 3a2182b6eeb62b32d2a98bb1a5412c6b933ed8e3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 28 Oct 2022 17:22:41 -0700 Subject: [PATCH 0927/1029] chore(main): release 10.2.1 (#1363) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.2.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 24155abda54..d1755feb226 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.2.1](https://github.com/googleapis/nodejs-logging/compare/v10.2.0...v10.2.1) (2022-10-28) + + +### Bug Fixes + +* Correct an order of instrumentation entries ([#1362](https://github.com/googleapis/nodejs-logging/issues/1362)) ([c6b11e3](https://github.com/googleapis/nodejs-logging/commit/c6b11e33a1979af522972f37fa5f14f734e64297)) + ## [10.2.0](https://github.com/googleapis/nodejs-logging/compare/v10.1.11...v10.2.0) (2022-10-27) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 277aec52f39..e882c0418cd 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.2.0", + "version": "10.2.1", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index d886cedc689..8282a62eafa 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.2.0", + "version": "10.2.1", "language": "TYPESCRIPT", "apis": [ { From 71f33cd77f0d8d558a25ebd33a346f0f06270897 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Mon, 31 Oct 2022 20:06:32 +0200 Subject: [PATCH 0928/1029] fix: Runtime package.json check causes breakage when bundled (#1364) * fix: Runtime package.json check causes breakage when bundled * Correct anoner place to return NODEJS_DEFAULT_LIBRARY_VERSION --- .../logging/src/utils/instrumentation.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index e028aba50d9..8cb99f7c42d 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -38,6 +38,7 @@ const maxDiagnosticValueLen = 14; export const DIAGNOSTIC_INFO_KEY = 'logging.googleapis.com/diagnostic'; export const INSTRUMENTATION_SOURCE_KEY = 'instrumentation_source'; export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; +export const NODEJS_DEFAULT_LIBRARY_VERSION = 'unknown'; export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; @@ -174,7 +175,7 @@ function truncateValue(value: object | string, maxLen: number) { } // Return 'unknown' if version cannot be retrieved if (typeof value !== 'string') { - return 'unknown'; + return NODEJS_DEFAULT_LIBRARY_VERSION; } if (value && value.length > maxLen) { return value.substring(0, maxLen).concat('*'); @@ -191,11 +192,15 @@ export function getNodejsLibraryVersion() { if (libraryVersion) { return libraryVersion; } - libraryVersion = require(path.resolve( - __dirname, - '../../../', - 'package.json' - )).version; + try { + libraryVersion = require(path.resolve( + __dirname, + '../../../', + 'package.json' + )).version; + } catch (err) { + libraryVersion = NODEJS_DEFAULT_LIBRARY_VERSION; + } return libraryVersion; } From 0cb26d8b2b911e0c62d942f9e66a1c06ca0e481e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 31 Oct 2022 11:46:08 -0700 Subject: [PATCH 0929/1029] chore(main): release 10.2.2 (#1365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.2.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index d1755feb226..a62730a83a9 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.2.2](https://github.com/googleapis/nodejs-logging/compare/v10.2.1...v10.2.2) (2022-10-31) + + +### Bug Fixes + +* Runtime package.json check causes breakage when bundled ([#1364](https://github.com/googleapis/nodejs-logging/issues/1364)) ([ec40231](https://github.com/googleapis/nodejs-logging/commit/ec4023165368eea7fd6fc05002a7da1a065b128e)) + ## [10.2.1](https://github.com/googleapis/nodejs-logging/compare/v10.2.0...v10.2.1) (2022-10-28) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e882c0418cd..553ca4b7adc 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.2.1", + "version": "10.2.2", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 8282a62eafa..bf124a1a7f5 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.2.1", + "version": "10.2.2", "language": "TYPESCRIPT", "apis": [ { From aa3f8aa3cd038f6a71f2d68baee672fe51029b09 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 19:01:49 -0700 Subject: [PATCH 0930/1029] build: fix nodejs cloudbuild.yaml syntax (#1366) * build: fix nodejs cloudbuild.yaml syntax * build: fix nodejs_mono_repo cloudbuild.yaml syntax Source-Link: https://github.com/googleapis/synthtool/commit/5ae0078c29dd8b4cf198257f1357b8ff210f327d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:13f1814b7e6c676c87ab435a8b1f13987fc1e2a0513ee4f8a1318fbd4724732b Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 3 +- handwritten/logging/protos/protos.d.ts | 2 +- handwritten/logging/protos/protos.js | 180 +++++++++++++++--- 3 files changed, 159 insertions(+), 26 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 4d586c42063..03846747450 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e -# created: 2022-08-26T22:34:55.905845397Z + digest: sha256:13f1814b7e6c676c87ab435a8b1f13987fc1e2a0513ee4f8a1318fbd4724732b diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index a65eb6fa607..18227e0ff5f 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Long = require("long"); import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); /** Namespace google. */ export namespace google { diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 152e5fa81e9..33134418e42 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -2797,6 +2797,12 @@ if (object.number != null) message.number = object.number | 0; switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; case "LABEL_OPTIONAL": case 1: message.label = 1; @@ -2811,6 +2817,12 @@ break; } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_DOUBLE": case 1: message.type = 1; @@ -2937,9 +2949,9 @@ if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; if (message.typeName != null && message.hasOwnProperty("typeName")) object.typeName = message.typeName; if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) @@ -5286,6 +5298,12 @@ if (object.javaStringCheckUtf8 != null) message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; case "SPEED": case 1: message.optimizeFor = 1; @@ -5394,7 +5412,7 @@ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; if (message.goPackage != null && message.hasOwnProperty("goPackage")) @@ -6196,6 +6214,12 @@ return object; var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; case "STRING": case 0: message.ctype = 0; @@ -6212,6 +6236,12 @@ if (object.packed != null) message.packed = Boolean(object.packed); switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; case "JS_NORMAL": case 0: message.jstype = 0; @@ -6250,6 +6280,10 @@ for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) switch (object[".google.api.fieldBehavior"][i]) { default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: message[".google.api.fieldBehavior"][i] = 0; @@ -6320,7 +6354,7 @@ object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; if (message.packed != null && message.hasOwnProperty("packed")) object.packed = message.packed; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -6328,7 +6362,7 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) @@ -6341,7 +6375,7 @@ if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); @@ -7718,6 +7752,12 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; case "IDEMPOTENCY_UNKNOWN": case 0: message.idempotencyLevel = 0; @@ -7787,7 +7827,7 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -9542,6 +9582,12 @@ if (object.end != null) message.end = object.end | 0; switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; case "NONE": case 0: message.semantic = 0; @@ -9591,7 +9637,7 @@ if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -10175,6 +10221,12 @@ return object; var message = new $root.google.protobuf.Value(); switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; case "NULL_VALUE": case 0: message.nullValue = 0; @@ -10213,7 +10265,7 @@ options = {}; var object = {}; if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; if (options.oneofs) object.kind = "nullValue"; } @@ -12565,6 +12617,12 @@ message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp); } switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; case "DEFAULT": case 0: message.severity = 0; @@ -12694,7 +12752,7 @@ if (message.timestamp != null && message.hasOwnProperty("timestamp")) object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] : message.severity; + object.severity = options.enums === String ? $root.google.logging.type.LogSeverity[message.severity] === undefined ? message.severity : $root.google.logging.type.LogSeverity[message.severity] : message.severity; var keys2; if (message.labels && (keys2 = Object.keys(message.labels)).length) { object.labels = {}; @@ -17059,6 +17117,12 @@ return object; var message = new $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo(); switch (object.reason) { + default: + if (typeof object.reason === "number") { + message.reason = object.reason; + break; + } + break; case "REASON_UNSPECIFIED": case 0: message.reason = 0; @@ -17095,7 +17159,7 @@ object.suppressedCount = 0; } if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason[message.reason] : message.reason; + object.reason = options.enums === String ? $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason[message.reason] === undefined ? message.reason : $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason[message.reason] : message.reason; if (message.suppressedCount != null && message.hasOwnProperty("suppressedCount")) object.suppressedCount = message.suppressedCount; return object; @@ -18374,6 +18438,12 @@ if (object.locked != null) message.locked = Boolean(object.locked); switch (object.lifecycleState) { + default: + if (typeof object.lifecycleState === "number") { + message.lifecycleState = object.lifecycleState; + break; + } + break; case "LIFECYCLE_STATE_UNSPECIFIED": case 0: message.lifecycleState = 0; @@ -18440,7 +18510,7 @@ if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) object.retentionDays = message.retentionDays; if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) - object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; + object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] === undefined ? message.lifecycleState : $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; if (message.restrictedFields && message.restrictedFields.length) { object.restrictedFields = []; for (var j = 0; j < message.restrictedFields.length; ++j) @@ -19194,6 +19264,12 @@ } } switch (object.outputVersionFormat) { + default: + if (typeof object.outputVersionFormat === "number") { + message.outputVersionFormat = object.outputVersionFormat; + break; + } + break; case "VERSION_FORMAT_UNSPECIFIED": case 0: message.outputVersionFormat = 0; @@ -19263,7 +19339,7 @@ if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; if (message.outputVersionFormat != null && message.hasOwnProperty("outputVersionFormat")) - object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; + object.outputVersionFormat = options.enums === String ? $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] === undefined ? message.outputVersionFormat : $root.google.logging.v2.LogSink.VersionFormat[message.outputVersionFormat] : message.outputVersionFormat; if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) object.writerIdentity = message.writerIdentity; if (message.includeChildren != null && message.hasOwnProperty("includeChildren")) @@ -27775,6 +27851,12 @@ message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "OPERATION_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -27845,7 +27927,7 @@ if (message.endTime != null && message.hasOwnProperty("endTime")) object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.logging.v2.OperationState[message.state] : message.state; + object.state = options.enums === String ? $root.google.logging.v2.OperationState[message.state] === undefined ? message.state : $root.google.logging.v2.OperationState[message.state] : message.state; if (message.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) object.cancellationRequested = message.cancellationRequested; if (message.request != null && message.hasOwnProperty("request")) @@ -28749,6 +28831,12 @@ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } switch (object.version) { + default: + if (typeof object.version === "number") { + message.version = object.version; + break; + } + break; case "V2": case 0: message.version = 0; @@ -28795,7 +28883,7 @@ if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; if (message.version != null && message.hasOwnProperty("version")) - object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; + object.version = options.enums === String ? $root.google.logging.v2.LogMetric.ApiVersion[message.version] === undefined ? message.version : $root.google.logging.v2.LogMetric.ApiVersion[message.version] : message.version; if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); if (message.valueExtractor != null && message.hasOwnProperty("valueExtractor")) @@ -31511,6 +31599,12 @@ } } switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; case "LAUNCH_STAGE_UNSPECIFIED": case 0: message.launchStage = 0; @@ -31583,7 +31677,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; @@ -32339,6 +32433,12 @@ if (object.key != null) message.key = String(object.key); switch (object.valueType) { + default: + if (typeof object.valueType === "number") { + message.valueType = object.valueType; + break; + } + break; case "STRING": case 0: message.valueType = 0; @@ -32378,7 +32478,7 @@ if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; return object; @@ -32759,6 +32859,12 @@ if (object.nameField != null) message.nameField = String(object.nameField); switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; case "HISTORY_UNSPECIFIED": case 0: message.history = 0; @@ -32783,6 +32889,10 @@ for (var i = 0; i < object.style.length; ++i) switch (object.style[i]) { default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } case "STYLE_UNSPECIFIED": case 0: message.style[i] = 0; @@ -32830,7 +32940,7 @@ if (message.nameField != null && message.hasOwnProperty("nameField")) object.nameField = message.nameField; if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; if (message.plural != null && message.hasOwnProperty("plural")) object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) @@ -32838,7 +32948,7 @@ if (message.style && message.style.length) { object.style = []; for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; @@ -35472,6 +35582,12 @@ } } switch (object.metricKind) { + default: + if (typeof object.metricKind === "number") { + message.metricKind = object.metricKind; + break; + } + break; case "METRIC_KIND_UNSPECIFIED": case 0: message.metricKind = 0; @@ -35490,6 +35606,12 @@ break; } switch (object.valueType) { + default: + if (typeof object.valueType === "number") { + message.valueType = object.valueType; + break; + } + break; case "VALUE_TYPE_UNSPECIFIED": case 0: message.valueType = 0; @@ -35531,6 +35653,12 @@ message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); } switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; case "LAUNCH_STAGE_UNSPECIFIED": case 0: message.launchStage = 0; @@ -35610,9 +35738,9 @@ object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); } if (message.metricKind != null && message.hasOwnProperty("metricKind")) - object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] === undefined ? message.metricKind : $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; if (message.unit != null && message.hasOwnProperty("unit")) object.unit = message.unit; if (message.description != null && message.hasOwnProperty("description")) @@ -35624,7 +35752,7 @@ if (message.metadata != null && message.hasOwnProperty("metadata")) object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { object.monitoredResourceTypes = []; for (var j = 0; j < message.monitoredResourceTypes.length; ++j) @@ -35860,6 +35988,12 @@ return object; var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; case "LAUNCH_STAGE_UNSPECIFIED": case 0: message.launchStage = 0; @@ -35925,7 +36059,7 @@ object.ingestDelay = null; } if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) From a4390e4d34d5d0a1abe690cc94c7435ce690c600 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 2 Nov 2022 20:01:58 -0700 Subject: [PATCH 0931/1029] fix(deps): use google-gax v3.5.2 (#1367) * fix(deps): use google-gax v3.5.2 * fix: add comma Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 553ca4b7adc..e2ad8a4497e 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^8.0.2", - "google-gax": "^3.3.0", + "google-gax": "^3.5.2", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", From 2afc8e6e6df1c1a552f3e8332c0b7c0d3f65cf41 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 3 Nov 2022 12:25:49 -0700 Subject: [PATCH 0932/1029] chore(main): release 10.2.3 (#1368) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.2.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index a62730a83a9..b14be6cc118 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.2.3](https://github.com/googleapis/nodejs-logging/compare/v10.2.2...v10.2.3) (2022-11-03) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#1367](https://github.com/googleapis/nodejs-logging/issues/1367)) ([8cd3262](https://github.com/googleapis/nodejs-logging/commit/8cd326250d5f92e025925158922f67de9d65678e)) + ## [10.2.2](https://github.com/googleapis/nodejs-logging/compare/v10.2.1...v10.2.2) (2022-10-31) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index e2ad8a4497e..729caceb267 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.2.2", + "version": "10.2.3", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index bf124a1a7f5..67b23acf2a3 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.2.2", + "version": "10.2.3", "language": "TYPESCRIPT", "apis": [ { From f58738772608eb6ed8b04dd201996ccbc3246eab Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Fri, 4 Nov 2022 19:08:19 +0200 Subject: [PATCH 0933/1029] feat: Add support for instrumentation version annotations (#1370) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for instrumentation version annotations * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Fix tests * Add exclude to owlbot.py * Add newline Co-authored-by: Owl Bot --- handwritten/logging/.github/release-please.yml | 1 + handwritten/logging/owlbot.py | 3 ++- handwritten/logging/src/utils/instrumentation.ts | 4 ++-- handwritten/logging/test/instrumentation.ts | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/.github/release-please.yml b/handwritten/logging/.github/release-please.yml index a1b41da3cb3..e38b6169b2c 100644 --- a/handwritten/logging/.github/release-please.yml +++ b/handwritten/logging/.github/release-please.yml @@ -1,2 +1,3 @@ handleGHRelease: true releaseType: node +extraFiles: ["src/utils/instrumentation.ts"] diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index c7b30f53789..2e38e480962 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -28,7 +28,8 @@ ".eslintignore", ".prettierignore", "CONTRIBUTING.md", - ".github/auto-label.yaml" + ".github/auto-label.yaml", + ".github/release-please.yml" ] ) diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 8cb99f7c42d..d9513ce66eb 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -38,7 +38,7 @@ const maxDiagnosticValueLen = 14; export const DIAGNOSTIC_INFO_KEY = 'logging.googleapis.com/diagnostic'; export const INSTRUMENTATION_SOURCE_KEY = 'instrumentation_source'; export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; -export const NODEJS_DEFAULT_LIBRARY_VERSION = 'unknown'; +export const NODEJS_DEFAULT_LIBRARY_VERSION = '1.0.0'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; @@ -173,7 +173,7 @@ function truncateValue(value: object | string, maxLen: number) { // Ignore error since flow should continue } } - // Return 'unknown' if version cannot be retrieved + // Return NODEJS_DEFAULT_LIBRARY_VERSION if version cannot be retrieved if (typeof value !== 'string') { return NODEJS_DEFAULT_LIBRARY_VERSION; } diff --git a/handwritten/logging/test/instrumentation.ts b/handwritten/logging/test/instrumentation.ts index a3f0126266a..45305005239 100644 --- a/handwritten/logging/test/instrumentation.ts +++ b/handwritten/logging/test/instrumentation.ts @@ -53,7 +53,7 @@ describe('instrumentation_info', () => { ); }); - it('should set library version to unknown', () => { + it('should set library version to NODEJS_DEFAULT_LIBRARY_VERSION', () => { const data = {some: 'value'}; const entry = instrumentation.createDiagnosticEntry( undefined, @@ -70,7 +70,7 @@ describe('instrumentation_info', () => { entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[VERSION], - 'unknown' + instrumentation.NODEJS_DEFAULT_LIBRARY_VERSION ); }); From 2e04535ddeec31942df036a68c3907c438b0574c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 4 Nov 2022 11:12:48 -0700 Subject: [PATCH 0934/1029] chore(main): release 10.3.0 (#1372) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.3.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index b14be6cc118..32a67c5af26 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.3.0](https://github.com/googleapis/nodejs-logging/compare/v10.2.3...v10.3.0) (2022-11-04) + + +### Features + +* Add support for instrumentation version annotations ([#1370](https://github.com/googleapis/nodejs-logging/issues/1370)) ([c039022](https://github.com/googleapis/nodejs-logging/commit/c039022783d7507b9cb14152e1e370b03f6f864f)) + ## [10.2.3](https://github.com/googleapis/nodejs-logging/compare/v10.2.2...v10.2.3) (2022-11-03) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 729caceb267..51bc5a80ce4 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.2.3", + "version": "10.3.0", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 67b23acf2a3..57ff7075f83 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.2.3", + "version": "10.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index d9513ce66eb..4b21482b872 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -38,7 +38,7 @@ const maxDiagnosticValueLen = 14; export const DIAGNOSTIC_INFO_KEY = 'logging.googleapis.com/diagnostic'; export const INSTRUMENTATION_SOURCE_KEY = 'instrumentation_source'; export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; -export const NODEJS_DEFAULT_LIBRARY_VERSION = '1.0.0'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.0'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 8444315c2a67aa14b369da446877d4bdb7507cc7 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 5 Nov 2022 00:56:09 +0100 Subject: [PATCH 0935/1029] chore(deps): update dependency jsdoc to v4 (#1371) Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 51bc5a80ce4..f4694840ce7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -78,7 +78,7 @@ "codecov": "^3.6.5", "gts": "^3.1.0", "http2spy": "^2.0.0", - "jsdoc": "^3.6.3", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From 9089fa3c440666980f4504b335089eebb37e2854 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Mon, 7 Nov 2022 13:54:40 -0800 Subject: [PATCH 0936/1029] fix: Switch instrumentation code to work with NODEJS_DEFAULT_LIBRARY_VERSION only (#1373) * fix: Switch instrumentation code to work with NODEJS_DEFAULT_LIBRARY_VERSION only * Fix comment --- .../logging/src/utils/instrumentation.ts | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 4b21482b872..5750d7cfabc 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -15,7 +15,6 @@ */ import arrify = require('arrify'); -import path = require('path'); import {Entry} from '../entry'; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -29,15 +28,17 @@ global.instrumentationAdded = false; // The global variable to avoid records inspection once instrumentation already written to prevent perf impact global.shouldSkipInstrumentationCheck = false; -// The variable to hold cached library version -let libraryVersion: string; - // Max length for instrumentation library name and version values const maxDiagnosticValueLen = 14; export const DIAGNOSTIC_INFO_KEY = 'logging.googleapis.com/diagnostic'; export const INSTRUMENTATION_SOURCE_KEY = 'instrumentation_source'; export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; +/** + * Default library version to be used + * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. + * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files + */ export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.0'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; @@ -184,24 +185,11 @@ function truncateValue(value: object | string, maxLen: number) { } /** - * The helper function to retrieve current library version from 'package.json' file. Note that - * since we use {path.resolve}, the search for 'package.json' could be impacted by current working directory. + * The helper function to retrieve current library version from annotated NODEJS_DEFAULT_LIBRARY_VERSION * @returns {string} A current library version. */ export function getNodejsLibraryVersion() { - if (libraryVersion) { - return libraryVersion; - } - try { - libraryVersion = require(path.resolve( - __dirname, - '../../../', - 'package.json' - )).version; - } catch (err) { - libraryVersion = NODEJS_DEFAULT_LIBRARY_VERSION; - } - return libraryVersion; + return NODEJS_DEFAULT_LIBRARY_VERSION; } /** From 8cabb99cb2d06212b38615b5b95b7e9d4aa1768e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 16:09:49 -0800 Subject: [PATCH 0937/1029] chore(main): release 10.3.1 (#1375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.3.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 32a67c5af26..c77af772de9 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.3.1](https://github.com/googleapis/nodejs-logging/compare/v10.3.0...v10.3.1) (2022-11-07) + + +### Bug Fixes + +* Switch instrumentation code to work with NODEJS_DEFAULT_LIBRARY_VERSION only ([#1373](https://github.com/googleapis/nodejs-logging/issues/1373)) ([32b22b4](https://github.com/googleapis/nodejs-logging/commit/32b22b4c17376a51f413481b3e412a88c0f83f06)) + ## [10.3.0](https://github.com/googleapis/nodejs-logging/compare/v10.2.3...v10.3.0) (2022-11-04) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index f4694840ce7..878d7f90442 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.3.0", + "version": "10.3.1", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 57ff7075f83..81eb2eff019 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.3.0", + "version": "10.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 5750d7cfabc..896739ca3b5 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.0'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.1'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 8b0a131cb3d204ff9499a24043dd4bb100606290 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 17 Nov 2022 21:57:45 +0100 Subject: [PATCH 0938/1029] chore(deps): update dependency webpack-cli to v5 (#1376) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 878d7f90442..bc1380bd7e0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -92,7 +92,7 @@ "typescript": "^4.6.4", "uglify-js": "^3.13.5", "webpack": "^5.0.0", - "webpack-cli": "^4.0.0" + "webpack-cli": "^5.0.0" }, "engines": { "node": ">=12.0.0" From cde52a9c26e4222377c122af75680e7128ffc3d5 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 30 Nov 2022 18:15:47 +0100 Subject: [PATCH 0939/1029] chore(deps): update dependency sinon to v15 (#1377) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index bc1380bd7e0..b5950a6d3e8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -87,7 +87,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", - "sinon": "^14.0.0", + "sinon": "^15.0.0", "ts-loader": "^9.0.0", "typescript": "^4.6.4", "uglify-js": "^3.13.5", From 4ba52b5ee442c47839e34b56191dd944f1c8e0ec Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 1 Dec 2022 23:23:00 +0100 Subject: [PATCH 0940/1029] chore(deps): update dependency @types/uuid to v9 (#1378) Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index b5950a6d3e8..7dbc761e4f1 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -72,7 +72,7 @@ "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", "@types/sinon": "^10.0.0", - "@types/uuid": "^8.0.0", + "@types/uuid": "^9.0.0", "bignumber.js": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", From 4c5c7ea771e6d45df39e542a1c3a8f04fe71cbda Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Thu, 1 Dec 2022 20:50:58 -0800 Subject: [PATCH 0941/1029] fix: Add a partner team as approvers for PRs (#1380) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Add a partner team as approvers for PRs Adding @googleapis/api-logging-partners to contain more people who can approve PRs * Update sync-repo-settings.yaml * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update CODEOWNERS * Update sync-repo-settings.yaml Co-authored-by: Owl Bot --- handwritten/logging/.github/CODEOWNERS | 2 +- handwritten/logging/.github/sync-repo-settings.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/.github/CODEOWNERS b/handwritten/logging/.github/CODEOWNERS index cba4ffcf939..9cfb9aaf97c 100644 --- a/handwritten/logging/.github/CODEOWNERS +++ b/handwritten/logging/.github/CODEOWNERS @@ -6,7 +6,7 @@ # The yoshi-nodejs team is the default owner for nodejs repositories. -* @googleapis/yoshi-nodejs @googleapis/api-logging +* @googleapis/yoshi-nodejs @googleapis/api-logging @googleapis/api-logging-partners # The github automation team is the default owner for the auto-approve file. .github/auto-approve.yml @googleapis/github-automation diff --git a/handwritten/logging/.github/sync-repo-settings.yaml b/handwritten/logging/.github/sync-repo-settings.yaml index 4a30a08e54c..d5aa4e3e025 100644 --- a/handwritten/logging/.github/sync-repo-settings.yaml +++ b/handwritten/logging/.github/sync-repo-settings.yaml @@ -22,3 +22,5 @@ permissionRules: permission: admin - team: jsteam permission: push + - team: api-logging-partners + permission: push From 626342b7156f125449f2020f868d655dc02b4ee4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 1 Dec 2022 21:48:43 -0800 Subject: [PATCH 0942/1029] chore(main): release 10.3.2 (#1381) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.3.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update owlbot.py * Update CODEOWNERS * Update sync-repo-settings.yaml Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/.github/sync-repo-settings.yaml | 3 ++- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/owlbot.py | 4 +++- handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/.github/sync-repo-settings.yaml b/handwritten/logging/.github/sync-repo-settings.yaml index d5aa4e3e025..73eb8fabcd1 100644 --- a/handwritten/logging/.github/sync-repo-settings.yaml +++ b/handwritten/logging/.github/sync-repo-settings.yaml @@ -23,4 +23,5 @@ permissionRules: - team: jsteam permission: push - team: api-logging-partners - permission: push + permission: push + diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index c77af772de9..866b28016fc 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.3.2](https://github.com/googleapis/nodejs-logging/compare/v10.3.1...v10.3.2) (2022-12-02) + + +### Bug Fixes + +* Add a partner team as approvers for PRs ([#1380](https://github.com/googleapis/nodejs-logging/issues/1380)) ([ca1f4fa](https://github.com/googleapis/nodejs-logging/commit/ca1f4fa30baa4f9786d6c112313c4fe06773524d)) + ## [10.3.1](https://github.com/googleapis/nodejs-logging/compare/v10.3.0...v10.3.1) (2022-11-07) diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index 2e38e480962..58d77a55aee 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -29,7 +29,9 @@ ".prettierignore", "CONTRIBUTING.md", ".github/auto-label.yaml", - ".github/release-please.yml" + ".github/release-please.yml", + ".github/CODEOWNERS", + ".github/sync-repo-settings.yaml" ] ) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 7dbc761e4f1..76932019b45 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.3.1", + "version": "10.3.2", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 81eb2eff019..14cb6b4de23 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.3.1", + "version": "10.3.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 896739ca3b5..82433ba6cc9 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.1'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.2'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From a1053b441a43cb7c25a8a7ead0ff9e74d5f666af Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 23:46:13 +0000 Subject: [PATCH 0943/1029] build: have Kokoro grab service account credentials from secret that will be rotated (#1383) * build: have Kokoro grab service account credentials from secret that will be rotated Source-Link: https://togithub.com/googleapis/synthtool/commit/4a0230eb8dc497f36fd3839e6144982131f30a9d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:f59941869d508c6825deeffce180579545fd528f359f549a80a18ec0458d7094 --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- .../logging/.kokoro/continuous/node12/samples-test.cfg | 5 +++++ .../logging/.kokoro/presubmit/node12/samples-test.cfg | 5 +++++ handwritten/logging/.kokoro/samples-test.sh | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 03846747450..6c41b3088f5 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:13f1814b7e6c676c87ab435a8b1f13987fc1e2a0513ee4f8a1318fbd4724732b + digest: sha256:f59941869d508c6825deeffce180579545fd528f359f549a80a18ec0458d7094 diff --git a/handwritten/logging/.kokoro/continuous/node12/samples-test.cfg b/handwritten/logging/.kokoro/continuous/node12/samples-test.cfg index 18403029858..30039fd9879 100644 --- a/handwritten/logging/.kokoro/continuous/node12/samples-test.cfg +++ b/handwritten/logging/.kokoro/continuous/node12/samples-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-logging/.kokoro/samples-test.sh" } + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/handwritten/logging/.kokoro/presubmit/node12/samples-test.cfg b/handwritten/logging/.kokoro/presubmit/node12/samples-test.cfg index 18403029858..30039fd9879 100644 --- a/handwritten/logging/.kokoro/presubmit/node12/samples-test.cfg +++ b/handwritten/logging/.kokoro/presubmit/node12/samples-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-logging/.kokoro/samples-test.sh" } + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index fbc058a4ec4..806c0082236 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -19,7 +19,7 @@ set -eo pipefail export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/long-door-651-kokoro-system-test-service-account export GCLOUD_PROJECT=long-door-651 cd $(dirname $0)/.. From 8019f86f969eaa7f58224f4e3ab172cf325f0a9c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 11:01:22 -0800 Subject: [PATCH 0944/1029] chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport (#1382) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: https://github.com/googleapis/googleapis/commit/758f0d1217d9c7fe398aa5efb1057ce4b6409e55 Source-Link: https://github.com/googleapis/googleapis-gen/commit/78bd8f05e1276363eb14eae70e91fe4bc20703ab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/src/v2/config_service_v2_client.ts | 3 +++ handwritten/logging/src/v2/logging_service_v2_client.ts | 3 +++ handwritten/logging/src/v2/metrics_service_v2_client.ts | 3 +++ 3 files changed, 9 insertions(+) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 06dc9b8d170..632fc241e90 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -123,6 +123,9 @@ export class ConfigServiceV2Client { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index ca37a21e377..54f7b56bd19 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -120,6 +120,9 @@ export class LoggingServiceV2Client { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 5ff2e92bcd9..7b0e273a5c5 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -120,6 +120,9 @@ export class MetricsServiceV2Client { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; From 97ef2373517e3abce8272b8b213c51c32ed9b566 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 16 Dec 2022 14:52:15 -0800 Subject: [PATCH 0945/1029] fix: add CLOUDSDK_PYTHON env var to environment tests (#1385) Fixes failing Kubernetes environment tests by adding the CLOUDSDK_PYTHON environment variable --- handwritten/logging/.kokoro/environment.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.kokoro/environment.sh b/handwritten/logging/.kokoro/environment.sh index 943759cfc0e..e7aa6b197fd 100755 --- a/handwritten/logging/.kokoro/environment.sh +++ b/handwritten/logging/.kokoro/environment.sh @@ -45,6 +45,8 @@ cd "env-tests-logging/" # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 +export CLOUDSDK_PYTHON=python3 + # Debug: show build environment env | grep KOKORO From adc721483e09c575c1bd290ecf793e614295bac9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 11:41:11 -0800 Subject: [PATCH 0946/1029] chore(main): release 10.3.3 (#1386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.3.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index 866b28016fc..ff969d0078e 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.3.3](https://github.com/googleapis/nodejs-logging/compare/v10.3.2...v10.3.3) (2022-12-16) + + +### Bug Fixes + +* Add CLOUDSDK_PYTHON env var to environment tests ([#1385](https://github.com/googleapis/nodejs-logging/issues/1385)) ([8ac3e6b](https://github.com/googleapis/nodejs-logging/commit/8ac3e6b69c7a862942a40427ddefa07b0cf50554)) + ## [10.3.2](https://github.com/googleapis/nodejs-logging/compare/v10.3.1...v10.3.2) (2022-12-02) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 76932019b45..3737c809d9b 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.3.2", + "version": "10.3.3", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 14cb6b4de23..a6a4e47f0fb 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.3.2", + "version": "10.3.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 82433ba6cc9..3af3a86620d 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.2'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.3'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 87e54f32175f777765818e8f7c9ecb4c45640f77 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 22:52:19 +0000 Subject: [PATCH 0947/1029] build: have Kokoro grab service account credentials from secret that will be rotated for system tests (#1397) Source-Link: https://togithub.com/googleapis/synthtool/commit/abbc97db69a57dcb991ba97ef503305b701ffb3a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:fe04ae044dadf5ad88d979dbcc85e0e99372fb5d6316790341e6aca5e4e3fbc8 --- handwritten/logging/.github/.OwlBot.lock.yaml | 2 +- .../logging/.kokoro/continuous/node12/system-test.cfg | 5 +++++ handwritten/logging/.kokoro/presubmit/node12/system-test.cfg | 5 +++++ handwritten/logging/.kokoro/system-test.sh | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 6c41b3088f5..788f7a9fdff 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:f59941869d508c6825deeffce180579545fd528f359f549a80a18ec0458d7094 + digest: sha256:fe04ae044dadf5ad88d979dbcc85e0e99372fb5d6316790341e6aca5e4e3fbc8 diff --git a/handwritten/logging/.kokoro/continuous/node12/system-test.cfg b/handwritten/logging/.kokoro/continuous/node12/system-test.cfg index 1d18894c806..a366b35529f 100644 --- a/handwritten/logging/.kokoro/continuous/node12/system-test.cfg +++ b/handwritten/logging/.kokoro/continuous/node12/system-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-logging/.kokoro/system-test.sh" } + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/handwritten/logging/.kokoro/presubmit/node12/system-test.cfg b/handwritten/logging/.kokoro/presubmit/node12/system-test.cfg index 1d18894c806..a366b35529f 100644 --- a/handwritten/logging/.kokoro/presubmit/node12/system-test.cfg +++ b/handwritten/logging/.kokoro/presubmit/node12/system-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-logging/.kokoro/system-test.sh" } + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index 87fa0653d76..0201e9dfd71 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -19,7 +19,7 @@ set -eo pipefail export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/long-door-651-kokoro-system-test-service-account export GCLOUD_PROJECT=long-door-651 cd $(dirname $0)/.. From abf2a291fa731767cc63d2d788f8f1071f3a6913 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 24 Jan 2023 17:26:34 +0000 Subject: [PATCH 0948/1029] chore: update environment test submodule (#1400) --- env-tests-logging | 2 +- handwritten/logging/.kokoro/environment.sh | 6 ++++-- handwritten/logging/.kokoro/environment/common.cfg | 5 +++++ handwritten/logging/protos/protos.d.ts | 2 +- handwritten/logging/protos/protos.js | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/env-tests-logging b/env-tests-logging index fca19185862..b2f060f3017 160000 --- a/env-tests-logging +++ b/env-tests-logging @@ -1 +1 @@ -Subproject commit fca191858621afcce6542351462860f9c576d650 +Subproject commit b2f060f30170d95a0fd813dc39cdaa6abca69ca9 diff --git a/handwritten/logging/.kokoro/environment.sh b/handwritten/logging/.kokoro/environment.sh index e7aa6b197fd..f2940d5327f 100755 --- a/handwritten/logging/.kokoro/environment.sh +++ b/handwritten/logging/.kokoro/environment.sh @@ -24,7 +24,7 @@ if [[ -z "${ENVIRONMENT:-}" ]]; then fi # Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/long-door-651-kokoro-system-test-service-account export GCLOUD_PROJECT=long-door-651 gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS @@ -41,6 +41,8 @@ npm run compile # make sure submodule is up to date git submodule update --init --recursive cd "env-tests-logging/" +export ENV_TEST_PY_VERSION=3.7 +echo "using python version: $ENV_TEST_PY_VERSION" # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -88,7 +90,7 @@ fi # Run the specified environment test set +e -nox --python 3.7 --session "tests(language='nodejs', platform='$ENVIRONMENT')" +python3 -m nox --session "tests(language='nodejs', platform='$ENVIRONMENT')" TEST_STATUS_CODE=$? # destroy resources diff --git a/handwritten/logging/.kokoro/environment/common.cfg b/handwritten/logging/.kokoro/environment/common.cfg index 6fbe6c30df3..46eb92b29d7 100644 --- a/handwritten/logging/.kokoro/environment/common.cfg +++ b/handwritten/logging/.kokoro/environment/common.cfg @@ -39,3 +39,8 @@ env_vars: { key: "LANGUAGE_LABEL" value: "nodejs" } + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 18227e0ff5f..3edb9336692 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 33134418e42..293bad648f8 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From de72936d95e1fdd4c4c2ac2a321cc803c45d4c35 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 09:21:43 -0800 Subject: [PATCH 0949/1029] feat: Added SuggestConversationSummary RPC (#1399) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added SuggestConversationSummary RPC docs: updated go library package PiperOrigin-RevId: 501862436 Source-Link: https://github.com/googleapis/googleapis/commit/155e0f4123ba003055587768944a47498c48926b Source-Link: https://github.com/googleapis/googleapis-gen/commit/3051f617a991c274c88d27064e803095e4ef9d39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MWY2MTdhOTkxYzI3NGM4OGQyNzA2NGU4MDMwOTVlNGVmOWQzOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- handwritten/logging/.jsdoc.js | 4 ++-- .../generated/v2/config_service_v2.copy_log_entries.js | 2 +- .../samples/generated/v2/config_service_v2.create_bucket.js | 2 +- .../generated/v2/config_service_v2.create_exclusion.js | 2 +- .../samples/generated/v2/config_service_v2.create_sink.js | 2 +- .../samples/generated/v2/config_service_v2.create_view.js | 2 +- .../samples/generated/v2/config_service_v2.delete_bucket.js | 2 +- .../generated/v2/config_service_v2.delete_exclusion.js | 2 +- .../samples/generated/v2/config_service_v2.delete_sink.js | 2 +- .../samples/generated/v2/config_service_v2.delete_view.js | 2 +- .../samples/generated/v2/config_service_v2.get_bucket.js | 2 +- .../generated/v2/config_service_v2.get_cmek_settings.js | 2 +- .../samples/generated/v2/config_service_v2.get_exclusion.js | 2 +- .../samples/generated/v2/config_service_v2.get_settings.js | 2 +- .../samples/generated/v2/config_service_v2.get_sink.js | 2 +- .../samples/generated/v2/config_service_v2.get_view.js | 2 +- .../samples/generated/v2/config_service_v2.list_buckets.js | 2 +- .../samples/generated/v2/config_service_v2.list_exclusions.js | 2 +- .../samples/generated/v2/config_service_v2.list_sinks.js | 2 +- .../samples/generated/v2/config_service_v2.list_views.js | 2 +- .../samples/generated/v2/config_service_v2.undelete_bucket.js | 2 +- .../samples/generated/v2/config_service_v2.update_bucket.js | 2 +- .../generated/v2/config_service_v2.update_cmek_settings.js | 2 +- .../generated/v2/config_service_v2.update_exclusion.js | 2 +- .../samples/generated/v2/config_service_v2.update_settings.js | 2 +- .../samples/generated/v2/config_service_v2.update_sink.js | 2 +- .../samples/generated/v2/config_service_v2.update_view.js | 2 +- .../samples/generated/v2/logging_service_v2.delete_log.js | 2 +- .../generated/v2/logging_service_v2.list_log_entries.js | 2 +- .../samples/generated/v2/logging_service_v2.list_logs.js | 2 +- .../logging_service_v2.list_monitored_resource_descriptors.js | 2 +- .../generated/v2/logging_service_v2.tail_log_entries.js | 2 +- .../generated/v2/logging_service_v2.write_log_entries.js | 2 +- .../generated/v2/metrics_service_v2.create_log_metric.js | 2 +- .../generated/v2/metrics_service_v2.delete_log_metric.js | 2 +- .../samples/generated/v2/metrics_service_v2.get_log_metric.js | 2 +- .../generated/v2/metrics_service_v2.list_log_metrics.js | 2 +- .../generated/v2/metrics_service_v2.update_log_metric.js | 2 +- handwritten/logging/src/v2/config_service_v2_client.ts | 2 +- handwritten/logging/src/v2/index.ts | 2 +- handwritten/logging/src/v2/logging_service_v2_client.ts | 2 +- handwritten/logging/src/v2/metrics_service_v2_client.ts | 2 +- handwritten/logging/system-test/install.ts | 2 +- handwritten/logging/test/gapic_config_service_v2_v2.ts | 2 +- handwritten/logging/test/gapic_logging_service_v2_v2.ts | 2 +- handwritten/logging/test/gapic_metrics_service_v2_v2.ts | 2 +- 46 files changed, 47 insertions(+), 47 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 4f21ce13da9..9e6e0612f93 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2022 Google LLC', + copyright: 'Copyright 2023 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/logging', diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js index 80fb4788f68..7f685784c00 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js index 83ef09edd4f..e9f37236ecd 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js index a78f3cd1efa..9087ee25753 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js index f9c38b6bc05..00a70ecde6c 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js index b1a65978c42..a7fdd458279 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js index 99a667a087f..83a10ce2a77 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js index 8a3aa7d94e9..a4c94d026e3 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js index c4f92bfb1d6..3f81a394f8f 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js index 3a82d5f94d6..6147f5a41cd 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js index da62aa90301..f6d55db48e9 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js index c42efa7931e..6645986459c 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js index bd036636fbb..372045600fb 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js index ee772fe100e..1cc7ea96f57 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js index d4e31e95a13..a386b0cb984 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js index 7a736f6c720..ce79e41baa3 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js index d882c8ef991..7d43dfab860 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js index 13af69cb873..4005e49ea2c 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js index 529cc02c968..bb4b1478dfe 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js index 5a3290819ea..5fd022d27ab 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js index f49964da8e8..6a1f9467a0d 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js index a768e2948b2..1609c2819bb 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js index afc430314e5..9176871317f 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js index 70c07f2b056..f5050f10e49 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js index b5f9a9dcd4f..2212ee0ec9e 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js index dbb4b8eb8b9..a91614e68f4 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js index efcf7cd24e3..a99694ff957 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js index 94e351fd2e0..302cf675829 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js index d958d6f9758..cc43a691288 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js index aafc050a8bb..fa83d05a446 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js index 026e736e8aa..2d05df22cce 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js index 4b115b06f98..80a19037896 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js index cfa5d2aa89d..13b20b1f28b 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js index 7b38bfc84aa..adcf5f24d82 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js index f1093021f47..f89a254af13 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js index 6711f4bae2c..00656b72779 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js index fffc1b8807c..929c1fb86d7 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js index c8f895171f0..1afdc3049fa 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 632fc241e90..4b46c696852 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/index.ts b/handwritten/logging/src/v2/index.ts index 18cb03a6178..75a03763910 100644 --- a/handwritten/logging/src/v2/index.ts +++ b/handwritten/logging/src/v2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 54f7b56bd19..a19d0588a2a 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 7b0e273a5c5..a6951ca454a 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index 6dd1eaadafa..f61fe236476 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 4102088ea28..732afae574c 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index d368185968a..c1287366a32 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 20b74af2c86..09c6409400f 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 908e75b29f804108c83801559046741b74bd6153 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 14:01:04 -0800 Subject: [PATCH 0950/1029] chore(main): release 10.4.0 (#1401) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.4.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ff969d0078e..f533587caa9 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.4.0](https://github.com/googleapis/nodejs-logging/compare/v10.3.3...v10.4.0) (2023-01-30) + + +### Features + +* Added SuggestConversationSummary RPC ([#1399](https://github.com/googleapis/nodejs-logging/issues/1399)) ([f176209](https://github.com/googleapis/nodejs-logging/commit/f17620919e8f528f197218c97a6a839a7c480a80)) + ## [10.3.3](https://github.com/googleapis/nodejs-logging/compare/v10.3.2...v10.3.3) (2022-12-16) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 3737c809d9b..d2eac6fb0d7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.3.3", + "version": "10.4.0", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index a6a4e47f0fb..d41bc708a13 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.3.3", + "version": "10.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 3af3a86620d..75266fb5b0d 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.3.3'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.4.0'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 74931ecf171dd88ab9bc717bf47331919765f1bd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 6 Feb 2023 18:58:06 -0800 Subject: [PATCH 0951/1029] chore(gitignore): only ignore folders in the top level (#1403) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update .gitignore to always include protos folder Use gapic-generator-typescript v3.0.0. PiperOrigin-RevId: 507004755 Source-Link: https://github.com/googleapis/googleapis/commit/d784f3c1043616fc0646e9ce7afa1b9161cc02de Source-Link: https://github.com/googleapis/googleapis-gen/commit/5e64ba8615f65fdedb1fcd6ac792e5ea621027e4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWU2NGJhODYxNWY2NWZkZWRiMWZjZDZhYzc5MmU1ZWE2MjEwMjdlNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(gitignore): only ignore folders in the top level PiperOrigin-RevId: 507603203 Source-Link: https://github.com/googleapis/googleapis/commit/a4f2de456480c0a4ed9feeeaa1f8ee620bbef23a Source-Link: https://github.com/googleapis/googleapis-gen/commit/dcf882154e7c710ecf2a1abc77b35c95f9062371 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGNmODgyMTU0ZTdjNzEwZWNmMmExYWJjNzdiMzVjOTVmOTA2MjM3MSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- handwritten/logging/.gitignore | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/.gitignore b/handwritten/logging/.gitignore index 5d32b23782f..d4f03a0df2e 100644 --- a/handwritten/logging/.gitignore +++ b/handwritten/logging/.gitignore @@ -1,11 +1,11 @@ **/*.log **/node_modules -.coverage -coverage -.nyc_output -docs/ -out/ -build/ +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ system-test/secrets.js system-test/*key.json *.lock From ca3b12d593bd5f933f9ee13ef0e57a95e92661a5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 14 Feb 2023 12:58:05 -0800 Subject: [PATCH 0952/1029] docs: changing format of the jsdoc links (#1404) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: changing format of the jsdoc links PiperOrigin-RevId: 509352615 Source-Link: https://github.com/googleapis/googleapis/commit/b737d30dae27222d86fa340ecb99292df4585762 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8efadf3d58780ea1c550268d46a3dc701ba37fcf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGVmYWRmM2Q1ODc4MGVhMWM1NTAyNjhkNDZhM2RjNzAxYmEzN2ZjZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../src/v2/config_service_v2_client.ts | 66 +++++++++---------- .../src/v2/logging_service_v2_client.ts | 20 +++--- .../src/v2/metrics_service_v2_client.ts | 14 ++-- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 4b46c696852..0a1e0437642 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -565,7 +565,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * The first element of the array is an object representing {@link google.logging.v2.LogBucket | LogBucket}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -663,7 +663,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * The first element of the array is an object representing {@link google.logging.v2.LogBucket | LogBucket}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -775,7 +775,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogBucket]{@link google.logging.v2.LogBucket}. + * The first element of the array is an object representing {@link google.logging.v2.LogBucket | LogBucket}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -871,7 +871,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -964,7 +964,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1053,7 +1053,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. + * The first element of the array is an object representing {@link google.logging.v2.LogView | LogView}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1147,7 +1147,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. + * The first element of the array is an object representing {@link google.logging.v2.LogView | LogView}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1251,7 +1251,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogView]{@link google.logging.v2.LogView}. + * The first element of the array is an object representing {@link google.logging.v2.LogView | LogView}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1343,7 +1343,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1435,7 +1435,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The first element of the array is an object representing {@link google.logging.v2.LogSink | LogSink}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1546,7 +1546,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The first element of the array is an object representing {@link google.logging.v2.LogSink | LogSink}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1675,7 +1675,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogSink]{@link google.logging.v2.LogSink}. + * The first element of the array is an object representing {@link google.logging.v2.LogSink | LogSink}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1769,7 +1769,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1861,7 +1861,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The first element of the array is an object representing {@link google.logging.v2.LogExclusion | LogExclusion}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1959,7 +1959,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The first element of the array is an object representing {@link google.logging.v2.LogExclusion | LogExclusion}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2063,7 +2063,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The first element of the array is an object representing {@link google.logging.v2.LogExclusion | LogExclusion}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2155,7 +2155,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2261,7 +2261,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. + * The first element of the array is an object representing {@link google.logging.v2.CmekSettings | CmekSettings}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2385,7 +2385,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [CmekSettings]{@link google.logging.v2.CmekSettings}. + * The first element of the array is an object representing {@link google.logging.v2.CmekSettings | CmekSettings}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2493,7 +2493,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Settings]{@link google.logging.v2.Settings}. + * The first element of the array is an object representing {@link google.logging.v2.Settings | Settings}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2615,7 +2615,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Settings]{@link google.logging.v2.Settings}. + * The first element of the array is an object representing {@link google.logging.v2.Settings | Settings}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2860,7 +2860,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogBucket]{@link google.logging.v2.LogBucket}. + * The first element of the array is Array of {@link google.logging.v2.LogBucket | LogBucket}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. @@ -2964,7 +2964,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event. + * An object stream which emits an object representing {@link google.logging.v2.LogBucket | LogBucket} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listBucketsAsync()` @@ -3026,7 +3026,7 @@ export class ConfigServiceV2Client { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [LogBucket]{@link google.logging.v2.LogBucket}. The API will be called under the hood as needed, once per the page, + * {@link google.logging.v2.LogBucket | LogBucket}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3077,7 +3077,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogView]{@link google.logging.v2.LogView}. + * The first element of the array is Array of {@link google.logging.v2.LogView | LogView}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. @@ -3175,7 +3175,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [LogView]{@link google.logging.v2.LogView} on 'data' event. + * An object stream which emits an object representing {@link google.logging.v2.LogView | LogView} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listViewsAsync()` @@ -3231,7 +3231,7 @@ export class ConfigServiceV2Client { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [LogView]{@link google.logging.v2.LogView}. The API will be called under the hood as needed, once per the page, + * {@link google.logging.v2.LogView | LogView}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3284,7 +3284,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogSink]{@link google.logging.v2.LogSink}. + * The first element of the array is Array of {@link google.logging.v2.LogSink | LogSink}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. @@ -3384,7 +3384,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event. + * An object stream which emits an object representing {@link google.logging.v2.LogSink | LogSink} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listSinksAsync()` @@ -3442,7 +3442,7 @@ export class ConfigServiceV2Client { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [LogSink]{@link google.logging.v2.LogSink}. The API will be called under the hood as needed, once per the page, + * {@link google.logging.v2.LogSink | LogSink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3495,7 +3495,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogExclusion]{@link google.logging.v2.LogExclusion}. + * The first element of the array is Array of {@link google.logging.v2.LogExclusion | LogExclusion}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. @@ -3595,7 +3595,7 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event. + * An object stream which emits an object representing {@link google.logging.v2.LogExclusion | LogExclusion} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listExclusionsAsync()` @@ -3653,7 +3653,7 @@ export class ConfigServiceV2Client { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [LogExclusion]{@link google.logging.v2.LogExclusion}. The API will be called under the hood as needed, once per the page, + * {@link google.logging.v2.LogExclusion | LogExclusion}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index a19d0588a2a..c6e6e667cf8 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -505,7 +505,7 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -659,7 +659,7 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WriteLogEntriesResponse]{@link google.logging.v2.WriteLogEntriesResponse}. + * The first element of the array is an object representing {@link google.logging.v2.WriteLogEntriesResponse | WriteLogEntriesResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -737,8 +737,8 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which is both readable and writable. It accepts objects - * representing [TailLogEntriesRequest]{@link google.logging.v2.TailLogEntriesRequest} for write() method, and - * will emit objects representing [TailLogEntriesResponse]{@link google.logging.v2.TailLogEntriesResponse} on 'data' event asynchronously. + * representing {@link google.logging.v2.TailLogEntriesRequest | TailLogEntriesRequest} for write() method, and + * will emit objects representing {@link google.logging.v2.TailLogEntriesResponse | TailLogEntriesResponse} on 'data' event asynchronously. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) * for more details and examples. @@ -803,7 +803,7 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogEntry]{@link google.logging.v2.LogEntry}. + * The first element of the array is Array of {@link google.logging.v2.LogEntry | LogEntry}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. @@ -925,7 +925,7 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event. + * An object stream which emits an object representing {@link google.logging.v2.LogEntry | LogEntry} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listLogEntriesAsync()` @@ -1005,7 +1005,7 @@ export class LoggingServiceV2Client { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [LogEntry]{@link google.logging.v2.LogEntry}. The API will be called under the hood as needed, once per the page, + * {@link google.logging.v2.LogEntry | LogEntry}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -1047,7 +1047,7 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * The first element of the array is Array of {@link google.api.MonitoredResourceDescriptor | MonitoredResourceDescriptor}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. @@ -1148,7 +1148,7 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. + * An object stream which emits an object representing {@link google.api.MonitoredResourceDescriptor | MonitoredResourceDescriptor} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listMonitoredResourceDescriptorsAsync()` @@ -1196,7 +1196,7 @@ export class LoggingServiceV2Client { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page, + * {@link google.api.MonitoredResourceDescriptor | MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index a6951ca454a..d3f752f815b 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -440,7 +440,7 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The first element of the array is an object representing {@link google.logging.v2.LogMetric | LogMetric}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -530,7 +530,7 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The first element of the array is an object representing {@link google.logging.v2.LogMetric | LogMetric}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -621,7 +621,7 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. + * The first element of the array is an object representing {@link google.logging.v2.LogMetric | LogMetric}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -706,7 +706,7 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -801,7 +801,7 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}. + * The first element of the array is Array of {@link google.logging.v2.LogMetric | LogMetric}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. @@ -898,7 +898,7 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. + * An object stream which emits an object representing {@link google.logging.v2.LogMetric | LogMetric} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listLogMetricsAsync()` @@ -953,7 +953,7 @@ export class MetricsServiceV2Client { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [LogMetric]{@link google.logging.v2.LogMetric}. The API will be called under the hood as needed, once per the page, + * {@link google.logging.v2.LogMetric | LogMetric}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) From 89c9c5a353daf9acabae980fc4aee4a1b23bcecd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 12:09:28 -0700 Subject: [PATCH 0953/1029] chore: store nodejs build artifacts in placer (#1408) Source-Link: https://github.com/googleapis/synthtool/commit/3602660ae703daadcb7bc2f87bf601241665f3f8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:e6d785d6de3cab027f6213d95ccedab4cab3811b0d3172b78db2216faa182e32 Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- handwritten/logging/.kokoro/publish.sh | 14 +++++++++++++- handwritten/logging/.kokoro/release/publish.cfg | 12 ++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 788f7a9fdff..0b836e11907 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:fe04ae044dadf5ad88d979dbcc85e0e99372fb5d6316790341e6aca5e4e3fbc8 + digest: sha256:e6d785d6de3cab027f6213d95ccedab4cab3811b0d3172b78db2216faa182e32 diff --git a/handwritten/logging/.kokoro/publish.sh b/handwritten/logging/.kokoro/publish.sh index 949e3e1d0c2..ca1d47af347 100755 --- a/handwritten/logging/.kokoro/publish.sh +++ b/handwritten/logging/.kokoro/publish.sh @@ -27,4 +27,16 @@ NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-npm-token-1) echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc npm install -npm publish --access=public --registry=https://wombat-dressing-room.appspot.com +npm pack . +# npm provides no way to specify, observe, or predict the name of the tarball +# file it generates. We have to look in the current directory for the freshest +# .tgz file. +TARBALL=$(ls -1 -t *.tgz | head -1) + +npm publish --access=public --registry=https://wombat-dressing-room.appspot.com "$TARBALL" + +# Kokoro collects *.tgz and package-lock.json files and stores them in Placer +# so we can generate SBOMs and attestations. +# However, we *don't* want Kokoro to collect package-lock.json and *.tgz files +# that happened to be installed with dependencies. +find node_modules -name package-lock.json -o -name "*.tgz" | xargs rm -f \ No newline at end of file diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 49297cc099d..3d581e79f76 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -37,3 +37,15 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-logging/.kokoro/publish.sh" } + +# Store the packages we uploaded to npmjs.org and their corresponding +# package-lock.jsons in Placer. That way, we have a record of exactly +# what we published, and which version of which tools we used to publish +# it, which we can use to generate SBOMs and attestations. +action { + define_artifacts { + regex: "github/**/*.tgz" + regex: "github/**/package-lock.json" + strip_prefix: "github" + } +} From efa75351c679670c2e4ffc7b9bec1cbea48319cf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:55:16 -0700 Subject: [PATCH 0954/1029] chore: update import paths for Go targets to match open source location (#1410) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update import paths for Go targets to match open source location chore: update go_package in protos to match open source location chore: add explicit release levels to Go gapic targets PiperOrigin-RevId: 520705454 Source-Link: https://github.com/googleapis/googleapis/commit/1cfcea4fbef317c44cc13d73017a0b0462c4737d Source-Link: https://github.com/googleapis/googleapis-gen/commit/15732ab75211b0255433d6f87415e8a3ce466826 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTU3MzJhYjc1MjExYjAyNTU0MzNkNmY4NzQxNWU4YTNjZTQ2NjgyNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- handwritten/logging/protos/google/logging/v2/log_entry.proto | 2 +- handwritten/logging/protos/google/logging/v2/logging.proto | 2 +- .../logging/protos/google/logging/v2/logging_config.proto | 2 +- .../logging/protos/google/logging/v2/logging_metrics.proto | 2 +- handwritten/logging/protos/protos.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 99712936989..634092a9102 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -27,7 +27,7 @@ import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; -option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; +option go_package = "cloud.google.com/go/logging/apiv2/loggingpb;loggingpb"; option java_multiple_files = true; option java_outer_classname = "LogEntryProto"; option java_package = "com.google.logging.v2"; diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index b7f4f189d2e..d87f6549e80 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -28,7 +28,7 @@ import "google/rpc/status.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; -option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; +option go_package = "cloud.google.com/go/logging/apiv2/loggingpb;loggingpb"; option java_multiple_files = true; option java_outer_classname = "LoggingProto"; option java_package = "com.google.logging.v2"; diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index ef0024063d7..f55ab458634 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -27,7 +27,7 @@ import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; -option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; +option go_package = "cloud.google.com/go/logging/apiv2/loggingpb;loggingpb"; option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 9bbbc42bc9e..2952c875f97 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -27,7 +27,7 @@ import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; -option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging"; +option go_package = "cloud.google.com/go/logging/apiv2/loggingpb;loggingpb"; option java_multiple_files = true; option java_outer_classname = "LoggingMetricsProto"; option java_package = "com.google.logging.v2"; diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 115ac64ff33..1f0e4f26bb0 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -1141,7 +1141,7 @@ "options": { "cc_enable_arenas": true, "csharp_namespace": "Google.Cloud.Logging.V2", - "go_package": "google.golang.org/genproto/googleapis/logging/v2;logging", + "go_package": "cloud.google.com/go/logging/apiv2/loggingpb;loggingpb", "java_multiple_files": true, "java_outer_classname": "LoggingMetricsProto", "java_package": "com.google.logging.v2", From f56c428d64c82e71bc08dfd0512f551698be6d35 Mon Sep 17 00:00:00 2001 From: meredithslota Date: Fri, 28 Apr 2023 18:43:08 +0000 Subject: [PATCH 0955/1029] fix(deps): bump `google-gax` to ^3.5.8 (#1412) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes dependency vulnerability in google-gax -> protobufjs-cli Based on #https://github.com/googleapis/google-cloud-node/issues/4116 Fixes https://github.com/googleapis/nodejs-logging/issues/1405 🦕 See also https://github.com/googleapis/google-cloud-node/pull/4117 --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d2eac6fb0d7..da349443b65 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -55,7 +55,7 @@ "extend": "^3.0.2", "gcp-metadata": "^4.0.0", "google-auth-library": "^8.0.2", - "google-gax": "^3.5.2", + "google-gax": "^3.5.8", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", From a1c2a1d9d656ae18f95bd9d4da0e33157f88edb1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 28 Apr 2023 12:12:42 -0700 Subject: [PATCH 0956/1029] chore(main): release 10.4.1 (#1415) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.4.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index f533587caa9..ac6824e531e 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.4.1](https://github.com/googleapis/nodejs-logging/compare/v10.4.0...v10.4.1) (2023-04-28) + + +### Bug Fixes + +* **deps:** Bump `google-gax` to ^3.5.8 ([#1412](https://github.com/googleapis/nodejs-logging/issues/1412)) ([8eb6f03](https://github.com/googleapis/nodejs-logging/commit/8eb6f034c379fff01c3bcb2dacbbf764dd40c1d7)) + ## [10.4.0](https://github.com/googleapis/nodejs-logging/compare/v10.3.3...v10.4.0) (2023-01-30) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index da349443b65..2823c29aff0 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.4.0", + "version": "10.4.1", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index d41bc708a13..a54c9f57241 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.4.0", + "version": "10.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 75266fb5b0d..6fd1d2963c6 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.4.0'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.4.1'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From a1cf1353c228f4be0cd31dd602d7f033d65c1d28 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 09:40:32 -0400 Subject: [PATCH 0957/1029] docs: update docs-devsite.sh to use latest node-js-rad version (#1418) Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Source-Link: https://github.com/googleapis/synthtool/commit/b1ced7db5adee08cfa91d6b138679fceff32c004 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:0527a86c10b67742c409dc726ba9a31ec4e69b0006e3d7a49b0e6686c59cdaa9 Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 3 ++- handwritten/logging/.kokoro/release/docs-devsite.sh | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 0b836e11907..21ad18bd722 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:e6d785d6de3cab027f6213d95ccedab4cab3811b0d3172b78db2216faa182e32 + digest: sha256:0527a86c10b67742c409dc726ba9a31ec4e69b0006e3d7a49b0e6686c59cdaa9 +# created: 2023-05-24T20:32:43.844586914Z diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh index 2198e67fe92..3596c1e4cb1 100755 --- a/handwritten/logging/.kokoro/release/docs-devsite.sh +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -25,5 +25,6 @@ if [[ -z "$CREDENTIALS" ]]; then fi npm install -npm install --no-save @google-cloud/cloud-rad@^0.2.5 -npx @google-cloud/cloud-rad \ No newline at end of file +npm install --no-save @google-cloud/cloud-rad@^0.3.7 +# publish docs to devsite +npx @google-cloud/cloud-rad . cloud-rad From c468b02c7df6cf9f0f53feba83812cfce2c28979 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 May 2023 10:37:57 -0700 Subject: [PATCH 0958/1029] feat: Log Analytics features of the Cloud Logging API (#1416) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Log Analytics features of the Cloud Logging API feat: Add ConfigServiceV2.CreateBucketAsync method for creating Log Buckets asynchronously feat: Add ConfigServiceV2.UpdateBucketAsync method for creating Log Buckets asynchronously feat: Add ConfigServiceV2.CreateLink method for creating linked datasets for Log Analytics Buckets feat: Add ConfigServiceV2.DeleteLink method for deleting linked datasets feat: Add ConfigServiceV2.ListLinks method for listing linked datasets feat: Add ConfigServiceV2.GetLink methods for describing linked datasets feat: Add LogBucket.analytics_enabled field that specifies whether Log Bucket's Analytics features are enabled feat: Add LogBucket.index_configs field that contains a list of Log Bucket's indexed fields and related configuration data docs: Documentation for the Log Analytics features of the Cloud Logging API PiperOrigin-RevId: 529851525 Source-Link: https://github.com/googleapis/googleapis/commit/1c7ee99d19adf8e444e2d73c5dd52884eab9862d Source-Link: https://github.com/googleapis/googleapis-gen/commit/4a2a3a05b91804333a1b39b635d8fe2243d4b4fd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGEyYTNhMDViOTE4MDQzMzNhMWIzOWI2MzVkOGZlMjI0M2Q0YjRmZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: losalex <90795544+losalex@users.noreply.github.com> --- .../protos/google/logging/v2/log_entry.proto | 99 +- .../protos/google/logging/v2/logging.proto | 128 +- .../google/logging/v2/logging_config.proto | 788 +- .../google/logging/v2/logging_metrics.proto | 33 +- handwritten/logging/protos/protos.d.ts | 1577 ++- handwritten/logging/protos/protos.js | 10566 ++++++++++------ handwritten/logging/protos/protos.json | 554 +- .../v2/config_service_v2.copy_log_entries.js | 4 +- .../v2/config_service_v2.create_bucket.js | 12 +- .../config_service_v2.create_bucket_async.js | 77 + .../v2/config_service_v2.create_link.js | 76 + .../v2/config_service_v2.create_sink.js | 3 +- .../v2/config_service_v2.create_view.js | 4 +- .../v2/config_service_v2.delete_link.js | 64 + .../v2/config_service_v2.delete_sink.js | 4 +- .../v2/config_service_v2.get_link.js | 63 + .../v2/config_service_v2.list_buckets.js | 14 +- .../v2/config_service_v2.list_links.js | 75 + .../v2/config_service_v2.list_views.js | 8 +- .../v2/config_service_v2.update_bucket.js | 6 +- .../config_service_v2.update_bucket_async.js | 81 + .../v2/config_service_v2.update_exclusion.js | 13 +- .../v2/config_service_v2.update_sink.js | 8 +- .../v2/logging_service_v2.list_log_entries.js | 19 +- .../v2/logging_service_v2.list_logs.js | 29 +- .../v2/logging_service_v2.tail_log_entries.js | 12 +- .../logging_service_v2.write_log_entries.js | 12 +- .../snippet_metadata.google.logging.v2.json | 296 +- .../src/v2/config_service_v2_client.ts | 1880 ++- .../v2/config_service_v2_client_config.json | 24 + .../logging/src/v2/gapic_metadata.json | 64 + .../src/v2/logging_service_v2_client.ts | 491 +- .../src/v2/metrics_service_v2_client.ts | 350 + .../test/gapic_config_service_v2_v2.ts | 2824 ++++- .../test/gapic_logging_service_v2_v2.ts | 382 + .../test/gapic_metrics_service_v2_v2.ts | 382 + 36 files changed, 16118 insertions(+), 4904 deletions(-) create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.create_link.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.get_link.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.list_links.js create mode 100644 handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 634092a9102..94c5cdff86c 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -75,7 +75,8 @@ message LogEntry { // Example: a log entry that reports a database error would be associated with // the monitored resource designating the particular database that reported // the error. - google.api.MonitoredResource resource = 8 [(google.api.field_behavior) = REQUIRED]; + google.api.MonitoredResource resource = 8 + [(google.api.field_behavior) = REQUIRED]; // The log entry payload, which can be one of multiple types. oneof payload { @@ -97,27 +98,32 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. This time is used - // to compute the log entry's age and to enforce the logs retention period. - // If this field is omitted in a new log entry, then Logging assigns it the - // current time. Timestamps have nanosecond accuracy, but trailing zeros in - // the fractional seconds might be omitted when the timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This time + // is used to compute the log entry's age and to enforce the logs retention + // period. If this field is omitted in a new log entry, then Logging assigns + // it the current time. Timestamps have nanosecond accuracy, but trailing + // zeros in the fractional seconds might be omitted when the timestamp is + // displayed. // // Incoming log entries must have timestamps that don't exceed the // [logs retention // period](https://cloud.google.com/logging/quotas#logs_retention_periods) in // the past, and that don't exceed 24 hours in the future. Log entries outside // those time boundaries aren't ingested by Logging. - google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp timestamp = 9 + [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. - google.protobuf.Timestamp receive_timestamp = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp receive_timestamp = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. - google.logging.type.LogSeverity severity = 10 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The severity of the log entry. The default value is + // `LogSeverity.DEFAULT`. + google.logging.type.LogSeverity severity = 10 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. A unique identifier for the log entry. If you provide a value, then - // Logging considers other log entries in the same project, with the same + // Optional. A unique identifier for the log entry. If you provide a value, + // then Logging considers other log entries in the same project, with the same // `timestamp`, and with the same `insert_id` to be duplicates which are // removed in a single query result. However, there are no guarantees of // de-duplication in the export of logs. @@ -129,12 +135,13 @@ message LogEntry { // the same `log_name` and `timestamp` values. string insert_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Information about the HTTP request associated with this log entry, if - // applicable. - google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Information about the HTTP request associated with this log + // entry, if applicable. + google.logging.type.HttpRequest http_request = 7 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. A map of key, value pairs that provides additional information about the - // log entry. The labels can be user-defined or system-defined. + // Optional. A map of key, value pairs that provides additional information + // about the log entry. The labels can be user-defined or system-defined. // // User-defined labels are arbitrary key, value pairs that you can use to // classify logs. @@ -153,17 +160,47 @@ message LogEntry { // applicable. LogEntryOperation operation = 15 [(google.api.field_behavior) = OPTIONAL]; - // 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` + // Optional. The REST resource name of the trace being written to + // [Cloud Trace](https://cloud.google.com/trace) in + // association with this log entry. For example, if your trace data is stored + // in the Cloud project "my-trace-project" and if the service that is creating + // the log entry receives a trace header that includes the trace ID "12345", + // then the service should use "projects/my-tracing-project/traces/12345". + // + // The `trace` field provides the link between logs and traces. By using + // this field, you can navigate from a log entry to a trace. string trace = 22 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The span ID within the trace associated with the log entry. + // Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span + // associated with the current operation in which the log is being written. + // For example, if a span has the REST resource name of + // "projects/some-project/traces/some-trace/spans/some-span-id", then the + // `span_id` field is "some-span-id". + // + // A + // [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + // represents a single operation within a trace. Whereas a trace may involve + // multiple different microservices running on multiple different machines, + // a span generally corresponds to a single logical operation being performed + // in a single instance of a microservice on one specific machine. Spans + // are the nodes within the tree that is a trace. + // + // Applications that are [instrumented for + // tracing](https://cloud.google.com/trace/docs/setup) will generally assign a + // new, unique span ID on each incoming request. It is also common to create + // and record additional spans corresponding to internal processing elements + // as well as issuing requests to dependencies. + // + // The span ID is expected to be a 16-character, hexadecimal encoding of an + // 8-byte array and should not be zero. It should be unique within the trace + // and should, ideally, be generated in a manner that is uniformly random. + // + // Example values: // - // For Trace spans, this is the same format that the Trace API v2 uses: a - // 16-character hexadecimal encoding of an 8-byte array, such as - // `000000000000004a`. + // - `000000000000004a` + // - `7a2190356c3fc94b` + // - `0000f00300090021` + // - `d39223e101960076` string span_id = 27 [(google.api.field_behavior) = OPTIONAL]; // Optional. The sampling decision of the trace associated with the log entry. @@ -175,11 +212,13 @@ message LogEntry { // request correlation identifier. The default is False. bool trace_sampled = 30 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Source code location information associated with the log entry, if any. - LogEntrySourceLocation source_location = 23 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Source code location information associated with the log entry, + // if any. + LogEntrySourceLocation source_location = 23 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. Information indicating this LogEntry is part of a sequence of multiple log - // entries split from a single LogEntry. + // Optional. Information indicating this LogEntry is part of a sequence of + // multiple log entries split from a single LogEntry. LogSplit split = 35 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index d87f6549e80..92d481eac82 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -52,18 +52,10 @@ service LoggingServiceV2 { rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{log_name=projects/*/logs/*}" - additional_bindings { - delete: "/v2/{log_name=*/*/logs/*}" - } - additional_bindings { - delete: "/v2/{log_name=organizations/*/logs/*}" - } - additional_bindings { - delete: "/v2/{log_name=folders/*/logs/*}" - } - additional_bindings { - delete: "/v2/{log_name=billingAccounts/*/logs/*}" - } + additional_bindings { delete: "/v2/{log_name=*/*/logs/*}" } + additional_bindings { delete: "/v2/{log_name=organizations/*/logs/*}" } + additional_bindings { delete: "/v2/{log_name=folders/*/logs/*}" } + additional_bindings { delete: "/v2/{log_name=billingAccounts/*/logs/*}" } }; option (google.api.method_signature) = "log_name"; } @@ -75,7 +67,8 @@ service LoggingServiceV2 { // A single request may contain log entries for a maximum of 1000 // different resources (projects, organizations, billing accounts or // folders) - rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { + rpc WriteLogEntries(WriteLogEntriesRequest) + returns (WriteLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:write" body: "*" @@ -96,7 +89,8 @@ service LoggingServiceV2 { } // Lists the descriptors for monitored resource types used by Logging. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) + returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; @@ -107,17 +101,21 @@ service LoggingServiceV2 { rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/logs" + additional_bindings { get: "/v2/{parent=projects/*}/logs" } + additional_bindings { get: "/v2/{parent=organizations/*}/logs" } + additional_bindings { get: "/v2/{parent=folders/*}/logs" } + additional_bindings { get: "/v2/{parent=billingAccounts/*}/logs" } additional_bindings { - get: "/v2/{parent=projects/*}/logs" + get: "/v2/{parent=projects/*/locations/*/buckets/*/views/*}/logs" } additional_bindings { - get: "/v2/{parent=organizations/*}/logs" + get: "/v2/{parent=organizations/*/locations/*/buckets/*/views/*}/logs" } additional_bindings { - get: "/v2/{parent=folders/*}/logs" + get: "/v2/{parent=folders/*/locations/*/buckets/*/views/*}/logs" } additional_bindings { - get: "/v2/{parent=billingAccounts/*}/logs" + get: "/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs" } }; option (google.api.method_signature) = "parent"; @@ -125,7 +123,8 @@ service LoggingServiceV2 { // Streaming read of log entries as they are ingested. Until the stream is // terminated, it will continue reading logs. - rpc TailLogEntries(stream TailLogEntriesRequest) returns (stream TailLogEntriesResponse) { + rpc TailLogEntries(stream TailLogEntriesRequest) + returns (stream TailLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:tail" body: "*" @@ -150,9 +149,7 @@ message DeleteLogRequest { // [LogEntry][google.logging.v2.LogEntry]. string log_name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "logging.googleapis.com/Log" - } + (google.api.resource_reference) = { type: "logging.googleapis.com/Log" } ]; } @@ -177,9 +174,7 @@ message WriteLogEntriesRequest { // individual log entry. string log_name = 1 [ (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "logging.googleapis.com/Log" - } + (google.api.resource_reference) = { type: "logging.googleapis.com/Log" } ]; // Optional. A default monitored resource object that is assigned to all log @@ -190,7 +185,8 @@ message WriteLogEntriesRequest { // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} // // See [LogEntry][google.logging.v2.LogEntry]. - google.api.MonitoredResource resource = 2 [(google.api.field_behavior) = OPTIONAL]; + google.api.MonitoredResource resource = 2 + [(google.api.field_behavior) = OPTIONAL]; // 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 @@ -224,11 +220,13 @@ message WriteLogEntriesRequest { // list, rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; - // 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, then the response status is the error associated - // with one of the failed entries and the response includes error details - // keyed by the entries' zero-based index in the `entries.write` method. + // Optional. Whether a batch's valid entries should be written even if some + // other entry failed due to a permanent error such as INVALID_ARGUMENT or + // PERMISSION_DENIED. If any entry failed, then the response status is the + // response status of one of the failed entries. The response will include + // error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + // the entries' zero-based index in the `entries`. Failed requests for which + // no entries are written will not include per-entry errors. bool partial_success = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, the request should expect normal response, but the @@ -238,9 +236,7 @@ message WriteLogEntriesRequest { } // Result returned from WriteLogEntries. -message WriteLogEntriesResponse { - -} +message WriteLogEntriesResponse {} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { @@ -271,6 +267,7 @@ message ListLogEntriesRequest { // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` // // Projects listed in the `project_ids` field are added to this list. + // A maximum of 100 resources may be specified in a single request. repeated string resource_names = 8 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -278,13 +275,11 @@ message ListLogEntriesRequest { } ]; - // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). - // Only log entries that match the filter are returned. An empty filter - // matches all log entries in the resources listed in `resource_names`. + // Optional. 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. + // cause the filter to return no results. The maximum length of a filter is + // 20,000 characters. string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. How the results should be sorted. Presently, the only permitted @@ -295,10 +290,10 @@ message ListLogEntriesRequest { // timestamps are returned in order of their `insert_id` values. string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The maximum number of results to return from this request. Default is 50. - // If the value is negative or exceeds 1000, the request is rejected. The - // presence of `next_page_token` in the response indicates that more results - // might be available. + // Optional. The maximum number of results to return from this request. + // Default is 50. If the value is negative or exceeds 1000, the request is + // rejected. The presence of `next_page_token` in the response indicates that + // more results might be available. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the @@ -355,7 +350,7 @@ message ListMonitoredResourceDescriptorsResponse { // The parameters to ListLogs. message ListLogsRequest { - // Required. The resource name that owns the logs: + // Required. The resource name to list logs for: // // * `projects/[PROJECT_ID]` // * `organizations/[ORGANIZATION_ID]` @@ -368,18 +363,7 @@ message ListLogsRequest { } ]; - // 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. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // 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. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The resource name that owns the logs: + // Optional. List of resource names to list logs for: // // * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` @@ -392,12 +376,25 @@ message ListLogsRequest { // * `organizations/[ORGANIZATION_ID]` // * `billingAccounts/[BILLING_ACCOUNT_ID]` // * `folders/[FOLDER_ID]` + // + // The resource name in the `parent` field is added to this list. repeated string resource_names = 8 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { child_type: "logging.googleapis.com/Log" } ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogs. @@ -430,20 +427,19 @@ message TailLogEntriesRequest { // * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` repeated string resource_names = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Filters](https://cloud.google.com/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 in `resource_names` will cause - // the filter to return no results. The maximum length of the filter is 20000 - // characters. + // Optional. 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 a filter is + // 20,000 characters. string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The amount of time to buffer log entries at the server before // being returned to prevent out of order results due to late arriving log // entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 // milliseconds. - google.protobuf.Duration buffer_window = 3 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration buffer_window = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `TailLogEntries`. diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index f55ab458634..cc7677b1252 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -59,15 +59,11 @@ service ConfigServiceV2 { rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*/locations/*}/buckets" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/buckets" - } + additional_bindings { get: "/v2/{parent=projects/*/locations/*}/buckets" } additional_bindings { get: "/v2/{parent=organizations/*/locations/*}/buckets" } - additional_bindings { - get: "/v2/{parent=folders/*/locations/*}/buckets" - } + additional_bindings { get: "/v2/{parent=folders/*/locations/*}/buckets" } additional_bindings { get: "/v2/{parent=billingAccounts/*/locations/*}/buckets" } @@ -79,19 +75,80 @@ service ConfigServiceV2 { rpc GetBucket(GetBucketRequest) returns (LogBucket) { option (google.api.http) = { get: "/v2/{name=*/*/locations/*/buckets/*}" + additional_bindings { get: "/v2/{name=projects/*/locations/*/buckets/*}" } additional_bindings { - get: "/v2/{name=projects/*/locations/*/buckets/*}" + get: "/v2/{name=organizations/*/locations/*/buckets/*}" } + additional_bindings { get: "/v2/{name=folders/*/locations/*/buckets/*}" } additional_bindings { - get: "/v2/{name=organizations/*/locations/*/buckets/*}" + get: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + } + }; + } + + // Creates a log bucket asynchronously that can be used to store log entries. + // + // After a bucket has been created, the bucket's location cannot be changed. + rpc CreateBucketAsync(CreateBucketRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=*/*/locations/*}/buckets:createAsync" + body: "bucket" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/buckets:createAsync" + body: "bucket" + } + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/buckets:createAsync" + body: "bucket" } additional_bindings { - get: "/v2/{name=folders/*/locations/*/buckets/*}" + post: "/v2/{parent=folders/*/locations/*}/buckets:createAsync" + body: "bucket" } additional_bindings { - get: "/v2/{name=billingAccounts/*/buckets/*}" + post: "/v2/{parent=billingAccounts/*/locations/*}/buckets:createAsync" + body: "bucket" } }; + option (google.longrunning.operation_info) = { + response_type: "LogBucket" + metadata_type: "BucketMetadata" + }; + } + + // Updates a log bucket asynchronously. + // + // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + // `FAILED_PRECONDITION` will be returned. + // + // After a bucket has been created, the bucket's location cannot be changed. + rpc UpdateBucketAsync(UpdateBucketRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=*/*/locations/*/buckets/*}:updateAsync" + body: "bucket" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/buckets/*}:updateAsync" + body: "bucket" + } + additional_bindings { + post: "/v2/{name=organizations/*/locations/*/buckets/*}:updateAsync" + body: "bucket" + } + additional_bindings { + post: "/v2/{name=folders/*/locations/*/buckets/*}:updateAsync" + body: "bucket" + } + additional_bindings { + post: "/v2/{name=billingAccounts/*/locations/*/buckets/*}:updateAsync" + body: "bucket" + } + }; + option (google.longrunning.operation_info) = { + response_type: "LogBucket" + metadata_type: "BucketMetadata" + }; } // Creates a log bucket that can be used to store log entries. After a bucket @@ -119,11 +176,7 @@ service ConfigServiceV2 { }; } - // Updates a log bucket. This method replaces the following fields in the - // existing bucket with values from the new bucket: `retention_period` - // - // If the retention period is decreased and the bucket is locked, - // `FAILED_PRECONDITION` will be returned. + // Updates a log bucket. // // If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then // `FAILED_PRECONDITION` will be returned. @@ -234,7 +287,7 @@ service ConfigServiceV2 { get: "/v2/{name=folders/*/locations/*/buckets/*/views/*}" } additional_bindings { - get: "/v2/{name=billingAccounts/*/buckets/*/views/*}" + get: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" } }; } @@ -318,18 +371,10 @@ service ConfigServiceV2 { rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/sinks" - additional_bindings { - get: "/v2/{parent=projects/*}/sinks" - } - additional_bindings { - get: "/v2/{parent=organizations/*}/sinks" - } - additional_bindings { - get: "/v2/{parent=folders/*}/sinks" - } - additional_bindings { - get: "/v2/{parent=billingAccounts/*}/sinks" - } + additional_bindings { get: "/v2/{parent=projects/*}/sinks" } + additional_bindings { get: "/v2/{parent=organizations/*}/sinks" } + additional_bindings { get: "/v2/{parent=folders/*}/sinks" } + additional_bindings { get: "/v2/{parent=billingAccounts/*}/sinks" } }; option (google.api.method_signature) = "parent"; } @@ -338,18 +383,10 @@ service ConfigServiceV2 { rpc GetSink(GetSinkRequest) returns (LogSink) { option (google.api.http) = { get: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { - get: "/v2/{sink_name=projects/*/sinks/*}" - } - additional_bindings { - get: "/v2/{sink_name=organizations/*/sinks/*}" - } - additional_bindings { - get: "/v2/{sink_name=folders/*/sinks/*}" - } - additional_bindings { - get: "/v2/{sink_name=billingAccounts/*/sinks/*}" - } + additional_bindings { get: "/v2/{sink_name=projects/*/sinks/*}" } + additional_bindings { get: "/v2/{sink_name=organizations/*/sinks/*}" } + additional_bindings { get: "/v2/{sink_name=folders/*/sinks/*}" } + additional_bindings { get: "/v2/{sink_name=billingAccounts/*/sinks/*}" } }; option (google.api.method_signature) = "sink_name"; } @@ -362,18 +399,12 @@ service ConfigServiceV2 { option (google.api.http) = { post: "/v2/{parent=*/*}/sinks" body: "sink" - additional_bindings { - post: "/v2/{parent=projects/*}/sinks" - body: "sink" - } + additional_bindings { post: "/v2/{parent=projects/*}/sinks" body: "sink" } additional_bindings { post: "/v2/{parent=organizations/*}/sinks" body: "sink" } - additional_bindings { - post: "/v2/{parent=folders/*}/sinks" - body: "sink" - } + additional_bindings { post: "/v2/{parent=folders/*}/sinks" body: "sink" } additional_bindings { post: "/v2/{parent=billingAccounts/*}/sinks" body: "sink" @@ -433,62 +464,136 @@ service ConfigServiceV2 { rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{sink_name=*/*/sinks/*}" + additional_bindings { delete: "/v2/{sink_name=projects/*/sinks/*}" } + additional_bindings { delete: "/v2/{sink_name=organizations/*/sinks/*}" } + additional_bindings { delete: "/v2/{sink_name=folders/*/sinks/*}" } + additional_bindings { + delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }; + option (google.api.method_signature) = "sink_name"; + } + + // Asynchronously creates a linked dataset in BigQuery which makes it possible + // to use BigQuery to read the logs stored in the log bucket. A log bucket may + // currently only contain one link. + rpc CreateLink(CreateLinkRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=*/*/locations/*/buckets/*}/links" + body: "link" additional_bindings { - delete: "/v2/{sink_name=projects/*/sinks/*}" + post: "/v2/{parent=projects/*/locations/*/buckets/*}/links" + body: "link" } additional_bindings { - delete: "/v2/{sink_name=organizations/*/sinks/*}" + post: "/v2/{parent=organizations/*/locations/*/buckets/*}/links" + body: "link" } additional_bindings { - delete: "/v2/{sink_name=folders/*/sinks/*}" + post: "/v2/{parent=folders/*/locations/*/buckets/*}/links" + body: "link" } additional_bindings { - delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" + post: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links" + body: "link" } }; - option (google.api.method_signature) = "sink_name"; + option (google.api.method_signature) = "parent,link,link_id"; + option (google.longrunning.operation_info) = { + response_type: "Link" + metadata_type: "LinkMetadata" + }; } - // Lists all the exclusions on the _Default sink in a parent resource. - rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { + // Deletes a link. This will also delete the corresponding BigQuery linked + // dataset. + rpc DeleteLink(DeleteLinkRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - get: "/v2/{parent=*/*}/exclusions" + delete: "/v2/{name=*/*/locations/*/buckets/*/links/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/buckets/*/links/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/buckets/*/links/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/locations/*/buckets/*/links/*}" + } + additional_bindings { + delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "LinkMetadata" + }; + } + + // Lists links. + rpc ListLinks(ListLinksRequest) returns (ListLinksResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*/locations/*/buckets/*}/links" additional_bindings { - get: "/v2/{parent=projects/*}/exclusions" + get: "/v2/{parent=projects/*/locations/*/buckets/*}/links" } additional_bindings { - get: "/v2/{parent=organizations/*}/exclusions" + get: "/v2/{parent=organizations/*/locations/*/buckets/*}/links" } additional_bindings { - get: "/v2/{parent=folders/*}/exclusions" + get: "/v2/{parent=folders/*/locations/*/buckets/*}/links" } additional_bindings { - get: "/v2/{parent=billingAccounts/*}/exclusions" + get: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links" } }; option (google.api.method_signature) = "parent"; } - // Gets the description of an exclusion in the _Default sink. - rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { + // Gets a link. + rpc GetLink(GetLinkRequest) returns (Link) { option (google.api.http) = { - get: "/v2/{name=*/*/exclusions/*}" + get: "/v2/{name=*/*/locations/*/buckets/*/links/*}" additional_bindings { - get: "/v2/{name=projects/*/exclusions/*}" + get: "/v2/{name=projects/*/locations/*/buckets/*/links/*}" } additional_bindings { - get: "/v2/{name=organizations/*/exclusions/*}" + get: "/v2/{name=organizations/*/locations/*/buckets/*/links/*}" } additional_bindings { - get: "/v2/{name=folders/*/exclusions/*}" + get: "/v2/{name=folders/*/locations/*/buckets/*/links/*}" } additional_bindings { - get: "/v2/{name=billingAccounts/*/exclusions/*}" + get: "/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}" } }; option (google.api.method_signature) = "name"; } + // Lists all the exclusions on the _Default sink in a parent resource. + rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*}/exclusions" + additional_bindings { get: "/v2/{parent=projects/*}/exclusions" } + additional_bindings { get: "/v2/{parent=organizations/*}/exclusions" } + additional_bindings { get: "/v2/{parent=folders/*}/exclusions" } + additional_bindings { get: "/v2/{parent=billingAccounts/*}/exclusions" } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the description of an exclusion in the _Default sink. + rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { + option (google.api.http) = { + get: "/v2/{name=*/*/exclusions/*}" + additional_bindings { get: "/v2/{name=projects/*/exclusions/*}" } + additional_bindings { get: "/v2/{name=organizations/*/exclusions/*}" } + additional_bindings { get: "/v2/{name=folders/*/exclusions/*}" } + additional_bindings { get: "/v2/{name=billingAccounts/*/exclusions/*}" } + }; + option (google.api.method_signature) = "name"; + } + // Creates a new exclusion in the _Default sink in a specified parent // resource. Only log entries belonging to that resource can be excluded. You // can have up to 10 exclusions in a resource. @@ -546,15 +651,9 @@ service ConfigServiceV2 { rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" - additional_bindings { - delete: "/v2/{name=projects/*/exclusions/*}" - } - additional_bindings { - delete: "/v2/{name=organizations/*/exclusions/*}" - } - additional_bindings { - delete: "/v2/{name=folders/*/exclusions/*}" - } + additional_bindings { delete: "/v2/{name=projects/*/exclusions/*}" } + additional_bindings { delete: "/v2/{name=organizations/*/exclusions/*}" } + additional_bindings { delete: "/v2/{name=folders/*/exclusions/*}" } additional_bindings { delete: "/v2/{name=billingAccounts/*/exclusions/*}" } @@ -575,18 +674,10 @@ service ConfigServiceV2 { rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" - additional_bindings { - get: "/v2/{name=projects/*}/cmekSettings" - } - additional_bindings { - get: "/v2/{name=organizations/*}/cmekSettings" - } - additional_bindings { - get: "/v2/{name=folders/*}/cmekSettings" - } - additional_bindings { - get: "/v2/{name=billingAccounts/*}/cmekSettings" - } + additional_bindings { get: "/v2/{name=projects/*}/cmekSettings" } + additional_bindings { get: "/v2/{name=organizations/*}/cmekSettings" } + additional_bindings { get: "/v2/{name=folders/*}/cmekSettings" } + additional_bindings { get: "/v2/{name=billingAccounts/*}/cmekSettings" } }; } @@ -629,18 +720,10 @@ service ConfigServiceV2 { rpc GetSettings(GetSettingsRequest) returns (Settings) { option (google.api.http) = { get: "/v2/{name=*/*}/settings" - additional_bindings { - get: "/v2/{name=projects/*}/settings" - } - additional_bindings { - get: "/v2/{name=organizations/*}/settings" - } - additional_bindings { - get: "/v2/{name=folders/*}/settings" - } - additional_bindings { - get: "/v2/{name=billingAccounts/*}/settings" - } + additional_bindings { get: "/v2/{name=projects/*}/settings" } + additional_bindings { get: "/v2/{name=organizations/*}/settings" } + additional_bindings { get: "/v2/{name=folders/*}/settings" } + additional_bindings { get: "/v2/{name=billingAccounts/*}/settings" } }; option (google.api.method_signature) = "name"; } @@ -678,7 +761,8 @@ service ConfigServiceV2 { } // Copies a set of log entries from a log bucket to a Cloud Storage bucket. - rpc CopyLogEntries(CopyLogEntriesRequest) returns (google.longrunning.Operation) { + rpc CopyLogEntries(CopyLogEntriesRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/entries:copy" body: "*" @@ -690,6 +774,29 @@ service ConfigServiceV2 { } } +// Configuration for an indexed field. +message IndexConfig { + // Required. The LogEntry field path to index. + // + // Note that some paths are automatically indexed, and other paths are not + // eligible for indexing. See [indexing documentation]( + // https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) + // for details. + // + // For example: `jsonPayload.request.status` + string field_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of data in this index. + IndexType type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The timestamp when the index was last modified. + // + // This is used to return the timestamp, and will be ignored if supplied + // during update. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Describes a repository in which log entries are stored. message LogBucket { option (google.api.resource) = { @@ -718,12 +825,14 @@ message LogBucket { // Describes this bucket. string description = 3; - // Output only. The creation timestamp of the bucket. This is not set for any of the - // default buckets. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The creation timestamp of the bucket. This is not set for any + // of the default buckets. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the bucket. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Logs will be retained by default for this amount of time, after which they // will automatically be deleted. The minimum retention period is 1 day. If @@ -738,7 +847,13 @@ message LogBucket { bool locked = 9; // Output only. The bucket lifecycle state. - LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + LifecycleState lifecycle_state = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether log analytics is enabled for this bucket. + // + // Once enabled, log analytics features cannot be disabled. + bool analytics_enabled = 14; // Log entry field paths that are denied access in this bucket. // @@ -749,6 +864,9 @@ message LogBucket { // block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) repeated string restricted_fields = 15; + // A list of indexed fields and related configuration data. + repeated IndexConfig index_configs = 17; + // The CMEK settings of the log bucket. If present, new log entries written to // this log bucket are encrypted using the CMEK key provided in this // configuration. If a log bucket has CMEK settings, the CMEK settings cannot @@ -778,10 +896,12 @@ message LogView { string description = 3; // Output only. The creation timestamp of the view. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the view. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Filter that restricts which log entries in a bucket are visible in this // view. @@ -847,9 +967,7 @@ message LogSink { // Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). string destination = 3 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "*" - } + (google.api.resource_reference) = { type: "*" } ]; // Optional. An [advanced logs @@ -867,22 +985,25 @@ message LogSink { // The maximum length of the description is 8000 characters. string description = 18 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If set to true, then this sink is disabled and it does not export any log - // entries. + // Optional. If set to true, then this sink is disabled and it does not export + // any log entries. bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Log entries that match any of these exclusion filters will not be exported. + // Optional. Log entries that match any of these exclusion filters will not be + // exported. // // If a log entry is matched by both `filter` and one of `exclusion_filters` // it will not be exported. - repeated LogExclusion exclusions = 16 [(google.api.field_behavior) = OPTIONAL]; + repeated LogExclusion exclusions = 16 + [(google.api.field_behavior) = OPTIONAL]; // Deprecated. This field is unused. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity—a service account or group—under which Cloud - // Logging writes the exported log entries to the sink's destination. This - // field is set by + // Output only. An IAM identity—a service account or group—under + // which Cloud Logging writes the exported log entries to the sink's + // destination. This field is either set by specifying + // `custom_writer_identity` or set automatically by // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the // value of `unique_writer_identity` in those methods. @@ -895,17 +1016,17 @@ message LogSink { // appropriate IAM roles to assign to the identity. // // Sinks that have a destination that is a log bucket in the same project as - // the sink do not have a writer_identity and no additional permissions are + // the sink cannot have a writer_identity and no additional permissions are // required. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. This field applies only to sinks owned by organizations and folders. If the - // field is false, the default, only the logs owned by the sink's parent - // resource are available for export. If the field is true, then log entries - // from all the projects, folders, and billing accounts contained in the - // sink's parent resource are also available for export. Whether a particular - // log entry from the children is exported depends on the sink's filter - // expression. + // Optional. This field applies only to sinks owned by organizations and + // folders. If the field is false, the default, only the logs owned by the + // sink's parent resource are available for export. If the field is true, then + // log entries from all the projects, folders, and billing accounts contained + // in the sink's parent resource are also available for export. Whether a + // particular log entry from the children is exported depends on the sink's + // filter expression. // // For example, if this field is true, then the filter // `resource.type=gce_instance` would export all Compute Engine VM instance @@ -921,18 +1042,77 @@ message LogSink { // Destination dependent options. oneof options { // Optional. Options that affect sinks exporting data to BigQuery. - BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL]; + BigQueryOptions bigquery_options = 12 + [(google.api.field_behavior) = OPTIONAL]; } // Output only. The creation timestamp of the sink. // // This field may not be present for older sinks. - google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the sink. // // This field may not be present for older sinks. - google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Describes a BigQuery dataset that was created by a link. +message BigQueryDataset { + // Output only. The full resource name of the BigQuery dataset. The DATASET_ID + // will match the ID of the link, so the link must match the naming + // restrictions of BigQuery datasets (alphanumeric characters and underscores + // only). + // + // The dataset will have a resource path of + // "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" + string dataset_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Describes a link connected to an analytics enabled bucket. +message Link { + option (google.api.resource) = { + type: "logging.googleapis.com/Link" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}/links/{link}" + pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}" + pattern: "folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}" + pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}" + }; + + // The resource name of the link. The name can have up to 100 characters. + // A valid link id (at the end of the link name) must only have alphanumeric + // characters and underscores within it. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // + // For example: + // + // `projects/my-project/locations/global/buckets/my-bucket/links/my_link + string name = 1; + + // Describes this link. + // + // The maximum length of the description is 8000 characters. + string description = 2; + + // Output only. The creation timestamp of the link. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource lifecycle state. + LifecycleState lifecycle_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The information of a BigQuery Dataset. When a link is created, a BigQuery + // dataset is created along with it, in the same project as the LogBucket it's + // linked to. This dataset will also have BigQuery Views corresponding to the + // LogViews in the bucket. + BigQueryDataset bigquery_dataset = 5; } // Options that change functionality of a sink exporting data to BigQuery. @@ -947,14 +1127,15 @@ message BigQueryOptions { // timezone. bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; - // Output only. True if new timestamp column based partitioning is in use, false if legacy - // ingestion-time partitioning is in use. + // Output only. True if new timestamp column based partitioning is in use, + // false if legacy ingestion-time partitioning is in use. // // All new sinks will have this field set true and will use timestamp column // based partitioning. If use_partitioned_tables is false, this value has no // meaning and will be false. Legacy sinks using partitioned tables will have // this field set to false. - bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + bool uses_timestamp_column_partitioning = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The parameters to `ListBuckets`. @@ -976,15 +1157,15 @@ message ListBucketsRequest { } ]; - // 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. + // 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. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - // 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. + // 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. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -1015,14 +1196,14 @@ message CreateBucketRequest { } ]; - // Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited - // to 100 characters and can include only letters, digits, underscores, - // hyphens, and periods. + // Required. A client-assigned identifier such as `"my-bucket"`. Identifiers + // are limited to 100 characters and can include only letters, digits, + // underscores, hyphens, and periods. string bucket_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The new bucket. The region specified in the new bucket must be compliant - // with any Location Restriction Org Policy. The name field in the bucket is - // ignored. + // Required. The new bucket. The region specified in the new bucket must be + // compliant with any Location Restriction Org Policy. The name field in the + // bucket is ignored. LogBucket bucket = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -1048,15 +1229,16 @@ message UpdateBucketRequest { // Required. The updated bucket. LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. Field mask that specifies the fields in `bucket` that need an update. A - // bucket field will be overwritten if, and only if, it is in the update mask. - // `name` and output only fields cannot be updated. + // Required. Field mask that specifies the fields in `bucket` that need an + // update. A bucket field will be overwritten if, and only if, it is in the + // update mask. `name` and output only fields cannot be updated. // // For a detailed `FieldMask` definition, see: // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // For example: `updateMask=retention_days` - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; } // The parameters to `GetBucket`. @@ -1126,10 +1308,10 @@ message ListViewsRequest { // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // 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. + // 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. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. @@ -1161,7 +1343,9 @@ message CreateViewRequest { // `"projects/my-project/locations/global/buckets/my-bucket"` string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The id to use for this view. + // Required. A client-assigned identifier such as `"my-view"`. Identifiers are + // limited to 100 characters and can include only letters, digits, + // underscores, hyphens, and periods. string view_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The new view. @@ -1190,7 +1374,8 @@ message UpdateViewRequest { // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // For example: `updateMask=filter` - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `GetView`. @@ -1204,9 +1389,7 @@ message GetViewRequest { // `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "logging.googleapis.com/LogView" - } + (google.api.resource_reference) = { type: "logging.googleapis.com/LogView" } ]; } @@ -1221,9 +1404,7 @@ message DeleteViewRequest { // `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "logging.googleapis.com/LogView" - } + (google.api.resource_reference) = { type: "logging.googleapis.com/LogView" } ]; } @@ -1279,9 +1460,7 @@ message GetSinkRequest { // `"projects/my-project/sinks/my-sink"` string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "logging.googleapis.com/LogSink" - } + (google.api.resource_reference) = { type: "logging.googleapis.com/LogSink" } ]; } @@ -1319,14 +1498,15 @@ message CreateSinkRequest { // 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][google.logging.v2.LogSink]. + // more information, see `writer_identity` in + // [LogSink][google.logging.v2.LogSink]. bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `UpdateSink`. message UpdateSinkRequest { - // Required. The full resource name of the sink to update, including the parent - // resource and the sink identifier: + // 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]" @@ -1338,13 +1518,11 @@ message UpdateSinkRequest { // `"projects/my-project/sinks/my-sink"` string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "logging.googleapis.com/LogSink" - } + (google.api.resource_reference) = { type: "logging.googleapis.com/LogSink" } ]; - // Required. The updated sink, whose name is the same identifier that appears as part - // of `sink_name`. + // Required. The updated sink, whose name is the same identifier that appears + // as part of `sink_name`. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] @@ -1376,13 +1554,14 @@ message UpdateSinkRequest { // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // For example: `updateMask=filter` - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `DeleteSink`. message DeleteSinkRequest { - // Required. The full resource name of the sink to delete, including the parent - // resource and the sink identifier: + // 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]" @@ -1393,11 +1572,96 @@ message DeleteSinkRequest { // // `"projects/my-project/sinks/my-sink"` string sink_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "logging.googleapis.com/LogSink" } + ]; +} + +// The parameters to CreateLink. +message CreateLinkRequest { + // Required. The full resource name of the bucket to create a link for. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/LogSink" + child_type: "logging.googleapis.com/Link" } ]; + + // Required. The new link. + Link link = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the link. The link_id can have up to 100 + // characters. A valid link_id must only have alphanumeric characters and + // underscores within it. + string link_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to DeleteLink. +message DeleteLinkRequest { + // Required. The full resource name of the link to delete. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "logging.googleapis.com/Link" } + ]; +} + +// The parameters to ListLinks. +message ListLinksRequest { + // Required. The parent resource whose links are to be listed: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Link" + } + ]; + + // 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. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of results to return from this request. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from ListLinks. +message ListLinksResponse { + // A list of links. + repeated Link links = 1; + + // If there might be more results than those appearing 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`. + string next_page_token = 2; +} + +// The parameters to GetLink. +message GetLinkRequest { + // Required. The resource name of the link: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "logging.googleapis.com/Link" } + ]; } // Specifies a set of log entries that are filtered out by a sink. If @@ -1414,10 +1678,10 @@ message LogExclusion { pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}" }; - // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. - // Identifiers are limited to 100 characters and can include only letters, - // digits, underscores, hyphens, and periods. First character has to be - // alphanumeric. + // Required. A client-assigned identifier, such as + // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and + // can include only letters, digits, underscores, hyphens, and periods. First + // character has to be alphanumeric. string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A description of this exclusion. @@ -1444,12 +1708,14 @@ message LogExclusion { // Output only. The creation timestamp of the exclusion. // // This field may not be present for older exclusions. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the exclusion. // // This field may not be present for older exclusions. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The parameters to `ListExclusions`. @@ -1554,18 +1820,20 @@ message UpdateExclusionRequest { } ]; - // Required. New values for the existing exclusion. Only the fields specified in - // `update_mask` are relevant. + // Required. New values for the existing exclusion. Only the fields specified + // in `update_mask` are relevant. LogExclusion exclusion = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A non-empty list of fields to change in the existing exclusion. New values - // for the fields are taken from the corresponding fields in the - // [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in - // `update_mask` are not changed and are ignored in the request. + // Required. A non-empty list of fields to change in the existing exclusion. + // New values for the fields are taken from the corresponding fields in the + // [LogExclusion][google.logging.v2.LogExclusion] included in this request. + // Fields not mentioned in `update_mask` are not changed and are ignored in + // the request. // // For example, to change the filter and description of an exclusion, // specify an `update_mask` of `"filter,description"`. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = REQUIRED]; } // The parameters to `DeleteExclusion`. @@ -1655,7 +1923,8 @@ message UpdateCmekSettingsRequest { // See [FieldMask][google.protobuf.FieldMask] for more information. // // For example: `"updateMask=kmsKeyName"` - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Describes the customer-managed encryption key (CMEK) settings associated with @@ -1710,8 +1979,27 @@ message CmekSettings { // for more information. string kms_key_name = 2; - // Output only. The service account that will be used by the Log Router to access your - // Cloud KMS key. + // The CryptoKeyVersion resource name for the configured Cloud KMS key. + // + // KMS key name format: + // + // "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" + // + // For example: + // + // `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` + // + // This is a read-only field used to convey the specific configured + // CryptoKeyVersion of `kms_key` that has been configured. It will be + // populated in cases where the CMEK settings are bound to a single key + // version. + // + // If this field is populated, the `kms_key` is tied to a specific + // CryptoKeyVersion. + string kms_key_version_name = 4; + + // Output only. The service account that will be used by the Log Router to + // access your Cloud KMS key. // // Before enabling CMEK for Log Router, you must first assign the // cloudkms.cryptoKeyEncrypterDecrypter role to the service account that @@ -1789,7 +2077,8 @@ message UpdateSettingsRequest { // See [FieldMask][google.protobuf.FieldMask] for more information. // // For example: `"updateMask=kmsKeyName"` - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Describes the settings associated with a project, folder, organization, @@ -1835,8 +2124,8 @@ message Settings { // for more information. string kms_key_name = 2 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The service account that will be used by the Log Router to access your - // Cloud KMS key. + // Output only. The service account that will be used by the Log Router to + // access your Cloud KMS key. // // Before enabling CMEK for Log Router, you must first assign the role // `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that @@ -1849,15 +2138,15 @@ message Settings { // for more information. string kms_service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The Cloud region that will be used for _Default and _Required log buckets - // for newly created projects and folders. For example `europe-west1`. + // Optional. The Cloud region that will be used for _Default and _Required log + // buckets for newly created projects and folders. For example `europe-west1`. // This setting does not affect the location of custom log buckets. string storage_location = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If set to true, the _Default sink in newly created projects and folders - // will created in a disabled state. This can be used to automatically disable - // log ingestion if there is already an aggregated sink configured in the - // hierarchy. The _Default sink can be re-enabled manually if needed. + // Optional. If set to true, the _Default sink in newly created projects and + // folders will created in a disabled state. This can be used to automatically + // disable log ingestion if there is already an aggregated sink configured in + // the hierarchy. The _Default sink can be re-enabled manually if needed. bool disable_default_sink = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -1870,8 +2159,8 @@ message CopyLogEntriesRequest { // `"projects/my-project/locations/global/buckets/my-source-bucket"` string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. A filter specifying which log entries to copy. The filter must be no more - // than 20k characters. An empty filter matches all log entries. + // Optional. A filter specifying which log entries to copy. The filter must be + // no more than 20k characters. An empty filter matches all log entries. string filter = 3 [(google.api.field_behavior) = OPTIONAL]; // Required. Destination to which to copy log entries. @@ -1914,18 +2203,44 @@ message CopyLogEntriesResponse { int64 log_entries_copied_count = 1; } -// LogBucket lifecycle states. -enum LifecycleState { - // Unspecified state. This is only used/useful for distinguishing unset - // values. - LIFECYCLE_STATE_UNSPECIFIED = 0; +// Metadata for LongRunningUpdateBucket Operations. +message BucketMetadata { + // The create time of an operation. + google.protobuf.Timestamp start_time = 1; - // The normal and active state. - ACTIVE = 1; + // The end time of an operation. + google.protobuf.Timestamp end_time = 2; - // The resource has been marked for deletion by the user. For some resources - // (e.g. buckets), this can be reversed by an un-delete operation. - DELETE_REQUESTED = 2; + // State of an operation. + OperationState state = 3; + + oneof request { + // LongRunningCreateBucket RPC request. + CreateBucketRequest create_bucket_request = 4; + + // LongRunningUpdateBucket RPC request. + UpdateBucketRequest update_bucket_request = 5; + } +} + +// Metadata for long running Link operations. +message LinkMetadata { + // The start time of an operation. + google.protobuf.Timestamp start_time = 1; + + // The end time of an operation. + google.protobuf.Timestamp end_time = 2; + + // State of an operation. + OperationState state = 3; + + oneof request { + // CreateLink RPC request. + CreateLinkRequest create_link_request = 4; + + // DeleteLink RPC request. + DeleteLinkRequest delete_link_request = 5; + } } // List of different operation states. @@ -1955,3 +2270,48 @@ enum OperationState { // The operation was cancelled by the user. OPERATION_STATE_CANCELLED = 6; } + +// LogBucket lifecycle states. +enum LifecycleState { + // Unspecified state. This is only used/useful for distinguishing unset + // values. + LIFECYCLE_STATE_UNSPECIFIED = 0; + + // The normal and active state. + ACTIVE = 1; + + // The resource has been marked for deletion by the user. For some resources + // (e.g. buckets), this can be reversed by an un-delete operation. + DELETE_REQUESTED = 2; + + // The resource has been marked for an update by the user. It will remain in + // this state until the update is complete. + UPDATING = 3; + + // The resource has been marked for creation by the user. It will remain in + // this state until the creation is complete. + CREATING = 4; + + // The resource is in an INTERNAL error state. + FAILED = 5; +} + +// IndexType is used for custom indexing. It describes the type of an indexed +// field. +enum IndexType { + // The index's type is unspecified. + INDEX_TYPE_UNSPECIFIED = 0; + + // The index is a string-type index. + INDEX_TYPE_STRING = 1; + + // The index is a integer-type index. + INDEX_TYPE_INTEGER = 2; +} + +// Cloud Logging specific location metadata. +message LocationMetadata { + // Indicates whether or not Log Analytics features are supported in the given + // location. + bool log_analytics_enabled = 1; +} diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 2952c875f97..852ba14ce64 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -137,6 +137,17 @@ message LogMetric { // The maximum length of the filter is 20000 characters. string filter = 3 [(google.api.field_behavior) = REQUIRED]; + // Optional. The resource name of the Log Bucket that owns the Log Metric. + // Only Log Buckets in projects are supported. The bucket has to be in the + // same project as the metric. + // + // For example: + // + // `projects/my-project/locations/global/buckets/my-bucket` + // + // If empty, then the Log Metric is considered a non-Bucket Log Metric. + string bucket_name = 13 [(google.api.field_behavior) = OPTIONAL]; + // Optional. If set to True, then this metric is disabled and it does not // generate any points. bool disabled = 12 [(google.api.field_behavior) = OPTIONAL]; @@ -162,12 +173,14 @@ message LogMetric { // be updated once initially configured. New labels can be added in the // `metric_descriptor`, but existing labels cannot be modified except for // their description. - google.api.MetricDescriptor metric_descriptor = 5 [(google.api.field_behavior) = OPTIONAL]; + google.api.MetricDescriptor metric_descriptor = 5 + [(google.api.field_behavior) = OPTIONAL]; // Optional. A `value_extractor` is required when using a distribution // logs-based metric to extract the values to record from a log entry. // Two functions are supported for value extraction: `EXTRACT(field)` or - // `REGEXP_EXTRACT(field, regex)`. The argument are: + // `REGEXP_EXTRACT(field, regex)`. The arguments are: + // // 1. field: The name of the log entry field from which the value is to be // extracted. // 2. regex: A regular expression using the Google RE2 syntax @@ -192,29 +205,33 @@ message LogMetric { // is the same as for the `value_extractor` field. // // The extracted value is converted to the type defined in the label - // descriptor. If the either the extraction or the type conversion fails, + // descriptor. If either the extraction or the type conversion fails, // the label will have a default value. The default value for a string // label is an empty string, for an integer label its 0, and for a boolean // label its `false`. // // Note that there are upper bounds on the maximum number of labels and the // number of active time series that are allowed in a project. - map label_extractors = 7 [(google.api.field_behavior) = OPTIONAL]; + map label_extractors = 7 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The `bucket_options` are required when the logs-based metric is // using a DISTRIBUTION value type and it describes the bucket boundaries // used to create a histogram of the extracted values. - google.api.Distribution.BucketOptions bucket_options = 8 [(google.api.field_behavior) = OPTIONAL]; + google.api.Distribution.BucketOptions bucket_options = 8 + [(google.api.field_behavior) = OPTIONAL]; // Output only. The creation timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Deprecated. The API version that created or updated this metric. // The v2 format is used by default and cannot be changed. diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 3edb9336692..8800c84661a 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -5924,14 +5924,14 @@ export namespace google { /** ListLogsRequest parent */ parent?: (string|null); + /** ListLogsRequest resourceNames */ + resourceNames?: (string[]|null); + /** ListLogsRequest pageSize */ pageSize?: (number|null); /** ListLogsRequest pageToken */ pageToken?: (string|null); - - /** ListLogsRequest resourceNames */ - resourceNames?: (string[]|null); } /** Represents a ListLogsRequest. */ @@ -5946,15 +5946,15 @@ export namespace google { /** ListLogsRequest parent. */ public parent: string; + /** ListLogsRequest resourceNames. */ + public resourceNames: string[]; + /** ListLogsRequest pageSize. */ public pageSize: number; /** ListLogsRequest pageToken. */ public pageToken: string; - /** ListLogsRequest resourceNames. */ - public resourceNames: string[]; - /** * Creates a new ListLogsRequest instance using the specified properties. * @param [properties] Properties to set @@ -6512,6 +6512,34 @@ export namespace google { */ public getBucket(request: google.logging.v2.IGetBucketRequest): Promise; + /** + * Calls CreateBucketAsync. + * @param request CreateBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBucketAsync(request: google.logging.v2.ICreateBucketRequest, callback: google.logging.v2.ConfigServiceV2.CreateBucketAsyncCallback): void; + + /** + * Calls CreateBucketAsync. + * @param request CreateBucketRequest message or plain object + * @returns Promise + */ + public createBucketAsync(request: google.logging.v2.ICreateBucketRequest): Promise; + + /** + * Calls UpdateBucketAsync. + * @param request UpdateBucketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBucketAsync(request: google.logging.v2.IUpdateBucketRequest, callback: google.logging.v2.ConfigServiceV2.UpdateBucketAsyncCallback): void; + + /** + * Calls UpdateBucketAsync. + * @param request UpdateBucketRequest message or plain object + * @returns Promise + */ + public updateBucketAsync(request: google.logging.v2.IUpdateBucketRequest): Promise; + /** * Calls CreateBucket. * @param request CreateBucketRequest message or plain object @@ -6708,6 +6736,62 @@ export namespace google { */ public deleteSink(request: google.logging.v2.IDeleteSinkRequest): Promise; + /** + * Calls CreateLink. + * @param request CreateLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLink(request: google.logging.v2.ICreateLinkRequest, callback: google.logging.v2.ConfigServiceV2.CreateLinkCallback): void; + + /** + * Calls CreateLink. + * @param request CreateLinkRequest message or plain object + * @returns Promise + */ + public createLink(request: google.logging.v2.ICreateLinkRequest): Promise; + + /** + * Calls DeleteLink. + * @param request DeleteLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteLink(request: google.logging.v2.IDeleteLinkRequest, callback: google.logging.v2.ConfigServiceV2.DeleteLinkCallback): void; + + /** + * Calls DeleteLink. + * @param request DeleteLinkRequest message or plain object + * @returns Promise + */ + public deleteLink(request: google.logging.v2.IDeleteLinkRequest): Promise; + + /** + * Calls ListLinks. + * @param request ListLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLinksResponse + */ + public listLinks(request: google.logging.v2.IListLinksRequest, callback: google.logging.v2.ConfigServiceV2.ListLinksCallback): void; + + /** + * Calls ListLinks. + * @param request ListLinksRequest message or plain object + * @returns Promise + */ + public listLinks(request: google.logging.v2.IListLinksRequest): Promise; + + /** + * Calls GetLink. + * @param request GetLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Link + */ + public getLink(request: google.logging.v2.IGetLinkRequest, callback: google.logging.v2.ConfigServiceV2.GetLinkCallback): void; + + /** + * Calls GetLink. + * @param request GetLinkRequest message or plain object + * @returns Promise + */ + public getLink(request: google.logging.v2.IGetLinkRequest): Promise; + /** * Calls ListExclusions. * @param request ListExclusionsRequest message or plain object @@ -6865,6 +6949,20 @@ export namespace google { */ type GetBucketCallback = (error: (Error|null), response?: google.logging.v2.LogBucket) => void; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createBucketAsync}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBucketAsyncCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateBucketAsync}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBucketAsyncCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2|createBucket}. * @param error Error, if any @@ -6963,6 +7061,34 @@ export namespace google { */ type DeleteSinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createLink}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateLinkCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteLink}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteLinkCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listLinks}. + * @param error Error, if any + * @param [response] ListLinksResponse + */ + type ListLinksCallback = (error: (Error|null), response?: google.logging.v2.ListLinksResponse) => void; + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getLink}. + * @param error Error, if any + * @param [response] Link + */ + type GetLinkCallback = (error: (Error|null), response?: google.logging.v2.Link) => void; + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2|listExclusions}. * @param error Error, if any @@ -7034,6 +7160,115 @@ export namespace google { type CopyLogEntriesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } + /** Properties of an IndexConfig. */ + interface IIndexConfig { + + /** IndexConfig fieldPath */ + fieldPath?: (string|null); + + /** IndexConfig type */ + type?: (google.logging.v2.IndexType|keyof typeof google.logging.v2.IndexType|null); + + /** IndexConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an IndexConfig. */ + class IndexConfig implements IIndexConfig { + + /** + * Constructs a new IndexConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IIndexConfig); + + /** IndexConfig fieldPath. */ + public fieldPath: string; + + /** IndexConfig type. */ + public type: (google.logging.v2.IndexType|keyof typeof google.logging.v2.IndexType); + + /** IndexConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new IndexConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IndexConfig instance + */ + public static create(properties?: google.logging.v2.IIndexConfig): google.logging.v2.IndexConfig; + + /** + * Encodes the specified IndexConfig message. Does not implicitly {@link google.logging.v2.IndexConfig.verify|verify} messages. + * @param message IndexConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IIndexConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IndexConfig message, length delimited. Does not implicitly {@link google.logging.v2.IndexConfig.verify|verify} messages. + * @param message IndexConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IIndexConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IndexConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IndexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.IndexConfig; + + /** + * Decodes an IndexConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IndexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.IndexConfig; + + /** + * Verifies an IndexConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IndexConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IndexConfig + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.IndexConfig; + + /** + * Creates a plain object from an IndexConfig message. Also converts values to other types if specified. + * @param message IndexConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.IndexConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IndexConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IndexConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a LogBucket. */ interface ILogBucket { @@ -7058,9 +7293,15 @@ export namespace google { /** LogBucket lifecycleState */ lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); + /** LogBucket analyticsEnabled */ + analyticsEnabled?: (boolean|null); + /** LogBucket restrictedFields */ restrictedFields?: (string[]|null); + /** LogBucket indexConfigs */ + indexConfigs?: (google.logging.v2.IIndexConfig[]|null); + /** LogBucket cmekSettings */ cmekSettings?: (google.logging.v2.ICmekSettings|null); } @@ -7095,9 +7336,15 @@ export namespace google { /** LogBucket lifecycleState. */ public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); + /** LogBucket analyticsEnabled. */ + public analyticsEnabled: boolean; + /** LogBucket restrictedFields. */ public restrictedFields: string[]; + /** LogBucket indexConfigs. */ + public indexConfigs: google.logging.v2.IIndexConfig[]; + /** LogBucket cmekSettings. */ public cmekSettings?: (google.logging.v2.ICmekSettings|null); @@ -7476,206 +7723,424 @@ export namespace google { } } - /** Properties of a BigQueryOptions. */ - interface IBigQueryOptions { - - /** BigQueryOptions usePartitionedTables */ - usePartitionedTables?: (boolean|null); + /** Properties of a BigQueryDataset. */ + interface IBigQueryDataset { - /** BigQueryOptions usesTimestampColumnPartitioning */ - usesTimestampColumnPartitioning?: (boolean|null); + /** BigQueryDataset datasetId */ + datasetId?: (string|null); } - /** Represents a BigQueryOptions. */ - class BigQueryOptions implements IBigQueryOptions { + /** Represents a BigQueryDataset. */ + class BigQueryDataset implements IBigQueryDataset { /** - * Constructs a new BigQueryOptions. + * Constructs a new BigQueryDataset. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IBigQueryOptions); - - /** BigQueryOptions usePartitionedTables. */ - public usePartitionedTables: boolean; + constructor(properties?: google.logging.v2.IBigQueryDataset); - /** BigQueryOptions usesTimestampColumnPartitioning. */ - public usesTimestampColumnPartitioning: boolean; + /** BigQueryDataset datasetId. */ + public datasetId: string; /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new BigQueryDataset instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryOptions instance + * @returns BigQueryDataset instance */ - public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; + public static create(properties?: google.logging.v2.IBigQueryDataset): google.logging.v2.BigQueryDataset; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode + * Encodes the specified BigQueryDataset message. Does not implicitly {@link google.logging.v2.BigQueryDataset.verify|verify} messages. + * @param message BigQueryDataset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IBigQueryDataset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. - * @param message BigQueryOptions message or plain object to encode + * Encodes the specified BigQueryDataset message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryDataset.verify|verify} messages. + * @param message BigQueryDataset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IBigQueryDataset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a BigQueryDataset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryOptions + * @returns BigQueryDataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryDataset; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a BigQueryDataset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryOptions + * @returns BigQueryDataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryDataset; /** - * Verifies a BigQueryOptions message. + * Verifies a BigQueryDataset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryDataset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryOptions + * @returns BigQueryDataset */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; + public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryDataset; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. - * @param message BigQueryOptions + * Creates a plain object from a BigQueryDataset message. Also converts values to other types if specified. + * @param message BigQueryDataset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.BigQueryDataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryOptions to JSON. + * Converts this BigQueryDataset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BigQueryOptions + * Gets the default type url for BigQueryDataset * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBucketsRequest. */ - interface IListBucketsRequest { + /** Properties of a Link. */ + interface ILink { - /** ListBucketsRequest parent */ - parent?: (string|null); + /** Link name */ + name?: (string|null); - /** ListBucketsRequest pageToken */ - pageToken?: (string|null); + /** Link description */ + description?: (string|null); - /** ListBucketsRequest pageSize */ - pageSize?: (number|null); + /** Link createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Link lifecycleState */ + lifecycleState?: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState|null); + + /** Link bigqueryDataset */ + bigqueryDataset?: (google.logging.v2.IBigQueryDataset|null); } - /** Represents a ListBucketsRequest. */ - class ListBucketsRequest implements IListBucketsRequest { + /** Represents a Link. */ + class Link implements ILink { /** - * Constructs a new ListBucketsRequest. + * Constructs a new Link. * @param [properties] Properties to set */ - constructor(properties?: google.logging.v2.IListBucketsRequest); + constructor(properties?: google.logging.v2.ILink); - /** ListBucketsRequest parent. */ - public parent: string; + /** Link name. */ + public name: string; - /** ListBucketsRequest pageToken. */ - public pageToken: string; + /** Link description. */ + public description: string; - /** ListBucketsRequest pageSize. */ - public pageSize: number; + /** Link createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Link lifecycleState. */ + public lifecycleState: (google.logging.v2.LifecycleState|keyof typeof google.logging.v2.LifecycleState); + + /** Link bigqueryDataset. */ + public bigqueryDataset?: (google.logging.v2.IBigQueryDataset|null); /** - * Creates a new ListBucketsRequest instance using the specified properties. + * Creates a new Link instance using the specified properties. * @param [properties] Properties to set - * @returns ListBucketsRequest instance + * @returns Link instance */ - public static create(properties?: google.logging.v2.IListBucketsRequest): google.logging.v2.ListBucketsRequest; + public static create(properties?: google.logging.v2.ILink): google.logging.v2.Link; /** - * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. - * @param message ListBucketsRequest message or plain object to encode + * Encodes the specified Link message. Does not implicitly {@link google.logging.v2.Link.verify|verify} messages. + * @param message Link message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.ILink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. - * @param message ListBucketsRequest message or plain object to encode + * Encodes the specified Link message, length delimited. Does not implicitly {@link google.logging.v2.Link.verify|verify} messages. + * @param message Link message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.ILink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer. + * Decodes a Link message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBucketsRequest + * @returns Link * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.Link; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * Decodes a Link message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBucketsRequest + * @returns Link * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.Link; /** - * Verifies a ListBucketsRequest message. + * Verifies a Link message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Link message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBucketsRequest + * @returns Link */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.Link; /** - * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. - * @param message ListBucketsRequest + * Creates a plain object from a Link message. Also converts values to other types if specified. + * @param message Link * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.ListBucketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.Link, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBucketsRequest to JSON. + * Converts this Link to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Link + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryOptions. */ + interface IBigQueryOptions { + + /** BigQueryOptions usePartitionedTables */ + usePartitionedTables?: (boolean|null); + + /** BigQueryOptions usesTimestampColumnPartitioning */ + usesTimestampColumnPartitioning?: (boolean|null); + } + + /** Represents a BigQueryOptions. */ + class BigQueryOptions implements IBigQueryOptions { + + /** + * Constructs a new BigQueryOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IBigQueryOptions); + + /** BigQueryOptions usePartitionedTables. */ + public usePartitionedTables: boolean; + + /** BigQueryOptions usesTimestampColumnPartitioning. */ + public usesTimestampColumnPartitioning: boolean; + + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryOptions instance + */ + public static create(properties?: google.logging.v2.IBigQueryOptions): google.logging.v2.BigQueryOptions; + + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BigQueryOptions; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BigQueryOptions; + + /** + * Verifies a BigQueryOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryOptions + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.BigQueryOptions; + + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @param message BigQueryOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBucketsRequest. */ + interface IListBucketsRequest { + + /** ListBucketsRequest parent */ + parent?: (string|null); + + /** ListBucketsRequest pageToken */ + pageToken?: (string|null); + + /** ListBucketsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListBucketsRequest. */ + class ListBucketsRequest implements IListBucketsRequest { + + /** + * Constructs a new ListBucketsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListBucketsRequest); + + /** ListBucketsRequest parent. */ + public parent: string; + + /** ListBucketsRequest pageToken. */ + public pageToken: string; + + /** ListBucketsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListBucketsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBucketsRequest instance + */ + public static create(properties?: google.logging.v2.IListBucketsRequest): google.logging.v2.ListBucketsRequest; + + /** + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @param message ListBucketsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * @param message ListBucketsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListBucketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListBucketsRequest; + + /** + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBucketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListBucketsRequest; + + /** + * Verifies a ListBucketsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBucketsRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListBucketsRequest; + + /** + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * @param message ListBucketsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListBucketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBucketsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -9479,75 +9944,590 @@ export namespace google { /** * Creates a new DeleteSinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSinkRequest instance + * @returns DeleteSinkRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + + /** + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * @param message DeleteSinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + + /** + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + + /** + * Verifies a DeleteSinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + + /** + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * @param message DeleteSinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateLinkRequest. */ + interface ICreateLinkRequest { + + /** CreateLinkRequest parent */ + parent?: (string|null); + + /** CreateLinkRequest link */ + link?: (google.logging.v2.ILink|null); + + /** CreateLinkRequest linkId */ + linkId?: (string|null); + } + + /** Represents a CreateLinkRequest. */ + class CreateLinkRequest implements ICreateLinkRequest { + + /** + * Constructs a new CreateLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ICreateLinkRequest); + + /** CreateLinkRequest parent. */ + public parent: string; + + /** CreateLinkRequest link. */ + public link?: (google.logging.v2.ILink|null); + + /** CreateLinkRequest linkId. */ + public linkId: string; + + /** + * Creates a new CreateLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLinkRequest instance + */ + public static create(properties?: google.logging.v2.ICreateLinkRequest): google.logging.v2.CreateLinkRequest; + + /** + * Encodes the specified CreateLinkRequest message. Does not implicitly {@link google.logging.v2.CreateLinkRequest.verify|verify} messages. + * @param message CreateLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ICreateLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateLinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLinkRequest.verify|verify} messages. + * @param message CreateLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ICreateLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.CreateLinkRequest; + + /** + * Decodes a CreateLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.CreateLinkRequest; + + /** + * Verifies a CreateLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.CreateLinkRequest; + + /** + * Creates a plain object from a CreateLinkRequest message. Also converts values to other types if specified. + * @param message CreateLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.CreateLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteLinkRequest. */ + interface IDeleteLinkRequest { + + /** DeleteLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteLinkRequest. */ + class DeleteLinkRequest implements IDeleteLinkRequest { + + /** + * Constructs a new DeleteLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IDeleteLinkRequest); + + /** DeleteLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLinkRequest instance + */ + public static create(properties?: google.logging.v2.IDeleteLinkRequest): google.logging.v2.DeleteLinkRequest; + + /** + * Encodes the specified DeleteLinkRequest message. Does not implicitly {@link google.logging.v2.DeleteLinkRequest.verify|verify} messages. + * @param message DeleteLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IDeleteLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLinkRequest.verify|verify} messages. + * @param message DeleteLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IDeleteLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteLinkRequest; + + /** + * Decodes a DeleteLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteLinkRequest; + + /** + * Verifies a DeleteLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteLinkRequest; + + /** + * Creates a plain object from a DeleteLinkRequest message. Also converts values to other types if specified. + * @param message DeleteLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.DeleteLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLinksRequest. */ + interface IListLinksRequest { + + /** ListLinksRequest parent */ + parent?: (string|null); + + /** ListLinksRequest pageToken */ + pageToken?: (string|null); + + /** ListLinksRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListLinksRequest. */ + class ListLinksRequest implements IListLinksRequest { + + /** + * Constructs a new ListLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLinksRequest); + + /** ListLinksRequest parent. */ + public parent: string; + + /** ListLinksRequest pageToken. */ + public pageToken: string; + + /** ListLinksRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLinksRequest instance + */ + public static create(properties?: google.logging.v2.IListLinksRequest): google.logging.v2.ListLinksRequest; + + /** + * Encodes the specified ListLinksRequest message. Does not implicitly {@link google.logging.v2.ListLinksRequest.verify|verify} messages. + * @param message ListLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLinksRequest.verify|verify} messages. + * @param message ListLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLinksRequest; + + /** + * Decodes a ListLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLinksRequest; + + /** + * Verifies a ListLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLinksRequest; + + /** + * Creates a plain object from a ListLinksRequest message. Also converts values to other types if specified. + * @param message ListLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLinksResponse. */ + interface IListLinksResponse { + + /** ListLinksResponse links */ + links?: (google.logging.v2.ILink[]|null); + + /** ListLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLinksResponse. */ + class ListLinksResponse implements IListLinksResponse { + + /** + * Constructs a new ListLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IListLinksResponse); + + /** ListLinksResponse links. */ + public links: google.logging.v2.ILink[]; + + /** ListLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLinksResponse instance + */ + public static create(properties?: google.logging.v2.IListLinksResponse): google.logging.v2.ListLinksResponse; + + /** + * Encodes the specified ListLinksResponse message. Does not implicitly {@link google.logging.v2.ListLinksResponse.verify|verify} messages. + * @param message ListLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IListLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLinksResponse.verify|verify} messages. + * @param message ListLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IListLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.ListLinksResponse; + + /** + * Decodes a ListLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.ListLinksResponse; + + /** + * Verifies a ListLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.ListLinksResponse; + + /** + * Creates a plain object from a ListLinksResponse message. Also converts values to other types if specified. + * @param message ListLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.ListLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetLinkRequest. */ + interface IGetLinkRequest { + + /** GetLinkRequest name */ + name?: (string|null); + } + + /** Represents a GetLinkRequest. */ + class GetLinkRequest implements IGetLinkRequest { + + /** + * Constructs a new GetLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IGetLinkRequest); + + /** GetLinkRequest name. */ + public name: string; + + /** + * Creates a new GetLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLinkRequest instance */ - public static create(properties?: google.logging.v2.IDeleteSinkRequest): google.logging.v2.DeleteSinkRequest; + public static create(properties?: google.logging.v2.IGetLinkRequest): google.logging.v2.GetLinkRequest; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified GetLinkRequest message. Does not implicitly {@link google.logging.v2.GetLinkRequest.verify|verify} messages. + * @param message GetLinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.logging.v2.IGetLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. - * @param message DeleteSinkRequest message or plain object to encode + * Encodes the specified GetLinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLinkRequest.verify|verify} messages. + * @param message GetLinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.logging.v2.IDeleteSinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.logging.v2.IGetLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * Decodes a GetLinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSinkRequest + * @returns GetLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.DeleteSinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.GetLinkRequest; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a GetLinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSinkRequest + * @returns GetLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.DeleteSinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.GetLinkRequest; /** - * Verifies a DeleteSinkRequest message. + * Verifies a GetLinkRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetLinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSinkRequest + * @returns GetLinkRequest */ - public static fromObject(object: { [k: string]: any }): google.logging.v2.DeleteSinkRequest; + public static fromObject(object: { [k: string]: any }): google.logging.v2.GetLinkRequest; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. - * @param message DeleteSinkRequest + * Creates a plain object from a GetLinkRequest message. Also converts values to other types if specified. + * @param message GetLinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.logging.v2.DeleteSinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.logging.v2.GetLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSinkRequest to JSON. + * Converts this GetLinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteSinkRequest + * Gets the default type url for GetLinkRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -10514,6 +11494,9 @@ export namespace google { /** CmekSettings kmsKeyName */ kmsKeyName?: (string|null); + /** CmekSettings kmsKeyVersionName */ + kmsKeyVersionName?: (string|null); + /** CmekSettings serviceAccountId */ serviceAccountId?: (string|null); } @@ -10533,6 +11516,9 @@ export namespace google { /** CmekSettings kmsKeyName. */ public kmsKeyName: string; + /** CmekSettings kmsKeyVersionName. */ + public kmsKeyVersionName: string; + /** CmekSettings serviceAccountId. */ public serviceAccountId: string; @@ -11280,11 +12266,252 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** LifecycleState enum. */ - enum LifecycleState { - LIFECYCLE_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - DELETE_REQUESTED = 2 + /** Properties of a BucketMetadata. */ + interface IBucketMetadata { + + /** BucketMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** BucketMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** BucketMetadata state */ + state?: (google.logging.v2.OperationState|keyof typeof google.logging.v2.OperationState|null); + + /** BucketMetadata createBucketRequest */ + createBucketRequest?: (google.logging.v2.ICreateBucketRequest|null); + + /** BucketMetadata updateBucketRequest */ + updateBucketRequest?: (google.logging.v2.IUpdateBucketRequest|null); + } + + /** Represents a BucketMetadata. */ + class BucketMetadata implements IBucketMetadata { + + /** + * Constructs a new BucketMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.IBucketMetadata); + + /** BucketMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** BucketMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** BucketMetadata state. */ + public state: (google.logging.v2.OperationState|keyof typeof google.logging.v2.OperationState); + + /** BucketMetadata createBucketRequest. */ + public createBucketRequest?: (google.logging.v2.ICreateBucketRequest|null); + + /** BucketMetadata updateBucketRequest. */ + public updateBucketRequest?: (google.logging.v2.IUpdateBucketRequest|null); + + /** BucketMetadata request. */ + public request?: ("createBucketRequest"|"updateBucketRequest"); + + /** + * Creates a new BucketMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BucketMetadata instance + */ + public static create(properties?: google.logging.v2.IBucketMetadata): google.logging.v2.BucketMetadata; + + /** + * Encodes the specified BucketMetadata message. Does not implicitly {@link google.logging.v2.BucketMetadata.verify|verify} messages. + * @param message BucketMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.IBucketMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BucketMetadata message, length delimited. Does not implicitly {@link google.logging.v2.BucketMetadata.verify|verify} messages. + * @param message BucketMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.IBucketMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BucketMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BucketMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.BucketMetadata; + + /** + * Decodes a BucketMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BucketMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.BucketMetadata; + + /** + * Verifies a BucketMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BucketMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BucketMetadata + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.BucketMetadata; + + /** + * Creates a plain object from a BucketMetadata message. Also converts values to other types if specified. + * @param message BucketMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.BucketMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BucketMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BucketMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LinkMetadata. */ + interface ILinkMetadata { + + /** LinkMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** LinkMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** LinkMetadata state */ + state?: (google.logging.v2.OperationState|keyof typeof google.logging.v2.OperationState|null); + + /** LinkMetadata createLinkRequest */ + createLinkRequest?: (google.logging.v2.ICreateLinkRequest|null); + + /** LinkMetadata deleteLinkRequest */ + deleteLinkRequest?: (google.logging.v2.IDeleteLinkRequest|null); + } + + /** Represents a LinkMetadata. */ + class LinkMetadata implements ILinkMetadata { + + /** + * Constructs a new LinkMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILinkMetadata); + + /** LinkMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** LinkMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** LinkMetadata state. */ + public state: (google.logging.v2.OperationState|keyof typeof google.logging.v2.OperationState); + + /** LinkMetadata createLinkRequest. */ + public createLinkRequest?: (google.logging.v2.ICreateLinkRequest|null); + + /** LinkMetadata deleteLinkRequest. */ + public deleteLinkRequest?: (google.logging.v2.IDeleteLinkRequest|null); + + /** LinkMetadata request. */ + public request?: ("createLinkRequest"|"deleteLinkRequest"); + + /** + * Creates a new LinkMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns LinkMetadata instance + */ + public static create(properties?: google.logging.v2.ILinkMetadata): google.logging.v2.LinkMetadata; + + /** + * Encodes the specified LinkMetadata message. Does not implicitly {@link google.logging.v2.LinkMetadata.verify|verify} messages. + * @param message LinkMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILinkMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LinkMetadata message, length delimited. Does not implicitly {@link google.logging.v2.LinkMetadata.verify|verify} messages. + * @param message LinkMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILinkMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LinkMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LinkMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LinkMetadata; + + /** + * Decodes a LinkMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LinkMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LinkMetadata; + + /** + * Verifies a LinkMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LinkMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LinkMetadata + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LinkMetadata; + + /** + * Creates a plain object from a LinkMetadata message. Also converts values to other types if specified. + * @param message LinkMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LinkMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LinkMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LinkMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** OperationState enum. */ @@ -11298,6 +12525,120 @@ export namespace google { OPERATION_STATE_CANCELLED = 6 } + /** LifecycleState enum. */ + enum LifecycleState { + LIFECYCLE_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + DELETE_REQUESTED = 2, + UPDATING = 3, + CREATING = 4, + FAILED = 5 + } + + /** IndexType enum. */ + enum IndexType { + INDEX_TYPE_UNSPECIFIED = 0, + INDEX_TYPE_STRING = 1, + INDEX_TYPE_INTEGER = 2 + } + + /** Properties of a LocationMetadata. */ + interface ILocationMetadata { + + /** LocationMetadata logAnalyticsEnabled */ + logAnalyticsEnabled?: (boolean|null); + } + + /** Represents a LocationMetadata. */ + class LocationMetadata implements ILocationMetadata { + + /** + * Constructs a new LocationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.logging.v2.ILocationMetadata); + + /** LocationMetadata logAnalyticsEnabled. */ + public logAnalyticsEnabled: boolean; + + /** + * Creates a new LocationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationMetadata instance + */ + public static create(properties?: google.logging.v2.ILocationMetadata): google.logging.v2.LocationMetadata; + + /** + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.logging.v2.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.logging.v2.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.logging.v2.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.logging.v2.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.logging.v2.LocationMetadata; + + /** + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.logging.v2.LocationMetadata; + + /** + * Verifies a LocationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.logging.v2.LocationMetadata; + + /** + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @param message LocationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.logging.v2.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents a MetricsServiceV2 */ class MetricsServiceV2 extends $protobuf.rpc.Service { @@ -11439,6 +12780,9 @@ export namespace google { /** LogMetric filter */ filter?: (string|null); + /** LogMetric bucketName */ + bucketName?: (string|null); + /** LogMetric disabled */ disabled?: (boolean|null); @@ -11482,6 +12826,9 @@ export namespace google { /** LogMetric filter. */ public filter: string; + /** LogMetric bucketName. */ + public bucketName: string; + /** LogMetric disabled. */ public disabled: boolean; diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 293bad648f8..894badd6b23 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -15879,9 +15879,9 @@ * @memberof google.logging.v2 * @interface IListLogsRequest * @property {string|null} [parent] ListLogsRequest parent + * @property {Array.|null} [resourceNames] ListLogsRequest resourceNames * @property {number|null} [pageSize] ListLogsRequest pageSize * @property {string|null} [pageToken] ListLogsRequest pageToken - * @property {Array.|null} [resourceNames] ListLogsRequest resourceNames */ /** @@ -15908,6 +15908,14 @@ */ ListLogsRequest.prototype.parent = ""; + /** + * ListLogsRequest resourceNames. + * @member {Array.} resourceNames + * @memberof google.logging.v2.ListLogsRequest + * @instance + */ + ListLogsRequest.prototype.resourceNames = $util.emptyArray; + /** * ListLogsRequest pageSize. * @member {number} pageSize @@ -15924,14 +15932,6 @@ */ ListLogsRequest.prototype.pageToken = ""; - /** - * ListLogsRequest resourceNames. - * @member {Array.} resourceNames - * @memberof google.logging.v2.ListLogsRequest - * @instance - */ - ListLogsRequest.prototype.resourceNames = $util.emptyArray; - /** * Creates a new ListLogsRequest instance using the specified properties. * @function create @@ -16003,6 +16003,12 @@ message.parent = reader.string(); break; } + case 8: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + } case 2: { message.pageSize = reader.int32(); break; @@ -16011,12 +16017,6 @@ message.pageToken = reader.string(); break; } - case 8: { - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; - } default: reader.skipType(tag & 7); break; @@ -16055,12 +16055,6 @@ if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { if (!Array.isArray(message.resourceNames)) return "resourceNames: array expected"; @@ -16068,6 +16062,12 @@ if (!$util.isString(message.resourceNames[i])) return "resourceNames: string[] expected"; } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; @@ -16085,10 +16085,6 @@ var message = new $root.google.logging.v2.ListLogsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); if (object.resourceNames) { if (!Array.isArray(object.resourceNames)) throw TypeError(".google.logging.v2.ListLogsRequest.resourceNames: array expected"); @@ -16096,6 +16092,10 @@ for (var i = 0; i < object.resourceNames.length; ++i) message.resourceNames[i] = String(object.resourceNames[i]); } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; @@ -17311,6 +17311,72 @@ * @variation 2 */ + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createBucketAsync}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateBucketAsyncCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBucketAsync. + * @function createBucketAsync + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateBucketRequest} request CreateBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateBucketAsyncCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createBucketAsync = function createBucketAsync(request, callback) { + return this.rpcCall(createBucketAsync, $root.google.logging.v2.CreateBucketRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBucketAsync" }); + + /** + * Calls CreateBucketAsync. + * @function createBucketAsync + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateBucketRequest} request CreateBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|updateBucketAsync}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef UpdateBucketAsyncCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBucketAsync. + * @function updateBucketAsync + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.UpdateBucketAsyncCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.updateBucketAsync = function updateBucketAsync(request, callback) { + return this.rpcCall(updateBucketAsync, $root.google.logging.v2.UpdateBucketRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBucketAsync" }); + + /** + * Calls UpdateBucketAsync. + * @function updateBucketAsync + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IUpdateBucketRequest} request UpdateBucketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2|createBucket}. * @memberof google.logging.v2.ConfigServiceV2 @@ -17773,6 +17839,138 @@ * @variation 2 */ + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|createLink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef CreateLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateLink. + * @function createLink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateLinkRequest} request CreateLinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.CreateLinkCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.createLink = function createLink(request, callback) { + return this.rpcCall(createLink, $root.google.logging.v2.CreateLinkRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLink" }); + + /** + * Calls CreateLink. + * @function createLink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.ICreateLinkRequest} request CreateLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|deleteLink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef DeleteLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteLink. + * @function deleteLink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLinkRequest} request DeleteLinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.DeleteLinkCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.deleteLink = function deleteLink(request, callback) { + return this.rpcCall(deleteLink, $root.google.logging.v2.DeleteLinkRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteLink" }); + + /** + * Calls DeleteLink. + * @function deleteLink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IDeleteLinkRequest} request DeleteLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|listLinks}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef ListLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.ListLinksResponse} [response] ListLinksResponse + */ + + /** + * Calls ListLinks. + * @function listLinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListLinksRequest} request ListLinksRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.ListLinksCallback} callback Node-style callback called with the error, if any, and ListLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.listLinks = function listLinks(request, callback) { + return this.rpcCall(listLinks, $root.google.logging.v2.ListLinksRequest, $root.google.logging.v2.ListLinksResponse, request, callback); + }, "name", { value: "ListLinks" }); + + /** + * Calls ListLinks. + * @function listLinks + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IListLinksRequest} request ListLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.logging.v2.ConfigServiceV2|getLink}. + * @memberof google.logging.v2.ConfigServiceV2 + * @typedef GetLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.logging.v2.Link} [response] Link + */ + + /** + * Calls GetLink. + * @function getLink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetLinkRequest} request GetLinkRequest message or plain object + * @param {google.logging.v2.ConfigServiceV2.GetLinkCallback} callback Node-style callback called with the error, if any, and Link + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfigServiceV2.prototype.getLink = function getLink(request, callback) { + return this.rpcCall(getLink, $root.google.logging.v2.GetLinkRequest, $root.google.logging.v2.Link, request, callback); + }, "name", { value: "GetLink" }); + + /** + * Calls GetLink. + * @function getLink + * @memberof google.logging.v2.ConfigServiceV2 + * @instance + * @param {google.logging.v2.IGetLinkRequest} request GetLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.logging.v2.ConfigServiceV2|listExclusions}. * @memberof google.logging.v2.ConfigServiceV2 @@ -18106,33 +18304,26 @@ return ConfigServiceV2; })(); - v2.LogBucket = (function() { + v2.IndexConfig = (function() { /** - * Properties of a LogBucket. + * Properties of an IndexConfig. * @memberof google.logging.v2 - * @interface ILogBucket - * @property {string|null} [name] LogBucket name - * @property {string|null} [description] LogBucket description - * @property {google.protobuf.ITimestamp|null} [createTime] LogBucket createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogBucket updateTime - * @property {number|null} [retentionDays] LogBucket retentionDays - * @property {boolean|null} [locked] LogBucket locked - * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState - * @property {Array.|null} [restrictedFields] LogBucket restrictedFields - * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] LogBucket cmekSettings + * @interface IIndexConfig + * @property {string|null} [fieldPath] IndexConfig fieldPath + * @property {google.logging.v2.IndexType|null} [type] IndexConfig type + * @property {google.protobuf.ITimestamp|null} [createTime] IndexConfig createTime */ /** - * Constructs a new LogBucket. + * Constructs a new IndexConfig. * @memberof google.logging.v2 - * @classdesc Represents a LogBucket. - * @implements ILogBucket + * @classdesc Represents an IndexConfig. + * @implements IIndexConfig * @constructor - * @param {google.logging.v2.ILogBucket=} [properties] Properties to set + * @param {google.logging.v2.IIndexConfig=} [properties] Properties to set */ - function LogBucket(properties) { - this.restrictedFields = []; + function IndexConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18140,69 +18331,374 @@ } /** - * LogBucket name. - * @member {string} name - * @memberof google.logging.v2.LogBucket + * IndexConfig fieldPath. + * @member {string} fieldPath + * @memberof google.logging.v2.IndexConfig * @instance */ - LogBucket.prototype.name = ""; + IndexConfig.prototype.fieldPath = ""; /** - * LogBucket description. - * @member {string} description - * @memberof google.logging.v2.LogBucket + * IndexConfig type. + * @member {google.logging.v2.IndexType} type + * @memberof google.logging.v2.IndexConfig * @instance */ - LogBucket.prototype.description = ""; + IndexConfig.prototype.type = 0; /** - * LogBucket createTime. + * IndexConfig createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogBucket - * @instance - */ - LogBucket.prototype.createTime = null; - - /** - * LogBucket updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogBucket + * @memberof google.logging.v2.IndexConfig * @instance */ - LogBucket.prototype.updateTime = null; + IndexConfig.prototype.createTime = null; /** - * LogBucket retentionDays. - * @member {number} retentionDays - * @memberof google.logging.v2.LogBucket - * @instance + * Creates a new IndexConfig instance using the specified properties. + * @function create + * @memberof google.logging.v2.IndexConfig + * @static + * @param {google.logging.v2.IIndexConfig=} [properties] Properties to set + * @returns {google.logging.v2.IndexConfig} IndexConfig instance */ - LogBucket.prototype.retentionDays = 0; + IndexConfig.create = function create(properties) { + return new IndexConfig(properties); + }; /** - * LogBucket locked. - * @member {boolean} locked - * @memberof google.logging.v2.LogBucket - * @instance + * Encodes the specified IndexConfig message. Does not implicitly {@link google.logging.v2.IndexConfig.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.IndexConfig + * @static + * @param {google.logging.v2.IIndexConfig} message IndexConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogBucket.prototype.locked = false; + IndexConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPath != null && Object.hasOwnProperty.call(message, "fieldPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldPath); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * LogBucket lifecycleState. - * @member {google.logging.v2.LifecycleState} lifecycleState - * @memberof google.logging.v2.LogBucket - * @instance + * Encodes the specified IndexConfig message, length delimited. Does not implicitly {@link google.logging.v2.IndexConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.IndexConfig + * @static + * @param {google.logging.v2.IIndexConfig} message IndexConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LogBucket.prototype.lifecycleState = 0; + IndexConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * LogBucket restrictedFields. - * @member {Array.} restrictedFields - * @memberof google.logging.v2.LogBucket - * @instance + * Decodes an IndexConfig message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.IndexConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.IndexConfig} IndexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IndexConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.IndexConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPath = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IndexConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.IndexConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.IndexConfig} IndexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IndexConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IndexConfig message. + * @function verify + * @memberof google.logging.v2.IndexConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IndexConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) + if (!$util.isString(message.fieldPath)) + return "fieldPath: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates an IndexConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.IndexConfig + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.IndexConfig} IndexConfig + */ + IndexConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.IndexConfig) + return object; + var message = new $root.google.logging.v2.IndexConfig(); + if (object.fieldPath != null) + message.fieldPath = String(object.fieldPath); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "INDEX_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INDEX_TYPE_STRING": + case 1: + message.type = 1; + break; + case "INDEX_TYPE_INTEGER": + case 2: + message.type = 2; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.IndexConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from an IndexConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.IndexConfig + * @static + * @param {google.logging.v2.IndexConfig} message IndexConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IndexConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPath = ""; + object.type = options.enums === String ? "INDEX_TYPE_UNSPECIFIED" : 0; + object.createTime = null; + } + if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) + object.fieldPath = message.fieldPath; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.logging.v2.IndexType[message.type] === undefined ? message.type : $root.google.logging.v2.IndexType[message.type] : message.type; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this IndexConfig to JSON. + * @function toJSON + * @memberof google.logging.v2.IndexConfig + * @instance + * @returns {Object.} JSON object + */ + IndexConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IndexConfig + * @function getTypeUrl + * @memberof google.logging.v2.IndexConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IndexConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.IndexConfig"; + }; + + return IndexConfig; + })(); + + v2.LogBucket = (function() { + + /** + * Properties of a LogBucket. + * @memberof google.logging.v2 + * @interface ILogBucket + * @property {string|null} [name] LogBucket name + * @property {string|null} [description] LogBucket description + * @property {google.protobuf.ITimestamp|null} [createTime] LogBucket createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogBucket updateTime + * @property {number|null} [retentionDays] LogBucket retentionDays + * @property {boolean|null} [locked] LogBucket locked + * @property {google.logging.v2.LifecycleState|null} [lifecycleState] LogBucket lifecycleState + * @property {boolean|null} [analyticsEnabled] LogBucket analyticsEnabled + * @property {Array.|null} [restrictedFields] LogBucket restrictedFields + * @property {Array.|null} [indexConfigs] LogBucket indexConfigs + * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] LogBucket cmekSettings + */ + + /** + * Constructs a new LogBucket. + * @memberof google.logging.v2 + * @classdesc Represents a LogBucket. + * @implements ILogBucket + * @constructor + * @param {google.logging.v2.ILogBucket=} [properties] Properties to set + */ + function LogBucket(properties) { + this.restrictedFields = []; + this.indexConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogBucket name. + * @member {string} name + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.name = ""; + + /** + * LogBucket description. + * @member {string} description + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.description = ""; + + /** + * LogBucket createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.createTime = null; + + /** + * LogBucket updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.updateTime = null; + + /** + * LogBucket retentionDays. + * @member {number} retentionDays + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.retentionDays = 0; + + /** + * LogBucket locked. + * @member {boolean} locked + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.locked = false; + + /** + * LogBucket lifecycleState. + * @member {google.logging.v2.LifecycleState} lifecycleState + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.lifecycleState = 0; + + /** + * LogBucket analyticsEnabled. + * @member {boolean} analyticsEnabled + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.analyticsEnabled = false; + + /** + * LogBucket restrictedFields. + * @member {Array.} restrictedFields + * @memberof google.logging.v2.LogBucket + * @instance */ LogBucket.prototype.restrictedFields = $util.emptyArray; + /** + * LogBucket indexConfigs. + * @member {Array.} indexConfigs + * @memberof google.logging.v2.LogBucket + * @instance + */ + LogBucket.prototype.indexConfigs = $util.emptyArray; + /** * LogBucket cmekSettings. * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings @@ -18249,9 +18745,14 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.retentionDays); if (message.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.lifecycleState); + if (message.analyticsEnabled != null && Object.hasOwnProperty.call(message, "analyticsEnabled")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.analyticsEnabled); if (message.restrictedFields != null && message.restrictedFields.length) for (var i = 0; i < message.restrictedFields.length; ++i) writer.uint32(/* id 15, wireType 2 =*/122).string(message.restrictedFields[i]); + if (message.indexConfigs != null && message.indexConfigs.length) + for (var i = 0; i < message.indexConfigs.length; ++i) + $root.google.logging.v2.IndexConfig.encode(message.indexConfigs[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.cmekSettings != null && Object.hasOwnProperty.call(message, "cmekSettings")) $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; @@ -18316,12 +18817,22 @@ message.lifecycleState = reader.int32(); break; } + case 14: { + message.analyticsEnabled = reader.bool(); + break; + } case 15: { if (!(message.restrictedFields && message.restrictedFields.length)) message.restrictedFields = []; message.restrictedFields.push(reader.string()); break; } + case 17: { + if (!(message.indexConfigs && message.indexConfigs.length)) + message.indexConfigs = []; + message.indexConfigs.push($root.google.logging.v2.IndexConfig.decode(reader, reader.uint32())); + break; + } case 19: { message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); break; @@ -18390,8 +18901,14 @@ case 0: case 1: case 2: + case 3: + case 4: + case 5: break; } + if (message.analyticsEnabled != null && message.hasOwnProperty("analyticsEnabled")) + if (typeof message.analyticsEnabled !== "boolean") + return "analyticsEnabled: boolean expected"; if (message.restrictedFields != null && message.hasOwnProperty("restrictedFields")) { if (!Array.isArray(message.restrictedFields)) return "restrictedFields: array expected"; @@ -18399,6 +18916,15 @@ if (!$util.isString(message.restrictedFields[i])) return "restrictedFields: string[] expected"; } + if (message.indexConfigs != null && message.hasOwnProperty("indexConfigs")) { + if (!Array.isArray(message.indexConfigs)) + return "indexConfigs: array expected"; + for (var i = 0; i < message.indexConfigs.length; ++i) { + var error = $root.google.logging.v2.IndexConfig.verify(message.indexConfigs[i]); + if (error) + return "indexConfigs." + error; + } + } if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); if (error) @@ -18456,7 +18982,21 @@ case 2: message.lifecycleState = 2; break; + case "UPDATING": + case 3: + message.lifecycleState = 3; + break; + case "CREATING": + case 4: + message.lifecycleState = 4; + break; + case "FAILED": + case 5: + message.lifecycleState = 5; + break; } + if (object.analyticsEnabled != null) + message.analyticsEnabled = Boolean(object.analyticsEnabled); if (object.restrictedFields) { if (!Array.isArray(object.restrictedFields)) throw TypeError(".google.logging.v2.LogBucket.restrictedFields: array expected"); @@ -18464,6 +19004,16 @@ for (var i = 0; i < object.restrictedFields.length; ++i) message.restrictedFields[i] = String(object.restrictedFields[i]); } + if (object.indexConfigs) { + if (!Array.isArray(object.indexConfigs)) + throw TypeError(".google.logging.v2.LogBucket.indexConfigs: array expected"); + message.indexConfigs = []; + for (var i = 0; i < object.indexConfigs.length; ++i) { + if (typeof object.indexConfigs[i] !== "object") + throw TypeError(".google.logging.v2.LogBucket.indexConfigs: object expected"); + message.indexConfigs[i] = $root.google.logging.v2.IndexConfig.fromObject(object.indexConfigs[i]); + } + } if (object.cmekSettings != null) { if (typeof object.cmekSettings !== "object") throw TypeError(".google.logging.v2.LogBucket.cmekSettings: object expected"); @@ -18485,8 +19035,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.restrictedFields = []; + object.indexConfigs = []; + } if (options.defaults) { object.name = ""; object.description = ""; @@ -18495,6 +19047,7 @@ object.locked = false; object.retentionDays = 0; object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; + object.analyticsEnabled = false; object.cmekSettings = null; } if (message.name != null && message.hasOwnProperty("name")) @@ -18511,11 +19064,18 @@ object.retentionDays = message.retentionDays; if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] === undefined ? message.lifecycleState : $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; + if (message.analyticsEnabled != null && message.hasOwnProperty("analyticsEnabled")) + object.analyticsEnabled = message.analyticsEnabled; if (message.restrictedFields && message.restrictedFields.length) { object.restrictedFields = []; for (var j = 0; j < message.restrictedFields.length; ++j) object.restrictedFields[j] = message.restrictedFields[j]; } + if (message.indexConfigs && message.indexConfigs.length) { + object.indexConfigs = []; + for (var j = 0; j < message.indexConfigs.length; ++j) + object.indexConfigs[j] = $root.google.logging.v2.IndexConfig.toObject(message.indexConfigs[j], options); + } if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); return object; @@ -19410,25 +19970,24 @@ return LogSink; })(); - v2.BigQueryOptions = (function() { + v2.BigQueryDataset = (function() { /** - * Properties of a BigQueryOptions. + * Properties of a BigQueryDataset. * @memberof google.logging.v2 - * @interface IBigQueryOptions - * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables - * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning + * @interface IBigQueryDataset + * @property {string|null} [datasetId] BigQueryDataset datasetId */ /** - * Constructs a new BigQueryOptions. + * Constructs a new BigQueryDataset. * @memberof google.logging.v2 - * @classdesc Represents a BigQueryOptions. - * @implements IBigQueryOptions + * @classdesc Represents a BigQueryDataset. + * @implements IBigQueryDataset * @constructor - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @param {google.logging.v2.IBigQueryDataset=} [properties] Properties to set */ - function BigQueryOptions(properties) { + function BigQueryDataset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19436,89 +19995,75 @@ } /** - * BigQueryOptions usePartitionedTables. - * @member {boolean} usePartitionedTables - * @memberof google.logging.v2.BigQueryOptions - * @instance - */ - BigQueryOptions.prototype.usePartitionedTables = false; - - /** - * BigQueryOptions usesTimestampColumnPartitioning. - * @member {boolean} usesTimestampColumnPartitioning - * @memberof google.logging.v2.BigQueryOptions + * BigQueryDataset datasetId. + * @member {string} datasetId + * @memberof google.logging.v2.BigQueryDataset * @instance */ - BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; + BigQueryDataset.prototype.datasetId = ""; /** - * Creates a new BigQueryOptions instance using the specified properties. + * Creates a new BigQueryDataset instance using the specified properties. * @function create - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static - * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance + * @param {google.logging.v2.IBigQueryDataset=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryDataset} BigQueryDataset instance */ - BigQueryOptions.create = function create(properties) { - return new BigQueryOptions(properties); + BigQueryDataset.create = function create(properties) { + return new BigQueryDataset(properties); }; /** - * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified BigQueryDataset message. Does not implicitly {@link google.logging.v2.BigQueryDataset.verify|verify} messages. * @function encode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IBigQueryDataset} message BigQueryDataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encode = function encode(message, writer) { + BigQueryDataset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usePartitionedTables != null && Object.hasOwnProperty.call(message, "usePartitionedTables")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); - if (message.usesTimestampColumnPartitioning != null && Object.hasOwnProperty.call(message, "usesTimestampColumnPartitioning")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); return writer; }; /** - * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. + * Encodes the specified BigQueryDataset message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryDataset.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static - * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {google.logging.v2.IBigQueryDataset} message BigQueryDataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryDataset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer. + * Decodes a BigQueryDataset message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.BigQueryDataset} BigQueryDataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decode = function decode(reader, length) { + BigQueryDataset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryDataset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.usePartitionedTables = reader.bool(); - break; - } - case 3: { - message.usesTimestampColumnPartitioning = reader.bool(); + message.datasetId = reader.string(); break; } default: @@ -19530,133 +20075,126 @@ }; /** - * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * Decodes a BigQueryDataset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.BigQueryDataset} BigQueryDataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + BigQueryDataset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryOptions message. + * Verifies a BigQueryDataset message. * @function verify - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryOptions.verify = function verify(message) { + BigQueryDataset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - if (typeof message.usePartitionedTables !== "boolean") - return "usePartitionedTables: boolean expected"; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - if (typeof message.usesTimestampColumnPartitioning !== "boolean") - return "usesTimestampColumnPartitioning: boolean expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; return null; }; /** - * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryDataset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions + * @returns {google.logging.v2.BigQueryDataset} BigQueryDataset */ - BigQueryOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.BigQueryOptions) + BigQueryDataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryDataset) return object; - var message = new $root.google.logging.v2.BigQueryOptions(); - if (object.usePartitionedTables != null) - message.usePartitionedTables = Boolean(object.usePartitionedTables); - if (object.usesTimestampColumnPartitioning != null) - message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); + var message = new $root.google.logging.v2.BigQueryDataset(); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); return message; }; /** - * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryDataset message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static - * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions + * @param {google.logging.v2.BigQueryDataset} message BigQueryDataset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryOptions.toObject = function toObject(message, options) { + BigQueryDataset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.usePartitionedTables = false; - object.usesTimestampColumnPartitioning = false; - } - if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) - object.usePartitionedTables = message.usePartitionedTables; - if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) - object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; + if (options.defaults) + object.datasetId = ""; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; return object; }; /** - * Converts this BigQueryOptions to JSON. + * Converts this BigQueryDataset to JSON. * @function toJSON - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @instance * @returns {Object.} JSON object */ - BigQueryOptions.prototype.toJSON = function toJSON() { + BigQueryDataset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryOptions + * Gets the default type url for BigQueryDataset * @function getTypeUrl - * @memberof google.logging.v2.BigQueryOptions + * @memberof google.logging.v2.BigQueryDataset * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQueryDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.BigQueryOptions"; + return typeUrlPrefix + "/google.logging.v2.BigQueryDataset"; }; - return BigQueryOptions; + return BigQueryDataset; })(); - v2.ListBucketsRequest = (function() { + v2.Link = (function() { /** - * Properties of a ListBucketsRequest. + * Properties of a Link. * @memberof google.logging.v2 - * @interface IListBucketsRequest - * @property {string|null} [parent] ListBucketsRequest parent - * @property {string|null} [pageToken] ListBucketsRequest pageToken - * @property {number|null} [pageSize] ListBucketsRequest pageSize + * @interface ILink + * @property {string|null} [name] Link name + * @property {string|null} [description] Link description + * @property {google.protobuf.ITimestamp|null} [createTime] Link createTime + * @property {google.logging.v2.LifecycleState|null} [lifecycleState] Link lifecycleState + * @property {google.logging.v2.IBigQueryDataset|null} [bigqueryDataset] Link bigqueryDataset */ /** - * Constructs a new ListBucketsRequest. + * Constructs a new Link. * @memberof google.logging.v2 - * @classdesc Represents a ListBucketsRequest. - * @implements IListBucketsRequest + * @classdesc Represents a Link. + * @implements ILink * @constructor - * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + * @param {google.logging.v2.ILink=} [properties] Properties to set */ - function ListBucketsRequest(properties) { + function Link(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19664,103 +20202,131 @@ } /** - * ListBucketsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListBucketsRequest + * Link name. + * @member {string} name + * @memberof google.logging.v2.Link * @instance */ - ListBucketsRequest.prototype.parent = ""; + Link.prototype.name = ""; /** - * ListBucketsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListBucketsRequest + * Link description. + * @member {string} description + * @memberof google.logging.v2.Link * @instance */ - ListBucketsRequest.prototype.pageToken = ""; + Link.prototype.description = ""; /** - * ListBucketsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListBucketsRequest + * Link createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.Link * @instance */ - ListBucketsRequest.prototype.pageSize = 0; + Link.prototype.createTime = null; /** - * Creates a new ListBucketsRequest instance using the specified properties. + * Link lifecycleState. + * @member {google.logging.v2.LifecycleState} lifecycleState + * @memberof google.logging.v2.Link + * @instance + */ + Link.prototype.lifecycleState = 0; + + /** + * Link bigqueryDataset. + * @member {google.logging.v2.IBigQueryDataset|null|undefined} bigqueryDataset + * @memberof google.logging.v2.Link + * @instance + */ + Link.prototype.bigqueryDataset = null; + + /** + * Creates a new Link instance using the specified properties. * @function create - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static - * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance + * @param {google.logging.v2.ILink=} [properties] Properties to set + * @returns {google.logging.v2.Link} Link instance */ - ListBucketsRequest.create = function create(properties) { - return new ListBucketsRequest(properties); + Link.create = function create(properties) { + return new Link(properties); }; /** - * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * Encodes the specified Link message. Does not implicitly {@link google.logging.v2.Link.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static - * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {google.logging.v2.ILink} message Link message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsRequest.encode = function encode(message, writer) { + Link.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.lifecycleState); + if (message.bigqueryDataset != null && Object.hasOwnProperty.call(message, "bigqueryDataset")) + $root.google.logging.v2.BigQueryDataset.encode(message.bigqueryDataset, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. + * Encodes the specified Link message, length delimited. Does not implicitly {@link google.logging.v2.Link.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static - * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode + * @param {google.logging.v2.ILink} message Link message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Link.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer. + * Decodes a Link message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.Link} Link * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsRequest.decode = function decode(reader, length) { + Link.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.Link(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageToken = reader.string(); + message.description = reader.string(); break; } case 3: { - message.pageSize = reader.int32(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lifecycleState = reader.int32(); + break; + } + case 5: { + message.bigqueryDataset = $root.google.logging.v2.BigQueryDataset.decode(reader, reader.uint32()); break; } default: @@ -19772,141 +20338,205 @@ }; /** - * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. + * Decodes a Link message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.Link} Link * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { + Link.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBucketsRequest message. + * Verifies a Link message. * @function verify - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBucketsRequest.verify = function verify(message) { + Link.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + switch (message.lifecycleState) { + default: + return "lifecycleState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.bigqueryDataset != null && message.hasOwnProperty("bigqueryDataset")) { + var error = $root.google.logging.v2.BigQueryDataset.verify(message.bigqueryDataset); + if (error) + return "bigqueryDataset." + error; + } return null; }; /** - * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Link message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest + * @returns {google.logging.v2.Link} Link */ - ListBucketsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListBucketsRequest) + Link.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.Link) return object; - var message = new $root.google.logging.v2.ListBucketsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.Link(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.Link.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + switch (object.lifecycleState) { + default: + if (typeof object.lifecycleState === "number") { + message.lifecycleState = object.lifecycleState; + break; + } + break; + case "LIFECYCLE_STATE_UNSPECIFIED": + case 0: + message.lifecycleState = 0; + break; + case "ACTIVE": + case 1: + message.lifecycleState = 1; + break; + case "DELETE_REQUESTED": + case 2: + message.lifecycleState = 2; + break; + case "UPDATING": + case 3: + message.lifecycleState = 3; + break; + case "CREATING": + case 4: + message.lifecycleState = 4; + break; + case "FAILED": + case 5: + message.lifecycleState = 5; + break; + } + if (object.bigqueryDataset != null) { + if (typeof object.bigqueryDataset !== "object") + throw TypeError(".google.logging.v2.Link.bigqueryDataset: object expected"); + message.bigqueryDataset = $root.google.logging.v2.BigQueryDataset.fromObject(object.bigqueryDataset); + } return message; }; /** - * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. + * Creates a plain object from a Link message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static - * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest + * @param {google.logging.v2.Link} message Link * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBucketsRequest.toObject = function toObject(message, options) { + Link.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.name = ""; + object.description = ""; + object.createTime = null; + object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; + object.bigqueryDataset = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + object.lifecycleState = options.enums === String ? $root.google.logging.v2.LifecycleState[message.lifecycleState] === undefined ? message.lifecycleState : $root.google.logging.v2.LifecycleState[message.lifecycleState] : message.lifecycleState; + if (message.bigqueryDataset != null && message.hasOwnProperty("bigqueryDataset")) + object.bigqueryDataset = $root.google.logging.v2.BigQueryDataset.toObject(message.bigqueryDataset, options); return object; }; /** - * Converts this ListBucketsRequest to JSON. + * Converts this Link to JSON. * @function toJSON - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @instance * @returns {Object.} JSON object */ - ListBucketsRequest.prototype.toJSON = function toJSON() { + Link.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBucketsRequest + * Gets the default type url for Link * @function getTypeUrl - * @memberof google.logging.v2.ListBucketsRequest + * @memberof google.logging.v2.Link * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBucketsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.ListBucketsRequest"; + return typeUrlPrefix + "/google.logging.v2.Link"; }; - return ListBucketsRequest; + return Link; })(); - v2.ListBucketsResponse = (function() { + v2.BigQueryOptions = (function() { /** - * Properties of a ListBucketsResponse. + * Properties of a BigQueryOptions. * @memberof google.logging.v2 - * @interface IListBucketsResponse - * @property {Array.|null} [buckets] ListBucketsResponse buckets - * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken + * @interface IBigQueryOptions + * @property {boolean|null} [usePartitionedTables] BigQueryOptions usePartitionedTables + * @property {boolean|null} [usesTimestampColumnPartitioning] BigQueryOptions usesTimestampColumnPartitioning */ /** - * Constructs a new ListBucketsResponse. + * Constructs a new BigQueryOptions. * @memberof google.logging.v2 - * @classdesc Represents a ListBucketsResponse. - * @implements IListBucketsResponse + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions * @constructor - * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set */ - function ListBucketsResponse(properties) { - this.buckets = []; + function BigQueryOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19914,92 +20544,89 @@ } /** - * ListBucketsResponse buckets. - * @member {Array.} buckets - * @memberof google.logging.v2.ListBucketsResponse + * BigQueryOptions usePartitionedTables. + * @member {boolean} usePartitionedTables + * @memberof google.logging.v2.BigQueryOptions * @instance */ - ListBucketsResponse.prototype.buckets = $util.emptyArray; + BigQueryOptions.prototype.usePartitionedTables = false; /** - * ListBucketsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListBucketsResponse + * BigQueryOptions usesTimestampColumnPartitioning. + * @member {boolean} usesTimestampColumnPartitioning + * @memberof google.logging.v2.BigQueryOptions * @instance */ - ListBucketsResponse.prototype.nextPageToken = ""; + BigQueryOptions.prototype.usesTimestampColumnPartitioning = false; /** - * Creates a new ListBucketsResponse instance using the specified properties. + * Creates a new BigQueryOptions instance using the specified properties. * @function create - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance + * @param {google.logging.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions instance */ - ListBucketsResponse.create = function create(properties) { - return new ListBucketsResponse(properties); + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); }; /** - * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsResponse.encode = function encode(message, writer) { + BigQueryOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.buckets != null && message.buckets.length) - for (var i = 0; i < message.buckets.length; ++i) - $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.usePartitionedTables != null && Object.hasOwnProperty.call(message, "usePartitionedTables")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usePartitionedTables); + if (message.usesTimestampColumnPartitioning != null && Object.hasOwnProperty.call(message, "usesTimestampColumnPartitioning")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.usesTimestampColumnPartitioning); return writer; }; /** - * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.logging.v2.BigQueryOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode + * @param {google.logging.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBucketsResponse message from the specified reader or buffer. + * Decodes a BigQueryOptions message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsResponse.decode = function decode(reader, length) { + BigQueryOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.buckets && message.buckets.length)) - message.buckets = []; - message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); + message.usePartitionedTables = reader.bool(); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + message.usesTimestampColumnPartitioning = reader.bool(); break; } default: @@ -20011,150 +20638,133 @@ }; /** - * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBucketsResponse message. + * Verifies a BigQueryOptions message. * @function verify - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBucketsResponse.verify = function verify(message) { + BigQueryOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.buckets != null && message.hasOwnProperty("buckets")) { - if (!Array.isArray(message.buckets)) - return "buckets: array expected"; - for (var i = 0; i < message.buckets.length; ++i) { - var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); - if (error) - return "buckets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + if (typeof message.usePartitionedTables !== "boolean") + return "usePartitionedTables: boolean expected"; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + if (typeof message.usesTimestampColumnPartitioning !== "boolean") + return "usesTimestampColumnPartitioning: boolean expected"; return null; }; /** - * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse + * @returns {google.logging.v2.BigQueryOptions} BigQueryOptions */ - ListBucketsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListBucketsResponse) + BigQueryOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BigQueryOptions) return object; - var message = new $root.google.logging.v2.ListBucketsResponse(); - if (object.buckets) { - if (!Array.isArray(object.buckets)) - throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); - message.buckets = []; - for (var i = 0; i < object.buckets.length; ++i) { - if (typeof object.buckets[i] !== "object") - throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); - message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.BigQueryOptions(); + if (object.usePartitionedTables != null) + message.usePartitionedTables = Boolean(object.usePartitionedTables); + if (object.usesTimestampColumnPartitioning != null) + message.usesTimestampColumnPartitioning = Boolean(object.usesTimestampColumnPartitioning); return message; }; /** - * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static - * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse + * @param {google.logging.v2.BigQueryOptions} message BigQueryOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBucketsResponse.toObject = function toObject(message, options) { + BigQueryOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.buckets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.buckets && message.buckets.length) { - object.buckets = []; - for (var j = 0; j < message.buckets.length; ++j) - object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); + if (options.defaults) { + object.usePartitionedTables = false; + object.usesTimestampColumnPartitioning = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.usePartitionedTables != null && message.hasOwnProperty("usePartitionedTables")) + object.usePartitionedTables = message.usePartitionedTables; + if (message.usesTimestampColumnPartitioning != null && message.hasOwnProperty("usesTimestampColumnPartitioning")) + object.usesTimestampColumnPartitioning = message.usesTimestampColumnPartitioning; return object; }; /** - * Converts this ListBucketsResponse to JSON. + * Converts this BigQueryOptions to JSON. * @function toJSON - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @instance * @returns {Object.} JSON object */ - ListBucketsResponse.prototype.toJSON = function toJSON() { + BigQueryOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBucketsResponse + * Gets the default type url for BigQueryOptions * @function getTypeUrl - * @memberof google.logging.v2.ListBucketsResponse + * @memberof google.logging.v2.BigQueryOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBucketsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQueryOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.ListBucketsResponse"; + return typeUrlPrefix + "/google.logging.v2.BigQueryOptions"; }; - return ListBucketsResponse; + return BigQueryOptions; })(); - v2.CreateBucketRequest = (function() { + v2.ListBucketsRequest = (function() { /** - * Properties of a CreateBucketRequest. + * Properties of a ListBucketsRequest. * @memberof google.logging.v2 - * @interface ICreateBucketRequest - * @property {string|null} [parent] CreateBucketRequest parent - * @property {string|null} [bucketId] CreateBucketRequest bucketId - * @property {google.logging.v2.ILogBucket|null} [bucket] CreateBucketRequest bucket + * @interface IListBucketsRequest + * @property {string|null} [parent] ListBucketsRequest parent + * @property {string|null} [pageToken] ListBucketsRequest pageToken + * @property {number|null} [pageSize] ListBucketsRequest pageSize */ /** - * Constructs a new CreateBucketRequest. + * Constructs a new ListBucketsRequest. * @memberof google.logging.v2 - * @classdesc Represents a CreateBucketRequest. - * @implements ICreateBucketRequest + * @classdesc Represents a ListBucketsRequest. + * @implements IListBucketsRequest * @constructor - * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set */ - function CreateBucketRequest(properties) { + function ListBucketsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20162,90 +20772,90 @@ } /** - * CreateBucketRequest parent. + * ListBucketsRequest parent. * @member {string} parent - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @instance */ - CreateBucketRequest.prototype.parent = ""; + ListBucketsRequest.prototype.parent = ""; /** - * CreateBucketRequest bucketId. - * @member {string} bucketId - * @memberof google.logging.v2.CreateBucketRequest + * ListBucketsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListBucketsRequest * @instance */ - CreateBucketRequest.prototype.bucketId = ""; + ListBucketsRequest.prototype.pageToken = ""; /** - * CreateBucketRequest bucket. - * @member {google.logging.v2.ILogBucket|null|undefined} bucket - * @memberof google.logging.v2.CreateBucketRequest + * ListBucketsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListBucketsRequest * @instance */ - CreateBucketRequest.prototype.bucket = null; + ListBucketsRequest.prototype.pageSize = 0; /** - * Creates a new CreateBucketRequest instance using the specified properties. + * Creates a new ListBucketsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static - * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest instance + * @param {google.logging.v2.IListBucketsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest instance */ - CreateBucketRequest.create = function create(properties) { - return new CreateBucketRequest(properties); + ListBucketsRequest.create = function create(properties) { + return new ListBucketsRequest(properties); }; /** - * Encodes the specified CreateBucketRequest message. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. + * Encodes the specified ListBucketsRequest message. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static - * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBucketRequest.encode = function encode(message, writer) { + ListBucketsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.bucketId != null && Object.hasOwnProperty.call(message, "bucketId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketId); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified CreateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. + * Encodes the specified ListBucketsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static - * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode + * @param {google.logging.v2.IListBucketsRequest} message ListBucketsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBucketsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateBucketRequest message from the specified reader or buffer. + * Decodes a ListBucketsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBucketRequest.decode = function decode(reader, length) { + ListBucketsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20254,11 +20864,11 @@ break; } case 2: { - message.bucketId = reader.string(); + message.pageToken = reader.string(); break; } case 3: { - message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } default: @@ -20270,146 +20880,141 @@ }; /** - * Decodes a CreateBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBucketRequest.decodeDelimited = function decodeDelimited(reader) { + ListBucketsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateBucketRequest message. + * Verifies a ListBucketsRequest message. * @function verify - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateBucketRequest.verify = function verify(message) { + ListBucketsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.bucketId != null && message.hasOwnProperty("bucketId")) - if (!$util.isString(message.bucketId)) - return "bucketId: string expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) { - var error = $root.google.logging.v2.LogBucket.verify(message.bucket); - if (error) - return "bucket." + error; - } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a CreateBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest + * @returns {google.logging.v2.ListBucketsRequest} ListBucketsRequest */ - CreateBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateBucketRequest) + ListBucketsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsRequest) return object; - var message = new $root.google.logging.v2.CreateBucketRequest(); + var message = new $root.google.logging.v2.ListBucketsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.bucketId != null) - message.bucketId = String(object.bucketId); - if (object.bucket != null) { - if (typeof object.bucket !== "object") - throw TypeError(".google.logging.v2.CreateBucketRequest.bucket: object expected"); - message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); - } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a CreateBucketRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBucketsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static - * @param {google.logging.v2.CreateBucketRequest} message CreateBucketRequest + * @param {google.logging.v2.ListBucketsRequest} message ListBucketsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBucketRequest.toObject = function toObject(message, options) { + ListBucketsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.bucketId = ""; - object.bucket = null; + object.pageToken = ""; + object.pageSize = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.bucketId != null && message.hasOwnProperty("bucketId")) - object.bucketId = message.bucketId; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this CreateBucketRequest to JSON. + * Converts this ListBucketsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @instance * @returns {Object.} JSON object */ - CreateBucketRequest.prototype.toJSON = function toJSON() { + ListBucketsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateBucketRequest + * Gets the default type url for ListBucketsRequest * @function getTypeUrl - * @memberof google.logging.v2.CreateBucketRequest + * @memberof google.logging.v2.ListBucketsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBucketsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.CreateBucketRequest"; + return typeUrlPrefix + "/google.logging.v2.ListBucketsRequest"; }; - return CreateBucketRequest; + return ListBucketsRequest; })(); - v2.UpdateBucketRequest = (function() { + v2.ListBucketsResponse = (function() { /** - * Properties of an UpdateBucketRequest. + * Properties of a ListBucketsResponse. * @memberof google.logging.v2 - * @interface IUpdateBucketRequest - * @property {string|null} [name] UpdateBucketRequest name - * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask + * @interface IListBucketsResponse + * @property {Array.|null} [buckets] ListBucketsResponse buckets + * @property {string|null} [nextPageToken] ListBucketsResponse nextPageToken */ /** - * Constructs a new UpdateBucketRequest. + * Constructs a new ListBucketsResponse. * @memberof google.logging.v2 - * @classdesc Represents an UpdateBucketRequest. - * @implements IUpdateBucketRequest + * @classdesc Represents a ListBucketsResponse. + * @implements IListBucketsResponse * @constructor - * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set */ - function UpdateBucketRequest(properties) { + function ListBucketsResponse(properties) { + this.buckets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20417,103 +21022,92 @@ } /** - * UpdateBucketRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateBucketRequest - * @instance - */ - UpdateBucketRequest.prototype.name = ""; - - /** - * UpdateBucketRequest bucket. - * @member {google.logging.v2.ILogBucket|null|undefined} bucket - * @memberof google.logging.v2.UpdateBucketRequest + * ListBucketsResponse buckets. + * @member {Array.} buckets + * @memberof google.logging.v2.ListBucketsResponse * @instance */ - UpdateBucketRequest.prototype.bucket = null; + ListBucketsResponse.prototype.buckets = $util.emptyArray; /** - * UpdateBucketRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateBucketRequest + * ListBucketsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListBucketsResponse * @instance */ - UpdateBucketRequest.prototype.updateMask = null; + ListBucketsResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateBucketRequest instance using the specified properties. + * Creates a new ListBucketsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance + * @param {google.logging.v2.IListBucketsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse instance */ - UpdateBucketRequest.create = function create(properties) { - return new UpdateBucketRequest(properties); + ListBucketsResponse.create = function create(properties) { + return new ListBucketsResponse(properties); }; /** - * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * Encodes the specified ListBucketsResponse message. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBucketRequest.encode = function encode(message, writer) { + ListBucketsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.buckets != null && message.buckets.length) + for (var i = 0; i < message.buckets.length; ++i) + $root.google.logging.v2.LogBucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. + * Encodes the specified ListBucketsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListBucketsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode + * @param {google.logging.v2.IListBucketsResponse} message ListBucketsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBucketsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer. + * Decodes a ListBucketsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBucketRequest.decode = function decode(reader, length) { + ListBucketsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.logging.v2.LogBucket.decode(reader, reader.uint32())); break; } case 2: { - message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -20525,149 +21119,150 @@ }; /** - * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBucketsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { + ListBucketsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateBucketRequest message. + * Verifies a ListBucketsResponse message. * @function verify - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateBucketRequest.verify = function verify(message) { + ListBucketsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) { - var error = $root.google.logging.v2.LogBucket.verify(message.bucket); - if (error) - return "bucket." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!Array.isArray(message.buckets)) + return "buckets: array expected"; + for (var i = 0; i < message.buckets.length; ++i) { + var error = $root.google.logging.v2.LogBucket.verify(message.buckets[i]); + if (error) + return "buckets." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBucketsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest + * @returns {google.logging.v2.ListBucketsResponse} ListBucketsResponse */ - UpdateBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateBucketRequest) + ListBucketsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListBucketsResponse) return object; - var message = new $root.google.logging.v2.UpdateBucketRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.bucket != null) { - if (typeof object.bucket !== "object") - throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); - message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.logging.v2.ListBucketsResponse(); + if (object.buckets) { + if (!Array.isArray(object.buckets)) + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: array expected"); + message.buckets = []; + for (var i = 0; i < object.buckets.length; ++i) { + if (typeof object.buckets[i] !== "object") + throw TypeError(".google.logging.v2.ListBucketsResponse.buckets: object expected"); + message.buckets[i] = $root.google.logging.v2.LogBucket.fromObject(object.buckets[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBucketsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static - * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest + * @param {google.logging.v2.ListBucketsResponse} message ListBucketsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateBucketRequest.toObject = function toObject(message, options) { + ListBucketsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.bucket = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.buckets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.buckets && message.buckets.length) { + object.buckets = []; + for (var j = 0; j < message.buckets.length; ++j) + object.buckets[j] = $root.google.logging.v2.LogBucket.toObject(message.buckets[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateBucketRequest to JSON. + * Converts this ListBucketsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @instance * @returns {Object.} JSON object */ - UpdateBucketRequest.prototype.toJSON = function toJSON() { + ListBucketsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateBucketRequest + * Gets the default type url for ListBucketsResponse * @function getTypeUrl - * @memberof google.logging.v2.UpdateBucketRequest + * @memberof google.logging.v2.ListBucketsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBucketsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.UpdateBucketRequest"; + return typeUrlPrefix + "/google.logging.v2.ListBucketsResponse"; }; - return UpdateBucketRequest; + return ListBucketsResponse; })(); - v2.GetBucketRequest = (function() { + v2.CreateBucketRequest = (function() { /** - * Properties of a GetBucketRequest. + * Properties of a CreateBucketRequest. * @memberof google.logging.v2 - * @interface IGetBucketRequest - * @property {string|null} [name] GetBucketRequest name + * @interface ICreateBucketRequest + * @property {string|null} [parent] CreateBucketRequest parent + * @property {string|null} [bucketId] CreateBucketRequest bucketId + * @property {google.logging.v2.ILogBucket|null} [bucket] CreateBucketRequest bucket */ /** - * Constructs a new GetBucketRequest. + * Constructs a new CreateBucketRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetBucketRequest. - * @implements IGetBucketRequest + * @classdesc Represents a CreateBucketRequest. + * @implements ICreateBucketRequest * @constructor - * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set */ - function GetBucketRequest(properties) { + function CreateBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20675,75 +21270,103 @@ } /** - * GetBucketRequest name. - * @member {string} name - * @memberof google.logging.v2.GetBucketRequest + * CreateBucketRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateBucketRequest * @instance */ - GetBucketRequest.prototype.name = ""; + CreateBucketRequest.prototype.parent = ""; /** - * Creates a new GetBucketRequest instance using the specified properties. + * CreateBucketRequest bucketId. + * @member {string} bucketId + * @memberof google.logging.v2.CreateBucketRequest + * @instance + */ + CreateBucketRequest.prototype.bucketId = ""; + + /** + * CreateBucketRequest bucket. + * @member {google.logging.v2.ILogBucket|null|undefined} bucket + * @memberof google.logging.v2.CreateBucketRequest + * @instance + */ + CreateBucketRequest.prototype.bucket = null; + + /** + * Creates a new CreateBucketRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static - * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance + * @param {google.logging.v2.ICreateBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest instance */ - GetBucketRequest.create = function create(properties) { - return new GetBucketRequest(properties); + CreateBucketRequest.create = function create(properties) { + return new CreateBucketRequest(properties); }; /** - * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * Encodes the specified CreateBucketRequest message. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static - * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBucketRequest.encode = function encode(message, writer) { + CreateBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.bucketId != null && Object.hasOwnProperty.call(message, "bucketId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketId); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. + * Encodes the specified CreateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static - * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode + * @param {google.logging.v2.ICreateBucketRequest} message CreateBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBucketRequest message from the specified reader or buffer. + * Decodes a CreateBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBucketRequest.decode = function decode(reader, length) { + CreateBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.bucketId = reader.string(); + break; + } + case 3: { + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); break; } default: @@ -20755,122 +21378,146 @@ }; /** - * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { + CreateBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBucketRequest message. + * Verifies a CreateBucketRequest message. * @function verify - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBucketRequest.verify = function verify(message) { + CreateBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.bucketId != null && message.hasOwnProperty("bucketId")) + if (!$util.isString(message.bucketId)) + return "bucketId: string expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + var error = $root.google.logging.v2.LogBucket.verify(message.bucket); + if (error) + return "bucket." + error; + } return null; }; /** - * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest + * @returns {google.logging.v2.CreateBucketRequest} CreateBucketRequest */ - GetBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetBucketRequest) + CreateBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateBucketRequest) return object; - var message = new $root.google.logging.v2.GetBucketRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. + var message = new $root.google.logging.v2.CreateBucketRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.bucketId != null) + message.bucketId = String(object.bucketId); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.logging.v2.CreateBucketRequest.bucket: object expected"); + message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); + } + return message; + }; + + /** + * Creates a plain object from a CreateBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static - * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest + * @param {google.logging.v2.CreateBucketRequest} message CreateBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBucketRequest.toObject = function toObject(message, options) { + CreateBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.bucketId = ""; + object.bucket = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.bucketId != null && message.hasOwnProperty("bucketId")) + object.bucketId = message.bucketId; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); return object; }; /** - * Converts this GetBucketRequest to JSON. + * Converts this CreateBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @instance * @returns {Object.} JSON object */ - GetBucketRequest.prototype.toJSON = function toJSON() { + CreateBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBucketRequest + * Gets the default type url for CreateBucketRequest * @function getTypeUrl - * @memberof google.logging.v2.GetBucketRequest + * @memberof google.logging.v2.CreateBucketRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.GetBucketRequest"; + return typeUrlPrefix + "/google.logging.v2.CreateBucketRequest"; }; - return GetBucketRequest; + return CreateBucketRequest; })(); - v2.DeleteBucketRequest = (function() { + v2.UpdateBucketRequest = (function() { /** - * Properties of a DeleteBucketRequest. + * Properties of an UpdateBucketRequest. * @memberof google.logging.v2 - * @interface IDeleteBucketRequest - * @property {string|null} [name] DeleteBucketRequest name + * @interface IUpdateBucketRequest + * @property {string|null} [name] UpdateBucketRequest name + * @property {google.logging.v2.ILogBucket|null} [bucket] UpdateBucketRequest bucket + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBucketRequest updateMask */ /** - * Constructs a new DeleteBucketRequest. + * Constructs a new UpdateBucketRequest. * @memberof google.logging.v2 - * @classdesc Represents a DeleteBucketRequest. - * @implements IDeleteBucketRequest + * @classdesc Represents an UpdateBucketRequest. + * @implements IUpdateBucketRequest * @constructor - * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set */ - function DeleteBucketRequest(properties) { + function UpdateBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20878,70 +21525,90 @@ } /** - * DeleteBucketRequest name. + * UpdateBucketRequest name. * @member {string} name - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @instance */ - DeleteBucketRequest.prototype.name = ""; + UpdateBucketRequest.prototype.name = ""; /** - * Creates a new DeleteBucketRequest instance using the specified properties. + * UpdateBucketRequest bucket. + * @member {google.logging.v2.ILogBucket|null|undefined} bucket + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.bucket = null; + + /** + * UpdateBucketRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateBucketRequest + * @instance + */ + UpdateBucketRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateBucketRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest instance + * @param {google.logging.v2.IUpdateBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest instance */ - DeleteBucketRequest.create = function create(properties) { - return new DeleteBucketRequest(properties); + UpdateBucketRequest.create = function create(properties) { + return new UpdateBucketRequest(properties); }; /** - * Encodes the specified DeleteBucketRequest message. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * Encodes the specified UpdateBucketRequest message. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBucketRequest.encode = function encode(message, writer) { + UpdateBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + $root.google.logging.v2.LogBucket.encode(message.bucket, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. + * Encodes the specified UpdateBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode + * @param {google.logging.v2.IUpdateBucketRequest} message UpdateBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteBucketRequest message from the specified reader or buffer. + * Decodes an UpdateBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBucketRequest.decode = function decode(reader, length) { + UpdateBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20949,6 +21616,14 @@ message.name = reader.string(); break; } + case 2: { + message.bucket = $root.google.logging.v2.LogBucket.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20958,122 +21633,149 @@ }; /** - * Decodes a DeleteBucketRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteBucketRequest message. + * Verifies an UpdateBucketRequest message. * @function verify - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteBucketRequest.verify = function verify(message) { + UpdateBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + var error = $root.google.logging.v2.LogBucket.verify(message.bucket); + if (error) + return "bucket." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a DeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest + * @returns {google.logging.v2.UpdateBucketRequest} UpdateBucketRequest */ - DeleteBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteBucketRequest) + UpdateBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateBucketRequest) return object; - var message = new $root.google.logging.v2.DeleteBucketRequest(); + var message = new $root.google.logging.v2.UpdateBucketRequest(); if (object.name != null) message.name = String(object.name); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.bucket: object expected"); + message.bucket = $root.google.logging.v2.LogBucket.fromObject(object.bucket); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateBucketRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a DeleteBucketRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static - * @param {google.logging.v2.DeleteBucketRequest} message DeleteBucketRequest + * @param {google.logging.v2.UpdateBucketRequest} message UpdateBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBucketRequest.toObject = function toObject(message, options) { + UpdateBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.bucket = null; + object.updateMask = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = $root.google.logging.v2.LogBucket.toObject(message.bucket, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this DeleteBucketRequest to JSON. + * Converts this UpdateBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @instance * @returns {Object.} JSON object */ - DeleteBucketRequest.prototype.toJSON = function toJSON() { + UpdateBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteBucketRequest + * Gets the default type url for UpdateBucketRequest * @function getTypeUrl - * @memberof google.logging.v2.DeleteBucketRequest + * @memberof google.logging.v2.UpdateBucketRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.DeleteBucketRequest"; + return typeUrlPrefix + "/google.logging.v2.UpdateBucketRequest"; }; - return DeleteBucketRequest; + return UpdateBucketRequest; })(); - v2.UndeleteBucketRequest = (function() { + v2.GetBucketRequest = (function() { /** - * Properties of an UndeleteBucketRequest. + * Properties of a GetBucketRequest. * @memberof google.logging.v2 - * @interface IUndeleteBucketRequest - * @property {string|null} [name] UndeleteBucketRequest name + * @interface IGetBucketRequest + * @property {string|null} [name] GetBucketRequest name */ /** - * Constructs a new UndeleteBucketRequest. + * Constructs a new GetBucketRequest. * @memberof google.logging.v2 - * @classdesc Represents an UndeleteBucketRequest. - * @implements IUndeleteBucketRequest + * @classdesc Represents a GetBucketRequest. + * @implements IGetBucketRequest * @constructor - * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set */ - function UndeleteBucketRequest(properties) { + function GetBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21081,35 +21783,35 @@ } /** - * UndeleteBucketRequest name. + * GetBucketRequest name. * @member {string} name - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @instance */ - UndeleteBucketRequest.prototype.name = ""; + GetBucketRequest.prototype.name = ""; /** - * Creates a new UndeleteBucketRequest instance using the specified properties. + * Creates a new GetBucketRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set - * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest instance + * @param {google.logging.v2.IGetBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest instance */ - UndeleteBucketRequest.create = function create(properties) { - return new UndeleteBucketRequest(properties); + GetBucketRequest.create = function create(properties) { + return new GetBucketRequest(properties); }; /** - * Encodes the specified UndeleteBucketRequest message. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. + * Encodes the specified GetBucketRequest message. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeleteBucketRequest.encode = function encode(message, writer) { + GetBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -21118,33 +21820,33 @@ }; /** - * Encodes the specified UndeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. + * Encodes the specified GetBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode + * @param {google.logging.v2.IGetBucketRequest} message GetBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UndeleteBucketRequest message from the specified reader or buffer. + * Decodes a GetBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeleteBucketRequest.decode = function decode(reader, length) { + GetBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UndeleteBucketRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -21161,30 +21863,30 @@ }; /** - * Decodes an UndeleteBucketRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { + GetBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UndeleteBucketRequest message. + * Verifies a GetBucketRequest message. * @function verify - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UndeleteBucketRequest.verify = function verify(message) { + GetBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -21194,32 +21896,32 @@ }; /** - * Creates an UndeleteBucketRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest + * @returns {google.logging.v2.GetBucketRequest} GetBucketRequest */ - UndeleteBucketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UndeleteBucketRequest) + GetBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetBucketRequest) return object; - var message = new $root.google.logging.v2.UndeleteBucketRequest(); + var message = new $root.google.logging.v2.GetBucketRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from an UndeleteBucketRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static - * @param {google.logging.v2.UndeleteBucketRequest} message UndeleteBucketRequest + * @param {google.logging.v2.GetBucketRequest} message GetBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeleteBucketRequest.toObject = function toObject(message, options) { + GetBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -21231,54 +21933,52 @@ }; /** - * Converts this UndeleteBucketRequest to JSON. + * Converts this GetBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @instance * @returns {Object.} JSON object */ - UndeleteBucketRequest.prototype.toJSON = function toJSON() { + GetBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UndeleteBucketRequest + * Gets the default type url for GetBucketRequest * @function getTypeUrl - * @memberof google.logging.v2.UndeleteBucketRequest + * @memberof google.logging.v2.GetBucketRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UndeleteBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.UndeleteBucketRequest"; + return typeUrlPrefix + "/google.logging.v2.GetBucketRequest"; }; - return UndeleteBucketRequest; + return GetBucketRequest; })(); - v2.ListViewsRequest = (function() { + v2.DeleteBucketRequest = (function() { /** - * Properties of a ListViewsRequest. + * Properties of a DeleteBucketRequest. * @memberof google.logging.v2 - * @interface IListViewsRequest - * @property {string|null} [parent] ListViewsRequest parent - * @property {string|null} [pageToken] ListViewsRequest pageToken - * @property {number|null} [pageSize] ListViewsRequest pageSize + * @interface IDeleteBucketRequest + * @property {string|null} [name] DeleteBucketRequest name */ /** - * Constructs a new ListViewsRequest. + * Constructs a new DeleteBucketRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListViewsRequest. - * @implements IListViewsRequest + * @classdesc Represents a DeleteBucketRequest. + * @implements IDeleteBucketRequest * @constructor - * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set + * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set */ - function ListViewsRequest(properties) { + function DeleteBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21286,103 +21986,75 @@ } /** - * ListViewsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListViewsRequest - * @instance - */ - ListViewsRequest.prototype.parent = ""; - - /** - * ListViewsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListViewsRequest - * @instance - */ - ListViewsRequest.prototype.pageToken = ""; - - /** - * ListViewsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListViewsRequest + * DeleteBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteBucketRequest * @instance */ - ListViewsRequest.prototype.pageSize = 0; + DeleteBucketRequest.prototype.name = ""; /** - * Creates a new ListViewsRequest instance using the specified properties. + * Creates a new DeleteBucketRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static - * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest instance + * @param {google.logging.v2.IDeleteBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest instance */ - ListViewsRequest.create = function create(properties) { - return new ListViewsRequest(properties); + DeleteBucketRequest.create = function create(properties) { + return new DeleteBucketRequest(properties); }; /** - * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * Encodes the specified DeleteBucketRequest message. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static - * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListViewsRequest.encode = function encode(message, writer) { + DeleteBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. + * Encodes the specified DeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static - * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {google.logging.v2.IDeleteBucketRequest} message DeleteBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListViewsRequest message from the specified reader or buffer. + * Decodes a DeleteBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsRequest.decode = function decode(reader, length) { + DeleteBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageToken = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); + message.name = reader.string(); break; } default: @@ -21394,141 +22066,122 @@ }; /** - * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListViewsRequest message. + * Verifies a DeleteBucketRequest message. * @function verify - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListViewsRequest.verify = function verify(message) { + DeleteBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest + * @returns {google.logging.v2.DeleteBucketRequest} DeleteBucketRequest */ - ListViewsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListViewsRequest) + DeleteBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteBucketRequest) return object; - var message = new $root.google.logging.v2.ListViewsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.DeleteBucketRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static - * @param {google.logging.v2.ListViewsRequest} message ListViewsRequest + * @param {google.logging.v2.DeleteBucketRequest} message DeleteBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListViewsRequest.toObject = function toObject(message, options) { + DeleteBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListViewsRequest to JSON. + * Converts this DeleteBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @instance * @returns {Object.} JSON object */ - ListViewsRequest.prototype.toJSON = function toJSON() { + DeleteBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListViewsRequest + * Gets the default type url for DeleteBucketRequest * @function getTypeUrl - * @memberof google.logging.v2.ListViewsRequest + * @memberof google.logging.v2.DeleteBucketRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.ListViewsRequest"; + return typeUrlPrefix + "/google.logging.v2.DeleteBucketRequest"; }; - return ListViewsRequest; + return DeleteBucketRequest; })(); - v2.ListViewsResponse = (function() { + v2.UndeleteBucketRequest = (function() { /** - * Properties of a ListViewsResponse. + * Properties of an UndeleteBucketRequest. * @memberof google.logging.v2 - * @interface IListViewsResponse - * @property {Array.|null} [views] ListViewsResponse views - * @property {string|null} [nextPageToken] ListViewsResponse nextPageToken + * @interface IUndeleteBucketRequest + * @property {string|null} [name] UndeleteBucketRequest name */ /** - * Constructs a new ListViewsResponse. + * Constructs a new UndeleteBucketRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListViewsResponse. - * @implements IListViewsResponse + * @classdesc Represents an UndeleteBucketRequest. + * @implements IUndeleteBucketRequest * @constructor - * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set + * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set */ - function ListViewsResponse(properties) { - this.views = []; + function UndeleteBucketRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21536,92 +22189,75 @@ } /** - * ListViewsResponse views. - * @member {Array.} views - * @memberof google.logging.v2.ListViewsResponse - * @instance - */ - ListViewsResponse.prototype.views = $util.emptyArray; - - /** - * ListViewsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListViewsResponse + * UndeleteBucketRequest name. + * @member {string} name + * @memberof google.logging.v2.UndeleteBucketRequest * @instance */ - ListViewsResponse.prototype.nextPageToken = ""; + UndeleteBucketRequest.prototype.name = ""; /** - * Creates a new ListViewsResponse instance using the specified properties. + * Creates a new UndeleteBucketRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static - * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse instance + * @param {google.logging.v2.IUndeleteBucketRequest=} [properties] Properties to set + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest instance */ - ListViewsResponse.create = function create(properties) { - return new ListViewsResponse(properties); + UndeleteBucketRequest.create = function create(properties) { + return new UndeleteBucketRequest(properties); }; /** - * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. + * Encodes the specified UndeleteBucketRequest message. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static - * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListViewsResponse.encode = function encode(message, writer) { + UndeleteBucketRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.views != null && message.views.length) - for (var i = 0; i < message.views.length; ++i) - $root.google.logging.v2.LogView.encode(message.views[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. + * Encodes the specified UndeleteBucketRequest message, length delimited. Does not implicitly {@link google.logging.v2.UndeleteBucketRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static - * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {google.logging.v2.IUndeleteBucketRequest} message UndeleteBucketRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UndeleteBucketRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListViewsResponse message from the specified reader or buffer. + * Decodes an UndeleteBucketRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsResponse.decode = function decode(reader, length) { + UndeleteBucketRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UndeleteBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.views && message.views.length)) - message.views = []; - message.views.push($root.google.logging.v2.LogView.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -21633,150 +22269,124 @@ }; /** - * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * Decodes an UndeleteBucketRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsResponse.decodeDelimited = function decodeDelimited(reader) { + UndeleteBucketRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListViewsResponse message. + * Verifies an UndeleteBucketRequest message. * @function verify - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListViewsResponse.verify = function verify(message) { + UndeleteBucketRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.views != null && message.hasOwnProperty("views")) { - if (!Array.isArray(message.views)) - return "views: array expected"; - for (var i = 0; i < message.views.length; ++i) { - var error = $root.google.logging.v2.LogView.verify(message.views[i]); - if (error) - return "views." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UndeleteBucketRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse + * @returns {google.logging.v2.UndeleteBucketRequest} UndeleteBucketRequest */ - ListViewsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListViewsResponse) + UndeleteBucketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UndeleteBucketRequest) return object; - var message = new $root.google.logging.v2.ListViewsResponse(); - if (object.views) { - if (!Array.isArray(object.views)) - throw TypeError(".google.logging.v2.ListViewsResponse.views: array expected"); - message.views = []; - for (var i = 0; i < object.views.length; ++i) { - if (typeof object.views[i] !== "object") - throw TypeError(".google.logging.v2.ListViewsResponse.views: object expected"); - message.views[i] = $root.google.logging.v2.LogView.fromObject(object.views[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.UndeleteBucketRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UndeleteBucketRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static - * @param {google.logging.v2.ListViewsResponse} message ListViewsResponse + * @param {google.logging.v2.UndeleteBucketRequest} message UndeleteBucketRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListViewsResponse.toObject = function toObject(message, options) { + UndeleteBucketRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.views = []; if (options.defaults) - object.nextPageToken = ""; - if (message.views && message.views.length) { - object.views = []; - for (var j = 0; j < message.views.length; ++j) - object.views[j] = $root.google.logging.v2.LogView.toObject(message.views[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListViewsResponse to JSON. + * Converts this UndeleteBucketRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @instance * @returns {Object.} JSON object */ - ListViewsResponse.prototype.toJSON = function toJSON() { + UndeleteBucketRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListViewsResponse + * Gets the default type url for UndeleteBucketRequest * @function getTypeUrl - * @memberof google.logging.v2.ListViewsResponse + * @memberof google.logging.v2.UndeleteBucketRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UndeleteBucketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.ListViewsResponse"; + return typeUrlPrefix + "/google.logging.v2.UndeleteBucketRequest"; }; - return ListViewsResponse; + return UndeleteBucketRequest; })(); - v2.CreateViewRequest = (function() { + v2.ListViewsRequest = (function() { /** - * Properties of a CreateViewRequest. + * Properties of a ListViewsRequest. * @memberof google.logging.v2 - * @interface ICreateViewRequest - * @property {string|null} [parent] CreateViewRequest parent - * @property {string|null} [viewId] CreateViewRequest viewId - * @property {google.logging.v2.ILogView|null} [view] CreateViewRequest view + * @interface IListViewsRequest + * @property {string|null} [parent] ListViewsRequest parent + * @property {string|null} [pageToken] ListViewsRequest pageToken + * @property {number|null} [pageSize] ListViewsRequest pageSize */ /** - * Constructs a new CreateViewRequest. + * Constructs a new ListViewsRequest. * @memberof google.logging.v2 - * @classdesc Represents a CreateViewRequest. - * @implements ICreateViewRequest + * @classdesc Represents a ListViewsRequest. + * @implements IListViewsRequest * @constructor - * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set + * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set */ - function CreateViewRequest(properties) { + function ListViewsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21784,90 +22394,90 @@ } /** - * CreateViewRequest parent. + * ListViewsRequest parent. * @member {string} parent - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @instance */ - CreateViewRequest.prototype.parent = ""; + ListViewsRequest.prototype.parent = ""; /** - * CreateViewRequest viewId. - * @member {string} viewId - * @memberof google.logging.v2.CreateViewRequest + * ListViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListViewsRequest * @instance */ - CreateViewRequest.prototype.viewId = ""; + ListViewsRequest.prototype.pageToken = ""; /** - * CreateViewRequest view. - * @member {google.logging.v2.ILogView|null|undefined} view - * @memberof google.logging.v2.CreateViewRequest + * ListViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListViewsRequest * @instance */ - CreateViewRequest.prototype.view = null; + ListViewsRequest.prototype.pageSize = 0; /** - * Creates a new CreateViewRequest instance using the specified properties. + * Creates a new ListViewsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static - * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest instance + * @param {google.logging.v2.IListViewsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest instance */ - CreateViewRequest.create = function create(properties) { - return new CreateViewRequest(properties); + ListViewsRequest.create = function create(properties) { + return new ListViewsRequest(properties); }; /** - * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static - * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode + * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateViewRequest.encode = function encode(message, writer) { + ListViewsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.viewId != null && Object.hasOwnProperty.call(message, "viewId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.viewId); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static - * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode + * @param {google.logging.v2.IListViewsRequest} message ListViewsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateViewRequest message from the specified reader or buffer. + * Decodes a ListViewsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateViewRequest.decode = function decode(reader, length) { + ListViewsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -21876,11 +22486,11 @@ break; } case 2: { - message.viewId = reader.string(); + message.pageToken = reader.string(); break; } case 3: { - message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } default: @@ -21892,146 +22502,141 @@ }; /** - * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateViewRequest.decodeDelimited = function decodeDelimited(reader) { + ListViewsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateViewRequest message. + * Verifies a ListViewsRequest message. * @function verify - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateViewRequest.verify = function verify(message) { + ListViewsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.viewId != null && message.hasOwnProperty("viewId")) - if (!$util.isString(message.viewId)) - return "viewId: string expected"; - if (message.view != null && message.hasOwnProperty("view")) { - var error = $root.google.logging.v2.LogView.verify(message.view); - if (error) - return "view." + error; - } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest + * @returns {google.logging.v2.ListViewsRequest} ListViewsRequest */ - CreateViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateViewRequest) + ListViewsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListViewsRequest) return object; - var message = new $root.google.logging.v2.CreateViewRequest(); + var message = new $root.google.logging.v2.ListViewsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.viewId != null) - message.viewId = String(object.viewId); - if (object.view != null) { - if (typeof object.view !== "object") - throw TypeError(".google.logging.v2.CreateViewRequest.view: object expected"); - message.view = $root.google.logging.v2.LogView.fromObject(object.view); - } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static - * @param {google.logging.v2.CreateViewRequest} message CreateViewRequest + * @param {google.logging.v2.ListViewsRequest} message ListViewsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateViewRequest.toObject = function toObject(message, options) { + ListViewsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.viewId = ""; - object.view = null; + object.pageToken = ""; + object.pageSize = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.viewId != null && message.hasOwnProperty("viewId")) - object.viewId = message.viewId; - if (message.view != null && message.hasOwnProperty("view")) - object.view = $root.google.logging.v2.LogView.toObject(message.view, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this CreateViewRequest to JSON. + * Converts this ListViewsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @instance * @returns {Object.} JSON object */ - CreateViewRequest.prototype.toJSON = function toJSON() { + ListViewsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateViewRequest + * Gets the default type url for ListViewsRequest * @function getTypeUrl - * @memberof google.logging.v2.CreateViewRequest + * @memberof google.logging.v2.ListViewsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.CreateViewRequest"; + return typeUrlPrefix + "/google.logging.v2.ListViewsRequest"; }; - return CreateViewRequest; + return ListViewsRequest; })(); - v2.UpdateViewRequest = (function() { + v2.ListViewsResponse = (function() { /** - * Properties of an UpdateViewRequest. + * Properties of a ListViewsResponse. * @memberof google.logging.v2 - * @interface IUpdateViewRequest - * @property {string|null} [name] UpdateViewRequest name - * @property {google.logging.v2.ILogView|null} [view] UpdateViewRequest view - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateViewRequest updateMask + * @interface IListViewsResponse + * @property {Array.|null} [views] ListViewsResponse views + * @property {string|null} [nextPageToken] ListViewsResponse nextPageToken */ /** - * Constructs a new UpdateViewRequest. + * Constructs a new ListViewsResponse. * @memberof google.logging.v2 - * @classdesc Represents an UpdateViewRequest. - * @implements IUpdateViewRequest + * @classdesc Represents a ListViewsResponse. + * @implements IListViewsResponse * @constructor - * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set + * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set */ - function UpdateViewRequest(properties) { + function ListViewsResponse(properties) { + this.views = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22039,103 +22644,92 @@ } /** - * UpdateViewRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateViewRequest - * @instance - */ - UpdateViewRequest.prototype.name = ""; - - /** - * UpdateViewRequest view. - * @member {google.logging.v2.ILogView|null|undefined} view - * @memberof google.logging.v2.UpdateViewRequest + * ListViewsResponse views. + * @member {Array.} views + * @memberof google.logging.v2.ListViewsResponse * @instance */ - UpdateViewRequest.prototype.view = null; + ListViewsResponse.prototype.views = $util.emptyArray; /** - * UpdateViewRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateViewRequest + * ListViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListViewsResponse * @instance */ - UpdateViewRequest.prototype.updateMask = null; + ListViewsResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateViewRequest instance using the specified properties. + * Creates a new ListViewsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static - * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest instance + * @param {google.logging.v2.IListViewsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse instance */ - UpdateViewRequest.create = function create(properties) { - return new UpdateViewRequest(properties); + ListViewsResponse.create = function create(properties) { + return new ListViewsResponse(properties); }; /** - * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static - * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateViewRequest.encode = function encode(message, writer) { + ListViewsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.views != null && message.views.length) + for (var i = 0; i < message.views.length; ++i) + $root.google.logging.v2.LogView.encode(message.views[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListViewsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static - * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {google.logging.v2.IListViewsResponse} message ListViewsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateViewRequest message from the specified reader or buffer. + * Decodes a ListViewsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateViewRequest.decode = function decode(reader, length) { + ListViewsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.views && message.views.length)) + message.views = []; + message.views.push($root.google.logging.v2.LogView.decode(reader, reader.uint32())); break; } case 2: { - message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -22147,149 +22741,150 @@ }; /** - * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateViewRequest.decodeDelimited = function decodeDelimited(reader) { + ListViewsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateViewRequest message. + * Verifies a ListViewsResponse message. * @function verify - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateViewRequest.verify = function verify(message) { + ListViewsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) { - var error = $root.google.logging.v2.LogView.verify(message.view); - if (error) - return "view." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.views != null && message.hasOwnProperty("views")) { + if (!Array.isArray(message.views)) + return "views: array expected"; + for (var i = 0; i < message.views.length; ++i) { + var error = $root.google.logging.v2.LogView.verify(message.views[i]); + if (error) + return "views." + error; + } } - return null; - }; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest + * @returns {google.logging.v2.ListViewsResponse} ListViewsResponse */ - UpdateViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateViewRequest) + ListViewsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListViewsResponse) return object; - var message = new $root.google.logging.v2.UpdateViewRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.view != null) { - if (typeof object.view !== "object") - throw TypeError(".google.logging.v2.UpdateViewRequest.view: object expected"); - message.view = $root.google.logging.v2.LogView.fromObject(object.view); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateViewRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.logging.v2.ListViewsResponse(); + if (object.views) { + if (!Array.isArray(object.views)) + throw TypeError(".google.logging.v2.ListViewsResponse.views: array expected"); + message.views = []; + for (var i = 0; i < object.views.length; ++i) { + if (typeof object.views[i] !== "object") + throw TypeError(".google.logging.v2.ListViewsResponse.views: object expected"); + message.views[i] = $root.google.logging.v2.LogView.fromObject(object.views[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static - * @param {google.logging.v2.UpdateViewRequest} message UpdateViewRequest + * @param {google.logging.v2.ListViewsResponse} message ListViewsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateViewRequest.toObject = function toObject(message, options) { + ListViewsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.view = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.views = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.views && message.views.length) { + object.views = []; + for (var j = 0; j < message.views.length; ++j) + object.views[j] = $root.google.logging.v2.LogView.toObject(message.views[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = $root.google.logging.v2.LogView.toObject(message.view, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateViewRequest to JSON. + * Converts this ListViewsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @instance * @returns {Object.} JSON object */ - UpdateViewRequest.prototype.toJSON = function toJSON() { + ListViewsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateViewRequest + * Gets the default type url for ListViewsResponse * @function getTypeUrl - * @memberof google.logging.v2.UpdateViewRequest + * @memberof google.logging.v2.ListViewsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.UpdateViewRequest"; + return typeUrlPrefix + "/google.logging.v2.ListViewsResponse"; }; - return UpdateViewRequest; + return ListViewsResponse; })(); - v2.GetViewRequest = (function() { + v2.CreateViewRequest = (function() { /** - * Properties of a GetViewRequest. + * Properties of a CreateViewRequest. * @memberof google.logging.v2 - * @interface IGetViewRequest - * @property {string|null} [name] GetViewRequest name + * @interface ICreateViewRequest + * @property {string|null} [parent] CreateViewRequest parent + * @property {string|null} [viewId] CreateViewRequest viewId + * @property {google.logging.v2.ILogView|null} [view] CreateViewRequest view */ /** - * Constructs a new GetViewRequest. + * Constructs a new CreateViewRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetViewRequest. - * @implements IGetViewRequest + * @classdesc Represents a CreateViewRequest. + * @implements ICreateViewRequest * @constructor - * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set + * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set */ - function GetViewRequest(properties) { + function CreateViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22297,75 +22892,103 @@ } /** - * GetViewRequest name. - * @member {string} name - * @memberof google.logging.v2.GetViewRequest + * CreateViewRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateViewRequest * @instance */ - GetViewRequest.prototype.name = ""; + CreateViewRequest.prototype.parent = ""; /** - * Creates a new GetViewRequest instance using the specified properties. + * CreateViewRequest viewId. + * @member {string} viewId + * @memberof google.logging.v2.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.viewId = ""; + + /** + * CreateViewRequest view. + * @member {google.logging.v2.ILogView|null|undefined} view + * @memberof google.logging.v2.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.view = null; + + /** + * Creates a new CreateViewRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetViewRequest} GetViewRequest instance + * @param {google.logging.v2.ICreateViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest instance */ - GetViewRequest.create = function create(properties) { - return new GetViewRequest(properties); + CreateViewRequest.create = function create(properties) { + return new CreateViewRequest(properties); }; /** - * Encodes the specified GetViewRequest message. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode + * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetViewRequest.encode = function encode(message, writer) { + CreateViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.viewId != null && Object.hasOwnProperty.call(message, "viewId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.viewId); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode + * @param {google.logging.v2.ICreateViewRequest} message CreateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetViewRequest message from the specified reader or buffer. + * Decodes a CreateViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetViewRequest} GetViewRequest + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetViewRequest.decode = function decode(reader, length) { + CreateViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.viewId = reader.string(); + break; + } + case 3: { + message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); break; } default: @@ -22377,122 +23000,146 @@ }; /** - * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetViewRequest} GetViewRequest + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetViewRequest.decodeDelimited = function decodeDelimited(reader) { + CreateViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetViewRequest message. + * Verifies a CreateViewRequest message. * @function verify - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetViewRequest.verify = function verify(message) { + CreateViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.viewId != null && message.hasOwnProperty("viewId")) + if (!$util.isString(message.viewId)) + return "viewId: string expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.logging.v2.LogView.verify(message.view); + if (error) + return "view." + error; + } return null; }; /** - * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetViewRequest} GetViewRequest + * @returns {google.logging.v2.CreateViewRequest} CreateViewRequest */ - GetViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetViewRequest) + CreateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateViewRequest) return object; - var message = new $root.google.logging.v2.GetViewRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.logging.v2.CreateViewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.viewId != null) + message.viewId = String(object.viewId); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.logging.v2.CreateViewRequest.view: object expected"); + message.view = $root.google.logging.v2.LogView.fromObject(object.view); + } return message; }; /** - * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static - * @param {google.logging.v2.GetViewRequest} message GetViewRequest + * @param {google.logging.v2.CreateViewRequest} message CreateViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetViewRequest.toObject = function toObject(message, options) { + CreateViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetViewRequest to JSON. - * @function toJSON - * @memberof google.logging.v2.GetViewRequest - * @instance - * @returns {Object.} JSON object - */ - GetViewRequest.prototype.toJSON = function toJSON() { + if (options.defaults) { + object.parent = ""; + object.viewId = ""; + object.view = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.viewId != null && message.hasOwnProperty("viewId")) + object.viewId = message.viewId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.logging.v2.LogView.toObject(message.view, options); + return object; + }; + + /** + * Converts this CreateViewRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CreateViewRequest + * @instance + * @returns {Object.} JSON object + */ + CreateViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetViewRequest + * Gets the default type url for CreateViewRequest * @function getTypeUrl - * @memberof google.logging.v2.GetViewRequest + * @memberof google.logging.v2.CreateViewRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.GetViewRequest"; + return typeUrlPrefix + "/google.logging.v2.CreateViewRequest"; }; - return GetViewRequest; + return CreateViewRequest; })(); - v2.DeleteViewRequest = (function() { + v2.UpdateViewRequest = (function() { /** - * Properties of a DeleteViewRequest. + * Properties of an UpdateViewRequest. * @memberof google.logging.v2 - * @interface IDeleteViewRequest - * @property {string|null} [name] DeleteViewRequest name + * @interface IUpdateViewRequest + * @property {string|null} [name] UpdateViewRequest name + * @property {google.logging.v2.ILogView|null} [view] UpdateViewRequest view + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateViewRequest updateMask */ /** - * Constructs a new DeleteViewRequest. + * Constructs a new UpdateViewRequest. * @memberof google.logging.v2 - * @classdesc Represents a DeleteViewRequest. - * @implements IDeleteViewRequest + * @classdesc Represents an UpdateViewRequest. + * @implements IUpdateViewRequest * @constructor - * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set + * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set */ - function DeleteViewRequest(properties) { + function UpdateViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22500,70 +23147,90 @@ } /** - * DeleteViewRequest name. + * UpdateViewRequest name. * @member {string} name - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @instance */ - DeleteViewRequest.prototype.name = ""; + UpdateViewRequest.prototype.name = ""; /** - * Creates a new DeleteViewRequest instance using the specified properties. + * UpdateViewRequest view. + * @member {google.logging.v2.ILogView|null|undefined} view + * @memberof google.logging.v2.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.view = null; + + /** + * UpdateViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateViewRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static - * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest instance + * @param {google.logging.v2.IUpdateViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest instance */ - DeleteViewRequest.create = function create(properties) { - return new DeleteViewRequest(properties); + UpdateViewRequest.create = function create(properties) { + return new UpdateViewRequest(properties); }; /** - * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static - * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteViewRequest.encode = function encode(message, writer) { + UpdateViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.logging.v2.LogView.encode(message.view, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static - * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {google.logging.v2.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer. + * Decodes an UpdateViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteViewRequest.decode = function decode(reader, length) { + UpdateViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -22571,6 +23238,14 @@ message.name = reader.string(); break; } + case 2: { + message.view = $root.google.logging.v2.LogView.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22580,124 +23255,149 @@ }; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteViewRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteViewRequest message. + * Verifies an UpdateViewRequest message. * @function verify - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteViewRequest.verify = function verify(message) { + UpdateViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.logging.v2.LogView.verify(message.view); + if (error) + return "view." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest + * @returns {google.logging.v2.UpdateViewRequest} UpdateViewRequest */ - DeleteViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteViewRequest) + UpdateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateViewRequest) return object; - var message = new $root.google.logging.v2.DeleteViewRequest(); + var message = new $root.google.logging.v2.UpdateViewRequest(); if (object.name != null) message.name = String(object.name); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.logging.v2.UpdateViewRequest.view: object expected"); + message.view = $root.google.logging.v2.LogView.fromObject(object.view); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static - * @param {google.logging.v2.DeleteViewRequest} message DeleteViewRequest + * @param {google.logging.v2.UpdateViewRequest} message UpdateViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteViewRequest.toObject = function toObject(message, options) { + UpdateViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.view = null; + object.updateMask = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.logging.v2.LogView.toObject(message.view, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this DeleteViewRequest to JSON. + * Converts this UpdateViewRequest to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @instance * @returns {Object.} JSON object */ - DeleteViewRequest.prototype.toJSON = function toJSON() { + UpdateViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteViewRequest + * Gets the default type url for UpdateViewRequest * @function getTypeUrl - * @memberof google.logging.v2.DeleteViewRequest + * @memberof google.logging.v2.UpdateViewRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.DeleteViewRequest"; + return typeUrlPrefix + "/google.logging.v2.UpdateViewRequest"; }; - return DeleteViewRequest; + return UpdateViewRequest; })(); - v2.ListSinksRequest = (function() { + v2.GetViewRequest = (function() { /** - * Properties of a ListSinksRequest. + * Properties of a GetViewRequest. * @memberof google.logging.v2 - * @interface IListSinksRequest - * @property {string|null} [parent] ListSinksRequest parent - * @property {string|null} [pageToken] ListSinksRequest pageToken - * @property {number|null} [pageSize] ListSinksRequest pageSize + * @interface IGetViewRequest + * @property {string|null} [name] GetViewRequest name */ /** - * Constructs a new ListSinksRequest. + * Constructs a new GetViewRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksRequest. - * @implements IListSinksRequest + * @classdesc Represents a GetViewRequest. + * @implements IGetViewRequest * @constructor - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set */ - function ListSinksRequest(properties) { + function GetViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22705,103 +23405,75 @@ } /** - * ListSinksRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListSinksRequest - * @instance - */ - ListSinksRequest.prototype.parent = ""; - - /** - * ListSinksRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListSinksRequest - * @instance - */ - ListSinksRequest.prototype.pageToken = ""; - - /** - * ListSinksRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListSinksRequest + * GetViewRequest name. + * @member {string} name + * @memberof google.logging.v2.GetViewRequest * @instance */ - ListSinksRequest.prototype.pageSize = 0; + GetViewRequest.prototype.name = ""; /** - * Creates a new ListSinksRequest instance using the specified properties. + * Creates a new GetViewRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static - * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance + * @param {google.logging.v2.IGetViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetViewRequest} GetViewRequest instance */ - ListSinksRequest.create = function create(properties) { - return new ListSinksRequest(properties); + GetViewRequest.create = function create(properties) { + return new GetViewRequest(properties); }; /** - * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encode = function encode(message, writer) { + GetViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. + * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static - * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode + * @param {google.logging.v2.IGetViewRequest} message GetViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer. + * Decodes a GetViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.GetViewRequest} GetViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decode = function decode(reader, length) { + GetViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageToken = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); + message.name = reader.string(); break; } default: @@ -22813,141 +23485,122 @@ }; /** - * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.GetViewRequest} GetViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { + GetViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksRequest message. + * Verifies a GetViewRequest message. * @function verify - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksRequest.verify = function verify(message) { + GetViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest + * @returns {google.logging.v2.GetViewRequest} GetViewRequest */ - ListSinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksRequest) + GetViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetViewRequest) return object; - var message = new $root.google.logging.v2.ListSinksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.GetViewRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static - * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest + * @param {google.logging.v2.GetViewRequest} message GetViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksRequest.toObject = function toObject(message, options) { + GetViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListSinksRequest to JSON. + * Converts this GetViewRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @instance * @returns {Object.} JSON object */ - ListSinksRequest.prototype.toJSON = function toJSON() { + GetViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSinksRequest + * Gets the default type url for GetViewRequest * @function getTypeUrl - * @memberof google.logging.v2.ListSinksRequest + * @memberof google.logging.v2.GetViewRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.ListSinksRequest"; + return typeUrlPrefix + "/google.logging.v2.GetViewRequest"; }; - return ListSinksRequest; + return GetViewRequest; })(); - v2.ListSinksResponse = (function() { + v2.DeleteViewRequest = (function() { /** - * Properties of a ListSinksResponse. + * Properties of a DeleteViewRequest. * @memberof google.logging.v2 - * @interface IListSinksResponse - * @property {Array.|null} [sinks] ListSinksResponse sinks - * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken + * @interface IDeleteViewRequest + * @property {string|null} [name] DeleteViewRequest name */ /** - * Constructs a new ListSinksResponse. + * Constructs a new DeleteViewRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListSinksResponse. - * @implements IListSinksResponse + * @classdesc Represents a DeleteViewRequest. + * @implements IDeleteViewRequest * @constructor - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set */ - function ListSinksResponse(properties) { - this.sinks = []; + function DeleteViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22955,92 +23608,75 @@ } /** - * ListSinksResponse sinks. - * @member {Array.} sinks - * @memberof google.logging.v2.ListSinksResponse - * @instance - */ - ListSinksResponse.prototype.sinks = $util.emptyArray; - - /** - * ListSinksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListSinksResponse + * DeleteViewRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteViewRequest * @instance */ - ListSinksResponse.prototype.nextPageToken = ""; + DeleteViewRequest.prototype.name = ""; /** - * Creates a new ListSinksResponse instance using the specified properties. + * Creates a new DeleteViewRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static - * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance + * @param {google.logging.v2.IDeleteViewRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest instance */ - ListSinksResponse.create = function create(properties) { - return new ListSinksResponse(properties); + DeleteViewRequest.create = function create(properties) { + return new DeleteViewRequest(properties); }; /** - * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encode = function encode(message, writer) { + DeleteViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinks != null && message.sinks.length) - for (var i = 0; i < message.sinks.length; ++i) - $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static - * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode + * @param {google.logging.v2.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer. + * Decodes a DeleteViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decode = function decode(reader, length) { + DeleteViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.sinks && message.sinks.length)) - message.sinks = []; - message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -23052,148 +23688,124 @@ }; /** - * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSinksResponse message. + * Verifies a DeleteViewRequest message. * @function verify - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSinksResponse.verify = function verify(message) { + DeleteViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinks != null && message.hasOwnProperty("sinks")) { - if (!Array.isArray(message.sinks)) - return "sinks: array expected"; - for (var i = 0; i < message.sinks.length; ++i) { - var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); - if (error) - return "sinks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse + * @returns {google.logging.v2.DeleteViewRequest} DeleteViewRequest */ - ListSinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListSinksResponse) + DeleteViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteViewRequest) return object; - var message = new $root.google.logging.v2.ListSinksResponse(); - if (object.sinks) { - if (!Array.isArray(object.sinks)) - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); - message.sinks = []; - for (var i = 0; i < object.sinks.length; ++i) { - if (typeof object.sinks[i] !== "object") - throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); - message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.logging.v2.DeleteViewRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static - * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse + * @param {google.logging.v2.DeleteViewRequest} message DeleteViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSinksResponse.toObject = function toObject(message, options) { + DeleteViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sinks = []; if (options.defaults) - object.nextPageToken = ""; - if (message.sinks && message.sinks.length) { - object.sinks = []; - for (var j = 0; j < message.sinks.length; ++j) - object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListSinksResponse to JSON. + * Converts this DeleteViewRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @instance * @returns {Object.} JSON object */ - ListSinksResponse.prototype.toJSON = function toJSON() { + DeleteViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSinksResponse + * Gets the default type url for DeleteViewRequest * @function getTypeUrl - * @memberof google.logging.v2.ListSinksResponse + * @memberof google.logging.v2.DeleteViewRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.ListSinksResponse"; + return typeUrlPrefix + "/google.logging.v2.DeleteViewRequest"; }; - return ListSinksResponse; + return DeleteViewRequest; })(); - v2.GetSinkRequest = (function() { + v2.ListSinksRequest = (function() { /** - * Properties of a GetSinkRequest. + * Properties of a ListSinksRequest. * @memberof google.logging.v2 - * @interface IGetSinkRequest - * @property {string|null} [sinkName] GetSinkRequest sinkName + * @interface IListSinksRequest + * @property {string|null} [parent] ListSinksRequest parent + * @property {string|null} [pageToken] ListSinksRequest pageToken + * @property {number|null} [pageSize] ListSinksRequest pageSize */ /** - * Constructs a new GetSinkRequest. + * Constructs a new ListSinksRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetSinkRequest. - * @implements IGetSinkRequest + * @classdesc Represents a ListSinksRequest. + * @implements IListSinksRequest * @constructor - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set */ - function GetSinkRequest(properties) { + function ListSinksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23201,75 +23813,103 @@ } /** - * GetSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.GetSinkRequest + * ListSinksRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListSinksRequest * @instance */ - GetSinkRequest.prototype.sinkName = ""; + ListSinksRequest.prototype.parent = ""; /** - * Creates a new GetSinkRequest instance using the specified properties. + * ListSinksRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageToken = ""; + + /** + * ListSinksRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListSinksRequest + * @instance + */ + ListSinksRequest.prototype.pageSize = 0; + + /** + * Creates a new ListSinksRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance + * @param {google.logging.v2.IListSinksRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest instance */ - GetSinkRequest.create = function create(properties) { - return new GetSinkRequest(properties); + ListSinksRequest.create = function create(properties) { + return new ListSinksRequest(properties); }; /** - * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified ListSinksRequest message. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encode = function encode(message, writer) { + ListSinksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * Encodes the specified ListSinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {google.logging.v2.IListSinksRequest} message ListSinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer. + * Decodes a ListSinksRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decode = function decode(reader, length) { + ListSinksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.sinkName = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); break; } default: @@ -23281,124 +23921,141 @@ }; /** - * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSinksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListSinksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSinkRequest message. + * Verifies a ListSinksRequest message. * @function verify - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSinkRequest.verify = function verify(message) { + ListSinksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest + * @returns {google.logging.v2.ListSinksRequest} ListSinksRequest */ - GetSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetSinkRequest) + ListSinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksRequest) return object; - var message = new $root.google.logging.v2.GetSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); + var message = new $root.google.logging.v2.ListSinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSinksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static - * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest + * @param {google.logging.v2.ListSinksRequest} message ListSinksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSinkRequest.toObject = function toObject(message, options) { + ListSinksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this GetSinkRequest to JSON. + * Converts this ListSinksRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @instance * @returns {Object.} JSON object */ - GetSinkRequest.prototype.toJSON = function toJSON() { + ListSinksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSinkRequest + * Gets the default type url for ListSinksRequest * @function getTypeUrl - * @memberof google.logging.v2.GetSinkRequest + * @memberof google.logging.v2.ListSinksRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.GetSinkRequest"; + return typeUrlPrefix + "/google.logging.v2.ListSinksRequest"; }; - return GetSinkRequest; + return ListSinksRequest; })(); - v2.CreateSinkRequest = (function() { + v2.ListSinksResponse = (function() { /** - * Properties of a CreateSinkRequest. + * Properties of a ListSinksResponse. * @memberof google.logging.v2 - * @interface ICreateSinkRequest - * @property {string|null} [parent] CreateSinkRequest parent - * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity + * @interface IListSinksResponse + * @property {Array.|null} [sinks] ListSinksResponse sinks + * @property {string|null} [nextPageToken] ListSinksResponse nextPageToken */ /** - * Constructs a new CreateSinkRequest. + * Constructs a new ListSinksResponse. * @memberof google.logging.v2 - * @classdesc Represents a CreateSinkRequest. - * @implements ICreateSinkRequest + * @classdesc Represents a ListSinksResponse. + * @implements IListSinksResponse * @constructor - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set */ - function CreateSinkRequest(properties) { + function ListSinksResponse(properties) { + this.sinks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23406,103 +24063,92 @@ } /** - * CreateSinkRequest parent. - * @member {string} parent - * @memberof google.logging.v2.CreateSinkRequest - * @instance - */ - CreateSinkRequest.prototype.parent = ""; - - /** - * CreateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.CreateSinkRequest + * ListSinksResponse sinks. + * @member {Array.} sinks + * @memberof google.logging.v2.ListSinksResponse * @instance */ - CreateSinkRequest.prototype.sink = null; + ListSinksResponse.prototype.sinks = $util.emptyArray; /** - * CreateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.CreateSinkRequest + * ListSinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListSinksResponse * @instance */ - CreateSinkRequest.prototype.uniqueWriterIdentity = false; + ListSinksResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateSinkRequest instance using the specified properties. + * Creates a new ListSinksResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance + * @param {google.logging.v2.IListSinksResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse instance */ - CreateSinkRequest.create = function create(properties) { - return new CreateSinkRequest(properties); + ListSinksResponse.create = function create(properties) { + return new ListSinksResponse(properties); }; /** - * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * Encodes the specified ListSinksResponse message. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSinkRequest.encode = function encode(message, writer) { + ListSinksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.sinks != null && message.sinks.length) + for (var i = 0; i < message.sinks.length; ++i) + $root.google.logging.v2.LogSink.encode(message.sinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. + * Encodes the specified ListSinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListSinksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode + * @param {google.logging.v2.IListSinksResponse} message ListSinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSinksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer. + * Decodes a ListSinksResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decode = function decode(reader, length) { + ListSinksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.sinks && message.sinks.length)) + message.sinks = []; + message.sinks.push($root.google.logging.v2.LogSink.decode(reader, reader.uint32())); break; } case 2: { - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - } - case 3: { - message.uniqueWriterIdentity = reader.bool(); + message.nextPageToken = reader.string(); break; } default: @@ -23514,147 +24160,148 @@ }; /** - * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSinksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListSinksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSinkRequest message. + * Verifies a ListSinksResponse message. * @function verify - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSinkRequest.verify = function verify(message) { + ListSinksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; + if (message.sinks != null && message.hasOwnProperty("sinks")) { + if (!Array.isArray(message.sinks)) + return "sinks: array expected"; + for (var i = 0; i < message.sinks.length; ++i) { + var error = $root.google.logging.v2.LogSink.verify(message.sinks[i]); + if (error) + return "sinks." + error; + } } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSinksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest + * @returns {google.logging.v2.ListSinksResponse} ListSinksResponse */ - CreateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateSinkRequest) + ListSinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListSinksResponse) return object; - var message = new $root.google.logging.v2.CreateSinkRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + var message = new $root.google.logging.v2.ListSinksResponse(); + if (object.sinks) { + if (!Array.isArray(object.sinks)) + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: array expected"); + message.sinks = []; + for (var i = 0; i < object.sinks.length; ++i) { + if (typeof object.sinks[i] !== "object") + throw TypeError(".google.logging.v2.ListSinksResponse.sinks: object expected"); + message.sinks[i] = $root.google.logging.v2.LogSink.fromObject(object.sinks[i]); + } } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSinksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static - * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest + * @param {google.logging.v2.ListSinksResponse} message ListSinksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSinkRequest.toObject = function toObject(message, options) { + ListSinksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.sink = null; - object.uniqueWriterIdentity = false; + if (options.arrays || options.defaults) + object.sinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sinks && message.sinks.length) { + object.sinks = []; + for (var j = 0; j < message.sinks.length; ++j) + object.sinks[j] = $root.google.logging.v2.LogSink.toObject(message.sinks[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateSinkRequest to JSON. + * Converts this ListSinksResponse to JSON. * @function toJSON - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @instance * @returns {Object.} JSON object */ - CreateSinkRequest.prototype.toJSON = function toJSON() { + ListSinksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateSinkRequest + * Gets the default type url for ListSinksResponse * @function getTypeUrl - * @memberof google.logging.v2.CreateSinkRequest + * @memberof google.logging.v2.ListSinksResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.CreateSinkRequest"; + return typeUrlPrefix + "/google.logging.v2.ListSinksResponse"; }; - return CreateSinkRequest; + return ListSinksResponse; })(); - v2.UpdateSinkRequest = (function() { + v2.GetSinkRequest = (function() { /** - * Properties of an UpdateSinkRequest. + * Properties of a GetSinkRequest. * @memberof google.logging.v2 - * @interface IUpdateSinkRequest - * @property {string|null} [sinkName] UpdateSinkRequest sinkName - * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink - * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask + * @interface IGetSinkRequest + * @property {string|null} [sinkName] GetSinkRequest sinkName */ /** - * Constructs a new UpdateSinkRequest. + * Constructs a new GetSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents an UpdateSinkRequest. - * @implements IUpdateSinkRequest + * @classdesc Represents a GetSinkRequest. + * @implements IGetSinkRequest * @constructor - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set */ - function UpdateSinkRequest(properties) { + function GetSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23662,100 +24309,70 @@ } /** - * UpdateSinkRequest sinkName. + * GetSinkRequest sinkName. * @member {string} sinkName - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @instance */ - UpdateSinkRequest.prototype.sinkName = ""; + GetSinkRequest.prototype.sinkName = ""; /** - * UpdateSinkRequest sink. - * @member {google.logging.v2.ILogSink|null|undefined} sink - * @memberof google.logging.v2.UpdateSinkRequest - * @instance + * Creates a new GetSinkRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest instance */ - UpdateSinkRequest.prototype.sink = null; + GetSinkRequest.create = function create(properties) { + return new GetSinkRequest(properties); + }; /** - * UpdateSinkRequest uniqueWriterIdentity. - * @member {boolean} uniqueWriterIdentity - * @memberof google.logging.v2.UpdateSinkRequest - * @instance + * Encodes the specified GetSinkRequest message. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetSinkRequest + * @static + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UpdateSinkRequest.prototype.uniqueWriterIdentity = false; - - /** - * UpdateSinkRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateSinkRequest - * @instance - */ - UpdateSinkRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateSinkRequest instance using the specified properties. - * @function create - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance - */ - UpdateSinkRequest.create = function create(properties) { - return new UpdateSinkRequest(properties); - }; - - /** - * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. - * @function encode - * @memberof google.logging.v2.UpdateSinkRequest - * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSinkRequest.encode = function encode(message, writer) { + GetSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); - if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) - $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. + * Encodes the specified GetSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode + * @param {google.logging.v2.IGetSinkRequest} message GetSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer. + * Decodes a GetSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSinkRequest.decode = function decode(reader, length) { + GetSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -23763,18 +24380,6 @@ message.sinkName = reader.string(); break; } - case 2: { - message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); - break; - } - case 3: { - message.uniqueWriterIdentity = reader.bool(); - break; - } - case 4: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -23784,157 +24389,124 @@ }; /** - * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { + GetSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSinkRequest message. + * Verifies a GetSinkRequest message. * @function verify - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSinkRequest.verify = function verify(message) { + GetSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.sinkName != null && message.hasOwnProperty("sinkName")) if (!$util.isString(message.sinkName)) return "sinkName: string expected"; - if (message.sink != null && message.hasOwnProperty("sink")) { - var error = $root.google.logging.v2.LogSink.verify(message.sink); - if (error) - return "sink." + error; - } - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - if (typeof message.uniqueWriterIdentity !== "boolean") - return "uniqueWriterIdentity: boolean expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } return null; }; /** - * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest + * @returns {google.logging.v2.GetSinkRequest} GetSinkRequest */ - UpdateSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateSinkRequest) + GetSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSinkRequest) return object; - var message = new $root.google.logging.v2.UpdateSinkRequest(); + var message = new $root.google.logging.v2.GetSinkRequest(); if (object.sinkName != null) message.sinkName = String(object.sinkName); - if (object.sink != null) { - if (typeof object.sink !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); - message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); - } - if (object.uniqueWriterIdentity != null) - message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } return message; }; /** - * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @static - * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest + * @param {google.logging.v2.GetSinkRequest} message GetSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSinkRequest.toObject = function toObject(message, options) { + GetSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.sinkName = ""; - object.sink = null; - object.uniqueWriterIdentity = false; - object.updateMask = null; - } if (message.sinkName != null && message.hasOwnProperty("sinkName")) object.sinkName = message.sinkName; - if (message.sink != null && message.hasOwnProperty("sink")) - object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); - if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) - object.uniqueWriterIdentity = message.uniqueWriterIdentity; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateSinkRequest to JSON. + * Converts this GetSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @instance * @returns {Object.} JSON object */ - UpdateSinkRequest.prototype.toJSON = function toJSON() { + GetSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSinkRequest + * Gets the default type url for GetSinkRequest * @function getTypeUrl - * @memberof google.logging.v2.UpdateSinkRequest + * @memberof google.logging.v2.GetSinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.UpdateSinkRequest"; + return typeUrlPrefix + "/google.logging.v2.GetSinkRequest"; }; - return UpdateSinkRequest; + return GetSinkRequest; })(); - v2.DeleteSinkRequest = (function() { + v2.CreateSinkRequest = (function() { /** - * Properties of a DeleteSinkRequest. + * Properties of a CreateSinkRequest. * @memberof google.logging.v2 - * @interface IDeleteSinkRequest - * @property {string|null} [sinkName] DeleteSinkRequest sinkName + * @interface ICreateSinkRequest + * @property {string|null} [parent] CreateSinkRequest parent + * @property {google.logging.v2.ILogSink|null} [sink] CreateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] CreateSinkRequest uniqueWriterIdentity */ /** - * Constructs a new DeleteSinkRequest. + * Constructs a new CreateSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a DeleteSinkRequest. - * @implements IDeleteSinkRequest + * @classdesc Represents a CreateSinkRequest. + * @implements ICreateSinkRequest * @constructor - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set */ - function DeleteSinkRequest(properties) { + function CreateSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23942,75 +24514,103 @@ } /** - * DeleteSinkRequest sinkName. - * @member {string} sinkName - * @memberof google.logging.v2.DeleteSinkRequest + * CreateSinkRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateSinkRequest * @instance */ - DeleteSinkRequest.prototype.sinkName = ""; + CreateSinkRequest.prototype.parent = ""; /** - * Creates a new DeleteSinkRequest instance using the specified properties. + * CreateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.sink = null; + + /** + * CreateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.CreateSinkRequest + * @instance + */ + CreateSinkRequest.prototype.uniqueWriterIdentity = false; + + /** + * Creates a new CreateSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance + * @param {google.logging.v2.ICreateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest instance */ - DeleteSinkRequest.create = function create(properties) { - return new DeleteSinkRequest(properties); + CreateSinkRequest.create = function create(properties) { + return new CreateSinkRequest(properties); }; /** - * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * Encodes the specified CreateSinkRequest message. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSinkRequest.encode = function encode(message, writer) { + CreateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); return writer; }; /** - * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. + * Encodes the specified CreateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode + * @param {google.logging.v2.ICreateSinkRequest} message CreateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer. + * Decodes a CreateSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSinkRequest.decode = function decode(reader, length) { + CreateSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.sinkName = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); + break; + } + case 3: { + message.uniqueWriterIdentity = reader.bool(); break; } default: @@ -24022,127 +24622,147 @@ }; /** - * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { + CreateSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSinkRequest message. + * Verifies a CreateSinkRequest message. * @function verify - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSinkRequest.verify = function verify(message) { + CreateSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - if (!$util.isString(message.sinkName)) - return "sinkName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); + if (error) + return "sink." + error; + } + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; return null; }; /** - * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest + * @returns {google.logging.v2.CreateSinkRequest} CreateSinkRequest */ - DeleteSinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteSinkRequest) + CreateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateSinkRequest) return object; - var message = new $root.google.logging.v2.DeleteSinkRequest(); - if (object.sinkName != null) - message.sinkName = String(object.sinkName); + var message = new $root.google.logging.v2.CreateSinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.CreateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); + } + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); return message; }; /** - * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static - * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest + * @param {google.logging.v2.CreateSinkRequest} message CreateSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSinkRequest.toObject = function toObject(message, options) { + CreateSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sinkName = ""; - if (message.sinkName != null && message.hasOwnProperty("sinkName")) - object.sinkName = message.sinkName; + if (options.defaults) { + object.parent = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; return object; }; /** - * Converts this DeleteSinkRequest to JSON. + * Converts this CreateSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @instance * @returns {Object.} JSON object */ - DeleteSinkRequest.prototype.toJSON = function toJSON() { + CreateSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteSinkRequest + * Gets the default type url for CreateSinkRequest * @function getTypeUrl - * @memberof google.logging.v2.DeleteSinkRequest + * @memberof google.logging.v2.CreateSinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.DeleteSinkRequest"; + return typeUrlPrefix + "/google.logging.v2.CreateSinkRequest"; }; - return DeleteSinkRequest; + return CreateSinkRequest; })(); - v2.LogExclusion = (function() { + v2.UpdateSinkRequest = (function() { /** - * Properties of a LogExclusion. + * Properties of an UpdateSinkRequest. * @memberof google.logging.v2 - * @interface ILogExclusion - * @property {string|null} [name] LogExclusion name - * @property {string|null} [description] LogExclusion description - * @property {string|null} [filter] LogExclusion filter - * @property {boolean|null} [disabled] LogExclusion disabled - * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime + * @interface IUpdateSinkRequest + * @property {string|null} [sinkName] UpdateSinkRequest sinkName + * @property {google.logging.v2.ILogSink|null} [sink] UpdateSinkRequest sink + * @property {boolean|null} [uniqueWriterIdentity] UpdateSinkRequest uniqueWriterIdentity + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSinkRequest updateMask */ /** - * Constructs a new LogExclusion. + * Constructs a new UpdateSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a LogExclusion. - * @implements ILogExclusion + * @classdesc Represents an UpdateSinkRequest. + * @implements IUpdateSinkRequest * @constructor - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set */ - function LogExclusion(properties) { + function UpdateSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24150,145 +24770,117 @@ } /** - * LogExclusion name. - * @member {string} name - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.name = ""; - - /** - * LogExclusion description. - * @member {string} description - * @memberof google.logging.v2.LogExclusion - * @instance - */ - LogExclusion.prototype.description = ""; - - /** - * LogExclusion filter. - * @member {string} filter - * @memberof google.logging.v2.LogExclusion + * UpdateSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - LogExclusion.prototype.filter = ""; + UpdateSinkRequest.prototype.sinkName = ""; /** - * LogExclusion disabled. - * @member {boolean} disabled - * @memberof google.logging.v2.LogExclusion + * UpdateSinkRequest sink. + * @member {google.logging.v2.ILogSink|null|undefined} sink + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - LogExclusion.prototype.disabled = false; + UpdateSinkRequest.prototype.sink = null; /** - * LogExclusion createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.logging.v2.LogExclusion + * UpdateSinkRequest uniqueWriterIdentity. + * @member {boolean} uniqueWriterIdentity + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - LogExclusion.prototype.createTime = null; + UpdateSinkRequest.prototype.uniqueWriterIdentity = false; /** - * LogExclusion updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.logging.v2.LogExclusion + * UpdateSinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSinkRequest * @instance */ - LogExclusion.prototype.updateTime = null; + UpdateSinkRequest.prototype.updateMask = null; /** - * Creates a new LogExclusion instance using the specified properties. + * Creates a new UpdateSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set - * @returns {google.logging.v2.LogExclusion} LogExclusion instance + * @param {google.logging.v2.IUpdateSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest instance */ - LogExclusion.create = function create(properties) { - return new LogExclusion(properties); + UpdateSinkRequest.create = function create(properties) { + return new UpdateSinkRequest(properties); }; /** - * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * Encodes the specified UpdateSinkRequest message. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogExclusion.encode = function encode(message, writer) { + UpdateSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); + if (message.sink != null && Object.hasOwnProperty.call(message, "sink")) + $root.google.logging.v2.LogSink.encode(message.sink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uniqueWriterIdentity != null && Object.hasOwnProperty.call(message, "uniqueWriterIdentity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.uniqueWriterIdentity); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. + * Encodes the specified UpdateSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode + * @param {google.logging.v2.IUpdateSinkRequest} message UpdateSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogExclusion message from the specified reader or buffer. + * Decodes an UpdateSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogExclusion.decode = function decode(reader, length) { + UpdateSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.sinkName = reader.string(); break; } case 2: { - message.description = reader.string(); + message.sink = $root.google.logging.v2.LogSink.decode(reader, reader.uint32()); break; } case 3: { - message.filter = reader.string(); + message.uniqueWriterIdentity = reader.bool(); break; } case 4: { - message.disabled = reader.bool(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -24300,175 +24892,157 @@ }; /** - * Decodes a LogExclusion message from the specified reader or buffer, length delimited. + * Decodes an UpdateSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogExclusion.decodeDelimited = function decodeDelimited(reader) { + UpdateSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogExclusion message. + * Verifies an UpdateSinkRequest message. * @function verify - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogExclusion.verify = function verify(message) { + UpdateSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; + if (message.sink != null && message.hasOwnProperty("sink")) { + var error = $root.google.logging.v2.LogSink.verify(message.sink); if (error) - return "createTime." + error; + return "sink." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + if (typeof message.uniqueWriterIdentity !== "boolean") + return "uniqueWriterIdentity: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "updateTime." + error; + return "updateMask." + error; } return null; }; /** - * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.LogExclusion} LogExclusion + * @returns {google.logging.v2.UpdateSinkRequest} UpdateSinkRequest */ - LogExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.LogExclusion) + UpdateSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSinkRequest) return object; - var message = new $root.google.logging.v2.LogExclusion(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.logging.v2.UpdateSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); + if (object.sink != null) { + if (typeof object.sink !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.sink: object expected"); + message.sink = $root.google.logging.v2.LogSink.fromObject(object.sink); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.uniqueWriterIdentity != null) + message.uniqueWriterIdentity = Boolean(object.uniqueWriterIdentity); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static - * @param {google.logging.v2.LogExclusion} message LogExclusion + * @param {google.logging.v2.UpdateSinkRequest} message UpdateSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogExclusion.toObject = function toObject(message, options) { + UpdateSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.disabled = false; - object.createTime = null; - object.updateTime = null; + object.sinkName = ""; + object.sink = null; + object.uniqueWriterIdentity = false; + object.updateMask = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; + if (message.sink != null && message.hasOwnProperty("sink")) + object.sink = $root.google.logging.v2.LogSink.toObject(message.sink, options); + if (message.uniqueWriterIdentity != null && message.hasOwnProperty("uniqueWriterIdentity")) + object.uniqueWriterIdentity = message.uniqueWriterIdentity; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this LogExclusion to JSON. + * Converts this UpdateSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @instance * @returns {Object.} JSON object */ - LogExclusion.prototype.toJSON = function toJSON() { + UpdateSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LogExclusion + * Gets the default type url for UpdateSinkRequest * @function getTypeUrl - * @memberof google.logging.v2.LogExclusion + * @memberof google.logging.v2.UpdateSinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LogExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.LogExclusion"; + return typeUrlPrefix + "/google.logging.v2.UpdateSinkRequest"; }; - return LogExclusion; + return UpdateSinkRequest; })(); - v2.ListExclusionsRequest = (function() { + v2.DeleteSinkRequest = (function() { /** - * Properties of a ListExclusionsRequest. + * Properties of a DeleteSinkRequest. * @memberof google.logging.v2 - * @interface IListExclusionsRequest - * @property {string|null} [parent] ListExclusionsRequest parent - * @property {string|null} [pageToken] ListExclusionsRequest pageToken - * @property {number|null} [pageSize] ListExclusionsRequest pageSize + * @interface IDeleteSinkRequest + * @property {string|null} [sinkName] DeleteSinkRequest sinkName */ /** - * Constructs a new ListExclusionsRequest. + * Constructs a new DeleteSinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsRequest. - * @implements IListExclusionsRequest + * @classdesc Represents a DeleteSinkRequest. + * @implements IDeleteSinkRequest * @constructor - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set */ - function ListExclusionsRequest(properties) { + function DeleteSinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24476,103 +25050,75 @@ } /** - * ListExclusionsRequest parent. - * @member {string} parent - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.parent = ""; - - /** - * ListExclusionsRequest pageToken. - * @member {string} pageToken - * @memberof google.logging.v2.ListExclusionsRequest - * @instance - */ - ListExclusionsRequest.prototype.pageToken = ""; - - /** - * ListExclusionsRequest pageSize. - * @member {number} pageSize - * @memberof google.logging.v2.ListExclusionsRequest + * DeleteSinkRequest sinkName. + * @member {string} sinkName + * @memberof google.logging.v2.DeleteSinkRequest * @instance */ - ListExclusionsRequest.prototype.pageSize = 0; + DeleteSinkRequest.prototype.sinkName = ""; /** - * Creates a new ListExclusionsRequest instance using the specified properties. + * Creates a new DeleteSinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance + * @param {google.logging.v2.IDeleteSinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest instance */ - ListExclusionsRequest.create = function create(properties) { - return new ListExclusionsRequest(properties); + DeleteSinkRequest.create = function create(properties) { + return new DeleteSinkRequest(properties); }; /** - * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsRequest.encode = function encode(message, writer) { + DeleteSinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.sinkName != null && Object.hasOwnProperty.call(message, "sinkName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sinkName); return writer; }; /** - * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. + * Encodes the specified DeleteSinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteSinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode + * @param {google.logging.v2.IDeleteSinkRequest} message DeleteSinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer. + * Decodes a DeleteSinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsRequest.decode = function decode(reader, length) { + DeleteSinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageToken = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); + message.sinkName = reader.string(); break; } default: @@ -24584,141 +25130,124 @@ }; /** - * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteSinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListExclusionsRequest message. + * Verifies a DeleteSinkRequest message. * @function verify - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListExclusionsRequest.verify = function verify(message) { + DeleteSinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + if (!$util.isString(message.sinkName)) + return "sinkName: string expected"; return null; }; /** - * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest + * @returns {google.logging.v2.DeleteSinkRequest} DeleteSinkRequest */ - ListExclusionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsRequest) + DeleteSinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteSinkRequest) return object; - var message = new $root.google.logging.v2.ListExclusionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.logging.v2.DeleteSinkRequest(); + if (object.sinkName != null) + message.sinkName = String(object.sinkName); return message; }; /** - * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static - * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest + * @param {google.logging.v2.DeleteSinkRequest} message DeleteSinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExclusionsRequest.toObject = function toObject(message, options) { + DeleteSinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (options.defaults) + object.sinkName = ""; + if (message.sinkName != null && message.hasOwnProperty("sinkName")) + object.sinkName = message.sinkName; return object; }; /** - * Converts this ListExclusionsRequest to JSON. + * Converts this DeleteSinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @instance * @returns {Object.} JSON object */ - ListExclusionsRequest.prototype.toJSON = function toJSON() { + DeleteSinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListExclusionsRequest + * Gets the default type url for DeleteSinkRequest * @function getTypeUrl - * @memberof google.logging.v2.ListExclusionsRequest + * @memberof google.logging.v2.DeleteSinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListExclusionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteSinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.ListExclusionsRequest"; + return typeUrlPrefix + "/google.logging.v2.DeleteSinkRequest"; }; - return ListExclusionsRequest; + return DeleteSinkRequest; })(); - v2.ListExclusionsResponse = (function() { + v2.CreateLinkRequest = (function() { /** - * Properties of a ListExclusionsResponse. + * Properties of a CreateLinkRequest. * @memberof google.logging.v2 - * @interface IListExclusionsResponse - * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions - * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken + * @interface ICreateLinkRequest + * @property {string|null} [parent] CreateLinkRequest parent + * @property {google.logging.v2.ILink|null} [link] CreateLinkRequest link + * @property {string|null} [linkId] CreateLinkRequest linkId */ /** - * Constructs a new ListExclusionsResponse. + * Constructs a new CreateLinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a ListExclusionsResponse. - * @implements IListExclusionsResponse + * @classdesc Represents a CreateLinkRequest. + * @implements ICreateLinkRequest * @constructor - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @param {google.logging.v2.ICreateLinkRequest=} [properties] Properties to set */ - function ListExclusionsResponse(properties) { - this.exclusions = []; + function CreateLinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24726,92 +25255,103 @@ } /** - * ListExclusionsResponse exclusions. - * @member {Array.} exclusions - * @memberof google.logging.v2.ListExclusionsResponse + * CreateLinkRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateLinkRequest * @instance */ - ListExclusionsResponse.prototype.exclusions = $util.emptyArray; + CreateLinkRequest.prototype.parent = ""; /** - * ListExclusionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.logging.v2.ListExclusionsResponse + * CreateLinkRequest link. + * @member {google.logging.v2.ILink|null|undefined} link + * @memberof google.logging.v2.CreateLinkRequest * @instance */ - ListExclusionsResponse.prototype.nextPageToken = ""; + CreateLinkRequest.prototype.link = null; /** - * Creates a new ListExclusionsResponse instance using the specified properties. + * CreateLinkRequest linkId. + * @member {string} linkId + * @memberof google.logging.v2.CreateLinkRequest + * @instance + */ + CreateLinkRequest.prototype.linkId = ""; + + /** + * Creates a new CreateLinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static - * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance + * @param {google.logging.v2.ICreateLinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateLinkRequest} CreateLinkRequest instance */ - ListExclusionsResponse.create = function create(properties) { - return new ListExclusionsResponse(properties); + CreateLinkRequest.create = function create(properties) { + return new CreateLinkRequest(properties); }; /** - * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * Encodes the specified CreateLinkRequest message. Does not implicitly {@link google.logging.v2.CreateLinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {google.logging.v2.ICreateLinkRequest} message CreateLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsResponse.encode = function encode(message, writer) { + CreateLinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.exclusions != null && message.exclusions.length) - for (var i = 0; i < message.exclusions.length; ++i) - $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.link != null && Object.hasOwnProperty.call(message, "link")) + $root.google.logging.v2.Link.encode(message.link, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.linkId != null && Object.hasOwnProperty.call(message, "linkId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.linkId); return writer; }; /** - * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. + * Encodes the specified CreateLinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateLinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static - * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode + * @param {google.logging.v2.ICreateLinkRequest} message CreateLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer. + * Decodes a CreateLinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.CreateLinkRequest} CreateLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsResponse.decode = function decode(reader, length) { + CreateLinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.exclusions && message.exclusions.length)) - message.exclusions = []; - message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.link = $root.google.logging.v2.Link.decode(reader, reader.uint32()); + break; + } + case 3: { + message.linkId = reader.string(); break; } default: @@ -24823,148 +25363,144 @@ }; /** - * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateLinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.CreateLinkRequest} CreateLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateLinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListExclusionsResponse message. + * Verifies a CreateLinkRequest message. * @function verify - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListExclusionsResponse.verify = function verify(message) { + CreateLinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.exclusions != null && message.hasOwnProperty("exclusions")) { - if (!Array.isArray(message.exclusions)) - return "exclusions: array expected"; - for (var i = 0; i < message.exclusions.length; ++i) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); - if (error) - return "exclusions." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.link != null && message.hasOwnProperty("link")) { + var error = $root.google.logging.v2.Link.verify(message.link); + if (error) + return "link." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.linkId != null && message.hasOwnProperty("linkId")) + if (!$util.isString(message.linkId)) + return "linkId: string expected"; return null; }; /** - * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateLinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse + * @returns {google.logging.v2.CreateLinkRequest} CreateLinkRequest */ - ListExclusionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.ListExclusionsResponse) + CreateLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateLinkRequest) return object; - var message = new $root.google.logging.v2.ListExclusionsResponse(); - if (object.exclusions) { - if (!Array.isArray(object.exclusions)) - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); - message.exclusions = []; - for (var i = 0; i < object.exclusions.length; ++i) { - if (typeof object.exclusions[i] !== "object") - throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); - message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); - } + var message = new $root.google.logging.v2.CreateLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.link != null) { + if (typeof object.link !== "object") + throw TypeError(".google.logging.v2.CreateLinkRequest.link: object expected"); + message.link = $root.google.logging.v2.Link.fromObject(object.link); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.linkId != null) + message.linkId = String(object.linkId); return message; }; /** - * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateLinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static - * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse + * @param {google.logging.v2.CreateLinkRequest} message CreateLinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExclusionsResponse.toObject = function toObject(message, options) { + CreateLinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.exclusions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.exclusions && message.exclusions.length) { - object.exclusions = []; - for (var j = 0; j < message.exclusions.length; ++j) - object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); + if (options.defaults) { + object.parent = ""; + object.link = null; + object.linkId = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.link != null && message.hasOwnProperty("link")) + object.link = $root.google.logging.v2.Link.toObject(message.link, options); + if (message.linkId != null && message.hasOwnProperty("linkId")) + object.linkId = message.linkId; return object; }; /** - * Converts this ListExclusionsResponse to JSON. + * Converts this CreateLinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @instance * @returns {Object.} JSON object */ - ListExclusionsResponse.prototype.toJSON = function toJSON() { + CreateLinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListExclusionsResponse + * Gets the default type url for CreateLinkRequest * @function getTypeUrl - * @memberof google.logging.v2.ListExclusionsResponse + * @memberof google.logging.v2.CreateLinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListExclusionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.ListExclusionsResponse"; + return typeUrlPrefix + "/google.logging.v2.CreateLinkRequest"; }; - return ListExclusionsResponse; + return CreateLinkRequest; })(); - v2.GetExclusionRequest = (function() { + v2.DeleteLinkRequest = (function() { /** - * Properties of a GetExclusionRequest. + * Properties of a DeleteLinkRequest. * @memberof google.logging.v2 - * @interface IGetExclusionRequest - * @property {string|null} [name] GetExclusionRequest name + * @interface IDeleteLinkRequest + * @property {string|null} [name] DeleteLinkRequest name */ /** - * Constructs a new GetExclusionRequest. + * Constructs a new DeleteLinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetExclusionRequest. - * @implements IGetExclusionRequest + * @classdesc Represents a DeleteLinkRequest. + * @implements IDeleteLinkRequest * @constructor - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IDeleteLinkRequest=} [properties] Properties to set */ - function GetExclusionRequest(properties) { + function DeleteLinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24972,35 +25508,35 @@ } /** - * GetExclusionRequest name. + * DeleteLinkRequest name. * @member {string} name - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @instance */ - GetExclusionRequest.prototype.name = ""; + DeleteLinkRequest.prototype.name = ""; /** - * Creates a new GetExclusionRequest instance using the specified properties. + * Creates a new DeleteLinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static - * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance + * @param {google.logging.v2.IDeleteLinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteLinkRequest} DeleteLinkRequest instance */ - GetExclusionRequest.create = function create(properties) { - return new GetExclusionRequest(properties); + DeleteLinkRequest.create = function create(properties) { + return new DeleteLinkRequest(properties); }; /** - * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * Encodes the specified DeleteLinkRequest message. Does not implicitly {@link google.logging.v2.DeleteLinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {google.logging.v2.IDeleteLinkRequest} message DeleteLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExclusionRequest.encode = function encode(message, writer) { + DeleteLinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -25009,33 +25545,33 @@ }; /** - * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. + * Encodes the specified DeleteLinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteLinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static - * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode + * @param {google.logging.v2.IDeleteLinkRequest} message DeleteLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer. + * Decodes a DeleteLinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.DeleteLinkRequest} DeleteLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decode = function decode(reader, length) { + DeleteLinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -25052,30 +25588,30 @@ }; /** - * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteLinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.DeleteLinkRequest} DeleteLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteLinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetExclusionRequest message. + * Verifies a DeleteLinkRequest message. * @function verify - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetExclusionRequest.verify = function verify(message) { + DeleteLinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -25085,32 +25621,32 @@ }; /** - * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest + * @returns {google.logging.v2.DeleteLinkRequest} DeleteLinkRequest */ - GetExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetExclusionRequest) + DeleteLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteLinkRequest) return object; - var message = new $root.google.logging.v2.GetExclusionRequest(); + var message = new $root.google.logging.v2.DeleteLinkRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteLinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static - * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest + * @param {google.logging.v2.DeleteLinkRequest} message DeleteLinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetExclusionRequest.toObject = function toObject(message, options) { + DeleteLinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -25122,53 +25658,54 @@ }; /** - * Converts this GetExclusionRequest to JSON. + * Converts this DeleteLinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @instance * @returns {Object.} JSON object */ - GetExclusionRequest.prototype.toJSON = function toJSON() { + DeleteLinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetExclusionRequest + * Gets the default type url for DeleteLinkRequest * @function getTypeUrl - * @memberof google.logging.v2.GetExclusionRequest + * @memberof google.logging.v2.DeleteLinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.GetExclusionRequest"; + return typeUrlPrefix + "/google.logging.v2.DeleteLinkRequest"; }; - return GetExclusionRequest; + return DeleteLinkRequest; })(); - v2.CreateExclusionRequest = (function() { + v2.ListLinksRequest = (function() { /** - * Properties of a CreateExclusionRequest. + * Properties of a ListLinksRequest. * @memberof google.logging.v2 - * @interface ICreateExclusionRequest - * @property {string|null} [parent] CreateExclusionRequest parent - * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion + * @interface IListLinksRequest + * @property {string|null} [parent] ListLinksRequest parent + * @property {string|null} [pageToken] ListLinksRequest pageToken + * @property {number|null} [pageSize] ListLinksRequest pageSize */ /** - * Constructs a new CreateExclusionRequest. + * Constructs a new ListLinksRequest. * @memberof google.logging.v2 - * @classdesc Represents a CreateExclusionRequest. - * @implements ICreateExclusionRequest + * @classdesc Represents a ListLinksRequest. + * @implements IListLinksRequest * @constructor - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLinksRequest=} [properties] Properties to set */ - function CreateExclusionRequest(properties) { + function ListLinksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25176,80 +25713,90 @@ } /** - * CreateExclusionRequest parent. + * ListLinksRequest parent. * @member {string} parent - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @instance */ - CreateExclusionRequest.prototype.parent = ""; + ListLinksRequest.prototype.parent = ""; /** - * CreateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.CreateExclusionRequest + * ListLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListLinksRequest * @instance */ - CreateExclusionRequest.prototype.exclusion = null; + ListLinksRequest.prototype.pageToken = ""; /** - * Creates a new CreateExclusionRequest instance using the specified properties. + * ListLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListLinksRequest + * @instance + */ + ListLinksRequest.prototype.pageSize = 0; + + /** + * Creates a new ListLinksRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static - * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance + * @param {google.logging.v2.IListLinksRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListLinksRequest} ListLinksRequest instance */ - CreateExclusionRequest.create = function create(properties) { - return new CreateExclusionRequest(properties); + ListLinksRequest.create = function create(properties) { + return new ListLinksRequest(properties); }; /** - * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * Encodes the specified ListLinksRequest message. Does not implicitly {@link google.logging.v2.ListLinksRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListLinksRequest} message ListLinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExclusionRequest.encode = function encode(message, writer) { + ListLinksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. + * Encodes the specified ListLinksRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListLinksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static - * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListLinksRequest} message ListLinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer. + * Decodes a ListLinksRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.ListLinksRequest} ListLinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExclusionRequest.decode = function decode(reader, length) { + ListLinksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -25258,7 +25805,11 @@ break; } case 2: { - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); break; } default: @@ -25270,138 +25821,141 @@ }; /** - * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLinksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.ListLinksRequest} ListLinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + ListLinksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateExclusionRequest message. + * Verifies a ListLinksRequest message. * @function verify - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateExclusionRequest.verify = function verify(message) { + ListLinksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLinksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest + * @returns {google.logging.v2.ListLinksRequest} ListLinksRequest */ - CreateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CreateExclusionRequest) + ListLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLinksRequest) return object; - var message = new $root.google.logging.v2.CreateExclusionRequest(); + var message = new $root.google.logging.v2.ListLinksRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLinksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static - * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest + * @param {google.logging.v2.ListLinksRequest} message ListLinksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateExclusionRequest.toObject = function toObject(message, options) { + ListLinksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.exclusion = null; + object.pageToken = ""; + object.pageSize = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this CreateExclusionRequest to JSON. + * Converts this ListLinksRequest to JSON. * @function toJSON - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @instance * @returns {Object.} JSON object */ - CreateExclusionRequest.prototype.toJSON = function toJSON() { + ListLinksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateExclusionRequest + * Gets the default type url for ListLinksRequest * @function getTypeUrl - * @memberof google.logging.v2.CreateExclusionRequest + * @memberof google.logging.v2.ListLinksRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.CreateExclusionRequest"; + return typeUrlPrefix + "/google.logging.v2.ListLinksRequest"; }; - return CreateExclusionRequest; + return ListLinksRequest; })(); - v2.UpdateExclusionRequest = (function() { + v2.ListLinksResponse = (function() { /** - * Properties of an UpdateExclusionRequest. + * Properties of a ListLinksResponse. * @memberof google.logging.v2 - * @interface IUpdateExclusionRequest - * @property {string|null} [name] UpdateExclusionRequest name - * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask + * @interface IListLinksResponse + * @property {Array.|null} [links] ListLinksResponse links + * @property {string|null} [nextPageToken] ListLinksResponse nextPageToken */ /** - * Constructs a new UpdateExclusionRequest. + * Constructs a new ListLinksResponse. * @memberof google.logging.v2 - * @classdesc Represents an UpdateExclusionRequest. - * @implements IUpdateExclusionRequest + * @classdesc Represents a ListLinksResponse. + * @implements IListLinksResponse * @constructor - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IListLinksResponse=} [properties] Properties to set */ - function UpdateExclusionRequest(properties) { + function ListLinksResponse(properties) { + this.links = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25409,103 +25963,92 @@ } /** - * UpdateExclusionRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateExclusionRequest - * @instance - */ - UpdateExclusionRequest.prototype.name = ""; - - /** - * UpdateExclusionRequest exclusion. - * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion - * @memberof google.logging.v2.UpdateExclusionRequest + * ListLinksResponse links. + * @member {Array.} links + * @memberof google.logging.v2.ListLinksResponse * @instance */ - UpdateExclusionRequest.prototype.exclusion = null; + ListLinksResponse.prototype.links = $util.emptyArray; /** - * UpdateExclusionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateExclusionRequest + * ListLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListLinksResponse * @instance */ - UpdateExclusionRequest.prototype.updateMask = null; + ListLinksResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateExclusionRequest instance using the specified properties. + * Creates a new ListLinksResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static - * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance + * @param {google.logging.v2.IListLinksResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListLinksResponse} ListLinksResponse instance */ - UpdateExclusionRequest.create = function create(properties) { - return new UpdateExclusionRequest(properties); + ListLinksResponse.create = function create(properties) { + return new ListLinksResponse(properties); }; /** - * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * Encodes the specified ListLinksResponse message. Does not implicitly {@link google.logging.v2.ListLinksResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListLinksResponse} message ListLinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExclusionRequest.encode = function encode(message, writer) { + ListLinksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.links != null && message.links.length) + for (var i = 0; i < message.links.length; ++i) + $root.google.logging.v2.Link.encode(message.links[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * Encodes the specified ListLinksResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListLinksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static - * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {google.logging.v2.IListLinksResponse} message ListLinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * Decodes a ListLinksResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.ListLinksResponse} ListLinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decode = function decode(reader, length) { + ListLinksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLinksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.links && message.links.length)) + message.links = []; + message.links.push($root.google.logging.v2.Link.decode(reader, reader.uint32())); break; } case 2: { - message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -25517,149 +26060,148 @@ }; /** - * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLinksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.ListLinksResponse} ListLinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + ListLinksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateExclusionRequest message. + * Verifies a ListLinksResponse message. * @function verify - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateExclusionRequest.verify = function verify(message) { + ListLinksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.links != null && message.hasOwnProperty("links")) { + if (!Array.isArray(message.links)) + return "links: array expected"; + for (var i = 0; i < message.links.length; ++i) { + var error = $root.google.logging.v2.Link.verify(message.links[i]); + if (error) + return "links." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLinksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @returns {google.logging.v2.ListLinksResponse} ListLinksResponse */ - UpdateExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) + ListLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListLinksResponse) return object; - var message = new $root.google.logging.v2.UpdateExclusionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); - message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.logging.v2.ListLinksResponse(); + if (object.links) { + if (!Array.isArray(object.links)) + throw TypeError(".google.logging.v2.ListLinksResponse.links: array expected"); + message.links = []; + for (var i = 0; i < object.links.length; ++i) { + if (typeof object.links[i] !== "object") + throw TypeError(".google.logging.v2.ListLinksResponse.links: object expected"); + message.links[i] = $root.google.logging.v2.Link.fromObject(object.links[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLinksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static - * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest + * @param {google.logging.v2.ListLinksResponse} message ListLinksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateExclusionRequest.toObject = function toObject(message, options) { + ListLinksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.exclusion = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.links = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.links && message.links.length) { + object.links = []; + for (var j = 0; j < message.links.length; ++j) + object.links[j] = $root.google.logging.v2.Link.toObject(message.links[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateExclusionRequest to JSON. + * Converts this ListLinksResponse to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @instance * @returns {Object.} JSON object */ - UpdateExclusionRequest.prototype.toJSON = function toJSON() { + ListLinksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateExclusionRequest + * Gets the default type url for ListLinksResponse * @function getTypeUrl - * @memberof google.logging.v2.UpdateExclusionRequest + * @memberof google.logging.v2.ListLinksResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.UpdateExclusionRequest"; + return typeUrlPrefix + "/google.logging.v2.ListLinksResponse"; }; - return UpdateExclusionRequest; + return ListLinksResponse; })(); - v2.DeleteExclusionRequest = (function() { + v2.GetLinkRequest = (function() { /** - * Properties of a DeleteExclusionRequest. + * Properties of a GetLinkRequest. * @memberof google.logging.v2 - * @interface IDeleteExclusionRequest - * @property {string|null} [name] DeleteExclusionRequest name + * @interface IGetLinkRequest + * @property {string|null} [name] GetLinkRequest name */ /** - * Constructs a new DeleteExclusionRequest. + * Constructs a new GetLinkRequest. * @memberof google.logging.v2 - * @classdesc Represents a DeleteExclusionRequest. - * @implements IDeleteExclusionRequest + * @classdesc Represents a GetLinkRequest. + * @implements IGetLinkRequest * @constructor - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @param {google.logging.v2.IGetLinkRequest=} [properties] Properties to set */ - function DeleteExclusionRequest(properties) { + function GetLinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25667,35 +26209,35 @@ } /** - * DeleteExclusionRequest name. + * GetLinkRequest name. * @member {string} name - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @instance */ - DeleteExclusionRequest.prototype.name = ""; + GetLinkRequest.prototype.name = ""; /** - * Creates a new DeleteExclusionRequest instance using the specified properties. + * Creates a new GetLinkRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static - * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + * @param {google.logging.v2.IGetLinkRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetLinkRequest} GetLinkRequest instance */ - DeleteExclusionRequest.create = function create(properties) { - return new DeleteExclusionRequest(properties); + GetLinkRequest.create = function create(properties) { + return new GetLinkRequest(properties); }; /** - * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified GetLinkRequest message. Does not implicitly {@link google.logging.v2.GetLinkRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.IGetLinkRequest} message GetLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encode = function encode(message, writer) { + GetLinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -25704,33 +26246,33 @@ }; /** - * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * Encodes the specified GetLinkRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetLinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static - * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {google.logging.v2.IGetLinkRequest} message GetLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * Decodes a GetLinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.GetLinkRequest} GetLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decode = function decode(reader, length) { + GetLinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -25747,30 +26289,30 @@ }; /** - * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * Decodes a GetLinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.GetLinkRequest} GetLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + GetLinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteExclusionRequest message. + * Verifies a GetLinkRequest message. * @function verify - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteExclusionRequest.verify = function verify(message) { + GetLinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -25780,32 +26322,32 @@ }; /** - * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetLinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @returns {google.logging.v2.GetLinkRequest} GetLinkRequest */ - DeleteExclusionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + GetLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetLinkRequest) return object; - var message = new $root.google.logging.v2.DeleteExclusionRequest(); + var message = new $root.google.logging.v2.GetLinkRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetLinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static - * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {google.logging.v2.GetLinkRequest} message GetLinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteExclusionRequest.toObject = function toObject(message, options) { + GetLinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -25817,52 +26359,57 @@ }; /** - * Converts this DeleteExclusionRequest to JSON. + * Converts this GetLinkRequest to JSON. * @function toJSON - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @instance * @returns {Object.} JSON object */ - DeleteExclusionRequest.prototype.toJSON = function toJSON() { + GetLinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteExclusionRequest + * Gets the default type url for GetLinkRequest * @function getTypeUrl - * @memberof google.logging.v2.DeleteExclusionRequest + * @memberof google.logging.v2.GetLinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.DeleteExclusionRequest"; + return typeUrlPrefix + "/google.logging.v2.GetLinkRequest"; }; - return DeleteExclusionRequest; + return GetLinkRequest; })(); - v2.GetCmekSettingsRequest = (function() { + v2.LogExclusion = (function() { /** - * Properties of a GetCmekSettingsRequest. + * Properties of a LogExclusion. * @memberof google.logging.v2 - * @interface IGetCmekSettingsRequest - * @property {string|null} [name] GetCmekSettingsRequest name + * @interface ILogExclusion + * @property {string|null} [name] LogExclusion name + * @property {string|null} [description] LogExclusion description + * @property {string|null} [filter] LogExclusion filter + * @property {boolean|null} [disabled] LogExclusion disabled + * @property {google.protobuf.ITimestamp|null} [createTime] LogExclusion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LogExclusion updateTime */ /** - * Constructs a new GetCmekSettingsRequest. + * Constructs a new LogExclusion. * @memberof google.logging.v2 - * @classdesc Represents a GetCmekSettingsRequest. - * @implements IGetCmekSettingsRequest + * @classdesc Represents a LogExclusion. + * @implements ILogExclusion * @constructor - * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set */ - function GetCmekSettingsRequest(properties) { + function LogExclusion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25870,70 +26417,120 @@ } /** - * GetCmekSettingsRequest name. + * LogExclusion name. * @member {string} name - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @instance */ - GetCmekSettingsRequest.prototype.name = ""; + LogExclusion.prototype.name = ""; /** - * Creates a new GetCmekSettingsRequest instance using the specified properties. + * LogExclusion description. + * @member {string} description + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.description = ""; + + /** + * LogExclusion filter. + * @member {string} filter + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.filter = ""; + + /** + * LogExclusion disabled. + * @member {boolean} disabled + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.disabled = false; + + /** + * LogExclusion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.createTime = null; + + /** + * LogExclusion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.logging.v2.LogExclusion + * @instance + */ + LogExclusion.prototype.updateTime = null; + + /** + * Creates a new LogExclusion instance using the specified properties. * @function create - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest instance + * @param {google.logging.v2.ILogExclusion=} [properties] Properties to set + * @returns {google.logging.v2.LogExclusion} LogExclusion instance */ - GetCmekSettingsRequest.create = function create(properties) { - return new GetCmekSettingsRequest(properties); + LogExclusion.create = function create(properties) { + return new LogExclusion(properties); }; /** - * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * Encodes the specified LogExclusion message. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCmekSettingsRequest.encode = function encode(message, writer) { + LogExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * Encodes the specified LogExclusion message, length delimited. Does not implicitly {@link google.logging.v2.LogExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.ILogExclusion} message LogExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + LogExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * Decodes a LogExclusion message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCmekSettingsRequest.decode = function decode(reader, length) { + LogExclusion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetCmekSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -25941,6 +26538,26 @@ message.name = reader.string(); break; } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 4: { + message.disabled = reader.bool(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25950,124 +26567,175 @@ }; /** - * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a LogExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.LogExclusion} LogExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + LogExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCmekSettingsRequest message. + * Verifies a LogExclusion message. * @function verify - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCmekSettingsRequest.verify = function verify(message) { + LogExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LogExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @returns {google.logging.v2.LogExclusion} LogExclusion */ - GetCmekSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetCmekSettingsRequest) + LogExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LogExclusion) return object; - var message = new $root.google.logging.v2.GetCmekSettingsRequest(); + var message = new $root.google.logging.v2.LogExclusion(); if (object.name != null) message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.logging.v2.LogExclusion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a LogExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static - * @param {google.logging.v2.GetCmekSettingsRequest} message GetCmekSettingsRequest + * @param {google.logging.v2.LogExclusion} message LogExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCmekSettingsRequest.toObject = function toObject(message, options) { + LogExclusion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.description = ""; + object.filter = ""; + object.disabled = false; + object.createTime = null; + object.updateTime = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this GetCmekSettingsRequest to JSON. + * Converts this LogExclusion to JSON. * @function toJSON - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @instance * @returns {Object.} JSON object */ - GetCmekSettingsRequest.prototype.toJSON = function toJSON() { + LogExclusion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCmekSettingsRequest + * Gets the default type url for LogExclusion * @function getTypeUrl - * @memberof google.logging.v2.GetCmekSettingsRequest + * @memberof google.logging.v2.LogExclusion * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCmekSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LogExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.GetCmekSettingsRequest"; + return typeUrlPrefix + "/google.logging.v2.LogExclusion"; }; - return GetCmekSettingsRequest; + return LogExclusion; })(); - v2.UpdateCmekSettingsRequest = (function() { + v2.ListExclusionsRequest = (function() { /** - * Properties of an UpdateCmekSettingsRequest. + * Properties of a ListExclusionsRequest. * @memberof google.logging.v2 - * @interface IUpdateCmekSettingsRequest - * @property {string|null} [name] UpdateCmekSettingsRequest name - * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] UpdateCmekSettingsRequest cmekSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmekSettingsRequest updateMask + * @interface IListExclusionsRequest + * @property {string|null} [parent] ListExclusionsRequest parent + * @property {string|null} [pageToken] ListExclusionsRequest pageToken + * @property {number|null} [pageSize] ListExclusionsRequest pageSize */ /** - * Constructs a new UpdateCmekSettingsRequest. + * Constructs a new ListExclusionsRequest. * @memberof google.logging.v2 - * @classdesc Represents an UpdateCmekSettingsRequest. - * @implements IUpdateCmekSettingsRequest + * @classdesc Represents a ListExclusionsRequest. + * @implements IListExclusionsRequest * @constructor - * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set */ - function UpdateCmekSettingsRequest(properties) { + function ListExclusionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26075,103 +26743,103 @@ } /** - * UpdateCmekSettingsRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * ListExclusionsRequest parent. + * @member {string} parent + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - UpdateCmekSettingsRequest.prototype.name = ""; + ListExclusionsRequest.prototype.parent = ""; /** - * UpdateCmekSettingsRequest cmekSettings. - * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * ListExclusionsRequest pageToken. + * @member {string} pageToken + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - UpdateCmekSettingsRequest.prototype.cmekSettings = null; + ListExclusionsRequest.prototype.pageToken = ""; /** - * UpdateCmekSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * ListExclusionsRequest pageSize. + * @member {number} pageSize + * @memberof google.logging.v2.ListExclusionsRequest * @instance */ - UpdateCmekSettingsRequest.prototype.updateMask = null; + ListExclusionsRequest.prototype.pageSize = 0; /** - * Creates a new UpdateCmekSettingsRequest instance using the specified properties. + * Creates a new ListExclusionsRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest instance + * @param {google.logging.v2.IListExclusionsRequest=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest instance */ - UpdateCmekSettingsRequest.create = function create(properties) { - return new UpdateCmekSettingsRequest(properties); + ListExclusionsRequest.create = function create(properties) { + return new ListExclusionsRequest(properties); }; /** - * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * Encodes the specified ListExclusionsRequest message. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCmekSettingsRequest.encode = function encode(message, writer) { + ListExclusionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cmekSettings != null && Object.hasOwnProperty.call(message, "cmekSettings")) - $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * Encodes the specified ListExclusionsRequest message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {google.logging.v2.IListExclusionsRequest} message ListExclusionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListExclusionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. + * Decodes a ListExclusionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCmekSettingsRequest.decode = function decode(reader, length) { + ListExclusionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } default: @@ -26183,151 +26851,141 @@ }; /** - * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListExclusionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateCmekSettingsRequest message. + * Verifies a ListExclusionsRequest message. * @function verify - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateCmekSettingsRequest.verify = function verify(message) { + ListExclusionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { - var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); - if (error) - return "cmekSettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @returns {google.logging.v2.ListExclusionsRequest} ListExclusionsRequest */ - UpdateCmekSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateCmekSettingsRequest) + ListExclusionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsRequest) return object; - var message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.cmekSettings != null) { - if (typeof object.cmekSettings !== "object") - throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.cmekSettings: object expected"); - message.cmekSettings = $root.google.logging.v2.CmekSettings.fromObject(object.cmekSettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.logging.v2.ListExclusionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListExclusionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static - * @param {google.logging.v2.UpdateCmekSettingsRequest} message UpdateCmekSettingsRequest + * @param {google.logging.v2.ListExclusionsRequest} message ListExclusionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCmekSettingsRequest.toObject = function toObject(message, options) { + ListExclusionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.cmekSettings = null; - object.updateMask = null; + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) - object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this UpdateCmekSettingsRequest to JSON. + * Converts this ListExclusionsRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @instance * @returns {Object.} JSON object */ - UpdateCmekSettingsRequest.prototype.toJSON = function toJSON() { + ListExclusionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateCmekSettingsRequest + * Gets the default type url for ListExclusionsRequest * @function getTypeUrl - * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @memberof google.logging.v2.ListExclusionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateCmekSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListExclusionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.UpdateCmekSettingsRequest"; + return typeUrlPrefix + "/google.logging.v2.ListExclusionsRequest"; }; - return UpdateCmekSettingsRequest; + return ListExclusionsRequest; })(); - v2.CmekSettings = (function() { + v2.ListExclusionsResponse = (function() { /** - * Properties of a CmekSettings. + * Properties of a ListExclusionsResponse. * @memberof google.logging.v2 - * @interface ICmekSettings - * @property {string|null} [name] CmekSettings name - * @property {string|null} [kmsKeyName] CmekSettings kmsKeyName - * @property {string|null} [serviceAccountId] CmekSettings serviceAccountId + * @interface IListExclusionsResponse + * @property {Array.|null} [exclusions] ListExclusionsResponse exclusions + * @property {string|null} [nextPageToken] ListExclusionsResponse nextPageToken */ /** - * Constructs a new CmekSettings. + * Constructs a new ListExclusionsResponse. * @memberof google.logging.v2 - * @classdesc Represents a CmekSettings. - * @implements ICmekSettings + * @classdesc Represents a ListExclusionsResponse. + * @implements IListExclusionsResponse * @constructor - * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set */ - function CmekSettings(properties) { + function ListExclusionsResponse(properties) { + this.exclusions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26335,103 +26993,92 @@ } /** - * CmekSettings name. - * @member {string} name - * @memberof google.logging.v2.CmekSettings - * @instance - */ - CmekSettings.prototype.name = ""; - - /** - * CmekSettings kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.logging.v2.CmekSettings + * ListExclusionsResponse exclusions. + * @member {Array.} exclusions + * @memberof google.logging.v2.ListExclusionsResponse * @instance */ - CmekSettings.prototype.kmsKeyName = ""; + ListExclusionsResponse.prototype.exclusions = $util.emptyArray; /** - * CmekSettings serviceAccountId. - * @member {string} serviceAccountId - * @memberof google.logging.v2.CmekSettings + * ListExclusionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.logging.v2.ListExclusionsResponse * @instance */ - CmekSettings.prototype.serviceAccountId = ""; + ListExclusionsResponse.prototype.nextPageToken = ""; /** - * Creates a new CmekSettings instance using the specified properties. + * Creates a new ListExclusionsResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set - * @returns {google.logging.v2.CmekSettings} CmekSettings instance + * @param {google.logging.v2.IListExclusionsResponse=} [properties] Properties to set + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse instance */ - CmekSettings.create = function create(properties) { - return new CmekSettings(properties); + ListExclusionsResponse.create = function create(properties) { + return new ListExclusionsResponse(properties); }; /** - * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * Encodes the specified ListExclusionsResponse message. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CmekSettings.encode = function encode(message, writer) { + ListExclusionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); - if (message.serviceAccountId != null && Object.hasOwnProperty.call(message, "serviceAccountId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountId); + if (message.exclusions != null && message.exclusions.length) + for (var i = 0; i < message.exclusions.length; ++i) + $root.google.logging.v2.LogExclusion.encode(message.exclusions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * Encodes the specified ListExclusionsResponse message, length delimited. Does not implicitly {@link google.logging.v2.ListExclusionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {google.logging.v2.IListExclusionsResponse} message ListExclusionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CmekSettings.encodeDelimited = function encodeDelimited(message, writer) { + ListExclusionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CmekSettings message from the specified reader or buffer. + * Decodes a ListExclusionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CmekSettings.decode = function decode(reader, length) { + ListExclusionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CmekSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.exclusions && message.exclusions.length)) + message.exclusions = []; + message.exclusions.push($root.google.logging.v2.LogExclusion.decode(reader, reader.uint32())); break; } case 2: { - message.kmsKeyName = reader.string(); - break; - } - case 3: { - message.serviceAccountId = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -26443,139 +27090,148 @@ }; /** - * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * Decodes a ListExclusionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CmekSettings.decodeDelimited = function decodeDelimited(reader) { + ListExclusionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CmekSettings message. + * Verifies a ListExclusionsResponse message. * @function verify - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CmekSettings.verify = function verify(message) { + ListExclusionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) - if (!$util.isString(message.serviceAccountId)) - return "serviceAccountId: string expected"; + if (message.exclusions != null && message.hasOwnProperty("exclusions")) { + if (!Array.isArray(message.exclusions)) + return "exclusions: array expected"; + for (var i = 0; i < message.exclusions.length; ++i) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusions[i]); + if (error) + return "exclusions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListExclusionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CmekSettings} CmekSettings + * @returns {google.logging.v2.ListExclusionsResponse} ListExclusionsResponse */ - CmekSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CmekSettings) + ListExclusionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.ListExclusionsResponse) return object; - var message = new $root.google.logging.v2.CmekSettings(); - if (object.name != null) - message.name = String(object.name); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.serviceAccountId != null) - message.serviceAccountId = String(object.serviceAccountId); + var message = new $root.google.logging.v2.ListExclusionsResponse(); + if (object.exclusions) { + if (!Array.isArray(object.exclusions)) + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: array expected"); + message.exclusions = []; + for (var i = 0; i < object.exclusions.length; ++i) { + if (typeof object.exclusions[i] !== "object") + throw TypeError(".google.logging.v2.ListExclusionsResponse.exclusions: object expected"); + message.exclusions[i] = $root.google.logging.v2.LogExclusion.fromObject(object.exclusions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * Creates a plain object from a ListExclusionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static - * @param {google.logging.v2.CmekSettings} message CmekSettings + * @param {google.logging.v2.ListExclusionsResponse} message ListExclusionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CmekSettings.toObject = function toObject(message, options) { + ListExclusionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.kmsKeyName = ""; - object.serviceAccountId = ""; + if (options.arrays || options.defaults) + object.exclusions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.exclusions && message.exclusions.length) { + object.exclusions = []; + for (var j = 0; j < message.exclusions.length; ++j) + object.exclusions[j] = $root.google.logging.v2.LogExclusion.toObject(message.exclusions[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) - object.serviceAccountId = message.serviceAccountId; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CmekSettings to JSON. + * Converts this ListExclusionsResponse to JSON. * @function toJSON - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @instance * @returns {Object.} JSON object */ - CmekSettings.prototype.toJSON = function toJSON() { + ListExclusionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CmekSettings + * Gets the default type url for ListExclusionsResponse * @function getTypeUrl - * @memberof google.logging.v2.CmekSettings + * @memberof google.logging.v2.ListExclusionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CmekSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListExclusionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.CmekSettings"; + return typeUrlPrefix + "/google.logging.v2.ListExclusionsResponse"; }; - return CmekSettings; + return ListExclusionsResponse; })(); - v2.GetSettingsRequest = (function() { + v2.GetExclusionRequest = (function() { /** - * Properties of a GetSettingsRequest. + * Properties of a GetExclusionRequest. * @memberof google.logging.v2 - * @interface IGetSettingsRequest - * @property {string|null} [name] GetSettingsRequest name + * @interface IGetExclusionRequest + * @property {string|null} [name] GetExclusionRequest name */ /** - * Constructs a new GetSettingsRequest. + * Constructs a new GetExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a GetSettingsRequest. - * @implements IGetSettingsRequest + * @classdesc Represents a GetExclusionRequest. + * @implements IGetExclusionRequest * @constructor - * @param {google.logging.v2.IGetSettingsRequest=} [properties] Properties to set + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set */ - function GetSettingsRequest(properties) { + function GetExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26583,35 +27239,35 @@ } /** - * GetSettingsRequest name. + * GetExclusionRequest name. * @member {string} name - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @instance */ - GetSettingsRequest.prototype.name = ""; + GetExclusionRequest.prototype.name = ""; /** - * Creates a new GetSettingsRequest instance using the specified properties. + * Creates a new GetExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IGetSettingsRequest=} [properties] Properties to set - * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest instance + * @param {google.logging.v2.IGetExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest instance */ - GetSettingsRequest.create = function create(properties) { - return new GetSettingsRequest(properties); + GetExclusionRequest.create = function create(properties) { + return new GetExclusionRequest(properties); }; /** - * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.logging.v2.GetSettingsRequest.verify|verify} messages. + * Encodes the specified GetExclusionRequest message. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSettingsRequest.encode = function encode(message, writer) { + GetExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -26620,33 +27276,33 @@ }; /** - * Encodes the specified GetSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSettingsRequest.verify|verify} messages. + * Encodes the specified GetExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {google.logging.v2.IGetExclusionRequest} message GetExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSettingsRequest message from the specified reader or buffer. + * Decodes a GetExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSettingsRequest.decode = function decode(reader, length) { + GetExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -26663,30 +27319,30 @@ }; /** - * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + GetExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSettingsRequest message. + * Verifies a GetExclusionRequest message. * @function verify - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSettingsRequest.verify = function verify(message) { + GetExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -26696,32 +27352,32 @@ }; /** - * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest + * @returns {google.logging.v2.GetExclusionRequest} GetExclusionRequest */ - GetSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.GetSettingsRequest) + GetExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetExclusionRequest) return object; - var message = new $root.google.logging.v2.GetSettingsRequest(); + var message = new $root.google.logging.v2.GetExclusionRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static - * @param {google.logging.v2.GetSettingsRequest} message GetSettingsRequest + * @param {google.logging.v2.GetExclusionRequest} message GetExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSettingsRequest.toObject = function toObject(message, options) { + GetExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -26733,54 +27389,53 @@ }; /** - * Converts this GetSettingsRequest to JSON. + * Converts this GetExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @instance * @returns {Object.} JSON object */ - GetSettingsRequest.prototype.toJSON = function toJSON() { + GetExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSettingsRequest + * Gets the default type url for GetExclusionRequest * @function getTypeUrl - * @memberof google.logging.v2.GetSettingsRequest + * @memberof google.logging.v2.GetExclusionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.GetSettingsRequest"; + return typeUrlPrefix + "/google.logging.v2.GetExclusionRequest"; }; - return GetSettingsRequest; + return GetExclusionRequest; })(); - v2.UpdateSettingsRequest = (function() { + v2.CreateExclusionRequest = (function() { /** - * Properties of an UpdateSettingsRequest. + * Properties of a CreateExclusionRequest. * @memberof google.logging.v2 - * @interface IUpdateSettingsRequest - * @property {string|null} [name] UpdateSettingsRequest name - * @property {google.logging.v2.ISettings|null} [settings] UpdateSettingsRequest settings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSettingsRequest updateMask + * @interface ICreateExclusionRequest + * @property {string|null} [parent] CreateExclusionRequest parent + * @property {google.logging.v2.ILogExclusion|null} [exclusion] CreateExclusionRequest exclusion */ /** - * Constructs a new UpdateSettingsRequest. + * Constructs a new CreateExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents an UpdateSettingsRequest. - * @implements IUpdateSettingsRequest + * @classdesc Represents a CreateExclusionRequest. + * @implements ICreateExclusionRequest * @constructor - * @param {google.logging.v2.IUpdateSettingsRequest=} [properties] Properties to set + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set */ - function UpdateSettingsRequest(properties) { + function CreateExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26788,103 +27443,89 @@ } /** - * UpdateSettingsRequest name. - * @member {string} name - * @memberof google.logging.v2.UpdateSettingsRequest - * @instance - */ - UpdateSettingsRequest.prototype.name = ""; - - /** - * UpdateSettingsRequest settings. - * @member {google.logging.v2.ISettings|null|undefined} settings - * @memberof google.logging.v2.UpdateSettingsRequest + * CreateExclusionRequest parent. + * @member {string} parent + * @memberof google.logging.v2.CreateExclusionRequest * @instance */ - UpdateSettingsRequest.prototype.settings = null; + CreateExclusionRequest.prototype.parent = ""; /** - * UpdateSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.logging.v2.UpdateSettingsRequest + * CreateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.CreateExclusionRequest * @instance */ - UpdateSettingsRequest.prototype.updateMask = null; + CreateExclusionRequest.prototype.exclusion = null; /** - * Creates a new UpdateSettingsRequest instance using the specified properties. + * Creates a new CreateExclusionRequest instance using the specified properties. * @function create - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.IUpdateSettingsRequest=} [properties] Properties to set - * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest instance + * @param {google.logging.v2.ICreateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest instance */ - UpdateSettingsRequest.create = function create(properties) { - return new UpdateSettingsRequest(properties); + CreateExclusionRequest.create = function create(properties) { + return new CreateExclusionRequest(properties); }; /** - * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateSettingsRequest.verify|verify} messages. + * Encodes the specified CreateExclusionRequest message. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. * @function encode - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSettingsRequest.encode = function encode(message, writer) { + CreateExclusionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) - $root.google.logging.v2.Settings.encode(message.settings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSettingsRequest.verify|verify} messages. + * Encodes the specified CreateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.CreateExclusionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {google.logging.v2.ICreateExclusionRequest} message CreateExclusionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSettingsRequest message from the specified reader or buffer. + * Decodes a CreateExclusionRequest message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSettingsRequest.decode = function decode(reader, length) { + CreateExclusionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.settings = $root.google.logging.v2.Settings.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); break; } default: @@ -26896,153 +27537,138 @@ }; /** - * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateExclusionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSettingsRequest message. + * Verifies a CreateExclusionRequest message. * @function verify - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSettingsRequest.verify = function verify(message) { + CreateExclusionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.settings != null && message.hasOwnProperty("settings")) { - var error = $root.google.logging.v2.Settings.verify(message.settings); - if (error) - return "settings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); if (error) - return "updateMask." + error; + return "exclusion." + error; } return null; }; /** - * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExclusionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest + * @returns {google.logging.v2.CreateExclusionRequest} CreateExclusionRequest */ - UpdateSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.UpdateSettingsRequest) + CreateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CreateExclusionRequest) return object; - var message = new $root.google.logging.v2.UpdateSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.settings != null) { - if (typeof object.settings !== "object") - throw TypeError(".google.logging.v2.UpdateSettingsRequest.settings: object expected"); - message.settings = $root.google.logging.v2.Settings.fromObject(object.settings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.logging.v2.UpdateSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.logging.v2.CreateExclusionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.CreateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); } return message; }; /** - * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateExclusionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static - * @param {google.logging.v2.UpdateSettingsRequest} message UpdateSettingsRequest + * @param {google.logging.v2.CreateExclusionRequest} message CreateExclusionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSettingsRequest.toObject = function toObject(message, options) { + CreateExclusionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.settings = null; - object.updateMask = null; + object.parent = ""; + object.exclusion = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.settings != null && message.hasOwnProperty("settings")) - object.settings = $root.google.logging.v2.Settings.toObject(message.settings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); return object; }; /** - * Converts this UpdateSettingsRequest to JSON. + * Converts this CreateExclusionRequest to JSON. * @function toJSON - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @instance * @returns {Object.} JSON object */ - UpdateSettingsRequest.prototype.toJSON = function toJSON() { + CreateExclusionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSettingsRequest + * Gets the default type url for CreateExclusionRequest * @function getTypeUrl - * @memberof google.logging.v2.UpdateSettingsRequest + * @memberof google.logging.v2.CreateExclusionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.UpdateSettingsRequest"; + return typeUrlPrefix + "/google.logging.v2.CreateExclusionRequest"; }; - return UpdateSettingsRequest; + return CreateExclusionRequest; })(); - v2.Settings = (function() { + v2.UpdateExclusionRequest = (function() { /** - * Properties of a Settings. + * Properties of an UpdateExclusionRequest. * @memberof google.logging.v2 - * @interface ISettings - * @property {string|null} [name] Settings name - * @property {string|null} [kmsKeyName] Settings kmsKeyName - * @property {string|null} [kmsServiceAccountId] Settings kmsServiceAccountId - * @property {string|null} [storageLocation] Settings storageLocation - * @property {boolean|null} [disableDefaultSink] Settings disableDefaultSink + * @interface IUpdateExclusionRequest + * @property {string|null} [name] UpdateExclusionRequest name + * @property {google.logging.v2.ILogExclusion|null} [exclusion] UpdateExclusionRequest exclusion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExclusionRequest updateMask */ /** - * Constructs a new Settings. + * Constructs a new UpdateExclusionRequest. * @memberof google.logging.v2 - * @classdesc Represents a Settings. - * @implements ISettings + * @classdesc Represents an UpdateExclusionRequest. + * @implements IUpdateExclusionRequest * @constructor - * @param {google.logging.v2.ISettings=} [properties] Properties to set + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set */ - function Settings(properties) { + function UpdateExclusionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27050,131 +27676,2682 @@ } /** - * Settings name. + * UpdateExclusionRequest name. * @member {string} name - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - Settings.prototype.name = ""; + UpdateExclusionRequest.prototype.name = ""; /** - * Settings kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.logging.v2.Settings - * @instance - */ - Settings.prototype.kmsKeyName = ""; + * UpdateExclusionRequest exclusion. + * @member {google.logging.v2.ILogExclusion|null|undefined} exclusion + * @memberof google.logging.v2.UpdateExclusionRequest + * @instance + */ + UpdateExclusionRequest.prototype.exclusion = null; /** - * Settings kmsServiceAccountId. - * @member {string} kmsServiceAccountId - * @memberof google.logging.v2.Settings + * UpdateExclusionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateExclusionRequest * @instance */ - Settings.prototype.kmsServiceAccountId = ""; + UpdateExclusionRequest.prototype.updateMask = null; /** - * Settings storageLocation. - * @member {string} storageLocation - * @memberof google.logging.v2.Settings + * Creates a new UpdateExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest instance + */ + UpdateExclusionRequest.create = function create(properties) { + return new UpdateExclusionRequest(properties); + }; + + /** + * Encodes the specified UpdateExclusionRequest message. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.logging.v2.LogExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.IUpdateExclusionRequest} message UpdateExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.exclusion = $root.google.logging.v2.LogExclusion.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateExclusionRequest message. + * @function verify + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.logging.v2.LogExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateExclusionRequest} UpdateExclusionRequest + */ + UpdateExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateExclusionRequest) + return object; + var message = new $root.google.logging.v2.UpdateExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.exclusion: object expected"); + message.exclusion = $root.google.logging.v2.LogExclusion.fromObject(object.exclusion); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateExclusionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {google.logging.v2.UpdateExclusionRequest} message UpdateExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.exclusion = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.logging.v2.LogExclusion.toObject(message.exclusion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateExclusionRequest * @instance + * @returns {Object.} JSON object */ - Settings.prototype.storageLocation = ""; + UpdateExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateExclusionRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateExclusionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateExclusionRequest"; + }; + + return UpdateExclusionRequest; + })(); + + v2.DeleteExclusionRequest = (function() { + + /** + * Properties of a DeleteExclusionRequest. + * @memberof google.logging.v2 + * @interface IDeleteExclusionRequest + * @property {string|null} [name] DeleteExclusionRequest name + */ + + /** + * Constructs a new DeleteExclusionRequest. + * @memberof google.logging.v2 + * @classdesc Represents a DeleteExclusionRequest. + * @implements IDeleteExclusionRequest + * @constructor + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + */ + function DeleteExclusionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteExclusionRequest name. + * @member {string} name + * @memberof google.logging.v2.DeleteExclusionRequest + * @instance + */ + DeleteExclusionRequest.prototype.name = ""; + + /** + * Creates a new DeleteExclusionRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest=} [properties] Properties to set + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest instance + */ + DeleteExclusionRequest.create = function create(properties) { + return new DeleteExclusionRequest(properties); + }; + + /** + * Encodes the specified DeleteExclusionRequest message. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExclusionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteExclusionRequest message, length delimited. Does not implicitly {@link google.logging.v2.DeleteExclusionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.IDeleteExclusionRequest} message DeleteExclusionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExclusionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExclusionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteExclusionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExclusionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteExclusionRequest message. + * @function verify + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteExclusionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteExclusionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.DeleteExclusionRequest} DeleteExclusionRequest + */ + DeleteExclusionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.DeleteExclusionRequest) + return object; + var message = new $root.google.logging.v2.DeleteExclusionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteExclusionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {google.logging.v2.DeleteExclusionRequest} message DeleteExclusionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteExclusionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteExclusionRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.DeleteExclusionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteExclusionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteExclusionRequest + * @function getTypeUrl + * @memberof google.logging.v2.DeleteExclusionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteExclusionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.DeleteExclusionRequest"; + }; + + return DeleteExclusionRequest; + })(); + + v2.GetCmekSettingsRequest = (function() { + + /** + * Properties of a GetCmekSettingsRequest. + * @memberof google.logging.v2 + * @interface IGetCmekSettingsRequest + * @property {string|null} [name] GetCmekSettingsRequest name + */ + + /** + * Constructs a new GetCmekSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetCmekSettingsRequest. + * @implements IGetCmekSettingsRequest + * @constructor + * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + */ + function GetCmekSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCmekSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.GetCmekSettingsRequest + * @instance + */ + GetCmekSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetCmekSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest instance + */ + GetCmekSettingsRequest.create = function create(properties) { + return new GetCmekSettingsRequest(properties); + }; + + /** + * Encodes the specified GetCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCmekSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetCmekSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.IGetCmekSettingsRequest} message GetCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCmekSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetCmekSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCmekSettingsRequest message. + * @function verify + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCmekSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetCmekSettingsRequest} GetCmekSettingsRequest + */ + GetCmekSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetCmekSettingsRequest) + return object; + var message = new $root.google.logging.v2.GetCmekSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCmekSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {google.logging.v2.GetCmekSettingsRequest} message GetCmekSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCmekSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetCmekSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetCmekSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetCmekSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCmekSettingsRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetCmekSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCmekSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetCmekSettingsRequest"; + }; + + return GetCmekSettingsRequest; + })(); + + v2.UpdateCmekSettingsRequest = (function() { + + /** + * Properties of an UpdateCmekSettingsRequest. + * @memberof google.logging.v2 + * @interface IUpdateCmekSettingsRequest + * @property {string|null} [name] UpdateCmekSettingsRequest name + * @property {google.logging.v2.ICmekSettings|null} [cmekSettings] UpdateCmekSettingsRequest cmekSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmekSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateCmekSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateCmekSettingsRequest. + * @implements IUpdateCmekSettingsRequest + * @constructor + * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + */ + function UpdateCmekSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCmekSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.name = ""; + + /** + * UpdateCmekSettingsRequest cmekSettings. + * @member {google.logging.v2.ICmekSettings|null|undefined} cmekSettings + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.cmekSettings = null; + + /** + * UpdateCmekSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + */ + UpdateCmekSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCmekSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest instance + */ + UpdateCmekSettingsRequest.create = function create(properties) { + return new UpdateCmekSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateCmekSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCmekSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cmekSettings != null && Object.hasOwnProperty.call(message, "cmekSettings")) + $root.google.logging.v2.CmekSettings.encode(message.cmekSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateCmekSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateCmekSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.IUpdateCmekSettingsRequest} message UpdateCmekSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCmekSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCmekSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.cmekSettings = $root.google.logging.v2.CmekSettings.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCmekSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCmekSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCmekSettingsRequest message. + * @function verify + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCmekSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) { + var error = $root.google.logging.v2.CmekSettings.verify(message.cmekSettings); + if (error) + return "cmekSettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateCmekSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateCmekSettingsRequest} UpdateCmekSettingsRequest + */ + UpdateCmekSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateCmekSettingsRequest) + return object; + var message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cmekSettings != null) { + if (typeof object.cmekSettings !== "object") + throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.cmekSettings: object expected"); + message.cmekSettings = $root.google.logging.v2.CmekSettings.fromObject(object.cmekSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateCmekSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateCmekSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {google.logging.v2.UpdateCmekSettingsRequest} message UpdateCmekSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCmekSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.cmekSettings = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cmekSettings != null && message.hasOwnProperty("cmekSettings")) + object.cmekSettings = $root.google.logging.v2.CmekSettings.toObject(message.cmekSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateCmekSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCmekSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCmekSettingsRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateCmekSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCmekSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateCmekSettingsRequest"; + }; + + return UpdateCmekSettingsRequest; + })(); + + v2.CmekSettings = (function() { + + /** + * Properties of a CmekSettings. + * @memberof google.logging.v2 + * @interface ICmekSettings + * @property {string|null} [name] CmekSettings name + * @property {string|null} [kmsKeyName] CmekSettings kmsKeyName + * @property {string|null} [kmsKeyVersionName] CmekSettings kmsKeyVersionName + * @property {string|null} [serviceAccountId] CmekSettings serviceAccountId + */ + + /** + * Constructs a new CmekSettings. + * @memberof google.logging.v2 + * @classdesc Represents a CmekSettings. + * @implements ICmekSettings + * @constructor + * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + */ + function CmekSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CmekSettings name. + * @member {string} name + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.name = ""; + + /** + * CmekSettings kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.kmsKeyName = ""; + + /** + * CmekSettings kmsKeyVersionName. + * @member {string} kmsKeyVersionName + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.kmsKeyVersionName = ""; + + /** + * CmekSettings serviceAccountId. + * @member {string} serviceAccountId + * @memberof google.logging.v2.CmekSettings + * @instance + */ + CmekSettings.prototype.serviceAccountId = ""; + + /** + * Creates a new CmekSettings instance using the specified properties. + * @function create + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings=} [properties] Properties to set + * @returns {google.logging.v2.CmekSettings} CmekSettings instance + */ + CmekSettings.create = function create(properties) { + return new CmekSettings(properties); + }; + + /** + * Encodes the specified CmekSettings message. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmekSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.serviceAccountId != null && Object.hasOwnProperty.call(message, "serviceAccountId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountId); + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyVersionName); + return writer; + }; + + /** + * Encodes the specified CmekSettings message, length delimited. Does not implicitly {@link google.logging.v2.CmekSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.ICmekSettings} message CmekSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmekSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CmekSettings message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CmekSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CmekSettings} CmekSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmekSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CmekSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.kmsKeyName = reader.string(); + break; + } + case 4: { + message.kmsKeyVersionName = reader.string(); + break; + } + case 3: { + message.serviceAccountId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CmekSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CmekSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CmekSettings} CmekSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmekSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CmekSettings message. + * @function verify + * @memberof google.logging.v2.CmekSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CmekSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (!$util.isString(message.kmsKeyVersionName)) + return "kmsKeyVersionName: string expected"; + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + if (!$util.isString(message.serviceAccountId)) + return "serviceAccountId: string expected"; + return null; + }; + + /** + * Creates a CmekSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CmekSettings + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CmekSettings} CmekSettings + */ + CmekSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CmekSettings) + return object; + var message = new $root.google.logging.v2.CmekSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyVersionName != null) + message.kmsKeyVersionName = String(object.kmsKeyVersionName); + if (object.serviceAccountId != null) + message.serviceAccountId = String(object.serviceAccountId); + return message; + }; + + /** + * Creates a plain object from a CmekSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CmekSettings + * @static + * @param {google.logging.v2.CmekSettings} message CmekSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CmekSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.kmsKeyName = ""; + object.serviceAccountId = ""; + object.kmsKeyVersionName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.serviceAccountId != null && message.hasOwnProperty("serviceAccountId")) + object.serviceAccountId = message.serviceAccountId; + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + object.kmsKeyVersionName = message.kmsKeyVersionName; + return object; + }; + + /** + * Converts this CmekSettings to JSON. + * @function toJSON + * @memberof google.logging.v2.CmekSettings + * @instance + * @returns {Object.} JSON object + */ + CmekSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CmekSettings + * @function getTypeUrl + * @memberof google.logging.v2.CmekSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CmekSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CmekSettings"; + }; + + return CmekSettings; + })(); + + v2.GetSettingsRequest = (function() { + + /** + * Properties of a GetSettingsRequest. + * @memberof google.logging.v2 + * @interface IGetSettingsRequest + * @property {string|null} [name] GetSettingsRequest name + */ + + /** + * Constructs a new GetSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents a GetSettingsRequest. + * @implements IGetSettingsRequest + * @constructor + * @param {google.logging.v2.IGetSettingsRequest=} [properties] Properties to set + */ + function GetSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.GetSettingsRequest + * @instance + */ + GetSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {google.logging.v2.IGetSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest instance + */ + GetSettingsRequest.create = function create(properties) { + return new GetSettingsRequest(properties); + }; + + /** + * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.logging.v2.GetSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {google.logging.v2.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.GetSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {google.logging.v2.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSettingsRequest message. + * @function verify + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.GetSettingsRequest} GetSettingsRequest + */ + GetSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.GetSettingsRequest) + return object; + var message = new $root.google.logging.v2.GetSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {google.logging.v2.GetSettingsRequest} message GetSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.GetSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSettingsRequest + * @function getTypeUrl + * @memberof google.logging.v2.GetSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.GetSettingsRequest"; + }; + + return GetSettingsRequest; + })(); + + v2.UpdateSettingsRequest = (function() { + + /** + * Properties of an UpdateSettingsRequest. + * @memberof google.logging.v2 + * @interface IUpdateSettingsRequest + * @property {string|null} [name] UpdateSettingsRequest name + * @property {google.logging.v2.ISettings|null} [settings] UpdateSettingsRequest settings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateSettingsRequest. + * @memberof google.logging.v2 + * @classdesc Represents an UpdateSettingsRequest. + * @implements IUpdateSettingsRequest + * @constructor + * @param {google.logging.v2.IUpdateSettingsRequest=} [properties] Properties to set + */ + function UpdateSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSettingsRequest name. + * @member {string} name + * @memberof google.logging.v2.UpdateSettingsRequest + * @instance + */ + UpdateSettingsRequest.prototype.name = ""; + + /** + * UpdateSettingsRequest settings. + * @member {google.logging.v2.ISettings|null|undefined} settings + * @memberof google.logging.v2.UpdateSettingsRequest + * @instance + */ + UpdateSettingsRequest.prototype.settings = null; + + /** + * UpdateSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.logging.v2.UpdateSettingsRequest + * @instance + */ + UpdateSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSettingsRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {google.logging.v2.IUpdateSettingsRequest=} [properties] Properties to set + * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest instance + */ + UpdateSettingsRequest.create = function create(properties) { + return new UpdateSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.logging.v2.UpdateSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {google.logging.v2.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) + $root.google.logging.v2.Settings.encode(message.settings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.logging.v2.UpdateSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {google.logging.v2.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.settings = $root.google.logging.v2.Settings.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSettingsRequest message. + * @function verify + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.settings != null && message.hasOwnProperty("settings")) { + var error = $root.google.logging.v2.Settings.verify(message.settings); + if (error) + return "settings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.UpdateSettingsRequest} UpdateSettingsRequest + */ + UpdateSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.UpdateSettingsRequest) + return object; + var message = new $root.google.logging.v2.UpdateSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.settings != null) { + if (typeof object.settings !== "object") + throw TypeError(".google.logging.v2.UpdateSettingsRequest.settings: object expected"); + message.settings = $root.google.logging.v2.Settings.fromObject(object.settings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.logging.v2.UpdateSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {google.logging.v2.UpdateSettingsRequest} message UpdateSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.settings = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.settings != null && message.hasOwnProperty("settings")) + object.settings = $root.google.logging.v2.Settings.toObject(message.settings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSettingsRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.UpdateSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSettingsRequest + * @function getTypeUrl + * @memberof google.logging.v2.UpdateSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.UpdateSettingsRequest"; + }; + + return UpdateSettingsRequest; + })(); + + v2.Settings = (function() { + + /** + * Properties of a Settings. + * @memberof google.logging.v2 + * @interface ISettings + * @property {string|null} [name] Settings name + * @property {string|null} [kmsKeyName] Settings kmsKeyName + * @property {string|null} [kmsServiceAccountId] Settings kmsServiceAccountId + * @property {string|null} [storageLocation] Settings storageLocation + * @property {boolean|null} [disableDefaultSink] Settings disableDefaultSink + */ + + /** + * Constructs a new Settings. + * @memberof google.logging.v2 + * @classdesc Represents a Settings. + * @implements ISettings + * @constructor + * @param {google.logging.v2.ISettings=} [properties] Properties to set + */ + function Settings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Settings name. + * @member {string} name + * @memberof google.logging.v2.Settings + * @instance + */ + Settings.prototype.name = ""; + + /** + * Settings kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.logging.v2.Settings + * @instance + */ + Settings.prototype.kmsKeyName = ""; + + /** + * Settings kmsServiceAccountId. + * @member {string} kmsServiceAccountId + * @memberof google.logging.v2.Settings + * @instance + */ + Settings.prototype.kmsServiceAccountId = ""; + + /** + * Settings storageLocation. + * @member {string} storageLocation + * @memberof google.logging.v2.Settings + * @instance + */ + Settings.prototype.storageLocation = ""; + + /** + * Settings disableDefaultSink. + * @member {boolean} disableDefaultSink + * @memberof google.logging.v2.Settings + * @instance + */ + Settings.prototype.disableDefaultSink = false; + + /** + * Creates a new Settings instance using the specified properties. + * @function create + * @memberof google.logging.v2.Settings + * @static + * @param {google.logging.v2.ISettings=} [properties] Properties to set + * @returns {google.logging.v2.Settings} Settings instance + */ + Settings.create = function create(properties) { + return new Settings(properties); + }; + + /** + * Encodes the specified Settings message. Does not implicitly {@link google.logging.v2.Settings.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.Settings + * @static + * @param {google.logging.v2.ISettings} message Settings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Settings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); + if (message.kmsServiceAccountId != null && Object.hasOwnProperty.call(message, "kmsServiceAccountId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsServiceAccountId); + if (message.storageLocation != null && Object.hasOwnProperty.call(message, "storageLocation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageLocation); + if (message.disableDefaultSink != null && Object.hasOwnProperty.call(message, "disableDefaultSink")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disableDefaultSink); + return writer; + }; + + /** + * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.logging.v2.Settings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.Settings + * @static + * @param {google.logging.v2.ISettings} message Settings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Settings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Settings message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.Settings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.Settings} Settings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Settings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.Settings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.kmsKeyName = reader.string(); + break; + } + case 3: { + message.kmsServiceAccountId = reader.string(); + break; + } + case 4: { + message.storageLocation = reader.string(); + break; + } + case 5: { + message.disableDefaultSink = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Settings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.Settings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.Settings} Settings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Settings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Settings message. + * @function verify + * @memberof google.logging.v2.Settings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Settings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.kmsServiceAccountId != null && message.hasOwnProperty("kmsServiceAccountId")) + if (!$util.isString(message.kmsServiceAccountId)) + return "kmsServiceAccountId: string expected"; + if (message.storageLocation != null && message.hasOwnProperty("storageLocation")) + if (!$util.isString(message.storageLocation)) + return "storageLocation: string expected"; + if (message.disableDefaultSink != null && message.hasOwnProperty("disableDefaultSink")) + if (typeof message.disableDefaultSink !== "boolean") + return "disableDefaultSink: boolean expected"; + return null; + }; + + /** + * Creates a Settings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.Settings + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.Settings} Settings + */ + Settings.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.Settings) + return object; + var message = new $root.google.logging.v2.Settings(); + if (object.name != null) + message.name = String(object.name); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsServiceAccountId != null) + message.kmsServiceAccountId = String(object.kmsServiceAccountId); + if (object.storageLocation != null) + message.storageLocation = String(object.storageLocation); + if (object.disableDefaultSink != null) + message.disableDefaultSink = Boolean(object.disableDefaultSink); + return message; + }; + + /** + * Creates a plain object from a Settings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.Settings + * @static + * @param {google.logging.v2.Settings} message Settings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Settings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.kmsKeyName = ""; + object.kmsServiceAccountId = ""; + object.storageLocation = ""; + object.disableDefaultSink = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.kmsServiceAccountId != null && message.hasOwnProperty("kmsServiceAccountId")) + object.kmsServiceAccountId = message.kmsServiceAccountId; + if (message.storageLocation != null && message.hasOwnProperty("storageLocation")) + object.storageLocation = message.storageLocation; + if (message.disableDefaultSink != null && message.hasOwnProperty("disableDefaultSink")) + object.disableDefaultSink = message.disableDefaultSink; + return object; + }; + + /** + * Converts this Settings to JSON. + * @function toJSON + * @memberof google.logging.v2.Settings + * @instance + * @returns {Object.} JSON object + */ + Settings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Settings + * @function getTypeUrl + * @memberof google.logging.v2.Settings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Settings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.Settings"; + }; + + return Settings; + })(); + + v2.CopyLogEntriesRequest = (function() { + + /** + * Properties of a CopyLogEntriesRequest. + * @memberof google.logging.v2 + * @interface ICopyLogEntriesRequest + * @property {string|null} [name] CopyLogEntriesRequest name + * @property {string|null} [filter] CopyLogEntriesRequest filter + * @property {string|null} [destination] CopyLogEntriesRequest destination + */ + + /** + * Constructs a new CopyLogEntriesRequest. + * @memberof google.logging.v2 + * @classdesc Represents a CopyLogEntriesRequest. + * @implements ICopyLogEntriesRequest + * @constructor + * @param {google.logging.v2.ICopyLogEntriesRequest=} [properties] Properties to set + */ + function CopyLogEntriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CopyLogEntriesRequest name. + * @member {string} name + * @memberof google.logging.v2.CopyLogEntriesRequest + * @instance + */ + CopyLogEntriesRequest.prototype.name = ""; + + /** + * CopyLogEntriesRequest filter. + * @member {string} filter + * @memberof google.logging.v2.CopyLogEntriesRequest + * @instance + */ + CopyLogEntriesRequest.prototype.filter = ""; + + /** + * CopyLogEntriesRequest destination. + * @member {string} destination + * @memberof google.logging.v2.CopyLogEntriesRequest + * @instance + */ + CopyLogEntriesRequest.prototype.destination = ""; + + /** + * Creates a new CopyLogEntriesRequest instance using the specified properties. + * @function create + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {google.logging.v2.ICopyLogEntriesRequest=} [properties] Properties to set + * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest instance + */ + CopyLogEntriesRequest.create = function create(properties) { + return new CopyLogEntriesRequest(properties); + }; + + /** + * Encodes the specified CopyLogEntriesRequest message. Does not implicitly {@link google.logging.v2.CopyLogEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {google.logging.v2.ICopyLogEntriesRequest} message CopyLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyLogEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destination); + return writer; + }; + + /** + * Encodes the specified CopyLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {google.logging.v2.ICopyLogEntriesRequest} message CopyLogEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CopyLogEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyLogEntriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 4: { + message.destination = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CopyLogEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CopyLogEntriesRequest message. + * @function verify + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopyLogEntriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + return null; + }; + + /** + * Creates a CopyLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest + */ + CopyLogEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CopyLogEntriesRequest) + return object; + var message = new $root.google.logging.v2.CopyLogEntriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.destination != null) + message.destination = String(object.destination); + return message; + }; + + /** + * Creates a plain object from a CopyLogEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {google.logging.v2.CopyLogEntriesRequest} message CopyLogEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopyLogEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.filter = ""; + object.destination = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + return object; + }; + + /** + * Converts this CopyLogEntriesRequest to JSON. + * @function toJSON + * @memberof google.logging.v2.CopyLogEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + CopyLogEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CopyLogEntriesRequest + * @function getTypeUrl + * @memberof google.logging.v2.CopyLogEntriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopyLogEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesRequest"; + }; + + return CopyLogEntriesRequest; + })(); + + v2.CopyLogEntriesMetadata = (function() { + + /** + * Properties of a CopyLogEntriesMetadata. + * @memberof google.logging.v2 + * @interface ICopyLogEntriesMetadata + * @property {google.protobuf.ITimestamp|null} [startTime] CopyLogEntriesMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] CopyLogEntriesMetadata endTime + * @property {google.logging.v2.OperationState|null} [state] CopyLogEntriesMetadata state + * @property {boolean|null} [cancellationRequested] CopyLogEntriesMetadata cancellationRequested + * @property {google.logging.v2.ICopyLogEntriesRequest|null} [request] CopyLogEntriesMetadata request + * @property {number|null} [progress] CopyLogEntriesMetadata progress + * @property {string|null} [writerIdentity] CopyLogEntriesMetadata writerIdentity + */ + + /** + * Constructs a new CopyLogEntriesMetadata. + * @memberof google.logging.v2 + * @classdesc Represents a CopyLogEntriesMetadata. + * @implements ICopyLogEntriesMetadata + * @constructor + * @param {google.logging.v2.ICopyLogEntriesMetadata=} [properties] Properties to set + */ + function CopyLogEntriesMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CopyLogEntriesMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.startTime = null; + + /** + * CopyLogEntriesMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.endTime = null; + + /** + * CopyLogEntriesMetadata state. + * @member {google.logging.v2.OperationState} state + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.state = 0; + + /** + * CopyLogEntriesMetadata cancellationRequested. + * @member {boolean} cancellationRequested + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.cancellationRequested = false; + + /** + * CopyLogEntriesMetadata request. + * @member {google.logging.v2.ICopyLogEntriesRequest|null|undefined} request + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.request = null; + + /** + * CopyLogEntriesMetadata progress. + * @member {number} progress + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.progress = 0; + + /** + * CopyLogEntriesMetadata writerIdentity. + * @member {string} writerIdentity + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + */ + CopyLogEntriesMetadata.prototype.writerIdentity = ""; + + /** + * Creates a new CopyLogEntriesMetadata instance using the specified properties. + * @function create + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {google.logging.v2.ICopyLogEntriesMetadata=} [properties] Properties to set + * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata instance + */ + CopyLogEntriesMetadata.create = function create(properties) { + return new CopyLogEntriesMetadata(properties); + }; + + /** + * Encodes the specified CopyLogEntriesMetadata message. Does not implicitly {@link google.logging.v2.CopyLogEntriesMetadata.verify|verify} messages. + * @function encode + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {google.logging.v2.ICopyLogEntriesMetadata} message CopyLogEntriesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyLogEntriesMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.cancellationRequested != null && Object.hasOwnProperty.call(message, "cancellationRequested")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.cancellationRequested); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.logging.v2.CopyLogEntriesRequest.encode(message.request, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.progress); + if (message.writerIdentity != null && Object.hasOwnProperty.call(message, "writerIdentity")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.writerIdentity); + return writer; + }; + + /** + * Encodes the specified CopyLogEntriesMetadata message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {google.logging.v2.ICopyLogEntriesMetadata} message CopyLogEntriesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CopyLogEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CopyLogEntriesMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyLogEntriesMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.cancellationRequested = reader.bool(); + break; + } + case 5: { + message.request = $root.google.logging.v2.CopyLogEntriesRequest.decode(reader, reader.uint32()); + break; + } + case 6: { + message.progress = reader.int32(); + break; + } + case 7: { + message.writerIdentity = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CopyLogEntriesMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CopyLogEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CopyLogEntriesMetadata message. + * @function verify + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CopyLogEntriesMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) + if (typeof message.cancellationRequested !== "boolean") + return "cancellationRequested: boolean expected"; + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.logging.v2.CopyLogEntriesRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.progress != null && message.hasOwnProperty("progress")) + if (!$util.isInteger(message.progress)) + return "progress: integer expected"; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + if (!$util.isString(message.writerIdentity)) + return "writerIdentity: string expected"; + return null; + }; + + /** + * Creates a CopyLogEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata + */ + CopyLogEntriesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CopyLogEntriesMetadata) + return object; + var message = new $root.google.logging.v2.CopyLogEntriesMetadata(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "OPERATION_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "OPERATION_STATE_SCHEDULED": + case 1: + message.state = 1; + break; + case "OPERATION_STATE_WAITING_FOR_PERMISSIONS": + case 2: + message.state = 2; + break; + case "OPERATION_STATE_RUNNING": + case 3: + message.state = 3; + break; + case "OPERATION_STATE_SUCCEEDED": + case 4: + message.state = 4; + break; + case "OPERATION_STATE_FAILED": + case 5: + message.state = 5; + break; + case "OPERATION_STATE_CANCELLED": + case 6: + message.state = 6; + break; + } + if (object.cancellationRequested != null) + message.cancellationRequested = Boolean(object.cancellationRequested); + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.request: object expected"); + message.request = $root.google.logging.v2.CopyLogEntriesRequest.fromObject(object.request); + } + if (object.progress != null) + message.progress = object.progress | 0; + if (object.writerIdentity != null) + message.writerIdentity = String(object.writerIdentity); + return message; + }; + + /** + * Creates a plain object from a CopyLogEntriesMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {google.logging.v2.CopyLogEntriesMetadata} message CopyLogEntriesMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CopyLogEntriesMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; + object.cancellationRequested = false; + object.request = null; + object.progress = 0; + object.writerIdentity = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.logging.v2.OperationState[message.state] === undefined ? message.state : $root.google.logging.v2.OperationState[message.state] : message.state; + if (message.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) + object.cancellationRequested = message.cancellationRequested; + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.logging.v2.CopyLogEntriesRequest.toObject(message.request, options); + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = message.progress; + if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) + object.writerIdentity = message.writerIdentity; + return object; + }; + + /** + * Converts this CopyLogEntriesMetadata to JSON. + * @function toJSON + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @instance + * @returns {Object.} JSON object + */ + CopyLogEntriesMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CopyLogEntriesMetadata + * @function getTypeUrl + * @memberof google.logging.v2.CopyLogEntriesMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CopyLogEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesMetadata"; + }; + + return CopyLogEntriesMetadata; + })(); + + v2.CopyLogEntriesResponse = (function() { + + /** + * Properties of a CopyLogEntriesResponse. + * @memberof google.logging.v2 + * @interface ICopyLogEntriesResponse + * @property {number|Long|null} [logEntriesCopiedCount] CopyLogEntriesResponse logEntriesCopiedCount + */ + + /** + * Constructs a new CopyLogEntriesResponse. + * @memberof google.logging.v2 + * @classdesc Represents a CopyLogEntriesResponse. + * @implements ICopyLogEntriesResponse + * @constructor + * @param {google.logging.v2.ICopyLogEntriesResponse=} [properties] Properties to set + */ + function CopyLogEntriesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Settings disableDefaultSink. - * @member {boolean} disableDefaultSink - * @memberof google.logging.v2.Settings + * CopyLogEntriesResponse logEntriesCopiedCount. + * @member {number|Long} logEntriesCopiedCount + * @memberof google.logging.v2.CopyLogEntriesResponse * @instance */ - Settings.prototype.disableDefaultSink = false; + CopyLogEntriesResponse.prototype.logEntriesCopiedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Settings instance using the specified properties. + * Creates a new CopyLogEntriesResponse instance using the specified properties. * @function create - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static - * @param {google.logging.v2.ISettings=} [properties] Properties to set - * @returns {google.logging.v2.Settings} Settings instance + * @param {google.logging.v2.ICopyLogEntriesResponse=} [properties] Properties to set + * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse instance */ - Settings.create = function create(properties) { - return new Settings(properties); + CopyLogEntriesResponse.create = function create(properties) { + return new CopyLogEntriesResponse(properties); }; /** - * Encodes the specified Settings message. Does not implicitly {@link google.logging.v2.Settings.verify|verify} messages. + * Encodes the specified CopyLogEntriesResponse message. Does not implicitly {@link google.logging.v2.CopyLogEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static - * @param {google.logging.v2.ISettings} message Settings message or plain object to encode + * @param {google.logging.v2.ICopyLogEntriesResponse} message CopyLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Settings.encode = function encode(message, writer) { + CopyLogEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); - if (message.kmsServiceAccountId != null && Object.hasOwnProperty.call(message, "kmsServiceAccountId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsServiceAccountId); - if (message.storageLocation != null && Object.hasOwnProperty.call(message, "storageLocation")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageLocation); - if (message.disableDefaultSink != null && Object.hasOwnProperty.call(message, "disableDefaultSink")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disableDefaultSink); + if (message.logEntriesCopiedCount != null && Object.hasOwnProperty.call(message, "logEntriesCopiedCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.logEntriesCopiedCount); return writer; }; /** - * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.logging.v2.Settings.verify|verify} messages. + * Encodes the specified CopyLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static - * @param {google.logging.v2.ISettings} message Settings message or plain object to encode + * @param {google.logging.v2.ICopyLogEntriesResponse} message CopyLogEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Settings.encodeDelimited = function encodeDelimited(message, writer) { + CopyLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Settings message from the specified reader or buffer. + * Decodes a CopyLogEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.Settings} Settings + * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Settings.decode = function decode(reader, length) { + CopyLogEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.Settings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.kmsKeyName = reader.string(); - break; - } - case 3: { - message.kmsServiceAccountId = reader.string(); - break; - } - case 4: { - message.storageLocation = reader.string(); - break; - } - case 5: { - message.disableDefaultSink = reader.bool(); + message.logEntriesCopiedCount = reader.int64(); break; } default: @@ -27186,157 +30363,140 @@ }; /** - * Decodes a Settings message from the specified reader or buffer, length delimited. + * Decodes a CopyLogEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.Settings} Settings + * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Settings.decodeDelimited = function decodeDelimited(reader) { + CopyLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Settings message. + * Verifies a CopyLogEntriesResponse message. * @function verify - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Settings.verify = function verify(message) { + CopyLogEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - if (message.kmsServiceAccountId != null && message.hasOwnProperty("kmsServiceAccountId")) - if (!$util.isString(message.kmsServiceAccountId)) - return "kmsServiceAccountId: string expected"; - if (message.storageLocation != null && message.hasOwnProperty("storageLocation")) - if (!$util.isString(message.storageLocation)) - return "storageLocation: string expected"; - if (message.disableDefaultSink != null && message.hasOwnProperty("disableDefaultSink")) - if (typeof message.disableDefaultSink !== "boolean") - return "disableDefaultSink: boolean expected"; + if (message.logEntriesCopiedCount != null && message.hasOwnProperty("logEntriesCopiedCount")) + if (!$util.isInteger(message.logEntriesCopiedCount) && !(message.logEntriesCopiedCount && $util.isInteger(message.logEntriesCopiedCount.low) && $util.isInteger(message.logEntriesCopiedCount.high))) + return "logEntriesCopiedCount: integer|Long expected"; return null; }; /** - * Creates a Settings message from a plain object. Also converts values to their respective internal types. + * Creates a CopyLogEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.Settings} Settings + * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse */ - Settings.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.Settings) + CopyLogEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.CopyLogEntriesResponse) return object; - var message = new $root.google.logging.v2.Settings(); - if (object.name != null) - message.name = String(object.name); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.kmsServiceAccountId != null) - message.kmsServiceAccountId = String(object.kmsServiceAccountId); - if (object.storageLocation != null) - message.storageLocation = String(object.storageLocation); - if (object.disableDefaultSink != null) - message.disableDefaultSink = Boolean(object.disableDefaultSink); + var message = new $root.google.logging.v2.CopyLogEntriesResponse(); + if (object.logEntriesCopiedCount != null) + if ($util.Long) + (message.logEntriesCopiedCount = $util.Long.fromValue(object.logEntriesCopiedCount)).unsigned = false; + else if (typeof object.logEntriesCopiedCount === "string") + message.logEntriesCopiedCount = parseInt(object.logEntriesCopiedCount, 10); + else if (typeof object.logEntriesCopiedCount === "number") + message.logEntriesCopiedCount = object.logEntriesCopiedCount; + else if (typeof object.logEntriesCopiedCount === "object") + message.logEntriesCopiedCount = new $util.LongBits(object.logEntriesCopiedCount.low >>> 0, object.logEntriesCopiedCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a Settings message. Also converts values to other types if specified. + * Creates a plain object from a CopyLogEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static - * @param {google.logging.v2.Settings} message Settings + * @param {google.logging.v2.CopyLogEntriesResponse} message CopyLogEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Settings.toObject = function toObject(message, options) { + CopyLogEntriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.kmsKeyName = ""; - object.kmsServiceAccountId = ""; - object.storageLocation = ""; - object.disableDefaultSink = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - if (message.kmsServiceAccountId != null && message.hasOwnProperty("kmsServiceAccountId")) - object.kmsServiceAccountId = message.kmsServiceAccountId; - if (message.storageLocation != null && message.hasOwnProperty("storageLocation")) - object.storageLocation = message.storageLocation; - if (message.disableDefaultSink != null && message.hasOwnProperty("disableDefaultSink")) - object.disableDefaultSink = message.disableDefaultSink; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.logEntriesCopiedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.logEntriesCopiedCount = options.longs === String ? "0" : 0; + if (message.logEntriesCopiedCount != null && message.hasOwnProperty("logEntriesCopiedCount")) + if (typeof message.logEntriesCopiedCount === "number") + object.logEntriesCopiedCount = options.longs === String ? String(message.logEntriesCopiedCount) : message.logEntriesCopiedCount; + else + object.logEntriesCopiedCount = options.longs === String ? $util.Long.prototype.toString.call(message.logEntriesCopiedCount) : options.longs === Number ? new $util.LongBits(message.logEntriesCopiedCount.low >>> 0, message.logEntriesCopiedCount.high >>> 0).toNumber() : message.logEntriesCopiedCount; return object; }; /** - * Converts this Settings to JSON. + * Converts this CopyLogEntriesResponse to JSON. * @function toJSON - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @instance * @returns {Object.} JSON object */ - Settings.prototype.toJSON = function toJSON() { + CopyLogEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Settings + * Gets the default type url for CopyLogEntriesResponse * @function getTypeUrl - * @memberof google.logging.v2.Settings + * @memberof google.logging.v2.CopyLogEntriesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Settings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CopyLogEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.Settings"; + return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesResponse"; }; - return Settings; + return CopyLogEntriesResponse; })(); - v2.CopyLogEntriesRequest = (function() { + v2.BucketMetadata = (function() { /** - * Properties of a CopyLogEntriesRequest. + * Properties of a BucketMetadata. * @memberof google.logging.v2 - * @interface ICopyLogEntriesRequest - * @property {string|null} [name] CopyLogEntriesRequest name - * @property {string|null} [filter] CopyLogEntriesRequest filter - * @property {string|null} [destination] CopyLogEntriesRequest destination + * @interface IBucketMetadata + * @property {google.protobuf.ITimestamp|null} [startTime] BucketMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] BucketMetadata endTime + * @property {google.logging.v2.OperationState|null} [state] BucketMetadata state + * @property {google.logging.v2.ICreateBucketRequest|null} [createBucketRequest] BucketMetadata createBucketRequest + * @property {google.logging.v2.IUpdateBucketRequest|null} [updateBucketRequest] BucketMetadata updateBucketRequest */ /** - * Constructs a new CopyLogEntriesRequest. + * Constructs a new BucketMetadata. * @memberof google.logging.v2 - * @classdesc Represents a CopyLogEntriesRequest. - * @implements ICopyLogEntriesRequest + * @classdesc Represents a BucketMetadata. + * @implements IBucketMetadata * @constructor - * @param {google.logging.v2.ICopyLogEntriesRequest=} [properties] Properties to set + * @param {google.logging.v2.IBucketMetadata=} [properties] Properties to set */ - function CopyLogEntriesRequest(properties) { + function BucketMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27344,103 +30504,145 @@ } /** - * CopyLogEntriesRequest name. - * @member {string} name - * @memberof google.logging.v2.CopyLogEntriesRequest + * BucketMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.logging.v2.BucketMetadata * @instance */ - CopyLogEntriesRequest.prototype.name = ""; + BucketMetadata.prototype.startTime = null; /** - * CopyLogEntriesRequest filter. - * @member {string} filter - * @memberof google.logging.v2.CopyLogEntriesRequest + * BucketMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.logging.v2.BucketMetadata * @instance */ - CopyLogEntriesRequest.prototype.filter = ""; + BucketMetadata.prototype.endTime = null; /** - * CopyLogEntriesRequest destination. - * @member {string} destination - * @memberof google.logging.v2.CopyLogEntriesRequest + * BucketMetadata state. + * @member {google.logging.v2.OperationState} state + * @memberof google.logging.v2.BucketMetadata * @instance */ - CopyLogEntriesRequest.prototype.destination = ""; + BucketMetadata.prototype.state = 0; /** - * Creates a new CopyLogEntriesRequest instance using the specified properties. + * BucketMetadata createBucketRequest. + * @member {google.logging.v2.ICreateBucketRequest|null|undefined} createBucketRequest + * @memberof google.logging.v2.BucketMetadata + * @instance + */ + BucketMetadata.prototype.createBucketRequest = null; + + /** + * BucketMetadata updateBucketRequest. + * @member {google.logging.v2.IUpdateBucketRequest|null|undefined} updateBucketRequest + * @memberof google.logging.v2.BucketMetadata + * @instance + */ + BucketMetadata.prototype.updateBucketRequest = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BucketMetadata request. + * @member {"createBucketRequest"|"updateBucketRequest"|undefined} request + * @memberof google.logging.v2.BucketMetadata + * @instance + */ + Object.defineProperty(BucketMetadata.prototype, "request", { + get: $util.oneOfGetter($oneOfFields = ["createBucketRequest", "updateBucketRequest"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BucketMetadata instance using the specified properties. * @function create - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesRequest=} [properties] Properties to set - * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest instance + * @param {google.logging.v2.IBucketMetadata=} [properties] Properties to set + * @returns {google.logging.v2.BucketMetadata} BucketMetadata instance */ - CopyLogEntriesRequest.create = function create(properties) { - return new CopyLogEntriesRequest(properties); + BucketMetadata.create = function create(properties) { + return new BucketMetadata(properties); }; /** - * Encodes the specified CopyLogEntriesRequest message. Does not implicitly {@link google.logging.v2.CopyLogEntriesRequest.verify|verify} messages. + * Encodes the specified BucketMetadata message. Does not implicitly {@link google.logging.v2.BucketMetadata.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesRequest} message CopyLogEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CopyLogEntriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destination); + * @param {google.logging.v2.IBucketMetadata} message BucketMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.createBucketRequest != null && Object.hasOwnProperty.call(message, "createBucketRequest")) + $root.google.logging.v2.CreateBucketRequest.encode(message.createBucketRequest, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateBucketRequest != null && Object.hasOwnProperty.call(message, "updateBucketRequest")) + $root.google.logging.v2.UpdateBucketRequest.encode(message.updateBucketRequest, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified CopyLogEntriesRequest message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesRequest.verify|verify} messages. + * Encodes the specified BucketMetadata message, length delimited. Does not implicitly {@link google.logging.v2.BucketMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesRequest} message CopyLogEntriesRequest message or plain object to encode + * @param {google.logging.v2.IBucketMetadata} message BucketMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CopyLogEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + BucketMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CopyLogEntriesRequest message from the specified reader or buffer. + * Decodes a BucketMetadata message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest + * @returns {google.logging.v2.BucketMetadata} BucketMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesRequest.decode = function decode(reader, length) { + BucketMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BucketMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.filter = reader.string(); + message.state = reader.int32(); break; } case 4: { - message.destination = reader.string(); + message.createBucketRequest = $root.google.logging.v2.CreateBucketRequest.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateBucketRequest = $root.google.logging.v2.UpdateBucketRequest.decode(reader, reader.uint32()); break; } default: @@ -27452,145 +30654,236 @@ }; /** - * Decodes a CopyLogEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a BucketMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest + * @returns {google.logging.v2.BucketMetadata} BucketMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + BucketMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CopyLogEntriesRequest message. + * Verifies a BucketMetadata message. * @function verify - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CopyLogEntriesRequest.verify = function verify(message) { + BucketMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) - if (!$util.isString(message.destination)) - return "destination: string expected"; + var properties = {}; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.createBucketRequest != null && message.hasOwnProperty("createBucketRequest")) { + properties.request = 1; + { + var error = $root.google.logging.v2.CreateBucketRequest.verify(message.createBucketRequest); + if (error) + return "createBucketRequest." + error; + } + } + if (message.updateBucketRequest != null && message.hasOwnProperty("updateBucketRequest")) { + if (properties.request === 1) + return "request: multiple values"; + properties.request = 1; + { + var error = $root.google.logging.v2.UpdateBucketRequest.verify(message.updateBucketRequest); + if (error) + return "updateBucketRequest." + error; + } + } return null; }; /** - * Creates a CopyLogEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BucketMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CopyLogEntriesRequest} CopyLogEntriesRequest + * @returns {google.logging.v2.BucketMetadata} BucketMetadata */ - CopyLogEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CopyLogEntriesRequest) + BucketMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.BucketMetadata) return object; - var message = new $root.google.logging.v2.CopyLogEntriesRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - if (object.destination != null) - message.destination = String(object.destination); + var message = new $root.google.logging.v2.BucketMetadata(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.logging.v2.BucketMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.logging.v2.BucketMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "OPERATION_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "OPERATION_STATE_SCHEDULED": + case 1: + message.state = 1; + break; + case "OPERATION_STATE_WAITING_FOR_PERMISSIONS": + case 2: + message.state = 2; + break; + case "OPERATION_STATE_RUNNING": + case 3: + message.state = 3; + break; + case "OPERATION_STATE_SUCCEEDED": + case 4: + message.state = 4; + break; + case "OPERATION_STATE_FAILED": + case 5: + message.state = 5; + break; + case "OPERATION_STATE_CANCELLED": + case 6: + message.state = 6; + break; + } + if (object.createBucketRequest != null) { + if (typeof object.createBucketRequest !== "object") + throw TypeError(".google.logging.v2.BucketMetadata.createBucketRequest: object expected"); + message.createBucketRequest = $root.google.logging.v2.CreateBucketRequest.fromObject(object.createBucketRequest); + } + if (object.updateBucketRequest != null) { + if (typeof object.updateBucketRequest !== "object") + throw TypeError(".google.logging.v2.BucketMetadata.updateBucketRequest: object expected"); + message.updateBucketRequest = $root.google.logging.v2.UpdateBucketRequest.fromObject(object.updateBucketRequest); + } return message; }; /** - * Creates a plain object from a CopyLogEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a BucketMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static - * @param {google.logging.v2.CopyLogEntriesRequest} message CopyLogEntriesRequest + * @param {google.logging.v2.BucketMetadata} message BucketMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CopyLogEntriesRequest.toObject = function toObject(message, options) { + BucketMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.filter = ""; - object.destination = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.logging.v2.OperationState[message.state] === undefined ? message.state : $root.google.logging.v2.OperationState[message.state] : message.state; + if (message.createBucketRequest != null && message.hasOwnProperty("createBucketRequest")) { + object.createBucketRequest = $root.google.logging.v2.CreateBucketRequest.toObject(message.createBucketRequest, options); + if (options.oneofs) + object.request = "createBucketRequest"; + } + if (message.updateBucketRequest != null && message.hasOwnProperty("updateBucketRequest")) { + object.updateBucketRequest = $root.google.logging.v2.UpdateBucketRequest.toObject(message.updateBucketRequest, options); + if (options.oneofs) + object.request = "updateBucketRequest"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = message.destination; return object; }; /** - * Converts this CopyLogEntriesRequest to JSON. + * Converts this BucketMetadata to JSON. * @function toJSON - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @instance * @returns {Object.} JSON object */ - CopyLogEntriesRequest.prototype.toJSON = function toJSON() { + BucketMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CopyLogEntriesRequest + * Gets the default type url for BucketMetadata * @function getTypeUrl - * @memberof google.logging.v2.CopyLogEntriesRequest + * @memberof google.logging.v2.BucketMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CopyLogEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BucketMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesRequest"; + return typeUrlPrefix + "/google.logging.v2.BucketMetadata"; }; - return CopyLogEntriesRequest; + return BucketMetadata; })(); - v2.CopyLogEntriesMetadata = (function() { + v2.LinkMetadata = (function() { /** - * Properties of a CopyLogEntriesMetadata. + * Properties of a LinkMetadata. * @memberof google.logging.v2 - * @interface ICopyLogEntriesMetadata - * @property {google.protobuf.ITimestamp|null} [startTime] CopyLogEntriesMetadata startTime - * @property {google.protobuf.ITimestamp|null} [endTime] CopyLogEntriesMetadata endTime - * @property {google.logging.v2.OperationState|null} [state] CopyLogEntriesMetadata state - * @property {boolean|null} [cancellationRequested] CopyLogEntriesMetadata cancellationRequested - * @property {google.logging.v2.ICopyLogEntriesRequest|null} [request] CopyLogEntriesMetadata request - * @property {number|null} [progress] CopyLogEntriesMetadata progress - * @property {string|null} [writerIdentity] CopyLogEntriesMetadata writerIdentity + * @interface ILinkMetadata + * @property {google.protobuf.ITimestamp|null} [startTime] LinkMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] LinkMetadata endTime + * @property {google.logging.v2.OperationState|null} [state] LinkMetadata state + * @property {google.logging.v2.ICreateLinkRequest|null} [createLinkRequest] LinkMetadata createLinkRequest + * @property {google.logging.v2.IDeleteLinkRequest|null} [deleteLinkRequest] LinkMetadata deleteLinkRequest */ /** - * Constructs a new CopyLogEntriesMetadata. + * Constructs a new LinkMetadata. * @memberof google.logging.v2 - * @classdesc Represents a CopyLogEntriesMetadata. - * @implements ICopyLogEntriesMetadata + * @classdesc Represents a LinkMetadata. + * @implements ILinkMetadata * @constructor - * @param {google.logging.v2.ICopyLogEntriesMetadata=} [properties] Properties to set + * @param {google.logging.v2.ILinkMetadata=} [properties] Properties to set */ - function CopyLogEntriesMetadata(properties) { + function LinkMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27598,83 +30891,81 @@ } /** - * CopyLogEntriesMetadata startTime. + * LinkMetadata startTime. * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @instance */ - CopyLogEntriesMetadata.prototype.startTime = null; + LinkMetadata.prototype.startTime = null; /** - * CopyLogEntriesMetadata endTime. + * LinkMetadata endTime. * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @instance */ - CopyLogEntriesMetadata.prototype.endTime = null; + LinkMetadata.prototype.endTime = null; /** - * CopyLogEntriesMetadata state. + * LinkMetadata state. * @member {google.logging.v2.OperationState} state - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @instance */ - CopyLogEntriesMetadata.prototype.state = 0; + LinkMetadata.prototype.state = 0; /** - * CopyLogEntriesMetadata cancellationRequested. - * @member {boolean} cancellationRequested - * @memberof google.logging.v2.CopyLogEntriesMetadata + * LinkMetadata createLinkRequest. + * @member {google.logging.v2.ICreateLinkRequest|null|undefined} createLinkRequest + * @memberof google.logging.v2.LinkMetadata * @instance */ - CopyLogEntriesMetadata.prototype.cancellationRequested = false; + LinkMetadata.prototype.createLinkRequest = null; /** - * CopyLogEntriesMetadata request. - * @member {google.logging.v2.ICopyLogEntriesRequest|null|undefined} request - * @memberof google.logging.v2.CopyLogEntriesMetadata + * LinkMetadata deleteLinkRequest. + * @member {google.logging.v2.IDeleteLinkRequest|null|undefined} deleteLinkRequest + * @memberof google.logging.v2.LinkMetadata * @instance */ - CopyLogEntriesMetadata.prototype.request = null; + LinkMetadata.prototype.deleteLinkRequest = null; - /** - * CopyLogEntriesMetadata progress. - * @member {number} progress - * @memberof google.logging.v2.CopyLogEntriesMetadata - * @instance - */ - CopyLogEntriesMetadata.prototype.progress = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CopyLogEntriesMetadata writerIdentity. - * @member {string} writerIdentity - * @memberof google.logging.v2.CopyLogEntriesMetadata + * LinkMetadata request. + * @member {"createLinkRequest"|"deleteLinkRequest"|undefined} request + * @memberof google.logging.v2.LinkMetadata * @instance */ - CopyLogEntriesMetadata.prototype.writerIdentity = ""; + Object.defineProperty(LinkMetadata.prototype, "request", { + get: $util.oneOfGetter($oneOfFields = ["createLinkRequest", "deleteLinkRequest"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CopyLogEntriesMetadata instance using the specified properties. + * Creates a new LinkMetadata instance using the specified properties. * @function create - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesMetadata=} [properties] Properties to set - * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata instance + * @param {google.logging.v2.ILinkMetadata=} [properties] Properties to set + * @returns {google.logging.v2.LinkMetadata} LinkMetadata instance */ - CopyLogEntriesMetadata.create = function create(properties) { - return new CopyLogEntriesMetadata(properties); + LinkMetadata.create = function create(properties) { + return new LinkMetadata(properties); }; /** - * Encodes the specified CopyLogEntriesMetadata message. Does not implicitly {@link google.logging.v2.CopyLogEntriesMetadata.verify|verify} messages. + * Encodes the specified LinkMetadata message. Does not implicitly {@link google.logging.v2.LinkMetadata.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesMetadata} message CopyLogEntriesMetadata message or plain object to encode + * @param {google.logging.v2.ILinkMetadata} message LinkMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CopyLogEntriesMetadata.encode = function encode(message, writer) { + LinkMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) @@ -27683,45 +30974,41 @@ $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.cancellationRequested != null && Object.hasOwnProperty.call(message, "cancellationRequested")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.cancellationRequested); - if (message.request != null && Object.hasOwnProperty.call(message, "request")) - $root.google.logging.v2.CopyLogEntriesRequest.encode(message.request, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.progress); - if (message.writerIdentity != null && Object.hasOwnProperty.call(message, "writerIdentity")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.writerIdentity); + if (message.createLinkRequest != null && Object.hasOwnProperty.call(message, "createLinkRequest")) + $root.google.logging.v2.CreateLinkRequest.encode(message.createLinkRequest, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deleteLinkRequest != null && Object.hasOwnProperty.call(message, "deleteLinkRequest")) + $root.google.logging.v2.DeleteLinkRequest.encode(message.deleteLinkRequest, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified CopyLogEntriesMetadata message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesMetadata.verify|verify} messages. + * Encodes the specified LinkMetadata message, length delimited. Does not implicitly {@link google.logging.v2.LinkMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesMetadata} message CopyLogEntriesMetadata message or plain object to encode + * @param {google.logging.v2.ILinkMetadata} message LinkMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CopyLogEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + LinkMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CopyLogEntriesMetadata message from the specified reader or buffer. + * Decodes a LinkMetadata message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata + * @returns {google.logging.v2.LinkMetadata} LinkMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesMetadata.decode = function decode(reader, length) { + LinkMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LinkMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -27737,20 +31024,12 @@ message.state = reader.int32(); break; } - case 4: { - message.cancellationRequested = reader.bool(); - break; - } - case 5: { - message.request = $root.google.logging.v2.CopyLogEntriesRequest.decode(reader, reader.uint32()); - break; - } - case 6: { - message.progress = reader.int32(); + case 4: { + message.createLinkRequest = $root.google.logging.v2.CreateLinkRequest.decode(reader, reader.uint32()); break; } - case 7: { - message.writerIdentity = reader.string(); + case 5: { + message.deleteLinkRequest = $root.google.logging.v2.DeleteLinkRequest.decode(reader, reader.uint32()); break; } default: @@ -27762,32 +31041,33 @@ }; /** - * Decodes a CopyLogEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes a LinkMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata + * @returns {google.logging.v2.LinkMetadata} LinkMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { + LinkMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CopyLogEntriesMetadata message. + * Verifies a LinkMetadata message. * @function verify - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CopyLogEntriesMetadata.verify = function verify(message) { + LinkMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.startTime != null && message.hasOwnProperty("startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) @@ -27811,43 +31091,47 @@ case 6: break; } - if (message.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) - if (typeof message.cancellationRequested !== "boolean") - return "cancellationRequested: boolean expected"; - if (message.request != null && message.hasOwnProperty("request")) { - var error = $root.google.logging.v2.CopyLogEntriesRequest.verify(message.request); - if (error) - return "request." + error; + if (message.createLinkRequest != null && message.hasOwnProperty("createLinkRequest")) { + properties.request = 1; + { + var error = $root.google.logging.v2.CreateLinkRequest.verify(message.createLinkRequest); + if (error) + return "createLinkRequest." + error; + } + } + if (message.deleteLinkRequest != null && message.hasOwnProperty("deleteLinkRequest")) { + if (properties.request === 1) + return "request: multiple values"; + properties.request = 1; + { + var error = $root.google.logging.v2.DeleteLinkRequest.verify(message.deleteLinkRequest); + if (error) + return "deleteLinkRequest." + error; + } } - if (message.progress != null && message.hasOwnProperty("progress")) - if (!$util.isInteger(message.progress)) - return "progress: integer expected"; - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - if (!$util.isString(message.writerIdentity)) - return "writerIdentity: string expected"; return null; }; /** - * Creates a CopyLogEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a LinkMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CopyLogEntriesMetadata} CopyLogEntriesMetadata + * @returns {google.logging.v2.LinkMetadata} LinkMetadata */ - CopyLogEntriesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CopyLogEntriesMetadata) + LinkMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LinkMetadata) return object; - var message = new $root.google.logging.v2.CopyLogEntriesMetadata(); + var message = new $root.google.logging.v2.LinkMetadata(); if (object.startTime != null) { if (typeof object.startTime !== "object") - throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.startTime: object expected"); + throw TypeError(".google.logging.v2.LinkMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } if (object.endTime != null) { if (typeof object.endTime !== "object") - throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.endTime: object expected"); + throw TypeError(".google.logging.v2.LinkMetadata.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } switch (object.state) { @@ -27886,30 +31170,29 @@ message.state = 6; break; } - if (object.cancellationRequested != null) - message.cancellationRequested = Boolean(object.cancellationRequested); - if (object.request != null) { - if (typeof object.request !== "object") - throw TypeError(".google.logging.v2.CopyLogEntriesMetadata.request: object expected"); - message.request = $root.google.logging.v2.CopyLogEntriesRequest.fromObject(object.request); + if (object.createLinkRequest != null) { + if (typeof object.createLinkRequest !== "object") + throw TypeError(".google.logging.v2.LinkMetadata.createLinkRequest: object expected"); + message.createLinkRequest = $root.google.logging.v2.CreateLinkRequest.fromObject(object.createLinkRequest); + } + if (object.deleteLinkRequest != null) { + if (typeof object.deleteLinkRequest !== "object") + throw TypeError(".google.logging.v2.LinkMetadata.deleteLinkRequest: object expected"); + message.deleteLinkRequest = $root.google.logging.v2.DeleteLinkRequest.fromObject(object.deleteLinkRequest); } - if (object.progress != null) - message.progress = object.progress | 0; - if (object.writerIdentity != null) - message.writerIdentity = String(object.writerIdentity); return message; }; /** - * Creates a plain object from a CopyLogEntriesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a LinkMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static - * @param {google.logging.v2.CopyLogEntriesMetadata} message CopyLogEntriesMetadata + * @param {google.logging.v2.LinkMetadata} message LinkMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CopyLogEntriesMetadata.toObject = function toObject(message, options) { + LinkMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -27917,10 +31200,6 @@ object.startTime = null; object.endTime = null; object.state = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; - object.cancellationRequested = false; - object.request = null; - object.progress = 0; - object.writerIdentity = ""; } if (message.startTime != null && message.hasOwnProperty("startTime")) object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); @@ -27928,64 +31207,128 @@ object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.logging.v2.OperationState[message.state] === undefined ? message.state : $root.google.logging.v2.OperationState[message.state] : message.state; - if (message.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) - object.cancellationRequested = message.cancellationRequested; - if (message.request != null && message.hasOwnProperty("request")) - object.request = $root.google.logging.v2.CopyLogEntriesRequest.toObject(message.request, options); - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = message.progress; - if (message.writerIdentity != null && message.hasOwnProperty("writerIdentity")) - object.writerIdentity = message.writerIdentity; + if (message.createLinkRequest != null && message.hasOwnProperty("createLinkRequest")) { + object.createLinkRequest = $root.google.logging.v2.CreateLinkRequest.toObject(message.createLinkRequest, options); + if (options.oneofs) + object.request = "createLinkRequest"; + } + if (message.deleteLinkRequest != null && message.hasOwnProperty("deleteLinkRequest")) { + object.deleteLinkRequest = $root.google.logging.v2.DeleteLinkRequest.toObject(message.deleteLinkRequest, options); + if (options.oneofs) + object.request = "deleteLinkRequest"; + } return object; }; /** - * Converts this CopyLogEntriesMetadata to JSON. + * Converts this LinkMetadata to JSON. * @function toJSON - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @instance * @returns {Object.} JSON object */ - CopyLogEntriesMetadata.prototype.toJSON = function toJSON() { + LinkMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CopyLogEntriesMetadata + * Gets the default type url for LinkMetadata * @function getTypeUrl - * @memberof google.logging.v2.CopyLogEntriesMetadata + * @memberof google.logging.v2.LinkMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CopyLogEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LinkMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesMetadata"; + return typeUrlPrefix + "/google.logging.v2.LinkMetadata"; }; - return CopyLogEntriesMetadata; + return LinkMetadata; })(); - v2.CopyLogEntriesResponse = (function() { + /** + * OperationState enum. + * @name google.logging.v2.OperationState + * @enum {number} + * @property {number} OPERATION_STATE_UNSPECIFIED=0 OPERATION_STATE_UNSPECIFIED value + * @property {number} OPERATION_STATE_SCHEDULED=1 OPERATION_STATE_SCHEDULED value + * @property {number} OPERATION_STATE_WAITING_FOR_PERMISSIONS=2 OPERATION_STATE_WAITING_FOR_PERMISSIONS value + * @property {number} OPERATION_STATE_RUNNING=3 OPERATION_STATE_RUNNING value + * @property {number} OPERATION_STATE_SUCCEEDED=4 OPERATION_STATE_SUCCEEDED value + * @property {number} OPERATION_STATE_FAILED=5 OPERATION_STATE_FAILED value + * @property {number} OPERATION_STATE_CANCELLED=6 OPERATION_STATE_CANCELLED value + */ + v2.OperationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPERATION_STATE_SCHEDULED"] = 1; + values[valuesById[2] = "OPERATION_STATE_WAITING_FOR_PERMISSIONS"] = 2; + values[valuesById[3] = "OPERATION_STATE_RUNNING"] = 3; + values[valuesById[4] = "OPERATION_STATE_SUCCEEDED"] = 4; + values[valuesById[5] = "OPERATION_STATE_FAILED"] = 5; + values[valuesById[6] = "OPERATION_STATE_CANCELLED"] = 6; + return values; + })(); + + /** + * LifecycleState enum. + * @name google.logging.v2.LifecycleState + * @enum {number} + * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value + * @property {number} UPDATING=3 UPDATING value + * @property {number} CREATING=4 CREATING value + * @property {number} FAILED=5 FAILED value + */ + v2.LifecycleState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "DELETE_REQUESTED"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "CREATING"] = 4; + values[valuesById[5] = "FAILED"] = 5; + return values; + })(); + + /** + * IndexType enum. + * @name google.logging.v2.IndexType + * @enum {number} + * @property {number} INDEX_TYPE_UNSPECIFIED=0 INDEX_TYPE_UNSPECIFIED value + * @property {number} INDEX_TYPE_STRING=1 INDEX_TYPE_STRING value + * @property {number} INDEX_TYPE_INTEGER=2 INDEX_TYPE_INTEGER value + */ + v2.IndexType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INDEX_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INDEX_TYPE_STRING"] = 1; + values[valuesById[2] = "INDEX_TYPE_INTEGER"] = 2; + return values; + })(); + + v2.LocationMetadata = (function() { /** - * Properties of a CopyLogEntriesResponse. + * Properties of a LocationMetadata. * @memberof google.logging.v2 - * @interface ICopyLogEntriesResponse - * @property {number|Long|null} [logEntriesCopiedCount] CopyLogEntriesResponse logEntriesCopiedCount + * @interface ILocationMetadata + * @property {boolean|null} [logAnalyticsEnabled] LocationMetadata logAnalyticsEnabled */ /** - * Constructs a new CopyLogEntriesResponse. + * Constructs a new LocationMetadata. * @memberof google.logging.v2 - * @classdesc Represents a CopyLogEntriesResponse. - * @implements ICopyLogEntriesResponse + * @classdesc Represents a LocationMetadata. + * @implements ILocationMetadata * @constructor - * @param {google.logging.v2.ICopyLogEntriesResponse=} [properties] Properties to set + * @param {google.logging.v2.ILocationMetadata=} [properties] Properties to set */ - function CopyLogEntriesResponse(properties) { + function LocationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27993,75 +31336,75 @@ } /** - * CopyLogEntriesResponse logEntriesCopiedCount. - * @member {number|Long} logEntriesCopiedCount - * @memberof google.logging.v2.CopyLogEntriesResponse + * LocationMetadata logAnalyticsEnabled. + * @member {boolean} logAnalyticsEnabled + * @memberof google.logging.v2.LocationMetadata * @instance */ - CopyLogEntriesResponse.prototype.logEntriesCopiedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + LocationMetadata.prototype.logAnalyticsEnabled = false; /** - * Creates a new CopyLogEntriesResponse instance using the specified properties. + * Creates a new LocationMetadata instance using the specified properties. * @function create - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesResponse=} [properties] Properties to set - * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse instance + * @param {google.logging.v2.ILocationMetadata=} [properties] Properties to set + * @returns {google.logging.v2.LocationMetadata} LocationMetadata instance */ - CopyLogEntriesResponse.create = function create(properties) { - return new CopyLogEntriesResponse(properties); + LocationMetadata.create = function create(properties) { + return new LocationMetadata(properties); }; /** - * Encodes the specified CopyLogEntriesResponse message. Does not implicitly {@link google.logging.v2.CopyLogEntriesResponse.verify|verify} messages. + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.logging.v2.LocationMetadata.verify|verify} messages. * @function encode - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesResponse} message CopyLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.ILocationMetadata} message LocationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CopyLogEntriesResponse.encode = function encode(message, writer) { + LocationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logEntriesCopiedCount != null && Object.hasOwnProperty.call(message, "logEntriesCopiedCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.logEntriesCopiedCount); + if (message.logAnalyticsEnabled != null && Object.hasOwnProperty.call(message, "logAnalyticsEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.logAnalyticsEnabled); return writer; }; /** - * Encodes the specified CopyLogEntriesResponse message, length delimited. Does not implicitly {@link google.logging.v2.CopyLogEntriesResponse.verify|verify} messages. + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.logging.v2.LocationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static - * @param {google.logging.v2.ICopyLogEntriesResponse} message CopyLogEntriesResponse message or plain object to encode + * @param {google.logging.v2.ILocationMetadata} message LocationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CopyLogEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CopyLogEntriesResponse message from the specified reader or buffer. + * Decodes a LocationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse + * @returns {google.logging.v2.LocationMetadata} LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesResponse.decode = function decode(reader, length) { + LocationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LocationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.logEntriesCopiedCount = reader.int64(); + message.logAnalyticsEnabled = reader.bool(); break; } default: @@ -28073,156 +31416,102 @@ }; /** - * Decodes a CopyLogEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse + * @returns {google.logging.v2.LocationMetadata} LocationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + LocationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CopyLogEntriesResponse message. + * Verifies a LocationMetadata message. * @function verify - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CopyLogEntriesResponse.verify = function verify(message) { + LocationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.logEntriesCopiedCount != null && message.hasOwnProperty("logEntriesCopiedCount")) - if (!$util.isInteger(message.logEntriesCopiedCount) && !(message.logEntriesCopiedCount && $util.isInteger(message.logEntriesCopiedCount.low) && $util.isInteger(message.logEntriesCopiedCount.high))) - return "logEntriesCopiedCount: integer|Long expected"; + if (message.logAnalyticsEnabled != null && message.hasOwnProperty("logAnalyticsEnabled")) + if (typeof message.logAnalyticsEnabled !== "boolean") + return "logAnalyticsEnabled: boolean expected"; return null; }; /** - * Creates a CopyLogEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static * @param {Object.} object Plain object - * @returns {google.logging.v2.CopyLogEntriesResponse} CopyLogEntriesResponse + * @returns {google.logging.v2.LocationMetadata} LocationMetadata */ - CopyLogEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.logging.v2.CopyLogEntriesResponse) + LocationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.logging.v2.LocationMetadata) return object; - var message = new $root.google.logging.v2.CopyLogEntriesResponse(); - if (object.logEntriesCopiedCount != null) - if ($util.Long) - (message.logEntriesCopiedCount = $util.Long.fromValue(object.logEntriesCopiedCount)).unsigned = false; - else if (typeof object.logEntriesCopiedCount === "string") - message.logEntriesCopiedCount = parseInt(object.logEntriesCopiedCount, 10); - else if (typeof object.logEntriesCopiedCount === "number") - message.logEntriesCopiedCount = object.logEntriesCopiedCount; - else if (typeof object.logEntriesCopiedCount === "object") - message.logEntriesCopiedCount = new $util.LongBits(object.logEntriesCopiedCount.low >>> 0, object.logEntriesCopiedCount.high >>> 0).toNumber(); + var message = new $root.google.logging.v2.LocationMetadata(); + if (object.logAnalyticsEnabled != null) + message.logAnalyticsEnabled = Boolean(object.logAnalyticsEnabled); return message; }; /** - * Creates a plain object from a CopyLogEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static - * @param {google.logging.v2.CopyLogEntriesResponse} message CopyLogEntriesResponse + * @param {google.logging.v2.LocationMetadata} message LocationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CopyLogEntriesResponse.toObject = function toObject(message, options) { + LocationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.logEntriesCopiedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.logEntriesCopiedCount = options.longs === String ? "0" : 0; - if (message.logEntriesCopiedCount != null && message.hasOwnProperty("logEntriesCopiedCount")) - if (typeof message.logEntriesCopiedCount === "number") - object.logEntriesCopiedCount = options.longs === String ? String(message.logEntriesCopiedCount) : message.logEntriesCopiedCount; - else - object.logEntriesCopiedCount = options.longs === String ? $util.Long.prototype.toString.call(message.logEntriesCopiedCount) : options.longs === Number ? new $util.LongBits(message.logEntriesCopiedCount.low >>> 0, message.logEntriesCopiedCount.high >>> 0).toNumber() : message.logEntriesCopiedCount; + object.logAnalyticsEnabled = false; + if (message.logAnalyticsEnabled != null && message.hasOwnProperty("logAnalyticsEnabled")) + object.logAnalyticsEnabled = message.logAnalyticsEnabled; return object; }; /** - * Converts this CopyLogEntriesResponse to JSON. + * Converts this LocationMetadata to JSON. * @function toJSON - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @instance * @returns {Object.} JSON object */ - CopyLogEntriesResponse.prototype.toJSON = function toJSON() { + LocationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CopyLogEntriesResponse + * Gets the default type url for LocationMetadata * @function getTypeUrl - * @memberof google.logging.v2.CopyLogEntriesResponse + * @memberof google.logging.v2.LocationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CopyLogEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.logging.v2.CopyLogEntriesResponse"; + return typeUrlPrefix + "/google.logging.v2.LocationMetadata"; }; - return CopyLogEntriesResponse; - })(); - - /** - * LifecycleState enum. - * @name google.logging.v2.LifecycleState - * @enum {number} - * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} DELETE_REQUESTED=2 DELETE_REQUESTED value - */ - v2.LifecycleState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "DELETE_REQUESTED"] = 2; - return values; - })(); - - /** - * OperationState enum. - * @name google.logging.v2.OperationState - * @enum {number} - * @property {number} OPERATION_STATE_UNSPECIFIED=0 OPERATION_STATE_UNSPECIFIED value - * @property {number} OPERATION_STATE_SCHEDULED=1 OPERATION_STATE_SCHEDULED value - * @property {number} OPERATION_STATE_WAITING_FOR_PERMISSIONS=2 OPERATION_STATE_WAITING_FOR_PERMISSIONS value - * @property {number} OPERATION_STATE_RUNNING=3 OPERATION_STATE_RUNNING value - * @property {number} OPERATION_STATE_SUCCEEDED=4 OPERATION_STATE_SUCCEEDED value - * @property {number} OPERATION_STATE_FAILED=5 OPERATION_STATE_FAILED value - * @property {number} OPERATION_STATE_CANCELLED=6 OPERATION_STATE_CANCELLED value - */ - v2.OperationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATION_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPERATION_STATE_SCHEDULED"] = 1; - values[valuesById[2] = "OPERATION_STATE_WAITING_FOR_PERMISSIONS"] = 2; - values[valuesById[3] = "OPERATION_STATE_RUNNING"] = 3; - values[valuesById[4] = "OPERATION_STATE_SUCCEEDED"] = 4; - values[valuesById[5] = "OPERATION_STATE_FAILED"] = 5; - values[valuesById[6] = "OPERATION_STATE_CANCELLED"] = 6; - return values; + return LocationMetadata; })(); v2.MetricsServiceV2 = (function() { @@ -28434,6 +31723,7 @@ * @property {string|null} [name] LogMetric name * @property {string|null} [description] LogMetric description * @property {string|null} [filter] LogMetric filter + * @property {string|null} [bucketName] LogMetric bucketName * @property {boolean|null} [disabled] LogMetric disabled * @property {google.api.IMetricDescriptor|null} [metricDescriptor] LogMetric metricDescriptor * @property {string|null} [valueExtractor] LogMetric valueExtractor @@ -28484,6 +31774,14 @@ */ LogMetric.prototype.filter = ""; + /** + * LogMetric bucketName. + * @member {string} bucketName + * @memberof google.logging.v2.LogMetric + * @instance + */ + LogMetric.prototype.bucketName = ""; + /** * LogMetric disabled. * @member {boolean} disabled @@ -28595,6 +31893,8 @@ $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) writer.uint32(/* id 12, wireType 0 =*/96).bool(message.disabled); + if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.bucketName); return writer; }; @@ -28641,6 +31941,10 @@ message.filter = reader.string(); break; } + case 13: { + message.bucketName = reader.string(); + break; + } case 12: { message.disabled = reader.bool(); break; @@ -28736,6 +32040,9 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + if (!$util.isString(message.bucketName)) + return "bucketName: string expected"; if (message.disabled != null && message.hasOwnProperty("disabled")) if (typeof message.disabled !== "boolean") return "disabled: boolean expected"; @@ -28799,6 +32106,8 @@ message.description = String(object.description); if (object.filter != null) message.filter = String(object.filter); + if (object.bucketName != null) + message.bucketName = String(object.bucketName); if (object.disabled != null) message.disabled = Boolean(object.disabled); if (object.metricDescriptor != null) { @@ -28875,6 +32184,7 @@ object.createTime = null; object.updateTime = null; object.disabled = false; + object.bucketName = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -28902,6 +32212,8 @@ object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.disabled != null && message.hasOwnProperty("disabled")) object.disabled = message.disabled; + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + object.bucketName = message.bucketName; return object; }; diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 1f0e4f26bb0..8d93c24ccc9 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -1451,7 +1451,7 @@ "responseType": "ListLogsResponse", "options": { "(google.api.http).get": "/v2/{parent=*/*}/logs", - "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*}/logs", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs", "(google.api.method_signature)": "parent" }, "parsedOptions": [ @@ -1470,6 +1470,18 @@ }, { "get": "/v2/{parent=billingAccounts/*}/logs" + }, + { + "get": "/v2/{parent=projects/*/locations/*/buckets/*/views/*}/logs" + }, + { + "get": "/v2/{parent=organizations/*/locations/*/buckets/*/views/*}/logs" + }, + { + "get": "/v2/{parent=folders/*/locations/*/buckets/*/views/*}/logs" + }, + { + "get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs" } ] } @@ -1667,6 +1679,15 @@ "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" } }, + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" + } + }, "pageSize": { "type": "int32", "id": 2, @@ -1680,15 +1701,6 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "resourceNames": { - "rule": "repeated", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).child_type": "logging.googleapis.com/Log" - } } } }, @@ -1812,7 +1824,7 @@ "responseType": "LogBucket", "options": { "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*}" + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" }, "parsedOptions": [ { @@ -1829,13 +1841,101 @@ "get": "/v2/{name=folders/*/locations/*/buckets/*}" }, { - "get": "/v2/{name=billingAccounts/*/buckets/*}" + "get": "/v2/{name=billingAccounts/*/locations/*/buckets/*}" } ] } } ] }, + "CreateBucketAsync": { + "requestType": "CreateBucketRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=*/*/locations/*}/buckets:createAsync", + "(google.api.http).body": "bucket", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*}/buckets:createAsync", + "(google.api.http).additional_bindings.body": "bucket", + "(google.longrunning.operation_info).response_type": "LogBucket", + "(google.longrunning.operation_info).metadata_type": "BucketMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*/locations/*}/buckets:createAsync", + "body": "bucket", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*}/buckets:createAsync", + "body": "bucket" + }, + { + "post": "/v2/{parent=organizations/*/locations/*}/buckets:createAsync", + "body": "bucket" + }, + { + "post": "/v2/{parent=folders/*/locations/*}/buckets:createAsync", + "body": "bucket" + }, + { + "post": "/v2/{parent=billingAccounts/*/locations/*}/buckets:createAsync", + "body": "bucket" + } + ] + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "LogBucket", + "metadata_type": "BucketMetadata" + } + } + ] + }, + "UpdateBucketAsync": { + "requestType": "UpdateBucketRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{name=*/*/locations/*/buckets/*}:updateAsync", + "(google.api.http).body": "bucket", + "(google.api.http).additional_bindings.post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:updateAsync", + "(google.api.http).additional_bindings.body": "bucket", + "(google.longrunning.operation_info).response_type": "LogBucket", + "(google.longrunning.operation_info).metadata_type": "BucketMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=*/*/locations/*/buckets/*}:updateAsync", + "body": "bucket", + "additional_bindings": [ + { + "post": "/v2/{name=projects/*/locations/*/buckets/*}:updateAsync", + "body": "bucket" + }, + { + "post": "/v2/{name=organizations/*/locations/*/buckets/*}:updateAsync", + "body": "bucket" + }, + { + "post": "/v2/{name=folders/*/locations/*/buckets/*}:updateAsync", + "body": "bucket" + }, + { + "post": "/v2/{name=billingAccounts/*/locations/*/buckets/*}:updateAsync", + "body": "bucket" + } + ] + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "LogBucket", + "metadata_type": "BucketMetadata" + } + } + ] + }, "CreateBucket": { "requestType": "CreateBucketRequest", "responseType": "LogBucket", @@ -2011,7 +2111,7 @@ "responseType": "LogView", "options": { "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*/views/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" }, "parsedOptions": [ { @@ -2028,7 +2128,7 @@ "get": "/v2/{name=folders/*/locations/*/buckets/*/views/*}" }, { - "get": "/v2/{name=billingAccounts/*/buckets/*/views/*}" + "get": "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}" } ] } @@ -2335,6 +2435,161 @@ } ] }, + "CreateLink": { + "requestType": "CreateLinkRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=*/*/locations/*/buckets/*}/links", + "(google.api.http).body": "link", + "(google.api.http).additional_bindings.post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links", + "(google.api.http).additional_bindings.body": "link", + "(google.api.method_signature)": "parent,link,link_id", + "(google.longrunning.operation_info).response_type": "Link", + "(google.longrunning.operation_info).metadata_type": "LinkMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=*/*/locations/*/buckets/*}/links", + "body": "link", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*/buckets/*}/links", + "body": "link" + }, + { + "post": "/v2/{parent=organizations/*/locations/*/buckets/*}/links", + "body": "link" + }, + { + "post": "/v2/{parent=folders/*/locations/*/buckets/*}/links", + "body": "link" + }, + { + "post": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links", + "body": "link" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,link,link_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Link", + "metadata_type": "LinkMetadata" + } + } + ] + }, + "DeleteLink": { + "requestType": "DeleteLinkRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v2/{name=*/*/locations/*/buckets/*/links/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "LinkMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=*/*/locations/*/buckets/*/links/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/locations/*/buckets/*/links/*}" + }, + { + "delete": "/v2/{name=organizations/*/locations/*/buckets/*/links/*}" + }, + { + "delete": "/v2/{name=folders/*/locations/*/buckets/*/links/*}" + }, + { + "delete": "/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "LinkMetadata" + } + } + ] + }, + "ListLinks": { + "requestType": "ListLinksRequest", + "responseType": "ListLinksResponse", + "options": { + "(google.api.http).get": "/v2/{parent=*/*/locations/*/buckets/*}/links", + "(google.api.http).additional_bindings.get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=*/*/locations/*/buckets/*}/links", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*/buckets/*}/links" + }, + { + "get": "/v2/{parent=organizations/*/locations/*/buckets/*}/links" + }, + { + "get": "/v2/{parent=folders/*/locations/*/buckets/*}/links" + }, + { + "get": "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetLink": { + "requestType": "GetLinkRequest", + "responseType": "Link", + "options": { + "(google.api.http).get": "/v2/{name=*/*/locations/*/buckets/*/links/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=*/*/locations/*/buckets/*/links/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/locations/*/buckets/*/links/*}" + }, + { + "get": "/v2/{name=organizations/*/locations/*/buckets/*/links/*}" + }, + { + "get": "/v2/{name=folders/*/locations/*/buckets/*/links/*}" + }, + { + "get": "/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "ListExclusions": { "requestType": "ListExclusionsRequest", "responseType": "ListExclusionsResponse", @@ -2656,6 +2911,31 @@ } } }, + "IndexConfig": { + "fields": { + "fieldPath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "IndexType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "LogBucket": { "options": { "(google.api.resource).type": "logging.googleapis.com/LogBucket", @@ -2702,11 +2982,20 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "analyticsEnabled": { + "type": "bool", + "id": 14 + }, "restrictedFields": { "rule": "repeated", "type": "string", "id": 15 }, + "indexConfigs": { + "rule": "repeated", + "type": "IndexConfig", + "id": 17 + }, "cmekSettings": { "type": "CmekSettings", "id": 19 @@ -2857,6 +3146,51 @@ } } }, + "BigQueryDataset": { + "fields": { + "datasetId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Link": { + "options": { + "(google.api.resource).type": "logging.googleapis.com/Link", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lifecycleState": { + "type": "LifecycleState", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigqueryDataset": { + "type": "BigQueryDataset", + "id": 5 + } + } + }, "BigQueryOptions": { "fields": { "usePartitionedTables": { @@ -3236,6 +3570,95 @@ } } }, + "CreateLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Link" + } + }, + "link": { + "type": "Link", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "linkId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Link" + } + } + } + }, + "ListLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "logging.googleapis.com/Link" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListLinksResponse": { + "fields": { + "links": { + "rule": "repeated", + "type": "Link", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "logging.googleapis.com/Link" + } + } + } + }, "LogExclusion": { "options": { "(google.api.resource).type": "logging.googleapis.com/LogExclusion", @@ -3448,6 +3871,10 @@ "type": "string", "id": 2 }, + "kmsKeyVersionName": { + "type": "string", + "id": 4 + }, "serviceAccountId": { "type": "string", "id": 3, @@ -3602,11 +4029,68 @@ } } }, - "LifecycleState": { - "values": { - "LIFECYCLE_STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DELETE_REQUESTED": 2 + "BucketMetadata": { + "oneofs": { + "request": { + "oneof": [ + "createBucketRequest", + "updateBucketRequest" + ] + } + }, + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "state": { + "type": "OperationState", + "id": 3 + }, + "createBucketRequest": { + "type": "CreateBucketRequest", + "id": 4 + }, + "updateBucketRequest": { + "type": "UpdateBucketRequest", + "id": 5 + } + } + }, + "LinkMetadata": { + "oneofs": { + "request": { + "oneof": [ + "createLinkRequest", + "deleteLinkRequest" + ] + } + }, + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "state": { + "type": "OperationState", + "id": 3 + }, + "createLinkRequest": { + "type": "CreateLinkRequest", + "id": 4 + }, + "deleteLinkRequest": { + "type": "DeleteLinkRequest", + "id": 5 + } } }, "OperationState": { @@ -3620,6 +4104,31 @@ "OPERATION_STATE_CANCELLED": 6 } }, + "LifecycleState": { + "values": { + "LIFECYCLE_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "DELETE_REQUESTED": 2, + "UPDATING": 3, + "CREATING": 4, + "FAILED": 5 + } + }, + "IndexType": { + "values": { + "INDEX_TYPE_UNSPECIFIED": 0, + "INDEX_TYPE_STRING": 1, + "INDEX_TYPE_INTEGER": 2 + } + }, + "LocationMetadata": { + "fields": { + "logAnalyticsEnabled": { + "type": "bool", + "id": 1 + } + } + }, "MetricsServiceV2": { "options": { "(google.api.default_host)": "logging.googleapis.com", @@ -3749,6 +4258,13 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "bucketName": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "disabled": { "type": "bool", "id": 12, diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js index 7f685784c00..a693c0b746e 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js @@ -33,8 +33,8 @@ function main(name, destination) { */ // const name = 'abc123' /** - * Optional. A filter specifying which log entries to copy. The filter must be no more - * than 20k characters. An empty filter matches all log entries. + * Optional. A filter specifying which log entries to copy. The filter must be + * no more than 20k characters. An empty filter matches all log entries. */ // const filter = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js index e9f37236ecd..de713cab011 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js @@ -34,15 +34,15 @@ function main(parent, bucketId, bucket) { */ // const parent = 'abc123' /** - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited - * to 100 characters and can include only letters, digits, underscores, - * hyphens, and periods. + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers + * are limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. */ // const bucketId = 'abc123' /** - * Required. The new bucket. The region specified in the new bucket must be compliant - * with any Location Restriction Org Policy. The name field in the bucket is - * ignored. + * Required. The new bucket. The region specified in the new bucket must be + * compliant with any Location Restriction Org Policy. The name field in the + * bucket is ignored. */ // const bucket = {} diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js new file mode 100644 index 00000000000..ec1d19ea6f5 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(parent, bucketId, bucket) { + // [START logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource in which to create the log bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * For example: + * `"projects/my-project/locations/global"` + */ + // const parent = 'abc123' + /** + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers + * are limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + */ + // const bucketId = 'abc123' + /** + * Required. The new bucket. The region specified in the new bucket must be + * compliant with any Location Restriction Org Policy. The name field in the + * bucket is ignored. + */ + // const bucket = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callCreateBucketAsync() { + // Construct request + const request = { + parent, + bucketId, + bucket, + }; + + // Run request + const [operation] = await loggingClient.createBucketAsync(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBucketAsync(); + // [END logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js new file mode 100644 index 00000000000..5790763f4bb --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js @@ -0,0 +1,76 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(parent, link, linkId) { + // [START logging_v2_generated_ConfigServiceV2_CreateLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The full resource name of the bucket to create a link for. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + */ + // const parent = 'abc123' + /** + * Required. The new link. + */ + // const link = {} + /** + * Required. The ID to use for the link. The link_id can have up to 100 + * characters. A valid link_id must only have alphanumeric characters and + * underscores within it. + */ + // const linkId = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callCreateLink() { + // Construct request + const request = { + parent, + link, + linkId, + }; + + // Run request + const [operation] = await loggingClient.createLink(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateLink(); + // [END logging_v2_generated_ConfigServiceV2_CreateLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js index 00a70ecde6c..8b699c2ac95 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js @@ -52,7 +52,8 @@ function main(parent, sink) { * 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 google.logging.v2.LogSink. + * more information, see `writer_identity` in + * LogSink google.logging.v2.LogSink. */ // const uniqueWriterIdentity = true diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js index a7fdd458279..a8c4ec42490 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js @@ -34,7 +34,9 @@ function main(parent, viewId, view) { */ // const parent = 'abc123' /** - * Required. The id to use for this view. + * Required. A client-assigned identifier such as `"my-view"`. Identifiers are + * limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. */ // const viewId = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js new file mode 100644 index 00000000000..f2205aa3c46 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js @@ -0,0 +1,64 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_DeleteLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The full resource name of the link to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callDeleteLink() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await loggingClient.deleteLink(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteLink(); + // [END logging_v2_generated_ConfigServiceV2_DeleteLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js index 3f81a394f8f..fb7bccc7f99 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js @@ -27,8 +27,8 @@ function main(sinkName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The full resource name of the sink to delete, including the parent - * resource and the sink identifier: + * 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]" * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js new file mode 100644 index 00000000000..e580428b6f1 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(name) { + // [START logging_v2_generated_ConfigServiceV2_GetLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the link: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] + */ + // const name = 'abc123' + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callGetLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await loggingClient.getLink(request); + console.log(response); + } + + callGetLink(); + // [END logging_v2_generated_ConfigServiceV2_GetLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js index 7d43dfab860..b17be4e2104 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js @@ -38,16 +38,16 @@ function main(parent) { */ // const parent = 'abc123' /** - * 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. + * 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. */ // const pageToken = 'abc123' /** - * 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. + * 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. */ // const pageSize = 1234 diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js new file mode 100644 index 00000000000..6b5874eb613 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js @@ -0,0 +1,75 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(parent) { + // [START logging_v2_generated_ConfigServiceV2_ListLinks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource whose links are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ + */ + // const parent = 'abc123' + /** + * 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. + */ + // const pageToken = 'abc123' + /** + * Optional. The maximum number of results to return from this request. + */ + // const pageSize = 1234 + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callListLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await loggingClient.listLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLinks(); + // [END logging_v2_generated_ConfigServiceV2_ListLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js index 5fd022d27ab..bfe4cbf45da 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js @@ -32,10 +32,10 @@ function main(parent) { */ // const parent = 'abc123' /** - * 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. + * 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. */ // const pageToken = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js index 1609c2819bb..574c522d193 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js @@ -41,9 +41,9 @@ function main(name, bucket, updateMask) { */ // const bucket = {} /** - * Required. Field mask that specifies the fields in `bucket` that need an update. A - * bucket field will be overwritten if, and only if, it is in the update mask. - * `name` and output only fields cannot be updated. + * Required. Field mask that specifies the fields in `bucket` that need an + * update. A bucket field will be overwritten if, and only if, it is in the + * update mask. `name` and output only fields cannot be updated. * For a detailed `FieldMask` definition, see: * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask * For example: `updateMask=retention_days` diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js new file mode 100644 index 00000000000..8d9f449737e --- /dev/null +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js @@ -0,0 +1,81 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(name, bucket, updateMask) { + // [START logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The full resource name of the bucket to update. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + */ + // const name = 'abc123' + /** + * Required. The updated bucket. + */ + // const bucket = {} + /** + * Required. Field mask that specifies the fields in `bucket` that need an + * update. A bucket field will be overwritten if, and only if, it is in the + * update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=retention_days` + */ + // const updateMask = {} + + // Imports the Logging library + const {ConfigServiceV2Client} = require('@google-cloud/logging').v2; + + // Instantiates a client + const loggingClient = new ConfigServiceV2Client(); + + async function callUpdateBucketAsync() { + // Construct request + const request = { + name, + bucket, + updateMask, + }; + + // Run request + const [operation] = await loggingClient.updateBucketAsync(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBucketAsync(); + // [END logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js index f5050f10e49..5cb63f59f9c 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js @@ -37,15 +37,16 @@ function main(name, exclusion, updateMask) { */ // const name = 'abc123' /** - * Required. New values for the existing exclusion. Only the fields specified in - * `update_mask` are relevant. + * Required. New values for the existing exclusion. Only the fields specified + * in `update_mask` are relevant. */ // const exclusion = {} /** - * Required. A non-empty list of fields to change in the existing exclusion. New values - * for the fields are taken from the corresponding fields in the - * LogExclusion google.logging.v2.LogExclusion included in this request. Fields not mentioned in - * `update_mask` are not changed and are ignored in the request. + * Required. A non-empty list of fields to change in the existing exclusion. + * New values for the fields are taken from the corresponding fields in the + * LogExclusion google.logging.v2.LogExclusion included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. * For example, to change the filter and description of an exclusion, * specify an `update_mask` of `"filter,description"`. */ diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js index a91614e68f4..eb014678d0d 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js @@ -27,8 +27,8 @@ function main(sinkName, sink) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The full resource name of the sink to update, including the parent - * resource and the sink identifier: + * 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]" * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" @@ -38,8 +38,8 @@ function main(sinkName, sink) { */ // const sinkName = 'abc123' /** - * Required. The updated sink, whose name is the same identifier that appears as part - * of `sink_name`. + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. */ // const sink = {} /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js index cc43a691288..a74f2d9e6e6 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js @@ -39,16 +39,15 @@ function main(resourceNames) { * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. */ // const resourceNames = 'abc123' /** - * Optional. A filter that chooses which log entries to return. See Advanced - * Logs Queries (https://cloud.google.com/logging/docs/view/advanced-queries). - * Only log entries that match the filter are returned. An empty filter - * matches all log entries in the resources listed in `resource_names`. + * Optional. 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. + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. */ // const filter = 'abc123' /** @@ -61,10 +60,10 @@ function main(resourceNames) { */ // const orderBy = 'abc123' /** - * Optional. The maximum number of results to return from this request. Default is 50. - * If the value is negative or exceeds 1000, the request is rejected. The - * presence of `next_page_token` in the response indicates that more results - * might be available. + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, the request is + * rejected. The presence of `next_page_token` in the response indicates that + * more results might be available. */ // const pageSize = 1234 /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js index fa83d05a446..b0965a27361 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js @@ -27,13 +27,27 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name that owns the logs: + * Required. The resource name to list logs for: * * `projects/[PROJECT_ID]` * * `organizations/[ORGANIZATION_ID]` * * `billingAccounts/[BILLING_ACCOUNT_ID]` * * `folders/[FOLDER_ID]` */ // const parent = 'abc123' + /** + * Optional. List of resource names to list logs for: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * To support legacy queries, it could also be: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * The resource name in the `parent` field is added to this list. + */ + // const resourceNames = 'abc123' /** * Optional. The maximum number of results to return from this request. * Non-positive values are ignored. The presence of `nextPageToken` in the @@ -47,19 +61,6 @@ function main(parent) { * parameters should be identical to those in the previous call. */ // const pageToken = 'abc123' - /** - * Optional. The resource name that owns the logs: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - */ - // const resourceNames = 'abc123' // Imports the Logging library const {LoggingServiceV2Client} = require('@google-cloud/logging').v2; diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js index 80a19037896..b03cb642d19 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js @@ -40,13 +40,11 @@ function main(resourceNames) { */ // const resourceNames = 'abc123' /** - * Optional. A filter that chooses which log entries to return. See Advanced - * Logs Filters (https://cloud.google.com/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 in `resource_names` will cause - * the filter to return no results. The maximum length of the filter is 20000 - * characters. + * Optional. 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 a filter is + * 20,000 characters. */ // const filter = 'abc123' /** diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js index 13b20b1f28b..b1932cc0c52 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js @@ -83,11 +83,13 @@ function main(entries) { */ // const entries = 1234 /** - * 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, then the response status is the error associated - * with one of the failed entries and the response includes error details - * keyed by the entries' zero-based index in the `entries.write` method. + * Optional. Whether a batch's valid entries should be written even if some + * other entry failed due to a permanent error such as INVALID_ARGUMENT or + * PERMISSION_DENIED. If any entry failed, then the response status is the + * response status of one of the failed entries. The response will include + * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + * the entries' zero-based index in the `entries`. Failed requests for which + * no entries are written will not include per-entry errors. */ // const partialSuccess = true /** diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index a54c9f57241..4fb2f464752 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -99,6 +99,102 @@ } } }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async", + "title": "logging createBucketAsync Sample", + "origin": "API_DEFINITION", + "description": " Creates a log bucket asynchronously that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.create_bucket_async.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBucketAsync", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucketAsync", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "bucket_id", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateBucketAsync", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucketAsync", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async", + "title": "logging updateBucketAsync Sample", + "origin": "API_DEFINITION", + "description": " Updates a log bucket asynchronously. If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be returned. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.update_bucket_async.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBucketAsync", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucketAsync", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateBucketAsync", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucketAsync", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, { "regionTag": "logging_v2_generated_ConfigServiceV2_CreateBucket_async", "title": "logging createBucket Sample", @@ -151,7 +247,7 @@ "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateBucket_async", "title": "logging updateBucket Sample", "origin": "API_DEFINITION", - "description": " Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: `retention_period` If the retention period is decreased and the bucket is locked, `FAILED_PRECONDITION` will be returned. If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be returned. After a bucket has been created, the bucket's location cannot be changed.", + "description": " Updates a log bucket. If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be returned. After a bucket has been created, the bucket's location cannot be changed.", "canonical": true, "file": "config_service_v2.update_bucket.js", "language": "JAVASCRIPT", @@ -374,7 +470,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 68, "type": "FULL" } ], @@ -598,7 +694,7 @@ "segments": [ { "start": 25, - "end": 79, + "end": 80, "type": "FULL" } ], @@ -727,6 +823,182 @@ } } }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateLink_async", + "title": "logging createLink Sample", + "origin": "API_DEFINITION", + "description": " Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link.", + "canonical": true, + "file": "config_service_v2.create_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "link", + "type": ".google.logging.v2.Link" + }, + { + "name": "link_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateLink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateLink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteLink_async", + "title": "logging deleteLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a link. This will also delete the corresponding BigQuery linked dataset.", + "canonical": true, + "file": "config_service_v2.delete_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteLink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteLink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListLinks_async", + "title": "logging listLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists links.", + "canonical": true, + "file": "config_service_v2.list_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListLinksResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListLinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListLinks", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetLink_async", + "title": "logging getLink Sample", + "origin": "API_DEFINITION", + "description": " Gets a link.", + "canonical": true, + "file": "config_service_v2.get_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLink", + "fullName": "google.logging.v2.ConfigServiceV2.GetLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.Link", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetLink", + "fullName": "google.logging.v2.ConfigServiceV2.GetLink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, { "regionTag": "logging_v2_generated_ConfigServiceV2_ListExclusions_async", "title": "logging listExclusions Sample", @@ -870,7 +1142,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 76, "type": "FULL" } ], @@ -1222,7 +1494,7 @@ "segments": [ { "start": 25, - "end": 119, + "end": 121, "type": "FULL" } ], @@ -1282,7 +1554,7 @@ "segments": [ { "start": 25, - "end": 99, + "end": 98, "type": "FULL" } ], @@ -1382,7 +1654,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 86, "type": "FULL" } ], @@ -1395,6 +1667,10 @@ "name": "parent", "type": "TYPE_STRING" }, + { + "name": "resource_names", + "type": "TYPE_STRING[]" + }, { "name": "page_size", "type": "TYPE_INT32" @@ -1402,10 +1678,6 @@ { "name": "page_token", "type": "TYPE_STRING" - }, - { - "name": "resource_names", - "type": "TYPE_STRING[]" } ], "resultType": ".google.logging.v2.ListLogsResponse", @@ -1434,7 +1706,7 @@ "segments": [ { "start": 25, - "end": 83, + "end": 81, "type": "FULL" } ], diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 0a1e0437642..ae94e86807b 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -191,6 +191,10 @@ export class ConfigServiceV2Client { new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' ), + billingAccountLocationBucketLinkPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}' + ), billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' @@ -213,6 +217,9 @@ export class ConfigServiceV2Client { folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}' ), + folderLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}' + ), folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' ), @@ -240,6 +247,10 @@ export class ConfigServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), + organizationLocationBucketLinkPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}' + ), organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' @@ -265,6 +276,9 @@ export class ConfigServiceV2Client { projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}' ), + projectLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}' + ), projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' ), @@ -298,6 +312,11 @@ export class ConfigServiceV2Client { 'nextPageToken', 'sinks' ), + listLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'links' + ), listExclusions: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -346,7 +365,7 @@ export class ConfigServiceV2Client { {get: '/v2/{name=projects/*/locations/*/operations/*}'}, {get: '/v2/{name=organizations/*/locations/*/operations/*}'}, {get: '/v2/{name=folders/*/locations/*/operations/*}'}, - {get: '/v2/{name=billingAccounts/*/operations/*}'}, + {get: '/v2/{name=billingAccounts/*/locations/*/operations/*}'}, ], }, { @@ -364,6 +383,30 @@ export class ConfigServiceV2Client { this.operationsClient = this._gaxModule .lro(lroOptions) .operationsClient(opts); + const createBucketAsyncResponse = protoFilesRoot.lookup( + '.google.logging.v2.LogBucket' + ) as gax.protobuf.Type; + const createBucketAsyncMetadata = protoFilesRoot.lookup( + '.google.logging.v2.BucketMetadata' + ) as gax.protobuf.Type; + const updateBucketAsyncResponse = protoFilesRoot.lookup( + '.google.logging.v2.LogBucket' + ) as gax.protobuf.Type; + const updateBucketAsyncMetadata = protoFilesRoot.lookup( + '.google.logging.v2.BucketMetadata' + ) as gax.protobuf.Type; + const createLinkResponse = protoFilesRoot.lookup( + '.google.logging.v2.Link' + ) as gax.protobuf.Type; + const createLinkMetadata = protoFilesRoot.lookup( + '.google.logging.v2.LinkMetadata' + ) as gax.protobuf.Type; + const deleteLinkResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteLinkMetadata = protoFilesRoot.lookup( + '.google.logging.v2.LinkMetadata' + ) as gax.protobuf.Type; const copyLogEntriesResponse = protoFilesRoot.lookup( '.google.logging.v2.CopyLogEntriesResponse' ) as gax.protobuf.Type; @@ -372,6 +415,26 @@ export class ConfigServiceV2Client { ) as gax.protobuf.Type; this.descriptors.longrunning = { + createBucketAsync: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBucketAsyncResponse.decode.bind(createBucketAsyncResponse), + createBucketAsyncMetadata.decode.bind(createBucketAsyncMetadata) + ), + updateBucketAsync: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBucketAsyncResponse.decode.bind(updateBucketAsyncResponse), + updateBucketAsyncMetadata.decode.bind(updateBucketAsyncMetadata) + ), + createLink: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createLinkResponse.decode.bind(createLinkResponse), + createLinkMetadata.decode.bind(createLinkMetadata) + ), + deleteLink: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteLinkResponse.decode.bind(deleteLinkResponse), + deleteLinkMetadata.decode.bind(deleteLinkMetadata) + ), copyLogEntries: new this._gaxModule.LongrunningDescriptor( this.operationsClient, copyLogEntriesResponse.decode.bind(copyLogEntriesResponse), @@ -431,6 +494,8 @@ export class ConfigServiceV2Client { const configServiceV2StubMethods = [ 'listBuckets', 'getBucket', + 'createBucketAsync', + 'updateBucketAsync', 'createBucket', 'updateBucket', 'deleteBucket', @@ -445,6 +510,10 @@ export class ConfigServiceV2Client { 'createSink', 'updateSink', 'deleteSink', + 'createLink', + 'deleteLink', + 'listLinks', + 'getLink', 'listExclusions', 'getExclusion', 'createExclusion', @@ -653,13 +722,13 @@ export class ConfigServiceV2Client { * * `"projects/my-project/locations/global"` * @param {string} request.bucketId - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited - * to 100 characters and can include only letters, digits, underscores, - * hyphens, and periods. + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers + * are limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. * @param {google.logging.v2.LogBucket} request.bucket - * Required. The new bucket. The region specified in the new bucket must be compliant - * with any Location Restriction Org Policy. The name field in the bucket is - * ignored. + * Required. The new bucket. The region specified in the new bucket must be + * compliant with any Location Restriction Org Policy. The name field in the + * bucket is ignored. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -737,11 +806,7 @@ export class ConfigServiceV2Client { return this.innerApiCalls.createBucket(request, options, callback); } /** - * Updates a log bucket. This method replaces the following fields in the - * existing bucket with values from the new bucket: `retention_period` - * - * If the retention period is decreased and the bucket is locked, - * `FAILED_PRECONDITION` will be returned. + * Updates a log bucket. * * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then * `FAILED_PRECONDITION` will be returned. @@ -764,9 +829,9 @@ export class ConfigServiceV2Client { * @param {google.logging.v2.LogBucket} request.bucket * Required. The updated bucket. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask that specifies the fields in `bucket` that need an update. A - * bucket field will be overwritten if, and only if, it is in the update mask. - * `name` and output only fields cannot be updated. + * Required. Field mask that specifies the fields in `bucket` that need an + * update. A bucket field will be overwritten if, and only if, it is in the + * update mask. `name` and output only fields cannot be updated. * * For a detailed `FieldMask` definition, see: * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask @@ -1141,7 +1206,9 @@ export class ConfigServiceV2Client { * * `"projects/my-project/locations/global/buckets/my-bucket"` * @param {string} request.viewId - * Required. The id to use for this view. + * Required. A client-assigned identifier such as `"my-view"`. Identifiers are + * limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. * @param {google.logging.v2.LogView} request.view * Required. The new view. * @param {object} [options] @@ -1542,7 +1609,8 @@ export class ConfigServiceV2Client { * 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 {@link google.logging.v2.LogSink|LogSink}. + * more information, see `writer_identity` in + * {@link google.logging.v2.LogSink|LogSink}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1629,8 +1697,8 @@ export class ConfigServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.sinkName - * Required. The full resource name of the sink to update, including the parent - * resource and the sink identifier: + * 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]" @@ -1641,8 +1709,8 @@ export class ConfigServiceV2Client { * * `"projects/my-project/sinks/my-sink"` * @param {google.logging.v2.LogSink} request.sink - * Required. The updated sink, whose name is the same identifier that appears as part - * of `sink_name`. + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. * @param {boolean} [request.uniqueWriterIdentity] * Optional. See {@link google.logging.v2.ConfigServiceV2.CreateSink|sinks.create} * for a description of this field. When updating a sink, the effect of this @@ -1755,8 +1823,8 @@ export class ConfigServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.sinkName - * Required. The full resource name of the sink to delete, including the parent - * resource and the sink identifier: + * 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]" @@ -1842,6 +1910,94 @@ export class ConfigServiceV2Client { this.initialize(); return this.innerApiCalls.deleteSink(request, options, callback); } + /** + * Gets a link. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the link: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.logging.v2.Link | Link}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.get_link.js + * region_tag:logging_v2_generated_ConfigServiceV2_GetLink_async + */ + getLink( + request?: protos.google.logging.v2.IGetLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILink, + protos.google.logging.v2.IGetLinkRequest | undefined, + {} | undefined + ] + >; + getLink( + request: protos.google.logging.v2.IGetLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.logging.v2.ILink, + protos.google.logging.v2.IGetLinkRequest | null | undefined, + {} | null | undefined + > + ): void; + getLink( + request: protos.google.logging.v2.IGetLinkRequest, + callback: Callback< + protos.google.logging.v2.ILink, + protos.google.logging.v2.IGetLinkRequest | null | undefined, + {} | null | undefined + > + ): void; + getLink( + request?: protos.google.logging.v2.IGetLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.logging.v2.ILink, + protos.google.logging.v2.IGetLinkRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.logging.v2.ILink, + protos.google.logging.v2.IGetLinkRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.logging.v2.ILink, + protos.google.logging.v2.IGetLinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getLink(request, options, callback); + } /** * Gets the description of an exclusion in the _Default sink. * @@ -2050,13 +2206,14 @@ export class ConfigServiceV2Client { * * `"projects/my-project/exclusions/my-exclusion"` * @param {google.logging.v2.LogExclusion} request.exclusion - * Required. New values for the existing exclusion. Only the fields specified in - * `update_mask` are relevant. + * Required. New values for the existing exclusion. Only the fields specified + * in `update_mask` are relevant. * @param {google.protobuf.FieldMask} request.updateMask - * Required. A non-empty list of fields to change in the existing exclusion. New values - * for the fields are taken from the corresponding fields in the - * {@link google.logging.v2.LogExclusion|LogExclusion} included in this request. Fields not mentioned in - * `update_mask` are not changed and are ignored in the request. + * Required. A non-empty list of fields to change in the existing exclusion. + * New values for the fields are taken from the corresponding fields in the + * {@link google.logging.v2.LogExclusion|LogExclusion} included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. * * For example, to change the filter and description of an exclusion, * specify an `update_mask` of `"filter,description"`. @@ -2690,21 +2847,28 @@ export class ConfigServiceV2Client { } /** - * Copies a set of log entries from a log bucket to a Cloud Storage bucket. + * Creates a log bucket asynchronously that can be used to store log entries. + * + * After a bucket has been created, the bucket's location cannot be changed. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. Log bucket from which to copy log entries. + * @param {string} request.parent + * Required. The resource in which to create the log bucket: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" * * For example: * - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * @param {string} [request.filter] - * Optional. A filter specifying which log entries to copy. The filter must be no more - * than 20k characters. An empty filter matches all log entries. - * @param {string} request.destination - * Required. Destination to which to copy log entries. + * `"projects/my-project/locations/global"` + * @param {string} request.bucketId + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers + * are limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * @param {google.logging.v2.LogBucket} request.bucket + * Required. The new bucket. The region specified in the new bucket must be + * compliant with any Location Restriction Org Policy. The name field in the + * bucket is ignored. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2714,61 +2878,61 @@ export class ConfigServiceV2Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v2/config_service_v2.copy_log_entries.js - * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async + * @example include:samples/generated/v2/config_service_v2.create_bucket_async.js + * region_tag:logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async */ - copyLogEntries( - request?: protos.google.logging.v2.ICopyLogEntriesRequest, + createBucketAsync( + request?: protos.google.logging.v2.ICreateBucketRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.logging.v2.ICopyLogEntriesResponse, - protos.google.logging.v2.ICopyLogEntriesMetadata + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - copyLogEntries( - request: protos.google.logging.v2.ICopyLogEntriesRequest, + createBucketAsync( + request: protos.google.logging.v2.ICreateBucketRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.logging.v2.ICopyLogEntriesResponse, - protos.google.logging.v2.ICopyLogEntriesMetadata + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - copyLogEntries( - request: protos.google.logging.v2.ICopyLogEntriesRequest, + createBucketAsync( + request: protos.google.logging.v2.ICreateBucketRequest, callback: Callback< LROperation< - protos.google.logging.v2.ICopyLogEntriesResponse, - protos.google.logging.v2.ICopyLogEntriesMetadata + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - copyLogEntries( - request?: protos.google.logging.v2.ICopyLogEntriesRequest, + createBucketAsync( + request?: protos.google.logging.v2.ICreateBucketRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.logging.v2.ICopyLogEntriesResponse, - protos.google.logging.v2.ICopyLogEntriesMetadata + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< LROperation< - protos.google.logging.v2.ICopyLogEntriesResponse, - protos.google.logging.v2.ICopyLogEntriesMetadata + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined @@ -2776,8 +2940,8 @@ export class ConfigServiceV2Client { ): Promise< [ LROperation< - protos.google.logging.v2.ICopyLogEntriesResponse, - protos.google.logging.v2.ICopyLogEntriesMetadata + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined @@ -2794,11 +2958,15 @@ export class ConfigServiceV2Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); this.initialize(); - return this.innerApiCalls.copyLogEntries(request, options, callback); + return this.innerApiCalls.createBucketAsync(request, options, callback); } /** - * Check the status of the long running operation returned by `copyLogEntries()`. + * Check the status of the long running operation returned by `createBucketAsync()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -2806,15 +2974,15 @@ export class ConfigServiceV2Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v2/config_service_v2.copy_log_entries.js - * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async + * @example include:samples/generated/v2/config_service_v2.create_bucket_async.js + * region_tag:logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async */ - async checkCopyLogEntriesProgress( + async checkCreateBucketAsyncProgress( name: string ): Promise< LROperation< - protos.google.logging.v2.CopyLogEntriesResponse, - protos.google.logging.v2.CopyLogEntriesMetadata + protos.google.logging.v2.LogBucket, + protos.google.logging.v2.BucketMetadata > > { const request = @@ -2824,98 +2992,122 @@ export class ConfigServiceV2Client { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.copyLogEntries, + this.descriptors.longrunning.createBucketAsync, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.logging.v2.CopyLogEntriesResponse, - protos.google.logging.v2.CopyLogEntriesMetadata + protos.google.logging.v2.LogBucket, + protos.google.logging.v2.BucketMetadata >; } /** - * Lists log buckets. + * Updates a log bucket asynchronously. + * + * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + * `FAILED_PRECONDITION` will be returned. + * + * After a bucket has been created, the bucket's location cannot be changed. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource whose buckets are to be listed: + * @param {string} request.name + * Required. The full resource name of the bucket to update. * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * @param {string} [request.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 {number} [request.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. + * For example: + * + * `"projects/my-project/locations/global/buckets/my-bucket"` + * @param {google.logging.v2.LogBucket} request.bucket + * Required. The updated bucket. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask that specifies the fields in `bucket` that need an + * update. A bucket field will be overwritten if, and only if, it is in the + * update mask. `name` and output only fields cannot be updated. + * + * For a detailed `FieldMask` definition, see: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * + * For example: `updateMask=retention_days` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.logging.v2.LogBucket | LogBucket}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listBucketsAsync()` - * method described below for async iteration which you can stop as needed. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.update_bucket_async.js + * region_tag:logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async */ - listBuckets( - request?: protos.google.logging.v2.IListBucketsRequest, + updateBucketAsync( + request?: protos.google.logging.v2.IUpdateBucketRequest, options?: CallOptions ): Promise< [ - protos.google.logging.v2.ILogBucket[], - protos.google.logging.v2.IListBucketsRequest | null, - protos.google.logging.v2.IListBucketsResponse + LROperation< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined ] >; - listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, + updateBucketAsync( + request: protos.google.logging.v2.IUpdateBucketRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket + callback: Callback< + LROperation< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listBuckets( - request: protos.google.logging.v2.IListBucketsRequest, - callback: PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket + updateBucketAsync( + request: protos.google.logging.v2.IUpdateBucketRequest, + callback: Callback< + LROperation< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listBuckets( - request?: protos.google.logging.v2.IListBucketsRequest, + updateBucketAsync( + request?: protos.google.logging.v2.IUpdateBucketRequest, optionsOrCallback?: | CallOptions - | PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket + | Callback< + LROperation< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined >, - callback?: PaginationCallback< - protos.google.logging.v2.IListBucketsRequest, - protos.google.logging.v2.IListBucketsResponse | null | undefined, - protos.google.logging.v2.ILogBucket + callback?: Callback< + LROperation< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): Promise< [ - protos.google.logging.v2.ILogBucket[], - protos.google.logging.v2.IListBucketsRequest | null, - protos.google.logging.v2.IListBucketsResponse + LROperation< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined ] > | void { request = request || {}; @@ -2931,17 +3123,594 @@ export class ConfigServiceV2Client { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.listBuckets(request, options, callback); + return this.innerApiCalls.updateBucketAsync(request, options, callback); } - /** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent + * Check the status of the long running operation returned by `updateBucketAsync()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.update_bucket_async.js + * region_tag:logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async + */ + async checkUpdateBucketAsyncProgress( + name: string + ): Promise< + LROperation< + protos.google.logging.v2.LogBucket, + protos.google.logging.v2.BucketMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateBucketAsync, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.logging.v2.LogBucket, + protos.google.logging.v2.BucketMetadata + >; + } + /** + * Asynchronously creates a linked dataset in BigQuery which makes it possible + * to use BigQuery to read the logs stored in the log bucket. A log bucket may + * currently only contain one link. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The full resource name of the bucket to create a link for. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * @param {google.logging.v2.Link} request.link + * Required. The new link. + * @param {string} request.linkId + * Required. The ID to use for the link. The link_id can have up to 100 + * characters. A valid link_id must only have alphanumeric characters and + * underscores within it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.create_link.js + * region_tag:logging_v2_generated_ConfigServiceV2_CreateLink_async + */ + createLink( + request?: protos.google.logging.v2.ICreateLinkRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.logging.v2.ILink, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createLink( + request: protos.google.logging.v2.ICreateLinkRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.logging.v2.ILink, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createLink( + request: protos.google.logging.v2.ICreateLinkRequest, + callback: Callback< + LROperation< + protos.google.logging.v2.ILink, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createLink( + request?: protos.google.logging.v2.ICreateLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.logging.v2.ILink, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.logging.v2.ILink, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.logging.v2.ILink, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createLink(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createLink()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.create_link.js + * region_tag:logging_v2_generated_ConfigServiceV2_CreateLink_async + */ + async checkCreateLinkProgress( + name: string + ): Promise< + LROperation< + protos.google.logging.v2.Link, + protos.google.logging.v2.LinkMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createLink, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.logging.v2.Link, + protos.google.logging.v2.LinkMetadata + >; + } + /** + * Deletes a link. This will also delete the corresponding BigQuery linked + * dataset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the link to delete. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.delete_link.js + * region_tag:logging_v2_generated_ConfigServiceV2_DeleteLink_async + */ + deleteLink( + request?: protos.google.logging.v2.IDeleteLinkRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteLink( + request: protos.google.logging.v2.IDeleteLinkRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteLink( + request: protos.google.logging.v2.IDeleteLinkRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteLink( + request?: protos.google.logging.v2.IDeleteLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.ILinkMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteLink(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteLink()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.delete_link.js + * region_tag:logging_v2_generated_ConfigServiceV2_DeleteLink_async + */ + async checkDeleteLinkProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.logging.v2.LinkMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteLink, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.logging.v2.LinkMetadata + >; + } + /** + * Copies a set of log entries from a log bucket to a Cloud Storage bucket. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Log bucket from which to copy log entries. + * + * For example: + * + * `"projects/my-project/locations/global/buckets/my-source-bucket"` + * @param {string} [request.filter] + * Optional. A filter specifying which log entries to copy. The filter must be + * no more than 20k characters. An empty filter matches all log entries. + * @param {string} request.destination + * Required. Destination to which to copy log entries. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.copy_log_entries.js + * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async + */ + copyLogEntries( + request?: protos.google.logging.v2.ICopyLogEntriesRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + copyLogEntries( + request: protos.google.logging.v2.ICopyLogEntriesRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + copyLogEntries( + request: protos.google.logging.v2.ICopyLogEntriesRequest, + callback: Callback< + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + copyLogEntries( + request?: protos.google.logging.v2.ICopyLogEntriesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + this.initialize(); + return this.innerApiCalls.copyLogEntries(request, options, callback); + } + /** + * Check the status of the long running operation returned by `copyLogEntries()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.copy_log_entries.js + * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async + */ + async checkCopyLogEntriesProgress( + name: string + ): Promise< + LROperation< + protos.google.logging.v2.CopyLogEntriesResponse, + protos.google.logging.v2.CopyLogEntriesMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.copyLogEntries, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.logging.v2.CopyLogEntriesResponse, + protos.google.logging.v2.CopyLogEntriesMetadata + >; + } + /** + * Lists log buckets. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.logging.v2.LogBucket | LogBucket}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBucketsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listBuckets( + request?: protos.google.logging.v2.IListBucketsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILogBucket[], + protos.google.logging.v2.IListBucketsRequest | null, + protos.google.logging.v2.IListBucketsResponse + ] + >; + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): void; + listBuckets( + request: protos.google.logging.v2.IListBucketsRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): void; + listBuckets( + request?: protos.google.logging.v2.IListBucketsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + >, + callback?: PaginationCallback< + protos.google.logging.v2.IListBucketsRequest, + protos.google.logging.v2.IListBucketsResponse | null | undefined, + protos.google.logging.v2.ILogBucket + > + ): Promise< + [ + protos.google.logging.v2.ILogBucket[], + protos.google.logging.v2.IListBucketsRequest | null, + protos.google.logging.v2.IListBucketsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listBuckets(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent * Required. The parent resource whose buckets are to be listed: * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" @@ -2953,14 +3722,14 @@ export class ConfigServiceV2Client { * supplying the character `-` in place of [LOCATION_ID] will return all * buckets. * @param {string} [request.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. + * 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 {number} [request.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. + * 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 {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3013,14 +3782,14 @@ export class ConfigServiceV2Client { * supplying the character `-` in place of [LOCATION_ID] will return all * buckets. * @param {string} [request.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. + * 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 {number} [request.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. + * 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 {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -3065,10 +3834,10 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.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. + * 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 {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * @@ -3163,10 +3932,10 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.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. + * 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 {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * @@ -3217,10 +3986,10 @@ export class ConfigServiceV2Client { * * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" * @param {string} [request.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. + * 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 {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * @@ -3337,9 +4106,217 @@ export class ConfigServiceV2Client { > ): Promise< [ - protos.google.logging.v2.ILogSink[], - protos.google.logging.v2.IListSinksRequest | null, - protos.google.logging.v2.IListSinksResponse + protos.google.logging.v2.ILogSink[], + protos.google.logging.v2.IListSinksRequest | null, + protos.google.logging.v2.IListSinksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listSinks(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.logging.v2.LogSink | LogSink} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listSinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listSinksStream( + request?: protos.google.logging.v2.IListSinksRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSinks.createStream( + this.innerApiCalls.listSinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listSinks`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @param {string} [request.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 {number} [request.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 {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.logging.v2.LogSink | LogSink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v2/config_service_v2.list_sinks.js + * region_tag:logging_v2_generated_ConfigServiceV2_ListSinks_async + */ + listSinksAsync( + request?: protos.google.logging.v2.IListSinksRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSinks.asyncIterate( + this.innerApiCalls['listSinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists links. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource whose links are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ + * @param {string} [request.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. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return from this request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.logging.v2.Link | Link}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLinks( + request?: protos.google.logging.v2.IListLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.logging.v2.ILink[], + protos.google.logging.v2.IListLinksRequest | null, + protos.google.logging.v2.IListLinksResponse + ] + >; + listLinks( + request: protos.google.logging.v2.IListLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.logging.v2.IListLinksRequest, + protos.google.logging.v2.IListLinksResponse | null | undefined, + protos.google.logging.v2.ILink + > + ): void; + listLinks( + request: protos.google.logging.v2.IListLinksRequest, + callback: PaginationCallback< + protos.google.logging.v2.IListLinksRequest, + protos.google.logging.v2.IListLinksResponse | null | undefined, + protos.google.logging.v2.ILink + > + ): void; + listLinks( + request?: protos.google.logging.v2.IListLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.logging.v2.IListLinksRequest, + protos.google.logging.v2.IListLinksResponse | null | undefined, + protos.google.logging.v2.ILink + >, + callback?: PaginationCallback< + protos.google.logging.v2.IListLinksRequest, + protos.google.logging.v2.IListLinksResponse | null | undefined, + protos.google.logging.v2.ILink + > + ): Promise< + [ + protos.google.logging.v2.ILink[], + protos.google.logging.v2.IListLinksRequest | null, + protos.google.logging.v2.IListLinksResponse ] > | void { request = request || {}; @@ -3358,7 +4335,7 @@ export class ConfigServiceV2Client { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listSinks(request, options, callback); + return this.innerApiCalls.listLinks(request, options, callback); } /** @@ -3366,35 +4343,32 @@ export class ConfigServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource whose sinks are to be listed: + * Required. The parent resource whose links are to be listed: * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ * @param {string} [request.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. + * `nextPageToken` from the previous response. * @param {number} [request.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 {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.logging.v2.LogSink | LogSink} on 'data' event. + * An object stream which emits an object representing {@link google.logging.v2.Link | Link} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listSinksAsync()` + * We recommend using `listLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listSinksStream( - request?: protos.google.logging.v2.IListSinksRequest, + listLinksStream( + request?: protos.google.logging.v2.IListLinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3405,55 +4379,52 @@ export class ConfigServiceV2Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listSinks']; + const defaultCallSettings = this._defaults['listLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSinks.createStream( - this.innerApiCalls.listSinks as GaxCall, + return this.descriptors.page.listLinks.createStream( + this.innerApiCalls.listLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listSinks`, but returns an iterable object. + * Equivalent to `listLinks`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource whose sinks are to be listed: + * Required. The parent resource whose links are to be listed: * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ * @param {string} [request.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. + * `nextPageToken` from the previous response. * @param {number} [request.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 {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.logging.v2.LogSink | LogSink}. The API will be called under the hood as needed, once per the page, + * {@link google.logging.v2.Link | Link}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v2/config_service_v2.list_sinks.js - * region_tag:logging_v2_generated_ConfigServiceV2_ListSinks_async + * @example include:samples/generated/v2/config_service_v2.list_links.js + * region_tag:logging_v2_generated_ConfigServiceV2_ListLinks_async */ - listSinksAsync( - request?: protos.google.logging.v2.IListSinksRequest, + listLinksAsync( + request?: protos.google.logging.v2.IListLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3462,14 +4433,14 @@ export class ConfigServiceV2Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listSinks']; + const defaultCallSettings = this._defaults['listLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSinks.asyncIterate( - this.innerApiCalls['listSinks'] as GaxCall, + return this.descriptors.page.listLinks.asyncIterate( + this.innerApiCalls['listLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** * Lists all the exclusions on the _Default sink in a parent resource. @@ -3682,6 +4653,181 @@ export class ConfigServiceV2Client { callSettings ) as AsyncIterable; } + /** + * 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. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -3822,6 +4968,91 @@ export class ConfigServiceV2Client { ).bucket; } + /** + * Return a fully-qualified billingAccountLocationBucketLink resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + billingAccountLocationBucketLinkPath( + billingAccount: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render( + { + billing_account: billingAccount, + location: location, + bucket: bucket, + link: link, + } + ); + } + + /** + * Parse the billing_account from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified billingAccountLocationBucketView resource name string. * @@ -4136,6 +5367,89 @@ export class ConfigServiceV2Client { ).bucket; } + /** + * Return a fully-qualified folderLocationBucketLink resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + folderLocationBucketLinkPath( + folder: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, + link: link, + }); + } + + /** + * Parse the folder from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).folder; + } + + /** + * Parse the location from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified folderLocationBucketView resource name string. * @@ -4526,6 +5840,91 @@ export class ConfigServiceV2Client { ).bucket; } + /** + * Return a fully-qualified organizationLocationBucketLink resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + organizationLocationBucketLinkPath( + organization: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.render( + { + organization: organization, + location: location, + bucket: bucket, + link: link, + } + ); + } + + /** + * Parse the organization from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified organizationLocationBucketView resource name string. * @@ -4863,6 +6262,89 @@ export class ConfigServiceV2Client { ).bucket; } + /** + * Return a fully-qualified projectLocationBucketLink resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + projectLocationBucketLinkPath( + project: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.render({ + project: project, + location: location, + bucket: bucket, + link: link, + }); + } + + /** + * Parse the project from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).project; + } + + /** + * Parse the location from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified projectLocationBucketView resource name string. * diff --git a/handwritten/logging/src/v2/config_service_v2_client_config.json b/handwritten/logging/src/v2/config_service_v2_client_config.json index 5ae5608c2c4..0e890aa4f2d 100644 --- a/handwritten/logging/src/v2/config_service_v2_client_config.json +++ b/handwritten/logging/src/v2/config_service_v2_client_config.json @@ -33,6 +33,14 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "CreateBucketAsync": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateBucketAsync": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "CreateBucket": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" @@ -94,6 +102,22 @@ "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, + "CreateLink": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteLink": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListLinks": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetLink": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ListExclusions": { "timeout_millis": 60000, "retry_codes_name": "deadline_exceeded_internal_unavailable", diff --git a/handwritten/logging/src/v2/gapic_metadata.json b/handwritten/logging/src/v2/gapic_metadata.json index 6a98ee8be70..047d5888e62 100644 --- a/handwritten/logging/src/v2/gapic_metadata.json +++ b/handwritten/logging/src/v2/gapic_metadata.json @@ -75,6 +75,11 @@ "deleteSink" ] }, + "GetLink": { + "methods": [ + "getLink" + ] + }, "GetExclusion": { "methods": [ "getExclusion" @@ -115,6 +120,26 @@ "updateSettings" ] }, + "CreateBucketAsync": { + "methods": [ + "createBucketAsync" + ] + }, + "UpdateBucketAsync": { + "methods": [ + "updateBucketAsync" + ] + }, + "CreateLink": { + "methods": [ + "createLink" + ] + }, + "DeleteLink": { + "methods": [ + "deleteLink" + ] + }, "CopyLogEntries": { "methods": [ "copyLogEntries" @@ -141,6 +166,13 @@ "listSinksAsync" ] }, + "ListLinks": { + "methods": [ + "listLinks", + "listLinksStream", + "listLinksAsync" + ] + }, "ListExclusions": { "methods": [ "listExclusions", @@ -218,6 +250,11 @@ "deleteSink" ] }, + "GetLink": { + "methods": [ + "getLink" + ] + }, "GetExclusion": { "methods": [ "getExclusion" @@ -258,6 +295,26 @@ "updateSettings" ] }, + "CreateBucketAsync": { + "methods": [ + "createBucketAsync" + ] + }, + "UpdateBucketAsync": { + "methods": [ + "updateBucketAsync" + ] + }, + "CreateLink": { + "methods": [ + "createLink" + ] + }, + "DeleteLink": { + "methods": [ + "deleteLink" + ] + }, "CopyLogEntries": { "methods": [ "copyLogEntries" @@ -284,6 +341,13 @@ "listSinksAsync" ] }, + "ListLinks": { + "methods": [ + "listLinks", + "listLinksStream", + "listLinksAsync" + ] + }, "ListExclusions": { "methods": [ "listExclusions", diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index c6e6e667cf8..8d7bea13d4d 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -188,6 +188,10 @@ export class LoggingServiceV2Client { new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' ), + billingAccountLocationBucketLinkPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}' + ), billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' @@ -210,6 +214,9 @@ export class LoggingServiceV2Client { folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}' ), + folderLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}' + ), folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' ), @@ -234,6 +241,10 @@ export class LoggingServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), + organizationLocationBucketLinkPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}' + ), organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' @@ -259,6 +270,9 @@ export class LoggingServiceV2Client { projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}' ), + projectLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}' + ), projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' ), @@ -647,11 +661,13 @@ export class LoggingServiceV2Client { * `entries.write`, you should try to include several log entries in this * list, rather than calling this method for each individual log entry. * @param {boolean} [request.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, then the response status is the error associated - * with one of the failed entries and the response includes error details - * keyed by the entries' zero-based index in the `entries.write` method. + * Optional. Whether a batch's valid entries should be written even if some + * other entry failed due to a permanent error such as INVALID_ARGUMENT or + * PERMISSION_DENIED. If any entry failed, then the response status is the + * response status of one of the failed entries. The response will include + * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + * the entries' zero-based index in the `entries`. Failed requests for which + * no entries are written will not include per-entry errors. * @param {boolean} [request.dryRun] * Optional. If true, the request should expect normal response, but the * entries won't be persisted nor exported. Useful for checking whether the @@ -775,14 +791,13 @@ export class LoggingServiceV2Client { * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). - * Only log entries that match the filter are returned. An empty filter - * matches all log entries in the resources listed in `resource_names`. + * Optional. 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. + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. * @param {string} [request.orderBy] * Optional. How the results should be sorted. Presently, the only permitted * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -791,10 +806,10 @@ export class LoggingServiceV2Client { * in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] - * Optional. The maximum number of results to return from this request. Default is 50. - * If the value is negative or exceeds 1000, the request is rejected. The - * presence of `next_page_token` in the response indicates that more results - * might be available. + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, the request is + * rejected. The presence of `next_page_token` in the response indicates that + * more results might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `page_token` must be the value of @@ -897,14 +912,13 @@ export class LoggingServiceV2Client { * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). - * Only log entries that match the filter are returned. An empty filter - * matches all log entries in the resources listed in `resource_names`. + * Optional. 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. + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. * @param {string} [request.orderBy] * Optional. How the results should be sorted. Presently, the only permitted * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -913,10 +927,10 @@ export class LoggingServiceV2Client { * in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] - * Optional. The maximum number of results to return from this request. Default is 50. - * If the value is negative or exceeds 1000, the request is rejected. The - * presence of `next_page_token` in the response indicates that more results - * might be available. + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, the request is + * rejected. The presence of `next_page_token` in the response indicates that + * more results might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `page_token` must be the value of @@ -975,14 +989,13 @@ export class LoggingServiceV2Client { * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. * @param {string} [request.filter] - * Optional. A filter that chooses which log entries to return. See [Advanced - * Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). - * Only log entries that match the filter are returned. An empty filter - * matches all log entries in the resources listed in `resource_names`. + * Optional. 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. + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. * @param {string} [request.orderBy] * Optional. How the results should be sorted. Presently, the only permitted * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -991,10 +1004,10 @@ export class LoggingServiceV2Client { * in order of decreasing timestamps (newest first). Entries with equal * timestamps are returned in order of their `insert_id` values. * @param {number} [request.pageSize] - * Optional. The maximum number of results to return from this request. Default is 50. - * If the value is negative or exceeds 1000, the request is rejected. The - * presence of `next_page_token` in the response indicates that more results - * might be available. + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, the request is + * rejected. The presence of `next_page_token` in the response indicates that + * more results might be available. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `page_token` must be the value of @@ -1229,23 +1242,14 @@ export class LoggingServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name that owns the logs: + * Required. The resource name to list logs for: * * * `projects/[PROJECT_ID]` * * `organizations/[ORGANIZATION_ID]` * * `billingAccounts/[BILLING_ACCOUNT_ID]` * * `folders/[FOLDER_ID]` - * @param {number} [request.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} [request.pageToken] - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. * @param {string[]} [request.resourceNames] - * Optional. The resource name that owns the logs: + * Optional. List of resource names to list logs for: * * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` @@ -1258,6 +1262,17 @@ export class LoggingServiceV2Client { * * `organizations/[ORGANIZATION_ID]` * * `billingAccounts/[BILLING_ACCOUNT_ID]` * * `folders/[FOLDER_ID]` + * + * The resource name in the `parent` field is added to this list. + * @param {number} [request.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} [request.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] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1343,23 +1358,14 @@ export class LoggingServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name that owns the logs: + * Required. The resource name to list logs for: * * * `projects/[PROJECT_ID]` * * `organizations/[ORGANIZATION_ID]` * * `billingAccounts/[BILLING_ACCOUNT_ID]` * * `folders/[FOLDER_ID]` - * @param {number} [request.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} [request.pageToken] - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. * @param {string[]} [request.resourceNames] - * Optional. The resource name that owns the logs: + * Optional. List of resource names to list logs for: * * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` @@ -1372,6 +1378,17 @@ export class LoggingServiceV2Client { * * `organizations/[ORGANIZATION_ID]` * * `billingAccounts/[BILLING_ACCOUNT_ID]` * * `folders/[FOLDER_ID]` + * + * The resource name in the `parent` field is added to this list. + * @param {number} [request.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} [request.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] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1413,23 +1430,14 @@ export class LoggingServiceV2Client { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name that owns the logs: + * Required. The resource name to list logs for: * * * `projects/[PROJECT_ID]` * * `organizations/[ORGANIZATION_ID]` * * `billingAccounts/[BILLING_ACCOUNT_ID]` * * `folders/[FOLDER_ID]` - * @param {number} [request.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} [request.pageToken] - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. * @param {string[]} [request.resourceNames] - * Optional. The resource name that owns the logs: + * Optional. List of resource names to list logs for: * * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` @@ -1442,6 +1450,17 @@ export class LoggingServiceV2Client { * * `organizations/[ORGANIZATION_ID]` * * `billingAccounts/[BILLING_ACCOUNT_ID]` * * `folders/[FOLDER_ID]` + * + * The resource name in the `parent` field is added to this list. + * @param {number} [request.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} [request.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] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1616,6 +1635,91 @@ export class LoggingServiceV2Client { ).bucket; } + /** + * Return a fully-qualified billingAccountLocationBucketLink resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + billingAccountLocationBucketLinkPath( + billingAccount: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render( + { + billing_account: billingAccount, + location: location, + bucket: bucket, + link: link, + } + ); + } + + /** + * Parse the billing_account from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified billingAccountLocationBucketView resource name string. * @@ -1930,6 +2034,89 @@ export class LoggingServiceV2Client { ).bucket; } + /** + * Return a fully-qualified folderLocationBucketLink resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + folderLocationBucketLinkPath( + folder: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, + link: link, + }); + } + + /** + * Parse the folder from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).folder; + } + + /** + * Parse the location from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified folderLocationBucketView resource name string. * @@ -2284,6 +2471,91 @@ export class LoggingServiceV2Client { ).bucket; } + /** + * Return a fully-qualified organizationLocationBucketLink resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + organizationLocationBucketLinkPath( + organization: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.render( + { + organization: organization, + location: location, + bucket: bucket, + link: link, + } + ); + } + + /** + * Parse the organization from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified organizationLocationBucketView resource name string. * @@ -2621,6 +2893,89 @@ export class LoggingServiceV2Client { ).bucket; } + /** + * Return a fully-qualified projectLocationBucketLink resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + projectLocationBucketLinkPath( + project: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.render({ + project: project, + location: location, + bucket: bucket, + link: link, + }); + } + + /** + * Parse the project from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).project; + } + + /** + * Parse the location from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified projectLocationBucketView resource name string. * diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index d3f752f815b..4f0f386920c 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -188,6 +188,10 @@ export class MetricsServiceV2Client { new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' ), + billingAccountLocationBucketLinkPathTemplate: + new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}' + ), billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' @@ -210,6 +214,9 @@ export class MetricsServiceV2Client { folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}' ), + folderLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}' + ), folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' ), @@ -234,6 +241,10 @@ export class MetricsServiceV2Client { organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}' ), + organizationLocationBucketLinkPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}' + ), organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' @@ -259,6 +270,9 @@ export class MetricsServiceV2Client { projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}' ), + projectLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}' + ), projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' ), @@ -1122,6 +1136,91 @@ export class MetricsServiceV2Client { ).bucket; } + /** + * Return a fully-qualified billingAccountLocationBucketLink resource name string. + * + * @param {string} billing_account + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + billingAccountLocationBucketLinkPath( + billingAccount: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render( + { + billing_account: billingAccount, + location: location, + bucket: bucket, + link: link, + } + ); + } + + /** + * Parse the billing_account from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).billing_account; + } + + /** + * Parse the location from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from BillingAccountLocationBucketLink resource. + * + * @param {string} billingAccountLocationBucketLinkName + * A fully-qualified path representing billing_account_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromBillingAccountLocationBucketLinkName( + billingAccountLocationBucketLinkName: string + ) { + return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( + billingAccountLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified billingAccountLocationBucketView resource name string. * @@ -1436,6 +1535,89 @@ export class MetricsServiceV2Client { ).bucket; } + /** + * Return a fully-qualified folderLocationBucketLink resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + folderLocationBucketLinkPath( + folder: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.render({ + folder: folder, + location: location, + bucket: bucket, + link: link, + }); + } + + /** + * Parse the folder from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).folder; + } + + /** + * Parse the location from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from FolderLocationBucketLink resource. + * + * @param {string} folderLocationBucketLinkName + * A fully-qualified path representing folder_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromFolderLocationBucketLinkName( + folderLocationBucketLinkName: string + ) { + return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( + folderLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified folderLocationBucketView resource name string. * @@ -1790,6 +1972,91 @@ export class MetricsServiceV2Client { ).bucket; } + /** + * Return a fully-qualified organizationLocationBucketLink resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + organizationLocationBucketLinkPath( + organization: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.render( + { + organization: organization, + location: location, + bucket: bucket, + link: link, + } + ); + } + + /** + * Parse the organization from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).organization; + } + + /** + * Parse the location from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from OrganizationLocationBucketLink resource. + * + * @param {string} organizationLocationBucketLinkName + * A fully-qualified path representing organization_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromOrganizationLocationBucketLinkName( + organizationLocationBucketLinkName: string + ) { + return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( + organizationLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified organizationLocationBucketView resource name string. * @@ -2127,6 +2394,89 @@ export class MetricsServiceV2Client { ).bucket; } + /** + * Return a fully-qualified projectLocationBucketLink resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} bucket + * @param {string} link + * @returns {string} Resource name string. + */ + projectLocationBucketLinkPath( + project: string, + location: string, + bucket: string, + link: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.render({ + project: project, + location: location, + bucket: bucket, + link: link, + }); + } + + /** + * Parse the project from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).project; + } + + /** + * Parse the location from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).location; + } + + /** + * Parse the bucket from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the bucket. + */ + matchBucketFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).bucket; + } + + /** + * Parse the link from ProjectLocationBucketLink resource. + * + * @param {string} projectLocationBucketLinkName + * A fully-qualified path representing project_location_bucket_link resource. + * @returns {string} A string representing the link. + */ + matchLinkFromProjectLocationBucketLinkName( + projectLocationBucketLinkName: string + ) { + return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( + projectLocationBucketLinkName + ).link; + } + /** * Return a fully-qualified projectLocationBucketView resource name string. * diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 732afae574c..82a0b47ebc1 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -1940,6 +1940,133 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('getLink', () => { + it('invokes getLink without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.Link() + ); + client.innerApiCalls.getLink = stubSimpleCall(expectedResponse); + const [response] = await client.getLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getLink as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.logging.v2.Link() + ); + client.innerApiCalls.getLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLink( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getLink as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLink with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getLink = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLink(request), expectedError); + const actualRequest = (client.innerApiCalls.getLink as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLink with closed client', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.GetLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.GetLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getLink(request), expectedError); + }); + }); + describe('getExclusion', () => { it('invokes getExclusion without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ @@ -2981,48 +3108,68 @@ describe('v2.ConfigServiceV2Client', () => { }); }); - describe('copyLogEntries', () => { - it('invokes copyLogEntries without error', async () => { + describe('createBucketAsync', () => { + it('invokes createBucketAsync without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CopyLogEntriesRequest() + new protos.google.logging.v2.CreateBucketRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateBucketRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.copyLogEntries = + client.innerApiCalls.createBucketAsync = stubLongRunningCall(expectedResponse); - const [operation] = await client.copyLogEntries(request); + const [operation] = await client.createBucketAsync(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBucketAsync as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBucketAsync as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes copyLogEntries without error using callback', async () => { + it('invokes createBucketAsync without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CopyLogEntriesRequest() + new protos.google.logging.v2.CreateBucketRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateBucketRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.copyLogEntries = + client.innerApiCalls.createBucketAsync = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.copyLogEntries( + client.createBucketAsync( request, ( err?: Error | null, result?: LROperation< - protos.google.logging.v2.ICopyLogEntriesResponse, - protos.google.logging.v2.ICopyLogEntriesMetadata + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata > | null ) => { if (err) { @@ -3034,50 +3181,86 @@ describe('v2.ConfigServiceV2Client', () => { ); }); const operation = (await promise) as LROperation< - protos.google.logging.v2.ICopyLogEntriesResponse, - protos.google.logging.v2.ICopyLogEntriesMetadata + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBucketAsync as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBucketAsync as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes copyLogEntries with call error', async () => { + it('invokes createBucketAsync with call error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CopyLogEntriesRequest() + new protos.google.logging.v2.CreateBucketRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateBucketRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.copyLogEntries = stubLongRunningCall( + client.innerApiCalls.createBucketAsync = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.copyLogEntries(request), expectedError); + await assert.rejects(client.createBucketAsync(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createBucketAsync as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBucketAsync as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes copyLogEntries with LRO error', async () => { + it('invokes createBucketAsync with LRO error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CopyLogEntriesRequest() + new protos.google.logging.v2.CreateBucketRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateBucketRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.copyLogEntries = stubLongRunningCall( + client.innerApiCalls.createBucketAsync = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.copyLogEntries(request); + const [operation] = await client.createBucketAsync(request); await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBucketAsync as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBucketAsync as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCopyLogEntriesProgress without error', async () => { + it('invokes checkCreateBucketAsyncProgress without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3091,7 +3274,7 @@ describe('v2.ConfigServiceV2Client', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCopyLogEntriesProgress( + const decodedOperation = await client.checkCreateBucketAsyncProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3099,7 +3282,7 @@ describe('v2.ConfigServiceV2Client', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCopyLogEntriesProgress with error', async () => { + it('invokes checkCreateBucketAsyncProgress with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3112,75 +3295,76 @@ describe('v2.ConfigServiceV2Client', () => { expectedError ); await assert.rejects( - client.checkCopyLogEntriesProgress(''), + client.checkCreateBucketAsyncProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('listBuckets', () => { - it('invokes listBuckets without error', async () => { + describe('updateBucketAsync', () => { + it('invokes updateBucketAsync without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.UpdateBucketRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListBucketsRequest', - ['parent'] + '.google.logging.v2.UpdateBucketRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - ]; - client.innerApiCalls.listBuckets = stubSimpleCall(expectedResponse); - const [response] = await client.listBuckets(request); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBucketAsync = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBucketAsync(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listBuckets as SinonStub + client.innerApiCalls.updateBucketAsync as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBuckets as SinonStub + client.innerApiCalls.updateBucketAsync as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBuckets without error using callback', async () => { + it('invokes updateBucketAsync without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.UpdateBucketRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListBucketsRequest', - ['parent'] + '.google.logging.v2.UpdateBucketRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - ]; - client.innerApiCalls.listBuckets = - stubSimpleCallWithCallback(expectedResponse); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBucketAsync = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listBuckets( + client.updateBucketAsync( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogBucket[] | null + result?: LROperation< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata + > | null ) => { if (err) { reject(err); @@ -3190,75 +3374,1376 @@ describe('v2.ConfigServiceV2Client', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.logging.v2.ILogBucket, + protos.google.logging.v2.IBucketMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listBuckets as SinonStub + client.innerApiCalls.updateBucketAsync as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBuckets as SinonStub + client.innerApiCalls.updateBucketAsync as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBuckets with error', async () => { + it('invokes updateBucketAsync with call error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.UpdateBucketRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListBucketsRequest', - ['parent'] + '.google.logging.v2.UpdateBucketRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listBuckets = stubSimpleCall( + client.innerApiCalls.updateBucketAsync = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.listBuckets(request), expectedError); + await assert.rejects(client.updateBucketAsync(request), expectedError); const actualRequest = ( - client.innerApiCalls.listBuckets as SinonStub + client.innerApiCalls.updateBucketAsync as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBuckets as SinonStub + client.innerApiCalls.updateBucketAsync as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBucketsStream without error', async () => { + it('invokes updateBucketAsync with LRO error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.UpdateBucketRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListBucketsRequest', - ['parent'] + '.google.logging.v2.UpdateBucketRequest', + ['name'] ); - request.parent = defaultValue1; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBucketAsync = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateBucketAsync(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBucketAsync as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBucketAsync as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBucketAsyncProgress without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateBucketAsyncProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBucketAsyncProgress with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateBucketAsyncProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createLink', () => { + it('invokes createLink without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLink = stubLongRunningCall(expectedResponse); + const [operation] = await client.createLink(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLink = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createLink( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.logging.v2.ILink, + protos.google.logging.v2.ILinkMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.logging.v2.ILink, + protos.google.logging.v2.ILinkMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLink with call error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLink = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLink with LRO error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CreateLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.CreateLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLink = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createLink(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateLinkProgress without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateLinkProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateLinkProgress with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateLinkProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteLink', () => { + it('invokes deleteLink without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLink = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteLink(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLink without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLink = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteLink( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.ILinkMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.logging.v2.ILinkMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLink with call error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLink = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLink with LRO error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.DeleteLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.DeleteLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLink = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteLink(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteLinkProgress without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteLinkProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteLinkProgress with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteLinkProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('copyLogEntries', () => { + it('invokes copyLogEntries without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CopyLogEntriesRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.copyLogEntries = + stubLongRunningCall(expectedResponse); + const [operation] = await client.copyLogEntries(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes copyLogEntries without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CopyLogEntriesRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.copyLogEntries = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.copyLogEntries( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.logging.v2.ICopyLogEntriesResponse, + protos.google.logging.v2.ICopyLogEntriesMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes copyLogEntries with call error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CopyLogEntriesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.copyLogEntries = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.copyLogEntries(request), expectedError); + }); + + it('invokes copyLogEntries with LRO error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.CopyLogEntriesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.copyLogEntries = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.copyLogEntries(request); + await assert.rejects(operation.promise(), expectedError); + }); + + it('invokes checkCopyLogEntriesProgress without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCopyLogEntriesProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCopyLogEntriesProgress with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCopyLogEntriesProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listBuckets', () => { + it('invokes listBuckets without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.innerApiCalls.listBuckets = stubSimpleCall(expectedResponse); + const [response] = await client.listBuckets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBuckets without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.innerApiCalls.listBuckets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBuckets( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogBucket[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBuckets with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBuckets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listBuckets(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuckets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBucketsStream without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.descriptors.page.listBuckets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBucketsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogBucket[] = []; + stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuckets, request) + ); + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBucketsStream with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listBucketsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogBucket[] = []; + stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuckets, request) + ); + assert( + (client.descriptors.page.listBuckets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBuckets without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogBucket()), + ]; + client.descriptors.page.listBuckets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.logging.v2.ILogBucket[] = []; + const iterable = client.listBucketsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBuckets with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListBucketsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListBucketsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listBucketsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.logging.v2.ILogBucket[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listBuckets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listViews', () => { + it('invokes listViews without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + ]; + client.innerApiCalls.listViews = stubSimpleCall(expectedResponse); + const [response] = await client.listViews(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViews without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + ]; + client.innerApiCalls.listViews = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listViews( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogView[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViews with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listViews = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listViews(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViewsStream without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + ]; + client.descriptors.page.listViews.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogView[] = []; + stream.on('data', (response: protos.google.logging.v2.LogView) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listViews, request) + ); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listViewsStream with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listViews.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.logging.v2.LogView[] = []; + stream.on('data', (response: protos.google.logging.v2.LogView) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listViews, request) + ); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listViews without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.LogView()), + ]; + client.descriptors.page.listViews.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.logging.v2.ILogView[] = []; + const iterable = client.listViewsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert( + (client.descriptors.page.listViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listViews with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listViewsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.logging.v2.ILogView[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert( + (client.descriptors.page.listViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listSinks', () => { + it('invokes listSinks without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + ]; + client.innerApiCalls.listSinks = stubSimpleCall(expectedResponse); + const [response] = await client.listSinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSinks without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), ]; - client.descriptors.page.listBuckets.createStream = + client.innerApiCalls.listSinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSinks( + request, + ( + err?: Error | null, + result?: protos.google.logging.v2.ILogSink[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSinks with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSinks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSinksStream without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.logging.v2.ListSinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.logging.v2.ListSinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + ]; + client.descriptors.page.listSinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBucketsStream(request); + const stream = client.listSinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogBucket[] = []; - stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + const responses: protos.google.logging.v2.LogSink[] = []; + stream.on('data', (response: protos.google.logging.v2.LogSink) => { responses.push(response); }); stream.on('end', () => { @@ -3271,12 +4756,12 @@ describe('v2.ConfigServiceV2Client', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listBuckets.createStream as SinonStub) + (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuckets, request) + .calledWith(client.innerApiCalls.listSinks, request) ); assert( - (client.descriptors.page.listBuckets.createStream as SinonStub) + (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3284,30 +4769,30 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('invokes listBucketsStream with error', async () => { + it('invokes listSinksStream with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListSinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListBucketsRequest', + '.google.logging.v2.ListSinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( + client.descriptors.page.listSinks.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listBucketsStream(request); + const stream = client.listSinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogBucket[] = []; - stream.on('data', (response: protos.google.logging.v2.LogBucket) => { + const responses: protos.google.logging.v2.LogSink[] = []; + stream.on('data', (response: protos.google.logging.v2.LogSink) => { responses.push(response); }); stream.on('end', () => { @@ -3319,12 +4804,12 @@ describe('v2.ConfigServiceV2Client', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listBuckets.createStream as SinonStub) + (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuckets, request) + .calledWith(client.innerApiCalls.listSinks, request) ); assert( - (client.descriptors.page.listBuckets.createStream as SinonStub) + (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3332,42 +4817,41 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('uses async iteration with listBuckets without error', async () => { + it('uses async iteration with listSinks without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListSinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListBucketsRequest', + '.google.logging.v2.ListSinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), - generateSampleMessage(new protos.google.logging.v2.LogBucket()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogSink()), ]; - client.descriptors.page.listBuckets.asyncIterate = + client.descriptors.page.listSinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.logging.v2.ILogBucket[] = []; - const iterable = client.listBucketsAsync(request); + const responses: protos.google.logging.v2.ILogSink[] = []; + const iterable = client.listSinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub) + (client.descriptors.page.listSinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3375,41 +4859,40 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('uses async iteration with listBuckets with error', async () => { + it('uses async iteration with listSinks with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListSinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListBucketsRequest', + '.google.logging.v2.ListSinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listSinks.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const iterable = client.listBucketsAsync(request); + const iterable = client.listSinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.logging.v2.ILogBucket[] = []; + const responses: protos.google.logging.v2.ILogSink[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert( - (client.descriptors.page.listBuckets.asyncIterate as SinonStub) + (client.descriptors.page.listSinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3418,68 +4901,68 @@ describe('v2.ConfigServiceV2Client', () => { }); }); - describe('listViews', () => { - it('invokes listViews without error', async () => { + describe('listLinks', () => { + it('invokes listLinks without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListViewsRequest', + '.google.logging.v2.ListLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogView()), - generateSampleMessage(new protos.google.logging.v2.LogView()), - generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.Link()), + generateSampleMessage(new protos.google.logging.v2.Link()), + generateSampleMessage(new protos.google.logging.v2.Link()), ]; - client.innerApiCalls.listViews = stubSimpleCall(expectedResponse); - const [response] = await client.listViews(request); + client.innerApiCalls.listLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listLinks(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listViews as SinonStub + client.innerApiCalls.listLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listViews as SinonStub + client.innerApiCalls.listLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listViews without error using callback', async () => { + it('invokes listLinks without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListViewsRequest', + '.google.logging.v2.ListLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogView()), - generateSampleMessage(new protos.google.logging.v2.LogView()), - generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.Link()), + generateSampleMessage(new protos.google.logging.v2.Link()), + generateSampleMessage(new protos.google.logging.v2.Link()), ]; - client.innerApiCalls.listViews = + client.innerApiCalls.listLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listViews( + client.listLinks( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogView[] | null + result?: protos.google.logging.v2.ILink[] | null ) => { if (err) { reject(err); @@ -3492,69 +4975,69 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listViews as SinonStub + client.innerApiCalls.listLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listViews as SinonStub + client.innerApiCalls.listLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listViews with error', async () => { + it('invokes listLinks with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListViewsRequest', + '.google.logging.v2.ListLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listViews = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listViews(request), expectedError); + client.innerApiCalls.listLinks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listLinks(request), expectedError); const actualRequest = ( - client.innerApiCalls.listViews as SinonStub + client.innerApiCalls.listLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listViews as SinonStub + client.innerApiCalls.listLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listViewsStream without error', async () => { + it('invokes listLinksStream without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListViewsRequest', + '.google.logging.v2.ListLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogView()), - generateSampleMessage(new protos.google.logging.v2.LogView()), - generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.Link()), + generateSampleMessage(new protos.google.logging.v2.Link()), + generateSampleMessage(new protos.google.logging.v2.Link()), ]; - client.descriptors.page.listViews.createStream = + client.descriptors.page.listLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listViewsStream(request); + const stream = client.listLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogView[] = []; - stream.on('data', (response: protos.google.logging.v2.LogView) => { + const responses: protos.google.logging.v2.Link[] = []; + stream.on('data', (response: protos.google.logging.v2.Link) => { responses.push(response); }); stream.on('end', () => { @@ -3567,12 +5050,12 @@ describe('v2.ConfigServiceV2Client', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listViews.createStream as SinonStub) + (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listViews, request) + .calledWith(client.innerApiCalls.listLinks, request) ); assert( - (client.descriptors.page.listViews.createStream as SinonStub) + (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3580,30 +5063,30 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('invokes listViewsStream with error', async () => { + it('invokes listLinksStream with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListViewsRequest', + '.google.logging.v2.ListLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listViews.createStream = stubPageStreamingCall( + client.descriptors.page.listLinks.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listViewsStream(request); + const stream = client.listLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogView[] = []; - stream.on('data', (response: protos.google.logging.v2.LogView) => { + const responses: protos.google.logging.v2.Link[] = []; + stream.on('data', (response: protos.google.logging.v2.Link) => { responses.push(response); }); stream.on('end', () => { @@ -3615,12 +5098,12 @@ describe('v2.ConfigServiceV2Client', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listViews.createStream as SinonStub) + (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listViews, request) + .calledWith(client.innerApiCalls.listLinks, request) ); assert( - (client.descriptors.page.listViews.createStream as SinonStub) + (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3628,41 +5111,41 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('uses async iteration with listViews without error', async () => { + it('uses async iteration with listLinks without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListViewsRequest', + '.google.logging.v2.ListLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogView()), - generateSampleMessage(new protos.google.logging.v2.LogView()), - generateSampleMessage(new protos.google.logging.v2.LogView()), + generateSampleMessage(new protos.google.logging.v2.Link()), + generateSampleMessage(new protos.google.logging.v2.Link()), + generateSampleMessage(new protos.google.logging.v2.Link()), ]; - client.descriptors.page.listViews.asyncIterate = + client.descriptors.page.listLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.logging.v2.ILogView[] = []; - const iterable = client.listViewsAsync(request); + const responses: protos.google.logging.v2.ILink[] = []; + const iterable = client.listLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + (client.descriptors.page.listLinks.asyncIterate as SinonStub).getCall(0) .args[1], request ); assert( - (client.descriptors.page.listViews.asyncIterate as SinonStub) + (client.descriptors.page.listLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3670,40 +5153,40 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('uses async iteration with listViews with error', async () => { + it('uses async iteration with listLinks with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListViewsRequest', + '.google.logging.v2.ListLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listLinks.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const iterable = client.listViewsAsync(request); + const iterable = client.listLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.logging.v2.ILogView[] = []; + const responses: protos.google.logging.v2.ILink[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + (client.descriptors.page.listLinks.asyncIterate as SinonStub).getCall(0) .args[1], request ); assert( - (client.descriptors.page.listViews.asyncIterate as SinonStub) + (client.descriptors.page.listLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3712,68 +5195,68 @@ describe('v2.ConfigServiceV2Client', () => { }); }); - describe('listSinks', () => { - it('invokes listSinks without error', async () => { + describe('listExclusions', () => { + it('invokes listExclusions without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListExclusionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListSinksRequest', + '.google.logging.v2.ListExclusionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogSink()), - generateSampleMessage(new protos.google.logging.v2.LogSink()), - generateSampleMessage(new protos.google.logging.v2.LogSink()), - ]; - client.innerApiCalls.listSinks = stubSimpleCall(expectedResponse); - const [response] = await client.listSinks(request); + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + ]; + client.innerApiCalls.listExclusions = stubSimpleCall(expectedResponse); + const [response] = await client.listExclusions(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listSinks as SinonStub + client.innerApiCalls.listExclusions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSinks as SinonStub + client.innerApiCalls.listExclusions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSinks without error using callback', async () => { + it('invokes listExclusions without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListExclusionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListSinksRequest', + '.google.logging.v2.ListExclusionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogSink()), - generateSampleMessage(new protos.google.logging.v2.LogSink()), - generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), ]; - client.innerApiCalls.listSinks = + client.innerApiCalls.listExclusions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listSinks( + client.listExclusions( request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogSink[] | null + result?: protos.google.logging.v2.ILogExclusion[] | null ) => { if (err) { reject(err); @@ -3786,69 +5269,72 @@ describe('v2.ConfigServiceV2Client', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listSinks as SinonStub + client.innerApiCalls.listExclusions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSinks as SinonStub + client.innerApiCalls.listExclusions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSinks with error', async () => { + it('invokes listExclusions with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListExclusionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListSinksRequest', + '.google.logging.v2.ListExclusionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listSinks = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listSinks(request), expectedError); + client.innerApiCalls.listExclusions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listExclusions(request), expectedError); const actualRequest = ( - client.innerApiCalls.listSinks as SinonStub + client.innerApiCalls.listExclusions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSinks as SinonStub + client.innerApiCalls.listExclusions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSinksStream without error', async () => { + it('invokes listExclusionsStream without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListExclusionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListSinksRequest', + '.google.logging.v2.ListExclusionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogSink()), - generateSampleMessage(new protos.google.logging.v2.LogSink()), - generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), ]; - client.descriptors.page.listSinks.createStream = + client.descriptors.page.listExclusions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listSinksStream(request); + const stream = client.listExclusionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogSink[] = []; - stream.on('data', (response: protos.google.logging.v2.LogSink) => { + const responses: protos.google.logging.v2.LogExclusion[] = []; + stream.on('data', (response: protos.google.logging.v2.LogExclusion) => { responses.push(response); }); stream.on('end', () => { @@ -3861,12 +5347,12 @@ describe('v2.ConfigServiceV2Client', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listSinks.createStream as SinonStub) + (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSinks, request) + .calledWith(client.innerApiCalls.listExclusions, request) ); assert( - (client.descriptors.page.listSinks.createStream as SinonStub) + (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3874,30 +5360,28 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('invokes listSinksStream with error', async () => { + it('invokes listExclusionsStream with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListExclusionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListSinksRequest', + '.google.logging.v2.ListExclusionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSinks.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listSinksStream(request); + client.descriptors.page.listExclusions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listExclusionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogSink[] = []; - stream.on('data', (response: protos.google.logging.v2.LogSink) => { + const responses: protos.google.logging.v2.LogExclusion[] = []; + stream.on('data', (response: protos.google.logging.v2.LogExclusion) => { responses.push(response); }); stream.on('end', () => { @@ -3909,12 +5393,12 @@ describe('v2.ConfigServiceV2Client', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listSinks.createStream as SinonStub) + (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSinks, request) + .calledWith(client.innerApiCalls.listExclusions, request) ); assert( - (client.descriptors.page.listSinks.createStream as SinonStub) + (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3922,41 +5406,42 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('uses async iteration with listSinks without error', async () => { + it('uses async iteration with listExclusions without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListExclusionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListSinksRequest', + '.google.logging.v2.ListExclusionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogSink()), - generateSampleMessage(new protos.google.logging.v2.LogSink()), - generateSampleMessage(new protos.google.logging.v2.LogSink()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage(new protos.google.logging.v2.LogExclusion()), ]; - client.descriptors.page.listSinks.asyncIterate = + client.descriptors.page.listExclusions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.logging.v2.ILogSink[] = []; - const iterable = client.listSinksAsync(request); + const responses: protos.google.logging.v2.ILogExclusion[] = []; + const iterable = client.listExclusionsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) - .args[1], + ( + client.descriptors.page.listExclusions.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listSinks.asyncIterate as SinonStub) + (client.descriptors.page.listExclusions.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3964,40 +5449,39 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('uses async iteration with listSinks with error', async () => { + it('uses async iteration with listExclusions with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListExclusionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListSinksRequest', + '.google.logging.v2.ListExclusionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSinks.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listSinksAsync(request); + client.descriptors.page.listExclusions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listExclusionsAsync(request); await assert.rejects(async () => { - const responses: protos.google.logging.v2.ILogSink[] = []; + const responses: protos.google.logging.v2.ILogExclusion[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) - .args[1], + ( + client.descriptors.page.listExclusions.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listSinks.asyncIterate as SinonStub) + (client.descriptors.page.listExclusions.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4005,69 +5489,49 @@ describe('v2.ConfigServiceV2Client', () => { ); }); }); - - describe('listExclusions', () => { - it('invokes listExclusions without error', async () => { + describe('getOperation', () => { + it('invokes getOperation without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new operationsProtos.google.longrunning.GetOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListExclusionsRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - ]; - client.innerApiCalls.listExclusions = stubSimpleCall(expectedResponse); - const [response] = await client.listExclusions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listExclusions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listExclusions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - - it('invokes listExclusions without error using callback', async () => { + it('invokes getOperation without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new operationsProtos.google.longrunning.GetOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListExclusionsRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - ]; - client.innerApiCalls.listExclusions = - stubSimpleCallWithCallback(expectedResponse); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - client.listExclusions( + client.operationsClient.getOperation( request, + undefined, ( err?: Error | null, - result?: protos.google.logging.v2.ILogExclusion[] | null + result?: operationsProtos.google.longrunning.Operation | null ) => { if (err) { reject(err); @@ -4079,225 +5543,255 @@ describe('v2.ConfigServiceV2Client', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listExclusions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listExclusions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); }); - - it('invokes listExclusions with error', async () => { + it('invokes cancelOperation with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListExclusionsRequest', - ['parent'] + new operationsProtos.google.longrunning.CancelOperationRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listExclusions = stubSimpleCall( + client.operationsClient.cancelOperation = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listExclusions(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listExclusions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listExclusions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); }); - - it('invokes listExclusionsStream without error', async () => { + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListExclusionsRequest', - ['parent'] + new operationsProtos.google.longrunning.DeleteOperationRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - ]; - client.descriptors.page.listExclusions.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listExclusionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogExclusion[] = []; - stream.on('data', (response: protos.google.logging.v2.LogExclusion) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - (client.descriptors.page.listExclusions.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listExclusions, request) + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); assert( - (client.descriptors.page.listExclusions.createStream as SinonStub) + (client.operationsClient.deleteOperation as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .calledWith(request) ); }); - - it('invokes listExclusionsStream with error', async () => { + it('invokes deleteOperation without error using callback', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new operationsProtos.google.longrunning.DeleteOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListExclusionsRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listExclusions.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listExclusionsStream(request); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - const responses: protos.google.logging.v2.LogExclusion[] = []; - stream.on('data', (response: protos.google.logging.v2.LogExclusion) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listExclusions.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listExclusions, request) + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); assert( - (client.descriptors.page.listExclusions.createStream as SinonStub) + (client.operationsClient.deleteOperation as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .calledWith(request) ); }); - - it('uses async iteration with listExclusions without error', async () => { + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListExclusionsRequest', - ['parent'] + new operationsProtos.google.longrunning.ListOperationsRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), - generateSampleMessage(new protos.google.logging.v2.LogExclusion()), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), ]; - client.descriptors.page.listExclusions.asyncIterate = + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.logging.v2.ILogExclusion[] = []; - const iterable = client.listExclusionsAsync(request); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listExclusions.asyncIterate as SinonStub + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub ).getCall(0).args[1], request ); - assert( - (client.descriptors.page.listExclusions.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); }); - - it('uses async iteration with listExclusions with error', async () => { + it('uses async iteration with listOperations with error', async () => { const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.logging.v2.ListExclusionsRequest', - ['parent'] + new operationsProtos.google.longrunning.ListOperationsRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listExclusions.asyncIterate = + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listExclusionsAsync(request); + const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: protos.google.logging.v2.ILogExclusion[] = []; + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listExclusions.asyncIterate as SinonStub + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub ).getCall(0).args[1], request ); - assert( - (client.descriptors.page.listExclusions.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); }); }); @@ -4401,11 +5895,90 @@ describe('v2.ConfigServiceV2Client', () => { it('matchExclusionFromBillingAccountExclusionName', () => { const result = - client.matchExclusionFromBillingAccountExclusionName(fakePath); - assert.strictEqual(result, 'exclusionValue'); + client.matchExclusionFromBillingAccountExclusionName(fakePath); + assert.strictEqual(result, 'exclusionValue'); + assert( + ( + client.pathTemplates.billingAccountExclusionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('billingAccountLocationBucket', () => { + const fakePath = '/rendered/path/billingAccountLocationBucket'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('billingAccountLocationBucketPath', () => { + const result = client.billingAccountLocationBucketPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLocationBucketName', () => { + const result = + client.matchBillingAccountFromBillingAccountLocationBucketName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBillingAccountLocationBucketName', () => { + const result = + client.matchLocationFromBillingAccountLocationBucketName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketName', () => { + const result = + client.matchBucketFromBillingAccountLocationBucketName(fakePath); + assert.strictEqual(result, 'bucketValue'); assert( ( - client.pathTemplates.billingAccountExclusionPathTemplate + client.pathTemplates.billingAccountLocationBucketPathTemplate .match as SinonStub ) .getCall(-1) @@ -4414,33 +5987,35 @@ describe('v2.ConfigServiceV2Client', () => { }); }); - describe('billingAccountLocationBucket', () => { - const fakePath = '/rendered/path/billingAccountLocationBucket'; + describe('billingAccountLocationBucketLink', () => { + const fakePath = '/rendered/path/billingAccountLocationBucketLink'; const expectedParameters = { billing_account: 'billingAccountValue', location: 'locationValue', bucket: 'bucketValue', + link: 'linkValue', }; const client = new configservicev2Module.v2.ConfigServiceV2Client({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - client.pathTemplates.billingAccountLocationBucketPathTemplate.render = + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.billingAccountLocationBucketPathTemplate.match = + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match = sinon.stub().returns(expectedParameters); - it('billingAccountLocationBucketPath', () => { - const result = client.billingAccountLocationBucketPath( + it('billingAccountLocationBucketLinkPath', () => { + const result = client.billingAccountLocationBucketLinkPath( 'billingAccountValue', 'locationValue', - 'bucketValue' + 'bucketValue', + 'linkValue' ); assert.strictEqual(result, fakePath); assert( ( - client.pathTemplates.billingAccountLocationBucketPathTemplate + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate .render as SinonStub ) .getCall(-1) @@ -4448,15 +6023,15 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('matchBillingAccountFromBillingAccountLocationBucketName', () => { + it('matchBillingAccountFromBillingAccountLocationBucketLinkName', () => { const result = - client.matchBillingAccountFromBillingAccountLocationBucketName( + client.matchBillingAccountFromBillingAccountLocationBucketLinkName( fakePath ); assert.strictEqual(result, 'billingAccountValue'); assert( ( - client.pathTemplates.billingAccountLocationBucketPathTemplate + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate .match as SinonStub ) .getCall(-1) @@ -4464,13 +6039,15 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('matchLocationFromBillingAccountLocationBucketName', () => { + it('matchLocationFromBillingAccountLocationBucketLinkName', () => { const result = - client.matchLocationFromBillingAccountLocationBucketName(fakePath); + client.matchLocationFromBillingAccountLocationBucketLinkName( + fakePath + ); assert.strictEqual(result, 'locationValue'); assert( ( - client.pathTemplates.billingAccountLocationBucketPathTemplate + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate .match as SinonStub ) .getCall(-1) @@ -4478,13 +6055,27 @@ describe('v2.ConfigServiceV2Client', () => { ); }); - it('matchBucketFromBillingAccountLocationBucketName', () => { + it('matchBucketFromBillingAccountLocationBucketLinkName', () => { const result = - client.matchBucketFromBillingAccountLocationBucketName(fakePath); + client.matchBucketFromBillingAccountLocationBucketLinkName(fakePath); assert.strictEqual(result, 'bucketValue'); assert( ( - client.pathTemplates.billingAccountLocationBucketPathTemplate + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchLinkFromBillingAccountLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate .match as SinonStub ) .getCall(-1) @@ -4932,6 +6523,101 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('folderLocationBucketLink', () => { + const fakePath = '/rendered/path/folderLocationBucketLink'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketLinkPath', () => { + const result = client.folderLocationBucketLinkPath( + 'folderValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketLinkName', () => { + const result = + client.matchFolderFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketLinkName', () => { + const result = + client.matchLocationFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketLinkName', () => { + const result = + client.matchBucketFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromFolderLocationBucketLinkName', () => { + const result = + client.matchLinkFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderLocationBucketView', () => { const fakePath = '/rendered/path/folderLocationBucketView'; const expectedParameters = { @@ -5448,6 +7134,101 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('organizationLocationBucketLink', () => { + const fakePath = '/rendered/path/organizationLocationBucketLink'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationBucketLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationBucketLinkPath', () => { + const result = client.organizationLocationBucketLinkPath( + 'organizationValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchOrganizationFromOrganizationLocationBucketLinkName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchLocationFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchBucketFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchLinkFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationLocationBucketView', () => { const fakePath = '/rendered/path/organizationLocationBucketView'; const expectedParameters = { @@ -5913,6 +7694,101 @@ describe('v2.ConfigServiceV2Client', () => { }); }); + describe('projectLocationBucketLink', () => { + const fakePath = '/rendered/path/projectLocationBucketLink'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketLinkPath', () => { + const result = client.projectLocationBucketLinkPath( + 'projectValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketLinkName', () => { + const result = + client.matchProjectFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketLinkName', () => { + const result = + client.matchLocationFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketLinkName', () => { + const result = + client.matchBucketFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromProjectLocationBucketLinkName', () => { + const result = + client.matchLinkFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationBucketView', () => { const fakePath = '/rendered/path/projectLocationBucketView'; const expectedParameters = { diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index c1287366a32..48adc6e7ef1 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -1454,6 +1454,103 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('billingAccountLocationBucketLink', () => { + const fakePath = '/rendered/path/billingAccountLocationBucketLink'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('billingAccountLocationBucketLinkPath', () => { + const result = client.billingAccountLocationBucketLinkPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchBillingAccountFromBillingAccountLocationBucketLinkName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchLocationFromBillingAccountLocationBucketLinkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchBucketFromBillingAccountLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchLinkFromBillingAccountLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('billingAccountLocationBucketView', () => { const fakePath = '/rendered/path/billingAccountLocationBucketView'; const expectedParameters = { @@ -1893,6 +1990,101 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('folderLocationBucketLink', () => { + const fakePath = '/rendered/path/folderLocationBucketLink'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketLinkPath', () => { + const result = client.folderLocationBucketLinkPath( + 'folderValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketLinkName', () => { + const result = + client.matchFolderFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketLinkName', () => { + const result = + client.matchLocationFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketLinkName', () => { + const result = + client.matchBucketFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromFolderLocationBucketLinkName', () => { + const result = + client.matchLinkFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderLocationBucketView', () => { const fakePath = '/rendered/path/folderLocationBucketView'; const expectedParameters = { @@ -2360,6 +2552,101 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('organizationLocationBucketLink', () => { + const fakePath = '/rendered/path/organizationLocationBucketLink'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationBucketLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationBucketLinkPath', () => { + const result = client.organizationLocationBucketLinkPath( + 'organizationValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchOrganizationFromOrganizationLocationBucketLinkName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchLocationFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchBucketFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchLinkFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationLocationBucketView', () => { const fakePath = '/rendered/path/organizationLocationBucketView'; const expectedParameters = { @@ -2825,6 +3112,101 @@ describe('v2.LoggingServiceV2Client', () => { }); }); + describe('projectLocationBucketLink', () => { + const fakePath = '/rendered/path/projectLocationBucketLink'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketLinkPath', () => { + const result = client.projectLocationBucketLinkPath( + 'projectValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketLinkName', () => { + const result = + client.matchProjectFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketLinkName', () => { + const result = + client.matchLocationFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketLinkName', () => { + const result = + client.matchBucketFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromProjectLocationBucketLinkName', () => { + const result = + client.matchLinkFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationBucketView', () => { const fakePath = '/rendered/path/projectLocationBucketView'; const expectedParameters = { diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 09c6409400f..d929a68fcde 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -1234,6 +1234,103 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('billingAccountLocationBucketLink', () => { + const fakePath = '/rendered/path/billingAccountLocationBucketLink'; + const expectedParameters = { + billing_account: 'billingAccountValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('billingAccountLocationBucketLinkPath', () => { + const result = client.billingAccountLocationBucketLinkPath( + 'billingAccountValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchBillingAccountFromBillingAccountLocationBucketLinkName( + fakePath + ); + assert.strictEqual(result, 'billingAccountValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchLocationFromBillingAccountLocationBucketLinkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchBucketFromBillingAccountLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromBillingAccountLocationBucketLinkName', () => { + const result = + client.matchLinkFromBillingAccountLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.billingAccountLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('billingAccountLocationBucketView', () => { const fakePath = '/rendered/path/billingAccountLocationBucketView'; const expectedParameters = { @@ -1673,6 +1770,101 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('folderLocationBucketLink', () => { + const fakePath = '/rendered/path/folderLocationBucketLink'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationBucketLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationBucketLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationBucketLinkPath', () => { + const result = client.folderLocationBucketLinkPath( + 'folderValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationBucketLinkName', () => { + const result = + client.matchFolderFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationBucketLinkName', () => { + const result = + client.matchLocationFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromFolderLocationBucketLinkName', () => { + const result = + client.matchBucketFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromFolderLocationBucketLinkName', () => { + const result = + client.matchLinkFromFolderLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.folderLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderLocationBucketView', () => { const fakePath = '/rendered/path/folderLocationBucketView'; const expectedParameters = { @@ -2140,6 +2332,101 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('organizationLocationBucketLink', () => { + const fakePath = '/rendered/path/organizationLocationBucketLink'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationBucketLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationBucketLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationBucketLinkPath', () => { + const result = client.organizationLocationBucketLinkPath( + 'organizationValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchOrganizationFromOrganizationLocationBucketLinkName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchLocationFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchBucketFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromOrganizationLocationBucketLinkName', () => { + const result = + client.matchLinkFromOrganizationLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.organizationLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationLocationBucketView', () => { const fakePath = '/rendered/path/organizationLocationBucketView'; const expectedParameters = { @@ -2605,6 +2892,101 @@ describe('v2.MetricsServiceV2Client', () => { }); }); + describe('projectLocationBucketLink', () => { + const fakePath = '/rendered/path/projectLocationBucketLink'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + bucket: 'bucketValue', + link: 'linkValue', + }; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBucketLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBucketLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBucketLinkPath', () => { + const result = client.projectLocationBucketLinkPath( + 'projectValue', + 'locationValue', + 'bucketValue', + 'linkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBucketLinkName', () => { + const result = + client.matchProjectFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBucketLinkName', () => { + const result = + client.matchLocationFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBucketFromProjectLocationBucketLinkName', () => { + const result = + client.matchBucketFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'bucketValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLinkFromProjectLocationBucketLinkName', () => { + const result = + client.matchLinkFromProjectLocationBucketLinkName(fakePath); + assert.strictEqual(result, 'linkValue'); + assert( + ( + client.pathTemplates.projectLocationBucketLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationBucketView', () => { const fakePath = '/rendered/path/projectLocationBucketView'; const expectedParameters = { From 6805c7e24ffef90867a90e1bcbe896b8b34c1b00 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 30 May 2023 11:00:00 -0700 Subject: [PATCH 0959/1029] chore(main): release 10.5.0 (#1419) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 10.5.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index ac6824e531e..d3bec6e5e2b 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [10.5.0](https://github.com/googleapis/nodejs-logging/compare/v10.4.1...v10.5.0) (2023-05-30) + + +### Features + +* Log Analytics features of the Cloud Logging API ([#1416](https://github.com/googleapis/nodejs-logging/issues/1416)) ([3c3de6d](https://github.com/googleapis/nodejs-logging/commit/3c3de6d3e472fa7d0a9ebbe05cf90abfa173db64)) + ## [10.4.1](https://github.com/googleapis/nodejs-logging/compare/v10.4.0...v10.4.1) (2023-04-28) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2823c29aff0..196464ca151 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.4.1", + "version": "10.5.0", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 4fb2f464752..0dc058ec0c9 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.4.1", + "version": "10.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 6fd1d2963c6..8d6370e3881 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.4.1'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.5.0'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 098c48e80e2f38d9ac57ca786a2f7cf8c0951259 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 31 May 2023 19:10:07 +0200 Subject: [PATCH 0960/1029] chore(deps): update dependency linkinator to v5 (#1420) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 196464ca151..79880e22b25 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -81,7 +81,7 @@ "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^4.0.0", + "linkinator": "^5.0.0", "mocha": "^9.2.2", "nock": "^13.0.0", "null-loader": "^4.0.0", From d55543ccb65bf33d8988bd1242579c8ba54a4674 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 13:21:50 -0700 Subject: [PATCH 0961/1029] * chore!: update to Node 14 (#1439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: fix node release schedule link Co-authored-by: Jeffrey Rennie Source-Link: https://github.com/googleapis/synthtool/commit/1a2431537d603e95b4b32317fb494542f75a2165 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore!: update to Node 14 --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 +- .../logging/.github/sync-repo-settings.yaml | 3 +- handwritten/logging/.kokoro/common.cfg | 2 +- .../continuous/{node12 => node14}/common.cfg | 2 +- .../continuous/{node12 => node14}/lint.cfg | 0 .../{node12 => node14}/samples-test.cfg | 0 .../{node12 => node14}/system-test.cfg | 0 .../continuous/{node12 => node14}/test.cfg | 0 handwritten/logging/.kokoro/environment.sh | 101 - .../environment/appengine_standard.cfg | 11 - .../logging/.kokoro/environment/cloudrun.cfg | 11 - .../logging/.kokoro/environment/common.cfg | 46 - .../logging/.kokoro/environment/compute.cfg | 11 - .../logging/.kokoro/environment/functions.cfg | 11 - .../.kokoro/environment/kubernetes.cfg | 11 - .../presubmit/{node12 => node14}/common.cfg | 2 +- .../{node12 => node14}/samples-test.cfg | 0 .../{node12 => node14}/system-test.cfg | 0 .../presubmit/{node12 => node14}/test.cfg | 0 handwritten/logging/.kokoro/release/docs.cfg | 2 +- .../logging/.kokoro/release/publish.cfg | 2 +- handwritten/logging/.kokoro/samples-test.sh | 2 +- handwritten/logging/.kokoro/system-test.sh | 2 +- handwritten/logging/.kokoro/test.bat | 2 +- handwritten/logging/.kokoro/test.sh | 2 +- handwritten/logging/README.md | 2 +- handwritten/logging/package.json | 31 +- handwritten/logging/protos/protos.d.ts | 1831 ++++++- handwritten/logging/protos/protos.js | 4637 +++++++++++++++-- handwritten/logging/protos/protos.json | 318 +- handwritten/logging/src/index.ts | 6 +- .../src/v2/config_service_v2_client.ts | 128 +- .../src/v2/logging_service_v2_client.ts | 20 +- .../src/v2/metrics_service_v2_client.ts | 20 +- handwritten/logging/system-test/logging.ts | 8 +- handwritten/logging/test/sink.ts | 2 +- 36 files changed, 6311 insertions(+), 919 deletions(-) rename handwritten/logging/.kokoro/continuous/{node12 => node14}/common.cfg (93%) rename handwritten/logging/.kokoro/continuous/{node12 => node14}/lint.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node12 => node14}/samples-test.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node12 => node14}/system-test.cfg (100%) rename handwritten/logging/.kokoro/continuous/{node12 => node14}/test.cfg (100%) delete mode 100755 handwritten/logging/.kokoro/environment.sh delete mode 100644 handwritten/logging/.kokoro/environment/appengine_standard.cfg delete mode 100644 handwritten/logging/.kokoro/environment/cloudrun.cfg delete mode 100644 handwritten/logging/.kokoro/environment/common.cfg delete mode 100644 handwritten/logging/.kokoro/environment/compute.cfg delete mode 100644 handwritten/logging/.kokoro/environment/functions.cfg delete mode 100644 handwritten/logging/.kokoro/environment/kubernetes.cfg rename handwritten/logging/.kokoro/presubmit/{node12 => node14}/common.cfg (89%) rename handwritten/logging/.kokoro/presubmit/{node12 => node14}/samples-test.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node12 => node14}/system-test.cfg (100%) rename handwritten/logging/.kokoro/presubmit/{node12 => node14}/test.cfg (100%) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 21ad18bd722..a3d003c65a1 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:0527a86c10b67742c409dc726ba9a31ec4e69b0006e3d7a49b0e6686c59cdaa9 -# created: 2023-05-24T20:32:43.844586914Z + digest: sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 +# created: 2023-08-03T18:46:14.719706948Z diff --git a/handwritten/logging/.github/sync-repo-settings.yaml b/handwritten/logging/.github/sync-repo-settings.yaml index 73eb8fabcd1..803f8b25dd9 100644 --- a/handwritten/logging/.github/sync-repo-settings.yaml +++ b/handwritten/logging/.github/sync-repo-settings.yaml @@ -9,9 +9,10 @@ branchProtectionRules: - "ci/kokoro: System test" - docs - lint - - test (12) - test (14) - test (16) + - test (18) + - test (20) - cla/google - windows - OwlBot Post Processor diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 35e1f26c15f..593a07b2232 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/continuous/node12/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg similarity index 93% rename from handwritten/logging/.kokoro/continuous/node12/common.cfg rename to handwritten/logging/.kokoro/continuous/node14/common.cfg index 35e1f26c15f..593a07b2232 100644 --- a/handwritten/logging/.kokoro/continuous/node12/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/continuous/node12/lint.cfg b/handwritten/logging/.kokoro/continuous/node14/lint.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node12/lint.cfg rename to handwritten/logging/.kokoro/continuous/node14/lint.cfg diff --git a/handwritten/logging/.kokoro/continuous/node12/samples-test.cfg b/handwritten/logging/.kokoro/continuous/node14/samples-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node12/samples-test.cfg rename to handwritten/logging/.kokoro/continuous/node14/samples-test.cfg diff --git a/handwritten/logging/.kokoro/continuous/node12/system-test.cfg b/handwritten/logging/.kokoro/continuous/node14/system-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node12/system-test.cfg rename to handwritten/logging/.kokoro/continuous/node14/system-test.cfg diff --git a/handwritten/logging/.kokoro/continuous/node12/test.cfg b/handwritten/logging/.kokoro/continuous/node14/test.cfg similarity index 100% rename from handwritten/logging/.kokoro/continuous/node12/test.cfg rename to handwritten/logging/.kokoro/continuous/node14/test.cfg diff --git a/handwritten/logging/.kokoro/environment.sh b/handwritten/logging/.kokoro/environment.sh deleted file mode 100755 index f2940d5327f..00000000000 --- a/handwritten/logging/.kokoro/environment.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://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. - -set -eo pipefail - -printenv - -if [[ -z "${ENVIRONMENT:-}" ]]; then - echo "ENVIRONMENT not set. Exiting" - exit 1 -fi - -# Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/long-door-651-kokoro-system-test-service-account -export GCLOUD_PROJECT=long-door-651 -gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS - -set -x - -if [[ -z "${PROJECT_ROOT:-}" ]]; then - PROJECT_ROOT="github/nodejs-logging" -fi - -# Set up local library, generates /build uploaded as a local dependency -npm install -npm run compile - -# make sure submodule is up to date -git submodule update --init --recursive -cd "env-tests-logging/" -export ENV_TEST_PY_VERSION=3.7 -echo "using python version: $ENV_TEST_PY_VERSION" - -# Disable buffering, so that the logs stream through. -export PYTHONUNBUFFERED=1 - -export CLOUDSDK_PYTHON=python3 - -# Debug: show build environment -env | grep KOKORO - -# Setup project id. -gcloud config set project $GCLOUD_PROJECT - -# set a default zone. -gcloud config set compute/zone us-central1-b - -# authenticate docker -gcloud auth configure-docker -q - -# This block is executed only with Trampoline V2+. -if [[ -n "${TRAMPOLINE_VERSION:-}" ]]; then - # Remove old nox - python3 -m pip uninstall --yes --quiet nox-automation - - # Install nox as a user and add it to the PATH. - python3 -m pip install --user nox - export PATH="${PATH}:${HOME}/.local/bin" -fi - -# create a unique id for this run -UUID=$(python -c 'import uuid; print(uuid.uuid1())' | head -c 7) -export ENVCTL_ID=ci-$UUID -echo $ENVCTL_ID - -# If App Engine, install app-engine-go component -if [[ $ENVIRONMENT == *"appengine"* ]]; then - gcloud components install app-engine-go -q -fi - -# If Kubernetes, install kubectl component -if [[ $ENVIRONMENT == *"kubernetes"* ]]; then - gcloud components install kubectl -q - gcloud components install gke-gcloud-auth-plugin -q - export USE_GKE_GCLOUD_AUTH_PLUGIN=True -fi - -# Run the specified environment test -set +e -python3 -m nox --session "tests(language='nodejs', platform='$ENVIRONMENT')" -TEST_STATUS_CODE=$? - -# destroy resources -echo "cleaning up..." -./envctl/envctl nodejs $ENVIRONMENT destroy - -# exit with proper status code -exit $TEST_STATUS_CODE diff --git a/handwritten/logging/.kokoro/environment/appengine_standard.cfg b/handwritten/logging/.kokoro/environment/appengine_standard.cfg deleted file mode 100644 index ca4804d4925..00000000000 --- a/handwritten/logging/.kokoro/environment/appengine_standard.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Specify which tests to run -env_vars: { - key: "ENVIRONMENT" - value: "appengine_standard" -} - -# TODO: actually use this variable somewhere -env_vars: { - key: "RUNTIME" - value: "nodejs12" -} diff --git a/handwritten/logging/.kokoro/environment/cloudrun.cfg b/handwritten/logging/.kokoro/environment/cloudrun.cfg deleted file mode 100644 index 3b81172b0d5..00000000000 --- a/handwritten/logging/.kokoro/environment/cloudrun.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Specify which tests to run -env_vars: { - key: "ENVIRONMENT" - value: "cloudrun" -} - -# TODO: actually use this variable somewhere -env_vars: { - key: "RUNTIME" - value: "nodejs12" -} diff --git a/handwritten/logging/.kokoro/environment/common.cfg b/handwritten/logging/.kokoro/environment/common.cfg deleted file mode 100644 index 46eb92b29d7..00000000000 --- a/handwritten/logging/.kokoro/environment/common.cfg +++ /dev/null @@ -1,46 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" -} - -# Download resources for environment tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/environment.sh" -} - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} diff --git a/handwritten/logging/.kokoro/environment/compute.cfg b/handwritten/logging/.kokoro/environment/compute.cfg deleted file mode 100644 index 78270d95e25..00000000000 --- a/handwritten/logging/.kokoro/environment/compute.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Specify which tests to run -env_vars: { - key: "ENVIRONMENT" - value: "compute" -} - -# TODO: actually use this variable somewhere -env_vars: { - key: "RUNTIME" - value: "nodejs12" -} diff --git a/handwritten/logging/.kokoro/environment/functions.cfg b/handwritten/logging/.kokoro/environment/functions.cfg deleted file mode 100644 index e2e5c9d0168..00000000000 --- a/handwritten/logging/.kokoro/environment/functions.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Specify which tests to run -env_vars: { - key: "ENVIRONMENT" - value: "functions" -} - -# TODO: actually use this variable somewhere -env_vars: { - key: "RUNTIME" - value: "nodejs12" -} diff --git a/handwritten/logging/.kokoro/environment/kubernetes.cfg b/handwritten/logging/.kokoro/environment/kubernetes.cfg deleted file mode 100644 index db50a8b72d2..00000000000 --- a/handwritten/logging/.kokoro/environment/kubernetes.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Specify which tests to run -env_vars: { - key: "ENVIRONMENT" - value: "kubernetes" -} - -# TODO: actually use this variable somewhere -env_vars: { - key: "RUNTIME" - value: "nodejs12" -} diff --git a/handwritten/logging/.kokoro/presubmit/node12/common.cfg b/handwritten/logging/.kokoro/presubmit/node14/common.cfg similarity index 89% rename from handwritten/logging/.kokoro/presubmit/node12/common.cfg rename to handwritten/logging/.kokoro/presubmit/node14/common.cfg index 0d3d29bcccd..f55932f1268 100644 --- a/handwritten/logging/.kokoro/presubmit/node12/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node14/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/handwritten/logging/.kokoro/presubmit/node12/samples-test.cfg b/handwritten/logging/.kokoro/presubmit/node14/samples-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node12/samples-test.cfg rename to handwritten/logging/.kokoro/presubmit/node14/samples-test.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node12/system-test.cfg b/handwritten/logging/.kokoro/presubmit/node14/system-test.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node12/system-test.cfg rename to handwritten/logging/.kokoro/presubmit/node14/system-test.cfg diff --git a/handwritten/logging/.kokoro/presubmit/node12/test.cfg b/handwritten/logging/.kokoro/presubmit/node14/test.cfg similarity index 100% rename from handwritten/logging/.kokoro/presubmit/node12/test.cfg rename to handwritten/logging/.kokoro/presubmit/node14/test.cfg diff --git a/handwritten/logging/.kokoro/release/docs.cfg b/handwritten/logging/.kokoro/release/docs.cfg index 64f051aa19c..c7e7196bff4 100644 --- a/handwritten/logging/.kokoro/release/docs.cfg +++ b/handwritten/logging/.kokoro/release/docs.cfg @@ -11,7 +11,7 @@ before_action { # doc publications use a Python image. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } # Download trampoline resources. diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index 3d581e79f76..f3ac1440b0b 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -30,7 +30,7 @@ build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { diff --git a/handwritten/logging/.kokoro/samples-test.sh b/handwritten/logging/.kokoro/samples-test.sh index 806c0082236..8c5d108cb58 100755 --- a/handwritten/logging/.kokoro/samples-test.sh +++ b/handwritten/logging/.kokoro/samples-test.sh @@ -56,7 +56,7 @@ fi # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/handwritten/logging/.kokoro/system-test.sh b/handwritten/logging/.kokoro/system-test.sh index 0201e9dfd71..0b3043d268c 100755 --- a/handwritten/logging/.kokoro/system-test.sh +++ b/handwritten/logging/.kokoro/system-test.sh @@ -49,7 +49,7 @@ npm run system-test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/handwritten/logging/.kokoro/test.bat b/handwritten/logging/.kokoro/test.bat index ae59e59be3e..0bb12405231 100644 --- a/handwritten/logging/.kokoro/test.bat +++ b/handwritten/logging/.kokoro/test.bat @@ -21,7 +21,7 @@ cd .. @rem we upgrade Node.js in the image: SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm -call nvm use v12.14.1 +call nvm use v14.17.3 call which node call npm install || goto :error diff --git a/handwritten/logging/.kokoro/test.sh b/handwritten/logging/.kokoro/test.sh index a5c7ac04cd3..862d478d324 100755 --- a/handwritten/logging/.kokoro/test.sh +++ b/handwritten/logging/.kokoro/test.sh @@ -39,7 +39,7 @@ npm test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 37f8b1336b7..fa0e7d2234e 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -245,7 +245,7 @@ also contains samples. ## Supported Node.js Versions -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 79880e22b25..2e39a1f1212 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -45,38 +45,39 @@ "postpublish": "./.kokoro/publish-min.sh" }, "dependencies": { - "@google-cloud/common": "^4.0.0", - "@google-cloud/paginator": "^4.0.0", - "@google-cloud/projectify": "^3.0.0", - "@google-cloud/promisify": "^3.0.0", + "@google-cloud/common": "^5.0.0", + "@google-cloud/paginator": "^5.0.0", + "@google-cloud/projectify": "^4.0.0", + "@google-cloud/promisify": "^4.0.0", "arrify": "^2.0.1", "dot-prop": "^6.0.0", "eventid": "^2.0.0", "extend": "^3.0.2", - "gcp-metadata": "^4.0.0", - "google-auth-library": "^8.0.2", - "google-gax": "^3.5.8", + "gcp-metadata": "^6.0.0", + "google-auth-library": "^9.0.0", + "google-gax": "^4.0.3", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", "uuid": "^9.0.0" }, "devDependencies": { - "@google-cloud/bigquery": "^6.0.0", - "@google-cloud/pubsub": "^3.0.0", - "@google-cloud/storage": "^6.0.0", + "@google-cloud/bigquery": "^7.0.0", + "@google-cloud/pubsub": "^4.0.0", + "@google-cloud/storage": "^7.0.0", "@types/extend": "^3.0.1", "@types/mocha": "^9.0.0", - "@types/node": "^18.0.0", + "@types/node": "^20.4.9", "@types/on-finished": "^2.3.1", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", "@types/sinon": "^10.0.0", "@types/uuid": "^9.0.0", "bignumber.js": "^9.0.0", - "c8": "^7.1.0", + "c8": "^8.0.1", "codecov": "^3.6.5", - "gts": "^3.1.0", + "gapic-tools": "^0.1.8", + "gts": "^5.0.0", "http2spy": "^2.0.0", "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", @@ -89,12 +90,12 @@ "proxyquire": "^2.1.3", "sinon": "^15.0.0", "ts-loader": "^9.0.0", - "typescript": "^4.6.4", + "typescript": "^5.1.6", "uglify-js": "^3.13.5", "webpack": "^5.0.0", "webpack-cli": "^5.0.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } } diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 8800c84661a..246fc511ae9 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1961,6 +1961,9 @@ export namespace google { /** MessageOptions mapEntry */ mapEntry?: (boolean|null); + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -1989,6 +1992,9 @@ export namespace google { /** MessageOptions mapEntry. */ public mapEntry: boolean; + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + /** MessageOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2094,6 +2100,15 @@ export namespace google { /** FieldOptions weak */ weak?: (boolean|null); + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions target */ + target?: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -2134,6 +2149,15 @@ export namespace google { /** FieldOptions weak. */ public weak: boolean; + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions target. */ + public target: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2230,6 +2254,27 @@ export namespace google { JS_STRING = 1, JS_NUMBER = 2 } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } } /** Properties of an OneofOptions. */ @@ -2338,6 +2383,9 @@ export namespace google { /** EnumOptions deprecated */ deprecated?: (boolean|null); + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** EnumOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -2357,6 +2405,9 @@ export namespace google { /** EnumOptions deprecated. */ public deprecated: boolean; + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + /** EnumOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -14645,259 +14696,1689 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Distribution. */ - interface IDistribution { + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { - /** Distribution count */ - count?: (number|Long|string|null); + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); - /** Distribution mean */ - mean?: (number|null); + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } - /** Distribution sumOfSquaredDeviation */ - sumOfSquaredDeviation?: (number|null); + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { - /** Distribution range */ - range?: (google.api.Distribution.IRange|null); + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); - /** Distribution bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; - /** Distribution bucketCounts */ - bucketCounts?: ((number|Long|string)[]|null); + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; - /** Distribution exemplars */ - exemplars?: (google.api.Distribution.IExemplar[]|null); + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Distribution. */ - class Distribution implements IDistribution { + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { /** - * Constructs a new Distribution. + * Constructs a new ClientLibrarySettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IDistribution); + constructor(properties?: google.api.IClientLibrarySettings); - /** Distribution count. */ - public count: (number|Long|string); + /** ClientLibrarySettings version. */ + public version: string; - /** Distribution mean. */ - public mean: number; + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** Distribution sumOfSquaredDeviation. */ - public sumOfSquaredDeviation: number; + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; - /** Distribution range. */ - public range?: (google.api.Distribution.IRange|null); + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); - /** Distribution bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); - /** Distribution bucketCounts. */ - public bucketCounts: (number|Long|string)[]; + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); - /** Distribution exemplars. */ - public exemplars: google.api.Distribution.IExemplar[]; + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); /** - * Creates a new Distribution instance using the specified properties. + * Creates a new ClientLibrarySettings instance using the specified properties. * @param [properties] Properties to set - * @returns Distribution instance + * @returns ClientLibrarySettings instance */ - public static create(properties?: google.api.IDistribution): google.api.Distribution; + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a ClientLibrarySettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Distribution + * @returns ClientLibrarySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Distribution + * @returns ClientLibrarySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; /** - * Verifies a Distribution message. + * Verifies a ClientLibrarySettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Distribution + * @returns ClientLibrarySettings */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution; + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @param message Distribution + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Distribution to JSON. + * Converts this ClientLibrarySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Distribution + * Gets the default type url for ClientLibrarySettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Distribution { + /** Properties of a Publishing. */ + interface IPublishing { - /** Properties of a Range. */ - interface IRange { + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); - /** Range min */ - min?: (number|null); + /** Publishing newIssueUri */ + newIssueUri?: (string|null); - /** Range max */ - max?: (number|null); - } + /** Publishing documentationUri */ + documentationUri?: (string|null); - /** Represents a Range. */ - class Range implements IRange { + /** Publishing apiShortName */ + apiShortName?: (string|null); - /** - * Constructs a new Range. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IRange); + /** Publishing githubLabel */ + githubLabel?: (string|null); - /** Range min. */ - public min: number; + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); - /** Range max. */ - public max: number; + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); - /** - * Creates a new Range instance using the specified properties. - * @param [properties] Properties to set - * @returns Range instance - */ - public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + } - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a Publishing. */ + class Publishing implements IPublishing { - /** - * Decodes a Range message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; - /** - * Verifies a Range message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Publishing newIssueUri. */ + public newIssueUri: string; - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Range - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + /** Publishing documentationUri. */ + public documentationUri: string; - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @param message Range - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Publishing apiShortName. */ + public apiShortName: string; - /** - * Converts this Range to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Publishing githubLabel. */ + public githubLabel: string; - /** - * Gets the default type url for Range - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; - /** Properties of a BucketOptions. */ - interface IBucketOptions { + /** Publishing docTagPrefix. */ + public docTagPrefix: string; - /** BucketOptions linearBuckets */ - linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - /** BucketOptions exponentialBuckets */ - exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; - /** BucketOptions explicitBuckets */ - explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); - } + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; - /** Represents a BucketOptions. */ - class BucketOptions implements IBucketOptions { + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** Properties of a Distribution. */ + interface IDistribution { + + /** Distribution count */ + count?: (number|Long|string|null); + + /** Distribution mean */ + mean?: (number|null); + + /** Distribution sumOfSquaredDeviation */ + sumOfSquaredDeviation?: (number|null); + + /** Distribution range */ + range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts */ + bucketCounts?: ((number|Long|string)[]|null); + + /** Distribution exemplars */ + exemplars?: (google.api.Distribution.IExemplar[]|null); + } + + /** Represents a Distribution. */ + class Distribution implements IDistribution { + + /** + * Constructs a new Distribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDistribution); + + /** Distribution count. */ + public count: (number|Long|string); + + /** Distribution mean. */ + public mean: number; + + /** Distribution sumOfSquaredDeviation. */ + public sumOfSquaredDeviation: number; + + /** Distribution range. */ + public range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts. */ + public bucketCounts: (number|Long|string)[]; + + /** Distribution exemplars. */ + public exemplars: google.api.Distribution.IExemplar[]; + + /** + * Creates a new Distribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Distribution instance + */ + public static create(properties?: google.api.IDistribution): google.api.Distribution; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; + + /** + * Verifies a Distribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Distribution + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Distribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Distribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Distribution { + + /** Properties of a Range. */ + interface IRange { + + /** Range min */ + min?: (number|null); + + /** Range max */ + max?: (number|null); + } + + /** Represents a Range. */ + class Range implements IRange { + + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IRange); + + /** Range min. */ + public min: number; + + /** Range max. */ + public max: number; + + /** + * Creates a new Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Range instance + */ + public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; + + /** + * Verifies a Range message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Range + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BucketOptions. */ + interface IBucketOptions { + + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + } + + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { /** * Constructs a new BucketOptions. @@ -15582,6 +17063,25 @@ export namespace google { namespace MetricDescriptor { + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } + /** Properties of a MetricDescriptorMetadata. */ interface IMetricDescriptorMetadata { @@ -15690,25 +17190,6 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** MetricKind enum. */ - enum MetricKind { - METRIC_KIND_UNSPECIFIED = 0, - GAUGE = 1, - DELTA = 2, - CUMULATIVE = 3 - } - - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - BOOL = 1, - INT64 = 2, - DOUBLE = 3, - STRING = 4, - DISTRIBUTION = 5, - MONEY = 6 - } } /** Properties of a Metric. */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 894badd6b23..c2f7e5a8219 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -5515,6 +5515,7 @@ * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor * @property {boolean|null} [deprecated] MessageOptions deprecated * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ @@ -5567,6 +5568,14 @@ */ MessageOptions.prototype.mapEntry = false; + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** * MessageOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -5615,6 +5624,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -5670,6 +5681,10 @@ message.mapEntry = reader.bool(); break; } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -5727,6 +5742,9 @@ if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) if (typeof message.mapEntry !== "boolean") return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -5764,6 +5782,8 @@ message.deprecated = Boolean(object.deprecated); if (object.mapEntry != null) message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); @@ -5802,6 +5822,7 @@ object.noStandardDescriptorAccessor = false; object.deprecated = false; object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; object[".google.api.resource"] = null; } if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) @@ -5812,6 +5833,8 @@ object.deprecated = message.deprecated; if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -5864,6 +5887,9 @@ * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {google.protobuf.FieldOptions.OptionTargetType|null} [target] FieldOptions target * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference @@ -5942,6 +5968,30 @@ */ FieldOptions.prototype.weak = false; + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions target. + * @member {google.protobuf.FieldOptions.OptionTargetType} target + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.target = 0; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -6004,6 +6054,12 @@ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.target); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -6077,6 +6133,18 @@ message.weak = reader.bool(); break; } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 18: { + message.target = reader.int32(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -6166,6 +6234,34 @@ if (message.weak != null && message.hasOwnProperty("weak")) if (typeof message.weak !== "boolean") return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -6263,6 +6359,76 @@ message.deprecated = Boolean(object.deprecated); if (object.weak != null) message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_TYPE_UNKNOWN": + case 0: + message.target = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.target = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.target = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.target = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.target = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.target = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.target = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.target = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.target = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.target = 9; + break; + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -6351,6 +6517,9 @@ object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.target = options.enums === String ? "TARGET_TYPE_UNKNOWN" : 0; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -6367,6 +6536,12 @@ object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.target] === undefined ? message.target : $root.google.protobuf.FieldOptions.OptionTargetType[message.target] : message.target; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -6440,6 +6615,52 @@ return values; })(); + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + return FieldOptions; })(); @@ -6675,6 +6896,7 @@ * @interface IEnumOptions * @property {boolean|null} [allowAlias] EnumOptions allowAlias * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ @@ -6710,6 +6932,14 @@ */ EnumOptions.prototype.deprecated = false; + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** * EnumOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -6746,6 +6976,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -6791,6 +7023,10 @@ message.deprecated = reader.bool(); break; } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -6838,6 +7074,9 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -6866,6 +7105,8 @@ message.allowAlias = Boolean(object.allowAlias); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); @@ -6897,11 +7138,14 @@ if (options.defaults) { object.allowAlias = false; object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; } if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) object.allowAlias = message.allowAlias; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -36551,32 +36795,26 @@ return ResourceReference; })(); - api.Distribution = (function() { + api.CommonLanguageSettings = (function() { /** - * Properties of a Distribution. + * Properties of a CommonLanguageSettings. * @memberof google.api - * @interface IDistribution - * @property {number|Long|null} [count] Distribution count - * @property {number|null} [mean] Distribution mean - * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation - * @property {google.api.Distribution.IRange|null} [range] Distribution range - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions - * @property {Array.|null} [bucketCounts] Distribution bucketCounts - * @property {Array.|null} [exemplars] Distribution exemplars + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations */ /** - * Constructs a new Distribution. + * Constructs a new CommonLanguageSettings. * @memberof google.api - * @classdesc Represents a Distribution. - * @implements IDistribution + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings * @constructor - * @param {google.api.IDistribution=} [properties] Properties to set + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set */ - function Distribution(properties) { - this.bucketCounts = []; - this.exemplars = []; + function CommonLanguageSettings(properties) { + this.destinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36584,173 +36822,100 @@ } /** - * Distribution count. - * @member {number|Long} count - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Distribution mean. - * @member {number} mean - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.mean = 0; - - /** - * Distribution sumOfSquaredDeviation. - * @member {number} sumOfSquaredDeviation - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.sumOfSquaredDeviation = 0; - - /** - * Distribution range. - * @member {google.api.Distribution.IRange|null|undefined} range - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.range = null; - - /** - * Distribution bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.bucketOptions = null; - - /** - * Distribution bucketCounts. - * @member {Array.} bucketCounts - * @memberof google.api.Distribution + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings * @instance */ - Distribution.prototype.bucketCounts = $util.emptyArray; + CommonLanguageSettings.prototype.referenceDocsUri = ""; /** - * Distribution exemplars. - * @member {Array.} exemplars - * @memberof google.api.Distribution + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings * @instance */ - Distribution.prototype.exemplars = $util.emptyArray; + CommonLanguageSettings.prototype.destinations = $util.emptyArray; /** - * Creates a new Distribution instance using the specified properties. + * Creates a new CommonLanguageSettings instance using the specified properties. * @function create - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IDistribution=} [properties] Properties to set - * @returns {google.api.Distribution} Distribution instance + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance */ - Distribution.create = function create(properties) { - return new Distribution(properties); + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); }; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. * @function encode - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encode = function encode(message, writer) { + CommonLanguageSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) - $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.int64(message.bucketCounts[i]); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); writer.ldelim(); } - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a CommonLanguageSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution} Distribution + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decode = function decode(reader, length) { + CommonLanguageSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.count = reader.int64(); + message.referenceDocsUri = reader.string(); break; } case 2: { - message.mean = reader.double(); - break; - } - case 3: { - message.sumOfSquaredDeviation = reader.double(); - break; - } - case 4: { - message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); - break; - } - case 6: { - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; + if (!(message.destinations && message.destinations.length)) + message.destinations = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) - message.bucketCounts.push(reader.int64()); + message.destinations.push(reader.int32()); } else - message.bucketCounts.push(reader.int64()); - break; - } - case 10: { - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + message.destinations.push(reader.int32()); break; } default: @@ -36762,314 +36927,3976 @@ }; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution} Distribution + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decodeDelimited = function decodeDelimited(reader) { + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Distribution message. + * Verifies a CommonLanguageSettings message. * @function verify - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Distribution.verify = function verify(message) { + CommonLanguageSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.mean != null && message.hasOwnProperty("mean")) - if (typeof message.mean !== "number") - return "mean: number expected"; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - if (typeof message.sumOfSquaredDeviation !== "number") - return "sumOfSquaredDeviation: number expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.api.Distribution.Range.verify(message.range); - if (error) - return "range." + error; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); - if (error) - return "bucketOptions." + error; - } - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; - } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); - if (error) - return "exemplars." + error; - } + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } } return null; }; /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution} Distribution + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution) + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) return object; - var message = new $root.google.api.Distribution(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.mean != null) - message.mean = Number(object.mean); - if (object.sumOfSquaredDeviation != null) - message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.api.Distribution.range: object expected"); - message.range = $root.google.api.Distribution.Range.fromObject(object.range); - } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.api.Distribution.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); - } - if (object.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".google.api.Distribution.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); - } - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".google.api.Distribution.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".google.api.Distribution.exemplars: object expected"); - message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); - } + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } } return message; }; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.Distribution} message Distribution + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Distribution.toObject = function toObject(message, options) { + CommonLanguageSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.bucketCounts = []; - object.exemplars = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - object.mean = 0; - object.sumOfSquaredDeviation = 0; - object.range = null; - object.bucketOptions = null; - } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.mean != null && message.hasOwnProperty("mean")) - object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.api.Distribution.Range.toObject(message.range, options); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; - } - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; } return object; }; /** - * Converts this Distribution to JSON. + * Converts this CommonLanguageSettings to JSON. * @function toJSON - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @instance * @returns {Object.} JSON object */ - Distribution.prototype.toJSON = function toJSON() { + CommonLanguageSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Distribution + * Gets the default type url for CommonLanguageSettings * @function getTypeUrl - * @memberof google.api.Distribution + * @memberof google.api.CommonLanguageSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Distribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.Distribution"; + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; }; - Distribution.Range = (function() { + return CommonLanguageSettings; + })(); - /** - * Properties of a Range. - * @memberof google.api.Distribution - * @interface IRange - * @property {number|null} [min] Range min - * @property {number|null} [max] Range max - */ + api.ClientLibrarySettings = (function() { - /** - * Constructs a new Range. - * @memberof google.api.Distribution - * @classdesc Represents a Range. - * @implements IRange - * @constructor - * @param {google.api.Distribution.IRange=} [properties] Properties to set - */ - function Range(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Range min. - * @member {number} min - * @memberof google.api.Distribution.Range - * @instance - */ - Range.prototype.min = 0; + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; - /** - * Range max. - * @member {number} max - * @memberof google.api.Distribution.Range - * @instance - */ - Range.prototype.max = 0; + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; - /** - * Creates a new Range instance using the specified properties. - * @function create - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange=} [properties] Properties to set - * @returns {google.api.Distribution.Range} Range instance - */ - Range.create = function create(properties) { - return new Range(properties); - }; + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; - /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); - return writer; - }; + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; - /** - * Decodes a Range message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + api.Distribution = (function() { + + /** + * Properties of a Distribution. + * @memberof google.api + * @interface IDistribution + * @property {number|Long|null} [count] Distribution count + * @property {number|null} [mean] Distribution mean + * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation + * @property {google.api.Distribution.IRange|null} [range] Distribution range + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions + * @property {Array.|null} [bucketCounts] Distribution bucketCounts + * @property {Array.|null} [exemplars] Distribution exemplars + */ + + /** + * Constructs a new Distribution. + * @memberof google.api + * @classdesc Represents a Distribution. + * @implements IDistribution + * @constructor + * @param {google.api.IDistribution=} [properties] Properties to set + */ + function Distribution(properties) { + this.bucketCounts = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Distribution count. + * @member {number|Long} count + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Distribution mean. + * @member {number} mean + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.mean = 0; + + /** + * Distribution sumOfSquaredDeviation. + * @member {number} sumOfSquaredDeviation + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.sumOfSquaredDeviation = 0; + + /** + * Distribution range. + * @member {google.api.Distribution.IRange|null|undefined} range + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.range = null; + + /** + * Distribution bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketOptions = null; + + /** + * Distribution bucketCounts. + * @member {Array.} bucketCounts + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketCounts = $util.emptyArray; + + /** + * Distribution exemplars. + * @member {Array.} exemplars + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.exemplars = $util.emptyArray; + + /** + * Creates a new Distribution instance using the specified properties. + * @function create + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution=} [properties] Properties to set + * @returns {google.api.Distribution} Distribution instance + */ + Distribution.create = function create(properties) { + return new Distribution(properties); + }; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); + if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.int64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.count = reader.int64(); + break; + } + case 2: { + message.mean = reader.double(); + break; + } + case 3: { + message.sumOfSquaredDeviation = reader.double(); + break; + } + case 4: { + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + } + case 6: { + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else + message.bucketCounts.push(reader.int64()); + break; + } + case 10: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Distribution message. + * @function verify + * @memberof google.api.Distribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Distribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (typeof message.sumOfSquaredDeviation !== "number") + return "sumOfSquaredDeviation: number expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.api.Distribution.Range.verify(message.range); + if (error) + return "range." + error; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + return null; + }; + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution} Distribution + */ + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution) + return object; + var message = new $root.google.api.Distribution(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.sumOfSquaredDeviation != null) + message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.api.Distribution.range: object expected"); + message.range = $root.google.api.Distribution.Range.fromObject(object.range); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.api.Distribution.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".google.api.Distribution.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".google.api.Distribution.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".google.api.Distribution.exemplars: object expected"); + message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution + * @static + * @param {google.api.Distribution} message Distribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Distribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.mean = 0; + object.sumOfSquaredDeviation = 0; + object.range = null; + object.bucketOptions = null; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.api.Distribution.Range.toObject(message.range, options); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + } + return object; + }; + + /** + * Converts this Distribution to JSON. + * @function toJSON + * @memberof google.api.Distribution + * @instance + * @returns {Object.} JSON object + */ + Distribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Distribution + * @function getTypeUrl + * @memberof google.api.Distribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Distribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution"; + }; + + Distribution.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.api.Distribution + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max + */ + + /** + * Constructs a new Range. + * @memberof google.api.Distribution + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.api.Distribution.IRange=} [properties] Properties to set + */ + function Range(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Range min. + * @member {number} min + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.min = 0; + + /** + * Range max. + * @member {number} max + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.max = 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @returns {google.api.Distribution.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + return writer; + }; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); while (reader.pos < end) { var tag = reader.uint32(); @@ -39099,6 +42926,48 @@ return typeUrlPrefix + "/google.api.MetricDescriptor"; }; + /** + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {number} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value + */ + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); + + /** + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {number} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value + */ + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); + MetricDescriptor.MetricDescriptorMetadata = (function() { /** @@ -39408,48 +43277,6 @@ return MetricDescriptorMetadata; })(); - /** - * MetricKind enum. - * @name google.api.MetricDescriptor.MetricKind - * @enum {number} - * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value - * @property {number} GAUGE=1 GAUGE value - * @property {number} DELTA=2 DELTA value - * @property {number} CUMULATIVE=3 CUMULATIVE value - */ - MetricDescriptor.MetricKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "GAUGE"] = 1; - values[valuesById[2] = "DELTA"] = 2; - values[valuesById[3] = "CUMULATIVE"] = 3; - return values; - })(); - - /** - * ValueType enum. - * @name google.api.MetricDescriptor.ValueType - * @enum {number} - * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - * @property {number} DOUBLE=3 DOUBLE value - * @property {number} STRING=4 STRING value - * @property {number} DISTRIBUTION=5 DISTRIBUTION value - * @property {number} MONEY=6 MONEY value - */ - MetricDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - values[valuesById[3] = "DOUBLE"] = 3; - values[valuesById[4] = "STRING"] = 4; - values[valuesById[5] = "DISTRIBUTION"] = 5; - values[valuesById[6] = "MONEY"] = 6; - return values; - })(); - return MetricDescriptor; })(); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 8d93c24ccc9..9cab9b7e72e 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -566,6 +566,13 @@ "type": "bool", "id": 7 }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -649,6 +656,21 @@ "default": false } }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "target": { + "type": "OptionTargetType", + "id": 18 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -681,6 +703,27 @@ "JS_STRING": 1, "JS_NUMBER": 2 } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } } } }, @@ -712,6 +755,13 @@ "default": false } }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -4737,6 +4787,236 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, "Distribution": { "fields": { "count": { @@ -4920,25 +5200,6 @@ } }, "nested": { - "MetricDescriptorMetadata": { - "fields": { - "launchStage": { - "type": "LaunchStage", - "id": 1, - "options": { - "deprecated": true - } - }, - "samplePeriod": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "ingestDelay": { - "type": "google.protobuf.Duration", - "id": 3 - } - } - }, "MetricKind": { "values": { "METRIC_KIND_UNSPECIFIED": 0, @@ -4957,6 +5218,25 @@ "DISTRIBUTION": 5, "MONEY": 6 } + }, + "MetricDescriptorMetadata": { + "fields": { + "launchStage": { + "type": "LaunchStage", + "id": 1, + "options": { + "deprecated": true + } + }, + "samplePeriod": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "ingestDelay": { + "type": "google.protobuf.Duration", + "id": 3 + } + } } } }, diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index c37e1d2d760..23b5d3ae1d5 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -95,7 +95,7 @@ export interface CreateSinkCallback { export type GetEntriesResponse = [ Entry[], google.logging.v2.IListLogEntriesRequest, - google.logging.v2.IListLogEntriesResponse + google.logging.v2.IListLogEntriesResponse, ]; export interface GetEntriesCallback { @@ -124,7 +124,7 @@ export interface GetLogsRequest { export type GetLogsResponse = [ Sink[], google.logging.v2.IListLogsRequest, - google.logging.v2.IListLogsResponse + google.logging.v2.IListLogsResponse, ]; export interface GetLogsCallback { @@ -148,7 +148,7 @@ export interface GetSinksRequest { export type GetSinksResponse = [ Sink[], google.logging.v2.IListSinksRequest, - google.logging.v2.IListSinksResponse + google.logging.v2.IListSinksResponse, ]; export interface GetSinksCallback { diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index ae94e86807b..96f98d89a03 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -648,7 +648,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IGetBucketRequest | undefined, - {} | undefined + {} | undefined, ] >; getBucket( @@ -686,7 +686,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IGetBucketRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -746,7 +746,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogBucket, protos.google.logging.v2.ICreateBucketRequest | undefined, - {} | undefined + {} | undefined, ] >; createBucket( @@ -784,7 +784,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogBucket, protos.google.logging.v2.ICreateBucketRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -854,7 +854,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IUpdateBucketRequest | undefined, - {} | undefined + {} | undefined, ] >; updateBucket( @@ -892,7 +892,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IUpdateBucketRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -950,7 +950,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteBucketRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteBucket( @@ -988,7 +988,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteBucketRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1043,7 +1043,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IUndeleteBucketRequest | undefined, - {} | undefined + {} | undefined, ] >; undeleteBucket( @@ -1081,7 +1081,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IUndeleteBucketRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1132,7 +1132,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogView, protos.google.logging.v2.IGetViewRequest | undefined, - {} | undefined + {} | undefined, ] >; getView( @@ -1170,7 +1170,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogView, protos.google.logging.v2.IGetViewRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1228,7 +1228,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogView, protos.google.logging.v2.ICreateViewRequest | undefined, - {} | undefined + {} | undefined, ] >; createView( @@ -1266,7 +1266,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogView, protos.google.logging.v2.ICreateViewRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1332,7 +1332,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogView, protos.google.logging.v2.IUpdateViewRequest | undefined, - {} | undefined + {} | undefined, ] >; updateView( @@ -1370,7 +1370,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogView, protos.google.logging.v2.IUpdateViewRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1424,7 +1424,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteViewRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteView( @@ -1462,7 +1462,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteViewRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1516,7 +1516,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogSink, protos.google.logging.v2.IGetSinkRequest | undefined, - {} | undefined + {} | undefined, ] >; getSink( @@ -1554,7 +1554,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogSink, protos.google.logging.v2.IGetSinkRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1628,7 +1628,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogSink, protos.google.logging.v2.ICreateSinkRequest | undefined, - {} | undefined + {} | undefined, ] >; createSink( @@ -1666,7 +1666,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogSink, protos.google.logging.v2.ICreateSinkRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1757,7 +1757,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogSink, protos.google.logging.v2.IUpdateSinkRequest | undefined, - {} | undefined + {} | undefined, ] >; updateSink( @@ -1795,7 +1795,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogSink, protos.google.logging.v2.IUpdateSinkRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1851,7 +1851,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteSinkRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteSink( @@ -1889,7 +1889,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteSinkRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1939,7 +1939,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILink, protos.google.logging.v2.IGetLinkRequest | undefined, - {} | undefined + {} | undefined, ] >; getLink( @@ -1977,7 +1977,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILink, protos.google.logging.v2.IGetLinkRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2031,7 +2031,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IGetExclusionRequest | undefined, - {} | undefined + {} | undefined, ] >; getExclusion( @@ -2069,7 +2069,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IGetExclusionRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2129,7 +2129,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.ICreateExclusionRequest | undefined, - {} | undefined + {} | undefined, ] >; createExclusion( @@ -2167,7 +2167,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.ICreateExclusionRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2234,7 +2234,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IUpdateExclusionRequest | undefined, - {} | undefined + {} | undefined, ] >; updateExclusion( @@ -2272,7 +2272,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IUpdateExclusionRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2326,7 +2326,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteExclusionRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteExclusion( @@ -2364,7 +2364,7 @@ export class ConfigServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteExclusionRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2432,7 +2432,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IGetCmekSettingsRequest | undefined, - {} | undefined + {} | undefined, ] >; getCmekSettings( @@ -2470,7 +2470,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IGetCmekSettingsRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2556,7 +2556,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IUpdateCmekSettingsRequest | undefined, - {} | undefined + {} | undefined, ] >; updateCmekSettings( @@ -2596,7 +2596,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IUpdateCmekSettingsRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2664,7 +2664,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ISettings, protos.google.logging.v2.IGetSettingsRequest | undefined, - {} | undefined + {} | undefined, ] >; getSettings( @@ -2702,7 +2702,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ISettings, protos.google.logging.v2.IGetSettingsRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2786,7 +2786,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ISettings, protos.google.logging.v2.IUpdateSettingsRequest | undefined, - {} | undefined + {} | undefined, ] >; updateSettings( @@ -2824,7 +2824,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ISettings, protos.google.logging.v2.IUpdateSettingsRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2891,7 +2891,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; createBucketAsync( @@ -2944,7 +2944,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -3054,7 +3054,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; updateBucketAsync( @@ -3107,7 +3107,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IBucketMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -3205,7 +3205,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILinkMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; createLink( @@ -3258,7 +3258,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILinkMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -3349,7 +3349,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILinkMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; deleteLink( @@ -3402,7 +3402,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILinkMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -3496,7 +3496,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ICopyLogEntriesMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; copyLogEntries( @@ -3549,7 +3549,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ICopyLogEntriesMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -3646,7 +3646,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogBucket[], protos.google.logging.v2.IListBucketsRequest | null, - protos.google.logging.v2.IListBucketsResponse + protos.google.logging.v2.IListBucketsResponse, ] >; listBuckets( @@ -3684,7 +3684,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogBucket[], protos.google.logging.v2.IListBucketsRequest | null, - protos.google.logging.v2.IListBucketsResponse + protos.google.logging.v2.IListBucketsResponse, ] > | void { request = request || {}; @@ -3863,7 +3863,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogView[], protos.google.logging.v2.IListViewsRequest | null, - protos.google.logging.v2.IListViewsResponse + protos.google.logging.v2.IListViewsResponse, ] >; listViews( @@ -3901,7 +3901,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogView[], protos.google.logging.v2.IListViewsRequest | null, - protos.google.logging.v2.IListViewsResponse + protos.google.logging.v2.IListViewsResponse, ] > | void { request = request || {}; @@ -4070,7 +4070,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogSink[], protos.google.logging.v2.IListSinksRequest | null, - protos.google.logging.v2.IListSinksResponse + protos.google.logging.v2.IListSinksResponse, ] >; listSinks( @@ -4108,7 +4108,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogSink[], protos.google.logging.v2.IListSinksRequest | null, - protos.google.logging.v2.IListSinksResponse + protos.google.logging.v2.IListSinksResponse, ] > | void { request = request || {}; @@ -4278,7 +4278,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILink[], protos.google.logging.v2.IListLinksRequest | null, - protos.google.logging.v2.IListLinksResponse + protos.google.logging.v2.IListLinksResponse, ] >; listLinks( @@ -4316,7 +4316,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILink[], protos.google.logging.v2.IListLinksRequest | null, - protos.google.logging.v2.IListLinksResponse + protos.google.logging.v2.IListLinksResponse, ] > | void { request = request || {}; @@ -4483,7 +4483,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogExclusion[], protos.google.logging.v2.IListExclusionsRequest | null, - protos.google.logging.v2.IListExclusionsResponse + protos.google.logging.v2.IListExclusionsResponse, ] >; listExclusions( @@ -4521,7 +4521,7 @@ export class ConfigServiceV2Client { [ protos.google.logging.v2.ILogExclusion[], protos.google.logging.v2.IListExclusionsRequest | null, - protos.google.logging.v2.IListExclusionsResponse + protos.google.logging.v2.IListExclusionsResponse, ] > | void { request = request || {}; diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 8d7bea13d4d..7010024f1e9 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -533,7 +533,7 @@ export class LoggingServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteLog( @@ -571,7 +571,7 @@ export class LoggingServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -689,7 +689,7 @@ export class LoggingServiceV2Client { [ protos.google.logging.v2.IWriteLogEntriesResponse, protos.google.logging.v2.IWriteLogEntriesRequest | undefined, - {} | undefined + {} | undefined, ] >; writeLogEntries( @@ -727,7 +727,7 @@ export class LoggingServiceV2Client { [ protos.google.logging.v2.IWriteLogEntriesResponse, protos.google.logging.v2.IWriteLogEntriesRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -835,7 +835,7 @@ export class LoggingServiceV2Client { [ protos.google.logging.v2.ILogEntry[], protos.google.logging.v2.IListLogEntriesRequest | null, - protos.google.logging.v2.IListLogEntriesResponse + protos.google.logging.v2.IListLogEntriesResponse, ] >; listLogEntries( @@ -873,7 +873,7 @@ export class LoggingServiceV2Client { [ protos.google.logging.v2.ILogEntry[], protos.google.logging.v2.IListLogEntriesRequest | null, - protos.google.logging.v2.IListLogEntriesResponse + protos.google.logging.v2.IListLogEntriesResponse, ] > | void { request = request || {}; @@ -1077,7 +1077,7 @@ export class LoggingServiceV2Client { [ protos.google.api.IMonitoredResourceDescriptor[], protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, - protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse + protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse, ] >; listMonitoredResourceDescriptors( @@ -1123,7 +1123,7 @@ export class LoggingServiceV2Client { [ protos.google.api.IMonitoredResourceDescriptor[], protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest | null, - protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse + protos.google.logging.v2.IListMonitoredResourceDescriptorsResponse, ] > | void { request = request || {}; @@ -1293,7 +1293,7 @@ export class LoggingServiceV2Client { [ string[], protos.google.logging.v2.IListLogsRequest | null, - protos.google.logging.v2.IListLogsResponse + protos.google.logging.v2.IListLogsResponse, ] >; listLogs( @@ -1331,7 +1331,7 @@ export class LoggingServiceV2Client { [ string[], protos.google.logging.v2.IListLogsRequest | null, - protos.google.logging.v2.IListLogsResponse + protos.google.logging.v2.IListLogsResponse, ] > | void { request = request || {}; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 4f0f386920c..b11f519fec9 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -468,7 +468,7 @@ export class MetricsServiceV2Client { [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | undefined, - {} | undefined + {} | undefined, ] >; getLogMetric( @@ -506,7 +506,7 @@ export class MetricsServiceV2Client { [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -558,7 +558,7 @@ export class MetricsServiceV2Client { [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | undefined, - {} | undefined + {} | undefined, ] >; createLogMetric( @@ -596,7 +596,7 @@ export class MetricsServiceV2Client { [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -649,7 +649,7 @@ export class MetricsServiceV2Client { [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | undefined, - {} | undefined + {} | undefined, ] >; updateLogMetric( @@ -687,7 +687,7 @@ export class MetricsServiceV2Client { [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -734,7 +734,7 @@ export class MetricsServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteLogMetric( @@ -772,7 +772,7 @@ export class MetricsServiceV2Client { [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -832,7 +832,7 @@ export class MetricsServiceV2Client { [ protos.google.logging.v2.ILogMetric[], protos.google.logging.v2.IListLogMetricsRequest | null, - protos.google.logging.v2.IListLogMetricsResponse + protos.google.logging.v2.IListLogMetricsResponse, ] >; listLogMetrics( @@ -870,7 +870,7 @@ export class MetricsServiceV2Client { [ protos.google.logging.v2.ILogMetric[], protos.google.logging.v2.IListLogMetricsRequest | null, - protos.google.logging.v2.IListLogMetricsResponse + protos.google.logging.v2.IListLogMetricsResponse, ] > | void { request = request || {}; diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index fb61bd0cf5e..96d778850b1 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -85,8 +85,12 @@ describe('Logging', () => { // Fixes: https://github.com/googleapis/nodejs-logging/issues/953 async function deleteBuckets() { const [buckets] = await storage.getBuckets({prefix: TESTS_PREFIX}); - const bucketsToDelete = buckets.filter(bucket => { - return new Date(bucket.metadata.timeCreated) < twoDaysAgo; + const bucketsToDelete = buckets.filter((bucket: any) => { + if (bucket.metadata.timeCreated) { + return new Date(bucket.metadata.timeCreated) < twoDaysAgo; + } else { + return undefined; + } }); for (const bucket of bucketsToDelete) { diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index 50a86a6299a..873d146e64e 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -233,7 +233,7 @@ describe('Sink', () => { sandbox .stub(sink.logging.configService, 'updateSink') - .callsFake(async (reqOpts, gaxOpts) => { + .callsFake(async (reqOpts: any, gaxOpts: any) => { assert.strictEqual(reqOpts.sink.gaxOptions, undefined); assert.strictEqual(gaxOpts, metadata.gaxOptions); return []; From 1fa96ac97a4a8bfda3432f45e0562672c3a5098c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 14:26:41 -0700 Subject: [PATCH 0962/1029] chore(main): release 11.0.0 (#1444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 11.0.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 11 +++++++++++ handwritten/logging/package.json | 2 +- .../v2/snippet_metadata.google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index d3bec6e5e2b..e814654f3cf 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,17 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [11.0.0](https://github.com/googleapis/nodejs-logging/compare/v10.5.0...v11.0.0) (2023-08-10) + + +### ⚠ BREAKING CHANGES + +* migrate to Node 14 + +### Miscellaneous Chores + +* Migrate to Node 14 ([c294f5d](https://github.com/googleapis/nodejs-logging/commit/c294f5d439eea69826d9ba6cb66f00adaf428878)) + ## [10.5.0](https://github.com/googleapis/nodejs-logging/compare/v10.4.1...v10.5.0) (2023-05-30) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 2e39a1f1212..ab39ed7a652 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "10.5.0", + "version": "11.0.0", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 0dc058ec0c9..19211967771 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "10.5.0", + "version": "11.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 8d6370e3881..6e128bf0931 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '10.5.0'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '11.0.0'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 106bea156294291df707ddaed5af454652452496 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 15:22:54 -0700 Subject: [PATCH 0963/1029] test: disable retry-request for streaming tests (#1434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: fix typings for IAM methods docs: fixed links in the generated Markdown documentation PiperOrigin-RevId: 551610576 Source-Link: https://github.com/googleapis/googleapis/commit/73b1313cbd1fd0cc1e22684bc89ee1b1a416cfe0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8bec066492a6da2855b1b8ce562664c0a6b30b01 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGJlYzA2NjQ5MmE2ZGEyODU1YjFiOGNlNTYyNjY0YzBhNmIzMGIwMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: disable retry-request for streaming tests PiperOrigin-RevId: 554648220 Source-Link: https://github.com/googleapis/googleapis/commit/53cd9ad1b48e40cdd44e0c13e96ac0281b32828f Source-Link: https://github.com/googleapis/googleapis-gen/commit/7e8867efbed7dbfe5ef6ec3c2c92a4bce4280f7a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2U4ODY3ZWZiZWQ3ZGJmZTVlZjZlYzNjMmM5MmE0YmNlNDI4MGY3YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../v2/logging_service_v2.list_log_entries.js | 2 +- .../v2/logging_service_v2.list_logs.js | 2 +- .../v2/logging_service_v2.tail_log_entries.js | 2 +- .../logging_service_v2.write_log_entries.js | 4 +- .../snippet_metadata_google.logging.v2.json | 1963 +++++++++++++++++ .../src/v2/config_service_v2_client.ts | 239 +- .../src/v2/logging_service_v2_client.ts | 70 +- .../src/v2/metrics_service_v2_client.ts | 37 +- 8 files changed, 2108 insertions(+), 211 deletions(-) create mode 100644 handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js index a74f2d9e6e6..3e9cbf3ca35 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js @@ -41,7 +41,7 @@ function main(resourceNames) { * Projects listed in the `project_ids` field are added to this list. * A maximum of 100 resources may be specified in a single request. */ - // const resourceNames = 'abc123' + // const resourceNames = ['abc','def'] /** * Optional. Only log entries that match the filter are returned. An empty * filter matches all log entries in the resources listed in `resource_names`. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js index b0965a27361..97ebee799ac 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js @@ -47,7 +47,7 @@ function main(parent) { * * `folders/[FOLDER_ID]` * The resource name in the `parent` field is added to this list. */ - // const resourceNames = 'abc123' + // const resourceNames = ['abc','def'] /** * Optional. The maximum number of results to return from this request. * Non-positive values are ignored. The presence of `nextPageToken` in the diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js index b03cb642d19..362fc176f2e 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js @@ -38,7 +38,7 @@ function main(resourceNames) { * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` */ - // const resourceNames = 'abc123' + // const resourceNames = ['abc','def'] /** * Optional. Only log entries that match the filter are returned. An empty * filter matches all log entries in the resources listed in `resource_names`. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js index b1932cc0c52..756acc4a57a 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js @@ -57,7 +57,7 @@ function main(entries) { * as a label in this parameter, then the log entry's label is not changed. * See LogEntry google.logging.v2.LogEntry. */ - // const labels = 1234 + // const labels = [1,2,3,4] /** * Required. The log entries to send to Logging. The order of log * entries in this list does not matter. Values supplied in this method's @@ -81,7 +81,7 @@ function main(entries) { * `entries.write`, you should try to include several log entries in this * list, rather than calling this method for each individual log entry. */ - // const entries = 1234 + // const entries = [1,2,3,4] /** * Optional. Whether a batch's valid entries should be written even if some * other entry failed due to a permanent error such as INVALID_ARGUMENT or diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json new file mode 100644 index 00000000000..19211967771 --- /dev/null +++ b/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json @@ -0,0 +1,1963 @@ +{ + "clientLibrary": { + "name": "nodejs-logging", + "version": "11.0.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.logging.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListBuckets_async", + "title": "logging listBuckets Sample", + "origin": "API_DEFINITION", + "description": " Lists log buckets.", + "canonical": true, + "file": "config_service_v2.list_buckets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBuckets", + "fullName": "google.logging.v2.ConfigServiceV2.ListBuckets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListBucketsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListBuckets", + "fullName": "google.logging.v2.ConfigServiceV2.ListBuckets", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetBucket_async", + "title": "logging getBucket Sample", + "origin": "API_DEFINITION", + "description": " Gets a log bucket.", + "canonical": true, + "file": "config_service_v2.get_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBucket", + "fullName": "google.logging.v2.ConfigServiceV2.GetBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetBucket", + "fullName": "google.logging.v2.ConfigServiceV2.GetBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async", + "title": "logging createBucketAsync Sample", + "origin": "API_DEFINITION", + "description": " Creates a log bucket asynchronously that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.create_bucket_async.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBucketAsync", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucketAsync", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "bucket_id", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateBucketAsync", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucketAsync", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async", + "title": "logging updateBucketAsync Sample", + "origin": "API_DEFINITION", + "description": " Updates a log bucket asynchronously. If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be returned. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.update_bucket_async.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBucketAsync", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucketAsync", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateBucketAsync", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucketAsync", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateBucket_async", + "title": "logging createBucket Sample", + "origin": "API_DEFINITION", + "description": " Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.create_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucket", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "bucket_id", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.CreateBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateBucket_async", + "title": "logging updateBucket Sample", + "origin": "API_DEFINITION", + "description": " Updates a log bucket. If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be returned. After a bucket has been created, the bucket's location cannot be changed.", + "canonical": true, + "file": "config_service_v2.update_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "bucket", + "type": ".google.logging.v2.LogBucket" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogBucket", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteBucket_async", + "title": "logging deleteBucket Sample", + "origin": "API_DEFINITION", + "description": " Deletes a log bucket. Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.", + "canonical": true, + "file": "config_service_v2.delete_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UndeleteBucket_async", + "title": "logging undeleteBucket Sample", + "origin": "API_DEFINITION", + "description": " Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.", + "canonical": true, + "file": "config_service_v2.undelete_bucket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UndeleteBucket", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UndeleteBucket", + "fullName": "google.logging.v2.ConfigServiceV2.UndeleteBucket", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListViews_async", + "title": "logging listViews Sample", + "origin": "API_DEFINITION", + "description": " Lists views on a log bucket.", + "canonical": true, + "file": "config_service_v2.list_views.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListViews", + "fullName": "google.logging.v2.ConfigServiceV2.ListViews", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListViewsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListViews", + "fullName": "google.logging.v2.ConfigServiceV2.ListViews", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetView_async", + "title": "logging getView Sample", + "origin": "API_DEFINITION", + "description": " Gets a view on a log bucket..", + "canonical": true, + "file": "config_service_v2.get_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetView", + "fullName": "google.logging.v2.ConfigServiceV2.GetView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetView", + "fullName": "google.logging.v2.ConfigServiceV2.GetView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateView_async", + "title": "logging createView Sample", + "origin": "API_DEFINITION", + "description": " Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.", + "canonical": true, + "file": "config_service_v2.create_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateView", + "fullName": "google.logging.v2.ConfigServiceV2.CreateView", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view_id", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.logging.v2.LogView" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateView", + "fullName": "google.logging.v2.ConfigServiceV2.CreateView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateView_async", + "title": "logging updateView Sample", + "origin": "API_DEFINITION", + "description": " Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: `filter`. If an `UNAVAILABLE` error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.", + "canonical": true, + "file": "config_service_v2.update_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateView", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.logging.v2.LogView" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogView", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateView", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteView_async", + "title": "logging deleteView Sample", + "origin": "API_DEFINITION", + "description": " Deletes a view on a log bucket. If an `UNAVAILABLE` error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes.", + "canonical": true, + "file": "config_service_v2.delete_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteView", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteView", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteView", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListSinks_async", + "title": "logging listSinks Sample", + "origin": "API_DEFINITION", + "description": " Lists sinks.", + "canonical": true, + "file": "config_service_v2.list_sinks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListSinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListSinksResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListSinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListSinks", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetSink_async", + "title": "logging getSink Sample", + "origin": "API_DEFINITION", + "description": " Gets a sink.", + "canonical": true, + "file": "config_service_v2.get_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSink", + "fullName": "google.logging.v2.ConfigServiceV2.GetSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetSink", + "fullName": "google.logging.v2.ConfigServiceV2.GetSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateSink_async", + "title": "logging createSink Sample", + "origin": "API_DEFINITION", + "description": " Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless 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.", + "canonical": true, + "file": "config_service_v2.create_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateSink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "sink", + "type": ".google.logging.v2.LogSink" + }, + { + "name": "unique_writer_identity", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateSink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateSink_async", + "title": "logging updateSink Sample", + "origin": "API_DEFINITION", + "description": " Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: `destination`, and `filter`. The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` field.", + "canonical": true, + "file": "config_service_v2.update_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 93, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSink", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + }, + { + "name": "sink", + "type": ".google.logging.v2.LogSink" + }, + { + "name": "unique_writer_identity", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogSink", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateSink", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteSink_async", + "title": "logging deleteSink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted.", + "canonical": true, + "file": "config_service_v2.delete_sink.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteSink", + "async": true, + "parameters": [ + { + "name": "sink_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteSink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteSink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateLink_async", + "title": "logging createLink Sample", + "origin": "API_DEFINITION", + "description": " Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link.", + "canonical": true, + "file": "config_service_v2.create_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "link", + "type": ".google.logging.v2.Link" + }, + { + "name": "link_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateLink", + "fullName": "google.logging.v2.ConfigServiceV2.CreateLink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteLink_async", + "title": "logging deleteLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a link. This will also delete the corresponding BigQuery linked dataset.", + "canonical": true, + "file": "config_service_v2.delete_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteLink", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteLink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListLinks_async", + "title": "logging listLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists links.", + "canonical": true, + "file": "config_service_v2.list_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListLinksResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListLinks", + "fullName": "google.logging.v2.ConfigServiceV2.ListLinks", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetLink_async", + "title": "logging getLink Sample", + "origin": "API_DEFINITION", + "description": " Gets a link.", + "canonical": true, + "file": "config_service_v2.get_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLink", + "fullName": "google.logging.v2.ConfigServiceV2.GetLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.Link", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetLink", + "fullName": "google.logging.v2.ConfigServiceV2.GetLink", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_ListExclusions_async", + "title": "logging listExclusions Sample", + "origin": "API_DEFINITION", + "description": " Lists all the exclusions on the _Default sink in a parent resource.", + "canonical": true, + "file": "config_service_v2.list_exclusions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListExclusions", + "fullName": "google.logging.v2.ConfigServiceV2.ListExclusions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListExclusionsResponse", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "ListExclusions", + "fullName": "google.logging.v2.ConfigServiceV2.ListExclusions", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetExclusion_async", + "title": "logging getExclusion Sample", + "origin": "API_DEFINITION", + "description": " Gets the description of an exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.get_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.GetExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.GetExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CreateExclusion_async", + "title": "logging createExclusion Sample", + "origin": "API_DEFINITION", + "description": " Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.", + "canonical": true, + "file": "config_service_v2.create_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.CreateExclusion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "exclusion", + "type": ".google.logging.v2.LogExclusion" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CreateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.CreateExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateExclusion_async", + "title": "logging updateExclusion Sample", + "origin": "API_DEFINITION", + "description": " Changes one or more properties of an existing exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.update_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "exclusion", + "type": ".google.logging.v2.LogExclusion" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.LogExclusion", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_DeleteExclusion_async", + "title": "logging deleteExclusion Sample", + "origin": "API_DEFINITION", + "description": " Deletes an exclusion in the _Default sink.", + "canonical": true, + "file": "config_service_v2.delete_exclusion.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteExclusion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "DeleteExclusion", + "fullName": "google.logging.v2.ConfigServiceV2.DeleteExclusion", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetCmekSettings_async", + "title": "logging getCmekSettings Sample", + "origin": "API_DEFINITION", + "description": " Gets the Logging CMEK settings for the given resource. Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.get_cmek_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetCmekSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.CmekSettings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetCmekSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async", + "title": "logging updateCmekSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the Log Router CMEK settings for the given resource. Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key is disabled. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.update_cmek_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateCmekSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "cmek_settings", + "type": ".google.logging.v2.CmekSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.CmekSettings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateCmekSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateCmekSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_GetSettings_async", + "title": "logging getSettings Sample", + "origin": "API_DEFINITION", + "description": " Gets the Log Router settings for the given resource. Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.get_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.Settings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "GetSettings", + "fullName": "google.logging.v2.ConfigServiceV2.GetSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_UpdateSettings_async", + "title": "logging updateSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the Log Router settings for the given resource. Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or 3) access to the key is disabled. 4) `location_id` is not supported by Logging. 5) `location_id` violate OrgPolicy. See [Enabling CMEK for Log Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", + "canonical": true, + "file": "config_service_v2.update_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "settings", + "type": ".google.logging.v2.Settings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.logging.v2.Settings", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "UpdateSettings", + "fullName": "google.logging.v2.ConfigServiceV2.UpdateSettings", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_ConfigServiceV2_CopyLogEntries_async", + "title": "logging copyLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Copies a set of log entries from a log bucket to a Cloud Storage bucket.", + "canonical": true, + "file": "config_service_v2.copy_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CopyLogEntries", + "fullName": "google.logging.v2.ConfigServiceV2.CopyLogEntries", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "destination", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigServiceV2Client", + "fullName": "google.logging.v2.ConfigServiceV2Client" + }, + "method": { + "shortName": "CopyLogEntries", + "fullName": "google.logging.v2.ConfigServiceV2.CopyLogEntries", + "service": { + "shortName": "ConfigServiceV2", + "fullName": "google.logging.v2.ConfigServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_DeleteLog_async", + "title": "logging deleteLog Sample", + "origin": "API_DEFINITION", + "description": " Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.", + "canonical": true, + "file": "logging_service_v2.delete_log.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLog", + "fullName": "google.logging.v2.LoggingServiceV2.DeleteLog", + "async": true, + "parameters": [ + { + "name": "log_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "DeleteLog", + "fullName": "google.logging.v2.LoggingServiceV2.DeleteLog", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_WriteLogEntries_async", + "title": "logging writeLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)", + "canonical": true, + "file": "logging_service_v2.write_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 121, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "WriteLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.WriteLogEntries", + "async": true, + "parameters": [ + { + "name": "log_name", + "type": "TYPE_STRING" + }, + { + "name": "resource", + "type": ".google.api.MonitoredResource" + }, + { + "name": "labels", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "entries", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "partial_success", + "type": "TYPE_BOOL" + }, + { + "name": "dry_run", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.logging.v2.WriteLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "WriteLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.WriteLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_ListLogEntries_async", + "title": "logging listLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export).", + "canonical": true, + "file": "logging_service_v2.list_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 98, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogEntries", + "async": true, + "parameters": [ + { + "name": "resource_names", + "type": "TYPE_STRING[]" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.ListLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async", + "title": "logging listMonitoredResourceDescriptors Sample", + "origin": "API_DEFINITION", + "description": " Lists the descriptors for monitored resource types used by Logging.", + "canonical": true, + "file": "logging_service_v2.list_monitored_resource_descriptors.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMonitoredResourceDescriptors", + "fullName": "google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", + "async": true, + "parameters": [ + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.ListMonitoredResourceDescriptorsResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListMonitoredResourceDescriptors", + "fullName": "google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_ListLogs_async", + "title": "logging listLogs Sample", + "origin": "API_DEFINITION", + "description": " Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "canonical": true, + "file": "logging_service_v2.list_logs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogs", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "resource_names", + "type": "TYPE_STRING[]" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.ListLogsResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "ListLogs", + "fullName": "google.logging.v2.LoggingServiceV2.ListLogs", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_LoggingServiceV2_TailLogEntries_async", + "title": "logging tailLogEntries Sample", + "origin": "API_DEFINITION", + "description": " Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.", + "canonical": true, + "file": "logging_service_v2.tail_log_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TailLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.TailLogEntries", + "async": true, + "parameters": [ + { + "name": "resource_names", + "type": "TYPE_STRING[]" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "buffer_window", + "type": ".google.protobuf.Duration" + } + ], + "resultType": ".google.logging.v2.TailLogEntriesResponse", + "client": { + "shortName": "LoggingServiceV2Client", + "fullName": "google.logging.v2.LoggingServiceV2Client" + }, + "method": { + "shortName": "TailLogEntries", + "fullName": "google.logging.v2.LoggingServiceV2.TailLogEntries", + "service": { + "shortName": "LoggingServiceV2", + "fullName": "google.logging.v2.LoggingServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_ListLogMetrics_async", + "title": "logging listLogMetrics Sample", + "origin": "API_DEFINITION", + "description": " Lists logs-based metrics.", + "canonical": true, + "file": "metrics_service_v2.list_log_metrics.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLogMetrics", + "fullName": "google.logging.v2.MetricsServiceV2.ListLogMetrics", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.logging.v2.ListLogMetricsResponse", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "ListLogMetrics", + "fullName": "google.logging.v2.MetricsServiceV2.ListLogMetrics", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_GetLogMetric_async", + "title": "logging getLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Gets a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.get_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.GetLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "GetLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.GetLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_CreateLogMetric_async", + "title": "logging createLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Creates a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.create_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.CreateLogMetric", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "metric", + "type": ".google.logging.v2.LogMetric" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "CreateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.CreateLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async", + "title": "logging updateLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Creates or updates a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.update_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.UpdateLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + }, + { + "name": "metric", + "type": ".google.logging.v2.LogMetric" + } + ], + "resultType": ".google.logging.v2.LogMetric", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "UpdateLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.UpdateLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + }, + { + "regionTag": "logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async", + "title": "logging deleteLogMetric Sample", + "origin": "API_DEFINITION", + "description": " Deletes a logs-based metric.", + "canonical": true, + "file": "metrics_service_v2.delete_log_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.DeleteLogMetric", + "async": true, + "parameters": [ + { + "name": "metric_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetricsServiceV2Client", + "fullName": "google.logging.v2.MetricsServiceV2Client" + }, + "method": { + "shortName": "DeleteLogMetric", + "fullName": "google.logging.v2.MetricsServiceV2.DeleteLogMetric", + "service": { + "shortName": "MetricsServiceV2", + "fullName": "google.logging.v2.MetricsServiceV2" + } + } + } + } + ] +} \ No newline at end of file diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 96f98d89a03..c903a739e5b 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -634,9 +634,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogBucket | LogBucket}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogBucket|LogBucket}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.get_bucket.js * region_tag:logging_v2_generated_ConfigServiceV2_GetBucket_async @@ -732,9 +731,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogBucket | LogBucket}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogBucket|LogBucket}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.create_bucket.js * region_tag:logging_v2_generated_ConfigServiceV2_CreateBucket_async @@ -840,9 +838,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogBucket | LogBucket}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogBucket|LogBucket}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.update_bucket.js * region_tag:logging_v2_generated_ConfigServiceV2_UpdateBucket_async @@ -936,9 +933,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.delete_bucket.js * region_tag:logging_v2_generated_ConfigServiceV2_DeleteBucket_async @@ -1029,9 +1025,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.undelete_bucket.js * region_tag:logging_v2_generated_ConfigServiceV2_UndeleteBucket_async @@ -1118,9 +1113,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogView | LogView}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogView|LogView}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.get_view.js * region_tag:logging_v2_generated_ConfigServiceV2_GetView_async @@ -1214,9 +1208,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogView | LogView}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogView|LogView}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.create_view.js * region_tag:logging_v2_generated_ConfigServiceV2_CreateView_async @@ -1318,9 +1311,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogView | LogView}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogView|LogView}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.update_view.js * region_tag:logging_v2_generated_ConfigServiceV2_UpdateView_async @@ -1410,9 +1402,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.delete_view.js * region_tag:logging_v2_generated_ConfigServiceV2_DeleteView_async @@ -1502,9 +1493,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogSink | LogSink}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogSink|LogSink}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.get_sink.js * region_tag:logging_v2_generated_ConfigServiceV2_GetSink_async @@ -1610,13 +1600,12 @@ export class ConfigServiceV2Client { * 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 - * {@link google.logging.v2.LogSink|LogSink}. + * {@link protos.google.logging.v2.LogSink|LogSink}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogSink | LogSink}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogSink|LogSink}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.create_sink.js * region_tag:logging_v2_generated_ConfigServiceV2_CreateSink_async @@ -1712,7 +1701,7 @@ export class ConfigServiceV2Client { * Required. The updated sink, whose name is the same identifier that appears * as part of `sink_name`. * @param {boolean} [request.uniqueWriterIdentity] - * Optional. See {@link google.logging.v2.ConfigServiceV2.CreateSink|sinks.create} + * Optional. See {@link protos.google.logging.v2.ConfigServiceV2.CreateSink|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: @@ -1743,9 +1732,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogSink | LogSink}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogSink|LogSink}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.update_sink.js * region_tag:logging_v2_generated_ConfigServiceV2_UpdateSink_async @@ -1837,9 +1825,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.delete_sink.js * region_tag:logging_v2_generated_ConfigServiceV2_DeleteSink_async @@ -1925,9 +1912,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.Link | Link}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.Link|Link}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.get_link.js * region_tag:logging_v2_generated_ConfigServiceV2_GetLink_async @@ -2017,9 +2003,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogExclusion | LogExclusion}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogExclusion|LogExclusion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.get_exclusion.js * region_tag:logging_v2_generated_ConfigServiceV2_GetExclusion_async @@ -2115,9 +2100,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogExclusion | LogExclusion}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogExclusion|LogExclusion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.create_exclusion.js * region_tag:logging_v2_generated_ConfigServiceV2_CreateExclusion_async @@ -2211,7 +2195,7 @@ export class ConfigServiceV2Client { * @param {google.protobuf.FieldMask} request.updateMask * Required. A non-empty list of fields to change in the existing exclusion. * New values for the fields are taken from the corresponding fields in the - * {@link google.logging.v2.LogExclusion|LogExclusion} included in this request. + * {@link protos.google.logging.v2.LogExclusion|LogExclusion} included in this request. * Fields not mentioned in `update_mask` are not changed and are ignored in * the request. * @@ -2220,9 +2204,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogExclusion | LogExclusion}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogExclusion|LogExclusion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.update_exclusion.js * region_tag:logging_v2_generated_ConfigServiceV2_UpdateExclusion_async @@ -2312,9 +2295,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.delete_exclusion.js * region_tag:logging_v2_generated_ConfigServiceV2_DeleteExclusion_async @@ -2418,9 +2400,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.CmekSettings | CmekSettings}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.CmekSettings|CmekSettings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.get_cmek_settings.js * region_tag:logging_v2_generated_ConfigServiceV2_GetCmekSettings_async @@ -2498,7 +2479,7 @@ export class ConfigServiceV2Client { * Cloud organizations. Once configured, it applies to all projects and * folders in the Google Cloud organization. * - * {@link google.logging.v2.ConfigServiceV2.UpdateCmekSettings|UpdateCmekSettings} + * {@link protos.google.logging.v2.ConfigServiceV2.UpdateCmekSettings|UpdateCmekSettings} * will fail if 1) `kms_key_name` is invalid, or 2) the associated service * account does not have the required * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or @@ -2536,15 +2517,14 @@ export class ConfigServiceV2Client { * be updated. A field will be overwritten if and only if it is in the update * mask. Output only fields cannot be updated. * - * See {@link google.protobuf.FieldMask|FieldMask} for more information. + * See {@link protos.google.protobuf.FieldMask|FieldMask} for more information. * * For example: `"updateMask=kmsKeyName"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.CmekSettings | CmekSettings}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.CmekSettings|CmekSettings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.update_cmek_settings.js * region_tag:logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_async @@ -2650,9 +2630,8 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.Settings | Settings}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.Settings|Settings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.get_settings.js * region_tag:logging_v2_generated_ConfigServiceV2_GetSettings_async @@ -2730,7 +2709,7 @@ export class ConfigServiceV2Client { * Google Cloud organizations. Once configured, it applies to all projects and * folders in the Google Cloud organization. * - * {@link google.logging.v2.ConfigServiceV2.UpdateSettings|UpdateSettings} + * {@link protos.google.logging.v2.ConfigServiceV2.UpdateSettings|UpdateSettings} * will fail if 1) `kms_key_name` is invalid, or 2) the associated service * account does not have the required * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or @@ -2766,15 +2745,14 @@ export class ConfigServiceV2Client { * be updated. A field will be overwritten if and only if it is in the update * mask. Output only fields cannot be updated. * - * See {@link google.protobuf.FieldMask|FieldMask} for more information. + * See {@link protos.google.protobuf.FieldMask|FieldMask} for more information. * * For example: `"updateMask=kmsKeyName"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.Settings | Settings}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.Settings|Settings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.update_settings.js * region_tag:logging_v2_generated_ConfigServiceV2_UpdateSettings_async @@ -2875,8 +2853,7 @@ export class ConfigServiceV2Client { * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.create_bucket_async.js * region_tag:logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async @@ -2971,8 +2948,7 @@ export class ConfigServiceV2Client { * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.create_bucket_async.js * region_tag:logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async @@ -3038,8 +3014,7 @@ export class ConfigServiceV2Client { * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.update_bucket_async.js * region_tag:logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async @@ -3134,8 +3109,7 @@ export class ConfigServiceV2Client { * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.update_bucket_async.js * region_tag:logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async @@ -3189,8 +3163,7 @@ export class ConfigServiceV2Client { * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.create_link.js * region_tag:logging_v2_generated_ConfigServiceV2_CreateLink_async @@ -3285,8 +3258,7 @@ export class ConfigServiceV2Client { * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.create_link.js * region_tag:logging_v2_generated_ConfigServiceV2_CreateLink_async @@ -3333,8 +3305,7 @@ export class ConfigServiceV2Client { * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.delete_link.js * region_tag:logging_v2_generated_ConfigServiceV2_DeleteLink_async @@ -3429,8 +3400,7 @@ export class ConfigServiceV2Client { * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.delete_link.js * region_tag:logging_v2_generated_ConfigServiceV2_DeleteLink_async @@ -3480,8 +3450,7 @@ export class ConfigServiceV2Client { * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.copy_log_entries.js * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async @@ -3572,8 +3541,7 @@ export class ConfigServiceV2Client { * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.copy_log_entries.js * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async @@ -3629,14 +3597,13 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.logging.v2.LogBucket | LogBucket}. + * The first element of the array is Array of {@link protos.google.logging.v2.LogBucket|LogBucket}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listBucketsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listBuckets( @@ -3733,13 +3700,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.logging.v2.LogBucket | LogBucket} on 'data' event. + * An object stream which emits an object representing {@link protos.google.logging.v2.LogBucket|LogBucket} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listBucketsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listBucketsStream( @@ -3793,12 +3759,11 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.logging.v2.LogBucket | LogBucket}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.logging.v2.LogBucket|LogBucket}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.list_buckets.js * region_tag:logging_v2_generated_ConfigServiceV2_ListBuckets_async @@ -3846,14 +3811,13 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.logging.v2.LogView | LogView}. + * The first element of the array is Array of {@link protos.google.logging.v2.LogView|LogView}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listViewsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listViews( @@ -3944,13 +3908,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.logging.v2.LogView | LogView} on 'data' event. + * An object stream which emits an object representing {@link protos.google.logging.v2.LogView|LogView} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listViewsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listViewsStream( @@ -3998,12 +3961,11 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.logging.v2.LogView | LogView}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.logging.v2.LogView|LogView}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.list_views.js * region_tag:logging_v2_generated_ConfigServiceV2_ListViews_async @@ -4053,14 +4015,13 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.logging.v2.LogSink | LogSink}. + * The first element of the array is Array of {@link protos.google.logging.v2.LogSink|LogSink}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listSinksAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listSinks( @@ -4153,13 +4114,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.logging.v2.LogSink | LogSink} on 'data' event. + * An object stream which emits an object representing {@link protos.google.logging.v2.LogSink|LogSink} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listSinksAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listSinksStream( @@ -4209,12 +4169,11 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.logging.v2.LogSink | LogSink}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.logging.v2.LogSink|LogSink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.list_sinks.js * region_tag:logging_v2_generated_ConfigServiceV2_ListSinks_async @@ -4261,14 +4220,13 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.logging.v2.Link | Link}. + * The first element of the array is Array of {@link protos.google.logging.v2.Link|Link}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listLinksAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listLinks( @@ -4358,13 +4316,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.logging.v2.Link | Link} on 'data' event. + * An object stream which emits an object representing {@link protos.google.logging.v2.Link|Link} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listLinksAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listLinksStream( @@ -4411,12 +4368,11 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.logging.v2.Link | Link}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.logging.v2.Link|Link}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.list_links.js * region_tag:logging_v2_generated_ConfigServiceV2_ListLinks_async @@ -4466,14 +4422,13 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.logging.v2.LogExclusion | LogExclusion}. + * The first element of the array is Array of {@link protos.google.logging.v2.LogExclusion|LogExclusion}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listExclusionsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listExclusions( @@ -4566,13 +4521,12 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.logging.v2.LogExclusion | LogExclusion} on 'data' event. + * An object stream which emits an object representing {@link protos.google.logging.v2.LogExclusion|LogExclusion} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listExclusionsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listExclusionsStream( @@ -4622,12 +4576,11 @@ export class ConfigServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.logging.v2.LogExclusion | LogExclusion}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.logging.v2.LogExclusion|LogExclusion}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/config_service_v2.list_exclusions.js * region_tag:logging_v2_generated_ConfigServiceV2_ListExclusions_async diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 7010024f1e9..87ec5d5f4fa 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -515,13 +515,12 @@ export class LoggingServiceV2Client { * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. * * For more information about log names, see - * {@link google.logging.v2.LogEntry|LogEntry}. + * {@link protos.google.logging.v2.LogEntry|LogEntry}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/logging_service_v2.delete_log.js * region_tag:logging_v2_generated_LoggingServiceV2_DeleteLog_async @@ -629,19 +628,19 @@ export class LoggingServiceV2Client { * "labels": { * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} * - * See {@link google.logging.v2.LogEntry|LogEntry}. + * See {@link protos.google.logging.v2.LogEntry|LogEntry}. * @param {number[]} [request.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 {@link google.logging.v2.LogEntry|LogEntry}. + * See {@link protos.google.logging.v2.LogEntry|LogEntry}. * @param {number[]} request.entries * Required. The log entries to send to Logging. The order of log * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding * fields. For more information, see the - * {@link google.logging.v2.LogEntry|LogEntry} type. + * {@link protos.google.logging.v2.LogEntry|LogEntry} type. * * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. @@ -675,9 +674,8 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.WriteLogEntriesResponse | WriteLogEntriesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.WriteLogEntriesResponse|WriteLogEntriesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/logging_service_v2.write_log_entries.js * region_tag:logging_v2_generated_LoggingServiceV2_WriteLogEntries_async @@ -753,10 +751,9 @@ export class LoggingServiceV2Client { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which is both readable and writable. It accepts objects - * representing {@link google.logging.v2.TailLogEntriesRequest | TailLogEntriesRequest} for write() method, and - * will emit objects representing {@link google.logging.v2.TailLogEntriesResponse | TailLogEntriesResponse} on 'data' event asynchronously. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) + * representing {@link protos.google.logging.v2.TailLogEntriesRequest|TailLogEntriesRequest} for write() method, and + * will emit objects representing {@link protos.google.logging.v2.TailLogEntriesResponse|TailLogEntriesResponse} on 'data' event asynchronously. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation } * for more details and examples. * @example include:samples/generated/v2/logging_service_v2.tail_log_entries.js * region_tag:logging_v2_generated_LoggingServiceV2_TailLogEntries_async @@ -818,14 +815,13 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.logging.v2.LogEntry | LogEntry}. + * The first element of the array is Array of {@link protos.google.logging.v2.LogEntry|LogEntry}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listLogEntriesAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listLogEntries( @@ -939,13 +935,12 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.logging.v2.LogEntry | LogEntry} on 'data' event. + * An object stream which emits an object representing {@link protos.google.logging.v2.LogEntry|LogEntry} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listLogEntriesAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listLogEntriesStream( @@ -1016,12 +1011,11 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.logging.v2.LogEntry | LogEntry}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.logging.v2.LogEntry|LogEntry}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/logging_service_v2.list_log_entries.js * region_tag:logging_v2_generated_LoggingServiceV2_ListLogEntries_async @@ -1060,14 +1054,13 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.api.MonitoredResourceDescriptor | MonitoredResourceDescriptor}. + * The first element of the array is Array of {@link protos.google.api.MonitoredResourceDescriptor|MonitoredResourceDescriptor}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listMonitoredResourceDescriptorsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listMonitoredResourceDescriptors( @@ -1161,13 +1154,12 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.api.MonitoredResourceDescriptor | MonitoredResourceDescriptor} on 'data' event. + * An object stream which emits an object representing {@link protos.google.api.MonitoredResourceDescriptor|MonitoredResourceDescriptor} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listMonitoredResourceDescriptorsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listMonitoredResourceDescriptorsStream( @@ -1207,12 +1199,11 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.api.MonitoredResourceDescriptor | MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.api.MonitoredResourceDescriptor|MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js * region_tag:logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async @@ -1282,8 +1273,7 @@ export class LoggingServiceV2Client { * Note that it can affect your quota. * We recommend using `listLogsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listLogs( @@ -1397,8 +1387,7 @@ export class LoggingServiceV2Client { * times as needed. Note that it can affect your quota. * We recommend using `listLogsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listLogsStream( @@ -1464,12 +1453,11 @@ export class LoggingServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * string. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/logging_service_v2.list_logs.js * region_tag:logging_v2_generated_LoggingServiceV2_ListLogs_async diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index b11f519fec9..94306d29cb0 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -454,9 +454,8 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogMetric | LogMetric}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogMetric|LogMetric}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/metrics_service_v2.get_log_metric.js * region_tag:logging_v2_generated_MetricsServiceV2_GetLogMetric_async @@ -544,9 +543,8 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogMetric | LogMetric}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogMetric|LogMetric}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/metrics_service_v2.create_log_metric.js * region_tag:logging_v2_generated_MetricsServiceV2_CreateLogMetric_async @@ -635,9 +633,8 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.logging.v2.LogMetric | LogMetric}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.logging.v2.LogMetric|LogMetric}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/metrics_service_v2.update_log_metric.js * region_tag:logging_v2_generated_MetricsServiceV2_UpdateLogMetric_async @@ -720,9 +717,8 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v2/metrics_service_v2.delete_log_metric.js * region_tag:logging_v2_generated_MetricsServiceV2_DeleteLogMetric_async @@ -815,14 +811,13 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.logging.v2.LogMetric | LogMetric}. + * The first element of the array is Array of {@link protos.google.logging.v2.LogMetric|LogMetric}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listLogMetricsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listLogMetrics( @@ -912,13 +907,12 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.logging.v2.LogMetric | LogMetric} on 'data' event. + * An object stream which emits an object representing {@link protos.google.logging.v2.LogMetric|LogMetric} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listLogMetricsAsync()` * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listLogMetricsStream( @@ -965,12 +959,11 @@ export class MetricsServiceV2Client { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.logging.v2.LogMetric | LogMetric}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.logging.v2.LogMetric|LogMetric}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v2/metrics_service_v2.list_log_metrics.js * region_tag:logging_v2_generated_MetricsServiceV2_ListLogMetrics_async From d5b7ec7010127b59c63f209a78421d32a5d9ab67 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 16 Aug 2023 00:23:08 +0200 Subject: [PATCH 0964/1029] chore(deps): update dependency jsdoc-fresh to v3 (#1445) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ab39ed7a652..016992baf7a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -80,7 +80,7 @@ "gts": "^5.0.0", "http2spy": "^2.0.0", "jsdoc": "^4.0.0", - "jsdoc-fresh": "^2.0.0", + "jsdoc-fresh": "^3.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^5.0.0", "mocha": "^9.2.2", From 222999743c43a5ea70996185728844254075c8bd Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 16 Aug 2023 00:24:04 +0200 Subject: [PATCH 0965/1029] chore(deps): update dependency jsdoc-region-tag to v3 (#1446) Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 016992baf7a..ead2e48855a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -80,8 +80,8 @@ "gts": "^5.0.0", "http2spy": "^2.0.0", "jsdoc": "^4.0.0", + "jsdoc-region-tag": "^3.0.0", "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^2.0.0", "linkinator": "^5.0.0", "mocha": "^9.2.2", "nock": "^13.0.0", From d0a4f97c9f7338a3be6ebf371bd8fe8e51188892 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 14:27:45 -0700 Subject: [PATCH 0966/1029] chore: update release-please post-processing for nodejs apiary (#1447) * chore: update release-please post-processing for nodejs apiary Source-Link: https://github.com/googleapis/synthtool/commit/59fe44fde9866a26e7ee4e4450fd79f67f8cf599 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:606f3d9d99a1c7cdfa7158cbb1a75bfeef490655e246a2052f9ee741740d736c Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- ...logging_service_v2.list_monitored_resource_descriptors.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index a3d003c65a1..d9b4b9749c6 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 -# created: 2023-08-03T18:46:14.719706948Z + digest: sha256:606f3d9d99a1c7cdfa7158cbb1a75bfeef490655e246a2052f9ee741740d736c +# created: 2023-08-17T19:15:55.176034173Z diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js index 2d05df22cce..76cc75e4ba1 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -51,9 +51,8 @@ function main() { const request = {}; // Run request - const iterable = await loggingClient.listMonitoredResourceDescriptorsAsync( - request - ); + const iterable = + await loggingClient.listMonitoredResourceDescriptorsAsync(request); for await (const response of iterable) { console.log(response); } From addf890cc8aece71ca313c54d23d5f54e98fd711 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 23:19:16 -0700 Subject: [PATCH 0967/1029] chore: call non-hermetic functions since we're installing node_modules directly from the library (#1457) * chore: call non-hermetic functions since we're installing node_modules directly from the library Source-Link: https://github.com/googleapis/synthtool/commit/4c4063f8395130957a0d49fcec810a7d0a76cf7b Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:8b6a07a38d1583d96b6e251ba208bd4ef0bc2a0cc37471ffc518841651d15bd6 Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 +- handwritten/logging/protos/protos.d.ts | 540 ++++- handwritten/logging/protos/protos.js | 1999 ++++++++++++++++- handwritten/logging/protos/protos.json | 294 ++- ..._v2.list_monitored_resource_descriptors.js | 5 +- 5 files changed, 2753 insertions(+), 89 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index d9b4b9749c6..807a8916118 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:606f3d9d99a1c7cdfa7158cbb1a75bfeef490655e246a2052f9ee741740d736c -# created: 2023-08-17T19:15:55.176034173Z + digest: sha256:8b6a07a38d1583d96b6e251ba208bd4ef0bc2a0cc37471ffc518841651d15bd6 +# created: 2023-09-25T22:18:27.595486267Z diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 246fc511ae9..b84b491f293 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -760,6 +760,15 @@ export namespace google { /** ExtensionRangeOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); } /** Represents an ExtensionRangeOptions. */ @@ -774,6 +783,15 @@ export namespace google { /** ExtensionRangeOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + /** * Creates a new ExtensionRangeOptions instance using the specified properties. * @param [properties] Properties to set @@ -852,6 +870,136 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + /** Properties of a FieldDescriptorProto. */ interface IFieldDescriptorProto { @@ -1779,6 +1927,9 @@ export namespace google { /** FileOptions rubyPackage */ rubyPackage?: (string|null); + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + /** FileOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -1855,6 +2006,9 @@ export namespace google { /** FileOptions rubyPackage. */ public rubyPackage: string; + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + /** FileOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -1964,6 +2118,9 @@ export namespace google { /** MessageOptions deprecatedLegacyJsonFieldConflicts */ deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -1995,6 +2152,9 @@ export namespace google { /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ public deprecatedLegacyJsonFieldConflicts: boolean; + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + /** MessageOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2106,8 +2266,14 @@ export namespace google { /** FieldOptions retention */ retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - /** FieldOptions target */ - target?: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType|null); + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -2155,8 +2321,14 @@ export namespace google { /** FieldOptions retention. */ public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - /** FieldOptions target. */ - public target: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType); + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2275,11 +2447,117 @@ export namespace google { TARGET_TYPE_SERVICE = 8, TARGET_TYPE_METHOD = 9 } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (string|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: string; + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ interface IOneofOptions { + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + /** OneofOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -2293,6 +2571,9 @@ export namespace google { */ constructor(properties?: google.protobuf.IOneofOptions); + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + /** OneofOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2386,6 +2667,9 @@ export namespace google { /** EnumOptions deprecatedLegacyJsonFieldConflicts */ deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + /** EnumOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -2408,6 +2692,9 @@ export namespace google { /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ public deprecatedLegacyJsonFieldConflicts: boolean; + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + /** EnumOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2495,6 +2782,12 @@ export namespace google { /** EnumValueOptions deprecated */ deprecated?: (boolean|null); + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -2511,6 +2804,12 @@ export namespace google { /** EnumValueOptions deprecated. */ public deprecated: boolean; + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2595,6 +2894,9 @@ export namespace google { /** Properties of a ServiceOptions. */ interface IServiceOptions { + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + /** ServiceOptions deprecated */ deprecated?: (boolean|null); @@ -2617,6 +2919,9 @@ export namespace google { */ constructor(properties?: google.protobuf.IServiceOptions); + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + /** ServiceOptions deprecated. */ public deprecated: boolean; @@ -2710,6 +3015,9 @@ export namespace google { /** MethodOptions idempotencyLevel */ idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -2738,6 +3046,9 @@ export namespace google { /** MethodOptions idempotencyLevel. */ public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + /** MethodOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -3068,6 +3379,186 @@ export namespace google { } } + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet stringFieldValidation */ + stringFieldValidation?: (google.protobuf.FeatureSet.StringFieldValidation|keyof typeof google.protobuf.FeatureSet.StringFieldValidation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet rawFeatures */ + rawFeatures?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet stringFieldValidation. */ + public stringFieldValidation: (google.protobuf.FeatureSet.StringFieldValidation|keyof typeof google.protobuf.FeatureSet.StringFieldValidation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** FeatureSet rawFeatures. */ + public rawFeatures?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** StringFieldValidation enum. */ + enum StringFieldValidation { + STRING_FIELD_VALIDATION_UNKNOWN = 0, + MANDATORY = 1, + HINT = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + /** Properties of a SourceCodeInfo. */ interface ISourceCodeInfo { @@ -14985,6 +15476,9 @@ export namespace google { /** Publishing librarySettings */ librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); } /** Represents a Publishing. */ @@ -15023,6 +15517,9 @@ export namespace google { /** Publishing librarySettings. */ public librarySettings: google.api.IClientLibrarySettings[]; + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + /** * Creates a new Publishing instance using the specified properties. * @param [properties] Properties to set @@ -15603,6 +16100,21 @@ export namespace google { /** DotnetSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); } /** Represents a DotnetSettings. */ @@ -15617,6 +16129,21 @@ export namespace google { /** DotnetSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + /** * Creates a new DotnetSettings instance using the specified properties. * @param [properties] Properties to set @@ -16116,7 +16643,10 @@ export namespace google { CLOUD = 1, ADS = 2, PHOTOS = 3, - STREET_VIEW = 4 + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 } /** ClientLibraryDestination enum. */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index c2f7e5a8219..bbf0583761c 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -2217,6 +2217,9 @@ * @memberof google.protobuf * @interface IExtensionRangeOptions * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification */ /** @@ -2229,6 +2232,7 @@ */ function ExtensionRangeOptions(properties) { this.uninterpretedOption = []; + this.declaration = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2243,6 +2247,30 @@ */ ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + /** * Creates a new ExtensionRangeOptions instance using the specified properties. * @function create @@ -2267,6 +2295,13 @@ ExtensionRangeOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -2310,6 +2345,20 @@ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2354,6 +2403,28 @@ return "uninterpretedOption." + error; } } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } return null; }; @@ -2379,6 +2450,37 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } return message; }; @@ -2395,8 +2497,23 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { + object.declaration = []; object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -2431,6 +2548,316 @@ return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; }; + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + return ExtensionRangeOptions; })(); @@ -4760,6 +5187,7 @@ * @property {string|null} [phpNamespace] FileOptions phpNamespace * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition */ @@ -4941,6 +5369,14 @@ */ FileOptions.prototype.rubyPackage = ""; + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + /** * FileOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -5021,6 +5457,8 @@ writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -5141,6 +5579,10 @@ message.rubyPackage = reader.string(); break; } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -5254,6 +5696,11 @@ if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) if (!$util.isString(message.rubyPackage)) return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -5345,6 +5792,11 @@ message.phpMetadataNamespace = String(object.phpMetadataNamespace); if (object.rubyPackage != null) message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); @@ -5406,6 +5858,7 @@ object.phpGenericServices = false; object.phpMetadataNamespace = ""; object.rubyPackage = ""; + object.features = null; } if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) object.javaPackage = message.javaPackage; @@ -5447,6 +5900,8 @@ object.phpMetadataNamespace = message.phpMetadataNamespace; if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -5516,6 +5971,7 @@ * @property {boolean|null} [deprecated] MessageOptions deprecated * @property {boolean|null} [mapEntry] MessageOptions mapEntry * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ @@ -5576,6 +6032,14 @@ */ MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + /** * MessageOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -5626,6 +6090,8 @@ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -5685,6 +6151,10 @@ message.deprecatedLegacyJsonFieldConflicts = reader.bool(); break; } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -5745,6 +6215,11 @@ if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -5784,6 +6259,11 @@ message.mapEntry = Boolean(object.mapEntry); if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); @@ -5823,6 +6303,7 @@ object.deprecated = false; object.mapEntry = false; object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; object[".google.api.resource"] = null; } if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) @@ -5835,6 +6316,8 @@ object.mapEntry = message.mapEntry; if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -5889,7 +6372,9 @@ * @property {boolean|null} [weak] FieldOptions weak * @property {boolean|null} [debugRedact] FieldOptions debugRedact * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {google.protobuf.FieldOptions.OptionTargetType|null} [target] FieldOptions target + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference @@ -5904,6 +6389,8 @@ * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; this.uninterpretedOption = []; this[".google.api.fieldBehavior"] = []; if (properties) @@ -5985,12 +6472,28 @@ FieldOptions.prototype.retention = 0; /** - * FieldOptions target. - * @member {google.protobuf.FieldOptions.OptionTargetType} target + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype.target = 0; + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; /** * FieldOptions uninterpretedOption. @@ -6058,8 +6561,14 @@ writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 18, wireType 0 =*/144).int32(message.target); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -6141,8 +6650,25 @@ message.retention = reader.int32(); break; } - case 18: { - message.target = reader.int32(); + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 999: { @@ -6246,22 +6772,40 @@ case 2: break; } - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -6381,53 +6925,73 @@ message.retention = 2; break; } - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); } - break; - case "TARGET_TYPE_UNKNOWN": - case 0: - message.target = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.target = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.target = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.target = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.target = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.target = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.target = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.target = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.target = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.target = 9; - break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) @@ -6506,6 +7070,8 @@ options = {}; var object = {}; if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; object.uninterpretedOption = []; object[".google.api.fieldBehavior"] = []; } @@ -6519,7 +7085,7 @@ object.unverifiedLazy = false; object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.target = options.enums === String ? "TARGET_TYPE_UNKNOWN" : 0; + object.features = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -6540,8 +7106,18 @@ object.debugRedact = message.debugRedact; if (message.retention != null && message.hasOwnProperty("retention")) object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.target] === undefined ? message.target : $root.google.protobuf.FieldOptions.OptionTargetType[message.target] : message.target; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -6661,6 +7237,233 @@ return values; })(); + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {string|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {string} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = ""; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.edition); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.edition = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + if (object.edition != null) + message.edition = String(object.edition); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.edition = ""; + object.value = ""; + } + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + return FieldOptions; })(); @@ -6670,6 +7473,7 @@ * Properties of an OneofOptions. * @memberof google.protobuf * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ @@ -6689,6 +7493,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + /** * OneofOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -6721,6 +7533,8 @@ OneofOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -6758,6 +7572,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -6799,6 +7617,11 @@ OneofOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -6823,6 +7646,11 @@ if (object instanceof $root.google.protobuf.OneofOptions) return object; var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); @@ -6851,6 +7679,10 @@ var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -6897,6 +7729,7 @@ * @property {boolean|null} [allowAlias] EnumOptions allowAlias * @property {boolean|null} [deprecated] EnumOptions deprecated * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ @@ -6940,6 +7773,14 @@ */ EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + /** * EnumOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -6978,6 +7819,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -7027,6 +7870,10 @@ message.deprecatedLegacyJsonFieldConflicts = reader.bool(); break; } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -7077,6 +7924,11 @@ if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -7107,6 +7959,11 @@ message.deprecated = Boolean(object.deprecated); if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); @@ -7139,6 +7996,7 @@ object.allowAlias = false; object.deprecated = false; object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; } if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) object.allowAlias = message.allowAlias; @@ -7146,6 +8004,8 @@ object.deprecated = message.deprecated; if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -7190,6 +8050,8 @@ * @memberof google.protobuf * @interface IEnumValueOptions * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -7217,6 +8079,22 @@ */ EnumValueOptions.prototype.deprecated = false; + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -7251,6 +8129,10 @@ writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -7292,6 +8174,14 @@ message.deprecated = reader.bool(); break; } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -7336,6 +8226,14 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -7362,6 +8260,13 @@ var message = new $root.google.protobuf.EnumValueOptions(); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -7390,10 +8295,17 @@ var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) + if (options.defaults) { object.deprecated = false; + object.features = null; + object.debugRedact = false; + } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -7437,6 +8349,7 @@ * Properties of a ServiceOptions. * @memberof google.protobuf * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features * @property {boolean|null} [deprecated] ServiceOptions deprecated * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost @@ -7459,6 +8372,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + /** * ServiceOptions deprecated. * @member {boolean} deprecated @@ -7517,6 +8438,8 @@ writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -7558,6 +8481,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } case 33: { message.deprecated = reader.bool(); break; @@ -7611,6 +8538,11 @@ ServiceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -7644,6 +8576,11 @@ if (object instanceof $root.google.protobuf.ServiceOptions) return object; var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.uninterpretedOption) { @@ -7680,11 +8617,14 @@ object.uninterpretedOption = []; if (options.defaults) { object.deprecated = false; + object.features = null; object[".google.api.defaultHost"] = ""; object[".google.api.oauthScopes"] = ""; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -7734,6 +8674,7 @@ * @interface IMethodOptions * @property {boolean|null} [deprecated] MethodOptions deprecated * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature @@ -7773,6 +8714,14 @@ */ MethodOptions.prototype.idempotencyLevel = 0; + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + /** * MethodOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -7833,6 +8782,8 @@ writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -7885,6 +8836,10 @@ message.idempotencyLevel = reader.int32(); break; } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -7952,6 +8907,11 @@ case 2: break; } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -8015,6 +8975,11 @@ message.idempotencyLevel = 2; break; } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); @@ -8065,6 +9030,7 @@ if (options.defaults) { object.deprecated = false; object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; object[".google.longrunning.operationInfo"] = null; object[".google.api.http"] = null; } @@ -8072,6 +9038,8 @@ object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -8762,6 +9730,607 @@ return UninterpretedOption; })(); + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.StringFieldValidation|null} [stringFieldValidation] FeatureSet stringFieldValidation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + * @property {google.protobuf.IFeatureSet|null} [rawFeatures] FeatureSet rawFeatures + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet stringFieldValidation. + * @member {google.protobuf.FeatureSet.StringFieldValidation} stringFieldValidation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.stringFieldValidation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * FeatureSet rawFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} rawFeatures + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.rawFeatures = null; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.stringFieldValidation != null && Object.hasOwnProperty.call(message, "stringFieldValidation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.stringFieldValidation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + if (message.rawFeatures != null && Object.hasOwnProperty.call(message, "rawFeatures")) + $root.google.protobuf.FeatureSet.encode(message.rawFeatures, writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.stringFieldValidation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + case 999: { + message.rawFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.stringFieldValidation != null && message.hasOwnProperty("stringFieldValidation")) + switch (message.stringFieldValidation) { + default: + return "stringFieldValidation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.rawFeatures != null && message.hasOwnProperty("rawFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.rawFeatures); + if (error) + return "rawFeatures." + error; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.stringFieldValidation) { + default: + if (typeof object.stringFieldValidation === "number") { + message.stringFieldValidation = object.stringFieldValidation; + break; + } + break; + case "STRING_FIELD_VALIDATION_UNKNOWN": + case 0: + message.stringFieldValidation = 0; + break; + case "MANDATORY": + case 1: + message.stringFieldValidation = 1; + break; + case "HINT": + case 2: + message.stringFieldValidation = 2; + break; + case "NONE": + case 3: + message.stringFieldValidation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + if (object.rawFeatures != null) { + if (typeof object.rawFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSet.rawFeatures: object expected"); + message.rawFeatures = $root.google.protobuf.FeatureSet.fromObject(object.rawFeatures); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.stringFieldValidation = options.enums === String ? "STRING_FIELD_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + object.rawFeatures = null; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.stringFieldValidation != null && message.hasOwnProperty("stringFieldValidation")) + object.stringFieldValidation = options.enums === String ? $root.google.protobuf.FeatureSet.StringFieldValidation[message.stringFieldValidation] === undefined ? message.stringFieldValidation : $root.google.protobuf.FeatureSet.StringFieldValidation[message.stringFieldValidation] : message.stringFieldValidation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + if (message.rawFeatures != null && message.hasOwnProperty("rawFeatures")) + object.rawFeatures = $root.google.protobuf.FeatureSet.toObject(message.rawFeatures, options); + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * StringFieldValidation enum. + * @name google.protobuf.FeatureSet.StringFieldValidation + * @enum {number} + * @property {number} STRING_FIELD_VALIDATION_UNKNOWN=0 STRING_FIELD_VALIDATION_UNKNOWN value + * @property {number} MANDATORY=1 MANDATORY value + * @property {number} HINT=2 HINT value + * @property {number} NONE=3 NONE value + */ + FeatureSet.StringFieldValidation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING_FIELD_VALIDATION_UNKNOWN"] = 0; + values[valuesById[1] = "MANDATORY"] = 1; + values[valuesById[2] = "HINT"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + protobuf.SourceCodeInfo = (function() { /** @@ -37608,6 +39177,7 @@ * @property {string|null} [docTagPrefix] Publishing docTagPrefix * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri */ /** @@ -37700,6 +39270,14 @@ */ Publishing.prototype.librarySettings = $util.emptyArray; + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + /** * Creates a new Publishing instance using the specified properties. * @function create @@ -37745,6 +39323,8 @@ if (message.librarySettings != null && message.librarySettings.length) for (var i = 0; i < message.librarySettings.length; ++i) $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); return writer; }; @@ -37821,6 +39401,10 @@ message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); break; } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37896,6 +39480,9 @@ case 2: case 3: case 4: + case 5: + case 6: + case 7: break; } if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { @@ -37907,6 +39494,9 @@ return "librarySettings." + error; } } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; return null; }; @@ -37976,6 +39566,18 @@ case 4: message.organization = 4; break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; } if (object.librarySettings) { if (!Array.isArray(object.librarySettings)) @@ -37987,6 +39589,8 @@ message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); } } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); return message; }; @@ -38015,6 +39619,7 @@ object.githubLabel = ""; object.docTagPrefix = ""; object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; } if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; @@ -38043,6 +39648,8 @@ for (var j = 0; j < message.librarySettings.length; ++j) object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; return object; }; @@ -39205,6 +40812,11 @@ * @memberof google.api * @interface IDotnetSettings * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures */ /** @@ -39216,6 +40828,11 @@ * @param {google.api.IDotnetSettings=} [properties] Properties to set */ function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39230,6 +40847,46 @@ */ DotnetSettings.prototype.common = null; + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + /** * Creates a new DotnetSettings instance using the specified properties. * @function create @@ -39256,6 +40913,21 @@ writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); return writer; }; @@ -39286,7 +40958,7 @@ DotnetSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -39294,6 +40966,70 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -39334,6 +41070,43 @@ if (error) return "common." + error; } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } return null; }; @@ -39354,6 +41127,41 @@ throw TypeError(".google.api.DotnetSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } return message; }; @@ -39370,10 +41178,45 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } if (options.defaults) object.common = null; if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } return object; }; @@ -40351,6 +42194,9 @@ * @property {number} ADS=2 ADS value * @property {number} PHOTOS=3 PHOTOS value * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value */ api.ClientLibraryOrganization = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -40359,6 +42205,9 @@ values[valuesById[2] = "ADS"] = 2; values[valuesById[3] = "PHOTOS"] = 3; values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; return values; })(); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 9cab9b7e72e..e7ee9209edb 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -191,6 +191,25 @@ "rule": "repeated", "type": "UninterpretedOption", "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED" + } } }, "extensions": [ @@ -198,7 +217,45 @@ 1000, 536870911 ] - ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } }, "FieldDescriptorProto": { "fields": { @@ -511,6 +568,10 @@ "type": "string", "id": 45 }, + "features": { + "type": "FeatureSet", + "id": 50 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -573,6 +634,10 @@ "deprecated": true } }, + "features": { + "type": "FeatureSet", + "id": 12 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -667,9 +732,22 @@ "type": "OptionRetention", "id": 17 }, - "target": { + "targets": { + "rule": "repeated", "type": "OptionTargetType", - "id": 18 + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 }, "uninterpretedOption": { "rule": "repeated", @@ -687,6 +765,10 @@ [ 4, 4 + ], + [ + 18, + 18 ] ], "nested": { @@ -724,11 +806,27 @@ "TARGET_TYPE_SERVICE": 8, "TARGET_TYPE_METHOD": 9 } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "string", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + } + } } } }, "OneofOptions": { "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -762,6 +860,10 @@ "deprecated": true } }, + "features": { + "type": "FeatureSet", + "id": 7 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -790,6 +892,17 @@ "default": false } }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -805,6 +918,10 @@ }, "ServiceOptions": { "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, "deprecated": { "type": "bool", "id": 33, @@ -841,6 +958,10 @@ "default": "IDEMPOTENCY_UNKNOWN" } }, + "features": { + "type": "FeatureSet", + "id": 35 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -912,6 +1033,137 @@ } } }, + "FeatureSet": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "2023", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "2023", + "edition_defaults.value": "PACKED" + } + }, + "stringFieldValidation": { + "type": "StringFieldValidation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "2023", + "edition_defaults.value": "MANDATORY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "2023", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "2023", + "edition_defaults.value": "ALLOW" + } + }, + "rawFeatures": { + "type": "FeatureSet", + "id": 999, + "options": { + "targets": "TARGET_TYPE_UNKNOWN" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 9995, + 9999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "StringFieldValidation": { + "values": { + "STRING_FIELD_VALIDATION_UNKNOWN": 0, + "MANDATORY": 1, + "HINT": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, "SourceCodeInfo": { "fields": { "location": { @@ -4891,6 +5143,10 @@ "rule": "repeated", "type": "ClientLibrarySettings", "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 } } }, @@ -4948,6 +5204,31 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 } } }, @@ -5007,7 +5288,10 @@ "CLOUD": 1, "ADS": 2, "PHOTOS": 3, - "STREET_VIEW": 4 + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 } }, "ClientLibraryDestination": { @@ -5288,7 +5572,7 @@ "options": { "cc_enable_arenas": true, "csharp_namespace": "Google.LongRunning", - "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js index 76cc75e4ba1..2d05df22cce 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -51,8 +51,9 @@ function main() { const request = {}; // Run request - const iterable = - await loggingClient.listMonitoredResourceDescriptorsAsync(request); + const iterable = await loggingClient.listMonitoredResourceDescriptorsAsync( + request + ); for await (const response of iterable) { console.log(response); } From 6fa91a5426b6f889276a48f11f357a551375bc89 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 26 Sep 2023 08:38:16 +0200 Subject: [PATCH 0968/1029] chore(deps): update dependency gapic-tools to ^0.2.0 (#1453) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [gapic-tools](https://togithub.com/googleapis/gax-nodejs) | [`^0.1.8` -> `^0.2.0`](https://renovatebot.com/diffs/npm/gapic-tools/0.1.8/0.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/gapic-tools/0.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/gapic-tools/0.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/gapic-tools/0.1.8/0.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/gapic-tools/0.1.8/0.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/gax-nodejs (gapic-tools) ### [`v0.2.0`](https://togithub.com/googleapis/gax-nodejs/releases/tag/gapic-tools-v0.2.0): gapic-tools: v0.2.0 ##### Features - add ESM tools in gax ([#​1459](https://togithub.com/googleapis/gax-nodejs/issues/1459)) ([0fb1cf9](https://togithub.com/googleapis/gax-nodejs/commit/0fb1cf9acd32dc1ae03a33279eca9449a7d3fca7)) ##### Bug Fixes - **deps:** update dependency google-proto-files to v4 ([#​1490](https://togithub.com/googleapis/gax-nodejs/issues/1490)) ([4748c9f](https://togithub.com/googleapis/gax-nodejs/commit/4748c9fc3a8cfe31e5abb3e35a6ee0d9a6f0e560)) - **deps:** update dependency protobufjs-cli to v1.1.2 ([#​1495](https://togithub.com/googleapis/gax-nodejs/issues/1495)) ([762591e](https://togithub.com/googleapis/gax-nodejs/commit/762591ed28801e5311ab737b04185781a41752e6)) - make gapic-tools depend on gax-nodejs ([#​1480](https://togithub.com/googleapis/gax-nodejs/issues/1480)) ([d0f410d](https://togithub.com/googleapis/gax-nodejs/commit/d0f410d2e08f393f2661c8c92568a0b518fddf99)) - release new version of gapic-tools ([#​1483](https://togithub.com/googleapis/gax-nodejs/issues/1483)) ([e4f5482](https://togithub.com/googleapis/gax-nodejs/commit/e4f548254bfce3daa3b02ae81764bb3394fc4f23))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ead2e48855a..a0cc86c7f4a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "bignumber.js": "^9.0.0", "c8": "^8.0.1", "codecov": "^3.6.5", - "gapic-tools": "^0.1.8", + "gapic-tools": "^0.2.0", "gts": "^5.0.0", "http2spy": "^2.0.0", "jsdoc": "^4.0.0", From 9fdedaeddcd12e7820869d1710b43d22eab53ec9 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 11 Oct 2023 16:00:23 +0200 Subject: [PATCH 0969/1029] chore(deps): update dependency sinon to v16 (#1452) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index a0cc86c7f4a..9c2257cb3d5 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -88,7 +88,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.1.3", - "sinon": "^15.0.0", + "sinon": "^16.0.0", "ts-loader": "^9.0.0", "typescript": "^5.1.6", "uglify-js": "^3.13.5", From ba87375f176fbb8c51c19863414ec68b5eacbd9c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 13 Oct 2023 16:08:17 +0200 Subject: [PATCH 0970/1029] chore(deps): update dependency pack-n-play to v2 (#1458) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency pack-n-play to v2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- handwritten/logging/package.json | 2 +- ...logging_service_v2.list_monitored_resource_descriptors.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 9c2257cb3d5..c35b525de95 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -86,7 +86,7 @@ "mocha": "^9.2.2", "nock": "^13.0.0", "null-loader": "^4.0.0", - "pack-n-play": "^1.0.0-2", + "pack-n-play": "^2.0.0", "proxyquire": "^2.1.3", "sinon": "^16.0.0", "ts-loader": "^9.0.0", diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js index 2d05df22cce..76cc75e4ba1 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -51,9 +51,8 @@ function main() { const request = {}; // Run request - const iterable = await loggingClient.listMonitoredResourceDescriptorsAsync( - request - ); + const iterable = + await loggingClient.listMonitoredResourceDescriptorsAsync(request); for await (const response of iterable) { console.log(response); } From 262243d4e4cb46c418ffa2f926fb754e4d6b336d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 09:43:28 -0800 Subject: [PATCH 0971/1029] build: update typescript generator version to publish in dual format (ESM) (#1448) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: simplify logic for HTTP/1.1 REST fallback option For the `fallback` parameter, all values considered as `true` in Boolean context will enable HTTP/1.1 REST fallback, since the other fallback transport, proto over HTTP, is removed from `google-gax` v4. PiperOrigin-RevId: 559812260 Source-Link: https://github.com/googleapis/googleapis/commit/6a6fd29a79fe2846001d90d93e79a19fcc303b85 Source-Link: https://github.com/googleapis/googleapis-gen/commit/56c16657e7a59122b1da94771a9ef40989c282c0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTZjMTY2NTdlN2E1OTEyMmIxZGE5NDc3MWE5ZWY0MDk4OWMyODJjMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * build: update typescript generator version to publish in dual format (ESM) PiperOrigin-RevId: 568643156 Source-Link: https://github.com/googleapis/googleapis/commit/f95afc063e20a0a61e13b186806ac84b49e329cf Source-Link: https://github.com/googleapis/googleapis-gen/commit/bbd2c49d2e423a8ce5cc85627402d512aeefc58b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmJkMmM0OWQyZTQyM2E4Y2U1Y2M4NTYyNzQwMmQ1MTJhZWVmYzU4YiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce Co-authored-by: meredithslota --- handwritten/logging/src/v2/config_service_v2_client.ts | 9 ++++----- handwritten/logging/src/v2/logging_service_v2_client.ts | 9 ++++----- handwritten/logging/src/v2/metrics_service_v2_client.ts | 7 +++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index c903a739e5b..43ac9f7a141 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -93,8 +93,7 @@ export class ConfigServiceV2Client { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you @@ -102,7 +101,7 @@ export class ConfigServiceV2Client { * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new ConfigServiceV2Client({fallback: 'rest'}, gax); + * const client = new ConfigServiceV2Client({fallback: true}, gax); * ``` */ constructor( @@ -168,7 +167,7 @@ export class ConfigServiceV2Client { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -332,7 +331,7 @@ export class ConfigServiceV2Client { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 87ec5d5f4fa..789bcafff30 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -90,8 +90,7 @@ export class LoggingServiceV2Client { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you @@ -99,7 +98,7 @@ export class LoggingServiceV2Client { * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new LoggingServiceV2Client({fallback: 'rest'}, gax); + * const client = new LoggingServiceV2Client({fallback: true}, gax); * ``` */ constructor( @@ -165,7 +164,7 @@ export class LoggingServiceV2Client { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -313,7 +312,7 @@ export class LoggingServiceV2Client { this.descriptors.stream = { tailLogEntries: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.BIDI_STREAMING, - opts.fallback === 'rest' + !!opts.fallback ), }; diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 94306d29cb0..11e4d4fb5f2 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -90,8 +90,7 @@ export class MetricsServiceV2Client { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you @@ -99,7 +98,7 @@ export class MetricsServiceV2Client { * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new MetricsServiceV2Client({fallback: 'rest'}, gax); + * const client = new MetricsServiceV2Client({fallback: true}, gax); * ``` */ constructor( @@ -165,7 +164,7 @@ export class MetricsServiceV2Client { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { From e8bfe068f1a25209f59045b9fdf6e65754dc7abd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 11:15:49 -0800 Subject: [PATCH 0972/1029] chore(nodejs): Add `system-test/fixtures` to `.eslintignore` (#1459) * fix: Add `system-test/fixtures` to `.eslintignore` * refactor: Use `**` Source-Link: https://github.com/googleapis/synthtool/commit/b7858ba70e8acabc89d13558a71dd9318a57034a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:abc68a9bbf4fa808b25fa16d3b11141059dc757dbc34f024744bba36c200b40f Co-authored-by: Owl Bot Co-authored-by: meredithslota --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 807a8916118..40b49d2bf81 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:8b6a07a38d1583d96b6e251ba208bd4ef0bc2a0cc37471ffc518841651d15bd6 -# created: 2023-09-25T22:18:27.595486267Z + digest: sha256:abc68a9bbf4fa808b25fa16d3b11141059dc757dbc34f024744bba36c200b40f +# created: 2023-10-04T20:56:40.710775365Z From 908cfd9b1d85d39fc625b3f9e45746f4722fbbbf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Nov 2023 13:15:42 -0800 Subject: [PATCH 0973/1029] chore: update cloud-rad version to ^0.4.0 (#1467) Source-Link: https://github.com/googleapis/synthtool/commit/1063ef32bfe41b112bade7a2dfad4e84d0058ebd Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:e92044720ab3cb6984a70b0c6001081204375959ba3599ef6c42dd99a7783a67 Co-authored-by: Owl Bot --- handwritten/logging/.github/.OwlBot.lock.yaml | 4 ++-- handwritten/logging/.kokoro/release/docs-devsite.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 40b49d2bf81..638efabfb52 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:abc68a9bbf4fa808b25fa16d3b11141059dc757dbc34f024744bba36c200b40f -# created: 2023-10-04T20:56:40.710775365Z + digest: sha256:e92044720ab3cb6984a70b0c6001081204375959ba3599ef6c42dd99a7783a67 +# created: 2023-11-10T00:24:05.581078808Z diff --git a/handwritten/logging/.kokoro/release/docs-devsite.sh b/handwritten/logging/.kokoro/release/docs-devsite.sh index 3596c1e4cb1..81a89f6c172 100755 --- a/handwritten/logging/.kokoro/release/docs-devsite.sh +++ b/handwritten/logging/.kokoro/release/docs-devsite.sh @@ -25,6 +25,6 @@ if [[ -z "$CREDENTIALS" ]]; then fi npm install -npm install --no-save @google-cloud/cloud-rad@^0.3.7 +npm install --no-save @google-cloud/cloud-rad@^0.4.0 # publish docs to devsite npx @google-cloud/cloud-rad . cloud-rad From 47079bdac688867e274e295fad5b5d9713c142d8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 17:00:20 -0500 Subject: [PATCH 0974/1029] build: update Node.js generator to compile protos (#1469) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: update Node.js generator to compile protos PiperOrigin-RevId: 582493526 Source-Link: https://github.com/googleapis/googleapis/commit/7c4e4b52369c9f6ac3e78f945d36fc833f2280de Source-Link: https://github.com/googleapis/googleapis-gen/commit/368cfb651016d6a93ca6e488cbc34e2d1d9d212c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzY4Y2ZiNjUxMDE2ZDZhOTNjYTZlNDg4Y2JjMzRlMmQxZDlkMjEyYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/logging/type/http_request.proto | 13 +- .../google/logging/type/log_severity.proto | 7 +- handwritten/logging/protos/protos.d.ts | 970 ++--- handwritten/logging/protos/protos.js | 3108 ++++++++--------- handwritten/logging/protos/protos.json | 178 +- 5 files changed, 2139 insertions(+), 2137 deletions(-) diff --git a/handwritten/logging/protos/google/logging/type/http_request.proto b/handwritten/logging/protos/google/logging/type/http_request.proto index fc1afd7dc00..425a09d6e9c 100644 --- a/handwritten/logging/protos/google/logging/type/http_request.proto +++ b/handwritten/logging/protos/google/logging/type/http_request.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,12 @@ // 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. -// syntax = "proto3"; package google.logging.type; import "google/protobuf/duration.proto"; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Logging.Type"; option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype"; @@ -26,6 +24,7 @@ option java_multiple_files = true; option java_outer_classname = "HttpRequestProto"; option java_package = "com.google.logging.type"; option php_namespace = "Google\\Cloud\\Logging\\Type"; +option ruby_package = "Google::Cloud::Logging::Type"; // A common proto for logging HTTP requests. Only contains semantics // defined by the HTTP specification. Product-specific logging @@ -57,16 +56,18 @@ message HttpRequest { string user_agent = 6; // The IP address (IPv4 or IPv6) of the client that issued the HTTP - // request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. + // request. This field can include port information. Examples: + // `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. string remote_ip = 7; // The IP address (IPv4 or IPv6) of the origin server that the request was - // sent to. + // sent to. This field can include port information. Examples: + // `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. string server_ip = 13; // The referer URL of the request, as defined in // [HTTP/1.1 Header Field - // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + // Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36). string referer = 8; // The request processing latency on the server, from the time the request was diff --git a/handwritten/logging/protos/google/logging/type/log_severity.proto b/handwritten/logging/protos/google/logging/type/log_severity.proto index c6fd055a900..6740125811b 100644 --- a/handwritten/logging/protos/google/logging/type/log_severity.proto +++ b/handwritten/logging/protos/google/logging/type/log_severity.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,20 +11,19 @@ // 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. -// syntax = "proto3"; package google.logging.type; -import "google/api/annotations.proto"; - option csharp_namespace = "Google.Cloud.Logging.Type"; option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype"; option java_multiple_files = true; option java_outer_classname = "LogSeverityProto"; option java_package = "com.google.logging.type"; +option objc_class_prefix = "GLOG"; option php_namespace = "Google\\Cloud\\Logging\\Type"; +option ruby_package = "Google::Cloud::Logging::Type"; // The severity of the event described in a log entry, expressed as one of the // standard severity levels listed below. For your reference, the levels are diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index b84b491f293..f8a4183d817 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -14099,1088 +14099,1088 @@ export namespace google { /** Namespace api. */ namespace api { - /** Properties of a Http. */ - interface IHttp { + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** MonitoredResourceDescriptor name */ + name?: (string|null); + + /** MonitoredResourceDescriptor type */ + type?: (string|null); + + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); + + /** MonitoredResourceDescriptor description */ + description?: (string|null); + + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MonitoredResourceDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { /** - * Constructs a new Http. + * Constructs a new MonitoredResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.api.IMonitoredResourceDescriptor); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** MonitoredResourceDescriptor name. */ + public name: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** MonitoredResourceDescriptor type. */ + public type: string; + + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; + + /** MonitoredResourceDescriptor description. */ + public description: string; + + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MonitoredResourceDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); /** - * Creates a new Http instance using the specified properties. + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns MonitoredResourceDescriptor instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; /** - * Verifies a Http message. + * Verifies a MonitoredResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns MonitoredResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Http + * Gets the default type url for MonitoredResourceDescriptor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { - /** HttpRule responseBody */ - responseBody?: (string|null); + /** MonitoredResource type */ + type?: (string|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { /** - * Constructs a new HttpRule. + * Constructs a new MonitoredResource. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; + constructor(properties?: google.api.IMonitoredResource); - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** MonitoredResource type. */ + public type: string; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns MonitoredResource instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; /** - * Verifies a HttpRule message. + * Verifies a MonitoredResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns MonitoredResource */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this MonitoredResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HttpRule + * Gets the default type url for MonitoredResource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { /** - * Constructs a new CustomHttpPattern. + * Constructs a new MonitoredResourceMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.api.IMonitoredResourceMetadata); - /** CustomHttpPattern kind. */ - public kind: string; + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); - /** CustomHttpPattern path. */ - public path: string; + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns MonitoredResourceMetadata instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; /** - * Verifies a CustomHttpPattern message. + * Verifies a MonitoredResourceMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns MonitoredResourceMetadata */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for MonitoredResourceMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - - /** Properties of a MonitoredResourceDescriptor. */ - interface IMonitoredResourceDescriptor { - - /** MonitoredResourceDescriptor name */ - name?: (string|null); + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { - /** MonitoredResourceDescriptor type */ - type?: (string|null); + /** LabelDescriptor key */ + key?: (string|null); - /** MonitoredResourceDescriptor displayName */ - displayName?: (string|null); + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); - /** MonitoredResourceDescriptor description */ + /** LabelDescriptor description */ description?: (string|null); - - /** MonitoredResourceDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - - /** MonitoredResourceDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); } - /** Represents a MonitoredResourceDescriptor. */ - class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new LabelDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceDescriptor); - - /** MonitoredResourceDescriptor name. */ - public name: string; + constructor(properties?: google.api.ILabelDescriptor); - /** MonitoredResourceDescriptor type. */ - public type: string; + /** LabelDescriptor key. */ + public key: string; - /** MonitoredResourceDescriptor displayName. */ - public displayName: string; + /** LabelDescriptor valueType. */ + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); - /** MonitoredResourceDescriptor description. */ + /** LabelDescriptor description. */ public description: string; - /** MonitoredResourceDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** MonitoredResourceDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceDescriptor instance + * @returns LabelDescriptor instance */ - public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceDescriptor + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceDescriptor + * @returns LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a LabelDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceDescriptor + * @returns LabelDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @param message MonitoredResourceDescriptor + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this LabelDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MonitoredResourceDescriptor + * Gets the default type url for LabelDescriptor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MonitoredResource. */ - interface IMonitoredResource { + namespace LabelDescriptor { + + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** MonitoredResource type */ - type?: (string|null); + /** ResourceDescriptor plural */ + plural?: (string|null); - /** MonitoredResource labels */ - labels?: ({ [k: string]: string }|null); + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } - /** Represents a MonitoredResource. */ - class MonitoredResource implements IMonitoredResource { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new MonitoredResource. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResource); + constructor(properties?: google.api.IResourceDescriptor); - /** MonitoredResource type. */ + /** ResourceDescriptor type. */ public type: string; - /** MonitoredResource labels. */ - public labels: { [k: string]: string }; + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResource instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResource + * @returns ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResource + * @returns ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a MonitoredResource message. + * Verifies a ResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResource + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @param message MonitoredResource + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResource to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MonitoredResource + * Gets the default type url for ResourceDescriptor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MonitoredResourceMetadata. */ - interface IMonitoredResourceMetadata { + namespace ResourceDescriptor { - /** MonitoredResourceMetadata systemLabels */ - systemLabels?: (google.protobuf.IStruct|null); + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } - /** MonitoredResourceMetadata userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } - /** Represents a MonitoredResourceMetadata. */ - class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceMetadata); + constructor(properties?: google.api.IResourceReference); - /** MonitoredResourceMetadata systemLabels. */ - public systemLabels?: (google.protobuf.IStruct|null); + /** ResourceReference type. */ + public type: string; - /** MonitoredResourceMetadata userLabels. */ - public userLabels: { [k: string]: string }; + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceMetadata instance + * @returns ResourceReference instance */ - public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceMetadata + * @returns ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceMetadata + * @returns ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a ResourceReference message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceMetadata + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @param message MonitoredResourceMetadata + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MonitoredResourceMetadata + * Gets the default type url for ResourceReference * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { - - /** LabelDescriptor key */ - key?: (string|null); + /** Properties of a Http. */ + interface IHttp { - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** LabelDescriptor description */ - description?: (string|null); + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new LabelDescriptor. + * Constructs a new Http. * @param [properties] Properties to set */ - constructor(properties?: google.api.ILabelDescriptor); - - /** LabelDescriptor key. */ - public key: string; + constructor(properties?: google.api.IHttp); - /** LabelDescriptor valueType. */ - public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** LabelDescriptor description. */ - public description: string; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns LabelDescriptor instance + * @returns Http instance */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LabelDescriptor + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LabelDescriptor + * @returns Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a LabelDescriptor message. + * Verifies a Http message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LabelDescriptor + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LabelDescriptor to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LabelDescriptor + * Gets the default type url for Http * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace LabelDescriptor { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } + /** HttpRule selector */ + selector?: (string|null); - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } + /** HttpRule get */ + get?: (string|null); - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** HttpRule put */ + put?: (string|null); - /** ResourceDescriptor type */ - type?: (string|null); + /** HttpRule post */ + post?: (string|null); - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** HttpRule delete */ + "delete"?: (string|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** HttpRule patch */ + patch?: (string|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** HttpRule body */ + body?: (string|null); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** HttpRule responseBody */ + responseBody?: (string|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); + constructor(properties?: google.api.IHttpRule); - /** ResourceDescriptor type. */ - public type: string; + /** HttpRule selector. */ + public selector: string; - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** HttpRule get. */ + public get?: (string|null); - /** ResourceDescriptor nameField. */ - public nameField: string; + /** HttpRule put. */ + public put?: (string|null); - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** HttpRule post. */ + public post?: (string|null); - /** ResourceDescriptor plural. */ - public plural: string; + /** HttpRule delete. */ + public delete?: (string|null); - /** ResourceDescriptor singular. */ - public singular: string; + /** HttpRule patch. */ + public patch?: (string|null); - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns HttpRule instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceDescriptor + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @returns HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for HttpRule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** ResourceReference type */ - type?: (string|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** ResourceReference childType */ - childType?: (string|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.api.ICustomHttpPattern); - /** ResourceReference type. */ - public type: string; + /** CustomHttpPattern kind. */ + public kind: string; - /** ResourceReference childType. */ - public childType: string; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceReference + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @returns CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for CustomHttpPattern * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index bbf0583761c..6f69f27eda0 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -35456,26 +35456,56 @@ */ var api = {}; - api.Http = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.MonitoredResourceDescriptor = (function() { /** - * Properties of a Http. + * Properties of a MonitoredResourceDescriptor. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage */ /** - * Constructs a new Http. + * Constructs a new MonitoredResourceDescriptor. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function MonitoredResourceDescriptor(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35483,92 +35513,148 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + MonitoredResourceDescriptor.prototype.name = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + MonitoredResourceDescriptor.prototype.type = ""; /** - * Creates a new Http instance using the specified properties. + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.displayName = ""; + + /** + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.description = ""; + + /** + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + MonitoredResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + MonitoredResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: { + message.name = reader.string(); + break; + } case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; } case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + } + case 7: { + message.launchStage = reader.int32(); break; } default: @@ -35580,158 +35666,232 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a MonitoredResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + MonitoredResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); if (error) - return "rules." + error; + return "labels." + error; } } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + MonitoredResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.labels = []; + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this Http to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Http + * Gets the default type url for MonitoredResourceDescriptor * @function getTypeUrl - * @memberof google.api.Http + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MonitoredResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.Http"; + return typeUrlPrefix + "/google.api.MonitoredResourceDescriptor"; }; - return Http; + return MonitoredResourceDescriptor; })(); - api.HttpRule = (function() { + api.MonitoredResource = (function() { /** - * Properties of a HttpRule. + * Properties of a MonitoredResource. * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels */ /** - * Constructs a new HttpRule. + * Constructs a new MonitoredResource. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IMonitoredResource=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function MonitoredResource(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35739,218 +35899,109 @@ } /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource * @instance */ - HttpRule.prototype.post = null; + MonitoredResource.prototype.type = ""; /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource * @instance */ - HttpRule.prototype["delete"] = null; + MonitoredResource.prototype.labels = $util.emptyObject; /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance + * Creates a new MonitoredResource instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance */ - HttpRule.prototype.patch = null; + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); + }; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - HttpRule.prototype.custom = null; + MonitoredResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - HttpRule.prototype.body = ""; + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + * Decodes a MonitoredResource message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { + MonitoredResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.selector = reader.string(); + message.type = reader.string(); break; } case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } default: @@ -35962,255 +36013,147 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a MonitoredResource message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + MonitoredResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MonitoredResource} MonitoredResource */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.MonitoredResource} message MonitoredResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + MonitoredResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this MonitoredResource to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + MonitoredResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpRule + * Gets the default type url for MonitoredResource * @function getTypeUrl - * @memberof google.api.HttpRule + * @memberof google.api.MonitoredResource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MonitoredResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.HttpRule"; + return typeUrlPrefix + "/google.api.MonitoredResource"; }; - return HttpRule; + return MonitoredResource; })(); - api.CustomHttpPattern = (function() { + api.MonitoredResourceMetadata = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a MonitoredResourceMetadata. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new MonitoredResourceMetadata. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36218,89 +36161,109 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - CustomHttpPattern.prototype.kind = ""; + MonitoredResourceMetadata.prototype.systemLabels = null; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - CustomHttpPattern.prototype.path = ""; + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + MonitoredResourceMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + MonitoredResourceMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.kind = reader.string(); + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } case 2: { - message.path = reader.string(); + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.userLabels[key] = value; break; } default: @@ -36312,163 +36275,152 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a MonitoredResourceMetadata message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + MonitoredResourceMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + MonitoredResourceMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for MonitoredResourceMetadata * @function getTypeUrl - * @memberof google.api.CustomHttpPattern + * @memberof google.api.MonitoredResourceMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MonitoredResourceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; + return typeUrlPrefix + "/google.api.MonitoredResourceMetadata"; }; - return CustomHttpPattern; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; + return MonitoredResourceMetadata; })(); - api.MonitoredResourceDescriptor = (function() { + api.LabelDescriptor = (function() { /** - * Properties of a MonitoredResourceDescriptor. + * Properties of a LabelDescriptor. * @memberof google.api - * @interface IMonitoredResourceDescriptor - * @property {string|null} [name] MonitoredResourceDescriptor name - * @property {string|null} [type] MonitoredResourceDescriptor type - * @property {string|null} [displayName] MonitoredResourceDescriptor displayName - * @property {string|null} [description] MonitoredResourceDescriptor description - * @property {Array.|null} [labels] MonitoredResourceDescriptor labels - * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description */ /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new LabelDescriptor. * @memberof google.api - * @classdesc Represents a MonitoredResourceDescriptor. - * @implements IMonitoredResourceDescriptor + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor * @constructor - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @param {google.api.ILabelDescriptor=} [properties] Properties to set */ - function MonitoredResourceDescriptor(properties) { - this.labels = []; + function LabelDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36476,150 +36428,105 @@ } /** - * MonitoredResourceDescriptor name. - * @member {string} name - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.name = ""; - - /** - * MonitoredResourceDescriptor type. - * @member {string} type - * @memberof google.api.MonitoredResourceDescriptor + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor * @instance */ - MonitoredResourceDescriptor.prototype.type = ""; + LabelDescriptor.prototype.key = ""; /** - * MonitoredResourceDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MonitoredResourceDescriptor + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor * @instance */ - MonitoredResourceDescriptor.prototype.displayName = ""; + LabelDescriptor.prototype.valueType = 0; /** - * MonitoredResourceDescriptor description. + * LabelDescriptor description. * @member {string} description - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.description = ""; - - /** - * MonitoredResourceDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; - - /** - * MonitoredResourceDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @instance */ - MonitoredResourceDescriptor.prototype.launchStage = 0; + LabelDescriptor.prototype.description = ""; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance */ - MonitoredResourceDescriptor.create = function create(properties) { - return new MonitoredResourceDescriptor(properties); + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); }; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encode = function encode(message, writer) { + LabelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { + LabelDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { - message.name = reader.string(); - break; - } case 1: { - message.type = reader.string(); + message.key = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.valueType = reader.int32(); break; } case 3: { message.description = reader.string(); break; } - case 4: { - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - } - case 7: { - message.launchStage = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -36629,232 +36536,213 @@ }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a LabelDescriptor message. * @function verify - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceDescriptor.verify = function verify(message) { + LabelDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { default: - return "launchStage: enum value expected"; + return "valueType: enum value expected"; case 0: - case 6: - case 7: case 1: case 2: - case 3: - case 4: - case 5: break; } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.LabelDescriptor} LabelDescriptor */ - MonitoredResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceDescriptor) + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) return object; - var message = new $root.google.api.MonitoredResourceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } - } - switch (object.launchStage) { + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; + if (typeof object.valueType === "number") { + message.valueType = object.valueType; break; } break; - case "LAUNCH_STAGE_UNSPECIFIED": + case "STRING": case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; + message.valueType = 0; break; - case "EARLY_ACCESS": + case "BOOL": case 1: - message.launchStage = 1; + message.valueType = 1; break; - case "ALPHA": + case "INT64": case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; + message.valueType = 2; break; } + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {google.api.LabelDescriptor} message LabelDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceDescriptor.toObject = function toObject(message, options) { + LabelDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.labels = []; if (options.defaults) { - object.type = ""; - object.displayName = ""; + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; object.description = ""; - object.name = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this LabelDescriptor to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @instance * @returns {Object.} JSON object */ - MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + LabelDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MonitoredResourceDescriptor + * Gets the default type url for LabelDescriptor * @function getTypeUrl - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.LabelDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MonitoredResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LabelDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MonitoredResourceDescriptor"; + return typeUrlPrefix + "/google.api.LabelDescriptor"; }; - return MonitoredResourceDescriptor; + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; })(); - api.MonitoredResource = (function() { + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a MonitoredResource. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IMonitoredResource - * @property {string|null} [type] MonitoredResource type - * @property {Object.|null} [labels] MonitoredResource labels + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new MonitoredResource. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a MonitoredResource. - * @implements IMonitoredResource + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function MonitoredResource(properties) { - this.labels = {}; + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36862,81 +36750,135 @@ } /** - * MonitoredResource type. + * ResourceDescriptor type. * @member {string} type - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @instance */ - MonitoredResource.prototype.type = ""; + ResourceDescriptor.prototype.type = ""; /** - * MonitoredResource labels. - * @member {Object.} labels - * @memberof google.api.MonitoredResource + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - MonitoredResource.prototype.labels = $util.emptyObject; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new MonitoredResource instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IMonitoredResource=} [properties] Properties to set - * @returns {google.api.MonitoredResource} MonitoredResource instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - MonitoredResource.create = function create(properties) { - return new MonitoredResource(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -36945,26 +36887,36 @@ break; } case 2: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); break; } default: @@ -36976,147 +36928,271 @@ }; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResource message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResource.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } } return null; }; /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - MonitoredResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResource) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.MonitoredResource(); + var message = new $root.google.api.ResourceDescriptor(); if (object.type != null) message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.MonitoredResource.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } } return message; }; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.MonitoredResource} message MonitoredResource + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResource.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; /** - * Converts this MonitoredResource to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - MonitoredResource.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MonitoredResource + * Gets the default type url for ResourceDescriptor * @function getTypeUrl - * @memberof google.api.MonitoredResource + * @memberof google.api.ResourceDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MonitoredResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MonitoredResource"; + return typeUrlPrefix + "/google.api.ResourceDescriptor"; }; - return MonitoredResource; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; })(); - api.MonitoredResourceMetadata = (function() { + api.ResourceReference = (function() { /** - * Properties of a MonitoredResourceMetadata. + * Properties of a ResourceReference. * @memberof google.api - * @interface IMonitoredResourceMetadata - * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels - * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a MonitoredResourceMetadata. - * @implements IMonitoredResourceMetadata + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function MonitoredResourceMetadata(properties) { - this.userLabels = {}; + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37124,109 +37200,89 @@ } /** - * MonitoredResourceMetadata systemLabels. - * @member {google.protobuf.IStruct|null|undefined} systemLabels - * @memberof google.api.MonitoredResourceMetadata + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - MonitoredResourceMetadata.prototype.systemLabels = null; + ResourceReference.prototype.type = ""; /** - * MonitoredResourceMetadata userLabels. - * @member {Object.} userLabels - * @memberof google.api.MonitoredResourceMetadata + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + ResourceReference.prototype.childType = ""; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - MonitoredResourceMetadata.create = function create(properties) { - return new MonitoredResourceMetadata(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) - $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.type = reader.string(); break; } case 2: { - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.userLabels[key] = value; + message.childType = reader.string(); break; } default: @@ -37238,152 +37294,133 @@ }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceMetadata.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { - var error = $root.google.protobuf.Struct.verify(message.systemLabels); - if (error) - return "systemLabels." + error; - } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.ResourceReference} ResourceReference */ - MonitoredResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceMetadata) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.MonitoredResourceMetadata(); - if (object.systemLabels != null) { - if (typeof object.systemLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); - message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); - } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); - } + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static - * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceMetadata.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) - object.systemLabels = null; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + if (options.defaults) { + object.type = ""; + object.childType = ""; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - MonitoredResourceMetadata.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MonitoredResourceMetadata + * Gets the default type url for ResourceReference * @function getTypeUrl - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.ResourceReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MonitoredResourceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MonitoredResourceMetadata"; + return typeUrlPrefix + "/google.api.ResourceReference"; }; - return MonitoredResourceMetadata; + return ResourceReference; })(); - api.LabelDescriptor = (function() { + api.Http = (function() { /** - * Properties of a LabelDescriptor. + * Properties of a Http. * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new LabelDescriptor. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function LabelDescriptor(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37391,103 +37428,92 @@ } /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.key = ""; - - /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - LabelDescriptor.prototype.valueType = 0; + Http.prototype.rules = $util.emptyArray; /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - LabelDescriptor.prototype.description = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.key = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; } case 2: { - message.valueType = reader.int32(); - break; - } - case 3: { - message.description = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; } default: @@ -37499,213 +37525,158 @@ }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LabelDescriptor message. + * Verifies a Http message. * @function verify - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LabelDescriptor.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.Http} Http */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - default: - if (typeof object.valueType === "number") { - message.valueType = object.valueType; - break; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); } - break; - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; } - if (object.description != null) - message.description = String(object.description); + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LabelDescriptor.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; - object.description = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this LabelDescriptor to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - LabelDescriptor.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LabelDescriptor + * Gets the default type url for Http * @function getTypeUrl - * @memberof google.api.LabelDescriptor + * @memberof google.api.Http * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LabelDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.LabelDescriptor"; + return typeUrlPrefix + "/google.api.Http"; }; - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); - - return LabelDescriptor; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37713,173 +37684,218 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = null; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = null; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = null; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype["delete"] = null; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.patch = null; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + HttpRule.prototype.custom = null; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.selector = reader.string(); break; } case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; } case 3: { - message.nameField = reader.string(); + message.put = reader.string(); break; } case 4: { - message.history = reader.int32(); + message.post = reader.string(); break; } case 5: { - message.plural = reader.string(); + message["delete"] = reader.string(); break; } case 6: { - message.singular = reader.string(); + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); break; } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; } default: @@ -37891,271 +37907,255 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } } return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } } return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for HttpRule * @function getTypeUrl - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; + return typeUrlPrefix + "/google.api.HttpRule"; }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38163,89 +38163,89 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.kind = reader.string(); break; } case 2: { - message.childType = reader.string(); + message.path = reader.string(); break; } default: @@ -38257,111 +38257,111 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for CustomHttpPattern * @function getTypeUrl - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceReference"; + return typeUrlPrefix + "/google.api.CustomHttpPattern"; }; - return ResourceReference; + return CustomHttpPattern; })(); api.CommonLanguageSettings = (function() { diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index e7ee9209edb..c86852bb8b4 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -1357,7 +1357,9 @@ "java_multiple_files": true, "java_outer_classname": "LogSeverityProto", "java_package": "com.google.logging.type", - "php_namespace": "Google\\Cloud\\Logging\\Type" + "php_namespace": "Google\\Cloud\\Logging\\Type", + "ruby_package": "Google::Cloud::Logging::Type", + "objc_class_prefix": "GLOG" }, "nested": { "HttpRequest": { @@ -4749,93 +4751,6 @@ "cc_enable_arenas": true }, "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -5023,6 +4938,93 @@ } } }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, "methodSignature": { "rule": "repeated", "type": "string", From e1168c3ce6a11055e3545efe5cf38cacdc9a0f81 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Thu, 30 Nov 2023 15:08:33 -0800 Subject: [PATCH 0975/1029] chore(.github): Update issues and prs assignee (#1470) Co-authored-by: cindy-peng --- handwritten/logging/.github/blunderbuss.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml index a9d3f44e396..611b99a4879 100644 --- a/handwritten/logging/.github/blunderbuss.yml +++ b/handwritten/logging/.github/blunderbuss.yml @@ -1,4 +1,4 @@ assign_issues: - - googleapis/api-logging-reviewers + - googleapis/api-logging-nodejs-reviewers assign_prs: - - googleapis/api-logging-reviewers + - googleapis/api-logging-nodejs-reviewers From efccbc7e96f2535ac4efe7e0f6835819817faa6c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 10:02:29 -0500 Subject: [PATCH 0976/1029] fix: correct long audio synthesis HTTP binding (#1479) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: correct long audio synthesis HTTP binding docs: Deprecate the custom voice usage field PiperOrigin-RevId: 595119987 Source-Link: https://github.com/googleapis/googleapis/commit/c22f4081fe394091ff2bb35b39b604ebb0e903cb Source-Link: https://github.com/googleapis/googleapis-gen/commit/4e9ca63d2cc7933eb7c383ce8b794fce152ea2fc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGU5Y2E2M2QyY2M3OTMzZWI3YzM4M2NlOGI3OTRmY2UxNTJlYTJmYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- handwritten/logging/.jsdoc.js | 4 ++-- handwritten/logging/protos/protos.d.ts | 2 +- handwritten/logging/protos/protos.js | 2 +- .../generated/v2/config_service_v2.copy_log_entries.js | 2 +- .../samples/generated/v2/config_service_v2.create_bucket.js | 2 +- .../generated/v2/config_service_v2.create_bucket_async.js | 2 +- .../generated/v2/config_service_v2.create_exclusion.js | 2 +- .../samples/generated/v2/config_service_v2.create_link.js | 2 +- .../samples/generated/v2/config_service_v2.create_sink.js | 2 +- .../samples/generated/v2/config_service_v2.create_view.js | 2 +- .../samples/generated/v2/config_service_v2.delete_bucket.js | 2 +- .../generated/v2/config_service_v2.delete_exclusion.js | 2 +- .../samples/generated/v2/config_service_v2.delete_link.js | 2 +- .../samples/generated/v2/config_service_v2.delete_sink.js | 2 +- .../samples/generated/v2/config_service_v2.delete_view.js | 2 +- .../samples/generated/v2/config_service_v2.get_bucket.js | 2 +- .../generated/v2/config_service_v2.get_cmek_settings.js | 2 +- .../samples/generated/v2/config_service_v2.get_exclusion.js | 2 +- .../samples/generated/v2/config_service_v2.get_link.js | 2 +- .../samples/generated/v2/config_service_v2.get_settings.js | 2 +- .../samples/generated/v2/config_service_v2.get_sink.js | 2 +- .../samples/generated/v2/config_service_v2.get_view.js | 2 +- .../samples/generated/v2/config_service_v2.list_buckets.js | 2 +- .../samples/generated/v2/config_service_v2.list_exclusions.js | 2 +- .../samples/generated/v2/config_service_v2.list_links.js | 2 +- .../samples/generated/v2/config_service_v2.list_sinks.js | 2 +- .../samples/generated/v2/config_service_v2.list_views.js | 2 +- .../samples/generated/v2/config_service_v2.undelete_bucket.js | 2 +- .../samples/generated/v2/config_service_v2.update_bucket.js | 2 +- .../generated/v2/config_service_v2.update_bucket_async.js | 2 +- .../generated/v2/config_service_v2.update_cmek_settings.js | 2 +- .../generated/v2/config_service_v2.update_exclusion.js | 2 +- .../samples/generated/v2/config_service_v2.update_settings.js | 2 +- .../samples/generated/v2/config_service_v2.update_sink.js | 2 +- .../samples/generated/v2/config_service_v2.update_view.js | 2 +- .../samples/generated/v2/logging_service_v2.delete_log.js | 2 +- .../generated/v2/logging_service_v2.list_log_entries.js | 2 +- .../samples/generated/v2/logging_service_v2.list_logs.js | 2 +- .../logging_service_v2.list_monitored_resource_descriptors.js | 2 +- .../generated/v2/logging_service_v2.tail_log_entries.js | 2 +- .../generated/v2/logging_service_v2.write_log_entries.js | 2 +- .../generated/v2/metrics_service_v2.create_log_metric.js | 2 +- .../generated/v2/metrics_service_v2.delete_log_metric.js | 2 +- .../samples/generated/v2/metrics_service_v2.get_log_metric.js | 2 +- .../generated/v2/metrics_service_v2.list_log_metrics.js | 2 +- .../generated/v2/metrics_service_v2.update_log_metric.js | 2 +- handwritten/logging/src/v2/config_service_v2_client.ts | 2 +- handwritten/logging/src/v2/index.ts | 2 +- handwritten/logging/src/v2/logging_service_v2_client.ts | 2 +- handwritten/logging/src/v2/metrics_service_v2_client.ts | 2 +- handwritten/logging/system-test/install.ts | 2 +- handwritten/logging/test/gapic_config_service_v2_v2.ts | 2 +- handwritten/logging/test/gapic_logging_service_v2_v2.ts | 2 +- handwritten/logging/test/gapic_metrics_service_v2_v2.ts | 2 +- 54 files changed, 55 insertions(+), 55 deletions(-) diff --git a/handwritten/logging/.jsdoc.js b/handwritten/logging/.jsdoc.js index 9e6e0612f93..1f6bfb79190 100644 --- a/handwritten/logging/.jsdoc.js +++ b/handwritten/logging/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2023 Google LLC', + copyright: 'Copyright 2024 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/logging', diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index f8a4183d817..7a712f6c354 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 6f69f27eda0..6357606d094 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js index a693c0b746e..cea748d5f79 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js index de713cab011..84fd76b4d59 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js index ec1d19ea6f5..9d26cadd5c4 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js index 9087ee25753..a5742a7b24b 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js index 5790763f4bb..31bcbe9b541 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js index 8b699c2ac95..c210d088c8c 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js index a8c4ec42490..f7aa3784891 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js index 83a10ce2a77..7c3e0d3e7de 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js index a4c94d026e3..d0e11e39997 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js index f2205aa3c46..61e21816f2e 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js index fb7bccc7f99..57cd54a80bf 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js index 6147f5a41cd..4c3ac7a4844 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js index f6d55db48e9..1bcf694211d 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js index 6645986459c..39a9c897bfe 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js index 372045600fb..34e779244b5 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js index e580428b6f1..23afd1bbf04 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js index 1cc7ea96f57..2f157e764f2 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js index a386b0cb984..a27ea5ed874 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js index ce79e41baa3..f6851c090f3 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js index b17be4e2104..a6d2011fd12 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js index 4005e49ea2c..a44a08be567 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js index 6b5874eb613..17f59224818 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js index bb4b1478dfe..0c437016980 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js index bfe4cbf45da..89137ca8111 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js index 6a1f9467a0d..4721db37b46 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js index 574c522d193..0d2138d8f45 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js index 8d9f449737e..05cdad75cef 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js index 9176871317f..9f60a26a743 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js index 5cb63f59f9c..90e9a1cf1e6 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js index 2212ee0ec9e..837122b5be6 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js index eb014678d0d..bb78c55d035 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js index a99694ff957..6717f1d8d23 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js index 302cf675829..4bb09342ad3 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js index 3e9cbf3ca35..86720a0075f 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js index 97ebee799ac..f336977c3b8 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js index 76cc75e4ba1..10190de97be 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js index 362fc176f2e..c1a4e1c9e35 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js index 756acc4a57a..ec3cecba66c 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js index adcf5f24d82..21144f293c1 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js index f89a254af13..162f8ab079d 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js index 00656b72779..dde0f30f8f1 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js index 929c1fb86d7..52cf25ea9ec 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js index 1afdc3049fa..f414710dacf 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 43ac9f7a141..0e1541a16bb 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/index.ts b/handwritten/logging/src/v2/index.ts index 75a03763910..2cc712044a0 100644 --- a/handwritten/logging/src/v2/index.ts +++ b/handwritten/logging/src/v2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 789bcafff30..b2e9f62a71f 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 11e4d4fb5f2..904312dc3ce 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index f61fe236476..83b83f332c3 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 82a0b47ebc1..741d1e2042d 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 48adc6e7ef1..cd81094cf81 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index d929a68fcde..45c8ea1c119 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 2856f561e048c566d1ea4368a2f4ef5af9662c1b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 23 Jan 2024 20:31:00 +0100 Subject: [PATCH 0977/1029] chore(deps): update dependency gapic-tools to ^0.3.0 (#1483) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency gapic-tools to ^0.3.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- handwritten/logging/package.json | 2 +- handwritten/logging/protos/protos.d.ts | 280 +++++- handwritten/logging/protos/protos.js | 1083 +++++++++++++++++++++--- handwritten/logging/protos/protos.json | 118 ++- 4 files changed, 1300 insertions(+), 183 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c35b525de95..ab3dc6c18e6 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "bignumber.js": "^9.0.0", "c8": "^8.0.1", "codecov": "^3.6.5", - "gapic-tools": "^0.2.0", + "gapic-tools": "^0.3.0", "gts": "^5.0.0", "http2spy": "^2.0.0", "jsdoc": "^4.0.0", diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 7a712f6c354..1866ef72baf 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -220,6 +220,21 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + /** Properties of a FileDescriptorProto. */ interface IFileDescriptorProto { @@ -260,7 +275,7 @@ export namespace google { syntax?: (string|null); /** FileDescriptorProto edition */ - edition?: (string|null); + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); } /** Represents a FileDescriptorProto. */ @@ -309,7 +324,7 @@ export namespace google { public syntax: string; /** FileDescriptorProto edition. */ - public edition: string; + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); /** * Creates a new FileDescriptorProto instance using the specified properties. @@ -1184,8 +1199,8 @@ export namespace google { /** Label enum. */ enum Label { LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 } } @@ -1897,9 +1912,6 @@ export namespace google { /** FileOptions pyGenericServices */ pyGenericServices?: (boolean|null); - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); - /** FileOptions deprecated */ deprecated?: (boolean|null); @@ -1976,9 +1988,6 @@ export namespace google { /** FileOptions pyGenericServices. */ public pyGenericServices: boolean; - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; - /** FileOptions deprecated. */ public deprecated: boolean; @@ -2452,7 +2461,7 @@ export namespace google { interface IEditionDefault { /** EditionDefault edition */ - edition?: (string|null); + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); /** EditionDefault value */ value?: (string|null); @@ -2468,7 +2477,7 @@ export namespace google { constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); /** EditionDefault edition. */ - public edition: string; + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); /** EditionDefault value. */ public value: string; @@ -3391,17 +3400,14 @@ export namespace google { /** FeatureSet repeatedFieldEncoding */ repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - /** FeatureSet stringFieldValidation */ - stringFieldValidation?: (google.protobuf.FeatureSet.StringFieldValidation|keyof typeof google.protobuf.FeatureSet.StringFieldValidation|null); + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); /** FeatureSet messageEncoding */ messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - - /** FeatureSet rawFeatures */ - rawFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSet. */ @@ -3422,8 +3428,8 @@ export namespace google { /** FeatureSet repeatedFieldEncoding. */ public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - /** FeatureSet stringFieldValidation. */ - public stringFieldValidation: (google.protobuf.FeatureSet.StringFieldValidation|keyof typeof google.protobuf.FeatureSet.StringFieldValidation); + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); /** FeatureSet messageEncoding. */ public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); @@ -3431,9 +3437,6 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - /** FeatureSet rawFeatures. */ - public rawFeatures?: (google.protobuf.IFeatureSet|null); - /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -3536,11 +3539,10 @@ export namespace google { EXPANDED = 2 } - /** StringFieldValidation enum. */ - enum StringFieldValidation { - STRING_FIELD_VALIDATION_UNKNOWN = 0, - MANDATORY = 1, - HINT = 2, + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, NONE = 3 } @@ -3559,6 +3561,221 @@ export namespace google { } } + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a SourceCodeInfo. */ interface ISourceCodeInfo { @@ -14108,7 +14325,8 @@ export namespace google { INPUT_ONLY = 4, IMMUTABLE = 5, UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 } /** Properties of a MonitoredResourceDescriptor. */ @@ -16424,6 +16642,9 @@ export namespace google { /** MethodSettings longRunning */ longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); } /** Represents a MethodSettings. */ @@ -16441,6 +16662,9 @@ export namespace google { /** MethodSettings longRunning. */ public longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + /** * Creates a new MethodSettings instance using the specified properties. * @param [properties] Properties to set diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 6357606d094..619df13cc86 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -513,6 +513,38 @@ return FileDescriptorSet; })(); + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + protobuf.FileDescriptorProto = (function() { /** @@ -531,7 +563,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {string|null} [edition] FileDescriptorProto edition + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition */ /** @@ -654,11 +686,11 @@ /** * FileDescriptorProto edition. - * @member {string} edition + * @member {google.protobuf.Edition} edition * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileDescriptorProto.prototype.edition = ""; + FileDescriptorProto.prototype.edition = 0; /** * Creates a new FileDescriptorProto instance using the specified properties. @@ -716,7 +748,7 @@ if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); return writer; }; @@ -823,8 +855,8 @@ message.syntax = reader.string(); break; } - case 13: { - message.edition = reader.string(); + case 14: { + message.edition = reader.int32(); break; } default: @@ -939,8 +971,22 @@ if (!$util.isString(message.syntax)) return "syntax: string expected"; if (message.edition != null && message.hasOwnProperty("edition")) - if (!$util.isString(message.edition)) - return "edition: string expected"; + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } return null; }; @@ -1033,8 +1079,58 @@ } if (object.syntax != null) message.syntax = String(object.syntax); - if (object.edition != null) - message.edition = String(object.edition); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } return message; }; @@ -1066,7 +1162,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; - object.edition = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1114,7 +1210,7 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = message.edition; + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; }; @@ -3153,8 +3249,8 @@ default: return "label: enum value expected"; case 1: - case 2: case 3: + case 2: break; } if (message.type != null && message.hasOwnProperty("type")) @@ -3234,14 +3330,14 @@ case 1: message.label = 1; break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; case "LABEL_REPEATED": case 3: message.label = 3; break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; } switch (object.type) { default: @@ -3471,14 +3567,14 @@ * @name google.protobuf.FieldDescriptorProto.Label * @enum {number} * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value */ FieldDescriptorProto.Label = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; return values; })(); @@ -5177,7 +5273,6 @@ * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices * @property {boolean|null} [deprecated] FileOptions deprecated * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix @@ -5289,14 +5384,6 @@ */ FileOptions.prototype.pyGenericServices = false; - /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = false; - /** * FileOptions deprecated. * @member {boolean} deprecated @@ -5451,8 +5538,6 @@ writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) @@ -5539,10 +5624,6 @@ message.pyGenericServices = reader.bool(); break; } - case 42: { - message.phpGenericServices = reader.bool(); - break; - } case 23: { message.deprecated = reader.bool(); break; @@ -5666,9 +5747,6 @@ if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) if (typeof message.pyGenericServices !== "boolean") return "pyGenericServices: boolean expected"; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - if (typeof message.phpGenericServices !== "boolean") - return "phpGenericServices: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -5772,8 +5850,6 @@ message.javaGenericServices = Boolean(object.javaGenericServices); if (object.pyGenericServices != null) message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.phpGenericServices != null) - message.phpGenericServices = Boolean(object.phpGenericServices); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.ccEnableArenas != null) @@ -5855,7 +5931,6 @@ object.swiftPrefix = ""; object.phpClassPrefix = ""; object.phpNamespace = ""; - object.phpGenericServices = false; object.phpMetadataNamespace = ""; object.rubyPackage = ""; object.features = null; @@ -5894,8 +5969,6 @@ object.phpClassPrefix = message.phpClassPrefix; if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) object.phpNamespace = message.phpNamespace; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) object.phpMetadataNamespace = message.phpMetadataNamespace; if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) @@ -6830,6 +6903,7 @@ case 5: case 6: case 7: + case 8: break; } } @@ -7046,6 +7120,10 @@ case 7: message[".google.api.fieldBehavior"][i] = 7; break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; } } if (object[".google.api.resourceReference"] != null) { @@ -7243,7 +7321,7 @@ * Properties of an EditionDefault. * @memberof google.protobuf.FieldOptions * @interface IEditionDefault - * @property {string|null} [edition] EditionDefault edition + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition * @property {string|null} [value] EditionDefault value */ @@ -7264,11 +7342,11 @@ /** * EditionDefault edition. - * @member {string} edition + * @member {google.protobuf.Edition} edition * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ - EditionDefault.prototype.edition = ""; + EditionDefault.prototype.edition = 0; /** * EditionDefault value. @@ -7302,10 +7380,10 @@ EditionDefault.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.edition); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); return writer; }; @@ -7340,8 +7418,8 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.edition = reader.string(); + case 3: { + message.edition = reader.int32(); break; } case 2: { @@ -7384,8 +7462,22 @@ if (typeof message !== "object" || message === null) return "object expected"; if (message.edition != null && message.hasOwnProperty("edition")) - if (!$util.isString(message.edition)) - return "edition: string expected"; + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; @@ -7404,8 +7496,58 @@ if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) return object; var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - if (object.edition != null) - message.edition = String(object.edition); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } if (object.value != null) message.value = String(object.value); return message; @@ -7425,13 +7567,13 @@ options = {}; var object = {}; if (options.defaults) { - object.edition = ""; object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = message.edition; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; }; @@ -9739,10 +9881,9 @@ * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.StringFieldValidation|null} [stringFieldValidation] FeatureSet stringFieldValidation + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - * @property {google.protobuf.IFeatureSet|null} [rawFeatures] FeatureSet rawFeatures */ /** @@ -9785,12 +9926,12 @@ FeatureSet.prototype.repeatedFieldEncoding = 0; /** - * FeatureSet stringFieldValidation. - * @member {google.protobuf.FeatureSet.StringFieldValidation} stringFieldValidation + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation * @memberof google.protobuf.FeatureSet * @instance */ - FeatureSet.prototype.stringFieldValidation = 0; + FeatureSet.prototype.utf8Validation = 0; /** * FeatureSet messageEncoding. @@ -9808,14 +9949,6 @@ */ FeatureSet.prototype.jsonFormat = 0; - /** - * FeatureSet rawFeatures. - * @member {google.protobuf.IFeatureSet|null|undefined} rawFeatures - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.rawFeatures = null; - /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -9846,14 +9979,12 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.stringFieldValidation != null && Object.hasOwnProperty.call(message, "stringFieldValidation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.stringFieldValidation); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - if (message.rawFeatures != null && Object.hasOwnProperty.call(message, "rawFeatures")) - $root.google.protobuf.FeatureSet.encode(message.rawFeatures, writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; @@ -9901,7 +10032,7 @@ break; } case 4: { - message.stringFieldValidation = reader.int32(); + message.utf8Validation = reader.int32(); break; } case 5: { @@ -9912,10 +10043,6 @@ message.jsonFormat = reader.int32(); break; } - case 999: { - message.rawFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -9979,12 +10106,11 @@ case 2: break; } - if (message.stringFieldValidation != null && message.hasOwnProperty("stringFieldValidation")) - switch (message.stringFieldValidation) { + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { default: - return "stringFieldValidation: enum value expected"; + return "utf8Validation: enum value expected"; case 0: - case 1: case 2: case 3: break; @@ -10007,11 +10133,6 @@ case 2: break; } - if (message.rawFeatures != null && message.hasOwnProperty("rawFeatures")) { - var error = $root.google.protobuf.FeatureSet.verify(message.rawFeatures); - if (error) - return "rawFeatures." + error; - } return null; }; @@ -10091,28 +10212,24 @@ message.repeatedFieldEncoding = 2; break; } - switch (object.stringFieldValidation) { + switch (object.utf8Validation) { default: - if (typeof object.stringFieldValidation === "number") { - message.stringFieldValidation = object.stringFieldValidation; + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; break; } break; - case "STRING_FIELD_VALIDATION_UNKNOWN": + case "UTF8_VALIDATION_UNKNOWN": case 0: - message.stringFieldValidation = 0; - break; - case "MANDATORY": - case 1: - message.stringFieldValidation = 1; + message.utf8Validation = 0; break; - case "HINT": + case "VERIFY": case 2: - message.stringFieldValidation = 2; + message.utf8Validation = 2; break; case "NONE": case 3: - message.stringFieldValidation = 3; + message.utf8Validation = 3; break; } switch (object.messageEncoding) { @@ -10155,11 +10272,6 @@ message.jsonFormat = 2; break; } - if (object.rawFeatures != null) { - if (typeof object.rawFeatures !== "object") - throw TypeError(".google.protobuf.FeatureSet.rawFeatures: object expected"); - message.rawFeatures = $root.google.protobuf.FeatureSet.fromObject(object.rawFeatures); - } return message; }; @@ -10180,10 +10292,9 @@ object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.stringFieldValidation = options.enums === String ? "STRING_FIELD_VALIDATION_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - object.rawFeatures = null; } if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; @@ -10191,14 +10302,12 @@ object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.stringFieldValidation != null && message.hasOwnProperty("stringFieldValidation")) - object.stringFieldValidation = options.enums === String ? $root.google.protobuf.FeatureSet.StringFieldValidation[message.stringFieldValidation] === undefined ? message.stringFieldValidation : $root.google.protobuf.FeatureSet.StringFieldValidation[message.stringFieldValidation] : message.stringFieldValidation; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - if (message.rawFeatures != null && message.hasOwnProperty("rawFeatures")) - object.rawFeatures = $root.google.protobuf.FeatureSet.toObject(message.rawFeatures, options); return object; }; @@ -10279,19 +10388,17 @@ })(); /** - * StringFieldValidation enum. - * @name google.protobuf.FeatureSet.StringFieldValidation + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation * @enum {number} - * @property {number} STRING_FIELD_VALIDATION_UNKNOWN=0 STRING_FIELD_VALIDATION_UNKNOWN value - * @property {number} MANDATORY=1 MANDATORY value - * @property {number} HINT=2 HINT value + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value * @property {number} NONE=3 NONE value */ - FeatureSet.StringFieldValidation = (function() { + FeatureSet.Utf8Validation = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING_FIELD_VALIDATION_UNKNOWN"] = 0; - values[valuesById[1] = "MANDATORY"] = 1; - values[valuesById[2] = "HINT"] = 2; + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; values[valuesById[3] = "NONE"] = 3; return values; })(); @@ -10331,6 +10438,702 @@ return FeatureSet; })(); + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + protobuf.SourceCodeInfo = (function() { /** @@ -35468,6 +36271,7 @@ * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -35479,6 +36283,7 @@ values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; return values; })(); @@ -41673,6 +42478,7 @@ * @interface IMethodSettings * @property {string|null} [selector] MethodSettings selector * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields */ /** @@ -41684,6 +42490,7 @@ * @param {google.api.IMethodSettings=} [properties] Properties to set */ function MethodSettings(properties) { + this.autoPopulatedFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41706,6 +42513,14 @@ */ MethodSettings.prototype.longRunning = null; + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + /** * Creates a new MethodSettings instance using the specified properties. * @function create @@ -41734,6 +42549,9 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); return writer; }; @@ -41776,6 +42594,12 @@ message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); break; } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -41819,6 +42643,13 @@ if (error) return "longRunning." + error; } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } return null; }; @@ -41841,6 +42672,13 @@ throw TypeError(".google.api.MethodSettings.longRunning: object expected"); message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } return message; }; @@ -41857,6 +42695,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; if (options.defaults) { object.selector = ""; object.longRunning = null; @@ -41865,6 +42705,11 @@ object.selector = message.selector; if (message.longRunning != null && message.hasOwnProperty("longRunning")) object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } return object; }; diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index c86852bb8b4..d5b6c4a6602 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -34,6 +34,21 @@ } } }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, "FileDescriptorProto": { "fields": { "name": { @@ -98,8 +113,8 @@ "id": 12 }, "edition": { - "type": "string", - "id": 13 + "type": "Edition", + "id": 14 } } }, @@ -208,7 +223,8 @@ "type": "VerificationState", "id": 3, "options": { - "default": "UNVERIFIED" + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" } } }, @@ -330,8 +346,8 @@ "Label": { "values": { "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3 + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 } } } @@ -519,13 +535,6 @@ "default": false } }, - "phpGenericServices": { - "type": "bool", - "id": 42, - "options": { - "default": false - } - }, "deprecated": { "type": "bool", "id": 23, @@ -585,6 +594,10 @@ ] ], "reserved": [ + [ + 42, + 42 + ], [ 38, 38 @@ -810,8 +823,8 @@ "EditionDefault": { "fields": { "edition": { - "type": "string", - "id": 1 + "type": "Edition", + "id": 3 }, "value": { "type": "string", @@ -1041,7 +1054,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "2023", + "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } }, @@ -1051,7 +1064,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "2023", + "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } }, @@ -1061,18 +1074,18 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "2023", + "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } }, - "stringFieldValidation": { - "type": "StringFieldValidation", + "utf8Validation": { + "type": "Utf8Validation", "id": 4, "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "2023", - "edition_defaults.value": "MANDATORY" + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" } }, "messageEncoding": { @@ -1081,7 +1094,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "2023", + "edition_defaults.edition": "EDITION_PROTO2", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -1091,16 +1104,9 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "2023", + "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } - }, - "rawFeatures": { - "type": "FeatureSet", - "id": 999, - "options": { - "targets": "TARGET_TYPE_UNKNOWN" - } } }, "extensions": [ @@ -1117,6 +1123,12 @@ 9999 ] ], + "reserved": [ + [ + 999, + 999 + ] + ], "nested": { "FieldPresence": { "values": { @@ -1140,11 +1152,10 @@ "EXPANDED": 2 } }, - "StringFieldValidation": { + "Utf8Validation": { "values": { - "STRING_FIELD_VALIDATION_UNKNOWN": 0, - "MANDATORY": 1, - "HINT": 2, + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, "NONE": 3 } }, @@ -1164,6 +1175,37 @@ } } }, + "FeatureSetDefaults": { + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, "SourceCodeInfo": { "fields": { "location": { @@ -4766,7 +4808,8 @@ "INPUT_ONLY": 4, "IMMUTABLE": 5, "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 } }, "MonitoredResourceDescriptor": { @@ -5259,6 +5302,11 @@ "longRunning": { "type": "LongRunning", "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 } }, "nested": { From 6365318a6afc64bf7088edc0d867f80dfd694e3f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:06:16 +0000 Subject: [PATCH 0978/1029] fix: improve retry logic for streaming API calls (#1484) - [ ] Regenerate this pull request now. build: update typescript generator version to 4.3.0 The streaming API call retry logic has changed, which in some rare cases may require code changes. Please feel free to reach out to us in the issues if you experience new problems with retrying streaming calls after this update. PiperOrigin-RevId: 599622271 Source-Link: https://togithub.com/googleapis/googleapis/commit/6239c217f083277d7a43c8bee55969654c3b2fee Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/da13d8222d3ba33734501999864458640f1405ae Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGExM2Q4MjIyZDNiYTMzNzM0NTAxOTk5ODY0NDU4NjQwZjE0MDVhZSJ9 --- handwritten/logging/src/v2/logging_service_v2_client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index b2e9f62a71f..8eb4873eea0 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -312,7 +312,8 @@ export class LoggingServiceV2Client { this.descriptors.stream = { tailLogEntries: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.BIDI_STREAMING, - !!opts.fallback + !!opts.fallback, + /* gaxStreamingRetries: */ true ), }; From 91120cc2fc69da018320aee3aed011a761a1dbb5 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:51:55 -0800 Subject: [PATCH 0979/1029] chore: create flakybot.yaml to change default issue priority (#1488) * chore: create flakybot.yaml to change default issue priority * add google copyright license * add a new line to the end of yaml * add a new line to the end of yaml --------- Co-authored-by: cindy-peng --- handwritten/logging/.github/flakybot.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 handwritten/logging/.github/flakybot.yaml diff --git a/handwritten/logging/.github/flakybot.yaml b/handwritten/logging/.github/flakybot.yaml new file mode 100644 index 00000000000..78ff93dc6c2 --- /dev/null +++ b/handwritten/logging/.github/flakybot.yaml @@ -0,0 +1,16 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +issuePriority: p2 + From f9a647c523d2e48a798609c121b66ed0518c28d8 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 6 Feb 2024 08:42:18 +0100 Subject: [PATCH 0980/1029] chore(deps): update dependency c8 to v9 (#1480) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [c8](https://togithub.com/bcoe/c8) | [`^8.0.1` -> `^9.0.0`](https://renovatebot.com/diffs/npm/c8/8.0.1/9.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/c8/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/c8/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/c8/8.0.1/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/c8/8.0.1/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
bcoe/c8 (c8) ### [`v9.0.0`](https://togithub.com/bcoe/c8/blob/HEAD/CHANGELOG.md#900-2024-01-03) [Compare Source](https://togithub.com/bcoe/c8/compare/v8.0.1...v9.0.0) ##### ⚠ BREAKING CHANGES - **build:** minimum Node.js version is now 14.14.0 ##### Features - **build:** minimum Node.js version is now 14.14.0 ([2cdc86b](https://togithub.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f)) - **deps:** update foreground-child to promise API ([#​512](https://togithub.com/bcoe/c8/issues/512)) ([b46b640](https://togithub.com/bcoe/c8/commit/b46b6401274488db5b1027a78090257095ae4f72)) - **deps:** use Node.js built in rm ([2cdc86b](https://togithub.com/bcoe/c8/commit/2cdc86bd0ac67ecf0f700212dc5f8a830ff9164f))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ab3dc6c18e6..d5c1bb93eef 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -74,7 +74,7 @@ "@types/sinon": "^10.0.0", "@types/uuid": "^9.0.0", "bignumber.js": "^9.0.0", - "c8": "^8.0.1", + "c8": "^9.0.0", "codecov": "^3.6.5", "gapic-tools": "^0.3.0", "gts": "^5.0.0", From fa56bb00c8c9dcb1c085714577b44e050d8e7433 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 9 Feb 2024 10:16:21 -0800 Subject: [PATCH 0981/1029] build: update gapic-generator-typescript to v4.4.1 (#1489) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Trusted Private Cloud support, use the universeDomain parameter feat: auto populate UUID fields where needed fix: revert changes to streaming retries Use gapic-generator-typescript v4.4.0. PiperOrigin-RevId: 603757799 Source-Link: https://github.com/googleapis/googleapis/commit/1a45bf7393b52407188c82e63101db7dc9c72026 Source-Link: https://github.com/googleapis/googleapis-gen/commit/19ca4b45a53d00cb7bdd94b442b60bd237dfe123 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTljYTRiNDVhNTNkMDBjYjdiZGQ5NGI0NDJiNjBiZDIzN2RmZTEyMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * build: update gapic-generator-typescript to v4.4.1 PiperOrigin-RevId: 604765466 Source-Link: https://github.com/googleapis/googleapis/commit/40203ca1880849480bbff7b8715491060bbccdf1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/07b7f3dad8aa1912d4acdcfd6365bb4236e4b54b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDdiN2YzZGFkOGFhMTkxMmQ0YWNkY2ZkNjM2NWJiNDIzNmU0YjU0YiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> --- .../v2/config_service_v2.list_buckets.js | 2 +- .../v2/config_service_v2.list_exclusions.js | 2 +- .../v2/config_service_v2.list_links.js | 2 +- .../v2/config_service_v2.list_sinks.js | 2 +- .../v2/config_service_v2.list_views.js | 2 +- .../v2/logging_service_v2.list_log_entries.js | 2 +- .../v2/logging_service_v2.list_logs.js | 2 +- ..._v2.list_monitored_resource_descriptors.js | 2 +- .../v2/metrics_service_v2.list_log_metrics.js | 2 +- .../src/v2/config_service_v2_client.ts | 58 +++++++++++++++-- .../src/v2/logging_service_v2_client.ts | 60 +++++++++++++++--- .../src/v2/metrics_service_v2_client.ts | 58 +++++++++++++++-- .../test/gapic_config_service_v2_v2.ts | 62 ++++++++++++++++--- .../test/gapic_logging_service_v2_v2.ts | 62 ++++++++++++++++--- .../test/gapic_metrics_service_v2_v2.ts | 62 ++++++++++++++++--- 15 files changed, 328 insertions(+), 52 deletions(-) diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js index a6d2011fd12..eecf060419f 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js @@ -64,7 +64,7 @@ function main(parent) { }; // Run request - const iterable = await loggingClient.listBucketsAsync(request); + const iterable = loggingClient.listBucketsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js index a44a08be567..213a30bb660 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js @@ -61,7 +61,7 @@ function main(parent) { }; // Run request - const iterable = await loggingClient.listExclusionsAsync(request); + const iterable = loggingClient.listExclusionsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js index 17f59224818..09b94f34333 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js @@ -58,7 +58,7 @@ function main(parent) { }; // Run request - const iterable = await loggingClient.listLinksAsync(request); + const iterable = loggingClient.listLinksAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js index 0c437016980..e48139c6bc0 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js @@ -61,7 +61,7 @@ function main(parent) { }; // Run request - const iterable = await loggingClient.listSinksAsync(request); + const iterable = loggingClient.listSinksAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js index 89137ca8111..c68583702e4 100644 --- a/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js +++ b/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js @@ -58,7 +58,7 @@ function main(parent) { }; // Run request - const iterable = await loggingClient.listViewsAsync(request); + const iterable = loggingClient.listViewsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js index 86720a0075f..1857cae39b7 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js @@ -87,7 +87,7 @@ function main(resourceNames) { }; // Run request - const iterable = await loggingClient.listLogEntriesAsync(request); + const iterable = loggingClient.listLogEntriesAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js index f336977c3b8..688d137a8de 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js @@ -75,7 +75,7 @@ function main(parent) { }; // Run request - const iterable = await loggingClient.listLogsAsync(request); + const iterable = loggingClient.listLogsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js index 10190de97be..60a67502e70 100644 --- a/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js +++ b/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js @@ -52,7 +52,7 @@ function main() { // Run request const iterable = - await loggingClient.listMonitoredResourceDescriptorsAsync(request); + loggingClient.listMonitoredResourceDescriptorsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js index 52cf25ea9ec..4ffff33a1bd 100644 --- a/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js +++ b/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js @@ -58,7 +58,7 @@ function main(parent) { }; // Run request - const iterable = await loggingClient.listLogMetricsAsync(request); + const iterable = loggingClient.listLogMetricsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 0e1541a16bb..8ea15a66004 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -31,6 +31,7 @@ import type { import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); + /** * Client JSON configuration object, loaded from * `src/v2/config_service_v2_client_config.json`. @@ -52,6 +53,8 @@ export class ConfigServiceV2Client { private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; auth: gax.GoogleAuth; descriptors: Descriptors = { page: {}, @@ -110,8 +113,20 @@ export class ConfigServiceV2Client { ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof ConfigServiceV2Client; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + this._universeDomain = + opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + this._servicePath = 'logging.' + this._universeDomain; const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + opts?.servicePath || opts?.apiEndpoint || this._servicePath; this._providedCustomServicePath = !!( opts?.servicePath || opts?.apiEndpoint ); @@ -126,7 +141,7 @@ export class ConfigServiceV2Client { opts.numericEnums = true; // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; } @@ -151,10 +166,10 @@ export class ConfigServiceV2Client { this.auth.useJWTAccessWithScope = true; // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; + this.auth.defaultServicePath = this._servicePath; // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { + if (servicePath === this._servicePath) { this.auth.defaultScopes = staticMembers.scopes; } @@ -558,21 +573,52 @@ export class ConfigServiceV2Client { /** * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'logging.googleapis.com'; } /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'logging.googleapis.com'; } + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + /** * The port for this API service. * @returns {number} The default port for this service. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 8eb4873eea0..b807e9e7809 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -29,6 +29,7 @@ import type { import {Transform, PassThrough} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); + /** * Client JSON configuration object, loaded from * `src/v2/logging_service_v2_client_config.json`. @@ -50,6 +51,8 @@ export class LoggingServiceV2Client { private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; auth: gax.GoogleAuth; descriptors: Descriptors = { page: {}, @@ -107,8 +110,20 @@ export class LoggingServiceV2Client { ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LoggingServiceV2Client; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + this._universeDomain = + opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + this._servicePath = 'logging.' + this._universeDomain; const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + opts?.servicePath || opts?.apiEndpoint || this._servicePath; this._providedCustomServicePath = !!( opts?.servicePath || opts?.apiEndpoint ); @@ -123,7 +138,7 @@ export class LoggingServiceV2Client { opts.numericEnums = true; // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; } @@ -148,10 +163,10 @@ export class LoggingServiceV2Client { this.auth.useJWTAccessWithScope = true; // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; + this.auth.defaultServicePath = this._servicePath; // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { + if (servicePath === this._servicePath) { this.auth.defaultScopes = staticMembers.scopes; } @@ -313,7 +328,7 @@ export class LoggingServiceV2Client { tailLogEntries: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, - /* gaxStreamingRetries: */ true + /* gaxStreamingRetries: */ false ), }; @@ -437,21 +452,52 @@ export class LoggingServiceV2Client { /** * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'logging.googleapis.com'; } /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'logging.googleapis.com'; } + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + /** * The port for this API service. * @returns {number} The default port for this service. diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 904312dc3ce..46899baa34f 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -29,6 +29,7 @@ import type { import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); + /** * Client JSON configuration object, loaded from * `src/v2/metrics_service_v2_client_config.json`. @@ -50,6 +51,8 @@ export class MetricsServiceV2Client { private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; auth: gax.GoogleAuth; descriptors: Descriptors = { page: {}, @@ -107,8 +110,20 @@ export class MetricsServiceV2Client { ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof MetricsServiceV2Client; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + this._universeDomain = + opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + this._servicePath = 'logging.' + this._universeDomain; const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + opts?.servicePath || opts?.apiEndpoint || this._servicePath; this._providedCustomServicePath = !!( opts?.servicePath || opts?.apiEndpoint ); @@ -123,7 +138,7 @@ export class MetricsServiceV2Client { opts.numericEnums = true; // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; } @@ -148,10 +163,10 @@ export class MetricsServiceV2Client { this.auth.useJWTAccessWithScope = true; // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; + this.auth.defaultServicePath = this._servicePath; // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { + if (servicePath === this._servicePath) { this.auth.defaultScopes = staticMembers.scopes; } @@ -384,21 +399,52 @@ export class MetricsServiceV2Client { /** * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'logging.googleapis.com'; } /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'logging.googleapis.com'; } + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + /** * The port for this API service. * @returns {number} The default port for this service. diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 741d1e2042d..86567af3049 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -161,16 +161,62 @@ function stubAsyncIterationCall( describe('v2.ConfigServiceV2Client', () => { describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = - configservicev2Module.v2.ConfigServiceV2Client.servicePath; - assert(servicePath); + it('has apiEndpoint', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'logging.googleapis.com'); }); - it('has apiEndpoint', () => { - const apiEndpoint = - configservicev2Module.v2.ConfigServiceV2Client.apiEndpoint; - assert(apiEndpoint); + it('has universeDomain', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process !== 'undefined' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + configservicev2Module.v2.ConfigServiceV2Client.servicePath; + assert.strictEqual(servicePath, 'logging.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + configservicev2Module.v2.ConfigServiceV2Client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'logging.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + }); + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new configservicev2Module.v2.ConfigServiceV2Client({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); }); it('has port', () => { diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index cd81094cf81..9d7246e8b2f 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -143,16 +143,62 @@ function stubAsyncIterationCall( describe('v2.LoggingServiceV2Client', () => { describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = - loggingservicev2Module.v2.LoggingServiceV2Client.servicePath; - assert(servicePath); + it('has apiEndpoint', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'logging.googleapis.com'); }); - it('has apiEndpoint', () => { - const apiEndpoint = - loggingservicev2Module.v2.LoggingServiceV2Client.apiEndpoint; - assert(apiEndpoint); + it('has universeDomain', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process !== 'undefined' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + loggingservicev2Module.v2.LoggingServiceV2Client.servicePath; + assert.strictEqual(servicePath, 'logging.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + loggingservicev2Module.v2.LoggingServiceV2Client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'logging.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + }); + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new loggingservicev2Module.v2.LoggingServiceV2Client({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); }); it('has port', () => { diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 45c8ea1c119..4124f150581 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -129,16 +129,62 @@ function stubAsyncIterationCall( describe('v2.MetricsServiceV2Client', () => { describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = - metricsservicev2Module.v2.MetricsServiceV2Client.servicePath; - assert(servicePath); + it('has apiEndpoint', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'logging.googleapis.com'); }); - it('has apiEndpoint', () => { - const apiEndpoint = - metricsservicev2Module.v2.MetricsServiceV2Client.apiEndpoint; - assert(apiEndpoint); + it('has universeDomain', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process !== 'undefined' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + metricsservicev2Module.v2.MetricsServiceV2Client.servicePath; + assert.strictEqual(servicePath, 'logging.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + metricsservicev2Module.v2.MetricsServiceV2Client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'logging.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + }); + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new metricsservicev2Module.v2.MetricsServiceV2Client({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); }); it('has port', () => { From 20e1fbdf0970e18f1e8f5f3b2cdb9391a6e263c4 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 2 Mar 2024 11:16:16 +0100 Subject: [PATCH 0982/1029] chore(deps): update dependency gapic-tools to ^0.4.0 (#1494) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [gapic-tools](https://togithub.com/googleapis/gax-nodejs) ([source](https://togithub.com/googleapis/gax-nodejs/tree/HEAD/gapic-tools)) | [`^0.3.0` -> `^0.4.0`](https://renovatebot.com/diffs/npm/gapic-tools/0.3.0/0.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/gapic-tools/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/gapic-tools/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/gapic-tools/0.3.0/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/gapic-tools/0.3.0/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/gax-nodejs (gapic-tools) ### [`v0.4.0`](https://togithub.com/googleapis/gax-nodejs/releases/tag/gapic-tools-v0.4.0): gapic-tools: v0.4.0 [Compare Source](https://togithub.com/googleapis/gax-nodejs/compare/gapic-tools-v0.3.0...gapic-tools-v0.4.0) ##### Features - allow passing --keep-case and --force-number to compileProtos ([#​1561](https://togithub.com/googleapis/gax-nodejs/issues/1561)) ([004d112](https://togithub.com/googleapis/gax-nodejs/commit/004d112445f528a6cb143676e8b397b37137adf3))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d5c1bb93eef..968c317f1cb 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -76,7 +76,7 @@ "bignumber.js": "^9.0.0", "c8": "^9.0.0", "codecov": "^3.6.5", - "gapic-tools": "^0.3.0", + "gapic-tools": "^0.4.0", "gts": "^5.0.0", "http2spy": "^2.0.0", "jsdoc": "^4.0.0", From d10df452915c6b332338c95f729af80dff36f65e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:00:23 -0400 Subject: [PATCH 0983/1029] feat: add several fields to manage state of database encryption update (#1495) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add several fields to manage state of database encryption update PiperOrigin-RevId: 619289281 Source-Link: https://github.com/googleapis/googleapis/commit/3a7c33486ca758b180c6d11dd4705fa9a22e8576 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a8c733062d833d11c5245eda50f5108e0e55324 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../src/v2/config_service_v2_client.ts | 15 +++++--- .../src/v2/logging_service_v2_client.ts | 15 +++++--- .../src/v2/metrics_service_v2_client.ts | 15 +++++--- .../test/gapic_config_service_v2_v2.ts | 34 ++++++++++++++++++- .../test/gapic_logging_service_v2_v2.ts | 34 ++++++++++++++++++- .../test/gapic_metrics_service_v2_v2.ts | 34 ++++++++++++++++++- 6 files changed, 132 insertions(+), 15 deletions(-) diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index 8ea15a66004..de78feb5f19 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -122,8 +122,15 @@ export class ConfigServiceV2Client { 'Please set either universe_domain or universeDomain, but not both.' ); } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; this._universeDomain = - opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; this._servicePath = 'logging.' + this._universeDomain; const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; @@ -175,7 +182,7 @@ export class ConfigServiceV2Client { // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && 'versions' in process) { + if (typeof process === 'object' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { clientHeader.push(`gl-web/${this._gaxModule.version}`); @@ -578,7 +585,7 @@ export class ConfigServiceV2Client { */ static get servicePath() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -596,7 +603,7 @@ export class ConfigServiceV2Client { */ static get apiEndpoint() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index b807e9e7809..8283d3925b6 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -119,8 +119,15 @@ export class LoggingServiceV2Client { 'Please set either universe_domain or universeDomain, but not both.' ); } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; this._universeDomain = - opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; this._servicePath = 'logging.' + this._universeDomain; const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; @@ -172,7 +179,7 @@ export class LoggingServiceV2Client { // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && 'versions' in process) { + if (typeof process === 'object' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { clientHeader.push(`gl-web/${this._gaxModule.version}`); @@ -457,7 +464,7 @@ export class LoggingServiceV2Client { */ static get servicePath() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -475,7 +482,7 @@ export class LoggingServiceV2Client { */ static get apiEndpoint() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index 46899baa34f..aae4b7e3177 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -119,8 +119,15 @@ export class MetricsServiceV2Client { 'Please set either universe_domain or universeDomain, but not both.' ); } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; this._universeDomain = - opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; this._servicePath = 'logging.' + this._universeDomain; const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; @@ -172,7 +179,7 @@ export class MetricsServiceV2Client { // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && 'versions' in process) { + if (typeof process === 'object' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { clientHeader.push(`gl-web/${this._gaxModule.version}`); @@ -404,7 +411,7 @@ export class MetricsServiceV2Client { */ static get servicePath() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -422,7 +429,7 @@ export class MetricsServiceV2Client { */ static get apiEndpoint() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 86567af3049..431eaaa744b 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -174,7 +174,7 @@ describe('v2.ConfigServiceV2Client', () => { }); if ( - typeof process !== 'undefined' && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { it('throws DeprecationWarning if static servicePath is used', () => { @@ -210,6 +210,38 @@ describe('v2.ConfigServiceV2Client', () => { const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'logging.example.com'); }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new configservicev2Module.v2.ConfigServiceV2Client(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new configservicev2Module.v2.ConfigServiceV2Client({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } it('does not allow setting both universeDomain and universe_domain', () => { assert.throws(() => { new configservicev2Module.v2.ConfigServiceV2Client({ diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 9d7246e8b2f..ba8b6519ebd 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -156,7 +156,7 @@ describe('v2.LoggingServiceV2Client', () => { }); if ( - typeof process !== 'undefined' && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { it('throws DeprecationWarning if static servicePath is used', () => { @@ -192,6 +192,38 @@ describe('v2.LoggingServiceV2Client', () => { const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'logging.example.com'); }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new loggingservicev2Module.v2.LoggingServiceV2Client({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } it('does not allow setting both universeDomain and universe_domain', () => { assert.throws(() => { new loggingservicev2Module.v2.LoggingServiceV2Client({ diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index 4124f150581..cc9eba4c0ff 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -142,7 +142,7 @@ describe('v2.MetricsServiceV2Client', () => { }); if ( - typeof process !== 'undefined' && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { it('throws DeprecationWarning if static servicePath is used', () => { @@ -178,6 +178,38 @@ describe('v2.MetricsServiceV2Client', () => { const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'logging.example.com'); }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new metricsservicev2Module.v2.MetricsServiceV2Client({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'logging.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } it('does not allow setting both universeDomain and universe_domain', () => { assert.throws(() => { new metricsservicev2Module.v2.MetricsServiceV2Client({ From dfe17dc536b00395134afd74f47b72180fd30d74 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 25 Apr 2024 22:49:41 +0200 Subject: [PATCH 0984/1029] chore(deps): update dependency supertest to v7 (#1501) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency supertest to v7 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- handwritten/logging/protos/protos.d.ts | 9 +++++ handwritten/logging/protos/protos.js | 53 +++++++++++++++++++++++--- handwritten/logging/protos/protos.json | 26 ++++++++++++- 3 files changed, 82 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 1866ef72baf..c721f107f32 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -2917,6 +2917,9 @@ export namespace google { /** ServiceOptions .google.api.oauthScopes */ ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); } /** Represents a ServiceOptions. */ @@ -15697,6 +15700,9 @@ export namespace google { /** Publishing protoReferenceDocumentationUri */ protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); } /** Represents a Publishing. */ @@ -15738,6 +15744,9 @@ export namespace google { /** Publishing protoReferenceDocumentationUri. */ public protoReferenceDocumentationUri: string; + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + /** * Creates a new Publishing instance using the specified properties. * @param [properties] Properties to set diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index 619df13cc86..e92f57526ce 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -6645,12 +6645,9 @@ if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; @@ -8496,6 +8493,7 @@ * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion */ /** @@ -8554,6 +8552,14 @@ */ ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + /** * Creates a new ServiceOptions instance using the specified properties. * @function create @@ -8589,6 +8595,8 @@ writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); return writer; }; @@ -8645,6 +8653,10 @@ message[".google.api.oauthScopes"] = reader.string(); break; } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8703,6 +8715,9 @@ if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) if (!$util.isString(message[".google.api.oauthScopes"])) return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; return null; }; @@ -8739,6 +8754,8 @@ message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); if (object[".google.api.oauthScopes"] != null) message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); return message; }; @@ -8762,6 +8779,7 @@ object.features = null; object[".google.api.defaultHost"] = ""; object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -8776,6 +8794,8 @@ object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; return object; }; @@ -39983,6 +40003,7 @@ * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization * @property {Array.|null} [librarySettings] Publishing librarySettings * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri */ /** @@ -40083,6 +40104,14 @@ */ Publishing.prototype.protoReferenceDocumentationUri = ""; + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + /** * Creates a new Publishing instance using the specified properties. * @function create @@ -40130,6 +40159,8 @@ $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); return writer; }; @@ -40210,6 +40241,10 @@ message.protoReferenceDocumentationUri = reader.string(); break; } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -40302,6 +40337,9 @@ if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) if (!$util.isString(message.protoReferenceDocumentationUri)) return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; return null; }; @@ -40396,6 +40434,8 @@ } if (object.protoReferenceDocumentationUri != null) message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); return message; }; @@ -40425,6 +40465,7 @@ object.docTagPrefix = ""; object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; } if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; @@ -40455,6 +40496,8 @@ } if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; return object; }; diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index d5b6c4a6602..3861f95af89 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -1118,9 +1118,21 @@ 1001, 1001 ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], [ 9995, 9999 + ], + [ + 10000, + 10000 ] ], "reserved": [ @@ -4797,7 +4809,10 @@ "rule": "repeated", "type": "google.api.FieldBehavior", "id": 1052, - "extend": "google.protobuf.FieldOptions" + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } }, "FieldBehavior": { "values": { @@ -5084,6 +5099,11 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, "CommonLanguageSettings": { "fields": { "referenceDocsUri": { @@ -5192,6 +5212,10 @@ "protoReferenceDocumentationUri": { "type": "string", "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 } } }, From 048223b4d70bc1798d317f063b198369f4cf7130 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 28 May 2024 17:53:05 +0200 Subject: [PATCH 0985/1029] chore(deps): update dependency sinon to v18 (#1504) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 968c317f1cb..36d5fdc943c 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -88,7 +88,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^2.0.0", "proxyquire": "^2.1.3", - "sinon": "^16.0.0", + "sinon": "^18.0.0", "ts-loader": "^9.0.0", "typescript": "^5.1.6", "uglify-js": "^3.13.5", From 52b7886f7e219349836f0234fd95c003c83eefeb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 11:58:30 -0400 Subject: [PATCH 0986/1029] feat: update Nodejs generator to send API versions in headers for GAPICs (#1502) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix!: An existing method `UpdateVehicleLocation` is removed from service `VehicleService` fix!: An existing method `SearchFuzzedVehicles` is removed from service `VehicleService` fix!: An existing message `UpdateVehicleLocationRequest` is removed PiperOrigin-RevId: 631557549 Source-Link: https://github.com/googleapis/googleapis/commit/3d50414a7ff3f0b8ffe8ad7858257396e4f18131 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5ce63d4e636a975175bde2d16c15e70dd5a81ff4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWNlNjNkNGU2MzZhOTc1MTc1YmRlMmQxNmMxNWU3MGRkNWE4MWZmNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: update Nodejs generator to send API versions in headers for GAPICs PiperOrigin-RevId: 634109303 Source-Link: https://github.com/googleapis/googleapis/commit/998ade8d5e34d18df5ce36ce2baefdd57f4da375 Source-Link: https://github.com/googleapis/googleapis-gen/commit/000ca6f00801f65b847e6029cb05111404df21ec Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDAwY2E2ZjAwODAxZjY1Yjg0N2U2MDI5Y2IwNTExMTQwNGRmMjFlYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> --- .../logging/protos/google/logging/type/http_request.proto | 2 +- .../logging/protos/google/logging/type/log_severity.proto | 2 +- handwritten/logging/protos/google/logging/v2/log_entry.proto | 2 +- handwritten/logging/protos/google/logging/v2/logging.proto | 2 +- .../logging/protos/google/logging/v2/logging_config.proto | 2 +- .../logging/protos/google/logging/v2/logging_metrics.proto | 2 +- handwritten/logging/src/v2/logging_service_v2_client.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/handwritten/logging/protos/google/logging/type/http_request.proto b/handwritten/logging/protos/google/logging/type/http_request.proto index 425a09d6e9c..fa2dd64e834 100644 --- a/handwritten/logging/protos/google/logging/type/http_request.proto +++ b/handwritten/logging/protos/google/logging/type/http_request.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/google/logging/type/log_severity.proto b/handwritten/logging/protos/google/logging/type/log_severity.proto index 6740125811b..96ff874688a 100644 --- a/handwritten/logging/protos/google/logging/type/log_severity.proto +++ b/handwritten/logging/protos/google/logging/type/log_severity.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/google/logging/v2/log_entry.proto b/handwritten/logging/protos/google/logging/v2/log_entry.proto index 94c5cdff86c..2404219f6aa 100644 --- a/handwritten/logging/protos/google/logging/v2/log_entry.proto +++ b/handwritten/logging/protos/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/google/logging/v2/logging.proto b/handwritten/logging/protos/google/logging/v2/logging.proto index 92d481eac82..cd686e9ff39 100644 --- a/handwritten/logging/protos/google/logging/v2/logging.proto +++ b/handwritten/logging/protos/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/google/logging/v2/logging_config.proto b/handwritten/logging/protos/google/logging/v2/logging_config.proto index cc7677b1252..d914df1bae5 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_config.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto index 852ba14ce64..a387ef2b4a5 100644 --- a/handwritten/logging/protos/google/logging/v2/logging_metrics.proto +++ b/handwritten/logging/protos/google/logging/v2/logging_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 8283d3925b6..6db7919aa3c 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -335,7 +335,7 @@ export class LoggingServiceV2Client { tailLogEntries: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, - /* gaxStreamingRetries: */ false + !!opts.gaxServerStreamingRetries ), }; From 88daad087bbefdb1a9836358d524018eb1e838b6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 10:03:41 +0800 Subject: [PATCH 0987/1029] chore(main): release 11.1.0 (#1481) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 11.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 14 ++++++++++++++ handwritten/logging/package.json | 2 +- .../v2/snippet_metadata.google.logging.v2.json | 2 +- .../v2/snippet_metadata_google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index e814654f3cf..f66b4767481 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,20 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [11.1.0](https://github.com/googleapis/nodejs-logging/compare/v11.0.0...v11.1.0) (2024-05-29) + + +### Features + +* Add several fields to manage state of database encryption update ([#1495](https://github.com/googleapis/nodejs-logging/issues/1495)) ([4137f7b](https://github.com/googleapis/nodejs-logging/commit/4137f7b276aaf419125de2f913bf0d61afc7cde7)) +* Update Nodejs generator to send API versions in headers for GAPICs ([#1502](https://github.com/googleapis/nodejs-logging/issues/1502)) ([346e646](https://github.com/googleapis/nodejs-logging/commit/346e646367e7e1d6d9456ed4f8ff4a7464eb16a9)) + + +### Bug Fixes + +* Correct long audio synthesis HTTP binding ([#1479](https://github.com/googleapis/nodejs-logging/issues/1479)) ([1f94504](https://github.com/googleapis/nodejs-logging/commit/1f945042478bfc9fba4fb348705f903d05b41821)) +* Improve retry logic for streaming API calls ([#1484](https://github.com/googleapis/nodejs-logging/issues/1484)) ([7e11e11](https://github.com/googleapis/nodejs-logging/commit/7e11e11bcb2c3dd346b589cf01cb75626ff10f4c)) + ## [11.0.0](https://github.com/googleapis/nodejs-logging/compare/v10.5.0...v11.0.0) (2023-08-10) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 36d5fdc943c..c7800952dda 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "11.0.0", + "version": "11.1.0", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 19211967771..251d0b5078a 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "11.0.0", + "version": "11.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json index 19211967771..251d0b5078a 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "11.0.0", + "version": "11.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 6e128bf0931..c3004fba2c0 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '11.0.0'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '11.1.0'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 48b4b25e197d9add542133c92134ea2a6b5370e7 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Mon, 3 Jun 2024 13:53:32 +0800 Subject: [PATCH 0988/1029] feat: Open telemetry integration and span Id fix for nodejs logging library (#1497) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: OpenTelemetry integration * feat: add otel system testing with cloud tracing * Add unit testing for otel context * Add parseOtelContext test * testing entry metadata population * Add system test suites * remove only mocha test keywords * Fix lint errors * fix lint issues * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add span end method in system tests * fix gts check * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Remove comments * move otel packages to peer dependencies * move otel packages to peer dependencies * fix system test * add bitmask for tracesampled flag * fix pack-n-play testing * revert pack-n-play sample configuration * Make otel api as dependency due to low npm version in kokoro infra * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix comments to return value directy --------- Co-authored-by: cindy-peng Co-authored-by: Owl Bot --- handwritten/logging/package.json | 12 +- handwritten/logging/src/entry.ts | 58 +-- handwritten/logging/src/index.ts | 1 + handwritten/logging/src/utils/context.ts | 31 ++ handwritten/logging/system-test/logging.ts | 187 ++++++++- handwritten/logging/test/entry.ts | 173 ++++++++ handwritten/logging/test/utils/context.ts | 449 ++++++++++++++------- 7 files changed, 739 insertions(+), 172 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index c7800952dda..289dacd64af 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -59,7 +59,8 @@ "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", - "uuid": "^9.0.0" + "uuid": "^9.0.0", + "@opentelemetry/api": "^1.7.0" }, "devDependencies": { "@google-cloud/bigquery": "^7.0.0", @@ -93,7 +94,14 @@ "typescript": "^5.1.6", "uglify-js": "^3.13.5", "webpack": "^5.0.0", - "webpack-cli": "^5.0.0" + "webpack-cli": "^5.0.0", + "@opentelemetry/api": "^1.7.0", + "@opentelemetry/sdk-trace-node": "^1.23.0", + "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/semantic-conventions": "^1.23.0", + "@opentelemetry/sdk-trace-base": "^1.23.0", + "@opentelemetry/resources": "^1.23.0", + "@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0" }, "engines": { "node": ">=14.0.0" diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index d374842504f..6916bd6d356 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -30,7 +30,11 @@ import { RawHttpRequest, isRawHttpRequest, } from './utils/http-request'; -import {CloudTraceContext, getOrInjectContext} from './utils/context'; +import { + CloudTraceContext, + getContextFromOtelContext, + getOrInjectContext, +} from './utils/context'; const eventId = new EventId(); @@ -229,16 +233,17 @@ class Entry { const req = this.metadata.httpRequest; if (isRawHttpRequest(req)) { entry.httpRequest = makeHttpRequestData(req); - // Format trace and span - const traceContext = this.extractTraceFromHeaders(projectId); - if (traceContext) { - if (!this.metadata.trace && traceContext.trace) - entry.trace = traceContext.trace; - if (!this.metadata.spanId && traceContext.spanId) - entry.spanId = traceContext.spanId; - if (this.metadata.traceSampled === undefined) - entry.traceSampled = traceContext.traceSampled; - } + } + + // Format trace and span + const traceContext = this.extractTraceContext(projectId); + if (traceContext) { + if (!this.metadata.trace && traceContext.trace) + entry.trace = traceContext.trace; + if (!this.metadata.spanId && traceContext.spanId) + entry.spanId = traceContext.spanId; + if (this.metadata.traceSampled === undefined) + entry.traceSampled = traceContext.traceSampled; } return entry; } @@ -308,26 +313,31 @@ class Entry { const req = meta.httpRequest; if (isRawHttpRequest(req)) { entry.httpRequest = makeHttpRequestData(req); - // Detected trace context from headers if applicable. - const traceContext = this.extractTraceFromHeaders(projectId); - if (traceContext) { - if (!entry[TRACE_KEY] && traceContext.trace) - entry[TRACE_KEY] = traceContext.trace; - if (!entry[SPAN_ID_KEY] && traceContext.spanId) - entry[SPAN_ID_KEY] = traceContext.spanId; - if (entry[TRACE_SAMPLED_KEY] === undefined) - entry[TRACE_SAMPLED_KEY] = traceContext.traceSampled; - } + } + + // Detected trace context from OpenTelemetry context or http headers if applicable. + const traceContext = this.extractTraceContext(projectId); + if (traceContext) { + if (!entry[TRACE_KEY] && traceContext.trace) + entry[TRACE_KEY] = traceContext.trace; + if (!entry[SPAN_ID_KEY] && traceContext.spanId) + entry[SPAN_ID_KEY] = traceContext.spanId; + if (entry[TRACE_SAMPLED_KEY] === undefined) + entry[TRACE_SAMPLED_KEY] = traceContext.traceSampled; } return entry; } /** - * extractTraceFromHeaders extracts trace and span information from raw HTTP - * request headers only. + * extractTraceContext extracts trace and span information from OpenTelemetry + * span context or raw HTTP request headers. * @private */ - private extractTraceFromHeaders(projectId: string): CloudTraceContext | null { + private extractTraceContext(projectId: string): CloudTraceContext | null { + // Extract trace context from OpenTelemetry span context. + const otelContext = getContextFromOtelContext(projectId); + if (otelContext) return otelContext; + // Extract trace context from http request headers. const rawReq = this.metadata.httpRequest; if (rawReq && 'headers' in rawReq) { return getOrInjectContext(rawReq, projectId, false); diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 23b5d3ae1d5..69241f40192 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -1604,3 +1604,4 @@ module.exports.v2 = v2; import * as protos from '../protos/protos'; export {protos}; export {v2}; +export * from '@opentelemetry/api'; diff --git a/handwritten/logging/src/utils/context.ts b/handwritten/logging/src/utils/context.ts index 02352c0365c..a48a655067e 100644 --- a/handwritten/logging/src/utils/context.ts +++ b/handwritten/logging/src/utils/context.ts @@ -30,6 +30,7 @@ import * as http from 'http'; import * as uuid from 'uuid'; import * as crypto from 'crypto'; +import {trace, isSpanContextValid} from '@opentelemetry/api'; /** Header that carries span context across Google infrastructure. */ export const X_CLOUD_TRACE_HEADER = 'x-cloud-trace-context'; @@ -98,7 +99,13 @@ export function getOrInjectContext( inject?: boolean ): CloudTraceContext { const defaultContext = toCloudTraceContext({}, projectId); + + // Get trace context from OpenTelemetry span context. + const otelContext = getContextFromOtelContext(projectId); + if (otelContext) return otelContext; + const wrapper = makeHeaderWrapper(req); + if (wrapper) { // Detect 'traceparent' header. const traceContext = getContextFromTraceParent(wrapper, projectId); @@ -149,6 +156,30 @@ function makeCloudTraceHeader(): string { return `${trace}/${spanId}`; } +/** + * getContextFromOtelContext looks for the active open telemetry span context + * per Open Telemetry specifications for tracing contexts. + * + * @param projectId + */ +export function getContextFromOtelContext( + projectId: string +): CloudTraceContext | null { + const spanContext = trace.getActiveSpan()?.spanContext(); + const FLAG_SAMPLED = 1; // 00000001 + if (spanContext !== undefined && isSpanContextValid(spanContext)) { + const otelSpanContext = { + trace: spanContext?.traceId, + spanId: spanContext?.spanId, + traceSampled: (spanContext.traceFlags & FLAG_SAMPLED) !== 0, + }; + + return toCloudTraceContext(otelSpanContext, projectId); + } + + return null; +} + /** * getContextFromXCloudTrace looks for the HTTP header 'x-cloud-trace-context' * per Google Cloud specifications for Cloud Tracing. diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 96d778850b1..19dddaeae58 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -29,8 +29,11 @@ const http2spy = require('http2spy'); import {Logging, Sink, Log, Entry, TailEntriesResponse} from '../src'; import * as http from 'http'; import * as instrumentation from '../src/utils/instrumentation'; - -// block all attempts to chat with the metadata server (kokoro runs on GCE) +import {trace} from '@opentelemetry/api'; +import {Resource} from '@opentelemetry/resources'; +import {SEMRESATTRS_SERVICE_NAME} from '@opentelemetry/semantic-conventions'; +import {TraceExporter} from '@google-cloud/opentelemetry-cloud-trace-exporter'; +import {NodeSDK} from '@opentelemetry/sdk-node'; nock(HOST_ADDRESS) .get(() => true) .replyWithError({code: 'ENOTFOUND'}) @@ -270,8 +273,8 @@ describe('Logging', () => { }); describe('logs', () => { - function getTestLog(loggingInstnce = null) { - const log = (loggingInstnce || logging).log(generateName()); + function getTestLog(loggingInstance = null) { + const log = (loggingInstance || logging).log(generateName()); const logEntries = [ // string data @@ -733,15 +736,185 @@ describe('Logging', () => { }); }); + describe('logs with open telemetry context', () => { + let sdk: NodeSDK; + before(() => { + // initialize the SDK and register with the OpenTelemetry API + // this enables the API to record telemetry + sdk = new NodeSDK({ + resource: new Resource({ + [SEMRESATTRS_SERVICE_NAME]: TESTS_PREFIX, + }), + // Add cloud trace exporter as SDK trace exporter + traceExporter: new TraceExporter(), + }); + sdk.start(); + }); + + after(() => { + sdk.shutdown(); + }); + + it('should not overwrite user defined trace and spans with OpenTelemetry context', done => { + trace.getTracer(TESTS_PREFIX).startActiveSpan('foo', span => { + const {log} = getTestLog(); + const spanTestMessage = 'span test log message'; + const metadata = { + trace: '1', + spanId: '1', + traceSampled: false, + }; + const logEntry = log.entry(metadata, spanTestMessage); + log.write(logEntry, err => { + assert.ifError(err); + getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { + assert.ifError(err); + const entry = entries![0]; + assert.strictEqual(entry.data, spanTestMessage); + assert.strictEqual(entry.metadata.trace, metadata.trace); + assert.strictEqual(entry.metadata.spanId, metadata.spanId); + assert.strictEqual( + entry.metadata.traceSampled, + metadata.traceSampled + ); + }); + }); + span.end(); + }); + done(); + }); + + it('should write a log with trace and spans from OpenTelemetry context', done => { + trace.getTracer(TESTS_PREFIX).startActiveSpan('foo', span => { + const traceId = span.spanContext().traceId; + const spanId = span.spanContext().spanId; + const traceSampled = (span.spanContext().traceFlags & 1) !== 0; + const {log} = getTestLog(); + const spanTestMessage = 'span test log message'; + const logEntry = log.entry(spanTestMessage); + log.write(logEntry, err => { + assert.ifError(err); + getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { + assert.ifError(err); + const entry = entries![0]; + assert.strictEqual(entry.data, spanTestMessage); + assert.strictEqual( + entry.metadata.trace, + `projects/${PROJECT_ID}/traces/${traceId}` + ); + assert.strictEqual(entry.metadata.spanId, spanId); + assert.strictEqual(entry.metadata.traceSampled, traceSampled); + }); + }); + span.end(); + }); + done(); + }); + + it('should write a log with OpenTelemetry trace and spans and ignore http requests traceparent header', done => { + const {log} = getTestLog(); + const URL = 'http://www.google.com'; + trace.getTracer(TESTS_PREFIX).startActiveSpan('foo', span => { + // Use the response of a http request as the incomingmessage request obj. + http.get(URL, res => { + res.url = URL; + res.headers = { + traceparent: + '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', + }; + const metadata = {httpRequest: res}; + const logEntry = log.entry(metadata, 'some log message'); + + const traceId = span.spanContext().traceId; + const spanId = span.spanContext().spanId; + const traceSampled = (span.spanContext().traceFlags & 1) !== 0; + + log.write(logEntry, err => { + assert.ifError(err); + getEntriesFromLog( + log, + {numExpectedMessages: 1}, + (err, entries) => { + assert.ifError(err); + const entry = entries![0]; + assert.strictEqual(entry.data, 'some log message'); + assert.strictEqual( + entry.metadata.httpRequest?.requestUrl, + URL + ); + assert.strictEqual( + entry.metadata.httpRequest?.protocol, + 'http:' + ); + assert.strictEqual( + entry.metadata.trace, + `projects/${PROJECT_ID}/traces/${traceId}` + ); + assert.strictEqual(entry.metadata.spanId, spanId); + assert.strictEqual(entry.metadata.traceSampled, traceSampled); + } + ); + }); + }); + span.end(); + }); + done(); + }); + + it('should write a log with OpenTelemetry trace and spans and ignore http requests x-cloud-trace-context header', done => { + const {log} = getTestLog(); + const URL = 'http://www.google.com'; + trace.getTracer(TESTS_PREFIX).startActiveSpan('foo', span => { + // Use the response of a http request as the incomingmessage request obj. + http.get(URL, res => { + res.url = URL; + res.headers = { + 'x-cloud-trace-context': '1/2;o=1', + }; + const metadata = {httpRequest: res}; + const logEntry = log.entry(metadata, 'some log message'); + const traceId = span.spanContext().traceId; + const spanId = span.spanContext().spanId; + const traceSampled = (span.spanContext().traceFlags & 1) !== 0; + log.write(logEntry, err => { + assert.ifError(err); + getEntriesFromLog( + log, + {numExpectedMessages: 1}, + (err, entries) => { + assert.ifError(err); + const entry = entries![0]; + assert.strictEqual(entry.data, 'some log message'); + assert.strictEqual( + entry.metadata.httpRequest?.requestUrl, + URL + ); + assert.strictEqual( + entry.metadata.httpRequest?.protocol, + 'http:' + ); + assert.strictEqual( + entry.metadata.trace, + `projects/${PROJECT_ID}/traces/${traceId}` + ); + assert.strictEqual(entry.metadata.spanId, spanId); + assert.strictEqual(entry.metadata.traceSampled, traceSampled); + } + ); + }); + }); + span.end(); + }); + done(); + }); + }); + it('should set the default resource', done => { const {log} = getTestLog(); - const text = 'entry-text'; const entry = log.entry(text); - log.write(entry, err => { assert.ifError(err); - getEntriesFromLog(log, {numExpectedMessages: 1}, (err, entries) => { assert.ifError(err); const entry = entries![0]; diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 0fd86e58849..72386adc60d 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -19,6 +19,11 @@ import * as proxyquire from 'proxyquire'; import * as entryTypes from '../src/entry'; import * as common from '../src/utils/common'; import * as http from 'http'; +import {InMemorySpanExporter} from '@opentelemetry/sdk-trace-base'; +import {trace} from '@opentelemetry/api'; +import {Resource} from '@opentelemetry/resources'; +import {SEMRESATTRS_SERVICE_NAME} from '@opentelemetry/semantic-conventions'; +import {NodeSDK} from '@opentelemetry/sdk-node'; let fakeEventIdNewOverride: Function | null; @@ -305,6 +310,86 @@ describe('Entry', () => { assert.strictEqual(json.spanId, expected.spanId); assert.strictEqual(json.traceSampled, expected.traceSampled); }); + + describe('toJSONWithOtel', () => { + let sdk: NodeSDK; + before(() => { + sdk = new NodeSDK({ + resource: new Resource({ + [SEMRESATTRS_SERVICE_NAME]: 'nodejs-logging-entry-test', + }), + traceExporter: new InMemorySpanExporter(), + }); + + sdk.start(); + }); + + after(() => { + sdk.shutdown(); + }); + + it('should detect open telemetry trace and span if open telemetry context present', () => { + trace + .getTracer('nodejs-logging-context-test') + .startActiveSpan('foo', span => { + const json = entry.toJSON(); + assert.strictEqual( + json.trace, + `projects//traces/${span.spanContext().traceId}` + ); + assert.strictEqual(json.spanId, span.spanContext().spanId); + assert.strictEqual( + json.traceSampled, + (span.spanContext().traceFlags & 1) !== 0 + ); + }); + }); + + it('should detect open telemetry trace and span if open telemetry context and headers present', () => { + trace + .getTracer('nodejs-logging-context-test') + .startActiveSpan('foo', span => { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + // To mock http message.headers, we must use lowercased keys. + req.headers = { + 'x-cloud-trace-context': '0000/1111;o=1', + }; + entry.metadata.httpRequest = req; + const json = entry.toJSON(); + assert.strictEqual( + json.trace, + `projects//traces/${span.spanContext().traceId}` + ); + assert.strictEqual(json.spanId, span.spanContext().spanId); + assert.strictEqual( + json.traceSampled, + (span.spanContext().traceFlags & 1) !== 0 + ); + }); + }); + + it('should not overwrite user defined trace and span when open telemetry context detected', () => { + trace + .getTracer('nodejs-logging-context-test') + .startActiveSpan('foo', span => { + entry.metadata.spanId = '1'; + entry.metadata.trace = '1'; + entry.metadata.traceSampled = false; + const expected = { + trace: '1', + spanId: '1', + traceSampled: false, + }; + + const json = entry.toJSON(); + assert.strictEqual(json.trace, expected.trace); + assert.strictEqual(json.spanId, expected.spanId); + assert.strictEqual(json.traceSampled, expected.traceSampled); + }); + }); + }); }); describe('toStructuredJSON', () => { @@ -403,5 +488,93 @@ describe('Entry', () => { json = entry.toStructuredJSON(undefined, false); assert((json.message = 'test')); }); + + describe('toStructuredJSONWithOtel', () => { + let sdk: NodeSDK; + before(() => { + sdk = new NodeSDK({ + resource: new Resource({ + [SEMRESATTRS_SERVICE_NAME]: 'nodejs-logging-entry-test', + }), + traceExporter: new InMemorySpanExporter(), + }); + + sdk.start(); + }); + + after(() => { + sdk.shutdown(); + }); + + it('should detect open telemetry trace and span if open telemetry context present', () => { + trace + .getTracer('nodejs-logging-context-test') + .startActiveSpan('foo', span => { + const json = entry.toStructuredJSON(); + assert.strictEqual( + json[entryTypes.TRACE_KEY], + `projects//traces/${span.spanContext().traceId}` + ); + assert.strictEqual( + json[entryTypes.SPAN_ID_KEY], + span.spanContext().spanId + ); + assert.strictEqual( + json[entryTypes.TRACE_SAMPLED_KEY], + (span.spanContext().traceFlags & 1) !== 0 + ); + }); + }); + + it('should detect open telemetry trace and span if open telemetry context and headers present', () => { + trace + .getTracer('nodejs-logging-context-test') + .startActiveSpan('foo', span => { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + // To mock http message.headers, we must use lowercased keys. + req.headers = { + 'x-cloud-trace-context': '0000/1111;o=1', + }; + entry.metadata.httpRequest = req; + const json = entry.toStructuredJSON(); + assert.strictEqual( + json[entryTypes.TRACE_KEY], + `projects//traces/${span.spanContext().traceId}` + ); + assert.strictEqual( + json[entryTypes.SPAN_ID_KEY], + span.spanContext().spanId + ); + assert.strictEqual( + json[entryTypes.TRACE_SAMPLED_KEY], + (span.spanContext().traceFlags & 1) !== 0 + ); + }); + }); + + it('should not overwrite user defined trace and span when open telemetry context detected', () => { + trace + .getTracer('nodejs-logging-context-test') + .startActiveSpan('foo', span => { + entry.metadata.spanId = '1'; + entry.metadata.trace = '1'; + entry.metadata.traceSampled = false; + const expected = { + trace: '1', + spanId: '1', + traceSampled: false, + }; + const json = entry.toStructuredJSON(); + assert.strictEqual(json[entryTypes.TRACE_KEY], expected.trace); + assert.strictEqual(json[entryTypes.SPAN_ID_KEY], expected.spanId); + assert.strictEqual( + json[entryTypes.TRACE_SAMPLED_KEY], + expected.traceSampled + ); + }); + }); + }); }); }); diff --git a/handwritten/logging/test/utils/context.ts b/handwritten/logging/test/utils/context.ts index cb2353ab10e..caf9ed71de3 100644 --- a/handwritten/logging/test/utils/context.ts +++ b/handwritten/logging/test/utils/context.ts @@ -23,6 +23,12 @@ import { parseXCloudTraceHeader, parseTraceParentHeader, } from '../../src/utils/context'; +import {InMemorySpanExporter} from '@opentelemetry/sdk-trace-base'; +import {trace} from '@opentelemetry/api'; +import {Resource} from '@opentelemetry/resources'; +//const {Resource} = require('@opentelemetry/resources'); +import {SEMRESATTRS_SERVICE_NAME} from '@opentelemetry/semantic-conventions'; +import {NodeSDK} from '@opentelemetry/sdk-node'; describe('context', () => { describe('makeHeaderWrapper', () => { @@ -95,159 +101,324 @@ describe('context', () => { assert(context.spanId!.length > 0); assert.strictEqual(context.traceSampled, false); }); - }); - describe('parseXCloudTraceHeader', () => { - it('should extract trace properties from X-Cloud-Trace-Context', () => { - const tests = [ - { - header: '105445aa7843bc8bf206b120001000/000000001;o=1', - expected: { - trace: '105445aa7843bc8bf206b120001000', - spanId: '000000001', - traceSampled: true, + describe('getOrInjectContextWithOtel', () => { + let sdk: NodeSDK; + before(() => { + sdk = new NodeSDK({ + resource: new Resource({ + [SEMRESATTRS_SERVICE_NAME]: 'nodejs-logging-context-test', + }), + traceExporter: new InMemorySpanExporter(), + }); + + sdk.start(); + }); + + after(() => { + sdk.shutdown(); + }); + + it('should ignore a default trace context when open telemetry context detected', () => { + trace + .getTracer('nodejs-logging-context-test') + .startActiveSpan('foo', parentSpan => { + const req = { + method: 'GET', + } as http.IncomingMessage; + const projectId = 'myProj'; + const context = getOrInjectContext(req, projectId); + const traceId = parentSpan.spanContext().traceId; + const spanId = parentSpan.spanContext().spanId; + const traceSampled = + (parentSpan.spanContext().traceFlags & 1) !== 0; + assert.strictEqual( + context.trace, + `projects/${projectId}/traces/${traceId}` + ); + assert.strictEqual(context.spanId, spanId); + assert.strictEqual(context.traceSampled, traceSampled); + }); + }); + + it('should return a formatted open telemetry trace context', () => { + trace + .getTracer('nodejs-context-test') + .startActiveSpan('foo', parentSpan => { + const req = {headers: {}} as http.IncomingMessage; + const projectId = 'myProj'; + const context = getOrInjectContext(req, projectId); + const traceId = parentSpan.spanContext().traceId; + const spanId = parentSpan.spanContext().spanId; + const traceSampled = + (parentSpan.spanContext().traceFlags & 1) !== 0; + assert.strictEqual( + context.trace, + `projects/${projectId}/traces/${traceId}` + ); + assert.strictEqual(context.spanId, spanId); + assert.strictEqual(context.traceSampled, traceSampled); + }); + }); + + it('should ignore W3C trace context and return open telemetry context', () => { + trace + .getTracer('nodejs-context-test') + .startActiveSpan('foo', parentSpan => { + const projectId = 'myProj'; + const req = { + headers: { + ['traceparent']: + '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', + }, + } as unknown as http.IncomingMessage; + const context = getOrInjectContext(req, projectId); + const traceId = parentSpan.spanContext().traceId; + const spanId = parentSpan.spanContext().spanId; + const traceSampled = + (parentSpan.spanContext().traceFlags & 1) !== 0; + assert.strictEqual( + context.trace, + `projects/${projectId}/traces/${traceId}` + ); + assert.strictEqual(context.spanId, spanId); + assert.strictEqual(context.traceSampled, traceSampled); + }); + }); + + it('should ignore google trace context and return open telemetry context', () => { + trace + .getTracer('nodejs-context-test') + .startActiveSpan('foo', parentSpan => { + const projectId = 'myProj'; + const req = { + headers: {['x-cloud-trace-context']: '1/2;o=1'}, + } as unknown as http.IncomingMessage; + const context = getOrInjectContext(req, projectId); + const traceId = parentSpan.spanContext().traceId; + const spanId = parentSpan.spanContext().spanId; + const traceSampled = + (parentSpan.spanContext().traceFlags & 1) !== 0; + assert.strictEqual( + context.trace, + `projects/${projectId}/traces/${traceId}` + ); + assert.strictEqual(context.spanId, spanId); + assert.strictEqual(context.traceSampled, traceSampled); + }); + }); + + it('should ignore injecting Google trace context option', () => { + trace + .getTracer('nodejs-context-test') + .startActiveSpan('foo', parentSpan => { + const projectId = 'myProj'; + const req = {headers: {}} as http.IncomingMessage; + const context = getOrInjectContext(req, projectId, true); + const traceId = parentSpan.spanContext().traceId; + const spanId = parentSpan.spanContext().spanId; + const traceSampled = + (parentSpan.spanContext().traceFlags & 1) !== 0; + assert.strictEqual( + context.trace, + `projects/${projectId}/traces/${traceId}` + ); + assert.strictEqual(context.spanId, spanId); + assert.strictEqual(context.traceSampled, traceSampled); + }); + }); + }); + + describe('parseXCloudTraceHeader', () => { + it('should extract trace properties from X-Cloud-Trace-Context', () => { + const tests = [ + { + header: '105445aa7843bc8bf206b120001000/000000001;o=1', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '000000001', + traceSampled: true, + }, }, - }, - // TraceSampled is false - { - header: '105445aa7843bc8bf206b120001000/000000001;o=0', - expected: { - trace: '105445aa7843bc8bf206b120001000', - spanId: '000000001', - traceSampled: false, + // TraceSampled is false + { + header: '105445aa7843bc8bf206b120001000/000000001;o=0', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '000000001', + traceSampled: false, + }, }, - }, - { - // No span - header: '105445aa7843bc8bf206b120001000;o=1', - expected: { - trace: '105445aa7843bc8bf206b120001000', - spanId: undefined, - traceSampled: true, + { + // No span + header: '105445aa7843bc8bf206b120001000;o=1', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: undefined, + traceSampled: true, + }, }, - }, - { - // No trace - header: '/105445aa7843bc8bf206b120001000;o=0', - expected: { - trace: undefined, - spanId: '105445aa7843bc8bf206b120001000', - traceSampled: false, + { + // No trace + header: '/105445aa7843bc8bf206b120001000;o=0', + expected: { + trace: undefined, + spanId: '105445aa7843bc8bf206b120001000', + traceSampled: false, + }, }, - }, - { - // No traceSampled - header: '105445aa7843bc8bf206b120001000/0', - expected: { - trace: '105445aa7843bc8bf206b120001000', - spanId: '0', - traceSampled: false, + { + // No traceSampled + header: '105445aa7843bc8bf206b120001000/0', + expected: { + trace: '105445aa7843bc8bf206b120001000', + spanId: '0', + traceSampled: false, + }, }, - }, - { - // No input - header: '', - expected: { - trace: undefined, - spanId: undefined, - traceSampled: false, + { + // No input + header: '', + expected: { + trace: undefined, + spanId: undefined, + traceSampled: false, + }, }, - }, - ]; - for (const test of tests) { - const req = { - method: 'GET', - } as unknown as http.IncomingMessage; - req.headers = { - 'x-cloud-trace-context': test.header, - }; - - const wrapper = makeHeaderWrapper(req); - const context = parseXCloudTraceHeader(wrapper!); - if (context) { - assert.strictEqual( - context.trace, - test.expected.trace, - `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}` - ); - assert.strictEqual( - context.spanId, - test.expected.spanId, - `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}` - ); - assert.strictEqual( - context.traceSampled, - test.expected.traceSampled, - `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}` - ); - } else { - assert.fail(); + ]; + for (const test of tests) { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + req.headers = { + 'x-cloud-trace-context': test.header, + }; + + const wrapper = makeHeaderWrapper(req); + const context = parseXCloudTraceHeader(wrapper!); + if (context) { + assert.strictEqual( + context.trace, + test.expected.trace, + `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}` + ); + assert.strictEqual( + context.spanId, + test.expected.spanId, + `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}` + ); + assert.strictEqual( + context.traceSampled, + test.expected.traceSampled, + `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}` + ); + } else { + assert.fail(); + } } - } + }); }); - }); - describe('parseTraceParentHeader', () => { - it('should extract trace properties from traceparent', () => { - const tests = [ - { - header: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', - expected: { - trace: '0af7651916cd43dd8448eb211c80319c', - spanId: 'b7ad6b7169203331', - traceSampled: true, + describe('parseOtelContext', () => { + let sdk: NodeSDK; + before(() => { + sdk = new NodeSDK({ + resource: new Resource({ + [SEMRESATTRS_SERVICE_NAME]: 'nodejs-context-test', + }), + traceExporter: new InMemorySpanExporter(), + }); + + sdk.start(); + }); + + after(() => { + sdk.shutdown(); + }); + + it('should extract trace context from open telemetry context', () => { + trace + .getTracer('nodejs-context-test') + .startActiveSpan('boo', parentSpan => { + const req = {headers: {}} as http.IncomingMessage; + const projectId = 'myProj'; + const context = getOrInjectContext(req, projectId); + const traceId = parentSpan.spanContext().traceId; + const spanId = parentSpan.spanContext().spanId; + const traceSampled = + (parentSpan.spanContext().traceFlags & 1) !== 0; + assert.strictEqual( + context.trace, + `projects/${projectId}/traces/${traceId}` + ); + assert.strictEqual(context.spanId, spanId); + assert.strictEqual(context.traceSampled, traceSampled); + }); + }); + }); + + describe('parseTraceParentHeader', () => { + it('should extract trace properties from traceparent', () => { + const tests = [ + { + header: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', + expected: { + trace: '0af7651916cd43dd8448eb211c80319c', + spanId: 'b7ad6b7169203331', + traceSampled: true, + }, }, - }, - // TraceSampled is false - { - header: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-00', - expected: { - trace: '0af7651916cd43dd8448eb211c80319c', - spanId: 'b7ad6b7169203331', - traceSampled: false, + // TraceSampled is false + { + header: '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-00', + expected: { + trace: '0af7651916cd43dd8448eb211c80319c', + spanId: 'b7ad6b7169203331', + traceSampled: false, + }, }, - }, - { - // No input - header: '', - expected: { - trace: undefined, - spanId: undefined, - traceSampled: false, + { + // No input + header: '', + expected: { + trace: undefined, + spanId: undefined, + traceSampled: false, + }, }, - }, - ]; - for (const test of tests) { - const req = { - method: 'GET', - } as unknown as http.IncomingMessage; - req.headers = { - traceparent: test.header, - }; - - const wrapper = makeHeaderWrapper(req); - const context = parseTraceParentHeader(wrapper!); - if (context) { - assert.strictEqual( - context.trace, - test.expected.trace, - `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}` - ); - assert.strictEqual( - context.spanId, - test.expected.spanId, - `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}` - ); - assert.strictEqual( - context.traceSampled, - test.expected.traceSampled, - `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}` - ); - } else { - // This is the header: '' test case; - assert.strictEqual(test.header, ''); + ]; + for (const test of tests) { + const req = { + method: 'GET', + } as unknown as http.IncomingMessage; + req.headers = { + traceparent: test.header, + }; + + const wrapper = makeHeaderWrapper(req); + const context = parseTraceParentHeader(wrapper!); + if (context) { + assert.strictEqual( + context.trace, + test.expected.trace, + `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}` + ); + assert.strictEqual( + context.spanId, + test.expected.spanId, + `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}` + ); + assert.strictEqual( + context.traceSampled, + test.expected.traceSampled, + `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}` + ); + } else { + // This is the header: '' test case; + assert.strictEqual(test.header, ''); + } } - } + }); }); }); }); From dc25917ae57d9996ebf3b2c18f5297a09c5166b7 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 3 Jun 2024 12:46:16 +0200 Subject: [PATCH 0989/1029] chore(deps): update dependency @opentelemetry/sdk-node to ^0.51.0 (#1508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@opentelemetry/sdk-node](https://togithub.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-node) ([source](https://togithub.com/open-telemetry/opentelemetry-js)) | [`^0.50.0` -> `^0.51.0`](https://renovatebot.com/diffs/npm/@opentelemetry%2fsdk-node/0.50.0/0.51.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@opentelemetry%2fsdk-node/0.51.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@opentelemetry%2fsdk-node/0.51.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@opentelemetry%2fsdk-node/0.50.0/0.51.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@opentelemetry%2fsdk-node/0.50.0/0.51.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-js (@​opentelemetry/sdk-node) ### [`v0.51.1`](https://togithub.com/open-telemetry/opentelemetry-js/compare/3ab4f765d8d696327b7d139ae6a45e7bd7edd924...41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-js/compare/3ab4f765d8d696327b7d139ae6a45e7bd7edd924...41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8) ### [`v0.51.0`](https://togithub.com/open-telemetry/opentelemetry-js/compare/5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc...3ab4f765d8d696327b7d139ae6a45e7bd7edd924) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-js/compare/5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc...3ab4f765d8d696327b7d139ae6a45e7bd7edd924)
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/nodejs-logging). --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 289dacd64af..37b07a09b84 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -97,7 +97,7 @@ "webpack-cli": "^5.0.0", "@opentelemetry/api": "^1.7.0", "@opentelemetry/sdk-trace-node": "^1.23.0", - "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/sdk-node": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.23.0", "@opentelemetry/sdk-trace-base": "^1.23.0", "@opentelemetry/resources": "^1.23.0", From aba61af9030a4115a1dc005e3ca64a5a28fbcfe8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:31:58 -0700 Subject: [PATCH 0990/1029] chore: [node] add auto-approve templates, and install dependencies with engines-strict (#1506) * chore: [node] add auto-approve templates, and install dependencies with engines-strict chore: add auto-approve templates, and install dependencies with engines-strict Source-Link: https://github.com/googleapis/synthtool/commit/4a02d97333d1c1642d1b19b00645afdcf4ab36a4 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:68e1cece0d6d3336c4f1cb9d2857b020af5574dff6da6349293d1c6d4eea82d8 * Update package.json --------- Co-authored-by: Owl Bot Co-authored-by: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- handwritten/logging/.github/.OwlBot.lock.yaml | 6 +++--- handwritten/logging/.github/auto-approve.yml | 3 ++- handwritten/logging/package.json | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml index 638efabfb52..34bb2086de0 100644 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ b/handwritten/logging/.github/.OwlBot.lock.yaml @@ -1,4 +1,4 @@ -# Copyright 2023 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:e92044720ab3cb6984a70b0c6001081204375959ba3599ef6c42dd99a7783a67 -# created: 2023-11-10T00:24:05.581078808Z + digest: sha256:68e1cece0d6d3336c4f1cb9d2857b020af5574dff6da6349293d1c6d4eea82d8 +# created: 2024-05-31T15:46:42.989947733Z diff --git a/handwritten/logging/.github/auto-approve.yml b/handwritten/logging/.github/auto-approve.yml index 4cd91cc16ae..ec51b072dca 100644 --- a/handwritten/logging/.github/auto-approve.yml +++ b/handwritten/logging/.github/auto-approve.yml @@ -1,3 +1,4 @@ processes: - "NodeDependency" - - "OwlBotTemplateChanges" + - "OwlBotTemplateChangesNode" + - "OwlBotPRsNode" \ No newline at end of file diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 37b07a09b84..ad570036464 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -83,7 +83,7 @@ "jsdoc": "^4.0.0", "jsdoc-region-tag": "^3.0.0", "jsdoc-fresh": "^3.0.0", - "linkinator": "^5.0.0", + "linkinator": "^3.0.0", "mocha": "^9.2.2", "nock": "^13.0.0", "null-loader": "^4.0.0", From c2da24982bc41912ce994b686e5897406c1e754b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 18 Jun 2024 19:47:15 +0200 Subject: [PATCH 0991/1029] chore(deps): update dependency @opentelemetry/sdk-node to ^0.52.0 (#1509) --- handwritten/logging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index ad570036464..446fd30fc2a 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -97,7 +97,7 @@ "webpack-cli": "^5.0.0", "@opentelemetry/api": "^1.7.0", "@opentelemetry/sdk-trace-node": "^1.23.0", - "@opentelemetry/sdk-node": "^0.51.0", + "@opentelemetry/sdk-node": "^0.52.0", "@opentelemetry/semantic-conventions": "^1.23.0", "@opentelemetry/sdk-trace-base": "^1.23.0", "@opentelemetry/resources": "^1.23.0", From e7bcb200d26efbb777fbabaef237b6313cfeadc0 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Tue, 16 Jul 2024 03:55:04 +0800 Subject: [PATCH 0992/1029] docs: Documentation update for OpenTelemetry and tracing (#1517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Documentation update for OpenTelemetry and tracing * fix lint * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update documentation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix comments * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- handwritten/logging/.readme-partials.yml | 13 ++ handwritten/logging/README.md | 13 ++ handwritten/logging/src/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../test/gapic_config_service_v2_v2.ts | 120 +++++++++--------- .../test/gapic_logging_service_v2_v2.ts | 24 ++-- .../test/gapic_metrics_service_v2_v2.ts | 24 ++-- 7 files changed, 112 insertions(+), 86 deletions(-) diff --git a/handwritten/logging/.readme-partials.yml b/handwritten/logging/.readme-partials.yml index 6586b5f9134..e6b0f256aed 100644 --- a/handwritten/logging/.readme-partials.yml +++ b/handwritten/logging/.readme-partials.yml @@ -80,6 +80,19 @@ body: |- If you already have a "raw" Http `request` object you can assign it to `entry.metadata.httpRequest` directly. More information about how the `request` is interpreted as raw can be found in the [code](https://github.com/googleapis/nodejs-logging/blob/15849160116a814ab71113138cb211c2e0c2d4b4/src/entry.ts#L224-L238). + ## Automatic Trace/Span ID Extraction + Cloud Logging libraries use [trace fields within LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace) to capture trace contexts, which enables the [correlation of logs and traces](https://cloud.google.com/logging/docs/view/correlate-logs), and distributed tracing troubleshooting. + These tracing fields, including [trace](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace), [spanId](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.span_id), and [traceSampled](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace_sampled), define the trace context for a `LogEntry`. + + If not provided explicitly in a LogEntry, the Cloud Logging library automatically populates `trace`, `span_id`, and `trace_sampled` fields from detected OpenTelemetry span contexts, or from HTTP request headers. + + ### Extracting Trace/Span ID from OpenTelemetry Context + If you are using OpenTelemetry and there is an active span in the OpenTelemetry Context, the `trace`, `span_id`, and `trace_sampled` fields in the log entry are automatically populated from the active span. More information about OpenTelemetry can be found [here](https://opentelemetry.io/docs/languages/js/). + + ### Extracting Trace/Span ID from HTTP Headers + If tracing fields are not provided explicitly and no OpenTelemetry context is detected, the `trace` / `span_id` fields are extracted automatically from HTTP headers. + Trace information can be automatically populated from either the [W3C Traceparent](https://www.w3.org/TR/trace-context) or [X-Cloud-Trace-Context](https://cloud.google.com/trace/docs/trace-context#legacy-http-header) headers. + ## Error handling with logs written or deleted asynchronously The `Log` class provide users the ability to write and delete logs asynchronously. However, there are cases when log entries diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index fa0e7d2234e..a2f913a7942 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -170,6 +170,19 @@ how to populate the Http request metadata for log entries. If you already have a "raw" Http `request` object you can assign it to `entry.metadata.httpRequest` directly. More information about how the `request` is interpreted as raw can be found in the [code](https://github.com/googleapis/nodejs-logging/blob/15849160116a814ab71113138cb211c2e0c2d4b4/src/entry.ts#L224-L238). +## Automatic Trace/Span ID Extraction +Cloud Logging libraries use [trace fields within LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace) to capture trace contexts, which enables the [correlation of logs and traces](https://cloud.google.com/logging/docs/view/correlate-logs), and distributed tracing troubleshooting. +These tracing fields, including [trace](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace), [spanId](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.span_id), and [traceSampled](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace_sampled), define the trace context for a `LogEntry`. + +If not provided explicitly in a LogEntry, the Cloud Logging library automatically populates `trace`, `span_id`, and `trace_sampled` fields from detected OpenTelemetry span contexts, or from HTTP request headers. + +### Extracting Trace/Span ID from OpenTelemetry Context +If you are using OpenTelemetry and there is an active span in the OpenTelemetry Context, the `trace`, `span_id`, and `trace_sampled` fields in the log entry are automatically populated from the active span. More information about OpenTelemetry can be found [here](https://opentelemetry.io/docs/languages/js/). + +### Extracting Trace/Span ID from HTTP Headers +If tracing fields are not provided explicitly and no OpenTelemetry context is detected, the `trace` / `span_id` fields are extracted automatically from HTTP headers. +Trace information can be automatically populated from either the [W3C Traceparent](https://www.w3.org/TR/trace-context) or [X-Cloud-Trace-Context](https://cloud.google.com/trace/docs/trace-context#legacy-http-header) headers. + ## Error handling with logs written or deleted asynchronously The `Log` class provide users the ability to write and delete logs asynchronously. However, there are cases when log entries diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 69241f40192..c116f13936c 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -21,7 +21,7 @@ import {callbackifyAll} from '@google-cloud/promisify'; import arrify = require('arrify'); import * as extend from 'extend'; import * as gax from 'google-gax'; -// eslint-disable-next-line node/no-extraneous-import +// eslint-disable-next-line n/no-extraneous-import import {ClientReadableStream, ClientDuplexStream} from '@grpc/grpc-js'; // eslint-disable-next-line @typescript-eslint/no-var-requires const pumpify = require('pumpify'); diff --git a/handwritten/logging/system-test/fixtures/sample/src/index.js b/handwritten/logging/system-test/fixtures/sample/src/index.js index 784ac159bc2..cc2f6137250 100644 --- a/handwritten/logging/system-test/fixtures/sample/src/index.js +++ b/handwritten/logging/system-test/fixtures/sample/src/index.js @@ -16,7 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -/* eslint-disable node/no-missing-require, no-unused-vars */ +/* eslint-disable n/no-missing-require, no-unused-vars */ const logging = require('@google-cloud/logging'); function main() { diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 431eaaa744b..7f6f4748934 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -4251,9 +4251,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listBuckets.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4299,9 +4299,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listBuckets.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4342,9 +4342,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listBuckets.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4384,9 +4384,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listBuckets.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); @@ -4547,9 +4547,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listViews.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4595,9 +4595,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listViews.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4637,9 +4637,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listViews.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4678,9 +4678,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listViews.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); @@ -4841,9 +4841,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4889,9 +4889,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4931,9 +4931,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listSinks.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -4972,9 +4972,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listSinks.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); @@ -5135,9 +5135,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -5183,9 +5183,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -5225,9 +5225,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listLinks.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -5266,9 +5266,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listLinks.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); @@ -5432,9 +5432,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -5478,9 +5478,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -5521,9 +5521,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listExclusions.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -5561,9 +5561,9 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listExclusions.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index ba8b6519ebd..7a5583ec916 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -1206,9 +1206,9 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.descriptors.page.listLogs.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -1254,9 +1254,9 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.descriptors.page.listLogs.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -1292,9 +1292,9 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.descriptors.page.listLogs.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -1333,9 +1333,9 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.descriptors.page.listLogs.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index cc9eba4c0ff..e0be7d5ad6c 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -984,9 +984,9 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.descriptors.page.listLogMetrics.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -1030,9 +1030,9 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.descriptors.page.listLogMetrics.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -1073,9 +1073,9 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.descriptors.page.listLogMetrics.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); @@ -1113,9 +1113,9 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.descriptors.page.listLogMetrics.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); From d0ba621c32ccea6091f4b48dcc6b9c768daf4e56 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 11:22:18 -0700 Subject: [PATCH 0993/1029] chore(main): release 11.2.0 (#1518) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 11.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 +++++++ handwritten/logging/package.json | 2 +- .../generated/v2/snippet_metadata.google.logging.v2.json | 2 +- .../generated/v2/snippet_metadata_google.logging.v2.json | 2 +- handwritten/logging/src/utils/instrumentation.ts | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index f66b4767481..f1d096c5683 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [11.2.0](https://github.com/googleapis/nodejs-logging/compare/v11.1.0...v11.2.0) (2024-07-15) + + +### Features + +* Open telemetry integration and span Id fix for nodejs logging library ([#1497](https://github.com/googleapis/nodejs-logging/issues/1497)) ([91577e0](https://github.com/googleapis/nodejs-logging/commit/91577e0c46cefd1333bb3a69e62a50e0aab74615)) + ## [11.1.0](https://github.com/googleapis/nodejs-logging/compare/v11.0.0...v11.1.0) (2024-05-29) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 446fd30fc2a..68e98c5eaf7 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "11.1.0", + "version": "11.2.0", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 251d0b5078a..5172c8dbae6 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "11.1.0", + "version": "11.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json index 251d0b5078a..5172c8dbae6 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "11.1.0", + "version": "11.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index c3004fba2c0..3be703f1920 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '11.1.0'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '11.2.0'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 4198d1278ea326caa2e37149df0cb0fdc8ad3d2c Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:53:55 -0700 Subject: [PATCH 0994/1029] fix(logging): Specifying resourceNames should fetch logs only from those resources (#1597) * fix(logging): prevent project ID injection when resourceNames is set When `getEntries` is called with a `resourceNames` array that specifies a logging bucket (particularly one in a different project), the library was incorrectly appending the current project's ID to the array. This resulted in an invalid request, causing the Logging API to reject it with an `INVALID_ARGUMENT` error. The fix adjusts the logic to only inject the default project ID if the `resourceNames` array is explicitly empty. This preserves the expected default behavior of searching within the current project, while respecting user-provided resource names for cross-project queries. Fixes: #1593 * revert and add comment * fix test * by tests failure caused by node version * resolve promisify dependency for node 14 * use relative path to avoid 429 error * bypass unrelated doc check --------- Co-authored-by: Baha Aiman --- handwritten/logging/package.json | 2 +- handwritten/logging/src/index.ts | 5 +++-- handwritten/logging/test/index.ts | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 68e98c5eaf7..19df8c6d25d 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -48,7 +48,7 @@ "@google-cloud/common": "^5.0.0", "@google-cloud/paginator": "^5.0.0", "@google-cloud/projectify": "^4.0.0", - "@google-cloud/promisify": "^4.0.0", + "@google-cloud/promisify": "4.0.0", "arrify": "^2.0.1", "dot-prop": "^6.0.0", "eventid": "^2.0.0", diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index c116f13936c..1bfc0c3bb0d 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -590,10 +590,11 @@ class Logging { reqOpts.filter += ` AND ${timeFilter}`; } - reqOpts.resourceNames = arrify(reqOpts.resourceNames!); this.projectId = await this.auth.getProjectId(); const resourceName = 'projects/' + this.projectId; - if (reqOpts.resourceNames.indexOf(resourceName) === -1) { + reqOpts.resourceNames = arrify(reqOpts.resourceNames!); + if (reqOpts.resourceNames.length === 0) { + // If no resource names are provided, default to the current project. reqOpts.resourceNames.push(resourceName); } delete reqOpts.autoPaginate; diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 3127db6bbf0..9f583247c5b 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -504,6 +504,23 @@ describe('Logging', () => { await logging.getEntries(); }); + it('should not add projectId if resourceNames is provided', async () => { + const resourceNames = ['projects/other-project/buckets/my-bucket']; + const options = { + resourceNames: resourceNames, + }; + + logging.loggingService.listLogEntries = async ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + reqOpts: any + ) => { + assert.deepStrictEqual(reqOpts.resourceNames, resourceNames); + return [[]]; + }; + + await logging.getEntries(options); + }); + it('should accept options (and not overwrite timestamp)', async () => { const options = {filter: 'timestamp > "2020-11-11T15:01:23.045123456Z"'}; From 24f9662d164e28801af30455a5c936b67e77d316 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 3 Sep 2025 14:34:06 -0700 Subject: [PATCH 0995/1029] chore(main): release 11.2.1 (#1598) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 11.2.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- handwritten/logging/CHANGELOG.md | 7 + handwritten/logging/package.json | 2 +- handwritten/logging/protos/protos.d.ts | 2 +- handwritten/logging/protos/protos.js | 626 +++++++++++++----- handwritten/logging/protos/protos.json | 54 +- .../snippet_metadata.google.logging.v2.json | 2 +- .../snippet_metadata_google.logging.v2.json | 2 +- .../logging/src/utils/instrumentation.ts | 2 +- 8 files changed, 520 insertions(+), 177 deletions(-) diff --git a/handwritten/logging/CHANGELOG.md b/handwritten/logging/CHANGELOG.md index f1d096c5683..1717e6e96c0 100644 --- a/handwritten/logging/CHANGELOG.md +++ b/handwritten/logging/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://www.npmjs.com/package/nodejs-logging?activeTab=versions +## [11.2.1](https://github.com/googleapis/nodejs-logging/compare/v11.2.0...v11.2.1) (2025-09-03) + + +### Bug Fixes + +* **logging:** Specifying resourceNames should fetch logs only from those resources ([#1597](https://github.com/googleapis/nodejs-logging/issues/1597)) ([ff7899f](https://github.com/googleapis/nodejs-logging/commit/ff7899f5e91da6540d3f68476b2d9acd58ff0993)) + ## [11.2.0](https://github.com/googleapis/nodejs-logging/compare/v11.1.0...v11.2.0) (2024-07-15) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 19df8c6d25d..1e5db61cbb8 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/logging", - "version": "11.2.0", + "version": "11.2.1", "description": "Cloud Logging Client Library for Node.js", "keywords": [ "google apis client", diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index c721f107f32..8b3a988808d 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index e92f57526ce..a78662d6cef 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -144,12 +144,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.seconds = reader.int64(); @@ -376,12 +378,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + FileDescriptorSet.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.file && message.file.length)) @@ -776,12 +780,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + FileDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -1443,12 +1449,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + DescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -1928,12 +1936,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length) { + ExtensionRange.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.start = reader.int32(); @@ -2172,12 +2182,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReservedRange.decode = function decode(reader, length) { + ReservedRange.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.start = reader.int32(); @@ -2428,12 +2440,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRangeOptions.decode = function decode(reader, length) { + ExtensionRangeOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) @@ -2773,12 +2787,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Declaration.decode = function decode(reader, length) { + Declaration.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.number = reader.int32(); @@ -3152,12 +3168,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + FieldDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -3677,12 +3695,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofDescriptorProto.decode = function decode(reader, length) { + OneofDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -3948,12 +3968,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length) { + EnumDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -4267,12 +4289,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumReservedRange.decode = function decode(reader, length) { + EnumReservedRange.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.start = reader.int32(); @@ -4508,12 +4532,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumValueDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -4765,12 +4791,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + ServiceDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -5073,12 +5101,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + MethodDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -5577,12 +5607,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + FileOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.javaPackage = reader.string(); @@ -6197,12 +6229,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { + MessageOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.messageSetWireFormat = reader.bool(); @@ -6677,12 +6711,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { + FieldOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.ctype = reader.int32(); @@ -7408,12 +7444,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EditionDefault.decode = function decode(reader, length) { + EditionDefault.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 3: { message.edition = reader.int32(); @@ -7704,12 +7742,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofOptions.decode = function decode(reader, length) { + OneofOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); @@ -7990,12 +8030,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + EnumOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 2: { message.allowAlias = reader.bool(); @@ -8302,12 +8344,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + EnumValueOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.deprecated = reader.bool(); @@ -8624,12 +8668,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + ServiceOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 34: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); @@ -8983,12 +9029,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + MethodOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 33: { message.deprecated = reader.bool(); @@ -9417,12 +9465,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + UninterpretedOption.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 2: { if (!(message.name && message.name.length)) @@ -9756,12 +9806,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + NamePart.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.namePart = reader.string(); @@ -10032,12 +10084,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSet.decode = function decode(reader, length) { + FeatureSet.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.fieldPresence = reader.int32(); @@ -10567,12 +10621,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSetDefaults.decode = function decode(reader, length) { + FeatureSetDefaults.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.defaults && message.defaults.length)) @@ -10951,12 +11007,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSetEditionDefault.decode = function decode(reader, length) { + FeatureSetEditionDefault.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 3: { message.edition = reader.int32(); @@ -11241,12 +11299,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + SourceCodeInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.location && message.location.length)) @@ -11516,12 +11576,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Location.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.path && message.path.length)) @@ -11827,12 +11889,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decode = function decode(reader, length) { + GeneratedCodeInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.annotation && message.annotation.length)) @@ -12095,12 +12159,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Annotation.decode = function decode(reader, length) { + Annotation.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.path && message.path.length)) @@ -12414,12 +12480,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decode = function decode(reader, length) { + Struct.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (message.fields === $util.emptyObject) @@ -12724,12 +12792,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decode = function decode(reader, length) { + Value.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.nullValue = reader.int32(); @@ -13061,12 +13131,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decode = function decode(reader, length) { + ListValue.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.values && message.values.length)) @@ -13294,12 +13366,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decode = function decode(reader, length) { + Any.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.type_url = reader.string(); @@ -13530,12 +13604,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.seconds = reader.int64(); @@ -13749,12 +13825,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { default: reader.skipType(tag & 7); @@ -13937,12 +14015,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.paths && message.paths.length)) @@ -14329,12 +14409,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRequest.decode = function decode(reader, length) { + HttpRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.type.HttpRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.requestMethod = reader.string(); @@ -14980,12 +15062,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decode = function decode(reader, length) { + LogEntry.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntry(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 12: { message.logName = reader.string(); @@ -15561,12 +15645,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntryOperation.decode = function decode(reader, length) { + LogEntryOperation.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntryOperation(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.id = reader.string(); @@ -15823,12 +15909,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntrySourceLocation.decode = function decode(reader, length) { + LogEntrySourceLocation.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogEntrySourceLocation(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.file = reader.string(); @@ -16087,12 +16175,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSplit.decode = function decode(reader, length) { + LogSplit.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSplit(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.uid = reader.string(); @@ -16548,12 +16638,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogRequest.decode = function decode(reader, length) { + DeleteLogRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.logName = reader.string(); @@ -16810,12 +16902,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesRequest.decode = function decode(reader, length) { + WriteLogEntriesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesRequest(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.logName = reader.string(); @@ -17122,12 +17216,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesResponse.decode = function decode(reader, length) { + WriteLogEntriesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { default: reader.skipType(tag & 7); @@ -17312,12 +17408,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WriteLogEntriesPartialErrors.decode = function decode(reader, length) { + WriteLogEntriesPartialErrors.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.WriteLogEntriesPartialErrors(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (message.logEntryErrors === $util.emptyObject) @@ -17603,12 +17701,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesRequest.decode = function decode(reader, length) { + ListLogEntriesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 8: { if (!(message.resourceNames && message.resourceNames.length)) @@ -17883,12 +17983,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogEntriesResponse.decode = function decode(reader, length) { + ListLogEntriesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.entries && message.entries.length)) @@ -18129,12 +18231,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.pageSize = reader.int32(); @@ -18358,12 +18462,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length) { + ListMonitoredResourceDescriptorsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListMonitoredResourceDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.resourceDescriptors && message.resourceDescriptors.length)) @@ -18628,12 +18734,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsRequest.decode = function decode(reader, length) { + ListLogsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -18896,12 +19004,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogsResponse.decode = function decode(reader, length) { + ListLogsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 3: { if (!(message.logNames && message.logNames.length)) @@ -19150,12 +19260,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TailLogEntriesRequest.decode = function decode(reader, length) { + TailLogEntriesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.resourceNames && message.resourceNames.length)) @@ -19413,12 +19525,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TailLogEntriesResponse.decode = function decode(reader, length) { + TailLogEntriesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.entries && message.entries.length)) @@ -19675,12 +19789,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuppressionInfo.decode = function decode(reader, length) { + SuppressionInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.TailLogEntriesResponse.SuppressionInfo(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.reason = reader.int32(); @@ -21047,12 +21163,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IndexConfig.decode = function decode(reader, length) { + IndexConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.IndexConfig(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.fieldPath = reader.string(); @@ -21418,12 +21536,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogBucket.decode = function decode(reader, length) { + LogBucket.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogBucket(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -21875,12 +21995,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogView.decode = function decode(reader, length) { + LogView.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogView(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -22274,12 +22396,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogSink.decode = function decode(reader, length) { + LogSink.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogSink(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -22691,12 +22815,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDataset.decode = function decode(reader, length) { + BigQueryDataset.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryDataset(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.datasetId = reader.string(); @@ -22938,12 +23064,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Link.decode = function decode(reader, length) { + Link.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.Link(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -23250,12 +23378,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryOptions.decode = function decode(reader, length) { + BigQueryOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BigQueryOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.usePartitionedTables = reader.bool(); @@ -23488,12 +23618,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsRequest.decode = function decode(reader, length) { + ListBucketsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -23729,12 +23861,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBucketsResponse.decode = function decode(reader, length) { + ListBucketsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListBucketsResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.buckets && message.buckets.length)) @@ -23986,12 +24120,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBucketRequest.decode = function decode(reader, length) { + CreateBucketRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -24241,12 +24377,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBucketRequest.decode = function decode(reader, length) { + UpdateBucketRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -24479,12 +24617,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBucketRequest.decode = function decode(reader, length) { + GetBucketRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -24682,12 +24822,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBucketRequest.decode = function decode(reader, length) { + DeleteBucketRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -24885,12 +25027,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeleteBucketRequest.decode = function decode(reader, length) { + UndeleteBucketRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UndeleteBucketRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -25110,12 +25254,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsRequest.decode = function decode(reader, length) { + ListViewsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -25351,12 +25497,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsResponse.decode = function decode(reader, length) { + ListViewsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListViewsResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.views && message.views.length)) @@ -25608,12 +25756,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateViewRequest.decode = function decode(reader, length) { + CreateViewRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -25863,12 +26013,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateViewRequest.decode = function decode(reader, length) { + UpdateViewRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -26101,12 +26253,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetViewRequest.decode = function decode(reader, length) { + GetViewRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -26304,12 +26458,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteViewRequest.decode = function decode(reader, length) { + DeleteViewRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -26529,12 +26685,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksRequest.decode = function decode(reader, length) { + ListSinksRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -26770,12 +26928,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSinksResponse.decode = function decode(reader, length) { + ListSinksResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListSinksResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.sinks && message.sinks.length)) @@ -27005,12 +27165,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSinkRequest.decode = function decode(reader, length) { + GetSinkRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.sinkName = reader.string(); @@ -27230,12 +27392,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSinkRequest.decode = function decode(reader, length) { + CreateSinkRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -27496,12 +27660,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSinkRequest.decode = function decode(reader, length) { + UpdateSinkRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.sinkName = reader.string(); @@ -27746,12 +27912,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSinkRequest.decode = function decode(reader, length) { + DeleteSinkRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteSinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.sinkName = reader.string(); @@ -27971,12 +28139,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLinkRequest.decode = function decode(reader, length) { + CreateLinkRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -28204,12 +28374,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLinkRequest.decode = function decode(reader, length) { + DeleteLinkRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -28429,12 +28601,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLinksRequest.decode = function decode(reader, length) { + ListLinksRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -28670,12 +28844,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLinksResponse.decode = function decode(reader, length) { + ListLinksResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLinksResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.links && message.links.length)) @@ -28905,12 +29081,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLinkRequest.decode = function decode(reader, length) { + GetLinkRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -29163,12 +29341,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogExclusion.decode = function decode(reader, length) { + LogExclusion.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogExclusion(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -29459,12 +29639,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsRequest.decode = function decode(reader, length) { + ListExclusionsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -29700,12 +29882,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListExclusionsResponse.decode = function decode(reader, length) { + ListExclusionsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListExclusionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.exclusions && message.exclusions.length)) @@ -29935,12 +30119,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExclusionRequest.decode = function decode(reader, length) { + GetExclusionRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -30149,12 +30335,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExclusionRequest.decode = function decode(reader, length) { + CreateExclusionRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -30392,12 +30580,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExclusionRequest.decode = function decode(reader, length) { + UpdateExclusionRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -30630,12 +30820,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExclusionRequest.decode = function decode(reader, length) { + DeleteExclusionRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteExclusionRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -30833,12 +31025,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCmekSettingsRequest.decode = function decode(reader, length) { + GetCmekSettingsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetCmekSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -31058,12 +31252,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCmekSettingsRequest.decode = function decode(reader, length) { + UpdateCmekSettingsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateCmekSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -31329,12 +31525,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CmekSettings.decode = function decode(reader, length) { + CmekSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CmekSettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -31569,12 +31767,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSettingsRequest.decode = function decode(reader, length) { + GetSettingsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -31794,12 +31994,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSettingsRequest.decode = function decode(reader, length) { + UpdateSettingsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -32076,12 +32278,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Settings.decode = function decode(reader, length) { + Settings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.Settings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -32350,12 +32554,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesRequest.decode = function decode(reader, length) { + CopyLogEntriesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -32644,12 +32850,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesMetadata.decode = function decode(reader, length) { + CopyLogEntriesMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); @@ -32979,12 +33187,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CopyLogEntriesResponse.decode = function decode(reader, length) { + CopyLogEntriesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CopyLogEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.logEntriesCopiedCount = reader.int64(); @@ -33254,12 +33464,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BucketMetadata.decode = function decode(reader, length) { + BucketMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.BucketMetadata(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); @@ -33641,12 +33853,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LinkMetadata.decode = function decode(reader, length) { + LinkMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LinkMetadata(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); @@ -34032,12 +34246,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LocationMetadata.decode = function decode(reader, length) { + LocationMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LocationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.logAnalyticsEnabled = reader.bool(); @@ -34558,12 +34774,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogMetric.decode = function decode(reader, length) { + LogMetric.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.LogMetric(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -35003,12 +35221,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsRequest.decode = function decode(reader, length) { + ListLogMetricsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -35244,12 +35464,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLogMetricsResponse.decode = function decode(reader, length) { + ListLogMetricsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.ListLogMetricsResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.metrics && message.metrics.length)) @@ -35479,12 +35701,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLogMetricRequest.decode = function decode(reader, length) { + GetLogMetricRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.GetLogMetricRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.metricName = reader.string(); @@ -35693,12 +35917,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLogMetricRequest.decode = function decode(reader, length) { + CreateLogMetricRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.CreateLogMetricRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.parent = reader.string(); @@ -35925,12 +36151,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateLogMetricRequest.decode = function decode(reader, length) { + UpdateLogMetricRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.UpdateLogMetricRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.metricName = reader.string(); @@ -36146,12 +36374,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLogMetricRequest.decode = function decode(reader, length) { + DeleteLogMetricRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.logging.v2.DeleteLogMetricRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.metricName = reader.string(); @@ -36449,12 +36679,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { + MonitoredResourceDescriptor.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 5: { message.name = reader.string(); @@ -36795,12 +37027,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decode = function decode(reader, length) { + MonitoredResource.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.type = reader.string(); @@ -37057,12 +37291,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decode = function decode(reader, length) { + MonitoredResourceMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); @@ -37333,12 +37569,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + LabelDescriptor.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.key = reader.string(); @@ -37700,12 +37938,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.type = reader.string(); @@ -38095,12 +38335,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.type = reader.string(); @@ -38324,12 +38566,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + Http.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.rules && message.rules.length)) @@ -38674,12 +38918,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.selector = reader.string(); @@ -39058,12 +39304,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.kind = reader.string(); @@ -39290,12 +39538,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommonLanguageSettings.decode = function decode(reader, length) { + CommonLanguageSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.referenceDocsUri = reader.string(); @@ -39659,12 +39909,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientLibrarySettings.decode = function decode(reader, length) { + ClientLibrarySettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.version = reader.string(); @@ -40188,12 +40440,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Publishing.decode = function decode(reader, length) { + Publishing.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 2: { if (!(message.methodSettings && message.methodSettings.length)) @@ -40639,12 +40893,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JavaSettings.decode = function decode(reader, length) { + JavaSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.libraryPackage = reader.string(); @@ -40906,12 +41162,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CppSettings.decode = function decode(reader, length) { + CppSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); @@ -41114,12 +41372,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhpSettings.decode = function decode(reader, length) { + PhpSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); @@ -41322,12 +41582,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PythonSettings.decode = function decode(reader, length) { + PythonSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); @@ -41530,12 +41792,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodeSettings.decode = function decode(reader, length) { + NodeSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); @@ -41803,12 +42067,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DotnetSettings.decode = function decode(reader, length) { + DotnetSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); @@ -42182,12 +42448,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RubySettings.decode = function decode(reader, length) { + RubySettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); @@ -42390,12 +42658,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoSettings.decode = function decode(reader, length) { + GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); @@ -42622,12 +42892,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodSettings.decode = function decode(reader, length) { + MethodSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.selector = reader.string(); @@ -42900,12 +43172,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LongRunning.decode = function decode(reader, length) { + LongRunning.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); @@ -43273,12 +43547,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Distribution.decode = function decode(reader, length) { + Distribution.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.count = reader.int64(); @@ -43631,12 +43907,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Range.decode = function decode(reader, length) { + Range.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.min = reader.double(); @@ -43883,12 +44161,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BucketOptions.decode = function decode(reader, length) { + BucketOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); @@ -44163,12 +44443,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Linear.decode = function decode(reader, length) { + Linear.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.numFiniteBuckets = reader.int32(); @@ -44413,12 +44695,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Exponential.decode = function decode(reader, length) { + Exponential.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.numFiniteBuckets = reader.int32(); @@ -44646,12 +44930,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Explicit.decode = function decode(reader, length) { + Explicit.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.bounds && message.bounds.length)) @@ -44895,12 +45181,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Exemplar.decode = function decode(reader, length) { + Exemplar.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.value = reader.double(); @@ -45265,12 +45553,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decode = function decode(reader, length) { + MetricDescriptor.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -45812,12 +46102,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptorMetadata.decode = function decode(reader, length) { + MetricDescriptorMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.launchStage = reader.int32(); @@ -46115,12 +46407,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decode = function decode(reader, length) { + Metric.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 3: { message.type = reader.string(); @@ -46400,12 +46694,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Status.decode = function decode(reader, length) { + Status.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.code = reader.int32(); @@ -46918,12 +47214,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Operation.decode = function decode(reader, length) { + Operation.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -47198,12 +47496,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOperationRequest.decode = function decode(reader, length) { + GetOperationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -47434,12 +47734,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperationsRequest.decode = function decode(reader, length) { + ListOperationsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 4: { message.name = reader.string(); @@ -47687,12 +47989,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperationsResponse.decode = function decode(reader, length) { + ListOperationsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { if (!(message.operations && message.operations.length)) @@ -47922,12 +48226,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelOperationRequest.decode = function decode(reader, length) { + CancelOperationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -48125,12 +48431,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOperationRequest.decode = function decode(reader, length) { + DeleteOperationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -48339,12 +48647,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WaitOperationRequest.decode = function decode(reader, length) { + WaitOperationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.name = reader.string(); @@ -48571,12 +48881,14 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationInfo.decode = function decode(reader, length) { + OperationInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); while (reader.pos < end) { var tag = reader.uint32(); + if (tag === error) + break; switch (tag >>> 3) { case 1: { message.responseType = reader.string(); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 3861f95af89..138620e8cbc 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -26,6 +26,7 @@ } }, "FileDescriptorSet": { + "edition": "proto2", "fields": { "file": { "rule": "repeated", @@ -35,6 +36,7 @@ } }, "Edition": { + "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, "EDITION_PROTO2": 998, @@ -50,6 +52,7 @@ } }, "FileDescriptorProto": { + "edition": "proto2", "fields": { "name": { "type": "string", @@ -67,18 +70,12 @@ "publicDependency": { "rule": "repeated", "type": "int32", - "id": 10, - "options": { - "packed": false - } + "id": 10 }, "weakDependency": { "rule": "repeated", "type": "int32", - "id": 11, - "options": { - "packed": false - } + "id": 11 }, "messageType": { "rule": "repeated", @@ -119,6 +116,7 @@ } }, "DescriptorProto": { + "edition": "proto2", "fields": { "name": { "type": "string", @@ -201,6 +199,7 @@ } }, "ExtensionRangeOptions": { + "edition": "proto2", "fields": { "uninterpretedOption": { "rule": "repeated", @@ -274,6 +273,7 @@ } }, "FieldDescriptorProto": { + "edition": "proto2", "fields": { "name": { "type": "string", @@ -353,6 +353,7 @@ } }, "OneofDescriptorProto": { + "edition": "proto2", "fields": { "name": { "type": "string", @@ -365,6 +366,7 @@ } }, "EnumDescriptorProto": { + "edition": "proto2", "fields": { "name": { "type": "string", @@ -406,6 +408,7 @@ } }, "EnumValueDescriptorProto": { + "edition": "proto2", "fields": { "name": { "type": "string", @@ -422,6 +425,7 @@ } }, "ServiceDescriptorProto": { + "edition": "proto2", "fields": { "name": { "type": "string", @@ -439,6 +443,7 @@ } }, "MethodDescriptorProto": { + "edition": "proto2", "fields": { "name": { "type": "string", @@ -473,6 +478,7 @@ } }, "FileOptions": { + "edition": "proto2", "fields": { "javaPackage": { "type": "string", @@ -614,6 +620,7 @@ } }, "MessageOptions": { + "edition": "proto2", "fields": { "messageSetWireFormat": { "type": "bool", @@ -687,6 +694,7 @@ ] }, "FieldOptions": { + "edition": "proto2", "fields": { "ctype": { "type": "CType", @@ -748,10 +756,7 @@ "targets": { "rule": "repeated", "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } + "id": 19 }, "editionDefaults": { "rule": "repeated", @@ -835,6 +840,7 @@ } }, "OneofOptions": { + "edition": "proto2", "fields": { "features": { "type": "FeatureSet", @@ -854,6 +860,7 @@ ] }, "EnumOptions": { + "edition": "proto2", "fields": { "allowAlias": { "type": "bool", @@ -897,6 +904,7 @@ ] }, "EnumValueOptions": { + "edition": "proto2", "fields": { "deprecated": { "type": "bool", @@ -930,6 +938,7 @@ ] }, "ServiceOptions": { + "edition": "proto2", "fields": { "features": { "type": "FeatureSet", @@ -956,6 +965,7 @@ ] }, "MethodOptions": { + "edition": "proto2", "fields": { "deprecated": { "type": "bool", @@ -998,6 +1008,7 @@ } }, "UninterpretedOption": { + "edition": "proto2", "fields": { "name": { "rule": "repeated", @@ -1047,6 +1058,7 @@ } }, "FeatureSet": { + "edition": "proto2", "fields": { "fieldPresence": { "type": "FieldPresence", @@ -1188,6 +1200,7 @@ } }, "FeatureSetDefaults": { + "edition": "proto2", "fields": { "defaults": { "rule": "repeated", @@ -1219,6 +1232,7 @@ } }, "SourceCodeInfo": { + "edition": "proto2", "fields": { "location": { "rule": "repeated", @@ -1232,12 +1246,18 @@ "path": { "rule": "repeated", "type": "int32", - "id": 1 + "id": 1, + "options": { + "packed": true + } }, "span": { "rule": "repeated", "type": "int32", - "id": 2 + "id": 2, + "options": { + "packed": true + } }, "leadingComments": { "type": "string", @@ -1257,6 +1277,7 @@ } }, "GeneratedCodeInfo": { + "edition": "proto2", "fields": { "annotation": { "rule": "repeated", @@ -1270,7 +1291,10 @@ "path": { "rule": "repeated", "type": "int32", - "id": 1 + "id": 1, + "options": { + "packed": true + } }, "sourceFile": { "type": "string", diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json index 5172c8dbae6..ca8724bf4fa 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata.google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "11.2.0", + "version": "11.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json b/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json index 5172c8dbae6..ca8724bf4fa 100644 --- a/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json +++ b/handwritten/logging/samples/generated/v2/snippet_metadata_google.logging.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-logging", - "version": "11.2.0", + "version": "11.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 3be703f1920..9f07fd0946e 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -39,7 +39,7 @@ export const NODEJS_LIBRARY_NAME_PREFIX = 'nodejs'; * Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. * See https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files */ -export const NODEJS_DEFAULT_LIBRARY_VERSION = '11.2.0'; // {x-release-please-version} +export const NODEJS_DEFAULT_LIBRARY_VERSION = '11.2.1'; // {x-release-please-version} export const MAX_INSTRUMENTATION_COUNT = 3; export type InstrumentationInfo = {name: string; version: string}; From 9e6244a7130a942ca5b04bc79e1ffe7751f0aaee Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 20 Jan 2026 11:30:54 -0500 Subject: [PATCH 0996/1029] chore: remove api-logging teams (#1617) * chore: remove api-logging teams * chore: remove remaining api-logging teams from configuration files --- handwritten/logging/.github/CODEOWNERS | 2 +- handwritten/logging/.github/blunderbuss.yml | 4 ++-- handwritten/logging/.github/sync-repo-settings.yaml | 2 -- handwritten/logging/.repo-metadata.json | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/handwritten/logging/.github/CODEOWNERS b/handwritten/logging/.github/CODEOWNERS index 9cfb9aaf97c..80520bbaac3 100644 --- a/handwritten/logging/.github/CODEOWNERS +++ b/handwritten/logging/.github/CODEOWNERS @@ -6,7 +6,7 @@ # The yoshi-nodejs team is the default owner for nodejs repositories. -* @googleapis/yoshi-nodejs @googleapis/api-logging @googleapis/api-logging-partners +* @googleapis/yoshi-nodejs # The github automation team is the default owner for the auto-approve file. .github/auto-approve.yml @googleapis/github-automation diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml index 611b99a4879..768497b9931 100644 --- a/handwritten/logging/.github/blunderbuss.yml +++ b/handwritten/logging/.github/blunderbuss.yml @@ -1,4 +1,4 @@ assign_issues: - - googleapis/api-logging-nodejs-reviewers + - googleapis/yoshi-nodejs assign_prs: - - googleapis/api-logging-nodejs-reviewers + - googleapis/yoshi-nodejs diff --git a/handwritten/logging/.github/sync-repo-settings.yaml b/handwritten/logging/.github/sync-repo-settings.yaml index 803f8b25dd9..5edb586a6ed 100644 --- a/handwritten/logging/.github/sync-repo-settings.yaml +++ b/handwritten/logging/.github/sync-repo-settings.yaml @@ -23,6 +23,4 @@ permissionRules: permission: admin - team: jsteam permission: push - - team: api-logging-partners - permission: push diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json index 4439cef8e66..e2f55ae0847 100644 --- a/handwritten/logging/.repo-metadata.json +++ b/handwritten/logging/.repo-metadata.json @@ -2,7 +2,7 @@ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/logging/latest", "product_documentation": "https://cloud.google.com/logging/docs", "name": "logging", - "codeowner_team": "@googleapis/api-logging", + "codeowner_team": "@googleapis/yoshi-nodejs", "release_level": "stable", "language": "nodejs", "api_id": "logging.googleapis.com", From de7c22233521faaa26f3b7b5c4fd478dcf8c4a00 Mon Sep 17 00:00:00 2001 From: Gautam Sharda Date: Thu, 5 Mar 2026 19:00:32 +0000 Subject: [PATCH 0997/1029] build: add release-please config, fix owlbot-config --- .github/CODEOWNERS | 2 +- .release-please-manifest.json | 3 +- .../logging/{.github => }/.OwlBot.yaml | 6 +-- handwritten/logging/.github/.OwlBot.lock.yaml | 17 --------- handwritten/logging/.github/CODEOWNERS | 12 ------ .../.github/ISSUE_TEMPLATE/bug_report.md | 38 ------------------- .../logging/.github/ISSUE_TEMPLATE/config.yml | 4 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 18 --------- .../.github/ISSUE_TEMPLATE/question.md | 12 ------ .../.github/ISSUE_TEMPLATE/support_request.md | 7 ---- .../logging/.github/PULL_REQUEST_TEMPLATE.md | 7 ---- handwritten/logging/.github/auto-approve.yml | 4 -- handwritten/logging/.github/auto-label.yaml | 19 ---------- handwritten/logging/.github/blunderbuss.yml | 4 -- handwritten/logging/.github/flakybot.yaml | 16 -------- .../logging/.github/generated-files-bot.yml | 16 -------- .../logging/.github/release-please.yml | 3 -- .../logging/.github/release-trigger.yml | 1 - .../logging/.github/sync-repo-settings.yaml | 26 ------------- handwritten/logging/.kokoro/common.cfg | 4 +- .../.kokoro/continuous/node14/common.cfg | 4 +- .../.kokoro/continuous/node14/lint.cfg | 2 +- .../continuous/node14/samples-test.cfg | 2 +- .../.kokoro/continuous/node14/system-test.cfg | 2 +- .../.kokoro/presubmit/node14/common.cfg | 4 +- .../.kokoro/presubmit/node14/samples-test.cfg | 2 +- .../.kokoro/presubmit/node14/system-test.cfg | 2 +- .../.kokoro/presubmit/windows/test.cfg | 2 +- handwritten/logging/.kokoro/publish-min.sh | 2 +- .../logging/.kokoro/release/docs-devsite.cfg | 4 +- handwritten/logging/.kokoro/release/docs.cfg | 4 +- .../logging/.kokoro/release/publish.cfg | 4 +- handwritten/logging/.kokoro/trampoline_v2.sh | 24 +++++++++++- handwritten/logging/.repo-metadata.json | 2 +- handwritten/logging/.trampolinerc | 2 +- handwritten/logging/owlbot.py | 4 +- handwritten/logging/package.json | 9 ++++- release-please-submodules.json | 7 ++-- 38 files changed, 61 insertions(+), 240 deletions(-) rename handwritten/logging/{.github => }/.OwlBot.yaml (81%) delete mode 100644 handwritten/logging/.github/.OwlBot.lock.yaml delete mode 100644 handwritten/logging/.github/CODEOWNERS delete mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/config.yml delete mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/question.md delete mode 100644 handwritten/logging/.github/ISSUE_TEMPLATE/support_request.md delete mode 100644 handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 handwritten/logging/.github/auto-approve.yml delete mode 100644 handwritten/logging/.github/auto-label.yaml delete mode 100644 handwritten/logging/.github/blunderbuss.yml delete mode 100644 handwritten/logging/.github/flakybot.yaml delete mode 100644 handwritten/logging/.github/generated-files-bot.yml delete mode 100644 handwritten/logging/.github/release-please.yml delete mode 100644 handwritten/logging/.github/release-trigger.yml delete mode 100644 handwritten/logging/.github/sync-repo-settings.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5b5deff2c22..b2def47efae 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,4 +11,4 @@ /handwritten/cloud-profiler @googleapis/cloud-profiler-team /handwritten/storage @googleapis/gcs-team /handwritten/firestore @googleapis/firestore-team -/handwritten/spanner @googleapis/spanner-team \ No newline at end of file +/handwritten/spanner @googleapis/spanner-team/handwritten/logging @googleapis/yoshi-nodejs diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0bc45c3c05a..e6d7c5dec3c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -2,8 +2,9 @@ "handwritten/bigquery": "8.2.0", "handwritten/cloud-profiler": "6.0.4", "handwritten/datastore": "10.1.0", - "handwritten/firestore": "8.3.0", "handwritten/error-reporting": "3.0.5", + "handwritten/firestore": "8.3.0", + "handwritten/logging": "11.2.1", "handwritten/logging-bunyan": "5.1.1", "handwritten/logging-winston": "6.0.1", "handwritten/spanner": "8.6.0", diff --git a/handwritten/logging/.github/.OwlBot.yaml b/handwritten/logging/.OwlBot.yaml similarity index 81% rename from handwritten/logging/.github/.OwlBot.yaml rename to handwritten/logging/.OwlBot.yaml index 97567a97e60..360ece41c70 100644 --- a/handwritten/logging/.github/.OwlBot.yaml +++ b/handwritten/logging/.OwlBot.yaml @@ -11,16 +11,14 @@ # 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. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/logging/(v.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/logging/(v.*)/.*-nodejs + dest: /owl-bot-staging/logging/$1 begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b diff --git a/handwritten/logging/.github/.OwlBot.lock.yaml b/handwritten/logging/.github/.OwlBot.lock.yaml deleted file mode 100644 index 34bb2086de0..00000000000 --- a/handwritten/logging/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:68e1cece0d6d3336c4f1cb9d2857b020af5574dff6da6349293d1c6d4eea82d8 -# created: 2024-05-31T15:46:42.989947733Z diff --git a/handwritten/logging/.github/CODEOWNERS b/handwritten/logging/.github/CODEOWNERS deleted file mode 100644 index 80520bbaac3..00000000000 --- a/handwritten/logging/.github/CODEOWNERS +++ /dev/null @@ -1,12 +0,0 @@ -# Code owners file. -# This file controls who is tagged for review for any given pull request. -# -# For syntax help see: -# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax - - -# The yoshi-nodejs team is the default owner for nodejs repositories. -* @googleapis/yoshi-nodejs - -# The github automation team is the default owner for the auto-approve file. -.github/auto-approve.yml @googleapis/github-automation diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md b/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 7f65b7b5b69..00000000000 --- a/handwritten/logging/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -labels: 'type: bug, priority: p2' ---- - -Thanks for stopping by to let us know something could be better! - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. - -1) Is this a client library issue or a product issue? -This is the client library for . We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the [ Support page]() to reach the most relevant engineers. - -2) Did someone already solve this? - - Search the issues already opened: https://github.com/googleapis/nodejs-logging/issues - - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node - - Search or ask on StackOverflow (engineers monitor these tags): http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js - -3) Do you have a support contract? -Please create an issue in the [support console](https://cloud.google.com/support/) to ensure a timely response. - -If the support paths suggested above still do not result in a resolution, please provide the following details. - -#### Environment details - - - OS: - - Node.js version: - - npm version: - - `@google-cloud/logging` version: - -#### Steps to reproduce - - 1. ? - 2. ? - -Making sure to follow these steps will guarantee the quickest resolution possible. - -Thanks! diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/config.yml b/handwritten/logging/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 603b90133b6..00000000000 --- a/handwritten/logging/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -contact_links: - - name: Google Cloud Support - url: https://cloud.google.com/support/ - about: If you have a support contract with Google, please use the Google Cloud Support portal. diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md b/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index b0327dfa02e..00000000000 --- a/handwritten/logging/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this library -labels: 'type: feature request, priority: p3' ---- - -Thanks for stopping by to let us know something could be better! - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. - - **Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - **Describe the solution you'd like** -A clear and concise description of what you want to happen. - **Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - **Additional context** -Add any other context or screenshots about the feature request here. diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/question.md b/handwritten/logging/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 97323113911..00000000000 --- a/handwritten/logging/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Question -about: Ask a question -labels: 'type: question, priority: p3' ---- - -Thanks for stopping by to ask us a question! Please make sure to include: -- What you're trying to do -- What code you've already tried -- Any error messages you're getting - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/handwritten/logging/.github/ISSUE_TEMPLATE/support_request.md b/handwritten/logging/.github/ISSUE_TEMPLATE/support_request.md deleted file mode 100644 index 99586903212..00000000000 --- a/handwritten/logging/.github/ISSUE_TEMPLATE/support_request.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: Support request -about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. - ---- - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md b/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index a8d94134a27..00000000000 --- a/handwritten/logging/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ -Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: -- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-logging/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea -- [ ] Ensure the tests and linter pass -- [ ] Code coverage does not decrease (if any source code was changed) -- [ ] Appropriate docs were updated (if necessary) - -Fixes # 🦕 diff --git a/handwritten/logging/.github/auto-approve.yml b/handwritten/logging/.github/auto-approve.yml deleted file mode 100644 index ec51b072dca..00000000000 --- a/handwritten/logging/.github/auto-approve.yml +++ /dev/null @@ -1,4 +0,0 @@ -processes: - - "NodeDependency" - - "OwlBotTemplateChangesNode" - - "OwlBotPRsNode" \ No newline at end of file diff --git a/handwritten/logging/.github/auto-label.yaml b/handwritten/logging/.github/auto-label.yaml deleted file mode 100644 index ccad49b4ebf..00000000000 --- a/handwritten/logging/.github/auto-label.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -requestsize: - enabled: true -staleness: - pullrequest: true - old: 30 - extraold: 60 diff --git a/handwritten/logging/.github/blunderbuss.yml b/handwritten/logging/.github/blunderbuss.yml deleted file mode 100644 index 768497b9931..00000000000 --- a/handwritten/logging/.github/blunderbuss.yml +++ /dev/null @@ -1,4 +0,0 @@ -assign_issues: - - googleapis/yoshi-nodejs -assign_prs: - - googleapis/yoshi-nodejs diff --git a/handwritten/logging/.github/flakybot.yaml b/handwritten/logging/.github/flakybot.yaml deleted file mode 100644 index 78ff93dc6c2..00000000000 --- a/handwritten/logging/.github/flakybot.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -issuePriority: p2 - diff --git a/handwritten/logging/.github/generated-files-bot.yml b/handwritten/logging/.github/generated-files-bot.yml deleted file mode 100644 index 992ccef4a13..00000000000 --- a/handwritten/logging/.github/generated-files-bot.yml +++ /dev/null @@ -1,16 +0,0 @@ -generatedFiles: -- path: '.kokoro/**' - message: '`.kokoro` files are templated and should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' -- path: '.github/CODEOWNERS' - message: 'CODEOWNERS should instead be modified via the `codeowner_team` property in .repo-metadata.json' -- path: '.github/workflows/ci.yaml' - message: '`.github/workflows/ci.yaml` (GitHub Actions) should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' -- path: '.github/generated-files-bot.+(yml|yaml)' - message: '`.github/generated-files-bot.(yml|yaml)` should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' -- path: 'README.md' - message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/main/.readme-partials.yaml' -- path: 'samples/README.md' - message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/main/.readme-partials.yaml' -ignoreAuthors: -- 'gcf-owl-bot[bot]' -- 'yoshi-automation' diff --git a/handwritten/logging/.github/release-please.yml b/handwritten/logging/.github/release-please.yml deleted file mode 100644 index e38b6169b2c..00000000000 --- a/handwritten/logging/.github/release-please.yml +++ /dev/null @@ -1,3 +0,0 @@ -handleGHRelease: true -releaseType: node -extraFiles: ["src/utils/instrumentation.ts"] diff --git a/handwritten/logging/.github/release-trigger.yml b/handwritten/logging/.github/release-trigger.yml deleted file mode 100644 index d4ca94189e1..00000000000 --- a/handwritten/logging/.github/release-trigger.yml +++ /dev/null @@ -1 +0,0 @@ -enabled: true diff --git a/handwritten/logging/.github/sync-repo-settings.yaml b/handwritten/logging/.github/sync-repo-settings.yaml deleted file mode 100644 index 5edb586a6ed..00000000000 --- a/handwritten/logging/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -branchProtectionRules: - - pattern: main - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: true - requiredStatusCheckContexts: - - "ci/kokoro: Samples test" - - "ci/kokoro: System test" - - docs - - lint - - test (14) - - test (16) - - test (18) - - test (20) - - cla/google - - windows - - OwlBot Post Processor -permissionRules: - - team: yoshi-admins - permission: admin - - team: jsteam-admins - permission: admin - - team: jsteam - permission: push - diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 593a07b2232..42d2b8f10c9 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" +build_file: "nodejs-logging/handwritten/logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,7 +20,7 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/test.sh" } diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 593a07b2232..42d2b8f10c9 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" +build_file: "nodejs-logging/handwritten/logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,7 +20,7 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/test.sh" } diff --git a/handwritten/logging/.kokoro/continuous/node14/lint.cfg b/handwritten/logging/.kokoro/continuous/node14/lint.cfg index 403216c3eaa..8794c149f8e 100644 --- a/handwritten/logging/.kokoro/continuous/node14/lint.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/lint.cfg @@ -1,4 +1,4 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/lint.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/lint.sh" } diff --git a/handwritten/logging/.kokoro/continuous/node14/samples-test.cfg b/handwritten/logging/.kokoro/continuous/node14/samples-test.cfg index 30039fd9879..96c90e6f20a 100644 --- a/handwritten/logging/.kokoro/continuous/node14/samples-test.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/samples-test.cfg @@ -3,7 +3,7 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/samples-test.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/samples-test.sh" } env_vars: { diff --git a/handwritten/logging/.kokoro/continuous/node14/system-test.cfg b/handwritten/logging/.kokoro/continuous/node14/system-test.cfg index a366b35529f..9d3b97c982d 100644 --- a/handwritten/logging/.kokoro/continuous/node14/system-test.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/system-test.cfg @@ -3,7 +3,7 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/system-test.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/system-test.sh" } env_vars: { diff --git a/handwritten/logging/.kokoro/presubmit/node14/common.cfg b/handwritten/logging/.kokoro/presubmit/node14/common.cfg index f55932f1268..cbe17d2bdaa 100644 --- a/handwritten/logging/.kokoro/presubmit/node14/common.cfg +++ b/handwritten/logging/.kokoro/presubmit/node14/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" +build_file: "nodejs-logging/handwritten/logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,5 +20,5 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/test.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/test.sh" } diff --git a/handwritten/logging/.kokoro/presubmit/node14/samples-test.cfg b/handwritten/logging/.kokoro/presubmit/node14/samples-test.cfg index 30039fd9879..96c90e6f20a 100644 --- a/handwritten/logging/.kokoro/presubmit/node14/samples-test.cfg +++ b/handwritten/logging/.kokoro/presubmit/node14/samples-test.cfg @@ -3,7 +3,7 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/samples-test.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/samples-test.sh" } env_vars: { diff --git a/handwritten/logging/.kokoro/presubmit/node14/system-test.cfg b/handwritten/logging/.kokoro/presubmit/node14/system-test.cfg index a366b35529f..9d3b97c982d 100644 --- a/handwritten/logging/.kokoro/presubmit/node14/system-test.cfg +++ b/handwritten/logging/.kokoro/presubmit/node14/system-test.cfg @@ -3,7 +3,7 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/system-test.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/system-test.sh" } env_vars: { diff --git a/handwritten/logging/.kokoro/presubmit/windows/test.cfg b/handwritten/logging/.kokoro/presubmit/windows/test.cfg index b799cf1b0d3..1612393f88b 100644 --- a/handwritten/logging/.kokoro/presubmit/windows/test.cfg +++ b/handwritten/logging/.kokoro/presubmit/windows/test.cfg @@ -1,2 +1,2 @@ # Use the test file directly -build_file: "nodejs-logging/.kokoro/test.bat" +build_file: "nodejs-logging/handwritten/logging/.kokoro/test.bat" diff --git a/handwritten/logging/.kokoro/publish-min.sh b/handwritten/logging/.kokoro/publish-min.sh index 96a1635898a..20fb074bfdf 100755 --- a/handwritten/logging/.kokoro/publish-min.sh +++ b/handwritten/logging/.kokoro/publish-min.sh @@ -15,7 +15,7 @@ # limitations under the License. # `npm postpublish` script that ships an minified version of this library -# Todo(nicolezhu): Eventually deprecate this script for go/nodejs-logging-lite +# Todo(nicolezhu): Eventually deprecate this script for go/nodejs-logging/handwritten/logging-lite set -eo pipefail diff --git a/handwritten/logging/.kokoro/release/docs-devsite.cfg b/handwritten/logging/.kokoro/release/docs-devsite.cfg index 08598059678..c146ed5bb32 100644 --- a/handwritten/logging/.kokoro/release/docs-devsite.cfg +++ b/handwritten/logging/.kokoro/release/docs-devsite.cfg @@ -18,9 +18,9 @@ env_vars: { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" +build_file: "nodejs-logging/handwritten/logging/.kokoro/trampoline_v2.sh" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/release/docs-devsite.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/release/docs-devsite.sh" } diff --git a/handwritten/logging/.kokoro/release/docs.cfg b/handwritten/logging/.kokoro/release/docs.cfg index c7e7196bff4..f8b03cf5b1d 100644 --- a/handwritten/logging/.kokoro/release/docs.cfg +++ b/handwritten/logging/.kokoro/release/docs.cfg @@ -18,9 +18,9 @@ env_vars: { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" +build_file: "nodejs-logging/handwritten/logging/.kokoro/trampoline_v2.sh" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/release/docs.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/release/docs.sh" } diff --git a/handwritten/logging/.kokoro/release/publish.cfg b/handwritten/logging/.kokoro/release/publish.cfg index f3ac1440b0b..b01c087fa70 100644 --- a/handwritten/logging/.kokoro/release/publish.cfg +++ b/handwritten/logging/.kokoro/release/publish.cfg @@ -25,7 +25,7 @@ env_vars: { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "nodejs-logging/.kokoro/trampoline_v2.sh" +build_file: "nodejs-logging/handwritten/logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -35,7 +35,7 @@ env_vars: { env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-logging/.kokoro/publish.sh" + value: "github/nodejs-logging/handwritten/logging/.kokoro/publish.sh" } # Store the packages we uploaded to npmjs.org and their corresponding diff --git a/handwritten/logging/.kokoro/trampoline_v2.sh b/handwritten/logging/.kokoro/trampoline_v2.sh index 4d03112128a..ce3e779c788 100755 --- a/handwritten/logging/.kokoro/trampoline_v2.sh +++ b/handwritten/logging/.kokoro/trampoline_v2.sh @@ -246,14 +246,34 @@ function repo_root() { if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then PROGRAM_PATH="$(realpath "$0")" PROGRAM_DIR="$(dirname "${PROGRAM_PATH}")" - PROJECT_ROOT="$(repo_root "${PROGRAM_DIR}")" + PROJECT_ROOT="$(repo_root "${PROGRAM_DIR}")/handwritten/logging" else - PROJECT_ROOT="$(repo_root $(pwd))" + PROJECT_ROOT="$(repo_root $(pwd))/handwritten/logging" fi log_yellow "Changing to the project root: ${PROJECT_ROOT}." cd "${PROJECT_ROOT}" +# Auto-injected conditional check +# Check if the package directory has changes. If not, skip tests. +if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then + # The package path is hardcoded during migration + RELATIVE_PKG_PATH="handwritten/logging" + + echo "Checking for changes in ${RELATIVE_PKG_PATH}..." + + # Determine the diff range based on the CI system/event + # Safe default: HEAD~1..HEAD + DIFF_RANGE="HEAD~1..HEAD" + + if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." + exit 0 + else + echo "Changes detected in ${RELATIVE_PKG_PATH}. Proceeding with tests." + fi +fi + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/logging/.repo-metadata.json b/handwritten/logging/.repo-metadata.json index e2f55ae0847..b51378d7189 100644 --- a/handwritten/logging/.repo-metadata.json +++ b/handwritten/logging/.repo-metadata.json @@ -7,7 +7,7 @@ "language": "nodejs", "api_id": "logging.googleapis.com", "distribution_name": "@google-cloud/logging", - "repo": "googleapis/nodejs-logging", + "repo": "googleapis/google-cloud-node", "issue_tracker": "https://issuetracker.google.com/savedsearches/559764", "name_pretty": "Cloud Logging", "default_version": "v2", diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index e7bdc633423..f1ac3ee1315 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -50,4 +50,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/handwritten/logging/.kokoro/populate-secrets.sh diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index 58d77a55aee..3dbad15fbb2 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -16,9 +16,9 @@ import os import synthtool as s -import synthtool.languages.node as node +import synthtool.languages.node_mono_repo as node -node.owlbot_main( +node.owlbot_main(relative_dir="handwritten/logging", staging_excludes=[ ".eslintignore", ".prettierignore", "src/index.ts", "README.md", "package.json", "system-test/fixtures/sample/src/index.js", diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index 1e5db61cbb8..d6c7a148608 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -16,7 +16,11 @@ "stackdriver logging", "stackdriver" ], - "repository": "googleapis/nodejs-logging", + "repository": { + "type": "git", + "directory": "handwritten/logging", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, "license": "Apache-2.0", "author": "Google Inc.", "main": "build/src/index.js", @@ -105,5 +109,6 @@ }, "engines": { "node": ">=14.0.0" - } + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging" } diff --git a/release-please-submodules.json b/release-please-submodules.json index 5d452011a21..7ed1e326600 100644 --- a/release-please-submodules.json +++ b/release-please-submodules.json @@ -11,12 +11,13 @@ "handwritten/datastore": { "component": "datastore" }, - "handwritten/firestore": { - "component": "firestore" - }, "handwritten/error-reporting": { "component": "error-reporting" }, + "handwritten/firestore": { + "component": "firestore" + }, + "handwritten/logging": {}, "handwritten/logging-bunyan": { "component": "logging-bunyan" }, From 9afeb8e49408f282ebca3a3f2adcf6bc97599852 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 5 Mar 2026 19:17:14 +0000 Subject: [PATCH 0998/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.mocharc.js | 2 +- handwritten/logging/.prettierrc.js | 2 +- handwritten/logging/README.md | 254 +-- handwritten/logging/protos/protos.d.ts | 549 ++++- handwritten/logging/protos/protos.js | 1812 ++++++++++++++++- handwritten/logging/protos/protos.json | 240 ++- handwritten/logging/samples/README.md | 806 ++++++++ handwritten/logging/src/entry.ts | 2 +- handwritten/logging/src/index.ts | 66 +- handwritten/logging/src/log-sync.ts | 20 +- handwritten/logging/src/log.ts | 82 +- .../src/middleware/express/make-middleware.ts | 10 +- handwritten/logging/src/sink.ts | 10 +- handwritten/logging/src/utils/common.ts | 2 +- handwritten/logging/src/utils/context.ts | 18 +- handwritten/logging/src/utils/http-request.ts | 4 +- .../logging/src/utils/instrumentation.ts | 8 +- handwritten/logging/src/utils/log-common.ts | 8 +- handwritten/logging/src/utils/metadata.ts | 2 +- .../src/v2/config_service_v2_client.ts | 724 +++---- .../src/v2/logging_service_v2_client.ts | 430 ++-- .../src/v2/metrics_service_v2_client.ts | 398 ++-- handwritten/logging/system-test/install.ts | 4 +- handwritten/logging/system-test/logging.ts | 58 +- handwritten/logging/test/entry.ts | 28 +- .../test/gapic_config_service_v2_v2.ts | 1392 ++++++------- .../test/gapic_logging_service_v2_v2.ts | 498 ++--- .../test/gapic_metrics_service_v2_v2.ts | 448 ++-- handwritten/logging/test/index.ts | 40 +- handwritten/logging/test/instrumentation.ts | 46 +- handwritten/logging/test/log-sync.ts | 4 +- handwritten/logging/test/log.ts | 96 +- .../express/test-make-middleware.ts | 4 +- handwritten/logging/test/sink.ts | 10 +- handwritten/logging/test/utils/common.ts | 4 +- handwritten/logging/test/utils/context.ts | 24 +- .../logging/test/utils/http-request.ts | 8 +- handwritten/logging/test/utils/log-common.ts | 4 +- handwritten/logging/test/utils/metadata.ts | 4 +- 39 files changed, 5637 insertions(+), 2484 deletions(-) create mode 100644 handwritten/logging/samples/README.md diff --git a/handwritten/logging/.mocharc.js b/handwritten/logging/.mocharc.js index 0b600509bed..2431859019f 100644 --- a/handwritten/logging/.mocharc.js +++ b/handwritten/logging/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/.prettierrc.js b/handwritten/logging/.prettierrc.js index d1b95106f4c..d2eddc2ed89 100644 --- a/handwritten/logging/.prettierrc.js +++ b/handwritten/logging/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index a2f913a7942..10d1d2b04d0 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -2,37 +2,23 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) +# [Cloud Logging: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) +[![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.com/package/@google-cloud/logging) -[Google Cloud Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, -monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. - -If you require lightweight dependencies, an experimental, minified version of -this library is available at [@google-cloud/logging-min](https://www.npmjs.com/package/@google-cloud/logging-min). -Note: `logging-min` is experimental, and its feature surface is subject to change. -To install `@google-cloud/logging-min` library run the following command: - -```bash -npm install @google-cloud/logging-min -``` - -For an interactive tutorial on using the client library in a Node.js application, click Guide Me: - -[![Guide Me](https://raw.githubusercontent.com/googleapis/nodejs-logging/main/_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-nodejs) +Cloud Logging Client Library for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging/CHANGELOG.md). * [Cloud Logging Node.js Client API Reference][client-docs] * [Cloud Logging Documentation][product-docs] -* [github.com/googleapis/nodejs-logging](https://github.com/googleapis/nodejs-logging) +* [github.com/googleapis/google-cloud-node/handwritten/logging](https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -45,7 +31,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - * [Using the client library](#using-the-client-library) + * [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) @@ -57,7 +43,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable the Cloud Logging API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -67,189 +53,57 @@ npm install @google-cloud/logging ``` -### Using the client library - -```javascript -// Imports the Google Cloud client library -const {Logging} = require('@google-cloud/logging'); - -async function quickstart( - projectId = 'YOUR_PROJECT_ID', // Your Google Cloud Platform project ID - logName = 'my-log' // The name of the log to write to -) { - // Creates a client - const logging = new Logging({projectId}); - - // Selects the log to write to - const log = logging.log(logName); - - // The data to write to the log - const text = 'Hello, world!'; - - // The metadata associated with the entry - const metadata = { - resource: {type: 'global'}, - // See: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity - severity: 'INFO', - }; - - // Prepares a log entry - const entry = log.entry(metadata, text); - - async function writeLog() { - // Writes the log entry - await log.write(entry); - console.log(`Logged: ${text}`); - } - writeLog(); -} - -``` -## Batching Writes - -High throughput applications should avoid awaiting calls to the logger: - -```js -await log.write(logEntry1); -await log.write(logEntry2); -``` - -Rather, applications should use a _fire and forget_ approach: - -```js -log.write(logEntry1); -log.write(logEntry2); -``` - -The `@google-cloud/logging` library will handle batching and dispatching -these log lines to the API. - -## Writing to Stdout - -The `LogSync` class helps users easily write context-rich structured logs to -`stdout` or any custom transport. It extracts additional log properties like -trace context from HTTP headers and can be used as an on/off toggle between -writing to the API or to `stdout` during local development. - -Logs written to `stdout` are then picked up, out-of-process, by a Logging -agent in the respective GCP environment. Logging agents can add more -properties to each entry before streaming it to the Logging API. - -Read more about [Logging agents](https://cloud.google.com/logging/docs/agent/logging). - -Serverless applications like Cloud Functions, Cloud Run, and App Engine -are highly recommended to use the `LogSync` class as async logs may be dropped -due to lack of CPU. - -Read more about [structured logging](https://cloud.google.com/logging/docs/structured-logging). - -```js -// Optional: Create and configure a client -const logging = new Logging(); -await logging.setProjectId() -await logging.setDetectedResource() - -// Create a LogSync transport, defaulting to `process.stdout` -const log = logging.logSync(logname); -const meta = { // optional field overrides here }; -const entry = log.entry(meta, 'Your log message'); -log.write(entry); - -// Syntax sugar for logging at a specific severity -log.alert(entry); -log.warning(entry); -``` - -## Populating Http request metadata - -Metadata about Http request is a part of the [structured log info](https://cloud.google.com/logging/docs/structured-logging) -that can be captured within each log entry. It can provide a context for the application logs and -is used to group multiple log entries under the load balancer request logs. See the [sample](https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js) -how to populate the Http request metadata for log entries. - -If you already have a "raw" Http `request` object you can assign it to `entry.metadata.httpRequest` directly. More information about -how the `request` is interpreted as raw can be found in the [code](https://github.com/googleapis/nodejs-logging/blob/15849160116a814ab71113138cb211c2e0c2d4b4/src/entry.ts#L224-L238). - -## Automatic Trace/Span ID Extraction -Cloud Logging libraries use [trace fields within LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace) to capture trace contexts, which enables the [correlation of logs and traces](https://cloud.google.com/logging/docs/view/correlate-logs), and distributed tracing troubleshooting. -These tracing fields, including [trace](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace), [spanId](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.span_id), and [traceSampled](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace_sampled), define the trace context for a `LogEntry`. - -If not provided explicitly in a LogEntry, the Cloud Logging library automatically populates `trace`, `span_id`, and `trace_sampled` fields from detected OpenTelemetry span contexts, or from HTTP request headers. - -### Extracting Trace/Span ID from OpenTelemetry Context -If you are using OpenTelemetry and there is an active span in the OpenTelemetry Context, the `trace`, `span_id`, and `trace_sampled` fields in the log entry are automatically populated from the active span. More information about OpenTelemetry can be found [here](https://opentelemetry.io/docs/languages/js/). - -### Extracting Trace/Span ID from HTTP Headers -If tracing fields are not provided explicitly and no OpenTelemetry context is detected, the `trace` / `span_id` fields are extracted automatically from HTTP headers. -Trace information can be automatically populated from either the [W3C Traceparent](https://www.w3.org/TR/trace-context) or [X-Cloud-Trace-Context](https://cloud.google.com/trace/docs/trace-context#legacy-http-header) headers. - -## Error handling with logs written or deleted asynchronously - -The `Log` class provide users the ability to write and delete logs asynchronously. However, there are cases when log entries -cannot be written or deleted and error is thrown - if error is not handled properly, it could crash the application. -One possible way to catch the error is to `await` the log write/delete calls and wrap it with `try/catch` like in example below: - -```js - // Write log entry and and catch any errors - try { - await log.write(entry); - } catch (err) { - console.log('Error is: ' + err); - } -``` - -However, awaiting for every `log.write` or `log.delete` calls may introduce delays which could be avoided by -simply adding a callback like in the example below. This way the log entry can be queued for processing and code -execution will continue without further delays. The callback will be called once the operation is complete: - -```js - // Asynchronously write the log entry and handle respone or any errors in provided callback - log.write(entry, err => { - if (err) { - // The log entry was not written. - console.log(err.message); - } else { - console.log('No error in write callback!'); - } - }); -``` - -Adding a callback to every `log.write` or `log.delete` calls could be a burden, especially if code -handling the error is always the same. For this purpose we introduced an ability to provide a default callback -for `Log` class which could be set through `LogOptions` passed to `Log` constructor as in example below - this -way you can define a global callback once for all `log.write` and `log.delete` calls and be able to handle errors: - -```js - const {Logging} = require('@google-cloud/logging'); - const logging = new Logging(); - - // Create options with default callback to be called on every write/delete response or error - const options = { - defaultWriteDeleteCallback: function (err) { - if (err) { - console.log('Error is: ' + err); - } else { - console.log('No error, all is good!'); - } - }, - }; - - const log = logging.log('my-log', options); -``` -See the full sample in `writeLogWithCallback` function [here](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js). ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Fluent | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/fluent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/fluent.js,samples/README.md) | -| Log HTTP Request | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/http-request.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/http-request.js,samples/README.md) | -| Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/logs.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | +| Config_service_v2.copy_log_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js,handwritten/logging/samples/README.md) | +| Config_service_v2.create_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js,handwritten/logging/samples/README.md) | +| Config_service_v2.create_bucket_async | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js,handwritten/logging/samples/README.md) | +| Config_service_v2.create_exclusion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js,handwritten/logging/samples/README.md) | +| Config_service_v2.create_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_link.js,handwritten/logging/samples/README.md) | +| Config_service_v2.create_sink | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js,handwritten/logging/samples/README.md) | +| Config_service_v2.create_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_view.js,handwritten/logging/samples/README.md) | +| Config_service_v2.delete_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js,handwritten/logging/samples/README.md) | +| Config_service_v2.delete_exclusion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js,handwritten/logging/samples/README.md) | +| Config_service_v2.delete_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js,handwritten/logging/samples/README.md) | +| Config_service_v2.delete_sink | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js,handwritten/logging/samples/README.md) | +| Config_service_v2.delete_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js,handwritten/logging/samples/README.md) | +| Config_service_v2.get_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js,handwritten/logging/samples/README.md) | +| Config_service_v2.get_cmek_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js,handwritten/logging/samples/README.md) | +| Config_service_v2.get_exclusion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js,handwritten/logging/samples/README.md) | +| Config_service_v2.get_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_link.js,handwritten/logging/samples/README.md) | +| Config_service_v2.get_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js,handwritten/logging/samples/README.md) | +| Config_service_v2.get_sink | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js,handwritten/logging/samples/README.md) | +| Config_service_v2.get_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_view.js,handwritten/logging/samples/README.md) | +| Config_service_v2.list_buckets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js,handwritten/logging/samples/README.md) | +| Config_service_v2.list_exclusions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js,handwritten/logging/samples/README.md) | +| Config_service_v2.list_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_links.js,handwritten/logging/samples/README.md) | +| Config_service_v2.list_sinks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js,handwritten/logging/samples/README.md) | +| Config_service_v2.list_views | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_views.js,handwritten/logging/samples/README.md) | +| Config_service_v2.undelete_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js,handwritten/logging/samples/README.md) | +| Config_service_v2.update_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js,handwritten/logging/samples/README.md) | +| Config_service_v2.update_bucket_async | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js,handwritten/logging/samples/README.md) | +| Config_service_v2.update_cmek_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js,handwritten/logging/samples/README.md) | +| Config_service_v2.update_exclusion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js,handwritten/logging/samples/README.md) | +| Config_service_v2.update_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js,handwritten/logging/samples/README.md) | +| Config_service_v2.update_sink | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js,handwritten/logging/samples/README.md) | +| Config_service_v2.update_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_view.js,handwritten/logging/samples/README.md) | +| Logging_service_v2.delete_log | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js,handwritten/logging/samples/README.md) | +| Logging_service_v2.list_log_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js,handwritten/logging/samples/README.md) | +| Logging_service_v2.list_logs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js,handwritten/logging/samples/README.md) | +| Logging_service_v2.list_monitored_resource_descriptors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js,handwritten/logging/samples/README.md) | +| Logging_service_v2.tail_log_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js,handwritten/logging/samples/README.md) | +| Logging_service_v2.write_log_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js,handwritten/logging/samples/README.md) | +| Metrics_service_v2.create_log_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js,handwritten/logging/samples/README.md) | +| Metrics_service_v2.delete_log_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js,handwritten/logging/samples/README.md) | +| Metrics_service_v2.get_log_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js,handwritten/logging/samples/README.md) | +| Metrics_service_v2.list_log_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js,handwritten/logging/samples/README.md) | +| Metrics_service_v2.update_log_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js,handwritten/logging/samples/README.md) | @@ -299,7 +153,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-logging/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -311,7 +165,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest [product-docs]: https://cloud.google.com/logging/docs @@ -319,4 +173,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/handwritten/logging/protos/protos.d.ts b/handwritten/logging/protos/protos.d.ts index 8b3a988808d..f38aaea6fba 100644 --- a/handwritten/logging/protos/protos.d.ts +++ b/handwritten/logging/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -223,6 +223,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -253,6 +254,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -302,6 +306,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -436,6 +443,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -477,6 +487,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -1324,6 +1337,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -1350,6 +1366,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -2284,6 +2303,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -2339,6 +2361,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2559,6 +2584,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -2797,6 +2937,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -2819,6 +2962,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -3171,7 +3317,7 @@ export namespace google { doubleValue?: (number|null); /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + stringValue?: (Uint8Array|Buffer|string|null); /** UninterpretedOption aggregateValue */ aggregateValue?: (string|null); @@ -3202,7 +3348,7 @@ export namespace google { public doubleValue: number; /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); + public stringValue: (Uint8Array|Buffer|string); /** UninterpretedOption aggregateValue. */ public aggregateValue: string; @@ -3411,6 +3557,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -3440,6 +3592,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -3562,6 +3720,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -3681,8 +3949,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -3697,8 +3968,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -4231,6 +4505,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Struct. */ interface IStruct { @@ -4567,7 +4848,7 @@ export namespace google { type_url?: (string|null); /** Any value */ - value?: (Uint8Array|string|null); + value?: (Uint8Array|Buffer|string|null); } /** Represents an Any. */ @@ -4583,7 +4864,7 @@ export namespace google { public type_url: string; /** Any value. */ - public value: (Uint8Array|string); + public value: (Uint8Array|Buffer|string); /** * Creates a new Any instance using the specified properties. @@ -15416,6 +15697,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -15433,6 +15717,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -16133,6 +16420,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -16147,6 +16437,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -16225,6 +16518,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a NodeSettings. */ interface INodeSettings { @@ -16551,6 +16956,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -16565,6 +16973,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -16889,6 +17300,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Distribution. */ interface IDistribution { @@ -17856,6 +18370,9 @@ export namespace google { /** MetricDescriptorMetadata ingestDelay */ ingestDelay?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata timeSeriesResourceHierarchyLevel */ + timeSeriesResourceHierarchyLevel?: (google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[]|null); } /** Represents a MetricDescriptorMetadata. */ @@ -17876,6 +18393,9 @@ export namespace google { /** MetricDescriptorMetadata ingestDelay. */ public ingestDelay?: (google.protobuf.IDuration|null); + /** MetricDescriptorMetadata timeSeriesResourceHierarchyLevel. */ + public timeSeriesResourceHierarchyLevel: google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[]; + /** * Creates a new MetricDescriptorMetadata instance using the specified properties. * @param [properties] Properties to set @@ -17953,6 +18473,17 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + namespace MetricDescriptorMetadata { + + /** TimeSeriesResourceHierarchyLevel enum. */ + enum TimeSeriesResourceHierarchyLevel { + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0, + PROJECT = 1, + ORGANIZATION = 2, + FOLDER = 3 + } + } } /** Properties of a Metric. */ diff --git a/handwritten/logging/protos/protos.js b/handwritten/logging/protos/protos.js index a78662d6cef..63c11170997 100644 --- a/handwritten/logging/protos/protos.js +++ b/handwritten/logging/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -522,6 +522,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY value * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value * @property {number} EDITION_2023=1000 EDITION_2023 value @@ -536,6 +537,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -560,6 +562,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -582,6 +585,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -632,6 +636,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -753,6 +765,9 @@ writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -825,6 +840,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -927,6 +948,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -981,6 +1009,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -1033,6 +1062,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -1096,6 +1132,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -1161,6 +1201,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -1217,6 +1258,11 @@ object.syntax = message.syntax; if (message.edition != null && message.hasOwnProperty("edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -1265,6 +1311,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -1370,6 +1417,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -1422,6 +1477,8 @@ if (message.reservedName != null && message.reservedName.length) for (var i = 0; i < message.reservedName.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -1514,6 +1571,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1627,6 +1688,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -1726,6 +1796,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -1755,6 +1845,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1800,6 +1891,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -3844,6 +3937,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -3904,6 +3998,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -3941,6 +4043,8 @@ if (message.reservedName != null && message.reservedName.length) for (var i = 0; i < message.reservedName.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -4003,6 +4107,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4071,6 +4179,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -4120,6 +4237,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -4144,6 +4281,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -4164,6 +4302,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -6482,6 +6622,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference @@ -6602,6 +6743,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -6676,6 +6825,8 @@ $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -6777,6 +6928,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -6912,6 +7067,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -7100,6 +7260,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -7197,6 +7362,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -7229,6 +7395,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -7501,6 +7669,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -7542,6 +7711,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -7641,6 +7814,488 @@ return EditionDefault; })(); + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + return FieldOptions; })(); @@ -8233,6 +8888,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -8276,6 +8932,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -8314,6 +8978,8 @@ $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -8365,6 +9031,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -8417,6 +9087,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -8450,6 +9125,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -8482,6 +9162,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -8489,6 +9170,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -9956,6 +10639,8 @@ * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -10021,6 +10706,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -10057,6 +10758,10 @@ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -10117,6 +10822,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -10207,6 +10920,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -10346,6 +11079,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -10369,6 +11150,8 @@ object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; } if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; @@ -10382,6 +11165,10 @@ object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -10509,6 +11296,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -10693,6 +11693,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -10710,6 +11711,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -10758,6 +11760,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -10810,6 +11816,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -10918,7 +11928,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -10945,12 +11956,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -10976,10 +11995,12 @@ FeatureSetEditionDefault.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -11020,8 +12041,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -11064,6 +12089,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -11076,10 +12102,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -11107,6 +12138,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -11148,10 +12183,15 @@ message.edition = 2147483647; break; } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -11170,13 +12210,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.edition != null && message.hasOwnProperty("edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -12391,6 +13434,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Struct = (function() { /** @@ -39445,6 +40504,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -39479,6 +40539,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -39511,6 +40579,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -39562,6 +40632,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -39613,6 +40687,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -39655,6 +40734,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -39673,8 +40757,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -39682,6 +40768,8 @@ for (var j = 0; j < message.destinations.length; ++j) object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -41504,6 +42592,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -41529,6 +42618,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -41555,6 +42652,8 @@ writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -41595,6 +42694,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -41635,6 +42738,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -41655,6 +42763,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -41671,10 +42784,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -41704,6 +42821,258 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); @@ -42580,6 +43949,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -42591,6 +43961,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42605,6 +43976,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -42631,6 +44010,9 @@ writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); return writer; }; @@ -42661,7 +44043,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -42671,6 +44053,29 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -42711,6 +44116,14 @@ if (error) return "common." + error; } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } return null; }; @@ -42731,6 +44144,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } return message; }; @@ -42747,10 +44167,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; if (options.defaults) object.common = null; if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } return object; }; @@ -43389,6 +44817,251 @@ return values; })(); + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + api.Distribution = (function() { /** @@ -46004,6 +47677,7 @@ * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay + * @property {Array.|null} [timeSeriesResourceHierarchyLevel] MetricDescriptorMetadata timeSeriesResourceHierarchyLevel */ /** @@ -46015,6 +47689,7 @@ * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set */ function MetricDescriptorMetadata(properties) { + this.timeSeriesResourceHierarchyLevel = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46045,6 +47720,14 @@ */ MetricDescriptorMetadata.prototype.ingestDelay = null; + /** + * MetricDescriptorMetadata timeSeriesResourceHierarchyLevel. + * @member {Array.} timeSeriesResourceHierarchyLevel + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.timeSeriesResourceHierarchyLevel = $util.emptyArray; + /** * Creates a new MetricDescriptorMetadata instance using the specified properties. * @function create @@ -46075,6 +47758,12 @@ $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timeSeriesResourceHierarchyLevel != null && message.timeSeriesResourceHierarchyLevel.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.timeSeriesResourceHierarchyLevel.length; ++i) + writer.int32(message.timeSeriesResourceHierarchyLevel[i]); + writer.ldelim(); + } return writer; }; @@ -46123,6 +47812,17 @@ message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } + case 4: { + if (!(message.timeSeriesResourceHierarchyLevel && message.timeSeriesResourceHierarchyLevel.length)) + message.timeSeriesResourceHierarchyLevel = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.timeSeriesResourceHierarchyLevel.push(reader.int32()); + } else + message.timeSeriesResourceHierarchyLevel.push(reader.int32()); + break; + } default: reader.skipType(tag & 7); break; @@ -46182,6 +47882,20 @@ if (error) return "ingestDelay." + error; } + if (message.timeSeriesResourceHierarchyLevel != null && message.hasOwnProperty("timeSeriesResourceHierarchyLevel")) { + if (!Array.isArray(message.timeSeriesResourceHierarchyLevel)) + return "timeSeriesResourceHierarchyLevel: array expected"; + for (var i = 0; i < message.timeSeriesResourceHierarchyLevel.length; ++i) + switch (message.timeSeriesResourceHierarchyLevel[i]) { + default: + return "timeSeriesResourceHierarchyLevel: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } return null; }; @@ -46247,6 +47961,35 @@ throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); } + if (object.timeSeriesResourceHierarchyLevel) { + if (!Array.isArray(object.timeSeriesResourceHierarchyLevel)) + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.timeSeriesResourceHierarchyLevel: array expected"); + message.timeSeriesResourceHierarchyLevel = []; + for (var i = 0; i < object.timeSeriesResourceHierarchyLevel.length; ++i) + switch (object.timeSeriesResourceHierarchyLevel[i]) { + default: + if (typeof object.timeSeriesResourceHierarchyLevel[i] === "number") { + message.timeSeriesResourceHierarchyLevel[i] = object.timeSeriesResourceHierarchyLevel[i]; + break; + } + case "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED": + case 0: + message.timeSeriesResourceHierarchyLevel[i] = 0; + break; + case "PROJECT": + case 1: + message.timeSeriesResourceHierarchyLevel[i] = 1; + break; + case "ORGANIZATION": + case 2: + message.timeSeriesResourceHierarchyLevel[i] = 2; + break; + case "FOLDER": + case 3: + message.timeSeriesResourceHierarchyLevel[i] = 3; + break; + } + } return message; }; @@ -46263,6 +48006,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.timeSeriesResourceHierarchyLevel = []; if (options.defaults) { object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; object.samplePeriod = null; @@ -46274,6 +48019,11 @@ object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); + if (message.timeSeriesResourceHierarchyLevel && message.timeSeriesResourceHierarchyLevel.length) { + object.timeSeriesResourceHierarchyLevel = []; + for (var j = 0; j < message.timeSeriesResourceHierarchyLevel.length; ++j) + object.timeSeriesResourceHierarchyLevel[j] = options.enums === String ? $root.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[message.timeSeriesResourceHierarchyLevel[j]] === undefined ? message.timeSeriesResourceHierarchyLevel[j] : $root.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[message.timeSeriesResourceHierarchyLevel[j]] : message.timeSeriesResourceHierarchyLevel[j]; + } return object; }; @@ -46303,6 +48053,24 @@ return typeUrlPrefix + "/google.api.MetricDescriptor.MetricDescriptorMetadata"; }; + /** + * TimeSeriesResourceHierarchyLevel enum. + * @name google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel + * @enum {number} + * @property {number} TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED=0 TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED value + * @property {number} PROJECT=1 PROJECT value + * @property {number} ORGANIZATION=2 ORGANIZATION value + * @property {number} FOLDER=3 FOLDER value + */ + MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROJECT"] = 1; + values[valuesById[2] = "ORGANIZATION"] = 2; + values[valuesById[3] = "FOLDER"] = 3; + return values; + })(); + return MetricDescriptorMetadata; })(); diff --git a/handwritten/logging/protos/protos.json b/handwritten/logging/protos/protos.json index 138620e8cbc..cf79e8a6172 100644 --- a/handwritten/logging/protos/protos.json +++ b/handwritten/logging/protos/protos.json @@ -33,12 +33,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -77,6 +84,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -165,6 +177,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -390,6 +406,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -440,7 +460,14 @@ "type": "ServiceOptions", "id": 3 } - } + }, + "reserved": [ + [ + 4, + 4 + ], + "stream" + ] }, "MethodDescriptorProto": { "edition": "proto2", @@ -604,6 +631,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -739,7 +767,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -767,6 +796,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -836,6 +869,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -924,6 +977,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -1066,6 +1123,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -1076,6 +1134,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -1086,6 +1145,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -1096,6 +1156,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -1106,7 +1167,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -1116,27 +1178,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -1181,7 +1254,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -1196,6 +1275,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -1223,11 +1329,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -1240,6 +1361,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -1325,6 +1452,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Struct": { "fields": { "fields": { @@ -4825,8 +4960,7 @@ "java_multiple_files": true, "java_outer_classname": "MetricProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "fieldBehavior": { @@ -5141,6 +5275,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -5281,6 +5419,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -5338,6 +5498,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -5399,6 +5564,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "Distribution": { "fields": { "count": { @@ -5617,6 +5795,21 @@ "ingestDelay": { "type": "google.protobuf.Duration", "id": 3 + }, + "timeSeriesResourceHierarchyLevel": { + "rule": "repeated", + "type": "TimeSeriesResourceHierarchyLevel", + "id": 4 + } + }, + "nested": { + "TimeSeriesResourceHierarchyLevel": { + "values": { + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED": 0, + "PROJECT": 1, + "ORGANIZATION": 2, + "FOLDER": 3 + } } } } @@ -5674,6 +5867,7 @@ "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", "php_namespace": "Google\\LongRunning" }, "nested": { diff --git a/handwritten/logging/samples/README.md b/handwritten/logging/samples/README.md new file mode 100644 index 00000000000..059e51a886d --- /dev/null +++ b/handwritten/logging/samples/README.md @@ -0,0 +1,806 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Cloud Logging: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Config_service_v2.copy_log_entries](#config_service_v2.copy_log_entries) + * [Config_service_v2.create_bucket](#config_service_v2.create_bucket) + * [Config_service_v2.create_bucket_async](#config_service_v2.create_bucket_async) + * [Config_service_v2.create_exclusion](#config_service_v2.create_exclusion) + * [Config_service_v2.create_link](#config_service_v2.create_link) + * [Config_service_v2.create_sink](#config_service_v2.create_sink) + * [Config_service_v2.create_view](#config_service_v2.create_view) + * [Config_service_v2.delete_bucket](#config_service_v2.delete_bucket) + * [Config_service_v2.delete_exclusion](#config_service_v2.delete_exclusion) + * [Config_service_v2.delete_link](#config_service_v2.delete_link) + * [Config_service_v2.delete_sink](#config_service_v2.delete_sink) + * [Config_service_v2.delete_view](#config_service_v2.delete_view) + * [Config_service_v2.get_bucket](#config_service_v2.get_bucket) + * [Config_service_v2.get_cmek_settings](#config_service_v2.get_cmek_settings) + * [Config_service_v2.get_exclusion](#config_service_v2.get_exclusion) + * [Config_service_v2.get_link](#config_service_v2.get_link) + * [Config_service_v2.get_settings](#config_service_v2.get_settings) + * [Config_service_v2.get_sink](#config_service_v2.get_sink) + * [Config_service_v2.get_view](#config_service_v2.get_view) + * [Config_service_v2.list_buckets](#config_service_v2.list_buckets) + * [Config_service_v2.list_exclusions](#config_service_v2.list_exclusions) + * [Config_service_v2.list_links](#config_service_v2.list_links) + * [Config_service_v2.list_sinks](#config_service_v2.list_sinks) + * [Config_service_v2.list_views](#config_service_v2.list_views) + * [Config_service_v2.undelete_bucket](#config_service_v2.undelete_bucket) + * [Config_service_v2.update_bucket](#config_service_v2.update_bucket) + * [Config_service_v2.update_bucket_async](#config_service_v2.update_bucket_async) + * [Config_service_v2.update_cmek_settings](#config_service_v2.update_cmek_settings) + * [Config_service_v2.update_exclusion](#config_service_v2.update_exclusion) + * [Config_service_v2.update_settings](#config_service_v2.update_settings) + * [Config_service_v2.update_sink](#config_service_v2.update_sink) + * [Config_service_v2.update_view](#config_service_v2.update_view) + * [Logging_service_v2.delete_log](#logging_service_v2.delete_log) + * [Logging_service_v2.list_log_entries](#logging_service_v2.list_log_entries) + * [Logging_service_v2.list_logs](#logging_service_v2.list_logs) + * [Logging_service_v2.list_monitored_resource_descriptors](#logging_service_v2.list_monitored_resource_descriptors) + * [Logging_service_v2.tail_log_entries](#logging_service_v2.tail_log_entries) + * [Logging_service_v2.write_log_entries](#logging_service_v2.write_log_entries) + * [Metrics_service_v2.create_log_metric](#metrics_service_v2.create_log_metric) + * [Metrics_service_v2.delete_log_metric](#metrics_service_v2.delete_log_metric) + * [Metrics_service_v2.get_log_metric](#metrics_service_v2.get_log_metric) + * [Metrics_service_v2.list_log_metrics](#metrics_service_v2.list_log_metrics) + * [Metrics_service_v2.update_log_metric](#metrics_service_v2.update_log_metric) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Config_service_v2.copy_log_entries + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js` + + +----- + + + + +### Config_service_v2.create_bucket + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js` + + +----- + + + + +### Config_service_v2.create_bucket_async + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js` + + +----- + + + + +### Config_service_v2.create_exclusion + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js` + + +----- + + + + +### Config_service_v2.create_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_link.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.create_link.js` + + +----- + + + + +### Config_service_v2.create_sink + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js` + + +----- + + + + +### Config_service_v2.create_view + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_view.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.create_view.js` + + +----- + + + + +### Config_service_v2.delete_bucket + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js` + + +----- + + + + +### Config_service_v2.delete_exclusion + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js` + + +----- + + + + +### Config_service_v2.delete_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js` + + +----- + + + + +### Config_service_v2.delete_sink + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js` + + +----- + + + + +### Config_service_v2.delete_view + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js` + + +----- + + + + +### Config_service_v2.get_bucket + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js` + + +----- + + + + +### Config_service_v2.get_cmek_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js` + + +----- + + + + +### Config_service_v2.get_exclusion + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js` + + +----- + + + + +### Config_service_v2.get_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_link.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.get_link.js` + + +----- + + + + +### Config_service_v2.get_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js` + + +----- + + + + +### Config_service_v2.get_sink + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js` + + +----- + + + + +### Config_service_v2.get_view + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_view.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.get_view.js` + + +----- + + + + +### Config_service_v2.list_buckets + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js` + + +----- + + + + +### Config_service_v2.list_exclusions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js` + + +----- + + + + +### Config_service_v2.list_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_links.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.list_links.js` + + +----- + + + + +### Config_service_v2.list_sinks + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js` + + +----- + + + + +### Config_service_v2.list_views + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_views.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.list_views.js` + + +----- + + + + +### Config_service_v2.undelete_bucket + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js` + + +----- + + + + +### Config_service_v2.update_bucket + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js` + + +----- + + + + +### Config_service_v2.update_bucket_async + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js` + + +----- + + + + +### Config_service_v2.update_cmek_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js` + + +----- + + + + +### Config_service_v2.update_exclusion + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js` + + +----- + + + + +### Config_service_v2.update_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js` + + +----- + + + + +### Config_service_v2.update_sink + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js` + + +----- + + + + +### Config_service_v2.update_view + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_view.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/config_service_v2.update_view.js` + + +----- + + + + +### Logging_service_v2.delete_log + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js` + + +----- + + + + +### Logging_service_v2.list_log_entries + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js` + + +----- + + + + +### Logging_service_v2.list_logs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js` + + +----- + + + + +### Logging_service_v2.list_monitored_resource_descriptors + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js` + + +----- + + + + +### Logging_service_v2.tail_log_entries + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js` + + +----- + + + + +### Logging_service_v2.write_log_entries + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js` + + +----- + + + + +### Metrics_service_v2.create_log_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js` + + +----- + + + + +### Metrics_service_v2.delete_log_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js` + + +----- + + + + +### Metrics_service_v2.get_log_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js` + + +----- + + + + +### Metrics_service_v2.list_log_metrics + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js` + + +----- + + + + +### Metrics_service_v2.update_log_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js,samples/README.md) + +__Usage:__ + + +`node handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/logging/docs diff --git a/handwritten/logging/src/entry.ts b/handwritten/logging/src/entry.ts index 6916bd6d356..c741204fca5 100644 --- a/handwritten/logging/src/entry.ts +++ b/handwritten/logging/src/entry.ts @@ -184,7 +184,7 @@ class Entry { { timestamp: new Date(), }, - metadata + metadata, ); // JavaScript date has a very coarse granularity (millisecond), which makes // it quite likely that multiple log entries would have the same timestamp. diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index 1bfc0c3bb0d..b8557301f3d 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -103,7 +103,7 @@ export interface GetEntriesCallback { err: Error | null, entries?: Entry[], request?: google.logging.v2.IListLogEntriesRequest, - apiResponse?: google.logging.v2.IListLogEntriesResponse + apiResponse?: google.logging.v2.IListLogEntriesResponse, ): void; } @@ -132,7 +132,7 @@ export interface GetLogsCallback { err: Error | null, entries?: Sink[], request?: google.logging.v2.IListLogsRequest, - apiResponse?: google.logging.v2.IListLogsResponse + apiResponse?: google.logging.v2.IListLogsResponse, ): void; } @@ -156,7 +156,7 @@ export interface GetSinksCallback { err: Error | null, entries?: Sink[], request?: google.logging.v2.IListSinksRequest, - apiResponse?: google.logging.v2.IListSinksResponse + apiResponse?: google.logging.v2.IListSinksResponse, ): void; } export type Client = string; @@ -289,7 +289,7 @@ class Logging { libVersion: version, scopes, }, - options + options, ); this.api = {}; this.auth = new (gaxInstance ?? gax).GoogleAuth(options_); @@ -297,11 +297,11 @@ class Logging { this.projectId = this.options.projectId || '{{projectId}}'; this.configService = new v2.ConfigServiceV2Client( this.options, - gaxInstance + gaxInstance, ); this.loggingService = new v2.LoggingServiceV2Client( this.options, - gaxInstance + gaxInstance, ); } @@ -339,7 +339,7 @@ class Logging { createSink( name: string, config: CreateSinkRequest, - callback: CreateSinkCallback + callback: CreateSinkCallback, ): void; // jscs:disable maximumLineLength /** @@ -392,7 +392,7 @@ class Logging { */ async createSink( name: string, - config: CreateSinkRequest + config: CreateSinkRequest, ): Promise<[Sink, LogSink]> { if (typeof name !== 'string') { throw new Error('A sink name must be provided.'); @@ -419,7 +419,7 @@ class Logging { await this.setProjectId(reqOpts); const [resp] = await this.configService.createSink( reqOpts, - config.gaxOptions + config.gaxOptions, ); const sink = this.sink(resp.name); sink.metadata = resp; @@ -573,7 +573,7 @@ class Logging { getEntries(callback: GetEntriesCallback): void; getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; async getEntries( - opts?: GetEntriesRequest | GetEntriesCallback + opts?: GetEntriesRequest | GetEntriesCallback, ): Promise { const options = opts ? (opts as GetEntriesRequest) : {}; @@ -603,14 +603,14 @@ class Logging { { autoPaginate: options!.autoPaginate, }, - options!.gaxOptions + options!.gaxOptions, ); if (options?.maxResults) { gaxOptions = extend( { maxResults: options.maxResults, }, - gaxOptions + gaxOptions, ); } const resp = await this.loggingService.listLogEntries(reqOpts, gaxOptions); @@ -676,12 +676,12 @@ class Logging { if (options.filter) { options.filter = `(${options.filter}) AND logName="${formatLogName( this.projectId, - options.log + options.log, )}"`; } else { options.filter = `logName="${formatLogName( this.projectId, - options.log + options.log, )}"`; } delete options.log; @@ -690,7 +690,7 @@ class Logging { { orderBy: 'timestamp desc', }, - options + options, ); reqOpts.resourceNames = arrify(reqOpts.resourceNames!); reqOpts.resourceNames.push(`projects/${this.projectId}`); @@ -700,12 +700,12 @@ class Logging { { autoPaginate: options.autoPaginate, }, - options.gaxOptions + options.gaxOptions, ); let gaxStream: ClientReadableStream; requestStream = streamEvents( - new PassThrough({objectMode: true}) + new PassThrough({objectMode: true}), ); (requestStream as AbortableDuplex).abort = () => { if (gaxStream && gaxStream.cancel) { @@ -718,7 +718,7 @@ class Logging { try { gaxStream = this.loggingService.listLogEntriesStream( reqOpts, - gaxOptions + gaxOptions, ); } catch (error) { requestStream.destroy(error as Error); @@ -818,7 +818,7 @@ class Logging { suppressionInfo: chunk.suppressionInfo, }; return resp; - })() + })(), ); }, }); @@ -830,12 +830,12 @@ class Logging { if (options.filter) { options.filter = `(${options.filter}) AND logName="${formatLogName( this.projectId, - options.log + options.log, )}"`; } else { options.filter = `logName="${formatLogName( this.projectId, - options.log + options.log, )}"`; } } @@ -936,7 +936,7 @@ class Logging { getLogs(callback: GetLogsCallback): void; getLogs(options: GetLogsRequest, callback: GetLogsCallback): void; async getLogs( - opts?: GetLogsRequest | GetLogsCallback + opts?: GetLogsRequest | GetLogsCallback, ): Promise { const options = opts ? (opts as GetSinksRequest) : {}; this.projectId = await this.auth.getProjectId(); @@ -949,7 +949,7 @@ class Logging { { autoPaginate: options.autoPaginate, }, - options.gaxOptions + options.gaxOptions, ); const resp = await this.loggingService.listLogs(reqOpts, gaxOptions); const [logs] = resp; @@ -1017,12 +1017,12 @@ class Logging { { autoPaginate: options.autoPaginate, }, - options.gaxOptions + options.gaxOptions, ); let gaxStream: ClientReadableStream; requestStream = streamEvents( - new PassThrough({objectMode: true}) + new PassThrough({objectMode: true}), ); (requestStream as AbortableDuplex).abort = () => { if (gaxStream && gaxStream.cancel) { @@ -1110,7 +1110,7 @@ class Logging { getSinks(callback: GetSinksCallback): void; getSinks(options: GetSinksRequest, callback: GetSinksCallback): void; async getSinks( - opts?: GetSinksRequest | GetSinksCallback + opts?: GetSinksRequest | GetSinksCallback, ): Promise { const options = opts ? (opts as GetSinksRequest) : {}; this.projectId = await this.auth.getProjectId(); @@ -1123,7 +1123,7 @@ class Logging { { autoPaginate: options.autoPaginate, }, - options.gaxOptions + options.gaxOptions, ); const resp = await this.configService.listSinks(reqOpts, gaxOptions); const [sinks] = resp; @@ -1200,12 +1200,12 @@ class Logging { { autoPaginate: options.autoPaginate, }, - options.gaxOptions + options.gaxOptions, ); let gaxStream: ClientReadableStream; requestStream = streamEvents( - new PassThrough({objectMode: true}) + new PassThrough({objectMode: true}), ); (requestStream as AbortableDuplex).abort = () => { if (gaxStream && gaxStream.cancel) { @@ -1218,7 +1218,7 @@ class Logging { try { gaxStream = this.configService.listSinksStream( reqOpts, - gaxOptions + gaxOptions, ); } catch (error) { requestStream.destroy(error as Error); @@ -1318,7 +1318,7 @@ class Logging { // eslint-disable-next-line @typescript-eslint/no-explicit-any request( config: RequestConfig, - callback?: RequestCallback + callback?: RequestCallback, ) { // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; @@ -1354,7 +1354,7 @@ class Logging { const requestFn = gaxClient[config.method].bind( gaxClient, reqOpts, - config.gaxOpts + config.gaxOpts, ); callback(null, requestFn); }); @@ -1480,7 +1480,7 @@ class Logging { async setDetectedResource() { if (!this.detectedResource) { this.detectedResource = await getDefaultResource( - this.auth as unknown as GoogleAuth + this.auth as unknown as GoogleAuth, ); } } diff --git a/handwritten/logging/src/log-sync.ts b/handwritten/logging/src/log-sync.ts index 65cba7fbd4b..d0e39724743 100644 --- a/handwritten/logging/src/log-sync.ts +++ b/handwritten/logging/src/log-sync.ts @@ -74,7 +74,7 @@ class LogSync implements LogSeverityFunctions { logging: Logging, name: string, transport?: Writable, - options?: LogSyncOptions + options?: LogSyncOptions, ) { options = options || {}; this.formattedName_ = formatLogName(logging.projectId, name); @@ -113,7 +113,7 @@ class LogSync implements LogSeverityFunctions { alert(entry: Entry | Entry[], options?: WriteOptions) { this.write( assignSeverityToEntries(entry, 'ALERT'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -141,7 +141,7 @@ class LogSync implements LogSeverityFunctions { critical(entry: Entry | Entry[], options?: WriteOptions) { this.write( assignSeverityToEntries(entry, 'CRITICAL'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -169,7 +169,7 @@ class LogSync implements LogSeverityFunctions { debug(entry: Entry | Entry[], options?: WriteOptions) { this.write( assignSeverityToEntries(entry, 'DEBUG'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -197,7 +197,7 @@ class LogSync implements LogSeverityFunctions { emergency(entry: Entry | Entry[], options?: WriteOptions) { this.write( assignSeverityToEntries(entry, 'EMERGENCY'), - options as WriteOptions + options as WriteOptions, ); } @@ -285,7 +285,7 @@ class LogSync implements LogSeverityFunctions { error(entry: Entry | Entry[], options?: WriteOptions) { this.write( assignSeverityToEntries(entry, 'ERROR'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -313,7 +313,7 @@ class LogSync implements LogSeverityFunctions { info(entry: Entry | Entry[], options?: WriteOptions) { this.write( assignSeverityToEntries(entry, 'INFO'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -341,7 +341,7 @@ class LogSync implements LogSeverityFunctions { notice(entry: Entry | Entry[], options?: WriteOptions) { this.write( assignSeverityToEntries(entry, 'NOTICE'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -369,7 +369,7 @@ class LogSync implements LogSeverityFunctions { warning(entry: Entry | Entry[], options?: WriteOptions) { this.write( assignSeverityToEntries(entry, 'WARNING'), - options as WriteOptions + options as WriteOptions, ); } @@ -433,7 +433,7 @@ class LogSync implements LogSeverityFunctions { } return entry.toStructuredJSON( this.logging.projectId, - this.useMessageField_ + this.useMessageField_, ); }); for (const entry of structuredEntries) { diff --git a/handwritten/logging/src/log.ts b/handwritten/logging/src/log.ts index 97326414895..8f77e9a980c 100644 --- a/handwritten/logging/src/log.ts +++ b/handwritten/logging/src/log.ts @@ -161,11 +161,11 @@ class Log implements LogSeverityFunctions { str => str !== null && !this.jsonFieldsToTruncate.includes(str) && - str.startsWith('jsonPayload') + str.startsWith('jsonPayload'), ); const uniqueSet = new Set(filteredList); this.jsonFieldsToTruncate = Array.from(uniqueSet).concat( - this.jsonFieldsToTruncate + this.jsonFieldsToTruncate, ); } @@ -218,16 +218,16 @@ class Log implements LogSeverityFunctions { alert( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; alert(entry: Entry | Entry[], callback: ApiResponseCallback): void; alert( entry: Entry | Entry[], - options?: WriteOptions | ApiResponseCallback + options?: WriteOptions | ApiResponseCallback, ): Promise { return this.write( assignSeverityToEntries(entry, 'ALERT'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -263,21 +263,21 @@ class Log implements LogSeverityFunctions { */ critical( entry: Entry | Entry[], - options?: WriteOptions + options?: WriteOptions, ): Promise; critical( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; critical(entry: Entry | Entry[], callback: ApiResponseCallback): void; critical( entry: Entry | Entry[], - options?: WriteOptions | ApiResponseCallback + options?: WriteOptions | ApiResponseCallback, ): Promise { return this.write( assignSeverityToEntries(entry, 'CRITICAL'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -315,16 +315,16 @@ class Log implements LogSeverityFunctions { debug( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; debug(entry: Entry | Entry[], callback: ApiResponseCallback): void; debug( entry: Entry | Entry[], - options?: WriteOptions | ApiResponseCallback + options?: WriteOptions | ApiResponseCallback, ): Promise { return this.write( assignSeverityToEntries(entry, 'DEBUG'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -375,7 +375,7 @@ class Log implements LogSeverityFunctions { delete(gaxOptions: CallOptions, callback: DeleteCallback): void; delete(callback: DeleteCallback): void; async delete( - gaxOptions?: CallOptions | DeleteCallback + gaxOptions?: CallOptions | DeleteCallback, ): Promise { const projectId = await this.logging.auth.getProjectId(); this.formattedName_ = formatLogName(projectId, this.name); @@ -385,7 +385,7 @@ class Log implements LogSeverityFunctions { return this.logging.loggingService.deleteLog( reqOpts, gaxOptions! as CallOptions, - this.defaultWriteDeleteCallback + this.defaultWriteDeleteCallback, ); } @@ -422,16 +422,16 @@ class Log implements LogSeverityFunctions { emergency( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; emergency(entry: Entry | Entry[], callback: ApiResponseCallback): void; emergency( entry: Entry | Entry[], - options?: WriteOptions | ApiResponseCallback + options?: WriteOptions | ApiResponseCallback, ): Promise { return this.write( assignSeverityToEntries(entry, 'EMERGENCY'), - options as WriteOptions + options as WriteOptions, ); } @@ -550,16 +550,16 @@ class Log implements LogSeverityFunctions { error( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; error(entry: Entry | Entry[], callback: ApiResponseCallback): void; error( entry: Entry | Entry[], - options?: WriteOptions | ApiResponseCallback + options?: WriteOptions | ApiResponseCallback, ): Promise { return this.write( assignSeverityToEntries(entry, 'ERROR'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -611,7 +611,7 @@ class Log implements LogSeverityFunctions { getEntries(callback: GetEntriesCallback): void; getEntries(options: GetEntriesRequest, callback: GetEntriesCallback): void; async getEntries( - opts?: GetEntriesRequest | GetEntriesCallback + opts?: GetEntriesRequest | GetEntriesCallback, ): Promise { const options = extend({}, opts as GetEntriesRequest); const projectId = await this.logging.auth.getProjectId(); @@ -665,7 +665,7 @@ class Log implements LogSeverityFunctions { { log: this.name, }, - options + options, ); return this.logging.getEntriesStream(options); } @@ -711,7 +711,7 @@ class Log implements LogSeverityFunctions { { log: this.name, }, - options + options, ); return this.logging.tailEntries(options); } @@ -750,16 +750,16 @@ class Log implements LogSeverityFunctions { info( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; info(entry: Entry | Entry[], callback: ApiResponseCallback): void; info( entry: Entry | Entry[], - options?: WriteOptions | ApiResponseCallback + options?: WriteOptions | ApiResponseCallback, ): Promise { return this.write( assignSeverityToEntries(entry, 'INFO'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -797,16 +797,16 @@ class Log implements LogSeverityFunctions { notice( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; notice(entry: Entry | Entry[], callback: ApiResponseCallback): void; notice( entry: Entry | Entry[], - options?: WriteOptions | ApiResponseCallback + options?: WriteOptions | ApiResponseCallback, ): Promise { return this.write( assignSeverityToEntries(entry, 'NOTICE'), - options! as WriteOptions + options! as WriteOptions, ); } @@ -844,16 +844,16 @@ class Log implements LogSeverityFunctions { warning( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; warning(entry: Entry | Entry[], callback: ApiResponseCallback): void; warning( entry: Entry | Entry[], - options?: WriteOptions | ApiResponseCallback + options?: WriteOptions | ApiResponseCallback, ): Promise { return this.write( assignSeverityToEntries(entry, 'WARNING'), - options as WriteOptions + options as WriteOptions, ); } @@ -964,12 +964,12 @@ class Log implements LogSeverityFunctions { write( entry: Entry | Entry[], options: WriteOptions, - callback: ApiResponseCallback + callback: ApiResponseCallback, ): void; write(entry: Entry | Entry[], callback: ApiResponseCallback): void; async write( entry: Entry | Entry[], - opts?: WriteOptions | ApiResponseCallback + opts?: WriteOptions | ApiResponseCallback, ): Promise { const options = opts ? (opts as WriteOptions) : {}; // Extract projectId & resource from Logging - inject & memoize if not. @@ -993,7 +993,7 @@ class Log implements LogSeverityFunctions { entries: decoratedEntries, resource, }, - options + options, ); delete reqOpts.gaxOptions; // Propagate maxRetries properly into writeLogEntries call @@ -1002,13 +1002,13 @@ class Log implements LogSeverityFunctions { { maxRetries: this.logging.options.maxRetries, }, - options.gaxOptions + options.gaxOptions, ); } return this.logging.loggingService.writeLogEntries( reqOpts, options.gaxOptions, - this.defaultWriteDeleteCallback + this.defaultWriteDeleteCallback, ); } @@ -1051,7 +1051,7 @@ class Log implements LogSeverityFunctions { { removeCircular: this.removeCircular_, }, - this.logging.projectId + this.logging.projectId, ); }); } @@ -1077,7 +1077,7 @@ class Log implements LogSeverityFunctions { if (entry.textPayload) { entry.textPayload = entry.textPayload.slice( 0, - Math.max(entry.textPayload.length - delta, 0) + Math.max(entry.textPayload.length - delta, 0), ); } else { for (const field of this.jsonFieldsToTruncate) { @@ -1086,7 +1086,7 @@ class Log implements LogSeverityFunctions { dotProp.set( entry, field, - msg.slice(0, Math.max(msg.length - delta, 0)) + msg.slice(0, Math.max(msg.length - delta, 0)), ); delta -= Math.min(msg.length, delta); if (delta <= 0) { @@ -1109,7 +1109,7 @@ class Log implements LogSeverityFunctions { */ static assignSeverityToEntries_( entries: Entry | Entry[], - severity: string + severity: string, ): Entry[] { return assignSeverityToEntries(entries, severity); } diff --git a/handwritten/logging/src/middleware/express/make-middleware.ts b/handwritten/logging/src/middleware/express/make-middleware.ts index 0a228f45733..466d7ab9191 100644 --- a/handwritten/logging/src/middleware/express/make-middleware.ts +++ b/handwritten/logging/src/middleware/express/make-middleware.ts @@ -48,14 +48,14 @@ export function makeMiddleware( makeChildLogger: ( trace: string, span?: string, - traceSampled?: boolean + traceSampled?: boolean, ) => LoggerType, emitRequestLog?: ( httpRequest: CloudLoggingHttpRequest, trace: string, span?: string, - traceSampled?: boolean - ) => void + traceSampled?: boolean, + ) => void, ) { return (req: ServerRequest, res: http.ServerResponse, next: Function) => { // TODO(ofrobots): use high-resolution timer. @@ -70,7 +70,7 @@ export function makeMiddleware( (req as AnnotatedRequestType).log = makeChildLogger( traceContext.trace, traceContext.spanId, - traceContext.traceSampled + traceContext.traceSampled, ); // Emit a 'Request Log' on the parent logger, with detected trace and @@ -83,7 +83,7 @@ export function makeMiddleware( httpRequest, traceContext.trace, traceContext.spanId, - traceContext.traceSampled + traceContext.traceSampled, ); }); } diff --git a/handwritten/logging/src/sink.ts b/handwritten/logging/src/sink.ts index 2fd5bbcc398..267616f2c1f 100644 --- a/handwritten/logging/src/sink.ts +++ b/handwritten/logging/src/sink.ts @@ -168,7 +168,7 @@ class Sink { delete(callback: DeleteCallback): void; delete(gaxOptions: CallOptions, callback: DeleteCallback): void; async delete( - gaxOptions?: CallOptions | DeleteCallback + gaxOptions?: CallOptions | DeleteCallback, ): Promise { const projectId = await this.logging.auth.getProjectId(); this.formattedName_ = 'projects/' + projectId + '/sinks/' + this.name; @@ -177,7 +177,7 @@ class Sink { }; return this.logging.configService.deleteSink( reqOpts, - gaxOptions as CallOptions + gaxOptions as CallOptions, ); } @@ -227,7 +227,7 @@ class Sink { getMetadata(callback: SinkMetadataCallback): void; getMetadata(gaxOptions: CallOptions, callback: SinkMetadataCallback): void; async getMetadata( - gaxOptions?: CallOptions | SinkMetadataCallback + gaxOptions?: CallOptions | SinkMetadataCallback, ): Promise { const projectId = await this.logging.auth.getProjectId(); this.formattedName_ = 'projects/' + projectId + '/sinks/' + this.name; @@ -237,7 +237,7 @@ class Sink { [this.metadata] = await this.logging.configService.getSink( reqOpts, - gaxOptions as CallOptions + gaxOptions as CallOptions, ); return [this.metadata!]; } @@ -359,7 +359,7 @@ class Sink { }; [this.metadata] = await this.logging.configService.updateSink( reqOpts, - metadata.gaxOptions + metadata.gaxOptions, ); return [this.metadata!]; } diff --git a/handwritten/logging/src/utils/common.ts b/handwritten/logging/src/utils/common.ts index 9e3f8470aa7..5d09dc31e36 100644 --- a/handwritten/logging/src/utils/common.ts +++ b/handwritten/logging/src/utils/common.ts @@ -141,7 +141,7 @@ export class ObjectToStructConverter { [ 'This object contains a circular reference. To automatically', 'remove it, set the `removeCircular` option to true.', - ].join(' ') + ].join(' '), ); } convertedValue = { diff --git a/handwritten/logging/src/utils/context.ts b/handwritten/logging/src/utils/context.ts index a48a655067e..4233c09719a 100644 --- a/handwritten/logging/src/utils/context.ts +++ b/handwritten/logging/src/utils/context.ts @@ -60,7 +60,7 @@ export interface HeaderWrapper { * @param req */ export function makeHeaderWrapper( - req: http.IncomingMessage + req: http.IncomingMessage, ): HeaderWrapper | null { if (!req.headers) return null; const wrapper = { @@ -96,7 +96,7 @@ export interface CloudTraceContext { export function getOrInjectContext( req: http.IncomingMessage, projectId: string, - inject?: boolean + inject?: boolean, ): CloudTraceContext { const defaultContext = toCloudTraceContext({}, projectId); @@ -130,7 +130,7 @@ export function getOrInjectContext( function toCloudTraceContext( // eslint-disable-next-line @typescript-eslint/no-explicit-any anyContext: any, - projectId: string + projectId: string, ): CloudTraceContext { const context: CloudTraceContext = { trace: '', @@ -163,7 +163,7 @@ function makeCloudTraceHeader(): string { * @param projectId */ export function getContextFromOtelContext( - projectId: string + projectId: string, ): CloudTraceContext | null { const spanContext = trace.getActiveSpan()?.spanContext(); const FLAG_SAMPLED = 1; // 00000001 @@ -189,7 +189,7 @@ export function getContextFromOtelContext( */ export function getContextFromXCloudTrace( headerWrapper: HeaderWrapper, - projectId: string + projectId: string, ): CloudTraceContext | null { const context = parseXCloudTraceHeader(headerWrapper); if (!context) return null; @@ -206,7 +206,7 @@ export function getContextFromXCloudTrace( */ export function getContextFromTraceParent( headerWrapper: HeaderWrapper, - projectId: string + projectId: string, ): CloudTraceContext | null { const context = parseTraceParentHeader(headerWrapper); if (!context) return null; @@ -219,7 +219,7 @@ export function getContextFromTraceParent( * @param headerWrapper */ export function parseXCloudTraceHeader( - headerWrapper: HeaderWrapper + headerWrapper: HeaderWrapper, ): CloudTraceContext | null { const regex = /([a-f\d]+)?(\/?([a-f\d]+))?(;?o=(\d))?/; const match = headerWrapper @@ -241,14 +241,14 @@ export function parseXCloudTraceHeader( * @param headerWrapper */ export function parseTraceParentHeader( - headerWrapper: HeaderWrapper + headerWrapper: HeaderWrapper, ): CloudTraceContext | null { const VERSION_PART = '(?!ff)[\\da-f]{2}'; const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; const FLAGS_PART = '[\\da-f]{2}'; const TRACE_PARENT_REGEX = new RegExp( - `^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$` + `^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`, ); const match = headerWrapper .getHeader(W3C_TRACE_PARENT_HEADER) diff --git a/handwritten/logging/src/utils/http-request.ts b/handwritten/logging/src/utils/http-request.ts index 7c48a162bf7..d03a2611b54 100644 --- a/handwritten/logging/src/utils/http-request.ts +++ b/handwritten/logging/src/utils/http-request.ts @@ -61,7 +61,7 @@ export interface ServerRequest extends http.IncomingMessage { export function makeHttpRequestData( req: ServerRequest | http.IncomingMessage, res?: http.ServerResponse, - latencyMilliseconds?: number + latencyMilliseconds?: number, ): CloudLoggingHttpRequest { let requestUrl, protocol, @@ -112,7 +112,7 @@ export function makeHttpRequestData( referer ? {referer} : null, responseSize ? {responseSize} : null, status ? {status} : null, - latency ? {latency} : null + latency ? {latency} : null, ); } diff --git a/handwritten/logging/src/utils/instrumentation.ts b/handwritten/logging/src/utils/instrumentation.ts index 9f07fd0946e..f6bd8f4be66 100644 --- a/handwritten/logging/src/utils/instrumentation.ts +++ b/handwritten/logging/src/utils/instrumentation.ts @@ -50,7 +50,7 @@ export type InstrumentationInfo = {name: string; version: string}; * instrumentation info and boolean flag indicating if instrumentation was added or not in this call */ export function populateInstrumentationInfo( - entry: Entry | Entry[] + entry: Entry | Entry[], ): [Entry[], boolean] { // Check if instrumentation data was already written once. This prevents also inspection of // the entries for instrumentation data to prevent perf degradation @@ -102,7 +102,7 @@ export function populateInstrumentationInfo( */ export function createDiagnosticEntry( libraryName: string | undefined, - libraryVersion: string | undefined + libraryVersion: string | undefined, ): Entry { // Validate the libraryName first and make sure it starts with 'nodejs' prefix. if (!libraryName || !libraryName.startsWith(NODEJS_LIBRARY_NAME_PREFIX)) { @@ -116,7 +116,7 @@ export function createDiagnosticEntry( name: truncateValue(libraryName, maxDiagnosticValueLen), version: truncateValue( libraryVersion ?? getNodejsLibraryVersion(), - maxDiagnosticValueLen + maxDiagnosticValueLen, ), }, ], @@ -131,7 +131,7 @@ export function createDiagnosticEntry( * @returns {InstrumentationInfo} The updated list of InstrumentationInfo. */ function validateAndUpdateInstrumentation( - infoList: InstrumentationInfo[] + infoList: InstrumentationInfo[], ): InstrumentationInfo[] { const finalInfo: InstrumentationInfo[] = []; // First, iterate through given list of libraries and for each entry perform validations and transformations. diff --git a/handwritten/logging/src/utils/log-common.ts b/handwritten/logging/src/utils/log-common.ts index ab4798609ef..6f700a77e2f 100644 --- a/handwritten/logging/src/utils/log-common.ts +++ b/handwritten/logging/src/utils/log-common.ts @@ -54,17 +54,17 @@ export type LogSeverityFunctions = { * @param labels */ export function snakecaseKeys( - labels: {[p: string]: string} | null | undefined + labels: {[p: string]: string} | null | undefined, ) { for (const key in labels) { const replaced = key.replace( /[A-Z]/g, - letter => `_${letter.toLowerCase()}` + letter => `_${letter.toLowerCase()}`, ); Object.defineProperty( labels, replaced, - Object.getOwnPropertyDescriptor(labels, key) as PropertyDescriptor + Object.getOwnPropertyDescriptor(labels, key) as PropertyDescriptor, ); if (replaced !== key) { delete labels[key]; @@ -83,7 +83,7 @@ export function snakecaseKeys( */ export function assignSeverityToEntries( entries: Entry | Entry[], - severity: string + severity: string, ): Entry[] { return (arrify(entries) as Entry[]).map(entry => { const metadata = extend(true, {}, entry.metadata, { diff --git a/handwritten/logging/src/utils/metadata.ts b/handwritten/logging/src/utils/metadata.ts index bdfac4213cd..2312adda892 100644 --- a/handwritten/logging/src/utils/metadata.ts +++ b/handwritten/logging/src/utils/metadata.ts @@ -211,7 +211,7 @@ export async function getDefaultResource(auth: GoogleAuth) { * https://cloud.google.com/error-reporting/reference/rest/v1beta1/ServiceContext}. */ export async function detectServiceContext( - auth: GoogleAuth + auth: GoogleAuth, ): Promise { const env = await auth.getEnv(); switch (env) { diff --git a/handwritten/logging/src/v2/config_service_v2_client.ts b/handwritten/logging/src/v2/config_service_v2_client.ts index de78feb5f19..11d0e92a5fd 100644 --- a/handwritten/logging/src/v2/config_service_v2_client.ts +++ b/handwritten/logging/src/v2/config_service_v2_client.ts @@ -109,7 +109,7 @@ export class ConfigServiceV2Client { */ constructor( opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback + gaxInstance?: typeof gax | typeof gax.fallback, ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof ConfigServiceV2Client; @@ -119,7 +119,7 @@ export class ConfigServiceV2Client { opts?.universe_domain !== opts?.universeDomain ) { throw new Error( - 'Please set either universe_domain or universeDomain, but not both.' + 'Please set either universe_domain or universeDomain, but not both.', ); } const universeDomainEnvVar = @@ -203,114 +203,114 @@ export class ConfigServiceV2Client { // Create useful helper objects for these. this.pathTemplates = { billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/cmekSettings' + 'billingAccounts/{billing_account}/cmekSettings', ), billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/exclusions/{exclusion}' + 'billingAccounts/{billing_account}/exclusions/{exclusion}', ), billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}', ), billingAccountLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}', ), billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}', ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/logs/{log}' + 'billingAccounts/{billing_account}/logs/{log}', ), billingAccountSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/settings' + 'billingAccounts/{billing_account}/settings', ), billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/sinks/{sink}' + 'billingAccounts/{billing_account}/sinks/{sink}', ), folderCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/cmekSettings' + 'folders/{folder}/cmekSettings', ), folderExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/exclusions/{exclusion}' + 'folders/{folder}/exclusions/{exclusion}', ), folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}' + 'folders/{folder}/locations/{location}/buckets/{bucket}', ), folderLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}' + 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}', ), folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' + 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}', ), folderLogPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/logs/{log}' + 'folders/{folder}/logs/{log}', ), folderSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/settings' + 'folders/{folder}/settings', ), folderSinkPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/sinks/{sink}' + 'folders/{folder}/sinks/{sink}', ), locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' + 'projects/{project}/locations/{location}', ), logMetricPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/metrics/{metric}' + 'projects/{project}/metrics/{metric}', ), organizationCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/cmekSettings' + 'organizations/{organization}/cmekSettings', ), organizationExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/exclusions/{exclusion}' + 'organizations/{organization}/exclusions/{exclusion}', ), organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}', ), organizationLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}', ), organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}', ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/logs/{log}' + 'organizations/{organization}/logs/{log}', ), organizationSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/settings' + 'organizations/{organization}/settings', ), organizationSinkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/sinks/{sink}' + 'organizations/{organization}/sinks/{sink}', ), projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' + 'projects/{project}', ), projectCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/cmekSettings' + 'projects/{project}/cmekSettings', ), projectExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/exclusions/{exclusion}' + 'projects/{project}/exclusions/{exclusion}', ), projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}' + 'projects/{project}/locations/{location}/buckets/{bucket}', ), projectLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}' + 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', ), projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' + 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', ), projectLogPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/logs/{log}' + 'projects/{project}/logs/{log}', ), projectSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/settings' + 'projects/{project}/settings', ), projectSinkPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/sinks/{sink}' + 'projects/{project}/sinks/{sink}', ), }; @@ -321,27 +321,27 @@ export class ConfigServiceV2Client { listBuckets: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'buckets' + 'buckets', ), listViews: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'views' + 'views', ), listSinks: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'sinks' + 'sinks', ), listLinks: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'links' + 'links', ), listExclusions: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'exclusions' + 'exclusions', ), }; @@ -405,61 +405,61 @@ export class ConfigServiceV2Client { .lro(lroOptions) .operationsClient(opts); const createBucketAsyncResponse = protoFilesRoot.lookup( - '.google.logging.v2.LogBucket' + '.google.logging.v2.LogBucket', ) as gax.protobuf.Type; const createBucketAsyncMetadata = protoFilesRoot.lookup( - '.google.logging.v2.BucketMetadata' + '.google.logging.v2.BucketMetadata', ) as gax.protobuf.Type; const updateBucketAsyncResponse = protoFilesRoot.lookup( - '.google.logging.v2.LogBucket' + '.google.logging.v2.LogBucket', ) as gax.protobuf.Type; const updateBucketAsyncMetadata = protoFilesRoot.lookup( - '.google.logging.v2.BucketMetadata' + '.google.logging.v2.BucketMetadata', ) as gax.protobuf.Type; const createLinkResponse = protoFilesRoot.lookup( - '.google.logging.v2.Link' + '.google.logging.v2.Link', ) as gax.protobuf.Type; const createLinkMetadata = protoFilesRoot.lookup( - '.google.logging.v2.LinkMetadata' + '.google.logging.v2.LinkMetadata', ) as gax.protobuf.Type; const deleteLinkResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty' + '.google.protobuf.Empty', ) as gax.protobuf.Type; const deleteLinkMetadata = protoFilesRoot.lookup( - '.google.logging.v2.LinkMetadata' + '.google.logging.v2.LinkMetadata', ) as gax.protobuf.Type; const copyLogEntriesResponse = protoFilesRoot.lookup( - '.google.logging.v2.CopyLogEntriesResponse' + '.google.logging.v2.CopyLogEntriesResponse', ) as gax.protobuf.Type; const copyLogEntriesMetadata = protoFilesRoot.lookup( - '.google.logging.v2.CopyLogEntriesMetadata' + '.google.logging.v2.CopyLogEntriesMetadata', ) as gax.protobuf.Type; this.descriptors.longrunning = { createBucketAsync: new this._gaxModule.LongrunningDescriptor( this.operationsClient, createBucketAsyncResponse.decode.bind(createBucketAsyncResponse), - createBucketAsyncMetadata.decode.bind(createBucketAsyncMetadata) + createBucketAsyncMetadata.decode.bind(createBucketAsyncMetadata), ), updateBucketAsync: new this._gaxModule.LongrunningDescriptor( this.operationsClient, updateBucketAsyncResponse.decode.bind(updateBucketAsyncResponse), - updateBucketAsyncMetadata.decode.bind(updateBucketAsyncMetadata) + updateBucketAsyncMetadata.decode.bind(updateBucketAsyncMetadata), ), createLink: new this._gaxModule.LongrunningDescriptor( this.operationsClient, createLinkResponse.decode.bind(createLinkResponse), - createLinkMetadata.decode.bind(createLinkMetadata) + createLinkMetadata.decode.bind(createLinkMetadata), ), deleteLink: new this._gaxModule.LongrunningDescriptor( this.operationsClient, deleteLinkResponse.decode.bind(deleteLinkResponse), - deleteLinkMetadata.decode.bind(deleteLinkMetadata) + deleteLinkMetadata.decode.bind(deleteLinkMetadata), ), copyLogEntries: new this._gaxModule.LongrunningDescriptor( this.operationsClient, copyLogEntriesResponse.decode.bind(copyLogEntriesResponse), - copyLogEntriesMetadata.decode.bind(copyLogEntriesMetadata) + copyLogEntriesMetadata.decode.bind(copyLogEntriesMetadata), ), }; @@ -468,7 +468,7 @@ export class ConfigServiceV2Client { 'google.logging.v2.ConfigServiceV2', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')} + {'x-goog-api-client': clientHeader.join(' ')}, ); // Set up a dictionary of "inner API calls"; the core implementation @@ -502,12 +502,12 @@ export class ConfigServiceV2Client { this.configServiceV2Stub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService( - 'google.logging.v2.ConfigServiceV2' + 'google.logging.v2.ConfigServiceV2', ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.ConfigServiceV2, this._opts, - this._providedCustomServicePath + this._providedCustomServicePath, ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -558,7 +558,7 @@ export class ConfigServiceV2Client { }, (err: Error | null | undefined) => () => { throw err; - } + }, ); const descriptor = @@ -569,7 +569,7 @@ export class ConfigServiceV2Client { callPromise, this._defaults[methodName], descriptor, - this._opts.fallback + this._opts.fallback, ); this.innerApiCalls[methodName] = apiCall; @@ -590,7 +590,7 @@ export class ConfigServiceV2Client { ) { process.emitWarning( 'Static servicePath is deprecated, please use the instance method instead.', - 'DeprecationWarning' + 'DeprecationWarning', ); } return 'logging.googleapis.com'; @@ -608,7 +608,7 @@ export class ConfigServiceV2Client { ) { process.emitWarning( 'Static apiEndpoint is deprecated, please use the instance method instead.', - 'DeprecationWarning' + 'DeprecationWarning', ); } return 'logging.googleapis.com'; @@ -655,7 +655,7 @@ export class ConfigServiceV2Client { * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( - callback?: Callback + callback?: Callback, ): Promise | void { if (callback) { this.auth.getProjectId(callback); @@ -694,7 +694,7 @@ export class ConfigServiceV2Client { */ getBucket( request?: protos.google.logging.v2.IGetBucketRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogBucket, @@ -709,7 +709,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IGetBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; getBucket( request: protos.google.logging.v2.IGetBucketRequest, @@ -717,7 +717,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IGetBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; getBucket( request?: protos.google.logging.v2.IGetBucketRequest, @@ -732,7 +732,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IGetBucketRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogBucket, @@ -791,7 +791,7 @@ export class ConfigServiceV2Client { */ createBucket( request?: protos.google.logging.v2.ICreateBucketRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogBucket, @@ -806,7 +806,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.ICreateBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; createBucket( request: protos.google.logging.v2.ICreateBucketRequest, @@ -814,7 +814,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.ICreateBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; createBucket( request?: protos.google.logging.v2.ICreateBucketRequest, @@ -829,7 +829,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.ICreateBucketRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogBucket, @@ -898,7 +898,7 @@ export class ConfigServiceV2Client { */ updateBucket( request?: protos.google.logging.v2.IUpdateBucketRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogBucket, @@ -913,7 +913,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IUpdateBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; updateBucket( request: protos.google.logging.v2.IUpdateBucketRequest, @@ -921,7 +921,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IUpdateBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; updateBucket( request?: protos.google.logging.v2.IUpdateBucketRequest, @@ -936,7 +936,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IUpdateBucketRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogBucket, @@ -993,7 +993,7 @@ export class ConfigServiceV2Client { */ deleteBucket( request?: protos.google.logging.v2.IDeleteBucketRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.protobuf.IEmpty, @@ -1008,7 +1008,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteBucket( request: protos.google.logging.v2.IDeleteBucketRequest, @@ -1016,7 +1016,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteBucket( request?: protos.google.logging.v2.IDeleteBucketRequest, @@ -1031,7 +1031,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteBucketRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.protobuf.IEmpty, @@ -1085,7 +1085,7 @@ export class ConfigServiceV2Client { */ undeleteBucket( request?: protos.google.logging.v2.IUndeleteBucketRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.protobuf.IEmpty, @@ -1100,7 +1100,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IUndeleteBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; undeleteBucket( request: protos.google.logging.v2.IUndeleteBucketRequest, @@ -1108,7 +1108,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IUndeleteBucketRequest | null | undefined, {} | null | undefined - > + >, ): void; undeleteBucket( request?: protos.google.logging.v2.IUndeleteBucketRequest, @@ -1123,7 +1123,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IUndeleteBucketRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.protobuf.IEmpty, @@ -1173,7 +1173,7 @@ export class ConfigServiceV2Client { */ getView( request?: protos.google.logging.v2.IGetViewRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogView, @@ -1188,7 +1188,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.IGetViewRequest | null | undefined, {} | null | undefined - > + >, ): void; getView( request: protos.google.logging.v2.IGetViewRequest, @@ -1196,7 +1196,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.IGetViewRequest | null | undefined, {} | null | undefined - > + >, ): void; getView( request?: protos.google.logging.v2.IGetViewRequest, @@ -1211,7 +1211,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.IGetViewRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogView, @@ -1268,7 +1268,7 @@ export class ConfigServiceV2Client { */ createView( request?: protos.google.logging.v2.ICreateViewRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogView, @@ -1283,7 +1283,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.ICreateViewRequest | null | undefined, {} | null | undefined - > + >, ): void; createView( request: protos.google.logging.v2.ICreateViewRequest, @@ -1291,7 +1291,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.ICreateViewRequest | null | undefined, {} | null | undefined - > + >, ): void; createView( request?: protos.google.logging.v2.ICreateViewRequest, @@ -1306,7 +1306,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.ICreateViewRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogView, @@ -1371,7 +1371,7 @@ export class ConfigServiceV2Client { */ updateView( request?: protos.google.logging.v2.IUpdateViewRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogView, @@ -1386,7 +1386,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.IUpdateViewRequest | null | undefined, {} | null | undefined - > + >, ): void; updateView( request: protos.google.logging.v2.IUpdateViewRequest, @@ -1394,7 +1394,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.IUpdateViewRequest | null | undefined, {} | null | undefined - > + >, ): void; updateView( request?: protos.google.logging.v2.IUpdateViewRequest, @@ -1409,7 +1409,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogView, protos.google.logging.v2.IUpdateViewRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogView, @@ -1462,7 +1462,7 @@ export class ConfigServiceV2Client { */ deleteView( request?: protos.google.logging.v2.IDeleteViewRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.protobuf.IEmpty, @@ -1477,7 +1477,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteViewRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteView( request: protos.google.logging.v2.IDeleteViewRequest, @@ -1485,7 +1485,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteViewRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteView( request?: protos.google.logging.v2.IDeleteViewRequest, @@ -1500,7 +1500,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteViewRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.protobuf.IEmpty, @@ -1553,7 +1553,7 @@ export class ConfigServiceV2Client { */ getSink( request?: protos.google.logging.v2.IGetSinkRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogSink, @@ -1568,7 +1568,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.IGetSinkRequest | null | undefined, {} | null | undefined - > + >, ): void; getSink( request: protos.google.logging.v2.IGetSinkRequest, @@ -1576,7 +1576,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.IGetSinkRequest | null | undefined, {} | null | undefined - > + >, ): void; getSink( request?: protos.google.logging.v2.IGetSinkRequest, @@ -1591,7 +1591,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.IGetSinkRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogSink, @@ -1664,7 +1664,7 @@ export class ConfigServiceV2Client { */ createSink( request?: protos.google.logging.v2.ICreateSinkRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogSink, @@ -1679,7 +1679,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.ICreateSinkRequest | null | undefined, {} | null | undefined - > + >, ): void; createSink( request: protos.google.logging.v2.ICreateSinkRequest, @@ -1687,7 +1687,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.ICreateSinkRequest | null | undefined, {} | null | undefined - > + >, ): void; createSink( request?: protos.google.logging.v2.ICreateSinkRequest, @@ -1702,7 +1702,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.ICreateSinkRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogSink, @@ -1792,7 +1792,7 @@ export class ConfigServiceV2Client { */ updateSink( request?: protos.google.logging.v2.IUpdateSinkRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogSink, @@ -1807,7 +1807,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.IUpdateSinkRequest | null | undefined, {} | null | undefined - > + >, ): void; updateSink( request: protos.google.logging.v2.IUpdateSinkRequest, @@ -1815,7 +1815,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.IUpdateSinkRequest | null | undefined, {} | null | undefined - > + >, ): void; updateSink( request?: protos.google.logging.v2.IUpdateSinkRequest, @@ -1830,7 +1830,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogSink, protos.google.logging.v2.IUpdateSinkRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogSink, @@ -1885,7 +1885,7 @@ export class ConfigServiceV2Client { */ deleteSink( request?: protos.google.logging.v2.IDeleteSinkRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.protobuf.IEmpty, @@ -1900,7 +1900,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteSinkRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteSink( request: protos.google.logging.v2.IDeleteSinkRequest, @@ -1908,7 +1908,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteSinkRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteSink( request?: protos.google.logging.v2.IDeleteSinkRequest, @@ -1923,7 +1923,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteSinkRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.protobuf.IEmpty, @@ -1972,7 +1972,7 @@ export class ConfigServiceV2Client { */ getLink( request?: protos.google.logging.v2.IGetLinkRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILink, @@ -1987,7 +1987,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILink, protos.google.logging.v2.IGetLinkRequest | null | undefined, {} | null | undefined - > + >, ): void; getLink( request: protos.google.logging.v2.IGetLinkRequest, @@ -1995,7 +1995,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILink, protos.google.logging.v2.IGetLinkRequest | null | undefined, {} | null | undefined - > + >, ): void; getLink( request?: protos.google.logging.v2.IGetLinkRequest, @@ -2010,7 +2010,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILink, protos.google.logging.v2.IGetLinkRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILink, @@ -2063,7 +2063,7 @@ export class ConfigServiceV2Client { */ getExclusion( request?: protos.google.logging.v2.IGetExclusionRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -2078,7 +2078,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IGetExclusionRequest | null | undefined, {} | null | undefined - > + >, ): void; getExclusion( request: protos.google.logging.v2.IGetExclusionRequest, @@ -2086,7 +2086,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IGetExclusionRequest | null | undefined, {} | null | undefined - > + >, ): void; getExclusion( request?: protos.google.logging.v2.IGetExclusionRequest, @@ -2101,7 +2101,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IGetExclusionRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -2160,7 +2160,7 @@ export class ConfigServiceV2Client { */ createExclusion( request?: protos.google.logging.v2.ICreateExclusionRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -2175,7 +2175,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.ICreateExclusionRequest | null | undefined, {} | null | undefined - > + >, ): void; createExclusion( request: protos.google.logging.v2.ICreateExclusionRequest, @@ -2183,7 +2183,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.ICreateExclusionRequest | null | undefined, {} | null | undefined - > + >, ): void; createExclusion( request?: protos.google.logging.v2.ICreateExclusionRequest, @@ -2198,7 +2198,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.ICreateExclusionRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -2264,7 +2264,7 @@ export class ConfigServiceV2Client { */ updateExclusion( request?: protos.google.logging.v2.IUpdateExclusionRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -2279,7 +2279,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, {} | null | undefined - > + >, ): void; updateExclusion( request: protos.google.logging.v2.IUpdateExclusionRequest, @@ -2287,7 +2287,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, {} | null | undefined - > + >, ): void; updateExclusion( request?: protos.google.logging.v2.IUpdateExclusionRequest, @@ -2302,7 +2302,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ILogExclusion, protos.google.logging.v2.IUpdateExclusionRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogExclusion, @@ -2355,7 +2355,7 @@ export class ConfigServiceV2Client { */ deleteExclusion( request?: protos.google.logging.v2.IDeleteExclusionRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.protobuf.IEmpty, @@ -2370,7 +2370,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteExclusion( request: protos.google.logging.v2.IDeleteExclusionRequest, @@ -2378,7 +2378,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteExclusion( request?: protos.google.logging.v2.IDeleteExclusionRequest, @@ -2393,7 +2393,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteExclusionRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.protobuf.IEmpty, @@ -2460,7 +2460,7 @@ export class ConfigServiceV2Client { */ getCmekSettings( request?: protos.google.logging.v2.IGetCmekSettingsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ICmekSettings, @@ -2475,7 +2475,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, {} | null | undefined - > + >, ): void; getCmekSettings( request: protos.google.logging.v2.IGetCmekSettingsRequest, @@ -2483,7 +2483,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, {} | null | undefined - > + >, ): void; getCmekSettings( request?: protos.google.logging.v2.IGetCmekSettingsRequest, @@ -2498,7 +2498,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IGetCmekSettingsRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ICmekSettings, @@ -2583,7 +2583,7 @@ export class ConfigServiceV2Client { */ updateCmekSettings( request?: protos.google.logging.v2.IUpdateCmekSettingsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ICmekSettings, @@ -2598,7 +2598,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, {} | null | undefined - > + >, ): void; updateCmekSettings( request: protos.google.logging.v2.IUpdateCmekSettingsRequest, @@ -2606,7 +2606,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, {} | null | undefined - > + >, ): void; updateCmekSettings( request?: protos.google.logging.v2.IUpdateCmekSettingsRequest, @@ -2623,7 +2623,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ICmekSettings, protos.google.logging.v2.IUpdateCmekSettingsRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ICmekSettings, @@ -2690,7 +2690,7 @@ export class ConfigServiceV2Client { */ getSettings( request?: protos.google.logging.v2.IGetSettingsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ISettings, @@ -2705,7 +2705,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ISettings, protos.google.logging.v2.IGetSettingsRequest | null | undefined, {} | null | undefined - > + >, ): void; getSettings( request: protos.google.logging.v2.IGetSettingsRequest, @@ -2713,7 +2713,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ISettings, protos.google.logging.v2.IGetSettingsRequest | null | undefined, {} | null | undefined - > + >, ): void; getSettings( request?: protos.google.logging.v2.IGetSettingsRequest, @@ -2728,7 +2728,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ISettings, protos.google.logging.v2.IGetSettingsRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ISettings, @@ -2811,7 +2811,7 @@ export class ConfigServiceV2Client { */ updateSettings( request?: protos.google.logging.v2.IUpdateSettingsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ISettings, @@ -2826,7 +2826,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ISettings, protos.google.logging.v2.IUpdateSettingsRequest | null | undefined, {} | null | undefined - > + >, ): void; updateSettings( request: protos.google.logging.v2.IUpdateSettingsRequest, @@ -2834,7 +2834,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ISettings, protos.google.logging.v2.IUpdateSettingsRequest | null | undefined, {} | null | undefined - > + >, ): void; updateSettings( request?: protos.google.logging.v2.IUpdateSettingsRequest, @@ -2849,7 +2849,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.ISettings, protos.google.logging.v2.IUpdateSettingsRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ISettings, @@ -2912,7 +2912,7 @@ export class ConfigServiceV2Client { */ createBucketAsync( request?: protos.google.logging.v2.ICreateBucketRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ LROperation< @@ -2933,7 +2933,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; createBucketAsync( request: protos.google.logging.v2.ICreateBucketRequest, @@ -2944,7 +2944,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; createBucketAsync( request?: protos.google.logging.v2.ICreateBucketRequest, @@ -2965,7 +2965,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): Promise< [ LROperation< @@ -3006,7 +3006,7 @@ export class ConfigServiceV2Client { * region_tag:logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async */ async checkCreateBucketAsyncProgress( - name: string + name: string, ): Promise< LROperation< protos.google.logging.v2.LogBucket, @@ -3015,13 +3015,13 @@ export class ConfigServiceV2Client { > { const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} + {name}, ); const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createBucketAsync, - this._gaxModule.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings(), ); return decodeOperation as LROperation< protos.google.logging.v2.LogBucket, @@ -3073,7 +3073,7 @@ export class ConfigServiceV2Client { */ updateBucketAsync( request?: protos.google.logging.v2.IUpdateBucketRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ LROperation< @@ -3094,7 +3094,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; updateBucketAsync( request: protos.google.logging.v2.IUpdateBucketRequest, @@ -3105,7 +3105,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; updateBucketAsync( request?: protos.google.logging.v2.IUpdateBucketRequest, @@ -3126,7 +3126,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): Promise< [ LROperation< @@ -3167,7 +3167,7 @@ export class ConfigServiceV2Client { * region_tag:logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async */ async checkUpdateBucketAsyncProgress( - name: string + name: string, ): Promise< LROperation< protos.google.logging.v2.LogBucket, @@ -3176,13 +3176,13 @@ export class ConfigServiceV2Client { > { const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} + {name}, ); const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateBucketAsync, - this._gaxModule.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings(), ); return decodeOperation as LROperation< protos.google.logging.v2.LogBucket, @@ -3222,7 +3222,7 @@ export class ConfigServiceV2Client { */ createLink( request?: protos.google.logging.v2.ICreateLinkRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ LROperation< @@ -3243,7 +3243,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; createLink( request: protos.google.logging.v2.ICreateLinkRequest, @@ -3254,7 +3254,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; createLink( request?: protos.google.logging.v2.ICreateLinkRequest, @@ -3275,7 +3275,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): Promise< [ LROperation< @@ -3316,7 +3316,7 @@ export class ConfigServiceV2Client { * region_tag:logging_v2_generated_ConfigServiceV2_CreateLink_async */ async checkCreateLinkProgress( - name: string + name: string, ): Promise< LROperation< protos.google.logging.v2.Link, @@ -3325,13 +3325,13 @@ export class ConfigServiceV2Client { > { const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} + {name}, ); const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createLink, - this._gaxModule.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings(), ); return decodeOperation as LROperation< protos.google.logging.v2.Link, @@ -3364,7 +3364,7 @@ export class ConfigServiceV2Client { */ deleteLink( request?: protos.google.logging.v2.IDeleteLinkRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ LROperation< @@ -3385,7 +3385,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; deleteLink( request: protos.google.logging.v2.IDeleteLinkRequest, @@ -3396,7 +3396,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; deleteLink( request?: protos.google.logging.v2.IDeleteLinkRequest, @@ -3417,7 +3417,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): Promise< [ LROperation< @@ -3458,7 +3458,7 @@ export class ConfigServiceV2Client { * region_tag:logging_v2_generated_ConfigServiceV2_DeleteLink_async */ async checkDeleteLinkProgress( - name: string + name: string, ): Promise< LROperation< protos.google.protobuf.Empty, @@ -3467,13 +3467,13 @@ export class ConfigServiceV2Client { > { const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} + {name}, ); const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteLink, - this._gaxModule.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings(), ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -3509,7 +3509,7 @@ export class ConfigServiceV2Client { */ copyLogEntries( request?: protos.google.logging.v2.ICopyLogEntriesRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ LROperation< @@ -3530,7 +3530,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; copyLogEntries( request: protos.google.logging.v2.ICopyLogEntriesRequest, @@ -3541,7 +3541,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): void; copyLogEntries( request?: protos.google.logging.v2.ICopyLogEntriesRequest, @@ -3562,7 +3562,7 @@ export class ConfigServiceV2Client { >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined - > + >, ): Promise< [ LROperation< @@ -3599,7 +3599,7 @@ export class ConfigServiceV2Client { * region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async */ async checkCopyLogEntriesProgress( - name: string + name: string, ): Promise< LROperation< protos.google.logging.v2.CopyLogEntriesResponse, @@ -3608,13 +3608,13 @@ export class ConfigServiceV2Client { > { const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} + {name}, ); const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.copyLogEntries, - this._gaxModule.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings(), ); return decodeOperation as LROperation< protos.google.logging.v2.CopyLogEntriesResponse, @@ -3660,7 +3660,7 @@ export class ConfigServiceV2Client { */ listBuckets( request?: protos.google.logging.v2.IListBucketsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogBucket[], @@ -3675,7 +3675,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListBucketsRequest, protos.google.logging.v2.IListBucketsResponse | null | undefined, protos.google.logging.v2.ILogBucket - > + >, ): void; listBuckets( request: protos.google.logging.v2.IListBucketsRequest, @@ -3683,7 +3683,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListBucketsRequest, protos.google.logging.v2.IListBucketsResponse | null | undefined, protos.google.logging.v2.ILogBucket - > + >, ): void; listBuckets( request?: protos.google.logging.v2.IListBucketsRequest, @@ -3698,7 +3698,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListBucketsRequest, protos.google.logging.v2.IListBucketsResponse | null | undefined, protos.google.logging.v2.ILogBucket - > + >, ): Promise< [ protos.google.logging.v2.ILogBucket[], @@ -3762,7 +3762,7 @@ export class ConfigServiceV2Client { */ listBucketsStream( request?: protos.google.logging.v2.IListBucketsRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -3778,7 +3778,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listBuckets.createStream( this.innerApiCalls.listBuckets as GaxCall, request, - callSettings + callSettings, ); } @@ -3822,7 +3822,7 @@ export class ConfigServiceV2Client { */ listBucketsAsync( request?: protos.google.logging.v2.IListBucketsRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -3838,7 +3838,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listBuckets.asyncIterate( this.innerApiCalls['listBuckets'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } /** @@ -3874,7 +3874,7 @@ export class ConfigServiceV2Client { */ listViews( request?: protos.google.logging.v2.IListViewsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogView[], @@ -3889,7 +3889,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListViewsRequest, protos.google.logging.v2.IListViewsResponse | null | undefined, protos.google.logging.v2.ILogView - > + >, ): void; listViews( request: protos.google.logging.v2.IListViewsRequest, @@ -3897,7 +3897,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListViewsRequest, protos.google.logging.v2.IListViewsResponse | null | undefined, protos.google.logging.v2.ILogView - > + >, ): void; listViews( request?: protos.google.logging.v2.IListViewsRequest, @@ -3912,7 +3912,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListViewsRequest, protos.google.logging.v2.IListViewsResponse | null | undefined, protos.google.logging.v2.ILogView - > + >, ): Promise< [ protos.google.logging.v2.ILogView[], @@ -3970,7 +3970,7 @@ export class ConfigServiceV2Client { */ listViewsStream( request?: protos.google.logging.v2.IListViewsRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -3986,7 +3986,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listViews.createStream( this.innerApiCalls.listViews as GaxCall, request, - callSettings + callSettings, ); } @@ -4024,7 +4024,7 @@ export class ConfigServiceV2Client { */ listViewsAsync( request?: protos.google.logging.v2.IListViewsRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -4040,7 +4040,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listViews.asyncIterate( this.innerApiCalls['listViews'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } /** @@ -4078,7 +4078,7 @@ export class ConfigServiceV2Client { */ listSinks( request?: protos.google.logging.v2.IListSinksRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogSink[], @@ -4093,7 +4093,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListSinksRequest, protos.google.logging.v2.IListSinksResponse | null | undefined, protos.google.logging.v2.ILogSink - > + >, ): void; listSinks( request: protos.google.logging.v2.IListSinksRequest, @@ -4101,7 +4101,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListSinksRequest, protos.google.logging.v2.IListSinksResponse | null | undefined, protos.google.logging.v2.ILogSink - > + >, ): void; listSinks( request?: protos.google.logging.v2.IListSinksRequest, @@ -4116,7 +4116,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListSinksRequest, protos.google.logging.v2.IListSinksResponse | null | undefined, protos.google.logging.v2.ILogSink - > + >, ): Promise< [ protos.google.logging.v2.ILogSink[], @@ -4176,7 +4176,7 @@ export class ConfigServiceV2Client { */ listSinksStream( request?: protos.google.logging.v2.IListSinksRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -4192,7 +4192,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listSinks.createStream( this.innerApiCalls.listSinks as GaxCall, request, - callSettings + callSettings, ); } @@ -4232,7 +4232,7 @@ export class ConfigServiceV2Client { */ listSinksAsync( request?: protos.google.logging.v2.IListSinksRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -4248,7 +4248,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listSinks.asyncIterate( this.innerApiCalls['listSinks'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } /** @@ -4283,7 +4283,7 @@ export class ConfigServiceV2Client { */ listLinks( request?: protos.google.logging.v2.IListLinksRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILink[], @@ -4298,7 +4298,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListLinksRequest, protos.google.logging.v2.IListLinksResponse | null | undefined, protos.google.logging.v2.ILink - > + >, ): void; listLinks( request: protos.google.logging.v2.IListLinksRequest, @@ -4306,7 +4306,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListLinksRequest, protos.google.logging.v2.IListLinksResponse | null | undefined, protos.google.logging.v2.ILink - > + >, ): void; listLinks( request?: protos.google.logging.v2.IListLinksRequest, @@ -4321,7 +4321,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListLinksRequest, protos.google.logging.v2.IListLinksResponse | null | undefined, protos.google.logging.v2.ILink - > + >, ): Promise< [ protos.google.logging.v2.ILink[], @@ -4378,7 +4378,7 @@ export class ConfigServiceV2Client { */ listLinksStream( request?: protos.google.logging.v2.IListLinksRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -4394,7 +4394,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listLinks.createStream( this.innerApiCalls.listLinks as GaxCall, request, - callSettings + callSettings, ); } @@ -4431,7 +4431,7 @@ export class ConfigServiceV2Client { */ listLinksAsync( request?: protos.google.logging.v2.IListLinksRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -4447,7 +4447,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listLinks.asyncIterate( this.innerApiCalls['listLinks'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } /** @@ -4485,7 +4485,7 @@ export class ConfigServiceV2Client { */ listExclusions( request?: protos.google.logging.v2.IListExclusionsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogExclusion[], @@ -4500,7 +4500,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListExclusionsRequest, protos.google.logging.v2.IListExclusionsResponse | null | undefined, protos.google.logging.v2.ILogExclusion - > + >, ): void; listExclusions( request: protos.google.logging.v2.IListExclusionsRequest, @@ -4508,7 +4508,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListExclusionsRequest, protos.google.logging.v2.IListExclusionsResponse | null | undefined, protos.google.logging.v2.ILogExclusion - > + >, ): void; listExclusions( request?: protos.google.logging.v2.IListExclusionsRequest, @@ -4523,7 +4523,7 @@ export class ConfigServiceV2Client { protos.google.logging.v2.IListExclusionsRequest, protos.google.logging.v2.IListExclusionsResponse | null | undefined, protos.google.logging.v2.ILogExclusion - > + >, ): Promise< [ protos.google.logging.v2.ILogExclusion[], @@ -4583,7 +4583,7 @@ export class ConfigServiceV2Client { */ listExclusionsStream( request?: protos.google.logging.v2.IListExclusionsRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -4599,7 +4599,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listExclusions.createStream( this.innerApiCalls.listExclusions as GaxCall, request, - callSettings + callSettings, ); } @@ -4639,7 +4639,7 @@ export class ConfigServiceV2Client { */ listExclusionsAsync( request?: protos.google.logging.v2.IListExclusionsRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -4655,7 +4655,7 @@ export class ConfigServiceV2Client { return this.descriptors.page.listExclusions.asyncIterate( this.innerApiCalls['listExclusions'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } /** @@ -4701,7 +4701,7 @@ export class ConfigServiceV2Client { protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined - > + >, ): Promise<[protos.google.longrunning.Operation]> { return this.operationsClient.getOperation(request, options, callback); } @@ -4737,7 +4737,7 @@ export class ConfigServiceV2Client { */ listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions + options?: gax.CallOptions, ): AsyncIterable { return this.operationsClient.listOperationsAsync(request, options); } @@ -4785,7 +4785,7 @@ export class ConfigServiceV2Client { protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null - > + >, ): Promise { return this.operationsClient.cancelOperation(request, options, callback); } @@ -4828,7 +4828,7 @@ export class ConfigServiceV2Client { protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined - > + >, ): Promise { return this.operationsClient.deleteOperation(request, options, callback); } @@ -4857,10 +4857,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountCmekSettingsName( - billingAccountCmekSettingsName: string + billingAccountCmekSettingsName: string, ) { return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match( - billingAccountCmekSettingsName + billingAccountCmekSettingsName, ).billing_account; } @@ -4886,10 +4886,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountExclusionName( - billingAccountExclusionName: string + billingAccountExclusionName: string, ) { return this.pathTemplates.billingAccountExclusionPathTemplate.match( - billingAccountExclusionName + billingAccountExclusionName, ).billing_account; } @@ -4901,10 +4901,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromBillingAccountExclusionName( - billingAccountExclusionName: string + billingAccountExclusionName: string, ) { return this.pathTemplates.billingAccountExclusionPathTemplate.match( - billingAccountExclusionName + billingAccountExclusionName, ).exclusion; } @@ -4919,7 +4919,7 @@ export class ConfigServiceV2Client { billingAccountLocationBucketPath( billingAccount: string, location: string, - bucket: string + bucket: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({ billing_account: billingAccount, @@ -4936,10 +4936,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).billing_account; } @@ -4951,10 +4951,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).location; } @@ -4966,10 +4966,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).bucket; } @@ -4986,7 +4986,7 @@ export class ConfigServiceV2Client { billingAccount: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render( { @@ -4994,7 +4994,7 @@ export class ConfigServiceV2Client { location: location, bucket: bucket, link: link, - } + }, ); } @@ -5006,10 +5006,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).billing_account; } @@ -5021,10 +5021,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).location; } @@ -5036,10 +5036,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).bucket; } @@ -5051,10 +5051,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).link; } @@ -5071,7 +5071,7 @@ export class ConfigServiceV2Client { billingAccount: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.render( { @@ -5079,7 +5079,7 @@ export class ConfigServiceV2Client { location: location, bucket: bucket, view: view, - } + }, ); } @@ -5091,10 +5091,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).billing_account; } @@ -5106,10 +5106,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).location; } @@ -5121,10 +5121,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).bucket; } @@ -5136,10 +5136,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).view; } @@ -5166,7 +5166,7 @@ export class ConfigServiceV2Client { */ matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { return this.pathTemplates.billingAccountLogPathTemplate.match( - billingAccountLogName + billingAccountLogName, ).billing_account; } @@ -5179,7 +5179,7 @@ export class ConfigServiceV2Client { */ matchLogFromBillingAccountLogName(billingAccountLogName: string) { return this.pathTemplates.billingAccountLogPathTemplate.match( - billingAccountLogName + billingAccountLogName, ).log; } @@ -5203,10 +5203,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountSettingsName( - billingAccountSettingsName: string + billingAccountSettingsName: string, ) { return this.pathTemplates.billingAccountSettingsPathTemplate.match( - billingAccountSettingsName + billingAccountSettingsName, ).billing_account; } @@ -5232,10 +5232,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountSinkName( - billingAccountSinkName: string + billingAccountSinkName: string, ) { return this.pathTemplates.billingAccountSinkPathTemplate.match( - billingAccountSinkName + billingAccountSinkName, ).billing_account; } @@ -5248,7 +5248,7 @@ export class ConfigServiceV2Client { */ matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { return this.pathTemplates.billingAccountSinkPathTemplate.match( - billingAccountSinkName + billingAccountSinkName, ).sink; } @@ -5273,7 +5273,7 @@ export class ConfigServiceV2Client { */ matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { return this.pathTemplates.folderCmekSettingsPathTemplate.match( - folderCmekSettingsName + folderCmekSettingsName, ).folder; } @@ -5300,7 +5300,7 @@ export class ConfigServiceV2Client { */ matchFolderFromFolderExclusionName(folderExclusionName: string) { return this.pathTemplates.folderExclusionPathTemplate.match( - folderExclusionName + folderExclusionName, ).folder; } @@ -5313,7 +5313,7 @@ export class ConfigServiceV2Client { */ matchExclusionFromFolderExclusionName(folderExclusionName: string) { return this.pathTemplates.folderExclusionPathTemplate.match( - folderExclusionName + folderExclusionName, ).exclusion; } @@ -5342,7 +5342,7 @@ export class ConfigServiceV2Client { */ matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).folder; } @@ -5355,7 +5355,7 @@ export class ConfigServiceV2Client { */ matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).location; } @@ -5368,7 +5368,7 @@ export class ConfigServiceV2Client { */ matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).bucket; } @@ -5385,7 +5385,7 @@ export class ConfigServiceV2Client { folder: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.render({ folder: folder, @@ -5403,10 +5403,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).folder; } @@ -5418,10 +5418,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).location; } @@ -5433,10 +5433,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).bucket; } @@ -5448,10 +5448,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).link; } @@ -5468,7 +5468,7 @@ export class ConfigServiceV2Client { folder: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.render({ folder: folder, @@ -5486,10 +5486,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).folder; } @@ -5501,10 +5501,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).location; } @@ -5516,10 +5516,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).bucket; } @@ -5531,10 +5531,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).view; } @@ -5595,7 +5595,7 @@ export class ConfigServiceV2Client { */ matchFolderFromFolderSettingsName(folderSettingsName: string) { return this.pathTemplates.folderSettingsPathTemplate.match( - folderSettingsName + folderSettingsName, ).folder; } @@ -5729,10 +5729,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationCmekSettingsName( - organizationCmekSettingsName: string + organizationCmekSettingsName: string, ) { return this.pathTemplates.organizationCmekSettingsPathTemplate.match( - organizationCmekSettingsName + organizationCmekSettingsName, ).organization; } @@ -5758,10 +5758,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationExclusionName( - organizationExclusionName: string + organizationExclusionName: string, ) { return this.pathTemplates.organizationExclusionPathTemplate.match( - organizationExclusionName + organizationExclusionName, ).organization; } @@ -5773,10 +5773,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromOrganizationExclusionName( - organizationExclusionName: string + organizationExclusionName: string, ) { return this.pathTemplates.organizationExclusionPathTemplate.match( - organizationExclusionName + organizationExclusionName, ).exclusion; } @@ -5791,7 +5791,7 @@ export class ConfigServiceV2Client { organizationLocationBucketPath( organization: string, location: string, - bucket: string + bucket: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.render({ organization: organization, @@ -5808,10 +5808,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).organization; } @@ -5823,10 +5823,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).location; } @@ -5838,10 +5838,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).bucket; } @@ -5858,7 +5858,7 @@ export class ConfigServiceV2Client { organization: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.render( { @@ -5866,7 +5866,7 @@ export class ConfigServiceV2Client { location: location, bucket: bucket, link: link, - } + }, ); } @@ -5878,10 +5878,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).organization; } @@ -5893,10 +5893,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).location; } @@ -5908,10 +5908,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).bucket; } @@ -5923,10 +5923,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).link; } @@ -5943,7 +5943,7 @@ export class ConfigServiceV2Client { organization: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.render( { @@ -5951,7 +5951,7 @@ export class ConfigServiceV2Client { location: location, bucket: bucket, view: view, - } + }, ); } @@ -5963,10 +5963,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).organization; } @@ -5978,10 +5978,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).location; } @@ -5993,10 +5993,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).bucket; } @@ -6008,10 +6008,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).view; } @@ -6038,7 +6038,7 @@ export class ConfigServiceV2Client { */ matchOrganizationFromOrganizationLogName(organizationLogName: string) { return this.pathTemplates.organizationLogPathTemplate.match( - organizationLogName + organizationLogName, ).organization; } @@ -6051,7 +6051,7 @@ export class ConfigServiceV2Client { */ matchLogFromOrganizationLogName(organizationLogName: string) { return this.pathTemplates.organizationLogPathTemplate.match( - organizationLogName + organizationLogName, ).log; } @@ -6075,10 +6075,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationSettingsName( - organizationSettingsName: string + organizationSettingsName: string, ) { return this.pathTemplates.organizationSettingsPathTemplate.match( - organizationSettingsName + organizationSettingsName, ).organization; } @@ -6105,7 +6105,7 @@ export class ConfigServiceV2Client { */ matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { return this.pathTemplates.organizationSinkPathTemplate.match( - organizationSinkName + organizationSinkName, ).organization; } @@ -6118,7 +6118,7 @@ export class ConfigServiceV2Client { */ matchSinkFromOrganizationSinkName(organizationSinkName: string) { return this.pathTemplates.organizationSinkPathTemplate.match( - organizationSinkName + organizationSinkName, ).sink; } @@ -6166,7 +6166,7 @@ export class ConfigServiceV2Client { */ matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { return this.pathTemplates.projectCmekSettingsPathTemplate.match( - projectCmekSettingsName + projectCmekSettingsName, ).project; } @@ -6193,7 +6193,7 @@ export class ConfigServiceV2Client { */ matchProjectFromProjectExclusionName(projectExclusionName: string) { return this.pathTemplates.projectExclusionPathTemplate.match( - projectExclusionName + projectExclusionName, ).project; } @@ -6206,7 +6206,7 @@ export class ConfigServiceV2Client { */ matchExclusionFromProjectExclusionName(projectExclusionName: string) { return this.pathTemplates.projectExclusionPathTemplate.match( - projectExclusionName + projectExclusionName, ).exclusion; } @@ -6235,7 +6235,7 @@ export class ConfigServiceV2Client { */ matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).project; } @@ -6247,10 +6247,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketName( - projectLocationBucketName: string + projectLocationBucketName: string, ) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).location; } @@ -6263,7 +6263,7 @@ export class ConfigServiceV2Client { */ matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).bucket; } @@ -6280,7 +6280,7 @@ export class ConfigServiceV2Client { project: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.render({ project: project, @@ -6298,10 +6298,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).project; } @@ -6313,10 +6313,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).location; } @@ -6328,10 +6328,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).bucket; } @@ -6343,10 +6343,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).link; } @@ -6363,7 +6363,7 @@ export class ConfigServiceV2Client { project: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.render({ project: project, @@ -6381,10 +6381,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).project; } @@ -6396,10 +6396,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).location; } @@ -6411,10 +6411,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).bucket; } @@ -6426,10 +6426,10 @@ export class ConfigServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).view; } @@ -6491,7 +6491,7 @@ export class ConfigServiceV2Client { */ matchProjectFromProjectSettingsName(projectSettingsName: string) { return this.pathTemplates.projectSettingsPathTemplate.match( - projectSettingsName + projectSettingsName, ).project; } diff --git a/handwritten/logging/src/v2/logging_service_v2_client.ts b/handwritten/logging/src/v2/logging_service_v2_client.ts index 6db7919aa3c..5995243420c 100644 --- a/handwritten/logging/src/v2/logging_service_v2_client.ts +++ b/handwritten/logging/src/v2/logging_service_v2_client.ts @@ -106,7 +106,7 @@ export class LoggingServiceV2Client { */ constructor( opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback + gaxInstance?: typeof gax | typeof gax.fallback, ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LoggingServiceV2Client; @@ -116,7 +116,7 @@ export class LoggingServiceV2Client { opts?.universe_domain !== opts?.universeDomain ) { throw new Error( - 'Please set either universe_domain or universeDomain, but not both.' + 'Please set either universe_domain or universeDomain, but not both.', ); } const universeDomainEnvVar = @@ -200,111 +200,111 @@ export class LoggingServiceV2Client { // Create useful helper objects for these. this.pathTemplates = { billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/cmekSettings' + 'billingAccounts/{billing_account}/cmekSettings', ), billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/exclusions/{exclusion}' + 'billingAccounts/{billing_account}/exclusions/{exclusion}', ), billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}', ), billingAccountLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}', ), billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}', ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/logs/{log}' + 'billingAccounts/{billing_account}/logs/{log}', ), billingAccountSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/settings' + 'billingAccounts/{billing_account}/settings', ), billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/sinks/{sink}' + 'billingAccounts/{billing_account}/sinks/{sink}', ), folderCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/cmekSettings' + 'folders/{folder}/cmekSettings', ), folderExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/exclusions/{exclusion}' + 'folders/{folder}/exclusions/{exclusion}', ), folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}' + 'folders/{folder}/locations/{location}/buckets/{bucket}', ), folderLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}' + 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}', ), folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' + 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}', ), folderLogPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/logs/{log}' + 'folders/{folder}/logs/{log}', ), folderSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/settings' + 'folders/{folder}/settings', ), folderSinkPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/sinks/{sink}' + 'folders/{folder}/sinks/{sink}', ), logMetricPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/metrics/{metric}' + 'projects/{project}/metrics/{metric}', ), organizationCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/cmekSettings' + 'organizations/{organization}/cmekSettings', ), organizationExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/exclusions/{exclusion}' + 'organizations/{organization}/exclusions/{exclusion}', ), organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}', ), organizationLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}', ), organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}', ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/logs/{log}' + 'organizations/{organization}/logs/{log}', ), organizationSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/settings' + 'organizations/{organization}/settings', ), organizationSinkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/sinks/{sink}' + 'organizations/{organization}/sinks/{sink}', ), projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' + 'projects/{project}', ), projectCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/cmekSettings' + 'projects/{project}/cmekSettings', ), projectExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/exclusions/{exclusion}' + 'projects/{project}/exclusions/{exclusion}', ), projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}' + 'projects/{project}/locations/{location}/buckets/{bucket}', ), projectLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}' + 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', ), projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' + 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', ), projectLogPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/logs/{log}' + 'projects/{project}/logs/{log}', ), projectSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/settings' + 'projects/{project}/settings', ), projectSinkPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/sinks/{sink}' + 'projects/{project}/sinks/{sink}', ), }; @@ -315,17 +315,17 @@ export class LoggingServiceV2Client { listLogEntries: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'entries' + 'entries', ), listMonitoredResourceDescriptors: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'resourceDescriptors' + 'resourceDescriptors', ), listLogs: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'logNames' + 'logNames', ), }; @@ -335,7 +335,7 @@ export class LoggingServiceV2Client { tailLogEntries: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, - !!opts.gaxServerStreamingRetries + !!opts.gaxServerStreamingRetries, ), }; @@ -350,8 +350,8 @@ export class LoggingServiceV2Client { null, this._gaxModule.GrpcClient.createByteLengthFunction( // eslint-disable-next-line @typescript-eslint/no-explicit-any - protoFilesRoot.lookupType('google.logging.v2.LogEntry') as any - ) + protoFilesRoot.lookupType('google.logging.v2.LogEntry') as any, + ), ), }; @@ -360,7 +360,7 @@ export class LoggingServiceV2Client { 'google.logging.v2.LoggingServiceV2', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')} + {'x-goog-api-client': clientHeader.join(' ')}, ); // Set up a dictionary of "inner API calls"; the core implementation @@ -394,12 +394,12 @@ export class LoggingServiceV2Client { this.loggingServiceV2Stub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService( - 'google.logging.v2.LoggingServiceV2' + 'google.logging.v2.LoggingServiceV2', ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.LoggingServiceV2, this._opts, - this._providedCustomServicePath + this._providedCustomServicePath, ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -423,8 +423,8 @@ export class LoggingServiceV2Client { stream.emit( 'error', new this._gaxModule.GoogleError( - 'The client has already been closed.' - ) + 'The client has already been closed.', + ), ); }); return stream; @@ -436,7 +436,7 @@ export class LoggingServiceV2Client { }, (err: Error | null | undefined) => () => { throw err; - } + }, ); const descriptor = @@ -448,7 +448,7 @@ export class LoggingServiceV2Client { callPromise, this._defaults[methodName], descriptor, - this._opts.fallback + this._opts.fallback, ); this.innerApiCalls[methodName] = apiCall; @@ -469,7 +469,7 @@ export class LoggingServiceV2Client { ) { process.emitWarning( 'Static servicePath is deprecated, please use the instance method instead.', - 'DeprecationWarning' + 'DeprecationWarning', ); } return 'logging.googleapis.com'; @@ -487,7 +487,7 @@ export class LoggingServiceV2Client { ) { process.emitWarning( 'Static apiEndpoint is deprecated, please use the instance method instead.', - 'DeprecationWarning' + 'DeprecationWarning', ); } return 'logging.googleapis.com'; @@ -535,7 +535,7 @@ export class LoggingServiceV2Client { * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( - callback?: Callback + callback?: Callback, ): Promise | void { if (callback) { this.auth.getProjectId(callback); @@ -580,7 +580,7 @@ export class LoggingServiceV2Client { */ deleteLog( request?: protos.google.logging.v2.IDeleteLogRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.protobuf.IEmpty, @@ -595,7 +595,7 @@ export class LoggingServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteLog( request: protos.google.logging.v2.IDeleteLogRequest, @@ -603,7 +603,7 @@ export class LoggingServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteLog( request?: protos.google.logging.v2.IDeleteLogRequest, @@ -618,7 +618,7 @@ export class LoggingServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.protobuf.IEmpty, @@ -735,7 +735,7 @@ export class LoggingServiceV2Client { */ writeLogEntries( request?: protos.google.logging.v2.IWriteLogEntriesRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.IWriteLogEntriesResponse, @@ -750,7 +750,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IWriteLogEntriesResponse, protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, {} | null | undefined - > + >, ): void; writeLogEntries( request: protos.google.logging.v2.IWriteLogEntriesRequest, @@ -758,7 +758,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IWriteLogEntriesResponse, protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, {} | null | undefined - > + >, ): void; writeLogEntries( request?: protos.google.logging.v2.IWriteLogEntriesRequest, @@ -773,7 +773,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IWriteLogEntriesResponse, protos.google.logging.v2.IWriteLogEntriesRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.IWriteLogEntriesResponse, @@ -879,7 +879,7 @@ export class LoggingServiceV2Client { */ listLogEntries( request?: protos.google.logging.v2.IListLogEntriesRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogEntry[], @@ -894,7 +894,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IListLogEntriesRequest, protos.google.logging.v2.IListLogEntriesResponse | null | undefined, protos.google.logging.v2.ILogEntry - > + >, ): void; listLogEntries( request: protos.google.logging.v2.IListLogEntriesRequest, @@ -902,7 +902,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IListLogEntriesRequest, protos.google.logging.v2.IListLogEntriesResponse | null | undefined, protos.google.logging.v2.ILogEntry - > + >, ): void; listLogEntries( request?: protos.google.logging.v2.IListLogEntriesRequest, @@ -917,7 +917,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IListLogEntriesRequest, protos.google.logging.v2.IListLogEntriesResponse | null | undefined, protos.google.logging.v2.ILogEntry - > + >, ): Promise< [ protos.google.logging.v2.ILogEntry[], @@ -998,7 +998,7 @@ export class LoggingServiceV2Client { */ listLogEntriesStream( request?: protos.google.logging.v2.IListLogEntriesRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -1010,7 +1010,7 @@ export class LoggingServiceV2Client { return this.descriptors.page.listLogEntries.createStream( this.innerApiCalls.listLogEntries as GaxCall, request, - callSettings + callSettings, ); } @@ -1075,7 +1075,7 @@ export class LoggingServiceV2Client { */ listLogEntriesAsync( request?: protos.google.logging.v2.IListLogEntriesRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -1087,7 +1087,7 @@ export class LoggingServiceV2Client { return this.descriptors.page.listLogEntries.asyncIterate( this.innerApiCalls['listLogEntries'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } /** @@ -1118,7 +1118,7 @@ export class LoggingServiceV2Client { */ listMonitoredResourceDescriptors( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.api.IMonitoredResourceDescriptor[], @@ -1135,7 +1135,7 @@ export class LoggingServiceV2Client { | null | undefined, protos.google.api.IMonitoredResourceDescriptor - > + >, ): void; listMonitoredResourceDescriptors( request: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, @@ -1145,7 +1145,7 @@ export class LoggingServiceV2Client { | null | undefined, protos.google.api.IMonitoredResourceDescriptor - > + >, ): void; listMonitoredResourceDescriptors( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, @@ -1164,7 +1164,7 @@ export class LoggingServiceV2Client { | null | undefined, protos.google.api.IMonitoredResourceDescriptor - > + >, ): Promise< [ protos.google.api.IMonitoredResourceDescriptor[], @@ -1187,7 +1187,7 @@ export class LoggingServiceV2Client { return this.innerApiCalls.listMonitoredResourceDescriptors( request, options, - callback + callback, ); } @@ -1217,7 +1217,7 @@ export class LoggingServiceV2Client { */ listMonitoredResourceDescriptorsStream( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -1230,7 +1230,7 @@ export class LoggingServiceV2Client { return this.descriptors.page.listMonitoredResourceDescriptors.createStream( this.innerApiCalls.listMonitoredResourceDescriptors as GaxCall, request, - callSettings + callSettings, ); } @@ -1263,7 +1263,7 @@ export class LoggingServiceV2Client { */ listMonitoredResourceDescriptorsAsync( request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -1276,7 +1276,7 @@ export class LoggingServiceV2Client { return this.descriptors.page.listMonitoredResourceDescriptors.asyncIterate( this.innerApiCalls['listMonitoredResourceDescriptors'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } /** @@ -1331,7 +1331,7 @@ export class LoggingServiceV2Client { */ listLogs( request?: protos.google.logging.v2.IListLogsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ string[], @@ -1346,7 +1346,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IListLogsRequest, protos.google.logging.v2.IListLogsResponse | null | undefined, string - > + >, ): void; listLogs( request: protos.google.logging.v2.IListLogsRequest, @@ -1354,7 +1354,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IListLogsRequest, protos.google.logging.v2.IListLogsResponse | null | undefined, string - > + >, ): void; listLogs( request?: protos.google.logging.v2.IListLogsRequest, @@ -1369,7 +1369,7 @@ export class LoggingServiceV2Client { protos.google.logging.v2.IListLogsRequest, protos.google.logging.v2.IListLogsResponse | null | undefined, string - > + >, ): Promise< [ string[], @@ -1445,7 +1445,7 @@ export class LoggingServiceV2Client { */ listLogsStream( request?: protos.google.logging.v2.IListLogsRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -1461,7 +1461,7 @@ export class LoggingServiceV2Client { return this.descriptors.page.listLogs.createStream( this.innerApiCalls.listLogs as GaxCall, request, - callSettings + callSettings, ); } @@ -1517,7 +1517,7 @@ export class LoggingServiceV2Client { */ listLogsAsync( request?: protos.google.logging.v2.IListLogsRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -1533,7 +1533,7 @@ export class LoggingServiceV2Client { return this.descriptors.page.listLogs.asyncIterate( this.innerApiCalls['listLogs'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } // -------------------- @@ -1560,10 +1560,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountCmekSettingsName( - billingAccountCmekSettingsName: string + billingAccountCmekSettingsName: string, ) { return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match( - billingAccountCmekSettingsName + billingAccountCmekSettingsName, ).billing_account; } @@ -1589,10 +1589,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountExclusionName( - billingAccountExclusionName: string + billingAccountExclusionName: string, ) { return this.pathTemplates.billingAccountExclusionPathTemplate.match( - billingAccountExclusionName + billingAccountExclusionName, ).billing_account; } @@ -1604,10 +1604,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromBillingAccountExclusionName( - billingAccountExclusionName: string + billingAccountExclusionName: string, ) { return this.pathTemplates.billingAccountExclusionPathTemplate.match( - billingAccountExclusionName + billingAccountExclusionName, ).exclusion; } @@ -1622,7 +1622,7 @@ export class LoggingServiceV2Client { billingAccountLocationBucketPath( billingAccount: string, location: string, - bucket: string + bucket: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({ billing_account: billingAccount, @@ -1639,10 +1639,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).billing_account; } @@ -1654,10 +1654,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).location; } @@ -1669,10 +1669,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).bucket; } @@ -1689,7 +1689,7 @@ export class LoggingServiceV2Client { billingAccount: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render( { @@ -1697,7 +1697,7 @@ export class LoggingServiceV2Client { location: location, bucket: bucket, link: link, - } + }, ); } @@ -1709,10 +1709,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).billing_account; } @@ -1724,10 +1724,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).location; } @@ -1739,10 +1739,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).bucket; } @@ -1754,10 +1754,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).link; } @@ -1774,7 +1774,7 @@ export class LoggingServiceV2Client { billingAccount: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.render( { @@ -1782,7 +1782,7 @@ export class LoggingServiceV2Client { location: location, bucket: bucket, view: view, - } + }, ); } @@ -1794,10 +1794,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).billing_account; } @@ -1809,10 +1809,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).location; } @@ -1824,10 +1824,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).bucket; } @@ -1839,10 +1839,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).view; } @@ -1869,7 +1869,7 @@ export class LoggingServiceV2Client { */ matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { return this.pathTemplates.billingAccountLogPathTemplate.match( - billingAccountLogName + billingAccountLogName, ).billing_account; } @@ -1882,7 +1882,7 @@ export class LoggingServiceV2Client { */ matchLogFromBillingAccountLogName(billingAccountLogName: string) { return this.pathTemplates.billingAccountLogPathTemplate.match( - billingAccountLogName + billingAccountLogName, ).log; } @@ -1906,10 +1906,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountSettingsName( - billingAccountSettingsName: string + billingAccountSettingsName: string, ) { return this.pathTemplates.billingAccountSettingsPathTemplate.match( - billingAccountSettingsName + billingAccountSettingsName, ).billing_account; } @@ -1935,10 +1935,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountSinkName( - billingAccountSinkName: string + billingAccountSinkName: string, ) { return this.pathTemplates.billingAccountSinkPathTemplate.match( - billingAccountSinkName + billingAccountSinkName, ).billing_account; } @@ -1951,7 +1951,7 @@ export class LoggingServiceV2Client { */ matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { return this.pathTemplates.billingAccountSinkPathTemplate.match( - billingAccountSinkName + billingAccountSinkName, ).sink; } @@ -1976,7 +1976,7 @@ export class LoggingServiceV2Client { */ matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { return this.pathTemplates.folderCmekSettingsPathTemplate.match( - folderCmekSettingsName + folderCmekSettingsName, ).folder; } @@ -2003,7 +2003,7 @@ export class LoggingServiceV2Client { */ matchFolderFromFolderExclusionName(folderExclusionName: string) { return this.pathTemplates.folderExclusionPathTemplate.match( - folderExclusionName + folderExclusionName, ).folder; } @@ -2016,7 +2016,7 @@ export class LoggingServiceV2Client { */ matchExclusionFromFolderExclusionName(folderExclusionName: string) { return this.pathTemplates.folderExclusionPathTemplate.match( - folderExclusionName + folderExclusionName, ).exclusion; } @@ -2045,7 +2045,7 @@ export class LoggingServiceV2Client { */ matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).folder; } @@ -2058,7 +2058,7 @@ export class LoggingServiceV2Client { */ matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).location; } @@ -2071,7 +2071,7 @@ export class LoggingServiceV2Client { */ matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).bucket; } @@ -2088,7 +2088,7 @@ export class LoggingServiceV2Client { folder: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.render({ folder: folder, @@ -2106,10 +2106,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).folder; } @@ -2121,10 +2121,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).location; } @@ -2136,10 +2136,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).bucket; } @@ -2151,10 +2151,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).link; } @@ -2171,7 +2171,7 @@ export class LoggingServiceV2Client { folder: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.render({ folder: folder, @@ -2189,10 +2189,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).folder; } @@ -2204,10 +2204,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).location; } @@ -2219,10 +2219,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).bucket; } @@ -2234,10 +2234,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).view; } @@ -2298,7 +2298,7 @@ export class LoggingServiceV2Client { */ matchFolderFromFolderSettingsName(folderSettingsName: string) { return this.pathTemplates.folderSettingsPathTemplate.match( - folderSettingsName + folderSettingsName, ).folder; } @@ -2396,10 +2396,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationCmekSettingsName( - organizationCmekSettingsName: string + organizationCmekSettingsName: string, ) { return this.pathTemplates.organizationCmekSettingsPathTemplate.match( - organizationCmekSettingsName + organizationCmekSettingsName, ).organization; } @@ -2425,10 +2425,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationExclusionName( - organizationExclusionName: string + organizationExclusionName: string, ) { return this.pathTemplates.organizationExclusionPathTemplate.match( - organizationExclusionName + organizationExclusionName, ).organization; } @@ -2440,10 +2440,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromOrganizationExclusionName( - organizationExclusionName: string + organizationExclusionName: string, ) { return this.pathTemplates.organizationExclusionPathTemplate.match( - organizationExclusionName + organizationExclusionName, ).exclusion; } @@ -2458,7 +2458,7 @@ export class LoggingServiceV2Client { organizationLocationBucketPath( organization: string, location: string, - bucket: string + bucket: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.render({ organization: organization, @@ -2475,10 +2475,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).organization; } @@ -2490,10 +2490,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).location; } @@ -2505,10 +2505,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).bucket; } @@ -2525,7 +2525,7 @@ export class LoggingServiceV2Client { organization: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.render( { @@ -2533,7 +2533,7 @@ export class LoggingServiceV2Client { location: location, bucket: bucket, link: link, - } + }, ); } @@ -2545,10 +2545,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).organization; } @@ -2560,10 +2560,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).location; } @@ -2575,10 +2575,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).bucket; } @@ -2590,10 +2590,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).link; } @@ -2610,7 +2610,7 @@ export class LoggingServiceV2Client { organization: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.render( { @@ -2618,7 +2618,7 @@ export class LoggingServiceV2Client { location: location, bucket: bucket, view: view, - } + }, ); } @@ -2630,10 +2630,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).organization; } @@ -2645,10 +2645,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).location; } @@ -2660,10 +2660,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).bucket; } @@ -2675,10 +2675,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).view; } @@ -2705,7 +2705,7 @@ export class LoggingServiceV2Client { */ matchOrganizationFromOrganizationLogName(organizationLogName: string) { return this.pathTemplates.organizationLogPathTemplate.match( - organizationLogName + organizationLogName, ).organization; } @@ -2718,7 +2718,7 @@ export class LoggingServiceV2Client { */ matchLogFromOrganizationLogName(organizationLogName: string) { return this.pathTemplates.organizationLogPathTemplate.match( - organizationLogName + organizationLogName, ).log; } @@ -2742,10 +2742,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationSettingsName( - organizationSettingsName: string + organizationSettingsName: string, ) { return this.pathTemplates.organizationSettingsPathTemplate.match( - organizationSettingsName + organizationSettingsName, ).organization; } @@ -2772,7 +2772,7 @@ export class LoggingServiceV2Client { */ matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { return this.pathTemplates.organizationSinkPathTemplate.match( - organizationSinkName + organizationSinkName, ).organization; } @@ -2785,7 +2785,7 @@ export class LoggingServiceV2Client { */ matchSinkFromOrganizationSinkName(organizationSinkName: string) { return this.pathTemplates.organizationSinkPathTemplate.match( - organizationSinkName + organizationSinkName, ).sink; } @@ -2833,7 +2833,7 @@ export class LoggingServiceV2Client { */ matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { return this.pathTemplates.projectCmekSettingsPathTemplate.match( - projectCmekSettingsName + projectCmekSettingsName, ).project; } @@ -2860,7 +2860,7 @@ export class LoggingServiceV2Client { */ matchProjectFromProjectExclusionName(projectExclusionName: string) { return this.pathTemplates.projectExclusionPathTemplate.match( - projectExclusionName + projectExclusionName, ).project; } @@ -2873,7 +2873,7 @@ export class LoggingServiceV2Client { */ matchExclusionFromProjectExclusionName(projectExclusionName: string) { return this.pathTemplates.projectExclusionPathTemplate.match( - projectExclusionName + projectExclusionName, ).exclusion; } @@ -2902,7 +2902,7 @@ export class LoggingServiceV2Client { */ matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).project; } @@ -2914,10 +2914,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketName( - projectLocationBucketName: string + projectLocationBucketName: string, ) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).location; } @@ -2930,7 +2930,7 @@ export class LoggingServiceV2Client { */ matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).bucket; } @@ -2947,7 +2947,7 @@ export class LoggingServiceV2Client { project: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.render({ project: project, @@ -2965,10 +2965,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).project; } @@ -2980,10 +2980,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).location; } @@ -2995,10 +2995,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).bucket; } @@ -3010,10 +3010,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).link; } @@ -3030,7 +3030,7 @@ export class LoggingServiceV2Client { project: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.render({ project: project, @@ -3048,10 +3048,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).project; } @@ -3063,10 +3063,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).location; } @@ -3078,10 +3078,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).bucket; } @@ -3093,10 +3093,10 @@ export class LoggingServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).view; } @@ -3158,7 +3158,7 @@ export class LoggingServiceV2Client { */ matchProjectFromProjectSettingsName(projectSettingsName: string) { return this.pathTemplates.projectSettingsPathTemplate.match( - projectSettingsName + projectSettingsName, ).project; } diff --git a/handwritten/logging/src/v2/metrics_service_v2_client.ts b/handwritten/logging/src/v2/metrics_service_v2_client.ts index aae4b7e3177..5c00af6ca8b 100644 --- a/handwritten/logging/src/v2/metrics_service_v2_client.ts +++ b/handwritten/logging/src/v2/metrics_service_v2_client.ts @@ -106,7 +106,7 @@ export class MetricsServiceV2Client { */ constructor( opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback + gaxInstance?: typeof gax | typeof gax.fallback, ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof MetricsServiceV2Client; @@ -116,7 +116,7 @@ export class MetricsServiceV2Client { opts?.universe_domain !== opts?.universeDomain ) { throw new Error( - 'Please set either universe_domain or universeDomain, but not both.' + 'Please set either universe_domain or universeDomain, but not both.', ); } const universeDomainEnvVar = @@ -200,111 +200,111 @@ export class MetricsServiceV2Client { // Create useful helper objects for these. this.pathTemplates = { billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/cmekSettings' + 'billingAccounts/{billing_account}/cmekSettings', ), billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/exclusions/{exclusion}' + 'billingAccounts/{billing_account}/exclusions/{exclusion}', ), billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}', ), billingAccountLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}', ), billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}' + 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}', ), billingAccountLogPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/logs/{log}' + 'billingAccounts/{billing_account}/logs/{log}', ), billingAccountSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/settings' + 'billingAccounts/{billing_account}/settings', ), billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate( - 'billingAccounts/{billing_account}/sinks/{sink}' + 'billingAccounts/{billing_account}/sinks/{sink}', ), folderCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/cmekSettings' + 'folders/{folder}/cmekSettings', ), folderExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/exclusions/{exclusion}' + 'folders/{folder}/exclusions/{exclusion}', ), folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}' + 'folders/{folder}/locations/{location}/buckets/{bucket}', ), folderLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}' + 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}', ), folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' + 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}', ), folderLogPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/logs/{log}' + 'folders/{folder}/logs/{log}', ), folderSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/settings' + 'folders/{folder}/settings', ), folderSinkPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/sinks/{sink}' + 'folders/{folder}/sinks/{sink}', ), logMetricPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/metrics/{metric}' + 'projects/{project}/metrics/{metric}', ), organizationCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/cmekSettings' + 'organizations/{organization}/cmekSettings', ), organizationExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/exclusions/{exclusion}' + 'organizations/{organization}/exclusions/{exclusion}', ), organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}', ), organizationLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}', ), organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' + 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}', ), organizationLogPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/logs/{log}' + 'organizations/{organization}/logs/{log}', ), organizationSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/settings' + 'organizations/{organization}/settings', ), organizationSinkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/sinks/{sink}' + 'organizations/{organization}/sinks/{sink}', ), projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' + 'projects/{project}', ), projectCmekSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/cmekSettings' + 'projects/{project}/cmekSettings', ), projectExclusionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/exclusions/{exclusion}' + 'projects/{project}/exclusions/{exclusion}', ), projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}' + 'projects/{project}/locations/{location}/buckets/{bucket}', ), projectLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}' + 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', ), projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' + 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', ), projectLogPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/logs/{log}' + 'projects/{project}/logs/{log}', ), projectSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/settings' + 'projects/{project}/settings', ), projectSinkPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/sinks/{sink}' + 'projects/{project}/sinks/{sink}', ), }; @@ -315,7 +315,7 @@ export class MetricsServiceV2Client { listLogMetrics: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', - 'metrics' + 'metrics', ), }; @@ -324,7 +324,7 @@ export class MetricsServiceV2Client { 'google.logging.v2.MetricsServiceV2', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')} + {'x-goog-api-client': clientHeader.join(' ')}, ); // Set up a dictionary of "inner API calls"; the core implementation @@ -358,12 +358,12 @@ export class MetricsServiceV2Client { this.metricsServiceV2Stub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService( - 'google.logging.v2.MetricsServiceV2' + 'google.logging.v2.MetricsServiceV2', ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.MetricsServiceV2, this._opts, - this._providedCustomServicePath + this._providedCustomServicePath, ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -387,7 +387,7 @@ export class MetricsServiceV2Client { }, (err: Error | null | undefined) => () => { throw err; - } + }, ); const descriptor = this.descriptors.page[methodName] || undefined; @@ -395,7 +395,7 @@ export class MetricsServiceV2Client { callPromise, this._defaults[methodName], descriptor, - this._opts.fallback + this._opts.fallback, ); this.innerApiCalls[methodName] = apiCall; @@ -416,7 +416,7 @@ export class MetricsServiceV2Client { ) { process.emitWarning( 'Static servicePath is deprecated, please use the instance method instead.', - 'DeprecationWarning' + 'DeprecationWarning', ); } return 'logging.googleapis.com'; @@ -434,7 +434,7 @@ export class MetricsServiceV2Client { ) { process.emitWarning( 'Static apiEndpoint is deprecated, please use the instance method instead.', - 'DeprecationWarning' + 'DeprecationWarning', ); } return 'logging.googleapis.com'; @@ -482,7 +482,7 @@ export class MetricsServiceV2Client { * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( - callback?: Callback + callback?: Callback, ): Promise | void { if (callback) { this.auth.getProjectId(callback); @@ -514,7 +514,7 @@ export class MetricsServiceV2Client { */ getLogMetric( request?: protos.google.logging.v2.IGetLogMetricRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -529,7 +529,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): void; getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, @@ -537,7 +537,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): void; getLogMetric( request?: protos.google.logging.v2.IGetLogMetricRequest, @@ -552,7 +552,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -603,7 +603,7 @@ export class MetricsServiceV2Client { */ createLogMetric( request?: protos.google.logging.v2.ICreateLogMetricRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -618,7 +618,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): void; createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, @@ -626,7 +626,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): void; createLogMetric( request?: protos.google.logging.v2.ICreateLogMetricRequest, @@ -641,7 +641,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -693,7 +693,7 @@ export class MetricsServiceV2Client { */ updateLogMetric( request?: protos.google.logging.v2.IUpdateLogMetricRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -708,7 +708,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): void; updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, @@ -716,7 +716,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): void; updateLogMetric( request?: protos.google.logging.v2.IUpdateLogMetricRequest, @@ -731,7 +731,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.logging.v2.ILogMetric, @@ -777,7 +777,7 @@ export class MetricsServiceV2Client { */ deleteLogMetric( request?: protos.google.logging.v2.IDeleteLogMetricRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.protobuf.IEmpty, @@ -792,7 +792,7 @@ export class MetricsServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, @@ -800,7 +800,7 @@ export class MetricsServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): void; deleteLogMetric( request?: protos.google.logging.v2.IDeleteLogMetricRequest, @@ -815,7 +815,7 @@ export class MetricsServiceV2Client { protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, {} | null | undefined - > + >, ): Promise< [ protos.google.protobuf.IEmpty, @@ -874,7 +874,7 @@ export class MetricsServiceV2Client { */ listLogMetrics( request?: protos.google.logging.v2.IListLogMetricsRequest, - options?: CallOptions + options?: CallOptions, ): Promise< [ protos.google.logging.v2.ILogMetric[], @@ -889,7 +889,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, protos.google.logging.v2.ILogMetric - > + >, ): void; listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, @@ -897,7 +897,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, protos.google.logging.v2.ILogMetric - > + >, ): void; listLogMetrics( request?: protos.google.logging.v2.IListLogMetricsRequest, @@ -912,7 +912,7 @@ export class MetricsServiceV2Client { protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, protos.google.logging.v2.ILogMetric - > + >, ): Promise< [ protos.google.logging.v2.ILogMetric[], @@ -969,7 +969,7 @@ export class MetricsServiceV2Client { */ listLogMetricsStream( request?: protos.google.logging.v2.IListLogMetricsRequest, - options?: CallOptions + options?: CallOptions, ): Transform { request = request || {}; options = options || {}; @@ -985,7 +985,7 @@ export class MetricsServiceV2Client { return this.descriptors.page.listLogMetrics.createStream( this.innerApiCalls.listLogMetrics as GaxCall, request, - callSettings + callSettings, ); } @@ -1022,7 +1022,7 @@ export class MetricsServiceV2Client { */ listLogMetricsAsync( request?: protos.google.logging.v2.IListLogMetricsRequest, - options?: CallOptions + options?: CallOptions, ): AsyncIterable { request = request || {}; options = options || {}; @@ -1038,7 +1038,7 @@ export class MetricsServiceV2Client { return this.descriptors.page.listLogMetrics.asyncIterate( this.innerApiCalls['listLogMetrics'] as GaxCall, request as {}, - callSettings + callSettings, ) as AsyncIterable; } // -------------------- @@ -1065,10 +1065,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountCmekSettingsName( - billingAccountCmekSettingsName: string + billingAccountCmekSettingsName: string, ) { return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match( - billingAccountCmekSettingsName + billingAccountCmekSettingsName, ).billing_account; } @@ -1094,10 +1094,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountExclusionName( - billingAccountExclusionName: string + billingAccountExclusionName: string, ) { return this.pathTemplates.billingAccountExclusionPathTemplate.match( - billingAccountExclusionName + billingAccountExclusionName, ).billing_account; } @@ -1109,10 +1109,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromBillingAccountExclusionName( - billingAccountExclusionName: string + billingAccountExclusionName: string, ) { return this.pathTemplates.billingAccountExclusionPathTemplate.match( - billingAccountExclusionName + billingAccountExclusionName, ).exclusion; } @@ -1127,7 +1127,7 @@ export class MetricsServiceV2Client { billingAccountLocationBucketPath( billingAccount: string, location: string, - bucket: string + bucket: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({ billing_account: billingAccount, @@ -1144,10 +1144,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).billing_account; } @@ -1159,10 +1159,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).location; } @@ -1174,10 +1174,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketName( - billingAccountLocationBucketName: string + billingAccountLocationBucketName: string, ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( - billingAccountLocationBucketName + billingAccountLocationBucketName, ).bucket; } @@ -1194,7 +1194,7 @@ export class MetricsServiceV2Client { billingAccount: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render( { @@ -1202,7 +1202,7 @@ export class MetricsServiceV2Client { location: location, bucket: bucket, link: link, - } + }, ); } @@ -1214,10 +1214,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).billing_account; } @@ -1229,10 +1229,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).location; } @@ -1244,10 +1244,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).bucket; } @@ -1259,10 +1259,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromBillingAccountLocationBucketLinkName( - billingAccountLocationBucketLinkName: string + billingAccountLocationBucketLinkName: string, ) { return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match( - billingAccountLocationBucketLinkName + billingAccountLocationBucketLinkName, ).link; } @@ -1279,7 +1279,7 @@ export class MetricsServiceV2Client { billingAccount: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.render( { @@ -1287,7 +1287,7 @@ export class MetricsServiceV2Client { location: location, bucket: bucket, view: view, - } + }, ); } @@ -1299,10 +1299,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).billing_account; } @@ -1314,10 +1314,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).location; } @@ -1329,10 +1329,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).bucket; } @@ -1344,10 +1344,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromBillingAccountLocationBucketViewName( - billingAccountLocationBucketViewName: string + billingAccountLocationBucketViewName: string, ) { return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match( - billingAccountLocationBucketViewName + billingAccountLocationBucketViewName, ).view; } @@ -1374,7 +1374,7 @@ export class MetricsServiceV2Client { */ matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { return this.pathTemplates.billingAccountLogPathTemplate.match( - billingAccountLogName + billingAccountLogName, ).billing_account; } @@ -1387,7 +1387,7 @@ export class MetricsServiceV2Client { */ matchLogFromBillingAccountLogName(billingAccountLogName: string) { return this.pathTemplates.billingAccountLogPathTemplate.match( - billingAccountLogName + billingAccountLogName, ).log; } @@ -1411,10 +1411,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountSettingsName( - billingAccountSettingsName: string + billingAccountSettingsName: string, ) { return this.pathTemplates.billingAccountSettingsPathTemplate.match( - billingAccountSettingsName + billingAccountSettingsName, ).billing_account; } @@ -1440,10 +1440,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountSinkName( - billingAccountSinkName: string + billingAccountSinkName: string, ) { return this.pathTemplates.billingAccountSinkPathTemplate.match( - billingAccountSinkName + billingAccountSinkName, ).billing_account; } @@ -1456,7 +1456,7 @@ export class MetricsServiceV2Client { */ matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { return this.pathTemplates.billingAccountSinkPathTemplate.match( - billingAccountSinkName + billingAccountSinkName, ).sink; } @@ -1481,7 +1481,7 @@ export class MetricsServiceV2Client { */ matchFolderFromFolderCmekSettingsName(folderCmekSettingsName: string) { return this.pathTemplates.folderCmekSettingsPathTemplate.match( - folderCmekSettingsName + folderCmekSettingsName, ).folder; } @@ -1508,7 +1508,7 @@ export class MetricsServiceV2Client { */ matchFolderFromFolderExclusionName(folderExclusionName: string) { return this.pathTemplates.folderExclusionPathTemplate.match( - folderExclusionName + folderExclusionName, ).folder; } @@ -1521,7 +1521,7 @@ export class MetricsServiceV2Client { */ matchExclusionFromFolderExclusionName(folderExclusionName: string) { return this.pathTemplates.folderExclusionPathTemplate.match( - folderExclusionName + folderExclusionName, ).exclusion; } @@ -1550,7 +1550,7 @@ export class MetricsServiceV2Client { */ matchFolderFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).folder; } @@ -1563,7 +1563,7 @@ export class MetricsServiceV2Client { */ matchLocationFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).location; } @@ -1576,7 +1576,7 @@ export class MetricsServiceV2Client { */ matchBucketFromFolderLocationBucketName(folderLocationBucketName: string) { return this.pathTemplates.folderLocationBucketPathTemplate.match( - folderLocationBucketName + folderLocationBucketName, ).bucket; } @@ -1593,7 +1593,7 @@ export class MetricsServiceV2Client { folder: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.render({ folder: folder, @@ -1611,10 +1611,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).folder; } @@ -1626,10 +1626,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).location; } @@ -1641,10 +1641,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).bucket; } @@ -1656,10 +1656,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromFolderLocationBucketLinkName( - folderLocationBucketLinkName: string + folderLocationBucketLinkName: string, ) { return this.pathTemplates.folderLocationBucketLinkPathTemplate.match( - folderLocationBucketLinkName + folderLocationBucketLinkName, ).link; } @@ -1676,7 +1676,7 @@ export class MetricsServiceV2Client { folder: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.render({ folder: folder, @@ -1694,10 +1694,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the folder. */ matchFolderFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).folder; } @@ -1709,10 +1709,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).location; } @@ -1724,10 +1724,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).bucket; } @@ -1739,10 +1739,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromFolderLocationBucketViewName( - folderLocationBucketViewName: string + folderLocationBucketViewName: string, ) { return this.pathTemplates.folderLocationBucketViewPathTemplate.match( - folderLocationBucketViewName + folderLocationBucketViewName, ).view; } @@ -1803,7 +1803,7 @@ export class MetricsServiceV2Client { */ matchFolderFromFolderSettingsName(folderSettingsName: string) { return this.pathTemplates.folderSettingsPathTemplate.match( - folderSettingsName + folderSettingsName, ).folder; } @@ -1901,10 +1901,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationCmekSettingsName( - organizationCmekSettingsName: string + organizationCmekSettingsName: string, ) { return this.pathTemplates.organizationCmekSettingsPathTemplate.match( - organizationCmekSettingsName + organizationCmekSettingsName, ).organization; } @@ -1930,10 +1930,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationExclusionName( - organizationExclusionName: string + organizationExclusionName: string, ) { return this.pathTemplates.organizationExclusionPathTemplate.match( - organizationExclusionName + organizationExclusionName, ).organization; } @@ -1945,10 +1945,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the exclusion. */ matchExclusionFromOrganizationExclusionName( - organizationExclusionName: string + organizationExclusionName: string, ) { return this.pathTemplates.organizationExclusionPathTemplate.match( - organizationExclusionName + organizationExclusionName, ).exclusion; } @@ -1963,7 +1963,7 @@ export class MetricsServiceV2Client { organizationLocationBucketPath( organization: string, location: string, - bucket: string + bucket: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.render({ organization: organization, @@ -1980,10 +1980,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).organization; } @@ -1995,10 +1995,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).location; } @@ -2010,10 +2010,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketName( - organizationLocationBucketName: string + organizationLocationBucketName: string, ) { return this.pathTemplates.organizationLocationBucketPathTemplate.match( - organizationLocationBucketName + organizationLocationBucketName, ).bucket; } @@ -2030,7 +2030,7 @@ export class MetricsServiceV2Client { organization: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.render( { @@ -2038,7 +2038,7 @@ export class MetricsServiceV2Client { location: location, bucket: bucket, link: link, - } + }, ); } @@ -2050,10 +2050,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).organization; } @@ -2065,10 +2065,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).location; } @@ -2080,10 +2080,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).bucket; } @@ -2095,10 +2095,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromOrganizationLocationBucketLinkName( - organizationLocationBucketLinkName: string + organizationLocationBucketLinkName: string, ) { return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match( - organizationLocationBucketLinkName + organizationLocationBucketLinkName, ).link; } @@ -2115,7 +2115,7 @@ export class MetricsServiceV2Client { organization: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.render( { @@ -2123,7 +2123,7 @@ export class MetricsServiceV2Client { location: location, bucket: bucket, view: view, - } + }, ); } @@ -2135,10 +2135,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).organization; } @@ -2150,10 +2150,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).location; } @@ -2165,10 +2165,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).bucket; } @@ -2180,10 +2180,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromOrganizationLocationBucketViewName( - organizationLocationBucketViewName: string + organizationLocationBucketViewName: string, ) { return this.pathTemplates.organizationLocationBucketViewPathTemplate.match( - organizationLocationBucketViewName + organizationLocationBucketViewName, ).view; } @@ -2210,7 +2210,7 @@ export class MetricsServiceV2Client { */ matchOrganizationFromOrganizationLogName(organizationLogName: string) { return this.pathTemplates.organizationLogPathTemplate.match( - organizationLogName + organizationLogName, ).organization; } @@ -2223,7 +2223,7 @@ export class MetricsServiceV2Client { */ matchLogFromOrganizationLogName(organizationLogName: string) { return this.pathTemplates.organizationLogPathTemplate.match( - organizationLogName + organizationLogName, ).log; } @@ -2247,10 +2247,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationSettingsName( - organizationSettingsName: string + organizationSettingsName: string, ) { return this.pathTemplates.organizationSettingsPathTemplate.match( - organizationSettingsName + organizationSettingsName, ).organization; } @@ -2277,7 +2277,7 @@ export class MetricsServiceV2Client { */ matchOrganizationFromOrganizationSinkName(organizationSinkName: string) { return this.pathTemplates.organizationSinkPathTemplate.match( - organizationSinkName + organizationSinkName, ).organization; } @@ -2290,7 +2290,7 @@ export class MetricsServiceV2Client { */ matchSinkFromOrganizationSinkName(organizationSinkName: string) { return this.pathTemplates.organizationSinkPathTemplate.match( - organizationSinkName + organizationSinkName, ).sink; } @@ -2338,7 +2338,7 @@ export class MetricsServiceV2Client { */ matchProjectFromProjectCmekSettingsName(projectCmekSettingsName: string) { return this.pathTemplates.projectCmekSettingsPathTemplate.match( - projectCmekSettingsName + projectCmekSettingsName, ).project; } @@ -2365,7 +2365,7 @@ export class MetricsServiceV2Client { */ matchProjectFromProjectExclusionName(projectExclusionName: string) { return this.pathTemplates.projectExclusionPathTemplate.match( - projectExclusionName + projectExclusionName, ).project; } @@ -2378,7 +2378,7 @@ export class MetricsServiceV2Client { */ matchExclusionFromProjectExclusionName(projectExclusionName: string) { return this.pathTemplates.projectExclusionPathTemplate.match( - projectExclusionName + projectExclusionName, ).exclusion; } @@ -2407,7 +2407,7 @@ export class MetricsServiceV2Client { */ matchProjectFromProjectLocationBucketName(projectLocationBucketName: string) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).project; } @@ -2419,10 +2419,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketName( - projectLocationBucketName: string + projectLocationBucketName: string, ) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).location; } @@ -2435,7 +2435,7 @@ export class MetricsServiceV2Client { */ matchBucketFromProjectLocationBucketName(projectLocationBucketName: string) { return this.pathTemplates.projectLocationBucketPathTemplate.match( - projectLocationBucketName + projectLocationBucketName, ).bucket; } @@ -2452,7 +2452,7 @@ export class MetricsServiceV2Client { project: string, location: string, bucket: string, - link: string + link: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.render({ project: project, @@ -2470,10 +2470,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).project; } @@ -2485,10 +2485,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).location; } @@ -2500,10 +2500,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).bucket; } @@ -2515,10 +2515,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the link. */ matchLinkFromProjectLocationBucketLinkName( - projectLocationBucketLinkName: string + projectLocationBucketLinkName: string, ) { return this.pathTemplates.projectLocationBucketLinkPathTemplate.match( - projectLocationBucketLinkName + projectLocationBucketLinkName, ).link; } @@ -2535,7 +2535,7 @@ export class MetricsServiceV2Client { project: string, location: string, bucket: string, - view: string + view: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.render({ project: project, @@ -2553,10 +2553,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the project. */ matchProjectFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).project; } @@ -2568,10 +2568,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the location. */ matchLocationFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).location; } @@ -2583,10 +2583,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the bucket. */ matchBucketFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).bucket; } @@ -2598,10 +2598,10 @@ export class MetricsServiceV2Client { * @returns {string} A string representing the view. */ matchViewFromProjectLocationBucketViewName( - projectLocationBucketViewName: string + projectLocationBucketViewName: string, ) { return this.pathTemplates.projectLocationBucketViewPathTemplate.match( - projectLocationBucketViewName + projectLocationBucketViewName, ).view; } @@ -2663,7 +2663,7 @@ export class MetricsServiceV2Client { */ matchProjectFromProjectSettingsName(projectSettingsName: string) { return this.pathTemplates.projectSettingsPathTemplate.match( - projectSettingsName + projectSettingsName, ).project; } diff --git a/handwritten/logging/system-test/install.ts b/handwritten/logging/system-test/install.ts index 83b83f332c3..22bbd83361c 100644 --- a/handwritten/logging/system-test/install.ts +++ b/handwritten/logging/system-test/install.ts @@ -28,7 +28,7 @@ describe('📦 pack-n-play test', () => { sample: { description: 'TypeScript user can use the type definitions', ts: readFileSync( - './system-test/fixtures/sample/src/index.ts' + './system-test/fixtures/sample/src/index.ts', ).toString(), }, }; @@ -42,7 +42,7 @@ describe('📦 pack-n-play test', () => { sample: { description: 'JavaScript user can use the library', ts: readFileSync( - './system-test/fixtures/sample/src/index.js' + './system-test/fixtures/sample/src/index.js', ).toString(), }, }; diff --git a/handwritten/logging/system-test/logging.ts b/handwritten/logging/system-test/logging.ts index 19dddaeae58..266f881ebc9 100644 --- a/handwritten/logging/system-test/logging.ts +++ b/handwritten/logging/system-test/logging.ts @@ -133,7 +133,7 @@ describe('Logging', () => { } catch (err) { console.warn(`failed to delete "${name}": ${err}`); } - }) + }), ); } }); @@ -159,7 +159,7 @@ describe('Logging', () => { // tests are being run, so let's not care about that. apiResponse.destination = apiResponse.destination!.replace( /projects\/[^/]*\//, - '' + '', ); assert.strictEqual(apiResponse.destination, destination); }); @@ -174,7 +174,7 @@ describe('Logging', () => { // tests are being run, so let's not care about that. assert.strictEqual( apiResponse.destination!.replace(/projects\/[^/]*\//, ''), - destination.replace(/projects\/[^/]*\//, '') + destination.replace(/projects\/[^/]*\//, ''), ); }); @@ -304,7 +304,7 @@ describe('Logging', () => { function getEntriesFromLog( log: Log, config: {numExpectedMessages: number}, - callback: (err: Error | null, entries?: Entry[]) => void + callback: (err: Error | null, entries?: Entry[]) => void, ) { let numAttempts = 0; @@ -332,7 +332,7 @@ describe('Logging', () => { } callback(null, entries); - } + }, ); } } @@ -398,10 +398,10 @@ describe('Logging', () => { entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.['name'], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + instrumentation.NODEJS_LIBRARY_NAME_PREFIX, ); done(); - } + }, ); }); }); @@ -441,7 +441,7 @@ describe('Logging', () => { assert.strictEqual( resp.entries.length, 1, - `Expected 1 tailed entry; Got ${resp.entries.length}.` + `Expected 1 tailed entry; Got ${resp.entries.length}.`, ); clearInterval(logInterval); stream.end(); @@ -468,7 +468,7 @@ describe('Logging', () => { assert.ifError(err); assert.strictEqual(entries!.length, logEntriesExpected.length); done(); - } + }, ); }); @@ -541,7 +541,7 @@ describe('Logging', () => { ]); done(); - } + }, ); }); }); @@ -563,7 +563,7 @@ describe('Logging', () => { assert.ifError(err); assert.deepStrictEqual( entries!.map(x => x.data), - ['3', '2', '1'] + ['3', '2', '1'], ); done(); }); @@ -587,10 +587,10 @@ describe('Logging', () => { assert.ifError(err); assert.deepStrictEqual( entries!.reverse().map(x => x.data), - messages + messages, ); done(); - } + }, ); })(); }); @@ -665,7 +665,7 @@ describe('Logging', () => { const entry = entries![0]; assert.strictEqual( entry.metadata.httpRequest?.status, - metadata.httpRequest.status + metadata.httpRequest.status, ); assert.deepStrictEqual(entry.data, {}); done(); @@ -694,7 +694,7 @@ describe('Logging', () => { assert.strictEqual(entry.metadata.httpRequest?.protocol, 'http:'); assert.strictEqual( entry.metadata.trace, - `projects/${PROJECT_ID}/traces/1` + `projects/${PROJECT_ID}/traces/1`, ); assert.strictEqual(entry.metadata.spanId, '2'); assert.strictEqual(entry.metadata.traceSampled, true); @@ -726,7 +726,7 @@ describe('Logging', () => { assert.strictEqual(entry.metadata.httpRequest?.protocol, 'http:'); assert.strictEqual( entry.metadata.trace, - `projects/${PROJECT_ID}/traces/0af7651916cd43dd8448eb211c80319c` + `projects/${PROJECT_ID}/traces/0af7651916cd43dd8448eb211c80319c`, ); assert.strictEqual(entry.metadata.spanId, 'b7ad6b7169203331'); assert.strictEqual(entry.metadata.traceSampled, true); @@ -775,7 +775,7 @@ describe('Logging', () => { assert.strictEqual(entry.metadata.spanId, metadata.spanId); assert.strictEqual( entry.metadata.traceSampled, - metadata.traceSampled + metadata.traceSampled, ); }); }); @@ -800,7 +800,7 @@ describe('Logging', () => { assert.strictEqual(entry.data, spanTestMessage); assert.strictEqual( entry.metadata.trace, - `projects/${PROJECT_ID}/traces/${traceId}` + `projects/${PROJECT_ID}/traces/${traceId}`, ); assert.strictEqual(entry.metadata.spanId, spanId); assert.strictEqual(entry.metadata.traceSampled, traceSampled); @@ -840,19 +840,19 @@ describe('Logging', () => { assert.strictEqual(entry.data, 'some log message'); assert.strictEqual( entry.metadata.httpRequest?.requestUrl, - URL + URL, ); assert.strictEqual( entry.metadata.httpRequest?.protocol, - 'http:' + 'http:', ); assert.strictEqual( entry.metadata.trace, - `projects/${PROJECT_ID}/traces/${traceId}` + `projects/${PROJECT_ID}/traces/${traceId}`, ); assert.strictEqual(entry.metadata.spanId, spanId); assert.strictEqual(entry.metadata.traceSampled, traceSampled); - } + }, ); }); }); @@ -887,19 +887,19 @@ describe('Logging', () => { assert.strictEqual(entry.data, 'some log message'); assert.strictEqual( entry.metadata.httpRequest?.requestUrl, - URL + URL, ); assert.strictEqual( entry.metadata.httpRequest?.protocol, - 'http:' + 'http:', ); assert.strictEqual( entry.metadata.trace, - `projects/${PROJECT_ID}/traces/${traceId}` + `projects/${PROJECT_ID}/traces/${traceId}`, ); assert.strictEqual(entry.metadata.spanId, spanId); assert.strictEqual(entry.metadata.traceSampled, traceSampled); - } + }, ); }); }); @@ -945,7 +945,7 @@ describe('Logging', () => { }, }, }, - done + done, ); }); @@ -996,8 +996,8 @@ describe('Logging', () => { await log.write(logEntries[0], options); assert.ok( /gax\/[0-9]+\.[\w.-]+ gapic\/[0-9]+\.[\w.-]+ gl-node\/[0-9]+\.[\w.-]+ grpc\/[0-9]+\.[\w.-]+ gccl\/[0-9]+\.[\w.-]+/.test( - http2spy.requests[0]['x-goog-api-client'][0] - ) + http2spy.requests[0]['x-goog-api-client'][0], + ), ); }); }); diff --git a/handwritten/logging/test/entry.ts b/handwritten/logging/test/entry.ts index 72386adc60d..9b11387ee04 100644 --- a/handwritten/logging/test/entry.ts +++ b/handwritten/logging/test/entry.ts @@ -222,7 +222,7 @@ describe('Entry', () => { it('should pass removeCircular to objToStruct_', done => { fakeObjToStruct = ( obj: {}, - options: common.ObjectToStructConverterConfig + options: common.ObjectToStructConverterConfig, ) => { assert.strictEqual(options.removeCircular, true); done(); @@ -335,12 +335,12 @@ describe('Entry', () => { const json = entry.toJSON(); assert.strictEqual( json.trace, - `projects//traces/${span.spanContext().traceId}` + `projects//traces/${span.spanContext().traceId}`, ); assert.strictEqual(json.spanId, span.spanContext().spanId); assert.strictEqual( json.traceSampled, - (span.spanContext().traceFlags & 1) !== 0 + (span.spanContext().traceFlags & 1) !== 0, ); }); }); @@ -360,12 +360,12 @@ describe('Entry', () => { const json = entry.toJSON(); assert.strictEqual( json.trace, - `projects//traces/${span.spanContext().traceId}` + `projects//traces/${span.spanContext().traceId}`, ); assert.strictEqual(json.spanId, span.spanContext().spanId); assert.strictEqual( json.traceSampled, - (span.spanContext().traceFlags & 1) !== 0 + (span.spanContext().traceFlags & 1) !== 0, ); }); }); @@ -413,7 +413,7 @@ describe('Entry', () => { entry.data = 'this is a log'; const json = entry.toStructuredJSON(); assert( - withinExpectedTimeBoundaries(nanosAndSecondsToDate(json.timestamp!)) + withinExpectedTimeBoundaries(nanosAndSecondsToDate(json.timestamp!)), ); delete json.timestamp; const expectedJSON = { @@ -441,7 +441,7 @@ describe('Entry', () => { entry.metadata.timestamp = new Date(); const json = entry.toStructuredJSON(); assert( - withinExpectedTimeBoundaries(nanosAndSecondsToDate(json.timestamp!)) + withinExpectedTimeBoundaries(nanosAndSecondsToDate(json.timestamp!)), ); }); @@ -513,15 +513,15 @@ describe('Entry', () => { const json = entry.toStructuredJSON(); assert.strictEqual( json[entryTypes.TRACE_KEY], - `projects//traces/${span.spanContext().traceId}` + `projects//traces/${span.spanContext().traceId}`, ); assert.strictEqual( json[entryTypes.SPAN_ID_KEY], - span.spanContext().spanId + span.spanContext().spanId, ); assert.strictEqual( json[entryTypes.TRACE_SAMPLED_KEY], - (span.spanContext().traceFlags & 1) !== 0 + (span.spanContext().traceFlags & 1) !== 0, ); }); }); @@ -541,15 +541,15 @@ describe('Entry', () => { const json = entry.toStructuredJSON(); assert.strictEqual( json[entryTypes.TRACE_KEY], - `projects//traces/${span.spanContext().traceId}` + `projects//traces/${span.spanContext().traceId}`, ); assert.strictEqual( json[entryTypes.SPAN_ID_KEY], - span.spanContext().spanId + span.spanContext().spanId, ); assert.strictEqual( json[entryTypes.TRACE_SAMPLED_KEY], - (span.spanContext().traceFlags & 1) !== 0 + (span.spanContext().traceFlags & 1) !== 0, ); }); }); @@ -571,7 +571,7 @@ describe('Entry', () => { assert.strictEqual(json[entryTypes.SPAN_ID_KEY], expected.spanId); assert.strictEqual( json[entryTypes.TRACE_SAMPLED_KEY], - expected.traceSampled + expected.traceSampled, ); }); }); diff --git a/handwritten/logging/test/gapic_config_service_v2_v2.ts b/handwritten/logging/test/gapic_config_service_v2_v2.ts index 7f6f4748934..590ace19a7b 100644 --- a/handwritten/logging/test/gapic_config_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_config_service_v2_v2.ts @@ -30,7 +30,7 @@ import {protobuf, LROperation, operationsProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects const root = protobuf.Root.fromJSON( - require('../protos/protos.json') + require('../protos/protos.json'), ).resolveAll(); // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -47,7 +47,7 @@ function generateSampleMessage(instance: T) { instance.constructor as typeof protobuf.Message ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject + filledObject, ) as T; } @@ -59,7 +59,7 @@ function stubSimpleCall(response?: ResponseType, error?: Error) { function stubSimpleCallWithCallback( response?: ResponseType, - error?: Error + error?: Error, ) { return error ? sinon.stub().callsArgWith(2, error) @@ -69,7 +69,7 @@ function stubSimpleCallWithCallback( function stubLongRunningCall( response?: ResponseType, callError?: Error, - lroError?: Error + lroError?: Error, ) { const innerStub = lroError ? sinon.stub().rejects(lroError) @@ -85,7 +85,7 @@ function stubLongRunningCall( function stubLongRunningCallWithCallback( response?: ResponseType, callError?: Error, - lroError?: Error + lroError?: Error, ) { const innerStub = lroError ? sinon.stub().rejects(lroError) @@ -100,7 +100,7 @@ function stubLongRunningCallWithCallback( function stubPageStreamingCall( responses?: ResponseType[], - error?: Error + error?: Error, ) { const pagingStub = sinon.stub(); if (responses) { @@ -138,7 +138,7 @@ function stubPageStreamingCall( function stubAsyncIterationCall( responses?: ResponseType[], - error?: Error + error?: Error, ) { let counter = 0; const asyncIterable = { @@ -345,16 +345,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetBucketRequest() + new protos.google.logging.v2.GetBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogBucket() + new protos.google.logging.v2.LogBucket(), ); client.innerApiCalls.getBucket = stubSimpleCall(expectedResponse); const [response] = await client.getBucket(request); @@ -376,16 +376,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetBucketRequest() + new protos.google.logging.v2.GetBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogBucket() + new protos.google.logging.v2.LogBucket(), ); client.innerApiCalls.getBucket = stubSimpleCallWithCallback(expectedResponse); @@ -394,14 +394,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogBucket | null + result?: protos.google.logging.v2.ILogBucket | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -423,11 +423,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetBucketRequest() + new protos.google.logging.v2.GetBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; @@ -451,11 +451,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetBucketRequest() + new protos.google.logging.v2.GetBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -472,16 +472,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateBucketRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogBucket() + new protos.google.logging.v2.LogBucket(), ); client.innerApiCalls.createBucket = stubSimpleCall(expectedResponse); const [response] = await client.createBucket(request); @@ -503,16 +503,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateBucketRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogBucket() + new protos.google.logging.v2.LogBucket(), ); client.innerApiCalls.createBucket = stubSimpleCallWithCallback(expectedResponse); @@ -521,14 +521,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogBucket | null + result?: protos.google.logging.v2.ILogBucket | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -550,18 +550,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateBucketRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createBucket = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.createBucket(request), expectedError); const actualRequest = ( @@ -581,11 +581,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateBucketRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -602,16 +602,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.UpdateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogBucket() + new protos.google.logging.v2.LogBucket(), ); client.innerApiCalls.updateBucket = stubSimpleCall(expectedResponse); const [response] = await client.updateBucket(request); @@ -633,16 +633,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.UpdateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogBucket() + new protos.google.logging.v2.LogBucket(), ); client.innerApiCalls.updateBucket = stubSimpleCallWithCallback(expectedResponse); @@ -651,14 +651,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogBucket | null + result?: protos.google.logging.v2.ILogBucket | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -680,18 +680,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.UpdateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateBucket = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.updateBucket(request), expectedError); const actualRequest = ( @@ -711,11 +711,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.UpdateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -732,16 +732,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteBucketRequest() + new protos.google.logging.v2.DeleteBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteBucket = stubSimpleCall(expectedResponse); const [response] = await client.deleteBucket(request); @@ -763,16 +763,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteBucketRequest() + new protos.google.logging.v2.DeleteBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteBucket = stubSimpleCallWithCallback(expectedResponse); @@ -781,14 +781,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.protobuf.IEmpty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -810,18 +810,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteBucketRequest() + new protos.google.logging.v2.DeleteBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteBucket = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.deleteBucket(request), expectedError); const actualRequest = ( @@ -841,11 +841,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteBucketRequest() + new protos.google.logging.v2.DeleteBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -862,16 +862,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UndeleteBucketRequest() + new protos.google.logging.v2.UndeleteBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UndeleteBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.undeleteBucket = stubSimpleCall(expectedResponse); const [response] = await client.undeleteBucket(request); @@ -893,16 +893,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UndeleteBucketRequest() + new protos.google.logging.v2.UndeleteBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UndeleteBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.undeleteBucket = stubSimpleCallWithCallback(expectedResponse); @@ -911,14 +911,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.protobuf.IEmpty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -940,18 +940,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UndeleteBucketRequest() + new protos.google.logging.v2.UndeleteBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UndeleteBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.undeleteBucket = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.undeleteBucket(request), expectedError); const actualRequest = ( @@ -971,11 +971,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UndeleteBucketRequest() + new protos.google.logging.v2.UndeleteBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UndeleteBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -992,22 +992,22 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetViewRequest() + new protos.google.logging.v2.GetViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogView() + new protos.google.logging.v2.LogView(), ); client.innerApiCalls.getView = stubSimpleCall(expectedResponse); const [response] = await client.getView(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -1023,16 +1023,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetViewRequest() + new protos.google.logging.v2.GetViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogView() + new protos.google.logging.v2.LogView(), ); client.innerApiCalls.getView = stubSimpleCallWithCallback(expectedResponse); @@ -1041,20 +1041,20 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogView | null + result?: protos.google.logging.v2.ILogView | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -1070,11 +1070,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetViewRequest() + new protos.google.logging.v2.GetViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; @@ -1082,7 +1082,7 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.getView = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getView(request), expectedError); const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -1098,11 +1098,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetViewRequest() + new protos.google.logging.v2.GetViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -1119,16 +1119,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateViewRequest() + new protos.google.logging.v2.CreateViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateViewRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogView() + new protos.google.logging.v2.LogView(), ); client.innerApiCalls.createView = stubSimpleCall(expectedResponse); const [response] = await client.createView(request); @@ -1150,16 +1150,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateViewRequest() + new protos.google.logging.v2.CreateViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateViewRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogView() + new protos.google.logging.v2.LogView(), ); client.innerApiCalls.createView = stubSimpleCallWithCallback(expectedResponse); @@ -1168,14 +1168,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogView | null + result?: protos.google.logging.v2.ILogView | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -1197,18 +1197,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateViewRequest() + new protos.google.logging.v2.CreateViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateViewRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createView = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.createView(request), expectedError); const actualRequest = ( @@ -1228,11 +1228,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateViewRequest() + new protos.google.logging.v2.CreateViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateViewRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -1249,16 +1249,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateViewRequest() + new protos.google.logging.v2.UpdateViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogView() + new protos.google.logging.v2.LogView(), ); client.innerApiCalls.updateView = stubSimpleCall(expectedResponse); const [response] = await client.updateView(request); @@ -1280,16 +1280,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateViewRequest() + new protos.google.logging.v2.UpdateViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogView() + new protos.google.logging.v2.LogView(), ); client.innerApiCalls.updateView = stubSimpleCallWithCallback(expectedResponse); @@ -1298,14 +1298,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogView | null + result?: protos.google.logging.v2.ILogView | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -1327,18 +1327,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateViewRequest() + new protos.google.logging.v2.UpdateViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateView = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.updateView(request), expectedError); const actualRequest = ( @@ -1358,11 +1358,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateViewRequest() + new protos.google.logging.v2.UpdateViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -1379,16 +1379,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteViewRequest() + new protos.google.logging.v2.DeleteViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteView = stubSimpleCall(expectedResponse); const [response] = await client.deleteView(request); @@ -1410,16 +1410,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteViewRequest() + new protos.google.logging.v2.DeleteViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteView = stubSimpleCallWithCallback(expectedResponse); @@ -1428,14 +1428,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.protobuf.IEmpty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -1457,18 +1457,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteViewRequest() + new protos.google.logging.v2.DeleteViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteView = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.deleteView(request), expectedError); const actualRequest = ( @@ -1488,11 +1488,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteViewRequest() + new protos.google.logging.v2.DeleteViewRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteViewRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -1509,22 +1509,22 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSinkRequest() + new protos.google.logging.v2.GetSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.logging.v2.LogSink(), ); client.innerApiCalls.getSink = stubSimpleCall(expectedResponse); const [response] = await client.getSink(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = (client.innerApiCalls.getSink as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -1540,16 +1540,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSinkRequest() + new protos.google.logging.v2.GetSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.logging.v2.LogSink(), ); client.innerApiCalls.getSink = stubSimpleCallWithCallback(expectedResponse); @@ -1558,20 +1558,20 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogSink | null + result?: protos.google.logging.v2.ILogSink | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = (client.innerApiCalls.getSink as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -1587,11 +1587,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSinkRequest() + new protos.google.logging.v2.GetSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; @@ -1599,7 +1599,7 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.getSink = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getSink(request), expectedError); const actualRequest = (client.innerApiCalls.getSink as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -1615,11 +1615,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSinkRequest() + new protos.google.logging.v2.GetSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -1636,16 +1636,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateSinkRequest() + new protos.google.logging.v2.CreateSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateSinkRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.logging.v2.LogSink(), ); client.innerApiCalls.createSink = stubSimpleCall(expectedResponse); const [response] = await client.createSink(request); @@ -1667,16 +1667,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateSinkRequest() + new protos.google.logging.v2.CreateSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateSinkRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.logging.v2.LogSink(), ); client.innerApiCalls.createSink = stubSimpleCallWithCallback(expectedResponse); @@ -1685,14 +1685,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogSink | null + result?: protos.google.logging.v2.ILogSink | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -1714,18 +1714,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateSinkRequest() + new protos.google.logging.v2.CreateSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateSinkRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createSink = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.createSink(request), expectedError); const actualRequest = ( @@ -1745,11 +1745,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateSinkRequest() + new protos.google.logging.v2.CreateSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateSinkRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -1766,16 +1766,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSinkRequest() + new protos.google.logging.v2.UpdateSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.logging.v2.LogSink(), ); client.innerApiCalls.updateSink = stubSimpleCall(expectedResponse); const [response] = await client.updateSink(request); @@ -1797,16 +1797,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSinkRequest() + new protos.google.logging.v2.UpdateSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogSink() + new protos.google.logging.v2.LogSink(), ); client.innerApiCalls.updateSink = stubSimpleCallWithCallback(expectedResponse); @@ -1815,14 +1815,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogSink | null + result?: protos.google.logging.v2.ILogSink | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -1844,18 +1844,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSinkRequest() + new protos.google.logging.v2.UpdateSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateSink = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.updateSink(request), expectedError); const actualRequest = ( @@ -1875,11 +1875,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSinkRequest() + new protos.google.logging.v2.UpdateSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -1896,16 +1896,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteSinkRequest() + new protos.google.logging.v2.DeleteSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteSink = stubSimpleCall(expectedResponse); const [response] = await client.deleteSink(request); @@ -1927,16 +1927,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteSinkRequest() + new protos.google.logging.v2.DeleteSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteSink = stubSimpleCallWithCallback(expectedResponse); @@ -1945,14 +1945,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.protobuf.IEmpty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -1974,18 +1974,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteSinkRequest() + new protos.google.logging.v2.DeleteSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedHeaderRequestParams = `sink_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteSink = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.deleteSink(request), expectedError); const actualRequest = ( @@ -2005,11 +2005,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteSinkRequest() + new protos.google.logging.v2.DeleteSinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteSinkRequest', - ['sinkName'] + ['sinkName'], ); request.sinkName = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -2026,22 +2026,22 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetLinkRequest() + new protos.google.logging.v2.GetLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetLinkRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.Link() + new protos.google.logging.v2.Link(), ); client.innerApiCalls.getLink = stubSimpleCall(expectedResponse); const [response] = await client.getLink(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = (client.innerApiCalls.getLink as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -2057,16 +2057,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetLinkRequest() + new protos.google.logging.v2.GetLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetLinkRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.Link() + new protos.google.logging.v2.Link(), ); client.innerApiCalls.getLink = stubSimpleCallWithCallback(expectedResponse); @@ -2075,20 +2075,20 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILink | null + result?: protos.google.logging.v2.ILink | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = (client.innerApiCalls.getLink as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -2104,11 +2104,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetLinkRequest() + new protos.google.logging.v2.GetLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetLinkRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; @@ -2116,7 +2116,7 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.getLink = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getLink(request), expectedError); const actualRequest = (client.innerApiCalls.getLink as SinonStub).getCall( - 0 + 0, ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( @@ -2132,11 +2132,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetLinkRequest() + new protos.google.logging.v2.GetLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetLinkRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -2153,16 +2153,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetExclusionRequest() + new protos.google.logging.v2.GetExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogExclusion(), ); client.innerApiCalls.getExclusion = stubSimpleCall(expectedResponse); const [response] = await client.getExclusion(request); @@ -2184,16 +2184,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetExclusionRequest() + new protos.google.logging.v2.GetExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogExclusion(), ); client.innerApiCalls.getExclusion = stubSimpleCallWithCallback(expectedResponse); @@ -2202,14 +2202,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogExclusion | null + result?: protos.google.logging.v2.ILogExclusion | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -2231,18 +2231,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetExclusionRequest() + new protos.google.logging.v2.GetExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getExclusion = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.getExclusion(request), expectedError); const actualRequest = ( @@ -2262,11 +2262,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetExclusionRequest() + new protos.google.logging.v2.GetExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -2283,16 +2283,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateExclusionRequest() + new protos.google.logging.v2.CreateExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateExclusionRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogExclusion(), ); client.innerApiCalls.createExclusion = stubSimpleCall(expectedResponse); const [response] = await client.createExclusion(request); @@ -2314,16 +2314,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateExclusionRequest() + new protos.google.logging.v2.CreateExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateExclusionRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogExclusion(), ); client.innerApiCalls.createExclusion = stubSimpleCallWithCallback(expectedResponse); @@ -2332,14 +2332,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogExclusion | null + result?: protos.google.logging.v2.ILogExclusion | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -2361,18 +2361,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateExclusionRequest() + new protos.google.logging.v2.CreateExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateExclusionRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createExclusion = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.createExclusion(request), expectedError); const actualRequest = ( @@ -2392,11 +2392,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateExclusionRequest() + new protos.google.logging.v2.CreateExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateExclusionRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -2413,16 +2413,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateExclusionRequest() + new protos.google.logging.v2.UpdateExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogExclusion(), ); client.innerApiCalls.updateExclusion = stubSimpleCall(expectedResponse); const [response] = await client.updateExclusion(request); @@ -2444,16 +2444,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateExclusionRequest() + new protos.google.logging.v2.UpdateExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogExclusion() + new protos.google.logging.v2.LogExclusion(), ); client.innerApiCalls.updateExclusion = stubSimpleCallWithCallback(expectedResponse); @@ -2462,14 +2462,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogExclusion | null + result?: protos.google.logging.v2.ILogExclusion | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -2491,18 +2491,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateExclusionRequest() + new protos.google.logging.v2.UpdateExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateExclusion = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.updateExclusion(request), expectedError); const actualRequest = ( @@ -2522,11 +2522,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateExclusionRequest() + new protos.google.logging.v2.UpdateExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -2543,16 +2543,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteExclusionRequest() + new protos.google.logging.v2.DeleteExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteExclusion = stubSimpleCall(expectedResponse); const [response] = await client.deleteExclusion(request); @@ -2574,16 +2574,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteExclusionRequest() + new protos.google.logging.v2.DeleteExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteExclusion = stubSimpleCallWithCallback(expectedResponse); @@ -2592,14 +2592,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.protobuf.IEmpty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -2621,18 +2621,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteExclusionRequest() + new protos.google.logging.v2.DeleteExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteExclusion = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.deleteExclusion(request), expectedError); const actualRequest = ( @@ -2652,11 +2652,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteExclusionRequest() + new protos.google.logging.v2.DeleteExclusionRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteExclusionRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -2673,16 +2673,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.GetCmekSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetCmekSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.CmekSettings(), ); client.innerApiCalls.getCmekSettings = stubSimpleCall(expectedResponse); const [response] = await client.getCmekSettings(request); @@ -2704,16 +2704,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.GetCmekSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetCmekSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.CmekSettings(), ); client.innerApiCalls.getCmekSettings = stubSimpleCallWithCallback(expectedResponse); @@ -2722,14 +2722,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ICmekSettings | null + result?: protos.google.logging.v2.ICmekSettings | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -2751,18 +2751,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.GetCmekSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetCmekSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCmekSettings = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.getCmekSettings(request), expectedError); const actualRequest = ( @@ -2782,11 +2782,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetCmekSettingsRequest() + new protos.google.logging.v2.GetCmekSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetCmekSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -2803,16 +2803,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.UpdateCmekSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateCmekSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.CmekSettings(), ); client.innerApiCalls.updateCmekSettings = stubSimpleCall(expectedResponse); @@ -2835,16 +2835,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.UpdateCmekSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateCmekSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.CmekSettings() + new protos.google.logging.v2.CmekSettings(), ); client.innerApiCalls.updateCmekSettings = stubSimpleCallWithCallback(expectedResponse); @@ -2853,14 +2853,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ICmekSettings | null + result?: protos.google.logging.v2.ICmekSettings | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -2882,18 +2882,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.UpdateCmekSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateCmekSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCmekSettings = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.updateCmekSettings(request), expectedError); const actualRequest = ( @@ -2913,11 +2913,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateCmekSettingsRequest() + new protos.google.logging.v2.UpdateCmekSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateCmekSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -2934,16 +2934,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSettingsRequest() + new protos.google.logging.v2.GetSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.Settings() + new protos.google.logging.v2.Settings(), ); client.innerApiCalls.getSettings = stubSimpleCall(expectedResponse); const [response] = await client.getSettings(request); @@ -2965,16 +2965,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSettingsRequest() + new protos.google.logging.v2.GetSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.Settings() + new protos.google.logging.v2.Settings(), ); client.innerApiCalls.getSettings = stubSimpleCallWithCallback(expectedResponse); @@ -2983,14 +2983,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ISettings | null + result?: protos.google.logging.v2.ISettings | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -3012,18 +3012,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSettingsRequest() + new protos.google.logging.v2.GetSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getSettings = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.getSettings(request), expectedError); const actualRequest = ( @@ -3043,11 +3043,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetSettingsRequest() + new protos.google.logging.v2.GetSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -3064,16 +3064,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSettingsRequest() + new protos.google.logging.v2.UpdateSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.Settings() + new protos.google.logging.v2.Settings(), ); client.innerApiCalls.updateSettings = stubSimpleCall(expectedResponse); const [response] = await client.updateSettings(request); @@ -3095,16 +3095,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSettingsRequest() + new protos.google.logging.v2.UpdateSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.Settings() + new protos.google.logging.v2.Settings(), ); client.innerApiCalls.updateSettings = stubSimpleCallWithCallback(expectedResponse); @@ -3113,14 +3113,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ISettings | null + result?: protos.google.logging.v2.ISettings | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -3142,18 +3142,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSettingsRequest() + new protos.google.logging.v2.UpdateSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateSettings = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.updateSettings(request), expectedError); const actualRequest = ( @@ -3173,11 +3173,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateSettingsRequest() + new protos.google.logging.v2.UpdateSettingsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateSettingsRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -3194,16 +3194,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateBucketRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.createBucketAsync = stubLongRunningCall(expectedResponse); @@ -3227,16 +3227,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateBucketRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.createBucketAsync = stubLongRunningCallWithCallback(expectedResponse); @@ -3248,14 +3248,14 @@ describe('v2.ConfigServiceV2Client', () => { result?: LROperation< protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IBucketMetadata - > | null + > | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const operation = (await promise) as LROperation< @@ -3281,18 +3281,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateBucketRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createBucketAsync = stubLongRunningCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.createBucketAsync(request), expectedError); const actualRequest = ( @@ -3312,11 +3312,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateBucketRequest() + new protos.google.logging.v2.CreateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateBucketRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -3324,7 +3324,7 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.createBucketAsync = stubLongRunningCall( undefined, undefined, - expectedError + expectedError, ); const [operation] = await client.createBucketAsync(request); await assert.rejects(operation.promise(), expectedError); @@ -3345,7 +3345,7 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new operationsProtos.google.longrunning.Operation(), ); expectedResponse.name = 'test'; expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; @@ -3353,7 +3353,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall(expectedResponse); const decodedOperation = await client.checkCreateBucketAsyncProgress( - expectedResponse.name + expectedResponse.name, ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); @@ -3370,11 +3370,11 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects( client.checkCreateBucketAsyncProgress(''), - expectedError + expectedError, ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); @@ -3388,16 +3388,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.UpdateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.updateBucketAsync = stubLongRunningCall(expectedResponse); @@ -3421,16 +3421,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.UpdateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.updateBucketAsync = stubLongRunningCallWithCallback(expectedResponse); @@ -3442,14 +3442,14 @@ describe('v2.ConfigServiceV2Client', () => { result?: LROperation< protos.google.logging.v2.ILogBucket, protos.google.logging.v2.IBucketMetadata - > | null + > | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const operation = (await promise) as LROperation< @@ -3475,18 +3475,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.UpdateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateBucketAsync = stubLongRunningCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.updateBucketAsync(request), expectedError); const actualRequest = ( @@ -3506,11 +3506,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateBucketRequest() + new protos.google.logging.v2.UpdateBucketRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateBucketRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; @@ -3518,7 +3518,7 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.updateBucketAsync = stubLongRunningCall( undefined, undefined, - expectedError + expectedError, ); const [operation] = await client.updateBucketAsync(request); await assert.rejects(operation.promise(), expectedError); @@ -3539,7 +3539,7 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new operationsProtos.google.longrunning.Operation(), ); expectedResponse.name = 'test'; expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; @@ -3547,7 +3547,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall(expectedResponse); const decodedOperation = await client.checkUpdateBucketAsyncProgress( - expectedResponse.name + expectedResponse.name, ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); @@ -3564,11 +3564,11 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects( client.checkUpdateBucketAsyncProgress(''), - expectedError + expectedError, ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); @@ -3582,16 +3582,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateLinkRequest() + new protos.google.logging.v2.CreateLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateLinkRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.createLink = stubLongRunningCall(expectedResponse); const [operation] = await client.createLink(request); @@ -3614,16 +3614,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateLinkRequest() + new protos.google.logging.v2.CreateLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateLinkRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.createLink = stubLongRunningCallWithCallback(expectedResponse); @@ -3635,14 +3635,14 @@ describe('v2.ConfigServiceV2Client', () => { result?: LROperation< protos.google.logging.v2.ILink, protos.google.logging.v2.ILinkMetadata - > | null + > | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const operation = (await promise) as LROperation< @@ -3668,18 +3668,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateLinkRequest() + new protos.google.logging.v2.CreateLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateLinkRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createLink = stubLongRunningCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.createLink(request), expectedError); const actualRequest = ( @@ -3699,11 +3699,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateLinkRequest() + new protos.google.logging.v2.CreateLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateLinkRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -3711,7 +3711,7 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.createLink = stubLongRunningCall( undefined, undefined, - expectedError + expectedError, ); const [operation] = await client.createLink(request); await assert.rejects(operation.promise(), expectedError); @@ -3732,7 +3732,7 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new operationsProtos.google.longrunning.Operation(), ); expectedResponse.name = 'test'; expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; @@ -3740,7 +3740,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall(expectedResponse); const decodedOperation = await client.checkCreateLinkProgress( - expectedResponse.name + expectedResponse.name, ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); @@ -3757,7 +3757,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.checkCreateLinkProgress(''), expectedError); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); @@ -3772,16 +3772,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLinkRequest() + new protos.google.logging.v2.DeleteLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLinkRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.deleteLink = stubLongRunningCall(expectedResponse); const [operation] = await client.deleteLink(request); @@ -3804,16 +3804,16 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLinkRequest() + new protos.google.logging.v2.DeleteLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLinkRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.deleteLink = stubLongRunningCallWithCallback(expectedResponse); @@ -3825,14 +3825,14 @@ describe('v2.ConfigServiceV2Client', () => { result?: LROperation< protos.google.protobuf.IEmpty, protos.google.logging.v2.ILinkMetadata - > | null + > | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const operation = (await promise) as LROperation< @@ -3858,18 +3858,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLinkRequest() + new protos.google.logging.v2.DeleteLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLinkRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteLink = stubLongRunningCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.deleteLink(request), expectedError); const actualRequest = ( @@ -3889,11 +3889,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLinkRequest() + new protos.google.logging.v2.DeleteLinkRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLinkRequest', - ['name'] + ['name'], ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; @@ -3901,7 +3901,7 @@ describe('v2.ConfigServiceV2Client', () => { client.innerApiCalls.deleteLink = stubLongRunningCall( undefined, undefined, - expectedError + expectedError, ); const [operation] = await client.deleteLink(request); await assert.rejects(operation.promise(), expectedError); @@ -3922,7 +3922,7 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new operationsProtos.google.longrunning.Operation(), ); expectedResponse.name = 'test'; expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; @@ -3930,7 +3930,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall(expectedResponse); const decodedOperation = await client.checkDeleteLinkProgress( - expectedResponse.name + expectedResponse.name, ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); @@ -3947,7 +3947,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.checkDeleteLinkProgress(''), expectedError); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); @@ -3962,10 +3962,10 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CopyLogEntriesRequest() + new protos.google.logging.v2.CopyLogEntriesRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.copyLogEntries = stubLongRunningCall(expectedResponse); @@ -3981,10 +3981,10 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CopyLogEntriesRequest() + new protos.google.logging.v2.CopyLogEntriesRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.longrunning.Operation(), ); client.innerApiCalls.copyLogEntries = stubLongRunningCallWithCallback(expectedResponse); @@ -3996,14 +3996,14 @@ describe('v2.ConfigServiceV2Client', () => { result?: LROperation< protos.google.logging.v2.ICopyLogEntriesResponse, protos.google.logging.v2.ICopyLogEntriesMetadata - > | null + > | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const operation = (await promise) as LROperation< @@ -4021,12 +4021,12 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CopyLogEntriesRequest() + new protos.google.logging.v2.CopyLogEntriesRequest(), ); const expectedError = new Error('expected'); client.innerApiCalls.copyLogEntries = stubLongRunningCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.copyLogEntries(request), expectedError); }); @@ -4038,13 +4038,13 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CopyLogEntriesRequest() + new protos.google.logging.v2.CopyLogEntriesRequest(), ); const expectedError = new Error('expected'); client.innerApiCalls.copyLogEntries = stubLongRunningCall( undefined, undefined, - expectedError + expectedError, ); const [operation] = await client.copyLogEntries(request); await assert.rejects(operation.promise(), expectedError); @@ -4057,7 +4057,7 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new operationsProtos.google.longrunning.Operation(), ); expectedResponse.name = 'test'; expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; @@ -4065,7 +4065,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall(expectedResponse); const decodedOperation = await client.checkCopyLogEntriesProgress( - expectedResponse.name + expectedResponse.name, ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); @@ -4082,11 +4082,11 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.getOperation = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects( client.checkCopyLogEntriesProgress(''), - expectedError + expectedError, ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); @@ -4100,11 +4100,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListBucketsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListBucketsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4133,11 +4133,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListBucketsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListBucketsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4153,14 +4153,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogBucket[] | null + result?: protos.google.logging.v2.ILogBucket[] | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -4182,18 +4182,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListBucketsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListBucketsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listBuckets = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.listBuckets(request), expectedError); const actualRequest = ( @@ -4213,11 +4213,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListBucketsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListBucketsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4246,14 +4246,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listBuckets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuckets, request) + .calledWith(client.innerApiCalls.listBuckets, request), ); assert( (client.descriptors.page.listBuckets.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4264,18 +4264,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListBucketsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListBucketsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listBuckets.createStream = stubPageStreamingCall( undefined, - expectedError + expectedError, ); const stream = client.listBucketsStream(request); const promise = new Promise((resolve, reject) => { @@ -4294,14 +4294,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listBuckets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuckets, request) + .calledWith(client.innerApiCalls.listBuckets, request), ); assert( (client.descriptors.page.listBuckets.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4312,11 +4312,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListBucketsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListBucketsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4335,16 +4335,16 @@ describe('v2.ConfigServiceV2Client', () => { assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 + 0, ).args[1], - request + request, ); assert( (client.descriptors.page.listBuckets.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4355,18 +4355,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListBucketsRequest() + new protos.google.logging.v2.ListBucketsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListBucketsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listBuckets.asyncIterate = stubAsyncIterationCall( undefined, - expectedError + expectedError, ); const iterable = client.listBucketsAsync(request); await assert.rejects(async () => { @@ -4377,16 +4377,16 @@ describe('v2.ConfigServiceV2Client', () => { }); assert.deepStrictEqual( (client.descriptors.page.listBuckets.asyncIterate as SinonStub).getCall( - 0 + 0, ).args[1], - request + request, ); assert( (client.descriptors.page.listBuckets.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); }); @@ -4399,11 +4399,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListViewsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListViewsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4432,11 +4432,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListViewsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListViewsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4452,14 +4452,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogView[] | null + result?: protos.google.logging.v2.ILogView[] | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -4481,11 +4481,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListViewsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListViewsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4509,11 +4509,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListViewsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListViewsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4542,14 +4542,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listViews.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listViews, request) + .calledWith(client.innerApiCalls.listViews, request), ); assert( (client.descriptors.page.listViews.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4560,18 +4560,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListViewsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListViewsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listViews.createStream = stubPageStreamingCall( undefined, - expectedError + expectedError, ); const stream = client.listViewsStream(request); const promise = new Promise((resolve, reject) => { @@ -4590,14 +4590,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listViews.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listViews, request) + .calledWith(client.innerApiCalls.listViews, request), ); assert( (client.descriptors.page.listViews.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4608,11 +4608,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListViewsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListViewsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4632,14 +4632,14 @@ describe('v2.ConfigServiceV2Client', () => { assert.deepStrictEqual( (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) .args[1], - request + request, ); assert( (client.descriptors.page.listViews.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4650,18 +4650,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListViewsRequest() + new protos.google.logging.v2.ListViewsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListViewsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( undefined, - expectedError + expectedError, ); const iterable = client.listViewsAsync(request); await assert.rejects(async () => { @@ -4673,14 +4673,14 @@ describe('v2.ConfigServiceV2Client', () => { assert.deepStrictEqual( (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) .args[1], - request + request, ); assert( (client.descriptors.page.listViews.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); }); @@ -4693,11 +4693,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListSinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListSinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4726,11 +4726,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListSinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListSinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4746,14 +4746,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogSink[] | null + result?: protos.google.logging.v2.ILogSink[] | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -4775,11 +4775,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListSinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListSinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4803,11 +4803,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListSinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListSinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4836,14 +4836,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSinks, request) + .calledWith(client.innerApiCalls.listSinks, request), ); assert( (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4854,18 +4854,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListSinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListSinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listSinks.createStream = stubPageStreamingCall( undefined, - expectedError + expectedError, ); const stream = client.listSinksStream(request); const promise = new Promise((resolve, reject) => { @@ -4884,14 +4884,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSinks, request) + .calledWith(client.innerApiCalls.listSinks, request), ); assert( (client.descriptors.page.listSinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4902,11 +4902,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListSinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListSinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -4926,14 +4926,14 @@ describe('v2.ConfigServiceV2Client', () => { assert.deepStrictEqual( (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) .args[1], - request + request, ); assert( (client.descriptors.page.listSinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -4944,18 +4944,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListSinksRequest() + new protos.google.logging.v2.ListSinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListSinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listSinks.asyncIterate = stubAsyncIterationCall( undefined, - expectedError + expectedError, ); const iterable = client.listSinksAsync(request); await assert.rejects(async () => { @@ -4967,14 +4967,14 @@ describe('v2.ConfigServiceV2Client', () => { assert.deepStrictEqual( (client.descriptors.page.listSinks.asyncIterate as SinonStub).getCall(0) .args[1], - request + request, ); assert( (client.descriptors.page.listSinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); }); @@ -4987,11 +4987,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLinksRequest() + new protos.google.logging.v2.ListLinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5020,11 +5020,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLinksRequest() + new protos.google.logging.v2.ListLinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5040,14 +5040,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILink[] | null + result?: protos.google.logging.v2.ILink[] | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -5069,11 +5069,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLinksRequest() + new protos.google.logging.v2.ListLinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5097,11 +5097,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLinksRequest() + new protos.google.logging.v2.ListLinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5130,14 +5130,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLinks, request) + .calledWith(client.innerApiCalls.listLinks, request), ); assert( (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -5148,18 +5148,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLinksRequest() + new protos.google.logging.v2.ListLinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLinks.createStream = stubPageStreamingCall( undefined, - expectedError + expectedError, ); const stream = client.listLinksStream(request); const promise = new Promise((resolve, reject) => { @@ -5178,14 +5178,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLinks, request) + .calledWith(client.innerApiCalls.listLinks, request), ); assert( (client.descriptors.page.listLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -5196,11 +5196,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLinksRequest() + new protos.google.logging.v2.ListLinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5220,14 +5220,14 @@ describe('v2.ConfigServiceV2Client', () => { assert.deepStrictEqual( (client.descriptors.page.listLinks.asyncIterate as SinonStub).getCall(0) .args[1], - request + request, ); assert( (client.descriptors.page.listLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -5238,18 +5238,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLinksRequest() + new protos.google.logging.v2.ListLinksRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLinksRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLinks.asyncIterate = stubAsyncIterationCall( undefined, - expectedError + expectedError, ); const iterable = client.listLinksAsync(request); await assert.rejects(async () => { @@ -5261,14 +5261,14 @@ describe('v2.ConfigServiceV2Client', () => { assert.deepStrictEqual( (client.descriptors.page.listLinks.asyncIterate as SinonStub).getCall(0) .args[1], - request + request, ); assert( (client.descriptors.page.listLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); }); @@ -5281,11 +5281,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new protos.google.logging.v2.ListExclusionsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListExclusionsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5314,11 +5314,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new protos.google.logging.v2.ListExclusionsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListExclusionsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5334,14 +5334,14 @@ describe('v2.ConfigServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogExclusion[] | null + result?: protos.google.logging.v2.ILogExclusion[] | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -5363,18 +5363,18 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new protos.google.logging.v2.ListExclusionsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListExclusionsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listExclusions = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.listExclusions(request), expectedError); const actualRequest = ( @@ -5394,11 +5394,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new protos.google.logging.v2.ListExclusionsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListExclusionsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5427,14 +5427,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listExclusions, request) + .calledWith(client.innerApiCalls.listExclusions, request), ); assert( (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -5445,11 +5445,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new protos.google.logging.v2.ListExclusionsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListExclusionsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5473,14 +5473,14 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listExclusions, request) + .calledWith(client.innerApiCalls.listExclusions, request), ); assert( (client.descriptors.page.listExclusions.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -5491,11 +5491,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new protos.google.logging.v2.ListExclusionsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListExclusionsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5516,14 +5516,14 @@ describe('v2.ConfigServiceV2Client', () => { ( client.descriptors.page.listExclusions.asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); assert( (client.descriptors.page.listExclusions.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -5534,11 +5534,11 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListExclusionsRequest() + new protos.google.logging.v2.ListExclusionsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListExclusionsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -5556,14 +5556,14 @@ describe('v2.ConfigServiceV2Client', () => { ( client.descriptors.page.listExclusions.asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); assert( (client.descriptors.page.listExclusions.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); }); @@ -5575,10 +5575,10 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() + new operationsProtos.google.longrunning.GetOperationRequest(), ); const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new operationsProtos.google.longrunning.Operation(), ); client.operationsClient.getOperation = stubSimpleCall(expectedResponse); const response = await client.getOperation(request); @@ -5586,7 +5586,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.operationsClient.getOperation as SinonStub) .getCall(0) - .calledWith(request) + .calledWith(request), ); }); it('invokes getOperation without error using callback', async () => { @@ -5595,10 +5595,10 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() + new operationsProtos.google.longrunning.GetOperationRequest(), ); const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new operationsProtos.google.longrunning.Operation(), ); client.operationsClient.getOperation = sinon .stub() @@ -5609,14 +5609,14 @@ describe('v2.ConfigServiceV2Client', () => { undefined, ( err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null + result?: operationsProtos.google.longrunning.Operation | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -5629,12 +5629,12 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() + new operationsProtos.google.longrunning.GetOperationRequest(), ); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(async () => { await client.getOperation(request); @@ -5642,7 +5642,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.operationsClient.getOperation as SinonStub) .getCall(0) - .calledWith(request) + .calledWith(request), ); }); }); @@ -5654,10 +5654,10 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() + new operationsProtos.google.longrunning.CancelOperationRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); @@ -5666,7 +5666,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.operationsClient.cancelOperation as SinonStub) .getCall(0) - .calledWith(request) + .calledWith(request), ); }); it('invokes cancelOperation without error using callback', async () => { @@ -5675,10 +5675,10 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() + new operationsProtos.google.longrunning.CancelOperationRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.operationsClient.cancelOperation = sinon .stub() @@ -5689,14 +5689,14 @@ describe('v2.ConfigServiceV2Client', () => { undefined, ( err?: Error | null, - result?: protos.google.protobuf.Empty | null + result?: protos.google.protobuf.Empty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -5709,12 +5709,12 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() + new operationsProtos.google.longrunning.CancelOperationRequest(), ); const expectedError = new Error('expected'); client.operationsClient.cancelOperation = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(async () => { await client.cancelOperation(request); @@ -5722,7 +5722,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.operationsClient.cancelOperation as SinonStub) .getCall(0) - .calledWith(request) + .calledWith(request), ); }); }); @@ -5734,10 +5734,10 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() + new operationsProtos.google.longrunning.DeleteOperationRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); @@ -5746,7 +5746,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.operationsClient.deleteOperation as SinonStub) .getCall(0) - .calledWith(request) + .calledWith(request), ); }); it('invokes deleteOperation without error using callback', async () => { @@ -5755,10 +5755,10 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() + new operationsProtos.google.longrunning.DeleteOperationRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.operationsClient.deleteOperation = sinon .stub() @@ -5769,14 +5769,14 @@ describe('v2.ConfigServiceV2Client', () => { undefined, ( err?: Error | null, - result?: protos.google.protobuf.Empty | null + result?: protos.google.protobuf.Empty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -5789,12 +5789,12 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() + new operationsProtos.google.longrunning.DeleteOperationRequest(), ); const expectedError = new Error('expected'); client.operationsClient.deleteOperation = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(async () => { await client.deleteOperation(request); @@ -5802,7 +5802,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.operationsClient.deleteOperation as SinonStub) .getCall(0) - .calledWith(request) + .calledWith(request), ); }); }); @@ -5813,17 +5813,17 @@ describe('v2.ConfigServiceV2Client', () => { projectId: 'bogus', }); const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() + new operationsProtos.google.longrunning.ListOperationsRequest(), ); const expectedResponse = [ generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() + new operationsProtos.google.longrunning.ListOperationsResponse(), ), generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() + new operationsProtos.google.longrunning.ListOperationsResponse(), ), generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() + new operationsProtos.google.longrunning.ListOperationsResponse(), ), ]; client.operationsClient.descriptor.listOperations.asyncIterate = @@ -5840,7 +5840,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.descriptor.listOperations .asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); }); it('uses async iteration with listOperations with error', async () => { @@ -5850,7 +5850,7 @@ describe('v2.ConfigServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() + new operationsProtos.google.longrunning.ListOperationsRequest(), ); const expectedError = new Error('expected'); client.operationsClient.descriptor.listOperations.asyncIterate = @@ -5868,7 +5868,7 @@ describe('v2.ConfigServiceV2Client', () => { client.operationsClient.descriptor.listOperations .asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); }); }); @@ -5893,7 +5893,7 @@ describe('v2.ConfigServiceV2Client', () => { it('billingAccountCmekSettingsPath', () => { const result = client.billingAccountCmekSettingsPath( - 'billingAccountValue' + 'billingAccountValue', ); assert.strictEqual(result, fakePath); assert( @@ -5902,14 +5902,14 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -5918,7 +5918,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -5944,7 +5944,7 @@ describe('v2.ConfigServiceV2Client', () => { it('billingAccountExclusionPath', () => { const result = client.billingAccountExclusionPath( 'billingAccountValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -5953,7 +5953,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -5967,7 +5967,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -5981,7 +5981,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6007,7 +6007,7 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.billingAccountLocationBucketPath( 'billingAccountValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -6016,14 +6016,14 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -6032,7 +6032,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6046,7 +6046,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6060,7 +6060,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6088,7 +6088,7 @@ describe('v2.ConfigServiceV2Client', () => { 'billingAccountValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -6097,14 +6097,14 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketLinkName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -6113,14 +6113,14 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); it('matchLocationFromBillingAccountLocationBucketLinkName', () => { const result = client.matchLocationFromBillingAccountLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'locationValue'); assert( @@ -6129,7 +6129,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6143,7 +6143,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6157,7 +6157,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6185,7 +6185,7 @@ describe('v2.ConfigServiceV2Client', () => { 'billingAccountValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -6194,14 +6194,14 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -6210,14 +6210,14 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); it('matchLocationFromBillingAccountLocationBucketViewName', () => { const result = client.matchLocationFromBillingAccountLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'locationValue'); assert( @@ -6226,7 +6226,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6240,7 +6240,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6254,7 +6254,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6280,7 +6280,7 @@ describe('v2.ConfigServiceV2Client', () => { it('billingAccountLogPath', () => { const result = client.billingAccountLogPath( 'billingAccountValue', - 'logValue' + 'logValue', ); assert.strictEqual(result, fakePath); assert( @@ -6289,7 +6289,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6303,7 +6303,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6316,7 +6316,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6347,7 +6347,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6361,7 +6361,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6387,7 +6387,7 @@ describe('v2.ConfigServiceV2Client', () => { it('billingAccountSinkPath', () => { const result = client.billingAccountSinkPath( 'billingAccountValue', - 'sinkValue' + 'sinkValue', ); assert.strictEqual(result, fakePath); assert( @@ -6396,7 +6396,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6410,7 +6410,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6423,7 +6423,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6454,7 +6454,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6467,7 +6467,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6493,13 +6493,13 @@ describe('v2.ConfigServiceV2Client', () => { it('folderExclusionPath', () => { const result = client.folderExclusionPath( 'folderValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( (client.pathTemplates.folderExclusionPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6509,7 +6509,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6519,7 +6519,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6547,7 +6547,7 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.folderLocationBucketPath( 'folderValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -6556,7 +6556,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6569,7 +6569,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6583,7 +6583,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6596,7 +6596,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6626,7 +6626,7 @@ describe('v2.ConfigServiceV2Client', () => { 'folderValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -6635,7 +6635,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6649,7 +6649,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6663,7 +6663,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6677,7 +6677,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6691,7 +6691,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6721,7 +6721,7 @@ describe('v2.ConfigServiceV2Client', () => { 'folderValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -6730,7 +6730,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6744,7 +6744,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6758,7 +6758,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6772,7 +6772,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6786,7 +6786,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6815,7 +6815,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6825,7 +6825,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6835,7 +6835,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6863,7 +6863,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderSettingsPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6873,7 +6873,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderSettingsPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6902,7 +6902,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6912,7 +6912,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6922,7 +6922,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -6951,7 +6951,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.locationPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -6961,7 +6961,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.locationPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -6971,7 +6971,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.locationPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7000,7 +7000,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7010,7 +7010,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7020,7 +7020,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7051,7 +7051,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7065,7 +7065,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7091,7 +7091,7 @@ describe('v2.ConfigServiceV2Client', () => { it('organizationExclusionPath', () => { const result = client.organizationExclusionPath( 'organizationValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -7100,7 +7100,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7114,7 +7114,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7128,7 +7128,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7156,7 +7156,7 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.organizationLocationBucketPath( 'organizationValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -7165,7 +7165,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7179,7 +7179,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7193,7 +7193,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7207,7 +7207,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7235,7 +7235,7 @@ describe('v2.ConfigServiceV2Client', () => { 'organizationValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -7244,14 +7244,14 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchOrganizationFromOrganizationLocationBucketLinkName', () => { const result = client.matchOrganizationFromOrganizationLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'organizationValue'); assert( @@ -7260,7 +7260,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7274,7 +7274,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7288,7 +7288,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7302,7 +7302,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7330,7 +7330,7 @@ describe('v2.ConfigServiceV2Client', () => { 'organizationValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -7339,14 +7339,14 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchOrganizationFromOrganizationLocationBucketViewName', () => { const result = client.matchOrganizationFromOrganizationLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'organizationValue'); assert( @@ -7355,7 +7355,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7369,7 +7369,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7383,7 +7383,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7397,7 +7397,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7423,13 +7423,13 @@ describe('v2.ConfigServiceV2Client', () => { it('organizationLogPath', () => { const result = client.organizationLogPath( 'organizationValue', - 'logValue' + 'logValue', ); assert.strictEqual(result, fakePath); assert( (client.pathTemplates.organizationLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7440,7 +7440,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7450,7 +7450,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7481,7 +7481,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7495,7 +7495,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7521,7 +7521,7 @@ describe('v2.ConfigServiceV2Client', () => { it('organizationSinkPath', () => { const result = client.organizationSinkPath( 'organizationValue', - 'sinkValue' + 'sinkValue', ); assert.strictEqual(result, fakePath); assert( @@ -7530,7 +7530,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7541,7 +7541,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7551,7 +7551,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7579,7 +7579,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7589,7 +7589,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7620,7 +7620,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7633,7 +7633,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7659,7 +7659,7 @@ describe('v2.ConfigServiceV2Client', () => { it('projectExclusionPath', () => { const result = client.projectExclusionPath( 'projectValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -7668,7 +7668,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7678,7 +7678,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7688,7 +7688,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7716,7 +7716,7 @@ describe('v2.ConfigServiceV2Client', () => { const result = client.projectLocationBucketPath( 'projectValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -7725,7 +7725,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7739,7 +7739,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7753,7 +7753,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7767,7 +7767,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7797,7 +7797,7 @@ describe('v2.ConfigServiceV2Client', () => { 'projectValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -7806,7 +7806,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7820,7 +7820,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7834,7 +7834,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7848,7 +7848,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7862,7 +7862,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7892,7 +7892,7 @@ describe('v2.ConfigServiceV2Client', () => { 'projectValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -7901,7 +7901,7 @@ describe('v2.ConfigServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7915,7 +7915,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7929,7 +7929,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7943,7 +7943,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -7957,7 +7957,7 @@ describe('v2.ConfigServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -7986,7 +7986,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -7996,7 +7996,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -8006,7 +8006,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -8034,7 +8034,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectSettingsPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -8044,7 +8044,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectSettingsPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -8073,7 +8073,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -8083,7 +8083,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -8093,7 +8093,7 @@ describe('v2.ConfigServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); diff --git a/handwritten/logging/test/gapic_logging_service_v2_v2.ts b/handwritten/logging/test/gapic_logging_service_v2_v2.ts index 7a5583ec916..fd926082626 100644 --- a/handwritten/logging/test/gapic_logging_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_logging_service_v2_v2.ts @@ -30,7 +30,7 @@ import {protobuf} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects const root = protobuf.Root.fromJSON( - require('../protos/protos.json') + require('../protos/protos.json'), ).resolveAll(); // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -47,7 +47,7 @@ function generateSampleMessage(instance: T) { instance.constructor as typeof protobuf.Message ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject + filledObject, ) as T; } @@ -59,7 +59,7 @@ function stubSimpleCall(response?: ResponseType, error?: Error) { function stubSimpleCallWithCallback( response?: ResponseType, - error?: Error + error?: Error, ) { return error ? sinon.stub().callsArgWith(2, error) @@ -68,7 +68,7 @@ function stubSimpleCallWithCallback( function stubBidiStreamingCall( response?: ResponseType, - error?: Error + error?: Error, ) { const transformStub = error ? sinon.stub().callsArgWith(2, error) @@ -82,7 +82,7 @@ function stubBidiStreamingCall( function stubPageStreamingCall( responses?: ResponseType[], - error?: Error + error?: Error, ) { const pagingStub = sinon.stub(); if (responses) { @@ -120,7 +120,7 @@ function stubPageStreamingCall( function stubAsyncIterationCall( responses?: ResponseType[], - error?: Error + error?: Error, ) { let counter = 0; const asyncIterable = { @@ -327,16 +327,16 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLogRequest() + new protos.google.logging.v2.DeleteLogRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLogRequest', - ['logName'] + ['logName'], ); request.logName = defaultValue1; const expectedHeaderRequestParams = `log_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteLog = stubSimpleCall(expectedResponse); const [response] = await client.deleteLog(request); @@ -358,16 +358,16 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLogRequest() + new protos.google.logging.v2.DeleteLogRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLogRequest', - ['logName'] + ['logName'], ); request.logName = defaultValue1; const expectedHeaderRequestParams = `log_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteLog = stubSimpleCallWithCallback(expectedResponse); @@ -376,14 +376,14 @@ describe('v2.LoggingServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.protobuf.IEmpty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -405,11 +405,11 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLogRequest() + new protos.google.logging.v2.DeleteLogRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLogRequest', - ['logName'] + ['logName'], ); request.logName = defaultValue1; const expectedHeaderRequestParams = `log_name=${defaultValue1}`; @@ -433,11 +433,11 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLogRequest() + new protos.google.logging.v2.DeleteLogRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLogRequest', - ['logName'] + ['logName'], ); request.logName = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -454,10 +454,10 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.WriteLogEntriesRequest() + new protos.google.logging.v2.WriteLogEntriesRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.WriteLogEntriesResponse() + new protos.google.logging.v2.WriteLogEntriesResponse(), ); client.innerApiCalls.writeLogEntries = stubSimpleCall(expectedResponse); const [response] = await client.writeLogEntries(request); @@ -471,10 +471,10 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.WriteLogEntriesRequest() + new protos.google.logging.v2.WriteLogEntriesRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.WriteLogEntriesResponse() + new protos.google.logging.v2.WriteLogEntriesResponse(), ); client.innerApiCalls.writeLogEntries = stubSimpleCallWithCallback(expectedResponse); @@ -483,14 +483,14 @@ describe('v2.LoggingServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.IWriteLogEntriesResponse | null + result?: protos.google.logging.v2.IWriteLogEntriesResponse | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -504,12 +504,12 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.WriteLogEntriesRequest() + new protos.google.logging.v2.WriteLogEntriesRequest(), ); const expectedError = new Error('expected'); client.innerApiCalls.writeLogEntries = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.writeLogEntries(request), expectedError); }); @@ -521,7 +521,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.WriteLogEntriesRequest() + new protos.google.logging.v2.WriteLogEntriesRequest(), ); const expectedError = new Error('The client has already been closed.'); client.close(); @@ -537,11 +537,11 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.TailLogEntriesRequest() + new protos.google.logging.v2.TailLogEntriesRequest(), ); const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.TailLogEntriesResponse() + new protos.google.logging.v2.TailLogEntriesResponse(), ); client.innerApiCalls.tailLogEntries = stubBidiStreamingCall(expectedResponse); @@ -551,7 +551,7 @@ describe('v2.LoggingServiceV2Client', () => { 'data', (response: protos.google.logging.v2.TailLogEntriesResponse) => { resolve(response); - } + }, ); stream.on('error', (err: Error) => { reject(err); @@ -564,12 +564,12 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.innerApiCalls.tailLogEntries as SinonStub) .getCall(0) - .calledWith(null) + .calledWith(null), ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) .args[0], - request + request, ); }); @@ -580,12 +580,12 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.TailLogEntriesRequest() + new protos.google.logging.v2.TailLogEntriesRequest(), ); const expectedError = new Error('expected'); client.innerApiCalls.tailLogEntries = stubBidiStreamingCall( undefined, - expectedError + expectedError, ); const stream = client.tailLogEntries(); const promise = new Promise((resolve, reject) => { @@ -593,7 +593,7 @@ describe('v2.LoggingServiceV2Client', () => { 'data', (response: protos.google.logging.v2.TailLogEntriesResponse) => { resolve(response); - } + }, ); stream.on('error', (err: Error) => { reject(err); @@ -605,12 +605,12 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.innerApiCalls.tailLogEntries as SinonStub) .getCall(0) - .calledWith(null) + .calledWith(null), ); assert.deepStrictEqual( ((stream as unknown as PassThrough)._transform as SinonStub).getCall(0) .args[0], - request + request, ); }); }); @@ -623,7 +623,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogEntriesRequest() + new protos.google.logging.v2.ListLogEntriesRequest(), ); const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogEntry()), @@ -642,7 +642,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogEntriesRequest() + new protos.google.logging.v2.ListLogEntriesRequest(), ); const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogEntry()), @@ -656,14 +656,14 @@ describe('v2.LoggingServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogEntry[] | null + result?: protos.google.logging.v2.ILogEntry[] | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -677,12 +677,12 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogEntriesRequest() + new protos.google.logging.v2.ListLogEntriesRequest(), ); const expectedError = new Error('expected'); client.innerApiCalls.listLogEntries = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.listLogEntries(request), expectedError); }); @@ -694,7 +694,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogEntriesRequest() + new protos.google.logging.v2.ListLogEntriesRequest(), ); const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogEntry()), @@ -721,7 +721,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.descriptors.page.listLogEntries.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLogEntries, request) + .calledWith(client.innerApiCalls.listLogEntries, request), ); }); @@ -732,7 +732,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogEntriesRequest() + new protos.google.logging.v2.ListLogEntriesRequest(), ); const expectedError = new Error('expected'); client.descriptors.page.listLogEntries.createStream = @@ -754,7 +754,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.descriptors.page.listLogEntries.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLogEntries, request) + .calledWith(client.innerApiCalls.listLogEntries, request), ); }); @@ -765,7 +765,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogEntriesRequest() + new protos.google.logging.v2.ListLogEntriesRequest(), ); const expectedResponse = [ generateSampleMessage(new protos.google.logging.v2.LogEntry()), @@ -784,7 +784,7 @@ describe('v2.LoggingServiceV2Client', () => { ( client.descriptors.page.listLogEntries.asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); }); @@ -795,7 +795,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogEntriesRequest() + new protos.google.logging.v2.ListLogEntriesRequest(), ); const expectedError = new Error('expected'); client.descriptors.page.listLogEntries.asyncIterate = @@ -811,7 +811,7 @@ describe('v2.LoggingServiceV2Client', () => { ( client.descriptors.page.listLogEntries.asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); }); }); @@ -824,17 +824,17 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest(), ); const expectedResponse = [ generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), ]; client.innerApiCalls.listMonitoredResourceDescriptors = @@ -850,17 +850,17 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest(), ); const expectedResponse = [ generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), ]; client.innerApiCalls.listMonitoredResourceDescriptors = @@ -870,14 +870,14 @@ describe('v2.LoggingServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.api.IMonitoredResourceDescriptor[] | null + result?: protos.google.api.IMonitoredResourceDescriptor[] | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -891,16 +891,16 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest(), ); const expectedError = new Error('expected'); client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects( client.listMonitoredResourceDescriptors(request), - expectedError + expectedError, ); }); @@ -911,17 +911,17 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest(), ); const expectedResponse = [ generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), ]; client.descriptors.page.listMonitoredResourceDescriptors.createStream = @@ -933,7 +933,7 @@ describe('v2.LoggingServiceV2Client', () => { 'data', (response: protos.google.api.MonitoredResourceDescriptor) => { responses.push(response); - } + }, ); stream.on('end', () => { resolve(responses); @@ -952,8 +952,8 @@ describe('v2.LoggingServiceV2Client', () => { .getCall(0) .calledWith( client.innerApiCalls.listMonitoredResourceDescriptors, - request - ) + request, + ), ); }); @@ -964,7 +964,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest(), ); const expectedError = new Error('expected'); client.descriptors.page.listMonitoredResourceDescriptors.createStream = @@ -976,7 +976,7 @@ describe('v2.LoggingServiceV2Client', () => { 'data', (response: protos.google.api.MonitoredResourceDescriptor) => { responses.push(response); - } + }, ); stream.on('end', () => { resolve(responses); @@ -994,8 +994,8 @@ describe('v2.LoggingServiceV2Client', () => { .getCall(0) .calledWith( client.innerApiCalls.listMonitoredResourceDescriptors, - request - ) + request, + ), ); }); @@ -1006,17 +1006,17 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest(), ); const expectedResponse = [ generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), generateSampleMessage( - new protos.google.api.MonitoredResourceDescriptor() + new protos.google.api.MonitoredResourceDescriptor(), ), ]; client.descriptors.page.listMonitoredResourceDescriptors.asyncIterate = @@ -1032,7 +1032,7 @@ describe('v2.LoggingServiceV2Client', () => { client.descriptors.page.listMonitoredResourceDescriptors .asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); }); @@ -1043,7 +1043,7 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest() + new protos.google.logging.v2.ListMonitoredResourceDescriptorsRequest(), ); const expectedError = new Error('expected'); client.descriptors.page.listMonitoredResourceDescriptors.asyncIterate = @@ -1060,7 +1060,7 @@ describe('v2.LoggingServiceV2Client', () => { client.descriptors.page.listMonitoredResourceDescriptors .asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); }); }); @@ -1073,11 +1073,11 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogsRequest() + new protos.google.logging.v2.ListLogsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -1102,11 +1102,11 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogsRequest() + new protos.google.logging.v2.ListLogsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -1122,7 +1122,7 @@ describe('v2.LoggingServiceV2Client', () => { } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -1144,11 +1144,11 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogsRequest() + new protos.google.logging.v2.ListLogsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -1172,11 +1172,11 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogsRequest() + new protos.google.logging.v2.ListLogsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -1201,14 +1201,14 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.descriptors.page.listLogs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLogs, request) + .calledWith(client.innerApiCalls.listLogs, request), ); assert( (client.descriptors.page.listLogs.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -1219,18 +1219,18 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogsRequest() + new protos.google.logging.v2.ListLogsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLogs.createStream = stubPageStreamingCall( undefined, - expectedError + expectedError, ); const stream = client.listLogsStream(request); const promise = new Promise((resolve, reject) => { @@ -1249,14 +1249,14 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.descriptors.page.listLogs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLogs, request) + .calledWith(client.innerApiCalls.listLogs, request), ); assert( (client.descriptors.page.listLogs.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -1267,11 +1267,11 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogsRequest() + new protos.google.logging.v2.ListLogsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -1287,14 +1287,14 @@ describe('v2.LoggingServiceV2Client', () => { assert.deepStrictEqual( (client.descriptors.page.listLogs.asyncIterate as SinonStub).getCall(0) .args[1], - request + request, ); assert( (client.descriptors.page.listLogs.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -1305,18 +1305,18 @@ describe('v2.LoggingServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogsRequest() + new protos.google.logging.v2.ListLogsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLogs.asyncIterate = stubAsyncIterationCall( undefined, - expectedError + expectedError, ); const iterable = client.listLogsAsync(request); await assert.rejects(async () => { @@ -1328,14 +1328,14 @@ describe('v2.LoggingServiceV2Client', () => { assert.deepStrictEqual( (client.descriptors.page.listLogs.asyncIterate as SinonStub).getCall(0) .args[1], - request + request, ); assert( (client.descriptors.page.listLogs.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); }); @@ -1360,7 +1360,7 @@ describe('v2.LoggingServiceV2Client', () => { it('billingAccountCmekSettingsPath', () => { const result = client.billingAccountCmekSettingsPath( - 'billingAccountValue' + 'billingAccountValue', ); assert.strictEqual(result, fakePath); assert( @@ -1369,14 +1369,14 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -1385,7 +1385,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1411,7 +1411,7 @@ describe('v2.LoggingServiceV2Client', () => { it('billingAccountExclusionPath', () => { const result = client.billingAccountExclusionPath( 'billingAccountValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -1420,7 +1420,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1434,7 +1434,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1448,7 +1448,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1474,7 +1474,7 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.billingAccountLocationBucketPath( 'billingAccountValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -1483,14 +1483,14 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -1499,7 +1499,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1513,7 +1513,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1527,7 +1527,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1555,7 +1555,7 @@ describe('v2.LoggingServiceV2Client', () => { 'billingAccountValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -1564,14 +1564,14 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketLinkName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -1580,14 +1580,14 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); it('matchLocationFromBillingAccountLocationBucketLinkName', () => { const result = client.matchLocationFromBillingAccountLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'locationValue'); assert( @@ -1596,7 +1596,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1610,7 +1610,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1624,7 +1624,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1652,7 +1652,7 @@ describe('v2.LoggingServiceV2Client', () => { 'billingAccountValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -1661,14 +1661,14 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -1677,14 +1677,14 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); it('matchLocationFromBillingAccountLocationBucketViewName', () => { const result = client.matchLocationFromBillingAccountLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'locationValue'); assert( @@ -1693,7 +1693,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1707,7 +1707,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1721,7 +1721,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1747,7 +1747,7 @@ describe('v2.LoggingServiceV2Client', () => { it('billingAccountLogPath', () => { const result = client.billingAccountLogPath( 'billingAccountValue', - 'logValue' + 'logValue', ); assert.strictEqual(result, fakePath); assert( @@ -1756,7 +1756,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1770,7 +1770,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1783,7 +1783,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1814,7 +1814,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1828,7 +1828,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1854,7 +1854,7 @@ describe('v2.LoggingServiceV2Client', () => { it('billingAccountSinkPath', () => { const result = client.billingAccountSinkPath( 'billingAccountValue', - 'sinkValue' + 'sinkValue', ); assert.strictEqual(result, fakePath); assert( @@ -1863,7 +1863,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1877,7 +1877,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1890,7 +1890,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1921,7 +1921,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1934,7 +1934,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1960,13 +1960,13 @@ describe('v2.LoggingServiceV2Client', () => { it('folderExclusionPath', () => { const result = client.folderExclusionPath( 'folderValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( (client.pathTemplates.folderExclusionPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1976,7 +1976,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1986,7 +1986,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2014,7 +2014,7 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.folderLocationBucketPath( 'folderValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -2023,7 +2023,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2036,7 +2036,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2050,7 +2050,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2063,7 +2063,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2093,7 +2093,7 @@ describe('v2.LoggingServiceV2Client', () => { 'folderValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -2102,7 +2102,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2116,7 +2116,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2130,7 +2130,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2144,7 +2144,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2158,7 +2158,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2188,7 +2188,7 @@ describe('v2.LoggingServiceV2Client', () => { 'folderValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -2197,7 +2197,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2211,7 +2211,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2225,7 +2225,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2239,7 +2239,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2253,7 +2253,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2282,7 +2282,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2292,7 +2292,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2302,7 +2302,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2330,7 +2330,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderSettingsPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2340,7 +2340,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderSettingsPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2369,7 +2369,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2379,7 +2379,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2389,7 +2389,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2418,7 +2418,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2428,7 +2428,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2438,7 +2438,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2469,7 +2469,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2483,7 +2483,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2509,7 +2509,7 @@ describe('v2.LoggingServiceV2Client', () => { it('organizationExclusionPath', () => { const result = client.organizationExclusionPath( 'organizationValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -2518,7 +2518,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2532,7 +2532,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2546,7 +2546,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2574,7 +2574,7 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.organizationLocationBucketPath( 'organizationValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -2583,7 +2583,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2597,7 +2597,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2611,7 +2611,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2625,7 +2625,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2653,7 +2653,7 @@ describe('v2.LoggingServiceV2Client', () => { 'organizationValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -2662,14 +2662,14 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchOrganizationFromOrganizationLocationBucketLinkName', () => { const result = client.matchOrganizationFromOrganizationLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'organizationValue'); assert( @@ -2678,7 +2678,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2692,7 +2692,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2706,7 +2706,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2720,7 +2720,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2748,7 +2748,7 @@ describe('v2.LoggingServiceV2Client', () => { 'organizationValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -2757,14 +2757,14 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchOrganizationFromOrganizationLocationBucketViewName', () => { const result = client.matchOrganizationFromOrganizationLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'organizationValue'); assert( @@ -2773,7 +2773,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2787,7 +2787,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2801,7 +2801,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2815,7 +2815,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2841,13 +2841,13 @@ describe('v2.LoggingServiceV2Client', () => { it('organizationLogPath', () => { const result = client.organizationLogPath( 'organizationValue', - 'logValue' + 'logValue', ); assert.strictEqual(result, fakePath); assert( (client.pathTemplates.organizationLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2858,7 +2858,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2868,7 +2868,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2899,7 +2899,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2913,7 +2913,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2939,7 +2939,7 @@ describe('v2.LoggingServiceV2Client', () => { it('organizationSinkPath', () => { const result = client.organizationSinkPath( 'organizationValue', - 'sinkValue' + 'sinkValue', ); assert.strictEqual(result, fakePath); assert( @@ -2948,7 +2948,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2959,7 +2959,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2969,7 +2969,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2997,7 +2997,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3007,7 +3007,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3038,7 +3038,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3051,7 +3051,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3077,7 +3077,7 @@ describe('v2.LoggingServiceV2Client', () => { it('projectExclusionPath', () => { const result = client.projectExclusionPath( 'projectValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -3086,7 +3086,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3096,7 +3096,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3106,7 +3106,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3134,7 +3134,7 @@ describe('v2.LoggingServiceV2Client', () => { const result = client.projectLocationBucketPath( 'projectValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -3143,7 +3143,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3157,7 +3157,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3171,7 +3171,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3185,7 +3185,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3215,7 +3215,7 @@ describe('v2.LoggingServiceV2Client', () => { 'projectValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -3224,7 +3224,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3238,7 +3238,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3252,7 +3252,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3266,7 +3266,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3280,7 +3280,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3310,7 +3310,7 @@ describe('v2.LoggingServiceV2Client', () => { 'projectValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -3319,7 +3319,7 @@ describe('v2.LoggingServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3333,7 +3333,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3347,7 +3347,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3361,7 +3361,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3375,7 +3375,7 @@ describe('v2.LoggingServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3404,7 +3404,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3414,7 +3414,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3424,7 +3424,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3452,7 +3452,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectSettingsPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3462,7 +3462,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectSettingsPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3491,7 +3491,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3501,7 +3501,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3511,7 +3511,7 @@ describe('v2.LoggingServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); diff --git a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts index e0be7d5ad6c..90a774f0765 100644 --- a/handwritten/logging/test/gapic_metrics_service_v2_v2.ts +++ b/handwritten/logging/test/gapic_metrics_service_v2_v2.ts @@ -30,7 +30,7 @@ import {protobuf} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects const root = protobuf.Root.fromJSON( - require('../protos/protos.json') + require('../protos/protos.json'), ).resolveAll(); // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -47,7 +47,7 @@ function generateSampleMessage(instance: T) { instance.constructor as typeof protobuf.Message ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject + filledObject, ) as T; } @@ -59,7 +59,7 @@ function stubSimpleCall(response?: ResponseType, error?: Error) { function stubSimpleCallWithCallback( response?: ResponseType, - error?: Error + error?: Error, ) { return error ? sinon.stub().callsArgWith(2, error) @@ -68,7 +68,7 @@ function stubSimpleCallWithCallback( function stubPageStreamingCall( responses?: ResponseType[], - error?: Error + error?: Error, ) { const pagingStub = sinon.stub(); if (responses) { @@ -106,7 +106,7 @@ function stubPageStreamingCall( function stubAsyncIterationCall( responses?: ResponseType[], - error?: Error + error?: Error, ) { let counter = 0; const asyncIterable = { @@ -313,16 +313,16 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetLogMetricRequest() + new protos.google.logging.v2.GetLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogMetric() + new protos.google.logging.v2.LogMetric(), ); client.innerApiCalls.getLogMetric = stubSimpleCall(expectedResponse); const [response] = await client.getLogMetric(request); @@ -344,16 +344,16 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetLogMetricRequest() + new protos.google.logging.v2.GetLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogMetric() + new protos.google.logging.v2.LogMetric(), ); client.innerApiCalls.getLogMetric = stubSimpleCallWithCallback(expectedResponse); @@ -362,14 +362,14 @@ describe('v2.MetricsServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogMetric | null + result?: protos.google.logging.v2.ILogMetric | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -391,18 +391,18 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetLogMetricRequest() + new protos.google.logging.v2.GetLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getLogMetric = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.getLogMetric(request), expectedError); const actualRequest = ( @@ -422,11 +422,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.GetLogMetricRequest() + new protos.google.logging.v2.GetLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.GetLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -443,16 +443,16 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateLogMetricRequest() + new protos.google.logging.v2.CreateLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateLogMetricRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogMetric() + new protos.google.logging.v2.LogMetric(), ); client.innerApiCalls.createLogMetric = stubSimpleCall(expectedResponse); const [response] = await client.createLogMetric(request); @@ -474,16 +474,16 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateLogMetricRequest() + new protos.google.logging.v2.CreateLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateLogMetricRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogMetric() + new protos.google.logging.v2.LogMetric(), ); client.innerApiCalls.createLogMetric = stubSimpleCallWithCallback(expectedResponse); @@ -492,14 +492,14 @@ describe('v2.MetricsServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogMetric | null + result?: protos.google.logging.v2.ILogMetric | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -521,18 +521,18 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateLogMetricRequest() + new protos.google.logging.v2.CreateLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateLogMetricRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createLogMetric = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.createLogMetric(request), expectedError); const actualRequest = ( @@ -552,11 +552,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.CreateLogMetricRequest() + new protos.google.logging.v2.CreateLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.CreateLogMetricRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -573,16 +573,16 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateLogMetricRequest() + new protos.google.logging.v2.UpdateLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogMetric() + new protos.google.logging.v2.LogMetric(), ); client.innerApiCalls.updateLogMetric = stubSimpleCall(expectedResponse); const [response] = await client.updateLogMetric(request); @@ -604,16 +604,16 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateLogMetricRequest() + new protos.google.logging.v2.UpdateLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.logging.v2.LogMetric() + new protos.google.logging.v2.LogMetric(), ); client.innerApiCalls.updateLogMetric = stubSimpleCallWithCallback(expectedResponse); @@ -622,14 +622,14 @@ describe('v2.MetricsServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogMetric | null + result?: protos.google.logging.v2.ILogMetric | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -651,18 +651,18 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateLogMetricRequest() + new protos.google.logging.v2.UpdateLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateLogMetric = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.updateLogMetric(request), expectedError); const actualRequest = ( @@ -682,11 +682,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.UpdateLogMetricRequest() + new protos.google.logging.v2.UpdateLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.UpdateLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -703,16 +703,16 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLogMetricRequest() + new protos.google.logging.v2.DeleteLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteLogMetric = stubSimpleCall(expectedResponse); const [response] = await client.deleteLogMetric(request); @@ -734,16 +734,16 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLogMetricRequest() + new protos.google.logging.v2.DeleteLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.protobuf.Empty(), ); client.innerApiCalls.deleteLogMetric = stubSimpleCallWithCallback(expectedResponse); @@ -752,14 +752,14 @@ describe('v2.MetricsServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.protobuf.IEmpty | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -781,18 +781,18 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLogMetricRequest() + new protos.google.logging.v2.DeleteLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedHeaderRequestParams = `metric_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteLogMetric = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.deleteLogMetric(request), expectedError); const actualRequest = ( @@ -812,11 +812,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.DeleteLogMetricRequest() + new protos.google.logging.v2.DeleteLogMetricRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.DeleteLogMetricRequest', - ['metricName'] + ['metricName'], ); request.metricName = defaultValue1; const expectedError = new Error('The client has already been closed.'); @@ -833,11 +833,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogMetricsRequest() + new protos.google.logging.v2.ListLogMetricsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogMetricsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -866,11 +866,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogMetricsRequest() + new protos.google.logging.v2.ListLogMetricsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogMetricsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -886,14 +886,14 @@ describe('v2.MetricsServiceV2Client', () => { request, ( err?: Error | null, - result?: protos.google.logging.v2.ILogMetric[] | null + result?: protos.google.logging.v2.ILogMetric[] | null, ) => { if (err) { reject(err); } else { resolve(result); } - } + }, ); }); const response = await promise; @@ -915,18 +915,18 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogMetricsRequest() + new protos.google.logging.v2.ListLogMetricsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogMetricsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listLogMetrics = stubSimpleCall( undefined, - expectedError + expectedError, ); await assert.rejects(client.listLogMetrics(request), expectedError); const actualRequest = ( @@ -946,11 +946,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogMetricsRequest() + new protos.google.logging.v2.ListLogMetricsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogMetricsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -979,14 +979,14 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.descriptors.page.listLogMetrics.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLogMetrics, request) + .calledWith(client.innerApiCalls.listLogMetrics, request), ); assert( (client.descriptors.page.listLogMetrics.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -997,11 +997,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogMetricsRequest() + new protos.google.logging.v2.ListLogMetricsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogMetricsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -1025,14 +1025,14 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.descriptors.page.listLogMetrics.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLogMetrics, request) + .calledWith(client.innerApiCalls.listLogMetrics, request), ); assert( (client.descriptors.page.listLogMetrics.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -1043,11 +1043,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogMetricsRequest() + new protos.google.logging.v2.ListLogMetricsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogMetricsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -1068,14 +1068,14 @@ describe('v2.MetricsServiceV2Client', () => { ( client.descriptors.page.listLogMetrics.asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); assert( (client.descriptors.page.listLogMetrics.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); @@ -1086,11 +1086,11 @@ describe('v2.MetricsServiceV2Client', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.logging.v2.ListLogMetricsRequest() + new protos.google.logging.v2.ListLogMetricsRequest(), ); const defaultValue1 = getTypeDefaultValue( '.google.logging.v2.ListLogMetricsRequest', - ['parent'] + ['parent'], ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; @@ -1108,14 +1108,14 @@ describe('v2.MetricsServiceV2Client', () => { ( client.descriptors.page.listLogMetrics.asyncIterate as SinonStub ).getCall(0).args[1], - request + request, ); assert( (client.descriptors.page.listLogMetrics.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + ].includes(expectedHeaderRequestParams), ); }); }); @@ -1140,7 +1140,7 @@ describe('v2.MetricsServiceV2Client', () => { it('billingAccountCmekSettingsPath', () => { const result = client.billingAccountCmekSettingsPath( - 'billingAccountValue' + 'billingAccountValue', ); assert.strictEqual(result, fakePath); assert( @@ -1149,14 +1149,14 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountCmekSettingsName', () => { const result = client.matchBillingAccountFromBillingAccountCmekSettingsName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -1165,7 +1165,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1191,7 +1191,7 @@ describe('v2.MetricsServiceV2Client', () => { it('billingAccountExclusionPath', () => { const result = client.billingAccountExclusionPath( 'billingAccountValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -1200,7 +1200,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1214,7 +1214,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1228,7 +1228,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1254,7 +1254,7 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.billingAccountLocationBucketPath( 'billingAccountValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -1263,14 +1263,14 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -1279,7 +1279,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1293,7 +1293,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1307,7 +1307,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1335,7 +1335,7 @@ describe('v2.MetricsServiceV2Client', () => { 'billingAccountValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -1344,14 +1344,14 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketLinkName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -1360,14 +1360,14 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); it('matchLocationFromBillingAccountLocationBucketLinkName', () => { const result = client.matchLocationFromBillingAccountLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'locationValue'); assert( @@ -1376,7 +1376,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1390,7 +1390,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1404,7 +1404,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1432,7 +1432,7 @@ describe('v2.MetricsServiceV2Client', () => { 'billingAccountValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -1441,14 +1441,14 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchBillingAccountFromBillingAccountLocationBucketViewName', () => { const result = client.matchBillingAccountFromBillingAccountLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'billingAccountValue'); assert( @@ -1457,14 +1457,14 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); it('matchLocationFromBillingAccountLocationBucketViewName', () => { const result = client.matchLocationFromBillingAccountLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'locationValue'); assert( @@ -1473,7 +1473,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1487,7 +1487,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1501,7 +1501,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1527,7 +1527,7 @@ describe('v2.MetricsServiceV2Client', () => { it('billingAccountLogPath', () => { const result = client.billingAccountLogPath( 'billingAccountValue', - 'logValue' + 'logValue', ); assert.strictEqual(result, fakePath); assert( @@ -1536,7 +1536,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1550,7 +1550,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1563,7 +1563,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1594,7 +1594,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1608,7 +1608,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1634,7 +1634,7 @@ describe('v2.MetricsServiceV2Client', () => { it('billingAccountSinkPath', () => { const result = client.billingAccountSinkPath( 'billingAccountValue', - 'sinkValue' + 'sinkValue', ); assert.strictEqual(result, fakePath); assert( @@ -1643,7 +1643,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1657,7 +1657,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1670,7 +1670,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1701,7 +1701,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1714,7 +1714,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1740,13 +1740,13 @@ describe('v2.MetricsServiceV2Client', () => { it('folderExclusionPath', () => { const result = client.folderExclusionPath( 'folderValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( (client.pathTemplates.folderExclusionPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1756,7 +1756,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1766,7 +1766,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1794,7 +1794,7 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.folderLocationBucketPath( 'folderValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -1803,7 +1803,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1816,7 +1816,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1830,7 +1830,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1843,7 +1843,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1873,7 +1873,7 @@ describe('v2.MetricsServiceV2Client', () => { 'folderValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -1882,7 +1882,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1896,7 +1896,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1910,7 +1910,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1924,7 +1924,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -1938,7 +1938,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -1968,7 +1968,7 @@ describe('v2.MetricsServiceV2Client', () => { 'folderValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -1977,7 +1977,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -1991,7 +1991,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2005,7 +2005,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2019,7 +2019,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2033,7 +2033,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2062,7 +2062,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2072,7 +2072,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2082,7 +2082,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2110,7 +2110,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderSettingsPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2120,7 +2120,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderSettingsPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2149,7 +2149,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2159,7 +2159,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2169,7 +2169,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.folderSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2198,7 +2198,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2208,7 +2208,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2218,7 +2218,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.logMetricPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2249,7 +2249,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2263,7 +2263,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2289,7 +2289,7 @@ describe('v2.MetricsServiceV2Client', () => { it('organizationExclusionPath', () => { const result = client.organizationExclusionPath( 'organizationValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -2298,7 +2298,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2312,7 +2312,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2326,7 +2326,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2354,7 +2354,7 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.organizationLocationBucketPath( 'organizationValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -2363,7 +2363,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2377,7 +2377,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2391,7 +2391,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2405,7 +2405,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2433,7 +2433,7 @@ describe('v2.MetricsServiceV2Client', () => { 'organizationValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -2442,14 +2442,14 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchOrganizationFromOrganizationLocationBucketLinkName', () => { const result = client.matchOrganizationFromOrganizationLocationBucketLinkName( - fakePath + fakePath, ); assert.strictEqual(result, 'organizationValue'); assert( @@ -2458,7 +2458,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2472,7 +2472,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2486,7 +2486,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2500,7 +2500,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2528,7 +2528,7 @@ describe('v2.MetricsServiceV2Client', () => { 'organizationValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -2537,14 +2537,14 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); it('matchOrganizationFromOrganizationLocationBucketViewName', () => { const result = client.matchOrganizationFromOrganizationLocationBucketViewName( - fakePath + fakePath, ); assert.strictEqual(result, 'organizationValue'); assert( @@ -2553,7 +2553,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2567,7 +2567,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2581,7 +2581,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2595,7 +2595,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2621,13 +2621,13 @@ describe('v2.MetricsServiceV2Client', () => { it('organizationLogPath', () => { const result = client.organizationLogPath( 'organizationValue', - 'logValue' + 'logValue', ); assert.strictEqual(result, fakePath); assert( (client.pathTemplates.organizationLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2638,7 +2638,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2648,7 +2648,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.organizationLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2679,7 +2679,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2693,7 +2693,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2719,7 +2719,7 @@ describe('v2.MetricsServiceV2Client', () => { it('organizationSinkPath', () => { const result = client.organizationSinkPath( 'organizationValue', - 'sinkValue' + 'sinkValue', ); assert.strictEqual(result, fakePath); assert( @@ -2728,7 +2728,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2739,7 +2739,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2749,7 +2749,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.organizationSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2777,7 +2777,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2787,7 +2787,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2818,7 +2818,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2831,7 +2831,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2857,7 +2857,7 @@ describe('v2.MetricsServiceV2Client', () => { it('projectExclusionPath', () => { const result = client.projectExclusionPath( 'projectValue', - 'exclusionValue' + 'exclusionValue', ); assert.strictEqual(result, fakePath); assert( @@ -2866,7 +2866,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2876,7 +2876,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2886,7 +2886,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectExclusionPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2914,7 +2914,7 @@ describe('v2.MetricsServiceV2Client', () => { const result = client.projectLocationBucketPath( 'projectValue', 'locationValue', - 'bucketValue' + 'bucketValue', ); assert.strictEqual(result, fakePath); assert( @@ -2923,7 +2923,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -2937,7 +2937,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2951,7 +2951,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -2965,7 +2965,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -2995,7 +2995,7 @@ describe('v2.MetricsServiceV2Client', () => { 'projectValue', 'locationValue', 'bucketValue', - 'linkValue' + 'linkValue', ); assert.strictEqual(result, fakePath); assert( @@ -3004,7 +3004,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3018,7 +3018,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3032,7 +3032,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3046,7 +3046,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3060,7 +3060,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3090,7 +3090,7 @@ describe('v2.MetricsServiceV2Client', () => { 'projectValue', 'locationValue', 'bucketValue', - 'viewValue' + 'viewValue', ); assert.strictEqual(result, fakePath); assert( @@ -3099,7 +3099,7 @@ describe('v2.MetricsServiceV2Client', () => { .render as SinonStub ) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3113,7 +3113,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3127,7 +3127,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3141,7 +3141,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3155,7 +3155,7 @@ describe('v2.MetricsServiceV2Client', () => { .match as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3184,7 +3184,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3194,7 +3194,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3204,7 +3204,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectLogPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3232,7 +3232,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectSettingsPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3242,7 +3242,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectSettingsPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); @@ -3271,7 +3271,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.render as SinonStub) .getCall(-1) - .calledWith(expectedParameters) + .calledWith(expectedParameters), ); }); @@ -3281,7 +3281,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); @@ -3291,7 +3291,7 @@ describe('v2.MetricsServiceV2Client', () => { assert( (client.pathTemplates.projectSinkPathTemplate.match as SinonStub) .getCall(-1) - .calledWith(fakePath) + .calledWith(fakePath), ); }); }); diff --git a/handwritten/logging/test/index.ts b/handwritten/logging/test/index.ts index 9f583247c5b..a02a18c2ccf 100644 --- a/handwritten/logging/test/index.ts +++ b/handwritten/logging/test/index.ts @@ -215,8 +215,8 @@ describe('Logging', () => { libVersion: version, scopes: EXPECTED_SCOPES, }, - options - ) + options, + ), ); return fakeGoogleAuthInstance; }; @@ -245,8 +245,8 @@ describe('Logging', () => { libVersion: version, scopes: EXPECTED_SCOPES, }, - options - ) + options, + ), ); }); @@ -354,7 +354,7 @@ describe('Logging', () => { logging.configService.createSink = async ( // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, - gaxOpts: {} + gaxOpts: {}, ) => { const expectedParent = 'projects/' + logging.projectId; assert.strictEqual(reqOpts.parent, expectedParent); @@ -376,11 +376,11 @@ describe('Logging', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, // eslint-disable-next-line @typescript-eslint/no-unused-vars - gaxOpts: {} + gaxOpts: {}, ) => { assert.strictEqual( reqOpts.uniqueWriterIdentity, - config.uniqueWriterIdentity + config.uniqueWriterIdentity, ); assert.strictEqual(reqOpts.sink.uniqueWriterIdentity, undefined); return [{}]; @@ -399,7 +399,7 @@ describe('Logging', () => { logging.configService.createSink = async ( // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, - gaxOpts: {} + gaxOpts: {}, ) => { assert.strictEqual(reqOpts.sink.gaxOptions, undefined); assert.strictEqual(gaxOpts, config.gaxOptions); @@ -455,7 +455,7 @@ describe('Logging', () => { const [sink_, apiResponse_] = await logging.createSink( SINK_NAME, - {} as CreateSinkRequest + {} as CreateSinkRequest, ); assert.strictEqual(sink_, sink); assert.strictEqual(sink_.metadata, apiResponse); @@ -487,7 +487,7 @@ describe('Logging', () => { logging.loggingService.listLogEntries = async ( // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual(reqOpts, { filter: reqOpts?.filter, @@ -512,7 +512,7 @@ describe('Logging', () => { logging.loggingService.listLogEntries = async ( // eslint-disable-next-line @typescript-eslint/no-explicit-any - reqOpts: any + reqOpts: any, ) => { assert.deepStrictEqual(reqOpts.resourceNames, resourceNames); return [[]]; @@ -526,7 +526,7 @@ describe('Logging', () => { logging.loggingService.listLogEntries = async ( reqOpts: {}, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual( reqOpts, @@ -534,7 +534,7 @@ describe('Logging', () => { filter: 'timestamp > "2020-11-11T15:01:23.045123456Z"', orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], - }) + }), ); assert.deepStrictEqual(gaxOpts, { @@ -552,7 +552,7 @@ describe('Logging', () => { logging.loggingService.listLogEntries = async ( // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual( reqOpts, @@ -560,7 +560,7 @@ describe('Logging', () => { filter: reqOpts?.filter, orderBy: 'timestamp desc', resourceNames: ['projects/' + logging.projectId], - }) + }), ); assert.deepStrictEqual(gaxOpts, { autoPaginate: undefined, @@ -614,7 +614,7 @@ describe('Logging', () => { logging.loggingService.listLogEntries = async ( // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOpts: any, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual(reqOpts, { a: 'b', @@ -692,7 +692,7 @@ describe('Logging', () => { it('should make request once reading', done => { logging.loggingService.listLogEntriesStream = ( reqOpts: {}, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual(reqOpts, { resourceNames: ['projects/' + logging.projectId], @@ -721,7 +721,7 @@ describe('Logging', () => { logging = new LOGGING({projectId: PROJECT_ID}); logging.loggingService.listLogEntriesStream = ( reqOpts: {}, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual(reqOpts, { resourceNames: ['projects/' + logging.projectId], @@ -758,12 +758,12 @@ describe('Logging', () => { { filter: 'custom filter', }, - OPTIONS + OPTIONS, ); logging = new LOGGING({projectId: PROJECT_ID}); logging.loggingService.listLogEntriesStream = ( reqOpts: {}, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual(reqOpts, { resourceNames: ['projects/' + logging.projectId], diff --git a/handwritten/logging/test/instrumentation.ts b/handwritten/logging/test/instrumentation.ts index 45305005239..a4037b7740f 100644 --- a/handwritten/logging/test/instrumentation.ts +++ b/handwritten/logging/test/instrumentation.ts @@ -37,19 +37,19 @@ describe('instrumentation_info', () => { it('should generate library info properly by default', () => { const entry = instrumentation.createDiagnosticEntry( undefined, - undefined + undefined, ) as Entry; assert.equal( entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + instrumentation.NODEJS_LIBRARY_NAME_PREFIX, ); assert.equal( entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[VERSION], - instrumentation.getNodejsLibraryVersion() + instrumentation.getNodejsLibraryVersion(), ); }); @@ -58,19 +58,19 @@ describe('instrumentation_info', () => { const entry = instrumentation.createDiagnosticEntry( undefined, // eslint-disable-next-line @typescript-eslint/no-explicit-any - data as any + data as any, ) as Entry; assert.equal( entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + instrumentation.NODEJS_LIBRARY_NAME_PREFIX, ); assert.equal( entry.data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[VERSION], - instrumentation.NODEJS_DEFAULT_LIBRARY_VERSION + instrumentation.NODEJS_DEFAULT_LIBRARY_VERSION, ); }); @@ -84,7 +84,7 @@ describe('instrumentation_info', () => { entries[0][1].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + instrumentation.NODEJS_LIBRARY_NAME_PREFIX, ); }); @@ -97,25 +97,25 @@ describe('instrumentation_info', () => { entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.length, - 2 + 2, ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[1]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + instrumentation.NODEJS_LIBRARY_NAME_PREFIX, ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], - NODEJS_TEST + NODEJS_TEST, ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[VERSION], - VERSION_TEST + VERSION_TEST, ); }); @@ -128,19 +128,19 @@ describe('instrumentation_info', () => { entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.length, - 1 + 1, ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + instrumentation.NODEJS_LIBRARY_NAME_PREFIX, ); }); it('should truncate instrumentation info in log entry', () => { const entries = instrumentation.populateInstrumentationInfo( - createEntry(LONG_NODEJS_TEST, LONG_VERSION_TEST) + createEntry(LONG_NODEJS_TEST, LONG_VERSION_TEST), ); assert.equal(entries[0].length, 1); assert.equal(true, entries[1]); @@ -148,13 +148,13 @@ describe('instrumentation_info', () => { entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], - NODEJS_TEST + '-oo*' + NODEJS_TEST + '-oo*', ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[VERSION], - VERSION_TEST + '.0.0.0.0.*' + VERSION_TEST + '.0.0.0.0.*', ); }); @@ -168,7 +168,7 @@ describe('instrumentation_info', () => { entries[0][1].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + instrumentation.NODEJS_LIBRARY_NAME_PREFIX, ); entries = instrumentation.populateInstrumentationInfo(dummyEntry); assert.equal(entries[0].length, 1); @@ -180,7 +180,7 @@ describe('instrumentation_info', () => { // library version is always added as a third one const dummy = createEntry( instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-one', - 'v1' + 'v1', ); dummy.data?.[instrumentation.DIAGNOSTIC_INFO_KEY][ instrumentation.INSTRUMENTATION_SOURCE_KEY @@ -206,26 +206,26 @@ describe('instrumentation_info', () => { entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.length, - 3 + 3, ); assert.equal(true, entries[1]); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[0]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-one' + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-one', ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[1]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-two' + instrumentation.NODEJS_LIBRARY_NAME_PREFIX + '-two', ); assert.equal( entries[0][0].data?.[instrumentation.DIAGNOSTIC_INFO_KEY]?.[ instrumentation.INSTRUMENTATION_SOURCE_KEY ]?.[2]?.[NAME], - instrumentation.NODEJS_LIBRARY_NAME_PREFIX + instrumentation.NODEJS_LIBRARY_NAME_PREFIX, ); }); }); @@ -235,7 +235,7 @@ function createEntry(name: string | undefined, version: string | undefined) { { severity: google.logging.type.LogSeverity.DEBUG, }, - undefined + undefined, ); if (name || version) { entry.data = { diff --git a/handwritten/logging/test/log-sync.ts b/handwritten/logging/test/log-sync.ts index 778208a854b..e83585709eb 100644 --- a/handwritten/logging/test/log-sync.ts +++ b/handwritten/logging/test/log-sync.ts @@ -61,7 +61,7 @@ describe('LogSync', () => { const log = new LogSync(LOGGING, LOG_NAME); assert.strictEqual( log.formattedName_, - logCommon.formatLogName('{{project-id}}', LOG_NAME) + logCommon.formatLogName('{{project-id}}', LOG_NAME), ); }); @@ -122,7 +122,7 @@ describe('LogSync', () => { const result = JSON.parse(fs.readFileSync(TEST_FILE, 'utf8')); assert.strictEqual( result.logName, - 'projects/{{project-id}}/logs/escaping%2Frequired%2Ffor%2Fthis%2Flog-name' + 'projects/{{project-id}}/logs/escaping%2Frequired%2Ffor%2Fthis%2Flog-name', ); done(); }); diff --git a/handwritten/logging/test/log.ts b/handwritten/logging/test/log.ts index af438f35c83..e535e739b69 100644 --- a/handwritten/logging/test/log.ts +++ b/handwritten/logging/test/log.ts @@ -123,8 +123,8 @@ describe('Log', () => { assert( callbackifyFake.callbackifyAll.calledWithExactly( Log, - sinon.match({exclude: ['entry', 'getEntriesStream']}) - ) + sinon.match({exclude: ['entry', 'getEntriesStream']}), + ), ); }); @@ -140,7 +140,7 @@ describe('Log', () => { const log = new Log(LOGGING, LOG_NAME); assert.strictEqual( log.formattedName_, - logCommon.formatLogName('{{project-id}}', LOG_NAME) + logCommon.formatLogName('{{project-id}}', LOG_NAME), ); }); @@ -172,8 +172,8 @@ describe('Log', () => { logName: log.formattedName_, }, undefined, - undefined - ) + undefined, + ), ); }); @@ -186,8 +186,8 @@ describe('Log', () => { logName: log.formattedName_, }, undefined, - log.defaultWriteDeleteCallback - ) + log.defaultWriteDeleteCallback, + ), ); log.defaultWriteDeleteCallback = undefined; }); @@ -195,7 +195,7 @@ describe('Log', () => { it('should accept gaxOptions', async () => { await log.delete({}); assert( - log.logging.loggingService.deleteLog.calledWith(sinon.match.any, {}) + log.logging.loggingService.deleteLog.calledWith(sinon.match.any, {}), ); }); }); @@ -235,7 +235,7 @@ describe('Log', () => { assert( log.logging.getEntries.calledWithExactly({ filter: `logName="${LOG_NAME_FORMATTED}"`, - }) + }), ); }); @@ -273,7 +273,7 @@ describe('Log', () => { assert( log.logging.getEntriesStream.calledWithExactly({ log: LOG_NAME_ENCODED, - }) + }), ); }); @@ -292,9 +292,9 @@ describe('Log', () => { { log: LOG_NAME_ENCODED, }, - options - ) - ) + options, + ), + ), ); }); }); @@ -312,7 +312,7 @@ describe('Log', () => { assert( log.logging.tailEntries.calledWithExactly({ log: LOG_NAME_ENCODED, - }) + }), ); }); @@ -331,9 +331,9 @@ describe('Log', () => { { log: LOG_NAME_ENCODED, }, - options - ) - ) + options, + ), + ), ); }); }); @@ -388,8 +388,8 @@ describe('Log', () => { }, }, undefined, - undefined - ) + undefined, + ), ); }); @@ -424,8 +424,8 @@ describe('Log', () => { log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ resource: reusableDetectedResource, - }) - ) + }), + ), ); }); @@ -454,8 +454,8 @@ describe('Log', () => { resource: EXPECTED_RESOURCE, }, undefined, - undefined - ) + undefined, + ), ); }); @@ -470,8 +470,8 @@ describe('Log', () => { resource: FAKE_RESOURCE, }, undefined, - undefined - ) + undefined, + ), ); }); @@ -487,8 +487,8 @@ describe('Log', () => { resource: FAKE_RESOURCE, }, undefined, - log.defaultWriteDeleteCallback - ) + log.defaultWriteDeleteCallback, + ), ); log.defaultWriteDeleteCallback = undefined; }); @@ -503,8 +503,8 @@ describe('Log', () => { log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ entries: 'decorated entries', - }) - ) + }), + ), ); }); @@ -517,8 +517,8 @@ describe('Log', () => { log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ entries: arrifiedEntries, - }) - ) + }), + ), ); }); @@ -530,8 +530,8 @@ describe('Log', () => { log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ entries: ENTRIES, - }) - ) + }), + ), ); }); @@ -541,8 +541,8 @@ describe('Log', () => { log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ partialSuccess: true, - }) - ) + }), + ), ); }); @@ -553,8 +553,8 @@ describe('Log', () => { sinon.match({ dryRun: true, partialSuccess: false, - }) - ) + }), + ), ); }); @@ -567,8 +567,8 @@ describe('Log', () => { log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ partialSuccess: true, - }) - ) + }), + ), ); instrumentation.setInstrumentationStatus(true); }); @@ -582,8 +582,8 @@ describe('Log', () => { log.logging.loggingService.writeLogEntries.calledOnceWith( sinon.match({ partialSuccess: true, - }) - ) + }), + ), ); }); @@ -597,8 +597,8 @@ describe('Log', () => { { maxRetries: 1, }, - sinon.match.any - ) + sinon.match.any, + ), ); log.logging.loggingService.writeLogEntries.reset(); await log.write(ENTRIES, {gaxOptions: {maxRetries: 10}}); @@ -608,8 +608,8 @@ describe('Log', () => { { maxRetries: 10, }, - sinon.match.any - ) + sinon.match.any, + ), ); }); }); @@ -656,7 +656,7 @@ describe('Log', () => { .returns({} as EntryJson); log.decorateEntries([entry]); assert( - localJSONStub.calledWithExactly({removeCircular: true}, PROJECT_ID) + localJSONStub.calledWithExactly({removeCircular: true}, PROJECT_ID), ); }); @@ -749,11 +749,11 @@ describe('Log', () => { assert.ok(log.jsonFieldsToTruncate.length > 1); assert.ok(log.jsonFieldsToTruncate[0] === TRUNCATE_FIELD); const notExists = log.jsonFieldsToTruncate.filter( - (str: string) => str === INVALID_TRUNCATE_FIELD + (str: string) => str === INVALID_TRUNCATE_FIELD, ); assert.strictEqual(notExists.length, 0); const existOnce = log.jsonFieldsToTruncate.filter( - (str: string) => str === TRUNCATE_FIELD + (str: string) => str === TRUNCATE_FIELD, ); assert.strictEqual(existOnce.length, 1); }); diff --git a/handwritten/logging/test/middleware/express/test-make-middleware.ts b/handwritten/logging/test/middleware/express/test-make-middleware.ts index fc1fec50ce8..47740b2ad30 100644 --- a/handwritten/logging/test/middleware/express/test-make-middleware.ts +++ b/handwritten/logging/test/middleware/express/test-make-middleware.ts @@ -45,7 +45,7 @@ describe('middleware/express/make-middleware', () => { '../../../src/middleware/express/make-middleware', { '../../../src/utils/context': FAKE_CONTEXT, - } + }, ); it('should return a function accepting 3 arguments', () => { @@ -133,7 +133,7 @@ describe('middleware/express/make-middleware', () => { const middleware = makeMiddleware( FAKE_PROJECT_ID, () => {}, - emitRequestLog + emitRequestLog, ); middleware(fakeRequest, fakeResponse, () => {}); diff --git a/handwritten/logging/test/sink.ts b/handwritten/logging/test/sink.ts index 873d146e64e..598e63c70bf 100644 --- a/handwritten/logging/test/sink.ts +++ b/handwritten/logging/test/sink.ts @@ -75,7 +75,7 @@ describe('Sink', () => { it('should localize the formatted name', () => { assert.strictEqual( sink.formattedName_, - 'projects/' + LOGGING.projectId + '/sinks/' + SINK_NAME + 'projects/' + LOGGING.projectId + '/sinks/' + SINK_NAME, ); }); }); @@ -98,7 +98,7 @@ describe('Sink', () => { sink.logging.auth.getProjectId = async () => PROJECT_ID; sink.logging.configService.deleteSink = async ( reqOpts: {}, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual(reqOpts, { sinkName: sink.formattedName_, @@ -113,7 +113,7 @@ describe('Sink', () => { const gaxOptions = {}; sink.logging.configService.deleteSink = async ( reqOpts: {}, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual(gaxOpts, gaxOptions); }; @@ -203,7 +203,7 @@ describe('Sink', () => { }; sink.setMetadata(METADATA).then( () => {}, - err => assert.strictEqual(err, error) + err => assert.strictEqual(err, error), ); }); @@ -213,7 +213,7 @@ describe('Sink', () => { sink.getMetadata = async () => [currentMetadata] as any; sink.logging.configService.updateSink = async ( reqOpts: {}, - gaxOpts: {} + gaxOpts: {}, ) => { assert.deepStrictEqual(reqOpts, { sinkName: sink.formattedName_, diff --git a/handwritten/logging/test/utils/common.ts b/handwritten/logging/test/utils/common.ts index 53e94af442a..0316fc6340f 100644 --- a/handwritten/logging/test/utils/common.ts +++ b/handwritten/logging/test/utils/common.ts @@ -142,7 +142,7 @@ describe('ObjectToStructConverter', () => { assert.strictEqual( objectToStructConverter.encodeValue_(buffer).blobValue.toString(), - 'Value' + 'Value', ); }); @@ -210,7 +210,7 @@ describe('ObjectToStructConverter', () => { it('should replace circular reference with [Circular]', () => { assert.deepStrictEqual( objectToStructConverter.encodeValue_(VALUE), - {stringValue: '[Circular]'} + {stringValue: '[Circular]'}, ); }); }); diff --git a/handwritten/logging/test/utils/context.ts b/handwritten/logging/test/utils/context.ts index caf9ed71de3..e8b6e2397f2 100644 --- a/handwritten/logging/test/utils/context.ts +++ b/handwritten/logging/test/utils/context.ts @@ -134,7 +134,7 @@ describe('context', () => { (parentSpan.spanContext().traceFlags & 1) !== 0; assert.strictEqual( context.trace, - `projects/${projectId}/traces/${traceId}` + `projects/${projectId}/traces/${traceId}`, ); assert.strictEqual(context.spanId, spanId); assert.strictEqual(context.traceSampled, traceSampled); @@ -154,7 +154,7 @@ describe('context', () => { (parentSpan.spanContext().traceFlags & 1) !== 0; assert.strictEqual( context.trace, - `projects/${projectId}/traces/${traceId}` + `projects/${projectId}/traces/${traceId}`, ); assert.strictEqual(context.spanId, spanId); assert.strictEqual(context.traceSampled, traceSampled); @@ -179,7 +179,7 @@ describe('context', () => { (parentSpan.spanContext().traceFlags & 1) !== 0; assert.strictEqual( context.trace, - `projects/${projectId}/traces/${traceId}` + `projects/${projectId}/traces/${traceId}`, ); assert.strictEqual(context.spanId, spanId); assert.strictEqual(context.traceSampled, traceSampled); @@ -201,7 +201,7 @@ describe('context', () => { (parentSpan.spanContext().traceFlags & 1) !== 0; assert.strictEqual( context.trace, - `projects/${projectId}/traces/${traceId}` + `projects/${projectId}/traces/${traceId}`, ); assert.strictEqual(context.spanId, spanId); assert.strictEqual(context.traceSampled, traceSampled); @@ -221,7 +221,7 @@ describe('context', () => { (parentSpan.spanContext().traceFlags & 1) !== 0; assert.strictEqual( context.trace, - `projects/${projectId}/traces/${traceId}` + `projects/${projectId}/traces/${traceId}`, ); assert.strictEqual(context.spanId, spanId); assert.strictEqual(context.traceSampled, traceSampled); @@ -300,17 +300,17 @@ describe('context', () => { assert.strictEqual( context.trace, test.expected.trace, - `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}` + `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}`, ); assert.strictEqual( context.spanId, test.expected.spanId, - `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}` + `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}`, ); assert.strictEqual( context.traceSampled, test.expected.traceSampled, - `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}` + `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}`, ); } else { assert.fail(); @@ -349,7 +349,7 @@ describe('context', () => { (parentSpan.spanContext().traceFlags & 1) !== 0; assert.strictEqual( context.trace, - `projects/${projectId}/traces/${traceId}` + `projects/${projectId}/traces/${traceId}`, ); assert.strictEqual(context.spanId, spanId); assert.strictEqual(context.traceSampled, traceSampled); @@ -401,17 +401,17 @@ describe('context', () => { assert.strictEqual( context.trace, test.expected.trace, - `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}` + `From ${test.header}; Expected trace: ${test.expected.trace}; Got: ${context.trace}`, ); assert.strictEqual( context.spanId, test.expected.spanId, - `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}` + `From ${test.header}; Expected spanId: ${test.expected.spanId}; Got: ${context.spanId}`, ); assert.strictEqual( context.traceSampled, test.expected.traceSampled, - `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}` + `From ${test.header}; Expected traceSampled: ${test.expected.traceSampled}; Got: ${context.traceSampled}`, ); } else { // This is the header: '' test case; diff --git a/handwritten/logging/test/utils/http-request.ts b/handwritten/logging/test/utils/http-request.ts index 7da2dffe616..b45e04a9c87 100644 --- a/handwritten/logging/test/utils/http-request.ts +++ b/handwritten/logging/test/utils/http-request.ts @@ -105,14 +105,14 @@ describe('http-request', () => { const h1 = makeHttpRequestData( fakeRequest as ServerRequest, fakeResponse as ServerResponse, - 1003 + 1003, ); assert.deepStrictEqual(h1.latency, {seconds: 1, nanos: 3e6}); const h2 = makeHttpRequestData( fakeRequest as ServerRequest, fakeResponse as ServerResponse, - 9003.1 + 9003.1, ); assert.deepStrictEqual(h2.latency, {seconds: 9, nanos: 3.1e6}); @@ -120,7 +120,7 @@ describe('http-request', () => { const h3 = makeHttpRequestData( fakeRequest as ServerRequest, fakeResponse as ServerResponse, - 1.0000000001 + 1.0000000001, ); assert.deepStrictEqual(h3.latency, {seconds: 0, nanos: 1e6}); }); @@ -135,7 +135,7 @@ describe('http-request', () => { it('should be false on invalid objects', () => { assert( - !isRawHttpRequest({requestMethod: 'POST'} as CloudLoggingHttpRequest) + !isRawHttpRequest({requestMethod: 'POST'} as CloudLoggingHttpRequest), ); assert(!isRawHttpRequest({})); assert(!isRawHttpRequest(null)); diff --git a/handwritten/logging/test/utils/log-common.ts b/handwritten/logging/test/utils/log-common.ts index 53cf5b87997..d62d3eba98f 100644 --- a/handwritten/logging/test/utils/log-common.ts +++ b/handwritten/logging/test/utils/log-common.ts @@ -40,7 +40,7 @@ describe('Log Common', () => { assignSeverityToEntries(ENTRIES[0], SEVERITY) .map(x => x.metadata) .map(x => x.severity), - [SEVERITY] + [SEVERITY], ); }); @@ -49,7 +49,7 @@ describe('Log Common', () => { assignSeverityToEntries(ENTRIES, SEVERITY) .map(x => x.metadata) .map(x => x.severity), - [SEVERITY, SEVERITY, SEVERITY] + [SEVERITY, SEVERITY, SEVERITY], ); }); diff --git a/handwritten/logging/test/utils/metadata.ts b/handwritten/logging/test/utils/metadata.ts index 7f967ed2c1e..9425f8ff543 100644 --- a/handwritten/logging/test/utils/metadata.ts +++ b/handwritten/logging/test/utils/metadata.ts @@ -298,7 +298,7 @@ describe('metadata', () => { }; await assert.rejects( metadata.getGKEDescriptor(), - (err: Error) => err === FAKE_ERROR + (err: Error) => err === FAKE_ERROR, ); }); @@ -306,7 +306,7 @@ describe('metadata', () => { readFileShouldError = true; await assert.doesNotReject(metadata.getGKEDescriptor(), (err: Error) => - err.message.includes(FAKE_READFILE_ERROR_MESSAGE) + err.message.includes(FAKE_READFILE_ERROR_MESSAGE), ); }); }); From 69f7e68d2a5176468035a753903479848696aebc Mon Sep 17 00:00:00 2001 From: Gautam Sharda Date: Thu, 5 Mar 2026 23:44:06 +0000 Subject: [PATCH 0999/1029] chore: add missing deps and fix typing --- handwritten/logging/package.json | 24 +++++++++++++----------- handwritten/logging/src/index.ts | 8 ++++---- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/handwritten/logging/package.json b/handwritten/logging/package.json index d6c7a148608..4e4b5caf722 100644 --- a/handwritten/logging/package.json +++ b/handwritten/logging/package.json @@ -53,6 +53,8 @@ "@google-cloud/paginator": "^5.0.0", "@google-cloud/projectify": "^4.0.0", "@google-cloud/promisify": "4.0.0", + "@grpc/grpc-js": "^1.14.3", + "@opentelemetry/api": "^1.7.0", "arrify": "^2.0.1", "dot-prop": "^6.0.0", "eventid": "^2.0.0", @@ -60,16 +62,23 @@ "gcp-metadata": "^6.0.0", "google-auth-library": "^9.0.0", "google-gax": "^4.0.3", + "long": "^5.3.2", "on-finished": "^2.3.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", - "uuid": "^9.0.0", - "@opentelemetry/api": "^1.7.0" + "uuid": "^9.0.0" }, "devDependencies": { "@google-cloud/bigquery": "^7.0.0", + "@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0", "@google-cloud/pubsub": "^4.0.0", "@google-cloud/storage": "^7.0.0", + "@opentelemetry/api": "^1.7.0", + "@opentelemetry/resources": "^1.23.0", + "@opentelemetry/sdk-node": "^0.52.0", + "@opentelemetry/sdk-trace-base": "^1.23.0", + "@opentelemetry/sdk-trace-node": "^1.23.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "@types/extend": "^3.0.1", "@types/mocha": "^9.0.0", "@types/node": "^20.4.9", @@ -85,8 +94,8 @@ "gts": "^5.0.0", "http2spy": "^2.0.0", "jsdoc": "^4.0.0", - "jsdoc-region-tag": "^3.0.0", "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", "linkinator": "^3.0.0", "mocha": "^9.2.2", "nock": "^13.0.0", @@ -98,14 +107,7 @@ "typescript": "^5.1.6", "uglify-js": "^3.13.5", "webpack": "^5.0.0", - "webpack-cli": "^5.0.0", - "@opentelemetry/api": "^1.7.0", - "@opentelemetry/sdk-trace-node": "^1.23.0", - "@opentelemetry/sdk-node": "^0.52.0", - "@opentelemetry/semantic-conventions": "^1.23.0", - "@opentelemetry/sdk-trace-base": "^1.23.0", - "@opentelemetry/resources": "^1.23.0", - "@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0" + "webpack-cli": "^5.0.0" }, "engines": { "node": ">=14.0.0" diff --git a/handwritten/logging/src/index.ts b/handwritten/logging/src/index.ts index b8557301f3d..8894861a11d 100644 --- a/handwritten/logging/src/index.ts +++ b/handwritten/logging/src/index.ts @@ -725,7 +725,7 @@ class Logging { return; } gaxStream - .on('error', err => { + .on('error', (err: Error) => { requestStream.destroy(err); }) .pipe(requestStream); @@ -1037,7 +1037,7 @@ class Logging { return; } gaxStream - .on('error', err => { + .on('error', (err: Error) => { requestStream.destroy(err); }) .pipe(requestStream); @@ -1225,7 +1225,7 @@ class Logging { return; } gaxStream - .on('error', err => { + .on('error', (err: Error) => { requestStream.destroy(err); }) .pipe(requestStream); @@ -1384,7 +1384,7 @@ class Logging { } gaxStream = requestFn!(); gaxStream - .on('error', err => { + .on('error', (err: Error) => { stream.destroy(err); }) .pipe(stream); From b7d8f425f0d07cc426468abe7f346820a6404c7d Mon Sep 17 00:00:00 2001 From: Gautam Sharda Date: Thu, 5 Mar 2026 23:53:49 +0000 Subject: [PATCH 1000/1029] chore: preserve original README --- handwritten/logging/README.md | 254 ++++++++++++++++++++++++++-------- handwritten/logging/owlbot.py | 11 +- 2 files changed, 206 insertions(+), 59 deletions(-) diff --git a/handwritten/logging/README.md b/handwritten/logging/README.md index 10d1d2b04d0..3a75439878c 100644 --- a/handwritten/logging/README.md +++ b/handwritten/logging/README.md @@ -2,23 +2,37 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Logging: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging) +# [Cloud Logging: Node.js Client](https://github.com/googleapis/nodejs-logging) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.com/package/@google-cloud/logging) +[![npm version](https://img.shields.io/npm/v/@google-cloud/logging.svg)](https://www.npmjs.org/package/@google-cloud/logging) -Cloud Logging Client Library for Node.js +[Google Cloud Logging](https://cloud.google.com/logging/docs) allows you to store, search, analyze, +monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. + +If you require lightweight dependencies, an experimental, minified version of +this library is available at [@google-cloud/logging-min](https://www.npmjs.com/package/@google-cloud/logging-min). +Note: `logging-min` is experimental, and its feature surface is subject to change. +To install `@google-cloud/logging-min` library run the following command: + +```bash +npm install @google-cloud/logging-min +``` + +For an interactive tutorial on using the client library in a Node.js application, click Guide Me: + +[![Guide Me](https://raw.githubusercontent.com/googleapis/nodejs-logging/main/_static/guide-me.svg)](https://console.cloud.google.com/?walkthrough_id=logging__logging-nodejs) A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-logging/blob/main/CHANGELOG.md). * [Cloud Logging Node.js Client API Reference][client-docs] * [Cloud Logging Documentation][product-docs] -* [github.com/googleapis/google-cloud-node/handwritten/logging](https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging) +* [github.com/googleapis/nodejs-logging](https://github.com/googleapis/nodejs-logging) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -31,7 +45,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - + * [Using the client library](#using-the-client-library) * [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) @@ -43,7 +57,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable the Cloud Logging API][enable_api]. -1. [Set up authentication][auth] so you can access the +1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. ### Installing the client library @@ -53,57 +67,189 @@ npm install @google-cloud/logging ``` +### Using the client library + +```javascript +// Imports the Google Cloud client library +const {Logging} = require('@google-cloud/logging'); + +async function quickstart( + projectId = 'YOUR_PROJECT_ID', // Your Google Cloud Platform project ID + logName = 'my-log' // The name of the log to write to +) { + // Creates a client + const logging = new Logging({projectId}); + + // Selects the log to write to + const log = logging.log(logName); + + // The data to write to the log + const text = 'Hello, world!'; + + // The metadata associated with the entry + const metadata = { + resource: {type: 'global'}, + // See: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity + severity: 'INFO', + }; + + // Prepares a log entry + const entry = log.entry(metadata, text); + + async function writeLog() { + // Writes the log entry + await log.write(entry); + console.log(`Logged: ${text}`); + } + writeLog(); +} + +``` +## Batching Writes + +High throughput applications should avoid awaiting calls to the logger: + +```js +await log.write(logEntry1); +await log.write(logEntry2); +``` + +Rather, applications should use a _fire and forget_ approach: + +```js +log.write(logEntry1); +log.write(logEntry2); +``` + +The `@google-cloud/logging` library will handle batching and dispatching +these log lines to the API. + +## Writing to Stdout + +The `LogSync` class helps users easily write context-rich structured logs to +`stdout` or any custom transport. It extracts additional log properties like +trace context from HTTP headers and can be used as an on/off toggle between +writing to the API or to `stdout` during local development. + +Logs written to `stdout` are then picked up, out-of-process, by a Logging +agent in the respective GCP environment. Logging agents can add more +properties to each entry before streaming it to the Logging API. + +Read more about [Logging agents](https://cloud.google.com/logging/docs/agent/logging). + +Serverless applications like Cloud Functions, Cloud Run, and App Engine +are highly recommended to use the `LogSync` class as async logs may be dropped +due to lack of CPU. + +Read more about [structured logging](https://cloud.google.com/logging/docs/structured-logging). + +```js +// Optional: Create and configure a client +const logging = new Logging(); +await logging.setProjectId() +await logging.setDetectedResource() + +// Create a LogSync transport, defaulting to `process.stdout` +const log = logging.logSync(logname); +const meta = { // optional field overrides here }; +const entry = log.entry(meta, 'Your log message'); +log.write(entry); + +// Syntax sugar for logging at a specific severity +log.alert(entry); +log.warning(entry); +``` + +## Populating Http request metadata + +Metadata about Http request is a part of the [structured log info](https://cloud.google.com/logging/docs/structured-logging) +that can be captured within each log entry. It can provide a context for the application logs and +is used to group multiple log entries under the load balancer request logs. See the [sample](https://github.com/googleapis/nodejs-logging/blob/master/samples/http-request.js) +how to populate the Http request metadata for log entries. + +If you already have a "raw" Http `request` object you can assign it to `entry.metadata.httpRequest` directly. More information about +how the `request` is interpreted as raw can be found in the [code](https://github.com/googleapis/nodejs-logging/blob/15849160116a814ab71113138cb211c2e0c2d4b4/src/entry.ts#L224-L238). + +## Automatic Trace/Span ID Extraction +Cloud Logging libraries use [trace fields within LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace) to capture trace contexts, which enables the [correlation of logs and traces](https://cloud.google.com/logging/docs/view/correlate-logs), and distributed tracing troubleshooting. +These tracing fields, including [trace](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace), [spanId](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.span_id), and [traceSampled](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.trace_sampled), define the trace context for a `LogEntry`. + +If not provided explicitly in a LogEntry, the Cloud Logging library automatically populates `trace`, `span_id`, and `trace_sampled` fields from detected OpenTelemetry span contexts, or from HTTP request headers. + +### Extracting Trace/Span ID from OpenTelemetry Context +If you are using OpenTelemetry and there is an active span in the OpenTelemetry Context, the `trace`, `span_id`, and `trace_sampled` fields in the log entry are automatically populated from the active span. More information about OpenTelemetry can be found [here](https://opentelemetry.io/docs/languages/js/). + +### Extracting Trace/Span ID from HTTP Headers +If tracing fields are not provided explicitly and no OpenTelemetry context is detected, the `trace` / `span_id` fields are extracted automatically from HTTP headers. +Trace information can be automatically populated from either the [W3C Traceparent](https://www.w3.org/TR/trace-context) or [X-Cloud-Trace-Context](https://cloud.google.com/trace/docs/trace-context#legacy-http-header) headers. + +## Error handling with logs written or deleted asynchronously + +The `Log` class provide users the ability to write and delete logs asynchronously. However, there are cases when log entries +cannot be written or deleted and error is thrown - if error is not handled properly, it could crash the application. +One possible way to catch the error is to `await` the log write/delete calls and wrap it with `try/catch` like in example below: + +```js + // Write log entry and and catch any errors + try { + await log.write(entry); + } catch (err) { + console.log('Error is: ' + err); + } +``` + +However, awaiting for every `log.write` or `log.delete` calls may introduce delays which could be avoided by +simply adding a callback like in the example below. This way the log entry can be queued for processing and code +execution will continue without further delays. The callback will be called once the operation is complete: + +```js + // Asynchronously write the log entry and handle respone or any errors in provided callback + log.write(entry, err => { + if (err) { + // The log entry was not written. + console.log(err.message); + } else { + console.log('No error in write callback!'); + } + }); +``` + +Adding a callback to every `log.write` or `log.delete` calls could be a burden, especially if code +handling the error is always the same. For this purpose we introduced an ability to provide a default callback +for `Log` class which could be set through `LogOptions` passed to `Log` constructor as in example below - this +way you can define a global callback once for all `log.write` and `log.delete` calls and be able to handle errors: + +```js + const {Logging} = require('@google-cloud/logging'); + const logging = new Logging(); + + // Create options with default callback to be called on every write/delete response or error + const options = { + defaultWriteDeleteCallback: function (err) { + if (err) { + console.log('Error is: ' + err); + } else { + console.log('No error, all is good!'); + } + }, + }; + + const log = logging.log('my-log', options); +``` +See the full sample in `writeLogWithCallback` function [here](https://github.com/googleapis/nodejs-logging/blob/master/samples/logs.js). ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/handwritten/logging/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-logging/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Config_service_v2.copy_log_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.copy_log_entries.js,handwritten/logging/samples/README.md) | -| Config_service_v2.create_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_bucket.js,handwritten/logging/samples/README.md) | -| Config_service_v2.create_bucket_async | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_bucket_async.js,handwritten/logging/samples/README.md) | -| Config_service_v2.create_exclusion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_exclusion.js,handwritten/logging/samples/README.md) | -| Config_service_v2.create_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_link.js,handwritten/logging/samples/README.md) | -| Config_service_v2.create_sink | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_sink.js,handwritten/logging/samples/README.md) | -| Config_service_v2.create_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.create_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.create_view.js,handwritten/logging/samples/README.md) | -| Config_service_v2.delete_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_bucket.js,handwritten/logging/samples/README.md) | -| Config_service_v2.delete_exclusion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_exclusion.js,handwritten/logging/samples/README.md) | -| Config_service_v2.delete_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_link.js,handwritten/logging/samples/README.md) | -| Config_service_v2.delete_sink | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_sink.js,handwritten/logging/samples/README.md) | -| Config_service_v2.delete_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.delete_view.js,handwritten/logging/samples/README.md) | -| Config_service_v2.get_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_bucket.js,handwritten/logging/samples/README.md) | -| Config_service_v2.get_cmek_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_cmek_settings.js,handwritten/logging/samples/README.md) | -| Config_service_v2.get_exclusion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_exclusion.js,handwritten/logging/samples/README.md) | -| Config_service_v2.get_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_link.js,handwritten/logging/samples/README.md) | -| Config_service_v2.get_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_settings.js,handwritten/logging/samples/README.md) | -| Config_service_v2.get_sink | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_sink.js,handwritten/logging/samples/README.md) | -| Config_service_v2.get_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.get_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.get_view.js,handwritten/logging/samples/README.md) | -| Config_service_v2.list_buckets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_buckets.js,handwritten/logging/samples/README.md) | -| Config_service_v2.list_exclusions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_exclusions.js,handwritten/logging/samples/README.md) | -| Config_service_v2.list_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_links.js,handwritten/logging/samples/README.md) | -| Config_service_v2.list_sinks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_sinks.js,handwritten/logging/samples/README.md) | -| Config_service_v2.list_views | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.list_views.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.list_views.js,handwritten/logging/samples/README.md) | -| Config_service_v2.undelete_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.undelete_bucket.js,handwritten/logging/samples/README.md) | -| Config_service_v2.update_bucket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_bucket.js,handwritten/logging/samples/README.md) | -| Config_service_v2.update_bucket_async | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_bucket_async.js,handwritten/logging/samples/README.md) | -| Config_service_v2.update_cmek_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_cmek_settings.js,handwritten/logging/samples/README.md) | -| Config_service_v2.update_exclusion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_exclusion.js,handwritten/logging/samples/README.md) | -| Config_service_v2.update_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_settings.js,handwritten/logging/samples/README.md) | -| Config_service_v2.update_sink | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_sink.js,handwritten/logging/samples/README.md) | -| Config_service_v2.update_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/config_service_v2.update_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/config_service_v2.update_view.js,handwritten/logging/samples/README.md) | -| Logging_service_v2.delete_log | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.delete_log.js,handwritten/logging/samples/README.md) | -| Logging_service_v2.list_log_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_log_entries.js,handwritten/logging/samples/README.md) | -| Logging_service_v2.list_logs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_logs.js,handwritten/logging/samples/README.md) | -| Logging_service_v2.list_monitored_resource_descriptors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js,handwritten/logging/samples/README.md) | -| Logging_service_v2.tail_log_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.tail_log_entries.js,handwritten/logging/samples/README.md) | -| Logging_service_v2.write_log_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/logging_service_v2.write_log_entries.js,handwritten/logging/samples/README.md) | -| Metrics_service_v2.create_log_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.create_log_metric.js,handwritten/logging/samples/README.md) | -| Metrics_service_v2.delete_log_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.delete_log_metric.js,handwritten/logging/samples/README.md) | -| Metrics_service_v2.get_log_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.get_log_metric.js,handwritten/logging/samples/README.md) | -| Metrics_service_v2.list_log_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.list_log_metrics.js,handwritten/logging/samples/README.md) | -| Metrics_service_v2.update_log_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=handwritten/logging/samples/generated/v2/metrics_service_v2.update_log_metric.js,handwritten/logging/samples/README.md) | +| Fluent | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/fluent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/fluent.js,samples/README.md) | +| Log HTTP Request | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/http-request.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/http-request.js,samples/README.md) | +| Logs | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/logs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/logs.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Sinks | [source code](https://github.com/googleapis/nodejs-logging/blob/main/samples/sinks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-logging&page=editor&open_in_editor=samples/sinks.js,samples/README.md) | @@ -153,7 +299,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-logging/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -165,7 +311,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-logging/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/logging/latest [product-docs]: https://cloud.google.com/logging/docs @@ -173,4 +319,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=logging.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index 3dbad15fbb2..eba3c9b13b8 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -31,7 +31,8 @@ ".github/auto-label.yaml", ".github/release-please.yml", ".github/CODEOWNERS", - ".github/sync-repo-settings.yaml" + ".github/sync-repo-settings.yaml", + "README.md" ] ) @@ -53,17 +54,17 @@ # add shared environment variables to test configs s.move( - ".kokoro/common_env_vars.cfg", - ".kokoro/common.cfg", + "handwritten/logging/.kokoro/common_env_vars.cfg", + "handwritten/logging/.kokoro/common.cfg", merge=lambda src, dst, _, : f"{dst}\n{src}", ) -for path, subdirs, files in os.walk(f".kokoro/continuous"): +for path, subdirs, files in os.walk(f"handwritten/logging/.kokoro/continuous"): for name in files: if name == "common.cfg": file_path = os.path.join(path, name) s.move( - ".kokoro/common_env_vars.cfg", + "handwritten/logging/.kokoro/common_env_vars.cfg", file_path, merge=lambda src, dst, _, : f"{dst}\n{src}", ) From 25ff5e151e22d115235cd88c73fbdf35c575cc97 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 00:03:18 +0000 Subject: [PATCH 1001/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 42d2b8f10c9..921a8d24272 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -42,3 +42,23 @@ env_vars: { ################################################### + + +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 42d2b8f10c9..921a8d24272 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -42,3 +42,23 @@ env_vars: { ################################################### + + +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + From 385e7661aad4a3d396a54a6818b4d282daa2fabf Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 00:15:18 +0000 Subject: [PATCH 1002/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 921a8d24272..115048eecb5 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -44,6 +44,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 921a8d24272..115048eecb5 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -44,6 +44,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 93d63c2f8a910e6ba9c4e069b903ff424b0ac574 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 00:27:33 +0000 Subject: [PATCH 1003/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 115048eecb5..0e981cb1b67 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -64,6 +64,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 115048eecb5..0e981cb1b67 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -64,6 +64,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 661aa017975cbd695633bb825d347b930f205bca Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 00:41:29 +0000 Subject: [PATCH 1004/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 0e981cb1b67..11350d56986 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -84,6 +84,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 0e981cb1b67..11350d56986 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -84,6 +84,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 209f2ea98cb6708c38fe638766ddb7d609e34e22 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 00:53:51 +0000 Subject: [PATCH 1005/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 11350d56986..0c912dae940 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -104,6 +104,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 11350d56986..0c912dae940 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -104,6 +104,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 8434c9e72c8fcf3a62db7673db7b110b086b55bb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 01:08:22 +0000 Subject: [PATCH 1006/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 0c912dae940..ff91278bf2d 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -124,6 +124,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 0c912dae940..ff91278bf2d 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -124,6 +124,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 9b71b2112130f06a46ab98dd6c448e6c3119e634 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 01:23:09 +0000 Subject: [PATCH 1007/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index ff91278bf2d..bf9dcc2ae78 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -144,6 +144,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index ff91278bf2d..bf9dcc2ae78 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -144,6 +144,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 430a6fc6652c3a7298cd127724119539973848e4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 01:35:12 +0000 Subject: [PATCH 1008/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index bf9dcc2ae78..1110556f51f 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -164,6 +164,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index bf9dcc2ae78..1110556f51f 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -164,6 +164,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 41a57b3401593615a316a0e64387a53dc35dbd7b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 01:47:00 +0000 Subject: [PATCH 1009/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 1110556f51f..80b5d74ddc1 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -184,6 +184,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 1110556f51f..80b5d74ddc1 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -184,6 +184,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 82653ca79c6559491e8d8cc2a66e03e36b8d021b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 01:59:43 +0000 Subject: [PATCH 1010/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index 80b5d74ddc1..f8f6da768f6 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -204,6 +204,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index 80b5d74ddc1..f8f6da768f6 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -204,6 +204,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From cae9fbecc5b113109ad0ae5125a386bbf699ec3c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 02:12:00 +0000 Subject: [PATCH 1011/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index f8f6da768f6..b8b8afb5ee0 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -224,6 +224,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index f8f6da768f6..b8b8afb5ee0 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -224,6 +224,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From ca731e6dfbe0d9646499286888a9bb49a2f6164f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 02:23:49 +0000 Subject: [PATCH 1012/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index b8b8afb5ee0..a0a7467191f 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -244,6 +244,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index b8b8afb5ee0..a0a7467191f 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -244,6 +244,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 1462cf9074c0a78ab5559a50d5d26f21fee17983 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 02:35:28 +0000 Subject: [PATCH 1013/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index a0a7467191f..c6b8b788d2f 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -264,6 +264,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index a0a7467191f..c6b8b788d2f 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -264,6 +264,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 16820860eeff395f38ad3d28eb00196675059d0b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Mar 2026 02:47:32 +0000 Subject: [PATCH 1014/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.kokoro/common.cfg | 20 +++++++++++++++++++ .../.kokoro/continuous/node14/common.cfg | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index c6b8b788d2f..dd29dccb956 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -284,6 +284,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index c6b8b788d2f..dd29dccb956 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -284,6 +284,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "nodejs" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From bc34930961a71d47fef05c50fa3650e66a8ea598 Mon Sep 17 00:00:00 2001 From: Gautam Sharda Date: Fri, 6 Mar 2026 02:58:08 +0000 Subject: [PATCH 1015/1029] fix: fix owlbot.py, amke idempotent, preserve correct common configs --- handwritten/logging/.kokoro/common.cfg | 261 ------------------ .../.kokoro/continuous/node14/common.cfg | 261 ------------------ handwritten/logging/owlbot.py | 8 +- 3 files changed, 4 insertions(+), 526 deletions(-) diff --git a/handwritten/logging/.kokoro/common.cfg b/handwritten/logging/.kokoro/common.cfg index c6b8b788d2f..01225d66268 100644 --- a/handwritten/logging/.kokoro/common.cfg +++ b/handwritten/logging/.kokoro/common.cfg @@ -41,264 +41,3 @@ env_vars: { } ################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - diff --git a/handwritten/logging/.kokoro/continuous/node14/common.cfg b/handwritten/logging/.kokoro/continuous/node14/common.cfg index c6b8b788d2f..01225d66268 100644 --- a/handwritten/logging/.kokoro/continuous/node14/common.cfg +++ b/handwritten/logging/.kokoro/continuous/node14/common.cfg @@ -41,264 +41,3 @@ env_vars: { } ################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "nodejs" -} - -################################################### - diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index eba3c9b13b8..b66216bb59a 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -39,12 +39,12 @@ # adjust .trampolinerc for environment tests s.replace( ".trampolinerc", - "required_envvars[^\)]*\)", + r"required_envvars[^\)]*\)", "required_envvars+=()" ) s.replace( ".trampolinerc", - "pass_down_envvars\+\=\(", + r"pass_down_envvars\+\=\(", 'pass_down_envvars+=(\n "ENVIRONMENT"\n "RUNTIME"' ) @@ -56,7 +56,7 @@ s.move( "handwritten/logging/.kokoro/common_env_vars.cfg", "handwritten/logging/.kokoro/common.cfg", - merge=lambda src, dst, _, : f"{dst}\n{src}", + merge=lambda src, dst, _: dst if src.strip() in dst else f"{dst.rstrip()}\n{src.strip()}\n", ) for path, subdirs, files in os.walk(f"handwritten/logging/.kokoro/continuous"): @@ -66,5 +66,5 @@ s.move( "handwritten/logging/.kokoro/common_env_vars.cfg", file_path, - merge=lambda src, dst, _, : f"{dst}\n{src}", + merge=lambda src, dst, _: dst if src.strip() in dst else f"{dst.rstrip()}\n{src.strip()}\n", ) From a48e293bbfd02ef5961d1ca01b5f44033cd0a9ec Mon Sep 17 00:00:00 2001 From: Gautam Sharda Date: Mon, 9 Mar 2026 21:55:19 +0000 Subject: [PATCH 1016/1029] chore: remove env-tests-logging submodule and update paths/owners --- .github/CODEOWNERS | 3 +-- env-tests-logging | 1 - handwritten/logging/owlbot.py | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) delete mode 160000 env-tests-logging diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 282abccf6b8..5a71bf1805d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,5 +12,4 @@ /handwritten/storage @googleapis/gcs-team /handwritten/firestore @googleapis/firestore-team /handwritten/spanner @googleapis/spanner-team -/handwritten/bigquery-storage @googleapis/bigquery-team -/handwritten/logging @googleapis/yoshi-nodejs +/handwritten/bigquery-storage @googleapis/bigquery-team \ No newline at end of file diff --git a/env-tests-logging b/env-tests-logging deleted file mode 160000 index b2f060f3017..00000000000 --- a/env-tests-logging +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b2f060f30170d95a0fd813dc39cdaa6abca69ca9 diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index b66216bb59a..22804d703f2 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -38,12 +38,12 @@ # adjust .trampolinerc for environment tests s.replace( - ".trampolinerc", + "handwritten/logging/.trampolinerc", r"required_envvars[^\)]*\)", "required_envvars+=()" ) s.replace( - ".trampolinerc", + "handwritten/logging/.trampolinerc", r"pass_down_envvars\+\=\(", 'pass_down_envvars+=(\n "ENVIRONMENT"\n "RUNTIME"' ) From 7578da062a28fac181542164a4d911c50acb29d7 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:09:12 +0000 Subject: [PATCH 1017/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index f1ac3ee1315..27554918ec3 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -19,6 +19,8 @@ required_envvars+=() # Add env vars which are passed down into the container here. pass_down_envvars+=( + "ENVIRONMENT" + "RUNTIME" "ENVIRONMENT" "RUNTIME" "AUTORELEASE_PR" From ec02d81ee516887ba1f560b81320110ef06cd184 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:12:04 +0000 Subject: [PATCH 1018/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index f1ac3ee1315..27554918ec3 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -19,6 +19,8 @@ required_envvars+=() # Add env vars which are passed down into the container here. pass_down_envvars+=( + "ENVIRONMENT" + "RUNTIME" "ENVIRONMENT" "RUNTIME" "AUTORELEASE_PR" From 683b2a728b752e8807fce4a930b54683125603cd Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:21:29 +0000 Subject: [PATCH 1019/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 27554918ec3..d47b4fc7a7d 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -23,6 +23,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From 68a3b8faf25ca728c9be5c41602a51fb96c6f046 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:22:28 +0000 Subject: [PATCH 1020/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 27554918ec3..d47b4fc7a7d 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -23,6 +23,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From 7ce8c2ffddfd35eb2bf401a681ba77b53c42c4f3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:34:19 +0000 Subject: [PATCH 1021/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index d47b4fc7a7d..6f36c3eadd6 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -25,6 +25,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From fad91f1fa2ed17da58ade0f4aec6e949c55ce7ae Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:35:04 +0000 Subject: [PATCH 1022/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index d47b4fc7a7d..6f36c3eadd6 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -25,6 +25,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From 610ea60f029a83d865453a36740d39323c61a88c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:43:50 +0000 Subject: [PATCH 1023/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 6f36c3eadd6..efb0393b1bc 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -27,6 +27,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From e68dc895cf3e0a4273e78f8482546fd4e6e28497 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:46:33 +0000 Subject: [PATCH 1024/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 6f36c3eadd6..efb0393b1bc 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -27,6 +27,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From cbb57b4a881ce9ba5ffbb336f7e2a3012edfde34 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:52:59 +0000 Subject: [PATCH 1025/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index efb0393b1bc..1be2a3c0ba9 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -29,6 +29,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From 96016bf1d683e53e8adeabf82462ffc7c637bc41 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 22:58:03 +0000 Subject: [PATCH 1026/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index efb0393b1bc..1be2a3c0ba9 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -29,6 +29,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From beabd8fb0cf146e84ddff469c51e13ebfb641b49 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 23:06:58 +0000 Subject: [PATCH 1027/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 1be2a3c0ba9..35ba571fbde 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -31,6 +31,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" ) From c3731bca13b6126da31996b631a6c9288a912c06 Mon Sep 17 00:00:00 2001 From: Gautam Sharda Date: Mon, 9 Mar 2026 23:16:19 +0000 Subject: [PATCH 1028/1029] chore: revert trampolinesrc to original and make owlbot changes idempotent --- handwritten/logging/.trampolinerc | 10 ---------- handwritten/logging/owlbot.py | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 1be2a3c0ba9..f1ac3ee1315 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -19,16 +19,6 @@ required_envvars+=() # Add env vars which are passed down into the container here. pass_down_envvars+=( - "ENVIRONMENT" - "RUNTIME" - "ENVIRONMENT" - "RUNTIME" - "ENVIRONMENT" - "RUNTIME" - "ENVIRONMENT" - "RUNTIME" - "ENVIRONMENT" - "RUNTIME" "ENVIRONMENT" "RUNTIME" "AUTORELEASE_PR" diff --git a/handwritten/logging/owlbot.py b/handwritten/logging/owlbot.py index 22804d703f2..4c5cc2efb51 100644 --- a/handwritten/logging/owlbot.py +++ b/handwritten/logging/owlbot.py @@ -44,7 +44,7 @@ ) s.replace( "handwritten/logging/.trampolinerc", - r"pass_down_envvars\+\=\(", + r"pass_down_envvars\+\=\((?!\s*\"ENVIRONMENT\")", 'pass_down_envvars+=(\n "ENVIRONMENT"\n "RUNTIME"' ) From 9a52687e3561c592e9f834eafde6eb033e7a81bb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 9 Mar 2026 23:19:20 +0000 Subject: [PATCH 1029/1029] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBo?= =?UTF-8?q?t=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- handwritten/logging/.trampolinerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index 35ba571fbde..4030ce04f72 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -33,6 +33,8 @@ pass_down_envvars+=( "RUNTIME" "ENVIRONMENT" "RUNTIME" + "ENVIRONMENT" + "RUNTIME" "AUTORELEASE_PR" "VERSION" )